From 12425a62a6666689fd4fe1e1a528127355793fe2 Mon Sep 17 00:00:00 2001 From: lrknox Date: Fri, 17 Mar 2017 12:43:50 -0500 Subject: set initial version for HDF5 1.10.1. --- README.txt | 2 +- c++/src/cpp_doc_config | 2 +- configure.ac | 2 +- release_docs/RELEASE.txt | 2 +- src/H5public.h | 8 ++++---- 5 files changed, 8 insertions(+), 8 deletions(-) diff --git a/README.txt b/README.txt index e51a486..6d7ae50 100644 --- a/README.txt +++ b/README.txt @@ -1,4 +1,4 @@ -HDF5 version 1.9.236 currently under development +HDF5 version 1.10.1-pre0 currently under development Please refer to the release_docs/INSTALL file for installation instructions. ------------------------------------------------------------------------------ diff --git a/c++/src/cpp_doc_config b/c++/src/cpp_doc_config index 5986eaa..f04528f 100644 --- a/c++/src/cpp_doc_config +++ b/c++/src/cpp_doc_config @@ -38,7 +38,7 @@ PROJECT_NAME = "HDF5 C++ API" # could be handy for archiving the generated documentation or if some version # control system is used. -PROJECT_NUMBER = "1.9.236 currently under development" +PROJECT_NUMBER = "1.10.1-pre0, currently under development" # Using the PROJECT_BRIEF tag one can provide an optional one line description # for a project that appears at the top of each page and should give viewer a diff --git a/configure.ac b/configure.ac index 2af7988..3cb4b6a 100644 --- a/configure.ac +++ b/configure.ac @@ -26,7 +26,7 @@ AC_PREREQ([2.69]) ## NOTE: Do not forget to change the version number here when we do a ## release!!! ## -AC_INIT([HDF5], [1.9.236], [help@hdfgroup.org]) +AC_INIT([HDF5], [1.10.1-pre0], [help@hdfgroup.org]) AC_CONFIG_SRCDIR([src/H5.c]) AC_CONFIG_HEADERS([src/H5config.h]) diff --git a/release_docs/RELEASE.txt b/release_docs/RELEASE.txt index fdae007..94c3035 100644 --- a/release_docs/RELEASE.txt +++ b/release_docs/RELEASE.txt @@ -1,4 +1,4 @@ -HDF5 version 1.9.236 currently under development +HDF5 version 1.10.1-pre0 currently under development ================================================================================ diff --git a/src/H5public.h b/src/H5public.h index f0eb63a..76be643 100644 --- a/src/H5public.h +++ b/src/H5public.h @@ -93,11 +93,11 @@ extern "C" { /* Version numbers */ #define H5_VERS_MAJOR 1 /* For major interface/format changes */ -#define H5_VERS_MINOR 9 /* For minor interface/format changes */ -#define H5_VERS_RELEASE 236 /* For tweaks, bug-fixes, or development */ -#define H5_VERS_SUBRELEASE "" /* For pre-releases like snap0 */ +#define H5_VERS_MINOR 10 /* For minor interface/format changes */ +#define H5_VERS_RELEASE 1 /* For tweaks, bug-fixes, or development */ +#define H5_VERS_SUBRELEASE "pre0" /* For pre-releases like snap0 */ /* Empty string for real releases. */ -#define H5_VERS_INFO "HDF5 library version: 1.9.236" /* Full version string */ +#define H5_VERS_INFO "HDF5 library version: 1.10.1-pre0" /* Full version string */ #define H5check() H5check_version(H5_VERS_MAJOR,H5_VERS_MINOR, \ H5_VERS_RELEASE) -- cgit v0.12 From 9187d41af616b6c8064ab0af5c85d4dd93cff50d Mon Sep 17 00:00:00 2001 From: lrknox Date: Fri, 17 Mar 2017 13:14:08 -0500 Subject: Update version numbers in HDF5config.cmake and 2 java files. h5vers script missed them, will need updating. --- config/cmake/scripts/HDF5config.cmake | 2 +- java/src/hdf/hdf5lib/H5.java | 4 ++-- java/test/TestH5.java | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/config/cmake/scripts/HDF5config.cmake b/config/cmake/scripts/HDF5config.cmake index f9dada9..5b5e2b6 100755 --- a/config/cmake/scripts/HDF5config.cmake +++ b/config/cmake/scripts/HDF5config.cmake @@ -28,7 +28,7 @@ cmake_minimum_required (VERSION 3.2.2 FATAL_ERROR) ############################################################################## set (CTEST_SOURCE_VERSION 1.10.1) -set (CTEST_SOURCE_VERSEXT "") +set (CTEST_SOURCE_VERSEXT "-pre0") ############################################################################## # handle input parameters to script. diff --git a/java/src/hdf/hdf5lib/H5.java b/java/src/hdf/hdf5lib/H5.java index 5b35d17..4a491fe 100644 --- a/java/src/hdf/hdf5lib/H5.java +++ b/java/src/hdf/hdf5lib/H5.java @@ -216,7 +216,7 @@ import hdf.hdf5lib.structs.H5O_info_t; * exception handlers to print out the HDF-5 error stack. *
* - * @version HDF5 1.9
+ * @version HDF5 1.10.1-pre0
* See also: hdf.hdf5lib.HDFArray
* hdf.hdf5lib.HDF5Constants
* hdf.hdf5lib.HDF5CDataTypes
@@ -239,7 +239,7 @@ public class H5 implements java.io.Serializable { * * Make sure to update the versions number when a different library is used. */ - public final static int LIB_VERSION[] = { 1, 9, 9999 }; + public final static int LIB_VERSION[] = { 1, 10, 1 }; public final static String H5PATH_PROPERTY_KEY = "hdf.hdf5lib.H5.hdf5lib"; diff --git a/java/test/TestH5.java b/java/test/TestH5.java index 1a78bea..205a51c 100644 --- a/java/test/TestH5.java +++ b/java/test/TestH5.java @@ -164,7 +164,7 @@ public class TestH5 { */ @Test public void testH5get_libversion() { - int libversion[] = { 1, 9, 0 }; + int libversion[] = { 1, 10, 1 }; try { H5.H5get_libversion(libversion); @@ -186,7 +186,7 @@ public class TestH5 { */ @Test public void testH5check_version() { - int majnum = 1, minnum = 9, relnum = 0; + int majnum = 1, minnum = 10, relnum = 1; try { H5.H5check_version(majnum, minnum, relnum); -- cgit v0.12 From 764bac98c268e9042680774e5f8823e3938551c0 Mon Sep 17 00:00:00 2001 From: lrknox Date: Fri, 17 Mar 2017 16:53:16 -0500 Subject: CTestConfig.cmake: Report results to HDF5110 in buildbot and CDash. testswmr.sh.in: Run swmr tests in their own subdirectory of test to avoid signal file deletion by other tests. --- CTestConfig.cmake | 4 ++-- test/testswmr.sh.in | 23 +++++++++++++++++++++++ 2 files changed, 25 insertions(+), 2 deletions(-) diff --git a/CTestConfig.cmake b/CTestConfig.cmake index 3f5f380..8efea80 100644 --- a/CTestConfig.cmake +++ b/CTestConfig.cmake @@ -10,10 +10,10 @@ set (CTEST_NIGHTLY_START_TIME "18:00:00 CST") set (CTEST_DROP_METHOD "http") if (CDASH_LOCAL) set (CTEST_DROP_SITE "cdash-internal.hdfgroup.org") - set (CTEST_DROP_LOCATION "/submit.php?project=HDF5Trunk") + set (CTEST_DROP_LOCATION "/submit.php?project=HDF5110") else () set (CTEST_DROP_SITE "cdash.hdfgroup.org") - set (CTEST_DROP_LOCATION "/submit.php?project=HDF5+Trunk") + set (CTEST_DROP_LOCATION "/submit.php?project=HDF5110") endif () set (CTEST_DROP_SITE_CDASH TRUE) diff --git a/test/testswmr.sh.in b/test/testswmr.sh.in index c4a75e8..85e169a 100644 --- a/test/testswmr.sh.in +++ b/test/testswmr.sh.in @@ -123,6 +123,25 @@ while [ $# -gt 0 ]; do esac done +# HDF5 has several tests that create and delete signal files to communicate +# between processes, and it seems that even though the names of the files are +# 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 -p swmr_test/.libs +cp swmr* swmr_test + +# With the --disable-shared option, swmr program files are built in the test +# directory, otherwise they are in test/.libs with a corresponding wrapper +# script in the test directory. The programs or wrapper scripts in test should +# always be copied, swmr files in .libs should be copied only if they exists. +if [ -f .libs/swmr ]; then + cp .libs/swmr* swmr_test/.libs +fi + +cd swmr_test + + # Loop over index types for index_type in "-i ea" "-i b2" do @@ -521,6 +540,10 @@ done $DPRINT nerrors=$nerrors if test $nerrors -eq 0 ; then echo "SWMR tests passed." + if test -z "$HDF5_NOCLEANUP"; then + # delete the test directory + rm -rf swmr_test + fi exit 0 else echo "SWMR tests failed with $nerrors errors." -- cgit v0.12 From d60ca826c00533d72f94e38c1b2cf790e1b3f190 Mon Sep 17 00:00:00 2001 From: lrknox Date: Sat, 18 Mar 2017 22:06:32 -0500 Subject: Change version for h5repack_plugin.sh.in and expected output ddl file for plugin_version_test. --- tools/test/h5repack/h5repack_plugin.sh.in | 2 +- .../testfiles/h5repack_layout.h5-plugin_version_test.ddl | 14 +++++++------- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/tools/test/h5repack/h5repack_plugin.sh.in b/tools/test/h5repack/h5repack_plugin.sh.in index c7a9a6b..3f577a9 100644 --- a/tools/test/h5repack/h5repack_plugin.sh.in +++ b/tools/test/h5repack/h5repack_plugin.sh.in @@ -248,7 +248,7 @@ TOOLTEST_DUMP() COPY_TESTFILES_TO_TESTDIR # Run the test -arg="h5repack_layout.h5 -v -f UD=260,4,9,1,9,235" +arg="h5repack_layout.h5 -v -f UD=260,4,9,1,10,1" TOOLTEST_DUMP plugin_version_test $arg arg="h5repack_layout.h5 -v -f UD=257,1,9" diff --git a/tools/test/h5repack/testfiles/h5repack_layout.h5-plugin_version_test.ddl b/tools/test/h5repack/testfiles/h5repack_layout.h5-plugin_version_test.ddl index 3d09e14..7bac9c4 100644 --- a/tools/test/h5repack/testfiles/h5repack_layout.h5-plugin_version_test.ddl +++ b/tools/test/h5repack/testfiles/h5repack_layout.h5-plugin_version_test.ddl @@ -11,7 +11,7 @@ GROUP "/" { USER_DEFINED_FILTER { FILTER_ID 260 COMMENT dynlib4 - PARAMS { 9 1 9 235 } + PARAMS { 9 1 10 1 } } } FILLVALUE { @@ -33,7 +33,7 @@ GROUP "/" { USER_DEFINED_FILTER { FILTER_ID 260 COMMENT dynlib4 - PARAMS { 9 1 9 235 } + PARAMS { 9 1 10 1 } } } FILLVALUE { @@ -55,7 +55,7 @@ GROUP "/" { USER_DEFINED_FILTER { FILTER_ID 260 COMMENT dynlib4 - PARAMS { 9 1 9 235 } + PARAMS { 9 1 10 1 } } } FILLVALUE { @@ -77,7 +77,7 @@ GROUP "/" { USER_DEFINED_FILTER { FILTER_ID 260 COMMENT dynlib4 - PARAMS { 9 1 9 235 } + PARAMS { 9 1 10 1 } } } FILLVALUE { @@ -99,7 +99,7 @@ GROUP "/" { USER_DEFINED_FILTER { FILTER_ID 260 COMMENT dynlib4 - PARAMS { 9 1 9 235 } + PARAMS { 9 1 10 1 } } } FILLVALUE { @@ -121,7 +121,7 @@ GROUP "/" { USER_DEFINED_FILTER { FILTER_ID 260 COMMENT dynlib4 - PARAMS { 9 1 9 235 } + PARAMS { 9 1 10 1 } } } FILLVALUE { @@ -143,7 +143,7 @@ GROUP "/" { USER_DEFINED_FILTER { FILTER_ID 260 COMMENT dynlib4 - PARAMS { 9 1 9 235 } + PARAMS { 9 1 10 1 } } } FILLVALUE { -- cgit v0.12 From 17f14945b807d0999b61f72d8ff7799385b02416 Mon Sep 17 00:00:00 2001 From: Binh-Minh Ribler Date: Mon, 20 Mar 2017 18:36:37 -0500 Subject: Description: Updated the C++ API sections. --- release_docs/RELEASE.txt | 67 ++++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 65 insertions(+), 2 deletions(-) diff --git a/release_docs/RELEASE.txt b/release_docs/RELEASE.txt index f6d3912..644d3af 100644 --- a/release_docs/RELEASE.txt +++ b/release_docs/RELEASE.txt @@ -76,7 +76,62 @@ New Features C++ Library: ------------ - - + - New wrappers for C APIs: + (HDFFV-10004, HDFFV-10139, HDFFV-10145 - PRs #232, #310, #334, #348) + + // Sets/Gets the strategy and the threshold value that the library will + // will employ in managing file space. + FileCreatPropList::setFileSpaceStrategy - H5Pset_file_space_strategy + FileCreatPropList::getFileSpaceStrategy - H5Pget_file_space_strategy + + // Sets/Gets the file space page size for paged aggregation. + FileCreatPropList::setFileSpacePagesize - H5Pset_file_space_page_size + FileCreatPropList::getFileSpacePagesize - H5Pget_file_space_page_size + + // Checks if the given ID is valid. + IdComponent::isValid - H5Iis_valid + + // Sets/Gets the number of soft or user-defined links that can be + // traversed before a failure occurs. + LinkAccPropList::setNumLinks - H5Pset_nlinks + LinkAccPropList::getNumLinks - H5Pget_nlinks + + // Returns a copy of the creation property list of a datatype. + DataType::getCreatePlist - H5Tget_create_plist + + // Opens/Closes an object within a group or a file, regardless object type + Group::getObjId - H5Oopen + Group::closeObjId - H5Oclose + + // Maps elements of a virtual dataset to elements of the source dataset. + DSetCreatPropList::setVirtual - H5Pset_virtual + + // Gets general information about this file. + H5File::getFileInfo - H5Fget_info2 + + // Returns the number of members in a type. + IdComponent::getNumMembers - H5Inmembers + + // Determines if an element type exists. + IdComponent::typeExists - H5Itype_exists + + // Determines if an object exists. + H5Location::exists - H5Lexists. + + // Returns the header version of an HDF5 object. + H5Object::objVersion - H5Oget_info for version + (BMR, 2017/03/20) + + - New constructors to open datatypes in ArrayType, CompType, DataType, + EnumType, FloatType, IntType, StrType, and VarLenType. (HDFFV-10156) + (BMR, 2017/03/20) + + - New class LinkAccPropList for link access property list, to be used by + wrappers of H5Lexists. (HDFFV-10145 - PR #232) (BMR, 2017/03/20) + + - New exception: ObjHeaderIException for H5O interface. + (HDFFV-10145 - PR #334) (BMR, 2017/03/20) + Tools: ------ @@ -156,7 +211,15 @@ Bug Fixes since HDF5-1.10.0-patch1 release C++ APIs -------- - - + - Due to the change in the C API, the overloaded functions of + PropList::setProperty now need const for some arguments. They are + planned for deprecation and are replaced by new versions with proper + consts. (PR #344 -BMR, 2017/03/20) + + - The problem where a user-defined function cannot access both, attribute + and dataset, using only one argument (HDFFV9920) is now fixed. + (PR #45 -BMR, 2017/03/20) + Testing ------- -- cgit v0.12 From 7a799387e100138f1300c29810e9032f66436fcf Mon Sep 17 00:00:00 2001 From: Binh-Minh Ribler Date: Mon, 20 Mar 2017 21:56:50 -0500 Subject: Description: Fixed typos and missing items in function headers, that were revealed by Doxygen, and revised various comments. Platforms tested: Linux/32 2.6 (jam) Linux/64 (platypus) Darwin (osx1010test) --- c++/src/H5ArrayType.cpp | 8 ++++--- c++/src/H5CompType.cpp | 6 +++-- c++/src/H5DataType.cpp | 61 ++++++++++++++++++++++++----------------------- c++/src/H5DcreatProp.cpp | 16 ++++++------- c++/src/H5EnumType.cpp | 6 +++-- c++/src/H5FcreatProp.cpp | 7 +++++- c++/src/H5FloatType.cpp | 6 +++-- c++/src/H5Group.cpp | 23 ++++++++++++------ c++/src/H5Group.h | 1 + c++/src/H5IdComponent.cpp | 10 ++++---- c++/src/H5IntType.cpp | 6 +++-- c++/src/H5Location.cpp | 19 ++++++++------- c++/src/H5Location.h | 1 + c++/src/H5Object.cpp | 5 ++-- c++/src/H5OcreatProp.cpp | 9 ++++--- c++/src/H5StrType.cpp | 6 +++-- c++/src/H5VarLenType.cpp | 6 +++-- c++/test/ttypes.cpp | 3 +-- 18 files changed, 117 insertions(+), 82 deletions(-) diff --git a/c++/src/H5ArrayType.cpp b/c++/src/H5ArrayType.cpp index 3cdcc0a..c8bd0fc 100644 --- a/c++/src/H5ArrayType.cpp +++ b/c++/src/H5ArrayType.cpp @@ -77,11 +77,12 @@ ArrayType::ArrayType(const DataType& base_type, int ndims, const hsize_t* dims) // Function: ArrayType overloaded constructor ///\brief Creates an ArrayType instance by opening an HDF5 array datatype /// given its name, provided as a C character string. +///\param loc - IN: Location of the type ///\param dtype_name - IN: Array type name ///\exception H5::DataTypeIException // Programmer Binh-Minh Ribler - Dec 2016 // Description -// In 1.10.1, this constructor was introduced and will replace the +// In 1.10.1, this constructor was introduced and may replace the // existing function CommonFG::openArrayType(const char*) to // improve usability. // -BMR, Dec 2016 @@ -94,12 +95,13 @@ ArrayType::ArrayType(const H5Location& loc, const char *dtype_name) : DataType() //-------------------------------------------------------------------------- // Function: ArrayType overloaded constructor ///\brief Creates an ArrayType instance by opening an HDF5 array datatype -/// given its name, provided as an \c H5std_string. +/// given its name, provided as an \c H5std_string. +///\param loc - IN: Location of the type ///\param dtype_name - IN: Array type name ///\exception H5::DataTypeIException // Programmer Binh-Minh Ribler - Dec 2016 // Description -// In 1.10.1, this constructor was introduced and will replace the +// In 1.10.1, this constructor was introduced and may replace the // existing function CommonFG::openArrayType(const H5std_string&) // to improve usability. // -BMR, Dec 2016 diff --git a/c++/src/H5CompType.cpp b/c++/src/H5CompType.cpp index 037527f..7db2cfe 100644 --- a/c++/src/H5CompType.cpp +++ b/c++/src/H5CompType.cpp @@ -91,11 +91,12 @@ CompType::CompType(const DataSet& dataset) : DataType() // Function: CompType overloaded constructor ///\brief Creates an CompType instance by opening an HDF5 compound /// given its name, provided as a C character string. +///\param loc - IN: Location of the type ///\param dtype_name - IN: Compound type name ///\exception H5::DataTypeIException // Programmer Binh-Minh Ribler - Dec 2016 // Description -// In 1.10.1, this constructor was introduced and will replace the +// In 1.10.1, this constructor was introduced and may replace the // existing function CommonFG::openCompType(const char*) to // improve usability. // -BMR, Dec 2016 @@ -109,11 +110,12 @@ CompType::CompType(const H5Location& loc, const char *dtype_name) : DataType() // Function: CompType overloaded constructor ///\brief Creates an CompType instance by opening an HDF5 compound /// datatype given its name, provided as an \c H5std_string. +///\param loc - IN: Location of the type ///\param dtype_name - IN: Compound type name ///\exception H5::DataTypeIException // Programmer Binh-Minh Ribler - Dec 2016 // Description -// In 1.10.1, this constructor was introduced and will replace the +// In 1.10.1, this constructor was introduced and may replace the // existing function CommonFG::openCompType(const H5Location&) // to improve usability. // -BMR, Dec 2016 diff --git a/c++/src/H5DataType.cpp b/c++/src/H5DataType.cpp index c88d6eb..2795485 100644 --- a/c++/src/H5DataType.cpp +++ b/c++/src/H5DataType.cpp @@ -109,13 +109,13 @@ DataType::DataType(const H5Location& loc, const void* ref, H5R_type_t ref_type, //-------------------------------------------------------------------------- // Function: DataType overload constructor - dereference -///\brief Given a reference, ref, to an hdf5 group, creates a -/// DataType object -///\param attr - IN: Specifying location where the referenced object is in -///\param ref - IN: Reference pointer -///\param ref_type - IN: Reference type - default to H5R_OBJECT -///\param plist - IN: Property list - default to PropList::DEFAULT -///\exception H5::ReferenceException +// brief Given a reference, ref, to an hdf5 group, creates a +// DataType object +// param attr - IN: Specifying location where the referenced object is in +// param ref - IN: Reference pointer +// param ref_type - IN: Reference type - default to H5R_OBJECT +// param plist - IN: Property list - default to PropList::DEFAULT +// exception H5::ReferenceException // Programmer Binh-Minh Ribler - Oct, 2006 // Modification // Jul, 2008 @@ -162,11 +162,12 @@ DataType::DataType(const PredType& pred_type) : H5Object() // Function: DataType overloaded constructor ///\brief Creates a DataType instance by opening an HDF5 datatype given /// its name as a char*. +///\param loc - IN: Location of the type ///\param dtype_name - IN: Datatype name ///\exception H5::DataTypeIException // Programmer Binh-Minh Ribler - Dec 2016 // Description -// In 1.10.1, this constructor was introduced and will replace the +// In 1.10.1, this constructor was introduced and may replace the // existing function CommonFG::openDataType(const char*) to // improve usability. // -BMR, Dec 2016 @@ -180,11 +181,12 @@ DataType::DataType(const H5Location& loc, const char *dtype_name) : H5Object() // Function: DataType overloaded constructor ///\brief Creates a DataType instance by opening an HDF5 datatype given /// its name as an \c H5std_string. +///\param loc - IN: Location of the type ///\param dtype_name - IN: Datatype name ///\exception H5::DataTypeIException // Programmer Binh-Minh Ribler - Dec 2016 // Description -// In 1.10.1, this constructor was introduced and will replace the +// In 1.10.1, this constructor was introduced and may replace the // existing function CommonFG::openDataType(const H5std_string&) to // improve usability. // -BMR, Dec 2016 @@ -300,27 +302,6 @@ bool DataType::operator==(const DataType& compared_type) const } //-------------------------------------------------------------------------- -// Function: DataType::p_opentype (private) -///\brief Opens an HDF5 datatype given its name -///\param dtype_name - IN: Datatype name -///\exception H5::DataTypeIException -// Programmer Binh-Minh Ribler - Dec 2016 -// Description -// This function was introduced in 1.10.1 to be used by the new -// XxxType constructors that were introduced to replace the -// existing functions CommonFG::openXxxType(), which is awkward -// to use. -BMR, Dec 2016 -//-------------------------------------------------------------------------- -hid_t DataType::p_opentype(const H5Location& loc, const char *dtype_name) const -{ - // Call C function to open the named datatype at this location - hid_t ret_value = H5Topen2(loc.getId(), dtype_name, H5P_DEFAULT); - if (ret_value < 0) - throw DataTypeIException("DataType constructor", "H5Topen2 failed"); - return(ret_value); -} - -//-------------------------------------------------------------------------- // Function: DataType::p_commit (private) //\brief Commits a transient datatype to a file, creating a new // named datatype @@ -787,6 +768,26 @@ hid_t DataType::getId() const #ifndef DOXYGEN_SHOULD_SKIP_THIS //-------------------------------------------------------------------------- +// Function: DataType::p_opentype (private) +///\brief Opens an HDF5 datatype given its name +///\param loc - IN: Location of the type +///\param dtype_name - IN: Datatype name +///\exception H5::DataTypeIException +// Programmer Binh-Minh Ribler - Dec 2016 +// Description +// This function was introduced in 1.10.1 to be used by the new +// XxxType constructors that open a datatype. -BMR, Dec 2016 +//-------------------------------------------------------------------------- +hid_t DataType::p_opentype(const H5Location& loc, const char *dtype_name) const +{ + // Call C function to open the named datatype at this location + hid_t ret_value = H5Topen2(loc.getId(), dtype_name, H5P_DEFAULT); + if (ret_value < 0) + throw DataTypeIException("DataType constructor", "H5Topen2 failed"); + return(ret_value); +} + +//-------------------------------------------------------------------------- // Function: DataType::p_setId ///\brief Sets the identifier of this object to a new value. /// diff --git a/c++/src/H5DcreatProp.cpp b/c++/src/H5DcreatProp.cpp index e1be3c4..966ca16 100644 --- a/c++/src/H5DcreatProp.cpp +++ b/c++/src/H5DcreatProp.cpp @@ -744,13 +744,13 @@ void DSetCreatPropList::getExternal(unsigned idx, size_t name_size, char* name, // Function: DSetCreatPropList::setVirtual ///\brief Maps elements of a virtual dataset to elements of the source /// dataset. -///\param vspace - IN: Dataspace the virtual dataset, possibly an +///\param vspace - IN: Dataspace the virtual dataset, possibly an /// unlimited selection -///\param src_fname - IN: Name of the HDF5 file where the source dataset +///\param src_fname - IN: Name of the HDF5 file where the source dataset /// is located (\a char*) -///\param src_fname - IN: Path to the dataset in the file specified by +///\param src_dsname - IN: Path to the dataset in the file specified by /// \a src_file_name (\a char*) -///\param sspace - IN: Dataspace with a selection applied, possibly +///\param sspace - IN: Dataspace with a selection applied, possibly /// an unlimited selection ///\exception H5::PropListIException ///\par Description @@ -771,13 +771,13 @@ void DSetCreatPropList::setVirtual(const DataSpace& vspace, const char *src_fnam // Function: DSetCreatPropList::setVirtual ///\brief Maps elements of a virtual dataset to elements of the source /// dataset. -///\param vspace - IN: Dataspace the virtual dataset, possibly an +///\param vspace - IN: Dataspace the virtual dataset, possibly an /// unlimited selection -///\param src_fname - IN: Name of the HDF5 file where the source dataset +///\param src_fname - IN: Name of the HDF5 file where the source dataset /// is located (\a H5std_string) -///\param src_fname - IN: Path to the dataset in the file specified by +///\param src_dsname - IN: Path to the dataset in the file specified by /// \a src_file_name (\a H5std_string) -///\param sspace - IN: Dataspace with a selection applied, possibly +///\param sspace - IN: Dataspace with a selection applied, possibly /// an unlimited selection ///\exception H5::PropListIException ///\par Description diff --git a/c++/src/H5EnumType.cpp b/c++/src/H5EnumType.cpp index 49f60e6..9072aab 100644 --- a/c++/src/H5EnumType.cpp +++ b/c++/src/H5EnumType.cpp @@ -114,10 +114,11 @@ EnumType::EnumType(const IntType& data_type) : DataType() ///\brief Creates an EnumType instance by opening an HDF5 enum datatype /// given its name, provided as a C character string. ///\param dtype_name - IN: Enum datatype name +///\param loc - IN: Location of the type ///\exception H5::DataTypeIException // Programmer Binh-Minh Ribler - Dec 2016 // Description -// In 1.10.1, this constructor was introduced and will replace the +// In 1.10.1, this constructor was introduced and may replace the // existing function CommonFG::openEnumType(const char*) to // improve usability. // -BMR, Dec 2016 @@ -131,11 +132,12 @@ EnumType::EnumType(const H5Location& loc, const char *dtype_name) : DataType() // Function: EnumType overloaded constructor ///\brief Creates an EnumType instance by opening an HDF5 enum datatype /// given its name, provided as an \c H5std_string. +///\param loc - IN: Location of the type ///\param dtype_name - IN: Enum datatype name ///\exception H5::DataTypeIException // Programmer Binh-Minh Ribler - Dec 2016 // Description -// In 1.10.1, this constructor was introduced and will replace the +// In 1.10.1, this constructor was introduced and may replace the // existing function CommonFG::openEnumType(const H5std_string&) // to improve usability. // -BMR, Dec 2016 diff --git a/c++/src/H5FcreatProp.cpp b/c++/src/H5FcreatProp.cpp index 893db64..b3e6b7b 100644 --- a/c++/src/H5FcreatProp.cpp +++ b/c++/src/H5FcreatProp.cpp @@ -298,7 +298,8 @@ unsigned FileCreatPropList::getIstorek() const // Function: FileCreatPropList::setFileSpaceStrategy ///\brief Sets the strategy and the threshold value that the library /// will employ in managing file space. -///\param strategy - IN: Strategy for file space management +///\param strategy - IN: Strategy for file space management +///\param persist - IN: Whether to persist free-space ///\param threshold - IN: Free-space section threshold. The library /// default is 1, which is to track all free-space sections. ///\exception H5::PropListIException @@ -325,6 +326,9 @@ void FileCreatPropList::setFileSpaceStrategy(H5F_fspace_strategy_t strategy, hbo // Function: FileCreatPropList::getFileSpaceStrategy ///\brief Retrieves the strategy, persist, and threshold that the library /// uses in managing file space. +///\param strategy - OUT: Strategy for file space management +///\param persist - OUT: Whether to persist free-space +///\param threshold - OUT: Free-space section threshold ///\exception H5::PropListIException // Programmer Binh-Minh Ribler - Feb, 2017 //-------------------------------------------------------------------------- @@ -341,6 +345,7 @@ void FileCreatPropList::getFileSpaceStrategy(H5F_fspace_strategy_t& strategy, hb //-------------------------------------------------------------------------- // Function: FileCreatPropList::setFileSpacePagesize ///\brief Sets the file space page size for paged aggregation. +///\param fsp_psize - IN: Filespace's page size ///\exception H5::PropListIException // Programmer Binh-Minh Ribler - Feb, 2017 //-------------------------------------------------------------------------- diff --git a/c++/src/H5FloatType.cpp b/c++/src/H5FloatType.cpp index 5902cbe..f573add 100644 --- a/c++/src/H5FloatType.cpp +++ b/c++/src/H5FloatType.cpp @@ -95,11 +95,12 @@ FloatType::FloatType(const DataSet& dataset) : AtomType() // Function: FloatType overloaded constructor ///\brief Creates an FloatType instance by opening an HDF5 float datatype /// given its name, provided as a C character string. +///\param loc - IN: Location of the type ///\param dtype_name - IN: Float type name ///\exception H5::DataTypeIException // Programmer Binh-Minh Ribler - Dec 2016 // Description -// In 1.10.1, this constructor was introduced and will replace the +// In 1.10.1, this constructor was introduced and may replace the // existing function CommonFG::openFloatType(const char*) // to improve usability. // -BMR, Dec 2016 @@ -113,11 +114,12 @@ FloatType::FloatType(const H5Location& loc, const char *dtype_name) : AtomType() // Function: FloatType overloaded constructor ///\brief Creates an FloatType instance by opening an HDF5 float datatype /// given its name, provided as an \c H5std_string. +///\param loc - IN: Location of the type ///\param dtype_name - IN: Float type name ///\exception H5::DataTypeIException // Programmer Binh-Minh Ribler - Dec 2016 // Description -// In 1.10.1, this constructor was introduced and will replace the +// In 1.10.1, this constructor was introduced and may replace the // existing function CommonFG::openFloatType(const H5std_string&) // to improve usability. // -BMR, Dec 2016 diff --git a/c++/src/H5Group.cpp b/c++/src/H5Group.cpp index bb9e05d..66e2339 100644 --- a/c++/src/H5Group.cpp +++ b/c++/src/H5Group.cpp @@ -66,6 +66,9 @@ Group::Group(const Group& original) : H5Object(), CommonFG(), id(original.id) //-------------------------------------------------------------------------- // Function: Group::getObjId ///\brief Opens an object via object header. +///\param obj_name - IN: Path to the object +///\param plist - IN: Access property list for the link pointing to +/// the object ///\exception H5::FileIException or H5::GroupIException ///\par Description /// This function opens an object in a group or file, using @@ -88,6 +91,8 @@ hid_t Group::getObjId(const char* obj_name, const PropList& plist) const ///\brief This is an overloaded member function, provided for convenience. /// It takes a reference to a \c H5std_string for the object's name. ///\param obj_name - IN: Path to the object +///\param plist - IN: Access property list for the link pointing to +/// the object ///\exception H5::FileIException or H5::GroupIException // Programmer Binh-Minh Ribler - March, 2017 //-------------------------------------------------------------------------- @@ -159,15 +164,19 @@ Group::Group(const H5Location& loc, const void* ref, H5R_type_t ref_type, const //-------------------------------------------------------------------------- // Function: Group overload constructor - dereference -///\brief Given a reference, ref, to an hdf5 group, creates a Group object -///\param attr - IN: Specifying location where the referenced object is in -///\param ref - IN: Reference pointer -///\param ref_type - IN: Reference type - default to H5R_OBJECT -///\param plist - IN: Property list - default to PropList::DEFAULT -///\exception H5::ReferenceException +// brief Given a reference, ref, to an hdf5 group, creates a Group objec +// param attr - IN: Specifying location where the referenced object is i +// param ref - IN: Reference pointer +// param ref_type - IN: Reference type - default to H5R_OBJECT +// param plist - IN: Property list - default to PropList::DEFAULT +// exception H5::ReferenceException // Programmer Binh-Minh Ribler - Oct, 2006 +// Modification +// Mar, 2017 +// Removed in 1.10.1 because H5Location is Attribute's baseclass +// now. -BMR //-------------------------------------------------------------------------- - /* Group::Group(const Attribute& attr, const void* ref, H5R_type_t ref_type, const PropList& plist) : H5Object(), id(H5I_INVALID_HID) +/* Group::Group(const Attribute& attr, const void* ref, H5R_type_t ref_type, const PropList& plist) : H5Object(), id(H5I_INVALID_HID) { id = H5Location::p_dereference(attr.getId(), ref, ref_type, plist, "constructor - by dereference"); } diff --git a/c++/src/H5Group.h b/c++/src/H5Group.h index 0f44eb9..c8b2961 100644 --- a/c++/src/H5Group.h +++ b/c++/src/H5Group.h @@ -52,6 +52,7 @@ class H5_DLLCPP Group : public H5Object, public CommonFG { // Creates a group by way of dereference. Group(const H5Location& loc, const void* ref, H5R_type_t ref_type = H5R_OBJECT, const PropList& plist = PropList::DEFAULT); + // Removed in 1.10.1, because H5Location is baseclass // Group(const Attribute& attr, const void* ref, H5R_type_t ref_type = H5R_OBJECT, const PropList& plist = PropList::DEFAULT); // Opens an object within a group or a file, i.e., root group. diff --git a/c++/src/H5IdComponent.cpp b/c++/src/H5IdComponent.cpp index 0bcc67a..122479f 100644 --- a/c++/src/H5IdComponent.cpp +++ b/c++/src/H5IdComponent.cpp @@ -24,6 +24,7 @@ namespace H5 { +#ifndef DOXYGEN_SHOULD_SKIP_THIS // This flag indicates whether H5Library::initH5cpp has been called to register // the terminating functions with atexit() bool IdComponent::H5cppinit = false; @@ -32,6 +33,7 @@ bool IdComponent::H5cppinit = false; // Subclasses that have global constants use it. This is a temporary // work-around in 1.8.16. It will be removed after HDFFV-9540 is fixed. bool IdComponent::H5dontAtexit_called = false; +#endif // DOXYGEN_SHOULD_SKIP_THIS //-------------------------------------------------------------------------- // Function: IdComponent::incRefCount @@ -165,7 +167,7 @@ H5I_type_t IdComponent::getHDFObjType() const // Function: getNumMembers (static) ///\brief Returns the number of members of the given type. ///\return Number of members -///\Description +///\par Description /// If there is no member of the given type, getNumMembers will /// return 0. Valid types are: /// \li \c H5I_FILE (= 1) @@ -197,9 +199,9 @@ hsize_t IdComponent::getNumMembers(H5I_type_t type) // Function: isValid (static) ///\brief Checks if the given ID is valid. ///\return true if the given identifier is valid, and false, otherwise. -///\Description +///\par Description /// A valid ID is one that is in use and has an application -/// reference count of at least 1. +/// reference count of at least 1. // Programmer Binh-Minh Ribler - Mar 1, 2017 //-------------------------------------------------------------------------- bool IdComponent::isValid(hid_t an_id) @@ -219,7 +221,7 @@ bool IdComponent::isValid(hid_t an_id) ///\brief Queries if a given type is currently registered with the /// library. ///\return true if the given type exists, and false, otherwise. -///\Description +///\par Description /// Valid types are: /// \li \c H5I_FILE (= 1) /// \li \c H5I_GROUP diff --git a/c++/src/H5IntType.cpp b/c++/src/H5IntType.cpp index c64dae9..3aadcab 100644 --- a/c++/src/H5IntType.cpp +++ b/c++/src/H5IntType.cpp @@ -94,11 +94,12 @@ IntType::IntType(const DataSet& dataset) : AtomType() // Function: IntType overloaded constructor ///\brief Creates a IntType instance by opening an HDF5 integer datatype /// given its name as a char*. +///\param loc - IN: Location of the type ///\param dtype_name - IN: Integer type name ///\exception H5::DataTypeIException // Programmer Binh-Minh Ribler - Dec 2016 // Description -// In 1.10.1, this constructor was introduced and will replace the +// In 1.10.1, this constructor was introduced and may replace the // existing function CommonFG::openIntType(const char*) to // improve usability. // -BMR, Dec 2016 @@ -112,11 +113,12 @@ IntType::IntType(const H5Location& loc, const char *dtype_name) : AtomType() // Function: IntType overloaded constructor ///\brief Creates a IntType instance by opening an HDF5 integer datatype /// given its name, provided as an \c H5std_string. +///\param loc - IN: Location of the type ///\param dtype_name - IN: Integer type name ///\exception H5::DataTypeIException // Programmer Binh-Minh Ribler - Dec 2016 // Description -// In 1.10.1, this constructor was introduced and will replace the +// In 1.10.1, this constructor was introduced and may replace the // existing function CommonFG::openArrayType(const H5std_string&) // to improve usability. // -BMR, Dec 2016 diff --git a/c++/src/H5Location.cpp b/c++/src/H5Location.cpp index 5a0bb73..79b353a 100644 --- a/c++/src/H5Location.cpp +++ b/c++/src/H5Location.cpp @@ -524,16 +524,19 @@ void H5Location::dereference(const H5Location& loc, const void* ref, H5R_type_t //-------------------------------------------------------------------------- // Function: H5Location::dereference -///\brief Dereferences a reference into an HDF5 object, given an attribute. -///\param attr - IN: Attribute specifying the location of the referenced object -///\param ref - IN: Reference pointer -///\param ref_type - IN: Reference type -///\param plist - IN: Property list - default to PropList::DEFAULT -///\exception H5::ReferenceException +// brief Dereferences a reference into an HDF5 object, given an attribute. +// param attr - IN: Attribute specifying the location of the referenced object +// param ref - IN: Reference pointer +// param ref_type - IN: Reference type +// param plist - IN: Property list - default to PropList::DEFAULT +// exception H5::ReferenceException // Programmer Binh-Minh Ribler - Oct, 2006 // Modification // May, 2008 -// Corrected missing parameters. - BMR +// Corrected missing parameters. -BMR +// Mar, 2017 +// Removed in 1.10.1 because H5Location is Attribute's baseclass +// now. -BMR //-------------------------------------------------------------------------- /* void H5Location::dereference(const Attribute& attr, const void* ref, H5R_type_t ref_type, const PropList& plist) { @@ -865,7 +868,7 @@ DataSet H5Location::createDataSet(const char* name, const DataType& data_type, c //-------------------------------------------------------------------------- DataSet H5Location::createDataSet(const H5std_string& name, const DataType& data_type, const DataSpace& data_space, const DSetCreatPropList& create_plist) const { - return(createDataSet( name.c_str(), data_type, data_space, create_plist)); + return(createDataSet(name.c_str(), data_type, data_space, create_plist)); } //-------------------------------------------------------------------------- diff --git a/c++/src/H5Location.h b/c++/src/H5Location.h index 3a0d8ca..48fc2b1 100644 --- a/c++/src/H5Location.h +++ b/c++/src/H5Location.h @@ -86,6 +86,7 @@ class H5_DLLCPP H5Location : public IdComponent { // Open a referenced object whose location is specified by either // a file, an HDF5 object, or an attribute. void dereference(const H5Location& loc, const void* ref, H5R_type_t ref_type = H5R_OBJECT, const PropList& plist = PropList::DEFAULT); + // Removed in 1.10.1, because H5Location is baseclass //void dereference(const Attribute& attr, const void* ref, H5R_type_t ref_type = H5R_OBJECT, const PropList& plist = PropList::DEFAULT); // Retrieves a dataspace with the region pointed to selected. diff --git a/c++/src/H5Object.cpp b/c++/src/H5Object.cpp index b5d0f88..359fab2 100644 --- a/c++/src/H5Object.cpp +++ b/c++/src/H5Object.cpp @@ -51,7 +51,6 @@ extern "C" herr_t userAttrOpWrpr(hid_t loc_id, const char *attr_name, myData->op(*myData->location, s_attr_name, myData->opData); return 0; } -#endif //-------------------------------------------------------------------------- // Function: H5Object default constructor (protected) @@ -101,6 +100,7 @@ void f_Attribute_setId(Attribute* attr, hid_t new_id) { attr->p_setId(new_id); } +#endif //-------------------------------------------------------------------------- // Function: H5Object::createAttribute @@ -391,6 +391,8 @@ void H5Object::renameAttr(const H5std_string& oldname, const H5std_string& newna { renameAttr (oldname.c_str(), newname.c_str()); } + +#ifndef DOXYGEN_SHOULD_SKIP_THIS //-------------------------------------------------------------------------- // Function: getObjName ///\brief Given an id, returns the type of the object. @@ -502,7 +504,6 @@ ssize_t H5Object::getObjName(H5std_string& obj_name, size_t len) const return(name_size); } -#ifndef DOXYGEN_SHOULD_SKIP_THIS //-------------------------------------------------------------------------- // Function: H5Object destructor ///\brief Noop destructor. diff --git a/c++/src/H5OcreatProp.cpp b/c++/src/H5OcreatProp.cpp index 6fdd9dc..9a3af7e 100644 --- a/c++/src/H5OcreatProp.cpp +++ b/c++/src/H5OcreatProp.cpp @@ -155,7 +155,7 @@ void ObjCreatPropList::getAttrPhaseChange(unsigned& max_compact, unsigned& min_d //-------------------------------------------------------------------------- // Function: ObjCreatPropList::setAttrCrtOrder -///\brief Sets tracking and indexing of attribute creation order. +///\brief Set the flags for creation order of attributes on an object ///\param crt_order_flags - IN: Flags specifying whether to track and /// index attribute creation order. Default: No flag set ///\exception H5::PropListIException @@ -183,10 +183,9 @@ void ObjCreatPropList::setAttrCrtOrder(unsigned crt_order_flags) const //-------------------------------------------------------------------------- // Function: ObjCreatPropList::getAttrCrtOrder -///\brief Gets tracking and indexing settings for attribute -/// creation order. -///\param crt_order_flags - OUT: Flags specifying whether to track and -/// index attribute creation order +///\brief Returns the flags indicating creation order is tracked/indexed +/// for attributes on an object. +///\return The flags ///\exception H5::PropListIException ///\par Description /// When no flag is set, i.e. crt_order_flags = 0, attribute diff --git a/c++/src/H5StrType.cpp b/c++/src/H5StrType.cpp index 54981ab..db1cf04 100644 --- a/c++/src/H5StrType.cpp +++ b/c++/src/H5StrType.cpp @@ -148,11 +148,12 @@ StrType::StrType(const DataSet& dataset) : AtomType () // Function: StrType overloaded constructor ///\brief Creates an StrType instance by opening an HDF5 string datatype /// given its name, provided as a C character string. +///\param loc - IN: Location of the type ///\param dtype_name - IN: String type name ///\exception H5::DataTypeIException // Programmer Binh-Minh Ribler - Dec 2016 // Description -// In 1.10.1, this constructor was introduced and will replace the +// In 1.10.1, this constructor was introduced and may replace the // existing function CommonFG::openStrType(const char*) to // improve usability. // -BMR, Dec 2016 @@ -166,11 +167,12 @@ StrType::StrType(const H5Location& loc, const char *dtype_name) : AtomType() // Function: StrType overloaded constructor ///\brief Creates an StrType instance by opening an HDF5 string datatype /// given its name, provided as an \c H5std_string. +///\param loc - IN: Location of the type ///\param dtype_name - IN: String type name ///\exception H5::DataTypeIException // Programmer Binh-Minh Ribler - Dec 2016 // Description -// In 1.10.1, this constructor was introduced and will replace the +// In 1.10.1, this constructor was introduced and may replace the // existing function CommonFG::openStrType(const H5std_string&) // to improve usability. // -BMR, Dec 2016 diff --git a/c++/src/H5VarLenType.cpp b/c++/src/H5VarLenType.cpp index 7f50b9a..64029cc 100644 --- a/c++/src/H5VarLenType.cpp +++ b/c++/src/H5VarLenType.cpp @@ -76,11 +76,12 @@ VarLenType::VarLenType(const DataType* base_type) : DataType() // Function: VarLenType overloaded constructor ///\brief Creates an VarLenType instance by opening an HDF5 variable /// length datatype given its name, provided as a C char*. +///\param loc - IN: Location of the type ///\param dtype_name - IN: Variable length type name ///\exception H5::DataTypeIException // Programmer Binh-Minh Ribler - Dec 2016 // Description -// In 1.10.1, this constructor was introduced and will replace the +// In 1.10.1, this constructor was introduced and may replace the // existing function CommonFG::openVarLenType(const char*) to // improve usability. // -BMR, Dec 2016 @@ -94,11 +95,12 @@ VarLenType::VarLenType(const H5Location& loc, const char *dtype_name) : DataType // Function: VarLenType overloaded constructor ///\brief Creates an VarLenType instance by opening an HDF5 variable /// length datatype given its name, provided as an \c H5std_string. +///\param loc - IN: Location of the type ///\param dtype_name - IN: Variable length type name ///\exception H5::DataTypeIException // Programmer Binh-Minh Ribler - Dec 2016 // Description -// In 1.10.1, this constructor was introduced and will replace the +// In 1.10.1, this constructor was introduced and may replace the // existing function CommonFG::openVarLenType(const H5std_string&) // to improve usability. // -BMR, Dec 2016 diff --git a/c++/test/ttypes.cpp b/c++/test/ttypes.cpp index 22db539..fee4115 100644 --- a/c++/test/ttypes.cpp +++ b/c++/test/ttypes.cpp @@ -272,9 +272,8 @@ static void test_query() tcpl.close(); tid2.close(); - // Open the datatypes for query + // Open the datatypes for query. Testing both ways - // Deprecated functions tid1 = file.openCompType(CompT_NAME); tid1.close(); tid2 = file.openEnumType(EnumT_NAME); -- cgit v0.12 From 36a30ecfd288afdf8ea62a858644e622ce72fd58 Mon Sep 17 00:00:00 2001 From: Larry Knox Date: Wed, 22 Mar 2017 11:48:47 -0500 Subject: Merge pull request #358 in HDFFV/hdf5 from ~LRKNOX/hdf5_lrk:develop to develop * commit '82183c7cdc50f9dc41ef8238c6a2bef6f1c7fcde': Run all scripts using signal files between processes in their own directories to avoid accidental deletion of the signal files. --- test/test_usecases.sh.in | 33 ++++++++++++++++++++++++++++++++- test/testflushrefresh.sh.in | 7 ++++++- test/testswmr.sh.in | 18 +++++++++++++++--- test/testvdsswmr.sh.in | 31 ++++++++++++++++++++++++++++++- 4 files changed, 83 insertions(+), 6 deletions(-) diff --git a/test/test_usecases.sh.in b/test/test_usecases.sh.in index 1cae191..a1fda0e 100644 --- a/test/test_usecases.sh.in +++ b/test/test_usecases.sh.in @@ -113,6 +113,33 @@ TOOLTEST() { fi } +# HDF5 has several tests that create and delete signal files to communicate +# between processes, and it seems that even though the names of the files are +# 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 usecases_test +cp twriteorder usecases_test +for FILE in use_*; do + case "$FILE" in + *.o) continue ;; ## don't copy the .o files + esac + cp $FILE usecases_test +done + +# With the --disable-shared option, swmr program files are built in the test +# directory, otherwise they are in test/.libs with a corresponding wrapper +# script in the test directory. The programs or wrapper scripts in test should +# always be copied, swmr files in .libs should be copied only if they exists. +if [ -f .libs/use_append_chunk ]; then + mkdir usecases_test/.libs + cp .libs/use_* usecases_test/.libs + cp .libs/twriteorder usecases_test/.libs +fi + +cd usecases_test + + # run tests for H5Odisable_mdc_flushes/H5Oenable_mdc_flushes/H5Oare_mdc_flushes_disabled here temporary USECORK=use_disable_mdc_flushes for p in $USECORK; do @@ -158,10 +185,14 @@ for p in $USECASES_PROGRAMS; do fi done - +cd .. # Report test results and exit if test $nerrors -eq 0 ; then echo "All $TESTNAME tests passed." + if test -z "$HDF5_NOCLEANUP"; then + # delete the test directory + rm -rf usecases_test + fi else echo "$TESTNAME tests failed with $nerrors errors." EXIT_VALUE=$EXIT_FAILURE diff --git a/test/testflushrefresh.sh.in b/test/testflushrefresh.sh.in index e7917a0..d894cee 100644 --- a/test/testflushrefresh.sh.in +++ b/test/testflushrefresh.sh.in @@ -84,7 +84,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 -p flushrefresh_test/.libs +mkdir flushrefresh_test cp flushrefresh flushrefresh_test # With the --disable-shared option, flushrefresh is built in the test directory, @@ -92,6 +92,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 cp .libs/flushrefresh flushrefresh_test/.libs fi cd flushrefresh_test @@ -210,6 +211,10 @@ fi if test $nerrors -eq 0 ; then echo "flush/refresh objects tests passed." + if test -z "$HDF5_NOCLEANUP"; then + # delete the test directory + rm -rf flushrefresh_test + fi exit 0 else echo "flush/refresh objects tests failed with $nerrors errors." diff --git a/test/testswmr.sh.in b/test/testswmr.sh.in index 85e169a..f70d083 100644 --- a/test/testswmr.sh.in +++ b/test/testswmr.sh.in @@ -128,7 +128,13 @@ done # 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 -p swmr_test/.libs +mkdir swmr_test +for FILE in swmr*; do + case "$FILE" in + *.o) continue ;; ## don't copy the .o files + esac + cp $FILE swmr_test +done cp swmr* swmr_test # With the --disable-shared option, swmr program files are built in the test @@ -136,7 +142,13 @@ cp swmr* swmr_test # script in the test directory. The programs or wrapper scripts in test should # always be copied, swmr files in .libs should be copied only if they exists. if [ -f .libs/swmr ]; then - cp .libs/swmr* swmr_test/.libs + mkdir swmr_test/.libs + for FILE in .libs/swmr*; do + case "$FILE" in + *.o) continue ;; ## don't copy the .o files + esac + cp $FILE swmr_test/.libs + done fi cd swmr_test @@ -536,7 +548,7 @@ done ############################################################################### ## Report and exit ############################################################################### - +cd .. $DPRINT nerrors=$nerrors if test $nerrors -eq 0 ; then echo "SWMR tests passed." diff --git a/test/testvdsswmr.sh.in b/test/testvdsswmr.sh.in index d69b8c0..3ada67b 100644 --- a/test/testvdsswmr.sh.in +++ b/test/testvdsswmr.sh.in @@ -109,6 +109,31 @@ while [ $# -gt 0 ]; do esac done +# HDF5 has several tests that create and delete signal files to communicate +# between processes, and it seems that even though the names of the files are +# 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 vds_swmr_test +for FILE in vds_swmr*; do + case "$FILE" in + *.o) continue ;; ## don't copy the .o files + esac + cp $FILE vds_swmr_test +done + +# With the --disable-shared option, swmr program files are built in the test +# directory, otherwise they are in test/.libs with a corresponding wrapper +# script in the test directory. The programs or wrapper scripts in test should +# always be copied, swmr files in .libs should be copied only if they exists. +if [ -f .libs/vds_swmr_writer ]; then + mkdir vds_swmr_test/.libs + cp .libs/vds_swmr* vds_swmr_test/.libs +fi + +cd vds_swmr_test + + echo echo "###############################################################################" echo "## Basic VDS SWMR test - writing to a tiled plane" @@ -187,10 +212,14 @@ fi ############################################################################### ## Report and exit ############################################################################### - +cd .. $DPRINT nerrors=$nerrors if test $nerrors -eq 0 ; then echo "VDS SWMR tests passed." + if test -z "$HDF5_NOCLEANUP"; then + # delete the test directory + rm -rf vds_swmr_test + fi exit 0 else echo "VDS SWMR tests failed with $nerrors errors." -- cgit v0.12 From 7f53978593ac1c2d25aa7dab873fc765afcf0dbf Mon Sep 17 00:00:00 2001 From: lrknox Date: Wed, 22 Mar 2017 16:45:06 -0500 Subject: Moved Centos 6 from Supported Platforms to Other Tested Platforms and removed Centos 6 entries from the Tested Configuration Features Summary. --- release_docs/RELEASE.txt | 42 +++++++++++++++++++----------------------- 1 file changed, 19 insertions(+), 23 deletions(-) diff --git a/release_docs/RELEASE.txt b/release_docs/RELEASE.txt index 644d3af..86602f3 100644 --- a/release_docs/RELEASE.txt +++ b/release_docs/RELEASE.txt @@ -228,18 +228,6 @@ Bug Fixes since HDF5-1.10.0-patch1 release Supported Platforms =================== - Linux 2.6.32-573.22.1.el6 GNU C (gcc), Fortran (gfortran), C++ (g++) - #1 SMP x86_64 GNU/Linux compilers: - (mayll/platypus) Version 4.4.7 20120313 - Version 4.8.4 - PGI C, Fortran, C++ for 64-bit target on - x86-64; - Version 16.10-0 - Intel(R) C (icc), C++ (icpc), Fortran (icc) - compilers: - Version 15.0.3.187 (Build 20150407) - MPICH 3.1.4 compiled with GCC 4.9.3 - Linux 2.6.32-573.18.1.el6.ppc64 gcc (GCC) 4.4.7 20120313 (Red Hat 4.4.7-4) #1 SMP ppc64 GNU/Linux g++ (GCC) 4.4.7 20120313 (Red Hat 4.4.7-4) (ostrich) GNU Fortran (GCC) 4.4.7 20120313 (Red Hat 4.4.7-4) @@ -315,15 +303,13 @@ Windows 7 x64 Cygwin n y/n n y y y Windows 10 y y/y n y y y Windows 10 x64 y y/y n y y y Mac OS X Mountain Lion 10.8.5 64-bit n y/y n y y y -Mac OS X Mavericks 10.9.5 64-bit n y/y n y y ? -Mac OS X Yosemite 10.10.5 64-bit n y/y n y y ? -Mac OS X El Capitan 10.11.6 64-bit n y/y n y y ? -CentOS 6.7 Linux 2.6.18 x86_64 GNU n y/y n y y y -CentOS 6.7 Linux 2.6.18 x86_64 Intel n y/y n y y y -CentOS 6.7 Linux 2.6.32 x86_64 PGI n y/y n y y y +Mac OS X Mavericks 10.9.5 64-bit n y/y n y y y +Mac OS X Yosemite 10.10.5 64-bit n y/y n y y y +Mac OS X El Capitan 10.11.6 64-bit n y/y n y y y +CentOS 7.2 Linux 2.6.32 x86_64 PGI n y/y n y y y CentOS 7.2 Linux 2.6.32 x86_64 GNU y y/y y y y y CentOS 7.2 Linux 2.6.32 x86_64 Intel n y/y n y y y -Linux 2.6.32-573.18.1.el6.ppc64 n y/n n y y y +Linux 2.6.32-573.18.1.el6.ppc64 n y/y n y y y Platform Shared Shared Shared Thread- @@ -340,10 +326,8 @@ Mac OS X Mountain Lion 10.8.5 64-bit y n y y Mac OS X Mavericks 10.9.5 64-bit y n y y Mac OS X Yosemite 10.10.5 64-bit y n y y Mac OS X El Capitan 10.11.6 64-bit y n y y -CentOS 6.7 Linux 2.6.18 x86_64 GNU y y y y -CentOS 6.7 Linux 2.6.18 x86_64 Intel y y y n -CentOS 6.7 Linux 2.6.32 x86_64 PGI y y y n -CentOS 7.2 Linux 2.6.32 x86_64 GNU y y y n +CentOS 7.2 Linux 2.6.32 x86_64 PGI y y y n +CentOS 7.2 Linux 2.6.32 x86_64 GNU y y y y CentOS 7.2 Linux 2.6.32 x86_64 Intel y y y n Linux 2.6.32-573.18.1.el6.ppc64 y y y n @@ -355,6 +339,18 @@ More Tested Platforms ===================== The following platforms are not supported but have been tested for this release. + Linux 2.6.32-573.22.1.el6 GNU C (gcc), Fortran (gfortran), C++ (g++) + #1 SMP x86_64 GNU/Linux compilers: + (mayll/platypus) Version 4.4.7 20120313 + Version 4.8.4 + PGI C, Fortran, C++ for 64-bit target on + x86-64; + Version 16.10-0 + Intel(R) C (icc), C++ (icpc), Fortran (icc) + compilers: + Version 15.0.3.187 (Build 20150407) + MPICH 3.1.4 compiled with GCC 4.9.3 + Linux 2.6.32-573.18.1.el6.ppc64 MPICH mpich 3.1.4 compiled with #1 SMP ppc64 GNU/Linux IBM XL C/C++ for Linux, V13.1 (ostrich) and IBM XL Fortran for Linux, V15.1 -- cgit v0.12 From a3d7c4703b9ee6e3fb676ce3899d23b015a5230c Mon Sep 17 00:00:00 2001 From: Binh-Minh Ribler Date: Wed, 22 Mar 2017 22:26:33 -0500 Subject: Description: Added more notes and made some improvements in the C++ API sections. --- release_docs/RELEASE.txt | 37 +++++++++++++++++++++++++++---------- 1 file changed, 27 insertions(+), 10 deletions(-) diff --git a/release_docs/RELEASE.txt b/release_docs/RELEASE.txt index 644d3af..389a53c 100644 --- a/release_docs/RELEASE.txt +++ b/release_docs/RELEASE.txt @@ -77,7 +77,7 @@ New Features C++ Library: ------------ - New wrappers for C APIs: - (HDFFV-10004, HDFFV-10139, HDFFV-10145 - PRs #232, #310, #334, #348) + (HDFFV-10004, HDFFV-10139, HDFFV-10145 - PRs #209, #232, #310, #334, #348) // Sets/Gets the strategy and the threshold value that the library will // will employ in managing file space. @@ -122,15 +122,15 @@ New Features H5Object::objVersion - H5Oget_info for version (BMR, 2017/03/20) - - New constructors to open datatypes in ArrayType, CompType, DataType, - EnumType, FloatType, IntType, StrType, and VarLenType. (HDFFV-10156) - (BMR, 2017/03/20) + - New exception: ObjHeaderIException for H5O interface. + (HDFFV-10145 - PR #334) (BMR, 2017/03/15) - New class LinkAccPropList for link access property list, to be used by - wrappers of H5Lexists. (HDFFV-10145 - PR #232) (BMR, 2017/03/20) + wrappers of H5Lexists. (HDFFV-10145 - PR #232) (BMR, 2017/01/04) - - New exception: ObjHeaderIException for H5O interface. - (HDFFV-10145 - PR #334) (BMR, 2017/03/20) + - New constructors to open datatypes in ArrayType, CompType, DataType, + EnumType, FloatType, IntType, StrType, and VarLenType. + (HDFFV-10056 - PR #209) (BMR, 2016/12/26) Tools: @@ -214,11 +214,28 @@ Bug Fixes since HDF5-1.10.0-patch1 release - Due to the change in the C API, the overloaded functions of PropList::setProperty now need const for some arguments. They are planned for deprecation and are replaced by new versions with proper - consts. (PR #344 -BMR, 2017/03/20) + consts. (PR #344) (BMR, 2017/03/17) - The problem where a user-defined function cannot access both, attribute - and dataset, using only one argument (HDFFV9920) is now fixed. - (PR #45 -BMR, 2017/03/20) + and dataset, using only one argument is now fixed. + (HDFFV-9920 - PR #45) (BMR, 2016/10/11) + + - The high-level API Packet Table (PT) did not write data correctly when + the datatype is a compound type that has string type as one of the + members. This problem started in 1.8.15, after the fix of HDFFV-9042 + was applied, which caused the Packet Table to use native type to access + the data. It should be up to the application to specify whether the + buffer to be read into memory in the machine’s native architecture. + Thus, the PT is fixed to not use native type but to make a copy of the + user's provided datatype during creation or the packet table's datatype + during opening. If an application wishes to use native type to read the + data, then the application will request that. However, the Packet Table + doesn't provide a way to specify memory datatype in this release. This + feature will be available in future releases, HDFFV-10023. + (HDFFV-9758 - PRs #93 and #108) (BMR, 2016/10/27) + + - The obsolete macros, H5_NO_NAMESPACE and H5_NO_STD, are removed. + (HDFFV-9532 - PR #92) (BMR, 2016/10/23) Testing -- cgit v0.12 From a533dba4d1589273c890606f665aa06b69fdfa4c Mon Sep 17 00:00:00 2001 From: Quincey Koziol Date: Wed, 22 Mar 2017 15:15:51 -0700 Subject: Add prototype for H5AC_get_mdc_image_info --- src/H5ACprivate.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/H5ACprivate.h b/src/H5ACprivate.h index 1f8299b..10a1925 100644 --- a/src/H5ACprivate.h +++ b/src/H5ACprivate.h @@ -453,6 +453,8 @@ H5_DLL herr_t H5AC_load_cache_image_on_next_protect(H5F_t *f, haddr_t addr, H5_DLL herr_t H5AC_validate_cache_image_config(H5AC_cache_image_config_t *config_ptr); H5_DLL hbool_t H5AC_cache_image_pending(const H5F_t *f); H5_DLL herr_t H5AC_force_cache_image_load(H5F_t * f, hid_t dxpl_id); +herr_t H5AC_get_mdc_image_info(H5AC_t *cache_ptr, haddr_t *image_addr, + hsize_t *image_len); /* Tag & Ring routines */ H5_DLL herr_t H5AC_tag(hid_t dxpl_id, haddr_t metadata_tag, haddr_t *prev_tag); -- cgit v0.12 From 9ab96feda6f6a980fe53d01fb786f0a1dab8bab7 Mon Sep 17 00:00:00 2001 From: Quincey Koziol Date: Wed, 22 Mar 2017 17:07:34 -0500 Subject: Merge pull request #361 in HDFFV/hdf5 from merge_h5clear_revert to develop * commit '46c9ab600de491657520897322b75659c3bdfb5f': Minor style cleanups Revert "Switch h5clear for cache images to use existing H5Pget_cache_image_config()" --- src/H5AC.c | 26 ++++++++++++++++++++++++++ src/H5Cprivate.h | 1 + src/H5Cquery.c | 30 ++++++++++++++++++++++++++++++ src/H5F.c | 40 ++++++++++++++++++++++++++++++++++++++++ src/H5Fpublic.h | 1 + tools/src/misc/h5clear.c | 19 ++++--------------- 6 files changed, 102 insertions(+), 15 deletions(-) diff --git a/src/H5AC.c b/src/H5AC.c index be41b6a..e2271c5 100644 --- a/src/H5AC.c +++ b/src/H5AC.c @@ -3310,3 +3310,29 @@ done: FUNC_LEAVE_NOAPI(ret_value) } /* H5AC_remove_entry() */ + +/*------------------------------------------------------------------------- + * Function: H5AC_get_mdc_image_info + * + * Purpose: Wrapper function for H5C_get_mdc_image_info(). + * + * Return: SUCCEED on success, and FAIL on failure. + * + * Programmer: Vailin Choi; March 2017 + * + *------------------------------------------------------------------------- + */ +herr_t +H5AC_get_mdc_image_info(H5AC_t *cache_ptr, haddr_t *image_addr, hsize_t *image_len) +{ + herr_t ret_value = SUCCEED; /* Return value */ + + FUNC_ENTER_NOAPI(FAIL) + + if(H5C_get_mdc_image_info((H5C_t *)cache_ptr, image_addr, image_len) < 0) + HGOTO_ERROR(H5E_CACHE, H5E_CANTGET, FAIL, "can't retrieve cache image info") + +done: + FUNC_LEAVE_NOAPI(ret_value) +} /* H5AC_get_mdc_image_info() */ + diff --git a/src/H5Cprivate.h b/src/H5Cprivate.h index 539dece..bdfb23e 100644 --- a/src/H5Cprivate.h +++ b/src/H5Cprivate.h @@ -2321,6 +2321,7 @@ H5_DLL herr_t H5C_remove_entry(void *thing); H5_DLL herr_t H5C_cache_image_status(H5F_t * f, hbool_t *load_ci_ptr, hbool_t *write_ci_ptr); H5_DLL hbool_t H5C_cache_image_pending(const H5C_t *cache_ptr); +H5_DLL herr_t H5C_get_mdc_image_info(H5C_t *cache_ptr, haddr_t *image_addr, hsize_t *image_len); #ifdef H5_HAVE_PARALLEL H5_DLL herr_t H5C_apply_candidate_list(H5F_t *f, hid_t dxpl_id, diff --git a/src/H5Cquery.c b/src/H5Cquery.c index 33a322d..5108013 100644 --- a/src/H5Cquery.c +++ b/src/H5Cquery.c @@ -454,3 +454,33 @@ done: FUNC_LEAVE_NOAPI(ret_value) } /* H5C_get_entry_ring() */ +/*------------------------------------------------------------------------- + * Function: H5C_get_mdc_image_info + * + * Purpose: To retrieve the address and size of the cache image in the file. + * + * Return: SUCCEED on success, and FAIL on failure. + * + * Programmer: Vailin Choi; March 2017 + * + *------------------------------------------------------------------------- + */ +herr_t +H5C_get_mdc_image_info(H5C_t * cache_ptr, haddr_t *image_addr, hsize_t *image_len) +{ + herr_t ret_value = SUCCEED; /* Return value */ + + FUNC_ENTER_NOAPI(FAIL) + + if((cache_ptr == NULL) || (cache_ptr->magic != H5C__H5C_T_MAGIC)) + HGOTO_ERROR(H5E_CACHE, H5E_BADVALUE, FAIL, "bad cache_ptr on entry") + if(image_addr == NULL || image_len == NULL) + HGOTO_ERROR(H5E_CACHE, H5E_BADVALUE, FAIL, "bad image_addr or image_len on entry") + + *image_addr = cache_ptr->image_addr; + *image_len = cache_ptr->image_len; + +done: + FUNC_LEAVE_NOAPI(ret_value) +} /* H5C_get_mdc_image_info() */ + diff --git a/src/H5F.c b/src/H5F.c index a0f7599..aef9d1d 100644 --- a/src/H5F.c +++ b/src/H5F.c @@ -2086,3 +2086,43 @@ done: FUNC_LEAVE_API(ret_value) } /* H5Fget_page_buffering_stats() */ + +/*------------------------------------------------------------------------- + * Function: H5Fget_mdc_image_info + * + * Purpose: Retrieves the image_addr and image_len for the cache image in the file. + * image_addr: --base address of the on disk metadata cache image + * --HADDR_UNDEF if no cache image + * image_len: --size of the on disk metadata cache image + * --zero if no cache image + * + * Return: Success: SUCCEED + * Failure: FAIL + * + * Programmer: Vailin Choi; March 2017 + * + *------------------------------------------------------------------------- + */ +herr_t +H5Fget_mdc_image_info(hid_t file_id, haddr_t *image_addr, hsize_t *image_len) +{ + H5F_t *file; /* File object for file ID */ + herr_t ret_value = SUCCEED; /* Return value */ + + FUNC_ENTER_API(FAIL) + H5TRACE3("e", "i*a*h", file_id, image_addr, image_len); + + /* Check args */ + if(NULL == (file = (H5F_t *)H5I_object_verify(file_id, H5I_FILE))) + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "not a file ID") + if(NULL == image_addr || NULL == image_len) + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "NULL image addr or image len") + + /* Go get the address and size of the cache image */ + if(H5AC_get_mdc_image_info(file->shared->cache, image_addr, image_len) < 0) + HGOTO_ERROR(H5E_CACHE, H5E_CANTGET, FAIL, "can't retrieve cache image info") + +done: + FUNC_LEAVE_API(ret_value) +} /* H5Fget_mdc_image_info() */ + diff --git a/src/H5Fpublic.h b/src/H5Fpublic.h index f87aaad..84c0d38 100644 --- a/src/H5Fpublic.h +++ b/src/H5Fpublic.h @@ -267,6 +267,7 @@ 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); #ifdef H5_HAVE_PARALLEL H5_DLL herr_t H5Fset_mpi_atomicity(hid_t file_id, hbool_t flag); diff --git a/tools/src/misc/h5clear.c b/tools/src/misc/h5clear.c index b6c6ea3..5c33b72 100644 --- a/tools/src/misc/h5clear.c +++ b/tools/src/misc/h5clear.c @@ -246,28 +246,16 @@ main (int argc, const char *argv[]) /* -m option */ if(remove_cache_image) { - H5AC_cache_image_config_t config; - - /* Retrieve cache image config */ - if((fapl = H5Fget_access_plist(fid)) < 0) { - error_msg("H5Fget_access_plist\n"); - h5tools_setstatus(EXIT_FAILURE); - goto done; - } - config.version = H5AC__CURR_CACHE_IMAGE_CONFIG_VERSION; - if(H5Pget_mdc_image_config(fapl, &config) < 0) { - error_msg("H5Pget_mdc_image_config\n"); + if(H5Fget_mdc_image_info(fid, &image_addr, &image_len) < 0) { + error_msg("H5Fget_mdc_image_info\n"); h5tools_setstatus(EXIT_FAILURE); goto done; } - - /* Check for image */ - if(!config.generate_image) + if(image_addr == HADDR_UNDEF && image_len == 0) warn_msg("No cache image in the file\n"); } h5tools_setstatus(EXIT_SUCCESS); - done: if(fname) HDfree(fname); @@ -281,3 +269,4 @@ done: leave(h5tools_getstatus()); } /* main() */ + -- cgit v0.12 From d0b1c6f6edab9b80e74c5bf80e15f8952915ac34 Mon Sep 17 00:00:00 2001 From: lrknox Date: Thu, 23 Mar 2017 00:05:51 -0500 Subject: Add H5_DLL to function prototype. --- src/H5ACprivate.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/H5ACprivate.h b/src/H5ACprivate.h index 10a1925..a724394 100644 --- a/src/H5ACprivate.h +++ b/src/H5ACprivate.h @@ -453,7 +453,7 @@ H5_DLL herr_t H5AC_load_cache_image_on_next_protect(H5F_t *f, haddr_t addr, H5_DLL herr_t H5AC_validate_cache_image_config(H5AC_cache_image_config_t *config_ptr); H5_DLL hbool_t H5AC_cache_image_pending(const H5F_t *f); H5_DLL herr_t H5AC_force_cache_image_load(H5F_t * f, hid_t dxpl_id); -herr_t H5AC_get_mdc_image_info(H5AC_t *cache_ptr, haddr_t *image_addr, +H5_DLL herr_t H5AC_get_mdc_image_info(H5AC_t *cache_ptr, haddr_t *image_addr, hsize_t *image_len); /* Tag & Ring routines */ -- cgit v0.12 From f8d954c0b0a79e2d8d513e180358866e5269229b Mon Sep 17 00:00:00 2001 From: Binh-Minh Ribler Date: Thu, 23 Mar 2017 11:42:15 -0500 Subject: Added more notes to the C++ API sections. --- release_docs/RELEASE.txt | 30 +++++++++++++++++++++--------- 1 file changed, 21 insertions(+), 9 deletions(-) diff --git a/release_docs/RELEASE.txt b/release_docs/RELEASE.txt index 389a53c..c90dc74 100644 --- a/release_docs/RELEASE.txt +++ b/release_docs/RELEASE.txt @@ -120,17 +120,25 @@ New Features // Returns the header version of an HDF5 object. H5Object::objVersion - H5Oget_info for version - (BMR, 2017/03/20) + -BMR, 2017/03/20 - New exception: ObjHeaderIException for H5O interface. - (HDFFV-10145 - PR #334) (BMR, 2017/03/15) + (HDFFV-10145 - PR #334) -BMR, 2017/03/15 - New class LinkAccPropList for link access property list, to be used by - wrappers of H5Lexists. (HDFFV-10145 - PR #232) (BMR, 2017/01/04) + wrappers of H5Lexists. (HDFFV-10145 - PR #232) -BMR, 2017/01/04 - New constructors to open datatypes in ArrayType, CompType, DataType, EnumType, FloatType, IntType, StrType, and VarLenType. - (HDFFV-10056 - PR #209) (BMR, 2016/12/26) + (HDFFV-10056 - PR #209) -BMR, 2016/12/26 + + - New member functions + DSetCreatPropList::setNbit() to setup N-bit compression for a dataset. + (HDFFV-8623 patch 7) -BMR, 2016/04/25 + + ArrayType::getArrayNDims() const + ArrayType::getArrayDims() const + both to replace the non-const versions. (HDFFV-9725) -BMR, 2016/04/25 Tools: @@ -214,28 +222,32 @@ Bug Fixes since HDF5-1.10.0-patch1 release - Due to the change in the C API, the overloaded functions of PropList::setProperty now need const for some arguments. They are planned for deprecation and are replaced by new versions with proper - consts. (PR #344) (BMR, 2017/03/17) + consts. (PR #344) -BMR, 2017/03/17 - The problem where a user-defined function cannot access both, attribute and dataset, using only one argument is now fixed. - (HDFFV-9920 - PR #45) (BMR, 2016/10/11) + (HDFFV-9920 - PR #45) -BMR, 2016/10/11 - The high-level API Packet Table (PT) did not write data correctly when the datatype is a compound type that has string type as one of the members. This problem started in 1.8.15, after the fix of HDFFV-9042 was applied, which caused the Packet Table to use native type to access the data. It should be up to the application to specify whether the - buffer to be read into memory in the machine’s native architecture. + buffer to be read into memory is in the machine's native architecture. Thus, the PT is fixed to not use native type but to make a copy of the user's provided datatype during creation or the packet table's datatype during opening. If an application wishes to use native type to read the data, then the application will request that. However, the Packet Table doesn't provide a way to specify memory datatype in this release. This feature will be available in future releases, HDFFV-10023. - (HDFFV-9758 - PRs #93 and #108) (BMR, 2016/10/27) + (HDFFV-9758 - PRs #93 and #108) -BMR, 2016/10/27 - The obsolete macros, H5_NO_NAMESPACE and H5_NO_STD, are removed. - (HDFFV-9532 - PR #92) (BMR, 2016/10/23) + (HDFFV-9532 - PR #92) -BMR, 2016/10/23 + + - In-memory array information, ArrayType::rank and + ArrayType::dimensions, were removed. This is an implementation + detail and should not affect applications. (HDFFV-9725) -BMR, 2016/04/25 Testing -- cgit v0.12 From 28136f608205667278b6a4466d273cf7d8ba74d2 Mon Sep 17 00:00:00 2001 From: lrknox Date: Thu, 23 Mar 2017 17:18:26 -0500 Subject: Set shared object version numbers (for lib.so files) to appropriate numbers for HDF5 1.10.1 release according to the interface compatibility report with respect to HDF5 1.10.0-patch1. --- config/lt_vers.am | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/config/lt_vers.am b/config/lt_vers.am index eb630a7..3d75074 100644 --- a/config/lt_vers.am +++ b/config/lt_vers.am @@ -18,9 +18,9 @@ # See libtool versioning documentation online. # After making changes, run bin/reconfigure to update other configure related # files like Makefile.in. -LT_VERS_INTERFACE = 1000 -LT_VERS_AGE = 0 +LT_VERS_INTERFACE = 101 LT_VERS_REVISION = 0 +LT_VERS_AGE = 0 ## If the API changes *at all*, increment LT_VERS_INTERFACE and ## reset LT_VERS_REVISION to 0. @@ -41,32 +41,32 @@ LT_VERS_REVISION = 0 ## the effects of the H5_V1_x_COMPAT flag. ## ## Version numbers for wrapper shared library files. -LT_CXX_VERS_INTERFACE = 1000 +LT_CXX_VERS_INTERFACE = 101 LT_CXX_VERS_REVISION = 0 LT_CXX_VERS_AGE = 0 -LT_F_VERS_INTERFACE = 1000 +LT_F_VERS_INTERFACE = 101 LT_F_VERS_REVISION = 0 -LT_F_VERS_AGE = 0 +LT_F_VERS_AGE = 1 -LT_HL_VERS_INTERFACE = 1000 -LT_HL_VERS_REVISION = 0 +LT_HL_VERS_INTERFACE = 100 +LT_HL_VERS_REVISION = 1 LT_HL_VERS_AGE = 0 -LT_HL_CXX_VERS_INTERFACE = 1000 +LT_HL_CXX_VERS_INTERFACE = 101 LT_HL_CXX_VERS_REVISION = 0 -LT_HL_CXX_VERS_AGE = 0 +LT_HL_CXX_VERS_AGE = 1 -LT_HL_F_VERS_INTERFACE = 1000 -LT_HL_F_VERS_REVISION = 0 +LT_HL_F_VERS_INTERFACE = 100 +LT_HL_F_VERS_REVISION = 1 LT_HL_F_VERS_AGE = 0 -LT_JAVA_VERS_INTERFACE = 1000 +LT_JAVA_VERS_INTERFACE = 101 LT_JAVA_VERS_REVISION = 0 -LT_JAVA_VERS_AGE = 0 +LT_JAVA_VERS_AGE = 1 -LT_TOOLS_VERS_INTERFACE = 1000 -LT_TOOLS_VERS_REVISION = 0 +LT_TOOLS_VERS_INTERFACE = 100 +LT_TOOLS_VERS_REVISION = 1 LT_TOOLS_VERS_AGE = 0 -- cgit v0.12 From 84b6746c734fe2be7e9c7ffc2db25a0f0deeceaf Mon Sep 17 00:00:00 2001 From: Vailin Choi Date: Thu, 23 Mar 2017 16:08:49 -0500 Subject: Merge pull request #359 in HDFFV/hdf5 from ~VCHOI/my_hdf5_fork:develop to develop * commit '436bfedcbd1152e9aa47d50f9d8ad78817488ce1': Update RELEASE.txt based on review comments from pull request. Update RELEASE.txt to reflect changes for new features and bug fixes since 1.10.0-patch1. --- release_docs/RELEASE.txt | 39 +++++++++++++++++++++++++++++++++++++-- 1 file changed, 37 insertions(+), 2 deletions(-) diff --git a/release_docs/RELEASE.txt b/release_docs/RELEASE.txt index c3180a1..f8467be 100644 --- a/release_docs/RELEASE.txt +++ b/release_docs/RELEASE.txt @@ -64,7 +64,23 @@ New Features Library: -------- - - + - Paged Aggregation + + This is one of the file space management strategies. This strategy + aggregates small metadata and raw data allocations into constant-sized + well-aligned pages, which are suitable for page caching. Paged + aggregation together with the page buffering feature will allow efficient + I/O accesses. + + - Page Buffering + + The page buffering layer in the HDF5 library absorbs small accesses to + the file system. Each page in memory corresponds to a page allocated in + the file. Access to the file system is then performed as a single page + or multiple of pages, if they are contiguous. This ensures that small + accesses to the file system are avoided while providing another caching + layer for improved I/O performance. This feature works in conjunction + with the paged aggregation feature. Parallel Library: ----------------- @@ -143,7 +159,10 @@ New Features Tools: ------ - - + - Add options to h5clear: + -s: clear the status_flags field in the file's superblock + -m: Remove the metadata cache image from the file + (Pull Request #361 QK 2017/03/22) High-Level APIs: --------------- @@ -171,6 +190,22 @@ Bug Fixes since HDF5-1.10.0-patch1 release - Changed the plugins dlopen option from RTLD_NOW to RTLD_LAZY (PR 201 ADB 2016/12/12) + - Fix error when copying dataset with attribute which is a compound datatype + consisting of a variable length string. + (HDFFV-7991 VC 2016/08/19, 2016/08/21, 2016/08/24) + + - H5DOappend will not fail if a dataset has no append callback registered. + (HDFFV-9960 VC 2016/08/05, 2016/08/14) + + - Fix the problem where the committed datatype's file location is different + from the file location of an attribute with that committed datatype. + (HDFFV-9940 VC 2016/07/03, 2016/07/06) + + - (a) Throw an error instead of assertion when v1 btree level hits the 1 byte limit. + (b) Modifications to better handle error recovery when conversion by + h5format_convert fails. + (HDFFV-9434 VC 2016/05/29) + Configuration ------------- - Configuration will check for the strtoll and strtoull functions -- cgit v0.12 From 972344e23141f4709c259322bc3480c9f437faae Mon Sep 17 00:00:00 2001 From: lrknox Date: Tue, 21 Mar 2017 10:57:40 -0500 Subject: Merge bin/h5vers changes from develop. Pull version from configure for version test in h5repack_plugin.sh.in Update version to 1.10.2-snap0 for hdf5_1_10 branch. --- README.txt | 2 +- bin/h5vers | 64 ++++++++++++++++++++-- c++/src/cpp_doc_config | 2 +- config/cmake/scripts/HDF5config.cmake | 4 +- configure.ac | 2 +- java/src/hdf/hdf5lib/H5.java | 4 +- java/test/TestH5.java | 4 +- release_docs/RELEASE.txt | 2 +- src/H5public.h | 6 +- tools/test/h5repack/h5repack_plugin.sh.in | 3 +- .../h5repack_layout.h5-plugin_version_test.ddl | 14 ++--- 11 files changed, 81 insertions(+), 26 deletions(-) diff --git a/README.txt b/README.txt index 6d7ae50..eb0e35a 100644 --- a/README.txt +++ b/README.txt @@ -1,4 +1,4 @@ -HDF5 version 1.10.1-pre0 currently under development +HDF5 version 1.10.2-snap0 currently under development Please refer to the release_docs/INSTALL file for installation instructions. ------------------------------------------------------------------------------ diff --git a/bin/h5vers b/bin/h5vers index 6ecf446..e4bdf5c 100755 --- a/bin/h5vers +++ b/bin/h5vers @@ -196,6 +196,15 @@ die "unable to read file: $CONFIGURE\n" unless -r $file; my $CPP_DOC_CONFIG = $file; $CPP_DOC_CONFIG =~ s/[^\/]*$/..\/c++\/src\/cpp_doc_config/; die "unable to read file: $CPP_DOC_CONFIG\n" unless -r $file; +my $H5_JAVA = $file; +$H5_JAVA =~ s/[^\/]*$/..\/java\/src\/hdf\/hdf5lib\/H5.java/; +die "unable to read file: $H5_JAVA\n" unless -r $file; +my $TESTH5_JAVA = $file; +$TESTH5_JAVA =~ s/[^\/]*$/..\/java\/test\/TestH5.java/; +die "unable to read file: $TESTH5_JAVA\n" unless -r $file; +my $REPACK_LAYOUT_PLUGIN_VERSION = $file; +$REPACK_LAYOUT_PLUGIN_VERSION =~ s/[^\/]*$/..\/tools\/test\/h5repack\/testfiles\/h5repack_layout.h5-plugin_version_test.ddl/; +die "unable to read file: $REPACK_LAYOUT_PLUGIN_VERSION\n" unless -r $file; # Get the current version number. open FILE, $file or die "unable to open $file: $!\n"; @@ -351,15 +360,60 @@ if ($HDF5CONFIGCMAKE) { ); my $version_string = sprintf("\"%d.%d.%d\"", @newver[0,1,2]); - $data =~ s/set\(CTEST_SOURCE_VERSION .*\)/set\(CTEST_SOURCE_VERSION $version_string\)/; - $data =~ s/set\(CTEST_SOURCE_VERSEXT .*\)/set\(CTEST_SOURCE_VERSEXT $sub_rel_ver_str\)/; + $data =~ s/set \(CTEST_SOURCE_VERSION .*\)/set \(CTEST_SOURCE_VERSION $version_string\)/; + $data =~ s/set \(CTEST_SOURCE_VERSEXT .*\)/set \(CTEST_SOURCE_VERSEXT $sub_rel_ver_str\)/; write_file($HDF5CONFIGCMAKE, $data); } +# Update the java/src/hdf/hdf5lib/H5.java file +if ($H5_JAVA) { + my $data = read_file($H5_JAVA); +# my $sub_rel_ver_str = ""; + my $sub_rel_ver_str = ( + $newver[3] eq "" + ? sprintf("\"%s\"", "") + : sprintf("\"%s\"", "-".$newver[3].", currently under development") + ); + my $version_string1 = sprintf("%d.%d.%d", @newver[0,1,2]); + my $version_string2 = sprintf("%d, %d, %d", @newver[0,1,2]); + + $data =~ s/\@version HDF5 .*
/\@version HDF5 $version_string1
/; + $data =~ s/ public final static int LIB_VERSION\[\] = { \d*, \d*, \d* };/ public final static int LIB_VERSION[] = { $version_string2 };/; + + write_file($H5_JAVA, $data); +} + +# Update the java/test/TestH5.java file +if ($TESTH5_JAVA) { + my $data = read_file($TESTH5_JAVA); +# my $sub_rel_ver_str = ""; + my $sub_rel_ver_str = ( + $newver[3] eq "" + ? sprintf("\"%s\"", "") + : sprintf("\"%s\"", "-".$newver[3].", currently under development") + ); + my $version_string1 = sprintf("%d, %d, %d", @newver[0,1,2]); + my $version_string2 = sprintf("int majnum = %d, minnum = %d, relnum = %d", @newver[0,1,2]); + $data =~ s/ int libversion\[\] = { .* };/ int libversion\[\] = { $version_string1 };/; + $data =~ s/ int majnum = \d*, minnum = \d*, relnum = \d*;/ $version_string2;/; + + write_file($TESTH5_JAVA, $data); +} + +# Update the tools/test/h5repack/testfiles/h5repack_layout.h5-plugin_version_test.ddl file +if ($REPACK_LAYOUT_PLUGIN_VERSION) { + my $data = read_file($REPACK_LAYOUT_PLUGIN_VERSION); + my $version_string = sprintf("%d %d %d", @newver[0,1,2]); + + $data =~ s/ PARAMS { 9 \d* \d* \d* }/ PARAMS { 9 $version_string }/g; + + write_file($REPACK_LAYOUT_PLUGIN_VERSION, $data); +} -# helper function to read the file for updating c++/src/cpp_doc_config file. +# helper function to read the file for updating c++/src/cpp_doc_config, +# config/cmake/scripts/HDF5Config.cmake, and java files. # The version string in that file is not at the top, so the string replacement # is not for the first line, and reading/writing the entire file as one string # facilitates the substring replacement. @@ -375,8 +429,8 @@ sub read_file { return $all; } -# helper function to write the file for updating c++/src/cpp_doc_config -# and config/cmake/scripts/HDF5config.cmake files. +# helper function to write the file for updating c++/src/cpp_doc_config, +# config/cmake/scripts/HDF5config.cmake and java files. sub write_file { my ($filename, $content) = @_; diff --git a/c++/src/cpp_doc_config b/c++/src/cpp_doc_config index f04528f..2b90350 100644 --- a/c++/src/cpp_doc_config +++ b/c++/src/cpp_doc_config @@ -38,7 +38,7 @@ PROJECT_NAME = "HDF5 C++ API" # could be handy for archiving the generated documentation or if some version # control system is used. -PROJECT_NUMBER = "1.10.1-pre0, currently under development" +PROJECT_NUMBER = "1.10.2-snap0, currently under development" # Using the PROJECT_BRIEF tag one can provide an optional one line description # for a project that appears at the top of each page and should give viewer a diff --git a/config/cmake/scripts/HDF5config.cmake b/config/cmake/scripts/HDF5config.cmake index 5b5e2b6..e1c0a1c 100755 --- a/config/cmake/scripts/HDF5config.cmake +++ b/config/cmake/scripts/HDF5config.cmake @@ -27,8 +27,8 @@ cmake_minimum_required (VERSION 3.2.2 FATAL_ERROR) # NO_MAC_FORTRAN - Yes to be SHARED on a Mac ############################################################################## -set (CTEST_SOURCE_VERSION 1.10.1) -set (CTEST_SOURCE_VERSEXT "-pre0") +set (CTEST_SOURCE_VERSION "1.10.2") +set (CTEST_SOURCE_VERSEXT "-snap0, currently under development") ############################################################################## # handle input parameters to script. diff --git a/configure.ac b/configure.ac index a9756f2..afd36cd 100644 --- a/configure.ac +++ b/configure.ac @@ -26,7 +26,7 @@ AC_PREREQ([2.69]) ## NOTE: Do not forget to change the version number here when we do a ## release!!! ## -AC_INIT([HDF5], [1.10.1-pre0], [help@hdfgroup.org]) +AC_INIT([HDF5], [1.10.2-snap0], [help@hdfgroup.org]) AC_CONFIG_SRCDIR([src/H5.c]) AC_CONFIG_HEADERS([src/H5config.h]) diff --git a/java/src/hdf/hdf5lib/H5.java b/java/src/hdf/hdf5lib/H5.java index 4a491fe..996feeb 100644 --- a/java/src/hdf/hdf5lib/H5.java +++ b/java/src/hdf/hdf5lib/H5.java @@ -216,7 +216,7 @@ import hdf.hdf5lib.structs.H5O_info_t; * exception handlers to print out the HDF-5 error stack. *
* - * @version HDF5 1.10.1-pre0
+ * @version HDF5 1.10.2
* See also: hdf.hdf5lib.HDFArray
* hdf.hdf5lib.HDF5Constants
* hdf.hdf5lib.HDF5CDataTypes
@@ -239,7 +239,7 @@ public class H5 implements java.io.Serializable { * * Make sure to update the versions number when a different library is used. */ - public final static int LIB_VERSION[] = { 1, 10, 1 }; + public final static int LIB_VERSION[] = { 1, 10, 2 }; public final static String H5PATH_PROPERTY_KEY = "hdf.hdf5lib.H5.hdf5lib"; diff --git a/java/test/TestH5.java b/java/test/TestH5.java index 205a51c..b5864e8 100644 --- a/java/test/TestH5.java +++ b/java/test/TestH5.java @@ -164,7 +164,7 @@ public class TestH5 { */ @Test public void testH5get_libversion() { - int libversion[] = { 1, 10, 1 }; + int libversion[] = { 1, 10, 2 }; try { H5.H5get_libversion(libversion); @@ -186,7 +186,7 @@ public class TestH5 { */ @Test public void testH5check_version() { - int majnum = 1, minnum = 10, relnum = 1; + int majnum = 1, minnum = 10, relnum = 2; try { H5.H5check_version(majnum, minnum, relnum); diff --git a/release_docs/RELEASE.txt b/release_docs/RELEASE.txt index f8467be..23f394c 100644 --- a/release_docs/RELEASE.txt +++ b/release_docs/RELEASE.txt @@ -1,4 +1,4 @@ -HDF5 version 1.10.1-pre0 currently under development +HDF5 version 1.10.2-snap0 currently under development ================================================================================ diff --git a/src/H5public.h b/src/H5public.h index 76be643..2e73ec9 100644 --- a/src/H5public.h +++ b/src/H5public.h @@ -94,10 +94,10 @@ extern "C" { /* 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 1 /* For tweaks, bug-fixes, or development */ -#define H5_VERS_SUBRELEASE "pre0" /* For pre-releases like snap0 */ +#define H5_VERS_RELEASE 2 /* For tweaks, bug-fixes, or development */ +#define H5_VERS_SUBRELEASE "snap0" /* For pre-releases like snap0 */ /* Empty string for real releases. */ -#define H5_VERS_INFO "HDF5 library version: 1.10.1-pre0" /* Full version string */ +#define H5_VERS_INFO "HDF5 library version: 1.10.2-snap0" /* Full version string */ #define H5check() H5check_version(H5_VERS_MAJOR,H5_VERS_MINOR, \ H5_VERS_RELEASE) diff --git a/tools/test/h5repack/h5repack_plugin.sh.in b/tools/test/h5repack/h5repack_plugin.sh.in index 3f577a9..0b28f78 100644 --- a/tools/test/h5repack/h5repack_plugin.sh.in +++ b/tools/test/h5repack/h5repack_plugin.sh.in @@ -246,9 +246,10 @@ TOOLTEST_DUMP() ############################################################################## # prepare for test COPY_TESTFILES_TO_TESTDIR +version_str=`echo @H5_VERSION@ | awk -F"-" '{print $1}' | sed 's/\./,/g'` # Run the test -arg="h5repack_layout.h5 -v -f UD=260,4,9,1,10,1" +arg="h5repack_layout.h5 -v -f UD=260,4,9,$version_str" TOOLTEST_DUMP plugin_version_test $arg arg="h5repack_layout.h5 -v -f UD=257,1,9" diff --git a/tools/test/h5repack/testfiles/h5repack_layout.h5-plugin_version_test.ddl b/tools/test/h5repack/testfiles/h5repack_layout.h5-plugin_version_test.ddl index 7bac9c4..561ab14 100644 --- a/tools/test/h5repack/testfiles/h5repack_layout.h5-plugin_version_test.ddl +++ b/tools/test/h5repack/testfiles/h5repack_layout.h5-plugin_version_test.ddl @@ -11,7 +11,7 @@ GROUP "/" { USER_DEFINED_FILTER { FILTER_ID 260 COMMENT dynlib4 - PARAMS { 9 1 10 1 } + PARAMS { 9 1 10 2 } } } FILLVALUE { @@ -33,7 +33,7 @@ GROUP "/" { USER_DEFINED_FILTER { FILTER_ID 260 COMMENT dynlib4 - PARAMS { 9 1 10 1 } + PARAMS { 9 1 10 2 } } } FILLVALUE { @@ -55,7 +55,7 @@ GROUP "/" { USER_DEFINED_FILTER { FILTER_ID 260 COMMENT dynlib4 - PARAMS { 9 1 10 1 } + PARAMS { 9 1 10 2 } } } FILLVALUE { @@ -77,7 +77,7 @@ GROUP "/" { USER_DEFINED_FILTER { FILTER_ID 260 COMMENT dynlib4 - PARAMS { 9 1 10 1 } + PARAMS { 9 1 10 2 } } } FILLVALUE { @@ -99,7 +99,7 @@ GROUP "/" { USER_DEFINED_FILTER { FILTER_ID 260 COMMENT dynlib4 - PARAMS { 9 1 10 1 } + PARAMS { 9 1 10 2 } } } FILLVALUE { @@ -121,7 +121,7 @@ GROUP "/" { USER_DEFINED_FILTER { FILTER_ID 260 COMMENT dynlib4 - PARAMS { 9 1 10 1 } + PARAMS { 9 1 10 2 } } } FILLVALUE { @@ -143,7 +143,7 @@ GROUP "/" { USER_DEFINED_FILTER { FILTER_ID 260 COMMENT dynlib4 - PARAMS { 9 1 10 1 } + PARAMS { 9 1 10 2 } } } FILLVALUE { -- cgit v0.12 From 00a19eebf00f17736ca01d2375ebdb05e5f817d8 Mon Sep 17 00:00:00 2001 From: lrknox Date: Fri, 24 Mar 2017 13:42:30 -0500 Subject: Update RELEASE.txt Remove "currently under development" from h5vers for HDF5Config.cmake that causes cmake not to find HDF5. --- bin/h5vers | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/h5vers b/bin/h5vers index e4bdf5c..2ab89a1 100755 --- a/bin/h5vers +++ b/bin/h5vers @@ -356,7 +356,7 @@ if ($HDF5CONFIGCMAKE) { my $sub_rel_ver_str = ( $newver[3] eq "" ? sprintf("\"%s\"", "") - : sprintf("\"%s\"", "-".$newver[3].", currently under development") + : sprintf("\"%s\"", "-".$newver[3]) ); my $version_string = sprintf("\"%d.%d.%d\"", @newver[0,1,2]); -- cgit v0.12 From 9b59aeadf092705ed525cbf1aa27cedbff955b1f Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Mon, 27 Mar 2017 12:57:31 -0500 Subject: Update macros to match master and fix VS matches --- config/cmake/CTestCustom.cmake | 5 +++++ config/cmake/jrunTest.cmake | 31 ++++++++++++++++++++++++++++--- config/cmake_ext_mod/HDFMacros.cmake | 12 +++++++----- 3 files changed, 40 insertions(+), 8 deletions(-) diff --git a/config/cmake/CTestCustom.cmake b/config/cmake/CTestCustom.cmake index 0e1eb2e..d5d96bb 100644 --- a/config/cmake/CTestCustom.cmake +++ b/config/cmake/CTestCustom.cmake @@ -1,4 +1,9 @@ set (CTEST_CUSTOM_MAXIMUM_NUMBER_OF_WARNINGS 3000) +# Allow full output to go to CDash set to 0 +SET(CTEST_CUSTOM_MAXIMUM_PASSED_TEST_OUTPUT_SIZE 50000) +SET(CTEST_CUSTOM_MAXIMUM_FAILED_TEST_OUTPUT_SIZE 50000) +# WARNING! This could be a lot of output and could overwhelm CDash and the +# MySQL DB so this might not be a good idea! set (CTEST_CUSTOM_WARNING_EXCEPTION ${CTEST_CUSTOM_WARNING_EXCEPTION} diff --git a/config/cmake/jrunTest.cmake b/config/cmake/jrunTest.cmake index 0e0106f..67b42fb 100644 --- a/config/cmake/jrunTest.cmake +++ b/config/cmake/jrunTest.cmake @@ -25,6 +25,15 @@ if (NOT TEST_REFERENCE) message (FATAL_ERROR "Require TEST_REFERENCE 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 () + +# if there is not an error reference file add the error output to the stdout file if (NOT TEST_ERRREF) if (NOT SKIP_APPEND) # append error file since skip was not defined @@ -60,6 +69,7 @@ execute_process ( 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) if (TEST_MASK_FILE) @@ -75,6 +85,7 @@ if (EXISTS ${TEST_FOLDER}/${TEST_OUTPUT}.err) endif () 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 @@ -125,7 +136,7 @@ if (NOT TEST_SKIP_COMPARE) list (LENGTH test_act len_act) file (STRINGS ${TEST_FOLDER}/${TEST_REFERENCE} test_ref) list (LENGTH test_ref len_ref) - if (NOT ${len_act} STREQUAL "0") + if (NOT ${len_act} STREQUAL "0" AND NOT ${len_ref} STREQUAL "0") math (EXPR _FP_LEN "${len_ref} - 1") foreach (line RANGE 0 ${_FP_LEN}) list (GET test_act ${line} str_act) @@ -137,6 +148,13 @@ if (NOT TEST_SKIP_COMPARE) endif () endif () endforeach () + else () + if (${len_act} STREQUAL "0") + message (STATUS "COMPARE Failed: ${TEST_FOLDER}/${TEST_OUTPUT} is empty") + endif () + if (${len_ref} STREQUAL "0") + message (STATUS "COMPARE Failed: ${TEST_FOLDER}/${TEST_REFERENCE} is empty") + endif () endif () if (NOT ${len_act} STREQUAL ${len_ref}) set (TEST_RESULT 1) @@ -169,7 +187,7 @@ if (NOT TEST_SKIP_COMPARE) file (STRINGS ${TEST_FOLDER}/${TEST_ERRREF} test_ref) list (LENGTH test_ref len_ref) math (EXPR _FP_LEN "${len_ref} - 1") - if (NOT ${len_act} STREQUAL "0") + if (NOT ${len_act} STREQUAL "0" AND NOT ${len_ref} STREQUAL "0") math (EXPR _FP_LEN "${len_ref} - 1") foreach (line RANGE 0 ${_FP_LEN}) list (GET test_act ${line} str_act) @@ -181,7 +199,14 @@ if (NOT TEST_SKIP_COMPARE) endif () endif () endforeach () - endif () + else () + if (${len_act} STREQUAL "0") + message (STATUS "COMPARE Failed: ${TEST_FOLDER}/${TEST_OUTPUT}.err is empty") + endif () + if (${len_ref} STREQUAL "0") + message (STATUS "COMPARE Failed: ${TEST_FOLDER}/${TEST_ERRREF} is empty") + endif () + endif() if (NOT ${len_act} STREQUAL ${len_ref}) set (TEST_RESULT 1) endif () diff --git a/config/cmake_ext_mod/HDFMacros.cmake b/config/cmake_ext_mod/HDFMacros.cmake index ecf3be0..3039cfd 100644 --- a/config/cmake_ext_mod/HDFMacros.cmake +++ b/config/cmake_ext_mod/HDFMacros.cmake @@ -237,16 +237,18 @@ macro (HDF_README_PROPERTIES target_fortran) set (BINARY_PLATFORM "${BINARY_PLATFORM} 10") endif () set (BINARY_PLATFORM "${BINARY_PLATFORM} ${MSVC_C_ARCHITECTURE_ID}") - if (${CMAKE_C_COMPILER_VERSION} MATCHES "16.*") + if (${CMAKE_C_COMPILER_VERSION} MATCHES "^16.*") set (BINARY_PLATFORM "${BINARY_PLATFORM}, using VISUAL STUDIO 2010") - elseif (${CMAKE_C_COMPILER_VERSION} MATCHES "15.*") + elseif (${CMAKE_C_COMPILER_VERSION} MATCHES "^15.*") set (BINARY_PLATFORM "${BINARY_PLATFORM}, using VISUAL STUDIO 2008") - elseif (${CMAKE_C_COMPILER_VERSION} MATCHES "17.*") + elseif (${CMAKE_C_COMPILER_VERSION} MATCHES "^17.*") set (BINARY_PLATFORM "${BINARY_PLATFORM}, using VISUAL STUDIO 2012") - elseif (${CMAKE_C_COMPILER_VERSION} MATCHES "18.*") + elseif (${CMAKE_C_COMPILER_VERSION} MATCHES "^18.*") set (BINARY_PLATFORM "${BINARY_PLATFORM}, using VISUAL STUDIO 2013") - elseif (${CMAKE_C_COMPILER_VERSION} MATCHES "19.*") + elseif (${CMAKE_C_COMPILER_VERSION} MATCHES "^19.*") set (BINARY_PLATFORM "${BINARY_PLATFORM}, using VISUAL STUDIO 2015") + elseif (${CMAKE_C_COMPILER_VERSION} MATCHES "^20.*") + set (BINARY_PLATFORM "${BINARY_PLATFORM}, using VISUAL STUDIO 2017") else () set (BINARY_PLATFORM "${BINARY_PLATFORM}, using VISUAL STUDIO ${CMAKE_C_COMPILER_VERSION}") endif () -- cgit v0.12 From 77e1f1e4913584c98ee7dde46650be9b18ac0161 Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Tue, 28 Mar 2017 13:35:49 -0500 Subject: HDFFV-10143 add APIs to manipulate plugin path table --- src/H5PL.c | 298 ++++++++++++++++++++++++++ src/H5PLpublic.h | 7 + test/plugin.c | 622 ++++++++++++++++++++++++++++++++++++------------------- 3 files changed, 712 insertions(+), 215 deletions(-) diff --git a/src/H5PL.c b/src/H5PL.c index 1f7bb2a..898e84b 100644 --- a/src/H5PL.c +++ b/src/H5PL.c @@ -390,6 +390,304 @@ done: /*------------------------------------------------------------------------- + * Function: H5PLappend + * + * Purpose: Insert a plugin path at the end of the list. + * + * Return: Non-negative or success. + * + *------------------------------------------------------------------------- + */ +herr_t +H5PLappend(char* plugin_path) +{ + herr_t ret_value = SUCCEED; /* Return value */ + char *dl_path = NULL; + + FUNC_ENTER_API(FAIL) + if(H5PL_num_paths_g == H5PL_MAX_PATH_NUM) + HGOTO_ERROR(H5E_PLUGIN, H5E_NOSPACE, FAIL, "too many directories in path for table") + if(NULL == plugin_path) + HGOTO_ERROR(H5E_PLUGIN, H5E_CANTALLOC, FAIL, "no path provided") + dl_path = H5MM_strdup(plugin_path); + if(NULL == dl_path) + HGOTO_ERROR(H5E_PLUGIN, H5E_CANTALLOC, FAIL, "can't allocate memory for path") +#ifdef H5_HAVE_WIN32_API + else { /* Expand windows env var*/ + long bufCharCount; + char *tempbuf; + if(NULL == (tempbuf = (char *)H5MM_malloc(H5PL_EXPAND_BUFFER_SIZE))) + HGOTO_ERROR(H5E_PLUGIN, H5E_CANTALLOC, FAIL, "can't allocate memory for expanded path") + if((bufCharCount = ExpandEnvironmentStrings(dl_path, tempbuf, H5PL_EXPAND_BUFFER_SIZE)) > H5PL_EXPAND_BUFFER_SIZE) { + tempbuf = (char *)H5MM_xfree(tempbuf); + HGOTO_ERROR(H5E_PLUGIN, H5E_NOSPACE, FAIL, "expanded path is too long") + } + if(bufCharCount == 0) { + tempbuf = (char *)H5MM_xfree(tempbuf); + HGOTO_ERROR(H5E_PLUGIN, H5E_CANTGET, FAIL, "failed to expand path") + } + dl_path = (char *)H5MM_xfree(dl_path); + dl_path = H5MM_strdup(tempbuf); + tempbuf = (char *)H5MM_xfree(tempbuf); + } +#endif /* H5_HAVE_WIN32_API */ + if(NULL == (H5PL_path_table_g[H5PL_num_paths_g] = H5MM_strdup(dl_path))) + HGOTO_ERROR(H5E_PLUGIN, H5E_CANTALLOC, FAIL, "can't allocate memory for path") + H5PL_num_paths_g++; + +done: + if(dl_path) + dl_path = (char *)H5MM_xfree(dl_path); + + FUNC_LEAVE_API(ret_value) +} /* end H5PLappend() */ + + +/*------------------------------------------------------------------------- + * Function: H5PLprepend + * + * Purpose: Insert a plugin path at the beginning of the list. + * + * Return: Non-negative or success. + * + *------------------------------------------------------------------------- + */ +herr_t +H5PLprepend(char* plugin_path) +{ + herr_t ret_value = SUCCEED; /* Return value */ + char *dl_path = NULL; + unsigned int plindex; + + FUNC_ENTER_API(FAIL) + if(H5PL_num_paths_g == H5PL_MAX_PATH_NUM) + HGOTO_ERROR(H5E_PLUGIN, H5E_NOSPACE, FAIL, "too many directories in path for table") + if(NULL == plugin_path) + HGOTO_ERROR(H5E_PLUGIN, H5E_CANTALLOC, FAIL, "no path provided") + dl_path = H5MM_strdup(plugin_path); + if(NULL == dl_path) + HGOTO_ERROR(H5E_PLUGIN, H5E_CANTALLOC, FAIL, "can't allocate memory for path") +#ifdef H5_HAVE_WIN32_API + else { /* Expand windows env var*/ + long bufCharCount; + char *tempbuf; + if (NULL == (tempbuf = (char *)H5MM_malloc(H5PL_EXPAND_BUFFER_SIZE))) + HGOTO_ERROR(H5E_PLUGIN, H5E_CANTALLOC, FAIL, "can't allocate memory for expanded path") + if ((bufCharCount = ExpandEnvironmentStrings(dl_path, tempbuf, H5PL_EXPAND_BUFFER_SIZE)) > H5PL_EXPAND_BUFFER_SIZE) { + tempbuf = (char *)H5MM_xfree(tempbuf); + HGOTO_ERROR(H5E_PLUGIN, H5E_NOSPACE, FAIL, "expanded path is too long") + } + if (bufCharCount == 0) { + tempbuf = (char *)H5MM_xfree(tempbuf); + HGOTO_ERROR(H5E_PLUGIN, H5E_CANTGET, FAIL, "failed to expand path") + } + dl_path = (char *)H5MM_xfree(dl_path); + dl_path = H5MM_strdup(tempbuf); + tempbuf = (char *)H5MM_xfree(tempbuf); + } +#endif /* H5_HAVE_WIN32_API */ + for (plindex = (unsigned int)H5PL_num_paths_g; plindex > 0; plindex--) + H5PL_path_table_g[plindex] = H5PL_path_table_g[plindex - 1]; + if (NULL == (H5PL_path_table_g[0] = H5MM_strdup(dl_path))) + HGOTO_ERROR(H5E_PLUGIN, H5E_CANTALLOC, FAIL, "can't allocate memory for path") + H5PL_num_paths_g++; + +done: + if (dl_path) + dl_path = (char *)H5MM_xfree(dl_path); + + FUNC_LEAVE_API(ret_value) +} /* end H5PLprepend() */ + + +/*------------------------------------------------------------------------- + * Function: H5PLput + * + * Purpose: Replace the path at the specified index. + * + * Return: Non-negative or success. + * + *------------------------------------------------------------------------- + */ +herr_t +H5PLput(char* plugin_path, unsigned int index) +{ + herr_t ret_value = SUCCEED; /* Return value */ + char *dl_path = NULL; + + FUNC_ENTER_API(FAIL) + if(NULL == plugin_path) + HGOTO_ERROR(H5E_PLUGIN, H5E_CANTALLOC, FAIL, "no path provided") + dl_path = H5MM_strdup(plugin_path); + if(NULL == dl_path) + HGOTO_ERROR(H5E_PLUGIN, H5E_CANTALLOC, FAIL, "can't allocate memory for path") +#ifdef H5_HAVE_WIN32_API + else { /* Expand windows env var*/ + long bufCharCount; + char *tempbuf; + if(NULL == (tempbuf = (char *)H5MM_malloc(H5PL_EXPAND_BUFFER_SIZE))) + HGOTO_ERROR(H5E_PLUGIN, H5E_CANTALLOC, FAIL, "can't allocate memory for expanded path") + if((bufCharCount = ExpandEnvironmentStrings(dl_path, tempbuf, H5PL_EXPAND_BUFFER_SIZE)) > H5PL_EXPAND_BUFFER_SIZE) { + tempbuf = (char *)H5MM_xfree(tempbuf); + HGOTO_ERROR(H5E_PLUGIN, H5E_NOSPACE, FAIL, "expanded path is too long") + } + if(bufCharCount == 0) { + tempbuf = (char *)H5MM_xfree(tempbuf); + HGOTO_ERROR(H5E_PLUGIN, H5E_CANTGET, FAIL, "failed to expand path") + } + dl_path = (char *)H5MM_xfree(dl_path); + dl_path = H5MM_strdup(tempbuf); + tempbuf = (char *)H5MM_xfree(tempbuf); + } +#endif /* H5_HAVE_WIN32_API */ + if(H5PL_path_table_g[index]) + H5PL_path_table_g[index] = (char *)H5MM_xfree(H5PL_path_table_g[index]); + if(NULL == (H5PL_path_table_g[index] = H5MM_strdup(dl_path))) + HGOTO_ERROR(H5E_PLUGIN, H5E_CANTALLOC, FAIL, "can't allocate memory for path") + +done: + if(dl_path) + dl_path = (char *)H5MM_xfree(dl_path); + + FUNC_LEAVE_API(ret_value) +} /* end H5PLput() */ + + +/*------------------------------------------------------------------------- + * Function: H5PLinsert + * + * Purpose: Insert a plugin path at the specified index, moving other paths after the index. + * + * Return: Non-negative or success. + * + *------------------------------------------------------------------------- + */ +herr_t +H5PLinsert(char* plugin_path, unsigned int index) +{ + herr_t ret_value = SUCCEED; /* Return value */ + char *dl_path = NULL; + unsigned int plindex; + + FUNC_ENTER_API(FAIL) + if(H5PL_num_paths_g == H5PL_MAX_PATH_NUM) + HGOTO_ERROR(H5E_PLUGIN, H5E_NOSPACE, FAIL, "too many directories in path for table") + if(NULL == plugin_path) + HGOTO_ERROR(H5E_PLUGIN, H5E_CANTALLOC, FAIL, "no path provided") + dl_path = H5MM_strdup(plugin_path); + if(NULL == dl_path) + HGOTO_ERROR(H5E_PLUGIN, H5E_CANTALLOC, FAIL, "can't allocate memory for path") +#ifdef H5_HAVE_WIN32_API + else { /* Expand windows env var*/ + long bufCharCount; + char *tempbuf; + if(NULL == (tempbuf = (char *)H5MM_malloc(H5PL_EXPAND_BUFFER_SIZE))) + HGOTO_ERROR(H5E_PLUGIN, H5E_CANTALLOC, FAIL, "can't allocate memory for expanded path") + if((bufCharCount = ExpandEnvironmentStrings(dl_path, tempbuf, H5PL_EXPAND_BUFFER_SIZE)) > H5PL_EXPAND_BUFFER_SIZE) { + tempbuf = (char *)H5MM_xfree(tempbuf); + HGOTO_ERROR(H5E_PLUGIN, H5E_NOSPACE, FAIL, "expanded path is too long") + } + if(bufCharCount == 0) { + tempbuf = (char *)H5MM_xfree(tempbuf); + HGOTO_ERROR(H5E_PLUGIN, H5E_CANTGET, FAIL, "failed to expand path") + } + dl_path = (char *)H5MM_xfree(dl_path); + dl_path = H5MM_strdup(tempbuf); + tempbuf = (char *)H5MM_xfree(tempbuf); + } +#endif /* H5_HAVE_WIN32_API */ + for(plindex = (unsigned int)H5PL_num_paths_g; plindex > index; plindex--) + H5PL_path_table_g[plindex] = H5PL_path_table_g[plindex - 1]; + if(NULL == (H5PL_path_table_g[index] = H5MM_strdup(dl_path))) + HGOTO_ERROR(H5E_PLUGIN, H5E_CANTALLOC, FAIL, "can't allocate memory for path") + H5PL_num_paths_g++; + +done: + if(dl_path) + dl_path = (char *)H5MM_xfree(dl_path); + + FUNC_LEAVE_API(ret_value) +} /* end H5PLinsert() */ + + +/*------------------------------------------------------------------------- + * Function: H5PLremove + * + * Purpose: Remove the plugin path at the specifed index and compacting the list. + * + * Return: Non-negative or success. + * + *------------------------------------------------------------------------- + */ +herr_t +H5PLremove(unsigned int index) +{ + herr_t ret_value = SUCCEED; /* Return value */ + char *dl_path = NULL; + unsigned int plindex; + + FUNC_ENTER_API(FAIL) + if(H5PL_num_paths_g == 0) + HGOTO_ERROR(H5E_PLUGIN, H5E_NOSPACE, FAIL, "no directories in table") + if(NULL == (dl_path = H5PL_path_table_g[index])) + HGOTO_ERROR(H5E_PLUGIN, H5E_CANTALLOC, FAIL, "no directory path at index") + for(plindex = index; plindex < (unsigned int)H5PL_num_paths_g; plindex++) + H5PL_path_table_g[plindex] = H5PL_path_table_g[plindex + 1]; + if(H5PL_path_table_g[plindex]) + dl_path = (char *)H5MM_xfree(dl_path); + H5PL_num_paths_g--; + H5PL_path_table_g[H5PL_num_paths_g] = NULL; + +done: + if(dl_path) + dl_path = (char *)H5MM_xfree(dl_path); + + FUNC_LEAVE_API(ret_value) +} /* end H5PLremove() */ + + +/*------------------------------------------------------------------------- + * Function: H5PLget + * + * Purpose: Query the plugin path at the specified index. + * + * Return: Non-NULL on success/NULL on failure + * + *------------------------------------------------------------------------- + */ +const char* +H5PLget(unsigned int index) +{ + char* ret_value = NULL; /* Return value */ + + FUNC_ENTER_API(NULL) + if(H5PL_num_paths_g == 0) + HGOTO_ERROR(H5E_PLUGIN, H5E_NOSPACE, FAIL, "no directories in table") + if(NULL == (ret_value = H5PL_path_table_g[index])) + HGOTO_ERROR(H5E_PLUGIN, H5E_CANTALLOC, FAIL, "no directory path at index") + +done: + FUNC_LEAVE_API(ret_value) +} /* end H5PLget() */ + + +/*------------------------------------------------------------------------- + * Function: H5PLsize + * + * Purpose: Query the size of the current list of plugin paths. + * + * Return: Non-negative or success. + * + *------------------------------------------------------------------------- + */ +unsigned int +H5PLsize(void) +{ + return (unsigned int)H5PL_num_paths_g; +} /* end H5PLsize() */ + + +/*------------------------------------------------------------------------- * Function: H5PL__init_path_table * * Purpose: Initialize the path table. diff --git a/src/H5PLpublic.h b/src/H5PLpublic.h index 0528945..f3fe497 100644 --- a/src/H5PLpublic.h +++ b/src/H5PLpublic.h @@ -44,6 +44,13 @@ extern "C" { /* plugin state */ H5_DLL herr_t H5PLset_loading_state(unsigned int plugin_type); H5_DLL herr_t H5PLget_loading_state(unsigned int* plugin_type/*out*/); +H5_DLL herr_t H5PLappend(char* plugin_path); +H5_DLL herr_t H5PLprepend(char* plugin_path); +H5_DLL herr_t H5PLput(char* plugin_path, unsigned int index); +H5_DLL herr_t H5PLinsert(char* plugin_path, unsigned int index); +H5_DLL herr_t H5PLremove(unsigned int index); +H5_DLL const char* H5PLget(unsigned int index); +H5_DLL unsigned int H5PLsize(void); #ifdef __cplusplus } diff --git a/test/plugin.c b/test/plugin.c index a70e885..1d55a5d 100644 --- a/test/plugin.c +++ b/test/plugin.c @@ -12,10 +12,10 @@ * to either file, you may request a copy from help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* - * Programmer: Raymond Lu - * 13 February 2013 + * Programmer: Raymond Lu + * 13 February 2013 * - * Purpose: Tests the plugin module (H5PL) + * Purpose: Tests the plugin module (H5PL) */ #include "h5test.h" @@ -29,7 +29,7 @@ /* Filters for HDF5 internal test */ #define H5Z_FILTER_DYNLIB1 257 -#define H5Z_FILTER_DYNLIB2 258 +#define H5Z_FILTER_DYNLIB2 258 #define H5Z_FILTER_DYNLIB3 259 #define H5Z_FILTER_DYNLIB4 260 @@ -40,8 +40,8 @@ const char *FILENAME[] = { #define FILENAME_BUF_SIZE 1024 /* Dataset names for testing filters */ -#define DSET_DEFLATE_NAME "deflate" -#define DSET_DYNLIB1_NAME "dynlib1" +#define DSET_DEFLATE_NAME "deflate" +#define DSET_DYNLIB1_NAME "dynlib1" #define DSET_DYNLIB2_NAME "dynlib2" #define DSET_DYNLIB4_NAME "dynlib4" @@ -62,7 +62,7 @@ const char *FILENAME[] = { #define GROUP_ITERATION 1000 -int points_deflate[DSET_DIM1][DSET_DIM2], +int points_deflate[DSET_DIM1][DSET_DIM2], points_dynlib1[DSET_DIM1][DSET_DIM2], points_dynlib2[DSET_DIM1][DSET_DIM2], points_dynlib4[DSET_DIM1][DSET_DIM2], @@ -70,14 +70,14 @@ int points_deflate[DSET_DIM1][DSET_DIM2], /*------------------------------------------------------------------------- - * Function: test_filter_internal + * Function: test_filter_internal * - * Purpose: Tests writing entire data and partial data with filters + * Purpose: Tests writing entire data and partial data with filters * - * Return: Success: 0 - * Failure: -1 + * Return: Success: 0 + * Failure: -1 * - * Programmer: Raymond Lu + * Programmer: Raymond Lu * 27 February 2013 * *------------------------------------------------------------------------- @@ -85,28 +85,28 @@ int points_deflate[DSET_DIM1][DSET_DIM2], static herr_t test_filter_internal(hid_t fid, const char *name, hid_t dcpl) { - hid_t dataset; /* Dataset ID */ - hid_t dxpl; /* Dataset xfer property list ID */ - hid_t write_dxpl; /* Dataset xfer property list ID for writing */ - hid_t sid; /* Dataspace ID */ - const hsize_t size[2] = {DSET_DIM1, DSET_DIM2}; /* Dataspace dimensions */ - const hsize_t hs_offset[2] = {FILTER_HS_OFFSET1, FILTER_HS_OFFSET2}; /* Hyperslab offset */ - const hsize_t hs_size[2] = {FILTER_HS_SIZE1, FILTER_HS_SIZE2}; /* Hyperslab size */ - void *tconv_buf = NULL; /* Temporary conversion buffer */ - int points[DSET_DIM1][DSET_DIM2], check[DSET_DIM1][DSET_DIM2]; - size_t i, j; /* Local index variables */ + hid_t dataset; /* Dataset ID */ + hid_t dxpl; /* Dataset xfer property list ID */ + hid_t write_dxpl; /* Dataset xfer property list ID for writing */ + hid_t sid; /* Dataspace ID */ + const hsize_t size[2] = {DSET_DIM1, DSET_DIM2}; /* Dataspace dimensions */ + const hsize_t hs_offset[2] = {FILTER_HS_OFFSET1, FILTER_HS_OFFSET2}; /* Hyperslab offset */ + const hsize_t hs_size[2] = {FILTER_HS_SIZE1, FILTER_HS_SIZE2}; /* Hyperslab size */ + void *tconv_buf = NULL; /* Temporary conversion buffer */ + int points[DSET_DIM1][DSET_DIM2], check[DSET_DIM1][DSET_DIM2]; + size_t i, j; /* Local index variables */ int n = 0; /* Create the data space */ - if((sid = H5Screate_simple(2, size, NULL)) < 0) goto error; + if((sid = H5Screate_simple(2, size, NULL)) < 0) TEST_ERROR /* * Create a small conversion buffer to test strip mining. We * might as well test all we can! */ - if((dxpl = H5Pcreate(H5P_DATASET_XFER)) < 0) goto error; + if((dxpl = H5Pcreate(H5P_DATASET_XFER)) < 0) TEST_ERROR tconv_buf = HDmalloc((size_t)1000); - if(H5Pset_buffer(dxpl, (size_t)1000, tconv_buf, NULL) < 0) goto error; + if(H5Pset_buffer(dxpl, (size_t)1000, tconv_buf, NULL) < 0) TEST_ERROR if((write_dxpl = H5Pcopy(dxpl)) < 0) TEST_ERROR; TESTING(" filters (setup)"); @@ -115,12 +115,12 @@ test_filter_internal(hid_t fid, const char *name, hid_t dcpl) if(H5Pall_filters_avail(dcpl)!=TRUE) { H5_FAILED(); printf(" Line %d: Incorrect filter availability\n",__LINE__); - goto error; + TEST_ERROR } /* end if */ /* Create the dataset */ if((dataset = H5Dcreate2(fid, name, H5T_NATIVE_INT, sid, H5P_DEFAULT, - dcpl, H5P_DEFAULT)) < 0) goto error; + dcpl, H5P_DEFAULT)) < 0) TEST_ERROR PASSED(); @@ -131,18 +131,18 @@ test_filter_internal(hid_t fid, const char *name, hid_t dcpl) TESTING(" filters (uninitialized read)"); if(H5Dread(dataset, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, dxpl, check) < 0) - TEST_ERROR; + TEST_ERROR; for(i=0; i<(size_t)size[0]; i++) { - for(j=0; j<(size_t)size[1]; j++) { - if(0!=check[i][j]) { - H5_FAILED(); - printf(" Read a non-zero value.\n"); - printf(" At index %lu,%lu\n", - (unsigned long)i, (unsigned long)j); - goto error; - } - } + for(j=0; j<(size_t)size[1]; j++) { + if(0!=check[i][j]) { + H5_FAILED(); + printf(" Read a non-zero value.\n"); + printf(" At index %lu,%lu\n", + (unsigned long)i, (unsigned long)j); + TEST_ERROR + } + } } PASSED(); @@ -155,13 +155,13 @@ test_filter_internal(hid_t fid, const char *name, hid_t dcpl) n = 0; for(i=0; i 0; i--) { + if (H5PLremove(i-1) < 0) { + fprintf(stderr," at %d: %s\n", i, pathname); + TEST_ERROR + } + } + /* Verify the table is empty */ + if (H5PLsize() > 0) TEST_ERROR + PASSED(); + + TESTING(" remove (exceed)"); + /* Exceed the min path removal */ + H5E_BEGIN_TRY { + ret = H5PLremove(0); + } H5E_END_TRY + if (ret >= 0) + TEST_ERROR + PASSED(); + TESTING(" append"); + /* Create multiple paths to fill table */ + for (i=0; i < 16; i++) { + sprintf(pathname, "a_path_%d", i); + if (H5PLappend(pathname) < 0) { + fprintf(stderr," at %d: %s\n", i, pathname); + TEST_ERROR + } + } + /* Verify the table is full */ + if (H5PLsize() != 16) TEST_ERROR + PASSED(); + + TESTING(" append (exceed)"); + /* Exceed the max path append */ + H5E_BEGIN_TRY { + sprintf(pathname, "a_path_%d", 16); + ret = H5PLappend(pathname); + } H5E_END_TRY + if (ret >= 0) + TEST_ERROR + PASSED(); + + TESTING(" remove (verify for prepend)"); + /* Remove one path*/ + if (H5PLremove(8) < 0) TEST_ERROR + + /* Verify that the entries were moved */ + sprintf(pathname, "%s", H5PLget(8)); + if (strcmp(pathname, "a_path_9") != 0) { + fprintf(stderr," get 8: %s\n", pathname); + TEST_ERROR + } + PASSED(); + + /* Verify the table is not full */ + if (H5PLsize() != 15) TEST_ERROR + + TESTING(" prepend"); + /* Prepend one path*/ + sprintf(pathname, "a_path_%d", 17); + if (H5PLprepend(pathname) < 0) { + fprintf(stderr," prepend 17: %s\n", pathname); + TEST_ERROR + } + + /* Verify the table is full */ + if (H5PLsize() != 16) TEST_ERROR + + /* Verify that the entries were moved */ + sprintf(pathname, "%s", H5PLget(8)); + if (strcmp(pathname, "a_path_7") != 0) { + fprintf(stderr," get 8: %s\n", pathname); + TEST_ERROR + } + sprintf(pathname, "%s", H5PLget(0)); + if (strcmp(pathname, "a_path_17") != 0) { + fprintf(stderr," get 0: %s\n", pathname); + TEST_ERROR + } + PASSED(); + + TESTING(" prepend (exceed)"); + /* Exceed the max path prepend */ + H5E_BEGIN_TRY { + sprintf(pathname, "a_path_%d", 18); + ret = H5PLprepend(pathname); + } H5E_END_TRY + if (ret >= 0) + TEST_ERROR + PASSED(); + + TESTING(" replace"); + /* Replace one path*/ + sprintf(pathname, "a_path_%d", 20); + if (H5PLput(pathname, 1) < 0) { + fprintf(stderr," replace 1: %s\n", pathname); + TEST_ERROR + } + + /* Verify the table is full */ + if (H5PLsize() != 16) TEST_ERROR + + /* Verify that the entries were not moved */ + sprintf(pathname, "%s", H5PLget(0)); + if (strcmp(pathname, "a_path_17") != 0) { + fprintf(stderr," get 0: %s\n", pathname); + TEST_ERROR + } + sprintf(pathname, "%s", H5PLget(2)); + if (strcmp(pathname, "a_path_1") != 0) { + fprintf(stderr," get 2: %s\n", pathname); + TEST_ERROR + } + PASSED(); + + TESTING(" remove (verify for insert)"); + /* Remove one path*/ + if (H5PLremove(4) < 0) TEST_ERROR + + /* Verify that the entries were moved */ + sprintf(pathname, "%s", H5PLget(4)); + if (strcmp(pathname, "a_path_4") != 0) { + fprintf(stderr," get 4: %s\n", pathname); + TEST_ERROR + } + PASSED(); + + /* Verify the table is not full */ + if (H5PLsize() != 15) TEST_ERROR + + TESTING(" insert"); + /* Insert one path*/ + sprintf(pathname, "a_path_%d", 21); + if (H5PLinsert(pathname, 3) < 0){ + fprintf(stderr," insert 3: %s\n", pathname); + TEST_ERROR + } + + /* Verify that the entries were moved */ + sprintf(pathname, "%s", H5PLget(4)); + if (strcmp(pathname, "a_path_2") != 0){ + fprintf(stderr," get 4: %s\n", pathname); + TEST_ERROR + } PASSED(); + /* Verify the table is full */ + if (H5PLsize() != 16) TEST_ERROR + + TESTING(" insert (exceed)"); + /* Exceed the max path insert */ + H5E_BEGIN_TRY { + sprintf(pathname, "a_path_%d", 22); + ret = H5PLinsert(pathname, 12); + } H5E_END_TRY + if (ret >= 0) + TEST_ERROR + + PASSED (); + return 0; error: @@ -729,30 +918,30 @@ error: /*------------------------------------------------------------------------- - * Function: main + * Function: main * - * Purpose: Tests the plugin module (H5PL) + * Purpose: Tests the plugin module (H5PL) * - * Return: Success: exit(EXIT_SUCCESS) + * Return: Success: exit(EXIT_SUCCESS) * - * Failure: exit(EXIT_FAILURE) + * Failure: exit(EXIT_FAILURE) * - * Programmer: Raymond Lu - * 14 March 2013 + * Programmer: Raymond Lu + * 14 March 2013 * *------------------------------------------------------------------------- */ int main(void) { - char filename[FILENAME_BUF_SIZE]; - hid_t file, fapl, fapl2; + char filename[FILENAME_BUF_SIZE]; + hid_t file, fapl, fapl2; unsigned new_format; int mdc_nelmts; size_t rdcc_nelmts; size_t rdcc_nbytes; double rdcc_w0; - int nerrors = 0; + int nerrors = 0; /* Testing setup */ h5_reset(); @@ -760,10 +949,10 @@ main(void) /* Turn off the chunk cache, so all the chunks are immediately written to disk */ if(H5Pget_cache(fapl, &mdc_nelmts, &rdcc_nelmts, &rdcc_nbytes, &rdcc_w0) < 0) - TEST_ERROR + TEST_ERROR rdcc_nbytes = 0; if(H5Pset_cache(fapl, mdc_nelmts, rdcc_nelmts, rdcc_nbytes, rdcc_w0) < 0) - TEST_ERROR + TEST_ERROR /* Copy the file access property list */ if((fapl2 = H5Pcopy(fapl)) < 0) TEST_ERROR @@ -789,22 +978,22 @@ main(void) /* Create the file for this test */ if((file = H5Fcreate(filename, H5F_ACC_TRUNC, H5P_DEFAULT, my_fapl)) < 0) - TEST_ERROR + TEST_ERROR /* Test dynamically loaded filters for chunked dataset */ - nerrors += (test_filters_for_datasets(file) < 0 ? 1 : 0); + nerrors += (test_filters_for_datasets(file) < 0 ? 1 : 0); /* Test dynamically loaded filters for groups */ nerrors += (test_filters_for_groups(file) < 0 ? 1 : 0); if(H5Fclose(file) < 0) - TEST_ERROR + TEST_ERROR } /* end for */ /* Close FAPL */ if(H5Pclose(fapl2) < 0) TEST_ERROR if(H5Pclose(fapl) < 0) TEST_ERROR - + /* Restore the default error handler (set in h5_reset()) */ h5_restore_err(); @@ -816,13 +1005,13 @@ main(void) /* Reopen the file for testing data reading */ if((file = H5Fopen(filename, H5F_ACC_RDONLY, fapl)) < 0) - TEST_ERROR + TEST_ERROR /* Read the data with filters */ - nerrors += (test_read_with_filters(file) < 0 ? 1 : 0); + nerrors += (test_read_with_filters(file) < 0 ? 1 : 0); /* Open the groups with filters */ - nerrors += (test_groups_with_filters(file) < 0 ? 1 : 0); + nerrors += (test_groups_with_filters(file) < 0 ? 1 : 0); /* Restore the default error handler (set in h5_reset()) */ h5_restore_err(); @@ -839,10 +1028,13 @@ main(void) nerrors += (test_noread_with_filters(file) < 0 ? 1 : 0); if(H5Fclose(file) < 0) - TEST_ERROR + TEST_ERROR + + /* Test the APIs for access to the filter plugin path table */ + nerrors += (test_filter_path_apis() < 0 ? 1 : 0); if(nerrors) - TEST_ERROR + TEST_ERROR printf("All plugin tests passed.\n"); h5_cleanup(FILENAME, fapl); -- cgit v0.12 From a1dc1a5f28b99d30b7870f764c288995cabc7ad0 Mon Sep 17 00:00:00 2001 From: lrknox Date: Tue, 28 Mar 2017 16:36:30 -0500 Subject: Resolve conflict missed in merge. --- src/H5public.h | 8 -------- 1 file changed, 8 deletions(-) diff --git a/src/H5public.h b/src/H5public.h index 7d9a02d..2e73ec9 100644 --- a/src/H5public.h +++ b/src/H5public.h @@ -93,19 +93,11 @@ extern "C" { /* Version numbers */ #define H5_VERS_MAJOR 1 /* For major interface/format changes */ -<<<<<<< HEAD #define H5_VERS_MINOR 10 /* For minor interface/format changes */ #define H5_VERS_RELEASE 2 /* For tweaks, bug-fixes, or development */ #define H5_VERS_SUBRELEASE "snap0" /* For pre-releases like snap0 */ /* Empty string for real releases. */ #define H5_VERS_INFO "HDF5 library version: 1.10.2-snap0" /* Full version string */ -======= -#define H5_VERS_MINOR 11 /* For minor interface/format changes */ -#define H5_VERS_RELEASE 0 /* For tweaks, bug-fixes, or development */ -#define H5_VERS_SUBRELEASE "" /* For pre-releases like snap0 */ - /* Empty string for real releases. */ -#define H5_VERS_INFO "HDF5 library version: 1.11.0" /* Full version string */ ->>>>>>> develop #define H5check() H5check_version(H5_VERS_MAJOR,H5_VERS_MINOR, \ H5_VERS_RELEASE) -- cgit v0.12 From 10ef22fcd6b8692fc5f34f58ca2b2b6394021e0d Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Thu, 30 Mar 2017 12:15:25 -0500 Subject: HDFFV-10143 Fix initial issues from review --- MANIFEST | 1 + src/CMakeLists.txt | 1 + src/H5PL.c | 137 +++++++++++++---------------------------------- src/H5PLpkg.h | 50 ++++++++++++++++++ test/plugin.c | 152 ++++++++++++++++++++++++++++++++--------------------- 5 files changed, 181 insertions(+), 160 deletions(-) create mode 100644 src/H5PLpkg.h diff --git a/MANIFEST b/MANIFEST index 3d252eb..9400fe3 100644 --- a/MANIFEST +++ b/MANIFEST @@ -800,6 +800,7 @@ ./src/H5PBprivate.h ./src/H5PL.c ./src/H5PLmodule.h +./src/H5PLpkg.h ./src/H5PLprivate.h ./src/H5PLpublic.h ./src/H5PLextern.h diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 9321bbd..e2acd30 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -520,6 +520,7 @@ set (H5PL_SOURCES set (H5PL_HDRS ${HDF5_SRC_DIR}/H5PLextern.h + ${HDF5_SRC_DIR}/H5PLpkg.h ${HDF5_SRC_DIR}/H5PLpublic.h ) IDE_GENERATED_PROPERTIES ("H5PL" "${H5PL_HDRS}" "${H5PL_SOURCES}" ) diff --git a/src/H5PL.c b/src/H5PL.c index 898e84b..f6af691 100644 --- a/src/H5PL.c +++ b/src/H5PL.c @@ -25,15 +25,34 @@ #include "H5private.h" /* Generic Functions */ #include "H5Eprivate.h" /* Error handling */ #include "H5MMprivate.h" /* Memory management */ -#include "H5PLprivate.h" /* Plugin */ +#include "H5PLpkg.h" /* Plugin */ #include "H5Zprivate.h" /* Filter pipeline */ /****************/ /* Local Macros */ /****************/ - -#define H5PL_MAX_PATH_NUM 16 +#ifdef H5_HAVE_WIN32_API +#define H5PL_EXPAND_ENV_VAR { \ + long bufCharCount; \ + char *tempbuf; \ + if(NULL == (tempbuf = (char *)H5MM_malloc(H5PL_EXPAND_BUFFER_SIZE))) \ + HGOTO_ERROR(H5E_PLUGIN, H5E_CANTALLOC, FAIL, "can't allocate memory for expanded path") \ + if((bufCharCount = ExpandEnvironmentStrings(dl_path, tempbuf, H5PL_EXPAND_BUFFER_SIZE)) > H5PL_EXPAND_BUFFER_SIZE) { \ + tempbuf = (char *)H5MM_xfree(tempbuf); \ + HGOTO_ERROR(H5E_PLUGIN, H5E_NOSPACE, FAIL, "expanded path is too long") \ + } \ + if(bufCharCount == 0) { \ + tempbuf = (char *)H5MM_xfree(tempbuf); \ + HGOTO_ERROR(H5E_PLUGIN, H5E_CANTGET, FAIL, "failed to expand path") \ + } \ + dl_path = (char *)H5MM_xfree(dl_path); \ + dl_path = H5MM_strdup(tempbuf); \ + tempbuf = (char *)H5MM_xfree(tempbuf); \ + } +#else +#define H5PL_EXPAND_ENV_VAR +#endif /* H5_HAVE_WIN32_API */ /****************************/ /* Macros for supporting @@ -412,25 +431,9 @@ H5PLappend(char* plugin_path) dl_path = H5MM_strdup(plugin_path); if(NULL == dl_path) HGOTO_ERROR(H5E_PLUGIN, H5E_CANTALLOC, FAIL, "can't allocate memory for path") -#ifdef H5_HAVE_WIN32_API - else { /* Expand windows env var*/ - long bufCharCount; - char *tempbuf; - if(NULL == (tempbuf = (char *)H5MM_malloc(H5PL_EXPAND_BUFFER_SIZE))) - HGOTO_ERROR(H5E_PLUGIN, H5E_CANTALLOC, FAIL, "can't allocate memory for expanded path") - if((bufCharCount = ExpandEnvironmentStrings(dl_path, tempbuf, H5PL_EXPAND_BUFFER_SIZE)) > H5PL_EXPAND_BUFFER_SIZE) { - tempbuf = (char *)H5MM_xfree(tempbuf); - HGOTO_ERROR(H5E_PLUGIN, H5E_NOSPACE, FAIL, "expanded path is too long") - } - if(bufCharCount == 0) { - tempbuf = (char *)H5MM_xfree(tempbuf); - HGOTO_ERROR(H5E_PLUGIN, H5E_CANTGET, FAIL, "failed to expand path") - } - dl_path = (char *)H5MM_xfree(dl_path); - dl_path = H5MM_strdup(tempbuf); - tempbuf = (char *)H5MM_xfree(tempbuf); - } -#endif /* H5_HAVE_WIN32_API */ + + H5PL_EXPAND_ENV_VAR + if(NULL == (H5PL_path_table_g[H5PL_num_paths_g] = H5MM_strdup(dl_path))) HGOTO_ERROR(H5E_PLUGIN, H5E_CANTALLOC, FAIL, "can't allocate memory for path") H5PL_num_paths_g++; @@ -467,25 +470,9 @@ H5PLprepend(char* plugin_path) dl_path = H5MM_strdup(plugin_path); if(NULL == dl_path) HGOTO_ERROR(H5E_PLUGIN, H5E_CANTALLOC, FAIL, "can't allocate memory for path") -#ifdef H5_HAVE_WIN32_API - else { /* Expand windows env var*/ - long bufCharCount; - char *tempbuf; - if (NULL == (tempbuf = (char *)H5MM_malloc(H5PL_EXPAND_BUFFER_SIZE))) - HGOTO_ERROR(H5E_PLUGIN, H5E_CANTALLOC, FAIL, "can't allocate memory for expanded path") - if ((bufCharCount = ExpandEnvironmentStrings(dl_path, tempbuf, H5PL_EXPAND_BUFFER_SIZE)) > H5PL_EXPAND_BUFFER_SIZE) { - tempbuf = (char *)H5MM_xfree(tempbuf); - HGOTO_ERROR(H5E_PLUGIN, H5E_NOSPACE, FAIL, "expanded path is too long") - } - if (bufCharCount == 0) { - tempbuf = (char *)H5MM_xfree(tempbuf); - HGOTO_ERROR(H5E_PLUGIN, H5E_CANTGET, FAIL, "failed to expand path") - } - dl_path = (char *)H5MM_xfree(dl_path); - dl_path = H5MM_strdup(tempbuf); - tempbuf = (char *)H5MM_xfree(tempbuf); - } -#endif /* H5_HAVE_WIN32_API */ + + H5PL_EXPAND_ENV_VAR + for (plindex = (unsigned int)H5PL_num_paths_g; plindex > 0; plindex--) H5PL_path_table_g[plindex] = H5PL_path_table_g[plindex - 1]; if (NULL == (H5PL_path_table_g[0] = H5MM_strdup(dl_path))) @@ -521,25 +508,9 @@ H5PLput(char* plugin_path, unsigned int index) dl_path = H5MM_strdup(plugin_path); if(NULL == dl_path) HGOTO_ERROR(H5E_PLUGIN, H5E_CANTALLOC, FAIL, "can't allocate memory for path") -#ifdef H5_HAVE_WIN32_API - else { /* Expand windows env var*/ - long bufCharCount; - char *tempbuf; - if(NULL == (tempbuf = (char *)H5MM_malloc(H5PL_EXPAND_BUFFER_SIZE))) - HGOTO_ERROR(H5E_PLUGIN, H5E_CANTALLOC, FAIL, "can't allocate memory for expanded path") - if((bufCharCount = ExpandEnvironmentStrings(dl_path, tempbuf, H5PL_EXPAND_BUFFER_SIZE)) > H5PL_EXPAND_BUFFER_SIZE) { - tempbuf = (char *)H5MM_xfree(tempbuf); - HGOTO_ERROR(H5E_PLUGIN, H5E_NOSPACE, FAIL, "expanded path is too long") - } - if(bufCharCount == 0) { - tempbuf = (char *)H5MM_xfree(tempbuf); - HGOTO_ERROR(H5E_PLUGIN, H5E_CANTGET, FAIL, "failed to expand path") - } - dl_path = (char *)H5MM_xfree(dl_path); - dl_path = H5MM_strdup(tempbuf); - tempbuf = (char *)H5MM_xfree(tempbuf); - } -#endif /* H5_HAVE_WIN32_API */ + + H5PL_EXPAND_ENV_VAR + if(H5PL_path_table_g[index]) H5PL_path_table_g[index] = (char *)H5MM_xfree(H5PL_path_table_g[index]); if(NULL == (H5PL_path_table_g[index] = H5MM_strdup(dl_path))) @@ -577,25 +548,9 @@ H5PLinsert(char* plugin_path, unsigned int index) dl_path = H5MM_strdup(plugin_path); if(NULL == dl_path) HGOTO_ERROR(H5E_PLUGIN, H5E_CANTALLOC, FAIL, "can't allocate memory for path") -#ifdef H5_HAVE_WIN32_API - else { /* Expand windows env var*/ - long bufCharCount; - char *tempbuf; - if(NULL == (tempbuf = (char *)H5MM_malloc(H5PL_EXPAND_BUFFER_SIZE))) - HGOTO_ERROR(H5E_PLUGIN, H5E_CANTALLOC, FAIL, "can't allocate memory for expanded path") - if((bufCharCount = ExpandEnvironmentStrings(dl_path, tempbuf, H5PL_EXPAND_BUFFER_SIZE)) > H5PL_EXPAND_BUFFER_SIZE) { - tempbuf = (char *)H5MM_xfree(tempbuf); - HGOTO_ERROR(H5E_PLUGIN, H5E_NOSPACE, FAIL, "expanded path is too long") - } - if(bufCharCount == 0) { - tempbuf = (char *)H5MM_xfree(tempbuf); - HGOTO_ERROR(H5E_PLUGIN, H5E_CANTGET, FAIL, "failed to expand path") - } - dl_path = (char *)H5MM_xfree(dl_path); - dl_path = H5MM_strdup(tempbuf); - tempbuf = (char *)H5MM_xfree(tempbuf); - } -#endif /* H5_HAVE_WIN32_API */ + + H5PL_EXPAND_ENV_VAR + for(plindex = (unsigned int)H5PL_num_paths_g; plindex > index; plindex--) H5PL_path_table_g[plindex] = H5PL_path_table_g[plindex - 1]; if(NULL == (H5PL_path_table_g[index] = H5MM_strdup(dl_path))) @@ -662,9 +617,9 @@ H5PLget(unsigned int index) FUNC_ENTER_API(NULL) if(H5PL_num_paths_g == 0) - HGOTO_ERROR(H5E_PLUGIN, H5E_NOSPACE, FAIL, "no directories in table") + HGOTO_ERROR(H5E_PLUGIN, H5E_NOSPACE, NULL, "no directories in table") if(NULL == (ret_value = H5PL_path_table_g[index])) - HGOTO_ERROR(H5E_PLUGIN, H5E_CANTALLOC, FAIL, "no directory path at index") + HGOTO_ERROR(H5E_PLUGIN, H5E_CANTALLOC, NULL, "no directory path at index") done: FUNC_LEAVE_API(ret_value) @@ -720,25 +675,7 @@ H5PL__init_path_table(void) if(NULL == dl_path) HGOTO_ERROR(H5E_PLUGIN, H5E_CANTALLOC, FAIL, "can't allocate memory for path") -#ifdef H5_HAVE_WIN32_API - else { /* Expand windows env var*/ - long bufCharCount; - char *tempbuf; - if(NULL == (tempbuf = (char *)H5MM_malloc(H5PL_EXPAND_BUFFER_SIZE))) - HGOTO_ERROR(H5E_PLUGIN, H5E_CANTALLOC, FAIL, "can't allocate memory for expanded path") - if((bufCharCount = ExpandEnvironmentStrings(dl_path, tempbuf, H5PL_EXPAND_BUFFER_SIZE)) > H5PL_EXPAND_BUFFER_SIZE) { - tempbuf = (char *)H5MM_xfree(tempbuf); - HGOTO_ERROR(H5E_PLUGIN, H5E_NOSPACE, FAIL, "expanded path is too long") - } - if(bufCharCount == 0) { - tempbuf = (char *)H5MM_xfree(tempbuf); - HGOTO_ERROR(H5E_PLUGIN, H5E_CANTGET, FAIL, "failed to expand path") - } - dl_path = (char *)H5MM_xfree(dl_path); - dl_path = H5MM_strdup(tempbuf); - tempbuf = (char *)H5MM_xfree(tempbuf); - } -#endif /* H5_HAVE_WIN32_API */ + H5PL_EXPAND_ENV_VAR /* Put paths in the path table. They are separated by ":" */ dir = HDstrtok(dl_path, H5PL_PATH_SEPARATOR); diff --git a/src/H5PLpkg.h b/src/H5PLpkg.h new file mode 100644 index 0000000..2761a33 --- /dev/null +++ b/src/H5PLpkg.h @@ -0,0 +1,50 @@ +/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + * Copyright by The HDF Group. * + * Copyright by the Board of Trustees of the University of Illinois. * + * All rights reserved. * + * * + * This file is part of HDF5. The full HDF5 copyright notice, including * + * terms governing use, modification, and redistribution, is contained in * + * the files COPYING and Copyright.html. COPYING can be found at the root * + * of the source code distribution tree; Copyright.html can be found at the * + * root level of an installed copy of the electronic HDF5 document set and * + * is linked from the top-level documents page. It can also be found at * + * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * + * access to either file, you may request a copy from help@hdfgroup.org. * + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ + +#if !(defined H5PL_FRIEND || defined H5PL_MODULE) +#error "Do not include this file outside the H5PL package!" +#endif + +#ifndef _H5PLpkg_H +#define _H5PLpkg_H + +/* Include private header file */ +#include "H5PLprivate.h" /* Filter functions */ + +/* Other private headers needed by this file */ + +/**************************/ +/* Package Private Macros */ +/**************************/ + + +/****************************/ +/* Package Private Typedefs */ +/****************************/ + +#define H5PL_MAX_PATH_NUM 16 + + +/*****************************/ +/* Package Private Variables */ +/*****************************/ + + +/******************************/ +/* Package Private Prototypes */ +/******************************/ + +#endif /* _H5PLpkg_H */ + diff --git a/test/plugin.c b/test/plugin.c index 1d55a5d..c739b72 100644 --- a/test/plugin.c +++ b/test/plugin.c @@ -22,8 +22,10 @@ #include "H5srcdir.h" /* - * This file needs to access private datatypes from the H5Z package. + * This file needs to access private datatypes from the H5Z and H5PL package. */ +#define H5PL_FRIEND +#include "H5PLpkg.h" #define H5Z_FRIEND #include "H5Zpkg.h" @@ -114,7 +116,7 @@ test_filter_internal(hid_t fid, const char *name, hid_t dcpl) /* Check if all the filters are available */ if(H5Pall_filters_avail(dcpl)!=TRUE) { H5_FAILED(); - printf(" Line %d: Incorrect filter availability\n",__LINE__); + HDprintf(" Line %d: Incorrect filter availability\n",__LINE__); TEST_ERROR } /* end if */ @@ -137,8 +139,8 @@ test_filter_internal(hid_t fid, const char *name, hid_t dcpl) for(j=0; j<(size_t)size[1]; j++) { if(0!=check[i][j]) { H5_FAILED(); - printf(" Read a non-zero value.\n"); - printf(" At index %lu,%lu\n", + HDprintf(" Read a non-zero value.\n"); + HDprintf(" At index %lu,%lu\n", (unsigned long)i, (unsigned long)j); TEST_ERROR } @@ -180,10 +182,10 @@ test_filter_internal(hid_t fid, const char *name, hid_t dcpl) for(j=0; j 0; i--) { if (H5PLremove(i-1) < 0) { - fprintf(stderr," at %d: %s\n", i, pathname); + HDfprintf(stderr," at %d: %s\n", i, pathname); TEST_ERROR } } @@ -772,9 +774,9 @@ test_filter_path_apis(void) TESTING(" append"); /* Create multiple paths to fill table */ for (i=0; i < 16; i++) { - sprintf(pathname, "a_path_%d", i); + HDsprintf(pathname, "a_path_%d", i); if (H5PLappend(pathname) < 0) { - fprintf(stderr," at %d: %s\n", i, pathname); + HDfprintf(stderr," at %d: %s\n", i, pathname); TEST_ERROR } } @@ -785,11 +787,41 @@ test_filter_path_apis(void) TESTING(" append (exceed)"); /* Exceed the max path append */ H5E_BEGIN_TRY { - sprintf(pathname, "a_path_%d", 16); + HDsprintf(pathname, "a_path_%d", 16); ret = H5PLappend(pathname); } H5E_END_TRY if (ret >= 0) TEST_ERROR + + /* Exceed the max path removal */ + H5E_BEGIN_TRY { + ret = H5PLremove(16); + } H5E_END_TRY + if (ret >= 0) + TEST_ERROR + PASSED(); + + TESTING(" get (bounds)"); + HDsprintf(pathname, "%s", H5PLget(0)); + if (strcmp(pathname, "a_path_0") != 0) { + HDfprintf(stderr," get 0: %s\n", pathname); + TEST_ERROR + } + HDsprintf(pathname, "%s", H5PLget(1)); + if (strcmp(pathname, "a_path_1") != 0) { + HDfprintf(stderr," get 1: %s\n", pathname); + TEST_ERROR + } + HDsprintf(pathname, "%s", H5PLget(15)); + if (strcmp(pathname, "a_path_15") != 0) { + HDfprintf(stderr," get 15: %s\n", pathname); + TEST_ERROR + } + PASSED(); + + TESTING(" get (bounds exceed)"); + if (H5PLget(16) != NULL) + TEST_ERROR PASSED(); TESTING(" remove (verify for prepend)"); @@ -797,9 +829,9 @@ test_filter_path_apis(void) if (H5PLremove(8) < 0) TEST_ERROR /* Verify that the entries were moved */ - sprintf(pathname, "%s", H5PLget(8)); + HDsprintf(pathname, "%s", H5PLget(8)); if (strcmp(pathname, "a_path_9") != 0) { - fprintf(stderr," get 8: %s\n", pathname); + HDfprintf(stderr," get 8: %s\n", pathname); TEST_ERROR } PASSED(); @@ -809,9 +841,9 @@ test_filter_path_apis(void) TESTING(" prepend"); /* Prepend one path*/ - sprintf(pathname, "a_path_%d", 17); + HDsprintf(pathname, "a_path_%d", 17); if (H5PLprepend(pathname) < 0) { - fprintf(stderr," prepend 17: %s\n", pathname); + HDfprintf(stderr," prepend 17: %s\n", pathname); TEST_ERROR } @@ -819,14 +851,14 @@ test_filter_path_apis(void) if (H5PLsize() != 16) TEST_ERROR /* Verify that the entries were moved */ - sprintf(pathname, "%s", H5PLget(8)); + HDsprintf(pathname, "%s", H5PLget(8)); if (strcmp(pathname, "a_path_7") != 0) { - fprintf(stderr," get 8: %s\n", pathname); + HDfprintf(stderr," get 8: %s\n", pathname); TEST_ERROR } - sprintf(pathname, "%s", H5PLget(0)); + HDsprintf(pathname, "%s", H5PLget(0)); if (strcmp(pathname, "a_path_17") != 0) { - fprintf(stderr," get 0: %s\n", pathname); + HDfprintf(stderr," get 0: %s\n", pathname); TEST_ERROR } PASSED(); @@ -834,7 +866,7 @@ test_filter_path_apis(void) TESTING(" prepend (exceed)"); /* Exceed the max path prepend */ H5E_BEGIN_TRY { - sprintf(pathname, "a_path_%d", 18); + HDsprintf(pathname, "a_path_%d", 18); ret = H5PLprepend(pathname); } H5E_END_TRY if (ret >= 0) @@ -843,9 +875,9 @@ test_filter_path_apis(void) TESTING(" replace"); /* Replace one path*/ - sprintf(pathname, "a_path_%d", 20); + HDsprintf(pathname, "a_path_%d", 20); if (H5PLput(pathname, 1) < 0) { - fprintf(stderr," replace 1: %s\n", pathname); + HDfprintf(stderr," replace 1: %s\n", pathname); TEST_ERROR } @@ -853,14 +885,14 @@ test_filter_path_apis(void) if (H5PLsize() != 16) TEST_ERROR /* Verify that the entries were not moved */ - sprintf(pathname, "%s", H5PLget(0)); + HDsprintf(pathname, "%s", H5PLget(0)); if (strcmp(pathname, "a_path_17") != 0) { - fprintf(stderr," get 0: %s\n", pathname); + HDfprintf(stderr," get 0: %s\n", pathname); TEST_ERROR } - sprintf(pathname, "%s", H5PLget(2)); + HDsprintf(pathname, "%s", H5PLget(2)); if (strcmp(pathname, "a_path_1") != 0) { - fprintf(stderr," get 2: %s\n", pathname); + HDfprintf(stderr," get 2: %s\n", pathname); TEST_ERROR } PASSED(); @@ -870,9 +902,9 @@ test_filter_path_apis(void) if (H5PLremove(4) < 0) TEST_ERROR /* Verify that the entries were moved */ - sprintf(pathname, "%s", H5PLget(4)); + HDsprintf(pathname, "%s", H5PLget(4)); if (strcmp(pathname, "a_path_4") != 0) { - fprintf(stderr," get 4: %s\n", pathname); + HDfprintf(stderr," get 4: %s\n", pathname); TEST_ERROR } PASSED(); @@ -882,16 +914,16 @@ test_filter_path_apis(void) TESTING(" insert"); /* Insert one path*/ - sprintf(pathname, "a_path_%d", 21); + HDsprintf(pathname, "a_path_%d", 21); if (H5PLinsert(pathname, 3) < 0){ - fprintf(stderr," insert 3: %s\n", pathname); + HDfprintf(stderr," insert 3: %s\n", pathname); TEST_ERROR } /* Verify that the entries were moved */ - sprintf(pathname, "%s", H5PLget(4)); + HDsprintf(pathname, "%s", H5PLget(4)); if (strcmp(pathname, "a_path_2") != 0){ - fprintf(stderr," get 4: %s\n", pathname); + HDfprintf(stderr," get 4: %s\n", pathname); TEST_ERROR } PASSED(); @@ -902,7 +934,7 @@ test_filter_path_apis(void) TESTING(" insert (exceed)"); /* Exceed the max path insert */ H5E_BEGIN_TRY { - sprintf(pathname, "a_path_%d", 22); + HDsprintf(pathname, "a_path_%d", 22); ret = H5PLinsert(pathname, 12); } H5E_END_TRY if (ret >= 0) @@ -968,11 +1000,11 @@ main(void) /* 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 */ @@ -997,7 +1029,7 @@ main(void) /* Restore the default error handler (set in h5_reset()) */ h5_restore_err(); - puts("\nTesting reading data with with dynamic plugin filters:"); + HDputs("\nTesting reading data with with dynamic plugin filters:"); /* Close the library so that all loaded plugin libraries are unloaded */ h5_reset(); @@ -1035,14 +1067,14 @@ main(void) if(nerrors) TEST_ERROR - printf("All plugin tests passed.\n"); + HDprintf("All plugin tests passed.\n"); h5_cleanup(FILENAME, fapl); return 0; error: nerrors = MAX(1, nerrors); - printf("***** %d PLUGIN TEST%s FAILED! *****\n", + HDprintf("***** %d PLUGIN TEST%s FAILED! *****\n", nerrors, 1 == nerrors ? "" : "S"); return 1; } -- cgit v0.12 From db3638b791bfa789157c5712205d7d6ffe89437f Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Thu, 30 Mar 2017 12:36:12 -0500 Subject: Remove redundant code --- src/H5PL.c | 22 +++++++++------------- 1 file changed, 9 insertions(+), 13 deletions(-) diff --git a/src/H5PL.c b/src/H5PL.c index f6af691..fc1108d 100644 --- a/src/H5PL.c +++ b/src/H5PL.c @@ -47,8 +47,7 @@ HGOTO_ERROR(H5E_PLUGIN, H5E_CANTGET, FAIL, "failed to expand path") \ } \ dl_path = (char *)H5MM_xfree(dl_path); \ - dl_path = H5MM_strdup(tempbuf); \ - tempbuf = (char *)H5MM_xfree(tempbuf); \ + dl_path = tempbuf; \ } #else #define H5PL_EXPAND_ENV_VAR @@ -434,8 +433,8 @@ H5PLappend(char* plugin_path) H5PL_EXPAND_ENV_VAR - if(NULL == (H5PL_path_table_g[H5PL_num_paths_g] = H5MM_strdup(dl_path))) - HGOTO_ERROR(H5E_PLUGIN, H5E_CANTALLOC, FAIL, "can't allocate memory for path") + H5PL_path_table_g[H5PL_num_paths_g] = dl_path; + dl_path = NULL; H5PL_num_paths_g++; done: @@ -475,8 +474,8 @@ H5PLprepend(char* plugin_path) for (plindex = (unsigned int)H5PL_num_paths_g; plindex > 0; plindex--) H5PL_path_table_g[plindex] = H5PL_path_table_g[plindex - 1]; - if (NULL == (H5PL_path_table_g[0] = H5MM_strdup(dl_path))) - HGOTO_ERROR(H5E_PLUGIN, H5E_CANTALLOC, FAIL, "can't allocate memory for path") + H5PL_path_table_g[0] = dl_path; + dl_path = NULL; H5PL_num_paths_g++; done: @@ -513,8 +512,8 @@ H5PLput(char* plugin_path, unsigned int index) if(H5PL_path_table_g[index]) H5PL_path_table_g[index] = (char *)H5MM_xfree(H5PL_path_table_g[index]); - if(NULL == (H5PL_path_table_g[index] = H5MM_strdup(dl_path))) - HGOTO_ERROR(H5E_PLUGIN, H5E_CANTALLOC, FAIL, "can't allocate memory for path") + H5PL_path_table_g[index] = dl_path; + dl_path = NULL; done: if(dl_path) @@ -553,8 +552,8 @@ H5PLinsert(char* plugin_path, unsigned int index) for(plindex = (unsigned int)H5PL_num_paths_g; plindex > index; plindex--) H5PL_path_table_g[plindex] = H5PL_path_table_g[plindex - 1]; - if(NULL == (H5PL_path_table_g[index] = H5MM_strdup(dl_path))) - HGOTO_ERROR(H5E_PLUGIN, H5E_CANTALLOC, FAIL, "can't allocate memory for path") + H5PL_path_table_g[index] = dl_path; + dl_path = NULL; H5PL_num_paths_g++; done: @@ -594,9 +593,6 @@ H5PLremove(unsigned int index) H5PL_path_table_g[H5PL_num_paths_g] = NULL; done: - if(dl_path) - dl_path = (char *)H5MM_xfree(dl_path); - FUNC_LEAVE_API(ret_value) } /* end H5PLremove() */ -- cgit v0.12 From c25651fc5ce850715781a967396328a0b4cef43c Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Thu, 30 Mar 2017 12:17:48 -0500 Subject: HDFFV-10143 Use Windows A version of ExpandEnvironmentStrings --- src/H5PL.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/H5PL.c b/src/H5PL.c index fc1108d..abd3ea2 100644 --- a/src/H5PL.c +++ b/src/H5PL.c @@ -38,7 +38,7 @@ char *tempbuf; \ if(NULL == (tempbuf = (char *)H5MM_malloc(H5PL_EXPAND_BUFFER_SIZE))) \ HGOTO_ERROR(H5E_PLUGIN, H5E_CANTALLOC, FAIL, "can't allocate memory for expanded path") \ - if((bufCharCount = ExpandEnvironmentStrings(dl_path, tempbuf, H5PL_EXPAND_BUFFER_SIZE)) > H5PL_EXPAND_BUFFER_SIZE) { \ + if((bufCharCount = ExpandEnvironmentStringsA(dl_path, tempbuf, H5PL_EXPAND_BUFFER_SIZE)) > H5PL_EXPAND_BUFFER_SIZE) { \ tempbuf = (char *)H5MM_xfree(tempbuf); \ HGOTO_ERROR(H5E_PLUGIN, H5E_NOSPACE, FAIL, "expanded path is too long") \ } \ -- cgit v0.12 From cb222dded242724909bbb235518c6d819c06b7c7 Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Thu, 30 Mar 2017 13:22:43 -0500 Subject: HDFFV-10143 change put to replace and add const --- src/H5PL.c | 12 ++++++------ src/H5PLpublic.h | 8 ++++---- test/plugin.c | 2 +- 3 files changed, 11 insertions(+), 11 deletions(-) diff --git a/src/H5PL.c b/src/H5PL.c index abd3ea2..4bf19fc 100644 --- a/src/H5PL.c +++ b/src/H5PL.c @@ -417,7 +417,7 @@ done: *------------------------------------------------------------------------- */ herr_t -H5PLappend(char* plugin_path) +H5PLappend(const char* plugin_path) { herr_t ret_value = SUCCEED; /* Return value */ char *dl_path = NULL; @@ -455,7 +455,7 @@ done: *------------------------------------------------------------------------- */ herr_t -H5PLprepend(char* plugin_path) +H5PLprepend(const char* plugin_path) { herr_t ret_value = SUCCEED; /* Return value */ char *dl_path = NULL; @@ -487,7 +487,7 @@ done: /*------------------------------------------------------------------------- - * Function: H5PLput + * Function: H5PLreplace * * Purpose: Replace the path at the specified index. * @@ -496,7 +496,7 @@ done: *------------------------------------------------------------------------- */ herr_t -H5PLput(char* plugin_path, unsigned int index) +H5PLreplace(const char* plugin_path, unsigned int index) { herr_t ret_value = SUCCEED; /* Return value */ char *dl_path = NULL; @@ -520,7 +520,7 @@ done: dl_path = (char *)H5MM_xfree(dl_path); FUNC_LEAVE_API(ret_value) -} /* end H5PLput() */ +} /* end H5PLreplace() */ /*------------------------------------------------------------------------- @@ -533,7 +533,7 @@ done: *------------------------------------------------------------------------- */ herr_t -H5PLinsert(char* plugin_path, unsigned int index) +H5PLinsert(const char* plugin_path, unsigned int index) { herr_t ret_value = SUCCEED; /* Return value */ char *dl_path = NULL; diff --git a/src/H5PLpublic.h b/src/H5PLpublic.h index f3fe497..ca46542 100644 --- a/src/H5PLpublic.h +++ b/src/H5PLpublic.h @@ -44,10 +44,10 @@ extern "C" { /* plugin state */ H5_DLL herr_t H5PLset_loading_state(unsigned int plugin_type); H5_DLL herr_t H5PLget_loading_state(unsigned int* plugin_type/*out*/); -H5_DLL herr_t H5PLappend(char* plugin_path); -H5_DLL herr_t H5PLprepend(char* plugin_path); -H5_DLL herr_t H5PLput(char* plugin_path, unsigned int index); -H5_DLL herr_t H5PLinsert(char* plugin_path, unsigned int index); +H5_DLL herr_t H5PLappend(const char* plugin_path); +H5_DLL herr_t H5PLprepend(const char* plugin_path); +H5_DLL herr_t H5PLreplace(const char* plugin_path, unsigned int index); +H5_DLL herr_t H5PLinsert(const char* plugin_path, unsigned int index); H5_DLL herr_t H5PLremove(unsigned int index); H5_DLL const char* H5PLget(unsigned int index); H5_DLL unsigned int H5PLsize(void); diff --git a/test/plugin.c b/test/plugin.c index c739b72..359bbdd 100644 --- a/test/plugin.c +++ b/test/plugin.c @@ -876,7 +876,7 @@ test_filter_path_apis(void) TESTING(" replace"); /* Replace one path*/ HDsprintf(pathname, "a_path_%d", 20); - if (H5PLput(pathname, 1) < 0) { + if (H5PLreplace(pathname, 1) < 0) { HDfprintf(stderr," replace 1: %s\n", pathname); TEST_ERROR } -- cgit v0.12 From 09e76f7782854d1000ab2e92730d63388aec6ae9 Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Thu, 30 Mar 2017 14:40:03 -0500 Subject: HDFFV-10143 change h5PLget to use buffer like H5Iget_name --- src/H5PL.c | 63 ++++++++++++++++++++++++++++---------------------------- src/H5PLpublic.h | 2 +- test/plugin.c | 53 ++++++++++++++++++++++++++++++++++++----------- 3 files changed, 74 insertions(+), 44 deletions(-) diff --git a/src/H5PL.c b/src/H5PL.c index 4bf19fc..0957629 100644 --- a/src/H5PL.c +++ b/src/H5PL.c @@ -428,19 +428,15 @@ H5PLappend(const char* plugin_path) if(NULL == plugin_path) HGOTO_ERROR(H5E_PLUGIN, H5E_CANTALLOC, FAIL, "no path provided") dl_path = H5MM_strdup(plugin_path); - if(NULL == dl_path) + if(NULL == (dl_path = H5MM_strdup(plugin_path))) HGOTO_ERROR(H5E_PLUGIN, H5E_CANTALLOC, FAIL, "can't allocate memory for path") H5PL_EXPAND_ENV_VAR H5PL_path_table_g[H5PL_num_paths_g] = dl_path; - dl_path = NULL; H5PL_num_paths_g++; done: - if(dl_path) - dl_path = (char *)H5MM_xfree(dl_path); - FUNC_LEAVE_API(ret_value) } /* end H5PLappend() */ @@ -466,8 +462,7 @@ H5PLprepend(const char* plugin_path) HGOTO_ERROR(H5E_PLUGIN, H5E_NOSPACE, FAIL, "too many directories in path for table") if(NULL == plugin_path) HGOTO_ERROR(H5E_PLUGIN, H5E_CANTALLOC, FAIL, "no path provided") - dl_path = H5MM_strdup(plugin_path); - if(NULL == dl_path) + if(NULL == (dl_path = H5MM_strdup(plugin_path))) HGOTO_ERROR(H5E_PLUGIN, H5E_CANTALLOC, FAIL, "can't allocate memory for path") H5PL_EXPAND_ENV_VAR @@ -475,13 +470,9 @@ H5PLprepend(const char* plugin_path) for (plindex = (unsigned int)H5PL_num_paths_g; plindex > 0; plindex--) H5PL_path_table_g[plindex] = H5PL_path_table_g[plindex - 1]; H5PL_path_table_g[0] = dl_path; - dl_path = NULL; H5PL_num_paths_g++; done: - if (dl_path) - dl_path = (char *)H5MM_xfree(dl_path); - FUNC_LEAVE_API(ret_value) } /* end H5PLprepend() */ @@ -504,8 +495,7 @@ H5PLreplace(const char* plugin_path, unsigned int index) FUNC_ENTER_API(FAIL) if(NULL == plugin_path) HGOTO_ERROR(H5E_PLUGIN, H5E_CANTALLOC, FAIL, "no path provided") - dl_path = H5MM_strdup(plugin_path); - if(NULL == dl_path) + if(NULL == (dl_path = H5MM_strdup(plugin_path))) HGOTO_ERROR(H5E_PLUGIN, H5E_CANTALLOC, FAIL, "can't allocate memory for path") H5PL_EXPAND_ENV_VAR @@ -513,12 +503,8 @@ H5PLreplace(const char* plugin_path, unsigned int index) if(H5PL_path_table_g[index]) H5PL_path_table_g[index] = (char *)H5MM_xfree(H5PL_path_table_g[index]); H5PL_path_table_g[index] = dl_path; - dl_path = NULL; done: - if(dl_path) - dl_path = (char *)H5MM_xfree(dl_path); - FUNC_LEAVE_API(ret_value) } /* end H5PLreplace() */ @@ -544,8 +530,7 @@ H5PLinsert(const char* plugin_path, unsigned int index) HGOTO_ERROR(H5E_PLUGIN, H5E_NOSPACE, FAIL, "too many directories in path for table") if(NULL == plugin_path) HGOTO_ERROR(H5E_PLUGIN, H5E_CANTALLOC, FAIL, "no path provided") - dl_path = H5MM_strdup(plugin_path); - if(NULL == dl_path) + if(NULL == (dl_path = H5MM_strdup(plugin_path))) HGOTO_ERROR(H5E_PLUGIN, H5E_CANTALLOC, FAIL, "can't allocate memory for path") H5PL_EXPAND_ENV_VAR @@ -553,13 +538,9 @@ H5PLinsert(const char* plugin_path, unsigned int index) for(plindex = (unsigned int)H5PL_num_paths_g; plindex > index; plindex--) H5PL_path_table_g[plindex] = H5PL_path_table_g[plindex - 1]; H5PL_path_table_g[index] = dl_path; - dl_path = NULL; H5PL_num_paths_g++; done: - if(dl_path) - dl_path = (char *)H5MM_xfree(dl_path); - FUNC_LEAVE_API(ret_value) } /* end H5PLinsert() */ @@ -602,20 +583,40 @@ done: * * Purpose: Query the plugin path at the specified index. * - * Return: Non-NULL on success/NULL on failure + * Return: Success: The length of path. + * + * If `pathname' is non-NULL then write up to `size' bytes into that + * buffer and always return the length of the pathname. + * Otherwise `size' is ignored and the function does not store the pathname, + * just returning the number of characters required to store the pathname. + * If an error occurs then the buffer pointed to by `pathname' (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 pathname + * associated with the index. * *------------------------------------------------------------------------- */ -const char* -H5PLget(unsigned int index) +ssize_t +H5PLget(unsigned int index, char *pathname/*out*/, size_t size) { - char* ret_value = NULL; /* Return value */ + ssize_t ret_value = FAIL; /* Return value */ + ssize_t len = 0; /* Length of pathname */ + char *dl_path = NULL; - FUNC_ENTER_API(NULL) + FUNC_ENTER_API(FAIL) if(H5PL_num_paths_g == 0) - HGOTO_ERROR(H5E_PLUGIN, H5E_NOSPACE, NULL, "no directories in table") - if(NULL == (ret_value = H5PL_path_table_g[index])) - HGOTO_ERROR(H5E_PLUGIN, H5E_CANTALLOC, NULL, "no directory path at index") + HGOTO_ERROR(H5E_PLUGIN, H5E_NOSPACE, FAIL, "no directories in table") + if(NULL == (dl_path = H5PL_path_table_g[index])) + HGOTO_ERROR(H5E_PLUGIN, H5E_CANTALLOC, FAIL, "no directory path at index") + len = HDstrlen(dl_path); + if(pathname) { + HDstrncpy(pathname, dl_path, MIN((size_t)(len + 1), size)); + if((size_t)len >= size) + pathname[size - 1] = '\0'; + } /* end if */ + + /* Set return value */ + ret_value = len; done: FUNC_LEAVE_API(ret_value) diff --git a/src/H5PLpublic.h b/src/H5PLpublic.h index ca46542..5e4dcae 100644 --- a/src/H5PLpublic.h +++ b/src/H5PLpublic.h @@ -49,7 +49,7 @@ H5_DLL herr_t H5PLprepend(const char* plugin_path); H5_DLL herr_t H5PLreplace(const char* plugin_path, unsigned int index); H5_DLL herr_t H5PLinsert(const char* plugin_path, unsigned int index); H5_DLL herr_t H5PLremove(unsigned int index); -H5_DLL const char* H5PLget(unsigned int index); +H5_DLL ssize_t H5PLget(unsigned int index, char *pathname/*out*/, size_t size); H5_DLL unsigned int H5PLsize(void); #ifdef __cplusplus diff --git a/test/plugin.c b/test/plugin.c index 359bbdd..19a0ebd 100644 --- a/test/plugin.c +++ b/test/plugin.c @@ -744,6 +744,7 @@ test_filter_path_apis(void) int i; unsigned int ndx; herr_t ret; + int pathlen = -1; char pathname[256]; HDputs("Testing access to the filter path table"); @@ -801,18 +802,37 @@ test_filter_path_apis(void) TEST_ERROR PASSED(); - TESTING(" get (bounds)"); - HDsprintf(pathname, "%s", H5PLget(0)); + TESTING(" get (path name)"); + if ((pathlen = H5PLget(0, NULL, 0)) <= 0) { + HDfprintf(stderr," get path 0 length failed\n"); + TEST_ERROR + } + HDfprintf(stdout," get path 0 length %d\n", pathlen); + if (pathlen != 8) { + TEST_ERROR + } + if ((pathlen = H5PLget(0, pathname, 256)) <= 0) { + HDfprintf(stderr," get 0 len: %d : %s\n", pathlen, pathname); + TEST_ERROR + } + HDfprintf(stdout," get path 0 length %d\n", pathlen); if (strcmp(pathname, "a_path_0") != 0) { HDfprintf(stderr," get 0: %s\n", pathname); TEST_ERROR } - HDsprintf(pathname, "%s", H5PLget(1)); + PASSED(); + + TESTING(" get (bounds)"); + if ((pathlen = H5PLget(1, pathname, 256)) <= 0) + TEST_ERROR + HDfprintf(stdout," get path 1 length %d\n", pathlen); if (strcmp(pathname, "a_path_1") != 0) { HDfprintf(stderr," get 1: %s\n", pathname); TEST_ERROR } - HDsprintf(pathname, "%s", H5PLget(15)); + if ((pathlen = H5PLget(15, pathname, 256)) <= 0) + TEST_ERROR + HDfprintf(stdout," get path 15 length %d\n", pathlen); if (strcmp(pathname, "a_path_15") != 0) { HDfprintf(stderr," get 15: %s\n", pathname); TEST_ERROR @@ -820,16 +840,19 @@ test_filter_path_apis(void) PASSED(); TESTING(" get (bounds exceed)"); - if (H5PLget(16) != NULL) + if ((pathlen = H5PLget(16, NULL, 0)) > 0) TEST_ERROR PASSED(); + HDfprintf(stdout," get path 16 length %d\n", pathlen); TESTING(" remove (verify for prepend)"); /* Remove one path*/ if (H5PLremove(8) < 0) TEST_ERROR /* Verify that the entries were moved */ - HDsprintf(pathname, "%s", H5PLget(8)); + if ((pathlen = H5PLget(8, pathname, 256)) <= 0) + TEST_ERROR + HDfprintf(stdout," get path 8 length %d\n", pathlen); if (strcmp(pathname, "a_path_9") != 0) { HDfprintf(stderr," get 8: %s\n", pathname); TEST_ERROR @@ -851,12 +874,14 @@ test_filter_path_apis(void) if (H5PLsize() != 16) TEST_ERROR /* Verify that the entries were moved */ - HDsprintf(pathname, "%s", H5PLget(8)); + if (H5PLget(8, pathname, 256) <= 0) + TEST_ERROR if (strcmp(pathname, "a_path_7") != 0) { HDfprintf(stderr," get 8: %s\n", pathname); TEST_ERROR } - HDsprintf(pathname, "%s", H5PLget(0)); + if (H5PLget(0, pathname, 256) <= 0) + TEST_ERROR if (strcmp(pathname, "a_path_17") != 0) { HDfprintf(stderr," get 0: %s\n", pathname); TEST_ERROR @@ -885,12 +910,14 @@ test_filter_path_apis(void) if (H5PLsize() != 16) TEST_ERROR /* Verify that the entries were not moved */ - HDsprintf(pathname, "%s", H5PLget(0)); + if (H5PLget(0, pathname, 256) <= 0) + TEST_ERROR if (strcmp(pathname, "a_path_17") != 0) { HDfprintf(stderr," get 0: %s\n", pathname); TEST_ERROR } - HDsprintf(pathname, "%s", H5PLget(2)); + if (H5PLget(2, pathname, 256) <= 0) + TEST_ERROR if (strcmp(pathname, "a_path_1") != 0) { HDfprintf(stderr," get 2: %s\n", pathname); TEST_ERROR @@ -902,7 +929,8 @@ test_filter_path_apis(void) if (H5PLremove(4) < 0) TEST_ERROR /* Verify that the entries were moved */ - HDsprintf(pathname, "%s", H5PLget(4)); + if (H5PLget(4, pathname, 256) <= 0) + TEST_ERROR if (strcmp(pathname, "a_path_4") != 0) { HDfprintf(stderr," get 4: %s\n", pathname); TEST_ERROR @@ -921,7 +949,8 @@ test_filter_path_apis(void) } /* Verify that the entries were moved */ - HDsprintf(pathname, "%s", H5PLget(4)); + if (H5PLget(4, pathname, 256) <= 0) + TEST_ERROR if (strcmp(pathname, "a_path_2") != 0){ HDfprintf(stderr," get 4: %s\n", pathname); TEST_ERROR -- cgit v0.12 From e245544ef220ab8b1e6a63beeaa56ffacd20a895 Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Thu, 30 Mar 2017 14:47:38 -0500 Subject: HDFFV-10143 remove debugging output --- test/plugin.c | 6 ------ 1 file changed, 6 deletions(-) diff --git a/test/plugin.c b/test/plugin.c index 19a0ebd..0fca40f 100644 --- a/test/plugin.c +++ b/test/plugin.c @@ -807,7 +807,6 @@ test_filter_path_apis(void) HDfprintf(stderr," get path 0 length failed\n"); TEST_ERROR } - HDfprintf(stdout," get path 0 length %d\n", pathlen); if (pathlen != 8) { TEST_ERROR } @@ -815,7 +814,6 @@ test_filter_path_apis(void) HDfprintf(stderr," get 0 len: %d : %s\n", pathlen, pathname); TEST_ERROR } - HDfprintf(stdout," get path 0 length %d\n", pathlen); if (strcmp(pathname, "a_path_0") != 0) { HDfprintf(stderr," get 0: %s\n", pathname); TEST_ERROR @@ -825,14 +823,12 @@ test_filter_path_apis(void) TESTING(" get (bounds)"); if ((pathlen = H5PLget(1, pathname, 256)) <= 0) TEST_ERROR - HDfprintf(stdout," get path 1 length %d\n", pathlen); if (strcmp(pathname, "a_path_1") != 0) { HDfprintf(stderr," get 1: %s\n", pathname); TEST_ERROR } if ((pathlen = H5PLget(15, pathname, 256)) <= 0) TEST_ERROR - HDfprintf(stdout," get path 15 length %d\n", pathlen); if (strcmp(pathname, "a_path_15") != 0) { HDfprintf(stderr," get 15: %s\n", pathname); TEST_ERROR @@ -843,7 +839,6 @@ test_filter_path_apis(void) if ((pathlen = H5PLget(16, NULL, 0)) > 0) TEST_ERROR PASSED(); - HDfprintf(stdout," get path 16 length %d\n", pathlen); TESTING(" remove (verify for prepend)"); /* Remove one path*/ @@ -852,7 +847,6 @@ test_filter_path_apis(void) /* Verify that the entries were moved */ if ((pathlen = H5PLget(8, pathname, 256)) <= 0) TEST_ERROR - HDfprintf(stdout," get path 8 length %d\n", pathlen); if (strcmp(pathname, "a_path_9") != 0) { HDfprintf(stderr," get 8: %s\n", pathname); TEST_ERROR -- cgit v0.12 From 33ad855c6b340064256bd1faf6a6db1ee3860f59 Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Thu, 30 Mar 2017 15:03:31 -0500 Subject: HDFFV-10143 Cleanup due to comments --- src/H5PL.c | 6 ++---- src/H5PLpkg.h | 4 ++-- test/plugin.c | 14 +++++++------- 3 files changed, 11 insertions(+), 13 deletions(-) diff --git a/src/H5PL.c b/src/H5PL.c index 0957629..78ccd88 100644 --- a/src/H5PL.c +++ b/src/H5PL.c @@ -558,18 +558,16 @@ herr_t H5PLremove(unsigned int index) { herr_t ret_value = SUCCEED; /* Return value */ - char *dl_path = NULL; unsigned int plindex; FUNC_ENTER_API(FAIL) if(H5PL_num_paths_g == 0) HGOTO_ERROR(H5E_PLUGIN, H5E_NOSPACE, FAIL, "no directories in table") - if(NULL == (dl_path = H5PL_path_table_g[index])) + if(NULL == H5PL_path_table_g[index]) HGOTO_ERROR(H5E_PLUGIN, H5E_CANTALLOC, FAIL, "no directory path at index") + H5PL_path_table_g[plindex] = (char *)H5MM_xfree(H5PL_path_table_g[plindex]); for(plindex = index; plindex < (unsigned int)H5PL_num_paths_g; plindex++) H5PL_path_table_g[plindex] = H5PL_path_table_g[plindex + 1]; - if(H5PL_path_table_g[plindex]) - dl_path = (char *)H5MM_xfree(dl_path); H5PL_num_paths_g--; H5PL_path_table_g[H5PL_num_paths_g] = NULL; diff --git a/src/H5PLpkg.h b/src/H5PLpkg.h index 2761a33..5cf3096 100644 --- a/src/H5PLpkg.h +++ b/src/H5PLpkg.h @@ -29,13 +29,13 @@ /* Package Private Macros */ /**************************/ +#define H5PL_MAX_PATH_NUM 16 + /****************************/ /* Package Private Typedefs */ /****************************/ -#define H5PL_MAX_PATH_NUM 16 - /*****************************/ /* Package Private Variables */ diff --git a/test/plugin.c b/test/plugin.c index 0fca40f..3c1a71a 100644 --- a/test/plugin.c +++ b/test/plugin.c @@ -774,7 +774,7 @@ test_filter_path_apis(void) TESTING(" append"); /* Create multiple paths to fill table */ - for (i=0; i < 16; i++) { + for (i=0; i < H5PL_MAX_PATH_NUM; i++) { HDsprintf(pathname, "a_path_%d", i); if (H5PLappend(pathname) < 0) { HDfprintf(stderr," at %d: %s\n", i, pathname); @@ -782,7 +782,7 @@ test_filter_path_apis(void) } } /* Verify the table is full */ - if (H5PLsize() != 16) TEST_ERROR + if (H5PLsize() != H5PL_MAX_PATH_NUM) TEST_ERROR PASSED(); TESTING(" append (exceed)"); @@ -796,7 +796,7 @@ test_filter_path_apis(void) /* Exceed the max path removal */ H5E_BEGIN_TRY { - ret = H5PLremove(16); + ret = H5PLremove(H5PL_MAX_PATH_NUM); } H5E_END_TRY if (ret >= 0) TEST_ERROR @@ -836,7 +836,7 @@ test_filter_path_apis(void) PASSED(); TESTING(" get (bounds exceed)"); - if ((pathlen = H5PLget(16, NULL, 0)) > 0) + if ((pathlen = H5PLget(H5PL_MAX_PATH_NUM, NULL, 0)) > 0) TEST_ERROR PASSED(); @@ -865,7 +865,7 @@ test_filter_path_apis(void) } /* Verify the table is full */ - if (H5PLsize() != 16) TEST_ERROR + if (H5PLsize() != H5PL_MAX_PATH_NUM) TEST_ERROR /* Verify that the entries were moved */ if (H5PLget(8, pathname, 256) <= 0) @@ -901,7 +901,7 @@ test_filter_path_apis(void) } /* Verify the table is full */ - if (H5PLsize() != 16) TEST_ERROR + if (H5PLsize() != H5PL_MAX_PATH_NUM) TEST_ERROR /* Verify that the entries were not moved */ if (H5PLget(0, pathname, 256) <= 0) @@ -952,7 +952,7 @@ test_filter_path_apis(void) PASSED(); /* Verify the table is full */ - if (H5PLsize() != 16) TEST_ERROR + if (H5PLsize() != H5PL_MAX_PATH_NUM) TEST_ERROR TESTING(" insert (exceed)"); /* Exceed the max path insert */ -- cgit v0.12 From 0f9e09a65da283134e3a33c309882b636d07397a Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Thu, 30 Mar 2017 16:48:10 -0500 Subject: Fix code error and use H5PL_MAX_PATH_NUM in test --- src/H5PL.c | 3 +-- test/plugin.c | 30 +++++++++++++++++------------- 2 files changed, 18 insertions(+), 15 deletions(-) diff --git a/src/H5PL.c b/src/H5PL.c index 78ccd88..b5a55f5 100644 --- a/src/H5PL.c +++ b/src/H5PL.c @@ -427,7 +427,6 @@ H5PLappend(const char* plugin_path) HGOTO_ERROR(H5E_PLUGIN, H5E_NOSPACE, FAIL, "too many directories in path for table") if(NULL == plugin_path) HGOTO_ERROR(H5E_PLUGIN, H5E_CANTALLOC, FAIL, "no path provided") - dl_path = H5MM_strdup(plugin_path); if(NULL == (dl_path = H5MM_strdup(plugin_path))) HGOTO_ERROR(H5E_PLUGIN, H5E_CANTALLOC, FAIL, "can't allocate memory for path") @@ -597,7 +596,7 @@ done: ssize_t H5PLget(unsigned int index, char *pathname/*out*/, size_t size) { - ssize_t ret_value = FAIL; /* Return value */ + ssize_t ret_value = 0; /* Return value */ ssize_t len = 0; /* Length of pathname */ char *dl_path = NULL; diff --git a/test/plugin.c b/test/plugin.c index 3c1a71a..19a1e42 100644 --- a/test/plugin.c +++ b/test/plugin.c @@ -746,6 +746,7 @@ test_filter_path_apis(void) herr_t ret; int pathlen = -1; char pathname[256]; + char tempname[256]; HDputs("Testing access to the filter path table"); @@ -788,7 +789,7 @@ test_filter_path_apis(void) TESTING(" append (exceed)"); /* Exceed the max path append */ H5E_BEGIN_TRY { - HDsprintf(pathname, "a_path_%d", 16); + HDsprintf(pathname, "a_path_%d", H5PL_MAX_PATH_NUM); ret = H5PLappend(pathname); } H5E_END_TRY if (ret >= 0) @@ -827,10 +828,11 @@ test_filter_path_apis(void) HDfprintf(stderr," get 1: %s\n", pathname); TEST_ERROR } - if ((pathlen = H5PLget(15, pathname, 256)) <= 0) + if ((pathlen = H5PLget(H5PL_MAX_PATH_NUM - 1, pathname, 256)) <= 0) TEST_ERROR - if (strcmp(pathname, "a_path_15") != 0) { - HDfprintf(stderr," get 15: %s\n", pathname); + HDsprintf(tempname, "a_path_%d", H5PL_MAX_PATH_NUM - 1); + if (strcmp(pathname, tempname") != 0) { + HDfprintf(stderr," get %d: %s\n", H5PL_MAX_PATH_NUM - 1, pathname); TEST_ERROR } PASSED(); @@ -854,13 +856,13 @@ test_filter_path_apis(void) PASSED(); /* Verify the table is not full */ - if (H5PLsize() != 15) TEST_ERROR + if (H5PLsize() != H5PL_MAX_PATH_NUM - 1) TEST_ERROR TESTING(" prepend"); /* Prepend one path*/ - HDsprintf(pathname, "a_path_%d", 17); + HDsprintf(pathname, "a_path_%d", H5PL_MAX_PATH_NUM + 1); if (H5PLprepend(pathname) < 0) { - HDfprintf(stderr," prepend 17: %s\n", pathname); + HDfprintf(stderr," prepend %d: %s\n", H5PL_MAX_PATH_NUM + 1, pathname); TEST_ERROR } @@ -876,7 +878,8 @@ test_filter_path_apis(void) } if (H5PLget(0, pathname, 256) <= 0) TEST_ERROR - if (strcmp(pathname, "a_path_17") != 0) { + HDsprintf(tempname, "a_path_%d", H5PL_MAX_PATH_NUM + 1); + if (strcmp(pathname, tempname") != 0) { HDfprintf(stderr," get 0: %s\n", pathname); TEST_ERROR } @@ -885,7 +888,7 @@ test_filter_path_apis(void) TESTING(" prepend (exceed)"); /* Exceed the max path prepend */ H5E_BEGIN_TRY { - HDsprintf(pathname, "a_path_%d", 18); + HDsprintf(pathname, "a_path_%d", H5PL_MAX_PATH_NUM + 2); ret = H5PLprepend(pathname); } H5E_END_TRY if (ret >= 0) @@ -894,7 +897,7 @@ test_filter_path_apis(void) TESTING(" replace"); /* Replace one path*/ - HDsprintf(pathname, "a_path_%d", 20); + HDsprintf(pathname, "a_path_%d", H5PL_MAX_PATH_NUM + 4); if (H5PLreplace(pathname, 1) < 0) { HDfprintf(stderr," replace 1: %s\n", pathname); TEST_ERROR @@ -906,7 +909,8 @@ test_filter_path_apis(void) /* Verify that the entries were not moved */ if (H5PLget(0, pathname, 256) <= 0) TEST_ERROR - if (strcmp(pathname, "a_path_17") != 0) { + HDsprintf(tempname, "a_path_%d", H5PL_MAX_PATH_NUM + 1); + if (strcmp(pathname, tempname") != 0) { HDfprintf(stderr," get 0: %s\n", pathname); TEST_ERROR } @@ -936,7 +940,7 @@ test_filter_path_apis(void) TESTING(" insert"); /* Insert one path*/ - HDsprintf(pathname, "a_path_%d", 21); + HDsprintf(pathname, "a_path_%d", H5PL_MAX_PATH_NUM + 5); if (H5PLinsert(pathname, 3) < 0){ HDfprintf(stderr," insert 3: %s\n", pathname); TEST_ERROR @@ -957,7 +961,7 @@ test_filter_path_apis(void) TESTING(" insert (exceed)"); /* Exceed the max path insert */ H5E_BEGIN_TRY { - HDsprintf(pathname, "a_path_%d", 22); + HDsprintf(pathname, "a_path_%d", H5PL_MAX_PATH_NUM + 6); ret = H5PLinsert(pathname, 12); } H5E_END_TRY if (ret >= 0) -- cgit v0.12 From fb6acd82a01c196e0962bd4bdddfd44dcff8d977 Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Thu, 30 Mar 2017 16:55:33 -0500 Subject: HDFFV-10143 typo removed --- test/plugin.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/plugin.c b/test/plugin.c index 19a1e42..5dfdcc8 100644 --- a/test/plugin.c +++ b/test/plugin.c @@ -831,7 +831,7 @@ test_filter_path_apis(void) if ((pathlen = H5PLget(H5PL_MAX_PATH_NUM - 1, pathname, 256)) <= 0) TEST_ERROR HDsprintf(tempname, "a_path_%d", H5PL_MAX_PATH_NUM - 1); - if (strcmp(pathname, tempname") != 0) { + if (strcmp(pathname, tempname) != 0) { HDfprintf(stderr," get %d: %s\n", H5PL_MAX_PATH_NUM - 1, pathname); TEST_ERROR } -- cgit v0.12 From 037e7a4a72e53f3c08c28d65bb8dc12287548e0c Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Thu, 30 Mar 2017 17:03:08 -0500 Subject: HDFFV-10143 typo cleanup --- test/plugin.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/test/plugin.c b/test/plugin.c index 5dfdcc8..b7ca52b 100644 --- a/test/plugin.c +++ b/test/plugin.c @@ -741,10 +741,10 @@ error: static herr_t test_filter_path_apis(void) { - int i; + unsigned int i; unsigned int ndx; herr_t ret; - int pathlen = -1; + ssize_t pathlen = -1; char pathname[256]; char tempname[256]; @@ -879,7 +879,7 @@ test_filter_path_apis(void) if (H5PLget(0, pathname, 256) <= 0) TEST_ERROR HDsprintf(tempname, "a_path_%d", H5PL_MAX_PATH_NUM + 1); - if (strcmp(pathname, tempname") != 0) { + if (strcmp(pathname, tempname) != 0) { HDfprintf(stderr," get 0: %s\n", pathname); TEST_ERROR } @@ -910,7 +910,7 @@ test_filter_path_apis(void) if (H5PLget(0, pathname, 256) <= 0) TEST_ERROR HDsprintf(tempname, "a_path_%d", H5PL_MAX_PATH_NUM + 1); - if (strcmp(pathname, tempname") != 0) { + if (strcmp(pathname, tempname) != 0) { HDfprintf(stderr," get 0: %s\n", pathname); TEST_ERROR } -- cgit v0.12 From f1e64c512ab785f10184c0f03c448c30bc9ca445 Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Thu, 30 Mar 2017 17:11:50 -0500 Subject: HDFFV-10143 surround will fail with try block --- test/plugin.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/test/plugin.c b/test/plugin.c index b7ca52b..fca8916 100644 --- a/test/plugin.c +++ b/test/plugin.c @@ -838,7 +838,10 @@ test_filter_path_apis(void) PASSED(); TESTING(" get (bounds exceed)"); - if ((pathlen = H5PLget(H5PL_MAX_PATH_NUM, NULL, 0)) > 0) + H5E_BEGIN_TRY { + pathlen = H5PLget(H5PL_MAX_PATH_NUM, NULL, 0); + } H5E_END_TRY + if (pathlen > 0) TEST_ERROR PASSED(); -- cgit v0.12 From c99679337ac234f70bc6d44e3ccba9455bf794b4 Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Thu, 30 Mar 2017 17:40:44 -0500 Subject: HDFFV-10143 fix use before set --- src/H5PL.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/H5PL.c b/src/H5PL.c index b5a55f5..fe7b26b 100644 --- a/src/H5PL.c +++ b/src/H5PL.c @@ -564,7 +564,7 @@ H5PLremove(unsigned int index) HGOTO_ERROR(H5E_PLUGIN, H5E_NOSPACE, FAIL, "no directories in table") if(NULL == H5PL_path_table_g[index]) HGOTO_ERROR(H5E_PLUGIN, H5E_CANTALLOC, FAIL, "no directory path at index") - H5PL_path_table_g[plindex] = (char *)H5MM_xfree(H5PL_path_table_g[plindex]); + H5PL_path_table_g[index] = (char *)H5MM_xfree(H5PL_path_table_g[index]); for(plindex = index; plindex < (unsigned int)H5PL_num_paths_g; plindex++) H5PL_path_table_g[plindex] = H5PL_path_table_g[plindex + 1]; H5PL_num_paths_g--; -- cgit v0.12 From 194f604ad04ec976a1d761090aa892f9f28514c3 Mon Sep 17 00:00:00 2001 From: lrknox Date: Fri, 31 Mar 2017 12:17:50 -0500 Subject: Small corrections to DOPYING file. --- COPYING | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/COPYING b/COPYING index 51cb4e6..90aa75a 100644 --- a/COPYING +++ b/COPYING @@ -49,7 +49,7 @@ advised of the possibility of such damage. Limited portions of HDF5 were developed by Lawrence Berkeley National Laboratory (LBNL). LBNL's Copyright Notice and Licensing Terms can be found here: COPYING_LBNL_HDF5 file in this directory or at -http://support.hdfgroup.org/ftp/HDF5/releases/COPYING_LBNL_HDF5. +https://support.hdfgroup.org/ftp/HDF5/releases/COPYING_LBNL_HDF5. ----------------------------------------------------------------------------- ----------------------------------------------------------------------------- @@ -99,7 +99,7 @@ and/or accompanying materials: HDF5 is available with the SZIP compression library but SZIP is not part of HDF5 and has separate copyright and license terms. See “Szip Compression -in HDF Products” (www.hdfgroup.org/doc_resource/SZIP/) for further details. +in HDF Products” (https://support.hdfgroup.org/doc_resource/SZIP/) for further details. ----------------------------------------------------------------------------- -- cgit v0.12 From 399060c17a0c6c7703ce83f92c1b9c69a146f99c Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Mon, 3 Apr 2017 12:34:17 -0500 Subject: Update with checks for index bounds --- src/H5PL.c | 11 ++++++++++- test/plugin.c | 25 ++++++++++++++----------- 2 files changed, 24 insertions(+), 12 deletions(-) diff --git a/src/H5PL.c b/src/H5PL.c index fe7b26b..bfa3ace 100644 --- a/src/H5PL.c +++ b/src/H5PL.c @@ -494,6 +494,8 @@ H5PLreplace(const char* plugin_path, unsigned int index) FUNC_ENTER_API(FAIL) if(NULL == plugin_path) HGOTO_ERROR(H5E_PLUGIN, H5E_CANTALLOC, FAIL, "no path provided") + if(index >= H5PL_MAX_PATH_NUM) + HGOTO_ERROR(H5E_PLUGIN, H5E_NOSPACE, FAIL, "index path out of bounds for table") if(NULL == (dl_path = H5MM_strdup(plugin_path))) HGOTO_ERROR(H5E_PLUGIN, H5E_CANTALLOC, FAIL, "can't allocate memory for path") @@ -529,6 +531,8 @@ H5PLinsert(const char* plugin_path, unsigned int index) HGOTO_ERROR(H5E_PLUGIN, H5E_NOSPACE, FAIL, "too many directories in path for table") if(NULL == plugin_path) HGOTO_ERROR(H5E_PLUGIN, H5E_CANTALLOC, FAIL, "no path provided") + if(index >= H5PL_MAX_PATH_NUM) + HGOTO_ERROR(H5E_PLUGIN, H5E_NOSPACE, FAIL, "index path out of bounds for table") if(NULL == (dl_path = H5MM_strdup(plugin_path))) HGOTO_ERROR(H5E_PLUGIN, H5E_CANTALLOC, FAIL, "can't allocate memory for path") @@ -562,12 +566,15 @@ H5PLremove(unsigned int index) FUNC_ENTER_API(FAIL) if(H5PL_num_paths_g == 0) HGOTO_ERROR(H5E_PLUGIN, H5E_NOSPACE, FAIL, "no directories in table") + if(index >= H5PL_MAX_PATH_NUM) + HGOTO_ERROR(H5E_PLUGIN, H5E_NOSPACE, FAIL, "index path out of bounds for table") if(NULL == H5PL_path_table_g[index]) HGOTO_ERROR(H5E_PLUGIN, H5E_CANTALLOC, FAIL, "no directory path at index") H5PL_path_table_g[index] = (char *)H5MM_xfree(H5PL_path_table_g[index]); + + H5PL_num_paths_g--; for(plindex = index; plindex < (unsigned int)H5PL_num_paths_g; plindex++) H5PL_path_table_g[plindex] = H5PL_path_table_g[plindex + 1]; - H5PL_num_paths_g--; H5PL_path_table_g[H5PL_num_paths_g] = NULL; done: @@ -603,6 +610,8 @@ H5PLget(unsigned int index, char *pathname/*out*/, size_t size) FUNC_ENTER_API(FAIL) if(H5PL_num_paths_g == 0) HGOTO_ERROR(H5E_PLUGIN, H5E_NOSPACE, FAIL, "no directories in table") + if(index >= H5PL_MAX_PATH_NUM) + HGOTO_ERROR(H5E_PLUGIN, H5E_NOSPACE, FAIL, "index path out of bounds for table") if(NULL == (dl_path = H5PL_path_table_g[index])) HGOTO_ERROR(H5E_PLUGIN, H5E_CANTALLOC, FAIL, "no directory path at index") len = HDstrlen(dl_path); diff --git a/test/plugin.c b/test/plugin.c index fca8916..6c14062 100644 --- a/test/plugin.c +++ b/test/plugin.c @@ -750,6 +750,8 @@ test_filter_path_apis(void) HDputs("Testing access to the filter path table"); + if(H5Zfilter_avail(H5Z_FILTER_DYNLIB1) != TRUE) TEST_ERROR + ndx = H5PLsize(); TESTING(" remove"); @@ -764,7 +766,7 @@ test_filter_path_apis(void) if (H5PLsize() > 0) TEST_ERROR PASSED(); - TESTING(" remove (exceed)"); + TESTING(" remove (exceed min)"); /* Exceed the min path removal */ H5E_BEGIN_TRY { ret = H5PLremove(0); @@ -795,6 +797,7 @@ test_filter_path_apis(void) if (ret >= 0) TEST_ERROR + TESTING(" remove (exceed max)"); /* Exceed the max path removal */ H5E_BEGIN_TRY { ret = H5PLremove(H5PL_MAX_PATH_NUM); @@ -815,7 +818,7 @@ test_filter_path_apis(void) HDfprintf(stderr," get 0 len: %d : %s\n", pathlen, pathname); TEST_ERROR } - if (strcmp(pathname, "a_path_0") != 0) { + if (HDstrcmp(pathname, "a_path_0") != 0) { HDfprintf(stderr," get 0: %s\n", pathname); TEST_ERROR } @@ -824,14 +827,14 @@ test_filter_path_apis(void) TESTING(" get (bounds)"); if ((pathlen = H5PLget(1, pathname, 256)) <= 0) TEST_ERROR - if (strcmp(pathname, "a_path_1") != 0) { + if (HDstrcmp(pathname, "a_path_1") != 0) { HDfprintf(stderr," get 1: %s\n", pathname); TEST_ERROR } if ((pathlen = H5PLget(H5PL_MAX_PATH_NUM - 1, pathname, 256)) <= 0) TEST_ERROR HDsprintf(tempname, "a_path_%d", H5PL_MAX_PATH_NUM - 1); - if (strcmp(pathname, tempname) != 0) { + if (HDstrcmp(pathname, tempname) != 0) { HDfprintf(stderr," get %d: %s\n", H5PL_MAX_PATH_NUM - 1, pathname); TEST_ERROR } @@ -852,7 +855,7 @@ test_filter_path_apis(void) /* Verify that the entries were moved */ if ((pathlen = H5PLget(8, pathname, 256)) <= 0) TEST_ERROR - if (strcmp(pathname, "a_path_9") != 0) { + if (HDstrcmp(pathname, "a_path_9") != 0) { HDfprintf(stderr," get 8: %s\n", pathname); TEST_ERROR } @@ -875,14 +878,14 @@ test_filter_path_apis(void) /* Verify that the entries were moved */ if (H5PLget(8, pathname, 256) <= 0) TEST_ERROR - if (strcmp(pathname, "a_path_7") != 0) { + if (HDstrcmp(pathname, "a_path_7") != 0) { HDfprintf(stderr," get 8: %s\n", pathname); TEST_ERROR } if (H5PLget(0, pathname, 256) <= 0) TEST_ERROR HDsprintf(tempname, "a_path_%d", H5PL_MAX_PATH_NUM + 1); - if (strcmp(pathname, tempname) != 0) { + if (HDstrcmp(pathname, tempname) != 0) { HDfprintf(stderr," get 0: %s\n", pathname); TEST_ERROR } @@ -913,13 +916,13 @@ test_filter_path_apis(void) if (H5PLget(0, pathname, 256) <= 0) TEST_ERROR HDsprintf(tempname, "a_path_%d", H5PL_MAX_PATH_NUM + 1); - if (strcmp(pathname, tempname) != 0) { + if (HDstrcmp(pathname, tempname) != 0) { HDfprintf(stderr," get 0: %s\n", pathname); TEST_ERROR } if (H5PLget(2, pathname, 256) <= 0) TEST_ERROR - if (strcmp(pathname, "a_path_1") != 0) { + if (HDstrcmp(pathname, "a_path_1") != 0) { HDfprintf(stderr," get 2: %s\n", pathname); TEST_ERROR } @@ -932,7 +935,7 @@ test_filter_path_apis(void) /* Verify that the entries were moved */ if (H5PLget(4, pathname, 256) <= 0) TEST_ERROR - if (strcmp(pathname, "a_path_4") != 0) { + if (HDstrcmp(pathname, "a_path_4") != 0) { HDfprintf(stderr," get 4: %s\n", pathname); TEST_ERROR } @@ -952,7 +955,7 @@ test_filter_path_apis(void) /* Verify that the entries were moved */ if (H5PLget(4, pathname, 256) <= 0) TEST_ERROR - if (strcmp(pathname, "a_path_2") != 0){ + if (HDstrcmp(pathname, "a_path_2") != 0){ HDfprintf(stderr," get 4: %s\n", pathname); TEST_ERROR } -- cgit v0.12 From f9199536d04d731da523d5b335e5d376381a03ca Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Mon, 3 Apr 2017 14:06:47 -0500 Subject: HDFFV-10143 Add plugin APIs to Java interface --- java/src/hdf/hdf5lib/H5.java | 72 +++++++++++++++++++ java/src/jni/h5plImp.c | 161 ++++++++++++++++++++++++++++++++++++++++++ java/src/jni/h5plImp.h | 63 +++++++++++++++++ java/test/JUnit-interface.txt | 3 +- java/test/TestH5PL.java | 30 ++++++++ 5 files changed, 328 insertions(+), 1 deletion(-) diff --git a/java/src/hdf/hdf5lib/H5.java b/java/src/hdf/hdf5lib/H5.java index 996feeb..3c9227f 100644 --- a/java/src/hdf/hdf5lib/H5.java +++ b/java/src/hdf/hdf5lib/H5.java @@ -7202,6 +7202,78 @@ public class H5 implements java.io.Serializable { **/ public synchronized static native int H5PLget_loading_state() throws HDF5LibraryException; + /** + * H5PLappend inserts the plugin path at the end of the table. + * + * @param plugin_path + * IN: Path for location of filter plugin libraries. + * + * @exception HDF5LibraryException + * - Error from the HDF-5 Library. + **/ + public synchronized static native void H5PLappend(String plugin_path) throws HDF5LibraryException; + + /** + * H5PLprepend inserts the plugin path at the beginning of the table. + * + * @param plugin_path + * IN: Path for location of filter plugin libraries. + * + * @exception HDF5LibraryException + * - Error from the HDF-5 Library. + **/ + public synchronized static native void H5PLprepend(String plugin_path) throws HDF5LibraryException; + + /** + * H5PLreplace replaces the plugin path at the specified index. + * + * @param plugin_path + * IN: Path for location of filter plugin libraries. + * + * @exception HDF5LibraryException + * - Error from the HDF-5 Library. + **/ + public synchronized static native void H5PLreplace(String plugin_path, int index) throws HDF5LibraryException; + + /** + * H5PLinsert inserts the plugin path at the specified index. + * + * @param plugin_path + * IN: Path for location of filter plugin libraries. + * + * @exception HDF5LibraryException + * - Error from the HDF-5 Library. + **/ + public synchronized static native void H5PLinsert(String plugin_path, int index) throws HDF5LibraryException; + + /** + * H5PLremove removes the plugin path at the specified index. + * + * @exception HDF5LibraryException + * - Error from the HDF-5 Library. + **/ + public synchronized static native void H5PLremove(int index) throws HDF5LibraryException; + + /** + * H5PLget retrieves the plugin path at the specified index. + * + * @return the current path at the index in plugin path table + * + * @exception HDF5LibraryException + * - Error from the HDF-5 Library. + **/ + public synchronized static native String H5PLget(int index) throws HDF5LibraryException; + + /** + * H5PLsize retrieves the size of the current list of plugin paths. + * + * @return the current number of paths in the plugin path table + * + * @exception HDF5LibraryException + * - Error from the HDF-5 Library. + **/ + public synchronized static native int H5PLsize() throws HDF5LibraryException; + // //////////////////////////////////////////////////////////// // // // H5R: HDF5 1.8 Reference API Functions // diff --git a/java/src/jni/h5plImp.c b/java/src/jni/h5plImp.c index 59de3cf..34d6f8b 100644 --- a/java/src/jni/h5plImp.c +++ b/java/src/jni/h5plImp.c @@ -61,6 +61,167 @@ Java_hdf_hdf5lib_H5_H5PLget_1loading_1state return (jint)plugin_type; } /* end Java_hdf_hdf5lib_H5_H5PLget_1loading_1state */ +/* + * Class: hdf_hdf5lib_H5 + * Method: H5PLappend + * Signature: (Ljava/lang/String;)V + */ +JNIEXPORT void JNICALL +Java_hdf_hdf5lib_H5_H5PLappend + (JNIEnv *env, jclass clss, jobjectArray plugin_path) +{ + char *aName; + herr_t retVal = -1; + + PIN_JAVA_STRING(plugin_path, aName); + if (aName != NULL) { + retVal = H5PLappend(aName); + + UNPIN_JAVA_STRING(plugin_path, aName); + + if (retVal < 0) + h5libraryError(env); + } +} /* end Java_hdf_hdf5lib_H5_H5PLappend */ +/* + * Class: hdf_hdf5lib_H5 + * Method: H5PLprepend + * Signature: (Ljava/lang/String;)V + */ +JNIEXPORT void JNICALL +Java_hdf_hdf5lib_H5_H5PLprepend + (JNIEnv *env, jclass clss, jobjectArray plugin_path) +{ + char *aName; + herr_t retVal = -1; + + PIN_JAVA_STRING(plugin_path, aName); + if (aName != NULL) { + retVal = H5PLprepend(aName); + + UNPIN_JAVA_STRING(plugin_path, aName); + + if (retVal < 0) + h5libraryError(env); + } +} /* end Java_hdf_hdf5lib_H5_H5PLprepend */ + +/* + * Class: hdf_hdf5lib_H5 + * Method: H5PLreplace + * Signature: (Ljava/lang/String;I)V + */ +JNIEXPORT void JNICALL +Java_hdf_hdf5lib_H5_H5PLreplace + (JNIEnv *env, jclass clss, jobjectArray plugin_path, jint index) +{ + char *aName; + herr_t retVal = -1; + + PIN_JAVA_STRING(plugin_path, aName); + if (aName != NULL) { + retVal = H5PLreplace(aName, index); + + UNPIN_JAVA_STRING(plugin_path, aName); + + if (retVal < 0) + h5libraryError(env); + } +} /* end Java_hdf_hdf5lib_H5_H5PLreplace */ + +/* + * Class: hdf_hdf5lib_H5 + * Method: H5PLinsert + * Signature: (Ljava/lang/String;I)V + */ +JNIEXPORT void JNICALL +Java_hdf_hdf5lib_H5_H5PLinsert + (JNIEnv *env, jclass clss, jobjectArray plugin_path, jint index) +{ + char *aName; + herr_t retVal = -1; + + PIN_JAVA_STRING(plugin_path, aName); + if (aName != NULL) { + retVal = H5PLinsert(aName, index); + + UNPIN_JAVA_STRING(plugin_path, aName); + + if (retVal < 0) + h5libraryError(env); + } +} /* end Java_hdf_hdf5lib_H5_H5PLinsert */ + +/* + * Class: hdf_hdf5lib_H5 + * Method: H5PLremove + * Signature: (I)V + */ +JNIEXPORT void JNICALL +Java_hdf_hdf5lib_H5_H5PLremove + (JNIEnv *env, jclass clss, jint index) +{ + if (H5PLremove(index) < 0) + h5libraryError(env); +} /* end Java_hdf_hdf5lib_H5_H5PLremove */ + +/* + * Class: hdf_hdf5lib_H5 + * Method: H5PLget + * Signature: (I)Ljava/lang/String; + */ +JNIEXPORT jstring JNICALL +Java_hdf_hdf5lib_H5_H5PLget + (JNIEnv *env, jclass clss, jint index) +{ + char *aName; + jstring str = NULL; + ssize_t buf_size; + + /* get the length of the name */ + buf_size = H5PLget(index, NULL, 0); + + if (buf_size <= 0) { + h5badArgument(env, "H5PLget: buf_size <= 0"); + } /* end if */ + else { + buf_size++; /* add extra space for the null terminator */ + aName = (char*)HDmalloc(sizeof(char) * (size_t)buf_size); + if (aName == NULL) { + h5outOfMemory(env, "H5PLget: malloc failed"); + } /* end if */ + else { + buf_size = H5PLget(index, aName, (size_t)buf_size); + if (buf_size < 0) { + h5libraryError(env); + } /* end if */ + else { + str = ENVPTR->NewStringUTF(ENVPAR aName); + } + HDfree(aName); + } + } + return str; +} /* end Java_hdf_hdf5lib_H5_H5PLget */ + +/* + * Class: hdf_hdf5lib_H5 + * Method: H5PLsize + * Signature: (V)I + */ +JNIEXPORT jint JNICALL +Java_hdf_hdf5lib_H5_H5PLsize + (JNIEnv *env, jclass clss) +{ + int retVal = -1; + + retVal = H5PLsize(); + if (retVal < 0) + h5libraryError(env); + + return (jint)retVal; +} /* end Java_hdf_hdf5lib_H5_H5PLsize */ + #ifdef __cplusplus } /* end extern "C" */ #endif /* __cplusplus */ diff --git a/java/src/jni/h5plImp.h b/java/src/jni/h5plImp.h index d0507a8..5326a94 100644 --- a/java/src/jni/h5plImp.h +++ b/java/src/jni/h5plImp.h @@ -41,6 +41,69 @@ JNIEXPORT jint JNICALL Java_hdf_hdf5lib_H5_H5PLget_1loading_1state (JNIEnv *, jclass); +/* + * Class: hdf_hdf5lib_H5 + * Method: H5PLappend + * Signature: (Ljava/lang/String;)V + */ +JNIEXPORT void JNICALL +Java_hdf_hdf5lib_H5_H5PLappend + (JNIEnv *, jclass, jobjectArray); + +/* + * Class: hdf_hdf5lib_H5 + * Method: H5PLprepend + * Signature: (Ljava/lang/String;)V + */ +JNIEXPORT void JNICALL +Java_hdf_hdf5lib_H5_H5PLprepend + (JNIEnv *, jclass, jobjectArray); + +/* + * Class: hdf_hdf5lib_H5 + * Method: H5PLreplace + * Signature: (Ljava/lang/String;I)V + */ +JNIEXPORT void JNICALL +Java_hdf_hdf5lib_H5_H5PLreplace + (JNIEnv *, jclass, jobjectArray, jint); + +/* + * Class: hdf_hdf5lib_H5 + * Method: H5PLinsert + * Signature: (Ljava/lang/String;I)V + */ +JNIEXPORT void JNICALL +Java_hdf_hdf5lib_H5_H5PLinsert + (JNIEnv *, jclass, jobjectArray, jint); + +/* + * Class: hdf_hdf5lib_H5 + * Method: H5PLremove + * Signature: (I)V + */ +JNIEXPORT void JNICALL +Java_hdf_hdf5lib_H5_H5PLremove + (JNIEnv *, jclass, jint); + +/* + * Class: hdf_hdf5lib_H5 + * Method: H5PLget + * Signature: (I)Ljava/lang/String; + */ +JNIEXPORT jstring JNICALL +Java_hdf_hdf5lib_H5_H5PLget + (JNIEnv *, jclass, jint); + +/* + * Class: hdf_hdf5lib_H5 + * Method: H5PLsize + * Signature: (V)I + */ +JNIEXPORT jint JNICALL +Java_hdf_hdf5lib_H5_H5PLsize + (JNIEnv *, jclass); + #ifdef __cplusplus } /* end extern "C" */ #endif /* __cplusplus */ diff --git a/java/test/JUnit-interface.txt b/java/test/JUnit-interface.txt index cae8cef..ab2f3b1 100644 --- a/java/test/JUnit-interface.txt +++ b/java/test/JUnit-interface.txt @@ -633,13 +633,14 @@ JUnit version 4.11 .testH5Ocomment_clear .testH5Ocopy_cur_not_exists .TestH5PLplugins +.TestH5PLpaths .testH5Zfilter_avail .testH5Zunregister_predefined .testH5Zget_filter_info Time: XXXX -OK (637 tests) +OK (638 tests) HDF5-DIAG: Error detected in HDF5 (version (number)) thread (IDs): #000: (file name) line (number) in H5Fopen(): can't set access and transfer property lists diff --git a/java/test/TestH5PL.java b/java/test/TestH5PL.java index 9f1876c..759db5f 100644 --- a/java/test/TestH5PL.java +++ b/java/test/TestH5PL.java @@ -69,6 +69,36 @@ public class TestH5PL { } } + @Test + public void TestH5PLpaths() { + try { + int original_entries = H5.H5PLsize(); + H5.H5PLappend("path_one"); + int plugin_entries = H5.H5PLsize(); + assertTrue("H5.H5PLsize: "+plugin_entries, (original_entries+1) == plugin_entries); + H5.H5PLprepend("path_two"); + plugin_entries = H5.H5PLsize(); + assertTrue("H5.H5PLsize: "+plugin_entries, (original_entries+2) == plugin_entries); + H5.H5PLinsert("path_three", original_entries); + plugin_entries = H5.H5PLsize(); + assertTrue("H5.H5PLsize: "+plugin_entries, (original_entries+3) == plugin_entries); + String first_path = H5.H5PLget(original_entries); + assertTrue("First path was : "+first_path + " ",first_path.compareToIgnoreCase("path_three")==0); + H5.H5PLreplace("path_four", original_entries); + first_path = H5.H5PLget(original_entries); + assertTrue("First path changed to : "+first_path + " ",first_path.compareToIgnoreCase("path_four")==0); + H5.H5PLremove(original_entries); + first_path = H5.H5PLget(original_entries); + assertTrue("First path now : "+first_path + " ",first_path.compareToIgnoreCase("path_two")==0); + plugin_entries = H5.H5PLsize(); + assertTrue("H5.H5PLsize: "+plugin_entries, (original_entries+2) == plugin_entries); + } + catch (Throwable err) { + err.printStackTrace(); + fail("TestH5PLpaths " + err); + } + } + @Ignore public void TestH5PLdlopen() { long file_id = -1; -- cgit v0.12 From ed98dc04190b41d2d253e5ed549a8ae7322efa75 Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Tue, 4 Apr 2017 09:53:42 -0500 Subject: HDFFV-10143 clean up format and function return --- test/plugin.c | 654 +++++++++++++++++++++++++++------------------------------- 1 file changed, 306 insertions(+), 348 deletions(-) diff --git a/test/plugin.c b/test/plugin.c index 6c14062..6d4a0e1 100644 --- a/test/plugin.c +++ b/test/plugin.c @@ -44,8 +44,8 @@ const char *FILENAME[] = { /* Dataset names for testing filters */ #define DSET_DEFLATE_NAME "deflate" #define DSET_DYNLIB1_NAME "dynlib1" -#define DSET_DYNLIB2_NAME "dynlib2" -#define DSET_DYNLIB4_NAME "dynlib4" +#define DSET_DYNLIB2_NAME "dynlib2" +#define DSET_DYNLIB4_NAME "dynlib4" /* Parameters for internal filter test */ #define FILTER_CHUNK_DIM1 2 @@ -65,39 +65,36 @@ const char *FILENAME[] = { #define GROUP_ITERATION 1000 int points_deflate[DSET_DIM1][DSET_DIM2], - points_dynlib1[DSET_DIM1][DSET_DIM2], - points_dynlib2[DSET_DIM1][DSET_DIM2], - points_dynlib4[DSET_DIM1][DSET_DIM2], - points_bzip2[DSET_DIM1][DSET_DIM2]; + points_dynlib1[DSET_DIM1][DSET_DIM2], + points_dynlib2[DSET_DIM1][DSET_DIM2], + points_dynlib4[DSET_DIM1][DSET_DIM2], + points_bzip2[DSET_DIM1][DSET_DIM2]; /*------------------------------------------------------------------------- - * Function: test_filter_internal + * Function: test_filter_internal * - * Purpose: Tests writing entire data and partial data with filters + * Purpose: Tests writing entire data and partial data with filters * * Return: Success: 0 - * Failure: -1 - * - * Programmer: Raymond Lu - * 27 February 2013 - * + * Failure: -1 *------------------------------------------------------------------------- */ static herr_t test_filter_internal(hid_t fid, const char *name, hid_t dcpl) { - hid_t dataset; /* Dataset ID */ - hid_t dxpl; /* Dataset xfer property list ID */ - hid_t write_dxpl; /* Dataset xfer property list ID for writing */ - hid_t sid; /* Dataspace ID */ - const hsize_t size[2] = {DSET_DIM1, DSET_DIM2}; /* Dataspace dimensions */ + herr_t ret_value = -1; + hid_t dataset = -1; /* Dataset ID */ + hid_t dxpl = -1; /* Dataset xfer property list ID */ + hid_t write_dxpl = -1; /* Dataset xfer property list ID for writing */ + hid_t sid = -1; /* Dataspace ID */ + const hsize_t size[2] = {DSET_DIM1, DSET_DIM2}; /* Dataspace dimensions */ const hsize_t hs_offset[2] = {FILTER_HS_OFFSET1, FILTER_HS_OFFSET2}; /* Hyperslab offset */ - const hsize_t hs_size[2] = {FILTER_HS_SIZE1, FILTER_HS_SIZE2}; /* Hyperslab size */ + const hsize_t hs_size[2] = {FILTER_HS_SIZE1, FILTER_HS_SIZE2}; /* Hyperslab size */ void *tconv_buf = NULL; /* Temporary conversion buffer */ - int points[DSET_DIM1][DSET_DIM2], check[DSET_DIM1][DSET_DIM2]; - size_t i, j; /* Local index variables */ - int n = 0; + int points[DSET_DIM1][DSET_DIM2], check[DSET_DIM1][DSET_DIM2]; + size_t i, j; /* Local index variables */ + int n = 0; /* Create the data space */ if((sid = H5Screate_simple(2, size, NULL)) < 0) TEST_ERROR @@ -114,15 +111,14 @@ test_filter_internal(hid_t fid, const char *name, hid_t dcpl) TESTING(" filters (setup)"); /* Check if all the filters are available */ - if(H5Pall_filters_avail(dcpl)!=TRUE) { + if(H5Pall_filters_avail(dcpl) != TRUE) { H5_FAILED(); - HDprintf(" Line %d: Incorrect filter availability\n",__LINE__); + HDprintf(" Line %d: Incorrect filter availability\n", __LINE__); TEST_ERROR } /* end if */ /* Create the dataset */ - if((dataset = H5Dcreate2(fid, name, H5T_NATIVE_INT, sid, H5P_DEFAULT, - dcpl, H5P_DEFAULT)) < 0) TEST_ERROR + if((dataset = H5Dcreate2(fid, name, H5T_NATIVE_INT, sid, H5P_DEFAULT, dcpl, H5P_DEFAULT)) < 0) TEST_ERROR PASSED(); @@ -132,20 +128,16 @@ test_filter_internal(hid_t fid, const char *name, hid_t dcpl) */ TESTING(" filters (uninitialized read)"); - if(H5Dread(dataset, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, dxpl, check) < 0) - TEST_ERROR; + if(H5Dread(dataset, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, dxpl, check) < 0) TEST_ERROR; - for(i=0; i<(size_t)size[0]; i++) { - for(j=0; j<(size_t)size[1]; j++) { - if(0!=check[i][j]) { - H5_FAILED(); - HDprintf(" Read a non-zero value.\n"); - HDprintf(" At index %lu,%lu\n", - (unsigned long)i, (unsigned long)j); - TEST_ERROR - } - } - } + for(i=0; i<(size_t)size[0]; i++) + for(j=0; j<(size_t)size[1]; j++) + if(0 != check[i][j]) { + H5_FAILED(); + HDprintf(" Read a non-zero value.\n"); + HDprintf(" At index %lu,%lu\n", (unsigned long)i, (unsigned long)j); + TEST_ERROR + } /* end if */ PASSED(); /*---------------------------------------------------------------------- @@ -156,14 +148,11 @@ test_filter_internal(hid_t fid, const char *name, hid_t dcpl) TESTING(" filters (write)"); n = 0; - for(i=0; i 0; i--) { - if (H5PLremove(i-1) < 0) { + for(i=ndx; i > 0; i--) + if(H5PLremove(i-1) < 0) { HDfprintf(stderr," at %d: %s\n", i, pathname); TEST_ERROR - } - } + } /* end if */ /* Verify the table is empty */ - if (H5PLsize() > 0) TEST_ERROR + if(H5PLsize() > 0) TEST_ERROR PASSED(); TESTING(" remove (exceed min)"); @@ -771,21 +751,20 @@ test_filter_path_apis(void) H5E_BEGIN_TRY { ret = H5PLremove(0); } H5E_END_TRY - if (ret >= 0) - TEST_ERROR + if(ret >= 0) TEST_ERROR PASSED(); TESTING(" append"); /* Create multiple paths to fill table */ - for (i=0; i < H5PL_MAX_PATH_NUM; i++) { + for(i=0; i < H5PL_MAX_PATH_NUM; i++) { HDsprintf(pathname, "a_path_%d", i); - if (H5PLappend(pathname) < 0) { + if(H5PLappend(pathname) < 0) { HDfprintf(stderr," at %d: %s\n", i, pathname); TEST_ERROR } } /* Verify the table is full */ - if (H5PLsize() != H5PL_MAX_PATH_NUM) TEST_ERROR + if(H5PLsize() != H5PL_MAX_PATH_NUM) TEST_ERROR PASSED(); TESTING(" append (exceed)"); @@ -794,47 +773,42 @@ test_filter_path_apis(void) HDsprintf(pathname, "a_path_%d", H5PL_MAX_PATH_NUM); ret = H5PLappend(pathname); } H5E_END_TRY - if (ret >= 0) - TEST_ERROR + if(ret >= 0) TEST_ERROR TESTING(" remove (exceed max)"); /* Exceed the max path removal */ H5E_BEGIN_TRY { ret = H5PLremove(H5PL_MAX_PATH_NUM); } H5E_END_TRY - if (ret >= 0) - TEST_ERROR + if(ret >= 0) TEST_ERROR PASSED(); TESTING(" get (path name)"); - if ((pathlen = H5PLget(0, NULL, 0)) <= 0) { + if((pathlen = H5PLget(0, NULL, 0)) <= 0) { HDfprintf(stderr," get path 0 length failed\n"); TEST_ERROR } - if (pathlen != 8) { - TEST_ERROR - } - if ((pathlen = H5PLget(0, pathname, 256)) <= 0) { + if(pathlen != 8) TEST_ERROR + + if((pathlen = H5PLget(0, pathname, 256)) <= 0) { HDfprintf(stderr," get 0 len: %d : %s\n", pathlen, pathname); TEST_ERROR } - if (HDstrcmp(pathname, "a_path_0") != 0) { + if(HDstrcmp(pathname, "a_path_0") != 0) { HDfprintf(stderr," get 0: %s\n", pathname); TEST_ERROR } PASSED(); TESTING(" get (bounds)"); - if ((pathlen = H5PLget(1, pathname, 256)) <= 0) - TEST_ERROR - if (HDstrcmp(pathname, "a_path_1") != 0) { + if((pathlen = H5PLget(1, pathname, 256)) <= 0) TEST_ERROR + if(HDstrcmp(pathname, "a_path_1") != 0) { HDfprintf(stderr," get 1: %s\n", pathname); TEST_ERROR } - if ((pathlen = H5PLget(H5PL_MAX_PATH_NUM - 1, pathname, 256)) <= 0) - TEST_ERROR + if((pathlen = H5PLget(H5PL_MAX_PATH_NUM - 1, pathname, 256)) <= 0) TEST_ERROR HDsprintf(tempname, "a_path_%d", H5PL_MAX_PATH_NUM - 1); - if (HDstrcmp(pathname, tempname) != 0) { + if(HDstrcmp(pathname, tempname) != 0) { HDfprintf(stderr," get %d: %s\n", H5PL_MAX_PATH_NUM - 1, pathname); TEST_ERROR } @@ -844,18 +818,16 @@ test_filter_path_apis(void) H5E_BEGIN_TRY { pathlen = H5PLget(H5PL_MAX_PATH_NUM, NULL, 0); } H5E_END_TRY - if (pathlen > 0) - TEST_ERROR + if(pathlen > 0) TEST_ERROR PASSED(); TESTING(" remove (verify for prepend)"); /* Remove one path*/ - if (H5PLremove(8) < 0) TEST_ERROR + if(H5PLremove(8) < 0) TEST_ERROR /* Verify that the entries were moved */ - if ((pathlen = H5PLget(8, pathname, 256)) <= 0) - TEST_ERROR - if (HDstrcmp(pathname, "a_path_9") != 0) { + if((pathlen = H5PLget(8, pathname, 256)) <= 0) TEST_ERROR + if(HDstrcmp(pathname, "a_path_9") != 0) { HDfprintf(stderr," get 8: %s\n", pathname); TEST_ERROR } @@ -867,25 +839,23 @@ test_filter_path_apis(void) TESTING(" prepend"); /* Prepend one path*/ HDsprintf(pathname, "a_path_%d", H5PL_MAX_PATH_NUM + 1); - if (H5PLprepend(pathname) < 0) { + if(H5PLprepend(pathname) < 0) { HDfprintf(stderr," prepend %d: %s\n", H5PL_MAX_PATH_NUM + 1, pathname); TEST_ERROR } /* Verify the table is full */ - if (H5PLsize() != H5PL_MAX_PATH_NUM) TEST_ERROR + if(H5PLsize() != H5PL_MAX_PATH_NUM) TEST_ERROR /* Verify that the entries were moved */ - if (H5PLget(8, pathname, 256) <= 0) - TEST_ERROR - if (HDstrcmp(pathname, "a_path_7") != 0) { + if(H5PLget(8, pathname, 256) <= 0) TEST_ERROR + if(HDstrcmp(pathname, "a_path_7") != 0) { HDfprintf(stderr," get 8: %s\n", pathname); TEST_ERROR } - if (H5PLget(0, pathname, 256) <= 0) - TEST_ERROR + if(H5PLget(0, pathname, 256) <= 0) TEST_ERROR HDsprintf(tempname, "a_path_%d", H5PL_MAX_PATH_NUM + 1); - if (HDstrcmp(pathname, tempname) != 0) { + if(HDstrcmp(pathname, tempname) != 0) { HDfprintf(stderr," get 0: %s\n", pathname); TEST_ERROR } @@ -897,32 +867,29 @@ test_filter_path_apis(void) HDsprintf(pathname, "a_path_%d", H5PL_MAX_PATH_NUM + 2); ret = H5PLprepend(pathname); } H5E_END_TRY - if (ret >= 0) - TEST_ERROR + if(ret >= 0) TEST_ERROR PASSED(); TESTING(" replace"); /* Replace one path*/ HDsprintf(pathname, "a_path_%d", H5PL_MAX_PATH_NUM + 4); - if (H5PLreplace(pathname, 1) < 0) { + if(H5PLreplace(pathname, 1) < 0) { HDfprintf(stderr," replace 1: %s\n", pathname); TEST_ERROR } /* Verify the table is full */ - if (H5PLsize() != H5PL_MAX_PATH_NUM) TEST_ERROR + if(H5PLsize() != H5PL_MAX_PATH_NUM) TEST_ERROR /* Verify that the entries were not moved */ - if (H5PLget(0, pathname, 256) <= 0) - TEST_ERROR + if(H5PLget(0, pathname, 256) <= 0) TEST_ERROR HDsprintf(tempname, "a_path_%d", H5PL_MAX_PATH_NUM + 1); - if (HDstrcmp(pathname, tempname) != 0) { + if(HDstrcmp(pathname, tempname) != 0) { HDfprintf(stderr," get 0: %s\n", pathname); TEST_ERROR } - if (H5PLget(2, pathname, 256) <= 0) - TEST_ERROR - if (HDstrcmp(pathname, "a_path_1") != 0) { + if(H5PLget(2, pathname, 256) <= 0) TEST_ERROR + if(HDstrcmp(pathname, "a_path_1") != 0) { HDfprintf(stderr," get 2: %s\n", pathname); TEST_ERROR } @@ -930,39 +897,37 @@ test_filter_path_apis(void) TESTING(" remove (verify for insert)"); /* Remove one path*/ - if (H5PLremove(4) < 0) TEST_ERROR + if H5PLremove(4) < 0) TEST_ERROR /* Verify that the entries were moved */ - if (H5PLget(4, pathname, 256) <= 0) - TEST_ERROR - if (HDstrcmp(pathname, "a_path_4") != 0) { + if H5PLget(4, pathname, 256) <= 0) TEST_ERROR + if(HDstrcmp(pathname, "a_path_4") != 0) { HDfprintf(stderr," get 4: %s\n", pathname); TEST_ERROR } PASSED(); /* Verify the table is not full */ - if (H5PLsize() != 15) TEST_ERROR + if(H5PLsize() != 15) TEST_ERROR TESTING(" insert"); /* Insert one path*/ HDsprintf(pathname, "a_path_%d", H5PL_MAX_PATH_NUM + 5); - if (H5PLinsert(pathname, 3) < 0){ + if(H5PLinsert(pathname, 3) < 0) { HDfprintf(stderr," insert 3: %s\n", pathname); TEST_ERROR } /* Verify that the entries were moved */ - if (H5PLget(4, pathname, 256) <= 0) - TEST_ERROR - if (HDstrcmp(pathname, "a_path_2") != 0){ + if(H5PLget(4, pathname, 256) <= 0) TEST_ERROR + if(HDstrcmp(pathname, "a_path_2") != 0) { HDfprintf(stderr," get 4: %s\n", pathname); TEST_ERROR } PASSED(); /* Verify the table is full */ - if (H5PLsize() != H5PL_MAX_PATH_NUM) TEST_ERROR + if(H5PLsize() != H5PL_MAX_PATH_NUM) TEST_ERROR TESTING(" insert (exceed)"); /* Exceed the max path insert */ @@ -970,15 +935,14 @@ test_filter_path_apis(void) HDsprintf(pathname, "a_path_%d", H5PL_MAX_PATH_NUM + 6); ret = H5PLinsert(pathname, 12); } H5E_END_TRY - if (ret >= 0) - TEST_ERROR + if(ret >= 0) TEST_ERROR - PASSED (); + PASSED(); - return 0; + ret_value = 0; error: - return -1; + return ret_value; } @@ -1000,24 +964,24 @@ int main(void) { char filename[FILENAME_BUF_SIZE]; - hid_t file, fapl, fapl2; - unsigned new_format; - int mdc_nelmts; - size_t rdcc_nelmts; - size_t rdcc_nbytes; - double rdcc_w0; - int nerrors = 0; + hid_t file = -1; + hid_t fapl = -1; + hid_t fapl2 = -1; + unsigned new_format; + int mdc_nelmts; + size_t rdcc_nelmts; + size_t rdcc_nbytes; + double rdcc_w0; + int nerrors = 0; /* Testing setup */ h5_reset(); fapl = h5_fileaccess(); /* Turn off the chunk cache, so all the chunks are immediately written to disk */ - if(H5Pget_cache(fapl, &mdc_nelmts, &rdcc_nelmts, &rdcc_nbytes, &rdcc_w0) < 0) - TEST_ERROR + if(H5Pget_cache(fapl, &mdc_nelmts, &rdcc_nelmts, &rdcc_nbytes, &rdcc_w0) < 0) TEST_ERROR rdcc_nbytes = 0; - if(H5Pset_cache(fapl, mdc_nelmts, rdcc_nelmts, rdcc_nbytes, rdcc_w0) < 0) - TEST_ERROR + if(H5Pset_cache(fapl, mdc_nelmts, rdcc_nelmts, rdcc_nbytes, rdcc_w0) < 0) TEST_ERROR /* Copy the file access property list */ if((fapl2 = H5Pcopy(fapl)) < 0) TEST_ERROR @@ -1042,8 +1006,7 @@ main(void) } /* end else */ /* Create the file for this test */ - if((file = H5Fcreate(filename, H5F_ACC_TRUNC, H5P_DEFAULT, my_fapl)) < 0) - TEST_ERROR + if((file = H5Fcreate(filename, H5F_ACC_TRUNC, H5P_DEFAULT, my_fapl)) < 0) TEST_ERROR /* Test dynamically loaded filters for chunked dataset */ nerrors += (test_filters_for_datasets(file) < 0 ? 1 : 0); @@ -1051,8 +1014,7 @@ main(void) /* Test dynamically loaded filters for groups */ nerrors += (test_filters_for_groups(file) < 0 ? 1 : 0); - if(H5Fclose(file) < 0) - TEST_ERROR + if(H5Fclose(file) < 0) TEST_ERROR } /* end for */ /* Close FAPL */ @@ -1069,14 +1031,13 @@ main(void) fapl = h5_fileaccess(); /* Reopen the file for testing data reading */ - if((file = H5Fopen(filename, H5F_ACC_RDONLY, fapl)) < 0) - TEST_ERROR + if((file = H5Fopen(filename, H5F_ACC_RDONLY, fapl)) < 0) TEST_ERROR /* Read the data with filters */ - nerrors += (test_read_with_filters(file) < 0 ? 1 : 0); + nerrors += (test_read_with_filters(file) < 0 ? 1 : 0); /* Open the groups with filters */ - nerrors += (test_groups_with_filters(file) < 0 ? 1 : 0); + nerrors += (test_groups_with_filters(file) < 0 ? 1 : 0); /* Restore the default error handler (set in h5_reset()) */ h5_restore_err(); @@ -1086,20 +1047,18 @@ main(void) fapl = h5_fileaccess(); /* Reopen the file for testing data reading */ - if((file = H5Fopen(filename, H5F_ACC_RDONLY, fapl)) < 0) - TEST_ERROR + if((file = H5Fopen(filename, H5F_ACC_RDONLY, fapl)) < 0) TEST_ERROR /* Read the data with disabled filters */ nerrors += (test_noread_with_filters(file) < 0 ? 1 : 0); - if(H5Fclose(file) < 0) - TEST_ERROR + if(H5Fclose(file) < 0) TEST_ERROR /* Test the APIs for access to the filter plugin path table */ nerrors += (test_filter_path_apis() < 0 ? 1 : 0); - if(nerrors) - TEST_ERROR + if(nerrors) TEST_ERROR + HDprintf("All plugin tests passed.\n"); h5_cleanup(FILENAME, fapl); @@ -1107,8 +1066,7 @@ main(void) error: nerrors = MAX(1, nerrors); - HDprintf("***** %d PLUGIN TEST%s FAILED! *****\n", - nerrors, 1 == nerrors ? "" : "S"); + HDprintf("***** %d PLUGIN TEST%s FAILED! *****\n", nerrors, 1 == nerrors ? "" : "S"); return 1; } -- cgit v0.12 From f17ce1b06e6d023575c0ef7c0c1c65dbf1968d6a Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Tue, 4 Apr 2017 10:07:41 -0500 Subject: HDFFV-10143 Update new feature section. --- release_docs/RELEASE.txt | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/release_docs/RELEASE.txt b/release_docs/RELEASE.txt index 2c118b9..72fee6e 100644 --- a/release_docs/RELEASE.txt +++ b/release_docs/RELEASE.txt @@ -82,6 +82,10 @@ New Features layer for improved I/O performance. This feature works in conjunction with the paged aggregation feature. + - Filter plugin API added to access the table of paths to search for a + library. Java interface expanded with wrappers for the new functions. + (HDFFV-10143 ADB 2017/04/04) + Parallel Library: ----------------- - -- cgit v0.12 From db9eeb9f6ae954c0375349dc411a7ad6ddcf16cc Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Tue, 4 Apr 2017 10:15:56 -0500 Subject: Fix typo deletion --- test/plugin.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/plugin.c b/test/plugin.c index 6d4a0e1..041f702 100644 --- a/test/plugin.c +++ b/test/plugin.c @@ -897,10 +897,10 @@ test_filter_path_apis(void) TESTING(" remove (verify for insert)"); /* Remove one path*/ - if H5PLremove(4) < 0) TEST_ERROR + if(H5PLremove(4) < 0) TEST_ERROR /* Verify that the entries were moved */ - if H5PLget(4, pathname, 256) <= 0) TEST_ERROR + if(H5PLget(4, pathname, 256) <= 0) TEST_ERROR if(HDstrcmp(pathname, "a_path_4") != 0) { HDfprintf(stderr," get 4: %s\n", pathname); TEST_ERROR -- cgit v0.12 From 75d6ac058e71b3f46333e7f6c7566e4214ccd091 Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Thu, 6 Apr 2017 11:22:29 -0500 Subject: Fix CMake regex commands --- CMakeLists.txt | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 11c9b53..ce91052 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -281,7 +281,7 @@ if (H5_TOOLS_SOVERS_EXISTS) 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}") endif () -string (REGEX REPLACE ".*LT_CXX_VERS_INTERFACE[ \t]+=[ \t]+([0-9]*).*$" H5_CXX_SOVERS_EXISTS ${_lt_vers_am_contents}) +string (REGEX MATCH ".*LT_CXX_VERS_INTERFACE[ \t]+=[ \t]+([0-9]*).*$" H5_CXX_SOVERS_EXISTS ${_lt_vers_am_contents}) if (H5_CXX_SOVERS_EXISTS) string (REGEX REPLACE ".*LT_CXX_VERS_INTERFACE[ \t]+=[ \t]+([0-9]*).*$" "\\1" H5_CXX_SOVERS_INTERFACE ${_lt_vers_am_contents}) @@ -292,7 +292,7 @@ if (H5_CXX_SOVERS_EXISTS) 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}") endif () -string (REGEX REPLACE ".*LT_F_VERS_INTERFACE[ \t]+=[ \t]+([0-9]*).*$" H5_F_SOVERS_EXISTS ${_lt_vers_am_contents}) +string (REGEX MATCH ".*LT_F_VERS_INTERFACE[ \t]+=[ \t]+([0-9]*).*$" H5_F_SOVERS_EXISTS ${_lt_vers_am_contents}) if (H5_F_SOVERS_EXISTS) string (REGEX REPLACE ".*LT_F_VERS_INTERFACE[ \t]+=[ \t]+([0-9]*).*$" "\\1" H5_F_SOVERS_INTERFACE ${_lt_vers_am_contents}) @@ -303,7 +303,7 @@ if (H5_F_SOVERS_EXISTS) 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}") endif () -string (REGEX REPLACE ".*LT_HL_VERS_INTERFACE[ \t]+=[ \t]+([0-9]*).*$" H5_HL_SOVERS_EXISTS ${_lt_vers_am_contents}) +string (REGEX MATCH ".*LT_HL_VERS_INTERFACE[ \t]+=[ \t]+([0-9]*).*$" H5_HL_SOVERS_EXISTS ${_lt_vers_am_contents}) if (H5_HL_SOVERS_EXISTS) string (REGEX REPLACE ".*LT_HL_VERS_INTERFACE[ \t]+=[ \t]+([0-9]*).*$" "\\1" H5_HL_SOVERS_INTERFACE ${_lt_vers_am_contents}) @@ -314,7 +314,7 @@ if (H5_HL_SOVERS_EXISTS) 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}") endif () -string (REGEX REPLACE ".*LT_HL_CXX_VERS_INTERFACE[ \t]+=[ \t]+([0-9]*).*$" H5_HL_CXX_SOVERS_EXISTS ${_lt_vers_am_contents}) +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) string (REGEX REPLACE ".*LT_HL_CXX_VERS_INTERFACE[ \t]+=[ \t]+([0-9]*).*$" "\\1" H5_HL_CXX_SOVERS_INTERFACE ${_lt_vers_am_contents}) @@ -325,7 +325,7 @@ if (H5_HL_CXX_SOVERS_EXISTS) 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}") endif () -string (REGEX REPLACE ".*LT_HL_F_VERS_INTERFACE[ \t]+=[ \t]+([0-9]*).*$" H5_HL_F_SOVERS_EXISTS ${_lt_vers_am_contents}) +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) string (REGEX REPLACE ".*LT_HL_F_VERS_INTERFACE[ \t]+=[ \t]+([0-9]*).*$" "\\1" H5_HL_F_SOVERS_INTERFACE ${_lt_vers_am_contents}) @@ -336,7 +336,7 @@ if (H5_HL_F_SOVERS_EXISTS) 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}") endif () -string (REGEX REPLACE ".*LT_JAVA_VERS_INTERFACE[ \t]+=[ \t]+([0-9]*).*$" H5_JAVA_SOVERS_EXISTS ${_lt_vers_am_contents}) +string (REGEX MATCH ".*LT_JAVA_VERS_INTERFACE[ \t]+=[ \t]+([0-9]*).*$" H5_JAVA_SOVERS_EXISTS ${_lt_vers_am_contents}) if(H5_JAVA_SOVERS_EXISTS) string (REGEX REPLACE ".*LT_JAVA_VERS_INTERFACE[ \t]+=[ \t]+([0-9]*).*$" "\\1" H5_JAVA_SOVERS_INTERFACE ${_lt_vers_am_contents}) -- cgit v0.12 From 388051ba2dc46bdca0462b02300ee81deb662d87 Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Thu, 6 Apr 2017 14:29:47 -0500 Subject: Add missing test status --- test/plugin.c | 1 + 1 file changed, 1 insertion(+) diff --git a/test/plugin.c b/test/plugin.c index 041f702..2939595 100644 --- a/test/plugin.c +++ b/test/plugin.c @@ -774,6 +774,7 @@ test_filter_path_apis(void) ret = H5PLappend(pathname); } H5E_END_TRY if(ret >= 0) TEST_ERROR + PASSED(); TESTING(" remove (exceed max)"); /* Exceed the max path removal */ -- cgit v0.12 From 38b1b534c986696dcf146352e7314c2919affbf5 Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Thu, 6 Apr 2017 15:00:48 -0500 Subject: HDFFV-10143 add missing javadoc param --- java/src/hdf/hdf5lib/H5.java | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/java/src/hdf/hdf5lib/H5.java b/java/src/hdf/hdf5lib/H5.java index 3c9227f..e47ba76 100644 --- a/java/src/hdf/hdf5lib/H5.java +++ b/java/src/hdf/hdf5lib/H5.java @@ -7229,6 +7229,8 @@ public class H5 implements java.io.Serializable { * * @param plugin_path * IN: Path for location of filter plugin libraries. + * @param index + * IN: The table index (0-based). * * @exception HDF5LibraryException * - Error from the HDF-5 Library. @@ -7240,6 +7242,8 @@ public class H5 implements java.io.Serializable { * * @param plugin_path * IN: Path for location of filter plugin libraries. + * @param index + * IN: The table index (0-based). * * @exception HDF5LibraryException * - Error from the HDF-5 Library. @@ -7249,6 +7253,9 @@ public class H5 implements java.io.Serializable { /** * H5PLremove removes the plugin path at the specified index. * + * @param index + * IN: The table index (0-based). + * * @exception HDF5LibraryException * - Error from the HDF-5 Library. **/ @@ -7257,6 +7264,9 @@ public class H5 implements java.io.Serializable { /** * H5PLget retrieves the plugin path at the specified index. * + * @param index + * IN: The table index (0-based). + * * @return the current path at the index in plugin path table * * @exception HDF5LibraryException -- cgit v0.12 From 6efdeb7630b65e7436f898c2eed5100b9b901232 Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Tue, 11 Apr 2017 12:57:19 -0500 Subject: DAILYTEST-250 change test props to reduce timeout --- test/CMakeTests.cmake | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/CMakeTests.cmake b/test/CMakeTests.cmake index f372acf..cbab6fe 100644 --- a/test/CMakeTests.cmake +++ b/test/CMakeTests.cmake @@ -750,7 +750,7 @@ if (NOT CYGWIN) endif () set_tests_properties (H5TEST-cache PROPERTIES DEPENDS H5TEST-clear-cache-objects - ENVIRONMENT "srcdir=${HDF5_TEST_BINARY_DIR}/H5TEST;HDF5TestExpress=${HDF_TEST_EXPRESS}" + ENVIRONMENT "srcdir=${HDF5_TEST_BINARY_DIR}/H5TEST;HDF5TestExpress=3" WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/H5TEST ) set_tests_properties (H5TEST-cache PROPERTIES TIMEOUT 1800) @@ -768,7 +768,7 @@ add_test ( add_test (NAME H5TEST-cache_image COMMAND $) set_tests_properties (H5TEST-cache_image PROPERTIES DEPENDS H5TEST-clear-cache_image-objects - ENVIRONMENT "srcdir=${HDF5_TEST_BINARY_DIR}/H5TEST" + ENVIRONMENT "srcdir=${HDF5_TEST_BINARY_DIR}/H5TEST;HDF5TestExpress=3" WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/H5TEST ) -- cgit v0.12 From e76d9217f49a300501cff55ded22e4c8107d2582 Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Tue, 11 Apr 2017 15:10:02 -0500 Subject: Fix URL name --- java/src/jni/exceptionImp.c | 2 +- java/src/jni/h5Constants.c | 2 +- java/src/jni/h5Imp.c | 2 +- java/src/jni/h5aImp.c | 2 +- java/src/jni/h5dImp.c | 2 +- java/src/jni/h5eImp.c | 2 +- java/src/jni/h5fImp.c | 2 +- java/src/jni/h5gImp.c | 2 +- java/src/jni/h5iImp.c | 2 +- java/src/jni/h5jni.h | 2 +- java/src/jni/h5lImp.c | 2 +- java/src/jni/h5oImp.c | 2 +- java/src/jni/h5pImp.c | 2 +- java/src/jni/h5plImp.c | 2 +- java/src/jni/h5rImp.c | 2 +- java/src/jni/h5sImp.c | 2 +- java/src/jni/h5tImp.c | 2 +- java/src/jni/h5util.c | 2 +- java/src/jni/h5util.h | 2 +- java/src/jni/h5zImp.c | 2 +- java/src/jni/nativeData.c | 2 +- 21 files changed, 21 insertions(+), 21 deletions(-) diff --git a/java/src/jni/exceptionImp.c b/java/src/jni/exceptionImp.c index 28eec21..d0e7790 100644 --- a/java/src/jni/exceptionImp.c +++ b/java/src/jni/exceptionImp.c @@ -15,7 +15,7 @@ /* * For details of the HDF libraries, see the HDF Documentation at: - * http://hdfdfgroup.org/HDF5/doc/ + * http://hdfgroup.org/HDF5/doc/ * */ diff --git a/java/src/jni/h5Constants.c b/java/src/jni/h5Constants.c index c6aa16c..ddca853 100644 --- a/java/src/jni/h5Constants.c +++ b/java/src/jni/h5Constants.c @@ -15,7 +15,7 @@ /* * For details of the HDF libraries, see the HDF Documentation at: - * http://hdfdfgroup.org/HDF5/doc/ + * http://hdfgroup.org/HDF5/doc/ * */ diff --git a/java/src/jni/h5Imp.c b/java/src/jni/h5Imp.c index 7a24b6f..e548363 100644 --- a/java/src/jni/h5Imp.c +++ b/java/src/jni/h5Imp.c @@ -15,7 +15,7 @@ /* * For details of the HDF libraries, see the HDF Documentation at: - * http://hdfdfgroup.org/HDF5/doc/ + * http://hdfgroup.org/HDF5/doc/ * */ diff --git a/java/src/jni/h5aImp.c b/java/src/jni/h5aImp.c index 5af8aae..5445904 100644 --- a/java/src/jni/h5aImp.c +++ b/java/src/jni/h5aImp.c @@ -15,7 +15,7 @@ /* * For details of the HDF libraries, see the HDF Documentation at: - * http://hdfdfgroup.org/HDF5/doc/ + * http://hdfgroup.org/HDF5/doc/ * */ diff --git a/java/src/jni/h5dImp.c b/java/src/jni/h5dImp.c index ed1db41..9765dc8 100644 --- a/java/src/jni/h5dImp.c +++ b/java/src/jni/h5dImp.c @@ -15,7 +15,7 @@ /* * For details of the HDF libraries, see the HDF Documentation at: - * http://hdfdfgroup.org/HDF5/doc/ + * http://hdfgroup.org/HDF5/doc/ * */ diff --git a/java/src/jni/h5eImp.c b/java/src/jni/h5eImp.c index 6e05515..05a7848 100644 --- a/java/src/jni/h5eImp.c +++ b/java/src/jni/h5eImp.c @@ -15,7 +15,7 @@ /* * For details of the HDF libraries, see the HDF Documentation at: - * http://hdfdfgroup.org/HDF5/doc/ + * http://hdfgroup.org/HDF5/doc/ * */ diff --git a/java/src/jni/h5fImp.c b/java/src/jni/h5fImp.c index 058ba26..4f0e569 100644 --- a/java/src/jni/h5fImp.c +++ b/java/src/jni/h5fImp.c @@ -15,7 +15,7 @@ /* * For details of the HDF libraries, see the HDF Documentation at: - * http://hdfdfgroup.org/HDF5/doc/ + * http://hdfgroup.org/HDF5/doc/ * */ diff --git a/java/src/jni/h5gImp.c b/java/src/jni/h5gImp.c index c40ed64..d724475 100644 --- a/java/src/jni/h5gImp.c +++ b/java/src/jni/h5gImp.c @@ -15,7 +15,7 @@ /* * For details of the HDF libraries, see the HDF Documentation at: - * http://hdfdfgroup.org/HDF5/doc/ + * http://hdfgroup.org/HDF5/doc/ * */ diff --git a/java/src/jni/h5iImp.c b/java/src/jni/h5iImp.c index 71e1b71..9c946df 100644 --- a/java/src/jni/h5iImp.c +++ b/java/src/jni/h5iImp.c @@ -15,7 +15,7 @@ /* * For details of the HDF libraries, see the HDF Documentation at: - * http://hdfdfgroup.org/HDF5/doc/ + * http://hdfgroup.org/HDF5/doc/ * */ diff --git a/java/src/jni/h5jni.h b/java/src/jni/h5jni.h index 9414d31..cef3bd0 100644 --- a/java/src/jni/h5jni.h +++ b/java/src/jni/h5jni.h @@ -15,7 +15,7 @@ /* * For details of the HDF libraries, see the HDF Documentation at: - * http://hdfdfgroup.org/HDF5/doc/ + * http://hdfgroup.org/HDF5/doc/ * */ diff --git a/java/src/jni/h5lImp.c b/java/src/jni/h5lImp.c index 473b1c7..f7a9df1 100644 --- a/java/src/jni/h5lImp.c +++ b/java/src/jni/h5lImp.c @@ -15,7 +15,7 @@ /* * For details of the HDF libraries, see the HDF Documentation at: - * http://hdfdfgroup.org/HDF5/doc/ + * http://hdfgroup.org/HDF5/doc/ * */ diff --git a/java/src/jni/h5oImp.c b/java/src/jni/h5oImp.c index 24f6988..a33d1d7 100644 --- a/java/src/jni/h5oImp.c +++ b/java/src/jni/h5oImp.c @@ -15,7 +15,7 @@ /* * For details of the HDF libraries, see the HDF Documentation at: - * http://hdfdfgroup.org/HDF5/doc/ + * http://hdfgroup.org/HDF5/doc/ * */ diff --git a/java/src/jni/h5pImp.c b/java/src/jni/h5pImp.c index f39f0e6..c9bd4aa 100644 --- a/java/src/jni/h5pImp.c +++ b/java/src/jni/h5pImp.c @@ -15,7 +15,7 @@ /* * For details of the HDF libraries, see the HDF Documentation at: - * http://hdfdfgroup.org/HDF5/doc/ + * http://hdfgroup.org/HDF5/doc/ * */ diff --git a/java/src/jni/h5plImp.c b/java/src/jni/h5plImp.c index 34d6f8b..09a1032 100644 --- a/java/src/jni/h5plImp.c +++ b/java/src/jni/h5plImp.c @@ -15,7 +15,7 @@ /* * For details of the HDF libraries, see the HDF Documentation at: - * http://hdfdfgroup.org/HDF5/doc/ + * http://hdfgroup.org/HDF5/doc/ * */ diff --git a/java/src/jni/h5rImp.c b/java/src/jni/h5rImp.c index 647f973..3dcbb8d 100644 --- a/java/src/jni/h5rImp.c +++ b/java/src/jni/h5rImp.c @@ -15,7 +15,7 @@ /* * For details of the HDF libraries, see the HDF Documentation at: - * http://hdfdfgroup.org/HDF5/doc/ + * http://hdfgroup.org/HDF5/doc/ * */ #ifdef __cplusplus diff --git a/java/src/jni/h5sImp.c b/java/src/jni/h5sImp.c index d996ae5..929f6d6 100644 --- a/java/src/jni/h5sImp.c +++ b/java/src/jni/h5sImp.c @@ -15,7 +15,7 @@ /* * For details of the HDF libraries, see the HDF Documentation at: - * http://hdfdfgroup.org/HDF5/doc/ + * http://hdfgroup.org/HDF5/doc/ * */ diff --git a/java/src/jni/h5tImp.c b/java/src/jni/h5tImp.c index 1467b41..26f9b5c 100644 --- a/java/src/jni/h5tImp.c +++ b/java/src/jni/h5tImp.c @@ -15,7 +15,7 @@ /* * For details of the HDF libraries, see the HDF Documentation at: - * http://hdfdfgroup.org/HDF5/doc/ + * http://hdfgroup.org/HDF5/doc/ * */ diff --git a/java/src/jni/h5util.c b/java/src/jni/h5util.c index 0d2999a..17ed35e 100644 --- a/java/src/jni/h5util.c +++ b/java/src/jni/h5util.c @@ -15,7 +15,7 @@ /* * For details of the HDF libraries, see the HDF Documentation at: - * http://hdfdfgroup.org/HDF5/doc/ + * http://hdfgroup.org/HDF5/doc/ * */ diff --git a/java/src/jni/h5util.h b/java/src/jni/h5util.h index f690e8b..6194378 100644 --- a/java/src/jni/h5util.h +++ b/java/src/jni/h5util.h @@ -15,7 +15,7 @@ /* * For details of the HDF libraries, see the HDF Documentation at: - * http://hdfdfgroup.org/HDF5/doc/ + * http://hdfgroup.org/HDF5/doc/ * */ diff --git a/java/src/jni/h5zImp.c b/java/src/jni/h5zImp.c index 2c8d8c3..247d1cc 100644 --- a/java/src/jni/h5zImp.c +++ b/java/src/jni/h5zImp.c @@ -15,7 +15,7 @@ /* * For details of the HDF libraries, see the HDF Documentation at: - * http://hdfdfgroup.org/HDF5/doc/ + * http://hdfgroup.org/HDF5/doc/ * */ diff --git a/java/src/jni/nativeData.c b/java/src/jni/nativeData.c index 8388c99..a123e0f 100644 --- a/java/src/jni/nativeData.c +++ b/java/src/jni/nativeData.c @@ -15,7 +15,7 @@ /* * For details of the HDF libraries, see the HDF Documentation at: - * http://hdfdfgroup.org/HDF5/doc/ + * http://hdfgroup.org/HDF5/doc/ * */ /* -- cgit v0.12 From f75379d780dc6d2a262d0b613e588a8c0629c848 Mon Sep 17 00:00:00 2001 From: Vailin Choi Date: Tue, 11 Apr 2017 11:59:27 -0500 Subject: Fix for H5Dset_extent test failure with extensive array indexing (HDFFV-9771) 1) Calculate chunk index for extensive array index based on swizzled max chunks when unlim_dim > 0 2) Minor fixes to test/fheap.c that somehow were missed from last check in. See pull request #396 review comments. --- src/H5Dearray.c | 15 +++++++++++--- src/H5Oprivate.h | 1 + test/fheap.c | 62 +++++++++++++++++++++++++++---------------------------- test/set_extent.c | 18 ---------------- 4 files changed, 44 insertions(+), 52 deletions(-) diff --git a/src/H5Dearray.c b/src/H5Dearray.c index e9dbd0d..240afb7 100644 --- a/src/H5Dearray.c +++ b/src/H5Dearray.c @@ -1137,7 +1137,7 @@ H5D__earray_idx_get_addr(const H5D_chk_idx_info_t *idx_info, H5D_chunk_ud_t *uda H5VM_swizzle_coords(hsize_t, swizzled_coords, idx_info->layout->u.earray.unlim_dim); /* Calculate the index of this chunk */ - idx = H5VM_chunk_index(ndims, swizzled_coords, idx_info->layout->u.earray.swizzled_dim, idx_info->layout->u.earray.swizzled_down_chunks); + idx = H5VM_chunk_index(ndims, swizzled_coords, idx_info->layout->u.earray.swizzled_dim, idx_info->layout->u.earray.swizzled_max_down_chunks); } /* end if */ else { /* Calculate the index of this chunk */ @@ -1202,7 +1202,8 @@ H5D__earray_idx_resize(H5O_layout_chunk_t *layout) /* "Swizzle" constant dimensions for this dataset */ if(layout->u.earray.unlim_dim > 0) { - hsize_t swizzled_chunks[H5O_LAYOUT_NDIMS]; /* Swizzled form of # of chunks in each dimension */ + hsize_t swizzled_chunks[H5O_LAYOUT_NDIMS]; /* Swizzled form of # of chunks in each dimension */ + hsize_t swizzled_max_chunks[H5O_LAYOUT_NDIMS]; /* Swizzled form of max # of chunks in each dimension */ /* Get the swizzled chunk dimensions */ HDmemcpy(layout->u.earray.swizzled_dim, layout->dim, (layout->ndims - 1) * sizeof(layout->dim[0])); @@ -1215,6 +1216,14 @@ H5D__earray_idx_resize(H5O_layout_chunk_t *layout) /* Get the swizzled "down" sizes for each dimension */ if(H5VM_array_down((layout->ndims - 1), swizzled_chunks, layout->u.earray.swizzled_down_chunks) < 0) HGOTO_ERROR(H5E_DATASET, H5E_CANTSET, FAIL, "can't compute swizzled 'down' chunk size value") + + /* Get the swizzled max number of chunks in each dimension */ + HDmemcpy(swizzled_max_chunks, layout->max_chunks, (layout->ndims - 1) * sizeof(swizzled_max_chunks[0])); + H5VM_swizzle_coords(hsize_t, swizzled_max_chunks, layout->u.earray.unlim_dim); + + /* Get the swizzled max "down" sizes for each dimension */ + if(H5VM_array_down((layout->ndims - 1), swizzled_max_chunks, layout->u.earray.swizzled_max_down_chunks) < 0) + HGOTO_ERROR(H5E_DATASET, H5E_CANTSET, FAIL, "can't compute swizzled 'down' chunk size value") } /* end if */ done: @@ -1414,7 +1423,7 @@ H5D__earray_idx_remove(const H5D_chk_idx_info_t *idx_info, H5D_chunk_common_ud_t H5VM_swizzle_coords(hsize_t, swizzled_coords, idx_info->layout->u.earray.unlim_dim); /* Calculate the index of this chunk */ - idx = H5VM_chunk_index(ndims, swizzled_coords, idx_info->layout->u.earray.swizzled_dim, idx_info->layout->u.earray.swizzled_down_chunks); + idx = H5VM_chunk_index(ndims, swizzled_coords, idx_info->layout->u.earray.swizzled_dim, idx_info->layout->u.earray.swizzled_max_down_chunks); } /* end if */ else { /* Calculate the index of this chunk */ diff --git a/src/H5Oprivate.h b/src/H5Oprivate.h index f0fbe72..0a4ed74 100644 --- a/src/H5Oprivate.h +++ b/src/H5Oprivate.h @@ -584,6 +584,7 @@ typedef struct H5O_layout_chunk_earray_t { unsigned unlim_dim; /* Rank of unlimited dimension for dataset */ uint32_t swizzled_dim[H5O_LAYOUT_NDIMS]; /* swizzled chunk dimensions */ hsize_t swizzled_down_chunks[H5O_LAYOUT_NDIMS]; /* swizzled "down" size of number of chunks in each dimension */ + hsize_t swizzled_max_down_chunks[H5O_LAYOUT_NDIMS]; /* swizzled max "down" size of number of chunks in each dimension */ } H5O_layout_chunk_earray_t; typedef struct H5O_layout_chunk_bt2_t { diff --git a/test/fheap.c b/test/fheap.c index 77de4a8..d2a7900 100644 --- a/test/fheap.c +++ b/test/fheap.c @@ -553,7 +553,7 @@ begin_test(fheap_test_param_t *tparam, const char *base_desc, del_str = get_del_string(tparam); HDassert(del_str); test_desc = (char *)H5MM_malloc(HDstrlen(del_str) + HDstrlen(base_desc)); - sprintf(test_desc, base_desc, del_str); + HDsprintf(test_desc, base_desc, del_str); TESTING(test_desc); H5MM_xfree(del_str); H5MM_xfree(test_desc); @@ -7683,10 +7683,10 @@ test_man_incr_insert_remove(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_ TESTING("incremental object insertion and removal") for(i = 0; i < 100; i++) { - sprintf(obj1.b, "%s%d", "ABCDEFGHIJKLMNOPQRSTUVWXYZ", i); + HDsprintf(obj1.b, "%s%d", "ABCDEFGHIJKLMNOPQRSTUVWXYZ", i); for(j = 0; j < i; j++) { - sprintf(obj2.b, "%s%d", "ABCDEFGHIJKLMNOPQRSTUVWXYZ", j); + HDsprintf(obj2.b, "%s%d", "ABCDEFGHIJKLMNOPQRSTUVWXYZ", j); if(H5HF_remove(fh, dxpl, heap_id[j]) < 0) FAIL_STACK_ERROR @@ -16393,7 +16393,7 @@ main(void) * running time will be long. */ if(ExpressMode > 1) - printf("***Express test mode on. Some tests may be skipped\n"); + HDprintf("***Express test mode on. Some tests may be skipped\n"); else if(ExpressMode == 0) num_pb_fs = NUM_PB_FS; @@ -16475,12 +16475,12 @@ main(void) switch(curr_test) { /* "Normal" testing parameters */ case FHEAP_TEST_NORMAL: - puts("Testing with normal parameters"); + HDputs("Testing with normal parameters"); break; /* "Re-open heap" testing parameters */ case FHEAP_TEST_REOPEN: - puts("Testing with reopen heap flag set"); + HDputs("Testing with reopen heap flag set"); tparam.reopen_heap = FHEAP_TEST_REOPEN; break; @@ -16512,12 +16512,12 @@ main(void) switch(fill) { /* "Bulk fill" heap blocks with 'large' objects */ case FHEAP_TEST_FILL_LARGE: - puts("Bulk-filling blocks w/large objects"); + HDputs("Bulk-filling blocks w/large objects"); break; /* "Bulk fill" heap blocks with 'single' objects */ case FHEAP_TEST_FILL_SINGLE: - puts("Bulk-filling blocks w/single object"); + HDputs("Bulk-filling blocks w/single object"); break; /* An unknown test? */ @@ -16568,25 +16568,25 @@ main(void) * level of complexity gradually. -QAK */ if(ExpressMode > 1) - printf("***Express test mode on. test_man_start_5th_recursive_indirect is skipped\n"); + HDprintf("***Express test mode on. test_man_start_5th_recursive_indirect is skipped\n"); else nerrors += test_man_start_5th_recursive_indirect(fapl, &small_cparam, &tparam); /* * Test fractal heap object deletion */ - /* Simple removal */ - nerrors += test_man_remove_bogus(fapl, &small_cparam, &tparam); - nerrors += test_man_remove_one(fapl, &small_cparam, &tparam); - nerrors += test_man_remove_two(fapl, &small_cparam, &tparam); - nerrors += test_man_remove_one_larger(fapl, &small_cparam, &tparam); - tparam.del_dir = FHEAP_DEL_FORWARD; - nerrors += test_man_remove_two_larger(fapl, &small_cparam, &tparam); - tparam.del_dir = FHEAP_DEL_REVERSE; - nerrors += test_man_remove_two_larger(fapl, &small_cparam, &tparam); - tparam.del_dir = FHEAP_DEL_FORWARD; - nerrors += test_man_remove_three_larger(fapl, &small_cparam, &tparam); - tparam.del_dir = FHEAP_DEL_REVERSE; + /* Simple removal */ + nerrors += test_man_remove_bogus(fapl, &small_cparam, &tparam); + nerrors += test_man_remove_one(fapl, &small_cparam, &tparam); + nerrors += test_man_remove_two(fapl, &small_cparam, &tparam); + nerrors += test_man_remove_one_larger(fapl, &small_cparam, &tparam); + tparam.del_dir = FHEAP_DEL_FORWARD; + nerrors += test_man_remove_two_larger(fapl, &small_cparam, &tparam); + tparam.del_dir = FHEAP_DEL_REVERSE; + nerrors += test_man_remove_two_larger(fapl, &small_cparam, &tparam); + tparam.del_dir = FHEAP_DEL_FORWARD; + nerrors += test_man_remove_three_larger(fapl, &small_cparam, &tparam); + tparam.del_dir = FHEAP_DEL_REVERSE; nerrors += test_man_remove_three_larger(fapl, &small_cparam, &tparam); /* Incremental insert & removal */ @@ -16613,7 +16613,7 @@ main(void) nerrors += test_man_remove_first_two_rows(fapl, &small_cparam, &tparam); nerrors += test_man_remove_first_four_rows(fapl, &small_cparam, &tparam); if(ExpressMode > 1) - printf("***Express test mode on. Some tests skipped\n"); + HDprintf("***Express test mode on. Some tests skipped\n"); else { nerrors += test_man_remove_all_root_direct(fapl, &small_cparam, &tparam); nerrors += test_man_remove_2nd_indirect(fapl, &small_cparam, &tparam); @@ -16643,7 +16643,7 @@ main(void) nerrors += test_man_fill_3rd_direct_less_one_fill_direct_wrap_start_block_add_skipped(fapl, &small_cparam, &tparam); nerrors += test_man_fill_1st_row_3rd_direct_fill_2nd_direct_less_one_wrap_start_block_add_skipped(fapl, &small_cparam, &tparam); if(ExpressMode > 1) - printf("***Express test mode on. Some tests skipped\n"); + HDprintf("***Express test mode on. Some tests skipped\n"); else { nerrors += test_man_fill_3rd_direct_fill_direct_skip_start_block_add_skipped(fapl, &small_cparam, &tparam); nerrors += test_man_fill_3rd_direct_fill_2nd_direct_fill_direct_skip_3rd_indirect_start_block_add_skipped(fapl, &small_cparam, &tparam); @@ -16684,12 +16684,12 @@ main(void) switch(id_len) { /* Use "normal" form for 'huge' object's heap IDs */ case 0: - puts("Using 'normal' heap ID format for 'huge' objects"); + HDputs("Using 'normal' heap ID format for 'huge' objects"); break; /* Use "direct" form for 'huge' object's heap IDs */ case 1: - puts("Using 'direct' heap ID format for 'huge' objects"); + HDputs("Using 'direct' heap ID format for 'huge' objects"); /* Adjust actual length of heap IDs for directly storing 'huge' object's file offset & length in heap ID */ tparam.actual_id_len = 17; /* 1 + 8 (file address size) + 8 (file length size) */ @@ -16698,7 +16698,7 @@ main(void) /* Use "direct" storage for 'huge' objects and larger IDs for 'tiny' objects */ case 2: small_cparam.id_len = 37; - puts("Using 'direct' heap ID format for 'huge' objects and larger IDs for 'tiny' objects"); + HDputs("Using 'direct' heap ID format for 'huge' objects and larger IDs for 'tiny' objects"); tparam.actual_id_len = 37; break; @@ -16756,10 +16756,10 @@ main(void) /* Random object insertion & deletion */ if(ExpressMode > 1) - printf("***Express test mode on. Some tests skipped\n"); + HDprintf("***Express test mode on. Some tests skipped\n"); else { /* Random tests using "small" heap creation parameters */ - puts("Using 'small' heap creation parameters"); + HDputs("Using 'small' heap creation parameters"); /* (reduce size of tests when re-opening each time) */ /* XXX: Try to speed things up enough that these tests don't have to be reduced when re-opening */ @@ -16772,7 +16772,7 @@ main(void) nerrors += test_random_pow2((curr_test == FHEAP_TEST_NORMAL ? (hsize_t)(100*1000*1000) : (hsize_t)(4*1000*1000)), fapl, &small_cparam, &tparam); /* Random tests using "large" heap creation parameters */ - puts("Using 'large' heap creation parameters"); + HDputs("Using 'large' heap creation parameters"); tparam.actual_id_len = LARGE_HEAP_ID_LEN; /* (reduce size of tests when re-opening each time) */ @@ -16818,7 +16818,7 @@ main(void) if(nerrors) goto error; - puts("All fractal heap tests passed."); + HDputs("All fractal heap tests passed."); /* Release space for the shared objects */ H5MM_xfree(shared_wobj_g); @@ -16840,7 +16840,7 @@ HDfprintf(stderr, "Uncomment cleanup!\n"); return 0; error: - puts("*** TESTS FAILED ***"); + HDputs("*** TESTS FAILED ***"); H5E_BEGIN_TRY { H5MM_xfree(shared_wobj_g); H5MM_xfree(shared_robj_g); diff --git a/test/set_extent.c b/test/set_extent.c index 949120b..052a35a 100644 --- a/test/set_extent.c +++ b/test/set_extent.c @@ -2603,15 +2603,6 @@ static int test_random_rank4( hid_t fapl, hid_t dcpl, hbool_t do_fillvalue, volatile unsigned i, j, k, l, m; /* Local indices */ char filename[NAME_BUF_SIZE]; - /* *** FIXME *** - * Skip the test if an extensible array index is requested, as resizing - * them is broken. - * - * Remove these lines as appropriate when these problems are fixed. - */ - if(index_type == RANK4_INDEX_EARRAY) - return 0; - /* create a new file */ h5_fixname(FILENAME[4], fapl, filename, sizeof filename); if ((file = H5Fcreate(filename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0) @@ -2816,15 +2807,6 @@ static int test_random_rank4_vl( hid_t fapl, hid_t dcpl, hbool_t do_fillvalue, volatile unsigned i, j, k, l, m; /* Local indices */ char filename[NAME_BUF_SIZE]; - /* *** FIXME *** - * Skip the test if an extensible array index is requested, as resizing - * them is broken. - * - * Remove these lines as appropriate when these problems are fixed. - */ - if(index_type == RANK4_INDEX_EARRAY) - return 0; - /* Initialize fill value buffers so they aren't freed in case of an error */ fill_value.len = 0; fill_value.p = NULL; -- cgit v0.12 From 53132d8864dc5733aaf9d19d2d4b7675f52f2eff Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Wed, 12 Apr 2017 17:21:43 -0500 Subject: Due to HDFVIEW-19 add read VL as string function --- java/src/hdf/hdf5lib/H5.java | 3 ++ java/src/jni/h5dImp.c | 91 ++++++++++++++++++++++++++++++++++++++++++++ java/src/jni/h5dImp.h | 9 +++++ 3 files changed, 103 insertions(+) diff --git a/java/src/hdf/hdf5lib/H5.java b/java/src/hdf/hdf5lib/H5.java index e47ba76..48b2402 100644 --- a/java/src/hdf/hdf5lib/H5.java +++ b/java/src/hdf/hdf5lib/H5.java @@ -1798,6 +1798,9 @@ public class H5 implements java.io.Serializable { return H5Dread_short(dataset_id, mem_type_id, mem_space_id, file_space_id, xfer_plist_id, buf, true); } + public synchronized static native int H5DreadVL(long dataset_id, long mem_type_id, long mem_space_id, + long file_space_id, long xfer_plist_id, Object[] buf) throws HDF5LibraryException, NullPointerException; + public synchronized static native int H5Dread_string(long dataset_id, long mem_type_id, long mem_space_id, long file_space_id, long xfer_plist_id, String[] buf) throws HDF5LibraryException, NullPointerException; diff --git a/java/src/jni/h5dImp.c b/java/src/jni/h5dImp.c index 9765dc8..0bb015e 100644 --- a/java/src/jni/h5dImp.c +++ b/java/src/jni/h5dImp.c @@ -55,6 +55,7 @@ extern jobject visit_callback; /* Local Prototypes */ /********************/ +static herr_t H5DreadVL_asstr (JNIEnv *env, hid_t did, hid_t tid, hid_t mem_sid, hid_t file_sid, hid_t xfer_plist_id, jobjectArray buf); static herr_t H5DreadVL_str (JNIEnv *env, hid_t did, hid_t tid, hid_t mem_sid, hid_t file_sid, hid_t xfer_plist_id, jobjectArray buf); static herr_t H5DreadVL_array (JNIEnv *env, hid_t did, hid_t tid, hid_t mem_sid, hid_t file_sid, hid_t xfer_plist_id, jobjectArray buf); static herr_t H5DwriteVL_str (JNIEnv *env, hid_t did, hid_t tid, hid_t mem_sid, hid_t file_sid, hid_t xfer_plist_id, jobjectArray buf); @@ -994,6 +995,96 @@ Java_hdf_hdf5lib_H5_H5Dwrite_1double /* * Class: hdf_hdf5lib_H5 + * Method: H5DreadVL + * Signature: (JJJJJ[Ljava/lang/String;)I + */ +JNIEXPORT jint JNICALL +Java_hdf_hdf5lib_H5_H5DreadVL + (JNIEnv *env, jclass clss, jlong dataset_id, jlong mem_type_id, jlong mem_space_id, + jlong file_space_id, jlong xfer_plist_id, jobjectArray buf) +{ + herr_t status = -1; + htri_t isVlenStr=0; + + if (buf == NULL) { + h5nullArgument(env, "H5DreadVL: buf is NULL"); + } /* end if */ + else { + isVlenStr = H5Tdetect_class((hid_t)mem_type_id, H5T_STRING); + + if (isVlenStr) + h5badArgument(env, "H5DreadVL: type is not variable length non-string"); + else + status = H5DreadVL_asstr(env, (hid_t)dataset_id, (hid_t)mem_type_id, + (hid_t)mem_space_id, (hid_t)file_space_id, + (hid_t)xfer_plist_id, buf); + } /* end else */ + + return (jint)status; +} /* end Java_hdf_hdf5lib_H5_H5Dread_1VLStrings */ + +herr_t +H5DreadVL_asstr + (JNIEnv *env, hid_t did, hid_t tid, hid_t mem_sid, hid_t file_sid, hid_t xfer_plist_id, jobjectArray buf) +{ + jint i; + jint n; + jstring jstr; + h5str_t h5str; + hvl_t *rdata; + size_t size; + size_t max_len = 0; + herr_t status = -1; + + n = ENVPTR->GetArrayLength(ENVPAR buf); + rdata = (hvl_t*)HDcalloc((size_t)n, sizeof(hvl_t)); + if (rdata == NULL) { + h5JNIFatalError(env, "H5DreadVL_notstr: failed to allocate buff for read"); + } /* end if */ + else { + status = H5Dread(did, tid, mem_sid, file_sid, xfer_plist_id, rdata); + + if (status < 0) { + H5Dvlen_reclaim(tid, mem_sid, xfer_plist_id, rdata); + HDfree(rdata); + h5JNIFatalError(env, "H5DreadVL_notstr: failed to read data"); + } /* end if */ + else { + max_len = 1; + for (i=0; i < n; i++) { + if ((rdata + i)->len > max_len) + max_len = (rdata + i)->len; + } + + size = H5Tget_size(tid) * max_len; + HDmemset(&h5str, 0, sizeof(h5str_t)); + h5str_new(&h5str, 4 * size); + + if (h5str.s == NULL) { + H5Dvlen_reclaim(tid, mem_sid, xfer_plist_id, rdata); + HDfree(rdata); + h5JNIFatalError(env, "H5DreadVL_notstr: failed to allocate buf"); + } /* end if */ + else { + for (i=0; i < n; i++) { + h5str.s[0] = '\0'; + h5str_sprintf(&h5str, did, tid, rdata+i, 0); + jstr = ENVPTR->NewStringUTF(ENVPAR h5str.s); + ENVPTR->SetObjectArrayElement(ENVPAR buf, i, jstr); + } /* end for */ + h5str_free(&h5str); + + H5Dvlen_reclaim(tid, mem_sid, xfer_plist_id, rdata); + HDfree(rdata); + } /* end else */ + } /* end else */ + } /* end else */ + + return status; +} + +/* + * Class: hdf_hdf5lib_H5 * Method: H5Dread_string * Signature: (JJJJJ[Ljava/lang/String;)I */ diff --git a/java/src/jni/h5dImp.h b/java/src/jni/h5dImp.h index eb26265..e79c590 100644 --- a/java/src/jni/h5dImp.h +++ b/java/src/jni/h5dImp.h @@ -206,6 +206,15 @@ Java_hdf_hdf5lib_H5_H5Dwrite_1double /* * Class: hdf_hdf5lib_H5 + * Method: H5DreadVL + * Signature: (JJJJJ[Ljava/lang/String;)I + */ +JNIEXPORT jint JNICALL +Java_hdf_hdf5lib_H5_H5DreadVL +(JNIEnv*, jclass, jlong, jlong, jlong, jlong, jlong, jobjectArray); + +/* + * Class: hdf_hdf5lib_H5 * Method: H5Dread_string * Signature: (JJJJJ[Ljava/lang/String;)I */ -- cgit v0.12 From 25ec07450af4d2bc4da2478bc3652a6772c73109 Mon Sep 17 00:00:00 2001 From: lrknox Date: Fri, 14 Apr 2017 11:54:16 -0500 Subject: Change copyright headers to replace url referring to file to be removed and replace it with new url for COPYING file. Fix 2 lines in java error test expected output file where messages include line numbers changed by reducing the copyright header by 2 lines. --- .autom4te.cfg | 10 +++---- .h5chkright.ini | 10 +++---- MANIFEST | 10 +++---- Makefile.am | 10 +++---- Makefile.dist | 10 +++---- autogen.sh | 10 +++---- bin/bbrelease | 10 +++---- bin/buildhdf5 | 10 +++---- bin/checkapi | 10 +++---- bin/checkposix | 10 +++---- bin/chkconfigure | 12 ++++---- bin/chkcopyright | 10 +++---- bin/chkmanifest | 10 +++---- bin/debug-ohdr | 10 +++---- bin/dependencies | 10 +++---- bin/deploy | 10 +++---- bin/distdep | 10 +++---- bin/errors | 10 +++---- bin/gcov_script | 10 +++---- bin/genparser | 10 +++---- bin/h5vers | 10 +++---- bin/iostats | 10 +++---- bin/locate_sw | 10 +++---- bin/make_err | 20 +++++-------- bin/make_overflow | 20 +++++-------- bin/make_vers | 20 +++++-------- bin/mkdirs | 10 +++---- bin/newer | 10 +++---- bin/output_filter.sh | 10 +++---- bin/pkgscrpts/h5rmflags | 10 +++---- bin/pkgscrpts/makeHDF5BinaryTarfiles.pl | 10 +++---- bin/release | 10 +++---- bin/restore.sh | 10 +++---- bin/runtest | 10 +++---- bin/snapshot | 10 +++---- bin/snapshot_version | 10 +++---- bin/switch_maint_mode | 10 +++---- bin/timekeeper | 10 +++---- bin/trace | 10 +++---- c++/Makefile.am | 10 +++---- c++/examples/Makefile.am | 10 +++---- c++/examples/chunks.cpp | 10 +++---- c++/examples/compound.cpp | 10 +++---- c++/examples/create.cpp | 10 +++---- c++/examples/extend_ds.cpp | 10 +++---- c++/examples/h5group.cpp | 10 +++---- c++/examples/h5tutr_cmprss.cpp | 10 +++---- c++/examples/h5tutr_crtatt.cpp | 10 +++---- c++/examples/h5tutr_crtdat.cpp | 10 +++---- c++/examples/h5tutr_crtgrp.cpp | 10 +++---- c++/examples/h5tutr_crtgrpar.cpp | 10 +++---- c++/examples/h5tutr_crtgrpd.cpp | 10 +++---- c++/examples/h5tutr_extend.cpp | 10 +++---- c++/examples/h5tutr_rdwt.cpp | 10 +++---- c++/examples/h5tutr_subset.cpp | 10 +++---- c++/examples/readdata.cpp | 10 +++---- c++/examples/run-c++-ex.sh.in | 10 +++---- c++/examples/testh5c++.sh.in | 10 +++---- c++/examples/writedata.cpp | 10 +++---- c++/src/H5AbstractDs.cpp | 10 +++---- c++/src/H5AbstractDs.h | 10 +++---- c++/src/H5Alltypes.h | 10 +++---- c++/src/H5ArrayType.cpp | 10 +++---- c++/src/H5ArrayType.h | 10 +++---- c++/src/H5AtomType.cpp | 10 +++---- c++/src/H5AtomType.h | 10 +++---- c++/src/H5Attribute.cpp | 10 +++---- c++/src/H5Attribute.h | 10 +++---- c++/src/H5Classes.h | 10 +++---- c++/src/H5CommonFG.cpp | 10 +++---- c++/src/H5CommonFG.h | 10 +++---- c++/src/H5CompType.cpp | 10 +++---- c++/src/H5CompType.h | 10 +++---- c++/src/H5Cpp.h | 10 +++---- c++/src/H5CppDoc.h | 10 +++---- c++/src/H5DataSet.cpp | 10 +++---- c++/src/H5DataSet.h | 10 +++---- c++/src/H5DataSpace.cpp | 10 +++---- c++/src/H5DataSpace.h | 10 +++---- c++/src/H5DataType.cpp | 10 +++---- c++/src/H5DataType.h | 10 +++---- c++/src/H5DcreatProp.cpp | 10 +++---- c++/src/H5DcreatProp.h | 10 +++---- c++/src/H5DxferProp.cpp | 10 +++---- c++/src/H5DxferProp.h | 10 +++---- c++/src/H5EnumType.cpp | 10 +++---- c++/src/H5EnumType.h | 10 +++---- c++/src/H5Exception.cpp | 10 +++---- c++/src/H5Exception.h | 10 +++---- c++/src/H5FaccProp.cpp | 10 +++---- c++/src/H5FaccProp.h | 10 +++---- c++/src/H5FcreatProp.cpp | 10 +++---- c++/src/H5FcreatProp.h | 10 +++---- c++/src/H5File.cpp | 10 +++---- c++/src/H5File.h | 10 +++---- c++/src/H5FloatType.cpp | 10 +++---- c++/src/H5FloatType.h | 10 +++---- c++/src/H5Group.cpp | 10 +++---- c++/src/H5Group.h | 10 +++---- c++/src/H5IdComponent.cpp | 10 +++---- c++/src/H5IdComponent.h | 10 +++---- c++/src/H5Include.h | 10 +++---- c++/src/H5IntType.cpp | 10 +++---- c++/src/H5IntType.h | 10 +++---- c++/src/H5LaccProp.cpp | 10 +++---- c++/src/H5LaccProp.h | 10 +++---- c++/src/H5Library.cpp | 10 +++---- c++/src/H5Library.h | 10 +++---- c++/src/H5Location.cpp | 10 +++---- c++/src/H5Location.h | 10 +++---- c++/src/H5Object.cpp | 10 +++---- c++/src/H5Object.h | 10 +++---- c++/src/H5OcreatProp.cpp | 10 +++---- c++/src/H5OcreatProp.h | 10 +++---- c++/src/H5PredType.cpp | 10 +++---- c++/src/H5PredType.h | 10 +++---- c++/src/H5PropList.cpp | 10 +++---- c++/src/H5PropList.h | 10 +++---- c++/src/H5StrType.cpp | 10 +++---- c++/src/H5StrType.h | 10 +++---- c++/src/H5VarLenType.cpp | 10 +++---- c++/src/H5VarLenType.h | 10 +++---- c++/src/Makefile.am | 10 +++---- c++/src/h5c++.in | 10 +++---- c++/src/header.html | 10 +++---- c++/test/H5srcdir_str.h.in | 10 +++---- c++/test/Makefile.am | 10 +++---- c++/test/dsets.cpp | 10 +++---- c++/test/h5cpputil.cpp | 10 +++---- c++/test/h5cpputil.h | 10 +++---- c++/test/tarray.cpp | 10 +++---- c++/test/tattr.cpp | 10 +++---- c++/test/tcompound.cpp | 10 +++---- c++/test/tdspl.cpp | 10 +++---- c++/test/testhdf5.cpp | 10 +++---- c++/test/tfile.cpp | 10 +++---- c++/test/tfilter.cpp | 10 +++---- c++/test/th5s.cpp | 10 +++---- c++/test/titerate.cpp | 10 +++---- c++/test/tlinks.cpp | 10 +++---- c++/test/tobject.cpp | 10 +++---- c++/test/trefer.cpp | 10 +++---- c++/test/ttypes.cpp | 10 +++---- c++/test/tvlstr.cpp | 10 +++---- config/BlankForm | 10 +++---- config/Makefile.am.blank | 10 +++---- config/apple | 10 +++---- config/cce-fflags | 10 +++---- config/cce-flags | 10 +++---- config/commence.am | 10 +++---- config/conclude.am | 10 +++---- config/conclude_fc.am | 10 +++---- config/cygwin | 10 +++---- config/examples.am | 10 +++---- config/freebsd | 10 +++---- config/gnu-cxxflags | 10 +++---- config/gnu-fflags | 10 +++---- config/gnu-flags | 10 +++---- config/ibm-aix | 10 +++---- config/ibm-flags | 10 +++---- config/intel-fflags | 10 +++---- config/intel-flags | 10 +++---- config/linux-gnu | 10 +++---- config/linux-gnuaout | 10 +++---- config/linux-gnulibc1 | 10 +++---- config/linux-gnulibc2 | 10 +++---- config/lt_vers.am | 34 +++++----------------- config/pgi-fflags | 10 +++---- config/pgi-flags | 10 +++---- config/site-specific/BlankForm | 10 +++---- config/solaris | 10 +++---- configure.ac | 10 +++---- examples/Makefile.am | 10 +++---- examples/h5_attribute.c | 10 +++---- examples/h5_chunk_read.c | 10 +++---- examples/h5_cmprss.c | 10 +++---- examples/h5_compound.c | 10 +++---- examples/h5_crtatt.c | 10 +++---- examples/h5_crtdat.c | 10 +++---- examples/h5_crtgrp.c | 10 +++---- examples/h5_crtgrpar.c | 10 +++---- examples/h5_crtgrpd.c | 10 +++---- examples/h5_drivers.c | 10 +++---- examples/h5_dtransform.c | 10 +++---- examples/h5_elink_unix2win.c | 10 +++---- examples/h5_extend.c | 10 +++---- examples/h5_extend_write.c | 10 +++---- examples/h5_extlink.c | 10 +++---- examples/h5_group.c | 10 +++---- examples/h5_interm_group.c | 10 +++---- examples/h5_mount.c | 10 +++---- examples/h5_rdwt.c | 10 +++---- examples/h5_read.c | 10 +++---- examples/h5_ref2reg.c | 10 +++---- examples/h5_reference.c | 10 +++---- examples/h5_select.c | 10 +++---- examples/h5_shared_mesg.c | 10 +++---- examples/h5_subset.c | 10 +++---- examples/h5_vds.c | 10 +++---- examples/h5_write.c | 10 +++---- examples/ph5example.c | 10 +++---- examples/run-all-ex.sh | 10 +++---- examples/run-c-ex.sh.in | 10 +++---- examples/testh5cc.sh.in | 10 +++---- fortran/Makefile.am | 10 +++---- fortran/examples/Makefile.am | 10 +++---- fortran/examples/compound.f90 | 10 +++---- fortran/examples/compound_complex_fortran2003.f90 | 10 +++---- fortran/examples/compound_fortran2003.f90 | 10 +++---- fortran/examples/h5_cmprss.f90 | 10 +++---- fortran/examples/h5_crtatt.f90 | 10 +++---- fortran/examples/h5_crtdat.f90 | 10 +++---- fortran/examples/h5_crtgrp.f90 | 10 +++---- fortran/examples/h5_crtgrpar.f90 | 10 +++---- fortran/examples/h5_crtgrpd.f90 | 10 +++---- fortran/examples/h5_extend.f90 | 10 +++---- fortran/examples/h5_rdwt.f90 | 10 +++---- fortran/examples/h5_subset.f90 | 10 +++---- fortran/examples/hyperslab.f90 | 10 +++---- fortran/examples/mountexample.f90 | 10 +++---- fortran/examples/nested_derived_type.f90 | 10 +++---- fortran/examples/ph5example.f90 | 10 +++---- fortran/examples/refobjexample.f90 | 10 +++---- fortran/examples/refregexample.f90 | 10 +++---- fortran/examples/run-fortran-ex.sh.in | 10 +++---- fortran/examples/rwdset_fortran2003.f90 | 10 +++---- fortran/examples/selectele.f90 | 10 +++---- fortran/examples/testh5fc.sh.in | 10 +++---- fortran/src/H5Af.c | 10 +++---- fortran/src/H5Aff.F90 | 10 +++---- fortran/src/H5Df.c | 10 +++---- fortran/src/H5Dff.F90 | 10 +++---- fortran/src/H5Ef.c | 10 +++---- fortran/src/H5Eff.F90 | 10 +++---- fortran/src/H5Ff.c | 10 +++---- fortran/src/H5Fff.F90 | 10 +++---- fortran/src/H5Gf.c | 10 +++---- fortran/src/H5Gff.F90 | 10 +++---- fortran/src/H5If.c | 10 +++---- fortran/src/H5Iff.F90 | 10 +++---- fortran/src/H5Lf.c | 10 +++---- fortran/src/H5Lff.F90 | 10 +++---- fortran/src/H5Of.c | 10 +++---- fortran/src/H5Off.F90 | 10 +++---- fortran/src/H5Pf.c | 10 +++---- fortran/src/H5Pff.F90 | 10 +++---- fortran/src/H5Rf.c | 10 +++---- fortran/src/H5Rff.F90 | 10 +++---- fortran/src/H5Sf.c | 10 +++---- fortran/src/H5Sff.F90 | 10 +++---- fortran/src/H5Tf.c | 10 +++---- fortran/src/H5Tff.F90 | 10 +++---- fortran/src/H5Zf.c | 10 +++---- fortran/src/H5Zff.F90 | 10 +++---- fortran/src/H5_buildiface.F90 | 20 +++++-------- fortran/src/H5_f.c | 10 +++---- fortran/src/H5_ff.F90 | 10 +++---- fortran/src/H5f90.h | 10 +++---- fortran/src/H5f90global.F90 | 10 +++---- fortran/src/H5f90i.h | 10 +++---- fortran/src/H5f90kit.c | 10 +++---- fortran/src/H5f90proto.h | 10 +++---- fortran/src/H5fortkit.F90 | 10 +++---- fortran/src/H5match_types.c | 30 ++++++++----------- fortran/src/HDF5.F90 | 10 +++---- fortran/src/Makefile.am | 10 +++---- fortran/src/h5fc.in | 10 +++---- fortran/test/H5_test_buildiface.F90 | 20 +++++-------- fortran/test/Makefile.am | 10 +++---- fortran/test/fflush1.F90 | 10 +++---- fortran/test/fflush2.F90 | 10 +++---- fortran/test/fortranlib_test.F90 | 10 +++---- fortran/test/fortranlib_test_1_8.F90 | 10 +++---- fortran/test/fortranlib_test_F03.F90 | 10 +++---- fortran/test/t.c | 10 +++---- fortran/test/t.h | 10 +++---- fortran/test/tH5A.F90 | 10 +++---- fortran/test/tH5A_1_8.F90 | 10 +++---- fortran/test/tH5D.F90 | 10 +++---- fortran/test/tH5E.F90 | 10 +++---- fortran/test/tH5E_F03.F90 | 10 +++---- fortran/test/tH5F.F90 | 10 +++---- fortran/test/tH5F_F03.F90 | 10 +++---- fortran/test/tH5G.F90 | 10 +++---- fortran/test/tH5G_1_8.F90 | 10 +++---- fortran/test/tH5I.F90 | 10 +++---- fortran/test/tH5L_F03.F90 | 10 +++---- fortran/test/tH5MISC_1_8.F90 | 10 +++---- fortran/test/tH5O.F90 | 10 +++---- fortran/test/tH5O_F03.F90 | 10 +++---- fortran/test/tH5P.F90 | 10 +++---- fortran/test/tH5P_F03.F90 | 10 +++---- fortran/test/tH5R.F90 | 10 +++---- fortran/test/tH5S.F90 | 10 +++---- fortran/test/tH5Sselect.F90 | 10 +++---- fortran/test/tH5T.F90 | 10 +++---- fortran/test/tH5T_F03.F90 | 10 +++---- fortran/test/tH5VL.F90 | 10 +++---- fortran/test/tH5Z.F90 | 10 +++---- fortran/test/tHDF5.F90 | 10 +++---- fortran/test/tHDF5_1_8.F90 | 10 +++---- fortran/test/tHDF5_F03.F90 | 10 +++---- fortran/test/tf.F90 | 10 +++---- fortran/testpar/Makefile.am | 10 +++---- fortran/testpar/hyper.f90 | 10 +++---- fortran/testpar/mdset.f90 | 10 +++---- fortran/testpar/ptest.f90 | 10 +++---- hl/Makefile.am | 10 +++---- hl/c++/Makefile.am | 10 +++---- hl/c++/examples/Makefile.am | 10 +++---- hl/c++/examples/ptExampleFL.cpp | 10 +++---- hl/c++/examples/run-hlc++-ex.sh.in | 10 +++---- hl/c++/src/H5PacketTable.cpp | 10 +++---- hl/c++/src/H5PacketTable.h | 10 +++---- hl/c++/src/Makefile.am | 10 +++---- hl/c++/test/Makefile.am | 10 +++---- hl/c++/test/ptableTest.cpp | 10 +++---- hl/c++/test/ptableTest.h | 10 +++---- hl/examples/Makefile.am | 10 +++---- hl/examples/ex_ds1.c | 10 +++---- hl/examples/ex_image1.c | 10 +++---- hl/examples/ex_image2.c | 10 +++---- hl/examples/ex_lite1.c | 10 +++---- hl/examples/ex_lite2.c | 10 +++---- hl/examples/ex_lite3.c | 10 +++---- hl/examples/ex_table_01.c | 10 +++---- hl/examples/ex_table_02.c | 10 +++---- hl/examples/ex_table_03.c | 10 +++---- hl/examples/ex_table_04.c | 10 +++---- hl/examples/ex_table_05.c | 10 +++---- hl/examples/ex_table_06.c | 10 +++---- hl/examples/ex_table_07.c | 10 +++---- hl/examples/ex_table_08.c | 10 +++---- hl/examples/ex_table_09.c | 10 +++---- hl/examples/ex_table_10.c | 10 +++---- hl/examples/ex_table_11.c | 10 +++---- hl/examples/ex_table_12.c | 10 +++---- hl/examples/pal_rgb.h | 10 +++---- hl/examples/ptExampleFL.c | 10 +++---- hl/examples/run-hl-ex.sh | 10 +++---- hl/examples/run-hlc-ex.sh.in | 10 +++---- hl/fortran/Makefile.am | 10 +++---- hl/fortran/examples/Makefile.am | 10 +++---- hl/fortran/examples/ex_ds1.f90 | 10 +++---- hl/fortran/examples/exlite.f90 | 10 +++---- hl/fortran/examples/run-hlfortran-ex.sh.in | 10 +++---- hl/fortran/src/H5DSfc.c | 10 +++---- hl/fortran/src/H5DSff.F90 | 10 +++---- hl/fortran/src/H5HL_buildiface.F90 | 30 ++++++++----------- hl/fortran/src/H5IMcc.c | 10 +++---- hl/fortran/src/H5IMcc.h | 10 +++---- hl/fortran/src/H5IMfc.c | 10 +++---- hl/fortran/src/H5IMff.F90 | 10 +++---- hl/fortran/src/H5LTf90proto.h | 10 +++---- hl/fortran/src/H5LTfc.c | 10 +++---- hl/fortran/src/H5LTff.F90 | 10 +++---- hl/fortran/src/H5TBfc.c | 10 +++---- hl/fortran/src/H5TBff.F90 | 10 +++---- hl/fortran/src/Makefile.am | 10 +++---- hl/fortran/test/Makefile.am | 10 +++---- hl/fortran/test/tstds.F90 | 10 +++---- hl/fortran/test/tstimage.F90 | 10 +++---- hl/fortran/test/tstlite.F90 | 10 +++---- hl/fortran/test/tsttable.F90 | 10 +++---- hl/src/H5DO.c | 10 +++---- hl/src/H5DOpublic.h | 10 +++---- hl/src/H5DS.c | 10 +++---- hl/src/H5DSprivate.h | 10 +++---- hl/src/H5DSpublic.h | 10 +++---- hl/src/H5HLprivate2.h | 10 +++---- hl/src/H5IM.c | 10 +++---- hl/src/H5IMprivate.h | 10 +++---- hl/src/H5IMpublic.h | 10 +++---- hl/src/H5LD.c | 10 +++---- hl/src/H5LDprivate.h | 10 +++---- hl/src/H5LDpublic.h | 10 +++---- hl/src/H5LT.c | 10 +++---- hl/src/H5LTanalyze.c | 10 +++---- hl/src/H5LTanalyze.l | 10 +++---- hl/src/H5LTparse.y | 10 +++---- hl/src/H5LTprivate.h | 10 +++---- hl/src/H5LTpublic.h | 10 +++---- hl/src/H5PT.c | 10 +++---- hl/src/H5PTprivate.h | 10 +++---- hl/src/H5PTpublic.h | 10 +++---- hl/src/H5TB.c | 10 +++---- hl/src/H5TBprivate.h | 10 +++---- hl/src/H5TBpublic.h | 10 +++---- hl/src/Makefile.am | 10 +++---- hl/src/hdf5_hl.h | 10 +++---- hl/test/H5srcdir_str.h.in | 10 +++---- hl/test/Makefile.am | 10 +++---- hl/test/dectris_hl_perf.c | 10 +++---- hl/test/gen_test_ds.c | 10 +++---- hl/test/h5hltest.h | 10 +++---- hl/test/pal_rgb.h | 10 +++---- hl/test/test_ds.c | 10 +++---- hl/test/test_dset_append.c | 10 +++---- hl/test/test_dset_opt.c | 10 +++---- hl/test/test_file_image.c | 10 +++---- hl/test/test_image.c | 10 +++---- hl/test/test_ld.c | 10 +++---- hl/test/test_lite.c | 10 +++---- hl/test/test_packet.c | 10 +++---- hl/test/test_packet_vlen.c | 10 +++---- hl/test/test_table.c | 10 +++---- hl/tools/Makefile.am | 10 +++---- hl/tools/gif2h5/Makefile.am | 10 +++---- hl/tools/gif2h5/decompress.c | 10 +++---- hl/tools/gif2h5/gif.h | 10 +++---- hl/tools/gif2h5/gif2hdf.c | 10 +++---- hl/tools/gif2h5/gif2mem.c | 10 +++---- hl/tools/gif2h5/gifread.c | 10 +++---- hl/tools/gif2h5/h52gifgentst.c | 10 +++---- hl/tools/gif2h5/h52giftest.sh.in | 10 +++---- hl/tools/gif2h5/hdf2gif.c | 10 +++---- hl/tools/gif2h5/hdfgifwr.c | 10 +++---- hl/tools/gif2h5/writehdf.c | 10 +++---- hl/tools/h5watch/Makefile.am | 10 +++---- hl/tools/h5watch/extend_dset.c | 10 +++---- hl/tools/h5watch/h5watch.c | 10 +++---- hl/tools/h5watch/h5watchgentest.c | 10 +++---- hl/tools/h5watch/swmr_check_compat_vfd.c | 10 +++---- hl/tools/h5watch/testh5watch.sh.in | 10 +++---- java/Makefile.am | 10 +++---- java/examples/Makefile.am | 10 +++---- java/examples/datasets/H5Ex_D_Alloc.java | 10 +++---- java/examples/datasets/H5Ex_D_Checksum.java | 10 +++---- java/examples/datasets/H5Ex_D_Chunk.java | 10 +++---- java/examples/datasets/H5Ex_D_Compact.java | 10 +++---- java/examples/datasets/H5Ex_D_External.java | 10 +++---- java/examples/datasets/H5Ex_D_FillValue.java | 10 +++---- java/examples/datasets/H5Ex_D_Gzip.java | 10 +++---- java/examples/datasets/H5Ex_D_Hyperslab.java | 10 +++---- java/examples/datasets/H5Ex_D_Nbit.java | 10 +++---- java/examples/datasets/H5Ex_D_ReadWrite.java | 10 +++---- java/examples/datasets/H5Ex_D_Shuffle.java | 10 +++---- java/examples/datasets/H5Ex_D_Sofloat.java | 10 +++---- java/examples/datasets/H5Ex_D_Soint.java | 10 +++---- java/examples/datasets/H5Ex_D_Szip.java | 10 +++---- java/examples/datasets/H5Ex_D_Transform.java | 10 +++---- java/examples/datasets/H5Ex_D_UnlimitedAdd.java | 10 +++---- java/examples/datasets/H5Ex_D_UnlimitedGzip.java | 10 +++---- java/examples/datasets/H5Ex_D_UnlimitedMod.java | 10 +++---- java/examples/datasets/Makefile.am | 10 +++---- java/examples/datasets/runExample.sh.in | 10 +++---- java/examples/datatypes/H5Ex_T_Array.java | 10 +++---- java/examples/datatypes/H5Ex_T_ArrayAttribute.java | 10 +++---- java/examples/datatypes/H5Ex_T_Bit.java | 10 +++---- java/examples/datatypes/H5Ex_T_BitAttribute.java | 10 +++---- java/examples/datatypes/H5Ex_T_Commit.java | 10 +++---- java/examples/datatypes/H5Ex_T_Compound.java | 10 +++---- .../datatypes/H5Ex_T_CompoundAttribute.java | 10 +++---- java/examples/datatypes/H5Ex_T_Float.java | 10 +++---- java/examples/datatypes/H5Ex_T_FloatAttribute.java | 10 +++---- java/examples/datatypes/H5Ex_T_Integer.java | 10 +++---- .../datatypes/H5Ex_T_IntegerAttribute.java | 10 +++---- .../examples/datatypes/H5Ex_T_ObjectReference.java | 10 +++---- .../datatypes/H5Ex_T_ObjectReferenceAttribute.java | 10 +++---- java/examples/datatypes/H5Ex_T_Opaque.java | 10 +++---- .../examples/datatypes/H5Ex_T_OpaqueAttribute.java | 10 +++---- java/examples/datatypes/H5Ex_T_String.java | 10 +++---- .../examples/datatypes/H5Ex_T_StringAttribute.java | 10 +++---- java/examples/datatypes/H5Ex_T_VLString.java | 10 +++---- java/examples/datatypes/Makefile.am | 10 +++---- java/examples/datatypes/runExample.sh.in | 10 +++---- java/examples/groups/H5Ex_G_Compact.java | 10 +++---- java/examples/groups/H5Ex_G_Corder.java | 10 +++---- java/examples/groups/H5Ex_G_Create.java | 10 +++---- java/examples/groups/H5Ex_G_Intermediate.java | 10 +++---- java/examples/groups/H5Ex_G_Iterate.java | 10 +++---- java/examples/groups/H5Ex_G_Phase.java | 10 +++---- java/examples/groups/H5Ex_G_Traverse.java | 10 +++---- java/examples/groups/H5Ex_G_Visit.java | 10 +++---- java/examples/groups/Makefile.am | 10 +++---- java/examples/groups/runExample.sh.in | 10 +++---- java/examples/intro/H5_CreateAttribute.java | 10 +++---- java/examples/intro/H5_CreateDataset.java | 10 +++---- java/examples/intro/H5_CreateFile.java | 10 +++---- java/examples/intro/H5_CreateGroup.java | 10 +++---- .../intro/H5_CreateGroupAbsoluteRelative.java | 10 +++---- java/examples/intro/H5_CreateGroupDataset.java | 10 +++---- java/examples/intro/H5_ReadWrite.java | 10 +++---- java/examples/intro/Makefile.am | 10 +++---- java/examples/intro/runExample.sh.in | 10 +++---- java/src/Makefile.am | 10 +++---- java/src/hdf/hdf5lib/H5.java | 10 +++---- java/src/hdf/hdf5lib/HDF5Constants.java | 10 +++---- java/src/hdf/hdf5lib/HDF5GroupInfo.java | 10 +++---- java/src/hdf/hdf5lib/HDFArray.java | 10 +++---- java/src/hdf/hdf5lib/HDFNativeData.java | 10 +++---- java/src/hdf/hdf5lib/callbacks/Callbacks.java | 10 +++---- java/src/hdf/hdf5lib/callbacks/H5A_iterate_cb.java | 10 +++---- java/src/hdf/hdf5lib/callbacks/H5A_iterate_t.java | 10 +++---- java/src/hdf/hdf5lib/callbacks/H5D_append_cb.java | 10 +++---- java/src/hdf/hdf5lib/callbacks/H5D_append_t.java | 10 +++---- java/src/hdf/hdf5lib/callbacks/H5D_iterate_cb.java | 10 +++---- java/src/hdf/hdf5lib/callbacks/H5D_iterate_t.java | 10 +++---- java/src/hdf/hdf5lib/callbacks/H5E_walk_cb.java | 10 +++---- java/src/hdf/hdf5lib/callbacks/H5E_walk_t.java | 10 +++---- java/src/hdf/hdf5lib/callbacks/H5L_iterate_cb.java | 10 +++---- java/src/hdf/hdf5lib/callbacks/H5L_iterate_t.java | 10 +++---- java/src/hdf/hdf5lib/callbacks/H5O_iterate_cb.java | 10 +++---- java/src/hdf/hdf5lib/callbacks/H5O_iterate_t.java | 10 +++---- .../hdf5lib/callbacks/H5P_cls_close_func_cb.java | 10 +++---- .../hdf5lib/callbacks/H5P_cls_close_func_t.java | 10 +++---- .../hdf5lib/callbacks/H5P_cls_copy_func_cb.java | 10 +++---- .../hdf/hdf5lib/callbacks/H5P_cls_copy_func_t.java | 10 +++---- .../hdf5lib/callbacks/H5P_cls_create_func_cb.java | 10 +++---- .../hdf5lib/callbacks/H5P_cls_create_func_t.java | 10 +++---- java/src/hdf/hdf5lib/callbacks/H5P_iterate_cb.java | 10 +++---- java/src/hdf/hdf5lib/callbacks/H5P_iterate_t.java | 10 +++---- .../hdf5lib/callbacks/H5P_prp_close_func_cb.java | 10 +++---- .../hdf5lib/callbacks/H5P_prp_compare_func_cb.java | 10 +++---- .../hdf5lib/callbacks/H5P_prp_copy_func_cb.java | 10 +++---- .../hdf5lib/callbacks/H5P_prp_create_func_cb.java | 10 +++---- .../hdf5lib/callbacks/H5P_prp_delete_func_cb.java | 10 +++---- .../hdf/hdf5lib/callbacks/H5P_prp_get_func_cb.java | 10 +++---- .../hdf/hdf5lib/callbacks/H5P_prp_set_func_cb.java | 10 +++---- .../hdf/hdf5lib/exceptions/HDF5AtomException.java | 10 +++---- .../hdf5lib/exceptions/HDF5AttributeException.java | 10 +++---- .../hdf/hdf5lib/exceptions/HDF5BtreeException.java | 10 +++---- .../exceptions/HDF5DataFiltersException.java | 10 +++---- .../exceptions/HDF5DataStorageException.java | 10 +++---- .../exceptions/HDF5DatasetInterfaceException.java | 10 +++---- .../HDF5DataspaceInterfaceException.java | 10 +++---- .../exceptions/HDF5DatatypeInterfaceException.java | 10 +++---- java/src/hdf/hdf5lib/exceptions/HDF5Exception.java | 10 +++---- .../exceptions/HDF5ExternalFileListException.java | 10 +++---- .../exceptions/HDF5FileInterfaceException.java | 10 +++---- .../exceptions/HDF5FunctionArgumentException.java | 10 +++---- .../exceptions/HDF5FunctionEntryExitException.java | 10 +++---- .../hdf/hdf5lib/exceptions/HDF5HeapException.java | 10 +++---- .../exceptions/HDF5InternalErrorException.java | 10 +++---- .../hdf/hdf5lib/exceptions/HDF5JavaException.java | 10 +++---- .../hdf5lib/exceptions/HDF5LibraryException.java | 10 +++---- .../exceptions/HDF5LowLevelIOException.java | 10 +++---- .../exceptions/HDF5MetaDataCacheException.java | 10 +++---- .../exceptions/HDF5ObjectHeaderException.java | 10 +++---- .../HDF5PropertyListInterfaceException.java | 10 +++---- .../hdf5lib/exceptions/HDF5ReferenceException.java | 10 +++---- .../HDF5ResourceUnavailableException.java | 10 +++---- .../exceptions/HDF5SymbolTableException.java | 10 +++---- .../hdf/hdf5lib/structs/H5AC_cache_config_t.java | 10 +++---- java/src/hdf/hdf5lib/structs/H5A_info_t.java | 10 +++---- java/src/hdf/hdf5lib/structs/H5E_error2_t.java | 10 +++---- java/src/hdf/hdf5lib/structs/H5F_info2_t.java | 10 +++---- java/src/hdf/hdf5lib/structs/H5G_info_t.java | 10 +++---- java/src/hdf/hdf5lib/structs/H5L_info_t.java | 10 +++---- java/src/hdf/hdf5lib/structs/H5O_hdr_info_t.java | 10 +++---- java/src/hdf/hdf5lib/structs/H5O_info_t.java | 10 +++---- java/src/hdf/hdf5lib/structs/H5_ih_info_t.java | 10 +++---- java/src/jni/Makefile.am | 10 +++---- java/src/jni/exceptionImp.c | 10 +++---- java/src/jni/exceptionImp.h | 10 +++---- java/src/jni/h5Constants.c | 10 +++---- java/src/jni/h5Imp.c | 10 +++---- java/src/jni/h5Imp.h | 10 +++---- java/src/jni/h5aImp.c | 10 +++---- java/src/jni/h5aImp.h | 10 +++---- java/src/jni/h5dImp.c | 10 +++---- java/src/jni/h5dImp.h | 10 +++---- java/src/jni/h5eImp.c | 10 +++---- java/src/jni/h5eImp.h | 10 +++---- java/src/jni/h5fImp.c | 10 +++---- java/src/jni/h5fImp.h | 10 +++---- java/src/jni/h5gImp.c | 10 +++---- java/src/jni/h5gImp.h | 10 +++---- java/src/jni/h5iImp.c | 10 +++---- java/src/jni/h5iImp.h | 10 +++---- java/src/jni/h5jni.h | 10 +++---- java/src/jni/h5lImp.c | 10 +++---- java/src/jni/h5lImp.h | 10 +++---- java/src/jni/h5oImp.c | 10 +++---- java/src/jni/h5oImp.h | 10 +++---- java/src/jni/h5pImp.c | 10 +++---- java/src/jni/h5pImp.h | 10 +++---- java/src/jni/h5plImp.c | 10 +++---- java/src/jni/h5plImp.h | 10 +++---- java/src/jni/h5rImp.c | 10 +++---- java/src/jni/h5rImp.h | 10 +++---- java/src/jni/h5sImp.c | 10 +++---- java/src/jni/h5sImp.h | 10 +++---- java/src/jni/h5tImp.c | 10 +++---- java/src/jni/h5tImp.h | 10 +++---- java/src/jni/h5util.c | 10 +++---- java/src/jni/h5util.h | 10 +++---- java/src/jni/h5zImp.c | 10 +++---- java/src/jni/h5zImp.h | 10 +++---- java/src/jni/nativeData.c | 10 +++---- java/src/jni/nativeData.h | 10 +++---- java/test/Makefile.am | 10 +++---- java/test/TestAll.java | 10 +++---- java/test/TestH5.java | 10 +++---- java/test/TestH5A.java | 10 +++---- java/test/TestH5D.java | 10 +++---- java/test/TestH5Dparams.java | 10 +++---- java/test/TestH5Dplist.java | 10 +++---- java/test/TestH5E.java | 14 ++++----- java/test/TestH5Edefault.java | 10 +++---- java/test/TestH5Eregister.java | 10 +++---- java/test/TestH5F.java | 10 +++---- java/test/TestH5Fbasic.java | 10 +++---- java/test/TestH5Fparams.java | 10 +++---- java/test/TestH5Fswmr.java | 10 +++---- java/test/TestH5G.java | 10 +++---- java/test/TestH5Gbasic.java | 10 +++---- java/test/TestH5Giterate.java | 10 +++---- java/test/TestH5Lbasic.java | 10 +++---- java/test/TestH5Lcreate.java | 10 +++---- java/test/TestH5Lparams.java | 10 +++---- java/test/TestH5Obasic.java | 10 +++---- java/test/TestH5Ocopy.java | 10 +++---- java/test/TestH5Ocreate.java | 10 +++---- java/test/TestH5Oparams.java | 10 +++---- java/test/TestH5P.java | 10 +++---- java/test/TestH5PData.java | 10 +++---- java/test/TestH5PL.java | 10 +++---- java/test/TestH5Pfapl.java | 10 +++---- java/test/TestH5Plist.java | 10 +++---- java/test/TestH5Pvirtual.java | 10 +++---- java/test/TestH5R.java | 10 +++---- java/test/TestH5S.java | 10 +++---- java/test/TestH5Sbasic.java | 10 +++---- java/test/TestH5T.java | 10 +++---- java/test/TestH5Tbasic.java | 10 +++---- java/test/TestH5Tparams.java | 10 +++---- java/test/TestH5Z.java | 10 +++---- java/test/junit.sh.in | 10 +++---- m4/aclocal_cxx.m4 | 10 +++---- m4/aclocal_fc.f90 | 13 +++++++++ m4/aclocal_fc.m4 | 10 +++---- src/H5.c | 10 +++---- src/H5A.c | 10 +++---- src/H5AC.c | 10 +++---- src/H5ACdbg.c | 10 +++---- src/H5AClog.c | 10 +++---- src/H5ACmodule.h | 10 +++---- src/H5ACmpio.c | 10 +++---- src/H5ACpkg.h | 10 +++---- src/H5ACprivate.h | 10 +++---- src/H5ACproxy_entry.c | 10 +++---- src/H5ACpublic.h | 10 +++---- src/H5Abtree2.c | 10 +++---- src/H5Adense.c | 10 +++---- src/H5Adeprec.c | 10 +++---- src/H5Aint.c | 10 +++---- src/H5Amodule.h | 10 +++---- src/H5Apkg.h | 10 +++---- src/H5Aprivate.h | 10 +++---- src/H5Apublic.h | 10 +++---- src/H5Atest.c | 10 +++---- src/H5B.c | 10 +++---- src/H5B2.c | 10 +++---- src/H5B2cache.c | 10 +++---- src/H5B2dbg.c | 10 +++---- src/H5B2hdr.c | 10 +++---- src/H5B2int.c | 10 +++---- src/H5B2internal.c | 10 +++---- src/H5B2leaf.c | 10 +++---- src/H5B2module.h | 10 +++---- src/H5B2pkg.h | 10 +++---- src/H5B2private.h | 10 +++---- src/H5B2public.h | 10 +++---- src/H5B2stat.c | 10 +++---- src/H5B2test.c | 10 +++---- src/H5Bcache.c | 10 +++---- src/H5Bdbg.c | 10 +++---- src/H5Bmodule.h | 10 +++---- src/H5Bpkg.h | 10 +++---- src/H5Bprivate.h | 10 +++---- src/H5Bpublic.h | 10 +++---- src/H5C.c | 10 +++---- src/H5CS.c | 10 +++---- src/H5CSprivate.h | 10 +++---- src/H5Cdbg.c | 10 +++---- src/H5Cepoch.c | 10 +++---- src/H5Cimage.c | 10 +++---- src/H5Clog.c | 10 +++---- src/H5Cmodule.h | 10 +++---- src/H5Cmpio.c | 10 +++---- src/H5Cpkg.h | 10 +++---- src/H5Cprefetched.c | 10 +++---- src/H5Cprivate.h | 10 +++---- src/H5Cpublic.h | 10 +++---- src/H5Cquery.c | 10 +++---- src/H5Ctag.c | 10 +++---- src/H5Ctest.c | 10 +++---- src/H5D.c | 10 +++---- src/H5Dbtree.c | 10 +++---- src/H5Dbtree2.c | 10 +++---- src/H5Dchunk.c | 10 +++---- src/H5Dcompact.c | 10 +++---- src/H5Dcontig.c | 10 +++---- src/H5Ddbg.c | 10 +++---- src/H5Ddeprec.c | 10 +++---- src/H5Dearray.c | 10 +++---- src/H5Defl.c | 10 +++---- src/H5Dfarray.c | 10 +++---- src/H5Dfill.c | 10 +++---- src/H5Dint.c | 10 +++---- src/H5Dio.c | 10 +++---- src/H5Dlayout.c | 10 +++---- src/H5Dmodule.h | 10 +++---- src/H5Dmpio.c | 10 +++---- src/H5Dnone.c | 10 +++---- src/H5Doh.c | 10 +++---- src/H5Dpkg.h | 10 +++---- src/H5Dprivate.h | 10 +++---- src/H5Dpublic.h | 10 +++---- src/H5Dscatgath.c | 10 +++---- src/H5Dselect.c | 10 +++---- src/H5Dsingle.c | 10 +++---- src/H5Dtest.c | 10 +++---- src/H5Dvirtual.c | 10 +++---- src/H5E.c | 10 +++---- src/H5EA.c | 10 +++---- src/H5EAcache.c | 10 +++---- src/H5EAdbg.c | 10 +++---- src/H5EAdblkpage.c | 10 +++---- src/H5EAdblock.c | 10 +++---- src/H5EAhdr.c | 10 +++---- src/H5EAiblock.c | 10 +++---- src/H5EAint.c | 10 +++---- src/H5EAmodule.h | 10 +++---- src/H5EApkg.h | 10 +++---- src/H5EAprivate.h | 10 +++---- src/H5EAsblock.c | 10 +++---- src/H5EAstat.c | 10 +++---- src/H5EAtest.c | 10 +++---- src/H5Edeprec.c | 10 +++---- src/H5Eint.c | 10 +++---- src/H5Emodule.h | 10 +++---- src/H5Epkg.h | 10 +++---- src/H5Eprivate.h | 10 +++---- src/H5Epublic.h | 10 +++---- src/H5F.c | 10 +++---- src/H5FA.c | 10 +++---- src/H5FAcache.c | 10 +++---- src/H5FAdbg.c | 10 +++---- src/H5FAdblkpage.c | 10 +++---- src/H5FAdblock.c | 10 +++---- src/H5FAhdr.c | 10 +++---- src/H5FAint.c | 10 +++---- src/H5FAmodule.h | 10 +++---- src/H5FApkg.h | 10 +++---- src/H5FAprivate.h | 10 +++---- src/H5FAstat.c | 10 +++---- src/H5FAtest.c | 10 +++---- src/H5FD.c | 10 +++---- src/H5FDcore.c | 10 +++---- src/H5FDcore.h | 10 +++---- src/H5FDdirect.c | 10 +++---- src/H5FDdirect.h | 10 +++---- src/H5FDdrvr_module.h | 10 +++---- src/H5FDfamily.c | 10 +++---- src/H5FDfamily.h | 10 +++---- src/H5FDint.c | 10 +++---- src/H5FDlog.c | 10 +++---- src/H5FDlog.h | 10 +++---- src/H5FDmodule.h | 10 +++---- src/H5FDmpi.c | 10 +++---- src/H5FDmpi.h | 10 +++---- src/H5FDmpio.c | 10 +++---- src/H5FDmpio.h | 10 +++---- src/H5FDmulti.c | 10 +++---- src/H5FDmulti.h | 10 +++---- src/H5FDpkg.h | 10 +++---- src/H5FDprivate.h | 10 +++---- src/H5FDpublic.h | 10 +++---- src/H5FDsec2.c | 10 +++---- src/H5FDsec2.h | 10 +++---- src/H5FDspace.c | 10 +++---- src/H5FDstdio.c | 10 +++---- src/H5FDstdio.h | 10 +++---- src/H5FDtest.c | 10 +++---- src/H5FDwindows.c | 10 +++---- src/H5FDwindows.h | 10 +++---- src/H5FL.c | 10 +++---- src/H5FLmodule.h | 10 +++---- src/H5FLprivate.h | 10 +++---- src/H5FO.c | 10 +++---- src/H5FOprivate.h | 10 +++---- src/H5FS.c | 10 +++---- src/H5FScache.c | 10 +++---- src/H5FSdbg.c | 10 +++---- src/H5FSint.c | 10 +++---- src/H5FSmodule.h | 10 +++---- src/H5FSpkg.h | 10 +++---- src/H5FSprivate.h | 10 +++---- src/H5FSpublic.h | 10 +++---- src/H5FSsection.c | 10 +++---- src/H5FSstat.c | 10 +++---- src/H5FStest.c | 10 +++---- src/H5Faccum.c | 10 +++---- src/H5Fcwfs.c | 10 +++---- src/H5Fdbg.c | 10 +++---- src/H5Fdeprec.c | 10 +++---- src/H5Fefc.c | 10 +++---- src/H5Ffake.c | 10 +++---- src/H5Fint.c | 10 +++---- src/H5Fio.c | 10 +++---- src/H5Fmodule.h | 10 +++---- src/H5Fmount.c | 10 +++---- src/H5Fmpi.c | 10 +++---- src/H5Fpkg.h | 10 +++---- src/H5Fprivate.h | 10 +++---- src/H5Fpublic.h | 10 +++---- src/H5Fquery.c | 10 +++---- src/H5Fsfile.c | 10 +++---- src/H5Fspace.c | 10 +++---- src/H5Fsuper.c | 10 +++---- src/H5Fsuper_cache.c | 10 +++---- src/H5Ftest.c | 10 +++---- src/H5G.c | 10 +++---- src/H5Gbtree2.c | 10 +++---- src/H5Gcache.c | 10 +++---- src/H5Gcompact.c | 10 +++---- src/H5Gdense.c | 10 +++---- src/H5Gdeprec.c | 10 +++---- src/H5Gent.c | 10 +++---- src/H5Gint.c | 10 +++---- src/H5Glink.c | 10 +++---- src/H5Gloc.c | 10 +++---- src/H5Gmodule.h | 10 +++---- src/H5Gname.c | 10 +++---- src/H5Gnode.c | 10 +++---- src/H5Gobj.c | 10 +++---- src/H5Goh.c | 10 +++---- src/H5Gpkg.h | 10 +++---- src/H5Gprivate.h | 10 +++---- src/H5Gpublic.h | 10 +++---- src/H5Groot.c | 10 +++---- src/H5Gstab.c | 10 +++---- src/H5Gtest.c | 10 +++---- src/H5Gtraverse.c | 10 +++---- src/H5HF.c | 10 +++---- src/H5HFbtree2.c | 10 +++---- src/H5HFcache.c | 10 +++---- src/H5HFdbg.c | 10 +++---- src/H5HFdblock.c | 10 +++---- src/H5HFdtable.c | 10 +++---- src/H5HFhdr.c | 10 +++---- src/H5HFhuge.c | 10 +++---- src/H5HFiblock.c | 10 +++---- src/H5HFiter.c | 10 +++---- src/H5HFman.c | 10 +++---- src/H5HFmodule.h | 10 +++---- src/H5HFpkg.h | 10 +++---- src/H5HFprivate.h | 10 +++---- src/H5HFpublic.h | 10 +++---- src/H5HFsection.c | 10 +++---- src/H5HFspace.c | 10 +++---- src/H5HFstat.c | 10 +++---- src/H5HFtest.c | 10 +++---- src/H5HFtiny.c | 10 +++---- src/H5HG.c | 10 +++---- src/H5HGcache.c | 10 +++---- src/H5HGdbg.c | 10 +++---- src/H5HGmodule.h | 10 +++---- src/H5HGpkg.h | 10 +++---- src/H5HGprivate.h | 10 +++---- src/H5HGpublic.h | 10 +++---- src/H5HGquery.c | 10 +++---- src/H5HL.c | 10 +++---- src/H5HLcache.c | 10 +++---- src/H5HLdbg.c | 10 +++---- src/H5HLdblk.c | 10 +++---- src/H5HLint.c | 10 +++---- src/H5HLmodule.h | 10 +++---- src/H5HLpkg.h | 10 +++---- src/H5HLprfx.c | 10 +++---- src/H5HLprivate.h | 10 +++---- src/H5HLpublic.h | 10 +++---- src/H5HP.c | 10 +++---- src/H5HPprivate.h | 10 +++---- src/H5I.c | 10 +++---- src/H5Imodule.h | 10 +++---- src/H5Ipkg.h | 10 +++---- src/H5Iprivate.h | 10 +++---- src/H5Ipublic.h | 10 +++---- src/H5Itest.c | 10 +++---- src/H5L.c | 10 +++---- src/H5Lexternal.c | 10 +++---- src/H5Lmodule.h | 10 +++---- src/H5Lpkg.h | 10 +++---- src/H5Lprivate.h | 10 +++---- src/H5Lpublic.h | 10 +++---- src/H5MF.c | 10 +++---- src/H5MFaggr.c | 10 +++---- src/H5MFdbg.c | 10 +++---- src/H5MFmodule.h | 10 +++---- src/H5MFpkg.h | 10 +++---- src/H5MFprivate.h | 10 +++---- src/H5MFsection.c | 10 +++---- src/H5MM.c | 10 +++---- src/H5MMprivate.h | 10 +++---- src/H5MMpublic.h | 10 +++---- src/H5MP.c | 10 +++---- src/H5MPmodule.h | 10 +++---- src/H5MPpkg.h | 10 +++---- src/H5MPprivate.h | 10 +++---- src/H5MPtest.c | 10 +++---- src/H5O.c | 10 +++---- src/H5Oainfo.c | 10 +++---- src/H5Oalloc.c | 10 +++---- src/H5Oattr.c | 10 +++---- src/H5Oattribute.c | 10 +++---- src/H5Obogus.c | 10 +++---- src/H5Obtreek.c | 10 +++---- src/H5Ocache.c | 10 +++---- src/H5Ocache_image.c | 10 +++---- src/H5Ochunk.c | 10 +++---- src/H5Ocont.c | 10 +++---- src/H5Ocopy.c | 10 +++---- src/H5Odbg.c | 10 +++---- src/H5Odrvinfo.c | 10 +++---- src/H5Odtype.c | 10 +++---- src/H5Oefl.c | 10 +++---- src/H5Ofill.c | 10 +++---- src/H5Oflush.c | 10 +++---- src/H5Ofsinfo.c | 10 +++---- src/H5Oginfo.c | 10 +++---- src/H5Olayout.c | 10 +++---- src/H5Olinfo.c | 10 +++---- src/H5Olink.c | 10 +++---- src/H5Omessage.c | 10 +++---- src/H5Omodule.h | 10 +++---- src/H5Omtime.c | 10 +++---- src/H5Oname.c | 10 +++---- src/H5Onull.c | 10 +++---- src/H5Opkg.h | 10 +++---- src/H5Opline.c | 10 +++---- src/H5Oprivate.h | 10 +++---- src/H5Opublic.h | 10 +++---- src/H5Orefcount.c | 10 +++---- src/H5Osdspace.c | 10 +++---- src/H5Oshared.c | 10 +++---- src/H5Oshared.h | 10 +++---- src/H5Oshmesg.c | 10 +++---- src/H5Ostab.c | 10 +++---- src/H5Otest.c | 10 +++---- src/H5Ounknown.c | 10 +++---- src/H5P.c | 10 +++---- src/H5PB.c | 10 +++---- src/H5PBmodule.h | 10 +++---- src/H5PBpkg.h | 10 +++---- src/H5PBprivate.h | 10 +++---- src/H5PL.c | 10 +++---- src/H5PLextern.h | 10 +++---- src/H5PLmodule.h | 10 +++---- src/H5PLprivate.h | 10 +++---- src/H5PLpublic.h | 10 +++---- src/H5Pacpl.c | 10 +++---- src/H5Pdapl.c | 10 +++---- src/H5Pdcpl.c | 10 +++---- src/H5Pdeprec.c | 10 +++---- src/H5Pdxpl.c | 10 +++---- src/H5Pencdec.c | 10 +++---- src/H5Pfapl.c | 10 +++---- src/H5Pfcpl.c | 10 +++---- src/H5Pfmpl.c | 10 +++---- src/H5Pgcpl.c | 10 +++---- src/H5Pint.c | 10 +++---- src/H5Plapl.c | 10 +++---- src/H5Plcpl.c | 10 +++---- src/H5Pmodule.h | 10 +++---- src/H5Pocpl.c | 10 +++---- src/H5Pocpypl.c | 10 +++---- src/H5Ppkg.h | 10 +++---- src/H5Pprivate.h | 10 +++---- src/H5Ppublic.h | 10 +++---- src/H5Pstrcpl.c | 10 +++---- src/H5Ptest.c | 10 +++---- src/H5R.c | 10 +++---- src/H5RS.c | 10 +++---- src/H5RSprivate.h | 10 +++---- src/H5Rdeprec.c | 10 +++---- src/H5Rmodule.h | 10 +++---- src/H5Rpkg.h | 10 +++---- src/H5Rprivate.h | 10 +++---- src/H5Rpublic.h | 10 +++---- src/H5S.c | 10 +++---- src/H5SL.c | 10 +++---- src/H5SLmodule.h | 10 +++---- src/H5SLprivate.h | 10 +++---- src/H5SM.c | 10 +++---- src/H5SMbtree2.c | 10 +++---- src/H5SMcache.c | 10 +++---- src/H5SMmessage.c | 10 +++---- src/H5SMmodule.h | 10 +++---- src/H5SMpkg.h | 10 +++---- src/H5SMprivate.h | 10 +++---- src/H5SMtest.c | 10 +++---- src/H5ST.c | 10 +++---- src/H5STprivate.h | 10 +++---- src/H5Sall.c | 10 +++---- src/H5Sdbg.c | 10 +++---- src/H5Shyper.c | 10 +++---- src/H5Smodule.h | 10 +++---- src/H5Smpio.c | 10 +++---- src/H5Snone.c | 10 +++---- src/H5Spkg.h | 10 +++---- src/H5Spoint.c | 10 +++---- src/H5Sprivate.h | 10 +++---- src/H5Spublic.h | 10 +++---- src/H5Sselect.c | 10 +++---- src/H5Stest.c | 10 +++---- src/H5T.c | 10 +++---- src/H5TS.c | 10 +++---- src/H5TSprivate.h | 10 +++---- src/H5Tarray.c | 10 +++---- src/H5Tbit.c | 10 +++---- src/H5Tcommit.c | 10 +++---- src/H5Tcompound.c | 10 +++---- src/H5Tconv.c | 10 +++---- src/H5Tcset.c | 10 +++---- src/H5Tdbg.c | 10 +++---- src/H5Tdeprec.c | 10 +++---- src/H5Tenum.c | 10 +++---- src/H5Tfields.c | 10 +++---- src/H5Tfixed.c | 10 +++---- src/H5Tfloat.c | 10 +++---- src/H5Tmodule.h | 10 +++---- src/H5Tnative.c | 10 +++---- src/H5Toffset.c | 10 +++---- src/H5Toh.c | 10 +++---- src/H5Topaque.c | 10 +++---- src/H5Torder.c | 10 +++---- src/H5Tpad.c | 10 +++---- src/H5Tpkg.h | 10 +++---- src/H5Tprecis.c | 10 +++---- src/H5Tprivate.h | 10 +++---- src/H5Tpublic.h | 10 +++---- src/H5Tstrpad.c | 10 +++---- src/H5Tvisit.c | 10 +++---- src/H5Tvlen.c | 10 +++---- src/H5UC.c | 10 +++---- src/H5UCprivate.h | 10 +++---- src/H5VM.c | 10 +++---- src/H5VMprivate.h | 10 +++---- src/H5WB.c | 10 +++---- src/H5WBprivate.h | 10 +++---- src/H5Z.c | 10 +++---- src/H5Zdeflate.c | 10 +++---- src/H5Zfletcher32.c | 10 +++---- src/H5Zmodule.h | 10 +++---- src/H5Znbit.c | 10 +++---- src/H5Zpkg.h | 10 +++---- src/H5Zprivate.h | 10 +++---- src/H5Zpublic.h | 10 +++---- src/H5Zscaleoffset.c | 10 +++---- src/H5Zshuffle.c | 10 +++---- src/H5Zszip.c | 10 +++---- src/H5Ztrans.c | 10 +++---- src/H5api_adpt.h | 10 +++---- src/H5checksum.c | 10 +++---- src/H5dbg.c | 10 +++---- src/H5detect.c | 20 +++++-------- src/H5err.txt | 10 +++---- src/H5make_libsettings.c | 20 +++++-------- src/H5overflow.txt | 10 +++---- src/H5private.h | 10 +++---- src/H5public.h | 10 +++---- src/H5system.c | 10 +++---- src/H5timer.c | 10 +++---- src/H5trace.c | 10 +++---- src/H5vers.txt | 10 +++---- src/H5win32defs.h | 10 +++---- src/Makefile.am | 10 +++---- src/hdf5.h | 10 +++---- test/H5srcdir.h | 10 +++---- test/H5srcdir_str.h.in | 10 +++---- test/Makefile.am | 10 +++---- test/accum.c | 10 +++---- test/accum_swmr_reader.c | 10 +++---- test/app_ref.c | 10 +++---- test/atomic_reader.c | 10 +++---- test/atomic_writer.c | 10 +++---- test/big.c | 10 +++---- test/bittests.c | 10 +++---- test/btree2.c | 10 +++---- test/cache.c | 10 +++---- test/cache_api.c | 10 +++---- test/cache_common.c | 10 +++---- test/cache_common.h | 10 +++---- test/cache_image.c | 10 +++---- test/cache_logging.c | 10 +++---- test/cache_tagging.c | 10 +++---- test/chunk_info.c | 10 +++---- test/cmpd_dset.c | 10 +++---- test/cork.c | 10 +++---- test/cross_read.c | 10 +++---- test/dangle.c | 10 +++---- test/dsets.c | 10 +++---- test/dt_arith.c | 10 +++---- test/dtransform.c | 10 +++---- test/dtypes.c | 10 +++---- test/dynlib1.c | 10 +++---- test/dynlib2.c | 10 +++---- test/dynlib3.c | 10 +++---- test/dynlib4.c | 10 +++---- test/earray.c | 10 +++---- test/efc.c | 10 +++---- test/enc_dec_plist.c | 10 +++---- test/enc_dec_plist_cross_platform.c | 10 +++---- test/enum.c | 10 +++---- test/err_compat.c | 10 +++---- test/error_test.c | 10 +++---- test/evict_on_close.c | 10 +++---- test/extend.c | 10 +++---- test/external.c | 10 +++---- test/farray.c | 10 +++---- test/fheap.c | 10 +++---- test/file_image.c | 10 +++---- test/fillval.c | 10 +++---- test/filter_fail.c | 10 +++---- test/flush1.c | 10 +++---- test/flush2.c | 10 +++---- test/flushrefresh.c | 10 +++---- test/freespace.c | 10 +++---- test/gen_bad_compound.c | 10 +++---- test/gen_bad_ohdr.c | 10 +++---- test/gen_bogus.c | 10 +++---- test/gen_cross.c | 10 +++---- test/gen_deflate.c | 10 +++---- test/gen_file_image.c | 10 +++---- test/gen_filespace.c | 10 +++---- test/gen_filters.c | 10 +++---- test/gen_mergemsg.c | 10 +++---- test/gen_new_array.c | 10 +++---- test/gen_new_fill.c | 10 +++---- test/gen_new_group.c | 10 +++---- test/gen_new_mtime.c | 10 +++---- test/gen_new_super.c | 10 +++---- test/gen_noencoder.c | 10 +++---- test/gen_nullspace.c | 10 +++---- test/gen_old_array.c | 10 +++---- test/gen_old_group.c | 10 +++---- test/gen_old_layout.c | 10 +++---- test/gen_old_mtime.c | 10 +++---- test/gen_plist.c | 10 +++---- test/gen_sizes_lheap.c | 10 +++---- test/gen_specmetaread.c | 10 +++---- test/gen_udlinks.c | 10 +++---- test/genall5.c | 10 +++---- test/genall5.h | 10 +++---- test/getname.c | 10 +++---- test/gheap.c | 10 +++---- test/h5test.c | 10 +++---- test/h5test.h | 10 +++---- test/hyperslab.c | 10 +++---- test/istore.c | 10 +++---- test/lheap.c | 10 +++---- test/links.c | 10 +++---- test/links_env.c | 10 +++---- test/mf.c | 10 +++---- test/mount.c | 10 +++---- test/mtime.c | 10 +++---- test/ntypes.c | 10 +++---- test/objcopy.c | 10 +++---- test/ohdr.c | 10 +++---- test/page_buffer.c | 10 +++---- test/plugin.c | 10 +++---- test/pool.c | 10 +++---- test/reserved.c | 10 +++---- test/set_extent.c | 10 +++---- test/space_overflow.c | 10 +++---- test/stab.c | 10 +++---- test/swmr.c | 10 +++---- test/swmr_addrem_writer.c | 10 +++---- test/swmr_check_compat_vfd.c | 10 +++---- test/swmr_common.c | 10 +++---- test/swmr_common.h | 10 +++---- test/swmr_generator.c | 10 +++---- test/swmr_reader.c | 10 +++---- test/swmr_remove_reader.c | 10 +++---- test/swmr_remove_writer.c | 10 +++---- test/swmr_sparse_reader.c | 10 +++---- test/swmr_sparse_writer.c | 10 +++---- test/swmr_start_write.c | 10 +++---- test/swmr_writer.c | 10 +++---- test/tarray.c | 10 +++---- test/tattr.c | 10 +++---- test/tcheck_version.c | 10 +++---- test/tchecksum.c | 10 +++---- test/tconfig.c | 10 +++---- test/tcoords.c | 10 +++---- test/test_plugin.sh.in | 10 +++---- test/test_usecases.sh.in | 10 +++---- test/testcheck_version.sh.in | 10 +++---- test/testerror.sh.in | 10 +++---- test/testflushrefresh.sh.in | 10 +++---- test/testframe.c | 10 +++---- test/testhdf5.c | 10 +++---- test/testhdf5.h | 10 +++---- test/testlibinfo.sh.in | 10 +++---- test/testlinks_env.sh.in | 10 +++---- test/testmeta.c | 10 +++---- test/testswmr.sh.in | 10 +++---- test/testvdsswmr.sh.in | 10 +++---- test/tfile.c | 10 +++---- test/tgenprop.c | 10 +++---- test/th5o.c | 10 +++---- test/th5s.c | 10 +++---- test/theap.c | 10 +++---- test/tid.c | 10 +++---- test/titerate.c | 10 +++---- test/tmeta.c | 10 +++---- test/tmisc.c | 10 +++---- test/trefer.c | 10 +++---- test/trefstr.c | 10 +++---- test/tselect.c | 10 +++---- test/tskiplist.c | 10 +++---- test/tsohm.c | 10 +++---- test/ttime.c | 10 +++---- test/ttsafe.c | 10 +++---- test/ttsafe.h | 10 +++---- test/ttsafe_acreate.c | 10 +++---- test/ttsafe_cancel.c | 10 +++---- test/ttsafe_dcreate.c | 10 +++---- test/ttsafe_error.c | 10 +++---- test/ttst.c | 10 +++---- test/tunicode.c | 10 +++---- test/tvlstr.c | 10 +++---- test/tvltypes.c | 10 +++---- test/twriteorder.c | 10 +++---- test/unlink.c | 10 +++---- test/unregister.c | 10 +++---- test/use.h | 10 +++---- test/use_append_chunk.c | 10 +++---- test/use_append_mchunks.c | 10 +++---- test/use_common.c | 10 +++---- test/use_disable_mdc_flushes.c | 10 +++---- test/vds.c | 10 +++---- test/vds_swmr.h | 10 +++---- test/vds_swmr_gen.c | 10 +++---- test/vds_swmr_reader.c | 10 +++---- test/vds_swmr_writer.c | 10 +++---- test/vfd.c | 10 +++---- testpar/Makefile.am | 10 +++---- testpar/t_cache.c | 10 +++---- testpar/t_cache_image.c | 10 +++---- testpar/t_chunk_alloc.c | 10 +++---- testpar/t_coll_chunk.c | 10 +++---- testpar/t_dset.c | 10 +++---- testpar/t_file.c | 10 +++---- testpar/t_file_image.c | 10 +++---- testpar/t_filter_read.c | 10 +++---- testpar/t_init_term.c | 10 +++---- testpar/t_mdset.c | 10 +++---- testpar/t_mpi.c | 10 +++---- testpar/t_pflush1.c | 10 +++---- testpar/t_pflush2.c | 10 +++---- testpar/t_ph5basic.c | 10 +++---- testpar/t_prestart.c | 10 +++---- testpar/t_prop.c | 10 +++---- testpar/t_pshutdown.c | 10 +++---- testpar/t_shapesame.c | 10 +++---- testpar/t_span_tree.c | 10 +++---- testpar/testpar.h | 10 +++---- testpar/testphdf5.c | 10 +++---- testpar/testphdf5.h | 10 +++---- tools/Makefile.am | 10 +++---- tools/lib/Makefile.am | 10 +++---- tools/lib/h5diff.c | 10 +++---- tools/lib/h5diff.h | 10 +++---- tools/lib/h5diff_array.c | 10 +++---- tools/lib/h5diff_attr.c | 10 +++---- tools/lib/h5diff_dset.c | 10 +++---- tools/lib/h5diff_util.c | 10 +++---- tools/lib/h5tools.c | 10 +++---- tools/lib/h5tools.h | 10 +++---- tools/lib/h5tools_dump.c | 10 +++---- tools/lib/h5tools_dump.h | 10 +++---- tools/lib/h5tools_error.h | 10 +++---- tools/lib/h5tools_filters.c | 10 +++---- tools/lib/h5tools_ref.c | 10 +++---- tools/lib/h5tools_ref.h | 10 +++---- tools/lib/h5tools_str.c | 10 +++---- tools/lib/h5tools_str.h | 10 +++---- tools/lib/h5tools_type.c | 10 +++---- tools/lib/h5tools_utils.c | 10 +++---- tools/lib/h5tools_utils.h | 10 +++---- tools/lib/h5trav.c | 10 +++---- tools/lib/h5trav.h | 10 +++---- tools/lib/io_timer.c | 10 +++---- tools/lib/io_timer.h | 10 +++---- tools/lib/ph5diff.h | 10 +++---- tools/src/Makefile.am | 10 +++---- tools/src/h5copy/Makefile.am | 10 +++---- tools/src/h5copy/h5copy.c | 10 +++---- tools/src/h5diff/Makefile.am | 10 +++---- tools/src/h5diff/h5diff_common.c | 10 +++---- tools/src/h5diff/h5diff_common.h | 10 +++---- tools/src/h5diff/h5diff_main.c | 10 +++---- tools/src/h5diff/ph5diff_main.c | 10 +++---- tools/src/h5dump/Makefile.am | 10 +++---- tools/src/h5dump/h5dump.c | 10 +++---- tools/src/h5dump/h5dump.h | 10 +++---- tools/src/h5dump/h5dump_ddl.c | 10 +++---- tools/src/h5dump/h5dump_ddl.h | 10 +++---- tools/src/h5dump/h5dump_defines.h | 10 +++---- tools/src/h5dump/h5dump_extern.h | 10 +++---- tools/src/h5dump/h5dump_xml.c | 10 +++---- tools/src/h5dump/h5dump_xml.h | 10 +++---- tools/src/h5format_convert/Makefile.am | 10 +++---- tools/src/h5format_convert/h5format_convert.c | 10 +++---- tools/src/h5import/Makefile.am | 10 +++---- tools/src/h5import/h5import.c | 10 +++---- tools/src/h5import/h5import.h | 10 +++---- tools/src/h5jam/Makefile.am | 10 +++---- tools/src/h5jam/h5jam.c | 10 +++---- tools/src/h5jam/h5unjam.c | 10 +++---- tools/src/h5ls/Makefile.am | 10 +++---- tools/src/h5ls/h5ls.c | 10 +++---- tools/src/h5repack/Makefile.am | 10 +++---- tools/src/h5repack/h5repack.c | 10 +++---- tools/src/h5repack/h5repack.h | 10 +++---- tools/src/h5repack/h5repack_copy.c | 10 +++---- tools/src/h5repack/h5repack_filters.c | 10 +++---- tools/src/h5repack/h5repack_main.c | 10 +++---- tools/src/h5repack/h5repack_opttable.c | 10 +++---- tools/src/h5repack/h5repack_parse.c | 10 +++---- tools/src/h5repack/h5repack_refs.c | 10 +++---- tools/src/h5repack/h5repack_verify.c | 10 +++---- tools/src/h5stat/Makefile.am | 10 +++---- tools/src/h5stat/h5stat.c | 10 +++---- tools/src/misc/Makefile.am | 10 +++---- tools/src/misc/h5cc.in | 10 +++---- tools/src/misc/h5clear.c | 10 +++---- tools/src/misc/h5debug.c | 10 +++---- tools/src/misc/h5mkgrp.c | 10 +++---- tools/src/misc/h5redeploy.in | 10 +++---- tools/src/misc/h5repart.c | 10 +++---- tools/test/Makefile.am | 10 +++---- tools/test/h5copy/Makefile.am | 10 +++---- tools/test/h5copy/h5copygentest.c | 10 +++---- tools/test/h5copy/testh5copy.sh.in | 10 +++---- tools/test/h5diff/Makefile.am | 10 +++---- tools/test/h5diff/dynlib_diff.c | 10 +++---- tools/test/h5diff/h5diff_plugin.sh.in | 10 +++---- tools/test/h5diff/h5diffgentest.c | 10 +++---- tools/test/h5diff/testh5diff.sh.in | 10 +++---- tools/test/h5diff/testph5diff.sh.in | 10 +++---- tools/test/h5dump/Makefile.am | 10 +++---- tools/test/h5dump/binread.c | 10 +++---- tools/test/h5dump/dynlib_dump.c | 10 +++---- tools/test/h5dump/h5dump_plugin.sh.in | 10 +++---- tools/test/h5dump/h5dumpgentest.c | 10 +++---- tools/test/h5dump/testh5dump.sh.in | 10 +++---- tools/test/h5dump/testh5dumppbits.sh.in | 10 +++---- tools/test/h5dump/testh5dumpvds.sh.in | 10 +++---- tools/test/h5dump/testh5dumpxml.sh.in | 10 +++---- tools/test/h5format_convert/Makefile.am | 10 +++---- tools/test/h5format_convert/h5fc_chk_idx.c | 10 +++---- tools/test/h5format_convert/h5fc_gentest.c | 10 +++---- tools/test/h5format_convert/testh5fc.sh.in | 10 +++---- tools/test/h5import/Makefile.am | 10 +++---- tools/test/h5import/h5importtest.c | 10 +++---- tools/test/h5import/h5importtestutil.sh.in | 10 +++---- tools/test/h5jam/Makefile.am | 10 +++---- tools/test/h5jam/getub.c | 10 +++---- tools/test/h5jam/h5jamgentest.c | 10 +++---- tools/test/h5jam/tellub.c | 10 +++---- tools/test/h5jam/testh5jam.sh.in | 10 +++---- tools/test/h5ls/Makefile.am | 10 +++---- tools/test/h5ls/dynlib_ls.c | 10 +++---- tools/test/h5ls/h5ls_plugin.sh.in | 10 +++---- tools/test/h5ls/testh5ls.sh.in | 10 +++---- tools/test/h5ls/testh5lsvds.sh.in | 10 +++---- tools/test/h5repack/Makefile.am | 10 +++---- tools/test/h5repack/dynlib_rpk.c | 10 +++---- tools/test/h5repack/dynlib_vrpk.c | 10 +++---- tools/test/h5repack/h5repack.sh.in | 10 +++---- tools/test/h5repack/h5repack_plugin.sh.in | 10 +++---- tools/test/h5repack/h5repacktst.c | 10 +++---- tools/test/h5repack/testh5repack_detect_szip.c | 10 +++---- tools/test/h5stat/Makefile.am | 10 +++---- tools/test/h5stat/h5stat_gentest.c | 10 +++---- tools/test/h5stat/testh5stat.sh.in | 10 +++---- tools/test/misc/Makefile.am | 10 +++---- tools/test/misc/clear_open_chk.c | 10 +++---- tools/test/misc/h5clear_gentest.c | 10 +++---- tools/test/misc/h5repart_gentest.c | 10 +++---- tools/test/misc/repart_test.c | 10 +++---- tools/test/misc/talign.c | 10 +++---- tools/test/misc/testh5clear.sh.in | 10 +++---- tools/test/misc/testh5mkgrp.sh.in | 10 +++---- tools/test/misc/testh5repart.sh.in | 10 +++---- tools/test/misc/vds/Makefile.am | 10 +++---- tools/test/misc/vds/UC_1.h | 10 +++---- tools/test/misc/vds/UC_1_one_dim_gen.c | 10 +++---- tools/test/misc/vds/UC_2.h | 10 +++---- tools/test/misc/vds/UC_2_two_dims_gen.c | 10 +++---- tools/test/misc/vds/UC_3.h | 10 +++---- tools/test/misc/vds/UC_3_gaps_gen.c | 10 +++---- tools/test/misc/vds/UC_4.h | 10 +++---- tools/test/misc/vds/UC_4_printf_gen.c | 10 +++---- tools/test/misc/vds/UC_5.h | 10 +++---- tools/test/misc/vds/UC_5_stride_gen.c | 10 +++---- tools/test/misc/vds/UC_common.h | 10 +++---- tools/test/perform/Makefile.am | 10 +++---- tools/test/perform/build_h5perf_alone.sh | 10 +++---- tools/test/perform/build_h5perf_serial_alone.sh | 10 +++---- tools/test/perform/chunk.c | 10 +++---- tools/test/perform/gen_report.pl | 10 +++---- tools/test/perform/iopipe.c | 10 +++---- tools/test/perform/overhead.c | 10 +++---- tools/test/perform/perf.c | 10 +++---- tools/test/perform/perf_meta.c | 10 +++---- tools/test/perform/pio_engine.c | 10 +++---- tools/test/perform/pio_perf.c | 10 +++---- tools/test/perform/pio_perf.h | 10 +++---- tools/test/perform/pio_standalone.c | 10 +++---- tools/test/perform/pio_standalone.h | 10 +++---- tools/test/perform/sio_engine.c | 10 +++---- tools/test/perform/sio_perf.c | 10 +++---- tools/test/perform/sio_perf.h | 10 +++---- tools/test/perform/sio_standalone.c | 10 +++---- tools/test/perform/sio_standalone.h | 10 +++---- tools/test/perform/zip_perf.c | 10 +++---- 1422 files changed, 5748 insertions(+), 8615 deletions(-) diff --git a/.autom4te.cfg b/.autom4te.cfg index 7b4dd6b..e7c2ec1 100644 --- a/.autom4te.cfg +++ b/.autom4te.cfg @@ -4,12 +4,10 @@ # # This file is part of HDF5. The full HDF5 copyright notice, including # terms governing use, modification, and redistribution, is contained in -# the files COPYING and Copyright.html. COPYING can be found at the root -# of the source code distribution tree; Copyright.html can be found at the -# root level of an installed copy of the electronic HDF5 document set and -# is linked from the top-level documents page. It can also be found at -# http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have -# access to either file, you may request a copy from help@hdfgroup.org. +# the COPYING file, which can be found at the root of the source code +# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. +# If you do not have access to either file, you may request a copy from +# help@hdfgroup.org. ## ------------------ ## ## User Preferences. ## diff --git a/.h5chkright.ini b/.h5chkright.ini index 10daeaf..1010dce 100644 --- a/.h5chkright.ini +++ b/.h5chkright.ini @@ -4,12 +4,10 @@ # # This file is part of HDF5. The full HDF5 copyright notice, including # terms governing use, modification, and redistribution, is contained in -# the files COPYING and Copyright.html. COPYING can be found at the root -# of the source code distribution tree; Copyright.html can be found at the -# root level of an installed copy of the electronic HDF5 document set and -# is linked from the top-level documents page. It can also be found at -# http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have -# access to either file, you may request a copy from help@hdfgroup.org. +# the COPYING file, which can be found at the root of the source code +# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. +# If you do not have access to either file, you may request a copy from +# help@hdfgroup.org. # Initialization files for the Copyright Checker, chkcopyright. # Each line is a keyword for action and the rest are values. diff --git a/MANIFEST b/MANIFEST index 5710f6c..a573567 100644 --- a/MANIFEST +++ b/MANIFEST @@ -5,12 +5,10 @@ # # This file is part of HDF5. The full HDF5 copyright notice, including # terms governing use, modification, and redistribution, is contained in -# the files COPYING and Copyright.html. COPYING can be found at the root -# of the source code distribution tree; Copyright.html can be found at the -# root level of an installed copy of the electronic HDF5 document set and -# is linked from the top-level documents page. It can also be found at -# http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have -# access to either file, you may request a copy from help@hdfgroup.org. +# the COPYING file, which can be found at the root of the source code +# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. +# If you do not have access to either file, you may request a copy from +# help@hdfgroup.org. # #------------------------------------------------------------------------------ # This is the list of files that are part of HDF5 source distribution. diff --git a/Makefile.am b/Makefile.am index bbab346..e3e5e3d 100644 --- a/Makefile.am +++ b/Makefile.am @@ -5,12 +5,10 @@ # # This file is part of HDF5. The full HDF5 copyright notice, including # terms governing use, modification, and redistribution, is contained in -# the files COPYING and Copyright.html. COPYING can be found at the root -# of the source code distribution tree; Copyright.html can be found at the -# root level of an installed copy of the electronic HDF5 document set and -# is linked from the top-level documents page. It can also be found at -# http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have -# access to either file, you may request a copy from help@hdfgroup.org. +# the COPYING file, which can be found at the root of the source code +# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. +# If you do not have access to either file, you may request a copy from +# help@hdfgroup.org. ## ## Makefile.am ## Run automake to generate a Makefile.in from this file. diff --git a/Makefile.dist b/Makefile.dist index e38af21..9edb476 100644 --- a/Makefile.dist +++ b/Makefile.dist @@ -6,12 +6,10 @@ # # This file is part of HDF5. The full HDF5 copyright notice, including # terms governing use, modification, and redistribution, is contained in -# the files COPYING and Copyright.html. COPYING can be found at the root -# of the source code distribution tree; Copyright.html can be found at the -# root level of an installed copy of the electronic HDF5 document set and -# is linked from the top-level documents page. It can also be found at -# http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have -# access to either file, you may request a copy from help@hdfgroup.org. +# the COPYING file, which can be found at the root of the source code +# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. +# If you do not have access to either file, you may request a copy from +# help@hdfgroup.org. # This Makefile is a stub (copied from Makefile.dist) which will run # configure and then invoke the same target in the new Makefile created diff --git a/autogen.sh b/autogen.sh index f3bd774..58d7e36 100755 --- a/autogen.sh +++ b/autogen.sh @@ -5,12 +5,10 @@ # # This file is part of HDF5. The full HDF5 copyright notice, including # terms governing use, modification, and redistribution, is contained in -# the files COPYING and Copyright.html. COPYING can be found at the root -# of the source code distribution tree; Copyright.html can be found at the -# root level of an installed copy of the electronic document set and is -# linked from the top-level documents page. It can also be found at -# http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have access -# to either file, you may request a copy from help@hdfgroup.org. +# the COPYING file, which can be found at the root of the source code +# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. +# If you do not have access to either file, you may request a copy from +# help@hdfgroup.org. # # A script to reconfigure autotools for HDF5, and to recreate other diff --git a/bin/bbrelease b/bin/bbrelease index b06b243..395b23c 100755 --- a/bin/bbrelease +++ b/bin/bbrelease @@ -6,12 +6,10 @@ # # This file is part of HDF5. The full HDF5 copyright notice, including # terms governing use, modification, and redistribution, is contained in -# the files COPYING and Copyright.html. COPYING can be found at the root -# of the source code distribution tree; Copyright.html can be found at the -# root level of an installed copy of the electronic HDF5 document set and -# is linked from the top-level documents page. It can also be found at -# http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have -# access to either file, you may request a copy from help@hdfgroup.org. +# the COPYING file, which can be found at the root of the source code +# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. +# If you do not have access to either file, you may request a copy from +# help@hdfgroup.org. # # Make a release of hdf5. diff --git a/bin/buildhdf5 b/bin/buildhdf5 index 3a4b0d3..064000a 100755 --- a/bin/buildhdf5 +++ b/bin/buildhdf5 @@ -6,12 +6,10 @@ # # This file is part of HDF5. The full HDF5 copyright notice, including # terms governing use, modification, and redistribution, is contained in -# the files COPYING and Copyright.html. COPYING can be found at the root -# of the source code distribution tree; Copyright.html can be found at the -# root level of an installed copy of the electronic HDF5 document set and -# is linked from the top-level documents page. It can also be found at -# http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have -# access to either file, you may request a copy from help@hdfgroup.org. +# the COPYING file, which can be found at the root of the source code +# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. +# If you do not have access to either file, you may request a copy from +# help@hdfgroup.org. # # Build HDF5 library by doing configure, make, and tests. # Usage: See USAGE() diff --git a/bin/checkapi b/bin/checkapi index b4a08e8..6882dea 100755 --- a/bin/checkapi +++ b/bin/checkapi @@ -6,12 +6,10 @@ # # This file is part of HDF5. The full HDF5 copyright notice, including # terms governing use, modification, and redistribution, is contained in -# the files COPYING and Copyright.html. COPYING can be found at the root -# of the source code distribution tree; Copyright.html can be found at the -# root level of an installed copy of the electronic HDF5 document set and -# is linked from the top-level documents page. It can also be found at -# http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have -# access to either file, you may request a copy from help@hdfgroup.org. +# the COPYING file, which can be found at the root of the source code +# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. +# If you do not have access to either file, you may request a copy from +# help@hdfgroup.org. # require 5.003; diff --git a/bin/checkposix b/bin/checkposix index db47ff3..7ab741c 100755 --- a/bin/checkposix +++ b/bin/checkposix @@ -8,12 +8,10 @@ require 5.003; # # This file is part of HDF5. The full HDF5 copyright notice, including # terms governing use, modification, and redistribution, is contained in -# the files COPYING and Copyright.html. COPYING can be found at the root -# of the source code distribution tree; Copyright.html can be found at the -# root level of an installed copy of the electronic HDF5 document set and -# is linked from the top-level documents page. It can also be found at -# http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have -# access to either file, you may request a copy from help@hdfgroup.org. +# the COPYING file, which can be found at the root of the source code +# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. +# If you do not have access to either file, you may request a copy from +# help@hdfgroup.org. # # Robb Matzke, matzke@llnl.gov # 30 Aug 1997 diff --git a/bin/chkconfigure b/bin/chkconfigure index abafae8..d03f421 100755 --- a/bin/chkconfigure +++ b/bin/chkconfigure @@ -5,14 +5,12 @@ ## ## This file is part of HDF5. The full HDF5 copyright notice, including ## terms governing use, modification, and redistribution, is contained in -## the files COPYING and Copyright.html. COPYING can be found at the root -## of the source code distribution tree; Copyright.html can be found at the -## root level of an installed copy of the electronic HDF5 document set and -## is linked from the top-level documents page. It can also be found at -## http://hdf.ncsa.uiuc.edu/HDF5/doc/Copyright.html. If you do not have -## access to either file, you may request a copy from hdfhelp@ncsa.uiuc.edu. +## the COPYING file, which can be found at the root of the source code +## distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. +## If you do not have access to either file, you may request a copy from +## help@hdfgroup.org. ## -# Check that all the configure files are properly genernated. +# Check that all the configure files are properly generated. # # Programmer: Albert Cheng # Created Date: 2004/12/07 diff --git a/bin/chkcopyright b/bin/chkcopyright index f6e910d..d67e030 100755 --- a/bin/chkcopyright +++ b/bin/chkcopyright @@ -6,12 +6,10 @@ # # This file is part of HDF5. The full HDF5 copyright notice, including # terms governing use, modification, and redistribution, is contained in -# the files COPYING and Copyright.html. COPYING can be found at the root -# of the source code distribution tree; Copyright.html can be found at the -# root level of an installed copy of the electronic HDF5 document set and -# is linked from the top-level documents page. It can also be found at -# http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have -# access to either file, you may request a copy from help@hdfgroup.org. +# the COPYING file, which can be found at the root of the source code +# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. +# If you do not have access to either file, you may request a copy from +# help@hdfgroup.org. # # Check Copyright notice. diff --git a/bin/chkmanifest b/bin/chkmanifest index a01217d..95eb8f0 100755 --- a/bin/chkmanifest +++ b/bin/chkmanifest @@ -6,12 +6,10 @@ # # This file is part of HDF5. The full HDF5 copyright notice, including # terms governing use, modification, and redistribution, is contained in -# the files COPYING and Copyright.html. COPYING can be found at the root -# of the source code distribution tree; Copyright.html can be found at the -# root level of an installed copy of the electronic HDF5 document set and -# is linked from the top-level documents page. It can also be found at -# http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have -# access to either file, you may request a copy from help@hdfgroup.org. +# the COPYING file, which can be found at the root of the source code +# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. +# If you do not have access to either file, you may request a copy from +# help@hdfgroup.org. # # Check that all the files in MANIFEST exist and (if this is a diff --git a/bin/debug-ohdr b/bin/debug-ohdr index 170919a..5b0a4b3 100755 --- a/bin/debug-ohdr +++ b/bin/debug-ohdr @@ -6,12 +6,10 @@ # # This file is part of HDF5. The full HDF5 copyright notice, including # terms governing use, modification, and redistribution, is contained in -# the files COPYING and Copyright.html. COPYING can be found at the root -# of the source code distribution tree; Copyright.html can be found at the -# root level of an installed copy of the electronic HDF5 document set and -# is linked from the top-level documents page. It can also be found at -# http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have -# access to either file, you may request a copy from help@hdfgroup.org. +# the COPYING file, which can be found at the root of the source code +# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. +# If you do not have access to either file, you may request a copy from +# help@hdfgroup.org. # require 5.003; diff --git a/bin/dependencies b/bin/dependencies index a82a3ee..82247da 100755 --- a/bin/dependencies +++ b/bin/dependencies @@ -6,12 +6,10 @@ # # This file is part of HDF5. The full HDF5 copyright notice, including # terms governing use, modification, and redistribution, is contained in -# the files COPYING and Copyright.html. COPYING can be found at the root -# of the source code distribution tree; Copyright.html can be found at the -# root level of an installed copy of the electronic HDF5 document set and -# is linked from the top-level documents page. It can also be found at -# http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have -# access to either file, you may request a copy from help@hdfgroup.org. +# the COPYING file, which can be found at the root of the source code +# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. +# If you do not have access to either file, you may request a copy from +# help@hdfgroup.org. # my $depend_file; my $new_depend_file; diff --git a/bin/deploy b/bin/deploy index ef30d21..73f4b25 100755 --- a/bin/deploy +++ b/bin/deploy @@ -6,12 +6,10 @@ # # This file is part of HDF5. The full HDF5 copyright notice, including # terms governing use, modification, and redistribution, is contained in -# the files COPYING and Copyright.html. COPYING can be found at the root -# of the source code distribution tree; Copyright.html can be found at the -# root level of an installed copy of the electronic HDF5 document set and -# is linked from the top-level documents page. It can also be found at -# http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have -# access to either file, you may request a copy from help@hdfgroup.org. +# the COPYING file, which can be found at the root of the source code +# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. +# If you do not have access to either file, you may request a copy from +# help@hdfgroup.org. # # Deploy the HDF5 binary. # diff --git a/bin/distdep b/bin/distdep index 0a22bd1..4643700 100755 --- a/bin/distdep +++ b/bin/distdep @@ -6,12 +6,10 @@ # # This file is part of HDF5. The full HDF5 copyright notice, including # terms governing use, modification, and redistribution, is contained in -# the files COPYING and Copyright.html. COPYING can be found at the root -# of the source code distribution tree; Copyright.html can be found at the -# root level of an installed copy of the electronic HDF5 document set and -# is linked from the top-level documents page. It can also be found at -# http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have -# access to either file, you may request a copy from help@hdfgroup.org. +# the COPYING file, which can be found at the root of the source code +# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. +# If you do not have access to either file, you may request a copy from +# help@hdfgroup.org. # # Usage: $0 [<].depend diff --git a/bin/errors b/bin/errors index 6ce997b..3c99fdc 100755 --- a/bin/errors +++ b/bin/errors @@ -11,12 +11,10 @@ use Text::Tabs; # # This file is part of HDF5. The full HDF5 copyright notice, including # terms governing use, modification, and redistribution, is contained in -# the files COPYING and Copyright.html. COPYING can be found at the root -# of the source code distribution tree; Copyright.html can be found at the -# root level of an installed copy of the electronic HDF5 document set and -# is linked from the top-level documents page. It can also be found at -# http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have -# access to either file, you may request a copy from help@hdfgroup.org. +# the COPYING file, which can be found at the root of the source code +# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. +# If you do not have access to either file, you may request a copy from +# help@hdfgroup.org. # # Robb Matzke, matzke@llnl.gov # 30 Aug 1997 diff --git a/bin/gcov_script b/bin/gcov_script index ac82189..9a6512d 100755 --- a/bin/gcov_script +++ b/bin/gcov_script @@ -6,12 +6,10 @@ # # This file is part of HDF5. The full HDF5 copyright notice, including # terms governing use, modification, and redistribution, is contained in -# the files COPYING and Copyright.html. COPYING can be found at the root -# of the source code distribution tree; Copyright.html can be found at the -# root level of an installed copy of the electronic HDF5 document set and -# is linked from the top-level documents page. It can also be found at -# http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have -# access to either file, you may request a copy from help@hdfgroup.org. +# the COPYING file, which can be found at the root of the source code +# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. +# If you do not have access to either file, you may request a copy from +# help@hdfgroup.org. # A script to generate coverage files for HDF5 using gcov. # Configures, builds, and runs tests in-place; the output files will be placed diff --git a/bin/genparser b/bin/genparser index 71a8ae2..8cf6ec2 100755 --- a/bin/genparser +++ b/bin/genparser @@ -5,12 +5,10 @@ # # This file is part of HDF5. The full HDF5 copyright notice, including # terms governing use, modification, and redistribution, is contained in -# the files COPYING and Copyright.html. COPYING can be found at the root -# of the source code distribution tree; Copyright.html can be found at the -# root level of an installed copy of the electronic document set and is -# linked from the top-level documents page. It can also be found at -# http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have access -# to either file, you may request a copy from help@hdfgroup.org. +# the COPYING file, which can be found at the root of the source code +# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. +# If you do not have access to either file, you may request a copy from +# help@hdfgroup.org. # # This script runs flex/lex and bison/yacc to generate parser code for diff --git a/bin/h5vers b/bin/h5vers index 2ab89a1..a00beb7 100755 --- a/bin/h5vers +++ b/bin/h5vers @@ -12,12 +12,10 @@ use strict; # # This file is part of HDF5. The full HDF5 copyright notice, including # terms governing use, modification, and redistribution, is contained in -# the files COPYING and Copyright.html. COPYING can be found at the root -# of the source code distribution tree; Copyright.html can be found at the -# root level of an installed copy of the electronic HDF5 document set and -# is linked from the top-level documents page. It can also be found at -# http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have -# access to either file, you may request a copy from help@hdfgroup.org. +# the COPYING file, which can be found at the root of the source code +# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. +# If you do not have access to either file, you may request a copy from +# help@hdfgroup.org. # # Robb Matzke # 17 July 1998 diff --git a/bin/iostats b/bin/iostats index f57c0d0..f054b9c 100755 --- a/bin/iostats +++ b/bin/iostats @@ -6,12 +6,10 @@ # # This file is part of HDF5. The full HDF5 copyright notice, including # terms governing use, modification, and redistribution, is contained in -# the files COPYING and Copyright.html. COPYING can be found at the root -# of the source code distribution tree; Copyright.html can be found at the -# root level of an installed copy of the electronic HDF5 document set and -# is linked from the top-level documents page. It can also be found at -# http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have -# access to either file, you may request a copy from help@hdfgroup.org. +# the COPYING file, which can be found at the root of the source code +# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. +# If you do not have access to either file, you may request a copy from +# help@hdfgroup.org. # # Usage: pipe the output of Linux's `strace' program into the stdin of diff --git a/bin/locate_sw b/bin/locate_sw index c9a7924..bab7bd2 100755 --- a/bin/locate_sw +++ b/bin/locate_sw @@ -6,12 +6,10 @@ # # This file is part of HDF5. The full HDF5 copyright notice, including # terms governing use, modification, and redistribution, is contained in -# the files COPYING and Copyright.html. COPYING can be found at the root -# of the source code distribution tree; Copyright.html can be found at the -# root level of an installed copy of the electronic HDF5 document set and -# is linked from the top-level documents page. It can also be found at -# http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have -# access to either file, you may request a copy from help@hdfgroup.org. +# the COPYING file, which can be found at the root of the source code +# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. +# If you do not have access to either file, you may request a copy from +# help@hdfgroup.org. # # Try to locate the software as named in argument. diff --git a/bin/make_err b/bin/make_err index 1b39d53fb..bfe8861 100755 --- a/bin/make_err +++ b/bin/make_err @@ -9,12 +9,10 @@ $indent=4; # # This file is part of HDF5. The full HDF5 copyright notice, including # terms governing use, modification, and redistribution, is contained in -# the files COPYING and Copyright.html. COPYING can be found at the root -# of the source code distribution tree; Copyright.html can be found at the -# root level of an installed copy of the electronic HDF5 document set and -# is linked from the top-level documents page. It can also be found at -# http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have -# access to either file, you may request a copy from help@hdfgroup.org. +# the COPYING file, which can be found at the root of the source code +# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. +# If you do not have access to either file, you may request a copy from +# help@hdfgroup.org. # # Create error headers @@ -38,12 +36,10 @@ sub print_copyright ($) { print $fh " * *\n"; print $fh " * This file is part of HDF5. The full HDF5 copyright notice, including *\n"; print $fh " * terms governing use, modification, and redistribution, is contained in *\n"; - print $fh " * the files COPYING and Copyright.html. COPYING can be found at the root *\n"; - print $fh " * of the source code distribution tree; Copyright.html can be found at the *\n"; - print $fh " * root level of an installed copy of the electronic HDF5 document set and *\n"; - print $fh " * is linked from the top-level documents page. It can also be found at *\n"; - print $fh " * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have *\n"; - print $fh " * access to either file, you may request a copy from help\@hdfgroup.org. *\n"; + print $fh " * the COPYING file, which can be found at the root of the source code *\n"; + print $fh " * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *\n"; + print $fh " * If you do not have access to either file, you may request a copy from *\n"; + print $fh " * help\@hdfgroup.org. *\n"; print $fh " * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */\n"; } diff --git a/bin/make_overflow b/bin/make_overflow index ced486a..ccd640e 100755 --- a/bin/make_overflow +++ b/bin/make_overflow @@ -14,12 +14,10 @@ my @ctypes = ( () ); # # This file is part of HDF5. The full HDF5 copyright notice, including # terms governing use, modification, and redistribution, is contained in -# the files COPYING and Copyright.html. COPYING can be found at the root -# of the source code distribution tree; Copyright.html can be found at the -# root level of an installed copy of the electronic HDF5 document set and -# is linked from the top-level documents page. It can also be found at -# http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have -# access to either file, you may request a copy from help@hdfgroup.org. +# the COPYING file, which can be found at the root of the source code +# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. +# If you do not have access to either file, you may request a copy from +# help@hdfgroup.org. # # Create assignment overflow #ifdefs @@ -67,12 +65,10 @@ sub print_copyright ($) { print $fh " * *\n"; print $fh " * This file is part of HDF5. The full HDF5 copyright notice, including *\n"; print $fh " * terms governing use, modification, and redistribution, is contained in *\n"; - print $fh " * the files COPYING and Copyright.html. COPYING can be found at the root *\n"; - print $fh " * of the source code distribution tree; Copyright.html can be found at the *\n"; - print $fh " * root level of an installed copy of the electronic HDF5 document set and *\n"; - print $fh " * is linked from the top-level documents page. It can also be found at *\n"; - print $fh " * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have *\n"; - print $fh " * access to either file, you may request a copy from help\@hdfgroup.org. *\n"; + print $fh " * the COPYING file, which can be found at the root of the source code *\n"; + print $fh " * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *\n"; + print $fh " * If you do not have access to either file, you may request a copy from *\n"; + print $fh " * help\@hdfgroup.org. *\n"; print $fh " * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */\n"; } diff --git a/bin/make_vers b/bin/make_vers index 0bc3b62..7e7fba1 100755 --- a/bin/make_vers +++ b/bin/make_vers @@ -23,12 +23,10 @@ $indent = 2; # # This file is part of HDF5. The full HDF5 copyright notice, including # terms governing use, modification, and redistribution, is contained in -# the files COPYING and Copyright.html. COPYING can be found at the root -# of the source code distribution tree; Copyright.html can be found at the -# root level of an installed copy of the electronic HDF5 document set and -# is linked from the top-level documents page. It can also be found at -# http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have -# access to either file, you may request a copy from help@hdfgroup.org. +# the COPYING file, which can be found at the root of the source code +# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. +# If you do not have access to either file, you may request a copy from +# help@hdfgroup.org. # # Create public symbol version headers @@ -52,12 +50,10 @@ sub print_copyright ($) { print $fh " * *\n"; print $fh " * This file is part of HDF5. The full HDF5 copyright notice, including *\n"; print $fh " * terms governing use, modification, and redistribution, is contained in *\n"; - print $fh " * the files COPYING and Copyright.html. COPYING can be found at the root *\n"; - print $fh " * of the source code distribution tree; Copyright.html can be found at the *\n"; - print $fh " * root level of an installed copy of the electronic HDF5 document set and *\n"; - print $fh " * is linked from the top-level documents page. It can also be found at *\n"; - print $fh " * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have *\n"; - print $fh " * access to either file, you may request a copy from help\@hdfgroup.org. *\n"; + print $fh " * the COPYING file, which can be found at the root of the source code *\n"; + print $fh " * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *\n"; + print $fh " * If you do not have access to either file, you may request a copy from *\n"; + print $fh " * help\@hdfgroup.org. *\n"; print $fh " * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */\n"; } diff --git a/bin/mkdirs b/bin/mkdirs index 694a754..43972b6 100755 --- a/bin/mkdirs +++ b/bin/mkdirs @@ -6,12 +6,10 @@ # # This file is part of HDF5. The full HDF5 copyright notice, including # terms governing use, modification, and redistribution, is contained in -# the files COPYING and Copyright.html. COPYING can be found at the root -# of the source code distribution tree; Copyright.html can be found at the -# root level of an installed copy of the electronic HDF5 document set and -# is linked from the top-level documents page. It can also be found at -# http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have -# access to either file, you may request a copy from help@hdfgroup.org. +# the COPYING file, which can be found at the root of the source code +# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. +# If you do not have access to either file, you may request a copy from +# help@hdfgroup.org. # # This is a small program which will create directories n-levels deep. # You just call it with something like: diff --git a/bin/newer b/bin/newer index 8ed9f87..8083cae 100755 --- a/bin/newer +++ b/bin/newer @@ -6,12 +6,10 @@ # # This file is part of HDF5. The full HDF5 copyright notice, including # terms governing use, modification, and redistribution, is contained in -# the files COPYING and Copyright.html. COPYING can be found at the root -# of the source code distribution tree; Copyright.html can be found at the -# root level of an installed copy of the electronic HDF5 document set and -# is linked from the top-level documents page. It can also be found at -# http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have -# access to either file, you may request a copy from help@hdfgroup.org. +# the COPYING file, which can be found at the root of the source code +# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. +# If you do not have access to either file, you may request a copy from +# help@hdfgroup.org. # # Compare the modification time of file argument 1 against other file arguments. # Return true (0) if argument 1 is newer than all others, otherwise return diff --git a/bin/output_filter.sh b/bin/output_filter.sh index 35af819..fb59dfd 100644 --- a/bin/output_filter.sh +++ b/bin/output_filter.sh @@ -3,12 +3,10 @@ ## ## This file is part of HDF5. The full HDF5 copyright notice, including ## terms governing use, modification, and redistribution, is contained in -## the files COPYING and Copyright.html. COPYING can be found at the root -## of the source code distribution tree; Copyright.html can be found at the -## root level of an installed copy of the electronic HDF5 document set and -## is linked from the top-level documents page. It can also be found at -## http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have -## access to either file, you may request a copy from help@hdfgroup.org. +## the COPYING file, which can be found at the root of the source code +## distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. +## If you do not have access to either file, you may request a copy from +## help@hdfgroup.org. # This contains function definitions of output filtering. # This file should only be sourced in by another shell script. diff --git a/bin/pkgscrpts/h5rmflags b/bin/pkgscrpts/h5rmflags index 32b8090..099956c 100755 --- a/bin/pkgscrpts/h5rmflags +++ b/bin/pkgscrpts/h5rmflags @@ -6,12 +6,10 @@ # # This file is part of HDF5. The full HDF5 copyright notice, including # terms governing use, modification, and redistribution, is contained in -# the files COPYING and Copyright.html. COPYING can be found at the root -# of the source code distribution tree; Copyright.html can be found at the -# root level of an installed copy of the electronic HDF5 document set and -# is linked from the top-level documents page. It can also be found at -# http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have -# access to either file, you may request a copy from help@hdfgroup.org. +# the COPYING file, which can be found at the root of the source code +# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. +# If you do not have access to either file, you may request a copy from +# help@hdfgroup.org. # ## Remove paths to libraries used to build HDF5 when packaging HDF5 diff --git a/bin/pkgscrpts/makeHDF5BinaryTarfiles.pl b/bin/pkgscrpts/makeHDF5BinaryTarfiles.pl index 32b3049..f4a9ebd 100755 --- a/bin/pkgscrpts/makeHDF5BinaryTarfiles.pl +++ b/bin/pkgscrpts/makeHDF5BinaryTarfiles.pl @@ -7,12 +7,10 @@ # # This file is part of HDF5. The full HDF5 copyright notice, including # terms governing use, modification, and redistribution, is contained in -# the files COPYING and Copyright.html. COPYING can be found at the root -# of the source code distribution tree; Copyright.html can be found at the -# root level of an installed copy of the electronic HDF5 document set and -# is linked from the top-level documents page. It can also be found at -# http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have -# access to either file, you may request a copy from help@hdfgroup.org. +# the COPYING file, which can be found at the root of the source code +# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. +# If you do not have access to either file, you may request a copy from +# help@hdfgroup.org. # # # diff --git a/bin/release b/bin/release index 352384f..09c033d 100755 --- a/bin/release +++ b/bin/release @@ -6,12 +6,10 @@ # # This file is part of HDF5. The full HDF5 copyright notice, including # terms governing use, modification, and redistribution, is contained in -# the files COPYING and Copyright.html. COPYING can be found at the root -# of the source code distribution tree; Copyright.html can be found at the -# root level of an installed copy of the electronic HDF5 document set and -# is linked from the top-level documents page. It can also be found at -# http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have -# access to either file, you may request a copy from help@hdfgroup.org. +# the COPYING file, which can be found at the root of the source code +# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. +# If you do not have access to either file, you may request a copy from +# help@hdfgroup.org. # # Make a release of hdf5. diff --git a/bin/restore.sh b/bin/restore.sh index 7f1c7bb..60ac661 100755 --- a/bin/restore.sh +++ b/bin/restore.sh @@ -5,12 +5,10 @@ # # This file is part of HDF5. The full HDF5 copyright notice, including # terms governing use, modification, and redistribution, is contained in -# the files COPYING and Copyright.html. COPYING can be found at the root -# of the source code distribution tree; Copyright.html can be found at the -# root level of an installed copy of the electronic document set and is -# linked from the top-level documents page. It can also be found at -# http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have access -# to either file, you may request a copy from help@hdfgroup.org. +# the COPYING file, which can be found at the root of the source code +# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. +# If you do not have access to either file, you may request a copy from +# help@hdfgroup.org. # # A script to clean up the action of autogen.sh diff --git a/bin/runtest b/bin/runtest index 4356db3..2611f09 100755 --- a/bin/runtest +++ b/bin/runtest @@ -6,12 +6,10 @@ # # This file is part of HDF5. The full HDF5 copyright notice, including # terms governing use, modification, and redistribution, is contained in -# the files COPYING and Copyright.html. COPYING can be found at the root -# of the source code distribution tree; Copyright.html can be found at the -# root level of an installed copy of the electronic HDF5 document set and -# is linked from the top-level documents page. It can also be found at -# http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have -# access to either file, you may request a copy from help@hdfgroup.org. +# the COPYING file, which can be found at the root of the source code +# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. +# If you do not have access to either file, you may request a copy from +# help@hdfgroup.org. # # run the hdf5/bin/snapshot diff --git a/bin/snapshot b/bin/snapshot index cc4bbc9..5c78fc8 100755 --- a/bin/snapshot +++ b/bin/snapshot @@ -6,12 +6,10 @@ # # This file is part of HDF5. The full HDF5 copyright notice, including # terms governing use, modification, and redistribution, is contained in -# the files COPYING and Copyright.html. COPYING can be found at the root -# of the source code distribution tree; Copyright.html can be found at the -# root level of an installed copy of the electronic HDF5 document set and -# is linked from the top-level documents page. It can also be found at -# http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have -# access to either file, you may request a copy from help@hdfgroup.org. +# the COPYING file, which can be found at the root of the source code +# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. +# If you do not have access to either file, you may request a copy from +# help@hdfgroup.org. # This script should be run nightly from cron. It checks out the source # from the source repository and compares it against the previous diff --git a/bin/snapshot_version b/bin/snapshot_version index 86f7142..8aad05d 100644 --- a/bin/snapshot_version +++ b/bin/snapshot_version @@ -5,12 +5,10 @@ # # This file is part of HDF5. The full HDF5 copyright notice, including # terms governing use, modification, and redistribution, is contained in -# the files COPYING and Copyright.html. COPYING can be found at the root -# of the source code distribution tree; Copyright.html can be found at the -# root level of an installed copy of the electronic HDF5 document set and -# is linked from the top-level documents page. It can also be found at -# http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have -# access to either file, you may request a copy from help@hdfgroup.org. +# the COPYING file, which can be found at the root of the source code +# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. +# If you do not have access to either file, you may request a copy from +# help@hdfgroup.org. # # default version for snapshot test diff --git a/bin/switch_maint_mode b/bin/switch_maint_mode index 2b62545..fb1568b 100755 --- a/bin/switch_maint_mode +++ b/bin/switch_maint_mode @@ -6,12 +6,10 @@ # # This file is part of HDF5. The full HDF5 copyright notice, including # terms governing use, modification, and redistribution, is contained in -# the files COPYING and Copyright.html. COPYING can be found at the root -# of the source code distribution tree; Copyright.html can be found at the -# root level of an installed copy of the electronic HDF5 document set and -# is linked from the top-level documents page. It can also be found at -# http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have -# access to either file, you may request a copy from help@hdfgroup.org. +# the COPYING file, which can be found at the root of the source code +# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. +# If you do not have access to either file, you may request a copy from +# help@hdfgroup.org. # # Switch AM_MAINTAINER_MODE value in configure.ac # Usage: See USAGE() diff --git a/bin/timekeeper b/bin/timekeeper index 7c50759..14adf2c 100755 --- a/bin/timekeeper +++ b/bin/timekeeper @@ -6,12 +6,10 @@ # # This file is part of HDF5. The full HDF5 copyright notice, including # terms governing use, modification, and redistribution, is contained in -# the files COPYING and Copyright.html. COPYING can be found at the root -# of the source code distribution tree; Copyright.html can be found at the -# root level of an installed copy of the electronic HDF5 document set and -# is linked from the top-level documents page. It can also be found at -# http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have -# access to either file, you may request a copy from help@hdfgroup.org. +# the COPYING file, which can be found at the root of the source code +# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. +# If you do not have access to either file, you may request a copy from +# help@hdfgroup.org. ## # As a time keeper of the remote daily test process launched by runtest. # It sleeps for a certain time and then wakes up to hangup those processes diff --git a/bin/trace b/bin/trace index 19c8990..4467814 100755 --- a/bin/trace +++ b/bin/trace @@ -6,12 +6,10 @@ # # This file is part of HDF5. The full HDF5 copyright notice, including # terms governing use, modification, and redistribution, is contained in -# the files COPYING and Copyright.html. COPYING can be found at the root -# of the source code distribution tree; Copyright.html can be found at the -# root level of an installed copy of the electronic HDF5 document set and -# is linked from the top-level documents page. It can also be found at -# http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have -# access to either file, you may request a copy from help@hdfgroup.org. +# the COPYING file, which can be found at the root of the source code +# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. +# If you do not have access to either file, you may request a copy from +# help@hdfgroup.org. ## require 5.003; $Source = ""; diff --git a/c++/Makefile.am b/c++/Makefile.am index 416060a..94fbefc 100644 --- a/c++/Makefile.am +++ b/c++/Makefile.am @@ -5,12 +5,10 @@ # # This file is part of HDF5. The full HDF5 copyright notice, including # terms governing use, modification, and redistribution, is contained in -# the files COPYING and Copyright.html. COPYING can be found at the root -# of the source code distribution tree; Copyright.html can be found at the -# root level of an installed copy of the electronic HDF5 document set and -# is linked from the top-level documents page. It can also be found at -# http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have -# access to either file, you may request a copy from help@hdfgroup.org. +# the COPYING file, which can be found at the root of the source code +# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. +# If you do not have access to either file, you may request a copy from +# help@hdfgroup.org. ## ## Makefile.am ## Run automake to generate a Makefile.in from this file. diff --git a/c++/examples/Makefile.am b/c++/examples/Makefile.am index 2408217..51ab8e3 100644 --- a/c++/examples/Makefile.am +++ b/c++/examples/Makefile.am @@ -5,12 +5,10 @@ # # This file is part of HDF5. The full HDF5 copyright notice, including # terms governing use, modification, and redistribution, is contained in -# the files COPYING and Copyright.html. COPYING can be found at the root -# of the source code distribution tree; Copyright.html can be found at the -# root level of an installed copy of the electronic HDF5 document set and -# is linked from the top-level documents page. It can also be found at -# http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have -# access to either file, you may request a copy from help@hdfgroup.org. +# the COPYING file, which can be found at the root of the source code +# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. +# If you do not have access to either file, you may request a copy from +# help@hdfgroup.org. ## ## Makefile.am ## Run automake to generate a Makefile.in from this file. diff --git a/c++/examples/chunks.cpp b/c++/examples/chunks.cpp index 57b23fd..836c86d 100644 --- a/c++/examples/chunks.cpp +++ b/c++/examples/chunks.cpp @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* diff --git a/c++/examples/compound.cpp b/c++/examples/compound.cpp index 7e14244..2636d8e 100644 --- a/c++/examples/compound.cpp +++ b/c++/examples/compound.cpp @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* diff --git a/c++/examples/create.cpp b/c++/examples/create.cpp index 1930987..d4500f9 100644 --- a/c++/examples/create.cpp +++ b/c++/examples/create.cpp @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* diff --git a/c++/examples/extend_ds.cpp b/c++/examples/extend_ds.cpp index f3f9a90..0ecad1f 100644 --- a/c++/examples/extend_ds.cpp +++ b/c++/examples/extend_ds.cpp @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* diff --git a/c++/examples/h5group.cpp b/c++/examples/h5group.cpp index 58ee44d..3e3ab4d 100644 --- a/c++/examples/h5group.cpp +++ b/c++/examples/h5group.cpp @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* diff --git a/c++/examples/h5tutr_cmprss.cpp b/c++/examples/h5tutr_cmprss.cpp index 5460191..ee2c544 100644 --- a/c++/examples/h5tutr_cmprss.cpp +++ b/c++/examples/h5tutr_cmprss.cpp @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* diff --git a/c++/examples/h5tutr_crtatt.cpp b/c++/examples/h5tutr_crtatt.cpp index a53bb1c..db34353 100644 --- a/c++/examples/h5tutr_crtatt.cpp +++ b/c++/examples/h5tutr_crtatt.cpp @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* diff --git a/c++/examples/h5tutr_crtdat.cpp b/c++/examples/h5tutr_crtdat.cpp index b50b659..e36a215 100644 --- a/c++/examples/h5tutr_crtdat.cpp +++ b/c++/examples/h5tutr_crtdat.cpp @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* diff --git a/c++/examples/h5tutr_crtgrp.cpp b/c++/examples/h5tutr_crtgrp.cpp index 41bbf1b..5462cbf 100644 --- a/c++/examples/h5tutr_crtgrp.cpp +++ b/c++/examples/h5tutr_crtgrp.cpp @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* diff --git a/c++/examples/h5tutr_crtgrpar.cpp b/c++/examples/h5tutr_crtgrpar.cpp index a050e3c..93bd08d 100644 --- a/c++/examples/h5tutr_crtgrpar.cpp +++ b/c++/examples/h5tutr_crtgrpar.cpp @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* diff --git a/c++/examples/h5tutr_crtgrpd.cpp b/c++/examples/h5tutr_crtgrpd.cpp index 12de485..96805a7 100644 --- a/c++/examples/h5tutr_crtgrpd.cpp +++ b/c++/examples/h5tutr_crtgrpd.cpp @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* diff --git a/c++/examples/h5tutr_extend.cpp b/c++/examples/h5tutr_extend.cpp index 8f80266..703068a 100644 --- a/c++/examples/h5tutr_extend.cpp +++ b/c++/examples/h5tutr_extend.cpp @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* diff --git a/c++/examples/h5tutr_rdwt.cpp b/c++/examples/h5tutr_rdwt.cpp index 5c83dcb..5ab7ccc 100644 --- a/c++/examples/h5tutr_rdwt.cpp +++ b/c++/examples/h5tutr_rdwt.cpp @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* diff --git a/c++/examples/h5tutr_subset.cpp b/c++/examples/h5tutr_subset.cpp index bf57713..9ba2104 100644 --- a/c++/examples/h5tutr_subset.cpp +++ b/c++/examples/h5tutr_subset.cpp @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* diff --git a/c++/examples/readdata.cpp b/c++/examples/readdata.cpp index 74b02f9..fd88776 100644 --- a/c++/examples/readdata.cpp +++ b/c++/examples/readdata.cpp @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ // diff --git a/c++/examples/run-c++-ex.sh.in b/c++/examples/run-c++-ex.sh.in index eae2782..f0d3e93 100644 --- a/c++/examples/run-c++-ex.sh.in +++ b/c++/examples/run-c++-ex.sh.in @@ -5,12 +5,10 @@ # # This file is part of HDF5. The full HDF5 copyright notice, including # terms governing use, modification, and redistribution, is contained in -# the files COPYING and Copyright.html. COPYING can be found at the root -# of the source code distribution tree; Copyright.html can be found at the -# root level of an installed copy of the electronic HDF5 document set and -# is linked from the top-level documents page. It can also be found at -# http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have -# access to either file, you may request a copy from help@hdfgroup.org. +# the COPYING file, which can be found at the root of the source code +# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. +# If you do not have access to either file, you may request a copy from +# help@hdfgroup.org. # # This file: run-c++-ex.sh diff --git a/c++/examples/testh5c++.sh.in b/c++/examples/testh5c++.sh.in index 40d503f..42cb0df 100644 --- a/c++/examples/testh5c++.sh.in +++ b/c++/examples/testh5c++.sh.in @@ -6,12 +6,10 @@ # # This file is part of HDF5. The full HDF5 copyright notice, including # terms governing use, modification, and redistribution, is contained in -# the files COPYING and Copyright.html. COPYING can be found at the root -# of the source code distribution tree; Copyright.html can be found at the -# root level of an installed copy of the electronic HDF5 document set and -# is linked from the top-level documents page. It can also be found at -# http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have -# access to either file, you may request a copy from help@hdfgroup.org. +# the COPYING file, which can be found at the root of the source code +# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. +# If you do not have access to either file, you may request a copy from +# help@hdfgroup.org. # # Tests for the h5c++ compiler tool # Created: Albert Cheng, 2007/3/14 diff --git a/c++/examples/writedata.cpp b/c++/examples/writedata.cpp index c3a5f48..e14e578 100644 --- a/c++/examples/writedata.cpp +++ b/c++/examples/writedata.cpp @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* diff --git a/c++/src/H5AbstractDs.cpp b/c++/src/H5AbstractDs.cpp index 621578e..b900b90 100644 --- a/c++/src/H5AbstractDs.cpp +++ b/c++/src/H5AbstractDs.cpp @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #include diff --git a/c++/src/H5AbstractDs.h b/c++/src/H5AbstractDs.h index f0859c8..73a18b8 100644 --- a/c++/src/H5AbstractDs.h +++ b/c++/src/H5AbstractDs.h @@ -6,12 +6,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #ifndef __AbstractDs_H diff --git a/c++/src/H5Alltypes.h b/c++/src/H5Alltypes.h index df7213a..d67f3fe 100644 --- a/c++/src/H5Alltypes.h +++ b/c++/src/H5Alltypes.h @@ -6,12 +6,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ // This header file simply serves as a container to hold the diff --git a/c++/src/H5ArrayType.cpp b/c++/src/H5ArrayType.cpp index c8bd0fc..9d4a973 100644 --- a/c++/src/H5ArrayType.cpp +++ b/c++/src/H5ArrayType.cpp @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #include diff --git a/c++/src/H5ArrayType.h b/c++/src/H5ArrayType.h index dd9db51..ffb8712 100644 --- a/c++/src/H5ArrayType.h +++ b/c++/src/H5ArrayType.h @@ -6,12 +6,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #ifndef __H5ArrayType_H diff --git a/c++/src/H5AtomType.cpp b/c++/src/H5AtomType.cpp index 0dc2b1e..9fe7608 100644 --- a/c++/src/H5AtomType.cpp +++ b/c++/src/H5AtomType.cpp @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #include diff --git a/c++/src/H5AtomType.h b/c++/src/H5AtomType.h index f4c70fd..0be3cb5 100644 --- a/c++/src/H5AtomType.h +++ b/c++/src/H5AtomType.h @@ -6,12 +6,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #ifndef __H5AtomType_H diff --git a/c++/src/H5Attribute.cpp b/c++/src/H5Attribute.cpp index c506906..cbf3029 100644 --- a/c++/src/H5Attribute.cpp +++ b/c++/src/H5Attribute.cpp @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #ifdef OLD_HEADER_FILENAME diff --git a/c++/src/H5Attribute.h b/c++/src/H5Attribute.h index 6d6df2c..41e74d9 100644 --- a/c++/src/H5Attribute.h +++ b/c++/src/H5Attribute.h @@ -6,12 +6,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #ifndef __H5Attribute_H diff --git a/c++/src/H5Classes.h b/c++/src/H5Classes.h index 00066fe..f0f6359 100644 --- a/c++/src/H5Classes.h +++ b/c++/src/H5Classes.h @@ -6,12 +6,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #ifndef __H5Classes_H diff --git a/c++/src/H5CommonFG.cpp b/c++/src/H5CommonFG.cpp index f3390aa..c9c203a 100644 --- a/c++/src/H5CommonFG.cpp +++ b/c++/src/H5CommonFG.cpp @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #include diff --git a/c++/src/H5CommonFG.h b/c++/src/H5CommonFG.h index 0c7b799..3cbad76 100644 --- a/c++/src/H5CommonFG.h +++ b/c++/src/H5CommonFG.h @@ -6,12 +6,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #ifndef __CommonFG_H diff --git a/c++/src/H5CompType.cpp b/c++/src/H5CompType.cpp index 7db2cfe..f7862c9 100644 --- a/c++/src/H5CompType.cpp +++ b/c++/src/H5CompType.cpp @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #include diff --git a/c++/src/H5CompType.h b/c++/src/H5CompType.h index 042b59f..018d875 100644 --- a/c++/src/H5CompType.h +++ b/c++/src/H5CompType.h @@ -6,12 +6,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #ifndef __H5CompType_H diff --git a/c++/src/H5Cpp.h b/c++/src/H5Cpp.h index b86e0f3..09914e8 100644 --- a/c++/src/H5Cpp.h +++ b/c++/src/H5Cpp.h @@ -6,12 +6,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #ifndef __H5Cpp_H diff --git a/c++/src/H5CppDoc.h b/c++/src/H5CppDoc.h index afc6ebf..543f49b 100644 --- a/c++/src/H5CppDoc.h +++ b/c++/src/H5CppDoc.h @@ -6,12 +6,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #ifndef __H5CppDoc_H diff --git a/c++/src/H5DataSet.cpp b/c++/src/H5DataSet.cpp index a0db328..dd2fd21 100644 --- a/c++/src/H5DataSet.cpp +++ b/c++/src/H5DataSet.cpp @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #ifdef OLD_HEADER_FILENAME diff --git a/c++/src/H5DataSet.h b/c++/src/H5DataSet.h index f9e29ff..2f3eebe 100644 --- a/c++/src/H5DataSet.h +++ b/c++/src/H5DataSet.h @@ -6,12 +6,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #ifndef __H5DataSet_H diff --git a/c++/src/H5DataSpace.cpp b/c++/src/H5DataSpace.cpp index 2587a72..49b8ea3 100644 --- a/c++/src/H5DataSpace.cpp +++ b/c++/src/H5DataSpace.cpp @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #ifdef OLD_HEADER_FILENAME diff --git a/c++/src/H5DataSpace.h b/c++/src/H5DataSpace.h index 281e865..c0a1d2b 100644 --- a/c++/src/H5DataSpace.h +++ b/c++/src/H5DataSpace.h @@ -6,12 +6,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #ifndef __H5DataSpace_H diff --git a/c++/src/H5DataType.cpp b/c++/src/H5DataType.cpp index 2795485..57f9361 100644 --- a/c++/src/H5DataType.cpp +++ b/c++/src/H5DataType.cpp @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #ifdef OLD_HEADER_FILENAME diff --git a/c++/src/H5DataType.h b/c++/src/H5DataType.h index c2ea2a3..32a79fa 100644 --- a/c++/src/H5DataType.h +++ b/c++/src/H5DataType.h @@ -6,12 +6,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #ifndef __H5DataType_H diff --git a/c++/src/H5DcreatProp.cpp b/c++/src/H5DcreatProp.cpp index 966ca16..67e4a1c 100644 --- a/c++/src/H5DcreatProp.cpp +++ b/c++/src/H5DcreatProp.cpp @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #include diff --git a/c++/src/H5DcreatProp.h b/c++/src/H5DcreatProp.h index f0475eb..5d5714a 100644 --- a/c++/src/H5DcreatProp.h +++ b/c++/src/H5DcreatProp.h @@ -6,12 +6,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #ifndef __H5DSCreatPropList_H diff --git a/c++/src/H5DxferProp.cpp b/c++/src/H5DxferProp.cpp index e018ff2..4c767cb 100644 --- a/c++/src/H5DxferProp.cpp +++ b/c++/src/H5DxferProp.cpp @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #include diff --git a/c++/src/H5DxferProp.h b/c++/src/H5DxferProp.h index 39d3ba8..4a38bd0 100644 --- a/c++/src/H5DxferProp.h +++ b/c++/src/H5DxferProp.h @@ -6,12 +6,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #ifndef __H5DSetMemXferPropList_H diff --git a/c++/src/H5EnumType.cpp b/c++/src/H5EnumType.cpp index 9072aab..a96239c 100644 --- a/c++/src/H5EnumType.cpp +++ b/c++/src/H5EnumType.cpp @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #include diff --git a/c++/src/H5EnumType.h b/c++/src/H5EnumType.h index cd93eb5..fc8089e 100644 --- a/c++/src/H5EnumType.h +++ b/c++/src/H5EnumType.h @@ -6,12 +6,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #ifndef __H5EnumType_H diff --git a/c++/src/H5Exception.cpp b/c++/src/H5Exception.cpp index 0316f64..c9a1323 100644 --- a/c++/src/H5Exception.cpp +++ b/c++/src/H5Exception.cpp @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #include diff --git a/c++/src/H5Exception.h b/c++/src/H5Exception.h index 2e68cf0..2cc2dd6 100644 --- a/c++/src/H5Exception.h +++ b/c++/src/H5Exception.h @@ -6,12 +6,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #ifndef __H5Exception_H diff --git a/c++/src/H5FaccProp.cpp b/c++/src/H5FaccProp.cpp index 1ab812c..b414294 100644 --- a/c++/src/H5FaccProp.cpp +++ b/c++/src/H5FaccProp.cpp @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #include diff --git a/c++/src/H5FaccProp.h b/c++/src/H5FaccProp.h index 8e488e5..2563163 100644 --- a/c++/src/H5FaccProp.h +++ b/c++/src/H5FaccProp.h @@ -6,12 +6,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #ifndef __H5FileAccPropList_H diff --git a/c++/src/H5FcreatProp.cpp b/c++/src/H5FcreatProp.cpp index b3e6b7b..9674c0a 100644 --- a/c++/src/H5FcreatProp.cpp +++ b/c++/src/H5FcreatProp.cpp @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #include diff --git a/c++/src/H5FcreatProp.h b/c++/src/H5FcreatProp.h index 6beac02..da620d4 100644 --- a/c++/src/H5FcreatProp.h +++ b/c++/src/H5FcreatProp.h @@ -6,12 +6,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #ifndef __H5FileCreatPropList_H diff --git a/c++/src/H5File.cpp b/c++/src/H5File.cpp index bea4612..3a0b54d 100644 --- a/c++/src/H5File.cpp +++ b/c++/src/H5File.cpp @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #ifdef OLD_HEADER_FILENAME diff --git a/c++/src/H5File.h b/c++/src/H5File.h index df5cca6..b428a40 100644 --- a/c++/src/H5File.h +++ b/c++/src/H5File.h @@ -6,12 +6,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #ifndef __H5File_H diff --git a/c++/src/H5FloatType.cpp b/c++/src/H5FloatType.cpp index f573add..6bb3fd6 100644 --- a/c++/src/H5FloatType.cpp +++ b/c++/src/H5FloatType.cpp @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #include diff --git a/c++/src/H5FloatType.h b/c++/src/H5FloatType.h index 8affa1a..e84f50b 100644 --- a/c++/src/H5FloatType.h +++ b/c++/src/H5FloatType.h @@ -6,12 +6,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #ifndef __H5FloatType_H diff --git a/c++/src/H5Group.cpp b/c++/src/H5Group.cpp index 66e2339..994d9ff 100644 --- a/c++/src/H5Group.cpp +++ b/c++/src/H5Group.cpp @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #ifdef OLD_HEADER_FILENAME diff --git a/c++/src/H5Group.h b/c++/src/H5Group.h index c8b2961..a7e1f7c 100644 --- a/c++/src/H5Group.h +++ b/c++/src/H5Group.h @@ -6,12 +6,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #ifndef __Group_H diff --git a/c++/src/H5IdComponent.cpp b/c++/src/H5IdComponent.cpp index 122479f..f9a08cd 100644 --- a/c++/src/H5IdComponent.cpp +++ b/c++/src/H5IdComponent.cpp @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #include diff --git a/c++/src/H5IdComponent.h b/c++/src/H5IdComponent.h index 0603e5c..baf939e 100644 --- a/c++/src/H5IdComponent.h +++ b/c++/src/H5IdComponent.h @@ -6,12 +6,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #ifndef __IdComponent_H diff --git a/c++/src/H5Include.h b/c++/src/H5Include.h index ba82d78..a180430 100644 --- a/c++/src/H5Include.h +++ b/c++/src/H5Include.h @@ -6,12 +6,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #include diff --git a/c++/src/H5IntType.cpp b/c++/src/H5IntType.cpp index 3aadcab..fb7e476 100644 --- a/c++/src/H5IntType.cpp +++ b/c++/src/H5IntType.cpp @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #include diff --git a/c++/src/H5IntType.h b/c++/src/H5IntType.h index 1ce05c8..82a7cfd 100644 --- a/c++/src/H5IntType.h +++ b/c++/src/H5IntType.h @@ -6,12 +6,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #ifndef __H5IntType_H diff --git a/c++/src/H5LaccProp.cpp b/c++/src/H5LaccProp.cpp index e457e83..1267286 100644 --- a/c++/src/H5LaccProp.cpp +++ b/c++/src/H5LaccProp.cpp @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #include diff --git a/c++/src/H5LaccProp.h b/c++/src/H5LaccProp.h index f31c3fc..9772cde 100644 --- a/c++/src/H5LaccProp.h +++ b/c++/src/H5LaccProp.h @@ -6,12 +6,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ // Class LinkAccPropList represents the HDF5 file access property list and diff --git a/c++/src/H5Library.cpp b/c++/src/H5Library.cpp index dc453b7..9293622 100644 --- a/c++/src/H5Library.cpp +++ b/c++/src/H5Library.cpp @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #include diff --git a/c++/src/H5Library.h b/c++/src/H5Library.h index 76b5f82..9b4150e 100644 --- a/c++/src/H5Library.h +++ b/c++/src/H5Library.h @@ -6,12 +6,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #ifndef __H5Library_H diff --git a/c++/src/H5Location.cpp b/c++/src/H5Location.cpp index 79b353a..e820b0d 100644 --- a/c++/src/H5Location.cpp +++ b/c++/src/H5Location.cpp @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #include diff --git a/c++/src/H5Location.h b/c++/src/H5Location.h index 48fc2b1..a57d3ed 100644 --- a/c++/src/H5Location.h +++ b/c++/src/H5Location.h @@ -6,12 +6,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #ifndef __H5Location_H diff --git a/c++/src/H5Object.cpp b/c++/src/H5Object.cpp index 359fab2..865d04f 100644 --- a/c++/src/H5Object.cpp +++ b/c++/src/H5Object.cpp @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #include diff --git a/c++/src/H5Object.h b/c++/src/H5Object.h index 53f183e..fdaead2 100644 --- a/c++/src/H5Object.h +++ b/c++/src/H5Object.h @@ -6,12 +6,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #ifndef __H5Object_H diff --git a/c++/src/H5OcreatProp.cpp b/c++/src/H5OcreatProp.cpp index 9a3af7e..ec6c08e 100644 --- a/c++/src/H5OcreatProp.cpp +++ b/c++/src/H5OcreatProp.cpp @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #include diff --git a/c++/src/H5OcreatProp.h b/c++/src/H5OcreatProp.h index c9c245a..878c67a 100644 --- a/c++/src/H5OcreatProp.h +++ b/c++/src/H5OcreatProp.h @@ -6,12 +6,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #ifndef __H5ObjCreatPropList_H diff --git a/c++/src/H5PredType.cpp b/c++/src/H5PredType.cpp index 03327c8..53d525c 100644 --- a/c++/src/H5PredType.cpp +++ b/c++/src/H5PredType.cpp @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #include diff --git a/c++/src/H5PredType.h b/c++/src/H5PredType.h index 2fd8a6b..2ffc87f 100644 --- a/c++/src/H5PredType.h +++ b/c++/src/H5PredType.h @@ -6,12 +6,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #ifndef __H5PredType_H diff --git a/c++/src/H5PropList.cpp b/c++/src/H5PropList.cpp index 0df0a9f..dd7b21a 100644 --- a/c++/src/H5PropList.cpp +++ b/c++/src/H5PropList.cpp @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #ifdef OLD_HEADER_FILENAME diff --git a/c++/src/H5PropList.h b/c++/src/H5PropList.h index 772e96c..154d7b2 100644 --- a/c++/src/H5PropList.h +++ b/c++/src/H5PropList.h @@ -6,12 +6,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #ifndef __H5PropList_H diff --git a/c++/src/H5StrType.cpp b/c++/src/H5StrType.cpp index db1cf04..d5fb744 100644 --- a/c++/src/H5StrType.cpp +++ b/c++/src/H5StrType.cpp @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #include diff --git a/c++/src/H5StrType.h b/c++/src/H5StrType.h index aa87bba..abac8de 100644 --- a/c++/src/H5StrType.h +++ b/c++/src/H5StrType.h @@ -6,12 +6,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #ifndef __H5StrType_H diff --git a/c++/src/H5VarLenType.cpp b/c++/src/H5VarLenType.cpp index 64029cc..22e1a66 100644 --- a/c++/src/H5VarLenType.cpp +++ b/c++/src/H5VarLenType.cpp @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #include diff --git a/c++/src/H5VarLenType.h b/c++/src/H5VarLenType.h index 4dc0eb5..4048a4e 100644 --- a/c++/src/H5VarLenType.h +++ b/c++/src/H5VarLenType.h @@ -6,12 +6,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #ifndef __H5VarLenType_H diff --git a/c++/src/Makefile.am b/c++/src/Makefile.am index 6274f7b..efe17dc 100644 --- a/c++/src/Makefile.am +++ b/c++/src/Makefile.am @@ -5,12 +5,10 @@ # # This file is part of HDF5. The full HDF5 copyright notice, including # terms governing use, modification, and redistribution, is contained in -# the files COPYING and Copyright.html. COPYING can be found at the root -# of the source code distribution tree; Copyright.html can be found at the -# root level of an installed copy of the electronic HDF5 document set and -# is linked from the top-level documents page. It can also be found at -# http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have -# access to either file, you may request a copy from help@hdfgroup.org. +# the COPYING file, which can be found at the root of the source code +# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. +# If you do not have access to either file, you may request a copy from +# help@hdfgroup.org. ## ## Makefile.am ## Run automake to generate a Makefile.in from this file. diff --git a/c++/src/h5c++.in b/c++/src/h5c++.in index 7f3c3ce..00502d9 100644 --- a/c++/src/h5c++.in +++ b/c++/src/h5c++.in @@ -6,12 +6,10 @@ # # This file is part of HDF5. The full HDF5 copyright notice, including # terms governing use, modification, and redistribution, is contained in -# the files COPYING and Copyright.html. COPYING can be found at the root -# of the source code distribution tree; Copyright.html can be found at the -# root level of an installed copy of the electronic HDF5 document set and -# is linked from the top-level documents page. It can also be found at -# http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have -# access to either file, you may request a copy from help@hdfgroup.org. +# the COPYING file, which can be found at the root of the source code +# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. +# If you do not have access to either file, you may request a copy from +# help@hdfgroup.org. # ############################################################################ diff --git a/c++/src/header.html b/c++/src/header.html index c3018d7..cb42565 100644 --- a/c++/src/header.html +++ b/c++/src/header.html @@ -12,12 +12,10 @@ xmlns="http://www.w3.org/TR/REC-html40"> * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * --> diff --git a/c++/test/H5srcdir_str.h.in b/c++/test/H5srcdir_str.h.in index d472124..bab1df3 100644 --- a/c++/test/H5srcdir_str.h.in +++ b/c++/test/H5srcdir_str.h.in @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* If you are reading this file and it has a '.h' suffix, it was automatically diff --git a/c++/test/Makefile.am b/c++/test/Makefile.am index da0a864..0fc17fc 100644 --- a/c++/test/Makefile.am +++ b/c++/test/Makefile.am @@ -5,12 +5,10 @@ # # This file is part of HDF5. The full HDF5 copyright notice, including # terms governing use, modification, and redistribution, is contained in -# the files COPYING and Copyright.html. COPYING can be found at the root -# of the source code distribution tree; Copyright.html can be found at the -# root level of an installed copy of the electronic HDF5 document set and -# is linked from the top-level documents page. It can also be found at -# http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have -# access to either file, you may request a copy from help@hdfgroup.org. +# the COPYING file, which can be found at the root of the source code +# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. +# If you do not have access to either file, you may request a copy from +# help@hdfgroup.org. ## ## Makefile.am ## Run automake to generate a Makefile.in from this file. diff --git a/c++/test/dsets.cpp b/c++/test/dsets.cpp index 970f210..a765fb1 100644 --- a/c++/test/dsets.cpp +++ b/c++/test/dsets.cpp @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /***************************************************************************** diff --git a/c++/test/h5cpputil.cpp b/c++/test/h5cpputil.cpp index cf7fc2c..f0c403c 100644 --- a/c++/test/h5cpputil.cpp +++ b/c++/test/h5cpputil.cpp @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /***************************************************************************** diff --git a/c++/test/h5cpputil.h b/c++/test/h5cpputil.h index 7f92e60..18fd44f 100644 --- a/c++/test/h5cpputil.h +++ b/c++/test/h5cpputil.h @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /***************************************************************************** diff --git a/c++/test/tarray.cpp b/c++/test/tarray.cpp index 490772f..a1de9c5 100644 --- a/c++/test/tarray.cpp +++ b/c++/test/tarray.cpp @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /***************************************************************************** diff --git a/c++/test/tattr.cpp b/c++/test/tattr.cpp index 0fcaf09..d1a0d67 100644 --- a/c++/test/tattr.cpp +++ b/c++/test/tattr.cpp @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /***************************************************************************** diff --git a/c++/test/tcompound.cpp b/c++/test/tcompound.cpp index ee634c2..3af78c5 100644 --- a/c++/test/tcompound.cpp +++ b/c++/test/tcompound.cpp @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /***************************************************************************** diff --git a/c++/test/tdspl.cpp b/c++/test/tdspl.cpp index f39694b..4aaa93a 100644 --- a/c++/test/tdspl.cpp +++ b/c++/test/tdspl.cpp @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /***************************************************************************** diff --git a/c++/test/testhdf5.cpp b/c++/test/testhdf5.cpp index 779c931..a2a0867 100644 --- a/c++/test/testhdf5.cpp +++ b/c++/test/testhdf5.cpp @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /***************************************************************************** diff --git a/c++/test/tfile.cpp b/c++/test/tfile.cpp index 715bb30..51682a3 100644 --- a/c++/test/tfile.cpp +++ b/c++/test/tfile.cpp @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /***************************************************************************** diff --git a/c++/test/tfilter.cpp b/c++/test/tfilter.cpp index 19f5b5a..5de6590 100644 --- a/c++/test/tfilter.cpp +++ b/c++/test/tfilter.cpp @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /***************************************************************************** diff --git a/c++/test/th5s.cpp b/c++/test/th5s.cpp index a3aafb3..e99ce99 100644 --- a/c++/test/th5s.cpp +++ b/c++/test/th5s.cpp @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /***************************************************************************** diff --git a/c++/test/titerate.cpp b/c++/test/titerate.cpp index 34e6892..f75d92e 100644 --- a/c++/test/titerate.cpp +++ b/c++/test/titerate.cpp @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /***************************************************************************** diff --git a/c++/test/tlinks.cpp b/c++/test/tlinks.cpp index 0bf6ebf..dc592b3 100644 --- a/c++/test/tlinks.cpp +++ b/c++/test/tlinks.cpp @@ -4,12 +4,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /***************************************************************************** diff --git a/c++/test/tobject.cpp b/c++/test/tobject.cpp index 3c9c1b0..d9f4075 100644 --- a/c++/test/tobject.cpp +++ b/c++/test/tobject.cpp @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /***************************************************************************** diff --git a/c++/test/trefer.cpp b/c++/test/trefer.cpp index c232809..9074154 100644 --- a/c++/test/trefer.cpp +++ b/c++/test/trefer.cpp @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /***************************************************************************** diff --git a/c++/test/ttypes.cpp b/c++/test/ttypes.cpp index fee4115..f76f780 100644 --- a/c++/test/ttypes.cpp +++ b/c++/test/ttypes.cpp @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /***************************************************************************** diff --git a/c++/test/tvlstr.cpp b/c++/test/tvlstr.cpp index 859867b..d5fea07 100644 --- a/c++/test/tvlstr.cpp +++ b/c++/test/tvlstr.cpp @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /***************************************************************************** diff --git a/config/BlankForm b/config/BlankForm index 31116bf..a452f92 100644 --- a/config/BlankForm +++ b/config/BlankForm @@ -6,12 +6,10 @@ # # This file is part of HDF5. The full HDF5 copyright notice, including # terms governing use, modification, and redistribution, is contained in -# the files COPYING and Copyright.html. COPYING can be found at the root -# of the source code distribution tree; Copyright.html can be found at the -# root level of an installed copy of the electronic HDF5 document set and -# is linked from the top-level documents page. It can also be found at -# http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have -# access to either file, you may request a copy from help@hdfgroup.org. +# the COPYING file, which can be found at the root of the source code +# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. +# If you do not have access to either file, you may request a copy from +# help@hdfgroup.org. # This file is part of the HDF5 build script. It is processed shortly diff --git a/config/Makefile.am.blank b/config/Makefile.am.blank index a54c734..b01735b 100644 --- a/config/Makefile.am.blank +++ b/config/Makefile.am.blank @@ -5,12 +5,10 @@ # # This file is part of HDF5. The full HDF5 copyright notice, including # terms governing use, modification, and redistribution, is contained in -# the files COPYING and Copyright.html. COPYING can be found at the root -# of the source code distribution tree; Copyright.html can be found at the -# root level of an installed copy of the electronic HDF5 document set and -# is linked from the top-level documents page. It can also be found at -# http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have -# access to either file, you may request a copy from help@hdfgroup.org. +# the COPYING file, which can be found at the root of the source code +# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. +# If you do not have access to either file, you may request a copy from +# help@hdfgroup.org. ## ## Makefile.am diff --git a/config/apple b/config/apple index 5203695..0b15dfe 100644 --- a/config/apple +++ b/config/apple @@ -6,12 +6,10 @@ # # This file is part of HDF5. The full HDF5 copyright notice, including # terms governing use, modification, and redistribution, is contained in -# the files COPYING and Copyright.html. COPYING can be found at the root -# of the source code distribution tree; Copyright.html can be found at the -# root level of an installed copy of the electronic HDF5 document set and -# is linked from the top-level documents page. It can also be found at -# http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have -# access to either file, you may request a copy from help@hdfgroup.org. +# the COPYING file, which can be found at the root of the source code +# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. +# If you do not have access to either file, you may request a copy from +# help@hdfgroup.org. # This file is part of the HDF5 build script. It is processed shortly diff --git a/config/cce-fflags b/config/cce-fflags index 233f9ff..9a1c685 100644 --- a/config/cce-fflags +++ b/config/cce-fflags @@ -5,12 +5,10 @@ # # This file is part of HDF5. The full HDF5 copyright notice, including # terms governing use, modification, and redistribution, is contained in -# the files COPYING and Copyright.html. COPYING can be found at the root -# of the source code distribution tree; Copyright.html can be found at the -# root level of an installed copy of the electronic HDF5 document set and -# is linked from the top-level documents page. It can also be found at -# http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have -# access to either file, you may request a copy from help@hdfgroup.org. +# the COPYING file, which can be found at the root of the source code +# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. +# If you do not have access to either file, you may request a copy from +# help@hdfgroup.org. # This file should be sourced into configure if the compiler is the diff --git a/config/cce-flags b/config/cce-flags index 8f3b2dc..acab73c 100644 --- a/config/cce-flags +++ b/config/cce-flags @@ -5,12 +5,10 @@ # # This file is part of HDF5. The full HDF5 copyright notice, including # terms governing use, modification, and redistribution, is contained in -# the files COPYING and Copyright.html. COPYING can be found at the root -# of the source code distribution tree; Copyright.html can be found at the -# root level of an installed copy of the electronic HDF5 document set and -# is linked from the top-level documents page. It can also be found at -# http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have -# access to either file, you may request a copy from help@hdfgroup.org. +# the COPYING file, which can be found at the root of the source code +# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. +# If you do not have access to either file, you may request a copy from +# help@hdfgroup.org. # This file should be sourced into configure if the compiler is the diff --git a/config/commence.am b/config/commence.am index 1a26a85..5fe21a6 100644 --- a/config/commence.am +++ b/config/commence.am @@ -7,12 +7,10 @@ ## ## This file is part of HDF5. The full HDF5 copyright notice, including ## terms governing use, modification, and redistribution, is contained in -## the files COPYING and Copyright.html. COPYING can be found at the root -## of the source code distribution tree; Copyright.html can be found at the -## root level of an installed copy of the electronic HDF5 document set and -## is linked from the top-level documents page. It can also be found at -## http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have -## access to either file, you may request a copy from help@hdfgroup.org. +## the COPYING file, which can be found at the root of the source code +## distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. +## If you do not have access to either file, you may request a copy from +## help@hdfgroup.org. ## Textually included in the beginning of every HDF5 Makefile.am diff --git a/config/conclude.am b/config/conclude.am index 1ba56fb..cd1554c 100644 --- a/config/conclude.am +++ b/config/conclude.am @@ -7,12 +7,10 @@ ## ## This file is part of HDF5. The full HDF5 copyright notice, including ## terms governing use, modification, and redistribution, is contained in -## the files COPYING and Copyright.html. COPYING can be found at the root -## of the source code distribution tree; Copyright.html can be found at the -## root level of an installed copy of the electronic HDF5 document set and -## is linked from the top-level documents page. It can also be found at -## http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have -## access to either file, you may request a copy from help@hdfgroup.org. +## the COPYING file, which can be found at the root of the source code +## distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. +## If you do not have access to either file, you may request a copy from +## help@hdfgroup.org. ## Textually included at the end of most HDF5 Makefiles.am. diff --git a/config/conclude_fc.am b/config/conclude_fc.am index 6402412..15d04a7 100644 --- a/config/conclude_fc.am +++ b/config/conclude_fc.am @@ -7,12 +7,10 @@ ## ## This file is part of HDF5. The full HDF5 copyright notice, including ## terms governing use, modification, and redistribution, is contained in -## the files COPYING and Copyright.html. COPYING can be found at the root -## of the source code distribution tree; Copyright.html can be found at the -## root level of an installed copy of the electronic HDF5 document set and -## is linked from the top-level documents page. It can also be found at -## http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have -## access to either file, you may request a copy from help@hdfgroup.org. +## the COPYING file, which can be found at the root of the source code +## distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. +## If you do not have access to either file, you may request a copy from +## help@hdfgroup.org. ## Textually included at the end of the Fortran HDF5 Makefiles.am. diff --git a/config/cygwin b/config/cygwin index 7423403..6ead871 100644 --- a/config/cygwin +++ b/config/cygwin @@ -6,12 +6,10 @@ # # This file is part of HDF5. The full HDF5 copyright notice, including # terms governing use, modification, and redistribution, is contained in -# the files COPYING and Copyright.html. COPYING can be found at the root -# of the source code distribution tree; Copyright.html can be found at the -# root level of an installed copy of the electronic HDF5 document set and -# is linked from the top-level documents page. It can also be found at -# http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have -# access to either file, you may request a copy from help@hdfgroup.org. +# the COPYING file, which can be found at the root of the source code +# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. +# If you do not have access to either file, you may request a copy from +# help@hdfgroup.org. # This file is part of the HDF5 build script. It is processed shortly diff --git a/config/examples.am b/config/examples.am index 8597a16..247dfa8 100644 --- a/config/examples.am +++ b/config/examples.am @@ -7,12 +7,10 @@ ## ## This file is part of HDF5. The full HDF5 copyright notice, including ## terms governing use, modification, and redistribution, is contained in -## the files COPYING and Copyright.html. COPYING can be found at the root -## of the source code distribution tree; Copyright.html can be found at the -## root level of an installed copy of the electronic HDF5 document set and -## is linked from the top-level documents page. It can also be found at -## http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have -## access to either file, you may request a copy from help@hdfgroup.org. +## the COPYING file, which can be found at the root of the source code +## distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. +## If you do not have access to either file, you may request a copy from +## help@hdfgroup.org. ## Textually included near the end of HDF5 Makefiles in example directories. ## Contains boilerplate for building, installing, and cleaning example diff --git a/config/freebsd b/config/freebsd index e42ca60..936c29f 100644 --- a/config/freebsd +++ b/config/freebsd @@ -6,12 +6,10 @@ # # This file is part of HDF5. The full HDF5 copyright notice, including # terms governing use, modification, and redistribution, is contained in -# the files COPYING and Copyright.html. COPYING can be found at the root -# of the source code distribution tree; Copyright.html can be found at the -# root level of an installed copy of the electronic HDF5 document set and -# is linked from the top-level documents page. It can also be found at -# http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have -# access to either file, you may request a copy from help@hdfgroup.org. +# the COPYING file, which can be found at the root of the source code +# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. +# If you do not have access to either file, you may request a copy from +# help@hdfgroup.org. # This file is part of the HDF5 build script. It is processed shortly diff --git a/config/gnu-cxxflags b/config/gnu-cxxflags index 46fd048..e0f2999 100644 --- a/config/gnu-cxxflags +++ b/config/gnu-cxxflags @@ -6,12 +6,10 @@ # # This file is part of HDF5. The full HDF5 copyright notice, including # terms governing use, modification, and redistribution, is contained in -# the files COPYING and Copyright.html. COPYING can be found at the root -# of the source code distribution tree; Copyright.html can be found at the -# root level of an installed copy of the electronic HDF5 document set and -# is linked from the top-level documents page. It can also be found at -# http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have -# access to either file, you may request a copy from help@hdfgroup.org. +# the COPYING file, which can be found at the root of the source code +# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. +# If you do not have access to either file, you may request a copy from +# help@hdfgroup.org. # This file should be sourced into configure if the compiler is the diff --git a/config/gnu-fflags b/config/gnu-fflags index 4585735..e92e054 100644 --- a/config/gnu-fflags +++ b/config/gnu-fflags @@ -6,12 +6,10 @@ # # This file is part of HDF5. The full HDF5 copyright notice, including # terms governing use, modification, and redistribution, is contained in -# the files COPYING and Copyright.html. COPYING can be found at the root -# of the source code distribution tree; Copyright.html can be found at the -# root level of an installed copy of the electronic HDF5 document set and -# is linked from the top-level documents page. It can also be found at -# http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have -# access to either file, you may request a copy from help@hdfgroup.org. +# the COPYING file, which can be found at the root of the source code +# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. +# If you do not have access to either file, you may request a copy from +# help@hdfgroup.org. # This file should be sourced into configure if the compiler is the diff --git a/config/gnu-flags b/config/gnu-flags index 9565303..44ed480 100644 --- a/config/gnu-flags +++ b/config/gnu-flags @@ -6,12 +6,10 @@ # # This file is part of HDF5. The full HDF5 copyright notice, including # terms governing use, modification, and redistribution, is contained in -# the files COPYING and Copyright.html. COPYING can be found at the root -# of the source code distribution tree; Copyright.html can be found at the -# root level of an installed copy of the electronic HDF5 document set and -# is linked from the top-level documents page. It can also be found at -# http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have -# access to either file, you may request a copy from help@hdfgroup.org. +# the COPYING file, which can be found at the root of the source code +# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. +# If you do not have access to either file, you may request a copy from +# help@hdfgroup.org. # This file should be sourced into configure if the compiler is the diff --git a/config/ibm-aix b/config/ibm-aix index ef052fb..805ec34 100644 --- a/config/ibm-aix +++ b/config/ibm-aix @@ -6,12 +6,10 @@ # # This file is part of HDF5. The full HDF5 copyright notice, including # terms governing use, modification, and redistribution, is contained in -# the files COPYING and Copyright.html. COPYING can be found at the root -# of the source code distribution tree; Copyright.html can be found at the -# root level of an installed copy of the electronic HDF5 document set and -# is linked from the top-level documents page. It can also be found at -# http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have -# access to either file, you may request a copy from help@hdfgroup.org. +# the COPYING file, which can be found at the root of the source code +# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. +# If you do not have access to either file, you may request a copy from +# help@hdfgroup.org. # Configuration file for building on the IBM AIX platforms. # This file is part of the HDF5 build script. It is processed shortly diff --git a/config/ibm-flags b/config/ibm-flags index 412817c..881b81c 100644 --- a/config/ibm-flags +++ b/config/ibm-flags @@ -6,12 +6,10 @@ # # This file is part of HDF5. The full HDF5 copyright notice, including # terms governing use, modification, and redistribution, is contained in -# the files COPYING and Copyright.html. COPYING can be found at the root -# of the source code distribution tree; Copyright.html can be found at the -# root level of an installed copy of the electronic HDF5 document set and -# is linked from the top-level documents page. It can also be found at -# http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have -# access to either file, you may request a copy from help@hdfgroup.org. +# the COPYING file, which can be found at the root of the source code +# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. +# If you do not have access to either file, you may request a copy from +# help@hdfgroup.org. # This file should be sourced into configure if the compiler is the diff --git a/config/intel-fflags b/config/intel-fflags index db9543e..8b1110e 100644 --- a/config/intel-fflags +++ b/config/intel-fflags @@ -6,12 +6,10 @@ # # This file is part of HDF5. The full HDF5 copyright notice, including # terms governing use, modification, and redistribution, is contained in -# the files COPYING and Copyright.html. COPYING can be found at the root -# of the source code distribution tree; Copyright.html can be found at the -# root level of an installed copy of the electronic HDF5 document set and -# is linked from the top-level documents page. It can also be found at -# http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have -# access to either file, you may request a copy from help@hdfgroup.org. +# the COPYING file, which can be found at the root of the source code +# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. +# If you do not have access to either file, you may request a copy from +# help@hdfgroup.org. # This file should be sourced into configure if the compiler is the diff --git a/config/intel-flags b/config/intel-flags index ee0d054..dad210c 100644 --- a/config/intel-flags +++ b/config/intel-flags @@ -6,12 +6,10 @@ # # This file is part of HDF5. The full HDF5 copyright notice, including # terms governing use, modification, and redistribution, is contained in -# the files COPYING and Copyright.html. COPYING can be found at the root -# of the source code distribution tree; Copyright.html can be found at the -# root level of an installed copy of the electronic HDF5 document set and -# is linked from the top-level documents page. It can also be found at -# http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have -# access to either file, you may request a copy from help@hdfgroup.org. +# the COPYING file, which can be found at the root of the source code +# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. +# If you do not have access to either file, you may request a copy from +# help@hdfgroup.org. # This file should be sourced into configure if the compiler is the diff --git a/config/linux-gnu b/config/linux-gnu index 912a93b..243b087 100644 --- a/config/linux-gnu +++ b/config/linux-gnu @@ -6,12 +6,10 @@ # # This file is part of HDF5. The full HDF5 copyright notice, including # terms governing use, modification, and redistribution, is contained in -# the files COPYING and Copyright.html. COPYING can be found at the root -# of the source code distribution tree; Copyright.html can be found at the -# root level of an installed copy of the electronic HDF5 document set and -# is linked from the top-level documents page. It can also be found at -# http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have -# access to either file, you may request a copy from help@hdfgroup.org. +# the COPYING file, which can be found at the root of the source code +# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. +# If you do not have access to either file, you may request a copy from +# help@hdfgroup.org. # This is the same as linux-gnulibc1 diff --git a/config/linux-gnuaout b/config/linux-gnuaout index 912a93b..243b087 100644 --- a/config/linux-gnuaout +++ b/config/linux-gnuaout @@ -6,12 +6,10 @@ # # This file is part of HDF5. The full HDF5 copyright notice, including # terms governing use, modification, and redistribution, is contained in -# the files COPYING and Copyright.html. COPYING can be found at the root -# of the source code distribution tree; Copyright.html can be found at the -# root level of an installed copy of the electronic HDF5 document set and -# is linked from the top-level documents page. It can also be found at -# http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have -# access to either file, you may request a copy from help@hdfgroup.org. +# the COPYING file, which can be found at the root of the source code +# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. +# If you do not have access to either file, you may request a copy from +# help@hdfgroup.org. # This is the same as linux-gnulibc1 diff --git a/config/linux-gnulibc1 b/config/linux-gnulibc1 index 1b4785e..1785e0e 100644 --- a/config/linux-gnulibc1 +++ b/config/linux-gnulibc1 @@ -6,12 +6,10 @@ # # This file is part of HDF5. The full HDF5 copyright notice, including # terms governing use, modification, and redistribution, is contained in -# the files COPYING and Copyright.html. COPYING can be found at the root -# of the source code distribution tree; Copyright.html can be found at the -# root level of an installed copy of the electronic HDF5 document set and -# is linked from the top-level documents page. It can also be found at -# http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have -# access to either file, you may request a copy from help@hdfgroup.org. +# the COPYING file, which can be found at the root of the source code +# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. +# If you do not have access to either file, you may request a copy from +# help@hdfgroup.org. # This file is part of the HDF5 build script. It is processed shortly diff --git a/config/linux-gnulibc2 b/config/linux-gnulibc2 index 76526b8..01a0d20 100644 --- a/config/linux-gnulibc2 +++ b/config/linux-gnulibc2 @@ -6,12 +6,10 @@ # # This file is part of HDF5. The full HDF5 copyright notice, including # terms governing use, modification, and redistribution, is contained in -# the files COPYING and Copyright.html. COPYING can be found at the root -# of the source code distribution tree; Copyright.html can be found at the -# root level of an installed copy of the electronic HDF5 document set and -# is linked from the top-level documents page. It can also be found at -# http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have -# access to either file, you may request a copy from help@hdfgroup.org. +# the COPYING file, which can be found at the root of the source code +# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. +# If you do not have access to either file, you may request a copy from +# help@hdfgroup.org. # This file is part of the HDF5 build script. It is processed shortly diff --git a/config/lt_vers.am b/config/lt_vers.am index 3d75074..1bacd1b 100644 --- a/config/lt_vers.am +++ b/config/lt_vers.am @@ -7,17 +7,15 @@ ## ## This file is part of HDF5. The full HDF5 copyright notice, including ## terms governing use, modification, and redistribution, is contained in -## the files COPYING and Copyright.html. COPYING can be found at the root -## of the source code distribution tree; Copyright.html can be found at the -## root level of an installed copy of the electronic HDF5 document set and -## is linked from the top-level documents page. It can also be found at -## http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have -## access to either file, you may request a copy from help@hdfgroup.org. +## the COPYING file, which can be found at the root of the source code +## distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. +## If you do not have access to either file, you may request a copy from +## help@hdfgroup.org. ## -# Add libtool shared library version numbers to the HDF5 library -# See libtool versioning documentation online. -# After making changes, run bin/reconfigure to update other configure related -# files like Makefile.in. +## Add libtool shared library version numbers to the HDF5 library +## See libtool versioning documentation online. +## After making changes, run bin/reconfigure to update other configure related +## files like Makefile.in. LT_VERS_INTERFACE = 101 LT_VERS_REVISION = 0 LT_VERS_AGE = 0 @@ -69,19 +67,3 @@ LT_TOOLS_VERS_INTERFACE = 100 LT_TOOLS_VERS_REVISION = 1 LT_TOOLS_VERS_AGE = 0 - -# Copyright by The HDF Group. -# Copyright by the Board of Trustees of the University of Illinois. -# All rights reserved. -# -# This file is part of HDF5. The full HDF5 copyright notice, including -# terms governing use, modification, and redistribution, is contained in -# the files COPYING and Copyright.html. COPYING can be found at the root -# of the source code distribution tree; Copyright.html can be found at the -# root level of an installed copy of the electronic HDF5 document set and -# is linked from the top-level documents page. It can also be found at -# http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have -# access to either file, you may request a copy from help@hdfgroup.org. - - - diff --git a/config/pgi-fflags b/config/pgi-fflags index 08dfe6e..46f861d 100644 --- a/config/pgi-fflags +++ b/config/pgi-fflags @@ -6,12 +6,10 @@ # # This file is part of HDF5. The full HDF5 copyright notice, including # terms governing use, modification, and redistribution, is contained in -# the files COPYING and Copyright.html. COPYING can be found at the root -# of the source code distribution tree; Copyright.html can be found at the -# root level of an installed copy of the electronic HDF5 document set and -# is linked from the top-level documents page. It can also be found at -# http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have -# access to either file, you may request a copy from help@hdfgroup.org. +# the COPYING file, which can be found at the root of the source code +# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. +# If you do not have access to either file, you may request a copy from +# help@hdfgroup.org. # This file should be sourced into configure if the compiler is the diff --git a/config/pgi-flags b/config/pgi-flags index f6878e6..52828c1 100644 --- a/config/pgi-flags +++ b/config/pgi-flags @@ -6,12 +6,10 @@ # # This file is part of HDF5. The full HDF5 copyright notice, including # terms governing use, modification, and redistribution, is contained in -# the files COPYING and Copyright.html. COPYING can be found at the root -# of the source code distribution tree; Copyright.html can be found at the -# root level of an installed copy of the electronic HDF5 document set and -# is linked from the top-level documents page. It can also be found at -# http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have -# access to either file, you may request a copy from help@hdfgroup.org. +# the COPYING file, which can be found at the root of the source code +# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. +# If you do not have access to either file, you may request a copy from +# help@hdfgroup.org. # This file should be sourced into configure if the compiler is the diff --git a/config/site-specific/BlankForm b/config/site-specific/BlankForm index c31383c..03d421c 100644 --- a/config/site-specific/BlankForm +++ b/config/site-specific/BlankForm @@ -6,12 +6,10 @@ # # This file is part of HDF5. The full HDF5 copyright notice, including # terms governing use, modification, and redistribution, is contained in -# the files COPYING and Copyright.html. COPYING can be found at the root -# of the source code distribution tree; Copyright.html can be found at the -# root level of an installed copy of the electronic HDF5 document set and -# is linked from the top-level documents page. It can also be found at -# http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have -# access to either file, you may request a copy from help@hdfgroup.org. +# the COPYING file, which can be found at the root of the source code +# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. +# If you do not have access to either file, you may request a copy from +# help@hdfgroup.org. # This file is part of the HDF5 build script. It is processed shortly diff --git a/config/solaris b/config/solaris index 72d7423..656fee1 100644 --- a/config/solaris +++ b/config/solaris @@ -6,12 +6,10 @@ # # This file is part of HDF5. The full HDF5 copyright notice, including # terms governing use, modification, and redistribution, is contained in -# the files COPYING and Copyright.html. COPYING can be found at the root -# of the source code distribution tree; Copyright.html can be found at the -# root level of an installed copy of the electronic HDF5 document set and -# is linked from the top-level documents page. It can also be found at -# http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have -# access to either file, you may request a copy from help@hdfgroup.org. +# the COPYING file, which can be found at the root of the source code +# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. +# If you do not have access to either file, you may request a copy from +# help@hdfgroup.org. # This file is part of the HDF5 build script. It is processed shortly diff --git a/configure.ac b/configure.ac index afd36cd..e941ae7 100644 --- a/configure.ac +++ b/configure.ac @@ -6,12 +6,10 @@ ## ## This file is part of HDF5. The full HDF5 copyright notice, including ## terms governing use, modification, and redistribution, is contained in -## the files COPYING and Copyright.html. COPYING can be found at the root -## of the source code distribution tree; Copyright.html can be found at the -## root level of an installed copy of the electronic HDF5 document set and -## is linked from the top-level documents page. It can also be found at -## http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have -## access to either file, you may request a copy from help@hdfgroup.org. +## the COPYING file, which can be found at the root of the source code +## distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. +## If you do not have access to either file, you may request a copy from +## help@hdfgroup.org. ## ---------------------------------------------------------------------- ## Initialize configure. diff --git a/examples/Makefile.am b/examples/Makefile.am index 883b99d..8c6540f 100644 --- a/examples/Makefile.am +++ b/examples/Makefile.am @@ -5,12 +5,10 @@ # # This file is part of HDF5. The full HDF5 copyright notice, including # terms governing use, modification, and redistribution, is contained in -# the files COPYING and Copyright.html. COPYING can be found at the root -# of the source code distribution tree; Copyright.html can be found at the -# root level of an installed copy of the electronic HDF5 document set and -# is linked from the top-level documents page. It can also be found at -# http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have -# access to either file, you may request a copy from help@hdfgroup.org. +# the COPYING file, which can be found at the root of the source code +# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. +# If you do not have access to either file, you may request a copy from +# help@hdfgroup.org. ## ## Makefile.am ## Run automake to generate a Makefile.in from this file. diff --git a/examples/h5_attribute.c b/examples/h5_attribute.c index 0ea0153..335f9c2 100644 --- a/examples/h5_attribute.c +++ b/examples/h5_attribute.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* diff --git a/examples/h5_chunk_read.c b/examples/h5_chunk_read.c index 98b0bb4..c3455f4 100644 --- a/examples/h5_chunk_read.c +++ b/examples/h5_chunk_read.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* diff --git a/examples/h5_cmprss.c b/examples/h5_cmprss.c index 8d365a3..ebc7712 100644 --- a/examples/h5_cmprss.c +++ b/examples/h5_cmprss.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* diff --git a/examples/h5_compound.c b/examples/h5_compound.c index 3fca2a5..b3b3a4a 100644 --- a/examples/h5_compound.c +++ b/examples/h5_compound.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* diff --git a/examples/h5_crtatt.c b/examples/h5_crtatt.c index 5e1378c..ade17ba 100644 --- a/examples/h5_crtatt.c +++ b/examples/h5_crtatt.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* diff --git a/examples/h5_crtdat.c b/examples/h5_crtdat.c index f9327e7..4a876d2 100644 --- a/examples/h5_crtdat.c +++ b/examples/h5_crtdat.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* diff --git a/examples/h5_crtgrp.c b/examples/h5_crtgrp.c index a626ed8..89bddce 100644 --- a/examples/h5_crtgrp.c +++ b/examples/h5_crtgrp.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* diff --git a/examples/h5_crtgrpar.c b/examples/h5_crtgrpar.c index e8cf7c3..6f8c6e8 100644 --- a/examples/h5_crtgrpar.c +++ b/examples/h5_crtgrpar.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* diff --git a/examples/h5_crtgrpd.c b/examples/h5_crtgrpd.c index d6a320b..35c4389 100644 --- a/examples/h5_crtgrpd.c +++ b/examples/h5_crtgrpd.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* diff --git a/examples/h5_drivers.c b/examples/h5_drivers.c index 7245794..43c1fc7 100644 --- a/examples/h5_drivers.c +++ b/examples/h5_drivers.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* diff --git a/examples/h5_dtransform.c b/examples/h5_dtransform.c index 71ec10a..0b718ad 100644 --- a/examples/h5_dtransform.c +++ b/examples/h5_dtransform.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* diff --git a/examples/h5_elink_unix2win.c b/examples/h5_elink_unix2win.c index 9c0918c..df52015 100644 --- a/examples/h5_elink_unix2win.c +++ b/examples/h5_elink_unix2win.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* This program demonstrates how to translate an external link created on diff --git a/examples/h5_extend.c b/examples/h5_extend.c index 105e553..6e3cff2 100644 --- a/examples/h5_extend.c +++ b/examples/h5_extend.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* diff --git a/examples/h5_extend_write.c b/examples/h5_extend_write.c index 56bd025..f3f6077 100644 --- a/examples/h5_extend_write.c +++ b/examples/h5_extend_write.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* diff --git a/examples/h5_extlink.c b/examples/h5_extlink.c index e8a24b8..ba632f5 100644 --- a/examples/h5_extlink.c +++ b/examples/h5_extlink.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* This program demonstrates how to create and use "external links" in diff --git a/examples/h5_group.c b/examples/h5_group.c index 6b73210..8e89165 100644 --- a/examples/h5_group.c +++ b/examples/h5_group.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* diff --git a/examples/h5_interm_group.c b/examples/h5_interm_group.c index bd9c7c4..6507fd1 100644 --- a/examples/h5_interm_group.c +++ b/examples/h5_interm_group.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* diff --git a/examples/h5_mount.c b/examples/h5_mount.c index 6da71a1..a2e16c5 100644 --- a/examples/h5_mount.c +++ b/examples/h5_mount.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* diff --git a/examples/h5_rdwt.c b/examples/h5_rdwt.c index 0e290ca..6cd7f0f 100644 --- a/examples/h5_rdwt.c +++ b/examples/h5_rdwt.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* diff --git a/examples/h5_read.c b/examples/h5_read.c index 6fe75be..7fd8ad4 100644 --- a/examples/h5_read.c +++ b/examples/h5_read.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* diff --git a/examples/h5_ref2reg.c b/examples/h5_ref2reg.c index c4e8d3d..dc2964c 100644 --- a/examples/h5_ref2reg.c +++ b/examples/h5_ref2reg.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* This program shows how to create, store and dereference references diff --git a/examples/h5_reference.c b/examples/h5_reference.c index 38e6146..32a5f59 100644 --- a/examples/h5_reference.c +++ b/examples/h5_reference.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* diff --git a/examples/h5_select.c b/examples/h5_select.c index ceb9c2c..bbc877c 100644 --- a/examples/h5_select.c +++ b/examples/h5_select.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* diff --git a/examples/h5_shared_mesg.c b/examples/h5_shared_mesg.c index 0c7f2f0..4e1f92a 100644 --- a/examples/h5_shared_mesg.c +++ b/examples/h5_shared_mesg.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* diff --git a/examples/h5_subset.c b/examples/h5_subset.c index 66872ea..904d3f8 100644 --- a/examples/h5_subset.c +++ b/examples/h5_subset.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* diff --git a/examples/h5_vds.c b/examples/h5_vds.c index 1e502c6..76b849a 100644 --- a/examples/h5_vds.c +++ b/examples/h5_vds.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /************************************************************ diff --git a/examples/h5_write.c b/examples/h5_write.c index 93d40ea..1a7cfe7 100644 --- a/examples/h5_write.c +++ b/examples/h5_write.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* diff --git a/examples/ph5example.c b/examples/ph5example.c index 7a41db2..d718479 100644 --- a/examples/ph5example.c +++ b/examples/ph5example.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* diff --git a/examples/run-all-ex.sh b/examples/run-all-ex.sh index 4ff2c55..878e0f8 100755 --- a/examples/run-all-ex.sh +++ b/examples/run-all-ex.sh @@ -5,12 +5,10 @@ # # This file is part of HDF5. The full HDF5 copyright notice, including # terms governing use, modification, and redistribution, is contained in -# the files COPYING and Copyright.html. COPYING can be found at the root -# of the source code distribution tree; Copyright.html can be found at the -# root level of an installed copy of the electronic HDF5 document set and -# is linked from the top-level documents page. It can also be found at -# http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have -# access to either file, you may request a copy from help@hdfgroup.org. +# the COPYING file, which can be found at the root of the source code +# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. +# If you do not have access to either file, you may request a copy from +# help@hdfgroup.org. # # This file: run-hl-ex.sh diff --git a/examples/run-c-ex.sh.in b/examples/run-c-ex.sh.in index 1661344..4d5d594 100644 --- a/examples/run-c-ex.sh.in +++ b/examples/run-c-ex.sh.in @@ -5,12 +5,10 @@ # # This file is part of HDF5. The full HDF5 copyright notice, including # terms governing use, modification, and redistribution, is contained in -# the files COPYING and Copyright.html. COPYING can be found at the root -# of the source code distribution tree; Copyright.html can be found at the -# root level of an installed copy of the electronic HDF5 document set and -# is linked from the top-level documents page. It can also be found at -# http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have -# access to either file, you may request a copy from help@hdfgroup.org. +# the COPYING file, which can be found at the root of the source code +# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. +# If you do not have access to either file, you may request a copy from +# help@hdfgroup.org. # # This file: run-c-ex.sh diff --git a/examples/testh5cc.sh.in b/examples/testh5cc.sh.in index d3f1cfc..800d4d4 100644 --- a/examples/testh5cc.sh.in +++ b/examples/testh5cc.sh.in @@ -6,12 +6,10 @@ # # This file is part of HDF5. The full HDF5 copyright notice, including # terms governing use, modification, and redistribution, is contained in -# the files COPYING and Copyright.html. COPYING can be found at the root -# of the source code distribution tree; Copyright.html can be found at the -# root level of an installed copy of the electronic HDF5 document set and -# is linked from the top-level documents page. It can also be found at -# http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have -# access to either file, you may request a copy from help@hdfgroup.org. +# the COPYING file, which can be found at the root of the source code +# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. +# If you do not have access to either file, you may request a copy from +# help@hdfgroup.org. # # Tests for the h5cc compiler tool # Created: Albert Cheng, 2007/4/11 diff --git a/fortran/Makefile.am b/fortran/Makefile.am index 9ddd6dd..38084b9 100644 --- a/fortran/Makefile.am +++ b/fortran/Makefile.am @@ -5,12 +5,10 @@ # # This file is part of HDF5. The full HDF5 copyright notice, including # terms governing use, modification, and redistribution, is contained in -# the files COPYING and Copyright.html. COPYING can be found at the root -# of the source code distribution tree; Copyright.html can be found at the -# root level of an installed copy of the electronic HDF5 document set and -# is linked from the top-level documents page. It can also be found at -# http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have -# access to either file, you may request a copy from help@hdfgroup.org. +# the COPYING file, which can be found at the root of the source code +# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. +# If you do not have access to either file, you may request a copy from +# help@hdfgroup.org. # # This makefile mostly just reinvokes make in the various subdirectories # but does so in the correct order. You can alternatively invoke make from diff --git a/fortran/examples/Makefile.am b/fortran/examples/Makefile.am index 5a3b09e..db85c09 100644 --- a/fortran/examples/Makefile.am +++ b/fortran/examples/Makefile.am @@ -5,12 +5,10 @@ # # This file is part of HDF5. The full HDF5 copyright notice, including # terms governing use, modification, and redistribution, is contained in -# the files COPYING and Copyright.html. COPYING can be found at the root -# of the source code distribution tree; Copyright.html can be found at the -# root level of an installed copy of the electronic HDF5 document set and -# is linked from the top-level documents page. It can also be found at -# http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have -# access to either file, you may request a copy from help@hdfgroup.org. +# the COPYING file, which can be found at the root of the source code +# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. +# If you do not have access to either file, you may request a copy from +# help@hdfgroup.org. ## ## Makefile.am ## Run automake to generate a Makefile.in from this file. diff --git a/fortran/examples/compound.f90 b/fortran/examples/compound.f90 index 2005f41..f5e91d6 100644 --- a/fortran/examples/compound.f90 +++ b/fortran/examples/compound.f90 @@ -5,12 +5,10 @@ ! * ! This file is part of HDF5. The full HDF5 copyright notice, including * ! terms governing use, modification, and redistribution, is contained in * -! the files COPYING and Copyright.html. COPYING can be found at the root * -! of the source code distribution tree; Copyright.html can be found at the * -! root level of an installed copy of the electronic HDF5 document set and * -! is linked from the top-level documents page. It can also be found at * -! http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * -! access to either file, you may request a copy from help@hdfgroup.org. * +! the COPYING file, which can be found at the root of the source code * +! distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * +! If you do not have access to either file, you may request a copy from * +! help@hdfgroup.org. * ! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ! ! diff --git a/fortran/examples/compound_complex_fortran2003.f90 b/fortran/examples/compound_complex_fortran2003.f90 index 19671f7..6d0f291 100644 --- a/fortran/examples/compound_complex_fortran2003.f90 +++ b/fortran/examples/compound_complex_fortran2003.f90 @@ -5,12 +5,10 @@ ! * ! This file is part of HDF5. The full HDF5 copyright notice, including * ! terms governing use, modification, and redistribution, is contained in * -! the files COPYING and Copyright.html. COPYING can be found at the root * -! of the source code distribution tree; Copyright.html can be found at the * -! root level of an installed copy of the electronic HDF5 document set and * -! is linked from the top-level documents page. It can also be found at * -! http://hdf.ncsa.uiuc.edu/HDF5/doc/Copyright.html. If you do not have * -! access to either file, you may request a copy from hdfhelp@ncsa.uiuc.edu. * +! the COPYING file, which can be found at the root of the source code * +! distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * +! If you do not have access to either file, you may request a copy from * +! help@hdfgroup.org. * ! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ! ! This example shows how to create an array of a compound datatype which diff --git a/fortran/examples/compound_fortran2003.f90 b/fortran/examples/compound_fortran2003.f90 index a55d1a6..0168177 100644 --- a/fortran/examples/compound_fortran2003.f90 +++ b/fortran/examples/compound_fortran2003.f90 @@ -5,12 +5,10 @@ ! * ! This file is part of HDF5. The full HDF5 copyright notice, including * ! terms governing use, modification, and redistribution, is contained in * -! the files COPYING and Copyright.html. COPYING can be found at the root * -! of the source code distribution tree; Copyright.html can be found at the * -! root level of an installed copy of the electronic HDF5 document set and * -! is linked from the top-level documents page. It can also be found at * -! http://hdf.ncsa.uiuc.edu/HDF5/doc/Copyright.html. If you do not have * -! access to either file, you may request a copy from hdfhelp@ncsa.uiuc.edu. * +! the COPYING file, which can be found at the root of the source code * +! distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * +! If you do not have access to either file, you may request a copy from * +! help@hdfgroup.org. * ! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ! ! This example shows how to create a compound data type, diff --git a/fortran/examples/h5_cmprss.f90 b/fortran/examples/h5_cmprss.f90 index 9ab28f7..61dd7b0 100644 --- a/fortran/examples/h5_cmprss.f90 +++ b/fortran/examples/h5_cmprss.f90 @@ -5,12 +5,10 @@ ! * ! This file is part of HDF5. The full HDF5 copyright notice, including * ! terms governing use, modification, and redistribution, is contained in * -! the files COPYING and Copyright.html. COPYING can be found at the root * -! of the source code distribution tree; Copyright.html can be found at the * -! root level of an installed copy of the electronic HDF5 document set and * -! is linked from the top-level documents page. It can also be found at * -! http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * -! access to either file, you may request a copy from help@hdfgroup.org. * +! the COPYING file, which can be found at the root of the source code * +! distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * +! If you do not have access to either file, you may request a copy from * +! help@hdfgroup.org. * ! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ! ! This example illustrates how to create a compressed dataset. diff --git a/fortran/examples/h5_crtatt.f90 b/fortran/examples/h5_crtatt.f90 index 79bc576..7e287c6 100644 --- a/fortran/examples/h5_crtatt.f90 +++ b/fortran/examples/h5_crtatt.f90 @@ -5,12 +5,10 @@ ! * ! This file is part of HDF5. The full HDF5 copyright notice, including * ! terms governing use, modification, and redistribution, is contained in * -! the files COPYING and Copyright.html. COPYING can be found at the root * -! of the source code distribution tree; Copyright.html can be found at the * -! root level of an installed copy of the electronic HDF5 document set and * -! is linked from the top-level documents page. It can also be found at * -! http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * -! access to either file, you may request a copy from help@hdfgroup.org. * +! the COPYING file, which can be found at the root of the source code * +! distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * +! If you do not have access to either file, you may request a copy from * +! help@hdfgroup.org. * ! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ! ! This example shows how to create and write a dataset attribute. diff --git a/fortran/examples/h5_crtdat.f90 b/fortran/examples/h5_crtdat.f90 index 6e4c3a4..dce4408 100644 --- a/fortran/examples/h5_crtdat.f90 +++ b/fortran/examples/h5_crtdat.f90 @@ -5,12 +5,10 @@ ! * ! This file is part of HDF5. The full HDF5 copyright notice, including * ! terms governing use, modification, and redistribution, is contained in * -! the files COPYING and Copyright.html. COPYING can be found at the root * -! of the source code distribution tree; Copyright.html can be found at the * -! root level of an installed copy of the electronic HDF5 document set and * -! is linked from the top-level documents page. It can also be found at * -! http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * -! access to either file, you may request a copy from help@hdfgroup.org. * +! the COPYING file, which can be found at the root of the source code * +! distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * +! If you do not have access to either file, you may request a copy from * +! help@hdfgroup.org. * ! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ! ! diff --git a/fortran/examples/h5_crtgrp.f90 b/fortran/examples/h5_crtgrp.f90 index 278d175..12f07e7 100644 --- a/fortran/examples/h5_crtgrp.f90 +++ b/fortran/examples/h5_crtgrp.f90 @@ -5,12 +5,10 @@ ! * ! This file is part of HDF5. The full HDF5 copyright notice, including * ! terms governing use, modification, and redistribution, is contained in * -! the files COPYING and Copyright.html. COPYING can be found at the root * -! of the source code distribution tree; Copyright.html can be found at the * -! root level of an installed copy of the electronic HDF5 document set and * -! is linked from the top-level documents page. It can also be found at * -! http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * -! access to either file, you may request a copy from help@hdfgroup.org. * +! the COPYING file, which can be found at the root of the source code * +! distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * +! If you do not have access to either file, you may request a copy from * +! help@hdfgroup.org. * ! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ! ! diff --git a/fortran/examples/h5_crtgrpar.f90 b/fortran/examples/h5_crtgrpar.f90 index 4ef008a..341b648 100644 --- a/fortran/examples/h5_crtgrpar.f90 +++ b/fortran/examples/h5_crtgrpar.f90 @@ -5,12 +5,10 @@ ! * ! This file is part of HDF5. The full HDF5 copyright notice, including * ! terms governing use, modification, and redistribution, is contained in * -! the files COPYING and Copyright.html. COPYING can be found at the root * -! of the source code distribution tree; Copyright.html can be found at the * -! root level of an installed copy of the electronic HDF5 document set and * -! is linked from the top-level documents page. It can also be found at * -! http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * -! access to either file, you may request a copy from help@hdfgroup.org. * +! the COPYING file, which can be found at the root of the source code * +! distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * +! If you do not have access to either file, you may request a copy from * +! help@hdfgroup.org. * ! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ! ! diff --git a/fortran/examples/h5_crtgrpd.f90 b/fortran/examples/h5_crtgrpd.f90 index d35f03d..41c1f53 100644 --- a/fortran/examples/h5_crtgrpd.f90 +++ b/fortran/examples/h5_crtgrpd.f90 @@ -5,12 +5,10 @@ ! * ! This file is part of HDF5. The full HDF5 copyright notice, including * ! terms governing use, modification, and redistribution, is contained in * -! the files COPYING and Copyright.html. COPYING can be found at the root * -! of the source code distribution tree; Copyright.html can be found at the * -! root level of an installed copy of the electronic HDF5 document set and * -! is linked from the top-level documents page. It can also be found at * -! http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * -! access to either file, you may request a copy from help@hdfgroup.org. * +! the COPYING file, which can be found at the root of the source code * +! distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * +! If you do not have access to either file, you may request a copy from * +! help@hdfgroup.org. * ! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ! ! diff --git a/fortran/examples/h5_extend.f90 b/fortran/examples/h5_extend.f90 index 315d84f..20b91ff 100644 --- a/fortran/examples/h5_extend.f90 +++ b/fortran/examples/h5_extend.f90 @@ -5,12 +5,10 @@ ! * ! This file is part of HDF5. The full HDF5 copyright notice, including * ! terms governing use, modification, and redistribution, is contained in * -! the files COPYING and Copyright.html. COPYING can be found at the root * -! of the source code distribution tree; Copyright.html can be found at the * -! root level of an installed copy of the electronic HDF5 document set and * -! is linked from the top-level documents page. It can also be found at * -! http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * -! access to either file, you may request a copy from help@hdfgroup.org. * +! the COPYING file, which can be found at the root of the source code * +! distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * +! If you do not have access to either file, you may request a copy from * +! help@hdfgroup.org. * ! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ! ! This example extends an HDF5 dataset. It is used in the HDF5 Tutorial. diff --git a/fortran/examples/h5_rdwt.f90 b/fortran/examples/h5_rdwt.f90 index ba05b2f..2fbd85d 100644 --- a/fortran/examples/h5_rdwt.f90 +++ b/fortran/examples/h5_rdwt.f90 @@ -5,12 +5,10 @@ ! * ! This file is part of HDF5. The full HDF5 copyright notice, including * ! terms governing use, modification, and redistribution, is contained in * -! the files COPYING and Copyright.html. COPYING can be found at the root * -! of the source code distribution tree; Copyright.html can be found at the * -! root level of an installed copy of the electronic HDF5 document set and * -! is linked from the top-level documents page. It can also be found at * -! http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * -! access to either file, you may request a copy from help@hdfgroup.org. * +! the COPYING file, which can be found at the root of the source code * +! distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * +! If you do not have access to either file, you may request a copy from * +! help@hdfgroup.org. * ! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ! ! diff --git a/fortran/examples/h5_subset.f90 b/fortran/examples/h5_subset.f90 index 6cb8f7a..ab33c86 100644 --- a/fortran/examples/h5_subset.f90 +++ b/fortran/examples/h5_subset.f90 @@ -5,12 +5,10 @@ ! * ! This file is part of HDF5. The full HDF5 copyright notice, including * ! terms governing use, modification, and redistribution, is contained in * -! the files COPYING and Copyright.html. COPYING can be found at the root * -! of the source code distribution tree; Copyright.html can be found at the * -! root level of an installed copy of the electronic HDF5 document set and * -! is linked from the top-level documents page. It can also be found at * -! http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * -! access to either file, you may request a copy from help@hdfgroup.org. * +! the COPYING file, which can be found at the root of the source code * +! distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * +! If you do not have access to either file, you may request a copy from * +! help@hdfgroup.org. * ! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ! ! This example shows how to write and read a hyperslab. diff --git a/fortran/examples/hyperslab.f90 b/fortran/examples/hyperslab.f90 index 7823ff6..d340161 100644 --- a/fortran/examples/hyperslab.f90 +++ b/fortran/examples/hyperslab.f90 @@ -5,12 +5,10 @@ ! * ! This file is part of HDF5. The full HDF5 copyright notice, including * ! terms governing use, modification, and redistribution, is contained in * -! the files COPYING and Copyright.html. COPYING can be found at the root * -! of the source code distribution tree; Copyright.html can be found at the * -! root level of an installed copy of the electronic HDF5 document set and * -! is linked from the top-level documents page. It can also be found at * -! http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * -! access to either file, you may request a copy from help@hdfgroup.org. * +! the COPYING file, which can be found at the root of the source code * +! distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * +! If you do not have access to either file, you may request a copy from * +! help@hdfgroup.org. * ! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ! ! diff --git a/fortran/examples/mountexample.f90 b/fortran/examples/mountexample.f90 index 5bdec2a..4a2821d 100644 --- a/fortran/examples/mountexample.f90 +++ b/fortran/examples/mountexample.f90 @@ -5,12 +5,10 @@ ! * ! This file is part of HDF5. The full HDF5 copyright notice, including * ! terms governing use, modification, and redistribution, is contained in * -! the files COPYING and Copyright.html. COPYING can be found at the root * -! of the source code distribution tree; Copyright.html can be found at the * -! root level of an installed copy of the electronic HDF5 document set and * -! is linked from the top-level documents page. It can also be found at * -! http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * -! access to either file, you may request a copy from help@hdfgroup.org. * +! the COPYING file, which can be found at the root of the source code * +! distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * +! If you do not have access to either file, you may request a copy from * +! help@hdfgroup.org. * ! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ! ! diff --git a/fortran/examples/nested_derived_type.f90 b/fortran/examples/nested_derived_type.f90 index 65e7e75..68354ac 100644 --- a/fortran/examples/nested_derived_type.f90 +++ b/fortran/examples/nested_derived_type.f90 @@ -5,12 +5,10 @@ ! * ! This file is part of HDF5. The full HDF5 copyright notice, including * ! terms governing use, modification, and redistribution, is contained in * -! the files COPYING and Copyright.html. COPYING can be found at the root * -! of the source code distribution tree; Copyright.html can be found at the * -! root level of an installed copy of the electronic HDF5 document set and * -! is linked from the top-level documents page. It can also be found at * -! http://hdf.ncsa.uiuc.edu/HDF5/doc/Copyright.html. If you do not have * -! access to either file, you may request a copy from hdfhelp@ncsa.uiuc.edu. * +! the COPYING file, which can be found at the root of the source code * +! distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * +! If you do not have access to either file, you may request a copy from * +! help@hdfgroup.org. * ! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ! ! This example shows how to create a nested compound data type, diff --git a/fortran/examples/ph5example.f90 b/fortran/examples/ph5example.f90 index a0db200..9d4281e 100644 --- a/fortran/examples/ph5example.f90 +++ b/fortran/examples/ph5example.f90 @@ -5,12 +5,10 @@ ! * ! This file is part of HDF5. The full HDF5 copyright notice, including * ! terms governing use, modification, and redistribution, is contained in * -! the files COPYING and Copyright.html. COPYING can be found at the root * -! of the source code distribution tree; Copyright.html can be found at the * -! root level of an installed copy of the electronic HDF5 document set and * -! is linked from the top-level documents page. It can also be found at * -! http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * -! access to either file, you may request a copy from help@hdfgroup.org. * +! the COPYING file, which can be found at the root of the source code * +! distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * +! If you do not have access to either file, you may request a copy from * +! help@hdfgroup.org. * ! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ! ! Fortran parallel example. Copied from Tutorial's example program of diff --git a/fortran/examples/refobjexample.f90 b/fortran/examples/refobjexample.f90 index c8622a7..d017598 100644 --- a/fortran/examples/refobjexample.f90 +++ b/fortran/examples/refobjexample.f90 @@ -5,12 +5,10 @@ ! * ! This file is part of HDF5. The full HDF5 copyright notice, including * ! terms governing use, modification, and redistribution, is contained in * -! the files COPYING and Copyright.html. COPYING can be found at the root * -! of the source code distribution tree; Copyright.html can be found at the * -! root level of an installed copy of the electronic HDF5 document set and * -! is linked from the top-level documents page. It can also be found at * -! http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * -! access to either file, you may request a copy from help@hdfgroup.org. * +! the COPYING file, which can be found at the root of the source code * +! distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * +! If you do not have access to either file, you may request a copy from * +! help@hdfgroup.org. * ! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ! ! diff --git a/fortran/examples/refregexample.f90 b/fortran/examples/refregexample.f90 index 68fbd24..ab45598 100644 --- a/fortran/examples/refregexample.f90 +++ b/fortran/examples/refregexample.f90 @@ -5,12 +5,10 @@ ! * ! This file is part of HDF5. The full HDF5 copyright notice, including * ! terms governing use, modification, and redistribution, is contained in * -! the files COPYING and Copyright.html. COPYING can be found at the root * -! of the source code distribution tree; Copyright.html can be found at the * -! root level of an installed copy of the electronic HDF5 document set and * -! is linked from the top-level documents page. It can also be found at * -! http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * -! access to either file, you may request a copy from help@hdfgroup.org. * +! the COPYING file, which can be found at the root of the source code * +! distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * +! If you do not have access to either file, you may request a copy from * +! help@hdfgroup.org. * ! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ! ! diff --git a/fortran/examples/run-fortran-ex.sh.in b/fortran/examples/run-fortran-ex.sh.in index a4d4550..cace1ae 100644 --- a/fortran/examples/run-fortran-ex.sh.in +++ b/fortran/examples/run-fortran-ex.sh.in @@ -5,12 +5,10 @@ # # This file is part of HDF5. The full HDF5 copyright notice, including # terms governing use, modification, and redistribution, is contained in -# the files COPYING and Copyright.html. COPYING can be found at the root -# of the source code distribution tree; Copyright.html can be found at the -# root level of an installed copy of the electronic HDF5 document set and -# is linked from the top-level documents page. It can also be found at -# http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have -# access to either file, you may request a copy from help@hdfgroup.org. +# the COPYING file, which can be found at the root of the source code +# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. +# If you do not have access to either file, you may request a copy from +# help@hdfgroup.org. # # This file: run-hlfortran-ex.sh diff --git a/fortran/examples/rwdset_fortran2003.f90 b/fortran/examples/rwdset_fortran2003.f90 index 682676f..36ebf0d 100644 --- a/fortran/examples/rwdset_fortran2003.f90 +++ b/fortran/examples/rwdset_fortran2003.f90 @@ -5,12 +5,10 @@ ! * ! This file is part of HDF5. The full HDF5 copyright notice, including * ! terms governing use, modification, and redistribution, is contained in * -! the files COPYING and Copyright.html. COPYING can be found at the root * -! of the source code distribution tree; Copyright.html can be found at the * -! root level of an installed copy of the electronic HDF5 document set and * -! is linked from the top-level documents page. It can also be found at * -! http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * -! access to either file, you may request a copy from help@hdfgroup.org. * +! the COPYING file, which can be found at the root of the source code * +! distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * +! If you do not have access to either file, you may request a copy from * +! help@hdfgroup.org. * ! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ! ! diff --git a/fortran/examples/selectele.f90 b/fortran/examples/selectele.f90 index dcd2379..4281ea6 100644 --- a/fortran/examples/selectele.f90 +++ b/fortran/examples/selectele.f90 @@ -5,12 +5,10 @@ ! * ! This file is part of HDF5. The full HDF5 copyright notice, including * ! terms governing use, modification, and redistribution, is contained in * -! the files COPYING and Copyright.html. COPYING can be found at the root * -! of the source code distribution tree; Copyright.html can be found at the * -! root level of an installed copy of the electronic HDF5 document set and * -! is linked from the top-level documents page. It can also be found at * -! http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * -! access to either file, you may request a copy from help@hdfgroup.org. * +! the COPYING file, which can be found at the root of the source code * +! distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * +! If you do not have access to either file, you may request a copy from * +! help@hdfgroup.org. * ! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ! ! diff --git a/fortran/examples/testh5fc.sh.in b/fortran/examples/testh5fc.sh.in index cd3b86e..f384909 100644 --- a/fortran/examples/testh5fc.sh.in +++ b/fortran/examples/testh5fc.sh.in @@ -6,12 +6,10 @@ # # This file is part of HDF5. The full HDF5 copyright notice, including # terms governing use, modification, and redistribution, is contained in -# the files COPYING and Copyright.html. COPYING can be found at the root -# of the source code distribution tree; Copyright.html can be found at the -# root level of an installed copy of the electronic HDF5 document set and -# is linked from the top-level documents page. It can also be found at -# http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have -# access to either file, you may request a copy from help@hdfgroup.org. +# the COPYING file, which can be found at the root of the source code +# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. +# If you do not have access to either file, you may request a copy from +# help@hdfgroup.org. # # Tests for the h5fc compiler tool # Created: Albert Cheng, 2007/3/14 diff --git a/fortran/src/H5Af.c b/fortran/src/H5Af.c index 8f012cf..23dd936 100644 --- a/fortran/src/H5Af.c +++ b/fortran/src/H5Af.c @@ -10,12 +10,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ****** diff --git a/fortran/src/H5Aff.F90 b/fortran/src/H5Aff.F90 index 132bf41..827b803 100644 --- a/fortran/src/H5Aff.F90 +++ b/fortran/src/H5Aff.F90 @@ -17,12 +17,10 @@ ! * ! This file is part of HDF5. The full HDF5 copyright notice, including * ! terms governing use, modification, and redistribution, is contained in * -! the files COPYING and Copyright.html. COPYING can be found at the root * -! of the source code distribution tree; Copyright.html can be found at the * -! root level of an installed copy of the electronic HDF5 document set and * -! is linked from the top-level documents page. It can also be found at * -! http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * -! access to either file, you may request a copy from help@hdfgroup.org. * +! the COPYING file, which can be found at the root of the source code * +! distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * +! If you do not have access to either file, you may request a copy from * +! help@hdfgroup.org. * ! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ! ! NOTES diff --git a/fortran/src/H5Df.c b/fortran/src/H5Df.c index 57b4d4d..588ea9f 100644 --- a/fortran/src/H5Df.c +++ b/fortran/src/H5Df.c @@ -10,12 +10,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ****** diff --git a/fortran/src/H5Dff.F90 b/fortran/src/H5Dff.F90 index cb0b292..3915f72 100644 --- a/fortran/src/H5Dff.F90 +++ b/fortran/src/H5Dff.F90 @@ -17,12 +17,10 @@ ! * ! This file is part of HDF5. The full HDF5 copyright notice, including * ! terms governing use, modification, and redistribution, is contained in * -! the files COPYING and Copyright.html. COPYING can be found at the root * -! of the source code distribution tree; Copyright.html can be found at the * -! root level of an installed copy of the electronic HDF5 document set and * -! is linked from the top-level documents page. It can also be found at * -! http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * -! access to either file, you may request a copy from help@hdfgroup.org. * +! the COPYING file, which can be found at the root of the source code * +! distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * +! If you do not have access to either file, you may request a copy from * +! help@hdfgroup.org. * ! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ! ! NOTES diff --git a/fortran/src/H5Ef.c b/fortran/src/H5Ef.c index 4b1d4c9..0a2f2a3 100644 --- a/fortran/src/H5Ef.c +++ b/fortran/src/H5Ef.c @@ -10,12 +10,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ****** diff --git a/fortran/src/H5Eff.F90 b/fortran/src/H5Eff.F90 index 4198321..fcd08ff 100644 --- a/fortran/src/H5Eff.F90 +++ b/fortran/src/H5Eff.F90 @@ -17,12 +17,10 @@ ! * ! This file is part of HDF5. The full HDF5 copyright notice, including * ! terms governing use, modification, and redistribution, is contained in * -! the files COPYING and Copyright.html. COPYING can be found at the root * -! of the source code distribution tree; Copyright.html can be found at the * -! root level of an installed copy of the electronic HDF5 document set and * -! is linked from the top-level documents page. It can also be found at * -! http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * -! access to either file, you may request a copy from help@hdfgroup.org. * +! the COPYING file, which can be found at the root of the source code * +! distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * +! If you do not have access to either file, you may request a copy from * +! help@hdfgroup.org. * ! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ! ! NOTES diff --git a/fortran/src/H5Ff.c b/fortran/src/H5Ff.c index c1cdb91..2d5f6ed 100644 --- a/fortran/src/H5Ff.c +++ b/fortran/src/H5Ff.c @@ -10,12 +10,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ****** diff --git a/fortran/src/H5Fff.F90 b/fortran/src/H5Fff.F90 index 165fba0..a3bef37 100644 --- a/fortran/src/H5Fff.F90 +++ b/fortran/src/H5Fff.F90 @@ -17,12 +17,10 @@ ! * ! This file is part of HDF5. The full HDF5 copyright notice, including * ! terms governing use, modification, and redistribution, is contained in * -! the files COPYING and Copyright.html. COPYING can be found at the root * -! of the source code distribution tree; Copyright.html can be found at the * -! root level of an installed copy of the electronic HDF5 document set and * -! is linked from the top-level documents page. It can also be found at * -! http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * -! access to either file, you may request a copy from help@hdfgroup.org. * +! the COPYING file, which can be found at the root of the source code * +! distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * +! If you do not have access to either file, you may request a copy from * +! help@hdfgroup.org. * ! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ! ! NOTES diff --git a/fortran/src/H5Gf.c b/fortran/src/H5Gf.c index b9c44bb..720bd49 100644 --- a/fortran/src/H5Gf.c +++ b/fortran/src/H5Gf.c @@ -10,12 +10,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ****** diff --git a/fortran/src/H5Gff.F90 b/fortran/src/H5Gff.F90 index 30076a4..0684508 100644 --- a/fortran/src/H5Gff.F90 +++ b/fortran/src/H5Gff.F90 @@ -17,12 +17,10 @@ ! * ! This file is part of HDF5. The full HDF5 copyright notice, including * ! terms governing use, modification, and redistribution, is contained in * -! the files COPYING and Copyright.html. COPYING can be found at the root * -! of the source code distribution tree; Copyright.html can be found at the * -! root level of an installed copy of the electronic HDF5 document set and * -! is linked from the top-level documents page. It can also be found at * -! http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * -! access to either file, you may request a copy from help@hdfgroup.org. * +! the COPYING file, which can be found at the root of the source code * +! distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * +! If you do not have access to either file, you may request a copy from * +! help@hdfgroup.org. * ! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ! ! NOTES diff --git a/fortran/src/H5If.c b/fortran/src/H5If.c index fdab0b6..8222817 100644 --- a/fortran/src/H5If.c +++ b/fortran/src/H5If.c @@ -10,12 +10,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ****** diff --git a/fortran/src/H5Iff.F90 b/fortran/src/H5Iff.F90 index c91a8aa..351dd4b 100644 --- a/fortran/src/H5Iff.F90 +++ b/fortran/src/H5Iff.F90 @@ -17,12 +17,10 @@ ! * ! This file is part of HDF5. The full HDF5 copyright notice, including * ! terms governing use, modification, and redistribution, is contained in * -! the files COPYING and Copyright.html. COPYING can be found at the root * -! of the source code distribution tree; Copyright.html can be found at the * -! root level of an installed copy of the electronic HDF5 document set and * -! is linked from the top-level documents page. It can also be found at * -! http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * -! access to either file, you may request a copy from help@hdfgroup.org. * +! the COPYING file, which can be found at the root of the source code * +! distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * +! If you do not have access to either file, you may request a copy from * +! help@hdfgroup.org. * ! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ! ! NOTES diff --git a/fortran/src/H5Lf.c b/fortran/src/H5Lf.c index 0d3aac2..32de037 100644 --- a/fortran/src/H5Lf.c +++ b/fortran/src/H5Lf.c @@ -10,12 +10,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ****** diff --git a/fortran/src/H5Lff.F90 b/fortran/src/H5Lff.F90 index bc91072..d5bb1d1 100644 --- a/fortran/src/H5Lff.F90 +++ b/fortran/src/H5Lff.F90 @@ -14,12 +14,10 @@ ! * ! This file is part of HDF5. The full HDF5 copyright notice, including * ! terms governing use, modification, and redistribution, is contained in * -! the files COPYING and Copyright.html. COPYING can be found at the root * -! of the source code distribution tree; Copyright.html can be found at the * -! root level of an installed copy of the electronic HDF5 document set and * -! is linked from the top-level documents page. It can also be found at * -! http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * -! access to either file, you may request a copy from help@hdfgroup.org. * +! the COPYING file, which can be found at the root of the source code * +! distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * +! If you do not have access to either file, you may request a copy from * +! help@hdfgroup.org. * ! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ! ! NOTES diff --git a/fortran/src/H5Of.c b/fortran/src/H5Of.c index 9e3ddc4..7d065a5 100644 --- a/fortran/src/H5Of.c +++ b/fortran/src/H5Of.c @@ -10,12 +10,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ****** diff --git a/fortran/src/H5Off.F90 b/fortran/src/H5Off.F90 index 8d4fb16..243ec29 100644 --- a/fortran/src/H5Off.F90 +++ b/fortran/src/H5Off.F90 @@ -18,12 +18,10 @@ ! * ! This file is part of HDF5. The full HDF5 copyright notice, including * ! terms governing use, modification, and redistribution, is contained in * -! the files COPYING and Copyright.html. COPYING can be found at the root * -! of the source code distribution tree; Copyright.html can be found at the * -! root level of an installed copy of the electronic HDF5 document set and * -! is linked from the top-level documents page. It can also be found at * -! http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * -! access to either file, you may request a copy from help@hdfgroup.org. * +! the COPYING file, which can be found at the root of the source code * +! distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * +! If you do not have access to either file, you may request a copy from * +! help@hdfgroup.org. * ! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ! ! NOTES diff --git a/fortran/src/H5Pf.c b/fortran/src/H5Pf.c index 3989512..a114e8b 100644 --- a/fortran/src/H5Pf.c +++ b/fortran/src/H5Pf.c @@ -10,12 +10,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ****** diff --git a/fortran/src/H5Pff.F90 b/fortran/src/H5Pff.F90 index 6ba5aeb..b69d4d0 100644 --- a/fortran/src/H5Pff.F90 +++ b/fortran/src/H5Pff.F90 @@ -14,12 +14,10 @@ ! * ! This file is part of HDF5. The full HDF5 copyright notice, including * ! terms governing use, modification, and redistribution, is contained in * -! the files COPYING and Copyright.html. COPYING can be found at the root * -! of the source code distribution tree; Copyright.html can be found at the * -! root level of an installed copy of the electronic HDF5 document set and * -! is linked from the top-level documents page. It can also be found at * -! http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * -! access to either file, you may request a copy from help@hdfgroup.org. * +! the COPYING file, which can be found at the root of the source code * +! distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * +! If you do not have access to either file, you may request a copy from * +! help@hdfgroup.org. * ! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ! ! NOTES diff --git a/fortran/src/H5Rf.c b/fortran/src/H5Rf.c index 9cd9950..6a3181f 100644 --- a/fortran/src/H5Rf.c +++ b/fortran/src/H5Rf.c @@ -10,12 +10,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ****** diff --git a/fortran/src/H5Rff.F90 b/fortran/src/H5Rff.F90 index 7ba91c4..6d6371b 100644 --- a/fortran/src/H5Rff.F90 +++ b/fortran/src/H5Rff.F90 @@ -17,12 +17,10 @@ ! * ! This file is part of HDF5. The full HDF5 copyright notice, including * ! terms governing use, modification, and redistribution, is contained in * -! the files COPYING and Copyright.html. COPYING can be found at the root * -! of the source code distribution tree; Copyright.html can be found at the * -! root level of an installed copy of the electronic HDF5 document set and * -! is linked from the top-level documents page. It can also be found at * -! http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * -! access to either file, you may request a copy from help@hdfgroup.org. * +! the COPYING file, which can be found at the root of the source code * +! distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * +! If you do not have access to either file, you may request a copy from * +! help@hdfgroup.org. * ! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ! ! NOTES diff --git a/fortran/src/H5Sf.c b/fortran/src/H5Sf.c index 741bf96..2eae0d9 100644 --- a/fortran/src/H5Sf.c +++ b/fortran/src/H5Sf.c @@ -10,12 +10,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ****** diff --git a/fortran/src/H5Sff.F90 b/fortran/src/H5Sff.F90 index cb1388e..3434fba 100644 --- a/fortran/src/H5Sff.F90 +++ b/fortran/src/H5Sff.F90 @@ -17,12 +17,10 @@ ! * ! This file is part of HDF5. The full HDF5 copyright notice, including * ! terms governing use, modification, and redistribution, is contained in * -! the files COPYING and Copyright.html. COPYING can be found at the root * -! of the source code distribution tree; Copyright.html can be found at the * -! root level of an installed copy of the electronic HDF5 document set and * -! is linked from the top-level documents page. It can also be found at * -! http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * -! access to either file, you may request a copy from help@hdfgroup.org. * +! the COPYING file, which can be found at the root of the source code * +! distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * +! If you do not have access to either file, you may request a copy from * +! help@hdfgroup.org. * ! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ! ! NOTES diff --git a/fortran/src/H5Tf.c b/fortran/src/H5Tf.c index 9928d0a..c40abae 100644 --- a/fortran/src/H5Tf.c +++ b/fortran/src/H5Tf.c @@ -10,12 +10,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ****** diff --git a/fortran/src/H5Tff.F90 b/fortran/src/H5Tff.F90 index 6b8f896..b63c61d 100644 --- a/fortran/src/H5Tff.F90 +++ b/fortran/src/H5Tff.F90 @@ -14,12 +14,10 @@ ! * ! This file is part of HDF5. The full HDF5 copyright notice, including * ! terms governing use, modification, and redistribution, is contained in * -! the files COPYING and Copyright.html. COPYING can be found at the root * -! of the source code distribution tree; Copyright.html can be found at the * -! root level of an installed copy of the electronic HDF5 document set and * -! is linked from the top-level documents page. It can also be found at * -! http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * -! access to either file, you may request a copy from help@hdfgroup.org. * +! the COPYING file, which can be found at the root of the source code * +! distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * +! If you do not have access to either file, you may request a copy from * +! help@hdfgroup.org. * ! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ! ! NOTES diff --git a/fortran/src/H5Zf.c b/fortran/src/H5Zf.c index a8cf1c2..7afafd5 100644 --- a/fortran/src/H5Zf.c +++ b/fortran/src/H5Zf.c @@ -10,12 +10,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ****** diff --git a/fortran/src/H5Zff.F90 b/fortran/src/H5Zff.F90 index 0259959..848f047 100644 --- a/fortran/src/H5Zff.F90 +++ b/fortran/src/H5Zff.F90 @@ -14,12 +14,10 @@ ! * ! This file is part of HDF5. The full HDF5 copyright notice, including * ! terms governing use, modification, and redistribution, is contained in * -! the files COPYING and Copyright.html. COPYING can be found at the root * -! of the source code distribution tree; Copyright.html can be found at the * -! root level of an installed copy of the electronic HDF5 document set and * -! is linked from the top-level documents page. It can also be found at * -! http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * -! access to either file, you may request a copy from help@hdfgroup.org. * +! the COPYING file, which can be found at the root of the source code * +! distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * +! If you do not have access to either file, you may request a copy from * +! help@hdfgroup.org. * ! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ! ! NOTES! diff --git a/fortran/src/H5_buildiface.F90 b/fortran/src/H5_buildiface.F90 index 4b00d80..d4ebdd3 100644 --- a/fortran/src/H5_buildiface.F90 +++ b/fortran/src/H5_buildiface.F90 @@ -33,12 +33,10 @@ ! * ! This file is part of HDF5. The full HDF5 copyright notice, including * ! terms governing use, modification, and redistribution, is contained in * -! the files COPYING and Copyright.html. COPYING can be found at the root * -! of the source code distribution tree; Copyright.html can be found at the * -! root level of an installed copy of the electronic HDF5 document set and * -! is linked from the top-level documents page. It can also be found at * -! http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * -! access to either file, you may request a copy from help@hdfgroup.org. * +! the COPYING file, which can be found at the root of the source code * +! distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * +! If you do not have access to either file, you may request a copy from * +! help@hdfgroup.org. * ! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ! ! AUTHOR @@ -124,12 +122,10 @@ PROGRAM H5_buildiface '! *',& '! This file is part of HDF5. The full HDF5 copyright notice, including *',& '! terms governing use, modification, and redistribution, is contained in *',& -'! the files COPYING and Copyright.html. COPYING can be found at the root *',& -'! of the source code distribution tree; Copyright.html can be found at the *',& -'! root level of an installed copy of the electronic HDF5 document set and *',& -'! is linked from the top-level documents page. It can also be found at *',& -'! http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have *',& -'! access to either file, you may request a copy from help@hdfgroup.org. *',& +'! the COPYING file, which can be found at the root of the source code *',& +'! distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *',& +'! If you do not have access to either file, you may request a copy from *',& +'! help@hdfgroup.org. *',& '! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *',& '!',& '! AUTHOR',& diff --git a/fortran/src/H5_f.c b/fortran/src/H5_f.c index 860f9cb..352ffab 100644 --- a/fortran/src/H5_f.c +++ b/fortran/src/H5_f.c @@ -10,12 +10,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ****** diff --git a/fortran/src/H5_ff.F90 b/fortran/src/H5_ff.F90 index f2036ee..ef89d2f 100644 --- a/fortran/src/H5_ff.F90 +++ b/fortran/src/H5_ff.F90 @@ -14,12 +14,10 @@ ! * ! This file is part of HDF5. The full HDF5 copyright notice, including * ! terms governing use, modification, and redistribution, is contained in * -! the files COPYING and Copyright.html. COPYING can be found at the root * -! of the source code distribution tree; Copyright.html can be found at the * -! root level of an installed copy of the electronic HDF5 document set and * -! is linked from the top-level documents page. It can also be found at * -! http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * -! access to either file, you may request a copy from help@hdfgroup.org. * +! the COPYING file, which can be found at the root of the source code * +! distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * +! If you do not have access to either file, you may request a copy from * +! help@hdfgroup.org. * ! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ! ! NOTES diff --git a/fortran/src/H5f90.h b/fortran/src/H5f90.h index 7082d1d..eabe3d0 100644 --- a/fortran/src/H5f90.h +++ b/fortran/src/H5f90.h @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ diff --git a/fortran/src/H5f90global.F90 b/fortran/src/H5f90global.F90 index a85ee50..dd2b171 100644 --- a/fortran/src/H5f90global.F90 +++ b/fortran/src/H5f90global.F90 @@ -28,12 +28,10 @@ ! * ! This file is part of HDF5. The full HDF5 copyright notice, including * ! terms governing use, modification, and redistribution, is contained in * -! the files COPYING and Copyright.html. COPYING can be found at the root * -! of the source code distribution tree; Copyright.html can be found at the * -! root level of an installed copy of the electronic HDF5 document set and * -! is linked from the top-level documents page. It can also be found at * -! http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * -! access to either file, you may request a copy from help@hdfgroup.org. * +! the COPYING file, which can be found at the root of the source code * +! distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * +! If you do not have access to either file, you may request a copy from * +! help@hdfgroup.org. * ! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ! ! AUTHOR diff --git a/fortran/src/H5f90i.h b/fortran/src/H5f90i.h index f3c0160..7d066cd 100644 --- a/fortran/src/H5f90i.h +++ b/fortran/src/H5f90i.h @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ diff --git a/fortran/src/H5f90kit.c b/fortran/src/H5f90kit.c index c6c874f..6e8c793 100644 --- a/fortran/src/H5f90kit.c +++ b/fortran/src/H5f90kit.c @@ -13,12 +13,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ****** diff --git a/fortran/src/H5f90proto.h b/fortran/src/H5f90proto.h index 67f28db..46ef8ef 100644 --- a/fortran/src/H5f90proto.h +++ b/fortran/src/H5f90proto.h @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ diff --git a/fortran/src/H5fortkit.F90 b/fortran/src/H5fortkit.F90 index 3062c28..f5eba8a 100644 --- a/fortran/src/H5fortkit.F90 +++ b/fortran/src/H5fortkit.F90 @@ -17,12 +17,10 @@ ! * ! This file is part of HDF5. The full HDF5 copyright notice, including * ! terms governing use, modification, and redistribution, is contained in * -! the files COPYING and Copyright.html. COPYING can be found at the root * -! of the source code distribution tree; Copyright.html can be found at the * -! root level of an installed copy of the electronic HDF5 document set and * -! is linked from the top-level documents page. It can also be found at * -! http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * -! access to either file, you may request a copy from help@hdfgroup.org. * +! the COPYING file, which can be found at the root of the source code * +! distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * +! If you do not have access to either file, you may request a copy from * +! help@hdfgroup.org. * ! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ! !***** diff --git a/fortran/src/H5match_types.c b/fortran/src/H5match_types.c index 2337fb3..7e0b7e8 100644 --- a/fortran/src/H5match_types.c +++ b/fortran/src/H5match_types.c @@ -19,12 +19,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ****** @@ -66,12 +64,10 @@ initCfile(void) * *\n\ * This file is part of HDF5. The full HDF5 copyright notice, including *\n\ * terms governing use, modification, and redistribution, is contained in *\n\ - * the files COPYING and Copyright.html. COPYING can be found at the root *\n\ - * of the source code distribution tree; Copyright.html can be found at the *\n\ - * root level of an installed copy of the electronic HDF5 document set and *\n\ - * is linked from the top-level documents page. It can also be found at *\n\ - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have *\n\ - * access to either file, you may request a copy from help@hdfgroup.org. *\n\ + * the COPYING file, which can be found at the root of the source code *\n\ + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *\n\ + * If you do not have access to either file, you may request a copy from *\n\ + * help@hdfgroup.org. *\n\ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */\n\ \n\n\ #ifndef _H5f90i_gen_H\n\ @@ -93,12 +89,10 @@ initFfile(void) ! *\n\ ! This file is part of HDF5. The full HDF5 copyright notice, including *\n\ ! terms governing use, modification, and redistribution, is contained in *\n\ -! the files COPYING and Copyright.html. COPYING can be found at the root *\n\ -! of the source code distribution tree; Copyright.html can be found at the *\n\ -! root level of an installed copy of the electronic HDF5 document set and *\n\ -! is linked from the top-level documents page. It can also be found at *\n\ -! http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have *\n\ -! access to either file, you may request a copy from help@hdfgroup.org. *\n\ +! the COPYING file, which can be found at the root of the source code *\n\ +! distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *\n\ +! If you do not have access to either file, you may request a copy from *\n\ +! help@hdfgroup.org. *\n\ ! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *\n\ !\n!\n\ ! This file is automatically generated by H5match_types.c and contains HDF5 Fortran90 type definitions.\n!\n\ diff --git a/fortran/src/HDF5.F90 b/fortran/src/HDF5.F90 index cbe4c83..0370224 100644 --- a/fortran/src/HDF5.F90 +++ b/fortran/src/HDF5.F90 @@ -17,12 +17,10 @@ ! * ! This file is part of HDF5. The full HDF5 copyright notice, including * ! terms governing use, modification, and redistribution, is contained in * -! the files COPYING and Copyright.html. COPYING can be found at the root * -! of the source code distribution tree; Copyright.html can be found at the * -! root level of an installed copy of the electronic HDF5 document set and * -! is linked from the top-level documents page. It can also be found at * -! http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * -! access to either file, you may request a copy from help@hdfgroup.org. * +! the COPYING file, which can be found at the root of the source code * +! distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * +! If you do not have access to either file, you may request a copy from * +! help@hdfgroup.org. * ! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ! !***** diff --git a/fortran/src/Makefile.am b/fortran/src/Makefile.am index 51775db..a863a67 100644 --- a/fortran/src/Makefile.am +++ b/fortran/src/Makefile.am @@ -5,12 +5,10 @@ # # This file is part of HDF5. The full HDF5 copyright notice, including # terms governing use, modification, and redistribution, is contained in -# the files COPYING and Copyright.html. COPYING can be found at the root -# of the source code distribution tree; Copyright.html can be found at the -# root level of an installed copy of the electronic HDF5 document set and -# is linked from the top-level documents page. It can also be found at -# http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have -# access to either file, you may request a copy from help@hdfgroup.org. +# the COPYING file, which can be found at the root of the source code +# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. +# If you do not have access to either file, you may request a copy from +# help@hdfgroup.org. ## ## Makefile.am ## Run automake to generate a Makefile.in from this file. diff --git a/fortran/src/h5fc.in b/fortran/src/h5fc.in index f8d2182..47642c9 100644 --- a/fortran/src/h5fc.in +++ b/fortran/src/h5fc.in @@ -6,12 +6,10 @@ # # This file is part of HDF5. The full HDF5 copyright notice, including # terms governing use, modification, and redistribution, is contained in -# the files COPYING and Copyright.html. COPYING can be found at the root -# of the source code distribution tree; Copyright.html can be found at the -# root level of an installed copy of the electronic HDF5 document set and -# is linked from the top-level documents page. It can also be found at -# http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have -# access to either file, you may request a copy from help@hdfgroup.org. +# the COPYING file, which can be found at the root of the source code +# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. +# If you do not have access to either file, you may request a copy from +# help@hdfgroup.org. # ############################################################################ diff --git a/fortran/test/H5_test_buildiface.F90 b/fortran/test/H5_test_buildiface.F90 index 8b27a96..636ded4 100644 --- a/fortran/test/H5_test_buildiface.F90 +++ b/fortran/test/H5_test_buildiface.F90 @@ -33,12 +33,10 @@ ! * ! This file is part of HDF5. The full HDF5 copyright notice, including * ! terms governing use, modification, and redistribution, is contained in * -! the files COPYING and Copyright.html. COPYING can be found at the root * -! of the source code distribution tree; Copyright.html can be found at the * -! root level of an installed copy of the electronic HDF5 document set and * -! is linked from the top-level documents page. It can also be found at * -! http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * -! access to either file, you may request a copy from help@hdfgroup.org. * +! the COPYING file, which can be found at the root of the source code * +! distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * +! If you do not have access to either file, you may request a copy from * +! help@hdfgroup.org. * ! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ! ! AUTHOR @@ -82,12 +80,10 @@ PROGRAM H5_test_buildiface '! *',& '! This file is part of HDF5. The full HDF5 copyright notice, including *',& '! terms governing use, modification, and redistribution, is contained in *',& -'! the files COPYING and Copyright.html. COPYING can be found at the root *',& -'! of the source code distribution tree; Copyright.html can be found at the *',& -'! root level of an installed copy of the electronic HDF5 document set and *',& -'! is linked from the top-level documents page. It can also be found at *',& -'! http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have *',& -'! access to either file, you may request a copy from help@hdfgroup.org. *',& +'! the COPYING file, which can be found at the root of the source code *',& +'! distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *',& +'! If you do not have access to either file, you may request a copy from *',& +'! help@hdfgroup.org. *',& '! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *',& '!',& '! AUTHOR',& diff --git a/fortran/test/Makefile.am b/fortran/test/Makefile.am index 3def26e..8613cf9 100644 --- a/fortran/test/Makefile.am +++ b/fortran/test/Makefile.am @@ -5,12 +5,10 @@ # # This file is part of HDF5. The full HDF5 copyright notice, including # terms governing use, modification, and redistribution, is contained in -# the files COPYING and Copyright.html. COPYING can be found at the root -# of the source code distribution tree; Copyright.html can be found at the -# root level of an installed copy of the electronic HDF5 document set and -# is linked from the top-level documents page. It can also be found at -# http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have -# access to either file, you may request a copy from help@hdfgroup.org. +# the COPYING file, which can be found at the root of the source code +# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. +# If you do not have access to either file, you may request a copy from +# help@hdfgroup.org. ## ## Makefile.am ## Run automake to generate a Makefile.in from this file. diff --git a/fortran/test/fflush1.F90 b/fortran/test/fflush1.F90 index ca2550f..bd1f551 100644 --- a/fortran/test/fflush1.F90 +++ b/fortran/test/fflush1.F90 @@ -17,12 +17,10 @@ ! * ! This file is part of HDF5. The full HDF5 copyright notice, including * ! terms governing use, modification, and redistribution, is contained in * -! the files COPYING and Copyright.html. COPYING can be found at the root * -! of the source code distribution tree; Copyright.html can be found at the * -! root level of an installed copy of the electronic HDF5 document set and * -! is linked from the top-level documents page. It can also be found at * -! http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * -! access to either file, you may request a copy from help@hdfgroup.org. * +! the COPYING file, which can be found at the root of the source code * +! distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * +! If you do not have access to either file, you may request a copy from * +! help@hdfgroup.org. * ! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ! !***** diff --git a/fortran/test/fflush2.F90 b/fortran/test/fflush2.F90 index 4230832..278f73d 100644 --- a/fortran/test/fflush2.F90 +++ b/fortran/test/fflush2.F90 @@ -17,12 +17,10 @@ ! * ! This file is part of HDF5. The full HDF5 copyright notice, including * ! terms governing use, modification, and redistribution, is contained in * -! the files COPYING and Copyright.html. COPYING can be found at the root * -! of the source code distribution tree; Copyright.html can be found at the * -! root level of an installed copy of the electronic HDF5 document set and * -! is linked from the top-level documents page. It can also be found at * -! http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * -! access to either file, you may request a copy from help@hdfgroup.org. * +! the COPYING file, which can be found at the root of the source code * +! distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * +! If you do not have access to either file, you may request a copy from * +! help@hdfgroup.org. * ! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ! !***** diff --git a/fortran/test/fortranlib_test.F90 b/fortran/test/fortranlib_test.F90 index bcf5693..94b084e 100644 --- a/fortran/test/fortranlib_test.F90 +++ b/fortran/test/fortranlib_test.F90 @@ -14,12 +14,10 @@ ! * ! This file is part of HDF5. The full HDF5 copyright notice, including * ! terms governing use, modification, and redistribution, is contained in * -! the files COPYING and Copyright.html. COPYING can be found at the root * -! of the source code distribution tree; Copyright.html can be found at the * -! root level of an installed copy of the electronic HDF5 document set and * -! is linked from the top-level documents page. It can also be found at * -! http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * -! access to either file, you may request a copy from help@hdfgroup.org. * +! the COPYING file, which can be found at the root of the source code * +! distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * +! If you do not have access to either file, you may request a copy from * +! help@hdfgroup.org. * ! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ! !***** diff --git a/fortran/test/fortranlib_test_1_8.F90 b/fortran/test/fortranlib_test_1_8.F90 index 320d661..850cab9 100644 --- a/fortran/test/fortranlib_test_1_8.F90 +++ b/fortran/test/fortranlib_test_1_8.F90 @@ -14,12 +14,10 @@ ! * ! This file is part of HDF5. The full HDF5 copyright notice, including * ! terms governing use, modification, and redistribution, is contained in * -! the files COPYING and Copyright.html. COPYING can be found at the root * -! of the source code distribution tree; Copyright.html can be found at the * -! root level of an installed copy of the electronic HDF5 document set and * -! is linked from the top-level documents page. It can also be found at * -! http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * -! access to either file, you may request a copy from help@hdfgroup.org. * +! the COPYING file, which can be found at the root of the source code * +! distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * +! If you do not have access to either file, you may request a copy from * +! help@hdfgroup.org. * ! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ! !***** diff --git a/fortran/test/fortranlib_test_F03.F90 b/fortran/test/fortranlib_test_F03.F90 index 5f5fd2d..ae12dba 100644 --- a/fortran/test/fortranlib_test_F03.F90 +++ b/fortran/test/fortranlib_test_F03.F90 @@ -15,12 +15,10 @@ ! * ! This file is part of HDF5. The full HDF5 copyright notice, including * ! terms governing use, modification, and redistribution, is contained in * -! the files COPYING and Copyright.html. COPYING can be found at the root * -! of the source code distribution tree; Copyright.html can be found at the * -! root level of an installed copy of the electronic HDF5 document set and * -! is linked from the top-level documents page. It can also be found at * -! http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * -! access to either file, you may request a copy from help@hdfgroup.org. * +! the COPYING file, which can be found at the root of the source code * +! distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * +! If you do not have access to either file, you may request a copy from * +! help@hdfgroup.org. * ! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ! !***** diff --git a/fortran/test/t.c b/fortran/test/t.c index fe69143..107e8d5 100644 --- a/fortran/test/t.c +++ b/fortran/test/t.c @@ -14,12 +14,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ****** diff --git a/fortran/test/t.h b/fortran/test/t.h index 738aa59..81d2b5d 100644 --- a/fortran/test/t.h +++ b/fortran/test/t.h @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #include "hdf5.h" diff --git a/fortran/test/tH5A.F90 b/fortran/test/tH5A.F90 index 5b814fa..1e6fdeb 100644 --- a/fortran/test/tH5A.F90 +++ b/fortran/test/tH5A.F90 @@ -14,12 +14,10 @@ ! * ! This file is part of HDF5. The full HDF5 copyright notice, including * ! terms governing use, modification, and redistribution, is contained in * -! the files COPYING and Copyright.html. COPYING can be found at the root * -! of the source code distribution tree; Copyright.html can be found at the * -! root level of an installed copy of the electronic HDF5 document set and * -! is linked from the top-level documents page. It can also be found at * -! http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * -! access to either file, you may request a copy from help@hdfgroup.org. * +! the COPYING file, which can be found at the root of the source code * +! distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * +! If you do not have access to either file, you may request a copy from * +! help@hdfgroup.org. * ! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ! ! CONTAINS SUBROUTINES diff --git a/fortran/test/tH5A_1_8.F90 b/fortran/test/tH5A_1_8.F90 index c70e288..f2f11aa 100644 --- a/fortran/test/tH5A_1_8.F90 +++ b/fortran/test/tH5A_1_8.F90 @@ -14,12 +14,10 @@ ! * ! This file is part of HDF5. The full HDF5 copyright notice, including * ! terms governing use, modification, and redistribution, is contained in * -! the files COPYING and Copyright.html. COPYING can be found at the root * -! of the source code distribution tree; Copyright.html can be found at the * -! root level of an installed copy of the electronic HDF5 document set and * -! is linked from the top-level documents page. It can also be found at * -! http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * -! access to either file, you may request a copy from help@hdfgroup.org. * +! the COPYING file, which can be found at the root of the source code * +! distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * +! If you do not have access to either file, you may request a copy from * +! help@hdfgroup.org. * ! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ! ! CONTAINS SUBROUTINES diff --git a/fortran/test/tH5D.F90 b/fortran/test/tH5D.F90 index 183d969..7001b98 100644 --- a/fortran/test/tH5D.F90 +++ b/fortran/test/tH5D.F90 @@ -14,12 +14,10 @@ ! * ! This file is part of HDF5. The full HDF5 copyright notice, including * ! terms governing use, modification, and redistribution, is contained in * -! the files COPYING and Copyright.html. COPYING can be found at the root * -! of the source code distribution tree; Copyright.html can be found at the * -! root level of an installed copy of the electronic HDF5 document set and * -! is linked from the top-level documents page. It can also be found at * -! http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * -! access to either file, you may request a copy from help@hdfgroup.org. * +! the COPYING file, which can be found at the root of the source code * +! distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * +! If you do not have access to either file, you may request a copy from * +! help@hdfgroup.org. * ! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ! ! NOTES diff --git a/fortran/test/tH5E.F90 b/fortran/test/tH5E.F90 index 10ecaf6..3cda6e1 100644 --- a/fortran/test/tH5E.F90 +++ b/fortran/test/tH5E.F90 @@ -14,12 +14,10 @@ ! * ! This file is part of HDF5. The full HDF5 copyright notice, including * ! terms governing use, modification, and redistribution, is contained in * -! the files COPYING and Copyright.html. COPYING can be found at the root * -! of the source code distribution tree; Copyright.html can be found at the * -! root level of an installed copy of the electronic HDF5 document set and * -! is linked from the top-level documents page. It can also be found at * -! http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * -! access to either file, you may request a copy from help@hdfgroup.org. * +! the COPYING file, which can be found at the root of the source code * +! distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * +! If you do not have access to either file, you may request a copy from * +! help@hdfgroup.org. * ! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ! ! NOTES diff --git a/fortran/test/tH5E_F03.F90 b/fortran/test/tH5E_F03.F90 index 63e70a3..1878966 100644 --- a/fortran/test/tH5E_F03.F90 +++ b/fortran/test/tH5E_F03.F90 @@ -15,12 +15,10 @@ ! * ! This file is part of HDF5. The full HDF5 copyright notice, including * ! terms governing use, modification, and redistribution, is contained in * -! the files COPYING and Copyright.html. COPYING can be found at the root * -! of the source code distribution tree; Copyright.html can be found at the * -! root level of an installed copy of the electronic HDF5 document set and * -! is linked from the top-level documents page. It can also be found at * -! http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * -! access to either file, you may request a copy from help@hdfgroup.org. * +! the COPYING file, which can be found at the root of the source code * +! distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * +! If you do not have access to either file, you may request a copy from * +! help@hdfgroup.org. * ! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ! ! USES diff --git a/fortran/test/tH5F.F90 b/fortran/test/tH5F.F90 index ea8c53f..d91ee9c 100644 --- a/fortran/test/tH5F.F90 +++ b/fortran/test/tH5F.F90 @@ -14,12 +14,10 @@ ! * ! This file is part of HDF5. The full HDF5 copyright notice, including * ! terms governing use, modification, and redistribution, is contained in * -! the files COPYING and Copyright.html. COPYING can be found at the root * -! of the source code distribution tree; Copyright.html can be found at the * -! root level of an installed copy of the electronic HDF5 document set and * -! is linked from the top-level documents page. It can also be found at * -! http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * -! access to either file, you may request a copy from help@hdfgroup.org. * +! the COPYING file, which can be found at the root of the source code * +! distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * +! If you do not have access to either file, you may request a copy from * +! help@hdfgroup.org. * ! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ! ! CONTAINS SUBROUTINES diff --git a/fortran/test/tH5F_F03.F90 b/fortran/test/tH5F_F03.F90 index 0f08257..8cc6b83 100644 --- a/fortran/test/tH5F_F03.F90 +++ b/fortran/test/tH5F_F03.F90 @@ -15,12 +15,10 @@ ! * ! This file is part of HDF5. The full HDF5 copyright notice, including * ! terms governing use, modification, and redistribution, is contained in * -! the files COPYING and Copyright.html. COPYING can be found at the root * -! of the source code distribution tree; Copyright.html can be found at the * -! root level of an installed copy of the electronic HDF5 document set and * -! is linked from the top-level documents page. It can also be found at * -! http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * -! access to either file, you may request a copy from help@hdfgroup.org. * +! the COPYING file, which can be found at the root of the source code * +! distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * +! If you do not have access to either file, you may request a copy from * +! help@hdfgroup.org. * ! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ! ! NOTES diff --git a/fortran/test/tH5G.F90 b/fortran/test/tH5G.F90 index 2ba174c..0b6cc1a 100644 --- a/fortran/test/tH5G.F90 +++ b/fortran/test/tH5G.F90 @@ -14,12 +14,10 @@ ! * ! This file is part of HDF5. The full HDF5 copyright notice, including * ! terms governing use, modification, and redistribution, is contained in * -! the files COPYING and Copyright.html. COPYING can be found at the root * -! of the source code distribution tree; Copyright.html can be found at the * -! root level of an installed copy of the electronic HDF5 document set and * -! is linked from the top-level documents page. It can also be found at * -! http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * -! access to either file, you may request a copy from help@hdfgroup.org. * +! the COPYING file, which can be found at the root of the source code * +! distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * +! If you do not have access to either file, you may request a copy from * +! help@hdfgroup.org. * ! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ! ! CONTAINS SUBROUTINES diff --git a/fortran/test/tH5G_1_8.F90 b/fortran/test/tH5G_1_8.F90 index f894edd..d3be525 100644 --- a/fortran/test/tH5G_1_8.F90 +++ b/fortran/test/tH5G_1_8.F90 @@ -14,12 +14,10 @@ ! * ! This file is part of HDF5. The full HDF5 copyright notice, including * ! terms governing use, modification, and redistribution, is contained in * -! the files COPYING and Copyright.html. COPYING can be found at the root * -! of the source code distribution tree; Copyright.html can be found at the * -! root level of an installed copy of the electronic HDF5 document set and * -! is linked from the top-level documents page. It can also be found at * -! http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * -! access to either file, you may request a copy from help@hdfgroup.org. * +! the COPYING file, which can be found at the root of the source code * +! distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * +! If you do not have access to either file, you may request a copy from * +! help@hdfgroup.org. * ! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ! ! CONTAINS SUBROUTINES diff --git a/fortran/test/tH5I.F90 b/fortran/test/tH5I.F90 index 97c48c6..5ce37fd 100644 --- a/fortran/test/tH5I.F90 +++ b/fortran/test/tH5I.F90 @@ -14,12 +14,10 @@ ! * ! This file is part of HDF5. The full HDF5 copyright notice, including * ! terms governing use, modification, and redistribution, is contained in * -! the files COPYING and Copyright.html. COPYING can be found at the root * -! of the source code distribution tree; Copyright.html can be found at the * -! root level of an installed copy of the electronic HDF5 document set and * -! is linked from the top-level documents page. It can also be found at * -! http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * -! access to either file, you may request a copy from help@hdfgroup.org. * +! the COPYING file, which can be found at the root of the source code * +! distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * +! If you do not have access to either file, you may request a copy from * +! help@hdfgroup.org. * ! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ! ! CONTAINS SUBROUTINES diff --git a/fortran/test/tH5L_F03.F90 b/fortran/test/tH5L_F03.F90 index 40afdbc..bdb5c55 100644 --- a/fortran/test/tH5L_F03.F90 +++ b/fortran/test/tH5L_F03.F90 @@ -15,12 +15,10 @@ ! * ! This file is part of HDF5. The full HDF5 copyright notice, including * ! terms governing use, modification, and redistribution, is contained in * -! the files COPYING and Copyright.html. COPYING can be found at the root * -! of the source code distribution tree; Copyright.html can be found at the * -! root level of an installed copy of the electronic HDF5 document set and * -! is linked from the top-level documents page. It can also be found at * -! http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * -! access to either file, you may request a copy from help@hdfgroup.org. * +! the COPYING file, which can be found at the root of the source code * +! distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * +! If you do not have access to either file, you may request a copy from * +! help@hdfgroup.org. * ! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ! ! USES diff --git a/fortran/test/tH5MISC_1_8.F90 b/fortran/test/tH5MISC_1_8.F90 index ba3f095..79fbf3e 100644 --- a/fortran/test/tH5MISC_1_8.F90 +++ b/fortran/test/tH5MISC_1_8.F90 @@ -14,12 +14,10 @@ ! * ! This file is part of HDF5. The full HDF5 copyright notice, including * ! terms governing use, modification, and redistribution, is contained in * -! the files COPYING and Copyright.html. COPYING can be found at the root * -! of the source code distribution tree; Copyright.html can be found at the * -! root level of an installed copy of the electronic HDF5 document set and * -! is linked from the top-level documents page. It can also be found at * -! http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * -! access to either file, you may request a copy from help@hdfgroup.org. * +! the COPYING file, which can be found at the root of the source code * +! distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * +! If you do not have access to either file, you may request a copy from * +! help@hdfgroup.org. * ! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ! !***** diff --git a/fortran/test/tH5O.F90 b/fortran/test/tH5O.F90 index 51e1d64..fa3787e 100644 --- a/fortran/test/tH5O.F90 +++ b/fortran/test/tH5O.F90 @@ -14,12 +14,10 @@ ! * ! This file is part of HDF5. The full HDF5 copyright notice, including * ! terms governing use, modification, and redistribution, is contained in * -! the files COPYING and Copyright.html. COPYING can be found at the root * -! of the source code distribution tree; Copyright.html can be found at the * -! root level of an installed copy of the electronic HDF5 document set and * -! is linked from the top-level documents page. It can also be found at * -! http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * -! access to either file, you may request a copy from help@hdfgroup.org. * +! the COPYING file, which can be found at the root of the source code * +! distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * +! If you do not have access to either file, you may request a copy from * +! help@hdfgroup.org. * ! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ! ! CONTAINS SUBROUTINES diff --git a/fortran/test/tH5O_F03.F90 b/fortran/test/tH5O_F03.F90 index 834308b..44c4bff 100644 --- a/fortran/test/tH5O_F03.F90 +++ b/fortran/test/tH5O_F03.F90 @@ -15,12 +15,10 @@ ! * ! This file is part of HDF5. The full HDF5 copyright notice, including * ! terms governing use, modification, and redistribution, is contained in * -! the files COPYING and Copyright.html. COPYING can be found at the root * -! of the source code distribution tree; Copyright.html can be found at the * -! root level of an installed copy of the electronic HDF5 document set and * -! is linked from the top-level documents page. It can also be found at * -! http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * -! access to either file, you may request a copy from help@hdfgroup.org. * +! the COPYING file, which can be found at the root of the source code * +! distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * +! If you do not have access to either file, you may request a copy from * +! help@hdfgroup.org. * ! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ! !***** diff --git a/fortran/test/tH5P.F90 b/fortran/test/tH5P.F90 index 39d8c1e..563926b 100644 --- a/fortran/test/tH5P.F90 +++ b/fortran/test/tH5P.F90 @@ -14,12 +14,10 @@ ! * ! This file is part of HDF5. The full HDF5 copyright notice, including * ! terms governing use, modification, and redistribution, is contained in * -! the files COPYING and Copyright.html. COPYING can be found at the root * -! of the source code distribution tree; Copyright.html can be found at the * -! root level of an installed copy of the electronic HDF5 document set and * -! is linked from the top-level documents page. It can also be found at * -! http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * -! access to either file, you may request a copy from help@hdfgroup.org. * +! the COPYING file, which can be found at the root of the source code * +! distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * +! If you do not have access to either file, you may request a copy from * +! help@hdfgroup.org. * ! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ! ! CONTAINS SUBROUTINES diff --git a/fortran/test/tH5P_F03.F90 b/fortran/test/tH5P_F03.F90 index aaf1496..69d493b 100644 --- a/fortran/test/tH5P_F03.F90 +++ b/fortran/test/tH5P_F03.F90 @@ -15,12 +15,10 @@ ! * ! This file is part of HDF5. The full HDF5 copyright notice, including * ! terms governing use, modification, and redistribution, is contained in * -! the files COPYING and Copyright.html. COPYING can be found at the root * -! of the source code distribution tree; Copyright.html can be found at the * -! root level of an installed copy of the electronic HDF5 document set and * -! is linked from the top-level documents page. It can also be found at * -! http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * -! access to either file, you may request a copy from help@hdfgroup.org. * +! the COPYING file, which can be found at the root of the source code * +! distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * +! If you do not have access to either file, you may request a copy from * +! help@hdfgroup.org. * ! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ! ! USES diff --git a/fortran/test/tH5R.F90 b/fortran/test/tH5R.F90 index ef392b4..f7cccfa 100644 --- a/fortran/test/tH5R.F90 +++ b/fortran/test/tH5R.F90 @@ -14,12 +14,10 @@ ! * ! This file is part of HDF5. The full HDF5 copyright notice, including * ! terms governing use, modification, and redistribution, is contained in * -! the files COPYING and Copyright.html. COPYING can be found at the root * -! of the source code distribution tree; Copyright.html can be found at the * -! root level of an installed copy of the electronic HDF5 document set and * -! is linked from the top-level documents page. It can also be found at * -! http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * -! access to either file, you may request a copy from help@hdfgroup.org. * +! the COPYING file, which can be found at the root of the source code * +! distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * +! If you do not have access to either file, you may request a copy from * +! help@hdfgroup.org. * ! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ! ! NOTES diff --git a/fortran/test/tH5S.F90 b/fortran/test/tH5S.F90 index 7223772..a4f5f4a 100644 --- a/fortran/test/tH5S.F90 +++ b/fortran/test/tH5S.F90 @@ -14,12 +14,10 @@ ! * ! This file is part of HDF5. The full HDF5 copyright notice, including * ! terms governing use, modification, and redistribution, is contained in * -! the files COPYING and Copyright.html. COPYING can be found at the root * -! of the source code distribution tree; Copyright.html can be found at the * -! root level of an installed copy of the electronic HDF5 document set and * -! is linked from the top-level documents page. It can also be found at * -! http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * -! access to either file, you may request a copy from help@hdfgroup.org. * +! the COPYING file, which can be found at the root of the source code * +! distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * +! If you do not have access to either file, you may request a copy from * +! help@hdfgroup.org. * ! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ! ! NOTES diff --git a/fortran/test/tH5Sselect.F90 b/fortran/test/tH5Sselect.F90 index aeb80e9..8415bce 100644 --- a/fortran/test/tH5Sselect.F90 +++ b/fortran/test/tH5Sselect.F90 @@ -14,12 +14,10 @@ ! * ! This file is part of HDF5. The full HDF5 copyright notice, including * ! terms governing use, modification, and redistribution, is contained in * -! the files COPYING and Copyright.html. COPYING can be found at the root * -! of the source code distribution tree; Copyright.html can be found at the * -! root level of an installed copy of the electronic HDF5 document set and * -! is linked from the top-level documents page. It can also be found at * -! http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * -! access to either file, you may request a copy from help@hdfgroup.org. * +! the COPYING file, which can be found at the root of the source code * +! distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * +! If you do not have access to either file, you may request a copy from * +! help@hdfgroup.org. * ! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ! ! NOTES diff --git a/fortran/test/tH5T.F90 b/fortran/test/tH5T.F90 index 1a3a382..a986ba6 100644 --- a/fortran/test/tH5T.F90 +++ b/fortran/test/tH5T.F90 @@ -14,12 +14,10 @@ ! * ! This file is part of HDF5. The full HDF5 copyright notice, including * ! terms governing use, modification, and redistribution, is contained in * -! the files COPYING and Copyright.html. COPYING can be found at the root * -! of the source code distribution tree; Copyright.html can be found at the * -! root level of an installed copy of the electronic HDF5 document set and * -! is linked from the top-level documents page. It can also be found at * -! http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * -! access to either file, you may request a copy from help@hdfgroup.org. * +! the COPYING file, which can be found at the root of the source code * +! distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * +! If you do not have access to either file, you may request a copy from * +! help@hdfgroup.org. * ! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ! ! CONTAINS SUBROUTINES diff --git a/fortran/test/tH5T_F03.F90 b/fortran/test/tH5T_F03.F90 index c596d31..800e84b 100644 --- a/fortran/test/tH5T_F03.F90 +++ b/fortran/test/tH5T_F03.F90 @@ -15,12 +15,10 @@ ! * ! This file is part of HDF5. The full HDF5 copyright notice, including * ! terms governing use, modification, and redistribution, is contained in * -! the files COPYING and Copyright.html. COPYING can be found at the root * -! of the source code distribution tree; Copyright.html can be found at the * -! root level of an installed copy of the electronic HDF5 document set and * -! is linked from the top-level documents page. It can also be found at * -! http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * -! access to either file, you may request a copy from help@hdfgroup.org. * +! the COPYING file, which can be found at the root of the source code * +! distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * +! If you do not have access to either file, you may request a copy from * +! help@hdfgroup.org. * ! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ! ! diff --git a/fortran/test/tH5VL.F90 b/fortran/test/tH5VL.F90 index 834fbde..7ef9c19 100644 --- a/fortran/test/tH5VL.F90 +++ b/fortran/test/tH5VL.F90 @@ -14,12 +14,10 @@ ! * ! This file is part of HDF5. The full HDF5 copyright notice, including * ! terms governing use, modification, and redistribution, is contained in * -! the files COPYING and Copyright.html. COPYING can be found at the root * -! of the source code distribution tree; Copyright.html can be found at the * -! root level of an installed copy of the electronic HDF5 document set and * -! is linked from the top-level documents page. It can also be found at * -! http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * -! access to either file, you may request a copy from help@hdfgroup.org. * +! the COPYING file, which can be found at the root of the source code * +! distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * +! If you do not have access to either file, you may request a copy from * +! help@hdfgroup.org. * ! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ! ! CONTAINS SUBROUTINES diff --git a/fortran/test/tH5Z.F90 b/fortran/test/tH5Z.F90 index 4201960..0fd7b1b 100644 --- a/fortran/test/tH5Z.F90 +++ b/fortran/test/tH5Z.F90 @@ -14,12 +14,10 @@ ! * ! This file is part of HDF5. The full HDF5 copyright notice, including * ! terms governing use, modification, and redistribution, is contained in * -! the files COPYING and Copyright.html. COPYING can be found at the root * -! of the source code distribution tree; Copyright.html can be found at the * -! root level of an installed copy of the electronic HDF5 document set and * -! is linked from the top-level documents page. It can also be found at * -! http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * -! access to either file, you may request a copy from help@hdfgroup.org. * +! the COPYING file, which can be found at the root of the source code * +! distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * +! If you do not have access to either file, you may request a copy from * +! help@hdfgroup.org. * ! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ! ! CONTAINS SUBROUTINES diff --git a/fortran/test/tHDF5.F90 b/fortran/test/tHDF5.F90 index e9e0892..459b74f 100644 --- a/fortran/test/tHDF5.F90 +++ b/fortran/test/tHDF5.F90 @@ -17,12 +17,10 @@ ! * ! This file is part of HDF5. The full HDF5 copyright notice, including * ! terms governing use, modification, and redistribution, is contained in * -! the files COPYING and Copyright.html. COPYING can be found at the root * -! of the source code distribution tree; Copyright.html can be found at the * -! root level of an installed copy of the electronic HDF5 document set and * -! is linked from the top-level documents page. It can also be found at * -! http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * -! access to either file, you may request a copy from help@hdfgroup.org. * +! the COPYING file, which can be found at the root of the source code * +! distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * +! If you do not have access to either file, you may request a copy from * +! help@hdfgroup.org. * ! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ! !***** diff --git a/fortran/test/tHDF5_1_8.F90 b/fortran/test/tHDF5_1_8.F90 index 6a3f74b..7e1f862 100644 --- a/fortran/test/tHDF5_1_8.F90 +++ b/fortran/test/tHDF5_1_8.F90 @@ -18,12 +18,10 @@ ! * ! This file is part of HDF5. The full HDF5 copyright notice, including * ! terms governing use, modification, and redistribution, is contained in * -! the files COPYING and Copyright.html. COPYING can be found at the root * -! of the source code distribution tree; Copyright.html can be found at the * -! root level of an installed copy of the electronic HDF5 document set and * -! is linked from the top-level documents page. It can also be found at * -! http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * -! access to either file, you may request a copy from help@hdfgroup.org. * +! the COPYING file, which can be found at the root of the source code * +! distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * +! If you do not have access to either file, you may request a copy from * +! help@hdfgroup.org. * ! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ! !***** diff --git a/fortran/test/tHDF5_F03.F90 b/fortran/test/tHDF5_F03.F90 index b3b1885..96959d8 100644 --- a/fortran/test/tHDF5_F03.F90 +++ b/fortran/test/tHDF5_F03.F90 @@ -18,12 +18,10 @@ ! * ! This file is part of HDF5. The full HDF5 copyright notice, including * ! terms governing use, modification, and redistribution, is contained in * -! the files COPYING and Copyright.html. COPYING can be found at the root * -! of the source code distribution tree; Copyright.html can be found at the * -! root level of an installed copy of the electronic HDF5 document set and * -! is linked from the top-level documents page. It can also be found at * -! http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * -! access to either file, you may request a copy from help@hdfgroup.org. * +! the COPYING file, which can be found at the root of the source code * +! distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * +! If you do not have access to either file, you may request a copy from * +! help@hdfgroup.org. * ! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ! !***** diff --git a/fortran/test/tf.F90 b/fortran/test/tf.F90 index 26b3e99..4df53bd 100644 --- a/fortran/test/tf.F90 +++ b/fortran/test/tf.F90 @@ -14,12 +14,10 @@ ! * ! This file is part of HDF5. The full HDF5 copyright notice, including * ! terms governing use, modification, and redistribution, is contained in * -! the files COPYING and Copyright.html. COPYING can be found at the root * -! of the source code distribution tree; Copyright.html can be found at the * -! root level of an installed copy of the electronic HDF5 document set and * -! is linked from the top-level documents page. It can also be found at * -! http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * -! access to either file, you may request a copy from help@hdfgroup.org. * +! the COPYING file, which can be found at the root of the source code * +! distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * +! If you do not have access to either file, you may request a copy from * +! help@hdfgroup.org. * ! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ! ! CONTAINS SUBROUTINES diff --git a/fortran/testpar/Makefile.am b/fortran/testpar/Makefile.am index 380f475..e597a84 100644 --- a/fortran/testpar/Makefile.am +++ b/fortran/testpar/Makefile.am @@ -5,12 +5,10 @@ # # This file is part of HDF5. The full HDF5 copyright notice, including # terms governing use, modification, and redistribution, is contained in -# the files COPYING and Copyright.html. COPYING can be found at the root -# of the source code distribution tree; Copyright.html can be found at the -# root level of an installed copy of the electronic HDF5 document set and -# is linked from the top-level documents page. It can also be found at -# http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have -# access to either file, you may request a copy from help@hdfgroup.org. +# the COPYING file, which can be found at the root of the source code +# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. +# If you do not have access to either file, you may request a copy from +# help@hdfgroup.org. ## ## Makefile.am ## Run automake to generate a Makefile.in from this file. diff --git a/fortran/testpar/hyper.f90 b/fortran/testpar/hyper.f90 index 28c0b53..22f641d 100644 --- a/fortran/testpar/hyper.f90 +++ b/fortran/testpar/hyper.f90 @@ -5,12 +5,10 @@ ! * ! This file is part of HDF5. The full HDF5 copyright notice, including * ! terms governing use, modification, and redistribution, is contained in * -! the files COPYING and Copyright.html. COPYING can be found at the root * -! of the source code distribution tree; Copyright.html can be found at the * -! root level of an installed copy of the electronic HDF5 document set and * -! is linked from the top-level documents page. It can also be found at * -! http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * -! access to either file, you may request a copy from help@hdfgroup.org. * +! the COPYING file, which can be found at the root of the source code * +! distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * +! If you do not have access to either file, you may request a copy from * +! help@hdfgroup.org. * ! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * diff --git a/fortran/testpar/mdset.f90 b/fortran/testpar/mdset.f90 index 7fe431b..70d2939 100644 --- a/fortran/testpar/mdset.f90 +++ b/fortran/testpar/mdset.f90 @@ -5,12 +5,10 @@ ! * ! This file is part of HDF5. The full HDF5 copyright notice, including * ! terms governing use, modification, and redistribution, is contained in * -! the files COPYING and Copyright.html. COPYING can be found at the root * -! of the source code distribution tree; Copyright.html can be found at the * -! root level of an installed copy of the electronic HDF5 document set and * -! is linked from the top-level documents page. It can also be found at * -! http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * -! access to either file, you may request a copy from help@hdfgroup.org. * +! the COPYING file, which can be found at the root of the source code * +! distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * +! If you do not have access to either file, you may request a copy from * +! help@hdfgroup.org. * ! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * diff --git a/fortran/testpar/ptest.f90 b/fortran/testpar/ptest.f90 index 82dcc09..14ac3b2 100644 --- a/fortran/testpar/ptest.f90 +++ b/fortran/testpar/ptest.f90 @@ -5,12 +5,10 @@ ! * ! This file is part of HDF5. The full HDF5 copyright notice, including * ! terms governing use, modification, and redistribution, is contained in * -! the files COPYING and Copyright.html. COPYING can be found at the root * -! of the source code distribution tree; Copyright.html can be found at the * -! root level of an installed copy of the electronic HDF5 document set and * -! is linked from the top-level documents page. It can also be found at * -! http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * -! access to either file, you may request a copy from help@hdfgroup.org. * +! the COPYING file, which can be found at the root of the source code * +! distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * +! If you do not have access to either file, you may request a copy from * +! help@hdfgroup.org. * ! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ! diff --git a/hl/Makefile.am b/hl/Makefile.am index 9f31719..aee1f86 100644 --- a/hl/Makefile.am +++ b/hl/Makefile.am @@ -5,12 +5,10 @@ # # This file is part of HDF5. The full HDF5 copyright notice, including # terms governing use, modification, and redistribution, is contained in -# the files COPYING and Copyright.html. COPYING can be found at the root -# of the source code distribution tree; Copyright.html can be found at the -# root level of an installed copy of the electronic HDF5 document set and -# is linked from the top-level documents page. It can also be found at -# http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have -# access to either file, you may request a copy from help@hdfgroup.org. +# the COPYING file, which can be found at the root of the source code +# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. +# If you do not have access to either file, you may request a copy from +# help@hdfgroup.org. # # # This makefile mostly just reinvokes make in the various subdirectories diff --git a/hl/c++/Makefile.am b/hl/c++/Makefile.am index 80445f7..1968bf5 100644 --- a/hl/c++/Makefile.am +++ b/hl/c++/Makefile.am @@ -5,12 +5,10 @@ # # This file is part of HDF5. The full HDF5 copyright notice, including # terms governing use, modification, and redistribution, is contained in -# the files COPYING and Copyright.html. COPYING can be found at the root -# of the source code distribution tree; Copyright.html can be found at the -# root level of an installed copy of the electronic HDF5 document set and -# is linked from the top-level documents page. It can also be found at -# http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have -# access to either file, you may request a copy from help@hdfgroup.org. +# the COPYING file, which can be found at the root of the source code +# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. +# If you do not have access to either file, you may request a copy from +# help@hdfgroup.org. ## ## Makefile.am ## Run automake to generate a Makefile.in from this file. diff --git a/hl/c++/examples/Makefile.am b/hl/c++/examples/Makefile.am index 7202a96..ce719f5 100644 --- a/hl/c++/examples/Makefile.am +++ b/hl/c++/examples/Makefile.am @@ -5,12 +5,10 @@ # # This file is part of HDF5. The full HDF5 copyright notice, including # terms governing use, modification, and redistribution, is contained in -# the files COPYING and Copyright.html. COPYING can be found at the root -# of the source code distribution tree; Copyright.html can be found at the -# root level of an installed copy of the electronic HDF5 document set and -# is linked from the top-level documents page. It can also be found at -# http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have -# access to either file, you may request a copy from help@hdfgroup.org. +# the COPYING file, which can be found at the root of the source code +# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. +# If you do not have access to either file, you may request a copy from +# help@hdfgroup.org. ## ## Makefile.am ## Run automake to generate a Makefile.in from this file. diff --git a/hl/c++/examples/ptExampleFL.cpp b/hl/c++/examples/ptExampleFL.cpp index 27cbd92..26cbf09 100644 --- a/hl/c++/examples/ptExampleFL.cpp +++ b/hl/c++/examples/ptExampleFL.cpp @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #include "H5PacketTable.h" diff --git a/hl/c++/examples/run-hlc++-ex.sh.in b/hl/c++/examples/run-hlc++-ex.sh.in index 5aa1032..9539724 100644 --- a/hl/c++/examples/run-hlc++-ex.sh.in +++ b/hl/c++/examples/run-hlc++-ex.sh.in @@ -5,12 +5,10 @@ # # This file is part of HDF5. The full HDF5 copyright notice, including # terms governing use, modification, and redistribution, is contained in -# the files COPYING and Copyright.html. COPYING can be found at the root -# of the source code distribution tree; Copyright.html can be found at the -# root level of an installed copy of the electronic HDF5 document set and -# is linked from the top-level documents page. It can also be found at -# http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have -# access to either file, you may request a copy from help@hdfgroup.org. +# the COPYING file, which can be found at the root of the source code +# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. +# If you do not have access to either file, you may request a copy from +# help@hdfgroup.org. # # This file: run-hlc++-ex.sh diff --git a/hl/c++/src/H5PacketTable.cpp b/hl/c++/src/H5PacketTable.cpp index c4d7bbf..544df0b 100644 --- a/hl/c++/src/H5PacketTable.cpp +++ b/hl/c++/src/H5PacketTable.cpp @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* Packet Table wrapper classes diff --git a/hl/c++/src/H5PacketTable.h b/hl/c++/src/H5PacketTable.h index be0b130..2665984 100644 --- a/hl/c++/src/H5PacketTable.h +++ b/hl/c++/src/H5PacketTable.h @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* Packet Table wrapper classes diff --git a/hl/c++/src/Makefile.am b/hl/c++/src/Makefile.am index c78f5fa..363ba3b 100644 --- a/hl/c++/src/Makefile.am +++ b/hl/c++/src/Makefile.am @@ -5,12 +5,10 @@ # # This file is part of HDF5. The full HDF5 copyright notice, including # terms governing use, modification, and redistribution, is contained in -# the files COPYING and Copyright.html. COPYING can be found at the root -# of the source code distribution tree; Copyright.html can be found at the -# root level of an installed copy of the electronic HDF5 document set and -# is linked from the top-level documents page. It can also be found at -# http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have -# access to either file, you may request a copy from help@hdfgroup.org. +# the COPYING file, which can be found at the root of the source code +# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. +# If you do not have access to either file, you may request a copy from +# help@hdfgroup.org. ## ## Makefile.am ## Run automake to generate a Makefile.in from this file. diff --git a/hl/c++/test/Makefile.am b/hl/c++/test/Makefile.am index c835843..7031c34 100644 --- a/hl/c++/test/Makefile.am +++ b/hl/c++/test/Makefile.am @@ -5,12 +5,10 @@ # # This file is part of HDF5. The full HDF5 copyright notice, including # terms governing use, modification, and redistribution, is contained in -# the files COPYING and Copyright.html. COPYING can be found at the root -# of the source code distribution tree; Copyright.html can be found at the -# root level of an installed copy of the electronic HDF5 document set and -# is linked from the top-level documents page. It can also be found at -# http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have -# access to either file, you may request a copy from help@hdfgroup.org. +# the COPYING file, which can be found at the root of the source code +# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. +# If you do not have access to either file, you may request a copy from +# help@hdfgroup.org. ## ## Makefile.am ## Run automake to generate a Makefile.in from this file. diff --git a/hl/c++/test/ptableTest.cpp b/hl/c++/test/ptableTest.cpp index c388af3..340912e 100644 --- a/hl/c++/test/ptableTest.cpp +++ b/hl/c++/test/ptableTest.cpp @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* ptableTest.cpp */ diff --git a/hl/c++/test/ptableTest.h b/hl/c++/test/ptableTest.h index 60b55ca..8af7bff 100644 --- a/hl/c++/test/ptableTest.h +++ b/hl/c++/test/ptableTest.h @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* Test header for Packet Table C++ wrapper API */ diff --git a/hl/examples/Makefile.am b/hl/examples/Makefile.am index ba200ed..29e1a48 100644 --- a/hl/examples/Makefile.am +++ b/hl/examples/Makefile.am @@ -5,12 +5,10 @@ # # This file is part of HDF5. The full HDF5 copyright notice, including # terms governing use, modification, and redistribution, is contained in -# the files COPYING and Copyright.html. COPYING can be found at the root -# of the source code distribution tree; Copyright.html can be found at the -# root level of an installed copy of the electronic HDF5 document set and -# is linked from the top-level documents page. It can also be found at -# http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have -# access to either file, you may request a copy from help@hdfgroup.org. +# the COPYING file, which can be found at the root of the source code +# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. +# If you do not have access to either file, you may request a copy from +# help@hdfgroup.org. ## ## Makefile.am ## Run automake to generate a Makefile.in from this file. diff --git a/hl/examples/ex_ds1.c b/hl/examples/ex_ds1.c index 8b7e530..1e0c592 100644 --- a/hl/examples/ex_ds1.c +++ b/hl/examples/ex_ds1.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #include "hdf5.h" diff --git a/hl/examples/ex_image1.c b/hl/examples/ex_image1.c index 18ad903..56a175d 100644 --- a/hl/examples/ex_image1.c +++ b/hl/examples/ex_image1.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #include "hdf5.h" diff --git a/hl/examples/ex_image2.c b/hl/examples/ex_image2.c index b57f1b7..5abf723 100644 --- a/hl/examples/ex_image2.c +++ b/hl/examples/ex_image2.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #include "hdf5.h" diff --git a/hl/examples/ex_lite1.c b/hl/examples/ex_lite1.c index 446c803..89f60dc 100644 --- a/hl/examples/ex_lite1.c +++ b/hl/examples/ex_lite1.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ diff --git a/hl/examples/ex_lite2.c b/hl/examples/ex_lite2.c index a696a20..261fc73 100644 --- a/hl/examples/ex_lite2.c +++ b/hl/examples/ex_lite2.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #include "hdf5.h" diff --git a/hl/examples/ex_lite3.c b/hl/examples/ex_lite3.c index f409ea4..420cbcb 100644 --- a/hl/examples/ex_lite3.c +++ b/hl/examples/ex_lite3.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #include "hdf5.h" diff --git a/hl/examples/ex_table_01.c b/hl/examples/ex_table_01.c index 1d381ae..f1d0266 100644 --- a/hl/examples/ex_table_01.c +++ b/hl/examples/ex_table_01.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #include "hdf5.h" diff --git a/hl/examples/ex_table_02.c b/hl/examples/ex_table_02.c index 129f87d..923f810 100644 --- a/hl/examples/ex_table_02.c +++ b/hl/examples/ex_table_02.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #include "hdf5.h" diff --git a/hl/examples/ex_table_03.c b/hl/examples/ex_table_03.c index c9f94ce..76a9eae 100644 --- a/hl/examples/ex_table_03.c +++ b/hl/examples/ex_table_03.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ diff --git a/hl/examples/ex_table_04.c b/hl/examples/ex_table_04.c index 01f2869..203114c 100644 --- a/hl/examples/ex_table_04.c +++ b/hl/examples/ex_table_04.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #include "hdf5.h" diff --git a/hl/examples/ex_table_05.c b/hl/examples/ex_table_05.c index 7ed1fec..b43d635 100644 --- a/hl/examples/ex_table_05.c +++ b/hl/examples/ex_table_05.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ diff --git a/hl/examples/ex_table_06.c b/hl/examples/ex_table_06.c index 081347e..0397e83 100644 --- a/hl/examples/ex_table_06.c +++ b/hl/examples/ex_table_06.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #include "hdf5.h" diff --git a/hl/examples/ex_table_07.c b/hl/examples/ex_table_07.c index 3be788f..d9ea444 100644 --- a/hl/examples/ex_table_07.c +++ b/hl/examples/ex_table_07.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #include "hdf5.h" diff --git a/hl/examples/ex_table_08.c b/hl/examples/ex_table_08.c index 5d3659f..a45520d 100644 --- a/hl/examples/ex_table_08.c +++ b/hl/examples/ex_table_08.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #include "hdf5_hl.h" diff --git a/hl/examples/ex_table_09.c b/hl/examples/ex_table_09.c index a4ef611..a9f5f11 100644 --- a/hl/examples/ex_table_09.c +++ b/hl/examples/ex_table_09.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #include "hdf5_hl.h" diff --git a/hl/examples/ex_table_10.c b/hl/examples/ex_table_10.c index 059c7ea..8c4d8ae 100644 --- a/hl/examples/ex_table_10.c +++ b/hl/examples/ex_table_10.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #include "hdf5_hl.h" diff --git a/hl/examples/ex_table_11.c b/hl/examples/ex_table_11.c index 687568c..d6215cb 100644 --- a/hl/examples/ex_table_11.c +++ b/hl/examples/ex_table_11.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #include "hdf5_hl.h" diff --git a/hl/examples/ex_table_12.c b/hl/examples/ex_table_12.c index 125b8be..f287c29 100644 --- a/hl/examples/ex_table_12.c +++ b/hl/examples/ex_table_12.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #include "hdf5.h" diff --git a/hl/examples/pal_rgb.h b/hl/examples/pal_rgb.h index 606137e..f3905b3 100644 --- a/hl/examples/pal_rgb.h +++ b/hl/examples/pal_rgb.h @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ const unsigned char pal_rgb[256*3] = {255,255,255, diff --git a/hl/examples/ptExampleFL.c b/hl/examples/ptExampleFL.c index 37b5035..ba7a3a0 100644 --- a/hl/examples/ptExampleFL.c +++ b/hl/examples/ptExampleFL.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #include "hdf5_hl.h" diff --git a/hl/examples/run-hl-ex.sh b/hl/examples/run-hl-ex.sh index 5fa97c0..6f736cc 100755 --- a/hl/examples/run-hl-ex.sh +++ b/hl/examples/run-hl-ex.sh @@ -5,12 +5,10 @@ # # This file is part of HDF5. The full HDF5 copyright notice, including # terms governing use, modification, and redistribution, is contained in -# the files COPYING and Copyright.html. COPYING can be found at the root -# of the source code distribution tree; Copyright.html can be found at the -# root level of an installed copy of the electronic HDF5 document set and -# is linked from the top-level documents page. It can also be found at -# http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have -# access to either file, you may request a copy from help@hdfgroup.org. +# the COPYING file, which can be found at the root of the source code +# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. +# If you do not have access to either file, you may request a copy from +# help@hdfgroup.org. # # This file: run-hl-ex.sh diff --git a/hl/examples/run-hlc-ex.sh.in b/hl/examples/run-hlc-ex.sh.in index d897a02..b12955f 100644 --- a/hl/examples/run-hlc-ex.sh.in +++ b/hl/examples/run-hlc-ex.sh.in @@ -5,12 +5,10 @@ # # This file is part of HDF5. The full HDF5 copyright notice, including # terms governing use, modification, and redistribution, is contained in -# the files COPYING and Copyright.html. COPYING can be found at the root -# of the source code distribution tree; Copyright.html can be found at the -# root level of an installed copy of the electronic HDF5 document set and -# is linked from the top-level documents page. It can also be found at -# http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have -# access to either file, you may request a copy from help@hdfgroup.org. +# the COPYING file, which can be found at the root of the source code +# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. +# If you do not have access to either file, you may request a copy from +# help@hdfgroup.org. # # This file: run-hlc-ex.sh diff --git a/hl/fortran/Makefile.am b/hl/fortran/Makefile.am index 646de26..ad18a21 100644 --- a/hl/fortran/Makefile.am +++ b/hl/fortran/Makefile.am @@ -5,12 +5,10 @@ # # This file is part of HDF5. The full HDF5 copyright notice, including # terms governing use, modification, and redistribution, is contained in -# the files COPYING and Copyright.html. COPYING can be found at the root -# of the source code distribution tree; Copyright.html can be found at the -# root level of an installed copy of the electronic HDF5 document set and -# is linked from the top-level documents page. It can also be found at -# http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have -# access to either file, you may request a copy from help@hdfgroup.org. +# the COPYING file, which can be found at the root of the source code +# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. +# If you do not have access to either file, you may request a copy from +# help@hdfgroup.org. # # # This makefile mostly just reinvokes make in the various subdirectories diff --git a/hl/fortran/examples/Makefile.am b/hl/fortran/examples/Makefile.am index 997da73..6709fb7 100644 --- a/hl/fortran/examples/Makefile.am +++ b/hl/fortran/examples/Makefile.am @@ -5,12 +5,10 @@ # # This file is part of HDF5. The full HDF5 copyright notice, including # terms governing use, modification, and redistribution, is contained in -# the files COPYING and Copyright.html. COPYING can be found at the root -# of the source code distribution tree; Copyright.html can be found at the -# root level of an installed copy of the electronic HDF5 document set and -# is linked from the top-level documents page. It can also be found at -# http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have -# access to either file, you may request a copy from help@hdfgroup.org. +# the COPYING file, which can be found at the root of the source code +# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. +# If you do not have access to either file, you may request a copy from +# help@hdfgroup.org. ## ## Makefile.am ## Run automake to generate a Makefile.in from this file. diff --git a/hl/fortran/examples/ex_ds1.f90 b/hl/fortran/examples/ex_ds1.f90 index d77f8e0..14e2b0c 100644 --- a/hl/fortran/examples/ex_ds1.f90 +++ b/hl/fortran/examples/ex_ds1.f90 @@ -5,12 +5,10 @@ ! * * ! * This file is part of HDF5. The full HDF5 copyright notice, including * ! * terms governing use, modification, and redistribution, is contained in * -! * the files COPYING and Copyright.html. COPYING can be found at the root * -! * of the source code distribution tree; Copyright.html can be found at the * -! * root level of an installed copy of the electronic HDF5 document set and * -! * is linked from the top-level documents page. It can also be found at * -! * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * -! * access to either file, you may request a copy from help@hdfgroup.org. * +! the COPYING file, which can be found at the root of the source code * +! distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * +! If you do not have access to either file, you may request a copy from * +! help@hdfgroup.org. * ! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * PROGRAM example_ds diff --git a/hl/fortran/examples/exlite.f90 b/hl/fortran/examples/exlite.f90 index 916bcb9..90a33fd 100644 --- a/hl/fortran/examples/exlite.f90 +++ b/hl/fortran/examples/exlite.f90 @@ -5,12 +5,10 @@ ! * ! This file is part of HDF5. The full HDF5 copyright notice, including * ! terms governing use, modification, and redistribution, is contained in * -! the files COPYING and Copyright.html. COPYING can be found at the root * -! of the source code distribution tree; Copyright.html can be found at the * -! root level of an installed copy of the electronic HDF5 document set and * -! is linked from the top-level documents page. It can also be found at * -! http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * -! access to either file, you may request a copy from help@hdfgroup.org. * +! the COPYING file, which can be found at the root of the source code * +! distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * +! If you do not have access to either file, you may request a copy from * +! help@hdfgroup.org. * ! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ! diff --git a/hl/fortran/examples/run-hlfortran-ex.sh.in b/hl/fortran/examples/run-hlfortran-ex.sh.in index 12f9fec..c8f41f8 100644 --- a/hl/fortran/examples/run-hlfortran-ex.sh.in +++ b/hl/fortran/examples/run-hlfortran-ex.sh.in @@ -5,12 +5,10 @@ # # This file is part of HDF5. The full HDF5 copyright notice, including # terms governing use, modification, and redistribution, is contained in -# the files COPYING and Copyright.html. COPYING can be found at the root -# of the source code distribution tree; Copyright.html can be found at the -# root level of an installed copy of the electronic HDF5 document set and -# is linked from the top-level documents page. It can also be found at -# http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have -# access to either file, you may request a copy from help@hdfgroup.org. +# the COPYING file, which can be found at the root of the source code +# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. +# If you do not have access to either file, you may request a copy from +# help@hdfgroup.org. # # This file: run-hlfortran-ex.sh diff --git a/hl/fortran/src/H5DSfc.c b/hl/fortran/src/H5DSfc.c index af054e0..0bb594d 100644 --- a/hl/fortran/src/H5DSfc.c +++ b/hl/fortran/src/H5DSfc.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * -* the files COPYING and Copyright.html. COPYING can be found at the root * -* of the source code distribution tree; Copyright.html can be found at the * -* root level of an installed copy of the electronic HDF5 document set and * -* is linked from the top-level documents page. It can also be found at * -* http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * -* access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* This files contains C stubs for H5D Fortran APIs */ diff --git a/hl/fortran/src/H5DSff.F90 b/hl/fortran/src/H5DSff.F90 index 00cf4d8..4f0d040 100644 --- a/hl/fortran/src/H5DSff.F90 +++ b/hl/fortran/src/H5DSff.F90 @@ -5,12 +5,10 @@ ! * ! This file is part of HDF5. The full HDF5 copyright notice, including * ! terms governing use, modification, and redistribution, is contained in * -! the files COPYING and Copyright.html. COPYING can be found at the root * -! of the source code distribution tree; Copyright.html can be found at the * -! root level of an installed copy of the electronic HDF5 document set and * -! is linked from the top-level documents page. It can also be found at * -! http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * -! access to either file, you may request a copy from help@hdfgroup.org. * +! the COPYING file, which can be found at the root of the source code * +! distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * +! If you do not have access to either file, you may request a copy from * +! help@hdfgroup.org. * ! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ! ! diff --git a/hl/fortran/src/H5HL_buildiface.F90 b/hl/fortran/src/H5HL_buildiface.F90 index 15897c3..dda8d56 100644 --- a/hl/fortran/src/H5HL_buildiface.F90 +++ b/hl/fortran/src/H5HL_buildiface.F90 @@ -33,12 +33,10 @@ ! * ! This file is part of HDF5. The full HDF5 copyright notice, including * ! terms governing use, modification, and redistribution, is contained in * -! the files COPYING and Copyright.html. COPYING can be found at the root * -! of the source code distribution tree; Copyright.html can be found at the * -! root level of an installed copy of the electronic HDF5 document set and * -! is linked from the top-level documents page. It can also be found at * -! http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * -! access to either file, you may request a copy from help@hdfgroup.org. * +! the COPYING file, which can be found at the root of the source code * +! distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * +! If you do not have access to either file, you may request a copy from * +! help@hdfgroup.org. * ! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ! ! AUTHOR @@ -114,12 +112,10 @@ PROGRAM H5HL_buildiface '! *',& '! This file is part of HDF5. The full HDF5 copyright notice, including *',& '! terms governing use, modification, and redistribution, is contained in *',& -'! the files COPYING and Copyright.html. COPYING can be found at the root *',& -'! of the source code distribution tree; Copyright.html can be found at the *',& -'! root level of an installed copy of the electronic HDF5 document set and *',& -'! is linked from the top-level documents page. It can also be found at *',& -'! http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have *',& -'! access to either file, you may request a copy from help@hdfgroup.org. *',& +'! the COPYING file, which can be found at the root of the source code *',& +'! distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *',& +'! If you do not have access to either file, you may request a copy from *',& +'! help@hdfgroup.org. *',& '! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *',& '!',& '! AUTHOR',& @@ -584,12 +580,10 @@ PROGRAM H5HL_buildiface '! *',& '! This file is part of HDF5. The full HDF5 copyright notice, including *',& '! terms governing use, modification, and redistribution, is contained in *',& -'! the files COPYING and Copyright.html. COPYING can be found at the root *',& -'! of the source code distribution tree; Copyright.html can be found at the *',& -'! root level of an installed copy of the electronic HDF5 document set and *',& -'! is linked from the top-level documents page. It can also be found at *',& -'! http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have *',& -'! access to either file, you may request a copy from help@hdfgroup.org. *',& +'! the COPYING file, which can be found at the root of the source code *',& +'! distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *',& +'! If you do not have access to either file, you may request a copy from *',& +'! help@hdfgroup.org. *',& '! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *',& '!',& '! AUTHOR',& diff --git a/hl/fortran/src/H5IMcc.c b/hl/fortran/src/H5IMcc.c index ae58fab..78bf820 100644 --- a/hl/fortran/src/H5IMcc.c +++ b/hl/fortran/src/H5IMcc.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #include "H5IMcc.h" diff --git a/hl/fortran/src/H5IMcc.h b/hl/fortran/src/H5IMcc.h index 0b8a345..a65669d 100644 --- a/hl/fortran/src/H5IMcc.h +++ b/hl/fortran/src/H5IMcc.h @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #ifndef _H5IMCC_H diff --git a/hl/fortran/src/H5IMfc.c b/hl/fortran/src/H5IMfc.c index 7ad50d6..cafd623 100644 --- a/hl/fortran/src/H5IMfc.c +++ b/hl/fortran/src/H5IMfc.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * -* the files COPYING and Copyright.html. COPYING can be found at the root * -* of the source code distribution tree; Copyright.html can be found at the * -* root level of an installed copy of the electronic HDF5 document set and * -* is linked from the top-level documents page. It can also be found at * -* http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * -* access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* This files contains C stubs for H5D Fortran APIs */ diff --git a/hl/fortran/src/H5IMff.F90 b/hl/fortran/src/H5IMff.F90 index 4408dda..6646828 100644 --- a/hl/fortran/src/H5IMff.F90 +++ b/hl/fortran/src/H5IMff.F90 @@ -5,12 +5,10 @@ ! * ! This file is part of HDF5. The full HDF5 copyright notice, including * ! terms governing use, modification, and redistribution, is contained in * -! the files COPYING and Copyright.html. COPYING can be found at the root * -! of the source code distribution tree; Copyright.html can be found at the * -! root level of an installed copy of the electronic HDF5 document set and * -! is linked from the top-level documents page. It can also be found at * -! http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * -! access to either file, you may request a copy from help@hdfgroup.org. * +! the COPYING file, which can be found at the root of the source code * +! distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * +! If you do not have access to either file, you may request a copy from * +! help@hdfgroup.org. * ! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ! ! diff --git a/hl/fortran/src/H5LTf90proto.h b/hl/fortran/src/H5LTf90proto.h index 77f941e..35b08a1 100644 --- a/hl/fortran/src/H5LTf90proto.h +++ b/hl/fortran/src/H5LTf90proto.h @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * -* the files COPYING and Copyright.html. COPYING can be found at the root * -* of the source code distribution tree; Copyright.html can be found at the * -* root level of an installed copy of the electronic HDF5 document set and * -* is linked from the top-level documents page. It can also be found at * -* http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * -* access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ diff --git a/hl/fortran/src/H5LTfc.c b/hl/fortran/src/H5LTfc.c index a90c24b..0f8a58f 100644 --- a/hl/fortran/src/H5LTfc.c +++ b/hl/fortran/src/H5LTfc.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * -* the files COPYING and Copyright.html. COPYING can be found at the root * -* of the source code distribution tree; Copyright.html can be found at the * -* root level of an installed copy of the electronic HDF5 document set and * -* is linked from the top-level documents page. It can also be found at * -* http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * -* access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* This files contains C stubs for H5D Fortran APIs */ diff --git a/hl/fortran/src/H5LTff.F90 b/hl/fortran/src/H5LTff.F90 index 18c36f0..80f6ac5 100644 --- a/hl/fortran/src/H5LTff.F90 +++ b/hl/fortran/src/H5LTff.F90 @@ -5,12 +5,10 @@ ! * ! This file is part of HDF5. The full HDF5 copyright notice, including * ! terms governing use, modification, and redistribution, is contained in * -! the files COPYING and Copyright.html. COPYING can be found at the root * -! of the source code distribution tree; Copyright.html can be found at the * -! root level of an installed copy of the electronic HDF5 document set and * -! is linked from the top-level documents page. It can also be found at * -! http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * -! access to either file, you may request a copy from help@hdfgroup.org. * +! the COPYING file, which can be found at the root of the source code * +! distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * +! If you do not have access to either file, you may request a copy from * +! help@hdfgroup.org. * ! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ! ! diff --git a/hl/fortran/src/H5TBfc.c b/hl/fortran/src/H5TBfc.c index 2bb7c3b..c0d053f 100644 --- a/hl/fortran/src/H5TBfc.c +++ b/hl/fortran/src/H5TBfc.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * -* the files COPYING and Copyright.html. COPYING can be found at the root * -* of the source code distribution tree; Copyright.html can be found at the * -* root level of an installed copy of the electronic HDF5 document set and * -* is linked from the top-level documents page. It can also be found at * -* http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * -* access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #include diff --git a/hl/fortran/src/H5TBff.F90 b/hl/fortran/src/H5TBff.F90 index 5d1ee35..2575b24 100644 --- a/hl/fortran/src/H5TBff.F90 +++ b/hl/fortran/src/H5TBff.F90 @@ -5,12 +5,10 @@ ! * ! This file is part of HDF5. The full HDF5 copyright notice, including * ! terms governing use, modification, and redistribution, is contained in * -! the files COPYING and Copyright.html. COPYING can be found at the root * -! of the source code distribution tree; Copyright.html can be found at the * -! root level of an installed copy of the electronic HDF5 document set and * -! is linked from the top-level documents page. It can also be found at * -! http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * -! access to either file, you may request a copy from help@hdfgroup.org. * +! the COPYING file, which can be found at the root of the source code * +! distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * +! If you do not have access to either file, you may request a copy from * +! help@hdfgroup.org. * ! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ! ! diff --git a/hl/fortran/src/Makefile.am b/hl/fortran/src/Makefile.am index 7ac18cd..a495e220 100644 --- a/hl/fortran/src/Makefile.am +++ b/hl/fortran/src/Makefile.am @@ -5,12 +5,10 @@ # # This file is part of HDF5. The full HDF5 copyright notice, including # terms governing use, modification, and redistribution, is contained in -# the files COPYING and Copyright.html. COPYING can be found at the root -# of the source code distribution tree; Copyright.html can be found at the -# root level of an installed copy of the electronic HDF5 document set and -# is linked from the top-level documents page. It can also be found at -# http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have -# access to either file, you may request a copy from help@hdfgroup.org. +# the COPYING file, which can be found at the root of the source code +# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. +# If you do not have access to either file, you may request a copy from +# help@hdfgroup.org. # ## ## Makefile.am diff --git a/hl/fortran/test/Makefile.am b/hl/fortran/test/Makefile.am index 4013d39..ba672aa 100644 --- a/hl/fortran/test/Makefile.am +++ b/hl/fortran/test/Makefile.am @@ -5,12 +5,10 @@ # # This file is part of HDF5. The full HDF5 copyright notice, including # terms governing use, modification, and redistribution, is contained in -# the files COPYING and Copyright.html. COPYING can be found at the root -# of the source code distribution tree; Copyright.html can be found at the -# root level of an installed copy of the electronic HDF5 document set and -# is linked from the top-level documents page. It can also be found at -# http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have -# access to either file, you may request a copy from help@hdfgroup.org. +# the COPYING file, which can be found at the root of the source code +# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. +# If you do not have access to either file, you may request a copy from +# help@hdfgroup.org. # ## ## Makefile.am diff --git a/hl/fortran/test/tstds.F90 b/hl/fortran/test/tstds.F90 index f5df4ef..387f524 100644 --- a/hl/fortran/test/tstds.F90 +++ b/hl/fortran/test/tstds.F90 @@ -5,12 +5,10 @@ ! * * ! * This file is part of HDF5. The full HDF5 copyright notice, including * ! * terms governing use, modification, and redistribution, is contained in * -! * the files COPYING and Copyright.html. COPYING can be found at the root * -! * of the source code distribution tree; Copyright.html can be found at the * -! * root level of an installed copy of the electronic HDF5 document set and * -! * is linked from the top-level documents page. It can also be found at * -! * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * -! * access to either file, you may request a copy from help@hdfgroup.org. * +! the COPYING file, which can be found at the root of the source code * +! distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * +! If you do not have access to either file, you may request a copy from * +! help@hdfgroup.org. * ! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * MODULE TSTDS diff --git a/hl/fortran/test/tstimage.F90 b/hl/fortran/test/tstimage.F90 index 7e90664..d6bd1e2 100644 --- a/hl/fortran/test/tstimage.F90 +++ b/hl/fortran/test/tstimage.F90 @@ -5,12 +5,10 @@ ! * ! This file is part of HDF5. The full HDF5 copyright notice, including * ! terms governing use, modification, and redistribution, is contained in * -! the files COPYING and Copyright.html. COPYING can be found at the root * -! of the source code distribution tree; Copyright.html can be found at the * -! root level of an installed copy of the electronic HDF5 document set and * -! is linked from the top-level documents page. It can also be found at * -! http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * -! access to either file, you may request a copy from help@hdfgroup.org. * +! the COPYING file, which can be found at the root of the source code * +! distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * +! If you do not have access to either file, you may request a copy from * +! help@hdfgroup.org. * ! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ! ! diff --git a/hl/fortran/test/tstlite.F90 b/hl/fortran/test/tstlite.F90 index b19ca5a..673807b 100644 --- a/hl/fortran/test/tstlite.F90 +++ b/hl/fortran/test/tstlite.F90 @@ -5,12 +5,10 @@ ! * ! This file is part of HDF5. The full HDF5 copyright notice, including * ! terms governing use, modification, and redistribution, is contained in * -! the files COPYING and Copyright.html. COPYING can be found at the root * -! of the source code distribution tree; Copyright.html can be found at the * -! root level of an installed copy of the electronic HDF5 document set and * -! is linked from the top-level documents page. It can also be found at * -! http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * -! access to either file, you may request a copy from help@hdfgroup.org. * +! the COPYING file, which can be found at the root of the source code * +! distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * +! If you do not have access to either file, you may request a copy from * +! help@hdfgroup.org. * ! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ! ! diff --git a/hl/fortran/test/tsttable.F90 b/hl/fortran/test/tsttable.F90 index 3cf8fed..38cfa86 100644 --- a/hl/fortran/test/tsttable.F90 +++ b/hl/fortran/test/tsttable.F90 @@ -5,12 +5,10 @@ ! * ! This file is part of HDF5. The full HDF5 copyright notice, including * ! terms governing use, modification, and redistribution, is contained in * -! the files COPYING and Copyright.html. COPYING can be found at the root * -! of the source code distribution tree; Copyright.html can be found at the * -! root level of an installed copy of the electronic HDF5 document set and * -! is linked from the top-level documents page. It can also be found at * -! http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * -! access to either file, you may request a copy from help@hdfgroup.org. * +! the COPYING file, which can be found at the root of the source code * +! distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * +! If you do not have access to either file, you may request a copy from * +! help@hdfgroup.org. * ! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ! ! diff --git a/hl/src/H5DO.c b/hl/src/H5DO.c index e2b436a..8db6768 100644 --- a/hl/src/H5DO.c +++ b/hl/src/H5DO.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * -* the files COPYING and Copyright.html. COPYING can be found at the root * -* of the source code distribution tree; Copyright.html can be found at the * -* root level of an installed copy of the electronic HDF5 document set and * -* is linked from the top-level documents page. It can also be found at * -* http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * -* access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #include diff --git a/hl/src/H5DOpublic.h b/hl/src/H5DOpublic.h index 1e5eb7a..ce0d32e 100644 --- a/hl/src/H5DOpublic.h +++ b/hl/src/H5DOpublic.h @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #ifndef _H5DOpublic_H diff --git a/hl/src/H5DS.c b/hl/src/H5DS.c index de6e66c..527c92b 100644 --- a/hl/src/H5DS.c +++ b/hl/src/H5DS.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * -* the files COPYING and Copyright.html. COPYING can be found at the root * -* of the source code distribution tree; Copyright.html can be found at the * -* root level of an installed copy of the electronic HDF5 document set and * -* is linked from the top-level documents page. It can also be found at * -* http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * -* access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #include diff --git a/hl/src/H5DSprivate.h b/hl/src/H5DSprivate.h index 39c3e74..9d20d48 100644 --- a/hl/src/H5DSprivate.h +++ b/hl/src/H5DSprivate.h @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #ifndef _H5DSprivate_H diff --git a/hl/src/H5DSpublic.h b/hl/src/H5DSpublic.h index 85923f8..615122c 100644 --- a/hl/src/H5DSpublic.h +++ b/hl/src/H5DSpublic.h @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #ifndef _H5DSpublic_H diff --git a/hl/src/H5HLprivate2.h b/hl/src/H5HLprivate2.h index 1b67c70..45591e8 100644 --- a/hl/src/H5HLprivate2.h +++ b/hl/src/H5HLprivate2.h @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #ifndef _H5HLprivate2_H diff --git a/hl/src/H5IM.c b/hl/src/H5IM.c index 6d08f02..5eebb90 100644 --- a/hl/src/H5IM.c +++ b/hl/src/H5IM.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * -* the files COPYING and Copyright.html. COPYING can be found at the root * -* of the source code distribution tree; Copyright.html can be found at the * -* root level of an installed copy of the electronic HDF5 document set and * -* is linked from the top-level documents page. It can also be found at * -* http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * -* access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #include "H5IMprivate.h" diff --git a/hl/src/H5IMprivate.h b/hl/src/H5IMprivate.h index 0cb37cc..6776c9d 100644 --- a/hl/src/H5IMprivate.h +++ b/hl/src/H5IMprivate.h @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #ifndef _H5IMprivate_H diff --git a/hl/src/H5IMpublic.h b/hl/src/H5IMpublic.h index 6833f02..a95e439 100644 --- a/hl/src/H5IMpublic.h +++ b/hl/src/H5IMpublic.h @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #ifndef _H5IMpublic_H diff --git a/hl/src/H5LD.c b/hl/src/H5LD.c index 4abd740..1669a30 100644 --- a/hl/src/H5LD.c +++ b/hl/src/H5LD.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * -* the files COPYING and Copyright.html. COPYING can be found at the root * -* of the source code distribution tree; Copyright.html can be found at the * -* root level of an installed copy of the electronic HDF5 document set and * -* is linked from the top-level documents page. It can also be found at * -* http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * -* access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #include diff --git a/hl/src/H5LDprivate.h b/hl/src/H5LDprivate.h index 13e0710..b52928b 100644 --- a/hl/src/H5LDprivate.h +++ b/hl/src/H5LDprivate.h @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #ifndef _H5LDprivate_H diff --git a/hl/src/H5LDpublic.h b/hl/src/H5LDpublic.h index 4844d42..e2bb745 100644 --- a/hl/src/H5LDpublic.h +++ b/hl/src/H5LDpublic.h @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #ifndef _H5LDpublic_H diff --git a/hl/src/H5LT.c b/hl/src/H5LT.c index b7e0b4a..0074d02 100644 --- a/hl/src/H5LT.c +++ b/hl/src/H5LT.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * -* the files COPYING and Copyright.html. COPYING can be found at the root * -* of the source code distribution tree; Copyright.html can be found at the * -* root level of an installed copy of the electronic HDF5 document set and * -* is linked from the top-level documents page. It can also be found at * -* http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * -* access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #include diff --git a/hl/src/H5LTanalyze.c b/hl/src/H5LTanalyze.c index 022e24f..b6a7f58 100644 --- a/hl/src/H5LTanalyze.c +++ b/hl/src/H5LTanalyze.c @@ -883,12 +883,10 @@ char *H5LTyytext; * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* NOTE! * diff --git a/hl/src/H5LTanalyze.l b/hl/src/H5LTanalyze.l index a0c4f42..b9b492e 100644 --- a/hl/src/H5LTanalyze.l +++ b/hl/src/H5LTanalyze.l @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* NOTE! diff --git a/hl/src/H5LTparse.y b/hl/src/H5LTparse.y index 80dcc42..66a8556 100644 --- a/hl/src/H5LTparse.y +++ b/hl/src/H5LTparse.y @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* NOTE! diff --git a/hl/src/H5LTprivate.h b/hl/src/H5LTprivate.h index 98ac06e..01c5ee6 100644 --- a/hl/src/H5LTprivate.h +++ b/hl/src/H5LTprivate.h @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #ifndef _H5LTprivate_H diff --git a/hl/src/H5LTpublic.h b/hl/src/H5LTpublic.h index 929c6bd..47be98a 100644 --- a/hl/src/H5LTpublic.h +++ b/hl/src/H5LTpublic.h @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #ifndef _H5LTpublic_H diff --git a/hl/src/H5PT.c b/hl/src/H5PT.c index 5f0f94f..07d8bfb 100644 --- a/hl/src/H5PT.c +++ b/hl/src/H5PT.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #include diff --git a/hl/src/H5PTprivate.h b/hl/src/H5PTprivate.h index adc2fa9..eec9df7 100644 --- a/hl/src/H5PTprivate.h +++ b/hl/src/H5PTprivate.h @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #ifndef _H5PTprivate_H diff --git a/hl/src/H5PTpublic.h b/hl/src/H5PTpublic.h index 420275a..8a12c8c 100644 --- a/hl/src/H5PTpublic.h +++ b/hl/src/H5PTpublic.h @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #ifndef _H5PTpublic_H diff --git a/hl/src/H5TB.c b/hl/src/H5TB.c index bcd3339..a4bcbd4 100644 --- a/hl/src/H5TB.c +++ b/hl/src/H5TB.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * -* the files COPYING and Copyright.html. COPYING can be found at the root * -* of the source code distribution tree; Copyright.html can be found at the * -* root level of an installed copy of the electronic HDF5 document set and * -* is linked from the top-level documents page. It can also be found at * -* http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * -* access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #include diff --git a/hl/src/H5TBprivate.h b/hl/src/H5TBprivate.h index e2b668d..17306fb 100644 --- a/hl/src/H5TBprivate.h +++ b/hl/src/H5TBprivate.h @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #ifndef _H5TBprivate_H diff --git a/hl/src/H5TBpublic.h b/hl/src/H5TBpublic.h index 874ef20..56aa915 100644 --- a/hl/src/H5TBpublic.h +++ b/hl/src/H5TBpublic.h @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #ifndef _H5TBpublic_H diff --git a/hl/src/Makefile.am b/hl/src/Makefile.am index fef3450..4ef1f5f 100644 --- a/hl/src/Makefile.am +++ b/hl/src/Makefile.am @@ -5,12 +5,10 @@ # # This file is part of HDF5. The full HDF5 copyright notice, including # terms governing use, modification, and redistribution, is contained in -# the files COPYING and Copyright.html. COPYING can be found at the root -# of the source code distribution tree; Copyright.html can be found at the -# root level of an installed copy of the electronic HDF5 document set and -# is linked from the top-level documents page. It can also be found at -# http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have -# access to either file, you may request a copy from help@hdfgroup.org. +# the COPYING file, which can be found at the root of the source code +# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. +# If you do not have access to either file, you may request a copy from +# help@hdfgroup.org. ## ## Makefile.am ## Run automake to generate a Makefile.in from this file. diff --git a/hl/src/hdf5_hl.h b/hl/src/hdf5_hl.h index f55aa04..3a7b8ee 100644 --- a/hl/src/hdf5_hl.h +++ b/hl/src/hdf5_hl.h @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* diff --git a/hl/test/H5srcdir_str.h.in b/hl/test/H5srcdir_str.h.in index d472124..bab1df3 100644 --- a/hl/test/H5srcdir_str.h.in +++ b/hl/test/H5srcdir_str.h.in @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* If you are reading this file and it has a '.h' suffix, it was automatically diff --git a/hl/test/Makefile.am b/hl/test/Makefile.am index 80a7802..e16550f 100644 --- a/hl/test/Makefile.am +++ b/hl/test/Makefile.am @@ -4,12 +4,10 @@ # # This file is part of HDF5. The full HDF5 copyright notice, including # terms governing use, modification, and redistribution, is contained in -# the files COPYING and Copyright.html. COPYING can be found at the root -# of the source code distribution tree; Copyright.html can be found at the -# root level of an installed copy of the electronic HDF5 document set and -# is linked from the top-level documents page. It can also be found at -# http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have -# access to either file, you may request a copy from help@hdfgroup.org. +# the COPYING file, which can be found at the root of the source code +# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. +# If you do not have access to either file, you may request a copy from +# help@hdfgroup.org. # # ## Makefile.am diff --git a/hl/test/dectris_hl_perf.c b/hl/test/dectris_hl_perf.c index 008bd92..13cfac8 100644 --- a/hl/test/dectris_hl_perf.c +++ b/hl/test/dectris_hl_perf.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* diff --git a/hl/test/gen_test_ds.c b/hl/test/gen_test_ds.c index 2fc8140..f8f1d39 100644 --- a/hl/test/gen_test_ds.c +++ b/hl/test/gen_test_ds.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* diff --git a/hl/test/h5hltest.h b/hl/test/h5hltest.h index 9a5e702..f368b8e 100644 --- a/hl/test/h5hltest.h +++ b/hl/test/h5hltest.h @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* diff --git a/hl/test/pal_rgb.h b/hl/test/pal_rgb.h index 9610258..4b22bea 100644 --- a/hl/test/pal_rgb.h +++ b/hl/test/pal_rgb.h @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ const unsigned char pal_rgb[256*3] = {255,255,255, diff --git a/hl/test/test_ds.c b/hl/test/test_ds.c index 091a98b..91f1505 100644 --- a/hl/test/test_ds.c +++ b/hl/test/test_ds.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #include diff --git a/hl/test/test_dset_append.c b/hl/test/test_dset_append.c index a5c9abc..d890481 100644 --- a/hl/test/test_dset_append.c +++ b/hl/test/test_dset_append.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * -* the files COPYING and Copyright.html. COPYING can be found at the root * -* of the source code distribution tree; Copyright.html can be found at the * -* root level of an installed copy of the electronic HDF5 document set and * -* is linked from the top-level documents page. It can also be found at * -* http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * -* access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #include diff --git a/hl/test/test_dset_opt.c b/hl/test/test_dset_opt.c index b03ab44..03c467a 100644 --- a/hl/test/test_dset_opt.c +++ b/hl/test/test_dset_opt.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * -* the files COPYING and Copyright.html. COPYING can be found at the root * -* of the source code distribution tree; Copyright.html can be found at the * -* root level of an installed copy of the electronic HDF5 document set and * -* is linked from the top-level documents page. It can also be found at * -* http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * -* access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #include diff --git a/hl/test/test_file_image.c b/hl/test/test_file_image.c index 6ff5bf4..a98642c 100644 --- a/hl/test/test_file_image.c +++ b/hl/test/test_file_image.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * -* the files COPYING and Copyright.html. COPYING can be found at the root * -* of the source code distribution tree; Copyright.html can be found at the * -* root level of an installed copy of the electronic HDF5 document set and * -* is linked from the top-level documents page. It can also be found at * -* http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * -* access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #include "h5hltest.h" diff --git a/hl/test/test_image.c b/hl/test/test_image.c index 8bc6f95..c30b572 100644 --- a/hl/test/test_image.c +++ b/hl/test/test_image.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * -* the files COPYING and Copyright.html. COPYING can be found at the root * -* of the source code distribution tree; Copyright.html can be found at the * -* root level of an installed copy of the electronic HDF5 document set and * -* is linked from the top-level documents page. It can also be found at * -* http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * -* access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #include diff --git a/hl/test/test_ld.c b/hl/test/test_ld.c index df721e6..12a226a 100644 --- a/hl/test/test_ld.c +++ b/hl/test/test_ld.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * -* the files COPYING and Copyright.html. COPYING can be found at the root * -* of the source code distribution tree; Copyright.html can be found at the * -* root level of an installed copy of the electronic HDF5 document set and * -* is linked from the top-level documents page. It can also be found at * -* http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * -* access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #include diff --git a/hl/test/test_lite.c b/hl/test/test_lite.c index 6cadd95..763fdb5 100644 --- a/hl/test/test_lite.c +++ b/hl/test/test_lite.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * -* the files COPYING and Copyright.html. COPYING can be found at the root * -* of the source code distribution tree; Copyright.html can be found at the * -* root level of an installed copy of the electronic HDF5 document set and * -* is linked from the top-level documents page. It can also be found at * -* http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * -* access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #include diff --git a/hl/test/test_packet.c b/hl/test/test_packet.c index f577947..7003b26 100644 --- a/hl/test/test_packet.c +++ b/hl/test/test_packet.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #include diff --git a/hl/test/test_packet_vlen.c b/hl/test/test_packet_vlen.c index b152a2c..35bd43a 100644 --- a/hl/test/test_packet_vlen.c +++ b/hl/test/test_packet_vlen.c @@ -4,12 +4,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #include "h5hltest.h" diff --git a/hl/test/test_table.c b/hl/test/test_table.c index c9c3c19..0215697 100644 --- a/hl/test/test_table.c +++ b/hl/test/test_table.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * -* the files COPYING and Copyright.html. COPYING can be found at the root * -* of the source code distribution tree; Copyright.html can be found at the * -* root level of an installed copy of the electronic HDF5 document set and * -* is linked from the top-level documents page. It can also be found at * -* http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * -* access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #include diff --git a/hl/tools/Makefile.am b/hl/tools/Makefile.am index 090c4a6..5d814df 100644 --- a/hl/tools/Makefile.am +++ b/hl/tools/Makefile.am @@ -5,12 +5,10 @@ # # This file is part of HDF5. The full HDF5 copyright notice, including # terms governing use, modification, and redistribution, is contained in -# the files COPYING and Copyright.html. COPYING can be found at the root -# of the source code distribution tree; Copyright.html can be found at the -# root level of an installed copy of the electronic HDF5 document set and -# is linked from the top-level documents page. It can also be found at -# http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have -# access to either file, you may request a copy from help@hdfgroup.org. +# the COPYING file, which can be found at the root of the source code +# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. +# If you do not have access to either file, you may request a copy from +# help@hdfgroup.org. ## ## Makefile.am ## Run automake to generate a Makefile.in from this file. diff --git a/hl/tools/gif2h5/Makefile.am b/hl/tools/gif2h5/Makefile.am index c82485e..d30d66a 100644 --- a/hl/tools/gif2h5/Makefile.am +++ b/hl/tools/gif2h5/Makefile.am @@ -5,12 +5,10 @@ # # This file is part of HDF5. The full HDF5 copyright notice, including # terms governing use, modification, and redistribution, is contained in -# the files COPYING and Copyright.html. COPYING can be found at the root -# of the source code distribution tree; Copyright.html can be found at the -# root level of an installed copy of the electronic HDF5 document set and -# is linked from the top-level documents page. It can also be found at -# http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have -# access to either file, you may request a copy from help@hdfgroup.org. +# the COPYING file, which can be found at the root of the source code +# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. +# If you do not have access to either file, you may request a copy from +# help@hdfgroup.org. ## ## Makefile.am ## Run automake to generate a Makefile.in from this file. diff --git a/hl/tools/gif2h5/decompress.c b/hl/tools/gif2h5/decompress.c index ef2d78a..453db12 100644 --- a/hl/tools/gif2h5/decompress.c +++ b/hl/tools/gif2h5/decompress.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #include #include diff --git a/hl/tools/gif2h5/gif.h b/hl/tools/gif2h5/gif.h index f34a111..ed1cc81 100644 --- a/hl/tools/gif2h5/gif.h +++ b/hl/tools/gif2h5/gif.h @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* diff --git a/hl/tools/gif2h5/gif2hdf.c b/hl/tools/gif2h5/gif2hdf.c index 8a9e971..2e06d34 100644 --- a/hl/tools/gif2h5/gif2hdf.c +++ b/hl/tools/gif2h5/gif2hdf.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #include #include diff --git a/hl/tools/gif2h5/gif2mem.c b/hl/tools/gif2h5/gif2mem.c index 456a32d..40b5583 100644 --- a/hl/tools/gif2h5/gif2mem.c +++ b/hl/tools/gif2h5/gif2mem.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* diff --git a/hl/tools/gif2h5/gifread.c b/hl/tools/gif2h5/gifread.c index 2b4c129..948e112 100644 --- a/hl/tools/gif2h5/gifread.c +++ b/hl/tools/gif2h5/gifread.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #include #include diff --git a/hl/tools/gif2h5/h52gifgentst.c b/hl/tools/gif2h5/h52gifgentst.c index 39e950b..655563c 100644 --- a/hl/tools/gif2h5/h52gifgentst.c +++ b/hl/tools/gif2h5/h52gifgentst.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #include diff --git a/hl/tools/gif2h5/h52giftest.sh.in b/hl/tools/gif2h5/h52giftest.sh.in index 90931f2..5643e30 100644 --- a/hl/tools/gif2h5/h52giftest.sh.in +++ b/hl/tools/gif2h5/h52giftest.sh.in @@ -6,12 +6,10 @@ # # This file is part of HDF5. The full HDF5 copyright notice, including # terms governing use, modification, and redistribution, is contained in -# the files COPYING and Copyright.html. COPYING can be found at the root -# of the source code distribution tree; Copyright.html can be found at the -# root level of an installed copy of the electronic HDF5 document set and -# is linked from the top-level documents page. It can also be found at -# http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have -# access to either file, you may request a copy from help@hdfgroup.org. +# the COPYING file, which can be found at the root of the source code +# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. +# If you do not have access to either file, you may request a copy from +# help@hdfgroup.org. # # HDF Utilities Test script diff --git a/hl/tools/gif2h5/hdf2gif.c b/hl/tools/gif2h5/hdf2gif.c index 8ed05df..ae63e92 100644 --- a/hl/tools/gif2h5/hdf2gif.c +++ b/hl/tools/gif2h5/hdf2gif.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #include diff --git a/hl/tools/gif2h5/hdfgifwr.c b/hl/tools/gif2h5/hdfgifwr.c index 4c52f4c..6f5ab58 100644 --- a/hl/tools/gif2h5/hdfgifwr.c +++ b/hl/tools/gif2h5/hdfgifwr.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* diff --git a/hl/tools/gif2h5/writehdf.c b/hl/tools/gif2h5/writehdf.c index b4cca67..b656c36 100644 --- a/hl/tools/gif2h5/writehdf.c +++ b/hl/tools/gif2h5/writehdf.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #include #include diff --git a/hl/tools/h5watch/Makefile.am b/hl/tools/h5watch/Makefile.am index b017e09..c60fceb 100644 --- a/hl/tools/h5watch/Makefile.am +++ b/hl/tools/h5watch/Makefile.am @@ -5,12 +5,10 @@ # # This file is part of HDF5. The full HDF5 copyright notice, including # terms governing use, modification, and redistribution, is contained in -# the files COPYING and Copyright.html. COPYING can be found at the root -# of the source code distribution tree; Copyright.html can be found at the -# root level of an installed copy of the electronic HDF5 document set and -# is linked from the top-level documents page. It can also be found at -# http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have -# access to either file, you may request a copy from help@hdfgroup.org. +# the COPYING file, which can be found at the root of the source code +# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. +# If you do not have access to either file, you may request a copy from +# help@hdfgroup.org. ## ## Makefile.am ## Run automake to generate a Makefile.in from this file. diff --git a/hl/tools/h5watch/extend_dset.c b/hl/tools/h5watch/extend_dset.c index f6b4161..59c4a26 100644 --- a/hl/tools/h5watch/extend_dset.c +++ b/hl/tools/h5watch/extend_dset.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #include "h5hltest.h" diff --git a/hl/tools/h5watch/h5watch.c b/hl/tools/h5watch/h5watch.c index f37b2b4..cfa6258 100644 --- a/hl/tools/h5watch/h5watch.c +++ b/hl/tools/h5watch/h5watch.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #include "h5tools.h" diff --git a/hl/tools/h5watch/h5watchgentest.c b/hl/tools/h5watch/h5watchgentest.c index 12298ca..c5b76de 100644 --- a/hl/tools/h5watch/h5watchgentest.c +++ b/hl/tools/h5watch/h5watchgentest.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #include "hdf5.h" diff --git a/hl/tools/h5watch/swmr_check_compat_vfd.c b/hl/tools/h5watch/swmr_check_compat_vfd.c index 87b87c4..7d11a73 100644 --- a/hl/tools/h5watch/swmr_check_compat_vfd.c +++ b/hl/tools/h5watch/swmr_check_compat_vfd.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* Purpose: This is a small program that checks if the HDF5_DRIVER diff --git a/hl/tools/h5watch/testh5watch.sh.in b/hl/tools/h5watch/testh5watch.sh.in index 02f155f..3bd4381 100644 --- a/hl/tools/h5watch/testh5watch.sh.in +++ b/hl/tools/h5watch/testh5watch.sh.in @@ -6,12 +6,10 @@ # # This file is part of HDF5. The full HDF5 copyright notice, including # terms governing use, modification, and redistribution, is contained in -# the files COPYING and Copyright.html. COPYING can be found at the root -# of the source code distribution tree; Copyright.html can be found at the -# root level of an installed copy of the electronic HDF5 document set and -# is linked from the top-level documents page. It can also be found at -# http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have -# access to either file, you may request a copy from help@hdfgroup.org. +# the COPYING file, which can be found at the root of the source code +# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. +# If you do not have access to either file, you may request a copy from +# help@hdfgroup.org. # # Tests for the h5watch tool # diff --git a/java/Makefile.am b/java/Makefile.am index 10b1e91..7d0e2f0 100644 --- a/java/Makefile.am +++ b/java/Makefile.am @@ -5,12 +5,10 @@ # # This file is part of HDF5. The full HDF5 copyright notice, including # terms governing use, modification, and redistribution, is contained in -# the files COPYING and Copyright.html. COPYING can be found at the root -# of the source code distribution tree; Copyright.html can be found at the -# root level of an installed copy of the electronic HDF5 document set and -# is linked from the top-level documents page. It can also be found at -# http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have -# access to either file, you may request a copy from help@hdfgroup.org. +# the COPYING file, which can be found at the root of the source code +# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. +# If you do not have access to either file, you may request a copy from +# help@hdfgroup.org. # # # This makefile mostly just reinvokes make in the various subdirectories diff --git a/java/examples/Makefile.am b/java/examples/Makefile.am index e685e01..8ca49f2 100644 --- a/java/examples/Makefile.am +++ b/java/examples/Makefile.am @@ -5,12 +5,10 @@ # # This file is part of HDF5. The full HDF5 copyright notice, including # terms governing use, modification, and redistribution, is contained in -# the files COPYING and Copyright.html. COPYING can be found at the root -# of the source code distribution tree; Copyright.html can be found at the -# root level of an installed copy of the electronic HDF5 document set and -# is linked from the top-level documents page. It can also be found at -# http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have -# access to either file, you may request a copy from help@hdfgroup.org. +# the COPYING file, which can be found at the root of the source code +# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. +# If you do not have access to either file, you may request a copy from +# help@hdfgroup.org. # # # This makefile mostly just reinvokes make in the various subdirectories diff --git a/java/examples/datasets/H5Ex_D_Alloc.java b/java/examples/datasets/H5Ex_D_Alloc.java index 69fee38..e40c042 100644 --- a/java/examples/datasets/H5Ex_D_Alloc.java +++ b/java/examples/datasets/H5Ex_D_Alloc.java @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /************************************************************ diff --git a/java/examples/datasets/H5Ex_D_Checksum.java b/java/examples/datasets/H5Ex_D_Checksum.java index 3a2f98f..9de09be 100644 --- a/java/examples/datasets/H5Ex_D_Checksum.java +++ b/java/examples/datasets/H5Ex_D_Checksum.java @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /************************************************************ diff --git a/java/examples/datasets/H5Ex_D_Chunk.java b/java/examples/datasets/H5Ex_D_Chunk.java index b12b227..3d61e26 100644 --- a/java/examples/datasets/H5Ex_D_Chunk.java +++ b/java/examples/datasets/H5Ex_D_Chunk.java @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /************************************************************ diff --git a/java/examples/datasets/H5Ex_D_Compact.java b/java/examples/datasets/H5Ex_D_Compact.java index 0417c7c..17c09f5 100644 --- a/java/examples/datasets/H5Ex_D_Compact.java +++ b/java/examples/datasets/H5Ex_D_Compact.java @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /************************************************************ diff --git a/java/examples/datasets/H5Ex_D_External.java b/java/examples/datasets/H5Ex_D_External.java index 5fdc696..bf413ba 100644 --- a/java/examples/datasets/H5Ex_D_External.java +++ b/java/examples/datasets/H5Ex_D_External.java @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /************************************************************ diff --git a/java/examples/datasets/H5Ex_D_FillValue.java b/java/examples/datasets/H5Ex_D_FillValue.java index 982d2cb..29cf4e1 100644 --- a/java/examples/datasets/H5Ex_D_FillValue.java +++ b/java/examples/datasets/H5Ex_D_FillValue.java @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /************************************************************ diff --git a/java/examples/datasets/H5Ex_D_Gzip.java b/java/examples/datasets/H5Ex_D_Gzip.java index b813367..50f8835 100644 --- a/java/examples/datasets/H5Ex_D_Gzip.java +++ b/java/examples/datasets/H5Ex_D_Gzip.java @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /************************************************************ diff --git a/java/examples/datasets/H5Ex_D_Hyperslab.java b/java/examples/datasets/H5Ex_D_Hyperslab.java index 482e2c0..88aa36e 100644 --- a/java/examples/datasets/H5Ex_D_Hyperslab.java +++ b/java/examples/datasets/H5Ex_D_Hyperslab.java @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /************************************************************ diff --git a/java/examples/datasets/H5Ex_D_Nbit.java b/java/examples/datasets/H5Ex_D_Nbit.java index f74b675..0263659 100644 --- a/java/examples/datasets/H5Ex_D_Nbit.java +++ b/java/examples/datasets/H5Ex_D_Nbit.java @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /************************************************************ diff --git a/java/examples/datasets/H5Ex_D_ReadWrite.java b/java/examples/datasets/H5Ex_D_ReadWrite.java index de94ccb..49bc2e5 100644 --- a/java/examples/datasets/H5Ex_D_ReadWrite.java +++ b/java/examples/datasets/H5Ex_D_ReadWrite.java @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /************************************************************ diff --git a/java/examples/datasets/H5Ex_D_Shuffle.java b/java/examples/datasets/H5Ex_D_Shuffle.java index ac3c1b4..c7b7c53 100644 --- a/java/examples/datasets/H5Ex_D_Shuffle.java +++ b/java/examples/datasets/H5Ex_D_Shuffle.java @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /************************************************************ diff --git a/java/examples/datasets/H5Ex_D_Sofloat.java b/java/examples/datasets/H5Ex_D_Sofloat.java index 26c8d49..f0a437d 100644 --- a/java/examples/datasets/H5Ex_D_Sofloat.java +++ b/java/examples/datasets/H5Ex_D_Sofloat.java @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /************************************************************ diff --git a/java/examples/datasets/H5Ex_D_Soint.java b/java/examples/datasets/H5Ex_D_Soint.java index 7939883..fa4b416 100644 --- a/java/examples/datasets/H5Ex_D_Soint.java +++ b/java/examples/datasets/H5Ex_D_Soint.java @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /************************************************************ diff --git a/java/examples/datasets/H5Ex_D_Szip.java b/java/examples/datasets/H5Ex_D_Szip.java index 5258234..8106557 100644 --- a/java/examples/datasets/H5Ex_D_Szip.java +++ b/java/examples/datasets/H5Ex_D_Szip.java @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /************************************************************ diff --git a/java/examples/datasets/H5Ex_D_Transform.java b/java/examples/datasets/H5Ex_D_Transform.java index 1f289f3..ada488a 100644 --- a/java/examples/datasets/H5Ex_D_Transform.java +++ b/java/examples/datasets/H5Ex_D_Transform.java @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /************************************************************ diff --git a/java/examples/datasets/H5Ex_D_UnlimitedAdd.java b/java/examples/datasets/H5Ex_D_UnlimitedAdd.java index ada8df0..7e8ffaa 100644 --- a/java/examples/datasets/H5Ex_D_UnlimitedAdd.java +++ b/java/examples/datasets/H5Ex_D_UnlimitedAdd.java @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /************************************************************ diff --git a/java/examples/datasets/H5Ex_D_UnlimitedGzip.java b/java/examples/datasets/H5Ex_D_UnlimitedGzip.java index c08ceef..42a6efd 100644 --- a/java/examples/datasets/H5Ex_D_UnlimitedGzip.java +++ b/java/examples/datasets/H5Ex_D_UnlimitedGzip.java @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /************************************************************ diff --git a/java/examples/datasets/H5Ex_D_UnlimitedMod.java b/java/examples/datasets/H5Ex_D_UnlimitedMod.java index 884cad3..b38b233 100644 --- a/java/examples/datasets/H5Ex_D_UnlimitedMod.java +++ b/java/examples/datasets/H5Ex_D_UnlimitedMod.java @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /************************************************************ diff --git a/java/examples/datasets/Makefile.am b/java/examples/datasets/Makefile.am index 41ba6d1..18100a6 100644 --- a/java/examples/datasets/Makefile.am +++ b/java/examples/datasets/Makefile.am @@ -5,12 +5,10 @@ # # This file is part of HDF5. The full HDF5 copyright notice, including # terms governing use, modification, and redistribution, is contained in -# the files COPYING and Copyright.html. COPYING can be found at the root -# of the source code distribution tree; Copyright.html can be found at the -# root level of an installed copy of the electronic HDF5 document set and -# is linked from the top-level documents page. It can also be found at -# http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have -# access to either file, you may request a copy from help@hdfgroup.org. +# the COPYING file, which can be found at the root of the source code +# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. +# If you do not have access to either file, you may request a copy from +# help@hdfgroup.org. ## ## Makefile.am ## Run automake to generate a Makefile.in from this file. diff --git a/java/examples/datasets/runExample.sh.in b/java/examples/datasets/runExample.sh.in index 53d8070..21c3439 100644 --- a/java/examples/datasets/runExample.sh.in +++ b/java/examples/datasets/runExample.sh.in @@ -6,12 +6,10 @@ # # This file is part of HDF5. The full HDF5 copyright notice, including # terms governing use, modification, and redistribution, is contained in -# the files COPYING and Copyright.html. COPYING can be found at the root -# of the source code distribution tree; Copyright.html can be found at the -# root level of an installed copy of the electronic HDF5 document set and -# is linked from the top-level documents page. It can also be found at -# http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have -# access to either file, you may request a copy from help@hdfgroup.org. +# the COPYING file, which can be found at the root of the source code +# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. +# If you do not have access to either file, you may request a copy from +# help@hdfgroup.org. # top_builddir=@top_builddir@ diff --git a/java/examples/datatypes/H5Ex_T_Array.java b/java/examples/datatypes/H5Ex_T_Array.java index 7b7009a..f7f58d2 100644 --- a/java/examples/datatypes/H5Ex_T_Array.java +++ b/java/examples/datatypes/H5Ex_T_Array.java @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /************************************************************ diff --git a/java/examples/datatypes/H5Ex_T_ArrayAttribute.java b/java/examples/datatypes/H5Ex_T_ArrayAttribute.java index ce97457..b571f0c 100644 --- a/java/examples/datatypes/H5Ex_T_ArrayAttribute.java +++ b/java/examples/datatypes/H5Ex_T_ArrayAttribute.java @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /************************************************************ diff --git a/java/examples/datatypes/H5Ex_T_Bit.java b/java/examples/datatypes/H5Ex_T_Bit.java index f76c7d5..e46f3b2 100644 --- a/java/examples/datatypes/H5Ex_T_Bit.java +++ b/java/examples/datatypes/H5Ex_T_Bit.java @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /************************************************************ diff --git a/java/examples/datatypes/H5Ex_T_BitAttribute.java b/java/examples/datatypes/H5Ex_T_BitAttribute.java index a5ab81b..43de4ea 100644 --- a/java/examples/datatypes/H5Ex_T_BitAttribute.java +++ b/java/examples/datatypes/H5Ex_T_BitAttribute.java @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /************************************************************ diff --git a/java/examples/datatypes/H5Ex_T_Commit.java b/java/examples/datatypes/H5Ex_T_Commit.java index d4e43f9..4108979 100644 --- a/java/examples/datatypes/H5Ex_T_Commit.java +++ b/java/examples/datatypes/H5Ex_T_Commit.java @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /************************************************************ diff --git a/java/examples/datatypes/H5Ex_T_Compound.java b/java/examples/datatypes/H5Ex_T_Compound.java index f270cb9..c021c18 100644 --- a/java/examples/datatypes/H5Ex_T_Compound.java +++ b/java/examples/datatypes/H5Ex_T_Compound.java @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /************************************************************ diff --git a/java/examples/datatypes/H5Ex_T_CompoundAttribute.java b/java/examples/datatypes/H5Ex_T_CompoundAttribute.java index 25581d4..971939a 100644 --- a/java/examples/datatypes/H5Ex_T_CompoundAttribute.java +++ b/java/examples/datatypes/H5Ex_T_CompoundAttribute.java @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /************************************************************ diff --git a/java/examples/datatypes/H5Ex_T_Float.java b/java/examples/datatypes/H5Ex_T_Float.java index 1b5fd9b..f677479 100644 --- a/java/examples/datatypes/H5Ex_T_Float.java +++ b/java/examples/datatypes/H5Ex_T_Float.java @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /************************************************************ diff --git a/java/examples/datatypes/H5Ex_T_FloatAttribute.java b/java/examples/datatypes/H5Ex_T_FloatAttribute.java index de1dac7..2e706d9 100644 --- a/java/examples/datatypes/H5Ex_T_FloatAttribute.java +++ b/java/examples/datatypes/H5Ex_T_FloatAttribute.java @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /************************************************************ diff --git a/java/examples/datatypes/H5Ex_T_Integer.java b/java/examples/datatypes/H5Ex_T_Integer.java index 2f365cd..56da623 100644 --- a/java/examples/datatypes/H5Ex_T_Integer.java +++ b/java/examples/datatypes/H5Ex_T_Integer.java @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /************************************************************ diff --git a/java/examples/datatypes/H5Ex_T_IntegerAttribute.java b/java/examples/datatypes/H5Ex_T_IntegerAttribute.java index c153d99..9de517c 100644 --- a/java/examples/datatypes/H5Ex_T_IntegerAttribute.java +++ b/java/examples/datatypes/H5Ex_T_IntegerAttribute.java @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /************************************************************ diff --git a/java/examples/datatypes/H5Ex_T_ObjectReference.java b/java/examples/datatypes/H5Ex_T_ObjectReference.java index 8a09f5b..8ce4f7b 100644 --- a/java/examples/datatypes/H5Ex_T_ObjectReference.java +++ b/java/examples/datatypes/H5Ex_T_ObjectReference.java @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /************************************************************ diff --git a/java/examples/datatypes/H5Ex_T_ObjectReferenceAttribute.java b/java/examples/datatypes/H5Ex_T_ObjectReferenceAttribute.java index e366681..4dc3677 100644 --- a/java/examples/datatypes/H5Ex_T_ObjectReferenceAttribute.java +++ b/java/examples/datatypes/H5Ex_T_ObjectReferenceAttribute.java @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /************************************************************ diff --git a/java/examples/datatypes/H5Ex_T_Opaque.java b/java/examples/datatypes/H5Ex_T_Opaque.java index eb45686..6b0dc63 100644 --- a/java/examples/datatypes/H5Ex_T_Opaque.java +++ b/java/examples/datatypes/H5Ex_T_Opaque.java @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /************************************************************ diff --git a/java/examples/datatypes/H5Ex_T_OpaqueAttribute.java b/java/examples/datatypes/H5Ex_T_OpaqueAttribute.java index e42bfe8..6b8d1f8 100644 --- a/java/examples/datatypes/H5Ex_T_OpaqueAttribute.java +++ b/java/examples/datatypes/H5Ex_T_OpaqueAttribute.java @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /************************************************************ diff --git a/java/examples/datatypes/H5Ex_T_String.java b/java/examples/datatypes/H5Ex_T_String.java index 469172d..7c190b7 100644 --- a/java/examples/datatypes/H5Ex_T_String.java +++ b/java/examples/datatypes/H5Ex_T_String.java @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /************************************************************ diff --git a/java/examples/datatypes/H5Ex_T_StringAttribute.java b/java/examples/datatypes/H5Ex_T_StringAttribute.java index 49361bc..f9ec155 100644 --- a/java/examples/datatypes/H5Ex_T_StringAttribute.java +++ b/java/examples/datatypes/H5Ex_T_StringAttribute.java @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /************************************************************ diff --git a/java/examples/datatypes/H5Ex_T_VLString.java b/java/examples/datatypes/H5Ex_T_VLString.java index c8892ba..39be3e5 100644 --- a/java/examples/datatypes/H5Ex_T_VLString.java +++ b/java/examples/datatypes/H5Ex_T_VLString.java @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /************************************************************ diff --git a/java/examples/datatypes/Makefile.am b/java/examples/datatypes/Makefile.am index 7d95a56..71f7769 100644 --- a/java/examples/datatypes/Makefile.am +++ b/java/examples/datatypes/Makefile.am @@ -5,12 +5,10 @@ # # This file is part of HDF5. The full HDF5 copyright notice, including # terms governing use, modification, and redistribution, is contained in -# the files COPYING and Copyright.html. COPYING can be found at the root -# of the source code distribution tree; Copyright.html can be found at the -# root level of an installed copy of the electronic HDF5 document set and -# is linked from the top-level documents page. It can also be found at -# http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have -# access to either file, you may request a copy from help@hdfgroup.org. +# the COPYING file, which can be found at the root of the source code +# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. +# If you do not have access to either file, you may request a copy from +# help@hdfgroup.org. ## ## Makefile.am ## Run automake to generate a Makefile.in from this file. diff --git a/java/examples/datatypes/runExample.sh.in b/java/examples/datatypes/runExample.sh.in index 5b8816c..32e9ade 100644 --- a/java/examples/datatypes/runExample.sh.in +++ b/java/examples/datatypes/runExample.sh.in @@ -6,12 +6,10 @@ # # This file is part of HDF5. The full HDF5 copyright notice, including # terms governing use, modification, and redistribution, is contained in -# the files COPYING and Copyright.html. COPYING can be found at the root -# of the source code distribution tree; Copyright.html can be found at the -# root level of an installed copy of the electronic HDF5 document set and -# is linked from the top-level documents page. It can also be found at -# http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have -# access to either file, you may request a copy from help@hdfgroup.org. +# the COPYING file, which can be found at the root of the source code +# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. +# If you do not have access to either file, you may request a copy from +# help@hdfgroup.org. # top_builddir=@top_builddir@ diff --git a/java/examples/groups/H5Ex_G_Compact.java b/java/examples/groups/H5Ex_G_Compact.java index ca9b6c8..7e20c2a 100644 --- a/java/examples/groups/H5Ex_G_Compact.java +++ b/java/examples/groups/H5Ex_G_Compact.java @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /************************************************************ diff --git a/java/examples/groups/H5Ex_G_Corder.java b/java/examples/groups/H5Ex_G_Corder.java index 95790bf..53d0011 100644 --- a/java/examples/groups/H5Ex_G_Corder.java +++ b/java/examples/groups/H5Ex_G_Corder.java @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /************************************************************ Creating a file with creation properties and traverse the diff --git a/java/examples/groups/H5Ex_G_Create.java b/java/examples/groups/H5Ex_G_Create.java index 1902d86..0e729d5 100644 --- a/java/examples/groups/H5Ex_G_Create.java +++ b/java/examples/groups/H5Ex_G_Create.java @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /************************************************************ diff --git a/java/examples/groups/H5Ex_G_Intermediate.java b/java/examples/groups/H5Ex_G_Intermediate.java index a3d620b..f7d5a50 100644 --- a/java/examples/groups/H5Ex_G_Intermediate.java +++ b/java/examples/groups/H5Ex_G_Intermediate.java @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /************************************************************ diff --git a/java/examples/groups/H5Ex_G_Iterate.java b/java/examples/groups/H5Ex_G_Iterate.java index d0b4ea4..3c9ca82 100644 --- a/java/examples/groups/H5Ex_G_Iterate.java +++ b/java/examples/groups/H5Ex_G_Iterate.java @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /************************************************************ diff --git a/java/examples/groups/H5Ex_G_Phase.java b/java/examples/groups/H5Ex_G_Phase.java index f23d6f2..bfb775b 100644 --- a/java/examples/groups/H5Ex_G_Phase.java +++ b/java/examples/groups/H5Ex_G_Phase.java @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /************************************************************ diff --git a/java/examples/groups/H5Ex_G_Traverse.java b/java/examples/groups/H5Ex_G_Traverse.java index b00fe97..2a2cba3 100644 --- a/java/examples/groups/H5Ex_G_Traverse.java +++ b/java/examples/groups/H5Ex_G_Traverse.java @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /************************************************************ diff --git a/java/examples/groups/H5Ex_G_Visit.java b/java/examples/groups/H5Ex_G_Visit.java index c2367a6..f91c707 100644 --- a/java/examples/groups/H5Ex_G_Visit.java +++ b/java/examples/groups/H5Ex_G_Visit.java @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /************************************************************ diff --git a/java/examples/groups/Makefile.am b/java/examples/groups/Makefile.am index be15b42..08721e0 100644 --- a/java/examples/groups/Makefile.am +++ b/java/examples/groups/Makefile.am @@ -5,12 +5,10 @@ # # This file is part of HDF5. The full HDF5 copyright notice, including # terms governing use, modification, and redistribution, is contained in -# the files COPYING and Copyright.html. COPYING can be found at the root -# of the source code distribution tree; Copyright.html can be found at the -# root level of an installed copy of the electronic HDF5 document set and -# is linked from the top-level documents page. It can also be found at -# http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have -# access to either file, you may request a copy from help@hdfgroup.org. +# the COPYING file, which can be found at the root of the source code +# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. +# If you do not have access to either file, you may request a copy from +# help@hdfgroup.org. ## ## Makefile.am ## Run automake to generate a Makefile.in from this file. diff --git a/java/examples/groups/runExample.sh.in b/java/examples/groups/runExample.sh.in index 2a3f1c6..3732e7f 100644 --- a/java/examples/groups/runExample.sh.in +++ b/java/examples/groups/runExample.sh.in @@ -6,12 +6,10 @@ # # This file is part of HDF5. The full HDF5 copyright notice, including # terms governing use, modification, and redistribution, is contained in -# the files COPYING and Copyright.html. COPYING can be found at the root -# of the source code distribution tree; Copyright.html can be found at the -# root level of an installed copy of the electronic HDF5 document set and -# is linked from the top-level documents page. It can also be found at -# http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have -# access to either file, you may request a copy from help@hdfgroup.org. +# the COPYING file, which can be found at the root of the source code +# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. +# If you do not have access to either file, you may request a copy from +# help@hdfgroup.org. # top_builddir=@top_builddir@ diff --git a/java/examples/intro/H5_CreateAttribute.java b/java/examples/intro/H5_CreateAttribute.java index 16c53d6..68749b1 100644 --- a/java/examples/intro/H5_CreateAttribute.java +++ b/java/examples/intro/H5_CreateAttribute.java @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /************************************************************ diff --git a/java/examples/intro/H5_CreateDataset.java b/java/examples/intro/H5_CreateDataset.java index a16cfe6..3572a31 100644 --- a/java/examples/intro/H5_CreateDataset.java +++ b/java/examples/intro/H5_CreateDataset.java @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /************************************************************ diff --git a/java/examples/intro/H5_CreateFile.java b/java/examples/intro/H5_CreateFile.java index eb9f277..a8c87ea 100644 --- a/java/examples/intro/H5_CreateFile.java +++ b/java/examples/intro/H5_CreateFile.java @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /************************************************************ diff --git a/java/examples/intro/H5_CreateGroup.java b/java/examples/intro/H5_CreateGroup.java index 36bd49a..9359605 100644 --- a/java/examples/intro/H5_CreateGroup.java +++ b/java/examples/intro/H5_CreateGroup.java @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /************************************************************ diff --git a/java/examples/intro/H5_CreateGroupAbsoluteRelative.java b/java/examples/intro/H5_CreateGroupAbsoluteRelative.java index e0127cc..ddc069f 100644 --- a/java/examples/intro/H5_CreateGroupAbsoluteRelative.java +++ b/java/examples/intro/H5_CreateGroupAbsoluteRelative.java @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /************************************************************ diff --git a/java/examples/intro/H5_CreateGroupDataset.java b/java/examples/intro/H5_CreateGroupDataset.java index 0607bbd..bdb0546 100644 --- a/java/examples/intro/H5_CreateGroupDataset.java +++ b/java/examples/intro/H5_CreateGroupDataset.java @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /************************************************************ diff --git a/java/examples/intro/H5_ReadWrite.java b/java/examples/intro/H5_ReadWrite.java index 0d73884..5a7dabc 100644 --- a/java/examples/intro/H5_ReadWrite.java +++ b/java/examples/intro/H5_ReadWrite.java @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /************************************************************ diff --git a/java/examples/intro/Makefile.am b/java/examples/intro/Makefile.am index 3d5757a..95743d9 100644 --- a/java/examples/intro/Makefile.am +++ b/java/examples/intro/Makefile.am @@ -5,12 +5,10 @@ # # This file is part of HDF5. The full HDF5 copyright notice, including # terms governing use, modification, and redistribution, is contained in -# the files COPYING and Copyright.html. COPYING can be found at the root -# of the source code distribution tree; Copyright.html can be found at the -# root level of an installed copy of the electronic HDF5 document set and -# is linked from the top-level documents page. It can also be found at -# http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have -# access to either file, you may request a copy from help@hdfgroup.org. +# the COPYING file, which can be found at the root of the source code +# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. +# If you do not have access to either file, you may request a copy from +# help@hdfgroup.org. ## ## Makefile.am ## Run automake to generate a Makefile.in from this file. diff --git a/java/examples/intro/runExample.sh.in b/java/examples/intro/runExample.sh.in index 65ca160..4533a1b 100644 --- a/java/examples/intro/runExample.sh.in +++ b/java/examples/intro/runExample.sh.in @@ -6,12 +6,10 @@ # # This file is part of HDF5. The full HDF5 copyright notice, including # terms governing use, modification, and redistribution, is contained in -# the files COPYING and Copyright.html. COPYING can be found at the root -# of the source code distribution tree; Copyright.html can be found at the -# root level of an installed copy of the electronic HDF5 document set and -# is linked from the top-level documents page. It can also be found at -# http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have -# access to either file, you may request a copy from help@hdfgroup.org. +# the COPYING file, which can be found at the root of the source code +# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. +# If you do not have access to either file, you may request a copy from +# help@hdfgroup.org. # top_builddir=@top_builddir@ diff --git a/java/src/Makefile.am b/java/src/Makefile.am index d9e6f50..64eef0c 100644 --- a/java/src/Makefile.am +++ b/java/src/Makefile.am @@ -5,12 +5,10 @@ # # This file is part of HDF5. The full HDF5 copyright notice, including # terms governing use, modification, and redistribution, is contained in -# the files COPYING and Copyright.html. COPYING can be found at the root -# of the source code distribution tree; Copyright.html can be found at the -# root level of an installed copy of the electronic HDF5 document set and -# is linked from the top-level documents page. It can also be found at -# http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have -# access to either file, you may request a copy from help@hdfgroup.org. +# the COPYING file, which can be found at the root of the source code +# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. +# If you do not have access to either file, you may request a copy from +# help@hdfgroup.org. # # # This makefile mostly just reinvokes make in the various subdirectories diff --git a/java/src/hdf/hdf5lib/H5.java b/java/src/hdf/hdf5lib/H5.java index 48b2402..14d7186 100644 --- a/java/src/hdf/hdf5lib/H5.java +++ b/java/src/hdf/hdf5lib/H5.java @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ diff --git a/java/src/hdf/hdf5lib/HDF5Constants.java b/java/src/hdf/hdf5lib/HDF5Constants.java index 9773100..8a3d6c8 100644 --- a/java/src/hdf/hdf5lib/HDF5Constants.java +++ b/java/src/hdf/hdf5lib/HDF5Constants.java @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ diff --git a/java/src/hdf/hdf5lib/HDF5GroupInfo.java b/java/src/hdf/hdf5lib/HDF5GroupInfo.java index fa33fec..a45cb7c 100644 --- a/java/src/hdf/hdf5lib/HDF5GroupInfo.java +++ b/java/src/hdf/hdf5lib/HDF5GroupInfo.java @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ diff --git a/java/src/hdf/hdf5lib/HDFArray.java b/java/src/hdf/hdf5lib/HDFArray.java index 55c19e4..529aecb 100644 --- a/java/src/hdf/hdf5lib/HDFArray.java +++ b/java/src/hdf/hdf5lib/HDFArray.java @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ diff --git a/java/src/hdf/hdf5lib/HDFNativeData.java b/java/src/hdf/hdf5lib/HDFNativeData.java index 66929fb..9637f62 100644 --- a/java/src/hdf/hdf5lib/HDFNativeData.java +++ b/java/src/hdf/hdf5lib/HDFNativeData.java @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ package hdf.hdf5lib; diff --git a/java/src/hdf/hdf5lib/callbacks/Callbacks.java b/java/src/hdf/hdf5lib/callbacks/Callbacks.java index 5757eef..9fc961a 100644 --- a/java/src/hdf/hdf5lib/callbacks/Callbacks.java +++ b/java/src/hdf/hdf5lib/callbacks/Callbacks.java @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ package hdf.hdf5lib.callbacks; diff --git a/java/src/hdf/hdf5lib/callbacks/H5A_iterate_cb.java b/java/src/hdf/hdf5lib/callbacks/H5A_iterate_cb.java index fa390a2..988c8fb 100644 --- a/java/src/hdf/hdf5lib/callbacks/H5A_iterate_cb.java +++ b/java/src/hdf/hdf5lib/callbacks/H5A_iterate_cb.java @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ package hdf.hdf5lib.callbacks; diff --git a/java/src/hdf/hdf5lib/callbacks/H5A_iterate_t.java b/java/src/hdf/hdf5lib/callbacks/H5A_iterate_t.java index 4816f8f..51d67d5 100644 --- a/java/src/hdf/hdf5lib/callbacks/H5A_iterate_t.java +++ b/java/src/hdf/hdf5lib/callbacks/H5A_iterate_t.java @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ package hdf.hdf5lib.callbacks; diff --git a/java/src/hdf/hdf5lib/callbacks/H5D_append_cb.java b/java/src/hdf/hdf5lib/callbacks/H5D_append_cb.java index 1b66e34..ead8f73 100644 --- a/java/src/hdf/hdf5lib/callbacks/H5D_append_cb.java +++ b/java/src/hdf/hdf5lib/callbacks/H5D_append_cb.java @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ package hdf.hdf5lib.callbacks; diff --git a/java/src/hdf/hdf5lib/callbacks/H5D_append_t.java b/java/src/hdf/hdf5lib/callbacks/H5D_append_t.java index dcbd331..8bf6410 100644 --- a/java/src/hdf/hdf5lib/callbacks/H5D_append_t.java +++ b/java/src/hdf/hdf5lib/callbacks/H5D_append_t.java @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ package hdf.hdf5lib.callbacks; diff --git a/java/src/hdf/hdf5lib/callbacks/H5D_iterate_cb.java b/java/src/hdf/hdf5lib/callbacks/H5D_iterate_cb.java index bac3dd9..a911a1c 100644 --- a/java/src/hdf/hdf5lib/callbacks/H5D_iterate_cb.java +++ b/java/src/hdf/hdf5lib/callbacks/H5D_iterate_cb.java @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ package hdf.hdf5lib.callbacks; diff --git a/java/src/hdf/hdf5lib/callbacks/H5D_iterate_t.java b/java/src/hdf/hdf5lib/callbacks/H5D_iterate_t.java index 03bcc20..d049711 100644 --- a/java/src/hdf/hdf5lib/callbacks/H5D_iterate_t.java +++ b/java/src/hdf/hdf5lib/callbacks/H5D_iterate_t.java @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ package hdf.hdf5lib.callbacks; diff --git a/java/src/hdf/hdf5lib/callbacks/H5E_walk_cb.java b/java/src/hdf/hdf5lib/callbacks/H5E_walk_cb.java index 672d151..afc04ae 100644 --- a/java/src/hdf/hdf5lib/callbacks/H5E_walk_cb.java +++ b/java/src/hdf/hdf5lib/callbacks/H5E_walk_cb.java @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ package hdf.hdf5lib.callbacks; diff --git a/java/src/hdf/hdf5lib/callbacks/H5E_walk_t.java b/java/src/hdf/hdf5lib/callbacks/H5E_walk_t.java index f3f8a39..0be8977 100644 --- a/java/src/hdf/hdf5lib/callbacks/H5E_walk_t.java +++ b/java/src/hdf/hdf5lib/callbacks/H5E_walk_t.java @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ package hdf.hdf5lib.callbacks; diff --git a/java/src/hdf/hdf5lib/callbacks/H5L_iterate_cb.java b/java/src/hdf/hdf5lib/callbacks/H5L_iterate_cb.java index 5218311..ec71911 100644 --- a/java/src/hdf/hdf5lib/callbacks/H5L_iterate_cb.java +++ b/java/src/hdf/hdf5lib/callbacks/H5L_iterate_cb.java @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ package hdf.hdf5lib.callbacks; diff --git a/java/src/hdf/hdf5lib/callbacks/H5L_iterate_t.java b/java/src/hdf/hdf5lib/callbacks/H5L_iterate_t.java index b7c25f4..28ffb8a 100644 --- a/java/src/hdf/hdf5lib/callbacks/H5L_iterate_t.java +++ b/java/src/hdf/hdf5lib/callbacks/H5L_iterate_t.java @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ package hdf.hdf5lib.callbacks; diff --git a/java/src/hdf/hdf5lib/callbacks/H5O_iterate_cb.java b/java/src/hdf/hdf5lib/callbacks/H5O_iterate_cb.java index 630205f..89cf206 100644 --- a/java/src/hdf/hdf5lib/callbacks/H5O_iterate_cb.java +++ b/java/src/hdf/hdf5lib/callbacks/H5O_iterate_cb.java @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ package hdf.hdf5lib.callbacks; diff --git a/java/src/hdf/hdf5lib/callbacks/H5O_iterate_t.java b/java/src/hdf/hdf5lib/callbacks/H5O_iterate_t.java index da64f19..1491b09 100644 --- a/java/src/hdf/hdf5lib/callbacks/H5O_iterate_t.java +++ b/java/src/hdf/hdf5lib/callbacks/H5O_iterate_t.java @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ package hdf.hdf5lib.callbacks; 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 dcd4ed2..e77d386 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 @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ package hdf.hdf5lib.callbacks; 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 222bd26..0d5ad9e 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 @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ package hdf.hdf5lib.callbacks; 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 0dc8a94..139f877 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 @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ package hdf.hdf5lib.callbacks; 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 eed29bb..12c2601 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 @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ package hdf.hdf5lib.callbacks; 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 777e302..e64ec6f 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 @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ package hdf.hdf5lib.callbacks; 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 78973f0..73646f1 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 @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ package hdf.hdf5lib.callbacks; diff --git a/java/src/hdf/hdf5lib/callbacks/H5P_iterate_cb.java b/java/src/hdf/hdf5lib/callbacks/H5P_iterate_cb.java index 0d98325..5ecb88d 100644 --- a/java/src/hdf/hdf5lib/callbacks/H5P_iterate_cb.java +++ b/java/src/hdf/hdf5lib/callbacks/H5P_iterate_cb.java @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ package hdf.hdf5lib.callbacks; diff --git a/java/src/hdf/hdf5lib/callbacks/H5P_iterate_t.java b/java/src/hdf/hdf5lib/callbacks/H5P_iterate_t.java index dbbf80d..2e320b4 100644 --- a/java/src/hdf/hdf5lib/callbacks/H5P_iterate_t.java +++ b/java/src/hdf/hdf5lib/callbacks/H5P_iterate_t.java @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ package hdf.hdf5lib.callbacks; 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 3ea44ac..103fe5f 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 @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ package hdf.hdf5lib.callbacks; 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 0daaca5..46477b9 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 @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ package hdf.hdf5lib.callbacks; 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 4e560e2..57994bb5 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 @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ package hdf.hdf5lib.callbacks; 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 dc4fee1..8791c22 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 @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ package hdf.hdf5lib.callbacks; 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 9aa27ab..46cd097 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 @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ package hdf.hdf5lib.callbacks; 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 bfc7b37..04599a0 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 @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ package hdf.hdf5lib.callbacks; 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 c1e9b00..6ac750f 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 @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ package hdf.hdf5lib.callbacks; diff --git a/java/src/hdf/hdf5lib/exceptions/HDF5AtomException.java b/java/src/hdf/hdf5lib/exceptions/HDF5AtomException.java index 3309223..850044c 100644 --- a/java/src/hdf/hdf5lib/exceptions/HDF5AtomException.java +++ b/java/src/hdf/hdf5lib/exceptions/HDF5AtomException.java @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ package hdf.hdf5lib.exceptions; diff --git a/java/src/hdf/hdf5lib/exceptions/HDF5AttributeException.java b/java/src/hdf/hdf5lib/exceptions/HDF5AttributeException.java index 8c1a7b8..87b075b 100644 --- a/java/src/hdf/hdf5lib/exceptions/HDF5AttributeException.java +++ b/java/src/hdf/hdf5lib/exceptions/HDF5AttributeException.java @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ package hdf.hdf5lib.exceptions; diff --git a/java/src/hdf/hdf5lib/exceptions/HDF5BtreeException.java b/java/src/hdf/hdf5lib/exceptions/HDF5BtreeException.java index dc82fd9..5118254 100644 --- a/java/src/hdf/hdf5lib/exceptions/HDF5BtreeException.java +++ b/java/src/hdf/hdf5lib/exceptions/HDF5BtreeException.java @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ package hdf.hdf5lib.exceptions; diff --git a/java/src/hdf/hdf5lib/exceptions/HDF5DataFiltersException.java b/java/src/hdf/hdf5lib/exceptions/HDF5DataFiltersException.java index 17fd9db..14ae43f 100644 --- a/java/src/hdf/hdf5lib/exceptions/HDF5DataFiltersException.java +++ b/java/src/hdf/hdf5lib/exceptions/HDF5DataFiltersException.java @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ package hdf.hdf5lib.exceptions; diff --git a/java/src/hdf/hdf5lib/exceptions/HDF5DataStorageException.java b/java/src/hdf/hdf5lib/exceptions/HDF5DataStorageException.java index f22c9ec..721d3ef 100644 --- a/java/src/hdf/hdf5lib/exceptions/HDF5DataStorageException.java +++ b/java/src/hdf/hdf5lib/exceptions/HDF5DataStorageException.java @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ package hdf.hdf5lib.exceptions; diff --git a/java/src/hdf/hdf5lib/exceptions/HDF5DatasetInterfaceException.java b/java/src/hdf/hdf5lib/exceptions/HDF5DatasetInterfaceException.java index e39709d..3c55a6b 100644 --- a/java/src/hdf/hdf5lib/exceptions/HDF5DatasetInterfaceException.java +++ b/java/src/hdf/hdf5lib/exceptions/HDF5DatasetInterfaceException.java @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ package hdf.hdf5lib.exceptions; diff --git a/java/src/hdf/hdf5lib/exceptions/HDF5DataspaceInterfaceException.java b/java/src/hdf/hdf5lib/exceptions/HDF5DataspaceInterfaceException.java index 531202c..c0182ee 100644 --- a/java/src/hdf/hdf5lib/exceptions/HDF5DataspaceInterfaceException.java +++ b/java/src/hdf/hdf5lib/exceptions/HDF5DataspaceInterfaceException.java @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ package hdf.hdf5lib.exceptions; diff --git a/java/src/hdf/hdf5lib/exceptions/HDF5DatatypeInterfaceException.java b/java/src/hdf/hdf5lib/exceptions/HDF5DatatypeInterfaceException.java index 3c0c144..4da074b 100644 --- a/java/src/hdf/hdf5lib/exceptions/HDF5DatatypeInterfaceException.java +++ b/java/src/hdf/hdf5lib/exceptions/HDF5DatatypeInterfaceException.java @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ package hdf.hdf5lib.exceptions; diff --git a/java/src/hdf/hdf5lib/exceptions/HDF5Exception.java b/java/src/hdf/hdf5lib/exceptions/HDF5Exception.java index 8a83ca1..1b55437 100644 --- a/java/src/hdf/hdf5lib/exceptions/HDF5Exception.java +++ b/java/src/hdf/hdf5lib/exceptions/HDF5Exception.java @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ package hdf.hdf5lib.exceptions; diff --git a/java/src/hdf/hdf5lib/exceptions/HDF5ExternalFileListException.java b/java/src/hdf/hdf5lib/exceptions/HDF5ExternalFileListException.java index 62c5dd8..28f5437 100644 --- a/java/src/hdf/hdf5lib/exceptions/HDF5ExternalFileListException.java +++ b/java/src/hdf/hdf5lib/exceptions/HDF5ExternalFileListException.java @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ package hdf.hdf5lib.exceptions; diff --git a/java/src/hdf/hdf5lib/exceptions/HDF5FileInterfaceException.java b/java/src/hdf/hdf5lib/exceptions/HDF5FileInterfaceException.java index 0b63b41..c8dbcea 100644 --- a/java/src/hdf/hdf5lib/exceptions/HDF5FileInterfaceException.java +++ b/java/src/hdf/hdf5lib/exceptions/HDF5FileInterfaceException.java @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ package hdf.hdf5lib.exceptions; diff --git a/java/src/hdf/hdf5lib/exceptions/HDF5FunctionArgumentException.java b/java/src/hdf/hdf5lib/exceptions/HDF5FunctionArgumentException.java index c984aae..e7f20e0 100644 --- a/java/src/hdf/hdf5lib/exceptions/HDF5FunctionArgumentException.java +++ b/java/src/hdf/hdf5lib/exceptions/HDF5FunctionArgumentException.java @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ package hdf.hdf5lib.exceptions; diff --git a/java/src/hdf/hdf5lib/exceptions/HDF5FunctionEntryExitException.java b/java/src/hdf/hdf5lib/exceptions/HDF5FunctionEntryExitException.java index 5dad930..26e836f 100644 --- a/java/src/hdf/hdf5lib/exceptions/HDF5FunctionEntryExitException.java +++ b/java/src/hdf/hdf5lib/exceptions/HDF5FunctionEntryExitException.java @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ package hdf.hdf5lib.exceptions; diff --git a/java/src/hdf/hdf5lib/exceptions/HDF5HeapException.java b/java/src/hdf/hdf5lib/exceptions/HDF5HeapException.java index dfe4ced..a32e2a1 100644 --- a/java/src/hdf/hdf5lib/exceptions/HDF5HeapException.java +++ b/java/src/hdf/hdf5lib/exceptions/HDF5HeapException.java @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ package hdf.hdf5lib.exceptions; diff --git a/java/src/hdf/hdf5lib/exceptions/HDF5InternalErrorException.java b/java/src/hdf/hdf5lib/exceptions/HDF5InternalErrorException.java index 45a836c..25ac572 100644 --- a/java/src/hdf/hdf5lib/exceptions/HDF5InternalErrorException.java +++ b/java/src/hdf/hdf5lib/exceptions/HDF5InternalErrorException.java @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ package hdf.hdf5lib.exceptions; diff --git a/java/src/hdf/hdf5lib/exceptions/HDF5JavaException.java b/java/src/hdf/hdf5lib/exceptions/HDF5JavaException.java index 2db79ef..7c61194 100644 --- a/java/src/hdf/hdf5lib/exceptions/HDF5JavaException.java +++ b/java/src/hdf/hdf5lib/exceptions/HDF5JavaException.java @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ package hdf.hdf5lib.exceptions; diff --git a/java/src/hdf/hdf5lib/exceptions/HDF5LibraryException.java b/java/src/hdf/hdf5lib/exceptions/HDF5LibraryException.java index 8b21ff8..5ae977d 100644 --- a/java/src/hdf/hdf5lib/exceptions/HDF5LibraryException.java +++ b/java/src/hdf/hdf5lib/exceptions/HDF5LibraryException.java @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ package hdf.hdf5lib.exceptions; diff --git a/java/src/hdf/hdf5lib/exceptions/HDF5LowLevelIOException.java b/java/src/hdf/hdf5lib/exceptions/HDF5LowLevelIOException.java index e0a95d0..6d792c3 100644 --- a/java/src/hdf/hdf5lib/exceptions/HDF5LowLevelIOException.java +++ b/java/src/hdf/hdf5lib/exceptions/HDF5LowLevelIOException.java @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ package hdf.hdf5lib.exceptions; diff --git a/java/src/hdf/hdf5lib/exceptions/HDF5MetaDataCacheException.java b/java/src/hdf/hdf5lib/exceptions/HDF5MetaDataCacheException.java index cbc3b75..02f2d33 100644 --- a/java/src/hdf/hdf5lib/exceptions/HDF5MetaDataCacheException.java +++ b/java/src/hdf/hdf5lib/exceptions/HDF5MetaDataCacheException.java @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ package hdf.hdf5lib.exceptions; diff --git a/java/src/hdf/hdf5lib/exceptions/HDF5ObjectHeaderException.java b/java/src/hdf/hdf5lib/exceptions/HDF5ObjectHeaderException.java index 0cdd0d1..2bb6861 100644 --- a/java/src/hdf/hdf5lib/exceptions/HDF5ObjectHeaderException.java +++ b/java/src/hdf/hdf5lib/exceptions/HDF5ObjectHeaderException.java @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ package hdf.hdf5lib.exceptions; diff --git a/java/src/hdf/hdf5lib/exceptions/HDF5PropertyListInterfaceException.java b/java/src/hdf/hdf5lib/exceptions/HDF5PropertyListInterfaceException.java index aa9f668..b1baaad 100644 --- a/java/src/hdf/hdf5lib/exceptions/HDF5PropertyListInterfaceException.java +++ b/java/src/hdf/hdf5lib/exceptions/HDF5PropertyListInterfaceException.java @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ package hdf.hdf5lib.exceptions; diff --git a/java/src/hdf/hdf5lib/exceptions/HDF5ReferenceException.java b/java/src/hdf/hdf5lib/exceptions/HDF5ReferenceException.java index 2c8c93b..ea4a89a 100644 --- a/java/src/hdf/hdf5lib/exceptions/HDF5ReferenceException.java +++ b/java/src/hdf/hdf5lib/exceptions/HDF5ReferenceException.java @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ package hdf.hdf5lib.exceptions; diff --git a/java/src/hdf/hdf5lib/exceptions/HDF5ResourceUnavailableException.java b/java/src/hdf/hdf5lib/exceptions/HDF5ResourceUnavailableException.java index f1c0c60..fc92578 100644 --- a/java/src/hdf/hdf5lib/exceptions/HDF5ResourceUnavailableException.java +++ b/java/src/hdf/hdf5lib/exceptions/HDF5ResourceUnavailableException.java @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ package hdf.hdf5lib.exceptions; diff --git a/java/src/hdf/hdf5lib/exceptions/HDF5SymbolTableException.java b/java/src/hdf/hdf5lib/exceptions/HDF5SymbolTableException.java index 87384d1..b90ce64 100644 --- a/java/src/hdf/hdf5lib/exceptions/HDF5SymbolTableException.java +++ b/java/src/hdf/hdf5lib/exceptions/HDF5SymbolTableException.java @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ package hdf.hdf5lib.exceptions; 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 2128d8a..20863dc 100644 --- a/java/src/hdf/hdf5lib/structs/H5AC_cache_config_t.java +++ b/java/src/hdf/hdf5lib/structs/H5AC_cache_config_t.java @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ package hdf.hdf5lib.structs; diff --git a/java/src/hdf/hdf5lib/structs/H5A_info_t.java b/java/src/hdf/hdf5lib/structs/H5A_info_t.java index b04a757..a46a495 100644 --- a/java/src/hdf/hdf5lib/structs/H5A_info_t.java +++ b/java/src/hdf/hdf5lib/structs/H5A_info_t.java @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ package hdf.hdf5lib.structs; diff --git a/java/src/hdf/hdf5lib/structs/H5E_error2_t.java b/java/src/hdf/hdf5lib/structs/H5E_error2_t.java index b7cd60a..257ad05 100644 --- a/java/src/hdf/hdf5lib/structs/H5E_error2_t.java +++ b/java/src/hdf/hdf5lib/structs/H5E_error2_t.java @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ package hdf.hdf5lib.structs; diff --git a/java/src/hdf/hdf5lib/structs/H5F_info2_t.java b/java/src/hdf/hdf5lib/structs/H5F_info2_t.java index 8fbde68..4664b5b 100644 --- a/java/src/hdf/hdf5lib/structs/H5F_info2_t.java +++ b/java/src/hdf/hdf5lib/structs/H5F_info2_t.java @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ package hdf.hdf5lib.structs; diff --git a/java/src/hdf/hdf5lib/structs/H5G_info_t.java b/java/src/hdf/hdf5lib/structs/H5G_info_t.java index daa6808..56c876e 100644 --- a/java/src/hdf/hdf5lib/structs/H5G_info_t.java +++ b/java/src/hdf/hdf5lib/structs/H5G_info_t.java @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ package hdf.hdf5lib.structs; diff --git a/java/src/hdf/hdf5lib/structs/H5L_info_t.java b/java/src/hdf/hdf5lib/structs/H5L_info_t.java index d43853f..3bbb189 100644 --- a/java/src/hdf/hdf5lib/structs/H5L_info_t.java +++ b/java/src/hdf/hdf5lib/structs/H5L_info_t.java @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ package hdf.hdf5lib.structs; 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 86cf883..a39c1ed 100644 --- a/java/src/hdf/hdf5lib/structs/H5O_hdr_info_t.java +++ b/java/src/hdf/hdf5lib/structs/H5O_hdr_info_t.java @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ package hdf.hdf5lib.structs; diff --git a/java/src/hdf/hdf5lib/structs/H5O_info_t.java b/java/src/hdf/hdf5lib/structs/H5O_info_t.java index a89aaf0..ac32f6a 100644 --- a/java/src/hdf/hdf5lib/structs/H5O_info_t.java +++ b/java/src/hdf/hdf5lib/structs/H5O_info_t.java @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ package hdf.hdf5lib.structs; 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 450f548..ea36d85 100644 --- a/java/src/hdf/hdf5lib/structs/H5_ih_info_t.java +++ b/java/src/hdf/hdf5lib/structs/H5_ih_info_t.java @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ package hdf.hdf5lib.structs; diff --git a/java/src/jni/Makefile.am b/java/src/jni/Makefile.am index 4667407..84b8f9c 100644 --- a/java/src/jni/Makefile.am +++ b/java/src/jni/Makefile.am @@ -5,12 +5,10 @@ # # This file is part of HDF5. The full HDF5 copyright notice, including # terms governing use, modification, and redistribution, is contained in -# the files COPYING and Copyright.html. COPYING can be found at the root -# of the source code distribution tree; Copyright.html can be found at the -# root level of an installed copy of the electronic HDF5 document set and -# is linked from the top-level documents page. It can also be found at -# http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have -# access to either file, you may request a copy from help@hdfgroup.org. +# the COPYING file, which can be found at the root of the source code +# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. +# If you do not have access to either file, you may request a copy from +# help@hdfgroup.org. ## ## Makefile.am ## Run automake to generate a Makefile.in from this file. diff --git a/java/src/jni/exceptionImp.c b/java/src/jni/exceptionImp.c index d0e7790..05c193f 100644 --- a/java/src/jni/exceptionImp.c +++ b/java/src/jni/exceptionImp.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* diff --git a/java/src/jni/exceptionImp.h b/java/src/jni/exceptionImp.h index a9b812d..cb74602 100644 --- a/java/src/jni/exceptionImp.h +++ b/java/src/jni/exceptionImp.h @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #include diff --git a/java/src/jni/h5Constants.c b/java/src/jni/h5Constants.c index ddca853..cd1c2f0 100644 --- a/java/src/jni/h5Constants.c +++ b/java/src/jni/h5Constants.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* diff --git a/java/src/jni/h5Imp.c b/java/src/jni/h5Imp.c index e548363..2eeb075 100644 --- a/java/src/jni/h5Imp.c +++ b/java/src/jni/h5Imp.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* diff --git a/java/src/jni/h5Imp.h b/java/src/jni/h5Imp.h index 79ff3e4..756b8bb 100644 --- a/java/src/jni/h5Imp.h +++ b/java/src/jni/h5Imp.h @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #include diff --git a/java/src/jni/h5aImp.c b/java/src/jni/h5aImp.c index 5445904..26ec4fc 100644 --- a/java/src/jni/h5aImp.c +++ b/java/src/jni/h5aImp.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* diff --git a/java/src/jni/h5aImp.h b/java/src/jni/h5aImp.h index 5362ab7..62769fd 100644 --- a/java/src/jni/h5aImp.h +++ b/java/src/jni/h5aImp.h @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #include diff --git a/java/src/jni/h5dImp.c b/java/src/jni/h5dImp.c index 0bb015e..66efed0 100644 --- a/java/src/jni/h5dImp.c +++ b/java/src/jni/h5dImp.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* diff --git a/java/src/jni/h5dImp.h b/java/src/jni/h5dImp.h index e79c590..3cf24fe 100644 --- a/java/src/jni/h5dImp.h +++ b/java/src/jni/h5dImp.h @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #include diff --git a/java/src/jni/h5eImp.c b/java/src/jni/h5eImp.c index 05a7848..24ddcbc 100644 --- a/java/src/jni/h5eImp.c +++ b/java/src/jni/h5eImp.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* diff --git a/java/src/jni/h5eImp.h b/java/src/jni/h5eImp.h index 88bbdc1..051b2ed 100644 --- a/java/src/jni/h5eImp.h +++ b/java/src/jni/h5eImp.h @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #include diff --git a/java/src/jni/h5fImp.c b/java/src/jni/h5fImp.c index 4f0e569..8cf5252 100644 --- a/java/src/jni/h5fImp.c +++ b/java/src/jni/h5fImp.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* diff --git a/java/src/jni/h5fImp.h b/java/src/jni/h5fImp.h index 396df65..fcfdedf 100644 --- a/java/src/jni/h5fImp.h +++ b/java/src/jni/h5fImp.h @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #include diff --git a/java/src/jni/h5gImp.c b/java/src/jni/h5gImp.c index d724475..41ec382 100644 --- a/java/src/jni/h5gImp.c +++ b/java/src/jni/h5gImp.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* diff --git a/java/src/jni/h5gImp.h b/java/src/jni/h5gImp.h index dce1247..a411658 100644 --- a/java/src/jni/h5gImp.h +++ b/java/src/jni/h5gImp.h @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #include diff --git a/java/src/jni/h5iImp.c b/java/src/jni/h5iImp.c index 9c946df..47574ca 100644 --- a/java/src/jni/h5iImp.c +++ b/java/src/jni/h5iImp.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* diff --git a/java/src/jni/h5iImp.h b/java/src/jni/h5iImp.h index 2bf839bc..2c854e6 100644 --- a/java/src/jni/h5iImp.h +++ b/java/src/jni/h5iImp.h @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #include diff --git a/java/src/jni/h5jni.h b/java/src/jni/h5jni.h index cef3bd0..2970e14 100644 --- a/java/src/jni/h5jni.h +++ b/java/src/jni/h5jni.h @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* diff --git a/java/src/jni/h5lImp.c b/java/src/jni/h5lImp.c index f7a9df1..bf2d7b1 100644 --- a/java/src/jni/h5lImp.c +++ b/java/src/jni/h5lImp.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* diff --git a/java/src/jni/h5lImp.h b/java/src/jni/h5lImp.h index 6b2f3e1..3a7d8ea 100644 --- a/java/src/jni/h5lImp.h +++ b/java/src/jni/h5lImp.h @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #include diff --git a/java/src/jni/h5oImp.c b/java/src/jni/h5oImp.c index a33d1d7..e8abead 100644 --- a/java/src/jni/h5oImp.c +++ b/java/src/jni/h5oImp.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* diff --git a/java/src/jni/h5oImp.h b/java/src/jni/h5oImp.h index 5d07c29..224f298 100644 --- a/java/src/jni/h5oImp.h +++ b/java/src/jni/h5oImp.h @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #include diff --git a/java/src/jni/h5pImp.c b/java/src/jni/h5pImp.c index c9bd4aa..df8b3c9 100644 --- a/java/src/jni/h5pImp.c +++ b/java/src/jni/h5pImp.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* diff --git a/java/src/jni/h5pImp.h b/java/src/jni/h5pImp.h index 03b0e03..d413f69 100644 --- a/java/src/jni/h5pImp.h +++ b/java/src/jni/h5pImp.h @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #include diff --git a/java/src/jni/h5plImp.c b/java/src/jni/h5plImp.c index 09a1032..5a2d3ba 100644 --- a/java/src/jni/h5plImp.c +++ b/java/src/jni/h5plImp.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* diff --git a/java/src/jni/h5plImp.h b/java/src/jni/h5plImp.h index 5326a94..5336621 100644 --- a/java/src/jni/h5plImp.h +++ b/java/src/jni/h5plImp.h @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #include diff --git a/java/src/jni/h5rImp.c b/java/src/jni/h5rImp.c index 3dcbb8d..b250550 100644 --- a/java/src/jni/h5rImp.c +++ b/java/src/jni/h5rImp.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* diff --git a/java/src/jni/h5rImp.h b/java/src/jni/h5rImp.h index 1f8d206..e28329b 100644 --- a/java/src/jni/h5rImp.h +++ b/java/src/jni/h5rImp.h @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #include diff --git a/java/src/jni/h5sImp.c b/java/src/jni/h5sImp.c index 929f6d6..c578ab8 100644 --- a/java/src/jni/h5sImp.c +++ b/java/src/jni/h5sImp.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* diff --git a/java/src/jni/h5sImp.h b/java/src/jni/h5sImp.h index fd2184d..141e504 100644 --- a/java/src/jni/h5sImp.h +++ b/java/src/jni/h5sImp.h @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #include diff --git a/java/src/jni/h5tImp.c b/java/src/jni/h5tImp.c index 26f9b5c..7b4af56 100644 --- a/java/src/jni/h5tImp.c +++ b/java/src/jni/h5tImp.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* diff --git a/java/src/jni/h5tImp.h b/java/src/jni/h5tImp.h index 417d231..374d992 100644 --- a/java/src/jni/h5tImp.h +++ b/java/src/jni/h5tImp.h @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #include diff --git a/java/src/jni/h5util.c b/java/src/jni/h5util.c index 17ed35e..8454815 100644 --- a/java/src/jni/h5util.c +++ b/java/src/jni/h5util.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* diff --git a/java/src/jni/h5util.h b/java/src/jni/h5util.h index 6194378..434a107 100644 --- a/java/src/jni/h5util.h +++ b/java/src/jni/h5util.h @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* diff --git a/java/src/jni/h5zImp.c b/java/src/jni/h5zImp.c index 247d1cc..a5e6cd8 100644 --- a/java/src/jni/h5zImp.c +++ b/java/src/jni/h5zImp.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* diff --git a/java/src/jni/h5zImp.h b/java/src/jni/h5zImp.h index bbdc506..bffe9d8 100644 --- a/java/src/jni/h5zImp.h +++ b/java/src/jni/h5zImp.h @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #include diff --git a/java/src/jni/nativeData.c b/java/src/jni/nativeData.c index a123e0f..33f4953 100644 --- a/java/src/jni/nativeData.c +++ b/java/src/jni/nativeData.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* diff --git a/java/src/jni/nativeData.h b/java/src/jni/nativeData.h index f8df4ce..e9e1a5d 100644 --- a/java/src/jni/nativeData.h +++ b/java/src/jni/nativeData.h @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #include diff --git a/java/test/Makefile.am b/java/test/Makefile.am index 92ac12d..b7409cf 100644 --- a/java/test/Makefile.am +++ b/java/test/Makefile.am @@ -5,12 +5,10 @@ # # This file is part of HDF5. The full HDF5 copyright notice, including # terms governing use, modification, and redistribution, is contained in -# the files COPYING and Copyright.html. COPYING can be found at the root -# of the source code distribution tree; Copyright.html can be found at the -# root level of an installed copy of the electronic HDF5 document set and -# is linked from the top-level documents page. It can also be found at -# http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have -# access to either file, you may request a copy from help@hdfgroup.org. +# the COPYING file, which can be found at the root of the source code +# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. +# If you do not have access to either file, you may request a copy from +# help@hdfgroup.org. ## ## Makefile.am ## Run automake to generate a Makefile.in from this file. diff --git a/java/test/TestAll.java b/java/test/TestAll.java index a4b44c3..de5d333 100644 --- a/java/test/TestAll.java +++ b/java/test/TestAll.java @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ package test; diff --git a/java/test/TestH5.java b/java/test/TestH5.java index b5864e8..9c3d8dc 100644 --- a/java/test/TestH5.java +++ b/java/test/TestH5.java @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ package test; diff --git a/java/test/TestH5A.java b/java/test/TestH5A.java index fb7b31a..5e1e3f6 100644 --- a/java/test/TestH5A.java +++ b/java/test/TestH5A.java @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ package test; diff --git a/java/test/TestH5D.java b/java/test/TestH5D.java index fa051db..372fdba 100644 --- a/java/test/TestH5D.java +++ b/java/test/TestH5D.java @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ package test; diff --git a/java/test/TestH5Dparams.java b/java/test/TestH5Dparams.java index 2cdd121..a3618f2 100644 --- a/java/test/TestH5Dparams.java +++ b/java/test/TestH5Dparams.java @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ package test; diff --git a/java/test/TestH5Dplist.java b/java/test/TestH5Dplist.java index eb1669f..6feaa23 100644 --- a/java/test/TestH5Dplist.java +++ b/java/test/TestH5Dplist.java @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ package test; diff --git a/java/test/TestH5E.java b/java/test/TestH5E.java index 028369d..9a36365 100644 --- a/java/test/TestH5E.java +++ b/java/test/TestH5E.java @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ package test; @@ -543,8 +541,8 @@ public class TestH5E { } assertFalse("testH5Ewalk:H5Ewalk2 ",((H5E_walk_data)walk_data).walkdata.isEmpty()); assertTrue("testH5Ewalk:H5Ewalk2 "+((H5E_walk_data)walk_data).walkdata.size(),((H5E_walk_data)walk_data).walkdata.size()==3); - assertTrue("testH5Ewalk:H5Ewalk2 "+((wdata)((H5E_walk_data)walk_data).walkdata.get(0)).line,((wdata)((H5E_walk_data)walk_data).walkdata.get(0)).line==3767); - assertTrue("testH5Ewalk:H5Ewalk2 "+((wdata)((H5E_walk_data)walk_data).walkdata.get(1)).line,((wdata)((H5E_walk_data)walk_data).walkdata.get(1)).line==5506); + assertTrue("testH5Ewalk:H5Ewalk2 "+((wdata)((H5E_walk_data)walk_data).walkdata.get(0)).line,((wdata)((H5E_walk_data)walk_data).walkdata.get(0)).line==3765); + assertTrue("testH5Ewalk:H5Ewalk2 "+((wdata)((H5E_walk_data)walk_data).walkdata.get(1)).line,((wdata)((H5E_walk_data)walk_data).walkdata.get(1)).line==5504); assertTrue("testH5Ewalk:H5Ewalk2 "+((wdata)((H5E_walk_data)walk_data).walkdata.get(1)).func_name,((wdata)((H5E_walk_data)walk_data).walkdata.get(1)).func_name.compareToIgnoreCase("H5P_verify_apl_and_dxpl")==0); assertTrue("testH5Ewalk:H5Ewalk2 "+((wdata)((H5E_walk_data)walk_data).walkdata.get(0)).err_desc,((wdata)((H5E_walk_data)walk_data).walkdata.get(0)).err_desc.compareToIgnoreCase("not a property list")==0); assertTrue("testH5Ewalk:H5Ewalk2 "+((wdata)((H5E_walk_data)walk_data).walkdata.get(1)).err_desc,((wdata)((H5E_walk_data)walk_data).walkdata.get(1)).err_desc.compareToIgnoreCase("not the required access property list")==0); diff --git a/java/test/TestH5Edefault.java b/java/test/TestH5Edefault.java index 510aa2f..835ccba 100644 --- a/java/test/TestH5Edefault.java +++ b/java/test/TestH5Edefault.java @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ package test; diff --git a/java/test/TestH5Eregister.java b/java/test/TestH5Eregister.java index 13e0ca2..742b47f 100644 --- a/java/test/TestH5Eregister.java +++ b/java/test/TestH5Eregister.java @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ package test; diff --git a/java/test/TestH5F.java b/java/test/TestH5F.java index 3451187..ac2f70d 100644 --- a/java/test/TestH5F.java +++ b/java/test/TestH5F.java @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ package test; diff --git a/java/test/TestH5Fbasic.java b/java/test/TestH5Fbasic.java index c08daff..faf0bf7 100644 --- a/java/test/TestH5Fbasic.java +++ b/java/test/TestH5Fbasic.java @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ package test; diff --git a/java/test/TestH5Fparams.java b/java/test/TestH5Fparams.java index 2d67f3d..fffded1 100644 --- a/java/test/TestH5Fparams.java +++ b/java/test/TestH5Fparams.java @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ package test; diff --git a/java/test/TestH5Fswmr.java b/java/test/TestH5Fswmr.java index b65ebf2..5ca1a97 100644 --- a/java/test/TestH5Fswmr.java +++ b/java/test/TestH5Fswmr.java @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ package test; diff --git a/java/test/TestH5G.java b/java/test/TestH5G.java index 32329bb..1a67990 100644 --- a/java/test/TestH5G.java +++ b/java/test/TestH5G.java @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ package test; diff --git a/java/test/TestH5Gbasic.java b/java/test/TestH5Gbasic.java index b049e15..6ff7d03 100644 --- a/java/test/TestH5Gbasic.java +++ b/java/test/TestH5Gbasic.java @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ package test; diff --git a/java/test/TestH5Giterate.java b/java/test/TestH5Giterate.java index 17f594e..06c59e7 100644 --- a/java/test/TestH5Giterate.java +++ b/java/test/TestH5Giterate.java @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ package test; diff --git a/java/test/TestH5Lbasic.java b/java/test/TestH5Lbasic.java index c35519e..9e832f3 100644 --- a/java/test/TestH5Lbasic.java +++ b/java/test/TestH5Lbasic.java @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ package test; diff --git a/java/test/TestH5Lcreate.java b/java/test/TestH5Lcreate.java index 2fbd9e3..dcb076d 100644 --- a/java/test/TestH5Lcreate.java +++ b/java/test/TestH5Lcreate.java @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ package test; diff --git a/java/test/TestH5Lparams.java b/java/test/TestH5Lparams.java index 9a2c204..c8d5f5d 100644 --- a/java/test/TestH5Lparams.java +++ b/java/test/TestH5Lparams.java @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ package test; diff --git a/java/test/TestH5Obasic.java b/java/test/TestH5Obasic.java index b564089..923d2b1 100644 --- a/java/test/TestH5Obasic.java +++ b/java/test/TestH5Obasic.java @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ package test; diff --git a/java/test/TestH5Ocopy.java b/java/test/TestH5Ocopy.java index cf0fb1f..e730b9f 100644 --- a/java/test/TestH5Ocopy.java +++ b/java/test/TestH5Ocopy.java @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ package test; diff --git a/java/test/TestH5Ocreate.java b/java/test/TestH5Ocreate.java index 0edecba..559e12b 100644 --- a/java/test/TestH5Ocreate.java +++ b/java/test/TestH5Ocreate.java @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ package test; diff --git a/java/test/TestH5Oparams.java b/java/test/TestH5Oparams.java index 9398940..2af190f 100644 --- a/java/test/TestH5Oparams.java +++ b/java/test/TestH5Oparams.java @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ package test; diff --git a/java/test/TestH5P.java b/java/test/TestH5P.java index fa8b525..5aafb5b 100644 --- a/java/test/TestH5P.java +++ b/java/test/TestH5P.java @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ package test; diff --git a/java/test/TestH5PData.java b/java/test/TestH5PData.java index 7fc154d..c414d67 100644 --- a/java/test/TestH5PData.java +++ b/java/test/TestH5PData.java @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ package test; diff --git a/java/test/TestH5PL.java b/java/test/TestH5PL.java index 759db5f..aa59478 100644 --- a/java/test/TestH5PL.java +++ b/java/test/TestH5PL.java @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ package test; diff --git a/java/test/TestH5Pfapl.java b/java/test/TestH5Pfapl.java index e888e20..d4a2231 100644 --- a/java/test/TestH5Pfapl.java +++ b/java/test/TestH5Pfapl.java @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ package test; diff --git a/java/test/TestH5Plist.java b/java/test/TestH5Plist.java index 024237a..e318cc9 100644 --- a/java/test/TestH5Plist.java +++ b/java/test/TestH5Plist.java @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ package test; diff --git a/java/test/TestH5Pvirtual.java b/java/test/TestH5Pvirtual.java index 15fbd03..40cfbac 100644 --- a/java/test/TestH5Pvirtual.java +++ b/java/test/TestH5Pvirtual.java @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ package test; diff --git a/java/test/TestH5R.java b/java/test/TestH5R.java index 72e0bfb..5349855 100644 --- a/java/test/TestH5R.java +++ b/java/test/TestH5R.java @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ package test; diff --git a/java/test/TestH5S.java b/java/test/TestH5S.java index 909ab02..985342b 100644 --- a/java/test/TestH5S.java +++ b/java/test/TestH5S.java @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ package test; diff --git a/java/test/TestH5Sbasic.java b/java/test/TestH5Sbasic.java index 2731a06..3007495 100644 --- a/java/test/TestH5Sbasic.java +++ b/java/test/TestH5Sbasic.java @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ package test; diff --git a/java/test/TestH5T.java b/java/test/TestH5T.java index e03b97f..0c68d2e 100644 --- a/java/test/TestH5T.java +++ b/java/test/TestH5T.java @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ package test; diff --git a/java/test/TestH5Tbasic.java b/java/test/TestH5Tbasic.java index 950f1c7..3c2500b 100644 --- a/java/test/TestH5Tbasic.java +++ b/java/test/TestH5Tbasic.java @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ package test; diff --git a/java/test/TestH5Tparams.java b/java/test/TestH5Tparams.java index 4ebeea7..53d3a37 100644 --- a/java/test/TestH5Tparams.java +++ b/java/test/TestH5Tparams.java @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ package test; diff --git a/java/test/TestH5Z.java b/java/test/TestH5Z.java index bdf3f1d..31adf22 100644 --- a/java/test/TestH5Z.java +++ b/java/test/TestH5Z.java @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ package test; diff --git a/java/test/junit.sh.in b/java/test/junit.sh.in index 31037ba..32b0832 100644 --- a/java/test/junit.sh.in +++ b/java/test/junit.sh.in @@ -6,12 +6,10 @@ # # This file is part of HDF5. The full HDF5 copyright notice, including # terms governing use, modification, and redistribution, is contained in -# the files COPYING and Copyright.html. COPYING can be found at the root -# of the source code distribution tree; Copyright.html can be found at the -# root level of an installed copy of the electronic HDF5 document set and -# is linked from the top-level documents page. It can also be found at -# http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have -# access to either file, you may request a copy from help@hdfgroup.org. +# the COPYING file, which can be found at the root of the source code +# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. +# If you do not have access to either file, you may request a copy from +# help@hdfgroup.org. # top_builddir=@top_builddir@ diff --git a/m4/aclocal_cxx.m4 b/m4/aclocal_cxx.m4 index 9d47193..29a0607 100644 --- a/m4/aclocal_cxx.m4 +++ b/m4/aclocal_cxx.m4 @@ -6,12 +6,10 @@ dnl All rights reserved. dnl dnl This file is part of HDF5. The full HDF5 copyright notice, including dnl terms governing use, modification, and redistribution, is contained in -dnl the files COPYING and Copyright.html. COPYING can be found at the root -dnl of the source code distribution tree; Copyright.html can be found at the -dnl root level of an installed copy of the electronic HDF5 document set and -dnl is linked from the top-level documents page. It can also be found at -dnl http://hdf.ncsa.uiuc.edu/HDF5/doc/Copyright.html. If you do not have -dnl access to either file, you may request a copy from hdfhelp@ncsa.uiuc.edu. +dnl the COPYING file, which can be found at the root of the source code +dnl distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. +dnl If you do not have access to either file, you may request a copy from +dnl help@hdfgroup.org dnl dnl ------------------------------------------------------------------------- dnl ------------------------------------------------------------------------- diff --git a/m4/aclocal_fc.f90 b/m4/aclocal_fc.f90 index ddbe9c7..4c58e4e 100644 --- a/m4/aclocal_fc.f90 +++ b/m4/aclocal_fc.f90 @@ -1,3 +1,16 @@ +! COPYRIGHT +! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * +! Copyright by The HDF Group. * +! All rights reserved. * +! * +! This file is part of HDF5. The full HDF5 copyright notice, including * +! terms governing use, modification, and redistribution, is contained in * +! the COPYING file, which can be found at the root of the source code * +! distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * +! If you do not have access to either file, you may request a copy from * +! help@hdfgroup.org. * +! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * +! ! This file contains all the configure test programs ! used by autotools and cmake. This avoids having to ! duplicate code for both cmake and autotool tests. diff --git a/m4/aclocal_fc.m4 b/m4/aclocal_fc.m4 index 2213a7c..0bf3cb1 100644 --- a/m4/aclocal_fc.m4 +++ b/m4/aclocal_fc.m4 @@ -6,12 +6,10 @@ dnl All rights reserved. dnl dnl This file is part of HDF5. The full HDF5 copyright notice, including dnl terms governing use, modification, and redistribution, is contained in -dnl the files COPYING and Copyright.html. COPYING can be found at the root -dnl of the source code distribution tree; Copyright.html can be found at the -dnl root level of an installed copy of the electronic HDF5 document set and -dnl is linked from the top-level documents page. It can also be found at -dnl http://hdf.ncsa.uiuc.edu/HDF5/doc/Copyright.html. If you do not have -dnl access to either file, you may request a copy from hdfhelp@ncsa.uiuc.edu. +dnl the COPYING file, which can be found at the root of the source code +dnl distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. +dnl If you do not have access to either file, you may request a copy from +dnl help@hdfgroup.org dnl dnl ------------------------------------------------------------------------- dnl ------------------------------------------------------------------------- diff --git a/src/H5.c b/src/H5.c index 41fb3ba..5875906 100644 --- a/src/H5.c +++ b/src/H5.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /****************/ diff --git a/src/H5A.c b/src/H5A.c index e5a7ae5..cf48232 100644 --- a/src/H5A.c +++ b/src/H5A.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /****************/ diff --git a/src/H5AC.c b/src/H5AC.c index e2271c5..4223158 100644 --- a/src/H5AC.c +++ b/src/H5AC.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /*------------------------------------------------------------------------- diff --git a/src/H5ACdbg.c b/src/H5ACdbg.c index 6073288..c6d71a8 100644 --- a/src/H5ACdbg.c +++ b/src/H5ACdbg.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /*------------------------------------------------------------------------- diff --git a/src/H5AClog.c b/src/H5AClog.c index 780373e..51a2050 100644 --- a/src/H5AClog.c +++ b/src/H5AClog.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /*------------------------------------------------------------------------- diff --git a/src/H5ACmodule.h b/src/H5ACmodule.h index a8dba59..e218b31 100644 --- a/src/H5ACmodule.h +++ b/src/H5ACmodule.h @@ -4,12 +4,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* diff --git a/src/H5ACmpio.c b/src/H5ACmpio.c index 945aaba..d03c17b 100644 --- a/src/H5ACmpio.c +++ b/src/H5ACmpio.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /*------------------------------------------------------------------------- diff --git a/src/H5ACpkg.h b/src/H5ACpkg.h index 77ba0ae..ea7f0bf 100644 --- a/src/H5ACpkg.h +++ b/src/H5ACpkg.h @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* diff --git a/src/H5ACprivate.h b/src/H5ACprivate.h index a724394..b9e2a60 100644 --- a/src/H5ACprivate.h +++ b/src/H5ACprivate.h @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /*------------------------------------------------------------------------- diff --git a/src/H5ACproxy_entry.c b/src/H5ACproxy_entry.c index cee9b72..105a531 100644 --- a/src/H5ACproxy_entry.c +++ b/src/H5ACproxy_entry.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /*------------------------------------------------------------------------- diff --git a/src/H5ACpublic.h b/src/H5ACpublic.h index 5fdb3f4..301d713 100644 --- a/src/H5ACpublic.h +++ b/src/H5ACpublic.h @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /*------------------------------------------------------------------------- diff --git a/src/H5Abtree2.c b/src/H5Abtree2.c index a9c77d2..ed67e0f 100644 --- a/src/H5Abtree2.c +++ b/src/H5Abtree2.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /*------------------------------------------------------------------------- diff --git a/src/H5Adense.c b/src/H5Adense.c index 3dc3a42..b1903a4 100644 --- a/src/H5Adense.c +++ b/src/H5Adense.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /*------------------------------------------------------------------------- diff --git a/src/H5Adeprec.c b/src/H5Adeprec.c index a4713a7..9221254 100644 --- a/src/H5Adeprec.c +++ b/src/H5Adeprec.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /*------------------------------------------------------------------------- diff --git a/src/H5Aint.c b/src/H5Aint.c index e31cd83..160c7fb 100644 --- a/src/H5Aint.c +++ b/src/H5Aint.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /*------------------------------------------------------------------------- diff --git a/src/H5Amodule.h b/src/H5Amodule.h index e347fe1..8ed056b 100644 --- a/src/H5Amodule.h +++ b/src/H5Amodule.h @@ -4,12 +4,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* diff --git a/src/H5Apkg.h b/src/H5Apkg.h index 5858147..6d5a83a 100644 --- a/src/H5Apkg.h +++ b/src/H5Apkg.h @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* diff --git a/src/H5Aprivate.h b/src/H5Aprivate.h index 6b62692..b285920 100644 --- a/src/H5Aprivate.h +++ b/src/H5Aprivate.h @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* diff --git a/src/H5Apublic.h b/src/H5Apublic.h index 99ca90e..586940b 100644 --- a/src/H5Apublic.h +++ b/src/H5Apublic.h @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* diff --git a/src/H5Atest.c b/src/H5Atest.c index 3dcca87..b923637 100644 --- a/src/H5Atest.c +++ b/src/H5Atest.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /*------------------------------------------------------------------------- diff --git a/src/H5B.c b/src/H5B.c index 2c49c81..e64a695 100644 --- a/src/H5B.c +++ b/src/H5B.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /*------------------------------------------------------------------------- diff --git a/src/H5B2.c b/src/H5B2.c index e9f6150..7e679cd 100644 --- a/src/H5B2.c +++ b/src/H5B2.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /*------------------------------------------------------------------------- diff --git a/src/H5B2cache.c b/src/H5B2cache.c index e9b6a41..2e1d37b 100644 --- a/src/H5B2cache.c +++ b/src/H5B2cache.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /*------------------------------------------------------------------------- diff --git a/src/H5B2dbg.c b/src/H5B2dbg.c index 19ca89a..3890ae0 100644 --- a/src/H5B2dbg.c +++ b/src/H5B2dbg.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /*------------------------------------------------------------------------- diff --git a/src/H5B2hdr.c b/src/H5B2hdr.c index 251a33d..ab017c6 100644 --- a/src/H5B2hdr.c +++ b/src/H5B2hdr.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /*------------------------------------------------------------------------- diff --git a/src/H5B2int.c b/src/H5B2int.c index 47100fd..c72bc98 100644 --- a/src/H5B2int.c +++ b/src/H5B2int.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /*------------------------------------------------------------------------- diff --git a/src/H5B2internal.c b/src/H5B2internal.c index e74ae59..1716c44 100644 --- a/src/H5B2internal.c +++ b/src/H5B2internal.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /*------------------------------------------------------------------------- diff --git a/src/H5B2leaf.c b/src/H5B2leaf.c index 4f8b8e6..d900761 100644 --- a/src/H5B2leaf.c +++ b/src/H5B2leaf.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /*------------------------------------------------------------------------- diff --git a/src/H5B2module.h b/src/H5B2module.h index 0fc30a5..35c982c 100644 --- a/src/H5B2module.h +++ b/src/H5B2module.h @@ -4,12 +4,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* diff --git a/src/H5B2pkg.h b/src/H5B2pkg.h index 71fdfde..e24d2eb 100644 --- a/src/H5B2pkg.h +++ b/src/H5B2pkg.h @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* diff --git a/src/H5B2private.h b/src/H5B2private.h index 161e25e..e4bbffa 100644 --- a/src/H5B2private.h +++ b/src/H5B2private.h @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /*------------------------------------------------------------------------- diff --git a/src/H5B2public.h b/src/H5B2public.h index 43ec5d7..6e0b964 100644 --- a/src/H5B2public.h +++ b/src/H5B2public.h @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /*------------------------------------------------------------------------- diff --git a/src/H5B2stat.c b/src/H5B2stat.c index da721c6..df99ad5 100644 --- a/src/H5B2stat.c +++ b/src/H5B2stat.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* Programmer: Quincey Koziol diff --git a/src/H5B2test.c b/src/H5B2test.c index aec2aba..c10e5a8 100644 --- a/src/H5B2test.c +++ b/src/H5B2test.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* Programmer: Quincey Koziol diff --git a/src/H5Bcache.c b/src/H5Bcache.c index b2be829..a0a75c8 100644 --- a/src/H5Bcache.c +++ b/src/H5Bcache.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /*------------------------------------------------------------------------- diff --git a/src/H5Bdbg.c b/src/H5Bdbg.c index b22264d..3881b44 100644 --- a/src/H5Bdbg.c +++ b/src/H5Bdbg.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /*------------------------------------------------------------------------- diff --git a/src/H5Bmodule.h b/src/H5Bmodule.h index 6800b26..bc46752 100644 --- a/src/H5Bmodule.h +++ b/src/H5Bmodule.h @@ -4,12 +4,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* diff --git a/src/H5Bpkg.h b/src/H5Bpkg.h index fb93b8a..14dce4f 100644 --- a/src/H5Bpkg.h +++ b/src/H5Bpkg.h @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* diff --git a/src/H5Bprivate.h b/src/H5Bprivate.h index 02fb82c..cb038ec 100644 --- a/src/H5Bprivate.h +++ b/src/H5Bprivate.h @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /*------------------------------------------------------------------------- diff --git a/src/H5Bpublic.h b/src/H5Bpublic.h index 0016996..1764f61 100644 --- a/src/H5Bpublic.h +++ b/src/H5Bpublic.h @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /*------------------------------------------------------------------------- diff --git a/src/H5C.c b/src/H5C.c index 2ba9f2d..e6770ec 100644 --- a/src/H5C.c +++ b/src/H5C.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /*------------------------------------------------------------------------- diff --git a/src/H5CS.c b/src/H5CS.c index 477b5f9..0a3dcce 100644 --- a/src/H5CS.c +++ b/src/H5CS.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* diff --git a/src/H5CSprivate.h b/src/H5CSprivate.h index ab7f993..467dd9d 100644 --- a/src/H5CSprivate.h +++ b/src/H5CSprivate.h @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* diff --git a/src/H5Cdbg.c b/src/H5Cdbg.c index 85f25b3..4a08d9b 100644 --- a/src/H5Cdbg.c +++ b/src/H5Cdbg.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /*------------------------------------------------------------------------- diff --git a/src/H5Cepoch.c b/src/H5Cepoch.c index 655d795..f8507a9 100644 --- a/src/H5Cepoch.c +++ b/src/H5Cepoch.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /*------------------------------------------------------------------------- diff --git a/src/H5Cimage.c b/src/H5Cimage.c index d60ee05..debd30c 100644 --- a/src/H5Cimage.c +++ b/src/H5Cimage.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /*------------------------------------------------------------------------- diff --git a/src/H5Clog.c b/src/H5Clog.c index e3e4388..3353619 100644 --- a/src/H5Clog.c +++ b/src/H5Clog.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /*------------------------------------------------------------------------- diff --git a/src/H5Cmodule.h b/src/H5Cmodule.h index 2c39eab..534404d 100644 --- a/src/H5Cmodule.h +++ b/src/H5Cmodule.h @@ -4,12 +4,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* diff --git a/src/H5Cmpio.c b/src/H5Cmpio.c index 0d1a3ff..a75cd88 100644 --- a/src/H5Cmpio.c +++ b/src/H5Cmpio.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /*------------------------------------------------------------------------- diff --git a/src/H5Cpkg.h b/src/H5Cpkg.h index 90a84c4..fdb14a5 100644 --- a/src/H5Cpkg.h +++ b/src/H5Cpkg.h @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* diff --git a/src/H5Cprefetched.c b/src/H5Cprefetched.c index 9b11006..6237d57 100644 --- a/src/H5Cprefetched.c +++ b/src/H5Cprefetched.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /*------------------------------------------------------------------------- diff --git a/src/H5Cprivate.h b/src/H5Cprivate.h index 5c5a666..5335f80 100644 --- a/src/H5Cprivate.h +++ b/src/H5Cprivate.h @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /*------------------------------------------------------------------------- diff --git a/src/H5Cpublic.h b/src/H5Cpublic.h index 39ebbe3..62107d9 100644 --- a/src/H5Cpublic.h +++ b/src/H5Cpublic.h @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /*------------------------------------------------------------------------- diff --git a/src/H5Cquery.c b/src/H5Cquery.c index 5108013..6c927b0 100644 --- a/src/H5Cquery.c +++ b/src/H5Cquery.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /*------------------------------------------------------------------------- diff --git a/src/H5Ctag.c b/src/H5Ctag.c index 0170ce9..a9b2ec0 100644 --- a/src/H5Ctag.c +++ b/src/H5Ctag.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /*------------------------------------------------------------------------- diff --git a/src/H5Ctest.c b/src/H5Ctest.c index 876b63a..2cd0a5d 100644 --- a/src/H5Ctest.c +++ b/src/H5Ctest.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /*------------------------------------------------------------------------- diff --git a/src/H5D.c b/src/H5D.c index 44e4baa..6f69ee4 100644 --- a/src/H5D.c +++ b/src/H5D.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /****************/ diff --git a/src/H5Dbtree.c b/src/H5Dbtree.c index 8ef14b9..8177e13 100644 --- a/src/H5Dbtree.c +++ b/src/H5Dbtree.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* Programmer: Robb Matzke diff --git a/src/H5Dbtree2.c b/src/H5Dbtree2.c index f687a5d..2e19392 100644 --- a/src/H5Dbtree2.c +++ b/src/H5Dbtree2.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* diff --git a/src/H5Dchunk.c b/src/H5Dchunk.c index 63e692f..ce684a0 100644 --- a/src/H5Dchunk.c +++ b/src/H5Dchunk.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* Programmer: Quincey Koziol diff --git a/src/H5Dcompact.c b/src/H5Dcompact.c index 224a1d1..2578975 100644 --- a/src/H5Dcompact.c +++ b/src/H5Dcompact.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* diff --git a/src/H5Dcontig.c b/src/H5Dcontig.c index a24abe6..0ee4d28 100644 --- a/src/H5Dcontig.c +++ b/src/H5Dcontig.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* diff --git a/src/H5Ddbg.c b/src/H5Ddbg.c index a6c130e..b1efb20 100644 --- a/src/H5Ddbg.c +++ b/src/H5Ddbg.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /****************/ diff --git a/src/H5Ddeprec.c b/src/H5Ddeprec.c index c6a03c2..8d9461c 100644 --- a/src/H5Ddeprec.c +++ b/src/H5Ddeprec.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /*------------------------------------------------------------------------- diff --git a/src/H5Dearray.c b/src/H5Dearray.c index 240afb7..1df0a58 100644 --- a/src/H5Dearray.c +++ b/src/H5Dearray.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* Programmer: Quincey Koziol diff --git a/src/H5Defl.c b/src/H5Defl.c index 387cbe3..5536ba3 100644 --- a/src/H5Defl.c +++ b/src/H5Defl.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* diff --git a/src/H5Dfarray.c b/src/H5Dfarray.c index 6b95e12..d183a8c 100644 --- a/src/H5Dfarray.c +++ b/src/H5Dfarray.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* Programmer: Vailin Choi diff --git a/src/H5Dfill.c b/src/H5Dfill.c index 50c964b..922ac98 100644 --- a/src/H5Dfill.c +++ b/src/H5Dfill.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /*------------------------------------------------------------------------- diff --git a/src/H5Dint.c b/src/H5Dint.c index 2048e49..1813ca6 100644 --- a/src/H5Dint.c +++ b/src/H5Dint.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /****************/ diff --git a/src/H5Dio.c b/src/H5Dio.c index f5087da..dfd3f17 100644 --- a/src/H5Dio.c +++ b/src/H5Dio.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /****************/ diff --git a/src/H5Dlayout.c b/src/H5Dlayout.c index cb2eca2..c2fb5c2 100644 --- a/src/H5Dlayout.c +++ b/src/H5Dlayout.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /****************/ diff --git a/src/H5Dmodule.h b/src/H5Dmodule.h index 9b0c411..b259b69 100644 --- a/src/H5Dmodule.h +++ b/src/H5Dmodule.h @@ -4,12 +4,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* diff --git a/src/H5Dmpio.c b/src/H5Dmpio.c index 441cc96..0389c72 100644 --- a/src/H5Dmpio.c +++ b/src/H5Dmpio.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* diff --git a/src/H5Dnone.c b/src/H5Dnone.c index 0cadac2..97ec5d6 100644 --- a/src/H5Dnone.c +++ b/src/H5Dnone.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* Programmer: Vailin Choi diff --git a/src/H5Doh.c b/src/H5Doh.c index 5cdf4bc..9abbdff 100644 --- a/src/H5Doh.c +++ b/src/H5Doh.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /****************/ diff --git a/src/H5Dpkg.h b/src/H5Dpkg.h index f54a9f2..8a4711f 100644 --- a/src/H5Dpkg.h +++ b/src/H5Dpkg.h @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* diff --git a/src/H5Dprivate.h b/src/H5Dprivate.h index ea2b8c8..5d565bb 100644 --- a/src/H5Dprivate.h +++ b/src/H5Dprivate.h @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* diff --git a/src/H5Dpublic.h b/src/H5Dpublic.h index 81ae67d..fe408b2 100644 --- a/src/H5Dpublic.h +++ b/src/H5Dpublic.h @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* diff --git a/src/H5Dscatgath.c b/src/H5Dscatgath.c index 55111f0..4625c7a 100644 --- a/src/H5Dscatgath.c +++ b/src/H5Dscatgath.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /****************/ diff --git a/src/H5Dselect.c b/src/H5Dselect.c index 53829e5..b4d0515 100644 --- a/src/H5Dselect.c +++ b/src/H5Dselect.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* Programmer: Quincey Koziol diff --git a/src/H5Dsingle.c b/src/H5Dsingle.c index 04b8971..e999449 100644 --- a/src/H5Dsingle.c +++ b/src/H5Dsingle.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* Programmer: Vailin Choi diff --git a/src/H5Dtest.c b/src/H5Dtest.c index 56f14f7..2fc71a0 100644 --- a/src/H5Dtest.c +++ b/src/H5Dtest.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* Programmer: Quincey Koziol diff --git a/src/H5Dvirtual.c b/src/H5Dvirtual.c index c85b1e9..3be2353 100644 --- a/src/H5Dvirtual.c +++ b/src/H5Dvirtual.c @@ -4,12 +4,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* diff --git a/src/H5E.c b/src/H5E.c index aa4511b..741f0dd 100644 --- a/src/H5E.c +++ b/src/H5E.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* diff --git a/src/H5EA.c b/src/H5EA.c index e35a4ed..c524d49 100644 --- a/src/H5EA.c +++ b/src/H5EA.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /*------------------------------------------------------------------------- diff --git a/src/H5EAcache.c b/src/H5EAcache.c index 894b31a..def38af 100644 --- a/src/H5EAcache.c +++ b/src/H5EAcache.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /*------------------------------------------------------------------------- diff --git a/src/H5EAdbg.c b/src/H5EAdbg.c index ef45881..e67a5a8 100644 --- a/src/H5EAdbg.c +++ b/src/H5EAdbg.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /*------------------------------------------------------------------------- diff --git a/src/H5EAdblkpage.c b/src/H5EAdblkpage.c index 927dcb6..2b07356 100644 --- a/src/H5EAdblkpage.c +++ b/src/H5EAdblkpage.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /*------------------------------------------------------------------------- diff --git a/src/H5EAdblock.c b/src/H5EAdblock.c index c288c69..7df0ee9 100644 --- a/src/H5EAdblock.c +++ b/src/H5EAdblock.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /*------------------------------------------------------------------------- diff --git a/src/H5EAhdr.c b/src/H5EAhdr.c index 76d8733..92d7c4d 100644 --- a/src/H5EAhdr.c +++ b/src/H5EAhdr.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /*------------------------------------------------------------------------- diff --git a/src/H5EAiblock.c b/src/H5EAiblock.c index a3723c5..e25e3ef 100644 --- a/src/H5EAiblock.c +++ b/src/H5EAiblock.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /*------------------------------------------------------------------------- diff --git a/src/H5EAint.c b/src/H5EAint.c index 9f910d0..2baf1f4 100644 --- a/src/H5EAint.c +++ b/src/H5EAint.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /*------------------------------------------------------------------------- diff --git a/src/H5EAmodule.h b/src/H5EAmodule.h index 405b232..d3e06b7 100644 --- a/src/H5EAmodule.h +++ b/src/H5EAmodule.h @@ -4,12 +4,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* diff --git a/src/H5EApkg.h b/src/H5EApkg.h index 7540ff2..e162fab 100644 --- a/src/H5EApkg.h +++ b/src/H5EApkg.h @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* diff --git a/src/H5EAprivate.h b/src/H5EAprivate.h index 66d88e0..cda1d46 100644 --- a/src/H5EAprivate.h +++ b/src/H5EAprivate.h @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /*------------------------------------------------------------------------- diff --git a/src/H5EAsblock.c b/src/H5EAsblock.c index 2fa87e0..4e291c0 100644 --- a/src/H5EAsblock.c +++ b/src/H5EAsblock.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /*------------------------------------------------------------------------- diff --git a/src/H5EAstat.c b/src/H5EAstat.c index 0c27681..72c4d14 100644 --- a/src/H5EAstat.c +++ b/src/H5EAstat.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /*------------------------------------------------------------------------- diff --git a/src/H5EAtest.c b/src/H5EAtest.c index 905aa7f..422ea68 100644 --- a/src/H5EAtest.c +++ b/src/H5EAtest.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* Programmer: Quincey Koziol diff --git a/src/H5Edeprec.c b/src/H5Edeprec.c index 1a13c01..f579773 100644 --- a/src/H5Edeprec.c +++ b/src/H5Edeprec.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /*------------------------------------------------------------------------- diff --git a/src/H5Eint.c b/src/H5Eint.c index 8eea147..110c6bb 100644 --- a/src/H5Eint.c +++ b/src/H5Eint.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /*------------------------------------------------------------------------- diff --git a/src/H5Emodule.h b/src/H5Emodule.h index d624409..2d1bcd0 100644 --- a/src/H5Emodule.h +++ b/src/H5Emodule.h @@ -4,12 +4,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* diff --git a/src/H5Epkg.h b/src/H5Epkg.h index 3af653a..90f4f80 100644 --- a/src/H5Epkg.h +++ b/src/H5Epkg.h @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* diff --git a/src/H5Eprivate.h b/src/H5Eprivate.h index db413e3..57e7485 100644 --- a/src/H5Eprivate.h +++ b/src/H5Eprivate.h @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* diff --git a/src/H5Epublic.h b/src/H5Epublic.h index 17a35d9..3eae2da 100644 --- a/src/H5Epublic.h +++ b/src/H5Epublic.h @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* diff --git a/src/H5F.c b/src/H5F.c index aef9d1d..78fce2a 100644 --- a/src/H5F.c +++ b/src/H5F.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /****************/ diff --git a/src/H5FA.c b/src/H5FA.c index 90144e7..d421eec 100644 --- a/src/H5FA.c +++ b/src/H5FA.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /*------------------------------------------------------------------------- diff --git a/src/H5FAcache.c b/src/H5FAcache.c index 40117a7..19fdb74 100644 --- a/src/H5FAcache.c +++ b/src/H5FAcache.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /*------------------------------------------------------------------------- diff --git a/src/H5FAdbg.c b/src/H5FAdbg.c index 2dc51c5..7444eae 100644 --- a/src/H5FAdbg.c +++ b/src/H5FAdbg.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /*------------------------------------------------------------------------- diff --git a/src/H5FAdblkpage.c b/src/H5FAdblkpage.c index 09278f8..baf4286 100644 --- a/src/H5FAdblkpage.c +++ b/src/H5FAdblkpage.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /*------------------------------------------------------------------------- diff --git a/src/H5FAdblock.c b/src/H5FAdblock.c index 440447d..432bf58 100644 --- a/src/H5FAdblock.c +++ b/src/H5FAdblock.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /*------------------------------------------------------------------------- diff --git a/src/H5FAhdr.c b/src/H5FAhdr.c index 52b90d1..6809f02 100644 --- a/src/H5FAhdr.c +++ b/src/H5FAhdr.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /*------------------------------------------------------------------------- diff --git a/src/H5FAint.c b/src/H5FAint.c index 331227b..9d3bce8 100644 --- a/src/H5FAint.c +++ b/src/H5FAint.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /*------------------------------------------------------------------------- diff --git a/src/H5FAmodule.h b/src/H5FAmodule.h index e46b071..f675faf 100644 --- a/src/H5FAmodule.h +++ b/src/H5FAmodule.h @@ -4,12 +4,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* diff --git a/src/H5FApkg.h b/src/H5FApkg.h index 63eacff..6f0a43a 100644 --- a/src/H5FApkg.h +++ b/src/H5FApkg.h @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* diff --git a/src/H5FAprivate.h b/src/H5FAprivate.h index 612f3a2..1e44126 100644 --- a/src/H5FAprivate.h +++ b/src/H5FAprivate.h @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /*------------------------------------------------------------------------- diff --git a/src/H5FAstat.c b/src/H5FAstat.c index 72fa0de..3c06855 100644 --- a/src/H5FAstat.c +++ b/src/H5FAstat.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /*------------------------------------------------------------------------- diff --git a/src/H5FAtest.c b/src/H5FAtest.c index 091f284..3c6d8e4 100644 --- a/src/H5FAtest.c +++ b/src/H5FAtest.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* diff --git a/src/H5FD.c b/src/H5FD.c index 96d1230..dcfaa6d 100644 --- a/src/H5FD.c +++ b/src/H5FD.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* diff --git a/src/H5FDcore.c b/src/H5FDcore.c index 9090679..d100a8b 100644 --- a/src/H5FDcore.c +++ b/src/H5FDcore.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* diff --git a/src/H5FDcore.h b/src/H5FDcore.h index 16cce89..5fe2912 100644 --- a/src/H5FDcore.h +++ b/src/H5FDcore.h @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* diff --git a/src/H5FDdirect.c b/src/H5FDdirect.c index 2034ba0..1487cda 100644 --- a/src/H5FDdirect.c +++ b/src/H5FDdirect.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* diff --git a/src/H5FDdirect.h b/src/H5FDdirect.h index 5ceb91f..805f3be 100644 --- a/src/H5FDdirect.h +++ b/src/H5FDdirect.h @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* diff --git a/src/H5FDdrvr_module.h b/src/H5FDdrvr_module.h index 8bb83a1..59a419e 100644 --- a/src/H5FDdrvr_module.h +++ b/src/H5FDdrvr_module.h @@ -4,12 +4,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* diff --git a/src/H5FDfamily.c b/src/H5FDfamily.c index 4c4cad0..98ece84 100644 --- a/src/H5FDfamily.c +++ b/src/H5FDfamily.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* diff --git a/src/H5FDfamily.h b/src/H5FDfamily.h index 80969c3..1584cf6 100644 --- a/src/H5FDfamily.h +++ b/src/H5FDfamily.h @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* diff --git a/src/H5FDint.c b/src/H5FDint.c index 0809ac8..bc322d6 100644 --- a/src/H5FDint.c +++ b/src/H5FDint.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /*------------------------------------------------------------------------- diff --git a/src/H5FDlog.c b/src/H5FDlog.c index f320946..75333c2 100644 --- a/src/H5FDlog.c +++ b/src/H5FDlog.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* diff --git a/src/H5FDlog.h b/src/H5FDlog.h index 11044e2..a69bb18 100644 --- a/src/H5FDlog.h +++ b/src/H5FDlog.h @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* diff --git a/src/H5FDmodule.h b/src/H5FDmodule.h index 6358e86..ea1a9fd 100644 --- a/src/H5FDmodule.h +++ b/src/H5FDmodule.h @@ -4,12 +4,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* diff --git a/src/H5FDmpi.c b/src/H5FDmpi.c index bf4e03a..16be455 100644 --- a/src/H5FDmpi.c +++ b/src/H5FDmpi.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* diff --git a/src/H5FDmpi.h b/src/H5FDmpi.h index 784fe70..2d62c79 100644 --- a/src/H5FDmpi.h +++ b/src/H5FDmpi.h @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* diff --git a/src/H5FDmpio.c b/src/H5FDmpio.c index 9417d46..ace91f8 100644 --- a/src/H5FDmpio.c +++ b/src/H5FDmpio.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* diff --git a/src/H5FDmpio.h b/src/H5FDmpio.h index 858e8ba..6ee0a1a 100644 --- a/src/H5FDmpio.h +++ b/src/H5FDmpio.h @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* diff --git a/src/H5FDmulti.c b/src/H5FDmulti.c index 0ab7fc5..8ae23d2 100644 --- a/src/H5FDmulti.c +++ b/src/H5FDmulti.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* diff --git a/src/H5FDmulti.h b/src/H5FDmulti.h index e819e74..0bd5718 100644 --- a/src/H5FDmulti.h +++ b/src/H5FDmulti.h @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* diff --git a/src/H5FDpkg.h b/src/H5FDpkg.h index 45bcfd8..31dcf8d 100644 --- a/src/H5FDpkg.h +++ b/src/H5FDpkg.h @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* diff --git a/src/H5FDprivate.h b/src/H5FDprivate.h index fb7c43c..0fc2135 100644 --- a/src/H5FDprivate.h +++ b/src/H5FDprivate.h @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* diff --git a/src/H5FDpublic.h b/src/H5FDpublic.h index 883b28d..3032e8a 100644 --- a/src/H5FDpublic.h +++ b/src/H5FDpublic.h @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* diff --git a/src/H5FDsec2.c b/src/H5FDsec2.c index 0ca5efb..26913e2 100644 --- a/src/H5FDsec2.c +++ b/src/H5FDsec2.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* diff --git a/src/H5FDsec2.h b/src/H5FDsec2.h index 0c62597..a4ade0b 100644 --- a/src/H5FDsec2.h +++ b/src/H5FDsec2.h @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* diff --git a/src/H5FDspace.c b/src/H5FDspace.c index 0ad3cf0..e451d6b 100644 --- a/src/H5FDspace.c +++ b/src/H5FDspace.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /*------------------------------------------------------------------------- diff --git a/src/H5FDstdio.c b/src/H5FDstdio.c index 13f728e..5023af3 100644 --- a/src/H5FDstdio.c +++ b/src/H5FDstdio.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* Programmer: Robb Matzke diff --git a/src/H5FDstdio.h b/src/H5FDstdio.h index 8281705..f99aacf 100644 --- a/src/H5FDstdio.h +++ b/src/H5FDstdio.h @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* diff --git a/src/H5FDtest.c b/src/H5FDtest.c index fc9188b..f528dfb 100644 --- a/src/H5FDtest.c +++ b/src/H5FDtest.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /*------------------------------------------------------------------------- diff --git a/src/H5FDwindows.c b/src/H5FDwindows.c index 8dd7555..76c4f18 100644 --- a/src/H5FDwindows.c +++ b/src/H5FDwindows.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #include "H5private.h" /* Generic Functions */ diff --git a/src/H5FDwindows.h b/src/H5FDwindows.h index 7a9d2cf..5cf68a1 100644 --- a/src/H5FDwindows.h +++ b/src/H5FDwindows.h @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* diff --git a/src/H5FL.c b/src/H5FL.c index db51809..0e67414 100644 --- a/src/H5FL.c +++ b/src/H5FL.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* diff --git a/src/H5FLmodule.h b/src/H5FLmodule.h index cfa585c..48b8d2b 100644 --- a/src/H5FLmodule.h +++ b/src/H5FLmodule.h @@ -4,12 +4,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* diff --git a/src/H5FLprivate.h b/src/H5FLprivate.h index f44d359..4aa44f9 100644 --- a/src/H5FLprivate.h +++ b/src/H5FLprivate.h @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /*------------------------------------------------------------------------- diff --git a/src/H5FO.c b/src/H5FO.c index a77e268..627ee64 100644 --- a/src/H5FO.c +++ b/src/H5FO.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* diff --git a/src/H5FOprivate.h b/src/H5FOprivate.h index 4648f02..aa85c29 100644 --- a/src/H5FOprivate.h +++ b/src/H5FOprivate.h @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* diff --git a/src/H5FS.c b/src/H5FS.c index a433fbb..b789dfd 100644 --- a/src/H5FS.c +++ b/src/H5FS.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* diff --git a/src/H5FScache.c b/src/H5FScache.c index ddc66fd..628fba0 100644 --- a/src/H5FScache.c +++ b/src/H5FScache.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /*------------------------------------------------------------------------- diff --git a/src/H5FSdbg.c b/src/H5FSdbg.c index fbdeb70..450216b 100644 --- a/src/H5FSdbg.c +++ b/src/H5FSdbg.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /*------------------------------------------------------------------------- diff --git a/src/H5FSint.c b/src/H5FSint.c index 60cedd5..1a41172 100644 --- a/src/H5FSint.c +++ b/src/H5FSint.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /*------------------------------------------------------------------------- diff --git a/src/H5FSmodule.h b/src/H5FSmodule.h index b435b79..b2869dd 100644 --- a/src/H5FSmodule.h +++ b/src/H5FSmodule.h @@ -4,12 +4,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* diff --git a/src/H5FSpkg.h b/src/H5FSpkg.h index ab97955..df1d92f 100644 --- a/src/H5FSpkg.h +++ b/src/H5FSpkg.h @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* diff --git a/src/H5FSprivate.h b/src/H5FSprivate.h index 74f9dcb..c0467a6 100644 --- a/src/H5FSprivate.h +++ b/src/H5FSprivate.h @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /*------------------------------------------------------------------------- diff --git a/src/H5FSpublic.h b/src/H5FSpublic.h index 87debe8..3090d0d 100644 --- a/src/H5FSpublic.h +++ b/src/H5FSpublic.h @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /*------------------------------------------------------------------------- diff --git a/src/H5FSsection.c b/src/H5FSsection.c index 49ff003..8f911a4 100644 --- a/src/H5FSsection.c +++ b/src/H5FSsection.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* diff --git a/src/H5FSstat.c b/src/H5FSstat.c index 3200849..e2ad5bb 100644 --- a/src/H5FSstat.c +++ b/src/H5FSstat.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* diff --git a/src/H5FStest.c b/src/H5FStest.c index 06f5166..5ab0219 100644 --- a/src/H5FStest.c +++ b/src/H5FStest.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* diff --git a/src/H5Faccum.c b/src/H5Faccum.c index 7f3bb39..e84cfda 100644 --- a/src/H5Faccum.c +++ b/src/H5Faccum.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /*------------------------------------------------------------------------- diff --git a/src/H5Fcwfs.c b/src/H5Fcwfs.c index 32c73b0..04b86d2 100644 --- a/src/H5Fcwfs.c +++ b/src/H5Fcwfs.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* diff --git a/src/H5Fdbg.c b/src/H5Fdbg.c index 11accc6..535b43d 100644 --- a/src/H5Fdbg.c +++ b/src/H5Fdbg.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* Programmer: Quincey Koziol diff --git a/src/H5Fdeprec.c b/src/H5Fdeprec.c index 4a3bce0..03f5df8 100644 --- a/src/H5Fdeprec.c +++ b/src/H5Fdeprec.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /*------------------------------------------------------------------------- diff --git a/src/H5Fefc.c b/src/H5Fefc.c index 42bf5d8..5652d15 100644 --- a/src/H5Fefc.c +++ b/src/H5Fefc.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /*------------------------------------------------------------------------- diff --git a/src/H5Ffake.c b/src/H5Ffake.c index e191003..6072f2e 100644 --- a/src/H5Ffake.c +++ b/src/H5Ffake.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #include "H5Fmodule.h" /* This source code file is part of the H5F module */ diff --git a/src/H5Fint.c b/src/H5Fint.c index 444d409..fe532b2 100644 --- a/src/H5Fint.c +++ b/src/H5Fint.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /****************/ diff --git a/src/H5Fio.c b/src/H5Fio.c index 6d23995..81fa514 100644 --- a/src/H5Fio.c +++ b/src/H5Fio.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /*------------------------------------------------------------------------- diff --git a/src/H5Fmodule.h b/src/H5Fmodule.h index 4bb2506..0481512 100644 --- a/src/H5Fmodule.h +++ b/src/H5Fmodule.h @@ -4,12 +4,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* diff --git a/src/H5Fmount.c b/src/H5Fmount.c index 859b9d6..3cd5c21 100644 --- a/src/H5Fmount.c +++ b/src/H5Fmount.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #include "H5Fmodule.h" /* This source code file is part of the H5F module */ diff --git a/src/H5Fmpi.c b/src/H5Fmpi.c index 60593a8..2ce454a 100644 --- a/src/H5Fmpi.c +++ b/src/H5Fmpi.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /*------------------------------------------------------------------------- diff --git a/src/H5Fpkg.h b/src/H5Fpkg.h index 4dd9e20..7a5c126 100644 --- a/src/H5Fpkg.h +++ b/src/H5Fpkg.h @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* diff --git a/src/H5Fprivate.h b/src/H5Fprivate.h index 8ef353a..6f68a62 100644 --- a/src/H5Fprivate.h +++ b/src/H5Fprivate.h @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* diff --git a/src/H5Fpublic.h b/src/H5Fpublic.h index 84c0d38..1594cb2 100644 --- a/src/H5Fpublic.h +++ b/src/H5Fpublic.h @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* diff --git a/src/H5Fquery.c b/src/H5Fquery.c index 34fe8f9..41cf4d2 100644 --- a/src/H5Fquery.c +++ b/src/H5Fquery.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /*------------------------------------------------------------------------- diff --git a/src/H5Fsfile.c b/src/H5Fsfile.c index 4fb9cd9..e0c830b 100644 --- a/src/H5Fsfile.c +++ b/src/H5Fsfile.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #include "H5Fmodule.h" /* This source code file is part of the H5F module */ diff --git a/src/H5Fspace.c b/src/H5Fspace.c index 53570f6..0962f69 100644 --- a/src/H5Fspace.c +++ b/src/H5Fspace.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /*------------------------------------------------------------------------- diff --git a/src/H5Fsuper.c b/src/H5Fsuper.c index 58ef9bb..7c70a64 100644 --- a/src/H5Fsuper.c +++ b/src/H5Fsuper.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /****************/ diff --git a/src/H5Fsuper_cache.c b/src/H5Fsuper_cache.c index fa893e1..76866db 100644 --- a/src/H5Fsuper_cache.c +++ b/src/H5Fsuper_cache.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /*------------------------------------------------------------------------- diff --git a/src/H5Ftest.c b/src/H5Ftest.c index e3760b7..dd69b1e 100644 --- a/src/H5Ftest.c +++ b/src/H5Ftest.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /*------------------------------------------------------------------------- diff --git a/src/H5G.c b/src/H5G.c index 1a18dc0..10eb5ed 100644 --- a/src/H5G.c +++ b/src/H5G.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /*------------------------------------------------------------------------- diff --git a/src/H5Gbtree2.c b/src/H5Gbtree2.c index ff7e200..71d15e5 100644 --- a/src/H5Gbtree2.c +++ b/src/H5Gbtree2.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /*------------------------------------------------------------------------- diff --git a/src/H5Gcache.c b/src/H5Gcache.c index d153560..65115a5 100644 --- a/src/H5Gcache.c +++ b/src/H5Gcache.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /*------------------------------------------------------------------------- diff --git a/src/H5Gcompact.c b/src/H5Gcompact.c index 41ca4f5..d5698a8 100644 --- a/src/H5Gcompact.c +++ b/src/H5Gcompact.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /*------------------------------------------------------------------------- diff --git a/src/H5Gdense.c b/src/H5Gdense.c index e8fa237..4ae6800 100644 --- a/src/H5Gdense.c +++ b/src/H5Gdense.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /*------------------------------------------------------------------------- diff --git a/src/H5Gdeprec.c b/src/H5Gdeprec.c index a775c58..228fb9c 100644 --- a/src/H5Gdeprec.c +++ b/src/H5Gdeprec.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /*------------------------------------------------------------------------- diff --git a/src/H5Gent.c b/src/H5Gent.c index f64eaf0..b781fae 100644 --- a/src/H5Gent.c +++ b/src/H5Gent.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* diff --git a/src/H5Gint.c b/src/H5Gint.c index 72cc1a4..6d33716 100644 --- a/src/H5Gint.c +++ b/src/H5Gint.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /*------------------------------------------------------------------------- diff --git a/src/H5Glink.c b/src/H5Glink.c index 5a195c8..d246ee7 100644 --- a/src/H5Glink.c +++ b/src/H5Glink.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /*------------------------------------------------------------------------- diff --git a/src/H5Gloc.c b/src/H5Gloc.c index 3fcbd09..c011cdf 100644 --- a/src/H5Gloc.c +++ b/src/H5Gloc.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /*------------------------------------------------------------------------- diff --git a/src/H5Gmodule.h b/src/H5Gmodule.h index 52ac067..19ea982 100644 --- a/src/H5Gmodule.h +++ b/src/H5Gmodule.h @@ -4,12 +4,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* diff --git a/src/H5Gname.c b/src/H5Gname.c index aff9d31..7b53668 100644 --- a/src/H5Gname.c +++ b/src/H5Gname.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /*------------------------------------------------------------------------- diff --git a/src/H5Gnode.c b/src/H5Gnode.c index 89d1df8..20924ee 100644 --- a/src/H5Gnode.c +++ b/src/H5Gnode.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /*------------------------------------------------------------------------- diff --git a/src/H5Gobj.c b/src/H5Gobj.c index 92ad0af..d2dc83b 100644 --- a/src/H5Gobj.c +++ b/src/H5Gobj.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /*------------------------------------------------------------------------- diff --git a/src/H5Goh.c b/src/H5Goh.c index bde540c..977fc2d 100644 --- a/src/H5Goh.c +++ b/src/H5Goh.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /****************/ diff --git a/src/H5Gpkg.h b/src/H5Gpkg.h index 1e8ad31..76bf08b 100644 --- a/src/H5Gpkg.h +++ b/src/H5Gpkg.h @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* diff --git a/src/H5Gprivate.h b/src/H5Gprivate.h index 2ef99fd..c48e687 100644 --- a/src/H5Gprivate.h +++ b/src/H5Gprivate.h @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /*------------------------------------------------------------------------- diff --git a/src/H5Gpublic.h b/src/H5Gpublic.h index 9d8ade5..ab6f200 100644 --- a/src/H5Gpublic.h +++ b/src/H5Gpublic.h @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /*------------------------------------------------------------------------- diff --git a/src/H5Groot.c b/src/H5Groot.c index ba25f31..fbc4f1a 100644 --- a/src/H5Groot.c +++ b/src/H5Groot.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /*------------------------------------------------------------------------- diff --git a/src/H5Gstab.c b/src/H5Gstab.c index ed3dd84..a239cfe 100644 --- a/src/H5Gstab.c +++ b/src/H5Gstab.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* Programmer: Robb Matzke diff --git a/src/H5Gtest.c b/src/H5Gtest.c index 0e0a897..7271cdc 100644 --- a/src/H5Gtest.c +++ b/src/H5Gtest.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* Programmer: Quincey Koziol diff --git a/src/H5Gtraverse.c b/src/H5Gtraverse.c index d6c90e4..ff1206e 100644 --- a/src/H5Gtraverse.c +++ b/src/H5Gtraverse.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /*------------------------------------------------------------------------- diff --git a/src/H5HF.c b/src/H5HF.c index efd57ae..6c09969 100644 --- a/src/H5HF.c +++ b/src/H5HF.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /*------------------------------------------------------------------------- diff --git a/src/H5HFbtree2.c b/src/H5HFbtree2.c index d4a30b8..2d35368 100644 --- a/src/H5HFbtree2.c +++ b/src/H5HFbtree2.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /*------------------------------------------------------------------------- diff --git a/src/H5HFcache.c b/src/H5HFcache.c index ffdac9a..f957e2e 100644 --- a/src/H5HFcache.c +++ b/src/H5HFcache.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /*------------------------------------------------------------------------- diff --git a/src/H5HFdbg.c b/src/H5HFdbg.c index 40191e5..279de1e 100644 --- a/src/H5HFdbg.c +++ b/src/H5HFdbg.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /*------------------------------------------------------------------------- diff --git a/src/H5HFdblock.c b/src/H5HFdblock.c index b34534c..4496962 100644 --- a/src/H5HFdblock.c +++ b/src/H5HFdblock.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /*------------------------------------------------------------------------- diff --git a/src/H5HFdtable.c b/src/H5HFdtable.c index 3ceb6f5..563e8c5 100644 --- a/src/H5HFdtable.c +++ b/src/H5HFdtable.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /*------------------------------------------------------------------------- diff --git a/src/H5HFhdr.c b/src/H5HFhdr.c index 42857c0..2f01ce6 100644 --- a/src/H5HFhdr.c +++ b/src/H5HFhdr.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /*------------------------------------------------------------------------- diff --git a/src/H5HFhuge.c b/src/H5HFhuge.c index 94433c4..b2a1e68 100644 --- a/src/H5HFhuge.c +++ b/src/H5HFhuge.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /*------------------------------------------------------------------------- diff --git a/src/H5HFiblock.c b/src/H5HFiblock.c index bb31002..11abce0 100644 --- a/src/H5HFiblock.c +++ b/src/H5HFiblock.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /*------------------------------------------------------------------------- diff --git a/src/H5HFiter.c b/src/H5HFiter.c index 55a8532..54246d2 100644 --- a/src/H5HFiter.c +++ b/src/H5HFiter.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /*------------------------------------------------------------------------- diff --git a/src/H5HFman.c b/src/H5HFman.c index cff4395..2b88b50 100644 --- a/src/H5HFman.c +++ b/src/H5HFman.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /*------------------------------------------------------------------------- diff --git a/src/H5HFmodule.h b/src/H5HFmodule.h index e3274ce..dd6576a 100644 --- a/src/H5HFmodule.h +++ b/src/H5HFmodule.h @@ -4,12 +4,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* diff --git a/src/H5HFpkg.h b/src/H5HFpkg.h index 9c1d9a6..d03c1222 100644 --- a/src/H5HFpkg.h +++ b/src/H5HFpkg.h @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* diff --git a/src/H5HFprivate.h b/src/H5HFprivate.h index 441ad3e..8cf4b3c 100644 --- a/src/H5HFprivate.h +++ b/src/H5HFprivate.h @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /*------------------------------------------------------------------------- diff --git a/src/H5HFpublic.h b/src/H5HFpublic.h index 78b367b..82cfc21 100644 --- a/src/H5HFpublic.h +++ b/src/H5HFpublic.h @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /*------------------------------------------------------------------------- diff --git a/src/H5HFsection.c b/src/H5HFsection.c index b113ca1..42c12ec 100644 --- a/src/H5HFsection.c +++ b/src/H5HFsection.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* diff --git a/src/H5HFspace.c b/src/H5HFspace.c index 20057e4..41954fc 100644 --- a/src/H5HFspace.c +++ b/src/H5HFspace.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /*------------------------------------------------------------------------- diff --git a/src/H5HFstat.c b/src/H5HFstat.c index 303b1f4..e38a9b1 100644 --- a/src/H5HFstat.c +++ b/src/H5HFstat.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* Programmer: Quincey Koziol diff --git a/src/H5HFtest.c b/src/H5HFtest.c index 4b97194..1b1f688 100644 --- a/src/H5HFtest.c +++ b/src/H5HFtest.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* Programmer: Quincey Koziol diff --git a/src/H5HFtiny.c b/src/H5HFtiny.c index 711ceb9..79462e9 100644 --- a/src/H5HFtiny.c +++ b/src/H5HFtiny.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /*------------------------------------------------------------------------- diff --git a/src/H5HG.c b/src/H5HG.c index e8eb2eb..893be80 100644 --- a/src/H5HG.c +++ b/src/H5HG.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* diff --git a/src/H5HGcache.c b/src/H5HGcache.c index a83c22b..50b2669 100644 --- a/src/H5HGcache.c +++ b/src/H5HGcache.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /*------------------------------------------------------------------------- diff --git a/src/H5HGdbg.c b/src/H5HGdbg.c index 6013de5..6dd94f5 100644 --- a/src/H5HGdbg.c +++ b/src/H5HGdbg.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* Programmer: Quincey Koziol diff --git a/src/H5HGmodule.h b/src/H5HGmodule.h index aa34f29..1c68206 100644 --- a/src/H5HGmodule.h +++ b/src/H5HGmodule.h @@ -4,12 +4,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* diff --git a/src/H5HGpkg.h b/src/H5HGpkg.h index a5c80ea..47760bf 100644 --- a/src/H5HGpkg.h +++ b/src/H5HGpkg.h @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* diff --git a/src/H5HGprivate.h b/src/H5HGprivate.h index 0c0aa69..19dcaa4 100644 --- a/src/H5HGprivate.h +++ b/src/H5HGprivate.h @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* diff --git a/src/H5HGpublic.h b/src/H5HGpublic.h index 01cd60c..fcec593 100644 --- a/src/H5HGpublic.h +++ b/src/H5HGpublic.h @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* diff --git a/src/H5HGquery.c b/src/H5HGquery.c index d07edcc..35abc2e 100644 --- a/src/H5HGquery.c +++ b/src/H5HGquery.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* diff --git a/src/H5HL.c b/src/H5HL.c index 9af1119..fa577c3 100644 --- a/src/H5HL.c +++ b/src/H5HL.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /*------------------------------------------------------------------------- diff --git a/src/H5HLcache.c b/src/H5HLcache.c index 3668d81..926f787 100644 --- a/src/H5HLcache.c +++ b/src/H5HLcache.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /*------------------------------------------------------------------------- diff --git a/src/H5HLdbg.c b/src/H5HLdbg.c index fc8f5d3..3533a39 100644 --- a/src/H5HLdbg.c +++ b/src/H5HLdbg.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* Programmer: Quincey Koziol diff --git a/src/H5HLdblk.c b/src/H5HLdblk.c index f90562b..684d7f9 100644 --- a/src/H5HLdblk.c +++ b/src/H5HLdblk.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /*------------------------------------------------------------------------- diff --git a/src/H5HLint.c b/src/H5HLint.c index 5b547cf..e625f3d 100644 --- a/src/H5HLint.c +++ b/src/H5HLint.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /*------------------------------------------------------------------------- diff --git a/src/H5HLmodule.h b/src/H5HLmodule.h index b38c077..b0fd750 100644 --- a/src/H5HLmodule.h +++ b/src/H5HLmodule.h @@ -4,12 +4,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* diff --git a/src/H5HLpkg.h b/src/H5HLpkg.h index 06db696..770b7c0 100644 --- a/src/H5HLpkg.h +++ b/src/H5HLpkg.h @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* diff --git a/src/H5HLprfx.c b/src/H5HLprfx.c index ed1c4db..41c254a 100644 --- a/src/H5HLprfx.c +++ b/src/H5HLprfx.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /*------------------------------------------------------------------------- diff --git a/src/H5HLprivate.h b/src/H5HLprivate.h index e2bf29c..054d396 100644 --- a/src/H5HLprivate.h +++ b/src/H5HLprivate.h @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /*------------------------------------------------------------------------- diff --git a/src/H5HLpublic.h b/src/H5HLpublic.h index 6dc1828..143bb78 100644 --- a/src/H5HLpublic.h +++ b/src/H5HLpublic.h @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /*------------------------------------------------------------------------- diff --git a/src/H5HP.c b/src/H5HP.c index 78e9e5b..4ef5662 100644 --- a/src/H5HP.c +++ b/src/H5HP.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* diff --git a/src/H5HPprivate.h b/src/H5HPprivate.h index 8db5b21..041c2b9 100644 --- a/src/H5HPprivate.h +++ b/src/H5HPprivate.h @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* diff --git a/src/H5I.c b/src/H5I.c index 0fe9782..ce4ecdc 100644 --- a/src/H5I.c +++ b/src/H5I.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* diff --git a/src/H5Imodule.h b/src/H5Imodule.h index 19cc9a4..60bda5a 100644 --- a/src/H5Imodule.h +++ b/src/H5Imodule.h @@ -4,12 +4,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* diff --git a/src/H5Ipkg.h b/src/H5Ipkg.h index 0a6ae8c..16d7d67 100644 --- a/src/H5Ipkg.h +++ b/src/H5Ipkg.h @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* diff --git a/src/H5Iprivate.h b/src/H5Iprivate.h index c916f31..25cea4f 100644 --- a/src/H5Iprivate.h +++ b/src/H5Iprivate.h @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /*----------------------------------------------------------------------------- diff --git a/src/H5Ipublic.h b/src/H5Ipublic.h index 3bf3c66..896f82f 100644 --- a/src/H5Ipublic.h +++ b/src/H5Ipublic.h @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* diff --git a/src/H5Itest.c b/src/H5Itest.c index 506ca87..e7bd2a7 100644 --- a/src/H5Itest.c +++ b/src/H5Itest.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* Programmer: Quincey Koziol diff --git a/src/H5L.c b/src/H5L.c index ecdf8a2..469a86c 100644 --- a/src/H5L.c +++ b/src/H5L.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /****************/ diff --git a/src/H5Lexternal.c b/src/H5Lexternal.c index 7f59e50..b4a173f 100644 --- a/src/H5Lexternal.c +++ b/src/H5Lexternal.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /****************/ diff --git a/src/H5Lmodule.h b/src/H5Lmodule.h index e665c81..cba4de4 100644 --- a/src/H5Lmodule.h +++ b/src/H5Lmodule.h @@ -4,12 +4,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* diff --git a/src/H5Lpkg.h b/src/H5Lpkg.h index bb8534b..39e3197 100644 --- a/src/H5Lpkg.h +++ b/src/H5Lpkg.h @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* diff --git a/src/H5Lprivate.h b/src/H5Lprivate.h index 1c8690b..dd243a6 100644 --- a/src/H5Lprivate.h +++ b/src/H5Lprivate.h @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* diff --git a/src/H5Lpublic.h b/src/H5Lpublic.h index ff2322f..9d1643e 100644 --- a/src/H5Lpublic.h +++ b/src/H5Lpublic.h @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /*------------------------------------------------------------------------- diff --git a/src/H5MF.c b/src/H5MF.c index 87c910c..e54d809 100644 --- a/src/H5MF.c +++ b/src/H5MF.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /*------------------------------------------------------------------------- diff --git a/src/H5MFaggr.c b/src/H5MFaggr.c index de98bf1..7c05e0d 100644 --- a/src/H5MFaggr.c +++ b/src/H5MFaggr.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* diff --git a/src/H5MFdbg.c b/src/H5MFdbg.c index 817ea00..49cfbfc 100644 --- a/src/H5MFdbg.c +++ b/src/H5MFdbg.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /*------------------------------------------------------------------------- diff --git a/src/H5MFmodule.h b/src/H5MFmodule.h index 6e5f8ad..53daabf 100644 --- a/src/H5MFmodule.h +++ b/src/H5MFmodule.h @@ -4,12 +4,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* diff --git a/src/H5MFpkg.h b/src/H5MFpkg.h index c4a0819..b95a6db 100644 --- a/src/H5MFpkg.h +++ b/src/H5MFpkg.h @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* diff --git a/src/H5MFprivate.h b/src/H5MFprivate.h index 70322c3..bfeaa33 100644 --- a/src/H5MFprivate.h +++ b/src/H5MFprivate.h @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /*------------------------------------------------------------------------- diff --git a/src/H5MFsection.c b/src/H5MFsection.c index 617cb59..0dd26b3 100644 --- a/src/H5MFsection.c +++ b/src/H5MFsection.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* diff --git a/src/H5MM.c b/src/H5MM.c index daef7b1..ee3b28f 100644 --- a/src/H5MM.c +++ b/src/H5MM.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /*------------------------------------------------------------------------- diff --git a/src/H5MMprivate.h b/src/H5MMprivate.h index 14bd28d..0524601 100644 --- a/src/H5MMprivate.h +++ b/src/H5MMprivate.h @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /*------------------------------------------------------------------------- diff --git a/src/H5MMpublic.h b/src/H5MMpublic.h index bfcb807..4e54c33 100644 --- a/src/H5MMpublic.h +++ b/src/H5MMpublic.h @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /*------------------------------------------------------------------------- diff --git a/src/H5MP.c b/src/H5MP.c index 50fc598..8c9b411 100644 --- a/src/H5MP.c +++ b/src/H5MP.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /*------------------------------------------------------------------------- diff --git a/src/H5MPmodule.h b/src/H5MPmodule.h index ca6c405..27f7706 100644 --- a/src/H5MPmodule.h +++ b/src/H5MPmodule.h @@ -4,12 +4,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* diff --git a/src/H5MPpkg.h b/src/H5MPpkg.h index e724146..29a25fa 100644 --- a/src/H5MPpkg.h +++ b/src/H5MPpkg.h @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* diff --git a/src/H5MPprivate.h b/src/H5MPprivate.h index 3fa312c..009cb50 100644 --- a/src/H5MPprivate.h +++ b/src/H5MPprivate.h @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /*------------------------------------------------------------------------- diff --git a/src/H5MPtest.c b/src/H5MPtest.c index 3f218db..b3f2e24 100644 --- a/src/H5MPtest.c +++ b/src/H5MPtest.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* Programmer: Quincey Koziol diff --git a/src/H5O.c b/src/H5O.c index 1b58703..152e6cc 100644 --- a/src/H5O.c +++ b/src/H5O.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /*------------------------------------------------------------------------- diff --git a/src/H5Oainfo.c b/src/H5Oainfo.c index 44c6611..d8298a4 100644 --- a/src/H5Oainfo.c +++ b/src/H5Oainfo.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /*------------------------------------------------------------------------- diff --git a/src/H5Oalloc.c b/src/H5Oalloc.c index 40c9c38..3512d3e 100644 --- a/src/H5Oalloc.c +++ b/src/H5Oalloc.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /*------------------------------------------------------------------------- diff --git a/src/H5Oattr.c b/src/H5Oattr.c index 064c4cb..cb802ea 100644 --- a/src/H5Oattr.c +++ b/src/H5Oattr.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #define H5A_FRIEND /*suppress error about including H5Apkg */ diff --git a/src/H5Oattribute.c b/src/H5Oattribute.c index 71f54eb..2223564 100644 --- a/src/H5Oattribute.c +++ b/src/H5Oattribute.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /*------------------------------------------------------------------------- diff --git a/src/H5Obogus.c b/src/H5Obogus.c index d1085c8..a3531ed 100644 --- a/src/H5Obogus.c +++ b/src/H5Obogus.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /*------------------------------------------------------------------------- diff --git a/src/H5Obtreek.c b/src/H5Obtreek.c index ac6fe37..4fd0577 100644 --- a/src/H5Obtreek.c +++ b/src/H5Obtreek.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ diff --git a/src/H5Ocache.c b/src/H5Ocache.c index 19b91f8..8f4c155 100644 --- a/src/H5Ocache.c +++ b/src/H5Ocache.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /*------------------------------------------------------------------------- diff --git a/src/H5Ocache_image.c b/src/H5Ocache_image.c index bea99a2..29b2503 100644 --- a/src/H5Ocache_image.c +++ b/src/H5Ocache_image.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /*------------------------------------------------------------------------- diff --git a/src/H5Ochunk.c b/src/H5Ochunk.c index 50be171..dbc894c 100644 --- a/src/H5Ochunk.c +++ b/src/H5Ochunk.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /*------------------------------------------------------------------------- diff --git a/src/H5Ocont.c b/src/H5Ocont.c index 63002c5..b002a32 100644 --- a/src/H5Ocont.c +++ b/src/H5Ocont.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /*------------------------------------------------------------------------- diff --git a/src/H5Ocopy.c b/src/H5Ocopy.c index ddf375c..597af63 100644 --- a/src/H5Ocopy.c +++ b/src/H5Ocopy.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /*------------------------------------------------------------------------- diff --git a/src/H5Odbg.c b/src/H5Odbg.c index 827f40c..483c5fd 100644 --- a/src/H5Odbg.c +++ b/src/H5Odbg.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /*------------------------------------------------------------------------- diff --git a/src/H5Odrvinfo.c b/src/H5Odrvinfo.c index 2fdf494..b9dea26 100644 --- a/src/H5Odrvinfo.c +++ b/src/H5Odrvinfo.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ diff --git a/src/H5Odtype.c b/src/H5Odtype.c index 7ccf328..a1c24b6 100644 --- a/src/H5Odtype.c +++ b/src/H5Odtype.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #include "H5Omodule.h" /* This source code file is part of the H5O module */ diff --git a/src/H5Oefl.c b/src/H5Oefl.c index 149c8b2..0456b00 100644 --- a/src/H5Oefl.c +++ b/src/H5Oefl.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* diff --git a/src/H5Ofill.c b/src/H5Ofill.c index 745d027..5419762 100644 --- a/src/H5Ofill.c +++ b/src/H5Ofill.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* Programmer: Robb Matzke diff --git a/src/H5Oflush.c b/src/H5Oflush.c index e399c6c..2d93221 100644 --- a/src/H5Oflush.c +++ b/src/H5Oflush.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /*------------------------------------------------------------------------- diff --git a/src/H5Ofsinfo.c b/src/H5Ofsinfo.c index 37ec627..89dc8ee 100644 --- a/src/H5Ofsinfo.c +++ b/src/H5Ofsinfo.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /*------------------------------------------------------------------------- diff --git a/src/H5Oginfo.c b/src/H5Oginfo.c index 9cd0dc1..468e07a 100644 --- a/src/H5Oginfo.c +++ b/src/H5Oginfo.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /*------------------------------------------------------------------------- diff --git a/src/H5Olayout.c b/src/H5Olayout.c index b7a2584..838a80f 100644 --- a/src/H5Olayout.c +++ b/src/H5Olayout.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* Programmer: Robb Matzke diff --git a/src/H5Olinfo.c b/src/H5Olinfo.c index 62e63d4..cac4ed1 100644 --- a/src/H5Olinfo.c +++ b/src/H5Olinfo.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /*------------------------------------------------------------------------- diff --git a/src/H5Olink.c b/src/H5Olink.c index fd4ee88..77872ad 100644 --- a/src/H5Olink.c +++ b/src/H5Olink.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /*------------------------------------------------------------------------- diff --git a/src/H5Omessage.c b/src/H5Omessage.c index 7e6463a..158701b 100644 --- a/src/H5Omessage.c +++ b/src/H5Omessage.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /*------------------------------------------------------------------------- diff --git a/src/H5Omodule.h b/src/H5Omodule.h index a8f1301..df3ab56 100644 --- a/src/H5Omodule.h +++ b/src/H5Omodule.h @@ -4,12 +4,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* diff --git a/src/H5Omtime.c b/src/H5Omtime.c index c61fa66..7e7baea 100644 --- a/src/H5Omtime.c +++ b/src/H5Omtime.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* Programmer: Robb Matzke diff --git a/src/H5Oname.c b/src/H5Oname.c index 6c4f76f..6292883 100644 --- a/src/H5Oname.c +++ b/src/H5Oname.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /*------------------------------------------------------------------------- diff --git a/src/H5Onull.c b/src/H5Onull.c index 258f695..5697455 100644 --- a/src/H5Onull.c +++ b/src/H5Onull.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /*------------------------------------------------------------------------- diff --git a/src/H5Opkg.h b/src/H5Opkg.h index e1fa0be..b0c67d1 100644 --- a/src/H5Opkg.h +++ b/src/H5Opkg.h @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #if !(defined H5O_FRIEND || defined H5O_MODULE) diff --git a/src/H5Opline.c b/src/H5Opline.c index 95a82b5..2e52dbb 100644 --- a/src/H5Opline.c +++ b/src/H5Opline.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* diff --git a/src/H5Oprivate.h b/src/H5Oprivate.h index 0a4ed74..0f798b2 100644 --- a/src/H5Oprivate.h +++ b/src/H5Oprivate.h @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /*------------------------------------------------------------------------- diff --git a/src/H5Opublic.h b/src/H5Opublic.h index dec7b5b..8d6dda4 100644 --- a/src/H5Opublic.h +++ b/src/H5Opublic.h @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /*------------------------------------------------------------------------- diff --git a/src/H5Orefcount.c b/src/H5Orefcount.c index ff7dfee..af68417 100644 --- a/src/H5Orefcount.c +++ b/src/H5Orefcount.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /*------------------------------------------------------------------------- diff --git a/src/H5Osdspace.c b/src/H5Osdspace.c index 28021de..3fe5652 100644 --- a/src/H5Osdspace.c +++ b/src/H5Osdspace.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #include "H5Omodule.h" /* This source code file is part of the H5O module */ diff --git a/src/H5Oshared.c b/src/H5Oshared.c index 25baa88..db2d0cc 100644 --- a/src/H5Oshared.c +++ b/src/H5Oshared.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* diff --git a/src/H5Oshared.h b/src/H5Oshared.h index e8d620a..2465e65 100644 --- a/src/H5Oshared.h +++ b/src/H5Oshared.h @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* diff --git a/src/H5Oshmesg.c b/src/H5Oshmesg.c index a506ce2..1cbfb05 100644 --- a/src/H5Oshmesg.c +++ b/src/H5Oshmesg.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ diff --git a/src/H5Ostab.c b/src/H5Ostab.c index bb39e58..5c840a6 100644 --- a/src/H5Ostab.c +++ b/src/H5Ostab.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /*------------------------------------------------------------------------- diff --git a/src/H5Otest.c b/src/H5Otest.c index 8f8980a..f0deade 100644 --- a/src/H5Otest.c +++ b/src/H5Otest.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* Programmer: Quincey Koziol diff --git a/src/H5Ounknown.c b/src/H5Ounknown.c index 546e839..1b3a997 100644 --- a/src/H5Ounknown.c +++ b/src/H5Ounknown.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /*------------------------------------------------------------------------- diff --git a/src/H5P.c b/src/H5P.c index 254c3a9..49bea0a 100644 --- a/src/H5P.c +++ b/src/H5P.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* Programmer: Quincey Koziol diff --git a/src/H5PB.c b/src/H5PB.c index 575903d..52576f8 100644 --- a/src/H5PB.c +++ b/src/H5PB.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /*------------------------------------------------------------------------- diff --git a/src/H5PBmodule.h b/src/H5PBmodule.h index 35da3f6..c8aabb6 100644 --- a/src/H5PBmodule.h +++ b/src/H5PBmodule.h @@ -4,12 +4,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* diff --git a/src/H5PBpkg.h b/src/H5PBpkg.h index 976f18d..6b9168b 100644 --- a/src/H5PBpkg.h +++ b/src/H5PBpkg.h @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #if !(defined H5PB_FRIEND || defined H5PB_MODULE) diff --git a/src/H5PBprivate.h b/src/H5PBprivate.h index 7dd4071..e6f2874 100644 --- a/src/H5PBprivate.h +++ b/src/H5PBprivate.h @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /*------------------------------------------------------------------------- diff --git a/src/H5PL.c b/src/H5PL.c index bfa3ace..512b00b 100644 --- a/src/H5PL.c +++ b/src/H5PL.c @@ -4,12 +4,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic document set and is * - * linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have access * - * to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /****************/ diff --git a/src/H5PLextern.h b/src/H5PLextern.h index 3264435..7547ad7 100644 --- a/src/H5PLextern.h +++ b/src/H5PLextern.h @@ -4,12 +4,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic document set and is * - * linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have access * - * to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* diff --git a/src/H5PLmodule.h b/src/H5PLmodule.h index 0339737..b441aed 100644 --- a/src/H5PLmodule.h +++ b/src/H5PLmodule.h @@ -4,12 +4,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* diff --git a/src/H5PLprivate.h b/src/H5PLprivate.h index 77e115b..0ab8f8c 100644 --- a/src/H5PLprivate.h +++ b/src/H5PLprivate.h @@ -4,12 +4,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic document set and is * - * linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have access * - * to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* Programmer: Raymond Lu diff --git a/src/H5PLpublic.h b/src/H5PLpublic.h index 5e4dcae..fc638a0 100644 --- a/src/H5PLpublic.h +++ b/src/H5PLpublic.h @@ -4,12 +4,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic document set and is * - * linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have access * - * to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* Programmer: Raymond Lu diff --git a/src/H5Pacpl.c b/src/H5Pacpl.c index bfed332..4368dd6 100644 --- a/src/H5Pacpl.c +++ b/src/H5Pacpl.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /*------------------------------------------------------------------------- diff --git a/src/H5Pdapl.c b/src/H5Pdapl.c index aa58dc4..3b0a8c5 100644 --- a/src/H5Pdapl.c +++ b/src/H5Pdapl.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /*------------------------------------------------------------------------- diff --git a/src/H5Pdcpl.c b/src/H5Pdcpl.c index 1237bfc..3b4c159 100644 --- a/src/H5Pdcpl.c +++ b/src/H5Pdcpl.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /*------------------------------------------------------------------------- diff --git a/src/H5Pdeprec.c b/src/H5Pdeprec.c index d225dfa..7f96333 100644 --- a/src/H5Pdeprec.c +++ b/src/H5Pdeprec.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /*------------------------------------------------------------------------- diff --git a/src/H5Pdxpl.c b/src/H5Pdxpl.c index 4a3eb72..fdb402f 100644 --- a/src/H5Pdxpl.c +++ b/src/H5Pdxpl.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /*------------------------------------------------------------------------- diff --git a/src/H5Pencdec.c b/src/H5Pencdec.c index 1bcd19c..73c48d7 100644 --- a/src/H5Pencdec.c +++ b/src/H5Pencdec.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* Programmer: Quincey Koziol diff --git a/src/H5Pfapl.c b/src/H5Pfapl.c index 7865fdf..0dab539 100644 --- a/src/H5Pfapl.c +++ b/src/H5Pfapl.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /*------------------------------------------------------------------------- diff --git a/src/H5Pfcpl.c b/src/H5Pfcpl.c index c778801..5383aae 100644 --- a/src/H5Pfcpl.c +++ b/src/H5Pfcpl.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /*------------------------------------------------------------------------- diff --git a/src/H5Pfmpl.c b/src/H5Pfmpl.c index de9fa3b..e858a79 100644 --- a/src/H5Pfmpl.c +++ b/src/H5Pfmpl.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /*------------------------------------------------------------------------- diff --git a/src/H5Pgcpl.c b/src/H5Pgcpl.c index f028f7a..6f1fab1 100644 --- a/src/H5Pgcpl.c +++ b/src/H5Pgcpl.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /*------------------------------------------------------------------------- diff --git a/src/H5Pint.c b/src/H5Pint.c index 8e9a9bc..fe17a19 100644 --- a/src/H5Pint.c +++ b/src/H5Pint.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* Programmer: Quincey Koziol diff --git a/src/H5Plapl.c b/src/H5Plapl.c index a0ec7f1..18b81ac 100644 --- a/src/H5Plapl.c +++ b/src/H5Plapl.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /*------------------------------------------------------------------------- diff --git a/src/H5Plcpl.c b/src/H5Plcpl.c index f6e7793..6508a82 100644 --- a/src/H5Plcpl.c +++ b/src/H5Plcpl.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /*------------------------------------------------------------------------- diff --git a/src/H5Pmodule.h b/src/H5Pmodule.h index ddf7c0f..d5c471a 100644 --- a/src/H5Pmodule.h +++ b/src/H5Pmodule.h @@ -4,12 +4,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* diff --git a/src/H5Pocpl.c b/src/H5Pocpl.c index 27044d5..0393f7f 100644 --- a/src/H5Pocpl.c +++ b/src/H5Pocpl.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /*------------------------------------------------------------------------- diff --git a/src/H5Pocpypl.c b/src/H5Pocpypl.c index faa2a04..47bba05 100644 --- a/src/H5Pocpypl.c +++ b/src/H5Pocpypl.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /*------------------------------------------------------------------------- diff --git a/src/H5Ppkg.h b/src/H5Ppkg.h index 7d29f3d..13463ae 100644 --- a/src/H5Ppkg.h +++ b/src/H5Ppkg.h @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* diff --git a/src/H5Pprivate.h b/src/H5Pprivate.h index 29fb919..a468464 100644 --- a/src/H5Pprivate.h +++ b/src/H5Pprivate.h @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* diff --git a/src/H5Ppublic.h b/src/H5Ppublic.h index 50b9eb0..55b3877 100644 --- a/src/H5Ppublic.h +++ b/src/H5Ppublic.h @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* diff --git a/src/H5Pstrcpl.c b/src/H5Pstrcpl.c index 5a09cd7..fb91356 100644 --- a/src/H5Pstrcpl.c +++ b/src/H5Pstrcpl.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /*------------------------------------------------------------------------- diff --git a/src/H5Ptest.c b/src/H5Ptest.c index f6cc97e..475a164 100644 --- a/src/H5Ptest.c +++ b/src/H5Ptest.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* Programmer: Quincey Koziol diff --git a/src/H5R.c b/src/H5R.c index 43b0a91..73c1d55 100644 --- a/src/H5R.c +++ b/src/H5R.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /****************/ diff --git a/src/H5RS.c b/src/H5RS.c index 5bbdabd..0a3fff0 100644 --- a/src/H5RS.c +++ b/src/H5RS.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* diff --git a/src/H5RSprivate.h b/src/H5RSprivate.h index 757e0e4..f69624a 100644 --- a/src/H5RSprivate.h +++ b/src/H5RSprivate.h @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* diff --git a/src/H5Rdeprec.c b/src/H5Rdeprec.c index 9461327..109bbb4 100644 --- a/src/H5Rdeprec.c +++ b/src/H5Rdeprec.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /*------------------------------------------------------------------------- diff --git a/src/H5Rmodule.h b/src/H5Rmodule.h index 6799483..2eaf050 100644 --- a/src/H5Rmodule.h +++ b/src/H5Rmodule.h @@ -4,12 +4,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* diff --git a/src/H5Rpkg.h b/src/H5Rpkg.h index 8ed8d65..6d5036b 100644 --- a/src/H5Rpkg.h +++ b/src/H5Rpkg.h @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* diff --git a/src/H5Rprivate.h b/src/H5Rprivate.h index 60df636..7efa225 100644 --- a/src/H5Rprivate.h +++ b/src/H5Rprivate.h @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* diff --git a/src/H5Rpublic.h b/src/H5Rpublic.h index e990661..446b7cd 100644 --- a/src/H5Rpublic.h +++ b/src/H5Rpublic.h @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* diff --git a/src/H5S.c b/src/H5S.c index 2fab71a..dd390d9 100644 --- a/src/H5S.c +++ b/src/H5S.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /****************/ diff --git a/src/H5SL.c b/src/H5SL.c index f9d7654..c0934ca 100644 --- a/src/H5SL.c +++ b/src/H5SL.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* diff --git a/src/H5SLmodule.h b/src/H5SLmodule.h index d5bfbc2..34f08a1 100644 --- a/src/H5SLmodule.h +++ b/src/H5SLmodule.h @@ -4,12 +4,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* diff --git a/src/H5SLprivate.h b/src/H5SLprivate.h index 856099b..1393a25 100644 --- a/src/H5SLprivate.h +++ b/src/H5SLprivate.h @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* diff --git a/src/H5SM.c b/src/H5SM.c index 221409d..d5ede7e 100644 --- a/src/H5SM.c +++ b/src/H5SM.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /****************/ diff --git a/src/H5SMbtree2.c b/src/H5SMbtree2.c index 0110c1e..f0c4963 100644 --- a/src/H5SMbtree2.c +++ b/src/H5SMbtree2.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /****************/ diff --git a/src/H5SMcache.c b/src/H5SMcache.c index 455dd1a..f0b469a 100644 --- a/src/H5SMcache.c +++ b/src/H5SMcache.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /*------------------------------------------------------------------------- diff --git a/src/H5SMmessage.c b/src/H5SMmessage.c index 92b6a75..7df9f8f 100644 --- a/src/H5SMmessage.c +++ b/src/H5SMmessage.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /****************/ diff --git a/src/H5SMmodule.h b/src/H5SMmodule.h index b6991b6..656c7dd 100644 --- a/src/H5SMmodule.h +++ b/src/H5SMmodule.h @@ -4,12 +4,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* diff --git a/src/H5SMpkg.h b/src/H5SMpkg.h index 342543d..6dea7ae 100644 --- a/src/H5SMpkg.h +++ b/src/H5SMpkg.h @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* diff --git a/src/H5SMprivate.h b/src/H5SMprivate.h index 57afacf..8f9f533 100644 --- a/src/H5SMprivate.h +++ b/src/H5SMprivate.h @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* diff --git a/src/H5SMtest.c b/src/H5SMtest.c index 798203d..6a4b63a 100644 --- a/src/H5SMtest.c +++ b/src/H5SMtest.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /****************/ diff --git a/src/H5ST.c b/src/H5ST.c index 09c4600..dd5b63c 100644 --- a/src/H5ST.c +++ b/src/H5ST.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* TERNARY SEARCH TREE ALGS diff --git a/src/H5STprivate.h b/src/H5STprivate.h index 9b49b07..07e9afe 100644 --- a/src/H5STprivate.h +++ b/src/H5STprivate.h @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* diff --git a/src/H5Sall.c b/src/H5Sall.c index fb6b45f..710727b 100644 --- a/src/H5Sall.c +++ b/src/H5Sall.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* diff --git a/src/H5Sdbg.c b/src/H5Sdbg.c index b69604c..c9103f7 100644 --- a/src/H5Sdbg.c +++ b/src/H5Sdbg.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /*------------------------------------------------------------------------- diff --git a/src/H5Shyper.c b/src/H5Shyper.c index 5231c6e..e6e6cff 100644 --- a/src/H5Shyper.c +++ b/src/H5Shyper.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* diff --git a/src/H5Smodule.h b/src/H5Smodule.h index d4d94f2..962f0a2 100644 --- a/src/H5Smodule.h +++ b/src/H5Smodule.h @@ -4,12 +4,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* diff --git a/src/H5Smpio.c b/src/H5Smpio.c index 1f97bc8..c24c455 100644 --- a/src/H5Smpio.c +++ b/src/H5Smpio.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* diff --git a/src/H5Snone.c b/src/H5Snone.c index 3492325..104b0bb 100644 --- a/src/H5Snone.c +++ b/src/H5Snone.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* diff --git a/src/H5Spkg.h b/src/H5Spkg.h index e57650a..315af29 100644 --- a/src/H5Spkg.h +++ b/src/H5Spkg.h @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* diff --git a/src/H5Spoint.c b/src/H5Spoint.c index 1531bac..251a063 100644 --- a/src/H5Spoint.c +++ b/src/H5Spoint.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* diff --git a/src/H5Sprivate.h b/src/H5Sprivate.h index d00b5be..60e0630 100644 --- a/src/H5Sprivate.h +++ b/src/H5Sprivate.h @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* diff --git a/src/H5Spublic.h b/src/H5Spublic.h index 721c4bf..5ed6249 100644 --- a/src/H5Spublic.h +++ b/src/H5Spublic.h @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* diff --git a/src/H5Sselect.c b/src/H5Sselect.c index 2968bed..c34e1cc 100644 --- a/src/H5Sselect.c +++ b/src/H5Sselect.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* Programmer: Quincey Koziol diff --git a/src/H5Stest.c b/src/H5Stest.c index e1f4b61..a7bee2b 100644 --- a/src/H5Stest.c +++ b/src/H5Stest.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* Programmer: Quincey Koziol diff --git a/src/H5T.c b/src/H5T.c index 0fb8b91..5e4171d 100644 --- a/src/H5T.c +++ b/src/H5T.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* diff --git a/src/H5TS.c b/src/H5TS.c index 7d46e95..a0ca134 100644 --- a/src/H5TS.c +++ b/src/H5TS.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* private headers */ diff --git a/src/H5TSprivate.h b/src/H5TSprivate.h index 5394b77..e5c41af 100644 --- a/src/H5TSprivate.h +++ b/src/H5TSprivate.h @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /*------------------------------------------------------------------------- diff --git a/src/H5Tarray.c b/src/H5Tarray.c index 4b2c7cf..beccfdb 100644 --- a/src/H5Tarray.c +++ b/src/H5Tarray.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* diff --git a/src/H5Tbit.c b/src/H5Tbit.c index a6b917f..12d1fd1 100644 --- a/src/H5Tbit.c +++ b/src/H5Tbit.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* diff --git a/src/H5Tcommit.c b/src/H5Tcommit.c index 3ded7af..c28b508 100644 --- a/src/H5Tcommit.c +++ b/src/H5Tcommit.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* diff --git a/src/H5Tcompound.c b/src/H5Tcompound.c index 1342770..169c146 100644 --- a/src/H5Tcompound.c +++ b/src/H5Tcompound.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* diff --git a/src/H5Tconv.c b/src/H5Tconv.c index 23ccd98..84a997e 100644 --- a/src/H5Tconv.c +++ b/src/H5Tconv.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* diff --git a/src/H5Tcset.c b/src/H5Tcset.c index 95658ed..186e598 100644 --- a/src/H5Tcset.c +++ b/src/H5Tcset.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* diff --git a/src/H5Tdbg.c b/src/H5Tdbg.c index 8a10cc6..f434543 100644 --- a/src/H5Tdbg.c +++ b/src/H5Tdbg.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /*------------------------------------------------------------------------- diff --git a/src/H5Tdeprec.c b/src/H5Tdeprec.c index a769b72..c506ec1 100644 --- a/src/H5Tdeprec.c +++ b/src/H5Tdeprec.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /*------------------------------------------------------------------------- diff --git a/src/H5Tenum.c b/src/H5Tenum.c index e80d748..f5263ed 100644 --- a/src/H5Tenum.c +++ b/src/H5Tenum.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* diff --git a/src/H5Tfields.c b/src/H5Tfields.c index 8818a73..be62d85 100644 --- a/src/H5Tfields.c +++ b/src/H5Tfields.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* diff --git a/src/H5Tfixed.c b/src/H5Tfixed.c index 62b8e79..bc1d84d 100644 --- a/src/H5Tfixed.c +++ b/src/H5Tfixed.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* diff --git a/src/H5Tfloat.c b/src/H5Tfloat.c index b8b1c07..85e8f30 100644 --- a/src/H5Tfloat.c +++ b/src/H5Tfloat.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* diff --git a/src/H5Tmodule.h b/src/H5Tmodule.h index bfaab5e6..d2ab08c 100644 --- a/src/H5Tmodule.h +++ b/src/H5Tmodule.h @@ -4,12 +4,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* diff --git a/src/H5Tnative.c b/src/H5Tnative.c index 9dbce09..6304500 100644 --- a/src/H5Tnative.c +++ b/src/H5Tnative.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* diff --git a/src/H5Toffset.c b/src/H5Toffset.c index cc45d8e..668e730 100644 --- a/src/H5Toffset.c +++ b/src/H5Toffset.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* diff --git a/src/H5Toh.c b/src/H5Toh.c index 9c8ad80..01cefe1 100644 --- a/src/H5Toh.c +++ b/src/H5Toh.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /****************/ diff --git a/src/H5Topaque.c b/src/H5Topaque.c index 9cc22c9..4e8f1d4 100644 --- a/src/H5Topaque.c +++ b/src/H5Topaque.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* diff --git a/src/H5Torder.c b/src/H5Torder.c index 6c9c55c..877316d 100644 --- a/src/H5Torder.c +++ b/src/H5Torder.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* diff --git a/src/H5Tpad.c b/src/H5Tpad.c index e636a84..c96f42a 100644 --- a/src/H5Tpad.c +++ b/src/H5Tpad.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* diff --git a/src/H5Tpkg.h b/src/H5Tpkg.h index 49b0ea0..d075127 100644 --- a/src/H5Tpkg.h +++ b/src/H5Tpkg.h @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* diff --git a/src/H5Tprecis.c b/src/H5Tprecis.c index be85491..59bac8b 100644 --- a/src/H5Tprecis.c +++ b/src/H5Tprecis.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* diff --git a/src/H5Tprivate.h b/src/H5Tprivate.h index 7efcb41..f2da62e 100644 --- a/src/H5Tprivate.h +++ b/src/H5Tprivate.h @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* diff --git a/src/H5Tpublic.h b/src/H5Tpublic.h index df7ad41..fc3e4ee 100644 --- a/src/H5Tpublic.h +++ b/src/H5Tpublic.h @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* diff --git a/src/H5Tstrpad.c b/src/H5Tstrpad.c index 2cd1db4..fa084f1 100644 --- a/src/H5Tstrpad.c +++ b/src/H5Tstrpad.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* diff --git a/src/H5Tvisit.c b/src/H5Tvisit.c index d732fb3..c706dee 100644 --- a/src/H5Tvisit.c +++ b/src/H5Tvisit.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* diff --git a/src/H5Tvlen.c b/src/H5Tvlen.c index d198d50..00e61e5 100644 --- a/src/H5Tvlen.c +++ b/src/H5Tvlen.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* diff --git a/src/H5UC.c b/src/H5UC.c index 5762cc5..2277818 100644 --- a/src/H5UC.c +++ b/src/H5UC.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* diff --git a/src/H5UCprivate.h b/src/H5UCprivate.h index a702c03..c451f31 100644 --- a/src/H5UCprivate.h +++ b/src/H5UCprivate.h @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* diff --git a/src/H5VM.c b/src/H5VM.c index c546609..4c0b837 100644 --- a/src/H5VM.c +++ b/src/H5VM.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* diff --git a/src/H5VMprivate.h b/src/H5VMprivate.h index cbe108a..4d71b29 100644 --- a/src/H5VMprivate.h +++ b/src/H5VMprivate.h @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* diff --git a/src/H5WB.c b/src/H5WB.c index 978ded4..8a85a3a 100644 --- a/src/H5WB.c +++ b/src/H5WB.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /*------------------------------------------------------------------------- diff --git a/src/H5WBprivate.h b/src/H5WBprivate.h index cfa3fcb..4460808 100644 --- a/src/H5WBprivate.h +++ b/src/H5WBprivate.h @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /*------------------------------------------------------------------------- diff --git a/src/H5Z.c b/src/H5Z.c index 0be0bbe..ef34d7c 100644 --- a/src/H5Z.c +++ b/src/H5Z.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #include "H5Zmodule.h" /* This source code file is part of the H5Z module */ diff --git a/src/H5Zdeflate.c b/src/H5Zdeflate.c index 15aac27..34fdfec 100644 --- a/src/H5Zdeflate.c +++ b/src/H5Zdeflate.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* diff --git a/src/H5Zfletcher32.c b/src/H5Zfletcher32.c index 9ff85cc..4cd77ef 100644 --- a/src/H5Zfletcher32.c +++ b/src/H5Zfletcher32.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* diff --git a/src/H5Zmodule.h b/src/H5Zmodule.h index fa0ef8f..97e158c 100644 --- a/src/H5Zmodule.h +++ b/src/H5Zmodule.h @@ -4,12 +4,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* diff --git a/src/H5Znbit.c b/src/H5Znbit.c index 7a41d16..373eb37 100644 --- a/src/H5Znbit.c +++ b/src/H5Znbit.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #include "H5Zmodule.h" /* This source code file is part of the H5Z module */ diff --git a/src/H5Zpkg.h b/src/H5Zpkg.h index aa2ffe2..2aa17f2 100644 --- a/src/H5Zpkg.h +++ b/src/H5Zpkg.h @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #if !(defined H5Z_FRIEND || defined H5Z_MODULE) diff --git a/src/H5Zprivate.h b/src/H5Zprivate.h index 73d85ac..fe182ad 100644 --- a/src/H5Zprivate.h +++ b/src/H5Zprivate.h @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* Programmer: Robb Matzke diff --git a/src/H5Zpublic.h b/src/H5Zpublic.h index 8daa5f4..f6b313e 100644 --- a/src/H5Zpublic.h +++ b/src/H5Zpublic.h @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* Programmer: Robb Matzke diff --git a/src/H5Zscaleoffset.c b/src/H5Zscaleoffset.c index 1cca9b1..b86d785 100644 --- a/src/H5Zscaleoffset.c +++ b/src/H5Zscaleoffset.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #include "H5Zmodule.h" /* This source code file is part of the H5Z module */ diff --git a/src/H5Zshuffle.c b/src/H5Zshuffle.c index 4cf6adf..1fef1c1 100644 --- a/src/H5Zshuffle.c +++ b/src/H5Zshuffle.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #include "H5Zmodule.h" /* This source code file is part of the H5Z module */ diff --git a/src/H5Zszip.c b/src/H5Zszip.c index 557e923..dd35859 100644 --- a/src/H5Zszip.c +++ b/src/H5Zszip.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #include "H5Zmodule.h" /* This source code file is part of the H5Z module */ diff --git a/src/H5Ztrans.c b/src/H5Ztrans.c index f30f0b2..d4b59a6 100644 --- a/src/H5Ztrans.c +++ b/src/H5Ztrans.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #include "H5Zmodule.h" /* This source code file is part of the H5Z module */ diff --git a/src/H5api_adpt.h b/src/H5api_adpt.h index 910bef9..0ff0f74 100644 --- a/src/H5api_adpt.h +++ b/src/H5api_adpt.h @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* diff --git a/src/H5checksum.c b/src/H5checksum.c index 48e4ce5..64d527e 100644 --- a/src/H5checksum.c +++ b/src/H5checksum.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /*------------------------------------------------------------------------- diff --git a/src/H5dbg.c b/src/H5dbg.c index 2039a51..dd50034 100644 --- a/src/H5dbg.c +++ b/src/H5dbg.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /*------------------------------------------------------------------------- diff --git a/src/H5detect.c b/src/H5detect.c index 94e841e..75a1dba 100644 --- a/src/H5detect.c +++ b/src/H5detect.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /*keep this declaration near the top of this file -RPM*/ @@ -22,12 +20,10 @@ static const char *FileHeader = "\n\ * *\n\ * This file is part of HDF5. The full HDF5 copyright notice, including *\n\ * terms governing use, modification, and redistribution, is contained in *\n\ - * the files COPYING and Copyright.html. COPYING can be found at the root *\n\ - * of the source code distribution tree; Copyright.html can be found at the *\n\ - * root level of an installed copy of the electronic HDF5 document set and *\n\ - * is linked from the top-level documents page. It can also be found at *\n\ - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have *\n\ - * access to either file, you may request a copy from help@hdfgroup.org. *\n\ + * the COPYING file, which can be found at the root of the source code *\n\ + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *\n\ + * If you do not have access to either file, you may request a copy from *\n\ + * help@hdfgroup.org. *\n\ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *"; /* * diff --git a/src/H5err.txt b/src/H5err.txt index ffa9315..3f5801f 100644 --- a/src/H5err.txt +++ b/src/H5err.txt @@ -4,12 +4,10 @@ # # This file is part of HDF5. The full HDF5 copyright notice, including # terms governing use, modification, and redistribution, is contained in -# the files COPYING and Copyright.html. COPYING can be found at the root -# of the source code distribution tree; Copyright.html can be found at the -# root level of an installed copy of the electronic HDF5 document set and -# is linked from the top-level documents page. It can also be found at -# http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have -# access to either file, you may request a copy from help@hdfgroup.org. +# the COPYING file, which can be found at the root of the source code +# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. +# If you do not have access to either file, you may request a copy from +# help@hdfgroup.org. # # This file is used to generate the various headers that are needed for the diff --git a/src/H5make_libsettings.c b/src/H5make_libsettings.c index fa00c64..1892806 100644 --- a/src/H5make_libsettings.c +++ b/src/H5make_libsettings.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /*keep this declaration near the top of this file -RPM*/ @@ -22,12 +20,10 @@ static const char *FileHeader = "\n\ * *\n\ * This file is part of HDF5. The full HDF5 copyright notice, including *\n\ * terms governing use, modification, and redistribution, is contained in *\n\ - * the files COPYING and Copyright.html. COPYING can be found at the root *\n\ - * of the source code distribution tree; Copyright.html can be found at the *\n\ - * root level of an installed copy of the electronic HDF5 document set and *\n\ - * is linked from the top-level documents page. It can also be found at *\n\ - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have *\n\ - * access to either file, you may request a copy from help@hdfgroup.org. *\n\ + * the COPYING file, which can be found at the root of the source code *\n\ + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *\n\ + * If you do not have access to either file, you may request a copy from *\n\ + * help@hdfgroup.org. *\n\ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *"; /* * diff --git a/src/H5overflow.txt b/src/H5overflow.txt index 3e9f069..a9e5099 100644 --- a/src/H5overflow.txt +++ b/src/H5overflow.txt @@ -4,12 +4,10 @@ # # This file is part of HDF5. The full HDF5 copyright notice, including # terms governing use, modification, and redistribution, is contained in -# the files COPYING and Copyright.html. COPYING can be found at the root -# of the source code distribution tree; Copyright.html can be found at the -# root level of an installed copy of the electronic HDF5 document set and -# is linked from the top-level documents page. It can also be found at -# http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have -# access to either file, you may request a copy from help@hdfgroup.org. +# the COPYING file, which can be found at the root of the source code +# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. +# If you do not have access to either file, you may request a copy from +# help@hdfgroup.org. # # This file is used to generate the headers that is needed for detecting diff --git a/src/H5private.h b/src/H5private.h index 61ecc5b..c588154 100644 --- a/src/H5private.h +++ b/src/H5private.h @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* Programmer: Robb Matzke diff --git a/src/H5public.h b/src/H5public.h index 2e73ec9..dce20f4 100644 --- a/src/H5public.h +++ b/src/H5public.h @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* diff --git a/src/H5system.c b/src/H5system.c index 1f92e19..7e25540 100644 --- a/src/H5system.c +++ b/src/H5system.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /*------------------------------------------------------------------------- diff --git a/src/H5timer.c b/src/H5timer.c index f36681e..0ba8bd1 100644 --- a/src/H5timer.c +++ b/src/H5timer.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /*------------------------------------------------------------------------- diff --git a/src/H5trace.c b/src/H5trace.c index 48c357a..9fb8a72 100644 --- a/src/H5trace.c +++ b/src/H5trace.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /*------------------------------------------------------------------------- diff --git a/src/H5vers.txt b/src/H5vers.txt index 07d2c4b..0303bf5 100644 --- a/src/H5vers.txt +++ b/src/H5vers.txt @@ -4,12 +4,10 @@ # # This file is part of HDF5. The full HDF5 copyright notice, including # terms governing use, modification, and redistribution, is contained in -# the files COPYING and Copyright.html. COPYING can be found at the root -# of the source code distribution tree; Copyright.html can be found at the -# root level of an installed copy of the electronic HDF5 document set and -# is linked from the top-level documents page. It can also be found at -# http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have -# access to either file, you may request a copy from help@hdfgroup.org. +# the COPYING file, which can be found at the root of the source code +# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. +# If you do not have access to either file, you may request a copy from +# help@hdfgroup.org. # # This file is used to generate the various headers that are needed for diff --git a/src/H5win32defs.h b/src/H5win32defs.h index e005b51..0149faa 100644 --- a/src/H5win32defs.h +++ b/src/H5win32defs.h @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* Programmer: Scott Wegner diff --git a/src/Makefile.am b/src/Makefile.am index 59df4c2..0b664a7 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -5,12 +5,10 @@ # # This file is part of HDF5. The full HDF5 copyright notice, including # terms governing use, modification, and redistribution, is contained in -# the files COPYING and Copyright.html. COPYING can be found at the root -# of the source code distribution tree; Copyright.html can be found at the -# root level of an installed copy of the electronic HDF5 document set and -# is linked from the top-level documents page. It can also be found at -# http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have -# access to either file, you may request a copy from help@hdfgroup.org. +# the COPYING file, which can be found at the root of the source code +# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. +# If you do not have access to either file, you may request a copy from +# help@hdfgroup.org. ## ## Makefile.am ## Run automake to generate a Makefile.in from this file. diff --git a/src/hdf5.h b/src/hdf5.h index 7a10507..fc4541a 100644 --- a/src/hdf5.h +++ b/src/hdf5.h @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* diff --git a/test/H5srcdir.h b/test/H5srcdir.h index 2f04295..32fe8c9 100644 --- a/test/H5srcdir.h +++ b/test/H5srcdir.h @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* diff --git a/test/H5srcdir_str.h.in b/test/H5srcdir_str.h.in index d472124..bab1df3 100644 --- a/test/H5srcdir_str.h.in +++ b/test/H5srcdir_str.h.in @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* If you are reading this file and it has a '.h' suffix, it was automatically diff --git a/test/Makefile.am b/test/Makefile.am index a64cd0e..630519d 100644 --- a/test/Makefile.am +++ b/test/Makefile.am @@ -5,12 +5,10 @@ # # This file is part of HDF5. The full HDF5 copyright notice, including # terms governing use, modification, and redistribution, is contained in -# the files COPYING and Copyright.html. COPYING can be found at the root -# of the source code distribution tree; Copyright.html can be found at the -# root level of an installed copy of the electronic HDF5 document set and -# is linked from the top-level documents page. It can also be found at -# http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have -# access to either file, you may request a copy from help@hdfgroup.org. +# the COPYING file, which can be found at the root of the source code +# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. +# If you do not have access to either file, you may request a copy from +# help@hdfgroup.org. ## ## Makefile.am ## Run automake to generate a Makefile.in from this file. diff --git a/test/accum.c b/test/accum.c index d134bbc..d76c866 100644 --- a/test/accum.c +++ b/test/accum.c @@ -4,12 +4,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* Programmer: Mike McGreevy diff --git a/test/accum_swmr_reader.c b/test/accum_swmr_reader.c index d98fe70..c1a238d 100644 --- a/test/accum_swmr_reader.c +++ b/test/accum_swmr_reader.c @@ -4,12 +4,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #include "h5test.h" diff --git a/test/app_ref.c b/test/app_ref.c index 4b72bcb..3ef3fef 100644 --- a/test/app_ref.c +++ b/test/app_ref.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* diff --git a/test/atomic_reader.c b/test/atomic_reader.c index 94d9c74..3e3a20a 100644 --- a/test/atomic_reader.c +++ b/test/atomic_reader.c @@ -4,12 +4,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /*------------------------------------------------------------------------- * diff --git a/test/atomic_writer.c b/test/atomic_writer.c index ec1e8c9..218d4da 100644 --- a/test/atomic_writer.c +++ b/test/atomic_writer.c @@ -4,12 +4,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /*------------------------------------------------------------------------- diff --git a/test/big.c b/test/big.c index 0505e54..3685821 100644 --- a/test/big.c +++ b/test/big.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* diff --git a/test/bittests.c b/test/bittests.c index cf83ead..ccd725c 100644 --- a/test/bittests.c +++ b/test/bittests.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* diff --git a/test/btree2.c b/test/btree2.c index ea16583..ec3e20e 100644 --- a/test/btree2.c +++ b/test/btree2.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* Programmer: Quincey Koziol diff --git a/test/cache.c b/test/cache.c index ba6fb0e..0896814 100644 --- a/test/cache.c +++ b/test/cache.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* Programmer: John Mainzer diff --git a/test/cache_api.c b/test/cache_api.c index 867f055..7c0ffa3 100644 --- a/test/cache_api.c +++ b/test/cache_api.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* Programmer: John Mainzer diff --git a/test/cache_common.c b/test/cache_common.c index 52dbb52..69bc26a 100644 --- a/test/cache_common.c +++ b/test/cache_common.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* Programmer: John Mainzer diff --git a/test/cache_common.h b/test/cache_common.h index f17c16b..8999e44 100644 --- a/test/cache_common.h +++ b/test/cache_common.h @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* Programmer: John Mainzer diff --git a/test/cache_image.c b/test/cache_image.c index dfbd02e..c3adf5c 100644 --- a/test/cache_image.c +++ b/test/cache_image.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* Programmer: John Mainzer diff --git a/test/cache_logging.c b/test/cache_logging.c index 9190a8a..b4ed53b 100644 --- a/test/cache_logging.c +++ b/test/cache_logging.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* Purpose: Tests the metadata cache logging framework */ diff --git a/test/cache_tagging.c b/test/cache_tagging.c index 957187b..ae54fda 100644 --- a/test/cache_tagging.c +++ b/test/cache_tagging.c @@ -3,12 +3,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* Programmer: Mike McGreevy diff --git a/test/chunk_info.c b/test/chunk_info.c index 68bf774..1f19963 100644 --- a/test/chunk_info.c +++ b/test/chunk_info.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* diff --git a/test/cmpd_dset.c b/test/cmpd_dset.c index b44a847..5d6cfc7 100644 --- a/test/cmpd_dset.c +++ b/test/cmpd_dset.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* diff --git a/test/cork.c b/test/cork.c index 6cca163..8eed497 100644 --- a/test/cork.c +++ b/test/cork.c @@ -3,12 +3,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* Programmer: Vailin Choi diff --git a/test/cross_read.c b/test/cross_read.c index 8df81f0..5d5ef07 100644 --- a/test/cross_read.c +++ b/test/cross_read.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* diff --git a/test/dangle.c b/test/dangle.c index 4c8ce6b..1717d12 100644 --- a/test/dangle.c +++ b/test/dangle.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* diff --git a/test/dsets.c b/test/dsets.c index c090174..ef58509 100644 --- a/test/dsets.c +++ b/test/dsets.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* diff --git a/test/dt_arith.c b/test/dt_arith.c index c5c14c87..c7f2986 100644 --- a/test/dt_arith.c +++ b/test/dt_arith.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* diff --git a/test/dtransform.c b/test/dtransform.c index 2769771..0381bb8 100644 --- a/test/dtransform.c +++ b/test/dtransform.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #include "h5test.h" diff --git a/test/dtypes.c b/test/dtypes.c index c3a8066..7e8047d 100644 --- a/test/dtypes.c +++ b/test/dtypes.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* diff --git a/test/dynlib1.c b/test/dynlib1.c index 1ccc33a..e9137fb 100644 --- a/test/dynlib1.c +++ b/test/dynlib1.c @@ -4,12 +4,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic document set and is * - * linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have access * - * to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* * Programmer: Raymond Lu diff --git a/test/dynlib2.c b/test/dynlib2.c index 0d8be2b..2574d4d 100644 --- a/test/dynlib2.c +++ b/test/dynlib2.c @@ -4,12 +4,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic document set and is * - * linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have access * - * to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* * Programmer: Raymond Lu diff --git a/test/dynlib3.c b/test/dynlib3.c index e509a52..8871321 100644 --- a/test/dynlib3.c +++ b/test/dynlib3.c @@ -4,12 +4,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic document set and is * - * linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have access * - * to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* * Programmer: Raymond Lu diff --git a/test/dynlib4.c b/test/dynlib4.c index 8da0270..06d90ff 100644 --- a/test/dynlib4.c +++ b/test/dynlib4.c @@ -4,12 +4,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic document set and is * - * linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have access * - * to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* * Purpose: Tests the plugin module (H5PL) diff --git a/test/earray.c b/test/earray.c index c6f5986..1058565 100644 --- a/test/earray.c +++ b/test/earray.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* Programmer: Quincey Koziol diff --git a/test/efc.c b/test/efc.c index 57a600d..bd008c8 100644 --- a/test/efc.c +++ b/test/efc.c @@ -4,12 +4,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* Programmer: Neil Fortner diff --git a/test/enc_dec_plist.c b/test/enc_dec_plist.c index 5179e8e..36db2d0 100644 --- a/test/enc_dec_plist.c +++ b/test/enc_dec_plist.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* diff --git a/test/enc_dec_plist_cross_platform.c b/test/enc_dec_plist_cross_platform.c index a5d5552..5511828 100644 --- a/test/enc_dec_plist_cross_platform.c +++ b/test/enc_dec_plist_cross_platform.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* diff --git a/test/enum.c b/test/enum.c index 29b702d..4e20713 100644 --- a/test/enum.c +++ b/test/enum.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* diff --git a/test/err_compat.c b/test/err_compat.c index 7779ddc..eee150b 100644 --- a/test/err_compat.c +++ b/test/err_compat.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* diff --git a/test/error_test.c b/test/error_test.c index b150656..9c39065 100644 --- a/test/error_test.c +++ b/test/error_test.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* diff --git a/test/evict_on_close.c b/test/evict_on_close.c index b00c1e4..b4ef246 100644 --- a/test/evict_on_close.c +++ b/test/evict_on_close.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* diff --git a/test/extend.c b/test/extend.c index 68f0d7c..e5c3cb3 100644 --- a/test/extend.c +++ b/test/extend.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* diff --git a/test/external.c b/test/external.c index 35207bd..9502586 100644 --- a/test/external.c +++ b/test/external.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* diff --git a/test/farray.c b/test/farray.c index e84bfae..f9f97bf 100644 --- a/test/farray.c +++ b/test/farray.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* diff --git a/test/fheap.c b/test/fheap.c index e741aad..4be6cb9 100644 --- a/test/fheap.c +++ b/test/fheap.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* Programmer: Quincey Koziol diff --git a/test/file_image.c b/test/file_image.c index dd0a483..90b3233 100644 --- a/test/file_image.c +++ b/test/file_image.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /*********************************************************** diff --git a/test/fillval.c b/test/fillval.c index 6eb3565..ea13de0 100644 --- a/test/fillval.c +++ b/test/fillval.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* diff --git a/test/filter_fail.c b/test/filter_fail.c index f165d8a..76b3106 100644 --- a/test/filter_fail.c +++ b/test/filter_fail.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* diff --git a/test/flush1.c b/test/flush1.c index 4f63093..bdbd731 100644 --- a/test/flush1.c +++ b/test/flush1.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* diff --git a/test/flush2.c b/test/flush2.c index ce3b3e7..9fdf6c1 100644 --- a/test/flush2.c +++ b/test/flush2.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* diff --git a/test/flushrefresh.c b/test/flushrefresh.c index e0a7484..f35ed5e 100644 --- a/test/flushrefresh.c +++ b/test/flushrefresh.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * access to either file, you may request a copy from help@hdfgroup.org. * - * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * /* * Programmer: Mike McGreevy diff --git a/test/freespace.c b/test/freespace.c index 2bf9111..39c5688 100644 --- a/test/freespace.c +++ b/test/freespace.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* * Tests for free-space manager diff --git a/test/gen_bad_compound.c b/test/gen_bad_compound.c index b864195..c52eb95 100644 --- a/test/gen_bad_compound.c +++ b/test/gen_bad_compound.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* diff --git a/test/gen_bad_ohdr.c b/test/gen_bad_ohdr.c index 6d50230..36ba64a 100644 --- a/test/gen_bad_ohdr.c +++ b/test/gen_bad_ohdr.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* diff --git a/test/gen_bogus.c b/test/gen_bogus.c index fdd8744..ec29eb9 100644 --- a/test/gen_bogus.c +++ b/test/gen_bogus.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* diff --git a/test/gen_cross.c b/test/gen_cross.c index af39f69..cf3fc35 100644 --- a/test/gen_cross.c +++ b/test/gen_cross.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* diff --git a/test/gen_deflate.c b/test/gen_deflate.c index 3a9370d..3409a81 100644 --- a/test/gen_deflate.c +++ b/test/gen_deflate.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* diff --git a/test/gen_file_image.c b/test/gen_file_image.c index 0637473..9607cc2 100644 --- a/test/gen_file_image.c +++ b/test/gen_file_image.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* diff --git a/test/gen_filespace.c b/test/gen_filespace.c index 52715ae..4397836 100644 --- a/test/gen_filespace.c +++ b/test/gen_filespace.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #include "hdf5.h" diff --git a/test/gen_filters.c b/test/gen_filters.c index f506602..fa66078 100644 --- a/test/gen_filters.c +++ b/test/gen_filters.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #include "h5test.h" diff --git a/test/gen_mergemsg.c b/test/gen_mergemsg.c index 5df5674..f158d57 100644 --- a/test/gen_mergemsg.c +++ b/test/gen_mergemsg.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* diff --git a/test/gen_new_array.c b/test/gen_new_array.c index c78644d..27f162c 100644 --- a/test/gen_new_array.c +++ b/test/gen_new_array.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* diff --git a/test/gen_new_fill.c b/test/gen_new_fill.c index 4ba85ad..5bdbf73 100644 --- a/test/gen_new_fill.c +++ b/test/gen_new_fill.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* diff --git a/test/gen_new_group.c b/test/gen_new_group.c index b998913..6924291 100644 --- a/test/gen_new_group.c +++ b/test/gen_new_group.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* diff --git a/test/gen_new_mtime.c b/test/gen_new_mtime.c index d7a0f32..b44d567 100644 --- a/test/gen_new_mtime.c +++ b/test/gen_new_mtime.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* diff --git a/test/gen_new_super.c b/test/gen_new_super.c index f6d15f4..f6ce589 100644 --- a/test/gen_new_super.c +++ b/test/gen_new_super.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* diff --git a/test/gen_noencoder.c b/test/gen_noencoder.c index 46a2036..e6ac9cf 100644 --- a/test/gen_noencoder.c +++ b/test/gen_noencoder.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #include "hdf5.h" diff --git a/test/gen_nullspace.c b/test/gen_nullspace.c index 8349a5c..9d76deb 100644 --- a/test/gen_nullspace.c +++ b/test/gen_nullspace.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* diff --git a/test/gen_old_array.c b/test/gen_old_array.c index a4162f2..3fab657 100644 --- a/test/gen_old_array.c +++ b/test/gen_old_array.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* diff --git a/test/gen_old_group.c b/test/gen_old_group.c index 1b33cea..d109329 100644 --- a/test/gen_old_group.c +++ b/test/gen_old_group.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* diff --git a/test/gen_old_layout.c b/test/gen_old_layout.c index 312ee58..56c3e4e 100644 --- a/test/gen_old_layout.c +++ b/test/gen_old_layout.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* diff --git a/test/gen_old_mtime.c b/test/gen_old_mtime.c index ca6012a..cbe3bdc 100644 --- a/test/gen_old_mtime.c +++ b/test/gen_old_mtime.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* diff --git a/test/gen_plist.c b/test/gen_plist.c index 5c54ce8..41f232d 100644 --- a/test/gen_plist.c +++ b/test/gen_plist.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* diff --git a/test/gen_sizes_lheap.c b/test/gen_sizes_lheap.c index de7e261..81742df 100644 --- a/test/gen_sizes_lheap.c +++ b/test/gen_sizes_lheap.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* diff --git a/test/gen_specmetaread.c b/test/gen_specmetaread.c index f489119..d06bd59 100644 --- a/test/gen_specmetaread.c +++ b/test/gen_specmetaread.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* diff --git a/test/gen_udlinks.c b/test/gen_udlinks.c index 55abab0..e48d0e8 100644 --- a/test/gen_udlinks.c +++ b/test/gen_udlinks.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* diff --git a/test/genall5.c b/test/genall5.c index 8a1e853..a48f14b 100644 --- a/test/genall5.c +++ b/test/genall5.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* Programmer: John Mainzer diff --git a/test/genall5.h b/test/genall5.h index 70b5a6f..1dce195 100644 --- a/test/genall5.h +++ b/test/genall5.h @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* Programmer: John Mainzer diff --git a/test/getname.c b/test/getname.c index e6d26ce..c3f3c54 100644 --- a/test/getname.c +++ b/test/getname.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* diff --git a/test/gheap.c b/test/gheap.c index eafc49d..7564afa 100644 --- a/test/gheap.c +++ b/test/gheap.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* diff --git a/test/h5test.c b/test/h5test.c index a36d580..2d77dc8 100644 --- a/test/h5test.c +++ b/test/h5test.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* diff --git a/test/h5test.h b/test/h5test.h index e79f2b1..0e23255 100644 --- a/test/h5test.h +++ b/test/h5test.h @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* diff --git a/test/hyperslab.c b/test/hyperslab.c index 065d001..c28d872 100644 --- a/test/hyperslab.c +++ b/test/hyperslab.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* Programmer: Robb Matzke diff --git a/test/istore.c b/test/istore.c index f6b83c9..8dc5efd 100644 --- a/test/istore.c +++ b/test/istore.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* Programmer: Robb Matzke diff --git a/test/lheap.c b/test/lheap.c index 61323a9..f5b7f77 100644 --- a/test/lheap.c +++ b/test/lheap.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* diff --git a/test/links.c b/test/links.c index e3bbdb2..2d1ef03 100644 --- a/test/links.c +++ b/test/links.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* diff --git a/test/links_env.c b/test/links_env.c index efc7c1e..b32fb32 100644 --- a/test/links_env.c +++ b/test/links_env.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* diff --git a/test/mf.c b/test/mf.c index 160fb92..3197989 100644 --- a/test/mf.c +++ b/test/mf.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* diff --git a/test/mount.c b/test/mount.c index 2502bbe..d2c0d21 100644 --- a/test/mount.c +++ b/test/mount.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* diff --git a/test/mtime.c b/test/mtime.c index 88ed31c..38e3960 100644 --- a/test/mtime.c +++ b/test/mtime.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* diff --git a/test/ntypes.c b/test/ntypes.c index bb6c973..b6f4de7 100644 --- a/test/ntypes.c +++ b/test/ntypes.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* diff --git a/test/objcopy.c b/test/objcopy.c index 0711fb0..b7f5673 100644 --- a/test/objcopy.c +++ b/test/objcopy.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* diff --git a/test/ohdr.c b/test/ohdr.c index 2ac9866..faec835 100644 --- a/test/ohdr.c +++ b/test/ohdr.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* Programmer: Robb Matzke diff --git a/test/page_buffer.c b/test/page_buffer.c index 54a25d6..853ef93 100644 --- a/test/page_buffer.c +++ b/test/page_buffer.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /*********************************************************** diff --git a/test/plugin.c b/test/plugin.c index 2939595..ea22c68 100644 --- a/test/plugin.c +++ b/test/plugin.c @@ -4,12 +4,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic document set and is * - * linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have access * - * to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* * Programmer: Raymond Lu diff --git a/test/pool.c b/test/pool.c index 7d80096..1851d6e 100644 --- a/test/pool.c +++ b/test/pool.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* Programmer: Quincey Koziol diff --git a/test/reserved.c b/test/reserved.c index bb6d328..d8d0c59 100644 --- a/test/reserved.c +++ b/test/reserved.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #include "h5test.h" diff --git a/test/set_extent.c b/test/set_extent.c index 052a35a..b9536e5 100644 --- a/test/set_extent.c +++ b/test/set_extent.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* diff --git a/test/space_overflow.c b/test/space_overflow.c index f0e5e1d..15be9ba 100644 --- a/test/space_overflow.c +++ b/test/space_overflow.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* diff --git a/test/stab.c b/test/stab.c index 00aee21..97abc16 100644 --- a/test/stab.c +++ b/test/stab.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* diff --git a/test/swmr.c b/test/swmr.c index 780eb0f..399a9ec 100644 --- a/test/swmr.c +++ b/test/swmr.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /*********************************************************** diff --git a/test/swmr_addrem_writer.c b/test/swmr_addrem_writer.c index d3b5829..51caa3d 100644 --- a/test/swmr_addrem_writer.c +++ b/test/swmr_addrem_writer.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /*------------------------------------------------------------------------- diff --git a/test/swmr_check_compat_vfd.c b/test/swmr_check_compat_vfd.c index 1bbfda3..1589f6e 100644 --- a/test/swmr_check_compat_vfd.c +++ b/test/swmr_check_compat_vfd.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* Purpose: This is a small program that checks if the HDF5_DRIVER diff --git a/test/swmr_common.c b/test/swmr_common.c index ac17ddd..a0d79e3 100644 --- a/test/swmr_common.c +++ b/test/swmr_common.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /*------------------------------------------------------------------------- diff --git a/test/swmr_common.h b/test/swmr_common.h index a2cee71..99d1cb2 100644 --- a/test/swmr_common.h +++ b/test/swmr_common.h @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #ifndef _SWMR_COMMON_H diff --git a/test/swmr_generator.c b/test/swmr_generator.c index a87879f..1c2ec04 100644 --- a/test/swmr_generator.c +++ b/test/swmr_generator.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /*------------------------------------------------------------------------- diff --git a/test/swmr_reader.c b/test/swmr_reader.c index 79ac107..e181d3a 100644 --- a/test/swmr_reader.c +++ b/test/swmr_reader.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /*------------------------------------------------------------------------- diff --git a/test/swmr_remove_reader.c b/test/swmr_remove_reader.c index 689b010..11649e3 100644 --- a/test/swmr_remove_reader.c +++ b/test/swmr_remove_reader.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /*------------------------------------------------------------------------- diff --git a/test/swmr_remove_writer.c b/test/swmr_remove_writer.c index ddf7ede..82c2f8b 100644 --- a/test/swmr_remove_writer.c +++ b/test/swmr_remove_writer.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /*------------------------------------------------------------------------- diff --git a/test/swmr_sparse_reader.c b/test/swmr_sparse_reader.c index f755cd2..3c98f48 100644 --- a/test/swmr_sparse_reader.c +++ b/test/swmr_sparse_reader.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /*------------------------------------------------------------------------- diff --git a/test/swmr_sparse_writer.c b/test/swmr_sparse_writer.c index 13b21c2..e46f54c 100644 --- a/test/swmr_sparse_writer.c +++ b/test/swmr_sparse_writer.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /*------------------------------------------------------------------------- diff --git a/test/swmr_start_write.c b/test/swmr_start_write.c index ab639fb..2d5c3f9 100644 --- a/test/swmr_start_write.c +++ b/test/swmr_start_write.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /*------------------------------------------------------------------------- diff --git a/test/swmr_writer.c b/test/swmr_writer.c index 8f6be19..ee7e32e 100644 --- a/test/swmr_writer.c +++ b/test/swmr_writer.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /*------------------------------------------------------------------------- diff --git a/test/tarray.c b/test/tarray.c index 4a87981..a35b8a3 100644 --- a/test/tarray.c +++ b/test/tarray.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /*********************************************************** diff --git a/test/tattr.c b/test/tattr.c index 6f55081..3b0c90e 100644 --- a/test/tattr.c +++ b/test/tattr.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /*********************************************************** diff --git a/test/tcheck_version.c b/test/tcheck_version.c index 5808680..574d7c9 100644 --- a/test/tcheck_version.c +++ b/test/tcheck_version.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* diff --git a/test/tchecksum.c b/test/tchecksum.c index cf519c0..febaacc 100644 --- a/test/tchecksum.c +++ b/test/tchecksum.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /*------------------------------------------------------------------------- diff --git a/test/tconfig.c b/test/tconfig.c index 1604c61..a9f3378 100644 --- a/test/tconfig.c +++ b/test/tconfig.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /*********************************************************** diff --git a/test/tcoords.c b/test/tcoords.c index 306c6b2..d729d4b 100644 --- a/test/tcoords.c +++ b/test/tcoords.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /*********************************************************** diff --git a/test/test_plugin.sh.in b/test/test_plugin.sh.in index 1cd87e3..2a1ceaf 100644 --- a/test/test_plugin.sh.in +++ b/test/test_plugin.sh.in @@ -5,12 +5,10 @@ # # This file is part of HDF5. The full HDF5 copyright notice, including # terms governing use, modification, and redistribution, is contained in -# the files COPYING and Copyright.html. COPYING can be found at the root -# of the source code distribution tree; Copyright.html can be found at the -# root level of an installed copy of the electronic document set and is -# linked from the top-level documents page. It can also be found at -# http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have access -# to either file, you may request a copy from help@hdfgroup.org. +# the COPYING file, which can be found at the root of the source code +# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. +# If you do not have access to either file, you may request a copy from +# help@hdfgroup.org. # srcdir=@srcdir@ TOP_BUILDDIR=@top_builddir@ diff --git a/test/test_usecases.sh.in b/test/test_usecases.sh.in index a1fda0e..8bc2078 100644 --- a/test/test_usecases.sh.in +++ b/test/test_usecases.sh.in @@ -5,12 +5,10 @@ # # This file is part of HDF5. The full HDF5 copyright notice, including # terms governing use, modification, and redistribution, is contained in -# the files COPYING and Copyright.html. COPYING can be found at the root -# of the source code distribution tree; Copyright.html can be found at the -# root level of an installed copy of the electronic HDF5 document set and -# is linked from the top-level documents page. It can also be found at -# http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have -# access to either file, you may request a copy from help@hdfgroup.org. +# the COPYING file, which can be found at the root of the source code +# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. +# If you do not have access to either file, you may request a copy from +# help@hdfgroup.org. # # Tests the use cases of swmr features. # diff --git a/test/testcheck_version.sh.in b/test/testcheck_version.sh.in index ed9845e..a5641f5 100644 --- a/test/testcheck_version.sh.in +++ b/test/testcheck_version.sh.in @@ -6,12 +6,10 @@ # # This file is part of HDF5. The full HDF5 copyright notice, including # terms governing use, modification, and redistribution, is contained in -# the files COPYING and Copyright.html. COPYING can be found at the root -# of the source code distribution tree; Copyright.html can be found at the -# root level of an installed copy of the electronic HDF5 document set and -# is linked from the top-level documents page. It can also be found at -# http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have -# access to either file, you may request a copy from help@hdfgroup.org. +# the COPYING file, which can be found at the root of the source code +# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. +# If you do not have access to either file, you may request a copy from +# help@hdfgroup.org. # # Tests for the H5check_version function. diff --git a/test/testerror.sh.in b/test/testerror.sh.in index 7c03414..734b051 100644 --- a/test/testerror.sh.in +++ b/test/testerror.sh.in @@ -6,12 +6,10 @@ # # This file is part of HDF5. The full HDF5 copyright notice, including # terms governing use, modification, and redistribution, is contained in -# the files COPYING and Copyright.html. COPYING can be found at the root -# of the source code distribution tree; Copyright.html can be found at the -# root level of an installed copy of the electronic HDF5 document set and -# is linked from the top-level documents page. It can also be found at -# http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have -# access to either file, you may request a copy from help@hdfgroup.org. +# the COPYING file, which can be found at the root of the source code +# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. +# If you do not have access to either file, you may request a copy from +# help@hdfgroup.org. # # Tests for test_error and err_compat diff --git a/test/testflushrefresh.sh.in b/test/testflushrefresh.sh.in index d894cee..ca46dcb 100644 --- a/test/testflushrefresh.sh.in +++ b/test/testflushrefresh.sh.in @@ -6,12 +6,10 @@ # # This file is part of HDF5. The full HDF5 copyright notice, including # terms governing use, modification, and redistribution, is contained in -# the files COPYING and Copyright.html. COPYING can be found at the root -# of the source code distribution tree; Copyright.html can be found at the -# root level of an installed copy of the electronic HDF5 document set and -# is linked from the top-level documents page. It can also be found at -# http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have -# access to either file, you may request a copy from help@hdfgroup.org. +# the COPYING file, which can be found at the root of the source code +# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. +# If you do not have access to either file, you may request a copy from +# help@hdfgroup.org. # # # Test script for the flush/evict single objects feature. diff --git a/test/testframe.c b/test/testframe.c index c2db235..21f9ea3 100644 --- a/test/testframe.c +++ b/test/testframe.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* diff --git a/test/testhdf5.c b/test/testhdf5.c index 0e7303e..713cccf 100644 --- a/test/testhdf5.c +++ b/test/testhdf5.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* diff --git a/test/testhdf5.h b/test/testhdf5.h index 62dadde..2cbe6c6 100644 --- a/test/testhdf5.h +++ b/test/testhdf5.h @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* diff --git a/test/testlibinfo.sh.in b/test/testlibinfo.sh.in index b7aa6c4..1dd744b 100644 --- a/test/testlibinfo.sh.in +++ b/test/testlibinfo.sh.in @@ -6,12 +6,10 @@ # # This file is part of HDF5. The full HDF5 copyright notice, including # terms governing use, modification, and redistribution, is contained in -# the files COPYING and Copyright.html. COPYING can be found at the root -# of the source code distribution tree; Copyright.html can be found at the -# root level of an installed copy of the electronic HDF5 document set and -# is linked from the top-level documents page. It can also be found at -# http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have -# access to either file, you may request a copy from help@hdfgroup.org. +# the COPYING file, which can be found at the root of the source code +# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. +# If you do not have access to either file, you may request a copy from +# help@hdfgroup.org. # diff --git a/test/testlinks_env.sh.in b/test/testlinks_env.sh.in index 7120430..94e6c7e 100644 --- a/test/testlinks_env.sh.in +++ b/test/testlinks_env.sh.in @@ -6,12 +6,10 @@ # # This file is part of HDF5. The full HDF5 copyright notice, including # terms governing use, modification, and redistribution, is contained in -# the files COPYING and Copyright.html. COPYING can be found at the root -# of the source code distribution tree; Copyright.html can be found at the -# root level of an installed copy of the electronic HDF5 document set and -# is linked from the top-level documents page. It can also be found at -# http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have -# access to either file, you may request a copy from help@hdfgroup.org. +# the COPYING file, which can be found at the root of the source code +# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. +# If you do not have access to either file, you may request a copy from +# help@hdfgroup.org. # # Test for external link with environment variable: HDF5_EXT_PREFIX diff --git a/test/testmeta.c b/test/testmeta.c index e1d12e6..b97eb68 100644 --- a/test/testmeta.c +++ b/test/testmeta.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* diff --git a/test/testswmr.sh.in b/test/testswmr.sh.in index f70d083..f81a7d7 100644 --- a/test/testswmr.sh.in +++ b/test/testswmr.sh.in @@ -6,12 +6,10 @@ # # This file is part of HDF5. The full HDF5 copyright notice, including # terms governing use, modification, and redistribution, is contained in -# the files COPYING and Copyright.html. COPYING can be found at the root -# of the source code distribution tree; Copyright.html can be found at the -# root level of an installed copy of the electronic HDF5 document set and -# is linked from the top-level documents page. It can also be found at -# http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have -# access to either file, you may request a copy from help@hdfgroup.org. +# the COPYING file, which can be found at the root of the source code +# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. +# If you do not have access to either file, you may request a copy from +# help@hdfgroup.org. # # Tests for the swmr feature. # diff --git a/test/testvdsswmr.sh.in b/test/testvdsswmr.sh.in index 3ada67b..32af072 100644 --- a/test/testvdsswmr.sh.in +++ b/test/testvdsswmr.sh.in @@ -6,12 +6,10 @@ # # This file is part of HDF5. The full HDF5 copyright notice, including # terms governing use, modification, and redistribution, is contained in -# the files COPYING and Copyright.html. COPYING can be found at the root -# of the source code distribution tree; Copyright.html can be found at the -# root level of an installed copy of the electronic HDF5 document set and -# is linked from the top-level documents page. It can also be found at -# http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have -# access to either file, you may request a copy from help@hdfgroup.org. +# the COPYING file, which can be found at the root of the source code +# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. +# If you do not have access to either file, you may request a copy from +# help@hdfgroup.org. # # Tests for the swmr feature using virtual datasets. # diff --git a/test/tfile.c b/test/tfile.c index 7edc40c..7274c82 100644 --- a/test/tfile.c +++ b/test/tfile.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /*********************************************************** diff --git a/test/tgenprop.c b/test/tgenprop.c index e6f9692..0e6b5c9 100644 --- a/test/tgenprop.c +++ b/test/tgenprop.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /*********************************************************** diff --git a/test/th5o.c b/test/th5o.c index c2c4034..4baac20 100644 --- a/test/th5o.c +++ b/test/th5o.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /*********************************************************** diff --git a/test/th5s.c b/test/th5s.c index 664c23a..c63320a 100644 --- a/test/th5s.c +++ b/test/th5s.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /*********************************************************** diff --git a/test/theap.c b/test/theap.c index 9c509a1..3c23025 100644 --- a/test/theap.c +++ b/test/theap.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* diff --git a/test/tid.c b/test/tid.c index 6570b1c..494ee60 100644 --- a/test/tid.c +++ b/test/tid.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* Test user-created identifiers (hid_t's) and identifier types. */ diff --git a/test/titerate.c b/test/titerate.c index 3004d62..aad62c9 100644 --- a/test/titerate.c +++ b/test/titerate.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /*********************************************************** diff --git a/test/tmeta.c b/test/tmeta.c index 43fdeac..7eeb493 100644 --- a/test/tmeta.c +++ b/test/tmeta.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /*********************************************************** diff --git a/test/tmisc.c b/test/tmisc.c index 6012588..dc69e18 100644 --- a/test/tmisc.c +++ b/test/tmisc.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /*********************************************************** diff --git a/test/trefer.c b/test/trefer.c index 433239a..05c0130 100644 --- a/test/trefer.c +++ b/test/trefer.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /*********************************************************** diff --git a/test/trefstr.c b/test/trefstr.c index dd76cc1..40ce344 100644 --- a/test/trefstr.c +++ b/test/trefstr.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* diff --git a/test/tselect.c b/test/tselect.c index 9230d8b..85c21bb 100644 --- a/test/tselect.c +++ b/test/tselect.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /*********************************************************** diff --git a/test/tskiplist.c b/test/tskiplist.c index f30948e..b9b00df 100644 --- a/test/tskiplist.c +++ b/test/tskiplist.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* diff --git a/test/tsohm.c b/test/tsohm.c index 9d56fcc..133b196 100644 --- a/test/tsohm.c +++ b/test/tsohm.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /*********************************************************** diff --git a/test/ttime.c b/test/ttime.c index 16acd3e..2eb2117 100644 --- a/test/ttime.c +++ b/test/ttime.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /*********************************************************** diff --git a/test/ttsafe.c b/test/ttsafe.c index bfd24ba..ae4d7c5 100644 --- a/test/ttsafe.c +++ b/test/ttsafe.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* diff --git a/test/ttsafe.h b/test/ttsafe.h index f2e9e86..6cf449f 100644 --- a/test/ttsafe.h +++ b/test/ttsafe.h @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* diff --git a/test/ttsafe_acreate.c b/test/ttsafe_acreate.c index cc3f405..42d0851 100644 --- a/test/ttsafe_acreate.c +++ b/test/ttsafe_acreate.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /******************************************************************** diff --git a/test/ttsafe_cancel.c b/test/ttsafe_cancel.c index 7f8cd53..4bbb326 100644 --- a/test/ttsafe_cancel.c +++ b/test/ttsafe_cancel.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /******************************************************************** diff --git a/test/ttsafe_dcreate.c b/test/ttsafe_dcreate.c index df51f72..65051c7 100644 --- a/test/ttsafe_dcreate.c +++ b/test/ttsafe_dcreate.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /******************************************************************** diff --git a/test/ttsafe_error.c b/test/ttsafe_error.c index a2f25db..889d64b 100644 --- a/test/ttsafe_error.c +++ b/test/ttsafe_error.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /******************************************************************** diff --git a/test/ttst.c b/test/ttst.c index a7c43a2..b26d582 100644 --- a/test/ttst.c +++ b/test/ttst.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* diff --git a/test/tunicode.c b/test/tunicode.c index 2bba9ae..85f5af0 100644 --- a/test/tunicode.c +++ b/test/tunicode.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* Unicode test */ diff --git a/test/tvlstr.c b/test/tvlstr.c index dbc3083..7b520f2 100644 --- a/test/tvlstr.c +++ b/test/tvlstr.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /*********************************************************** diff --git a/test/tvltypes.c b/test/tvltypes.c index d00519d..5121a66 100644 --- a/test/tvltypes.c +++ b/test/tvltypes.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /*********************************************************** diff --git a/test/twriteorder.c b/test/twriteorder.c index 58690f6..0e1d0d4 100644 --- a/test/twriteorder.c +++ b/test/twriteorder.c @@ -4,12 +4,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /*********************************************************** diff --git a/test/unlink.c b/test/unlink.c index e52699a..f5754f8 100644 --- a/test/unlink.c +++ b/test/unlink.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* diff --git a/test/unregister.c b/test/unregister.c index 878270f..a4bf24e 100644 --- a/test/unregister.c +++ b/test/unregister.c @@ -4,12 +4,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic document set and is * - * linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have access * - * to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* * Programmer: Raymond Lu diff --git a/test/use.h b/test/use.h index 6664610..0885cc5 100644 --- a/test/use.h +++ b/test/use.h @@ -4,12 +4,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* diff --git a/test/use_append_chunk.c b/test/use_append_chunk.c index 2b1b631..005eb51 100644 --- a/test/use_append_chunk.c +++ b/test/use_append_chunk.c @@ -4,12 +4,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * diff --git a/test/use_append_mchunks.c b/test/use_append_mchunks.c index f9ce41b..9ee37cb 100644 --- a/test/use_append_mchunks.c +++ b/test/use_append_mchunks.c @@ -4,12 +4,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * diff --git a/test/use_common.c b/test/use_common.c index a18601c..908cac9 100644 --- a/test/use_common.c +++ b/test/use_common.c @@ -4,12 +4,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #include "h5test.h" diff --git a/test/use_disable_mdc_flushes.c b/test/use_disable_mdc_flushes.c index 2915cc3..340f578 100644 --- a/test/use_disable_mdc_flushes.c +++ b/test/use_disable_mdc_flushes.c @@ -4,12 +4,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* diff --git a/test/vds.c b/test/vds.c index e6bfeb3..c9b7a1b 100644 --- a/test/vds.c +++ b/test/vds.c @@ -4,12 +4,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* diff --git a/test/vds_swmr.h b/test/vds_swmr.h index c043fd6..a8e4d50 100644 --- a/test/vds_swmr.h +++ b/test/vds_swmr.h @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #ifndef VDS_SWMR_H diff --git a/test/vds_swmr_gen.c b/test/vds_swmr_gen.c index 60f081e..24c6131 100644 --- a/test/vds_swmr_gen.c +++ b/test/vds_swmr_gen.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #include "h5test.h" diff --git a/test/vds_swmr_reader.c b/test/vds_swmr_reader.c index 7ef2e90..1de0cc5 100644 --- a/test/vds_swmr_reader.c +++ b/test/vds_swmr_reader.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #include "h5test.h" diff --git a/test/vds_swmr_writer.c b/test/vds_swmr_writer.c index abf0124..7824aa0 100644 --- a/test/vds_swmr_writer.c +++ b/test/vds_swmr_writer.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ diff --git a/test/vfd.c b/test/vfd.c index a215264..1932d2c 100644 --- a/test/vfd.c +++ b/test/vfd.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* diff --git a/testpar/Makefile.am b/testpar/Makefile.am index 3889630..b87c1df 100644 --- a/testpar/Makefile.am +++ b/testpar/Makefile.am @@ -5,12 +5,10 @@ # # This file is part of HDF5. The full HDF5 copyright notice, including # terms governing use, modification, and redistribution, is contained in -# the files COPYING and Copyright.html. COPYING can be found at the root -# of the source code distribution tree; Copyright.html can be found at the -# root level of an installed copy of the electronic HDF5 document set and -# is linked from the top-level documents page. It can also be found at -# http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have -# access to either file, you may request a copy from help@hdfgroup.org. +# the COPYING file, which can be found at the root of the source code +# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. +# If you do not have access to either file, you may request a copy from +# help@hdfgroup.org. ## ## Makefile.am ## Run automake to generate a Makefile.in from this file. diff --git a/testpar/t_cache.c b/testpar/t_cache.c index bfa4c8f..700e993 100644 --- a/testpar/t_cache.c +++ b/testpar/t_cache.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* diff --git a/testpar/t_cache_image.c b/testpar/t_cache_image.c index f65b248..524a63f 100644 --- a/testpar/t_cache_image.c +++ b/testpar/t_cache_image.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* Programmer: John Mainzer diff --git a/testpar/t_chunk_alloc.c b/testpar/t_chunk_alloc.c index 05fd2fc..2340ae0 100644 --- a/testpar/t_chunk_alloc.c +++ b/testpar/t_chunk_alloc.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* diff --git a/testpar/t_coll_chunk.c b/testpar/t_coll_chunk.c index ab9de09..c6fa3d4 100644 --- a/testpar/t_coll_chunk.c +++ b/testpar/t_coll_chunk.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #include "testphdf5.h" diff --git a/testpar/t_dset.c b/testpar/t_dset.c index ceacb3a..b952bf3 100644 --- a/testpar/t_dset.c +++ b/testpar/t_dset.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* diff --git a/testpar/t_file.c b/testpar/t_file.c index 4a923d4..1b6978f 100644 --- a/testpar/t_file.c +++ b/testpar/t_file.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* diff --git a/testpar/t_file_image.c b/testpar/t_file_image.c index a2246b6..62db11a 100644 --- a/testpar/t_file_image.c +++ b/testpar/t_file_image.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* diff --git a/testpar/t_filter_read.c b/testpar/t_filter_read.c index 44f3f11..4556b01 100644 --- a/testpar/t_filter_read.c +++ b/testpar/t_filter_read.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* diff --git a/testpar/t_init_term.c b/testpar/t_init_term.c index 824f773..933fbd2 100644 --- a/testpar/t_init_term.c +++ b/testpar/t_init_term.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* diff --git a/testpar/t_mdset.c b/testpar/t_mdset.c index 39cfbbc..5d989bb 100644 --- a/testpar/t_mdset.c +++ b/testpar/t_mdset.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #include "testphdf5.h" diff --git a/testpar/t_mpi.c b/testpar/t_mpi.c index c234257..3d501c9 100644 --- a/testpar/t_mpi.c +++ b/testpar/t_mpi.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* diff --git a/testpar/t_pflush1.c b/testpar/t_pflush1.c index 1bcfeb8..0782f3d 100644 --- a/testpar/t_pflush1.c +++ b/testpar/t_pflush1.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* diff --git a/testpar/t_pflush2.c b/testpar/t_pflush2.c index f9f8459..2051f4e 100644 --- a/testpar/t_pflush2.c +++ b/testpar/t_pflush2.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* diff --git a/testpar/t_ph5basic.c b/testpar/t_ph5basic.c index 76eeaef..574591c 100644 --- a/testpar/t_ph5basic.c +++ b/testpar/t_ph5basic.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* diff --git a/testpar/t_prestart.c b/testpar/t_prestart.c index fab4a7c..719d150 100644 --- a/testpar/t_prestart.c +++ b/testpar/t_prestart.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* diff --git a/testpar/t_prop.c b/testpar/t_prop.c index 2cc0f5e..d5efa94 100644 --- a/testpar/t_prop.c +++ b/testpar/t_prop.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* diff --git a/testpar/t_pshutdown.c b/testpar/t_pshutdown.c index be9734f..def7071 100644 --- a/testpar/t_pshutdown.c +++ b/testpar/t_pshutdown.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* diff --git a/testpar/t_shapesame.c b/testpar/t_shapesame.c index 3675824..d81d2be 100644 --- a/testpar/t_shapesame.c +++ b/testpar/t_shapesame.c @@ -4,12 +4,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* diff --git a/testpar/t_span_tree.c b/testpar/t_span_tree.c index f1487eb..a42df95 100644 --- a/testpar/t_span_tree.c +++ b/testpar/t_span_tree.c @@ -6,12 +6,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* diff --git a/testpar/testpar.h b/testpar/testpar.h index 2c99103..84c073f 100644 --- a/testpar/testpar.h +++ b/testpar/testpar.h @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* common definitions used by all parallel test programs. */ diff --git a/testpar/testphdf5.c b/testpar/testphdf5.c index a58452e..87d9056 100644 --- a/testpar/testphdf5.c +++ b/testpar/testphdf5.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* diff --git a/testpar/testphdf5.h b/testpar/testphdf5.h index 0cf5857..322cb9b 100644 --- a/testpar/testphdf5.h +++ b/testpar/testphdf5.h @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* common definitions used by all parallel hdf5 test programs. */ diff --git a/tools/Makefile.am b/tools/Makefile.am index cd97069..b0c33ed 100644 --- a/tools/Makefile.am +++ b/tools/Makefile.am @@ -5,12 +5,10 @@ # # This file is part of HDF5. The full HDF5 copyright notice, including # terms governing use, modification, and redistribution, is contained in -# the files COPYING and Copyright.html. COPYING can be found at the root -# of the source code distribution tree; Copyright.html can be found at the -# root level of an installed copy of the electronic HDF5 document set and -# is linked from the top-level documents page. It can also be found at -# http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have -# access to either file, you may request a copy from help@hdfgroup.org. +# the COPYING file, which can be found at the root of the source code +# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. +# If you do not have access to either file, you may request a copy from +# help@hdfgroup.org. ## ## Makefile.am ## Run automake to generate a Makefile.in from this file. diff --git a/tools/lib/Makefile.am b/tools/lib/Makefile.am index e8fc6a1..f07dff7 100644 --- a/tools/lib/Makefile.am +++ b/tools/lib/Makefile.am @@ -5,12 +5,10 @@ # # This file is part of HDF5. The full HDF5 copyright notice, including # terms governing use, modification, and redistribution, is contained in -# the files COPYING and Copyright.html. COPYING can be found at the root -# of the source code distribution tree; Copyright.html can be found at the -# root level of an installed copy of the electronic HDF5 document set and -# is linked from the top-level documents page. It can also be found at -# http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have -# access to either file, you may request a copy from help@hdfgroup.org. +# the COPYING file, which can be found at the root of the source code +# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. +# If you do not have access to either file, you may request a copy from +# help@hdfgroup.org. ## ## Makefile.am ## Run automake to generate a Makefile.in from this file. diff --git a/tools/lib/h5diff.c b/tools/lib/h5diff.c index e6ff7e0..afb36d9 100644 --- a/tools/lib/h5diff.c +++ b/tools/lib/h5diff.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #include diff --git a/tools/lib/h5diff.h b/tools/lib/h5diff.h index 04b640f..0226e83 100644 --- a/tools/lib/h5diff.h +++ b/tools/lib/h5diff.h @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #ifndef H5DIFF_H__ diff --git a/tools/lib/h5diff_array.c b/tools/lib/h5diff_array.c index e066937..49f41dc 100644 --- a/tools/lib/h5diff_array.c +++ b/tools/lib/h5diff_array.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #include "H5private.h" diff --git a/tools/lib/h5diff_attr.c b/tools/lib/h5diff_attr.c index b29e360..5642a9b 100644 --- a/tools/lib/h5diff_attr.c +++ b/tools/lib/h5diff_attr.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #include "H5private.h" diff --git a/tools/lib/h5diff_dset.c b/tools/lib/h5diff_dset.c index aca8d02..d8eadda 100644 --- a/tools/lib/h5diff_dset.c +++ b/tools/lib/h5diff_dset.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * -* the files COPYING and Copyright.html. COPYING can be found at the root * -* of the source code distribution tree; Copyright.html can be found at the * -* root level of an installed copy of the electronic HDF5 document set and * -* is linked from the top-level documents page. It can also be found at * -* http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * -* access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #include "H5private.h" diff --git a/tools/lib/h5diff_util.c b/tools/lib/h5diff_util.c index 985a47d..7d6580c 100644 --- a/tools/lib/h5diff_util.c +++ b/tools/lib/h5diff_util.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #include "H5private.h" diff --git a/tools/lib/h5tools.c b/tools/lib/h5tools.c index bfcbfb8..86dca8b 100644 --- a/tools/lib/h5tools.c +++ b/tools/lib/h5tools.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* diff --git a/tools/lib/h5tools.h b/tools/lib/h5tools.h index 38739c8..2bafdfc 100644 --- a/tools/lib/h5tools.h +++ b/tools/lib/h5tools.h @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* diff --git a/tools/lib/h5tools_dump.c b/tools/lib/h5tools_dump.c index a673d15..381a253 100644 --- a/tools/lib/h5tools_dump.c +++ b/tools/lib/h5tools_dump.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* diff --git a/tools/lib/h5tools_dump.h b/tools/lib/h5tools_dump.h index b05f226..dc79f43 100644 --- a/tools/lib/h5tools_dump.h +++ b/tools/lib/h5tools_dump.h @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* diff --git a/tools/lib/h5tools_error.h b/tools/lib/h5tools_error.h index 749157e..136c5ed 100644 --- a/tools/lib/h5tools_error.h +++ b/tools/lib/h5tools_error.h @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* diff --git a/tools/lib/h5tools_filters.c b/tools/lib/h5tools_filters.c index 486d1c6..6ee58c5 100644 --- a/tools/lib/h5tools_filters.c +++ b/tools/lib/h5tools_filters.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #include "H5private.h" diff --git a/tools/lib/h5tools_ref.c b/tools/lib/h5tools_ref.c index 8c869c8..85850e3 100644 --- a/tools/lib/h5tools_ref.c +++ b/tools/lib/h5tools_ref.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #include diff --git a/tools/lib/h5tools_ref.h b/tools/lib/h5tools_ref.h index 7ddb91a..b7bd9a3 100644 --- a/tools/lib/h5tools_ref.h +++ b/tools/lib/h5tools_ref.h @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #ifndef H5TOOLS_REF_H__ diff --git a/tools/lib/h5tools_str.c b/tools/lib/h5tools_str.c index 358e993..88f6cc5 100644 --- a/tools/lib/h5tools_str.c +++ b/tools/lib/h5tools_str.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* diff --git a/tools/lib/h5tools_str.h b/tools/lib/h5tools_str.h index 6173b89..a5045ac 100644 --- a/tools/lib/h5tools_str.h +++ b/tools/lib/h5tools_str.h @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* diff --git a/tools/lib/h5tools_type.c b/tools/lib/h5tools_type.c index 8a56d29..dcc994e 100644 --- a/tools/lib/h5tools_type.c +++ b/tools/lib/h5tools_type.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #include "H5private.h" diff --git a/tools/lib/h5tools_utils.c b/tools/lib/h5tools_utils.c index 0884945..c361e25 100644 --- a/tools/lib/h5tools_utils.c +++ b/tools/lib/h5tools_utils.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* diff --git a/tools/lib/h5tools_utils.h b/tools/lib/h5tools_utils.h index f7ab65b..a31ba3a 100644 --- a/tools/lib/h5tools_utils.h +++ b/tools/lib/h5tools_utils.h @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* diff --git a/tools/lib/h5trav.c b/tools/lib/h5trav.c index 66beb0d..3d55f2d 100644 --- a/tools/lib/h5trav.c +++ b/tools/lib/h5trav.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ diff --git a/tools/lib/h5trav.h b/tools/lib/h5trav.h index 352a9e5..c2ad9b7 100644 --- a/tools/lib/h5trav.h +++ b/tools/lib/h5trav.h @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #ifndef H5TRAV_H__ diff --git a/tools/lib/io_timer.c b/tools/lib/io_timer.c index 6053ce9..e3318e9 100644 --- a/tools/lib/io_timer.c +++ b/tools/lib/io_timer.c @@ -4,12 +4,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* changes: * rename pio_timer.c as io_timer.c; diff --git a/tools/lib/io_timer.h b/tools/lib/io_timer.h index 4ce0733..48b6c87 100644 --- a/tools/lib/io_timer.h +++ b/tools/lib/io_timer.h @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #ifndef IO_TIMER__ diff --git a/tools/lib/ph5diff.h b/tools/lib/ph5diff.h index 2a75228..9628d45 100644 --- a/tools/lib/ph5diff.h +++ b/tools/lib/ph5diff.h @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #ifndef _PH5DIFF_H__ diff --git a/tools/src/Makefile.am b/tools/src/Makefile.am index 358ac6b..beceee5 100644 --- a/tools/src/Makefile.am +++ b/tools/src/Makefile.am @@ -5,12 +5,10 @@ # # This file is part of HDF5. The full HDF5 copyright notice, including # terms governing use, modification, and redistribution, is contained in -# the files COPYING and Copyright.html. COPYING can be found at the root -# of the source code distribution tree; Copyright.html can be found at the -# root level of an installed copy of the electronic HDF5 document set and -# is linked from the top-level documents page. It can also be found at -# http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have -# access to either file, you may request a copy from help@hdfgroup.org. +# the COPYING file, which can be found at the root of the source code +# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. +# If you do not have access to either file, you may request a copy from +# help@hdfgroup.org. ## ## Makefile.am ## Run automake to generate a Makefile.in from this file. diff --git a/tools/src/h5copy/Makefile.am b/tools/src/h5copy/Makefile.am index b2cdf92..d67fafc 100644 --- a/tools/src/h5copy/Makefile.am +++ b/tools/src/h5copy/Makefile.am @@ -5,12 +5,10 @@ # # This file is part of HDF5. The full HDF5 copyright notice, including # terms governing use, modification, and redistribution, is contained in -# the files COPYING and Copyright.html. COPYING can be found at the root -# of the source code distribution tree; Copyright.html can be found at the -# root level of an installed copy of the electronic HDF5 document set and -# is linked from the top-level documents page. It can also be found at -# http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have -# access to either file, you may request a copy from help@hdfgroup.org. +# the COPYING file, which can be found at the root of the source code +# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. +# If you do not have access to either file, you may request a copy from +# help@hdfgroup.org. ## ## Makefile.am ## Run automake to generate a Makefile.in from this file. diff --git a/tools/src/h5copy/h5copy.c b/tools/src/h5copy/h5copy.c index 5371a21..390b93e 100644 --- a/tools/src/h5copy/h5copy.c +++ b/tools/src/h5copy/h5copy.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #include "H5private.h" diff --git a/tools/src/h5diff/Makefile.am b/tools/src/h5diff/Makefile.am index a5af3f2..3957e59 100644 --- a/tools/src/h5diff/Makefile.am +++ b/tools/src/h5diff/Makefile.am @@ -5,12 +5,10 @@ # # This file is part of HDF5. The full HDF5 copyright notice, including # terms governing use, modification, and redistribution, is contained in -# the files COPYING and Copyright.html. COPYING can be found at the root -# of the source code distribution tree; Copyright.html can be found at the -# root level of an installed copy of the electronic HDF5 document set and -# is linked from the top-level documents page. It can also be found at -# http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have -# access to either file, you may request a copy from help@hdfgroup.org. +# the COPYING file, which can be found at the root of the source code +# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. +# If you do not have access to either file, you may request a copy from +# help@hdfgroup.org. ## ## Makefile.am ## Run automake to generate a Makefile.in from this file. diff --git a/tools/src/h5diff/h5diff_common.c b/tools/src/h5diff/h5diff_common.c index 2453ffc..5437803 100644 --- a/tools/src/h5diff/h5diff_common.c +++ b/tools/src/h5diff/h5diff_common.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #include diff --git a/tools/src/h5diff/h5diff_common.h b/tools/src/h5diff/h5diff_common.h index 5b1317f..e5dfe3f 100644 --- a/tools/src/h5diff/h5diff_common.h +++ b/tools/src/h5diff/h5diff_common.h @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #ifndef H5DIFFCOMMON_H__ diff --git a/tools/src/h5diff/h5diff_main.c b/tools/src/h5diff/h5diff_main.c index cdaca29..92a1610 100644 --- a/tools/src/h5diff/h5diff_main.c +++ b/tools/src/h5diff/h5diff_main.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #include diff --git a/tools/src/h5diff/ph5diff_main.c b/tools/src/h5diff/ph5diff_main.c index a26b6e9..bfeb408 100644 --- a/tools/src/h5diff/ph5diff_main.c +++ b/tools/src/h5diff/ph5diff_main.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #include diff --git a/tools/src/h5dump/Makefile.am b/tools/src/h5dump/Makefile.am index dc43065..86109d5 100644 --- a/tools/src/h5dump/Makefile.am +++ b/tools/src/h5dump/Makefile.am @@ -5,12 +5,10 @@ # # This file is part of HDF5. The full HDF5 copyright notice, including # terms governing use, modification, and redistribution, is contained in -# the files COPYING and Copyright.html. COPYING can be found at the root -# of the source code distribution tree; Copyright.html can be found at the -# root level of an installed copy of the electronic HDF5 document set and -# is linked from the top-level documents page. It can also be found at -# http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have -# access to either file, you may request a copy from help@hdfgroup.org. +# the COPYING file, which can be found at the root of the source code +# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. +# If you do not have access to either file, you may request a copy from +# help@hdfgroup.org. ## ## Makefile.am ## Run automake to generate a Makefile.in from this file. diff --git a/tools/src/h5dump/h5dump.c b/tools/src/h5dump/h5dump.c index 562cfd5..b53c212 100644 --- a/tools/src/h5dump/h5dump.c +++ b/tools/src/h5dump/h5dump.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #include #include diff --git a/tools/src/h5dump/h5dump.h b/tools/src/h5dump/h5dump.h index 8224c02..211fd14 100644 --- a/tools/src/h5dump/h5dump.h +++ b/tools/src/h5dump/h5dump.h @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #ifndef H5DUMP_H__ #define H5DUMP_H__ diff --git a/tools/src/h5dump/h5dump_ddl.c b/tools/src/h5dump/h5dump_ddl.c index c78f325..8ce6cd6 100644 --- a/tools/src/h5dump/h5dump_ddl.c +++ b/tools/src/h5dump/h5dump_ddl.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #include #include diff --git a/tools/src/h5dump/h5dump_ddl.h b/tools/src/h5dump/h5dump_ddl.h index 2b3f61e..ae01086 100644 --- a/tools/src/h5dump/h5dump_ddl.h +++ b/tools/src/h5dump/h5dump_ddl.h @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #ifndef H5DUMP_DDL_H__ diff --git a/tools/src/h5dump/h5dump_defines.h b/tools/src/h5dump/h5dump_defines.h index 2be2dcc..7a9d4c0 100644 --- a/tools/src/h5dump/h5dump_defines.h +++ b/tools/src/h5dump/h5dump_defines.h @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #ifndef H5DUMP_DEFINES_H__ #define H5DUMP_DEFINES_H__ diff --git a/tools/src/h5dump/h5dump_extern.h b/tools/src/h5dump/h5dump_extern.h index 8fef1b9..22aca73 100644 --- a/tools/src/h5dump/h5dump_extern.h +++ b/tools/src/h5dump/h5dump_extern.h @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #ifndef H5DUMP_EXTERN_H__ #define H5DUMP_EXTERN_H__ diff --git a/tools/src/h5dump/h5dump_xml.c b/tools/src/h5dump/h5dump_xml.c index 8ed88d2..49d1ba8 100644 --- a/tools/src/h5dump/h5dump_xml.c +++ b/tools/src/h5dump/h5dump_xml.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #include #include diff --git a/tools/src/h5dump/h5dump_xml.h b/tools/src/h5dump/h5dump_xml.h index c1d6c62..3c59917 100644 --- a/tools/src/h5dump/h5dump_xml.h +++ b/tools/src/h5dump/h5dump_xml.h @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #ifndef H5DUMP_XML_H__ #define H5DUMP_XML_H__ diff --git a/tools/src/h5format_convert/Makefile.am b/tools/src/h5format_convert/Makefile.am index 35f9e68..2b36949 100644 --- a/tools/src/h5format_convert/Makefile.am +++ b/tools/src/h5format_convert/Makefile.am @@ -5,12 +5,10 @@ # # This file is part of HDF5. The full HDF5 copyright notice, including # terms governing use, modification, and redistribution, is contained in -# the files COPYING and Copyright.html. COPYING can be found at the root -# of the source code distribution tree; Copyright.html can be found at the -# root level of an installed copy of the electronic HDF5 document set and -# is linked from the top-level documents page. It can also be found at -# http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have -# access to either file, you may request a copy from help@hdfgroup.org. +# the COPYING file, which can be found at the root of the source code +# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. +# If you do not have access to either file, you may request a copy from +# help@hdfgroup.org. ## ## Makefile.am ## Run automake to generate a Makefile.in from this file. diff --git a/tools/src/h5format_convert/h5format_convert.c b/tools/src/h5format_convert/h5format_convert.c index 8ce28dd..2bfe280 100644 --- a/tools/src/h5format_convert/h5format_convert.c +++ b/tools/src/h5format_convert/h5format_convert.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* diff --git a/tools/src/h5import/Makefile.am b/tools/src/h5import/Makefile.am index 2eae9ec..4623eb5 100644 --- a/tools/src/h5import/Makefile.am +++ b/tools/src/h5import/Makefile.am @@ -5,12 +5,10 @@ # # This file is part of HDF5. The full HDF5 copyright notice, including # terms governing use, modification, and redistribution, is contained in -# the files COPYING and Copyright.html. COPYING can be found at the root -# of the source code distribution tree; Copyright.html can be found at the -# root level of an installed copy of the electronic HDF5 document set and -# is linked from the top-level documents page. It can also be found at -# http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have -# access to either file, you may request a copy from help@hdfgroup.org. +# the COPYING file, which can be found at the root of the source code +# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. +# If you do not have access to either file, you may request a copy from +# help@hdfgroup.org. ## ## Makefile.am ## Run automake to generate a Makefile.in from this file. diff --git a/tools/src/h5import/h5import.c b/tools/src/h5import/h5import.c index d1aab0c..c71aeef 100644 --- a/tools/src/h5import/h5import.c +++ b/tools/src/h5import/h5import.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #include "hdf5.h" diff --git a/tools/src/h5import/h5import.h b/tools/src/h5import/h5import.h index c242483..c69a542 100644 --- a/tools/src/h5import/h5import.h +++ b/tools/src/h5import/h5import.h @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* diff --git a/tools/src/h5jam/Makefile.am b/tools/src/h5jam/Makefile.am index e244625..4c44b08 100644 --- a/tools/src/h5jam/Makefile.am +++ b/tools/src/h5jam/Makefile.am @@ -5,12 +5,10 @@ # # This file is part of HDF5. The full HDF5 copyright notice, including # terms governing use, modification, and redistribution, is contained in -# the files COPYING and Copyright.html. COPYING can be found at the root -# of the source code distribution tree; Copyright.html can be found at the -# root level of an installed copy of the electronic HDF5 document set and -# is linked from the top-level documents page. It can also be found at -# http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have -# access to either file, you may request a copy from help@hdfgroup.org. +# the COPYING file, which can be found at the root of the source code +# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. +# If you do not have access to either file, you may request a copy from +# help@hdfgroup.org. ## ## Makefile.am ## Run automake to generate a Makefile.in from this file. diff --git a/tools/src/h5jam/h5jam.c b/tools/src/h5jam/h5jam.c index ae45714..61de604 100644 --- a/tools/src/h5jam/h5jam.c +++ b/tools/src/h5jam/h5jam.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #include "hdf5.h" diff --git a/tools/src/h5jam/h5unjam.c b/tools/src/h5jam/h5unjam.c index 8f88398..1cc8cb3 100644 --- a/tools/src/h5jam/h5unjam.c +++ b/tools/src/h5jam/h5unjam.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #include "hdf5.h" diff --git a/tools/src/h5ls/Makefile.am b/tools/src/h5ls/Makefile.am index dfa8bb6..07279c1 100644 --- a/tools/src/h5ls/Makefile.am +++ b/tools/src/h5ls/Makefile.am @@ -5,12 +5,10 @@ # # This file is part of HDF5. The full HDF5 copyright notice, including # terms governing use, modification, and redistribution, is contained in -# the files COPYING and Copyright.html. COPYING can be found at the root -# of the source code distribution tree; Copyright.html can be found at the -# root level of an installed copy of the electronic HDF5 document set and -# is linked from the top-level documents page. It can also be found at -# http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have -# access to either file, you may request a copy from help@hdfgroup.org. +# the COPYING file, which can be found at the root of the source code +# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. +# If you do not have access to either file, you may request a copy from +# help@hdfgroup.org. ## ## Makefile.am ## Run automake to generate a Makefile.in from this file. diff --git a/tools/src/h5ls/h5ls.c b/tools/src/h5ls/h5ls.c index 88bab20..8e28d82 100644 --- a/tools/src/h5ls/h5ls.c +++ b/tools/src/h5ls/h5ls.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* diff --git a/tools/src/h5repack/Makefile.am b/tools/src/h5repack/Makefile.am index 31d368d..c71e65b 100644 --- a/tools/src/h5repack/Makefile.am +++ b/tools/src/h5repack/Makefile.am @@ -5,12 +5,10 @@ # # This file is part of HDF5. The full HDF5 copyright notice, including # terms governing use, modification, and redistribution, is contained in -# the files COPYING and Copyright.html. COPYING can be found at the root -# of the source code distribution tree; Copyright.html can be found at the -# root level of an installed copy of the electronic HDF5 document set and -# is linked from the top-level documents page. It can also be found at -# http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have -# access to either file, you may request a copy from help@hdfgroup.org. +# the COPYING file, which can be found at the root of the source code +# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. +# If you do not have access to either file, you may request a copy from +# help@hdfgroup.org. ## ## Makefile.am ## Run automake to generate a Makefile.in from this file. diff --git a/tools/src/h5repack/h5repack.c b/tools/src/h5repack/h5repack.c index c09dee6..d047612 100644 --- a/tools/src/h5repack/h5repack.c +++ b/tools/src/h5repack/h5repack.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #include diff --git a/tools/src/h5repack/h5repack.h b/tools/src/h5repack/h5repack.h index 5ad0b80..e36f0ef 100644 --- a/tools/src/h5repack/h5repack.h +++ b/tools/src/h5repack/h5repack.h @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ diff --git a/tools/src/h5repack/h5repack_copy.c b/tools/src/h5repack/h5repack_copy.c index 45d52bf..604e85f 100644 --- a/tools/src/h5repack/h5repack_copy.c +++ b/tools/src/h5repack/h5repack_copy.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #include "h5repack.h" diff --git a/tools/src/h5repack/h5repack_filters.c b/tools/src/h5repack/h5repack_filters.c index e21b829..804727b 100644 --- a/tools/src/h5repack/h5repack_filters.c +++ b/tools/src/h5repack/h5repack_filters.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #include "h5repack.h" diff --git a/tools/src/h5repack/h5repack_main.c b/tools/src/h5repack/h5repack_main.c index 07c2b7d..339dc83 100644 --- a/tools/src/h5repack/h5repack_main.c +++ b/tools/src/h5repack/h5repack_main.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #include "h5tools.h" diff --git a/tools/src/h5repack/h5repack_opttable.c b/tools/src/h5repack/h5repack_opttable.c index 8c98b76..93e34b3 100644 --- a/tools/src/h5repack/h5repack_opttable.c +++ b/tools/src/h5repack/h5repack_opttable.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #include "h5repack.h" diff --git a/tools/src/h5repack/h5repack_parse.c b/tools/src/h5repack/h5repack_parse.c index 6759169..a9a890d 100644 --- a/tools/src/h5repack/h5repack_parse.c +++ b/tools/src/h5repack/h5repack_parse.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #include "h5repack.h" diff --git a/tools/src/h5repack/h5repack_refs.c b/tools/src/h5repack/h5repack_refs.c index f0f32c3..2c38d94 100644 --- a/tools/src/h5repack/h5repack_refs.c +++ b/tools/src/h5repack/h5repack_refs.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #include "h5repack.h" diff --git a/tools/src/h5repack/h5repack_verify.c b/tools/src/h5repack/h5repack_verify.c index 1022d7a..7e79aa7 100644 --- a/tools/src/h5repack/h5repack_verify.c +++ b/tools/src/h5repack/h5repack_verify.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #include "h5repack.h" diff --git a/tools/src/h5stat/Makefile.am b/tools/src/h5stat/Makefile.am index b4d81de..c228b48 100644 --- a/tools/src/h5stat/Makefile.am +++ b/tools/src/h5stat/Makefile.am @@ -5,12 +5,10 @@ # # This file is part of HDF5. The full HDF5 copyright notice, including # terms governing use, modification, and redistribution, is contained in -# the files COPYING and Copyright.html. COPYING can be found at the root -# of the source code distribution tree; Copyright.html can be found at the -# root level of an installed copy of the electronic HDF5 document set and -# is linked from the top-level documents page. It can also be found at -# http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have -# access to either file, you may request a copy from help@hdfgroup.org. +# the COPYING file, which can be found at the root of the source code +# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. +# If you do not have access to either file, you may request a copy from +# help@hdfgroup.org. ## ## Makefile.am ## Run automake to generate a Makefile.in from this file. diff --git a/tools/src/h5stat/h5stat.c b/tools/src/h5stat/h5stat.c index f99bab0..6aee7a8 100644 --- a/tools/src/h5stat/h5stat.c +++ b/tools/src/h5stat/h5stat.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #include diff --git a/tools/src/misc/Makefile.am b/tools/src/misc/Makefile.am index ad3dae9b..64c5ee5 100644 --- a/tools/src/misc/Makefile.am +++ b/tools/src/misc/Makefile.am @@ -5,12 +5,10 @@ # # This file is part of HDF5. The full HDF5 copyright notice, including # terms governing use, modification, and redistribution, is contained in -# the files COPYING and Copyright.html. COPYING can be found at the root -# of the source code distribution tree; Copyright.html can be found at the -# root level of an installed copy of the electronic HDF5 document set and -# is linked from the top-level documents page. It can also be found at -# http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have -# access to either file, you may request a copy from help@hdfgroup.org. +# the COPYING file, which can be found at the root of the source code +# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. +# If you do not have access to either file, you may request a copy from +# help@hdfgroup.org. ## ## Makefile.am ## Run automake to generate a Makefile.in from this file. diff --git a/tools/src/misc/h5cc.in b/tools/src/misc/h5cc.in index 1645855..9c4e3ca 100644 --- a/tools/src/misc/h5cc.in +++ b/tools/src/misc/h5cc.in @@ -6,12 +6,10 @@ # # This file is part of HDF5. The full HDF5 copyright notice, including # terms governing use, modification, and redistribution, is contained in -# the files COPYING and Copyright.html. COPYING can be found at the root -# of the source code distribution tree; Copyright.html can be found at the -# root level of an installed copy of the electronic HDF5 document set and -# is linked from the top-level documents page. It can also be found at -# http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have -# access to either file, you may request a copy from help@hdfgroup.org. +# the COPYING file, which can be found at the root of the source code +# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. +# If you do not have access to either file, you may request a copy from +# help@hdfgroup.org. ## # This tool is adapted from the mpicc command of the MPICH Software. diff --git a/tools/src/misc/h5clear.c b/tools/src/misc/h5clear.c index 5c33b72..e3b989d 100644 --- a/tools/src/misc/h5clear.c +++ b/tools/src/misc/h5clear.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* diff --git a/tools/src/misc/h5debug.c b/tools/src/misc/h5debug.c index ae64952..72f826e 100644 --- a/tools/src/misc/h5debug.c +++ b/tools/src/misc/h5debug.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /*------------------------------------------------------------------------- diff --git a/tools/src/misc/h5mkgrp.c b/tools/src/misc/h5mkgrp.c index aa6057f..597b6b3 100644 --- a/tools/src/misc/h5mkgrp.c +++ b/tools/src/misc/h5mkgrp.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ diff --git a/tools/src/misc/h5redeploy.in b/tools/src/misc/h5redeploy.in index 6b6ef87..242459a 100644 --- a/tools/src/misc/h5redeploy.in +++ b/tools/src/misc/h5redeploy.in @@ -6,12 +6,10 @@ # # This file is part of HDF5. The full HDF5 copyright notice, including # terms governing use, modification, and redistribution, is contained in -# the files COPYING and Copyright.html. COPYING can be found at the root -# of the source code distribution tree; Copyright.html can be found at the -# root level of an installed copy of the electronic HDF5 document set and -# is linked from the top-level documents page. It can also be found at -# http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have -# access to either file, you may request a copy from help@hdfgroup.org. +# the COPYING file, which can be found at the root of the source code +# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. +# If you do not have access to either file, you may request a copy from +# help@hdfgroup.org. # ## Update HDF5 compiler tools after the HDF5 software has been installed ## diff --git a/tools/src/misc/h5repart.c b/tools/src/misc/h5repart.c index e44c957..911e0c6 100644 --- a/tools/src/misc/h5repart.c +++ b/tools/src/misc/h5repart.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* diff --git a/tools/test/Makefile.am b/tools/test/Makefile.am index db09003..19bb047 100644 --- a/tools/test/Makefile.am +++ b/tools/test/Makefile.am @@ -5,12 +5,10 @@ # # This file is part of HDF5. The full HDF5 copyright notice, including # terms governing use, modification, and redistribution, is contained in -# the files COPYING and Copyright.html. COPYING can be found at the root -# of the source code distribution tree; Copyright.html can be found at the -# root level of an installed copy of the electronic HDF5 document set and -# is linked from the top-level documents page. It can also be found at -# http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have -# access to either file, you may request a copy from help@hdfgroup.org. +# the COPYING file, which can be found at the root of the source code +# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. +# If you do not have access to either file, you may request a copy from +# help@hdfgroup.org. ## ## Makefile.am ## Run automake to generate a Makefile.in from this file. diff --git a/tools/test/h5copy/Makefile.am b/tools/test/h5copy/Makefile.am index becb55f..5fda4a0 100644 --- a/tools/test/h5copy/Makefile.am +++ b/tools/test/h5copy/Makefile.am @@ -5,12 +5,10 @@ # # This file is part of HDF5. The full HDF5 copyright notice, including # terms governing use, modification, and redistribution, is contained in -# the files COPYING and Copyright.html. COPYING can be found at the root -# of the source code distribution tree; Copyright.html can be found at the -# root level of an installed copy of the electronic HDF5 document set and -# is linked from the top-level documents page. It can also be found at -# http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have -# access to either file, you may request a copy from help@hdfgroup.org. +# the COPYING file, which can be found at the root of the source code +# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. +# If you do not have access to either file, you may request a copy from +# help@hdfgroup.org. ## ## Makefile.am ## Run automake to generate a Makefile.in from this file. diff --git a/tools/test/h5copy/h5copygentest.c b/tools/test/h5copy/h5copygentest.c index 7669702..ed41998 100644 --- a/tools/test/h5copy/h5copygentest.c +++ b/tools/test/h5copy/h5copygentest.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* diff --git a/tools/test/h5copy/testh5copy.sh.in b/tools/test/h5copy/testh5copy.sh.in index dbee089..ace3981 100644 --- a/tools/test/h5copy/testh5copy.sh.in +++ b/tools/test/h5copy/testh5copy.sh.in @@ -6,12 +6,10 @@ # # This file is part of HDF5. The full HDF5 copyright notice, including # terms governing use, modification, and redistribution, is contained in -# the files COPYING and Copyright.html. COPYING can be found at the root -# of the source code distribution tree; Copyright.html can be found at the -# root level of an installed copy of the electronic HDF5 document set and -# is linked from the top-level documents page. It can also be found at -# http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have -# access to either file, you may request a copy from help@hdfgroup.org. +# the COPYING file, which can be found at the root of the source code +# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. +# If you do not have access to either file, you may request a copy from +# help@hdfgroup.org. # # Tests for the h5copy tool # diff --git a/tools/test/h5diff/Makefile.am b/tools/test/h5diff/Makefile.am index 1d700ea..9c6d80f 100644 --- a/tools/test/h5diff/Makefile.am +++ b/tools/test/h5diff/Makefile.am @@ -5,12 +5,10 @@ # # This file is part of HDF5. The full HDF5 copyright notice, including # terms governing use, modification, and redistribution, is contained in -# the files COPYING and Copyright.html. COPYING can be found at the root -# of the source code distribution tree; Copyright.html can be found at the -# root level of an installed copy of the electronic HDF5 document set and -# is linked from the top-level documents page. It can also be found at -# http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have -# access to either file, you may request a copy from help@hdfgroup.org. +# the COPYING file, which can be found at the root of the source code +# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. +# If you do not have access to either file, you may request a copy from +# help@hdfgroup.org. ## ## Makefile.am ## Run automake to generate a Makefile.in from this file. diff --git a/tools/test/h5diff/dynlib_diff.c b/tools/test/h5diff/dynlib_diff.c index d80777d..571452e 100644 --- a/tools/test/h5diff/dynlib_diff.c +++ b/tools/test/h5diff/dynlib_diff.c @@ -4,12 +4,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic document set and is * - * linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have access * - * to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* * Purpose: Tests the plugin module (H5PL) diff --git a/tools/test/h5diff/h5diff_plugin.sh.in b/tools/test/h5diff/h5diff_plugin.sh.in index ffd2ea1..0390c40 100644 --- a/tools/test/h5diff/h5diff_plugin.sh.in +++ b/tools/test/h5diff/h5diff_plugin.sh.in @@ -5,12 +5,10 @@ # # This file is part of HDF5. The full HDF5 copyright notice, including # terms governing use, modification, and redistribution, is contained in -# the files COPYING and Copyright.html. COPYING can be found at the root -# of the source code distribution tree; Copyright.html can be found at the -# root level of an installed copy of the electronic document set and is -# linked from the top-level documents page. It can also be found at -# http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have access -# to either file, you may request a copy from help@hdfgroup.org. +# the COPYING file, which can be found at the root of the source code +# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. +# If you do not have access to either file, you may request a copy from +# help@hdfgroup.org. # srcdir=@srcdir@ TOP_BUILDDIR=@top_builddir@ diff --git a/tools/test/h5diff/h5diffgentest.c b/tools/test/h5diff/h5diffgentest.c index c3b45bc..cc7b057 100644 --- a/tools/test/h5diff/h5diffgentest.c +++ b/tools/test/h5diff/h5diffgentest.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * -* the files COPYING and Copyright.html. COPYING can be found at the root * -* of the source code distribution tree; Copyright.html can be found at the * -* root level of an installed copy of the electronic HDF5 document set and * -* is linked from the top-level documents page. It can also be found at * -* http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * -* access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #include diff --git a/tools/test/h5diff/testh5diff.sh.in b/tools/test/h5diff/testh5diff.sh.in index 1069ed5..86658e2 100644 --- a/tools/test/h5diff/testh5diff.sh.in +++ b/tools/test/h5diff/testh5diff.sh.in @@ -6,12 +6,10 @@ # # This file is part of HDF5. The full HDF5 copyright notice, including # terms governing use, modification, and redistribution, is contained in -# the files COPYING and Copyright.html. COPYING can be found at the root -# of the source code distribution tree; Copyright.html can be found at the -# root level of an installed copy of the electronic HDF5 document set and -# is linked from the top-level documents page. It can also be found at -# http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have -# access to either file, you may request a copy from help@hdfgroup.org. +# the COPYING file, which can be found at the root of the source code +# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. +# If you do not have access to either file, you may request a copy from +# help@hdfgroup.org. # # Tests for the h5diff tool # diff --git a/tools/test/h5diff/testph5diff.sh.in b/tools/test/h5diff/testph5diff.sh.in index ca212a1..b726a80 100644 --- a/tools/test/h5diff/testph5diff.sh.in +++ b/tools/test/h5diff/testph5diff.sh.in @@ -6,12 +6,10 @@ # # This file is part of HDF5. The full HDF5 copyright notice, including # terms governing use, modification, and redistribution, is contained in -# the files COPYING and Copyright.html. COPYING can be found at the root -# of the source code distribution tree; Copyright.html can be found at the -# root level of an installed copy of the electronic HDF5 document set and -# is linked from the top-level documents page. It can also be found at -# http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have -# access to either file, you may request a copy from help@hdfgroup.org. +# the COPYING file, which can be found at the root of the source code +# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. +# If you do not have access to either file, you may request a copy from +# help@hdfgroup.org. # srcdir=@srcdir@ diff --git a/tools/test/h5dump/Makefile.am b/tools/test/h5dump/Makefile.am index a3d1df7..9a63730 100644 --- a/tools/test/h5dump/Makefile.am +++ b/tools/test/h5dump/Makefile.am @@ -5,12 +5,10 @@ # # This file is part of HDF5. The full HDF5 copyright notice, including # terms governing use, modification, and redistribution, is contained in -# the files COPYING and Copyright.html. COPYING can be found at the root -# of the source code distribution tree; Copyright.html can be found at the -# root level of an installed copy of the electronic HDF5 document set and -# is linked from the top-level documents page. It can also be found at -# http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have -# access to either file, you may request a copy from help@hdfgroup.org. +# the COPYING file, which can be found at the root of the source code +# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. +# If you do not have access to either file, you may request a copy from +# help@hdfgroup.org. ## ## Makefile.am ## Run automake to generate a Makefile.in from this file. diff --git a/tools/test/h5dump/binread.c b/tools/test/h5dump/binread.c index 74db92c..6165cd8 100644 --- a/tools/test/h5dump/binread.c +++ b/tools/test/h5dump/binread.c @@ -6,12 +6,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #include diff --git a/tools/test/h5dump/dynlib_dump.c b/tools/test/h5dump/dynlib_dump.c index d80777d..571452e 100644 --- a/tools/test/h5dump/dynlib_dump.c +++ b/tools/test/h5dump/dynlib_dump.c @@ -4,12 +4,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic document set and is * - * linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have access * - * to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* * Purpose: Tests the plugin module (H5PL) diff --git a/tools/test/h5dump/h5dump_plugin.sh.in b/tools/test/h5dump/h5dump_plugin.sh.in index d19981e..e7ac564 100644 --- a/tools/test/h5dump/h5dump_plugin.sh.in +++ b/tools/test/h5dump/h5dump_plugin.sh.in @@ -5,12 +5,10 @@ # # This file is part of HDF5. The full HDF5 copyright notice, including # terms governing use, modification, and redistribution, is contained in -# the files COPYING and Copyright.html. COPYING can be found at the root -# of the source code distribution tree; Copyright.html can be found at the -# root level of an installed copy of the electronic document set and is -# linked from the top-level documents page. It can also be found at -# http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have access -# to either file, you may request a copy from help@hdfgroup.org. +# the COPYING file, which can be found at the root of the source code +# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. +# If you do not have access to either file, you may request a copy from +# help@hdfgroup.org. # srcdir=@srcdir@ TOP_BUILDDIR=@top_builddir@ diff --git a/tools/test/h5dump/h5dumpgentest.c b/tools/test/h5dump/h5dumpgentest.c index afcf405..48bc27d 100644 --- a/tools/test/h5dump/h5dumpgentest.c +++ b/tools/test/h5dump/h5dumpgentest.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* diff --git a/tools/test/h5dump/testh5dump.sh.in b/tools/test/h5dump/testh5dump.sh.in index 14d753c..cf5f246 100644 --- a/tools/test/h5dump/testh5dump.sh.in +++ b/tools/test/h5dump/testh5dump.sh.in @@ -6,12 +6,10 @@ # # This file is part of HDF5. The full HDF5 copyright notice, including # terms governing use, modification, and redistribution, is contained in -# the files COPYING and Copyright.html. COPYING can be found at the root -# of the source code distribution tree; Copyright.html can be found at the -# root level of an installed copy of the electronic HDF5 document set and -# is linked from the top-level documents page. It can also be found at -# http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have -# access to either file, you may request a copy from help@hdfgroup.org. +# the COPYING file, which can be found at the root of the source code +# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. +# If you do not have access to either file, you may request a copy from +# help@hdfgroup.org. # # Tests for the h5dump tool diff --git a/tools/test/h5dump/testh5dumppbits.sh.in b/tools/test/h5dump/testh5dumppbits.sh.in index 92247d3..3b9b078 100644 --- a/tools/test/h5dump/testh5dumppbits.sh.in +++ b/tools/test/h5dump/testh5dumppbits.sh.in @@ -6,12 +6,10 @@ # # This file is part of HDF5. The full HDF5 copyright notice, including # terms governing use, modification, and redistribution, is contained in -# the files COPYING and Copyright.html. COPYING can be found at the root -# of the source code distribution tree; Copyright.html can be found at the -# root level of an installed copy of the electronic HDF5 document set and -# is linked from the top-level documents page. It can also be found at -# http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have -# access to either file, you may request a copy from help@hdfgroup.org. +# the COPYING file, which can be found at the root of the source code +# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. +# If you do not have access to either file, you may request a copy from +# help@hdfgroup.org. # # Tests for the h5dump tool with packed bits type files diff --git a/tools/test/h5dump/testh5dumpvds.sh.in b/tools/test/h5dump/testh5dumpvds.sh.in index 459d506..63c0d85 100644 --- a/tools/test/h5dump/testh5dumpvds.sh.in +++ b/tools/test/h5dump/testh5dumpvds.sh.in @@ -6,12 +6,10 @@ # # This file is part of HDF5. The full HDF5 copyright notice, including # terms governing use, modification, and redistribution, is contained in -# the files COPYING and Copyright.html. COPYING can be found at the root -# of the source code distribution tree; Copyright.html can be found at the -# root level of an installed copy of the electronic HDF5 document set and -# is linked from the top-level documents page. It can also be found at -# http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have -# access to either file, you may request a copy from help@hdfgroup.org. +# the COPYING file, which can be found at the root of the source code +# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. +# If you do not have access to either file, you may request a copy from +# help@hdfgroup.org. # # Tests for the h5dump tool with vds type files diff --git a/tools/test/h5dump/testh5dumpxml.sh.in b/tools/test/h5dump/testh5dumpxml.sh.in index 638a710..5a69845 100644 --- a/tools/test/h5dump/testh5dumpxml.sh.in +++ b/tools/test/h5dump/testh5dumpxml.sh.in @@ -6,12 +6,10 @@ # # This file is part of HDF5. The full HDF5 copyright notice, including # terms governing use, modification, and redistribution, is contained in -# the files COPYING and Copyright.html. COPYING can be found at the root -# of the source code distribution tree; Copyright.html can be found at the -# root level of an installed copy of the electronic HDF5 document set and -# is linked from the top-level documents page. It can also be found at -# http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have -# access to either file, you may request a copy from help@hdfgroup.org. +# the COPYING file, which can be found at the root of the source code +# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. +# If you do not have access to either file, you may request a copy from +# help@hdfgroup.org. # # Tests for the h5dump tool diff --git a/tools/test/h5format_convert/Makefile.am b/tools/test/h5format_convert/Makefile.am index f67b2ce..eb2d5af 100644 --- a/tools/test/h5format_convert/Makefile.am +++ b/tools/test/h5format_convert/Makefile.am @@ -5,12 +5,10 @@ # # This file is part of HDF5. The full HDF5 copyright notice, including # terms governing use, modification, and redistribution, is contained in -# the files COPYING and Copyright.html. COPYING can be found at the root -# of the source code distribution tree; Copyright.html can be found at the -# root level of an installed copy of the electronic HDF5 document set and -# is linked from the top-level documents page. It can also be found at -# http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have -# access to either file, you may request a copy from help@hdfgroup.org. +# the COPYING file, which can be found at the root of the source code +# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. +# If you do not have access to either file, you may request a copy from +# help@hdfgroup.org. ## ## Makefile.am ## Run automake to generate a Makefile.in from this file. diff --git a/tools/test/h5format_convert/h5fc_chk_idx.c b/tools/test/h5format_convert/h5fc_chk_idx.c index 3a87594..8369668 100644 --- a/tools/test/h5format_convert/h5fc_chk_idx.c +++ b/tools/test/h5format_convert/h5fc_chk_idx.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* diff --git a/tools/test/h5format_convert/h5fc_gentest.c b/tools/test/h5format_convert/h5fc_gentest.c index aea84f8..8c873be 100644 --- a/tools/test/h5format_convert/h5fc_gentest.c +++ b/tools/test/h5format_convert/h5fc_gentest.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* diff --git a/tools/test/h5format_convert/testh5fc.sh.in b/tools/test/h5format_convert/testh5fc.sh.in index 24f04d6..c3056e8 100644 --- a/tools/test/h5format_convert/testh5fc.sh.in +++ b/tools/test/h5format_convert/testh5fc.sh.in @@ -6,12 +6,10 @@ # # This file is part of HDF5. The full HDF5 copyright notice, including # terms governing use, modification, and redistribution, is contained in -# the files COPYING and Copyright.html. COPYING can be found at the root -# of the source code distribution tree; Copyright.html can be found at the -# root level of an installed copy of the electronic HDF5 document set and -# is linked from the top-level documents page. It can also be found at -# http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have -# access to either file, you may request a copy from help@hdfgroup.org. +# the COPYING file, which can be found at the root of the source code +# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. +# If you do not have access to either file, you may request a copy from +# help@hdfgroup.org. # # Tests for the h5format_convert tool # diff --git a/tools/test/h5import/Makefile.am b/tools/test/h5import/Makefile.am index f238f77..7c5371c 100644 --- a/tools/test/h5import/Makefile.am +++ b/tools/test/h5import/Makefile.am @@ -5,12 +5,10 @@ # # This file is part of HDF5. The full HDF5 copyright notice, including # terms governing use, modification, and redistribution, is contained in -# the files COPYING and Copyright.html. COPYING can be found at the root -# of the source code distribution tree; Copyright.html can be found at the -# root level of an installed copy of the electronic HDF5 document set and -# is linked from the top-level documents page. It can also be found at -# http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have -# access to either file, you may request a copy from help@hdfgroup.org. +# the COPYING file, which can be found at the root of the source code +# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. +# If you do not have access to either file, you may request a copy from +# help@hdfgroup.org. ## ## Makefile.am ## Run automake to generate a Makefile.in from this file. diff --git a/tools/test/h5import/h5importtest.c b/tools/test/h5import/h5importtest.c index 38fd75b..135b8e4 100644 --- a/tools/test/h5import/h5importtest.c +++ b/tools/test/h5import/h5importtest.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #include diff --git a/tools/test/h5import/h5importtestutil.sh.in b/tools/test/h5import/h5importtestutil.sh.in index 1a9a3fc..3bbe37b 100644 --- a/tools/test/h5import/h5importtestutil.sh.in +++ b/tools/test/h5import/h5importtestutil.sh.in @@ -6,12 +6,10 @@ # # This file is part of HDF5. The full HDF5 copyright notice, including # terms governing use, modification, and redistribution, is contained in -# the files COPYING and Copyright.html. COPYING can be found at the root -# of the source code distribution tree; Copyright.html can be found at the -# root level of an installed copy of the electronic HDF5 document set and -# is linked from the top-level documents page. It can also be found at -# http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have -# access to either file, you may request a copy from help@hdfgroup.org. +# the COPYING file, which can be found at the root of the source code +# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. +# If you do not have access to either file, you may request a copy from +# help@hdfgroup.org. # # Tests for the h5import tool diff --git a/tools/test/h5jam/Makefile.am b/tools/test/h5jam/Makefile.am index 068f437..c07aeb2 100644 --- a/tools/test/h5jam/Makefile.am +++ b/tools/test/h5jam/Makefile.am @@ -5,12 +5,10 @@ # # This file is part of HDF5. The full HDF5 copyright notice, including # terms governing use, modification, and redistribution, is contained in -# the files COPYING and Copyright.html. COPYING can be found at the root -# of the source code distribution tree; Copyright.html can be found at the -# root level of an installed copy of the electronic HDF5 document set and -# is linked from the top-level documents page. It can also be found at -# http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have -# access to either file, you may request a copy from help@hdfgroup.org. +# the COPYING file, which can be found at the root of the source code +# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. +# If you do not have access to either file, you may request a copy from +# help@hdfgroup.org. ## ## Makefile.am ## Run automake to generate a Makefile.in from this file. diff --git a/tools/test/h5jam/getub.c b/tools/test/h5jam/getub.c index 4e02e6b..7cfde36 100644 --- a/tools/test/h5jam/getub.c +++ b/tools/test/h5jam/getub.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #include "H5private.h" diff --git a/tools/test/h5jam/h5jamgentest.c b/tools/test/h5jam/h5jamgentest.c index a12b17a..8648f07 100644 --- a/tools/test/h5jam/h5jamgentest.c +++ b/tools/test/h5jam/h5jamgentest.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* diff --git a/tools/test/h5jam/tellub.c b/tools/test/h5jam/tellub.c index b4f87af..fad14b7 100644 --- a/tools/test/h5jam/tellub.c +++ b/tools/test/h5jam/tellub.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #include diff --git a/tools/test/h5jam/testh5jam.sh.in b/tools/test/h5jam/testh5jam.sh.in index fb6d9e2..d3d7a9a 100644 --- a/tools/test/h5jam/testh5jam.sh.in +++ b/tools/test/h5jam/testh5jam.sh.in @@ -6,12 +6,10 @@ # # This file is part of HDF5. The full HDF5 copyright notice, including # terms governing use, modification, and redistribution, is contained in -# the files COPYING and Copyright.html. COPYING can be found at the root -# of the source code distribution tree; Copyright.html can be found at the -# root level of an installed copy of the electronic HDF5 document set and -# is linked from the top-level documents page. It can also be found at -# http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have -# access to either file, you may request a copy from help@hdfgroup.org. +# the COPYING file, which can be found at the root of the source code +# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. +# If you do not have access to either file, you may request a copy from +# help@hdfgroup.org. # # Tests for the h5jam/h5unjam tools diff --git a/tools/test/h5ls/Makefile.am b/tools/test/h5ls/Makefile.am index 170aa63..b6dad48 100644 --- a/tools/test/h5ls/Makefile.am +++ b/tools/test/h5ls/Makefile.am @@ -5,12 +5,10 @@ # # This file is part of HDF5. The full HDF5 copyright notice, including # terms governing use, modification, and redistribution, is contained in -# the files COPYING and Copyright.html. COPYING can be found at the root -# of the source code distribution tree; Copyright.html can be found at the -# root level of an installed copy of the electronic HDF5 document set and -# is linked from the top-level documents page. It can also be found at -# http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have -# access to either file, you may request a copy from help@hdfgroup.org. +# the COPYING file, which can be found at the root of the source code +# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. +# If you do not have access to either file, you may request a copy from +# help@hdfgroup.org. ## ## Makefile.am ## Run automake to generate a Makefile.in from this file. diff --git a/tools/test/h5ls/dynlib_ls.c b/tools/test/h5ls/dynlib_ls.c index d80777d..571452e 100644 --- a/tools/test/h5ls/dynlib_ls.c +++ b/tools/test/h5ls/dynlib_ls.c @@ -4,12 +4,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic document set and is * - * linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have access * - * to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* * Purpose: Tests the plugin module (H5PL) diff --git a/tools/test/h5ls/h5ls_plugin.sh.in b/tools/test/h5ls/h5ls_plugin.sh.in index 24b6198..34114d8 100644 --- a/tools/test/h5ls/h5ls_plugin.sh.in +++ b/tools/test/h5ls/h5ls_plugin.sh.in @@ -5,12 +5,10 @@ # # This file is part of HDF5. The full HDF5 copyright notice, including # terms governing use, modification, and redistribution, is contained in -# the files COPYING and Copyright.html. COPYING can be found at the root -# of the source code distribution tree; Copyright.html can be found at the -# root level of an installed copy of the electronic document set and is -# linked from the top-level documents page. It can also be found at -# http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have access -# to either file, you may request a copy from help@hdfgroup.org. +# the COPYING file, which can be found at the root of the source code +# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. +# If you do not have access to either file, you may request a copy from +# help@hdfgroup.org. # srcdir=@srcdir@ TOP_BUILDDIR=@top_builddir@ diff --git a/tools/test/h5ls/testh5ls.sh.in b/tools/test/h5ls/testh5ls.sh.in index 1b3f67d..31877d9 100644 --- a/tools/test/h5ls/testh5ls.sh.in +++ b/tools/test/h5ls/testh5ls.sh.in @@ -6,12 +6,10 @@ # # This file is part of HDF5. The full HDF5 copyright notice, including # terms governing use, modification, and redistribution, is contained in -# the files COPYING and Copyright.html. COPYING can be found at the root -# of the source code distribution tree; Copyright.html can be found at the -# root level of an installed copy of the electronic HDF5 document set and -# is linked from the top-level documents page. It can also be found at -# http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have -# access to either file, you may request a copy from help@hdfgroup.org. +# the COPYING file, which can be found at the root of the source code +# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. +# If you do not have access to either file, you may request a copy from +# help@hdfgroup.org. # # Tests for the h5ls tool diff --git a/tools/test/h5ls/testh5lsvds.sh.in b/tools/test/h5ls/testh5lsvds.sh.in index b5c6aac..ddb1632 100644 --- a/tools/test/h5ls/testh5lsvds.sh.in +++ b/tools/test/h5ls/testh5lsvds.sh.in @@ -6,12 +6,10 @@ # # This file is part of HDF5. The full HDF5 copyright notice, including # terms governing use, modification, and redistribution, is contained in -# the files COPYING and Copyright.html. COPYING can be found at the root -# of the source code distribution tree; Copyright.html can be found at the -# root level of an installed copy of the electronic HDF5 document set and -# is linked from the top-level documents page. It can also be found at -# http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have -# access to either file, you may request a copy from help@hdfgroup.org. +# the COPYING file, which can be found at the root of the source code +# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. +# If you do not have access to either file, you may request a copy from +# help@hdfgroup.org. # # Tests for the h5ls tool diff --git a/tools/test/h5repack/Makefile.am b/tools/test/h5repack/Makefile.am index 5c284b3..8af8091 100644 --- a/tools/test/h5repack/Makefile.am +++ b/tools/test/h5repack/Makefile.am @@ -5,12 +5,10 @@ # # This file is part of HDF5. The full HDF5 copyright notice, including # terms governing use, modification, and redistribution, is contained in -# the files COPYING and Copyright.html. COPYING can be found at the root -# of the source code distribution tree; Copyright.html can be found at the -# root level of an installed copy of the electronic HDF5 document set and -# is linked from the top-level documents page. It can also be found at -# http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have -# access to either file, you may request a copy from help@hdfgroup.org. +# the COPYING file, which can be found at the root of the source code +# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. +# If you do not have access to either file, you may request a copy from +# help@hdfgroup.org. ## ## Makefile.am ## Run automake to generate a Makefile.in from this file. diff --git a/tools/test/h5repack/dynlib_rpk.c b/tools/test/h5repack/dynlib_rpk.c index 3469e58..29c3eae 100644 --- a/tools/test/h5repack/dynlib_rpk.c +++ b/tools/test/h5repack/dynlib_rpk.c @@ -4,12 +4,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic document set and is * - * linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have access * - * to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* * Programmer: Raymond Lu diff --git a/tools/test/h5repack/dynlib_vrpk.c b/tools/test/h5repack/dynlib_vrpk.c index 8da0270..06d90ff 100644 --- a/tools/test/h5repack/dynlib_vrpk.c +++ b/tools/test/h5repack/dynlib_vrpk.c @@ -4,12 +4,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic document set and is * - * linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have access * - * to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* * Purpose: Tests the plugin module (H5PL) diff --git a/tools/test/h5repack/h5repack.sh.in b/tools/test/h5repack/h5repack.sh.in index 23e0663..c943b22 100644 --- a/tools/test/h5repack/h5repack.sh.in +++ b/tools/test/h5repack/h5repack.sh.in @@ -6,12 +6,10 @@ # # This file is part of HDF5. The full HDF5 copyright notice, including # terms governing use, modification, and redistribution, is contained in -# the files COPYING and Copyright.html. COPYING can be found at the root -# of the source code distribution tree; Copyright.html can be found at the -# root level of an installed copy of the electronic HDF5 document set and -# is linked from the top-level documents page. It can also be found at -# http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have -# access to either file, you may request a copy from help@hdfgroup.org. +# the COPYING file, which can be found at the root of the source code +# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. +# If you do not have access to either file, you may request a copy from +# help@hdfgroup.org. # # Tests for the h5repack tool # diff --git a/tools/test/h5repack/h5repack_plugin.sh.in b/tools/test/h5repack/h5repack_plugin.sh.in index 0b28f78..c9fe53c 100644 --- a/tools/test/h5repack/h5repack_plugin.sh.in +++ b/tools/test/h5repack/h5repack_plugin.sh.in @@ -5,12 +5,10 @@ # # This file is part of HDF5. The full HDF5 copyright notice, including # terms governing use, modification, and redistribution, is contained in -# the files COPYING and Copyright.html. COPYING can be found at the root -# of the source code distribution tree; Copyright.html can be found at the -# root level of an installed copy of the electronic document set and is -# linked from the top-level documents page. It can also be found at -# http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have access -# to either file, you may request a copy from help@hdfgroup.org. +# the COPYING file, which can be found at the root of the source code +# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. +# If you do not have access to either file, you may request a copy from +# help@hdfgroup.org. # srcdir=@srcdir@ TOP_BUILDDIR=@top_builddir@ diff --git a/tools/test/h5repack/h5repacktst.c b/tools/test/h5repack/h5repacktst.c index 69e576d..3b82383 100644 --- a/tools/test/h5repack/h5repacktst.c +++ b/tools/test/h5repack/h5repacktst.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * -* the files COPYING and Copyright.html. COPYING can be found at the root * -* of the source code distribution tree; Copyright.html can be found at the * -* root level of an installed copy of the electronic HDF5 document set and * -* is linked from the top-level documents page. It can also be found at * -* http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * -* access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #include "h5repack.h" diff --git a/tools/test/h5repack/testh5repack_detect_szip.c b/tools/test/h5repack/testh5repack_detect_szip.c index e91b2f7..e08d5ab 100644 --- a/tools/test/h5repack/testh5repack_detect_szip.c +++ b/tools/test/h5repack/testh5repack_detect_szip.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #include diff --git a/tools/test/h5stat/Makefile.am b/tools/test/h5stat/Makefile.am index 630e896..dd251f8 100644 --- a/tools/test/h5stat/Makefile.am +++ b/tools/test/h5stat/Makefile.am @@ -5,12 +5,10 @@ # # This file is part of HDF5. The full HDF5 copyright notice, including # terms governing use, modification, and redistribution, is contained in -# the files COPYING and Copyright.html. COPYING can be found at the root -# of the source code distribution tree; Copyright.html can be found at the -# root level of an installed copy of the electronic HDF5 document set and -# is linked from the top-level documents page. It can also be found at -# http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have -# access to either file, you may request a copy from help@hdfgroup.org. +# the COPYING file, which can be found at the root of the source code +# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. +# If you do not have access to either file, you may request a copy from +# help@hdfgroup.org. ## ## Makefile.am ## Run automake to generate a Makefile.in from this file. diff --git a/tools/test/h5stat/h5stat_gentest.c b/tools/test/h5stat/h5stat_gentest.c index 804f418..0f696d0 100644 --- a/tools/test/h5stat/h5stat_gentest.c +++ b/tools/test/h5stat/h5stat_gentest.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* diff --git a/tools/test/h5stat/testh5stat.sh.in b/tools/test/h5stat/testh5stat.sh.in index e94f9bd..c4a52c3 100644 --- a/tools/test/h5stat/testh5stat.sh.in +++ b/tools/test/h5stat/testh5stat.sh.in @@ -6,12 +6,10 @@ # # This file is part of HDF5. The full HDF5 copyright notice, including # terms governing use, modification, and redistribution, is contained in -# the files COPYING and Copyright.html. COPYING can be found at the root -# of the source code distribution tree; Copyright.html can be found at the -# root level of an installed copy of the electronic HDF5 document set and -# is linked from the top-level documents page. It can also be found at -# http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have -# access to either file, you may request a copy from help@hdfgroup.org. +# the COPYING file, which can be found at the root of the source code +# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. +# If you do not have access to either file, you may request a copy from +# help@hdfgroup.org. # # Tests for the h5stat tool # diff --git a/tools/test/misc/Makefile.am b/tools/test/misc/Makefile.am index fc9e1c1..f2d2489 100644 --- a/tools/test/misc/Makefile.am +++ b/tools/test/misc/Makefile.am @@ -5,12 +5,10 @@ # # This file is part of HDF5. The full HDF5 copyright notice, including # terms governing use, modification, and redistribution, is contained in -# the files COPYING and Copyright.html. COPYING can be found at the root -# of the source code distribution tree; Copyright.html can be found at the -# root level of an installed copy of the electronic HDF5 document set and -# is linked from the top-level documents page. It can also be found at -# http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have -# access to either file, you may request a copy from help@hdfgroup.org. +# the COPYING file, which can be found at the root of the source code +# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. +# If you do not have access to either file, you may request a copy from +# help@hdfgroup.org. ## ## Makefile.am ## Run automake to generate a Makefile.in from this file. diff --git a/tools/test/misc/clear_open_chk.c b/tools/test/misc/clear_open_chk.c index 23f58bf..3a61385 100644 --- a/tools/test/misc/clear_open_chk.c +++ b/tools/test/misc/clear_open_chk.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #include "hdf5.h" #include "H5private.h" diff --git a/tools/test/misc/h5clear_gentest.c b/tools/test/misc/h5clear_gentest.c index f8b6a70..5d969b8 100644 --- a/tools/test/misc/h5clear_gentest.c +++ b/tools/test/misc/h5clear_gentest.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #include "hdf5.h" #include "H5private.h" diff --git a/tools/test/misc/h5repart_gentest.c b/tools/test/misc/h5repart_gentest.c index 8a34694..5c1ff87 100644 --- a/tools/test/misc/h5repart_gentest.c +++ b/tools/test/misc/h5repart_gentest.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* diff --git a/tools/test/misc/repart_test.c b/tools/test/misc/repart_test.c index e6da779..372f46a 100644 --- a/tools/test/misc/repart_test.c +++ b/tools/test/misc/repart_test.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* diff --git a/tools/test/misc/talign.c b/tools/test/misc/talign.c index be373e7..7ca1f92 100644 --- a/tools/test/misc/talign.c +++ b/tools/test/misc/talign.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* diff --git a/tools/test/misc/testh5clear.sh.in b/tools/test/misc/testh5clear.sh.in index 71d5cad..8dbc66c 100644 --- a/tools/test/misc/testh5clear.sh.in +++ b/tools/test/misc/testh5clear.sh.in @@ -6,12 +6,10 @@ # # This file is part of HDF5. The full HDF5 copyright notice, including # terms governing use, modification, and redistribution, is contained in -# the files COPYING and Copyright.html. COPYING can be found at the root -# of the source code distribution tree; Copyright.html can be found at the -# root level of an installed copy of the electronic HDF5 document set and -# is linked from the top-level documents page. It can also be found at -# http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have -# access to either file, you may request a copy from help@hdfgroup.org. +# the COPYING file, which can be found at the root of the source code +# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. +# If you do not have access to either file, you may request a copy from +# help@hdfgroup.org. # # Tests for the h5clear tool # diff --git a/tools/test/misc/testh5mkgrp.sh.in b/tools/test/misc/testh5mkgrp.sh.in index 9252934..3990bd2 100644 --- a/tools/test/misc/testh5mkgrp.sh.in +++ b/tools/test/misc/testh5mkgrp.sh.in @@ -6,12 +6,10 @@ # # This file is part of HDF5. The full HDF5 copyright notice, including # terms governing use, modification, and redistribution, is contained in -# the files COPYING and Copyright.html. COPYING can be found at the root -# of the source code distribution tree; Copyright.html can be found at the -# root level of an installed copy of the electronic HDF5 document set and -# is linked from the top-level documents page. It can also be found at -# http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have -# access to either file, you may request a copy from help@hdfgroup.org. +# the COPYING file, which can be found at the root of the source code +# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. +# If you do not have access to either file, you may request a copy from +# help@hdfgroup.org. # # Tests for the h5mkgrp tool # diff --git a/tools/test/misc/testh5repart.sh.in b/tools/test/misc/testh5repart.sh.in index 9a9dd9a..594d37e 100644 --- a/tools/test/misc/testh5repart.sh.in +++ b/tools/test/misc/testh5repart.sh.in @@ -6,12 +6,10 @@ # # This file is part of HDF5. The full HDF5 copyright notice, including # terms governing use, modification, and redistribution, is contained in -# the files COPYING and Copyright.html. COPYING can be found at the root -# of the source code distribution tree; Copyright.html can be found at the -# root level of an installed copy of the electronic HDF5 document set and -# is linked from the top-level documents page. It can also be found at -# http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have -# access to either file, you may request a copy from help@hdfgroup.org. +# the COPYING file, which can be found at the root of the source code +# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. +# If you do not have access to either file, you may request a copy from +# help@hdfgroup.org. # # Tests for the h5repart tool diff --git a/tools/test/misc/vds/Makefile.am b/tools/test/misc/vds/Makefile.am index 89aed64..73c335f 100644 --- a/tools/test/misc/vds/Makefile.am +++ b/tools/test/misc/vds/Makefile.am @@ -5,12 +5,10 @@ # # This file is part of HDF5. The full HDF5 copyright notice, including # terms governing use, modification, and redistribution, is contained in -# the files COPYING and Copyright.html. COPYING can be found at the root -# of the source code distribution tree; Copyright.html can be found at the -# root level of an installed copy of the electronic HDF5 document set and -# is linked from the top-level documents page. It can also be found at -# http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have -# access to either file, you may request a copy from help@hdfgroup.org. +# the COPYING file, which can be found at the root of the source code +# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. +# If you do not have access to either file, you may request a copy from +# help@hdfgroup.org. ## ## Makefile.am ## Run automake to generate a Makefile.in from this file. diff --git a/tools/test/misc/vds/UC_1.h b/tools/test/misc/vds/UC_1.h index 2150cfa..9d1f758 100644 --- a/tools/test/misc/vds/UC_1.h +++ b/tools/test/misc/vds/UC_1.h @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #ifndef UC_1_H diff --git a/tools/test/misc/vds/UC_1_one_dim_gen.c b/tools/test/misc/vds/UC_1_one_dim_gen.c index f47b982..b997280 100644 --- a/tools/test/misc/vds/UC_1_one_dim_gen.c +++ b/tools/test/misc/vds/UC_1_one_dim_gen.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* diff --git a/tools/test/misc/vds/UC_2.h b/tools/test/misc/vds/UC_2.h index fe3f350..a3ee0f7 100644 --- a/tools/test/misc/vds/UC_2.h +++ b/tools/test/misc/vds/UC_2.h @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #ifndef UC_2_H diff --git a/tools/test/misc/vds/UC_2_two_dims_gen.c b/tools/test/misc/vds/UC_2_two_dims_gen.c index d08cc5f..bd70fda 100644 --- a/tools/test/misc/vds/UC_2_two_dims_gen.c +++ b/tools/test/misc/vds/UC_2_two_dims_gen.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* diff --git a/tools/test/misc/vds/UC_3.h b/tools/test/misc/vds/UC_3.h index 0654a48..0c26dfb 100644 --- a/tools/test/misc/vds/UC_3.h +++ b/tools/test/misc/vds/UC_3.h @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #ifndef UC_3_H diff --git a/tools/test/misc/vds/UC_3_gaps_gen.c b/tools/test/misc/vds/UC_3_gaps_gen.c index 7cb208b..e6e7226 100644 --- a/tools/test/misc/vds/UC_3_gaps_gen.c +++ b/tools/test/misc/vds/UC_3_gaps_gen.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* diff --git a/tools/test/misc/vds/UC_4.h b/tools/test/misc/vds/UC_4.h index bfcafed..5dba4fb 100644 --- a/tools/test/misc/vds/UC_4.h +++ b/tools/test/misc/vds/UC_4.h @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #ifndef UC_4_H diff --git a/tools/test/misc/vds/UC_4_printf_gen.c b/tools/test/misc/vds/UC_4_printf_gen.c index d067d47..b328046 100644 --- a/tools/test/misc/vds/UC_4_printf_gen.c +++ b/tools/test/misc/vds/UC_4_printf_gen.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* diff --git a/tools/test/misc/vds/UC_5.h b/tools/test/misc/vds/UC_5.h index 96b2af3..3f8fe41 100644 --- a/tools/test/misc/vds/UC_5.h +++ b/tools/test/misc/vds/UC_5.h @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #ifndef UC_5_H diff --git a/tools/test/misc/vds/UC_5_stride_gen.c b/tools/test/misc/vds/UC_5_stride_gen.c index 38d24a6..a105bbd 100644 --- a/tools/test/misc/vds/UC_5_stride_gen.c +++ b/tools/test/misc/vds/UC_5_stride_gen.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* diff --git a/tools/test/misc/vds/UC_common.h b/tools/test/misc/vds/UC_common.h index 0e61016..962a091 100644 --- a/tools/test/misc/vds/UC_common.h +++ b/tools/test/misc/vds/UC_common.h @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #ifndef USE_CASE_COMMON_H diff --git a/tools/test/perform/Makefile.am b/tools/test/perform/Makefile.am index 1af0e7f..5a89a66 100644 --- a/tools/test/perform/Makefile.am +++ b/tools/test/perform/Makefile.am @@ -5,12 +5,10 @@ # # This file is part of HDF5. The full HDF5 copyright notice, including # terms governing use, modification, and redistribution, is contained in -# the files COPYING and Copyright.html. COPYING can be found at the root -# of the source code distribution tree; Copyright.html can be found at the -# root level of an installed copy of the electronic HDF5 document set and -# is linked from the top-level documents page. It can also be found at -# http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have -# access to either file, you may request a copy from help@hdfgroup.org. +# the COPYING file, which can be found at the root of the source code +# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. +# If you do not have access to either file, you may request a copy from +# help@hdfgroup.org. ## ## Makefile.am ## Run automake to generate a Makefile.in from this file. diff --git a/tools/test/perform/build_h5perf_alone.sh b/tools/test/perform/build_h5perf_alone.sh index b65e863..30d272f 100644 --- a/tools/test/perform/build_h5perf_alone.sh +++ b/tools/test/perform/build_h5perf_alone.sh @@ -6,12 +6,10 @@ # # This file is part of HDF5. The full HDF5 copyright notice, including # terms governing use, modification, and redistribution, is contained in -# the files COPYING and Copyright.html. COPYING can be found at the root -# of the source code distribution tree; Copyright.html can be found at the -# root level of an installed copy of the electronic HDF5 document set and -# is linked from the top-level documents page. It can also be found at -# http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have -# access to either file, you may request a copy from help@hdfgroup.org. +# the COPYING file, which can be found at the root of the source code +# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. +# If you do not have access to either file, you may request a copy from +# help@hdfgroup.org. # # Name: build_h5perf_alone.sh # diff --git a/tools/test/perform/build_h5perf_serial_alone.sh b/tools/test/perform/build_h5perf_serial_alone.sh index 2566609..099e7f9 100644 --- a/tools/test/perform/build_h5perf_serial_alone.sh +++ b/tools/test/perform/build_h5perf_serial_alone.sh @@ -6,12 +6,10 @@ # # This file is part of HDF5. The full HDF5 copyright notice, including # terms governing use, modification, and redistribution, is contained in -# the files COPYING and Copyright.html. COPYING can be found at the root -# of the source code distribution tree; Copyright.html can be found at the -# root level of an installed copy of the electronic HDF5 document set and -# is linked from the top-level documents page. It can also be found at -# http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have -# access to either file, you may request a copy from help@hdfgroup.org. +# the COPYING file, which can be found at the root of the source code +# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. +# If you do not have access to either file, you may request a copy from +# help@hdfgroup.org. # # Name: build_h5perf_serial_alone.sh # diff --git a/tools/test/perform/chunk.c b/tools/test/perform/chunk.c index b1419ee..804f88e 100644 --- a/tools/test/perform/chunk.c +++ b/tools/test/perform/chunk.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* diff --git a/tools/test/perform/gen_report.pl b/tools/test/perform/gen_report.pl index 285f5d7..34b3a83 100644 --- a/tools/test/perform/gen_report.pl +++ b/tools/test/perform/gen_report.pl @@ -6,12 +6,10 @@ # # This file is part of HDF5. The full HDF5 copyright notice, including # terms governing use, modification, and redistribution, is contained in -# the files COPYING and Copyright.html. COPYING can be found at the root -# of the source code distribution tree; Copyright.html can be found at the -# root level of an installed copy of the electronic HDF5 document set and -# is linked from the top-level documents page. It can also be found at -# http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have -# access to either file, you may request a copy from help@hdfgroup.org. +# the COPYING file, which can be found at the root of the source code +# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. +# If you do not have access to either file, you may request a copy from +# help@hdfgroup.org. # # diff --git a/tools/test/perform/iopipe.c b/tools/test/perform/iopipe.c index fd62d37..eac099b 100644 --- a/tools/test/perform/iopipe.c +++ b/tools/test/perform/iopipe.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* diff --git a/tools/test/perform/overhead.c b/tools/test/perform/overhead.c index 98093c7..81f9de6 100644 --- a/tools/test/perform/overhead.c +++ b/tools/test/perform/overhead.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* diff --git a/tools/test/perform/perf.c b/tools/test/perform/perf.c index 7b9590c..b421328 100644 --- a/tools/test/perform/perf.c +++ b/tools/test/perform/perf.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* diff --git a/tools/test/perform/perf_meta.c b/tools/test/perform/perf_meta.c index 2c3a19c..c24e598 100644 --- a/tools/test/perform/perf_meta.c +++ b/tools/test/perform/perf_meta.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* diff --git a/tools/test/perform/pio_engine.c b/tools/test/perform/pio_engine.c index ab11efd..1c0d621 100644 --- a/tools/test/perform/pio_engine.c +++ b/tools/test/perform/pio_engine.c @@ -4,12 +4,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* diff --git a/tools/test/perform/pio_perf.c b/tools/test/perform/pio_perf.c index c1bfadb..597629e 100644 --- a/tools/test/perform/pio_perf.c +++ b/tools/test/perform/pio_perf.c @@ -4,12 +4,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* diff --git a/tools/test/perform/pio_perf.h b/tools/test/perform/pio_perf.h index 89cf3a8..b595c90 100644 --- a/tools/test/perform/pio_perf.h +++ b/tools/test/perform/pio_perf.h @@ -4,12 +4,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #ifndef PIO_PERF_H__ diff --git a/tools/test/perform/pio_standalone.c b/tools/test/perform/pio_standalone.c index 475c678..bd5fb6f 100644 --- a/tools/test/perform/pio_standalone.c +++ b/tools/test/perform/pio_standalone.c @@ -4,12 +4,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ diff --git a/tools/test/perform/pio_standalone.h b/tools/test/perform/pio_standalone.h index f088c93..66ca05a 100644 --- a/tools/test/perform/pio_standalone.h +++ b/tools/test/perform/pio_standalone.h @@ -4,12 +4,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #ifndef PIO_STANDALONE_H__ diff --git a/tools/test/perform/sio_engine.c b/tools/test/perform/sio_engine.c index 2a5efb6..4fead3f 100644 --- a/tools/test/perform/sio_engine.c +++ b/tools/test/perform/sio_engine.c @@ -4,12 +4,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* diff --git a/tools/test/perform/sio_perf.c b/tools/test/perform/sio_perf.c index 2201b99..e77b99e 100644 --- a/tools/test/perform/sio_perf.c +++ b/tools/test/perform/sio_perf.c @@ -4,12 +4,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* diff --git a/tools/test/perform/sio_perf.h b/tools/test/perform/sio_perf.h index 5d9358d..366b791 100644 --- a/tools/test/perform/sio_perf.h +++ b/tools/test/perform/sio_perf.h @@ -4,12 +4,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #ifndef SIO_PERF_H__ diff --git a/tools/test/perform/sio_standalone.c b/tools/test/perform/sio_standalone.c index d92ed30..dfdbc55 100644 --- a/tools/test/perform/sio_standalone.c +++ b/tools/test/perform/sio_standalone.c @@ -4,12 +4,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ diff --git a/tools/test/perform/sio_standalone.h b/tools/test/perform/sio_standalone.h index 83dffa2..8d6d110 100644 --- a/tools/test/perform/sio_standalone.h +++ b/tools/test/perform/sio_standalone.h @@ -4,12 +4,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #ifndef SIO_STANDALONE_H__ diff --git a/tools/test/perform/zip_perf.c b/tools/test/perform/zip_perf.c index d9b1fa2..0636d3b 100644 --- a/tools/test/perform/zip_perf.c +++ b/tools/test/perform/zip_perf.c @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* =========================================================================== -- cgit v0.12 From b9a27fddaa3043684b0137d30b6ec80e7f7d6b52 Mon Sep 17 00:00:00 2001 From: lrknox Date: Fri, 14 Apr 2017 16:40:52 -0500 Subject: Merge pull request #407 in HDFFV/hdf5 from ~LRKNOX/hdf5_lrk:hdf5_1_10_1 to hdf5_1_10_1 * commit '0d05cb607e5951f3a28a101be56ca194022a7fa1': Reverted addition of The HDF Group copyright headers to 3rd party CMake files for Java. Add Copyright headers to 90 files (mostly .cmake files) without Copyright headers. Add "Copyright by The HDF Group."" to copyright header. --- CMakeFilters.cmake | 11 +++++++++++ CMakeInstallation.cmake | 11 +++++++++++ CTestConfig.cmake | 11 +++++++++++ UserMacros.cmake | 11 +++++++++++ c++/examples/CMakeTests.cmake | 11 +++++++++++ c++/test/CMakeTests.cmake | 11 +++++++++++ config/cmake/CTestCustom.cmake | 11 +++++++++++ config/cmake/CTestScript.cmake | 11 +++++++++++ config/cmake/ConfigureChecks.cmake | 11 +++++++++++ config/cmake/ConversionTests.c | 11 +++++++++++ config/cmake/FindHDFJAVA.cmake.in | 11 +++++++++++ config/cmake/H5cxx_config.h.in | 11 +++++++++++ config/cmake/H5pubconf.h.in | 11 +++++++++++ config/cmake/HDF518_Examples.cmake.in | 11 +++++++++++ config/cmake/HDF5Macros.cmake | 11 +++++++++++ config/cmake/HDF5UseFortran.cmake | 11 +++++++++++ config/cmake/HDF5_Examples.cmake.in | 11 +++++++++++ config/cmake/HDF5_Examples_options.cmake | 11 +++++++++++ config/cmake/HDF5_Process_Flex_Files.cmake | 11 +++++++++++ config/cmake/HDFCompilerFlags.cmake | 11 +++++++++++ config/cmake/UserMacros/Windows_MT.cmake | 11 +++++++++++ config/cmake/cacheinit.cmake | 11 +++++++++++ config/cmake/hdf5-config-version.cmake.in | 11 +++++++++++ config/cmake/hdf5-config.cmake.in | 11 +++++++++++ config/cmake/jrunTest.cmake | 11 +++++++++++ config/cmake/mccacheinit.cmake | 11 +++++++++++ config/cmake/scripts/CTestScript.cmake | 11 +++++++++++ config/cmake/scripts/HDF5config.cmake | 11 +++++++++++ config/cmake/scripts/HDF5options.cmake | 11 +++++++++++ config/cmake/userblockTest.cmake | 11 +++++++++++ config/cmake/vfdTest.cmake | 11 +++++++++++ config/cmake_ext_mod/CheckTypeSize.cmake | 11 +++++++++++ config/cmake_ext_mod/ConfigureChecks.cmake | 11 +++++++++++ config/cmake_ext_mod/FindSZIP.cmake | 11 +++++++++++ config/cmake_ext_mod/GetTimeOfDayTest.cpp | 11 +++++++++++ config/cmake_ext_mod/HDFCXXTests.cpp | 11 +++++++++++ config/cmake_ext_mod/HDFLibMacros.cmake | 11 +++++++++++ config/cmake_ext_mod/HDFMacros.cmake | 11 +++++++++++ config/cmake_ext_mod/HDFTests.c | 11 +++++++++++ config/cmake_ext_mod/HDFUseFortran.cmake | 11 +++++++++++ config/cmake_ext_mod/grepTest.cmake | 11 +++++++++++ config/cmake_ext_mod/runTest.cmake | 11 +++++++++++ examples/CMakeTests.cmake | 11 +++++++++++ examples/h5_vds-eiger.c | 11 +++++++++++ examples/h5_vds-exc.c | 11 +++++++++++ examples/h5_vds-exclim.c | 11 +++++++++++ examples/h5_vds-percival-unlim-maxmin.c | 11 +++++++++++ examples/h5_vds-percival-unlim.c | 11 +++++++++++ examples/h5_vds-percival.c | 11 +++++++++++ examples/h5_vds-simpleIO.c | 11 +++++++++++ fortran/examples/CMakeTests.cmake | 11 +++++++++++ fortran/src/H5config_f.inc.cmake | 11 +++++++++++ fortran/src/H5config_f.inc.in | 11 +++++++++++ fortran/src/H5fort_type_defines.h.in | 11 +++++++++++ fortran/test/CMakeTests.cmake | 11 +++++++++++ fortran/testpar/CMakeTests.cmake | 11 +++++++++++ hl/c++/examples/CMakeTests.cmake | 11 +++++++++++ hl/c++/test/CMakeTests.cmake | 11 +++++++++++ hl/examples/CMakeTests.cmake | 11 +++++++++++ hl/fortran/examples/CMakeTests.cmake | 11 +++++++++++ hl/fortran/test/CMakeTests.cmake | 11 +++++++++++ hl/test/CMakeTests.cmake | 11 +++++++++++ hl/test/gen_test_ld.c | 11 +++++++++++ hl/tools/gif2h5/CMakeTests.cmake | 11 +++++++++++ hl/tools/h5watch/CMakeTests.cmake | 11 +++++++++++ test/CMakeTests.cmake | 11 +++++++++++ test/cache_tagging.c | 1 + test/cork.c | 1 + testpar/CMakeTests.cmake | 11 +++++++++++ tools/test/h5copy/CMakeTests.cmake | 11 +++++++++++ tools/test/h5diff/CMakeTests.cmake | 11 +++++++++++ tools/test/h5dump/CMakeTests.cmake | 11 +++++++++++ tools/test/h5dump/CMakeTestsPBITS.cmake | 11 +++++++++++ tools/test/h5dump/CMakeTestsVDS.cmake | 11 +++++++++++ tools/test/h5dump/CMakeTestsXML.cmake | 11 +++++++++++ tools/test/h5format_convert/CMakeTests.cmake | 11 +++++++++++ tools/test/h5import/CMakeTests.cmake | 11 +++++++++++ tools/test/h5jam/CMakeTests.cmake | 11 +++++++++++ tools/test/h5ls/CMakeTests.cmake | 11 +++++++++++ tools/test/h5ls/CMakeTestsVDS.cmake | 11 +++++++++++ tools/test/h5repack/CMakeTests.cmake | 11 +++++++++++ tools/test/h5stat/CMakeTests.cmake | 11 +++++++++++ tools/test/misc/CMakeTestsClear.cmake | 11 +++++++++++ tools/test/misc/CMakeTestsMkgrp.cmake | 11 +++++++++++ tools/test/misc/CMakeTestsRepart.cmake | 11 +++++++++++ tools/test/misc/h5perf_gentest.c | 11 +++++++++++ tools/test/perform/CMakeTests.cmake | 11 +++++++++++ 87 files changed, 937 insertions(+) diff --git a/CMakeFilters.cmake b/CMakeFilters.cmake index 700ef15..9b66d95 100644 --- a/CMakeFilters.cmake +++ b/CMakeFilters.cmake @@ -1,3 +1,14 @@ +# +# Copyright by The HDF Group. +# All rights reserved. +# +# This file is part of HDF5. The full HDF5 copyright notice, including +# terms governing use, modification, and redistribution, is contained in +# the COPYING file, which can be found at the root of the source code +# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. +# If you do not have access to either file, you may request a copy from +# help@hdfgroup.org. +# include (ExternalProject) #option (HDF5_ALLOW_EXTERNAL_SUPPORT "Allow External Library Building (NO GIT SVN TGZ)" "NO") diff --git a/CMakeInstallation.cmake b/CMakeInstallation.cmake index 37f3f70..70638d6 100644 --- a/CMakeInstallation.cmake +++ b/CMakeInstallation.cmake @@ -1,3 +1,14 @@ +# +# Copyright by The HDF Group. +# All rights reserved. +# +# This file is part of HDF5. The full HDF5 copyright notice, including +# terms governing use, modification, and redistribution, is contained in +# the COPYING file, which can be found at the root of the source code +# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. +# If you do not have access to either file, you may request a copy from +# help@hdfgroup.org. +# include (CMakePackageConfigHelpers) #----------------------------------------------------------------------------- diff --git a/CTestConfig.cmake b/CTestConfig.cmake index 8efea80..ae78f95 100644 --- a/CTestConfig.cmake +++ b/CTestConfig.cmake @@ -1,3 +1,14 @@ +# +# Copyright by The HDF Group. +# All rights reserved. +# +# This file is part of HDF5. The full HDF5 copyright notice, including +# terms governing use, modification, and redistribution, is contained in +# the COPYING file, which can be found at the root of the source code +# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. +# If you do not have access to either file, you may request a copy from +# help@hdfgroup.org. +# ## This file should be placed in the root directory of your project. ## Then modify the CMakeLists.txt file in the root directory of your ## project to incorporate the testing dashboard. diff --git a/UserMacros.cmake b/UserMacros.cmake index 01e76ed..c578c91 100644 --- a/UserMacros.cmake +++ b/UserMacros.cmake @@ -1,3 +1,14 @@ +# +# Copyright by The HDF Group. +# All rights reserved. +# +# This file is part of HDF5. The full HDF5 copyright notice, including +# terms governing use, modification, and redistribution, is contained in +# the COPYING file, which can be found at the root of the source code +# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. +# If you do not have access to either file, you may request a copy from +# help@hdfgroup.org. +# ######################################################## # Include file for user options ######################################################## diff --git a/c++/examples/CMakeTests.cmake b/c++/examples/CMakeTests.cmake index 8b5c6b9..264a7e7 100644 --- a/c++/examples/CMakeTests.cmake +++ b/c++/examples/CMakeTests.cmake @@ -1,3 +1,14 @@ +# +# Copyright by The HDF Group. +# All rights reserved. +# +# This file is part of HDF5. The full HDF5 copyright notice, including +# terms governing use, modification, and redistribution, is contained in +# the COPYING file, which can be found at the root of the source code +# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. +# If you do not have access to either file, you may request a copy from +# help@hdfgroup.org. +# ############################################################################## ############################################################################## diff --git a/c++/test/CMakeTests.cmake b/c++/test/CMakeTests.cmake index d23a80b..6de801e 100644 --- a/c++/test/CMakeTests.cmake +++ b/c++/test/CMakeTests.cmake @@ -1,3 +1,14 @@ +# +# Copyright by The HDF Group. +# All rights reserved. +# +# This file is part of HDF5. The full HDF5 copyright notice, including +# terms governing use, modification, and redistribution, is contained in +# the COPYING file, which can be found at the root of the source code +# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. +# If you do not have access to either file, you may request a copy from +# help@hdfgroup.org. +# HDFTEST_COPY_FILE("${HDF5_CPP_TEST_SOURCE_DIR}/th5s.h5" "${PROJECT_BINARY_DIR}/th5s.h5" "cpp_testhdf5_files") add_custom_target(cpp_testhdf5_files ALL COMMENT "Copying files needed by cpp_testhdf5 tests" DEPENDS ${cpp_testhdf5_files_list}) diff --git a/config/cmake/CTestCustom.cmake b/config/cmake/CTestCustom.cmake index d5d96bb..7aff076 100644 --- a/config/cmake/CTestCustom.cmake +++ b/config/cmake/CTestCustom.cmake @@ -1,3 +1,14 @@ +# +# Copyright by The HDF Group. +# All rights reserved. +# +# This file is part of HDF5. The full HDF5 copyright notice, including +# terms governing use, modification, and redistribution, is contained in +# the COPYING file, which can be found at the root of the source code +# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. +# If you do not have access to either file, you may request a copy from +# help@hdfgroup.org. +# set (CTEST_CUSTOM_MAXIMUM_NUMBER_OF_WARNINGS 3000) # Allow full output to go to CDash set to 0 SET(CTEST_CUSTOM_MAXIMUM_PASSED_TEST_OUTPUT_SIZE 50000) diff --git a/config/cmake/CTestScript.cmake b/config/cmake/CTestScript.cmake index d53d7a4..a3779d6 100755 --- a/config/cmake/CTestScript.cmake +++ b/config/cmake/CTestScript.cmake @@ -1,3 +1,14 @@ +# +# Copyright by The HDF Group. +# All rights reserved. +# +# This file is part of HDF5. The full HDF5 copyright notice, including +# terms governing use, modification, and redistribution, is contained in +# the COPYING file, which can be found at the root of the source code +# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. +# If you do not have access to either file, you may request a copy from +# help@hdfgroup.org. +# cmake_minimum_required (VERSION 3.2.2 FATAL_ERROR) ######################################################## # For any comments please contact cdashhelp@hdfgroup.org diff --git a/config/cmake/ConfigureChecks.cmake b/config/cmake/ConfigureChecks.cmake index 78b4d03..0848e66 100644 --- a/config/cmake/ConfigureChecks.cmake +++ b/config/cmake/ConfigureChecks.cmake @@ -1,3 +1,14 @@ +# +# Copyright by The HDF Group. +# All rights reserved. +# +# This file is part of HDF5. The full HDF5 copyright notice, including +# terms governing use, modification, and redistribution, is contained in +# the COPYING file, which can be found at the root of the source code +# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. +# If you do not have access to either file, you may request a copy from +# help@hdfgroup.org. +# #----------------------------------------------------------------------------- # Include all the necessary files for macros #----------------------------------------------------------------------------- diff --git a/config/cmake/ConversionTests.c b/config/cmake/ConversionTests.c index b8946a8..082dbd4 100644 --- a/config/cmake/ConversionTests.c +++ b/config/cmake/ConversionTests.c @@ -1,3 +1,14 @@ +/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + * Copyright by The HDF Group. * + * All rights reserved. * + * * + * This file is part of HDF5. The full HDF5 copyright notice, including * + * terms governing use, modification, and redistribution, is contained in * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #ifdef H5_LDOUBLE_TO_LONG_SPECIAL_TEST #include diff --git a/config/cmake/FindHDFJAVA.cmake.in b/config/cmake/FindHDFJAVA.cmake.in index 25057e6..ed2b8c2 100644 --- a/config/cmake/FindHDFJAVA.cmake.in +++ b/config/cmake/FindHDFJAVA.cmake.in @@ -1,4 +1,15 @@ # +# Copyright by The HDF Group. +# All rights reserved. +# +# This file is part of HDF5. The full HDF5 copyright notice, including +# terms governing use, modification, and redistribution, is contained in +# the COPYING file, which can be found at the root of the source code +# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. +# If you do not have access to either file, you may request a copy from +# help@hdfgroup.org. +# +# # To be used by projects that make use of CMakeified hdf-java # diff --git a/config/cmake/H5cxx_config.h.in b/config/cmake/H5cxx_config.h.in index c4e1c03..82e85c6 100644 --- a/config/cmake/H5cxx_config.h.in +++ b/config/cmake/H5cxx_config.h.in @@ -1,3 +1,14 @@ +/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + * Copyright by The HDF Group. * + * All rights reserved. * + * * + * This file is part of HDF5. The full HDF5 copyright notice, including * + * terms governing use, modification, and redistribution, is contained in * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* src/H5cxx_config.h.in Created manually. */ /* Define if offsetof extension is present */ diff --git a/config/cmake/H5pubconf.h.in b/config/cmake/H5pubconf.h.in index 55de8f8..8c01dba 100644 --- a/config/cmake/H5pubconf.h.in +++ b/config/cmake/H5pubconf.h.in @@ -1,3 +1,14 @@ +/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + * Copyright by The HDF Group. * + * All rights reserved. * + * * + * This file is part of HDF5. The full HDF5 copyright notice, including * + * terms governing use, modification, and redistribution, is contained in * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* H5pubconf.h Generated By CMake during the configuration */ #ifndef H5_CONFIG_H_ diff --git a/config/cmake/HDF518_Examples.cmake.in b/config/cmake/HDF518_Examples.cmake.in index 6aa5e1f..33d3a40 100644 --- a/config/cmake/HDF518_Examples.cmake.in +++ b/config/cmake/HDF518_Examples.cmake.in @@ -1,3 +1,14 @@ +# +# Copyright by The HDF Group. +# All rights reserved. +# +# This file is part of HDF5. The full HDF5 copyright notice, including +# terms governing use, modification, and redistribution, is contained in +# the COPYING file, which can be found at the root of the source code +# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. +# If you do not have access to either file, you may request a copy from +# help@hdfgroup.org. +# cmake_minimum_required(VERSION 3.2.2 FATAL_ERROR) ############################################################################################################### # This script will build and run the examples from a folder diff --git a/config/cmake/HDF5Macros.cmake b/config/cmake/HDF5Macros.cmake index 747e043..f08349e 100644 --- a/config/cmake/HDF5Macros.cmake +++ b/config/cmake/HDF5Macros.cmake @@ -1,3 +1,14 @@ +# +# Copyright by The HDF Group. +# All rights reserved. +# +# This file is part of HDF5. The full HDF5 copyright notice, including +# terms governing use, modification, and redistribution, is contained in +# the COPYING file, which can be found at the root of the source code +# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. +# If you do not have access to either file, you may request a copy from +# help@hdfgroup.org. +# #------------------------------------------------------------------------------- macro (H5_SET_LIB_OPTIONS libtarget libname libtype) set (LIB_OUT_NAME "${libname}") diff --git a/config/cmake/HDF5UseFortran.cmake b/config/cmake/HDF5UseFortran.cmake index a419950..3152aaa 100644 --- a/config/cmake/HDF5UseFortran.cmake +++ b/config/cmake/HDF5UseFortran.cmake @@ -1,3 +1,14 @@ +# +# Copyright by The HDF Group. +# All rights reserved. +# +# This file is part of HDF5. The full HDF5 copyright notice, including +# terms governing use, modification, and redistribution, is contained in +# the COPYING file, which can be found at the root of the source code +# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. +# If you do not have access to either file, you may request a copy from +# help@hdfgroup.org. +# ## Check for non-standard extenstion quadmath.h diff --git a/config/cmake/HDF5_Examples.cmake.in b/config/cmake/HDF5_Examples.cmake.in index 04f72a0..5c172dc 100644 --- a/config/cmake/HDF5_Examples.cmake.in +++ b/config/cmake/HDF5_Examples.cmake.in @@ -1,3 +1,14 @@ +# +# Copyright by The HDF Group. +# All rights reserved. +# +# This file is part of HDF5. The full HDF5 copyright notice, including +# terms governing use, modification, and redistribution, is contained in +# the COPYING file, which can be found at the root of the source code +# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. +# If you do not have access to either file, you may request a copy from +# help@hdfgroup.org. +# cmake_minimum_required(VERSION 3.2.2 FATAL_ERROR) ############################################################################################################### # This script will build and run the examples from a folder diff --git a/config/cmake/HDF5_Examples_options.cmake b/config/cmake/HDF5_Examples_options.cmake index a8f0c8e..386e99c 100755 --- a/config/cmake/HDF5_Examples_options.cmake +++ b/config/cmake/HDF5_Examples_options.cmake @@ -1,3 +1,14 @@ +# +# Copyright by The HDF Group. +# All rights reserved. +# +# This file is part of HDF5. The full HDF5 copyright notice, including +# terms governing use, modification, and redistribution, is contained in +# the COPYING file, which can be found at the root of the source code +# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. +# If you do not have access to either file, you may request a copy from +# help@hdfgroup.org. +# ############################################################################################# #### Change default configuration of options in config/cmake/cacheinit.cmake file ### #### format: set(ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DXXX:YY=ZZZZ") ### diff --git a/config/cmake/HDF5_Process_Flex_Files.cmake b/config/cmake/HDF5_Process_Flex_Files.cmake index 667ad31..2595c39 100644 --- a/config/cmake/HDF5_Process_Flex_Files.cmake +++ b/config/cmake/HDF5_Process_Flex_Files.cmake @@ -1,3 +1,14 @@ +# +# Copyright by The HDF Group. +# All rights reserved. +# +# This file is part of HDF5. The full HDF5 copyright notice, including +# terms governing use, modification, and redistribution, is contained in +# the COPYING file, which can be found at the root of the source code +# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. +# If you do not have access to either file, you may request a copy from +# help@hdfgroup.org. +# # post process flex/bison files message (STATUS "File: ${GEN_DIR} ${FILE_PARSE} ${FILE_ANALYZE}") diff --git a/config/cmake/HDFCompilerFlags.cmake b/config/cmake/HDFCompilerFlags.cmake index 238e363..5f71f33 100644 --- a/config/cmake/HDFCompilerFlags.cmake +++ b/config/cmake/HDFCompilerFlags.cmake @@ -1,3 +1,14 @@ +# +# Copyright by The HDF Group. +# All rights reserved. +# +# This file is part of HDF5. The full HDF5 copyright notice, including +# terms governing use, modification, and redistribution, is contained in +# the COPYING file, which can be found at the root of the source code +# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. +# If you do not have access to either file, you may request a copy from +# help@hdfgroup.org. +# #----------------------------------------------------------------------------- # Compiler specific flags : Shouldn't there be compiler tests for these #----------------------------------------------------------------------------- diff --git a/config/cmake/UserMacros/Windows_MT.cmake b/config/cmake/UserMacros/Windows_MT.cmake index 216a014..b6cc513 100644 --- a/config/cmake/UserMacros/Windows_MT.cmake +++ b/config/cmake/UserMacros/Windows_MT.cmake @@ -1,3 +1,14 @@ +# +# Copyright by The HDF Group. +# All rights reserved. +# +# This file is part of HDF5. The full HDF5 copyright notice, including +# terms governing use, modification, and redistribution, is contained in +# the COPYING file, which can be found at the root of the source code +# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. +# If you do not have access to either file, you may request a copy from +# help@hdfgroup.org. +# ######################################################## # Include file for user options ######################################################## diff --git a/config/cmake/cacheinit.cmake b/config/cmake/cacheinit.cmake index 5901a78..c923283 100644 --- a/config/cmake/cacheinit.cmake +++ b/config/cmake/cacheinit.cmake @@ -1,3 +1,14 @@ +# +# Copyright by The HDF Group. +# All rights reserved. +# +# This file is part of HDF5. The full HDF5 copyright notice, including +# terms governing use, modification, and redistribution, is contained in +# the COPYING file, which can be found at the root of the source code +# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. +# If you do not have access to either file, you may request a copy from +# help@hdfgroup.org. +# # This is the CMakeCache file. ######################## diff --git a/config/cmake/hdf5-config-version.cmake.in b/config/cmake/hdf5-config-version.cmake.in index ad1b96d..8e16725 100644 --- a/config/cmake/hdf5-config-version.cmake.in +++ b/config/cmake/hdf5-config-version.cmake.in @@ -1,3 +1,14 @@ +# +# Copyright by The HDF Group. +# All rights reserved. +# +# This file is part of HDF5. The full HDF5 copyright notice, including +# terms governing use, modification, and redistribution, is contained in +# the COPYING file, which can be found at the root of the source code +# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. +# If you do not have access to either file, you may request a copy from +# help@hdfgroup.org. +# #----------------------------------------------------------------------------- # HDF5 Version file for install directory #----------------------------------------------------------------------------- diff --git a/config/cmake/hdf5-config.cmake.in b/config/cmake/hdf5-config.cmake.in index 6dffa6c..c54391f 100644 --- a/config/cmake/hdf5-config.cmake.in +++ b/config/cmake/hdf5-config.cmake.in @@ -1,3 +1,14 @@ +# +# Copyright by The HDF Group. +# All rights reserved. +# +# This file is part of HDF5. The full HDF5 copyright notice, including +# terms governing use, modification, and redistribution, is contained in +# the COPYING file, which can be found at the root of the source code +# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. +# If you do not have access to either file, you may request a copy from +# help@hdfgroup.org. +# #----------------------------------------------------------------------------- # HDF5 Config file for compiling against hdf5 build/install directory #----------------------------------------------------------------------------- diff --git a/config/cmake/jrunTest.cmake b/config/cmake/jrunTest.cmake index 67b42fb..7af0590 100644 --- a/config/cmake/jrunTest.cmake +++ b/config/cmake/jrunTest.cmake @@ -1,3 +1,14 @@ +# +# Copyright by The HDF Group. +# All rights reserved. +# +# This file is part of HDF5. The full HDF5 copyright notice, including +# terms governing use, modification, and redistribution, is contained in +# the COPYING file, which can be found at the root of the source code +# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. +# If you do not have access to either file, you may request a copy from +# help@hdfgroup.org. +# # runTest.cmake executes a command and captures the output in a file. File is then compared # against a reference file. Exit status of command can also be compared. cmake_policy(SET CMP0007 NEW) diff --git a/config/cmake/mccacheinit.cmake b/config/cmake/mccacheinit.cmake index 7dee5b5..1f60a01 100644 --- a/config/cmake/mccacheinit.cmake +++ b/config/cmake/mccacheinit.cmake @@ -1,3 +1,14 @@ +# +# Copyright by The HDF Group. +# All rights reserved. +# +# This file is part of HDF5. The full HDF5 copyright notice, including +# terms governing use, modification, and redistribution, is contained in +# the COPYING file, which can be found at the root of the source code +# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. +# If you do not have access to either file, you may request a copy from +# help@hdfgroup.org. +# # This is the CMakeCache file. ######################## diff --git a/config/cmake/scripts/CTestScript.cmake b/config/cmake/scripts/CTestScript.cmake index cb92933..3cb9a5e 100755 --- a/config/cmake/scripts/CTestScript.cmake +++ b/config/cmake/scripts/CTestScript.cmake @@ -1,3 +1,14 @@ +# +# Copyright by The HDF Group. +# All rights reserved. +# +# This file is part of HDF5. The full HDF5 copyright notice, including +# terms governing use, modification, and redistribution, is contained in +# the COPYING file, which can be found at the root of the source code +# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. +# If you do not have access to either file, you may request a copy from +# help@hdfgroup.org. +# cmake_minimum_required (VERSION 3.2.2 FATAL_ERROR) ######################################################## # This dashboard is maintained by The HDF Group diff --git a/config/cmake/scripts/HDF5config.cmake b/config/cmake/scripts/HDF5config.cmake index ab8d8d6..21d196f 100755 --- a/config/cmake/scripts/HDF5config.cmake +++ b/config/cmake/scripts/HDF5config.cmake @@ -1,3 +1,14 @@ +# +# Copyright by The HDF Group. +# All rights reserved. +# +# This file is part of HDF5. The full HDF5 copyright notice, including +# terms governing use, modification, and redistribution, is contained in +# the COPYING file, which can be found at the root of the source code +# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. +# If you do not have access to either file, you may request a copy from +# help@hdfgroup.org. +# ############################################################################################# ### ${CTEST_SCRIPT_ARG} is of the form OPTION=VALUE ### ### BUILD_GENERATOR required [Unix, VS2015, VS201564, VS2013, VS201364, VS2012, VS201264] ### diff --git a/config/cmake/scripts/HDF5options.cmake b/config/cmake/scripts/HDF5options.cmake index bbbb8dc..b090434 100755 --- a/config/cmake/scripts/HDF5options.cmake +++ b/config/cmake/scripts/HDF5options.cmake @@ -1,3 +1,14 @@ +# +# Copyright by The HDF Group. +# All rights reserved. +# +# This file is part of HDF5. The full HDF5 copyright notice, including +# terms governing use, modification, and redistribution, is contained in +# the COPYING file, which can be found at the root of the source code +# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. +# If you do not have access to either file, you may request a copy from +# help@hdfgroup.org. +# ############################################################################################# #### Change default configuration of options in config/cmake/cacheinit.cmake file ### #### format: set(ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DXXX:YY=ZZZZ") ### diff --git a/config/cmake/userblockTest.cmake b/config/cmake/userblockTest.cmake index 5095b33..9af7e5b 100644 --- a/config/cmake/userblockTest.cmake +++ b/config/cmake/userblockTest.cmake @@ -1,3 +1,14 @@ +# +# Copyright by The HDF Group. +# All rights reserved. +# +# This file is part of HDF5. The full HDF5 copyright notice, including +# terms governing use, modification, and redistribution, is contained in +# the COPYING file, which can be found at the root of the source code +# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. +# If you do not have access to either file, you may request a copy from +# help@hdfgroup.org. +# # userblockTest.cmake executes a command and captures the output in a file. File is then compared # against a reference file. Exit status of command can also be compared. diff --git a/config/cmake/vfdTest.cmake b/config/cmake/vfdTest.cmake index c9b4ecc..67a2566 100644 --- a/config/cmake/vfdTest.cmake +++ b/config/cmake/vfdTest.cmake @@ -1,3 +1,14 @@ +# +# Copyright by The HDF Group. +# All rights reserved. +# +# This file is part of HDF5. The full HDF5 copyright notice, including +# terms governing use, modification, and redistribution, is contained in +# the COPYING file, which can be found at the root of the source code +# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. +# If you do not have access to either file, you may request a copy from +# help@hdfgroup.org. +# # vfdTest.cmake executes a command and captures the output in a file. Command uses specified VFD. # Exit status of command can also be compared. diff --git a/config/cmake_ext_mod/CheckTypeSize.cmake b/config/cmake_ext_mod/CheckTypeSize.cmake index d217ac5..c14c2f2 100644 --- a/config/cmake_ext_mod/CheckTypeSize.cmake +++ b/config/cmake_ext_mod/CheckTypeSize.cmake @@ -1,4 +1,15 @@ # +# Copyright by The HDF Group. +# All rights reserved. +# +# This file is part of HDF5. The full HDF5 copyright notice, including +# terms governing use, modification, and redistribution, is contained in +# the COPYING file, which can be found at the root of the source code +# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. +# If you do not have access to either file, you may request a copy from +# help@hdfgroup.org. +# +# # Check if the type exists and determine size of type. if the type # exists, the size will be stored to the variable. # diff --git a/config/cmake_ext_mod/ConfigureChecks.cmake b/config/cmake_ext_mod/ConfigureChecks.cmake index a0ec8e3..56d45f9 100644 --- a/config/cmake_ext_mod/ConfigureChecks.cmake +++ b/config/cmake_ext_mod/ConfigureChecks.cmake @@ -1,3 +1,14 @@ +# +# Copyright by The HDF Group. +# All rights reserved. +# +# This file is part of HDF5. The full HDF5 copyright notice, including +# terms governing use, modification, and redistribution, is contained in +# the COPYING file, which can be found at the root of the source code +# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. +# If you do not have access to either file, you may request a copy from +# help@hdfgroup.org. +# #----------------------------------------------------------------------------- # Include all the necessary files for macros #----------------------------------------------------------------------------- diff --git a/config/cmake_ext_mod/FindSZIP.cmake b/config/cmake_ext_mod/FindSZIP.cmake index bb5f8d6..699be85 100644 --- a/config/cmake_ext_mod/FindSZIP.cmake +++ b/config/cmake_ext_mod/FindSZIP.cmake @@ -1,3 +1,14 @@ +# +# Copyright by The HDF Group. +# All rights reserved. +# +# This file is part of HDF5. The full HDF5 copyright notice, including +# terms governing use, modification, and redistribution, is contained in +# the COPYING file, which can be found at the root of the source code +# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. +# If you do not have access to either file, you may request a copy from +# help@hdfgroup.org. +# # - Find SZIP library # - Derived from the FindTiff.cmake that is included with cmake diff --git a/config/cmake_ext_mod/GetTimeOfDayTest.cpp b/config/cmake_ext_mod/GetTimeOfDayTest.cpp index 3b5bf60..5fd7c04 100644 --- a/config/cmake_ext_mod/GetTimeOfDayTest.cpp +++ b/config/cmake_ext_mod/GetTimeOfDayTest.cpp @@ -1,3 +1,14 @@ +/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + * Copyright by The HDF Group. * + * All rights reserved. * + * * + * This file is part of HDF5. The full HDF5 copyright notice, including * + * terms governing use, modification, and redistribution, is contained in * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #if defined (TRY_SYS_TIME_H) #include /* #include */ diff --git a/config/cmake_ext_mod/HDFCXXTests.cpp b/config/cmake_ext_mod/HDFCXXTests.cpp index f5f6644..1b98092 100644 --- a/config/cmake_ext_mod/HDFCXXTests.cpp +++ b/config/cmake_ext_mod/HDFCXXTests.cpp @@ -1,3 +1,14 @@ +/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + * Copyright by The HDF Group. * + * All rights reserved. * + * * + * This file is part of HDF5. The full HDF5 copyright notice, including * + * terms governing use, modification, and redistribution, is contained in * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #ifdef OLD_HEADER_FILENAME diff --git a/config/cmake_ext_mod/HDFLibMacros.cmake b/config/cmake_ext_mod/HDFLibMacros.cmake index 9d50f50..f2e03d7 100644 --- a/config/cmake_ext_mod/HDFLibMacros.cmake +++ b/config/cmake_ext_mod/HDFLibMacros.cmake @@ -1,3 +1,14 @@ +# +# Copyright by The HDF Group. +# All rights reserved. +# +# This file is part of HDF5. The full HDF5 copyright notice, including +# terms governing use, modification, and redistribution, is contained in +# the COPYING file, which can be found at the root of the source code +# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. +# If you do not have access to either file, you may request a copy from +# help@hdfgroup.org. +# #------------------------------------------------------------------------------- macro (EXTERNAL_JPEG_LIBRARY compress_type jpeg_pic) # May need to build JPEG with PIC on x64 machines with gcc diff --git a/config/cmake_ext_mod/HDFMacros.cmake b/config/cmake_ext_mod/HDFMacros.cmake index 3039cfd..48f57e6 100644 --- a/config/cmake_ext_mod/HDFMacros.cmake +++ b/config/cmake_ext_mod/HDFMacros.cmake @@ -1,3 +1,14 @@ +# +# Copyright by The HDF Group. +# All rights reserved. +# +# This file is part of HDF5. The full HDF5 copyright notice, including +# terms governing use, modification, and redistribution, is contained in +# the COPYING file, which can be found at the root of the source code +# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. +# If you do not have access to either file, you may request a copy from +# help@hdfgroup.org. +# #------------------------------------------------------------------------------- macro (SET_GLOBAL_VARIABLE name value) set (${name} ${value} CACHE INTERNAL "Used to pass variables between directories" FORCE) diff --git a/config/cmake_ext_mod/HDFTests.c b/config/cmake_ext_mod/HDFTests.c index 648f795..60ac744 100644 --- a/config/cmake_ext_mod/HDFTests.c +++ b/config/cmake_ext_mod/HDFTests.c @@ -1,3 +1,14 @@ +/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + * Copyright by The HDF Group. * + * All rights reserved. * + * * + * This file is part of HDF5. The full HDF5 copyright notice, including * + * terms governing use, modification, and redistribution, is contained in * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #define SIMPLE_TEST(x) int main(){ x; return 0; } #ifdef HAVE_C99_DESIGNATED_INITIALIZER diff --git a/config/cmake_ext_mod/HDFUseFortran.cmake b/config/cmake_ext_mod/HDFUseFortran.cmake index bf254a1..7bf4d81 100644 --- a/config/cmake_ext_mod/HDFUseFortran.cmake +++ b/config/cmake_ext_mod/HDFUseFortran.cmake @@ -1,4 +1,15 @@ # +# Copyright by The HDF Group. +# All rights reserved. +# +# This file is part of HDF5. The full HDF5 copyright notice, including +# terms governing use, modification, and redistribution, is contained in +# the COPYING file, which can be found at the root of the source code +# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. +# If you do not have access to either file, you may request a copy from +# help@hdfgroup.org. +# +# # This file provides functions for Fortran support. # #------------------------------------------------------------------------------- diff --git a/config/cmake_ext_mod/grepTest.cmake b/config/cmake_ext_mod/grepTest.cmake index 31c8421..5b0e8fd 100644 --- a/config/cmake_ext_mod/grepTest.cmake +++ b/config/cmake_ext_mod/grepTest.cmake @@ -1,3 +1,14 @@ +# +# Copyright by The HDF Group. +# All rights reserved. +# +# This file is part of HDF5. The full HDF5 copyright notice, including +# terms governing use, modification, and redistribution, is contained in +# the COPYING file, which can be found at the root of the source code +# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. +# If you do not have access to either file, you may request a copy from +# help@hdfgroup.org. +# # grepTest.cmake executes a command and captures the output in a file. File is then compared # against a reference file. Exit status of command can also be compared. diff --git a/config/cmake_ext_mod/runTest.cmake b/config/cmake_ext_mod/runTest.cmake index 9a2236e..3a02614 100644 --- a/config/cmake_ext_mod/runTest.cmake +++ b/config/cmake_ext_mod/runTest.cmake @@ -1,3 +1,14 @@ +# +# Copyright by The HDF Group. +# All rights reserved. +# +# This file is part of HDF5. The full HDF5 copyright notice, including +# terms governing use, modification, and redistribution, is contained in +# the COPYING file, which can be found at the root of the source code +# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. +# If you do not have access to either file, you may request a copy from +# help@hdfgroup.org. +# # runTest.cmake executes a command and captures the output in a file. File is then compared # against a reference file. Exit status of command can also be compared. cmake_policy(SET CMP0007 NEW) diff --git a/examples/CMakeTests.cmake b/examples/CMakeTests.cmake index 3412b22..dd4766a 100644 --- a/examples/CMakeTests.cmake +++ b/examples/CMakeTests.cmake @@ -1,3 +1,14 @@ +# +# Copyright by The HDF Group. +# All rights reserved. +# +# This file is part of HDF5. The full HDF5 copyright notice, including +# terms governing use, modification, and redistribution, is contained in +# the COPYING file, which can be found at the root of the source code +# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. +# If you do not have access to either file, you may request a copy from +# help@hdfgroup.org. +# ############################################################################## ############################################################################## diff --git a/examples/h5_vds-eiger.c b/examples/h5_vds-eiger.c index ea22243..13b5d93 100644 --- a/examples/h5_vds-eiger.c +++ b/examples/h5_vds-eiger.c @@ -1,3 +1,14 @@ +/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + * Copyright by The HDF Group. * + * All rights reserved. * + * * + * This file is part of HDF5. The full HDF5 copyright notice, including * + * terms governing use, modification, and redistribution, is contained in * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /************************************************************ This example illustrates the concept of the virtual dataset. diff --git a/examples/h5_vds-exc.c b/examples/h5_vds-exc.c index 039cdb8..aaf1fa8 100644 --- a/examples/h5_vds-exc.c +++ b/examples/h5_vds-exc.c @@ -1,3 +1,14 @@ +/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + * Copyright by The HDF Group. * + * All rights reserved. * + * * + * This file is part of HDF5. The full HDF5 copyright notice, including * + * terms governing use, modification, and redistribution, is contained in * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /************************************************************ This example illustrates the concept of the virtual dataset. diff --git a/examples/h5_vds-exclim.c b/examples/h5_vds-exclim.c index 4933471..fea096a 100644 --- a/examples/h5_vds-exclim.c +++ b/examples/h5_vds-exclim.c @@ -1,3 +1,14 @@ +/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + * Copyright by The HDF Group. * + * All rights reserved. * + * * + * This file is part of HDF5. The full HDF5 copyright notice, including * + * terms governing use, modification, and redistribution, is contained in * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /************************************************************ This example illustrates the concept of the virtual dataset. diff --git a/examples/h5_vds-percival-unlim-maxmin.c b/examples/h5_vds-percival-unlim-maxmin.c index a6eecfb..0273bbc 100644 --- a/examples/h5_vds-percival-unlim-maxmin.c +++ b/examples/h5_vds-percival-unlim-maxmin.c @@ -1,3 +1,14 @@ +/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + * Copyright by The HDF Group. * + * All rights reserved. * + * * + * This file is part of HDF5. The full HDF5 copyright notice, including * + * terms governing use, modification, and redistribution, is contained in * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /************************************************************ This example illustrates the concept of the virtual dataset. diff --git a/examples/h5_vds-percival-unlim.c b/examples/h5_vds-percival-unlim.c index 2496c37..f6a5f50 100644 --- a/examples/h5_vds-percival-unlim.c +++ b/examples/h5_vds-percival-unlim.c @@ -1,3 +1,14 @@ +/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + * Copyright by The HDF Group. * + * All rights reserved. * + * * + * This file is part of HDF5. The full HDF5 copyright notice, including * + * terms governing use, modification, and redistribution, is contained in * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /************************************************************ This example illustrates the concept of the virtual dataset. diff --git a/examples/h5_vds-percival.c b/examples/h5_vds-percival.c index 757bb69..11a974b 100644 --- a/examples/h5_vds-percival.c +++ b/examples/h5_vds-percival.c @@ -1,3 +1,14 @@ +/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + * Copyright by The HDF Group. * + * All rights reserved. * + * * + * This file is part of HDF5. The full HDF5 copyright notice, including * + * terms governing use, modification, and redistribution, is contained in * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /************************************************************ This example illustrates the concept of the virtual dataset. diff --git a/examples/h5_vds-simpleIO.c b/examples/h5_vds-simpleIO.c index 6b12dc2..56fa72b 100644 --- a/examples/h5_vds-simpleIO.c +++ b/examples/h5_vds-simpleIO.c @@ -1,3 +1,14 @@ +/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + * Copyright by The HDF Group. * + * All rights reserved. * + * * + * This file is part of HDF5. The full HDF5 copyright notice, including * + * terms governing use, modification, and redistribution, is contained in * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /************************************************************ This example illustrates the concept of virtual dataset I/O diff --git a/fortran/examples/CMakeTests.cmake b/fortran/examples/CMakeTests.cmake index 5665a2f..3403571 100644 --- a/fortran/examples/CMakeTests.cmake +++ b/fortran/examples/CMakeTests.cmake @@ -1,3 +1,14 @@ +# +# Copyright by The HDF Group. +# All rights reserved. +# +# This file is part of HDF5. The full HDF5 copyright notice, including +# terms governing use, modification, and redistribution, is contained in +# the COPYING file, which can be found at the root of the source code +# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. +# If you do not have access to either file, you may request a copy from +# help@hdfgroup.org. +# ############################################################################## ############################################################################## diff --git a/fortran/src/H5config_f.inc.cmake b/fortran/src/H5config_f.inc.cmake index f0b3472..f85db6c 100644 --- a/fortran/src/H5config_f.inc.cmake +++ b/fortran/src/H5config_f.inc.cmake @@ -1,3 +1,14 @@ +! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * +! Copyright by The HDF Group. * +! All rights reserved. * +! * +! This file is part of HDF5. The full HDF5 copyright notice, including * +! terms governing use, modification, and redistribution, is contained in * +! the COPYING file, which can be found at the root of the source code * +! distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * +! If you do not have access to either file, you may request a copy from * +! help@hdfgroup.org. * +! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ! fortran/src/H5config_f.inc. Generated from fortran/src/H5config_f.inc.in by configure ! Define if we have parallel support diff --git a/fortran/src/H5config_f.inc.in b/fortran/src/H5config_f.inc.in index 9f094d2..8921493 100644 --- a/fortran/src/H5config_f.inc.in +++ b/fortran/src/H5config_f.inc.in @@ -1,3 +1,14 @@ +! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * +! Copyright by The HDF Group. * +! All rights reserved. * +! * +! This file is part of HDF5. The full HDF5 copyright notice, including * +! terms governing use, modification, and redistribution, is contained in * +! the COPYING file, which can be found at the root of the source code * +! distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * +! If you do not have access to either file, you may request a copy from * +! help@hdfgroup.org. * +! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ! fortran/src/H5config_f.inc. Generated from fortran/src/H5config_f.inc.in by configure ! The script to replace the defines in H5config_f.inc.in is diff --git a/fortran/src/H5fort_type_defines.h.in b/fortran/src/H5fort_type_defines.h.in index 6feed4f..b6a35f9 100644 --- a/fortran/src/H5fort_type_defines.h.in +++ b/fortran/src/H5fort_type_defines.h.in @@ -1,3 +1,14 @@ +/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + * Copyright by The HDF Group. * + * All rights reserved. * + * * + * This file is part of HDF5. The full HDF5 copyright notice, including * + * terms governing use, modification, and redistribution, is contained in * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* If you are reading this file and it has a '.h' suffix, it was automatically * generated from the '.in' version. Make changes there. */ diff --git a/fortran/test/CMakeTests.cmake b/fortran/test/CMakeTests.cmake index a282ec6..e171e7c 100644 --- a/fortran/test/CMakeTests.cmake +++ b/fortran/test/CMakeTests.cmake @@ -1,3 +1,14 @@ +# +# Copyright by The HDF Group. +# All rights reserved. +# +# This file is part of HDF5. The full HDF5 copyright notice, including +# terms governing use, modification, and redistribution, is contained in +# the COPYING file, which can be found at the root of the source code +# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. +# If you do not have access to either file, you may request a copy from +# help@hdfgroup.org. +# ############################################################################## ############################################################################## diff --git a/fortran/testpar/CMakeTests.cmake b/fortran/testpar/CMakeTests.cmake index 61085e6..5736256 100644 --- a/fortran/testpar/CMakeTests.cmake +++ b/fortran/testpar/CMakeTests.cmake @@ -1,3 +1,14 @@ +# +# Copyright by The HDF Group. +# All rights reserved. +# +# This file is part of HDF5. The full HDF5 copyright notice, including +# terms governing use, modification, and redistribution, is contained in +# the COPYING file, which can be found at the root of the source code +# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. +# If you do not have access to either file, you may request a copy from +# help@hdfgroup.org. +# ############################################################################## ############################################################################## diff --git a/hl/c++/examples/CMakeTests.cmake b/hl/c++/examples/CMakeTests.cmake index 86bdd93..103ec2b 100644 --- a/hl/c++/examples/CMakeTests.cmake +++ b/hl/c++/examples/CMakeTests.cmake @@ -1,3 +1,14 @@ +# +# Copyright by The HDF Group. +# All rights reserved. +# +# This file is part of HDF5. The full HDF5 copyright notice, including +# terms governing use, modification, and redistribution, is contained in +# the COPYING file, which can be found at the root of the source code +# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. +# If you do not have access to either file, you may request a copy from +# help@hdfgroup.org. +# ############################################################################## ############################################################################## diff --git a/hl/c++/test/CMakeTests.cmake b/hl/c++/test/CMakeTests.cmake index d41f79e..785abca 100644 --- a/hl/c++/test/CMakeTests.cmake +++ b/hl/c++/test/CMakeTests.cmake @@ -1,3 +1,14 @@ +# +# Copyright by The HDF Group. +# All rights reserved. +# +# This file is part of HDF5. The full HDF5 copyright notice, including +# terms governing use, modification, and redistribution, is contained in +# the COPYING file, which can be found at the root of the source code +# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. +# If you do not have access to either file, you may request a copy from +# help@hdfgroup.org. +# ############################################################################## ############################################################################## diff --git a/hl/examples/CMakeTests.cmake b/hl/examples/CMakeTests.cmake index 5645155..166fa7c 100644 --- a/hl/examples/CMakeTests.cmake +++ b/hl/examples/CMakeTests.cmake @@ -1,3 +1,14 @@ +# +# Copyright by The HDF Group. +# All rights reserved. +# +# This file is part of HDF5. The full HDF5 copyright notice, including +# terms governing use, modification, and redistribution, is contained in +# the COPYING file, which can be found at the root of the source code +# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. +# If you do not have access to either file, you may request a copy from +# help@hdfgroup.org. +# ############################################################################## ############################################################################## diff --git a/hl/fortran/examples/CMakeTests.cmake b/hl/fortran/examples/CMakeTests.cmake index b5f5fc6..91cb56b 100644 --- a/hl/fortran/examples/CMakeTests.cmake +++ b/hl/fortran/examples/CMakeTests.cmake @@ -1,3 +1,14 @@ +# +# Copyright by The HDF Group. +# All rights reserved. +# +# This file is part of HDF5. The full HDF5 copyright notice, including +# terms governing use, modification, and redistribution, is contained in +# the COPYING file, which can be found at the root of the source code +# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. +# If you do not have access to either file, you may request a copy from +# help@hdfgroup.org. +# ############################################################################## ############################################################################## diff --git a/hl/fortran/test/CMakeTests.cmake b/hl/fortran/test/CMakeTests.cmake index 3c8a831..90cc3a3 100644 --- a/hl/fortran/test/CMakeTests.cmake +++ b/hl/fortran/test/CMakeTests.cmake @@ -1,3 +1,14 @@ +# +# Copyright by The HDF Group. +# All rights reserved. +# +# This file is part of HDF5. The full HDF5 copyright notice, including +# terms governing use, modification, and redistribution, is contained in +# the COPYING file, which can be found at the root of the source code +# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. +# If you do not have access to either file, you may request a copy from +# help@hdfgroup.org. +# ############################################################################## ############################################################################## diff --git a/hl/test/CMakeTests.cmake b/hl/test/CMakeTests.cmake index 211c501..e5eb58e 100644 --- a/hl/test/CMakeTests.cmake +++ b/hl/test/CMakeTests.cmake @@ -1,3 +1,14 @@ +# +# Copyright by The HDF Group. +# All rights reserved. +# +# This file is part of HDF5. The full HDF5 copyright notice, including +# terms governing use, modification, and redistribution, is contained in +# the COPYING file, which can be found at the root of the source code +# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. +# If you do not have access to either file, you may request a copy from +# help@hdfgroup.org. +# ############################################################################## ############################################################################## diff --git a/hl/test/gen_test_ld.c b/hl/test/gen_test_ld.c index cf7b321..d717a47 100644 --- a/hl/test/gen_test_ld.c +++ b/hl/test/gen_test_ld.c @@ -1,3 +1,14 @@ +/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + * Copyright by The HDF Group. * + * All rights reserved. * + * * + * This file is part of HDF5. The full HDF5 copyright notice, including * + * terms governing use, modification, and redistribution, is contained in * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #include "hdf5.h" #include "H5LDprivate.h" diff --git a/hl/tools/gif2h5/CMakeTests.cmake b/hl/tools/gif2h5/CMakeTests.cmake index 8a52f50..61c004e 100644 --- a/hl/tools/gif2h5/CMakeTests.cmake +++ b/hl/tools/gif2h5/CMakeTests.cmake @@ -1,3 +1,14 @@ +# +# Copyright by The HDF Group. +# All rights reserved. +# +# This file is part of HDF5. The full HDF5 copyright notice, including +# terms governing use, modification, and redistribution, is contained in +# the COPYING file, which can be found at the root of the source code +# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. +# If you do not have access to either file, you may request a copy from +# help@hdfgroup.org. +# ############################################################################## ############################################################################## diff --git a/hl/tools/h5watch/CMakeTests.cmake b/hl/tools/h5watch/CMakeTests.cmake index 2242692..35e7829 100644 --- a/hl/tools/h5watch/CMakeTests.cmake +++ b/hl/tools/h5watch/CMakeTests.cmake @@ -1,3 +1,14 @@ +# +# Copyright by The HDF Group. +# All rights reserved. +# +# This file is part of HDF5. The full HDF5 copyright notice, including +# terms governing use, modification, and redistribution, is contained in +# the COPYING file, which can be found at the root of the source code +# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. +# If you do not have access to either file, you may request a copy from +# help@hdfgroup.org. +# ############################################################################## ############################################################################## diff --git a/test/CMakeTests.cmake b/test/CMakeTests.cmake index cbab6fe..94b099c 100644 --- a/test/CMakeTests.cmake +++ b/test/CMakeTests.cmake @@ -1,3 +1,14 @@ +# +# Copyright by The HDF Group. +# All rights reserved. +# +# This file is part of HDF5. The full HDF5 copyright notice, including +# terms governing use, modification, and redistribution, is contained in +# the COPYING file, which can be found at the root of the source code +# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. +# If you do not have access to either file, you may request a copy from +# help@hdfgroup.org. +# ############################################################################## ############################################################################## diff --git a/test/cache_tagging.c b/test/cache_tagging.c index ae54fda..99ab49c 100644 --- a/test/cache_tagging.c +++ b/test/cache_tagging.c @@ -1,4 +1,5 @@ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + * Copyright by The HDF Group. * * All rights reserved. * * * * This file is part of HDF5. The full HDF5 copyright notice, including * diff --git a/test/cork.c b/test/cork.c index 8eed497..8c685ee 100644 --- a/test/cork.c +++ b/test/cork.c @@ -1,4 +1,5 @@ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + * Copyright by The HDF Group. * * All rights reserved. * * * * This file is part of HDF5. The full HDF5 copyright notice, including * diff --git a/testpar/CMakeTests.cmake b/testpar/CMakeTests.cmake index 7dce6d6..6e2b05e 100644 --- a/testpar/CMakeTests.cmake +++ b/testpar/CMakeTests.cmake @@ -1,3 +1,14 @@ +# +# Copyright by The HDF Group. +# All rights reserved. +# +# This file is part of HDF5. The full HDF5 copyright notice, including +# terms governing use, modification, and redistribution, is contained in +# the COPYING file, which can be found at the root of the source code +# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. +# If you do not have access to either file, you may request a copy from +# help@hdfgroup.org. +# ############################################################################## ############################################################################## diff --git a/tools/test/h5copy/CMakeTests.cmake b/tools/test/h5copy/CMakeTests.cmake index 42495de..2536ef3 100644 --- a/tools/test/h5copy/CMakeTests.cmake +++ b/tools/test/h5copy/CMakeTests.cmake @@ -1,3 +1,14 @@ +# +# Copyright by The HDF Group. +# All rights reserved. +# +# This file is part of HDF5. The full HDF5 copyright notice, including +# terms governing use, modification, and redistribution, is contained in +# the COPYING file, which can be found at the root of the source code +# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. +# If you do not have access to either file, you may request a copy from +# help@hdfgroup.org. +# ############################################################################## ############################################################################## diff --git a/tools/test/h5diff/CMakeTests.cmake b/tools/test/h5diff/CMakeTests.cmake index ca23677..f6cd2dd 100644 --- a/tools/test/h5diff/CMakeTests.cmake +++ b/tools/test/h5diff/CMakeTests.cmake @@ -1,3 +1,14 @@ +# +# Copyright by The HDF Group. +# All rights reserved. +# +# This file is part of HDF5. The full HDF5 copyright notice, including +# terms governing use, modification, and redistribution, is contained in +# the COPYING file, which can be found at the root of the source code +# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. +# If you do not have access to either file, you may request a copy from +# help@hdfgroup.org. +# ############################################################################## ############################################################################## diff --git a/tools/test/h5dump/CMakeTests.cmake b/tools/test/h5dump/CMakeTests.cmake index ae760bf..f17b116 100644 --- a/tools/test/h5dump/CMakeTests.cmake +++ b/tools/test/h5dump/CMakeTests.cmake @@ -1,3 +1,14 @@ +# +# Copyright by The HDF Group. +# All rights reserved. +# +# This file is part of HDF5. The full HDF5 copyright notice, including +# terms governing use, modification, and redistribution, is contained in +# the COPYING file, which can be found at the root of the source code +# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. +# If you do not have access to either file, you may request a copy from +# help@hdfgroup.org. +# ############################################################################## ############################################################################## diff --git a/tools/test/h5dump/CMakeTestsPBITS.cmake b/tools/test/h5dump/CMakeTestsPBITS.cmake index 770531a..986f1a1 100644 --- a/tools/test/h5dump/CMakeTestsPBITS.cmake +++ b/tools/test/h5dump/CMakeTestsPBITS.cmake @@ -1,3 +1,14 @@ +# +# Copyright by The HDF Group. +# All rights reserved. +# +# This file is part of HDF5. The full HDF5 copyright notice, including +# terms governing use, modification, and redistribution, is contained in +# the COPYING file, which can be found at the root of the source code +# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. +# If you do not have access to either file, you may request a copy from +# help@hdfgroup.org. +# ############################################################################## ############################################################################## diff --git a/tools/test/h5dump/CMakeTestsVDS.cmake b/tools/test/h5dump/CMakeTestsVDS.cmake index d155e55..310f9ce 100644 --- a/tools/test/h5dump/CMakeTestsVDS.cmake +++ b/tools/test/h5dump/CMakeTestsVDS.cmake @@ -1,3 +1,14 @@ +# +# Copyright by The HDF Group. +# All rights reserved. +# +# This file is part of HDF5. The full HDF5 copyright notice, including +# terms governing use, modification, and redistribution, is contained in +# the COPYING file, which can be found at the root of the source code +# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. +# If you do not have access to either file, you may request a copy from +# help@hdfgroup.org. +# ############################################################################## ############################################################################## diff --git a/tools/test/h5dump/CMakeTestsXML.cmake b/tools/test/h5dump/CMakeTestsXML.cmake index 2e55818..c353e48 100644 --- a/tools/test/h5dump/CMakeTestsXML.cmake +++ b/tools/test/h5dump/CMakeTestsXML.cmake @@ -1,3 +1,14 @@ +# +# Copyright by The HDF Group. +# All rights reserved. +# +# This file is part of HDF5. The full HDF5 copyright notice, including +# terms governing use, modification, and redistribution, is contained in +# the COPYING file, which can be found at the root of the source code +# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. +# If you do not have access to either file, you may request a copy from +# help@hdfgroup.org. +# ############################################################################## ############################################################################## diff --git a/tools/test/h5format_convert/CMakeTests.cmake b/tools/test/h5format_convert/CMakeTests.cmake index 4738be5..3e423da 100644 --- a/tools/test/h5format_convert/CMakeTests.cmake +++ b/tools/test/h5format_convert/CMakeTests.cmake @@ -1,3 +1,14 @@ +# +# Copyright by The HDF Group. +# All rights reserved. +# +# This file is part of HDF5. The full HDF5 copyright notice, including +# terms governing use, modification, and redistribution, is contained in +# the COPYING file, which can be found at the root of the source code +# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. +# If you do not have access to either file, you may request a copy from +# help@hdfgroup.org. +# ############################################################################## ############################################################################## diff --git a/tools/test/h5import/CMakeTests.cmake b/tools/test/h5import/CMakeTests.cmake index 15b36fc..27c736a 100644 --- a/tools/test/h5import/CMakeTests.cmake +++ b/tools/test/h5import/CMakeTests.cmake @@ -1,3 +1,14 @@ +# +# Copyright by The HDF Group. +# All rights reserved. +# +# This file is part of HDF5. The full HDF5 copyright notice, including +# terms governing use, modification, and redistribution, is contained in +# the COPYING file, which can be found at the root of the source code +# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. +# If you do not have access to either file, you may request a copy from +# help@hdfgroup.org. +# ############################################################################## ############################################################################## diff --git a/tools/test/h5jam/CMakeTests.cmake b/tools/test/h5jam/CMakeTests.cmake index d0ba305..ae6d440 100644 --- a/tools/test/h5jam/CMakeTests.cmake +++ b/tools/test/h5jam/CMakeTests.cmake @@ -1,3 +1,14 @@ +# +# Copyright by The HDF Group. +# All rights reserved. +# +# This file is part of HDF5. The full HDF5 copyright notice, including +# terms governing use, modification, and redistribution, is contained in +# the COPYING file, which can be found at the root of the source code +# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. +# If you do not have access to either file, you may request a copy from +# help@hdfgroup.org. +# ############################################################################## ############################################################################## diff --git a/tools/test/h5ls/CMakeTests.cmake b/tools/test/h5ls/CMakeTests.cmake index d5d0eb1..5f61eab 100644 --- a/tools/test/h5ls/CMakeTests.cmake +++ b/tools/test/h5ls/CMakeTests.cmake @@ -1,3 +1,14 @@ +# +# Copyright by The HDF Group. +# All rights reserved. +# +# This file is part of HDF5. The full HDF5 copyright notice, including +# terms governing use, modification, and redistribution, is contained in +# the COPYING file, which can be found at the root of the source code +# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. +# If you do not have access to either file, you may request a copy from +# help@hdfgroup.org. +# ############################################################################## ############################################################################## diff --git a/tools/test/h5ls/CMakeTestsVDS.cmake b/tools/test/h5ls/CMakeTestsVDS.cmake index 0a7a216..4a665a5 100644 --- a/tools/test/h5ls/CMakeTestsVDS.cmake +++ b/tools/test/h5ls/CMakeTestsVDS.cmake @@ -1,3 +1,14 @@ +# +# Copyright by The HDF Group. +# All rights reserved. +# +# This file is part of HDF5. The full HDF5 copyright notice, including +# terms governing use, modification, and redistribution, is contained in +# the COPYING file, which can be found at the root of the source code +# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. +# If you do not have access to either file, you may request a copy from +# help@hdfgroup.org. +# ############################################################################## ############################################################################## diff --git a/tools/test/h5repack/CMakeTests.cmake b/tools/test/h5repack/CMakeTests.cmake index 2bcad83..04e405f 100644 --- a/tools/test/h5repack/CMakeTests.cmake +++ b/tools/test/h5repack/CMakeTests.cmake @@ -1,3 +1,14 @@ +# +# Copyright by The HDF Group. +# All rights reserved. +# +# This file is part of HDF5. The full HDF5 copyright notice, including +# terms governing use, modification, and redistribution, is contained in +# the COPYING file, which can be found at the root of the source code +# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. +# If you do not have access to either file, you may request a copy from +# help@hdfgroup.org. +# ############################################################################## ############################################################################## diff --git a/tools/test/h5stat/CMakeTests.cmake b/tools/test/h5stat/CMakeTests.cmake index ea602ba..cd52886 100644 --- a/tools/test/h5stat/CMakeTests.cmake +++ b/tools/test/h5stat/CMakeTests.cmake @@ -1,3 +1,14 @@ +# +# Copyright by The HDF Group. +# All rights reserved. +# +# This file is part of HDF5. The full HDF5 copyright notice, including +# terms governing use, modification, and redistribution, is contained in +# the COPYING file, which can be found at the root of the source code +# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. +# If you do not have access to either file, you may request a copy from +# help@hdfgroup.org. +# ############################################################################## ############################################################################## diff --git a/tools/test/misc/CMakeTestsClear.cmake b/tools/test/misc/CMakeTestsClear.cmake index a92d523..e9cb026 100644 --- a/tools/test/misc/CMakeTestsClear.cmake +++ b/tools/test/misc/CMakeTestsClear.cmake @@ -1,3 +1,14 @@ +# +# Copyright by The HDF Group. +# All rights reserved. +# +# This file is part of HDF5. The full HDF5 copyright notice, including +# terms governing use, modification, and redistribution, is contained in +# the COPYING file, which can be found at the root of the source code +# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. +# If you do not have access to either file, you may request a copy from +# help@hdfgroup.org. +# ############################################################################## ############################################################################## diff --git a/tools/test/misc/CMakeTestsMkgrp.cmake b/tools/test/misc/CMakeTestsMkgrp.cmake index 2a54a0e..7011b19 100644 --- a/tools/test/misc/CMakeTestsMkgrp.cmake +++ b/tools/test/misc/CMakeTestsMkgrp.cmake @@ -1,3 +1,14 @@ +# +# Copyright by The HDF Group. +# All rights reserved. +# +# This file is part of HDF5. The full HDF5 copyright notice, including +# terms governing use, modification, and redistribution, is contained in +# the COPYING file, which can be found at the root of the source code +# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. +# If you do not have access to either file, you may request a copy from +# help@hdfgroup.org. +# ############################################################################## ############################################################################## diff --git a/tools/test/misc/CMakeTestsRepart.cmake b/tools/test/misc/CMakeTestsRepart.cmake index a1549ec..37da903 100644 --- a/tools/test/misc/CMakeTestsRepart.cmake +++ b/tools/test/misc/CMakeTestsRepart.cmake @@ -1,3 +1,14 @@ +# +# Copyright by The HDF Group. +# All rights reserved. +# +# This file is part of HDF5. The full HDF5 copyright notice, including +# terms governing use, modification, and redistribution, is contained in +# the COPYING file, which can be found at the root of the source code +# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. +# If you do not have access to either file, you may request a copy from +# help@hdfgroup.org. +# ############################################################################## ############################################################################## diff --git a/tools/test/misc/h5perf_gentest.c b/tools/test/misc/h5perf_gentest.c index 50c18c1..3784278 100644 --- a/tools/test/misc/h5perf_gentest.c +++ b/tools/test/misc/h5perf_gentest.c @@ -1,3 +1,14 @@ +/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + * Copyright by The HDF Group. * + * All rights reserved. * + * * + * This file is part of HDF5. The full HDF5 copyright notice, including * + * terms governing use, modification, and redistribution, is contained in * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /***************************************************************************** This test generates attributes, groups, and datasets of many types. It creates a large number of attributes, groups, and datasets by specifying diff --git a/tools/test/perform/CMakeTests.cmake b/tools/test/perform/CMakeTests.cmake index d286988..2933563 100644 --- a/tools/test/perform/CMakeTests.cmake +++ b/tools/test/perform/CMakeTests.cmake @@ -1,3 +1,14 @@ +# +# Copyright by The HDF Group. +# All rights reserved. +# +# This file is part of HDF5. The full HDF5 copyright notice, including +# terms governing use, modification, and redistribution, is contained in +# the COPYING file, which can be found at the root of the source code +# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. +# If you do not have access to either file, you may request a copy from +# help@hdfgroup.org. +# ############################################################################## ############################################################################## -- cgit v0.12 From 49cded79ce4fed1fa775c3c3187bc583307e1166 Mon Sep 17 00:00:00 2001 From: lrknox Date: Sat, 15 Apr 2017 08:17:10 -0500 Subject: Add new files in release_docs to MANIFEST. Cimmit changes to Makefile.in(s) and H5PL.c that resulted from running autogen.sh. Conflicts: README.txt c++/src/Makefile.in fortran/src/Makefile.in hl/c++/src/Makefile.in hl/fortran/src/Makefile.in hl/src/Makefile.in java/src/jni/Makefile.in release_docs/RELEASE.txt src/Makefile.in --- MANIFEST | 4 +- acsite.m4 | 11 +- bin/COPYING | 11 +- bin/yodconfigure | 11 +- c++/COPYING | 11 +- config/COPYING | 11 +- fortran/COPYING | 11 +- hl/COPYING | 11 +- hl/c++/COPYING | 11 +- hl/fortran/COPYING | 11 +- hl/fortran/src/H5IMcc.c | 3 - hl/src/COPYING | 11 +- hl/src/H5IM.c | 11 - hl/test/COPYING | 11 +- hl/tools/COPYING | 11 +- java/COPYING | 11 +- release_docs/COPYING | 11 +- release_docs/HISTORY-1_10.txt | 1367 ++++ release_docs/HISTORY-1_8.txt | 12344 ++++++++++++++++++++++++++++++++ release_docs/HISTORY-1_8_0-1_10_0.txt | 1742 +++++ release_docs/HISTORY-1_9.txt | 6 - src/COPYING | 11 +- src/H5PL.c | 2 + test/COPYING | 11 +- testpar/COPYING | 11 +- tools/COPYING | 11 +- tools/test/perform/COPYING | 11 +- 27 files changed, 15536 insertions(+), 152 deletions(-) create mode 100644 release_docs/HISTORY-1_10.txt create mode 100644 release_docs/HISTORY-1_8.txt create mode 100644 release_docs/HISTORY-1_8_0-1_10_0.txt delete mode 100644 release_docs/HISTORY-1_9.txt diff --git a/MANIFEST b/MANIFEST index a573567..4b9c45e 100644 --- a/MANIFEST +++ b/MANIFEST @@ -431,7 +431,9 @@ ./release_docs/COPYING ./release_docs/HISTORY-1_0-1_8_0_rc3.txt -./release_docs/HISTORY-1_9.txt +./release_docs/HISTORY-1_8.txt +./release_docs/HISTORY-1_10.txt +./release_docs/HISTORY-1_8_0-1_10_0.txt ./release_docs/INSTALL ./release_docs/INSTALL_CMake.txt ./release_docs/INSTALL_Cygwin.txt diff --git a/acsite.m4 b/acsite.m4 index b144962..9d04d1a 100644 --- a/acsite.m4 +++ b/acsite.m4 @@ -1,17 +1,16 @@ dnl ------------------------------------------------------------------------- dnl ------------------------------------------------------------------------- dnl +dnl Copyright by The HDF Group. dnl Copyright by the Board of Trustees of the University of Illinois. dnl All rights reserved. dnl dnl This file is part of HDF5. The full HDF5 copyright notice, including dnl terms governing use, modification, and redistribution, is contained in -dnl the files COPYING and Copyright.html. COPYING can be found at the root -dnl of the source code distribution tree; Copyright.html can be found at the -dnl root level of an installed copy of the electronic HDF5 document set and -dnl is linked from the top-level documents page. It can also be found at -dnl http://hdf.ncsa.uiuc.edu/HDF5/doc/Copyright.html. If you do not have -dnl access to either file, you may request a copy from hdfhelp@ncsa.uiuc.edu. +dnl the COPYING file, which can be found at the root of the source code +dnl dnl distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. +dnl dnl If you do not have access to either file, you may request a copy from +dnl dnl help@hdfgroup.org. dnl dnl Macros for HDF5 Fortran dnl diff --git a/bin/COPYING b/bin/COPYING index 6903daf..6497ace 100755 --- a/bin/COPYING +++ b/bin/COPYING @@ -5,12 +5,9 @@ The files and subdirectories in this directory are part of HDF5. The full HDF5 copyright notice, including terms governing use, - modification, and redistribution, is contained in the files COPYING - and Copyright.html. COPYING can be found at the root of the source - code distribution tree; Copyright.html can be found at the root - level of an installed copy of the electronic HDF5 document set and - is linked from the top-level documents page. It can also be found - at http://www.hdfgroup.org/HDF5/doc/Copyright.html. If you do not - have access to either file, you may request a copy from + modification, and redistribution, is contained in the COPYING file + which can be found at the root of the source code distribution tree + or in https://support.hdfgroup.org/ftp/HDF5/releases. If you do + not have access to either file, you may request a copy from help@hdfgroup.org. diff --git a/bin/yodconfigure b/bin/yodconfigure index 2bc67e2..44d7d99 100755 --- a/bin/yodconfigure +++ b/bin/yodconfigure @@ -1,16 +1,15 @@ #!/bin/sh # +# Copyright by The HDF Group. # Copyright by the Board of Trustees of the University of Illinois. # All rights reserved. # # This file is part of HDF5. The full HDF5 copyright notice, including # terms governing use, modification, and redistribution, is contained in -# the files COPYING and Copyright.html. COPYING can be found at the root -# of the source code distribution tree; Copyright.html can be found at the -# root level of an installed copy of the electronic HDF5 document set and -# is linked from the top-level documents page. It can also be found at -# http://hdf.ncsa.uiuc.edu/HDF5/doc/Copyright.html. If you do not have -# access to either file, you may request a copy from hdfhelp@ncsa.uiuc.edu. +# the COPYING file, which can be found at the root of the source code +# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. +# If you do not have access to either file, you may request a copy from +# help@hdfgroup.org. # # Fix configure file so that it can launch configure testing executable # via the proper launching command, e.g., yod. (Thus the name yodconfigure diff --git a/c++/COPYING b/c++/COPYING index 6903daf..6497ace 100644 --- a/c++/COPYING +++ b/c++/COPYING @@ -5,12 +5,9 @@ The files and subdirectories in this directory are part of HDF5. The full HDF5 copyright notice, including terms governing use, - modification, and redistribution, is contained in the files COPYING - and Copyright.html. COPYING can be found at the root of the source - code distribution tree; Copyright.html can be found at the root - level of an installed copy of the electronic HDF5 document set and - is linked from the top-level documents page. It can also be found - at http://www.hdfgroup.org/HDF5/doc/Copyright.html. If you do not - have access to either file, you may request a copy from + modification, and redistribution, is contained in the COPYING file + which can be found at the root of the source code distribution tree + or in https://support.hdfgroup.org/ftp/HDF5/releases. If you do + not have access to either file, you may request a copy from help@hdfgroup.org. diff --git a/config/COPYING b/config/COPYING index 6903daf..6497ace 100644 --- a/config/COPYING +++ b/config/COPYING @@ -5,12 +5,9 @@ The files and subdirectories in this directory are part of HDF5. The full HDF5 copyright notice, including terms governing use, - modification, and redistribution, is contained in the files COPYING - and Copyright.html. COPYING can be found at the root of the source - code distribution tree; Copyright.html can be found at the root - level of an installed copy of the electronic HDF5 document set and - is linked from the top-level documents page. It can also be found - at http://www.hdfgroup.org/HDF5/doc/Copyright.html. If you do not - have access to either file, you may request a copy from + modification, and redistribution, is contained in the COPYING file + which can be found at the root of the source code distribution tree + or in https://support.hdfgroup.org/ftp/HDF5/releases. If you do + not have access to either file, you may request a copy from help@hdfgroup.org. diff --git a/fortran/COPYING b/fortran/COPYING index 6903daf..6497ace 100644 --- a/fortran/COPYING +++ b/fortran/COPYING @@ -5,12 +5,9 @@ The files and subdirectories in this directory are part of HDF5. The full HDF5 copyright notice, including terms governing use, - modification, and redistribution, is contained in the files COPYING - and Copyright.html. COPYING can be found at the root of the source - code distribution tree; Copyright.html can be found at the root - level of an installed copy of the electronic HDF5 document set and - is linked from the top-level documents page. It can also be found - at http://www.hdfgroup.org/HDF5/doc/Copyright.html. If you do not - have access to either file, you may request a copy from + modification, and redistribution, is contained in the COPYING file + which can be found at the root of the source code distribution tree + or in https://support.hdfgroup.org/ftp/HDF5/releases. If you do + not have access to either file, you may request a copy from help@hdfgroup.org. diff --git a/hl/COPYING b/hl/COPYING index 6903daf..6497ace 100644 --- a/hl/COPYING +++ b/hl/COPYING @@ -5,12 +5,9 @@ The files and subdirectories in this directory are part of HDF5. The full HDF5 copyright notice, including terms governing use, - modification, and redistribution, is contained in the files COPYING - and Copyright.html. COPYING can be found at the root of the source - code distribution tree; Copyright.html can be found at the root - level of an installed copy of the electronic HDF5 document set and - is linked from the top-level documents page. It can also be found - at http://www.hdfgroup.org/HDF5/doc/Copyright.html. If you do not - have access to either file, you may request a copy from + modification, and redistribution, is contained in the COPYING file + which can be found at the root of the source code distribution tree + or in https://support.hdfgroup.org/ftp/HDF5/releases. If you do + not have access to either file, you may request a copy from help@hdfgroup.org. diff --git a/hl/c++/COPYING b/hl/c++/COPYING index 6903daf..6497ace 100644 --- a/hl/c++/COPYING +++ b/hl/c++/COPYING @@ -5,12 +5,9 @@ The files and subdirectories in this directory are part of HDF5. The full HDF5 copyright notice, including terms governing use, - modification, and redistribution, is contained in the files COPYING - and Copyright.html. COPYING can be found at the root of the source - code distribution tree; Copyright.html can be found at the root - level of an installed copy of the electronic HDF5 document set and - is linked from the top-level documents page. It can also be found - at http://www.hdfgroup.org/HDF5/doc/Copyright.html. If you do not - have access to either file, you may request a copy from + modification, and redistribution, is contained in the COPYING file + which can be found at the root of the source code distribution tree + or in https://support.hdfgroup.org/ftp/HDF5/releases. If you do + not have access to either file, you may request a copy from help@hdfgroup.org. diff --git a/hl/fortran/COPYING b/hl/fortran/COPYING index 6903daf..6497ace 100644 --- a/hl/fortran/COPYING +++ b/hl/fortran/COPYING @@ -5,12 +5,9 @@ The files and subdirectories in this directory are part of HDF5. The full HDF5 copyright notice, including terms governing use, - modification, and redistribution, is contained in the files COPYING - and Copyright.html. COPYING can be found at the root of the source - code distribution tree; Copyright.html can be found at the root - level of an installed copy of the electronic HDF5 document set and - is linked from the top-level documents page. It can also be found - at http://www.hdfgroup.org/HDF5/doc/Copyright.html. If you do not - have access to either file, you may request a copy from + modification, and redistribution, is contained in the COPYING file + which can be found at the root of the source code distribution tree + or in https://support.hdfgroup.org/ftp/HDF5/releases. If you do + not have access to either file, you may request a copy from help@hdfgroup.org. diff --git a/hl/fortran/src/H5IMcc.c b/hl/fortran/src/H5IMcc.c index 78bf820..c6e4b1b 100644 --- a/hl/fortran/src/H5IMcc.c +++ b/hl/fortran/src/H5IMcc.c @@ -312,7 +312,6 @@ out: * the FORTRAN interface where the image buffer is defined as type "integer" * * based on HDF5 Image and Palette Specification - * http://hdf.ncsa.uiuc.edu/HDF5/H5Image/ImageSpec.html * * Modifications: * @@ -406,7 +405,6 @@ herr_t H5IMmake_palettef(hid_t loc_id, * the FORTRAN interface where the image buffer is defined as type "integer" * * based on HDF5 Image and Palette Specification - * http://hdf.ncsa.uiuc.edu/HDF5/H5Image/ImageSpec.html * * Modifications: * @@ -449,7 +447,6 @@ herr_t H5IMget_palettef(hid_t loc_id, * * Comments: * based on HDF5 Image and Palette Specification - * http://hdf.ncsa.uiuc.edu/HDF5/H5Image/ImageSpec.html * * Modifications: * diff --git a/hl/src/COPYING b/hl/src/COPYING index 6903daf..6497ace 100644 --- a/hl/src/COPYING +++ b/hl/src/COPYING @@ -5,12 +5,9 @@ The files and subdirectories in this directory are part of HDF5. The full HDF5 copyright notice, including terms governing use, - modification, and redistribution, is contained in the files COPYING - and Copyright.html. COPYING can be found at the root of the source - code distribution tree; Copyright.html can be found at the root - level of an installed copy of the electronic HDF5 document set and - is linked from the top-level documents page. It can also be found - at http://www.hdfgroup.org/HDF5/doc/Copyright.html. If you do not - have access to either file, you may request a copy from + modification, and redistribution, is contained in the COPYING file + which can be found at the root of the source code distribution tree + or in https://support.hdfgroup.org/ftp/HDF5/releases. If you do + not have access to either file, you may request a copy from help@hdfgroup.org. diff --git a/hl/src/H5IM.c b/hl/src/H5IM.c index 5eebb90..a4818b8 100644 --- a/hl/src/H5IM.c +++ b/hl/src/H5IM.c @@ -29,7 +29,6 @@ * * Comments: * based on HDF5 Image and Palette Specification -* http://hdf.ncsa.uiuc.edu/HDF5/H5Image/ImageSpec.html * * Modifications: * @@ -84,7 +83,6 @@ herr_t H5IMmake_image_8bit( hid_t loc_id, * * Comments: * based on HDF5 Image and Palette Specification -* http://hdf.ncsa.uiuc.edu/HDF5/H5Image/ImageSpec.html * * Interlace Mode Dimensions in the Dataspace * INTERLACE_PIXEL [height][width][pixel components] @@ -238,7 +236,6 @@ herr_t H5IM_find_palette( hid_t loc_id ) * * Comments: * based on HDF5 Image and Palette Specification -* http://hdf.ncsa.uiuc.edu/HDF5/H5Image/ImageSpec.html * * Modifications: * @@ -420,7 +417,6 @@ out: * * Comments: * based on HDF5 Image and Palette Specification -* http://hdf.ncsa.uiuc.edu/HDF5/H5Image/ImageSpec.html * * Modifications: * @@ -471,7 +467,6 @@ out: * * Comments: * based on HDF5 Image and Palette Specification -* http://hdf.ncsa.uiuc.edu/HDF5/H5Image/ImageSpec.html * * Modifications: * @@ -528,7 +523,6 @@ herr_t H5IMmake_palette( hid_t loc_id, * * Comments: * based on HDF5 Image and Palette Specification -* http://hdf.ncsa.uiuc.edu/HDF5/H5Image/ImageSpec.html * * An image (dataset) within an HDF5 file may optionally specify an array of * palettes to be viewed with. The dataset will have an attribute @@ -706,7 +700,6 @@ out: * * Comments: * based on HDF5 Image and Palette Specification -* http://hdf.ncsa.uiuc.edu/HDF5/H5Image/ImageSpec.html * * Modifications: * @@ -899,7 +892,6 @@ out: * * Comments: * based on HDF5 Image and Palette Specification -* http://hdf.ncsa.uiuc.edu/HDF5/H5Image/ImageSpec.html * * Modifications: * @@ -1016,7 +1008,6 @@ out: * * Comments: * based on HDF5 Image and Palette Specification -* http://hdf.ncsa.uiuc.edu/HDF5/H5Image/ImageSpec.html * * Modifications: * @@ -1124,7 +1115,6 @@ out: * * Comments: * based on HDF5 Image and Palette Specification -* http://hdf.ncsa.uiuc.edu/HDF5/H5Image/ImageSpec.html * * Modifications: * @@ -1229,7 +1219,6 @@ out: * * Comments: * based on HDF5 Image and Palette Specification -* http://hdf.ncsa.uiuc.edu/HDF5/H5Image/ImageSpec.html * * Modifications: * diff --git a/hl/test/COPYING b/hl/test/COPYING index 6903daf..6497ace 100644 --- a/hl/test/COPYING +++ b/hl/test/COPYING @@ -5,12 +5,9 @@ The files and subdirectories in this directory are part of HDF5. The full HDF5 copyright notice, including terms governing use, - modification, and redistribution, is contained in the files COPYING - and Copyright.html. COPYING can be found at the root of the source - code distribution tree; Copyright.html can be found at the root - level of an installed copy of the electronic HDF5 document set and - is linked from the top-level documents page. It can also be found - at http://www.hdfgroup.org/HDF5/doc/Copyright.html. If you do not - have access to either file, you may request a copy from + modification, and redistribution, is contained in the COPYING file + which can be found at the root of the source code distribution tree + or in https://support.hdfgroup.org/ftp/HDF5/releases. If you do + not have access to either file, you may request a copy from help@hdfgroup.org. diff --git a/hl/tools/COPYING b/hl/tools/COPYING index 6903daf..6497ace 100644 --- a/hl/tools/COPYING +++ b/hl/tools/COPYING @@ -5,12 +5,9 @@ The files and subdirectories in this directory are part of HDF5. The full HDF5 copyright notice, including terms governing use, - modification, and redistribution, is contained in the files COPYING - and Copyright.html. COPYING can be found at the root of the source - code distribution tree; Copyright.html can be found at the root - level of an installed copy of the electronic HDF5 document set and - is linked from the top-level documents page. It can also be found - at http://www.hdfgroup.org/HDF5/doc/Copyright.html. If you do not - have access to either file, you may request a copy from + modification, and redistribution, is contained in the COPYING file + which can be found at the root of the source code distribution tree + or in https://support.hdfgroup.org/ftp/HDF5/releases. If you do + not have access to either file, you may request a copy from help@hdfgroup.org. diff --git a/java/COPYING b/java/COPYING index 6903daf..6497ace 100644 --- a/java/COPYING +++ b/java/COPYING @@ -5,12 +5,9 @@ The files and subdirectories in this directory are part of HDF5. The full HDF5 copyright notice, including terms governing use, - modification, and redistribution, is contained in the files COPYING - and Copyright.html. COPYING can be found at the root of the source - code distribution tree; Copyright.html can be found at the root - level of an installed copy of the electronic HDF5 document set and - is linked from the top-level documents page. It can also be found - at http://www.hdfgroup.org/HDF5/doc/Copyright.html. If you do not - have access to either file, you may request a copy from + modification, and redistribution, is contained in the COPYING file + which can be found at the root of the source code distribution tree + or in https://support.hdfgroup.org/ftp/HDF5/releases. If you do + not have access to either file, you may request a copy from help@hdfgroup.org. diff --git a/release_docs/COPYING b/release_docs/COPYING index 6903daf..6497ace 100644 --- a/release_docs/COPYING +++ b/release_docs/COPYING @@ -5,12 +5,9 @@ The files and subdirectories in this directory are part of HDF5. The full HDF5 copyright notice, including terms governing use, - modification, and redistribution, is contained in the files COPYING - and Copyright.html. COPYING can be found at the root of the source - code distribution tree; Copyright.html can be found at the root - level of an installed copy of the electronic HDF5 document set and - is linked from the top-level documents page. It can also be found - at http://www.hdfgroup.org/HDF5/doc/Copyright.html. If you do not - have access to either file, you may request a copy from + modification, and redistribution, is contained in the COPYING file + which can be found at the root of the source code distribution tree + or in https://support.hdfgroup.org/ftp/HDF5/releases. If you do + not have access to either file, you may request a copy from help@hdfgroup.org. diff --git a/release_docs/HISTORY-1_10.txt b/release_docs/HISTORY-1_10.txt new file mode 100644 index 0000000..03d0e3e --- /dev/null +++ b/release_docs/HISTORY-1_10.txt @@ -0,0 +1,1367 @@ +HDF5 History +============ + +This file contains development history of the HDF5 1.10 branch + +02. Release Information for hdf5-1.10.0-patch1 +01. Release Information for hdf5-1.10.0 + +[Search on the string '%%%%' for section breaks of each release.] + +%%%%1.10.0-patch1%%%% + + +HDF5 version 1.10.0-patch1 released on 2016-05-23 +================================================================================ + +INTRODUCTION + +This document describes the differences between HDF5-1.8 series and +HDF5 1.10.0 releases, and contains information on the platforms +tested. + +Links to HDF5 1.10.0 source code can be found on The HDF Group's +development FTP server at the following location: + + https://www.hdfgroup.org/HDF5/release/obtain5110.html + +User documentation can be accessed directly at this location: + + https://www.hdfgroup.org/HDF5/docNewFeatures/ + +For more information, see the HDF5 home page: + + https://www.hdfgroup.org/HDF5/ + +If you have any questions or comments, please send them to the HDF +Help Desk: + + help@hdfgroup.org + + + +CONTENTS + +- New Features +- Issues Addressed in this Release +- Supported Platforms +- Tested Configuration Features Summary +- More Tested Platforms +- Known Problems and Limitations + + + +New Features +============ +This release supports the following features: + + Configuration + ------------- + - API Compatibility with HDF5 1.8 Flag Was Added + + The 1.10 version of the HDF5 Library can be configured to operate + identically to the 1.8 library with the --with-default-api-version=v18 + configure flag. This allows existing code to be compiled with the 1.10 + library without requiring immediate changes to the application source + code. For addtional configuration options and other details, see + "API Compatibility Macros in HDF5" at + https://www.hdfgroup.org/HDF5/doc/RM/APICompatMacros.html. + + - Autotools Configuration Has Been Extensively Reworked + + The autotools configuration options have been updated to allow more + fine-grained control of the build options and to correct some bugs. + See configure --help for comprehensive information on each option. + + Specific changes: + + * --enable-debug and --enable-production are no longer accepted. + Use --enable-build-mode=(debug | production) instead. These set + appropriate defaults for symbols, optimizations, and other + configuration options. These defaults can be overridden by the + user. + + * Extra debug output messages are no longer enabled with + --enable-debug=. Use --enable-internal-debug= + instead. + + * A new --enable-symbols option allows symbols to be generated + independently of the build mode. --disable-symbols can be used + to strip symbols from the binary. + + * A new --enable-asserts option sets/unsets NDEBUG. This is + independent of the build mode. This also enables some extra + low-overhead debug checks in the library. + + * A new --enable-profiling option sets profiling flags. This is + independent of the build mode. + + * A new --enable-optimization option sets the optimization level. + This is independent of the build mode. + + * Many of these options can take a flags string that will be used + to build the library. This can be useful for specifying custom + optimization flags such as -Os and -Ofast. + + * gnu C++ and Fortran use configure sub-files that update the + build flags and turn on warnings. The increase in warnings when + building these wrapper libraries is due to these flag changes + and not to a decrease in code quality. + + * The option to clear file buffers has been removed. Any buffer that + will eventually be written to disk will now always be memset + to zero. This prevents the previous contents of the buffer from + being written to the disk if the buffer contents are not + completely overwritten, which has security implications. + + - LFS Changes + + The way the autotools handle large file support (LFS) has been + overhauled in this release. + + * We assume ftello and fseeko exist + + * We no longer explicitly use the *64 I/O functions. Instead, we + rely on a mapping provided by _FILE_OFFSET_BITS or its equivalent. + + * _LARGEFILE(64)_SOURCE is no longer exported via AM_CPPFLAGS. + + + + Parallel Library + ----------------- + - Collective Metadata I/O + + Calls for HDF5 metadata can result in many small reads and writes. + On metadata reads, collective metadata I/O can improve performance + by allowing the library to perform optimizations when reading the + metadata by having one rank read the data and broadcasting it to + all other ranks. + + Collective metadata I/O improves metadata write performance through + the construction of an MPI derived datatype that is then written + collectively in a single call. For more information, see + https://www.hdfgroup.org/HDF5/docNewFeatures/NewFeaturesCollectiveMetadataIoDocs.html. + + + + Library + -------- + - Concurrent Access to HDF5 Files - Single Writer/ Multple Reader (SWMR) + + The Single Writer/ Multiple Reader or SWMR feature enables users to + read data concurrently while writing it. Communications between the + processes and file locking are not required. The processes can run + on the same or on different platforms as long as they share a common + file system that is POSIX compliant. For more information, see the + Single-Writer/Multiple-Reader (SWMR) documentation at + https://www.hdfgroup.org/HDF5/docNewFeatures/NewFeaturesSwmrDocs.html. + + - Virtual Dataset (VDS) + + The VDS feature enables data to be accessed across HDF5 files + using standard HDF5 objects such as groups and datasets without + rewriting or rearranging the data. An HDF5 virtual dataset (VDS) + is an HDF5 dataset that is composed of source HDF5 datasets in + a predefined mapping. VDS can be used with the SWMR feature. For + documentation, check + https://www.hdfgroup.org/HDF5/docNewFeatures/NewFeaturesVirtualDatasetDocs.html. + + - Persistent Free File Space Tracking + + Usage patterns when working with an HDF5 file sometimes result in + wasted space within the file. This can also impair access times + when working with the resulting files. The new file space management + feature provides strategies for managing space in a file to improve + performance in both of these areas. For more information, see + https://www.hdfgroup.org/HDF5/docNewFeatures/NewFeaturesFileSpaceMgmtDocs.html. + + - Version 3 Metadata Cache + + The version 3 metadata cache moves management of metadata I/O from + the clients to the metadata cache proper. This change is essential for + SWMR and other features that have yet to be released. + + + + C++ Library + ------------ + - New Member Function Added to H5::ArrayType + + The assignment operator ArrayType::operator= was added because + ArrayType has pointer data members. + + (BMR - 2016/03/07, HDFFV-9562) + + + + Tools + ------ + - h5watch + + The h5watch tool allows users to output new records appended to + a dataset under SWMR access as it grows. The functionality is + similar to the Unix user command "tail" with the follow option, + which outputs appended data as the file grows. For more + information, see + https://www.hdfgroup.org/HDF5/docNewFeatures/NewFeaturesSwmrDocs.html#Tools. + + - h5format_convert + + The h5format_convert tool allows users to convert the indexing + type of a chunked dataset made with a 1.10.x version of the HDF5 + Library when the latest file format is used to the 1.8.x version 1 B-tree indexing + type. For example, datasets created using SWMR access, can be + converted to be accessed by the HDF5 1.18 library and tools. The + tool does not rewrite raw data, but it does rewrite HDF5 metadata. + + + + High-Level APIs + ---------------- + - H5DOappend + + The function appends data to a dataset along a specified dimension. + + + C Packet Table API + ------------------ + - Replacement of a Public Function with H5PTcreate + + The existing function H5PTcreate_fl limits applications so they + can use the deflate compression only. The public function + H5PTcreate has been added to replace H5PTcreate_fl. H5PTcreate + takes a property list identifier to provide flexibility on + creation properties. + + (BMR - 2016/03/04, HDFFV-8623) + + - New Public Functions: H5PTget_dataset and H5PTget_type + + Two accessor functions have been added. H5PTget_dataset returns + the identifier of the dataset associated with the packet table, + and H5PTget_type returns the identifier of the datatype used by + the packet table. + + (BMR, 2016/03/04, HDFFV-8623) + + - Regarding #ifdef VLPT_REMOVED + + The #ifdef VLPT_REMOVED blocks have been removed from the packet + table (PT) library source except for the following functions: + + H5PTis_varlen() has been made available again + + H5PTfree_vlen_readbuff() is now H5PTfree_vlen_buff() + + (BMR - 2016/03/04, HDFFV-442) + + C++ Packet Table API + -------------------- + - New Constructor Added to FL_PacketTable + + An overloaded constructor has been added to FL_PacketTable and + takes a property list identifier to provide flexibility on + creation properties. + + (BMR - 2016/03/08, HDFFV-8623) + + - New Public Functions + + Two accessor wrappers are added to class PacketTable. + PacketTable::GetDataset() returns the identifier of the dataset + associated with the packet table, and PacketTable::GetDatatype() + returns the identifier of the datatype that the packet table uses. + + (BMR - 2016/03/04, HDFFV-8623) + + - Member Functions with "char*" as an Argument + + Overloaded functions were added to provide the "const char*" + argument; the existing version will be deprecated in future + releases. + + (BMR - 2016/03/04, HDFFV-8623) + + - Regarding #ifdef VLPT_REMOVED + + The #ifdef VLPT_REMOVED blocks have been removed from the packet + table library source code except for the following functions: + + VL_PacketTable::IsVariableLength() was moved to PacketTable + + VL_PacketTable::FreeReadBuff() is now PacketTable::FreeBuff() + + (BMR - 2016/03/04, HDFFV-442) + + + + Java Wrapper Library + -------------------- + + The Java HDF5 JNI library has been integrated into the HDF5 repository. + The configure option is "--enable-java", and the CMake option is + HDF5_BUILD_JAVA:BOOL=ON. The package hierarchy has changed from the + HDF5 1.8 JNI, which was "ncsa.hdf.hdflib.hdf5", to HDF5 1.10, + "hdf.hdflib.hdf5". + + A number of new APIs were added including some for VDS and SWMR. + + + + Other Important Changes + ----------------------- + + The hid_t type was changed from 32-bit to a 64-bit value. + + + +Issues Addressed in this Release Since 1.10.0 +============================================= + + - h5diff would return from a compare attributes abnormally if one of the datatypes + was a vlen. This resulted in a memory leak as well as an incorrect report of + attribute comparison. + + Fixed. + (ADB - 2016/04/26, HDFFV-9784) + + - The JUnit-interface test may fail on Solaris platforms. The result of + a test for verifying the content of the error stack to stdout is + in a different order on Solaris then other platforms. + + This test is skipped on Solaris + (ADB - 2016/04/21, HDFFV-9734) + + - When building HDF5 with Java using CMake and specifying Debug for CMAKE_BUILD_TYPE, + there was a missing command argument for the tests of the examples. + + Fixed. + (ADB - 2016/04/21, HDFFV-9743) + + - Changed h5diff to print a warning when a dataset is virtual, enabling + the data to be compared. In addition h5repack failed to copy the data + of a virtual dataset to the new file. Function H5D__get_space_status changed + to correctly determine the H5D_space_status_t allocation value. + + CMake added the Fixed Array indexing tests that were only in the autotools + test scripts. + + Fixed and tests added for vds issues. + (ADB,NAF - 2016/04/21, HDFFV-9756) + + - CMake added the h5format_convert tool and tests that were only in the autotools + build and test scripts. The autotools test script was reworked to allow CMake + to execute the test suite in parallel. + + Also, h5clear tool and tests were added to the misc folder. + + Fixed. + (ADB - 2016/04/21, HDFFV-9766) + + - CMake added the h5watch tool and argument tests that were only in the autotools + build and test scripts. The POSIX only tests were not added to CMake. + + CMake HL tools files were refactored to move the CMake test scripts into each tool folder. + + Fixed. + (ADB - 2016/04/21, HDFFV-9770) + + - Configure fails to detect valid real KINDs on FreeBSD 9.3 (i386) with Fortran enabled. + + Fixed. Added the exponential option to SELECTED_REAL_KIND to distinguish + KINDs of same precision + (MSB - 2016/05/14,HDFFV-9912) + + + - Corrected the f90 H5AWRITE_F integer interface's buf to be INTENT(IN). + (MSB - 2016/05/14) + + - Configure fails in sed command on FreeBSD 9.3 (i386) with Fortran enabled. + + Fixed. + (MSB - 2016/05/14,HDFFV-9912) + + - Compile time error in H5f90global.F90 with IBM XL Fortran 14.1.0.13 on BG/Q with Fortran + enabled. + + Fixed. + (MSB - 2016/05/16,HDFFV-9917) + + - A cmake build with Fortran enabled does not install module h5fortkit + + Fixed. + (MSB - 2016/05/23,HDFFV-9923) + + +Issues Addressed in this Release Since alpha1 +============================================= + + - H5Pget_virtual_printf_gap, H5Pget_virtual_view, H5Pget_efile_prefix + + The correct access property list settings from the + H5Pget_virtual_printf_gap, H5Pget_virtual_view, and + H5Pget_efile_prefix function calls could not be retrieved + using H5Dget_access_plist(). + + Fixed. + + (DER and NAF - 2016/03/14, HDFFV-9716) + + - h5dump + + When h5dump was provided with the name of a non-existing file or + when optional arguments were the last option on the command line, + h5dump would segfault. + + Fixed. + + (ADB 2016/02/28 HDFFV-9639, HDFFV-9684) + + - No Error Message for Corrupt Metadata + + The HDF5 Library did not propagate an error when it encountered + corrupt metadata in an HDF5 file. The issue was fixed for a + specific file provided by a user. If you still see the problem, + please contact help@hdfgroup.org + + Fixed. + + (MC - 2016/02/18, HDFFV-9670) + + - Problem Reading Chunked Datasets with a String Datatype Larger + Than the Chunk Size in Bytes + + When the latest file format was used and when a chunked dataset + was created with a datatype with the size bigger than a chunk + size, the data could not be read back. The issue was reported + for chunked datasets with a string datatype and was confirmed + for other datatypes with the sizes bigger than the chunk size in + bytes. + + Fixed. + + (JM - 2016/02/13, HDFFV-9672) + + - Control over the Location of External Files + + Users were unable to specify the locations of external files. + + Two APIs - H5Pget_efile_prefix and H5Pset_efile_prefix - were + added so that users could specify the locations of external files. + + (DER - 2016/02/04, HDFFV-8740) + + + +Issues Addressed in this Release Since alpha0 +============================================= + - h5format_convert + + The h5format_convert tool did not downgrade the version of the + superblock. + + Fixed. The tool now will downgrade the version of the superblock. + + (EIP 2016/01/11) + + - Crashes with multiple threads: invalid pointers + + It was reported that alpha0 crashed when used with multiple + threads. The issue exists in the HDF5 Library versions 1.8 and + 1.9. The problem is related to a shared file pointer used in some + miscellaneous data structures. The thread-safe library exposed + paths in the library where a file pointer became invalid. + + The alpha1 release contains the fixes for the specific use case + as described in HDFFV-9643. We will keep working on identifying + and fixing other paths in the library with similar problems. + + (EIP - 2016/01/15, HDFFV-9643) + + + +Supported Platforms +=================== +The following platforms are supported and have been tested for this release. +They are built with the configure process unless specified otherwise. + + AIX 6.1 xlc/xlc_r 10.1.0.5 + (NASA G-ADA) xlC/xlC_r 10.1.0.5 + xlf90/xlf90_r 12.1.0.6 + + Linux 2.6.32-573.22.1.el6 GNU C (gcc), Fortran (gfortran), C++ (g++) + #1 SMP x86_64 GNU/Linux compilers: + (mayll/platypus) Version 4.4.7 20120313 (Red Hat 4.4.7-16) + Version 4.9.3, Version 5.2.0 + PGI C, Fortran, C++ for 64-bit target on + x86-64; + Version 15.7-0 + Intel(R) C (icc), C++ (icpc), Fortran (icc) + compilers: + Version 15.0.3.187 Build 20150407 + MPICH 3.1.4 compiled with GCC 4.9.3 + + Linux 2.6.32-573.18.1.el6.ppc64 gcc (GCC) 4.4.7 20120313 (Red Hat 4.4.7-11) + #1 SMP ppc64 GNU/Linux g++ (GCC) 4.4.7 20120313 (Red Hat 4.4.7-11) + (ostrich) GNU Fortran (GCC) 4.4.7 20120313 (Red Hat 4.4.7-11) + IBM XL C/C++ V13.1 + IBM XL Fortran V15.1 + + Linux 3.10.0-327.10.1.el7 GNU C (gcc), Fortran (gfortran), C++ (g++) + #1 SMP x86_64 GNU/Linux compilers: + (kituo/moohan) Version 4.8.5 20150623 (Red Hat 4.8.5-4) + Version 4.9.3, Version 5.2.0 + Intel(R) C (icc), C++ (icpc), Fortran (icc) + compilers: + Version 15.0.3.187 Build 20150407 + MPICH 3.1.4 compiled with GCC 4.9.3 + + SunOS 5.11 32- and 64-bit Sun C 5.12 SunOS_sparc + (emu) Sun Fortran 95 8.6 SunOS_sparc + Sun C++ 5.12 SunOS_sparc + + Windows 7 Visual Studio 2012 w/ Intel Fortran 15 (cmake) + Visual Studio 2013 w/ Intel Fortran 15 (cmake) + Visual Studio 2015 w/ Intel Fortran 16 (cmake) + Cygwin(CYGWIN_NT-6.1 2.2.1(0.289/5/3) gcc(4.9.3) compiler and gfortran) + (cmake and autotools) + + Windows 7 x64 Visual Studio 2012 w/ Intel Fortran 15 (cmake) + Visual Studio 2013 w/ Intel Fortran 15 (cmake) + Visual Studio 2015 w/ Intel Fortran 16 (cmake) + + Windows 8.1 Visual Studio 2012 w/ Intel Fortran 15 (cmake) + Visual Studio 2013 w/ Intel Fortran 15 (cmake) + + Windows 8.1 x64 Visual Studio 2012 w/ Intel Fortran 15 (cmake) + Visual Studio 2013 w/ Intel Fortran 15 (cmake) + + Mac OS X Mt. Lion 10.8.5 Apple clang/clang++ version 5.1 from Xcode 5.1 + 64-bit gfortran GNU Fortran (GCC) 4.8.2 + (swallow/kite) Intel icc/icpc/ifort version 15.0.3 + + Mac OS X Mavericks 10.9.5 Apple clang/clang++ version 6.0 from Xcode 6.2 + 64-bit gfortran GNU Fortran (GCC) 4.9.2 + (wren/quail) Intel icc/icpc/ifort version 15.0.3 + + Mac OS X Yosemite 10.10.5 Apple clang/clang++ version 6.0 from Xcode 7.0 + 64-bit gfortran GNU Fortran (GCC) 4.9.2 + (osx1010dev/osx1010test) Intel icc/icpc/ifort version 15.0.3 + + Mac OS X El Capitan 10.11.4 Apple clang/clang++ version 7.3.0 from Xcode 7.3 + 64-bit gfortran GNU Fortran (GCC) 5.2.0 + (osx1010dev/osx1010test) Intel icc/icpc/ifort version 15.0.3 + + + +Tested Configuration Features Summary +===================================== + + In the tables below + y = tested + n = not tested in this release + C = Cluster + W = Workstation + x = not working in this release + dna = does not apply + ( ) = footnote appears below second table + = testing incomplete on this feature or platform + +Platform C F90/ F90 C++ zlib SZIP + parallel F2003 parallel +SunOS 5.11 32-bit n y/y n y y y +SunOS 5.11 64-bit n y/y n y y y +Windows 7 y y/y n y y y +Windows 7 x64 y y/y n y y y +Windows 7 Cygwin n y/y n y y n +Windows 8.1 n y/y n y y y +Windows 8.1 x64 n y/y n y y y +Mac OS X Mountain Lion 10.8.5 64-bit n y/y n y y y +Mac OS X Mavericks 10.9.5 64-bit n y/y n y y y +Mac OS X Yosemeti 10.10.5 64-bit n y/y n y y y +AIX 6.1 32- and 64-bit n y/n n y y y +CentOS 6.7 Linux 2.6.32 x86_64 GNU y y/y y y y y +CentOS 6.7 Linux 2.6.32 x86_64 Intel n y/y n y y y +CentOS 6.7 Linux 2.6.32 x86_64 PGI n y/y n y y y +CentOS 7.1 Linux 3.10.0 x86_64 GNU y y/y y y y y +CentOS 7.1 Linux 3.10.0 x86_64 Intel n y/y n y y y +Linux 2.6.32-431.11.2.el6.ppc64 n y/n n y y y + +Platform Shared Shared Shared Thread- + C libs F90 libs C++ libs safe +SunOS 5.11 32-bit y y y y +SunOS 5.11 64-bit y y y y +Windows 7 y y y y +Windows 7 x64 y y y y +Windows 7 Cygwin n n n y +Windows 8.1 y y y y +Windows 8.1 x64 y y y y +Mac OS X Mountain Lion 10.8.5 64-bit y n y y +Mac OS X Mavericks 10.9.5 64-bit y n y y +Mac OS X Yosemeti 10.10.5 64-bit y n y y +AIX 6.1 32- and 64-bit y n n y +CentOS 6.7 Linux 2.6.32 x86_64 GNU y y y y +CentOS 6.7 Linux 2.6.32 x86_64 Intel y y y y +CentOS 6.7 Linux 2.6.32 x86_64 PGI y y y y +CentOS 7.1 Linux 3.10.0 x86_64 GNU y y y y +CentOS 7.1 Linux 3.10.0 x86_64 Intel y y y y +Linux 2.6.32-431.11.2.el6.ppc64 y y y y + +Compiler versions for each platform are listed in the preceding +"Supported Platforms" table. + + + +More Tested Platforms +===================== +The following platforms are not supported but have been tested for this release. + + Linux 2.6.18-431.11.2.el6 g95 (GCC 4.0.3 (g95 0.94!) + #1 SMP x86_64 GNU/Linux + (platypus) + + Windows 7 Visual Studio 2008 (cmake) + + Windows 7 x64 Visual Studio 2008 (cmake) + + Windows 7 x64 Visual Studio 2010 (cmake) with SWMR using GPFS + + Windows 10 Visual Studio 2013 w/ Intel Fortran 15 (cmake) + + Windows 10 x64 Visual Studio 2013 w/ Intel Fortran 15 (cmake) + + Debian7.5.0 3.2.0-4-amd64 #1 SMP Debian 3.2.51-1 x86_64 GNU/Linux + gcc (Debian 4.7.2-5) 4.7.2 + GNU Fortran (Debian 4.7.2-5) 4.7.2 + (cmake and autotools) + + Fedora20 3.15.3-200.fc20.x86_64 #1 SMP x86_64 x86_64 x86_64 GNU/Linux + gcc (GCC) 4.8.3 20140624 (Red Hat 4.8.3-1) + GNU Fortran (GCC) 4.8.3 20140624 (Red Hat 4.8.3-1) + (cmake and autotools) + + SUSE 13.1 3.11.10-17-desktop #1 SMP PREEMPT x86_64 x86_64 x86_64 GNU/Linux + gcc (SUSE Linux) 4.8.1 + GNU Fortran (SUSE Linux) 4.8.1 + (cmake and autotools) + + Ubuntu 14.04 3.13.0-35-generic #62-Ubuntu SMP x86_64 GNU/Linux + gcc (Ubuntu/Linaro 4.9.1-0ubuntu1) 4.9.1 + GNU Fortran (Ubuntu/Linaro 4.9.1-0ubuntu1) 4.9.1 + (cmake and autotools) + + hopper.nersc.gov PrgEnv-gnu/5.2.40 + gcc (GCC) 4.9.2 20141030 (Cray Inc.) + GNU Fortran (GCC) 4.9.2 20141030 (Cray Inc.) + g++ (GCC) 4.9.2 20141030 (Cray Inc.) + + + +Known Problems and Limitations +============================== +This section contains the list of known problems and limitations introduced +in this release of HDF5. + +Note: this list is not exhaustive of all known issues discovered in HDF5 +software to date. For a list of significant problems and known workarounds +identified in past releases, please refer to: + +https://www.hdfgroup.org/HDF5/release/known_problems/ + +The HDF Group also maintains a JIRA issue-tracking database which is used to +capture all known issues which are too numerous to reasonably list in this +document. The HDF Group is taking steps to make our JIRA issue database +open to the public, and this section will refer to that database in a future +release. In the meantime, please contact help@hdfgroup.org if you come across +an issue not listed here or at the link above, and we will provide any +information about known workarounds that we have or add it to our list of +known issues if it is a new issue. + + - The flush/refresh test occasionally fails on OS X platforms. This is + being investigated but no fix or workaround is available at this time. + (DER - 2016/03/22, HDFFV-9731) + + - The VDS/SWMR test will fail with a segmentation fault if the library + is built with --enable-using-memchecker. The is due to a VDS shutdown + procedure freeing a shared resource too early when the memory + checker changes are built. This problem does not arise when the + memory checker changes are not used since the internal library free + lists behave differently. The memory checker configure option should + normally only be used under special circumstances so this should not + affect most users. Users should be aware that the --enable-using-memchecker + + VDS combination may cause a segfault, however, so Valgrind et al. may + have to be used with an HDF5 library built without the feature if this + proves to be a problem. + (DER - 2016/03/21, HDFFV-9732) + + - SWMR feature limitations + The SWMR feature will only work if an HDF5 file under SWMR access resides + on a file system that obeys POSIX write() ordering semantics. Because of + this, SWMR will not work on network file systems such as NFS or SMB/Windows + file shares since those systems do not guarantee write odering. SWMR + regression tests are likely to fail if run on a network file system. SWMR + is currently not tested on Windows though it can be tested manually + (some of the SWMR test programs are built by CMake), and there are no + obvious reasons for it to not work on NTFS or GPFS. + (EIP - 2016/03/20, HDFFV-9733) + + - VDS feature limitation + Currently, the path to a VDS source file is interpreted as relative to the + directory where the executable program runs and not to the HDF5 file with + the VDS dataset unless a full path to the source file is specified during + the mapping. + (EIP - 2016/03/20, HDFFV-9724) + + - The H5Lexists API changed behavior in HDF5-1.10 when used with a file handle + and root group name ("/"): + + H5Lexists(fileid, "/") + + In HDF5-1.8 it returns false (0) and in HDF5-1.10 it returns true (1). + The documentation will be updated with information regarding this change. + (LRK - 2016/03/30, HDFFV-8746) + + +%%%%1.10.0%%%% + +HDF5 version 1.10.0 released on 2016-03-30 +================================================================================ + + + +INTRODUCTION + +This document describes the differences between HDF5-1.8 series and +HDF5 1.10.0 releases, and contains information on the platforms +tested. + +Links to HDF5 1.10.0 source code can be found on The HDF Group's +development FTP server at the following location: + + https://www.hdfgroup.org/HDF5/release/obtain5110.html + +User documentation can be accessed directly at this location: + + https://www.hdfgroup.org/HDF5/docNewFeatures/ + +For more information, see the HDF5 home page: + + https://www.hdfgroup.org/HDF5/ + +If you have any questions or comments, please send them to the HDF +Help Desk: + + help@hdfgroup.org + + + +CONTENTS + +- New Features +- Issues Addressed in this Release +- Supported Platforms +- Tested Configuration Features Summary +- More Tested Platforms +- Known Problems and Limitations + + + +New Features +============ +This release supports the following features: + + Configuration + ------------- + - API Compatibility with HDF5 1.8 Flag Was Added + + The 1.10 version of the HDF5 Library can be configured to operate + identically to the 1.8 library with the --with-default-api-version=v18 + configure flag. This allows existing code to be compiled with the 1.10 + library without requiring immediate changes to the application source + code. For addtional configuration options and other details, see + "API Compatibility Macros in HDF5" at + https://www.hdfgroup.org/HDF5/doc/RM/APICompatMacros.html. + + - Autotools Configuration Has Been Extensively Reworked + + The autotools configuration options have been updated to allow more + fine-grained control of the build options and to correct some bugs. + See configure --help for comprehensive information on each option. + + Specific changes: + + * --enable-debug and --enable-production are no longer accepted. + Use --enable-build-mode=(debug | production) instead. These set + appropriate defaults for symbols, optimizations, and other + configuration options. These defaults can be overridden by the + user. + + * Extra debug output messages are no longer enabled with + --enable-debug=. Use --enable-internal-debug= + instead. + + * A new --enable-symbols option allows symbols to be generated + independently of the build mode. --disable-symbols can be used + to strip symbols from the binary. + + * A new --enable-asserts option sets/unsets NDEBUG. This is + independent of the build mode. This also enables some extra + low-overhead debug checks in the library. + + * A new --enable-profiling option sets profiling flags. This is + independent of the build mode. + + * A new --enable-optimization option sets the optimization level. + This is independent of the build mode. + + * Many of these options can take a flags string that will be used + to build the library. This can be useful for specifying custom + optimization flags such as -Os and -Ofast. + + * gnu C++ and Fortran use configure sub-files that update the + build flags and turn on warnings. The increase in warnings when + building these wrapper libraries is due to these flag changes + and not to a decrease in code quality. + + * The option to clear file buffers has been removed. Any buffer that + will eventually be written to disk will now always be memset + to zero. This prevents the previous contents of the buffer from + being written to the disk if the buffer contents are not + completely overwritten, which has security implications. + + - LFS Changes + + The way the autotools handle large file support (LFS) has been + overhauled in this release. + + * We assume ftello and fseeko exist + + * We no longer explicitly use the *64 I/O functions. Instead, we + rely on a mapping provided by _FILE_OFFSET_BITS or its equivalent. + + * _LARGEFILE(64)_SOURCE is no longer exported via AM_CPPFLAGS. + + + + Parallel Library + ----------------- + - Collective Metadata I/O + + Calls for HDF5 metadata can result in many small reads and writes. + On metadata reads, collective metadata I/O can improve performance + by allowing the library to perform optimizations when reading the + metadata by having one rank read the data and broadcasting it to + all other ranks. + + Collective metadata I/O improves metadata write performance through + the construction of an MPI derived datatype that is then written + collectively in a single call. For more information, see + https://www.hdfgroup.org/HDF5/docNewFeatures/NewFeaturesCollectiveMetadataIoDocs.html. + + + + Library + -------- + - Concurrent Access to HDF5 Files - Single Writer/ Multple Reader (SWMR) + + The Single Writer/ Multiple Reader or SWMR feature enables users to + read data concurrently while writing it. Communications between the + processes and file locking are not required. The processes can run + on the same or on different platforms as long as they share a common + file system that is POSIX compliant. For more information, see the + Single-Writer/Multiple-Reader (SWMR) documentation at + https://www.hdfgroup.org/HDF5/docNewFeatures/NewFeaturesSwmrDocs.html. + + - Virtual Dataset (VDS) + + The VDS feature enables data to be accessed across HDF5 files + using standard HDF5 objects such as groups and datasets without + rewriting or rearranging the data. An HDF5 virtual dataset (VDS) + is an HDF5 dataset that is composed of source HDF5 datasets in + a predefined mapping. VDS can be used with the SWMR feature. For + documentation, check + https://www.hdfgroup.org/HDF5/docNewFeatures/NewFeaturesVirtualDatasetDocs.html. + + - Persistent Free File Space Tracking + + Usage patterns when working with an HDF5 file sometimes result in + wasted space within the file. This can also impair access times + when working with the resulting files. The new file space management + feature provides strategies for managing space in a file to improve + performance in both of these areas. For more information, see + https://www.hdfgroup.org/HDF5/docNewFeatures/NewFeaturesFileSpaceMgmtDocs.html. + + - Version 3 Metadata Cache + + The version 3 metadata cache moves management of metadata I/O from + the clients to the metadata cache proper. This change is essential for + SWMR and other features that have yet to be released. + + + + C++ Library + ------------ + - New Member Function Added to H5::ArrayType + + The assignment operator ArrayType::operator= was added because + ArrayType has pointer data members. + + (BMR - 2016/03/07, HDFFV-9562) + + + + Tools + ------ + - h5watch + + The h5watch tool allows users to output new records appended to + a dataset under SWMR access as it grows. The functionality is + similar to the Unix user command "tail" with the follow option, + which outputs appended data as the file grows. For more + information, see + https://www.hdfgroup.org/HDF5/docNewFeatures/NewFeaturesSwmrDocs.html#Tools. + + - h5format_convert + + The h5format_convert tool allows users to convert the indexing + type of a chunked dataset made with a 1.10.x version of the HDF5 + Library when the latest file format is used to the 1.8.x version 1 B-tree indexing + type. For example, datasets created using SWMR access, can be + converted to be accessed by the HDF5 1.18 library and tools. The + tool does not rewrite raw data, but it does rewrite HDF5 metadata. + + + + High-Level APIs + ---------------- + - H5DOappend + + The function appends data to a dataset along a specified dimension. + + + C Packet Table API + ------------------ + - Replacement of a Public Function with H5PTcreate + + The existing function H5PTcreate_fl limits applications so they + can use the deflate compression only. The public function + H5PTcreate has been added to replace H5PTcreate_fl. H5PTcreate + takes a property list identifier to provide flexibility on + creation properties. + + (BMR - 2016/03/04, HDFFV-8623) + + - New Public Functions: H5PTget_dataset and H5PTget_type + + Two accessor functions have been added. H5PTget_dataset returns + the identifier of the dataset associated with the packet table, + and H5PTget_type returns the identifier of the datatype used by + the packet table. + + (BMR, 2016/03/04, HDFFV-8623) + + - Regarding #ifdef VLPT_REMOVED + + The #ifdef VLPT_REMOVED blocks have been removed from the packet + table (PT) library source except for the following functions: + + H5PTis_varlen() has been made available again + + H5PTfree_vlen_readbuff() is now H5PTfree_vlen_buff() + + (BMR - 2016/03/04, HDFFV-442) + + C++ Packet Table API + -------------------- + - New Constructor Added to FL_PacketTable + + An overloaded constructor has been added to FL_PacketTable and + takes a property list identifier to provide flexibility on + creation properties. + + (BMR - 2016/03/08, HDFFV-8623) + + - New Public Functions + + Two accessor wrappers are added to class PacketTable. + PacketTable::GetDataset() returns the identifier of the dataset + associated with the packet table, and PacketTable::GetDatatype() + returns the identifier of the datatype that the packet table uses. + + (BMR - 2016/03/04, HDFFV-8623) + + - Member Functions with "char*" as an Argument + + Overloaded functions were added to provide the "const char*" + argument; the existing version will be deprecated in future + releases. + + (BMR - 2016/03/04, HDFFV-8623) + + - Regarding #ifdef VLPT_REMOVED + + The #ifdef VLPT_REMOVED blocks have been removed from the packet + table library source code except for the following functions: + + VL_PacketTable::IsVariableLength() was moved to PacketTable + + VL_PacketTable::FreeReadBuff() is now PacketTable::FreeBuff() + + (BMR - 2016/03/04, HDFFV-442) + + + + Java Wrapper Library + -------------------- + + The Java HDF5 JNI library has been integrated into the HDF5 repository. + The configure option is "--enable-java", and the CMake option is + HDF5_BUILD_JAVA:BOOL=ON. The package hierarchy has changed from the + HDF5 1.8 JNI, which was "ncsa.hdf.hdflib.hdf5", to HDF5 1.10, + "hdf.hdflib.hdf5". + + A number of new APIs were added including some for VDS and SWMR. + + + + Other Important Changes + ----------------------- + + The hid_t type was changed from 32-bit to a 64-bit value. + + + +Issues Addressed in this Release Since alpha1 +============================================= + + - H5Pget_virtual_printf_gap, H5Pget_virtual_view, H5Pget_efile_prefix + + The correct access property list settings from the + H5Pget_virtual_printf_gap, H5Pget_virtual_view, and + H5Pget_efile_prefix function calls could not be retrieved + using H5Dget_access_plist(). + + Fixed. + + (DER and NAF - 2016/03/14, HDFFV-9716) + + - h5dump + + When h5dump was provided with the name of a non-existing file or + when optional arguments were the last option on the command line, + h5dump would segfault. + + Fixed. + + (ADB 2016/02/28 HDFFV-9639, HDFFV-9684) + + - No Error Message for Corrupt Metadata + + The HDF5 Library did not propagate an error when it encountered + corrupt metadata in an HDF5 file. The issue was fixed for a + specific file provided by a user. If you still see the problem, + please contact help@hdfgroup.org + + Fixed. + + (MC - 2016/02/18, HDFFV-9670) + + - Problem Reading Chunked Datasets with a String Datatype Larger + Than the Chunk Size in Bytes + + When the latest file format was used and when a chunked dataset + was created with a datatype with the size bigger than a chunk + size, the data could not be read back. The issue was reported + for chunked datasets with a string datatype and was confirmed + for other datatypes with the sizes bigger than the chunk size in + bytes. + + Fixed. + + (JM - 2016/02/13, HDFFV-9672) + + - Control over the Location of External Files + + Users were unable to specify the locations of external files. + + Two APIs - H5Pget_efile_prefix and H5Pset_efile_prefix - were + added so that users could specify the locations of external files. + + (DER - 2016/02/04, HDFFV-8740) + + + +Issues Addressed in this Release Since alpha0 +============================================= + - h5format_convert + + The h5format_convert tool did not downgrade the version of the + superblock. + + Fixed. The tool now will downgrade the version of the superblock. + + (EIP 2016/01/11) + + - Crashes with multiple threads: invalid pointers + + It was reported that alpha0 crashed when used with multiple + threads. The issue exists in the HDF5 Library versions 1.8 and + 1.9. The problem is related to a shared file pointer used in some + miscellaneous data structures. The thread-safe library exposed + paths in the library where a file pointer became invalid. + + The alpha1 release contains the fixes for the specific use case + as described in HDFFV-9643. We will keep working on identifying + and fixing other paths in the library with similar problems. + + (EIP - 2016/01/15, HDFFV-9643) + + + +Supported Platforms +=================== +The following platforms are supported and have been tested for this release. +They are built with the configure process unless specified otherwise. + + AIX 6.1 xlc/xlc_r 10.1.0.5 + (NASA G-ADA) xlC/xlC_r 10.1.0.5 + xlf90/xlf90_r 12.1.0.6 + + Linux 2.6.32-573.18.1.el6 GNU C (gcc), Fortran (gfortran), C++ (g++) + #1 SMP x86_64 GNU/Linux compilers: + (mayll/platypus) Version 4.4.7 20120313 (Red Hat 4.4.7-16) + Version 4.9.3, Version 5.2.0 + PGI C, Fortran, C++ for 64-bit target on + x86-64; + Version 15.7-0 + Intel(R) C (icc), C++ (icpc), Fortran (icc) + compilers: + Version 15.0.3.187 Build 20150407 + MPICH 3.1.4 compiled with GCC 4.9.3 + + Linux 2.6.32-504.8.1.el6.ppc64 gcc (GCC) 4.4.7 20120313 (Red Hat 4.4.7-11) + #1 SMP ppc64 GNU/Linux g++ (GCC) 4.4.7 20120313 (Red Hat 4.4.7-11) + (ostrich) GNU Fortran (GCC) 4.4.7 20120313 (Red Hat 4.4.7-11) + IBM XL C/C++ V13.1 + IBM XL Fortran V15.1 + + Linux 3.10.0-327.10.1.el7 GNU C (gcc), Fortran (gfortran), C++ (g++) + #1 SMP x86_64 GNU/Linux compilers: + (kituo/moohan) Version 4.8.5 20150623 (Red Hat 4.8.5-4) + Version 4.9.3, Version 5.2.0 + Intel(R) C (icc), C++ (icpc), Fortran (icc) + compilers: + Version 15.0.3.187 Build 20150407 + MPICH 3.1.4 compiled with GCC 4.9.3 + + SunOS 5.11 32- and 64-bit Sun C 5.12 SunOS_sparc + (emu) Sun Fortran 95 8.6 SunOS_sparc + Sun C++ 5.12 SunOS_sparc + + Windows 7 Visual Studio 2012 w/ Intel Fortran 15 (cmake) + Visual Studio 2013 w/ Intel Fortran 15 (cmake) + Visual Studio 2015 w/ Intel Fortran 16 (cmake) + Cygwin(CYGWIN_NT-6.1 2.2.1(0.289/5/3) gcc(4.9.3) compiler and gfortran) + (cmake and autotools) + + Windows 7 x64 Visual Studio 2012 w/ Intel Fortran 15 (cmake) + Visual Studio 2013 w/ Intel Fortran 15 (cmake) + Visual Studio 2015 w/ Intel Fortran 16 (cmake) + + Windows 8.1 Visual Studio 2012 w/ Intel Fortran 15 (cmake) + Visual Studio 2013 w/ Intel Fortran 15 (cmake) + + Windows 8.1 x64 Visual Studio 2012 w/ Intel Fortran 15 (cmake) + Visual Studio 2013 w/ Intel Fortran 15 (cmake) + + Mac OS X Mt. Lion 10.8.5 Apple clang/clang++ version 5.1 from Xcode 5.1 + 64-bit gfortran GNU Fortran (GCC) 4.8.2 + (swallow/kite) Intel icc/icpc/ifort version 15.0.3 + + Mac OS X Mavericks 10.9.5 Apple clang/clang++ version 6.0 from Xcode 6.2.0 + 64-bit gfortran GNU Fortran (GCC) 4.9.2 + (wren/quail) Intel icc/icpc/ifort version 15.0.3 + + Mac OS X Yosemite 10.10.5 Apple clang/clang++ version 6.0 from Xcode 7.0.0 + 64-bit gfortran GNU Fortran (GCC) 4.9.2 + (osx1010dev/osx1010test) Intel icc/icpc/ifort version 15.0.3 + + Mac OS X El Capitan 10.11.3 Apple clang/clang++ version 7.0.2 from Xcode 7.0.2 + 64-bit gfortran GNU Fortran (GCC) 5.2.0 + (osx1010dev/osx1010test) Intel icc/icpc/ifort version 15.0.3 + + + +Tested Configuration Features Summary +===================================== + + In the tables below + y = tested + n = not tested in this release + C = Cluster + W = Workstation + x = not working in this release + dna = does not apply + ( ) = footnote appears below second table + = testing incomplete on this feature or platform + +Platform C F90/ F90 C++ zlib SZIP + parallel F2003 parallel +SunOS 5.11 32-bit n y/y n y y y +SunOS 5.11 64-bit n y/y n y y y +Windows 7 y y/y n y y y +Windows 7 x64 y y/y n y y y +Windows 7 Cygwin n y/y n y y n +Windows 8.1 n y/y n y y y +Windows 8.1 x64 n y/y n y y y +Mac OS X Mountain Lion 10.8.5 64-bit n y/y n y y y +Mac OS X Mavericks 10.9.5 64-bit n y/y n y y y +Mac OS X Yosemeti 10.10.5 64-bit n y/y n y y y +AIX 6.1 32- and 64-bit n y/n n y y y +CentOS 6.7 Linux 2.6.32 x86_64 GNU y y/y y y y y +CentOS 6.7 Linux 2.6.32 x86_64 Intel n y/y n y y y +CentOS 6.7 Linux 2.6.32 x86_64 PGI n y/y n y y y +CentOS 7.1 Linux 3.10.0 x86_64 GNU y y/y y y y y +CentOS 7.1 Linux 3.10.0 x86_64 Intel n y/y n y y y +Linux 2.6.32-431.11.2.el6.ppc64 n y/n n y y y + +Platform Shared Shared Shared Thread- + C libs F90 libs C++ libs safe +SunOS 5.11 32-bit y y y y +SunOS 5.11 64-bit y y y y +Windows 7 y y y y +Windows 7 x64 y y y y +Windows 7 Cygwin n n n y +Windows 8.1 y y y y +Windows 8.1 x64 y y y y +Mac OS X Mountain Lion 10.8.5 64-bit y n y y +Mac OS X Mavericks 10.9.5 64-bit y n y y +Mac OS X Yosemeti 10.10.5 64-bit y n y y +AIX 6.1 32- and 64-bit y n n y +CentOS 6.7 Linux 2.6.32 x86_64 GNU y y y y +CentOS 6.7 Linux 2.6.32 x86_64 Intel y y y y +CentOS 6.7 Linux 2.6.32 x86_64 PGI y y y y +CentOS 7.1 Linux 3.10.0 x86_64 GNU y y y y +CentOS 7.1 Linux 3.10.0 x86_64 Intel y y y y +Linux 2.6.32-431.11.2.el6.ppc64 y y y y + +Compiler versions for each platform are listed in the preceding +"Supported Platforms" table. + + + +More Tested Platforms +===================== +The following platforms are not supported but have been tested for this release. + + Linux 2.6.18-431.11.2.el6 g95 (GCC 4.0.3 (g95 0.94!) + #1 SMP x86_64 GNU/Linux + (platypus) + + Windows 7 Visual Studio 2008 (cmake) + + Windows 7 x64 Visual Studio 2008 (cmake) + + Windows 7 x64 Visual Studio 2010 (cmake) with SWMR using GPFS + + Windows 10 Visual Studio 2013 w/ Intel Fortran 15 (cmake) + + Windows 10 x64 Visual Studio 2013 w/ Intel Fortran 15 (cmake) + + Debian7.5.0 3.2.0-4-amd64 #1 SMP Debian 3.2.51-1 x86_64 GNU/Linux + gcc (Debian 4.7.2-5) 4.7.2 + GNU Fortran (Debian 4.7.2-5) 4.7.2 + (cmake and autotools) + + Fedora20 3.15.3-200.fc20.x86_64 #1 SMP x86_64 x86_64 x86_64 GNU/Linux + gcc (GCC) 4.8.3 20140624 (Red Hat 4.8.3-1) + GNU Fortran (GCC) 4.8.3 20140624 (Red Hat 4.8.3-1) + (cmake and autotools) + + SUSE 13.1 3.11.10-17-desktop #1 SMP PREEMPT x86_64 x86_64 x86_64 GNU/Linux + gcc (SUSE Linux) 4.8.1 + GNU Fortran (SUSE Linux) 4.8.1 + (cmake and autotools) + + Ubuntu 14.04 3.13.0-35-generic #62-Ubuntu SMP x86_64 GNU/Linux + gcc (Ubuntu/Linaro 4.9.1-0ubuntu1) 4.9.1 + GNU Fortran (Ubuntu/Linaro 4.9.1-0ubuntu1) 4.9.1 + (cmake and autotools) + + hopper.nersc.gov PrgEnv-gnu/5.2.40 + gcc (GCC) 4.9.2 20141030 (Cray Inc.) + GNU Fortran (GCC) 4.9.2 20141030 (Cray Inc.) + g++ (GCC) 4.9.2 20141030 (Cray Inc.) + + + +Known Problems and Limitations +============================== +This section contains the list of known problems and limitations introduced +in this release of HDF5. + +Note: this list is not exhaustive of all known issues discovered in HDF5 +software to date. For a list of significant problems and known workarounds +identified in past releases, please refer to: + +https://www.hdfgroup.org/HDF5/release/known_problems/ + +The HDF Group also maintains a JIRA issue-tracking database which is used to +capture all known issues which are too numerous to reasonably list in this +document. The HDF Group is taking steps to make our JIRA issue database +open to the public, and this section will refer to that database in a future +release. In the meantime, please contact help@hdfgroup.org if you come across +an issue not listed here or at the link above, and we will provide any +information about known workarounds that we have or add it to our list of +known issues if it is a new issue. + + - The JUnit-interface test may fail on Solaris platforms. The result of + a test for verifying the content of the error stack to stdout is + in a different order on Solaris then other platforms. Use make -i option + to test beyond the java/test folder. + (ADB - 2016/03/22, HDFFV-9734) + + - The flush/refresh test occasionally fails on OS X platforms. This is + being investigated but no fix or workaround is available at this time. + (DER - 2016/03/22, HDFFV-9731) + + - The VDS/SWMR test will fail with a segmentation fault if the library + is built with --enable-using-memchecker. The is due to a VDS shutdown + procedure freeing a shared resource too early when the memory + checker changes are built. This problem does not arise when the + memory checker changes are not used since the internal library free + lists behave differently. The memory checker configure option should + normally only be used under special circumstances so this should not + affect most users. Users should be aware that the --enable-using-memchecker + + VDS combination may cause a segfault, however, so Valgrind et al. may + have to be used with an HDF5 library built without the feature if this + proves to be a problem. + (DER - 2016/03/21, HDFFV-9732) + + - SWMR feature limitations + The SWMR feature will only work if an HDF5 file under SWMR access resides + on a file system that obeys POSIX write() ordering semantics. Because of + this, SWMR will not work on network file systems such as NFS or SMB/Windows + file shares since those systems do not guarantee write odering. SWMR + regression tests are likely to fail if run on a network file system. SWMR + is currently not tested on Windows though it can be tested manually + (some of the SWMR test programs are built by CMake), and there are no + obvious reasons for it to not work on NTFS or GPFS. + (EIP - 2016/03/20, HDFFV-9733) + + - VDS feature limitation + Currently, the path to a VDS source file is interpreted as relative to the + directory where the executable program runs and not to the HDF5 file with + the VDS dataset unless a full path to the source file is specified during + the mapping. + (EIP - 2016/03/20, HDFFV-9724) + + - When building HDF5 with Java using CMake and specifying Debug for CMAKE_BUILD_TYPE, + there is a missing command argument for the tests of the examples. + + This error can be avoided by not building Java with Debug, HDF5_BUILD_JAVA:BOOL=OFF, + or not building Examples, HDF5_BUILD_EXAMPLES:BOOL=OFF. + (LRK - 2016/03/30, HDFFV-9743) + + - The H5Lexists API changed behavior in HDF5-1.10 when used with a file handle + and root group name ("/"): + + H5Lexists(fileid, "/") + + In HDF5-1.8 it returns false (0) and in HDF5-1.10 it returns true (1). + The documentation will be updated with information regarding this change. + (LRK - 2016/03/30, HDFFV-8746) + diff --git a/release_docs/HISTORY-1_8.txt b/release_docs/HISTORY-1_8.txt new file mode 100644 index 0000000..4465d06 --- /dev/null +++ b/release_docs/HISTORY-1_8.txt @@ -0,0 +1,12344 @@ +HDF5 History +============ + +This file contains development history of HDF5 1.8 branch + +19. Release Information for hdf5-1.8.17 +18. Release Information for hdf5-1.8.16 +17. Release Information for hdf5-1.8.15 +16. Release Information for hdf5-1.8.14 +15. Release Information for hdf5-1.8.13 +14. Release Information for hdf5-1.8.12 +13. Release Information for hdf5-1.8.11 +12. Release Information for hdf5-1.8.10-patch1 +11. Release Information for hdf5-1.8.10 +10. Release Information for hdf5-1.8.9 +09. Release Information for hdf5-1.8.8 +08. Release Information for hdf5-1.8.7 +07. Release Information for hdf5-1.8.6 +06. Release Information for hdf5-1.8.5 +05. Release Information for hdf5-1.8.4 +04. Release Information for hdf5-1.8.3 +03. Release Information for hdf5-1.8.2 +02. Release Information for hdf5-1.8.1 +01. Release Information for hdf5-1.8.0 + +[Search on the string '%%%%' for section breaks of each release.] + +%%%%1.8.17%%%% + + +HDF5 version 1.8.17 released on 2016-05-10 +================================================================================ + +INTRODUCTION +============ + +This document describes the differences between HDF5-1.8.16 and +HDF5-1.8.17-*, and contains information on the platforms tested and +known problems in HDF5-1.8.17-*. +For more details, see the files HISTORY-1_0-1_8_0_rc3.txt +and HISTORY-1_8.txt in the release_docs/ directory of the HDF5 source. + +Links to the HDF5 1.8.17 source code, documentation, and additional materials +can be found on the HDF5 web page at: + + http://www.hdfgroup.org/products/hdf5/ + +The HDF5 1.8.17 release can be obtained from: + + http://www.hdfgroup.org/HDF5/release/obtain5.html + +User documentation for 1.8.17 can be accessed directly at this location: + + http://www.hdfgroup.org/HDF5/doc/ + +New features in the HDF5-1.8.x release series, including brief general +descriptions of some new and modified APIs, are described in the "What's New +in 1.8.0?" document: + + http://www.hdfgroup.org/HDF5/doc/ADGuide/WhatsNew180.html + +All new and modified APIs are listed in detail in the "HDF5 Software Changes +from Release to Release" document, in the section "Release 1.8.17 (current +release) versus Release 1.8.16 + + http://www.hdfgroup.org/HDF5/doc/ADGuide/Changes.html + +If you have any questions or comments, please send them to the HDF Help Desk: + + help@hdfgroup.org + + + +CONTENTS +======== + +- New Features +- Support for New Platforms, Languages, and Compilers +- Bug Fixes since HDF5-1.8.16 +- Supported Platforms +- Supported Configuration Features Summary +- More Tested Platforms +- Known Problems + + + +New Features +============ + + Configuration + ------------- + - Cmakehdf5: Added Ability to Run Multiple Make Commands + + Added option --njobs to specify up to how many jobs to launch during + build (cmake) and testing (ctest). + + (AKC - 2015/12/13, HDFFV-9612) + + - Cmakehdf5: Added Szip Support and Verbose Option + + Added --with-szlib to support the Szip library; and + --enable/disable-verbose to display all CMake process output. + + (AKC - 2015/11/16, HDFFV-8932 and DAILYTEST-195) + + - CMake minimum is now 3.1.0. (ADB - 2015/11/14) + + - Large File System (LFS) Support has Changed in the Autotools + + We assume that fseeko and ftello exist. + + The *64 I/O functions and types are no longer explicitly used. + We now rely on a mapping provided by _FILE_OFFSET_BITS (or its + equivalent). + + _LARGEFILE(64)_SOURCE is no longer exposed via AM_CPPFLAGS. + + (DER - 2016/03/29, HDFFV-9626 and HDFFV-9541) + + + + Library + ------- + - New API Calls for Searching for External Dataset Storage + + API calls that determine the search path for dataset external + storage were added. H5Pset/get_efile_prefix() API calls were added + to the library. These functions give control over the search path + for dataset external storage that has been configured with + H5Pset_external(). + + Additionally, the HDF5_EXTFILE_PREFIX environment variable can be + used to control the search path. + + (DER - 2016/04/20, HDFFV-8740) + + + + Parallel Library + ---------------- + - None + + + + Tools + ----- + - None + + + + High-Level APIs + --------------- + + C Packet Table API + ------------------ + - Replacement of a Public Function with H5PTcreate + + The existing function H5PTcreate_fl limits applications so they + can use the deflate compression only. The public function + H5PTcreate has been added to replace H5PTcreate_fl. H5PTcreate + takes a property list identifier to provide flexibility on + creation properties. This also removes the following warning: + "deprecated conversion from string constant to "char*" + [-Wwrite-strings]". + + (BMR - 2016/04/25, HDFFV-9708, HDFFV-8615) + + - New Public Functions: H5PTget_dataset and H5PTget_type + + Two accessor functions have been added. H5PTget_dataset returns + the identifier of the dataset associated with the packet table, + and H5PTget_type returns the identifier of the datatype used by + the packet table. + + (BMR - 2016/04/25, HDFFV-8623 patch 3) + + - Regarding #ifdef VLPT_REMOVED + + The #ifdef VLPT_REMOVED blocks have been removed from the packet + table (PT) library source except for the following functions: + + H5PTis_varlen() has been made available again + + H5PTfree_vlen_readbuff() is now H5PTfree_vlen_buff() + + (BMR - 2016/04/25, HDFFV-442) + + C++ Packet Table API + -------------------- + - New Constructor in FL_PacketTable + + An overloaded constructor has been added to FL_PacketTable and + takes a property list identifier to provide flexibility on + creation properties such as compression. + + FL_PacketTable(hid_t fileID, const char* name, hid_t dtypeID, + hsize_t chunkSize = 0, hid_t plistID = H5P_DEFAULT) + + (BMR - 2016/04/25, HDFFV-8623 patch 5) + + - New Member Functions in PacketTable + + Two accessor wrappers were added to class PacketTable. + + PacketTable::GetDataset() returns the identifier of the dataset + associated with the packet table, and PacketTable::GetDatatype() + returns the identifier of the datatype that the packet table uses. + + (BMR - 2016/04/25, HDFFV-8623 patch 4) + + - New Member Functions with "char*" as an Argument + + Overloaded functions were added to provide the "const char*" + argument; the existing version will be deprecated in future + releases. This also removes the following warning: + "deprecated conversion from string constant to "char*" + [-Wwrite-strings]". + + (BMR - 2016/04/25, HDFFV-8623 patch 1, HDFFV-8615) + + - Regarding #ifdef VLPT_REMOVED + + The #ifdef VLPT_REMOVED blocks have been removed from the packet + table library source code except for the following functions: + + VL_PacketTable::IsVariableLength() was moved to PacketTable + + VL_PacketTable::FreeReadBuff() is now PacketTable::FreeBuff() + + (BMR - 2016/04/25, HDFFV-442) + + + + Fortran API + ----------- + - None + + + + C++ API + ------- + - New Member Function in DSetCreatPropList + + DSetCreatPropList::setNbit() was added to setup N-bit compression for + a dataset. + + (BMR - 2016/04/25, HDFFV-8623 patch 7) + + - New Overloaded "const" Member Functions in ArrayType + + The two following functions were added: + ArrayType::getArrayNDims() const + ArrayType::getArrayDims() const + to provide const version, and the non-const version was marked + deprecated. In-memory array information, ArrayType::rank and + ArrayType::dimensions, were removed. This is an implementation + detail and should not affect applications. + + (BMR, 2016/04/25, HDFFV-9725) + + - New member function added + + The assignment operator ArrayType::operator= is added because ArrayType + has pointer data members. + + (BMR, 2016/03/07, HDFFV-9562) + + +Support for New Platforms, Languages, and Compilers +=================================================== + - Mac OS X El Capitan 10.11.4 with compilers Apple clang/clang++ + version 7.3.0 from Xcode 7.3, gfortran GNU Fortran (GCC) 5.2.0 + and Intel icc/icpc/ifort version 16.0.2 + + + +Bug Fixes since HDF5-1.8.16 +=========================== + + Configuration + ------------- + - Updated Linux Language Level Flags to Match the Autotools. Removed + Linux-specific Flags from OS X. + + An addition to the flags simply being out of sync with the Autotools, + the Linux flags were used on OS X builds which led to symbols not being + found. Although this was non-fatal and compilation continued (implicit + definitions were used by the compiler and the symbols resolved at link + time), a large number of warnings were raised. + + Linux changes: + + * CHANGED: _POSIX_C_SOURCE (from 199605 to 200112L) + * ADDED: _GNU_SOURCE + * REMOVED: _BSD_SOURCE + * REMOVED: _DEFAULT_SOURCE + + (DER - 2015/12/08, HDFFV-9627) + + - The --enable-clear-file-buffers configure Option was Non-functional + so the Feature was Always Enabled (its default value). + + Regardless of the configure flag, the setting was always enabled when + the Autotools were used to configure HDF5. This was due to the "no" + option being processed after the "*" option in configure.ac so "*" + matched first. CMake was unaffected. + + The option now works correctly. + + NOTE that builders are always advised to leave this option enabled. + When disabled, buffers that are written to disk may contain the + memory's previous contents, which may include secure information. + The performance overhead of the feature (a single memset call per + allocation) is minimal. + + (DER - 2016/02/03, HDFFV-9676) + + - Added a patch to remove '"'s from arguments for MPI compilers that + were causing errors compiling H5lib_settings.c with SGI MPT. + + (LRK - 2016/04/20, HDFFV-9439) + + Library + ------- + - Fixed shared file pointer problem which caused a crash when running a + program provided by a user. + + (VC - 2016/04/01, HDFFV-9469) + + - Fixed some format string warnings that prevent compiling with + -Werror=format-security on gcc. + + These only appeared in error messages and would not cause problems + under normal operation. + + (DER - 2016/01/13, HDFFV-9640) + + - Fixed a library segmentation fault when accessing a corrupted + file provided by a user. + + (MSC - 2016/02/19, HDFFV-9670) + + + + Parallel Library + ---------------- + - None + + + + Performance + ------------- + - None + + + + Tools + ----- + - h5dump: Sub-setting Fixed for Dimensions Greater than Two + + When a dataset has more than two dimensions, sub-setting would + incorrectly calculate the data that needed to be displayed. + Added in block and stride calculations that account for dimensions + greater than two. NOTE: lines that have line breaks inserted + because of display length calculations may have index info that + is incorrect until the next dimension break. + + (ADB - 2016/03/07, HDFFV-9698) + + - h5dump: Issue with Argument Segmentation Fault + + When an argument with an optional value was at the end of the command + line with a value, h5dump would crash. Reworked check for remaining + arguments. + + (ADB - 2016/03/07, HDFFV-9570, HDFFV-9684) + + - h5dump: Issue with Default Fill Value + + Added all default cases of fill value to the display of fill value. + + (ADB -, 2016/03/07, HDFFV-9241) + + - h5dump: Clarified Help + + Clarified usage of -O F option in h5dump utility help. + + (ADB - 2016/03/07, HDFFV-9066) + + - h5dump: Issue with Double Free Fault + + Added a check for filename not null before calling free(). + + (ADB - 2016/01/27, HDFFV-9639) + + - VS2015 Release Changed how Timezone was Handled + + Created a function, HDget_timezone, in H5system.c. Replaced + timezone variable usage with function call. + + (ADB - 2015/11/02, HDFFV-9550) + + + + Fortran API + ----------- + - None + + + + C++ API + ------- + - Removal of Obsolete Methods + + The overloaded methods which had parameters that should be const + but were not have been removed. + + (BMR - 2016/01/13, HDFFV-9789) + + + + High-Level APIs: + --------------- + - Fixed Memory Leak in Packet Table API + + Applied user's patch to fix memory leak in the creation of a + packet table. + + (BMR - 2016/04/25, HDFFV-9700) + + + + Fortran High-Level APIs: + ------------------------ + - None + + + + Testing + ------- + - None + + + +Supported Platforms +=================== +The following platforms are supported and have been tested for this release. +They are built with the configure process unless specified otherwise. + + AIX 6.1 xlc/xlc_r 10.1.0.5 + (NASA G-ADA) xlC/xlC_r 10.1.0.5 + xlf90/xlf90_r 12.1.0.6 + + Linux 2.6.32-573.22.1.el6 GNU C (gcc), Fortran (gfortran), C++ (g++) + #1 SMP x86_64 GNU/Linux compilers: + (platypus) Version 4.4.7 20120313 + Version 4.9.3, Version 5.2.0 + PGI C, Fortran, C++ for 64-bit target on + x86-64; + Version 15.7-0 + Intel(R) C (icc), C++ (icpc), Fortran (icc) + compilers: + Version 15.0.3.187 Build 20150407 + MPICH 3.1.4 compiled with GCC 4.9.3 + + Linux 2.6.32-504.8.1.el6.ppc64 gcc (GCC) 4.4.7 20120313 (Red Hat 4.4.7-16) + #1 SMP ppc64 GNU/Linux g++ (GCC) 4.4.7 20120313 (Red Hat 4.4.7-16) + (ostrich) GNU Fortran (GCC) 4.4.7 20120313 (Red Hat 4.4.7-16) + IBM XL C/C++ V13.1 + IBM XL Fortran V15.1 + + Linux 3.10.0-229.14.1.el7 GNU C (gcc), Fortran (gfortran), C++ (g++) + #1 SMP x86_64 GNU/Linux compilers: + (kituo/moohan) Version 4.8.5 20150623 (Red Hat 4.8.5-4) + Version 5.2.0 + Intel(R) C (icc), C++ (icpc), Fortran (icc) + compilers: + Version 15.0.3.187 Build 20150407 + MPICH 3.1.4 compiled with GCC 4.9.3 + + SunOS 5.11 32- and 64-bit Sun C 5.12 SunOS_sparc + (emu) Sun Fortran 95 8.6 SunOS_sparc + Sun C++ 5.12 SunOS_sparc + + Windows 7 Visual Studio 2012 w/ Intel Fortran 15 (cmake) + Visual Studio 2013 w/ Intel Fortran 15 (cmake) + Visual Studio 2015 (cmake) + Cygwin(CYGWIN_NT-6.1 2.2.1(0.289/5/3) gcc(4.9.3) compiler and gfortran) + (cmake and autotools) + + Windows 7 x64 Visual Studio 2012 w/ Intel Fortran 15 (cmake) + Visual Studio 2013 w/ Intel Fortran 15 (cmake) + Visual Studio 2015 (cmake) + + Windows 8.1 Visual Studio 2012 w/ Intel Fortran 15 (cmake) + Visual Studio 2013 w/ Intel Fortran 15 (cmake) + + Windows 8.1 x64 Visual Studio 2012 w/ Intel Fortran 15 (cmake) + Visual Studio 2013 w/ Intel Fortran 15 (cmake) + + Mac OS X Mt. Lion 10.8.5 Apple clang/clang++ version 5.1 from Xcode 5.1 + 64-bit gfortran GNU Fortran (GCC) 4.8.2 + (swallow/kite) Intel icc/icpc/ifort version 15.0.3 + + Mac OS X Mavericks 10.9.5 Apple clang/clang++ version 6.0 from Xcode 6.2 + 64-bit gfortran GNU Fortran (GCC) 4.9.2 + (wren/quail) Intel icc/icpc/ifort version 15.0.3 + + Mac OS X Yosemite 10.10.5 Apple clang/clang++ version 6.1 from Xcode 7.0 + 64-bit gfortran GNU Fortran (GCC) 4.9.2 + (osx1010dev/osx1010test) Intel icc/icpc/ifort version 15.0.3 + + Mac OS X El Capitan 10.11.4 Apple clang/clang++ version 7.3.0 from Xcode 7.3 + 64-bit gfortran GNU Fortran (GCC) 5.2.0 + (osx1011dev/ox1011test) Intel icc/icpc/ifort version 16.0.2 + + +Tested Configuration Features Summary +===================================== + + In the tables below + y = tested + n = not tested in this release + C = Cluster + W = Workstation + x = not working in this release + dna = does not apply + ( ) = footnote appears below second table + = testing incomplete on this feature or platform + +Platform C F90/ F90 C++ zlib SZIP + parallel F2003 parallel +SunOS 5.11 32-bit n y/y n y y y +SunOS 5.11 64-bit n y/y n y y y +Windows 7 y y/y n y y y +Windows 7 x64 y y/y n y y y +Windows 7 Cygwin n y/y n y y n +Windows 8.1 n y/y n y y y +Windows 8.1 x64 n y/y n y y y +Mac OS X Mountain Lion 10.8.5 64-bit n y/y n y y y +Mac OS X Mavericks 10.9.5 64-bit n y/y n y y y +Mac OS X Yosemeti 10.10.5 64-bit n y/y n y y y +AIX 6.1 32- and 64-bit n y/n n y y y +CentOS 6.7 Linux 2.6.32 x86_64 GNU y y/y y y y y +CentOS 6.7 Linux 2.6.32 x86_64 Intel n y/y n y y y +CentOS 6.7 Linux 2.6.32 x86_64 PGI n y/y n y y y +CentOS 7.1 Linux 3.10.0 x86_64 GNU y y/y y y y y +CentOS 7.1 Linux 3.10.0 x86_64 Intel n y/y n y y y +Linux 2.6.32-431.11.2.el6.ppc64 n y/n n y y y + +Platform Shared Shared Shared Thread- + C libs F90 libs C++ libs safe +SunOS 5.11 32-bit y y y y +SunOS 5.11 64-bit y y y y +Windows 7 y y y y +Windows 7 x64 y y y y +Windows 7 Cygwin n n n y +Windows 8.1 y y y y +Windows 8.1 x64 y y y y +Mac OS X Mountain Lion 10.8.5 64-bit y n y y +Mac OS X Mavericks 10.9.5 64-bit y n y y +Mac OS X Yosemeti 10.10.5 64-bit y n y y +AIX 6.1 32- and 64-bit y n n y +CentOS 6.7 Linux 2.6.32 x86_64 GNU y y y y +CentOS 6.7 Linux 2.6.32 x86_64 Intel y y y y +CentOS 6.7 Linux 2.6.32 x86_64 PGI y y y y +CentOS 7.1 Linux 3.10.0 x86_64 GNU y y y y +CentOS 7.1 Linux 3.10.0 x86_64 Intel y y y y +Linux 2.6.32-431.11.2.el6.ppc64 y y y y + +Compiler versions for each platform are listed in the preceding +"Supported Platforms" table. + + +More Tested Platforms +===================== +The following platforms are not supported but have been tested for this release. + + Linux 2.6.18-431.11.2.el6 g95 (GCC 4.0.3 (g95 0.94!) + #1 SMP x86_64 GNU/Linux + (platypus) + + Windows 7 Visual Studio 2008 (cmake) + + Windows 7 x64 Visual Studio 2008 (cmake) + + Windows 10 Visual Studio 2013 w/ Intel Fortran 15 (cmake) + + Windows 10 x64 Visual Studio 2013 w/ Intel Fortran 15 (cmake) + + Debian7.5.0 3.2.0-4-amd64 #1 SMP Debian 3.2.51-1 x86_64 GNU/Linux + gcc (Debian 4.7.2-5) 4.7.2 + GNU Fortran (Debian 4.7.2-5) 4.7.2 + (cmake and autotools) + + Fedora20 3.15.3-200.fc20.x86_64 #1 SMP x86_64 x86_64 x86_64 GNU/Linux + gcc (GCC) 4.8.3 20140624 (Red Hat 4.8.3-1) + GNU Fortran (GCC) 4.8.3 20140624 (Red Hat 4.8.3-1) + (cmake and autotools) + + SUSE 13.1 3.11.10-17-desktop #1 SMP PREEMPT x86_64 x86_64 x86_64 GNU/Linux + gcc (SUSE Linux) 4.8.1 + GNU Fortran (SUSE Linux) 4.8.1 + (cmake and autotools) + + Ubuntu 14.04 3.13.0-35-generic #62-Ubuntu SMP x86_64 GNU/Linux + gcc (Ubuntu/Linaro 4.9.1-0ubuntu1) 4.9.1 + GNU Fortran (Ubuntu/Linaro 4.9.1-0ubuntu1) 4.9.1 + (cmake and autotools) + + hopper.nersc.gov PrgEnv-gnu/5.2.40 + gcc (GCC) 4.9.2 20141030 (Cray Inc.) + GNU Fortran (GCC) 4.9.2 20141030 (Cray Inc.) + g++ (GCC) 4.9.2 20141030 (Cray Inc.) + + +Known Problems +============== +* On windows platforms in debug configurations, the VFD flush1 tests will fail + with the split and multi VFD drivers. These tests will display a modal debug + dialog which must be answered or wait for the test timeout to expire. + (ADB - 2014/06/23 - HDFFV-8851) + +* CLANG compiler with the options -fcatch-undefined-behavior and -ftrapv + catches some undefined behavior in the alignment algorithm of the macro DETECT_I + in H5detect.c (Issue 8147). Since the algorithm is trying to detect the alignment + of integers, ideally the flag -fcatch-undefined-behavior shouldn't to be used for + H5detect.c. In the future, we can separate flags for H5detect.c from the rest of + the library. (SLU - 2013/10/16) + +* Make provided by Solaris fails in "make check". Solaris users should use + gmake to build and install the HDF5 software. (AKC - 2013/10/08 - HDFFV-8534) + +* The C++ and FORTRAN bindings are not currently working on FreeBSD with the + native release 8.2 compilers (4.2.1), but are working with gcc 4.6 from the + ports (and probably gcc releases after that). + (QAK - 2012/10/19) + +* The following h5dump test case fails in BG/P machines (and potentially other + machines that use a command script to launch executables): + + h5dump --no-compact-subset -d "AHFINDERDIRECT::ah_centroid_t[0] it=0 tl=0" + tno-subset.h5 + + This is due to the embedded spaces in the dataset name being interpreted + by the command script launcher as meta-characters, thus passing three + arguments to h5dump's -d flag. The command passes if run by hand, just + not via the test script. + (AKC - 2012/05/03) + +* The STDIO VFD does not work on some architectures, possibly due to 32/64 + bit or large file issues. The basic STDIO VFD test is known to fail on + 64-bit SunOS 5.10 on SPARC when built with -m64 and 32-bit OS X/Darwin + 10.7.0. The STDIO VFD test has been disabled while we investigate and + a fix should appear in a future release. + (DER - 2011/10/14 - HDFFV-8235) + +* h5diff can report inconsistent results when comparing datasets of enum type + that contain invalid values. This is due to how enum types are handled in + the library and will be addressed in a future release. + (DER - 2011/10/14 - HDFFV-7527) + +* The links test can fail under the stdio VFD due to some issues with external + links. This will be investigated and fixed in a future release. + (DER - 2011/10/14 - HDFFV-7768) + +* After the shared library support was fixed for some bugs, it was discovered + that "make prefix=XXX install" no longer works for shared libraries. It + still works correctly for static libraries. Therefore, if you want to + install the HDF5 shared libraries in a location such as /usr/local/hdf5, + you need to specify the location via the --prefix option during configure + time. E.g, ./configure --prefix=/usr/local/hdf5 ... + (AKC - 2011/05/07 - HDFFV-7583) + +* The parallel test, t_shapesame, in testpar/, may run for a long time and may + be terminated by the alarm signal. If that happens, one can increase the + alarm seconds (default is 1200 seconds = 20 minutes) by setting the + environment variable, $HDF5_ALARM_SECONDS, to a larger value such as 3600 + (60 minutes). Note that the t_shapesame test may fail in some systems + (see the "While working on the 1.8.6 release..." problem below). If + it does, it will waste more time if $HDF5_ALARM_SECONDS is set + to a larger value. + (AKC - 2011/05/07) + +* Shared Fortran libraries are not quite working on AIX. While they are + generated when --enable-shared is specified, the fortran and hl/fortran + tests fail. the issue. HL and C++ shared libraries should now be + working as intended, however. + (MAM - 2011/04/20) + +* While working on the 1.8.6 release of HDF5, a bug was discovered that can + occur when reading from a dataset in parallel shortly after it has been + written to collectively. The issue was exposed by a new test in the parallel + HDF5 test suite, but had existed before that. We believe the problem lies with + certain MPI implementations and/or file systems. + + We have provided a pure MPI test program, as well as a standalone HDF5 + program, that can be used to determine if this is an issue on your system. + They should be run across multiple nodes with a varying number of processes. + These programs can be found at: + http://www.hdfgroup.org/ftp/HDF5/examples/known_problems/ + (NAF - 2011/01/19) + +* All the VFL drivers aren't backward compatible. In H5FDpublic.h, the + structure H5FD_class_t changed in 1.8. There is new parameter added to + get_eoa and set_eoa callback functions. A new callback function + get_type_map was added in. The public function H5FDrealloc was taken + out in 1.8. The problem only happens when users define their own driver + for 1.6 and try to plug in 1.8 library. Because there's only one user + complaining about it, we (Elena, Quincey, and I) decided to leave it as + it is (see bug report #1279). Quincey will make a plan for 1.10. + (SLU - 2010/02/02) + +* The --enable-static-exec configure flag will only statically link libraries + if the static version of that library is present. If only the shared version + of a library exists (i.e., most system libraries on Solaris, AIX, and Mac, + for example, only have shared versions), the flag should still result in a + successful compilation, but note that the installed executables will not be + fully static. Thus, the only guarantee on these systems is that the + executable is statically linked with just the HDF5 library. + (MAM - 2009/11/04) + +* A dataset created or rewritten with a v1.6.3 library or after cannot be read + with the v1.6.2 library or before when the Fletcher32 EDC filter is enabled. + There was a bug in the calculation of the Fletcher32 checksum in the + library before v1.6.3; the checksum value was not consistent between big- + endian and little-endian systems. This bug was fixed in Release 1.6.3. + However, after fixing the bug, the checksum value was no longer the same as + before on little-endian system. Library releases after 1.6.4 can still read + datasets created or rewritten with an HDF5 library of v1.6.2 or before. + (SLU - 2005/06/30) + + +%%%%1.8.16%%%% + + +HDF5 version 1.8.16 released on 2015-11-10 +================================================================================ + +INTRODUCTION +============ + +This document describes the differences between HDF5-1.8.15 and +HDF5-1.8.16, and contains information on the platforms tested and +known problems in HDF5-1.8.16. +For more details, see the files HISTORY-1_0-1_8_0_rc3.txt +and HISTORY-1_8.txt in the release_docs/ directory of the HDF5 source. + +Links to the HDF5 1.8.16 source code, documentation, and additional materials +can be found on the HDF5 web page at: + + http://www.hdfgroup.org/products/hdf5/ + +The HDF5 1.8.16 release can be obtained from: + + http://www.hdfgroup.org/HDF5/release/obtain5.html + +User documentation for 1.8.16 can be accessed directly at this location: + + http://www.hdfgroup.org/HDF5/doc/ + +New features in the HDF5-1.8.x release series, including brief general +descriptions of some new and modified APIs, are described in the "What's New +in 1.8.0?" document: + + http://www.hdfgroup.org/HDF5/doc/ADGuide/WhatsNew180.html + +All new and modified APIs are listed in detail in the "HDF5 Software Changes +from Release to Release" document, in the section "Release 1.8.16 (current +release) versus Release 1.8.15": + + http://www.hdfgroup.org/HDF5/doc/ADGuide/Changes.html + +If you have any questions or comments, please send them to the HDF Help Desk: + + help@hdfgroup.org + + +CONTENTS +======== + +- New Features +- Support for New Platforms, Languages, and Compilers +- Bug Fixes since HDF5-1.8.15 +- Supported Platforms +- Supported Configuration Features Summary +- More Tested Platforms +- Known Problems + +New Features +============ + + Configuration and Build + ------------- + - The thread-safety + high-level library combination has been marked + as "unsupported" in the Autotools + + The global lock used by the thread-safety feature has never been + raised to the high-level library level, making it possible that + the library state could change if a context switch were to occur in + a high-level library call. Because of this, the combination of + thread-safety and high-level library is officially unsupported by + The HDF Group. + + In the past, although this combination has never been supported, this + was not enforced by the build systems. These changes will cause an + Autotools configure step to fail if --enable-threadsafe and + --enable-hl are combined unless additional options are specified. + Since the high-level library is built by default, this means that + these extra configuration options will need to be used any time + --enable-threadsafe is selected. + + To build with --enable-threadsafe, either: + + 1) Use --disable-hl to disable the high-level library (recommended) + + 2) Use --enable-unsupported to build the high-level library with + the thread-safety feature. + + (DER - 2015/09/10 HDFFV-8719) + + - Using CMake now builds both static and shared libraries. + + The CMake files have been updated to build both static and shared + libraries, with tools only built statically. The packaging of the + libraries and tools will include cmake-config files that allows + projects to choose either shared or static (default) libraries + to be found with the find_package command using the COMPONENTS + keyword and a list of components. The imported libraries will + include any interface specific settings and dependent libraries. + + The default setting for BUILD_SHARED_LIBS has changed from OFF + to ON, which builds both static and shared libraries. The static + libraries are always built because of tools requirements. + + (ADB - 2015/08/24 HDFFV-5881) + + - Inline functions now correctly annotated with Autotools builds. + + The method used to detect the appropriate inline markup scheme was + nonfunctional in Autotools builds. The Autotools have been modified + to correctly detect the compiler's inline markup symbol and apply it + to the source. Note that only a very small number of internal + functions are marked inline so this was not a very big change or + likely to significantly affect performance. + + As a part of this change, the H5_inline symbol no longer appears in + H5pubconf.h. + + (DER - 2015/08/13 HDFFV-9119, HDFFV-9421) + + - Removed obsolete/unmaintained files from config/ + + Several files were removed from the config directory. These files + represent old operating systems, were no longer necessary, and/or + were no longer maintained. configure.ac was updated to reflect the + removed files. + + Removed: + + craynv + dec-flags + hpux11.23 + ia64-linux-gnu + nec-superux14.1 + sv1-cray + x86_64-redstorm-linux-gnu + powerpc-ibm-aix5.x + + As a part of this work, a few lines that deal with locating the + sys/fpu.h header on SGI machines and some OSF/1 configure lines + were also removed. The Solaris config was also renamed to not have + a version number since the version number was ignored by configure + as it applies to all Solaris versions. + + (DER - 2015/09/04 HDFFV-9116) + + - Removed the FP_TO_INTEGER_OVERFLOW_WORKS macro/defines from the library + + This was for working around bugs in the Cray X1 compiler, which is no + longer supported. + + (DER - 2015/09/09 HDFFV-9191) + + - Removed the H5_SW_ULONG_TO_FP_BOTTOM_BIT_WORKS and + H5_FP_TO_ULLONG_BOTTOM_BIT_WORKS symbols and associated code. + + H5_SW_ULONG_TO_FP_BOTTOM_BIT_WORKS was a work-around on old 64-bit + SGI and Solaris systems. + + H5_FP_TO_ULLONG_BOTTOM_BIT_WORKS was a work-around for old PGI + compilers on Linux. + + Neither of these were used in any current library code and only appeared + in the dt_arith test. + + (DER - 2015/09/09 HDFFV-9187) + + - Removed CONVERT_DENORMAL_FLOAT symbol and associated code from the + library. + + This was only set in configure files for Cray and NEC computers. These + config files no longer exist so there is no effect on currently + supported platforms. + + (DER - 2015/09/09 HDFFV-9188) + + - Removed _BSD_SOURCE and _DEFAULT_SOURCE from configure.ac + + These are old BSD-compatibility symbols that are no longer needed by + the library. + + (DER - 2015/09/10 HDFFV-9079) + + - Removed HW_FP_TO_LLONG_NOT_WORKS symbol and associated code from the + library. + + This was part of a work-around for the VS.NET 2003 compiler, which is + no longer supported. + + (DER - 2015/09/10 HDFFV-9189) + + - Removed the BAD_LOG2_CODE_GENERATED symbol and associated code from the + library. + + This was an IRIX work-around. + + (DER - 2015/09/11 HDFFV-9195) + + - Decoupled shared object version numbers for wrapper libraries from the + shared object version number for the HDF5 library. These will be + maintained on an individual basis according to the interface changes + specific to these wrapper libraries. + + For HDF5 1.8.16 the shared object version numbers were changed from + 10.0.1 to 10.1.0 for the HDF5 library due to added APIs. For the C++ + wrapper library they were changed from 10.0.1 to 11.0.0 due to changes + in existing APIs. For all other wrapper libraries the versions were + changed from 10.0.1 to 10.0.2 because while the APIs had no changes + there have been changes in code that did not result in changes to their + interfaces. + + (LRK - 2015/10/28) + + Library + ------- + + - H5F_ACC_DEBUG flag for H5Fopen/create: functionality removed + + The symbol was used to emit some extra debugging information + for HDF Group developers in the multi VFD. The underlying + functionality has been removed due to disuse. The symbol + remains defined since it was visible in H5Fpublic.h but it + has been set to zero and has no effect anywhere in the library. + + (DER - 2015-05-02, HDFFV-1074) + + - New public API call: H5is_library_threadsafe() + + This API call indicates if the library was built with thread- + safety enabled. + + (DER - 2015-09-01, HDFFV-9496) + + Parallel Library + ---------------- + - None + + Tools + ----- + - None + + High-Level APIs + --------------- + - None + + Fortran API + ----------- + - None + + + C++ API + ------- + - Class H5::ObjCreatPropList is added for the object creation property + list class. + + Class H5::ObjCreatPropList is derived from H5::PropList and is a + baseclass of H5::DSetCreatPropList. Additional property list classes + will be derived from H5::ObjCreatPropList when they are added to the + library in future releases. + + (BMR, 2015/10/13, Part of HDFFV-9169) + + - New Wrappers for C Functions H5P[s/g]et_attr_phase_change and + H5P[s/g]et_attr_creation_order. + + Wrappers were added to class H5::ObjCreatPropList for the C Functions + H5Pset_attr_phase_change: H5::ObjCreatPropList::setAttrPhaseChange + H5Pget_attr_phase_change: H5::ObjCreatPropList::getAttrPhaseChange + H5Pset_attr_creation_order: H5::ObjCreatPropList::setAttrCrtOrder + H5Pget_attr_creation_order: H5::ObjCreatPropList::getAttrCrtOrder + + (BMR, 2015/10/13, Part of HDFFV-9167 and HDFFV-9169) + + +Support for New Platforms, Languages, and Compilers +=================================================== + - Added VS2015 with Intel Fortran 16 to supported Windows 7 platforms + + +Bug Fixes since HDF5-1.8.15 +=========================== + + Configuration + ------------- + + - CMake test for long long printf format improved + + The CMake configuration test for determining the printf format string + for printing a long long integer was fixed. The test would crash + when executed with VS2015. + + (ADB - 2015-10-21 HDFFV-9488) + + Library + ------- + - VS2015 removed global variable timezone + + The usage of the global variable timezone was modified for VS2015 by + adding an alias to Windows builds. + + (ADB - 2015-10-23 HDFFV-9550) + + - Fix potential error in H5Iclear_type + + If the ID type's close callback could close another ID of the same type, + H5Iclear_type could occasionally run into problems due to the inner + workings of the skip list package. This could potentially cause an + error on library shutdown without calling H5Iclear_type directly. This + issue has been fixed. + + (NAF - 2015-08-12) + + - Fix uninitialized memory in dataspace selection code + + When creating a dataspace with H5Screate and setting the extent with + H5Sextent_copy, the selection offset was not initialized, potentially + causing invalid I/O. There may be other cases where this happened. + Modified the library to always initialize the offset. + + (NAF - 2015-09-08) + + - Truncate file in H5Fflush() if EOA != EOF to avoid file + corruption in certain scenarios + + In the following scenario, the resulting HDF5 file would be + incorrectly corrupted because the truncate operation + was at some point wrongly moved out of the flush operation: + - Create a new file with a single dataset. + - Write parts of the dataset (make sure that some values at + the end of the dataset are not initialized). + - Flush the file. + - Crash the program. + - Try to open the file with h5dump or h5debug, but the + resulting file is corrupted. + + (MSC - 2015-06-15 HDFFV-9418) + + + Parallel Library + ---------------- + - + (XYZ - YYYY/MM/DD HDFFV-####) + + Performance + ------------- + - None + + Tools + ----- + - VS2015 changed the default format for printing of exponents + + VS2015 default format for exponents changed with the elimination + of the leading '0'. CMake now tests for the VS2015 compiler and + adjusts which reference files are used by tests. + + (ADB - 2015-10-23 HDFFV-9550) + + - Fixed h5repack with user-defined filters + + h5repack would throw a buffer overrun exception on Windows when + parsing a user-defined filter ID of 5 digits. A local variable in + the parse routine was not of sufficient size. + + (ADB - 2015/09/01 HDFFV-9515) + + Fortran API + ------------ + - None + + + C++ API + ------ + - Removed memory leaks + + The static global constant objects were changed to constant references + referencing dynamically allocated objects. This ensures that the clean-up + process in the C++ library occurs before the termination of the C library + and prevents memory leaks because the previous global constants were not + properly deleted before the C library termination. + + (BMR, 2015/10/13, HDFFV-9529) + + - Fixed the problem about identifiers being closed prematurely. + + The C++ library needs to increment the ID's reference counter when it is + duplicated in the form of C++ objects, but not when the ID is obtained + from a C function. With this approach, both problems, prematurely + closing ID's and memory leaks due to ID's not being closed, should be + eliminated. + + (BMR, 2015/10/15, HDFFV-7947) + + + High-Level APIs: + ------ + - None + + + Fortran High-Level APIs: + ------------------------ + - None + + + Testing + ------- + - None + + +Supported Platforms +=================== +The following platforms are supported and have been tested for this release. +They are built with the configure process unless specified otherwise. + + AIX 6.1 xlc/xlc_r 10.1.0.5 + (NASA G-ADA) xlC/xlC_r 10.1.0.5 + xlf90/xlf90_r 12.1.0.6 + + Linux 2.6.32-573.3.1.el6 GNU C (gcc), Fortran (gfortran), C++ (g++) + #1 SMP x86_64 GNU/Linux compilers: + (platypus) Version 4.4.7 20120313 + Version 4.8.4, Version 5.2.0 + PGI C, Fortran, C++ for 64-bit target on + x86-64; + Version 15.7-0 + Intel(R) C (icc), C++ (icpc), Fortran (icc) + compilers: + Version 15.0.3.187 Build 20150407 + MPICH 3.1.4 compiled with GCC 4.9.3 + + Linux 2.6.32-504.8.1.el6.ppc64 gcc (GCC) 4.4.7 20120313 (Red Hat 4.4.7-11) + #1 SMP ppc64 GNU/Linux g++ (GCC) 4.4.7 20120313 (Red Hat 4.4.7-11) + (ostrich) GNU Fortran (GCC) 4.4.7 20120313 (Red Hat 4.4.7-11) + IBM XL C/C++ V13.1 + IBM XL Fortran V15.1 + + Linux 3.10.0-229.14.1.el7 GNU C (gcc), Fortran (gfortran), C++ (g++) + #1 SMP x86_64 GNU/Linux compilers: + (kituo/moohan) Version 4.8.3 20140911 (Red Hat 4.8.3-9) + Version 5.2.0 + Intel(R) C (icc), C++ (icpc), Fortran (icc) + compilers: + Version 15.0.3.187 Build 20150407 + MPICH 3.1.4 compiled with GCC 4.9.3 + + SunOS 5.11 32- and 64-bit Sun C 5.12 SunOS_sparc + (emu) Sun Fortran 95 8.6 SunOS_sparc + Sun C++ 5.12 SunOS_sparc + + Windows 7 Visual Studio 2012 w/ Intel Fortran 15 (cmake) + Visual Studio 2013 w/ Intel Fortran 15 (cmake) + Visual Studio 2015 w/ Intel Fortran 16 (cmake) + Cygwin(CYGWIN_NT-6.1 2.2.1(0.289/5/3) gcc(4.9.3) compiler and gfortran) + (cmake and autotools) + + Windows 7 x64 Visual Studio 2012 w/ Intel Fortran 15 (cmake) + Visual Studio 2013 w/ Intel Fortran 15 (cmake) + Visual Studio 2015 w/ Intel Fortran 16 (cmake) + + Windows 8.1 Visual Studio 2012 w/ Intel Fortran 15 (cmake) + Visual Studio 2013 w/ Intel Fortran 15 (cmake) + + Windows 8.1 x64 Visual Studio 2012 w/ Intel Fortran 15 (cmake) + Visual Studio 2013 w/ Intel Fortran 15 (cmake) + + Mac OS X Mt. Lion 10.8.5 Apple clang/clang++ version 5.1 from Xcode 5.1 + 64-bit gfortran GNU Fortran (GCC) 4.8.2 + (swallow/kite) Intel icc/icpc/ifort version 15.0.3 + + Mac OS X Mavericks 10.9.5 Apple clang/clang++ version 6.0 from Xcode 6.2.0 + 64-bit gfortran GNU Fortran (GCC) 4.9.2 + (wren/quail) Intel icc/icpc/ifort version 15.0.3 + + Mac OS X Yosemite 10.10.5 Apple clang/clang++ version 6.0 from Xcode 7.0.0 + 64-bit gfortran GNU Fortran (GCC) 4.9.2 + (osx1010dev/osx1010test) Intel icc/icpc/ifort version 15.0.3 + +Tested Configuration Features Summary +===================================== + + In the tables below + y = tested + n = not tested in this release + C = Cluster + W = Workstation + x = not working in this release + dna = does not apply + ( ) = footnote appears below second table + = testing incomplete on this feature or platform + +Platform C F90/ F90 C++ zlib SZIP + parallel F2003 parallel +SunOS 5.11 32-bit n y/y n y y y +SunOS 5.11 64-bit n y/y n y y y +Windows 7 y y/y n y y y +Windows 7 x64 y y/y n y y y +Windows 7 Cygwin n y/y n y y n +Windows 8.1 n y/y n y y y +Windows 8.1 x64 n y/y n y y y +Mac OS X Mountain Lion 10.8.5 64-bit n y/y n y y y +Mac OS X Mavericks 10.9.5 64-bit n y/y n y y y +Mac OS X Yosemeti 10.10.5 64-bit n y/y n y y y +AIX 6.1 32- and 64-bit n y/n n y y y +CentOS 6.7 Linux 2.6.32 x86_64 GNU y y/y y y y y +CentOS 6.7 Linux 2.6.32 x86_64 Intel n y/y n y y y +CentOS 6.7 Linux 2.6.32 x86_64 PGI n y/y n y y y +CentOS 7.1 Linux 3.10.0 x86_64 GNU y y/y y y y y +CentOS 7.1 Linux 3.10.0 x86_64 Intel n y/y n y y y +Linux 2.6.32-431.11.2.el6.ppc64 n y/n n y y y + +Platform Shared Shared Shared Thread- + C libs F90 libs C++ libs safe +SunOS 5.11 32-bit y y y y +SunOS 5.11 64-bit y y y y +Windows 7 y y y y +Windows 7 x64 y y y y +Windows 7 Cygwin n n n y +Windows 8.1 y y y y +Windows 8.1 x64 y y y y +Mac OS X Mountain Lion 10.8.5 64-bit y n y y +Mac OS X Mavericks 10.9.5 64-bit y n y y +Mac OS X Yosemeti 10.10.5 64-bit y n y y +AIX 6.1 32- and 64-bit y n n y +CentOS 6.7 Linux 2.6.32 x86_64 GNU y y y y +CentOS 6.7 Linux 2.6.32 x86_64 Intel y y y y +CentOS 6.7 Linux 2.6.32 x86_64 PGI y y y y +CentOS 7.1 Linux 3.10.0 x86_64 GNU y y y y +CentOS 7.1 Linux 3.10.0 x86_64 Intel y y y y +Linux 2.6.32-431.11.2.el6.ppc64 y y y y + +Compiler versions for each platform are listed in the preceding +"Supported Platforms" table. + + +More Tested Platforms +===================== +The following platforms are not supported but have been tested for this release. + + Linux 2.6.18-431.11.2.el6 g95 (GCC 4.0.3 (g95 0.94!) + #1 SMP x86_64 GNU/Linux + (platypus) + + Mac OS X El Capitan 10.11 Apple clang/clang++ version 7.0.0 from Xcode 7.0.1 + 64-bit gfortran GNU Fortran (GCC) 5.2.0 + (VM) + + Windows 7 Visual Studio 2008 (cmake) + + Windows 7 x64 Visual Studio 2008 (cmake) + + Windows 10 Visual Studio 2013 w/ Intel Fortran 15 (cmake) + + Windows 10 x64 Visual Studio 2013 w/ Intel Fortran 15 (cmake) + + Debian7.5.0 3.2.0-4-amd64 #1 SMP Debian 3.2.51-1 x86_64 GNU/Linux + gcc (Debian 4.7.2-5) 4.7.2 + GNU Fortran (Debian 4.7.2-5) 4.7.2 + (cmake and autotools) + + Fedora20 3.15.3-200.fc20.x86_64 #1 SMP x86_64 x86_64 x86_64 GNU/Linux + gcc (GCC) 4.8.3 20140624 (Red Hat 4.8.3-1) + GNU Fortran (GCC) 4.8.3 20140624 (Red Hat 4.8.3-1) + (cmake and autotools) + + SUSE 13.1 3.11.10-17-desktop #1 SMP PREEMPT x86_64 x86_64 x86_64 GNU/Linux + gcc (SUSE Linux) 4.8.1 + GNU Fortran (SUSE Linux) 4.8.1 + (cmake and autotools) + + Ubuntu 14.04 3.13.0-35-generic #62-Ubuntu SMP x86_64 GNU/Linux + gcc (Ubuntu/Linaro 4.9.1-0ubuntu1) 4.9.1 + GNU Fortran (Ubuntu/Linaro 4.9.1-0ubuntu1) 4.9.1 + (cmake and autotools) + + hopper.nersc.gov PrgEnv-gnu/5.2.40 + gcc (GCC) 4.9.2 20141030 (Cray Inc.) + GNU Fortran (GCC) 4.9.2 20141030 (Cray Inc.) + g++ (GCC) 4.9.2 20141030 (Cray Inc.) + + +Known Problems +============== +* On Windows platforms in debug configurations, the VFD flush1 tests will fail + with the split and multi VFD drivers. These tests will display a modal debug + dialog which must be answered or wait for the test timeout to expire. + (ADB - 2014/06/23 - HDFFV-8851) + +* CLANG compiler with the options -fcatch-undefined-behavior and -ftrapv + catches some undefined behavior in the alignment algorithm of the macro DETECT_I + in H5detect.c (Issue 8147). Since the algorithm is trying to detect the alignment + of integers, ideally the flag -fcatch-undefined-behavior shouldn't to be used for + H5detect.c. In the future, we can separate flags for H5detect.c from the rest of + the library. (SLU - 2013/10/16) + +* Make provided by Solaris fails in "make check". Solaris users should use + gmake to build and install the HDF5 software. (AKC - 2013/10/08 - HDFFV-8534) + +* The C++ and FORTRAN bindings are not currently working on FreeBSD with the + native release 8.2 compilers (4.2.1), but are working with gcc 4.6 from the + ports (and probably gcc releases after that). + (QAK - 2012/10/19) + +* The following h5dump test case fails in BG/P machines (and potentially other + machines that use a command script to launch executables): + + h5dump --no-compact-subset -d "AHFINDERDIRECT::ah_centroid_t[0] it=0 tl=0" + tno-subset.h5 + + This is due to the embedded spaces in the dataset name being interpreted + by the command script launcher as meta-characters, thus passing three + arguments to h5dump's -d flag. The command passes if run by hand, just + not via the test script. + (AKC - 2012/05/03) + +* The STDIO VFD does not work on some architectures, possibly due to 32/64 + bit or large file issues. The basic STDIO VFD test is known to fail on + 64-bit SunOS 5.10 on SPARC when built with -m64 and 32-bit OS X/Darwin + 10.7.0. The STDIO VFD test has been disabled while we investigate and + a fix should appear in a future release. + (DER - 2011/10/14 - HDFFV-8235) + +* h5diff can report inconsistent results when comparing datasets of enum type + that contain invalid values. This is due to how enum types are handled in + the library and will be addressed in a future release. + (DER - 2011/10/14 - HDFFV-7527) + +* The links test can fail under the stdio VFD due to some issues with external + links. This will be investigated and fixed in a future release. + (DER - 2011/10/14 - HDFFV-7768) + +* After the shared library support was fixed for some bugs, it was discovered + that "make prefix=XXX install" no longer works for shared libraries. It + still works correctly for static libraries. Therefore, if you want to + install the HDF5 shared libraries in a location such as /usr/local/hdf5, + you need to specify the location via the --prefix option during configure + time. E.g, ./configure --prefix=/usr/local/hdf5 ... + (AKC - 2011/05/07 - HDFFV-7583) + +* The parallel test, t_shapesame, in testpar/, may run for a long time and may + be terminated by the alarm signal. If that happens, one can increase the + alarm seconds (default is 1200 seconds = 20 minutes) by setting the + environment variable, $HDF5_ALARM_SECONDS, to a larger value such as 3600 + (60 minutes). Note that the t_shapesame test may fail in some systems + (see the "While working on the 1.8.6 release..." problem below). If + it does, it will waste more time if $HDF5_ALARM_SECONDS is set + to a larger value. + (AKC - 2011/05/07) + +* Shared Fortran libraries are not quite working on AIX. While they are + generated when --enable-shared is specified, the Fortran and HL/Fortran + tests fail. HL and C++ shared libraries should now be working as intended, + however. + (MAM - 2011/04/20) + +* While working on the 1.8.6 release of HDF5, a bug was discovered that can + occur when reading from a dataset in parallel shortly after it has been + written to collectively. The issue was exposed by a new test in the parallel + HDF5 test suite, but had existed before that. We believe the problem lies with + certain MPI implementations and/or file systems. + + We have provided a pure MPI test program, as well as a standalone HDF5 + program, that can be used to determine if this is an issue on your system. + They should be run across multiple nodes with a varying number of processes. + These programs can be found at: + http://www.hdfgroup.org/ftp/HDF5/examples/known_problems/ + (NAF - 2011/01/19) + +* All of the VFL drivers aren't backward compatible. In H5FDpublic.h, the + structure H5FD_class_t changed in 1.8. There is new parameter added to + get_eoa and set_eoa callback functions. A new callback function + get_type_map was added in. The public function H5FDrealloc was taken + out in 1.8. The problem only happens when users define their own driver + for 1.6 and try to plug in 1.8 library. Because there's only one user + complaining about it, we (Elena, Quincey, and I) decided to leave it as + it is (see bug report #1279). Quincey will make a plan for 1.10. + (SLU - 2010/02/02) + +* The --enable-static-exec configure flag will only statically link libraries + if the static version of that library is present. If only the shared version + of a library exists (i.e., most system libraries on Solaris, AIX, and Mac, + for example, only have shared versions), the flag should still result in a + successful compilation, but note that the installed executables will not be + fully static. Thus, the only guarantee on these systems is that the + executable is statically linked with just the HDF5 library. + (MAM - 2009/11/04) + +* A dataset created or rewritten with a v1.6.3 library or after cannot be read + with the v1.6.2 library or before when the Fletcher32 EDC filter is enabled. + There was a bug in the calculation of the Fletcher32 checksum in the + library before v1.6.3; the checksum value was not consistent between big- + endian and little-endian systems. This bug was fixed in Release 1.6.3. + However, after fixing the bug, the checksum value was no longer the same as + before on little-endian systems. Library releases after 1.6.4 can still read + datasets created or rewritten with an HDF5 library of v1.6.2 or before. + (SLU - 2005/06/30) + + +%%%%1.8.15%%%% + + +HDF5 version 1.8.15 released on 2015-05-04 +================================================================================ + +INTRODUCTION +============ + +This document describes the differences between HDF5-1.8.14 and +HDF5-1.8.15, and contains information on the platforms tested and +known problems in HDF5-1.8.15. + +Links to the HDF5 source code, documentation, and additional materials +can be found on the HDF5 web page at: + + http://www.hdfgroup.org/products/hdf5/ + +The HDF5 release can be obtained from: + + http://www.hdfgroup.org/HDF5/release/obtain5.html + +User documentation for HDF5 can be accessed directly at this location: + + http://www.hdfgroup.org/HDF5/doc/ + +All new and modified APIs are listed in detail in the "HDF5 Software Changes +from Release to Release" document at this location: + + http://www.hdfgroup.org/HDF5/doc/ADGuide/Changes.html + +If you have any questions or comments, please send them to the HDF Help Desk: + + help@hdfgroup.org + + +CONTENTS +======== + +- New Features +- Support for New Platforms, Languages, and Compilers +- Bug Fixes since HDF5-1.8.14 +- Supported Platforms +- Supported Configuration Features Summary +- More Tested Platforms +- Known Problems + + +New Features +============ + + Configuration + ------------- + - CMake + + Improvements made to the CMake build system. + + The default options were changed to align with the Autotools configure + defaults. CMake configure files now support components when packaged + with CPack. Windows CPack supports WiX packaging, and will look for + WiX and NSIS in the standard locations. + + The CMake minimum has been changed to 3.1. + + (ADB - 2015/04/01 HDFFV-8074, 8968, 9006) + + - cmakehdf5 for Cmake building. + Added configure options to support the building of Fortran or CXX API, + to enable/disable testings. Use "cmakehdf5 --help" for details. + (AKC - 2014/12/09 HDFFV-8932) + + - Building Shared and Parallel Made Explicit + + When --enable-parallel is specified, configure used to disable + shared by default. + + Removed the restriction for building shared when parallel is + enabled. --disable-shared has to be used explicitly if user + wishes to disable shared libraries. + + (MSC - 2015/02/19 HDFFV-9069) + + - Inferring Parallel Compilers + + configure was trying to infer if a compiler is a parallel + compiler with MPI support and enable parallel even if the user + did not explicitly enable parallel. This should not happen. + + Disabled inferring parallel compilers to enable parallel HDF5 + build. --enable-parallel has to be used explicitly to build + parallel HDF5 regardless of the compiler type being used. + + (MSC - 2015/02/19 HDFFV-9068) + + - Large File Support Configuration Option + + Removed the option to enable or disable large file support. It will + always be enabled. + + (MSC - 2015/02/19 HDFFV-9097) + + - Removed Configuration Feature + + When configure detected that the CodeWarrior compiler was being used it + would define a symbol that caused a test in test/tfile.c to be skipped + due to a broken CodeWarrior open() command. + + Since this only masks the problem instead of fixing it and we don't + support CodeWarrior anyway, this functionality was removed. + + (DER - 2015/02/21, HDFFV-9080) + + - VMS Build/Test Files Have Been Removed + + HDF5 no longer supports VMS, and the files were getting out of date. + Since we have no access to a VMS machine, there is no way for us to + maintain them. + + A Subversion tag was created at: + + https://svn.hdfgroup.uiuc.edu/tags/vms_last_support_1_8 + + immediately before removing the files. + + (DER - 2015-02-26, HDFFV-9147) + + - Removal of --with-default-vfd configure Option + + In theory, this option was intended to allow setting a default + VFD that would be used by the library. In practice, the feature + only accepted the POSIX (SEC2) VFD (already the default) and + the stdio VFD (a demo VFD not intended for production use). The + inability to pass key VFD parameters at configure time limits the + full implementation of this feature, so it was retired. + + (DER - 2015-02-26, HDFFV-9081) + + - Direct VFD configure Behavior + + The configure options for Linux now allow the Direct VFD to build + without passing additional compiler options/defines like _GNU_SOURCE. + Passing --enable-direct-vfd is now all that is needed to enable + the feature. + + The Direct VFD is now disabled by default since it is intended for + specialized audiences. It was previously enabled by default, but the + configure script did not set correct POSIX levels, etc. making this + a moot point. + + Note that the Direct VFD can only be configured on Linux when + the O_DIRECT flag to open()/create() and posix_memalign() function + are available. This is unchanged from previous behavior. + + (DER - 2015-02-26, HDFFV-9057, 7567, 9088, 7566) + + - _POSIX_C_SOURCE, _GNU_SOURCE, and _BSD_SOURCE No Longer Exported + to h5cc and Other Compiler Wrappers + + The _POSIX_C_SOURCE, _GNU_SOURCE, and _BSD_SOURCE definitions are + not required for using API functions and may conflict with user + code requirements. + + (DER - 2015-03-08, HDFFV-9152) + + - Removed the --enable-filters Option from configure + + This option allowed the user to disable selected internal filters, + presumably to make the library smaller. It has been removed since + it saved little space (the internal filters are small with respect + to the overall library size) and was not generally extendible to + the library at large due to the large number of #ifdefs that would + be required. + + Note that this features applied to internal filters such as shuffle + and n-bit and not external filters like gzip or Szip. Those are still + enabled or disabled via their own configure options. + + (DER - 2015-03-08, HDFFV-9086) + + - Removed Obsolete Time Functionality from configure and the C Library + + The library contained some residual functionality from obsolete + time zone handling code. This has been removed, and the configure + checks for the time functions have been cleaned up. + + * Lumped all the time functionality together in configure.ac. + This was previously more spread out due to Solaris issues + with the ordering of certain checks. + + * Removed processing that handles __tm_gmtoff members of struct + tm. (libc-4) + + * Removed BSDgettimeofday(). (IRIX 5.3) + + * Removed timezone struct handling in gettimeofday() (considered + harmful). + + Note that the HDF5 Library stores timestamps in a platform-independent + manner, so old files can still be read. This only affects converting + system time to HDF5 timestamps. + + The library currently uses the tm_gmtoff member of the tm struct + (preferred, if available) or the timezone global variable to + construct HDF5 timestamps. + + (DER - 2015-03-09, HDFFV-9083 and 9085) + + - Added -D_DEFAULT_SOURCE to CPPFLAGS on Linux Systems + + This is the replacement for -D_BSD_SOURCE in versions of glibc since 2.19. + Since both are defined, it should work for all versions of glibc. Defining + both suppresses the warning about defining _BSD_SOURCE. + + (NAF - 2015-04-02, HDFFV-9079) + + Library + ------- + - Added Memory Allocation Functions that Use the Library's Allocator + + HDF5 filters may need to allocate or resize the buffer that is passed + to them from the library. If the filter has been compiled separately + from the library, it and the library may use different memory + allocation libraries for the (re)allocation and free calls. This can + cause heap corruption and crashes. This is particularly a problem on + Windows since each C run-time library is implemented as a separate + shared library, but can also show up on POSIX systems when debug or + high-performance allocation libraries are in use. + + Two new functions (H5allocate_memory() and H5resize_memory()) were + added to the HDF5 C library. These functions have the same semantics as + malloc/calloc and realloc, respectively. Their primary purpose is to + allow filter authors to allocate or resize memory using the same + memory allocation library as the HDF5 library. Filter authors are + highly encouraged to use these new functions in place of malloc, + calloc, and realloc. They should also use the H5free_memory() call when + freeing memory. + + Note that the filters provided with the library (zlib, szip, etc.) do + not experience the problems that these new functions are intended to + fix. This work only applies to third-party filters that are compiled + separately from the library. + + (DER - 2015-04-01, HDFFV-9100) + + - H5Pset_istore_k and H5Pset_sym_k + + These two functions didn't check the value of the input parameter "ik". + When 2*ik exceeded 2 bytes of storage, data was lost in the file; + for example, some chunks would be overwritten. + + Added validation of "ik" to not exceed the max v1 btree entries (2 bytes) + to these two routines. + + (VC - 2015-03-24, HDFFV-9173) + + - Added Functions to Control the Value of H5PL_no_plugin_g without + Using an Environment Variable + + Sometimes it is necessary for an application to disable the use of + dynamically loaded plugin libraries without requiring the library to + be built with plugin support disabled or to set an environment + variable to disable plugin support globally. + + Two new functions (H5PLset_loading_state() and H5PLget_loading_state()) + were added to the HDF5 C Library. These functions require a parameter + that indicates which type of dynamically loaded plugin is enabled or + disabled. + + (ADB - 2015-03-17, HDFFV-8520) + + Parallel Library + ---------------- + - MPI_Finalize and HDF5 Library Shutdown + + Calling HDF5 routines after MPI_Finalize has been closed should + not be done, since those routines might call MPI functions that + would not be possible to do after finalizing the MPI library. + + Attached an attribute destroy callback to MPI_COMM_SELF that + shuts down the HDF5 library when MPI_COMM_SELF is destroyed, + in other words, on MPI_Finalize. This should fix several issues + that users see when they forget to close HDF5 objects before + calling MPI_Finalize(). + + (MSC - 2015/02/25, HDFFV-883) + + Tools + ----- + - None + + High-Level APIs + --------------- + - None + + Fortran API + ----------- + - Added Global Variables + + These new global variables are equivalent to the C definitions + without the '_F': + + H5G_UDLINK_F + H5G_SAME_LOC_F + H5O_TYPE_UNKNOWN_F + H5O_TYPE_GROUP_F + H5O_TYPE_DATASET_F + H5O_NAMED_DATATYPE_F + H5O_TYPE_NTYPES_F + + (MSB - 2015/02/03, HDFFV-9040) + + + C++ API + ------- + - New Wrappers for C Functions H5P[s/g]et_libver_bounds + + Wrappers were added to class H5::FileAccPropList for the + C Functions H5Pget_libver_bounds and H5Pset_libver_bounds. + + (BMR, 2015/04/06, Part of HDFFV-9167) + + - New Wrappers to Get the Object Header's Version + + The following wrappers are added to class H5::CommonFG + Returns the object header version of an object in a file or group, + given the object's name. + + unsigned childObjVersion(const char* objname) const; + unsigned childObjVersion(const H5std_string& objname) const; + + (BMR, 2015/04/06) + + - New DataType Constructor + + Added a DataType constructor that takes a PredType object, and this + constructor will invoke H5Tcopy to generate another datatype id + from a predefined datatype. + + (BMR, 2015/04/06) + + +Support for New Platforms, Languages, and Compilers +=================================================== + - Support for Linux 3.10.0-123.20.1.el7 added (LK - 2015/04/01) + - Support for Mac OS X Yosemite 10.10 added (AKC - 2015/03/04, HDFFV-9007) + - Support for AIX 6.1 added and AIX 5.3 is retired. (AKC - 2015/01/09) + +Bug Fixes since HDF5-1.8.14 +=========================== + + Configuration + ------------- + - Make uninstall generated "test: argument expected". + The error is due to $EXAMPLETOPDIR is used without setting a value first. + + Fixed by assign it with the proper value. + + (AKC - 2015/04/29, HDFFV-9298) + + - Windows Installer Incorrect Display of PATH Environment Variable + + In the Windows installer, the dialog box where the user can elect to + add the product's bin path to the %PATH% environment variable displayed + an incorrect path. This path was missing the C:\Program Files part + and used the POSIX file separator '/' before the bin (/bin, + instead of \bin). + + The dialog box text was changed to simply say that the product's bin + path would be added instead of explicitly displaying the path. + This is in line with most installers. The reason for not fixing the + displayed path instead is that it is difficult to pass the correct + path from CPack to the NSIS installer for display. + + Note that this was never a code issue - it was just a display + problem. The installer always did the right thing when updating the + environment variable. + + (DER - 2014/11/14, HDFFV-9016) + + Library + ------- + - Incorrect Usage of List in CMake COMPILE_DEFINITIONS set_property + + The CMake command set_property with COMPILE_DEFINITIONS property + needs a quoted semi-colon separated list of values. CMake will + transform the list to a series of -D{value} for the compile. + + (ADB - 2014/12/09, HDFV-9041) + + - Fixed Compile Errors on Windows w/ Visual Studio and CMake When + UNICODE is Defined + + The HDF5 Library could not be built on Windows with Visual Studio when + UNICODE was defined. This was due to the incorrect use of the TEXT() + macro and some Win32 API functions that take TCHAR parameters. The faulty + code was a part of the filter plugin functionality. This was a + compile-time error that only affected users who build HDF5 from source + and define UNICODE, usually when HDF5 is being built as a part of a + larger product. There were no run-time effects. + + These errors caused no problems when UNICODE was not defined. HDF5 is + normally not built with UNICODE defined and the binaries were + unaffected. + + The fix was to remove the TEXT() macro and explicitly use the + 'A' form of the Win32 API calls, which expect char strings instead of + wchar_t strings. + + Note that HDF5 currently does not support Unicode file paths on Windows. + + (DER - 2015/02/22, HDFFV-8927) + + - Addition of Error Tracing Functionality to Several C API Calls + + A bug in a text processing script caused API calls that return a + pointer to not receive error tracing macros/functionality. + + The bug has been corrected and error tracing functionality has been + added to the affected API calls. These functions will now correctly + print trace information when library errors are encountered. + + (DER - 2015/02/26, HDFFV-9141) + + - H5Rdereference Now Checks for HADDR_UNDEF or Uninitialized References + + When passed HADDR_UNDEF or uninitialized references, the previous + behavior of H5Rdereference was to continue to process the reference + as a valid address. + + H5Rdereference was changed to return immediately (with an error + message) if the references are HADDR_UNDEF or uninitialized. + + (MSB - 2015/3/10, HDFFV-7959) + + - Fixed Bugs in H5Sextent_copy + + H5Sextent_copy would not free the previous extent, resulting in a memory + leak. Also, H5Sextent_copy would not update the number of elements + selected if the selection was "all", causing various problems. These + issues have been fixed. + + (NAF - 2015/04/02) + + + Parallel Library + ---------------- + - Fixed a Potential Memory Error + + Fixed a potential memory error when performing parallel I/O on a + dataset with a single chunk, and at least one process has nothing + to do. + + (NAF - 2015/02/16) + + - Parallel Test Problem Fixed + + Fixed problem with parallel tests where they failed beyond a + certain number of ranks. All tests should work for any arbitrary + number of ranks. + + (MSC - 2014/11/06, HDFFV-1027,8962,8963) + + - MPE Support + + Enabling MPE was causing HDF5 build to fail. Support for it was + dropped at some point in time. + + Fixed problem with enabling MPE. Users should use the community + maintained MPE on github (http://git.mpich.org/mpe.git/). + + (MSC - 2015/02/20, HDFFV-9135) + + Performance + ------------- + - None + + Tools + ----- + - h5repack crashed on enumerated 8-bit type. + + Previous version 1.8.14 introduced an error that caused the reading + of enumerated 8-bit type nested in compound type to fail. + + Fixed library code responsible for reading the particular type. + (AKC - 2015.03/31, HDFFV-8667) + + - h52gif crashed non-8bit images. + + h52gif crashed if instructed to convert images other than 8bit images. + + h52gif could handle only 8bit images. Added code to detect non-8bit + images and flag them as failure. Update tool document page to reflect + the limit. + (AKC - 2015/03/31, HDFFV-8957) + + - perform/benchpar.c retired. + + benchpar.c has not been built for a long time and its original purpose + is not needed any more. + (AKC - 2014/12/19, HDFFV-8156) + + - Source perform/ directory moved to tools/perform. + The perform directory is moved to tools/perform for easier maintenance. + (AKC - 2014/12/17, HDFFV-9046) + + Fortran API + ------------ + - Fortran Fails with --enable-fortran2003 and Intel 15.x Compilers + + Added BIND(C) to the offending APIs. + + The Fortran Library (--enable-fortran2003) now works using Intel 15.x + without the need for any additional compilers flags. + + (MSB - 2015/1/26, HDFFV-9049) + + - h5tenum_insert_f Does Not Work with Default 8 Byte Integers + (xlf compiler) + + In the Fortran 90 API, 'value' is no longer cast into the C int type. + Therefore, if h5tenum_insert_f is passed an 8 byte integer (via -i8) + then 'value' is written as the same type as the default Fortran + integer type (which can be 8 bytes). + + A new Fortran 2003 API was added which is more in line with the C + API and users are strongly encouraged to use the Fortran 2003 API + instead of the Fortran 90 API. + + SUBROUTINE h5tenum_insert_f(type_id, name, value, hdferr) + INTEGER(HID_T) , INTENT(IN) :: type_id + CHARACTER(LEN=*), INTENT(IN) :: name + TYPE(C_PTR) , INTENT(IN) :: value + INTEGER, INTENT(OUT) :: hdferr + + (MSB - 2015/2/19, HDFFV-8908) + + - Some Fortran APIs Never Returned the Error State + + Some Fortran APIs never returned the error state: they + would always return a positive number. The APIs include + the following: + + h5fget_file_image_f + h5lget_name_by_idx_f + h5oget_comment_by_name_f + + They were corrected to return a negative number as described in + the Reference Manual if an error occurred. + + (MSB - 2015/3/19, HDF5-239) + + - Fixed h5pget_class_f + + h5pget_class_f never correlated the class identifier to the property + list class name as indicated in the HDF5 Reference Manual; it instead + returned a property list class identifier as an INTEGER. The INTEGER + needed to be of type INTEGER(HID_T) to be correct. + + The h5pget_class_f API was changed to return an INTEGER(HID_T) + property list class identifier instead of an INTEGER. This mimics the + intended behavior of the C API. + + (MSB - 2015/3/16, HDFFV5-9162) + + C++ API + ------ + - Combined Two H5File::getObjCount Overloaded Methods + + The following two methods + + ssize_t getObjCount(unsigned types) const; + ssize_t getObjCount() const; + + were combined into one: + + ssize_t getObjCount(unsigned types = H5F_OBJ_ALL) const; + + (BMR - 2015/04/06) + + - Many Warnings Were Removed + + Many warnings such as conversion, unused variables, missing base + class initialization, and initializing base classes in wrong order + were removed. + + (BMR, 2015/04/06) + + - Functionality Deprecation + + The following two constructors of classes AbstractDs, IdComponent, + H5Location, and H5Object are no longer appropriate after the data member + "id" had been moved from IdComponent to the sub-classes in previous + releases. + + (const hid_t h5_id); + (const & original); + + The copy constructors were no-op and removed in 1.8.15. The other + constructors will be removed from 1.10 release, and then from 1.8.17 + if their removal does not cause any problems. + + (BMR, 2015-04-06) + + + High-Level APIs: + ------ + - Suppress Warnings from Flex/Bison-generated Code + + Warning suppression #pragmas, etc. have been added to H5LTparse.c and + H5LTanalyze.c. We have no control over this code since it's created by + a generator. + + (DER - 2015/03/08 - HDFFV-9149) + + - Changed hdf5_hl.h to Include the HDF5 Main Library "hdf5.h" + + User's no longer need to include both hdf5_hl.h and hdf5.h + + (MSB - 2015/2/14, HDFFV-8685) + + + - H5PTcreate_fl Does Not Convert to Memory Datatype + + H5PTcreate_fl now converts to the table's native memory datatype + to fix the problem of handling BE and LE packet tables. + + (MSB - 2015/2/26 - HDFFV-9042) + + - Fix for H5LT Attribute Functions + + H5LT attribute functions fail to create attributes whose name + is a substring of an existing attribute. + + H5LT attribute functions can now create attributes whose name + is a substring of an existing attribute. + + (MSB - 2015/2/24, HDFFV-9132) + + + Fortran High-Level APIs: + ------------------------ + + - Internal Library Fix for Missing Argument Declaration + + In Interface block for h5tbmake_table_c, "max_char_size_field_names" + is listed as an input, but in the argument definitions it is + "INTEGER :: max_char_size". This caused no known problems with the + Fortran HL API. + + Fixed missing argument definition. + + (MSB - 2015/2/18, HDFFV-8559) + + + Testing + ------- + - None + + +Supported Platforms +=================== +The following platforms are supported and have been tested for this release. +They are built with the configure process unless specified otherwise. + + AIX 6.1 xlc/xlc_r 10.1.0.5 + (NASA G-ADA) xlC/xlC_r 10.1.0.5 + xlf90/xlf90_r 12.1.0.6 + + Linux 2.6.18-308.13.1.el5PAE GNU C (gcc), Fortran (gfortran), C++ (g++) + #1 SMP i686 i686 i386 compilers for 32-bit applications; + (jam) Version 4.1.2 20080704 (Red Hat 4.1.2-55) + Version 4.8.4, 4.9.2 + PGI C, Fortran, C++ Compilers for 32-bit + applications; + Version 14.10-0 + Intel(R) C, C++, Fortran Compiler for 32-bit + applications; + Version 15.0.1.133 (Build 20141023) + + Linux 2.6.18-371.6.1.el5 GNU C (gcc), Fortran (gfortran), C++ (g++) + #1 SMP x86_64 GNU/Linux compilers for 64-bit applications; + (koala) Version 4.1.2 20080704 (Red Hat 4.1.2-55) + Version 4.8.4, 4.9.2 + Intel(R) C, C++, Fortran Compilers for + applications running on Intel(R) 64; + Version 15.0.1.133 Build 20141023 + + Linux 2.6.32-431.11.2.el6 GNU C (gcc), Fortran (gfortran), C++ (g++) + #1 SMP x86_64 GNU/Linux compilers: + (platypus) Version 4.4.7 20120313 + Version 4.8.2, Version 4.9.2 + PGI C, Fortran, C++ for 64-bit target on + x86-64; + Version 14.10-0 + Intel(R) C (icc), C++ (icpc), Fortran (icc) + compilers: + Version 15.0.1.133 Build 20141023 + + Linux 3.10.0-123.20.1.el7 GNU C (gcc), Fortran (gfortran), C++ (g++) + #1 SMP x86_64 GNU/Linux compilers: + (moohan) Version 4.8.2 20140120 (Red Hat 4.8.2-16) + Intel(R) C Intel(R) 64 Compiler XE for + applications running on Intel(R) 64, + Version 15.0.1.133 Build 20141023 + + Linux 2.6.32-431.29.2.el6.ppc64 gcc (GCC) 4.4.7 20120313 (Red Hat 4.4.7-4) + #1 SMP ppc64 GNU/Linux g++ (GCC) 4.4.7 20120313 (Red Hat 4.4.7-4) + (ostrich) GNU Fortran (GCC) 4.4.7 20120313 (Red Hat 4.4.7-4) + IBM XL C/C++ V13.1 + IBM XL Fortran V15.1 + + SunOS 5.11 32- and 64-bit Sun C 5.12 SunOS_sparc + (emu) Sun Fortran 95 8.6 SunOS_sparc + Sun C++ 5.12 SunOS_sparc + + Windows 7 Visual Studio 2008 (cmake) + Visual Studio 2010 w/ Intel Fortran 14 (cmake) + Visual Studio 2012 w/ Intel Fortran 15 (cmake) + Visual Studio 2013 w/ Intel Fortran 15 (cmake) + Cygwin(CYGWIN_NT-6.1 1.7.34(0.285/5/3) gcc(4.9.2) compiler and gfortran) + (cmake and autotools) + + Windows 7 x64 Visual Studio 2008 (cmake) + Visual Studio 2010 w/ Intel Fortran 14 (cmake) + Visual Studio 2012 w/ Intel Fortran 15 (cmake) + Visual Studio 2013 w/ Intel Fortran 15 (cmake) + + Windows 8.1 Visual Studio 2012 w/ Intel Fortran 15 (cmake) + Visual Studio 2013 w/ Intel Fortran 15 (cmake) + + Windows 8.1 x64 Visual Studio 2012 w/ Intel Fortran 15 (cmake) + Visual Studio 2013 w/ Intel Fortran 15 (cmake) + + Mac OS X Mt. Lion 10.8.5 Apple clang/clang++ version 5.1 from Xcode 5.1 + 64-bit gfortran GNU Fortran (GCC) 4.8.2 + (swallow/kite) Intel icc/icpc/ifort version 14.0.2 + + Mac OS X Mavericks 10.9.5 Apple clang/clang++ version 6.0 from Xcode 6.1.1 + 64-bit gfortran GNU Fortran (GCC) 4.8.2 + (wren/quail) Intel icc/icpc/ifort version 14.0.2 + + Mac OS X Yosemite 10.10.2 Apple clang/clang++ version 6.0 from Xcode 6.1.1 + 64-bit gfortran GNU Fortran (GCC) 4.9.2 + (osx1010dev/osx1010test) Intel icc/icpc/ifort version 15.0.1 + + +Tested Configuration Features Summary +===================================== + + In the tables below + y = tested + n = not tested in this release + C = Cluster + W = Workstation + x = not working in this release + dna = does not apply + ( ) = footnote appears below second table + = testing incomplete on this feature or platform + +Platform C F90/ F90 C++ zlib SZIP + parallel F2003 parallel +SunOS 5.11 32-bit n y/y n y y y +SunOS 5.11 64-bit n y/y n y y y +Windows 7 y y/y n y y y +Windows 7 x64 y y/y n y y y +Windows 7 Cygwin n y/y n y y n +Windows 8.1 n y/y n y y y +Windows 8.1 x64 n y/y n y y y +Mac OS X Mountain Lion 10.8.5 64-bit n y/y n y y y +Mac OS X Mavericks 10.9.5 64-bit n y/y n y y y +Mac OS X Yosemeti 10.10.2 64-bit n y/y n y y y +AIX 6.1 32- and 64-bit n y/n n y y y +CentOS 5.9 Linux 2.6.18-308 i686 GNU y y/y y y y y +CentOS 5.9 Linux 2.6.18-308 i686 Intel n y/y n y y y +CentOS 5.9 Linux 2.6.18-308 i686 PGI n y/y n y y y +CentOS 5.9 Linux 2.6.18 x86_64 GNU n y/y n y y y +CentOS 5.9 Linux 2.6.18 x86_64 Intel n y/y n y y y +CentOS 6.4 Linux 2.6.32 x86_64 GNU y y/y y y y y +CentOS 6.4 Linux 2.6.32 x86_64 Intel n y/y n y y y +CentOS 6.4 Linux 2.6.32 x86_64 PGI n y/y n y y y +CentOS 7.0 Linux 3.10.0 x86_64 GNU y y/y y y y y +CentOS 7.0 Linux 3.10.0 x86_64 Intel n y/y n y y y +Linux 2.6.32-431.11.2.el6.ppc64 n y/n n y y y + +Platform Shared Shared Shared Thread- + C libs F90 libs C++ libs safe +SunOS 5.11 32-bit y y y y +SunOS 5.11 64-bit y y y y +Windows 7 y y y y +Windows 7 x64 y y y y +Windows 7 Cygwin n n n y +Windows 8.1 y y y y +Windows 8.1 x64 y y y y +Mac OS X Mountain Lion 10.8.5 64-bit y n y y +Mac OS X Mavericks 10.9.5 64-bit y n y y +Mac OS X Yosemeti 10.10.2 64-bit y n y y +AIX 6.1 32- and 64-bit y n n y +CentOS 5.9 Linux 2.6.18-308 i686 GNU y y y y +CentOS 5.9 Linux 2.6.18-308 i686 Intel y y y n +CentOS 5.9 Linux 2.6.18-308 i686 PGI y y y n +CentOS 5.9 Linux 2.6.18 x86_64 GNU y y y y +CentOS 5.9 Linux 2.6.18 x86_64 Intel y y y n +CentOS 6.4 Linux 2.6.32 x86_64 GNU y y y n +CentOS 6.4 Linux 2.6.32 x86_64 Intel y y y n +CentOS 6.4 Linux 2.6.32 x86_64 PGI y y y n +CentOS 7.0 Linux 3.10.0 x86_64 GNU y y y n +CentOS 7.0 Linux 3.10.0 x86_64 Intel y y y n +Linux 2.6.32-431.11.2.el6.ppc64 y y y n + +Compiler versions for each platform are listed in the preceding +"Supported Platforms" table. + + +More Tested Platforms +===================== +The following platforms are not supported but have been tested for this release. + + Linux 2.6.18-308.13.1.el5PAE MPICH mpich 3.1.3 compiled with + #1 SMP i686 i686 i386 gcc 4.9.2 and gfortran 4.9.2 + (jam) g95 (GCC 4.0.3 (g95 0.94!) + + Linux 2.6.18-431.11.2.el6 MPICH mpich 3.1.3 compiled with + #1 SMP x86_64 GNU/Linux gcc 4.9.2 and gfortran 4.9.2 + (platypus) g95 (GCC 4.0.3 (g95 0.94!) + + FreeBSD 8.2-STABLE i386 gcc 4.5.4 [FreeBSD] 20110526 + (loyalty) gcc 4.6.1 20110527 + g++ 4.6.1 20110527 + gfortran 4.6.1 20110527 + + FreeBSD 8.2-STABLE amd64 gcc 4.5.4 [FreeBSD] 20110526 + (freedom) gcc 4.6.1 20110527 + g++ 4.6.1 20110527 + gfortran 4.6.1 20110527 + + Debian7.5.0 3.2.0-4-amd64 #1 SMP Debian 3.2.51-1 x86_64 GNU/Linux + gcc (Debian 4.7.2-5) 4.7.2 + GNU Fortran (Debian 4.7.2-5) 4.7.2 + (cmake and autotools) + + Fedora20 3.15.3-200.fc20.x86_64 #1 SMP x86_64 x86_64 x86_64 GNU/Linux + gcc (GCC) 4.8.3 20140624 (Red Hat 4.8.3-1) + GNU Fortran (GCC) 4.8.3 20140624 (Red Hat 4.8.3-1) + (cmake and autotools) + + SUSE 13.1 3.11.10-17-desktop #1 SMP PREEMPT x86_64 x86_64 x86_64 GNU/Linux + gcc (SUSE Linux) 4.8.1 + GNU Fortran (SUSE Linux) 4.8.1 + (cmake and autotools) + + Ubuntu 14.04 3.13.0-35-generic #62-Ubuntu SMP x86_64 GNU/Linux + gcc (Ubuntu/Linaro 4.9.1-0ubuntu1) 4.9.1 + GNU Fortran (Ubuntu/Linaro 4.9.1-0ubuntu1) 4.9.1 + (cmake and autotools) + + hopper.nersc.gov PrgEnv-gnu/5.2.40 + gcc (GCC) 4.9.2 20141030 (Cray Inc.) + GNU Fortran (GCC) 4.9.2 20141030 (Cray Inc.) + g++ (GCC) 4.9.2 20141030 (Cray Inc.) + + +Known Problems +============== +* On Windows platforms in debug configurations, the VFD flush1 tests will fail + with the split and multi VFD drivers. These tests will display a modal debug + dialog which must be answered or wait for the test timeout to expire. + (ADB - 2014/06/23 - HDFFV-8851) + +* CLANG compiler with the options -fcatch-undefined-behavior and -ftrapv + catches some undefined behavior in the alignment algorithm of the macro DETECT_I + in H5detect.c (Issue 8147). Since the algorithm is trying to detect the alignment + of integers, ideally the flag -fcatch-undefined-behavior shouldn't to be used for + H5detect.c. In the future, we can separate flags for H5detect.c from the rest of + the library. (SLU - 2013/10/16) + +* Make provided by Solaris fails in "make check". Solaris users should use + gmake to build and install the HDF5 software. (AKC - 2013/10/08 - HDFFV-8534) + +* The C++ and FORTRAN bindings are not currently working on FreeBSD with the + native release 8.2 compilers (4.2.1), but are working with gcc 4.6 from the + ports (and probably gcc releases after that). + (QAK - 2012/10/19) + +* The following h5dump test case fails in BG/P machines (and potentially other + machines that use a command script to launch executables): + + h5dump --no-compact-subset -d "AHFINDERDIRECT::ah_centroid_t[0] it=0 tl=0" + tno-subset.h5 + + This is due to the embedded spaces in the dataset name being interpreted + by the command script launcher as meta-characters, thus passing three + arguments to h5dump's -d flag. The command passes if run by hand, just + not via the test script. + (AKC - 2012/05/03) + +* The STDIO VFD does not work on some architectures, possibly due to 32/64 + bit or large file issues. The basic STDIO VFD test is known to fail on + 64-bit SunOS 5.10 on SPARC when built with -m64 and 32-bit OS X/Darwin + 10.7.0. The STDIO VFD test has been disabled while we investigate and + a fix should appear in a future release. + (DER - 2011/10/14 - HDFFV-8235) + +* h5diff can report inconsistent results when comparing datasets of enum type + that contain invalid values. This is due to how enum types are handled in + the library and will be addressed in a future release. + (DER - 2011/10/14 - HDFFV-7527) + +* The links test can fail under the stdio VFD due to some issues with external + links. This will be investigated and fixed in a future release. + (DER - 2011/10/14 - HDFFV-7768) + +* After the shared library support was fixed for some bugs, it was discovered + that "make prefix=XXX install" no longer works for shared libraries. It + still works correctly for static libraries. Therefore, if you want to + install the HDF5 shared libraries in a location such as /usr/local/hdf5, + you need to specify the location via the --prefix option during configure + time. E.g, ./configure --prefix=/usr/local/hdf5 ... + (AKC - 2011/05/07 - HDFFV-7583) + +* The parallel test, t_shapesame, in testpar/, may run for a long time and may + be terminated by the alarm signal. If that happens, one can increase the + alarm seconds (default is 1200 seconds = 20 minutes) by setting the + environment variable, $HDF5_ALARM_SECONDS, to a larger value such as 3600 + (60 minutes). Note that the t_shapesame test may fail in some systems + (see the "While working on the 1.8.6 release..." problem below). If + it does, it will waste more time if $HDF5_ALARM_SECONDS is set + to a larger value. + (AKC - 2011/05/07) + +* Shared Fortran libraries are not quite working on AIX. While they are + generated when --enable-shared is specified, the fortran and hl/fortran + tests fail. the issue. HL and C++ shared libraries should now be + working as intended, however. + (MAM - 2011/04/20) + +* While working on the 1.8.6 release of HDF5, a bug was discovered that can + occur when reading from a dataset in parallel shortly after it has been + written to collectively. The issue was exposed by a new test in the parallel + HDF5 test suite, but had existed before that. We believe the problem lies with + certain MPI implementations and/or file systems. + + We have provided a pure MPI test program, as well as a standalone HDF5 + program, that can be used to determine if this is an issue on your system. + They should be run across multiple nodes with a varying number of processes. + These programs can be found at: + http://www.hdfgroup.org/ftp/HDF5/examples/known_problems/ + (NAF - 2011/01/19) + +* All the VFL drivers aren't backward compatible. In H5FDpublic.h, the + structure H5FD_class_t changed in 1.8. There is new parameter added to + get_eoa and set_eoa callback functions. A new callback function + get_type_map was added in. The public function H5FDrealloc was taken + out in 1.8. The problem only happens when users define their own driver + for 1.6 and try to plug in 1.8 library. Because there's only one user + complaining about it, we (Elena, Quincey, and I) decided to leave it as + it is (see bug report #1279). Quincey will make a plan for 1.10. + (SLU - 2010/02/02) + +* The --enable-static-exec configure flag will only statically link libraries + if the static version of that library is present. If only the shared version + of a library exists (i.e., most system libraries on Solaris, AIX, and Mac, + for example, only have shared versions), the flag should still result in a + successful compilation, but note that the installed executables will not be + fully static. Thus, the only guarantee on these systems is that the + executable is statically linked with just the HDF5 library. + (MAM - 2009/11/04) + +* A dataset created or rewritten with a v1.6.3 library or after cannot be read + with the v1.6.2 library or before when the Fletcher32 EDC filter is enabled. + There was a bug in the calculation of the Fletcher32 checksum in the + library before v1.6.3; the checksum value was not consistent between big- + endian and little-endian systems. This bug was fixed in Release 1.6.3. + However, after fixing the bug, the checksum value was no longer the same as + before on little-endian system. Library releases after 1.6.4 can still read + datasets created or rewritten with an HDF5 library of v1.6.2 or before. + (SLU - 2005/06/30) + + +%%%%1.8.14%%%% + + +HDF5 version 1.8.14 released on 2014-11-12 +================================================================================ + +INTRODUCTION +============ + +This document describes the differences between HDF5-1.8.13 and +HDF5-1.8.14, and contains information on the platforms tested and +known problems in HDF5-1.8.14. + +All new and modified APIs are listed in the "HDF5 Software Changes +from Release to Release" document along with details about previous +releases at: + + http://www.hdfgroup.org/HDF5/doc/ADGuide/Changes.html + +Links to the HDF5 1.8.14 source code, documentation, and additional materials +can be found on the HDF5 web page at: + + http://www.hdfgroup.org/products/hdf5/ + +The HDF5 1.8.14 release can be obtained from: + + http://www.hdfgroup.org/HDF5/release/obtain5.html + +User documentation for 1.8.14 can be accessed directly at this location: + + http://www.hdfgroup.org/HDF5/doc/ + +If you have any questions or comments, please send them to the HDF Help Desk: + + help@hdfgroup.org + + +CONTENTS +======== + +- New Features +- Support for New Platforms, Languages, and Compilers +- Bug Fixes since HDF5-1.8.13 +- Supported Platforms +- Supported Configuration Features Summary +- More Tested Platforms +- Known Problems + + +New Features +============ + + Configuration + ------------- + - bin/cmakehdf5 configures, builds and installs C, C++, Fortran and High + level API's. (It used to build the C API only). + (AKC 2014/10/17 HDFFV-8932). + + Library + ------- + - None + + Parallel Library + ---------------- + - Chunk Fill Writes Changed to Collective + + Slow performance in chunk fill writes. Chunk fills + in the past were written independently by rank 0 one block + at a time. + + Optimized the chunk fill write algorithm so that all + chunk fill values will be written collectively in a single MPI-IO + call. This should show a great performance improvement when + creating chunked datasets in parallel when the chunk dimensions + are fairly small. + + (MSC - 2014/08/22, HDFFV-8878) + + Tools + ----- + - None + + High-level APIs + --------------- + - None + + Fortran API + ----------- + - None + + C++ API + ------- + - Initialization of Object IDs + + The data member "id" in classes that represent HDF5 objects were + initialized to 0, which caused problem for some users. + + Replaced 0 with H5I_INVALID_HID to initialize these "id"s. For the + PropList class, H5P_DEFAULT is used instead of H5I_INVALID_HID. + + (BMR - 2014/09/30, HDFFV-4259) + + + +Support for New Platforms, Languages, and Compilers +=================================================== + - None + +Bug Fixes since HDF5-1.8.13 +=========================== + + Configuration + ------------- + - CMake and SVN URLs + + The SVN URLs will be different when the HDF Group domain name changes. + + Removed the SVN URL references in the cacheinit.cmake and release_docs files. + + (ADB - 2014/10/27, HDFFV-8953) + + - CMake Packaging + + A Fortran module was not generated if the compiler was not F2003 + compliant. + + Removed the module name from the package list of Fortran modules because + that module was never generated. This was only an issue for Fortran + compliers that are not F2003 compatible. + + (ADB - 2014/10/16, HDFFV-8932) + + - Shared Library Interface Version Number (soname) + + In order to increase the maintainability of HDF5, an architectural + change was made which required the renaming of several public symbols in + H5Ppublic.h. + + The shared libary interface version number ("soname") has been increased + on account of these changes. For a full list of the changed symbols, see + the interface compatibility report, which is available as a link off of + the 'HDF5 Software Changes from Release to Release' document: + + http://www.hdfgroup.org/HDF5/doc/ADGuide/Changes.html + + (AKC - 2014/10/03, HDFFV-8937) + + - Configure Settings for Mac OSX Need Defaults for PROD_XXX, DEBUG_XXX, + and PROFILE_XXX + + The configure setting files for Mac OSX (config/apple) did not + have the default settings of PROD_XXX, DEBUG_XXX, PROFILE_XXX. + + Added the default settings. Mac platforms now builds library with + "-O3" optimization when the default clang compiler is used. + + (AKC - 2014/10/01, HDFFV-8933) + + - CMake ConfigureChecks + + Two include files were missing from two C tests. + + Propagated the configure test changes to H5_LDOUBLE_TO_INTEGER_WORKS_TEST + and H5_ULLONG_TO_LDOUBLE_PRECISION_TEST to ConfigureChecks.cmake (added + stdlib.h and string.h in the HDFTests.c file). + + (ADB - 2014/09/02 HDFFV-8845) + + - CMake Parallel Test Missing + + The source file was removed in the previous release but the parallel + test t_posix_compliant was not. + + Removed the t_posix_compliant parallel test from the library. + + (ADB - 2014/8/14 HDFFV-8880) + + - Autotools Reconfigure. Bison. Flex. + + The Bison and Flex files were out of date. + + Bison was upgraded to 2.7, and Flex was upgraded to 2.5.37. The + bin/reconfigure script now will execute Bison and Flex and update + the hl/src files. + + (ADB - 2014/06/16 HDFFV-8709) + + - Autotools Reconfigure. m4. + + The m4 macro processor was out of date. + + Reconfigured Autotools with m4 upgraded to 1.4.17. + + (ADB - 2014/06/12 HDFFV-8743) + + - Autotools: Modified configure to add an entry at the beginning of AM_LDFLAGS + for the hdf5 install directory. Without this entry the relink commands + invoked by "make install" to create libraries dependent on libhdf5.so added + a dependency on the first libhdf5.so found in any directory in AM_LDFLAGS + regardless of its version. (LRK - 2014/10/17 HDFFV-8944) + + - Changed Autotools Build Behavior. Fortran High-level Library. + + The Fortran high-level (HL) library did not compile if the default + size of a REAL is DOUBLE PRECISION; the build would fail during + compilation. + + Configure now checks to see if REAL is DOUBLE PRECISION, Fortran is + enabled, and HL library is enabled. If this is true, then configure + will stop with an error message. + + (MSB - 2014/8/11, HDFFV-8883/HDFFV-889) + + + + Library + ------- + - Fixed Identifier Management Code + + Opening an object returns an identifier; closing the object should + free up the identifier. A problem was found where the identifiers + were not being freed up correctly. + + Fixed the problem so that identifiers that have been used can be + used again after their object has been closed. + + (QAK - 2014/10/16, HDFFV-8930) + + - Removal of DllMain() from Static Windows Builds + + A DllMain() function was added in HDF5 1.8.13 in order to handle + win32 thread cleanup. The preprocessor #ifdefs around the DllMain + function allowed it to be compiled when the static library is built, + which is incorrect behavior that can cause linkage problems in + clients. + + The fix was to change the preprocessor #ifdefs to exclude compiling + DllMain() in static builds. Our DllMain function is now only + compiled when the shared, thread-safe library is built on Windows. + + (DER - 2014/06/13, HDFFV-8837) + + - Enforce Constraint on page_size Parameter in H5Pset_core_write_tracking() + + The reference manual states that the page_size parameter cannot be + zero. + + This change checks the page_size parameter to see it is zero and + returns an error code if it is. + + (DER - 2014/08/11, HDFFV-8891) + + - H5Ldelete_by_idx() fails on non-existent group name. + (MSC - 2014/07/31, HDFFV-8888) + + - H5Ldelete_by_idx() Seg Fault on Non-existent Group Name + + If a non-existent group name was used by H5Ldelete_by_idx(), a + segmentation fault would result. + + Bug was fixed. + + (MSC - 2014/07/31, HDFFV-8888) + + - Bug in Test When Building Parallel HDF5 on PVFS2 + + There was a bug in a test when building Parallel HDF5 on PVFS2. + + The build now uses MPI_File_get_size() instead of stat(). + + (MSC - 2014/07/14, HDFFV-8856) + + - MPI-IO Driver Tried to Allocate Space for Zero-length Dataset + + MPI-IO driver tried to allocate space for zero-length dataset + and asserts. + + Fixed driver and added a regression test. + + (MSC - 2014/07/03, HDFFV-8761) + + + Parallel Library + ---------------- + - None + + Performance + ------------- + - None + + Tools + ----- + - None + + Fortran API + ------- + - SIZEOF Replaced by C_SIZEOF and STORAGE_SIZE. + + The intrinsic function SIZEOF is non-standard and should be replaced with a + standard intrinsic function. + + If the F2008 intrinsic C_SIZEOF and STORAGE_SIZE are available, then they will + be used instead of the non-standard SIZEOF intrinsic, even when the SIZEOF + function is available. + + (MSB - 2014/6/16, HDFFV-8653) + + - Non-functional API: h5pget_fill_value_f + + The Fortran wrapper h5pget_fill_value_f was calling the wrong C API. + + The correct C API, H5Pget_fill_value, is now called by the Fortran + wrapper. + + (MSB - 2014/9/25, HDFFV-8879) + + - Interoperability with C HDF5: H5Literate and h5literate_f + + h5literate_f assumes the return value for the callback function to + be of type int (or int_f in C). However, in the C wrapper the return + value of H5Literate is type herr_t, and this could cause + interoperability issues. + + The callback function should be declared INTEGER(C_INT) for + portability. The tests were updated accordingly. + + (MSB - 2014/9/26, HDFFV-8909) + + - Interoperability with C HDF5: Constant INTEGER Parameters with the + H5FD Interface + + Wrong type cast of constant Fortran INTEGER parameters was used. + + The following parameter constant types were changed from INTEGER to + INTEGER(HID_T) to match the C types: H5FD_CORE, H5FD_FAMILY, H5FD_LOG, + H5FD_MPIO, H5FD_MULTI, H5FD_SEC2, and H5FD_STDIO. + + Other internal 'int' types where changed to 'hid_t'; these are + transparent to the user. + + (MSB - 2014/7/18, HDFFV-8748) + + C++ API + ------ + - Memory Leaks + + There were several potential memory leaks in the library due to + dynamically allocated strings not being freed when failure occurs. + + Applied user's patches to remove these potential memory leaks. + + (BMR - 2014/09/30, HDFFV-8928) + + - Disallow H5F_ACC_CREAT + + H5F_ACC_CREAT was included in the C++ API but the C library does not + allow it at this time. + + Removed this flag from the functions in H5File class. + + (BMR - 2014/09/29, HDFFV-8852) + + - Missing Flags in Documentation: H5F_ACC_RDONLY and H5F_ACC_RDWR + + The H5F_ACC_RDONLY and H5F_ACC_RDWR flags were missing from the + documentation of the H5File constructors. + + These two flags are now included in the documentation for opening + files. + + (BMR - 2014/09/29, HDFFV-8852) + + High-level APIs: + ------ + - Seg Faults in H5TBread_field_name and H5TBread_field_name_f + + When H5TBread_field_name or H5TBread_field_name_f were used to read a + field and if the name of the field was wrong, a segmentation fault + would result. + + Both C and Fortran APIs were fixed so they no longer seg fault if + the name of the field is wrong, and both APIs return a negative + value if the name of the field is wrong. + + (MSB - 2014/09/29, HDFFV-8912) + + - Possible Buffer Overflow in High-level (HL) APIs + + Multiple HL APIs (H5DSis_scale is one example) had issues: + (1) The datatype from the file was re-used as the memory datatype, + and + (2) No effort was made to ensure that strings were actually + null-terminated. + + All of the HL routines now check for NULL pointers, for null-terminated + strings, and to see if string buffers are short enough not to overflow + the buffer. The minimum length of the buffers is now used in strncmp + to avoid overflow. + + (MSB - 2014/9/29, HDFFV-8670) + + - Behavior Change of H5LTdtype_to_text + + If a user buffer was passed in to H5LTdtype_to_text along with the + length, then the function would not truncate at the end of the + buffer, but would exceed the end of the user buffer. + + H5LTdtype_to_text was changed to truncate the string if the user + buffer is too small. + + (MSB - 2014/9/29, HDFFV-8855) + + Fortran High-level APIs: + ------ + - See entry for HDFFV-8912 above. + + Testing + ------- + - A subtest in parallel h5diff (ph5diff) testing was bypassed for the + local Linux 32 machine due to unknown issue in the previous version of + Mpich. The failure no long exists in the current Mpich. Therefore the + bypass is removed. (AKC - 2014/11/03 HDFFV-8954) + + - Fixed incorrect exit code values (was -1) in testframe which is commonly + used by several test programs. (AKC - 2014/07/22 HDFFV-8881) + + - Fixed Incorrect Exit Code Values in Testframe + The testframe which is commonly used by several test programs + had some incorrect exit code values. Fixed the incorrect exit code + values. (AKC - 2014/07/22, HDFFV-8881) + +Supported Platforms +=================== +The following platforms are supported and have been tested for this release. +They are built with the configure process unless specified otherwise. + + AIX 5.3 xlc 10.1.0.5 + (NASA G-ADA) xlC 10.1.0.5 + xlf90 12.1.0.6 + + Linux 2.6.18-308.13.1.el5PAE GNU C (gcc), Fortran (gfortran), C++ (g++) + #1 SMP i686 i686 i386 compilers for 32-bit applications; + (jam) Version 4.1.2 20080704 (Red Hat 4.1.2-54) + Version 4.8.2 + PGI C, Fortran, C++ Compilers for 32-bit + applications; + Version 13.7-0 + Intel(R) C, C++, Fortran Compiler for 32-bit + applications; + Version 14.0.2 (Build 20140120) + + Linux 2.6.18-371.6.1.el5 GNU C (gcc), Fortran (gfortran), C++ (g++) + #1 SMP x86_64 GNU/Linux compilers for 64-bit applications; + (koala) Version 4.1.2 20080704 (Red Hat 4.1.2-54) + Version 4.8.2 + Intel(R) C, C++, Fortran Compilers for + applications running on Intel(R) 64; + Version 14.0.2 (Build 20140120) + + Linux 2.6.32-431.11.2.el6 GNU C (gcc), Fortran (gfortran), C++ (g++) + #1 SMP x86_64 GNU/Linux compilers: + (platypus) Version 4.4.7 20120313 + Version 4.8.2 + PGI C, Fortran, C++ for 64-bit target on + x86-64; + Version 13.7-0 + Intel(R) C (icc), C++ (icpc), Fortran (icc) + compilers: + Version 14.0.2 (Build 20140120) + + Linux 2.6.32-431.29.2.el6.ppc64 gcc (GCC) 4.4.7 20120313 (Red Hat 4.4.7-4) + #1 SMP ppc64 GNU/Linux g++ (GCC) 4.4.7 20120313 (Red Hat 4.4.7-4) + (ostrich) GNU Fortran (GCC) 4.4.7 20120313 (Red Hat 4.4.7-4) + IBM XL C/C++ V13.1 + IBM XL Fortran V15.1 + + SunOS 5.11 32- and 64-bit Sun C 5.12 SunOS_sparc + (emu) Sun Fortran 95 8.6 SunOS_sparc + Sun C++ 5.12 SunOS_sparc + + Windows 7 Visual Studio 2008 (cmake) + Visual Studio 2010 w/ Intel Fortran 14 (cmake) + Visual Studio 2012 w/ Intel Fortran 14 (cmake) + Visual Studio 2013 w/ Intel Fortran 14 (cmake) + Cygwin(CYGWIN_NT-6.1 1.7.32(0.274/5/3) gcc(4.8.3) compiler and gfortran) + (cmake and autotools) + + Windows 7 x64 Visual Studio 2008 (cmake) + Visual Studio 2010 w/ Intel Fortran 14 (cmake) + Visual Studio 2012 w/ Intel Fortran 14 (cmake) + Visual Studio 2013 w/ Intel Fortran 14 (cmake) + + Windows 8.1 Visual Studio 2012 w/ Intel Fortran 14 (cmake) + Visual Studio 2013 w/ Intel Fortran 14 (cmake) + + Windows 8.1 x64 Visual Studio 2012 w/ Intel Fortran 14 (cmake) + Visual Studio 2013 w/ Intel Fortran 14 (cmake) + + Mac OS X Lion 10.7.5 Apple clang/clang++ version 3.0 from Xcode 4.6.1 + 64-bit gfortran GNU Fortran (GCC) 4.8.2 + (duck) Intel icc/icpc/ifort version 13.0.3 + + Mac OS X Mt. Lion 10.8.5 Apple clang/clang++ version 5.1 from Xcode 5.1 + 64-bit gfortran GNU Fortran (GCC) 4.8.2 + (swallow/kite) Intel icc/icpc/ifort version 14.0.2 + + Mac OS X Mavericks 10.9.5 Apple clang/clang++ version 6.0 from Xcode 6.0.1 + 64-bit gfortran GNU Fortran (GCC) 4.8.2 + (wren) Intel icc/icpc/ifort version 14.0.2 + + +Tested Configuration Features Summary +===================================== + + In the tables below + y = tested + n = not tested in this release + C = Cluster + W = Workstation + x = not working in this release + dna = does not apply + ( ) = footnote appears below second table + = testing incomplete on this feature or platform + +Platform C F90/ F90 C++ zlib SZIP + parallel F2003 parallel +Solaris2.11 32-bit n y/y n y y y +Solaris2.11 64-bit n y/y n y y y +Windows 7 y y/y n y y y +Windows 7 x64 y y/y n y y y +Windows 7 Cygwin n y/y n y y n +Windows 8.1 n y/y n y y y +Windows 8.1 x64 n y/y n y y y +Mac OS X Lion 10.7.5 64-bit n y/y n y y y +Mac OS X Mountain Lion 10.8.5 64-bit n y/y n y y y +Mac OS X Mavericks 10.9.5 64-bit n y/y n y y ? +AIX 5.3 32- and 64-bit n y/n n y y y +CentOS 5.9 Linux 2.6.18-308 i686 GNU y y/y y y y y +CentOS 5.9 Linux 2.6.18-308 i686 Intel n y/y n y y y +CentOS 5.9 Linux 2.6.18-308 i686 PGI n y/y n y y y +CentOS 5.9 Linux 2.6.18 x86_64 GNU n y/y n y y y +CentOS 5.9 Linux 2.6.18 x86_64 Intel n y/y n y y y +CentOS 6.4 Linux 2.6.32 x86_64 GNU y y/y y y y y +CentOS 6.4 Linux 2.6.32 x86_64 Intel n y/y n y y y +CentOS 6.4 Linux 2.6.32 x86_64 PGI n y/y n y y y +Linux 2.6.32-431.11.2.el6.ppc64 n y/n n y y y + +Platform Shared Shared Shared Thread- + C libs F90 libs C++ libs safe +Solaris2.11 32-bit y y y y +Solaris2.11 64-bit y y y y +Windows 7 y y y y +Windows 7 x64 y y y y +Windows 7 Cygwin n n n y +Windows 8.1 y y y y +Windows 8.1 x64 y y y y +Mac OS X Lion 10.7.5 64-bit y n y y +Mac OS X Mountain Lion 10.8.5 64-bit y n y y +Mac OS X Mavericks 10.9.5 64-bit y n y y +AIX 5.3 32- and 64-bit y n n y +CentOS 5.9 Linux 2.6.18-308 i686 GNU y y y y +CentOS 5.9 Linux 2.6.18-308 i686 Intel y y y n +CentOS 5.9 Linux 2.6.18-308 i686 PGI y y y n +CentOS 5.9 Linux 2.6.18 x86_64 GNU y y y y +CentOS 5.9 Linux 2.6.18 x86_64 Intel y y y n +CentOS 6.4 Linux 2.6.32 x86_64 GNU y y y n +CentOS 6.4 Linux 2.6.32 x86_64 Intel y y y n +CentOS 6.4 Linux 2.6.32 x86_64 PGI y y y n +Linux 2.6.32-431.11.2.el6.ppc64 y y y n + +Compiler versions for each platform are listed in the preceding +"Supported Platforms" table. + + +More Tested Platforms +===================== +The following platforms are not supported but have been tested for this release. + + Linux 2.6.18-308.13.1.el5PAE MPICH mpich 3.1.2 compiled with + #1 SMP i686 i686 i386 gcc 4.9.1 and gfortran 4.9.1 + (jam) g95 (GCC 4.0.3 (g95 0.94!) + + Linux 2.6.18-431.11.2.el6 MPICH mpich 3.1.2 compiled with + #1 SMP x86_64 GNU/Linux gcc 4.9.1 and gfortran 4.9.1 + (platypus) g95 (GCC 4.0.3 (g95 0.94!) + + FreeBSD 8.2-STABLE i386 gcc 4.5.4 [FreeBSD] 20110526 + (loyalty) gcc 4.6.1 20110527 + g++ 4.6.1 20110527 + gfortran 4.6.1 20110527 + + FreeBSD 8.2-STABLE amd64 gcc 4.5.4 [FreeBSD] 20110526 + (freedom) gcc 4.6.1 20110527 + g++ 4.6.1 20110527 + gfortran 4.6.1 20110527 + + Debian7.5.0 3.2.0-4-amd64 #1 SMP Debian 3.2.51-1 x86_64 GNU/Linux + gcc (Debian 4.7.2-5) 4.7.2 + GNU Fortran (Debian 4.7.2-5) 4.7.2 + (cmake and autotools) + + Fedora20 3.15.3-200.fc20.x86_64 #1 SMP x86_64 x86_64 x86_64 GNU/Linux + gcc (GCC) 4.8.3 20140624 (Red Hat 4.8.3-1) + GNU Fortran (GCC) 4.8.3 20140624 (Red Hat 4.8.3-1) + (cmake and autotools) + + SUSE 13.1 3.11.10-17-desktop #1 SMP PREEMPT x86_64 x86_64 x86_64 GNU/Linux + gcc (SUSE Linux) 4.8.1 + GNU Fortran (SUSE Linux) 4.8.1 + (cmake and autotools) + + Ubuntu 14.04 3.13.0-35-generic #62-Ubuntu SMP x86_64 GNU/Linux + gcc (Ubuntu/Linaro 4.9.1-0ubuntu1) 4.9.1 + GNU Fortran (Ubuntu/Linaro 4.9.1-0ubuntu1) 4.9.1 + (cmake and autotools) + + Cray Linux Environment (CLE) PrgEnv-pgi/4.2.34 + hopper.nersc.gov pgcc 13.6-0 64-bit target on x86-64 Linux -tp istanbul + pgf90 13.6-0 64-bit target on x86-64 Linux -tp istanbul + pgCC 13.6-0 64-bit target on x86-64 Linux -tp istanbul + + +Known Problems +============== +* On cygwin platforms the feature to load dynamic filter libraries only looks + for libraries with the a so extension. Support for cygwin cygxxx.dll libraries + is planned for the next release. + (ADB - 2014/11/04 - HDFFV-8736) + +* On windows platforms in debug configurations, the VFD flush1 tests will fail + with the split and multi VFD drivers. These tests will display a modal debug + dialog which must be answered or wait for the test timeout to expire. + The flush1 and flush2 tests will be skipped under debug for this release. + (ADB - 2014/06/23 - HDFFV-8851) + +* CLANG compiler with the options -fcatch-undefined-behavior and -ftrapv + catches some undefined behavior in the alignment algorithm of the macro DETECT_I + in H5detect.c (Issue 8147). Since the algorithm is trying to detect the alignment + of integers, ideally the flag -fcatch-undefined-behavior shouldn't to be used for + H5detect.c. In the future, we can separate flags for H5detect.c from the rest of + the library. (SLU - 2013/10/16) + +* Make provided by Solaris fails in "make check". Solaris users should use + gmake to build and install the HDF5 software. (AKC - 2013/10/08 - HDFFV-8534) + +* The h5dump and h5diff utilities occasionally produce different output + between Linux and Windows systems. This is caused by lower-level library + routines that fail to write fill values to the user's buffer when reading + unallocated chunks from datasets that have a fill value set to + H5D_FILL_VALUE_DEFAULT. Due to platform differences the return of + spurious data values has only been encountered on Windows 32-bit systems. + (Issue HDFFV-8247; JP - 2013/03/27) + +* The C++ and FORTRAN bindings are not currently working on FreeBSD with the + native release 8.2 compilers (4.2.1), but are working with gcc 4.6 from the + ports (and probably gcc releases after that). + (QAK - 2012/10/19) + +* The STDIO VFD does not work on some architectures, possibly due to 32/64 + bit or large file issues. The basic STDIO VFD test is known to fail on + 64-bit SunOS 5.10 on SPARC when built with -m64 and 32-bit OS X/Darwin + 10.7.0. The STDIO VFD test has been disabled while we investigate and + a fix should appear in a future release. + (DER - 2011/10/14 - HDFFV-8235) + +* h5diff can report inconsistent results when comparing datasets of enum type + that contain invalid values. This is due to how enum types are handled in + the library and will be addressed in a future release. + (DER - 2011/10/14 - HDFFV-7527) + +* The links test can fail under the stdio VFD due to some issues with external + links. This will be investigated and fixed in a future release. + (DER - 2011/10/14 - HDFFV-7768) + +* After the shared library support was fixed for some bugs, it was discovered + that "make prefix=XXX install" no longer works for shared libraries. It + still works correctly for static libraries. Therefore, if you want to + install the HDF5 shared libraries in a location such as /usr/local/hdf5, + you need to specify the location via the --prefix option during configure + time. E.g, ./configure --prefix=/usr/local/hdf5 ... + (AKC - 2011/05/07 - HDFFV-7583) + +* The parallel test, t_shapesame, in testpar/, may run for a long time and may + be terminated by the alarm signal. If that happens, one can increase the + alarm seconds (default is 1200 seconds = 20 minutes) by setting the + environment variable, $HDF5_ALARM_SECONDS, to a larger value such as 3600 + (60 minutes). Note that the t_shapesame test may fail in some systems + (see the "While working on the 1.8.6 release..." problem below). If + it does, it will waste more time if $HDF5_ALARM_SECONDS is set + to a larger value. + (AKC - 2011/05/07) + +* Shared Fortran libraries are not quite working on AIX. While they are + generated when --enable-shared is specified, the fortran and hl/fortran + tests fail. We are looking into the issue. HL and C++ shared libraries + should now be working as intended, however. + (MAM - 2011/04/20) + +* The --with-mpe configure option does not work with Mpich2. + (AKC - 2011/03/10) + +* While working on the 1.8.6 release of HDF5, a bug was discovered that can + occur when reading from a dataset in parallel shortly after it has been + written to collectively. The issue was exposed by a new test in the parallel + HDF5 test suite, but had existed before that. We believe the problem lies with + certain MPI implementations and/or file systems. + + We have provided a pure MPI test program, as well as a standalone HDF5 + program, that can be used to determine if this is an issue on your system. + They should be run across multiple nodes with a varying number of processes. + These programs can be found at: + http://www.hdfgroup.org/ftp/HDF5/examples/known_problems/ + (NAF - 2011/01/19) + +* All the VFL drivers aren't backward compatible. In H5FDpublic.h, the + structure H5FD_class_t changed in 1.8. There is new parameter added to + get_eoa and set_eoa callback functions. A new callback function + get_type_map was added in. The public function H5FDrealloc was taken + out in 1.8. The problem only happens when users define their own driver + for 1.6 and try to plug in 1.8 library. Because there's only one user + complaining about it, we (Elena, Quincey, and I) decided to leave it as + it is (see bug report #1279). Quincey will make a plan for 1.10. + (SLU - 2010/02/02) + +* The --enable-static-exec configure flag will only statically link libraries + if the static version of that library is present. If only the shared version + of a library exists (i.e., most system libraries on Solaris, AIX, and Mac, + for example, only have shared versions), the flag should still result in a + successful compilation, but note that the installed executables will not be + fully static. Thus, the only guarantee on these systems is that the + executable is statically linked with just the HDF5 library. + (MAM - 2009/11/04) + +* Parallel tests failed with 16 processes with data inconsistency at testphdf5 + / dataset_readAll. Parallel tests also failed with 32 and 64 processes with + collective abort of all ranks at t_posix_compliant / allwrite_allread_blocks + with MPI IO. + (CMC - 2009/04/28) + +* A dataset created or rewritten with a v1.6.3 library or after cannot be read + with the v1.6.2 library or before when the Fletcher32 EDC filter is enabled. + There was a bug in the calculation of the Fletcher32 checksum in the + library before v1.6.3; the checksum value was not consistent between big- + endian and little-endian systems. This bug was fixed in Release 1.6.3. + However, after fixing the bug, the checksum value was no longer the same as + before on little-endian system. Library releases after 1.6.4 can still read + datasets created or rewritten with an HDF5 library of v1.6.2 or before. + (SLU - 2005/06/30) + + +%%%%1.8.13%%%% + + +HDF5 version 1.8.13 released on 2014-05-05 +================================================================================ + +INTRODUCTION +============ + +This document describes the differences between HDF5-1.8.12 and +HDF5-1.8.13, and contains information on the platforms tested and +known problems in HDF5-1.8.13. +For more details, see the files HISTORY-1_0-1_8_0_rc3.txt +and HISTORY-1_8.txt in the release_docs/ directory of the HDF5 source. + +Links to the HDF5 1.8.13 source code, documentation, and additional materials +can be found on the HDF5 web page at: + + http://www.hdfgroup.org/products/hdf5/ + +The HDF5 1.8.13 release can be obtained from: + + http://www.hdfgroup.org/HDF5/release/obtain5.html + +User documentation for 1.8.13 can be accessed directly at this location: + + http://www.hdfgroup.org/HDF5/doc/ + +New features in the HDF5-1.8.x release series, including brief general +descriptions of some new and modified APIs, are described in the "What's New +in 1.8.0?" document: + + http://www.hdfgroup.org/HDF5/doc/ADGuide/WhatsNew180.html + +All new and modified APIs are listed in detail in the "HDF5 Software Changes +from Release to Release" document, in the section "Release 1.8.13 (current +release) versus Release 1.8.12": + + http://www.hdfgroup.org/HDF5/doc/ADGuide/Changes.html + +If you have any questions or comments, please send them to the HDF Help Desk: + + help@hdfgroup.org + + +CONTENTS +======== + +- New Features +- Support for New Platforms, Languages, and Compilers +- Bug Fixes since HDF5-1.8.12 +- Supported Platforms +- Supported Configuration Features Summary +- More Tested Platforms +- Known Problems + + +New Features +============ + + Configuration + ------------- + - Autotools: Automake updated to 1.14.1 (ADB - 2014/04/08) + + - CMake: Moved minimum CMake version to 2.8.11 which enables better library + include processing. (ADB - 2014/03/26) + + - When configuring a thread-safe HDF5 Library it is no longer necessary + to specify --enable-threadsafe with --with-pthreads if the Pthreads + library is in a standard location. (DER - 2014/04/11 HDFFV-8693) + + Library + ------- + - Added an H5free_memory API call. This should be used to free memory + that has been allocated by HDF5 API calls. H5Tget_member_name and + H5Pget_class_name are two examples. The main motivation for this call + is Windows, where it is common for application code and the HDF5 Library + to be using different C run-time libraries (CRT). Using the new call + ensures that the same CRT handles both the allocation and free. This + new function can also be useful in any case where the library uses a + different memory manager than the application, such as when a debug + memory manager is in use or when the HDF5 Library is wrapped for use + in a managed language like Python or Java. Fixes HDFFV-7710, 8519, + and 8851. (DER - 2014/04/11) + + - The Core VFD (aka Memory VFD) can now be configured to track dirty + regions in the file and only write out the changed regions on + flush/close. Additionally, a "page aggregation" size can be set that + will aggregate small writes into larger writes. For example, setting + a 1 MiB page aggregation size will logically partition the the + in-memory file into 1 MiB pages that will be written out in their + entirety if even a single byte is dirtied. The feature is controlled + via the new H5Pset/get_core_write_tracking() API call. A new + "core_paged" target has been added to the check-vfd target in + test/Makefile.am that exercises the feature over all HDF5 VFD-aware + tests. (DER - 2014/04/12) + + Parallel Library + ---------------- + - Removed MPI-POSIX VFD, as it wasn't helping anyone and was just + generating support questions. Application developers performing + parallel I/O should always use the MPI-IO VFD. + (QAK - 2014/03/28 HDFFV-8659) + + - Improved parallel I/O support to allow collective I/O on point + selections. (QAK - 2014/03/15) + + Tools + ----- + - None + + High-Level APIs + --------------- + - None + + Fortran API + ----------- + - Wrappers h5pset_file_image_f and h5pget_file_image_f were added to the + library. (MSB - 2014/1/2014) + + C++ API + ------- + - The following new features are added: + + Wrappers to class H5Object to get an object's name (HDFFV-8548). + ssize_t getObjName(char *obj_name, size_t buf_size = 0) + ssize_t getObjName(H5std_string& obj_name, size_t len = 0) + H5std_string getObjName() + + Wrappers to class H5CommonFG to get a child object's type from a + group or file (HDFFV-8367). + H5O_type_t childObjType(const H5std_string& objname) + H5O_type_t childObjType(const char* objname) + H5O_type_t childObjType(hsize_t index, + H5_index_t index_type=H5_INDEX_NAME, + H5_iter_order_t order=H5_ITER_INC, const char* objname=".") + + Wrappers to class DSetMemXferPropList for setting/getting a transform + property list (HDFFV-7907). + DSetMemXferPropList(const char* expression); + void setDataTransform(const char* expression) + void setDataTransform(const H5std_string& expression) + ssize_t getDataTransform(char* exp, size_t buf_size=0) + H5std_string getDataTransform() + + Wrapper to CompType for setting size to compound datatype (HDFFV-8642). + void setSize(size_t size) + + Overloaded functions to provide prototypes that declare constant + arguments const (HDFFV-3384). These include: + DataSet::fillMemBuf + DataSet::getVlenBufSize + DataSpace::extentCopy + DataType::commit + FileAccPropList::setSplit + H5File::getVFDHandle + + Additional overload to class H5Location to get a comment as a char* + ssize_t getComment(const char* name, size_t buf_size, char* comment) + + Additional overloads to class Attribute to get an attribute's name for + convenience: + ssize_t getName(char* attr_name, size_t buf_size=0) + ssize_t getName(H5std_string& attr_name, size_t buf_size=0) + (BMR, 2014/04/15) + + A static wrapper to Exception for printing the error stack without an + instance of Exception + static void printErrorStack(FILE* stream = stderr, + hid_t err_stack = H5E_DEFAULT); + (BMR, 2014/04/25) + + +Support for New Platforms, Languages, and Compilers +=================================================== + Mac OS X 10.6 Snow Leopard is not supported by Apple any more. In view of + the added support of Mac OS X 10.9, Mac OS X 10.6 is retired from HDF5 + supported platforms. (AKC - 2014/03/14 HDFFV-8704) + + Mac OS X 10.9 Mavericks is supported. (AKC - 2014/03/04 HDFFV-8694) + + +Bug Fixes since HDF5-1.8.12 +=========================== + + Configuration + ------------- + - CMake: When CMake commands are executed individually on the command line + and the external filters are being built, the CMAKE_BUILD_TYPE define + must be set to the same value as the configuration + (-DCMAKE_BUILD_TYPE:STRING=Release if using -C Release). This is needed + by the the szip and zlib filter build commands. (ADB - HDFFV-8695) + + - CMake: Removed use of the XLATE_UTILITY program. + (ADB - 2014/03/28 HDFFV-8640) + + - CMake: Added missing quotes in setting the CMAKE_EXE_LINKER_FLAGS for the + MPI option. (ADB - 2014/02/27 HDFFV-8674) + + - CMake: Configuration of the HDF5 C++ or Fortran libraries with the + thread-safety feature. + + C++ and/or Fortran + thread-safe is enforced as a non-supported + configuration. This matches the autotools. (DER - 2014/04/11) + + - CMake: Configuration of static HDF5 C library with the thread-safety + feature. + + Static + thread-safe + Win32 threads is not a supported configuration + due to the inability to automatically clean up thread-local storage. + This is expected to be fixed in a future release. In the meantime, a + work-around that uses internal functionality may allow the combination + to be used without resource leaks. Contact the help desk for more + information. (DER - 2014/04/11) + + - Autotools: Several changes were done to configure and installcheck. + + An export of LD_LIBRARY_PATH= was + removed from configure; make installcheck was revised to run + scripts installed in share/hdf5_examples to use the installed h5cc, etc. + to compile and run example source files also installed there. + + Make installcheck will now fail when a shared szip or other external lib + file cannot be found in the same manner that executables compiled and + linked with h5cc will fail to run when those lib files cannot be found + after install. Make installcheck should pass after setting + LD_LIBRARY_PATH to the szip location. (LRK - 2014/04/16) + + Library + ------- + - A Gnu Make directive (.NOTPARALLEL) is added to fortran/test/Makefile. + + AIX native make does not support this directive and would fail if + parallel make (e.g. make -j4) is used to build the library. AIX users + either do not use parallel make or install Gnu Make to build the library. + (AKC 2014/04/08 HDFFV-8738) + + - H5R.c: H5Rget_name gave an assertion failure if the "name" parameter + was NULL. + + Fixed H5Rget_name to return the size of the buffer needed to read a + name of the referenced object in this case. The size doesn't include + the NULL terminator. H5Rget_name returns negative on failure. + (MSB - 2014/01/22 HDFFV-8620) + + - H5Z.c: H5Zfilter_avail didn't check if a filter was available as a + dynamically loaded filter. The error manifested itself in the h5repack + tool when removing user-defined dynamically loaded filter. + + Added a code to find the filter among the dynamically loaded filters + after the function fails to find it among the registered filters. + (ADB - 2014/03/03 HDFFV-8629) + + - Memory leak: a memory leak was observed in conjunction to the + H5TS_errstk_key_g thread-local variable allocated in the H5E_get_stack + function in H5E.c. + + The shared HDF5 thread-safe library now no longer leaks thread-local + storage resources on Windows with Win32 threads. Currently, there is + no solution for this problem when HDF5 is statically built. We + disabled the build of the static HDF5 thread-safe library with + Win32 threads. (DER - 2014/04/11 HDFFV-8518) + + - H5Dio.c: Improved handling of NULL pointers to H5Dread/H5Dwrite + calls. Credit to Jason Newton (nevion@gmail.com) for the original patch. + + H5Dwrite/read failed when a NULL pointer was passed for a data buffer + and 0 elements were selected. Fixed. (QAK - 2014/04/16 HDFFV-8705) + + - Deprecated API (1_6 API): Improved handling of closing the library and + re-accessing it with a deprecated routine. + + When a program used a deprecated API (for example, H5Gcreate1), + closed the library, and reopened it again to access a group, dataset, + datatype, dataspace, attribute, or property list, HDF5 failed to + provide an identifier for the object. Fixed. + (NAF, QAK - 2014/04/16 HDFFV-8232) + + Parallel Library + ---------------- + - Fixed a missing H5F_Provisional module in HDF5mpio.f90 + (MSB - 2014/2/7 HDFFV-8651) + + Performance + ------------- + - None + + Tools + ----- + - The h5diff tool would report that a datafile compared with an exact + copy of the same datafile had differences. This was due to the issue + below of reading un-written chunks. This problem is also fixed. + (AKC - 2014/05/01 HDFFV-8637) + + - The h5dump and h5diff utilities occasionally produced different output + between Linux and Windows systems. This has been fixed. + + This happened to datasets that used chunked storage, with default fill + values, and some of the chunks had not been written. + When the dataset was read, the library failed to write the default fill + values to parts of the use buffer that were associated with the unwritten + chunks. (JP - 2014/05/01 HDFFV-8247) + + - The compress option is retired from bin/release. + (AKC - 2014/04/25 HDFFV-8755) + + - bin/release has a new option "zip" that produces a release zip file for + the Windows platform. (AKC - 2014/04/24 HDFFV-8433) + + - h5diff: Several failures relating to handling of strings attributes + are fixed. + + The tool crashed or gave an error message when one of the strings had + fixed size type and another variable-length size type. h5diff now flags such + strings as "not comparable". We plan to enhance the tool to handle + strings of the different types in the future releases. + (AKC - 2014/04/18 HDFFV-8625, 8639, 8745) + + - h5repack: h5repack would not remove user-defined filters. + Fixed by modifying h5repack to check if the filter is registered or + can be dynamically loaded. (ADB - 2014/03/03 HDFFV-8629) + + F90 API + ------- + - H5D_CHUNK_CACHE_NSLOTS_DFLT_F and H5D_CHUNK_CACHE_NBYTES_DFLT_F were + changed from the default KIND for INTEGER to INTEGER of KIND size_t. + (MSB - 2014/3/31 HDFFV-8689) + + C++ API + ------ + - Added throw() to all exception destructors. Credit to Jason Newton + (nevion@gmail.com) for the patch. (BMR - 2014/4/15 HDFFV-8623) + - Changed the default value for H5Location::getComment from 256 to 0 + to conform to C function and because it makes more sense. + (BMR - 2014/4/15) + + High-Level APIs: + ------ + - None + + Fortran High-Level APIs: + ------ + - None + + Testing + ------- + - testhdf5 now exits with EXIT_SUCCESS(0) if no errors, else + EXIT_FAILURE(1). (AKC - 2014/01/27 HDFFV-8572) + + - The big test now pays attention to the HDF5_DRIVER environment variable. + Previously, it would run all tests with the family, stdio, and sec2 + virtual file drivers (VFDs) for each VFD in the check-vfd make target, + regardless of the variable setting. It now checks the variable and + either runs the appropriate VFD-specific tests or skips as needed. + This saves much testing time. Fixes HDFFV-8554. (DER - 2014/04/11) + +Supported Platforms +=================== +The following platforms are supported and have been tested for this release. +They are built with the configure process unless specified otherwise. + + AIX 5.3 xlc 10.1.0.5 + (NASA G-ADA) xlC 10.1.0.5 + xlf90 12.1.0.6 + gmake v3.82 + + Linux 2.6.18-308.13.1.el5PAE GNU C (gcc), Fortran (gfortran), C++ (g++) + #1 SMP i686 i686 i386 compilers for 32-bit applications; + (jam) Version 4.1.2 20080704 (Red Hat 4.1.2-54) + Version 4.8.2 + PGI C, Fortran, C++ Compilers for 32-bit + applications; + Version 13.7-0 + Intel(R) C, C++, Fortran Compiler for 32-bit + applications; + Version 14.0.2 (Build 20140120) + + Linux 2.6.18-371.6.1.el5 GNU C (gcc), Fortran (gfortran), C++ (g++) + #1 SMP x86_64 GNU/Linux compilers for 64-bit applications; + (koala) Version 4.1.2 20080704 (Red Hat 4.1.2-54) + Version 4.8.2 + PGI C, Fortran, C++ for 64-bit target on + x86-64; + Version 13.7-0 + Intel(R) C, C++, Fortran Compilers for + applications running on Intel(R) 64; + Version 14.0.2 (Build 20140120) + + Linux 2.6.32-431.11.2.el6 GNU C (gcc), Fortran (gfortran), C++ (g++) + #1 SMP x86_64 GNU/Linux compilers: + (platypus) Version 4.4.7 20120313 + Version 4.8.2 + PGI C, Fortran, C++ for 64-bit target on + x86-64; + Version 13.7-0 + Intel(R) C (icc), C++ (icpc), Fortran (icc) + compilers: + Version 14.0.2 (Build 20140120) + + Linux 2.6.32-431.11.2.el6.ppc64 gcc (GCC) 4.4.7 20120313 (Red Hat 4.4.7-3) + #1 SMP ppc64 GNU/Linux g++ (GCC) 4.4.7 20120313 (Red Hat 4.4.7-3) + (ostrich) GNU Fortran (GCC) 4.4.7 20120313 (Red Hat 4.4.7-3) + IBM XL C/C++ V11.1 + IBM XL Fortran V13.1 + + SunOS 5.11 32- and 64-bit Sun C 5.12 SunOS_sparc + (emu) Sun Fortran 95 8.6 SunOS_sparc + Sun C++ 5.12 SunOS_sparc + + Windows 7 Visual Studio 2008 w/ Intel Fortran 14 (cmake) + Visual Studio 2010 w/ Intel Fortran 14 (cmake) + Visual Studio 2012 w/ Intel Fortran 14 (cmake) + Cygwin(CYGWIN_NT-6.1 1.7.28(0.271/5/3) gcc(4.8.2) compiler and gfortran) + (cmake and autotools) + + Windows 7 x64 Visual Studio 2008 w/ Intel Fortran 14 (cmake) + Visual Studio 2010 w/ Intel Fortran 14 (cmake) + Visual Studio 2012 w/ Intel Fortran 14 (cmake) + + Windows 8.1 Visual Studio 2012 w/ Intel Fortran 14 (cmake) + + Windows 8.1 x64 Visual Studio 2012 w/ Intel Fortran 14 (cmake) + + Mac OS X Lion 10.7.3 Apple clang/clang++ version 3.0 from Xcode 4.6.1 + 64-bit gfortran GNU Fortran (GCC) 4.6.2 + (duck) Intel icc/icpc/ifort version 13.0.3 + + Mac OS X Mt. Lion 10.8.5 Apple clang/clang++ version 5.0 from Xcode 5.0.2 + 64-bit gfortran GNU Fortran (GCC) 4.8.2 + (swallow/kite) Intel icc/icpc/ifort version 14.0.2 + + Mac OS X Mavericks 10.9.2 Apple clang/clang++ version 5.1 from Xcode 5.1 + 64-bit gfortran GNU Fortran (GCC) 4.8.2 + (wren/quail) Intel icc/icpc/ifort version 14.0.2 + + +Tested Configuration Features Summary +===================================== + + In the tables below + y = tested + n = not tested in this release + C = Cluster + W = Workstation + x = not working in this release + dna = does not apply + ( ) = footnote appears below second table + = testing incomplete on this feature or platform + +Platform C F90/ F90 C++ zlib SZIP + parallel F2003 parallel +Solaris2.11 32-bit n y/y n y y y +Solaris2.11 64-bit n y/y n y y y +Windows 7 y y/y n y y y +Windows 7 x64 y y/y n y y y +Windows 7 Cygwin n y/y n y y y +Windows 8.1 n y/y n y y y +Windows 8.1 x64 n y/y n y y y +Mac OS X Lion 10.7.3 64-bit n y/y n y y y +Mac OS X Mountain Lion 10.8.1 64-bit n y/y n y y y +Mac OS X Mavericks 10.9.1 64-bit n y/y n y y y +AIX 5.3 32- and 64-bit n y/n n y y y +CentOS 5.9 Linux 2.6.18-308 i686 GNU y y/y y y y y +CentOS 5.9 Linux 2.6.18-308 i686 Intel n y/y n y y y +CentOS 5.9 Linux 2.6.18-308 i686 PGI n y/y n y y y +CentOS 5.9 Linux 2.6.18 x86_64 GNU n y/y n y y y +CentOS 5.9 Linux 2.6.18 x86_64 Intel n y/y n y y y +CentOS 6.4 Linux 2.6.32 x86_64 GNU y y/y y y y y +CentOS 6.4 Linux 2.6.32 x86_64 Intel n y/y n y y y +CentOS 6.4 Linux 2.6.32 x86_64 PGI n y/y n y y y +Linux 2.6.32-431.11.2.el6.ppc64 n y/n n y y y +OpenVMS IA64 V8.4 n y/n n y y n + +Platform Shared Shared Shared Thread- + C libs F90 libs C++ libs safe +Solaris2.11 32-bit y y y y +Solaris2.11 64-bit y y y y +Windows 7 y y y y +Windows 7 x64 y y y y +Windows 7 Cygwin n n n y +Windows 8.1 y y y y +Windows 8.1 x64 y y y y +Mac OS X Lion 10.7.3 64-bit y n y y +Mac OS X Mountain Lion 10.8.1 64-bit y n y y +Mac OS X Mavericks 10.9.1 64-bit y n y y +AIX 5.3 32- and 64-bit y n n y +CentOS 5.9 Linux 2.6.18-308 i686 GNU y y y y +CentOS 5.9 Linux 2.6.18-308 i686 Intel y y y n +CentOS 5.9 Linux 2.6.18-308 i686 PGI y y y n +CentOS 5.9 Linux 2.6.18 x86_64 GNU y y y y +CentOS 5.9 Linux 2.6.18 x86_64 Intel y y y n +CentOS 6.4 Linux 2.6.32 x86_64 GNU y y y n +CentOS 6.4 Linux 2.6.32 x86_64 Intel y y y n +CentOS 6.4 Linux 2.6.32 x86_64 PGI y y y n +Linux 2.6.32-431.11.2.el6.ppc64 y y y n +OpenVMS IA64 V8.4 n n n n + +Compiler versions for each platform are listed in the preceding +"Supported Platforms" table. + + +More Tested Platforms +===================== +The following platforms are not supported but have been tested for this release. + + Linux 2.6.18-308.13.1.el5PAE MPICH mpich 3.1 compiled with + #1 SMP i686 i686 i386 gcc 4.8.2 and gfortran 4.8.2 + (jam) g95 (GCC 4.0.3 (g95 0.94!) + + Linux 2.6.18-431.11.2.el6 MPICH mpich 3.1 compiled with + #1 SMP x86_64 GNU/Linux gcc 4.8.2 and gfortran 4.8.2 + (platypus) g95 (GCC 4.0.3 (g95 0.94!) + + FreeBSD 8.2-STABLE i386 gcc 4.5.4 [FreeBSD] 20110526 + (loyalty) gcc 4.6.1 20110527 + g++ 4.6.1 20110527 + gfortran 4.6.1 20110527 + + FreeBSD 8.2-STABLE amd64 gcc 4.5.4 [FreeBSD] 20110526 + (freedom) gcc 4.6.1 20110527 + g++ 4.6.1 20110527 + gfortran 4.6.1 20110527 + + Debian7.1.0 3.2.0-4-amd64 #1 SMP Debian 3.2.51-1 x86_64 GNU/Linux + gcc (Debian 4.7.2-5) 4.7.2 + GNU Fortran (Debian 4.7.2-5) 4.7.2 + (cmake and autotools) + + Fedora20 3.11.10-301.fc20.x86_64 #1 SMP x86_64 x86_64 x86_64 GNU/Linux + gcc (GCC) 4.8.2 20131212 (Red Hat 4.8.2-7) + GNU Fortran (GCC) 4.8.2 20130603 (Red Hat 4.8.2-7) + (cmake and autotools) + + SUSE 13.1 3.11.6-4-desktop #1 SMP PREEMPT x86_64 x86_64 x86_64 GNU/Linux + gcc (SUSE Linux) 4.8.1 + GNU Fortran (SUSE Linux) 4.8.1 + (cmake and autotools) + + Ubuntu 13.10 3.11.0-13-generic #20-Ubuntu SMP x86_64 GNU/Linux + gcc (Ubuntu/Linaro 4.8.1-10ubuntu8) 4.8.1 + GNU Fortran (Ubuntu/Linaro 4.8.1-10ubuntu8) 4.8.1 + (cmake and autotools) + + Cray Linux Environment (CLE) PrgEnv-pgi/4.0.46 + hopper.nersc.gov pgcc 12.5-0 64-bit target on x86-64 Linux -tp shanghai + pgf90 12.5-0 64-bit target on x86-64 Linux -tp shanghai + pgCC 12.5-0 64-bit target on x86-64 Linux -tp shanghai + + +Known Problems +============== +* When reading or writing a dataset (H5Dread/H5Dwrite) with a large selection + size (e.g., 2GB ~= 500 million of 4 bytes integers or floating point + numbers), some I/O systems may not be able to process it correctly. + We advise users to find out system limits before using large selections. If + I/O size limits exist, application should use HDF5 partial I/O capabilities + (e.g., H5Sselect_hyperslab(...)) to divide large requests into smaller sizes. + In this case we also advise users not to use chunk storage sizes larger that + 2GB since the HDF5 library performs I/O on the entire chunk. We will work + on the HDF5 library to divide large data requests to smaller I/O requests. + (AKC 2014/05/02 HDFFV-8479) + +* Due to an Intel compiler bug introduced in version 14.0.1, the HDF5 FORTRAN + wrappers do not work with configure option --enable-fortran2003. + However, the option --enable-fortran works with Intel 14.0.1. The compiler + bug was fixed in Intel version 14.0.2 and resolved the issue. + (MSB - 2014/4/15) + +* Due to a PGI compiler bug introduced in versions before 13.3 and versions + after 14.2, the FORTRAN test 'Testing get file image' will fail. + (MSB - 2014/4/15) + +* On CYGWIN, when building the library dynamically, testing will fail on + dynamically loaded filters. The test process will build dynamic filter + libraries with the *.dll.a extension, and the HDF5 Library will be looking + for *.so libraries. Entered as issue HDFFV-8736. (ADB - 2014/04/14) + +* A Gnu Make directive (.NOTPARALLEL) is added to fortran/test/Makefile. + AIX native make does not support this directive and would fail if + parallel make (e.g. make -j4) is used to build the library. AIX users + either do not use parallel make or install Gnu Make to build the library. + (AKC 2014/04/08 HDFFV-8738) + +* CLANG compiler with the options -fcatch-undefined-behavior and -ftrapv + catches some undefined behavior in the alignment algorithm of the macro + DETECT_I in H5detect.c. Since the algorithm is trying to detect the alignment + of integers, ideally the flag -fcatch-undefined-behavior should not to be + used for H5detect.c. In the future, we can separate flags for H5detect.c + from the rest of the library. (SLU - 2013/10/16 HDFFV-8147) + +* Make provided by Solaris fails in "make check". Solaris users should use + gmake to build and install the HDF5 software. (AKC - 2013/10/08 - HDFFV-8534) + +* On OpenVMS, two soft conversion functions (H5T__conv_i_f and H5T__conv_f_i) + have bugs. They convert data between floating-point numbers and integers. + But the library's default is hard conversion. The user should avoid + explicitly enabling soft conversion between floating-point numbers and + integers. (Issue VMS-8; SLU - 2013/09/19) + +* On OpenVMS, ZLIB 1.2.8 library doesn't work properly. ZLIB 1.2.5 works + fine. So please use ZLIB 1.2.5 to build HDF5 library. (Issue VMS-5; + SLU 2013/09/19) + +* When building using the Cray compilers on Cray machines, HDF5 + configure mistakenly thinks the compiler is an intel compiler and + sets the -std=c99 flag which breaks configure on Cray. To build HDF5 + properly on a Cray machine, please consult with the instructions in + INSTALL_parallel for building on Hopper. + (MSC - 2013/04/26 - HDFFV-8429) + +* The 5.9 C++ compiler on Sun failed to compile a C++ test ttypes.cpp. It + complains with this message: + "/home/hdf5/src/H5Vprivate.h", line 130: Error: __func__ is not defined. + + The reason is that __func__ is a predefined identifier in C99 standard. The + HDF5 C library uses it in H5private.h. The test ttypes.cpp includes + H5private.h (H5Tpkg.h<-H5Fprivate.h<-H5Vprivate.h<-H5private.h). Sun's 5.9 + C++ compiler doesn't support __func__, thus fails to compile the C++ test. + But Sun's 5.11 C++ compiler does. To check whether your Sun C++ compiler + knows this identifier, try to compile the following simple C++ program: + #include + + int main(void) + { + printf("%s\n", __func__); + return 0; + } + (SLU - 2012/11/5) + +* The C++ and FORTRAN bindings are not currently working on FreeBSD with the + native release 8.2 compilers (4.2.1), but are working with gcc 4.6 from the + ports (and probably gcc releases after that). + (QAK - 2012/10/19) + +* The following h5dump test case fails in BG/P machines (and potentially other + machines that use a command script to launch executables): + + h5dump --no-compact-subset -d "AHFINDERDIRECT::ah_centroid_t[0] it=0 tl=0" + tno-subset.h5 + + This is due to the embedded spaces in the dataset name being interpreted + by the command script launcher as meta-characters, thus passing three + arguments to h5dump's -d flag. The command passes if run by hand, just + not via the test script. + (AKC - 2012/05/03) + +* On hopper, the build failed when RUNSERIAL and RUNPARALLEL are set + to aprun -np X, because the H5lib_settings.c file was not generated + properly. Not setting those environment variables works, because + configure was able to automatically detect that it's a Cray system + and used the proper launch commands when necessary. + (MSC - 2012/04/18) + +* The data conversion test dt_arith.c fails in "long double" to integer + conversion on Ubuntu 11.10 (3.0.0.13 kernel) with GCC 4.6.1 if the library + is built with optimization -O3 or -O2. The older GCC (4.5) or newer kernal + (3.2.2 on Fedora) doesn't have the problem. Users should lower the + optimization level (-O1 or -O0) by defining CFLAGS in the command line of + "configure" like: + + CFLAGS=-O1 ./configure + + This will overwrite the library's default optimization level. + (SLU - 2012/02/07 - HDFFV-7829) + This issue is no longer present on Ubuntu 12.10 (3.5.0 kernel) with + gcc 4.7.2. + +* The STDIO VFD does not work on some architectures, possibly due to 32/64 + bit or large file issues. The basic STDIO VFD test is known to fail on + 64-bit SunOS 5.10 on SPARC when built with -m64 and 32-bit OS X/Darwin + 10.7.0. The STDIO VFD test has been disabled while we investigate and + a fix should appear in a future release. + (DER - 2011/10/14 - HDFFV-8235) + +* h5diff can report inconsistent results when comparing datasets of enum type + that contain invalid values. This is due to how enum types are handled in + the library and will be addressed in a future release. + (DER - 2011/10/14 - HDFFV-7527) + +* The links test can fail under the stdio VFD due to some issues with external + links. This will be investigated and fixed in a future release. + (DER - 2011/10/14 - HDFFV-7768) + +* After the shared library support was fixed for some bugs, it was discovered + that "make prefix=XXX install" no longer works for shared libraries. It + still works correctly for static libraries. Therefore, if you want to + install the HDF5 shared libraries in a location such as /usr/local/hdf5, + you need to specify the location via the --prefix option during configure + time. E.g, ./configure --prefix=/usr/local/hdf5 ... + (AKC - 2011/05/07 - HDFFV-7583) + +* The parallel test, t_shapesame, in testpar/, may run for a long time and may + be terminated by the alarm signal. If that happens, one can increase the + alarm seconds (default is 1200 seconds = 20 minutes) by setting the + environment variable, $HDF5_ALARM_SECONDS, to a larger value such as 3600 + (60 minutes). Note that the t_shapesame test may fail in some systems + (see the "While working on the 1.8.6 release..." problem below). If + it does, it will waste more time if $HDF5_ALARM_SECONDS is set + to a larger value. + (AKC - 2011/05/07) + +* The C++ and FORTRAN bindings are not currently working on FreeBSD. + (QAK - 2011/04/26) + +* Shared Fortran libraries are not quite working on AIX. While they are + generated when --enable-shared is specified, the fortran and hl/fortran + tests fail. We are looking into the issue. HL and C++ shared libraries + should now be working as intended, however. + (MAM - 2011/04/20) + +* The --with-mpe configure option does not work with Mpich2. + (AKC - 2011/03/10) + +* While working on the 1.8.6 release of HDF5, a bug was discovered that can + occur when reading from a dataset in parallel shortly after it has been + written to collectively. The issue was exposed by a new test in the parallel + HDF5 test suite, but had existed before that. We believe the problem lies with + certain MPI implementations and/or file systems. + + We have provided a pure MPI test program, as well as a standalone HDF5 + program, that can be used to determine if this is an issue on your system. + They should be run across multiple nodes with a varying number of processes. + These programs can be found at: + http://www.hdfgroup.org/ftp/HDF5/examples/known_problems/ + (NAF - 2011/01/19) + +* All the VFL drivers aren't backward compatible. In H5FDpublic.h, the + structure H5FD_class_t changed in 1.8. There is new parameter added to + get_eoa and set_eoa callback functions. A new callback function + get_type_map was added in. The public function H5FDrealloc was taken + out in 1.8. The problem only happens when users define their own driver + for 1.6 and try to plug in 1.8 library. Because there's only one user + complaining about it, we (Elena, Quincey, and I) decided to leave it as + it is (see bug report #1279). Quincey will make a plan for 1.10. + (SLU - 2010/02/02) + +* The --enable-static-exec configure flag will only statically link libraries + if the static version of that library is present. If only the shared version + of a library exists (i.e., most system libraries on Solaris, AIX, and Mac, + for example, only have shared versions), the flag should still result in a + successful compilation, but note that the installed executables will not be + fully static. Thus, the only guarantee on these systems is that the + executable is statically linked with just the HDF5 library. + (MAM - 2009/11/04) + +* Parallel tests failed with 16 processes with data inconsistency at testphdf5 + / dataset_readAll. Parallel tests also failed with 32 and 64 processes with + collective abort of all ranks at t_posix_compliant / allwrite_allread_blocks + with MPI IO. + (CMC - 2009/04/28) + +* On an Intel 64 Linux cluster (RH 4, Linux 2.6.9) with Intel 10.0 compilers, + use -mp -O1 compilation flags to build the libraries. A higher level of + optimization causes failures in several HDF5 library tests. + +* A dataset created or rewritten with a v1.6.3 library or after cannot be read + with the v1.6.2 library or before when the Fletcher32 EDC filter is enabled. + There was a bug in the calculation of the Fletcher32 checksum in the + library before v1.6.3; the checksum value was not consistent between big- + endian and little-endian systems. This bug was fixed in Release 1.6.3. + However, after fixing the bug, the checksum value was no longer the same as + before on little-endian system. Library releases after 1.6.4 can still read + datasets created or rewritten with an HDF5 library of v1.6.2 or before. + (SLU - 2005/06/30) + + +%%%%1.8.12%%%% + + +HDF5 version 1.8.12 released on 2013-11-04 +================================================================================ + +INTRODUCTION +============ + +This document describes the differences between HDF5-1.8.11 and +HDF5-1.8.12, and contains information on the platforms tested and +known problems in HDF5-1.8.12. +For more details, see the files HISTORY-1_0-1_8_0_rc3.txt +and HISTORY-1_8.txt in the release_docs/ directory of the HDF5 source. + +Links to the HDF5 1.8.12 source code, documentation, and additional materials +can be found on the HDF5 web page at: + + http://www.hdfgroup.org/products/hdf5/ + +The HDF5 1.8.12 release can be obtained from: + + http://www.hdfgroup.org/HDF5/release/obtain5.html + +User documentation for 1.8.12 can be accessed directly at this location: + + http://www.hdfgroup.org/HDF5/doc/ + +New features in the HDF5-1.8.x release series, including brief general +descriptions of some new and modified APIs, are described in the "What's New +in 1.8.0?" document: + + http://www.hdfgroup.org/HDF5/doc/ADGuide/WhatsNew180.html + +All new and modified APIs are listed in detail in the "HDF5 Software Changes +from Release to Release" document, in the section "Release 1.8.12 (current +release) versus Release 1.8.11": + + http://www.hdfgroup.org/HDF5/doc/ADGuide/Changes.html + +If you have any questions or comments, please send them to the HDF Help Desk: + + help@hdfgroup.org + + +CONTENTS +======== + +- New Features +- Support for New Platforms, Languages, and Compilers +- Bug Fixes since HDF5-1.8.11 +- Supported Platforms +- Supported Configuration Features Summary +- More Tested Platforms +- Known Problems + + +New Features +============ + + Configuration + ------------- + - Added a configuration option to change the default plugin path. + The configure option is --with-default-plugindir=location. + The cmake option is -DH5_DEFAULT_PLUGINDIR:PATH=location. + HDFFV-8513. (ADB 2013/09/04) + - Renamed FFLAGS to FCFLAGS in configure. (ADB 2013/08/13) + - CMake can now package a compressed examples file, the default for + Windows binaries from HDF Group. (ADB - 2013/07/22) + + Library + ------- + - None + + Parallel Library + ---------------- + - None + + Tools + ----- + - h5repack: Added the ability to use plugin filters to read and write + files. The option uses the filter number. HDFFV-8345 + (ADB - 2013/09/04). + - h5dump: Added the option -N --any_path, which searches the file for + paths that match the search path. HDFFV-7989 (ADB - 2013/08/12). + - h5dump: Added the optional arg 0 to -A, which excludes attributes + from display. HDFFV-8134 (ADB - 2013/08/01). + + High-Level APIs + --------------- + - None + + Fortran API + ----------- + - None + + C++ API + ------- + - Added tutorial examples to C++/examples. They can be installed by + "make install-examples" and, in the installed directory, they can be + executed by running the script file run-c++-ex.sh. (BMR - 2013/09/28) + - A new class, H5::H5Location, is added to represent the location concept + in the C library. It is a base class to H5::H5File and H5::H5Ojbect, + whose member functions are moved into H5::H5Location. H5::H5File can + now inherent those functions. As a result, an H5::H5File object can have + an attribute. (BMR - 2013/09/27) + - Added wrappers for H5Rget_obj_type2 to retrieve the type of the object + that an object reference points to. (BMR - 2013/09/27) + H5O_type_t H5Location::getRefObjType(void *ref, H5R_type_t ref_type) + - Added wrappers for H5Aexist to check whether an attribute exists given + a name. (BMR - 2013/09/27) + bool H5::H5Location::attrExists(const char* name) + bool H5::H5Location::attrExists(const H5std_string& name) + - Added a number of overloaded functions for convenience. (BMR - 2013/09/27) + + +Support for New Platforms, Languages, and Compilers +=================================================== + - None + +Bug Fixes since HDF5-1.8.11 +=========================== + + Configuration + ------------- + - Modified H5detect.c to scan floating point types for padding bits before + analyzing the type further. This should fix problems with gcc 4.8. + (NAF - 2013/09/19 - HDFFV-8523/HDFFV-8500) + - HDF5 rpaths are no longer encoded in the library files when configured + with --disable-sharedlib-rpath. (LRK-2013-09-23 - HDFFV-8276) + + Library + ------- + - Added const qualifier to source buffer parameters in H5Dgather and + H5D_scatter_func_t (H5Dscatter callback). (NAF - 2013/7/09) + + - CMake now creates *.so.{lt_version} files with the same version as + configure. (ADB - 2013/06/05 HDFFV-8437) + + Parallel Library + ---------------- + - None + + Performance + ------------- + - None + + Tools + ----- + - h5dump: Added the option -N --any_path, which searches the file for + paths that match the search path. HDFFV-7989 (ADB - 2013/08/12). + - h5dump: Added the optional arg 0 to -A, which excludes attributes + from display. HDFFV-8134 (ADB - 2013/08/01). + - h5dump correctly exports subsetted data to a file, using the --output + option. (ADB - 2013/06/07 HDFFV-8447) + - h5cc and other compile scripts now default to linking shared libraries + when HDF5 is configured with the --disable-static option. + (LRK - 2013-09-23 - HDFFV-8141) + + F90 API + ------- + - None + + C++ API + ------ + - None + + High-Level APIs: + ------ + - None + + Fortran High-Level APIs: + ------ + - None + + Testing + ------- + - test/big sometimes failed with the message of "file selection+offset not + within extent". This has been fixed. (AKC - 2013/09/28 HDFFV-8271). + - tools/h5diff/testh5diff.sh is run in every "make check", even after it + has passed in the previous run. It should not run again if there are no + code changes. Fixed. (AKC - 2013/07/19 HDFFV-8392) + +Supported Platforms +=================== +The following platforms are supported and have been tested for this release. +They are built with the configure process unless specified otherwise. + + AIX 5.3 xlc 10.1.0.5 + (NASA G-ADA) xlC 10.1.0.5 + xlf90 12.1.0.6 + + Linux 2.6.18-308.13.1.el5PAE GNU C (gcc), Fortran (gfortran), C++ (g++) + #1 SMP i686 i686 i386 compilers for 32-bit applications; + (jam) Version 4.1.2 20080704 (Red Hat 4.1.2-54) + Version 4.8.1 + PGI C, Fortran, C++ Compilers for 32-bit + applications; + Version 13.7-0 + Intel(R) C, C++, Fortran Compiler for 32-bit + applications; + Version 13.1.3 (Build 20130607) + + Linux 2.6.18-308.16.1.el5 GNU C (gcc), Fortran (gfortran), C++ (g++) + #1 SMP x86_64 GNU/Linux compilers for 64-bit applications; + (koala) Version 4.1.2 20080704 (Red Hat 4.1.2-54) + Version 4.8.1 + PGI C, Fortran, C++ for 64-bit target on + x86-64; + Version 13.7-0 + Intel(R) C, C++, Fortran Compilers for + applications running on Intel(R) 64; + Version 13.1.3 (Build 20130607) + + Linux 2.6.32-358.18.1.el6 GNU C (gcc), Fortran (gfortran), C++ (g++) + #1 SMP x86_64 GNU/Linux compilers: + (platypus) Version 4.4.7 20120313 + Version 4.8.1 + PGI C, Fortran, C++ for 64-bit target on + x86-64; + Version 13.7-0 + Intel(R) C (icc), C++ (icpc), Fortran (icc) + compilers: + Version 13.1.3 (Build 20130607) + + Linux 2.6.32-358.18.1.el6.ppc64 gcc (GCC) 4.4.7 20120313 (Red Hat 4.4.7-3) + #1 SMP ppc64 GNU/Linux g++ (GCC) 4.4.7 20120313 (Red Hat 4.4.7-3) + (ostrich) GNU Fortran (GCC) 4.4.7 20120313 (Red Hat 4.4.7-3) + IBM XL C/C++ V11.1 + IBM XL Fortran V13.1 + + SunOS 5.11 32- and 64-bit Sun C 5.12 SunOS_sparc + (emu) Sun Fortran 95 8.6 SunOS_sparc + Sun C++ 5.12 SunOS_sparc + + Windows 7 Visual Studio 2008 w/ Intel Fortran 11 (cmake) + Visual Studio 2010 w/ Intel Fortran 12 (cmake) + Visual Studio 2012 w/ Intel Fortran 13 (cmake) + Cygwin(CYGWIN_NT-6.1 1.7.15(0.260/5/3) gcc(4.5.3) compiler and gfortran) + (cmake and autotools) + + Windows 7 x64 Visual Studio 2008 w/ Intel Fortran 11 (cmake) + Visual Studio 2010 w/ Intel Fortran 12 (cmake) + Visual Studio 2012 w/ Intel Fortran 13 (cmake) + + Windows 8.1 Visual Studio 2012 w/ Intel Fortran 13 (cmake) + + Windows 8.1 x64 Visual Studio 2012 w/ Intel Fortran 13 (cmake) + + Mac OS X Snow Leopard 10.6.8 gcc i686-apple-darwin11-llvm-gcc-4.2 (GCC) 4.2.1 from Xcode 3.2.6 + Darwin Kernel Version 10.8.0 g++ i686-apple-darwin11-llvm-g++-4.2 (GCC) 4.2.1 from Xcode 3.2.6 + 64-bit gfortran GNU Fortran (GCC) 4.6.2 + (fred) Intel C (icc), Fortran (ifort), C++ (icpc) + 12.1 Build 20120928 + + Mac OS X Lion 10.7.3 Apple clang/clang++ version 3.0 from Xcode 4.6.1 + 64-bit gfortran GNU Fortran (GCC) 4.6.2 + (duck) Intel icc/icpc/ifort version 13.0.3 + + Mac OS X Mountain Lion 10.8.1 Apple clang/clang++ version 4.2 from Xcode 4.6.1 + 64-bit gfortran GNU Fortran (GCC) 4.6.2 + (wren) Intel icc/icpc/ifort version 13.0.3 + + OpenVMS IA64 V8.4 HP C V7.3-018 + HP Fortran V8.2-104939-50H96 + HP C++ V7.4-004 + +Tested Configuration Features Summary +===================================== + + In the tables below + y = tested + n = not tested in this release + C = Cluster + W = Workstation + x = not working in this release + dna = does not apply + ( ) = footnote appears below second table + = testing incomplete on this feature or platform + +Platform C F90/ F90 C++ zlib SZIP + parallel F2003 parallel +Solaris2.11 32-bit n y/y n y y y +Solaris2.11 64-bit n y/y n y y y +Windows 7 y y/y n y y y +Windows 7 x64 y y/y n y y y +Windows 7 Cygwin n y/n n y y y +Windows 8.1 n y/y n y y y +Windows 8.1 x64 n y/y n y y y +Mac OS X Snow Leopard 10.6.8 64-bit n y/y n y y y +Mac OS X Lion 10.7.3 64-bit n y/y n y y y +Mac OS X Mountain Lion 10.8.1 64-bit n y/y n y y y +AIX 5.3 32- and 64-bit n y/n n y y y +CentOS 5.9 Linux 2.6.18-308 i686 GNU y y/y y y y y +CentOS 5.9 Linux 2.6.18-308 i686 Intel n y/y n y y y +CentOS 5.9 Linux 2.6.18-308 i686 PGI n y/y n y y y +CentOS 5.9 Linux 2.6.18 x86_64 GNU y y/y y y y y +CentOS 5.9 Linux 2.6.18 x86_64 Intel n y/y n y y y +CentOS 5.9 Linux 2.6.18 x86_64 PGI n y/y n y y y +CentOS 6.4 Linux 2.6.32 x86_64 GNU n y/y n y y y +CentOS 6.4 Linux 2.6.32 x86_64 Intel n y/y n y y y +Linux 2.6.32-358.2.1.el6.ppc64 n y/n n y y y +OpenVMS IA64 V8.4 n y/n n y y n + +Platform Shared Shared Shared Thread- + C libs F90 libs C++ libs safe +Solaris2.11 32-bit y y y y +Solaris2.11 64-bit y y y y +Windows 7 y y y y +Windows 7 x64 y y y y +Windows 7 Cygwin n n n y +Windows 8.1 y y y y +Windows 8.1 x64 y y y y +Mac OS X Snow Leopard 10.6.8 64-bit y n y n +Mac OS X Lion 10.7.3 64-bit y n y y +Mac OS X Mountain Lion 10.8.1 64-bit y n y y +AIX 5.3 32- and 64-bit y n n y +CentOS 5.9 Linux 2.6.18-308 i686 GNU y y y y +CentOS 5.9 Linux 2.6.18-308 i686 Intel y y y n +CentOS 5.9 Linux 2.6.18-308 i686 PGI y y y n +CentOS 5.9 Linux 2.6.18 x86_64 GNU y y y y +CentOS 5.9 Linux 2.6.18 x86_64 Intel y y y n +CentOS 5.9 Linux 2.6.18 x86_64 PGI y y y n +CentOS 6.4 Linux 2.6.32 x86_64 GNU y y y n +CentOS 6.4 Linux 2.6.32 x86_64 Intel y y y n +Linux 2.6.32-358.2.1.el6.ppc64 y y y n +OpenVMS IA64 V8.4 n n n n + +Compiler versions for each platform are listed in the preceding +"Supported Platforms" table. + + +More Tested Platforms +===================== +The following platforms are not supported but have been tested for this release. + + Linux 2.6.18-308.13.1.el5PAE MPICH mpich2-1.4.1p1 compiled with + #1 SMP i686 i686 i386 gcc 4.1.2 and gfortran 4.1.2 + (jam) g95 (GCC 4.0.3 (g95 0.94!) + + Linux 2.6.18-308.16.1.el5 MPICH mpich2-1.4.1p1 compiled with + #1 SMP x86_64 GNU/Linux gcc 4.1.2 and gfortran 4.1.2 + (koala) g95 (GCC 4.0.3 (g95 0.94!) + + FreeBSD 8.2-STABLE i386 gcc 4.5.4 [FreeBSD] 20110526 + (loyalty) gcc 4.6.1 20110527 + g++ 4.6.1 20110527 + gfortran 4.6.1 20110527 + + FreeBSD 8.2-STABLE amd64 gcc 4.5.4 [FreeBSD] 20110526 + (freedom) gcc 4.6.1 20110527 + g++ 4.6.1 20110527 + gfortran 4.6.1 20110527 + + Debian7.1.0 3.2.0-4-amd64 #1 SMP Debian 3.2.46-1 x86_64 GNU/Linux + gcc (Debian 4.7.2-5) 4.7.2 + GNU Fortran (Debian 4.7.2-5) 4.7.2 + (cmake and autotools) + + Fedora19 3.11.1-200.fc19.x86_64 #1 SMP x86_64 x86_64 x86_64 GNU/Linux + gcc (GCC) 4.8.1 20130603 (Red Hat 4.8.1-1) + GNU Fortran (GCC) 4.8.1 20130603 (Red Hat 4.8.1-1) + (cmake and autotools) + + SUSE 12.3 3.7.10-1.16-desktop #1 SMP PREEMPT x86_64 x86_64 x86_64 GNU/Linux + gcc (SUSE Linux) 4.7.2 + GNU Fortran (SUSE Linux) 4.7.2 + (cmake and autotools) + + Ubuntu 13.04 3.8.0-30-generic #44-Ubuntu SMP x86_64 GNU/Linux + gcc (Ubuntu/Linaro 4.7.3-1ubuntu1) 4.7.3 + GNU Fortran (Ubuntu/Linaro 4.7.3-1ubuntu1) 4.7.3 + (cmake and autotools) + + Cray Linux Environment (CLE) PrgEnv-pgi/4.0.46 + hopper.nersc.gov pgcc 12.5-0 64-bit target on x86-64 Linux -tp shanghai + pgf90 12.5-0 64-bit target on x86-64 Linux -tp shanghai + pgCC 12.5-0 64-bit target on x86-64 Linux -tp shanghai + + +Known Problems +============== +* Several HDF5 command-line tools and tests leave behind generated files + that are not cleaned up with "make clean" or "make distclean" when software + is built in place. The issue will be addressed in the 1.8.13 release. We + recommend to use build directory to compile and test HDF5 as described + in the INSTALL file, section 4.2. + +* Source directory names with spaces in them will cause failures in configure + or make on Mac (HDFFV-8152), Linux, and probably all other platforms. If a + configure command with a space is run from a build directory, it will exit + with an error message: "checking whether build environment is sane... + configure: error: unsafe srcdir value: '/scr/lrknox/hdf5 v1.8.12'". If + configure is run inside or below the directory with the space in the name, + libtool will get the directory path from the system, put the part of the + path before the space in the libdir variable in .../src/libhdf5.la, and + then fail to find the nonexistent directory. This is a known libtool issue + and the suggested workaround is to rename the directory without spaces. + (LRK - 2013/10/22) + +* CLANG compiler with the options -fcatch-undefined-behavior and -ftrapv + catches some undefined behavior in the alignment algorithm of the macro + DETECT_I in H5detect.c (HDFFV-8147). This issue will be addressed in the + next release. (SLU - 2013/10/16) + +* Running make check for the tools can fail in the tools tests if make was not + run prior. The tests for the tools use other tools in the tests, therefore + all the tools should be built before testing the tools. (ADB - 2013/10/09) + +* Make provided by Solaris fails in "make check". Solaris users should use + gmake to build and install HDF5 software. (AKC - 2013/10/08 - HDFFV-8534) + +* On OpenVMS, two soft conversion functions (H5T__conv_i_f and H5T__conv_f_i) + have bugs. They convert data between floating-point numbers and integers. + But the library's default is hard conversion. The user should avoid + explicitly enabling soft conversion between floating-point numbers and + integers. (Issue VMS-8; SLU - 2013/09/19) + +* On OpenVMS, ZLIB 1.2.8 library doesn't work properly. ZLIB 1.2.5 works + fine. So please use ZLIB 1.2.5 to build HDF5 library. (Issue VMS-5; + SLU 2013/09/19) + +* When building using the Cray compilers on Cray machines, HDF5 + configure mistakenly thinks the compiler is an intel compiler and + sets the -std=c99 flag which breaks configure on Cray. To build HDF5 + properly on a Cray machine, please consult with the instructions in + INSTALL_parallel for building on Hopper. + (MSC - 2013/04/26 - HDFFV-8429) + +* The h5dump and h5diff utilities occasionally produce different output + between Linux and Windows systems. This is caused by lower-level library + routines that fail to write fill values to the user's buffer when reading + unallocated chunks from datasets that have a fill value set to + H5D_FILL_VALUE_DEFAULT. Due to platform differences the return of + spurious data values has only been encountered on Windows 32-bit systems. + (Issue HDFFV-8247; JP - 2013/03/27) + +* The 5.9 C++ compiler on Sun failed to compile a C++ test ttypes.cpp. It + complains with this message: + "/home/hdf5/src/H5Vprivate.h", line 130: Error: __func__ is not defined. + + The reason is that __func__ is a predefined identifier in C99 standard. The + HDF5 C library uses it in H5private.h. The test ttypes.cpp includes + H5private.h (H5Tpkg.h<-H5Fprivate.h<-H5Vprivate.h<-H5private.h). Sun's 5.9 + C++ compiler doesn't support __func__, thus fails to compile the C++ test. + But Sun's 5.11 C++ compiler does. To check whether your Sun C++ compiler + knows this identifier, try to compile the following simple C++ program: + #include + + int main(void) + { + printf("%s\n", __func__); + return 0; + } + (SLU - 2012/11/5) + +* The C++ and FORTRAN bindings are not currently working on FreeBSD with the + native release 8.2 compilers (4.2.1), but are working with gcc 4.6 from the + ports (and probably gcc releases after that). + (QAK - 2012/10/19) + +* The following h5dump test case fails in BG/P machines (and potentially other + machines that use a command script to launch executables): + + h5dump --no-compact-subset -d "AHFINDERDIRECT::ah_centroid_t[0] it=0 tl=0" + tno-subset.h5 + + This is due to the embedded spaces in the dataset name being interpreted + by the command script launcher as meta-characters, thus passing three + arguments to h5dump's -d flag. The command passes if run by hand, just + not via the test script. + (AKC - 2012/05/03) + +* On hopper, the build failed when RUNSERIAL and RUNPARALLEL are set + to aprun -np X, because the H5lib_settings.c file was not generated + properly. Not setting those environment variables works, because + configure was able to automatically detect that it is a Cray system + and used the proper launch commands when necessary. + (MSC - 2012/04/18) + +* The data conversion test dt_arith.c fails in "long double" to integer + conversion on Ubuntu 11.10 (3.0.0.13 kernel) with GCC 4.6.1 if the library + is built with optimization -O3 or -O2. The older GCC (4.5) or newer kernel + (3.2.2 on Fedora) do not have the problem. Users should lower the + optimization level (-O1 or -O0) by defining CFLAGS in the command line of + "configure" like: + + CFLAGS=-O1 ./configure + + This will overwrite the library's default optimization level. + (SLU - 2012/02/07 - HDFFV-7829) + This issue is no longer present on Ubuntu 12.10 (3.5.0 kernel) with + gcc 4.7.2. + +* The STDIO VFD does not work on some architectures, possibly due to 32/64 + bit or large file issues. The basic STDIO VFD test is known to fail on + 64-bit SunOS 5.10 on SPARC when built with -m64 and 32-bit OS X/Darwin + 10.7.0. The STDIO VFD test has been disabled while we investigate and + a fix should appear in a future release. + (DER - 2011/10/14 - HDFFV-8235) + +* h5diff can report inconsistent results when comparing datasets of enum type + that contain invalid values. This is due to how enum types are handled in + the library and will be addressed in a future release. + (DER - 2011/10/14 - HDFFV-7527) + +* The links test can fail under the stdio VFD due to some issues with external + links. This will be investigated and fixed in a future release. + (DER - 2011/10/14 - HDFFV-7768) + +* After the shared library support was fixed for some bugs, it was discovered + that "make prefix=XXX install" no longer works for shared libraries. It + still works correctly for static libraries. Therefore, if you want to + install the HDF5 shared libraries in a location such as /usr/local/hdf5, + you need to specify the location via the --prefix option during configure + time. E.g, ./configure --prefix=/usr/local/hdf5 ... + (AKC - 2011/05/07 - HDFFV-7583) + +* The parallel test, t_shapesame, in testpar/, may run for a long time and may + be terminated by the alarm signal. If that happens, one can increase the + alarm seconds (default is 1200 seconds = 20 minutes) by setting the + environment variable, $HDF5_ALARM_SECONDS, to a larger value such as 3600 + (60 minutes). Note that the t_shapesame test may fail in some systems + (see the "While working on the 1.8.6 release..." problem below). If + it does, it will waste more time if $HDF5_ALARM_SECONDS is set + to a larger value. + (AKC - 2011/05/07) + +* The C++ and FORTRAN bindings are not currently working on FreeBSD. + (QAK - 2011/04/26) + +* Shared Fortran libraries are not quite working on AIX. While they are + generated when --enable-shared is specified, the fortran and hl/fortran + tests fail. We are looking into the issue. HL and C++ shared libraries + should now be working as intended, however. + (MAM - 2011/04/20) + +* The --with-mpe configure option does not work with Mpich2. + (AKC - 2011/03/10) + +* While working on the 1.8.6 release of HDF5, a bug was discovered that can + occur when reading from a dataset in parallel shortly after it has been + written to collectively. The issue was exposed by a new test in the parallel + HDF5 test suite, but had existed before that. We believe the problem lies with + certain MPI implementations and/or file systems. + + We have provided a pure MPI test program, as well as a standalone HDF5 + program, that can be used to determine if this is an issue on your system. + They should be run across multiple nodes with a varying number of processes. + These programs can be found at: + http://www.hdfgroup.org/ftp/HDF5/examples/known_problems/ + (NAF - 2011/01/19) + +* All the VFL drivers aren't backward compatible. In H5FDpublic.h, the + structure H5FD_class_t changed in 1.8. There is new parameter added to + get_eoa and set_eoa callback functions. A new callback function + get_type_map was added in. The public function H5FDrealloc was taken + out in 1.8. The problem only happens when users define their own driver + for 1.6 and try to plug in 1.8 library. Because there's only one user + complaining about it, we (Elena, Quincey, and I) decided to leave it as + it is (see bug report #1279). Quincey will make a plan for 1.10. + (SLU - 2010/02/02) + +* The --enable-static-exec configure flag will only statically link libraries + if the static version of that library is present. If only the shared version + of a library exists (i.e., most system libraries on Solaris, AIX, and Mac, + for example, only have shared versions), the flag should still result in a + successful compilation, but note that the installed executables will not be + fully static. Thus, the only guarantee on these systems is that the + executable is statically linked with just the HDF5 library. + (MAM - 2009/11/04) + +* Parallel tests failed with 16 processes with data inconsistency at testphdf5 + / dataset_readAll. Parallel tests also failed with 32 and 64 processes with + collective abort of all ranks at t_posix_compliant / allwrite_allread_blocks + with MPI IO. + (CMC - 2009/04/28) + +* On an Intel 64 Linux cluster (RH 4, Linux 2.6.9) with Intel 10.0 compilers, + use -mp -O1 compilation flags to build the libraries. A higher level of + optimization causes failures in several HDF5 library tests. + +* A dataset created or rewritten with a v1.6.3 library or after cannot be read + with the v1.6.2 library or before when the Fletcher32 EDC filter is enabled. + There was a bug in the calculation of the Fletcher32 checksum in the + library before v1.6.3; the checksum value was not consistent between big- + endian and little-endian systems. This bug was fixed in Release 1.6.3. + However, after fixing the bug, the checksum value was no longer the same as + before on little-endian system. Library releases after 1.6.4 can still read + datasets created or rewritten with an HDF5 library of v1.6.2 or before. + (SLU - 2005/06/30) + + +%%%%1.8.11%%%% + + +HDF5 version 1.8.11 released on 2013-05-08 +================================================================================ + +INTRODUCTION +============ + +This document describes the differences between HDF5-1.8.10 and +HDF5-1.8.11-*, and contains information on the platforms tested and +known problems in HDF5-1.8.11-*. +For more details, see the files HISTORY-1_0-1_8_0_rc3.txt +and HISTORY-1_8.txt in the release_docs/ directory of the HDF5 source. + +Links to the HDF5 1.8.11 source code, documentation, and additional materials +can be found on the HDF5 web page at: + + http://www.hdfgroup.org/products/hdf5/ + +The HDF5 1.8.11 release can be obtained from: + + http://www.hdfgroup.org/HDF5/release/obtain5.html + +User documentation for 1.8.11 can be accessed directly at this location: + + http://www.hdfgroup.org/HDF5/doc/ + +New features in the HDF5-1.8.x release series, including brief general +descriptions of some new and modified APIs, are described in the "What's New +in 1.8.0?" document: + + http://www.hdfgroup.org/HDF5/doc/ADGuide/WhatsNew180.html + +All new and modified APIs are listed in detail in the "HDF5 Software Changes +from Release to Release" document, in the section "Release 1.8.11 (current +release) versus Release 1.8.10": + + http://www.hdfgroup.org/HDF5/doc/ADGuide/Changes.html + +If you have any questions or comments, please send them to the HDF Help Desk: + + help@hdfgroup.org + + +CONTENTS +======== + +- New Features +- Support for New Platforms, Languages, and Compilers +- Bug Fixes since HDF5-1.8.10 +- Supported Platforms +- Supported Configuration Features Summary +- More Tested Platforms +- Known Problems + + +New Features +============ + + Configuration + ------------- + - Libtool version number is changed to 8.0.0 because there are API + changes. See below for details. (AKC - 2013/05/07 HDFFV-8435) + - Mac OS X 10.7 (Lion) and 10.8 (Mountain Lion) uses clang/clang++ as the + default C and C++ compilers. (AKC - 2013/04/19 HDFFV-8245) + - CMake minimum is now 2.8.10. (ADB 2013/1/14) + - A new tool, cmakehdf5, which is a build command script similar to + buildhdf5 is added and is available in the bin directory. + (AKC - 2013/01/16 HDFFV-8336) + + Library + ------- + - The library can load filter libraries dynamically during runtime. Users + can set the search path through environment variable HDF5_PLUGIN_PATH + and call H5Pset_filter to enable a dynamic filter. (SLU - 2013/04/08) + - Added new API functions H5Dscatter and H5Dgather to scatter data to and + and gather data from a selection within a memory buffer. + (NAF - 2013/02/05) + - The library now supports the data conversion from enumeration to numeric + (integer and floating-point number) datatypes. See Issue HDFFV-8221. + (SLU - 2012/10/23) + + Parallel Library + ---------------- + - None + + Tools + ----- + - h5dump: added new option -O or -ddl to output the ddl text to a file. This + is a complement to the -o or --output option, which redirects the data to + a file. HDFFV-8229 (ADB - 2013/2/25) + + High-Level APIs + --------------- + - A new API function, H5DOwrite_chunk. This function writes a data chunk + directly into a file, bypassing hyperslab selection, data conversion, + and the filter pipeline. The user must be careful with the function and + clearly understand the I/O process of the library. (SLU - 2013/2/11) + + Fortran API + ----------- + - New API functions added (MSB - 2013/3/23): + + h5odecr_refcount_f, h5oexists_by_name_f, h5oget_comment_f, + h5oget_comment_by_name_f, h5oincr_refcount_f, h5oopen_by_idx_f, + h5oset_comment_f, h5oset_comment_by_name_f, h5oset_comment_by_name_f + + F2003: h5oget_info_f, h5oget_info_by_idx_f, h5ovisit_by_name_f + + + C++ API + ------- + - None + + +Support for New Platforms, Languages, and Compilers +=================================================== + - SunOS 5.11 (emu) 32-bit and 64-bit with Sun C/C++ 5.12 compiler and + Sun Fortran 95 8.6 compiler. + - Visual Studio 2012 w/ Intel Fortran 13 on Windows 7 + - g95 released new version recently and is tested in this release. + +Bug Fixes since HDF5-1.8.10 +========================== + + Configuration + ------------- + - Fixed Thread-safe configure failure for the AIX platform. + (AKC - 2013/04/19 HDFFV-8390) + - Configure will check the result of header searches before searching for + the library. + Fixes HDFFV-8257 (ADB 2013/03/04) + - HDF does not support building SHARED Fortran libraries on OSX. Added + CMake code to check for this condition. + Fixes HDFFV-8227 (ADB 2013/03/04) + - CMake builds on Windows will no longer use legacy naming for libraries. + The "dll" tag will no longer be added to the name of *.lib and *.dll. + The option HDF_LEGACY_NAMING is now OFF by default. + Fixes HDFFV-8292 (ADB 2013/01/30) + + Library + ------- + - The library now behaves correctly when performing large I/O operations + on Mac OS-X. Previously, single I/O operations > 2 GB would fail + since the Darwin read/write calls cannot handle the number of bytes + that their parameter types imply. + Fixes HDFFV-7975 and HDFFV-8240 (DER 2013/01/07) + - Fixed a bug in the core VFD that causes failures when opening files + > 2 GB. + Fixes HDFFV-8124 and HDFFV-8158 (DER 2013/01/07) + - Fixed a bug where unintialized memory was read during variable-length + type conversion. This caused segfaults in netCDF. Fixes HDFFV-8159. + (DER 2013/03/30) + - Removed the H5Pset/get_dxpl_multi functions from the library. The + intended functionality for them was never fully implemented, and they + have always been fundamentally broken. NOTE: This does not affect + setting the multi VFD or any expected VFD functionality. Multi VFD + usage remains unchanged. + Fixes HDFFV-8296. (DER 2013/03/30) + + Parallel Library + ---------------- + - None + + Performance + ------------- + - None + + Tools + ----- + - h5redeploy is changed to do this by default: + Installation directories: + prefix architecture-independent files. + exec_prefix architecture-dependent files, default is . + libdir libraries, default is /lib. + includedir header files, default is . + This allows users to just change the first line of prefix=<...> and the + effect will change libdir and includedir too. (AKC 2013/04/05 HDFFV-8358) + - h5repack: Fixed failure to convert the layout of a small chunked + dataset (size < 1K) to contiguous layout. HDFFV-8214 (JKM 2013/03/26) + - h5dump: Fixed displaying compression ratio for unknown or user-defined + filters. HDFFV-8344 (XCAO 2013/03/19) + - h5dump: Changed UNKNOWN_FILTER to USER_DEFINED_FILTER for user defined + filter. HDFFV-8346 (XCAO 2013/03/19) + - h5diff: Fixed to return the correct exit code 1 when the program + detects a unique extra attribute. Prior to this fix, h5diff returned + exit code 0 indicating the two files are identical. + HDFFV-7643 (JKM 2013/02/15) + - h5dump: Fixed writing nulls to a binary file when exporting a dataset + with compound string datatype. HDFFV-8169 (ADB 2013/1/31) + - The following h5stat test case failed in BG/P machines (and potentially + other machines that display extra output if an MPI task returns with a + non-zero code.) + Testing h5stat notexist.h5 + The test script was fixed to ignore the extra output. HDFFV-8233 + (AKC - 2012/11/30) + - h5diff: Improved speed when comparing HDF5 files with lots of + attributes. Much slower performance was identified with release versions + from 1.8.7 to 1.8.10 compared to 1.8.6. (JKM 2012/10/19) + + F90 API + ------- + - The integer type of the 'offset' argument in h5pset_external_f and + h5pget_external_f was changed to INTEGER(KIND=OFF_T) to support 8-byte + integers, matching the C type definition of off_t. (MSB - 2013/3/23) + - h5fc updated to recognize .f95, .f03 and .f08 file extensions. + + C++ API + ------ + - The C++ wrappers DSetMemXferPropList::setMulti/getMulti were removed + because the C functions H5Pset/get_dxpl_multi functions are removed + from the library. Fixes HDFFV-8296 by DER. (BMR 2013/03/30) + - An exception thrown by an internal function was not propagating to the + test program during stack unwinding, so it couldn't be caught by the + test, and the program terminated "without an active exception." It + seemed that the problem happened when c_str() was used to generate + an equivalent const char* from a std::string and the resulting string + was passed to the internal function. As a work-around, we added a + try/catch around the the call to the internal function and when the + exception is caught there, it is re-thrown. Fixes HDFFV-8067. + (BMR 2013/03/30) + + High-Level APIs: + ------ + - Fixed a problem with H5DSget_scale_name including the NULL terminator + in the size calculation returned by the function. The API was changed + to NOT include the NULL terminator in the size of name returned + (MSB- 2013/2/10) + + Fortran High-Level APIs: + ------ + - None + + Testing + ------- + - In some Mac systems, testlibinfo.sh failed with this error: + Check file ../src/.libs/libhdf5.7.dylib + strings: object: ../src/.libs/libhdf5.7.dylib malformed object \ + (unknown load command 15) + The strings command of Mac systems inspects library files, and older + versions of strings may not know newer library formats, resulting + in errors. Fixed by sending the library file as stdin to the strings + command to avoid this problem. (AKC - 2013/03/08 HDFFV-8305) + - Fixed a typo in the ERROR macro in test/testhdf5.h. It segmentation + faulted when used before. (AKC - 2013/02/12 HDFFV-8267) + +Supported Platforms +=================== +The following platforms are supported and have been tested for this release. +They are built with the configure process unless specified otherwise. + + AIX 5.3 xlc 10.1.0.5 + (NASA G-ADA) xlC 10.1.0.5 + xlf90 12.1.0.6 + + Linux 2.6.18-308.13.1.el5PAE GNU C (gcc), Fortran (gfortran), C++ (g++) + #1 SMP i686 i686 i386 compilers for 32-bit applications; + (jam) Version 4.1.2 20080704 (Red Hat 4.1.2-54) + Version 4.6.3 + PGI C, Fortran, C++ Compilers for 32-bit + applications; + Version 11.9-0 + Version 12.5-0 + Intel(R) C, C++, Fortran Compiler for 32-bit + applications; + Version 12.1 (Build 20110811) + Version 12.1 (Build 20120212) + + Linux 2.6.18-308.16.1.el5 GNU C (gcc), Fortran (gfortran), C++ (g++) + #1 SMP x86_64 GNU/Linux compilers for 64-bit applications; + (koala) Version 4.1.2 20080704 (Red Hat 4.1.2-52) + Version 4.6.3 + PGI C, Fortran, C++ for 64-bit target on + x86-64; + Version 11.9-0 + Version 12.5-0 + Intel(R) C, C++, Fortran Compilers for + applications running on Intel(R) 64; + Version 12.1 (Build 20110811) + Version 12.1 (Build 20120212) + + Linux 2.6.32-358.2.1.el6 GNU C (gcc), Fortran (gfortran), C++ (g++) + #1 SMP x86_64 GNU/Linux compilers: + (platypus) Version 4.4.7 20120313 + Intel(R) C (icc), C++ (icpc), Fortran (icc) + compilers: + Version 12.1 20120212 + + Linux 2.6.32-358.2.1.el6.ppc64 gcc (GCC) 4.4.7 20120313 (Red Hat 4.4.7-3) + #1 SMP ppc64 GNU/Linux g++ (GCC) 4.4.7 20120313 (Red Hat 4.4.7-3) + (ostrich) GNU Fortran (GCC) 4.4.7 20120313 (Red Hat 4.4.7-3) + IBM XL C/C++ V11.1 + IBM XL Fortran V13.1 + + SunOS 5.11 32- and 64-bit Sun C 5.12 SunOS_sparc + (emu) Sun Fortran 95 8.6 SunOS_sparc + Sun C++ 5.12 SunOS_sparc + + Windows 7 Visual Studio 2008 w/ Intel Fortran 11 (cmake) + Visual Studio 2010 w/ Intel Fortran 12 (cmake) + Visual Studio 2012 w/ Intel Fortran 13 (cmake) + Cygwin(CYGWIN_NT-6.1 1.7.15(0.260/5/3) gcc(4.5.3) compiler and gfortran) + (cmake and autotools) + + Windows 7 x64 Visual Studio 2008 w/ Intel Fortran 11 (cmake) + Visual Studio 2010 w/ Intel Fortran 12 (cmake) + Visual Studio 2012 w/ Intel Fortran 13 (cmake) + Cygwin(CYGWIN_NT-6.1 1.7.15(0.260/5/3) gcc(4.5.3) compiler and gfortran) + (cmake and autotools) + + Mac OS X Snow Leopard 10.6.8 gcc i686-apple-darwin11-llvm-gcc-4.2 (GCC) 4.2.1 from Xcode 3.2.6 + Darwin Kernel Version 10.8.0 g++ i686-apple-darwin11-llvm-g++-4.2 (GCC) 4.2.1 from Xcode 3.2.6 + 64-bit gfortran GNU Fortran (GCC) 4.6.2 + (fred) Intel C (icc), Fortran (ifort), C++ (icpc) + 12.1 Build 20120928 + + Mac OS X Lion 10.7.3 Apple clang/clang++ version 3.0 from Xcode 4.6.1 + 64-bit gfortran GNU Fortran (GCC) 4.6.2 + (duck) Intel icc/icpc/ifort version 13.0 + + Mac OS X Mountain Lion 10.8.1 Apple clang/clang++ version 4.2 from Xcode 4.6.1 + 64-bit gfortran GNU Fortran (GCC) 4.6.2 + (wren) Intel icc/icpc/ifort version 13.0.1.119 + + +Tested Configuration Features Summary +===================================== + + In the tables below + y = tested + n = not tested in this release + C = Cluster + W = Workstation + x = not working in this release + dna = does not apply + ( ) = footnote appears below second table + = testing incomplete on this feature or platform + +Platform C F90/ F90 C++ zlib SZIP + parallel F2003 parallel +Solaris2.11 32-bit n y/y n y y y +Solaris2.11 64-bit n y/n n y y y +Windows 7 y y/y n y y y +Windows 7 x64 y y/y n y y y +Windows 7 Cygwin n y/n n y y y +Windows 7 x64 Cygwin n y/n n y y y +Mac OS X Snow Leopard 10.6.8 64-bit n y/y n y y y +Mac OS X Lion 10.7.3 64-bit n y/y n y y y +Mac OS X Mountain Lion 10.8.1 64-bit n y/y n y y y +AIX 5.3 32- and 64-bit n y/n n y y y +CentOS 5.9 Linux 2.6.18-308 i686 GNU y y/y y y y y +CentOS 5.9 Linux 2.6.18-308 i686 Intel n y/y n y y y +CentOS 5.9 Linux 2.6.18-308 i686 PGI n y/y n y y y +CentOS 5.9 Linux 2.6.18 x86_64 GNU y y/y y y y y +CentOS 5.9 Linux 2.6.18 x86_64 Intel n y/y n y y y +CentOS 5.9 Linux 2.6.18 x86_64 PGI n y/y n y y y +CentOS 6.4 Linux 2.6.32 x86_64 GNU n y/n n y y y +CentOS 6.4 Linux 2.6.32 x86_64 Intel n y/y n y y y +Linux 2.6.32-358.2.1.el6.ppc64 n y/n n y y y + + +Platform Shared Shared Shared Thread- + C libs F90 libs C++ libs safe +Solaris2.11 32-bit y y y y +Solaris2.11 64-bit y y y y +Windows 7 y y y y +Windows 7 x64 y y y y +Windows 7 Cygwin n n n y +Windows 7 x64 Cygwin n n n y +Mac OS X Snow Leopard 10.6.8 64-bit y n y n +Mac OS X Lion 10.7.3 64-bit y n y y +Mac OS X Mountain Lion 10.8.1 64-bit y n y y +AIX 5.3 32- and 64-bit y n n y +CentOS 5.9 Linux 2.6.18-308 i686 GNU y y y y +CentOS 5.9 Linux 2.6.18-308 i686 Intel y y y n +CentOS 5.9 Linux 2.6.18-308 i686 PGI y y y n +CentOS 5.9 Linux 2.6.18 x86_64 GNU y y y y +CentOS 5.9 Linux 2.6.18 x86_64 Intel y y y n +CentOS 5.9 Linux 2.6.18 x86_64 PGI y y y n +CentOS 6.4 Linux 2.6.32 x86_64 GNU y y y n +CentOS 6.4 Linux 2.6.32 x86_64 Intel y y y n +Linux 2.6.32-358.2.1.el6.ppc64 y y y n + +Compiler versions for each platform are listed in the preceding +"Supported Platforms" table. + + +More Tested Platforms +===================== +The following platforms are not supported but have been tested for this release. + + Linux 2.6.18-308.13.1.el5PAE MPICH mpich2-1.4.1p1 compiled with + #1 SMP i686 i686 i386 gcc 4.1.2 and gfortran 4.1.2 + (jam) g95 (GCC 4.0.3 (g95 0.94!) + + Linux 2.6.18-308.16.1.el5 MPICH mpich2-1.4.1p1 compiled with + #1 SMP x86_64 GNU/Linux gcc 4.1.2 and gfortran 4.1.2 + (koala) g95 (GCC 4.0.3 (g95 0.94!) + + FreeBSD 8.2-STABLE i386 gcc 4.2.1 [FreeBSD] 20070719 + (loyalty) gcc 4.6.1 20110422 + g++ 4.6.1 20110422 + gfortran 4.6.1 20110422 + + FreeBSD 8.2-STABLE amd64 gcc 4.2.1 [FreeBSD] 20070719 + (freedom) gcc 4.6.1 20110422 + g++ 4.6.1 20110422 + gfortran 4.6.1 20110422 + + Debian6.0.7 2.6.32-5-amd64 #1 SMP x86_64 GNU/Linux + gcc (Debian 4.4.5-8) 4.4.5 + GNU Fortran (Debian 4.4.5-8) 4.4.5 + (cmake and autotools) + + Fedora18 3.7.9-205.fc18.x86_64 #1 SMP x86_64 x86_64 x86_64 GNU/Linux + gcc (GCC) 4.7.2 20121109 (Red Hat 4.7.2-8) + GNU Fortran (GCC) 4.7.2 20120507 (Red Hat 4.7.2-8) + (cmake and autotools) + + SUSE 12.3 3.7.10-1.1-desktop #1 SMP PREEMPT x86_64 x86_64 x86_64 GNU/Linux + gcc (SUSE Linux) 4.7.2 + GNU Fortran (SUSE Linux) 4.7.2 + (cmake and autotools) + + Ubuntu 12.10 3.5.0-25-generic #39-Ubuntu SMP x86_64 GNU/Linux + gcc (Ubuntu/Linaro 4.7.2-2ubuntu1) 4.7.2 + GNU Fortran (Ubuntu/Linaro 4.7.2-2ubuntu1) 4.7.2 + (cmake and autotools) + + Cray Linux Environment (CLE) PrgEnv-pgi/4.0.46 + hopper.nersc.gov pgcc 12.5-0 64-bit target on x86-64 Linux -tp shanghai + pgf90 12.5-0 64-bit target on x86-64 Linux -tp shanghai + pgCC 12.5-0 64-bit target on x86-64 Linux -tp shanghai + + +Known Problems +============== + +* When building using the Cray compilers on Cray machines, HDF5 + configure mistakenly thinks the compiler is an intel compiler and + sets the -std=c99 flag which breaks configure on Cray. To build HDF5 + properly on a Cray machine, please consult with the instructions in + INSTALL_parallel for building on Hopper. + (MSC - 2013/04/26 - HDFFV-8429) + +* The h5dump and h5diff utilities occasionally produce different output + between Linux and Windows systems. This is caused by lower-level library + routines that fail to write fill values to the user's buffer when reading + unallocated chunks from datasets that have a fill value set to + H5D_FILL_VALUE_DEFAULT. Due to platform differences the return of + spurious data values has only been encountered on Windows 32-bit systems. + (Issue HDFFV-8247; JP - 2013/03/27) + +* The 5.9 C++ compiler on Sun failed to compile a C++ test ttypes.cpp. It + complains with this message: + "/home/hdf5/src/H5Vprivate.h", line 130: Error: __func__ is not defined. + + The reason is that __func__ is a predefined identifier in C99 standard. The + HDF5 C library uses it in H5private.h. The test ttypes.cpp includes + H5private.h (H5Tpkg.h<-H5Fprivate.h<-H5Vprivate.h<-H5private.h). Sun's 5.9 + C++ compiler doesn't support __func__, thus fails to compile the C++ test. + But Sun's 5.11 C++ compiler does. To check whether your Sun C++ compiler + knows this identifier, try to compile the following simple C++ program: + #include + + int main(void) + { + printf("%s\n", __func__); + return 0; + } + (SLU - 2012/11/5) + +* The C++ and FORTRAN bindings are not currently working on FreeBSD with the + native release 8.2 compilers (4.2.1), but are working with gcc 4.6 from the + ports (and probably gcc releases after that). + (QAK - 2012/10/19) + +* The following h5dump test case fails in BG/P machines (and potentially other + machines that use a command script to launch executables): + + h5dump --no-compact-subset -d "AHFINDERDIRECT::ah_centroid_t[0] it=0 tl=0" + tno-subset.h5 + + This is due to the embedded spaces in the dataset name being interpreted + by the command script launcher as meta-characters, thus passing three + arguments to h5dump's -d flag. The command passes if run by hand, just + not via the test script. + (AKC - 2012/05/03) + +* On hopper, the build failed when RUNSERIAL and RUNPARALLEL are set + to aprun -np X, because the H5lib_settings.c file was not generated + properly. Not setting those environment variables works, because + configure was able to automatically detect that it's a Cray system + and used the proper launch commands when necessary. + (MSC - 2012/04/18) + +* The data conversion test dt_arith.c fails in "long double" to integer + conversion on Ubuntu 11.10 (3.0.0.13 kernel) with GCC 4.6.1 if the library + is built with optimization -O3 or -O2. The older GCC (4.5) or newer kernal + (3.2.2 on Fedora) doesn't have the problem. Users should lower the + optimization level (-O1 or -O0) by defining CFLAGS in the command line of + "configure" like: + + CFLAGS=-O1 ./configure + + This will overwrite the library's default optimization level. + (SLU - 2012/02/07 - HDFFV-7829) + This issue is no longer present on Ubuntu 12.10 (3.5.0 kernel) with + gcc 4.7.2. + +* The STDIO VFD does not work on some architectures, possibly due to 32/64 + bit or large file issues. The basic STDIO VFD test is known to fail on + 64-bit SunOS 5.10 on SPARC when built with -m64 and 32-bit OS X/Darwin + 10.7.0. The STDIO VFD test has been disabled while we investigate and + a fix should appear in a future release. + (DER - 2011/10/14 - HDFFV-8235) + +* h5diff can report inconsistent results when comparing datasets of enum type + that contain invalid values. This is due to how enum types are handled in + the library and will be addressed in a future release. + (DER - 2011/10/14 - HDFFV-7527) + +* The links test can fail under the stdio VFD due to some issues with external + links. This will be investigated and fixed in a future release. + (DER - 2011/10/14 - HDFFV-7768) + +* After the shared library support was fixed for some bugs, it was discovered + that "make prefix=XXX install" no longer works for shared libraries. It + still works correctly for static libraries. Therefore, if you want to + install the HDF5 shared libraries in a location such as /usr/local/hdf5, + you need to specify the location via the --prefix option during configure + time. E.g, ./configure --prefix=/usr/local/hdf5 ... + (AKC - 2011/05/07 - HDFFV-7583) + +* The parallel test, t_shapesame, in testpar/, may run for a long time and may + be terminated by the alarm signal. If that happens, one can increase the + alarm seconds (default is 1200 seconds = 20 minutes) by setting the + environment variable, $HDF5_ALARM_SECONDS, to a larger value such as 3600 + (60 minutes). Note that the t_shapesame test may fail in some systems + (see the "While working on the 1.8.6 release..." problem below). If + it does, it will waste more time if $HDF5_ALARM_SECONDS is set + to a larger value. + (AKC - 2011/05/07) + +* The C++ and FORTRAN bindings are not currently working on FreeBSD. + (QAK - 2011/04/26) + +* Shared Fortran libraries are not quite working on AIX. While they are + generated when --enable-shared is specified, the fortran and hl/fortran + tests fail. We are looking into the issue. HL and C++ shared libraries + should now be working as intended, however. + (MAM - 2011/04/20) + +* The --with-mpe configure option does not work with Mpich2. + (AKC - 2011/03/10) + +* While working on the 1.8.6 release of HDF5, a bug was discovered that can + occur when reading from a dataset in parallel shortly after it has been + written to collectively. The issue was exposed by a new test in the parallel + HDF5 test suite, but had existed before that. We believe the problem lies with + certain MPI implementations and/or file systems. + + We have provided a pure MPI test program, as well as a standalone HDF5 + program, that can be used to determine if this is an issue on your system. + They should be run across multiple nodes with a varying number of processes. + These programs can be found at: + http://www.hdfgroup.org/ftp/HDF5/examples/known_problems/ + (NAF - 2011/01/19) + +* The library's test dt_arith.c showed a compiler's rounding problem on + Cygwin when converting from unsigned long long to long double. The + library's own conversion works fine. We defined a macro for Cygwin to + skip this test until we can solve the problem. + (SLU - 2010/05/05 - HDFFV-1264) + +* All the VFL drivers aren't backward compatible. In H5FDpublic.h, the + structure H5FD_class_t changed in 1.8. There is new parameter added to + get_eoa and set_eoa callback functions. A new callback function + get_type_map was added in. The public function H5FDrealloc was taken + out in 1.8. The problem only happens when users define their own driver + for 1.6 and try to plug in 1.8 library. Because there's only one user + complaining about it, we (Elena, Quincey, and I) decided to leave it as + it is (see bug report #1279). Quincey will make a plan for 1.10. + (SLU - 2010/02/02) + +* The --enable-static-exec configure flag will only statically link libraries + if the static version of that library is present. If only the shared version + of a library exists (i.e., most system libraries on Solaris, AIX, and Mac, + for example, only have shared versions), the flag should still result in a + successful compilation, but note that the installed executables will not be + fully static. Thus, the only guarantee on these systems is that the + executable is statically linked with just the HDF5 library. + (MAM - 2009/11/04) + +* Parallel tests failed with 16 processes with data inconsistency at testphdf5 + / dataset_readAll. Parallel tests also failed with 32 and 64 processes with + collective abort of all ranks at t_posix_compliant / allwrite_allread_blocks + with MPI IO. + (CMC - 2009/04/28) + +* On an Intel 64 Linux cluster (RH 4, Linux 2.6.9) with Intel 10.0 compilers, + use -mp -O1 compilation flags to build the libraries. A higher level of + optimization causes failures in several HDF5 library tests. + +* A dataset created or rewritten with a v1.6.3 library or after cannot be read + with the v1.6.2 library or before when the Fletcher32 EDC filter is enabled. + There was a bug in the calculation of the Fletcher32 checksum in the + library before v1.6.3; the checksum value was not consistent between big- + endian and little-endian systems. This bug was fixed in Release 1.6.3. + However, after fixing the bug, the checksum value was no longer the same as + before on little-endian system. Library releases after 1.6.4 can still read + datasets created or rewritten with an HDF5 library of v1.6.2 or before. + (SLU - 2005/06/30) + + +%%%%1.8.10-patch1%%%% + + +HDF5 version 1.8.10-patch1 released on 2013-01-22 +================================================================================ + +INTRODUCTION +============ + +This document describes the differences between HDF5-1.8.9 and +HDF5 1.8.10, and contains information on the platforms tested and +known problems in HDF5-1.8.10. +For more details, see the files HISTORY-1_0-1_8_0_rc3.txt +and HISTORY-1_8.txt in the release_docs/ directory of the HDF5 source. + +Links to the HDF5 1.8.10 source code, documentation, and additional materials +can be found on the HDF5 web page at: + + http://www.hdfgroup.org/products/hdf5/ + +The HDF5 1.8.10 release can be obtained from: + + http://www.hdfgroup.org/HDF5/release/obtain5.html + +User documentation for 1.8.10 can be accessed directly at this location: + + http://www.hdfgroup.org/HDF5/doc/ + +New features in the HDF5-1.8.x release series, including brief general +descriptions of some new and modified APIs, are described in the "What's New +in 1.8.0?" document: + + http://www.hdfgroup.org/HDF5/doc/ADGuide/WhatsNew180.html + +All new and modified APIs are listed in detail in the "HDF5 Software Changes +from Release to Release" document, in the section "Release 1.8.10 (current +release) versus Release 1.8.9": + + http://www.hdfgroup.org/HDF5/doc/ADGuide/Changes.html + +If you have any questions or comments, please send them to the HDF Help Desk: + + help@hdfgroup.org + + +CONTENTS +======== + +- New Features +- Support for New Platforms, Languages, and Compilers +- Bug Fixes since HDF5-1.8.10 +- Bug Fixes since HDF5-1.8.9 +- Supported Platforms +- Supported Configuration Features Summary +- More Tested Platforms +- Known Problems + + +New Features +============ + + Configuration + ------------- + - A new tool, cmakehdf5, which is a build command script similar to + buildhdf5 is added and is available in the bin directory. + (AKC - 2013/01/21) + + Library + ------- + - Updated to latest autotools and changed all hard *.sh scripts to + configure managed *.sh.in files. Removed overloading of autotools + TESTS variable by examples and tests. Renamed configure.in to + configure.ac. (ADB - 2012/08/23 - HDFFV-8129) + - The data sieve buffer size was set for all the datasets in the file. It + could waste memory if any dataset size is smaller than the sieve buffer + size. Now the library picks the smaller one between the dataset size + and the sieve buffer size from the file access property. See Issue 7934. + (SLU - 2012/4/11) + + Parallel Library + ---------------- + - Added the H5Pget_mpio_no_collective_cause() function that retrieves + reasons why the collective I/O was broken during read/write IO access. + (JKM - 2012/08/30 HDFFV-8143) + + - Added H5Pget_mpio_actual_io_mode_f (MSB - 2012/09/27) + + Tools + ----- + - h5import: Changed to allow the use of h5dump output as input files to + h5import. h5dump must include the "-p" option to print the properties; + configuration file is captured output of h5dump. The restrictions are + that only one dataset with a simple datatype (integer, floating-point, + or string) can be processed. Integers and floating-point imports from + h5dump must use the "binary" option for the data file. The string version + uses the h5dump "-y --width=1" options to disable the indexing printouts, + print single columns, and obviously NOT use the "binary" option. + (ADB - 2012/07/19 HDFFV-721) + + High-Level APIs + --------------- + - None + + Fortran API + ----------- + - Fixed a typo in return value of the nh5dread_f_c function (was 1 + instead of 0 on success); fixed the return value to make it consistent + with other Fortran functions; cleaned debug statements from the code. + (EIP - 2012/06/23) + + C++ API + ------- + - None + + +Support for New Platforms, Languages, and Compilers +=================================================== + - None + +Bug Fixes since HDF5-1.8.10 +=========================== + Library + ------- + - The library now behaves correctly when performing large I/O operations on + Mac OS-X. Previously, single I/O operations > 2 GB would fail since the + Darwin read/write calls cannot handle the number of bytes that their + parameter types imply. + Fixes HDFFV-7975 and HDFFV-8240 (DER - 07 JAN 2013) + - Fixed a bug in the core VFD that cause failures when opening files > 2 GB. + Fixes HDFFV-8124 and HDFFV-8158 (DER - 07 JAN 2013) + + Tools + ----- + - The following h5stat test case failed in BG/P machines (and potentially + other machines that display extra output if an MPI task returns with a + non-zero code.) + Testing h5stat notexist.h5 + The test script was fixed to ignore the extra output. + HDFFV-8233 (AKC - 2012/12/17) + - h5diff: Fixed slowness when comparing HDF5 files with many attributes. + Much slower performance was identified with later release version + (from 1.8.7 to 1.8.10) compared to 1.8.6. The issue was introduced + from fixing an attribute related bug for 1.8.7 release in the past. + HDFFV-8145 (JKM 2012/12/13) + + Testing + ------- + - None + +Bug Fixes since HDF5-1.8.9 +========================== + + Configuration + ------------- + - Fixed configure --enable-production to not use -O optimization for Lion + and Mountain Lion systems when gcc (i686-apple-darwin11-llvm-gcc-4.2 + (GCC) 4.2.1) is used. Somehow the -O optimization will cause some of + the hard conversion code in test/dt_arith.c to fail. HDFFV-8017. + (AKC - 2012/10/10) + - Fixed AIX Fortran compiler flags to use appropriate settings for + debugging, profiling, and optimization situations. HDFFV-8069. + (AKC 2012/09/27) + + Library + ------- + - Fixed a memory leak exposed when inserting/removing a property + from a property list several times. HDFFV-8022. (MSC 2012/05/18) + - The file_image test will fail in the "initial file image and callbacks in + the core VFD" sub-test if the source directory is read-only as the test + fails to create its test files in the build directory. This has been + fixed. HDFFV-8009 (AKC - 2012/07/06) + + + Parallel Library + ---------------- + - The MPI-POSIX VFD was updated to include the POSIX and Windows + correctness features added that had already been added to the other VFDs. + HDFFV-8058/7845. (DER 2012/09/17) + + Performance + ------------- + - Removed program perform/benchpar from the enable-build-all list. The + program will be retired or moved to another location. HDFFV-8156 + (AKC 2012/10/01) + - Retired program perform/mpi-perf. Its purpose has been incorporated + into h5perf. (AKC 2012/09/21) + + Tools + ----- + - h5repack: "h5repack -f NONE file1.h5 out.h5" command failed if + source file contains chunked dataset and a chunk dim is bigger than + the dataset dim. Another issue is that the command changed max dims + if chunk dim is smaller than the dataset dim. These issue occurred + when dataset size is smaller than 64k (compact size limit) Fixed both. + HDFFV-8012 (JKM 2012/09/24) + - h5diff: Fixed the counter in verbose mode (-v, -r) so that it will no + longer add together the differences between datasets and the differences + between attributes of those datasets. This change makes the output of + verbose mode consistent for datasets, groups, and committed datatypes. + HDFFV-5919 (JKM 2012/09/10) + - h5diff: Fixed the incorrect result when comparing attribute data + values and the data type has the same class but different sizes. + HDFFV-7942 (JKM 2012/08/15) + - h5dump: Replaced single element fwrite with block writes. + HDFFV-1208 (ADB 2012/08/13) + - h5diff: Fixed test failure for "make check" due to failure of + copying test files when performed in HDF5 source tree. Also applied + to other tools. HDFFV-8107 (JKM 2012/08/01) + - ph5diff: Fixed intermittent hang issue on a certain operation in + parallel mode. It was detected by daily test for comparing + non-comparable objects, but it could have occurred in other + operations depending on machine condition. HDFFV-8003 (JKM 2012/08/01) + - h5diff: Fixed the function COPY_TESTFILES_TO_TESTDIR() of testh5diff.sh + to better report when there is an error in the file copying. + HDFFV-8105 (AKC 2012/07/22) + - h5dump: Fixed the sort by name display to maintain correct parent/child + relationships between ascending/descending order. + HDFFV-8095 (ADB 2012/07/12) + - h5dump: Fixed the display by creation order when using option -n + (print contents). + HDFFV-5942 (ADB 2012/07/09) + - h5dump: Changed to allow H5T_CSET_UTF8 to be displayed in h5dump output. + Used technique similar to what was done in h5ls (matches library + options). + HDFFV-7999 (ADB 2012/05/23) + - h5diff: Fixed the tool so that it will not check and display the status + of dangling links without setting the --follow-symlinks option. This + also improved performance when comparing lots of external links without + the --follow-symlinks option. + HDFFV-7998 (JKM 2012/04/26) + + F90 API + ------- + + - Fixed a typo in return value of the nh5dread_f_c function (was 1 + instead of 0 on success); fixed the return value to make it consistent + with other Fortran functions; cleaned debug statements from the code. + (EIP - 2012/06/23) + + - Fixed a problem writing/reading control characters to a dataset; writing + a string containing alerts, backspace, carriage_return, form_feed, + horizontal_tab, vertical_tab, or new_line is now tested and working. + (MSB - 2012/09/01) + + - Corrected the integer type of H5S_UNLIMITED_F to HSIZE_T (MSB - 2012/09/01) + + - Corrected the number of continuation lines in the src files + to be less than 32 lines for F95 compliance. (MSB - 2012/10/01) + + C++ API + ------ + - None + + High-Level APIs: + ------ + + - Fixed problem with H5TBdelete_record destroying all data following the + deletion of a row. (MSB- 2012/7/26) + + - Fixed H5LTget_attribute_string not closing an object identifier when an + error occurs. (MSB- 2012/7/21) + + - Corrected the return type of H5TBAget_fill from herr_t to htri_t to + reflect that a return value of 1 indicates that a fill value is + present, 0 indicates a fill value is not present, and <0 indicates an + error. + + Fortran High-Level APIs: + ------ + - None + +Supported Platforms +=================== + AIX 5.3 xlc 10.1.0.5 + (NASA G-ADA) xlC 10.1.0.5 + xlf90 12.1.0.6 + + Linux 2.6.18-308.13.1.el5PAE GNU C (gcc), Fortran (gfortran), C++ (g++) + #1 SMP i686 i686 i386 compilers for 32-bit applications; + (jam) Version 4.1.2 20080704 (Red Hat 4.1.2-52) + Version 4.6.3 + PGI C, Fortran, C++ Compilers for 32-bit + applications; + Version 11.9-0 + Intel(R) C, C++, Fortran Compiler for 32-bit + applications; + Version 12.1 + MPICH mpich2-1.4.1p1 compiled with + gcc 4.1.2 and gfortran 4.1.2 + + Linux 2.6.18-308.16.1.el5 GNU C (gcc), Fortran (gfortran), C++ (g++) + #1 SMP x86_64 GNU/Linux compilers for 32-bit applications; + (koala) Version 4.1.2 20080704 (Red Hat 4.1.2-52) + Version 4.6.3 + PGI C, Fortran, C++ for 64-bit target on + x86-64; + Version 11.9-0 + Version 12.5-0 + Intel(R) C, C++, Fortran Compilers for + applications running on Intel(R) 64; + Version 12.1 (Build 20110811) + Version 12.1 (Build 20120212) + MPICH mpich2-1.4.1p1 compiled with + gcc 4.1.2 and gfortran 4.1.2 + + Linux 2.6.32-220.7.1.el6.ppc64 gcc (GCC) 4.4.6 20110731 (Red Hat 4.4.6-3) + #1 SMP ppc64 GNU/Linux g++ (GCC) 4.4.6 20110731 + (ostrich) GNU Fortran (GCC) 4.4.6 20110731 (Red Hat 4.4.6-3) + + Linux 2.6.32-220.23.1.1chaos Intel C, C++, Fortran Compilers + ch5.x86_64 GNU/Linux Version 12.1.5.339 + (LLNL Aztec) + + IBM Blue Gene/P XL C for Blue Gene/P, bgxlc V9.0 + (LLNL uDawn) XL C++ for Blue Gene/P, bgxlC V9.0 + XL Fortran for Blue Gene/P, bgxlf90 V11.1 + + SunOS 5.10 32- and 64-bit Sun C 5.9 Sun OS_sparc Patch 124867-16 + (linew) Sun Fortran 95 8.3 Sun OS_sparc Patch 127000-13 + Sun C++ 5.9 Sun OS_sparc Patch 124863-26 + Sun C 5.11 SunOS_sparc + Sun Fortran 95 8.5 SunOS_sparc + Sun C++ 5.11 SunOS_sparc + + Windows XP Visual Studio 2008 w/ Intel Fortran 10.1 (project files) + + Windows XP x64 Visual Studio 2008 w/ Intel Fortran 10.1 (project files) + + Windows 7 Visual Studio 2008 w/ Intel Fortran 11.1 (cmake) + Visual Studio 2010 w/ Intel Fortran 12 (cmake) + Cygwin(CYGWIN_NT-6.1 1.7.15(0.260/5/3) gcc(4.5.3) compiler and gfortran) + (cmake and autotools) + + Windows 7 x64 Visual Studio 2008 w/ Intel Fortran 11.1 (cmake) + Visual Studio 2010 w/ Intel Fortran 12 (cmake) + Cygwin(CYGWIN_NT-6.1 1.7.15(0.260/5/3) gcc(4.5.3) compiler and gfortran) + (cmake and autotools) + + Mac OS X Snow Leopard 10.6.8 gcc i686-apple-darwin11-llvm-gcc-4.2 (GCC) 4.2.1 from Xcode 3.2.6 + Darwin Kernel Version 10.8.0 g++ i686-apple-darwin11-llvm-g++-4.2 (GCC) 4.2.1 from Xcode 3.2.6 + (fred) gfortran GNU Fortran (GCC) 4.6.2 + Intel C (icc), Fortran (ifort), C++ (icpc) + 12.1.0.038 Build 20110811 + + Mac OS X Snow Leopard 10.6.8 gcc i686-apple-darwin11-llvm-gcc-4.2 (GCC) 4.2.1 from Xcode 3.2.6 + Darwin Kernel Version 10.8.0 g++ i686-apple-darwin11-llvm-g++-4.2 (GCC) 4.2.1 from Xcode 3.2.6 + Intel 32-bit gfortran GNU Fortran (GCC) 4.6.1 + (tejeda) Intel C (icc), Fortran (ifort), C++ (icpc) + 12.1.0.038 Build 20110811 + + Mac OS X Lion 10.7.3 gcc i686-apple-darwin11-llvm-gcc-4.2 (GCC) 4.2.1 from Xcode 4.2.1 + 32- and 64-bit g++ i686-apple-darwin11-llvm-g++-4.2 (GCC) 4.2.1 from Xcode 4.2.1 + (duck) gfortran GNU Fortran (GCC) 4.6.2 + + Mac OS X Mountain Lion 10.8.1 cc Apple clang version 4.0 from Xcode 4.5.1 + (owl) c++ Apple clang version 4.0 from Xcode 4.5.1 + gcc i686-apple-darwin11-llvm-gcc-4.2 (GCC) 4.2.1 from Xcode 4.5.1 + g++ i686-apple-darwin11-llvm-g++-4.2 (GCC) 4.2.1 from Xcode 4.5.1 + gfortran GNU Fortran (GCC) 4.6.2 + + +Tested Configuration Features Summary +===================================== + + In the tables below + y = tested + n = not tested in this release + C = Cluster + W = Workstation + x = not working in this release + dna = does not apply + ( ) = footnote appears below second table + = testing incomplete on this feature or platform + +Platform C F90/ F90 C++ zlib SZIP + parallel F2003 parallel +Solaris2.10 32-bit n y/y n y y y +Solaris2.10 64-bit n y/n n y y y +Windows 7 y y/n n y y y +Windows 7 x64 y y/n n y y y +Mac OS X Snow Leopard 10.6.8 32-bit n y/y n y y n +Mac OS X Snow Leopard 10.6.8 64-bit n y/y n y y y +Mac OS X Lion 10.7.3 32-bit n y/y n y y n +Mac OS X Lion 10.7.3 64-bit n y/y n y y y +Mac OS X Mountain Lion 10.8.1 64-bit n y/n n y y n +AIX 5.3 32- and 64-bit y y/n y y y y +CentOS 5.5 Linux 2.6.18-308 i686 GNU y y/y y y y y +CentOS 5.5 Linux 2.6.18-308 i686 Intel n y/y n y y y +CentOS 5.5 Linux 2.6.18-308 i686 PGI n y/y n y y y +CentOS 5.5 Linux 2.6.18 x86_64 GNU y y/y y y y y +CentOS 5.5 Linux 2.6.18 x86_64 Intel n y/y n y y y +CentOS 5.5 Linux 2.6.18 x86_64 PGI n y/y n y y y +Linux 2.6.32-220.7.1.el6.ppc64 n y/n n y y y + + +Platform Shared Shared Shared Thread- + C libs F90 libs C++ libs safe +Solaris2.10 32-bit y y y y +Solaris2.10 64-bit n n n n +Windows 7 y y y y +Windows 7 x64 y y y y +Mac OS X Snow Leopard 10.6.8 32-bit y n y n +Mac OS X Snow Leopard 10.6.8 64-bit y n y n +Mac OS X Lion 10.7.3 32-bit y n y y +Mac OS X Lion 10.7.3 64-bit y n y y +Mac OS X Mountain Lion 10.8.1 64-bit y n y y +AIX 5.3 32- and 64-bit n n n y +CentOS 5.5 Linux 2.6.18-308 i686 GNU y y y y +CentOS 5.5 Linux 2.6.18-308 i686 Intel y y y n +CentOS 5.5 Linux 2.6.18-308 i686 PGI y y y n +CentOS 5.5 Linux 2.6.18 x86_64 GNU y y y y +CentOS 5.5 Linux 2.6.18 x86_64 Intel y y y n +CentOS 5.5 Linux 2.6.18 x86_64 PGI y y y n +Linux 2.6.32-220.7.1.el6.ppc64 y y y n + +Compiler versions for each platform are listed in the preceding +"Supported Platforms" table. + + +More Tested Platforms +===================== +The following platforms are not supported but have been tested for this release. + + FreeBSD 8.2-STABLE i386 gcc 4.2.1 [FreeBSD] 20070719 + (loyalty) gcc 4.6.1 20110422 + g++ 4.6.1 20110422 + gfortran 4.6.1 20110422 + + FreeBSD 8.2-STABLE amd64 gcc 4.2.1 [FreeBSD] 20070719 + (freedom) gcc 4.6.1 20110422 + g++ 4.6.1 20110422 + gfortran 4.6.1 20110422 + + Debian6.0.3 2.6.32-5-686 #1 SMP i686 GNU/Linux + gcc (Debian 4.4.5-8) 4.4.5 + GNU Fortran (Debian 4.4.5-8) 4.4.5 + (cmake and autotools) + + Debian6.0.3 2.6.32-5-amd64 #1 SMP x86_64 GNU/Linux + gcc (Debian 4.4.5-8) 4.4.5 + GNU Fortran (Debian 4.4.5-8) 4.4.5 + (cmake and autotools) + + Fedora17 3.5.2-1.fc17.i6866 #1 SMP i686 i686 i386 GNU/Linux + gcc (GCC) 4.7.0 20120507 (Red Hat 4.7.0-5) + GNU Fortran (GCC) 4.7.0 20120507 (Red Hat 4.7.0-5) + (cmake and autotools) + + Fedora17 3.5.2-1.fc17.x86_64 #1 SMP x86_64 x86_64 x86_64 GNU/Linux + gcc (GCC) 4.7.0 20120507 (Red Hat 4.7.0-5) + GNU Fortran (GCC) 4.7.0 20120507 (Red Hat 4.7.0-5) + (cmake and autotools) + + SUSE 12.2 3.4.6-2.10-desktop #1 SMP PREEMPT i686 i686 i386 GNU/Linux + gcc (SUSE Linux) 4.7.1 + GNU Fortran (SUSE Linux) 4.7.1 + (cmake and autotools) + + SUSE 12.2 3.4.6-2.10-desktop #1 SMP PREEMPT x86_64 x86_64 x86_64 GNU/Linux + gcc (SUSE Linux) 4.7.1 + GNU Fortran (SUSE Linux) 4.7.1 + (cmake and autotools) + + Ubuntu 12.04 3.2.0-29-generic #46-Ubuntu SMP i686 GNU/Linux + gcc (Ubuntu/Linaro 4.6.3-1ubuntu5) 4.6.3 + GNU Fortran (Ubuntu/Linaro 4.6.3-1ubuntu5) 4.6.3 + (cmake and autotools) + + Ubuntu 12.04 3.2.0-29-generic #46-Ubuntu SMP x86_64 GNU/Linux + gcc (Ubuntu/Linaro 4.6.3-1ubuntu5) 4.6.3 + GNU Fortran (Ubuntu/Linaro 4.6.3-1ubuntu5) 4.6.3 + (cmake and autotools) + (Use optimization level -O1) + + Cray Linux Environment (CLE) PrgEnv-pgi/4.0.46 + hopper.nersc.gov pgcc 12.5-0 64-bit target on x86-64 Linux -tp shanghai + pgf90 12.5-0 64-bit target on x86-64 Linux -tp shanghai + pgCC 12.5-0 64-bit target on x86-64 Linux -tp shanghai + + +Known Problems +============== +* The C++ and FORTRAN bindings are not currently working on FreeBSD with the + native release 8.2 compilers (4.2.1), but are working with gcc 4.6 from the + ports (and probably gcc releases after that). + (QAK - 2012/10/19) + +* The following h5dump test case fails in BG/P machines (and potentially other + machines that use a command script to launch executables): + + h5dump --no-compact-subset -d "AHFINDERDIRECT::ah_centroid_t[0] it=0 tl=0" + tno-subset.h5 + + This is due to the embedded spaces in the dataset name being interpreted + by the command script launcher as meta-characters, thus passing three + arguments to h5dump's -d flag. The command passes if run by hand, just + not via the test script. + (AKC - 2012/05/03) + +* On hopper, the build failed when RUNSERIAL and RUNPARALLEL are set + to aprun -np X, because the H5lib_settings.c file was not generated + properly. Not setting those environment variables works, because + configure was able to automatically detect that it's a Cray system + and used the proper launch commands when necessary. + (MSC - 2012/04/18) + +* The data conversion test dt_arith.c fails in "long double" to integer + conversion on Ubuntu 11.10 (3.0.0.13 kernal) with GCC 4.6.1 if the library + is built with optimization -O3 or -O2. The older GCC (4.5) or newer kernal + (3.2.2 on Fedora) doesn't have the problem. Users should lower the + optimization level (-O1 or -O0) by defining CFLAGS in the command line of + "configure" like: + + CFLAGS=-O1 ./configure + + This will overwrite the library's default optimization level. + (SLU - 2012/02/07 - HDFFV-7829) + +* The STDIO VFD does not work on some architectures, possibly due to 32/64 + bit or large file issues. The basic STDIO VFD test is known to fail on + 64-bit SunOS 5.10 on SPARC when built with -m64 and 32-bit OS X/Darwin + 10.7.0. The STDIO VFD test has been disabled while we investigate and + a fix should appear in a future release. + (DER - 2011/10/14 - HDFFV-8235) + +* h5diff can report inconsistent results when comparing datasets of enum type + that contain invalid values. This is due to how enum types are handled in + the library and will be addressed in a future release. + (DER - 2011/10/14 - HDFFV-7527) + +* The links test can fail under the stdio VFD due to some issues with external + links. This will be investigated and fixed in a future release. + (DER - 2011/10/14 - HDFFV-7768) + +* After the shared library support was fixed for some bugs, it was discovered + that "make prefix=XXX install" no longer works for shared libraries. It + still works correctly for static libraries. Therefore, if you want to + install the HDF5 shared libraries in a location such as /usr/local/hdf5, + you need to specify the location via the --prefix option during configure + time. E.g, ./configure --prefix=/usr/local/hdf5 ... + (AKC - 2011/05/07 - HDFFV-7583) + +* The parallel test, t_shapesame, in testpar/, may run for a long time and may + be terminated by the alarm signal. If that happens, one can increase the + alarm seconds (default is 1200 seconds = 20 minutes) by setting the + environment variable, $HDF5_ALARM_SECONDS, to a larger value such as 3600 + (60 minutes). Note that the t_shapesame test may fail in some systems + (see the "While working on the 1.8.6 release..." problem below). If + it does, it will waste more time if $HDF5_ALARM_SECONDS is set + to a larger value. + (AKC - 2011/05/07) + +* The C++ and FORTRAN bindings are not currently working on FreeBSD. + (QAK - 2011/04/26) + +* Shared Fortran libraries are not quite working on AIX. While they are + generated when --enable-shared is specified, the fortran and hl/fortran + tests fail. We are looking into the issue. HL and C++ shared libraries + should now be working as intended, however. + (MAM - 2011/04/20) + +* The --with-mpe configure option does not work with Mpich2. + (AKC - 2011/03/10) + +* While working on the 1.8.6 release of HDF5, a bug was discovered that can + occur when reading from a dataset in parallel shortly after it has been + written to collectively. The issue was exposed by a new test in the parallel + HDF5 test suite, but had existed before that. We believe the problem lies with + certain MPI implementations and/or file systems. + + We have provided a pure MPI test program, as well as a standalone HDF5 + program, that can be used to determine if this is an issue on your system. + They should be run across multiple nodes with a varying number of processes. + These programs can be found at: + http://www.hdfgroup.org/ftp/HDF5/examples/known_problems/ + (NAF - 2011/01/19) + +* The library's test dt_arith.c showed a compiler's rounding problem on + Cygwin when converting from unsigned long long to long double. The + library's own conversion works fine. We defined a macro for Cygwin to + skip this test until we can solve the problem. + (SLU - 2010/05/05 - HDFFV-1264) + +* All the VFL drivers aren't backward compatible. In H5FDpublic.h, the + structure H5FD_class_t changed in 1.8. There is new parameter added to + get_eoa and set_eoa callback functions. A new callback function + get_type_map was added in. The public function H5FDrealloc was taken + out in 1.8. The problem only happens when users define their own driver + for 1.6 and try to plug in 1.8 library. Because there's only one user + complaining about it, we (Elena, Quincey, and I) decided to leave it as + it is (see bug report #1279). Quincey will make a plan for 1.10. + (SLU - 2010/02/02) + +* The --enable-static-exec configure flag will only statically link libraries + if the static version of that library is present. If only the shared version + of a library exists (i.e., most system libraries on Solaris, AIX, and Mac, + for example, only have shared versions), the flag should still result in a + successful compilation, but note that the installed executables will not be + fully static. Thus, the only guarantee on these systems is that the + executable is statically linked with just the HDF5 library. + (MAM - 2009/11/04) + +* Parallel tests failed with 16 processes with data inconsistency at testphdf5 + / dataset_readAll. Parallel tests also failed with 32 and 64 processes with + collective abort of all ranks at t_posix_compliant / allwrite_allread_blocks + with MPI IO. + (CMC - 2009/04/28) + +* On an Intel 64 Linux cluster (RH 4, Linux 2.6.9) with Intel 10.0 compilers, + use -mp -O1 compilation flags to build the libraries. A higher level of + optimization causes failures in several HDF5 library tests. + +* A dataset created or rewritten with a v1.6.3 library or after cannot be read + with the v1.6.2 library or before when the Fletcher32 EDC filter is enabled. + There was a bug in the calculation of the Fletcher32 checksum in the + library before v1.6.3; the checksum value was not consistent between big- + endian and little-endian systems. This bug was fixed in Release 1.6.3. + However, after fixing the bug, the checksum value was no longer the same as + before on little-endian system. Library releases after 1.6.4 can still read + datasets created or rewritten with an HDF5 library of v1.6.2 or before. + (SLU - 2005/06/30) + + +%%%%1.8.10%%%% + + +HDF5 version 1.8.10 released on 2012-10-26 +================================================================================ + +INTRODUCTION +============ + +This document describes the differences between HDF5-1.8.9 and +HDF5 1.8.10, and contains information on the platforms tested and +known problems in HDF5-1.8.10. +For more details, see the files HISTORY-1_0-1_8_0_rc3.txt +and HISTORY-1_8.txt in the release_docs/ directory of the HDF5 source. + +Links to the HDF5 1.8.10 source code, documentation, and additional materials +can be found on the HDF5 web page at: + + http://www.hdfgroup.org/products/hdf5/ + +The HDF5 1.8.10 release can be obtained from: + + http://www.hdfgroup.org/HDF5/release/obtain5.html + +User documentation for 1.8.10 can be accessed directly at this location: + + http://www.hdfgroup.org/HDF5/doc/ + +New features in the HDF5-1.8.x release series, including brief general +descriptions of some new and modified APIs, are described in the "What's New +in 1.8.0?" document: + + http://www.hdfgroup.org/HDF5/doc/ADGuide/WhatsNew180.html + +All new and modified APIs are listed in detail in the "HDF5 Software Changes +from Release to Release" document, in the section "Release 1.8.10 (current +release) versus Release 1.8.9": + + http://www.hdfgroup.org/HDF5/doc/ADGuide/Changes.html + +If you have any questions or comments, please send them to the HDF Help Desk: + + help@hdfgroup.org + + +CONTENTS +======== + +- New Features +- Support for New Platforms, Languages, and Compilers +- Bug Fixes since HDF5-1.8.9 +- Supported Platforms +- Supported Configuration Features Summary +- More Tested Platforms +- Known Problems + + +New Features +============ + + Configuration + ------------- + - None + + Library + ------- + - Updated to latest autotools and changed all hard *.sh scripts to + configure managed *.sh.in files. Removed overloading of autotools + TESTS variable by examples and tests. Renamed configure.in to + configure.ac. (ADB - 2012/08/23 - HDFFV-8129) + - The data sieve buffer size was set for all the datasets in the file. It + could waste memory if any dataset size is smaller than the sieve buffer + size. Now the library picks the smaller one between the dataset size + and the sieve buffer size from the file access property. See Issue 7934. + (SLU - 2012/4/11) + + Parallel Library + ---------------- + - Added the H5Pget_mpio_no_collective_cause() function that retrieves + reasons why the collective I/O was broken during read/write IO access. + (JKM - 2012/08/30 HDFFV-8143) + + - Added H5Pget_mpio_actual_io_mode_f (MSB - 2012/09/27) + + Tools + ----- + - h5import: Changed to allow the use of h5dump output as input files to + h5import. h5dump must include the "-p" option to print the properties; + configuration file is captured output of h5dump. The restrictions are + that only one dataset with a simple datatype (integer, floating-point, + or string) can be processed. Integers and floating-point imports from + h5dump must use the "binary" option for the data file. The string version + uses the h5dump "-y --width=1" options to disable the indexing printouts, + print single columns, and obviously NOT use the "binary" option. + (ADB - 2012/07/19 HDFFV-721) + + High-Level APIs + --------------- + - None + + Fortran API + ----------- + - Fixed a typo in return value of the nh5dread_f_c function (was 1 + instead of 0 on success); fixed the return value to make it consistent + with other Fortran functions; cleaned debug statements from the code. + (EIP - 2012/06/23) + + C++ API + ------- + - None + + +Support for New Platforms, Languages, and Compilers +=================================================== + - None + +Bug Fixes since HDF5-1.8.9 +========================== + + Configuration + ------------- + - Fixed configure --enable-production to not use -O optimization for Lion + and Mountain Lion systems when gcc (i686-apple-darwin11-llvm-gcc-4.2 + (GCC) 4.2.1) is used. Somehow the -O optimization will cause some of + the hard conversion code in test/dt_arith.c to fail. HDFFV-8017. + (AKC - 2012/10/10) + - Fixed AIX Fortran compiler flags to use appropriate settings for + debugging, profiling, and optimization situations. HDFFV-8069. + (AKC 2012/09/27) + + Library + ------- + - Fixed a memory leak exposed when inserting/removing a property + from a property list several times. HDFFV-8022. (MSC 2012/05/18) + - The file_image test will fail in the "initial file image and callbacks in + the core VFD" sub-test if the source directory is read-only as the test + fails to create its test files in the build directory. This has been + fixed. HDFFV-8009 (AKC - 2012/07/06) + + + Parallel Library + ---------------- + - The MPI-POSIX VFD was updated to include the POSIX and Windows + correctness features added that had already been added to the other VFDs. + HDFFV-8058/7845. (DER 2012/09/17) + + Performance + ------------- + - Removed program perform/benchpar from the enable-build-all list. The + program will be retired or moved to another location. HDFFV-8156 + (AKC 2012/10/01) + - Retired program perform/mpi-perf. Its purpose has been incorporated + into h5perf. (AKC 2012/09/21) + + Tools + ----- + - h5repack: "h5repack -f NONE file1.h5 out.h5" command failed if + source file contains chunked dataset and a chunk dim is bigger than + the dataset dim. Another issue is that the command changed max dims + if chunk dim is smaller than the dataset dim. These issue occurred + when dataset size is smaller than 64k (compact size limit) Fixed both. + HDFFV-8012 (JKM 2012/09/24) + - h5diff: Fixed the counter in verbose mode (-v, -r) so that it will no + longer add together the differences between datasets and the differences + between attributes of those datasets. This change makes the output of + verbose mode consistent for datasets, groups, and committed datatypes. + HDFFV-5919 (JKM 2012/09/10) + - h5diff: Fixed the incorrect result when comparing attribute data + values and the data type has the same class but different sizes. + HDFFV-7942 (JKM 2012/08/15) + - h5dump: Replaced single element fwrite with block writes. + HDFFV-1208 (ADB 2012/08/13) + - h5diff: Fixed test failure for "make check" due to failure of + copying test files when performed in HDF5 source tree. Also applied + to other tools. HDFFV-8107 (JKM 2012/08/01) + - ph5diff: Fixed intermittent hang issue on a certain operation in + parallel mode. It was detected by daily test for comparing + non-comparable objects, but it could have occurred in other + operations depending on machine condition. HDFFV-8003 (JKM 2012/08/01) + - h5diff: Fixed the function COPY_TESTFILES_TO_TESTDIR() of testh5diff.sh + to better report when there is an error in the file copying. + HDFFV-8105 (AKC 2012/07/22) + - h5dump: Fixed the sort by name display to maintain correct parent/child + relationships between ascending/descending order. + HDFFV-8095 (ADB 2012/07/12) + - h5dump: Fixed the display by creation order when using option -n + (print contents). + HDFFV-5942 (ADB 2012/07/09) + - h5dump: Changed to allow H5T_CSET_UTF8 to be displayed in h5dump output. + Used technique similar to what was done in h5ls (matches library + options). + HDFFV-7999 (ADB 2012/05/23) + - h5diff: Fixed the tool so that it will not check and display the status + of dangling links without setting the --follow-symlinks option. This + also improved performance when comparing lots of external links without + the --follow-symlinks option. + HDFFV-7998 (JKM 2012/04/26) + + F90 API + ------- + + - Fixed a typo in return value of the nh5dread_f_c function (was 1 + instead of 0 on success); fixed the return value to make it consistent + with other Fortran functions; cleaned debug statements from the code. + (EIP - 2012/06/23) + + - Fixed a problem writing/reading control characters to a dataset; writing + a string containing alerts, backspace, carriage_return, form_feed, + horizontal_tab, vertical_tab, or new_line is now tested and working. + (MSB - 2012/09/01) + + - Corrected the integer type of H5S_UNLIMITED_F to HSIZE_T (MSB - 2012/09/01) + + - Corrected the number of continuation lines in the src files + to be less than 32 lines for F95 compliance. (MSB - 2012/10/01) + + C++ API + ------ + - None + + High-Level APIs: + ------ + + - Fixed problem with H5TBdelete_record destroying all data following the + deletion of a row. (MSB- 2012/7/26) + + - Fixed H5LTget_attribute_string not closing an object identifier when an + error occurs. (MSB- 2012/7/21) + + - Corrected the return type of H5TBAget_fill from herr_t to htri_t to + reflect that a return value of 1 indicates that a fill value is + present, 0 indicates a fill value is not present, and <0 indicates an + error. + + Fortran High-Level APIs: + ------ + - None + +Supported Platforms +=================== + AIX 5.3 xlc 10.1.0.5 + (NASA G-ADA) xlC 10.1.0.5 + xlf90 12.1.0.6 + + Linux 2.6.18-308.13.1.el5PAE GNU C (gcc), Fortran (gfortran), C++ (g++) + #1 SMP i686 i686 i386 compilers for 32-bit applications; + (jam) Version 4.1.2 20080704 (Red Hat 4.1.2-52) + Version 4.6.3 + PGI C, Fortran, C++ Compilers for 32-bit + applications; + Version 11.9-0 + Intel(R) C, C++, Fortran Compiler for 32-bit + applications; + Version 12.1 + MPICH mpich2-1.4.1p1 compiled with + gcc 4.1.2 and gfortran 4.1.2 + + Linux 2.6.18-308.16.1.el5 GNU C (gcc), Fortran (gfortran), C++ (g++) + #1 SMP x86_64 GNU/Linux compilers for 32-bit applications; + (koala) Version 4.1.2 20080704 (Red Hat 4.1.2-52) + Version 4.6.3 + PGI C, Fortran, C++ for 64-bit target on + x86-64; + Version 11.9-0 + Version 12.5-0 + Intel(R) C, C++, Fortran Compilers for + applications running on Intel(R) 64; + Version 12.1 (Build 20110811) + Version 12.1 (Build 20120212) + MPICH mpich2-1.4.1p1 compiled with + gcc 4.1.2 and gfortran 4.1.2 + + Linux 2.6.32-220.7.1.el6.ppc64 gcc (GCC) 4.4.6 20110731 (Red Hat 4.4.6-3) + #1 SMP ppc64 GNU/Linux g++ (GCC) 4.4.6 20110731 + (ostrich) GNU Fortran (GCC) 4.4.6 20110731 (Red Hat 4.4.6-3) + + Linux 2.6.32-220.23.1.1chaos Intel C, C++, Fortran Compilers + ch5.x86_64 GNU/Linux Version 12.1.5.339 + (LLNL Aztec) + + IBM Blue Gene/P XL C for Blue Gene/P, bgxlc V9.0 + (LLNL uDawn) XL C++ for Blue Gene/P, bgxlC V9.0 + XL Fortran for Blue Gene/P, bgxlf90 V11.1 + + SunOS 5.10 32- and 64-bit Sun C 5.9 Sun OS_sparc Patch 124867-16 + (linew) Sun Fortran 95 8.3 Sun OS_sparc Patch 127000-13 + Sun C++ 5.9 Sun OS_sparc Patch 124863-26 + Sun C 5.11 SunOS_sparc + Sun Fortran 95 8.5 SunOS_sparc + Sun C++ 5.11 SunOS_sparc + + Windows XP Visual Studio 2008 w/ Intel Fortran 10.1 (project files) + + Windows XP x64 Visual Studio 2008 w/ Intel Fortran 10.1 (project files) + + Windows 7 Visual Studio 2008 w/ Intel Fortran 11.1 (cmake) + Visual Studio 2010 w/ Intel Fortran 12 (cmake) + Cygwin(CYGWIN_NT-6.1 1.7.15(0.260/5/3) gcc(4.5.3) compiler and gfortran) + (cmake and autotools) + + Windows 7 x64 Visual Studio 2008 w/ Intel Fortran 11.1 (cmake) + Visual Studio 2010 w/ Intel Fortran 12 (cmake) + Cygwin(CYGWIN_NT-6.1 1.7.15(0.260/5/3) gcc(4.5.3) compiler and gfortran) + (cmake and autotools) + + Mac OS X Snow Leopard 10.6.8 gcc i686-apple-darwin11-llvm-gcc-4.2 (GCC) 4.2.1 from Xcode 3.2.6 + Darwin Kernel Version 10.8.0 g++ i686-apple-darwin11-llvm-g++-4.2 (GCC) 4.2.1 from Xcode 3.2.6 + (fred) gfortran GNU Fortran (GCC) 4.6.2 + Intel C (icc), Fortran (ifort), C++ (icpc) + 12.1.0.038 Build 20110811 + + Mac OS X Snow Leopard 10.6.8 gcc i686-apple-darwin11-llvm-gcc-4.2 (GCC) 4.2.1 from Xcode 3.2.6 + Darwin Kernel Version 10.8.0 g++ i686-apple-darwin11-llvm-g++-4.2 (GCC) 4.2.1 from Xcode 3.2.6 + Intel 32-bit gfortran GNU Fortran (GCC) 4.6.1 + (tejeda) Intel C (icc), Fortran (ifort), C++ (icpc) + 12.1.0.038 Build 20110811 + + Mac OS X Lion 10.7.3 gcc i686-apple-darwin11-llvm-gcc-4.2 (GCC) 4.2.1 from Xcode 4.2.1 + 32- and 64-bit g++ i686-apple-darwin11-llvm-g++-4.2 (GCC) 4.2.1 from Xcode 4.2.1 + (duck) gfortran GNU Fortran (GCC) 4.6.2 + + Mac OS X Mountain Lion 10.8.1 cc Apple clang version 4.0 from Xcode 4.5.1 + (owl) c++ Apple clang version 4.0 from Xcode 4.5.1 + gcc i686-apple-darwin11-llvm-gcc-4.2 (GCC) 4.2.1 from Xcode 4.5.1 + g++ i686-apple-darwin11-llvm-g++-4.2 (GCC) 4.2.1 from Xcode 4.5.1 + gfortran GNU Fortran (GCC) 4.6.2 + + +Tested Configuration Features Summary +===================================== + + In the tables below + y = tested + n = not tested in this release + C = Cluster + W = Workstation + x = not working in this release + dna = does not apply + ( ) = footnote appears below second table + = testing incomplete on this feature or platform + +Platform C F90/ F90 C++ zlib SZIP + parallel F2003 parallel +Solaris2.10 32-bit n y/y n y y y +Solaris2.10 64-bit n y/n n y y y +Windows 7 y y/n n y y y +Windows 7 x64 y y/n n y y y +Mac OS X Snow Leopard 10.6.8 32-bit n y/y n y y n +Mac OS X Snow Leopard 10.6.8 64-bit n y/y n y y y +Mac OS X Lion 10.7.3 32-bit n y/y n y y n +Mac OS X Lion 10.7.3 64-bit n y/y n y y y +Mac OS X Mountain Lion 10.8.1 64-bit n y/n n y y n +AIX 5.3 32- and 64-bit y y/n y y y y +CentOS 5.5 Linux 2.6.18-308 i686 GNU y y/y y y y y +CentOS 5.5 Linux 2.6.18-308 i686 Intel n y/y n y y y +CentOS 5.5 Linux 2.6.18-308 i686 PGI n y/y n y y y +CentOS 5.5 Linux 2.6.18 x86_64 GNU y y/y y y y y +CentOS 5.5 Linux 2.6.18 x86_64 Intel n y/y n y y y +CentOS 5.5 Linux 2.6.18 x86_64 PGI n y/y n y y y +Linux 2.6.32-220.7.1.el6.ppc64 n y/n n y y y + + +Platform Shared Shared Shared Thread- + C libs F90 libs C++ libs safe +Solaris2.10 32-bit y y y y +Solaris2.10 64-bit n n n n +Windows 7 y y y y +Windows 7 x64 y y y y +Mac OS X Snow Leopard 10.6.8 32-bit y n y n +Mac OS X Snow Leopard 10.6.8 64-bit y n y n +Mac OS X Lion 10.7.3 32-bit y n y y +Mac OS X Lion 10.7.3 64-bit y n y y +Mac OS X Mountain Lion 10.8.1 64-bit y n y y +AIX 5.3 32- and 64-bit n n n y +CentOS 5.5 Linux 2.6.18-308 i686 GNU y y y y +CentOS 5.5 Linux 2.6.18-308 i686 Intel y y y n +CentOS 5.5 Linux 2.6.18-308 i686 PGI y y y n +CentOS 5.5 Linux 2.6.18 x86_64 GNU y y y y +CentOS 5.5 Linux 2.6.18 x86_64 Intel y y y n +CentOS 5.5 Linux 2.6.18 x86_64 PGI y y y n +Linux 2.6.32-220.7.1.el6.ppc64 y y y n + +Compiler versions for each platform are listed in the preceding +"Supported Platforms" table. + + +More Tested Platforms +===================== +The following platforms are not supported but have been tested for this release. + + FreeBSD 8.2-STABLE i386 gcc 4.2.1 [FreeBSD] 20070719 + (loyalty) gcc 4.6.1 20110422 + g++ 4.6.1 20110422 + gfortran 4.6.1 20110422 + + FreeBSD 8.2-STABLE amd64 gcc 4.2.1 [FreeBSD] 20070719 + (freedom) gcc 4.6.1 20110422 + g++ 4.6.1 20110422 + gfortran 4.6.1 20110422 + + Debian6.0.3 2.6.32-5-686 #1 SMP i686 GNU/Linux + gcc (Debian 4.4.5-8) 4.4.5 + GNU Fortran (Debian 4.4.5-8) 4.4.5 + (cmake and autotools) + + Debian6.0.3 2.6.32-5-amd64 #1 SMP x86_64 GNU/Linux + gcc (Debian 4.4.5-8) 4.4.5 + GNU Fortran (Debian 4.4.5-8) 4.4.5 + (cmake and autotools) + + Fedora17 3.5.2-1.fc17.i6866 #1 SMP i686 i686 i386 GNU/Linux + gcc (GCC) 4.7.0 20120507 (Red Hat 4.7.0-5) + GNU Fortran (GCC) 4.7.0 20120507 (Red Hat 4.7.0-5) + (cmake and autotools) + + Fedora17 3.5.2-1.fc17.x86_64 #1 SMP x86_64 x86_64 x86_64 GNU/Linux + gcc (GCC) 4.7.0 20120507 (Red Hat 4.7.0-5) + GNU Fortran (GCC) 4.7.0 20120507 (Red Hat 4.7.0-5) + (cmake and autotools) + + SUSE 12.2 3.4.6-2.10-desktop #1 SMP PREEMPT i686 i686 i386 GNU/Linux + gcc (SUSE Linux) 4.7.1 + GNU Fortran (SUSE Linux) 4.7.1 + (cmake and autotools) + + SUSE 12.2 3.4.6-2.10-desktop #1 SMP PREEMPT x86_64 x86_64 x86_64 GNU/Linux + gcc (SUSE Linux) 4.7.1 + GNU Fortran (SUSE Linux) 4.7.1 + (cmake and autotools) + + Ubuntu 12.04 3.2.0-29-generic #46-Ubuntu SMP i686 GNU/Linux + gcc (Ubuntu/Linaro 4.6.3-1ubuntu5) 4.6.3 + GNU Fortran (Ubuntu/Linaro 4.6.3-1ubuntu5) 4.6.3 + (cmake and autotools) + + Ubuntu 12.04 3.2.0-29-generic #46-Ubuntu SMP x86_64 GNU/Linux + gcc (Ubuntu/Linaro 4.6.3-1ubuntu5) 4.6.3 + GNU Fortran (Ubuntu/Linaro 4.6.3-1ubuntu5) 4.6.3 + (cmake and autotools) + (Use optimization level -O1) + + Cray Linux Environment (CLE) PrgEnv-pgi/4.0.46 + hopper.nersc.gov pgcc 12.5-0 64-bit target on x86-64 Linux -tp shanghai + pgf90 12.5-0 64-bit target on x86-64 Linux -tp shanghai + pgCC 12.5-0 64-bit target on x86-64 Linux -tp shanghai + + +Known Problems +============== +* The following h5stat test case fails in BG/P machines (and potentially other + machines that display extra output if an MPI task returns with a non-zero + code.) + Testing h5stat notexist.h5 + + The test actually runs and passes as expected. It is the extra output from + the MPI process that causes the test script to fail. This will be fixed + in the next release. (AKC - 2012/10/25 - HDFFV-8233) + +* The C++ and FORTRAN bindings are not currently working on FreeBSD with the + native release 8.2 compilers (4.2.1), but are working with gcc 4.6 from the + ports (and probably gcc releases after that). + (QAK - 2012/10/19) + +* The following h5dump test case fails in BG/P machines (and potentially other + machines that use a command script to launch executables): + + h5dump --no-compact-subset -d "AHFINDERDIRECT::ah_centroid_t[0] it=0 tl=0" + tno-subset.h5 + + This is due to the embedded spaces in the dataset name being interpreted + by the command script launcher as meta-characters, thus passing three + arguments to h5dump's -d flag. The command passes if run by hand, just + not via the test script. + (AKC - 2012/05/03) + +* On hopper, the build failed when RUNSERIAL and RUNPARALLEL are set + to aprun -np X, because the H5lib_settings.c file was not generated + properly. Not setting those environment variables works, because + configure was able to automatically detect that it's a Cray system + and used the proper launch commands when necessary. + (MSC - 2012/04/18) + +* The data conversion test dt_arith.c fails in "long double" to integer + conversion on Ubuntu 11.10 (3.0.0.13 kernal) with GCC 4.6.1 if the library + is built with optimization -O3 or -O2. The older GCC (4.5) or newer kernal + (3.2.2 on Fedora) doesn't have the problem. Users should lower the + optimization level (-O1 or -O0) by defining CFLAGS in the command line of + "configure" like: + + CFLAGS=-O1 ./configure + + This will overwrite the library's default optimization level. + (SLU - 2012/02/07 - HDFFV-7829) + +* The STDIO VFD does not work on some architectures, possibly due to 32/64 + bit or large file issues. The basic STDIO VFD test is known to fail on + 64-bit SunOS 5.10 on SPARC when built with -m64 and 32-bit OS X/Darwin + 10.7.0. The STDIO VFD test has been disabled while we investigate and + a fix should appear in a future release. + (DER - 2011/10/14 - HDFFV-8235) + +* h5diff can report inconsistent results when comparing datasets of enum type + that contain invalid values. This is due to how enum types are handled in + the library and will be addressed in a future release. + (DER - 2011/10/14 - HDFFV-7527) + +* The links test can fail under the stdio VFD due to some issues with external + links. This will be investigated and fixed in a future release. + (DER - 2011/10/14 - HDFFV-7768) + +* After the shared library support was fixed for some bugs, it was discovered + that "make prefix=XXX install" no longer works for shared libraries. It + still works correctly for static libraries. Therefore, if you want to + install the HDF5 shared libraries in a location such as /usr/local/hdf5, + you need to specify the location via the --prefix option during configure + time. E.g, ./configure --prefix=/usr/local/hdf5 ... + (AKC - 2011/05/07 - HDFFV-7583) + +* The parallel test, t_shapesame, in testpar/, may run for a long time and may + be terminated by the alarm signal. If that happens, one can increase the + alarm seconds (default is 1200 seconds = 20 minutes) by setting the + environment variable, $HDF5_ALARM_SECONDS, to a larger value such as 3600 + (60 minutes). Note that the t_shapesame test may fail in some systems + (see the "While working on the 1.8.6 release..." problem below). If + it does, it will waste more time if $HDF5_ALARM_SECONDS is set + to a larger value. + (AKC - 2011/05/07) + +* The C++ and FORTRAN bindings are not currently working on FreeBSD. + (QAK - 2011/04/26) + +* Shared Fortran libraries are not quite working on AIX. While they are + generated when --enable-shared is specified, the fortran and hl/fortran + tests fail. We are looking into the issue. HL and C++ shared libraries + should now be working as intended, however. + (MAM - 2011/04/20) + +* The --with-mpe configure option does not work with Mpich2. + (AKC - 2011/03/10) + +* While working on the 1.8.6 release of HDF5, a bug was discovered that can + occur when reading from a dataset in parallel shortly after it has been + written to collectively. The issue was exposed by a new test in the parallel + HDF5 test suite, but had existed before that. We believe the problem lies with + certain MPI implementations and/or file systems. + + We have provided a pure MPI test program, as well as a standalone HDF5 + program, that can be used to determine if this is an issue on your system. + They should be run across multiple nodes with a varying number of processes. + These programs can be found at: + http://www.hdfgroup.org/ftp/HDF5/examples/known_problems/ + (NAF - 2011/01/19) + +* The library's test dt_arith.c showed a compiler's rounding problem on + Cygwin when converting from unsigned long long to long double. The + library's own conversion works fine. We defined a macro for Cygwin to + skip this test until we can solve the problem. + (SLU - 2010/05/05 - HDFFV-1264) + +* All the VFL drivers aren't backward compatible. In H5FDpublic.h, the + structure H5FD_class_t changed in 1.8. There is new parameter added to + get_eoa and set_eoa callback functions. A new callback function + get_type_map was added in. The public function H5FDrealloc was taken + out in 1.8. The problem only happens when users define their own driver + for 1.6 and try to plug in 1.8 library. Because there's only one user + complaining about it, we (Elena, Quincey, and I) decided to leave it as + it is (see bug report #1279). Quincey will make a plan for 1.10. + (SLU - 2010/02/02) + +* The --enable-static-exec configure flag will only statically link libraries + if the static version of that library is present. If only the shared version + of a library exists (i.e., most system libraries on Solaris, AIX, and Mac, + for example, only have shared versions), the flag should still result in a + successful compilation, but note that the installed executables will not be + fully static. Thus, the only guarantee on these systems is that the + executable is statically linked with just the HDF5 library. + (MAM - 2009/11/04) + +* Parallel tests failed with 16 processes with data inconsistency at testphdf5 + / dataset_readAll. Parallel tests also failed with 32 and 64 processes with + collective abort of all ranks at t_posix_compliant / allwrite_allread_blocks + with MPI IO. + (CMC - 2009/04/28) + +* On an Intel 64 Linux cluster (RH 4, Linux 2.6.9) with Intel 10.0 compilers, + use -mp -O1 compilation flags to build the libraries. A higher level of + optimization causes failures in several HDF5 library tests. + +* A dataset created or rewritten with a v1.6.3 library or after cannot be read + with the v1.6.2 library or before when the Fletcher32 EDC filter is enabled. + There was a bug in the calculation of the Fletcher32 checksum in the + library before v1.6.3; the checksum value was not consistent between big- + endian and little-endian systems. This bug was fixed in Release 1.6.3. + However, after fixing the bug, the checksum value was no longer the same as + before on little-endian system. Library releases after 1.6.4 can still read + datasets created or rewritten with an HDF5 library of v1.6.2 or before. + (SLU - 2005/06/30) + + +%%%%1.8.9%%%% + + +HDF5 version 1.8.9 released on 2012-05-09 +================================================================================ + +INTRODUCTION +============ + +This document describes the differences between HDF5-1.8.8 and +HDF5 1.8.9. It also contains information on the platforms tested and +known problems in HDF5-1.8.9. + +For more details, see the files HISTORY-1_0-1_8_0_rc3.txt +and HISTORY-1_8.txt in the release_docs/ directory of the HDF5 source. + +Links to the HDF5 1.8.9 source code, documentation, and additional materials +can be found on the HDF5 web page at: + + http://www.hdfgroup.org/products/hdf5/ + +The HDF5 1.8.9 release can be obtained from: + + http://www.hdfgroup.org/HDF5/release/obtain5.html + +User documentation for 1.8.9 can be accessed directly at this location: + + http://www.hdfgroup.org/HDF5/doc/ + +New features in the HDF5-1.8.x release series, including brief general +descriptions of some new and modified APIs, are described in the "What's New +in 1.8.0?" document: + + http://www.hdfgroup.org/HDF5/doc/ADGuide/WhatsNew180.html + +All new and modified APIs are listed in detail in the "HDF5 Software Changes +from Release to Release" document, in the section "Release 1.8.9 (current +release) versus Release 1.8.8": + + http://www.hdfgroup.org/HDF5/doc/ADGuide/Changes.html + +If you have any questions or comments, please send them to the HDF Help Desk: + + help@hdfgroup.org + + +CONTENTS +======== + +- New Features +- Support for New Platforms, Languages, and Compilers +- Bug Fixes since HDF5-1.8.8 +- Platforms Tested +- Supported Configuration Features Summary +- Known Problems + + +New Features +============ + + Configuration + ------------- + - None + + Library + ------- + - Added new feature to merge committed datatypes when copying objects, + using new H5O_COPY_MERGE_COMMITTED_DTYPE_FLAG, modified by new API + routines: H5Padd_merge_committed_dtype_path(), + H5Pfree_merge_committed_dtype_paths(), H5Pset_mcdt_search_cb() and + H5Pget_mcdt_search_cb(). (QAK - 2012/03/30) + - Added new feature which allows working with files in memory in the + same ways files are worked with on disk. New API routines include + H5Pset_file_image, H5Pget_file_image, H5Pset_file_image_callbacks, + H5Pget_file_image_callbacks, H5Fget_file_image, and + H5LTopen_file_image. (QAK - 2012/04/17) + + Parallel Library + ---------------- + - Corrected memory allocation error in MPI datatype construction code. + (QAK - 2012/04/23) + - Add two new routines to set/get the atomicity parameter in the + MPI library to perform atomic operations. Some file systems (for + example PVFS2) do not support atomic updates, so those routines + would not be supported. (MSC - 2012/03/27 - HDFFV-7961) + + Tools + ----- + - h5repack: Added ability to set the metadata block size of the output + file, with the '-M'/'--metadata_block_size' command line parameter. + (QAK - 2012/03/30) + - h5stat: Added ability to display a summary of the file space usage for a + file, with the '-S'/'--summary' command line parameter. (QAK - 2012/03/28) + - h5dump: Added capability for "-a" option to show attributes containing "/" + by using an escape character. For example, for a dataset "/dset" + containing attribute "speed(m/h)", use "h5dump -a "/dset/speed(\/h)" + to show the content of the attribute. (PC - 2012/03/12 - HDFFV-7523) + - h5dump: Added ability to apply command options across multiple files using a + wildcard in the filename. Unix example; "h5dump -H -d Dataset1 tarr*.h5". + Cross platform example; "h5dump -H -d Dataset1 tarray1.h5 tarray2.h5 tarray3.h5". + (ADB - 2012/03/12 - HDFFV-7876). + - h5dump: Added new option --no-compact-subset. This option will not + interpret the '[' character as starting the compact form of + subsetting. This is useful when the "h5dump error: unable to + open dataset "datset_name"" message is output because a dataset + name contains a '[' character. (ADB - 2012/03/05 - HDFFV-7689). + - h5repack: Improved performance for big chunked datasets (size > 128MB) + when used with the layout (-l) or compression (-f) options. + Before this change, repacking datasets with chunks with a large first + dimension would take extremely long. For example, repacking a dataset + with chunk dimensions of 1024x5x1 might take many hours to process + while changing a dataset with chunk dimensions set to 1x5x1024 + might take under an hour. After this change, processing the dataset + with chunk dimensions of 1024x5x1 takes about 15 minutes, and processing + a dataset with chunk dimensions of 1x5x1024 takes about 14 minutes. + (JKM - 2012/03/01 - HDFFV-7862) + + High-Level APIs + --------------- + - New API: H5LTpath_valid (Fortran: h5ltpath_valid_f) checks + if a path is correct, determines if a link resolves to a valid + object, and checks that the link does not dangle. (MSB - 2012/03/15) + + Fortran API + ----------- + + - Added for the C API the Fortran wrapper: + h5ocopy_f (MSB - 2012/03/22) + + C++ API + ------- + - None + + +Support for New Platforms, Languages, and Compilers +=================================================== + - None + +Bug Fixes since HDF5-1.8.8 +========================== + + Configuration + ------------- + - Fixed Makefile issue in which "-Wl," was not properly specified + prior to -rpath when building parallel Fortran libraries with + an Intel compiler. (MAM - 2012/03/26) + - Makefiles generated by other packages using h5cc as the compiler + no longer error when 'make' is invoked more than once in order + to 'rebuild' after changes to source. (MAM - 2012/03/26) + - Added code to display the version information of XL Fortran and C++ + in the summary of configure. (AKC - 2012/02/28 - HDFFV-7793) + - Updated all CMakeLists.txt files to indicate the minimum CMake version is + the current standard of 2.8.6 (ADB - 2011/12/05 - HDFFV-7854) + + Library + ------- + - Windows and STDIO correctness changes have been propagated from the SEC2 + and old Windows drivers to the STDIO VFD. (DER - 2012/03/30 - HDFFV-7917) + - Fixed an error that would occur when copying an object with attribute + creation order tracked and indexed. (NAF - 2012/03/28 - HDFFV-7762) + - Fixed a bug in H5Ocopy(): When copying an opened object, call the + object's flush class action to ensure that cached data is flushed so + that H5Ocopy will get the correct data. (VC - 2012/03/27 - HDFFV-7853) + - The istore test will now skip the sparse 50x50x50 test when the VFD does + not support sparse files on that platform. The most important platforms + on which this will be skipped are Windows (NTFS sparse files are not + supported) and Mac OS-X (HFS sparse files are not supported). This + fixes CTest timeout issues on Windows. (DER - 2012/03/27 - HDFFV-7769) + - Windows and POSIX correctness changes have been propagated from the SEC2 + VFD to the Core VFD. This mainly affects file operations on the + driver's backing store and fixes a problem on Windows where large files + could not be read. (DER - 2012/03/27 - HDFFV-7916 - HDFFV-7603) + - When an application tries to write or read many small data chunks and + runs out of memory, the library had a segmentation fault. The fix is to + return the error stack with proper information. + (SLU - 2012/03/23 - HDFFV-7785) + - H5Pset_data_transform had a segmentation fault in some cases like x*-100. + It works correctly now and handles other cases like 100-x or 2/x. + (SLU - 2012/03/15 - HDFFV-7922) + - Fixed rare corruption bugs that could occur when using the new object + header format. (NAF - 2012/03/15 - HDFFV-7879) + - Fixed an error that occurred when creating a contiguous dataset with a + zero-sized dataspace and space allocation time set to 'early'. + (QAK - 2012/03/12) + - Changed Windows thread creation to use _beginthread() instead of + CreateThread(). Threads created by the latter can be killed in + low-memory situations. (DER - 2012/02/10 - HDFFV-7780) + - Creating a dataset in a read-only file caused a segmentation fault when + the file is closed. It's fixed. The attempt to create a dataset will + fail with an error indicating the file is read-only. + (SLU - 2012/01/25 - HDFFV-7756) + - Fixed a segmentation fault that could occur when shrinking a dataset + with chunks larger than 1 MB. (NAF - 2011/11/30 - HDFFV-7833) + - Fixed a bug that could cause H5Oget_info to return the wrong address + after copying a committed (named) datatype. (NAF - 2011/11/14) + - The library allowed the conversion of strings between ASCII and UTF8 + We have corrected it to report an error under this situation. + (SLU - 2011/11/8 - HDFFV-7582) + - Fixed a segmentation fault when the library tried to shrink the size + of a compound datatype through H5Tset_size immediately after the + datatype was created. (SLU - 2011/11/4 - HDFFV-7618) + + Parallel Library + ---------------- + - None + + Tools + ----- + - h5unjam: Fixed a segmentation fault that occurred when h5unjam was used + with the -V (show version) option. (JKM - 2012/04/19 - HDFFV-8001) + - h5repack: Fixed a failure that occurred when repacking the chunk size + of a specified chunked dataset with unlimited max dims. + (JKM - 2012/04/11 - HDFFV-7993) + - h5diff: Fixed a failure when comparing groups. Before the fix, if an + object in a group was compared with an object in another group where + both had the same name but the object type was different, then h5diff + would fail. After the fix, h5diff detects such cases as non-comparable + and displays appropriate error messages. + (JKM - 2012/03/28 - HDFFV-7644) + - h5diff: If unique objects exist only in one file and if h5diff is set to + exclude the unique objects with the --exclude-path option, then h5diff + might miss excluding some objects. This was fixed to correctly exclude + objects. (JKM - 2012/03/20 - HDFFV-7837) + - h5diff: When two symbolic dangling links are compared with the + --follow-symlinks option, the result should be the same. This worked when + comparing two files, but didn't work when comparing two objects. + h5diff now works when comparing two objects. + (JKM - 2012/03/09 - HDFFV-7835) + - h5dump: Added the tools library error stack to properly catch error + information generated within the library. (ADB - 2012/03/12 - HDFFV-7958) + - h5dump: Changed the process where an open link used to fail. Now dangling + links no longer throw error messages. (ADB - 2012/03/12 - HDFFV-7839) + - h5dump: Refactored code to remove duplicated functions. Split XML + functions from DDL functions. Corrected indentation and formatting + errors. Also fixed subsetting counting overflow (HDFFV-5874). Verified + all tools call tools_init() in main. The USER_BLOCK data now correctly + displays within the SUPER_BLOCK info. NOTE: WHITESPACE IN THE OUTPUT + HAS CHANGED. (ADB - 2012/02/17 - HDFFV-7560) + - h5diff: Fixed to prevent from displaying error stack message when + comparing two dangling symbolic links with the follow-symlinks option. + (JKM - 2012/01/13 - HDFFV-7836) + - h5repack: Fixed a memory leak that occurred with the handling of + variable length strings in attributes. + (JKM - 2012/01/10 - HDFFV-7840) + - h5ls: Fixed a segmentation fault that occurred when accessing region + reference data in an attribute. (JKM - 2012/01/06 - HDFFV-7838) + + F90 API + ------- + - None + + C++ API + ------ + - None + + High-Level APIs: + ------ + - None + + Fortran High-Level APIs: + ------ + - h5ltget_attribute_string_f: The h5ltget_attribute_string_f used to return + the C NULL character in the returned character buffer. The returned + charactor buffer now does not return the C NULL character; the buffer + is blank-padded if needed. (MSB - 2012/03/23) + + +Platforms Tested +================ +The following platforms and compilers have been tested for this release. + + AIX 5.3 xlc 10.1.0.5 + (NASA G-ADA) xlC 10.1.0.5 + xlf90 12.1.0.6 + + FreeBSD 8.2-STABLE i386 gcc 4.2.1 [FreeBSD] 20070719 + (loyalty) g++ 4.2.1 [FreeBSD] 20070719 + gcc 4.6.1 20110422 + g++ 4.6.1 20110422 + gfortran 4.6.1 20110422 + + FreeBSD 8.2-STABLE amd64 gcc 4.2.1 [FreeBSD] 20070719 + (freedom) g++ 4.2.1 [FreeBSD] 20070719 + gcc 4.6.1 20110422 + g++ 4.6.1 20110422 + gfortran 4.6.1 20110422 + + Linux 2.6.18-194.3.1.el5PAE GNU C (gcc), Fortran (gfortran), C++ (g++) + #1 SMP i686 i686 i386 compilers for 32-bit applications; + (jam) Version 4.1.2 20080704 (Red Hat 4.1.2-52) + Version 4.5.2 + PGI C, Fortran, C++ Compilers for 32-bit + applications; + Version 11.8-0 + Version 11.9-0 + Intel(R) C, C++, Fortran Compiler for 32-bit + applications; + Version 12.0 + Version 12.1 + MPICH mpich2-1.3.1 compiled with + gcc 4.1.2 and gfortran 4.1.2 + + Linux 2.6.18-308.1.1.el5 GNU C (gcc), Fortran (gfortran), C++ (g++) + #1 SMP x86_64 GNU/Linux compilers for 32-bit applications; + (koala) Version 4.1.2 20080704 (Red Hat 4.1.2-52) + Version 4.5.2 + PGI C, Fortran, C++ for 64-bit target on + x86-64; + Version 11.9-0 (64-bit) + Version 11.8-0 (32-bit) + Intel(R) C, C++, Fortran Compilers for + applications running on Intel(R) 64; + Version 12.0 + Version 12.1 + MPICH mpich2-1.3.1 compiled with + gcc 4.1.2 and gfortran 4.1.2 + + Linux 2.6.32-220.7.1.el6.ppc64 gcc (GCC) 4.4.6 20110731 (Red Hat 4.4.6-3) + #1 SMP ppc64 GNU/Linux g++ (GCC) 4.4.6 20110731 + (ostrich) GNU Fortran (GCC) 4.4.6 20110731 (Red Hat 4.4.6-3) + + Linux 2.6.18-108chaos Intel C, C++, Fortran Compilers Version 11.1 + #1 SMP x86_64 GNU/Linux + (LLNL Aztec) + + IBM Blue Gene/P XL C for Blue Gene/P, bgxlc V9.0 + (LLNL uDawn) XL C++ for Blue Gene/P, bgxlC V9.0 + XL Fortran for Blue Gene/P, bgxlf0 V11.1 + + SunOS 5.10 32- and 64-bit Sun C 5.9 Sun OS_sparc Patch 124867-16 + (linew) Sun Fortran 95 8.3 Sun OS_sparc Patch 127000-13 + Sun C++ 5.9 Sun OS_sparc Patch 124863-26 + Sun C 5.11 SunOS_sparc + Sun Fortran 95 8.5 SunOS_sparc + Sun C++ 5.11 SunOS_sparc + + SGI Altix UV Intel(R) C, Fortran Compilers + SGI ProPack 7 Linux Version 11.1 20100806 + 2.6.32.24-0.2.1.2230.2.PTF- SGI MPT 2.02 + default #1 SMP + (NCSA ember) + + Dell NVIDIA Cluster Intel(R) C, Fortran Compilers + Red Hat Enterprise Linux 6 Version 12.0.4 20110427 + 2.6.32-131.4.1.el6.x86_64 mvapich2 1.7rc1-intel-12.0.4 + (NCSA forge) + + Windows XP Visual Studio 2008 w/ Intel Fortran 10.1 (project files) + Visual Studio 2008 w/ Intel Fortran 11.1 (cmake) + Visual Studio 2010 w/ Intel Fortran 12 (cmake) + + Windows XP x64 Visual Studio 2008 w/ Intel Fortran 10.1 (project files) + Visual Studio 2008 w/ Intel Fortran 11.1 (cmake) + Visual Studio 2010 w/ Intel Fortran 12 (cmake) + + Windows 7 Visual Studio 2008 w/ Intel Fortran 11.1 (cmake) + Visual Studio 2010 w/ Intel Fortran 12 (cmake) + Cygwin(1.7.9 native gcc(4.5.3) compiler and gfortran) + + Windows 7 x64 Visual Studio 2008 w/ Intel Fortran 11.1 (cmake) + Visual Studio 2010 w/ Intel Fortran 12 (cmake) + Cygwin(1.7.9 native gcc(4.5.3) compiler and gfortran) + + Mac OS X Snow Leopard 10.6.8 i686-apple-darwin10-gcc-4.2.1 (GCC) 4.2.1 (gcc) + Darwin Kernel Version 10.8.0 i686-apple-darwin10-g++-4.2.1 (GCC) 4.2.1 (g++) + Intel 64-bit (Apple Inc. build 5666) (dot 3) + (fred) GNU Fortan (GCC) 4.6.1 (gfortran) + Intel C (icc), Fortran (ifort), C++ (icpc) + 12.1.0.038 Build 20110811 + + Mac OS X Snow Leopard 10.6.8 i686-apple-darwin10-gcc-4.2.1 (GCC) 4.2.1 (gcc) + Darwin Kernel Version 10.8.0 i686-apple-darwin10-g++-4.2.1 (GCC) 4.2.1 (g++) + Intel 32-bit (Apple Inc. build 5666) (dot 3) + (tejeda) GNU Fortran (GCC) 4.6.1 (gfortran) + Intel C (icc), Fortran (ifort), C++ (icpc) + 12.1.0.038 Build 20110811 + + Mac OS X Lion 10.7.3 GCC 4.2.1 gcc + 32- and 64-bit GNU Fortran (GCC) 4.6.1 gfortran + (duck) GCC 4.2.1. g++ + + Debian6.0.3 2.6.32-5-686 #1 SMP i686 GNU/Linux + gcc (Debian 4.4.5-8) 4.4.5 + GNU Fortran (Debian 4.4.5-8) 4.4.5 + + Debian6.0.3 2.6.32-5-amd64 #1 SMP x86_64 GNU/Linux + gcc (Debian 4.4.5-8) 4.4.5 + GNU Fortran (Debian 4.4.5-8) 4.4.5 + + Fedora16 3.2.9-2.fc16.i6866 #1 SMP i686 i686 i386 GNU/Linux + gcc (GCC) 4.6.2 20111027 (Red Hat 4.6.2-1) + GNU Fortran (GCC) 4.6.2 20111027 (Red Hat 4.6.2-1) + + Fedora16 3.2.9-2.fc16.x86_64 #1 SMP x86_64 x86_64 x86_64 GNU/Linux + gcc (GCC) 4.6.2 20111027 (Red Hat 4.6.2-1) + GNU Fortran (GCC) 4.6.2 20111027 (Red Hat 4.6.2-1) + + SUSE 12.1 3.1.9-1.4-desktop #1 SMP PREEMPT i686 i686 i386 GNU/Linux + gcc (SUSE Linux) 4.6.2 + GNU Fortran (SUSE Linux) 4.6.2 + + SUSE 12.1 3.1.9-1.4-desktop #1 SMP PREEMPT x86_64 x86_64 x86_64 GNU/Linux + gcc (SUSE Linux) 4.6.2 + GNU Fortran (SUSE Linux) 4.6.2 + + Ubuntu 11.10 3.0.0-16-generic #29-Ubuntu SMP i686 GNU/Linux + gcc (Ubuntu/Linaro 4.6.1-9ubuntu3) 4.6.1 + GNU Fortran (Ubuntu/Linaro 4.6.4-9ubuntu3) 4.6.1 + + Ubuntu 11.10 3.0.0-16-generic #29-Ubuntu SMP x86_64 GNU/Linux + gcc (Ubuntu/Linaro 4.6.1-9ubuntu3) 4.6.1 + GNU Fortran (Ubuntu/Linaro 4.6.1-9ubuntu3) 4.6.1 + + Cray Linux Environment (CLE) PrgEnv-pgi 2.2.74 + hopper.nersc.gov pgcc 11.9-0 64-bit target on x86-64 Linux -tp k8e + pgf90 11.9-0 64-bit target on x86-64 Linux -tp k8e + pgCC 11.9-0 64-bit target on x86-64 Linux -tp k8e + + +Tested Configuration Features Summary +===================================== + + In the tables below + y = tested + n = not tested in this release + C = Cluster + W = Workstation + x = not working in this release + dna = does not apply + ( ) = footnote appears below second table + = testing incomplete on this feature or platform + +Platform C F90 F90 C++ zlib SZIP + parallel parallel +Solaris2.10 32-bit n y n y y y +Solaris2.10 64-bit n y n y y y +Windows XP n y(4) n y y y +Windows XP x64 n y(4) n y y y +Windows Vista n y(4) n y y y +Windows Vista x64 n y(4) n y y y +Mac OS X Snow Leopard 10.6.8 32-bit n y n y y n +Mac OS X Snow Leopard 10.6.8 64-bit n y n y y y +Mac OS X Lion 10.7.3 32-bit n y n y y n +Mac OS X Lion 10.7.3 64-bit n y n y y y +AIX 5.3 32- and 64-bit y y y y y y +FreeBSD 8.2-STABLE 32&64 bit n x n x y y +CentOS 5.5 Linux 2.6.18-194 i686 GNU (1)W y y(2) y y y y +CentOS 5.5 Linux 2.6.18-194 i686 Intel W n y n y y y +CentOS 5.5 Linux 2.6.18-194 i686 PGI W n y n y y y +CentOS 5.5 Linux 2.6.18 x86_64 GNU (1) W y y(3) y y y y +CentOS 5.5 Linux 2.6.18 x86_64 Intel W n y n y y y +CentOS 5.5 Linux 2.6.18 x86_64 PGI W n y n y y y +Linux 2.6.32-220.7.1.el6.ppc64 n y n y y y +SGI ProPack 7 Linux 2.6.32.24 y y y y y y +Red Hat Enterprise Linux 6 y y y y y y +CLE hopper.nersc.gov y y(3) y y y n + + +Platform Shared Shared Shared Thread- + C libs F90 libs C++ libs safe +Solaris2.10 32-bit y y y y +Solaris2.10 64-bit n n n n +Windows XP y y(4) y n +Windows XP x64 y y(4) y n +Windows Vista y y(4) y y +Windows Vista x64 y y(4) y y +Mac OS X Snow Leopard 10.6.8 32-bit y n y n +Mac OS X Snow Leopard 10.6.8 64-bit y n y n +Mac OS X Lion 10.7.3 32-bit y n y y +Mac OS X Lion 10.7.3 64-bit y n y y +AIX 5.3 32- and 64-bit n n n y +FreeBSD 8.2-STABLE 32&64 bit y x x y +CentOS 5.5 Linux 2.6.18-194 i686 GNU (1)W y y(2) y y +CentOS 5.5 Linux 2.6.18-194 i686 Intel W y y y n +CentOS 5.5 Linux 2.6.18-194 i686 PGI W y y y n +CentOS 5.5 Linux 2.6.18 x86_64 GNU (1) W y y y y +CentOS 5.5 Linux 2.6.18 x86_64 Intel W y y y n +CentOS 5.5 Linux 2.6.18 x86_64 PGI W y y y n +Linux 2.6.32-220.7.1.el6.ppc64 y y y n +SGI ProPack 7 Linux 2.6.32.24 y y y n +Red Hat Enterprise Linux 6 y y y n +CLE hopper.nersc.gov n n n n + + (1) Fortran compiled with gfortran. + (2) With PGI and Absoft compilers. + (3) With PGI compiler for Fortran. + (4) Using Visual Studio 2008 w/ Intel Fortran 10.1 (Cygwin shared libraries are not supported) + (5) C and C++ shared libraries will not be built when Fortran is enabled. + Compiler versions for each platform are listed in the preceding + "Platforms Tested" table. + + +Known Problems +============== +* The h5repacktst test fails on AIX 32-bit because the test uses more + memory than the default amount. The failure message typically looks like: + + "time: 0551-010 The process was stopped abnormally. Try again." + + This is an issue with the test only and does not represent a problem with + the library. To allow the test to pass, request more memory when testing + via appropriate command such as: + + $ env LDR_CNRTL=MAXDATA=0x20000000@DSA make check + + (AKC - 2012/05/09 - HDFFV-8016) + +* The file_image test will fail in the "initial file image and callbacks in + the core VFD" sub-test if the source directory is read-only as the test + fails to create its test files in the build directory. This will be + resolved in a future release. + (AKC - 2012/05/05 - HDFFV-8009) + +* The dt_arith test reports several errors involving "long double" on + Mac OS X 10.7 Lion when any level of optimization is enabled. The test does + not fail in debug mode. This will be addressed in a future release. + (SLU - 2012/05/08) + +* The following h5dump test case fails in BG/P machines (and potentially other + machines that use a command script to launch executables): + + h5dump --no-compact-subset -d "AHFINDERDIRECT::ah_centroid_t[0] it=0 tl=0" + tno-subset.h5 + + This is due to the embedded spaces in the dataset name being interpreted + by the command script launcher as meta-characters, thus passing three + arguments to h5dump's -d flag. The command passes if run by hand, just + not via the test script. + (AKC - 2012/05/03) + +* The ph5diff (parallel h5diff) tool can intermittently hang in parallel mode + when comparing two HDF5 files that contain objects with the same names but + with different object types. + (JKM - 2012/04/27) + +* On hopper, the build failed when RUNSERIAL and RUNPARALLEL are set + to aprun -np X, because the H5lib_settings.c file was not generated + properly. Not setting those environment variables works, because + configure was able to automatically detect that it's a Cray system + and used the proper launch commands when necessary. + (MSC - 2012/04/18) + +* The data conversion test dt_arith.c fails in "long double" to integer + conversion on Ubuntu 11.10 (3.0.0.13 kernal) with GCC 4.6.1 if the library + is built with optimization -O3 or -O2. The older GCC (4.5) or newer kernal + (3.2.2 on Fedora) doesn't have the problem. Users should lower the + optimization level (-O1 or -O0) by defining CFLAGS in the command line of + "configure" like: + + CFLAGS=-O1 ./configure + + This will overwrite the library's default optimization level. + (SLU - 2012/02/07 - HDFFV-7829) + +* The STDIO VFD does not work on some architectures, possibly due to 32/64 + bit or large file issues. The basic STDIO VFD test is known to fail on + 64-bit SunOS 5.10 on SPARC when built with -m64 and 32-bit OS X/Darwin + 10.7.0. The STDIO VFD test has been disabled while we investigate and + a fix should appear in a future release. + (DER - 2011/10/14) + +* h5diff can report inconsistent results when comparing datasets of enum type + that contain invalid values. This is due to how enum types are handled in + the library and will be addressed in a future release. + (DER - 2011/10/14 - HDFFV-7527) + +* The links test can fail under the stdio VFD due to some issues with external + links. This will be investigated and fixed in a future release. + (DER - 2011/10/14 - HDFFV-7768) + +* After the shared library support was fixed for some bugs, it was discovered + that "make prefix=XXX install" no longer works for shared libraries. It + still works correctly for static libraries. Therefore, if you want to + install the HDF5 shared libraries in a location such as /usr/local/hdf5, + you need to specify the location via the --prefix option during configure + time. E.g, ./configure --prefix=/usr/local/hdf5 ... + (AKC - 2011/05/07 - HDFFV-7583) + +* The parallel test, t_shapesame, in testpar/, may run for a long time and may + be terminated by the alarm signal. If that happens, one can increase the + alarm seconds (default is 1200 seconds = 20 minutes) by setting the + environment variable, $HDF5_ALARM_SECONDS, to a larger value such as 3600 + (60 minutes). Note that the t_shapesame test may fail in some systems + (see the "While working on the 1.8.6 release..." problem below). If + it does, it will waste more time if $HDF5_ALARM_SECONDS is set + to a larger value. + (AKC - 2011/05/07) + +* The C++ and FORTRAN bindings are not currently working on FreeBSD. + (QAK - 2011/04/26) + +* Shared Fortran libraries are not quite working on AIX. While they are + generated when --enable-shared is specified, the fortran and hl/fortran + tests fail. We are looking into the issue. HL and C++ shared libraries + should now be working as intended, however. + (MAM - 2011/04/20) + +* The --with-mpe configure option does not work with Mpich2. + (AKC - 2011/03/10) + +* While working on the 1.8.6 release of HDF5, a bug was discovered that can + occur when reading from a dataset in parallel shortly after it has been + written to collectively. The issue was exposed by a new test in the parallel + HDF5 test suite, but had existed before that. We believe the problem lies with + certain MPI implementations and/or file systems. + + We have provided a pure MPI test program, as well as a standalone HDF5 + program, that can be used to determine if this is an issue on your system. + They should be run across multiple nodes with a varying number of processes. + These programs can be found at: + http://www.hdfgroup.org/ftp/HDF5/examples/known_problems/ + (NAF - 2011/01/19) + +* The library's test dt_arith.c showed a compiler's rounding problem on + Cygwin when converting from unsigned long long to long double. The + library's own conversion works fine. We defined a macro for Cygwin to + skip this test until we can solve the problem. + (SLU - 2010/05/05 - HDFFV-1264) + +* All the VFL drivers aren't backward compatible. In H5FDpublic.h, the + structure H5FD_class_t changed in 1.8. There is new parameter added to + get_eoa and set_eoa callback functions. A new callback function + get_type_map was added in. The public function H5FDrealloc was taken + out in 1.8. The problem only happens when users define their own driver + for 1.6 and try to plug in 1.8 library. Because there's only one user + complaining about it, we (Elena, Quincey, and I) decided to leave it as + it is (see bug report #1279). Quincey will make a plan for 1.10. + (SLU - 2010/02/02) + +* MinGW has a missing libstdc++.dll.a library file and will not successfully link + C++ applications/tests. Do not use the enable-cxx configure option. Read all of + the INSTALL_MINGW.txt file for all restrictions. + (ADB - 2009/11/11) + +* The --enable-static-exec configure flag will only statically link libraries + if the static version of that library is present. If only the shared version + of a library exists (i.e., most system libraries on Solaris, AIX, and Mac, + for example, only have shared versions), the flag should still result in a + successful compilation, but note that the installed executables will not be + fully static. Thus, the only guarantee on these systems is that the + executable is statically linked with just the HDF5 library. + (MAM - 2009/11/04) + +* The PathScale MPI implementation, accessing a Panasas file system, would + cause H5Fcreate() with H5F_ACC_EXCL to fail even when the file does not + exist. This is due to the MPI_File_open() call failing if the mode has + the MPI_MODE_EXCL bit set. + (AKC - 2009/08/11 - HDFFV-988) + +* Parallel tests failed with 16 processes with data inconsistency at testphdf5 + / dataset_readAll. Parallel tests also failed with 32 and 64 processes with + collective abort of all ranks at t_posix_compliant / allwrite_allread_blocks + with MPI IO. + (CMC - 2009/04/28) + +* For Red Storm, a Cray XT3 system, the tools/h5ls/testh5ls.sh and + tools/h5copy/testh5copy.sh will fail some of its sub-tests. These sub-tests + are expected to fail and should exit with a non-zero code but the yod + command does not propagate the exit code of the executables. Yod always + returns 0 if it can launch the executable. The test suite shell expects + a non-zero for this particular test, therefore it concludes the test has + failed when it receives 0 from yod. Skip all the "failing" test for now + by changing them as following. + + ======== Original tools/h5ls/testh5ls.sh ========= + TOOLTEST tgroup-1.ls 1 -w80 -r -g tgroup.h5 + ======== Change to =============================== + echo SKIP TOOLTEST tgroup-1.ls 1 -w80 -r -g tgroup.h5 + ================================================== + + ======== Original tools/h5copy/testh5copy.sh ========= + TOOLTEST_FAIL -i $TESTFILE -o $FILEOUT -v -s grp_dsets -d grp_rename + TOOLTEST_FAIL -i $TESTFILE -o $FILEOUT -v -s grp_dsets -d /grp_rename/grp_dsets + TOOLTEST_FAIL -i $TESTFILE -o $FILEOUT -vp -s /grp_dsets -d /E/F/grp_dsets + TOOLTEST_FAIL -i $TESTFILE -o $FILEOUT -vp -s /grp_nested -d /G/H/grp_nested + H5LSTEST $FILEOUT + ======== Change to =============================== + echo SKIP TOOLTEST_FAIL -i $TESTFILE -o $FILEOUT -v -s grp_dsets -d grp_rename + echo SKIP TOOLTEST_FAIL -i $TESTFILE -o $FILEOUT -v -s grp_dsets -d /grp_rename/grp_dsets + echo SKIP TOOLTEST_FAIL -i $TESTFILE -o $FILEOUT -vp -s /grp_dsets -d /E/F/grp_dsets + echo SKIP TOOLTEST_FAIL -i $TESTFILE -o $FILEOUT -vp -s /grp_nested -d /G/H/grp_nested + echo SKIP H5LSTEST $FILEOUT + ================================================== + (AKC - 2008/11/10) + +* For Red Storm, a Cray XT3 system, the yod command sometimes gives the + message, "yod allocation delayed for node recovery". This interferes with + test suites that do not expect to see this message. See the section of "Red + Storm" in file INSTALL_parallel for a way to deal with this problem. + (AKC - 2008/05/28) + +* On an Intel 64 Linux cluster (RH 4, Linux 2.6.9) with Intel 10.0 compilers, + use -mp -O1 compilation flags to build the libraries. A higher level of + optimization causes failures in several HDF5 library tests. + +* On mpich 1.2.5 and 1.2.6, if more than two processes contribute no IO and + the application asks to do collective IO, we have found that when using 4 + processors, a simple collective write will sometimes be hung. This can be + verified with t_mpi test under testpar. + +* A dataset created or rewritten with a v1.6.3 library or after cannot be read + with the v1.6.2 library or before when the Fletcher32 EDC filter is enabled. + There was a bug in the calculation of the Fletcher32 checksum in the + library before v1.6.3; the checksum value was not consistent between big- + endian and little-endian systems. This bug was fixed in Release 1.6.3. + However, after fixing the bug, the checksum value was no longer the same as + before on little-endian system. Library releases after 1.6.4 can still read + datasets created or rewritten with an HDF5 library of v1.6.2 or before. + (SLU - 2005/06/30) + +* On IBM AIX systems, parallel HDF5 mode will fail some tests with error + messages like "INFO: 0031-XXX ...". This is from the command `poe'. + Set the environment variable MP_INFOLEVEL to 0 to minimize the messages + and run the tests again. + + The tests may fail with messages like "The socket name is already in use", + but HDF5 does not use sockets. This failure is due to problems with the + poe command trying to set up the debug socket. To resolve this problem, + check to see whether there are many old /tmp/s.pedb.* files staying around. + These are sockets used by the poe command and left behind due to failed + commands. First, ask your system administrator to clean them out. + Lastly, request IBM to provide a means to run poe without the debug socket. + (AKC - 2004/12/08) + + +%%%%1.8.8%%%% + + +HDF5 version 1.8.8 released on 2011-11-15 +================================================================================ + +INTRODUCTION +============ + +This document describes the differences between HDF5-1.8.7 and +HDF5 1.8.8, and contains information on the platforms tested and +known problems in HDF5-1.8.8. +For more details, see the files HISTORY-1_0-1_8_0_rc3.txt +and HISTORY-1_8.txt in the release_docs/ directory of the HDF5 source. + +Links to the HDF5 1.8.8 source code, documentation, and additional materials +can be found on the HDF5 web page at: + + http://www.hdfgroup.org/products/hdf5/ + +The HDF5 1.8.8 release can be obtained from: + + http://www.hdfgroup.org/HDF5/release/obtain5.html + +User documentation for 1.8.8 can be accessed directly at this location: + + http://www.hdfgroup.org/HDF5/doc/ + +New features in the HDF5-1.8.x release series, including brief general +descriptions of some new and modified APIs, are described in the "What's New +in 1.8.0?" document: + + http://www.hdfgroup.org/HDF5/doc/ADGuide/WhatsNew180.html + +All new and modified APIs are listed in detail in the "HDF5 Software Changes +from Release to Release" document, in the section "Release 1.8.8 (current +release) versus Release 1.8.7": + + http://www.hdfgroup.org/HDF5/doc/ADGuide/Changes.html + +If you have any questions or comments, please send them to the HDF Help Desk: + + help@hdfgroup.org + + +CONTENTS +======== + +- New Features +- Support for New Platforms, Languages, and Compilers +- Bug Fixes since HDF5-1.8.7 +- Platforms Tested +- Supported Configuration Features Summary +- Known Problems + + +New Features +============ + + Configuration + ------------- + - Added the --enable-fortran2003 flag to enable Fortran2003 support + in the HDF5 Fortran library. The flag should be used along with the + --enable-fortran flag and takes affect only when the Fortran compiler + is Fortran2003 compliant. (EIP - 2011/11/14) + - Added checks for clock_gettime and mach/mach_time.h to both configure and + CMake. This will support the move from gettimeofday to clock_gettime's + monotonic timer in the profiling code in a future release. + (DER - 2011/10/12) + + Library + ------- + - The Windows VFD code has been removed with the exception of the functions + which set it (H5Pset_fapl_windows, for example). Setting the Windows + VFD now really sets the SEC2 VFD. The WINDOWS_MAX_BUF and + WINDOWS_USE_STDIO configuration options and #defines have also been + removed. NOTE: Since the Windows VFD was a clone of the SEC2 VFD, this + change should be transparent to users. + (DER - 2011/10/12 - HDFFV-7740, HDFFV-7744) + - H5Tcreate now supports the string type (fixed-length and variable- + length). (SLU - 2011/05/20) + + Parallel Library + ---------------- + - Added new H5Pget_mpio_actual_chunk_opt_mode and + H5Pget_mpio_actual_io_mode API routines for querying whether/how + a collective I/O operation completed. (QAK - 2011/10/12) + + Tools + ----- + - None + + High-Level APIs + --------------- + - Added the following Fortran wrappers for the Dimension Scale APIs: + h5dsset_scale_f + h5dsattach_scale_f + h5dsdetach_scale_f + h5dsis_attached_f + h5dsis_scale_f + h5dsset_label_f + h5dsget_label_f + h5dsget_scale_name_f + h5dsget_num_scales_f + (EIP for SB - 2011/10/13 - HDFFV-3797) + + Fortran API + ----------- + - The HDF5 Fortran library was enhanced to support the Fortran 2003 standard. + The following features are available when the HDF5 library is configured + using the --enable-fortran and --enable-fortran2003 configure flags AND + if the Fortran compiler is Fortran 2003 compliant: + + - Subroutines overloaded with the C_PTR derived type: + h5pget_f + h5pget_fill_value_f + h5pinsert_f + h5pregister_f + h5pset_f + h5pset_fill_value_f + h5rcreate_f + h5rderefrence_f + h5rget_name_f + h5rget_obj_type_f + - Subroutines overloaded with the C_PTR derived type + and simplified signatures: + h5aread_f + h5awrite_f + h5dread_f + h5dwrite_f + - New subroutines + h5dvlen_reclaim_f + h5literate_by_name_f + h5literate_f + h5ovisit_f + h5tconvert_f + h5pset_nbit_f + h5pset_scaleoffset_f + - Subroutines with additional optional parameters: + h5pcreate_class_f + (EIP - 2011/10/14) + + C++ API + ------- + - None + + +Support for New Platforms, Languages, and Compilers +=================================================== + - None + +Bug Fixes since HDF5-1.8.7 +========================== + + Configuration + ------------- + - Changed the size of H5_SIZEOF_OFF_T to 4 bytes (was 8) in the VMS + h5pubconf.h based on the output of a test program. (DER - 2011/10/12) + - The Windows and VMS versions of H5pubconf.h were brought into sync with + the linux/posix version. (DER - 2011/10/12) + - Fixed a bug in the bin/trace Perl script where API functions + that take a variable number of arguments were not processed for + trace statement fixup. (DER - 2011/08/25) + - The --enable-h5dump-packed-bits configure option has been removed. + The h5dump code that this option conditionally enabled is now always + compiled into h5dump. Please refer to the h5dump reference manual for + usage of the packed bits feature. (MAM - 2011/06/23 - HDFFV-7592) + - Configure now uses the same flags and symbols in its tests that are + used to build the library. (DER - 2011/05/24) + + Library + ------- + - Corrected the error when copying attributes between files which are using + different versions of the file format. (QAK - 2011/10/20 - HDFFV-7718) + - Corrected the error when loading local heaps from the file, which could + cause the size of the local heap's data block to increase dramatically. + (QAK - 2011/10/14 - HDFFV-7767) + - An application does not need to do H5O_move_msgs_forward() when writing + attributes. Tests were checked into the performance suite. + (VC - 2011/10/13 - HDFFV-7640) + - Fixed a bug that occurred when using H5Ocopy on a committed datatype + containing an attribute using that committed datatype. + (NAF - 2011/10/13 - HDFFV-5854) + - Added generic VFD I/O types to the SEC2 and log VFDs to ensure correct + I/O sizes (and remove compiler warnings) between Windows and true POSIX + systems. (DER - 2011/10/12) + - Corrected some Windows behavior in the SEC2 and log VFDs. This mainly + involved datatype correctness fixes, Windows API call error checks, + and adding the volume serial number to the VFD cmp functions. + (DER - 2011/10/12) + - Converted post-checks for the appropriate POSIX I/O sizes to pre-checks + in order to avoid platform-specific or undefined behavior. + (DER - 2011/10/12) + - #ifdef _WIN32 instances have been changed to #ifdef H5_HAVE_WIN32_API. + H5_HAVE_VISUAL_STUDIO checks have been added where necessary. This is in + CMake only as configure never sets _WIN32. (ADB - 2011/09/12) + - CLANG compiler with the options -fcatch-undefined-behavior and -ftrapv + discovered 3 problems in tests and tools' library: + 1. In dsets.c, left shifting an unsigned int for 32 bits or more + caused undefined behavior. + 2. In dt_arith.c, the INIT_INTEGER macro definition has an overflow + when the value is a negative minimal and is being subtracted from one. + 3. In tools/lib/h5tools_str.c, right shifting an int value for 32 bits + or more caused undefined behavior. + All the problems have been corrected. (SLU - 2011/09/02 - HDFFV-7674) + - H5Epush2() now has the correct trace functionality (this is related to the + bin/trace Perl script bug noted in the configure section). + (DER - 2011/08/25) + - Corrected mismatched function name typo of h5pget_dxpl_mpio_c and + h5pfill_value_defined_c. (AKC - 2011/08/22 - HDFFV-7641) + - Corrected an internal error in the library where objects that use committed + (named) datatypes and were accessed from two different file IDs could confuse + the two and cause erroneous failures. (QAK - 2011/07/18 - HDFFV-7638) + - In v1.6 of the library, there was an EOA for the whole MULTI file saved in the + super block. We took it out in v1.8 of the library because it's meaningless + for the MULTI file. v1.8 of the library saves the EOA for the metadata file + instead, but this caused a backward compatibility problem. + A v1.8 library couldn't open the file created with the v1.6 library. We + fixed the problem by checking the EOA value to detect the file + created with v1.6 library. (SLU - 2011/06/22) + - When a dataset had filters and reading data failed, the error message + didn't say which filter wasn't registered. It's fixed now. (SLU - 2011/06/03) + + Parallel Library + ---------------- + - The Special Collective IO (IO when some processes do not contribute to the + IO) and the Complex Derived Datatype MPI functionalities are no longer + conditionally enabled in the library by configure. They are always + enabled in order to take advantage of performance boosts from these + behaviors. Older MPI implementations that do not allow for these + functionalities can no longer by used by HDF5. + (MAM - 2011/07/08 - HDFFV-7639). + + Tools + ----- + - h5diff: fixed segfault over non-comparable attribute with different + dimention or rank, along with '-c' option to display details. + (JKM - 2011/10/24 - HDFFV-7770) + - Fixed h5diff to display all the comparable objects and attributes + regardless of detecting non-comparables. (JKM - 2011/09/16 - HDFFV-7693) + - Fixed h5repack to update the values of references(object and region) of + attributes in h5repack for 1) references, 2) arrays of references, + 3) variable-length references, and 4) compound references. + (PC - 2011/09/14 - HDFFV-5932) + - h5diff: fixed a segfault over a dataset with container types + array and variable-length (vlen) along with multiple nested compound types. + Example: compound->array->compound, compound->vlen->compound. + (JKM - 2011/09/01 - HDFFV-7712) + - h5repack: added macro to handle a failure in H5Dread/write when memory + allocation failed inside the library. (PC - 2011/08/19) + - Fixed h5jam to not to allow the specifying of an HDF5 formatted file as + an input file for the -u (user block file) option. The original HDF5 file + would not be accessible if this behavior was allowed. + (JKM - 2011/08/19 - HDFFV-5941) + - Revised the command help pages of h5jam and h5unjam. The descriptions + were not up to date and some were missing. + (JKM - 2011/08/15 - HDFFV-7515) + - Fixed h5dump to correct the schema location: + + (ADB - 2011/08/10) + - h5repack: h5repack failed to copy a dataset if the layout is changed + from chunked with unlimited dimensions to contiguous. + (PC - 2011/07/15 - HDFFV-7649) + - Fixed h5diff: the "--delta" option considers two NaN of the same type + are different. This is wrong based on the h5diff description in the + Reference Manual. (PC - 2011/07/15 - HDFFV-7656) + - Fixed h5diff to display an instructive error message and exit with + an instructive error message when mutually exclusive options + (-d, -p and --use-system-epsilon) are used together. + (JKM - 2011/07/07 - HDFFV-7600) + - Fixed h5dump so that it displays the first line of each element in correct + position for multiple dimention array types. Before this fix, + the first line of each element in an array was + displayed after the last line of previous element without + moving to the next line (+indentation). + (JKM - 2011/06/15 - HDFFV-5878) + - Fixed h5dump so that it will display the correct value for + H5T_STD_I8LE datasets on the Blue-gene system (ppc64, linux, Big-Endian, + clustering). (AKC & JKM - 2011/05/12 - HDFFV-7594) + - Fixed h5diff to compare a file to itself correctly. Previously h5diff + reported either the files were different or not compatible in certain + cases even when comparing a file to itself. This fix also improves + performance when comparing the same target objects through verifying + the object and file addresses before comparing the details + in the objects. Examples of details are datasets and attributes. + (XCAO & JKM - 2011/05/06 - HDFFV-5928) + + F90 API + ------- + - Modified the h5open_f and h5close_f subroutines to not to call H5open + and H5close correspondingly. While the H5open call just adds overhead, + the H5close call called by a Fortran application shuts down the HDF5 + library. This makes the library inaccessible to the application. + (EIP & SB - 2011/10/13 - HDFFV-915) + - Fixed h5tget_tag_f where the length of the C string was used to + repack the C string into the Fortran string. This lead to memory + corruption in the calling program. (SB - 2011/07/26) + - Added defined constants: + H5T_ORDER_MIXED_F (HDFFV-2767) + H5Z_SO_FLOAT_DSCALE_F + H5Z_SO_FLOAT_ESCALE_F + H5Z_SO_INT_F + H5Z_SO_INT_MINBITS_DEFAULT_F + H5O_TYPE_UNKNOWN_F + H5O_TYPE_GROUP_F + H5O_TYPE_DATASET_F + H5O_TYPE_NAMED_DATATYPE_F + H5O_TYPE_NTYPES_F + + C++ API + ------ + - None + + High-Level APIs: + ------ + - Fixed the H5LTdtype_to_text function. It had some memory problems when + dealing with some complicated data types. (SLU - 2011/10/19 - HDFFV-7701) + - Fixed H5DSset_label seg faulting when retrieving the length of a + dimension label that was not set. (SB - 2011/08/07 - HDFFV-7673) + - Fixed a dimension scale bug where if you create a dimscale, attach two + datasets to it, and then unattach them, you get an error if they are + unattached in order, but no error if you unattach them in reverse order. + (SB - 2011/06/07 - HDFFV-7605) + + Fortran High-Level APIs: + ------ + - None + + +Platforms Tested +================ +The following platforms and compilers have been tested for this release. + + AIX 5.3 xlc 10.1.0.5 + (NASA G-ADA) xlC 10.1.0.5 + xlf90 12.1.0.6 + + FreeBSD 8.2-STABLE i386 gcc 4.2.1 [FreeBSD] 20070719 + (loyalty) g++ 4.2.1 [FreeBSD] 20070719 + gcc 4.6.1 20110422 + g++ 4.6.1 20110422 + gfortran 4.6.1 20110422 + + FreeBSD 8.2-STABLE amd64 gcc 4.2.1 [FreeBSD] 20070719 + (freedom) g++ 4.2.1 [FreeBSD] 20070719 + gcc 4.6.1 20110422 + g++ 4.6.1 20110422 + gfortran 4.6.1 20110422 + + IBM Blue Gene/P bgxlc 9.0.0.9 + (LLNL uDawn) bgxlf90 11.1.0.7 + bgxlC 9.0.0.9 + + Linux 2.6.16.60-0.54.5-smp Intel(R) C, C++, Fortran Compilers + x86_64 Version 11.1 20090630 + (INL Icestorm) + + Linux 2.6.18-194.el5 x86_64 Intel(R) C, C++, Fortran Compilers + (INL Fission) Version 12.0.2 20110112 + + Linux 2.6.18-108chaos x86_64 Intel(R) C, C++, Fortran Compilers + (LLNL Aztec) Version 11.1 20090630 + + Linux 2.6.18-194.3.1.el5PAE gcc (GCC) 4.1.2 and 4.4.2 + #1 SMP i686 i686 i386 GNU Fortran (GCC) 4.1.2 20080704 + (jam) (Red Hat 4.1.2-48) and 4.4.2 + PGI C, Fortran, C++ 10.4-0 32-bit + PGI C, Fortran, C++ 10.6-0 32-bit + Intel(R) C Compiler for 32-bit + applications, Version 11.1 + Intel(R) C++ Compiler for 32-bit + applications, Version 11.1 + Intel(R) Fortran Compiler for 32-bit + applications, Version 11.1 + MPICH mpich2-1.3.1 compiled with + gcc 4.1.2 and gfortran 4.1.2 + + Linux 2.6.18-238.12.1.el5 gcc 4.1.2 and 4.4.2 + #1 SMP x86_64 GNU/Linux GNU Fortran (GCC) 4.1.2 20080704 + (koala) (Red Hat 4.1.2-46) and 4.4.2 + tested for both 32- and 64-bit binaries + Intel(R) C, C++, Fortran Compilers for + applications running on Intel(R) 64, + Version 11.1. + PGI C, Fortran, C++ Version 9.0-4 + for 64-bit target on x86-64 + MPICH mpich2-1.3.1 compiled with + gcc 4.1.2 and gfortran 4.1.2 + + SGI Altix UV Intel(R) C, Fortran Compilers + SGI ProPack 7 Linux Version 11.1 20100806 + 2.6.32.24-0.2.1.2230.2.PTF- SGI MPT 2.02 + default #1 SMP + (NCSA ember) + + Dell NVIDIA Cluster Intel(R) C, Fortran Compilers + Red Hat Enterprise Linux 6 Version 12.0.4 20110427 + 2.6.32-131.4.1.el6.x86_64 mvapich2 1.7rc1-intel-12.0.4 + (NCSA forge) + + SunOS 5.10 32- and 64-bit Sun C 5.11 SunOS_sparc 2010/08/13 + Sun Fortran 95 8.5 SunOS_sparc 2010/08/13 + Sun C++ 5.11 SunOS_sparc 2010/08/13 + + Windows XP Visual Studio 2008 w/ Intel Fortran 10.1 (project files) + Visual Studio 2008 w/ Intel Fortran 11.1 (cmake) + Visual Studio 2010 (cmake) + Cygwin(1.7.9 native gcc(4.5.3) compiler and gfortran) + + Windows XP x64 Visual Studio 2008 w/ Intel Fortran 10.1 (project files) + Visual Studio 2008 w/ Intel Fortran 11.1 (cmake) + Visual Studio 2010 (cmake) + Cygwin(1.7.9 native gcc(4.5.3) compiler and gfortran) + + Windows Vista Visual Studio 2008 w/ Intel Fortran 11.1 (cmake) + + Windows Vista x64 Visual Studio 2008 w/ Intel Fortran 11.1 (cmake) + + Windows 7 Visual Studio 2008 w/ Intel Fortran 11.1 (cmake) + + Windows 7 x64 Visual Studio 2008 w/ Intel Fortran 11.1 (cmake) + + Mac OS X 10.8.0 (Intel 64-bit) i686-apple-darwin10-gcc-4.2.1 (GCC) 4.2.1 (Apple Inc. build 5666) (dot 3) + Darwin Kernel Version 10.8.0 GNU Fortran (GCC) 4.6.1 + Intel C, C++ and Fortran compilers 12.1.0 + + Mac OS X 10.8.0 (Intel 32-bit) i686-apple-darwin10-gcc-4.2.1 (GCC) 4.2.1 (Apple Inc. build 5666) (dot 3) + Darwin Kernel Version 10.8.0 GNU Fortran (GCC) version 4.6.1 + Intel C, C++ and Fortran compilers 12.1.0 + + Fedora 12 2.6.32.16-150.fc12.ppc64 #1 SMP ppc64 GNU/Linux + gcc (GCC) 4.4.4 20100630 (Red Hat 4.4.4-10) + GNU Fortran (GCC) 4.4.4 20100630 (Red Hat 4.4.4-10) + + Debian6.0.3 2.6.32-5-686 #1 SMP i686 GNU/Linux + gcc (Debian 4.4.5-8) 4.4.5 + GNU Fortran (Debian 4.4.5-8) 4.4.5 + + Debian6.0.3 2.6.32-5-amd64 #1 SMP x86_64 GNU/Linux + gcc (Debian 4.4.5-8) 4.4.5 + GNU Fortran (Debian 4.4.5-8) 4.4.5 + + Fedora15 2.6.40.6-0.fc15.i686.PAE #1 SMP i686 i686 i386 GNU/Linux + gcc (GCC) 4.6.1 20110908 (Red Hat 4.6.1-9) + GNU Fortran (GCC) 4.6.1 20110908 (Red Hat 4.6.1-9) + + Fedora15 2.6.40.6-0.fc15.x86_64 #1 SMP x86_64 x86_64 x86_64 GNU/Linux + gcc (GCC) 4.6.1 20110908 (Red Hat 4.6.1-9) + GNU Fortran (GCC) 4.6.1 20110908 (Red Hat 4.6.1-9) + + SUSE 11.4 2.6.37.6-0.7-desktop #1 SMP PREEMPT i686 i686 i386 GNU/Linux + gcc (SUSE Linux) 4.5.1 20101208 + GNU Fortran (SUSE Linux) 4.5.1 20101208 + + SUSE 11.4 2.6.37.6-0.7-desktop #1 SMP PREEMPT x86_64 x86_64 x86_64 GNU/Linux + gcc (SUSE Linux) 4.5.1 20101208 + GNU Fortran (SUSE Linux) 4.5.1 20101208 + + Ubuntu 11.10 3.0.0-12-generic #20-Ubuntu SMP i686 GNU/Linux + gcc (Ubuntu/Linaro 4.6.1-9ubuntu3) 4.6.1 + GNU Fortran (Ubuntu/Linaro 4.6.4-9ubuntu3) 4.6.1 + + Ubuntu 11.10 3.0.0-12-generic #20-Ubuntu SMP x86_64 GNU/Linux + gcc (Ubuntu/Linaro 4.6.1-9ubuntu3) 4.6.1 + GNU Fortran (Ubuntu/Linaro 4.6.1-9ubuntu3) 4.6.1 + + OpenVMS Alpha 8.3 HP C V7.3-009 + HP Fortran V8.2-104679-48H9K + HP C++ V7.3-009 + + Cray Linux Environment (CLE) PrgEnv-pgi 2.2.74 + hopper.nersc.gov pgcc 11.7-0 64-bit target on x86-64 Linux -tp k8e + franklin.nersc.gov pgf90 11.7-0 64-bit target on x86-64 Linux -tp k8e + pgCC 11.7-0 64-bit target on x86-64 Linux -tp k8e + +Tested Configuration Features Summary +===================================== + + In the tables below + y = tested + n = not tested in this release + C = Cluster + W = Workstation + x = not working in this release + dna = does not apply + ( ) = footnote appears below second table + = testing incomplete on this feature or platform + +Platform C F90 F90 C++ zlib SZIP + parallel parallel +Solaris2.10 32-bit n y n y y y +Solaris2.10 64-bit n y n y y y +Windows XP n y(4) n y y y +Windows XP x64 n y(4) n y y y +Windows Vista n y(4) n y y y +Windows Vista x64 n y(4) n y y y +OpenVMS Alpha n y n y y n +Mac OS X 10.8 Intel 32-bit n y n y y y +Mac OS X 10.8 Intel 64-bit n y n y y y +AIX 5.3 32- and 64-bit n y n y y y +FreeBSD 8.2-STABLE 32&64 bit n x n x y y +CentOS 5.5 Linux 2.6.18-194 i686 GNU (1)W y y(2) y y y y +CentOS 5.5 Linux 2.6.18-194 i686 Intel W n y n y y n +CentOS 5.5 Linux 2.6.18-194 i686 PGI W n y n y y n +CentOS 5.5 Linux 2.6.16 x86_64 GNU (1) W y y(3) y y y y +CentOS 5.5 Linux 2.6.16 x86_64 Intel W n y n y y n +CentOS 5.5 Linux 2.6.16 x86_64 PGI W n y n y y y +Fedora 12 Linux 2.6.32.16-150.fc12.ppc64 n y n y y y +SGI ProPack 7 Linux 2.6.32.24 y y y y y y +Red Hat Enterprise Linux 6 y y y y y y +CLE hopper.nersc.gov y y(3) y y y n +CLE franklin.nersc.gov y y(3) y y y n + + +Platform Shared Shared Shared Thread- + C libs F90 libs C++ libs safe +Solaris2.10 32-bit y y y y +Solaris2.10 64-bit y y y y +Windows XP y y(4) y n +Windows XP x64 y y(4) y n +Windows Vista y y(4) y y +Windows Vista x64 y y(4) y y +OpenVMS Alpha n n n n +Mac OS X 10.8 Intel 32-bit y(5) n y n +Mac OS X 10.8 Intel 64-bit y(5) n y n +AIX 5.3 32- and 64-bit n n n y +FreeBSD 8.2-STABLE 32&64 bit y x x y +CentOS 5.5 Linux 2.6.18-128 i686 GNU (1)W y y(2) y y +CentOS 5.5 Linux 2.6.18-128 i686 Intel W y y y n +CentOS 5.5 Linux 2.6.18-128 i686 PGI W y y y n +CentOS 5.5 Linux 2.6.16 x86_64 GNU (1) W y y y y +CentOS 5.5 Linux 2.6.16 x86_64 Intel W y y y n +CentOS 5.5 Linux 2.6.16 x86_64 PGI W y y y n +Fedora 12 Linux 2.6.32.16-150.fc12.ppc64 y y y y +SGI ProPack 7 Linux 2.6.32.24 y y y n +Red Hat Enterprise Linux 6 y y y n +CLE hopper.nersc.gov n n n n +CLE franklin.nersc.gov n n n n + + (1) Fortran compiled with gfortran. + (2) With PGI and Absoft compilers. + (3) With PGI compiler for Fortran. + (4) Using Visual Studio 2008 w/ Intel Fortran 10.1 (Cygwin shared libraries are not supported) + (5) C and C++ shared libraries will not be built when Fortran is enabled. + Compiler versions for each platform are listed in the preceding + "Platforms Tested" table. + + +Known Problems +============== + +* The STDIO VFD does not work on some architectures, possibly due to 32/64 + bit or large file issues. The basic STDIO VFD test is known to fail on + 64-bit SunOS 5.10 on SPARC when built with -m64 and 32-bit OS X/Darwin + 10.7.0. The STDIO VFD test has been disabled while we investigate and + a fix should appear in a future release, possibly 1.8.9. + (DER - 2011/10/14) + +* h5diff can report inconsistent results when comparing datasets of enum type + that contain invalid values. This is due to how enum types are handled in + the library and will be addressed in the next release. + (DER - 2011/10/14 - HDFFV-7527) + +* The links test can fail under the stdio VFD due to some issues with external + links. This will be investigated and fixed in a future release. + (DER - 2011/10/14 - HDFFV-7768) + +* After the shared library support was fixed for some bugs, it was discovered + that "make prefix=XXX install" no longer works for shared libraries. It + still works correctly for static libraries. Therefore, if you want to + install the HDF5 shared libraries in a location such as /usr/local/hdf5, + you need to specify the location via the --prefix option during configure + time. E.g, ./configure --prefix=/usr/local/hdf5 ... + (AKC - 2011/05/07 - HDFFV-7583) + +* The parallel test, t_shapesame, in testpar/, may run for a long time and may + be terminated by the alarm signal. If that happens, one can increase the + alarm seconds (default is 1200 seconds = 20 minutes) by setting the + environment variable, $HDF5_ALARM_SECONDS, to a larger value such as 3600 + (60 minutes). Note that the t_shapesame test may fail in some systems + (see the "While working on the 1.8.6 release..." problem below). If + it does, it will waste more time if $HDF5_ALARM_SECONDS is set + to a larger value. (AKC - 2011/05/07) + +* The C++ and FORTRAN bindings are not currently working on FreeBSD. + (QAK - 2011/04/26) + +* Shared Fortran libraries are not quite working on AIX. While they are + generated when --enable-shared is specified, the fortran and hl/fortran + tests fail. We are looking into the issue. HL and C++ shared libraries + should now be working as intended, however. (MAM - 2011/04/20) + +* The --with-mpe configure option does not work with Mpich2. (AKC - 2011/03/10) + +* While working on the 1.8.6 release of HDF5, a bug was discovered that can + occur when reading from a dataset in parallel shortly after it has been + written to collectively. The issue was exposed by a new test in the parallel + HDF5 test suite, but had existed before that. We believe the problem lies with + certain MPI implementations and/or file systems. + + We have provided a pure MPI test program, as well as a standalone HDF5 + program, that can be used to determine if this is an issue on your system. + They should be run across multiple nodes with a varying number of processes. + These programs can be found at: + http://www.hdfgroup.org/ftp/HDF5/examples/known_problems/ + (NAF - 2011/01/19) + +* The library's test dt_arith.c showed a compiler's rounding problem on + Cygwin when converting from unsigned long long to long double. The + library's own conversion works fine. We defined a macro for Cygwin to + skip this test until we can solve the problem. + (SLU - 2010/05/05 - HDFFV-1264) + +* All the VFL drivers aren't backward compatible. In H5FDpublic.h, the + structure H5FD_class_t changed in 1.8. There is new parameter added to + get_eoa and set_eoa callback functions. A new callback function + get_type_map was added in. The public function H5FDrealloc was taken + out in 1.8. The problem only happens when users define their own driver + for 1.6 and try to plug in 1.8 library. Because there's only one user + complaining about it, we (Elena, Quincey, and I) decided to leave it as + it is (see bug report #1279). Quincey will make a plan for 1.10. + (SLU - 2010/02/02) + +* MinGW has a missing libstdc++.dll.a library file and will not successfully link + C++ applications/tests. Do not use the enable-cxx configure option. Read all of + the INSTALL_MINGW.txt file for all restrictions. (ADB - 2009/11/11) + +* The --enable-static-exec configure flag will only statically link libraries + if the static version of that library is present. If only the shared version + of a library exists (i.e., most system libraries on Solaris, AIX, and Mac, + for example, only have shared versions), the flag should still result in a + successful compilation, but note that the installed executables will not be + fully static. Thus, the only guarantee on these systems is that the + executable is statically linked with just the HDF5 library. + (MAM - 2009/11/04) + +* The PathScale MPI implementation, accessing a Panasas file system, would + cause H5Fcreate() with H5F_ACC_EXCL to fail even when the file does not + exist. This is due to the MPI_File_open() call failing if the mode has + the MPI_MODE_EXCL bit set. (AKC - 2009/08/11 - HDFFV-988) + +* Parallel tests failed with 16 processes with data inconsistency at testphdf5 + / dataset_readAll. Parallel tests also failed with 32 and 64 processes with + collective abort of all ranks at t_posix_compliant / allwrite_allread_blocks + with MPI IO. (CMC - 2009/04/28) + +* For Red Storm, a Cray XT3 system, the tools/h5ls/testh5ls.sh and + tools/h5copy/testh5copy.sh will fail some of its sub-tests. These sub-tests + are expected to fail and should exit with a non-zero code but the yod + command does not propagate the exit code of the executables. Yod always + returns 0 if it can launch the executable. The test suite shell expects + a non-zero for this particular test, therefore it concludes the test has + failed when it receives 0 from yod. Skip all the "failing" test for now + by changing them as following. + + ======== Original tools/h5ls/testh5ls.sh ========= + TOOLTEST tgroup-1.ls 1 -w80 -r -g tgroup.h5 + ======== Change to =============================== + echo SKIP TOOLTEST tgroup-1.ls 1 -w80 -r -g tgroup.h5 + ================================================== + + ======== Original tools/h5copy/testh5copy.sh ========= + TOOLTEST_FAIL -i $TESTFILE -o $FILEOUT -v -s grp_dsets -d grp_rename + TOOLTEST_FAIL -i $TESTFILE -o $FILEOUT -v -s grp_dsets -d /grp_rename/grp_dsets + TOOLTEST_FAIL -i $TESTFILE -o $FILEOUT -vp -s /grp_dsets -d /E/F/grp_dsets + TOOLTEST_FAIL -i $TESTFILE -o $FILEOUT -vp -s /grp_nested -d /G/H/grp_nested + H5LSTEST $FILEOUT + ======== Change to =============================== + echo SKIP TOOLTEST_FAIL -i $TESTFILE -o $FILEOUT -v -s grp_dsets -d grp_rename + echo SKIP TOOLTEST_FAIL -i $TESTFILE -o $FILEOUT -v -s grp_dsets -d /grp_rename/grp_dsets + echo SKIP TOOLTEST_FAIL -i $TESTFILE -o $FILEOUT -vp -s /grp_dsets -d /E/F/grp_dsets + echo SKIP TOOLTEST_FAIL -i $TESTFILE -o $FILEOUT -vp -s /grp_nested -d /G/H/grp_nested + echo SKIP H5LSTEST $FILEOUT + ================================================== + (AKC - 2008/11/10) + +* For Red Storm, a Cray XT3 system, the yod command sometimes gives the + message, "yod allocation delayed for node recovery". This interferes with + test suites that do not expect to see this message. See the section of "Red + Storm" in file INSTALL_parallel for a way to deal with this problem. + (AKC - 2008/05/28) + +* On an Intel 64 Linux cluster (RH 4, Linux 2.6.9) with Intel 10.0 compilers, + use -mp -O1 compilation flags to build the libraries. A higher level of + optimization causes failures in several HDF5 library tests. + +* On mpich 1.2.5 and 1.2.6, if more than two processes contribute no IO and + the application asks to do collective IO, we have found that when using 4 + processors, a simple collective write will sometimes be hung. This can be + verified with t_mpi test under testpar. + +* A dataset created or rewritten with a v1.6.3 library or after cannot be read + with the v1.6.2 library or before when the Fletcher32 EDC filter is enabled. + There was a bug in the calculation of the Fletcher32 checksum in the + library before v1.6.3; the checksum value was not consistent between big- + endian and little-endian systems. This bug was fixed in Release 1.6.3. + However, after fixing the bug, the checksum value was no longer the same as + before on little-endian system. Library releases after 1.6.4 can still read + datasets created or rewritten with an HDF5 library of v1.6.2 or before. + (SLU - 2005/06/30) + +* On IBM AIX systems, parallel HDF5 mode will fail some tests with error + messages like "INFO: 0031-XXX ...". This is from the command `poe'. + Set the environment variable MP_INFOLEVEL to 0 to minimize the messages + and run the tests again. + + The tests may fail with messages like "The socket name is already in use", + but HDF5 does not use sockets. This failure is due to problems with the + poe command trying to set up the debug socket. To resolve this problem, + check to see whether there are many old /tmp/s.pedb.* files staying around. + These are sockets used by the poe command and left behind due to failed + commands. First, ask your system administrator to clean them out. + Lastly, request IBM to provide a means to run poe without the debug socket. + (AKC - 2004/12/08) + + +%%%%1.8.7%%%% + + +HDF5 version 1.8.7 released on Tue May 10 09:24:44 CDT 2011 +================================================================================ + +INTRODUCTION +============ + +This document describes the differences between HDF5-1.8.6 and +HDF5 1.8.7, and contains information on the platforms tested and +known problems in HDF5-1.8.7. +For more details, see the files HISTORY-1_0-1_8_0_rc3.txt +and HISTORY-1_8.txt in the release_docs/ directory of the HDF5 source. + +Links to the HDF5 1.8.7 source code, documentation, and additional materials +can be found on the HDF5 web page at: + + http://www.hdfgroup.org/products/hdf5/ + +The HDF5 1.8.7 release can be obtained from: + + http://www.hdfgroup.org/HDF5/release/obtain5.html + +User documentation for 1.8.7 can be accessed directly at this location: + + http://www.hdfgroup.org/HDF5/doc/ + +New features in the HDF5-1.8.x release series, including brief general +descriptions of some new and modified APIs, are described in the "What's New +in 1.8.0?" document: + + http://www.hdfgroup.org/HDF5/doc/ADGuide/WhatsNew180.html + +All new and modified APIs are listed in detail in the "HDF5 Software Changes +from Release to Release" document, in the section "Release 1.8.7 (current +release) versus Release 1.8.6": + + http://www.hdfgroup.org/HDF5/doc/ADGuide/Changes.html + +If you have any questions or comments, please send them to the HDF Help Desk: + + help@hdfgroup.org + + +CONTENTS +======== + +- New Features +- Support for New Platforms, Languages, and Compilers +- Bug Fixes since HDF5-1.8.6 +- Platforms Tested +- Supported Configuration Features Summary +- Known Problems + + +New Features +============ + + Configuration + ------------- + - Configure now generates Makefiles that build in "silent make mode" + by default in which compile and link lines are significantly + simplified for clarity. To override this and view actual compile and + link lines during building, the --disable-silent-rules flag can be used + at configure time, or the 'make' command can be followed by V=1, to + indicate a "verbose" make. (MAM - 2011/4/14). + - Added mpicc and mpif90 as the default C and Fortran compilers for Linux + systems when --enable-parallel is specified but no $CC or $FC is defined. + (AKC - 2011/2/7) + - Added a new configure option, "--enable-unsupported", which can + be used to stop configure from preventing the use of unsupported + configure option combinations, such as c++ in parallel or Fortran + with threadsafe. Use at your own risk, as it may result in a + library that won't compile or run as expected! + (MAM - 2010/11/17 - Bug 2061) + + Library + ------- + - The library allows the dimension size of a dataspace to be zero. In + the past, the library would allow this only if the maximal dimension + size was unlimited. Now there is no such restriction, but no data + can be written to this kind of dataset. (SLU - 2011/4/20) + - We added two new macros, H5_VERSION_GE and H5_VERSION_LE, to let users + compare certain version numbers with the library being used. (SLU - + 2011/4/20) + - Added ability to cache files opened through external links. Added new + public functions H5Pset_elink_file_cache_size(), + H5Pget_elink_file_cache_size(), and H5Fclear_elink_file_cache(). + (NAF - 2011/02/17) + - Finished implementing all options for 'log' VFD. (QAK - 2011/1/25) + - Removed all old code for Metrowerks compilers, bracketed by + __MWERKS__). Metrowerks compiler is long gone. (AKC - 2010/11/17) + + Parallel Library + ---------------- + - None + + Tools + ----- + - h5diff: Added new "verbose with levels" option, '-vN, --verbose=N'. + The old '-v, --verbose' option is deprecated but remains available; + it is exactly equivalent to '-v0, --verbose=0'. + The new levels 1 ('-v1' or '--verbose=1') and 2 ('-v2' or + '--verbose=2') can be specified to view more information regarding + attributes differences. Bug #2121 (JKM 2011/3/23) + - h5dump: Added new option --enable-error-stack. This option will + display error stack information in the output stream. This is + useful when the "h5dump: Unable to print data" message is output. + (ADB - 2011/03/03) + + High-Level APIs + --------------- + - Fortran LT make datasets routines (H5LTmake_dataset_f, + h5ltmake_dataset_int_f, h5ltmake_dataset_float_f, h5ltmake_dataset_double_f) + and LT read datasets routines (h5ltread_dataset_f,h5ltread_dataset_int_f, + h5ltread_dataset_float_f, 5ltread_dataset_double_f) can now handle + 4-dimensional to 7-dimensional rank datasets. HDFFV-1217 (MSB-2011/4/24/2011) + + F90 API + ------- + - None + + C++ API + ------- + - None + + +Support for New Platforms, Languages, and Compilers +=================================================== + - Intel V11.1 uses now -O3 optimization in production mode (EIP - 2010/10/08) + + + +Bug Fixes since HDF5-1.8.6 +========================== + + Configuration + ------------- + - Shared C++ and HL libraries on AIX should now be working correctly. + Note that Fortran shared libraries are still not working on AIX. + (See the Known Problems section, below). (MAM - 2011/4/20) + - Removed config/ibm-aix6.x. All IBM-AIX settings are in one file, + ibm-aix. (AKC - 2011/4/14) + - Shared C libraries are no longer disabled on Mac when Fortran + is enabled. Shared Fortran libraries are still not supported on Mac, + so configure will disable them by default, but this is overrideable + with the new --enable-unsupported configure option. The configure + summary has been updated to reflect the fact that the shared-ness of + the C++/Fortran wrapper libraries may not align with the C library. + (MAM - 2011/04/11 - HDFFV-4353). + + Library + ------- + - Changed assertion failure when decoding a compound datatype with no + fields into a normal error failure. Also prohibit using this sort + of datatype for creating an attribute (as is already the case for + datasets and committed (named) datatypes). (QAK - 2011/04/15, Jira + issue #HDFFV-2766) + - Tell the VFL flush call that the file will be closing, allowing + the VFDs to avoid sync'ing the file (particularly valuable in parallel). + (QAK - 2011/03/09) + - The datatype handler created with H5Tencode/decode used to have the + reference count 0 (zero); it now has the reference count 1 (one). + (SLU - 2011/2/18) + - Fixed the definition of H5_HAVE_GETTIMEOFDAY on Windows so that + HDgettimeofday() is defined and works properly. Bug HDFFV-5931 + (DER - 2011/04/14) + - Added basic VFD tests for the Windows, STDIO and log VFD tests. + (DER - 2011/04/11) + + Parallel Library + ---------------- + - None + + Tools + ----- + - Updated h5dump test case script to prevent entire test failure when + source directory is read-only. Bug #HDFFV-4342 (JKM 2011/4/12) + - Fixed h5dump displaying incorrect values for H5T_STD_I8BE type data in + attribute on Big-Endian machine. H5T_STD_I8BE is unsigned 8bit type, + so h5dump is supposed to display -2 instead of 254. It worked correctly + on Little-Endian system , but not on Big-Endian system. Bug #HDFFV-4358 + (JKM 04/08/2011) + - Updated some HDF5 tools to standardize the option name as + '--enable-error-stack' for printing HDF5 error stack messages. h5ls and + h5dump have been updated. For h5ls, this replaces "-e/--errors" option, + which is deprecated. For h5dump, this is a new option. Bug #2182 + (JKM 2011/3/30) + - Fixed the h5diff --use-system-epsilon option. The formula used in the + calculation was changed from ( |a - b| / b ) to ( |a - b| ). + This was done to improve performance. Bug #2184 (JKM 2011/3/24) + - Fixed output for H5T_REFERENCE in h5dump. According to the BNF document + the output of a H5T_REFERENCE should be followed by the type; + ::= H5T_REFERENCE { } + ::= H5T_STD_REF_OBJECT | H5T_STD_REF_DSETREG + Previously this was only displayed if the -R option was used. + Bug #1725 (ADB 2011/3/28) + - Fixed two h5diff issues. 1) h5diff compared attributes correctly only + when two objects had the same number of attributes and the attribute + names were identical. 2) h5diff did not display useful information about + attribute differences. Bug #2121 (JKM 2011/3/17) + - Fixed a memory leak in h5diff that occurred when accessing symbolic links + with the --follow-symlink option. Bug #2214 (JKM 2011/3/18) + - Fixed a memory leak in h5diff that occurred when accessing variable length + string data. Bug #2216 (JKM 2011/3/18) + - Fixed and improved the help page for h5ls -a, --address option. + Bug #1904 (JKM 2011/3/11) + - Fixed h5copy to enable copying an object into the same HDF5 file. + Previously h5copy displayed an error message when the target file + was the same as the source file. (XCAO 2011/3/8) + - Fixed an h5dump problem that caused the tool to skip some data elements + in large datasets with a large array datatype on Windows. This issue + arose only on Windows due to the different return behavior of the + _vsnprintf() function. Bug #2161 (JKM 2011/3/3) + - Fixed h5dump which was skipping some array indices in large datasets + with a relatively large array datatype. The interval of skipped indices + varied according to the size of the array. Bug #2092 (JKM 2011/2/15) + - Fixed h5diff which was segfaulting when comparing compound datasets + with a combination of fixed-length string datatypes and variable-length + string datatypes in certain orders. Bug #2089 (JKM 2010/12/28) + - Improved h5diff performance. 1) Now use HDmemcmp() before comparing two + elements. 2) Replace expensive H5Tequals() calls. 3) Retrieve datatype + information at dataset level, not at each element level for compound + datasets. HDFFV-7516 (JKM 2011/4/18) + - Fixed h5ls to display nested compound types with curly brackets + when -S (--simple) option is used with -l (--label), so it shows + which members (in curly brackets) belong to which nested compound type, + making the output clearer. Bug #1979 (JKM 2010/11/09) + - Fixed h5diff to handle variable-length strings in a compound dataset + and variable-length string arrays in a compound dataset correctly. + Garbage values were previously displayed when h5diff compared multiple + variable-length strings in a compound type dataset. + Bug #1989 (JKM 2010/10/28) + - Fixed h5copy to fail gracefully when copying an object to a non- + existing group without the -p option. Bug #2040 (JKM 2010/10/18) + + F90 API + ------ + - None + + C++ API + ------ + - None + + High-Level APIs: + ------ + - None + + Fortran High-Level APIs: + ------ + - h5tbmake_table_f: Fixed error in passing an array of characters with different + length field names. + - h5tget_field_info_f: Fixed error with packing the C strings into a Fortran + array of strings. Added optional argument called 'maxlen_out' which returns + the maximum string character length in a field name element. + Bug HDFFV-1255 (MSB- 4/17/2011) + + + + +Platforms Tested +================ +The following platforms and compilers have been tested for this release. + + AIX 6.1 xlc 11.1.0.3 + (NCSA BP) xlC 11.1.0.3 + xlf90 13.1.0.3 + mpcc_r 11.1.0.3 + mpxlf90_r 13.1.0.3 + + FreeBSD 8.2-STABLE i386 gcc 4.2.1 [FreeBSD] 20070719 + (loyalty) g++ 4.2.1 [FreeBSD] 20070719 + gcc 4.6.1 20110422 + g++ 4.6.1 20110422 + gfortran 4.6.1 20110422 + + FreeBSD 8.2-STABLE amd64 gcc 4.2.1 [FreeBSD] 20070719 + (freedom) g++ 4.2.1 [FreeBSD] 20070719 + gcc 4.6.1 20110422 + g++ 4.6.1 20110422 + gfortran 4.6.1 20110422 + + Linux 2.6.18-194.3.1.el5PAE gcc (GCC) 4.1.2 and 4.4.2 + #1 SMP i686 i686 i386 G95 (GCC 4.0.3 (g95 0.93!) Apr 21 2010) + (jam) GNU Fortran (GCC) 4.1.2 20080704 + (Red Hat 4.1.2-48) and 4.4.2 + PGI C, Fortran, C++ 10.4-0 32-bit + PGI C, Fortran, C++ 10.6-0 32-bit + Intel(R) C Compiler for 32-bit + applications, Version 11.1 + Intel(R) C++ Compiler for 32-bit + applications, Version 11.1 + Intel(R) Fortran Compiler for 32-bit + applications, Version 11.1 + Absoft 32-bit Fortran 95 10.0.7 + MPICH mpich2-1.3.1 compiled with + gcc 4.1.2 and gfortran 4.1.2 + + Linux 2.6.18-194.17.1.el5 gcc 4.1.2 and 4.4.2 + #1 SMP x86_64 GNU/Linux G95 (GCC 4.0.3 (g95 0.93!) Apr 21 2010) + (amani) tested for both 32- and 64-bit binaries + GNU Fortran (GCC) 4.1.2 20080704 + (Red Hat 4.1.2-46) and 4.4.2 + Intel(R) C, C++, Fortran Compilers for + applications running on Intel(R) 64, + Version 11.1. + PGI C, Fortran, C++ Version 9.0-4 + for 64-bit target on x86-64 + MPICH mpich2-1.3.1 compiled with + gcc 4.1.2 and gfortran 4.1.2 + + SGI ProPack 7 Linux Intel(R) C++ Version 11.1 20100806 + 2.6.32.24-0.2.1.2230.2.PTF- Intel(R) Fortran Version 11.1 20100806 + default #1 SMP SGI MPT 2.01 + SGI Altix UV + (NCSA ember) + + SunOS 5.10 32- and 64-bit Sun C 5.9 Sun OS_sparc Patch 124867-16 + (linew) Sun Fortran 95 8.3 Sun OS_sparc Patch 127000-13 + Sun C++ 5.9 Sun OS_sparc Patch 124863-26 + Sun C 5.10 SunOS_sparc Patch 141861-07 + Sun Fortran 95 8.4 SunOS_sparc Patch 128231-06 + Sun C++ 5.10 SunOS_sparc 128228-11 + + Intel Xeon Linux 2.6.18- gcc 4.2.4 + 92.1.10.el5_lustre.1.6.6smp- Intel(R) C++ Version 10.1.017 + perfctr #8 SMP Intel(R) Fortran Compiler Version 10.1.017 + (NCSA abe) Open MPI 1.3.2 + MVAPICH2-1.5.1_pgi-10.8 + + Windows XP Visual Studio 2008 w/ Intel Fortran 10.1 (project files) + Visual Studio 2008 w/ Intel Fortran 11.1 (cmake) + Visual Studio 2010 (cmake) + Cygwin(1.7.7 native gcc(4.3.4) compiler and gfortran) + + Windows XP x64 Visual Studio 2008 w/ Intel Fortran 10.1 (project files) + Visual Studio 2008 w/ Intel Fortran 11.1 (cmake) + Visual Studio 2010 (cmake) + Cygwin(1.7.7 native gcc(4.3.4) compiler and gfortran) + + Windows Vista Visual Studio 2008 w/ Intel Fortran 11.1 (cmake) + + Windows Vista x64 Visual Studio 2008 w/ Intel Fortran 11.1 (cmake) + + Windows 7 Visual Studio 2008 w/ Intel Fortran 11.1 (cmake) + + Windows 7 x64 Visual Studio 2008 w/ Intel Fortran 11.1 (cmake) + + Mac OS X 10.7.0 (Intel 64-bit) i686-apple-darwin10-gcc-4.2.1 (GCC) 4.2.1 + Darwin Kernel Version 10.7.0 GNU Fortran (GCC) 4.6.0 20101106 (experimental) + Intel C, C++ and Fortran compilers 12.0.1.122 20101110 + + Mac OS X 10.7.0 (Intel 32-bit) i686-apple-darwin10-gcc-4.2.1 (GCC) 4.2.1 (Apple Inc. build 5666) (dot 3) + Darwin Kernel Version 10.7.0 GNU Fortran (GCC) version 4.4.0 20090123 (experimental) + [trunk revision 143587] + + Fedora 12 2.6.32.16-150.fc12.ppc64 #1 SMP ppc64 GNU/Linux + gcc (GCC) 4.4.4 20100630 (Red Hat 4.4.4-10) + GNU Fortran (GCC) 4.4.4 20100630 (Red Hat 4.4.4-10) + + Debian6.01 2.6.32-5-686 #1 SMP i686 GNU/Linux + gcc (Debian 4.4.5-8) 4.4.5 + GNU Fortran (Debian 4.4.5-8) 4.4.5 + + Debian6.01 2.6.32-5-amd64 #1 SMP x86_64 GNU/Linux + gcc (Debian 4.4.5-8) 4.4.5 + GNU Fortran (Debian 4.4.5-8) 4.4.5 + + Fedora14 2.6.35.12-88.fc14.i686.PAE #1 SMP i686 i686 i386 GNU/Linux + gcc (GCC) 4.5.1 20100924 (Red Hat 4.5.1-4) + GNU Fortran (GCC) 4.5.1 20100924 (Red Hat 4.5.1-4) + + Fedora14 2.6.35.12-88.fc14.x86_64 #1 SMP x86_64 x86_64 x86_64 GNU/Linux + gcc (GCC) 4.5.1 20100924 (Red Hat 4.5.1-4) + GNU Fortran (GCC) 4.5.1 20100924 (Red Hat 4.5.1-4) + + SUSE 11.4 2.6.37.1-1.2-desktop #1 SMP PREEMPT i686 i686 i386 GNU/Linux + gcc (SUSE Linux) 4.5.1 20101208 + GNU Fortran (SUSE Linux) 4.5.1 20101208 + + SUSE 11.4 2.6.37.1-1.2-desktop #1 SMP PREEMPT x86_64 x86_64 x86_64 GNU/Linux + gcc (SUSE Linux) 4.5.1 20101208 + GNU Fortran (SUSE Linux) 4.5.1 20101208 + + Ubuntu 10.10 2.6.35-28-generic #50-Ubuntu SMP i686 GNU/Linux + gcc (Ubuntu/Linaro 4.4.4-14ubuntu5) 4.4.5 + GNU Fortran (Ubuntu/Linaro 4.4.4-14ubuntu5) 4.4.5 + + Ubuntu 10.10 2.6.35-28-generic #50-Ubuntu SMP x86_64 GNU/Linux + gcc (Ubuntu/Linaro 4.4.4-14ubuntu5) 4.4.5 + GNU Fortran (Ubuntu/Linaro 4.4.4-14ubuntu5) 4.4.5 + + OpenVMS Alpha 8.3 HP C V7.3-009 + HP Fortran V8.2-104679-48H9K + HP C++ V7.3-009 + +Tested Configuration Features Summary +======================================== + + In the tables below + y = tested + n = not tested in this release + C = Cluster + W = Workstation + x = not working in this release + dna = does not apply + ( ) = footnote appears below second table + = testing incomplete on this feature or platform + +Platform C F90 F90 C++ zlib SZIP + parallel parallel +Solaris2.10 32-bit n y n y y y +Solaris2.10 64-bit n y n y y y +Windows XP n y(4) n y y y +Windows XP x64 n y(4) n y y y +Windows Vista n y(4) n y y y +Windows Vista x64 n y(4) n y y y +OpenVMS Alpha n y n y y n +Mac OS X 10.7 Intel 32-bit n y n y y y +Mac OS X 10.7 Intel 64-bit n y n y y y +AIX 6.1 32- and 64-bit y y y y y y +FreeBSD 8.2-STABLE 32&64 bit n x n x y y +CentOS 5.5 Linux 2.6.18-194 i686 GNU (1)W y y(2) y y y y +CentOS 5.5 Linux 2.6.18-194 i686 Intel W n y n y y n +CentOS 5.5 Linux 2.6.18-194 i686 PGI W n y n y y n +CentOS 5.5 Linux 2.6.16 x86_64 GNU (1) W y y(3) y y y y +CentOS 5.5 Linux 2.6.16 x86_64 Intel W n y n y y n +CentOS 5.5 Linux 2.6.16 x86_64 PGI W n y n y y y +RedHat EL4 2.6.18 Xeon Lustre C y y y y y n +Fedora 12 Linux 2.6.32.16-150.fc12.ppc64 n y n y y y +SGI Linux 2.6.32.19 y y y y y y + + +Platform Shared Shared Shared Thread- + C libs F90 libs C++ libs safe +Solaris2.10 32-bit y y y y +Solaris2.10 64-bit y y y y +Windows XP y y(4) y n +Windows XP x64 y y(4) y n +Windows Vista y y(4) y y +Windows Vista x64 y y(4) y y +OpenVMS Alpha n n n n +Mac OS X 10.7 Intel 32-bit y(5) n y n +Mac OS X 10.7 Intel 64-bit y(5) n y n +AIX 6.1 32- and 64-bit n n n y +FreeBSD 8.2-STABLE 32&64 bit y x x y +CentOS 5.5 Linux 2.6.18-128 i686 GNU (1)W y y(2) y y +CentOS 5.5 Linux 2.6.18-128 i686 Intel W y y y n +CentOS 5.5 Linux 2.6.18-128 i686 PGI W y y y n +CentOS 5.5 Linux 2.6.16 x86_64 GNU (1) W y y y y +CentOS 5.5 Linux 2.6.16 x86_64 Intel W y y y n +CentOS 5.5 Linux 2.6.16 x86_64 PGI W y y y n +RedHat EL4 2.6.18 Xeon Lustre C y y y n +Fedora 12 Linux 2.6.32.16-150.fc12.ppc64 y y y y +SGI Linux 2.6.32.19 y y y y + + (1) Fortran compiled with gfortran. + (2) With PGI and Absoft compilers. + (3) With PGI compiler for Fortran. + (4) Using Visual Studio 2008 w/ Intel Fortran 10.1 (Cygwin shared libraries are not supported) + (5) C and C++ shared libraries will not be built when Fortran is enabled. + Compiler versions for each platform are listed in the preceding + "Platforms Tested" table. + + +Known Problems +============== +* After the shared library support was fixed for some bugs, it was discovered + that "make prefix=XXX install" no longer works for shared libraries. It + still works correctly for static libraries. Therefore, if you want to + install the HDF5 shared libraries in a location such as /usr/local/hdf5, + you need to specify the location via the --prefix option during configure + time. E.g, ./configure --prefix=/usr/local/hdf5 ... + (AKC - 2011/05/07 HDFFV-7583) + +* The parallel test, t_shapesame, in testpar/, may run for a long time and may + be terminated by the alarm signal. If that happens, one can increase the + alarm seconds (default is 1200 seconds = 20 minutes) by setting the + environment variable, $HDF5_ALARM_SECONDS, to a larger value such as 3600 + (60 minutes). Note that the t_shapesame test may fail in some systems + (see the "While working on the 1.8.6 release..." problem below). If + it does, it will waste more time if $HDF5_ALARM_SECONDS is set + to a larger value. (AKC - 2011/05/07) + +* The C++ and FORTRAN bindings are not currently working on FreeBSD. + (QAK - 2011/04/26) + +* Shared Fortran libraries are not quite working on AIX. While they are + generated when --enable-shared is specified, the fortran and hl/fortran + tests fail. We are looking into the issue. HL and C++ shared libraries + should now be working as intended, however. (MAM - 2011/04/20) + +* The --with-mpe configure option does not work with Mpich2. AKC - 2011/03/10 + +* If parallel gmake (e.g., gmake -j 4) is used, the "gmake clean" command + sometimes fails in the perform directory due to the attempt to remove the + executable of h5perf or h5perf_serial by two "parallel" commands. This error + has no consequence on the functionality of the HDF5 library or install. It + is fixed in the next release. AKC - 2011/01/25 + +* While working on the 1.8.6 release of HDF5, a bug was discovered that can + occur when reading from a dataset in parallel shortly after it has been + written to collectively. The issue was exposed by a new test in the parallel + HDF5 test suite, but had existed before that. We believe the problem lies with + certain MPI implementations and/or file systems. + + We have provided a pure MPI test program, as well as a standalone HDF5 + program, that can be used to determine if this is an issue on your system. + They should be run across multiple nodes with a varying number of processes. + These programs can be found at: + http://www.hdfgroup.org/ftp/HDF5/examples/known_problems/ + +* The library's test dt_arith.c showed a compiler's rounding problem on + Cygwin when converting from unsigned long long to long double. The + library's own conversion works fine. We defined a macro for Cygwin to + skip this test until we can solve the problem. Please see bug #1813. + SLU - 2010/5/5 + +* All the VFL drivers aren't backward compatible. In H5FDpublic.h, the + structure H5FD_class_t changed in 1.8. There is new parameter added to + get_eoa and set_eoa callback functions. A new callback function + get_type_map was added in. The public function H5FDrealloc was taken + out in 1.8. The problem only happens when users define their own driver + for 1.6 and try to plug in 1.8 library. Because there's only one user + complaining about it, we (Elena, Quincey, and I) decided to leave it as + it is (see bug report #1279). Quincey will make a plan for 1.10. + SLU - 2010/2/2 + +* MinGW has a missing libstdc++.dll.a library file and will not successfully link + C++ applications/tests. Do not use the enable-cxx configure option. Read all of + the INSTALL_MINGW.txt file for all restrictions. ADB - 2009/11/11 + +* The PathScale MPI implementation, accessing a Panasas file system, would + cause H5Fcreate() with H5F_ACC_EXCL to fail even when the file does not + exist. This is due to the MPI_File_open() call failing if the mode has + the MPI_MODE_EXCL bit set. (See bug 1468 for details.) AKC - 2009/8/11 + +* Parallel tests failed with 16 processes with data inconsistency at testphdf5 + / dataset_readAll. Parallel tests also failed with 32 and 64 processes with + collective abort of all ranks at t_posix_compliant / allwrite_allread_blocks + with MPI IO. CMC - 2009/04/28 + +* For Red Storm, a Cray XT3 system, the tools/h5ls/testh5ls.sh and + tools/h5copy/testh5copy.sh will fail some of its sub-tests. These sub-tests + are expected to fail and should exit with a non-zero code but the yod + command does not propagate the exit code of the executables. Yod always + returns 0 if it can launch the executable. The test suite shell expects + a non-zero for this particular test, therefore it concludes the test has + failed when it receives 0 from yod. Skip all the "failing" test for now + by changing them as following. + + ======== Original tools/h5ls/testh5ls.sh ========= + TOOLTEST tgroup-1.ls 1 -w80 -r -g tgroup.h5 + ======== Change to =============================== + echo SKIP TOOLTEST tgroup-1.ls 1 -w80 -r -g tgroup.h5 + ================================================== + + ======== Original tools/h5copy/testh5copy.sh ========= + TOOLTEST_FAIL -i $TESTFILE -o $FILEOUT -v -s grp_dsets -d grp_rename + TOOLTEST_FAIL -i $TESTFILE -o $FILEOUT -v -s grp_dsets -d /grp_rename/grp_dsets + TOOLTEST_FAIL -i $TESTFILE -o $FILEOUT -vp -s /grp_dsets -d /E/F/grp_dsets + TOOLTEST_FAIL -i $TESTFILE -o $FILEOUT -vp -s /grp_nested -d /G/H/grp_nested + H5LSTEST $FILEOUT + ======== Change to =============================== + echo SKIP TOOLTEST_FAIL -i $TESTFILE -o $FILEOUT -v -s grp_dsets -d grp_rename + echo SKIP TOOLTEST_FAIL -i $TESTFILE -o $FILEOUT -v -s grp_dsets -d /grp_rename/grp_dsets + echo SKIP TOOLTEST_FAIL -i $TESTFILE -o $FILEOUT -vp -s /grp_dsets -d /E/F/grp_dsets + echo SKIP TOOLTEST_FAIL -i $TESTFILE -o $FILEOUT -vp -s /grp_nested -d /G/H/grp_nested + echo SKIP H5LSTEST $FILEOUT + ================================================== + AKC - 2008/11/10 + +* For Red Storm, a Cray XT3 system, the yod command sometimes gives the + message, "yod allocation delayed for node recovery". This interferes with + test suites that do not expect to see this message. See the section of "Red + Storm" in file INSTALL_parallel for a way to deal with this problem. + AKC - 2008/05/28 + +* On an Intel 64 Linux cluster (RH 4, Linux 2.6.9) with Intel 10.0 compilers, + use -mp -O1 compilation flags to build the libraries. A higher level of + optimization causes failures in several HDF5 library tests. + +* On mpich 1.2.5 and 1.2.6, if more than two processes contribute no IO and + the application asks to do collective IO, we have found that when using 4 + processors, a simple collective write will sometimes be hung. This can be + verified with t_mpi test under testpar. + +* A dataset created or rewritten with a v1.6.3 library or after cannot be read + with the v1.6.2 library or before when the Fletcher32 EDC filter is enabled. + There was a bug in the calculation of the Fletcher32 checksum in the + library before v1.6.3; the checksum value was not consistent between big- + endian and little-endian systems. This bug was fixed in Release 1.6.3. + However, after fixing the bug, the checksum value was no longer the same as + before on little-endian system. Library releases after 1.6.4 can still read + datasets created or rewritten with an HDF5 library of v1.6.2 or before. + SLU - 2005/6/30 + +* On IBM AIX systems, parallel HDF5 mode will fail some tests with error + messages like "INFO: 0031-XXX ...". This is from the command `poe'. + Set the environment variable MP_INFOLEVEL to 0 to minimize the messages + and run the tests again. + + The tests may fail with messages like "The socket name is already in use", + but HDF5 does not use sockets. This failure is due to problems with the + poe command trying to set up the debug socket. To resolve this problem, + check to see whether there are many old /tmp/s.pedb.* files staying around. + These are sockets used by the poe command and left behind due to failed + commands. First, ask your system administrator to clean them out. + Lastly, request IBM to provide a means to run poe without the debug socket. + +* The --enable-static-exec configure flag will only statically link libraries + if the static version of that library is present. If only the shared version + of a library exists (i.e., most system libraries on Solaris, AIX, and Mac, + for example, only have shared versions), the flag should still result in a + successful compilation, but note that the installed executables will not be + fully static. Thus, the only guarantee on these systems is that the + executable is statically linked with just the HDF5 library. + +* There is also a configure error on Altix machines that incorrectly reports + when a version of Szip without an encoder is being used. + +* On cobalt, an SGI Altix SMP ia64 system, Intel compiler version 10.1 (which + is the default on that system) does not work properly and results in + failures during make check (in a static build) and make installcheck (during + a shared build). This appears to be a compiler optimization problem. + Reducing optimization by setting CFLAGS to -O1 or below resolves the issue. + Alternatively, using a newer version of the compiler (11.0) also works as + intended. MAM - 2010/06/01 + +* h5diff will not report enum value differences when one or both of the values + is not a valid enumeration value. The source of this bug has been identified + and it will be fixed in 1.8.8. DER - 2011/04/27 + + +%%%%1.8.6%%%% + + +HDF5 version 1.8.6 released on Mon Feb 14 10:26:30 CST 2011 +================================================================================ + +INTRODUCTION +============ + +This document describes the differences between HDF5-1.8.5 and +HDF5 1.8.6, and contains information on the platforms tested and +known problems in HDF5-1.8.6. +For more details, see the files HISTORY-1_0-1_8_0_rc3.txt +and HISTORY-1_8.txt in the release_docs/ directory of the HDF5 source. + +Links to the HDF5 1.8.6 source code, documentation, and additional materials +can be found on the HDF5 web page at: + + http://www.hdfgroup.org/products/hdf5/ + +The HDF5 1.8.6 release can be obtained from: + + http://www.hdfgroup.org/HDF5/release/obtain5.html + +User documentation for 1.8.6 can be accessed directly at this location: + + http://www.hdfgroup.org/HDF5/doc/ + +New features in the HDF5-1.8.x release series, including brief general +descriptions of some new and modified APIs, are described in the "What's New +in 1.8.0?" document: + + http://www.hdfgroup.org/HDF5/doc/ADGuide/WhatsNew180.html + +All new and modified APIs are listed in detail in the "HDF5 Software Changes +from Release to Release" document, in the section "Release 1.8.6 (current +release) versus Release 1.8.5": + + http://www.hdfgroup.org/HDF5/doc/ADGuide/Changes.html + +If you have any questions or comments, please send them to the HDF Help Desk: + + help@hdfgroup.org + + +CONTENTS +======== + +- New Features +- Support for New Platforms, Languages, and Compilers +- Bug Fixes since HDF5-1.8.5 +- Platforms Tested +- Supported Configuration Features Summary +- Known Problems + + +New Features +============ + + Configuration + ------------- + - CMake: Improved CPack packaging, added parallel commands, improved + configuration options (better similarity to configure), added more + tests, better support for use in external cmake projects. + (ADB - 2010/10/07) + - The default configuration setting for official releases is + --enable-production. For unofficial releases, the default configuration + setting has been --disable-production. (AKC - 2010/05/28) + Library + ------- + - Added support for thread safety on Windows using the Windows threads + library. Use the HDF5_ENABLE_THREADSAFE option in CMake on a Windows + platform to enable this functionality. This is supported on Windows + Vista and newer Windows operating systems. (MAM - 2010/09/10) + - H5Tset_order and H5Tget_order now support all datatypes. A new byte + order, H5T_ORDER_MIXED, has been added specifically for a compound + datatype and its derived type. (SLU - 2010/8/23) + - Improved performance of metadata I/O by changing the default algorithm + to perform I/O from all processes (instead of just process 0) when using + parallel I/O drivers. (QAK - 2010/07/19) + - Improved performance of I/O on datasets with the same shape, but + different rank. (QAK - 2010/07/19) + - Improved performance of the chunk cache by avoiding unnecessary b-tree + lookups of chunks already in cache. (NAF - 2010/06/15) + + Parallel Library + ---------------- + - None + + Tools + ----- + - h5diff: Added a new flag: --exclude-path. The specified path to an + object will be excluded when comparing two files or two groups. If a + group is specified to be excluded, all member objects of that group + will be excluded. (JKM - 2010/09/16). + - h5ls: Added a new flag: --no-dangling-links. See --help output for + details. (JKM - 2010/06/15) + - h5ls: Added a new flag --follow-symlinks. See --help output for + details. (JKM - 2010/05/25) + + High-Level APIs + --------------- + - None + + F90 API + ------- + - None + + C++ API + ------- + - None + + +Support for New Platforms, Languages, and Compilers +=================================================== + - Sun C and C++ 5.10 and Sun Fortran 95 8.4. + - Mac OS X 10.6.4 with gcc 4.2.1 and gfortran 4.6 + + +Bug Fixes since HDF5-1.8.5 +========================== + + Configuration + ------------- + - The default number of MPI processes for testing purposes has been + changed from 3 to 6. (AKC - 2010/11/11) + - Some tests in tools/h5repack may fail in AIX systems when -q32 mode is + used. The error is caused by not requesting enough memory in default. + Added "env LDR_CNTRL=MAXDATA=0x20000000@DSA" into the $RUNSERIAL and + $RUNPARALLE in the AIX config file so that executables are tested with + more memory. (AKC - 2010/11/11) + - Removed recognition of the parallel compilers of LAM(hcc) and + ChMPIon(cmpicc) since we have no access to these two MPI implementations + and cannot verify their correctness. (AKC - 2010/07/14 - Bug 1921) + - PHDF5 was changed to use "mpiexec" instead of mpirun as the default + MPI applications startup command as defined in the MPI-2 definition, + section 4.1. (AKC - 2010/06/11 - Bug 1921) + + Library + ------- + - Fixed a bug that caused big endian machines to generate corrupt files + when using the scale-offset filter with floating point data or fill + values. Note that such datasets will no longer be readable by any + by any machine after this patch. (NAF - 2010/02/02 - Bug 2131) + - Retrieving a link's name by index in the case where the link is external + and the file that the link refers to doesn't exist will now fail + gracefully rather than cause a segmentation fault. (MAM - 2010/11/17) + - Modified metadata accumulator to better track accumulated dirty metadata + in an effort to reduce unnecessary I/O in certain situations and to + fix some other corner cases which were prone to error. (MAM - 2010/10/15) + - Added a new set of unit tests that are run during 'make check' to verify + the behavior of the metadata accumulator. (MAM - 2010/10/15) + - Modified library to always cache symbol table information. Libraries + from version 1.6.3 and earler have a bug which causes them to require + this information for some operations. (NAF - 2010/09/21 - Bug 1864) + - Fixed a bug where the library could generate an assertion/core dump when + a file that had been created with H5Pset_libver_bounds(fapl, + H5F_LIBVER_LATEST, H5F_LIBVER_LATEST) but didn't have a superblock + extension was later reopened. (QAK - 2010/09/16 - Bug 1968) + - Fixed a bug that could occur when getting information for a new-style + group that was previously opened through a file handle that was later + closed. (NAF - 2010/09/15) + - Added define check in H5public.h if stdint.h is supported by the C++ + compiler. This define is only available on Windows with VS2010 and using + CMake to build the library. (ADB - 2010/09/13 - Bug 1938) + - When a mandatory filter failed to write data chunks, the dataset + couldn't close (bug 1260). The fix releases all resources and closes + the dataset but returns a failure. (SLU - 2010/09/08) + - H5Eset_current_stack now also closes the error stack set as the + default. This is to avoid a potential problem. + (SLU - 2010/09/07 - Bug 1799) + - Corrected situation where 1-D chunked dataset could get created by an + application without calling H5Pset_chunk(). H5Pset_chunk is now + required for creating all chunked datasets. (QAK - 2010/09/02) + - Fixed many memory issues that valgrind exposed. (QAK - 2010/08/24) + - Fixed the bug in the filter's public CAN_APPLY function. The return + value should be htri_t not herr_t. (SLU - 2010/08/05 - Bug 1239) + - Fixed the STDIO VFD to use fseeko64 instead of fseek64 for 64-bit I/O + support. (AKC - 2010/7/30) + - Fixed a bug in the direct I/O driver that could render files with certain + kinds of unaligned data unreadable or corrupt them. (NAF - 2010/07/28) + - valgrind reported an error of copying data to itself when a new attribute + is written. Fixed by taking out the memcpy step in the attribute code. + (SLU - 2010/07/28 - Bug 1956) + - Corrected various issues in the MPI datatype creation code which could + cause resource leaks or incorrect behavior (and may improve the + performance as well). (QAK - 2010/07/19) + - Fixed a bug that could cause file corruption when using non-default sizes + of addresses and/or lengths. This bug could also cause uncorrupted files + with this property to be unreadable. This bug was introduced in 1.8.5. + (NAF - 2010/07/16 - Bug 1951) + + Parallel Library + ---------------- + - None + + Tools + ----- + - Fixed h5diff to compare member objects and groups recursively when + two files or groups are compared. (JKM - 2010/9/16 - Bug 1975) + - Fixed h5repack to be able to convert a dataset to COMPACT layout. + (JKM - 2010/09/15 - Bug 1896) + - Changed h5ls to not interpret special characters in object or attribute + names for output. (JKM - 2010/06/28 - Bug 1784) + - Revised the order of arguments for h5cc, h5fc, h5c++, h5pcc and h5pfc. + CPPFLAGS, CFLAGS, LDFLAGS, and LIBS have been duplicated with an H5BLD_ + prefix to put the flags and paths from the hdf5 build in the correct + places and allow the script user to add entries in CPPFLAGS, CFLAGS, + LDFLAGS, and LIBS that will take precedence over those from the hdf5 + build. The user can make these entries persistent by editing + CFLAGSBASE, CPPFLAGSBASE, LDFLAGSBASE, and LIBSBASE near the top of + the script or temporary by setting HDF5_CFLAGS, HDF5_CPPFLAGS, + HDF5_LDFLAGS, or HDF5_LIBS in the environment. The new order of + arguments in these scripts is $CLINKER $H5BLD_CPPFLAGS $CPPFLAGS + $H5BLD_CFLAGS $CFLAGS $LDFLAGS $clibpath $link_objs $LIBS $link_args + $shared_link. (LRK - 2010/10/25 - Bug 1973) + + F90 API + ------ + - None + + C++ API + ------ + - None + + High-Level APIs: + ------ + - None + + Fortran High-Level APIs: + ------ + - None + + +Platforms Tested +================ +The following platforms and compilers have been tested for this release. + + AIX 6.1 xlc 11.1.0.3 + (NCSA BP) xlC 11.1.0.3 + xlf 13.1.0.3 + mpcc_r 11.1.0.3 + mpxlf_r 13.1.0.3 + + FreeBSD 6.3-STABLE i386 gcc 3.4.6 [FreeBSD] 20060305 + (duty) g++ 3.4.6 [FreeBSD] 20060305 + gcc 4.4.5 20100803 + g++ 4.4.5 20100803 + gfortran 4.4.5 20100803 + + FreeBSD 6.3-STABLE amd64 gcc 3.4.6 [FreeBSD] 20060305 + (liberty) g++ 3.4.6 [FreeBSD] 20060305 + gcc 4.4.5 20100803 + g++ 4.4.5 20100803 + gfortran 4.4.5 20100803 + + Linux 2.6.18-194.3.1.el5PAE gcc (GCC) 4.1.2 and 4.4.2 + #1 SMP i686 i686 i386 G95 (GCC 4.0.3 (g95 0.93!) Apr 21 2010) + (jam) GNU Fortran (GCC) 4.1.2 20080704 + (Red Hat 4.1.2-48) and 4.4.2 + PGI C, Fortran, C++ 10.4-0 32-bit + PGI C, Fortran, C++ 10.6-0 32-bit + Intel(R) C Compiler for 32-bit + applications, Version 11.1 + Intel(R) C++ Compiler for 32-bit + applications, Version 11.1 + Intel(R) Fortran Compiler for 32-bit + applications, Version 11.1 + Absoft 32-bit Fortran 95 10.0.7 + MPICH mpich2-1.3.1 compiled with + gcc 4.1.2 and gfortran 4.1.2 + + Linux 2.6.18-194.17.1.el5 gcc 4.1.2 and 4.4.2 + #1 SMP x86_64 GNU/Linux G95 (GCC 4.0.3 (g95 0.93!) Apr 21 2010) + (amani) tested for both 32- and 64-bit binaries + GNU Fortran (GCC) 4.1.2 20080704 + (Red Hat 4.1.2-46) and 4.4.2 + Intel(R) C, C++, Fortran Compilers for + applications running on Intel(R) 64, + Version 11.1. + PGI C, Fortran, C++ Version 9.0-4 + for 64-bit target on x86-64 + MPICH mpich2-1.3.1 compiled with + gcc 4.1.2 and gfortran 4.1.2 + + SGI ProPack 7 Linux Intel(R) C++ Version 11.1 20100806 + 2.6.32.19-0.3.1.1982.0.PTF- Intel(R) Fortran Version 11.1 20100806 + default #1 SMP SGI MPT 2.01 + SGI Altix UV + (NCSA ember) + + SunOS 5.10 32- and 64-bit Sun C 5.9 Sun OS_sparc Patch 124867-16 + (linew) Sun Fortran 95 8.3 Sun OS_sparc Patch 127000-13 + Sun C++ 5.9 Sun OS_sparc Patch 124863-62 + Sun C 5.10 SunOS_sparc Patch 141861-07 + Sun Fortran 95 8.4 SunOS_sparc Patch 128231-06 + Sun C++ 5.10 SunOS_sparc 128228-11 + + Intel Xeon Linux 2.6.18- gcc 4.2.4 + 92.1.10.el5_lustre.1.6.6smp- Intel(R) C++ Version 10.1.017 + perfctr #8 SMP Intel(R) Fortran Compiler Version 10.1.017 + (NCSA abe) Open MPI 1.3.2 + MVAPICH2-1.5.1_pgi-10.8 + + Windows XP Visual Studio 2008 w/ Intel Fortran 10.1 (project files) + Visual Studio 2008 w/ Intel Fortran 11.1 (cmake) + Visual Studio 2010 (cmake) + Cygwin(1.7.7 native gcc(4.3.4) compiler and gfortran) + + Windows XP x64 Visual Studio 2008 w/ Intel Fortran 10.1 (project files) + Visual Studio 2008 w/ Intel Fortran 11.1 (cmake) + Visual Studio 2010 (cmake) + Cygwin(1.7.7 native gcc(4.3.4) compiler and gfortran) + + Windows Vista Visual Studio 2008 w/ Intel Fortran 10.1 (project files) + Visual Studio 2008 w/ Intel Fortran 11.1 (cmake) + + Windows Vista x64 Visual Studio 2008 w/ Intel Fortran 10.1 (project files) + Visual Studio 2008 w/ Intel Fortran 11.1 (cmake) + + Windows 7 Visual Studio 2008 w/ Intel Fortran 11.1 (cmake) + + Windows 7 x64 Visual Studio 2008 w/ Intel Fortran 11.1 (cmake) + + Mac OS X 10.6.3 (Intel 64-bit) i686-apple-darwin10-gcc-4.2.1 (GCC) 4.2.1 + Darwin Kernel Version 10.3.1 GNU Fortran (GCC) 4.5.0 20090910 + Intel C, C++ and Fortran compilers 11.1 20100806 + + Mac OS X 10.6.4 (Intel 32-bit) i686-apple-darwin10-gcc-4.2.1 (GCC) 4.2.1 + Darwin Kernel Version 10.4.0 GNU Fortran (GCC) 4.6.0 20101106 + Intel C, C++ and Fortran compilers 12.0.0 20101110 + + Mac OS X 10.6.4 (Intel 64-bit) i686-apple-darwin10-gcc-4.2.1 (GCC) 4.2.1 (Apple Inc. build 5659) + Darwin Kernel Version 10.6.0 GNU Fortran (GCC) 4.5.0 20090910 + Intel C, C++ and Fortran compilers 11.1 20100806 + + Fedora 12 2.6.32.16-150.fc12.ppc64 #1 SMP ppc64 GNU/Linux + gcc (GCC) 4.4.4 20100630 (Red Hat 4.4.4-10) + GNU Fortran (GCC) 4.4.4 20100630 (Red Hat 4.4.4-10) + + Debian5.06 2.6.26-2-686 #1 SMP i686 GNU/Linux + gcc (Debian 4.3.2-1.1) 4.3.2 + GNU Fortran (Debian 4.3.2-1.1) 4.3.2 + + Debian5.06 2.6.26-2-amd64 #1 SMP x86_64 GNU/Linux + gcc (Debian 4.3.2-1.1) 4.3.2 + GNU Fortran (Debian 4.3.2-1.1) 4.3.2 + + Fedora14 2.6.35.6-48.fc14.i686.PAE #1 SMP i686 i686 i386 GNU/Linux + gcc (GCC) 4.5.1 20100924 (Red Hat 4.5.1-4) + GNU Fortran (GCC) 4.5.1 20100924 (Red Hat 4.5.1-4) + + Fedora14 2.6.35.6-48.fc14.x86_64 #1 SMP x86_64 x86_64 x86_64 GNU/Linux + gcc (GCC) 4.5.1 20100924 (Red Hat 4.5.1-4) + GNU Fortran (GCC) 4.5.1 20100924 (Red Hat 4.5.1-4) + + SUSE 11.3 2.6.34.7-0.7-desktop #1 SMP PREEMPT i686 i686 i386 GNU/Linux + gcc (SUSE Linux) 4.5.0 20100604 [gcc-4_5-branch revision 160292] + GNU Fortran (SUSE Linux) 4.5.0 20100604 [gcc-4_5-branch revision 160292] + + SUSE 11.3 2.6.34.7-0.7-desktop #1 SMP PREEMPT x86_64 x86_64 x86_64 GNU/Linux + gcc (SUSE Linux) 4.5.0 20100604 [gcc-4_5-branch revision 160292] + GNU Fortran (SUSE Linux) 4.5.0 20100604 [gcc-4_5-branch revision 160292] + + Ubuntu 10.10 2.6.35-25-generic #44-Ubuntu SMP i686 GNU/Linux + gcc (Ubuntu/Linaro 4.4.4-14ubuntu5) 4.4.5 + GNU Fortran (Ubuntu/Linaro 4.4.4-14ubuntu5) 4.4.5 + + Ubuntu 10.10 2.6.35-25-generic #44-Ubuntu SMP x86_64 GNU/Linux + gcc (Ubuntu/Linaro 4.4.4-14ubuntu5) 4.4.5 + GNU Fortran (Ubuntu/Linaro 4.4.4-14ubuntu5) 4.4.5 + + OpenVMS Alpha 8.3 HP C V7.3-009 + HP Fortran V8.2-104679-48H9K + HP C++ V7.3-009 + +Tested Configuration Features Summary +======================================== + + In the tables below + y = tested + n = not tested in this release + C = Cluster + W = Workstation + x = not working in this release + dna = does not apply + ( ) = footnote appears below second table + = testing incomplete on this feature or platform + +Platform C F90 F90 C++ zlib SZIP + parallel parallel +Solaris2.10 32-bit n y n y y y +Solaris2.10 64-bit n y n y y y +Windows XP n y(4) n y y y +Windows XP x64 n y(4) n y y y +Windows Vista n y(4) n y y y +Windows Vista x64 n y(4) n y y y +OpenVMS Alpha n y n y y n +Mac OS X 10.6 Intel n y n y y y +AIX 6.1 32- and 64-bit y y y y y y +FreeBSD 6.3-STABLE 32&64 bit n y n y y y +CentOS 5.5 Linux 2.6.18-194 i686 GNU (1)W y y(2) y y y y +CentOS 5.5 Linux 2.6.18-194 i686 Intel W n y n y y n +CentOS 5.5 Linux 2.6.18-194 i686 PGI W n y n y y n +CentOS 5.5 Linux 2.6.16 x86_64 GNU (1) W y y(3) y y y y +CentOS 5.5 Linux 2.6.16 x86_64 Intel W n y n y y n +CentOS 5.5 Linux 2.6.16 x86_64 PGI W n y n y y y +RedHat EL4 2.6.18 Xeon Lustre C y y y y y n +Fedora 12 Linux 2.6.32.16-150.fc12.ppc64 n y n y y y +SGI Linux 2.6.32.19 y y y y y y + + +Platform Shared Shared Shared Thread- + C libs F90 libs C++ libs safe +Solaris2.10 32-bit y y y y +Solaris2.10 64-bit y y y y +Windows XP y y(4) y n +Windows XP x64 y y(4) y n +Windows Vista y y(4) y y +Windows Vista x64 y y(4) y y +OpenVMS Alpha n n n n +Mac OS X 10.6 y(5) n y n +AIX 6.1 32- and 64-bit n n n y +FreeBSD 6.3-STABLE 32&64 bit y n y y +CentOS 5.5 Linux 2.6.18-128 i686 GNU (1)W y y(2) y y +CentOS 5.5 Linux 2.6.18-128 i686 Intel W y y y n +CentOS 5.5 Linux 2.6.18-128 i686 PGI W y y y n +CentOS 5.5 Linux 2.6.16 x86_64 GNU (1) W y y y y +CentOS 5.5 Linux 2.6.16 x86_64 Intel W y y y n +CentOS 5.5 Linux 2.6.16 x86_64 PGI W y y y n +RedHat EL4 2.6.18 Xeon Lustre C y y y n +Fedora 12 Linux 2.6.32.16-150.fc12.ppc64 y y y y +SGI Linux 2.6.32.19 y y y y + + (1) Fortran compiled with gfortran. + (2) With PGI and Absoft compilers. + (3) With PGI compiler for Fortran. + (4) Using Visual Studio 2008 w/ Intel Fortran 10.1 (Cygwin shared libraries are not supported) + (5) C and C++ shared libraries will not be built when Fortran is enabled. + Compiler versions for each platform are listed in the preceding + "Platforms Tested" table. + + +Known Problems +============== +* examples/run-all-ex.sh does not work on Cygwin. (NAF - 2011/02/11) + +* Parallel test, t_shapesame in testpar, is rather unstable as it continues to + have occasional errors in AIX and quite often in NCSA Abe. It is being built + but it is not run automatically in the "make check" command. One would have to + run it by hand to see if it works in a particular machine. AKC - 2011/01/28 + +* Although OpenVMS Alpha is supported, there are several problems with the C + test suite - getname.c, lheap.c, lheap.c, mtime.c, and stab.c. The test + suite for h5diff also fails. These failures are from the tests, not the + library. We have fixed these failures. But it's too late to put the fixes + into this release. If you install the 1.8.6 library, it should still work + despite of these test failures. If you want the working copy without any + test failure, you can request it from us. SLU - 2011/01/26 + +* If parallel gmake (e.g., gmake -j 4) is used, the "gmake clean" command + sometimes fails in the perform directory due to the attempt to remove the + executable of h5perf or h5perf_serial by two "parallel" commands. This error + has no consequence on the functionality of the HDF5 library or install. It + is fixed in the next release. AKC - 2011/01/25 + +* While working on the 1.8.6 release of HDF5, a bug was discovered that can + occur when reading from a dataset in parallel shortly after it has been + written to collectively. The issue was exposed by a new test in the parallel + HDF5 test suite, but had existed before that. We believe the problem lies with + certain MPI implementations and/or filesystems. + + We have provided a pure MPI test program, as well as a standalone HDF5 + program, that can be used to determine if this is an issue on your system. + They should be run across multiple nodes with a varying number of processes. + These programs can be found at: + http://www.hdfgroup.org/ftp/HDF5/examples/known_problems/ + +* The h5diff tool can display garbage values when variable-length strings in + a compound type dataset are compared. This also occurs with variable-length + string arrays in a compound type dataset. See bug #1989. This will be fixed + in the next release. JKM - 2010/11/05 + +* The AIX --enable-shared setting does not quite work. It can produce a shared + library, but there cannot be more than one shared library that is + interlinked. This means that the high level APIs will not work which is not + very useful. We hope to have a solution in the next release. + (AKC - 2010/10/15) + +* H5Eset_auto can cause a seg fault for a library API call if the application + compiles with -DH5_USE_16_API (see bug 1707). It will be fixed in the + next release. SLU - 2010/10/5 + +* The library's test dt_arith.c showed a compiler's rounding problem on + Cygwin when converting an unsigned long long to a long double. The + library's own conversion works fine. We defined a macro for Cygwin to + skip this test until we can solve the problem. Please see bug #1813. + SLU - 2010/5/5 + +* All the VFL drivers aren't backwardly compatible. In H5FDpublic.h, the + structure H5FD_class_t changed in 1.8. A new parameter was added to the + get_eoa and set_eoa callback functions, and a new callback function + get_type_map was added. The public function H5FDrealloc was taken out in + 1.8. The problem only happens when users define their own driver for 1.6 + and try to plug in a 1.8 library. This will be fixed in 1.10. SLU - 2010/2/2 + +* MinGW has a missing libstdc++.dll.a library file and will not successfully link + C++ applications/tests. Do not use the enable-cxx configure option. Read all of + the INSTALL_MINGW.txt file for all restrictions. ADB - 2009/11/11 + +* The PathScale MPI implementation, accessing a Panasas file system, would + cause H5Fcreate() with H5F_ACC_EXCL to fail even when the file does not + exist. This is due to the MPI_File_open() call failing if the amode has + the MPI_MODE_EXCL bit set. (See bug 1468 for details.) AKC - 2009/8/11 + +* Parallel tests failed with 16 processes with data inconsistency at testphdf5 + / dataset_readAll. Parallel tests also failed with 32 and 64 processes with + collective abort of all ranks at t_posix_compliant / allwrite_allread_blocks + with MPI IO. CMC - 2009/04/28 + +* For Red Storm, a Cray XT3 system, the tools/h5ls/testh5ls.sh and + tools/h5copy/testh5copy.sh will fail some of their sub-tests. These + sub-tests are expected to fail and should exit with a non-zero code but + the yod command does not propagate the exit code of the executables. Yod + always returns 0 if it can launch the executable. The test suite shell + expects a non-zero for this particular test. Therefore, it concludes the + test has failed when it receives 0 from yod. To skip all the "failing" + tests for now, change them as shown below. + + ======== Original tools/h5ls/testh5ls.sh ========= + TOOLTEST tgroup-1.ls 1 -w80 -r -g tgroup.h5 + ======== Change to =============================== + echo SKIP TOOLTEST tgroup-1.ls 1 -w80 -r -g tgroup.h5 + ================================================== + + ======== Original tools/h5copy/testh5copy.sh ========= + TOOLTEST_FAIL -i $TESTFILE -o $FILEOUT -v -s grp_dsets -d grp_rename + TOOLTEST_FAIL -i $TESTFILE -o $FILEOUT -v -s grp_dsets -d /grp_rename/grp_dsets + TOOLTEST_FAIL -i $TESTFILE -o $FILEOUT -vp -s /grp_dsets -d /E/F/grp_dsets + TOOLTEST_FAIL -i $TESTFILE -o $FILEOUT -vp -s /grp_nested -d /G/H/grp_nested + H5LSTEST $FILEOUT + ======== Change to =============================== + echo SKIP TOOLTEST_FAIL -i $TESTFILE -o $FILEOUT -v -s grp_dsets -d grp_rename + echo SKIP TOOLTEST_FAIL -i $TESTFILE -o $FILEOUT -v -s grp_dsets -d /grp_rename/grp_dsets + echo SKIP TOOLTEST_FAIL -i $TESTFILE -o $FILEOUT -vp -s /grp_dsets -d /E/F/grp_dsets + echo SKIP TOOLTEST_FAIL -i $TESTFILE -o $FILEOUT -vp -s /grp_nested -d /G/H/grp_nested + echo SKIP H5LSTEST $FILEOUT + ================================================== + AKC - 2008/11/10 + +* For Red Storm, a Cray XT3 system, the yod command sometimes gives the + message "yod allocation delayed for node recovery." This interferes + with test suites that do not expect to see this message. See the "Red Storm" + section in file INSTALL_parallel for a way to deal with this problem. + AKC - 2008/05/28 + +* On an Intel 64 Linux cluster (RH 4, Linux 2.6.9) with Intel 10.0 compilers, + use the -mp -O1 compilation flags to build the libraries. A higher level + of optimization causes failures in several HDF5 library tests. + +* On mpich 1.2.5 and 1.2.6 on a system using four processors, if more than + two processes contribute no I/O and the application asks to do collective + I/O, we have found that a simple collective write will sometimes hang. This + can be verified with the t_mpi test under testpar. + +* A dataset created or rewritten with a v1.6.3 or later library cannot be + read with the v1.6.2 or earlier library when the Fletcher32 EDC filter + is enabled. There was a bug in the calculation of the Fletcher32 checksum + in the library before v1.6.3; the checksum value was not consistent + between big-endian and little-endian systems. This bug was fixed in + Release 1.6.3. However, after fixing the bug, the checksum value was no + longer the same as before on little-endian system. Library releases after + 1.6.4 can still read datasets created or rewritten with an HDF5 library of + v1.6.2 or earlier. SLU - 2005/6/30 + +* On IBM AIX systems, parallel HDF5 mode will fail some tests with error + messages like "INFO: 0031-XXX ...". This is from the command `poe'. To + work around this, set the environment variable MP_INFOLEVEL to 0 to + minimize the messages and run the tests again. The tests may fail with + messages like "The socket name is already in use", but HDF5 does not use + sockets. This failure is due to problems with the poe command trying to + set up the debug socket. To resolve this problem, check to see whether + there are any old /tmp/s.pedb.* files around. These are sockets used by + the poe command and left behind if the command failed at some point. To + resolve this, ask your system administrator to remove the + old/tmp/s.pedb.* files, and then ask IBM to provide a means to run poe + without the debug socket. + +* The --enable-static-exec configure flag will only statically link + libraries if the static version of that library is present. If only the + shared version of a library exists (i.e., most system libraries on + Solaris, AIX, and Mac, for example, only have shared versions), the flag + should still result in a successful compilation, but note that the + installed executables will not be fully static. Thus, the only guarantee + on these systems is that the executable is statically linked with just + the HDF5 library. + +* On an SGI Altix SMP ia64 system, the Intel compiler version 10.1 (which + is the default on that system) does not work properly and results in + failures during the make check (in a static build) and the make + installcheck (in a shared build). This appears to be a compiler + optimization problem. Reducing the optimization by setting CFLAGS to + -O1 or below resolves the issue. Using a newer version of the compiler + (11.0) avoids the issue. MAM - 2010/06/01 + +* On solaris systems, when running the examples with the scripts installed in + .../share/hdf5_examples, two of the c tests, h5_extlink and h5_elink_unix2win + may fail or generate HDF5 errors because the script commands in c/run-c-ex.sh + fail to create test directories red, blue, and u2w. Moving the '!' in lines + 67, 70, 73 of run-c-ex.sh will fix the problem. For example the script command + "if ! test -d red; then" will work on solaris if changed to + "if test ! -d red; then". + + +%%%%1.8.5%%%% + + +HDF5 version 1.8.5 released on Fri Jun 4 13:27:31 CDT 2010 +================================================================================ + +INTRODUCTION +============ + +This document describes the differences between HDF5-1.8.4 and HDF5 1.8.5, and +contains information on the platforms tested and known problems in HDF5-1.8.5. +For more details, see the files HISTORY-1_0-1_8_0_rc3.txt and HISTORY-1_8.txt +in the release_docs/ directory of the HDF5 source. + +Links to the HDF5 1.8.5 source code, documentation, and additional materials +can be found on the HDF5 web page at: + + http://www.hdfgroup.org/products/hdf5/ + +The HDF5 1.8.5 release can be obtained from: + + http://www.hdfgroup.org/HDF5/release/obtain5.html + +User documentation for 1.8.5 can be accessed directly at this location: + + http://www.hdfgroup.org/HDF5/doc/ + +New features in the HDF5-1.8.x release series, including brief general +descriptions of some new and modified APIs, are described in the "What's New +in 1.8.0?" document: + + http://www.hdfgroup.org/HDF5/doc/ADGuide/WhatsNew180.html + +All new and modified APIs are listed in detail in the "HDF5 Software Changes +from Release to Release" document, in the section "Release 1.8.5 (current +release) versus Release 1.8.4": + + http://www.hdfgroup.org/HDF5/doc/ADGuide/Changes.html + +If you have any questions or comments, please send them to the HDF Help Desk: + + help@hdfgroup.org + + +CONTENTS +======== + +- New Features +- Support for New Platforms, Languages, and Compilers +- Bug Fixes since HDF5-1.8.4 +- Platforms Tested +- Supported Configuration Features Summary +- Known Problems + + +New Features +============ + + Configuration + ------------- + - CMake Early Access: This release adds support for building HDF5 using + the CMake system. Initial work has targeted Windows, but other platforms + can be used. See the CMake.TXT file for more information. Version + 2.8.1 of CMake is required. + - Configure now adds appropriate defines for supporting large (64-bit) + files on all systems, where supported, by default, instead of only Linux. + This large file support is controllable with the --enable-largefile + configure option. The Linux-specific --enable-linux-lfs option has been + deprecated in favor of this new option. Please note that specifying + --disable-large does NOT attempt to "turn off" largefile support if it + is natively supported by the compiler, but rather just disables + configure from actively trying to add any additional compiler flags. + (MAM - 2010/05/05 - Bug # 1772/1434) + - Fixed an signal handling mask error in H5detect that might result in + SIGBUS or SIGSEGV failures in some platforms such as Linux on Sparc. + (AKC - 2010/4/28 - Bug # 1764) + - Fixed various "strict aliasing" problems, allowing higher levels + of compiler optimization (in particular, allowing '-O3' to work + with recent versions of GCC). (QAK - 2010/04/26) + - Upgraded versions of autotools used to generate configuration suite. + We now use Automake 1.11.1, Autoconf 2.65, and Libtool 2.2.6b. + (MAM - 2010/04/15) + - Added the xlc-* and mpcc_r-* BASENAME patterns to be recognized as IBM + compilers so that the IBM compiler options can be added properly. This + allows non-system-default compiler command names (e.g. xlc-m.n.k.l) be + recognized. (AKC - 2009/11/26) + + Library + ------- + - Performance is substantially improved when extending a dataset with early + allocation. (NAF - 2010/03/24 - Bug # 1637) + - Added support for filtering densely stored groups. Many of the API + functions related to filters have been extended to support dense groups + as well as datasets. Pipeline messages can now be stored in a group's + object header. (NAF/QAK - 2009/11/3) + + Parallel Library + ---------------- + - None + + Tools + ----- + - h5dump: Added the new packed bits feature which prints packed bits stored + in an integer dataset. (AKC/ADB - 2010/5/7) + - h5diff: Fixed incorrect behavior (hang) in parallel mode when specifying + invalid options (ex: -v and -q). (JKM - 2010/02/17) + - h5diff: Added new flag --no-dangling-links (see --help for details). + (JKM - 2010/02/10) + - h5diff: Added new flag --follow-symlinks (see --help for details). + (JKM - 2010/01/25) + - h5diff: Added a fix to correct the display of garbage values when + displaying big-endian data on a little-endian machine. (JKM - 2009/11/20) + + High-Level APIs + --------------- + - None + + F90 API + ------- + - None + + C++ API + ------- + - New member functions + + Overloaded CommonFG::getObjnameByIdx to take char* for name. + + Overloaded CommonFG::getObjTypeByIdx to return type name as a char*. + (BMR - 2010/05/10) + + Added DataSet::getInMemDataSize() to simplify getting the dataset's + data size in memory. (BMR - 2009/07/26) + + +Support for New Platforms, Languages, and Compilers +=================================================== + - AIX 6.1 has been added. (AKC - 2010/1/4) + + +Bug Fixes since HDF5-1.8.4 +========================== + + Configuration + ------------- + - Fixed various "strict aliasing" problems, allowing higher levels + of compiler optimization (in particular, allowing '-O3' to work + with recent versions of GCC). (QAK - 2010/04/26) + + Library + ------- + - Fixed a file corruption bug that could happen when shrinking a compressed + dataset. (NAF - 2010/05/20) + - Fixed some memory leaks in VL datatype conversion when strings are + used as fill values. (MAM - 2010/05/12 - Bug # 1826) + - Fixed an H5Rcreate failure when passing in a -1 for the dataspace + identifier. (ADB - 2010/4/28) + - Fixed a bug when copying objects with NULL references with the + H5O_COPY_EXPAND_REFERENCE_FLAG flag set. (NAF - 2010/04/08 - Bug # 1815) + - Added a mechanism to the H5I interface to save returned object identifier + structures for immediate re-use if needed. This addresses a potential + performance issue by delaying the case when the next identifier to be + registered has grown so large that it wraps around and needs to be + checked to see whether it is available for distribution. + (MAM - 2010/03/15 - Bug # 1730) + - Files can now be concurrently opened more than once using the core file + driver, as long as the backing store is used. (NAF - 2010/03/09) + - Added support for H5O_COPY_EXPAND_EXT_LINK_FLAG to H5Ocopy. External + links will now be expanded if this flag is set. + (NAF - 2010/03/05 - Bug # 1733) + - Fixed a bug where the library, when traversing an external link, would + reopen the source file if nothing else worked. (NAF - 2010/03/05) + - Fixed a bug where fractal heap identifiers for attributes and shared + object header messages could be incorrectly encoded in the file for + files created on big-endian platforms. + Please see http://www.hdfgroup.org/HDF5/release/known_problems if you + suspect you have a file with this problem. + (QAK - 2010/02/23 - Bug # 1755) + - Fixed an intermittent bug in the b-tree code which could be triggered + by expanding and shrinking chunked datasets in certain ways. + (NAF - 2010/02/16) + - H5Tdetect_class said a VL string is a string type. But when it's in + a compound type, it said it's a VL type. THis has been fixed to be + consistent; it now always returns a string type. + (SLU - 2009/12/10 - Bug # 1584) + - Allow "child" files from external links to be correctly located when + relative to a "parent" file that is opened through a symbolic link. + (QAK - 2009/12/01) + + Parallel Library + ---------------- + - Parallel mode in AIX will fail some of the testcheck_version.sh tests + where it treats "exit(134) the same as if process 0 had received an abort + signal. Fixed. (AKC - 2009/11/3) + + Tools + ----- + - Fixed h5ls to return exit code 1 (error) when a non-existent file is + specified. (JKM - 2010/04/27 - Bug # 1793) + - Fixed h5copy failure when copying a dangling link that is specified + directly. (JKM - 2010/04/22 - Bug # 1817) + - Fixed an h5repack failure that lost attributes from a dataset of + reference type. (JKM - 2010/3/25 - Bug # 1726) + - Fixed h5repack error that set NULL for object reference values for + datasets, groups, or named datatypes. (JKM - 2010/03/19 - Bug # 1814) + + F90 API + ------ + - None + + C++ API + ------ + - The constructor PropList::PropList(id) was fixed to act properly + according to the nature of 'id'. When 'id' is a property class + identifier, a new property list will be created. When 'id' is a + property list identifier, a copy of the property list will be made. + (BMR - 2010/5/9) + - The parameters 'size' and 'bufsize' in CommonFG::getLinkval and + CommonFG::getComment, respectively, now have default values for the + user's convenience. (BMR - 2009/10/23) + - NULL pointer accessing was fixed. (BMR - 2009/10/05 - Bug # 1061) + - Read/write methods of DataSet and Attribute classes were fixed + to handle string correctly. (BMR - 2009/07/26) + + High-Level APIs: + ------ + - Fixed a bug in H5DSattach_scale, H5DSis_attached, and H5DSdetach_scale + caused by using the H5Tget_native_type function to determine the native + type for reading the REFERENCE_LIST attribute. This bug was exposed + on Mac PPC. (EIP - 2010/05/22 - Bug # 1851) + - Fixed a bug in the H5DSdetach_scale function when 0 bytes were + allocated after the last reference to a dimension scale was removed + from the list of references in a VL element of the DIMENSION_LIST + attribute. Modified the function to comply with the specification: + the DIMENSION_LIST attribute is now deleted when no dimension scales + are left attached. (EIP - 2010/05/14 - Bug # 1822) + + Fortran High-Level APIs: + ------ + - None + + +Platforms Tested +================ +The following platforms and compilers have been tested for this release. + + AIX 5.3 xlc 7.0.0.9, 8.0.0.20, 9.0.0.4 + (LLNL Up) xlC 7.0.0.9, 8.0.0.20, 9.0.0.4 + xlf 9.1.0.9, 10.1.0.9, 11.1.0.7 + mpcc_r 7.0.0.9 + mpxlf_r 09.01.0000.0008 + + AIX 6.1 xlc 10.1.0.6 + (NCSA BP) xlC 10.1.0.6 + xlf 12.1.0.7 + + Cray XT3 (2.1.56) cc (pgcc) 10.0-0 + (SNL red storm) ftn (pgf90) 10.0-0 + CC (pgCC) 10.0-0 + + FreeBSD 6.3-STABLE i386 gcc 3.4.6 [FreeBSD] 20060305 + (duty) g++ 3.4.6 [FreeBSD] 20060305 + gcc 4.3.4 20090419 + g++ 4.3.4 20090419 + gfortran 4.3.4 20090419 + + FreeBSD 6.3-STABLE amd64 gcc 3.4.6 [FreeBSD] 20060305 + (liberty) g++ 3.4.6 [FreeBSD] 20060305 + gcc 4.4.1 20090421 + g++ 4.4.1 20090421 + gfortran 4.4.1 20090421 + + Linux 2.6.18-128.1.6.el5xen gcc (GCC) 4.1.2 20080704 and 4.4.2 + #1 SMP i686 i686 i386 GNU Fortran (GCC) 4.1.2 20080704 and 4.4.2 + (jam) g++ (GCC) 4.1.2 20080704 and 4.4.2 + G95 (GCC 4.0.3 (g95 0.93!) Apr 21 2010) + Absoft 32-bit Fortran 95 10.0.7 + PGI C, Fortran, C++ 10.4-0 32-bit + Intel(R) C, C++, Fortran Compilers for 32-bit + applications, Version 11.1 Build 20090827 + MPICH mpich2-1.0.8 compiled with + gcc 4.1.2 and GNU Fortran (GCC) 4.1.2 + + Linux 2.6.18-164.el5 #1 SMP gcc 4.1.2 20080704 and gcc 4.4.2 + x86_64 GNU/Linux GNU Fortran (GCC) 4.1.2 20080704 and 4.4.2 + (amani) g++ (GCC) 4.1.2 20080704 and 4.4.2 + G95 (GCC 4.0.3 (g95 0.93!) Apr 21 2010) + Intel(R) C, C++, Fortran Compilers for + applications running on Intel(R) 64, + Version 11.1 Build 20090827. + PGI C, Fortran, C++ Version 10.4-0 + for 32 & 64-bit target on x86-64 + MPICH mpich2-1.0.8 compiled with + gcc 4.1.2 and GNU Fortran (GCC) 4.1.2 + + Linux 2.6.16.54-0.2.5 #1 Intel(R) C++ Version 11.0.074 + SGI Altix SMP ia64 Intel(R) Fortran Itanium(R) Version 11.0.074 + (cobalt) SGI MPI 1.38 + + SunOS 5.10 32- and 64-bit Sun C 5.9 SunOS_sparc Patch 124867-14 + (linew) Sun Fortran 95 8.3 SunOS_sparc + Patch 127000-13 + Sun C++ 5.9 SunOS_sparc Patch 124863-23 + + Intel Xeon Linux 2.6.18- Intel(R) C++ Version 10.0.026 + 92.1.10.el5_lustre.1.6.6smp- Intel(R) Fortran Compiler Version 10.0.026 + perfctr #7 SMP Open MPI 1.2.2 + (abe) MVAPICH2-0.9.8p28p2patched-intel-ofed-1.2 + compiled with icc v10.0.026 and ifort 10.0.026 + + Linux 2.6.18-76chaos #1 SMP Intel(R) C, C++, Fortran Compilers for + SMP x86_64 GNU/Linux applications running on Intel(R) 64, + (SNL Glory) Versions 11.1. + + Windows XP Visual Studio 2008 w/ Intel Fortran 10.1 + Cygwin(1.7.5 native gcc(4.3.4) compiler and + gfortran) + + Windows XP x64 Visual Studio 2008 w/ Intel Fortran 10.1 + + Windows Vista Visual Studio 2008 w/ Intel Fortran 10.1 + + Windows Vista x64 Visual Studio 2008 w/ Intel Fortran 10.1 + + MAC OS 10.6.3 (Intel) i686-apple-darwin10-gcc-4.2.1 (GCC) 4.2.1 + (pahra) GNU Fortran (GCC) 4.5.0 20090910 + i686-apple-darwin10-g++-4.2.1 (GCC) 4.2.1 + Intel C, C++ and Fortran compilers 11.1 + + MAC OS 10.5.8 (Intel) i686-apple-darwin9-gcc-4.0.1 (GCC) 4.0.1 + (tejeda) + + MAC OS 10.5 (PPC) powerpc-apple-darwin9-gcc-4.0.1 (GCC) 4.0.1 + (juniper-w) + + OpenVMS Alpha V8.3 HP C V7.3-009 + HP C++ V7.3-009 + HP Fortran V8.0-1-104669-48GBT + +Supported Configuration Features Summary +======================================== + + In the tables below + y = tested and supported + n = not supported or not tested in this release + C = Cluster + W = Workstation + x = not working in this release + dna = does not apply + ( ) = footnote appears below second table + = testing incomplete on this feature or platform + +Platform C F90 F90 C++ zlib SZIP + parallel parallel +Solaris2.10 32-bit n y n y y y +Solaris2.10 64-bit n y n y y y +Windows XP n y(4) n(4) y y y +Windows XP x64 n y(4) n(4) y y y +Windows Vista n y(4) n(4) y y y +Windows Vista x64 n y(4) n(4) y y y +Mac OS X 10.5 PPC n n n n y n +Mac OS X 10.5 Intel n y n y y y +Mac OS X 10.6 Intel n y n y y y +AIX 5.3 32- and 64-bit n y n y y n +AIX 6.1 32- and 64-bit n y n y y n +FreeBSD 6.3-STABLE 32&64 bit n y n y y y +RedHat EL4 2.6.9-42 i686 GNU (1) W y y y y y y +RedHat EL5 2.6.18-128 i686 GNU (1)W y y(2) y y y y +RedHat EL5 2.6.18-128 i686 Intel W n y n y y n +RedHat EL5 2.6.18-128 i686 PGI W n y n y y n +SuSe Linux 2.6.16 x86_64 GNU (1) W y y(3) y y y y +SuSe Linux 2.6.16 x86_64 Intel W n y n y y n +SuSe Linux 2.6.16 x86_64 PGI W n y n y y y +SuSe Linux 2.6.16 SGI Altix ia64 C y y y y y y +RedHat EL4 2.6.18 Xeon Lustre C y y y y y n +Cray XT3 2.1.56 y y y y y n +OpenVMS Alpha V8.3 n y n y y n + +Platform Shared Shared Shared Thread- + C libs F90 libs C++ libs safe +Solaris2.10 32-bit y y y y +Solaris2.10 64-bit y y y y +Windows XP y y(4) y n +Windows XP x64 y y(4) y n +Windows Vista y y(4) y n +Windows Vista x64 y y(4) y n +Mac OS X 10.5 PPC y n n n +Mac OS X 10.5 (Intel) y(5) n y n +Mac OS X 10.6 (Intel) y(5) n y n +AIX 5.3 32- and 64-bit n n n n +AIX 6.1 32- and 64-bit n n n n +FreeBSD 6.3-STABLE 32&64 bit y n y y +RedHat EL4 2.6.9-42 i686 GNU (1) W y y y y +RedHat EL5 2.6.18-128 i686 GNU (1)W y y(2) y y +RedHat EL5 2.6.18-128 i686 Intel W y y y n +RedHat EL5 2.6.18-128 i686 PGI W y y y n +SuSe Linux 2.6.16 x86_64 GNU (1) W y y y y +SuSe Linux 2.6.16 x86_64 Intel W y y y n +SuSe Linux 2.6.16 x86_64 PGI W y y y n +SuSe Linux 2.6.16 SGI Altix ia64 C y n +RedHat EL4 2.6.18 Xeon Lustre C y y y n +Cray XT3 2.1.56 n n n n +OpenVMS Alpha V8.3 n n n n + + (1) Fortran compiled with g95. + (2) With PGI and Absoft compilers. + (3) With PGI compiler for Fortran. + (4) Using Visual Studio 2008. (Cygwin shared libraries are not + supported.) + (5) Shared C and C++ are disabled when Fortran is configured in. + Compiler versions for each platform are listed in the preceding + "Platforms Tested" table. + + +Known Problems +============== +* The library's test dt_arith.c exposed a compiler's rounding problem on + Cygwin when converting from unsigned long long to long double. The + library's own conversion works correctly. A macro is defined for Cygwin + to skip this test until we can solve the problem. (Please see bug #1813.) + SLU - 2010/5/5 + +* All the VFL drivers aren't backward compatible. In H5FDpublic.h, the + structure H5FD_class_t changed in 1.8. There is a new parameter added to + get_eoa and set_eoa callback functions. A new callback function + get_type_map was added. The public function H5FDrealloc was taken + out in 1.8. The problem only happens when users define their own driver + for 1.6 and try to plug it into a 1.8 library. This affects a very small + number of users. (See bug report #1279.) SLU - 2010/2/2 + +* MinGW has a missing libstdc++.dll.a library file and will not successfully + link C++ applications/tests. Do not use the enable-cxx configure option. + Read all of the INSTALL_MINGW.txt file for all restrictions. + ADB - 2009/11/11 + +* Some tests in tools/h5repack may fail in AIX systems when -q32 mode is used. + The error is due to insufficient memory requested. Request a large amount + of runtime memory by setting the following environment variable for more + memory. + LDR_CNTRL=MAXDATA=0x20000000@DSA + AKC - 2009/10/31 + +* The PathScale MPI implementation, accessing a Panasas file system, would + cause H5Fcreate() with H5F_ACC_EXCL to fail even when the file is not + existing. This is due to the MPI_File_open() call failing if the amode has + the MPI_MODE_EXCL bit set. (See bug 1468 for details.) AKC - 2009/8/11 + +* Parallel tests failed with 16 processes with data inconsistency at testphdf5 + / dataset_readAll. Parallel tests also failed with 32 and 64 processes with + collective abort of all ranks at t_posix_compliant / allwrite_allread_blocks + with MPI IO. CMC - 2009/04/28 + +* For gcc v4.3 and v4.4, with production mode, if -O3 is used, H5Tinit.c + would fail to compile. Actually bad H5Tinit.c is produced. If -O (same + as -O1) is used, H5Tinit.c compiled okay but test/dt_arith would fail. + When -O0 (no optimizatio) is used, H5Tinit.c compilete okay and all + tests passed. Therefore, -O0 is imposed for v4.3 and v4.4 of gcc. + AKC - 2009/04/20 + +* For Red Storm, a Cray XT3 system, the tools/h5ls/testh5ls.sh and + tools/h5copy/testh5copy.sh will fail some of its sub-tests. These sub-tests + are expected to fail and should exit with a non-zero code but the yod + command does not propagate the exit code of the executables. Yod always + returns 0 if it can launch the executable. The test suite shell expects + a non-zero for this particular test, therefore it concludes the test has + failed when it receives 0 from yod. Skip all the "failing" test for now + by changing them as following. + + ======== Original tools/h5ls/testh5ls.sh ========= + TOOLTEST tgroup-1.ls 1 -w80 -r -g tgroup.h5 + ======== Change to =============================== + echo SKIP TOOLTEST tgroup-1.ls 1 -w80 -r -g tgroup.h5 + ================================================== + + ======== Original tools/h5copy/testh5copy.sh ========= + TOOLTEST_FAIL -i $TESTFILE -o $FILEOUT -v -s grp_dsets -d grp_rename + TOOLTEST_FAIL -i $TESTFILE -o $FILEOUT -v -s grp_dsets -d /grp_rename/grp_dsets + TOOLTEST_FAIL -i $TESTFILE -o $FILEOUT -vp -s /grp_dsets -d /E/F/grp_dsets + TOOLTEST_FAIL -i $TESTFILE -o $FILEOUT -vp -s /grp_nested -d /G/H/grp_nested + H5LSTEST $FILEOUT + ======== Change to =============================== + echo SKIP TOOLTEST_FAIL -i $TESTFILE -o $FILEOUT -v -s grp_dsets -d grp_rename + echo SKIP TOOLTEST_FAIL -i $TESTFILE -o $FILEOUT -v -s grp_dsets -d /grp_rename/grp_dsets + echo SKIP TOOLTEST_FAIL -i $TESTFILE -o $FILEOUT -vp -s /grp_dsets -d /E/F/grp_dsets + echo SKIP TOOLTEST_FAIL -i $TESTFILE -o $FILEOUT -vp -s /grp_nested -d /G/H/grp_nested + echo SKIP H5LSTEST $FILEOUT + ================================================== + AKC - 2008/11/10 + +* For Red Storm, a Cray XT3 system, the yod command sometimes gives the + message, "yod allocation delayed for node recovery". This interferes with + test suites that do not expect seeing this message. See the section of "Red + Storm" in file INSTALL_parallel for a way to deal with this problem. + AKC - 2008/05/28 + +* On Intel 64 Linux cluster (RH 4, Linux 2.6.9) with Intel 10.0 compilers, + use -mp -O1 compilation flags to build the libraries. A higher level of + optimization causes failures in several HDF5 library tests. + +* On mpich 1.2.5 and 1.2.6, if more than two processes contribute no IO and + the application asks to do collective IO, we have found that when using 4 + processors, a simple collective write will sometimes be hung. This can be + verified with t_mpi test under testpar. + +* A dataset created or rewritten with a v1.6.3 library or after cannot be read + with the v1.6.2 library or before when the Fletcher32 EDC filter is enabled. + There was a bug in the calculation of the Fletcher32 checksum in the + library before v1.6.3; the checksum value was not consistent between big- + endian and little-endian systems. This bug was fixed in Release 1.6.3. + However, after fixing the bug, the checksum value was no longer the same as + before on little-endian system. Library releases after 1.6.4 can still read + datasets created or rewritten with an HDF5 library of v1.6.2 or before. + SLU - 2005/6/30 + +* On IBM AIX systems, parallel HDF5 mode will fail some tests with error + messages like "INFO: 0031-XXX ...". This is from the command `poe'. + Set the environment variable MP_INFOLEVEL to 0 to minimize the messages + and run the tests again. + + The tests may fail with messages like "The socket name is already in use," + but HDF5 does not use sockets. This failure is due to problems with the + poe command trying to set up the debug socket. To resolve this problem, + check to see whether there are many old /tmp/s.pedb.* files staying around. + These are sockets used by the poe command and left behind due to failed + commands. First, ask your system administrator to clean them out. + Lastly, request IBM to provide a means to run poe without the debug socket. + +* The --enable-static-exec configure flag will only statically link libraries + if the static version of that library is present. If only the shared version + of a library exists (i.e., most system libraries on Solaris, AIX, and Mac, + for example, only have shared versions), the flag should still result in a + successful compilation, but note that the installed executables will not be + fully static. Thus, the only guarantee on these systems is that the + executable is statically linked with just the HDF5 library. + +* There is also a configure error on Altix machines that incorrectly reports + when a version of Szip without an encoder is being used. + +* On FREE-BSD systems when shared libraries are disabled, make install fails + in install-examples with the error '"Makefile", line 635: Need an operator'. + When this error occurs removing or commenting out the line "export + LD_LIBRARY_PATH=$(LL_PATH)" (line 635 in examples/Makefile) will allow make + install to finish installing examples. The problem will be fixed in the + next release. LRK - 2010/05/26 + +* On cobalt, an SGI Altix SMP ia64 system, Intel compiler version 10.1 (which + is the default on that system) does not work properly and results in + failures during make check (in a static build) and make installcheck (during + a shared build). This appears to be a compiler optimization problem. + Reducing optimization by setting CFLAGS to -O1 or below resolves the issue. + Alternatively, using a newer version of the compiler (11.0) also works as + intended. MAM - 2010/06/01 + + +%%%%1.8.4%%%% + + +HDF5 version 1.8.4 released on Tue Nov 10 15:33:14 CST 2009 +================================================================================ + +INTRODUCTION +============ + +This document describes the differences between HDF5-1.8.3 and +HDF5 1.8.4, and contains information on the platforms tested and +known problems in HDF5-1.8.4 +For more details, see the files HISTORY-1_0-1_8_0_rc3.txt +and HISTORY-1_8.txt in the release_docs/ directory of the HDF5 source. + +Links to the HDF5 1.8.4 source code, documentation, and additional materials +can be found on the HDF5 web page at: + + http://www.hdfgroup.org/products/hdf5/ + +The HDF5 1.8.4 release can be obtained from: + + http://www.hdfgroup.org/HDF5/release/obtain5.html + +User documentation for 1.8.4 can be accessed directly at this location: + + http://www.hdfgroup.org/HDF5/doc/ + +New features in the HDF5-1.8.x release series, including brief general +descriptions of some new and modified APIs, are described in the "What's New +in 1.8.0?" document: + + http://www.hdfgroup.org/HDF5/doc/ADGuide/WhatsNew180.html + +All new and modified APIs are listed in detail in the "HDF5 Software Changes +from Release to Release" document, in the section "Release 1.8.4 (current +release) versus Release 1.8.3": + + http://www.hdfgroup.org/HDF5/doc/ADGuide/Changes.html + +If you have any questions or comments, please send them to the HDF Help Desk: + + help@hdfgroup.org + + +CONTENTS +======== + +- New Features +- Support for New Platforms, Languages, and Compilers +- Bug Fixes since HDF5-1.8.3 +- Platforms Tested +- Supported Configuration Features Summary +- Known Problems + + +New Features +============ + + Configuration + ------------- + - Configuration suite now uses Automake 1.11 and Autoconf 2.64. + MAM 2009/08/31. + - Changed default Gnu fortran compiler from g95 to gfortran since + gfortran is more likely installed with gcc now. -AKC 2009/07/19- + + Library + ------- + - The embedded library information is displayed by H5check_version() if a + version mismatch is detected. Also changed H5check_version() to + suppress the warning message totally if $HDF5_DISABLE_VERSION_CHECK is 2 + or higher. (Old behavior treated 3 or higher the same as 1, that is + print a warning and allows the program to continue. (AKC - 2009/9/28) + - If a user does not care for the extra library information insert + in the executables, he may turn it off by --disable-embedded-libinfo + during configure. (AKC - 2009/9/15) + + Parallel Library + ---------------- + - None + + Tools + ----- + - h5diff: h5diff treats two INFINITY values different. Fixed by checking + (value==expect) before call ABS(...) at h5diff_array.c. This will make + that (INF==INF) is true (INF is treated as an number instead of NaN) + (PC -- 2009/07/28) + - h5diff: add option "--use-system-epsilon" to print difference if + (|a-b| > EPSILON). + Change default to use strict equality (PC -- 2009/09/12) + + High-Level APIs + --------------- + - None + + F90 API + ------- + - Added H5Oopen_by_addr_f MSB - 9/14/09 + + C++ API + ------- + - None + + +Support for New Platforms, Languages, and Compilers +=================================================== + - PathScale compilers are recognized and can build the HDF5 library + properly. AKC - 2009/7/28 - + + +Bug Fixes since HDF5-1.8.3 +========================== + + Configuration + ------------- + - Removed the following config files, as we no longer support them: + config/dec-osf*, config/hpux11.00, config/irix5.x, + config/powerpc-ibm-aix4.x config/rs6000-ibm-aix5.x config/unicos* + MAM - 2009/10/08 + - Modified configure and make process to properly preserve user's CFLAGS + (and company) environment variables. Build will now properly use + automake's AM_CFLAGS for any compiler flags set by the configure + process. Configure will no longer modify CFLAGS directly, nor will + setting CFLAGS during make completely replace what configure has set up. + MAM - 2009/10/08 + - Support for TFLOPS, config/intel-osf1, is removed since the TFLOPS + machine has long retired. AKC - 2009/10/06. + - Added $(EXEEXT) extension to H5detect when it's executed in the + src/Makefile to generate H5Tinit.c so it works correctly on platforms + that require the full extension when running executables. + MAM - 2009/10/01 - BZ #1613 + - Configure will now set FC and CXX to "no" when fortran and c++ + are not being compiled, respectively, so configure will not run + some of the compiler tests for these languages when they are not + being used. MAM - 2009/10/01 + - The --enable-static-exec flag will now properly place the -static flag + on the link line of all installed executables. This will force the + executable to link with static libraries over shared libraries, provided + the static libraries are available. MAM - 2009/08/31 - BZ #1583 + - The PathScale compiler (v3.2) was mistaken as gcc v4.2.0 but it fails to + recognize some gcc options. Fixed. (see bug 1301). AKC - 2009/7/28 - + + Library + ------- + - Fixed a bug where writing and deleting many global heap objects (i.e. + variable length data) would render the file unreadable. Previously + created files exhibiting this problem should now be readable. + NAF - 2009/10/27 - 1483 + - Fixed error in library's internal caching mechanisms which could cause + an assertion failure (and attendent core dump) when encountering an + unusually formatted file. (QAK - 2009/10/13) + - Fixed incorrect return value for H5Pget_preserve. AKC - 2009/10/08 - 1628 + - Fixed an assertion failure that occurred when H5Ocopy was called on a + dataset using a vlen inside a compound. NAF - 2009/10/02 - 1597 + - Fixed incorrect return value for H5Pget_filter_by_id1/2 in H5Ppublic.h. + NAF - 2009/09/25 - 1620 + - Fixed a bug where properties weren't being compared with the registered + compare callback. NAF - 2009/09/25 - 1555 + - Corrected problem where library would re-write the superblock in a file + opened for R/W access, even when no changes were made to the file. + (QAK - 2009/08/20, Bz#1473) + - Fixed a bug where H5Pget_filter_by_id would succeed when called for a + filter that wasn't present. NAF - 2009/06/25 - 1250 + - Fixed an issue with committed compound datatypes containing a vlen. Also + fixed memory leaks involving committed datatypes. NAF - 2009/06/10 - 1593 + + Parallel Library + ---------------- + - None + + Tools + ----- + - h5dump/h5ls display buffer resize fixed in tools library. + ADB - 2009/7/21 - 1520 + - perf_serial test added to Windows projects and check batch file. + ADB - 2009/06/11 -1504 + + + F90 API + ------ + - Fixed bug in h5lget_info_by_idx_f by adding missing arguments, + consequently changing the API. New API is: + + SUBROUTINE h5lget_info_by_idx_f(loc_id, group_name, index_field, order, n, & + link_type, f_corder_valid, corder, cset, address, val_size, hdferr, lapl_id) + + MSB - 2009/9/17 - 1652 + + - Corrected the values for the H5L_flags FORTRAN constants: + H5L_LINK_ERROR_F, H5L_LINK_HARD_F, H5L_LINK_SOFT_F, H5L_LINK_EXTERNAL_F + MSB - 2009-09-17 - 1653 + + - Added FORTRAN equivalent of C constant H5T_ORDER_NONE: H5T_ORDER_NONE_F + MSB - 2009-9-24 - 1471 + + C++ API + ------ + - None + + High-Level APIs: + ------ + - Fixed a bug where the H5TB API would forget the order of fields when added + out of offset order. NAF - 2009/10/27 - 1582 + - H5DSis_attached failed to account for different platform types. Added a + get native type call. ADB - 2009/9/29 - 1562 + + Fortran High-Level APIs: + ------ + - Lite: the h5ltread_dataset_string_f and h5ltget_attribute_string_f functions + had memory problems with the g95 fortran compiler. (PVN � 5/13/2009) 1522 + + + +Platforms Tested +================ +The following platforms and compilers have been tested for this release. + + AIX 5.3 xlc 7.0.0.8 + (LLNL Up) xlf 09.01.0000.0008 + xlC 7.0.0.8 + mpcc_r 7.0.0.8 + mpxlf_r 09.01.0000.0008 + + Cray XT3 (2.0.41) cc (pgcc) 7.1-4 + (SNL red storm) ftn (pgf90) 7.1-4 + CC (pgCC) 7.1-4 + + FreeBSD 6.3-STABLE i386 gcc 3.4.6 [FreeBSD] 20060305 + (duty) g++ 3.4.6 [FreeBSD] 20060305 + gcc 4.3.5 20091004 + g++ 4.3.5 20091004 + gfortran 4.3.5 20091004 + + FreeBSD 6.3-STABLE amd64 gcc 3.4.6 [FreeBSD] 20060305 + (liberty) g++ 3.4.6 [FreeBSD] 20060305 + gcc 4.4.2 20091006 + g++ 4.4.2 20091006 + gfortran 4.4.2 20091006 + + Linux 2.6.18-164.el5 gcc (GCC) 4.1.2 20080704 + #1 SMP i686 i686 i386 G95 (GCC 4.0.3 (g95 0.92!) Jun 24 2009) + (jam) GNU Fortran (GCC) 4.1.2 20080704 + (Red Hat 4.1.2-46) + PGI C, Fortran, C++ 8.0-5 32-bit + PGI C, Fortran, C++ 8.0-1 32-bit + Intel(R) C Compiler for 32-bit + applications, Versions 11.0, 11.1 + Intel(R) C++ Compiler for 32-bit + applications, Version 11.0, 11.1 + Intel(R) Fortran Compiler for 32-bit + applications, Version 11.0, 11.1 + Absoft 32-bit Fortran 95 10.0.7 + MPICH mpich2-1.0.8 compiled with + gcc (GCC) 4.1.2 and G95 + (GCC 4.0.3 (g95 0.92!) + + Linux 2.6.18-164.el5 #1 SMP gcc 4.1.2 20080704 + x86_64 GNU/Linux G95 (GCC 4.0.3 (g95 0.92!) Jun 24 2009) + (amani) tested for both 32- and 64-bit binaries + Intel(R) C, C++, Fortran Compilers for + applications running on Intel(R) 64, + Versions 11.1. + PGI C, Fortran, C++ Version 9.0-4 + for 64-bit target on x86-64 + gcc 4.1.2 and G95 (GCC 4.0.3 (g95 0.92!) + MPICH mpich2-1.0.8 compiled with + gcc 4.1.2 and G95 (GCC 4.0.3 (g95 0.92!) + GNU Fortran (GCC) 4.1.2 20080704 + (Red Hat 4.1.2-46) + + + Linux 2.6.16.60-0.42.5 #1 Intel(R) C++ Version 10.1.017 + SGI Altix SMP ia64 Intel(R) Fortran Itanium(R) Version 10.1.017 + (cobalt) SGI MPI 1.38 + + SunOS 5.10 32- and 64-bit Sun C 5.9 SunOS_sparc Patch 124867-11 2009/04/30 + (linew) Sun Fortran 95 8.3 SunOS_sparc + Patch 127000-11 2009/10/06 + Sun C++ 5.9 SunOS_sparc + Patch 124863-16 2009/09/15 + + Intel Xeon Linux 2.6.18- Intel(R) C++ Version 10.0.026 + 92.1.10.el5_lustre.1.6.6smp- Intel(R) Fortran Compiler Version 10.0.026 + perfctr #6 SMP Open MPI 1.2.2 + (abe) MVAPICH2-0.9.8p28p2patched-intel-ofed-1.2 + compiled with icc v10.0.026 and ifort 10.0.026 + + IA-64 Linux 2.4.21-309.tg1 gcc (GCC) 3.2.2 + #1 SMP ia64 Intel(R) C++ Version 8.1.037 + (NCSA tg-login) Intel(R) Fortran Compiler Version 8.1.033 + mpich-gm-1.2.7p1..16-intel-8.1.037-r1 + + Linux 2.6.9-55.0.9.EL_lustre Intel(R) C, C++, Fortran Compilers for + .1.4.11.1smp #1 SMP applications running on Intel(R) 64, + SMP x86_64 GNU/Linux Versions 10.1. + (SNL Thunderbird) + + Linux 2.6.18-76chaos #1 SMP Intel(R) C, C++, Fortran Compilers for + SMP x86_64 GNU/Linux applications running on Intel(R) 64, + (SNL Glory) Versions 10.1. + + Windows XP Visual Studio 2005 w/ Intel Fortran 9.1 + Cygwin(native gcc compiler and g95) + + Windows XP x64 Visual Studio 2005 w/ Intel Fortran 9.1 + + Windows Vista Visual Studio 2005 w/ Intel Fortran 9.1 + + Windows Vista x64 Visual Studio 2005 w/ Intel Fortran 9.1 + + MAC OS 10.5.6 (Intel) i686-apple-darwin9-gcc-4.0.1 (GCC) 4.0.1 + GNU Fortran (GCC) 4.3.0 20070810 + G95 (GCC 4.0.3 (g95 0.91!) Apr 24 2008) + Intel C, C++ and Fortran compilers 10.1 + + +Supported Configuration Features Summary +======================================== + + In the tables below + y = tested and supported + n = not supported or not tested in this release + C = Cluster + W = Workstation + x = not working in this release + dna = does not apply + ( ) = footnote appears below second table + = testing incomplete on this feature or platform + +Platform C F90 F90 C++ zlib SZIP + parallel parallel +Solaris2.10 32-bit n y n y y y +Solaris2.10 64-bit n y n y y y +Windows XP n y(4) n(4) y y y +Windows XP x64 n y(4) n(4) y y y +Windows Vista n n n y y y +Mac OS X 10.5 Intel n y n y y y +AIX 5.3 32- and 64-bit n y n y y n +FreeBSD 6.3-STABLE 32&64 bit n y n y y y +RedHat EL5 2.6.18-164 i686 GNU (1)W y y(2) y y y y +RedHat EL5 2.6.18-164 i686 Intel W n y n y y n +RedHat EL5 2.6.18-164 i686 PGI W n y n y y n +RedHat EL5 2.6.18-164 x86_64 GNU(1)W y y(3) y y y y +RedHat EL5 2.6.18-164 x86_64 IntelW n y n y y n +RedHat EL5 2.6.18-164 x86_64 PGI W n y n y y y +SuSe Linux 2.6.16 SGI Altix ia64 C y y y y y y +RedHat EL4 2.6.18 Xeon Lustre C y y y y y n +SuSe Linux 2.4.21 ia64 Intel C y y y y y n +Cray XT3 2.0.62 y y y y y n + + +Platform Shared Shared Shared Thread- + C libs F90 libs C++ libs safe +Solaris2.10 32-bit y y y y +Solaris2.10 64-bit y y y y +Windows XP y y(4) y y +Windows XP x64 y y(4) y y +Windows Vista y n n y +Mac OS X 10.5 y n y n +AIX 5.3 32- and 64-bit n n n n +FreeBSD 6.3-STABLE 32&64 bit y y y y +RedHat EL5 2.6.18-164 i686 GNU (1)W y y(2) y y +RedHat EL5 2.6.18-164 i686 Intel W y y y n +RedHat EL5 2.6.18-164 i686 PGI W y y y n +RedHat EL5 2.6.18-164 x86_64 GNU(1)W y y y y +RedHat EL5 2.6.18-164 x86_64 IntelW y y y n +RedHat EL5 2.6.18-164 x86_64 PGI W y y y n +SuSe Linux 2.6.16 SGI Altix ia64 C y n +RedHat EL4 2.6.18 Xeon Lustre C y y y n +SuSe Linux 2.4.21 ia64 Intel C y y y n +Cray XT3 2.0.62 n n n n + + (1) Fortran compiled with g95. + (2) With PGI and Absoft compilers. + (3) With PGI compiler for Fortran. + (4) Using Visual Studio 2005 or Cygwin + Compiler versions for each platform are listed in the preceding + "Platforms Tested" table. + + +Known Problems +============== +* Parallel mode in AIX will fail some of the testcheck_version.sh tests where + it treats "exit(134) the same as if process 0 had received an abort signal. + This is fixed and will be available in the next release. AKC - 2009/11/3 + +* Some tests in tools/h5repack may fail in AIX systems when -q32 mode is used. + The error is due to insufficient memory requested. Request a large amount + of runtime memory by setting the following environment variable for more + memory. + LDR_CNTRL=MAXDATA=0x20000000@DSA + AKC - 2009/10/31 + +* The PathScale MPI implementation, accessing a Panasas file system, would + cause H5Fcreate() with H5F_ACC_EXCL to fail even when the file is not + existing. This is due to the MPI_File_open() call failing if the amode has + the MPI_MODE_EXCL bit set. (See bug 1468 for details.) AKC - 2009/8/11 + +* Parallel tests failed with 16 processes with data inconsistency at testphdf5 + / dataset_readAll. Parallel tests also failed with 32 and 64 processes with + collective abort of all ranks at t_posix_compliant / allwrite_allread_blocks + with MPI IO. CMC - 2009/04/28 + +* There is a known issue in which HDF5 will change the timestamp on a file + simply by opening it with read/write permissions, even if the file is not + modified in any way. This is due to the way in which HDF5 manages the file + superblock. A fix is currently underway and should be included in the 1.8.4 + release of HDF5. MAM - 2009/04/28 + +* For gcc v4.3 and v4.4, with production mode, if -O3 is used, H5Tinit.c + would fail to compile. Actually bad H5Tinit.c is produced. If -O (same + as -O1) is used, H5Tinit.c compiled okay but test/dt_arith would fail. + When -O0 (no optimizatio) is used, H5Tinit.c compilete okay and all + tests passed. Therefore, -O0 is imposed for v4.3 and v4.4 of gcc. + AKC - 2009/04/20 + +* For Red Storm, a Cray XT3 system, the tools/h5ls/testh5ls.sh and + tools/h5copy/testh5copy.sh will fail some of its sub-tests. These sub-tests + are expected to fail and should exit with a non-zero code but the yod + command does not propagate the exit code of the executables. Yod always + returns 0 if it can launch the executable. The test suite shell expects + a non-zero for this particular test, therefore it concludes the test has + failed when it receives 0 from yod. Skip all the "failing" test for now + by changing them as following. + + ======== Original tools/h5ls/testh5ls.sh ========= + TOOLTEST tgroup-1.ls 1 -w80 -r -g tgroup.h5 + ======== Change to =============================== + echo SKIP TOOLTEST tgroup-1.ls 1 -w80 -r -g tgroup.h5 + ================================================== + + ======== Original tools/h5copy/testh5copy.sh ========= + TOOLTEST_FAIL -i $TESTFILE -o $FILEOUT -v -s grp_dsets -d grp_rename + TOOLTEST_FAIL -i $TESTFILE -o $FILEOUT -v -s grp_dsets -d /grp_rename/grp_dsets + TOOLTEST_FAIL -i $TESTFILE -o $FILEOUT -vp -s /grp_dsets -d /E/F/grp_dsets + TOOLTEST_FAIL -i $TESTFILE -o $FILEOUT -vp -s /grp_nested -d /G/H/grp_nested + H5LSTEST $FILEOUT + ======== Change to =============================== + echo SKIP TOOLTEST_FAIL -i $TESTFILE -o $FILEOUT -v -s grp_dsets -d grp_rename + echo SKIP TOOLTEST_FAIL -i $TESTFILE -o $FILEOUT -v -s grp_dsets -d /grp_rename/grp_dsets + echo SKIP TOOLTEST_FAIL -i $TESTFILE -o $FILEOUT -vp -s /grp_dsets -d /E/F/grp_dsets + echo SKIP TOOLTEST_FAIL -i $TESTFILE -o $FILEOUT -vp -s /grp_nested -d /G/H/grp_nested + echo SKIP H5LSTEST $FILEOUT + ================================================== + AKC - 2008/11/10 + +* For Red Storm, a Cray XT3 system, the yod command sometimes gives the + message, "yod allocation delayed for node recovery". This interferes with + test suites that do not expect seeing this message. See the section of "Red + Storm" in file INSTALL_parallel for a way to deal with this problem. + AKC - 2008/05/28 + +* On Intel 64 Linux cluster (RH 4, Linux 2.6.9) with Intel 10.0 compilers, + use -mp -O1 compilation flags to build the libraries. A higher level of + optimization causes failures in several HDF5 library tests. + +* On mpich 1.2.5 and 1.2.6, if more than two processes contribute no IO and + the application asks to do collective IO, we have found that when using 4 + processors, a simple collective write will sometimes be hung. This can be + verified with t_mpi test under testpar. + +* A dataset created or rewritten with a v1.6.3 library or after cannot be read + with the v1.6.2 library or before when the Fletcher32 EDC filter is enabled. + There was a bug in the calculation of the Fletcher32 checksum in the + library before v1.6.3; the checksum value was not consistent between big- + endian and little-endian systems. This bug was fixed in Release 1.6.3. + However, after fixing the bug, the checksum value was no longer the same as + before on little-endian system. Library releases after 1.6.4 can still read + datasets created or rewritten with an HDF5 library of v1.6.2 or before. + SLU - 2005/6/30 + +* On IBM AIX systems, parallel HDF5 mode will fail some tests with error + messages like "INFO: 0031-XXX ...". This is from the command `poe'. + Set the environment variable MP_INFOLEVEL to 0 to minimize the messages + and run the tests again. + + The tests may fail with messages like "The socket name is already in use", + but HDF5 does not use sockets. This failure is due to problems with the + poe command trying to set up the debug socket. To resolve this problem, + check to see whether there are many old /tmp/s.pedb.* files staying around. + These are sockets used by the poe command and left behind due to failed + commands. First, ask your system administrator to clean them out. + Lastly, request IBM to provide a means to run poe without the debug socket. + +* The --enable-static-exec configure flag will only statically link libraries + if the static version of that library is present. If only the shared version + of a library exists (i.e., most system libraries on Solaris, AIX, and Mac, + for example, only have shared versions), the flag should still result in a + successful compilation, but note that the installed executables will not be + fully static. Thus, the only guarantee on these systems is that the + executable is statically linked with just the HDF5 library. + +* There is also a configure error on Altix machines that incorrectly reports + when a version of Szip without an encoder is being used. + +%%%%1.8.3%%%% + + +HDF5 version 1.8.3 released on Mon May 4 09:21:00 CDT 2009 +================================================================================ + +INTRODUCTION +============ + +This document describes the differences between HDF5-1.8.2 and +HDF5 1.8.3, and contains information on the platforms tested and +known problems in HDF5-1.8.3. +For more details, see the files HISTORY-1_0-1_8_0_rc3.txt +and HISTORY-1_8.txt in the release_docs/ directory of the HDF5 source. + +Links to the HDF5 1.8.3 source code, documentation, and additional materials +can be found on the HDF5 web page at: + + http://www.hdfgroup.org/products/hdf5/ + +The HDF5 1.8.3 release can be obtained from: + + http://www.hdfgroup.org/HDF5/release/obtain5.html + +User documentation for 1.8.3 can be accessed directly at this location: + + http://www.hdfgroup.org/HDF5/doc/ + +New features in the HDF5-1.8.x release series, including brief general +descriptions of some new and modified APIs, are described in the "What's New +in 1.8.0?" document: + + http://www.hdfgroup.org/HDF5/doc/ADGuide/WhatsNew180.html + +All new and modified APIs are listed in detail in the "HDF5 Software Changes +from Release to Release" document, in the section "Release 1.8.3 (current +release) versus Release 1.8.2": + + http://www.hdfgroup.org/HDF5/doc/ADGuide/Changes.html + +If you have any questions or comments, please send them to the HDF Help Desk: + + help@hdfgroup.org + + +CONTENTS +======== + +- New Features +- Support for New Platforms, Languages, and Compilers +- Bug Fixes since HDF5-1.8.2 +- Platforms Tested +- Supported Configuration Features Summary +- Known Problems + + +New Features +============ + + Configuration + ------------- + - Added libtool version numbers to generated c++, fortran, and + hl libraries. MAM 2009/04/19. + - Regenerated Makefile.ins using Automake 1.10.2. MAM 2009/04/19. + - Added a Make target of check-all-install to test the correctness of + installing via the prefix= or $DESTDIR options. AKC - 2009/04/14 + + Library + ------- + - Embed the content of libhdf5.settings into the hdf5 executables + so that an "orphaned" executables can display (via the Unix + strings command, for example) the library settings used to build + the executables. This is a prototype implementation. Improvement will + be added in next release. AKC - 2009/04/20 + - Separated "factory" free list class from block free lists. These free + lists are dynamically created and manage blocks of a fixed size. + H5set_free_list_limits() will use the same settings specified for block + free lists for factory free lists. NAF - 2009/04/08 + - Added support for dense attributes to H5Ocopy. XCao/NAF - 2009/01/29 + - Added H5Pset_elink_cb and H5Pget_elink_cb functions to support a + user-defined callback function for external link traversal. + NAF - 2009/01/08 + - Added H5Pset_elink_acc_flags and H5Pget_elink_acc_flags functions to + allow the user to specify the file access flags used to open the target + file of an external link. NAF - 2009/01/08 + - Added H5Pset_chunk_cache() and H5Pget_chunk_cache() functions to allow + individual rdcc configuration for each dataset. Added + H5Dget_access_plist() function to retrieve a dataset access property + list from a dataset. NAF - 2008/11/12 + - Added H5Iis_valid() function to check if an id is valid without + producing an error message. NAF - 2008/11/5 + - Added code to maintain a min_clean_fraction in the metadata cache when + in serial mode. MAM - 2009/01/9 + + Parallel Library + ---------------- + - Modified parallel tests to run with arbitrary number of processes. The + modified tests are testphdf5 (parallel dataset access), t_chunk_alloc + (chunk allocation), and t_posix_compliant (posix compliance). The rest of + the parallel tests already use in the code the number of processes + available in the communicator. (CMC - 2009/04/28) + + Tools + ----- + - h5diff new flag, -c, --compare, list objects that are not comparable. + PVN - 2009/4/2 - 1368 + - h5diff new flag, -N, --nan, avoids NaNs detection. PVN - 2009/4/2 + - h5dump correctly specifies XML dtd / schema urls ADB - 2009/4/3 - 1519 + - h5repack now handles group creation order. PVN - 2009/4/2 - 1402 + - h5repack: When user doesn't specify a chunk size, h5repack now + defines a default chunk size as the same size of the size of the + hyperslab used to read the chunks. The size of the hyperslabs are + defined as the size of each dimension or a predefined constant, + whatever is smaller. This assures that the chunk read fits in the + chunk cache. PVN - 2008/11/21 + + High-Level APIs + --------------- + - Table: In version 3.0 of Table, the writing of the "NROWS" attribute + (used to store number of records) was deprecated. PVN - 2008/11/24 + + F90 API + ------- + - Added for the C APIs the Fortran wrappers: + h5dget_access_plist_f + h5iis_valid_f + h5pset_chunk_cache_f + h5pget_chunk_cache_f + MSB - 2009/04/17 + + C++ API + ------- + - None + + +Support for New Platforms, Languages, and Compilers +=================================================== + + +Bug Fixes since HDF5-1.8.2 +========================== + + Configuration + ------------- + - The --includedir=DIR configuration option now works as intended, and + can be used to specify the location to install C header files. The + default location remains unchanged, residing at ${prefix}/include. + MAM - 2009/03/10 - BZ #1381 + - Configure no longer removes the '-g' flag from CFLAGS when in production + mode if it has been explicitly set in the CFLAGS environment variable + prior to configuration. MAM - 2009/03/09 - BZ #1401 + + Library + ------- + - Added versioning to H5Z_class_t struct to allow compatibility with 1.6 + API. NAF - 2009/04/20 - 1533 + - Fixed a problem with using data transforms with non-native types in the + file. NAF - 2009/04/20 - 1548 + - Added direct.h include file to windows section of H5private.h + to fix _getcwd() warning. ADB - 2009/04/14 - 1536 + - Fixed a bug that prevented external links from working after calling + H5close(). NAF - 2009/04/10 - 1539 + - Modified library to write cached symbol table information to the + superblock, to allow library versions 1.3.0 to 1.6.3 to read files created + by this version. NAF - 2009/04/08 - 1423 + - Changed skip lists to use a deterministic algorithm. The library should + now never call rand() or srand(). NAF - 2009/04/08 - 503 + - Fixed a bug where H5Lcopy and H5Lmove wouldn't create intermediate groups + when that property was set. NAF - 2009/04/07 - 1526 + - Fixed a bug that caused files with a user block to grow by the size of the + user block every time they were opened. NAF - 2009/03/26 - 1499 + - Fixed a rare problem that could occur with files using the old (pre 1.4) + array datatype. NAF - 2009/03/23 + - Modified library to be able to open files with corrupt root group symbol + table messages, and correct these errors if they are found. Such files + can only be successfully opened with write access. NAF - 2009/03/23 - 1189 + - Removed the long_long #define and replaced all instances with + "long long". This caused problems with third party products. All + currently supported compliers support the type. ADB - 2009/03/05 + - Fixed various bugs that could prevent the fill value from being written + in certain rare cases. NAF - 2009/02/26 - 1469 + - Fixed a bug that prevented more than one dataset chunk from being cached + at a time. NAF - 2009/02/12 - 1015 + - Fixed an assertion failure caused by opening an attribute multiple times + through multiple file handles. NAF - 2009/02/12 - 1420 + - Fixed a problem that could prevent the user from adding attributes (or any + object header message) in some circumstances. NAF - 2009/02/12 - 1427 + - Fixed a bug that could cause problems when an attribute was added to a + committed datatype using the committed datatype's datatype. + NAF - 2009/02/12 + - Fixed a bug that could cause problems when copying an object with a shared + message in its own object header. NAF - 2009/01/29 + - Changed H5Tset_order to properly reject H5T_ORDER_NONE for most datatypes. + NAF - 2009/01/27 - 1443 + - Fixed a bug where H5Tpack wouldn't remove trailing space from an otherwise + packed compound type. NAF - 2009/01/14 + - Fixed up some old v2 btree assertions that get run in debug mode that + were previously failing on compilation, and removed some of the + more heavily outdated and non-rewritable ones. MAM - 2008/12/15 + - Fixed a bug that could cause problems when "automatically" unmounting + multiple files. NAF - 2008/11/17 + - H5Dset_extent: when shrinking dimensions, some chunks were not deleted. + PVN - 2009/01/8 + + Parallel Library + ---------------- + - None + + Tools + ----- + - Fixed many problems that could occur when using h5repack with named + datatypes. NAF - 2009/4/20 - 1516/1466 + - h5dump, h5diff, h5repack were not reading (by hyperslabs) datasets + that have a datatype datum size greater than H5TOOLS_BUFSIZE, a constant + defined as 1024Kb, such as array types with large dimensions. + PVN - 2009/4/1 - 1501 + - h5import: By selecting a compression type, a big endian byte order + was being selected. PVN - 2009/3/11 - 1462 + - zip_perf.c had missing argument on one of the open() calls. Fixed. + AKC - 2008/12/9 + + F90 API + ------ + - None + + C++ API + ------ + - None + + High-Level APIs: + ------ + - Dimension scales: The scale index return value in H5DSiterate_scales + was not always incremented. PVN - 2009/4/8 - 1538 + + Fortran High-Level APIs: + ------ + - Lite: The h5ltget_dataset_info_f function (gets information about + a dataset) was not correctly returning the dimension array + PVN - 2009/3/23 + + +Platforms Tested +================ +The following platforms and compilers have been tested for this release. + + AIX 5.3 xlc 7.0.0.8 + (LLNL Up) xlf 09.01.0000.0008 + xlC 7.0.0.8 + mpcc_r 7.0.0.8 + mpxlf_r 09.01.0000.0008 + + Cray XT3 (2.0.41) cc (pgcc) 7.1-4 + (SNL red storm) ftn (pgf90) 7.1-4 + CC (pgCC) 7.1-4 + + FreeBSD 6.3-STABLE i386 gcc 3.4.6 [FreeBSD] 20060305 + (duty) g++ 3.4.6 [FreeBSD] 20060305 + gcc 4.3.4 20090419 + g++ 4.3.4 20090419 + gfortran 4.3.4 20090419 + + FreeBSD 6.3-STABLE amd64 gcc 3.4.6 [FreeBSD] 20060305 + (liberty) g++ 3.4.6 [FreeBSD] 20060305 + gcc 4.4.1 20090421 + g++ 4.4.1 20090421 + gfortran 4.4.1 20090421 + + IRIX64 6.5 (64 & n32) MIPSpro cc 7.4.4m + F90 MIPSpro 7.4.4m + C++ MIPSpro cc 7.4.4m + + Linux 2.6.18-128.1.6.el5xen gcc (GCC) 4.1.2 + #1 SMP i686 i686 i386 G95 (GCC 4.0.3 (g95 0.92!) Feb 4 2009) + (jam) PGI C, Fortran, C++ 7.2-1 32-bit + PGI C, Fortran, C++ 8.0-1 32-bit + Intel(R) C Compiler for 32-bit + applications, Versions 10.1, 11.0 + Intel(R) C++ Compiler for 32-bit + applications, Version 10.1, 11.0 + Intel(R) Fortran Compiler for 32-bit + applications, Version 10.1, 11.0 + Absoft 32-bit Fortran 95 10.0.7 + MPICH mpich2-1.0.8 compiled with + gcc 4.1.2 and G95 (GCC 4.0.3 (g95 0.92!) + + Linux 2.6.9-42.0.10.ELsmp #1 gcc (GCC) 3.4.6 + SMP i686 i686 i386 G95 (GCC 4.0.3 (g95 0.92!) Feb 4 2009) + (kagiso) MPICH mpich2-1.0.8 compiled with + gcc 3.4.6 and G95 (GCC 4.0.3 (g95 0.92!) + + Linux 2.6.16.60-0.37-smp #1 gcc 4.1.2 + SMP x86_64 GNU/Linux G95 (GCC 4.0.3 (g95 0.92!) Feb 4 2009) + (smirom) Intel(R) C, C++, Fortran Compilers for + applications running on Intel(R) 64, + Versions 10.1, 11.0. + PGI C, Fortran, C++ Version 7.2-1, 8.0-1 + for 64-bit target on x86-64 + gcc 4.1.2 and G95 (GCC 4.0.3 (g95 0.92!) + MPICH mpich2-1.0.8 compiled with + gcc 4.1.2 and G95 (GCC 4.0.3 (g95 0.92!) + tested for both 32- and 64-bit binaries + + Linux 2.6.16.54-0.2.5 #1 Intel(R) C++ Version 10.1.017 + SGI Altix SMP ia64 Intel(R) Fortran Itanium(R) Version 10.1.017 + (cobalt) SGI MPI 1.38 + + SunOS 5.10 32- and 64-bit Sun WorkShop 6 update 2 C 5.9 Patch 124867-09 + (linew) Sun WorkShop 6 update 2 Fortran 95 8.3 + Patch 127000-07 + Sun WorkShop 6 update 2 C++ 5.8 + Patch 124863-11 + + Intel Xeon Linux 2.6.18- gcc 3.4.6 20060404 + 92.1.10.el5_lustre.1.6.6smp- Intel(R) C++ Version 10.0.026 + perfctr #2 SMP Intel(R) Fortran Compiler Version 10.0.026 + (abe) Open MPI 1.2.2 + MVAPICH2-0.9.8p28p2patched-intel-ofed-1.2 + compiled with icc v10.0.026 and ifort 10.0.026 + + IA-64 Linux 2.4.21-309.tg1 gcc (GCC) 3.2.2 + #1 SMP ia64 Intel(R) C++ Version 8.1.037 + (NCSA tg-login) Intel(R) Fortran Compiler Version 8.1.033 + mpich-gm-1.2.7p1..16-intel-8.1.037-r1 + + Linux 2.6.9-55.0.9.EL_lustre Intel(R) C, C++, Fortran Compilers for + .1.4.11.1smp #1 SMP applications running on Intel(R) 64, + SMP x86_64 GNU/Linux Versions 9.1. + (SNL Spirit) + + Linux 2.6.9-55.0.9.EL_lustre Intel(R) C, C++, Fortran Compilers for + .1.4.11.1smp #1 SMP applications running on Intel(R) 64, + SMP x86_64 GNU/Linux Versions 10.1. + (SNL Thunderbird) + + Linux 2.6.18-63chaos #1 SMP Intel(R) C, C++, Fortran Compilers for + SMP x86_64 GNU/Linux applications running on Intel(R) 64, + (SNL Glory) Versions 10.1. + + Linux 2.6.18-63chaos #1 SMP Intel(R) C, C++, Fortran Compilers for + SMP x86_64 GNU/Linux applications running on Intel(R) 64, + (LLNL Zeus) Versions 9.1. + gcc/gfortran/g++ (GCC) 4.1.2. + + Windows XP Visual Studio .NET + Visual Studio 2005 w/ Intel Fortran 9.1 + Cygwin(native gcc compiler and g95) + + Windows XP x64 Visual Studio 2005 w/ Intel Fortran 9.1 + + Windows Vista Visual Studio 2005 + + MAC OS 10.5.6 (Intel) i686-apple-darwin9-gcc-4.0.1 (GCC) 4.0.1 + GNU Fortran (GCC) 4.3.0 20070810 + G95 (GCC 4.0.3 (g95 0.91!) Apr 24 2008) + Intel C, C++ and Fortran compilers 10.1 + + +Supported Configuration Features Summary +======================================== + + In the tables below + y = tested and supported + n = not supported or not tested in this release + C = Cluster + W = Workstation + x = not working in this release + dna = does not apply + ( ) = footnote appears below second table + = testing incomplete on this feature or platform + +Platform C F90 F90 C++ zlib SZIP + parallel parallel +Solaris2.10 32-bit n y n y y y +Solaris2.10 64-bit n y n y y y +IRIX64_6.5 32-bit n n n n y y +IRIX64_6.5 64-bit n y y y y y +Windows XP n y(4) n(4) y y y +Windows XP x64 n y(4) n(4) y y y +Windows Vista n n n y y y +Mac OS X 10.5 Intel n y n y y y +AIX 5.3 32- and 64-bit n y n y y n +FreeBSD 6.3-STABLE 32&64 bit n y n y y y +RedHat EL4 2.6.9-42 i686 GNU (1) W y y y y y y +RedHat EL5 2.6.18-128 i686 GNU (1)W y y(2) y y y y +RedHat EL5 2.6.18-128 i686 Intel W n y n y y n +RedHat EL5 2.6.18-128 i686 PGI W n y n y y n +SuSe Linux 2.6.16 x86_64 GNU (1) W y y(3) y y y y +SuSe Linux 2.6.16 x86_64 Intel W n y n y y n +SuSe Linux 2.6.16 x86_64 PGI W n y n y y y +SuSe Linux 2.6.16 SGI Altix ia64 C y y y y y y +RedHat EL4 2.6.18 Xeon Lustre C y y y y y n +SuSe Linux 2.4.21 ia64 Intel C y y y y y n +Cray XT3 2.0.41 y y y y y n + + +Platform Shared Shared Shared Thread- + C libs F90 libs C++ libs safe +Solaris2.10 32-bit y y y y +Solaris2.10 64-bit y y y y +IRIX64_6.5 32-bit y dna y y +IRIX64_6.5 64-bit y y n y +Windows XP y y(4) y y +Windows XP x64 y y(4) y y +Windows Vista y n n y +Mac OS X 10.5 y n y n +AIX 5.3 32- and 64-bit n n n n +FreeBSD 6.3-STABLE 32&64 bit y n y y +RedHat EL4 2.6.9-42 i686 GNU (1) W y y y y +RedHat EL5 2.6.18-128 i686 GNU (1)W y y(2) y y +RedHat EL5 2.6.18-128 i686 Intel W y y y n +RedHat EL5 2.6.18-128 i686 PGI W y y y n +SuSe Linux 2.6.16 x86_64 GNU (1) W y y y y +SuSe Linux 2.6.16 x86_64 Intel W y y y n +SuSe Linux 2.6.16 x86_64 PGI W y y y n +SuSe Linux 2.6.16 SGI Altix ia64 C y n +RedHat EL4 2.6.18 Xeon Lustre C y y y n +SuSe Linux 2.4.21 ia64 Intel C y y y n +Cray XT3 2.0.41 n n n n + + (1) Fortran compiled with g95. + (2) With PGI and Absoft compilers. + (3) With PGI compiler for Fortran. + (4) Using Visual Studio 2005 or Cygwin + Compiler versions for each platform are listed in the preceding + "Platforms Tested" table. + + +Known Problems +============== +* Parallel tests failed with 16 processes with data inconsistency at testphdf5 + / dataset_readAll. Parallel tests also failed with 32 and 64 processes with + collective abort of all ranks at t_posix_compliant / allwrite_allread_blocks + with MPI IO. CMC - 2009/04/28 + +* There is a known issue in which HDF5 will change the timestamp on a file + simply by opening it with read/write permissions, even if the file is not + modified in any way. This is due to the way in which HDF5 manages the file + superblock. A fix is currently underway and should be included in the 1.8.4 + release of HDF5. MAM - 2009/04/28 + +* For gcc v4.3 and v4.4, with production mode, if -O3 is used, H5Tinit.c + would fail to compile. Actually bad H5Tinit.c is produced. If -O (same + as -O1) is used, H5Tinit.c compiled okay but test/dt_arith would fail. + When -O0 (no optimizatio) is used, H5Tinit.c compilete okay and all + tests passed. Therefore, -O0 is imposed for v4.3 and v4.4 of gcc. + AKC - 2009/04/20 + +* For Red Storm, a Cray XT3 system, the tools/h5ls/testh5ls.sh and + tools/h5copy/testh5copy.sh will fail some of its sub-tests. These sub-tests + are expected to fail and should exit with a non-zero code but the yod + command does not propagate the exit code of the executables. Yod always + returns 0 if it can launch the executable. The test suite shell expects + a non-zero for this particular test, therefore it concludes the test has + failed when it receives 0 from yod. Skip all the "failing" test for now + by changing them as following. + + ======== Original tools/h5ls/testh5ls.sh ========= + TOOLTEST tgroup-1.ls 1 -w80 -r -g tgroup.h5 + ======== Change to =============================== + echo SKIP TOOLTEST tgroup-1.ls 1 -w80 -r -g tgroup.h5 + ================================================== + + ======== Original tools/h5copy/testh5copy.sh ========= + TOOLTEST_FAIL -i $TESTFILE -o $FILEOUT -v -s grp_dsets -d grp_rename + TOOLTEST_FAIL -i $TESTFILE -o $FILEOUT -v -s grp_dsets -d /grp_rename/grp_dsets + TOOLTEST_FAIL -i $TESTFILE -o $FILEOUT -vp -s /grp_dsets -d /E/F/grp_dsets + TOOLTEST_FAIL -i $TESTFILE -o $FILEOUT -vp -s /grp_nested -d /G/H/grp_nested + H5LSTEST $FILEOUT + ======== Change to =============================== + echo SKIP TOOLTEST_FAIL -i $TESTFILE -o $FILEOUT -v -s grp_dsets -d grp_rename + echo SKIP TOOLTEST_FAIL -i $TESTFILE -o $FILEOUT -v -s grp_dsets -d /grp_rename/grp_dsets + echo SKIP TOOLTEST_FAIL -i $TESTFILE -o $FILEOUT -vp -s /grp_dsets -d /E/F/grp_dsets + echo SKIP TOOLTEST_FAIL -i $TESTFILE -o $FILEOUT -vp -s /grp_nested -d /G/H/grp_nested + echo SKIP H5LSTEST $FILEOUT + ================================================== + AKC - 2008/11/10 + +* For Red Storm, a Cray XT3 system, the yod command sometimes gives the + message, "yod allocation delayed for node recovery". This interferes with + test suites that do not expect seeing this message. See the section of "Red + Storm" in file INSTALL_parallel for a way to deal with this problem. + AKC - 2008/05/28 + +* We have discovered two problems when running collective IO parallel HDF5 + tests with chunking storage on the ChaMPIon MPI compiler on tungsten, a + Linux cluster at NCSA. + + Under some complex selection cases: + 1) MPI_Get_element returns the wrong value. + 2) MPI_Type_struct also generates the wrong derived datatype and corrupt + data may be generated. + These issues arise only when turning on collective IO with chunking storage + with some complex selections. We have not found these problems on other + MPI-IO compilers. If you encounter these problems, you may use independent + IO instead. + + To avoid this behavior, change the following line in your code + H5Pset_dxpl_mpio(xfer_plist, H5FD_MPIO_COLLECTIVE); + to + H5Pset_dxpl_mpio(xfer_plist, H5FD_MPIO_INDEPENDENT); + KY - 2007/08/24 + +* On Intel 64 Linux cluster (RH 4, Linux 2.6.9) with Intel 10.0 compilers, + use -mp -O1 compilation flags to build the libraries. A higher level of + optimization causes failures in several HDF5 library tests. + +* For LLNL, uP: both serial and parallel tests pass. + Zeus: Serial tests pass but parallel tests fail with a known problem in MPI. + ubgl: Serial tests pass but parallel tests fail. + +* On mpich 1.2.5 and 1.2.6, if more than two processes contribute no IO and + the application asks to do collective IO, we have found that when using 4 + processors, a simple collective write will sometimes be hung. This can be + verified with t_mpi test under testpar. + +* On IRIX6.5, when the C compiler version is greater than 7.4, complicated + MPI derived datatype code will work. However, the user should increase + the value of the MPI_TYPE_MAX environment variable to some appropriate value + to use collective irregular selection code. For example, the current + parallel HDF5 test needs to raise MPI_TYPE_MAX to 200,000 to pass the test. + +* A dataset created or rewritten with a v1.6.3 library or after cannot be read + with the v1.6.2 library or before when the Fletcher32 EDC filter is enabled. + There was a bug in the calculation of the Fletcher32 checksum in the + library before v1.6.3; the checksum value was not consistent between big- + endian and little-endian systems. This bug was fixed in Release 1.6.3. + However, after fixing the bug, the checksum value was no longer the same as + before on little-endian system. Library releases after 1.6.4 can still read + datasets created or rewritten with an HDF5 library of v1.6.2 or before. + SLU - 2005/6/30 + +* On IBM AIX systems, parallel HDF5 mode will fail some tests with error + messages like "INFO: 0031-XXX ...". This is from the command `poe'. + Set the environment variable MP_INFOLEVEL to 0 to minimize the messages + and run the tests again. + + The tests may fail with messages like "The socket name is already in use", + but HDF5 does not use sockets. This failure is due to problems with the + poe command trying to set up the debug socket. To resolve this problem, + check to see whether there are many old /tmp/s.pedb.* files staying around. + These are sockets used by the poe command and left behind due to failed + commands. First, ask your system administrator to clean them out. + Lastly, request IBM to provide a means to run poe without the debug socket. + +* The --enable-static-exec configure flag fails to compile for Solaris + platforms. This is due to the fact that not all of the system libraries on + Solaris are available in a static format. + + The --enable-static-exec configure flag also fails to correctly compile + on IBM SP2 platforms for serial mode. The parallel mode works fine with + this option. + + It is suggested that you do not use this option on these platforms + during configuration. + +* There is also a configure error on Altix machines that incorrectly reports + when a version of Szip without an encoder is being used. + +* Information about building with PGI and Intel compilers is available in + the INSTALL file sections 4.7 and 4.8. + + +%%%%1.8.2%%%% + + +HDF5 version 1.8.2 released on Mon Nov 10 15:43:09 CST 2008 +================================================================================ + +INTRODUCTION +============ + +This document describes the differences between HDF5-1.8.1 and HDF5 1.8.2, +and contains information on the platforms tested and known problems in +HDF5-1.8.2. For more details, see the files HISTORY-1_0-1_8_0_rc3.txt +and HISTORY-1_8.txt in the release_docs/ directory of the HDF5 source. + +Links to the HDF5 1.8.2 source code, documentation, and additional materials +can be found on the HDF5 web page at: + + http://www.hdfgroup.org/products/hdf5/ + +The HDF5 1.8.2 release can be obtained from: + + http://www.hdfgroup.org/HDF5/release/obtain5.html + +User documentation for 1.8.2 can be accessed directly at this location: + + http://www.hdfgroup.org/HDF5/doc/ + +New features in the HDF5-1.8.x release series, including brief general +descriptions of some new and modified APIs, are described in the "What's New +in 1.8.0?" document: + + http://www.hdfgroup.org/HDF5/doc/ADGuide/WhatsNew180.html + +All new and modified APIs are listed in detail in the "HDF5 Software Changes +from Release to Release" document, in the section "Release 1.8.2 (current +release) versus Release 1.8.1": + + http://www.hdfgroup.org/HDF5/doc/ADGuide/Changes.html + +If you have any questions or comments, please send them to the HDF Help Desk: + + help@hdfgroup.org + + +CONTENTS +======== + +- New Features +- Support for new platforms and languages +- Bug Fixes since HDF5-1.8.1 +- Platforms Tested +- Supported Configuration Features Summary +- Known Problems + + +New Features +============ + + Configuration + ------------- + - Upgraded libtool to version 2.2.6a. (MAM - 2008/10/15). + + Library + ------- + - Added two new public routines: H5Pget_elink_fapl() and + H5Pset_elink_fapl(). (see bug #1247) (VC - 2008/10/13) + - Improved free space tracking in file to be faster. (QAK - 2008/10/06) + - Added 'mounted' field to H5G_info_t struct. (QAK - 2008/07/15) + + Parallel Library + ---------------- + - None + + Tools + ----- + - h5repack: added new options -u and -b to add a userblock to an HDF5 + file during the repack. (PVN - 2008/08/26) + - h5repack: added options -t and -a to call H5Pset_alignment while + creating a repacked file. (PVN - 2008/08/29) + - h5ls: added capability to traverse through external links when the -r + (recursive) flag is given. (NAF - 2008/09/16) + - h5ls: added -E option to enable traversal of external links. + h5ls will not traverse external links without this flag being set. + (NAF - 2008/10/06) + - h5dump: when -b flag is used without a keyword after it, binary + output defaults to NATIVE. MEMORY keyword was deprecated + and replaced by NATIVE keyword. (PVN - 2008/10/30) + - h5diff: returns 1 when file graphs differ by any object. + Error return code was changed to 2 from -1. (PVN - 2008/10/30) + - h5import: TEXTFPE (scientific format) was deprecated. Use TEXTFP + instead (PVN - 2008/10/30) + + + + F90 API + ------ + - Added optional parameter 'mounted' to H5Gget_info_f, + H5Gget_info_by_idx_f, H5Gget_info_by_name_f (MSB - 2008/09/24) + - Added H5Tget_native_type_f (MSB - 2008/09/30) + + + C++ API + ------ + - These member functions were added as wrapper for H5Rdereference to + replace the incorrect IdComponent::dereference(). + void H5Object::dereference(H5Object& obj, void* ref, + H5R_type_t ref_type=H5R_OBJECT) + void H5Object::dereference(H5File& h5file, void* ref, + H5R_type_t ref_type=H5R_OBJECT) + void H5Object::dereference(Attribute& obj, void* ref, + H5R_type_t ref_type=H5R_OBJECT) + + In addition, these constructors were added to create the associated + objects by way of dereference: + DataSet(H5Object& obj, void* ref, H5R_type_t ref_type=H5R_OBJECT) + DataSet(H5File& file, void* ref, H5R_type_t ref_type=H5R_OBJECT) + DataSet(Attribute& attr, void* ref, H5R_type_t ref_type=H5R_OBJECT) + Group(H5Object& obj, void* ref, H5R_type_t ref_type=H5R_OBJECT) + Group(H5File& obj, void* ref, H5R_type_t ref_type=H5R_OBJECT) + Group(Attribute& attr, void* ref, H5R_type_t ref_type=H5R_OBJECT) + DataType(H5Object& obj, void* ref, H5R_type_t ref_type=H5R_OBJECT) + DataType(H5File& file, void* ref, H5R_type_t ref_type=H5R_OBJECT) + DataType(Attribute& attr, void* ref, H5R_type_t ref_type=H5R_OBJECT) + (BMR - 2008/10/29) + + +Support for New Platforms, Languages, and Compilers +=================================================== + - Intel 10.1 is supported on Mac OS X 10.5.4. + Note: + When Fortran is enabled, configure automatically + disables the build of shared libraries (i.e., only + static C and C++ HDF5 libraries will be built + along with the static HDF5 Fortran library). + Intel 10.1 C and C++ compilers require + "-no-multibyte-chars" compilation flag due to the known + bug in the compilers. + (EIP - 2008/10/30) + + +Bug Fixes since HDF5-1.8.1 +========================== + + Configuration + ------------- + - Fixed error with 'make check install' failing due to h5dump + needing other tools built first. (MAM - 2008/10/15). + - When using shared szip, it is no longer necessary to specify + the path to the shared szip libraries in LD_LIBRARY_PATH. + (MAM - 2008/10/15). + - The file libhdf5_fortran.settings is not installed since its content + is included in libhdf5.settings now. (AKC - 2008/10/21) + - "make DESTDIR=xxx install" failed to install some tools and files + (e.g., h5cc and fortran modules). Fixed. (AKC - 2008/10/8). + + Library + ------- + - H5Ovisit and H5Ovisit_by_name will now properly terminate when the + callback function returns a positive value on the starting object. + (NAF - 2008/11/03) + - Fixed an error where a null message could be created that was larger + than could be written to the file. (NAF - 2008/10/23) + - Corrected error with family/split/multi VFD not updating driver info + when "latest" version of the file format used. (QAK - 2008/10/14) + - Corrected alignment+threshold errors to work correctly when metadata + aggregation is enabled. (QAK - 2008/10/06) + - Changed H5Fget_obj_count and H5Fget_obj_ids to ignore objects + registered by the library for internal library use. + (NAF - 2008/10/06) + - Fixed potential memory leak during compound conversion. + (NAF - 2008/10/06) + - Changed the return value of H5Fget_obj_count from INT to SSIZE_T. + Also changed the return value of H5Fget_obj_ids from HERR_T to + SSIZE_T and the type of the parameter MAX_OBJS from INT to SIZE_T. + (SLU - 2008/09/26) + - Fixed an issue that could cause data to be improperly overwritten + during compound type conversion. (NAF - 2008/09/19) + - Fixed pointer alignment violations that could occur during vlen + conversion. (NAF - 2008/09/16) + - Fixed problem where library could cause a segmentation fault when + an invalid location ID was given to H5Giterate(). (QAK - 2008/08/19) + - Fixed improper shutdown when objects have reference count > 1. The + library now tracks reference count due to the application separately + from that due to internal library routines. (NAF - 2008/08/19) + - Fixed assertion failure caused by incorrect array datatype version. + (NAF - 2008/08/08) + - Fixed an issue where mount point traversal would fail when using + multiple handles for the child. (NAF - 2008/08/07) + - Fixed an issue where mount points were inaccessible when using + multiple file handles for the parent. The mount table is now in + the shared file structure (the parent pointer is still in the + top structure). (NAF - 2008/08/07) + - Fixed assertion failure caused by incorrect array datatype version. + (NAF - 2008/08/04) + - Fixed issue where a group could have a file mounted on it twice. + (QAK - 2008/07/15) + - When an attribute was opened twice and data was written with + one of the handles, the file didn't have the data. It happened + because each handle had its own object structure, and the empty + one overwrote the data with fill value. This is fixed by making + some attribute information like the data be shared in the + attribute structure. (SLU - 2008/07/07) + - Fixed a Windows-specific issue in the ohdr test which was causing + users in some timezones to get false errors. This a deficiency in + the Windows mktime() function, and has been handled properly. + (SJW - 2008/06/19) + + Parallel Library + ---------------- + - None + + Tools + ----- + - h5dump now checks for uniqueness of committed datatypes. + (NAF - 2008/10/15) + - Fixed unnecessary indentation of committed datatypes in h5dump. + (NAF - 2008/10/15) + - Fixed bugs in h5stat: segmemtation fault when printing groups and + print warning message when traversal of objects is unsuccessful. + (see bug #1253) (VC- 2008/10/13) + - Fixed bug in h5ls that prevented relative group listings (like + "h5ls foo.h5/bar") from working correctly (QAK - 2008/06/03) + - h5dump: when doing binary output (-b), the stdout printing of + attributes was done incorrectly. Removed printing of attributes + when doing binary output. (PVN - 2008/06/05) + + + F90 API + ------ + - h5sselect_elements_f: Added additional operators H5S_SELECT_APPEND + and H5S_SELECT_PREPEND (MSB - 2008/09/30) + - h5sget_select_elem_pointlist: Fixed list of returned points by + rearranging the point list correctly by accounting for C + conventions. (MSB - 2008/09/30) + - h5sget_select_hyper_blocklist_f: Fixed error in transposed dimension + of arrays.(MSB - 2008/9/30) + - h5sget_select_bounds_f: Swapped array bounds to account for C and + Fortran reversed array notation (MSB - 2008/9/30) + - Changed to initializing string to a blank character instead of a + null type in tH5P.f90 to fix compiling error using AIX 5.3.0 + (MSB - 2008/7/29) + - Fixed missing commas in H5test_kind.f90 detected by NAG compiler + (MSB - 2008/7/29) + - Fixed passing and array to a scalar in tH5A_1_8.f90 detected by + NAG compiler (MSB - 2008/7/29) + - Added the ability of the test programs to use the status of + HDF5_NOCLEANUP to determine if the *.h5 files should be removed + or not after the tests are completed (MSB - 2008/10/1) + - In nh5tget_offset_c: (MSB 9/12/2008) + If offset was equal to 0 it returned the error code of -1, + this was changed to return an error code of -1 when the offset + value is < 0. + - Uses intrinsic Fortran function SIZEOF if available when detecting + type of INTEGERs and REALs in H5test_kind.f90 (MSB - 2008/9/3) + - Put the DOUBLE PRECISION interfaces in a separate module and + added a USE statement for the module. The interfaces are + included/excluded depending on the state of FORTRAN_DEFAULT_REAL + is DBLE_F which detects if the default REAL is DOUBLE PRECISION. + This allows the library to be compiled with -r8 Fortran flag + without the user needing to edit the source code. + (MSB - 200/8/27) + - Enable building shared library for fortran by adding the flag -fPIC + to the compile flags for versions of Intel Fortran compiler >=9 + (MSB - 2008/8/26) + + C++ API + ------ + - Fixed a design bug which allowed an Attribute object to create/modify + attributes (bugzilla #1068). The API class hierarchy was revised + to address the problem. Classes AbstractDS and Attribute are moved + out of H5Object. Class Attribute now multiply inherits from + IdComponent and AbstractDs and class DataSet from H5Object and + AbstractDs. In addition, the data member IdComponent::id was + moved into subclasses: Attribute, DataSet, DataSpace, DataType, + H5File, Group, and PropList. (BMR - 2008/05/20) + - IdComponent::dereference was incorrect and replaced as described + in "New Features" section. + (BMR - 2008/10/29) + + +Platforms Tested +================ +The following platforms and compilers have been tested for this release. + + AIX 5.3 xlc 7.0.0.8 + xlf 09.01.0000.0008 + xlC 7.0.0.8 + mpcc_r 7.0.0.8 + mpxlf_r 09.01.0000.0008 + + Cray XT3 (2.0.41) cc (pgcc) 7.1-4 + (red storm) ftn (pgf90) 7.1-4 + CC (pgCC) 7.1-4 + + FreeBSD 6.3-STABLE i386 gcc 3.4.6 [FreeBSD] 20060305 + (duty) g++ 3.4.6 [FreeBSD] 20060305 + gcc 4.2.5 20080702 + g++ 4.2.5 20080702 + gfortran 4.2.5 20080702 + + FreeBSD 6.3-STABLE amd64 gcc 3.4.6 [FreeBSD] 20060305 + (liberty) g++ 3.4.6 [FreeBSD] 20060305 + gcc 4.2.5 20080702 + g++ 4.2.5 20080702 + gfortran 4.2.5 20080702 + + IRIX64 6.5 (64 & n32) MIPSpro cc 7.4.4m + F90 MIPSpro 7.4.4m + C++ MIPSpro cc 7.4.4m + + Linux 2.6.9-42.0.10.ELsmp #1 gcc (GCC) 3.4.6 + SMP i686 i386 G95 (GCC 4.0.3 (g95 0.92!) April 18 2007) + (kagiso) PGI C, Fortran, C++ 7.2-1 32-bit + Intel(R) C Compiler for 32-bit + applications, Version 10.1 + Intel(R) C++ Compiler for 32-bit + applications, Version 10.1 + Intel(R) Fortran Compiler for 32-bit + applications, Version 10.1 + Absoft 32-bit Fortran 95 10.0.4 + MPICH mpich-1.2.7 compiled with + gcc 3.4.6 and G95 (GCC 4.0.3 (g95 0.92!) + MPICH mpich2-1.0.6p1 compiled with + gcc 3.4.6 and G95 (GCC 4.0.3 (g95 0.92!) + + Linux 2.6.16.46-0.14-smp #1 Intel(R) C++ for Intel(R) EM64T + SMP x86_64 GNU/Linux Ver. 10.1.013 + (smirom) Intel(R) Fortran Intel(R) EM64T + Ver. 10.1.013 + PGI C, Fortran, C++ Version 7.2-1 + for 64-bit target on x86-64 + MPICH mpich-1.2.7 compiled with + gcc 4.1.2 and G95 (GCC 4.0.3 (g95 0.92!) + MPICH mpich2-1.0.7 compiled with + gcc 4.1.2 and G95 (GCC 4.0.3 (g95 0.92!) + tested for both 32- and 64-bit binaries + + Linux 2.6.16.54-0.2.5 #1 Intel(R) C++ Version 10.1.017 + Altix SMP ia64 Intel(R) Fortran Itanium(R) Version 10.1.017 + (cobalt) SGI MPI 1.16 + + SunOS 5.10 32- and 64-bit Sun WorkShop 6 update 2 C 5.8 + (linew) Sun WorkShop 6 update 2 Fortran 95 8.2 + Sun WorkShop 6 update 2 C++ 5.8 + Patch 121019-06 + + Xeon Linux 2.6.9-42.0.10.EL_lustre-1.4.10.1smp + (abe) Intel(R) C++ Version 10.0.026 + Intel(R) Fortran Compiler Version 10.0.026 + Open MPI 1.2.2 + MVAPICH2-0.9.8p28p2patched-intel-ofed-1.2 + compiled with icc v10.0.026 and + ifort 10.0.026 + + IA-64 Linux 2.4.21-309.tg1 #1 SMP + ia64 gcc (GCC) 3.2.2 + (NCSA tg-login) Intel(R) C++ Version 8.1.037 + Intel(R) Fortran Compiler Version 8.1.033 + mpich-gm-1.2.7p1..16-intel-8.1.037-r1 + + Intel 64 Linux 2.6.9-42.0.10.EL_lustre-1.4.10.1smp + (abe) gcc 3.4.6 20060404 + Intel(R) C++ Version 10.0 + Intel (R) Fortran Compiler Version 10.0 + mvapich2-0.9.8p2patched-intel-ofed-1.2 + + Windows XP Visual Studio .NET + Visual Studio 2005 w/ Intel Fortran 9.1 + Cygwin(native gcc compiler and g95) + + Windows XP x64 Visual Studio 2005 w/ Intel Fortran 9.1 + + Windows Vista Visual Studio 2005 + + MAC OS 10.5.4 (Intel) i686-apple-darwin9-gcc-4.0.1 (GCC) 4.0.1 + GNU Fortran (GCC) 4.3.0 20070810 + G95 (GCC 4.0.3 (g95 0.91!) Apr 24 2008) + Intel C, C++ and Fortran compilers 10.1 + + +Supported Configuration Features Summary +======================================== + + In the tables below + y = tested and supported + n = not supported or not tested in this release + x = not working in this release + dna = does not apply + ( ) = footnote appears below second table + = testing incomplete on this feature or platform + +Platform C F90 F90 C++ zlib SZIP + parallel parallel +Solaris2.10 32-bit n y n y y y +Solaris2.10 64-bit n y n y y y +IRIX64_6.5 32-bit n n n n y y +IRIX64_6.5 64-bit n y y y y y +Windows XP n y(15) n(15) y y y +Windows XP x64 n y(15) n(15) y y y +Windows Vista n n n y y y +Mac OS X 10.5 Intel n y n y y y +AIX 5.3 32- and 64-bit n y n y y n +FreeBSD 6.3-STABLE +32&64 bit n y n y y y +RedHat EL4 (3) W y(1) y(10) y(1) y y y +RedHat EL4 Intel (3) W n y n y y n +RedHat EL4 PGI (3) W n y n y y n +SuSe x86_64 gcc(3,12) W y(2) y(11) y(2) y y y +SuSe x86_64 Int(3,12) W n y(13) n y y n +SuSe x86_64 PGI(3,12) W n y(8) n y y y +Linux 2.6 SuSE ia64 C + Intel (3,7) y y y y y n +Linux 2.6 SGI Altix + ia64 Intel (3) y y y y y y +Linux 2.6 RHEL C + Lustre Intel (5) y(4) y y(4) y y n +Cray XT3 2.0.41 y y y y y n + + +Platform Shared Shared Shared Thread- + C libs F90 libs C++ libs safe +Solaris2.10 32-bit y y y y +Solaris2.10 64-bit y y y y +IRIX64_6.5 32-bit y dna y y +IRIX64_6.5 64-bit y y n y +Windows XP y y(15) y y +Windows XP x64 y y(15) y y +Windows Vista y n n y +Mac OS X 10.5 y n y n +AIX 5.3 32- and 64-bit n n n n +FreeBSD 6.2 32&64 bit y n y y +RedHat EL4 (3) W y y(10) y y +RedHat EL4 Intel (3) W y y y n +RedHat EL4 PGI (3) W y y y n +SuSe x86_64 GNU(3,12) W y y y y +SuSe x86_64 Int(3,12) W y y y n +SuSe x86_64 PGI(3,12) W y y y n +Linux 2.4 SuSE C + ia64 C Intel (7) y y y n +Linux 2.4 SGI Altix C + ia64 Intel y n +Linux 2.6 RHEL C + Lustre Intel (5) y y y n +Cray XT3 2.0.41 n n n n + + Notes: (1) Using mpich2 1.0.6. + (2) Using mpich2 1.0.7. + (3) Linux 2.6 with GNU, Intel, and PGI compilers, as indicated. + W or C indicates workstation or cluster, respectively. + (4) Using mvapich2 0.9.8. + (5) Linux 2.6.9-42.0.10. Xeon cluster with ELsmp_perfctr_lustre + and Intel compilers + (6) Linux 2.4.21-32.0.1. Xeon cluster with ELsmp_perfctr_lustre + and Intel compilers + (7) Linux 2.4.21, SuSE_292.till. Ia64 cluster with Intel compilers + (8) pgf90 + (9) With Compaq Visual Fortran 6.6c compiler. + (10) With PGI and Absoft compilers. + (11) PGI and Intel compilers for both C and Fortran + (12) AMD Opteron x86_64 + (13) ifort + (14) Yes with C and Fortran, but not with C++ + (15) Using Visual Studio 2005 or Cygwin + (16) Not tested for this release. + Compiler versions for each platform are listed in the preceding + "Platforms Tested" table. + + +Known Problems +============== +* For Red Storm, a Cray XT3 system, the tools/h5ls/testh5ls.sh and + tools/h5copy/testh5copy.sh will fail some of its sub-tests. These sub-tests + are expected to fail and should exit with a non-zero code but the yod + command does not propagate the exit code of the executables. Yod always + returns 0 if it can launch the executable. The test suite shell expects + a non-zero for this particular test, therefore it concludes the test has + failed when it receives 0 from yod. Skip all the "failing" test for now + by changing them as following. + + ======== Original tools/h5ls/testh5ls.sh ========= + TOOLTEST tgroup-1.ls 1 -w80 -r -g tgroup.h5 + ======== Change to =============================== + echo SKIP TOOLTEST tgroup-1.ls 1 -w80 -r -g tgroup.h5 + ================================================== + + ======== Original tools/h5copy/testh5copy.sh ========= + TOOLTEST_FAIL -i $TESTFILE -o $FILEOUT -v -s grp_dsets -d grp_rename + TOOLTEST_FAIL -i $TESTFILE -o $FILEOUT -v -s grp_dsets -d /grp_rename/grp_dsets + TOOLTEST_FAIL -i $TESTFILE -o $FILEOUT -vp -s /grp_dsets -d /E/F/grp_dsets + TOOLTEST_FAIL -i $TESTFILE -o $FILEOUT -vp -s /grp_nested -d /G/H/grp_nested + H5LSTEST $FILEOUT + ======== Change to =============================== + echo SKIP TOOLTEST_FAIL -i $TESTFILE -o $FILEOUT -v -s grp_dsets -d grp_rename + echo SKIP TOOLTEST_FAIL -i $TESTFILE -o $FILEOUT -v -s grp_dsets -d /grp_rename/grp_dsets + echo SKIP TOOLTEST_FAIL -i $TESTFILE -o $FILEOUT -vp -s /grp_dsets -d /E/F/grp_dsets + echo SKIP TOOLTEST_FAIL -i $TESTFILE -o $FILEOUT -vp -s /grp_nested -d /G/H/grp_nested + echo SKIP H5LSTEST $FILEOUT + ================================================== + AKC - 2008/11/10 + +* For Red Storm, a Cray XT3 system, the yod command sometimes gives the + message, "yod allocation delayed for node recovery". This interferes with + test suites that do not expect seeing this message. See the section of "Red + Storm" in file INSTALL_parallel for a way to deal with this problem. + AKC - 2008/05/28 + +* We have discovered two problems when running collective IO parallel HDF5 + tests with chunking storage on the ChaMPIon MPI compiler on tungsten, a + Linux cluster at NCSA. + + Under some complex selection cases: + 1) MPI_Get_element returns the wrong value. + 2) MPI_Type_struct also generates the wrong derived datatype and corrupt + data may be generated. + These issues arise only when turning on collective IO with chunking storage + with some complex selections. We have not found these problems on other + MPI-IO compilers. If you encounter these problems, you may use independent + IO instead. + + To avoid this behavior, change the following line in your code + H5Pset_dxpl_mpio(xfer_plist, H5FD_MPIO_COLLECTIVE); + to + H5Pset_dxpl_mpio(xfer_plist, H5FD_MPIO_INDEPENDENT); + + KY - 2007/08/24 + +* On Intel 64 Linux cluster (RH 4, Linux 2.6.9) with Intel 10.0 compilers, + use -mp -O1 compilation flags to build the libraries. A higher level of + optimization causes failures in several HDF5 library tests. + +* For LLNL, uP: both serial and parallel tests pass. + Zeus: Serial tests pass but parallel tests fail with a known problem in MPI. + ubgl: Serial tests pass but parallel tests fail. + +* On mpich 1.2.5 and 1.2.6, if more than two processes contribute no IO and + the application asks to do collective IO, we have found that when using 4 + processors, a simple collective write will sometimes be hung. This can be + verified with t_mpi test under testpar. + +* On IRIX6.5, when the C compiler version is greater than 7.4, complicated + MPI derived datatype code will work. However, the user should increase + the value of the MPI_TYPE_MAX environment variable to some appropriate value + to use collective irregular selection code. For example, the current + parallel HDF5 test needs to raise MPI_TYPE_MAX to 200,000 to pass the test. + +* A dataset created or rewritten with a v1.6.3 library or after cannot be read + with the v1.6.2 library or before when the Fletcher32 EDC filter is enabled. + There was a bug in the calculation of the Fletcher32 checksum in the + library before v1.6.3; the checksum value was not consistent between big- + endian and little-endian systems. This bug was fixed in Release 1.6.3. + However, after fixing the bug, the checksum value was no longer the same as + before on little-endian system. Library releases after 1.6.4 can still read + datasets created or rewritten with an HDF5 library of v1.6.2 or before. + SLU - 2005/6/30 + +* On IBM AIX systems, parallel HDF5 mode will fail some tests with error + messages like "INFO: 0031-XXX ...". This is from the command `poe'. + Set the environment variable MP_INFOLEVEL to 0 to minimize the messages + and run the tests again. + + The tests may fail with messages like "The socket name is already in use", + but HDF5 does not use sockets. This failure is due to problems with the + poe command trying to set up the debug socket. To resolve this problem, + check to see whether there are many old /tmp/s.pedb.* files staying around. + These are sockets used by the poe command and left behind due to failed + commands. First, ask your system administrator to clean them out. + Lastly, request IBM to provide a means to run poe without the debug socket. + +* The --enable-static-exec configure flag fails to compile for Solaris + platforms. This is due to the fact that not all of the system libraries on + Solaris are available in a static format. + + The --enable-static-exec configure flag also fails to correctly compile + on IBM SP2 platforms for serial mode. The parallel mode works fine with + this option. + + It is suggested that you do not use this option on these platforms + during configuration. + +* There is also a configure error on Altix machines that incorrectly reports + when a version of Szip without an encoder is being used. + +* Information about building with PGI and Intel compilers is available in + the INSTALL file sections 4.7 and 4.8. + + + + +%%%%1.8.1%%%% + + +HDF5 version 1.8.1 released on Thu May 29 15:28:55 CDT 2008 +================================================================================ + +INTRODUCTION +============ + +This document describes the differences between the HDF5-1.8.1 release +and HDF5 1.8.0, and contains information on the platforms tested and known +problems in HDF5-1.8.1. For more details, see the files +HISTORY-1_0-1_8_0_rc3.txt and HISTORY-1_8.txt in the release_docs/ directory +of the HDF5 source. + +Links to the HDF5 1.8.1 source code, documentation, and additional materials +can be found on the HDF5 web page at: + + http://www.hdfgroup.org/products/hdf5/ + +The HDF5 1.8.1 release can be obtained from: + + http://www.hdfgroup.org/HDF5/release/obtain5.html + +User documentation for 1.8.1 can be accessed directly at this location: + + http://www.hdfgroup.org/HDF5/doc/ + +New features in the HDF5-1.8.x release series, including brief general +descriptions of some new and modified APIs, are described in the "What's New +in 1.8.0?" document: + + http://www.hdfgroup.org/HDF5/doc/ADGuide/WhatsNew180.html + +All new and modified APIs are listed in detail in the "HDF5 Software Changes +from Release to Release" document, in the section "Release 1.8.1 (current +release) versus Release 1.8.0": + + http://www.hdfgroup.org/HDF5/doc/ADGuide/Changes.html + +If you have any questions or comments, please send them to the HDF Help Desk: + + help@hdfgroup.org + + +CONTENTS +======== + +- New Features +- Support for new platforms and languages +- Bug Fixes since HDF5-1.8.0 +- Platforms Tested +- Supported Configuration Features Summary +- Known Problems + + +New Features +============ + + Configuration + ------------- + - The lib/libhdf5.settings file contains much more configure + information. (AKC - 2008/05/18) + + - The new configure option "--disable-sharedlib-rpath" disables + embedding the '-Wl,-rpath' information into executables when + shared libraries are produced, and instead solely relies on the + information in LD_LIBRARY_PATH. (MAM - 2008/05/15) + + - Configuration suite now uses Autoconf 2.61, Automake 1.10.1, and + Libtool 2.2.2 (MAM - 2008/05/01) + + Source code distribution + ======================== + + Library + ------- + - None + + Parallel Library + ---------------- + - None + + Tools + ----- + - h5repack: Reinstated the -i and -o command line flags to specify + input and output files. h5repack now understands both the old + syntax (with -i and -o) and the new syntax introduced in Release + 1.8.0. (PVN - 2008/05/23) + - h5dump: Added support for external links, displaying the object that + an external link points to. (PVN - 2008/05/12) + - h5dump: Added an option, -m, to allow user-defined formatting in the + output of floating point numbers. (PVN - 2008/05/06) + - h5dump, in output of the -p option: Added effective data compression + ratio to the dataset storage layout output when a compression filter + has been applied to a dataset. (PVN - 2008/05/01) + + F90 API + ------ + New H5A, H5G, H5L, H5O, and H5P APIs to enable 1.8 features were + added. See "Release 1.8.1 (current release) versus Release 1.8.0" in + the document "HDF5 Software Changes from Release to Release" + (http://hdfgroup.org/HDF5/doc/ADGuide/Changes.html) for the + complete list of the new APIs. + + C++ API + ------ + - None + + +Support for New Platforms, Languages, and Compilers +=================================================== + - Both serial and parallel HDF5 are supported for the Red Storm machine + which is a Cray XT3 system. + + - The Fortran library will work correctly if compiled with the -i8 + flag. This has been tested with the g95, PGI and Intel Fortran + compilers. + + +Bug Fixes since HDF5-1.8.0 +========================== + + Configuration + ------------- + - None + + Source code distribution + ======================== + + Library + ------- + - Chunking: Chunks greater than 4GB are disallowed. + (QAK - 2008/05/16) + - Fixed the problem with searching for a target file when following + an external link. The search pattern will depend on whether the + target file's pathname is an absolute or a relative path. + Please see the H5Lcreate_external description in the "HDF5 + Reference Manual" (http://hdfgroup.org/HDF5/doc/RM/RM_H5L.html). + (VC - 2008/04/08) + - Fixed possible file corruption bug when encoding datatype + descriptions for compound datatypes whose size was between + 256 and 511 bytes and the file was opened with the "use the + latest format" property enabled (with H5Pset_libver_bounds). + (QAK - 2008/03/13) + - Fixed bug in H5Aget_num_attrs() routine to correctly handle an + invalid location identifier. (QAK - 2008/03/11) + + Parallel Library + ---------------- + - None + + Tools + ----- + - Fixed bug in h5diff that prevented datasets and attributes with + variable-length string elements from comparing correctly. + (QAK - 2008/02/28) + - Fixed bug in h5dump that caused binary output to be made only for + the first dataset, when several datasets were requested. + (PVN - 2008/04/07) + + F90 API + ------ + - The h5tset(get)_fields subroutines were missing the parameter to + specify a sign position; fixed. (EIP - 2008/05/23) + - Many APIs were fixed to work with the 8-byte integers in Fortran vs. + 4-byte integers in C. This change is trasparent to user applications. + + C++ API + ------ + - The class hierarchy was revised to address the problem reported + in bugzilla #1068, Attribute should not be derived from base + class H5Object. Classes AbstractDS was moved out of H5Object. + Class Attribute now multiply inherits from IdComponent and + AbstractDs and class DataSet from H5Object and AbstractDs. + In addition, data member IdComponent::id was moved into subclasses: + Attribute, DataSet, DataSpace, DataType, H5File, Group, and PropList. + (BMR - 2008/05/20) + - IdComponent::dereference was incorrect; it was changed from: + void IdComponent::dereference(IdComponent& obj, void* ref) + to: + void H5Object::dereference(H5File& h5file, void* ref) + void H5Object::dereference(H5Object& obj, void* ref) + (BMR - 2008/05/20) + - Revised Attribute::write and Attribute::read wrappers to handle + memory allocation/deallocation properly. (bugzilla 1045) + (BMR - 2008/05/20) + + +Platforms Tested +================ +The following platforms and compilers have been tested for this release. + + Cray XT3 (2.0.41) cc (pgcc) 7.1-4 + (red storm) ftn (pgf90) 7.1-4 + CC (pgCC) 7.1-4 + mpicc 1.0.2 + mpif90 1.0.2 + + FreeBSD 6.2-STABLE i386 gcc 3.4.6 [FreeBSD] 20060305 + (duty) g++ 3.4.6 [FreeBSD] 20060305 + gcc 4.2.1 20080123 + g++ 4.2.1 20080123 + gfortran 4.2.1 20070620 + + FreeBSD 6.2-STABLE amd64 gcc 3.4.6 [FreeBSD] 20060305 + (liberty) g++ 3.4.6 [FreeBSD] 20060305 + gcc 4.2.1 20080123 + g++ 4.2.1 20080123 + gfortran 4.2.1 20080123 + + IRIX64 6.5 (64 & n32) MIPSpro cc 7.4.4m + F90 MIPSpro 7.4.4m + C++ MIPSpro cc 7.4.4m + + Linux 2.6.9 (RHEL4) Intel 10.0 compilers + (abe.ncsa.uiuc.edu) + + Linux 2.4.21-47 gcc 3.2.3 20030502 + (osage) + + Linux 2.6.9-42.0.10 gcc,g++ 3.4.6 20060404, G95 (GCC 4.0.3) + (kagiso) PGI 7.1-6 (pgcc, pgf90, pgCC) + Intel 9.1 (icc, ifort, icpc) + + Linux 2.6.16.27 x86_64 AMD gcc 4.1.0 (SuSE Linux), g++ 4.1.0, + (smirom) g95 (GCC 4.0.3) + PGI 7.1-6 (pgcc, pgf90, pgCC) + Intel 9.1 (icc, ifort, icpc) + + Linux 2.6.5-7.252.1-rtgfx #1 Intel(R) C++ Version 9.0 + SMP ia64 Intel(R) Fortran Itanium(R) Version 9.0 + (cobalt) SGI MPI + + SunOS 5.8 32,46 Sun WorkShop 6 update 2 C 5.3 + (Solaris 2.8) Sun WorkShop 6 update 2 Fortran 95 6.2 + Sun WorkShop 6 update 2 C++ 5.3 + + SunOS 5.10 cc: Sun C 5.8 + (linew) f90: Sun Fortran 95 8.2 + CC: Sun C++ 5.8 + + Xeon Linux 2.4.21-32.0.1.ELsmp-perfctr-lustre + (tungsten) gcc 3.2.2 20030222 + Intel(R) C++ Version 9.0 + Intel(R) Fortran Compiler Version 9.0 + + IA-64 Linux 2.4.21.SuSE_309.tg1 ia64 + (NCSA tg-login) gcc 3.2.2 + Intel(R) C++ Version 8.1 + Intel(R) Fortran Compiler Version 8.1 + mpich-gm-1.2.6..14b-intel-r2 + + Intel 64 Linux 2.6.9-42.0.10.EL_lustre-1.4.10.1smp + (abe) gcc 3.4.6 20060404 + Intel(R) C++ Version 10.0 + Intel (R) Fortran Compiler Version 10.0 + mvapich2-0.9.8p2patched-intel-ofed-1.2 + + Windows XP Visual Studio .NET + Visual Studio 2005 w/ Intel Fortran 9.1 + Cygwin(native gcc compiler and g95) + MinGW(native gcc compiler and g95) + + Windows XP x64 Visual Studio 2005 w/ Intel Fortran 9.1 + + Windows Vista Visual Studio 2005 + + MAC OS 10.5.2 (Intel) i686-apple-darwin9-gcc-4.0.1 (GCC) 4.0.1 + GNU Fortran (GCC) 4.3.0 20070810 + G95 (GCC 4.0.3 (g95 0.91!) Apr 24 2008) + + +Supported Configuration Features Summary +======================================== + + In the tables below + y = tested and supported + n = not supported or not tested in this release + x = not working in this release + dna = does not apply + ( ) = footnote appears below second table + = testing incomplete on this feature or platform + +Platform C F90 F90 C++ zlib SZIP + parallel parallel +SunOS5.10 64-bit n y n y y y +SunOS5.10 32-bit n y n y y y +IRIX64_6.5 64-bit n y y y y y +IRIX64_6.5 32-bit n n n n y y +Windows XP n y(15) n(15) y y y +Windows XP x64 n y(15) n(15) y y y +Windows Vista n n n y y y +Mac OS X 10.5 Intel n y n y y y +FreeBSD 4.11 n n n y y y +RedHat EL3 W (3) y(1) y(10) y(1) y y y +RedHat EL3 W Intel (3) n y n y y n +RedHat EL3 W PGI (3) n y n y y n +SuSe x86_64 gcc (3,12) y(2) y(11) y(2) y y y +SuSe x86_64 Int (3,12) n y(13) n y y n +SuSe x86_64 PGI (3,12) n y(8) n y y y +Linux 2.4 Xeon C + Lustre Intel (3,6) n y n y y n +Linux 2.6 SuSE ia64 C + Intel (3,7) y y y y y n +Linux 2.6 SGI Altix + ia64 Intel (3) y y y y y y +Linux 2.6 RHEL C + Lustre Intel (5) y(4) y y(4) y y n +Cray XT3 2.0.41 y y y y y n + + +Platform Shared Shared Shared Thread- + C libs F90 libs C++ libs safe +Solaris2.10 64-bit y y y y +Solaris2.10 32-bit y y y y +IRIX64_6.5 64-bit y y n y +IRIX64_6.5 32-bit y dna y y +Windows XP y y(15) y y +Windows XP x64 y y(15) y y +Windows Vista y n n y +Mac OS X 10.3 y n +FreeBSD 4.11 y n y y +RedHat EL3 W (3) y y(10) y y +RedHat EL3 W Intel (3) y y y n +RedHat EL3 W PGI (3) y y y n +SuSe x86_64 W GNU (3,12) y y y y +SuSe x86_64 W Int (3,12) y y y n +SuSe x86_64 W PGI (3,12) y y y n +Linux 2.4 Xeon C + Lustre Intel (6) y y y n +Linux 2.4 SuSE + ia64 C Intel (7) y y y n +Linux 2.4 SGI Altix + ia64 Intel y n +Linux 2.6 RHEL C + Lustre Intel (5) y y y n +Cray XT3 2.0.41 n n n n n + + Notes: (1) Using mpich2 1.0.6. + (2) Using mpich2 1.0.7. + (3) Linux 2.6 with GNU, Intel, and PGI compilers, as indicated. + W or C indicates workstation or cluster, respectively. + (4) Using mvapich2 0.9.8. + (5) Linux 2.6.9-42.0.10. Xeon cluster with ELsmp_perfctr_lustre + and Intel compilers + (6) Linux 2.4.21-32.0.1. Xeon cluster with ELsmp_perfctr_lustre + and Intel compilers + (7) Linux 2.4.21, SuSE_292.till. Ia64 cluster with Intel compilers + (8) pgf90 + (9) With Compaq Visual Fortran 6.6c compiler. + (10) With PGI and Absoft compilers. + (11) PGI and Intel compilers for both C and Fortran + (12) AMD Opteron x86_64 + (13) ifort + (14) Yes with C and Fortran, but not with C++ + (15) Using Visual Studio 2005 or Cygwin + (16) Not tested for this release. + Compiler versions for each platform are listed in the preceding + "Platforms Tested" table. + + +Known Problems +============== +* For Red Storm, a Cray XT3 system, the yod command sometimes gives the + message, "yod allocation delayed for node recovery". This interferes with + test suites that do not expect seeing this message. See the section of "Red + Storm" in file INSTALL_parallel for a way to deal with this problem. + AKC - 2008/05/28 + +* For Red Storm, a Cray XT3 system, the tools/h5ls/testh5ls.sh will fail on + the test "Testing h5ls -w80 -r -g tgroup.h5" fails. This test is + expected to fail and exit with a non-zero code but the yod command does + not propagate the exit code of the executables. Yod always returns 0 if it + can launch the executable. The test suite shell expects a non-zero for + this particular test, therefore it concludes the test has failed when it + receives 0 from yod. To bypass this problem for now, change the following + lines in the tools/h5ls/testh5ls.sh. + ======== Original ========= + # The following combination of arguments is expected to return an error message + # and return value 1 + TOOLTEST tgroup-1.ls 1 -w80 -r -g tgroup.h5 + ======== Skip the test ========= + echo SKIP TOOLTEST tgroup-1.ls 1 -w80 -r -g tgroup.h5 + ======== end of bypass ======== + AKC - 2008/05/28 + +* We have discovered two problems when running collective IO parallel HDF5 + tests with chunking storage on the ChaMPIon MPI compiler on tungsten, a + Linux cluster at NCSA. + + Under some complex selection cases: + 1) MPI_Get_element returns the wrong value. + 2) MPI_Type_struct also generates the wrong derived datatype and corrupt + data may be generated. + These issues arise only when turning on collective IO with chunking storage + with some complex selections. We have not found these problems on other + MPI-IO compilers. If you encounter these problems, you may use independent + IO instead. + + To avoid this behavior, change the following line in your code + H5Pset_dxpl_mpio(xfer_plist, H5FD_MPIO_COLLECTIVE); + to + H5Pset_dxpl_mpio(xfer_plist, H5FD_MPIO_INDEPENDENT); + + KY - 2007/08/24 + +* For SNL, spirit/liberty/thunderbird: The serial tests pass but parallel + tests failed with MPI-IO file locking message. AKC - 2007/6/25 + +* On Intel 64 Linux cluster (RH 4, Linux 2.6.9) with Intel 10.0 compilers, + use -mp -O1 compilation flags to build the libraries. A higher level of + optimization causes failures in several HDF5 library tests. + +* For LLNL, uP: both serial and parallel tests pass. + Zeus: Serial tests pass but parallel tests fail with a known problem in MPI. + ubgl: Serial tests pass but parallel tests fail. + +* Configuring with --enable-debug=all produces compiler errors on most + platforms: Users who want to run HDF5 in debug mode should use + --enable-debug rather than --enable-debug=all to enable debugging + information on most modules. + +* On Mac OS 10.4, test/dt_arith.c has some errors in conversion from long + double to (unsigned) long long and from (unsigned) long long to long double. + +* On Altix SGI with Intel 9.0, testmeta.c would not compile with -O3 + optimization flag. + +* On VAX, the Scaleoffset filter is not supported. The Scaleoffset filter + supports only the IEEE standard for floating-point data; it cannot be applied + to HDF5 data generated on VAX. + +* On Cray X1, a lone colon on the command line of h5dump --xml (as in + the testh5dumpxml.sh script) is misinterpereted by the operating system + and causes an error. + +* On mpich 1.2.5 and 1.2.6, if more than two processes contribute no IO and + the application asks to do collective IO, we have found that when using 4 + processors, a simple collective write will sometimes be hung. This can be + verified with t_mpi test under testpar. + +* On IRIX6.5, when the C compiler version is greater than 7.4, complicated + MPI derived datatype code will work. However, the user should increase + the value of the MPI_TYPE_MAX environment variable to some appropriate value + to use collective irregular selection code. For example, the current + parallel HDF5 test needs to raise MPI_TYPE_MAX to 200,000 to pass the test. + +* A dataset created or rewritten with a v1.6.3 library or after cannot be read + with the v1.6.2 library or before when the Fletcher32 EDC filter is enabled. + There was a bug in the calculation of the Fletcher32 checksum in the + library before v1.6.3; the checksum value was not consistent between big- + endian and little-endian systems. This bug was fixed in Release 1.6.3. + However, after fixing the bug, the checksum value was no longer the same as + before on little-endian system. Library releases after 1.6.4 can still read + datasets created or rewritten with an HDF5 library of v1.6.2 or before. + SLU - 2005/6/30 + +* For version 6 (6.02 and 6.04) of the Portland Group compiler on the AMD + Opteron processor, there is a bug in the compiler for optimization(-O2). + The library failed in several tests, all related to the MULTI driver. + The problem has been reported to the vendor. + +* On IBM AIX systems, parallel HDF5 mode will fail some tests with error + messages like "INFO: 0031-XXX ...". This is from the command `poe'. + Set the environment variable MP_INFOLEVEL to 0 to minimize the messages + and run the tests again. + + The tests may fail with messages like "The socket name is already in use", + but HDF5 does not use sockets. This failure is due to problems with the + poe command trying to set up the debug socket. To resolve this problem, + check to see whether there are many old /tmp/s.pedb.* files staying around. + These are sockets used by the poe command and left behind due to failed + commands. First, ask your system administrator to clean them out. + Lastly, request IBM to provide a means to run poe without the debug socket. + +* The --enable-static-exec configure flag fails to compile for Solaris + platforms. This is due to the fact that not all of the system libraries on + Solaris are available in a static format. + + The --enable-static-exec configure flag also fails to correctly compile + on IBM SP2 platforms for serial mode. The parallel mode works fine with + this option. + + It is suggested that you do not use this option on these platforms + during configuration. + +* With the gcc 2.95.2 compiler, HDF5 uses the `-ansi' flag during + compilation. The ANSI version of the compiler complains about not being + able to handle the `long long' datatype with the warning: + + warning: ANSI C does not support `long long' + + This warning is innocuous and can be safely ignored. + +* The ./dsets tests fail on the TFLOPS machine if the test program, + dsets.c, is compiled with the -O option. The HDF5 library still works + correctly with the -O option. The test program works fine if it is + compiled with -O1 or -O0. Only -O (same as -O2) causes the test + program to fail. + +* Not all platforms behave correctly with Szip's shared libraries. Szip is + disabled in these cases, and a message is relayed at configure time. Static + libraries should be working on all systems that support Szip and should be + used when shared libraries are unavailable. + + There is also a configure error on Altix machines that incorrectly reports + when a version of Szip without an encoder is being used. + +* On some platforms that use Intel and Absoft compilers to build the HDF5 + Fortran library, compilation may fail for fortranlib_test.f90, fflush1.f90 + and fflush2.f90 complaining about the exit subroutine. Comment out the line + IF (total_error .ne. 0) CALL exit (total_error). + +* Information about building with PGI and Intel compilers is available in + the INSTALL file sections 4.7 and 4.8. + +* On at least one system, SDSC DataStar, the scheduler (in this case + LoadLeveler) sends job status updates to standard error when you run + any executable that was compiled with the parallel compilers. + + This causes problems when running "make check" on parallel builds, as + many of the tool tests function by saving the output from test runs, + and comparing it to an exemplar. + + The best solution is to reconfigure the target system so it no longer + inserts the extra text. However, this may not be practical. + + In such cases, one solution is to "setenv HDF5_Make_Ignore yes" prior to + the configure and build. This will cause "make check" to continue after + detecting errors in the tool tests. However, in the case of SDSC DataStar, + it also leaves you with some 150 "failed" tests to examine by hand. + + A second solution is to write a script to run serial tests and filter + out the text added by the scheduler. A sample script used on SDSC + DataStar is given below, but you will probably have to customize it + for your installation. + + Observe that the basic idea is to insert the script as the first item + on the command line which executes the the test. The script then + executes the test and filters out the offending text before passing + it on. + + #!/bin/csh + + set STDOUT_FILE=~/bin/serial_filter.stdout + set STDERR_FILE=~/bin/serial_filter.stderr + + rm -f $STDOUT_FILE $STDERR_FILE + + ($* > $STDOUT_FILE) >& $STDERR_FILE + + set RETURN_VALUE=$status + + cat $STDOUT_FILE + + tail +3 $STDERR_FILE + + exit $RETURN_VALUE + + You get the HDF5 make files and test scipts to execute your filter script + by setting the environment variable "RUNSERIAL" to the full path of the + script prior to running configure for parallel builds. Remember to + "unsetenv RUNSERIAL" before running configure for a serial build. + + Note that the RUNSERIAL environment variable exists so that we can + prefix serial runs as necessary on the target system. On DataStar, + no prefix is necessary. However on an MPICH system, the prefix might + have to be set to something like "/usr/local/mpi/bin/mpirun -np 1" to + get the serial tests to run at all. + + In such cases, you will have to include the regular prefix in your + filter script. + +* H5Ocopy() does not copy reg_ref attributes correctly when shared-message + is turn on. The value of the reference in the destination attriubte is + wrong. This H5Ocopy problem will affect the h5copy tool. + +* In the C++ API, it appears that there are bugs in Attribute::write/read + and DataSet::write/read for fixed- and variable-len strings. The problems + are being worked on and a patch will be provided when the fixes are + available. + + +%%%%1.8.0%%%% + + +HDF5 version 1.8.0 released on Tue Feb 12 20:41:19 CST 2008 +================================================================================ + +INTRODUCTION +============ + +This document describes the differences between the HDF5-1.6.x release series +and HDF5 1.8.0, and contains information on the platforms tested and known +problems in HDF5-1.8.0. For more details, see the HISTORY-1_0-1_8_0_rc3.txt +file in the +release_docs/ directory of the HDF5 source. + +Links to the HDF5 1.8.0 source code, documentation, and additional materials +can be found on the HDF5 web page at: + + http://www.hdfgroup.org/products/hdf5/ + +The HDF5 1.8.0 release can be obtained from: + + http://www.hdfgroup.org/HDF5/release/obtain5.html + +User documentation for 1.8.0 can be accessed directly at this location: + + http://www.hdfgroup.org/HDF5/doc/ + +New features in 1.8.0, including brief general descriptions of some new +and modified APIs, are described in the "What's New in 1.8.0?" document: + + http://www.hdfgroup.org/HDF5/doc/ADGuide/WhatsNew180.html + +All new and modified APIs are listed in detail in the "HDF5 Software Changes +from Release to Release" document, in the section "Release 1.8.0 (current +release) versus Release 1.6.x": + + http://www.hdfgroup.org/HDF5/doc/ADGuide/Changes.html + +If you have any questions or comments, please send them to the HDF Help Desk: + + help@hdfgroup.org + + +CONTENTS +======== + +- New Features +- Removed Feature +- Support for new platforms and languages +- Bug Fixes since HDF5-1.6.0 +- Platforms Tested +- Supported Configuration Features Summary +- Known Problems + + +New Features +============ + + HDF5 Release 1.8.0 is a major release with many changes and new features. + + New format and interface features discussed in the "What's New in + HDF5 1.8.0" document include the following: + + Enhanced group object management + Enhanced attribute management and more efficient meta data handling + Expanded datatype features + Creation order tracking and indexing + Improved meta data caching and cache control + UTF-8 encoding + New I/O filters: n-bit and scale+offset compression + New link (H5L) and object (H5O) interfaces and features + External and user-defined links + New high-level APIs: + HDF5 Packet Table (H5PT) and HDF5 Dimension Scale (H5DS) + C++ and Fortran interfaces for older high-level APIs: + H5Lite (H5LT), H5Image (H5IM), and H5Table (H5TB) + New and improved tools + And more... + + http://hdfgroup.org/HDF5/doc/ADGuide/WhatsNew180.html + + + New APIs associated with these features, other interface changes + (e.g., ENUM and struct definitions), and new library configuration flags + are listed in the "Release 1.8.0 (current release) versus Release 1.6.x" + section of "HDF5 Software Changes from Release to Release." + + http://hdfgroup.org/HDF5/doc/ADGuide/Changes.html + +Compatibility +------------- + Many HDF5 users and user communities have existing applications that + they may wish to port to Release 1.8.0. Alternatively, some users may + wish to take advantage of Release 1.8.0's improved performance without + having to port such applications. To facilitate managing application + compatibility and porting applications from release to release, the HDF + Team has implemented the following features: + Individually-configurable macros that selectively map common + interface names to the old and new interfaces + Library configuration options to configure the macro mappings + + Two related documents accompany this release: + "API Compatibility Macros in HDF5" discusses the specifics of the + new individually-configurable macros and library configuration + options. + http://hdfgroup.org/HDF5/doc/RM/APICompatMacros.html + + "New Features in HDF5 Release 1.8.0 and Backward/Forward Format + Compatibility Issues" discusses each new feature with regard to + its impact on format compatibility. + http://hdfgroup.org/HDF5/doc/ADGuide/CompatFormat180.html + +Referenced documents +-------------------- + http://hdfgroup.org/HDF5/doc/ADGuide/WhatsNew180.html + "What's New in HDF5 1.8.0" + + http://hdfgroup.org/HDF5/doc/ADGuide/Changes.html + The "Release 1.8.0 (current release) versus Release 1.6.x " + section in "HDF5 Software Changes from Release to Release" + + http://hdfgroup.org/HDF5/doc/RM/APICompatMacros.html + "API Compatibility Macros in HDF5" + + http://hdfgroup.org/HDF5/doc/ADGuide/CompatFormat180.html + "New Features in HDF5 Release 1.8.0 and Backward/Forward Format + Compatibility Issues" + + +Removed Feature +=============== +The stream virtual file driver (H5FD_STREAM) have been removed in this +release. This affects the functions H5Pset_fapl_stream and H5Pget_fapl_stream +and the constant H5FD_STREAM. + +This virtual file driver will be available at +http://hdf5-addons.origo.ethz.ch/. Note that at the time of this release, +the transition is still in progress; the necessary integration tools may +not be available when HDF5 Release 1.8.0 first comes out. + + +Support for New Platforms, Languages, and Compilers +=================================================== + - Support for Open VMS 7.3 was added. + + +Bug Fixes since HDF5-1.6.0 +========================== + This release contains numerous bug fixes. For details, see the + "Changes from 1.6.0 to 1.8.0-rc3" section of the HISTORY.txt file for + this release. + + +Platforms Tested +================ +The following platforms and compilers have been tested for for this release. + + AIX 5.2 (32/64 bit) xlc 8.0.0.11 + xlC 8.0 + xlf 10.01.0000.0 + mpcc_r 6.0.0.8 + mpxlf_r 8.1.1.7 + + FreeBSD 6.2-STABLE i386 gcc 3.4.6 [FreeBSD] 20060305 + (duty) g++ 3.4.6 [FreeBSD] 20060305 + gcc 4.2.1 20080123 + g++ 4.2.1 20080123 + gfortran 4.2.1 20070620 + + FreeBSD 6.2-STABLE amd64 gcc 3.4.6 [FreeBSD] 20060305 + (liberty) g++ 3.4.6 [FreeBSD] 20060305 + gcc 4.2.1 20080123 + g++ 4.2.1 20080123 + gfortran 4.2.1 20080123 + + IRIX64 6.5 (64 & n32) MIPSpro cc 7.4.4m + F90 MIPSpro 7.4.4m + C++ MIPSpro cc 7.4.4m + + Linux 2.6.9 (RHEL4) Intel 10.0 compilers + (abe.ncsa.uiuc.edu) + + Linux 2.4.21-47 gcc 3.2.3 20030502 + (osage) + + Linux 2.6.9-42.0.10 gcc 3.4.6 20060404 + (kagiso) PGI 7.0-7 (pgcc, pgf90, pgCC) + Intel 9.1 (icc, ifort, icpc) + + Linux 2.6.16.27 x86_64 AMD gcc 4.1.0 (SuSE Linux), g++ 4.1.0, + (smirom) g95 (GCC 4.0.3) + PGI 6.2-5 (pgcc, pgf90, pgCC) + Intel 9.1 (icc, iort, icpc) + + Linux 2.6.5-7.252.1-rtgfx #1 Intel(R) C++ Version 9.0 + SMP ia64 Intel(R) Fortran Itanium(R) Version 9.0 + (cobalt) SGI MPI + + SunOS 5.8 32,46 Sun WorkShop 6 update 2 C 5.3 + (Solaris 2.8) Sun WorkShop 6 update 2 Fortran 95 6.2 + Sun WorkShop 6 update 2 C++ 5.3 + + SunOS 5.10 cc: Sun C 5.8 + (linew) f90: Sun Fortran 95 8.2 + CC: Sun C++ 5.8 + + Xeon Linux 2.4.21-32.0.1.ELsmp-perfctr-lustre + (tungsten) gcc 3.2.2 20030222 + Intel(R) C++ Version 9.0 + Intel(R) Fortran Compiler Version 9.0 + + IA-64 Linux 2.4.21.SuSE_292.til1 ia64 + (NCSA tg-login) gcc 3.2.2 + Intel(R) C++ Version 8.1 + Intel(R) Fortran Compiler Version 8.1 + mpich-gm-1.2.5..10-intel-r2 + + Windows XP Visual Studio .NET + Visual Studio 2005 w/ Intel Fortran 9.1 + Cygwin(native gcc compiler and g95) + MinGW(native gcc compiler and g95) + + Windows XP x64 Visual Studio 2005 w/ Intel Fortran 9.1 + + Windows Vista Visual Studio 2005 + + MAC OS 10.4 (Intel) gcc i686-apple-darwin8-gcc-4.0.1 (GCC) 4.0.1 + G95 (GCC 4.0.3 (g95 0.91!) Nov 21 2006) + + Alpha Open VMS 7.3 Compaq C V6.5-001-48BCD + HP Fortran V7.6-3276 + Compaq C++ V6.5-004 + + +Supported Configuration Features Summary +======================================== + + In the tables below + y = tested and supported + n = not supported or not tested in this release + x = not working in this release + dna = does not apply + ( ) = footnote appears below second table + = testing incomplete on this feature or platform + +Platform C F90 F90 C++ zlib SZIP + parallel parallel +SunOS5.8 64-bit n y n y y y +SunOS5.8 32-bit n y n y y y +SunOS5.10 64-bit y(1) y n y y y +SunOS5.10 32-bit y(1) y n y y y +IRIX64_6.5 64-bit n y y y y y +IRIX64_6.5 32-bit n n n n y y +AIX-5.2 32-bit y y y y y y +AIX-5.2 64-bit y y y y y y +Windows XP n y(15) n(15) y y y +Windows XP x64 n y(15) n(15) y y y +Windows Vista n n n y y y +Mac OS X 10.4 PowerPC n n +Mac OS X 10.4 Intel n y n y y y +FreeBSD 4.11 n n n y y y +RedHat EL3 W (3) y(1a) y(10) y(1a) y y y +RedHat EL3 W Intel (3) n y n y y n +RedHat EL3 W PGI (3) n y n y y n +SuSe x86_64 gcc (3,12) y(1a) y(11) n y y y +SuSe x86_64 Int (3,12) n y(13) n y y n +SuSe x86_64 PGI (3,12) n y(8) n y y y +Linux 2.4 Xeon C + Lustre Intel (3,6) n y n y y n +Linux 2.6 SuSE ia64 C + Intel (3,7) y y y y y n +Linux 2.6 SGI Altix + ia64 Intel (3) y y y y y y +Alpha OpenVMS 7.3.2 n y n y n n + + + +Platform Shared Shared Shared static- Thread- + C libs F90 libs C++ libs exec safe +Solaris2.8 64-bit y y y x y +Solaris2.8 32-bit y y y x y +Solaris2.10 64-bit y x y +Solaris2.10 32-bit y x y +IRIX64_6.5 64-bit y y n y y +IRIX64_6.5 32-bit y dna y y y +AIX-5.2 & 5.3 32-bit n n n y n +AIX-5.2 & 5.3 64-bit n n n y n +Windows XP y y(15) y y y +Windows XP x64 y y(15) y y y +Windows Vista y n n y y +Mac OS X 10.3 y y n +FreeBSD 4.11 y n y y y +RedHat EL3 W (3) y y(10) y y y +RedHat EL3 W Intel (3) y y y y n +RedHat EL3 W PGI (3) y y y y n +SuSe x86_64 W GNU (3,12) y y y y y +SuSe x86_64 W Int (3,12) y y y y(14) n +SuSe x86_64 W PGI (3,12) y y y y(14) n +Linux 2.4 Xeon C + Lustre Intel (6) y y y y n +Linux 2.4 SuSE + ia64 C Intel (7) y y y y n +Linux 2.4 SGI Altix + ia64 Intel y y n +Alpha OpenVMS 7.3.2 n n n y n + + Notes: (1) Using mpich 1.2.6. + (1a) Using mpich2 1.0.6. + (2) Using mpt and mpich 1.2.6. + (3) Linux 2.6 with GNU, Intel, and PGI compilers, as indicated. + W or C indicates workstation or cluster, respectively. + + (6) Linux 2.4.21-32.0.1. Xeon cluster with ELsmp_perfctr_lustre + and Intel compilers + (7) Linux 2.4.21, SuSE_292.till. Ia64 cluster with Intel +compilers + (8) pgf90 + (9) With Compaq Visual Fortran 6.6c compiler. + (10) With PGI and Absoft compilers. + (11) PGI and Intel compilers for both C and Fortran + (12) AMD Opteron x86_64 + (13) ifort + (14) Yes with C and Fortran, but not with C++ + (15) Using Visual Studio 2005 or Cygwin + (16) Not tested for this release. + Compiler versions for each platform are listed in the preceding + "Platforms Tested" table. + + +Known Problems +============== +* We have discovered two problems when running collective IO parallel HDF5 + tests with chunking storage on the ChaMPIon MPI compiler on tungsten, a + Linux cluster at NCSA. + + Under some complex selection cases: + 1) MPI_Get_element returns the wrong value. + 2) MPI_Type_struct also generates the wrong derived datatype and corrupt + data may be generated. + These issues arise only when turning on collective IO with chunking storage + with some complex selections. We have not found these problems on other + MPI-IO compilers. If you encounter these problems, you may use independent + IO instead. + + To avoid this behavior, change the following line in your code + H5Pset_dxpl_mpio(xfer_plist, H5FD_MPIO_COLLECTIVE); + + to + H5Pset_dxpl_mpio(xfer_plist, H5FD_MPIO_INDEPENDENT); + + KY - 2007/08/24 + +* For SNL, spirit/liberty/thunderbird: The serial tests pass but parallel + tests failed with MPI-IO file locking message. AKC - 2007/6/25 + +* On Intel 64 Linux cluster (RH 4, Linux 2.6.9) with Intel 10.0 compilers, + use -mp -O1 compilation flags to build the libraries. A higher level of + optimization causes failures in several HDF5 library tests. + +* For SNL, Red Storm: Only parallel HDF5 is supported. The serial tests pass + when run against the parallel library; the parallel tests also pass, but + with lots of non-fatal error messages. + +* For LLNL, uP: both serial and parallel tests pass. + Zeus: Serial tests pass but parallel tests fail with a known problem in MPI. + ubgl: Serial tests pass but parallel tests fail. + +* On SUN 5.10 C++, testing fails in the "Testing Shared Datatypes with + Attributes" test. + +* Configuring with --enable-debug=all produces compiler errors on most + platforms: Users who want to run HDF5 in debug mode should use + --enable-debug rather than --enable-debug=all to enable debugging + information on most modules. + +* On Mac OS 10.4, test/dt_arith.c has some errors in conversion from long + double to (unsigned) long long and from (unsigned) long long to long double. + +* On Altix SGI with Intel 9.0, testmeta.c would not compile with -O3 + optimization flag. + +* On VAX, the Scaleoffset filter is not supported. The filter cannot be + applied to HDF5 data generated on VAX. The Scaleoffset filter only supports + the IEEE standard for floating-point data. + +* On Cray X1, a lone colon on the command line of h5dump --xml (as in + the testh5dumpxml.sh script) is misinterpereted by the operating system + and causes an error. + +* On mpich 1.2.5 and 1.2.6, if more than two processes contribute no IO and + the application asks to do collective IO, we have found that when using 4 + processors, a simple collective write will sometimes be hung. This can be + verified with t_mpi test under testpar. + +* On IRIX6.5, when the C compiler version is greater than 7.4, complicated + MPI derived datatype code will work. However, the user should increase + the value of the MPI_TYPE_MAX environment variable to some appropriate value + to use collective irregular selection code. For example, the current + parallel HDF5 test needs to raise MPI_TYPE_MAX to 200,000 to pass the test. + +* A dataset created or rewritten with a v1.6.3 library or after cannot be read + with the v1.6.2 library or before when the Fletcher32 EDC filter is enabled. + There was a bug in the calculating code of the Fletcher32 checksum in the + library before v1.6.3; the checksum value was not consistent between big- + endian and little-endian systems. This bug was fixed in Release 1.6.3. + However, after fixing the bug, the checksum value was no longer the same as + before on little-endian system. Library releases after 1.6.4 can still read + datasets created or rewritten with an HDF5 library of v1.6.2 or before. + SLU - 2005/6/30 + +* For version 6 (6.02 and 6.04) of the Portland Group compiler on the AMD + Opteron processor, there is a bug in the compiler for optimization(-O2). + The library failed in several tests, all related to the MULTI driver. + The problem has been reported to the vendor. + +* On IBM AIX systems, parallel HDF5 mode will fail some tests with error + messages like "INFO: 0031-XXX ...". This is from the command `poe'. + Set the environment variable MP_INFOLEVEL to 0 to minimize the messages + and run the tests again. + + The tests may fail with messages like "The socket name is already in use", + but HDF5 does not use sockets. This failure is due to problems with the + poe command trying to set up the debug socket. To resolve this problem, + check to see whether there are many old /tmp/s.pedb.* files staying around. + These are sockets used by the poe command and left behind due to failed + commands. First, ask your system administrator to clean them out. + Lastly, request IBM to provide a means to run poe without the debug socket. + +* The --enable-static-exec configure flag fails to compile for Solaris + platforms. This is due to the fact that not all of the system libraries on + Solaris are available in a static format. + + The --enable-static-exec configure flag also fails to correctly compile + on IBM SP2 platform for the serial mode. The parallel mode works fine with + this option. + + It is suggested that you do not use this option on these platforms + during configuration. + +* With the gcc 2.95.2 compiler, HDF5 uses the `-ansi' flag during + compilation. The ANSI version of the compiler complains about not being + able to handle the `long long' datatype with the warning: + + warning: ANSI C does not support `long long' + + This warning is innocuous and can be safely ignored. + +* The ./dsets tests fail on the TFLOPS machine if the test program, + dsets.c, is compiled with the -O option. The HDF5 library still works + correctly with the -O option. The test program works fine if it is + compiled with -O1 or -O0. Only -O (same as -O2) causes the test + program to fail. + +* Not all platforms behave correctly with Szip's shared libraries. Szip is + disabled in these cases, and a message is relayed at configure time. Static + libraries should be working on all systems that support Szip and should be + used when shared libraries are unavailable. + + There is also a configure error on Altix machines that incorrectly reports + when a version of Szip without an encoder is being used. + +* On some platforms that use Intel and Absoft compilers to build the HDF5 + Fortran library, compilation may fail for fortranlib_test.f90, fflush1.f90 + and fflush2.f90 complaining about the exit subroutine. Comment out the line + IF (total_error .ne. 0) CALL exit (total_error). + +* Information about building with PGI and Intel compilers is available in + the INSTALL file sections 4.7 and 4.8. + +* On at least one system, SDSC DataStar, the scheduler (in this case + LoadLeveler) sends job status updates to standard error when you run + any executable that was compiled with the parallel compilers. + + This causes problems when running "make check" on parallel builds, as + many of the tool tests function by saving the output from test runs, + and comparing it to an exemplar. + + The best solution is to reconfigure the target system so it no longer + inserts the extra text. However, this may not be practical. + + In such cases, one solution is to "setenv HDF5_Make_Ignore yes" prior to + the configure and build. This will cause "make check" to continue after + detecting errors in the tool tests. However, in the case of SDSC DataStar, + it also leaves you with some 150 "failed" tests to examine by hand. + + A second solution is to write a script to run serial tests and filter + out the text added by the scheduler. A sample script used on SDSC + DataStar is given below, but you will probably have to customize it + for your installation. + + Observe that the basic idea is to insert the script as the first item + on the command line which executes the the test. The script then + executes the test and filters out the offending text before passing + it on. + + #!/bin/csh + + set STDOUT_FILE=~/bin/serial_filter.stdout + set STDERR_FILE=~/bin/serial_filter.stderr + + rm -f $STDOUT_FILE $STDERR_FILE + + ($* > $STDOUT_FILE) >& $STDERR_FILE + + set RETURN_VALUE=$status + + cat $STDOUT_FILE + + tail +3 $STDERR_FILE + + exit $RETURN_VALUE + + You get the HDF5 make files and test scipts to execute your filter script + by setting the environment variable "RUNSERIAL" to the full path of the + script prior to running configure for parallel builds. Remember to + "unsetenv RUNSERIAL" before running configure for a serial build. + + Note that the RUNSERIAL environment variable exists so that we can + can prefix serial runs as necessary on the target system. On DataStar, + no prefix is necessary. However on an MPICH system, the prefix might + have to be set to something like "/usr/local/mpi/bin/mpirun -np 1" to + get the serial tests to run at all. + + In such cases, you will have to include the regular prefix in your + filter script. + +* H5Ocopy() does not copy reg_ref attributes correctly when shared-message + is turn on. The value of the reference in the destination attriubte is + wrong. This H5Ocopy problem will affect the h5copy tool. + diff --git a/release_docs/HISTORY-1_8_0-1_10_0.txt b/release_docs/HISTORY-1_8_0-1_10_0.txt new file mode 100644 index 0000000..a364274 --- /dev/null +++ b/release_docs/HISTORY-1_8_0-1_10_0.txt @@ -0,0 +1,1742 @@ +HDF5 HISTORY +============= + + +INTRODUCTION + +This document describes the development history between the HDF5-1.8.0 and +HDF5 1.10.0 releases. For more iformation see the SVN log. + +Information about supported and tested platforms is provided for historical +reasons only and may not be accurate. + + +For more information, see the HDF5 home page: + + http://www.hdfgroup.org/HDF5/ + +If you have any questions or comments, please send them to the HDF Help Desk: + + help@hdfgroup.org + + +CONTENTS + +- New Features +- Support for new platforms and languages +- Bug Fixes since HDF5-1.8.0 +- Supported Platforms +- Tested Configuration Features Summary +- More Tested Platforms +- Known Problems + + +New Features +============ + + Configuration: + ------------- + - Java JNI library API wrappers and supporting files added as HDF_JAVA language + option. Both configure and CMake disable this option by default. + HDFFV-9552 (ADB 2016/02.28) + - CMake minimum is now 3.1.0. (ADB 2015/11/14) + - cmakehdf5: configure options added to enable or disable the building of + different API's and testings. See "cmakehdf5 --help" for details. + (AKC - 2014/12/09 HDFFV-8932) + - Autotools: Automake updated to 1.14.1 (ADB - 2014/04/08) + - CMake: Moved minimum CMake version to 2.8.11 which enables better library + include processing. (ADB - 2014/03/26) + - New configuration option added to change the default plugin path. + configure option is --with-default-plugin=location + cmake option is -DH5_DEFAULT_PLUGINDIR:PATH=location + HDFFV-8513. (ADB 2013/09/04) + - Rename FFLAGS to FCFLAGS in configure (ADB 2013/08/13) + - CMake minimum is now 2.8.10. (ADB 2013/01/14) + - A new tool, cmakehdf5, which is a build command script similar to + buildhdf5 is added and is available in the bin directory. + (AKC - 2012/12/12) + - Fixed AIX Fortran compiler flags to use appropriate settings for + debugging, profiling, optimization situations. HDFFV-8069. (AKC + 2012/09/27) + - Updated to latest autotools and changed all hard *.sh scripts to + configure managed *.sh.in files. Removed overloading of autotools + TESTS variable by examples and tests. Renamed configure.in to + configure.ac. (ADB - 2012/08/23 - HDFFV-8129) + - Added code to display the version information of XL fortran and C++ + in the summary of configure. (AKC - 2012/02/28 - HDFFV-7793) + - Configure now generates Makefiles that build in "silent make mode" + by default in which compile and link lines are significantly + simplified for clarity. To override this and view actual compile and + link lines during building, the --disable-silent-rules flag can be used + at configure time, or the 'make' command can be followed by V=1, to + indicate a "verbose" make. (MAM - 2011/4/14). + - Added mpicc and mpif90 as the default C and Fortran compilers for Linux + systems when --enable-parallel is specified but no $CC or $FC is defined. + (AKC - 2011/2/7) + - Added a new configure option, "--enable-unsupported", which can + be used to stop configure from preventing the use of unsupported + configure option combinations, such as c++ in parallel or parallel + HDF5 with threadsafe. Use at your own risk, as it may result in a + library that won't compile or run as expected! + (MAM - 2010/11/17 - Bug 2061) + - PHDF5 changed to use "mpiexec", instead of mpirun, as the default MPI + applications startup command as defined in the MPI-2 definition, section + 4.1. (AKC - 2010/6/11 - Bug 1921) + - Configure now adds appropriate defines for supporting large (64-bit) + files on all systems, where supported, by default, instead of only linux. + This largefile support is controllable with the --enable-largefile + configure option. This is replacing the linux-specific --enable-linux-lfs + option, which has been removed from configure. + (MAM - 2010/05/05 - 1772/1434) + - Upgraded versions of autotools used to generate configuration suite. + We now use Automake 1.11.1, Autoconf 2.65, and Libtool 2.2.6b. + MAM 2010/04/15. + - Added the xlc-* and mpcc_r-* BASENAME patterns to be recognized as IBM + compilers so that the ibm compiler options can be added properly. This + allows non-system-default compiler command names (e.g. xlc-m.n.k.l) be + recognized. AKC 2009/11/26. + - Configuration suite now uses Automake 1.11 and Autoconf 2.64. + MAM 2009/08/11. + - Changed default Gnu fortran compiler from g95 to gfortran since + gfortran is more likely installed with gcc now. -AKC 2009/07/19- + - Added libtool version numbers to generated c++, fortran, and + hl libraries. MAM 2009/04/19. + - Regenerated Makefile.ins using Automake 1.10.2. MAM 2009/04/19. + - Added a Make target of check-all-install to test the correctness of + installing via the prefix= or $DESTDIR options. AKC - 2009/04/14 + - Configuration suite now uses Libtool 2.2.6a. MAM 2008/10/24 + + - Configuration suite now uses Autoconf 2.61, Automake 1.10.1. + MAM 2008/05/05. + + - The new configure option "--disable-sharedlib-rpath" disables + embedding the '-Wl,-rpath' information into executables when + shared libraries are produced, and instead solely relies on the + information in LD_LIBRARY_PATH. (MAM - 2008/05/15) + + Library: + -------- + + - Virtual Dataset feature was added + (NAF - 2015-10-05, VDS-193) + + - H5F_ACC_DEBUG labeled "deprecated" + + The symbol was originally used to emit some extra debugging + informationi in the multi VFD. The underlying functionality + was removed due to disuse in HDF5 1.8.16 though the symbol + remained defined since it was visible in H5Fpublic.h. + + In this release, the symbol has been labeled deprecated and will + not be defined when H5_NO_DEPRECATED_SYMBOLS is defined. + + (DER - 2015-04-30, HDFFV-1074) + + - The library can load filter libraries dynamically during runtime. Users + can set the search path through environment variable HDF5_PLUGIN_PATH + and call H5Pset_filter to enable a dynamic filter. (SLU - 2013/04/08) + - Added new API functions H5Dscatter and H5Dgather to scatter data to and + and gather data from a selection within a memory buffer. + (NAF - 2013/02/05) + - The library now supports the data conversion from enumeration to numeric + (integer and floating-point number) datatypes. See Issue 8221. + (SLU - 2012/10/23) + - The data sieve buffer size was for all the datasets in the file. It + could waste memory if any dataset size is smaller than the sieve buffer + size. Now the library picks the smaller one between the dataset size + and the sieve buffer size from the file access property. See Issue 7934. + (SLU - 2012/4/2) + - I added a new parameter of object access property list to the function + H5Rdereference (Issue 2763). It's called H5Rdereference2 now. The former + H5Rdereference function has been deprecated to H5Rdereference1. (SLU - + 2011/7/18) + - H5Tcreate now supports string type (fixed-length and variable-length). + (SLU - 2011/05/20) + - Added ability to cache files opened through external links. Added new + public functions H5Pset_elink_file_cache_size(), + H5Pget_elink_file_cache_size(), and H5Fclear_elink_file_cache(). + (NAF - 2011/02/17) + - Removed all old code for Metraowerks compilers, bracketed by + __MWERKS__). Metraowerks compiler is long gone. (AKC - 2010/11/17) + - Added support for threadsafety on windows using the windows threads + library. Use the HDF5_ENABLE_THREADSAFE option in CMake while on a + windows platform to enable this functionality. This is supported on + Windows Vista and newer Windows operating systems. (MAM - 2010/09/10) + - When a mandatory filter failed to write data chunks, the dataset + couldn't close (bug 1260). The fix releases all resources and closes + the dataset but returns a failure. (SLU - 2010/9/8) + - H5Tset_order and H5Tget_order now support all data types. A new byte + order H5T_ORDER_MIXED has been added specifically for compound datatype + and its derived type. Please see bug #1934. (SLU - 2010/8/23) + - Improved performance of the chunk cache by avoiding unnecessary b-tree + lookups of chunks already in cache. (NAF - 2010/06/15) + - Greatly improved performance of extending a dataset with early + allocation. (NAF - 2010/03/24 - 1637) + - Added support for filtering densely stored groups. Many of the API + functions related to filters have been extended to support dense groups + as well as datasets. Pipeline messages can now be stored in a group's + object header. (NAF/QAK - 2009/10/8) + - The embedded library information is displayed by H5check_version() if a + version mismatch is detected. Also changed H5check_version() to + suppress the warning message totally if $HDF5_DISABLE_VERSION_CHECK is 2 + or higher. (Old behavior treated 3 or higher the same as 1, that is + print a warning and allows the program to continue. (AKC - 2009/9/28) + - If a user does not care for the extra library information insert + in the executables, he may turn it off by --disable-embedded-libinfo + during configure. (AKC - 2009/9/15) + - Corrected problem where library would re-write the superblock in a file + opened for R/W access, even when no changes were made to the file. + (QAK - 2009/08/20, Bz#1473) + - Separated "factory" free list class from block free lists. These free + lists are dynamically created and manage blocks of a fixed size. + H5set_free_list_limits() will use the same settings specified for block + free lists for factory free lists. (NAF - 2009/04/08) + - Added support for dense attributes to H5Ocopy. (XCao/NAF - 2009/01/29) + - Added H5Pset_elink_cb and H5Pget_elink_cb functions to support a + user-defined callback function for external link traversal. + (NAF - 2009/01/08) + - Added H5Pset_elink_acc_flags and H5Pget_elink_acc_flags functions to + allow the user to specify the file access flags used to open the target + file of an external link. (NAF - 2009/01/08) + - Added H5Pset_chunk_cache() and H5Pget_chunk_cache() functions to allow + individual rdcc configuration for each dataset. Added + H5Dget_access_plist() function to retrieve a dataset access property + list from a dataset. (NAF - 2008/11/12) + - Added H5Iis_valid() function to check if an id is valid without producing + an error message. (NAF - 2008/11/5) + - Added two new public routines: H5Pget_elink_fapl() and + H5Pset_elink_fapl(). (see bug #1247) (VC - 2008/10/13) + - Improved free space tracking in file to be faster. (QAK - 2008/10/06) + - Added 'mounted' field to H5G_info_t struct. (QAK - 2008/07/15) + + Parallel Library: + ----------------- + - Add H5Pget_mpio_no_collective_cause() function that retrive reasons + why the collective I/O was broken during read/write IO access. + (JKM - 2012/08/30 HDFFV-8143) + - Special Collective IO (IO when some processes do not contribute to the + IO) and Complex Derived Datatype MPI functionalities are no longer + conditionally enabled in the library by configure. They are always + enabled in order to take advantage of performance boosts from these + behaviors. Older MPI implementations that do not allow for these + functionalities can no longer by used by HDF5. (MAM - 2011/07/08). + - Modified parallel tests to run with arbitrary number of processes. The + modified tests are testphdf5 (parallel dataset access), t_chunk_alloc + (chunk allocation), and t_posix_compliant (posix compliance). The rest of + the parallel tests already use in the code the number of processes + available in the communicator. (CMC - 2009/04/28) + + Fortran Library: + ---------------- + + - Added parallel routine H5Pget_mpio_actual_io_mode_f (MSB - 2012/09/27) + + - Added for the C API the Fortran wrapper: + h5ocopy_f (MSB - 2012/03/22) + + + HDF5 Fortran library was enhanced to support Fortran 2003 standard. + The following features are available when the HDF5 library is configured + using --enable-fortran --enable-fortran2003 configure flags AND + if fortran compiler is Fortran2003 compliant: + + - Subroutines overloaded with the C_PTR derived type: + h5pget_f + h5pget_fill_value_f + h5pinsert_f + h5pregister_f + h5pset_f + h5pset_fill_value_f + h5rcreate_f + h5rderefrence_f + h5rget_name_f + h5rget_obj_type_f + - Subroutines overloaded with the C_PTR derived type + and simplified signatures: + h5aread_f + h5awrite_f + h5dread_f + h5dwrite_f + - New subroutines + h5dvlen_reclaim_f + h5literate_by_name_f + h5literate_f + h5ovisit_f + h5tconvert_f + + - Subroutines with additional optional parameters: + h5pcreate_class_f + (EIP - 2011/10/14) + + - Added for the C APIs the Fortran wrappers: + h5dget_access_plist_f + h5iis_valid_f + h5pset_chunk_cache_f + h5pget_chunk_cache_f + (MSB - 2009/04/17) + + + + C++ Library: + ------------ + - New member function added + + The assignment operator ArrayType::operator= is added because ArrayType + has pointer data members. + + (BMR, 2016/03/07, HDFFV-9562) + + - New member functions + + Overloaded CommonFG::getObjnameByIdx to take char* for name + + Overloaded CommonFG::getObjTypeByIdx to return type name as a char*. + (BMR - 2010/05/02) + + DataSet::getInMemDataSize() to simplify getting the dataset's + data size in memory. (BMR - 2009/07/26) + - These member functions were added as wrapper for H5Rdereference to + replace the incorrect IdComponent::dereference(). + void H5Object::dereference(H5File& h5file, void* ref) + void H5Object::dereference(H5Object& obj, void* ref) + In addition, these constructors were added to create the associated + objects by way of dereference: + Attribute(H5Object& obj, void* ref); + Attribute(H5File& file, void* ref); + DataSet(H5Object& obj, void* ref); + DataSet(H5File& file, void* ref); + DataType(H5Object& obj, void* ref); + DataType(H5File& file, void* ref); + Group(H5Object& obj, void* ref); + Group(H5File& obj, void* ref); + (BMR - 2008/08/10) + + + + Tools: + ------ + - h5repack: Added ability to use plugin filters. HDFFV-8345 (ADB - 2013/09/04). + - h5dump: Added option -N --any_path, which searches the file for paths that + match the search path. HDFFV-7989 (ADB - 2013/08/12). + - h5dump: Added optional arg 0 to -A, which excludes attributes from display. + HDFFV-8134 (ADB - 2013/08/01). + - h5dump: Fixed displaying compression ratio for unknown or user-defined + filters. HDFFV-8344 (XCAO 2013/03/19) + - h5dump: Changed UNKNOWN_FILTER to USER_DEFINED_FILTER for user defined filter. + HDFFV-8346 (XCAO 2013/03/19) + - h5dump: Added capability for "-a" option to show attributes containing "/" + by using an escape character. For example, for a dataset "/dset" + containing attribute "speed(m/h)", use "h5dump -a "/dset/speed(\/h)" + to show the content of the attribute. See details at HDFFV-7523 + (PC -- 2012/03/12) + - h5dump: Added ability to apply command options across multiple files using a + wildcard in the filename. Example; "h5dump -H -d Dataset1 tarr*.h5". + HDFFV-7876 (ADB - 2012/03/12). + - h5repack: Improved performance for big chunked datasets (size > 128MB) + when used with layout (-l) or compression (-f) option. + It would perform much better prior to the improvement, + especially for cases that chunk dimentions looks like + "1024x5x1" (compare to "1x5x1024"). When bigger numbers + are toward front and smaller number is toward back in chunk + dimentions. HDFFV-7862 (JKM - 2012/03/01) + - h5dump: Added new option --no-compact-subset. This option will not + interpret the '[' character as starting the compact form of + subsetting. This is useful when the "h5dump error: unable to + open dataset "datset_name"" message is output because a dataset + name contains a '[' character. HDFFV-7689 (ADB - 2012/01/31) + - h5dump: Corrected schema location: + + (ADB - 2011/08/10) + - h5diff: Added new level for -v (verbose) option. The new levels are + 1 and 2. So -v1 and -v2 can be specified to view more + information about attributes differences. + Bug#2121 (JKM 2011/3/23) + - h5dump: Added new option --enable-error-stack. This option will display + error stack information in the output stream. This is useful + when the "h5dump: Unable to print data" message is output. + (ADB - 2011/02/24) + - h5diff: Add a new flag --exclude-path. Specified path to an object will + be excluded from comparing the two files or two groups. If group + is specified all the member objects will be excluded. + (JKM - 2010/09/16). + - h5ls: Add new flag --no-dangling-links. (refer to --help for details) + (JKM - 2010/06/15) + - h5ls: Add new flag --follow-symlinks. (refer to --help for details) + (JKM - 2010/05/25) + - h5diff: Add new flag --no-dangling-links. (refer to --help for details) + (JKM - 2010/02/10) + - h5diff: Add new flag --follow-symlinks. (refer to --help for details) + (JKM - 2010/01/25) + - h5diff: fix for displaying garbage value on LE machine for BE data. + (JKM - 2009/11/20) + - h5dump: subsetting now allows default for count. Also trailing ; in short form + can be omitted after last specified value. + (ADB - 2009/09/04) + - h5dump/h5ls: now can display data in region references + using new -R, --region flag. + (ADB - 2009/09/04) + - h5diff: new flag, -c, --compare, list objects that are not comparable. + (PVN - 2009/4/10 - 1368) + - h5diff new flag, -N, --nan, avoids NaNs detection. (PVN - 2009/4/10) + - h5dump correctly specifies XML dtd / schema urls (ADB - 2009/4/3 - 1519) + - h5repack now handles group creation order. (PVN - 2009/4/2 - 1402) + - h5dump: added a printing of the compression ratio of uncompressed and compressed + sizes for cases where compression filters are present. (PVN - 2008/05/01) + - h5dump: added an option to allow a user defined formatting string for printf + regarding floating point numbers. (PVN - 2008/05/06) + - h5dump: support for external links, display the object that the external link + points to. (PVN - 2008/05/12) + - h5repack: add a userblock to an HDF5 file during the repack. (PVN - 2008/08/26) + - h5repack: add 2 options that call H5Pset_alignment in the repacked file. (PVN - 2008/08/29) + - h5ls: added capability to traverse through external links when the -r + (recursive) flag is given. (NAF - 2008/09/16) + - h5ls: added -E option to enable traversal of external links. h5ls will + not traverse external links without this flag being set. + (NAF - 2008/10/06) + - h5diff: added support for long double (PVN - 2008/10/28) + - h5dump: binary output defaults to NATIVE with -b optionally accepting + the form of binary output (NATIVE, FILE, BE, LE). (PVN - 2008/10/30) + - h5diff: return 1 for file differences when both file graphs differ by any object. + Error return code was changed to 2 from -1. (PVN - 2008/10/30) + - h5import: TEXTFPE (scientific format) was deprecated. Use TEXTFP + instead (PVN - 2008/10/30) + - h5repack: When user doesn't specify a chunk size, h5repack now defines a default + chunk size as the same size of the size of the hyperslab used to read the chunks. + The size of the hyperslabs are defined as the size of each dimension or a + predefined constant, whatever is smaller. This assures that the chunk + read fits in the chunk cache. (PVN - 2008/11/21) + - h5diff: h5diff treats two INFINITY values different. Fixed by checking (value==expect) + before call ABS(...) at h5diff_array.c This will make that (INF==INF) is true + (INF is treated as an number instead of NaN) (PC -- 2009/07/28) + - h5diff: add option "--use-system-epsilon" to print difference if (|a-b| > EPSILON) + Change default to use strict equality (PC -- 2009/09/12) + + + High-Level APIs: + --------------- + + C Packet Table API + ------------------ + - Replacement of a public function + + The existing function H5PTcreate_fl limits applications to deflate + compression only. The public function H5PTcreate is added to replace + H5PTcreate_fl. H5PTcreate takes a property list ID to provide + flexibility on creation properties. + + hid_t H5PTcreate(hid_t loc_id, const char *dset_name, + hid_t dtype_id, hsize_t chunk_size, hid_t plist_id); + (BMR, 2016/03/04, HDFFV-8623) + + - New public functions + + Two accessor functions were added per HDFFV-8623/patch 003. + /* Returns the ID of the dataset associated with the packet table */ + hid_t H5PTget_dataset(hid_t table_id); + + /* Returns the ID of the datatype the packet table uses */ + hid_t H5PTget_type(hid_t table_id); + (BMR, 2016/03/04, HDFFV-8623) + + - Regarding #ifdef VLPT_REMOVED + + The #ifdef VLPT_REMOVED blocks are removed from the PT library source + except the following cases: + + H5PTis_varlen() is made available again. + + H5PTfree_vlen_readbuff() now became H5PTfree_vlen_buff() + (BMR, 2016/03/04, HDFFV-442) + + C++ Packet Table API + -------------------- + - New constructor + + An overloaded constructor is added to FL_PacketTable and takes a property + list ID to provide flexibility on creation properties. + + FL_PacketTable(hid_t fileID, hid_t plist_id, const char* name, hid_t dtypeID, hsize_t chunkSize); + (BMR, 2016/03/08, HDFFV-8623) + + - New public functions + + Two accessor wrappers to class PacketTable, per HDFFV-8623/patch 004. + /* Returns the ID of the dataset associated with the packet table */ + hid_t PacketTable::GetDataset() + + /* Returns the ID of the datatype the packet table uses */ + hid_t PacketTable::GetDataset() + (BMR, 2016/03/04, HDFFV-8623) + + - Member functions having "char*" as an argument + + Overloaded functions were added to provide "const char*" argument, the + existing version will be deprecated. + (BMR, 2016/03/04) + + - Regarding #ifdef VLPT_REMOVED + + The #ifdef VLPT_REMOVED blocks are removed from the PT library source + except the following cases: + + VL_PacketTable::IsVariableLength() is moved to PacketTable + + VL_PacketTable::FreeReadBuff() now became PacketTable::FreeBuff() + + (BMR, 2016/03/04, HDFFV-442) + + + Internal header file + -------------------- + - A new API function H5DOwrite_chunk. It writes a data chunk directly + into a file bypassing hyperslab selection, data conversion, and + filter pipeline. The user must be careful with the function and + clearly understand the I/O process of the library. + (SLU - 2013/2/11) + - New API: h5ltpath_valid (Fortran: h5ltpath_valid_f) which checks + if a path is correct and determines if a link resolves to a valid + object and checks that the link does not dangle. (MSB- 2012/3/15) + + - Added Fortran wrappers for Dimension Scale APIs. HDFFV-3797 + h5dsset_scale_f + h5dsattach_scale_f + h5dsdetach_scale_f + h5dsis_attached_f + h5dsis_scale_f + h5dsset_label_f + h5dsget_label_f + h5dsget_scale_name_f + h5dsget_num_scales_f + (EIP for SB - 2011/10/13) + + - Table: In version 3.0 of Table, "NROWS" (used to store number of records) was + deprecated (PVN - 2008/11/24) + + Documentation + ------------- + +Support for new platforms, languages and compilers. +======================================= + - Intel V11.1 uses now -O3 optimization in production mode (EIP - 2010/10/08) + - PathScale compilers are recognized and can build the HDF5 library + properly. AKC - 2009/7/28 - + - SunOS 5.11 (emu) 32-bit and 64-bit with Sun C/C++ 5.12 compiler and + Sun Fortran 95 8.6 compiler. (SLU - 2013/04/15) + +Bug Fixes since HDF5-1.8.0 release +================================== + + Library + ------- + - Incorrect usage of list in CMake COMPILE_DEFINITIONS set_property + + The CMake command, set_property with COMPILE_DEFINITIONS property + needs a quoted semi-colon separated list of values. CMake will + transform the list to a series of -D{value} for the compile. + + (ADB - 2014/12/09, HDFV-9041) + + - H5Z.c: H5Zfilter_avail(H5Z_filter_t id) + Added else block if the call to the internal H5Z_filter_avail(id) does not + fail and returns FALSE. This block calls the H5PL_load(H5PL_TYPE_FILTER, (int)id) + function to attempt to dynamically load the filter plugin. + (ADB - 2014/03/03 HDFFV-8629) + - Added const qualifier to source buffer parameters in H5Dgather and + H5D_scatter_func_t (H5Dscatter callback). (NAF - 2013/7/02) + - Fixed an error involving failure to write fill values to the user's + buffer when reading unallocated chunks from datasets that have a + fill value set to H5D_FILL_VALUE_DEFAULT. A consequence of this + was the reporting of spurious data values in h5dump and h5diff + output. + (HDFFV-8247; JP - 2013/05/03) + - Fixed an error that could occur when calling H5Ocopy within an + H5Literate callback (and possibly other situations). + (NAF - 2012/7/25 - HDFFV-5853) + - Fixed an error that would occur when copying an object with attribute + creation order tracked and indexed. (NAF - 2012/3/28 - HDFFV-7762) + - Fixed a bug in H5Ocopy(): When copying an opened object, call the + object's flush class action to ensure that cached data is flushed + so that H5Ocopy will get the correct data. + (VC - 2012/3/27 - HDFFV-7853) + - When an application tries to write or read many small data chunks and + runs out of memory, the library had a seg fault. The fix is to + return the error stack with proper information. (SLU - 2012/3/23. + Issue 7785) + - H5Pset_data_transform had seg fault in some cases like x*-100. It + works correctly now and handles other cases like 100-x or 2/x. + (SLU - 2012/3/15. Issue 7922) + - Fixed rare corruption bugs that could occur when using the new object + header format. (NAF - 2012/3/15 - HDFFV-7879) + - Creating a dataset in a read-only file caused seg fault when the file + is closed. It's fixed. The attemp to create a dataset will fail + with the error stack indicating the file is read-only. (SLU - + 2012/1/25. Issue 7756) + - Fixed a seg fault that could occur when shrinking a dataset with chunks + larger than 1 MB. (NAF - 2011/11/30 - HDFFV-7833) + - Fixed a bug that could cause file corruption when copying named + datatypes to a file using shared messages. (NAF - 2011/11/14) + - Fixed a bug that could cause H5Oget_info to return the wrong address + after copying a named datatype. (NAF - 2011/11/14) + - The library allowed the conversion of strings between ASCII and UTF8 + (Issue 7582). We have corrected it to report an error under this + situation. (SLU - 2011/11/8) + - The library had seg fault when it tried to shrink the size of compound type + through H5Tset_size immediately after the type was created (Issue + 7618). It's fixed now. (SLU - 2011/10/26) + - Fixed a bug that occurred when using H5Ocopy on a committed datatype + containing an attribute using that committed datatype. + (NAF - 2011/10/13 - Issue 5854) + - #ifdef _WIN32 instances changed to #ifdef H5_HAVE_WIN32_API and added + H5_HAVE_VISUAL_STUDIO checks where necessary. CMake only as configure + never set _WIN32. + - CLANG compiler with the options -fcatch-undefined-behavior and -ftrapv + discovered 3 problems in tests and tools' library (Issue 7674): + 1. In dsets.c, left shifting an unsigned int for 32 bits or more + caused undefined behavior. + 2. In dt_arith.c, the INIT_INTEGER macro definition has an overflow + when the value is negative minimal and is being subtracted one. + 3. In tools/lib/h5tools_str.c, right shifting an int value for 32 bits + or more caused undefined behavior. + All the problems have been corrected. (SLU - 2011/9/2) + - In v1.6 library, there was EOA for the whole MULTI file saved in the + super block. We took it out in v1.8 library because it's meaningless + for the MULTI file. v1.8 library saves the EOA for the metadata file, + instead. But this caused some backward compatibility problem. + v1.8 library couldn't open the file created with v1.6 library. We + fixed the problem by checking the EOA value to detect the file + created with v1.6 library. (SLU - 2011/6/22) + - When a dataset had filters and reading data failed, the error message + didn't say which filter isn't registered. It's fixed now. + (SLU - 2011/6/3) + - The datatype handler created with H5Tencode/decode used to have the + reference count 0 (zero). I have fixed it. It is 1 (one) now. + (SLU - 2011/2/18) + - Fixed a bug that caused big endian machines to generate corrupt files + when using the scale-offset filter with floating point data or + fill values. Note that such datasets will no longer be readable + by any machine after this patch. (NAF - 2010/02/02 - Bug 2131) + - Retrieving a link's name by index in the case where the link is + external and the file that the link refers to doesn't exist will + now fail gracefully rather than cause a segmentation fault. + (MAM - 2010/11/17) + - Modified library to always cache symbol table information. Libraries + version 1.6.3 have a bug which causes them to require this + information for some operations. (NAF - 2010/09/21 - 1864) + - Fixed a bug that could occur when getting information for a new-style + group that was previously opened through a file handle that was + later closed. (NAF - 2010/09/15) + - Added define check in H5public.h if stdint.h is supported by the C++ + compiler. This define is only available on Windows with VS2010 and + using CMake to build the library. (ADB - 2010/09/13 - Bug 1938) + - H5Eset_current_stack now also closes the error stack to be set as the + default. This is to avoid a potential problem (Bug 1799). + (SLU - 2010/9/7) + - Fixed the bug in the filter's public CAN_APPLY function. The return + value should be htri_t not herr_t (Bug #1239). (SLU - 2010/8/5) + - Fixed a bug in the direct I/O driver that could render files with + certain kinds of unaligned data unreadable or corrupt them. + (NAF - 2010/07/28) + - valgrind reported an error of copying data to itself when a new attribute + is written (Bug #1956). I fixed it by taking out the memcpy step in + the attribute code. (SLU - 2010/07/28) + - Fixed a bug that could cause file corruption when using non-default + sizes of addresses and/or lengths. This bug could also cause + uncorrupted files with this property to be unreadable. This bug + was introduced in 1.8.5. (NAF - 2010/07/16 - 1951) + - Fixed a file corruption bug that could happen when shrinking a + compressed dataset. (NAF - 2010/05/20) + - Fixed some memory leaks in VL datatype conversion when strings are + used as fill values. (MAM - 2010/05/12 - BZ# 1826) + - Fixed a bug when copying objects with NULL references with the + H5O_COPY_EXPAND_REFERENCE_FLAG flag set. (NAF - 2010/04/08 - 1815) + - Files can now be concurrently opened more than once using the core file + driver, as long as the backing store is used. (NAF - 2010/03/09) + - Added support for H5O_COPY_EXPAND_EXT_LINK_FLAG to H5Ocopy. External + links will now be expanded if this flag is set. + (NAF - 2010/03/05 - 1733) + - Fixed a bug where the library, when traversing an external link, would + reopen the source file if nothing else worked. (NAF - 2010/03/05) + - Fixed an intermittent bug in the b-tree code which could be triggered + by expanding and shrinking chunked datasets in certain ways. + (NAF - 2010/02/16) + - H5Tdetect_class said a VL string is a string type. But when it's + in a compound type, it said it's a VL type (Bug #1584). I fixed it + to be consistent. It always return string type. (SLU - 2009/12/10) + - Fixed a bug where writing and deleting many global heap objects (i.e. + variable length data) would render the file unreadable. Previously + created files exhibiting this problem should now be readable. + (NAF - 2009/10/27 - 1483) + - Fixed incorrect return value for H5Pget_preserve. (AKC - 2009/10/08 - 1628) + - Fixed an assertion failure that occurred when H5Ocopy was called on a + dataset using a vlen inside a compound. (NAF - 2009/10/02 - 1597) + - Fixed incorrect return value for H5Pget_filter_by_id1/2 in H5Ppublic.h. + (NAF - 2009/09/25 - 1620) + - Fixed a bug where properties weren't being compared with the registered + compare callback. (NAF - 2009/09/25 - 1555) + - Fixed a bug where H5Pget_fitler_by_id would succeed when called for a + filter that wasn't present. (NAF - 2009/06/25 - 1250) + - Fixed an issue with committed compound datatypes containing a vlen. + Also fixed memory leaks involving committed datatypes. + (NAF - 2009/06/10 - 1593) + - Added versioning to H5Z_class_t struct to allow compatibility with 1.6 + API. (NAF - 2009/04/20 - 1533) + - Fixed a problem with using data transforms with non-native types in the + file. (NAF - 2009/04/20 - 1548) + - Added direct.h include file to windows section of H5private.h + to fix _getcwd() warning. (ADB - 2009/04/14 - 1536) + - Fixed a bug that prevented external links from working after calling + H5close(). (NAF - 2009/04/10 - 1539) + - Modified library to write cached symbol table information to the + superblock, to allow library versions 1.3.0 to 1.6.3 to read files + created by this version. (NAF - 2009/04/08 - 1423) + - Changed skip lists to use a deterministic algorithm. The library should + now never call rand() or srand(). (NAF - 2009/04/08 - 503) + - Fixed a bug where H5Lcopy and H5Lmove wouldn't create intermediate + groups when that property was set. (NAF - 2009/04/07 - 1526) + - Fixed a bug that caused files with a user block to grow by the size of + the user block every time they were opened. + (NAF - 2009/03/26 - 1499) + - Fixed a rare problem that could occur with files using the old (pre 1.4) + array datatype. (NAF - 2009/03/23) + - Modified library to be able to open files with corrupt root group symbol + table messages, and correct these errors if they are found. Such + files can only be successfully opened with write access. + (NAF - 2009/03/23 - 1189) + - Removed the long_long #define and replaced all instances with + "long long". This caused problems with third party products. All + currently supported compliers support the type. (ADB - 2009/03/05) + - Fixed various bugs that could prevent the fill value from being written + in certain rare cases. (NAF - 2009/02/26 - 1469) + - Fixed a bug that prevented more than one dataset chunk from being cached + at a time. (NAF - 2009/02/12 - 1015) + - Fixed an assertion failure caused by opening an attribute multiple times + through multiple file handles. (NAF - 2009/02/12 - 1420) + - Fixed a problem that could prevent the user from adding attributes (or + any object header message) in some circumstances. + (NAF - 2009/02/12 - 1427) + - Fixed a bug that could cause problems when an attribute was added to a + committed datatype using the committed datatype's datatype. + (NAF - 2009/02/12) + - Fixed a bug that could cause problems when copying an object with a + shared message in its own object header. (NAF - 2009/01/29) + - Changed H5Tset_order to properly reject H5T_ORDER_NONE for most + datatypes. (NAF - 2009/01/27 - 1443) + - Fixed a bug where H5Tpack wouldn't remove trailing space from an + otherwise packed compound type. (NAF - 2009/01/14) + - Fixed up some old v2 btree assertions that get run in debug mode that + were previously failing on compilation, and removed some of the + more heavily outdated and non-rewritable ones. (MAM - 2008/12/15) + - Fixed a bug that could cause problems when "automatically" unmounting + multiple files. (NAF - 2008/11/17) + - H5Ovisit and H5Ovisit_by_name will now properly terminate when the + callback function returns a positive value on the starting object. + (NAF - 2008/11/03) + - Fixed an error where a null message could be created that was larger + than could be written to the file. (NAF - 2008/10/23) + - Corrected error with family/split/multi VFD not updating driver info + when "latest" version of the file format used. (QAK - 2008/10/14) + - Corrected alignment+threshold errors to work correctly when metadata + aggregation is enabled. (QAK - 2008/10/06) + - Changed H5Fget_obj_count and H5Fget_obj_ids to ignore objects registered + by the library for internal library use. (NAF - 2008/10/06) + - Fixed potential memory leak during compound conversion. + (NAF - 2008/10/06) + - Changed the return value of H5Fget_obj_count from INT to SSIZE_T. Also + changed the return value of H5Fget_obj_ids from HERR_T to SSIZE_T and + the type of the parameter MAX_OBJS from INT to SIZE_T. (SLU - 2008/09/26) + - Fixed an issue that could cause data to be improperly overwritten + during compound type conversion. (NAF - 2008/09/19) + - Fixed pointer alignment violations that could occur during vlen + conversion. (NAF - 2008/09/16) + - Fixed problem where library could cause a segmentation fault when + an invalid location ID was given to H5Giterate(). (QAK - 2008/08/19) + - Fixed improper shutdown when objects have reference count > 1. The + library now tracks reference count due to the application separately + from that due to internal library routines. (NAF - 2008/08/19) + - Fixed assertion failure caused by incorrect array datatype version. + (NAF - 2008/08/08) + - Fixed an issue where mount point traversal would fail when using + multiple handles for the child. (NAF - 2008/08/07) + - Fixed an issue where mount points were inaccessible when using multiple + file handles for the parent. The mount table is now in the shared + file structure (the parent pointer is still in the top structure). + (NAF - 2008/08/07) + - when an attribute was opened twice and data was written with one of the handles, + the file didn't have the data. It happened because each handle had its own + object structure, and the empty one overwrote the data with fill value. This is + fixed by making some attribute information like the data be shared in the + attribute structure. SLU - 2008/07/22 + - Fixed issue where a group could have a file mounted on it twice. + (QAK - 2008/07/15) + - Fixed a Windows-specific issue in the ohdr test which was causing users + in some timezones to get false errors. This a deficiency in the Windows + mktime() function, and has been handled properly. SJW - 2008/06/19 + - Fixed the problem with the searching of target file for H5Lcreate_external(). + The searching pattern will depend on whether the target file's + pathname is an absolute or a relative path. Please see the description + in the RM for H5Lcreate_external(). (VC - 2008/04/08) + - Fixed possible file corruption bug when encoding datatype + descriptions for compound datatypes whose size was between + 256 & 511 bytes and the file was opened with the "use the + latest format" property enabled (with H5Pset_libver_bounds). + (QAK - 2008/03/13) + - Fixed bug in H5Aget_num_attrs() routine to handle invalid location + ID correctly. (QAK - 2008/03/11) + - H5Dset_extent: when shrinking dimensions, some chunks were not deleted. + (PVN - 2009/01/8) + - Added code to maintain a min_clean_fraction in the metadata cache when + in serial mode. (MAM - 2009/01/9) + + + + Configuration + ------------- + - CMake: When CMake commands are executed individually on the command line + and the external filters are being built, the CMAKE_BUILD_TYPE define + must be set to the same value as the configuration + (-DCMAKE_BUILD_TYPE:STRING=Release if using -C Release). This is needed + by the the szip and zlib filter build commands. (ADB - HDFFV-8695) + - CMake: Remove use of XLATE_UTILITY program. (ADB - 2014/03/28 HDFFV-8640) + - CMake: Added missing quotes in setting the CMAKE_EXE_LINKER_FLAGS for the + MPI option. (ADB - 2014/02/27 HDFFV-8674) + - Modified H5detect.c to scan floating point types for padding bits before + analyzing the type further. This should fix problems with gcc 4.8 + (NAF - 2013/09/19 - HDFFV-8523/HDFFV-8500) + - Fixed Makefile issue in which "-Wl," was not properly specified + prior to -rpath when building parallel fortran libraries with + an Intel compiler. (MAM - 2012/03/26) + - Makefiles generated by other packages using h5cc as the compiler + no longer error when 'make' is invoked more than once in order + to 'rebuild' after changes to source. (MAM - 2012/03/26) + - Added --enable-fortran2003 flag to enable Fortran2003 support + in the HDF5 Fortran library. The flag should be used along with the + --enable-fortran flag and takes affect only when Fortran compiler + is Fortran2003 compliant. (EIP - 2011/11/14) + + - In Windows platform, the default VFD, was Windows VFD, is restored back + to the SEC2, aka POSIX, VFD. The Windows VFD is deprecated. HDFFV-7740 + (AKC 2011/09/26) + - Removed config/ibm-aix6.x. All IBM-AIX settings are in one file, + ibm-aix. (AKC - 2011/4/14) + - Shared C libraries are no longer disabled on Mac when Fortran + is enabled. Shared Fortran libraries are still not supported on Mac, + so configure will disable them by default, but this is overridable + with the new --enable-unsupported configure option. The configure + summary has been updated to reflect the fact that the shared-ness of + the C++/Fortran wrapper libraries may not align with the C library. + (MAM - 04/11/2011 - HDFFV-4353). + - Removed recognition of the parallel compilers of LAM(hcc) and + ChMPIon(cmpicc) since we have no access to these two MPI implementations + and cannot verify their correctness. (AKC - 2010/7/14 - Bug 1921) + - Removed the following config files, as we no longer support them: + config/dec-osf*, config/hpux11.00, config/irix5.x, + config/powerpc-ibm-aix4.x config/rs6000-ibm-aix5.x config/unicos* + MAM - 2009/10/08 + - Modified configure and make process to properly preserve user's CFLAGS + (and company) environment variables. Build will now properly use + automake's AM_CFLAGS for any compiler flags set by the configure + process. Configure will no longer modify CFLAGS directly, nor will + setting CFLAGS during make completely replace what configure has set up. + MAM - 2009/10/08 + - Support for TFLOPS, config/intel-osf1, is removed since the TFLOPS + machine has long retired. AKC - 2009/10/06. + - Added $(EXEEXT) extension to H5detect when it's executed in the + src/Makfile to generate H5Tinit.c so it works correctly on platforms + that require the full extension when running executables. + MAM - 2009/10/01 - BZ #1613 + - Configure will now set FC and CXX to "no" when fortran and c++ + are not being compiled, respectively, so configure will not run + some of the compiler tests for these languages when they are not + being used. MAM - 2009/10/01 + - The PathScale compiler (v3.2) was mistaken as gcc v4.2.0 but it fails to + recognize some gcc options. Fixed. (see bug 1301). AKC - 2009/7/28 - + - The --enable-static-exec flag will now properly place the -static flag + on the link line of all installed executables. This will force the + executable to link with static libraries over shared libraries, provided + the static libraries are available. MAM - 2009/08/31 - BZ #1583 + - The --includedir=DIR configuration option now works as intended, and can + be used to specify the location to install C header files. The default + location remains unchanged, residing at ${prefix}/include. + MAM - 2009/03/10 - BZ #1381 + - Configure no longer removes the '-g' flag from CFLAGS when in production + mode if it has been explicitly set in the CFLAGS environment variable + prior to configuration. MAM - 2009/03/09 - BZ #1401. + - Fixed error with 'make check install' failing due to h5dump + needing other tools built first. MAM - 2008/10/24. + - Wpen using shared szip, it is no longer necessary to specify + the path to the shared szip libraries in LD_LIBRARY_PATH. MAM - + 2008/10/24. + - The file libhdf5_fortran.settings is not installed since its content + is included in libhdf5.settings now. AKC - 2008/10/21 + - "make DESTDIR=xxx install" failed to install some tools and files + (e.g., h5cc and fortran modules). Fixed. AKC - 2008/10/8. + - Autotools: An export of LD_LIBRARY_PATH= was + removed from configure and make installcheck was revised to run + scripts installed in share/hdf5_examples to use the installed h5cc, etc. + to compile and run example source files also installed there. Make + installcheck will now fail when a shared szip or other external lib file + cannot be found in the same manner that executables compiled and linked + with h5cc will fail to run when those lib files cannot be found after + install. Make installcheck should pass after setting LD_LIBRARY_PATH to the + szip location. + (LRK - 2014/04/16) + + Performance + ------------- + - Removed program perform/benchpar from the enable-build-all list. The + program will be retired or moved to another location. HDFFV-8156 + (AKC 2012/10/01) + - Retired program perform/mpi-perf. Its purpose has been incorporated + into h5perf before. (AKC 2012/09/20) + - ifdefs added to tests around include unistd.h and function to simulate + getlogin() on Windows. + (ADB - 2011/08/15) + - perf_serial test added to Windows projects and check batch file. + (ADB - 2009/06/11) + Fortran + -------- + - Fixed a typo in return value of the nh5dread_f_c function ( was 1 + instead of 0 on success); fixed the return value to make it consistent + with other Fortran functions; cleaned the code from debug statements. + (EIP - 2012/06/23) + + - Fixed problem writing/reading control characters to a dataset; writing + a string containing: alerts, backspace, carriage_return, form_feed, + horizontal_tab, vertical_tab, new_line is now tested and working. + (MSB - 2012/09/01) + + - Corrected the integer type of H5S_UNLIMITED_F to HSIZE_T (MSB - 2012/09/01) + + - Corrected the number of continuation lines in the src files + to be less then 32 lines for F95 compliance. (MSB - 2012/10/01) + + Tools + ----- + - h5dump subsetting fixed for dims greater then two + When a dataset has more then two dimensions, subsetting would incorrectly + calculate the data that needed to be displayed. + Added in block and stride calculation that account for dimensions greater + then two. NOTE: lines that have line breaks inserted because of display + length calculations, may have index info that is incorrect until the next + dimension break. (ADB, 2016/03/04, HDFFV-9698) + - h5repack: h5repack would not attempt to remove UD filters. Added a + check to h5repack for UD filters that checks if the filter can + be dynamically loaded. This will require a change in the library to + add the H5PL_load() to the H5Zfilter_avail(). (ADB - 2014/03/03 HDFFV-8629) + - h5repack: Fixed failure for converting a layout of small chunked dataset + (size < 1K) to contiguous layout. HDFFV-8214 (JKM 2013/03/18) + - h5diff: Fixed to return correct exit code 1 when detect unique extra + attribute. Prior to this fix, h5diff returned exit code 0 indicating + two files are identical. HDFFV-7643 (JKM 2013/02/15) + - h5diff: Improved speed when comparing HDF5 files with lots of + attributes. Much slower performance was identified with release + version from 1.8.7 to 1.8.10 compared to 1.8.6. (JKM 2012/10/19) + - h5repack: "h5repack -f NONE file1.h5 out.h5" command failed if + source file contains chunked dataset and a chunk dim is bigger than + the dataset dim. Another issue is that the command changed max dims + if chunk dim is smaller than the dataset dim. + These issue occurred when dataset size is smaller than 64k (compact + size limit) Fixed both. + HDFFV-8012 (JKM 2012/09/24) + - h5diff: Fixed not to accumulate attribute difference to dataset + difference in verbose mode (-v, -r), which caused incorrect + difference between dataset and group/datatype object if attribute + exist with any differences. This also lead to fix inconsistent + format indicating difference between dataset and group/datatype + object. HDFFV-5919 (JKM 2012/09/05) + - h5diff: Fixed the incorrect result when comparing attribute data + values and the data type has same class but different size. + HDFFV-7942 (JKM 2012/08/15) + - ph5diff: Fixed intermittent hang issue on a certain operation in + parallel mode. It was detected by daily test for comparing + non-comparable objects, but it could have occurred in other + operations depend on machine condition. HDFFV-8003 (JKM 2012/08/01) + - h5diff: Fixed test failure for "make check" due to failure of + copying test files when performed in HDF5 source tree. Also applied + to other tools. + HDFFV-8107 (JKM 2012/08/01) + - h5diff: Fixed the Function COPY_TESTFILES_TO_TESTDIR() of + testh5diff.sh to better report when there is an error in the file + copying. HDFFV-8105 (AKC -2012/07/22) + - h5diff: Fixed not to check and display dangling link status without + --follow-symlinks option. This also improved performance when + comparing lots of external links without the --follow-symlinks + option. HDFFV-7998 (JKM 2012/04/26) + - h5unjam: Fixed sefgault when used -V (show version) option. + HDFFV-8001 (JKM 2012/04/19) + - h5repack: Fixed a failure when change the chunk size of a specified + chunked dataset with unlimited max dims. HDFFV-7993 (JKM 2012/04/11) + - h5diff: Fixed failure for comparing same named object with different + object types in comparing groups. Prior to the fix, h5diff resulted + in error. After the fix, h5diff detects such case as non-comparable + and display messages accordingly. HDFFV-7664 (JKM 2012/03/28) + - h5diff: If unique objects exists only in one file and try to exclude + the unique objects with --exclude-path option, h5diff missed + excluding some objects. + Fixed to exclude objects correctly in such case. + HDFFV-7837 (JKM 2012/03/20) + - h5dump: Added tools library error stack to properly catch error + information generated within the library. + HDFFV-7958 (ADB 2012/03/12) + - h5dump: Dangling links no longer throw error message, change process + when open link fails. + HDFFV-7839 (ADB 2012/03/12) + - h5diff: When two symbolic dangling links are compared with + --follow-symlinks option, the result should be same. It worked for + comparing two files, but didn't work for comparing two objects. + HDFFV-7835 (JKM 2012/03/09) + - h5dump: Refactored code to remove duplicated functions. Split XML + functions from DDL functions. Corrected indentation and formatting + errors. Also fixed subsetting counting overflow (HDFFV-5874). Verified + all tools call tools_init() in main. + HDFFV-7560 (ADB 2012/02/17) + - h5diff: fixed to prevent from displaying error stack message when + comparing the two dangling symlinks with follow-symlinks option. + HDFFV-7836 (JKM 2012/01/13) + - h5repack: fixed memory leak for handling variable length string in + attribute. HDFFV-7840 (JKM 2012/01/06) + - h5ls: fixed segfault when access region reference data in an + attribute. HDFFV-7838 (JKM 2011/12/29) + - h5diff: fixed segfault over non-comparable attribute with different + dimention or rank, along with '-c' option to display details. + HDFFV-7770 (JKM 2011/10/24) + - Fixed h5diff to display all the comparable object and attribute + regardless of non-comparables. HDFFV-7693 (JKM 2011/09/16) + - Fixed h5repack to update values of references(object and region) of + attributes in h5repack for 1) references, 2) ARRAY of references, + 3) VLEN of references, and 4) COMPOUND of references. + (JIRA HDF5 5932) PC -2011/09/14 + - h5diff: fixed segfault over dataset with container types + (array,lven) with multiple nested compound types. + (ex: compound->array->compound, compound->vlen->compound) + HDFFV-7712 JKM (2011/09/01) + - h5repack: added macro to handle failure in H5Dread/write when memory + allocation failed inside the library. (PC -- 2011/08/19) + - Fixed h5jam not to allow specifying an HDF5 formatted file as input + file for -u (user block file) option, because the original HDF5 file + will not be accessible if allows. HDFFV-5941 (JKM 2011/08/15) + - Revised command help pages of h5jam and h5unjam. The descriptions + were not up to date and some were missing. + HDFFV-7515 (JKM 2011/08/15) + - h5repack: h5repack failed to copy dataset if the layout is changed + from chunked with unlimited dims to contiguous. HDFFV-7649 + (PC -- 2011/07/15) + - h5diff: "--delta" option considers two NaN of the same type are + different, which is wrong based on h5diff description in Reference + Manual. HDFFV-7656 (PC -- 2011/07/15) + - Fixed h5diff to display instructive error message and exit with 1 + when mutually exclusive options (-d, -p and --use-system-epsilon) + are used together. HDFFV-7600 (JKM 2011/07/07) + - Fixed h5dump to display the first line of each element into correct + position for multiple dimention array type. + Before this fix, the first line of each element in array were + displayed after the last line of previous element without + moving to the next line (+indentation). + Bug #HDFFV-5878 (JKM 2011/06/15) + - Fixed h5dump to display correct value for H5T_STD_I8LE dataset + on a system (ppc64, linux, Big-Endian, clustering). + Bug #HDFFV-7594 (ABERT & JKM 2011/05/12) + - Fixed h5diff to compare file itself correctly. Previously h5diff + reported either different or not compatible in certain cases even + comparing file itself. This fix also improve performance when + comparing same target objects through verifying the obj&file + addresses before comparing the details in the objects (ex: datasets + or attributes) Bug #HDFFV-5928 (XCAO & JKM 2011/05/06) + - Updated h5dump test case script to prevent entire test failure upon + source directory is read-only. Bug# HDFFV-4342 (JKM 2011/4/12) + - Fixed h5dump displaying incorrect values for H5T_STD_I8BE type data in + attribute on Big-Endian machine. H5T_STD_I8BE is unsigned 8bit type, + so h5dump is supposed to display -2 instead of 254. It worked + correctly on Little-Endian system , but not on Big-Endian system. + Bug #HDFFV-4358 (JKM 2011/04/08) + - Updated to unify option name to '--enable-error-stack' for printing + HDF5 error stack messages for HDF5 tools. h5ls and h5dump for now. + For h5ls, this replaces "-e/--errors" option, which is deprecated. + Bug#2182 (JKM 2011/3/30) + - Fix h5diff for --use-system-epsilon option: the calculation changed + from ( |a - b| / b ) to ( |a - b| ). This was decided for better + performance. Bug#2184 (JKM 2011/3/24) + - Fixed output for H5T_REFERENCE in h5dump. According to the BNF document + the output of a H5T_REFERENCE should be followed by the type; + ::= H5T_REFERENCE { } + ::= H5T_STD_REF_OBJECT | H5T_STD_REF_DSETREG + Previously this was only displayed if the -R option was used. + Bug#1725 (ADB 2011/3/28) + - Fix h5diff issues for #1: h5diff compared attributes correctly only + when two objects have the same number of attributes and attribute + names are identical, #2: didn't display useful information about + attribute difference. Bug#2121 (JKM 2011/3/17) + - Fixed memory leak for h5diff when accessing symbolic links with + --follow-symlink option. Bug#2214 (JKM 2011/3/18) + - Fixed memory leak for h5diff when access variable length string + data. Bug#2216 (JKM 2011/3/18) + - Fixed and improved help page for -a option of h5ls. + Bug#1904 (JKM 2011/3/11) + - Fixed h5dump not to include attribute values in the output file when + h5dump "-y -o output_file" options were used. The problem was introduced + in HDF5 1.8.6 by showing data pointed by region references. (XCAO 2011/3/9) + - Fixed h5copy to be able to copy any object into the same HDF5 file. + Previously h5copy displayed error message when target file is same + as source file. (XCAO 2011/3/8) + - Fixed h5dump for skipping some values for long array type dataset on + Windows. This issue only occurred on Windows due to the different + return behavior from _vsnprintf() funtion. Bug#2161 (JKM 2011/3/3) + - Fixed h5dump for skipping array indices every certain number + when the array type dataset is relatively big. The certain number + varies according to the size of array. Bug#2092 (JKM 2011/2/15). + - Fixed h5diff for the segfault when compares compound datasets + with combination of fixed length string types and vlen string types + in certain orders. bug#2089 (JKM 2010/12/28) + - Improve h5diff performance. 1) use HDmemcmp() before comparing each + elements. 2) replace expensive H5Tequals() calls 3) retrieve datatype + information at dataset level not each element level for compound + datasets + - Fixed h5ls to display nested compound type with curly bracket + when -S (--simple) option is used with -l (--label), so it shows + which member (in curly bracket) belong to which nested compound type + and make the output make sense. bug#1979 (JKM 2010/11/09) + - Fixed h5diff to handle variable-length strings in a compound dataset + correctly. (also variable-length string array in a compound dataset) + Garbage values were displayed when h5diff compared multiple + variable-length strings in a compound type dataset. + Bug#1989 (JKM 2010/10/28) + - Fixed h5copy to fail gracefully when copying object to non-exist + group without -p option. Bug#2040 (JKM 2010/10/18) + - Fixed to compare member objects and groups recursively when two + files or groups are specified to be compared. Bug#1975 + (JKM 2010/9/16) + - Make h5repack be able to convert a layout to COMPACT for small size + dataset as default. bug#1896 (JKM 2010/09/15) + - Change h5ls not to manipulate special characters in object name or + attribute name for smart display. bug#1784 (JKM 2010/06/28) + - Fixed h5ls to return exit code 1 (error) when non-existent file is + specified. bug#1793. (JKM 2010/04/27) + - h5copy failed to copy dangling link when the link is specified + directly. bug#1817. (JKM 2010/04/22) + - h5repack lost attributes from a dataset of reference type. bug#1726. + (JKM 2010/3/25) + - h5repack sets NULL for object reference value for group or + named datatype. bug#1814. (JKM 2010/03/19) + - h5diff: fixed incorrect behavior (hang) in parallel mode when + specify invalid options (ex: -v and -q) (JKM 2010/02/17) + - h5dump/h5ls display buffer resize fixed in tools library. + (ADB - 2009/07/21 - 1520) + - Fixed many problems that could occur when using h5repack with named + datatypes. (NAF - 2009/4/20 - 1516/1466) + - h5dump, h5diff, h5repack were not reading (by hyperslabs) datasets + that have a datatype datum size greater than H5TOOLS_BUFSIZE, a + constant defined as 1024Kb, such as array types with large + dimensions (PVN - 2009/4/1 - 1501) + - h5import: By selecting a compression type, a big endian byte order was being + selected (PVN - 2009/3/11 - 1462) + - zip_perf.c had missing argument on one of the open() calls. Fixed. + (AKC - 2008/12/9) + - h5dump now checks for uniqueness of committed datatypes. + (NAF - 2008/10/15) + - Fixed unnecessary indentation of committed datatypes in h5dump. + (NAF - 2008/10/15) + - Fixed bugs in h5stat:segmemtation fault when printing groups and + print warning message when traversal of objects is unsuccessful. + (see bug #1253) (VC- 2008/10/13) + - Fixed bug in h5ls that prevented relative group listings (like + "h5ls foo.h5/bar") from working correctly (QAK - 2008/06/03) + - Fixed bug in h5diff that prevented datasets & attributes with + variable-length string elements from comparing correctly. + (QAK - 2008/02/28) + - h5import bug on Windows w/binary datasets. fread in windows needs a + binary file to be open with 'rb' instead of 'r' otherwise it + terminates execution if an end of file character is found on the + input file. Besides that the binary file generated needs to be open + with 'wb' , otherwise an end of line character is read twice. + (PVN - 2008/02/19) + - Fixed bug in h5dump that caused binary output to be made only for the first + dataset, when several datasets were requested. (PVN - 2008/04/07) + - h5dump: when doing binary output (-b), the stdout printing of attributes + was done incorrectly. Removed printing of attributes when doing binary + output. PVN - 2008/06/05 + + + High-Level APIs: + ------ + - Packet Table is updated. + + In the Packet Table C API, there are changes with the following functions, + which had been ifdef'ed out with VLPT_REMOVED since 2006 + * H5PTcreate_vl, is removed from this release + * H5PTfree_vlen_readbuff, is renamed to H5PTfree_vlen_buff + * H5PTis_varlen, is made available again + + Various cleanup: replacing 0/-1 with SUCCEED/FAIL and H5I_BADID with + H5I_INVALID_HID. (BMR, 2016/03/04, HDFFV-442) + + - Fixed problem with H5DSget_scale_name including the NULL terminator in + the size calculation returned by the function. The API does not + include the NULL terminator in the size returned (MSB- 2013/2/10) + + - Fixed problem with H5TBdelete_record destroying all data following the deletion + of a row. (MSB- 2012/7/26) + + - Fixed H5LTget_attribute_string not closing an object identifier when an + error occurs. (MSB- 2012/7/21) + + - Fixed the H5LTdtype_to_text function. It had some memory problems when + dealing with some complicated data types. HDFFVI-7701 (SLU - 2011/10/19) + + - Fixed a bug in H5DSattach_scale, H5DSis_attached and H5DSdetach_scale + caused by using H5Tget_native_type function to determine the native + type for reading REFERENCE_LIST attribute. The bug was exposed + on Mac PPC. + (EIP - 2010/05/22 -1851) + - Fixed a bug in the H5DSdetach_scale function when 0 bytes + were allocated after the last reference to a dim. scale + was removed from the list of references in a VL element of the + DIMENSION_LIST attribute; modified the function to comply + with the Spec: DIMENSION_LIST attribute is deleted now when no + dimension scales left attached. + (EIP - 2010/05/14 -1822) + - Fixed a bug where the H5TB API would forget the order of fields when + added out of offset order. (NAF - 2009/10/27 - 1582) + - H5DSis_attached failed to account for different platform types. Added a + get native type call. (ADB - 2009/9/29 - 1562) + - Dimension scales: The scale index return value in H5DSiterate_scales was not always + incremented. (PVN - 2009/4/8 - 1538) + + Fortran High-Level APIs: + ------ + + - Lite: The h5ltget_attribute_string_f used to return the C NULL character in the + returned character buffer. The returned Fortran charactor buffer now does + not return the C NULL character. (MSB - 2012/3/23) + - Lite: The h5ltget_dataset_info_f function (gets information about a dataset) + was not correctly returning the dimension array. (PVN - 2009/3/23) + - Lite: the h5ltread_dataset_string_f and h5ltget_attribute_string_f functions + had memory problems with the g95 fortran compiler. (PVN � 5/13/2009) 1522 + + + + + + Documentation + ------------- + + + F90 APIs + -------- + - Modified the h5open_f and h5close_f subroutines to not to call H5open + and H5close correspodningly. While the H5open call just adds overhead, + the H5close call called by an Fortran application shuts down the HDF5 + library making it unaccessible to the application. + HDFFV-915 (EIP & SB - 2011/10/13) + + + C++ APIs + -------- + - The constructor PropList::PropList(id) was fixed to act properly + according to the nature of 'id'. When 'id' is a property class id, + a new property list will be created. When 'id' id a property list id, + a copy of the property list will be made. (BMR - 2010/5/9) + - The parameters 'size' and 'bufsize' in CommonFG::getLinkval and + CommonFG::getComment, respectively, now have default values for + user's convenience. (BMR - 2009/10/23) + - NULL pointer accessing was fixed, bugzilla 1061. (BMR - 2009/10/05) + - read/write methods of DataSet and Attribute classes were fixed + to handle string correctly. (BMR - 2009/07/26) + - Fixed bug that caused segfaults in Attribute::read. (BMR - 2008/04/20) + - Fixed bug in PropList::getClassName to use portable HDfree instead + of free. (BMR - 2008/04/20) + - Fixed a design bug which allowed an Attribute object to create/modify + attributes (bugzilla #1068). The API class hierarchy was revised + to address the problem. Classes AbstractDS and Attribute are moved + out of H5Object. Class Attribute now multiply inherits from + IdComponent and AbstractDs and class DataSet from H5Object and + AbstractDs. In addition, the data member IdComponent::id was + moved into subclasses: Attribute, DataSet, DataSpace, DataType, + H5File, Group, and PropList. (BMR - 2008/08/10) + - IdComponent::dereference was incorrect and replaced as described + in "New Features" section. + (BMR - 2008/08/10) + + Testing + ------- + - tools/h5diff/testh5diff.sh is run in every "make check", even after it + has passed in the previous run. It should not run again if there is no + code changes. Fixed. (AKC - 2013/07/19 HDFFV-8392) + - In some Mac system, testlibinfo.sh failed with this error: + Check file ../src/.libs/libhdf5.7.dylib + strings: object: ../src/.libs/libhdf5.7.dylib malformed object \ + (unknown load command 15) + The strings command of Mac inspects library files and older + versions of strings may not know newer library format, resulting + in errors. Fixed by sending the library file as stdin to the strings + coommand to avoid this problem. (AKC - 2013/03/08 HDFFV-8305) + + - Fixed a typo in the ERROR macro in test/testhdf5.h. It segmentation + faulted when used before. (AKC - 2013/02/12 HDFFV-8267) + + +Supported Platforms +=================== + AIX 6.1 xlc 10.1.0.5 + (NASA G-ADA) xlC 10.1.0.5 + xlf90 12.1.0.6 + + Linux 2.6.18-308.13.1.el5PAE GNU C (gcc), Fortran (gfortran), C++ (g++) + #1 SMP i686 i686 i386 compilers for 32-bit applications; + (jam) Version 4.1.2 20080704 (Red Hat 4.1.2-54) + Version 4.8.2 + PGI C, Fortran, C++ Compilers for 32-bit + applications; + Version 13.7-0 + Intel(R) C, C++, Fortran Compiler for 32-bit + applications; + Version 14.0.2 (Build 20140120) + + Linux 2.6.18-371.6.1.el5 GNU C (gcc), Fortran (gfortran), C++ (g++) + #1 SMP x86_64 GNU/Linux compilers for 64-bit applications; + (koala) Version 4.1.2 20080704 (Red Hat 4.1.2-54) + Version 4.8.2 + Intel(R) C, C++, Fortran Compilers for + applications running on Intel(R) 64; + Version 14.0.2 (Build 20140120) + + Linux 2.6.32-431.11.2.el6 GNU C (gcc), Fortran (gfortran), C++ (g++) + #1 SMP x86_64 GNU/Linux compilers: + (platypus) Version 4.4.7 20120313 + Version 4.8.2 + PGI C, Fortran, C++ for 64-bit target on + x86-64; + Version 13.7-0 + Intel(R) C (icc), C++ (icpc), Fortran (icc) + compilers: + Version 14.0.2 (Build 20140120) + + Linux 2.6.32-431.29.2.el6.ppc64 gcc (GCC) 4.4.7 20120313 (Red Hat 4.4.7-4) + #1 SMP ppc64 GNU/Linux g++ (GCC) 4.4.7 20120313 (Red Hat 4.4.7-4) + (ostrich) GNU Fortran (GCC) 4.4.7 20120313 (Red Hat 4.4.7-4) + IBM XL C/C++ V13.1 + IBM XL Fortran V15.1 + + Linux 2.6.32-220.23.1.1chaos Intel C, C++, Fortran Compilers + ch5.x86_64 GNU/Linux Version 12.1.5.339 + (LLNL Aztec) + + IBM Blue Gene/P XL C for Blue Gene/P, bgxlc V9.0 + (LLNL uDawn) XL C++ for Blue Gene/P, bgxlC V9.0 + XL Fortran for Blue Gene/P, bgxlf90 V11.1 + + SunOS 5.11 32- and 64-bit Sun C 5.12 SunOS_sparc + (emu) Sun Fortran 95 8.6 SunOS_sparc + Sun C++ 5.12 SunOS_sparc + + Windows 7 Visual Studio 2008 (cmake) + Visual Studio 2010 w/ Intel Fortran 14 (cmake) + Visual Studio 2012 w/ Intel Fortran 15 (cmake) + Visual Studio 2013 w/ Intel Fortran 15 (cmake) + Visual Studio 2015 (cmake) + Cygwin(CYGWIN_NT-6.1 1.7.34(0.285/5/3) gcc(4.9.2) compiler and gfortran) + (cmake and autotools) + + Windows 7 x64 Visual Studio 2008 (cmake) + Visual Studio 2010 w/ Intel Fortran 14 (cmake) + Visual Studio 2012 w/ Intel Fortran 15 (cmake) + Visual Studio 2013 w/ Intel Fortran 15 (cmake) + Visual Studio 2015 (cmake) + + Windows 8.1 Visual Studio 2012 w/ Intel Fortran 15 (cmake) + Visual Studio 2013 w/ Intel Fortran 15 (cmake) + + Windows 8.1 x64 Visual Studio 2012 w/ Intel Fortran 15 (cmake) + Visual Studio 2013 w/ Intel Fortran 15 (cmake) + + Mac OS X Lion 10.7.3 gcc i686-apple-darwin11-llvm-gcc-4.2 (GCC) 4.2.1 from Xcode 4.2.1 + 32- and 64-bit g++ i686-apple-darwin11-llvm-g++-4.2 (GCC) 4.2.1 from Xcode 4.2.1 + (duck) gfortran GNU Fortran (GCC) 4.6.2 + + Mac OS X Mountain Lion 10.8.1 cc Apple clang version 4.0 from Xcode 4.5.1 + (owl) c++ Apple clang version 4.0 from Xcode 4.5.1 + gcc i686-apple-darwin11-llvm-gcc-4.2 (GCC) 4.2.1 from Xcode 4.5.1 + g++ i686-apple-darwin11-llvm-g++-4.2 (GCC) 4.2.1 from Xcode 4.5.1 + gfortran GNU Fortran (GCC) 4.6.2 + + +Tested Configuration Features Summary +===================================== + + In the tables below + y = tested + n = not tested in this release + C = Cluster + W = Workstation + x = not working in this release + dna = does not apply + ( ) = footnote appears below second table + = testing incomplete on this feature or platform + +Platform C F90/ F90 C++ zlib SZIP + parallel F2003 parallel +Solaris2.11 32-bit n y/y n y y y +Solaris2.11 64-bit n y/n n y y y +Windows 7 y y/y n y y y +Windows 7 x64 y y/y n y y y +Windows 7 Cygwin n y/n n y y y +Windows 7 x64 Cygwin n y/n n y y y +Windows 8 y y/y n y y y +Windows 8 x64 y y/y n y y y +Mac OS X Lion 10.7.3 32-bit n y/y n y y n +Mac OS X Lion 10.7.3 64-bit n y/y n y y y +Mac OS X Mountain Lion 10.8.1 64-bit n y/y n y y y +Mac OS X Mavericks 10.9.1 64-bit n y/y n y y ? +AIX 6.1 32- and 64-bit n y/n n y y y +CentOS 5.9 Linux 2.6.18-308 i686 GNU y y/y y y y y +CentOS 5.9 Linux 2.6.18-308 i686 Intel n y/y n y y y +CentOS 5.9 Linux 2.6.18-308 i686 PGI n y/y n y y y +CentOS 5.9 Linux 2.6.18 x86_64 GNU n y/y n y y y +CentOS 5.9 Linux 2.6.18 x86_64 Intel n y/y n y y y +CentOS 6.4 Linux 2.6.32 x86_64 GNU y y/y y y y y +CentOS 6.4 Linux 2.6.32 x86_64 Intel n y/y n y y y +CentOS 6.4 Linux 2.6.32 x86_64 PGI n y/y n y y y +Linux 2.6.32-431.11.2.el6.ppc64 n y/n n y y y + + +Platform Shared Shared Shared Thread- + C libs F90 libs C++ libs safe +Solaris2.11 32-bit y y y y +Solaris2.11 64-bit y y y y +Windows 7 y y y y +Windows 7 x64 y y y y +Windows 7 Cygwin n n n y +Windows 7 x64 Cygwin n n n y +Windows 8 y y y y +Windows 8 x64 y y y y +Mac OS X Lion 10.7.3 32-bit y n y y +Mac OS X Lion 10.7.3 64-bit y n y y +Mac OS X Mountain Lion 10.8.1 64-bit y n y y +Mac OS X Mavericks 10.9.1 64-bit y n y y +AIX 6.1 32- and 64-bit y n n y +CentOS 5.9 Linux 2.6.18-308 i686 GNU y y y y +CentOS 5.9 Linux 2.6.18-308 i686 Intel y y y n +CentOS 5.9 Linux 2.6.18-308 i686 PGI y y y n +CentOS 5.9 Linux 2.6.18 x86_64 GNU y y y y +CentOS 5.9 Linux 2.6.18 x86_64 Intel y y y n +CentOS 6.4 Linux 2.6.32 x86_64 GNU y y y n +CentOS 6.4 Linux 2.6.32 x86_64 Intel y y y n +CentOS 6.4 Linux 2.6.32 x86_64 PGI y y y n +Linux 2.6.32-431.11.2.el6.ppc64 y y y n + +Compiler versions for each platform are listed in the preceding +"Supported Platforms" table. + + +More Tested Platforms +===================== +The following platforms are not supported but have been tested for this release. + + Linux 2.6.18-308.13.1.el5PAE MPICH mpich 3.1.2 compiled with + #1 SMP i686 i686 i386 gcc 4.9.1 and gfortran 4.9.1 + (jam) g95 (GCC 4.0.3 (g95 0.94!) + + Linux 2.6.18-431.11.2.el6 MPICH mpich 3.1.2 compiled with + #1 SMP x86_64 GNU/Linux gcc 4.9.1 and gfortran 4.9.1 + (platypus) g95 (GCC 4.0.3 (g95 0.94!) + + FreeBSD 8.2-STABLE i386 gcc 4.2.1 [FreeBSD] 20070719 + (loyalty) gcc 4.6.1 20110422 + g++ 4.6.1 20110422 + gfortran 4.6.1 20110422 + + FreeBSD 8.2-STABLE amd64 gcc 4.2.1 [FreeBSD] 20070719 + (freedom) gcc 4.6.1 20110422 + g++ 4.6.1 20110422 + gfortran 4.6.1 20110422 + + Debian7.5.0 3.2.0-4-686 #1 SMP Debian 3.2.51-1 i686 GNU/Linux + gcc (Debian 4.7.2-5) 4.7.2 + GNU Fortran (Debian 4.7.2-5) 4.7.2 + (cmake and autotools) + + Debian7.5.0 3.2.0-4-amd64 #1 SMP Debian 3.2.51-1 x86_64 GNU/Linux + gcc (Debian 4.7.2-5) 4.7.2 + GNU Fortran (Debian 4.7.2-5) 4.7.2 + (cmake and autotools) + + Fedora20 3.15.3-200.fc20.i6866 #1 SMP i686 i686 i386 GNU/Linux + gcc (GCC) 4.8.3 20140624 (Red Hat 4.8.3-1) + GNU Fortran (GCC) 4.8.3 20140624 (Red Hat 4.8.3-1) + (cmake and autotools) + + Fedora20 3.15.3-200.fc20.x86_64 #1 SMP x86_64 x86_64 x86_64 GNU/Linux + gcc (GCC) 4.8.3 20140624 (Red Hat 4.8.3-1) + GNU Fortran (GCC) 4.8.3 20140624 (Red Hat 4.8.3-1) + (cmake and autotools) + + SUSE 13.1 3.11.10-17-desktop #1 SMP PREEMPT i686 athlon i386 GNU/Linux + gcc (SUSE Linux) 4.8.1 + GNU Fortran (SUSE Linux) 4.8.1 + (cmake and autotools) + + SUSE 13.1 3.11.10-17-desktop #1 SMP PREEMPT x86_64 x86_64 x86_64 GNU/Linux + gcc (SUSE Linux) 4.8.1 + GNU Fortran (SUSE Linux) 4.8.1 + (cmake and autotools) + + Ubuntu 14.04 3.13.0-35-generic #62-Ubuntu SMP i686 GNU/Linux + gcc (Ubuntu/Linaro 4.9.1-0ubuntu1) 4.9.1 + GNU Fortran (Ubuntu/Linaro 4.9.1-0ubuntu1) 4.9.1 + (cmake and autotools) + + Ubuntu 14.04 3.13.0-35-generic #62-Ubuntu SMP x86_64 GNU/Linux + gcc (Ubuntu/Linaro 4.9.1-0ubuntu1) 4.9.1 + GNU Fortran (Ubuntu/Linaro 4.9.1-0ubuntu1) 4.9.1 + (cmake and autotools) + + Cray Linux Environment (CLE) PrgEnv-pgi/4.0.46 + hopper.nersc.gov pgcc 12.5-0 64-bit target on x86-64 Linux -tp shanghai + pgf90 12.5-0 64-bit target on x86-64 Linux -tp shanghai + pgCC 12.5-0 64-bit target on x86-64 Linux -tp shanghai + + +Known Problems +============== +* "make check" fails on CYGWIN when building shared lib files is enabled. The + default on Cygwin has been changed to disable shared. It can be enabled with + the --enable-shared configure option but is likely to fail "make check" + with GCC compilers. (LK -2015/04/16) + +* CLANG compiler with the options -fcatch-undefined-behavior and -ftrapv + catches some undefined behavior in the alignment algorithm of the macro DETECT_I + in H5detect.c (Issue 8147). Since the algorithm is trying to detect the alignment + of integers, ideally the flag -fcatch-undefined-behavior shouldn't to be used for + H5detect.c. In the future, we can separate flags for H5detect.c from the rest of + the library. (SLU - 2013/10/16) + +* The 5.9 C++ compiler on Sun failed to compile a C++ test ttypes.cpp. It + complains with this message: + "/home/hdf5/src/H5Vprivate.h", line 130: Error: __func__ is not defined. + + The reason is that __func__ is a predefined identifier in C99 standard. The + HDF5 C library uses it in H5private.h. The test ttypes.cpp includes + H5private.h (H5Tpkg.h<-H5Fprivate.h<-H5Vprivate.h<-H5private.h). Sun's 5.9 + C++ compiler doesn't support __func__, thus fails to compile the C++ test. + But 5.11 C++ compiler does. To check whether your Sun C++ compiler knows this + identifier, try to compile the following simple C++ program: + #include + + int main(void) + { + printf("%s\n", __func__); + return 0; + } + (SLU - 2012/11/5) + +* The C++ and FORTRAN bindings are not currently working on FreeBSD with the + native release 8.2 compilers (4.2.1), but are working with gcc 4.6 from the + ports (and probably gcc releases after that). + (QAK - 2012/10/19) + +* The data conversion test dt_arith.c has failures (segmentation fault) from + "long double" to other datatypes during hard conversion when the library + is built with the default GCC 4.2.1 on Mac Lion system. It only happens + with optimization (-O3, -O2, and -O1). Some newer versions of GCC do not + have this problem. Users should disable optimization or try newer version + of GCC. (Issue 8017. SLU - 2012/6/12) + +* The data conversion test dt_arith.c fails in "long double" to integer + conversion on Ubuntu 11.10 (3.0.0.13 kernal) with GCC 4.6.1 if the library + is built with optimization -O3 or -O2. The older GCC (4.5) or newer kernal + (3.2.2 on Fedora) doesn't have the problem. Users should lower down the + optimization level (-O1 or -O0) by defining CFLAGS in the command line of + "configure" like: + + CFLAGS=-O1 ./configure + + It will overwrite the library's default optimization level. (Issue 7829. + SLU - 2012/2/7) + +* --with-mpe configure option does not work with Mpich2. AKC - 2011/03/10) + +* While working on the 1.8.6 release of HDF5, a bug was discovered that can + occur when reading from a dataset in parallel shortly after it has been + written to collectively. The issue was exposed by a new test in the parallel + HDF5 test suite, but had existed before that. We believe the problem lies with + certain MPI implementations and/or filesystems. + + We have provided a pure MPI test program, as well as a standalone HDF5 + program, that can be used to determine if this is an issue on your system. + They should be run across multiple nodes with a varying number of processes. + These programs can be found at: + http://www.hdfgroup.org/ftp/HDF5/examples/known_problems/ + +* Parallel mode in AIX will fail some of the testcheck_version.sh tests where + it treats "exit(134) the same as if process 0 had received an abort signal. + This is fixed and will be available in the next release. AKC - 2009/11/3 + +* The PathScale MPI implementation, accessing a Panasas file system, would + cause H5Fcreate() with H5F_ACC_EXCL to fail even when the file is not + existing. This is due to the MPI_File_open() call failing if the amode has + the MPI_MODE_EXCL bit set. (See bug 1468 for details.) AKC - 2009/8/11 + +* Parallel tests failed with 16 processes with data inconsistency at testphdf5 + / dataset_readAll. Parallel tests also failed with 32 and 64 processes with + collective abort of all ranks at t_posix_compliant / allwrite_allread_blocks + with MPI IO. (CMC - 2009/04/28) + +* For SNL, spirit/liberty/thunderbird: The serial tests pass but parallel + tests failed with MPI-IO file locking message. AKC - 2007/6/25. +* On Intel 64 Linux cluster (RH 4, Linux 2.6.9) with Intel 10.0 compilers use + -mp -O1 compilation flags to build the libraries. Higher level of optimization + causes failures in several HDF5 library tests. +* For HPUX 11.23 many tools tests failed for 64-bit version when linked to the + shared libraries (tested for 1.8.0-beta2) +* For SNL, Red Storm: only paralle HDF5 is supported. The serial tests pass + and the parallel tests also pass with lots of non-fatal error messages. +* on SUN 5.10 C++ test fails in the "Testing Shared Datatypes with Attributes" test +* configuring with --enable-debug=all produces compiler errors on most + platforms. Users who want to run HDF5 in debug mode should use + --enable-debug rather than --enable-debug=all to enable debugging + information on most modules. +* On Mac OS 10.4, test/dt_arith.c has some errors in conversion from long + double to (unsigned) long long and from (unsigned)long long to long double. +* On Altix SGI with Intel 9.0 testmeta.c would not compile with -O3 + optimization flag. +* On VAX, Scaleoffset filter isn't supported. The filter cannot be applied to + HDF5 data generated on VAX. Scaleoffset filter only supports IEEE standard + for floating-point data. +* On Cray X1, a lone colon on the command line of h5dump --xml (as in + the testh5dumpxml.sh script) is misinterpereted by the operating system + and causes an error. +* On mpich 1.2.5 and 1.2.6, we found that if more than two processes + contribute no IO and the application asks to do IO with collective, we found + that when using 4 processors, a simple collective write will be hung + sometimes. This can be verified with t_mpi test under testpar. +* The dataset created or rewritten with the v1.6.3 library or after can't + be read with the v1.6.2 library or before when Fletcher32 EDC(filter) is + enabled. There was a bug in the calculating code of the Fletcher32 + checksum in the library before v1.6.3. The checksum value wasn't consistent + between big-endian and little-endian systems. This bug was fixed in + Release 1.6.3. However, after fixing the bug, the checksum value is no + longer the same as before on little-endian system. The library release + after 1.6.4 can still read the dataset created or rewritten with the library + of v1.6.2 or before. SLU - 2005/6/30 +* For the version 6(6.02 and 6.04) of Portland Group compiler on AMD Opteron + processor, there's a bug in the compiler for optimization(-O2). The library + failed in several tests but all related to multi driver. The problem has + been reported to the vendor. +* On IBM AIX systems, parallel HDF5 mode will fail some tests with error + messages like "INFO: 0031-XXX ...". This is from the command poe. + Set the environment variable MP_INFOLEVEL to 0 to minimize the messages + and run the tests again. + The tests may fail with messages like "The socket name is already + in use". HDF5 does not use sockets (except for stream-VFD). This is + due to problems of the poe command trying to set up the debug socket. + Check if there are many old /tmp/s.pedb.* staying around. These are + sockets used by the poe command and left behind due to failed commands. + Ask your system administrator to clean them out. Lastly, request IBM + to provide a mean to run poe without the debug socket. + +* The C++ library's tests fails when compiling with PGI C++ compiler. The + workaround until the problem is correctly handled is to use the + flag "--instantiate=local" prior to the configure and build steps, as: + setenv CXX "pgCC --instantiate=local" for pgCC 5.02 and higher + + +* The stream-vfd test uses ip port 10007 for testing. If another + application is already using that port address, the test will hang + indefinitely and has to be terminated by the kill command. To try the + test again, change the port address in test/stream_test.c to one not + being used in the host. + +* The --enable-static-exec configure flag will only statically link libraries + if the static version of that library is present. If only the shared version + of a library exists (i.e., most system libraries on Solaris, AIX, and Mac, + for example, only have shared versions), the flag should still result in a + successful compilation, but note that the installed executables will not be + fully static. Thus, the only guarantee on these systems is that the + executable is statically linked with just the HDF5 library. + +* With the gcc 2.95.2 compiler, HDF 5 uses the `-ansi' flag during + compilation. The ANSI version of the compiler complains about not being + able to handle the `long long' datatype with the warning: + + warning: ANSI C does not support `long long' + + This warning is innocuous and can be safely ignored. + +* Certain platforms give false negatives when testing h5ls: + - Cray J90 and Cray T90IEEE give errors during testing when displaying + some floating-point values. These are benign differences due to + the different precision in the values displayed and h5ls appears to + be dumping floating-point numbers correctly. + +* Not all platforms behave correctly with szip's shared libraries. Szip is + disabled in these cases, and a message is relayed at configure time. Static + libraries should be working on all systems that support szip, and should be + used when shared libraries are unavailable. There is also a configure error + on Altix machines that incorrectly reports when a version of szip without + an encoder is being used. + +* On some platforms that use Intel and Absoft compilers to build HDF5 fortran library, + compilation may fail for fortranlib_test.f90, fflush1.f90 and fflush2.f90 + complaining about exit subroutine. Comment out the line + IF (total_error .ne. 0) CALL exit (total_error) + +* Information about building with PGI and Intel compilers is available in + INSTALL file sections 5.7 and 5.8 + +* On at least one system, (SDSC DataStar), the scheduler (in this case + LoadLeveler) sends job status updates to standard error when you run + any executable that was compiled with the parallel compilers. + + This causes problems when running "make check" on parallel builds, as + many of the tool tests function by saving the output from test runs, + and comparing it to an exemplar. + + The best solution is to reconfigure the target system so it no longer + inserts the extra text. However, this may not be practical. + + In such cases, one solution is to "setenv HDF5_Make_Ignore yes" prior to + the configure and build. This will cause "make check" to continue after + detecting errors in the tool tests. However, in the case of SDSC DataStar, + it also leaves you with some 150 "failed" tests to examine by hand. + + A second solution is to write a script to run serial tests and filter + out the text added by the scheduler. A sample script used on SDSC + DataStar is given below, but you will probably have to customize it + for your installation. + + Observe that the basic idea is to insert the script as the first item + on the command line which executes the the test. The script then + executes the test and filters out the offending text before passing + it on. + + #!/bin/csh + + set STDOUT_FILE=~/bin/serial_filter.stdout + set STDERR_FILE=~/bin/serial_filter.stderr + + rm -f $STDOUT_FILE $STDERR_FILE + + ($* > $STDOUT_FILE) >& $STDERR_FILE + + set RETURN_VALUE=$status + + cat $STDOUT_FILE + + tail +3 $STDERR_FILE + + exit $RETURN_VALUE + + You get the HDF make files and test scipts to execute your filter script + by setting the environment variable "RUNSERIAL" to the full path of the + script prior to running configure for parallel builds. Remember to + "unsetenv RUNSERIAL" before running configure for a serial build. + + Note that the RUNSERIAL environment variable exists so that we can + can prefix serial runs as necessary on the target system. On DataStar, + no prefix is necessary. However on an MPICH system, the prefix might + have to be set to something like "/usr/local/mpi/bin/mpirun -np 1" to + get the serial tests to run at all. + + In such cases, you will have to include the regular prefix in your + filter script. + +* H5Ocopy() does not copy reg_ref attributes correctly when shared-message + is turn on. The value of the reference in the destination attriubte is + wrong. This H5Ocopy problem will affect h5copy tool + diff --git a/release_docs/HISTORY-1_9.txt b/release_docs/HISTORY-1_9.txt deleted file mode 100644 index 8e7648a..0000000 --- a/release_docs/HISTORY-1_9.txt +++ /dev/null @@ -1,6 +0,0 @@ - HDF5 HISTORY - ============ - This file contains history of the HDF5 1.9 branch - - CONTENTS - diff --git a/src/COPYING b/src/COPYING index 6903daf..6497ace 100644 --- a/src/COPYING +++ b/src/COPYING @@ -5,12 +5,9 @@ The files and subdirectories in this directory are part of HDF5. The full HDF5 copyright notice, including terms governing use, - modification, and redistribution, is contained in the files COPYING - and Copyright.html. COPYING can be found at the root of the source - code distribution tree; Copyright.html can be found at the root - level of an installed copy of the electronic HDF5 document set and - is linked from the top-level documents page. It can also be found - at http://www.hdfgroup.org/HDF5/doc/Copyright.html. If you do not - have access to either file, you may request a copy from + modification, and redistribution, is contained in the COPYING file + which can be found at the root of the source code distribution tree + or in https://support.hdfgroup.org/ftp/HDF5/releases. If you do + not have access to either file, you may request a copy from help@hdfgroup.org. diff --git a/src/H5PL.c b/src/H5PL.c index 512b00b..481368c 100644 --- a/src/H5PL.c +++ b/src/H5PL.c @@ -562,6 +562,7 @@ H5PLremove(unsigned int index) unsigned int plindex; FUNC_ENTER_API(FAIL) + H5TRACE1("e", "Iu", index); if(H5PL_num_paths_g == 0) HGOTO_ERROR(H5E_PLUGIN, H5E_NOSPACE, FAIL, "no directories in table") if(index >= H5PL_MAX_PATH_NUM) @@ -606,6 +607,7 @@ H5PLget(unsigned int index, char *pathname/*out*/, size_t size) char *dl_path = NULL; FUNC_ENTER_API(FAIL) + H5TRACE3("Zs", "Iuxz", index, pathname, size); if(H5PL_num_paths_g == 0) HGOTO_ERROR(H5E_PLUGIN, H5E_NOSPACE, FAIL, "no directories in table") if(index >= H5PL_MAX_PATH_NUM) diff --git a/test/COPYING b/test/COPYING index 6903daf..6497ace 100644 --- a/test/COPYING +++ b/test/COPYING @@ -5,12 +5,9 @@ The files and subdirectories in this directory are part of HDF5. The full HDF5 copyright notice, including terms governing use, - modification, and redistribution, is contained in the files COPYING - and Copyright.html. COPYING can be found at the root of the source - code distribution tree; Copyright.html can be found at the root - level of an installed copy of the electronic HDF5 document set and - is linked from the top-level documents page. It can also be found - at http://www.hdfgroup.org/HDF5/doc/Copyright.html. If you do not - have access to either file, you may request a copy from + modification, and redistribution, is contained in the COPYING file + which can be found at the root of the source code distribution tree + or in https://support.hdfgroup.org/ftp/HDF5/releases. If you do + not have access to either file, you may request a copy from help@hdfgroup.org. diff --git a/testpar/COPYING b/testpar/COPYING index 6903daf..6497ace 100644 --- a/testpar/COPYING +++ b/testpar/COPYING @@ -5,12 +5,9 @@ The files and subdirectories in this directory are part of HDF5. The full HDF5 copyright notice, including terms governing use, - modification, and redistribution, is contained in the files COPYING - and Copyright.html. COPYING can be found at the root of the source - code distribution tree; Copyright.html can be found at the root - level of an installed copy of the electronic HDF5 document set and - is linked from the top-level documents page. It can also be found - at http://www.hdfgroup.org/HDF5/doc/Copyright.html. If you do not - have access to either file, you may request a copy from + modification, and redistribution, is contained in the COPYING file + which can be found at the root of the source code distribution tree + or in https://support.hdfgroup.org/ftp/HDF5/releases. If you do + not have access to either file, you may request a copy from help@hdfgroup.org. diff --git a/tools/COPYING b/tools/COPYING index 6903daf..6497ace 100644 --- a/tools/COPYING +++ b/tools/COPYING @@ -5,12 +5,9 @@ The files and subdirectories in this directory are part of HDF5. The full HDF5 copyright notice, including terms governing use, - modification, and redistribution, is contained in the files COPYING - and Copyright.html. COPYING can be found at the root of the source - code distribution tree; Copyright.html can be found at the root - level of an installed copy of the electronic HDF5 document set and - is linked from the top-level documents page. It can also be found - at http://www.hdfgroup.org/HDF5/doc/Copyright.html. If you do not - have access to either file, you may request a copy from + modification, and redistribution, is contained in the COPYING file + which can be found at the root of the source code distribution tree + or in https://support.hdfgroup.org/ftp/HDF5/releases. If you do + not have access to either file, you may request a copy from help@hdfgroup.org. diff --git a/tools/test/perform/COPYING b/tools/test/perform/COPYING index 6903daf..6497ace 100644 --- a/tools/test/perform/COPYING +++ b/tools/test/perform/COPYING @@ -5,12 +5,9 @@ The files and subdirectories in this directory are part of HDF5. The full HDF5 copyright notice, including terms governing use, - modification, and redistribution, is contained in the files COPYING - and Copyright.html. COPYING can be found at the root of the source - code distribution tree; Copyright.html can be found at the root - level of an installed copy of the electronic HDF5 document set and - is linked from the top-level documents page. It can also be found - at http://www.hdfgroup.org/HDF5/doc/Copyright.html. If you do not - have access to either file, you may request a copy from + modification, and redistribution, is contained in the COPYING file + which can be found at the root of the source code distribution tree + or in https://support.hdfgroup.org/ftp/HDF5/releases. If you do + not have access to either file, you may request a copy from help@hdfgroup.org. -- cgit v0.12 From 54957d37f5aa73912763dbb6e308555e863c43f4 Mon Sep 17 00:00:00 2001 From: lrknox Date: Sat, 15 Apr 2017 12:50:10 -0500 Subject: Commit copyright header change for src/H5PLpkg.c which was added after running script to make changes. --- src/H5PLpkg.h | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/src/H5PLpkg.h b/src/H5PLpkg.h index 5cf3096..e356893 100644 --- a/src/H5PLpkg.h +++ b/src/H5PLpkg.h @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #if !(defined H5PL_FRIEND || defined H5PL_MODULE) -- cgit v0.12 From 5f313c0172f9339c7cd69a4fd01c033d89466a8b Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Mon, 17 Apr 2017 11:32:32 -0500 Subject: HDFFV-10173 fix compile on VS2008 --- src/H5ACpublic.h | 236 +++++++++++++++++++++++++++---------------------------- 1 file changed, 118 insertions(+), 118 deletions(-) diff --git a/src/H5ACpublic.h b/src/H5ACpublic.h index 5fdb3f4..ca0e63f 100644 --- a/src/H5ACpublic.h +++ b/src/H5ACpublic.h @@ -70,65 +70,65 @@ extern "C" { * version number, or an error will be flagged. * * 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. + * 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. + * This is a debugging function, and should normally be turned off. * * open_trace_file: Boolean field indicating whether the trace_file_name - * field should be used to open a trace file for the cache. + * field should be used to open a trace file for the cache. * * *** DEPRECATED *** Use H5Fstart/stop logging functions instead * - * The trace file is a debuging feature that allow the capture of - * top level metadata cache requests for purposes of debugging and/or - * optimization. This field should normally be set to FALSE, as - * trace file collection imposes considerable overhead. + * The trace file is a debuging feature that allow the capture of + * top level metadata cache requests for purposes of debugging and/or + * optimization. This field should normally be set to FALSE, as + * trace file collection imposes considerable overhead. * - * This field should only be set to TRUE when the 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 close_trace_file - * field is also TRUE. + * This field should only be set to TRUE when the 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 close_trace_file + * field is also TRUE. * * close_trace_file: Boolean field indicating whether the current trace - * file (if any) should be closed. + * file (if any) should be closed. * * *** DEPRECATED *** Use H5Fstart/stop logging functions instead * - * See the above comments on the open_trace_file field. This field - * should be set to FALSE unless there is an open trace file on the - * cache that you wish to close. + * See the above comments on the open_trace_file field. This field + * should be set to FALSE unless there is an open trace file on the + * cache that you wish to close. * * trace_file_name: Full path of the trace file to be opened if the - * open_trace_file field is TRUE. + * open_trace_file field is TRUE. * * *** DEPRECATED *** Use H5Fstart/stop logging functions instead * - * 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. + * 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. * - * The length of the path must not exceed H5AC__MAX_TRACE_FILE_NAME_LEN - * characters. + * The length of the path must not exceed H5AC__MAX_TRACE_FILE_NAME_LEN + * characters. * * 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. - * - * In general, the metadata cache should always be allowed to - * evict entries. However, in some cases it is advantageous to - * disable evictions briefly, and thereby postpone metadata - * writes. However, this must be done with care, as the cache - * can grow quickly. If you do this, re-enable evictions as - * soon as possible and monitor cache size. - * - * At present, evictions can only be disabled if automatic - * cache resizing is also disabled (that is, ( incr_mode == - * H5C_incr__off ) && ( decr_mode == H5C_decr__off )). There - * is no logical reason why this should be so, but it simplifies - * implementation and testing, and I can't think of any reason - * why it would be desireable. If you can think of one, I'll - * revisit the issue. + * evictions enabled status of the cache, or to set the cache's + * evictions enabled status. + * + * In general, the metadata cache should always be allowed to + * evict entries. However, in some cases it is advantageous to + * disable evictions briefly, and thereby postpone metadata + * writes. However, this must be done with care, as the cache + * can grow quickly. If you do this, re-enable evictions as + * soon as possible and monitor cache size. + * + * At present, evictions can only be disabled if automatic + * cache resizing is also disabled (that is, ( incr_mode == + * H5C_incr__off ) && ( decr_mode == H5C_decr__off )). There + * is no logical reason why this should be so, but it simplifies + * implementation and testing, and I can't think of any reason + * why it would be desireable. If you can think of one, I'll + * revisit the issue. * * 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 @@ -368,80 +368,80 @@ extern "C" { * * PHDF5 uses several strategies to prevent such inconsistencies in metadata, * all of which use the fact that the same stream of dirty metadata is seen - * by all processes for purposes of synchronization. This is done by + * by all processes for purposes of synchronization. This is done by * having each process count the number of bytes of dirty metadata generated, - * and then running a "sync point" whenever this count exceeds a user + * and then running a "sync point" whenever this count exceeds a user * specified threshold (see dirty_bytes_threshold below). * - * The current metadata write strategy is indicated by the + * The current metadata write strategy is indicated by the * metadata_write_strategy field. The possible values of this field, along * with the associated metadata write strategies are discussed below. * * dirty_bytes_threshold: Threshold of dirty byte creation used to - * synchronize updates between caches. (See above for outline and - * motivation.) + * synchronize updates between caches. (See above for outline and + * motivation.) * - * This value MUST be consistant across all processes accessing the - * file. This field is ignored unless HDF5 has been compiled for - * parallel. + * This value MUST be consistant across all processes accessing the + * file. This field is ignored unless HDF5 has been compiled for + * parallel. * * metadata_write_strategy: Integer field containing a code indicating the - * desired metadata write strategy. The valid values of this field - * are enumerated and discussed below: + * desired metadata write strategy. The valid values of this field + * are enumerated and discussed below: * * - * H5AC_METADATA_WRITE_STRATEGY__PROCESS_0_ONLY: + * H5AC_METADATA_WRITE_STRATEGY__PROCESS_0_ONLY: * - * When metadata_write_strategy is set to this value, only process - * zero is allowed to write dirty metadata to disk. All other - * processes must retain dirty metadata until they are informed at - * a sync point that the dirty metadata in question has been written - * to disk. + * When metadata_write_strategy is set to this value, only process + * zero is allowed to write dirty metadata to disk. All other + * processes must retain dirty metadata until they are informed at + * a sync point that the dirty metadata in question has been written + * to disk. * - * When the sync point is reached (or when there is a user generated - * flush), process zero flushes sufficient entries to bring it into - * complience with its min clean size (or flushes all dirty entries in - * the case of a user generated flush), broad casts the list of - * entries just cleaned to all the other processes, and then exits - * the sync point. + * When the sync point is reached (or when there is a user generated + * flush), process zero flushes sufficient entries to bring it into + * complience with its min clean size (or flushes all dirty entries in + * the case of a user generated flush), broad casts the list of + * entries just cleaned to all the other processes, and then exits + * the sync point. * - * Upon receipt of the broadcast, the other processes mark the indicated - * entries as clean, and leave the sync point as well. + * Upon receipt of the broadcast, the other processes mark the indicated + * entries as clean, and leave the sync point as well. * * - * H5AC_METADATA_WRITE_STRATEGY__DISTRIBUTED: + * H5AC_METADATA_WRITE_STRATEGY__DISTRIBUTED: * - * In the distributed metadata write strategy, 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. + * In the distributed metadata write strategy, 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. * - * In this strategy, when a sync point is triggered (either by dirty - * metadata creation or manual flush), all processes enter a barrier. + * In this strategy, when a sync point is triggered (either by dirty + * metadata creation or manual flush), all processes enter a barrier. * - * On the other side of the barrier, process 0 constructs an ordered - * list of the entries to be flushed, and then broadcasts this list - * to the caches in all the processes. + * On the other side of the barrier, process 0 constructs an ordered + * list of the entries to be flushed, and then broadcasts this list + * to the caches in all the processes. * - * All processes then scan the list of entries to be flushed, flushing - * some, and marking the rest as clean. The algorithm for this purpose - * ensures that each entry in the list is flushed exactly once, and - * all are marked clean in each cache. + * All processes then scan the list of entries to be flushed, flushing + * some, and marking the rest as clean. The algorithm for this purpose + * ensures that each entry in the list is flushed exactly once, and + * all are marked clean in each cache. * - * Note that in the case of a flush of the cache, no message passing - * is necessary, as all processes have the same list of dirty entries, - * and all of these entries must be flushed. Thus in this case it is - * sufficient for each process to sort its list of dirty entries after - * leaving the initial barrier, and use this list as if it had been - * received from process zero. + * Note that in the case of a flush of the cache, no message passing + * is necessary, as all processes have the same list of dirty entries, + * and all of these entries must be flushed. Thus in this case it is + * sufficient for each process to sort its list of dirty entries after + * leaving the initial barrier, and use this list as if it had been + * received from process zero. + * + * To avoid possible messages from the past/future, all caches must + * wait until all caches are done before leaving the sync point. * - * To avoid possible messages from the past/future, all caches must - * wait until all caches are done before leaving the sync point. - * ****************************************************************************/ -#define H5AC__CURR_CACHE_CONFIG_VERSION 1 -#define H5AC__MAX_TRACE_FILE_NAME_LEN 1024 +#define H5AC__CURR_CACHE_CONFIG_VERSION 1 +#define H5AC__MAX_TRACE_FILE_NAME_LEN 1024 #define H5AC_METADATA_WRITE_STRATEGY__PROCESS_0_ONLY 0 #define H5AC_METADATA_WRITE_STRATEGY__DISTRIBUTED 1 @@ -451,9 +451,9 @@ typedef struct H5AC_cache_config_t /* general configuration fields: */ int version; - hbool_t rpt_fcn_enabled; + hbool_t rpt_fcn_enabled; - hbool_t open_trace_file; + hbool_t open_trace_file; hbool_t close_trace_file; char trace_file_name[H5AC__MAX_TRACE_FILE_NAME_LEN + 1]; @@ -512,7 +512,7 @@ typedef struct H5AC_cache_config_t * * structure H5AC_cache_image_config_t * - * H5AC_cache_image_ctl_t is a public structure intended for use in public + * 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. * @@ -526,47 +526,47 @@ typedef struct H5AC_cache_config_t * 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. + * 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. + * 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). + * 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. + * 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. + * A value of 0 prevents prefetched entries from being included + * in cache images. * - * Positive integers restrict prefetched entries to the specified - * number of appearances. + * 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. + * 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__CURR_CACHE_IMAGE_CONFIG_VERSION 1 -#define H5AC__CACHE_IMAGE__ENTRY_AGEOUT__NONE -1 -#define H5AC__CACHE_IMAGE__ENTRY_AGEOUT__MAX 100 +#define H5AC__CACHE_IMAGE__ENTRY_AGEOUT__NONE -1 +#define H5AC__CACHE_IMAGE__ENTRY_AGEOUT__MAX 100 typedef struct H5AC_cache_image_config_t { - int32_t version; + int version; hbool_t generate_image; hbool_t save_resize_status; - int32_t entry_ageout; + int entry_ageout; } H5AC_cache_image_config_t; #ifdef __cplusplus -- cgit v0.12 From a447dd64cc0dcfc7fe17b881103fc76348001dda Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Mon, 17 Apr 2017 13:58:14 -0500 Subject: HDFFV-10170 fix noinst for test libs --- test/Makefile.am | 2 +- tools/test/h5repack/Makefile.am | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/test/Makefile.am b/test/Makefile.am index a64cd0e..a0774a4 100644 --- a/test/Makefile.am +++ b/test/Makefile.am @@ -106,7 +106,7 @@ if HAVE_SHARED_CONDITIONAL # The libdynlib1, libdynlib2, libdynlib3, and libdynlib4 library for testing plugin module plugin.c. # Build it as shared library if configure is enabled for shared library. - lib_LTLIBRARIES=libdynlib1.la libdynlib2.la libdynlib3.la libdynlib4.la + noinst_LTLIBRARIES+=libdynlib1.la libdynlib2.la libdynlib3.la libdynlib4.la libdynlib1_la_SOURCES=dynlib1.c libdynlib2_la_SOURCES=dynlib2.c libdynlib3_la_SOURCES=dynlib3.c diff --git a/tools/test/h5repack/Makefile.am b/tools/test/h5repack/Makefile.am index 5c284b3..590a7dc 100644 --- a/tools/test/h5repack/Makefile.am +++ b/tools/test/h5repack/Makefile.am @@ -47,7 +47,7 @@ h5repacktst_SOURCES=h5repacktst.c if HAVE_SHARED_CONDITIONAL # Build it as shared library if configure is enabled for shared library. - lib_LTLIBRARIES=libdynlibadd.la libdynlibvers.la + noinst_LTLIBRARIES=libdynlibadd.la libdynlibvers.la libdynlibadd_la_SOURCES=dynlib_rpk.c libdynlibvers_la_SOURCES=dynlib_vrpk.c -- cgit v0.12 From b67e626ba9095f35dd9a8f9e8ca906320f85914c Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Mon, 17 Apr 2017 16:25:34 -0500 Subject: HDFFV-10173 remove hook for noinst libs --- test/Makefile.am | 3 --- tools/test/h5repack/Makefile.am | 4 ---- 2 files changed, 7 deletions(-) diff --git a/test/Makefile.am b/test/Makefile.am index a0774a4..49b251a 100644 --- a/test/Makefile.am +++ b/test/Makefile.am @@ -112,9 +112,6 @@ if HAVE_SHARED_CONDITIONAL libdynlib3_la_SOURCES=dynlib3.c libdynlib4_la_SOURCES=dynlib4.c -install-exec-hook: - $(RM) $(DESTDIR)$(libdir)/*dynlib* - else # The libh5test library provides common support code for the tests. noinst_LTLIBRARIES=libh5test.la diff --git a/tools/test/h5repack/Makefile.am b/tools/test/h5repack/Makefile.am index 590a7dc..ce403b0 100644 --- a/tools/test/h5repack/Makefile.am +++ b/tools/test/h5repack/Makefile.am @@ -51,10 +51,6 @@ if HAVE_SHARED_CONDITIONAL libdynlibadd_la_SOURCES=dynlib_rpk.c libdynlibvers_la_SOURCES=dynlib_vrpk.c -install-exec-hook: - $(RM) $(DESTDIR)$(libdir)/*dynlib* -endif - # Temporary files. *.h5 are generated by h5repack. They should # copied to the testfiles/ directory if update is required. CHECK_CLEANFILES+=*.h5 *.bin testfiles/h5diff_attr1.h5 testfiles/tfamily*.h5 -- cgit v0.12 From d39a79fa4c7833bfc86c2ed450bde9c8011524c5 Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Tue, 18 Apr 2017 09:30:11 -0500 Subject: HDFFV-10170 add missing endif --- tools/test/h5repack/Makefile.am | 1 + 1 file changed, 1 insertion(+) diff --git a/tools/test/h5repack/Makefile.am b/tools/test/h5repack/Makefile.am index 8d64a2a..aa964ca 100644 --- a/tools/test/h5repack/Makefile.am +++ b/tools/test/h5repack/Makefile.am @@ -48,6 +48,7 @@ if HAVE_SHARED_CONDITIONAL noinst_LTLIBRARIES=libdynlibadd.la libdynlibvers.la libdynlibadd_la_SOURCES=dynlib_rpk.c libdynlibvers_la_SOURCES=dynlib_vrpk.c +endif # Temporary files. *.h5 are generated by h5repack. They should # copied to the testfiles/ directory if update is required. -- cgit v0.12 From ed9ffe724978a76043cc47d80623c7bdb4f34f60 Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Tue, 18 Apr 2017 09:34:10 -0500 Subject: Reformat char * args --- src/H5PL.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/H5PL.c b/src/H5PL.c index 481368c..c8cf98f 100644 --- a/src/H5PL.c +++ b/src/H5PL.c @@ -415,7 +415,7 @@ done: *------------------------------------------------------------------------- */ herr_t -H5PLappend(const char* plugin_path) +H5PLappend(const char *plugin_path) { herr_t ret_value = SUCCEED; /* Return value */ char *dl_path = NULL; @@ -448,7 +448,7 @@ done: *------------------------------------------------------------------------- */ herr_t -H5PLprepend(const char* plugin_path) +H5PLprepend(const char *plugin_path) { herr_t ret_value = SUCCEED; /* Return value */ char *dl_path = NULL; @@ -484,7 +484,7 @@ done: *------------------------------------------------------------------------- */ herr_t -H5PLreplace(const char* plugin_path, unsigned int index) +H5PLreplace(const char *plugin_path, unsigned int index) { herr_t ret_value = SUCCEED; /* Return value */ char *dl_path = NULL; @@ -518,7 +518,7 @@ done: *------------------------------------------------------------------------- */ herr_t -H5PLinsert(const char* plugin_path, unsigned int index) +H5PLinsert(const char *plugin_path, unsigned int index) { herr_t ret_value = SUCCEED; /* Return value */ char *dl_path = NULL; -- cgit v0.12 From d5da45e168a4e5efeab22c800e5d8d9ff76ea853 Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Tue, 18 Apr 2017 10:38:14 -0500 Subject: Add plugin options for libs --- java/src/jni/Makefile.am | 2 +- test/Makefile.am | 4 ++++ tools/test/h5dump/Makefile.am | 4 ++-- tools/test/h5repack/Makefile.am | 2 ++ 4 files changed, 9 insertions(+), 3 deletions(-) diff --git a/java/src/jni/Makefile.am b/java/src/jni/Makefile.am index 84b8f9c..baecc46 100644 --- a/java/src/jni/Makefile.am +++ b/java/src/jni/Makefile.am @@ -29,7 +29,7 @@ AM_CPPFLAGS+=-I$(top_srcdir)/src -I$(top_srcdir)/java/src/jni $(JNIFLAGS) lib_LTLIBRARIES=libhdf5_java.la # Add libtool numbers to the HDF5 Java (JNI) library (from config/lt_vers.am) -libhdf5_java_la_LDFLAGS= -version-info $(LT_JAVA_VERS_INTERFACE):$(LT_JAVA_VERS_REVISION):$(LT_JAVA_VERS_AGE) $(AM_LDFLAGS) +libhdf5_java_la_LDFLAGS = -module -shared -export-dynamic -version-info $(LT_JAVA_VERS_INTERFACE):$(LT_JAVA_VERS_REVISION):$(LT_JAVA_VERS_AGE) $(AM_LDFLAGS) # Source files for the library libhdf5_java_la_SOURCES=exceptionImp.c h5Constants.c nativeData.c h5util.c h5Imp.c \ diff --git a/test/Makefile.am b/test/Makefile.am index 0d85117..8bbe972 100644 --- a/test/Makefile.am +++ b/test/Makefile.am @@ -109,6 +109,10 @@ if HAVE_SHARED_CONDITIONAL libdynlib2_la_SOURCES=dynlib2.c libdynlib3_la_SOURCES=dynlib3.c libdynlib4_la_SOURCES=dynlib4.c + libdynlib1_la_LDFLAGS = -avoid-version -module -shared -export-dynamic + libdynlib2_la_LDFLAGS = -avoid-version -module -shared -export-dynamic + libdynlib3_la_LDFLAGS = -avoid-version -module -shared -export-dynamic + libdynlib4_la_LDFLAGS = -avoid-version -module -shared -export-dynamic else # The libh5test library provides common support code for the tests. diff --git a/tools/test/h5dump/Makefile.am b/tools/test/h5dump/Makefile.am index 9a63730..4511703 100644 --- a/tools/test/h5dump/Makefile.am +++ b/tools/test/h5dump/Makefile.am @@ -39,9 +39,9 @@ LDADD=$(LIBH5TOOLS) $(LIBHDF5) if HAVE_SHARED_CONDITIONAL # Build it as shared library if configure is enabled for shared library. - lib_LTLIBRARIES=libdynlibdump.la + noinst_LTLIBRARIES=libdynlibdump.la libdynlibdump_la_SOURCES=dynlib_dump.c - + libdynlibdump_la_LDFLAGS = -avoid-version -module -shared -export-dynamic install-exec-hook: $(RM) $(DESTDIR)$(libdir)/*dynlib* endif diff --git a/tools/test/h5repack/Makefile.am b/tools/test/h5repack/Makefile.am index aa964ca..32213cd 100644 --- a/tools/test/h5repack/Makefile.am +++ b/tools/test/h5repack/Makefile.am @@ -48,6 +48,8 @@ if HAVE_SHARED_CONDITIONAL noinst_LTLIBRARIES=libdynlibadd.la libdynlibvers.la libdynlibadd_la_SOURCES=dynlib_rpk.c libdynlibvers_la_SOURCES=dynlib_vrpk.c + libdynlibadd_la_LDFLAGS = -avoid-version -module -shared -export-dynamic + libdynlibvers_la_LDFLAGS = -avoid-version -module -shared -export-dynamic endif # Temporary files. *.h5 are generated by h5repack. They should -- cgit v0.12 From 0bab6fb76c3936b3fd3f62e681893d45c2576a78 Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Tue, 18 Apr 2017 11:04:22 -0500 Subject: HDFFV-10170 undo patch --- test/Makefile.am | 13 ++++++------- tools/test/h5dump/Makefile.am | 3 ++- tools/test/h5repack/Makefile.am | 5 ++++- 3 files changed, 12 insertions(+), 9 deletions(-) diff --git a/test/Makefile.am b/test/Makefile.am index 8bbe972..4c5d85a 100644 --- a/test/Makefile.am +++ b/test/Makefile.am @@ -98,13 +98,13 @@ if BUILD_ALL_CONDITIONAL noinst_PROGRAMS=$(BUILD_ALL_PROGS) endif -if HAVE_SHARED_CONDITIONAL - # The libh5test library provides common support code for the tests. - noinst_LTLIBRARIES=libh5test.la +# The libh5test library provides common support code for the tests. +noinst_LTLIBRARIES=libh5test.la +if HAVE_SHARED_CONDITIONAL # The libdynlib1, libdynlib2, libdynlib3, and libdynlib4 library for testing plugin module plugin.c. # Build it as shared library if configure is enabled for shared library. - noinst_LTLIBRARIES+=libdynlib1.la libdynlib2.la libdynlib3.la libdynlib4.la + lib_LTLIBRARIES=libdynlib1.la libdynlib2.la libdynlib3.la libdynlib4.la libdynlib1_la_SOURCES=dynlib1.c libdynlib2_la_SOURCES=dynlib2.c libdynlib3_la_SOURCES=dynlib3.c @@ -114,9 +114,8 @@ if HAVE_SHARED_CONDITIONAL libdynlib3_la_LDFLAGS = -avoid-version -module -shared -export-dynamic libdynlib4_la_LDFLAGS = -avoid-version -module -shared -export-dynamic -else - # The libh5test library provides common support code for the tests. - noinst_LTLIBRARIES=libh5test.la +install-exec-hook: + $(RM) $(DESTDIR)$(libdir)/*dynlib* endif libh5test_la_SOURCES=h5test.c testframe.c cache_common.c swmr_common.c diff --git a/tools/test/h5dump/Makefile.am b/tools/test/h5dump/Makefile.am index 4511703..3637af2 100644 --- a/tools/test/h5dump/Makefile.am +++ b/tools/test/h5dump/Makefile.am @@ -39,9 +39,10 @@ LDADD=$(LIBH5TOOLS) $(LIBHDF5) if HAVE_SHARED_CONDITIONAL # Build it as shared library if configure is enabled for shared library. - noinst_LTLIBRARIES=libdynlibdump.la + lib_LTLIBRARIES=libdynlibdump.la libdynlibdump_la_SOURCES=dynlib_dump.c libdynlibdump_la_LDFLAGS = -avoid-version -module -shared -export-dynamic + install-exec-hook: $(RM) $(DESTDIR)$(libdir)/*dynlib* endif diff --git a/tools/test/h5repack/Makefile.am b/tools/test/h5repack/Makefile.am index 32213cd..8284839 100644 --- a/tools/test/h5repack/Makefile.am +++ b/tools/test/h5repack/Makefile.am @@ -45,11 +45,14 @@ h5repacktst_SOURCES=h5repacktst.c if HAVE_SHARED_CONDITIONAL # Build it as shared library if configure is enabled for shared library. - noinst_LTLIBRARIES=libdynlibadd.la libdynlibvers.la + lib_LTLIBRARIES=libdynlibadd.la libdynlibvers.la libdynlibadd_la_SOURCES=dynlib_rpk.c libdynlibvers_la_SOURCES=dynlib_vrpk.c libdynlibadd_la_LDFLAGS = -avoid-version -module -shared -export-dynamic libdynlibvers_la_LDFLAGS = -avoid-version -module -shared -export-dynamic + +install-exec-hook: + $(RM) $(DESTDIR)$(libdir)/*dynlib* endif # Temporary files. *.h5 are generated by h5repack. They should -- cgit v0.12 From 1c782f1ae105c193018d806f7e54b03c1932b50d Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Tue, 18 Apr 2017 11:44:47 -0500 Subject: java jni lib also needs to avoid the version-info --- java/src/jni/Makefile.am | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/java/src/jni/Makefile.am b/java/src/jni/Makefile.am index baecc46..e1a8ab5 100644 --- a/java/src/jni/Makefile.am +++ b/java/src/jni/Makefile.am @@ -29,7 +29,7 @@ AM_CPPFLAGS+=-I$(top_srcdir)/src -I$(top_srcdir)/java/src/jni $(JNIFLAGS) lib_LTLIBRARIES=libhdf5_java.la # Add libtool numbers to the HDF5 Java (JNI) library (from config/lt_vers.am) -libhdf5_java_la_LDFLAGS = -module -shared -export-dynamic -version-info $(LT_JAVA_VERS_INTERFACE):$(LT_JAVA_VERS_REVISION):$(LT_JAVA_VERS_AGE) $(AM_LDFLAGS) +libhdf5_java_la_LDFLAGS = -avoid-version -module -shared -export-dynamic -version-info $(LT_JAVA_VERS_INTERFACE):$(LT_JAVA_VERS_REVISION):$(LT_JAVA_VERS_AGE) $(AM_LDFLAGS) # Source files for the library libhdf5_java_la_SOURCES=exceptionImp.c h5Constants.c nativeData.c h5util.c h5Imp.c \ -- cgit v0.12 From db4dd5be86c1b184a8734efd90cc66bcbf78d5de Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Tue, 18 Apr 2017 13:27:54 -0500 Subject: LDFLAGS module forces .so lib to be built on osx instead of .dylib --- java/src/jni/Makefile.am | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/java/src/jni/Makefile.am b/java/src/jni/Makefile.am index e1a8ab5..6ded371 100644 --- a/java/src/jni/Makefile.am +++ b/java/src/jni/Makefile.am @@ -29,7 +29,7 @@ AM_CPPFLAGS+=-I$(top_srcdir)/src -I$(top_srcdir)/java/src/jni $(JNIFLAGS) lib_LTLIBRARIES=libhdf5_java.la # Add libtool numbers to the HDF5 Java (JNI) library (from config/lt_vers.am) -libhdf5_java_la_LDFLAGS = -avoid-version -module -shared -export-dynamic -version-info $(LT_JAVA_VERS_INTERFACE):$(LT_JAVA_VERS_REVISION):$(LT_JAVA_VERS_AGE) $(AM_LDFLAGS) +libhdf5_java_la_LDFLAGS = -avoid-version -shared -export-dynamic -version-info $(LT_JAVA_VERS_INTERFACE):$(LT_JAVA_VERS_REVISION):$(LT_JAVA_VERS_AGE) $(AM_LDFLAGS) # Source files for the library libhdf5_java_la_SOURCES=exceptionImp.c h5Constants.c nativeData.c h5util.c h5Imp.c \ -- cgit v0.12 From 19762419ce30429667e9def628c785b78b961b68 Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Tue, 18 Apr 2017 14:23:35 -0500 Subject: Update tool dyn lib --- tools/test/h5diff/Makefile.am | 1 + 1 file changed, 1 insertion(+) diff --git a/tools/test/h5diff/Makefile.am b/tools/test/h5diff/Makefile.am index 9c6d80f..556c07d 100644 --- a/tools/test/h5diff/Makefile.am +++ b/tools/test/h5diff/Makefile.am @@ -52,6 +52,7 @@ if HAVE_SHARED_CONDITIONAL # Build it as shared library if configure is enabled for shared library. lib_LTLIBRARIES=libdynlibdiff.la libdynlibdiff_la_SOURCES=dynlib_diff.c + libdynlibdiff_la_LDFLAGS = -avoid-version -module -shared -export-dynamic install-exec-hook: $(RM) $(DESTDIR)$(libdir)/*dynlib* -- cgit v0.12 From 1f5ea1a71ac1a859fee9cad0b4672ea6f603981d Mon Sep 17 00:00:00 2001 From: "M. Scot Breitenfeld" Date: Tue, 18 Apr 2017 09:21:36 -0500 Subject: added point to build script repo. --- release_docs/INSTALL_parallel | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/release_docs/INSTALL_parallel b/release_docs/INSTALL_parallel index e4c540c..5a8b603 100644 --- a/release_docs/INSTALL_parallel +++ b/release_docs/INSTALL_parallel @@ -1,6 +1,18 @@ Installation instructions for Parallel HDF5 ------------------------------------------- +0. Use Build Scripts +-------------------- +The HDF Group is accumulating build scripts to handle building parallel HDF5 +on various platforms (Cray, IBM, SGI, etc...). These scripts are being +maintained and updated continuously for current and future systems. The reader +is strongly encouraged to consult the repository at, + +https://github.com/HDFGroup/build_hdf5 + +for building parallel HDF5 on these system. All contributions, additions +and fixes to the repository are welcomed and encouraged. + 1. Overview ----------- -- cgit v0.12 From 6126528f115757afe0b5aeb8f0a934b6a51946f4 Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Thu, 20 Apr 2017 12:25:27 -0500 Subject: Correct typo of file name --- config/cmake/HDF5_Examples.cmake.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/cmake/HDF5_Examples.cmake.in b/config/cmake/HDF5_Examples.cmake.in index 5c172dc..6918bb3 100644 --- a/config/cmake/HDF5_Examples.cmake.in +++ b/config/cmake/HDF5_Examples.cmake.in @@ -98,6 +98,6 @@ if (WIN32) include (${CTEST_SCRIPT_DIRECTORY}\\HDF5_Examples_options.cmake) include (${CTEST_SCRIPT_DIRECTORY}\\CTestScript.cmake) else () - include (${CTEST_SCRIPT_DIRECTORY}/HDF_Examples_options.cmake) + include (${CTEST_SCRIPT_DIRECTORY}/HDF5_Examples_options.cmake) include (${CTEST_SCRIPT_DIRECTORY}/CTestScript.cmake) endif () -- cgit v0.12 From 2b936c79e24e292470f135ac50161349077e8f93 Mon Sep 17 00:00:00 2001 From: Dana Robinson Date: Wed, 19 Apr 2017 18:28:21 -0400 Subject: Added code to disable the evict-on-close feature in the parallel library. --- src/H5Pfapl.c | 21 ++++++++++- test/cache_image.c | 8 ++++ test/evict_on_close.c | 100 ++++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 127 insertions(+), 2 deletions(-) diff --git a/src/H5Pfapl.c b/src/H5Pfapl.c index 0dab539..9e275b8 100644 --- a/src/H5Pfapl.c +++ b/src/H5Pfapl.c @@ -4379,7 +4379,19 @@ H5P_facc_mdc_log_location_close(const char H5_ATTR_UNUSED *name, size_t H5_ATTR_ *------------------------------------------------------------------------- */ herr_t -H5Pset_evict_on_close(hid_t fapl_id, hbool_t evict_on_close) +H5Pset_evict_on_close( +#if defined(H5_HAVE_PARALLEL) && !defined(H5_DEBUG_BUILD) + hid_t H5_ATTR_UNUSED fapl_id, +#else + hid_t fapl_id, +#endif /* H5_HAVE_PARALLEL and !H5_DEBUG_BUILD */ + +#ifdef H5_HAVE_PARALLEL + hbool_t H5_ATTR_UNUSED evict_on_close +#else + hbool_t evict_on_close +#endif /* H5_HAVE_PARALLEL */ +) { H5P_genplist_t *plist; /* property list pointer */ herr_t ret_value = SUCCEED; /* return value */ @@ -4387,6 +4399,7 @@ H5Pset_evict_on_close(hid_t fapl_id, hbool_t evict_on_close) FUNC_ENTER_API(FAIL) H5TRACE2("e", "ib", fapl_id, evict_on_close); + /* Compare the property list's class against the other class */ if(TRUE != H5P_isa_class(fapl_id, H5P_FILE_ACCESS)) HGOTO_ERROR(H5E_PLIST, H5E_CANTREGISTER, FAIL, "property list is not a file access plist") @@ -4395,9 +4408,13 @@ H5Pset_evict_on_close(hid_t fapl_id, hbool_t evict_on_close) if(NULL == (plist = (H5P_genplist_t *)H5I_object(fapl_id))) HGOTO_ERROR(H5E_ATOM, H5E_BADATOM, FAIL, "can't find object for ID") - /* Set values */ +#ifndef H5_HAVE_PARALLEL + /* Set value */ if(H5P_set(plist, H5F_ACS_EVICT_ON_CLOSE_FLAG_NAME, &evict_on_close) < 0) HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "can't set evict on close property") +#else + HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "evict on close is currently not supported in parallel HDF5") +#endif /* H5_HAVE_PARALLEL */ done: FUNC_LEAVE_API(ret_value) diff --git a/test/cache_image.c b/test/cache_image.c index c3adf5c..c8f1e82 100644 --- a/test/cache_image.c +++ b/test/cache_image.c @@ -60,7 +60,10 @@ static unsigned cache_image_api_error_check_3(void); static unsigned cache_image_api_error_check_4(void); static unsigned get_free_sections_test(void); + +#ifndef H5_HAVE_PARALLEL static unsigned evict_on_close_test(void); +#endif /* H5_HAVE_PARALLEL */ /****************************************************************************/ @@ -7709,6 +7712,7 @@ get_free_sections_test(void) * *------------------------------------------------------------------------- */ +#ifndef H5_HAVE_PARALLEL static unsigned evict_on_close_test(void) { @@ -8013,6 +8017,7 @@ evict_on_close_test(void) return !pass; } /* evict_on_close_test() */ +#endif /* H5_HAVE_PARALLEL */ /*------------------------------------------------------------------------- @@ -8064,7 +8069,10 @@ main(void) nerrs += cache_image_api_error_check_4(); nerrs += get_free_sections_test(); + +#ifndef H5_HAVE_PARALLEL nerrs += evict_on_close_test(); +#endif /* H5_HAVE_PARALLEL */ return(nerrs > 0); diff --git a/test/evict_on_close.c b/test/evict_on_close.c index b4ef246..91784da 100644 --- a/test/evict_on_close.c +++ b/test/evict_on_close.c @@ -37,6 +37,12 @@ #include "H5Gpkg.h" #include "H5Ipkg.h" +/* Evict on close is not supported under parallel at this time. + * In the meantime, we just run a simple check that EoC can't be + * enabled in parallel HDF5. + */ +#ifndef H5_HAVE_PARALLEL + /* Uncomment to manually inspect cache states */ /* (Requires debug build of the library) */ /* #define EOC_MANUAL_INSPECTION */ @@ -800,6 +806,7 @@ error: } /* check_dset_scheme() */ + /*------------------------------------------------------------------------- * Function: check_evict_on_close_api() @@ -990,3 +997,96 @@ error: } /* end main() */ +#else + + +/*------------------------------------------------------------------------- + * Function: check_evict_on_close_parallel_fail() + * + * Purpose: Verify that the H5Pset_evict_on_close() call fails in + * parallel HDF5. + * + * Return: SUCCEED/FAIL + * + * Programmer: Dana Robinson + * Spring 2017 + * + *------------------------------------------------------------------------- + */ +static herr_t +check_evict_on_close_parallel_fail(void) +{ + hid_t fapl_id = -1; + hbool_t evict_on_close; + herr_t status; + + TESTING("evict on close fails in parallel"); + + /* Create a fapl */ + if((fapl_id = H5Pcreate(H5P_FILE_ACCESS)) < 0) + TEST_ERROR; + + /* Set the evict on close property (should fail)*/ + evict_on_close = TRUE; + H5E_BEGIN_TRY { + status = H5Pset_evict_on_close(fapl_id, evict_on_close); + } H5E_END_TRY; + if(status >= 0) + FAIL_PUTS_ERROR("H5Pset_evict_on_close() did not fail in parallel HDF5."); + + /* close fapl */ + if(H5Pclose(fapl_id) < 0) + TEST_ERROR; + + PASSED(); + return SUCCEED; + +error: + H5_FAILED(); + return FAIL; + +} /* check_evict_on_close_parallel_fail() */ + + +/*------------------------------------------------------------------------- + * Function: main (parallel version) + * + * Return: EXIT_FAILURE/EXIT_SUCCESS + * + * Programmer: Dana Robinson + * Spring 2016 + * + *------------------------------------------------------------------------- + */ +int +main(void) +{ + unsigned nerrors = 0; /* number of test errors */ + + HDprintf("Testing evict-on-close cache behavior\n"); + + /* Initialize */ + h5_reset(); + + /* Test that EoC fails in parallel HDF5 */ + nerrors += check_evict_on_close_parallel_fail() < 0 ? 1 : 0; + + if(nerrors) + goto error; + + HDprintf("All evict-on-close tests passed.\n"); + HDprintf("Note that EoC is not supported under parallel so most tests are skipped.\n"); + + return EXIT_SUCCESS; + +error: + + HDprintf("***** %u evict-on-close test%s FAILED! *****\n", + nerrors, nerrors > 1 ? "S" : ""); + + return EXIT_FAILURE; + +} /* main() - parallel */ + +#endif /* H5_HAVE_PARALLEL */ + -- cgit v0.12 From cbab16c8f2767de8f8786a85903e0c4299abe99f Mon Sep 17 00:00:00 2001 From: Dana Robinson Date: Thu, 20 Apr 2017 16:11:47 -0400 Subject: The cache_image test shows a skipped message about EoC in parallel. --- src/H5Pfapl.c | 1 - test/cache_image.c | 18 +++++++++--------- test/evict_on_close.c | 1 - 3 files changed, 9 insertions(+), 11 deletions(-) diff --git a/src/H5Pfapl.c b/src/H5Pfapl.c index 9e275b8..0ab0433 100644 --- a/src/H5Pfapl.c +++ b/src/H5Pfapl.c @@ -4399,7 +4399,6 @@ H5Pset_evict_on_close( FUNC_ENTER_API(FAIL) H5TRACE2("e", "ib", fapl_id, evict_on_close); - /* Compare the property list's class against the other class */ if(TRUE != H5P_isa_class(fapl_id, H5P_FILE_ACCESS)) HGOTO_ERROR(H5E_PLIST, H5E_CANTREGISTER, FAIL, "property list is not a file access plist") diff --git a/test/cache_image.c b/test/cache_image.c index c8f1e82..58b0b8f 100644 --- a/test/cache_image.c +++ b/test/cache_image.c @@ -60,10 +60,7 @@ static unsigned cache_image_api_error_check_3(void); static unsigned cache_image_api_error_check_4(void); static unsigned get_free_sections_test(void); - -#ifndef H5_HAVE_PARALLEL static unsigned evict_on_close_test(void); -#endif /* H5_HAVE_PARALLEL */ /****************************************************************************/ @@ -7712,10 +7709,10 @@ get_free_sections_test(void) * *------------------------------------------------------------------------- */ -#ifndef H5_HAVE_PARALLEL static unsigned evict_on_close_test(void) { +#ifndef H5_HAVE_PARALLEL const char * fcn_name = "evict_on_close_test()"; char filename[512]; hbool_t show_progress = FALSE; @@ -7724,9 +7721,16 @@ evict_on_close_test(void) H5F_t *file_ptr = NULL; H5C_t *cache_ptr = NULL; int cp = 0; +#endif /* H5_HAVE_PARALLEL */ TESTING("Cache image / evict on close interaction"); +#ifdef H5_HAVE_PARALLEL + SKIPPED(); + HDputs(" EoC not supported in the parallel library."); + return 0; +#else + pass = TRUE; if ( show_progress ) @@ -8015,9 +8019,9 @@ evict_on_close_test(void) FUNC, failure_mssg); return !pass; +#endif /* H5_HAVE_PARALLEL */ } /* evict_on_close_test() */ -#endif /* H5_HAVE_PARALLEL */ /*------------------------------------------------------------------------- @@ -8069,13 +8073,9 @@ main(void) nerrs += cache_image_api_error_check_4(); nerrs += get_free_sections_test(); - -#ifndef H5_HAVE_PARALLEL nerrs += evict_on_close_test(); -#endif /* H5_HAVE_PARALLEL */ return(nerrs > 0); } /* main() */ - diff --git a/test/evict_on_close.c b/test/evict_on_close.c index 91784da..6536837 100644 --- a/test/evict_on_close.c +++ b/test/evict_on_close.c @@ -806,7 +806,6 @@ error: } /* check_dset_scheme() */ - /*------------------------------------------------------------------------- * Function: check_evict_on_close_api() -- cgit v0.12 From 15f85df5405eb2caf6ee4d3bc5f558344d4bb16a Mon Sep 17 00:00:00 2001 From: Dana Robinson Date: Thu, 20 Apr 2017 18:14:44 -0400 Subject: bin/trace updates in H5PL.c --- src/H5PL.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/H5PL.c b/src/H5PL.c index c8cf98f..bf69d3d 100644 --- a/src/H5PL.c +++ b/src/H5PL.c @@ -421,6 +421,7 @@ H5PLappend(const char *plugin_path) char *dl_path = NULL; FUNC_ENTER_API(FAIL) + H5TRACE1("e", "*s", plugin_path); if(H5PL_num_paths_g == H5PL_MAX_PATH_NUM) HGOTO_ERROR(H5E_PLUGIN, H5E_NOSPACE, FAIL, "too many directories in path for table") if(NULL == plugin_path) @@ -455,6 +456,7 @@ H5PLprepend(const char *plugin_path) unsigned int plindex; FUNC_ENTER_API(FAIL) + H5TRACE1("e", "*s", plugin_path); if(H5PL_num_paths_g == H5PL_MAX_PATH_NUM) HGOTO_ERROR(H5E_PLUGIN, H5E_NOSPACE, FAIL, "too many directories in path for table") if(NULL == plugin_path) @@ -490,6 +492,7 @@ H5PLreplace(const char *plugin_path, unsigned int index) char *dl_path = NULL; FUNC_ENTER_API(FAIL) + H5TRACE2("e", "*sIu", plugin_path, index); if(NULL == plugin_path) HGOTO_ERROR(H5E_PLUGIN, H5E_CANTALLOC, FAIL, "no path provided") if(index >= H5PL_MAX_PATH_NUM) @@ -525,6 +528,7 @@ H5PLinsert(const char *plugin_path, unsigned int index) unsigned int plindex; FUNC_ENTER_API(FAIL) + H5TRACE2("e", "*sIu", plugin_path, index); if(H5PL_num_paths_g == H5PL_MAX_PATH_NUM) HGOTO_ERROR(H5E_PLUGIN, H5E_NOSPACE, FAIL, "too many directories in path for table") if(NULL == plugin_path) -- cgit v0.12 From 87ceb783920c63cf374c08f17d7d601923481459 Mon Sep 17 00:00:00 2001 From: Dana Robinson Date: Thu, 20 Apr 2017 20:19:15 -0400 Subject: Fixed problems that prevent bin/trace from marking up some functions. --- src/H5.c | 6 +++--- src/H5PL.c | 10 ++++++++-- src/H5Pfapl.c | 14 +------------- 3 files changed, 12 insertions(+), 18 deletions(-) diff --git a/src/H5.c b/src/H5.c index 5875906..1068fc6 100644 --- a/src/H5.c +++ b/src/H5.c @@ -942,7 +942,7 @@ H5allocate_memory(size_t size, hbool_t clear) { void *ret_value = NULL; - FUNC_ENTER_API_NOINIT; + FUNC_ENTER_API_NOINIT H5TRACE2("*x", "zb", size, clear); if(clear) @@ -983,7 +983,7 @@ H5resize_memory(void *mem, size_t size) { void *ret_value = NULL; - FUNC_ENTER_API_NOINIT; + FUNC_ENTER_API_NOINIT H5TRACE2("*x", "*xz", mem, size); ret_value = H5MM_realloc(mem, size); @@ -1007,7 +1007,7 @@ H5resize_memory(void *mem, size_t size) herr_t H5free_memory(void *mem) { - FUNC_ENTER_API_NOINIT; + FUNC_ENTER_API_NOINIT H5TRACE1("e", "*x", mem); /* At this time, it is impossible for this to fail. */ diff --git a/src/H5PL.c b/src/H5PL.c index bf69d3d..02c8f00 100644 --- a/src/H5PL.c +++ b/src/H5PL.c @@ -638,14 +638,20 @@ done: * * Purpose: Query the size of the current list of plugin paths. * - * Return: Non-negative or success. + * Return: Plugin path size (can't indicate failure due to unsigned type) * *------------------------------------------------------------------------- */ unsigned int H5PLsize(void) { - return (unsigned int)H5PL_num_paths_g; + unsigned int ret_value = (unsigned int)H5PL_num_paths_g; + + FUNC_ENTER_API(0) + H5TRACE0("Iu",""); + +done: + FUNC_LEAVE_API(ret_value) } /* end H5PLsize() */ diff --git a/src/H5Pfapl.c b/src/H5Pfapl.c index 0ab0433..1b0a4b9 100644 --- a/src/H5Pfapl.c +++ b/src/H5Pfapl.c @@ -4379,19 +4379,7 @@ H5P_facc_mdc_log_location_close(const char H5_ATTR_UNUSED *name, size_t H5_ATTR_ *------------------------------------------------------------------------- */ herr_t -H5Pset_evict_on_close( -#if defined(H5_HAVE_PARALLEL) && !defined(H5_DEBUG_BUILD) - hid_t H5_ATTR_UNUSED fapl_id, -#else - hid_t fapl_id, -#endif /* H5_HAVE_PARALLEL and !H5_DEBUG_BUILD */ - -#ifdef H5_HAVE_PARALLEL - hbool_t H5_ATTR_UNUSED evict_on_close -#else - hbool_t evict_on_close -#endif /* H5_HAVE_PARALLEL */ -) +H5Pset_evict_on_close(hid_t fapl_id, hbool_t evict_on_close) { H5P_genplist_t *plist; /* property list pointer */ herr_t ret_value = SUCCEED; /* return value */ -- cgit v0.12 From 22d54edf90d008acf83cb74e223751319404a1ad Mon Sep 17 00:00:00 2001 From: Vailin Choi Date: Tue, 18 Apr 2017 13:24:00 -0500 Subject: Fix for DAILYTEST-259 h5clear test failure Deposit the test files in test/misc/testfiles for testh5clear.sh to use instead of depending on h5clear_gentest. Tested on kituo, osx1010test, quail, platypus and ostrich. --- MANIFEST | 11 ++- tools/test/misc/testfiles/h5clear_log_v3.h5 | Bin 0 -> 2048 bytes tools/test/misc/testfiles/h5clear_mdc_image.h5 | Bin 0 -> 23467 bytes tools/test/misc/testfiles/h5clear_sec2_v0.h5 | Bin 0 -> 800 bytes tools/test/misc/testfiles/h5clear_sec2_v2.h5 | Bin 0 -> 830 bytes tools/test/misc/testfiles/h5clear_sec2_v3.h5 | Bin 0 -> 195 bytes tools/test/misc/testfiles/latest_h5clear_log_v3.h5 | Bin 0 -> 2048 bytes .../test/misc/testfiles/latest_h5clear_sec2_v3.h5 | Bin 0 -> 195 bytes tools/test/misc/testfiles/mod_h5clear_mdc_image.h5 | Bin 22048 -> 0 bytes tools/test/misc/testfiles/orig_h5clear_sec2_v0.h5 | Bin 800 -> 0 bytes tools/test/misc/testfiles/orig_h5clear_sec2_v2.h5 | Bin 830 -> 0 bytes tools/test/misc/testfiles/orig_h5clear_sec2_v3.h5 | Bin 195 -> 0 bytes tools/test/misc/testh5clear.sh.in | 84 +++++++++++---------- 13 files changed, 51 insertions(+), 44 deletions(-) create mode 100644 tools/test/misc/testfiles/h5clear_log_v3.h5 create mode 100644 tools/test/misc/testfiles/h5clear_mdc_image.h5 create mode 100644 tools/test/misc/testfiles/h5clear_sec2_v0.h5 create mode 100644 tools/test/misc/testfiles/h5clear_sec2_v2.h5 create mode 100644 tools/test/misc/testfiles/h5clear_sec2_v3.h5 create mode 100644 tools/test/misc/testfiles/latest_h5clear_log_v3.h5 create mode 100644 tools/test/misc/testfiles/latest_h5clear_sec2_v3.h5 delete mode 100644 tools/test/misc/testfiles/mod_h5clear_mdc_image.h5 delete mode 100644 tools/test/misc/testfiles/orig_h5clear_sec2_v0.h5 delete mode 100644 tools/test/misc/testfiles/orig_h5clear_sec2_v2.h5 delete mode 100644 tools/test/misc/testfiles/orig_h5clear_sec2_v3.h5 diff --git a/MANIFEST b/MANIFEST index 4b9c45e..b51f1bc 100644 --- a/MANIFEST +++ b/MANIFEST @@ -1471,10 +1471,13 @@ ./tools/test/misc/testfiles/h5clear_no_mdc_image.ddl ./tools/test/misc/testfiles/h5clear_open_fail.ddl ./tools/test/misc/testfiles/h5clear_usage.ddl -./tools/test/misc/testfiles/mod_h5clear_mdc_image.h5 -./tools/test/misc/testfiles/orig_h5clear_sec2_v0.h5 -./tools/test/misc/testfiles/orig_h5clear_sec2_v2.h5 -./tools/test/misc/testfiles/orig_h5clear_sec2_v3.h5 +./tools/test/misc/testfiles/h5clear_log_v3.h5 +./tools/test/misc/testfiles/h5clear_mdc_image.h5 +./tools/test/misc/testfiles/h5clear_sec2_v0.h5 +./tools/test/misc/testfiles/h5clear_sec2_v2.h5 +./tools/test/misc/testfiles/h5clear_sec2_v3.h5 +./tools/test/misc/testfiles/latest_h5clear_log_v3.h5 +./tools/test/misc/testfiles/latest_h5clear_sec2_v3.h5 ./tools/test/misc/testfiles/h5mkgrp_help.txt ./tools/test/misc/testfiles/h5mkgrp_version.txt.in ./tools/test/misc/h5perf_gentest.c diff --git a/tools/test/misc/testfiles/h5clear_log_v3.h5 b/tools/test/misc/testfiles/h5clear_log_v3.h5 new file mode 100644 index 0000000..aed33a4 Binary files /dev/null and b/tools/test/misc/testfiles/h5clear_log_v3.h5 differ diff --git a/tools/test/misc/testfiles/h5clear_mdc_image.h5 b/tools/test/misc/testfiles/h5clear_mdc_image.h5 new file mode 100644 index 0000000..6ed8b70 Binary files /dev/null and b/tools/test/misc/testfiles/h5clear_mdc_image.h5 differ diff --git a/tools/test/misc/testfiles/h5clear_sec2_v0.h5 b/tools/test/misc/testfiles/h5clear_sec2_v0.h5 new file mode 100644 index 0000000..571fd46 Binary files /dev/null and b/tools/test/misc/testfiles/h5clear_sec2_v0.h5 differ diff --git a/tools/test/misc/testfiles/h5clear_sec2_v2.h5 b/tools/test/misc/testfiles/h5clear_sec2_v2.h5 new file mode 100644 index 0000000..92833e6 Binary files /dev/null and b/tools/test/misc/testfiles/h5clear_sec2_v2.h5 differ diff --git a/tools/test/misc/testfiles/h5clear_sec2_v3.h5 b/tools/test/misc/testfiles/h5clear_sec2_v3.h5 new file mode 100644 index 0000000..9f1e6ce Binary files /dev/null and b/tools/test/misc/testfiles/h5clear_sec2_v3.h5 differ diff --git a/tools/test/misc/testfiles/latest_h5clear_log_v3.h5 b/tools/test/misc/testfiles/latest_h5clear_log_v3.h5 new file mode 100644 index 0000000..da5c426 Binary files /dev/null and b/tools/test/misc/testfiles/latest_h5clear_log_v3.h5 differ diff --git a/tools/test/misc/testfiles/latest_h5clear_sec2_v3.h5 b/tools/test/misc/testfiles/latest_h5clear_sec2_v3.h5 new file mode 100644 index 0000000..e511248 Binary files /dev/null and b/tools/test/misc/testfiles/latest_h5clear_sec2_v3.h5 differ diff --git a/tools/test/misc/testfiles/mod_h5clear_mdc_image.h5 b/tools/test/misc/testfiles/mod_h5clear_mdc_image.h5 deleted file mode 100644 index 310134b..0000000 Binary files a/tools/test/misc/testfiles/mod_h5clear_mdc_image.h5 and /dev/null differ diff --git a/tools/test/misc/testfiles/orig_h5clear_sec2_v0.h5 b/tools/test/misc/testfiles/orig_h5clear_sec2_v0.h5 deleted file mode 100644 index 571fd46..0000000 Binary files a/tools/test/misc/testfiles/orig_h5clear_sec2_v0.h5 and /dev/null differ diff --git a/tools/test/misc/testfiles/orig_h5clear_sec2_v2.h5 b/tools/test/misc/testfiles/orig_h5clear_sec2_v2.h5 deleted file mode 100644 index 92833e6..0000000 Binary files a/tools/test/misc/testfiles/orig_h5clear_sec2_v2.h5 and /dev/null differ diff --git a/tools/test/misc/testfiles/orig_h5clear_sec2_v3.h5 b/tools/test/misc/testfiles/orig_h5clear_sec2_v3.h5 deleted file mode 100644 index 9f1e6ce..0000000 Binary files a/tools/test/misc/testfiles/orig_h5clear_sec2_v3.h5 and /dev/null differ diff --git a/tools/test/misc/testh5clear.sh.in b/tools/test/misc/testh5clear.sh.in index 8dbc66c..49926ab 100644 --- a/tools/test/misc/testh5clear.sh.in +++ b/tools/test/misc/testh5clear.sh.in @@ -66,10 +66,13 @@ $SRC_H5CLEAR_TESTFILES/h5clear_usage.ddl $SRC_H5CLEAR_TESTFILES/h5clear_open_fail.ddl $SRC_H5CLEAR_TESTFILES/h5clear_missing_file.ddl $SRC_H5CLEAR_TESTFILES/h5clear_no_mdc_image.ddl -$SRC_H5CLEAR_TESTFILES/orig_h5clear_sec2_v0.h5 -$SRC_H5CLEAR_TESTFILES/orig_h5clear_sec2_v2.h5 -$SRC_H5CLEAR_TESTFILES/orig_h5clear_sec2_v3.h5 -$SRC_H5CLEAR_TESTFILES/mod_h5clear_mdc_image.h5 +$SRC_H5CLEAR_TESTFILES/h5clear_sec2_v0.h5 +$SRC_H5CLEAR_TESTFILES/h5clear_sec2_v2.h5 +$SRC_H5CLEAR_TESTFILES/h5clear_sec2_v3.h5 +$SRC_H5CLEAR_TESTFILES/h5clear_log_v3.h5 +$SRC_H5CLEAR_TESTFILES/latest_h5clear_log_v3.h5 +$SRC_H5CLEAR_TESTFILES/latest_h5clear_sec2_v3.h5 +$SRC_H5CLEAR_TESTFILES/h5clear_mdc_image.h5 " COPY_TESTFILES_TO_TESTDIR() @@ -119,8 +122,8 @@ CLEAN_TESTFILES_AND_TESTDIR() # beginning with the word "Testing". # TESTING() { - SPACES=" " - echo "Testing $* $SPACES" | cut -c1-70 | tr -d '\012' + SPACES=" " + echo "Testing $* $SPACES" | cut -c1-74 | tr -d '\012' } # $1 is the expected output @@ -224,29 +227,27 @@ COPY_TESTFILES_TO_TESTDIR # "h5clear -h" # "h5clear" (no options, no file) # "h5clear junk.h5" (no options, nonexisting file) -# "h5clear orig_h5clear_sec2_v3.h5" (no options, existing file) +# "h5clear h5clear_sec2_v3.h5" (no options, existing file) # "h5clear -m" (valid 1 option, no file) # "h5clear -s junk.h5" (valid 1 option, nonexisting file) -# "h5clear -m -s junk.h5" (valid 2 options, no file) +# "h5clear -m -s" (valid 2 options, no file) # "h5clear -m -s junk.h5" (valid 2 options, nonexisting file) -# "h5clear -m orig_h5clear_sec2_v2.h5" (valid 1 option, existing file, no cache image) -# "h5clear -s -m orig_h5clear_sec2_v0.h5" (valid 2 options, existing file, no cache image) +# "h5clear -m h5clear_sec2_v2.h5" (valid 1 option, existing file, no cache image) +# "h5clear -s -m h5clear_sec2_v0.h5" (valid 2 options, existing file, no cache image) TOOLTEST_OUT "" -h "" h5clear_usage.ddl TOOLTEST_OUT "" "" "" h5clear_usage.ddl TOOLTEST_OUT junk.h5 "" "" h5clear_usage.ddl -TOOLTEST_OUT $TESTDIR/orig_h5clear_sec2_v3.h5 "" "" h5clear_usage.ddl +TOOLTEST_OUT $TESTDIR/h5clear_sec2_v3.h5 "" "" h5clear_usage.ddl TOOLTEST_OUT "" -m "" h5clear_missing_file.ddl TOOLTEST_OUT junk.h5 -s "" h5clear_open_fail.ddl TOOLTEST_OUT "" -m -s h5clear_missing_file.ddl TOOLTEST_OUT junk.h5 -m -s h5clear_open_fail.ddl -TOOLTEST_OUT $TESTDIR/orig_h5clear_sec2_v2.h5 -m "" h5clear_no_mdc_image.ddl -TOOLTEST_OUT $TESTDIR/orig_h5clear_sec2_v0.h5 -s -m h5clear_no_mdc_image.ddl +TOOLTEST_OUT $TESTDIR/h5clear_sec2_v2.h5 -m "" h5clear_no_mdc_image.ddl +TOOLTEST_OUT $TESTDIR/h5clear_sec2_v0.h5 -s -m h5clear_no_mdc_image.ddl # # # # The following are tests to verify the expected exit code from h5clear: -# "h5clear -m h5clear_mdc_image.h5" (valid option, existing file, succeed exit code) -# "h5clear --vers" (valid option, version #, succeed exit code) # "h5clear -k" (invalid 1 option, no file, fail exit code) # "h5clear -k junk.h5" (invalid 1 option, nonexisting file, fail exit code) # "h5clear -l h5clear_sec2_v2.h5" (invalid 1 option, existing file, fail exit code) @@ -256,52 +257,55 @@ TOOLTEST_OUT $TESTDIR/orig_h5clear_sec2_v0.h5 -s -m h5clear_no_mdc_image.ddl # "h5clear -l -m junk.h5" (invalid/valid 2 options, nonexisting file, fail exit code) # "h5clear -m -k h5clear_sec2_v0.h5" (valid/invalid 2 options, existing file, fail exit code) # "h5clear -l -m h5clear_sec2_v0.h5" (invalid/valid 2 options, existing file, fail exit code) -TOOLTEST h5clear_mdc_image.h5 -m "" $SUCCEED -TOOLTEST "" --vers "" $SUCCEED TOOLTEST "" -k "" $FAIL TOOLTEST junk.h5 -k "" $FAIL TOOLTEST h5clear_sec2_v2.h5 -l "" $FAIL TOOLTEST "" -m -k $FAIL TOOLTEST "" -l -m $FAIL -TOOLTEST junk.h5 -m -l $FAIL +TOOLTEST junk.h5 -m -k $FAIL TOOLTEST junk.h5 -l -m $FAIL -TOOLTEST h5clear_sec2_v0.h5 -m -l $FAIL -TOOLTEST h5clear_sec2_v0.h5 -l -m $FAIL +TOOLTEST $TESTDIR/h5clear_sec2_v0.h5 -m -k $FAIL +TOOLTEST $TESTDIR/h5clear_sec2_v0.h5 -l -m $FAIL +# +# "h5clear --vers" (valid option, version #, succeed exit code) +# "h5clear -m h5clear_mdc_image.h5" (valid option, existing file, succeed exit code) +TOOLTEST "" --vers "" $SUCCEED +TOOLTEST $TESTDIR/h5clear_mdc_image.h5 -m "" $SUCCEED # # # # h5clear_mdc_image.h5 already has cache image removed earlier, verify the expected warning from h5clear: -TOOLTEST_OUT $TESTDIR/mod_h5clear_mdc_image.h5 -m "" h5clear_no_mdc_image.ddl -TOOLTEST_OUT $TESTDIR/mod_h5clear_mdc_image.h5 -s -m h5clear_no_mdc_image.ddl +TOOLTEST_OUT $TESTDIR/h5clear_mdc_image.h5 -m "" h5clear_no_mdc_image.ddl +TOOLTEST_OUT $TESTDIR/h5clear_mdc_image.h5 -s -m h5clear_no_mdc_image.ddl # # # # The following are tests to verify the status_flags field is cleared properly: -OPEN_CHK h5clear_sec2_v3.h5 $FAIL -TOOLTEST h5clear_sec2_v3.h5 -s "" $SUCCEED -OPEN_CHK h5clear_sec2_v3.h5 $SUCCEED +OPEN_CHK $TESTDIR/h5clear_sec2_v3.h5 $FAIL +TOOLTEST $TESTDIR/h5clear_sec2_v3.h5 -s "" $SUCCEED +OPEN_CHK $TESTDIR/h5clear_sec2_v3.h5 $SUCCEED # -OPEN_CHK h5clear_log_v3.h5 $FAIL -TOOLTEST h5clear_log_v3.h5 -s "" $SUCCEED -OPEN_CHK h5clear_log_v3.h5 $SUCCEED +OPEN_CHK $TESTDIR/h5clear_log_v3.h5 $FAIL +TOOLTEST $TESTDIR/h5clear_log_v3.h5 -s "" $SUCCEED +OPEN_CHK $TESTDIR/h5clear_log_v3.h5 $SUCCEED # -OPEN_CHK latest_h5clear_sec2_v3.h5 $FAIL -TOOLTEST latest_h5clear_sec2_v3.h5 -s "" $SUCCEED -OPEN_CHK latest_h5clear_sec2_v3.h5 $SUCCEED +OPEN_CHK $TESTDIR/latest_h5clear_sec2_v3.h5 $FAIL +TOOLTEST $TESTDIR/latest_h5clear_sec2_v3.h5 -s "" $SUCCEED +OPEN_CHK $TESTDIR/latest_h5clear_sec2_v3.h5 $SUCCEED # -OPEN_CHK latest_h5clear_log_v3.h5 $FAIL -TOOLTEST latest_h5clear_log_v3.h5 -s "" $SUCCEED -OPEN_CHK latest_h5clear_log_v3.h5 $SUCCEED +OPEN_CHK $TESTDIR/latest_h5clear_log_v3.h5 $FAIL +TOOLTEST $TESTDIR/latest_h5clear_log_v3.h5 -s "" $SUCCEED +OPEN_CHK $TESTDIR/latest_h5clear_log_v3.h5 $SUCCEED # # File open succeeds for the following 2 test files because the # library does not check status_flags for files with < v3 superblock: -OPEN_CHK h5clear_sec2_v0.h5 $SUCCEED -TOOLTEST h5clear_sec2_v0.h5 -s "" $SUCCEED -OPEN_CHK h5clear_sec2_v0.h5 $SUCCEED +OPEN_CHK $TESTDIR/h5clear_sec2_v0.h5 $SUCCEED +TOOLTEST $TESTDIR/h5clear_sec2_v0.h5 -s "" $SUCCEED +OPEN_CHK $TESTDIR/h5clear_sec2_v0.h5 $SUCCEED # -OPEN_CHK h5clear_sec2_v2.h5 $SUCCEED -TOOLTEST h5clear_sec2_v2.h5 -s "" $SUCCEED -OPEN_CHK h5clear_sec2_v2.h5 $SUCCEED +OPEN_CHK $TESTDIR/h5clear_sec2_v2.h5 $SUCCEED +TOOLTEST $TESTDIR/h5clear_sec2_v2.h5 -s "" $SUCCEED +OPEN_CHK $TESTDIR/h5clear_sec2_v2.h5 $SUCCEED # # # -- cgit v0.12 From ddd8cf0e1c0c1450de1c37ba866afad469cf63b3 Mon Sep 17 00:00:00 2001 From: Vailin Choi Date: Wed, 19 Apr 2017 22:51:39 -0500 Subject: Modifications based on review comments from pull request. Made changes according to review comments and discussion with Allen. --- MANIFEST | 1 + tools/test/misc/h5clear_gentest.c | 118 ++++++++++----------- tools/test/misc/testfiles/mod_h5clear_mdc_image.h5 | Bin 0 -> 22048 bytes tools/test/misc/testh5clear.sh.in | 104 ++++++++++-------- 4 files changed, 117 insertions(+), 106 deletions(-) create mode 100644 tools/test/misc/testfiles/mod_h5clear_mdc_image.h5 diff --git a/MANIFEST b/MANIFEST index b51f1bc..35d3c2e 100644 --- a/MANIFEST +++ b/MANIFEST @@ -1478,6 +1478,7 @@ ./tools/test/misc/testfiles/h5clear_sec2_v3.h5 ./tools/test/misc/testfiles/latest_h5clear_log_v3.h5 ./tools/test/misc/testfiles/latest_h5clear_sec2_v3.h5 +./tools/test/misc/testfiles/mod_h5clear_mdc_image.h5 ./tools/test/misc/testfiles/h5mkgrp_help.txt ./tools/test/misc/testfiles/h5mkgrp_version.txt.in ./tools/test/misc/h5perf_gentest.c diff --git a/tools/test/misc/h5clear_gentest.c b/tools/test/misc/h5clear_gentest.c index 5d969b8..326109c 100644 --- a/tools/test/misc/h5clear_gentest.c +++ b/tools/test/misc/h5clear_gentest.c @@ -140,7 +140,7 @@ error: * status_flags properly so users can open the files afterwards. * * Return: Success: 0 - * Failure: 1 + * Failure: 1 * * Programmer: Vailin Choi; July 2013 * @@ -165,65 +165,65 @@ main(void) /* Create a copy of the file access property list */ if((fapl = H5Pcreate(H5P_FILE_ACCESS)) < 0) - goto error; + goto error; /* Copy the file access property list */ if((new_fapl = H5Pcopy(fapl)) < 0) - goto error; + goto error; /* Set to latest library format */ if(H5Pset_libver_bounds(new_fapl, H5F_LIBVER_LATEST, H5F_LIBVER_LATEST) < 0) - goto error; + goto error; /* Files created within this for loop will have v3 superblock and nonzero status_flags */ for(new_format = FALSE; new_format <= TRUE; new_format++) { - hid_t fapl2, my_fapl; /* File access property lists */ - - /* Set to use the appropriate file access property list */ - if(new_format) - fapl2 = new_fapl; - else - fapl2 = fapl; - /* - * Create a sec2 file - */ - if((my_fapl = H5Pcopy(fapl2)) < 0) - goto error; - /* Create the file */ - sprintf(fname, "%s%s", new_format? "latest_":"", FILENAME[0]); - if((fid = H5Fcreate(fname, H5F_ACC_TRUNC | (new_format ? 0 : H5F_ACC_SWMR_WRITE), H5P_DEFAULT, my_fapl)) < 0) - goto error; - - /* Flush the file */ - if(H5Fflush(fid, H5F_SCOPE_GLOBAL) < 0) - goto error; + hid_t fapl2, my_fapl; /* File access property lists */ + + /* Set to use the appropriate file access property list */ + if(new_format) + fapl2 = new_fapl; + else + fapl2 = fapl; + /* + * Create a sec2 file + */ + if((my_fapl = H5Pcopy(fapl2)) < 0) + goto error; + /* Create the file */ + sprintf(fname, "%s%s", new_format? "latest_":"", FILENAME[0]); + if((fid = H5Fcreate(fname, H5F_ACC_TRUNC | (new_format ? 0 : H5F_ACC_SWMR_WRITE), H5P_DEFAULT, my_fapl)) < 0) + goto error; + + /* Flush the file */ + if(H5Fflush(fid, H5F_SCOPE_GLOBAL) < 0) + goto error; - /* Close the property list */ - if(H5Pclose(my_fapl) < 0) - goto error; - - /* - * Create a log file - */ - /* Create a copy of file access property list */ - if((my_fapl = H5Pcopy(fapl2)) < 0) - goto error; - - /* Setup the fapl for the log driver */ - if(H5Pset_fapl_log(my_fapl, "append.log", (unsigned long long)H5FD_LOG_ALL, (size_t)(4 * KB)) < 0) - goto error; - - /* Create the file */ - sprintf(fname, "%s%s", new_format? "latest_":"", FILENAME[1]); - if((fid = H5Fcreate(fname, H5F_ACC_TRUNC | (new_format ? 0 : H5F_ACC_SWMR_WRITE), H5P_DEFAULT, my_fapl)) < 0) - goto error; - - /* Flush the file */ - if(H5Fflush(fid, H5F_SCOPE_GLOBAL) < 0) - goto error; - - /* Close the property list */ - if(H5Pclose(my_fapl) < 0) - goto error; + /* Close the property list */ + if(H5Pclose(my_fapl) < 0) + goto error; + + /* + * Create a log file + */ + /* Create a copy of file access property list */ + if((my_fapl = H5Pcopy(fapl2)) < 0) + goto error; + + /* Setup the fapl for the log driver */ + if(H5Pset_fapl_log(my_fapl, "append.log", (unsigned long long)H5FD_LOG_ALL, (size_t)(4 * KB)) < 0) + goto error; + + /* Create the file */ + sprintf(fname, "%s%s", new_format? "latest_":"", FILENAME[1]); + if((fid = H5Fcreate(fname, H5F_ACC_TRUNC | (new_format ? 0 : H5F_ACC_SWMR_WRITE), H5P_DEFAULT, my_fapl)) < 0) + goto error; + + /* Flush the file */ + if(H5Fflush(fid, H5F_SCOPE_GLOBAL) < 0) + goto error; + + /* Close the property list */ + if(H5Pclose(my_fapl) < 0) + goto error; } /* end for */ @@ -231,38 +231,38 @@ main(void) * Create a sec2 file with v0 superblock but nonzero status_flags */ if((fid = H5Fcreate(FILENAME[2], H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0) - goto error; + goto error; /* Flush the file */ if(H5Fflush(fid, H5F_SCOPE_GLOBAL) < 0) - goto error; + goto error; /* * Create a sec2 file with v2 superblock but nonzero status_flags */ if((fcpl = H5Pcreate(H5P_FILE_CREATE)) < 0) - goto error; + goto error; if(H5Pset_shared_mesg_nindexes(fcpl, 1) < 0) goto error; if(H5Pset_shared_mesg_index(fcpl, 0, H5O_SHMESG_DTYPE_FLAG, 50) < 0) goto error; if((fid = H5Fcreate(FILENAME[3], H5F_ACC_TRUNC, fcpl, fapl)) < 0) - goto error; + goto error; /* Flush the file */ if(H5Fflush(fid, H5F_SCOPE_GLOBAL) < 0) - goto error; + goto error; /* Close the property lists */ if(H5Pclose(fapl) < 0) - goto error; + goto error; if(H5Pclose(new_fapl) < 0) - goto error; + goto error; if(H5Pclose(fcpl) < 0) - goto error; + goto error; fflush(stdout); fflush(stderr); diff --git a/tools/test/misc/testfiles/mod_h5clear_mdc_image.h5 b/tools/test/misc/testfiles/mod_h5clear_mdc_image.h5 new file mode 100644 index 0000000..310134b Binary files /dev/null and b/tools/test/misc/testfiles/mod_h5clear_mdc_image.h5 differ diff --git a/tools/test/misc/testh5clear.sh.in b/tools/test/misc/testh5clear.sh.in index 49926ab..2966b2c 100644 --- a/tools/test/misc/testh5clear.sh.in +++ b/tools/test/misc/testh5clear.sh.in @@ -73,6 +73,7 @@ $SRC_H5CLEAR_TESTFILES/h5clear_log_v3.h5 $SRC_H5CLEAR_TESTFILES/latest_h5clear_log_v3.h5 $SRC_H5CLEAR_TESTFILES/latest_h5clear_sec2_v3.h5 $SRC_H5CLEAR_TESTFILES/h5clear_mdc_image.h5 +$SRC_H5CLEAR_TESTFILES/mod_h5clear_mdc_image.h5 " COPY_TESTFILES_TO_TESTDIR() @@ -122,8 +123,8 @@ CLEAN_TESTFILES_AND_TESTDIR() # beginning with the word "Testing". # TESTING() { - SPACES=" " - echo "Testing $* $SPACES" | cut -c1-74 | tr -d '\012' + SPACES=" " + echo "Testing $* $SPACES" | cut -c1-70 | tr -d '\012' } # $1 is the expected output @@ -162,6 +163,7 @@ TOOLTEST_OUT() { # Run test. TESTING $H5CLEAR $option1 $option2 $fname ( + cd $TESTDIR $RUNSERIAL $H5CLEAR_BIN $option1 $option2 $fname ) >$actual 2>$actual_err cp $actual $actual_sav @@ -182,7 +184,10 @@ TOOLTEST_OUT() { OPEN_CHK() { fname=$1 expected=$2 - $OPENCHK_BIN $fname 2>/dev/null + ( + cd $TESTDIR + $OPENCHK_BIN $fname 2>/dev/null + ) actual=$? if test $actual -ne $expected; then echo "Unexpected return from $OPENCHK" @@ -202,9 +207,11 @@ TOOLTEST() { ret_expected=$4 # TESTING $H5CLEAR $option1 $option2 $fname - fname=$1 # h5clear $option1 $option2 $fname - $RUNSERIAL $H5CLEAR_BIN $option1 $option2 $fname 2>/dev/null 1>/dev/null + ( + cd $TESTDIR + $RUNSERIAL $H5CLEAR_BIN $option1 $option2 $fname 2>/dev/null 1>/dev/null + ) if test $? -ne $ret_expected; then echo "*FAILED*" nerrors=`expr $nerrors + 1` @@ -220,92 +227,95 @@ TOOLTEST() { ############################################################################## # prepare for testing COPY_TESTFILES_TO_TESTDIR +# For Cmake +$CP -f $TESTDIR/h5clear_sec2_v0.h5 $TESTDIR/orig_h5clear_sec2_v0.h5 +$CP -f $TESTDIR/h5clear_sec2_v2.h5 $TESTDIR/orig_h5clear_sec2_v2.h5 +$CP -f $TESTDIR/h5clear_sec2_v3.h5 $TESTDIR/orig_h5clear_sec2_v3.h5 # # # # The following are tests to verify the expected output from h5clear # "h5clear -h" -# "h5clear" (no options, no file) -# "h5clear junk.h5" (no options, nonexisting file) -# "h5clear h5clear_sec2_v3.h5" (no options, existing file) -# "h5clear -m" (valid 1 option, no file) -# "h5clear -s junk.h5" (valid 1 option, nonexisting file) -# "h5clear -m -s" (valid 2 options, no file) -# "h5clear -m -s junk.h5" (valid 2 options, nonexisting file) -# "h5clear -m h5clear_sec2_v2.h5" (valid 1 option, existing file, no cache image) -# "h5clear -s -m h5clear_sec2_v0.h5" (valid 2 options, existing file, no cache image) +# "h5clear" (no options, no file) +# "h5clear junk.h5" (no options, nonexisting file) +# "h5clear orig_h5clear_sec2_v3.h5" (no options, existing file) +# "h5clear -m" (valid 1 option, no file) +# "h5clear -s junk.h5" (valid 1 option, nonexisting file) +# "h5clear -m -s" (valid 2 options, no file) +# "h5clear -m -s junk.h5" (valid 2 options, nonexisting file) +# "h5clear -m orig_h5clear_sec2_v2.h5" (valid 1 option, existing file, no cache image) +# "h5clear -s -m orig_h5clear_sec2_v0.h5" (valid 2 options, existing file, no cache image) TOOLTEST_OUT "" -h "" h5clear_usage.ddl TOOLTEST_OUT "" "" "" h5clear_usage.ddl TOOLTEST_OUT junk.h5 "" "" h5clear_usage.ddl -TOOLTEST_OUT $TESTDIR/h5clear_sec2_v3.h5 "" "" h5clear_usage.ddl +TOOLTEST_OUT orig_h5clear_sec2_v3.h5 "" "" h5clear_usage.ddl TOOLTEST_OUT "" -m "" h5clear_missing_file.ddl TOOLTEST_OUT junk.h5 -s "" h5clear_open_fail.ddl TOOLTEST_OUT "" -m -s h5clear_missing_file.ddl TOOLTEST_OUT junk.h5 -m -s h5clear_open_fail.ddl -TOOLTEST_OUT $TESTDIR/h5clear_sec2_v2.h5 -m "" h5clear_no_mdc_image.ddl -TOOLTEST_OUT $TESTDIR/h5clear_sec2_v0.h5 -s -m h5clear_no_mdc_image.ddl +TOOLTEST_OUT orig_h5clear_sec2_v2.h5 -m "" h5clear_no_mdc_image.ddl +TOOLTEST_OUT orig_h5clear_sec2_v0.h5 -s -m h5clear_no_mdc_image.ddl # # # # The following are tests to verify the expected exit code from h5clear: +# "h5clear -m h5clear_mdc_image.h5" (valid option, existing file, succeed exit code) +# "h5clear --vers" (valid option, version #, succeed exit code) # "h5clear -k" (invalid 1 option, no file, fail exit code) # "h5clear -k junk.h5" (invalid 1 option, nonexisting file, fail exit code) # "h5clear -l h5clear_sec2_v2.h5" (invalid 1 option, existing file, fail exit code) # "h5clear -m -k" (valid/invalid 2 options, nofile, fail exit code) # "h5clear -l -m" (invalid/valid 2 options, nofile, fail exit code) -# "h5clear -m -k junk.h5" (valid/invalid 2 options, nonexisting file, fail exit code) +# "h5clear -m -l junk.h5" (valid/invalid 2 options, nonexisting file, fail exit code) # "h5clear -l -m junk.h5" (invalid/valid 2 options, nonexisting file, fail exit code) -# "h5clear -m -k h5clear_sec2_v0.h5" (valid/invalid 2 options, existing file, fail exit code) +# "h5clear -m -l h5clear_sec2_v0.h5" (valid/invalid 2 options, existing file, fail exit code) # "h5clear -l -m h5clear_sec2_v0.h5" (invalid/valid 2 options, existing file, fail exit code) +TOOLTEST h5clear_mdc_image.h5 -m "" $SUCCEED +TOOLTEST "" --vers "" $SUCCEED TOOLTEST "" -k "" $FAIL TOOLTEST junk.h5 -k "" $FAIL TOOLTEST h5clear_sec2_v2.h5 -l "" $FAIL TOOLTEST "" -m -k $FAIL TOOLTEST "" -l -m $FAIL -TOOLTEST junk.h5 -m -k $FAIL +TOOLTEST junk.h5 -m -l $FAIL TOOLTEST junk.h5 -l -m $FAIL -TOOLTEST $TESTDIR/h5clear_sec2_v0.h5 -m -k $FAIL -TOOLTEST $TESTDIR/h5clear_sec2_v0.h5 -l -m $FAIL -# -# "h5clear --vers" (valid option, version #, succeed exit code) -# "h5clear -m h5clear_mdc_image.h5" (valid option, existing file, succeed exit code) -TOOLTEST "" --vers "" $SUCCEED -TOOLTEST $TESTDIR/h5clear_mdc_image.h5 -m "" $SUCCEED +TOOLTEST h5clear_sec2_v0.h5 -m -l $FAIL +TOOLTEST h5clear_sec2_v0.h5 -l -m $FAIL # # # # h5clear_mdc_image.h5 already has cache image removed earlier, verify the expected warning from h5clear: -TOOLTEST_OUT $TESTDIR/h5clear_mdc_image.h5 -m "" h5clear_no_mdc_image.ddl -TOOLTEST_OUT $TESTDIR/h5clear_mdc_image.h5 -s -m h5clear_no_mdc_image.ddl +TOOLTEST_OUT mod_h5clear_mdc_image.h5 -m "" h5clear_no_mdc_image.ddl +TOOLTEST_OUT mod_h5clear_mdc_image.h5 -s -m h5clear_no_mdc_image.ddl # # # # The following are tests to verify the status_flags field is cleared properly: -OPEN_CHK $TESTDIR/h5clear_sec2_v3.h5 $FAIL -TOOLTEST $TESTDIR/h5clear_sec2_v3.h5 -s "" $SUCCEED -OPEN_CHK $TESTDIR/h5clear_sec2_v3.h5 $SUCCEED +OPEN_CHK h5clear_sec2_v3.h5 $FAIL +TOOLTEST h5clear_sec2_v3.h5 -s "" $SUCCEED +OPEN_CHK h5clear_sec2_v3.h5 $SUCCEED # -OPEN_CHK $TESTDIR/h5clear_log_v3.h5 $FAIL -TOOLTEST $TESTDIR/h5clear_log_v3.h5 -s "" $SUCCEED -OPEN_CHK $TESTDIR/h5clear_log_v3.h5 $SUCCEED +OPEN_CHK h5clear_log_v3.h5 $FAIL +TOOLTEST h5clear_log_v3.h5 -s "" $SUCCEED +OPEN_CHK h5clear_log_v3.h5 $SUCCEED # -OPEN_CHK $TESTDIR/latest_h5clear_sec2_v3.h5 $FAIL -TOOLTEST $TESTDIR/latest_h5clear_sec2_v3.h5 -s "" $SUCCEED -OPEN_CHK $TESTDIR/latest_h5clear_sec2_v3.h5 $SUCCEED +OPEN_CHK latest_h5clear_sec2_v3.h5 $FAIL +TOOLTEST latest_h5clear_sec2_v3.h5 -s "" $SUCCEED +OPEN_CHK latest_h5clear_sec2_v3.h5 $SUCCEED # -OPEN_CHK $TESTDIR/latest_h5clear_log_v3.h5 $FAIL -TOOLTEST $TESTDIR/latest_h5clear_log_v3.h5 -s "" $SUCCEED -OPEN_CHK $TESTDIR/latest_h5clear_log_v3.h5 $SUCCEED +OPEN_CHK latest_h5clear_log_v3.h5 $FAIL +TOOLTEST latest_h5clear_log_v3.h5 -s "" $SUCCEED +OPEN_CHK latest_h5clear_log_v3.h5 $SUCCEED # # File open succeeds for the following 2 test files because the # library does not check status_flags for files with < v3 superblock: -OPEN_CHK $TESTDIR/h5clear_sec2_v0.h5 $SUCCEED -TOOLTEST $TESTDIR/h5clear_sec2_v0.h5 -s "" $SUCCEED -OPEN_CHK $TESTDIR/h5clear_sec2_v0.h5 $SUCCEED +OPEN_CHK h5clear_sec2_v0.h5 $SUCCEED +TOOLTEST h5clear_sec2_v0.h5 -s "" $SUCCEED +OPEN_CHK h5clear_sec2_v0.h5 $SUCCEED # -OPEN_CHK $TESTDIR/h5clear_sec2_v2.h5 $SUCCEED -TOOLTEST $TESTDIR/h5clear_sec2_v2.h5 -s "" $SUCCEED -OPEN_CHK $TESTDIR/h5clear_sec2_v2.h5 $SUCCEED +OPEN_CHK h5clear_sec2_v2.h5 $SUCCEED +TOOLTEST h5clear_sec2_v2.h5 -s "" $SUCCEED +OPEN_CHK h5clear_sec2_v2.h5 $SUCCEED # # # -- cgit v0.12 From c40edf8c247bccc76e7933b7a315a14e2b6701f3 Mon Sep 17 00:00:00 2001 From: Vailin Choi Date: Fri, 21 Apr 2017 18:42:17 -0500 Subject: Fix for HDFFV-10166 h5watch tests fail randomly to match expected output files (1) Re-structure tests to do one "extend" action at a time (2) Re-try test till max limit before final failure --- hl/tools/h5watch/extend_dset.c | 307 ++++++++----------- hl/tools/h5watch/h5watch.c | 494 +++++++++++++++--------------- hl/tools/h5watch/testh5watch.sh.in | 163 +++++----- hl/tools/testfiles/w-ext-cmpd-esc-f1.ddl | 5 - hl/tools/testfiles/w-ext-cmpd-esc-f3.ddl | 5 - hl/tools/testfiles/w-ext-cmpd-esc-ff2.ddl | 10 +- hl/tools/testfiles/w-ext-cmpd-esc.ddl | 12 +- hl/tools/testfiles/w-ext-cmpd-f1.ddl | 10 +- hl/tools/testfiles/w-ext-cmpd-f2.ddl | 5 - hl/tools/testfiles/w-ext-cmpd-ff3.ddl | 8 - hl/tools/testfiles/w-ext-cmpd-label.ddl | 8 - hl/tools/testfiles/w-ext-cmpd-two-f1.ddl | 56 +--- hl/tools/testfiles/w-ext-cmpd-two-f3.ddl | 41 +-- hl/tools/testfiles/w-ext-cmpd-two-ff2.ddl | 47 +-- hl/tools/testfiles/w-ext-cmpd-two.ddl | 66 +--- hl/tools/testfiles/w-ext-cmpd.ddl | 6 - hl/tools/testfiles/w-ext-early.ddl | 9 +- hl/tools/testfiles/w-ext-late.ddl | 8 - hl/tools/testfiles/w-ext-one-d.ddl | 3 - hl/tools/testfiles/w-ext-one-simple.ddl | 9 +- hl/tools/testfiles/w-ext-one.ddl | 5 - hl/tools/testfiles/w-ext-two-d.ddl | 18 +- hl/tools/testfiles/w-ext-two-width.ddl | 42 +-- hl/tools/testfiles/w-ext-two.ddl | 38 +-- 24 files changed, 508 insertions(+), 867 deletions(-) diff --git a/hl/tools/h5watch/extend_dset.c b/hl/tools/h5watch/extend_dset.c index 59c4a26..957db10 100644 --- a/hl/tools/h5watch/extend_dset.c +++ b/hl/tools/h5watch/extend_dset.c @@ -32,27 +32,8 @@ /* Size of data buffer */ #define TEST_BUF_SIZE 100 -/* - * Test variations (incremental) for one-dimensional dataset: - * Varies from 10->13->12->12->1->3 - */ -#define ONE_NTESTS 5 -int one_tests[ONE_NTESTS] = {3, -1, 0, -11, 2}; - -/* - * Test variations (incremental) for two-dimensional dataset: - * Varies from {4,10}->{6,12}->{8,1}->{10,1}-> - * {3,3}->{2,2}->{1,2}-> - * {1,4}->{1,3}->{1,3} - */ -#define TWO_NTESTS 9 -int two_tests[TWO_NTESTS][2] = { {2, 2}, {2, -11}, {2, 0}, - {-7, 2}, {-1, -1}, {-1, 0}, - {0, 2}, {0, -1}, {0, 0} - }; - -static herr_t extend_dset_two(const char *file, char *dname); -static herr_t extend_dset_one(const char *file, char *dname); +static herr_t extend_dset_two(const char *file, char *dname, int action1, int action2); +static herr_t extend_dset_one(const char *file, char *dname, int action); /* Data structures for datasets with compound data type */ @@ -83,29 +64,13 @@ typedef struct set_t { /* *********************************************************************** * - * Extending a two-dimensional dataset: - * dims[0] dims[1] - * ------- ------- - * case #1: increase increase - * case #2: increase decrease - * case #3: increase same - * case #4: decrease increase - * case #5: decrease decrease (no action) - * case #6: decrease same (no action) - * case #7: same increase - * case #8: same decrease (no action) - * case #9: same same (no action) - * - * two_tests[TWO_NTESTS][2] = { {2,2}, {2,-11}, {2,0}, - * {-7,2}, {-1,-1}, {-1,0}, - * {0,2}, {0,-1}, {0,0} } - * varies from {4,10}->{6,12}->{8,1}->{10,1}-> - * {3,3}->{2,2}->{1,2}-> - * {1,4}->{1,3}->{1,3} + * Extending a two-dimensional dataset by action1 and action2. + * --action1 and action2 can be a positive # or negative # or 0. + * *********************************************************************** */ static herr_t -extend_dset_two(const char *file, char *dname) +extend_dset_two(const char *file, char *dname, int action1, int action2) { hid_t fid = -1; /* file id */ hid_t fapl = -1; /* file access property list id */ @@ -163,61 +128,57 @@ extend_dset_two(const char *file, char *dname) if(h5_wait_message(READER_MESSAGE) < 0) goto error; - /* Loop through different variations of extending the dataset */ - for(i = 0; i < TWO_NTESTS; i++) { + /* sleep to emulate about 2 seconds of application operation */ + HDsleep(2); - /* sleep to emulate about 2 seconds of application operation */ - HDsleep(2); + /* Get current dimension sizes */ + if(H5LDget_dset_dims(did, cur_dims) < 0) + goto error; - /* Get current dimension sizes */ - if(H5LDget_dset_dims(did, cur_dims) < 0) - goto error; + /* Set up the new extended dimension sizes */ + ext_dims[0] = cur_dims[0] + (hsize_t)action1; + ext_dims[1] = cur_dims[1] + (hsize_t)action2; - /* Set up the new extended dimension sizes */ - ext_dims[0] = cur_dims[0] + (hsize_t)two_tests[i][0]; - ext_dims[1] = cur_dims[1] + (hsize_t)two_tests[i][1]; + /* Extend the dataset */ + if(H5Dset_extent(did, ext_dims) < 0) + goto error; - /* Extend the dataset */ - if(H5Dset_extent(did, ext_dims) < 0) + num_elmts = 1; + for(j = 0; j < (unsigned)ndims; j++) + num_elmts *= (unsigned)ext_dims[j]; + + /* Compound type */ + if(!HDstrcmp(dname, DSET_CMPD_TWO)) { + + HDmemset(cbuf, 0, TEST_BUF_SIZE * sizeof(set_t)); + for(j = 0; j < num_elmts; j++) { + cbuf[j].field1 = action1; + cbuf[j].field2.a = action1; + cbuf[j].field2.c = action1; + cbuf[j].field2.b.a = action1; + cbuf[j].field2.b.b = action1; + cbuf[j].field2.b.c = action1; + cbuf[j].field3 = action1; + cbuf[j].field4.a = action1; + cbuf[j].field4.b = action1; + } /* end for */ + + /* Write to the dataset */ + if(H5Dwrite(did, dtid, H5S_ALL, H5S_ALL, H5P_DEFAULT, cbuf) < 0) goto error; - num_elmts = 1; - for(j = 0; j < (unsigned)ndims; j++) - num_elmts *= (unsigned)ext_dims[j]; - - /* Compound type */ - if(!HDstrcmp(dname, DSET_CMPD_TWO)) { - - HDmemset(cbuf, 0, TEST_BUF_SIZE * sizeof(set_t)); - for(j = 0; j < num_elmts; j++) { - cbuf[j].field1 = i + 1; - cbuf[j].field2.a = i + 1; - cbuf[j].field2.c = i + 1; - cbuf[j].field2.b.a = i + 1; - cbuf[j].field2.b.b = i + 1; - cbuf[j].field2.b.c = i + 1; - cbuf[j].field3 = i + 1; - cbuf[j].field4.a = i + 1; - cbuf[j].field4.b = i + 1; - } /* end for */ + } else { /* Integer type */ + HDmemset(ibuf, 0, TEST_BUF_SIZE * sizeof(int)); + for(j = 0; j < num_elmts; j++) + ibuf[j] = action1; - /* Write to the dataset */ - if(H5Dwrite(did, dtid, H5S_ALL, H5S_ALL, H5P_DEFAULT, cbuf) < 0) - goto error; - } else { /* Integer type */ - HDmemset(ibuf, 0, TEST_BUF_SIZE * sizeof(int)); - for(j = 0; j < num_elmts; j++) - ibuf[j] = (int)(i + 1); - - /* Write to the dataset */ - if(H5Dwrite(did, dtid, H5S_ALL, H5S_ALL, H5P_DEFAULT, ibuf) < 0) - goto error; - } /* end if-else */ - - if(H5Dflush(did) < 0) + /* Write to the dataset */ + if(H5Dwrite(did, dtid, H5S_ALL, H5S_ALL, H5P_DEFAULT, ibuf) < 0) goto error; + } /* end if-else */ - } /* end for TWO_NTESTS */ + if(H5Dflush(did) < 0) + goto error; /* Closing */ if(H5Tclose(dtid) < 0) goto error; @@ -225,8 +186,8 @@ extend_dset_two(const char *file, char *dname) if(H5Pclose(fapl) < 0) goto error; if(H5Fclose(fid) < 0) goto error; - HDfree(ibuf); - HDfree(cbuf); + if(ibuf) HDfree(ibuf); + if(cbuf) HDfree(cbuf); return SUCCEED; @@ -250,21 +211,13 @@ error: /* *********************************************************************** * - * Extending a one-dimensional dataset - * Test cases: - * #1: increase - * #2: decrease - * #3: same - * #4: decrease - * #5: increase - * - * one_tests[ONE_NTESTS] = {3, -1, 0, -11, 2} - * varies from 10->13->12->12->1->3 + * Extending a one-dimensional dataset by action: + * --action can be a positive # or negative # or 0. * *********************************************************************** */ static herr_t -extend_dset_one(const char *file, char *dname) +extend_dset_one(const char *file, char *dname, int action) { hid_t fid = -1; /* file id */ hid_t fapl = -1; /* file access property list id */ @@ -317,80 +270,75 @@ extend_dset_one(const char *file, char *dname) if(h5_wait_message(READER_MESSAGE) < 0) goto error; - /* Loop through different variations of extending the dataset */ - for(i = 0; i < ONE_NTESTS; i++) { + /* sleep to emulate about 2 seconds of application operation */ + HDsleep(2); + + /* Get current dimension sizes */ + if(H5LDget_dset_dims(did, cur_dims) < 0) + goto error; + + /* Set up the new extended dimension sizes */ + ext_dims[0] = cur_dims[0] + (hsize_t)action; - /* sleep to emulate about 2 seconds of application operation */ - HDsleep(2); + /* Extend the dataset */ + if(H5Dset_extent(did, ext_dims) < 0) + goto error; - /* Get current dimension sizes */ - if(H5LDget_dset_dims(did, cur_dims) < 0) - goto error; + /* Write to the new appended region of the dataset */ + if(action > 0) { - /* Set up the new extended dimension sizes */ - ext_dims[0] = cur_dims[0] + (hsize_t)one_tests[i]; + /* Select the extended region */ + offset[0] = cur_dims[0]; + count[0] = (hsize_t)action; + if((sid = H5Dget_space(did)) < 0) + goto error; + if(H5Sselect_hyperslab(sid, H5S_SELECT_SET, offset, NULL, count, NULL) < 0) + goto error; - /* Extend the dataset */ - if(H5Dset_extent(did, ext_dims) < 0) + /* Set up memory space and get dataset's datatype */ + if((mid = H5Screate_simple(1, count, NULL)) < 0) goto error; - /* Write to the new appended region of the dataset */ - if(one_tests[i] > 0) { + /* Initialize data for the extended region of the dataset */ + /* Compound type */ + if(!HDstrcmp(dname, DSET_CMPD) || !HDstrcmp(dname, DSET_CMPD_ESC)) { - /* Select the extended region */ - offset[0] = cur_dims[0]; - count[0] = (hsize_t)one_tests[i]; - if((sid = H5Dget_space(did)) < 0) - goto error; - if(H5Sselect_hyperslab(sid, H5S_SELECT_SET, offset, NULL, count, NULL) < 0) + HDmemset(cbuf, 0, TEST_BUF_SIZE * sizeof(set_t)); + for(j = 0; j < (unsigned)action; j++) { + cbuf[j].field1 = j + 1; + cbuf[j].field2.a = j + 2; + cbuf[j].field2.b.a = j + 2; + cbuf[j].field2.b.b = j + 2; + cbuf[j].field2.b.c = j + 2; + cbuf[j].field2.c = j + 2; + + cbuf[j].field3 = j + 3; + + cbuf[j].field4.a = j + 4; + cbuf[j].field4.b = j + 4; + } /* end for */ + + /* Write to the extended region of the dataset */ + if(H5Dwrite(did, dtid, mid, sid, H5P_DEFAULT, cbuf) < 0) goto error; + } else { /* Integer type */ + + HDmemset(ibuf, 0, TEST_BUF_SIZE * sizeof(int)); + for(j = 0; j < (unsigned)action; j++) + ibuf[j] = (int)j; - /* Set up memory space and get dataset's datatype */ - if((mid = H5Screate_simple(1, count, NULL)) < 0) + /* Write to the extended region of the dataset */ + if(H5Dwrite(did, dtid, mid, sid, H5P_DEFAULT, ibuf) < 0) goto error; + } /* end if-else */ - /* Initialize data for the extended region of the dataset */ - /* Compound type */ - if(!HDstrcmp(dname, DSET_CMPD) || !HDstrcmp(dname, DSET_CMPD_ESC)) { - - HDmemset(cbuf, 0, TEST_BUF_SIZE * sizeof(set_t)); - for(j = 0; j < (unsigned)one_tests[i]; j++) { - cbuf[j].field1 = j + 1; - cbuf[j].field2.a = j + 2; - cbuf[j].field2.b.a = j + 2; - cbuf[j].field2.b.b = j + 2; - cbuf[j].field2.b.c = j + 2; - cbuf[j].field2.c = j + 2; - - cbuf[j].field3 = j + 3; - - cbuf[j].field4.a = j + 4; - cbuf[j].field4.b = j + 4; - } /* end for */ - - /* Write to the extended region of the dataset */ - if(H5Dwrite(did, dtid, mid, sid, H5P_DEFAULT, cbuf) < 0) - goto error; - } else { /* Integer type */ - - HDmemset(ibuf, 0, TEST_BUF_SIZE * sizeof(int)); - for(j = 0; j < (unsigned)one_tests[i]; j++) - ibuf[j] = (int)j; - - /* Write to the extended region of the dataset */ - if(H5Dwrite(did, dtid, mid, sid, H5P_DEFAULT, ibuf) < 0) - goto error; - } /* end if-else */ - - /* Closing */ - if(H5Sclose(sid) < 0) goto error; - if(H5Sclose(mid) < 0) goto error; - } /* end if */ - - if(H5Dflush(did) < 0) - goto error; + /* Closing */ + if(H5Sclose(sid) < 0) goto error; + if(H5Sclose(mid) < 0) goto error; + } /* end if */ - } /* end for ONE_NTESTS */ + if(H5Dflush(did) < 0) + goto error; /* Closing */ if(H5Tclose(dtid) < 0) goto error; @@ -398,8 +346,8 @@ extend_dset_one(const char *file, char *dname) if(H5Pclose(fapl) < 0) goto error; if(H5Fclose(fid) < 0) goto error; - HDfree(ibuf); - HDfree(cbuf); + if(ibuf) HDfree(ibuf); + if(cbuf) HDfree(cbuf); return SUCCEED; @@ -421,30 +369,44 @@ error: return FAIL; } /* end extend_dset_one() */ -/* Usage: extend_dset xx.h5 dname */ + +/* + *********************************************************************** + * + * Usage: extend_dset xx.h5 dname action1 action2 + * --action1 and action2 can be a positive # or negative # or 0. + * + *********************************************************************** + */ int main(int argc, const char *argv[]) { char *dname = NULL; char *fname = NULL; + int action1, action2; - if(argc != 3) { - HDfprintf(stderr, "Should have file name and dataset name to be extended...\n"); + if(argc != 5) { + HDfprintf(stderr, "Should have file name, dataset name, and the extended amount...\n"); goto error; } /* end if */ /* Get the dataset name to be extended */ fname = HDstrdup(argv[1]); dname = HDstrdup(argv[2]); + action1 = HDatoi(argv[3]); + action2 = HDatoi(argv[4]); if(!HDstrcmp(dname, DSET_CMPD) || !HDstrcmp(dname, DSET_CMPD_ESC)) { - if(extend_dset_one(fname, dname) < 0) + if(extend_dset_one(fname, dname, action1) < 0) goto error; - } else if(!HDstrcmp(dname, DSET_ONE) || !HDstrcmp(dname, DSET_ALLOC_LATE) || !HDstrcmp(dname, DSET_ALLOC_EARLY)) { - if(extend_dset_one(fname, dname) < 0) + } else if(!HDstrcmp(dname, DSET_ONE) || + !HDstrcmp(dname, DSET_ALLOC_LATE) || + !HDstrcmp(dname, DSET_ALLOC_EARLY)) { + if(extend_dset_one(fname, dname, action1) < 0) goto error; - } else if(!HDstrcmp(dname, DSET_TWO) || !HDstrcmp(dname, DSET_CMPD_TWO)) { - if(extend_dset_two(fname, dname) < 0) + } else if(!HDstrcmp(dname, DSET_TWO) || + !HDstrcmp(dname, DSET_CMPD_TWO)) { + if(extend_dset_two(fname, dname, action1, action2) < 0) goto error; } else { HDfprintf(stdout, "Dataset cannot be extended...\n"); @@ -460,4 +422,3 @@ error: HDfree(fname); HDexit(EXIT_FAILURE); } /* end main() */ - diff --git a/hl/tools/h5watch/h5watch.c b/hl/tools/h5watch/h5watch.c index cfa6258..11514b0 100644 --- a/hl/tools/h5watch/h5watch.c +++ b/hl/tools/h5watch/h5watch.c @@ -18,29 +18,30 @@ /* * Note: This tool used private routine */ -#define PROGRAMNAME "h5watch" /* Name of tool */ -#define FIELD_SEP "," /* nested field separator */ -#define DEFAULT_RETRY 50 /* number of times to try opening the file */ +#define PROGRAMNAME "h5watch" /* Name of tool */ +#define FIELD_SEP "," /* nested field separator */ +#define DEFAULT_RETRY 50 /* number of times to try opening the file */ /* * Note:(see comments in hl/src/H5LDprivate.h) - * This tool uses private routines H5LD_construct_vector()and H5LD_clean_vector() + * This tool uses private routines H5LD_construct_vector()and H5LD_clean_vector() * This tool uses H5LD_memb_t data structure declared in H5LDprivate.h */ -const char *progname = "h5watch"; /* tool name */ -static char *g_list_of_fields = NULL; /* command line input for "list_of_fields" */ -static char *g_dup_fields = NULL; /* copy of "list_of_fields" */ -static H5LD_memb_t **g_listv = NULL; /* vector info for "list_of_fields" */ +const char *progname = "h5watch"; /* tool name */ +static char *g_list_of_fields = NULL; /* command line input for "list_of_fields" */ +static char *g_dup_fields = NULL; /* copy of "list_of_fields" */ +static H5LD_memb_t **g_listv = NULL; /* vector info for "list_of_fields" */ static hbool_t g_monitor_size_only = FALSE; /* monitor changes in dataset dimension sizes */ static unsigned g_polling_interval = 1; /* polling interval to check appended data */ + static hbool_t g_label = FALSE; /* label compound values */ -static int g_display_width = 80; /* output width in characters */ +static int g_display_width = 80; /* output width in characters */ static hbool_t g_simple_output = FALSE; /* make output more machine-readable */ static unsigned g_retry = DEFAULT_RETRY; /* # of times to try opening the file if somehow file is unstable */ -static hbool_t g_display_hex = FALSE; /* display data in hexadecimal format : LATER */ +static hbool_t g_display_hex = FALSE; /* display data in hexadecimal format : LATER */ static hbool_t g_user_interrupt = FALSE; /* Flag to indicate that user interrupted execution */ static herr_t doprint(hid_t did, hsize_t *start, hsize_t *block, int rank); @@ -107,9 +108,9 @@ static struct long_options l_opts[] = { * Function: doprint() * * Purpose: Prepare to print the dataset's appended data. - * Call the tools library routine h5tools_dump_dset() to do the printing. - * (This routine is mostly copied from dump_dataset_values() in tools/h5ls/h5ls.c - * and modified accordingly). + * Call the tools library routine h5tools_dump_dset() to do the printing. + * (This routine is mostly copied from dump_dataset_values() in tools/h5ls/h5ls.c + * and modified accordingly). * * Return: 0 on success; negative on failure * @@ -232,17 +233,17 @@ doprint(hid_t did, hsize_t *start, hsize_t *block, int rank) * Function: slicendump * * Purpose: To dump the slice for each dimension - * For example: prev_dims[2] = {5, 4}; cur_dims[2] = {7, 8} - * This routine will dump data as follows: - * {0, 3} to {0, 7} (1x4 elements) - * {1, 3} to {0, 7} (1x4 elements) - * {2, 3} to {0, 7} (1x4 elements) - * {3, 3} to {0, 7} (1x4 elements) - * {4, 3} to {0, 7} (1x4 elements) - * {5, 0} to {6, 7} (2x8 elements) - * - * Return: Non-negative on success - * Negative on failure + * For example: prev_dims[2] = {5, 4}; cur_dims[2] = {7, 8} + * This routine will dump data as follows: + * {0, 3} to {0, 7} (1x4 elements) + * {1, 3} to {0, 7} (1x4 elements) + * {2, 3} to {0, 7} (1x4 elements) + * {3, 3} to {0, 7} (1x4 elements) + * {4, 3} to {0, 7} (1x4 elements) + * {5, 0} to {6, 7} (2x8 elements) + * + * Return: Non-negative on success + * Negative on failure * * Programmer: Vailin Choi; August 2010 * @@ -251,9 +252,9 @@ doprint(hid_t did, hsize_t *start, hsize_t *block, int rank) static herr_t slicendump(hid_t did, hsize_t *prev_dims, hsize_t *cur_dims, hsize_t *start, hsize_t *block, int rank, int subrank) { - int i; /* Local index variable */ - int ind; /* Index for the current rank */ - herr_t ret_value = SUCCEED; /* Return value */ + int i; /* Local index variable */ + int ind; /* Index for the current rank */ + herr_t ret_value = SUCCEED; /* Return value */ ind = rank - subrank; @@ -292,13 +293,13 @@ done: * Function: monitor_dataset * * Purpose: To poll a dataset periodically for changes in dimension sizes. - * For dataset with unchanged and/or decreased dimension sizes: - * it just prints the dimension size changes - * For dataset with increase in at least one of its dimension sizes: - * it will print the new appended data to the dataset + * For dataset with unchanged and/or decreased dimension sizes: + * it just prints the dimension size changes + * For dataset with increase in at least one of its dimension sizes: + * it will print the new appended data to the dataset * * Return: Non-negative on success: dataset can be monitored - * Negative on failure: dataset cannot be monitored + * Negative on failure: dataset cannot be monitored * * Programmer: Vailin Choi; August 2010 * @@ -319,95 +320,98 @@ monitor_dataset(hid_t fid, char *dsetname) /* Open the dataset for minitoring */ if((did = H5Dopen2(fid, dsetname, H5P_DEFAULT)) < 0) { - error_msg("error in opening dataset \"%s\"\n", dsetname); - ret_value = FAIL; - goto done; + error_msg("error in opening dataset \"%s\"\n", dsetname); + ret_value = FAIL; + goto done; } if((sid = H5Dget_space(did)) < 0) { - error_msg("error in getting dataspace id for dataset \"%s\"\n", dsetname); - ret_value = FAIL; - goto done; + error_msg("error in getting dataspace id for dataset \"%s\"\n", dsetname); + ret_value = FAIL; + goto done; } /* Get the dataset's dimension sizes */ if((ndims = H5Sget_simple_extent_dims(sid, prev_dims, NULL)) < 0) { - error_msg("unable to get dimensions sizes for \"%s\"\n", dsetname); - ret_value = FAIL; - goto done; + error_msg("unable to get dimensions sizes for \"%s\"\n", dsetname); + ret_value = FAIL; + goto done; } + HDfflush(stdout); /* Loop until an error occurs or the user interrupts execution */ while(!g_user_interrupt) { - /* Refreshes the dataset */ - if(H5Drefresh(did) < 0) { - ret_value = FAIL; - goto done; - } + /* Refreshes the dataset */ + if(H5Drefresh(did) < 0) { + ret_value = FAIL; + goto done; + } - /* Get the dataset's current dimension sizes */ - if(H5LDget_dset_dims(did, cur_dims) < 0) { - error_msg("unable to get dimension sizes for \"%s\"\n", dsetname); - ret_value = FAIL; - goto done; - } + /* Get the dataset's current dimension sizes */ + if(H5LDget_dset_dims(did, cur_dims) < 0) { + error_msg("unable to get dimension sizes for \"%s\"\n", dsetname); + ret_value = FAIL; + goto done; + } - /* Check the dimension sizes */ - for(i = 0; i < ndims; i++) - if(cur_dims[i] != prev_dims[i]) - break; - - /* at least one dimension has changed */ - 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]); - if(cur_dims[u] > prev_dims[u]) - HDfprintf(stdout, " (increases)\n"); - else if(cur_dims[u] < prev_dims[u]) - HDfprintf(stdout, " (decreases)\n"); - else - HDfprintf(stdout, " (unchanged)\n"); - } - - /* Printing elements appended to the dataset if there is */ - if(!g_monitor_size_only) { - - /* See if at least one dimension size has increased */ - for(u = 0; u < ndims; u++) { - int j; - hsize_t start[H5S_MAX_RANK]; - hsize_t block[H5S_MAX_RANK]; - - /* Print the new appended data to the dataset */ - if(cur_dims[u] > prev_dims[u]) { - HDfprintf(stdout, " Data:\n"); - - for(j = 0; j < ndims; j++) { - start[j] = 0; - block[j] = 1; - } - - if((ret_value = slicendump(did, prev_dims, cur_dims, start, block, ndims, ndims)) < 0) - goto done; - break; - } - } /* end for */ - } - HDfflush(stdout); - } + /* Check the dimension sizes */ + for(i = 0; i < ndims; i++) + if(cur_dims[i] != prev_dims[i]) + break; + + /* at least one dimension has changed */ + 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]); + if(cur_dims[u] > prev_dims[u]) + HDfprintf(stdout, " (increases)\n"); + else if(cur_dims[u] < prev_dims[u]) + HDfprintf(stdout, " (decreases)\n"); + else + HDfprintf(stdout, " (unchanged)\n"); + } + + /* Printing elements appended to the dataset if there is */ + if(!g_monitor_size_only) { + + /* See if at least one dimension size has increased */ + for(u = 0; u < ndims; u++) { + int j; + hsize_t start[H5S_MAX_RANK]; + hsize_t block[H5S_MAX_RANK]; + + /* Print the new appended data to the dataset */ + if(cur_dims[u] > prev_dims[u]) { + HDfprintf(stdout, " Data:\n"); + + for(j = 0; j < ndims; j++) { + start[j] = 0; + block[j] = 1; + } + + if((ret_value = slicendump(did, prev_dims, cur_dims, start, block, ndims, ndims)) < 0) + goto done; + break; + } + } /* end for */ + } + HDfflush(stdout); + } - /* Save the current dimension sizes */ - HDmemcpy(prev_dims, cur_dims, (size_t)ndims * sizeof(hsize_t)); + /* Save the current dimension sizes */ + HDmemcpy(prev_dims, cur_dims, (size_t)ndims * sizeof(hsize_t)); - /* Sleep before next monitor */ + /* Sleep before next monitor */ HDsleep(g_polling_interval); } /* end while */ + HDfflush(stdout); + done: /* Closing */ H5E_BEGIN_TRY - H5Dclose(did); + H5Dclose(did); H5E_END_TRY return(ret_value); @@ -417,7 +421,7 @@ done: * Function: process_cmpd_fields * * Purpose: To check whether the fields selected in "g_list_of_fields" - * are valid fields associated with the dataset. + * are valid fields associated with the dataset. * * Return: 0 on success; negative on failure * @@ -428,39 +432,39 @@ done: static herr_t process_cmpd_fields(hid_t fid, char *dsetname) { - hid_t did=-1; /* dataset id */ - hid_t dtid=-1, tid=-1; /* dataset's data type id */ - size_t len; /* number of comma-separated fields in "g_list_of_fields" */ - herr_t ret_value = SUCCEED; /* Return value */ + hid_t did=-1; /* dataset id */ + hid_t dtid=-1, tid=-1; /* dataset's data type id */ + size_t len; /* number of comma-separated fields in "g_list_of_fields" */ + herr_t ret_value = SUCCEED; /* Return value */ HDassert(g_list_of_fields && *g_list_of_fields); /* Open the dataset */ if((did = H5Dopen2(fid, dsetname, H5P_DEFAULT)) < 0) { - error_msg("error in opening dataset \"%s\"\n", dsetname); - ret_value = FAIL; - goto done; + error_msg("error in opening dataset \"%s\"\n", dsetname); + ret_value = FAIL; + goto done; } /* Get the dataset's datatype */ if(((dtid = H5Dget_type(did)) < 0) || (tid = H5Tget_native_type(dtid, H5T_DIR_DEFAULT)) < 0) { - error_msg("error in getting dataset's datatype\n"); + error_msg("error in getting dataset's datatype\n"); ret_value = FAIL; goto done; } /* Check to make sure that the dataset's datatype is compound type */ if(H5Tget_class(dtid) != H5T_COMPOUND) { - error_msg("dataset should be compound type for \n"); - ret_value = FAIL; - goto done; + error_msg("dataset should be compound type for \n"); + ret_value = FAIL; + goto done; } /* Make a copy of "g_list_of_fields" */ if((g_dup_fields = HDstrdup(g_list_of_fields)) == NULL) { - error_msg("error in duplicating g_list_of_fields\n"); + error_msg("error in duplicating g_list_of_fields\n"); ret_value = FAIL; - goto done; + goto done; } /* Estimate the number of comma-separated fields in "g_list of_fields" */ @@ -468,15 +472,15 @@ process_cmpd_fields(hid_t fid, char *dsetname) /* Allocate memory for a list vector of H5LD_memb_t structures to store "g_list_of_fields" info */ if((g_listv = (H5LD_memb_t **)HDcalloc(len, sizeof(H5LD_memb_t *))) == NULL) { - error_msg("error in allocating memory for H5LD_memb_t\n"); + error_msg("error in allocating memory for H5LD_memb_t\n"); ret_value = FAIL; - goto done; + goto done; } /* Process and store info for "g_listv" */ if(H5LD_construct_vector(g_dup_fields, g_listv, tid) < 0) { - error_msg("error in processing \n"); - ret_value = FAIL; + error_msg("error in processing \n"); + ret_value = FAIL; goto done; } @@ -484,9 +488,9 @@ process_cmpd_fields(hid_t fid, char *dsetname) done: /* Closing */ H5E_BEGIN_TRY - H5Tclose(dtid); - H5Tclose(tid); - H5Dclose(did); + H5Tclose(dtid); + H5Tclose(tid); + H5Dclose(did); H5E_END_TRY return(ret_value); } /* process_cmpd_fields() */ @@ -496,15 +500,13 @@ done: * Function: check_dataset * * Purpose: To check whether a dataset can be monitored: - A chunked dataset with unlimited or max. dimension setting + * A chunked dataset with unlimited or max. dimension setting * * Return: Non-negative on success: dataset can be monitored - * Negative on failure: dataset cannot be monitored + * Negative on failure: dataset cannot be monitored * * Programmer: Vailin Choi; August 2010 * - * Modifications: - * *------------------------------------------------------------------------- */ static herr_t @@ -529,9 +531,9 @@ check_dataset(hid_t fid, char *dsetname) /* Open the dataset */ if((did = H5Dopen2(fid, dsetname, H5P_DEFAULT)) < 0) { - error_msg("unable to open dataset \"%s\"\n", dsetname); - ret_value = FAIL; - goto done; + error_msg("unable to open dataset \"%s\"\n", dsetname); + ret_value = FAIL; + goto done; } /* Get dataset's creation property list */ @@ -558,28 +560,28 @@ check_dataset(hid_t fid, char *dsetname) /* Get dataset's dataspace */ if((sid = H5Dget_space(did)) < 0) { - error_msg("can't get dataset's dataspace\"%s\"\n", dsetname); - ret_value = FAIL; - goto done; + error_msg("can't get dataset's dataspace\"%s\"\n", dsetname); + ret_value = FAIL; + goto done; } /* Get dimension size of dataset's dataspace */ if((ndims = H5Sget_simple_extent_dims(sid, cur_dims, max_dims)) < 0) { - error_msg("can't get dataspace dimensions for dataset \"%s\"\n", dsetname); - ret_value = FAIL; - goto done; + error_msg("can't get dataspace dimensions for dataset \"%s\"\n", dsetname); + ret_value = FAIL; + goto done; } /* Check whether dataset has unlimited dimension or max. dimension setting */ for(u = 0; u < (unsigned)ndims; u++) if(max_dims[u] == H5S_UNLIMITED || cur_dims[u] != max_dims[u]) { - unlim_max_dims = TRUE; + unlim_max_dims = TRUE; break; } if(!unlim_max_dims) { - error_msg("\"%s\" should have unlimited or max. dimension setting\n", dsetname); - ret_value = FAIL; + error_msg("\"%s\" should have unlimited or max. dimension setting\n", dsetname); + ret_value = FAIL; } done: @@ -587,9 +589,9 @@ done: /* Closing */ H5E_BEGIN_TRY - H5Sclose(sid); - H5Pclose(dcp); - H5Dclose(did); + H5Sclose(sid); + H5Pclose(dcp); + H5Dclose(did); H5E_END_TRY return(ret_value); @@ -605,7 +607,6 @@ done: * * Programmer: Vailin Choi; August 2010 * - * Modifications: * *------------------------------------------------------------------------- */ @@ -627,7 +628,6 @@ leave(int ret) * * Programmer: Vailin Choi; August 2010 * - * Modifications: *------------------------------------------------------------------------- */ static void @@ -683,8 +683,6 @@ usage(const char *prog) * * Programmer: Vailin Choi; August 2010 * - * Modifications: - * *------------------------------------------------------------------------- */ static void @@ -704,7 +702,7 @@ parse_command_line(int argc, const char *argv[]) switch ((char)opt) { case '?': case 'h': /* --help */ - usage(h5tools_getprogname()); + usage(h5tools_getprogname()); leave(EXIT_SUCCESS); case 'V': /* --version */ @@ -713,63 +711,63 @@ parse_command_line(int argc, const char *argv[]) break; case 'w': /* --width=N */ - g_display_width = (int)HDstrtol(opt_arg, NULL, 0); - if(g_display_width < 0) { - usage(h5tools_getprogname()); - leave(EXIT_FAILURE); - } + g_display_width = (int)HDstrtol(opt_arg, NULL, 0); + if(g_display_width < 0) { + usage(h5tools_getprogname()); + leave(EXIT_FAILURE); + } break; case 'd': /* --dim */ - g_monitor_size_only = TRUE; + g_monitor_size_only = TRUE; break; case 'S': /* --simple */ - g_simple_output = TRUE; + g_simple_output = TRUE; break; - case 'l': /* --label */ - g_label = TRUE; + case 'l': /* --label */ + g_label = TRUE; break; case 'p': /* --polling=N */ - /* g_polling_interval = HDstrtod(opt_arg, NULL); */ - if((tmp = (int)HDstrtol(opt_arg, NULL, 10)) <= 0) { - usage(h5tools_getprogname()); - leave(EXIT_FAILURE); - } - g_polling_interval = (unsigned)tmp; + /* g_polling_interval = HDstrtod(opt_arg, NULL); */ + if((tmp = (int)HDstrtol(opt_arg, NULL, 10)) <= 0) { + usage(h5tools_getprogname()); + leave(EXIT_FAILURE); + } + g_polling_interval = (unsigned)tmp; break; case 'f': /* --fields= */ - if(g_list_of_fields == NULL) { - if((g_list_of_fields = HDstrdup(opt_arg)) == NULL) { - error_msg("memory allocation failed (file %s:line %d)\n", - __FILE__, __LINE__); - leave(EXIT_FAILURE); - } - } else { - char *str; - - if((str = HDstrdup(opt_arg)) == NULL) { - error_msg("memory allocation failed (file %s:line %d)\n", - __FILE__, __LINE__); - leave(EXIT_FAILURE); - } - if((g_list_of_fields = (char *)HDrealloc(g_list_of_fields, HDstrlen(g_list_of_fields) + HDstrlen(str) + 2)) == NULL) { - error_msg("memory allocation failed (file %s:line %d)\n", - __FILE__, __LINE__); - leave(EXIT_FAILURE); - - } - HDstrcat(g_list_of_fields, FIELD_SEP); - HDstrcat(g_list_of_fields, str); - } + if(g_list_of_fields == NULL) { + if((g_list_of_fields = HDstrdup(opt_arg)) == NULL) { + error_msg("memory allocation failed (file %s:line %d)\n", + __FILE__, __LINE__); + leave(EXIT_FAILURE); + } + } else { + char *str; + + if((str = HDstrdup(opt_arg)) == NULL) { + error_msg("memory allocation failed (file %s:line %d)\n", + __FILE__, __LINE__); + leave(EXIT_FAILURE); + } + if((g_list_of_fields = (char *)HDrealloc(g_list_of_fields, HDstrlen(g_list_of_fields) + HDstrlen(str) + 2)) == NULL) { + error_msg("memory allocation failed (file %s:line %d)\n", + __FILE__, __LINE__); + leave(EXIT_FAILURE); + + } + HDstrcat(g_list_of_fields, FIELD_SEP); + HDstrcat(g_list_of_fields, str); + } break; default: - usage(h5tools_getprogname()); + usage(h5tools_getprogname()); leave(EXIT_FAILURE); } } @@ -778,7 +776,7 @@ parse_command_line(int argc, const char *argv[]) /* check for object to be processed */ if (argc <= opt_ind) { error_msg("missing dataset name\n"); - usage(h5tools_getprogname()); + usage(h5tools_getprogname()); leave(EXIT_FAILURE); } } /* parse_command_line() */ @@ -788,7 +786,7 @@ parse_command_line(int argc, const char *argv[]) * Function: catch_signal * * Purpose: The signal handler to catch the signals: - * SIGTERM and SIGINT and exit from h5watch + * SIGTERM and SIGINT and set flag to get out of the main loop * * Return: No return * @@ -818,14 +816,14 @@ static void catch_signal(int H5_ATTR_UNUSED signo) int main(int argc, const char *argv[]) { - char drivername[50]; - char *fname = NULL; - char *dname = NULL; - void *edata; - H5E_auto2_t func; - char *x; - hid_t fid = -1; - hid_t fapl = -1; + char drivername[50]; /* VFD name */ + char *fname = NULL; /* File name */ + char *dname = NULL; /* Dataset name */ + void *edata; /* Error reporting */ + H5E_auto2_t func; /* Error reporting */ + char *x; /* Temporary string pointer */ + hid_t fid = -1; /* File ID */ + hid_t fapl = -1; /* File access property list */ /* Set up tool name and exit status */ h5tools_setprogname(PROGRAMNAME); @@ -840,14 +838,14 @@ main(int argc, const char *argv[]) /* To exit from h5watch for SIGTERM signal */ if(HDsignal(SIGTERM, catch_signal) == SIG_ERR) { - error_msg("An error occurred while setting a signal handler.\n"); - leave(EXIT_FAILURE); + error_msg("An error occurred while setting a signal handler.\n"); + leave(EXIT_FAILURE); } /* To exit from h5watch for SIGINT signal */ if(HDsignal(SIGINT, catch_signal) == SIG_ERR) { error_msg("An error occurred while setting a signal handler.\n"); - leave(EXIT_FAILURE); + leave(EXIT_FAILURE); } /* parse command line options */ @@ -855,7 +853,7 @@ main(int argc, const char *argv[]) if(argc <= opt_ind) { error_msg("missing dataset name\n"); - usage(h5tools_getprogname()); + usage(h5tools_getprogname()); leave(EXIT_FAILURE); } @@ -875,9 +873,9 @@ main(int argc, const char *argv[]) * doesn't exist). */ if((fname = HDstrdup(argv[opt_ind])) == NULL) { - error_msg("memory allocation failed (file %s:line %d)\n", - __FILE__, __LINE__); - h5tools_setstatus(EXIT_FAILURE); + error_msg("memory allocation failed (file %s:line %d)\n", + __FILE__, __LINE__); + h5tools_setstatus(EXIT_FAILURE); } /* Create a copy of file access property list */ @@ -889,80 +887,80 @@ main(int argc, const char *argv[]) return -1; do { - while(fname && *fname) { - fid = h5tools_fopen(fname, H5F_ACC_RDONLY|H5F_ACC_SWMR_READ, fapl, NULL, drivername, sizeof drivername); - - if(fid >= 0) { - HDfprintf(stdout, "Opened \"%s\" with %s driver.\n", fname, drivername); - break; /*success*/ - } /* end if */ - - /* Shorten the file name; lengthen the object name */ - x = dname; - dname = HDstrrchr(fname, '/'); - if(x) - *x = '/'; - if(!dname) - break; - *dname = '\0'; - } /* end while */ + while(fname && *fname) { + fid = h5tools_fopen(fname, H5F_ACC_RDONLY|H5F_ACC_SWMR_READ, fapl, NULL, drivername, sizeof drivername); + + if(fid >= 0) { + HDfprintf(stdout, "Opened \"%s\" with %s driver.\n", fname, drivername); + break; /*success*/ + } /* end if */ + + /* Shorten the file name; lengthen the object name */ + x = dname; + dname = HDstrrchr(fname, '/'); + if(x) + *x = '/'; + if(!dname) + break; + *dname = '\0'; + } /* end while */ /* Try opening the file again if somehow unstable */ } while(g_retry-- > 0 && fid == FAIL); if(fid < 0) { - error_msg("unable to open file \"%s\"\n", fname); - if(fname) HDfree(fname); - if(fapl >= 0) H5Pclose(fapl); - leave(EXIT_FAILURE); + error_msg("unable to open file \"%s\"\n", fname); + if(fname) HDfree(fname); + if(fapl >= 0) H5Pclose(fapl); + leave(EXIT_FAILURE); } if(!dname) { - error_msg("no dataset specified\n"); - h5tools_setstatus(EXIT_FAILURE); + error_msg("no dataset specified\n"); + h5tools_setstatus(EXIT_FAILURE); } else { - *dname = '/'; - x = dname; - if((dname = HDstrdup(dname)) == NULL) { - error_msg("memory allocation failed (file %s:line %d)\n", - __FILE__, __LINE__); - h5tools_setstatus(EXIT_FAILURE); - } else { - *x = '\0'; - /* Validate dataset */ - if(check_dataset(fid, dname) < 0) - h5tools_setstatus(EXIT_FAILURE); - /* Validate input "fields" */ - else if(g_list_of_fields && *g_list_of_fields) - if(process_cmpd_fields(fid, dname) < 0) - h5tools_setstatus(EXIT_FAILURE); - } + *dname = '/'; + x = dname; + if((dname = HDstrdup(dname)) == NULL) { + error_msg("memory allocation failed (file %s:line %d)\n", + __FILE__, __LINE__); + h5tools_setstatus(EXIT_FAILURE); + } else { + *x = '\0'; + /* Validate dataset */ + if(check_dataset(fid, dname) < 0) + h5tools_setstatus(EXIT_FAILURE); + /* Validate input "fields" */ + else if(g_list_of_fields && *g_list_of_fields) + if(process_cmpd_fields(fid, dname) < 0) + h5tools_setstatus(EXIT_FAILURE); + } } /* If everything is fine, start monitoring the datset */ if(h5tools_getstatus() != EXIT_FAILURE) - if(monitor_dataset(fid, dname) < 0) - h5tools_setstatus(EXIT_FAILURE); + if(monitor_dataset(fid, dname) < 0) + h5tools_setstatus(EXIT_FAILURE); /* Free spaces */ if(fname) HDfree(fname); if(dname) HDfree(dname); if(g_list_of_fields) HDfree(g_list_of_fields); if(g_listv) { - H5LD_clean_vector(g_listv); - HDfree(g_listv); + H5LD_clean_vector(g_listv); + HDfree(g_listv); } if(g_dup_fields) HDfree(g_dup_fields); /* Close the file access property list */ if(fapl >= 0 && H5Pclose(fapl) < 0) { - error_msg("unable to close file access property list\n"); - h5tools_setstatus(EXIT_FAILURE); + error_msg("unable to close file access property list\n"); + h5tools_setstatus(EXIT_FAILURE); } /* Close the file */ if(H5Fclose(fid) < 0) { - error_msg("unable to close file\n"); - h5tools_setstatus(EXIT_FAILURE); + error_msg("unable to close file\n"); + h5tools_setstatus(EXIT_FAILURE); } H5Eset_auto2(H5E_DEFAULT, func, edata); diff --git a/hl/tools/h5watch/testh5watch.sh.in b/hl/tools/h5watch/testh5watch.sh.in index 3bd4381..05e66bf 100644 --- a/hl/tools/h5watch/testh5watch.sh.in +++ b/hl/tools/h5watch/testh5watch.sh.in @@ -44,6 +44,7 @@ GEN_TEST=h5watchgentest # Generate HDF5 file with various datasets GEN_TEST_BIN=`pwd`/$GEN_TEST # Path of the binary GEN_TEST WATCHFILE=`pwd`/WATCH.h5 # The HDF5 file generated to test h5watch TESTFILE=TEST.h5 # The temporary file (a copy of WATCH.h5) used by tests +TRY_MAX=10 # Try running the test again # # These 3 defines should be the same as the defines in ./extend_dset.c WRITER_MESSAGE=writer_message # The message file created by the "extend" process @@ -116,29 +117,30 @@ TOOLTEST() { exitcode=$? cat $actual_err >> $actual if [ $exitcode -ne $retvalexpect ]; then - $ECHO "*FAILED*" - nerrors="`expr $nerrors + 1`" - if [ yes = "$verbose" ]; then - $ECHO "test returned with exit code $exitcode" - $ECHO "test output: (up to $NLINES lines)" - head -$NLINES $actual - $ECHO "***end of test output***" - $ECHO "" - fi - elif $CMP $expect $actual; then - $ECHO " PASSED" - else $ECHO "*FAILED*" - $ECHO " Expected result differs from actual result" - nerrors="`expr $nerrors + 1`" - test yes = "$verbose" && $DIFF $expect $actual |sed 's/^/ /' - fi + nerrors="`expr $nerrors + 1`" + if [ yes = "$verbose" ]; then + $ECHO "test returned with exit code $exitcode" + $ECHO "test output: (up to $NLINES lines)" + head -$NLINES $actual + $ECHO "***end of test output***" + $ECHO "" + fi + elif $CMP $expect $actual; then + $ECHO " PASSED" + else + $ECHO "*FAILED*" + $ECHO " Expected result differs from actual result" + nerrors="`expr $nerrors + 1`" + test yes = "$verbose" && $DIFF $expect $actual |sed 's/^/ /' + fi # Clean up output file if test -z "$HDF5_NOCLEANUP"; then rm -f $actual $actual_err fi } + # # # @@ -148,8 +150,13 @@ TOOLTEST() { # $1 -- the specified dataset to watch and to extend # $2 -- the options to h5watch (can be NULL) # $3 -- expected output from watching the object +# $4 -- action 1 +# $5 -- action 2 # TEST_WATCH() { +try=0 +while [ $try -lt $TRY_MAX ] ; +do cp $WATCHFILE $TESTFILE # Copy the file being watched/extended to a temporary file actual="../testfiles/`basename $3 .ddl`.out" # The actual output expect="$srcdir/../testfiles/$3" # The expected output @@ -163,7 +170,7 @@ TEST_WATCH() { rm -f $WRITER_MESSAGE # Remove the file just to be sure rm -f $READER_MESSAGE # Remove the file just to be sure # - $EXTEND_BIN $TESTFILE $1 & # Extend the dataset; put in background + $EXTEND_BIN $TESTFILE $1 $4 $5& # Extend the dataset; put in background extend_pid=$! # Get "extend" process ID # # Wait for message from "extend_dset" process to start h5watch-- @@ -176,10 +183,10 @@ TEST_WATCH() { do t1=`date +%s` # Get current time in seconds difft=`expr $t1 - $t0` # Calculate the time difference - if [ -e $WRITER_MESSAGE ]; then # If message file is found: + if [ -e $WRITER_MESSAGE ]; then # If message file is found: mexist=1 # indicate the message file is found - rm $WRITER_MESSAGE # remove the message file - break # get out of the while loop + rm $WRITER_MESSAGE # remove the message file + break # get out of the while loop fi done; # @@ -205,7 +212,7 @@ TEST_WATCH() { extend_exit=$? # Collect "extend" process' exit code sleep 1 # Sleep to make sure output is flushed kill $watch_pid # Kill h5watch - wait $watch_pid # Wait for "h5watch" process to complete + wait $watch_pid # Wait for "h5watch" process to complete # if [ $extend_exit -ne 0 ]; then # Error returned from "extend" process $ECHO "*FAILED*" @@ -218,13 +225,21 @@ TEST_WATCH() { $ECHO "" fi elif $CMP $expect $actual; then # Compare actual output with expected output + try=$TRY_MAX $ECHO " PASSED" else - $ECHO "*FAILED*" # Actual and expected outputs are different - $ECHO " Expected result differs from actual result" - nerrors="`expr $nerrors + 1`" - if test yes = "$verbose"; then - $DIFF $expect $actual |sed 's/^/ /' + try="`expr $try + 1`" + if [ $try -lt $TRY_MAX ]; then + $ECHO "*RETRY" + rm -f $actual + rm -f $TESTFILE + else + $ECHO "*FAILED*" # Actual and expected outputs are different + $ECHO " Expected result differs from actual result" + nerrors="`expr $nerrors + 1`" + if test yes = "$verbose"; then + $DIFF $expect $actual |sed 's/^/ /' + fi fi fi # @@ -234,45 +249,45 @@ TEST_WATCH() { rm -f $actual fi fi +done; } - ############################################################################## ############################################################################## -### T H E T E S T S ### +### T H E T E S T S ### ############################################################################## ############################################################################## # # ################################################################################################# -# # -# WATCH.h5: file with various types of datasets for testing-- # -# The following datasets are chunked, H5D_ALLOC_TIME_INCR, max. dimensional setting: # -# DSET_ONE: one-dimensional dataset # -# DSET_TWO: two-dimensional dataset # -# DSET_CMPD: one-dimensional dataset with compound type # -# DSET_CMPD_ESC: one-dimensional dataset with compound type & escape/separator characters # -# DSET_CMPD_TWO: two-dimensional dataset with compound type # -# # -# The following datasets are one-dimensional, chunked, max. dimension setting: # -# DSET_ALLOC_EARLY: dataset with H5D_ALLOC_TIME_EARLY # -# DSET_ALLOC_LATE: dataset H5D_ALLOC_TIME_LATE # -# # -# The following datasets are one-dimensional: # -# DSET_NONE: fixed dimension setting, contiguous, H5D_ALLOC_TIME_LATE # -# DSET_NOMAX: fixed dimension setting, chunked, H5D_ALLOC_TIME_INCR # -# # +# # +# WATCH.h5: file with various types of datasets for testing-- # +# The following datasets are chunked, H5D_ALLOC_TIME_INCR, max. dimensional setting: # +# DSET_ONE: one-dimensional dataset # +# DSET_TWO: two-dimensional dataset # +# DSET_CMPD: one-dimensional dataset with compound type # +# DSET_CMPD_ESC: one-dimensional dataset with compound type & escape/separator characters # +# DSET_CMPD_TWO: two-dimensional dataset with compound type # +# # +# The following datasets are one-dimensional, chunked, max. dimension setting: # +# DSET_ALLOC_EARLY: dataset with H5D_ALLOC_TIME_EARLY # +# DSET_ALLOC_LATE: dataset H5D_ALLOC_TIME_LATE # +# # +# The following datasets are one-dimensional: # +# DSET_NONE: fixed dimension setting, contiguous, H5D_ALLOC_TIME_LATE # +# DSET_NOMAX: fixed dimension setting, chunked, H5D_ALLOC_TIME_INCR # +# # ################################################################################################# # # ################################################################################################# -# # -# Tests on expected failures: # -# Invalid file name # -# Unable to find dataset, invalid dataset # -# DSET_NONE and DSET_NOMAX # -# Invalid input to options --width and --polling # -# Invalid field names for -f option # -# # +# # +# Tests on expected failures: # +# Invalid file name # +# Unable to find dataset, invalid dataset # +# DSET_NONE and DSET_NOMAX # +# Invalid input to options --width and --polling # +# Invalid field names for -f option # +# # ################################################################################################# # # Generate file with various types of datasets @@ -317,13 +332,13 @@ $GEN_TEST_BIN # TEST.h5/DSET_CMPD_TWO # TEST.h5/DSET_CMPD_ESC # -TEST_WATCH DSET_ONE '' w-ext-one.ddl -TEST_WATCH DSET_ALLOC_EARLY '' w-ext-early.ddl -TEST_WATCH DSET_ALLOC_LATE '' w-ext-late.ddl -TEST_WATCH DSET_CMPD '' w-ext-cmpd.ddl -TEST_WATCH DSET_TWO '' w-ext-two.ddl -TEST_WATCH DSET_CMPD_TWO '' w-ext-cmpd-two.ddl -TEST_WATCH DSET_CMPD_ESC '' w-ext-cmpd-esc.ddl +TEST_WATCH DSET_ONE '' w-ext-one.ddl 3 0 #Increase +TEST_WATCH DSET_ALLOC_EARLY '' w-ext-early.ddl -1 0 #Decrease +TEST_WATCH DSET_ALLOC_LATE '' w-ext-late.ddl 0 0 #Same +TEST_WATCH DSET_CMPD '' w-ext-cmpd.ddl 3 0 #Increase +TEST_WATCH DSET_CMPD_ESC '' w-ext-cmpd-esc.ddl -1 0 #Decrease +TEST_WATCH DSET_TWO '' w-ext-two.ddl 2 2 #Increase, Increase +TEST_WATCH DSET_CMPD_TWO '' w-ext-cmpd-two.ddl 2 -9 #Increase, Decrease # echo "DONE WITH 2nd SET OF TESTS" # @@ -337,25 +352,25 @@ echo "DONE WITH 2nd SET OF TESTS" # TEST.h5/DSET_CMPD with --fields=field1,field2 # TEST.h5/DSET_CMPD with --fields=field2.b,field4 # TEST.h5/DSET_CMPD with --fields=field2.b.a --fields=field2.c -TEST_WATCH DSET_CMPD --fields=field1,field2 w-ext-cmpd-f1.ddl -TEST_WATCH DSET_CMPD --fields=field2.b,field4 w-ext-cmpd-f2.ddl -TEST_WATCH DSET_CMPD '--fields=field2.b.a --fields=field2.c' w-ext-cmpd-ff3.ddl +TEST_WATCH DSET_CMPD --fields=field1,field2 w-ext-cmpd-f1.ddl -9 0 #Decrease +TEST_WATCH DSET_CMPD --fields=field2.b,field4 w-ext-cmpd-f2.ddl 3 0 #Increase +TEST_WATCH DSET_CMPD '--fields=field2.b.a --fields=field2.c' w-ext-cmpd-ff3.ddl 0 0 #Same # # # TEST.h5/DSET_CMP_TWO with --fields=field1,field2 # TEST.h5/DSET_CMPD_TWO with --fields=field2.b --fields=field4 # TEST.h5/DSET_CMPD_TWO with --fields=field2.b.a,field2.c -TEST_WATCH DSET_CMPD_TWO --fields=field1,field2 w-ext-cmpd-two-f1.ddl -TEST_WATCH DSET_CMPD_TWO '--fields=field2.b --fields=field4' w-ext-cmpd-two-ff2.ddl -TEST_WATCH DSET_CMPD_TWO --fields=field2.b.a,field2.c w-ext-cmpd-two-f3.ddl +TEST_WATCH DSET_CMPD_TWO --fields=field1,field2 w-ext-cmpd-two-f1.ddl 2 0 #Increase, Same +TEST_WATCH DSET_CMPD_TWO '--fields=field2.b --fields=field4' w-ext-cmpd-two-ff2.ddl -1 2 #Decrease, Increase +TEST_WATCH DSET_CMPD_TWO --fields=field2.b.a,field2.c w-ext-cmpd-two-f3.ddl -1 -3 #Decrease, Decrease # # # TEST.h5/DSET_CMPD_ESC with --fields=field\,1,field2\. # TEST.h5/DSET_CMPD_ESC with --fields=field2\..\,b --fields=field4\, # TEST.h5/DSET_CMPD_ESC with --fields=field2\..\,b.a,field2\..\\K -TEST_WATCH DSET_CMPD_ESC '--fields=field\,1,field2\.' w-ext-cmpd-esc-f1.ddl -TEST_WATCH DSET_CMPD_ESC '--fields=field2\..\,b --fields=field4\,' w-ext-cmpd-esc-ff2.ddl -TEST_WATCH DSET_CMPD_ESC '--fields=field2\..\,b.a,field2\..\\K' w-ext-cmpd-esc-f3.ddl +TEST_WATCH DSET_CMPD_ESC '--fields=field\,1,field2\.' w-ext-cmpd-esc-f1.ddl 3 0 #Increase +TEST_WATCH DSET_CMPD_ESC '--fields=field2\..\,b --fields=field4\,' w-ext-cmpd-esc-ff2.ddl -1 0 #Decrease +TEST_WATCH DSET_CMPD_ESC '--fields=field2\..\,b.a,field2\..\\K' w-ext-cmpd-esc-f3.ddl 3 0 #Increase # # echo "DONE WITH 3rd SET OF TESTS" @@ -374,11 +389,11 @@ echo "DONE WITH 3rd SET OF TESTS" # TEST.h5/DSET_TWO with --width=60 option # TEST.h5/DSET_CMPD with --label option # TEST.h5/DSET_ONE with --simple option -TEST_WATCH DSET_ONE --dim w-ext-one-d.ddl -TEST_WATCH DSET_TWO --dim w-ext-two-d.ddl -TEST_WATCH DSET_TWO --width=30 w-ext-two-width.ddl -TEST_WATCH DSET_CMPD --label w-ext-cmpd-label.ddl -TEST_WATCH DSET_ONE --simple w-ext-one-simple.ddl +TEST_WATCH DSET_ONE --dim w-ext-one-d.ddl 3 0 #Increase +TEST_WATCH DSET_TWO --dim w-ext-two-d.ddl -2 0 #Decrease, Same +TEST_WATCH DSET_TWO --width=30 w-ext-two-width.ddl 0 2 #Same, Increase +TEST_WATCH DSET_CMPD --label w-ext-cmpd-label.ddl 3 0 #Increase +TEST_WATCH DSET_ONE --simple w-ext-one-simple.ddl 2 0 #I # echo "DONE WITH 4th SET OF TESTS" # diff --git a/hl/tools/testfiles/w-ext-cmpd-esc-f1.ddl b/hl/tools/testfiles/w-ext-cmpd-esc-f1.ddl index d85594d..09255cc 100644 --- a/hl/tools/testfiles/w-ext-cmpd-esc-f1.ddl +++ b/hl/tools/testfiles/w-ext-cmpd-esc-f1.ddl @@ -4,8 +4,3 @@ dimension 0: 10->13 (increases) Data: (10) {1, {2, {2, 2, 2}, 2}}, {2, {3, {3, 3, 3}, 3}}, (12) {3, {4, {4, 4, 4}, 4}} -dimension 0: 13->12 (decreases) -dimension 0: 12->1 (decreases) -dimension 0: 1->3 (increases) - Data: - (1) {1, {2, {2, 2, 2}, 2}}, {2, {3, {3, 3, 3}, 3}} diff --git a/hl/tools/testfiles/w-ext-cmpd-esc-f3.ddl b/hl/tools/testfiles/w-ext-cmpd-esc-f3.ddl index ab6c294..00ed390 100644 --- a/hl/tools/testfiles/w-ext-cmpd-esc-f3.ddl +++ b/hl/tools/testfiles/w-ext-cmpd-esc-f3.ddl @@ -3,8 +3,3 @@ Monitoring dataset /DSET_CMPD_ESC... dimension 0: 10->13 (increases) Data: (10) {{{2}}, {2}}, {{{3}}, {3}}, {{{4}}, {4}} -dimension 0: 13->12 (decreases) -dimension 0: 12->1 (decreases) -dimension 0: 1->3 (increases) - Data: - (1) {{{2}}, {2}}, {{{3}}, {3}} diff --git a/hl/tools/testfiles/w-ext-cmpd-esc-ff2.ddl b/hl/tools/testfiles/w-ext-cmpd-esc-ff2.ddl index 039cbf3..9b9a971 100644 --- a/hl/tools/testfiles/w-ext-cmpd-esc-ff2.ddl +++ b/hl/tools/testfiles/w-ext-cmpd-esc-ff2.ddl @@ -1,11 +1,3 @@ Opened "TEST.h5" with sec2 driver. Monitoring dataset /DSET_CMPD_ESC... -dimension 0: 10->13 (increases) - Data: - (10) {{{2, 2, 2}}, {4, 4}}, {{{3, 3, 3}}, {5, 5}}, {{{4, 4, 4}}, {6, - (12) 6}} -dimension 0: 13->12 (decreases) -dimension 0: 12->1 (decreases) -dimension 0: 1->3 (increases) - Data: - (1) {{{2, 2, 2}}, {4, 4}}, {{{3, 3, 3}}, {5, 5}} +dimension 0: 10->9 (decreases) diff --git a/hl/tools/testfiles/w-ext-cmpd-esc.ddl b/hl/tools/testfiles/w-ext-cmpd-esc.ddl index 900b3f2..9b9a971 100644 --- a/hl/tools/testfiles/w-ext-cmpd-esc.ddl +++ b/hl/tools/testfiles/w-ext-cmpd-esc.ddl @@ -1,13 +1,3 @@ Opened "TEST.h5" with sec2 driver. Monitoring dataset /DSET_CMPD_ESC... -dimension 0: 10->13 (increases) - Data: - (10) {1, {2, {2, 2, 2}, 2}, 3, {4, 4}}, - (11) {2, {3, {3, 3, 3}, 3}, 4, {5, 5}}, - (12) {3, {4, {4, 4, 4}, 4}, 5, {6, 6}} -dimension 0: 13->12 (decreases) -dimension 0: 12->1 (decreases) -dimension 0: 1->3 (increases) - Data: - (1) {1, {2, {2, 2, 2}, 2}, 3, {4, 4}}, {2, {3, {3, 3, 3}, 3}, 4, {5, - (2) 5}} +dimension 0: 10->9 (decreases) diff --git a/hl/tools/testfiles/w-ext-cmpd-f1.ddl b/hl/tools/testfiles/w-ext-cmpd-f1.ddl index 7e0a066..029e4db 100644 --- a/hl/tools/testfiles/w-ext-cmpd-f1.ddl +++ b/hl/tools/testfiles/w-ext-cmpd-f1.ddl @@ -1,11 +1,3 @@ Opened "TEST.h5" with sec2 driver. Monitoring dataset /DSET_CMPD... -dimension 0: 10->13 (increases) - Data: - (10) {1, {2, {2, 2, 2}, 2}}, {2, {3, {3, 3, 3}, 3}}, - (12) {3, {4, {4, 4, 4}, 4}} -dimension 0: 13->12 (decreases) -dimension 0: 12->1 (decreases) -dimension 0: 1->3 (increases) - Data: - (1) {1, {2, {2, 2, 2}, 2}}, {2, {3, {3, 3, 3}, 3}} +dimension 0: 10->1 (decreases) diff --git a/hl/tools/testfiles/w-ext-cmpd-f2.ddl b/hl/tools/testfiles/w-ext-cmpd-f2.ddl index ea69222..362cc94 100644 --- a/hl/tools/testfiles/w-ext-cmpd-f2.ddl +++ b/hl/tools/testfiles/w-ext-cmpd-f2.ddl @@ -4,8 +4,3 @@ dimension 0: 10->13 (increases) Data: (10) {{{2, 2, 2}}, {4, 4}}, {{{3, 3, 3}}, {5, 5}}, {{{4, 4, 4}}, {6, (12) 6}} -dimension 0: 13->12 (decreases) -dimension 0: 12->1 (decreases) -dimension 0: 1->3 (increases) - Data: - (1) {{{2, 2, 2}}, {4, 4}}, {{{3, 3, 3}}, {5, 5}} diff --git a/hl/tools/testfiles/w-ext-cmpd-ff3.ddl b/hl/tools/testfiles/w-ext-cmpd-ff3.ddl index 84e2919..6a54b97 100644 --- a/hl/tools/testfiles/w-ext-cmpd-ff3.ddl +++ b/hl/tools/testfiles/w-ext-cmpd-ff3.ddl @@ -1,10 +1,2 @@ Opened "TEST.h5" with sec2 driver. Monitoring dataset /DSET_CMPD... -dimension 0: 10->13 (increases) - Data: - (10) {{{2}}, {2}}, {{{3}}, {3}}, {{{4}}, {4}} -dimension 0: 13->12 (decreases) -dimension 0: 12->1 (decreases) -dimension 0: 1->3 (increases) - Data: - (1) {{{2}}, {2}}, {{{3}}, {3}} diff --git a/hl/tools/testfiles/w-ext-cmpd-label.ddl b/hl/tools/testfiles/w-ext-cmpd-label.ddl index 84534ea..394d5a6 100644 --- a/hl/tools/testfiles/w-ext-cmpd-label.ddl +++ b/hl/tools/testfiles/w-ext-cmpd-label.ddl @@ -8,11 +8,3 @@ dimension 0: 10->13 (increases) (11) field4={a=5, b=5}}, (12) {field1=3, field2={a=4, b={a=4, b=4, c=4}, c=4}, field3=5, (12) field4={a=6, b=6}} -dimension 0: 13->12 (decreases) -dimension 0: 12->1 (decreases) -dimension 0: 1->3 (increases) - Data: - (1) {field1=1, field2={a=2, b={a=2, b=2, c=2}, c=2}, field3=3, - (1) field4={a=4, b=4}}, - (2) {field1=2, field2={a=3, b={a=3, b=3, c=3}, c=3}, field3=4, - (2) field4={a=5, b=5}} diff --git a/hl/tools/testfiles/w-ext-cmpd-two-f1.ddl b/hl/tools/testfiles/w-ext-cmpd-two-f1.ddl index 49abde9..9b4c235 100644 --- a/hl/tools/testfiles/w-ext-cmpd-two-f1.ddl +++ b/hl/tools/testfiles/w-ext-cmpd-two-f1.ddl @@ -1,47 +1,15 @@ Opened "TEST.h5" with sec2 driver. Monitoring dataset /DSET_CMPD_TWO... dimension 0: 4->6 (increases) -dimension 1: 10->12 (increases) - Data: - (0,10) {1, {1, {1, 1, 1}, 1}}, {1, {1, {1, 1, 1}, 1}} - (1,10) {1, {1, {1, 1, 1}, 1}}, {1, {1, {1, 1, 1}, 1}} - (2,10) {1, {1, {1, 1, 1}, 1}}, {1, {1, {1, 1, 1}, 1}} - (3,10) {1, {1, {1, 1, 1}, 1}}, {1, {1, {1, 1, 1}, 1}} - (4,0) {1, {1, {1, 1, 1}, 1}}, {1, {1, {1, 1, 1}, 1}}, - (4,2) {1, {1, {1, 1, 1}, 1}}, {1, {1, {1, 1, 1}, 1}}, - (4,4) {1, {1, {1, 1, 1}, 1}}, {1, {1, {1, 1, 1}, 1}}, - (4,6) {1, {1, {1, 1, 1}, 1}}, {1, {1, {1, 1, 1}, 1}}, - (4,8) {1, {1, {1, 1, 1}, 1}}, {1, {1, {1, 1, 1}, 1}}, - (4,10) {1, {1, {1, 1, 1}, 1}}, {1, {1, {1, 1, 1}, 1}}, - (5,0) {1, {1, {1, 1, 1}, 1}}, {1, {1, {1, 1, 1}, 1}}, - (5,2) {1, {1, {1, 1, 1}, 1}}, {1, {1, {1, 1, 1}, 1}}, - (5,4) {1, {1, {1, 1, 1}, 1}}, {1, {1, {1, 1, 1}, 1}}, - (5,6) {1, {1, {1, 1, 1}, 1}}, {1, {1, {1, 1, 1}, 1}}, - (5,8) {1, {1, {1, 1, 1}, 1}}, {1, {1, {1, 1, 1}, 1}}, - (5,10) {1, {1, {1, 1, 1}, 1}}, {1, {1, {1, 1, 1}, 1}} -dimension 0: 6->8 (increases) -dimension 1: 12->1 (decreases) - Data: - (6,0) {2, {2, {2, 2, 2}, 2}}, - (7,0) {2, {2, {2, 2, 2}, 2}} -dimension 0: 8->10 (increases) -dimension 1: 1->1 (unchanged) - Data: - (8,0) {3, {3, {3, 3, 3}, 3}}, - (9,0) {3, {3, {3, 3, 3}, 3}} -dimension 0: 10->3 (decreases) -dimension 1: 1->3 (increases) - Data: - (0,1) {4, {4, {4, 4, 4}, 4}}, {4, {4, {4, 4, 4}, 4}} - (1,1) {4, {4, {4, 4, 4}, 4}}, {4, {4, {4, 4, 4}, 4}} - (2,1) {4, {4, {4, 4, 4}, 4}}, {4, {4, {4, 4, 4}, 4}} -dimension 0: 3->2 (decreases) -dimension 1: 3->2 (decreases) -dimension 0: 2->1 (decreases) -dimension 1: 2->2 (unchanged) -dimension 0: 1->1 (unchanged) -dimension 1: 2->4 (increases) - Data: - (0,2) {7, {7, {7, 7, 7}, 7}}, {7, {7, {7, 7, 7}, 7}} -dimension 0: 1->1 (unchanged) -dimension 1: 4->3 (decreases) +dimension 1: 10->10 (unchanged) + Data: + (4,0) {2, {2, {2, 2, 2}, 2}}, {2, {2, {2, 2, 2}, 2}}, + (4,2) {2, {2, {2, 2, 2}, 2}}, {2, {2, {2, 2, 2}, 2}}, + (4,4) {2, {2, {2, 2, 2}, 2}}, {2, {2, {2, 2, 2}, 2}}, + (4,6) {2, {2, {2, 2, 2}, 2}}, {2, {2, {2, 2, 2}, 2}}, + (4,8) {2, {2, {2, 2, 2}, 2}}, {2, {2, {2, 2, 2}, 2}}, + (5,0) {2, {2, {2, 2, 2}, 2}}, {2, {2, {2, 2, 2}, 2}}, + (5,2) {2, {2, {2, 2, 2}, 2}}, {2, {2, {2, 2, 2}, 2}}, + (5,4) {2, {2, {2, 2, 2}, 2}}, {2, {2, {2, 2, 2}, 2}}, + (5,6) {2, {2, {2, 2, 2}, 2}}, {2, {2, {2, 2, 2}, 2}}, + (5,8) {2, {2, {2, 2, 2}, 2}}, {2, {2, {2, 2, 2}, 2}} diff --git a/hl/tools/testfiles/w-ext-cmpd-two-f3.ddl b/hl/tools/testfiles/w-ext-cmpd-two-f3.ddl index 0878f35..94b5c99 100644 --- a/hl/tools/testfiles/w-ext-cmpd-two-f3.ddl +++ b/hl/tools/testfiles/w-ext-cmpd-two-f3.ddl @@ -1,41 +1,4 @@ Opened "TEST.h5" with sec2 driver. Monitoring dataset /DSET_CMPD_TWO... -dimension 0: 4->6 (increases) -dimension 1: 10->12 (increases) - Data: - (0,10) {{{1}}, {1}}, {{{1}}, {1}} - (1,10) {{{1}}, {1}}, {{{1}}, {1}} - (2,10) {{{1}}, {1}}, {{{1}}, {1}} - (3,10) {{{1}}, {1}}, {{{1}}, {1}} - (4,0) {{{1}}, {1}}, {{{1}}, {1}}, {{{1}}, {1}}, {{{1}}, {1}}, - (4,4) {{{1}}, {1}}, {{{1}}, {1}}, {{{1}}, {1}}, {{{1}}, {1}}, - (4,8) {{{1}}, {1}}, {{{1}}, {1}}, {{{1}}, {1}}, {{{1}}, {1}}, - (5,0) {{{1}}, {1}}, {{{1}}, {1}}, {{{1}}, {1}}, {{{1}}, {1}}, - (5,4) {{{1}}, {1}}, {{{1}}, {1}}, {{{1}}, {1}}, {{{1}}, {1}}, - (5,8) {{{1}}, {1}}, {{{1}}, {1}}, {{{1}}, {1}}, {{{1}}, {1}} -dimension 0: 6->8 (increases) -dimension 1: 12->1 (decreases) - Data: - (6,0) {{{2}}, {2}}, - (7,0) {{{2}}, {2}} -dimension 0: 8->10 (increases) -dimension 1: 1->1 (unchanged) - Data: - (8,0) {{{3}}, {3}}, - (9,0) {{{3}}, {3}} -dimension 0: 10->3 (decreases) -dimension 1: 1->3 (increases) - Data: - (0,1) {{{4}}, {4}}, {{{4}}, {4}} - (1,1) {{{4}}, {4}}, {{{4}}, {4}} - (2,1) {{{4}}, {4}}, {{{4}}, {4}} -dimension 0: 3->2 (decreases) -dimension 1: 3->2 (decreases) -dimension 0: 2->1 (decreases) -dimension 1: 2->2 (unchanged) -dimension 0: 1->1 (unchanged) -dimension 1: 2->4 (increases) - Data: - (0,2) {{{7}}, {7}}, {{{7}}, {7}} -dimension 0: 1->1 (unchanged) -dimension 1: 4->3 (decreases) +dimension 0: 4->3 (decreases) +dimension 1: 10->7 (decreases) diff --git a/hl/tools/testfiles/w-ext-cmpd-two-ff2.ddl b/hl/tools/testfiles/w-ext-cmpd-two-ff2.ddl index 669547e..482da31 100644 --- a/hl/tools/testfiles/w-ext-cmpd-two-ff2.ddl +++ b/hl/tools/testfiles/w-ext-cmpd-two-ff2.ddl @@ -1,47 +1,8 @@ Opened "TEST.h5" with sec2 driver. Monitoring dataset /DSET_CMPD_TWO... -dimension 0: 4->6 (increases) +dimension 0: 4->3 (decreases) dimension 1: 10->12 (increases) Data: - (0,10) {{{1, 1, 1}}, {1, 1}}, {{{1, 1, 1}}, {1, 1}} - (1,10) {{{1, 1, 1}}, {1, 1}}, {{{1, 1, 1}}, {1, 1}} - (2,10) {{{1, 1, 1}}, {1, 1}}, {{{1, 1, 1}}, {1, 1}} - (3,10) {{{1, 1, 1}}, {1, 1}}, {{{1, 1, 1}}, {1, 1}} - (4,0) {{{1, 1, 1}}, {1, 1}}, {{{1, 1, 1}}, {1, 1}}, - (4,2) {{{1, 1, 1}}, {1, 1}}, {{{1, 1, 1}}, {1, 1}}, - (4,4) {{{1, 1, 1}}, {1, 1}}, {{{1, 1, 1}}, {1, 1}}, - (4,6) {{{1, 1, 1}}, {1, 1}}, {{{1, 1, 1}}, {1, 1}}, - (4,8) {{{1, 1, 1}}, {1, 1}}, {{{1, 1, 1}}, {1, 1}}, - (4,10) {{{1, 1, 1}}, {1, 1}}, {{{1, 1, 1}}, {1, 1}}, - (5,0) {{{1, 1, 1}}, {1, 1}}, {{{1, 1, 1}}, {1, 1}}, - (5,2) {{{1, 1, 1}}, {1, 1}}, {{{1, 1, 1}}, {1, 1}}, - (5,4) {{{1, 1, 1}}, {1, 1}}, {{{1, 1, 1}}, {1, 1}}, - (5,6) {{{1, 1, 1}}, {1, 1}}, {{{1, 1, 1}}, {1, 1}}, - (5,8) {{{1, 1, 1}}, {1, 1}}, {{{1, 1, 1}}, {1, 1}}, - (5,10) {{{1, 1, 1}}, {1, 1}}, {{{1, 1, 1}}, {1, 1}} -dimension 0: 6->8 (increases) -dimension 1: 12->1 (decreases) - Data: - (6,0) {{{2, 2, 2}}, {2, 2}}, - (7,0) {{{2, 2, 2}}, {2, 2}} -dimension 0: 8->10 (increases) -dimension 1: 1->1 (unchanged) - Data: - (8,0) {{{3, 3, 3}}, {3, 3}}, - (9,0) {{{3, 3, 3}}, {3, 3}} -dimension 0: 10->3 (decreases) -dimension 1: 1->3 (increases) - Data: - (0,1) {{{4, 4, 4}}, {4, 4}}, {{{4, 4, 4}}, {4, 4}} - (1,1) {{{4, 4, 4}}, {4, 4}}, {{{4, 4, 4}}, {4, 4}} - (2,1) {{{4, 4, 4}}, {4, 4}}, {{{4, 4, 4}}, {4, 4}} -dimension 0: 3->2 (decreases) -dimension 1: 3->2 (decreases) -dimension 0: 2->1 (decreases) -dimension 1: 2->2 (unchanged) -dimension 0: 1->1 (unchanged) -dimension 1: 2->4 (increases) - Data: - (0,2) {{{7, 7, 7}}, {7, 7}}, {{{7, 7, 7}}, {7, 7}} -dimension 0: 1->1 (unchanged) -dimension 1: 4->3 (decreases) + (0,10) {{{-1, -1, -1}}, {-1, -1}}, {{{-1, -1, -1}}, {-1, -1}} + (1,10) {{{-1, -1, -1}}, {-1, -1}}, {{{-1, -1, -1}}, {-1, -1}} + (2,10) {{{-1, -1, -1}}, {-1, -1}}, {{{-1, -1, -1}}, {-1, -1}} diff --git a/hl/tools/testfiles/w-ext-cmpd-two.ddl b/hl/tools/testfiles/w-ext-cmpd-two.ddl index a461226..57ffc2c 100644 --- a/hl/tools/testfiles/w-ext-cmpd-two.ddl +++ b/hl/tools/testfiles/w-ext-cmpd-two.ddl @@ -1,67 +1,7 @@ Opened "TEST.h5" with sec2 driver. Monitoring dataset /DSET_CMPD_TWO... dimension 0: 4->6 (increases) -dimension 1: 10->12 (increases) +dimension 1: 10->1 (decreases) Data: - (0,10) {1, {1, {1, 1, 1}, 1}, 1, {1, 1}}, - (0,11) {1, {1, {1, 1, 1}, 1}, 1, {1, 1}} - (1,10) {1, {1, {1, 1, 1}, 1}, 1, {1, 1}}, - (1,11) {1, {1, {1, 1, 1}, 1}, 1, {1, 1}} - (2,10) {1, {1, {1, 1, 1}, 1}, 1, {1, 1}}, - (2,11) {1, {1, {1, 1, 1}, 1}, 1, {1, 1}} - (3,10) {1, {1, {1, 1, 1}, 1}, 1, {1, 1}}, - (3,11) {1, {1, {1, 1, 1}, 1}, 1, {1, 1}} - (4,0) {1, {1, {1, 1, 1}, 1}, 1, {1, 1}}, - (4,1) {1, {1, {1, 1, 1}, 1}, 1, {1, 1}}, - (4,2) {1, {1, {1, 1, 1}, 1}, 1, {1, 1}}, - (4,3) {1, {1, {1, 1, 1}, 1}, 1, {1, 1}}, - (4,4) {1, {1, {1, 1, 1}, 1}, 1, {1, 1}}, - (4,5) {1, {1, {1, 1, 1}, 1}, 1, {1, 1}}, - (4,6) {1, {1, {1, 1, 1}, 1}, 1, {1, 1}}, - (4,7) {1, {1, {1, 1, 1}, 1}, 1, {1, 1}}, - (4,8) {1, {1, {1, 1, 1}, 1}, 1, {1, 1}}, - (4,9) {1, {1, {1, 1, 1}, 1}, 1, {1, 1}}, - (4,10) {1, {1, {1, 1, 1}, 1}, 1, {1, 1}}, - (4,11) {1, {1, {1, 1, 1}, 1}, 1, {1, 1}}, - (5,0) {1, {1, {1, 1, 1}, 1}, 1, {1, 1}}, - (5,1) {1, {1, {1, 1, 1}, 1}, 1, {1, 1}}, - (5,2) {1, {1, {1, 1, 1}, 1}, 1, {1, 1}}, - (5,3) {1, {1, {1, 1, 1}, 1}, 1, {1, 1}}, - (5,4) {1, {1, {1, 1, 1}, 1}, 1, {1, 1}}, - (5,5) {1, {1, {1, 1, 1}, 1}, 1, {1, 1}}, - (5,6) {1, {1, {1, 1, 1}, 1}, 1, {1, 1}}, - (5,7) {1, {1, {1, 1, 1}, 1}, 1, {1, 1}}, - (5,8) {1, {1, {1, 1, 1}, 1}, 1, {1, 1}}, - (5,9) {1, {1, {1, 1, 1}, 1}, 1, {1, 1}}, - (5,10) {1, {1, {1, 1, 1}, 1}, 1, {1, 1}}, - (5,11) {1, {1, {1, 1, 1}, 1}, 1, {1, 1}} -dimension 0: 6->8 (increases) -dimension 1: 12->1 (decreases) - Data: - (6,0) {2, {2, {2, 2, 2}, 2}, 2, {2, 2}}, - (7,0) {2, {2, {2, 2, 2}, 2}, 2, {2, 2}} -dimension 0: 8->10 (increases) -dimension 1: 1->1 (unchanged) - Data: - (8,0) {3, {3, {3, 3, 3}, 3}, 3, {3, 3}}, - (9,0) {3, {3, {3, 3, 3}, 3}, 3, {3, 3}} -dimension 0: 10->3 (decreases) -dimension 1: 1->3 (increases) - Data: - (0,1) {4, {4, {4, 4, 4}, 4}, 4, {4, 4}}, - (0,2) {4, {4, {4, 4, 4}, 4}, 4, {4, 4}} - (1,1) {4, {4, {4, 4, 4}, 4}, 4, {4, 4}}, - (1,2) {4, {4, {4, 4, 4}, 4}, 4, {4, 4}} - (2,1) {4, {4, {4, 4, 4}, 4}, 4, {4, 4}}, - (2,2) {4, {4, {4, 4, 4}, 4}, 4, {4, 4}} -dimension 0: 3->2 (decreases) -dimension 1: 3->2 (decreases) -dimension 0: 2->1 (decreases) -dimension 1: 2->2 (unchanged) -dimension 0: 1->1 (unchanged) -dimension 1: 2->4 (increases) - Data: - (0,2) {7, {7, {7, 7, 7}, 7}, 7, {7, 7}}, - (0,3) {7, {7, {7, 7, 7}, 7}, 7, {7, 7}} -dimension 0: 1->1 (unchanged) -dimension 1: 4->3 (decreases) + (4,0) {2, {2, {2, 2, 2}, 2}, 2, {2, 2}}, + (5,0) {2, {2, {2, 2, 2}, 2}, 2, {2, 2}} diff --git a/hl/tools/testfiles/w-ext-cmpd.ddl b/hl/tools/testfiles/w-ext-cmpd.ddl index 7e64a14..aac5be3 100644 --- a/hl/tools/testfiles/w-ext-cmpd.ddl +++ b/hl/tools/testfiles/w-ext-cmpd.ddl @@ -5,9 +5,3 @@ dimension 0: 10->13 (increases) (10) {1, {2, {2, 2, 2}, 2}, 3, {4, 4}}, (11) {2, {3, {3, 3, 3}, 3}, 4, {5, 5}}, (12) {3, {4, {4, 4, 4}, 4}, 5, {6, 6}} -dimension 0: 13->12 (decreases) -dimension 0: 12->1 (decreases) -dimension 0: 1->3 (increases) - Data: - (1) {1, {2, {2, 2, 2}, 2}, 3, {4, 4}}, {2, {3, {3, 3, 3}, 3}, 4, {5, - (2) 5}} diff --git a/hl/tools/testfiles/w-ext-early.ddl b/hl/tools/testfiles/w-ext-early.ddl index 1d963d7..bb72104 100644 --- a/hl/tools/testfiles/w-ext-early.ddl +++ b/hl/tools/testfiles/w-ext-early.ddl @@ -1,10 +1,3 @@ Opened "TEST.h5" with sec2 driver. Monitoring dataset /DSET_ALLOC_EARLY... -dimension 0: 10->13 (increases) - Data: - (10) 0, 1, 2 -dimension 0: 13->12 (decreases) -dimension 0: 12->1 (decreases) -dimension 0: 1->3 (increases) - Data: - (1) 0, 1 +dimension 0: 10->9 (decreases) diff --git a/hl/tools/testfiles/w-ext-late.ddl b/hl/tools/testfiles/w-ext-late.ddl index f3a7cf2..a6f8265 100644 --- a/hl/tools/testfiles/w-ext-late.ddl +++ b/hl/tools/testfiles/w-ext-late.ddl @@ -1,10 +1,2 @@ Opened "TEST.h5" with sec2 driver. Monitoring dataset /DSET_ALLOC_LATE... -dimension 0: 10->13 (increases) - Data: - (10) 0, 1, 2 -dimension 0: 13->12 (decreases) -dimension 0: 12->1 (decreases) -dimension 0: 1->3 (increases) - Data: - (1) 0, 1 diff --git a/hl/tools/testfiles/w-ext-one-d.ddl b/hl/tools/testfiles/w-ext-one-d.ddl index 249ff95..673370a 100644 --- a/hl/tools/testfiles/w-ext-one-d.ddl +++ b/hl/tools/testfiles/w-ext-one-d.ddl @@ -1,6 +1,3 @@ Opened "TEST.h5" with sec2 driver. Monitoring dataset /DSET_ONE... dimension 0: 10->13 (increases) -dimension 0: 13->12 (decreases) -dimension 0: 12->1 (decreases) -dimension 0: 1->3 (increases) diff --git a/hl/tools/testfiles/w-ext-one-simple.ddl b/hl/tools/testfiles/w-ext-one-simple.ddl index 3bf0ef5..5df9dff 100644 --- a/hl/tools/testfiles/w-ext-one-simple.ddl +++ b/hl/tools/testfiles/w-ext-one-simple.ddl @@ -1,13 +1,6 @@ Opened "TEST.h5" with sec2 driver. Monitoring dataset /DSET_ONE... -dimension 0: 10->13 (increases) - Data: - 0 - 1 - 2 -dimension 0: 13->12 (decreases) -dimension 0: 12->1 (decreases) -dimension 0: 1->3 (increases) +dimension 0: 10->12 (increases) Data: 0 1 diff --git a/hl/tools/testfiles/w-ext-one.ddl b/hl/tools/testfiles/w-ext-one.ddl index c4e75eb..9604020 100644 --- a/hl/tools/testfiles/w-ext-one.ddl +++ b/hl/tools/testfiles/w-ext-one.ddl @@ -3,8 +3,3 @@ Monitoring dataset /DSET_ONE... dimension 0: 10->13 (increases) Data: (10) 0, 1, 2 -dimension 0: 13->12 (decreases) -dimension 0: 12->1 (decreases) -dimension 0: 1->3 (increases) - Data: - (1) 0, 1 diff --git a/hl/tools/testfiles/w-ext-two-d.ddl b/hl/tools/testfiles/w-ext-two-d.ddl index b71a9a6..5c7af0a 100644 --- a/hl/tools/testfiles/w-ext-two-d.ddl +++ b/hl/tools/testfiles/w-ext-two-d.ddl @@ -1,18 +1,4 @@ Opened "TEST.h5" with sec2 driver. Monitoring dataset /DSET_TWO... -dimension 0: 4->6 (increases) -dimension 1: 10->12 (increases) -dimension 0: 6->8 (increases) -dimension 1: 12->1 (decreases) -dimension 0: 8->10 (increases) -dimension 1: 1->1 (unchanged) -dimension 0: 10->3 (decreases) -dimension 1: 1->3 (increases) -dimension 0: 3->2 (decreases) -dimension 1: 3->2 (decreases) -dimension 0: 2->1 (decreases) -dimension 1: 2->2 (unchanged) -dimension 0: 1->1 (unchanged) -dimension 1: 2->4 (increases) -dimension 0: 1->1 (unchanged) -dimension 1: 4->3 (decreases) +dimension 0: 4->2 (decreases) +dimension 1: 10->10 (unchanged) diff --git a/hl/tools/testfiles/w-ext-two-width.ddl b/hl/tools/testfiles/w-ext-two-width.ddl index 52903de..9f09fde 100644 --- a/hl/tools/testfiles/w-ext-two-width.ddl +++ b/hl/tools/testfiles/w-ext-two-width.ddl @@ -1,41 +1,9 @@ Opened "TEST.h5" with sec2 driver. Monitoring dataset /DSET_TWO... -dimension 0: 4->6 (increases) +dimension 0: 4->4 (unchanged) dimension 1: 10->12 (increases) Data: - (0,10) 1, 1 - (1,10) 1, 1 - (2,10) 1, 1 - (3,10) 1, 1 - (4,0) 1, 1, 1, 1, 1, - (4,5) 1, 1, 1, 1, 1, - (4,10) 1, 1, - (5,0) 1, 1, 1, 1, 1, - (5,5) 1, 1, 1, 1, 1, - (5,10) 1, 1 -dimension 0: 6->8 (increases) -dimension 1: 12->1 (decreases) - Data: - (6,0) 2, - (7,0) 2 -dimension 0: 8->10 (increases) -dimension 1: 1->1 (unchanged) - Data: - (8,0) 3, - (9,0) 3 -dimension 0: 10->3 (decreases) -dimension 1: 1->3 (increases) - Data: - (0,1) 4, 4 - (1,1) 4, 4 - (2,1) 4, 4 -dimension 0: 3->2 (decreases) -dimension 1: 3->2 (decreases) -dimension 0: 2->1 (decreases) -dimension 1: 2->2 (unchanged) -dimension 0: 1->1 (unchanged) -dimension 1: 2->4 (increases) - Data: - (0,2) 7, 7 -dimension 0: 1->1 (unchanged) -dimension 1: 4->3 (decreases) + (0,10) 0, 0 + (1,10) 0, 0 + (2,10) 0, 0 + (3,10) 0, 0 diff --git a/hl/tools/testfiles/w-ext-two.ddl b/hl/tools/testfiles/w-ext-two.ddl index 31df8d5..28ff075 100644 --- a/hl/tools/testfiles/w-ext-two.ddl +++ b/hl/tools/testfiles/w-ext-two.ddl @@ -3,35 +3,9 @@ Monitoring dataset /DSET_TWO... dimension 0: 4->6 (increases) dimension 1: 10->12 (increases) Data: - (0,10) 1, 1 - (1,10) 1, 1 - (2,10) 1, 1 - (3,10) 1, 1 - (4,0) 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - (5,0) 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 -dimension 0: 6->8 (increases) -dimension 1: 12->1 (decreases) - Data: - (6,0) 2, - (7,0) 2 -dimension 0: 8->10 (increases) -dimension 1: 1->1 (unchanged) - Data: - (8,0) 3, - (9,0) 3 -dimension 0: 10->3 (decreases) -dimension 1: 1->3 (increases) - Data: - (0,1) 4, 4 - (1,1) 4, 4 - (2,1) 4, 4 -dimension 0: 3->2 (decreases) -dimension 1: 3->2 (decreases) -dimension 0: 2->1 (decreases) -dimension 1: 2->2 (unchanged) -dimension 0: 1->1 (unchanged) -dimension 1: 2->4 (increases) - Data: - (0,2) 7, 7 -dimension 0: 1->1 (unchanged) -dimension 1: 4->3 (decreases) + (0,10) 2, 2 + (1,10) 2, 2 + (2,10) 2, 2 + (3,10) 2, 2 + (4,0) 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + (5,0) 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2 -- cgit v0.12 From 2599c231642879dad505291f7950d5bd796d80e1 Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Mon, 24 Apr 2017 15:50:05 -0500 Subject: Change signature of H5PLget_size --- java/src/jni/h5plImp.c | 10 ++++------ src/H5PL.c | 18 ++++++++++-------- src/H5PLpublic.h | 12 ++++++------ test/plugin.c | 23 +++++++++++++++-------- 4 files changed, 35 insertions(+), 28 deletions(-) diff --git a/java/src/jni/h5plImp.c b/java/src/jni/h5plImp.c index 5a2d3ba..7ee1940 100644 --- a/java/src/jni/h5plImp.c +++ b/java/src/jni/h5plImp.c @@ -211,13 +211,11 @@ JNIEXPORT jint JNICALL Java_hdf_hdf5lib_H5_H5PLsize (JNIEnv *env, jclass clss) { - int retVal = -1; - - retVal = H5PLsize(); - if (retVal < 0) + unsigned int listsize = 0; + if (H5PLget_loading_state(&listsize) < 0) { h5libraryError(env); - - return (jint)retVal; + } + return (jint)listsize; } /* end Java_hdf_hdf5lib_H5_H5PLsize */ #ifdef __cplusplus diff --git a/src/H5PL.c b/src/H5PL.c index 02c8f00..bc69a25 100644 --- a/src/H5PL.c +++ b/src/H5PL.c @@ -607,7 +607,7 @@ ssize_t H5PLget(unsigned int index, char *pathname/*out*/, size_t size) { ssize_t ret_value = 0; /* Return value */ - ssize_t len = 0; /* Length of pathname */ + size_t len = 0; /* Length of pathname */ char *dl_path = NULL; FUNC_ENTER_API(FAIL) @@ -626,7 +626,7 @@ H5PLget(unsigned int index, char *pathname/*out*/, size_t size) } /* end if */ /* Set return value */ - ret_value = len; + ret_value = (ssize_t)len; done: FUNC_LEAVE_API(ret_value) @@ -638,17 +638,19 @@ done: * * Purpose: Query the size of the current list of plugin paths. * - * Return: Plugin path size (can't indicate failure due to unsigned type) + * Return: Plugin path size * *------------------------------------------------------------------------- */ -unsigned int -H5PLsize(void) +herr_t +H5PLsize(unsigned int *listsize) { - unsigned int ret_value = (unsigned int)H5PL_num_paths_g; + herr_t ret_value = SUCCEED; /* Return value */ + + FUNC_ENTER_API(FAIL) + H5TRACE1("e", "*Iu", listsize); - FUNC_ENTER_API(0) - H5TRACE0("Iu",""); + *listsize = (unsigned int)H5PL_num_paths_g; done: FUNC_LEAVE_API(ret_value) diff --git a/src/H5PLpublic.h b/src/H5PLpublic.h index fc638a0..9ce1fca 100644 --- a/src/H5PLpublic.h +++ b/src/H5PLpublic.h @@ -41,14 +41,14 @@ extern "C" { /* plugin state */ H5_DLL herr_t H5PLset_loading_state(unsigned int plugin_type); -H5_DLL herr_t H5PLget_loading_state(unsigned int* plugin_type/*out*/); -H5_DLL herr_t H5PLappend(const char* plugin_path); -H5_DLL herr_t H5PLprepend(const char* plugin_path); -H5_DLL herr_t H5PLreplace(const char* plugin_path, unsigned int index); -H5_DLL herr_t H5PLinsert(const char* plugin_path, unsigned int index); +H5_DLL herr_t H5PLget_loading_state(unsigned int *plugin_type/*out*/); +H5_DLL herr_t H5PLappend(const char *plugin_path); +H5_DLL herr_t H5PLprepend(const char *plugin_path); +H5_DLL herr_t H5PLreplace(const char *plugin_path, unsigned int index); +H5_DLL herr_t H5PLinsert(const char *plugin_path, unsigned int index); H5_DLL herr_t H5PLremove(unsigned int index); H5_DLL ssize_t H5PLget(unsigned int index, char *pathname/*out*/, size_t size); -H5_DLL unsigned int H5PLsize(void); +H5_DLL herr_t H5PLsize(unsigned int *listsize/*out*/); #ifdef __cplusplus } diff --git a/test/plugin.c b/test/plugin.c index ea22c68..8b4324d 100644 --- a/test/plugin.c +++ b/test/plugin.c @@ -731,7 +731,7 @@ test_filter_path_apis(void) if(H5Zfilter_avail(H5Z_FILTER_DYNLIB1) != TRUE) TEST_ERROR - ndx = H5PLsize(); + H5PLsize(&ndx); TESTING(" remove"); /* Remove all existing paths*/ @@ -741,7 +741,8 @@ test_filter_path_apis(void) TEST_ERROR } /* end if */ /* Verify the table is empty */ - if(H5PLsize() > 0) TEST_ERROR + H5PLsize(&ndx); + if(ndx > 0) TEST_ERROR PASSED(); TESTING(" remove (exceed min)"); @@ -762,7 +763,8 @@ test_filter_path_apis(void) } } /* Verify the table is full */ - if(H5PLsize() != H5PL_MAX_PATH_NUM) TEST_ERROR + H5PLsize(&ndx); + if(ndx != H5PL_MAX_PATH_NUM) TEST_ERROR PASSED(); TESTING(" append (exceed)"); @@ -833,7 +835,8 @@ test_filter_path_apis(void) PASSED(); /* Verify the table is not full */ - if (H5PLsize() != H5PL_MAX_PATH_NUM - 1) TEST_ERROR + H5PLsize(&ndx); + if (ndx != H5PL_MAX_PATH_NUM - 1) TEST_ERROR TESTING(" prepend"); /* Prepend one path*/ @@ -844,7 +847,8 @@ test_filter_path_apis(void) } /* Verify the table is full */ - if(H5PLsize() != H5PL_MAX_PATH_NUM) TEST_ERROR + H5PLsize(&ndx); + if(ndx != H5PL_MAX_PATH_NUM) TEST_ERROR /* Verify that the entries were moved */ if(H5PLget(8, pathname, 256) <= 0) TEST_ERROR @@ -878,7 +882,8 @@ test_filter_path_apis(void) } /* Verify the table is full */ - if(H5PLsize() != H5PL_MAX_PATH_NUM) TEST_ERROR + H5PLsize(&ndx); + if(ndx != H5PL_MAX_PATH_NUM) TEST_ERROR /* Verify that the entries were not moved */ if(H5PLget(0, pathname, 256) <= 0) TEST_ERROR @@ -907,7 +912,8 @@ test_filter_path_apis(void) PASSED(); /* Verify the table is not full */ - if(H5PLsize() != 15) TEST_ERROR + H5PLsize(&ndx); + if(ndx != 15) TEST_ERROR TESTING(" insert"); /* Insert one path*/ @@ -926,7 +932,8 @@ test_filter_path_apis(void) PASSED(); /* Verify the table is full */ - if(H5PLsize() != H5PL_MAX_PATH_NUM) TEST_ERROR + H5PLsize(&ndx); + if(ndx != H5PL_MAX_PATH_NUM) TEST_ERROR TESTING(" insert (exceed)"); /* Exceed the max path insert */ -- cgit v0.12 From 539f252fc89a00de05753ae758ab9c7a5770acbe Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Mon, 24 Apr 2017 16:21:02 -0500 Subject: Correct name of native function --- java/src/jni/h5plImp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/java/src/jni/h5plImp.c b/java/src/jni/h5plImp.c index 7ee1940..f064634 100644 --- a/java/src/jni/h5plImp.c +++ b/java/src/jni/h5plImp.c @@ -212,7 +212,7 @@ Java_hdf_hdf5lib_H5_H5PLsize (JNIEnv *env, jclass clss) { unsigned int listsize = 0; - if (H5PLget_loading_state(&listsize) < 0) { + if (H5PLsize(&listsize) < 0) { h5libraryError(env); } return (jint)listsize; -- cgit v0.12 From 545fa4028aabec0e683351762f42eb4ffa5a5b7e Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Tue, 25 Apr 2017 09:57:21 -0500 Subject: Merge cmake h5clear test changes --- tools/test/misc/CMakeLists.txt | 13 ++-- tools/test/misc/CMakeTestsClear.cmake | 114 +++++++++++++++++++++++++--------- 2 files changed, 92 insertions(+), 35 deletions(-) diff --git a/tools/test/misc/CMakeLists.txt b/tools/test/misc/CMakeLists.txt index 97a6f0c..5e3c0a2 100644 --- a/tools/test/misc/CMakeLists.txt +++ b/tools/test/misc/CMakeLists.txt @@ -17,6 +17,13 @@ INCLUDE_DIRECTORIES (${HDF5_TOOLS_DIR}/lib) set_target_properties (h5repart_gentest PROPERTIES FOLDER generator/tools) #add_test (NAME h5repart_gentest COMMAND $) + add_executable (h5clear_gentest ${HDF5_TOOLS_TEST_MISC_SOURCE_DIR}/h5clear_gentest.c) + TARGET_NAMING (h5clear_gentest STATIC) + TARGET_C_PROPERTIES (h5clear_gentest STATIC " " " ") + target_link_libraries (h5clear_gentest ${HDF5_LIB_TARGET} ${HDF5_TOOLS_LIB_TARGET}) + set_target_properties (h5clear_gentest PROPERTIES FOLDER tools) + #add_test (NAME H5CLEAR-h5clear_gentest COMMAND $) + add_subdirectory (${HDF5_TOOLS_TEST_MISC_SOURCE_DIR}/vds) endif () @@ -27,12 +34,6 @@ INCLUDE_DIRECTORIES (${HDF5_TOOLS_DIR}/lib) target_link_libraries (h5repart_test ${HDF5_LIB_TARGET} ${HDF5_TOOLS_LIB_TARGET}) set_target_properties (h5repart_test PROPERTIES FOLDER tools) - add_executable (h5clear_gentest ${HDF5_TOOLS_TEST_MISC_SOURCE_DIR}/h5clear_gentest.c) - TARGET_NAMING (h5clear_gentest STATIC) - TARGET_C_PROPERTIES (h5clear_gentest STATIC " " " ") - target_link_libraries (h5clear_gentest ${HDF5_LIB_TARGET} ${HDF5_TOOLS_LIB_TARGET}) - set_target_properties (h5clear_gentest PROPERTIES FOLDER tools) - add_executable (clear_open_chk ${HDF5_TOOLS_TEST_MISC_SOURCE_DIR}/clear_open_chk.c) TARGET_NAMING (clear_open_chk STATIC) TARGET_C_PROPERTIES (clear_open_chk STATIC " " " ") diff --git a/tools/test/misc/CMakeTestsClear.cmake b/tools/test/misc/CMakeTestsClear.cmake index e9cb026..7eba4a1 100644 --- a/tools/test/misc/CMakeTestsClear.cmake +++ b/tools/test/misc/CMakeTestsClear.cmake @@ -19,20 +19,32 @@ # -------------------------------------------------------------------- # Copy all the HDF5 files from the source directory into the test directory # -------------------------------------------------------------------- + set (HDF5_TEST_FILES + h5clear_log_v3.h5 + h5clear_mdc_image.h5 + mod_h5clear_mdc_image.h5 + latest_h5clear_log_v3.h5 + latest_h5clear_sec2_v3.h5 + ) + set (HDF5_SEC2_TEST_FILES + h5clear_sec2_v0.h5 + h5clear_sec2_v2.h5 + h5clear_sec2_v3.h5 + ) set (HDF5_REFERENCE_TEST_FILES h5clear_usage.ddl h5clear_open_fail.ddl h5clear_missing_file.ddl h5clear_no_mdc_image.ddl - orig_h5clear_sec2_v0.h5 - orig_h5clear_sec2_v2.h5 - orig_h5clear_sec2_v3.h5 - mod_h5clear_mdc_image.h5 ) - foreach (h5_file ${HDF5_REFERENCE_TEST_FILES}) + foreach (h5_file ${HDF5_TEST_FILES} ${HDF5_SEC2_TEST_FILES} ${HDF5_REFERENCE_TEST_FILES}) HDFTEST_COPY_FILE("${PROJECT_SOURCE_DIR}/testfiles/${h5_file}" "${PROJECT_BINARY_DIR}/testfiles/${h5_file}" "h5clear_files") endforeach () + # make second copy of h5clear_sec2.h5 + foreach (h5_file ${HDF5_SEC2_TEST_FILES}) + HDFTEST_COPY_FILE("${PROJECT_SOURCE_DIR}/testfiles/${h5_file}" "${PROJECT_BINARY_DIR}/testfiles/orig_${h5_file}" "h5clear_files") + endforeach () # make second copy of mod_h5clear_mdc_image.h5 HDFTEST_COPY_FILE("${PROJECT_SOURCE_DIR}/testfiles/mod_h5clear_mdc_image.h5" "${PROJECT_BINARY_DIR}/testfiles/mod_h5clear_mdc_image2.h5" "h5clear_files") add_custom_target(h5clear_files ALL COMMENT "Copying files needed by h5clear tests" DEPENDS ${h5clear_files_list}) @@ -84,6 +96,16 @@ macro (ADD_H5_TEST testname resultcode) if (NOT HDF5_ENABLE_USING_MEMCHECKER) + add_test ( + NAME H5CLEAR-clear_open_chk-copy_${testname}.h5 + COMMAND ${CMAKE_COMMAND} + -E copy_if_different + "${PROJECT_SOURCE_DIR}/testfiles/${testname}.h5" "${PROJECT_BINARY_DIR}/testfiles/${testname}.h5" + ) + if (NOT "${last_test}" STREQUAL "") + set_tests_properties (H5CLEAR-clear_open_chk-copy_${testname}.h5 PROPERTIES DEPENDS ${last_test}) + endif () + set (last_test "H5CLEAR-clear_open_chk-copy_${testname}.h5") # Initial file open fails OR # File open succeeds because the library does not check status_flags for file with < v3 superblock add_test (NAME H5CLEAR-clear_open_chk-${testname}_${resultcode} COMMAND $ ${testname}.h5) @@ -112,6 +134,7 @@ # # # The following are tests to verify the status_flags field is cleared properly: +if (HDF5_ENABLE_USING_MEMCHECKER) # Remove any output file left over from previous test run add_test ( NAME H5CLEAR-clearall-objects @@ -122,34 +145,71 @@ h5clear_sec2_v0.h5 h5clear_sec2_v2.h5 h5clear_sec2_v3.h5 + orig_h5clear_sec2_v0.h5 + orig_h5clear_sec2_v2.h5 + orig_h5clear_sec2_v3.h5 latest_h5clear_log_v3.h5 latest_h5clear_sec2_v3.h5 + mod_h5clear_mdc_image.h5 + mod_h5clear_mdc_image2.h5 ) if (NOT "${last_test}" STREQUAL "") set_tests_properties (H5CLEAR-clearall-objects PROPERTIES DEPENDS ${last_test}) endif () set (last_test "H5CLEAR-clearall-objects") - # create the output files to be used. - add_test (NAME H5CLEAR-h5clear_gentest COMMAND $) - set_tests_properties (H5CLEAR-h5clear_gentest PROPERTIES DEPENDS "H5CLEAR-clearall-objects") - set_tests_properties (H5CLEAR-h5clear_gentest PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles") - set (last_test "H5CLEAR-h5clear_gentest") + foreach (h5_file ${HDF5_TEST_FILES} ${HDF5_SEC2_TEST_FILES}) + add_test ( + NAME H5CLEAR-copy_${h5_file} + COMMAND ${CMAKE_COMMAND} + -E copy_if_different + "${PROJECT_SOURCE_DIR}/testfiles/${h5_file}" "${PROJECT_BINARY_DIR}/testfiles/${h5_file}" + ) + if (NOT "${last_test}" STREQUAL "") + set_tests_properties (H5CLEAR-copy_${h5_file} PROPERTIES DEPENDS ${last_test}) + endif () + set (last_test "H5CLEAR-copy_${h5_file}") + endforeach () + # make second copy of h5clear_sec2.h5 + foreach (h5_file ${HDF5_SEC2_TEST_FILES}) + add_test ( + NAME H5CLEAR-copy_orig_${h5_file} + COMMAND ${CMAKE_COMMAND} + -E copy_if_different + "${PROJECT_SOURCE_DIR}/testfiles/${h5_file}" "${PROJECT_BINARY_DIR}/testfiles/orig_${h5_file}" + ) + if (NOT "${last_test}" STREQUAL "") + set_tests_properties (H5CLEAR-copy_orig_${h5_file} PROPERTIES DEPENDS ${last_test}) + endif () + set (last_test "H5CLEAR-copy_orig_${h5_file}") + endforeach () + # make second copy of mod_h5clear_mdc_image.h5 + add_test ( + NAME H5CLEAR-copy_mod_h5clear_mdc_image2.h5 + COMMAND ${CMAKE_COMMAND} + -E copy_if_different + "${PROJECT_SOURCE_DIR}/testfiles/mod_h5clear_mdc_image.h5" "${PROJECT_BINARY_DIR}/testfiles/mod_h5clear_mdc_image2.h5" + ) + if (NOT "${last_test}" STREQUAL "") + set_tests_properties (H5CLEAR-copy_mod_h5clear_mdc_image2.h5 PROPERTIES DEPENDS ${last_test}) + endif () + set (last_test "H5CLEAR-copy_mod_h5clear_mdc_image2.h5") +endif() # # # # The following are tests to verify the expected output from h5clear # "h5clear -h" -# "h5clear" (no options, no file) -# "h5clear junk.h5" (no options, nonexisting file) -# "h5clear orig_h5clear_sec2_v3.h5" (no options, existing file) -# "h5clear -m" (valid 1 option, no file) -# "h5clear -s junk.h5" (valid 1 option, nonexisting file) -# "h5clear -m -s junk.h5" (valid 2 options, no file) -# "h5clear -m -s junk.h5" (valid 2 options, nonexisting file) -# "h5clear -m orig_h5clear_sec2_v2.h5" (valid 1 option, existing file, no cache image) -# "h5clear -s -m orig_h5clear_sec2_v0.h5" (valid 2 options, existing file, no cache image) +# "h5clear" (no options, no file) +# "h5clear junk.h5" (no options, nonexisting file) +# "h5clear orig_h5clear_sec2_v3.h5" (no options, existing file) +# "h5clear -m" (valid 1 option, no file) +# "h5clear -s junk.h5" (valid 1 option, nonexisting file) +# "h5clear -m -s" (valid 2 options, no file) +# "h5clear -m -s junk.h5" (valid 2 options, nonexisting file) +# "h5clear -m orig_h5clear_sec2_v2.h5" (valid 1 option, existing file, no cache image) +# "h5clear -s -m orig_h5clear_sec2_v0.h5" (valid 2 options, existing file, no cache image) ADD_H5_CMP (h5clear_usage_h h5clear_usage 0 "-h") ADD_H5_CMP (h5clear_usage h5clear_usage 1 "") ADD_H5_CMP (h5clear_usage_junk h5clear_usage 1 "" junk.h5) @@ -159,7 +219,7 @@ ADD_H5_CMP (h5clear_missing_file_ms h5clear_missing_file 1 "-m" "-s") ADD_H5_CMP (h5clear_open_fail_ms h5clear_open_fail 1 "-m" "-s" junk.h5) ADD_H5_CMP (h5clear_no_mdc_image_m h5clear_no_mdc_image 0 "-m" orig_h5clear_sec2_v2.h5) - ADD_H5_CMP (h5clear_no_mdc_image_ms h5clear_no_mdc_image 0 "-m" "-s" orig_h5clear_sec2_v0.h5) + ADD_H5_CMP (h5clear_no_mdc_image_ms h5clear_no_mdc_image 0 "-s" "-m" orig_h5clear_sec2_v0.h5) # # # @@ -171,9 +231,9 @@ # "h5clear -l h5clear_sec2_v2.h5" (invalid 1 option, existing file, fail exit code) # "h5clear -m -k" (valid/invalid 2 options, nofile, fail exit code) # "h5clear -l -m" (invalid/valid 2 options, nofile, fail exit code) -# "h5clear -m -k junk.h5" (valid/invalid 2 options, nonexisting file, fail exit code) +# "h5clear -m -l junk.h5" (valid/invalid 2 options, nonexisting file, fail exit code) # "h5clear -l -m junk.h5" (invalid/valid 2 options, nonexisting file, fail exit code) -# "h5clear -m -k h5clear_sec2_v0.h5" (valid/invalid 2 options, existing file, fail exit code) +# "h5clear -m -l h5clear_sec2_v0.h5" (valid/invalid 2 options, existing file, fail exit code) # "h5clear -l -m h5clear_sec2_v0.h5" (invalid/valid 2 options, existing file, fail exit code) ADD_H5_RETTEST (h5clear_mdc_image "false" "-m" h5clear_mdc_image.h5) ADD_H5_RETTEST (h5clear_vers "false" "--vers") @@ -184,14 +244,14 @@ ADD_H5_RETTEST (h5clear_lm "true" "-l" "-m") ADD_H5_RETTEST (h5clear_ml_junk "true" "-m" "-l" junk.h5) ADD_H5_RETTEST (h5clear_lm_junk "true" "-l" "-m" junk.h5) - ADD_H5_RETTEST (h5clear_ml_sec2 "true" "-m" "-l" h5clear_sec2_v2.h5) - ADD_H5_RETTEST (h5clear_lm_sec2 "true" "-l" "-m" h5clear_sec2_v2.h5) + ADD_H5_RETTEST (h5clear_ml_sec2 "true" "-m" "-l" h5clear_sec2_v0.h5) + ADD_H5_RETTEST (h5clear_lm_sec2 "true" "-l" "-m" h5clear_sec2_v0.h5) # # # # h5clear_mdc_image.h5 already has cache image removed earlier, verify the expected warning from h5clear: ADD_H5_CMP (h5clear_mdc_image_m h5clear_no_mdc_image 0 "-m" mod_h5clear_mdc_image.h5) - ADD_H5_CMP (h5clear_mdc_image_sm h5clear_no_mdc_image 0 "-m" "-s" mod_h5clear_mdc_image2.h5) + ADD_H5_CMP (h5clear_mdc_image_sm h5clear_no_mdc_image 0 "-s" "-m" mod_h5clear_mdc_image2.h5) # # # @@ -202,7 +262,3 @@ ADD_H5_TEST (latest_h5clear_log_v3 "true") ADD_H5_TEST (h5clear_sec2_v0 "false") ADD_H5_TEST (h5clear_sec2_v2 "false") - - set (H5_DEP_EXECUTABLES ${H5_DEP_EXECUTABLES} - h5clear_gentest - ) -- cgit v0.12 From b3fb91a932546724344205529a37226aaa34367e Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Tue, 25 Apr 2017 15:46:03 -0500 Subject: HDFFV-10173 revert and add dynlib flags --- config/conclude.am | 9 ++++++--- test/Makefile.am | 18 +++++++++++++++--- tools/test/h5diff/Makefile.am | 9 ++++++--- tools/test/h5dump/Makefile.am | 9 ++++++--- tools/test/h5ls/Makefile.am | 10 +++++++--- tools/test/h5repack/Makefile.am | 11 ++++++++--- 6 files changed, 48 insertions(+), 18 deletions(-) diff --git a/config/conclude.am b/config/conclude.am index cd1554c..55b805a 100644 --- a/config/conclude.am +++ b/config/conclude.am @@ -16,17 +16,19 @@ ## Textually included at the end of most HDF5 Makefiles.am. ## Contains build rules. -# Automake needs to be taught how to build lib, progs, and tests targets. +# Automake needs to be taught how to build lib, dyn, progs and tests targets. # These will be filled in automatically for the most part (e.g., # lib_LIBRARIES are built for lib target), but EXTRA_LIB, EXTRA_PROG, and # EXTRA_TEST variables are supplied to allow the user to force targets to -# be built at certain times. +# be built at certain times. LIB = $(lib_LIBRARIES) $(lib_LTLIBRARIES) $(noinst_LIBRARIES) \ $(noinst_LTLIBRARIES) $(check_LIBRARIES) $(check_LTLIBRARIES) $(EXTRA_LIB) +DYN = $(dyn_LTLIBRARIES) PROGS = $(bin_PROGRAMS) $(bin_SCRIPTS) $(noinst_PROGRAMS) $(noinst_SCRIPTS) \ $(EXTRA_PROG) chk_TESTS = $(check_PROGRAMS) $(check_SCRIPTS) $(EXTRA_TEST) TESTS = $(TEST_PROG) $(TEST_SCRIPT) $(EXTRA_TEST) +dyndir=$(libdir) TEST_EXTENSIONS = .sh SH_LOG_COMPILER = $(SHELL) @@ -34,6 +36,7 @@ AM_SH_LOG_FLAGS = # lib/progs/tests targets recurse into subdirectories. build-* targets # build files in this directory. +build-dyn: $(DYN) build-lib: $(LIB) build-progs: $(LIB) $(PROGS) build-tests: $(LIB) $(PROGS) $(chk_TESTS) @@ -41,7 +44,7 @@ build-tests: $(LIB) $(PROGS) $(chk_TESTS) # General rule for recursive building targets. # BUILT_SOURCES contain targets that need to be built before anything else # in the directory (e.g., for Fortran type detection) -lib progs tests check-s check-p :: $(BUILT_SOURCES) +lib dyn progs tests check-s check-p :: $(BUILT_SOURCES) @$(MAKE) $(AM_MAKEFLAGS) build-$@ || exit 1; @for d in X $(SUBDIRS); do \ if test $$d != X && test $$d != .; then \ diff --git a/test/Makefile.am b/test/Makefile.am index 4c5d85a..20b63f6 100644 --- a/test/Makefile.am +++ b/test/Makefile.am @@ -104,7 +104,7 @@ noinst_LTLIBRARIES=libh5test.la if HAVE_SHARED_CONDITIONAL # The libdynlib1, libdynlib2, libdynlib3, and libdynlib4 library for testing plugin module plugin.c. # Build it as shared library if configure is enabled for shared library. - lib_LTLIBRARIES=libdynlib1.la libdynlib2.la libdynlib3.la libdynlib4.la + dyn_LTLIBRARIES=libdynlib1.la libdynlib2.la libdynlib3.la libdynlib4.la libdynlib1_la_SOURCES=dynlib1.c libdynlib2_la_SOURCES=dynlib2.c libdynlib3_la_SOURCES=dynlib3.c @@ -114,8 +114,20 @@ if HAVE_SHARED_CONDITIONAL libdynlib3_la_LDFLAGS = -avoid-version -module -shared -export-dynamic libdynlib4_la_LDFLAGS = -avoid-version -module -shared -export-dynamic -install-exec-hook: - $(RM) $(DESTDIR)$(libdir)/*dynlib* +libdynlib1.la: $(libdynlib1_la_OBJECTS) $(libdynlib1_la_DEPENDENCIES) $(EXTRA_libdynlib1_la_DEPENDENCIES) + $(AM_V_CCLD)$(libdynlib1_la_LINK) $(am_libdynlib1_la_rpath) $(libdynlib1_la_OBJECTS) $(libdynlib1_la_LIBADD) + +libdynlib2.la: $(libdynlib2_la_OBJECTS) $(libdynlib2_la_DEPENDENCIES) $(EXTRA_libdynlib2_la_DEPENDENCIES) + $(AM_V_CCLD)$(libdynlib2_la_LINK) $(am_libdynlib2_la_rpath) $(libdynlib2_la_OBJECTS) $(libdynlib2_la_LIBADD) + +libdynlib3.la: $(libdynlib3_la_OBJECTS) $(libdynlib3_la_DEPENDENCIES) $(EXTRA_libdynlib3_la_DEPENDENCIES) + $(AM_V_CCLD)$(libdynlib3_la_LINK) $(am_libdynlib3_la_rpath) $(libdynlib3_la_OBJECTS) $(libdynlib3_la_LIBADD) + +libdynlib4.la: $(libdynlib4_la_OBJECTS) $(libdynlib4_la_DEPENDENCIES) $(EXTRA_libdynlib4_la_DEPENDENCIES) + $(AM_V_CCLD)$(libdynlib4_la_LINK) $(am_libdynlib4_la_rpath) $(libdynlib4_la_OBJECTS) $(libdynlib4_la_LIBADD) + +#install-exec-hook: +# $(RM) $(DESTDIR)$(dyndir)/*dynlib* endif libh5test_la_SOURCES=h5test.c testframe.c cache_common.c swmr_common.c diff --git a/tools/test/h5diff/Makefile.am b/tools/test/h5diff/Makefile.am index 556c07d..5721aaa 100644 --- a/tools/test/h5diff/Makefile.am +++ b/tools/test/h5diff/Makefile.am @@ -50,12 +50,15 @@ LDADD=$(LIBH5TOOLS) $(LIBHDF5) if HAVE_SHARED_CONDITIONAL # Build it as shared library if configure is enabled for shared library. - lib_LTLIBRARIES=libdynlibdiff.la + dyn_LTLIBRARIES=libdynlibdiff.la libdynlibdiff_la_SOURCES=dynlib_diff.c libdynlibdiff_la_LDFLAGS = -avoid-version -module -shared -export-dynamic -install-exec-hook: - $(RM) $(DESTDIR)$(libdir)/*dynlib* +libdynlibdiff.la: $(libdynlibdiff_la_OBJECTS) $(libdynlibdiff_la_DEPENDENCIES) $(EXTRA_libdynlibdiff_la_DEPENDENCIES) + $(AM_V_CCLD)$(libdynlibdiff_la_LINK) $(am_libdynlibdiff_la_rpath) $(libdynlibdiff_la_OBJECTS) $(libdynlibdiff_la_LIBADD) + +#install-exec-hook: +# $(RM) $(DESTDIR)$(dyndir)/*dynlib* endif # Temporary files. *.h5 are generated by h5diff. They should diff --git a/tools/test/h5dump/Makefile.am b/tools/test/h5dump/Makefile.am index 3637af2..df97396 100644 --- a/tools/test/h5dump/Makefile.am +++ b/tools/test/h5dump/Makefile.am @@ -39,12 +39,15 @@ LDADD=$(LIBH5TOOLS) $(LIBHDF5) if HAVE_SHARED_CONDITIONAL # Build it as shared library if configure is enabled for shared library. - lib_LTLIBRARIES=libdynlibdump.la + dyn_LTLIBRARIES=libdynlibdump.la libdynlibdump_la_SOURCES=dynlib_dump.c libdynlibdump_la_LDFLAGS = -avoid-version -module -shared -export-dynamic -install-exec-hook: - $(RM) $(DESTDIR)$(libdir)/*dynlib* +libdynlibdump.la: $(libdynlibdump_la_OBJECTS) $(libdynlibdump_la_DEPENDENCIES) $(EXTRA_libdynlibdump_la_DEPENDENCIES) + $(AM_V_CCLD)$(libdynlibdump_la_LINK) $(am_libdynlibdump_la_rpath) $(libdynlibdump_la_OBJECTS) $(libdynlibdump_la_LIBADD) + +#install-exec-hook: +# $(RM) $(DESTDIR)$(dyndir)/*dynlib* endif # Temporary files. *.h5 are generated by h5dumpgentest. They should diff --git a/tools/test/h5ls/Makefile.am b/tools/test/h5ls/Makefile.am index b6dad48..2494e18 100644 --- a/tools/test/h5ls/Makefile.am +++ b/tools/test/h5ls/Makefile.am @@ -36,11 +36,15 @@ LDADD=$(LIBH5TOOLS) $(LIBHDF5) if HAVE_SHARED_CONDITIONAL # Build it as shared library if configure is enabled for shared library. - lib_LTLIBRARIES=libdynlibls.la + dyn_LTLIBRARIES=libdynlibls.la libdynlibls_la_SOURCES=dynlib_ls.c + libdynlibls_la_LDFLAGS = -avoid-version -module -shared -export-dynamic -install-exec-hook: - $(RM) $(DESTDIR)$(libdir)/*dynlib* +libdynlibls.la: $(libdynlibls_la_OBJECTS) $(libdynlibls_la_DEPENDENCIES) $(EXTRA_libdynlibls_la_DEPENDENCIES) + $(AM_V_CCLD)$(libdynlibls_la_LINK) $(am_libdynlibls_la_rpath) $(libdynlibls_la_OBJECTS) $(libdynlibls_la_LIBADD) + +#install-exec-hook: +# $(RM) $(DESTDIR)$(dyndir)/*dynlib* endif DISTCLEANFILES=h5ls_plugin.sh diff --git a/tools/test/h5repack/Makefile.am b/tools/test/h5repack/Makefile.am index 8284839..a15d6bb 100644 --- a/tools/test/h5repack/Makefile.am +++ b/tools/test/h5repack/Makefile.am @@ -45,14 +45,19 @@ h5repacktst_SOURCES=h5repacktst.c if HAVE_SHARED_CONDITIONAL # Build it as shared library if configure is enabled for shared library. - lib_LTLIBRARIES=libdynlibadd.la libdynlibvers.la + dyn_LTLIBRARIES=libdynlibadd.la libdynlibvers.la libdynlibadd_la_SOURCES=dynlib_rpk.c libdynlibvers_la_SOURCES=dynlib_vrpk.c libdynlibadd_la_LDFLAGS = -avoid-version -module -shared -export-dynamic libdynlibvers_la_LDFLAGS = -avoid-version -module -shared -export-dynamic -install-exec-hook: - $(RM) $(DESTDIR)$(libdir)/*dynlib* +libdynlibadd.la: $(libdynlibadd_la_OBJECTS) $(libdynlibadd_la_DEPENDENCIES) $(EXTRA_libdynlibadd_la_DEPENDENCIES) + $(AM_V_CCLD)$(libdynlibadd_la_LINK) $(am_libdynlibadd_la_rpath) $(libdynlibadd_la_OBJECTS) $(libdynlibadd_la_LIBADD) +libdynlibvers.la: $(libdynlibvers_la_OBJECTS) $(libdynlibvers_la_DEPENDENCIES) $(EXTRA_libdynlibvers_la_DEPENDENCIES) + $(AM_V_CCLD)$(libdynlibvers_la_LINK) $(am_libdynlibvers_la_rpath) $(libdynlibvers_la_OBJECTS) $(libdynlibvers_la_LIBADD) + +#install-exec-hook: +# $(RM) $(DESTDIR)$(dyndir)/*dynlib* endif # Temporary files. *.h5 are generated by h5repack. They should -- cgit v0.12 From 14bc39bcb59ce36d1d2fd156afeaf3aa7bb5ad84 Mon Sep 17 00:00:00 2001 From: Dana Robinson Date: Tue, 25 Apr 2017 02:09:55 -0400 Subject: Updated bin/trace to emit errors and reordered autogen.sh processing so that script failures leave the library in a non-compilable state, making it harder to ignore errors. --- autogen.sh | 63 +++++++++++++++++++++++++++++++++----------------------------- bin/trace | 15 ++++++++++++++- 2 files changed, 48 insertions(+), 30 deletions(-) diff --git a/autogen.sh b/autogen.sh index 58d7e36..3d33c06 100755 --- a/autogen.sh +++ b/autogen.sh @@ -203,6 +203,39 @@ Darwin*) ;; esac +# Run scripts that process source. +# +# These should be run before the autotools so that failures here block +# compilation. + +# Run trace script +# The trace script adds H5TRACE macros to library source files. It should +# have no effect on files that don't have HDF5 API macros in them. +echo "Running trace script:" +bin/trace src/H5*.c || exit 1 +echo + +# Run make_err +# make_err automatically generates the H5E headers that create error message +# types for HDF5. +echo "Running error generation script:" +bin/make_err src/H5err.txt || exit 1 +echo + +# Run make_vers +# make_vers automatically generates the public headers that define the API version +# macros for HDF5. +echo "Running API version generation script:" +bin/make_vers src/H5vers.txt || exit 1 +echo + +# Run make_overflow +# make_overflow automatically generates macros for detecting overflows for type +# conversion. +echo "Running overflow macro generation script:" +bin/make_overflow src/H5overflow.txt || exit 1 +echo + # Run autotools in order # # When available, we use the --force option to ensure all files are @@ -265,35 +298,7 @@ fi ${autoconf_cmd} || exit 1 echo -# Run scripts that process source. - -# Run trace script -# The trace script adds H5TRACE macros to library source files. It should -# have no effect on files that don't have HDF5 API macros in them. -echo -echo "Running trace script:" -bin/trace src/H5*.c || exit 1 - -# Run make_err -# make_err automatically generates the H5E headers that create error message -# types for HDF5. -echo -echo "Running error generation script:" -bin/make_err src/H5err.txt || exit 1 - -# Run make_vers -# make_vers automatically generates the public headers that define the API version -# macros for HDF5. -echo -echo "Running API version generation script:" -bin/make_vers src/H5vers.txt || exit 1 - -# Run make_overflow -# make_overflow automatically generates macros for detecting overflows for type -# conversion. -echo -echo "Running overflow macro generation script:" -bin/make_overflow src/H5overflow.txt || exit 1 +echo "*** SUCCESS ***" echo exit 0 diff --git a/bin/trace b/bin/trace index 4467814..3f532ab 100755 --- a/bin/trace +++ b/bin/trace @@ -161,6 +161,8 @@ $Source = ""; ############################################################################## # Print an error message. # +my $found_errors = 0; + sub errmesg ($$@) { my ($file, $func, @mesg) = @_; my ($mesg) = join "", @mesg; @@ -170,6 +172,8 @@ sub errmesg ($$@) { $lineno = tr/\n/\n/; } + $found_errors = 1; + print "$file: in function \`$func\':\n"; print "$file:$lineno: $mesg\n"; } @@ -339,4 +343,13 @@ for $file (@ARGV) { } } -printf "Finished processing HDF5 API calls\n" +if ($found_errors eq 1) { + printf "\n"; + printf "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\n"; + printf "*** ERRORS FOUND *** ERRORS FOUND *** ERRORS FOUND ****\n"; + printf "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\n"; + exit 1; +} else { + printf "Finished processing HDF5 API calls\n"; +} + -- cgit v0.12 From 14e9856778eb9dbc903a82eb62867fc29d90983b Mon Sep 17 00:00:00 2001 From: Vailin Choi Date: Tue, 25 Apr 2017 18:08:53 -0500 Subject: Incorporate patch from GE Healthcare (HDFFV-9934) This is the same patch that had already been integrated to 1.8 branch (pull request #387). Tested on moohan, ostrich, platypus, emu, osx1010test, quail, kituo, mayll. --- hl/src/H5DO.c | 81 ++++++++- hl/src/H5DOpublic.h | 6 + hl/test/test_dset_opt.c | 461 +++++++++++++++++++++++++++++++++++++++--------- src/H5D.c | 40 +++++ src/H5Dchunk.c | 282 ++++++++++++++++++++++++++--- src/H5Dio.c | 149 +++++++++++----- src/H5Dpkg.h | 3 + src/H5Dpublic.h | 6 + src/H5Pdxpl.c | 28 +++ 9 files changed, 898 insertions(+), 158 deletions(-) diff --git a/hl/src/H5DO.c b/hl/src/H5DO.c index 8db6768..22d40fc 100644 --- a/hl/src/H5DO.c +++ b/hl/src/H5DO.c @@ -32,7 +32,7 @@ * Return: Non-negative on success/Negative on failure * * Programmer: Raymond Lu - * 30 July 2012 + * 30 July 2012 * *------------------------------------------------------------------------- */ @@ -60,7 +60,7 @@ H5DOwrite_chunk(hid_t dset_id, hid_t dxpl_id, uint32_t filters, const hsize_t *o /* If the user passed in a default DXPL, create one to pass to H5Dwrite() */ if(H5P_DEFAULT == dxpl_id) { - if((dxpl_id = H5Pcreate(H5P_DATASET_XFER)) < 0) + if((dxpl_id = H5Pcreate(H5P_DATASET_XFER)) < 0) goto done; created_dxpl = TRUE; } /* end if */ @@ -87,16 +87,87 @@ done: if(H5Pclose(dxpl_id) < 0) ret_value = FAIL; } /* end if */ - else + else { /* Reset the direct write flag on user DXPL */ + do_direct_write = FALSE; if(H5Pset(dxpl_id, H5D_XFER_DIRECT_CHUNK_WRITE_FLAG_NAME, &do_direct_write) < 0) ret_value = FAIL; + } return(ret_value); } /* end H5DOwrite_chunk() */ -/* +/*------------------------------------------------------------------------- + * Function: H5DOread_chunk + * + * Purpose: Reads an entire chunk from the file directly. + * + * Return: Non-negative on success/Negative on failure + * + * Programmer: Matthew Strong (GE Healthcare) + * 14 February 2016 + * + *--------------------------------------------------------------------------- + */ +herr_t +H5DOread_chunk(hid_t dset_id, hid_t dxpl_id, const hsize_t *offset, uint32_t *filters, + void *buf) +{ + hbool_t created_dxpl = FALSE; /* Whether we created a DXPL */ + hbool_t do_direct_read = TRUE; /* Flag for direct writes */ + herr_t ret_value = FAIL; /* Return value */ + + /* Check arguments */ + if(dset_id < 0) + goto done; + if(!buf) + goto done; + if(!offset) + goto done; + if(!filters) + goto done; + + /* If the user passed in a default DXPL, create one to pass to H5Dwrite() */ + if(H5P_DEFAULT == dxpl_id) { + if((dxpl_id = H5Pcreate(H5P_DATASET_XFER)) < 0) + goto done; + created_dxpl = TRUE; + } /* end if */ + + /* Set direct write parameters */ + if(H5Pset(dxpl_id, H5D_XFER_DIRECT_CHUNK_READ_FLAG_NAME, &do_direct_read) < 0) + goto done; + if(H5Pset(dxpl_id, H5D_XFER_DIRECT_CHUNK_READ_OFFSET_NAME, &offset) < 0) + goto done; + + /* Read chunk */ + if(H5Dread(dset_id, 0, H5S_ALL, H5S_ALL, dxpl_id, buf) < 0) + goto done; + /* Get the filter mask */ + if(H5Pget(dxpl_id, H5D_XFER_DIRECT_CHUNK_READ_FILTERS_NAME, filters) < 0) + goto done; + + /* Indicate success */ + ret_value = SUCCEED; + +done: + if(created_dxpl) { + if(H5Pclose(dxpl_id) < 0) + ret_value = FAIL; + } /* end if */ + else { + /* Reset the direct read flag on user DXPL */ + do_direct_read = FALSE; + if(H5Pset(dxpl_id, H5D_XFER_DIRECT_CHUNK_READ_FLAG_NAME, &do_direct_read) < 0) + ret_value = FAIL; + } + + return(ret_value); +} /* end H5DOread_chunk() */ + + +/*------------------------------------------------------------------------- * Function: H5DOappend() * * Purpose: To append elements to a dataset. @@ -122,6 +193,8 @@ done: * ret_value = FAIL; * goto done; * } + * + *------------------------------------------------------------------------- */ herr_t H5DOappend(hid_t dset_id, hid_t dxpl_id, unsigned axis, size_t extension, diff --git a/hl/src/H5DOpublic.h b/hl/src/H5DOpublic.h index ce0d32e..d5c8de4 100644 --- a/hl/src/H5DOpublic.h +++ b/hl/src/H5DOpublic.h @@ -28,6 +28,12 @@ extern "C" { H5_HLDLL herr_t H5DOwrite_chunk(hid_t dset_id, hid_t dxpl_id, uint32_t filters, const hsize_t *offset, size_t data_size, const void *buf); +H5_HLDLL herr_t H5DOread_chunk(hid_t dset_id, /*in*/ + hid_t dxpl_id, /*in*/ + const hsize_t *offset, /*in*/ + uint32_t *filters, /*out*/ + void *buf); /*out*/ + H5_HLDLL herr_t H5DOappend(hid_t dset_id, hid_t dxpl_id, unsigned axis, size_t extension, hid_t memtype, const void *buf); diff --git a/hl/test/test_dset_opt.c b/hl/test/test_dset_opt.c index 03c467a..d3a6b5c 100644 --- a/hl/test/test_dset_opt.c +++ b/hl/test/test_dset_opt.c @@ -76,11 +76,10 @@ const H5Z_class2_t H5Z_BOGUS2[1] = {{ /*------------------------------------------------------------------------- * Function: test_direct_chunk_write * - * Purpose: Test the basic functionality of H5DOwrite_chunk + * Purpose: Test the basic functionality of H5DOwrite_chunk/H5DOread_chunk * * Return: Success: 0 - * - * Failure: 1 + * Failure: 1 * * Programmer: Raymond Lu * 30 November 2012 @@ -103,24 +102,31 @@ test_direct_chunk_write (hid_t file) int i, j, n; unsigned filter_mask = 0; + unsigned read_filter_mask = 0; int direct_buf[CHUNK_NX][CHUNK_NY]; int check_chunk[CHUNK_NX][CHUNK_NY]; hsize_t offset[2] = {0, 0}; size_t buf_size = CHUNK_NX*CHUNK_NY*sizeof(int); const Bytef *z_src = (const Bytef*)(direct_buf); - Bytef *z_dst; /*destination buffer */ + Bytef *z_dst; /*destination buffer */ uLongf z_dst_nbytes = (uLongf)DEFLATE_SIZE_ADJUST(buf_size); uLong z_src_nbytes = (uLong)buf_size; - int aggression = 9; /* Compression aggression setting */ - void *outbuf = NULL; /* Pointer to new buffer */ + int aggression = 9; /* Compression aggression setting */ + void *outbuf = NULL; /* Pointer to new buffer */ + + /* For H5DOread_chunk() */ + void *readbuf = NULL; /* Buffer for reading data */ + const Bytef *pt_readbuf; /* Point to the buffer for data read */ + hsize_t read_chunk_nbytes; /* Size of chunk on disk */ + int read_dst_buf[CHUNK_NX][CHUNK_NY]; /* Buffer to hold un-compressed data */ hsize_t start[2]; /* Start of hyperslab */ hsize_t stride[2]; /* Stride of hyperslab */ hsize_t count[2]; /* Block count */ hsize_t block[2]; /* Block sizes */ - TESTING("basic functionality of H5DOwrite_chunk"); + TESTING("basic functionality of H5DOwrite_chunk/H5DOread_chunk"); /* * Create the data space with unlimited dimensions. @@ -151,26 +157,76 @@ test_direct_chunk_write (hid_t file) cparms, H5P_DEFAULT)) < 0) goto error; - /* Initialize the dataset */ - for(i = n = 0; i < NX; i++) - for(j = 0; j < NY; j++) - data[i][j] = n++; - if((dxpl = H5Pcreate(H5P_DATASET_XFER)) < 0) goto error; + HDmemset(data, 0, sizeof(data)); + /* Initialize data for the first chunk */ + for(i = n = 0; i < CHUNK_NX; i++) + for(j = 0; j < CHUNK_NY; j++) + data[i][j] = n++; + /* - * Write the data for the dataset. It should stay in the chunk cache. - * It will be evicted from the cache by the H5DOwrite_chunk calls. - */ + * Write the data for the dataset. */ if((status = H5Dwrite(dataset, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, dxpl, data)) < 0) goto error; + if(H5Fflush(dataset, H5F_SCOPE_LOCAL) < 0) + goto error; + + if(H5Dclose(dataset) < 0) + goto error; + + if((dataset = H5Dopen2(file, DATASETNAME1, H5P_DEFAULT)) < 0) + goto error; + + offset[0] = offset[1] = 0; + + /* Get the size of the compressed chunk */ + ret = H5Dget_chunk_storage_size(dataset, offset, &read_chunk_nbytes); + + readbuf = HDmalloc(read_chunk_nbytes); + pt_readbuf = (const Bytef *)readbuf; + + /* Test to use H5DOread_chunk() to read the chunk back */ + if((status = H5DOread_chunk(dataset, H5P_DEFAULT, offset, &read_filter_mask, readbuf)) < 0) + goto error; + + /* uncompress(Bytef *dest, uLongf *destLen, const Bytef *source, uLong sourceLen) */ + ret = uncompress((Bytef *)read_dst_buf, (uLongf *)&buf_size, pt_readbuf, (uLong)read_chunk_nbytes); + + /* Check for various zlib errors */ + if(Z_BUF_ERROR == ret) { + HDfprintf(stderr, "error: not enough room in output buffer"); + goto error; + } else if(Z_MEM_ERROR == ret) { + HDfprintf(stderr, "error: not enough memory"); + goto error; + } else if(Z_OK != ret) { + HDfprintf(stderr, "error: corrupted input data"); + goto error; + } + + /* Check that the values read are the same as the values written */ + for(i = 0; i < CHUNK_NX; i++) { + for(j = 0; j < CHUNK_NY; j++) { + if(data[i][j] != read_dst_buf[i][j]) { + printf(" 1. Read different values than written."); + printf(" At index %d,%d\n", i, j); + printf(" data=%d, read_dst_buf=%d\n", data[i][j], read_dst_buf[i][j]); + goto error; + } + } + } + + if(readbuf) + HDfree(readbuf); + /* Initialize data for one chunk */ for(i = n = 0; i < CHUNK_NX; i++) for(j = 0; j < CHUNK_NY; j++) - direct_buf[i][j] = n++; + direct_buf[i][j] = n++; /* Allocate output (compressed) buffer */ outbuf = HDmalloc(z_dst_nbytes); @@ -181,18 +237,18 @@ test_direct_chunk_write (hid_t file) /* Check for various zlib errors */ if(Z_BUF_ERROR == ret) { - fprintf(stderr, "overflow"); + HDfprintf(stderr, "overflow"); goto error; } else if(Z_MEM_ERROR == ret) { - fprintf(stderr, "deflate memory error"); + HDfprintf(stderr, "deflate memory error"); goto error; } else if(Z_OK != ret) { - fprintf(stderr, "other deflate error"); + HDfprintf(stderr, "other deflate error"); goto error; } - /* Write the compressed chunk data repeatedly to cover all the chunks in the - * dataset, using the direct writing function. */ + /* Write the compressed chunk data repeatedly to cover all the chunks in the + * dataset, using the direct writing function. */ for(i=0; ishared->layout.type) + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a chunked dataset") + + /* Call private function */ + if(H5D__get_chunk_storage_size(dset, H5P_DATASET_XFER_DEFAULT, offset, chunk_nbytes) < 0) + HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't get storage size of chunk") + +done: + FUNC_LEAVE_API(ret_value); +} diff --git a/src/H5Dchunk.c b/src/H5Dchunk.c index ce684a0..4905a70 100644 --- a/src/H5Dchunk.c +++ b/src/H5Dchunk.c @@ -303,6 +303,9 @@ static herr_t H5D__chunk_collective_fill(const H5D_t *dset, hid_t dxpl_id, H5D_chunk_coll_info_t *chunk_info, size_t chunk_size, const void *fill_buf); #endif /* H5_HAVE_PARALLEL */ +static int +H5D__chunk_dump_index_cb(const H5D_chunk_rec_t *chunk_rec, void *_udata); + /*********************/ /* Package Variables */ /*********************/ @@ -369,8 +372,7 @@ H5FL_EXTERN(H5S_sel_iter_t); /*------------------------------------------------------------------------- * Function: H5D__chunk_direct_write * - * Purpose: Internal routine to write a chunk - * directly into the file. + * Purpose: Internal routine to write a chunk directly into the file. * * Return: Non-negative on success/Negative on failure * @@ -408,7 +410,7 @@ H5D__chunk_direct_write(const H5D_t *dset, hid_t dxpl_id, uint32_t filters, /* Allocate dataspace and initialize it if it hasn't been. */ if(!(*layout->ops->is_space_alloc)(&layout->storage)) { - /* Allocate storage */ + /* Allocate storage */ if(H5D__alloc_storage(&io_info, H5D_ALLOC_WRITE, FALSE, NULL) < 0) HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to initialize storage") } @@ -465,7 +467,7 @@ H5D__chunk_direct_write(const H5D_t *dset, hid_t dxpl_id, uint32_t filters, HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't fill dxpl cache") if(H5D__chunk_cache_evict(dset, io_info.md_dxpl_id, dxpl_cache, rdcc->slot[udata.idx_hint], FALSE) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTREMOVE, FAIL, "unable to evict chunk") + HGOTO_ERROR(H5E_DATASET, H5E_CANTREMOVE, FAIL, "unable to evict chunk") } /* end if */ /* Write the data to the file */ @@ -491,6 +493,244 @@ done: /*------------------------------------------------------------------------- + * Function: H5D__chunk_direct_read + * + * Purpose: Internal routine to read a chunk directly from the file. + * + * Return: Non-negative on success/Negative on failure + * + * Programmer: Matthew Strong (GE Healthcare) + * 14 February 2016 + * + *------------------------------------------------------------------------- + */ +herr_t +H5D__chunk_direct_read(const H5D_t *dset, hid_t dxpl_id, hsize_t *offset, + uint32_t* filters, void *buf) +{ + const H5O_layout_t *layout = &(dset->shared->layout); /* Dataset layout */ + const H5D_rdcc_t *rdcc = &(dset->shared->cache.chunk); /* raw data chunk cache */ + H5D_chunk_ud_t udata; /* User data for querying chunk info */ + hsize_t scaled[H5S_MAX_RANK]; /* Scaled coordinates for this chunk */ + H5D_io_info_t io_info; /* to hold the dset and two dxpls (meta and raw data) */ + H5D_dxpl_cache_t _dxpl_cache; /* Data transfer property cache buffer */ + H5D_dxpl_cache_t *dxpl_cache = &_dxpl_cache; /* Data transfer property cache */ + hbool_t md_dxpl_generated = FALSE; /* bool to indicate whether we should free the md_dxpl_id at exit */ + herr_t ret_value = SUCCEED; /* Return value */ + + FUNC_ENTER_STATIC_TAG(dxpl_id, dset->oloc.addr, FAIL) + + /* Check args */ + HDassert(dset && H5D_CHUNKED == layout->type); + HDassert(offset); + HDassert(filters); + HDassert(buf); + + io_info.dset = dset; + io_info.raw_dxpl_id = dxpl_id; + io_info.md_dxpl_id = dxpl_id; + + /* set the dxpl IO type for sanity checking at the FD layer */ +#ifdef H5_DEBUG_BUILD + if(H5D_set_io_info_dxpls(&io_info, dxpl_id) < 0) + HGOTO_ERROR(H5E_DATASET, H5E_CANTCOPY, FAIL, "can't set metadata and raw data dxpls") + md_dxpl_generated = TRUE; +#endif /* H5_DEBUG_BUILD */ + + /* Allocate dataspace and initialize it if it hasn't been. */ + if(!(*layout->ops->is_space_alloc)(&layout->storage)) + HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "storage is not initialized") + + /* Calculate the index of this chunk */ + H5VM_chunk_scaled(dset->shared->ndims, offset, layout->u.chunk.dim, scaled); + scaled[dset->shared->ndims] = 0; + + /* Reset fields about the chunk we are looking for */ + udata.filter_mask = 0; + udata.chunk_block.offset = HADDR_UNDEF; + udata.chunk_block.length = 0; + udata.idx_hint = UINT_MAX; + + /* Find out the file address of the chunk */ + if(H5D__chunk_lookup(dset, io_info.md_dxpl_id, scaled, &udata) < 0) + HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "error looking up chunk address") + + /* Sanity check */ + HDassert((H5F_addr_defined(udata.chunk_block.offset) && udata.chunk_block.length > 0) || + (!H5F_addr_defined(udata.chunk_block.offset) && udata.chunk_block.length == 0)); + + /* Check if the requested chunk exists in the chunk cache */ + if(UINT_MAX != udata.idx_hint) { + H5D_rdcc_ent_t *ent = rdcc->slot[udata.idx_hint]; + + /* Sanity checks */ + HDassert(udata.idx_hint < rdcc->nslots); + HDassert(rdcc->slot[udata.idx_hint]); + + /* If the cached chunk is dirty, it must be flushed to get accurate size */ + if( ent->dirty == TRUE ) { + + /* Fill the DXPL cache values for later use */ + if(H5D__get_dxpl_cache(io_info.raw_dxpl_id, &dxpl_cache) < 0) + HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't fill dxpl cache") + + /* Flush the chunk to disk and clear the cache entry */ + if(H5D__chunk_cache_evict(dset, io_info.md_dxpl_id, dxpl_cache, rdcc->slot[udata.idx_hint], TRUE) < 0) + HGOTO_ERROR(H5E_DATASET, H5E_CANTREMOVE, FAIL, "unable to evict chunk") + + /* Reset fields about the chunk we are looking for */ + udata.filter_mask = 0; + udata.chunk_block.offset = HADDR_UNDEF; + udata.chunk_block.length = 0; + udata.idx_hint = UINT_MAX; + + /* Get the new file address / chunk size after flushing */ + if(H5D__chunk_lookup(dset, io_info.md_dxpl_id, scaled, &udata) < 0) + HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "error looking up chunk address") + } + } + + /* Make sure the address of the chunk is returned. */ + if(!H5F_addr_defined(udata.chunk_block.offset)) + HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "chunk address isn't defined") + + /* Read the chunk data into the supplied buffer */ + if(H5F_block_read(dset->oloc.file, H5FD_MEM_DRAW, udata.chunk_block.offset, udata.chunk_block.length, io_info.raw_dxpl_id, buf) < 0) + HGOTO_ERROR(H5E_IO, H5E_READERROR, FAIL, "unable to read raw data chunk") + + /* Return the filter mask */ + *filters = udata.filter_mask; + +done: +#ifdef H5_DEBUG_BUILD + if(md_dxpl_generated && H5I_dec_ref(io_info.md_dxpl_id) < 0) + HDONE_ERROR(H5E_DATASET, H5E_CANTDEC, FAIL, "can't close metadata dxpl") +#endif /* H5_DEBUG_BUILD */ + FUNC_LEAVE_NOAPI(ret_value) +} /* end H5D__chunk_direct_read() */ + + +/*------------------------------------------------------------------------- + * Function: H5D__get_chunk_storage_size + * + * Purpose: Internal routine to read the storage size of a chunk on disk. + * + * Return: Non-negative on success/Negative on failure + * + * Programmer: Matthew Strong (GE Healthcare) + * 20 October 2016 + * + *------------------------------------------------------------------------- + */ +herr_t +H5D__get_chunk_storage_size(H5D_t *dset, hid_t dxpl_id, const hsize_t *offset, hsize_t *storage_size) +{ + const H5O_layout_t *layout = &(dset->shared->layout); /* Dataset layout */ + const H5D_rdcc_t *rdcc = &(dset->shared->cache.chunk); /* raw data chunk cache */ + hsize_t scaled[H5S_MAX_RANK]; /* Scaled coordinates for this chunk */ + H5D_io_info_t io_info; /* to hold the dset and two dxpls (meta and raw data) */ + H5D_chunk_ud_t udata; /* User data for querying chunk info */ + H5D_dxpl_cache_t _dxpl_cache; /* Data transfer property cache buffer */ + H5D_dxpl_cache_t *dxpl_cache = &_dxpl_cache; /* Data transfer property cache */ + hbool_t md_dxpl_generated = FALSE; /* bool to indicate whether we should free the md_dxpl_id at exit */ + herr_t ret_value = SUCCEED; /* Return value */ + + FUNC_ENTER_STATIC_TAG(dxpl_id, dset->oloc.addr, FAIL) + + /* Check args */ + HDassert(dset && H5D_CHUNKED == layout->type); + HDassert(offset); + HDassert(storage_size); + + io_info.dset = dset; + io_info.raw_dxpl_id = dxpl_id; + io_info.md_dxpl_id = dxpl_id; + + /* set the dxpl IO type for sanity checking at the FD layer */ +#ifdef H5_DEBUG_BUILD + if(H5D_set_io_info_dxpls(&io_info, dxpl_id) < 0) + HGOTO_ERROR(H5E_DATASET, H5E_CANTCOPY, FAIL, "can't set metadata and raw data dxpls") + md_dxpl_generated = TRUE; +#endif /* H5_DEBUG_BUILD */ + + /* Allocate dataspace and initialize it if it hasn't been. */ + if(!(*layout->ops->is_space_alloc)(&layout->storage)) { + *storage_size = 0; + HGOTO_DONE(SUCCEED) + } + + /* Calculate the index of this chunk */ + H5VM_chunk_scaled(dset->shared->ndims, offset, layout->u.chunk.dim, scaled); + scaled[dset->shared->ndims] = 0; + + /* Reset fields about the chunk we are looking for */ + udata.chunk_block.offset = HADDR_UNDEF; + udata.chunk_block.length = 0; + udata.idx_hint = UINT_MAX; + + /* Find out the file address of the chunk */ + if(H5D__chunk_lookup(dset, io_info.md_dxpl_id, scaled, &udata) < 0) + HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "error looking up chunk address") + + /* Sanity check */ + HDassert((H5F_addr_defined(udata.chunk_block.offset) && udata.chunk_block.length > 0) || + (!H5F_addr_defined(udata.chunk_block.offset) && udata.chunk_block.length == 0)); + + /* The requested chunk is not in cache or on disk */ + if(!H5F_addr_defined(udata.chunk_block.offset) && UINT_MAX == udata.idx_hint) + HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "chunk storage is not allocated") + + /* Check if there are filters registered to the dataset */ + if( dset->shared->dcpl_cache.pline.nused > 0 ) { + /* Check if the requested chunk exists in the chunk cache */ + if(UINT_MAX != udata.idx_hint) { + /* Sanity checks */ + HDassert(udata.idx_hint < rdcc->nslots); + HDassert(rdcc->slot[udata.idx_hint]); + H5D_rdcc_ent_t *ent = rdcc->slot[udata.idx_hint]; + + /* If the cached chunk is dirty, it must be flushed to get accurate size */ + if( ent->dirty == TRUE ) { + /* Fill the DXPL cache values for later use */ + if(H5D__get_dxpl_cache(dxpl_id, &dxpl_cache) < 0) + HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't fill dxpl cache") + + /* Flush the chunk to disk and clear the cache entry */ + if(H5D__chunk_cache_evict(dset, io_info.md_dxpl_id, dxpl_cache, rdcc->slot[udata.idx_hint], TRUE) < 0) + HGOTO_ERROR(H5E_DATASET, H5E_CANTREMOVE, FAIL, "unable to evict chunk") + + /* Reset fields about the chunk we are looking for */ + udata.chunk_block.offset = HADDR_UNDEF; + udata.chunk_block.length = 0; + udata.idx_hint = UINT_MAX; + + /* Get the new file address / chunk size after flushing */ + if(H5D__chunk_lookup(dset, io_info.md_dxpl_id, scaled, &udata) < 0) + HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "error looking up chunk address") + } + } + + /* Make sure the address of the chunk is returned. */ + if(!H5F_addr_defined(udata.chunk_block.offset)) + HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "chunk address isn't defined") + + /* Return the chunk size on disk */ + *storage_size = udata.chunk_block.length; + } + /* There are no filters registered, return the chunk size from the storage layout */ + else + *storage_size = dset->shared->layout.u.chunk.size; + +done: +#ifdef H5_DEBUG_BUILD + if(md_dxpl_generated && H5I_dec_ref(io_info.md_dxpl_id) < 0) + HDONE_ERROR(H5E_DATASET, H5E_CANTDEC, FAIL, "can't close metadata dxpl") +#endif /* H5_DEBUG_BUILD */ + FUNC_LEAVE_NOAPI(ret_value) +} /* H5D__get_chunk_storage_size */ + + +/*------------------------------------------------------------------------- * Function: H5D__chunk_set_info_real * * Purpose: Internal routine to set the information about chunks for a dataset @@ -519,22 +759,22 @@ H5D__chunk_set_info_real(H5O_layout_chunk_t *layout, unsigned ndims, /* Compute the # of chunks in dataset dimensions */ for(u = 0, layout->nchunks = 1, layout->max_nchunks = 1; u < ndims; u++) { /* Round up to the next integer # of chunks, to accomodate partial chunks */ - layout->chunks[u] = ((curr_dims[u] + layout->dim[u]) - 1) / layout->dim[u]; + layout->chunks[u] = ((curr_dims[u] + layout->dim[u]) - 1) / layout->dim[u]; if(H5S_UNLIMITED == max_dims[u]) layout->max_chunks[u] = H5S_UNLIMITED; else layout->max_chunks[u] = ((max_dims[u] + layout->dim[u]) - 1) / layout->dim[u]; /* Accumulate the # of chunks */ - layout->nchunks *= layout->chunks[u]; - layout->max_nchunks *= layout->max_chunks[u]; + layout->nchunks *= layout->chunks[u]; + layout->max_nchunks *= layout->max_chunks[u]; } /* end for */ /* Get the "down" sizes for each dimension */ if(H5VM_array_down(ndims, layout->chunks, layout->down_chunks) < 0) HGOTO_ERROR(H5E_DATASET, H5E_CANTSET, FAIL, "can't compute 'down' chunk size value") if(H5VM_array_down(ndims, layout->max_chunks, layout->max_down_chunks) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTSET, FAIL, "can't compute 'down' chunk size value") + HGOTO_ERROR(H5E_DATASET, H5E_CANTSET, FAIL, "can't compute 'down' chunk size value") done: FUNC_LEAVE_NOAPI(ret_value) @@ -2383,14 +2623,14 @@ H5D__chunk_dest(H5D_t *dset, hid_t dxpl_id) /* Flush all the cached chunks */ for(ent = rdcc->head; ent; ent = next) { - next = ent->next; - if(H5D__chunk_cache_evict(dset, dxpl_id, dxpl_cache, ent, TRUE) < 0) - nerrors++; + next = ent->next; + if(H5D__chunk_cache_evict(dset, dxpl_id, dxpl_cache, ent, TRUE) < 0) + nerrors++; } /* end for */ /* Continue even if there are failures. */ if(nerrors) - HDONE_ERROR(H5E_IO, H5E_CANTFLUSH, FAIL, "unable to flush one or more raw data chunks") + HDONE_ERROR(H5E_IO, H5E_CANTFLUSH, FAIL, "unable to flush one or more raw data chunks") /* Release cache structures */ if(rdcc->slot) @@ -2997,27 +3237,27 @@ H5D__chunk_cache_evict(const H5D_t *dset, hid_t dxpl_id, const H5D_dxpl_cache_t HDassert(ent->idx < rdcc->nslots); if(flush) { - /* Flush */ - if(H5D__chunk_flush_entry(dset, dxpl_id, dxpl_cache, ent, TRUE) < 0) - HDONE_ERROR(H5E_IO, H5E_WRITEERROR, FAIL, "cannot flush indexed storage buffer") + /* Flush */ + if(H5D__chunk_flush_entry(dset, dxpl_id, dxpl_cache, ent, TRUE) < 0) + HDONE_ERROR(H5E_IO, H5E_WRITEERROR, FAIL, "cannot flush indexed storage buffer") } /* end if */ else { /* Don't flush, just free chunk */ - if(ent->chunk != NULL) - ent->chunk = (uint8_t *)H5D__chunk_mem_xfree(ent->chunk, + if(ent->chunk != NULL) + ent->chunk = (uint8_t *)H5D__chunk_mem_xfree(ent->chunk, ((ent->edge_chunk_state & H5D_RDCC_DISABLE_FILTERS) ? NULL : &(dset->shared->dcpl_cache.pline))); } /* end else */ /* Unlink from list */ if(ent->prev) - ent->prev->next = ent->next; + ent->prev->next = ent->next; else - rdcc->head = ent->next; + rdcc->head = ent->next; if(ent->next) - ent->next->prev = ent->prev; + ent->next->prev = ent->prev; else - rdcc->tail = ent->prev; + rdcc->tail = ent->prev; ent->prev = ent->next = NULL; /* Unlink from temporary list */ diff --git a/src/H5Dio.c b/src/H5Dio.c index dfd3f17..572e6cf 100644 --- a/src/H5Dio.c +++ b/src/H5Dio.c @@ -125,9 +125,13 @@ 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*/) { H5D_t *dset = NULL; - const H5S_t *mem_space = NULL; - const H5S_t *file_space = NULL; - herr_t ret_value = SUCCEED; /* Return value */ + const H5S_t *mem_space = NULL; + const H5S_t *file_space = NULL; + H5P_genplist_t *plist; /* Property list pointer */ + hsize_t *direct_offset = NULL; + hbool_t direct_read = FALSE; + uint32_t direct_filters = 0; + herr_t ret_value = SUCCEED; /* Return value */ FUNC_ENTER_API(FAIL) H5TRACE6("e", "iiiiix", dset_id, mem_type_id, mem_space_id, file_space_id, @@ -135,28 +139,29 @@ H5Dread(hid_t dset_id, hid_t mem_type_id, hid_t mem_space_id, /* check arguments */ if(NULL == (dset = (H5D_t *)H5I_object_verify(dset_id, H5I_DATASET))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a dataset") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a dataset") if(NULL == dset->oloc.file) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a dataset") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a dataset") if(mem_space_id < 0 || file_space_id < 0) HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a data space") if(H5S_ALL != mem_space_id) { - if(NULL == (mem_space = (const H5S_t *)H5I_object_verify(mem_space_id, H5I_DATASPACE))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a data space") + if(NULL == (mem_space = (const H5S_t *)H5I_object_verify(mem_space_id, H5I_DATASPACE))) + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a data space") - /* Check for valid selection */ - if(H5S_SELECT_VALID(mem_space) != TRUE) - HGOTO_ERROR(H5E_DATASPACE, H5E_BADRANGE, FAIL, "selection+offset not within extent") + /* Check for valid selection */ + if(H5S_SELECT_VALID(mem_space) != TRUE) + HGOTO_ERROR(H5E_DATASPACE, H5E_BADRANGE, FAIL, "selection+offset not within extent") } /* end if */ + if(H5S_ALL != file_space_id) { - if(NULL == (file_space = (const H5S_t *)H5I_object_verify(file_space_id, H5I_DATASPACE))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a data space") + if(NULL == (file_space = (const H5S_t *)H5I_object_verify(file_space_id, H5I_DATASPACE))) + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a data space") - /* Check for valid selection */ - if(H5S_SELECT_VALID(file_space) != TRUE) - HGOTO_ERROR(H5E_DATASPACE, H5E_BADRANGE, FAIL, "selection+offset not within extent") + /* Check for valid selection */ + if(H5S_SELECT_VALID(file_space) != TRUE) + HGOTO_ERROR(H5E_DATASPACE, H5E_BADRANGE, FAIL, "selection+offset not within extent") } /* end if */ /* Get the default dataset transfer property list if the user didn't provide one */ @@ -166,9 +171,55 @@ H5Dread(hid_t dset_id, hid_t mem_type_id, hid_t mem_space_id, if(TRUE != H5P_isa_class(plist_id, H5P_DATASET_XFER)) HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not xfer parms") - /* read raw data */ - if(H5D__read(dset, mem_type_id, mem_space, file_space, plist_id, buf/*out*/) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_READERROR, FAIL, "can't read data") + /* Get the dataset transfer property list */ + if(NULL == (plist = (H5P_genplist_t *)H5I_object(plist_id))) + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a dataset transfer property list") + + /* Retrieve the 'direct read' flag */ + if(H5P_get(plist, H5D_XFER_DIRECT_CHUNK_READ_FLAG_NAME, &direct_read) < 0) + HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "error getting flag for direct chunk read") + + if(direct_read) { + unsigned u; + hsize_t dims[H5O_LAYOUT_NDIMS]; + hsize_t internal_offset[H5O_LAYOUT_NDIMS]; + + if(H5D_CHUNKED != dset->shared->layout.type) + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a chunked dataset") + + /* Get the direct chunk offset property */ + if(H5P_get(plist, H5D_XFER_DIRECT_CHUNK_READ_OFFSET_NAME, &direct_offset) < 0) + HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "error getting direct offset from xfer properties") + + /* The library's chunking code requires the offset terminates with a zero. So transfer the + * offset array to an internal offset array */ + for(u = 0; u < dset->shared->ndims; u++) { + /* Make sure the offset doesn't exceed the dataset's dimensions */ + if(direct_offset[u] > dset->shared->curr_dims[u]) + HGOTO_ERROR(H5E_DATASPACE, H5E_BADTYPE, FAIL, "offset exceeds dimensions of dataset") + + /* Make sure the offset fall right on a chunk's boundary */ + if(direct_offset[u] % dset->shared->layout.u.chunk.dim[u]) + HGOTO_ERROR(H5E_DATASPACE, H5E_BADTYPE, FAIL, "offset doesn't fall on chunks's boundary") + + internal_offset[u] = direct_offset[u]; + } /* end for */ + + /* Terminate the offset with a zero */ + internal_offset[dset->shared->ndims] = 0; + + /* Read the raw chunk */ + if(H5D__chunk_direct_read(dset, plist_id, internal_offset, &direct_filters, buf) < 0) + HGOTO_ERROR(H5E_DATASET, H5E_READERROR, FAIL, "can't read chunk directly") + /* Set the chunk filter mask property */ + if(H5P_set(plist, H5D_XFER_DIRECT_CHUNK_READ_FILTERS_NAME, &direct_filters) < 0) + HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "error setting filter mask xfer property") + } + else { + /* read raw data */ + if(H5D__read(dset, mem_type_id, mem_space, file_space, plist_id, buf/*out*/) < 0) + HGOTO_ERROR(H5E_DATASET, H5E_READERROR, FAIL, "can't read data") + } done: FUNC_LEAVE_API(ret_value) @@ -245,28 +296,28 @@ H5Dwrite(hid_t dset_id, hid_t mem_type_id, hid_t mem_space_id, /* Check dataspace selections if this is not a direct write */ if(!direct_write) { if(mem_space_id < 0 || file_space_id < 0) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a dataspace") - - if(H5S_ALL != mem_space_id) { - if(NULL == (mem_space = (const H5S_t *)H5I_object_verify(mem_space_id, H5I_DATASPACE))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a dataspace") - - /* Check for valid selection */ - if(H5S_SELECT_VALID(mem_space) != TRUE) - HGOTO_ERROR(H5E_DATASPACE, H5E_BADRANGE, FAIL, "memory selection+offset not within extent") - } /* end if */ - if(H5S_ALL != file_space_id) { - if(NULL == (file_space = (const H5S_t *)H5I_object_verify(file_space_id, H5I_DATASPACE))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a dataspace") - - /* Check for valid selection */ - if(H5S_SELECT_VALID(file_space) != TRUE) - HGOTO_ERROR(H5E_DATASPACE, H5E_BADRANGE, FAIL, "file selection+offset not within extent") - } /* end if */ + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a dataspace") + + if(H5S_ALL != mem_space_id) { + if(NULL == (mem_space = (const H5S_t *)H5I_object_verify(mem_space_id, H5I_DATASPACE))) + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a dataspace") + + /* Check for valid selection */ + if(H5S_SELECT_VALID(mem_space) != TRUE) + HGOTO_ERROR(H5E_DATASPACE, H5E_BADRANGE, FAIL, "memory selection+offset not within extent") + } /* end if */ + if(H5S_ALL != file_space_id) { + if(NULL == (file_space = (const H5S_t *)H5I_object_verify(file_space_id, H5I_DATASPACE))) + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a dataspace") + + /* Check for valid selection */ + if(H5S_SELECT_VALID(file_space) != TRUE) + HGOTO_ERROR(H5E_DATASPACE, H5E_BADRANGE, FAIL, "file selection+offset not within extent") + } /* end if */ } if(H5D__pre_write(dset, direct_write, mem_type_id, mem_space, file_space, dxpl_id, buf) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_WRITEERROR, FAIL, "can't prepare for writing data") + HGOTO_ERROR(H5E_DATASET, H5E_WRITEERROR, FAIL, "can't prepare for writing data") done: FUNC_LEAVE_API(ret_value) @@ -300,15 +351,15 @@ H5D__pre_write(H5D_t *dset, hbool_t direct_write, hid_t mem_type_id, uint32_t direct_filters; hsize_t *direct_offset; uint32_t direct_datasize; - hsize_t internal_offset[H5O_LAYOUT_NDIMS]; - unsigned u; /* Local index variable */ + hsize_t internal_offset[H5O_LAYOUT_NDIMS]; + unsigned u; /* Local index variable */ /* Get the dataset transfer property list */ if(NULL == (plist = (H5P_genplist_t *)H5I_object(dxpl_id))) HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a dataset transfer property list") if(H5D_CHUNKED != dset->shared->layout.type) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a chunked dataset") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a chunked dataset") /* Retrieve parameters for direct chunk write */ if(H5P_get(plist, H5D_XFER_DIRECT_CHUNK_WRITE_FILTERS_NAME, &direct_filters) < 0) @@ -318,19 +369,19 @@ H5D__pre_write(H5D_t *dset, hbool_t direct_write, hid_t mem_type_id, if(H5P_get(plist, H5D_XFER_DIRECT_CHUNK_WRITE_DATASIZE_NAME, &direct_datasize) < 0) HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "error getting data size for direct chunk write") - /* The library's chunking code requires the offset terminates with a zero. So transfer the + /* The library's chunking code requires the offset terminates with a zero. So transfer the * offset array to an internal offset array */ - for(u = 0; u < dset->shared->ndims; u++) { - /* Make sure the offset doesn't exceed the dataset's dimensions */ + for(u = 0; u < dset->shared->ndims; u++) { + /* Make sure the offset doesn't exceed the dataset's dimensions */ if(direct_offset[u] > dset->shared->curr_dims[u]) - HGOTO_ERROR(H5E_DATASPACE, H5E_BADTYPE, FAIL, "offset exceeds dimensions of dataset") + HGOTO_ERROR(H5E_DATASPACE, H5E_BADTYPE, FAIL, "offset exceeds dimensions of dataset") /* Make sure the offset fall right on a chunk's boundary */ - if(direct_offset[u] % dset->shared->layout.u.chunk.dim[u]) - HGOTO_ERROR(H5E_DATASPACE, H5E_BADTYPE, FAIL, "offset doesn't fall on chunks's boundary") + if(direct_offset[u] % dset->shared->layout.u.chunk.dim[u]) + HGOTO_ERROR(H5E_DATASPACE, H5E_BADTYPE, FAIL, "offset doesn't fall on chunks's boundary") - internal_offset[u] = direct_offset[u]; - } /* end for */ + internal_offset[u] = direct_offset[u]; + } /* end for */ /* Terminate the offset with a zero */ internal_offset[dset->shared->ndims] = 0; @@ -342,7 +393,7 @@ H5D__pre_write(H5D_t *dset, hbool_t direct_write, hid_t mem_type_id, else { /* Normal write */ /* write raw data */ if(H5D__write(dset, mem_type_id, mem_space, file_space, dxpl_id, buf) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_WRITEERROR, FAIL, "can't write data") + HGOTO_ERROR(H5E_DATASET, H5E_WRITEERROR, FAIL, "can't write data") } /* end else */ done: diff --git a/src/H5Dpkg.h b/src/H5Dpkg.h index 8a4711f..b123b81 100644 --- a/src/H5Dpkg.h +++ b/src/H5Dpkg.h @@ -578,6 +578,7 @@ H5_DLL herr_t H5D__get_space_status(H5D_t *dset, H5D_space_status_t *allocation, H5_DLL herr_t H5D__alloc_storage(const H5D_io_info_t *io_info, H5D_time_alloc_t time_alloc, hbool_t full_overwrite, hsize_t old_dim[]); H5_DLL herr_t H5D__get_storage_size(H5D_t *dset, hid_t dxpl_id, hsize_t *storage_size); +H5_DLL herr_t H5D__get_chunk_storage_size(H5D_t *dset, hid_t dxpl_id, const hsize_t *offset, hsize_t *storage_size); H5_DLL haddr_t H5D__get_offset(const H5D_t *dset); H5_DLL void *H5D__vlen_get_buf_size_alloc(size_t size, void *info); H5_DLL herr_t H5D__vlen_get_buf_size(void *elem, hid_t type_id, unsigned ndim, @@ -685,6 +686,8 @@ H5_DLL herr_t H5D__chunk_delete(H5F_t *f, hid_t dxpl_id, H5O_t *oh, H5O_storage_t *store); H5_DLL herr_t H5D__chunk_direct_write(const H5D_t *dset, hid_t dxpl_id, uint32_t filters, hsize_t *offset, uint32_t data_size, const void *buf); +H5_DLL herr_t H5D__chunk_direct_read(const H5D_t *dset, hid_t dxpl_id, hsize_t *offset, + uint32_t *filters, void *buf); #ifdef H5D_CHUNK_DEBUG H5_DLL herr_t H5D__chunk_stats(const H5D_t *dset, hbool_t headers); #endif /* H5D_CHUNK_DEBUG */ diff --git a/src/H5Dpublic.h b/src/H5Dpublic.h index fe408b2..baa844a 100644 --- a/src/H5Dpublic.h +++ b/src/H5Dpublic.h @@ -40,6 +40,11 @@ #define H5D_XFER_DIRECT_CHUNK_WRITE_FILTERS_NAME "direct_chunk_filters" #define H5D_XFER_DIRECT_CHUNK_WRITE_OFFSET_NAME "direct_chunk_offset" #define H5D_XFER_DIRECT_CHUNK_WRITE_DATASIZE_NAME "direct_chunk_datasize" + +/* Property names for H5LTDdirect_chunk_read */ +#define H5D_XFER_DIRECT_CHUNK_READ_FLAG_NAME "direct_chunk_read_flag" +#define H5D_XFER_DIRECT_CHUNK_READ_OFFSET_NAME "direct_chunk_read_offset" +#define H5D_XFER_DIRECT_CHUNK_READ_FILTERS_NAME "direct_chunk_read_filters" /*******************/ /* Public Typedefs */ @@ -146,6 +151,7 @@ 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); 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 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*/); diff --git a/src/H5Pdxpl.c b/src/H5Pdxpl.c index fdb402f..3c53c15 100644 --- a/src/H5Pdxpl.c +++ b/src/H5Pdxpl.c @@ -169,6 +169,13 @@ #define H5D_XFER_DIRECT_CHUNK_WRITE_OFFSET_DEF NULL #define H5D_XFER_DIRECT_CHUNK_WRITE_DATASIZE_SIZE sizeof(uint32_t) #define H5D_XFER_DIRECT_CHUNK_WRITE_DATASIZE_DEF 0 +/* Definitions for properties of direct chunk read */ +#define H5D_XFER_DIRECT_CHUNK_READ_FLAG_SIZE sizeof(hbool_t) +#define H5D_XFER_DIRECT_CHUNK_READ_FLAG_DEF FALSE +#define H5D_XFER_DIRECT_CHUNK_READ_FILTERS_SIZE sizeof(uint32_t) +#define H5D_XFER_DIRECT_CHUNK_READ_FILTERS_DEF 0 +#define H5D_XFER_DIRECT_CHUNK_READ_OFFSET_SIZE sizeof(hsize_t *) +#define H5D_XFER_DIRECT_CHUNK_READ_OFFSET_DEF NULL /* Ring type - private property */ #define H5AC_XFER_RING_SIZE sizeof(unsigned) #define H5AC_XFER_RING_DEF H5AC_RING_USER @@ -293,6 +300,9 @@ static const hbool_t H5D_def_direct_chunk_flag_g = H5D_XFER_DIRECT_CHUNK_WRITE_F static const uint32_t H5D_def_direct_chunk_filters_g = H5D_XFER_DIRECT_CHUNK_WRITE_FILTERS_DEF; /* Default value for the filters of direct chunk write */ static const hsize_t *H5D_def_direct_chunk_offset_g = H5D_XFER_DIRECT_CHUNK_WRITE_OFFSET_DEF; /* Default value for the offset of direct chunk write */ static const uint32_t H5D_def_direct_chunk_datasize_g = H5D_XFER_DIRECT_CHUNK_WRITE_DATASIZE_DEF; /* Default value for the datasize of direct chunk write */ +static const hbool_t direct_chunk_read_flag = H5D_XFER_DIRECT_CHUNK_READ_FLAG_DEF; /* Default value for the flag of direct chunk read */ +static const hsize_t *direct_chunk_read_offset = H5D_XFER_DIRECT_CHUNK_READ_OFFSET_DEF; /* Default value for the offset of direct chunk read */ +static const uint32_t direct_chunk_read_filters = H5D_XFER_DIRECT_CHUNK_READ_FILTERS_DEF; /* Default value for the filters of direct chunk read */ static const H5AC_ring_t H5D_ring_g = H5AC_XFER_RING_DEF; /* Default value for the cache entry ring type */ #ifdef H5_DEBUG_BUILD static const H5FD_dxpl_type_t H5D_dxpl_type_g = H5FD_NOIO_DXPL; /* Default value for the dxpl type */ @@ -497,6 +507,24 @@ H5P__dxfr_reg_prop(H5P_genclass_t *pclass) NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL) < 0) HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL, "can't insert property into class") + /* Register the property of flag for direct chunk read */ + /* (Note: this property should not have an encode/decode callback) */ + if(H5P_register_real(pclass, H5D_XFER_DIRECT_CHUNK_READ_FLAG_NAME, H5D_XFER_DIRECT_CHUNK_READ_FLAG_SIZE, &direct_chunk_read_flag, + NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL) < 0) + HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL, "can't insert property into class") + + /* Register the property of filter for direct chunk read */ + /* (Note: this property should not have an encode/decode callback) */ + if(H5P_register_real(pclass, H5D_XFER_DIRECT_CHUNK_READ_FILTERS_NAME, H5D_XFER_DIRECT_CHUNK_READ_FILTERS_SIZE, &direct_chunk_read_filters, + NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL) < 0) + HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL, "can't insert property into class") + + /* Register the property of offset for direct chunk read */ + /* (Note: this property should not have an encode/decode callback) */ + if(H5P_register_real(pclass, H5D_XFER_DIRECT_CHUNK_READ_OFFSET_NAME, H5D_XFER_DIRECT_CHUNK_READ_OFFSET_SIZE, &direct_chunk_read_offset, + NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL) < 0) + HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL, "can't insert property into class") + /* Register the ring property (private) */ if(H5P_register_real(pclass, H5AC_RING_NAME, H5AC_XFER_RING_SIZE, &H5D_ring_g, NULL, NULL, NULL, H5AC_XFER_RING_ENC, H5AC_XFER_RING_DEC, -- cgit v0.12 From ae05b0c726f565a13aed9a8edeefb39299c1ca6d Mon Sep 17 00:00:00 2001 From: Vailin Choi Date: Wed, 26 Apr 2017 14:00:34 -0500 Subject: Modifications based on pull request review. Made couple changes based on the review comments. --- hl/src/H5DO.c | 4 ++-- src/H5D.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/hl/src/H5DO.c b/hl/src/H5DO.c index 22d40fc..99cf2f7 100644 --- a/hl/src/H5DO.c +++ b/hl/src/H5DO.c @@ -94,7 +94,7 @@ done: ret_value = FAIL; } - return(ret_value); + return ret_value; } /* end H5DOwrite_chunk() */ @@ -163,7 +163,7 @@ done: ret_value = FAIL; } - return(ret_value); + return ret_value; } /* end H5DOread_chunk() */ diff --git a/src/H5D.c b/src/H5D.c index a6de952..fc2024a 100644 --- a/src/H5D.c +++ b/src/H5D.c @@ -1126,4 +1126,4 @@ H5Dget_chunk_storage_size(hid_t dset_id, const hsize_t *offset, hsize_t *chunk_n done: FUNC_LEAVE_API(ret_value); -} +} /* H5Dget_chunk_storage_size() */ -- cgit v0.12 From 4fb75982b1c1f896d5d42798fb5a253ffe008166 Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Thu, 27 Apr 2017 08:52:34 -0500 Subject: Change position of declaration to top of block --- src/H5Dchunk.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/H5Dchunk.c b/src/H5Dchunk.c index 4905a70..2523c5d 100644 --- a/src/H5Dchunk.c +++ b/src/H5Dchunk.c @@ -684,10 +684,11 @@ H5D__get_chunk_storage_size(H5D_t *dset, hid_t dxpl_id, const hsize_t *offset, h if( dset->shared->dcpl_cache.pline.nused > 0 ) { /* Check if the requested chunk exists in the chunk cache */ if(UINT_MAX != udata.idx_hint) { + H5D_rdcc_ent_t *ent = rdcc->slot[udata.idx_hint]; + /* Sanity checks */ HDassert(udata.idx_hint < rdcc->nslots); HDassert(rdcc->slot[udata.idx_hint]); - H5D_rdcc_ent_t *ent = rdcc->slot[udata.idx_hint]; /* If the cached chunk is dirty, it must be flushed to get accurate size */ if( ent->dirty == TRUE ) { -- cgit v0.12 From 1a4bda1bd824df2da1e8c3441881fb7fca6a4413 Mon Sep 17 00:00:00 2001 From: Dana Robinson Date: Thu, 27 Apr 2017 15:18:18 -0400 Subject: Set the HDF5_GENERATE_HEADERS CMake option to default to ON and removed the option from the CMake cache init files. Fixes HDFFV-10184 --- config/cmake/cacheinit.cmake | 2 -- config/cmake/mccacheinit.cmake | 2 -- release_docs/INSTALL_CMake.txt | 3 +-- src/CMakeLists.txt | 2 +- 4 files changed, 2 insertions(+), 7 deletions(-) diff --git a/config/cmake/cacheinit.cmake b/config/cmake/cacheinit.cmake index c923283..6a66c8a 100644 --- a/config/cmake/cacheinit.cmake +++ b/config/cmake/cacheinit.cmake @@ -17,8 +17,6 @@ set (CMAKE_INSTALL_FRAMEWORK_PREFIX "Library/Frameworks" CACHE STRING "Frameworks installation directory" FORCE) -set (HDF5_GENERATE_HEADERS ON CACHE BOOL "Rebuild Generated Files" FORCE) - set (HDF_PACKAGE_EXT "" CACHE STRING "Name of HDF package extension" FORCE) set (HDF5_BUILD_FORTRAN ON CACHE BOOL "Build FORTRAN support" FORCE) diff --git a/config/cmake/mccacheinit.cmake b/config/cmake/mccacheinit.cmake index 1f60a01..3f0dd4f 100644 --- a/config/cmake/mccacheinit.cmake +++ b/config/cmake/mccacheinit.cmake @@ -17,8 +17,6 @@ set (CMAKE_INSTALL_FRAMEWORK_PREFIX "Library/Frameworks" CACHE STRING "Frameworks installation directory" FORCE) -set (HDF5_GENERATE_HEADERS ON CACHE BOOL "Rebuild Generated Files" FORCE) - set (BUILD_SHARED_LIBS OFF CACHE BOOL "Build Shared Libraries" FORCE) set (BUILD_TESTING ON CACHE BOOL "Build HDF5 Unit Testing" FORCE) diff --git a/release_docs/INSTALL_CMake.txt b/release_docs/INSTALL_CMake.txt index 4c4460e..7cb0225 100644 --- a/release_docs/INSTALL_CMake.txt +++ b/release_docs/INSTALL_CMake.txt @@ -396,7 +396,6 @@ These five steps are described in detail below. # EXTERNAL cache entries ######################## set (CMAKE_INSTALL_FRAMEWORK_PREFIX "Library/Frameworks" CACHE STRING "Frameworks installation directory" FORCE) - set (HDF5_GENERATE_HEADERS ON CACHE BOOL "Rebuild Generated Files" FORCE) set (HDF_PACKAGE_EXT "" CACHE STRING "Name of HDF package extension" FORCE) set (HDF5_BUILD_FORTRAN ON CACHE BOOL "Build FORTRAN support" FORCE) set (HDF5_BUILD_GENERATORS OFF CACHE BOOL "Build Test Generators" FORCE) @@ -592,7 +591,7 @@ HDF5_ENABLE_LARGE_FILE "Enable support for large (64-bit) files on Linux HDF5_ENABLE_PARALLEL "Enable parallel build (requires MPI)" OFF HDF5_ENABLE_TRACE "Enable API tracing capability" OFF HDF5_ENABLE_USING_MEMCHECKER "Indicate that a memory checker is used" OFF -HDF5_GENERATE_HEADERS "Rebuild Generated Files" OFF +HDF5_GENERATE_HEADERS "Rebuild Generated Files" ON HDF5_JAVA_PACK_JRE "Package a JRE installer directory" OFF HDF5_MEMORY_ALLOC_SANITY_CHECK "Indicate that internal memory allocation sanity checks are enabled" OFF HDF5_METADATA_TRACE_FILE "Enable metadata trace file collection" OFF diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index e2acd30..178c954 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -816,7 +816,7 @@ set (H5_GENERATED_HEADERS ${HDF5_SRC_DIR}/H5overflow.h ) -option (HDF5_GENERATE_HEADERS "Rebuild Generated Files" OFF) +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) -- cgit v0.12 From 5cde315a061d789ea9539265f96ec65454454983 Mon Sep 17 00:00:00 2001 From: lrknox Date: Thu, 4 May 2017 17:14:38 -0500 Subject: Update release_docs/HISTORY-1_10.txt and RELEASE.txt after HDF5 1.10.1 release. --- release_docs/HISTORY-1_10.txt | 734 ++++++++++++++++++++++++++++++++++++++++++ release_docs/RELEASE.txt | 248 +++----------- 2 files changed, 781 insertions(+), 201 deletions(-) diff --git a/release_docs/HISTORY-1_10.txt b/release_docs/HISTORY-1_10.txt index 03d0e3e..52eb273 100644 --- a/release_docs/HISTORY-1_10.txt +++ b/release_docs/HISTORY-1_10.txt @@ -3,11 +3,745 @@ HDF5 History This file contains development history of the HDF5 1.10 branch +03. Release Information for hdf5-1.10.1 02. Release Information for hdf5-1.10.0-patch1 01. Release Information for hdf5-1.10.0 [Search on the string '%%%%' for section breaks of each release.] +%%%%1.10.1%%%% + +HDF5 version 1.10.1 released on 2017-04-27 +================================================================================ + +INTRODUCTION + +This document describes the differences between HDF5-1.10.0-patch1 and +HDF5 1.10.1, and contains information on the platforms tested and known +problems in HDF5-1.10.1. For more details check the HISTORY*.txt files +in the HDF5 source. + +Links to HDF5 1.10.1 source code, documentation, and additional materials can +be found on The HDF5 web page at: + + https://support.hdfgroup.org/HDF5/ + +The HDF5 1.10.1 release can be obtained from: + + https://support.hdfgroup.org/HDF5/release/obtain5.html + +User documentation for the snapshot can be accessed directly at this location: + + https://support.hdfgroup.org/HDF5/doc/ + +New features in the HDF5-1.10.x release series, including brief general +descriptions of some new and modified APIs, are described in the "New Features +in HDF5 Release 1.10" document: + + https://support.hdfgroup.org/HDF5/docNewFeatures/index.html + +All new and modified APIs are listed in detail in the "HDF5 Software Changes +from Release to Release" document, in the section "Release 10.1 (current +release) versus Release 1.10.0 + + https://support.hdfgroup.org/HDF5/doc/ADGuide/Changes.html + +If you have any questions or comments, please send them to the HDF Help Desk: + + help@hdfgroup.org + + +CONTENTS + +- Major New Features Introduced in HDF5 1.10.1 +- Other New Features and Enhancements +- Support for New Platforms, Languages, and Compilers +- Bug Fixes since HDF5-1.10.0-patch1 +- Supported Platforms +- Tested Configuration Features Summary +- More Tested Platforms +- Known Problems + + +Major New Features Introduced in HDF5 1.10.1 +============================================ + +For links to the RFCs and documentation in this section please view +https://support.hdfgroup.org/HDF5/docNewFeatures in a web browser. + +________________________________________ +Metadata Cache Image +________________________________________ + + HDF5 metadata is typically small, and scattered throughout the HDF5 file. + This can affect performance, particularly on large HPC systems. The + Metadata Cache Image feature can improve performance by writing the + metadata cache in a single block on file close, and then populating the + cache with the contents of this block on file open, thus avoiding the many + small I/O operations that would otherwise be required on file open and + close. See the RFC for complete details regarding this feature. Also, + see the Fine Tuning the Metadata Cache documentation. + + At present, metadata cache images may not be generated by parallel + applications. Parallel applications can read files with metadata cache + images, but since this is a collective operation, a deadlock is possible + if one or more processes do not participate. + +________________________________________ +Metadata Cache Evict on Close +________________________________________ + + The HDF5 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. 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 from any other open object. See the Fine Tuning the + Metadata Cache documentation for information on the APIs. + + At present, evict on close is disabled in parallel builds. + +________________________________________ +Paged Aggregation +________________________________________ + + The current HDF5 file space allocation accumulates small pieces of metadata + and raw data in aggregator blocks which are not page aligned and vary + widely in sizes. The paged aggregation feature was implemented to provide + efficient paged access of these small pieces of metadata and raw data. + See the RFC for details. Also, see the File Space Management documentation. + +________________________________________ +Page Buffering +________________________________________ + + Small and random I/O accesses on parallel file systems result in poor + performance for applications. Page buffering in conjunction with paged + aggregation can improve performance by giving an application control of + minimizing HDF5 I/O requests to a specific granularity and alignment. + See the RFC for details. Also, see the Page Buffering documentation. + + At present, page buffering is disabled in parallel builds. + + + +Other New Features and Enhancements +=================================== + + Library + ------- + - Added a mechanism for disabling the SWMR file locking scheme. + + The file locking calls used in HDF5 1.10.0 (including patch1) + will fail when the underlying file system does not support file + locking or where locks have been disabled. To disable all file + locking operations, an environment variable named + HDF5_USE_FILE_LOCKING can be set to the five-character string + 'FALSE'. This does not fundamentally change HDF5 library + operation (aside from initial file open/create, SWMR is lock-free), + but users will have to be more careful about opening files + to avoid problematic access patterns (i.e.: multiple writers) + that the file locking was designed to prevent. + + Additionally, the error message that is emitted when file lock + operations set errno to ENOSYS (typical when file locking has been + disabled) has been updated to describe the problem and potential + resolution better. + + (DER, 2016/10/26, HDFFV-9918) + + - The return type of H5Pget_driver_info() has been changed from void * + to const void *. + + The pointer returned by this function points to internal library + memory and should not be freed by the user. + + (DER, 2016/11/04, HDFFV-10017) + + - The direct I/O VFD has been removed from the list of VFDs that + support SWMR. + + This configuration was never officially tested and several SWMR + tests fail when this VFD is set. + + (DER, 2016/11/03, HDFFV-10169) + + Configuration: + -------------- + - The minimum version of CMake required to build HDF5 is now 3.2.2. + + (ADB, 2017/01/10) + + - An --enable/disable-developer-warnings option has been added to + configure. + + This disables warnings that do not indicate poor code quality such + as -Winline and gcc's -Wsuggest-attribute. Developer warnings are + disabled by default. + + (DER, 2017/01/10) + + - A bin/restore.sh script was added that reverts autogen.sh processing. + + (DER, 2016/11/08) + + - CMake: Added NAMESPACE hdf5:: to package configuration files to allow + projects using installed HDF5 binaries built with CMake to link with + them without specifying the HDF5 library location via IMPORTED_LOCATION. + + (ABD, 2016/10/17, HDFFV-10003) + + - CMake: Changed the CTEST_BUILD_CONFIGURATION option to + CTEST_CONFIGURATION_TYPE as recommended by the CMake documentation. + + (ABD, 2016/10/17, HDFFV-9971) + + + Fortran Library: + ---------------- + + - The HDF5 Fortran library can now be compiled with the NAG compiler. + + (MSB, 2017/2/10, HDFFV-9973) + + + C++ Library: + ------------ + + - The following C++ API wrappers have been added to the C++ Library: + + // Sets/Gets the strategy and the threshold value that the library + // will employ in managing file space. + FileCreatPropList::setFileSpaceStrategy - H5Pset_file_space_strategy + FileCreatPropList::getFileSpaceStrategy - H5Pget_file_space_strategy + + // Sets/Gets the file space page size for paged aggregation. + FileCreatPropList::setFileSpacePagesize - H5Pset_file_space_page_size + FileCreatPropList::getFileSpacePagesize - H5Pget_file_space_page_size + + // Checks if the given ID is valid. + IdComponent::isValid - H5Iis_valid + + // Sets/Gets the number of soft or user-defined links that can be + // traversed before a failure occurs. + LinkAccPropList::setNumLinks - H5Pset_nlinks + LinkAccPropList::getNumLinks - H5Pget_nlinks + + // Returns a copy of the creation property list of a datatype. + DataType::getCreatePlist - H5Tget_create_plist + + // Opens/Closes an object within a group or a file, regardless of object + // type + Group::getObjId - H5Oopen + Group::closeObjId - H5Oclose + + // Maps elements of a virtual dataset to elements of the source dataset. + DSetCreatPropList::setVirtual - H5Pset_virtual + + // Gets general information about this file. + H5File::getFileInfo - H5Fget_info2 + + // Returns the number of members in a type. + IdComponent::getNumMembers - H5Inmembers + + // Determines if an element type exists. + IdComponent::typeExists - H5Itype_exists + + // Determines if an object exists. + H5Location::exists - H5Lexists. + + // Returns the header version of an HDF5 object. + H5Object::objVersion - H5Oget_info for version + + (BMR, 2017/03/20, HDFFV-10004, HDFFV-10139, HDFFV-10145) + + - New exception: ObjHeaderIException for H5O interface. + + (BMR, 2017/03/15, HDFFV-10145) + + - New class LinkAccPropList for link access property list, to be used by + wrappers of H5Lexists. + + (BMR, 2017/01/04, HDFFV-10145) + + - New constructors to open datatypes in ArrayType, CompType, DataType, + EnumType, FloatType, IntType, StrType, and VarLenType. + + (BMR, 2016/12/26, HDFFV-10056) + + - New member functions: + + DSetCreatPropList::setNbit() to setup N-bit compression for a dataset. + + ArrayType::getArrayNDims() const + ArrayType::getArrayDims() const + both to replace the non-const versions. + + (BMR, 2016/04/25, HDFFV-8623, HDFFV-9725) + + + Tools: + ------ + - The following options have been added to h5clear: + -s: clear the status_flags field in the file's superblock + -m: Remove the metadata cache image from the file + + (QAK, 2017/03/22, PR#361) + + + High-Level APIs: + --------------- + - Added New Fortran 2003 API for h5tbmake_table_f. + + (MSB, 2017/02/10, HDFFV-8486) + + + +Support for New Platforms, Languages, and Compilers +=================================================== + + - Added NAG compiler + + + +Bug Fixes since HDF5-1.10.0-patch1 release +================================== + + Library + ------- + - Outdated data structure was used in H5D_CHUNK_DEBUG blocks, causing + compilation errors when H5D_CHUNK_DEBUG was defined. This is fixed. + + (BMR, 2017/04/04, HDFFV-8089) + + - SWMR implementation in the HDF5 1.10.0 and 1.10.0-patch1 releases has a + broken metadata flush dependency that manifested itself with the following + error at the end of the HDF5 error stack: + + H5Dint.c line 846 in H5D__swmr_setup(): dataspace chunk index must be 0 + for SWMR access, chunkno = 1 + major: Dataset + minor: Bad value + + It was also reported at https://github.com/areaDetector/ADCore/issues/203 + + The flush dependency is fixed in this release. + + - Changed the plugins dlopen option from RTLD_NOW to RTLD_LAZY + + (ABD, 2016/12/12, PR#201) + + - A number of issues were fixed when reading/writing from/to corrupted + files to ensure that the library fails gracefully in these cases: + + * Writing to a corrupted file that has an object message which is + incorrectly marked as sharable on disk results in a buffer overflow / + invalid write instead of a clean error message. + + * Decoding data from a corrupted file with a dataset encoded with the + H5Z_NBIT decoding can result in a code execution vulnerability under + the context of the application using the HDF5 library. + + * When decoding an array datatype from a corrupted file, the HDF5 library + fails to return an error in production if the number of dimensions + decoded is greater than the maximum rank. + + * When decoding an "old style" array datatype from a corrupted file, the + HDF5 library fails to return an error in production if the number of + dimensions decoded is greater than the maximum rank. + + (NAF, 2016/10/06, HDFFV-9950, HDFFV-9951, HDFFV-9992, HDFFV-9993) + + - Fixed an error that would occur when copying an object with an attribute + which is a compound datatype consisting of a variable length string. + + (VC, 2016/08/24, HDFFV-7991) + + - H5DOappend will no longer fail if a dataset has no append callback + registered. + + (VC, 2016/08/14, HDFFV-9960) + + - Fixed an issue where H5Pset_alignment could result in misaligned blocks + with some input combinations, causing an assertion failure in debug mode. + + (NAF, 2016/08/11, HDFFV-9948) + + - Fixed a problem where a plugin compiled into a DLL in the default plugin + directory could not be found by the HDF5 library at runtime on Windows + when the HDF5_PLUGIN_PATH environment variable was not set. + + (ABD, 2016/08/01, HDFFV-9706) + + - Fixed an error that would occur when calling H5Adelete on an attribute + which is attached to an externally linked object in the target file and + whose datatype is a committed datatype in the main file. + + (VC, 2016/07/06, HDFFV-9940) + + - (a) Throw an error instead of assertion when v1 btree level hits the 1 + byte limit. + (b) Modifications to better handle error recovery when conversion by + h5format_convert fails. + + (VC, 2016/05/29, HDFFV-9434) + + - Fixed a memory leak where an array used by the library to track SWMR + read retries was unfreed. + + The leaked memory was small (on the order of a few tens of ints) and + allocated per-file. The memory was allocated (and lost) only when a + file was opened for SWMR access. + + (DER, 2016/04/27, HDFFV-9786) + + - Fixed a memory leak that could occur when opening a file for the first + time (including creating) and the call fails. + + This occurred when the file-driver-specific info was not cleaned up. + The amount of memory leaked varied with the file driver, but would + normally be less than 1 kB. + + (DER, 2016/12/06, HDFFV-10168) + + - Fixed a failure in collective metadata writes. + + This failure only appeared when collective metadata writes + were enabled (via H5Pset_coll_metadata_write()). + + (JRM, 2017/04/10, HDFFV-10055) + + + Parallel Library + ---------------- + - Fixed a bug that could occur when allocating a chunked dataset in parallel + with an alignment set and an alignment threshold greater than the chunk + size but less than or equal to the raw data aggregator size. + + (NAF, 2016/08/11, HDFFV-9969) + + + Configuration + ------------- + - Configuration will check for the strtoll and strtoull functions + before using alternatives + + (ABD, 2017/03/17, PR#340) + + - CMake uses a Windows pdb directory variable if available and + will generate both static and shared pdb files. + + (ABD, 2017/02/06, HDFFV-9875) + + - CMake now builds shared versions of tools. + + (ABD, 2017/02/01, HDFFV-10123) + + - Makefiles and test scripts have been updated to correctly remove files + created when running "make check" and to avoid removing any files under + source control. In-source builds followed by "make clean" and "make + distclean" should result in the original source files. + (LRK, 2017/01/17, HDFFV-10099) + + - The tools directory has been divided into two separate source and test + directories. This resolves a build dependency and, as a result, + 'make check' will no longer fail in the tools directory if 'make' was + not executed first. + + (ABD, 2016/10/27, HDFFV-9719) + + - CMake: Fixed a timeout error that would occasionally occur when running + the virtual file driver tests simultaneously due to test directory + and file name collisions. + + (ABD, 2016/09/19, HDFFV-9431) + + - CMake: Fixed a command length overflow error by converting custom + commands inside CMakeTest.cmake files into regular dependencies and + targets. + + (ABD, 2016/07/12, HDFFV-9939) + + - Fixed a problem preventing HDF5 to be built on 32-bit CYGWIN by + condensing cygwin configuration files into a single file and + removing outdated compiler settings. + + (ABD, 2016/07/12, HDFFV-9946) + + + Fortran + -------- + - Changed H5S_ALL_F from INTEGER to INTEGER(HID_T) + + (MSB, 2016/10/14, HDFFV-9987) + + + Tools + ----- + - h5diff now correctly ignores strpad in comparing strings. + + (ABD, 2017/03/03, HDFFV-10128) + + - h5repack now correctly parses the command line filter options. + + (ABD, 2017/01/24, HDFFV-10046) + + - h5diff now correctly returns an error when it cannot read data due + to an unavailable filter plugin. + + (ADB 2017/01/18, HDFFV-9994 ) + + - Fixed an error in the compiler wrapper scripts (h5cc, h5fc, et al.) + in which they would erroneously drop the file argument specified via + the -o flag when the -o flag was specified before the -c flag on the + command line, resulting in a failure to compile. + + (LRK, 2016/11/04, HDFFV-9938, HDFFV-9530) + + - h5repack User Defined (UD) filter parameters were not parsed correctly. + + The UD filter parameters were not being parsed correctly. Reworked coding + section to parse the correct values and verify number of parameters. + + (ABD, 2016/10/19, HDFFV-9996, HDFFV-9974, HDFFV-9515, HDFFV-9039) + + - h5repack allows the --enable-error-stack option on the command line. + + (ADB, 2016/08/08, HDFFV-9775) + + + C++ APIs + -------- + - The member function H5Location::getNumObjs() is moved to + class Group because the objects are in a group or a file only, + and H5Object::getNumAttrs to H5Location to get the number of + attributes at a given location. + + (BMR, 2017/03/17, PR#466) + + - Due to the change in the C API, the overloaded functions of + PropList::setProperty now need const for some arguments. They are + planned for deprecation and are replaced by new versions with proper + consts. + + (BMR, 2017/03/17, PR#344) + + - The high-level API Packet Table (PT) did not write data correctly when + the datatype is a compound type that has string type as one of the + members. This problem started in 1.8.15, after the fix of HDFFV-9042 + was applied, which caused the Packet Table to use native type to access + the data. It should be up to the application to specify whether the + buffer to be read into memory is in the machine's native architecture. + Thus, the PT is fixed to not use native type but to make a copy of the + user's provided datatype during creation or the packet table's datatype + during opening. If an application wishes to use native type to read the + data, then the application will request that. However, the Packet Table + doesn't provide a way to specify memory datatype in this release. This + feature will be available in future releases. + + (BMR, 2016/10/27, HDFFV-9758) + + - The obsolete macros H5_NO_NAMESPACE and H5_NO_STD have been removed from + the HDF5 C++ API library. + + (BMR, 2016/10/23, HDFFV-9532) + + - The problem where a user-defined function cannot access both, attribute + and dataset, using only one argument is now fixed. + + (BMR, 2016/10/11, HDFFV-9920) + + - In-memory array information, ArrayType::rank and + ArrayType::dimensions, were removed. This is an implementation + detail and should not affect applications. + + (BMR, 2016/04/25, HDFFV-9725) + + + Testing + ------- + - Fixed a problem that caused tests using SWMR to occasionally fail when + running "make check" using parallel make. + + (LRK, 2016/03/22, PR#338, PR#346, PR#358) + + +Supported Platforms +=================== + + Linux 2.6.32-573.18.1.el6.ppc64 gcc (GCC) 4.4.7 20120313 (Red Hat 4.4.7-4) + #1 SMP ppc64 GNU/Linux g++ (GCC) 4.4.7 20120313 (Red Hat 4.4.7-4) + (ostrich) GNU Fortran (GCC) 4.4.7 20120313 + (Red Hat 4.4.7-4) + IBM XL C/C++ V13.1 + IBM XL Fortran V15.1 + + Linux 3.10.0-327.10.1.el7 GNU C (gcc), Fortran (gfortran), C++ (g++) + #1 SMP x86_64 GNU/Linux compilers: + (kituo/moohan) Version 4.8.5 20150623 (Red Hat 4.8.5-4) + Version 4.9.3, Version 5.2.0 + Intel(R) C (icc), C++ (icpc), Fortran (icc) + compilers: + Version 15.0.3.187 Build 20150407 + MPICH 3.1.4 compiled with GCC 4.9.3 + + SunOS 5.11 32- and 64-bit Sun C 5.12 SunOS_sparc + (emu) Sun Fortran 95 8.6 SunOS_sparc + Sun C++ 5.12 SunOS_sparc + + Windows 7 Visual Studio 2012 w/ Intel Fortran 15 (cmake) + Visual Studio 2013 w/ Intel Fortran 15 (cmake) + Visual Studio 2015 w/ Intel Fortran 16 (cmake) + + Windows 7 x64 Visual Studio 2012 w/ Intel Fortran 15 (cmake) + Visual Studio 2013 w/ Intel Fortran 15 (cmake) + Visual Studio 2015 w/ Intel Fortran 16 (cmake) + Visual Studio 2015 w/ MSMPI 8 (cmake) + Cygwin(CYGWIN_NT-6.1 2.8.0(0.309/5/3) + gcc and gfortran compilers (GCC 5.4.0) + (cmake and autotools) + + Windows 10 Visual Studio 2015 w/ Intel Fortran 16 (cmake) + Cygwin(CYGWIN_NT-6.1 2.8.0(0.309/5/3) + gcc and gfortran compilers (GCC 5.4.0) + (cmake and autotools) + + Windows 10 x64 Visual Studio 2015 w/ Intel Fortran 16 (cmake) + + Mac OS X Mt. Lion 10.8.5 Apple clang/clang++ version 5.1 from Xcode 5.1 + 64-bit gfortran GNU Fortran (GCC) 4.8.2 + (swallow/kite) Intel icc/icpc/ifort version 15.0.3 + + Mac OS X Mavericks 10.9.5 Apple clang/clang++ version 6.0 from Xcode 6.2 + 64-bit gfortran GNU Fortran (GCC) 4.9.2 + (wren/quail) Intel icc/icpc/ifort version 15.0.3 + + Mac OS X Yosemite 10.10.5 Apple clang/clang++ version 6.1 from Xcode 7.0 + 64-bit gfortran GNU Fortran (GCC) 4.9.2 + (osx1010dev/osx1010test) Intel icc/icpc/ifort version 15.0.3 + + Mac OS X El Capitan 10.11.6 Apple clang/clang++ version 7.3 from Xcode 7.3 + 64-bit gfortran GNU Fortran (GCC) 5.2.0 + (osx1010dev/osx1010test) Intel icc/icpc/ifort version 16.0.2 + + +Tested Configuration Features Summary +===================================== + + In the tables below + y = tested + n = not tested in this release + C = Cluster + W = Workstation + x = not working in this release + dna = does not apply + ( ) = footnote appears below second table + = testing incomplete on this feature or platform + +Platform C F90/ F90 C++ zlib SZIP + parallel F2003 parallel +Solaris2.11 32-bit n y/y n y y y +Solaris2.11 64-bit n y/n n y y y +Windows 7 y y/y n y y y +Windows 7 x64 y y/y y y y y +Windows 7 Cygwin n y/n n y y y +Windows 7 x64 Cygwin n y/n n y y y +Windows 10 y y/y n y y y +Windows 10 x64 y y/y n y y y +Mac OS X Mountain Lion 10.8.5 64-bit n y/y n y y y +Mac OS X Mavericks 10.9.5 64-bit n y/y n y y y +Mac OS X Yosemite 10.10.5 64-bit n y/y n y y y +Mac OS X El Capitan 10.11.6 64-bit n y/y n y y y +CentOS 7.2 Linux 2.6.32 x86_64 PGI n y/y n y y y +CentOS 7.2 Linux 2.6.32 x86_64 GNU y y/y y y y y +CentOS 7.2 Linux 2.6.32 x86_64 Intel n y/y n y y y +Linux 2.6.32-573.18.1.el6.ppc64 n y/y n y y y + + +Platform Shared Shared Shared Thread- + C libs F90 libs C++ libs safe +Solaris2.11 32-bit y y y y +Solaris2.11 64-bit y y y y +Windows 7 y y y y +Windows 7 x64 y y y y +Windows 7 Cygwin n n n y +Windows 7 x64 Cygwin n n n y +Windows 10 y y y y +Windows 10 x64 y y y y +Mac OS X Mountain Lion 10.8.5 64-bit y n y y +Mac OS X Mavericks 10.9.5 64-bit y n y y +Mac OS X Yosemite 10.10.5 64-bit y n y y +Mac OS X El Capitan 10.11.6 64-bit y n y y +CentOS 7.2 Linux 2.6.32 x86_64 PGI y y y n +CentOS 7.2 Linux 2.6.32 x86_64 GNU y y y y +CentOS 7.2 Linux 2.6.32 x86_64 Intel y y y n +Linux 2.6.32-573.18.1.el6.ppc64 y y y n + +Compiler versions for each platform are listed in the preceding +"Supported Platforms" table. + + +More Tested Platforms +===================== + +The following platforms are not supported but have been tested for this release. + + Linux 2.6.32-573.22.1.el6 GNU C (gcc), Fortran (gfortran), C++ (g++) + #1 SMP x86_64 GNU/Linux compilers: + (mayll/platypus) Version 4.4.7 20120313 + Version 4.8.4 + PGI C, Fortran, C++ for 64-bit target on + x86-64; + Version 16.10-0 + Intel(R) C (icc), C++ (icpc), Fortran (icc) + compilers: + Version 15.0.3.187 (Build 20150407) + MPICH 3.1.4 compiled with GCC 4.9.3 + + Linux 3.10.0-327.18.2.el7 GNU C (gcc) and C++ (g++) compilers + #1 SMP x86_64 GNU/Linux Version 4.8.5 20150623 (Red Hat 4.8.5-4) + (jelly) with NAG Fortran Compiler Release 6.1(Tozai) + Intel(R) C (icc) and C++ (icpc) compilers + Version 15.0.3.187 (Build 20150407) + with NAG Fortran Compiler Release 6.1(Tozai) + + Linux 2.6.32-573.18.1.el6.ppc64 MPICH mpich 3.1.4 compiled with + #1 SMP ppc64 GNU/Linux IBM XL C/C++ for Linux, V13.1 + (ostrich) and IBM XL Fortran for Linux, V15.1 + + Debian 8.4 3.16.0-4-amd64 #1 SMP Debian 3.16.36-1 x86_64 GNU/Linux + gcc, g++ (Debian 4.9.2-10) 4.9.2 + GNU Fortran (Debian 4.9.2-10) 4.9.2 + (cmake and autotools) + + Fedora 24 4.7.2-201.fc24.x86_64 #1 SMP x86_64 x86_64 x86_64 GNU/Linux + gcc, g++ (GCC) 6.1.1 20160621 + (Red Hat 6.1.1-3) + GNU Fortran (GCC) 6.1.1 20160621 + (Red Hat 6.1.1-3) + (cmake and autotools) + + Ubuntu 16.04.1 4.4.0-38-generic #57-Ubuntu SMP x86_64 GNU/Linux + gcc, g++ (Ubuntu 5.4.0-6ubuntu1~16.04.2) + 5.4.0 20160609 + GNU Fortran (Ubuntu 5.4.0-6ubuntu1~16.04.2) + 5.4.0 20160609 + (cmake and autotools) + + +Known Problems +============== + + At present, metadata cache images may not be generated by parallel + applications. Parallel applications can read files with metadata cache + images, but since this is a collective operation, a deadlock is possible + if one or more processes do not participate. + + 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. + + %%%%1.10.0-patch1%%%% diff --git a/release_docs/RELEASE.txt b/release_docs/RELEASE.txt index 6d96bd8..285dc8b 100644 --- a/release_docs/RELEASE.txt +++ b/release_docs/RELEASE.txt @@ -4,8 +4,8 @@ HDF5 version 1.10.2-snap0 currently under development INTRODUCTION -This document describes the differences between HDF5-1.10.0-patch1 and -HDF5 1.10.1, and contains information on the platforms tested and known problems in HDF5-1.10.1. +This document describes the differences between HDF5-1.10.1 and HDF5 1.10.2, and +contains information on the platforms tested and known problems in HDF5-1.10.1. For more details check the HISTORY*.txt files in the HDF5 source. @@ -15,23 +15,23 @@ Links to HDF5 1.10.1 source code, documentation, and additional materials can be The HDF5 1.10.1 release can be obtained from: - https://support.hdfgroup.org/HDF5/release/obtain5110.html + https://support.hdfgroup.org/HDF5/release/obtain5.html User documentation for the snapshot can be accessed directly at this location: - https://support.hdfgroup.org/HDF5/doc1.10/ + https://support.hdfgroup.org/HDF5/doc/ New features in the HDF5-1.10.x release series, including brief general -descriptions of some new and modified APIs, are described in the "What's New -in 1.10.1?" document: +descriptions of some new and modified APIs, are described in the "New Features +in HDF5 1.10" document: - https://support.hdfgroup.org/HDF5/doc/ADGuide/WhatsNew1101.html +https://support.hdfgroup.org/HDF5/docNewFeatures/index.html All new and modified APIs are listed in detail in the "HDF5 Software Changes -from Release to Release" document, in the section "Release 1.8.19 (current -release) versus Release 1.10.1 +from Release to Release" document, in the section "Release 1.10.1 (current +release) versus Release 1.10.0 - https://support.hdfgroup.org/HDF5/doc1.10/ADGuide/Changes.html + https://support.hdfgroup.org/HDF5/doc/ADGuide/Changes.html If you have any questions or comments, please send them to the HDF Help Desk: @@ -54,37 +54,11 @@ New Features Configuration: ------------- - - CMake minimum is now 3.2.2. - (ADB 2017/01/10) - - - Tools folder is separated into source and test folders. This - allows autotools to skip the make command and just execute - the make check command. - (HDFFV-9719 ADB 2016/10/27) + - Library: -------- - - Paged Aggregation - - This is one of the file space management strategies. This strategy - aggregates small metadata and raw data allocations into constant-sized - well-aligned pages, which are suitable for page caching. Paged - aggregation together with the page buffering feature will allow efficient - I/O accesses. - - - Page Buffering - - The page buffering layer in the HDF5 library absorbs small accesses to - the file system. Each page in memory corresponds to a page allocated in - the file. Access to the file system is then performed as a single page - or multiple of pages, if they are contiguous. This ensures that small - accesses to the file system are avoided while providing another caching - layer for improved I/O performance. This feature works in conjunction - with the paged aggregation feature. - - - Filter plugin API added to access the table of paths to search for a - library. Java interface expanded with wrappers for the new functions. - (HDFFV-10143 ADB 2017/04/04) + - Parallel Library: ----------------- @@ -96,84 +70,19 @@ New Features C++ Library: ------------ - - New wrappers for C APIs: - (HDFFV-10004, HDFFV-10139, HDFFV-10145 - PRs #209, #232, #310, #334, #348) - - // Sets/Gets the strategy and the threshold value that the library will - // will employ in managing file space. - FileCreatPropList::setFileSpaceStrategy - H5Pset_file_space_strategy - FileCreatPropList::getFileSpaceStrategy - H5Pget_file_space_strategy - - // Sets/Gets the file space page size for paged aggregation. - FileCreatPropList::setFileSpacePagesize - H5Pset_file_space_page_size - FileCreatPropList::getFileSpacePagesize - H5Pget_file_space_page_size - - // Checks if the given ID is valid. - IdComponent::isValid - H5Iis_valid - - // Sets/Gets the number of soft or user-defined links that can be - // traversed before a failure occurs. - LinkAccPropList::setNumLinks - H5Pset_nlinks - LinkAccPropList::getNumLinks - H5Pget_nlinks - - // Returns a copy of the creation property list of a datatype. - DataType::getCreatePlist - H5Tget_create_plist - - // Opens/Closes an object within a group or a file, regardless object type - Group::getObjId - H5Oopen - Group::closeObjId - H5Oclose - - // Maps elements of a virtual dataset to elements of the source dataset. - DSetCreatPropList::setVirtual - H5Pset_virtual - - // Gets general information about this file. - H5File::getFileInfo - H5Fget_info2 - - // Returns the number of members in a type. - IdComponent::getNumMembers - H5Inmembers - - // Determines if an element type exists. - IdComponent::typeExists - H5Itype_exists - - // Determines if an object exists. - H5Location::exists - H5Lexists. - - // Returns the header version of an HDF5 object. - H5Object::objVersion - H5Oget_info for version - -BMR, 2017/03/20 - - - New exception: ObjHeaderIException for H5O interface. - (HDFFV-10145 - PR #334) -BMR, 2017/03/15 - - - New class LinkAccPropList for link access property list, to be used by - wrappers of H5Lexists. (HDFFV-10145 - PR #232) -BMR, 2017/01/04 - - - New constructors to open datatypes in ArrayType, CompType, DataType, - EnumType, FloatType, IntType, StrType, and VarLenType. - (HDFFV-10056 - PR #209) -BMR, 2016/12/26 - - - New member functions - DSetCreatPropList::setNbit() to setup N-bit compression for a dataset. - (HDFFV-8623 patch 7) -BMR, 2016/04/25 - - ArrayType::getArrayNDims() const - ArrayType::getArrayDims() const - both to replace the non-const versions. (HDFFV-9725) -BMR, 2016/04/25 - + - Tools: ------ - - Add options to h5clear: - -s: clear the status_flags field in the file's superblock - -m: Remove the metadata cache image from the file - (Pull Request #361 QK 2017/03/22) + - High-Level APIs: --------------- + - C Packet Table API ------------------ - - + - Internal header file -------------------- @@ -181,6 +90,7 @@ New Features Documentation ------------- + - Support for new platforms, languages and compilers. ======================================= @@ -191,57 +101,15 @@ Bug Fixes since HDF5-1.10.0-patch1 release Library ------- - - Changed the plugins dlopen option from RTLD_NOW to RTLD_LAZY - (PR 201 ADB 2016/12/12) - - - Fix error when copying dataset with attribute which is a compound datatype - consisting of a variable length string. - (HDFFV-7991 VC 2016/08/19, 2016/08/21, 2016/08/24) - - - H5DOappend will not fail if a dataset has no append callback registered. - (HDFFV-9960 VC 2016/08/05, 2016/08/14) - - - Fix the problem where the committed datatype's file location is different - from the file location of an attribute with that committed datatype. - (HDFFV-9940 VC 2016/07/03, 2016/07/06) - - - (a) Throw an error instead of assertion when v1 btree level hits the 1 byte limit. - (b) Modifications to better handle error recovery when conversion by - h5format_convert fails. - (HDFFV-9434 VC 2016/05/29) - - - Fix error when copying dataset with attribute which is a compound datatype - consisting of a variable length string. - (HDFFV-7991 VC 2016/08/19, 2016/08/21, 2016/08/24) - - - H5DOappend will not fail if a dataset has no append callback registered. - (HDFFV-9960 VC 2016/08/05, 2016/08/14) - - - Fix the problem where the committed datatype's file location is different - from the file location of an attribute with that committed datatype. - (HDFFV-9940 VC 2016/07/03, 2016/07/06) - - - (a) Throw an error instead of assertion when v1 btree level hits the 1 byte limit. - (b) Modifications to better handle error recovery when conversion by - h5format_convert fails. - (HDFFV-9434 VC 2016/05/29) + - Configuration ------------- - - Configuration will check for the strtoll and strtoull functions - before using alternatives - (PR 340 ADB 2017/03/17) - - - CMake uses a Windows pdb directory variable if available and - will generate both static and shared pdb files. - (HDFFV-9875 ADB 2017/02/06) - - - CMake now builds shared versions of tools. - (HDFFV-10123 ADB 2017/02/01) + - Performance ------------- - - + - Fortran -------- @@ -249,18 +117,7 @@ Bug Fixes since HDF5-1.10.0-patch1 release Tools ----- - - h5diff correctly ignores strpad in comparing strings. - (HDFFV-10128 ADB 2017/03/03) - - - h5repack now correctly parses the command line filter options. - (HDFFV-10046 ADB 2017/01/24) - - - h5diff correctly indicates error when it cannot read data due - to an unavailable filter plugin. - (HDFFV-9994 ADB 2017/01/18) - - - h5repack allows the --enable-error-stack option on the command line. - (HDFFV-775 ADB 2016/08/08) + - High-Level APIs: ------ @@ -272,46 +129,15 @@ Bug Fixes since HDF5-1.10.0-patch1 release Documentation ------------- - + - F90 APIs -------- - - C++ APIs -------- - - Due to the change in the C API, the overloaded functions of - PropList::setProperty now need const for some arguments. They are - planned for deprecation and are replaced by new versions with proper - consts. (PR #344) -BMR, 2017/03/17 - - - The problem where a user-defined function cannot access both, attribute - and dataset, using only one argument is now fixed. - (HDFFV-9920 - PR #45) -BMR, 2016/10/11 - - - The high-level API Packet Table (PT) did not write data correctly when - the datatype is a compound type that has string type as one of the - members. This problem started in 1.8.15, after the fix of HDFFV-9042 - was applied, which caused the Packet Table to use native type to access - the data. It should be up to the application to specify whether the - buffer to be read into memory is in the machine's native architecture. - Thus, the PT is fixed to not use native type but to make a copy of the - user's provided datatype during creation or the packet table's datatype - during opening. If an application wishes to use native type to read the - data, then the application will request that. However, the Packet Table - doesn't provide a way to specify memory datatype in this release. This - feature will be available in future releases, HDFFV-10023. - (HDFFV-9758 - PRs #93 and #108) -BMR, 2016/10/27 - - - The obsolete macros, H5_NO_NAMESPACE and H5_NO_STD, are removed. - (HDFFV-9532 - PR #92) -BMR, 2016/10/23 - - - In-memory array information, ArrayType::rank and - ArrayType::dimensions, were removed. This is an implementation - detail and should not affect applications. (HDFFV-9725) -BMR, 2016/04/25 - - + - Testing ------- @@ -443,6 +269,13 @@ The following platforms are not supported but have been tested for this release. Version 15.0.3.187 (Build 20150407) MPICH 3.1.4 compiled with GCC 4.9.3 + Linux 3.10.0-327.18.2.el7 GNU C (gcc) and C++ (g++) compilers + #1 SMP x86_64 GNU/Linux Version 4.8.5 20150623 (Red Hat 4.8.5-4) + (jelly) with NAG Fortran Compiler Release 6.1(Tozai) + Intel(R) C (icc) and C++ (icpc) compilers + Version 15.0.3.187 (Build 20150407) + with NAG Fortran Compiler Release 6.1(Tozai) + Linux 2.6.32-573.18.1.el6.ppc64 MPICH mpich 3.1.4 compiled with #1 SMP ppc64 GNU/Linux IBM XL C/C++ for Linux, V13.1 (ostrich) and IBM XL Fortran for Linux, V15.1 @@ -453,16 +286,29 @@ The following platforms are not supported but have been tested for this release. (cmake and autotools) Fedora 24 4.7.2-201.fc24.x86_64 #1 SMP x86_64 x86_64 x86_64 GNU/Linux - gcc, g++ (GCC) 6.1.1 20160621 (Red Hat 6.1.1-3) - GNU Fortran (GCC) 6.1.1 20160621 (Red Hat 6.1.1-3) + gcc, g++ (GCC) 6.1.1 20160621 + (Red Hat 6.1.1-3) + GNU Fortran (GCC) 6.1.1 20160621 + (Red Hat 6.1.1-3) (cmake and autotools) Ubuntu 16.04.1 4.4.0-38-generic #57-Ubuntu SMP x86_64 GNU/Linux - gcc, g++ (Ubuntu 5.4.0-6ubuntu1~16.04.2) 5.4.0 20160609 - GNU Fortran (Ubuntu 5.4.0-6ubuntu1~16.04.2) 5.4.0 20160609 + gcc, g++ (Ubuntu 5.4.0-6ubuntu1~16.04.2) + 5.4.0 20160609 + GNU Fortran (Ubuntu 5.4.0-6ubuntu1~16.04.2) + 5.4.0 20160609 (cmake and autotools) Known Problems ============== + At present, metadata cache images may not be generated by parallel + applications. Parallel applications can read files with metadata cache + images, but since this is a collective operation, a deadlock is possible + if one or more processes do not participate. + + 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. + -- cgit v0.12 From 2c1e727b803203f2188c2d2854501c5a5b8efb23 Mon Sep 17 00:00:00 2001 From: lrknox Date: Fri, 5 May 2017 10:50:27 -0500 Subject: Update one missed version string. --- release_docs/RELEASE.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/release_docs/RELEASE.txt b/release_docs/RELEASE.txt index 285dc8b..c9675ae 100644 --- a/release_docs/RELEASE.txt +++ b/release_docs/RELEASE.txt @@ -42,7 +42,7 @@ CONTENTS - New Features - Support for new platforms and languages -- Bug Fixes since HDF5-1.10.0-patch1 +- Bug Fixes since HDF5-1.10.1 - Supported Platforms - Tested Configuration Features Summary - More Tested Platforms -- cgit v0.12 From 3d8416251d3cffbe2688f86fa87c4b5602ec0d5b Mon Sep 17 00:00:00 2001 From: Dana Robinson Date: Tue, 9 May 2017 19:29:44 -0400 Subject: Fixes the chunk overwrite bug (HDFFV-10187) and adds a new H5DO HL test. --- hl/test/test_dset_opt.c | 114 ++++++++++++++++++++++++++++++++++++++++++++++++ src/H5Dchunk.c | 17 +++++--- 2 files changed, 126 insertions(+), 5 deletions(-) diff --git a/hl/test/test_dset_opt.c b/hl/test/test_dset_opt.c index d3a6b5c..b868a2a 100644 --- a/hl/test/test_dset_opt.c +++ b/hl/test/test_dset_opt.c @@ -32,6 +32,7 @@ #define DATASETNAME4 "data_conv" #define DATASETNAME5 "contiguous_dset" #define DATASETNAME6 "invalid_argue" +#define DATASETNAME7 "overwrite_chunk" #define RANK 2 #define NX 16 #define NY 16 @@ -46,6 +47,13 @@ #define ADD_ON 7 #define FACTOR 3 +/* Constants for the overwrite test */ +#define OVERWRITE_NDIMS 3 +#define OVERWRITE_CHUNK_NX 3 +#define OVERWRITE_CHUNK_2NX 6 +#define OVERWRITE_CHUNK_NY 2 +#define OVERWRITE_VALUE 42 + /* Local prototypes for filter functions */ static size_t filter_bogus1(unsigned int flags, size_t cd_nelmts, const unsigned int *cd_values, size_t nbytes, size_t *buf_size, void **buf); @@ -499,6 +507,111 @@ error: #endif /* H5_HAVE_FILTER_DEFLATE */ /*------------------------------------------------------------------------- + * Function: test_direct_chunk_overwrite_data + * + * Purpose: Test overwriting a chunk with new data. + * + * Return: Success: 0 + * Failure: 1 + * + * Programmer: Dana Robinson + * Spring 2017 + * + *------------------------------------------------------------------------- + */ +static int +test_direct_chunk_overwrite_data(hid_t fid) +{ + size_t buf_size = OVERWRITE_CHUNK_NX * OVERWRITE_CHUNK_NY * sizeof(int16_t); + int16_t data_buf[OVERWRITE_CHUNK_NY][OVERWRITE_CHUNK_NX]; + int16_t overwrite_buf[OVERWRITE_CHUNK_NY][OVERWRITE_CHUNK_NX]; + uint32_t filter_mask = 0; + hid_t tid = H5T_NATIVE_UINT16; + hid_t dcpl_id = -1; + hid_t sid = -1; + hid_t did = -1; + uint16_t fill_value = 0; + hsize_t dset_dims[] = {1, OVERWRITE_CHUNK_NY, OVERWRITE_CHUNK_2NX}; + hsize_t dset_max_dims[] = {H5S_UNLIMITED, OVERWRITE_CHUNK_NY, OVERWRITE_CHUNK_2NX}; + hsize_t chunk_dims[] = {1, OVERWRITE_CHUNK_NY, OVERWRITE_CHUNK_NX}; + hsize_t offset[] = {0, 0, 0}; + hsize_t i, j; + int16_t n; + int16_t read_buf[OVERWRITE_CHUNK_NY][OVERWRITE_CHUNK_2NX]; + + TESTING("overwriting existing data with H5DOwrite_chunk"); + + /* Create the dataset's data space */ + if ((sid = H5Screate_simple(OVERWRITE_NDIMS, dset_dims, dset_max_dims)) < 0) + FAIL_STACK_ERROR + + /* Set chunk size and filll value */ + if ((dcpl_id = H5Pcreate(H5P_DATASET_CREATE)) < 0) + FAIL_STACK_ERROR + if (H5Pset_fill_value(dcpl_id, tid, &fill_value) < 0) + FAIL_STACK_ERROR + if (H5Pset_chunk(dcpl_id, OVERWRITE_NDIMS, chunk_dims) < 0) + FAIL_STACK_ERROR + + /* Create dataset */ + if ((did = H5Dcreate2(fid, DATASETNAME7, tid, sid, H5P_DEFAULT, dcpl_id, H5P_DEFAULT)) < 0) + FAIL_STACK_ERROR + + /* Initialize data buffers */ + n = 0; + for (i = 0; i < OVERWRITE_CHUNK_NY; i++) { + for (j = 0; j < OVERWRITE_CHUNK_NX; j++) { + data_buf[i][j] = n++; + overwrite_buf[i][j] = OVERWRITE_VALUE; + } + } + + /* Write chunk data using the direct write function. */ + if (H5DOwrite_chunk(did, H5P_DEFAULT, filter_mask, offset, buf_size, data_buf) < 0) + FAIL_STACK_ERROR + + /* Write second chunk. */ + offset[2] = OVERWRITE_CHUNK_NX; + if (H5DOwrite_chunk(did, H5P_DEFAULT, filter_mask, offset, buf_size, data_buf) < 0) + FAIL_STACK_ERROR + + /* Overwrite first chunk. */ + offset[2] = 0; + if (H5DOwrite_chunk(did, H5P_DEFAULT, filter_mask, offset, buf_size, overwrite_buf) < 0) + FAIL_STACK_ERROR + + /* Read the data back out */ + if (H5Dread(did, tid, H5S_ALL, H5S_ALL, H5P_DEFAULT, read_buf) < 0) + FAIL_STACK_ERROR + + /* Ensure that the data are correct in chunk 1 */ + for (i = 0; i < OVERWRITE_CHUNK_NY; i++) + for (j = 0; j < OVERWRITE_CHUNK_NX; j++) { + if (read_buf[i][j] != OVERWRITE_VALUE) + TEST_ERROR + } + + if (H5Pclose(dcpl_id) < 0) + FAIL_STACK_ERROR + if (H5Sclose(sid) < 0) + FAIL_STACK_ERROR + if (H5Dclose(did) < 0) + FAIL_STACK_ERROR + + PASSED(); + return 0; + +error: + H5E_BEGIN_TRY { + H5Pclose(dcpl_id); + H5Sclose(sid); + H5Dclose(did); + } H5E_END_TRY; + + return 1; +} /* end test_direct_chunk_overwrite_data() */ + +/*------------------------------------------------------------------------- * Function: test_skip_compress_write1 * * Purpose: Test skipping compression filter when it is the only filter @@ -1409,6 +1522,7 @@ int main( void ) #ifdef H5_HAVE_FILTER_DEFLATE nerrors += test_direct_chunk_write(file_id); #endif /* H5_HAVE_FILTER_DEFLATE */ + nerrors += test_direct_chunk_overwrite_data(file_id); nerrors += test_skip_compress_write1(file_id); nerrors += test_skip_compress_write2(file_id); nerrors += test_data_conv(file_id); diff --git a/src/H5Dchunk.c b/src/H5Dchunk.c index 2523c5d..8152d14 100644 --- a/src/H5Dchunk.c +++ b/src/H5Dchunk.c @@ -445,11 +445,18 @@ H5D__chunk_direct_write(const H5D_t *dset, hid_t dxpl_id, uint32_t filters, /* Set up the size of chunk for user data */ udata.chunk_block.length = data_size; - /* Create the chunk it if it doesn't exist, or reallocate the chunk - * if its size changed. - */ - if(H5D__chunk_file_alloc(&idx_info, &old_chunk, &udata.chunk_block, &need_insert, scaled) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTALLOC, FAIL, "unable to allocate chunk") + if (0 == idx_info.pline->nused && H5F_addr_defined(old_chunk.offset)) { + /* If there are no filters and we are overwriting the chunk we can just set values */ + udata.chunk_block.offset = old_chunk.offset; + need_insert = FALSE; + } + else { + /* Otherwise, create the chunk it if it doesn't exist, or reallocate the chunk + * if its size has changed. + */ + if (H5D__chunk_file_alloc(&idx_info, &old_chunk, &udata.chunk_block, &need_insert, scaled) < 0) + HGOTO_ERROR(H5E_DATASET, H5E_CANTALLOC, FAIL, "unable to allocate chunk") + } /* Make sure the address of the chunk is returned. */ if(!H5F_addr_defined(udata.chunk_block.offset)) -- cgit v0.12 From f1c9163c912fc0866ac68e6dc3e3849a18b4f2b2 Mon Sep 17 00:00:00 2001 From: Vailin Choi Date: Sat, 6 May 2017 23:40:44 -0500 Subject: Fix for the two issues reported in HDFFV-10051: (1) Repeated open/close of a compact dataset fails due to the increment of ndims in the dataset structure for every open. --This is done only for chunked dataset via H5D__chunk_set_sizes(). (2) layout "dirty" flag for a compact dataset is not reset properly after flushing the data at dataset close. --Reset the "dirty" flag before flushing the message to the object header via H5O_msg_write(). Tested on moohan, kituo, platypus, ostrich, osx1010test, quail, emu. --- src/H5Dcompact.c | 2 +- src/H5Dlayout.c | 12 +++++- test/dsets.c | 119 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 130 insertions(+), 3 deletions(-) diff --git a/src/H5Dcompact.c b/src/H5Dcompact.c index 2578975..e542e71 100644 --- a/src/H5Dcompact.c +++ b/src/H5Dcompact.c @@ -368,9 +368,9 @@ H5D__compact_flush(H5D_t *dset, hid_t dxpl_id) /* Check if the buffered compact information is dirty */ if(dset->shared->layout.storage.u.compact.dirty) { + dset->shared->layout.storage.u.compact.dirty = FALSE; if(H5O_msg_write(&(dset->oloc), H5O_LAYOUT_ID, 0, H5O_UPDATE_TIME, &(dset->shared->layout), dxpl_id) < 0) HGOTO_ERROR(H5E_FILE, H5E_CANTINIT, FAIL, "unable to update layout message") - dset->shared->layout.storage.u.compact.dirty = FALSE; } /* end if */ done: diff --git a/src/H5Dlayout.c b/src/H5Dlayout.c index c2fb5c2..ec18e86 100644 --- a/src/H5Dlayout.c +++ b/src/H5Dlayout.c @@ -593,6 +593,7 @@ herr_t H5D__layout_oh_read(H5D_t *dataset, hid_t dxpl_id, hid_t dapl_id, H5P_genplist_t *plist) { htri_t msg_exists; /* Whether a particular type of message exists */ + hbool_t layout_copied = FALSE; /* Flag to indicate that layout message was copied */ herr_t ret_value = SUCCEED; /* Return value */ FUNC_ENTER_PACKAGE @@ -622,6 +623,7 @@ H5D__layout_oh_read(H5D_t *dataset, hid_t dxpl_id, hid_t dapl_id, H5P_genplist_t */ if(NULL == H5O_msg_read(&(dataset->oloc), H5O_LAYOUT_ID, &(dataset->shared->layout), dxpl_id)) HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to read data layout message") + layout_copied = TRUE; /* Check for external file list message (which might not exist) */ if((msg_exists = H5O_msg_exists(&(dataset->oloc), H5O_EFL_ID, dxpl_id)) < 0) @@ -655,10 +657,16 @@ H5D__layout_oh_read(H5D_t *dataset, hid_t dxpl_id, hid_t dapl_id, H5P_genplist_t HGOTO_ERROR(H5E_DATASET, H5E_CANTSET, FAIL, "can't set layout") /* Set chunk sizes */ - if(H5D__chunk_set_sizes(dataset) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_BADVALUE, FAIL, "unable to set chunk sizes") + if(H5D_CHUNKED == dataset->shared->layout.type) { + if(H5D__chunk_set_sizes(dataset) < 0) + HGOTO_ERROR(H5E_DATASET, H5E_BADVALUE, FAIL, "unable to set chunk sizes") + } done: + if(ret_value < 0 && layout_copied) { + if(H5O_msg_reset(H5O_LAYOUT_ID, &dataset->shared->layout) < 0) + HDONE_ERROR(H5E_DATASET, H5E_CANTRESET, FAIL, "unable to reset layout info") + } FUNC_LEAVE_NOAPI(ret_value) } /* end H5D__layout_oh_read() */ diff --git a/test/dsets.c b/test/dsets.c index ef58509..a561ef48 100644 --- a/test/dsets.c +++ b/test/dsets.c @@ -25,13 +25,16 @@ #define H5FD_TESTING #define H5Z_FRIEND /*suppress error about including H5Zpkg */ +#define H5D_FRIEND /*suppress error about including H5Dpkg */ #include "h5test.h" #include "H5srcdir.h" #include "H5Dpkg.h" #include "H5FDpkg.h" #include "H5VMprivate.h" +#include "H5Iprivate.h" #include "H5Zpkg.h" +#include "H5Dpkg.h" #ifdef H5_HAVE_SZLIB_H # include "szlib.h" #endif @@ -12637,7 +12640,122 @@ error: } /* dls_01_main() */ +/*------------------------------------------------------------------------- + * Function: test_compact_open_close_dirty + * + * Purpose: Verify that the two issues reported in HDFFV-10051 are fixed: + * (1) Repeated open/close of a compact dataset fails due to the + * increment of ndims in the dataset structure for every open. + * (2) layout "dirty" flag for a compact dataset is not reset + * properly after flushing the data at dataset close. + * The test for issue #1 is based on compactoc.c attached + * to the jira issue HDFFV-10051 + * + * Return: Success: 0 + * Failure: -1 + * + * Programmer: Vailin Choi; April 2017 + * + *------------------------------------------------------------------------- + */ +static herr_t +test_compact_open_close_dirty(hid_t fapl) +{ + hid_t fid = -1; /* File ID */ + hid_t did = -1; /* Dataset ID */ + hid_t sid = -1; /* Dataspace ID */ + hid_t dcpl = -1; /* Dataset creation property list */ + hsize_t dims[1] = {10}; /* Dimension */ + int wbuf[10]; /* Data buffer */ + char filename[FILENAME_BUF_SIZE]; /* Filename */ + int i; /* Local index variable */ + H5D_t *dset = NULL; /* Internal dataset pointer */ + + TESTING("compact dataset repeated open/close and dirty flag"); + + /* Create a file */ + h5_fixname(FILENAME[1], fapl, filename, sizeof filename); + if((fid = H5Fcreate(filename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0) + TEST_ERROR + + /* Initialize data */ + for(i = 0; i < 10; i++) + wbuf[i] = i; + + /* Create dataspace */ + if((sid = H5Screate_simple(1, dims, NULL)) < 0) + TEST_ERROR + + /* Set compact layout */ + if((dcpl = H5Pcreate(H5P_DATASET_CREATE)) < 0) + TEST_ERROR + if(H5Pset_layout(dcpl, H5D_COMPACT) < 0) + TEST_ERROR + if(H5Pset_alloc_time(dcpl, H5D_ALLOC_TIME_EARLY) < 0) + TEST_ERROR + + /* Create a compact dataset */ + if((did = H5Dcreate2(fid, DSET_COMPACT_MAX_NAME, H5T_NATIVE_INT, sid, H5P_DEFAULT, dcpl, H5P_DEFAULT)) < 0) + TEST_ERROR + + /* Write to the dataset */ + if(H5Dwrite(did, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, wbuf) < 0) + TEST_ERROR + /* Close the dataset */ + if(H5Dclose(did) < 0) + TEST_ERROR + + /* Verify the repeated open/close of the dataset will not fail */ + for(i = 0; i < 20;i++) { + H5E_BEGIN_TRY { + did = H5Dopen (fid, DSET_COMPACT_MAX_NAME, H5P_DEFAULT); + } H5E_END_TRY; + if(did < 0) + TEST_ERROR + if(H5Dclose(did) < 0) + TEST_ERROR + } + + /* Open the dataset */ + if((did = H5Dopen2(fid, DSET_COMPACT_MAX_NAME, H5P_DEFAULT)) < 0) + TEST_ERROR + + /* Get the internal dataset pointer */ + if(NULL == (dset = (H5D_t *)H5I_object_verify(did, H5I_DATASET))) + TEST_ERROR + + /* Verify that the "dirty" flag is false */ + if(dset->shared->layout.storage.u.compact.dirty) + TEST_ERROR + + /* Close the dataset */ + if(H5Dclose(did) < 0) TEST_ERROR + + /* Close the dataspace */ + if(H5Sclose(sid) < 0) + TEST_ERROR + + /* Close the dataset creation property list */ + if(H5Pclose(dcpl) < 0) + TEST_ERROR + + /* Close the file */ + if(H5Fclose(fid) < 0) + TEST_ERROR + + PASSED(); + return 0; + +error: + H5E_BEGIN_TRY { + H5Sclose(sid); + H5Pclose(dcpl); + H5Dclose(did); + H5Fclose(fid); + } H5E_END_TRY; + return -1; +} /* test_compact_open_close_dirty() */ /*------------------------------------------------------------------------- @@ -12759,6 +12877,7 @@ main(void) nerrors += (test_simple_io(envval, my_fapl) < 0 ? 1 : 0); nerrors += (test_compact_io(my_fapl) < 0 ? 1 : 0); nerrors += (test_max_compact(my_fapl) < 0 ? 1 : 0); + nerrors += (test_compact_open_close_dirty(my_fapl) < 0 ? 1 : 0); nerrors += (test_conv_buffer(file) < 0 ? 1 : 0); nerrors += (test_tconv(file) < 0 ? 1 : 0); nerrors += (test_filters(file, my_fapl) < 0 ? 1 : 0); -- cgit v0.12 From 10a3bbe6802fa74b2099847cf8b2a2ee93c1e7dc Mon Sep 17 00:00:00 2001 From: Vailin Choi Date: Mon, 8 May 2017 22:14:20 -0500 Subject: Fix for the two issues reported in HDFFV-10051 Modifications made based on the review comments from pull request #494 Tested on moohan, mayll, kituo, platypus, ostrich, osx1010test, quail, emu. --- src/H5Dcompact.c | 4 +++- src/H5Dtest.c | 41 +++++++++++++++++++++++++++++++++++++++++ test/dsets.c | 19 ++++++------------- 3 files changed, 50 insertions(+), 14 deletions(-) diff --git a/src/H5Dcompact.c b/src/H5Dcompact.c index e542e71..99a25b6 100644 --- a/src/H5Dcompact.c +++ b/src/H5Dcompact.c @@ -369,8 +369,10 @@ H5D__compact_flush(H5D_t *dset, hid_t dxpl_id) /* Check if the buffered compact information is dirty */ if(dset->shared->layout.storage.u.compact.dirty) { dset->shared->layout.storage.u.compact.dirty = FALSE; - if(H5O_msg_write(&(dset->oloc), H5O_LAYOUT_ID, 0, H5O_UPDATE_TIME, &(dset->shared->layout), dxpl_id) < 0) + if(H5O_msg_write(&(dset->oloc), H5O_LAYOUT_ID, 0, H5O_UPDATE_TIME, &(dset->shared->layout), dxpl_id) < 0) { + dset->shared->layout.storage.u.compact.dirty = TRUE; HGOTO_ERROR(H5E_FILE, H5E_CANTINIT, FAIL, "unable to update layout message") + } } /* end if */ done: diff --git a/src/H5Dtest.c b/src/H5Dtest.c index 2fc71a0..c2b6199 100644 --- a/src/H5Dtest.c +++ b/src/H5Dtest.c @@ -142,6 +142,47 @@ done: /*-------------------------------------------------------------------------- NAME + H5D__layout_compact_dirty_test + PURPOSE + Determine the "dirty" flag of a compact layout for a dataset's layout information + USAGE + herr_t H5D__layout_compact_dirty_test(did, dirty) + hid_t did; IN: Dataset to query + hbool_t *dirty; OUT: Pointer to location to place "dirty" info + RETURNS + Non-negative on success, negative on failure + DESCRIPTION + Checks the "dirty" flag of a compact dataset. + GLOBAL VARIABLES + COMMENTS, BUGS, ASSUMPTIONS + DO NOT USE THIS FUNCTION FOR ANYTHING EXCEPT TESTING + EXAMPLES + REVISION LOG +--------------------------------------------------------------------------*/ +herr_t +H5D__layout_compact_dirty_test(hid_t did, hbool_t *dirty) +{ + H5D_t *dset; /* Pointer to dataset to query */ + herr_t ret_value = SUCCEED; /* return value */ + + FUNC_ENTER_PACKAGE + + /* Check args */ + if(NULL == (dset = (H5D_t *)H5I_object_verify(did, H5I_DATASET))) + HGOTO_ERROR(H5E_DATASET, H5E_BADTYPE, FAIL, "not a dataset") + + if(dirty) { + HDassert(dset->shared->layout.type == H5D_COMPACT); + *dirty = dset->shared->layout.storage.u.compact.dirty; + } /* end if */ + +done: + FUNC_LEAVE_NOAPI(ret_value) +} /* H5D__layout_compact_dirty_test() */ + + +/*-------------------------------------------------------------------------- + NAME H5D__layout_type_test PURPOSE Determine the storage layout type for a dataset diff --git a/test/dsets.c b/test/dsets.c index a561ef48..ad014a6 100644 --- a/test/dsets.c +++ b/test/dsets.c @@ -17,24 +17,16 @@ * * Purpose: Tests the dataset interface (H5D) */ - -#define H5D_FRIEND /*suppress error about including H5Dpkg */ -#define H5D_TESTING - #define H5FD_FRIEND /*suppress error about including H5FDpkg */ #define H5FD_TESTING #define H5Z_FRIEND /*suppress error about including H5Zpkg */ -#define H5D_FRIEND /*suppress error about including H5Dpkg */ #include "h5test.h" #include "H5srcdir.h" -#include "H5Dpkg.h" #include "H5FDpkg.h" #include "H5VMprivate.h" -#include "H5Iprivate.h" #include "H5Zpkg.h" -#include "H5Dpkg.h" #ifdef H5_HAVE_SZLIB_H # include "szlib.h" #endif @@ -12669,7 +12661,7 @@ test_compact_open_close_dirty(hid_t fapl) int wbuf[10]; /* Data buffer */ char filename[FILENAME_BUF_SIZE]; /* Filename */ int i; /* Local index variable */ - H5D_t *dset = NULL; /* Internal dataset pointer */ + hbool_t dirty; /* The dirty flag */ TESTING("compact dataset repeated open/close and dirty flag"); @@ -12721,16 +12713,17 @@ test_compact_open_close_dirty(hid_t fapl) if((did = H5Dopen2(fid, DSET_COMPACT_MAX_NAME, H5P_DEFAULT)) < 0) TEST_ERROR - /* Get the internal dataset pointer */ - if(NULL == (dset = (H5D_t *)H5I_object_verify(did, H5I_DATASET))) + /* Retrieve the "dirty" flag from the compact dataset layout */ + if(H5D__layout_compact_dirty_test(did, &dirty) < 0) TEST_ERROR /* Verify that the "dirty" flag is false */ - if(dset->shared->layout.storage.u.compact.dirty) + if(dirty) TEST_ERROR /* Close the dataset */ - if(H5Dclose(did) < 0) TEST_ERROR + if(H5Dclose(did) < 0) + TEST_ERROR /* Close the dataspace */ if(H5Sclose(sid) < 0) -- cgit v0.12 From d94405ded4451831e4fc90ceff70acbc1e6a8f9c Mon Sep 17 00:00:00 2001 From: Vailin Choi Date: Tue, 9 May 2017 17:30:20 -0500 Subject: Fix for HDFFV-10051 Fix missing declaration for H5D__layout_compact_dirty_test(). Tested on mayll and osx1010test. --- src/H5Dpkg.h | 1 + 1 file changed, 1 insertion(+) diff --git a/src/H5Dpkg.h b/src/H5Dpkg.h index b123b81..a6857b9 100644 --- a/src/H5Dpkg.h +++ b/src/H5Dpkg.h @@ -777,6 +777,7 @@ H5_DLL htri_t H5D__mpio_opt_possible(const H5D_io_info_t *io_info, #ifdef H5D_TESTING H5_DLL herr_t H5D__layout_version_test(hid_t did, unsigned *version); H5_DLL herr_t H5D__layout_contig_size_test(hid_t did, hsize_t *size); +H5_DLL herr_t H5D__layout_compact_dirty_test(hid_t did, hbool_t *dirty); H5_DLL herr_t H5D__layout_idx_type_test(hid_t did, H5D_chunk_index_t *idx_type); 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); -- cgit v0.12 From 228939e7315cc9644e158fc246f4908301d77a35 Mon Sep 17 00:00:00 2001 From: lrknox Date: Wed, 10 May 2017 14:44:58 -0500 Subject: Call to H5Dopen has H5dopen2 arguments at line 12704 of test/dsets.c - changed to H5Dopen2 to fix failure with --with-default-api-version=v16 configure option. --- test/dsets.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/dsets.c b/test/dsets.c index ad014a6..ba0ad82 100644 --- a/test/dsets.c +++ b/test/dsets.c @@ -12701,7 +12701,7 @@ test_compact_open_close_dirty(hid_t fapl) /* Verify the repeated open/close of the dataset will not fail */ for(i = 0; i < 20;i++) { H5E_BEGIN_TRY { - did = H5Dopen (fid, DSET_COMPACT_MAX_NAME, H5P_DEFAULT); + did = H5Dopen2 (fid, DSET_COMPACT_MAX_NAME, H5P_DEFAULT); } H5E_END_TRY; if(did < 0) TEST_ERROR -- cgit v0.12 From 1d786206df53942a3a3dbd538b369c94a632050d Mon Sep 17 00:00:00 2001 From: Dana Robinson Date: Thu, 11 May 2017 20:49:37 -0400 Subject: Removed redundant assignement. --- src/H5Dchunk.c | 1 - 1 file changed, 1 deletion(-) diff --git a/src/H5Dchunk.c b/src/H5Dchunk.c index 8152d14..f02c69f 100644 --- a/src/H5Dchunk.c +++ b/src/H5Dchunk.c @@ -447,7 +447,6 @@ H5D__chunk_direct_write(const H5D_t *dset, hid_t dxpl_id, uint32_t filters, if (0 == idx_info.pline->nused && H5F_addr_defined(old_chunk.offset)) { /* If there are no filters and we are overwriting the chunk we can just set values */ - udata.chunk_block.offset = old_chunk.offset; need_insert = FALSE; } else { -- cgit v0.12 From b74b1cd250755cbbe6ec337dc34634eb8b74b64a Mon Sep 17 00:00:00 2001 From: Dana Robinson Date: Mon, 15 May 2017 14:58:13 -0400 Subject: Added a RELEASE.txt message for HDFFV-10187. --- release_docs/RELEASE.txt | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/release_docs/RELEASE.txt b/release_docs/RELEASE.txt index c9675ae..81295e9 100644 --- a/release_docs/RELEASE.txt +++ b/release_docs/RELEASE.txt @@ -121,7 +121,12 @@ Bug Fixes since HDF5-1.10.0-patch1 release High-Level APIs: ------ - - + - Fixed a bug in the H5DOwrite_chunk() API call where overwriting a chunk + with no filters caused an assert to trip (with assertions enabled / + debug builds) or additional chunks to be inserted instead of overwriting + the data (without assertions enabled / production builds). + + (HDFFV-10187, DER, 2017/05/11) Fortran High-Level APIs: ------ -- cgit v0.12 From 55e2bcedc1aab3fe7a3c54c0bb1decce7b78a7e8 Mon Sep 17 00:00:00 2001 From: Vailin Choi Date: Mon, 15 May 2017 10:25:15 -0500 Subject: Incorporate additional code changes for the H5DOread_chunk patch from GE Heathcare (HDFFV-9934) This is the similar set of changes that was checked in to 1.8 branch: Incorporate the code changes that were missing from the original patch: (1) Additional tests in hl/test/test_dset_opt.c (2) Fix in src/H5Dchunk.c for direct access when an entry is in chunk cache but not dirty Tested on platypus, ostrich, kituo, mayll, osx1010test, moohan, quail, emu. --- hl/test/test_dset_opt.c | 1188 +++++++++++++++++++++++++++++++++-------------- src/H5Dchunk.c | 43 +- 2 files changed, 859 insertions(+), 372 deletions(-) diff --git a/hl/test/test_dset_opt.c b/hl/test/test_dset_opt.c index b868a2a..4b5fa19 100644 --- a/hl/test/test_dset_opt.c +++ b/hl/test/test_dset_opt.c @@ -26,6 +26,7 @@ #define FILE_NAME "test_dectris.h5" +/* Datasets for Direct Write tests */ #define DATASETNAME1 "direct_write" #define DATASETNAME2 "skip_one_filter" #define DATASETNAME3 "skip_two_filters" @@ -33,13 +34,20 @@ #define DATASETNAME5 "contiguous_dset" #define DATASETNAME6 "invalid_argue" #define DATASETNAME7 "overwrite_chunk" +/* Datasets for Direct Read tests */ +#define DATASETNAME8 "disabled_chunk_cache" +#define DATASETNAME9 "flush_chunk_cache" +#define DATASETNAME10 "read_w_valid_cache" +#define DATASETNAME11 "unallocated_chunk" +#define DATASETNAME12 "unfiltered_data" + #define RANK 2 #define NX 16 #define NY 16 #define CHUNK_NX 4 #define CHUNK_NY 4 -#define DEFLATE_SIZE_ADJUST(s) (ceil(((double)(s))*(double)1.001F)+12) +#define DEFLATE_SIZE_ADJUST(s) (ceil(((double)(s))*1.001)+12) /* Temporary filter IDs used for testing */ #define H5Z_FILTER_BOGUS1 305 @@ -84,10 +92,10 @@ const H5Z_class2_t H5Z_BOGUS2[1] = {{ /*------------------------------------------------------------------------- * Function: test_direct_chunk_write * - * Purpose: Test the basic functionality of H5DOwrite_chunk/H5DOread_chunk + * Purpose: Test the basic functionality of H5DOwrite_chunk * - * Return: Success: 0 - * Failure: 1 + * Return: Success: 0 + * Failure: 1 * * Programmer: Raymond Lu * 30 November 2012 @@ -110,31 +118,24 @@ test_direct_chunk_write (hid_t file) int i, j, n; unsigned filter_mask = 0; - unsigned read_filter_mask = 0; int direct_buf[CHUNK_NX][CHUNK_NY]; int check_chunk[CHUNK_NX][CHUNK_NY]; hsize_t offset[2] = {0, 0}; size_t buf_size = CHUNK_NX*CHUNK_NY*sizeof(int); const Bytef *z_src = (const Bytef*)(direct_buf); - Bytef *z_dst; /*destination buffer */ + Bytef *z_dst = NULL; /*destination buffer */ uLongf z_dst_nbytes = (uLongf)DEFLATE_SIZE_ADJUST(buf_size); uLong z_src_nbytes = (uLong)buf_size; - int aggression = 9; /* Compression aggression setting */ - void *outbuf = NULL; /* Pointer to new buffer */ - - /* For H5DOread_chunk() */ - void *readbuf = NULL; /* Buffer for reading data */ - const Bytef *pt_readbuf; /* Point to the buffer for data read */ - hsize_t read_chunk_nbytes; /* Size of chunk on disk */ - int read_dst_buf[CHUNK_NX][CHUNK_NY]; /* Buffer to hold un-compressed data */ + int aggression = 9; /* Compression aggression setting */ + void *outbuf = NULL; /* Pointer to new buffer */ hsize_t start[2]; /* Start of hyperslab */ hsize_t stride[2]; /* Stride of hyperslab */ hsize_t count[2]; /* Block count */ hsize_t block[2]; /* Block sizes */ - TESTING("basic functionality of H5DOwrite_chunk/H5DOread_chunk"); + TESTING("basic functionality of H5DOwrite_chunk"); /* * Create the data space with unlimited dimensions. @@ -165,76 +166,26 @@ test_direct_chunk_write (hid_t file) cparms, H5P_DEFAULT)) < 0) goto error; + /* Initialize the dataset */ + for(i = n = 0; i < NX; i++) + for(j = 0; j < NY; j++) + data[i][j] = n++; + if((dxpl = H5Pcreate(H5P_DATASET_XFER)) < 0) goto error; - HDmemset(data, 0, sizeof(data)); - /* Initialize data for the first chunk */ - for(i = n = 0; i < CHUNK_NX; i++) - for(j = 0; j < CHUNK_NY; j++) - data[i][j] = n++; - /* - * Write the data for the dataset. */ + * Write the data for the dataset. It should stay in the chunk cache. + * It will be evicted from the cache by the H5DOwrite_chunk calls. + */ if((status = H5Dwrite(dataset, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, dxpl, data)) < 0) goto error; - if(H5Fflush(dataset, H5F_SCOPE_LOCAL) < 0) - goto error; - - if(H5Dclose(dataset) < 0) - goto error; - - if((dataset = H5Dopen2(file, DATASETNAME1, H5P_DEFAULT)) < 0) - goto error; - - offset[0] = offset[1] = 0; - - /* Get the size of the compressed chunk */ - ret = H5Dget_chunk_storage_size(dataset, offset, &read_chunk_nbytes); - - readbuf = HDmalloc(read_chunk_nbytes); - pt_readbuf = (const Bytef *)readbuf; - - /* Test to use H5DOread_chunk() to read the chunk back */ - if((status = H5DOread_chunk(dataset, H5P_DEFAULT, offset, &read_filter_mask, readbuf)) < 0) - goto error; - - /* uncompress(Bytef *dest, uLongf *destLen, const Bytef *source, uLong sourceLen) */ - ret = uncompress((Bytef *)read_dst_buf, (uLongf *)&buf_size, pt_readbuf, (uLong)read_chunk_nbytes); - - /* Check for various zlib errors */ - if(Z_BUF_ERROR == ret) { - HDfprintf(stderr, "error: not enough room in output buffer"); - goto error; - } else if(Z_MEM_ERROR == ret) { - HDfprintf(stderr, "error: not enough memory"); - goto error; - } else if(Z_OK != ret) { - HDfprintf(stderr, "error: corrupted input data"); - goto error; - } - - /* Check that the values read are the same as the values written */ - for(i = 0; i < CHUNK_NX; i++) { - for(j = 0; j < CHUNK_NY; j++) { - if(data[i][j] != read_dst_buf[i][j]) { - printf(" 1. Read different values than written."); - printf(" At index %d,%d\n", i, j); - printf(" data=%d, read_dst_buf=%d\n", data[i][j], read_dst_buf[i][j]); - goto error; - } - } - } - - if(readbuf) - HDfree(readbuf); - /* Initialize data for one chunk */ for(i = n = 0; i < CHUNK_NX; i++) for(j = 0; j < CHUNK_NY; j++) - direct_buf[i][j] = n++; + direct_buf[i][j] = n++; /* Allocate output (compressed) buffer */ outbuf = HDmalloc(z_dst_nbytes); @@ -255,8 +206,8 @@ test_direct_chunk_write (hid_t file) goto error; } - /* Write the compressed chunk data repeatedly to cover all the chunks in the - * dataset, using the direct writing function. */ + /* Write the compressed chunk data repeatedly to cover all the chunks in the + * dataset, using the direct writing function. */ for(i=0; islot[udata.idx_hint]; + hbool_t flush; /* Sanity checks */ HDassert(udata.idx_hint < rdcc->nslots); HDassert(rdcc->slot[udata.idx_hint]); - /* If the cached chunk is dirty, it must be flushed to get accurate size */ - if( ent->dirty == TRUE ) { + flush = (ent->dirty == TRUE) ? TRUE : FALSE; - /* Fill the DXPL cache values for later use */ - if(H5D__get_dxpl_cache(io_info.raw_dxpl_id, &dxpl_cache) < 0) + /* Fill the DXPL cache values for later use */ + if(H5D__get_dxpl_cache(io_info.raw_dxpl_id, &dxpl_cache) < 0) HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't fill dxpl cache") - /* Flush the chunk to disk and clear the cache entry */ - if(H5D__chunk_cache_evict(dset, io_info.md_dxpl_id, dxpl_cache, rdcc->slot[udata.idx_hint], TRUE) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTREMOVE, FAIL, "unable to evict chunk") + /* Flush the chunk to disk and clear the cache entry */ + if(H5D__chunk_cache_evict(dset, io_info.md_dxpl_id, dxpl_cache, rdcc->slot[udata.idx_hint], flush) < 0) + HGOTO_ERROR(H5E_DATASET, H5E_CANTREMOVE, FAIL, "unable to evict chunk") - /* Reset fields about the chunk we are looking for */ - udata.filter_mask = 0; - udata.chunk_block.offset = HADDR_UNDEF; - udata.chunk_block.length = 0; - udata.idx_hint = UINT_MAX; + /* Reset fields about the chunk we are looking for */ + udata.filter_mask = 0; + udata.chunk_block.offset = HADDR_UNDEF; + udata.chunk_block.length = 0; + udata.idx_hint = UINT_MAX; - /* Get the new file address / chunk size after flushing */ - if(H5D__chunk_lookup(dset, io_info.md_dxpl_id, scaled, &udata) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "error looking up chunk address") - } + /* Get the new file address / chunk size after flushing */ + if(H5D__chunk_lookup(dset, io_info.md_dxpl_id, scaled, &udata) < 0) + HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "error looking up chunk address") } /* Make sure the address of the chunk is returned. */ @@ -648,6 +649,8 @@ H5D__get_chunk_storage_size(H5D_t *dset, hid_t dxpl_id, const hsize_t *offset, h HDassert(offset); HDassert(storage_size); + *storage_size = 0; + io_info.dset = dset; io_info.raw_dxpl_id = dxpl_id; io_info.md_dxpl_id = dxpl_id; @@ -660,10 +663,8 @@ H5D__get_chunk_storage_size(H5D_t *dset, hid_t dxpl_id, const hsize_t *offset, h #endif /* H5_DEBUG_BUILD */ /* Allocate dataspace and initialize it if it hasn't been. */ - if(!(*layout->ops->is_space_alloc)(&layout->storage)) { - *storage_size = 0; + if(!(*layout->ops->is_space_alloc)(&layout->storage)) HGOTO_DONE(SUCCEED) - } /* Calculate the index of this chunk */ H5VM_chunk_scaled(dset->shared->ndims, offset, layout->u.chunk.dim, scaled); @@ -2955,7 +2956,7 @@ H5D__chunk_lookup(const H5D_t *dset, hid_t dxpl_id, const hsize_t *scaled, /* Check for chunk in cache */ if(dset->shared->cache.chunk.nslots > 0) { /* Determine the chunk's location in the hash table */ - idx = H5D__chunk_hash_val(dset->shared, scaled); + idx = H5D__chunk_hash_val(dset->shared, scaled); /* Get the chunk cache entry for that location */ ent = dset->shared->cache.chunk.slot[idx]; @@ -2979,7 +2980,7 @@ H5D__chunk_lookup(const H5D_t *dset, hid_t dxpl_id, const hsize_t *scaled, udata->idx_hint = idx; udata->chunk_block.offset = ent->chunk_block.offset; udata->chunk_block.length = ent->chunk_block.length;; - udata->chunk_idx = ent->chunk_idx; + udata->chunk_idx = ent->chunk_idx; } /* end if */ else { /* Invalidate idx_hint, to signal that the chunk is not in cache */ -- cgit v0.12 From f3c235b0a57bc6a32951571e22b55333c5adc03d Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Tue, 16 May 2017 10:16:44 -0500 Subject: HDFFV-9995 Clarify help text --- tools/src/h5diff/h5diff_common.c | 45 ++++++++++++++++-------------- tools/test/h5diff/testfiles/h5diff_10.txt | 21 ++++++++------ tools/test/h5diff/testfiles/h5diff_600.txt | 21 ++++++++------ tools/test/h5diff/testfiles/h5diff_603.txt | 21 ++++++++------ tools/test/h5diff/testfiles/h5diff_606.txt | 21 ++++++++------ tools/test/h5diff/testfiles/h5diff_612.txt | 21 ++++++++------ tools/test/h5diff/testfiles/h5diff_615.txt | 21 ++++++++------ tools/test/h5diff/testfiles/h5diff_621.txt | 21 ++++++++------ tools/test/h5diff/testfiles/h5diff_622.txt | 21 ++++++++------ tools/test/h5diff/testfiles/h5diff_623.txt | 21 ++++++++------ tools/test/h5diff/testfiles/h5diff_624.txt | 21 ++++++++------ 11 files changed, 144 insertions(+), 111 deletions(-) diff --git a/tools/src/h5diff/h5diff_common.c b/tools/src/h5diff/h5diff_common.c index 5437803..0537b9f 100644 --- a/tools/src/h5diff/h5diff_common.c +++ b/tools/src/h5diff/h5diff_common.c @@ -56,7 +56,7 @@ static struct long_options l_opts[] = { static void check_options(diff_opt_t* options) { /*-------------------------------------------------------------- - * check for mutually exclusive options + * check for mutually exclusive options *--------------------------------------------------------------*/ /* check between -d , -p, --use-system-epsilon. @@ -127,13 +127,13 @@ void parse_command_line(int argc, h5diff_exit(EXIT_SUCCESS); case 'v': options->m_verbose = 1; - /* This for loop is for handling style like + /* This for loop is for handling style like * -v, -v1, --verbose, --verbose=1. */ for (i = 1; i < argc; i++) - { - /* - * short opt + { + /* + * short opt */ if (!strcmp (argv[i], "-v")) /* no arg */ { @@ -145,10 +145,10 @@ void parse_command_line(int argc, { options->m_verbose_level = atoi(&argv[i][2]); break; - } + } - /* - * long opt + /* + * long opt */ if (!strcmp (argv[i], "--verbose")) /* no arg */ { @@ -177,7 +177,7 @@ void parse_command_line(int argc, break; case 'E': options->exclude_path = 1; - + /* create linked list of excluding objects */ if( (exclude_node = (struct exclude_path_list*) HDmalloc(sizeof(struct exclude_path_list))) == NULL) { @@ -189,8 +189,8 @@ void parse_command_line(int argc, exclude_node->obj_path = (char*)opt_arg; exclude_node->obj_type = H5TRAV_TYPE_UNKNOWN; exclude_prev = exclude_head; - - if (NULL == exclude_head) + + if (NULL == exclude_head) { exclude_head = exclude_node; exclude_head->next = NULL; @@ -202,7 +202,7 @@ void parse_command_line(int argc, exclude_node->next = NULL; exclude_prev->next = exclude_node; - } + } break; case 'd': options->d=1; @@ -458,7 +458,7 @@ check_d_input( const char *str ) void usage(void) { - printf("usage: h5diff [OPTIONS] file1 file2 [obj1[ obj2]] \n"); + printf("usage: h5diff [OPTIONS] file1 file2 [obj1[ obj2]]\n"); printf(" file1 File name of the first HDF5 file\n"); printf(" file2 File name of the second HDF5 file\n"); printf(" [obj1] Name of an HDF5 object, in absolute path\n"); @@ -519,19 +519,22 @@ void usage(void) printf(" -n C, --count=C\n"); printf(" Print differences up to C. C must be a positive integer.\n"); printf(" -d D, --delta=D\n"); - printf(" Print difference if (|a-b| > D). D must be a positive number.\n"); + printf(" Print difference if (|a-b| > D). D must be a positive number. Where a\n"); + printf(" is the data point value in file1 and b is the data point value in file2.\n"); printf(" Can not use with '-p' or '--use-system-epsilon'.\n"); printf(" -p R, --relative=R\n"); - printf(" Print difference if (|(a-b)/b| > R). R must be a positive number.\n"); + printf(" Print difference if (|(a-b)/b| > R). R must be a positive number. Where a\n"); + printf(" is the data point value in file1 and b is the data point value in file2.\n"); printf(" Can not use with '-d' or '--use-system-epsilon'.\n"); printf(" --use-system-epsilon\n"); - printf(" Print difference if (|a-b| > EPSILON), EPSILON is system defined value.\n"); + printf(" Print difference if (|a-b| > EPSILON), EPSILON is system defined value. Where a\n"); + printf(" is the data point value in file1 and b is the data point value in file2.\n"); printf(" If the system epsilon is not defined,one of the following predefined\n"); printf(" values will be used:\n"); printf(" FLT_EPSILON = 1.19209E-07 for floating-point type\n"); printf(" DBL_EPSILON = 2.22045E-16 for double precision type\n"); printf(" Can not use with '-p' or '-d'.\n"); - printf(" --exclude-path \"path\" \n"); + printf(" --exclude-path \"path\"\n"); printf(" Exclude the specified path to an object when comparing files or groups.\n"); printf(" If a group is excluded, all member objects will also be excluded.\n"); printf(" The specified path is excluded wherever it occurs.\n"); @@ -570,15 +573,15 @@ void usage(void) printf("\n"); printf(" Object comparison:\n"); - printf(" 1) Groups \n"); + printf(" 1) Groups\n"); printf(" First compares the names of member objects (relative path, from the\n"); printf(" specified group) and generates a report of objects that appear in only\n"); printf(" one group or in both groups. Common objects are then compared recursively.\n"); - printf(" 2) Datasets \n"); + printf(" 2) Datasets\n"); printf(" Array rank and dimensions, datatypes, and data values are compared.\n"); - printf(" 3) Datatypes \n"); + printf(" 3) Datatypes\n"); printf(" The comparison is based on the return value of H5Tequal.\n"); - printf(" 4) Symbolic links \n"); + printf(" 4) Symbolic links\n"); printf(" The paths to the target objects are compared.\n"); printf(" (The option --follow-symlinks overrides the default behavior when\n"); printf(" symbolic links are compared.).\n"); diff --git a/tools/test/h5diff/testfiles/h5diff_10.txt b/tools/test/h5diff/testfiles/h5diff_10.txt index a699f00..0a0ee22 100644 --- a/tools/test/h5diff/testfiles/h5diff_10.txt +++ b/tools/test/h5diff/testfiles/h5diff_10.txt @@ -1,4 +1,4 @@ -usage: h5diff [OPTIONS] file1 file2 [obj1[ obj2]] +usage: h5diff [OPTIONS] file1 file2 [obj1[ obj2]] file1 File name of the first HDF5 file file2 File name of the second HDF5 file [obj1] Name of an HDF5 object, in absolute path @@ -59,19 +59,22 @@ usage: h5diff [OPTIONS] file1 file2 [obj1[ obj2]] -n C, --count=C Print differences up to C. C must be a positive integer. -d D, --delta=D - Print difference if (|a-b| > D). D must be a positive number. + Print difference if (|a-b| > D). D must be a positive number. Where a + is the data point value in file1 and b is the data point value in file2. Can not use with '-p' or '--use-system-epsilon'. -p R, --relative=R - Print difference if (|(a-b)/b| > R). R must be a positive number. + Print difference if (|(a-b)/b| > R). R must be a positive number. Where a + is the data point value in file1 and b is the data point value in file2. Can not use with '-d' or '--use-system-epsilon'. --use-system-epsilon - Print difference if (|a-b| > EPSILON), EPSILON is system defined value. + Print difference if (|a-b| > EPSILON), EPSILON is system defined value. Where a + is the data point value in file1 and b is the data point value in file2. If the system epsilon is not defined,one of the following predefined values will be used: FLT_EPSILON = 1.19209E-07 for floating-point type DBL_EPSILON = 2.22045E-16 for double precision type Can not use with '-p' or '-d'. - --exclude-path "path" + --exclude-path "path" Exclude the specified path to an object when comparing files or groups. If a group is excluded, all member objects will also be excluded. The specified path is excluded wherever it occurs. @@ -106,15 +109,15 @@ usage: h5diff [OPTIONS] file1 file2 [obj1[ obj2]] common objects. Object comparison: - 1) Groups + 1) Groups First compares the names of member objects (relative path, from the specified group) and generates a report of objects that appear in only one group or in both groups. Common objects are then compared recursively. - 2) Datasets + 2) Datasets Array rank and dimensions, datatypes, and data values are compared. - 3) Datatypes + 3) Datatypes The comparison is based on the return value of H5Tequal. - 4) Symbolic links + 4) Symbolic links The paths to the target objects are compared. (The option --follow-symlinks overrides the default behavior when symbolic links are compared.). diff --git a/tools/test/h5diff/testfiles/h5diff_600.txt b/tools/test/h5diff/testfiles/h5diff_600.txt index 3c3ad9f..4362711 100644 --- a/tools/test/h5diff/testfiles/h5diff_600.txt +++ b/tools/test/h5diff/testfiles/h5diff_600.txt @@ -1,4 +1,4 @@ -usage: h5diff [OPTIONS] file1 file2 [obj1[ obj2]] +usage: h5diff [OPTIONS] file1 file2 [obj1[ obj2]] file1 File name of the first HDF5 file file2 File name of the second HDF5 file [obj1] Name of an HDF5 object, in absolute path @@ -59,19 +59,22 @@ usage: h5diff [OPTIONS] file1 file2 [obj1[ obj2]] -n C, --count=C Print differences up to C. C must be a positive integer. -d D, --delta=D - Print difference if (|a-b| > D). D must be a positive number. + Print difference if (|a-b| > D). D must be a positive number. Where a + is the data point value in file1 and b is the data point value in file2. Can not use with '-p' or '--use-system-epsilon'. -p R, --relative=R - Print difference if (|(a-b)/b| > R). R must be a positive number. + Print difference if (|(a-b)/b| > R). R must be a positive number. Where a + is the data point value in file1 and b is the data point value in file2. Can not use with '-d' or '--use-system-epsilon'. --use-system-epsilon - Print difference if (|a-b| > EPSILON), EPSILON is system defined value. + Print difference if (|a-b| > EPSILON), EPSILON is system defined value. Where a + is the data point value in file1 and b is the data point value in file2. If the system epsilon is not defined,one of the following predefined values will be used: FLT_EPSILON = 1.19209E-07 for floating-point type DBL_EPSILON = 2.22045E-16 for double precision type Can not use with '-p' or '-d'. - --exclude-path "path" + --exclude-path "path" Exclude the specified path to an object when comparing files or groups. If a group is excluded, all member objects will also be excluded. The specified path is excluded wherever it occurs. @@ -106,15 +109,15 @@ usage: h5diff [OPTIONS] file1 file2 [obj1[ obj2]] common objects. Object comparison: - 1) Groups + 1) Groups First compares the names of member objects (relative path, from the specified group) and generates a report of objects that appear in only one group or in both groups. Common objects are then compared recursively. - 2) Datasets + 2) Datasets Array rank and dimensions, datatypes, and data values are compared. - 3) Datatypes + 3) Datatypes The comparison is based on the return value of H5Tequal. - 4) Symbolic links + 4) Symbolic links The paths to the target objects are compared. (The option --follow-symlinks overrides the default behavior when symbolic links are compared.). diff --git a/tools/test/h5diff/testfiles/h5diff_603.txt b/tools/test/h5diff/testfiles/h5diff_603.txt index 087764a..9ab3204 100644 --- a/tools/test/h5diff/testfiles/h5diff_603.txt +++ b/tools/test/h5diff/testfiles/h5diff_603.txt @@ -1,5 +1,5 @@ <-d -4> is not a valid option -usage: h5diff [OPTIONS] file1 file2 [obj1[ obj2]] +usage: h5diff [OPTIONS] file1 file2 [obj1[ obj2]] file1 File name of the first HDF5 file file2 File name of the second HDF5 file [obj1] Name of an HDF5 object, in absolute path @@ -60,19 +60,22 @@ usage: h5diff [OPTIONS] file1 file2 [obj1[ obj2]] -n C, --count=C Print differences up to C. C must be a positive integer. -d D, --delta=D - Print difference if (|a-b| > D). D must be a positive number. + Print difference if (|a-b| > D). D must be a positive number. Where a + is the data point value in file1 and b is the data point value in file2. Can not use with '-p' or '--use-system-epsilon'. -p R, --relative=R - Print difference if (|(a-b)/b| > R). R must be a positive number. + Print difference if (|(a-b)/b| > R). R must be a positive number. Where a + is the data point value in file1 and b is the data point value in file2. Can not use with '-d' or '--use-system-epsilon'. --use-system-epsilon - Print difference if (|a-b| > EPSILON), EPSILON is system defined value. + Print difference if (|a-b| > EPSILON), EPSILON is system defined value. Where a + is the data point value in file1 and b is the data point value in file2. If the system epsilon is not defined,one of the following predefined values will be used: FLT_EPSILON = 1.19209E-07 for floating-point type DBL_EPSILON = 2.22045E-16 for double precision type Can not use with '-p' or '-d'. - --exclude-path "path" + --exclude-path "path" Exclude the specified path to an object when comparing files or groups. If a group is excluded, all member objects will also be excluded. The specified path is excluded wherever it occurs. @@ -107,15 +110,15 @@ usage: h5diff [OPTIONS] file1 file2 [obj1[ obj2]] common objects. Object comparison: - 1) Groups + 1) Groups First compares the names of member objects (relative path, from the specified group) and generates a report of objects that appear in only one group or in both groups. Common objects are then compared recursively. - 2) Datasets + 2) Datasets Array rank and dimensions, datatypes, and data values are compared. - 3) Datatypes + 3) Datatypes The comparison is based on the return value of H5Tequal. - 4) Symbolic links + 4) Symbolic links The paths to the target objects are compared. (The option --follow-symlinks overrides the default behavior when symbolic links are compared.). diff --git a/tools/test/h5diff/testfiles/h5diff_606.txt b/tools/test/h5diff/testfiles/h5diff_606.txt index c31a67e..afe0e72 100644 --- a/tools/test/h5diff/testfiles/h5diff_606.txt +++ b/tools/test/h5diff/testfiles/h5diff_606.txt @@ -1,5 +1,5 @@ <-d 0x1> is not a valid option -usage: h5diff [OPTIONS] file1 file2 [obj1[ obj2]] +usage: h5diff [OPTIONS] file1 file2 [obj1[ obj2]] file1 File name of the first HDF5 file file2 File name of the second HDF5 file [obj1] Name of an HDF5 object, in absolute path @@ -60,19 +60,22 @@ usage: h5diff [OPTIONS] file1 file2 [obj1[ obj2]] -n C, --count=C Print differences up to C. C must be a positive integer. -d D, --delta=D - Print difference if (|a-b| > D). D must be a positive number. + Print difference if (|a-b| > D). D must be a positive number. Where a + is the data point value in file1 and b is the data point value in file2. Can not use with '-p' or '--use-system-epsilon'. -p R, --relative=R - Print difference if (|(a-b)/b| > R). R must be a positive number. + Print difference if (|(a-b)/b| > R). R must be a positive number. Where a + is the data point value in file1 and b is the data point value in file2. Can not use with '-d' or '--use-system-epsilon'. --use-system-epsilon - Print difference if (|a-b| > EPSILON), EPSILON is system defined value. + Print difference if (|a-b| > EPSILON), EPSILON is system defined value. Where a + is the data point value in file1 and b is the data point value in file2. If the system epsilon is not defined,one of the following predefined values will be used: FLT_EPSILON = 1.19209E-07 for floating-point type DBL_EPSILON = 2.22045E-16 for double precision type Can not use with '-p' or '-d'. - --exclude-path "path" + --exclude-path "path" Exclude the specified path to an object when comparing files or groups. If a group is excluded, all member objects will also be excluded. The specified path is excluded wherever it occurs. @@ -107,15 +110,15 @@ usage: h5diff [OPTIONS] file1 file2 [obj1[ obj2]] common objects. Object comparison: - 1) Groups + 1) Groups First compares the names of member objects (relative path, from the specified group) and generates a report of objects that appear in only one group or in both groups. Common objects are then compared recursively. - 2) Datasets + 2) Datasets Array rank and dimensions, datatypes, and data values are compared. - 3) Datatypes + 3) Datatypes The comparison is based on the return value of H5Tequal. - 4) Symbolic links + 4) Symbolic links The paths to the target objects are compared. (The option --follow-symlinks overrides the default behavior when symbolic links are compared.). diff --git a/tools/test/h5diff/testfiles/h5diff_612.txt b/tools/test/h5diff/testfiles/h5diff_612.txt index 05318bd..97a1747 100644 --- a/tools/test/h5diff/testfiles/h5diff_612.txt +++ b/tools/test/h5diff/testfiles/h5diff_612.txt @@ -1,5 +1,5 @@ <-p -4> is not a valid option -usage: h5diff [OPTIONS] file1 file2 [obj1[ obj2]] +usage: h5diff [OPTIONS] file1 file2 [obj1[ obj2]] file1 File name of the first HDF5 file file2 File name of the second HDF5 file [obj1] Name of an HDF5 object, in absolute path @@ -60,19 +60,22 @@ usage: h5diff [OPTIONS] file1 file2 [obj1[ obj2]] -n C, --count=C Print differences up to C. C must be a positive integer. -d D, --delta=D - Print difference if (|a-b| > D). D must be a positive number. + Print difference if (|a-b| > D). D must be a positive number. Where a + is the data point value in file1 and b is the data point value in file2. Can not use with '-p' or '--use-system-epsilon'. -p R, --relative=R - Print difference if (|(a-b)/b| > R). R must be a positive number. + Print difference if (|(a-b)/b| > R). R must be a positive number. Where a + is the data point value in file1 and b is the data point value in file2. Can not use with '-d' or '--use-system-epsilon'. --use-system-epsilon - Print difference if (|a-b| > EPSILON), EPSILON is system defined value. + Print difference if (|a-b| > EPSILON), EPSILON is system defined value. Where a + is the data point value in file1 and b is the data point value in file2. If the system epsilon is not defined,one of the following predefined values will be used: FLT_EPSILON = 1.19209E-07 for floating-point type DBL_EPSILON = 2.22045E-16 for double precision type Can not use with '-p' or '-d'. - --exclude-path "path" + --exclude-path "path" Exclude the specified path to an object when comparing files or groups. If a group is excluded, all member objects will also be excluded. The specified path is excluded wherever it occurs. @@ -107,15 +110,15 @@ usage: h5diff [OPTIONS] file1 file2 [obj1[ obj2]] common objects. Object comparison: - 1) Groups + 1) Groups First compares the names of member objects (relative path, from the specified group) and generates a report of objects that appear in only one group or in both groups. Common objects are then compared recursively. - 2) Datasets + 2) Datasets Array rank and dimensions, datatypes, and data values are compared. - 3) Datatypes + 3) Datatypes The comparison is based on the return value of H5Tequal. - 4) Symbolic links + 4) Symbolic links The paths to the target objects are compared. (The option --follow-symlinks overrides the default behavior when symbolic links are compared.). diff --git a/tools/test/h5diff/testfiles/h5diff_615.txt b/tools/test/h5diff/testfiles/h5diff_615.txt index fd756b3..78770f0 100644 --- a/tools/test/h5diff/testfiles/h5diff_615.txt +++ b/tools/test/h5diff/testfiles/h5diff_615.txt @@ -1,5 +1,5 @@ <-p 0x1> is not a valid option -usage: h5diff [OPTIONS] file1 file2 [obj1[ obj2]] +usage: h5diff [OPTIONS] file1 file2 [obj1[ obj2]] file1 File name of the first HDF5 file file2 File name of the second HDF5 file [obj1] Name of an HDF5 object, in absolute path @@ -60,19 +60,22 @@ usage: h5diff [OPTIONS] file1 file2 [obj1[ obj2]] -n C, --count=C Print differences up to C. C must be a positive integer. -d D, --delta=D - Print difference if (|a-b| > D). D must be a positive number. + Print difference if (|a-b| > D). D must be a positive number. Where a + is the data point value in file1 and b is the data point value in file2. Can not use with '-p' or '--use-system-epsilon'. -p R, --relative=R - Print difference if (|(a-b)/b| > R). R must be a positive number. + Print difference if (|(a-b)/b| > R). R must be a positive number. Where a + is the data point value in file1 and b is the data point value in file2. Can not use with '-d' or '--use-system-epsilon'. --use-system-epsilon - Print difference if (|a-b| > EPSILON), EPSILON is system defined value. + Print difference if (|a-b| > EPSILON), EPSILON is system defined value. Where a + is the data point value in file1 and b is the data point value in file2. If the system epsilon is not defined,one of the following predefined values will be used: FLT_EPSILON = 1.19209E-07 for floating-point type DBL_EPSILON = 2.22045E-16 for double precision type Can not use with '-p' or '-d'. - --exclude-path "path" + --exclude-path "path" Exclude the specified path to an object when comparing files or groups. If a group is excluded, all member objects will also be excluded. The specified path is excluded wherever it occurs. @@ -107,15 +110,15 @@ usage: h5diff [OPTIONS] file1 file2 [obj1[ obj2]] common objects. Object comparison: - 1) Groups + 1) Groups First compares the names of member objects (relative path, from the specified group) and generates a report of objects that appear in only one group or in both groups. Common objects are then compared recursively. - 2) Datasets + 2) Datasets Array rank and dimensions, datatypes, and data values are compared. - 3) Datatypes + 3) Datatypes The comparison is based on the return value of H5Tequal. - 4) Symbolic links + 4) Symbolic links The paths to the target objects are compared. (The option --follow-symlinks overrides the default behavior when symbolic links are compared.). diff --git a/tools/test/h5diff/testfiles/h5diff_621.txt b/tools/test/h5diff/testfiles/h5diff_621.txt index fd8c680..b2a5881 100644 --- a/tools/test/h5diff/testfiles/h5diff_621.txt +++ b/tools/test/h5diff/testfiles/h5diff_621.txt @@ -1,5 +1,5 @@ <-n -4> is not a valid option -usage: h5diff [OPTIONS] file1 file2 [obj1[ obj2]] +usage: h5diff [OPTIONS] file1 file2 [obj1[ obj2]] file1 File name of the first HDF5 file file2 File name of the second HDF5 file [obj1] Name of an HDF5 object, in absolute path @@ -60,19 +60,22 @@ usage: h5diff [OPTIONS] file1 file2 [obj1[ obj2]] -n C, --count=C Print differences up to C. C must be a positive integer. -d D, --delta=D - Print difference if (|a-b| > D). D must be a positive number. + Print difference if (|a-b| > D). D must be a positive number. Where a + is the data point value in file1 and b is the data point value in file2. Can not use with '-p' or '--use-system-epsilon'. -p R, --relative=R - Print difference if (|(a-b)/b| > R). R must be a positive number. + Print difference if (|(a-b)/b| > R). R must be a positive number. Where a + is the data point value in file1 and b is the data point value in file2. Can not use with '-d' or '--use-system-epsilon'. --use-system-epsilon - Print difference if (|a-b| > EPSILON), EPSILON is system defined value. + Print difference if (|a-b| > EPSILON), EPSILON is system defined value. Where a + is the data point value in file1 and b is the data point value in file2. If the system epsilon is not defined,one of the following predefined values will be used: FLT_EPSILON = 1.19209E-07 for floating-point type DBL_EPSILON = 2.22045E-16 for double precision type Can not use with '-p' or '-d'. - --exclude-path "path" + --exclude-path "path" Exclude the specified path to an object when comparing files or groups. If a group is excluded, all member objects will also be excluded. The specified path is excluded wherever it occurs. @@ -107,15 +110,15 @@ usage: h5diff [OPTIONS] file1 file2 [obj1[ obj2]] common objects. Object comparison: - 1) Groups + 1) Groups First compares the names of member objects (relative path, from the specified group) and generates a report of objects that appear in only one group or in both groups. Common objects are then compared recursively. - 2) Datasets + 2) Datasets Array rank and dimensions, datatypes, and data values are compared. - 3) Datatypes + 3) Datatypes The comparison is based on the return value of H5Tequal. - 4) Symbolic links + 4) Symbolic links The paths to the target objects are compared. (The option --follow-symlinks overrides the default behavior when symbolic links are compared.). diff --git a/tools/test/h5diff/testfiles/h5diff_622.txt b/tools/test/h5diff/testfiles/h5diff_622.txt index f0d38af..66a3025 100644 --- a/tools/test/h5diff/testfiles/h5diff_622.txt +++ b/tools/test/h5diff/testfiles/h5diff_622.txt @@ -1,5 +1,5 @@ <-n 0> is not a valid option -usage: h5diff [OPTIONS] file1 file2 [obj1[ obj2]] +usage: h5diff [OPTIONS] file1 file2 [obj1[ obj2]] file1 File name of the first HDF5 file file2 File name of the second HDF5 file [obj1] Name of an HDF5 object, in absolute path @@ -60,19 +60,22 @@ usage: h5diff [OPTIONS] file1 file2 [obj1[ obj2]] -n C, --count=C Print differences up to C. C must be a positive integer. -d D, --delta=D - Print difference if (|a-b| > D). D must be a positive number. + Print difference if (|a-b| > D). D must be a positive number. Where a + is the data point value in file1 and b is the data point value in file2. Can not use with '-p' or '--use-system-epsilon'. -p R, --relative=R - Print difference if (|(a-b)/b| > R). R must be a positive number. + Print difference if (|(a-b)/b| > R). R must be a positive number. Where a + is the data point value in file1 and b is the data point value in file2. Can not use with '-d' or '--use-system-epsilon'. --use-system-epsilon - Print difference if (|a-b| > EPSILON), EPSILON is system defined value. + Print difference if (|a-b| > EPSILON), EPSILON is system defined value. Where a + is the data point value in file1 and b is the data point value in file2. If the system epsilon is not defined,one of the following predefined values will be used: FLT_EPSILON = 1.19209E-07 for floating-point type DBL_EPSILON = 2.22045E-16 for double precision type Can not use with '-p' or '-d'. - --exclude-path "path" + --exclude-path "path" Exclude the specified path to an object when comparing files or groups. If a group is excluded, all member objects will also be excluded. The specified path is excluded wherever it occurs. @@ -107,15 +110,15 @@ usage: h5diff [OPTIONS] file1 file2 [obj1[ obj2]] common objects. Object comparison: - 1) Groups + 1) Groups First compares the names of member objects (relative path, from the specified group) and generates a report of objects that appear in only one group or in both groups. Common objects are then compared recursively. - 2) Datasets + 2) Datasets Array rank and dimensions, datatypes, and data values are compared. - 3) Datatypes + 3) Datatypes The comparison is based on the return value of H5Tequal. - 4) Symbolic links + 4) Symbolic links The paths to the target objects are compared. (The option --follow-symlinks overrides the default behavior when symbolic links are compared.). diff --git a/tools/test/h5diff/testfiles/h5diff_623.txt b/tools/test/h5diff/testfiles/h5diff_623.txt index 4ab66a5..f9258d1 100644 --- a/tools/test/h5diff/testfiles/h5diff_623.txt +++ b/tools/test/h5diff/testfiles/h5diff_623.txt @@ -1,5 +1,5 @@ <-n u> is not a valid option -usage: h5diff [OPTIONS] file1 file2 [obj1[ obj2]] +usage: h5diff [OPTIONS] file1 file2 [obj1[ obj2]] file1 File name of the first HDF5 file file2 File name of the second HDF5 file [obj1] Name of an HDF5 object, in absolute path @@ -60,19 +60,22 @@ usage: h5diff [OPTIONS] file1 file2 [obj1[ obj2]] -n C, --count=C Print differences up to C. C must be a positive integer. -d D, --delta=D - Print difference if (|a-b| > D). D must be a positive number. + Print difference if (|a-b| > D). D must be a positive number. Where a + is the data point value in file1 and b is the data point value in file2. Can not use with '-p' or '--use-system-epsilon'. -p R, --relative=R - Print difference if (|(a-b)/b| > R). R must be a positive number. + Print difference if (|(a-b)/b| > R). R must be a positive number. Where a + is the data point value in file1 and b is the data point value in file2. Can not use with '-d' or '--use-system-epsilon'. --use-system-epsilon - Print difference if (|a-b| > EPSILON), EPSILON is system defined value. + Print difference if (|a-b| > EPSILON), EPSILON is system defined value. Where a + is the data point value in file1 and b is the data point value in file2. If the system epsilon is not defined,one of the following predefined values will be used: FLT_EPSILON = 1.19209E-07 for floating-point type DBL_EPSILON = 2.22045E-16 for double precision type Can not use with '-p' or '-d'. - --exclude-path "path" + --exclude-path "path" Exclude the specified path to an object when comparing files or groups. If a group is excluded, all member objects will also be excluded. The specified path is excluded wherever it occurs. @@ -107,15 +110,15 @@ usage: h5diff [OPTIONS] file1 file2 [obj1[ obj2]] common objects. Object comparison: - 1) Groups + 1) Groups First compares the names of member objects (relative path, from the specified group) and generates a report of objects that appear in only one group or in both groups. Common objects are then compared recursively. - 2) Datasets + 2) Datasets Array rank and dimensions, datatypes, and data values are compared. - 3) Datatypes + 3) Datatypes The comparison is based on the return value of H5Tequal. - 4) Symbolic links + 4) Symbolic links The paths to the target objects are compared. (The option --follow-symlinks overrides the default behavior when symbolic links are compared.). diff --git a/tools/test/h5diff/testfiles/h5diff_624.txt b/tools/test/h5diff/testfiles/h5diff_624.txt index f5e7ee3..57a4ddd 100644 --- a/tools/test/h5diff/testfiles/h5diff_624.txt +++ b/tools/test/h5diff/testfiles/h5diff_624.txt @@ -1,5 +1,5 @@ <-n 0x1> is not a valid option -usage: h5diff [OPTIONS] file1 file2 [obj1[ obj2]] +usage: h5diff [OPTIONS] file1 file2 [obj1[ obj2]] file1 File name of the first HDF5 file file2 File name of the second HDF5 file [obj1] Name of an HDF5 object, in absolute path @@ -60,19 +60,22 @@ usage: h5diff [OPTIONS] file1 file2 [obj1[ obj2]] -n C, --count=C Print differences up to C. C must be a positive integer. -d D, --delta=D - Print difference if (|a-b| > D). D must be a positive number. + Print difference if (|a-b| > D). D must be a positive number. Where a + is the data point value in file1 and b is the data point value in file2. Can not use with '-p' or '--use-system-epsilon'. -p R, --relative=R - Print difference if (|(a-b)/b| > R). R must be a positive number. + Print difference if (|(a-b)/b| > R). R must be a positive number. Where a + is the data point value in file1 and b is the data point value in file2. Can not use with '-d' or '--use-system-epsilon'. --use-system-epsilon - Print difference if (|a-b| > EPSILON), EPSILON is system defined value. + Print difference if (|a-b| > EPSILON), EPSILON is system defined value. Where a + is the data point value in file1 and b is the data point value in file2. If the system epsilon is not defined,one of the following predefined values will be used: FLT_EPSILON = 1.19209E-07 for floating-point type DBL_EPSILON = 2.22045E-16 for double precision type Can not use with '-p' or '-d'. - --exclude-path "path" + --exclude-path "path" Exclude the specified path to an object when comparing files or groups. If a group is excluded, all member objects will also be excluded. The specified path is excluded wherever it occurs. @@ -107,15 +110,15 @@ usage: h5diff [OPTIONS] file1 file2 [obj1[ obj2]] common objects. Object comparison: - 1) Groups + 1) Groups First compares the names of member objects (relative path, from the specified group) and generates a report of objects that appear in only one group or in both groups. Common objects are then compared recursively. - 2) Datasets + 2) Datasets Array rank and dimensions, datatypes, and data values are compared. - 3) Datatypes + 3) Datatypes The comparison is based on the return value of H5Tequal. - 4) Symbolic links + 4) Symbolic links The paths to the target objects are compared. (The option --follow-symlinks overrides the default behavior when symbolic links are compared.). -- cgit v0.12 From 2e1b6a2a4d8f1d3a8eb503a8d30c6d91452b6282 Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Tue, 16 May 2017 09:28:49 -0500 Subject: HDFFV-10128 Fixed string length with no null fixed --- tools/lib/h5diff_array.c | 114 ++++++++++++++++++++++++++++++----------------- 1 file changed, 73 insertions(+), 41 deletions(-) diff --git a/tools/lib/h5diff_array.c b/tools/lib/h5diff_array.c index 49f41dc..499d5eb 100644 --- a/tools/lib/h5diff_array.c +++ b/tools/lib/h5diff_array.c @@ -623,6 +623,7 @@ static hsize_t diff_datum(void *_mem1, *------------------------------------------------------------------------- */ case H5T_COMPOUND: + h5difftrace("diff_datum H5T_COMPOUND\n"); nmembs = members->n; @@ -655,18 +656,21 @@ static hsize_t diff_datum(void *_mem1, *------------------------------------------------------------------------- */ case H5T_STRING: - + h5difftrace("diff_datum H5T_STRING\n"); { - H5T_str_t pad; - char *s; - char *s1; - char *s2; - size_t size1; - size_t size2; + char *s = NULL; + char *sx = NULL; + char *s1 = NULL; + char *s2 = NULL; + size_t size1; + size_t size2; + size_t sizex; + size_t size_mtype = H5Tget_size(m_type); + H5T_str_t pad = H5Tget_strpad(m_type); /* if variable length string */ - if(H5Tis_variable_str(m_type)) - { + if(H5Tis_variable_str(m_type)) { + h5difftrace("diff_datum H5T_STRING variable\n"); /* Get pointer to first string */ s1 = *(char**) mem1; size1 = HDstrlen(s1); @@ -674,14 +678,26 @@ static hsize_t diff_datum(void *_mem1, s2 = *(char**) mem2; size2 = HDstrlen(s2); } - else - { + else if (H5T_STR_NULLTERM == pad) { + h5difftrace("diff_datum H5T_STRING null term\n"); + /* Get pointer to first string */ + s1 = (char*) mem1; + size1 = HDstrlen(s1); + if (size1 > size_mtype) + size1 = size_mtype; + /* Get pointer to second string */ + s2 = (char*) mem2; + size2 = HDstrlen(s2); + if (size2 > size_mtype) + size2 = size_mtype; + } + else { /* Get pointer to first string */ s1 = (char *)mem1; - size1 = H5Tget_size(m_type); + size1 = size_mtype; /* Get pointer to second string */ s2 = (char *)mem2; - size2 = H5Tget_size(m_type); + size2 = size_mtype; } /* @@ -692,45 +708,59 @@ static hsize_t diff_datum(void *_mem1, */ h5diffdebug2("diff_datum string size:%d\n",size1); h5diffdebug2("diff_datum string size:%d\n",size2); - if(size1 != size2) - { + if(size1 != size2) { h5difftrace("diff_datum string sizes\n"); nfound++; } - if(size1 < size2) - { + if(size1 < size2) { size = size1; s = s1; + sizex = size2; + sx = s2; } - else - { + else { size = size2; s = s2; + sizex = size1; + sx = s1; } /* check for NULL pointer for string */ - if(s!=NULL) - { + if(s!=NULL) { /* try fast compare first */ - if (HDmemcmp(s1, s2, size)==0) - break; - - pad = H5Tget_strpad(m_type); - - for (u=0; u Date: Tue, 16 May 2017 15:56:51 -0500 Subject: HDFFV-9055 Handle H5T_ARRAY types Create variables just for diff_array function Whitespace updates --- tools/lib/h5diff_dset.c | 428 +++++++++++++++++++----------------------------- 1 file changed, 171 insertions(+), 257 deletions(-) diff --git a/tools/lib/h5diff_dset.c b/tools/lib/h5diff_dset.c index d8eadda..2ac93ab 100644 --- a/tools/lib/h5diff_dset.c +++ b/tools/lib/h5diff_dset.c @@ -44,6 +44,7 @@ hsize_t diff_dataset( hid_t file1_id, hid_t dcpl2 = -1; hsize_t nfound = 0; + h5difftrace("diff_dataset start\n"); /*------------------------------------------------------------------------- * open the handles *------------------------------------------------------------------------- @@ -52,13 +53,11 @@ hsize_t diff_dataset( hid_t file1_id, H5E_BEGIN_TRY { /* Open the datasets */ - if((did1 = H5Dopen2(file1_id, obj1_name, H5P_DEFAULT)) < 0) - { + if((did1 = H5Dopen2(file1_id, obj1_name, H5P_DEFAULT)) < 0) { parallel_print("Cannot open dataset <%s>\n", obj1_name); goto error; } - if((did2 = H5Dopen2(file2_id, obj2_name, H5P_DEFAULT)) < 0) - { + if((did2 = H5Dopen2(file2_id, obj2_name, H5P_DEFAULT)) < 0) { parallel_print("Cannot open dataset <%s>\n", obj2_name); goto error; } @@ -78,15 +77,9 @@ hsize_t diff_dataset( hid_t file1_id, * 2) the internal filters might be turned off *------------------------------------------------------------------------- */ - if ((h5tools_canreadf((options->m_verbose?obj1_name:NULL),dcpl1)==1) && - (h5tools_canreadf((options->m_verbose?obj2_name:NULL),dcpl2)==1)) - { - nfound=diff_datasetid(did1, - did2, - obj1_name, - obj2_name, - options); - } + if ((h5tools_canreadf((options->m_verbose ? obj1_name : NULL), dcpl1) == 1) && + (h5tools_canreadf((options->m_verbose ? obj2_name : NULL), dcpl2) == 1)) + nfound = diff_datasetid(did1, did2, obj1_name, obj2_name, options); else goto error; @@ -94,20 +87,12 @@ hsize_t diff_dataset( hid_t file1_id, * close *------------------------------------------------------------------------- */ - /* disable error reporting */ - H5E_BEGIN_TRY { - H5Pclose(dcpl1); - H5Pclose(dcpl2); - H5Dclose(did1); - H5Dclose(did2); - /* enable error reporting */ - } H5E_END_TRY; - - - return nfound; + goto done; error: - options->err_stat=1; + options->err_stat = 1; + +done: /* disable error reporting */ H5E_BEGIN_TRY { H5Pclose(dcpl1); @@ -117,6 +102,7 @@ error: /* enable error reporting */ } H5E_END_TRY; + h5difftrace("diff_dataset end\n"); return nfound; } @@ -188,20 +174,24 @@ hsize_t diff_datasetid( hid_t did1, hid_t sid2=-1; hid_t f_tid1=-1; hid_t f_tid2=-1; + hid_t dam_tid=-1; /* m_tid for diff_array function */ hid_t m_tid1=-1; hid_t m_tid2=-1; hid_t dcpl1 = -1; hid_t dcpl2 = -1; H5D_layout_t stl1 = -1; H5D_layout_t stl2 = -1; + size_t dam_size; /* m_size for diff_array function */ size_t m_size1; size_t m_size2; H5T_sign_t sign1; H5T_sign_t sign2; int rank1; int rank2; + hsize_t danelmts; /* nelmts for diff_array function */ hsize_t nelmts1; hsize_t nelmts2; + hsize_t *dadims; /* dims for diff_array function */ hsize_t dims1[H5S_MAX_RANK]; hsize_t dims2[H5S_MAX_RANK]; hsize_t maxdim1[H5S_MAX_RANK]; @@ -223,30 +213,29 @@ hsize_t diff_datasetid( hid_t did1, h5difftrace("diff_datasetid start\n"); /* Get the dataspace handle */ - if ( (sid1 = H5Dget_space(did1)) < 0 ) + if((sid1 = H5Dget_space(did1)) < 0) goto error; /* Get rank */ - if ( (rank1 = H5Sget_simple_extent_ndims(sid1)) < 0 ) + if((rank1 = H5Sget_simple_extent_ndims(sid1)) < 0) goto error; /* Get the dataspace handle */ - if ( (sid2 = H5Dget_space(did2)) < 0 ) + if((sid2 = H5Dget_space(did2)) < 0 ) goto error; /* Get rank */ - if ( (rank2 = H5Sget_simple_extent_ndims(sid2)) < 0 ) + if((rank2 = H5Sget_simple_extent_ndims(sid2)) < 0) goto error; /* Get dimensions */ - if ( H5Sget_simple_extent_dims(sid1,dims1,maxdim1) < 0 ) + if(H5Sget_simple_extent_dims(sid1, dims1, maxdim1) < 0) goto error; /* Get dimensions */ - if ( H5Sget_simple_extent_dims(sid2,dims2,maxdim2) < 0 ) - { + if(H5Sget_simple_extent_dims(sid2, dims2, maxdim2) < 0) goto error; - } + h5diffdebug3("rank: %ld - %ld\n", rank1, rank2); /*------------------------------------------------------------------------- * get the file data type @@ -254,15 +243,12 @@ hsize_t diff_datasetid( hid_t did1, */ /* Get the data type */ - if ( (f_tid1 = H5Dget_type(did1)) < 0 ) + if((f_tid1 = H5Dget_type(did1)) < 0) goto error; /* Get the data type */ - if ( (f_tid2 = H5Dget_type(did2)) < 0 ) - { + if((f_tid2 = H5Dget_type(did2)) < 0) goto error; - } - /*------------------------------------------------------------------------- * get the storage layout type @@ -284,22 +270,20 @@ hsize_t diff_datasetid( hid_t did1, */ h5difftrace("check for empty datasets\n"); - storage_size1=H5Dget_storage_size(did1); - storage_size2=H5Dget_storage_size(did2); + storage_size1 = H5Dget_storage_size(did1); + storage_size2 = H5Dget_storage_size(did2); + h5diffdebug3("storage size: %ld - %ld\n", storage_size1, storage_size2); - if (storage_size1==0 || storage_size2==0) - { - if (stl1==H5D_VIRTUAL || stl2==H5D_VIRTUAL) - { - if ( (options->m_verbose||options->m_list_not_cmp) && obj1_name && obj2_name) + if(storage_size1 == 0 || storage_size2 == 0) { + if(stl1 == H5D_VIRTUAL || stl2 == H5D_VIRTUAL) { + if((options->m_verbose||options->m_list_not_cmp) && obj1_name && obj2_name) parallel_print("Warning: <%s> or <%s> is a virtual dataset\n", obj1_name, obj2_name); } - else - { - if ( (options->m_verbose||options->m_list_not_cmp) && obj1_name && obj2_name) + else { + if((options->m_verbose || options->m_list_not_cmp) && obj1_name && obj2_name) parallel_print("Not comparable: <%s> or <%s> is an empty dataset\n", obj1_name, obj2_name); - can_compare=0; - options->not_cmp=1; + can_compare = 0; + options->not_cmp = 1; } } @@ -307,72 +291,59 @@ hsize_t diff_datasetid( hid_t did1, * check for comparable TYPE and SPACE *------------------------------------------------------------------------- */ - - if (diff_can_type(f_tid1, - f_tid2, - rank1, - rank2, - dims1, - dims2, - maxdim1, - maxdim2, - obj1_name, - obj2_name, - options, - 0)!=1) - { - can_compare=0; - } + if (diff_can_type(f_tid1, f_tid2, rank1, rank2, + dims1, dims2, maxdim1, maxdim2, + obj1_name, obj2_name, + options, 0) != 1) + can_compare = 0; /*------------------------------------------------------------------------- * memory type and sizes *------------------------------------------------------------------------- */ h5difftrace("check for memory type and sizes\n"); - if ((m_tid1=h5tools_get_native_type(f_tid1)) < 0) + if((m_tid1 = H5Tget_native_type(f_tid1, H5T_DIR_DEFAULT)) < 0) goto error; - if ((m_tid2=h5tools_get_native_type(f_tid2)) < 0) + if((m_tid2 = H5Tget_native_type(f_tid2, H5T_DIR_DEFAULT)) < 0) goto error; - m_size1 = H5Tget_size( m_tid1 ); - m_size2 = H5Tget_size( m_tid2 ); + m_size1 = H5Tget_size(m_tid1); + m_size2 = H5Tget_size(m_tid2); + h5diffdebug3("type size: %ld - %ld\n", m_size1, m_size2); /*------------------------------------------------------------------------- * check for different signed/unsigned types *------------------------------------------------------------------------- */ - if (can_compare) - { + if(can_compare) { h5difftrace("can_compare for sign\n"); - sign1=H5Tget_sign(m_tid1); - sign2=H5Tget_sign(m_tid2); - if ( sign1 != sign2 ) - { + sign1 = H5Tget_sign(m_tid1); + sign2 = H5Tget_sign(m_tid2); + if(sign1 != sign2) { h5difftrace("sign1 != sign2\n"); - if ((options->m_verbose||options->m_list_not_cmp) && obj1_name && obj2_name) - { + if((options->m_verbose || options->m_list_not_cmp) && obj1_name && obj2_name) { parallel_print("Not comparable: <%s> has sign %s ", obj1_name, get_sign(sign1)); parallel_print("and <%s> has sign %s\n", obj2_name, get_sign(sign2)); } - can_compare=0; - options->not_cmp=1; + can_compare = 0; + options->not_cmp = 1; } } /* Check if type is either VLEN-data or VLEN-string to reclaim any * VLEN memory buffer later */ - if( TRUE == h5tools_detect_vlen(m_tid1) ) + if(TRUE == h5tools_detect_vlen(m_tid1)) vl_data = TRUE; /*------------------------------------------------------------------------ * only attempt to compare if possible *------------------------------------------------------------------------- */ - if(can_compare) /* it is possible to compare */ - { + if(can_compare) { /* it is possible to compare */ h5difftrace("can_compare attempt\n"); + H5T_class_t tclass = H5Tget_class(f_tid1); /*----------------------------------------------------------------- * get number of elements @@ -386,19 +357,44 @@ hsize_t diff_datasetid( hid_t did1, for(i = 0; i < rank2; i++) nelmts2 *= dims2[i]; + h5diffdebug3("nelmts: %ld - %ld\n", nelmts1, nelmts2); HDassert(nelmts1 == nelmts2); - /*----------------------------------------------------------------- - * "upgrade" the smaller memory size - *------------------------------------------------------------------ - */ - h5difftrace("upgrade the smaller memory size?\n"); - - if (FAIL == match_up_memsize (f_tid1, f_tid2, - &m_tid1, &m_tid2, - &m_size1, &m_size2)) - goto error; - + if(tclass != H5T_ARRAY) { + /*----------------------------------------------------------------- + * "upgrade" the smaller memory size + *------------------------------------------------------------------ + */ + h5difftrace("upgrade the smaller memory size?\n"); + if (FAIL == match_up_memsize (f_tid1, f_tid2, + &m_tid1, &m_tid2, + &m_size1, &m_size2)) + goto error; + h5diffdebug3("m_size: %ld - %ld\n", m_size1, m_size2); + dadims = dims1; + dam_size = m_size1; + dam_tid = m_tid1; + danelmts = nelmts1; + need = (size_t)(nelmts1 * m_size1); /* bytes needed */ + } + else { + h5diffdebug3("Array dims: %d - %d\n", dims1[0], dims2[0]); + /* Compare the smallest array, but create the largest buffer */ + if(m_size1 <= m_size2) { + dadims = dims1; + dam_size = m_size1; + dam_tid = m_tid1; + danelmts = nelmts1; + need = (size_t)(nelmts2 * m_size2); /* bytes needed */ + } + else { + dadims = dims2; + dam_size = m_size2; + dam_tid = m_tid2; + danelmts = nelmts2; + need = (size_t)(nelmts1 * m_size1); /* bytes needed */ + } + } /* print names */ if(obj1_name) name1 = diff_basename(obj1_name); @@ -410,7 +406,6 @@ hsize_t diff_datasetid( hid_t did1, * read/compare *----------------------------------------------------------------- */ - need = (size_t)(nelmts1 * m_size1); /* bytes needed */ if(need < H5TOOLS_MALLOCSIZE) { buf1 = HDmalloc(need); buf2 = HDmalloc(need); @@ -420,12 +415,13 @@ hsize_t diff_datasetid( hid_t did1, h5difftrace("buf1 != NULL && buf2 != NULL\n"); if(H5Dread(did1, m_tid1, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf1) < 0) goto error; + h5difftrace("H5Dread did2\n"); if(H5Dread(did2, m_tid2, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf2) < 0) goto error; /* array diff */ - nfound = diff_array(buf1, buf2, nelmts1, (hsize_t)0, rank1, dims1, - options, name1, name2, m_tid1, did1, did2); + nfound = diff_array(buf1, buf2, danelmts, (hsize_t)0, rank1, dadims, + options, name1, name2, dam_tid, did1, did2); /* reclaim any VL memory, if necessary */ if(vl_data) { @@ -433,10 +429,9 @@ hsize_t diff_datasetid( hid_t did1, H5Dvlen_reclaim(m_tid2, sid2, H5P_DEFAULT, buf2); } /* end if */ } /* end if */ - else /* possibly not enough memory, read/compare by hyperslabs */ - { - size_t p_type_nbytes = m_size1; /*size of memory type */ - hsize_t p_nelmts = nelmts1; /*total selected elmts */ + else { /* possibly not enough memory, read/compare by hyperslabs */ + size_t p_type_nbytes = dam_size; /*size of memory type */ + hsize_t p_nelmts = danelmts; /*total selected elmts */ hsize_t elmtno; /*counter */ int carry; /*counter carry value */ @@ -462,7 +457,7 @@ hsize_t diff_datasetid( hid_t did1, if(size == 0) /* datum size > H5TOOLS_BUFSIZE */ size = 1; - sm_size[i - 1] = MIN(dims1[i - 1], size); + sm_size[i - 1] = MIN(dadims[i - 1], size); sm_nbytes *= sm_size[i - 1]; HDassert(sm_nbytes > 0); } /* end for */ @@ -490,7 +485,7 @@ hsize_t diff_datasetid( hid_t did1, /* calculate the hyperslab size */ if(rank1 > 0) { for(i = 0, hs_nelmts = 1; i < rank1; i++) { - hs_size[i] = MIN(dims1[i] - hs_offset[i], sm_size[i]); + hs_size[i] = MIN(dadims[i] - hs_offset[i], sm_size[i]); hs_nelmts *= hs_size[i]; } /* end for */ if(H5Sselect_hyperslab(sid1, H5S_SELECT_SET, hs_offset, NULL, hs_size, NULL) < 0) @@ -503,15 +498,15 @@ hsize_t diff_datasetid( hid_t did1, else hs_nelmts = 1; - if(H5Dread(did1,m_tid1,sm_space,sid1,H5P_DEFAULT,sm_buf1) < 0) + if(H5Dread(did1, m_tid1, sm_space, sid1, H5P_DEFAULT, sm_buf1) < 0) goto error; - if(H5Dread(did2,m_tid2,sm_space,sid2,H5P_DEFAULT,sm_buf2) < 0) + if(H5Dread(did2, m_tid2, sm_space, sid2, H5P_DEFAULT, sm_buf2) < 0) goto error; /* get array differences. in the case of hyperslab read, increment the number of differences - found in each hyperslab and pass the position at the beggining for printing */ + found in each hyperslab and pass the position at the beginning for printing */ nfound += diff_array(sm_buf1, sm_buf2, hs_nelmts, elmtno, rank1, - dims1, options, name1, name2, m_tid1, did1, did2); + dadims, options, name1, name2, dam_tid, did1, did2); /* reclaim any VL memory, if necessary */ if(vl_data) { @@ -522,7 +517,7 @@ hsize_t diff_datasetid( hid_t did1, /* calculate the next hyperslab offset */ for(i = rank1, carry = 1; i > 0 && carry; --i) { hs_offset[i - 1] += hs_size[i - 1]; - if(hs_offset[i - 1] == dims1[i - 1]) + if(hs_offset[i - 1] == dadims[i - 1]) hs_offset[i - 1] = 0; else carry = 0; @@ -574,37 +569,33 @@ error: options->err_stat=1; /* free */ - if (buf1!=NULL) - { + if(buf1 != NULL) { /* reclaim any VL memory, if necessary */ if(vl_data) H5Dvlen_reclaim(m_tid1, sid1, H5P_DEFAULT, buf1); HDfree(buf1); - buf1=NULL; + buf1 = NULL; } - if (buf2!=NULL) - { + if(buf2 != NULL) { /* reclaim any VL memory, if necessary */ if(vl_data) H5Dvlen_reclaim(m_tid2, sid2, H5P_DEFAULT, buf2); HDfree(buf2); - buf2=NULL; + buf2 = NULL; } - if (sm_buf1!=NULL) - { + if(sm_buf1 != NULL) { /* reclaim any VL memory, if necessary */ if(vl_data) H5Dvlen_reclaim(m_tid1, sm_space, H5P_DEFAULT, sm_buf1); HDfree(sm_buf1); - sm_buf1=NULL; + sm_buf1 = NULL; } - if (sm_buf2!=NULL) - { + if(sm_buf2 != NULL) { /* reclaim any VL memory, if necessary */ if(vl_data) H5Dvlen_reclaim(m_tid1, sm_space, H5P_DEFAULT, sm_buf2); HDfree(sm_buf2); - sm_buf2=NULL; + sm_buf2 = NULL; } /* disable error reporting */ @@ -652,75 +643,55 @@ int diff_can_type( hid_t f_tid1, /* file data type */ diff_opt_t *options, int is_compound) { - - H5T_class_t tclass1; H5T_class_t tclass2; - int maxdim_diff=0; /* maximum dimensions are different */ - int dim_diff=0; /* current dimensions are different */ + int maxdim_diff = 0; /* maximum dimensions are different */ + int dim_diff = 0; /* current dimensions are different */ int i; - int can_compare = 1; /* return value */ + int can_compare = 1; /* return value */ + h5difftrace("diff_can_type start\n"); /*------------------------------------------------------------------------- * check for the same class *------------------------------------------------------------------------- */ - - if ((tclass1=H5Tget_class(f_tid1)) < 0) + if((tclass1 = H5Tget_class(f_tid1)) < 0) return -1; - - if ((tclass2=H5Tget_class(f_tid2)) < 0) + if((tclass2 = H5Tget_class(f_tid2)) < 0) return -1; - if ( tclass1 != tclass2 ) - { - - if ( (options->m_verbose||options->m_list_not_cmp) && obj1_name && obj2_name) - { - - if ( is_compound ) - { - + if(tclass1 != tclass2) { + if((options->m_verbose || options->m_list_not_cmp) && obj1_name && obj2_name) { + if(is_compound) { parallel_print("Not comparable: <%s> has a class %s and <%s> has a class %s\n", - obj1_name, get_class(tclass1), - obj2_name, get_class(tclass2) ); - + obj1_name, get_class(tclass1), + obj2_name, get_class(tclass2)); } - - else - - { - + else { parallel_print("Not comparable: <%s> is of class %s and <%s> is of class %s\n", - obj1_name, get_class(tclass1), - obj2_name, get_class(tclass2) ); - + obj1_name, get_class(tclass1), + obj2_name, get_class(tclass2)); } - } - - can_compare = 0; options->not_cmp = 1; - return can_compare; + goto done; } /*------------------------------------------------------------------------- * check for non supported classes *------------------------------------------------------------------------- */ - - HDassert(tclass1==tclass2); - switch (tclass1) - { + HDassert(tclass1 == tclass2); + switch (tclass1) { case H5T_TIME: - if ( (options->m_verbose||options->m_list_not_cmp) && obj1_name && obj2_name) { + if((options->m_verbose || options->m_list_not_cmp) && obj1_name && obj2_name) { parallel_print("Not comparable: <%s> and <%s> are of class %s\n", - obj1_name,obj2_name,get_class(tclass2) ); + obj1_name, obj2_name, get_class(tclass2)); } /* end if */ can_compare = 0; options->not_cmp = 1; - return can_compare; + goto done; case H5T_INTEGER: case H5T_FLOAT: @@ -735,6 +706,7 @@ int diff_can_type( hid_t f_tid1, /* file data type */ case H5T_NO_CLASS: case H5T_NCLASSES: default: + h5diffdebug2("diff_can_type class - %s\n", get_class(tclass1)); break; } /* end switch */ @@ -742,17 +714,11 @@ int diff_can_type( hid_t f_tid1, /* file data type */ * check for equal file datatype; warning only *------------------------------------------------------------------------- */ - - if ( (H5Tequal(f_tid1, f_tid2)==0) && - (options->m_verbose) && obj1_name && obj2_name) - { - + if((H5Tequal(f_tid1, f_tid2) == 0) && (options->m_verbose) && obj1_name && obj2_name) { H5T_class_t cl = H5Tget_class(f_tid1); - parallel_print("Warning: different storage datatype\n"); - if ( cl == H5T_INTEGER || cl == H5T_FLOAT ) - { + if(cl == H5T_INTEGER || cl == H5T_FLOAT) { parallel_print("<%s> has file datatype ", obj1_name); print_type(f_tid1); parallel_print("\n"); @@ -760,110 +726,85 @@ int diff_can_type( hid_t f_tid1, /* file data type */ print_type(f_tid2); parallel_print("\n"); } - - - } /*------------------------------------------------------------------------- * check for the same rank *------------------------------------------------------------------------- */ - - - if ( rank1 != rank2 ) - { - - if ( (options->m_verbose||options->m_list_not_cmp) && obj1_name && obj2_name) - { + if(rank1 != rank2) { + if((options->m_verbose || options->m_list_not_cmp) && obj1_name && obj2_name) { parallel_print("Not comparable: <%s> has rank %d, dimensions ", obj1_name, rank1); - print_dimensions(rank1,dims1); + print_dimensions(rank1, dims1); parallel_print(", max dimensions "); - print_dimensions(rank1,maxdim1); + print_dimensions(rank1, maxdim1); parallel_print("\n" ); parallel_print("and <%s> has rank %d, dimensions ", obj2_name, rank2); - print_dimensions(rank2,dims2); + print_dimensions(rank2, dims2); parallel_print(", max dimensions "); - print_dimensions(rank2,maxdim2); + print_dimensions(rank2, maxdim2); parallel_print("\n"); } - can_compare = 0; options->not_cmp = 1; - return can_compare; + goto done; } /*------------------------------------------------------------------------- * check for different dimensions *------------------------------------------------------------------------- */ - - HDassert(rank1==rank2); - for ( i=0; im_verbose||options->m_list_not_cmp) && obj1_name && obj2_name) - { + if(dim_diff == 1) { + if((options->m_verbose || options->m_list_not_cmp) && obj1_name && obj2_name) { parallel_print("Not comparable: <%s> has rank %d, dimensions ", obj1_name, rank1); - print_dimensions(rank1,dims1); - if (maxdim1 && maxdim2) - { + print_dimensions(rank1, dims1); + if(maxdim1 && maxdim2) { parallel_print(", max dimensions "); - print_dimensions(rank1,maxdim1); + print_dimensions(rank1, maxdim1); parallel_print("\n" ); parallel_print("and <%s> has rank %d, dimensions ", obj2_name, rank2); - print_dimensions(rank2,dims2); + print_dimensions(rank2, dims2); parallel_print(", max dimensions "); - print_dimensions(rank2,maxdim2); + print_dimensions(rank2, maxdim2); parallel_print("\n"); } } - - can_compare = 0; options->not_cmp = 1; - return can_compare; - - - + goto done; } /*------------------------------------------------------------------------- * maximum dimensions; just give a warning *------------------------------------------------------------------------- */ - if (maxdim1 && maxdim2 && maxdim_diff==1 && obj1_name ) - { - if (options->m_verbose) { + if(maxdim1 && maxdim2 && maxdim_diff == 1 && obj1_name) { + if(options->m_verbose) { parallel_print( "Warning: different maximum dimensions\n"); parallel_print("<%s> has max dimensions ", obj1_name); - print_dimensions(rank1,maxdim1); + print_dimensions(rank1, maxdim1); parallel_print("\n"); parallel_print("<%s> has max dimensions ", obj2_name); - print_dimensions(rank2,maxdim2); + print_dimensions(rank2, maxdim2); parallel_print("\n"); } } - - if ( tclass1 == H5T_COMPOUND ) - { - + if(tclass1 == H5T_COMPOUND) { int nmembs1; int nmembs2; int j; @@ -873,67 +814,40 @@ int diff_can_type( hid_t f_tid1, /* file data type */ nmembs1 = H5Tget_nmembers(f_tid1); nmembs2 = H5Tget_nmembers(f_tid2); - if ( nmembs1 != nmembs2 ) - { - - if ( (options->m_verbose||options->m_list_not_cmp) && obj1_name && obj2_name) - { + if(nmembs1 != nmembs2) { + if((options->m_verbose || options->m_list_not_cmp) && obj1_name && obj2_name) { parallel_print("Not comparable: <%s> has %d members ", obj1_name, nmembs1); parallel_print("<%s> has %d members ", obj2_name, nmembs2); parallel_print("\n"); } - can_compare = 0; options->not_cmp = 1; - return can_compare; + goto done; } - for (j = 0; j < nmembs1; j++) - { + for (j = 0; j < nmembs1; j++) { memb_type1 = H5Tget_member_type(f_tid1, (unsigned)j); memb_type2 = H5Tget_member_type(f_tid2, (unsigned)j); - if (diff_can_type(memb_type1, - memb_type2, - rank1, - rank2, - dims1, - dims2, - maxdim1, - maxdim2, - obj1_name, - obj2_name, - options, - 1)!=1) - { + if (diff_can_type(memb_type1, memb_type2, rank1, rank2, + dims1, dims2, maxdim1, maxdim2, obj1_name, obj2_name, + options, 1) != 1) { can_compare = 0; options->not_cmp = 1; H5Tclose(memb_type1); H5Tclose(memb_type2); - return can_compare; + goto done; } - H5Tclose(memb_type1); H5Tclose(memb_type2); - } - - - - - } - - - - - +done: + h5diffdebug2("diff_can_type end - %d\n", can_compare); return can_compare; } - - /*------------------------------------------------------------------------- * Function: print_sizes * -- cgit v0.12 From 68ec8c4f6c637b95914bd8543be4a37f5f1a7d47 Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Wed, 17 May 2017 10:06:17 -0500 Subject: HDFFV-9055 add test files --- MANIFEST | 3 ++ tools/test/h5diff/CMakeTests.cmake | 16 +++++++++++ tools/test/h5diff/h5diffgentest.c | 43 +++++++++++++++++++++++----- tools/test/h5diff/testfiles/h5diff_800.txt | 12 ++++++++ tools/test/h5diff/testfiles/h5diff_801.txt | 13 +++++++++ tools/test/h5diff/testfiles/h5diff_dset3.h5 | Bin 0 -> 23416 bytes 6 files changed, 80 insertions(+), 7 deletions(-) create mode 100644 tools/test/h5diff/testfiles/h5diff_800.txt create mode 100644 tools/test/h5diff/testfiles/h5diff_801.txt create mode 100644 tools/test/h5diff/testfiles/h5diff_dset3.h5 diff --git a/MANIFEST b/MANIFEST index 35d3c2e..434a857 100644 --- a/MANIFEST +++ b/MANIFEST @@ -2238,6 +2238,8 @@ ./tools/test/h5diff/testfiles/h5diff_709.txt ./tools/test/h5diff/testfiles/h5diff_710.txt ./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_90.txt ./tools/test/h5diff/testfiles/h5diff_100.txt ./tools/test/h5diff/testfiles/h5diff_101.txt @@ -2348,6 +2350,7 @@ ./tools/test/h5diff/testfiles/h5diff_basic2.h5 ./tools/test/h5diff/testfiles/h5diff_dset1.h5 ./tools/test/h5diff/testfiles/h5diff_dset2.h5 +./tools/test/h5diff/testfiles/h5diff_dset3.h5 ./tools/test/h5diff/testfiles/h5diff_dtypes.h5 ./tools/test/h5diff/testfiles/h5diff_empty.h5 ./tools/test/h5diff/testfiles/h5diff_hyper1.h5 diff --git a/tools/test/h5diff/CMakeTests.cmake b/tools/test/h5diff/CMakeTests.cmake index f6cd2dd..72dda6b 100644 --- a/tools/test/h5diff/CMakeTests.cmake +++ b/tools/test/h5diff/CMakeTests.cmake @@ -28,6 +28,7 @@ ${HDF5_TOOLS_TEST_H5DIFF_SOURCE_DIR}/testfiles/h5diff_attr2.h5 ${HDF5_TOOLS_TEST_H5DIFF_SOURCE_DIR}/testfiles/h5diff_dset1.h5 ${HDF5_TOOLS_TEST_H5DIFF_SOURCE_DIR}/testfiles/h5diff_dset2.h5 + ${HDF5_TOOLS_TEST_H5DIFF_SOURCE_DIR}/testfiles/h5diff_dset3.h5 ${HDF5_TOOLS_TEST_H5DIFF_SOURCE_DIR}/testfiles/h5diff_hyper1.h5 ${HDF5_TOOLS_TEST_H5DIFF_SOURCE_DIR}/testfiles/h5diff_hyper2.h5 ${HDF5_TOOLS_TEST_H5DIFF_SOURCE_DIR}/testfiles/h5diff_empty.h5 @@ -275,6 +276,8 @@ ${HDF5_TOOLS_TEST_H5DIFF_SOURCE_DIR}/testfiles/h5diff_709.txt ${HDF5_TOOLS_TEST_H5DIFF_SOURCE_DIR}/testfiles/h5diff_710.txt ${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_90.txt ${HDF5_TOOLS_TEST_H5DIFF_SOURCE_DIR}/testfiles/h5diff_tmp1.txt ${HDF5_TOOLS_TEST_H5DIFF_SOURCE_DIR}/testfiles/h5diff_tmp2.txt @@ -464,6 +467,7 @@ set (FILE6 h5diff_attr2.h5) set (FILE7 h5diff_dset1.h5) set (FILE8 h5diff_dset2.h5) + set (FILE8A h5diff_dset3.h5) set (FILE9 h5diff_hyper1.h5) set (FILE10 h5diff_hyper2.h5) set (FILE11 h5diff_empty.h5) @@ -872,6 +876,10 @@ h5diff_710.out.err h5diff_80.out h5diff_80.out.err + h5diff_800.out + h5diff_800.out.err + h5diff_801.out + h5diff_801.out.err h5diff_90.out h5diff_90.out.err h5diff_v1.out @@ -1478,6 +1486,14 @@ ADD_H5_TEST (h5diff_645 1 -v -p 0.05 --use-system-epsilon ${FILE1} ${FILE2} /g1/ ADD_H5_TEST (h5diff_646 1 -v --use-system-epsilon -p 0.05 ${FILE1} ${FILE2} /g1/dset3 /g1/dset4) # ############################################################################## +# # Test array variances +# ############################################################################## +# +# Test with -d , -p and --use-system-epsilon. +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) + +# ############################################################################## # VDS tests # ############################################################################## ADD_H5_TEST (h5diff_v1 0 -v ${FILEV1} ${FILEV2}) diff --git a/tools/test/h5diff/h5diffgentest.c b/tools/test/h5diff/h5diffgentest.c index cc7b057..6a84365 100644 --- a/tools/test/h5diff/h5diffgentest.c +++ b/tools/test/h5diff/h5diffgentest.c @@ -48,6 +48,7 @@ size_t H5TOOLS_MALLOCSIZE = (128 * 1024 * 1024); #define FILE6 "h5diff_attr2.h5" #define FILE7 "h5diff_dset1.h5" #define FILE8 "h5diff_dset2.h5" +#define FILE8A "h5diff_dset3.h5" #define FILE9 "h5diff_hyper1.h5" #define FILE10 "h5diff_hyper2.h5" #define FILE11 "h5diff_empty.h5" @@ -197,6 +198,7 @@ int main(void) /* generate 2 files, the second call creates a similar file with differences */ test_datasets(FILE7,0); test_datasets(FILE8,1); + test_datasets(FILE8A,2); /* generate 2 files, the second call creates a similar file with differences */ test_hyperslab(FILE9,0); @@ -1328,7 +1330,7 @@ int test_datasets(const char *file, herr_t status; int buf[2]={1,2}; - if(make_diffs) + if(make_diffs > 0) memset(buf, 0, sizeof buf); /* Create a file */ @@ -1399,9 +1401,8 @@ int test_special_datasets(const char *file, /* Create a dataset with zero dimension size in one file but the other one * has a dataset with a non-zero dimension size */ - if(make_diffs) { + if(make_diffs) dims[1] = SPACE1_DIM2 + 4; - } sid = H5Screate_simple(SPACE1_RANK, dims, NULL); did = H5Dcreate2(fid, "dset2", H5T_NATIVE_INT, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); @@ -5466,6 +5467,34 @@ static void test_objs_strings(const char *fname1, const char *fname2) H5Sclose(space); H5Dclose(dataset); + /* string 5 : early term long string */ + string4A[0][10] = 0; + string4A[0][11] = 0; + string4B[0][10] = 0; + + string4A[1][10] = 0; + string4A[1][11] = 'Z'; + string4B[1][10] = 0; + string4B[1][11] = 'x'; + + string4A[2][10] = 0; + string4B[2][10] = 0; + string4B[2][11] = 'a'; + string4B[2][12] = 'B'; + string4B[2][13] = 'c'; + space = H5Screate_simple(1, dims4, NULL); + f_type = mkstr(168, H5T_STR_NULLTERM); + m_type = mkstr(21, H5T_STR_NULLTERM); + dataset = H5Dcreate2(fid1, "/string5", f_type, space, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); + H5Dwrite(dataset, m_type, H5S_ALL, H5S_ALL, H5P_DEFAULT, string4A); + H5Dclose(dataset); + dataset = H5Dcreate2(fid2, "/string5", f_type, space, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); + H5Dwrite(dataset, m_type, H5S_ALL, H5S_ALL, H5P_DEFAULT, string4B); + H5Tclose(m_type); + H5Tclose(f_type); + H5Sclose(space); + H5Dclose(dataset); + out: /*----------------------------------------------------------------------- * Close IDs @@ -6613,6 +6642,9 @@ void write_dset_in(hid_t loc_id, int buf73[4][3][2]; /* integer */ float buf83[4][3][2]; /* float */ + if(make_diffs == 2) { + dimarray[0] = 4; + } /*------------------------------------------------------------------------- * H5S_SCALAR @@ -6621,11 +6653,8 @@ void write_dset_in(hid_t loc_id, - if ( make_diffs ) - { - + if(make_diffs) scalar_data = 1; - } /* create a space */ sid = H5Screate(H5S_SCALAR); diff --git a/tools/test/h5diff/testfiles/h5diff_800.txt b/tools/test/h5diff/testfiles/h5diff_800.txt new file mode 100644 index 0000000..e43e7b4 --- /dev/null +++ b/tools/test/h5diff/testfiles/h5diff_800.txt @@ -0,0 +1,12 @@ +dataset: and +size: [2] [2] +position array array difference +------------------------------------------------------------ +[ 0 ] 1 0 1 +[ 0 ] 2 0 2 +[ 0 ] 3 0 3 +[ 1 ] 4 0 4 +[ 1 ] 5 0 5 +[ 1 ] 6 0 6 +6 differences found +EXIT CODE: 1 diff --git a/tools/test/h5diff/testfiles/h5diff_801.txt b/tools/test/h5diff/testfiles/h5diff_801.txt new file mode 100644 index 0000000..043e7e3 --- /dev/null +++ b/tools/test/h5diff/testfiles/h5diff_801.txt @@ -0,0 +1,13 @@ +dataset: and +Warning: different storage datatype +size: [2] [2] +position array array difference +------------------------------------------------------------ +[ 0 ] 1 0 1 +[ 0 ] 2 0 2 +[ 0 ] 3 0 3 +[ 1 ] 4 0 4 +[ 1 ] 5 0 5 +[ 1 ] 6 0 6 +6 differences found +EXIT CODE: 1 diff --git a/tools/test/h5diff/testfiles/h5diff_dset3.h5 b/tools/test/h5diff/testfiles/h5diff_dset3.h5 new file mode 100644 index 0000000..7a1f3dd Binary files /dev/null and b/tools/test/h5diff/testfiles/h5diff_dset3.h5 differ -- cgit v0.12 From 11edb1efd0dabec5b7d44e245646e20d0f874a6a Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Wed, 17 May 2017 10:30:05 -0500 Subject: HDFFV-9055 regenerate file for 1.10 --- tools/test/h5diff/testfiles/h5diff_dset3.h5 | Bin 23416 -> 23416 bytes 1 file changed, 0 insertions(+), 0 deletions(-) diff --git a/tools/test/h5diff/testfiles/h5diff_dset3.h5 b/tools/test/h5diff/testfiles/h5diff_dset3.h5 index 7a1f3dd..65dd27d 100644 Binary files a/tools/test/h5diff/testfiles/h5diff_dset3.h5 and b/tools/test/h5diff/testfiles/h5diff_dset3.h5 differ -- cgit v0.12 From 8dd40ba371f3a299ed98ab8e7e7f34f967e91d55 Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Wed, 17 May 2017 16:00:54 -0500 Subject: Move declaration before executable statement --- tools/lib/h5diff_dset.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/lib/h5diff_dset.c b/tools/lib/h5diff_dset.c index 2ac93ab..991ef48 100644 --- a/tools/lib/h5diff_dset.c +++ b/tools/lib/h5diff_dset.c @@ -342,8 +342,8 @@ hsize_t diff_datasetid( hid_t did1, *------------------------------------------------------------------------- */ if(can_compare) { /* it is possible to compare */ - h5difftrace("can_compare attempt\n"); H5T_class_t tclass = H5Tget_class(f_tid1); + h5difftrace("can_compare attempt\n"); /*----------------------------------------------------------------- * get number of elements -- cgit v0.12 From b81767d6200e0483bb3b8d937361846dbdcc3014 Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Thu, 18 May 2017 09:15:27 -0500 Subject: Added note about 9055 and 10128, 9995 not needed --- release_docs/RELEASE.txt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/release_docs/RELEASE.txt b/release_docs/RELEASE.txt index 81295e9..382420a 100644 --- a/release_docs/RELEASE.txt +++ b/release_docs/RELEASE.txt @@ -117,7 +117,9 @@ Bug Fixes since HDF5-1.10.0-patch1 release Tools ----- - - + - Improved h5diff compare of strings and arrays. + + (ADB, 2017/05/18, HDFFV-9055, HDFFV-10128) High-Level APIs: ------ -- cgit v0.12 From a4a1a93e56d282611a800319cef8487a3449ab56 Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Thu, 18 May 2017 15:35:05 -0500 Subject: HDFFV-9055 Correct file generator --- tools/test/h5diff/h5diffgentest.c | 2 +- tools/test/h5diff/testfiles/h5diff_58.txt | 2 +- tools/test/h5diff/testfiles/h5diff_80.txt | 2 +- tools/test/h5diff/testfiles/h5diff_dset1.h5 | Bin 23624 -> 23416 bytes tools/test/h5diff/testfiles/h5diff_dset2.h5 | Bin 23624 -> 23416 bytes tools/test/h5diff/testfiles/h5diff_dset3.h5 | Bin 23416 -> 23416 bytes 6 files changed, 3 insertions(+), 3 deletions(-) diff --git a/tools/test/h5diff/h5diffgentest.c b/tools/test/h5diff/h5diffgentest.c index 6a84365..708f371 100644 --- a/tools/test/h5diff/h5diffgentest.c +++ b/tools/test/h5diff/h5diffgentest.c @@ -7237,7 +7237,7 @@ void write_dset_in(hid_t loc_id, n=1; for (i = 0; i < 24; i++) { - for (j = 0; j < (int)dimarray[0]; j++) { + for (j = 0; j < 3; j++) { if (make_diffs) buf63[i][j]=0; else buf63[i][j]=n++; } diff --git a/tools/test/h5diff/testfiles/h5diff_58.txt b/tools/test/h5diff/testfiles/h5diff_58.txt index 768dd97..d27a0c9 100644 --- a/tools/test/h5diff/testfiles/h5diff_58.txt +++ b/tools/test/h5diff/testfiles/h5diff_58.txt @@ -1,5 +1,5 @@ dataset: and -Referenced dataset 10720 10720 +Referenced dataset 10784 10784 ------------------------------------------------------------ Region blocks block #0 (2,2)-(7,7) (0,0)-(2,2) diff --git a/tools/test/h5diff/testfiles/h5diff_80.txt b/tools/test/h5diff/testfiles/h5diff_80.txt index 5957d72..836e073 100644 --- a/tools/test/h5diff/testfiles/h5diff_80.txt +++ b/tools/test/h5diff/testfiles/h5diff_80.txt @@ -865,7 +865,7 @@ position vlen3D vlen3D difference [ 3 2 1 ] 59 0 59 59 differences found dataset: and -Referenced dataset 10720 10720 +Referenced dataset 10784 10784 ------------------------------------------------------------ Region blocks block #0 (2,2)-(7,7) (0,0)-(2,2) diff --git a/tools/test/h5diff/testfiles/h5diff_dset1.h5 b/tools/test/h5diff/testfiles/h5diff_dset1.h5 index 123e141..a587403 100644 Binary files a/tools/test/h5diff/testfiles/h5diff_dset1.h5 and b/tools/test/h5diff/testfiles/h5diff_dset1.h5 differ diff --git a/tools/test/h5diff/testfiles/h5diff_dset2.h5 b/tools/test/h5diff/testfiles/h5diff_dset2.h5 index 3ae6993..c38ed4a 100644 Binary files a/tools/test/h5diff/testfiles/h5diff_dset2.h5 and b/tools/test/h5diff/testfiles/h5diff_dset2.h5 differ diff --git a/tools/test/h5diff/testfiles/h5diff_dset3.h5 b/tools/test/h5diff/testfiles/h5diff_dset3.h5 index 65dd27d..4714d07 100644 Binary files a/tools/test/h5diff/testfiles/h5diff_dset3.h5 and b/tools/test/h5diff/testfiles/h5diff_dset3.h5 differ -- cgit v0.12 From 40b51136a27ea583f8c826973aef20ac3ef17eeb Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Mon, 22 May 2017 13:10:40 -0500 Subject: HDFFV-8611 change h5repack to save the root group creation order Added test and new arguments to control the the input file parsing. --- MANIFEST | 1 + tools/lib/h5tools.c | 4 + tools/lib/h5tools.h | 4 + tools/src/h5dump/h5dump.h | 4 - tools/src/h5dump/h5dump_extern.h | 4 - tools/src/h5repack/h5repack.c | 885 ++++++++++----------- tools/src/h5repack/h5repack.h | 24 +- tools/src/h5repack/h5repack_copy.c | 232 +++--- tools/src/h5repack/h5repack_main.c | 87 +- tools/src/h5repack/h5repack_verify.c | 17 +- tools/test/h5repack/CMakeTests.cmake | 9 +- .../h5repack/testfiles/crtorder.tordergr.h5.ddl | 36 + tools/test/h5repack/testfiles/h5repack-help.txt | 4 + 13 files changed, 723 insertions(+), 588 deletions(-) create mode 100644 tools/test/h5repack/testfiles/crtorder.tordergr.h5.ddl diff --git a/MANIFEST b/MANIFEST index 434a857..fbbdecd 100644 --- a/MANIFEST +++ b/MANIFEST @@ -2430,6 +2430,7 @@ ./tools/test/h5repack/testfiles/h5repack_soffset.h5 ./tools/test/h5repack/testfiles/h5repack_szip.h5 ./tools/test/h5repack/testfiles/ublock.bin +./tools/test/h5repack/testfiles/crtorder.tordergr.h5.ddl ./tools/test/h5repack/testfiles/deflate_limit.h5repack_layout.h5.ddl ./tools/test/h5repack/testfiles/plugin_none.h5repack_layout.UD.h5.tst ./tools/test/h5repack/testfiles/plugin_test.h5repack_layout.h5.tst diff --git a/tools/lib/h5tools.c b/tools/lib/h5tools.c index 86dca8b..62b05d9 100644 --- a/tools/lib/h5tools.c +++ b/tools/lib/h5tools.c @@ -51,6 +51,10 @@ unsigned packed_data_length; /* length of packed bits to display */ unsigned long long packed_data_mask; /* mask in which packed bits to display */ int enable_error_stack= FALSE; /* re-enable error stack */ +/* sort parameters */ +H5_index_t sort_by = H5_INDEX_NAME; /*sort_by [creation_order | name] */ +H5_iter_order_t sort_order = H5_ITER_INC; /*sort_order [ascending | descending] */ + /* module-scoped variables */ static int h5tools_init_g; /* if h5tools lib has been initialized */ diff --git a/tools/lib/h5tools.h b/tools/lib/h5tools.h index 2bafdfc..bf8e673 100644 --- a/tools/lib/h5tools.h +++ b/tools/lib/h5tools.h @@ -568,6 +568,10 @@ H5TOOLS_DLLVAR int oid_output; /* oid output */ H5TOOLS_DLLVAR int data_output; /* data output */ H5TOOLS_DLLVAR int attr_data_output; /* attribute data output */ +/* sort parameters */ +H5TOOLS_DLLVAR H5_index_t sort_by; /*sort_by [creation_order | name] */ +H5TOOLS_DLLVAR H5_iter_order_t sort_order; /*sort_order [ascending | descending] */ + /* things to display or which are set via command line parameters */ H5TOOLS_DLLVAR int enable_error_stack; /* re-enable error stack */ diff --git a/tools/src/h5dump/h5dump.h b/tools/src/h5dump/h5dump.h index 211fd14..801f60d 100644 --- a/tools/src/h5dump/h5dump.h +++ b/tools/src/h5dump/h5dump.h @@ -78,10 +78,6 @@ int include_attrs = TRUE; /* Display attributes */ int display_vds_first = FALSE; /* vds display to all by default*/ int vds_gap_size = 0; /* vds skip missing files default is none */ -/* sort parameters */ -H5_index_t sort_by = H5_INDEX_NAME; /*sort_by [creation_order | name] */ -H5_iter_order_t sort_order = H5_ITER_INC; /*sort_order [ascending | descending] */ - #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 */ diff --git a/tools/src/h5dump/h5dump_extern.h b/tools/src/h5dump/h5dump_extern.h index 22aca73..00d3bd2 100644 --- a/tools/src/h5dump/h5dump_extern.h +++ b/tools/src/h5dump/h5dump_extern.h @@ -77,10 +77,6 @@ extern int include_attrs; /* Display attributes */ extern int display_vds_first; /* vds display to first missing */ extern int vds_gap_size; /* vds skip missing files */ -/* sort parameters */ -extern H5_index_t sort_by; /*sort_by [creation_order | name] */ -extern H5_iter_order_t sort_order; /*sort_order [ascending | descending] */ - #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 */ diff --git a/tools/src/h5repack/h5repack.c b/tools/src/h5repack/h5repack.c index d047612..bc8527b 100644 --- a/tools/src/h5repack/h5repack.c +++ b/tools/src/h5repack/h5repack.c @@ -51,19 +51,19 @@ static int have_request(pack_opt_t *options); *------------------------------------------------------------------------- */ int h5repack(const char* infile, const char* outfile, pack_opt_t *options) { - /* check input */ - if (check_options(options) < 0) - return -1; + /* check input */ + if (check_options(options) < 0) + return -1; - /* check for objects in input that are in the file */ - if (check_objects(infile, options) < 0) - return -1; + /* check for objects in input that are in the file */ + if (check_objects(infile, options) < 0) + return -1; - /* copy the objects */ - if (copy_objects(infile, outfile, options) < 0) - return -1; + /* copy the objects */ + if (copy_objects(infile, outfile, options) < 0) + return -1; - return 0; + return 0; } /*------------------------------------------------------------------------- @@ -105,7 +105,7 @@ h5repack_init(pack_opt_t *options, int verbose, hbool_t latest) */ int h5repack_end(pack_opt_t *options) { - return options_table_free(options->op_tbl); + return options_table_free(options->op_tbl); } /*------------------------------------------------------------------------- @@ -121,10 +121,10 @@ int h5repack_end(pack_opt_t *options) { int h5repack_addfilter(const char* str, pack_opt_t *options) { - obj_list_t *obj_list = NULL; /* one object list for the -f and -l option entry */ - filter_info_t filter; /* filter info for the current -f option entry */ - unsigned n_objs; /* number of objects in the current -f or -l option entry */ - int is_glb; /* is the filter global */ + obj_list_t *obj_list = NULL; /* one object list for the -f and -l option entry */ + filter_info_t filter; /* filter info for the current -f option entry */ + unsigned n_objs; /* number of objects in the current -f or -l option entry */ + int is_glb; /* is the filter global */ /* parse the -f option */ if (NULL == (obj_list = parse_filter(str, &n_objs, &filter, options, &is_glb))) @@ -163,10 +163,10 @@ int h5repack_addlayout(const char* str, pack_opt_t *options) { obj_list_t *obj_list = NULL; /*one object list for the -t and -c option entry */ - unsigned n_objs; /*number of objects in the current -t or -c option entry */ - pack_info_t pack; /*info about layout to extract from parse */ - int j; - int ret_value = -1; + unsigned n_objs; /*number of objects in the current -t or -c option entry */ + pack_info_t pack; /*info about layout to extract from parse */ + int j; + int ret_value = -1; init_packobject(&pack); @@ -232,87 +232,84 @@ h5repack_addlayout(const char* str, pack_opt_t *options) *------------------------------------------------------------------------- */ hid_t copy_named_datatype(hid_t type_in, hid_t fidout, - named_dt_t **named_dt_head_p, trav_table_t *travt, pack_opt_t *options) { - named_dt_t *dt = *named_dt_head_p; /* Stack pointer */ - named_dt_t *dt_ret = NULL; /* Datatype to return */ - H5O_info_t oinfo; /* Object info of input dtype */ - hid_t ret_value = -1; /* The identifier of the named dtype in the out file */ - - if (H5Oget_info(type_in, &oinfo) < 0) - goto done; - - if (*named_dt_head_p) { - /* Stack already exists, search for the datatype */ - while (dt && dt->addr_in != oinfo.addr) - dt = dt->next; - - dt_ret = dt; - } - else { - /* Create the stack */ - size_t i; - - for (i = 0; i < travt->nobjs; i++) { - if (travt->objs[i].type == H5TRAV_TYPE_NAMED_DATATYPE) { - /* Push onto the stack */ - if (NULL == (dt = (named_dt_t *) HDmalloc(sizeof(named_dt_t)))) { - goto done; - } - dt->next = *named_dt_head_p; - *named_dt_head_p = dt; - - /* Update the address and id */ - dt->addr_in = travt->objs[i].objno; - dt->id_out = -1; - - /* Check if this type is the one requested */ - if (oinfo.addr == dt->addr_in) { - HDassert(!dt_ret); - dt_ret = dt; - } /* end if */ - } /* end if */ - } /* end for */ - } /* end else */ - - /* Handle the case that the requested datatype was not found. This is - * possible if the datatype was committed anonymously in the input file. */ - if (!dt_ret) { - /* Push the new datatype onto the stack */ - if (NULL == (dt_ret = (named_dt_t *) HDmalloc(sizeof(named_dt_t)))) { - goto done; - } - dt_ret->next = *named_dt_head_p; - *named_dt_head_p = dt_ret; - - /* Update the address and id */ - dt_ret->addr_in = oinfo.addr; - dt_ret->id_out = -1; - } /* end if */ - - /* If the requested datatype does not yet exist in the output file, copy it - * anonymously */ - if (dt_ret->id_out < 0) { - if (options->use_native == 1) - dt_ret->id_out = h5tools_get_native_type(type_in); - else - dt_ret->id_out = H5Tcopy(type_in); - if (dt_ret->id_out < 0) - goto done; - if (H5Tcommit_anon(fidout, dt_ret->id_out, H5P_DEFAULT, H5P_DEFAULT) < 0) - goto done; - } /* end if */ - - /* Set return value */ - ret_value = dt_ret->id_out; - - /* Increment the ref count on id_out, because the calling function will try - * to close it */ - if(H5Iinc_ref(ret_value) < 0) { - ret_value = -1; - } + named_dt_t **named_dt_head_p, trav_table_t *travt, pack_opt_t *options) { + named_dt_t *dt = *named_dt_head_p; /* Stack pointer */ + named_dt_t *dt_ret = NULL; /* Datatype to return */ + H5O_info_t oinfo; /* Object info of input dtype */ + hid_t ret_value = -1; /* The identifier of the named dtype in the out file */ + + if (H5Oget_info(type_in, &oinfo) < 0) + goto done; + + if (*named_dt_head_p) { + /* Stack already exists, search for the datatype */ + while (dt && dt->addr_in != oinfo.addr) + dt = dt->next; + + dt_ret = dt; + } + else { + /* Create the stack */ + size_t i; + + for (i = 0; i < travt->nobjs; i++) { + if (travt->objs[i].type == H5TRAV_TYPE_NAMED_DATATYPE) { + /* Push onto the stack */ + if (NULL == (dt = (named_dt_t *)HDmalloc(sizeof(named_dt_t)))) + goto done; + dt->next = *named_dt_head_p; + *named_dt_head_p = dt; + + /* Update the address and id */ + dt->addr_in = travt->objs[i].objno; + dt->id_out = -1; + + /* Check if this type is the one requested */ + if (oinfo.addr == dt->addr_in) { + HDassert(!dt_ret); + dt_ret = dt; + } /* end if */ + } /* end if */ + } /* end for */ + } /* end else */ + + /* Handle the case that the requested datatype was not found. This is + * possible if the datatype was committed anonymously in the input file. */ + if (!dt_ret) { + /* Push the new datatype onto the stack */ + if (NULL == (dt_ret = (named_dt_t *)HDmalloc(sizeof(named_dt_t)))) + goto done; + dt_ret->next = *named_dt_head_p; + *named_dt_head_p = dt_ret; + + /* Update the address and id */ + dt_ret->addr_in = oinfo.addr; + dt_ret->id_out = -1; + } /* end if */ + + /* If the requested datatype does not yet exist in the output file, copy it + * anonymously */ + if (dt_ret->id_out < 0) { + if (options->use_native == 1) + dt_ret->id_out = H5Tget_native_type(type_in, H5T_DIR_DEFAULT); + else + dt_ret->id_out = H5Tcopy(type_in); + if (dt_ret->id_out < 0) + goto done; + if (H5Tcommit_anon(fidout, dt_ret->id_out, H5P_DEFAULT, H5P_DEFAULT) < 0) + goto done; + } /* end if */ + + /* Set return value */ + ret_value = dt_ret->id_out; + + /* Increment the ref count on id_out, because the calling function will try + * to close it */ + if(H5Iinc_ref(ret_value) < 0) + ret_value = -1; done: - return (ret_value); + return (ret_value); } /* end copy_named_datatype */ /*------------------------------------------------------------------------- @@ -327,22 +324,22 @@ done: *------------------------------------------------------------------------- */ int named_datatype_free(named_dt_t **named_dt_head_p, int ignore_err) { - named_dt_t *dt = *named_dt_head_p; - int ret_value = -1; + named_dt_t *dt = *named_dt_head_p; + int ret_value = -1; - while (dt) { - /* Pop the datatype off the stack and free it */ - if (H5Tclose(dt->id_out) < 0 && !ignore_err) - goto done; - dt = dt->next; - HDfree(*named_dt_head_p); - *named_dt_head_p = dt; - } /* end while */ + while (dt) { + /* Pop the datatype off the stack and free it */ + if (H5Tclose(dt->id_out) < 0 && !ignore_err) + goto done; + dt = dt->next; + HDfree(*named_dt_head_p); + *named_dt_head_p = dt; + } /* end while */ - ret_value = 0; + ret_value = 0; done: - return (ret_value); + return (ret_value); } /* end named_datatype_free */ /*------------------------------------------------------------------------- @@ -363,25 +360,25 @@ done: */ int copy_attr(hid_t loc_in, hid_t loc_out, named_dt_t **named_dt_head_p, - trav_table_t *travt, pack_opt_t *options) + trav_table_t *travt, pack_opt_t *options) { - int ret_value = 0; /*no need to LEAVE() on ERROR: HERR_INIT(int, SUCCEED) */ - hid_t attr_id = -1; /* attr ID */ - hid_t attr_out = -1; /* attr ID */ - hid_t space_id = -1; /* space ID */ - hid_t ftype_id = -1; /* file type ID */ - hid_t wtype_id = -1; /* read/write type ID */ - size_t msize; /* size of type */ - void *buf = NULL; /* data buffer */ - hsize_t nelmts; /* number of elements in dataset */ - int rank; /* rank of dataset */ - htri_t is_named; /* Whether the datatype is named */ - hsize_t dims[H5S_MAX_RANK];/* dimensions of dataset */ - char name[255]; - H5O_info_t oinfo; /* object info */ - int j; - unsigned u; - hbool_t is_ref = 0; + int ret_value = 0; /*no need to LEAVE() on ERROR: HERR_INIT(int, SUCCEED) */ + hid_t attr_id = -1; /* attr ID */ + hid_t attr_out = -1; /* attr ID */ + hid_t space_id = -1; /* space ID */ + hid_t ftype_id = -1; /* file type ID */ + hid_t wtype_id = -1; /* read/write type ID */ + size_t msize; /* size of type */ + void *buf = NULL; /* data buffer */ + hsize_t nelmts; /* number of elements in dataset */ + int rank; /* rank of dataset */ + htri_t is_named; /* Whether the datatype is named */ + hsize_t dims[H5S_MAX_RANK];/* dimensions of dataset */ + char name[255]; + H5O_info_t oinfo; /* object info */ + int j; + unsigned u; + hbool_t is_ref = 0; H5T_class_t type_class = -1; if (H5Oget_info(loc_in, &oinfo) < 0) @@ -425,7 +422,7 @@ copy_attr(hid_t loc_in, hid_t loc_out, named_dt_t **named_dt_head_p, } /* end if */ else { if (options->use_native == 1) - wtype_id = h5tools_get_native_type(ftype_id); + wtype_id = H5Tget_native_type(ftype_id, H5T_DIR_DEFAULT); else wtype_id = H5Tcopy(ftype_id); } /* end else */ @@ -466,7 +463,7 @@ copy_attr(hid_t loc_in, hid_t loc_out, named_dt_t **named_dt_head_p, int nmembers = H5Tget_nmembers(wtype_id); for (j = 0; j < nmembers; j++) { - hid_t mtid = H5Tget_member_type(wtype_id, (unsigned) j); + hid_t mtid = H5Tget_member_type(wtype_id, (unsigned)j); H5T_class_t mtclass = H5Tget_class(mtid); H5Tclose(mtid); @@ -477,16 +474,13 @@ copy_attr(hid_t loc_in, hid_t loc_out, named_dt_t **named_dt_head_p, } /* for (j=0; iverbose && have_request(options) /* only print if requested */) { - printf("Objects to modify layout are...\n"); - if (options->all_layout == 1) { - switch (options->layout_g) { - case H5D_COMPACT: - strcpy(slayout, "compact"); - break; - case H5D_CONTIGUOUS: - strcpy(slayout, "contiguous"); - break; - case H5D_CHUNKED: - strcpy(slayout, "chunked"); - break; - case H5D_VIRTUAL: - strcpy(slayout, "virtual"); - break; - case H5D_LAYOUT_ERROR: - case H5D_NLAYOUTS: - error_msg("invalid layout\n"); - return -1; - default: - strcpy(slayout, "invalid layout\n"); - return -1; - } - printf(" Apply %s layout to all\n", slayout); - if (H5D_CHUNKED == options->layout_g) { - printf("with dimension ["); - for (j = 0; j < options->chunk_g.rank; j++) - printf("%d ", (int) options->chunk_g.chunk_lengths[j]); - printf("]\n"); - } - } - }/* verbose */ - - for (i = 0; i < options->op_tbl->nelems; i++) { - char* name = options->op_tbl->objs[i].path; - - if (options->op_tbl->objs[i].chunk.rank > 0) { - if (options->verbose) { - printf(" <%s> with chunk size ", name); - for (k = 0; k < options->op_tbl->objs[i].chunk.rank; k++) - printf("%d ", - (int) options->op_tbl->objs[i].chunk.chunk_lengths[k]); - printf("\n"); - } - has_ck = 1; - } - else if (options->op_tbl->objs[i].chunk.rank == -2) { - if (options->verbose) - printf(" <%s> %s\n", name, "NONE (contigous)"); - has_ck = 1; - } - } - - if (options->all_layout == 1 && has_ck) { - error_msg( - "invalid chunking input: 'all' option\ + unsigned int i; + int k, j, has_cp = 0, has_ck = 0; + char slayout[30]; + + /*------------------------------------------------------------------------- + * objects to layout + *------------------------------------------------------------------------- + */ + if (options->verbose && have_request(options) /* only print if requested */) { + printf("Objects to modify layout are...\n"); + if (options->all_layout == 1) { + switch (options->layout_g) { + case H5D_COMPACT: + strcpy(slayout, "compact"); + break; + case H5D_CONTIGUOUS: + strcpy(slayout, "contiguous"); + break; + case H5D_CHUNKED: + strcpy(slayout, "chunked"); + break; + case H5D_VIRTUAL: + strcpy(slayout, "virtual"); + break; + case H5D_LAYOUT_ERROR: + case H5D_NLAYOUTS: + error_msg("invalid layout\n"); + return -1; + default: + strcpy(slayout, "invalid layout\n"); + return -1; + } + printf(" Apply %s layout to all\n", slayout); + if (H5D_CHUNKED == options->layout_g) { + printf("with dimension ["); + for (j = 0; j < options->chunk_g.rank; j++) + printf("%d ", (int) options->chunk_g.chunk_lengths[j]); + printf("]\n"); + } + } + }/* verbose */ + + for (i = 0; i < options->op_tbl->nelems; i++) { + char* name = options->op_tbl->objs[i].path; + + if (options->op_tbl->objs[i].chunk.rank > 0) { + if (options->verbose) { + printf(" <%s> with chunk size ", name); + for (k = 0; k < options->op_tbl->objs[i].chunk.rank; k++) + printf("%d ", + (int) options->op_tbl->objs[i].chunk.chunk_lengths[k]); + printf("\n"); + } + has_ck = 1; + } + else if (options->op_tbl->objs[i].chunk.rank == -2) { + if (options->verbose) + printf(" <%s> %s\n", name, "NONE (contigous)"); + has_ck = 1; + } + } + + if (options->all_layout == 1 && has_ck) { + error_msg( + "invalid chunking input: 'all' option\ is present with other objects\n"); - return -1; - } - - /*------------------------------------------------------------------------- - * objects to filter - *------------------------------------------------------------------------- - */ - - if (options->verbose && have_request(options) /* only print if requested */) { - printf("Objects to apply filter are...\n"); - if (options->all_filter == 1) { - for (k = 0; k < options->n_filter_g; k++) { - H5Z_filter_t filtn = options->filter_g[k].filtn; - switch (filtn) { - case H5Z_FILTER_NONE: - printf(" Uncompress all\n"); - break; - case H5Z_FILTER_SHUFFLE: - case H5Z_FILTER_FLETCHER32: - printf(" All with %s\n", get_sfilter(filtn)); - break; - case H5Z_FILTER_SZIP: - case H5Z_FILTER_DEFLATE: - printf(" All with %s, parameter %d\n", get_sfilter(filtn), - options->filter_g[k].cd_values[0]); - break; - default: - printf(" User Defined %d\n", filtn); - break; - } /* k */ - }; - } - } /* verbose */ - - for (i = 0; i < options->op_tbl->nelems; i++) { - pack_info_t pack = options->op_tbl->objs[i]; - char* name = pack.path; - - for (j = 0; j < pack.nfilters; j++) { - if (options->verbose) { - printf(" <%s> with %s filter\n", name, - get_sfilter(pack.filter[j].filtn)); - } - - has_cp = 1; - - } /* j */ - } /* i */ - - if (options->all_filter == 1 && has_cp) { - error_msg( - "invalid compression input: 'all' option\ + return -1; + } + + /*------------------------------------------------------------------------- + * objects to filter + *------------------------------------------------------------------------- + */ + + if (options->verbose && have_request(options) /* only print if requested */) { + printf("Objects to apply filter are...\n"); + if (options->all_filter == 1) { + for (k = 0; k < options->n_filter_g; k++) { + H5Z_filter_t filtn = options->filter_g[k].filtn; + switch (filtn) { + case H5Z_FILTER_NONE: + printf(" Uncompress all\n"); + break; + case H5Z_FILTER_SHUFFLE: + case H5Z_FILTER_FLETCHER32: + printf(" All with %s\n", get_sfilter(filtn)); + break; + case H5Z_FILTER_SZIP: + case H5Z_FILTER_DEFLATE: + printf(" All with %s, parameter %d\n", get_sfilter(filtn), + options->filter_g[k].cd_values[0]); + break; + default: + printf(" User Defined %d\n", filtn); + break; + } /* k */ + }; + } + } /* verbose */ + + for (i = 0; i < options->op_tbl->nelems; i++) { + pack_info_t pack = options->op_tbl->objs[i]; + char* name = pack.path; + + for (j = 0; j < pack.nfilters; j++) { + if (options->verbose) { + printf(" <%s> with %s filter\n", name, + get_sfilter(pack.filter[j].filtn)); + } + + has_cp = 1; + + } /* j */ + } /* i */ + + if (options->all_filter == 1 && has_cp) { + error_msg( + "invalid compression input: 'all' option\ is present with other objects\n"); - return -1; - } - - /*------------------------------------------------------------------------- - * check options for the latest format - *------------------------------------------------------------------------- - */ - - if (options->grp_compact < 0) { - error_msg( - "invalid maximum number of links to store as header messages\n"); - return -1; - } - if (options->grp_indexed < 0) { - error_msg( - "invalid minimum number of links to store in the indexed format\n"); - return -1; - } - if (options->grp_indexed > options->grp_compact) { - error_msg( - "minimum indexed size is greater than the maximum compact size\n"); - return -1; - } - for (i = 0; i < 8; i++) { - if (options->msg_size[i] < 0) { - error_msg("invalid shared message size\n"); - return -1; - } - } - - /*-------------------------------------------------------------------------------- - * verify new user userblock options; file name must be present - *--------------------------------------------------------------------------------- - */ - if (options->ublock_filename != NULL && options->ublock_size == 0) { - if (options->verbose) { - printf( - "Warning: user block size missing for file %s. Assigning a default size of 1024...\n", - options->ublock_filename); - options->ublock_size = 1024; - } - } - - if (options->ublock_filename == NULL && options->ublock_size != 0) { - error_msg("file name missing for user block\n", - options->ublock_filename); - return -1; - } - - /*-------------------------------------------------------------------------------- - * verify alignment options; threshold is zero default but alignment not - *--------------------------------------------------------------------------------- - */ - - if (options->alignment == 0 && options->threshold != 0) { - error_msg("alignment for H5Pset_alignment missing\n"); - return -1; - } - - return 0; + return -1; + } + + /*------------------------------------------------------------------------- + * check options for the latest format + *------------------------------------------------------------------------- + */ + + if (options->grp_compact < 0) { + error_msg( + "invalid maximum number of links to store as header messages\n"); + return -1; + } + if (options->grp_indexed < 0) { + error_msg( + "invalid minimum number of links to store in the indexed format\n"); + return -1; + } + if (options->grp_indexed > options->grp_compact) { + error_msg( + "minimum indexed size is greater than the maximum compact size\n"); + return -1; + } + for (i = 0; i < 8; i++) { + if (options->msg_size[i] < 0) { + error_msg("invalid shared message size\n"); + return -1; + } + } + + /*-------------------------------------------------------------------------------- + * verify new user userblock options; file name must be present + *--------------------------------------------------------------------------------- + */ + if (options->ublock_filename != NULL && options->ublock_size == 0) { + if (options->verbose) { + printf( + "Warning: user block size missing for file %s. Assigning a default size of 1024...\n", + options->ublock_filename); + options->ublock_size = 1024; + } + } + + if (options->ublock_filename == NULL && options->ublock_size != 0) { + error_msg("file name missing for user block\n", + options->ublock_filename); + return -1; + } + + /*-------------------------------------------------------------------------------- + * verify alignment options; threshold is zero default but alignment not + *--------------------------------------------------------------------------------- + */ + + if (options->alignment == 0 && options->threshold != 0) { + error_msg("alignment for H5Pset_alignment missing\n"); + return -1; + } + + return 0; } /*------------------------------------------------------------------------- @@ -772,119 +761,121 @@ static int check_options(pack_opt_t *options) { *------------------------------------------------------------------------- */ static int check_objects(const char* fname, pack_opt_t *options) { - hid_t fid; - unsigned int i; - trav_table_t *travt = NULL; - - /* nothing to do */ - if (options->op_tbl->nelems == 0) - return 0; - - /*------------------------------------------------------------------------- - * open the file - *------------------------------------------------------------------------- - */ - if ((fid = h5tools_fopen(fname, H5F_ACC_RDONLY, H5P_DEFAULT, NULL, NULL, 0)) - < 0) { - printf("<%s>: %s\n", fname, H5FOPENERROR); - return -1; - } - - /*------------------------------------------------------------------------- - * get the list of objects in the file - *------------------------------------------------------------------------- - */ - - /* init table */ - trav_table_init(&travt); - - /* get the list of objects in the file */ - if (h5trav_gettable(fid, travt) < 0) - goto out; - - /*------------------------------------------------------------------------- - * compare with user supplied list - *------------------------------------------------------------------------- - */ - - if (options->verbose) - printf("Opening file <%s>. Searching for objects to modify...\n", - fname); - - for (i = 0; i < options->op_tbl->nelems; i++) { - char* name = options->op_tbl->objs[i].path; - if (options->verbose) - printf(" <%s>", name); - - /* the input object names are present in the file and are valid */ - if (h5trav_getindext(name, travt) < 0) { - error_msg("%s Could not find <%s> in file <%s>. Exiting...\n", - (options->verbose ? "\n" : ""), name, fname); - goto out; - } - if (options->verbose) - printf("...Found\n"); - - /* check for extra filter conditions */ - switch (options->op_tbl->objs[i].filter->filtn) { - /* chunk size must be smaller than pixels per block */ - case H5Z_FILTER_SZIP: - { - int j; - hsize_t csize = 1; - unsigned ppb = options->op_tbl->objs[i].filter->cd_values[0]; - hsize_t dims[H5S_MAX_RANK]; - int rank; - hid_t did; - hid_t sid; - - if (options->op_tbl->objs[i].chunk.rank > 0) { - rank = options->op_tbl->objs[i].chunk.rank; - for (j = 0; j < rank; j++) - csize *= options->op_tbl->objs[i].chunk.chunk_lengths[j]; - } - else { - if ((did = H5Dopen2(fid, name, H5P_DEFAULT)) < 0) - goto out; - if ((sid = H5Dget_space(did)) < 0) - goto out; - if ((rank = H5Sget_simple_extent_ndims(sid)) < 0) - goto out; - HDmemset(dims, 0, sizeof dims); - if (H5Sget_simple_extent_dims(sid, dims, NULL) < 0) - goto out; - for (j = 0; j < rank; j++) - csize *= dims[j]; - if (H5Sclose(sid) < 0) - goto out; - if (H5Dclose(did) < 0) - goto out; - } - - if (csize < ppb) { - printf( - " \n"); - goto out; - } - } - break; - default: - break; - } - } /* i */ - - /*------------------------------------------------------------------------- - * close - *------------------------------------------------------------------------- - */ - H5Fclose(fid); - trav_table_free(travt); - return 0; + hid_t fid; + unsigned int i; + trav_table_t *travt = NULL; + + /* nothing to do */ + if (options->op_tbl->nelems == 0) + return 0; + + /*------------------------------------------------------------------------- + * open the file + *------------------------------------------------------------------------- + */ + if ((fid = h5tools_fopen(fname, H5F_ACC_RDONLY, H5P_DEFAULT, NULL, NULL, 0)) + < 0) { + printf("<%s>: %s\n", fname, H5FOPENERROR); + return -1; + } + + /*------------------------------------------------------------------------- + * get the list of objects in the file + *------------------------------------------------------------------------- + */ + + /* Initialize indexing options */ + h5trav_set_index(sort_by, sort_order); + /* init table */ + trav_table_init(&travt); + + /* get the list of objects in the file */ + if (h5trav_gettable(fid, travt) < 0) + goto out; + + /*------------------------------------------------------------------------- + * compare with user supplied list + *------------------------------------------------------------------------- + */ + + if (options->verbose) + printf("Opening file <%s>. Searching for objects to modify...\n", + fname); + + for (i = 0; i < options->op_tbl->nelems; i++) { + char* name = options->op_tbl->objs[i].path; + if (options->verbose) + printf(" <%s>", name); + + /* the input object names are present in the file and are valid */ + if (h5trav_getindext(name, travt) < 0) { + error_msg("%s Could not find <%s> in file <%s>. Exiting...\n", + (options->verbose ? "\n" : ""), name, fname); + goto out; + } + if (options->verbose) + printf("...Found\n"); + + /* check for extra filter conditions */ + switch (options->op_tbl->objs[i].filter->filtn) { + /* chunk size must be smaller than pixels per block */ + case H5Z_FILTER_SZIP: + { + int j; + hsize_t csize = 1; + unsigned ppb = options->op_tbl->objs[i].filter->cd_values[0]; + hsize_t dims[H5S_MAX_RANK]; + int rank; + hid_t did; + hid_t sid; + + if (options->op_tbl->objs[i].chunk.rank > 0) { + rank = options->op_tbl->objs[i].chunk.rank; + for (j = 0; j < rank; j++) + csize *= options->op_tbl->objs[i].chunk.chunk_lengths[j]; + } + else { + if ((did = H5Dopen2(fid, name, H5P_DEFAULT)) < 0) + goto out; + if ((sid = H5Dget_space(did)) < 0) + goto out; + if ((rank = H5Sget_simple_extent_ndims(sid)) < 0) + goto out; + HDmemset(dims, 0, sizeof dims); + if (H5Sget_simple_extent_dims(sid, dims, NULL) < 0) + goto out; + for (j = 0; j < rank; j++) + csize *= dims[j]; + if (H5Sclose(sid) < 0) + goto out; + if (H5Dclose(did) < 0) + goto out; + } + + if (csize < ppb) { + printf( + " \n"); + goto out; + } + } + break; + default: + break; + } + } /* i */ + + /*------------------------------------------------------------------------- + * close + *------------------------------------------------------------------------- + */ + H5Fclose(fid); + trav_table_free(travt); + return 0; out: - H5Fclose(fid); - trav_table_free(travt); - return -1; + H5Fclose(fid); + trav_table_free(travt); + return -1; } /*------------------------------------------------------------------------- @@ -900,10 +891,10 @@ out: */ static int have_request(pack_opt_t *options) { - if (options->all_filter || options->all_layout || options->op_tbl->nelems) - return 1; + if (options->all_filter || options->all_layout || options->op_tbl->nelems) + return 1; - return 0; + return 0; } @@ -918,21 +909,21 @@ static int have_request(pack_opt_t *options) { */ static const char* get_sfilter(H5Z_filter_t filtn) { - if (filtn == H5Z_FILTER_NONE) - return "NONE"; - else if (filtn == H5Z_FILTER_DEFLATE) - return "GZIP"; - else if (filtn == H5Z_FILTER_SZIP) - return "SZIP"; - else if (filtn == H5Z_FILTER_SHUFFLE) - return "SHUFFLE"; - else if (filtn == H5Z_FILTER_FLETCHER32) - return "FLETCHER32"; - else if (filtn == H5Z_FILTER_NBIT) - return "NBIT"; - else if (filtn == H5Z_FILTER_SCALEOFFSET) - return "SOFF"; - else - return "UD"; + if (filtn == H5Z_FILTER_NONE) + return "NONE"; + else if (filtn == H5Z_FILTER_DEFLATE) + return "GZIP"; + else if (filtn == H5Z_FILTER_SZIP) + return "SZIP"; + else if (filtn == H5Z_FILTER_SHUFFLE) + return "SHUFFLE"; + else if (filtn == H5Z_FILTER_FLETCHER32) + return "FLETCHER32"; + else if (filtn == H5Z_FILTER_NBIT) + return "NBIT"; + else if (filtn == H5Z_FILTER_SCALEOFFSET) + return "SOFF"; + else + return "UD"; } diff --git a/tools/src/h5repack/h5repack.h b/tools/src/h5repack/h5repack.h index e36f0ef..e5ae03f 100644 --- a/tools/src/h5repack/h5repack.h +++ b/tools/src/h5repack/h5repack.h @@ -29,10 +29,10 @@ #define MAX_COMPACT_DSIZE 64512 /* max data size for compact layout. -1k for header size */ /* File space default information */ -#define FS_PAGESIZE_DEF 4096 -#define FS_STRATEGY_DEF H5F_FSPACE_STRATEGY_FSM_AGGR -#define FS_PERSIST_DEF FALSE -#define FS_THRESHOLD_DEF 1 +#define FS_PAGESIZE_DEF 4096 +#define FS_STRATEGY_DEF H5F_FSPACE_STRATEGY_FSM_AGGR +#define FS_PERSIST_DEF FALSE +#define FS_THRESHOLD_DEF 1 /*------------------------------------------------------------------------- @@ -120,10 +120,10 @@ typedef struct { hsize_t meta_block_size; /* metadata aggregation block size (for H5Pset_meta_block_size) */ hsize_t threshold; /* alignment threshold for H5Pset_alignment */ hsize_t alignment; /* alignment for H5Pset_alignment */ - H5F_fspace_strategy_t fs_strategy; /* File space handling strategy */ - int fs_persist; /* Free space section threshold */ - long fs_threshold; /* Free space section threshold */ - long long fs_pagesize; /* File space page size */ + H5F_fspace_strategy_t fs_strategy; /* File space handling strategy */ + int fs_persist; /* Free space section threshold */ + long fs_threshold; /* Free space section threshold */ + long long fs_pagesize; /* File space page size */ } pack_opt_t; @@ -150,10 +150,10 @@ int h5repack_end(pack_opt_t *options); int h5repack_verify(const char *in_fname, const char *out_fname, pack_opt_t *options); int h5repack_cmp_pl(const char *fname1, const char *fname2); -/* Note: The below copy_named_datatype(), named_datatype_free(), copy_attr() - * and struct named_dt_t were located in h5repack_copy.c as static prior to - * bugfix1726. - * Made shared functions as copy_attr() was needed in h5repack_refs.c. +/* Note: The below copy_named_datatype(), named_datatype_free(), copy_attr() + * and struct named_dt_t were located in h5repack_copy.c as static prior to + * bugfix1726. + * Made shared functions as copy_attr() was needed in h5repack_refs.c. * However copy_attr() may be obsoleted when H5Acopy is available and put back * others to static in h5repack_copy.c. */ diff --git a/tools/src/h5repack/h5repack_copy.c b/tools/src/h5repack/h5repack_copy.c index 604e85f..42fedbc 100644 --- a/tools/src/h5repack/h5repack_copy.c +++ b/tools/src/h5repack/h5repack_copy.c @@ -31,7 +31,7 @@ */ /* size of buffer/# of bytes to xfer at a time when copying userblock */ -#define USERBLOCK_XFER_SIZE 512 +#define USERBLOCK_XFER_SIZE 512 /* check H5Dread()/H5Dwrite() error, e.g. memory allocation error inside the library. */ #define CHECK_H5DRW_ERROR(_fun, _fail, _did, _mtid, _msid, _fsid, _pid, _buf) { \ @@ -52,12 +52,12 @@ *------------------------------------------------------------------------- */ static int Get_hyperslab(hid_t dcpl_id, int rank_dset, hsize_t dims_dset[], - size_t size_datum, hsize_t dims_hslab[], hsize_t * hslab_nbytes_p); + size_t size_datum, hsize_t dims_hslab[], hsize_t * hslab_nbytes_p); static void print_dataset_info(hid_t dcpl_id, char *objname, double per, int pr); static int do_copy_objects(hid_t fidin, hid_t fidout, trav_table_t *travt, - pack_opt_t *options); + pack_opt_t *options); static int copy_user_block(const char *infile, const char *outfile, - hsize_t size); + hsize_t size); #if defined (H5REPACK_DEBUG_USER_BLOCK) static void print_user_block(const char *filename, hid_t fid); #endif @@ -65,18 +65,19 @@ static herr_t walk_error_callback(unsigned n, const H5E_error2_t *err_desc, void /* get the major number from the error stack. */ static herr_t walk_error_callback(H5_ATTR_UNUSED unsigned n, const H5E_error2_t *err_desc, void *udata) { - if (err_desc) - *((hid_t *) udata) = err_desc->maj_num; + if (err_desc) + *((hid_t *) udata) = err_desc->maj_num; - return 0; + return 0; } /*------------------------------------------------------------------------- * Function: copy_objects * - * Purpose: duplicate all HDF5 objects in the file + * Purpose: duplicate all HDF5 objects in the file * - * Return: 0, ok, -1 no + * Return: 0, ok, + * -1 no * * Programmer: Pedro Vicente, pvn@ncsa.uiuc.edu * @@ -87,21 +88,22 @@ static herr_t walk_error_callback(H5_ATTR_UNUSED unsigned n, const H5E_error2_t int copy_objects(const char* fnamein, const char* fnameout, pack_opt_t *options) { - int ret_value = 0; /*no need to LEAVE() on ERROR: HERR_INIT(int, SUCCEED) */ + int ret_value = 0; /* no need to LEAVE() on ERROR: HERR_INIT(int, SUCCEED) */ hid_t fidin; hid_t fidout = -1; trav_table_t *travt = NULL; - hsize_t ub_size = 0; /* size of user block */ - hid_t fcpl = H5P_DEFAULT; /* file creation property list ID */ - hid_t fapl = H5P_DEFAULT; /* file access property list ID */ - H5F_fspace_strategy_t set_strategy; /* Strategy to be set in outupt file */ - hbool_t set_persist; /* Persist free-space status to be set in output file */ - hsize_t set_threshold; /* Free-space section threshold to be set in output file */ - hsize_t set_pagesize; /* File space page size to be set in output file */ - H5F_fspace_strategy_t in_strategy; /* Strategy from input file */ - hbool_t in_persist; /* Persist free-space status from input file */ - hsize_t in_threshold; /* Free-space section threshold from input file */ - hsize_t in_pagesize; /* File space page size from input file */ + hsize_t ub_size = 0; /* size of user block */ + hid_t fcpl = H5P_DEFAULT; /* file creation property list ID */ + hid_t fapl = H5P_DEFAULT; /* file access property list ID */ + H5F_fspace_strategy_t set_strategy; /* Strategy to be set in outupt file */ + hbool_t set_persist; /* Persist free-space status to be set in output file */ + hsize_t set_threshold; /* Free-space section threshold to be set in output file */ + hsize_t set_pagesize; /* File space page size to be set in output file */ + H5F_fspace_strategy_t in_strategy; /* Strategy from input file */ + hbool_t in_persist; /* Persist free-space status from input file */ + hsize_t in_threshold; /* Free-space section threshold from input file */ + hsize_t in_pagesize; /* File space page size from input file */ + unsigned crt_order_flags; /* group creation order flag */ /*------------------------------------------------------------------------- * open input file @@ -115,6 +117,8 @@ int copy_objects(const char* fnamein, const char* fnameout, pack_opt_t *options) /* get user block size and file space strategy/persist/threshold */ { hid_t fcpl_in; /* file creation property list ID for input file */ + hid_t grp_in = -1; /* group ID */ + hid_t gcpl_in = -1; /* group creation property list */ if ((fcpl_in = H5Fget_create_plist(fidin)) < 0) { error_msg("failed to retrieve file creation property list\n"); @@ -126,17 +130,28 @@ int copy_objects(const char* fnamein, const char* fnameout, pack_opt_t *options) HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Pclose failed"); } - /* If the -S option is not set, get "strategy" from the input file */ - if(H5Pget_file_space_strategy(fcpl_in, &in_strategy, &in_persist, &in_threshold) < 0) { - error_msg("failed to retrieve file space strategy\n"); + /* If the -S option is not set, get "strategy" from the input file */ + if(H5Pget_file_space_strategy(fcpl_in, &in_strategy, &in_persist, &in_threshold) < 0) { + error_msg("failed to retrieve file space strategy\n"); + HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Pclose failed"); + } + + /* If the -G option is not set, get "pagesize" from the input file */ + if(H5Pget_file_space_page_size(fcpl_in, &in_pagesize) < 0) { + error_msg("failed to retrieve file space threshold\n"); HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Pclose failed"); } + /* open root group */ + if ((grp_in = H5Gopen2(fidin, "/", H5P_DEFAULT)) < 0) + HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Gopen2 failed"); - /* If the -G option is not set, get "pagesize" from the input file */ - if(H5Pget_file_space_page_size(fcpl_in, &in_pagesize) < 0) { - error_msg("failed to retrieve file space threshold\n"); - HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Pclose failed"); - } + /* get root group creation property list */ + if ((gcpl_in = H5Gget_create_plist(grp_in)) < 0) + HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Gget_create_plist failed"); + + /* query and set the group creation properties */ + if (H5Pget_link_creation_order(gcpl_in, &crt_order_flags) < 0) + HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Pget_link_creation_order failed"); if (H5Pclose(fcpl_in) < 0) { error_msg("failed to close property list\n"); @@ -295,9 +310,9 @@ print_user_block(fnamein, fidin); } /*------------------------------------------------------------------------- - * Set file space information - *------------------------------------------------------------------------- - */ + * Set file space information + *------------------------------------------------------------------------- + */ /* either use the FCPL already created or create a new one */ if (fcpl == H5P_DEFAULT) { @@ -308,6 +323,9 @@ print_user_block(fnamein, fidin); } } + if(H5Pset_link_creation_order(fcpl, crt_order_flags ) < 0) + HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Pset_link_creation_order failed"); + /* Set file space info to those from input file */ set_strategy = in_strategy; set_persist = in_persist; @@ -323,7 +341,7 @@ print_user_block(fnamein, fidin); set_persist = FS_PERSIST_DEF; else if(options->fs_persist != 0) /* Set "persist" as specified by user */ set_persist = (hbool_t)options->fs_persist; - + if(options->fs_threshold == -1) /* A "0" threshold is specified by user */ set_threshold = (hsize_t)0; else if(options->fs_threshold != 0) /* Set threshold as specified by user */ @@ -331,7 +349,7 @@ print_user_block(fnamein, fidin); /* Set file space information as specified */ if(H5Pset_file_space_strategy(fcpl, set_strategy, set_persist, set_threshold) < 0) { - error_msg("failed to set file space strategy\n"); + error_msg("failed to set file space strategy\n"); HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Pclose failed"); } @@ -343,7 +361,7 @@ print_user_block(fnamein, fidin); if(set_pagesize != FS_PAGESIZE_DEF) /* Set non-default file space page size as specified */ if(H5Pset_file_space_page_size(fcpl, set_pagesize) < 0) { error_msg("failed to set file space page size\n"); - HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Pclose failed"); + HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Pclose failed"); } /*------------------------------------------------------------------------- @@ -374,6 +392,8 @@ print_user_block(fnamein, fidin); *------------------------------------------------------------------------- */ + /* Initialize indexing options */ + h5trav_set_index(sort_by, sort_order); /* init table */ trav_table_init(&travt); @@ -490,10 +510,10 @@ done: int Get_hyperslab(hid_t dcpl_id, int rank_dset, hsize_t dims_dset[], size_t size_datum, hsize_t dims_hslab[], hsize_t * hslab_nbytes_p) { - int ret_value = 0; /*no need to LEAVE() on ERROR: HERR_INIT(int, SUCCEED) */ - int k; + int ret_value = 0; /*no need to LEAVE() on ERROR: HERR_INIT(int, SUCCEED) */ + int k; H5D_layout_t dset_layout; - int rank_chunk; + int rank_chunk; hsize_t dims_chunk[H5S_MAX_RANK]; hsize_t size_chunk = 1; hsize_t nchunk_fit; /* number of chunks that fits in hyperslab buffer (H5TOOLS_BUFSIZE) */ @@ -705,36 +725,36 @@ done: */ int do_copy_objects(hid_t fidin, hid_t fidout, trav_table_t *travt, - pack_opt_t *options) /* repack options */ + pack_opt_t *options) /* repack options */ { int ret_value = 0; /*no need to LEAVE() on ERROR: HERR_INIT(int, SUCCEED) */ - hid_t grp_in = -1; /* group ID */ - hid_t grp_out = -1; /* group ID */ - hid_t dset_in = -1; /* read dataset ID */ + hid_t grp_in = -1; /* group ID */ + hid_t grp_out = -1; /* group ID */ + hid_t dset_in = -1; /* read dataset ID */ hid_t dset_out = -1; /* write dataset ID */ - hid_t gcpl_in = -1; /* group creation property list */ + hid_t gcpl_in = -1; /* group creation property list */ hid_t gcpl_out = -1; /* group creation property list */ - hid_t type_in = -1; /* named type ID */ + hid_t type_in = -1; /* named type ID */ hid_t type_out = -1; /* named type ID */ - hid_t dcpl_in = -1; /* dataset creation property list ID */ + hid_t dcpl_in = -1; /* dataset creation property list ID */ hid_t dcpl_out = -1; /* dataset creation property list ID */ hid_t f_space_id = -1; /* file space ID */ hid_t ftype_id = -1; /* file type ID */ hid_t wtype_id = -1; /* read/write type ID */ named_dt_t *named_dt_head = NULL; /* Pointer to the stack of named datatypes copied */ - size_t msize; /* size of type */ - hsize_t nelmts; /* number of elements in dataset */ + size_t msize; /* size of type */ + hsize_t nelmts; /* number of elements in dataset */ H5D_space_status_t space_status; /* determines whether space has been allocated for the dataset */ - int rank; /* rank of dataset */ + int rank; /* rank of dataset */ hsize_t dims[H5S_MAX_RANK];/* dimensions of dataset */ - hsize_t dsize_in; /* input dataset size before filter */ - hsize_t dsize_out; /* output dataset size after filter */ - int apply_s; /* flag for apply filter to small dataset sizes */ - int apply_f; /* flag for apply filter to return error on H5Dcreate */ - void *buf = NULL; /* buffer for raw data */ + hsize_t dsize_in; /* input dataset size before filter */ + hsize_t dsize_out; /* output dataset size after filter */ + int apply_s; /* flag for apply filter to small dataset sizes */ + int apply_f; /* flag for apply filter to return error on H5Dcreate */ + void *buf = NULL; /* buffer for raw data */ void *hslab_buf = NULL; /* hyperslab buffer for raw data */ - int has_filter; /* current object has a filter */ - int req_filter; /* there was a request for a filter */ + int has_filter; /* current object has a filter */ + int req_filter; /* there was a request for a filter */ int req_obj_layout = 0; /* request layout to current object */ unsigned crt_order_flags; /* group creation order flag */ unsigned i; @@ -915,7 +935,7 @@ int do_copy_objects(hid_t fidin, hid_t fidout, trav_table_t *travt, /* wtype_id will have already been set if using a named dtype */ if (!is_named) { if (options->use_native == 1) - wtype_id = h5tools_get_native_type(ftype_id); + wtype_id = H5Tget_native_type(ftype_id, H5T_DIR_DEFAULT); else wtype_id = H5Tcopy(ftype_id); } /* end if */ @@ -1349,20 +1369,19 @@ done: * *------------------------------------------------------------------------- */ -static void print_dataset_info(hid_t dcpl_id, char *objname, double ratio, - int pr) +static void print_dataset_info(hid_t dcpl_id, char *objname, double ratio, int pr) { - char strfilter[255]; + char strfilter[255]; #if defined (PRINT_DEBUG ) - char temp[255]; + char temp[255]; #endif - int nfilters; /* number of filters */ - unsigned filt_flags; /* filter flags */ - H5Z_filter_t filtn; /* filter identification number */ - unsigned cd_values[20]; /* filter client data values */ - size_t cd_nelmts; /* filter client number of values */ - char f_objname[256]; /* filter objname */ - int i; + int nfilters; /* number of filters */ + unsigned filt_flags; /* filter flags */ + H5Z_filter_t filtn; /* filter identification number */ + unsigned cd_values[20]; /* filter client data values */ + size_t cd_nelmts; /* filter client number of values */ + char f_objname[256]; /* filter objname */ + int i; HDstrcpy(strfilter, "\0"); @@ -1461,10 +1480,9 @@ static void print_dataset_info(hid_t dcpl_id, char *objname, double ratio, * *------------------------------------------------------------------------- */ -static int copy_user_block(const char *infile, const char *outfile, - hsize_t size) +static int copy_user_block(const char *infile, const char *outfile, hsize_t size) { - int ret_value = 0; /*no need to LEAVE() on ERROR: HERR_INIT(int, SUCCEED) */ + int ret_value = 0; /*no need to LEAVE() on ERROR: HERR_INIT(int, SUCCEED) */ int infid = -1, outfid = -1; /* File descriptors */ /* User block must be any power of 2 equal to 512 or greater (512, 1024, 2048, etc.) */ @@ -1541,67 +1559,67 @@ done: static void print_user_block(const char *filename, hid_t fid) { - int ret_value = 0; /*no need to LEAVE() on ERROR: HERR_INIT(int, SUCCEED) */ - int fh; /* file handle */ - hsize_t ub_size; /* user block size */ - hsize_t size; /* size read */ - hid_t fcpl; /* file creation property list ID for HDF5 file */ - int i; - - /* get user block size */ - if(( fcpl = H5Fget_create_plist(fid)) < 0) { - error_msg("failed to retrieve file creation property list\n"); + int ret_value = 0; /*no need to LEAVE() on ERROR: HERR_INIT(int, SUCCEED) */ + int fh; /* file handle */ + hsize_t ub_size; /* user block size */ + hsize_t size; /* size read */ + hid_t fcpl; /* file creation property list ID for HDF5 file */ + int i; + + /* get user block size */ + if(( fcpl = H5Fget_create_plist(fid)) < 0) { + error_msg("failed to retrieve file creation property list\n"); HGOTO_ERROR(H5E_tools_g, H5E_tools_min_id_g, "H5Fget_create_plist failed"); } - if(H5Pget_userblock(fcpl, &ub_size) < 0) { - error_msg("failed to retrieve userblock size\n"); + if(H5Pget_userblock(fcpl, &ub_size) < 0) { + error_msg("failed to retrieve userblock size\n"); HGOTO_ERROR(H5E_tools_g, H5E_tools_min_id_g, "H5Pget_userblock failed"); } - if(H5Pclose(fcpl) < 0) { - error_msg("failed to close property list\n"); + if(H5Pclose(fcpl) < 0) { + error_msg("failed to close property list\n"); HGOTO_ERROR(H5E_tools_g, H5E_tools_min_id_g, "H5Pclose failed"); } - /* open file */ - if((fh = HDopen(filename, O_RDONLY, 0)) < 0) { + /* open file */ + if((fh = HDopen(filename, O_RDONLY, 0)) < 0) { HGOTO_ERROR(H5E_tools_g, H5E_tools_min_id_g, "HDopen failed"); } - size = ub_size; + size = ub_size; - /* read file */ - while(size > 0) { - ssize_t nread; /* # of bytes read */ - char rbuf[USERBLOCK_XFER_SIZE]; /* buffer for reading */ + /* read file */ + while(size > 0) { + ssize_t nread; /* # of bytes read */ + char rbuf[USERBLOCK_XFER_SIZE]; /* buffer for reading */ - /* read buffer */ - if(size > USERBLOCK_XFER_SIZE) - nread = HDread(fh, rbuf, (size_t)USERBLOCK_XFER_SIZE); - else - nread = HDread(fh, rbuf, (size_t)size); + /* read buffer */ + if(size > USERBLOCK_XFER_SIZE) + nread = HDread(fh, rbuf, (size_t)USERBLOCK_XFER_SIZE); + else + nread = HDread(fh, rbuf, (size_t)size); - for(i = 0; i < nread; i++) { + for(i = 0; i < nread; i++) { - printf("%c ", rbuf[i]); + printf("%c ", rbuf[i]); - } - printf("\n"); + } + printf("\n"); - if(nread < 0) { + if(nread < 0) { HGOTO_ERROR(H5E_tools_g, H5E_tools_min_id_g, "nread < 0"); } - /* update size of userblock left to transfer */ - size -= nread; - } + /* update size of userblock left to transfer */ + size -= nread; + } done: - if(fh > 0) - HDclose(fh); + if(fh > 0) + HDclose(fh); - return; + return; } #endif diff --git a/tools/src/h5repack/h5repack_main.c b/tools/src/h5repack/h5repack_main.c index 339dc83..31b1e14 100644 --- a/tools/src/h5repack/h5repack_main.c +++ b/tools/src/h5repack/h5repack_main.c @@ -31,7 +31,7 @@ const char *outfile = NULL; * Command-line options: The user can specify short or long-named * parameters. */ -static const char *s_opts = "hVvf:l:m:e:nLc:d:s:u:b:M:t:a:i:o:S:P:T:G:E"; +static const char *s_opts = "hVvf:l:m:e:nLc:d:s:u:b:M:t:a:i:o:S:P:T:G:q:z:E"; static struct long_options l_opts[] = { { "help", no_arg, 'h' }, { "version", no_arg, 'V' }, @@ -56,6 +56,8 @@ static struct long_options l_opts[] = { { "fs_persist", require_arg, 'P' }, { "fs_threshold", require_arg, 'T' }, { "fs_pagesize", require_arg, 'G' }, + { "sort_by", require_arg, 'q' }, + { "sort_order", require_arg, 'z' }, { "enable-error-stack", no_arg, 'E' }, { NULL, 0, '\0' } }; @@ -90,6 +92,8 @@ static void usage(const char *prog) { PRINTVALSTREAM(rawoutstream, " -M A, --metadata_block_size=A Metadata block size for H5Pset_meta_block_size\n"); PRINTVALSTREAM(rawoutstream, " -t T, --threshold=T Threshold value for H5Pset_alignment\n"); PRINTVALSTREAM(rawoutstream, " -a A, --alignment=A Alignment value for H5Pset_alignment\n"); + PRINTVALSTREAM(rawoutstream, " -q Q, --sort_by=Q Sort groups and attributes by index Q\n"); + PRINTVALSTREAM(rawoutstream, " -z Z, --sort_order=Z Sort groups and attributes by order Z\n"); PRINTVALSTREAM(rawoutstream, " -f FILT, --filter=FILT Filter type\n"); PRINTVALSTREAM(rawoutstream, " -l LAYT, --layout=LAYT Layout type\n"); PRINTVALSTREAM(rawoutstream, " -S FS_STRATEGY, --fs_strategy=FS_STRATEGY File space management strategy for H5Pset_file_space_strategy\n"); @@ -103,6 +107,8 @@ static void usage(const char *prog) { PRINTVALSTREAM(rawoutstream, " U - is a filename.\n"); PRINTVALSTREAM(rawoutstream, " T - is an integer\n"); PRINTVALSTREAM(rawoutstream, " A - is an integer greater than zero\n"); + PRINTVALSTREAM(rawoutstream, " Q - is the sort index type for the input file. It can be \"name\" or \"creation_order\" (default)\n"); + PRINTVALSTREAM(rawoutstream, " Z - is the sort order type for the input file. It can be \"descending\" or \"ascending\" (default)\n"); PRINTVALSTREAM(rawoutstream, " B - is the user block size, any value that is 512 or greater and is\n"); PRINTVALSTREAM(rawoutstream, " a power of 2 (1024 default)\n"); PRINTVALSTREAM(rawoutstream, " F - is the shared object header message type, any of fs_persist = HDatoi( opt_arg ); + options->fs_persist = HDatoi(opt_arg); if(options->fs_persist == 0) /* To distinguish the "specified" zero value */ options->fs_persist = -1; break; case 'T': - options->fs_threshold = HDatol( opt_arg ); + options->fs_threshold = HDatol(opt_arg); if(options->fs_threshold == 0) /* To distinguish the "specified" zero value */ options->fs_threshold = -1; @@ -570,12 +622,30 @@ int parse_command_line(int argc, const char **argv, pack_opt_t* options) options->fs_pagesize = HDstrtoll(opt_arg, NULL, 0); if(options->fs_pagesize == 0) /* To distinguish the "specified" zero value */ - options->fs_pagesize = -1; + options->fs_pagesize = -1; break; - case 'E': - enable_error_stack = TRUE; - break; + case 'q': + if((sort_by = set_sort_by(opt_arg)) < 0) { + error_msg(" failed to set sort by form <%s>\n", opt_arg); + h5tools_setstatus(EXIT_FAILURE); + ret_value = -1; + goto done; + } + break; + + case 'z': + if((sort_order = set_sort_order(opt_arg)) < 0) { + error_msg(" failed to set sort order form <%s>\n", opt_arg); + h5tools_setstatus(EXIT_FAILURE); + ret_value = -1; + goto done; + } + break; + + case 'E': + enable_error_stack = TRUE; + break; default: break; @@ -644,6 +714,9 @@ int main(int argc, const char **argv) /* initialize options */ h5repack_init(&options, 0, FALSE); + /* Initialize default indexing options */ + sort_by = H5_INDEX_CRT_ORDER; + if (parse_command_line(argc, argv, &options) < 0) goto done; diff --git a/tools/src/h5repack/h5repack_verify.c b/tools/src/h5repack/h5repack_verify.c index 7e79aa7..4ff4875 100644 --- a/tools/src/h5repack/h5repack_verify.c +++ b/tools/src/h5repack/h5repack_verify.c @@ -55,11 +55,11 @@ h5repack_verify(const char *in_fname, const char *out_fname, pack_opt_t *options trav_table_t *travt = NULL; int ok = 1; hid_t fcpl_in = -1; /* file creation property for input file */ - hid_t fcpl_out = -1; /* file creation property for output file */ - H5F_fspace_strategy_t in_strategy, out_strategy; /* file space handling strategy for in/output file */ - hbool_t in_persist, out_persist; /* free-space persist status for in/output file */ - hsize_t in_threshold, out_threshold; /* free-space section threshold for in/output file */ - hsize_t in_pagesize, out_pagesize; /* file space page size for input/output file */ + hid_t fcpl_out = -1; /* file creation property for output file */ + H5F_fspace_strategy_t in_strategy, out_strategy; /* file space handling strategy for in/output file */ + hbool_t in_persist, out_persist; /* free-space persist status for in/output file */ + hsize_t in_threshold, out_threshold; /* free-space section threshold for in/output file */ + hsize_t in_pagesize, out_pagesize; /* file space page size for input/output file */ /* open the output file */ if((fidout = H5Fopen(out_fname, H5F_ACC_RDONLY, H5P_DEFAULT)) < 0 ) @@ -122,6 +122,8 @@ h5repack_verify(const char *in_fname, const char *out_fname, pack_opt_t *options if(options->all_filter == 1 || options->all_layout == 1) { + /* Initialize indexing options */ + h5trav_set_index(sort_by, sort_order); /* init table */ trav_table_init(&travt); @@ -455,6 +457,9 @@ int h5repack_cmp_pl(const char *fname1, * get file table list of objects *------------------------------------------------------------------------- */ + /* Initialize indexing options */ + h5trav_set_index(sort_by, sort_order); + /* init table */ trav_table_init(&trav); if(h5trav_gettable(fid1, trav) < 0) HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "h5trav_gettable failed"); @@ -643,7 +648,7 @@ int verify_filters(hid_t pid, hid_t tid, int nfilters, filter_info_t *filter) { case H5Z_FILTER_NONE: - break; + break; case H5Z_FILTER_SHUFFLE: /* 1 private client value is returned by DCPL */ diff --git a/tools/test/h5repack/CMakeTests.cmake b/tools/test/h5repack/CMakeTests.cmake index 04e405f..897209c 100644 --- a/tools/test/h5repack/CMakeTests.cmake +++ b/tools/test/h5repack/CMakeTests.cmake @@ -90,6 +90,7 @@ ${HDF5_TOOLS_DIR}/testfiles/tfamily00008.h5 ${HDF5_TOOLS_DIR}/testfiles/tfamily00009.h5 ${HDF5_TOOLS_DIR}/testfiles/tfamily00010.h5 + ${HDF5_TOOLS_DIR}/testfiles/tordergr.h5 # tools/testfiles/vds ${HDF5_TOOLS_DIR}/testfiles/vds/1_a.h5 ${HDF5_TOOLS_DIR}/testfiles/vds/1_b.h5 @@ -137,6 +138,7 @@ ${HDF5_TOOLS_TEST_H5REPACK_SOURCE_DIR}/testfiles/4_vds.h5-vds_compa-v.ddl ${HDF5_TOOLS_TEST_H5REPACK_SOURCE_DIR}/testfiles/4_vds.h5-vds_conti-v.ddl ${HDF5_TOOLS_TEST_H5REPACK_SOURCE_DIR}/testfiles/h5repack_layout.h5-plugin_zero.tst + ${HDF5_TOOLS_TEST_H5REPACK_SOURCE_DIR}/testfiles/crtorder.tordergr.h5.ddl ) foreach (h5_file ${LIST_HDF5_TEST_FILES} ${LIST_OTHER_TEST_FILES}) @@ -312,7 +314,7 @@ NAME H5REPACK_DMP-h5dump-${testname} COMMAND "${CMAKE_COMMAND}" -D "TEST_PROGRAM=$" - -D "TEST_ARGS:STRING=-pH;out-${testname}.${resultfile}" + -D "TEST_ARGS:STRING=-q;creation_order;-pH;out-${testname}.${resultfile}" -D "TEST_FOLDER=${PROJECT_BINARY_DIR}/testfiles" -D "TEST_OUTPUT=${resultfile}-${testname}.out" -D "TEST_EXPECT=${resultcode}" @@ -965,6 +967,11 @@ endif () ADD_H5_TEST (deflate_file ${TESTTYPE} ${arg}) +#crtorder + set (arg tordergr.h5 -L) + set (TESTTYPE "TEST") + ADD_H5_DMP_TEST (crtorder ${TESTTYPE} 0 ${arg}) + ######################################################### # layout options (these files have no filters) ######################################################### diff --git a/tools/test/h5repack/testfiles/crtorder.tordergr.h5.ddl b/tools/test/h5repack/testfiles/crtorder.tordergr.h5.ddl new file mode 100644 index 0000000..870d154 --- /dev/null +++ b/tools/test/h5repack/testfiles/crtorder.tordergr.h5.ddl @@ -0,0 +1,36 @@ +HDF5 "out-crtorder.tordergr.h5" { +GROUP "/" { + GROUP "2" { + GROUP "a" { + GROUP "a1" { + } + GROUP "a2" { + GROUP "a21" { + } + GROUP "a22" { + } + } + } + GROUP "b" { + } + GROUP "c" { + } + } + GROUP "1" { + GROUP "c" { + } + GROUP "b" { + } + GROUP "a" { + GROUP "a1" { + } + GROUP "a2" { + GROUP "a22" { + } + GROUP "a21" { + } + } + } + } +} +} diff --git a/tools/test/h5repack/testfiles/h5repack-help.txt b/tools/test/h5repack/testfiles/h5repack-help.txt index 69b1644..65edd89 100644 --- a/tools/test/h5repack/testfiles/h5repack-help.txt +++ b/tools/test/h5repack/testfiles/h5repack-help.txt @@ -17,6 +17,8 @@ usage: h5repack [OPTIONS] file1 file2 -M A, --metadata_block_size=A Metadata block size for H5Pset_meta_block_size -t T, --threshold=T Threshold value for H5Pset_alignment -a A, --alignment=A Alignment value for H5Pset_alignment + -q Q, --sort_by=Q Sort groups and attributes by index Q + -z Z, --sort_order=Z Sort groups and attributes by order Z -f FILT, --filter=FILT Filter type -l LAYT, --layout=LAYT Layout type -S FS_STRATEGY, --fs_strategy=FS_STRATEGY File space management strategy for H5Pset_file_space_strategy @@ -30,6 +32,8 @@ usage: h5repack [OPTIONS] file1 file2 U - is a filename. T - is an integer A - is an integer greater than zero + Q - is the sort index type for the input file. It can be "name" or "creation_order" (default) + Z - is the sort order type for the input file. It can be "descending" or "ascending" (default) B - is the user block size, any value that is 512 or greater and is a power of 2 (1024 default) F - is the shared object header message type, any of Date: Mon, 22 May 2017 13:24:53 -0500 Subject: Remove obsolete function --- tools/lib/h5tools_type.c | 57 +++++++++++++++++++----------------------------- 1 file changed, 22 insertions(+), 35 deletions(-) diff --git a/tools/lib/h5tools_type.c b/tools/lib/h5tools_type.c index dcc994e..ae7160b 100644 --- a/tools/lib/h5tools_type.c +++ b/tools/lib/h5tools_type.c @@ -15,39 +15,6 @@ #include "h5tools.h" /*------------------------------------------------------------------------- - * Function: h5tools_get_native_type - * - * Purpose: Wrapper around H5Tget_native_type() to work around - * Problems with bitfields. - * - * Return: Success: datatype ID - * - * Failure: FAIL - * - * Programmer: Quincey Koziol - * Tuesday, October 5, 2004 - * - * Modifications: - * - *------------------------------------------------------------------------- - */ -hid_t -h5tools_get_native_type(hid_t type) -{ - hid_t p_type; - H5T_class_t type_class; - - type_class = H5Tget_class(type); - if(type_class==H5T_BITFIELD) - p_type=H5Tcopy(type); - else - p_type = H5Tget_native_type(type,H5T_DIR_DEFAULT); - - return(p_type); -} - - -/*------------------------------------------------------------------------- * Function: h5tools_get_little_endian_type * * Purpose: Get a little endian type from a file type @@ -101,8 +68,18 @@ h5tools_get_little_endian_type(hid_t tid) p_type=H5Tcopy(H5T_IEEE_F64LE); break; - case H5T_TIME: case H5T_BITFIELD: + if ( size == 1) + p_type=H5Tcopy(H5T_STD_B8LE); + else if ( size == 2) + p_type=H5Tcopy(H5T_STD_B16LE); + else if ( size == 4) + p_type=H5Tcopy(H5T_STD_B32LE); + else if ( size == 8) + p_type=H5Tcopy(H5T_STD_B64LE); + break; + + case H5T_TIME: case H5T_OPAQUE: case H5T_STRING: case H5T_COMPOUND: @@ -178,8 +155,18 @@ h5tools_get_big_endian_type(hid_t tid) p_type=H5Tcopy(H5T_IEEE_F64BE); break; - case H5T_TIME: case H5T_BITFIELD: + if ( size == 1) + p_type=H5Tcopy(H5T_STD_B8BE); + else if ( size == 2) + p_type=H5Tcopy(H5T_STD_B16BE); + else if ( size == 4) + p_type=H5Tcopy(H5T_STD_B32BE); + else if ( size == 8) + p_type=H5Tcopy(H5T_STD_B64BE); + break; + + case H5T_TIME: case H5T_OPAQUE: case H5T_STRING: case H5T_COMPOUND: -- cgit v0.12 From 206c4a43e848f51060c2b631ec020cf1ee3f02ba Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Mon, 22 May 2017 13:55:15 -0500 Subject: HDFFV-8611 add autotools test --- tools/test/h5repack/h5repack.sh.in | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/tools/test/h5repack/h5repack.sh.in b/tools/test/h5repack/h5repack.sh.in index c943b22..032494b 100644 --- a/tools/test/h5repack/h5repack.sh.in +++ b/tools/test/h5repack/h5repack.sh.in @@ -113,6 +113,7 @@ $SRC_TOOLS_TESTFILES/tfamily00007.h5 $SRC_TOOLS_TESTFILES/tfamily00008.h5 $SRC_TOOLS_TESTFILES/tfamily00009.h5 $SRC_TOOLS_TESTFILES/tfamily00010.h5 +$SRC_TOOLS_TESTFILES/tordergr.h5 $SRC_TOOLS_TESTFILES/vds/1_a.h5 $SRC_TOOLS_TESTFILES/vds/1_b.h5 $SRC_TOOLS_TESTFILES/vds/1_c.h5 @@ -143,6 +144,7 @@ $SRC_H5REPACK_TESTFILES/h5repack-help.txt $SRC_H5REPACK_TESTFILES/h5repack_ext.bin $SRC_H5REPACK_TESTFILES/ublock.bin $SRC_H5REPACK_TESTFILES/h5repack.info +$SRC_H5REPACK_TESTFILES/crtorder.tordergr.h5.ddl $SRC_H5REPACK_TESTFILES/deflate_limit.h5repack_layout.h5.ddl $SRC_H5REPACK_TESTFILES/h5repack_layout.h5.ddl $SRC_H5REPACK_TESTFILES/h5repack_filters.h5-gzip_verbose_filters.tst @@ -680,7 +682,7 @@ TOOLTEST_DUMP() VERIFY h5dump output $@ ( cd $TESTDIR - $RUNSERIAL $H5DUMP_BIN -pH $outfile + $RUNSERIAL $H5DUMP_BIN -q creation_order -pH $outfile ) >$actual 2>$actual_err cat $actual_err >> $actual @@ -1045,6 +1047,10 @@ else TOOLTEST deflate_file $arg fi +#crtorder +arg="tordergr.h5 -L" +TOOLTEST_DUMP crtorder $arg + ######################################################### # layout options (these files have no filters) ######################################################### -- cgit v0.12 From 635e8c5377ded6201061e1dc819526cd205f06ed Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Wed, 24 May 2017 15:00:51 -0500 Subject: merge from develop and apply HDFFV-8611 --- MANIFEST | 6 +- config/cmake/README.txt.cmake.in | 4 +- java/src/hdf/hdf5lib/H5.java | 6 +- java/src/jni/h5util.c | 32 +- src/H5PL.c | 2 +- src/H5T.c | 2859 +++++++++++++------------- tools/lib/h5diff_attr.c | 12 +- tools/lib/h5diff_util.c | 138 +- tools/lib/h5tools.c | 76 +- tools/lib/h5tools.h | 1 - tools/lib/h5tools_dump.c | 8 +- tools/lib/h5tools_str.c | 454 ++-- tools/src/h5dump/h5dump_xml.c | 450 ++-- tools/src/h5ls/h5ls.c | 2 +- tools/src/h5repack/h5repack_refs.c | 46 +- tools/test/h5copy/h5copygentest.c | 12 +- tools/test/h5copy/testh5copy.sh.in | 2 + tools/test/h5diff/h5diff_plugin.sh.in | 2 + tools/test/h5diff/testfiles/diff_strings1.h5 | Bin 4464 -> 4640 bytes tools/test/h5diff/testfiles/diff_strings2.h5 | Bin 4464 -> 4640 bytes tools/test/h5diff/testfiles/h5diff_dset1.h5 | Bin 23416 -> 23416 bytes tools/test/h5diff/testfiles/h5diff_dset2.h5 | Bin 23416 -> 23416 bytes tools/test/h5diff/testfiles/h5diff_dset3.h5 | Bin 23416 -> 23416 bytes tools/test/h5diff/testh5diff.sh.in | 2 + tools/test/h5dump/CMakeTests.cmake | 15 +- tools/test/h5dump/CMakeTestsXML.cmake | 15 +- tools/test/h5dump/h5dump_plugin.sh.in | 2 + tools/test/h5dump/h5dumpgentest.c | 37 +- tools/test/h5dump/testh5dump.sh.in | 59 +- tools/test/h5dump/testh5dumppbits.sh.in | 22 +- tools/test/h5dump/testh5dumpvds.sh.in | 8 + tools/test/h5dump/testh5dumpxml.sh.in | 25 +- tools/test/h5jam/testh5jam.sh.in | 438 ++-- tools/test/h5ls/Makefile.am | 1 + tools/test/h5ls/h5ls_plugin.sh.in | 30 +- tools/test/h5ls/testh5ls.sh.in | 36 +- tools/test/h5ls/testh5lsvds.sh.in | 34 +- tools/test/h5repack/Makefile.am | 1 + tools/test/h5repack/h5repack.sh.in | 40 +- tools/test/h5stat/testh5stat.sh.in | 60 +- tools/test/misc/talign.c | 39 +- tools/test/misc/testh5mkgrp.sh.in | 32 +- tools/testfiles/tbitfields_be.h5.xml | 103 + tools/testfiles/tbitfields_le.h5.xml | 103 + tools/testfiles/tbitnopaque.ddl | 293 --- tools/testfiles/tbitnopaque.h5 | Bin 8240 -> 8240 bytes tools/testfiles/tbitnopaque_be.ddl | 293 +++ tools/testfiles/tbitnopaque_le.ddl | 293 +++ 48 files changed, 3280 insertions(+), 2813 deletions(-) create mode 100644 tools/testfiles/tbitfields_be.h5.xml create mode 100644 tools/testfiles/tbitfields_le.h5.xml delete mode 100644 tools/testfiles/tbitnopaque.ddl create mode 100644 tools/testfiles/tbitnopaque_be.ddl create mode 100644 tools/testfiles/tbitnopaque_le.ddl diff --git a/MANIFEST b/MANIFEST index fbbdecd..c34e614 100644 --- a/MANIFEST +++ b/MANIFEST @@ -1629,7 +1629,8 @@ ./tools/testfiles/tbinregR.exp ./tools/testfiles/tbinregR.ddl ./tools/testfiles/tbitfields.h5 -./tools/testfiles/tbitnopaque.ddl +./tools/testfiles/tbitnopaque_be.ddl +./tools/testfiles/tbitnopaque_le.ddl ./tools/testfiles/tbitnopaque.h5 ./tools/testfiles/tboot1.ddl ./tools/testfiles/tboot2.ddl @@ -2079,7 +2080,8 @@ ./tools/testfiles/tarray6.h5.xml ./tools/testfiles/tarray7.h5.xml ./tools/testfiles/tattr.h5.xml -./tools/testfiles/tbitfields.h5.xml +./tools/testfiles/tbitfields_be.h5.xml +./tools/testfiles/tbitfields_le.h5.xml ./tools/testfiles/tcompound.h5.xml ./tools/testfiles/tcompound2.h5.xml ./tools/testfiles/tcompound_complex.h5.xml diff --git a/config/cmake/README.txt.cmake.in b/config/cmake/README.txt.cmake.in index 1d6ef45..ceeda49 100644 --- a/config/cmake/README.txt.cmake.in +++ b/config/cmake/README.txt.cmake.in @@ -35,6 +35,8 @@ To test the installation with the examples; Create a directory to run the examples. Copy HDF5Examples folder to this directory. Copy HDF5_Examples.cmake to this directory. + Copy HDF5_Examples_options.cmake to this directory. + Copy CTestScript.cmake to this directory. The default source folder is defined as "HDF5Examples". It can be changed with the CTEST_SOURCE_NAME script option. The default installation folder is defined as "@CMAKE_INSTALL_PREFIX@". @@ -44,7 +46,7 @@ To test the installation with the examples; be the same as the value used with the -C command line option. The default build configuration is defined to build and use static libraries. Shared libraries can be used with the STATICONLYLIBRARIES script option set to "NO". - Other options can be changed by editing the HDF5_Examples.cmake file. + Other options can be changed by editing the HDF5_Examples_options.cmake file. If the defaults are okay, execute from this directory: ctest -S HDF5_Examples.cmake -C Release -V -O test.log diff --git a/java/src/hdf/hdf5lib/H5.java b/java/src/hdf/hdf5lib/H5.java index 14d7186..35b61bd 100644 --- a/java/src/hdf/hdf5lib/H5.java +++ b/java/src/hdf/hdf5lib/H5.java @@ -2893,7 +2893,8 @@ public class H5 implements java.io.Serializable { * @param file_id * IN: Identifier of the target file. * - * @param mdc_logging_status, the status + * @param mdc_logging_status + * the status * mdc_logging_status[0] = is_enabled, whether logging is enabled * mdc_logging_status[1] = is_currently_logging, whether events are currently being logged * @@ -5811,7 +5812,8 @@ public class H5 implements java.io.Serializable { * * @param fapl_id * IN: File access property list identifier - * @param mdc_log_options, the options + * @param mdc_log_options + * the options * mdc_logging_options[0] = is_enabled, whether logging is enabled * mdc_logging_options[1] = start_on_access, whether the logging begins as soon as the file is opened or created * diff --git a/java/src/jni/h5util.c b/java/src/jni/h5util.c index 8454815..bd9fc0f 100644 --- a/java/src/jni/h5util.c +++ b/java/src/jni/h5util.c @@ -350,7 +350,7 @@ h5str_sprintf this_str = (char*)HDmalloc(4 * (nll + 1)); if (1 == nll) { - sprintf(this_str, "0x%02x", ucptr[0]); + sprintf(this_str, "%#02x", ucptr[0]); } else { for (i = 0; i < (int)nll; i++) @@ -481,7 +481,7 @@ h5str_sprintf this_str = (char*)HDmalloc(4 * (nll + 1)); if (1 == nll) { - sprintf(this_str, "0x%02x", ucptr[0]); + sprintf(this_str, "%#02x", ucptr[0]); } else { for (i = 0; i < (int)nll; i++) @@ -1051,8 +1051,20 @@ h5str_get_little_endian_type p_type=H5Tcopy(H5T_IEEE_F64LE); break; - case H5T_TIME: case H5T_BITFIELD: + { + if ( size == 1) + p_type=H5Tcopy(H5T_STD_B8LE); + else if ( size == 2) + p_type=H5Tcopy(H5T_STD_B16LE); + else if ( size == 4) + p_type=H5Tcopy(H5T_STD_B32LE); + else if ( size == 8) + p_type=H5Tcopy(H5T_STD_B64LE); + } + break; + + case H5T_TIME: case H5T_OPAQUE: case H5T_STRING: case H5T_COMPOUND: @@ -1122,8 +1134,20 @@ h5str_get_big_endian_type p_type=H5Tcopy(H5T_IEEE_F64BE); break; - case H5T_TIME: case H5T_BITFIELD: + { + if ( size == 1) + p_type=H5Tcopy(H5T_STD_B8BE); + else if ( size == 2) + p_type=H5Tcopy(H5T_STD_B16BE); + else if ( size == 4) + p_type=H5Tcopy(H5T_STD_B32BE); + else if ( size == 8) + p_type=H5Tcopy(H5T_STD_B64BE); + } + break; + + case H5T_TIME: case H5T_OPAQUE: case H5T_STRING: case H5T_COMPOUND: diff --git a/src/H5PL.c b/src/H5PL.c index bc69a25..65d6c91 100644 --- a/src/H5PL.c +++ b/src/H5PL.c @@ -198,7 +198,7 @@ H5PL__init_package(void) * to tell the library to load plugin libraries without search. */ if(NULL != (preload_path = HDgetenv("HDF5_PLUGIN_PRELOAD"))) - /* Special symbal "::" means no plugin during data reading. */ + /* Special symbol "::" means no plugin during data reading. */ if(!HDstrcmp(preload_path, H5PL_NO_PLUGIN)) H5PL_plugin_g = 0; diff --git a/src/H5T.c b/src/H5T.c index 5e4171d..a525cd5 100644 --- a/src/H5T.c +++ b/src/H5T.c @@ -22,24 +22,24 @@ /* Module Setup */ /****************/ -#include "H5Tmodule.h" /* This source code file is part of the H5T module */ +#include "H5Tmodule.h" /* This source code file is part of the H5T module */ /***********/ /* Headers */ /***********/ -#include "H5private.h" /* Generic Functions */ -#include "H5ACprivate.h" /* Metadata cache */ -#include "H5Dprivate.h" /* Datasets */ -#include "H5Eprivate.h" /* Error handling */ -#include "H5Fprivate.h" /* Files */ -#include "H5FLprivate.h" /* Free Lists */ -#include "H5FOprivate.h" /* File objects */ -#include "H5Gprivate.h" /* Groups */ -#include "H5Iprivate.h" /* IDs */ -#include "H5MMprivate.h" /* Memory management */ -#include "H5Pprivate.h" /* Property lists */ -#include "H5Tpkg.h" /* Datatypes */ +#include "H5private.h" /* Generic Functions */ +#include "H5ACprivate.h" /* Metadata cache */ +#include "H5Dprivate.h" /* Datasets */ +#include "H5Eprivate.h" /* Error handling */ +#include "H5Fprivate.h" /* Files */ +#include "H5FLprivate.h" /* Free Lists */ +#include "H5FOprivate.h" /* File objects */ +#include "H5Gprivate.h" /* Groups */ +#include "H5Iprivate.h" /* IDs */ +#include "H5MMprivate.h" /* Memory management */ +#include "H5Pprivate.h" /* Property lists */ +#include "H5Tpkg.h" /* Datatypes */ /* Check for header needed for SGI floating-point code */ #ifdef H5_HAVE_SYS_FPU_H @@ -63,209 +63,222 @@ */ /* Define the code template for bitfields for the "GUTS" in the H5T_INIT_TYPE macro */ -#define H5T_INIT_TYPE_BITFIELD_CORE { \ - dt->shared->type = H5T_BITFIELD; \ +#define H5T_INIT_TYPE_BITFIELD_CORE { \ + dt->shared->type = H5T_BITFIELD; \ +} + +#define H5T_INIT_TYPE_BITFIELD_COMMON(ENDIANNESS) { \ + H5T_INIT_TYPE_NUM_COMMON(ENDIANNESS) \ + H5T_INIT_TYPE_BITFIELD_CORE; \ +} + +#define H5T_INIT_TYPE_BITFIELDLE_CORE { \ + H5T_INIT_TYPE_BITFIELD_COMMON(H5T_ORDER_LE) \ +} + +#define H5T_INIT_TYPE_BITFIELDBE_CORE { \ + H5T_INIT_TYPE_BITFIELD_COMMON(H5T_ORDER_BE) \ } /* Define the code template for times for the "GUTS" in the H5T_INIT_TYPE macro */ -#define H5T_INIT_TYPE_TIME_CORE { \ - dt->shared->type = H5T_TIME; \ +#define H5T_INIT_TYPE_TIME_CORE { \ + dt->shared->type = H5T_TIME; \ } /* Define the code template for types which reset the offset for the "GUTS" in the H5T_INIT_TYPE macro */ -#define H5T_INIT_TYPE_OFFSET_CORE { \ - dt->shared->u.atomic.offset = 0; \ +#define H5T_INIT_TYPE_OFFSET_CORE { \ + dt->shared->u.atomic.offset = 0; \ } /* Define common code for all numeric types (floating-point & int, signed & unsigned) */ -#define H5T_INIT_TYPE_NUM_COMMON(ENDIANNESS) { \ - dt->shared->u.atomic.order = ENDIANNESS; \ - dt->shared->u.atomic.offset = 0; \ - dt->shared->u.atomic.lsb_pad = H5T_PAD_ZERO; \ - dt->shared->u.atomic.msb_pad = H5T_PAD_ZERO; \ +#define H5T_INIT_TYPE_NUM_COMMON(ENDIANNESS) { \ + dt->shared->u.atomic.order = ENDIANNESS; \ + dt->shared->u.atomic.offset = 0; \ + dt->shared->u.atomic.lsb_pad = H5T_PAD_ZERO; \ + dt->shared->u.atomic.msb_pad = H5T_PAD_ZERO; \ } /* Define the code templates for standard floats for the "GUTS" in the H5T_INIT_TYPE macro */ -#define H5T_INIT_TYPE_FLOAT_COMMON(ENDIANNESS) { \ - H5T_INIT_TYPE_NUM_COMMON(ENDIANNESS) \ - dt->shared->u.atomic.u.f.sign = 31; \ - dt->shared->u.atomic.u.f.epos = 23; \ - dt->shared->u.atomic.u.f.esize = 8; \ - dt->shared->u.atomic.u.f.ebias = 0x7f; \ - dt->shared->u.atomic.u.f.mpos = 0; \ - dt->shared->u.atomic.u.f.msize = 23; \ - dt->shared->u.atomic.u.f.norm = H5T_NORM_IMPLIED; \ - dt->shared->u.atomic.u.f.pad = H5T_PAD_ZERO; \ +#define H5T_INIT_TYPE_FLOAT_COMMON(ENDIANNESS) { \ + H5T_INIT_TYPE_NUM_COMMON(ENDIANNESS) \ + dt->shared->u.atomic.u.f.sign = 31; \ + dt->shared->u.atomic.u.f.epos = 23; \ + dt->shared->u.atomic.u.f.esize = 8; \ + dt->shared->u.atomic.u.f.ebias = 0x7f; \ + dt->shared->u.atomic.u.f.mpos = 0; \ + dt->shared->u.atomic.u.f.msize = 23; \ + dt->shared->u.atomic.u.f.norm = H5T_NORM_IMPLIED; \ + dt->shared->u.atomic.u.f.pad = H5T_PAD_ZERO; \ } -#define H5T_INIT_TYPE_FLOATLE_CORE { \ - H5T_INIT_TYPE_FLOAT_COMMON(H5T_ORDER_LE) \ +#define H5T_INIT_TYPE_FLOATLE_CORE { \ + H5T_INIT_TYPE_FLOAT_COMMON(H5T_ORDER_LE) \ } -#define H5T_INIT_TYPE_FLOATBE_CORE { \ - H5T_INIT_TYPE_FLOAT_COMMON(H5T_ORDER_BE) \ +#define H5T_INIT_TYPE_FLOATBE_CORE { \ + H5T_INIT_TYPE_FLOAT_COMMON(H5T_ORDER_BE) \ } /* Define the code templates for standard doubles for the "GUTS" in the H5T_INIT_TYPE macro */ -#define H5T_INIT_TYPE_DOUBLE_COMMON(ENDIANNESS) { \ - H5T_INIT_TYPE_NUM_COMMON(ENDIANNESS) \ - dt->shared->u.atomic.u.f.sign = 63; \ - dt->shared->u.atomic.u.f.epos = 52; \ - dt->shared->u.atomic.u.f.esize = 11; \ - dt->shared->u.atomic.u.f.ebias = 0x03ff; \ - dt->shared->u.atomic.u.f.mpos = 0; \ - dt->shared->u.atomic.u.f.msize = 52; \ - dt->shared->u.atomic.u.f.norm = H5T_NORM_IMPLIED; \ - dt->shared->u.atomic.u.f.pad = H5T_PAD_ZERO; \ +#define H5T_INIT_TYPE_DOUBLE_COMMON(ENDIANNESS) { \ + H5T_INIT_TYPE_NUM_COMMON(ENDIANNESS) \ + dt->shared->u.atomic.u.f.sign = 63; \ + dt->shared->u.atomic.u.f.epos = 52; \ + dt->shared->u.atomic.u.f.esize = 11; \ + dt->shared->u.atomic.u.f.ebias = 0x03ff; \ + dt->shared->u.atomic.u.f.mpos = 0; \ + dt->shared->u.atomic.u.f.msize = 52; \ + dt->shared->u.atomic.u.f.norm = H5T_NORM_IMPLIED; \ + dt->shared->u.atomic.u.f.pad = H5T_PAD_ZERO; \ } -#define H5T_INIT_TYPE_DOUBLELE_CORE { \ - H5T_INIT_TYPE_DOUBLE_COMMON(H5T_ORDER_LE) \ +#define H5T_INIT_TYPE_DOUBLELE_CORE { \ + H5T_INIT_TYPE_DOUBLE_COMMON(H5T_ORDER_LE) \ } -#define H5T_INIT_TYPE_DOUBLEBE_CORE { \ - H5T_INIT_TYPE_DOUBLE_COMMON(H5T_ORDER_BE) \ +#define H5T_INIT_TYPE_DOUBLEBE_CORE { \ + H5T_INIT_TYPE_DOUBLE_COMMON(H5T_ORDER_BE) \ } /* Define the code templates for VAX float for the "GUTS" in the H5T_INIT_TYPE macro */ -#define H5T_INIT_TYPE_FLOATVAX_CORE { \ - H5T_INIT_TYPE_NUM_COMMON(H5T_ORDER_VAX) \ - dt->shared->u.atomic.u.f.sign = 31; \ - dt->shared->u.atomic.u.f.epos = 23; \ - dt->shared->u.atomic.u.f.esize = 8; \ - dt->shared->u.atomic.u.f.ebias = 0x81; \ - dt->shared->u.atomic.u.f.mpos = 0; \ - dt->shared->u.atomic.u.f.msize = 23; \ - dt->shared->u.atomic.u.f.norm = H5T_NORM_IMPLIED; \ - dt->shared->u.atomic.u.f.pad = H5T_PAD_ZERO; \ - dt->shared->version = H5O_DTYPE_VERSION_3; \ +#define H5T_INIT_TYPE_FLOATVAX_CORE { \ + H5T_INIT_TYPE_NUM_COMMON(H5T_ORDER_VAX) \ + dt->shared->u.atomic.u.f.sign = 31; \ + dt->shared->u.atomic.u.f.epos = 23; \ + dt->shared->u.atomic.u.f.esize = 8; \ + dt->shared->u.atomic.u.f.ebias = 0x81; \ + dt->shared->u.atomic.u.f.mpos = 0; \ + dt->shared->u.atomic.u.f.msize = 23; \ + dt->shared->u.atomic.u.f.norm = H5T_NORM_IMPLIED; \ + dt->shared->u.atomic.u.f.pad = H5T_PAD_ZERO; \ + dt->shared->version = H5O_DTYPE_VERSION_3; \ } /* Define the code templates for VAX double for the "GUTS" in the H5T_INIT_TYPE macro */ -#define H5T_INIT_TYPE_DOUBLEVAX_CORE { \ - H5T_INIT_TYPE_NUM_COMMON(H5T_ORDER_VAX) \ - dt->shared->u.atomic.u.f.sign = 63; \ - dt->shared->u.atomic.u.f.epos = 52; \ - dt->shared->u.atomic.u.f.esize = 11; \ - dt->shared->u.atomic.u.f.ebias = 0x0401; \ - dt->shared->u.atomic.u.f.mpos = 0; \ - dt->shared->u.atomic.u.f.msize = 52; \ - dt->shared->u.atomic.u.f.norm = H5T_NORM_IMPLIED; \ - dt->shared->u.atomic.u.f.pad = H5T_PAD_ZERO; \ - dt->shared->version = H5O_DTYPE_VERSION_3; \ +#define H5T_INIT_TYPE_DOUBLEVAX_CORE { \ + H5T_INIT_TYPE_NUM_COMMON(H5T_ORDER_VAX) \ + dt->shared->u.atomic.u.f.sign = 63; \ + dt->shared->u.atomic.u.f.epos = 52; \ + dt->shared->u.atomic.u.f.esize = 11; \ + dt->shared->u.atomic.u.f.ebias = 0x0401; \ + dt->shared->u.atomic.u.f.mpos = 0; \ + dt->shared->u.atomic.u.f.msize = 52; \ + dt->shared->u.atomic.u.f.norm = H5T_NORM_IMPLIED; \ + dt->shared->u.atomic.u.f.pad = H5T_PAD_ZERO; \ + dt->shared->version = H5O_DTYPE_VERSION_3; \ } /* Define the code templates for standard signed integers for the "GUTS" in the H5T_INIT_TYPE macro */ -#define H5T_INIT_TYPE_SINT_COMMON(ENDIANNESS) { \ - H5T_INIT_TYPE_NUM_COMMON(ENDIANNESS) \ - dt->shared->u.atomic.u.i.sign = H5T_SGN_2; \ +#define H5T_INIT_TYPE_SINT_COMMON(ENDIANNESS) { \ + H5T_INIT_TYPE_NUM_COMMON(ENDIANNESS) \ + dt->shared->u.atomic.u.i.sign = H5T_SGN_2; \ } -#define H5T_INIT_TYPE_SINTLE_CORE { \ - H5T_INIT_TYPE_SINT_COMMON(H5T_ORDER_LE) \ +#define H5T_INIT_TYPE_SINTLE_CORE { \ + H5T_INIT_TYPE_SINT_COMMON(H5T_ORDER_LE) \ } -#define H5T_INIT_TYPE_SINTBE_CORE { \ - H5T_INIT_TYPE_SINT_COMMON(H5T_ORDER_BE) \ +#define H5T_INIT_TYPE_SINTBE_CORE { \ + H5T_INIT_TYPE_SINT_COMMON(H5T_ORDER_BE) \ } /* Define the code templates for standard unsigned integers for the "GUTS" in the H5T_INIT_TYPE macro */ -#define H5T_INIT_TYPE_UINT_COMMON(ENDIANNESS) { \ - H5T_INIT_TYPE_NUM_COMMON(ENDIANNESS) \ - dt->shared->u.atomic.u.i.sign = H5T_SGN_NONE; \ +#define H5T_INIT_TYPE_UINT_COMMON(ENDIANNESS) { \ + H5T_INIT_TYPE_NUM_COMMON(ENDIANNESS) \ + dt->shared->u.atomic.u.i.sign = H5T_SGN_NONE; \ } -#define H5T_INIT_TYPE_UINTLE_CORE { \ - H5T_INIT_TYPE_UINT_COMMON(H5T_ORDER_LE) \ +#define H5T_INIT_TYPE_UINTLE_CORE { \ + H5T_INIT_TYPE_UINT_COMMON(H5T_ORDER_LE) \ } -#define H5T_INIT_TYPE_UINTBE_CORE { \ - H5T_INIT_TYPE_UINT_COMMON(H5T_ORDER_BE) \ +#define H5T_INIT_TYPE_UINTBE_CORE { \ + H5T_INIT_TYPE_UINT_COMMON(H5T_ORDER_BE) \ } /* Define a macro for common code for all newly allocate datatypes */ -#define H5T_INIT_TYPE_ALLOC_COMMON(TYPE) { \ - dt->sh_loc.type = H5O_SHARE_TYPE_UNSHARED; \ - dt->shared->type = TYPE; \ +#define H5T_INIT_TYPE_ALLOC_COMMON(TYPE) { \ + dt->sh_loc.type = H5O_SHARE_TYPE_UNSHARED; \ + dt->shared->type = TYPE; \ } /* Define the code templates for opaque for the "GUTS" in the H5T_INIT_TYPE macro */ -#define H5T_INIT_TYPE_OPAQ_CORE { \ - H5T_INIT_TYPE_ALLOC_COMMON(H5T_OPAQUE) \ - dt->shared->u.opaque.tag = H5MM_xstrdup(""); \ +#define H5T_INIT_TYPE_OPAQ_CORE { \ + H5T_INIT_TYPE_ALLOC_COMMON(H5T_OPAQUE) \ + dt->shared->u.opaque.tag = H5MM_xstrdup(""); \ } /* Define the code templates for strings for the "GUTS" in the H5T_INIT_TYPE macro */ -#define H5T_INIT_TYPE_STRING_COMMON { \ - H5T_INIT_TYPE_ALLOC_COMMON(H5T_STRING) \ - H5T_INIT_TYPE_NUM_COMMON(H5T_ORDER_NONE) \ - dt->shared->u.atomic.u.s.cset = H5F_DEFAULT_CSET; \ +#define H5T_INIT_TYPE_STRING_COMMON { \ + H5T_INIT_TYPE_ALLOC_COMMON(H5T_STRING) \ + H5T_INIT_TYPE_NUM_COMMON(H5T_ORDER_NONE) \ + dt->shared->u.atomic.u.s.cset = H5F_DEFAULT_CSET; \ } -#define H5T_INIT_TYPE_CSTRING_CORE { \ - H5T_INIT_TYPE_STRING_COMMON \ - dt->shared->u.atomic.u.s.pad = H5T_STR_NULLTERM; \ +#define H5T_INIT_TYPE_CSTRING_CORE { \ + H5T_INIT_TYPE_STRING_COMMON \ + dt->shared->u.atomic.u.s.pad = H5T_STR_NULLTERM; \ } -#define H5T_INIT_TYPE_FORSTRING_CORE { \ - H5T_INIT_TYPE_STRING_COMMON \ - dt->shared->u.atomic.u.s.pad = H5T_STR_SPACEPAD; \ +#define H5T_INIT_TYPE_FORSTRING_CORE { \ + H5T_INIT_TYPE_STRING_COMMON \ + dt->shared->u.atomic.u.s.pad = H5T_STR_SPACEPAD; \ } /* Define the code templates for references for the "GUTS" in the H5T_INIT_TYPE macro */ -#define H5T_INIT_TYPE_REF_COMMON { \ - H5T_INIT_TYPE_ALLOC_COMMON(H5T_REFERENCE) \ - H5T_INIT_TYPE_NUM_COMMON(H5T_ORDER_NONE) \ +#define H5T_INIT_TYPE_REF_COMMON { \ + H5T_INIT_TYPE_ALLOC_COMMON(H5T_REFERENCE) \ + H5T_INIT_TYPE_NUM_COMMON(H5T_ORDER_NONE) \ } -#define H5T_INIT_TYPE_OBJREF_CORE { \ - H5T_INIT_TYPE_REF_COMMON \ - dt->shared->force_conv = TRUE; \ - dt->shared->u.atomic.u.r.rtype = H5R_OBJECT; \ - dt->shared->u.atomic.u.r.loc = H5T_LOC_MEMORY; \ +#define H5T_INIT_TYPE_OBJREF_CORE { \ + H5T_INIT_TYPE_REF_COMMON \ + dt->shared->force_conv = TRUE; \ + dt->shared->u.atomic.u.r.rtype = H5R_OBJECT; \ + dt->shared->u.atomic.u.r.loc = H5T_LOC_MEMORY; \ } -#define H5T_INIT_TYPE_REGREF_CORE { \ - H5T_INIT_TYPE_REF_COMMON \ - dt->shared->u.atomic.u.r.rtype = H5R_DATASET_REGION; \ +#define H5T_INIT_TYPE_REGREF_CORE { \ + H5T_INIT_TYPE_REF_COMMON \ + dt->shared->u.atomic.u.r.rtype = H5R_DATASET_REGION; \ } /* Define the code templates for the "SIZE_TMPL" in the H5T_INIT_TYPE macro */ -#define H5T_INIT_TYPE_SET_SIZE(SIZE) { \ - dt->shared->size = SIZE; \ - dt->shared->u.atomic.prec = 8 * SIZE; \ +#define H5T_INIT_TYPE_SET_SIZE(SIZE) { \ + dt->shared->size = SIZE; \ + dt->shared->u.atomic.prec = 8 * SIZE; \ } -#define H5T_INIT_TYPE_NOSET_SIZE(SIZE) { \ +#define H5T_INIT_TYPE_NOSET_SIZE(SIZE) { \ } /* Define the code templates for the "CRT_TMPL" in the H5T_INIT_TYPE macro */ -#define H5T_INIT_TYPE_COPY_CREATE(BASE) { \ - /* Base off of existing datatype */ \ - if(NULL == (dt = H5T_copy(BASE, H5T_COPY_TRANSIENT))) \ +#define H5T_INIT_TYPE_COPY_CREATE(BASE) { \ + /* Base off of existing datatype */ \ + if(NULL == (dt = H5T_copy(BASE, H5T_COPY_TRANSIENT))) \ HGOTO_ERROR(H5E_DATATYPE, H5E_CANTCOPY, FAIL, "duplicating base type failed") \ } -#define H5T_INIT_TYPE_ALLOC_CREATE(BASE) { \ - /* Allocate new datatype info */ \ - if(NULL == (dt = H5T__alloc())) \ +#define H5T_INIT_TYPE_ALLOC_CREATE(BASE) { \ + /* Allocate new datatype info */ \ + if(NULL == (dt = H5T__alloc())) \ HGOTO_ERROR(H5E_DATATYPE, H5E_CANTALLOC, FAIL, "memory allocation failed") \ } -#define H5T_INIT_TYPE(GUTS,GLOBAL,CRT_TMPL,BASE,SIZE_TMPL,SIZE) { \ - /* Get new datatype struct */ \ - H5_GLUE3(H5T_INIT_TYPE_,CRT_TMPL,_CREATE)(BASE) \ - \ - /* Adjust information for all types */ \ - dt->shared->state = H5T_STATE_IMMUTABLE; \ - H5_GLUE3(H5T_INIT_TYPE_,SIZE_TMPL,_SIZE)(SIZE) \ - \ - /* Adjust information for this type */ \ - H5_GLUE3(H5T_INIT_TYPE_, GUTS, _CORE) \ - \ - /* Atomize result */ \ - if((GLOBAL = H5I_register(H5I_DATATYPE, dt, FALSE)) < 0) \ +#define H5T_INIT_TYPE(GUTS,GLOBAL,CRT_TMPL,BASE,SIZE_TMPL,SIZE) { \ + /* Get new datatype struct */ \ + H5_GLUE3(H5T_INIT_TYPE_,CRT_TMPL,_CREATE)(BASE) \ + \ + /* Adjust information for all types */ \ + dt->shared->state = H5T_STATE_IMMUTABLE; \ + H5_GLUE3(H5T_INIT_TYPE_,SIZE_TMPL,_SIZE)(SIZE) \ + \ + /* Adjust information for this type */ \ + H5_GLUE3(H5T_INIT_TYPE_, GUTS, _CORE) \ + \ + /* Atomize result */ \ + if((GLOBAL = H5I_register(H5I_DATATYPE, dt, FALSE)) < 0) \ HGOTO_ERROR(H5E_DATATYPE, H5E_CANTREGISTER, FAIL, "unable to register datatype atom") \ } @@ -279,9 +292,9 @@ /* Local Prototypes */ /********************/ static herr_t H5T_unregister(H5T_pers_t pers, const char *name, H5T_t *src, - H5T_t *dst, H5T_conv_t func, hid_t dxpl_id); + H5T_t *dst, H5T_conv_t func, hid_t dxpl_id); static herr_t H5T_register(H5T_pers_t pers, const char *name, H5T_t *src, - H5T_t *dst, H5T_conv_t func, hid_t dxpl_id, hbool_t api_call); + H5T_t *dst, H5T_conv_t func, hid_t dxpl_id, hbool_t api_call); static htri_t H5T_compiler_conv(H5T_t *src, H5T_t *dst); static herr_t H5T_set_size(H5T_t *dt, size_t size); @@ -308,103 +321,103 @@ hbool_t H5_PKG_INIT_VAR = FALSE; * If more of these are added, the new ones must be added to the list of * types to reset in H5T_term_package(). */ -hid_t H5T_IEEE_F32BE_g = FAIL; -hid_t H5T_IEEE_F32LE_g = FAIL; -hid_t H5T_IEEE_F64BE_g = FAIL; -hid_t H5T_IEEE_F64LE_g = FAIL; - -hid_t H5T_VAX_F32_g = FAIL; -hid_t H5T_VAX_F64_g = FAIL; - -hid_t H5T_STD_I8BE_g = FAIL; -hid_t H5T_STD_I8LE_g = FAIL; -hid_t H5T_STD_I16BE_g = FAIL; -hid_t H5T_STD_I16LE_g = FAIL; -hid_t H5T_STD_I32BE_g = FAIL; -hid_t H5T_STD_I32LE_g = FAIL; -hid_t H5T_STD_I64BE_g = FAIL; -hid_t H5T_STD_I64LE_g = FAIL; -hid_t H5T_STD_U8BE_g = FAIL; -hid_t H5T_STD_U8LE_g = FAIL; -hid_t H5T_STD_U16BE_g = FAIL; -hid_t H5T_STD_U16LE_g = FAIL; -hid_t H5T_STD_U32BE_g = FAIL; -hid_t H5T_STD_U32LE_g = FAIL; -hid_t H5T_STD_U64BE_g = FAIL; -hid_t H5T_STD_U64LE_g = FAIL; -hid_t H5T_STD_B8BE_g = FAIL; -hid_t H5T_STD_B8LE_g = FAIL; -hid_t H5T_STD_B16BE_g = FAIL; -hid_t H5T_STD_B16LE_g = FAIL; -hid_t H5T_STD_B32BE_g = FAIL; -hid_t H5T_STD_B32LE_g = FAIL; -hid_t H5T_STD_B64BE_g = FAIL; -hid_t H5T_STD_B64LE_g = FAIL; -hid_t H5T_STD_REF_OBJ_g = FAIL; -hid_t H5T_STD_REF_DSETREG_g = FAIL; - -hid_t H5T_UNIX_D32BE_g = FAIL; -hid_t H5T_UNIX_D32LE_g = FAIL; -hid_t H5T_UNIX_D64BE_g = FAIL; -hid_t H5T_UNIX_D64LE_g = FAIL; - -hid_t H5T_C_S1_g = FAIL; - -hid_t H5T_FORTRAN_S1_g = FAIL; - -hid_t H5T_NATIVE_SCHAR_g = FAIL; -hid_t H5T_NATIVE_UCHAR_g = FAIL; -hid_t H5T_NATIVE_SHORT_g = FAIL; -hid_t H5T_NATIVE_USHORT_g = FAIL; -hid_t H5T_NATIVE_INT_g = FAIL; -hid_t H5T_NATIVE_UINT_g = FAIL; -hid_t H5T_NATIVE_LONG_g = FAIL; -hid_t H5T_NATIVE_ULONG_g = FAIL; -hid_t H5T_NATIVE_LLONG_g = FAIL; -hid_t H5T_NATIVE_ULLONG_g = FAIL; -hid_t H5T_NATIVE_FLOAT_g = FAIL; -hid_t H5T_NATIVE_DOUBLE_g = FAIL; +hid_t H5T_IEEE_F32BE_g = FAIL; +hid_t H5T_IEEE_F32LE_g = FAIL; +hid_t H5T_IEEE_F64BE_g = FAIL; +hid_t H5T_IEEE_F64LE_g = FAIL; + +hid_t H5T_VAX_F32_g = FAIL; +hid_t H5T_VAX_F64_g = FAIL; + +hid_t H5T_STD_I8BE_g = FAIL; +hid_t H5T_STD_I8LE_g = FAIL; +hid_t H5T_STD_I16BE_g = FAIL; +hid_t H5T_STD_I16LE_g = FAIL; +hid_t H5T_STD_I32BE_g = FAIL; +hid_t H5T_STD_I32LE_g = FAIL; +hid_t H5T_STD_I64BE_g = FAIL; +hid_t H5T_STD_I64LE_g = FAIL; +hid_t H5T_STD_U8BE_g = FAIL; +hid_t H5T_STD_U8LE_g = FAIL; +hid_t H5T_STD_U16BE_g = FAIL; +hid_t H5T_STD_U16LE_g = FAIL; +hid_t H5T_STD_U32BE_g = FAIL; +hid_t H5T_STD_U32LE_g = FAIL; +hid_t H5T_STD_U64BE_g = FAIL; +hid_t H5T_STD_U64LE_g = FAIL; +hid_t H5T_STD_B8BE_g = FAIL; +hid_t H5T_STD_B8LE_g = FAIL; +hid_t H5T_STD_B16BE_g = FAIL; +hid_t H5T_STD_B16LE_g = FAIL; +hid_t H5T_STD_B32BE_g = FAIL; +hid_t H5T_STD_B32LE_g = FAIL; +hid_t H5T_STD_B64BE_g = FAIL; +hid_t H5T_STD_B64LE_g = FAIL; +hid_t H5T_STD_REF_OBJ_g = FAIL; +hid_t H5T_STD_REF_DSETREG_g = FAIL; + +hid_t H5T_UNIX_D32BE_g = FAIL; +hid_t H5T_UNIX_D32LE_g = FAIL; +hid_t H5T_UNIX_D64BE_g = FAIL; +hid_t H5T_UNIX_D64LE_g = FAIL; + +hid_t H5T_C_S1_g = FAIL; + +hid_t H5T_FORTRAN_S1_g = FAIL; + +hid_t H5T_NATIVE_SCHAR_g = FAIL; +hid_t H5T_NATIVE_UCHAR_g = FAIL; +hid_t H5T_NATIVE_SHORT_g = FAIL; +hid_t H5T_NATIVE_USHORT_g = FAIL; +hid_t H5T_NATIVE_INT_g = FAIL; +hid_t H5T_NATIVE_UINT_g = FAIL; +hid_t H5T_NATIVE_LONG_g = FAIL; +hid_t H5T_NATIVE_ULONG_g = FAIL; +hid_t H5T_NATIVE_LLONG_g = FAIL; +hid_t H5T_NATIVE_ULLONG_g = FAIL; +hid_t H5T_NATIVE_FLOAT_g = FAIL; +hid_t H5T_NATIVE_DOUBLE_g = FAIL; #if H5_SIZEOF_LONG_DOUBLE !=0 -hid_t H5T_NATIVE_LDOUBLE_g = FAIL; +hid_t H5T_NATIVE_LDOUBLE_g = FAIL; #endif -hid_t H5T_NATIVE_B8_g = FAIL; -hid_t H5T_NATIVE_B16_g = FAIL; -hid_t H5T_NATIVE_B32_g = FAIL; -hid_t H5T_NATIVE_B64_g = FAIL; -hid_t H5T_NATIVE_OPAQUE_g = FAIL; -hid_t H5T_NATIVE_HADDR_g = FAIL; -hid_t H5T_NATIVE_HSIZE_g = FAIL; -hid_t H5T_NATIVE_HSSIZE_g = FAIL; -hid_t H5T_NATIVE_HERR_g = FAIL; -hid_t H5T_NATIVE_HBOOL_g = FAIL; - -hid_t H5T_NATIVE_INT8_g = FAIL; -hid_t H5T_NATIVE_UINT8_g = FAIL; -hid_t H5T_NATIVE_INT_LEAST8_g = FAIL; -hid_t H5T_NATIVE_UINT_LEAST8_g = FAIL; -hid_t H5T_NATIVE_INT_FAST8_g = FAIL; -hid_t H5T_NATIVE_UINT_FAST8_g = FAIL; - -hid_t H5T_NATIVE_INT16_g = FAIL; -hid_t H5T_NATIVE_UINT16_g = FAIL; -hid_t H5T_NATIVE_INT_LEAST16_g = FAIL; -hid_t H5T_NATIVE_UINT_LEAST16_g = FAIL; -hid_t H5T_NATIVE_INT_FAST16_g = FAIL; -hid_t H5T_NATIVE_UINT_FAST16_g = FAIL; - -hid_t H5T_NATIVE_INT32_g = FAIL; -hid_t H5T_NATIVE_UINT32_g = FAIL; -hid_t H5T_NATIVE_INT_LEAST32_g = FAIL; -hid_t H5T_NATIVE_UINT_LEAST32_g = FAIL; -hid_t H5T_NATIVE_INT_FAST32_g = FAIL; -hid_t H5T_NATIVE_UINT_FAST32_g = FAIL; - -hid_t H5T_NATIVE_INT64_g = FAIL; -hid_t H5T_NATIVE_UINT64_g = FAIL; -hid_t H5T_NATIVE_INT_LEAST64_g = FAIL; -hid_t H5T_NATIVE_UINT_LEAST64_g = FAIL; -hid_t H5T_NATIVE_INT_FAST64_g = FAIL; -hid_t H5T_NATIVE_UINT_FAST64_g = FAIL; +hid_t H5T_NATIVE_B8_g = FAIL; +hid_t H5T_NATIVE_B16_g = FAIL; +hid_t H5T_NATIVE_B32_g = FAIL; +hid_t H5T_NATIVE_B64_g = FAIL; +hid_t H5T_NATIVE_OPAQUE_g = FAIL; +hid_t H5T_NATIVE_HADDR_g = FAIL; +hid_t H5T_NATIVE_HSIZE_g = FAIL; +hid_t H5T_NATIVE_HSSIZE_g = FAIL; +hid_t H5T_NATIVE_HERR_g = FAIL; +hid_t H5T_NATIVE_HBOOL_g = FAIL; + +hid_t H5T_NATIVE_INT8_g = FAIL; +hid_t H5T_NATIVE_UINT8_g = FAIL; +hid_t H5T_NATIVE_INT_LEAST8_g = FAIL; +hid_t H5T_NATIVE_UINT_LEAST8_g = FAIL; +hid_t H5T_NATIVE_INT_FAST8_g = FAIL; +hid_t H5T_NATIVE_UINT_FAST8_g = FAIL; + +hid_t H5T_NATIVE_INT16_g = FAIL; +hid_t H5T_NATIVE_UINT16_g = FAIL; +hid_t H5T_NATIVE_INT_LEAST16_g = FAIL; +hid_t H5T_NATIVE_UINT_LEAST16_g = FAIL; +hid_t H5T_NATIVE_INT_FAST16_g = FAIL; +hid_t H5T_NATIVE_UINT_FAST16_g = FAIL; + +hid_t H5T_NATIVE_INT32_g = FAIL; +hid_t H5T_NATIVE_UINT32_g = FAIL; +hid_t H5T_NATIVE_INT_LEAST32_g = FAIL; +hid_t H5T_NATIVE_UINT_LEAST32_g = FAIL; +hid_t H5T_NATIVE_INT_FAST32_g = FAIL; +hid_t H5T_NATIVE_UINT_FAST32_g = FAIL; + +hid_t H5T_NATIVE_INT64_g = FAIL; +hid_t H5T_NATIVE_UINT64_g = FAIL; +hid_t H5T_NATIVE_INT_LEAST64_g = FAIL; +hid_t H5T_NATIVE_UINT_LEAST64_g = FAIL; +hid_t H5T_NATIVE_INT_FAST64_g = FAIL; +hid_t H5T_NATIVE_UINT_FAST64_g = FAIL; /* * Alignment constraints for native types. These are initialized at run time @@ -412,45 +425,45 @@ hid_t H5T_NATIVE_UINT_FAST64_g = FAIL; * datatype or C structures, which are different from the alignments for memory * address below this group of variables. */ -size_t H5T_NATIVE_SCHAR_COMP_ALIGN_g = 0; -size_t H5T_NATIVE_UCHAR_COMP_ALIGN_g = 0; -size_t H5T_NATIVE_SHORT_COMP_ALIGN_g = 0; -size_t H5T_NATIVE_USHORT_COMP_ALIGN_g = 0; -size_t H5T_NATIVE_INT_COMP_ALIGN_g = 0; -size_t H5T_NATIVE_UINT_COMP_ALIGN_g = 0; -size_t H5T_NATIVE_LONG_COMP_ALIGN_g = 0; -size_t H5T_NATIVE_ULONG_COMP_ALIGN_g = 0; -size_t H5T_NATIVE_LLONG_COMP_ALIGN_g = 0; -size_t H5T_NATIVE_ULLONG_COMP_ALIGN_g = 0; -size_t H5T_NATIVE_FLOAT_COMP_ALIGN_g = 0; -size_t H5T_NATIVE_DOUBLE_COMP_ALIGN_g = 0; +size_t H5T_NATIVE_SCHAR_COMP_ALIGN_g = 0; +size_t H5T_NATIVE_UCHAR_COMP_ALIGN_g = 0; +size_t H5T_NATIVE_SHORT_COMP_ALIGN_g = 0; +size_t H5T_NATIVE_USHORT_COMP_ALIGN_g = 0; +size_t H5T_NATIVE_INT_COMP_ALIGN_g = 0; +size_t H5T_NATIVE_UINT_COMP_ALIGN_g = 0; +size_t H5T_NATIVE_LONG_COMP_ALIGN_g = 0; +size_t H5T_NATIVE_ULONG_COMP_ALIGN_g = 0; +size_t H5T_NATIVE_LLONG_COMP_ALIGN_g = 0; +size_t H5T_NATIVE_ULLONG_COMP_ALIGN_g = 0; +size_t H5T_NATIVE_FLOAT_COMP_ALIGN_g = 0; +size_t H5T_NATIVE_DOUBLE_COMP_ALIGN_g = 0; #if H5_SIZEOF_LONG_DOUBLE !=0 -size_t H5T_NATIVE_LDOUBLE_COMP_ALIGN_g = 0; +size_t H5T_NATIVE_LDOUBLE_COMP_ALIGN_g = 0; #endif -size_t H5T_POINTER_COMP_ALIGN_g = 0; -size_t H5T_HVL_COMP_ALIGN_g = 0; -size_t H5T_HOBJREF_COMP_ALIGN_g = 0; -size_t H5T_HDSETREGREF_COMP_ALIGN_g = 0; +size_t H5T_POINTER_COMP_ALIGN_g = 0; +size_t H5T_HVL_COMP_ALIGN_g = 0; +size_t H5T_HOBJREF_COMP_ALIGN_g = 0; +size_t H5T_HDSETREGREF_COMP_ALIGN_g = 0; /* * Alignment constraints for native types. These are initialized at run time * in H5Tinit.c */ -size_t H5T_NATIVE_SCHAR_ALIGN_g = 0; -size_t H5T_NATIVE_UCHAR_ALIGN_g = 0; -size_t H5T_NATIVE_SHORT_ALIGN_g = 0; -size_t H5T_NATIVE_USHORT_ALIGN_g = 0; -size_t H5T_NATIVE_INT_ALIGN_g = 0; -size_t H5T_NATIVE_UINT_ALIGN_g = 0; -size_t H5T_NATIVE_LONG_ALIGN_g = 0; -size_t H5T_NATIVE_ULONG_ALIGN_g = 0; -size_t H5T_NATIVE_LLONG_ALIGN_g = 0; -size_t H5T_NATIVE_ULLONG_ALIGN_g = 0; -size_t H5T_NATIVE_FLOAT_ALIGN_g = 0; -size_t H5T_NATIVE_DOUBLE_ALIGN_g = 0; +size_t H5T_NATIVE_SCHAR_ALIGN_g = 0; +size_t H5T_NATIVE_UCHAR_ALIGN_g = 0; +size_t H5T_NATIVE_SHORT_ALIGN_g = 0; +size_t H5T_NATIVE_USHORT_ALIGN_g = 0; +size_t H5T_NATIVE_INT_ALIGN_g = 0; +size_t H5T_NATIVE_UINT_ALIGN_g = 0; +size_t H5T_NATIVE_LONG_ALIGN_g = 0; +size_t H5T_NATIVE_ULONG_ALIGN_g = 0; +size_t H5T_NATIVE_LLONG_ALIGN_g = 0; +size_t H5T_NATIVE_ULLONG_ALIGN_g = 0; +size_t H5T_NATIVE_FLOAT_ALIGN_g = 0; +size_t H5T_NATIVE_DOUBLE_ALIGN_g = 0; #if H5_SIZEOF_LONG_DOUBLE !=0 -size_t H5T_NATIVE_LDOUBLE_ALIGN_g = 0; +size_t H5T_NATIVE_LDOUBLE_ALIGN_g = 0; #endif /* @@ -458,40 +471,40 @@ size_t H5T_NATIVE_LDOUBLE_ALIGN_g = 0; * H5Tinit.c if the types are provided by the system. Otherwise we set their * values to 0 here (no alignment calculated). */ -size_t H5T_NATIVE_INT8_ALIGN_g = 0; -size_t H5T_NATIVE_UINT8_ALIGN_g = 0; -size_t H5T_NATIVE_INT_LEAST8_ALIGN_g = 0; -size_t H5T_NATIVE_UINT_LEAST8_ALIGN_g = 0; -size_t H5T_NATIVE_INT_FAST8_ALIGN_g = 0; -size_t H5T_NATIVE_UINT_FAST8_ALIGN_g = 0; - -size_t H5T_NATIVE_INT16_ALIGN_g = 0; -size_t H5T_NATIVE_UINT16_ALIGN_g = 0; -size_t H5T_NATIVE_INT_LEAST16_ALIGN_g = 0; -size_t H5T_NATIVE_UINT_LEAST16_ALIGN_g = 0; -size_t H5T_NATIVE_INT_FAST16_ALIGN_g = 0; -size_t H5T_NATIVE_UINT_FAST16_ALIGN_g = 0; - -size_t H5T_NATIVE_INT32_ALIGN_g = 0; -size_t H5T_NATIVE_UINT32_ALIGN_g = 0; -size_t H5T_NATIVE_INT_LEAST32_ALIGN_g = 0; -size_t H5T_NATIVE_UINT_LEAST32_ALIGN_g = 0; -size_t H5T_NATIVE_INT_FAST32_ALIGN_g = 0; -size_t H5T_NATIVE_UINT_FAST32_ALIGN_g = 0; - -size_t H5T_NATIVE_INT64_ALIGN_g = 0; -size_t H5T_NATIVE_UINT64_ALIGN_g = 0; -size_t H5T_NATIVE_INT_LEAST64_ALIGN_g = 0; -size_t H5T_NATIVE_UINT_LEAST64_ALIGN_g = 0; -size_t H5T_NATIVE_INT_FAST64_ALIGN_g = 0; -size_t H5T_NATIVE_UINT_FAST64_ALIGN_g = 0; +size_t H5T_NATIVE_INT8_ALIGN_g = 0; +size_t H5T_NATIVE_UINT8_ALIGN_g = 0; +size_t H5T_NATIVE_INT_LEAST8_ALIGN_g = 0; +size_t H5T_NATIVE_UINT_LEAST8_ALIGN_g = 0; +size_t H5T_NATIVE_INT_FAST8_ALIGN_g = 0; +size_t H5T_NATIVE_UINT_FAST8_ALIGN_g = 0; + +size_t H5T_NATIVE_INT16_ALIGN_g = 0; +size_t H5T_NATIVE_UINT16_ALIGN_g = 0; +size_t H5T_NATIVE_INT_LEAST16_ALIGN_g = 0; +size_t H5T_NATIVE_UINT_LEAST16_ALIGN_g = 0; +size_t H5T_NATIVE_INT_FAST16_ALIGN_g = 0; +size_t H5T_NATIVE_UINT_FAST16_ALIGN_g = 0; + +size_t H5T_NATIVE_INT32_ALIGN_g = 0; +size_t H5T_NATIVE_UINT32_ALIGN_g = 0; +size_t H5T_NATIVE_INT_LEAST32_ALIGN_g = 0; +size_t H5T_NATIVE_UINT_LEAST32_ALIGN_g = 0; +size_t H5T_NATIVE_INT_FAST32_ALIGN_g = 0; +size_t H5T_NATIVE_UINT_FAST32_ALIGN_g = 0; + +size_t H5T_NATIVE_INT64_ALIGN_g = 0; +size_t H5T_NATIVE_UINT64_ALIGN_g = 0; +size_t H5T_NATIVE_INT_LEAST64_ALIGN_g = 0; +size_t H5T_NATIVE_UINT_LEAST64_ALIGN_g = 0; +size_t H5T_NATIVE_INT_FAST64_ALIGN_g = 0; +size_t H5T_NATIVE_UINT_FAST64_ALIGN_g = 0; /* Useful floating-point values for conversion routines */ /* (+/- Inf for all floating-point types) */ -float H5T_NATIVE_FLOAT_POS_INF_g = 0.0f; -float H5T_NATIVE_FLOAT_NEG_INF_g = 0.0f; -double H5T_NATIVE_DOUBLE_POS_INF_g = (double)0.0f; -double H5T_NATIVE_DOUBLE_NEG_INF_g = (double)0.0f; +float H5T_NATIVE_FLOAT_POS_INF_g = 0.0f; +float H5T_NATIVE_FLOAT_NEG_INF_g = 0.0f; +double H5T_NATIVE_DOUBLE_POS_INF_g = (double)0.0f; +double H5T_NATIVE_DOUBLE_NEG_INF_g = (double)0.0f; /* Declare the free list for H5T_t's and H5T_shared_t's */ H5FL_DEFINE(H5T_t); @@ -507,12 +520,12 @@ H5FL_DEFINE(H5T_shared_t); * which is used as the key by which the `entries' array is sorted. */ static struct { - int npaths; /*number of paths defined */ - size_t apaths; /*number of paths allocated */ - H5T_path_t **path; /*sorted array of path pointers */ - int nsoft; /*number of soft conversions defined */ - size_t asoft; /*number of soft conversions allocated */ - H5T_soft_t *soft; /*unsorted array of soft conversions */ + int npaths; /*number of paths defined */ + size_t apaths; /*number of paths allocated */ + H5T_path_t **path; /*sorted array of path pointers */ + int nsoft; /*number of soft conversions defined */ + size_t asoft; /*number of soft conversions allocated */ + H5T_soft_t *soft; /*unsorted array of soft conversions */ } H5T_g; /* Declare the free list for H5T_path_t's */ @@ -520,10 +533,10 @@ H5FL_DEFINE_STATIC(H5T_path_t); /* Datatype ID class */ static const H5I_class_t H5I_DATATYPE_CLS[1] = {{ - H5I_DATATYPE, /* ID class value */ - 0, /* Class flags */ - 8, /* # of reserved IDs for class */ - (H5I_free_t)H5T_close /* Callback routine for closing objects of this class */ + H5I_DATATYPE, /* ID class value */ + 0, /* Class flags */ + 8, /* # of reserved IDs for class */ + (H5I_free_t)H5T_close /* Callback routine for closing objects of this class */ }}; /* Flag indicating "top" of interface has been initialized */ @@ -532,14 +545,14 @@ static hbool_t H5T_top_package_initialize_s = FALSE; /*------------------------------------------------------------------------- - * Function: H5T_init + * Function: H5T_init * - * Purpose: Initialize the interface from some other package. + * Purpose: Initialize the interface from some other package. * - * Return: Success: non-negative - * Failure: negative + * Return: Success: non-negative + * Failure: negative * - * Programmer: Robb Matzke + * Programmer: Robb Matzke * Wednesday, December 16, 1998 * *------------------------------------------------------------------------- @@ -558,15 +571,15 @@ done: /*------------------------------------------------------------------------- - * Function: H5T__init_inf + * Function: H5T__init_inf * - * Purpose: Initialize the +/- Infinity floating-poing values for type + * Purpose: Initialize the +/- Infinity floating-poing values for type * conversion. * - * Return: Success: non-negative - * Failure: negative + * Return: Success: non-negative + * Failure: negative * - * Programmer: Quincey Koziol + * Programmer: Quincey Koziol * Saturday, November 22, 2003 * *------------------------------------------------------------------------- @@ -574,12 +587,12 @@ done: static herr_t H5T__init_inf(void) { - H5T_t *dst_p; /* Datatype type operate on */ - H5T_atomic_t *dst; /* Datatype's atomic info */ - uint8_t *d; /* Pointer to value to set */ - size_t half_size; /* Half the type size */ - size_t u; /* Local index value */ - herr_t ret_value = SUCCEED; /* Return value */ + H5T_t *dst_p; /* Datatype type operate on */ + H5T_atomic_t *dst; /* Datatype's atomic info */ + uint8_t *d; /* Pointer to value to set */ + size_t half_size; /* Half the type size */ + size_t u; /* Local index value */ + herr_t ret_value = SUCCEED; /* Return value */ FUNC_ENTER_STATIC @@ -707,26 +720,26 @@ H5T__init_package(void) H5T_t *std_u32be=NULL; /* Datatype structure for unsigned 32-bit big-endian integer */ H5T_t *std_u64le=NULL; /* Datatype structure for unsigned 64-bit little-endian integer */ H5T_t *std_u64be=NULL; /* Datatype structure for unsigned 64-bit big-endian integer */ - H5T_t *dt = NULL; - H5T_t *fixedpt=NULL; /* Datatype structure for native int */ - H5T_t *floatpt=NULL; /* Datatype structure for native float */ - H5T_t *string=NULL; /* Datatype structure for C string */ - H5T_t *bitfield=NULL; /* Datatype structure for bitfield */ - H5T_t *compound=NULL; /* Datatype structure for compound objects */ - H5T_t *enum_type=NULL; /* Datatype structure for enum objects */ - H5T_t *vlen=NULL; /* Datatype structure for vlen objects */ - H5T_t *array=NULL; /* Datatype structure for array objects */ - H5T_t *objref=NULL; /* Datatype structure for object reference objects */ + H5T_t *dt = NULL; + H5T_t *fixedpt=NULL; /* Datatype structure for native int */ + H5T_t *floatpt=NULL; /* Datatype structure for native float */ + H5T_t *string=NULL; /* Datatype structure for C string */ + H5T_t *bitfield=NULL; /* Datatype structure for bitfield */ + H5T_t *compound=NULL; /* Datatype structure for compound objects */ + H5T_t *enum_type=NULL; /* Datatype structure for enum objects */ + H5T_t *vlen=NULL; /* Datatype structure for vlen objects */ + H5T_t *array=NULL; /* Datatype structure for array objects */ + H5T_t *objref=NULL; /* Datatype structure for object reference objects */ hsize_t dim[1]={1}; /* Dimension info for array datatype */ - herr_t status; + herr_t status; unsigned copied_dtype=1; /* Flag to indicate whether datatype was copied or allocated (for error cleanup) */ - herr_t ret_value = SUCCEED; /* Return value */ + herr_t ret_value = SUCCEED; /* Return value */ FUNC_ENTER_NOAPI_NOINIT /* Initialize the atom group for the file IDs */ if(H5I_register_type(H5I_DATATYPE_CLS) < 0) - HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "unable to initialize interface") + HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "unable to initialize interface") /* Make certain there aren't too many classes of datatypes defined */ /* Only 16 (numbered 0-15) are supported in the current file format */ @@ -737,7 +750,7 @@ H5T__init_package(void) * the library configuration by H5detect. */ if(H5T__init_native() < 0) - HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "unable to initialize interface") + HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "unable to initialize interface") /* Get the atomic datatype structures needed by the initialization code below */ if(NULL == (native_schar = (H5T_t *)H5I_object(H5T_NATIVE_SCHAR_g))) @@ -896,29 +909,29 @@ H5T__init_package(void) */ /* little-endian (order is irrelevant) 8-bit bitfield */ - H5T_INIT_TYPE(BITFIELD, H5T_STD_B8LE_g, COPY, std_u8le, NOSET, -) + H5T_INIT_TYPE(BITFIELDLE, H5T_STD_B8LE_g, COPY, std_u8le, NOSET, -) bitfield=dt; /* Keep type for later */ /* big-endian (order is irrelevant) 8-bit bitfield */ - H5T_INIT_TYPE(BITFIELD, H5T_STD_B8BE_g, COPY, std_u8be, NOSET, -) + H5T_INIT_TYPE(BITFIELDBE, H5T_STD_B8BE_g, COPY, std_u8be, NOSET, -) /* Little-endian 16-bit bitfield */ - H5T_INIT_TYPE(BITFIELD, H5T_STD_B16LE_g, COPY, std_u16le, NOSET, -) + H5T_INIT_TYPE(BITFIELDLE, H5T_STD_B16LE_g, COPY, std_u16le, NOSET, -) /* Big-endian 16-bit bitfield */ - H5T_INIT_TYPE(BITFIELD, H5T_STD_B16BE_g, COPY, std_u16be, NOSET, -) + H5T_INIT_TYPE(BITFIELDBE, H5T_STD_B16BE_g, COPY, std_u16be, NOSET, -) /* Little-endian 32-bit bitfield */ - H5T_INIT_TYPE(BITFIELD, H5T_STD_B32LE_g, COPY, std_u32le, NOSET, -) + H5T_INIT_TYPE(BITFIELDLE, H5T_STD_B32LE_g, COPY, std_u32le, NOSET, -) /* Big-endian 32-bit bitfield */ - H5T_INIT_TYPE(BITFIELD, H5T_STD_B32BE_g, COPY, std_u32be, NOSET, -) + H5T_INIT_TYPE(BITFIELDBE, H5T_STD_B32BE_g, COPY, std_u32be, NOSET, -) /* Little-endian 64-bit bitfield */ - H5T_INIT_TYPE(BITFIELD, H5T_STD_B64LE_g, COPY, std_u64le, NOSET, -) + H5T_INIT_TYPE(BITFIELDLE, H5T_STD_B64LE_g, COPY, std_u64le, NOSET, -) /* Big-endian 64-bit bitfield */ - H5T_INIT_TYPE(BITFIELD, H5T_STD_B64BE_g, COPY, std_u64be, NOSET, -) + H5T_INIT_TYPE(BITFIELDBE, H5T_STD_B64BE_g, COPY, std_u64be, NOSET, -) /*------------------------------------------------------------ * The Unix architecture for dates and times. @@ -982,13 +995,13 @@ H5T__init_package(void) fixedpt = native_int; floatpt = native_float; if (NULL == (compound = H5T__create(H5T_COMPOUND, (size_t)1))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a datatype") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a datatype") if (NULL == (enum_type = H5T__create(H5T_ENUM, (size_t)1))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a datatype") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a datatype") if (NULL == (vlen = H5T__vlen_create(native_int))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a datatype") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a datatype") if (NULL == (array = H5T__array_create(native_int, 1, dim))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a datatype") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a datatype") status = 0; status |= H5T_register(H5T_PERS_SOFT, "i_i", fixedpt, fixedpt, H5T__conv_i_i, H5AC_noio_dxpl_id, FALSE); @@ -1247,7 +1260,7 @@ H5T__init_package(void) status |= H5T__init_inf(); if(status < 0) - HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "unable to register conversion function(s)") + HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "unable to register conversion function(s)") /* Register datatype creation property class properties here. See similar * code in H5D__init_package(), etc. for example. @@ -1295,15 +1308,15 @@ done: /*------------------------------------------------------------------------- - * Function: H5T__unlock_cb + * Function: H5T__unlock_cb * - * Purpose: Clear the immutable flag for a datatype. This function is - * called when the library is closing in order to unlock all - * registered datatypes and thus make them free-able. + * Purpose: Clear the immutable flag for a datatype. This function is + * called when the library is closing in order to unlock all + * registered datatypes and thus make them free-able. * - * Return: Non-negative on success/Negative on failure + * Return: Non-negative on success/Negative on failure * - * Programmer: Robb Matzke + * Programmer: Robb Matzke * Monday, April 27, 1998 * *------------------------------------------------------------------------- @@ -1311,16 +1324,15 @@ done: static int H5T__unlock_cb(void *_dt, hid_t H5_ATTR_UNUSED id, void *_udata) { - H5T_t *dt = (H5T_t *)_dt; - int *n = (int *)_udata; + H5T_t *dt = (H5T_t *)_dt; + int *n = (int *)_udata; FUNC_ENTER_STATIC_NOERR HDassert(dt && dt->shared); if(H5T_STATE_IMMUTABLE==dt->shared->state) { - dt->shared->state = H5T_STATE_RDONLY; - + dt->shared->state = H5T_STATE_RDONLY; (*n)++; } /* end if */ @@ -1329,15 +1341,15 @@ H5T__unlock_cb(void *_dt, hid_t H5_ATTR_UNUSED id, void *_udata) /*------------------------------------------------------------------------- - * Function: H5T_top_term_package + * Function: H5T_top_term_package * - * Purpose: Close the "top" of the interface, releasing IDs, etc. + * Purpose: Close the "top" of the interface, releasing IDs, etc. * - * Return: Success: Positive if any action might have caused a - * change in some other interface; zero otherwise. - * Failure: Negative + * Return: Success: Positive if any action might have caused a + * change in some other interface; zero otherwise. + * Failure: Negative * - * Programmer: Quincey Koziol + * Programmer: Quincey Koziol * Thursday, September 10, 2015 * *------------------------------------------------------------------------- @@ -1345,13 +1357,13 @@ H5T__unlock_cb(void *_dt, hid_t H5_ATTR_UNUSED id, void *_udata) int H5T_top_term_package(void) { - int n = 0; + int n = 0; FUNC_ENTER_NOAPI_NOINIT_NOERR if(H5T_top_package_initialize_s) { - /* Unregister all conversion functions */ - if(H5T_g.path) { + /* Unregister all conversion functions */ + if(H5T_g.path) { int i, nprint = 0; for(i = 0; i < H5T_g.npaths; i++) { @@ -1367,9 +1379,9 @@ H5T_top_term_package(void) #ifdef H5T_DEBUG if (H5DEBUG(T)) { fprintf(H5DEBUG(T), "H5T: conversion function " - "0x%08lx failed to free private data for " - "%s (ignored)\n", - (unsigned long)(path->func), path->name); + "0x%08lx failed to free private data for " + "%s (ignored)\n", + (unsigned long)(path->func), path->name); } /* end if */ #endif H5E_clear_stack(NULL); /*ignore the error*/ @@ -1395,118 +1407,118 @@ H5T_top_term_package(void) n++; } /* end if */ - /* Unlock all datatypes, then free them */ - /* note that we are ignoring the return value from H5I_iterate() */ + /* Unlock all datatypes, then free them */ + /* note that we are ignoring the return value from H5I_iterate() */ /* Also note that we are incrementing 'n' in the callback */ - H5I_iterate(H5I_DATATYPE, H5T__unlock_cb, &n, FALSE); + H5I_iterate(H5I_DATATYPE, H5T__unlock_cb, &n, FALSE); /* Release all datatype IDs */ - if(H5I_nmembers(H5I_DATATYPE) > 0) { - (void)H5I_clear_type(H5I_DATATYPE, FALSE, FALSE); + if(H5I_nmembers(H5I_DATATYPE) > 0) { + (void)H5I_clear_type(H5I_DATATYPE, FALSE, FALSE); n++; /*H5I*/ - } /* end if */ + } /* end if */ /* Reset all the datatype IDs */ if(H5T_IEEE_F32BE_g > 0) { - H5T_IEEE_F32BE_g = FAIL; - H5T_IEEE_F32LE_g = FAIL; - H5T_IEEE_F64BE_g = FAIL; - H5T_IEEE_F64LE_g = FAIL; - - H5T_STD_I8BE_g = FAIL; - H5T_STD_I8LE_g = FAIL; - H5T_STD_I16BE_g = FAIL; - H5T_STD_I16LE_g = FAIL; - H5T_STD_I32BE_g = FAIL; - H5T_STD_I32LE_g = FAIL; - H5T_STD_I64BE_g = FAIL; - H5T_STD_I64LE_g = FAIL; - H5T_STD_U8BE_g = FAIL; - H5T_STD_U8LE_g = FAIL; - H5T_STD_U16BE_g = FAIL; - H5T_STD_U16LE_g = FAIL; - H5T_STD_U32BE_g = FAIL; - H5T_STD_U32LE_g = FAIL; - H5T_STD_U64BE_g = FAIL; - H5T_STD_U64LE_g = FAIL; - H5T_STD_B8BE_g = FAIL; - H5T_STD_B8LE_g = FAIL; - H5T_STD_B16BE_g = FAIL; - H5T_STD_B16LE_g = FAIL; - H5T_STD_B32BE_g = FAIL; - H5T_STD_B32LE_g = FAIL; - H5T_STD_B64BE_g = FAIL; - H5T_STD_B64LE_g = FAIL; - H5T_STD_REF_OBJ_g = FAIL; - H5T_STD_REF_DSETREG_g = FAIL; - - H5T_UNIX_D32BE_g = FAIL; - H5T_UNIX_D32LE_g = FAIL; - H5T_UNIX_D64BE_g = FAIL; - H5T_UNIX_D64LE_g = FAIL; - - H5T_C_S1_g = FAIL; - - H5T_FORTRAN_S1_g = FAIL; - - H5T_NATIVE_SCHAR_g = FAIL; - H5T_NATIVE_UCHAR_g = FAIL; - H5T_NATIVE_SHORT_g = FAIL; - H5T_NATIVE_USHORT_g = FAIL; - H5T_NATIVE_INT_g = FAIL; - H5T_NATIVE_UINT_g = FAIL; - H5T_NATIVE_LONG_g = FAIL; - H5T_NATIVE_ULONG_g = FAIL; - H5T_NATIVE_LLONG_g = FAIL; - H5T_NATIVE_ULLONG_g = FAIL; - H5T_NATIVE_FLOAT_g = FAIL; - H5T_NATIVE_DOUBLE_g = FAIL; + H5T_IEEE_F32BE_g = FAIL; + H5T_IEEE_F32LE_g = FAIL; + H5T_IEEE_F64BE_g = FAIL; + H5T_IEEE_F64LE_g = FAIL; + + H5T_STD_I8BE_g = FAIL; + H5T_STD_I8LE_g = FAIL; + H5T_STD_I16BE_g = FAIL; + H5T_STD_I16LE_g = FAIL; + H5T_STD_I32BE_g = FAIL; + H5T_STD_I32LE_g = FAIL; + H5T_STD_I64BE_g = FAIL; + H5T_STD_I64LE_g = FAIL; + H5T_STD_U8BE_g = FAIL; + H5T_STD_U8LE_g = FAIL; + H5T_STD_U16BE_g = FAIL; + H5T_STD_U16LE_g = FAIL; + H5T_STD_U32BE_g = FAIL; + H5T_STD_U32LE_g = FAIL; + H5T_STD_U64BE_g = FAIL; + H5T_STD_U64LE_g = FAIL; + H5T_STD_B8BE_g = FAIL; + H5T_STD_B8LE_g = FAIL; + H5T_STD_B16BE_g = FAIL; + H5T_STD_B16LE_g = FAIL; + H5T_STD_B32BE_g = FAIL; + H5T_STD_B32LE_g = FAIL; + H5T_STD_B64BE_g = FAIL; + H5T_STD_B64LE_g = FAIL; + H5T_STD_REF_OBJ_g = FAIL; + H5T_STD_REF_DSETREG_g = FAIL; + + H5T_UNIX_D32BE_g = FAIL; + H5T_UNIX_D32LE_g = FAIL; + H5T_UNIX_D64BE_g = FAIL; + H5T_UNIX_D64LE_g = FAIL; + + H5T_C_S1_g = FAIL; + + H5T_FORTRAN_S1_g = FAIL; + + H5T_NATIVE_SCHAR_g = FAIL; + H5T_NATIVE_UCHAR_g = FAIL; + H5T_NATIVE_SHORT_g = FAIL; + H5T_NATIVE_USHORT_g = FAIL; + H5T_NATIVE_INT_g = FAIL; + H5T_NATIVE_UINT_g = FAIL; + H5T_NATIVE_LONG_g = FAIL; + H5T_NATIVE_ULONG_g = FAIL; + H5T_NATIVE_LLONG_g = FAIL; + H5T_NATIVE_ULLONG_g = FAIL; + H5T_NATIVE_FLOAT_g = FAIL; + H5T_NATIVE_DOUBLE_g = FAIL; #if H5_SIZEOF_LONG_DOUBLE !=0 - H5T_NATIVE_LDOUBLE_g = FAIL; + H5T_NATIVE_LDOUBLE_g = FAIL; #endif - H5T_NATIVE_B8_g = FAIL; - H5T_NATIVE_B16_g = FAIL; - H5T_NATIVE_B32_g = FAIL; - H5T_NATIVE_B64_g = FAIL; - H5T_NATIVE_OPAQUE_g = FAIL; - H5T_NATIVE_HADDR_g = FAIL; - H5T_NATIVE_HSIZE_g = FAIL; - H5T_NATIVE_HSSIZE_g = FAIL; - H5T_NATIVE_HERR_g = FAIL; - H5T_NATIVE_HBOOL_g = FAIL; - - H5T_NATIVE_INT8_g = FAIL; - H5T_NATIVE_UINT8_g = FAIL; - H5T_NATIVE_INT_LEAST8_g = FAIL; - H5T_NATIVE_UINT_LEAST8_g = FAIL; - H5T_NATIVE_INT_FAST8_g = FAIL; - H5T_NATIVE_UINT_FAST8_g = FAIL; - - H5T_NATIVE_INT16_g = FAIL; - H5T_NATIVE_UINT16_g = FAIL; - H5T_NATIVE_INT_LEAST16_g = FAIL; - H5T_NATIVE_UINT_LEAST16_g = FAIL; - H5T_NATIVE_INT_FAST16_g = FAIL; - H5T_NATIVE_UINT_FAST16_g = FAIL; - - H5T_NATIVE_INT32_g = FAIL; - H5T_NATIVE_UINT32_g = FAIL; - H5T_NATIVE_INT_LEAST32_g = FAIL; - H5T_NATIVE_UINT_LEAST32_g = FAIL; - H5T_NATIVE_INT_FAST32_g = FAIL; - H5T_NATIVE_UINT_FAST32_g = FAIL; - - H5T_NATIVE_INT64_g = FAIL; - H5T_NATIVE_UINT64_g = FAIL; - H5T_NATIVE_INT_LEAST64_g = FAIL; - H5T_NATIVE_UINT_LEAST64_g = FAIL; - H5T_NATIVE_INT_FAST64_g = FAIL; - H5T_NATIVE_UINT_FAST64_g = FAIL; + H5T_NATIVE_B8_g = FAIL; + H5T_NATIVE_B16_g = FAIL; + H5T_NATIVE_B32_g = FAIL; + H5T_NATIVE_B64_g = FAIL; + H5T_NATIVE_OPAQUE_g = FAIL; + H5T_NATIVE_HADDR_g = FAIL; + H5T_NATIVE_HSIZE_g = FAIL; + H5T_NATIVE_HSSIZE_g = FAIL; + H5T_NATIVE_HERR_g = FAIL; + H5T_NATIVE_HBOOL_g = FAIL; + + H5T_NATIVE_INT8_g = FAIL; + H5T_NATIVE_UINT8_g = FAIL; + H5T_NATIVE_INT_LEAST8_g = FAIL; + H5T_NATIVE_UINT_LEAST8_g = FAIL; + H5T_NATIVE_INT_FAST8_g = FAIL; + H5T_NATIVE_UINT_FAST8_g = FAIL; + + H5T_NATIVE_INT16_g = FAIL; + H5T_NATIVE_UINT16_g = FAIL; + H5T_NATIVE_INT_LEAST16_g = FAIL; + H5T_NATIVE_UINT_LEAST16_g = FAIL; + H5T_NATIVE_INT_FAST16_g = FAIL; + H5T_NATIVE_UINT_FAST16_g = FAIL; + + H5T_NATIVE_INT32_g = FAIL; + H5T_NATIVE_UINT32_g = FAIL; + H5T_NATIVE_INT_LEAST32_g = FAIL; + H5T_NATIVE_UINT_LEAST32_g = FAIL; + H5T_NATIVE_INT_FAST32_g = FAIL; + H5T_NATIVE_UINT_FAST32_g = FAIL; + + H5T_NATIVE_INT64_g = FAIL; + H5T_NATIVE_UINT64_g = FAIL; + H5T_NATIVE_INT_LEAST64_g = FAIL; + H5T_NATIVE_UINT_LEAST64_g = FAIL; + H5T_NATIVE_INT_FAST64_g = FAIL; + H5T_NATIVE_UINT_FAST64_g = FAIL; n++; } /* end if */ - /* Mark "top" of interface as closed */ + /* Mark "top" of interface as closed */ if(0 == n) H5T_top_package_initialize_s = FALSE; } /* end if */ @@ -1516,19 +1528,19 @@ H5T_top_term_package(void) /*------------------------------------------------------------------------- - * Function: H5T_term_package + * Function: H5T_term_package * - * Purpose: Close this interface. + * Purpose: Close this interface. * - * Note: Finishes shutting down the interface, after - * H5T_top_term_package() is called + * Note: Finishes shutting down the interface, after + * H5T_top_term_package() is called * - * Return: Success: Positive if any action might have caused a - * change in some other interface; zero - * otherwise. - * Failure: Negative + * Return: Success: Positive if any action might have caused a + * change in some other interface; zero + * otherwise. + * Failure: Negative * - * Programmer: Robb Matzke + * Programmer: Robb Matzke * Friday, November 20, 1998 * *------------------------------------------------------------------------- @@ -1536,7 +1548,7 @@ H5T_top_term_package(void) int H5T_term_package(void) { - int n = 0; + int n = 0; FUNC_ENTER_NOAPI_NOINIT_NOERR @@ -1546,9 +1558,9 @@ H5T_term_package(void) HDassert(FALSE == H5T_top_package_initialize_s); /* Destroy the datatype object id group */ - n += (H5I_dec_type_ref(H5I_DATATYPE) > 0); + n += (H5I_dec_type_ref(H5I_DATATYPE) > 0); - /* Mark interface as closed */ + /* Mark interface as closed */ if(0 == n) H5_PKG_INIT_VAR = FALSE; } /* end if */ @@ -1558,47 +1570,44 @@ H5T_term_package(void) /*------------------------------------------------------------------------- - * Function: H5Tcreate + * Function: H5Tcreate * - * Purpose: Create a new type and initialize it to reasonable values. - * The type is a member of type class TYPE and is SIZE bytes. + * Purpose: Create a new type and initialize it to reasonable values. + * The type is a member of type class TYPE and is SIZE bytes. * - * Return: Success: A new type identifier. + * Return: Success: A new type identifier. * - * Failure: Negative + * Failure: Negative * * Errors: - * ARGS BADVALUE Invalid size. - * DATATYPE CANTINIT Can't create type. - * DATATYPE CANTREGISTER Can't register datatype atom. - * - * Programmer: Robb Matzke - * Friday, December 5, 1997 - * - * Modifications: + * ARGS BADVALUE Invalid size. + * DATATYPE CANTINIT Can't create type. + * DATATYPE CANTREGISTER Can't register datatype atom. * + * Programmer: Robb Matzke + * Friday, December 5, 1997 *------------------------------------------------------------------------- */ hid_t H5Tcreate(H5T_class_t type, size_t size) { - H5T_t *dt = NULL; /* New datatype constructed */ - hid_t ret_value; /* Return value */ + H5T_t *dt = NULL; /* New datatype constructed */ + hid_t ret_value; /* Return value */ FUNC_ENTER_API(FAIL) H5TRACE2("i", "Ttz", type, size); /* check args. We support string (fixed-size or variable-length) now. */ if(size <= 0 && size != H5T_VARIABLE) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "size must be positive") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "size must be positive") /* create the type */ if(NULL == (dt = H5T__create(type, size))) - HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "unable to create type") + HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "unable to create type") /* Get an ID for the datatype */ if((ret_value = H5I_register(H5I_DATATYPE, dt, TRUE)) < 0) - HGOTO_ERROR(H5E_DATATYPE, H5E_CANTREGISTER, FAIL, "unable to register datatype ID") + HGOTO_ERROR(H5E_DATATYPE, H5E_CANTREGISTER, FAIL, "unable to register datatype ID") done: FUNC_LEAVE_API(ret_value) @@ -1606,35 +1615,35 @@ done: /*------------------------------------------------------------------------- - * Function: H5Tcopy + * Function: H5Tcopy * - * Purpose: Copies a datatype. The resulting datatype is not locked. - * The datatype should be closed when no longer needed by - * calling H5Tclose(). + * Purpose: Copies a datatype. The resulting datatype is not locked. + * The datatype should be closed when no longer needed by + * calling H5Tclose(). * - * Return: Success: The ID of a new datatype. + * Return: Success: The ID of a new datatype. * - * Failure: Negative + * Failure: Negative * - * Programmer: Robb Matzke - * Tuesday, December 9, 1997 + * Programmer: Robb Matzke + * Tuesday, December 9, 1997 * * Modifications: * - * Robb Matzke, 4 Jun 1998 - * The returned type is always transient and unlocked. If the TYPE_ID - * argument is a dataset instead of a datatype then this function - * returns a transient, modifiable datatype which is a copy of the - * dataset's datatype. + * Robb Matzke, 4 Jun 1998 + * The returned type is always transient and unlocked. If the TYPE_ID + * argument is a dataset instead of a datatype then this function + * returns a transient, modifiable datatype which is a copy of the + * dataset's datatype. * *------------------------------------------------------------------------- */ hid_t H5Tcopy(hid_t type_id) { - H5T_t *dt; /* Pointer to the datatype to copy */ - H5T_t *new_dt = NULL; - hid_t ret_value; /* Return value */ + H5T_t *dt; /* Pointer to the datatype to copy */ + H5T_t *new_dt = NULL; + hid_t ret_value; /* Return value */ FUNC_ENTER_API(FAIL) H5TRACE1("i", "i", type_id); @@ -1648,7 +1657,7 @@ H5Tcopy(hid_t type_id) case H5I_DATASET: { - H5D_t *dset; /* Dataset for datatype */ + H5D_t *dset; /* Dataset for datatype */ /* The argument is a dataset handle */ if(NULL == (dset = (H5D_t *)H5I_object(type_id))) @@ -1678,11 +1687,11 @@ H5Tcopy(hid_t type_id) /* Copy datatype */ if(NULL == (new_dt = H5T_copy(dt, H5T_COPY_TRANSIENT))) - HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "unable to copy"); + HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "unable to copy"); /* Atomize result */ if((ret_value = H5I_register(H5I_DATATYPE, new_dt, TRUE)) < 0) - HGOTO_ERROR(H5E_DATATYPE, H5E_CANTREGISTER, FAIL, "unable to register datatype atom") + HGOTO_ERROR(H5E_DATATYPE, H5E_CANTREGISTER, FAIL, "unable to register datatype atom") done: if(ret_value < 0) @@ -1694,23 +1703,20 @@ done: /*------------------------------------------------------------------------- - * Function: H5Tclose - * - * Purpose: Frees a datatype and all associated memory. + * Function: H5Tclose * - * Return: Non-negative on success/Negative on failure + * Purpose: Frees a datatype and all associated memory. * - * Programmer: Robb Matzke - * Tuesday, December 9, 1997 - * - * Modifications: + * Return: Non-negative on success/Negative on failure * + * Programmer: Robb Matzke + * Tuesday, December 9, 1997 *------------------------------------------------------------------------- */ herr_t H5Tclose(hid_t type_id) { - H5T_t *dt; /* Pointer to datatype to close */ + H5T_t *dt; /* Pointer to datatype to close */ herr_t ret_value = SUCCEED; /* Return value */ FUNC_ENTER_API(FAIL) @@ -1718,13 +1724,13 @@ H5Tclose(hid_t type_id) /* Check args */ if(NULL == (dt = (H5T_t *)H5I_object_verify(type_id, H5I_DATATYPE))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a datatype") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a datatype") if(H5T_STATE_IMMUTABLE == dt->shared->state) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "immutable datatype") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "immutable datatype") /* When the reference count reaches zero the resources are freed */ if(H5I_dec_app_ref(type_id) < 0) - HGOTO_ERROR(H5E_ATOM, H5E_BADATOM, FAIL, "problem freeing id") + HGOTO_ERROR(H5E_ATOM, H5E_BADATOM, FAIL, "problem freeing id") done: FUNC_LEAVE_API(ret_value) @@ -1732,34 +1738,34 @@ done: /*------------------------------------------------------------------------- - * Function: H5Tequal + * Function: H5Tequal * - * Purpose: Determines if two datatypes are equal. + * Purpose: Determines if two datatypes are equal. * - * Return: Success: TRUE if equal, FALSE if unequal + * Return: Success: TRUE if equal, FALSE if unequal * - * Failure: Negative + * Failure: Negative * - * Programmer: Robb Matzke - * Wednesday, December 10, 1997 + * Programmer: Robb Matzke + * Wednesday, December 10, 1997 * *------------------------------------------------------------------------- */ htri_t H5Tequal(hid_t type1_id, hid_t type2_id) { - const H5T_t *dt1; /* Pointer to first datatype */ - const H5T_t *dt2; /* Pointer to second datatype */ - htri_t ret_value; /* Return value */ + const H5T_t *dt1; /* Pointer to first datatype */ + const H5T_t *dt2; /* Pointer to second datatype */ + htri_t ret_value; /* Return value */ FUNC_ENTER_API(FAIL) H5TRACE2("t", "ii", type1_id, type2_id); /* check args */ if(NULL == (dt1 = (H5T_t *)H5I_object_verify(type1_id, H5I_DATATYPE))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a datatype") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a datatype") if(NULL == (dt2 = (H5T_t *)H5I_object_verify(type2_id, H5I_DATATYPE))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a datatype") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a datatype") ret_value = (0 == H5T_cmp(dt1, dt2, FALSE)) ? TRUE : FALSE; @@ -1769,33 +1775,33 @@ done: /*------------------------------------------------------------------------- - * Function: H5Tlock + * Function: H5Tlock * - * Purpose: Locks a type, making it read only and non-destructable. This - * is normally done by the library for predefined datatypes so - * the application doesn't inadvertently change or delete a - * predefined type. + * Purpose: Locks a type, making it read only and non-destructable. This + * is normally done by the library for predefined datatypes so + * the application doesn't inadvertently change or delete a + * predefined type. * - * Once a datatype is locked it can never be unlocked unless - * the entire library is closed. + * Once a datatype is locked it can never be unlocked unless + * the entire library is closed. * - * Return: Non-negative on success/Negative on failure + * Return: Non-negative on success/Negative on failure * - * Programmer: Robb Matzke - * Friday, January 9, 1998 + * Programmer: Robb Matzke + * Friday, January 9, 1998 * * Modifications: * - * Robb Matzke, 1 Jun 1998 - * It is illegal to lock a named datatype since we must allow named - * types to be closed (to release file resources) but locking a type - * prevents that. + * Robb Matzke, 1 Jun 1998 + * It is illegal to lock a named datatype since we must allow named + * types to be closed (to release file resources) but locking a type + * prevents that. *------------------------------------------------------------------------- */ herr_t H5Tlock(hid_t type_id) { - H5T_t *dt; /* Datatype to operate on */ + H5T_t *dt; /* Datatype to operate on */ herr_t ret_value = SUCCEED; /* Return value */ FUNC_ENTER_API(FAIL) @@ -1803,12 +1809,12 @@ H5Tlock(hid_t type_id) /* Check args */ if(NULL == (dt = (H5T_t *)H5I_object_verify(type_id,H5I_DATATYPE))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a datatype") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a datatype") if(H5T_STATE_NAMED==dt->shared->state || H5T_STATE_OPEN==dt->shared->state) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "unable to lock named datatype") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "unable to lock named datatype") if(H5T_lock(dt, TRUE) < 0) - HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "unable to lock transient datatype") + HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "unable to lock transient datatype") done: FUNC_LEAVE_API(ret_value) @@ -1816,24 +1822,23 @@ done: /*------------------------------------------------------------------------- - * Function: H5Tget_class + * Function: H5Tget_class * - * Purpose: Returns the datatype class identifier for datatype TYPE_ID. + * Purpose: Returns the datatype class identifier for datatype TYPE_ID. * - * Return: Success: One of the non-negative datatype class - * constants. + * Return: Success: One of the non-negative datatype class constants. * - * Failure: H5T_NO_CLASS (Negative) + * Failure: H5T_NO_CLASS (Negative) * - * Programmer: Robb Matzke - * Monday, December 8, 1997 + * Programmer: Robb Matzke + * Monday, December 8, 1997 * *------------------------------------------------------------------------- */ H5T_class_t H5Tget_class(hid_t type_id) { - H5T_t *dt; /* Pointer to datatype */ + H5T_t *dt; /* Pointer to datatype */ H5T_class_t ret_value; /* Return value */ FUNC_ENTER_API(H5T_NO_CLASS) @@ -1841,7 +1846,7 @@ H5Tget_class(hid_t type_id) /* Check args */ if(NULL == (dt = (H5T_t *)H5I_object_verify(type_id, H5I_DATATYPE))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, H5T_NO_CLASS, "not a datatype") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, H5T_NO_CLASS, "not a datatype") /* Set return value */ ret_value = H5T_get_class(dt, FALSE); @@ -1852,17 +1857,16 @@ done: /*------------------------------------------------------------------------- - * Function: H5T_get_class + * Function: H5T_get_class * - * Purpose: Returns the data type class identifier for a datatype ptr. + * Purpose: Returns the data type class identifier for a datatype ptr. * - * Return: Success: One of the non-negative data type class - * constants. + * Return: Success: One of the non-negative data type class constants. * - * Failure: H5T_NO_CLASS (Negative) + * Failure: H5T_NO_CLASS (Negative) * - * Programmer: Robb Matzke - * Monday, December 8, 1997 + * Programmer: Robb Matzke + * Monday, December 8, 1997 * * Modifications: * Broke out from H5Tget_class - QAK - 6/4/99 @@ -1881,7 +1885,8 @@ H5T_get_class(const H5T_t *dt, htri_t internal) /* Externally, a VL string is a string; internally, a VL string is a VL. */ if(internal) { ret_value=dt->shared->type; - } else { + } + else { if(H5T_IS_VL_STRING(dt->shared)) ret_value=H5T_STRING; else @@ -1894,24 +1899,21 @@ done: /*------------------------------------------------------------------------- - * Function: H5Tdetect_class - * - * Purpose: Check whether a datatype contains (or is) a certain type of - * datatype. + * Function: H5Tdetect_class * - * Return: TRUE (1) or FALSE (0) on success/Negative on failure + * Purpose: Check whether a datatype contains (or is) a certain type of + * datatype. * - * Programmer: Quincey Koziol - * Wednesday, November 29, 2000 - * - * Modifications: + * Return: TRUE (1) or FALSE (0) on success/Negative on failure * + * Programmer: Quincey Koziol + * Wednesday, November 29, 2000 *------------------------------------------------------------------------- */ htri_t H5Tdetect_class(hid_t type, H5T_class_t cls) { - H5T_t *dt; /* Datatype to query */ + H5T_t *dt; /* Datatype to query */ htri_t ret_value; /* Return value */ FUNC_ENTER_API(FAIL) @@ -1933,15 +1935,15 @@ done: /*------------------------------------------------------------------------- - * Function: H5T_detect_class + * Function: H5T_detect_class * - * Purpose: Check whether a datatype contains (or is) a certain type of - * datatype. + * Purpose: Check whether a datatype contains (or is) a certain type of + * datatype. * - * Return: TRUE (1) or FALSE (0) on success/Negative on failure + * Return: TRUE (1) or FALSE (0) on success/Negative on failure * - * Programmer: Quincey Koziol - * Wednesday, November 29, 2000 + * Programmer: Quincey Koziol + * Wednesday, November 29, 2000 * * Modifications: * Raymond Lu @@ -1957,7 +1959,7 @@ done: htri_t H5T_detect_class(const H5T_t *dt, H5T_class_t cls, hbool_t from_api) { - unsigned i; + unsigned i; htri_t ret_value = FALSE; /* Return value */ FUNC_ENTER_NOAPI(FAIL) @@ -2018,21 +2020,21 @@ done: /*------------------------------------------------------------------------- - * Function: H5Tis_variable_str + * Function: H5Tis_variable_str * - * Purpose: Check whether a datatype is a variable-length string + * Purpose: Check whether a datatype is a variable-length string * - * Return: TRUE (1) or FALSE (0) on success/Negative on failure + * Return: TRUE (1) or FALSE (0) on success/Negative on failure * - * Programmer: Raymond Lu - * November 4, 2002 + * Programmer: Raymond Lu + * November 4, 2002 * *------------------------------------------------------------------------- */ htri_t H5Tis_variable_str(hid_t dtype_id) { - H5T_t *dt; /* Datatype to query */ + H5T_t *dt; /* Datatype to query */ htri_t ret_value; /* Return value */ FUNC_ENTER_API(FAIL) @@ -2052,14 +2054,14 @@ done: /*------------------------------------------------------------------------- - * Function: H5T_is_variable_str + * Function: H5T_is_variable_str * - * Purpose: Check whether a datatype is a variable-length string + * Purpose: Check whether a datatype is a variable-length string * - * Return: TRUE (1) or FALSE (0) on success/Negative on failure + * Return: TRUE (1) or FALSE (0) on success/Negative on failure * - * Programmer: Quincey Koziol - * October 17, 2007 + * Programmer: Quincey Koziol + * October 17, 2007 * *------------------------------------------------------------------------- */ @@ -2073,33 +2075,33 @@ H5T_is_variable_str(const H5T_t *dt) /*------------------------------------------------------------------------- - * Function: H5Tget_size + * Function: H5Tget_size * - * Purpose: Determines the total size of a datatype in bytes. + * Purpose: Determines the total size of a datatype in bytes. * - * Return: Success: Size of the datatype in bytes. The size of - * datatype is the size of an instance of that - * datatype. + * Return: Success: Size of the datatype in bytes. The size of + * datatype is the size of an instance of that + * datatype. * - * Failure: 0 (valid datatypes are never zero size) + * Failure: 0 (valid datatypes are never zero size) * - * Programmer: Robb Matzke - * Monday, December 8, 1997 + * Programmer: Robb Matzke + * Monday, December 8, 1997 * *------------------------------------------------------------------------- */ size_t H5Tget_size(hid_t type_id) { - H5T_t *dt; /* Datatype to query */ - size_t ret_value; /* Return value */ + H5T_t *dt; /* Datatype to query */ + size_t ret_value; /* Return value */ FUNC_ENTER_API(0) H5TRACE1("z", "i", type_id); /* Check args */ if(NULL == (dt = (H5T_t *)H5I_object_verify(type_id, H5I_DATATYPE))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, 0, "not a datatype") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, 0, "not a datatype") /* size */ ret_value = H5T_GET_SIZE(dt); @@ -2110,33 +2112,33 @@ done: /*------------------------------------------------------------------------- - * Function: H5Tset_size + * Function: H5Tset_size * - * Purpose: Sets the total size in bytes for a datatype (this operation - * is not permitted on reference datatypes). If the size is - * decreased so that the significant bits of the datatype - * extend beyond the edge of the new size, then the `offset' - * property 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. + * Purpose: Sets the total size in bytes for a datatype (this operation + * is not permitted on reference datatypes). If the size is + * decreased so that the significant bits of the datatype + * extend beyond the edge of the new size, then the `offset' + * property 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. * - * Adjusting the size of an H5T_STRING automatically sets the - * precision to 8*size. + * Adjusting the size of an H5T_STRING automatically sets the + * precision to 8*size. * - * All datatypes have a positive size. + * All datatypes have a positive size. * - * Return: Non-negative on success/Negative on failure + * Return: Non-negative on success/Negative on failure * - * Programmer: Robb Matzke - * Wednesday, January 7, 1998 + * Programmer: Robb Matzke + * Wednesday, January 7, 1998 * *------------------------------------------------------------------------- */ herr_t H5Tset_size(hid_t type_id, size_t size) { - H5T_t *dt; /* Datatype to modify */ + H5T_t *dt; /* Datatype to modify */ herr_t ret_value = SUCCEED; /* Return value */ FUNC_ENTER_API(FAIL) @@ -2144,21 +2146,21 @@ H5Tset_size(hid_t type_id, size_t size) /* Check args */ if(NULL == (dt = (H5T_t *)H5I_object_verify(type_id, H5I_DATATYPE))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a datatype") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a datatype") if(H5T_STATE_TRANSIENT!=dt->shared->state) - HGOTO_ERROR(H5E_ARGS, H5E_CANTINIT, FAIL, "datatype is read-only") + HGOTO_ERROR(H5E_ARGS, H5E_CANTINIT, FAIL, "datatype is read-only") if(size <= 0 && size != H5T_VARIABLE) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "size must be positive") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "size must be positive") if(size == H5T_VARIABLE && !H5T_IS_STRING(dt->shared)) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "only strings may be variable length") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "only strings may be variable length") if(H5T_ENUM == dt->shared->type && dt->shared->u.enumer.nmembs > 0) - HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "operation not allowed after members are defined") + HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "operation not allowed after members are defined") if(H5T_REFERENCE == dt->shared->type) - HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "operation not defined for this datatype") + HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "operation not defined for this datatype") /* Modify the datatype */ if(H5T_set_size(dt, size) < 0) - HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "unable to set size for datatype") + HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "unable to set size for datatype") done: FUNC_LEAVE_API(ret_value) @@ -2166,38 +2168,35 @@ done: /*------------------------------------------------------------------------- - * Function: H5Tget_super + * Function: H5Tget_super * - * Purpose: Returns the type from which TYPE is derived. In the case of - * an enumeration type the return value is an integer type. + * Purpose: Returns the type from which TYPE is derived. In the case of + * an enumeration type the return value is an integer type. * - * Return: Success: Type ID for base datatype. + * Return: Success: Type ID for base datatype. * - * Failure: negative + * Failure: negative * - * Programmer: Robb Matzke + * Programmer: Robb Matzke * Wednesday, December 23, 1998 - * - * Modifications: - * *------------------------------------------------------------------------- */ hid_t H5Tget_super(hid_t type) { - H5T_t *dt; /* Datatype to query */ - H5T_t *super = NULL; /* Supertype */ - hid_t ret_value; /* Return value */ + H5T_t *dt; /* Datatype to query */ + H5T_t *super = NULL; /* Supertype */ + hid_t ret_value; /* Return value */ FUNC_ENTER_API(FAIL) H5TRACE1("i", "i", type); if(NULL == (dt = (H5T_t *)H5I_object_verify(type,H5I_DATATYPE))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a datatype") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a datatype") if(NULL == (super = H5T_get_super(dt))) - HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "not a datatype") + HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "not a datatype") if((ret_value = H5I_register(H5I_DATATYPE, super, TRUE)) < 0) - HGOTO_ERROR(H5E_DATATYPE, H5E_CANTREGISTER, FAIL, "unable to register parent datatype") + HGOTO_ERROR(H5E_DATATYPE, H5E_CANTREGISTER, FAIL, "unable to register parent datatype") done: if(ret_value < 0) @@ -2209,36 +2208,33 @@ done: /*------------------------------------------------------------------------- - * Function: H5T_get_super + * Function: H5T_get_super * - * Purpose: Private function for H5Tget_super. Returns the type from - * which TYPE is derived. In the case of an enumeration type - * the return value is an integer type. + * Purpose: Private function for H5Tget_super. Returns the type from + * which TYPE is derived. In the case of an enumeration type + * the return value is an integer type. * - * Return: Success: Data type for base data type. + * Return: Success: Data type for base data type. * - * Failure: NULL + * Failure: NULL * - * Programmer: Raymond Lu + * Programmer: Raymond Lu * October 9, 2002 - * - * Modifications: - * *------------------------------------------------------------------------- */ H5T_t * H5T_get_super(const H5T_t *dt) { - H5T_t *ret_value=NULL; + H5T_t *ret_value=NULL; FUNC_ENTER_NOAPI(NULL) HDassert(dt); if (!dt->shared->parent) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, NULL, "not a derived data type"); + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, NULL, "not a derived data type"); if (NULL==(ret_value=H5T_copy(dt->shared->parent, H5T_COPY_ALL))) - HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, NULL, "unable to copy parent data type"); + HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, NULL, "unable to copy parent data type"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -2246,37 +2242,34 @@ done: /*------------------------------------------------------------------------- - * Function: H5T_register - * - * Purpose: Register a hard or soft conversion function for a data type - * conversion path. The path is specified by the source and - * destination data types SRC_ID and DST_ID (for soft functions - * only the class of these types is important). If FUNC is a - * hard function then it replaces any previous path; if it's a - * soft function then it replaces all existing paths to which it - * applies and is used for any new path to which it applies as - * long as that path doesn't have a hard function. - * - * Return: Non-negative on success/Negative on failure + * Function: H5T_register * - * Programmer: Robb Matzke - * Friday, January 9, 1998 + * Purpose: Register a hard or soft conversion function for a data type + * conversion path. The path is specified by the source and + * destination data types SRC_ID and DST_ID (for soft functions + * only the class of these types is important). If FUNC is a + * hard function then it replaces any previous path; if it's a + * soft function then it replaces all existing paths to which it + * applies and is used for any new path to which it applies as + * long as that path doesn't have a hard function. * - * Modifications: + * Return: Non-negative on success/Negative on failure * + * Programmer: Robb Matzke + * Friday, January 9, 1998 *------------------------------------------------------------------------- */ static herr_t H5T_register(H5T_pers_t pers, const char *name, H5T_t *src, H5T_t *dst, - H5T_conv_t func, hid_t dxpl_id, hbool_t api_call) + H5T_conv_t func, hid_t dxpl_id, hbool_t api_call) { - hid_t tmp_sid=-1, tmp_did=-1;/*temporary data type IDs */ - H5T_path_t *old_path=NULL; /*existing conversion path */ - H5T_path_t *new_path=NULL; /*new conversion path */ - H5T_cdata_t cdata; /*temporary conversion data */ - int nprint=0; /*number of paths shut down */ - int i; /*counter */ - herr_t ret_value=SUCCEED; /*return value */ + hid_t tmp_sid = -1, tmp_did = -1; /*temporary data type IDs */ + H5T_path_t *old_path = NULL; /*existing conversion path */ + H5T_path_t *new_path = NULL; /*new conversion path */ + H5T_cdata_t cdata; /*temporary conversion data */ + int nprint=0; /*number of paths shut down */ + int i; /*counter */ + herr_t ret_value = SUCCEED; /*return value */ FUNC_ENTER_NOAPI_NOINIT @@ -2304,7 +2297,7 @@ H5T_register(H5T_pers_t pers, const char *name, H5T_t *src, H5T_t *dst, for(i = 0; i < H5T_g.npaths; i++) if(new_path != H5T_g.path[i]) H5T_g.path[i]->cdata.recalc = TRUE; - } /* end if */ + } /* end if */ } /* end if */ else { /* Add function to end of soft list */ @@ -2375,11 +2368,11 @@ H5T_register(H5T_pers_t pers, const char *name, H5T_t *src, H5T_t *dst, if ((old_path->func)(tmp_sid, tmp_did, &(old_path->cdata), (size_t)0, (size_t)0, (size_t)0, NULL, NULL, dxpl_id)<0) { #ifdef H5T_DEBUG - if (H5DEBUG(T)) { - fprintf (H5DEBUG(T), "H5T: conversion function 0x%08lx " - "failed to free private data for %s (ignored)\n", - (unsigned long)(old_path->func), old_path->name); - } + if (H5DEBUG(T)) { + fprintf (H5DEBUG(T), "H5T: conversion function 0x%08lx " + "failed to free private data for %s (ignored)\n", + (unsigned long)(old_path->func), old_path->name); + } #endif } /* end if */ H5T_close(old_path->src); @@ -2392,23 +2385,23 @@ H5T_register(H5T_pers_t pers, const char *name, H5T_t *src, H5T_t *dst, tmp_sid = tmp_did = -1; /* We don't care about any failures during the freeing process */ - H5E_clear_stack(NULL); + H5E_clear_stack(NULL); } /* end for */ } /* end else */ done: if(ret_value < 0) { - if(new_path) { - if(new_path->src) - H5T_close(new_path->src); - if(new_path->dst) - H5T_close(new_path->dst); - new_path = H5FL_FREE(H5T_path_t, new_path); - } /* end if */ - if(tmp_sid >= 0) - H5I_dec_ref(tmp_sid); - if(tmp_did >= 0) - H5I_dec_ref(tmp_did); + if(new_path) { + if(new_path->src) + H5T_close(new_path->src); + if(new_path->dst) + H5T_close(new_path->dst); + new_path = H5FL_FREE(H5T_path_t, new_path); + } /* end if */ + if(tmp_sid >= 0) + H5I_dec_ref(tmp_sid); + if(tmp_did >= 0) + H5I_dec_ref(tmp_did); } /* end if */ FUNC_LEAVE_NOAPI(ret_value) @@ -2416,50 +2409,50 @@ done: /*------------------------------------------------------------------------- - * Function: H5Tregister + * Function: H5Tregister * - * Purpose: Register a hard or soft conversion function for a data type - * conversion path. The path is specified by the source and - * destination data types SRC_ID and DST_ID (for soft functions - * only the class of these types is important). If FUNC is a - * hard function then it replaces any previous path; if it's a - * soft function then it replaces all existing paths to which it - * applies and is used for any new path to which it applies as - * long as that path doesn't have a hard function. + * Purpose: Register a hard or soft conversion function for a data type + * conversion path. The path is specified by the source and + * destination data types SRC_ID and DST_ID (for soft functions + * only the class of these types is important). If FUNC is a + * hard function then it replaces any previous path; if it's a + * soft function then it replaces all existing paths to which it + * applies and is used for any new path to which it applies as + * long as that path doesn't have a hard function. * - * Return: Non-negative on success/Negative on failure + * Return: Non-negative on success/Negative on failure * - * Programmer: Robb Matzke - * Friday, January 9, 1998 + * Programmer: Robb Matzke + * Friday, January 9, 1998 * *------------------------------------------------------------------------- */ herr_t H5Tregister(H5T_pers_t pers, const char *name, hid_t src_id, hid_t dst_id, - H5T_conv_t func) + H5T_conv_t func) { - H5T_t *src; /*source data type descriptor */ - H5T_t *dst; /*destination data type desc */ - herr_t ret_value = SUCCEED; /*return value */ + H5T_t *src; /*source data type descriptor */ + H5T_t *dst; /*destination data type desc */ + herr_t ret_value = SUCCEED; /*return value */ FUNC_ENTER_API(FAIL) H5TRACE5("e", "Te*siix", pers, name, src_id, dst_id, func); /* Check args */ if(H5T_PERS_HARD != pers && H5T_PERS_SOFT != pers) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid function persistence") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid function persistence") if(!name || !*name) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "conversion must have a name for debugging") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "conversion must have a name for debugging") if(NULL == (src = (H5T_t *)H5I_object_verify(src_id,H5I_DATATYPE))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a data type") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a data type") if(NULL == (dst = (H5T_t *)H5I_object_verify(dst_id,H5I_DATATYPE))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a data type") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a data type") if(!func) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no conversion function specified") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no conversion function specified") /* Go register the function */ if(H5T_register(pers, name, src, dst, func, H5AC_noio_dxpl_id, TRUE) < 0) - HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "can't register conversion function") + HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "can't register conversion function") done: FUNC_LEAVE_API(ret_value) @@ -2467,18 +2460,18 @@ done: /*------------------------------------------------------------------------- - * Function: H5T_unregister + * Function: H5T_unregister * - * Purpose: Removes conversion paths that match the specified criteria. - * All arguments are optional. Missing arguments are wild cards. - * The special no-op path cannot be removed. + * Purpose: Removes conversion paths that match the specified criteria. + * All arguments are optional. Missing arguments are wild cards. + * The special no-op path cannot be removed. * - * Return: Succeess: non-negative + * Return: Succeess: non-negative * - * Failure: negative + * Failure: negative * - * Programmer: Robb Matzke - * Tuesday, January 13, 1998 + * Programmer: Robb Matzke + * Tuesday, January 13, 1998 * * Modifications: * Adapted to non-API function - QAK, 11/17/99 @@ -2487,12 +2480,12 @@ done: */ static herr_t H5T_unregister(H5T_pers_t pers, const char *name, H5T_t *src, H5T_t *dst, - H5T_conv_t func, hid_t dxpl_id) + H5T_conv_t func, hid_t dxpl_id) { - H5T_path_t *path = NULL; /*conversion path */ - H5T_soft_t *soft = NULL; /*soft conversion information */ - int nprint = 0; /*number of paths shut down */ - int i; /*counter */ + H5T_path_t *path = NULL; /*conversion path */ + H5T_soft_t *soft = NULL; /*soft conversion information */ + int nprint = 0; /*number of paths shut down */ + int i; /*counter */ FUNC_ENTER_NOAPI_NOINIT_NOERR @@ -2566,27 +2559,27 @@ H5T_unregister(H5T_pers_t pers, const char *name, H5T_t *src, H5T_t *dst, /*------------------------------------------------------------------------- - * Function: H5Tunregister + * Function: H5Tunregister * - * Purpose: Removes conversion paths that match the specified criteria. - * All arguments are optional. Missing arguments are wild cards. - * The special no-op path cannot be removed. + * Purpose: Removes conversion paths that match the specified criteria. + * All arguments are optional. Missing arguments are wild cards. + * The special no-op path cannot be removed. * - * Return: Succeess: non-negative + * Return: Succeess: non-negative * - * Failure: negative + * Failure: negative * - * Programmer: Robb Matzke - * Tuesday, January 13, 1998 + * Programmer: Robb Matzke + * Tuesday, January 13, 1998 * *------------------------------------------------------------------------- */ herr_t H5Tunregister(H5T_pers_t pers, const char *name, hid_t src_id, hid_t dst_id, - H5T_conv_t func) + H5T_conv_t func) { - H5T_t *src = NULL, *dst = NULL; /* Datatype descriptors */ - herr_t ret_value = SUCCEED; /* Return value */ + H5T_t *src = NULL, *dst = NULL; /* Datatype descriptors */ + herr_t ret_value = SUCCEED; /* Return value */ FUNC_ENTER_API(FAIL) H5TRACE5("e", "Te*siix", pers, name, src_id, dst_id, func); @@ -2606,29 +2599,29 @@ done: /*------------------------------------------------------------------------- - * Function: H5Tfind + * Function: H5Tfind * - * Purpose: Finds a conversion function that can handle a conversion from - * type SRC_ID to type DST_ID. The PCDATA argument is a pointer - * to a pointer to type conversion data which was created and - * initialized by the type conversion function of this path - * when the conversion function was installed on the path. + * Purpose: Finds a conversion function that can handle a conversion from + * type SRC_ID to type DST_ID. The PCDATA argument is a pointer + * to a pointer to type conversion data which was created and + * initialized by the type conversion function of this path + * when the conversion function was installed on the path. * - * Return: Success: A pointer to a suitable conversion function. + * Return: Success: A pointer to a suitable conversion function. * - * Failure: NULL + * Failure: NULL * - * Programmer: Robb Matzke - * Tuesday, January 13, 1998 + * Programmer: Robb Matzke + * Tuesday, January 13, 1998 * *------------------------------------------------------------------------- */ H5T_conv_t H5Tfind(hid_t src_id, hid_t dst_id, H5T_cdata_t **pcdata) { - H5T_t *src, *dst; - H5T_path_t *path; - H5T_conv_t ret_value; /* Return value */ + H5T_t *src, *dst; + H5T_path_t *path; + H5T_conv_t ret_value; /* Return value */ FUNC_ENTER_API(NULL) H5TRACE3("x", "ii**x", src_id, dst_id, pcdata); @@ -2636,13 +2629,13 @@ H5Tfind(hid_t src_id, hid_t dst_id, H5T_cdata_t **pcdata) /* Check args */ if(NULL == (src = (H5T_t *)H5I_object_verify(src_id, H5I_DATATYPE)) || NULL == (dst = (H5T_t *)H5I_object_verify(dst_id, H5I_DATATYPE))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "not a data type") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "not a data type") if(!pcdata) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, NULL, "no address to receive cdata pointer") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, NULL, "no address to receive cdata pointer") /* Find it */ if(NULL == (path = H5T_path_find(src, dst, NULL, NULL, H5AC_noio_dxpl_id, FALSE))) - HGOTO_ERROR(H5E_DATATYPE, H5E_NOTFOUND, NULL, "conversion function not found") + HGOTO_ERROR(H5E_DATATYPE, H5E_NOTFOUND, NULL, "conversion function not found") if(pcdata) *pcdata = &(path->cdata); @@ -2656,27 +2649,27 @@ done: /*------------------------------------------------------------------------- - * Function: H5Tcompiler_conv + * Function: H5Tcompiler_conv * - * Purpose: Finds out whether the library's conversion function from - * type src_id to type dst_id is a compiler (hard) conversion. - * A hard conversion uses compiler's casting; a soft conversion - * uses the library's own conversion function. + * Purpose: Finds out whether the library's conversion function from + * type src_id to type dst_id is a compiler (hard) conversion. + * A hard conversion uses compiler's casting; a soft conversion + * uses the library's own conversion function. * - * Return: TRUE: hard conversion. - * FALSE: soft conversion. - * FAIL: failed. + * Return: TRUE: hard conversion. + * FALSE: soft conversion. + * FAIL: failed. * - * Programmer: Raymond Lu - * Friday, Sept 2, 2005 + * Programmer: Raymond Lu + * Friday, Sept 2, 2005 * *------------------------------------------------------------------------- */ htri_t H5Tcompiler_conv(hid_t src_id, hid_t dst_id) { - H5T_t *src, *dst; - htri_t ret_value; /* Return value */ + H5T_t *src, *dst; + htri_t ret_value; /* Return value */ FUNC_ENTER_API(FAIL) H5TRACE2("t", "ii", src_id, dst_id); @@ -2684,11 +2677,11 @@ H5Tcompiler_conv(hid_t src_id, hid_t dst_id) /* Check args */ if(NULL == (src = (H5T_t *)H5I_object_verify(src_id, H5I_DATATYPE)) || NULL == (dst = (H5T_t *)H5I_object_verify(dst_id, H5I_DATATYPE))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a data type") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a data type") /* Find it */ if((ret_value = H5T_compiler_conv(src, dst)) < 0) - HGOTO_ERROR(H5E_DATATYPE, H5E_NOTFOUND, FAIL, "conversion function not found") + HGOTO_ERROR(H5E_DATATYPE, H5E_NOTFOUND, FAIL, "conversion function not found") done: FUNC_LEAVE_API(ret_value) @@ -2696,35 +2689,35 @@ done: /*------------------------------------------------------------------------- - * Function: H5Tconvert - * - * Purpose: Convert NELMTS elements from type SRC_ID to type DST_ID. The - * source elements are packed in BUF and on return the - * destination will be packed in BUF. That is, the conversion - * is performed in place. The optional background buffer is an - * array of NELMTS values of destination type which are merged - * with the converted values to fill in cracks (for instance, - * BACKGROUND might be an array of structs with the `a' and `b' - * fields already initialized and the conversion of BUF supplies - * the `c' and `d' field values). The PLIST_ID a dataset transfer - * property list which is passed to the conversion functions. (It's - * currently only used to pass along the VL datatype custom allocation - * information -QAK 7/1/99) - * - * Return: Non-negative on success/Negative on failure - * - * Programmer: Robb Matzke + * Function: H5Tconvert + * + * Purpose: Convert NELMTS elements from type SRC_ID to type DST_ID. The + * source elements are packed in BUF and on return the + * destination will be packed in BUF. That is, the conversion + * is performed in place. The optional background buffer is an + * array of NELMTS values of destination type which are merged + * with the converted values to fill in cracks (for instance, + * BACKGROUND might be an array of structs with the `a' and `b' + * fields already initialized and the conversion of BUF supplies + * the `c' and `d' field values). The PLIST_ID a dataset transfer + * property list which is passed to the conversion functions. (It's + * currently only used to pass along the VL datatype custom allocation + * information -QAK 7/1/99) + * + * Return: Non-negative on success/Negative on failure + * + * Programmer: Robb Matzke * Wednesday, June 10, 1998 * *------------------------------------------------------------------------- */ herr_t H5Tconvert(hid_t src_id, hid_t dst_id, size_t nelmts, void *buf, - void *background, hid_t dxpl_id) + void *background, hid_t dxpl_id) { - H5T_path_t *tpath; /*type conversion info */ - H5T_t *src, *dst; /*unatomized types */ - herr_t ret_value = SUCCEED; /* Return value */ + H5T_path_t *tpath; /* type conversion info */ + H5T_t *src, *dst; /* unatomized types */ + herr_t ret_value = SUCCEED; /* Return value */ FUNC_ENTER_API(FAIL) H5TRACE6("e", "iiz*x*xi", src_id, dst_id, nelmts, buf, background, dxpl_id); @@ -2732,7 +2725,7 @@ H5Tconvert(hid_t src_id, hid_t dst_id, size_t nelmts, void *buf, /* Check args */ if(NULL == (src = (H5T_t *)H5I_object_verify(src_id, H5I_DATATYPE)) || NULL == (dst = (H5T_t *)H5I_object_verify(dst_id, H5I_DATATYPE))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a data type") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a data type") if(H5P_DEFAULT == dxpl_id) dxpl_id = H5P_DATASET_XFER_DEFAULT; else @@ -2741,7 +2734,7 @@ H5Tconvert(hid_t src_id, hid_t dst_id, size_t nelmts, void *buf, /* Find the conversion function */ if(NULL == (tpath = H5T_path_find(src, dst, NULL, NULL, dxpl_id, FALSE))) - HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "unable to convert between src and dst data types") + HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "unable to convert between src and dst data types") if(H5T_convert(tpath, src_id, dst_id, nelmts, (size_t)0, (size_t)0, buf, background, dxpl_id) < 0) HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "data type conversion failed") @@ -2752,17 +2745,16 @@ done: /*------------------------------------------------------------------------- - * Function: H5Tencode + * Function: H5Tencode * - * Purpose: Given an datatype ID, converts the object description into - * binary in a buffer. + * Purpose: Given an datatype ID, converts the object description into + * binary in a buffer. * - * Return: Success: non-negative + * Return: Success: non-negative * - * Failure: negative + * Failure: negative * - * Programmer: Raymond Lu - * slu@ncsa.uiuc.edu + * Programmer: Raymond Lu * July 14, 2004 * *------------------------------------------------------------------------- @@ -2778,13 +2770,13 @@ H5Tencode(hid_t obj_id, void *buf, size_t *nalloc) /* Check argument and retrieve object */ if(NULL == (dtype = (H5T_t *)H5I_object_verify(obj_id, H5I_DATATYPE))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a datatype") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a datatype") if(nalloc == NULL) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "NULL pointer for buffer size") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "NULL pointer for buffer size") /* Go encode the datatype */ if(H5T_encode(dtype, (unsigned char *)buf, nalloc) < 0) - HGOTO_ERROR(H5E_DATATYPE, H5E_CANTENCODE, FAIL, "can't encode datatype") + HGOTO_ERROR(H5E_DATATYPE, H5E_CANTENCODE, FAIL, "can't encode datatype") done: FUNC_LEAVE_API(ret_value) @@ -2792,24 +2784,22 @@ done: /*------------------------------------------------------------------------- - * Function: H5Tdecode + * Function: H5Tdecode * - * Purpose: Decode a binary object description and return a new object - * handle. + * Purpose: Decode a binary object description and return a new object + * handle. * - * Return: Success: datatype ID(non-negative) + * Return: Success: datatype ID(non-negative) * - * Failure: negative + * Failure: negative * - * Programmer: Raymond Lu - * slu@ncsa.uiuc.edu + * Programmer: Raymond Lu * July 14, 2004 * * Modification:Raymond Lu - * songyulu@hdfgroup.org * 17 February 2011 * I changed the value for the APP_REF parameter of H5I_register - * from FALSE to TRUE. + * from FALSE to TRUE. *------------------------------------------------------------------------- */ hid_t @@ -2823,15 +2813,15 @@ H5Tdecode(const void *buf) /* Check args */ if(buf == NULL) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "empty buffer") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "empty buffer") /* Create datatype by decoding buffer */ if(NULL == (dt = H5T_decode((const unsigned char *)buf))) - HGOTO_ERROR(H5E_DATATYPE, H5E_CANTDECODE, FAIL, "can't decode object") + HGOTO_ERROR(H5E_DATATYPE, H5E_CANTDECODE, FAIL, "can't decode object") /* Register the type and return the ID */ if((ret_value = H5I_register(H5I_DATATYPE, dt, TRUE)) < 0) - HGOTO_ERROR(H5E_DATATYPE, H5E_CANTREGISTER, FAIL, "unable to register data type") + HGOTO_ERROR(H5E_DATATYPE, H5E_CANTREGISTER, FAIL, "unable to register data type") done: FUNC_LEAVE_API(ret_value) @@ -2844,17 +2834,16 @@ done: /*------------------------------------------------------------------------- - * Function: H5T_encode + * Function: H5T_encode * - * Purpose: Private function for H5Tencode. Converts an object - * description into binary in a buffer. + * Purpose: Private function for H5Tencode. Converts an object + * description into binary in a buffer. * - * Return: Success: non-negative + * Return: Success: non-negative * - * Failure: negative + * Failure: negative * - * Programmer: Raymond Lu - * slu@ncsa.uiuc.edu + * Programmer: Raymond Lu * July 14, 2004 * *------------------------------------------------------------------------- @@ -2870,11 +2859,11 @@ H5T_encode(H5T_t *obj, unsigned char *buf, size_t *nalloc) /* Allocate "fake" file structure */ if(NULL == (f = H5F_fake_alloc((uint8_t)0))) - HGOTO_ERROR(H5E_DATATYPE, H5E_CANTALLOC, FAIL, "can't allocate fake file struct") + HGOTO_ERROR(H5E_DATATYPE, H5E_CANTALLOC, FAIL, "can't allocate fake file struct") /* Find out the size of buffer needed */ if((buf_size = H5O_msg_raw_size(f, H5O_DTYPE_ID, TRUE, obj)) == 0) - HGOTO_ERROR(H5E_DATATYPE, H5E_BADSIZE, FAIL, "can't find datatype size") + HGOTO_ERROR(H5E_DATATYPE, H5E_BADSIZE, FAIL, "can't find datatype size") /* Don't encode if buffer size isn't big enough or buffer is empty */ if(!buf || *nalloc < (buf_size + 1 + 1)) @@ -2901,17 +2890,16 @@ done: /*------------------------------------------------------------------------- - * Function: H5T_decode + * Function: H5T_decode * - * Purpose: Private function for H5Tdecode. Reconstructs a binary - * description of datatype and returns a new object handle. + * Purpose: Private function for H5Tdecode. Reconstructs a binary + * description of datatype and returns a new object handle. * - * Return: Success: datatype ID(non-negative) + * Return: Success: datatype ID(non-negative) * - * Failure: negative + * Failure: negative * - * Programmer: Raymond Lu - * slu@ncsa.uiuc.edu + * Programmer: Raymond Lu * July 14, 2004 * *------------------------------------------------------------------------- @@ -2926,19 +2914,19 @@ H5T_decode(const unsigned char *buf) /* Allocate "fake" file structure */ if(NULL == (f = H5F_fake_alloc((uint8_t)0))) - HGOTO_ERROR(H5E_DATATYPE, H5E_CANTALLOC, NULL, "can't allocate fake file struct") + HGOTO_ERROR(H5E_DATATYPE, H5E_CANTALLOC, NULL, "can't allocate fake file struct") /* Decode the type of the information */ if(*buf++ != H5O_DTYPE_ID) - HGOTO_ERROR(H5E_DATATYPE, H5E_BADMESG, NULL, "not an encoded datatype") + HGOTO_ERROR(H5E_DATATYPE, H5E_BADMESG, NULL, "not an encoded datatype") /* Decode the version of the datatype information */ if(*buf++ != H5T_ENCODE_VERSION) - HGOTO_ERROR(H5E_DATATYPE, H5E_VERSION, NULL, "unknown version of encoded datatype") + HGOTO_ERROR(H5E_DATATYPE, H5E_VERSION, NULL, "unknown version of encoded datatype") /* Decode the serialized datatype message */ if(NULL == (ret_value = (H5T_t *)H5O_msg_decode(f, H5AC_noio_dxpl_id, NULL, H5O_DTYPE_ID, buf))) - HGOTO_ERROR(H5E_DATATYPE, H5E_CANTDECODE, NULL, "can't decode object") + HGOTO_ERROR(H5E_DATATYPE, H5E_CANTDECODE, NULL, "can't decode object") /* Mark datatype as being in memory now */ if(H5T_set_loc(ret_value, NULL, H5T_LOC_MEMORY) < 0) @@ -2954,18 +2942,18 @@ done: /*------------------------------------------------------------------------- - * Function: H5T__create + * Function: H5T__create * - * Purpose: Creates a new data type and initializes it to reasonable - * values. The new data type is SIZE bytes and an instance of - * the class TYPE. + * Purpose: Creates a new data type and initializes it to reasonable + * values. The new data type is SIZE bytes and an instance of + * the class TYPE. * - * Return: Success: Pointer to the new type. + * Return: Success: Pointer to the new type. * - * Failure: NULL + * Failure: NULL * - * Programmer: Robb Matzke - * Friday, December 5, 1997 + * Programmer: Robb Matzke + * Friday, December 5, 1997 * * Modifications: * Raymond Lu @@ -2989,16 +2977,16 @@ H5T__create(H5T_class_t type, size_t size) { H5T_t *origin_dt = NULL; - if(NULL == (origin_dt = (H5T_t *)H5I_object(H5T_C_S1))) - HGOTO_ERROR(H5E_DATATYPE, H5E_BADTYPE, NULL, "can't get structure for string type") + if(NULL == (origin_dt = (H5T_t *)H5I_object(H5T_C_S1))) + HGOTO_ERROR(H5E_DATATYPE, H5E_BADTYPE, NULL, "can't get structure for string type") - /* Copy the default string datatype */ - if(NULL == (dt = H5T_copy(origin_dt, H5T_COPY_TRANSIENT))) - HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, NULL, "unable to copy"); + /* Copy the default string datatype */ + if(NULL == (dt = H5T_copy(origin_dt, H5T_COPY_TRANSIENT))) + HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, NULL, "unable to copy"); - /* Modify the datatype */ - if(H5T_set_size(dt, size) < 0) - HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, NULL, "unable to set size for string type") + /* Modify the datatype */ + if(H5T_set_size(dt, size) < 0) + HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, NULL, "unable to set size for string type") } break; @@ -3083,35 +3071,35 @@ done: /*------------------------------------------------------------------------- - * Function: H5T_copy + * Function: H5T_copy * - * Purpose: Copies datatype OLD_DT. The resulting data type is not - * locked and is a transient type. + * Purpose: Copies datatype OLD_DT. The resulting data type is not + * locked and is a transient type. * - * Return: Success: Pointer to a new copy of the OLD_DT argument. + * Return: Success: Pointer to a new copy of the OLD_DT argument. * - * Failure: NULL + * Failure: NULL * - * Programmer: Robb Matzke - * Thursday, December 4, 1997 + * Programmer: Robb Matzke + * Thursday, December 4, 1997 * * Modifications: * - * Robb Matzke, 4 Jun 1998 - * Added the METHOD argument. If it's H5T_COPY_TRANSIENT then the - * result will be an unlocked transient type. Otherwise if it's - * H5T_COPY_ALL then the result is a named type if the original is a - * named type, but the result is not opened. Finally, if it's - * H5T_COPY_REOPEN and the original type is a named type then the result - * is a named type and the type object header is opened again. The - * H5T_COPY_REOPEN method is used when returning a named type to the - * application. + * Robb Matzke, 4 Jun 1998 + * Added the METHOD argument. If it's H5T_COPY_TRANSIENT then the + * result will be an unlocked transient type. Otherwise if it's + * H5T_COPY_ALL then the result is a named type if the original is a + * named type, but the result is not opened. Finally, if it's + * H5T_COPY_REOPEN and the original type is a named type then the result + * is a named type and the type object header is opened again. The + * H5T_COPY_REOPEN method is used when returning a named type to the + * application. * - * Robb Matzke, 22 Dec 1998 - * Now able to copy enumeration data types. + * Robb Matzke, 22 Dec 1998 + * Now able to copy enumeration data types. * * Robb Matzke, 20 May 1999 - * Now able to copy opaque types. + * Now able to copy opaque types. * * Pedro Vicente, 21 Sep 2002 * Added a deep copy of the symbol table entry @@ -3121,11 +3109,11 @@ done: H5T_t * H5T_copy(H5T_t *old_dt, H5T_copy_t method) { - H5T_t *new_dt = NULL, *tmp = NULL; + H5T_t *new_dt = NULL, *tmp = NULL; H5T_shared_t *reopened_fo = NULL; - unsigned i; - char *s; - H5T_t *ret_value = NULL; /* Return value */ + unsigned i; + char *s; + H5T_t *ret_value = NULL; /* Return value */ FUNC_ENTER_NOAPI(NULL) @@ -3207,7 +3195,8 @@ H5T_copy(H5T_t *old_dt, H5T_copy_t method) HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINC, NULL, "can't increment object count") } /* end else */ new_dt->shared->state = H5T_STATE_OPEN; - } else if(H5T_STATE_IMMUTABLE == old_dt->shared->state) { + } + else if(H5T_STATE_IMMUTABLE == old_dt->shared->state) { new_dt->shared->state = H5T_STATE_RDONLY; } break; @@ -3225,71 +3214,71 @@ H5T_copy(H5T_t *old_dt, H5T_copy_t method) switch(new_dt->shared->type) { case H5T_COMPOUND: { - ssize_t accum_change = 0; /* Amount of change in the offset of the fields */ - - /* - * Copy all member fields to new type, then overwrite the - * name and type fields of each new member with copied values. - * That is, H5T_copy() is a deep copy. - */ - /* Only malloc if space has been allocated for members - NAF */ - if(new_dt->shared->u.compnd.nalloc > 0) { - new_dt->shared->u.compnd.memb = (H5T_cmemb_t *)H5MM_malloc(new_dt->shared->u.compnd.nalloc * - sizeof(H5T_cmemb_t)); - if (NULL==new_dt->shared->u.compnd.memb) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed"); - - HDmemcpy(new_dt->shared->u.compnd.memb, old_dt->shared->u.compnd.memb, - new_dt->shared->u.compnd.nmembs * sizeof(H5T_cmemb_t)); - } /* end if */ - - for(i = 0; i < new_dt->shared->u.compnd.nmembs; i++) { - unsigned j; - int old_match; - - s = new_dt->shared->u.compnd.memb[i].name; - new_dt->shared->u.compnd.memb[i].name = H5MM_xstrdup(s); - tmp = H5T_copy (old_dt->shared->u.compnd.memb[i].type, method); - new_dt->shared->u.compnd.memb[i].type = tmp; - HDassert(tmp != NULL); - - /* Range check against compound member's offset */ - if ((accum_change < 0) && ((ssize_t) new_dt->shared->u.compnd.memb[i].offset < accum_change)) - HGOTO_ERROR(H5E_DATATYPE, H5E_BADVALUE, NULL, "invalid field size in datatype"); - - /* Apply the accumulated size change to the offset of the field */ - new_dt->shared->u.compnd.memb[i].offset += (size_t) accum_change; + ssize_t accum_change = 0; /* Amount of change in the offset of the fields */ - if(old_dt->shared->u.compnd.sorted != H5T_SORT_VALUE) { - for(old_match = -1, j = 0; j < old_dt->shared->u.compnd.nmembs; j++) { - if(!HDstrcmp(new_dt->shared->u.compnd.memb[i].name, old_dt->shared->u.compnd.memb[j].name)) { - old_match = (int) j; - break; - } /* end if */ - } /* end for */ - - /* check if we couldn't find a match */ - if(old_match < 0) - HGOTO_ERROR(H5E_DATATYPE, H5E_CANTCOPY, NULL, "fields in datatype corrupted"); + /* + * Copy all member fields to new type, then overwrite the + * name and type fields of each new member with copied values. + * That is, H5T_copy() is a deep copy. + */ + /* Only malloc if space has been allocated for members - NAF */ + if(new_dt->shared->u.compnd.nalloc > 0) { + new_dt->shared->u.compnd.memb = + (H5T_cmemb_t *)H5MM_malloc(new_dt->shared->u.compnd.nalloc * sizeof(H5T_cmemb_t)); + if (NULL == new_dt->shared->u.compnd.memb) + HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed"); + + HDmemcpy(new_dt->shared->u.compnd.memb, old_dt->shared->u.compnd.memb, + new_dt->shared->u.compnd.nmembs * sizeof(H5T_cmemb_t)); } /* end if */ - else - old_match = (int) i; - /* If the field changed size, add that change to the accumulated size change */ - if(new_dt->shared->u.compnd.memb[i].type->shared->size != old_dt->shared->u.compnd.memb[old_match].type->shared->size) { - /* Adjust the size of the member */ - new_dt->shared->u.compnd.memb[i].size = (old_dt->shared->u.compnd.memb[old_match].size*tmp->shared->size)/old_dt->shared->u.compnd.memb[old_match].type->shared->size; + for(i = 0; i < new_dt->shared->u.compnd.nmembs; i++) { + unsigned j; + int old_match; + + s = new_dt->shared->u.compnd.memb[i].name; + new_dt->shared->u.compnd.memb[i].name = H5MM_xstrdup(s); + tmp = H5T_copy (old_dt->shared->u.compnd.memb[i].type, method); + new_dt->shared->u.compnd.memb[i].type = tmp; + HDassert(tmp != NULL); + + /* Range check against compound member's offset */ + if ((accum_change < 0) && ((ssize_t) new_dt->shared->u.compnd.memb[i].offset < accum_change)) + HGOTO_ERROR(H5E_DATATYPE, H5E_BADVALUE, NULL, "invalid field size in datatype"); + + /* Apply the accumulated size change to the offset of the field */ + new_dt->shared->u.compnd.memb[i].offset += (size_t) accum_change; + + if(old_dt->shared->u.compnd.sorted != H5T_SORT_VALUE) { + for(old_match = -1, j = 0; j < old_dt->shared->u.compnd.nmembs; j++) { + if(!HDstrcmp(new_dt->shared->u.compnd.memb[i].name, old_dt->shared->u.compnd.memb[j].name)) { + old_match = (int) j; + break; + } /* end if */ + } /* end for */ + + /* check if we couldn't find a match */ + if(old_match < 0) + HGOTO_ERROR(H5E_DATATYPE, H5E_CANTCOPY, NULL, "fields in datatype corrupted"); + } /* end if */ + else + old_match = (int) i; + + /* If the field changed size, add that change to the accumulated size change */ + if(new_dt->shared->u.compnd.memb[i].type->shared->size != old_dt->shared->u.compnd.memb[old_match].type->shared->size) { + /* Adjust the size of the member */ + new_dt->shared->u.compnd.memb[i].size = (old_dt->shared->u.compnd.memb[old_match].size*tmp->shared->size)/old_dt->shared->u.compnd.memb[old_match].type->shared->size; - accum_change += (ssize_t) (new_dt->shared->u.compnd.memb[i].type->shared->size - old_dt->shared->u.compnd.memb[old_match].type->shared->size); - } /* end if */ - } /* end for */ + accum_change += (ssize_t) (new_dt->shared->u.compnd.memb[i].type->shared->size - old_dt->shared->u.compnd.memb[old_match].type->shared->size); + } /* end if */ + } /* end for */ - /* Range check against datatype size */ - if ((accum_change < 0) && ((ssize_t) new_dt->shared->size < accum_change)) - HGOTO_ERROR(H5E_DATATYPE, H5E_BADVALUE, NULL, "invalid field size in datatype"); + /* Range check against datatype size */ + if ((accum_change < 0) && ((ssize_t) new_dt->shared->size < accum_change)) + HGOTO_ERROR(H5E_DATATYPE, H5E_BADVALUE, NULL, "invalid field size in datatype"); - /* Apply the accumulated size change to the size of the compound struct */ - new_dt->shared->size += (size_t) accum_change; + /* Apply the accumulated size change to the size of the compound struct */ + new_dt->shared->size += (size_t) accum_change; } break; @@ -3299,14 +3288,14 @@ H5T_copy(H5T_t *old_dt, H5T_copy_t method) * of each new member with copied values. That is, H5T_copy() is a * deep copy. */ - new_dt->shared->u.enumer.name = (char **)H5MM_malloc(new_dt->shared->u.enumer.nalloc * - sizeof(char*)); - new_dt->shared->u.enumer.value = (uint8_t *)H5MM_malloc(new_dt->shared->u.enumer.nalloc * - new_dt->shared->size); + new_dt->shared->u.enumer.name = + (char **)H5MM_malloc(new_dt->shared->u.enumer.nalloc * sizeof(char*)); + new_dt->shared->u.enumer.value = + (uint8_t *)H5MM_malloc(new_dt->shared->u.enumer.nalloc * new_dt->shared->size); if(NULL == new_dt->shared->u.enumer.value) HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed"); HDmemcpy(new_dt->shared->u.enumer.value, old_dt->shared->u.enumer.value, - new_dt->shared->u.enumer.nmembs * new_dt->shared->size); + new_dt->shared->u.enumer.nmembs * new_dt->shared->size); for(i = 0; i < new_dt->shared->u.enumer.nmembs; i++) { s = old_dt->shared->u.enumer.name[i]; new_dt->shared->u.enumer.name[i] = H5MM_xstrdup(s); @@ -3390,22 +3379,19 @@ done: /*------------------------------------------------------------------------- - * Function: H5T_lock + * Function: H5T_lock * - * Purpose: Lock a transient data type making it read-only. If IMMUTABLE - * is set then the type cannot be closed except when the library - * itself closes. + * Purpose: Lock a transient data type making it read-only. If IMMUTABLE + * is set then the type cannot be closed except when the library + * itself closes. * - * This function is a no-op if the type is not transient or if - * the type is already read-only or immutable. + * This function is a no-op if the type is not transient or if + * the type is already read-only or immutable. * - * Return: Non-negative on success/Negative on failure + * Return: Non-negative on success/Negative on failure * - * Programmer: Robb Matzke + * Programmer: Robb Matzke * Thursday, June 4, 1998 - * - * Modifications: - * *------------------------------------------------------------------------- */ herr_t @@ -3439,14 +3425,14 @@ done: /*------------------------------------------------------------------------- - * Function: H5T__alloc + * Function: H5T__alloc * - * Purpose: Allocates a new H5T_t structure, initializing it correctly. + * Purpose: Allocates a new H5T_t structure, initializing it correctly. * - * Return: Pointer to new H5T_t on success/NULL on failure + * Return: Pointer to new H5T_t on success/NULL on failure * - * Programmer: Quincey Koziol - * Monday, August 29, 2005 + * Programmer: Quincey Koziol + * Monday, August 29, 2005 * *------------------------------------------------------------------------- */ @@ -3486,23 +3472,23 @@ done: /*------------------------------------------------------------------------- - * Function: H5T__free + * Function: H5T__free * - * Purpose: Frees all memory associated with a datatype, but does not - * free the H5T_t or H5T_shared_t structures (which should - * be done in H5T_close). + * Purpose: Frees all memory associated with a datatype, but does not + * free the H5T_t or H5T_shared_t structures (which should + * be done in H5T_close). * - * Return: Non-negative on success/Negative on failure + * Return: Non-negative on success/Negative on failure * - * Programmer: Quincey Koziol - * Monday, January 6, 2003 + * Programmer: Quincey Koziol + * Monday, January 6, 2003 * *------------------------------------------------------------------------- */ herr_t H5T__free(H5T_t *dt) { - unsigned i; + unsigned i; herr_t ret_value = SUCCEED; /* Return value */ FUNC_ENTER_PACKAGE @@ -3535,7 +3521,7 @@ H5T__free(H5T_t *dt) * Don't free locked datatypes. */ if(H5T_STATE_IMMUTABLE==dt->shared->state) - HGOTO_ERROR(H5E_DATATYPE, H5E_CLOSEERROR, FAIL, "unable to close immutable datatype") + HGOTO_ERROR(H5E_DATATYPE, H5E_CLOSEERROR, FAIL, "unable to close immutable datatype") /* Close the datatype */ switch(dt->shared->type) { @@ -3578,7 +3564,7 @@ H5T__free(H5T_t *dt) /* Close the parent */ HDassert(dt->shared->parent != dt); if(dt->shared->parent && H5T_close(dt->shared->parent) < 0) - HGOTO_ERROR(H5E_DATATYPE, H5E_CANTCLOSEOBJ, FAIL, "unable to close parent data type") + HGOTO_ERROR(H5E_DATATYPE, H5E_CANTCLOSEOBJ, FAIL, "unable to close parent data type") dt->shared->parent = NULL; done: @@ -3587,22 +3573,22 @@ done: /*------------------------------------------------------------------------- - * Function: H5T_close + * Function: H5T_close * - * Purpose: Frees a data type and all associated memory. If the data - * type is locked then nothing happens. + * Purpose: Frees a data type and all associated memory. If the data + * type is locked then nothing happens. * - * Return: Non-negative on success/Negative on failure + * Return: Non-negative on success/Negative on failure * - * Programmer: Robb Matzke - * Monday, December 8, 1997 + * Programmer: Robb Matzke + * Monday, December 8, 1997 * *------------------------------------------------------------------------- */ herr_t H5T_close(H5T_t *dt) { - herr_t ret_value = SUCCEED; /* Return value */ + herr_t ret_value = SUCCEED; /* Return value */ FUNC_ENTER_NOAPI(FAIL) @@ -3612,16 +3598,16 @@ H5T_close(H5T_t *dt) dt->shared->fo_count--; if(dt->shared->state != H5T_STATE_OPEN || dt->shared->fo_count == 0) { - /* Uncork cache entries with object address tag for named datatype only */ - if(dt->shared->state == H5T_STATE_OPEN && dt->shared->fo_count == 0) { - hbool_t corked; /* Whether the named datatype is corked or not */ - - if(H5AC_cork(dt->oloc.file, dt->oloc.addr, H5AC__GET_CORKED, &corked) < 0) - HGOTO_ERROR(H5E_DATATYPE, H5E_CANTGET, FAIL, "unable to retrieve an object's cork status") - if(corked) - if(H5AC_cork(dt->oloc.file, dt->oloc.addr, H5AC__UNCORK, NULL) < 0) - HGOTO_ERROR(H5E_DATATYPE, H5E_CANTUNCORK, FAIL, "unable to uncork an object") - } /* end if */ + /* Uncork cache entries with object address tag for named datatype only */ + if(dt->shared->state == H5T_STATE_OPEN && dt->shared->fo_count == 0) { + hbool_t corked; /* Whether the named datatype is corked or not */ + + if(H5AC_cork(dt->oloc.file, dt->oloc.addr, H5AC__GET_CORKED, &corked) < 0) + HGOTO_ERROR(H5E_DATATYPE, H5E_CANTGET, FAIL, "unable to retrieve an object's cork status") + if(corked) + if(H5AC_cork(dt->oloc.file, dt->oloc.addr, H5AC__UNCORK, NULL) < 0) + HGOTO_ERROR(H5E_DATATYPE, H5E_CANTUNCORK, FAIL, "unable to uncork an object") + } /* end if */ if(H5T__free(dt) < 0) HGOTO_ERROR(H5E_DATATYPE, H5E_CANTFREE, FAIL, "unable to free datatype"); @@ -3666,40 +3652,40 @@ done: /*------------------------------------------------------------------------- - * Function: H5T_set_size + * Function: H5T_set_size * - * Purpose: Sets the total size in bytes for a data type (this operation - * is not permitted on reference data types). If the size is - * decreased so that the significant bits of the data type - * extend beyond the edge of the new size, then the `offset' - * property is decreased toward zero. If the `offset' becomes - * zero and the significant bits of the data type still hang - * over the edge of the new size, then the number of significant - * bits is decreased. + * Purpose: Sets the total size in bytes for a data type (this operation + * is not permitted on reference data types). If the size is + * decreased so that the significant bits of the data type + * extend beyond the edge of the new size, then the `offset' + * property is decreased toward zero. If the `offset' becomes + * zero and the significant bits of the data type still hang + * over the edge of the new size, then the number of significant + * bits is decreased. * - * Adjusting the size of an H5T_STRING automatically sets the - * precision to 8*size. + * Adjusting the size of an H5T_STRING automatically sets the + * precision to 8*size. * - * All data types have a positive size. + * All data types have a positive size. * - * Return: Success: non-negative + * Return: Success: non-negative * - * Failure: nagative + * Failure: nagative * - * Programmer: Robb Matzke + * Programmer: Robb Matzke * Tuesday, December 22, 1998 * * Modifications: - * Robb Matzke, 22 Dec 1998 - * Also works with derived data types. + * Robb Matzke, 22 Dec 1998 + * Also works with derived data types. * *------------------------------------------------------------------------- */ static herr_t H5T_set_size(H5T_t *dt, size_t size) { - size_t prec, offset; - herr_t ret_value=SUCCEED; /* Return value */ + size_t prec, offset; + herr_t ret_value=SUCCEED; /* Return value */ FUNC_ENTER_NOAPI_NOINIT @@ -3718,7 +3704,8 @@ H5T_set_size(H5T_t *dt, size_t size) dt->shared->size = dt->shared->parent->shared->size * dt->shared->u.array.nelem; else if(dt->shared->type!=H5T_VLEN) dt->shared->size = dt->shared->parent->shared->size; - } else { + } + else { if (H5T_IS_ATOMIC(dt->shared)) { offset = dt->shared->u.atomic.offset; prec = dt->shared->u.atomic.prec; @@ -3731,7 +3718,8 @@ H5T_set_size(H5T_t *dt, size_t size) offset = 8 * size - prec; if (prec > 8*size) prec = 8 * size; - } else { + } + else { prec = offset = 0; } @@ -3745,28 +3733,28 @@ H5T_set_size(H5T_t *dt, size_t size) case H5T_COMPOUND: /* If decreasing size, check the last member isn't being cut. */ - if(sizeshared->size) { + if(size < dt->shared->size) { int num_membs = 0; - unsigned i, max_index=0; - size_t memb_offset, max_offset=0; + unsigned i, max_index = 0; + size_t memb_offset, max_offset = 0; size_t max_size; - if((num_membs = H5T_get_nmembers(dt))<0) + if((num_membs = H5T_get_nmembers(dt)) < 0) HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "unable to get number of members"); if(num_membs) { - for(i=0; i<(unsigned)num_membs; i++) { - memb_offset = H5T_get_member_offset(dt, i); - if(memb_offset > max_offset) { - max_offset = memb_offset; - max_index = i; - } - } - - max_size = H5T__get_member_size(dt, max_index); - - if(size<(max_offset+max_size)) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "size shrinking will cut off last member "); + for(i = 0; i < (unsigned)num_membs; i++) { + memb_offset = H5T_get_member_offset(dt, i); + if(memb_offset > max_offset) { + max_offset = memb_offset; + max_index = i; + } + } + + max_size = H5T__get_member_size(dt, max_index); + + if(size < (max_offset + max_size)) + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "size shrinking will cut off last member "); } /* Compound must not have been packed previously */ @@ -3779,10 +3767,10 @@ H5T_set_size(H5T_t *dt, size_t size) case H5T_STRING: /* Convert string to variable-length datatype */ - if(size==H5T_VARIABLE) { - H5T_t *base = NULL; /* base data type */ - H5T_cset_t tmp_cset; /* Temp. cset info */ - H5T_str_t tmp_strpad; /* Temp. strpad info */ + if(size == H5T_VARIABLE) { + H5T_t *base = NULL; /* base data type */ + H5T_cset_t tmp_cset; /* Temp. cset info */ + H5T_str_t tmp_strpad; /* Temp. strpad info */ /* Get a copy of unsigned char type as the base/parent type */ if(NULL == (base = (H5T_t *)H5I_object(H5T_NATIVE_UCHAR))) @@ -3794,14 +3782,14 @@ H5T_set_size(H5T_t *dt, size_t size) /* * Force conversions (i.e. memory to memory conversions - * should duplicate data, not point to the same VL strings) + * should duplicate data, not point to the same VL strings) */ dt->shared->force_conv = TRUE; - /* Before we mess with the info in the union, extract the - * values we need */ - tmp_cset=dt->shared->u.atomic.u.s.cset; - tmp_strpad=dt->shared->u.atomic.u.s.pad; + /* Before we mess with the info in the union, extract the + * values we need */ + tmp_cset = dt->shared->u.atomic.u.s.cset; + tmp_strpad = dt->shared->u.atomic.u.s.pad; /* This is a string, not a sequence */ dt->shared->u.vlen.type = H5T_VLEN_STRING; @@ -3814,7 +3802,8 @@ H5T_set_size(H5T_t *dt, size_t size) if (H5T_set_loc(dt, NULL, H5T_LOC_MEMORY)<0) HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "invalid datatype location"); - } else { + } + else { prec = 8 * size; offset = 0; } /* end else */ @@ -3848,7 +3837,7 @@ H5T_set_size(H5T_t *dt, size_t size) } /* Commit (if we didn't convert this type to a VL string) */ - if(dt->shared->type!=H5T_VLEN) { + if(dt->shared->type != H5T_VLEN) { dt->shared->size = size; if (H5T_IS_ATOMIC(dt->shared)) { dt->shared->u.atomic.offset = offset; @@ -3867,21 +3856,18 @@ done: /*------------------------------------------------------------------------- - * Function: H5T_get_size - * - * Purpose: Determines the total size of a data type in bytes. + * Function: H5T_get_size * - * Return: Success: Size of the data type in bytes. The size of - * the data type is the size of an instance of - * that data type. + * Purpose: Determines the total size of a data type in bytes. * - * Failure: 0 (valid data types are never zero size) + * Return: Success: Size of the data type in bytes. The size of + * the data type is the size of an instance of + * that data type. * - * Programmer: Robb Matzke - * Tuesday, December 9, 1997 - * - * Modifications: + * Failure: 0 (valid data types are never zero size) * + * Programmer: Robb Matzke + * Tuesday, December 9, 1997 *------------------------------------------------------------------------- */ size_t @@ -3898,30 +3884,30 @@ H5T_get_size(const H5T_t *dt) /*------------------------------------------------------------------------- - * Function: H5T_cmp + * Function: H5T_cmp * - * Purpose: Compares two data types. + * Purpose: Compares two data types. * - * Return: Success: 0 if DT1 and DT2 are equal. - * <0 if DT1 is less than DT2. - * >0 if DT1 is greater than DT2. + * Return: Success: 0 if DT1 and DT2 are equal. + * <0 if DT1 is less than DT2. + * >0 if DT1 is greater than DT2. * - * Failure: 0, never fails + * Failure: 0, never fails * - * Programmer: Robb Matzke - * Wednesday, December 10, 1997 + * Programmer: Robb Matzke + * Wednesday, December 10, 1997 * *------------------------------------------------------------------------- */ int H5T_cmp(const H5T_t *dt1, const H5T_t *dt2, hbool_t superset) { - unsigned *idx1 = NULL, *idx2 = NULL; - size_t base_size; - hbool_t swapped; - unsigned u; - int tmp; - int ret_value = 0; + unsigned *idx1 = NULL, *idx2 = NULL; + size_t base_size; + hbool_t swapped; + unsigned u; + int tmp; + int ret_value = 0; FUNC_ENTER_NOAPI(0) @@ -3949,10 +3935,10 @@ H5T_cmp(const H5T_t *dt1, const H5T_t *dt2, hbool_t superset) if(!dt1->shared->parent && dt2->shared->parent) HGOTO_DONE(1); if(dt1->shared->parent) { - tmp = H5T_cmp(dt1->shared->parent, dt2->shared->parent, superset); - if(tmp < 0) + tmp = H5T_cmp(dt1->shared->parent, dt2->shared->parent, superset); + if(tmp < 0) HGOTO_DONE(-1); - if(tmp > 0) + if(tmp > 0) HGOTO_DONE(1); } /* end if */ @@ -4003,7 +3989,7 @@ H5T_cmp(const H5T_t *dt1, const H5T_t *dt2, hbool_t superset) #ifdef H5T_DEBUG /* I don't quite trust the code above yet :-) --RPM */ - for (u=0; ushared->u.compnd.nmembs-1; u++) { + for(u=0; ushared->u.compnd.nmembs-1; u++) { HDassert(HDstrcmp(dt1->shared->u.compnd.memb[idx1[u]].name, dt1->shared->u.compnd.memb[idx1[u + 1]].name)); HDassert(HDstrcmp(dt2->shared->u.compnd.memb[idx2[u]].name, @@ -4012,24 +3998,24 @@ H5T_cmp(const H5T_t *dt1, const H5T_t *dt2, hbool_t superset) #endif /* Compare the members */ - for (u=0; ushared->u.compnd.nmembs; u++) { + for(u=0; ushared->u.compnd.nmembs; u++) { tmp = HDstrcmp(dt1->shared->u.compnd.memb[idx1[u]].name, dt2->shared->u.compnd.memb[idx2[u]].name); - if (tmp < 0) + if(tmp < 0) HGOTO_DONE(-1); - if (tmp > 0) + if(tmp > 0) HGOTO_DONE(1); - if (dt1->shared->u.compnd.memb[idx1[u]].offset < dt2->shared->u.compnd.memb[idx2[u]].offset) HGOTO_DONE(-1); - if (dt1->shared->u.compnd.memb[idx1[u]].offset > dt2->shared->u.compnd.memb[idx2[u]].offset) HGOTO_DONE(1); + if(dt1->shared->u.compnd.memb[idx1[u]].offset < dt2->shared->u.compnd.memb[idx2[u]].offset) HGOTO_DONE(-1); + if(dt1->shared->u.compnd.memb[idx1[u]].offset > dt2->shared->u.compnd.memb[idx2[u]].offset) HGOTO_DONE(1); - if (dt1->shared->u.compnd.memb[idx1[u]].size < dt2->shared->u.compnd.memb[idx2[u]].size) HGOTO_DONE(-1); - if (dt1->shared->u.compnd.memb[idx1[u]].size > dt2->shared->u.compnd.memb[idx2[u]].size) HGOTO_DONE(1); + if(dt1->shared->u.compnd.memb[idx1[u]].size < dt2->shared->u.compnd.memb[idx2[u]].size) HGOTO_DONE(-1); + if(dt1->shared->u.compnd.memb[idx1[u]].size > dt2->shared->u.compnd.memb[idx2[u]].size) HGOTO_DONE(1); tmp = H5T_cmp(dt1->shared->u.compnd.memb[idx1[u]].type, dt2->shared->u.compnd.memb[idx2[u]].type, superset); - if (tmp < 0) HGOTO_DONE(-1); - if (tmp > 0) HGOTO_DONE(1); + if(tmp < 0) HGOTO_DONE(-1); + if(tmp > 0) HGOTO_DONE(1); } break; @@ -4042,13 +4028,13 @@ H5T_cmp(const H5T_t *dt1, const H5T_t *dt2, hbool_t superset) * more members than dt1 */ if(superset) { - if (dt1->shared->u.enumer.nmembs > dt2->shared->u.enumer.nmembs) + if(dt1->shared->u.enumer.nmembs > dt2->shared->u.enumer.nmembs) HGOTO_DONE(1); } /* end if */ else { - if (dt1->shared->u.enumer.nmembs < dt2->shared->u.enumer.nmembs) + if(dt1->shared->u.enumer.nmembs < dt2->shared->u.enumer.nmembs) HGOTO_DONE(-1); - if (dt1->shared->u.enumer.nmembs > dt2->shared->u.enumer.nmembs) + if(dt1->shared->u.enumer.nmembs > dt2->shared->u.enumer.nmembs) HGOTO_DONE(1); } /* end else */ @@ -4056,15 +4042,15 @@ H5T_cmp(const H5T_t *dt1, const H5T_t *dt2, hbool_t superset) if(NULL == (idx1 = (unsigned *)H5MM_malloc(dt1->shared->u.enumer.nmembs * sizeof(unsigned))) || NULL == (idx2 = (unsigned *)H5MM_malloc(dt2->shared->u.enumer.nmembs * sizeof(unsigned)))) HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, 0, "memory allocation failed"); - for (u=0; ushared->u.enumer.nmembs; u++) + for(u=0; ushared->u.enumer.nmembs; u++) idx1[u] = u; if(dt1->shared->u.enumer.nmembs > 1) { int i; for (i = (int) dt1->shared->u.enumer.nmembs - 1, swapped = TRUE; swapped && i >= 0; --i) { int j; - for (j = 0, swapped = FALSE; j < i; j++) - if (HDstrcmp(dt1->shared->u.enumer.name[idx1[j]], + for(j = 0, swapped = FALSE; j < i; j++) + if(HDstrcmp(dt1->shared->u.enumer.name[idx1[j]], dt1->shared->u.enumer.name[idx1[j+1]]) > 0) { unsigned tmp_idx = idx1[j]; idx1[j] = idx1[j+1]; @@ -4073,16 +4059,16 @@ H5T_cmp(const H5T_t *dt1, const H5T_t *dt2, hbool_t superset) } } } - for (u=0; ushared->u.enumer.nmembs; u++) + for(u=0; ushared->u.enumer.nmembs; u++) idx2[u] = u; if(dt2->shared->u.enumer.nmembs > 1) { int i; - for (i = (int) dt2->shared->u.enumer.nmembs - 1, swapped = TRUE; swapped && i >= 0; --i) { + for(i = (int) dt2->shared->u.enumer.nmembs - 1, swapped = TRUE; swapped && i >= 0; --i) { int j; - for (j = 0, swapped = FALSE; j < i; j++) - if (HDstrcmp(dt2->shared->u.enumer.name[idx2[j]], + for(j = 0, swapped = FALSE; j < i; j++) + if(HDstrcmp(dt2->shared->u.enumer.name[idx2[j]], dt2->shared->u.enumer.name[idx2[j+1]]) > 0) { unsigned tmp_idx = idx2[j]; idx2[j] = idx2[j+1]; @@ -4094,7 +4080,7 @@ H5T_cmp(const H5T_t *dt1, const H5T_t *dt2, hbool_t superset) #ifdef H5T_DEBUG /* I don't quite trust the code above yet :-) --RPM */ - for (u=0; ushared->u.enumer.nmembs-1; u++) { + for(u=0; ushared->u.enumer.nmembs-1; u++) { HDassert(HDstrcmp(dt1->shared->u.enumer.name[idx1[u]], dt1->shared->u.enumer.name[idx1[u+1]])); HDassert(HDstrcmp(dt2->shared->u.enumer.name[idx2[u]], @@ -4104,12 +4090,12 @@ H5T_cmp(const H5T_t *dt1, const H5T_t *dt2, hbool_t superset) /* Compare the members */ base_size = dt1->shared->parent->shared->size; - for (u=0; ushared->u.enumer.nmembs; u++) { + for(u=0; ushared->u.enumer.nmembs; u++) { unsigned idx = 0; if(superset) { unsigned lt = 0, rt; /* Final, left & right key indices */ - int cmp = 1; /* Key comparison value */ + int cmp = 1; /* Key comparison value */ /* If a superset is allowed, dt2 may have more members * than dt1, so binary search for matching member name in @@ -4117,18 +4103,18 @@ H5T_cmp(const H5T_t *dt1, const H5T_t *dt2, hbool_t superset) */ rt = dt2->shared->u.enumer.nmembs; - while (lt < rt && cmp) { + while(lt < rt && cmp) { idx = (lt + rt) / 2; /* compare */ - if ((cmp = HDstrcmp(dt1->shared->u.enumer.name[idx1[u]], + if((cmp = HDstrcmp(dt1->shared->u.enumer.name[idx1[u]], dt2->shared->u.enumer.name[idx2[idx]] ) ) < 0) rt = idx; else lt = idx+1; } /* Leave, if we couldn't find match */ - if (cmp) + if(cmp) HGOTO_DONE(-1); } /* end if */ else { @@ -4147,8 +4133,8 @@ H5T_cmp(const H5T_t *dt1, const H5T_t *dt2, hbool_t superset) tmp = HDmemcmp(dt1->shared->u.enumer.value+idx1[u]*base_size, dt2->shared->u.enumer.value+idx2[idx]*base_size, base_size); - if (tmp<0) HGOTO_DONE(-1); - if (tmp>0) HGOTO_DONE(1); + if(tmp<0) HGOTO_DONE(-1); + if(tmp>0) HGOTO_DONE(1); } break; @@ -4159,29 +4145,32 @@ H5T_cmp(const H5T_t *dt1, const H5T_t *dt2, hbool_t superset) HDassert(dt2->shared->u.vlen.loc>=H5T_LOC_BADLOC && dt2->shared->u.vlen.locshared->u.vlen.type==H5T_VLEN_SEQUENCE && + if(dt1->shared->u.vlen.type==H5T_VLEN_SEQUENCE && dt2->shared->u.vlen.type==H5T_VLEN_STRING) { HGOTO_DONE(-1); - } else if (dt1->shared->u.vlen.type==H5T_VLEN_STRING && + } + else if(dt1->shared->u.vlen.type==H5T_VLEN_STRING && dt2->shared->u.vlen.type==H5T_VLEN_SEQUENCE) { HGOTO_DONE(1); } /* Arbitrarily sort VL datatypes in memory before disk */ - if (dt1->shared->u.vlen.loc==H5T_LOC_MEMORY && + if(dt1->shared->u.vlen.loc==H5T_LOC_MEMORY && dt2->shared->u.vlen.loc==H5T_LOC_DISK) { HGOTO_DONE(-1); - } else if (dt1->shared->u.vlen.loc==H5T_LOC_DISK && + } + else if(dt1->shared->u.vlen.loc==H5T_LOC_DISK && dt2->shared->u.vlen.loc==H5T_LOC_MEMORY) { HGOTO_DONE(1); - } else if (dt1->shared->u.vlen.loc==H5T_LOC_BADLOC && + } + else if(dt1->shared->u.vlen.loc==H5T_LOC_BADLOC && dt2->shared->u.vlen.loc!=H5T_LOC_BADLOC) { HGOTO_DONE(1); } /* Don't allow VL types in different files to compare as equal */ - if (dt1->shared->u.vlen.f < dt2->shared->u.vlen.f) + if(dt1->shared->u.vlen.f < dt2->shared->u.vlen.f) HGOTO_DONE(-1); - if (dt1->shared->u.vlen.f > dt2->shared->u.vlen.f) + if(dt1->shared->u.vlen.f > dt2->shared->u.vlen.f) HGOTO_DONE(1); break; @@ -4191,22 +4180,22 @@ H5T_cmp(const H5T_t *dt1, const H5T_t *dt2, hbool_t superset) break; case H5T_ARRAY: - if (dt1->shared->u.array.ndims < dt2->shared->u.array.ndims) + if(dt1->shared->u.array.ndims < dt2->shared->u.array.ndims) HGOTO_DONE(-1); - if (dt1->shared->u.array.ndims > dt2->shared->u.array.ndims) + if(dt1->shared->u.array.ndims > dt2->shared->u.array.ndims) HGOTO_DONE(1); - for (u=0; ushared->u.array.ndims; u++) { - if (dt1->shared->u.array.dim[u] < dt2->shared->u.array.dim[u]) + for(u=0; ushared->u.array.ndims; u++) { + if(dt1->shared->u.array.dim[u] < dt2->shared->u.array.dim[u]) HGOTO_DONE(-1); - if (dt1->shared->u.array.dim[u] > dt2->shared->u.array.dim[u]) + if(dt1->shared->u.array.dim[u] > dt2->shared->u.array.dim[u]) HGOTO_DONE(1); } tmp = H5T_cmp(dt1->shared->parent, dt2->shared->parent, superset); - if (tmp < 0) + if(tmp < 0) HGOTO_DONE(-1); - if (tmp > 0) + if(tmp > 0) HGOTO_DONE(1); break; @@ -4222,62 +4211,62 @@ H5T_cmp(const H5T_t *dt1, const H5T_t *dt2, hbool_t superset) /* * Atomic datatypes... */ - if (dt1->shared->u.atomic.order < dt2->shared->u.atomic.order) HGOTO_DONE(-1); - if (dt1->shared->u.atomic.order > dt2->shared->u.atomic.order) HGOTO_DONE(1); + if(dt1->shared->u.atomic.order < dt2->shared->u.atomic.order) HGOTO_DONE(-1); + if(dt1->shared->u.atomic.order > dt2->shared->u.atomic.order) HGOTO_DONE(1); - if (dt1->shared->u.atomic.prec < dt2->shared->u.atomic.prec) HGOTO_DONE(-1); - if (dt1->shared->u.atomic.prec > dt2->shared->u.atomic.prec) HGOTO_DONE(1); + if(dt1->shared->u.atomic.prec < dt2->shared->u.atomic.prec) HGOTO_DONE(-1); + if(dt1->shared->u.atomic.prec > dt2->shared->u.atomic.prec) HGOTO_DONE(1); - if (dt1->shared->u.atomic.offset < dt2->shared->u.atomic.offset) HGOTO_DONE(-1); - if (dt1->shared->u.atomic.offset > dt2->shared->u.atomic.offset) HGOTO_DONE(1); + if(dt1->shared->u.atomic.offset < dt2->shared->u.atomic.offset) HGOTO_DONE(-1); + if(dt1->shared->u.atomic.offset > dt2->shared->u.atomic.offset) HGOTO_DONE(1); - if (dt1->shared->u.atomic.lsb_pad < dt2->shared->u.atomic.lsb_pad) HGOTO_DONE(-1); - if (dt1->shared->u.atomic.lsb_pad > dt2->shared->u.atomic.lsb_pad) HGOTO_DONE(1); + if(dt1->shared->u.atomic.lsb_pad < dt2->shared->u.atomic.lsb_pad) HGOTO_DONE(-1); + if(dt1->shared->u.atomic.lsb_pad > dt2->shared->u.atomic.lsb_pad) HGOTO_DONE(1); - if (dt1->shared->u.atomic.msb_pad < dt2->shared->u.atomic.msb_pad) HGOTO_DONE(-1); - if (dt1->shared->u.atomic.msb_pad > dt2->shared->u.atomic.msb_pad) HGOTO_DONE(1); + if(dt1->shared->u.atomic.msb_pad < dt2->shared->u.atomic.msb_pad) HGOTO_DONE(-1); + if(dt1->shared->u.atomic.msb_pad > dt2->shared->u.atomic.msb_pad) HGOTO_DONE(1); switch (dt1->shared->type) { case H5T_INTEGER: - if (dt1->shared->u.atomic.u.i.sign < dt2->shared->u.atomic.u.i.sign) + if(dt1->shared->u.atomic.u.i.sign < dt2->shared->u.atomic.u.i.sign) HGOTO_DONE(-1); - if (dt1->shared->u.atomic.u.i.sign > dt2->shared->u.atomic.u.i.sign) + if(dt1->shared->u.atomic.u.i.sign > dt2->shared->u.atomic.u.i.sign) HGOTO_DONE(1); break; case H5T_FLOAT: - if (dt1->shared->u.atomic.u.f.sign < dt2->shared->u.atomic.u.f.sign) + if(dt1->shared->u.atomic.u.f.sign < dt2->shared->u.atomic.u.f.sign) HGOTO_DONE(-1); - if (dt1->shared->u.atomic.u.f.sign > dt2->shared->u.atomic.u.f.sign) + if(dt1->shared->u.atomic.u.f.sign > dt2->shared->u.atomic.u.f.sign) HGOTO_DONE(1); - if (dt1->shared->u.atomic.u.f.epos < dt2->shared->u.atomic.u.f.epos) + if(dt1->shared->u.atomic.u.f.epos < dt2->shared->u.atomic.u.f.epos) HGOTO_DONE(-1); - if (dt1->shared->u.atomic.u.f.epos > dt2->shared->u.atomic.u.f.epos) + if(dt1->shared->u.atomic.u.f.epos > dt2->shared->u.atomic.u.f.epos) HGOTO_DONE(1); - if (dt1->shared->u.atomic.u.f.esize < dt2->shared->u.atomic.u.f.esize) HGOTO_DONE(-1); - if (dt1->shared->u.atomic.u.f.esize > dt2->shared->u.atomic.u.f.esize) HGOTO_DONE(1); + if(dt1->shared->u.atomic.u.f.esize < dt2->shared->u.atomic.u.f.esize) HGOTO_DONE(-1); + if(dt1->shared->u.atomic.u.f.esize > dt2->shared->u.atomic.u.f.esize) HGOTO_DONE(1); - if (dt1->shared->u.atomic.u.f.ebias < dt2->shared->u.atomic.u.f.ebias) HGOTO_DONE(-1); - if (dt1->shared->u.atomic.u.f.ebias > dt2->shared->u.atomic.u.f.ebias) HGOTO_DONE(1); + if(dt1->shared->u.atomic.u.f.ebias < dt2->shared->u.atomic.u.f.ebias) HGOTO_DONE(-1); + if(dt1->shared->u.atomic.u.f.ebias > dt2->shared->u.atomic.u.f.ebias) HGOTO_DONE(1); - if (dt1->shared->u.atomic.u.f.mpos < dt2->shared->u.atomic.u.f.mpos) + if(dt1->shared->u.atomic.u.f.mpos < dt2->shared->u.atomic.u.f.mpos) HGOTO_DONE(-1); - if (dt1->shared->u.atomic.u.f.mpos > dt2->shared->u.atomic.u.f.mpos) + if(dt1->shared->u.atomic.u.f.mpos > dt2->shared->u.atomic.u.f.mpos) HGOTO_DONE(1); - if (dt1->shared->u.atomic.u.f.msize < dt2->shared->u.atomic.u.f.msize) HGOTO_DONE(-1); - if (dt1->shared->u.atomic.u.f.msize > dt2->shared->u.atomic.u.f.msize) HGOTO_DONE(1); + if(dt1->shared->u.atomic.u.f.msize < dt2->shared->u.atomic.u.f.msize) HGOTO_DONE(-1); + if(dt1->shared->u.atomic.u.f.msize > dt2->shared->u.atomic.u.f.msize) HGOTO_DONE(1); - if (dt1->shared->u.atomic.u.f.norm < dt2->shared->u.atomic.u.f.norm) + if(dt1->shared->u.atomic.u.f.norm < dt2->shared->u.atomic.u.f.norm) HGOTO_DONE(-1); - if (dt1->shared->u.atomic.u.f.norm > dt2->shared->u.atomic.u.f.norm) + if(dt1->shared->u.atomic.u.f.norm > dt2->shared->u.atomic.u.f.norm) HGOTO_DONE(1); - if (dt1->shared->u.atomic.u.f.pad < dt2->shared->u.atomic.u.f.pad) + if(dt1->shared->u.atomic.u.f.pad < dt2->shared->u.atomic.u.f.pad) HGOTO_DONE(-1); - if (dt1->shared->u.atomic.u.f.pad > dt2->shared->u.atomic.u.f.pad) + if(dt1->shared->u.atomic.u.f.pad > dt2->shared->u.atomic.u.f.pad) HGOTO_DONE(1); break; @@ -4287,14 +4276,14 @@ H5T_cmp(const H5T_t *dt1, const H5T_t *dt2, hbool_t superset) break; case H5T_STRING: - if (dt1->shared->u.atomic.u.s.cset < dt2->shared->u.atomic.u.s.cset) + if(dt1->shared->u.atomic.u.s.cset < dt2->shared->u.atomic.u.s.cset) HGOTO_DONE(-1); - if (dt1->shared->u.atomic.u.s.cset > dt2->shared->u.atomic.u.s.cset) + if(dt1->shared->u.atomic.u.s.cset > dt2->shared->u.atomic.u.s.cset) HGOTO_DONE(1); - if (dt1->shared->u.atomic.u.s.pad < dt2->shared->u.atomic.u.s.pad) + if(dt1->shared->u.atomic.u.s.pad < dt2->shared->u.atomic.u.s.pad) HGOTO_DONE(-1); - if (dt1->shared->u.atomic.u.s.pad > dt2->shared->u.atomic.u.s.pad) + if(dt1->shared->u.atomic.u.s.pad > dt2->shared->u.atomic.u.s.pad) HGOTO_DONE(1); break; @@ -4304,16 +4293,16 @@ H5T_cmp(const H5T_t *dt1, const H5T_t *dt2, hbool_t superset) break; case H5T_REFERENCE: - if (dt1->shared->u.atomic.u.r.rtype < dt2->shared->u.atomic.u.r.rtype) + if(dt1->shared->u.atomic.u.r.rtype < dt2->shared->u.atomic.u.r.rtype) HGOTO_DONE(-1); - if (dt1->shared->u.atomic.u.r.rtype > dt2->shared->u.atomic.u.r.rtype) + if(dt1->shared->u.atomic.u.r.rtype > dt2->shared->u.atomic.u.r.rtype) HGOTO_DONE(1); switch(dt1->shared->u.atomic.u.r.rtype) { case H5R_OBJECT: - if (dt1->shared->u.atomic.u.r.loc < dt2->shared->u.atomic.u.r.loc) + if(dt1->shared->u.atomic.u.r.loc < dt2->shared->u.atomic.u.r.loc) HGOTO_DONE(-1); - if (dt1->shared->u.atomic.u.r.loc > dt2->shared->u.atomic.u.r.loc) + if(dt1->shared->u.atomic.u.r.loc > dt2->shared->u.atomic.u.r.loc) HGOTO_DONE(1); break; @@ -4357,29 +4346,29 @@ done: /*------------------------------------------------------------------------- - * Function: H5T_path_find + * Function: H5T_path_find * - * Purpose: Finds the path which converts type SRC_ID to type DST_ID, - * creating a new path if necessary. If FUNC is non-zero then - * it is set as the hard conversion function for that path - * regardless of whether the path previously existed. Changing - * the conversion function of a path causes statistics to be - * reset to zero after printing them. The NAME is used only - * when creating a new path and is just for debugging. + * Purpose: Finds the path which converts type SRC_ID to type DST_ID, + * creating a new path if necessary. If FUNC is non-zero then + * it is set as the hard conversion function for that path + * regardless of whether the path previously existed. Changing + * the conversion function of a path causes statistics to be + * reset to zero after printing them. The NAME is used only + * when creating a new path and is just for debugging. * - * If SRC and DST are both null pointers then the special no-op - * conversion path is used. This path is always stored as the - * first path in the path table. + * If SRC and DST are both null pointers then the special no-op + * conversion path is used. This path is always stored as the + * first path in the path table. * - * Return: Success: Pointer to the path, valid until the path - * database is modified. + * Return: Success: Pointer to the path, valid until the path + * database is modified. * - * Failure: NULL if the path does not exist and no - * function can be found to apply to the new - * path. + * Failure: NULL if the path does not exist and no + * function can be found to apply to the new + * path. * - * Programmer: Robb Matzke - * Tuesday, January 13, 1998 + * Programmer: Robb Matzke + * Tuesday, January 13, 1998 * * Modifications: * Added a parameter IS_API to indicate whether to an API @@ -4397,16 +4386,16 @@ H5T_path_t * H5T_path_find(const H5T_t *src, const H5T_t *dst, const char *name, H5T_conv_t func, hid_t dxpl_id, hbool_t is_api) { - int lt, rt; /*left and right edges */ - int md; /*middle */ - int cmp; /*comparison result */ - int old_npaths; /* Previous number of paths in table */ - H5T_path_t *table = NULL; /*path existing in the table */ - H5T_path_t *path = NULL; /*new path */ - hid_t src_id = -1, dst_id = -1; /*src and dst type identifiers */ - int i; /*counter */ - int nprint = 0; /*lines of output printed */ - H5T_path_t *ret_value = NULL; /* Return value */ + int lt, rt; /* left and right edges */ + int md; /* middle */ + int cmp; /* comparison result */ + int old_npaths; /* Previous number of paths in table */ + H5T_path_t *table = NULL; /* path existing in the table */ + H5T_path_t *path = NULL; /* new path */ + hid_t src_id = -1, dst_id = -1; /* src and dst type identifiers */ + int i; /* counter */ + int nprint = 0; /* lines of output printed */ + H5T_path_t *ret_value = NULL; /* Return value */ FUNC_ENTER_NOAPI(NULL) @@ -4420,23 +4409,23 @@ H5T_path_find(const H5T_t *src, const H5T_t *dst, const char *name, * Make sure the first entry in the table is the no-op conversion path. */ if(0 == H5T_g.npaths) { - if(NULL == (H5T_g.path = (H5T_path_t **)H5MM_malloc(128 * sizeof(H5T_path_t *)))) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed for type conversion path table") - H5T_g.apaths = 128; - if(NULL == (H5T_g.path[0] = H5FL_CALLOC(H5T_path_t))) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed for no-op conversion path") + if(NULL == (H5T_g.path = (H5T_path_t **)H5MM_malloc(128 * sizeof(H5T_path_t *)))) + HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed for type conversion path table") + H5T_g.apaths = 128; + if(NULL == (H5T_g.path[0] = H5FL_CALLOC(H5T_path_t))) + HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed for no-op conversion path") HDsnprintf(H5T_g.path[0]->name, sizeof(H5T_g.path[0]->name), "no-op"); - H5T_g.path[0]->func = H5T__conv_noop; - H5T_g.path[0]->cdata.command = H5T_CONV_INIT; - if(H5T__conv_noop((hid_t)FAIL, (hid_t)FAIL, &(H5T_g.path[0]->cdata), (size_t)0, (size_t)0, (size_t)0, NULL, NULL, dxpl_id) < 0) { + H5T_g.path[0]->func = H5T__conv_noop; + H5T_g.path[0]->cdata.command = H5T_CONV_INIT; + if(H5T__conv_noop((hid_t)FAIL, (hid_t)FAIL, &(H5T_g.path[0]->cdata), (size_t)0, (size_t)0, (size_t)0, NULL, NULL, dxpl_id) < 0) { #ifdef H5T_DEBUG - if(H5DEBUG(T)) - fprintf(H5DEBUG(T), "H5T: unable to initialize no-op conversion function (ignored)\n"); + if(H5DEBUG(T)) + fprintf(H5DEBUG(T), "H5T: unable to initialize no-op conversion function (ignored)\n"); #endif - H5E_clear_stack(NULL); /*ignore the error*/ - } /* end if */ - H5T_g.path[0]->is_noop = TRUE; - H5T_g.npaths = 1; + H5E_clear_stack(NULL); /*ignore the error*/ + } /* end if */ + H5T_g.path[0]->is_noop = TRUE; + H5T_g.npaths = 1; } /* end if */ /* @@ -4449,28 +4438,28 @@ H5T_path_find(const H5T_t *src, const H5T_t *dst, const char *name, * are set */ if(src->shared->force_conv == FALSE && dst->shared->force_conv == FALSE && 0 == H5T_cmp(src, dst, TRUE)) { - table = H5T_g.path[0]; - cmp = 0; - md = 0; + table = H5T_g.path[0]; + cmp = 0; + md = 0; } /* end if */ else { - lt = md = 1; - rt = H5T_g.npaths; - cmp = -1; - - while(cmp && lt < rt) { - md = (lt + rt) / 2; - HDassert(H5T_g.path[md]); - cmp = H5T_cmp(src, H5T_g.path[md]->src, FALSE); - if(0 == cmp) + lt = md = 1; + rt = H5T_g.npaths; + cmp = -1; + + while(cmp && lt < rt) { + md = (lt + rt) / 2; + HDassert(H5T_g.path[md]); + cmp = H5T_cmp(src, H5T_g.path[md]->src, FALSE); + if(0 == cmp) cmp = H5T_cmp(dst, H5T_g.path[md]->dst, FALSE); - if(cmp < 0) - rt = md; - else if(cmp > 0) - lt = md + 1; - else - table = H5T_g.path[md]; - } /* end while */ + if(cmp < 0) + rt = md; + else if(cmp > 0) + lt = md + 1; + else + table = H5T_g.path[md]; + } /* end while */ } /* end else */ /* Keep a record of the number of paths in the table, in case one of the @@ -4486,21 +4475,21 @@ H5T_path_find(const H5T_t *src, const H5T_t *dst, const char *name, * create a new path and add the new function to the path. */ if(!table || (table && func && is_api) || (table && !table->is_hard && func && !is_api)) { - if(NULL == (path = H5FL_CALLOC(H5T_path_t))) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed for type conversion path") - if(name && *name) { - HDstrncpy(path->name, name, (size_t)H5T_NAMELEN); - path->name[H5T_NAMELEN - 1] = '\0'; + if(NULL == (path = H5FL_CALLOC(H5T_path_t))) + HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed for type conversion path") + if(name && *name) { + HDstrncpy(path->name, name, (size_t)H5T_NAMELEN); + path->name[H5T_NAMELEN - 1] = '\0'; } /* end if */ - else - HDsnprintf(path->name, sizeof(path->name), "NONAME"); - if(NULL == (path->src = H5T_copy(src, H5T_COPY_ALL))) - HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, NULL, "unable to copy datatype for conversion path") + else + HDsnprintf(path->name, sizeof(path->name), "NONAME"); + if(NULL == (path->src = H5T_copy(src, H5T_COPY_ALL))) + HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, NULL, "unable to copy datatype for conversion path") if(NULL == (path->dst = H5T_copy(dst, H5T_COPY_ALL))) - HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, NULL, "unable to copy datatype for conversion path") + HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, NULL, "unable to copy datatype for conversion path") } /* end if */ else - path = table; + path = table; /* * If a hard conversion function is specified and none is defined for the @@ -4509,22 +4498,22 @@ H5T_path_find(const H5T_t *src, const H5T_t *dst, const char *name, * and initialize its conversion data. */ if(func && (!table || (table && is_api) || (table && !table->is_hard && !is_api))) { - HDassert(path != table); - HDassert(NULL == path->func); - if(path->src && (src_id = H5I_register(H5I_DATATYPE, H5T_copy(path->src, H5T_COPY_ALL), FALSE)) < 0) - HGOTO_ERROR(H5E_DATATYPE, H5E_CANTREGISTER, NULL, "unable to register source conversion type for query") - if(path->dst && (dst_id = H5I_register(H5I_DATATYPE, H5T_copy(path->dst, H5T_COPY_ALL), FALSE)) < 0) - HGOTO_ERROR(H5E_DATATYPE, H5E_CANTREGISTER, NULL, "unable to register destination conversion type for query") - path->cdata.command = H5T_CONV_INIT; - if((func)(src_id, dst_id, &(path->cdata), (size_t)0, (size_t)0, (size_t)0, NULL, NULL, dxpl_id) < 0) - HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, NULL, "unable to initialize conversion function") - if(src_id >= 0) + HDassert(path != table); + HDassert(NULL == path->func); + if(path->src && (src_id = H5I_register(H5I_DATATYPE, H5T_copy(path->src, H5T_COPY_ALL), FALSE)) < 0) + HGOTO_ERROR(H5E_DATATYPE, H5E_CANTREGISTER, NULL, "unable to register source conversion type for query") + if(path->dst && (dst_id = H5I_register(H5I_DATATYPE, H5T_copy(path->dst, H5T_COPY_ALL), FALSE)) < 0) + HGOTO_ERROR(H5E_DATATYPE, H5E_CANTREGISTER, NULL, "unable to register destination conversion type for query") + path->cdata.command = H5T_CONV_INIT; + if((func)(src_id, dst_id, &(path->cdata), (size_t)0, (size_t)0, (size_t)0, NULL, NULL, dxpl_id) < 0) + HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, NULL, "unable to initialize conversion function") + if(src_id >= 0) H5I_dec_ref(src_id); - if(dst_id >= 0) + if(dst_id >= 0) H5I_dec_ref(dst_id); - src_id = dst_id = -1; - path->func = func; - path->is_hard = TRUE; + src_id = dst_id = -1; + path->func = func; + path->is_hard = TRUE; } /* end if */ /* @@ -4535,29 +4524,29 @@ H5T_path_find(const H5T_t *src, const H5T_t *dst, const char *name, */ HDassert(path->func || (src && dst)); for(i = H5T_g.nsoft - 1; i >= 0 && !path->func; --i) { - if(src->shared->type != H5T_g.soft[i].src || dst->shared->type != H5T_g.soft[i].dst) - continue; - if((src_id = H5I_register(H5I_DATATYPE, H5T_copy(path->src, H5T_COPY_ALL), FALSE)) < 0) - HGOTO_ERROR(H5E_DATATYPE, H5E_CANTREGISTER, NULL, "unable to register src conversion type for query") - if((dst_id = H5I_register(H5I_DATATYPE, H5T_copy(path->dst, H5T_COPY_ALL), FALSE)) < 0) - HGOTO_ERROR(H5E_DATATYPE, H5E_CANTREGISTER, NULL, "unable to register dst conversion type for query") - path->cdata.command = H5T_CONV_INIT; - if((H5T_g.soft[i].func)(src_id, dst_id, &(path->cdata), (size_t)0, (size_t)0, (size_t)0, NULL, NULL, dxpl_id) < 0) { - HDmemset(&(path->cdata), 0, sizeof(H5T_cdata_t)); - H5E_clear_stack(H5E_DEFAULT); /*ignore the error*/ - } /* end if */ + if(src->shared->type != H5T_g.soft[i].src || dst->shared->type != H5T_g.soft[i].dst) + continue; + if((src_id = H5I_register(H5I_DATATYPE, H5T_copy(path->src, H5T_COPY_ALL), FALSE)) < 0) + HGOTO_ERROR(H5E_DATATYPE, H5E_CANTREGISTER, NULL, "unable to register src conversion type for query") + if((dst_id = H5I_register(H5I_DATATYPE, H5T_copy(path->dst, H5T_COPY_ALL), FALSE)) < 0) + HGOTO_ERROR(H5E_DATATYPE, H5E_CANTREGISTER, NULL, "unable to register dst conversion type for query") + path->cdata.command = H5T_CONV_INIT; + if((H5T_g.soft[i].func)(src_id, dst_id, &(path->cdata), (size_t)0, (size_t)0, (size_t)0, NULL, NULL, dxpl_id) < 0) { + HDmemset(&(path->cdata), 0, sizeof(H5T_cdata_t)); + H5E_clear_stack(H5E_DEFAULT); /*ignore the error*/ + } /* end if */ else { - HDstrncpy(path->name, H5T_g.soft[i].name, (size_t)H5T_NAMELEN); - path->name[H5T_NAMELEN - 1] = '\0'; - path->func = H5T_g.soft[i].func; - path->is_hard = FALSE; - } /* end else */ - H5I_dec_ref(src_id); - H5I_dec_ref(dst_id); - src_id = dst_id = -1; + HDstrncpy(path->name, H5T_g.soft[i].name, (size_t)H5T_NAMELEN); + path->name[H5T_NAMELEN - 1] = '\0'; + path->func = H5T_g.soft[i].func; + path->is_hard = FALSE; + } /* end else */ + H5I_dec_ref(src_id); + H5I_dec_ref(dst_id); + src_id = dst_id = -1; } /* end for */ if(!path->func) - HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, NULL, "no appropriate function for conversion path") + HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, NULL, "no appropriate function for conversion path") /* Check if paths were inserted into the table through a recursive call * and re-compute the correct location for this path if so. - QAK, 1/26/02 @@ -4584,34 +4573,35 @@ H5T_path_find(const H5T_t *src, const H5T_t *dst, const char *name, /* Replace an existing table entry or add a new entry */ if(table && path != table) { - HDassert(table == H5T_g.path[md]); - H5T__print_stats(table, &nprint/*in,out*/); - table->cdata.command = H5T_CONV_FREE; - if((table->func)((hid_t)FAIL, (hid_t)FAIL, &(table->cdata), (size_t)0, (size_t)0, (size_t)0, NULL, NULL, dxpl_id) < 0) { + HDassert(table == H5T_g.path[md]); + H5T__print_stats(table, &nprint/*in,out*/); + table->cdata.command = H5T_CONV_FREE; + if((table->func)((hid_t)FAIL, (hid_t)FAIL, &(table->cdata), (size_t)0, (size_t)0, (size_t)0, NULL, NULL, dxpl_id) < 0) { #ifdef H5T_DEBUG - if(H5DEBUG(T)) { - fprintf(H5DEBUG(T), "H5T: conversion function 0x%08lx free " - "failed for %s (ignored)\n", - (unsigned long)(path->func), path->name); - } /* end if */ + if(H5DEBUG(T)) { + fprintf(H5DEBUG(T), "H5T: conversion function 0x%08lx free " + "failed for %s (ignored)\n", + (unsigned long)(path->func), path->name); + } /* end if */ #endif - H5E_clear_stack(NULL); /*ignore the failure*/ - } /* end if */ - if(table->src) + H5E_clear_stack(NULL); /*ignore the failure*/ + } /* end if */ + if(table->src) H5T_close(table->src); - if(table->dst) + if(table->dst) H5T_close(table->dst); table = H5FL_FREE(H5T_path_t, table); - table = path; - H5T_g.path[md] = path; - } else if(path != table) { - HDassert(cmp); + table = path; + H5T_g.path[md] = path; + } + else if(path != table) { + HDassert(cmp); if((size_t)H5T_g.npaths >= H5T_g.apaths) { size_t na = MAX(128, 2 * H5T_g.apaths); H5T_path_t **x; if(NULL == (x = (H5T_path_t **)H5MM_realloc(H5T_g.path, na * sizeof(H5T_path_t*)))) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed") + HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed") H5T_g.apaths = na; H5T_g.path = x; } /* end if */ @@ -4619,8 +4609,8 @@ H5T_path_find(const H5T_t *src, const H5T_t *dst, const char *name, md++; HDmemmove(H5T_g.path + md + 1, H5T_g.path + md, (size_t) (H5T_g.npaths - md) * sizeof(H5T_path_t*)); H5T_g.npaths++; - H5T_g.path[md] = path; - table = path; + H5T_g.path[md] = path; + table = path; } /* end else-if */ /* Set the flag to indicate both source and destination types are compound types @@ -4633,9 +4623,9 @@ H5T_path_find(const H5T_t *src, const H5T_t *dst, const char *name, done: if(!ret_value && path && path != table) { - if(path->src) + if(path->src) H5T_close(path->src); - if(path->dst) + if(path->dst) H5T_close(path->dst); path = H5FL_FREE(H5T_path_t, path); } /* end if */ @@ -4649,20 +4639,17 @@ done: /*------------------------------------------------------------------------- - * Function: H5T_path_noop - * - * Purpose: Is the path the special no-op path? The no-op function can be - * set by the application and there might be more than one no-op - * path in a multi-threaded application if one thread is using - * the no-op path when some other thread changes its definition. + * Function: H5T_path_noop * - * Return: TRUE/FALSE (can't fail) + * Purpose: Is the path the special no-op path? The no-op function can be + * set by the application and there might be more than one no-op + * path in a multi-threaded application if one thread is using + * the no-op path when some other thread changes its definition. * - * Programmer: Quincey Koziol - * Thursday, May 8, 2003 - * - * Modifications: + * Return: TRUE/FALSE (can't fail) * + * Programmer: Quincey Koziol + * Thursday, May 8, 2003 *------------------------------------------------------------------------- */ hbool_t @@ -4677,12 +4664,12 @@ H5T_path_noop(const H5T_path_t *p) /*------------------------------------------------------------------------- - * Function: H5T_path_compound_subset + * Function: H5T_path_compound_subset * - * Purpose: Checks if the source and destination types are both compound. - * Tells whether whether the source members are a subset of - * destination, and the order is the same, and no conversion - * is needed. For example: + * Purpose: Checks if the source and destination types are both compound. + * Tells whether whether the source members are a subset of + * destination, and the order is the same, and no conversion + * is needed. For example: * struct source { struct destination { * TYPE1 A; --> TYPE1 A; * TYPE2 B; --> TYPE2 B; @@ -4691,11 +4678,11 @@ H5T_path_noop(const H5T_path_t *p) * TYPE5 E; * }; * - * Return: A pointer to the subset info struct in p, or NULL if there are - * no compounds. Points directly into the H5T_path_t structure. + * Return: A pointer to the subset info struct in p, or NULL if there are + * no compounds. Points directly into the H5T_path_t structure. * - * Programmer: Raymond Lu - * 8 June 2007 + * Programmer: Raymond Lu + * 8 June 2007 * * Modifications: Neil Fortner * 19 September 2008 @@ -4721,17 +4708,14 @@ H5T_path_compound_subset(const H5T_path_t *p) /*------------------------------------------------------------------------- - * Function: H5T_path_bkg - * - * Purpose: Get the "background" flag for the conversion path. + * Function: H5T_path_bkg * - * Return: Background flag (can't fail) + * Purpose: Get the "background" flag for the conversion path. * - * Programmer: Quincey Koziol - * Thursday, May 8, 2003 - * - * Modifications: + * Return: Background flag (can't fail) * + * Programmer: Quincey Koziol + * Thursday, May 8, 2003 *------------------------------------------------------------------------- */ H5T_bkg_t @@ -4746,34 +4730,31 @@ H5T_path_bkg(const H5T_path_t *p) /*------------------------------------------------------------------------- - * Function: H5T_compiler_conv + * Function: H5T_compiler_conv * - * Purpose: Private function for H5Tcompiler_conv. Finds out whether the - * library's conversion function from type SRC to type DST - * is a hard conversion. + * Purpose: Private function for H5Tcompiler_conv. Finds out whether the + * library's conversion function from type SRC to type DST + * is a hard conversion. * - * Return: TRUE: hard conversion. - * FALSE: soft conversion. - * FAIL: function failed. - * - * Programmer: Raymond Lu - * Friday, Sept 2, 2005 - * - * Modifications: + * Return: TRUE: hard conversion. + * FALSE: soft conversion. + * FAIL: function failed. * + * Programmer: Raymond Lu + * Friday, Sept 2, 2005 *------------------------------------------------------------------------- */ static htri_t H5T_compiler_conv(H5T_t *src, H5T_t *dst) { - H5T_path_t *path; - htri_t ret_value = FAIL; /* Return value */ + H5T_path_t *path; + htri_t ret_value = FAIL; /* Return value */ FUNC_ENTER_NOAPI_NOINIT /* Find it */ if (NULL==(path=H5T_path_find(src, dst, NULL, NULL, H5AC_noio_dxpl_id, FALSE))) - HGOTO_ERROR(H5E_DATATYPE, H5E_NOTFOUND, FAIL, "conversion function not found") + HGOTO_ERROR(H5E_DATATYPE, H5E_NOTFOUND, FAIL, "conversion function not found") ret_value = (htri_t)path->is_hard; @@ -4783,28 +4764,28 @@ done: /*------------------------------------------------------------------------- - * Function: H5T_convert + * Function: H5T_convert * - * Purpose: Call a conversion function to convert from source to - * destination data type and accumulate timing statistics. + * Purpose: Call a conversion function to convert from source to + * destination data type and accumulate timing statistics. * - * Return: Success: non-negative + * Return: Success: non-negative * - * Failure: negative + * Failure: negative * - * Programmer: Robb Matzke + * Programmer: Robb Matzke * Tuesday, December 15, 1998 * * Modifications: - * Robb Matzke, 1999-06-16 - * The timers are updated only if H5T debugging is enabled at - * runtime in addition to compile time. + * Robb Matzke, 1999-06-16 + * The timers are updated only if H5T debugging is enabled at + * runtime in addition to compile time. * - * Robb Matzke, 1999-06-16 - * Added support for non-zero strides. If BUF_STRIDE is non-zero - * then convert one value at each memory location advancing - * BUF_STRIDE bytes each time; otherwise assume both source and - * destination values are packed. + * Robb Matzke, 1999-06-16 + * Added support for non-zero strides. If BUF_STRIDE is non-zero + * then convert one value at each memory location advancing + * BUF_STRIDE bytes each time; otherwise assume both source and + * destination values are packed. * * Quincey Koziol, 1999-07-01 * Added dataset transfer properties, to allow custom VL @@ -4825,11 +4806,11 @@ done: */ herr_t H5T_convert(H5T_path_t *tpath, hid_t src_id, hid_t dst_id, size_t nelmts, - size_t buf_stride, size_t bkg_stride, void *buf, void *bkg, + size_t buf_stride, size_t bkg_stride, void *buf, void *bkg, hid_t dset_xfer_plist) { #ifdef H5T_DEBUG - H5_timer_t timer; + H5_timer_t timer; #endif herr_t ret_value=SUCCEED; /* Return value */ @@ -4841,12 +4822,12 @@ H5T_convert(H5T_path_t *tpath, hid_t src_id, hid_t dst_id, size_t nelmts, tpath->cdata.command = H5T_CONV_CONV; if ((tpath->func)(src_id, dst_id, &(tpath->cdata), nelmts, buf_stride, bkg_stride, buf, bkg, dset_xfer_plist)<0) - HGOTO_ERROR(H5E_ATTR, H5E_CANTENCODE, FAIL, "data type conversion failed"); + HGOTO_ERROR(H5E_ATTR, H5E_CANTENCODE, FAIL, "data type conversion failed"); #ifdef H5T_DEBUG if (H5DEBUG(T)) { - H5_timer_end(&(tpath->stats.timer), &timer); - tpath->stats.ncalls++; - tpath->stats.nelmts += nelmts; + H5_timer_end(&(tpath->stats.timer), &timer); + tpath->stats.ncalls++; + tpath->stats.nelmts += nelmts; } #endif @@ -4856,14 +4837,14 @@ done: /*------------------------------------------------------------------------- - * Function: H5T_oloc + * Function: H5T_oloc * - * Purpose: Returns a pointer to the object location for a named datatype. + * Purpose: Returns a pointer to the object location for a named datatype. * - * Return: Success: Ptr directly into named datatype - * Failure: NULL + * Return: Success: Ptr directly into named datatype + * Failure: NULL * - * Programmer: Robb Matzke + * Programmer: Robb Matzke * Friday, June 5, 1998 * *------------------------------------------------------------------------- @@ -4897,14 +4878,14 @@ done: /*------------------------------------------------------------------------- - * Function: H5T_nameof + * Function: H5T_nameof * - * Purpose: Returns a pointer to the path for a named datatype. + * Purpose: Returns a pointer to the path for a named datatype. * - * Return: Success: Ptr directly into named datatype - * Failure: NULL + * Return: Success: Ptr directly into named datatype + * Failure: NULL * - * Programmer: Quincey Koziol + * Programmer: Quincey Koziol * Monday, September 12, 2005 * *------------------------------------------------------------------------- @@ -4947,9 +4928,6 @@ done: * * Programmer: Raymond Lu * Friday, Dec 7, 2001 - * - * Modifications: - * *------------------------------------------------------------------------- */ htri_t @@ -4980,9 +4958,6 @@ done: * * Programmer: Pedro Vicente * Tuesday, Sep 3, 2002 - * - * Modifications: - * *------------------------------------------------------------------------- */ htri_t @@ -5005,9 +4980,9 @@ done: * Function: H5T_convert_committed_datatype * * Purpose: To convert the committed datatype "dt" to a transient embedded - * type if the file location associated with the committed datatype is - * different from the parameter "f". - * "f" is the file location where the dataset or attribute will be created. + * type if the file location associated with the committed datatype is + * different from the parameter "f". + * "f" is the file location where the dataset or attribute will be created. * * Notes: See HDFFV-9940 * @@ -5046,25 +5021,17 @@ done: /*-------------------------------------------------------------------------- - NAME - H5T_get_ref_type - PURPOSE - Retrieves the type of reference for a datatype - USAGE - H5R_type_t H5Tget_ref_type(dt) - H5T_t *dt; IN: datatype pointer for the reference datatype - - RETURNS - Success: A reference type defined in H5Rpublic.h - Failure: H5R_BADTYPE - DESCRIPTION - Given a reference datatype object, this function returns the reference type - of the datatype. - GLOBAL VARIABLES - COMMENTS, BUGS, ASSUMPTIONS - EXAMPLES - REVISION LOG ---------------------------------------------------------------------------*/ + * Function: H5T_get_ref_type + * + * Purpose: Retrieves the type of reference for a datatype + * H5T_t *dt; IN: datatype pointer for the reference datatype + * + * Return: Success: A reference type defined in H5Rpublic.h + * Failure: H5R_BADTYPE + * Notes: Given a reference datatype object, this function returns the reference type + * of the datatype. + *-------------------------------------------------------------------------- + */ H5R_type_t H5T_get_ref_type(const H5T_t *dt) { @@ -5083,26 +5050,23 @@ done: /*------------------------------------------------------------------------- - * Function: H5T_is_sensible - * - * Purpose: Determines if a data type is sensible to store on disk - * (i.e. not partially initialized) + * Function: H5T_is_sensible * - * Return: Success: TRUE, FALSE + * Purpose: Determines if a data type is sensible to store on disk + * (i.e. not partially initialized) * - * Failure: Negative + * Return: Success: TRUE, FALSE * - * Programmer: Quincey Koziol - * Tuesday, June 11, 2002 - * - * Modifications: + * Failure: Negative * + * Programmer: Quincey Koziol + * Tuesday, June 11, 2002 *------------------------------------------------------------------------- */ htri_t H5T_is_sensible(const H5T_t *dt) { - htri_t ret_value = FAIL; /* Return value */ + htri_t ret_value = FAIL; /* Return value */ FUNC_ENTER_NOAPI(FAIL) @@ -5166,18 +5130,15 @@ done: DESCRIPTION Recursively descends any VL or compound datatypes to mark all VL datatypes as either on disk or in memory. - GLOBAL VARIABLES - COMMENTS, BUGS, ASSUMPTIONS - EXAMPLES - REVISION LOG ---------------------------------------------------------------------------*/ + -------------------------------------------------------------------------- + */ htri_t H5T_set_loc(H5T_t *dt, H5F_t *f, H5T_loc_t loc) { - htri_t changed; /* Whether H5T_set_loc changed the type (even if the size didn't change) */ - htri_t ret_value = 0; /* Indicate that success, but no location change */ - unsigned i; /* Local index variable */ - size_t old_size; /* Previous size of a field */ + htri_t changed; /* Whether H5T_set_loc changed the type (even if the size didn't change) */ + htri_t ret_value = 0; /* Indicate that success, but no location change */ + unsigned i; /* Local index variable */ + size_t old_size; /* Previous size of a field */ FUNC_ENTER_NOAPI(FAIL) @@ -5211,53 +5172,53 @@ H5T_set_loc(H5T_t *dt, H5F_t *f, H5T_loc_t loc) case H5T_COMPOUND: /* Check each field and recurse on VL, compound and array type */ { - ssize_t accum_change = 0; /* Amount of change in the offset of the fields */ + ssize_t accum_change = 0; /* Amount of change in the offset of the fields */ - /* Sort the fields based on offsets */ - H5T__sort_value(dt, NULL); + /* Sort the fields based on offsets */ + H5T__sort_value(dt, NULL); - for (i=0; ishared->u.compnd.nmembs; i++) { - H5T_t *memb_type; /* Member's datatype pointer */ + for (i = 0; i < dt->shared->u.compnd.nmembs; i++) { + H5T_t *memb_type; /* Member's datatype pointer */ - /* Range check against compound member's offset */ - if ((accum_change < 0) && ((ssize_t) dt->shared->u.compnd.memb[i].offset < accum_change)) - HGOTO_ERROR(H5E_DATATYPE, H5E_BADVALUE, FAIL, "invalid field size in datatype"); + /* Range check against compound member's offset */ + if ((accum_change < 0) && ((ssize_t) dt->shared->u.compnd.memb[i].offset < accum_change)) + HGOTO_ERROR(H5E_DATATYPE, H5E_BADVALUE, FAIL, "invalid field size in datatype"); - /* Apply the accumulated size change to the offset of the field */ - dt->shared->u.compnd.memb[i].offset += (size_t) accum_change; + /* Apply the accumulated size change to the offset of the field */ + dt->shared->u.compnd.memb[i].offset += (size_t) accum_change; - /* Set the member type pointer (for convenience) */ - memb_type=dt->shared->u.compnd.memb[i].type; + /* Set the member type pointer (for convenience) */ + memb_type = dt->shared->u.compnd.memb[i].type; - /* Recurse if it's VL, compound, enum or array */ - /* (If the force_conv flag is _not_ set, the type cannot change in size, so don't recurse) */ - if(memb_type->shared->force_conv && H5T_IS_COMPLEX(memb_type->shared->type)) { - /* Keep the old field size for later */ - old_size=memb_type->shared->size; + /* Recurse if it's VL, compound, enum or array */ + /* (If the force_conv flag is _not_ set, the type cannot change in size, so don't recurse) */ + if(memb_type->shared->force_conv && H5T_IS_COMPLEX(memb_type->shared->type)) { + /* Keep the old field size for later */ + old_size = memb_type->shared->size; - /* Mark the VL, compound, enum or array type */ - if((changed=H5T_set_loc(memb_type,f,loc))<0) - HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "Unable to set VL location"); - if(changed>0) - ret_value=changed; + /* Mark the VL, compound, enum or array type */ + if((changed = H5T_set_loc(memb_type,f,loc)) < 0) + HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "Unable to set VL location"); + if(changed > 0) + ret_value = changed; - /* Check if the field changed size */ - if(old_size != memb_type->shared->size) { - /* Adjust the size of the member */ - dt->shared->u.compnd.memb[i].size = (dt->shared->u.compnd.memb[i].size*memb_type->shared->size)/old_size; + /* Check if the field changed size */ + if(old_size != memb_type->shared->size) { + /* Adjust the size of the member */ + dt->shared->u.compnd.memb[i].size = (dt->shared->u.compnd.memb[i].size*memb_type->shared->size)/old_size; - /* Add that change to the accumulated size change */ - accum_change += (ssize_t) (memb_type->shared->size - old_size); + /* Add that change to the accumulated size change */ + accum_change += (ssize_t) (memb_type->shared->size - old_size); + } /* end if */ } /* end if */ - } /* end if */ - } /* end for */ + } /* end for */ - /* Range check against datatype size */ - if ((accum_change < 0) && ((ssize_t) dt->shared->size < accum_change)) - HGOTO_ERROR(H5E_DATATYPE, H5E_BADVALUE, FAIL, "invalid field size in datatype"); + /* Range check against datatype size */ + if ((accum_change < 0) && ((ssize_t) dt->shared->size < accum_change)) + HGOTO_ERROR(H5E_DATATYPE, H5E_BADVALUE, FAIL, "invalid field size in datatype"); - /* Apply the accumulated size change to the datatype */ - dt->shared->size += (size_t) accum_change; + /* Apply the accumulated size change to the datatype */ + dt->shared->size += (size_t) accum_change; } break; @@ -5265,29 +5226,29 @@ H5T_set_loc(H5T_t *dt, H5F_t *f, H5T_loc_t loc) /* Recurse if it's VL, compound, enum or array */ /* (If the force_conv flag is _not_ set, the type cannot change in size, so don't recurse) */ if(dt->shared->parent->shared->force_conv && H5T_IS_COMPLEX(dt->shared->parent->shared->type)) { - if((changed=H5T_set_loc(dt->shared->parent,f,loc))<0) + if((changed = H5T_set_loc(dt->shared->parent,f,loc)) < 0) HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "Unable to set VL location"); - if(changed>0) - ret_value=changed; + if(changed > 0) + ret_value = changed; } /* end if */ /* Mark this VL sequence */ if((changed = H5T__vlen_set_loc(dt, f, loc)) < 0) HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "Unable to set VL location"); - if(changed>0) - ret_value=changed; + if(changed > 0) + ret_value = changed; break; case H5T_REFERENCE: /* Only need to change location of object references */ - if(dt->shared->u.atomic.u.r.rtype==H5R_OBJECT) { + if(dt->shared->u.atomic.u.r.rtype == H5R_OBJECT) { /* Mark this reference */ - if(loc!=dt->shared->u.atomic.u.r.loc) { + if(loc != dt->shared->u.atomic.u.r.loc) { /* Set the location */ dt->shared->u.atomic.u.r.loc = loc; /* Indicate that the location changed */ - ret_value=TRUE; + ret_value = TRUE; } /* end if */ } /* end if */ break; @@ -5356,11 +5317,11 @@ done: * Purpose: H5T__visit callback to Upgrade the version of a datatype * (if there's any benefit to doing so) * - * Note: The behavior below is tightly coupled with the "better" + * Note: The behavior below is tightly coupled with the "better" * encodings for datatype messages in the datatype message * encoding routine. * - * Return: Non-negative on success/Negative on failure + * Return: Non-negative on success/Negative on failure * * Programmer: Quincey Koziol * Thursday, July 19, 2007 @@ -5415,7 +5376,7 @@ H5T_upgrade_version_cb(H5T_t *dt, void *op_value) * doing so) and recursively apply to compound members and/or * parent datatypes. * - * Return: Non-negative on success/Negative on failure + * Return: Non-negative on success/Negative on failure * * Programmer: Quincey Koziol * Thursday, July 19, 2007 @@ -5446,7 +5407,7 @@ done: * * Purpose: Set the encoding for a datatype to the latest version. * - * Return: Non-negative on success/Negative on failure + * Return: Non-negative on success/Negative on failure * * Programmer: Quincey Koziol * Thursday, July 19, 2007 @@ -5557,7 +5518,7 @@ H5Tflush(hid_t type_id) FUNC_ENTER_API(FAIL) H5TRACE1("e", "i", type_id); - + /* Check args */ if(NULL == (dt = (H5T_t *)H5I_object_verify(type_id, H5I_DATATYPE))) HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a datatype") @@ -5590,7 +5551,7 @@ H5Trefresh(hid_t type_id) { H5T_t * dt = NULL; herr_t ret_value = SUCCEED; /* return value */ - + FUNC_ENTER_API(FAIL) H5TRACE1("e", "i", type_id); diff --git a/tools/lib/h5diff_attr.c b/tools/lib/h5diff_attr.c index 5642a9b..b7448db 100644 --- a/tools/lib/h5diff_attr.c +++ b/tools/lib/h5diff_attr.c @@ -91,7 +91,7 @@ static void table_attrs_free( table_attrs_t *table ) /*------------------------------------------------------------------------- * Function: table_attr_mark_exist * - * Purpose: mark given attribute name to table as sign of exsit + * Purpose: mark given attribute name to table as sign of exist * * Parameter: * - exist [IN] @@ -322,8 +322,8 @@ hsize_t diff_attr(hid_t loc1_id, hid_t space2_id=-1; /* space ID */ hid_t ftype1_id=-1; /* file data type ID */ hid_t ftype2_id=-1; /* file data type ID */ - int vstrtype1=0; /* ftype1 is a variable string */ - int vstrtype2=0; /* ftype2 is a variable string */ + int vstrtype1=0; /* ftype1 is a variable string */ + int vstrtype2=0; /* ftype2 is a variable string */ hid_t mtype1_id=-1; /* memory data type ID */ hid_t mtype2_id=-1; /* memory data type ID */ size_t msize1; /* memory size of memory type */ @@ -346,7 +346,7 @@ hsize_t diff_attr(hid_t loc1_id, hsize_t nfound_total = 0; int j; - table_attrs_t * match_list_attrs = NULL; + table_attrs_t *match_list_attrs = NULL; if(build_match_list_attrs(loc1_id, loc2_id, &match_list_attrs, options) < 0) goto error; @@ -395,9 +395,9 @@ hsize_t diff_attr(hid_t loc1_id, continue; } - if((mtype1_id = h5tools_get_native_type(ftype1_id)) < 0) + if((mtype1_id = H5Tget_native_type(ftype1_id, H5T_DIR_DEFAULT)) < 0) goto error; - if((mtype2_id = h5tools_get_native_type(ftype2_id)) < 0) + if((mtype2_id = H5Tget_native_type(ftype2_id, H5T_DIR_DEFAULT)) < 0) goto error; if((msize1 = H5Tget_size(mtype1_id)) == 0) goto error; diff --git a/tools/lib/h5diff_util.c b/tools/lib/h5diff_util.c index 7d6580c..454f993 100644 --- a/tools/lib/h5diff_util.c +++ b/tools/lib/h5diff_util.c @@ -33,19 +33,14 @@ print_dimensions (int rank, hsize_t *dims) { int i; - if ( rank <= 0 ) - { + if( rank <= 0 ) parallel_print("H5S_SCALAR" ); - } - else - { + else { if (!dims) parallel_print("dimension is NULL"); - else - { + else { parallel_print("["); - for ( i = 0; i < rank-1; i++) - { + for ( i = 0; i < rank-1; i++) { parallel_print(HSIZE_T_FORMAT, dims[i]); parallel_print("x"); } @@ -74,91 +69,108 @@ print_dimensions (int rank, hsize_t *dims) */ void print_type(hid_t type) { - switch (H5Tget_class(type)) - { + switch (H5Tget_class(type)) { case H5T_INTEGER: - if (H5Tequal(type, H5T_STD_I8BE)) { + if(H5Tequal(type, H5T_STD_I8BE)) parallel_print("H5T_STD_I8BE"); - } else if (H5Tequal(type, H5T_STD_I8LE)) { + else if(H5Tequal(type, H5T_STD_I8LE)) parallel_print("H5T_STD_I8LE"); - } else if (H5Tequal(type, H5T_STD_I16BE)) { + else if(H5Tequal(type, H5T_STD_I16BE)) parallel_print("H5T_STD_I16BE"); - } else if (H5Tequal(type, H5T_STD_I16LE)) { + else if(H5Tequal(type, H5T_STD_I16LE)) parallel_print("H5T_STD_I16LE"); - } else if (H5Tequal(type, H5T_STD_I32BE)) { + else if(H5Tequal(type, H5T_STD_I32BE)) parallel_print("H5T_STD_I32BE"); - } else if (H5Tequal(type, H5T_STD_I32LE)) { + else if(H5Tequal(type, H5T_STD_I32LE)) parallel_print("H5T_STD_I32LE"); - } else if (H5Tequal(type, H5T_STD_I64BE)) { + else if(H5Tequal(type, H5T_STD_I64BE)) parallel_print("H5T_STD_I64BE"); - } else if (H5Tequal(type, H5T_STD_I64LE)) { + else if(H5Tequal(type, H5T_STD_I64LE)) parallel_print("H5T_STD_I64LE"); - } else if (H5Tequal(type, H5T_STD_U8BE)) { + else if(H5Tequal(type, H5T_STD_U8BE)) parallel_print("H5T_STD_U8BE"); - } else if (H5Tequal(type, H5T_STD_U8LE)) { + else if(H5Tequal(type, H5T_STD_U8LE)) parallel_print("H5T_STD_U8LE"); - } else if (H5Tequal(type, H5T_STD_U16BE)) { + else if(H5Tequal(type, H5T_STD_U16BE)) parallel_print("H5T_STD_U16BE"); - } else if (H5Tequal(type, H5T_STD_U16LE)) { + else if(H5Tequal(type, H5T_STD_U16LE)) parallel_print("H5T_STD_U16LE"); - } else if (H5Tequal(type, H5T_STD_U32BE)) { + else if(H5Tequal(type, H5T_STD_U32BE)) parallel_print("H5T_STD_U32BE"); - } else if (H5Tequal(type, H5T_STD_U32LE)) { + else if(H5Tequal(type, H5T_STD_U32LE)) parallel_print("H5T_STD_U32LE"); - } else if (H5Tequal(type, H5T_STD_U64BE)) { + else if(H5Tequal(type, H5T_STD_U64BE)) parallel_print("H5T_STD_U64BE"); - } else if (H5Tequal(type, H5T_STD_U64LE)) { + else if(H5Tequal(type, H5T_STD_U64LE)) parallel_print("H5T_STD_U64LE"); - } else if (H5Tequal(type, H5T_NATIVE_SCHAR)) { + else if(H5Tequal(type, H5T_NATIVE_SCHAR)) parallel_print("H5T_NATIVE_SCHAR"); - } else if (H5Tequal(type, H5T_NATIVE_UCHAR)) { + else if(H5Tequal(type, H5T_NATIVE_UCHAR)) parallel_print("H5T_NATIVE_UCHAR"); - } else if (H5Tequal(type, H5T_NATIVE_SHORT)) { + else if(H5Tequal(type, H5T_NATIVE_SHORT)) parallel_print("H5T_NATIVE_SHORT"); - } else if (H5Tequal(type, H5T_NATIVE_USHORT)) { + else if(H5Tequal(type, H5T_NATIVE_USHORT)) parallel_print("H5T_NATIVE_USHORT"); - } else if (H5Tequal(type, H5T_NATIVE_INT)) { + else if(H5Tequal(type, H5T_NATIVE_INT)) parallel_print("H5T_NATIVE_INT"); - } else if (H5Tequal(type, H5T_NATIVE_UINT)) { + else if(H5Tequal(type, H5T_NATIVE_UINT)) parallel_print("H5T_NATIVE_UINT"); - } else if (H5Tequal(type, H5T_NATIVE_LONG)) { + else if(H5Tequal(type, H5T_NATIVE_LONG)) parallel_print("H5T_NATIVE_LONG"); - } else if (H5Tequal(type, H5T_NATIVE_ULONG)) { + else if(H5Tequal(type, H5T_NATIVE_ULONG)) parallel_print("H5T_NATIVE_ULONG"); - } else if (H5Tequal(type, H5T_NATIVE_LLONG)) { + else if(H5Tequal(type, H5T_NATIVE_LLONG)) parallel_print("H5T_NATIVE_LLONG"); - } else if (H5Tequal(type, H5T_NATIVE_ULLONG)) { + else if(H5Tequal(type, H5T_NATIVE_ULLONG)) parallel_print("H5T_NATIVE_ULLONG"); - } else { + else parallel_print("undefined integer"); - } break; case H5T_FLOAT: - if (H5Tequal(type, H5T_IEEE_F32BE)) { + if(H5Tequal(type, H5T_IEEE_F32BE)) parallel_print("H5T_IEEE_F32BE"); - } else if (H5Tequal(type, H5T_IEEE_F32LE)) { + else if(H5Tequal(type, H5T_IEEE_F32LE)) parallel_print("H5T_IEEE_F32LE"); - } else if (H5Tequal(type, H5T_IEEE_F64BE)) { + else if(H5Tequal(type, H5T_IEEE_F64BE)) parallel_print("H5T_IEEE_F64BE"); - } else if (H5Tequal(type, H5T_IEEE_F64LE)) { + else if(H5Tequal(type, H5T_IEEE_F64LE)) parallel_print("H5T_IEEE_F64LE"); - } else if (H5Tequal(type, H5T_NATIVE_FLOAT)) { + else if(H5Tequal(type, H5T_NATIVE_FLOAT)) parallel_print("H5T_NATIVE_FLOAT"); - } else if (H5Tequal(type, H5T_NATIVE_DOUBLE)) { + else if(H5Tequal(type, H5T_NATIVE_DOUBLE)) parallel_print("H5T_NATIVE_DOUBLE"); #if H5_SIZEOF_LONG_DOUBLE !=0 - } else if (H5Tequal(type, H5T_NATIVE_LDOUBLE)) { + else if(H5Tequal(type, H5T_NATIVE_LDOUBLE)) parallel_print("H5T_NATIVE_LDOUBLE"); #endif - } else { + else parallel_print("undefined float"); - } + break; + + case H5T_BITFIELD: + if(H5Tequal(type, H5T_STD_B8BE)) + parallel_print("H5T_STD_B8BE"); + else if(H5Tequal(type, H5T_STD_B8LE)) + parallel_print("H5T_STD_B8LE"); + else if(H5Tequal(type, H5T_STD_B16BE)) + parallel_print("H5T_STD_B16BE"); + else if(H5Tequal(type, H5T_STD_B16LE)) + parallel_print("H5T_STD_B16LE"); + else if(H5Tequal(type, H5T_STD_B32BE)) + parallel_print("H5T_STD_B32BE"); + else if(H5Tequal(type, H5T_STD_B32LE)) + parallel_print("H5T_STD_B32LE"); + else if(H5Tequal(type, H5T_STD_B64BE)) + parallel_print("H5T_STD_B64BE"); + else if(H5Tequal(type, H5T_STD_B64LE)) + parallel_print("H5T_STD_B64LE"); + else + parallel_print("undefined bitfield"); break; case H5T_TIME: case H5T_STRING: - case H5T_BITFIELD: case H5T_OPAQUE: case H5T_COMPOUND: case H5T_REFERENCE: @@ -189,16 +201,16 @@ diff_basename(const char *name) { size_t i; - if (name == NULL) + if(name == NULL) return NULL; /* Find the end of the base name */ i = HDstrlen(name); - while (i > 0 && '/' == name[i - 1]) + while(i > 0 && '/' == name[i - 1]) --i; /* Skip backward over base name */ - while (i > 0 && '/' != name[i - 1]) + while(i > 0 && '/' != name[i - 1]) --i; return(name+i); @@ -256,7 +268,7 @@ get_type(h5trav_type_t type) H5_ATTR_PURE const char* get_sign(H5T_sign_t sign) { - switch (sign) + switch(sign) { case H5T_SGN_NONE: return "H5T_SGN_NONE"; @@ -291,7 +303,7 @@ get_sign(H5T_sign_t sign) H5_ATTR_PURE const char* get_class(H5T_class_t tclass) { - switch (tclass) { + switch(tclass) { case H5T_TIME: return("H5T_TIME"); @@ -351,24 +363,21 @@ void print_found(hsize_t nfound) /*----------------------------------------------------------------- * Function: match_up_memsize - * + * * Purpose: match smaller memory size up to bigger memory size *------------------------------------------------------------------ */ herr_t match_up_memsize (hid_t f_tid1_id, hid_t f_tid2_id, - hid_t *m_tid1, hid_t *m_tid2, + hid_t *m_tid1, hid_t *m_tid2, size_t *m_size1, size_t *m_size2) { herr_t ret = SUCCEED; - if( (*m_size1) != (*m_size2) ) - { - if( (*m_size1) < (*m_size2) ) - { + if((*m_size1) != (*m_size2)) { + if((*m_size1) < (*m_size2)) { H5Tclose( *m_tid1 ); - if(( (*m_tid1) = h5tools_get_native_type(f_tid2_id)) < 0) - { + if(((*m_tid1) = H5Tget_native_type(f_tid2_id, H5T_DIR_DEFAULT)) < 0) { ret = FAIL; goto out; } @@ -378,8 +387,7 @@ herr_t match_up_memsize (hid_t f_tid1_id, hid_t f_tid2_id, else { H5Tclose(*m_tid2); - if(( (*m_tid2) = h5tools_get_native_type(f_tid1_id)) < 0) - { + if(((*m_tid2) = H5Tget_native_type(f_tid1_id, H5T_DIR_DEFAULT)) < 0) { ret = FAIL; goto out; } @@ -387,7 +395,7 @@ herr_t match_up_memsize (hid_t f_tid1_id, hid_t f_tid2_id, *m_size2 = H5Tget_size(*m_tid2); } /* end else */ } /* end if */ - HDassert( (*m_size1) == (*m_size2) ); + HDassert((*m_size1) == (*m_size2)); out: return ret; diff --git a/tools/lib/h5tools.c b/tools/lib/h5tools.c index 62b05d9..22fd863 100644 --- a/tools/lib/h5tools.c +++ b/tools/lib/h5tools.c @@ -281,16 +281,16 @@ h5tools_set_attr_output_file(const char *fname, int is_bin) if (fname != NULL) { /* binary output */ if (is_bin) { - if ((f = HDfopen(fname, "wb")) != NULL) { - rawattrstream = f; - retvalue = SUCCEED; - } + if ((f = HDfopen(fname, "wb")) != NULL) { + rawattrstream = f; + retvalue = SUCCEED; + } } else { - if ((f = HDfopen(fname, "w")) != NULL) { - rawattrstream = f; - retvalue = SUCCEED; - } + if ((f = HDfopen(fname, "w")) != NULL) { + rawattrstream = f; + retvalue = SUCCEED; + } } } else { @@ -323,26 +323,26 @@ h5tools_set_input_file(const char *fname, int is_bin) if (HDfclose(rawinstream)) HDperror("closing rawinstream"); else - rawinstream = NULL; + rawinstream = NULL; } /* First check if filename is string "NULL" */ if (fname != NULL) { /* binary output */ if (is_bin) { - if ((f = HDfopen(fname, "rb")) != NULL) { - rawinstream = f; - retvalue = SUCCEED; - } + if ((f = HDfopen(fname, "rb")) != NULL) { + rawinstream = f; + retvalue = SUCCEED; + } } else { - if ((f = HDfopen(fname, "r")) != NULL) { - rawinstream = f; - retvalue = SUCCEED; - } + if ((f = HDfopen(fname, "r")) != NULL) { + rawinstream = f; + retvalue = SUCCEED; + } } } else { - rawinstream = NULL; + rawinstream = NULL; retvalue = SUCCEED; } @@ -377,16 +377,16 @@ h5tools_set_output_file(const char *fname, int is_bin) if (fname != NULL) { /* binary output */ if (is_bin) { - if ((f = HDfopen(fname, "wb")) != NULL) { - rawoutstream = f; - retvalue = SUCCEED; - } + if ((f = HDfopen(fname, "wb")) != NULL) { + rawoutstream = f; + retvalue = SUCCEED; + } } else { - if ((f = HDfopen(fname, "w")) != NULL) { - rawoutstream = f; - retvalue = SUCCEED; - } + if ((f = HDfopen(fname, "w")) != NULL) { + rawoutstream = f; + retvalue = SUCCEED; + } } } else { @@ -425,21 +425,21 @@ h5tools_set_error_file(const char *fname, int is_bin) /* First check if filename is string "NULL" */ if (fname != NULL) { /* binary output */ - if (is_bin) { - if ((f = HDfopen(fname, "wb")) != NULL) { - rawerrorstream = f; - retvalue = SUCCEED; - } + if (is_bin) { + if ((f = HDfopen(fname, "wb")) != NULL) { + rawerrorstream = f; + retvalue = SUCCEED; + } } else { - if ((f = HDfopen(fname, "w")) != NULL) { - rawerrorstream = f; - retvalue = SUCCEED; - } - } + if ((f = HDfopen(fname, "w")) != NULL) { + rawerrorstream = f; + retvalue = SUCCEED; + } + } } else { - rawerrorstream = NULL; + rawerrorstream = NULL; retvalue = SUCCEED; } @@ -1326,6 +1326,7 @@ render_bin_output(FILE *stream, hid_t container, hid_t tid, void *_mem, hsize_t case H5T_INTEGER: case H5T_FLOAT: case H5T_ENUM: + case H5T_BITFIELD: block_index = block_nelmts * size; while(block_index > 0) { size_t bytes_in = 0; /* # of bytes to write */ @@ -1492,7 +1493,6 @@ render_bin_output(FILE *stream, hid_t container, hid_t tid, void *_mem, hsize_t break; case H5T_TIME: - case H5T_BITFIELD: case H5T_OPAQUE: for (block_index = 0; block_index < block_nelmts; block_index++) { mem = ((unsigned char*)_mem) + block_index * size; diff --git a/tools/lib/h5tools.h b/tools/lib/h5tools.h index bf8e673..3d38dd0 100644 --- a/tools/lib/h5tools.h +++ b/tools/lib/h5tools.h @@ -590,7 +590,6 @@ H5TOOLS_DLL int h5tools_set_output_file(const char *fname, int is_bin); H5TOOLS_DLL int h5tools_set_error_file(const char *fname, int is_bin); H5TOOLS_DLL hid_t h5tools_fopen(const char *fname, unsigned flags, hid_t fapl, const char *driver, char *drivername, size_t drivername_len); -H5TOOLS_DLL hid_t h5tools_get_native_type(hid_t type); H5TOOLS_DLL hid_t h5tools_get_little_endian_type(hid_t type); H5TOOLS_DLL hid_t h5tools_get_big_endian_type(hid_t type); H5TOOLS_DLL htri_t h5tools_detect_vlen(hid_t tid); diff --git a/tools/lib/h5tools_dump.c b/tools/lib/h5tools_dump.c index 381a253..1a57512 100644 --- a/tools/lib/h5tools_dump.c +++ b/tools/lib/h5tools_dump.c @@ -1795,7 +1795,7 @@ h5tools_dump_dset(FILE *stream, const h5tool_format_t *info, h5tools_context_t * else if (bin_form == 3) p_type = h5tools_get_big_endian_type(f_type); else - p_type = h5tools_get_native_type(f_type); + p_type = H5Tget_native_type(f_type, H5T_DIR_DEFAULT); if (p_type < 0) goto done; @@ -2957,7 +2957,7 @@ h5tools_print_fill_value(h5tools_str_t *buffer/*in,out*/, const h5tool_format_t hid_t n_type; void *buf = NULL; - n_type = h5tools_get_native_type(type_id); + n_type = H5Tget_native_type(type_id, H5T_DIR_DEFAULT); size = H5Tget_size(n_type); buf = HDmalloc(size); @@ -3785,7 +3785,7 @@ void h5tools_print_packed_bits(h5tools_str_t *buffer, hid_t type) { unsigned packed_bits_size = 0; - hid_t n_type = h5tools_get_native_type(type); + hid_t n_type = H5Tget_native_type(type, H5T_DIR_DEFAULT); if(H5Tget_class(n_type) == H5T_INTEGER) { if(H5Tequal(n_type, H5T_NATIVE_SCHAR) == TRUE) @@ -4043,7 +4043,7 @@ h5tools_dump_data(FILE *stream, const h5tool_format_t *info, unsigned int vl_data = 0; /* contains VL datatypes */ type = H5Aget_type(obj_id); - p_type = h5tools_get_native_type(type); + p_type = H5Tget_native_type(type, H5T_DIR_DEFAULT); ndims = H5Sget_simple_extent_dims(space, size, NULL); diff --git a/tools/lib/h5tools_str.c b/tools/lib/h5tools_str.c index 88f6cc5..b7a2c1e 100644 --- a/tools/lib/h5tools_str.c +++ b/tools/lib/h5tools_str.c @@ -23,24 +23,24 @@ #include #include "H5private.h" -#include "h5tools.h" /*for h5tool_format_t structure */ +#include "h5tools.h" /* for h5tool_format_t structure */ #include "h5tools_ref.h" -#include "h5tools_str.h" /*function prototypes */ +#include "h5tools_str.h" /* function prototypes */ /* Copied from hl/src/H5LDprivate.h */ /* Info about the list of comma-separated compound fields */ typedef struct H5LD_memb_t { - size_t tot_offset; - size_t last_tsize; - hid_t last_tid; - char **names; + size_t tot_offset; + size_t last_tsize; + hid_t last_tid; + char **names; } H5LD_memb_t; /* * If REPEAT_VERBOSE is defined then character strings will be printed so * that repeated character sequences like "AAAAAAAAAA" are displayed as * - * 'A' repeates 9 times + * 'A' repeats 9 times * * Otherwise the format is more Perl-like * @@ -61,15 +61,12 @@ void h5tools_str_indent(h5tools_str_t *str, const h5tool_format_t *in * Function: h5tools_str_close * * Purpose: Closes a string by releasing it's memory and setting the size - * information to zero. + * information to zero. * * Return: void * * Programmer: Robb Matzke * Monday, April 26, 1999 - * - * Modifications: - * *------------------------------------------------------------------------- */ void @@ -85,17 +82,14 @@ h5tools_str_close(h5tools_str_t *str) * Function: h5tools_str_len * * Purpose: Returns the length of the string, not counting the null - * terminator. + * terminator. * * Return: Success: Length of string * - * Failure: 0 + * Failure: 0 * * Programmer: Robb Matzke * Monday, April 26, 1999 - * - * Modifications: - * *------------------------------------------------------------------------- */ H5_ATTR_PURE size_t @@ -108,43 +102,34 @@ h5tools_str_len(h5tools_str_t *str) * Function: h5tools_str_append * * Purpose: Formats variable arguments according to printf() format - * string and appends the result to variable length string STR. + * string and appends the result to variable length string STR. * * Return: Success: Pointer to buffer containing result. * - * Failure: NULL + * Failure: NULL * * Programmer: Robb Matzke * Monday, April 26, 1999 - * - * Modifications: - * - * Major change: need to check results of vsnprintf to - * handle errors, empty format, and overflows. - * - * Programmer: REMcG Matzke - * June 16, 2004 - * *------------------------------------------------------------------------- */ char * h5tools_str_append(h5tools_str_t *str/*in,out*/, const char *fmt, ...) { - va_list ap; + va_list ap; /* Make sure we have some memory into which to print */ - if (!str->s || str->nalloc <= 0) + if(!str->s || str->nalloc <= 0) h5tools_str_reset(str); - if (HDstrlen(fmt) == 0) + if(HDstrlen(fmt) == 0) /* nothing to print */ return str->s; /* Format the arguments and append to the value already in `str' */ - while (1) { + while(1) { /* How many bytes available for new value, counting the new NUL */ + int nchars = -1; size_t avail = str->nalloc - str->len; - int nchars = -1; HDva_start(ap, fmt); nchars = HDvsnprintf(str->s + str->len, avail, fmt, ap); @@ -161,11 +146,11 @@ h5tools_str_append(h5tools_str_t *str/*in,out*/, const char *fmt, ...) * to lack of buffer size, so try one more time after realloc more * buffer size before return NULL. */ - if (nchars < 0) + if(nchars < 0) /* failure, such as bad format */ return NULL; - if ((size_t) nchars >= avail || (0 == nchars && (HDstrcmp(fmt, "%s")))) { + if((size_t) nchars >= avail || (0 == nchars && (HDstrcmp(fmt, "%s")))) { /* Truncation return value as documented by C99, or zero return value with either of the * following conditions, each of which indicates that the proper C99 return value probably * should have been positive when the format string is @@ -191,24 +176,21 @@ h5tools_str_append(h5tools_str_t *str/*in,out*/, const char *fmt, ...) * Function: h5tools_str_reset * * Purpose: Reset the string to the empty value. If no memory is - * allocated yet then initialize the h5tools_str_t struct. + * allocated yet then initialize the h5tools_str_t struct. * * Return: Success: Ptr to the buffer which contains a null - * character as the first element. + * character as the first element. * - * Failure: NULL + * Failure: NULL * * Programmer: Robb Matzke * Monday, April 26, 1999 - * - * Modifications: - * *------------------------------------------------------------------------- */ char * h5tools_str_reset(h5tools_str_t *str/*in,out*/) { - if (!str->s || str->nalloc <= 0) { + if(!str->s || str->nalloc <= 0) { str->nalloc = STR_INIT_LEN; str->s = (char*)HDmalloc(str->nalloc); HDassert(str->s); @@ -226,19 +208,16 @@ h5tools_str_reset(h5tools_str_t *str/*in,out*/) * * Return: Success: Pointer to the string * - * Failure: NULL + * Failure: NULL * * Programmer: Robb Matzke * Monday, April 26, 1999 - * - * Modifications: - * *------------------------------------------------------------------------- */ char * h5tools_str_trunc(h5tools_str_t *str/*in,out*/, size_t size) { - if (size < str->len) { + if(size < str->len) { str->len = size; str->s[size] = '\0'; } @@ -250,41 +229,38 @@ h5tools_str_trunc(h5tools_str_t *str/*in,out*/, size_t size) * Function: h5tools_str_fmt * * Purpose: Reformat a string contents beginning at character START - * according to printf format FMT. FMT should contain no format - * specifiers except possibly the `%s' variety. For example, if - * the input string is `hello' and the format is "<<%s>>" then - * the output value will be "<>". + * according to printf format FMT. FMT should contain no format + * specifiers except possibly the `%s' variety. For example, if + * the input string is `hello' and the format is "<<%s>>" then + * the output value will be "<>". * * Return: Success: A pointer to the resulting string. * - * Failure: NULL + * Failure: NULL * * Programmer: Robb Matzke * Monday, April 26, 1999 - * - * Modifications: - * *------------------------------------------------------------------------- */ char * h5tools_str_fmt(h5tools_str_t *str/*in,out*/, size_t start, const char *fmt) { - char _temp[1024], *temp = _temp; + char _temp[1024], *temp = _temp; HDassert(str); HDassert(fmt); /* If the format string is simply "%s" then don't bother doing anything */ - if (!HDstrcmp(fmt, "%s")) + if(!HDstrcmp(fmt, "%s")) return str->s; /* * Save the input value if there is a `%' anywhere in FMT. Otherwise * don't bother because we don't need a temporary copy. */ - if (HDstrchr(fmt, '%')) { + if(HDstrchr(fmt, '%')) { size_t n = sizeof(_temp); - if (str->len - start + 1 > n) { + if(str->len - start + 1 > n) { n = str->len - start + 1; temp = (char*)HDmalloc(n); HDassert(temp); @@ -298,7 +274,7 @@ h5tools_str_fmt(h5tools_str_t *str/*in,out*/, size_t start, const char *fmt) h5tools_str_append(str, fmt, temp); /* Free the temp buffer if we allocated one */ - if (temp != _temp) + if(temp != _temp) HDfree(temp); return str->s; @@ -311,37 +287,34 @@ h5tools_str_fmt(h5tools_str_t *str/*in,out*/, size_t start, const char *fmt) * * Return: Success: Pointer to the prefix. * - * Failure: NULL + * Failure: NULL * * Programmer: Robb Matzke * Thursday, July 23, 1998 - * - * Modifications: - * *------------------------------------------------------------------------- */ char * h5tools_str_prefix(h5tools_str_t *str/*in,out*/, const h5tool_format_t *info, hsize_t elmtno, unsigned ndims, h5tools_context_t *ctx) { - size_t i = 0; - hsize_t curr_pos = elmtno; + size_t i = 0; + hsize_t curr_pos = elmtno; h5tools_str_reset(str); - if (ndims > 0) { + if(ndims > 0) { /* * Calculate the number of elements represented by a unit change in a * certain index position. */ - for (i = 0; i < (size_t) ndims; i++) { + for(i = 0; i < (size_t) ndims; i++) { ctx->pos[i] = curr_pos / ctx->acc[i]; curr_pos -= ctx->acc[i] * ctx->pos[i]; } HDassert(curr_pos == 0); /* Print the index values */ - for (i = 0; i < (size_t) ndims; i++) { + for(i = 0; i < (size_t) ndims; i++) { if (i) h5tools_str_append(str, "%s", OPT(info->idx_sep, ",")); @@ -350,10 +323,8 @@ h5tools_str_prefix(h5tools_str_t *str/*in,out*/, const h5tool_format_t *info, } } - else { - /* Scalar */ + else /* Scalar */ h5tools_str_append(str, OPT(info->idx_n_fmt, HSIZE_T_FORMAT), (hsize_t) 0); - } /* Add prefix and suffix to the index */ return h5tools_str_fmt(str, (size_t)0, OPT(info->idx_fmt, "%s: ")); @@ -377,21 +348,21 @@ h5tools_str_region_prefix(h5tools_str_t *str, const h5tool_format_t *info, hsize_t elmtno, hsize_t *ptdata, unsigned ndims, hsize_t max_idx[], h5tools_context_t *ctx) { - hsize_t p_prod[H5S_MAX_RANK]; - size_t i = 0; - hsize_t curr_pos = elmtno; + size_t i = 0; + hsize_t curr_pos = elmtno; + hsize_t p_prod[H5S_MAX_RANK]; h5tools_str_reset(str); - if (ndims > 0) { + if(ndims > 0) { /* * Calculate the number of elements represented by a unit change in a * certain index position. */ - for (i = ndims - 1, p_prod[ndims - 1] = 1; i > 0; --i) + for(i = ndims - 1, p_prod[ndims - 1] = 1; i > 0; --i) p_prod[i - 1] = (max_idx[i]) * p_prod[i]; - for (i = 0; i < (size_t) ndims; i++) { + for(i = 0; i < (size_t) ndims; i++) { if(curr_pos > 0) { ctx->pos[i] = curr_pos / p_prod[i]; curr_pos -= p_prod[i] * ctx->pos[i]; @@ -402,18 +373,16 @@ h5tools_str_region_prefix(h5tools_str_t *str, const h5tool_format_t *info, } /* Print the index values */ - for (i = 0; i < (size_t) ndims; i++) { - if (i) + for(i = 0; i < (size_t) ndims; i++) { + if(i) h5tools_str_append(str, "%s", OPT(info->idx_sep, ",")); h5tools_str_append(str, OPT(info->idx_n_fmt, HSIZE_T_FORMAT), (hsize_t) ctx->pos[i]); } } /* if (ndims > 0) */ - else { - /* Scalar */ + else /* Scalar */ h5tools_str_append(str, OPT(info->idx_n_fmt, HSIZE_T_FORMAT), (hsize_t) 0); - } /* Add prefix and suffix to the index */ return h5tools_str_fmt(str, (size_t)0, OPT(info->idx_fmt, "%s: ")); @@ -449,7 +418,7 @@ h5tools_str_dump_space_slabs(h5tools_str_t *str, hid_t rspace, /* Start coordinates */ h5tools_str_append(str, "%s%s ", info->line_indent, START); - for (j = 0; j < ndims; j++) + for(j = 0; j < ndims; j++) h5tools_str_append(str, "%s" HSIZE_T_FORMAT, j ? "," : "(", start[j]); h5tools_str_append(str, ")"); h5tools_str_append(str, "%s", "\n"); @@ -457,7 +426,7 @@ h5tools_str_dump_space_slabs(h5tools_str_t *str, hid_t rspace, /* Stride coordinates */ h5tools_str_append(str, "%s ", STRIDE); - for (j = 0; j < ndims; j++) + for(j = 0; j < ndims; j++) h5tools_str_append(str, "%s" HSIZE_T_FORMAT, j ? "," : "(", stride[j]); h5tools_str_append(str, ")"); h5tools_str_append(str, "%s", "\n"); @@ -465,7 +434,7 @@ h5tools_str_dump_space_slabs(h5tools_str_t *str, hid_t rspace, /* Count coordinates */ h5tools_str_append(str, "%s ", COUNT); - for (j = 0; j < ndims; j++) { + for(j = 0; j < ndims; j++) { if(count[j] == H5S_UNLIMITED) h5tools_str_append(str, "%s%s", j ? "," : "(","H5S_UNLIMITED"); else @@ -477,7 +446,7 @@ h5tools_str_dump_space_slabs(h5tools_str_t *str, hid_t rspace, /* Block coordinates */ h5tools_str_append(str, "%s ", BLOCK); - for (j = 0; j < ndims; j++) { + for(j = 0; j < ndims; j++) { if(block[j] == H5S_UNLIMITED) h5tools_str_append(str, "%s%s", j ? "," : "(","H5S_UNLIMITED"); else @@ -494,8 +463,7 @@ h5tools_str_dump_space_slabs(h5tools_str_t *str, hid_t rspace, * * Return: none * - * In/Out: - * h5tools_str_t *str + * In/Out: h5tools_str_t *str *------------------------------------------------------------------------- */ void @@ -512,12 +480,12 @@ h5tools_str_dump_space_blocks(h5tools_str_t *str, hid_t rspace, } H5E_END_TRY; /* Print block information */ - if (snblocks > 0) { + if(snblocks > 0) { + hsize_t alloc_size; hsize_t nblocks; hsize_t *ptdata; - hsize_t alloc_size; + hsize_t u; unsigned ndims = (unsigned)H5Sget_simple_extent_ndims(rspace); - hsize_t u; nblocks = (hsize_t)snblocks; alloc_size = nblocks * ndims * 2 * sizeof(ptdata[0]); @@ -525,17 +493,17 @@ h5tools_str_dump_space_blocks(h5tools_str_t *str, hid_t rspace, ptdata = (hsize_t *)HDmalloc((size_t) alloc_size); H5Sget_select_hyper_blocklist(rspace, (hsize_t)0, nblocks, ptdata); - for (u = 0; u < nblocks; u++) { + for(u = 0; u < nblocks; u++) { unsigned v; h5tools_str_append(str, info->dset_blockformat_pre, u ? "," OPTIONAL_LINE_BREAK " " : "", (unsigned long)u); /* Start coordinates and opposite corner */ - for (v = 0; v < ndims; v++) + for(v = 0; v < ndims; v++) h5tools_str_append(str, "%s" HSIZE_T_FORMAT, v ? "," : "(", ptdata[u * 2 * ndims + v]); - for (v = 0; v < ndims; v++) + for(v = 0; v < ndims; v++) h5tools_str_append(str, "%s" HSIZE_T_FORMAT, v ? "," : ")-(", ptdata[u * 2 * ndims + v + ndims]); @@ -554,8 +522,7 @@ h5tools_str_dump_space_blocks(h5tools_str_t *str, hid_t rspace, * * Return: none * - * In/Out: - * h5tools_str_t *str + * In/Out: h5tools_str_t *str *------------------------------------------------------------------------- */ void @@ -573,11 +540,11 @@ h5tools_str_dump_space_points(h5tools_str_t *str, hid_t rspace, /* Print point information */ if (snpoints > 0) { - hsize_t npoints; hsize_t alloc_size; + hsize_t npoints; hsize_t *ptdata; - unsigned ndims = (unsigned)H5Sget_simple_extent_ndims(rspace); - hsize_t u; + hsize_t u; + unsigned ndims = (unsigned)H5Sget_simple_extent_ndims(rspace); npoints = (hsize_t)snpoints; alloc_size = npoints * ndims * sizeof(ptdata[0]); @@ -585,13 +552,13 @@ h5tools_str_dump_space_points(h5tools_str_t *str, hid_t rspace, ptdata = (hsize_t *)HDmalloc((size_t) alloc_size); H5Sget_select_elem_pointlist(rspace, (hsize_t)0, npoints, ptdata); - for (u = 0; u < npoints; u++) { + for(u = 0; u < npoints; u++) { unsigned v; h5tools_str_append(str, info->dset_ptformat_pre, u ? "," OPTIONAL_LINE_BREAK " " : "", (unsigned long)u); - for (v = 0; v < ndims; v++) + for(v = 0; v < ndims; v++) h5tools_str_append(str, "%s" HSIZE_T_FORMAT, v ? "," : "(", (ptdata[u * ndims + v])); @@ -614,16 +581,16 @@ h5tools_str_dump_space_points(h5tools_str_t *str, hid_t rspace, static void h5tools_print_char(h5tools_str_t *str, const h5tool_format_t *info, char ch) { - if (info->str_locale == ESCAPE_HTML) { - if (ch <= ' ' || ch > '~') + if(info->str_locale == ESCAPE_HTML) { + if(ch <= ' ' || ch > '~') h5tools_str_append(str, "%%%02x", ch); else h5tools_str_append(str, "%c", ch); } else { - switch (ch) { + switch(ch) { case '"': - if (!info->do_escape) + if(!info->do_escape) h5tools_str_append(str, "\""); else h5tools_str_append(str, "\\\""); @@ -635,19 +602,19 @@ h5tools_print_char(h5tools_str_t *str, const h5tool_format_t *info, char ch) h5tools_str_append(str, "\\\\"); break; case '\b': - if (!info->do_escape) + if(!info->do_escape) h5tools_str_append(str, "\b"); else h5tools_str_append(str, "\\b"); break; case '\f': - if (!info->do_escape) + if(!info->do_escape) h5tools_str_append(str, "\f"); else h5tools_str_append(str, "\\f"); break; case '\n': - if (!info->do_escape) { + if(!info->do_escape) { h5tools_str_append(str, "\n"); h5tools_str_append(str, " "); } @@ -655,7 +622,7 @@ h5tools_print_char(h5tools_str_t *str, const h5tool_format_t *info, char ch) h5tools_str_append(str, "\\n"); break; case '\r': - if (!info->do_escape) { + if(!info->do_escape) { h5tools_str_append(str, "\r"); h5tools_str_append(str, " "); } @@ -663,13 +630,13 @@ h5tools_print_char(h5tools_str_t *str, const h5tool_format_t *info, char ch) h5tools_str_append(str, "\\r"); break; case '\t': - if (!info->do_escape) + if(!info->do_escape) h5tools_str_append(str, "\t"); else h5tools_str_append(str, "\\t"); break; default: - if (isprint(ch)) + if(isprint(ch)) h5tools_str_append(str, "%c", ch); else h5tools_str_append(str, "\\%03o", ch); @@ -685,7 +652,7 @@ h5tools_str_indent(h5tools_str_t *str, const h5tool_format_t *info, unsigned u, indentlevel = 0; /* Write new prefix */ - if (ctx->indent_level > 0) + if(ctx->indent_level > 0) indentlevel = ctx->indent_level; else /* @@ -696,7 +663,7 @@ h5tools_str_indent(h5tools_str_t *str, const h5tool_format_t *info, */ indentlevel = ctx->default_indent_level; - for (u = 0; u < indentlevel; u++) + for(u = 0; u < indentlevel; u++) h5tools_str_append(str, "%s", OPT(info->line_indent, "")); } @@ -738,7 +705,7 @@ h5tools_str_indent(h5tools_str_t *str, const h5tool_format_t *info, * added H5T_NATIVE_LDOUBLE case * * Vailin Choi; August 2010 - * Modified to handle printing of selected compound fields for h5watch. + * Modified to handle printing of selected compound fields for h5watch. * * Raymond Lu, 2011-09-01 * CLANG compiler complained about the line (about 800): @@ -765,7 +732,7 @@ h5tools_str_sprint(h5tools_str_t *str, const h5tool_format_t *info, hid_t contai H5T_class_t type_class; /* Build default formats for long long types */ - if (!fmt_llong[0]) { + if(!fmt_llong[0]) { HDsnprintf(fmt_llong, sizeof(fmt_llong), "%%%sd", H5_PRINTF_LL_WIDTH); HDsnprintf(fmt_ullong, sizeof(fmt_ullong), "%%%su", H5_PRINTF_LL_WIDTH); } @@ -775,33 +742,31 @@ h5tools_str_sprint(h5tools_str_t *str, const h5tool_format_t *info, hid_t contai nsize = H5Tget_size(type); nsign = H5Tget_sign(type); - if (info->raw) { + if(info->raw) { size_t i; - if (1 == nsize) { + if(1 == nsize) h5tools_str_append(str, OPT(info->fmt_raw, "0x%02x"), ucp_vp[0]); - } - else { - for (i = 0; i < nsize; i++) { - if (i) + else + for(i = 0; i < nsize; i++) { + if(i) h5tools_str_append(str, ":"); h5tools_str_append(str, OPT(info->fmt_raw, "%02x"), ucp_vp[i]); } - } } else { if((type_class = H5Tget_class(type)) < 0) return NULL; switch (type_class) { case H5T_FLOAT: - if (sizeof(float) == nsize) { + if(sizeof(float) == nsize) { /* if (H5Tequal(type, H5T_NATIVE_FLOAT)) */ float tempfloat; HDmemcpy(&tempfloat, vp, sizeof(float)); h5tools_str_append(str, OPT(info->fmt_float, "%g"), (double)tempfloat); } - else if (sizeof(double) == nsize) { + else if(sizeof(double) == nsize) { /* if (H5Tequal(type, H5T_NATIVE_DOUBLE)) */ double tempdouble; @@ -809,7 +774,7 @@ h5tools_str_sprint(h5tools_str_t *str, const h5tool_format_t *info, hid_t contai h5tools_str_append(str, OPT(info->fmt_double, "%g"), tempdouble); #if H5_SIZEOF_LONG_DOUBLE !=0 } - else if (sizeof(long double) == nsize) { + else if(sizeof(long double) == nsize) { /* if (H5Tequal(type, H5T_NATIVE_LDOUBLE)) */ long double templdouble; @@ -822,15 +787,15 @@ h5tools_str_sprint(h5tools_str_t *str, const h5tool_format_t *info, hid_t contai case H5T_STRING: { unsigned int i; - char quote = '\0'; - char *s; + char quote = '\0'; + char *s; quote = '\0'; - if (H5Tis_variable_str(type)) { + if(H5Tis_variable_str(type)) { /* cp_vp is the pointer into the struct where a `char*' is stored. So we have * to dereference the pointer to get the `char*' to pass to HDstrlen(). */ s = *(char**) cp_vp; - if (s != NULL) size = HDstrlen(s); + if(s != NULL) size = HDstrlen(s); } else { s = cp_vp; @@ -839,10 +804,10 @@ h5tools_str_sprint(h5tools_str_t *str, const h5tool_format_t *info, hid_t contai pad = H5Tget_strpad(type); /* Check for NULL pointer for string */ - if (s == NULL) + if(s == NULL) h5tools_str_append(str, "NULL"); else { - for (i = 0; i < size && (s[i] || pad != H5T_STR_NULLTERM); i++) { + for(i = 0; i < size && (s[i] || pad != H5T_STR_NULLTERM); i++) { unsigned j = 1; /* @@ -850,7 +815,7 @@ h5tools_str_sprint(h5tools_str_t *str, const h5tool_format_t *info, hid_t contai * threshold is zero then that means it can repeat any number * of times. */ - if (info->str_repeat > 0) while (i + j < size && s[i] == s[i + j]) + if(info->str_repeat > 0) while (i + j < size && s[i] == s[i + j]) j++; /* @@ -859,14 +824,14 @@ h5tools_str_sprint(h5tools_str_t *str, const h5tool_format_t *info, hid_t contai * the characters, then make sure the character to be repeated is * in it's own quote. */ - if (info->str_repeat > 0 && j > info->str_repeat) { - if (quote) + if(info->str_repeat > 0 && j > info->str_repeat) { + if(quote) h5tools_str_append(str, "%c", quote); quote = '\''; h5tools_str_append(str, "%s%c", i ? " " : "", quote); } - else if (!quote) { + else if(!quote) { quote = '"'; h5tools_str_append(str, "%s%c", i ? " " : "", quote); } @@ -875,7 +840,7 @@ h5tools_str_sprint(h5tools_str_t *str, const h5tool_format_t *info, hid_t contai h5tools_print_char(str, info, s[i]); /* Print the repeat count */ - if (info->str_repeat && j > info->str_repeat) { + if(info->str_repeat && j > info->str_repeat) { #ifdef REPEAT_VERBOSE h5tools_str_append(str, "%c repeats %d times", quote, j - 1); #else @@ -886,10 +851,10 @@ h5tools_str_sprint(h5tools_str_t *str, const h5tool_format_t *info, hid_t contai } } - if (quote) + if(quote) h5tools_str_append(str, "%c", quote); - if (i == 0) + if(i == 0) /*empty string*/ h5tools_str_append(str, "\"\""); } /* end else */ @@ -897,15 +862,15 @@ h5tools_str_sprint(h5tools_str_t *str, const h5tool_format_t *info, hid_t contai break; case H5T_INTEGER: - if (sizeof(char) == nsize) { - if (info->ascii) + if(sizeof(char) == nsize) { + if(info->ascii) h5tools_print_char(str, info, (char) (*ucp_vp)); else if(H5T_SGN_NONE == nsign) { unsigned char tempuchar; HDmemcpy(&tempuchar, ucp_vp, sizeof(unsigned char)); - if (packed_bits_num) { - if (packed_data_offset >= 8 * sizeof(unsigned char)) + if(packed_bits_num) { + if(packed_data_offset >= 8 * sizeof(unsigned char)) tempuchar = 0; else tempuchar = (unsigned char)((unsigned long long)(tempuchar >> packed_data_offset) & packed_data_mask); @@ -916,8 +881,8 @@ h5tools_str_sprint(h5tools_str_t *str, const h5tool_format_t *info, hid_t contai signed char tempchar; HDmemcpy(&tempchar, cp_vp, sizeof(char)); - if (packed_bits_num) { - if (packed_data_offset >= 8 * sizeof(char)) + if(packed_bits_num) { + if(packed_data_offset >= 8 * sizeof(char)) tempchar = 0; else tempchar = (signed char)((unsigned long long)(tempchar >> packed_data_offset) & packed_data_mask); @@ -925,13 +890,13 @@ h5tools_str_sprint(h5tools_str_t *str, const h5tool_format_t *info, hid_t contai h5tools_str_append(str, OPT(info->fmt_schar, "%hhd"), tempchar); } } /* end if (sizeof(char) == nsize) */ - else if (sizeof(int) == nsize) { + else if(sizeof(int) == nsize) { if(H5T_SGN_NONE == nsign) { - unsigned int tempuint; + unsigned int tempuint; HDmemcpy(&tempuint, vp, sizeof(unsigned int)); - if (packed_bits_num) { - if (packed_data_offset >= 8 * sizeof(unsigned int)) + if(packed_bits_num) { + if(packed_data_offset >= 8 * sizeof(unsigned int)) tempuint = 0; else tempuint = (unsigned)((tempuint >> packed_data_offset) & packed_data_mask); @@ -939,11 +904,11 @@ h5tools_str_sprint(h5tools_str_t *str, const h5tool_format_t *info, hid_t contai h5tools_str_append(str, OPT(info->fmt_uint, "%u"), tempuint); } else { - int tempint; + int tempint; HDmemcpy(&tempint, vp, sizeof(int)); - if (packed_bits_num) { - if (packed_data_offset >= 8 * sizeof(int)) + if(packed_bits_num) { + if(packed_data_offset >= 8 * sizeof(int)) tempint = 0; else tempint = (int)((unsigned long long)(tempint >> packed_data_offset) & packed_data_mask); @@ -951,13 +916,13 @@ h5tools_str_sprint(h5tools_str_t *str, const h5tool_format_t *info, hid_t contai h5tools_str_append(str, OPT(info->fmt_int, "%d"), tempint); } } /* end if (sizeof(int) == nsize) */ - else if (sizeof(short) == nsize) { + else if(sizeof(short) == nsize) { if(H5T_SGN_NONE == nsign) { unsigned short tempushort; HDmemcpy(&tempushort, vp, sizeof(unsigned short)); - if (packed_bits_num) { - if (packed_data_offset >= 8 * sizeof(unsigned short)) + if(packed_bits_num) { + if(packed_data_offset >= 8 * sizeof(unsigned short)) tempushort = 0; else tempushort = (unsigned short)((unsigned long long)(tempushort >> packed_data_offset) & packed_data_mask); @@ -968,8 +933,8 @@ h5tools_str_sprint(h5tools_str_t *str, const h5tool_format_t *info, hid_t contai short tempshort; HDmemcpy(&tempshort, vp, sizeof(short)); - if (packed_bits_num) { - if (packed_data_offset >= 8 * sizeof(short)) + if(packed_bits_num) { + if(packed_data_offset >= 8 * sizeof(short)) tempshort = 0; else tempshort = (short)((unsigned long long)(tempshort >> packed_data_offset) & packed_data_mask); @@ -977,13 +942,13 @@ h5tools_str_sprint(h5tools_str_t *str, const h5tool_format_t *info, hid_t contai h5tools_str_append(str, OPT(info->fmt_short, "%hd"), tempshort); } } /* end if (sizeof(short) == nsize) */ - else if (sizeof(long) == nsize) { + else if(sizeof(long) == nsize) { if(H5T_SGN_NONE == nsign) { - unsigned long tempulong; + unsigned long tempulong; HDmemcpy(&tempulong, vp, sizeof(unsigned long)); - if (packed_bits_num) { - if (packed_data_offset >= 8 * sizeof(unsigned long)) + if(packed_bits_num) { + if(packed_data_offset >= 8 * sizeof(unsigned long)) tempulong = 0; else tempulong = (tempulong >> packed_data_offset) & packed_data_mask; @@ -991,11 +956,11 @@ h5tools_str_sprint(h5tools_str_t *str, const h5tool_format_t *info, hid_t contai h5tools_str_append(str, OPT(info->fmt_ulong, "%lu"), tempulong); } else { - long templong; + long templong; HDmemcpy(&templong, vp, sizeof(long)); - if (packed_bits_num) { - if (packed_data_offset >= 8 * sizeof(long)) + if(packed_bits_num) { + if(packed_data_offset >= 8 * sizeof(long)) templong = 0; else templong = (long)((unsigned long long)(templong >> packed_data_offset) & packed_data_mask); @@ -1004,13 +969,13 @@ h5tools_str_sprint(h5tools_str_t *str, const h5tool_format_t *info, hid_t contai } } /* end if (sizeof(long) == nsize) */ #if H5_SIZEOF_LONG != H5_SIZEOF_LONG_LONG - else if (sizeof(long long) == nsize) { + else if(sizeof(long long) == nsize) { if(H5T_SGN_NONE == nsign) { unsigned long long tempullong; HDmemcpy(&tempullong, vp, sizeof(unsigned long long)); - if (packed_bits_num) { - if (packed_data_offset >= 8 * sizeof(unsigned long long)) + if(packed_bits_num) { + if(packed_data_offset >= 8 * sizeof(unsigned long long)) tempullong = 0; else tempullong = (tempullong >> packed_data_offset) & packed_data_mask; @@ -1018,11 +983,11 @@ h5tools_str_sprint(h5tools_str_t *str, const h5tool_format_t *info, hid_t contai h5tools_str_append(str, OPT(info->fmt_ullong, fmt_ullong), tempullong); } else { - long long templlong; + long long templlong; HDmemcpy(&templlong, vp, sizeof(long long)); - if (packed_bits_num) { - if (packed_data_offset >= 8 * sizeof(long long)) + if(packed_bits_num) { + if(packed_data_offset >= 8 * sizeof(long long)) templlong = 0; else templlong = (templlong >> packed_data_offset) & packed_data_mask; @@ -1035,31 +1000,31 @@ h5tools_str_sprint(h5tools_str_t *str, const h5tool_format_t *info, hid_t contai case H5T_COMPOUND: if(ctx->cmpd_listv) { /* there is */ - int save_indent_level; /* The indentation level */ - size_t curr_field; /* Current field to display */ - int i = 0, x = 0; /* Local index variable */ - H5LD_memb_t **listv; /* Vector of information for */ + int save_indent_level; /* The indentation level */ + size_t curr_field; /* Current field to display */ + int i = 0, x = 0; /* Local index variable */ + H5LD_memb_t **listv; /* Vector of information for */ - listv = ctx->cmpd_listv; + listv = ctx->cmpd_listv; ctx->cmpd_listv = NULL; h5tools_str_append(str, "%s", OPT(info->cmpd_pre, "{")); - /* + /* * Go through the vector containing info about the comma-separated list of - * compound fields and then members in each field: - * put in "{", "}", ",", member name and value accordingly. + * compound fields and then members in each field: + * put in "{", "}", ",", member name and value accordingly. */ save_indent_level = ctx->indent_level; for(curr_field = 0; listv[curr_field] != NULL; curr_field++) { - if (curr_field) + if(curr_field) h5tools_str_append(str, "%s", OPT(info->cmpd_sep, ", "OPTIONAL_LINE_BREAK)); - else + else h5tools_str_append(str, "%s", OPT(info->cmpd_end, "")); if(info->arr_linebreak) h5tools_str_indent(str, info, ctx); - + /* Process members of each field */ for(i = 0; listv[curr_field]->names[i] != NULL; i++) { h5tools_str_append(str, OPT(info->cmpd_name, ""), listv[curr_field]->names[i]); @@ -1084,7 +1049,8 @@ h5tools_str_sprint(h5tools_str_t *str, const h5tool_format_t *info, hid_t contai ctx->cmpd_listv = info->cmpd_listv; - } else { + } + else { unsigned nmembs; unsigned j; @@ -1093,13 +1059,13 @@ h5tools_str_sprint(h5tools_str_t *str, const h5tool_format_t *info, hid_t contai ctx->indent_level++; - for (j = 0; j < nmembs; j++) { - if (j) + for(j = 0; j < nmembs; j++) { + if(j) h5tools_str_append(str, "%s", OPT(info->cmpd_sep, ", "OPTIONAL_LINE_BREAK)); else h5tools_str_append(str, "%s", OPT(info->cmpd_end, "")); - if (info->arr_linebreak) + if(info->arr_linebreak) h5tools_str_indent(str, info, ctx); /* The name */ @@ -1117,7 +1083,7 @@ h5tools_str_sprint(h5tools_str_t *str, const h5tool_format_t *info, hid_t contai } ctx->indent_level--; - if (info->arr_linebreak) { + if(info->arr_linebreak) { h5tools_str_append(str, "%s", OPT(info->cmpd_end, "")); h5tools_str_indent(str, info, ctx); } @@ -1129,27 +1095,24 @@ h5tools_str_sprint(h5tools_str_t *str, const h5tool_format_t *info, hid_t contai { char enum_name[1024]; - if (H5Tenum_nameof(type, vp, enum_name, sizeof enum_name) >= 0) { + if(H5Tenum_nameof(type, vp, enum_name, sizeof enum_name) >= 0) h5tools_str_append(str, h5tools_escape(enum_name, sizeof(enum_name))); - } else { size_t i; - if (1 == nsize) { + if(1 == nsize) h5tools_str_append(str, "0x%02x", ucp_vp[0]); - } - else { - for (i = 0; i < nsize; i++) + else + for(i = 0; i < nsize; i++) h5tools_str_append(str, "%s%02x", i ? ":" : "", ucp_vp[i]); - } } } break; case H5T_REFERENCE: - if (h5tools_str_is_zero(vp, nsize)) + if(h5tools_str_is_zero(vp, nsize)) h5tools_str_append(str, "NULL"); else { - if (nsize == H5R_DSET_REG_REF_BUF_SIZE) { + if(nsize == H5R_DSET_REG_REF_BUF_SIZE) { /* if (H5Tequal(type, H5T_STD_REF_DSETREG)) */ h5tools_str_sprint_region(str, info, container, vp); } @@ -1159,14 +1122,14 @@ h5tools_str_sprint(h5tools_str_t *str, const h5tool_format_t *info, hid_t contai * Object references -- show the type and OID of the referenced * object. */ - H5O_info_t oi; + H5O_info_t oi; const char *path; obj = H5Rdereference2(container, H5P_DEFAULT, H5R_OBJECT, vp); H5Oget_info(obj, &oi); /* Print object type and close object */ - switch (oi.type) { + switch(oi.type) { case H5O_TYPE_GROUP: h5tools_str_append(str, H5_TOOLS_GROUP); break; @@ -1188,14 +1151,14 @@ h5tools_str_sprint(h5tools_str_t *str, const h5tool_format_t *info, hid_t contai H5Oclose(obj); /* Print OID */ - if (info->obj_hidefileno) + if(info->obj_hidefileno) h5tools_str_append(str, info->obj_format, oi.addr); else h5tools_str_append(str, info->obj_format, oi.fileno, oi.addr); /* Print name */ path = lookup_ref_path(*(haddr_t *) vp); - if (path) { + if(path) { h5tools_str_append(str, " "); h5tools_str_append(str, path); h5tools_str_append(str, " "); @@ -1206,8 +1169,8 @@ h5tools_str_sprint(h5tools_str_t *str, const h5tool_format_t *info, hid_t contai case H5T_ARRAY: { - int k, ndims; - hsize_t i, dims[H5S_MAX_RANK], temp_nelmts; + int k, ndims; + hsize_t i, dims[H5S_MAX_RANK], temp_nelmts; static int is_next_arry_elmt = 0; /* Get the array's base datatype for each element */ @@ -1218,7 +1181,7 @@ h5tools_str_sprint(h5tools_str_t *str, const h5tool_format_t *info, hid_t contai HDassert(ndims >= 1 && ndims <= H5S_MAX_RANK); /* Calculate the number of array elements */ - for (k = 0, nelmts = 1; k < ndims; k++) { + for(k = 0, nelmts = 1; k < ndims; k++) { temp_nelmts = nelmts; temp_nelmts *= dims[k]; HDassert(temp_nelmts == (hsize_t) ((size_t) temp_nelmts)); @@ -1229,18 +1192,18 @@ h5tools_str_sprint(h5tools_str_t *str, const h5tool_format_t *info, hid_t contai ctx->indent_level++; - for (i = 0; i < nelmts; i++) { - if (i) + for(i = 0; i < nelmts; i++) { + if(i) h5tools_str_append(str, "%s", OPT(info->arr_sep, "," OPTIONAL_LINE_BREAK)); - if (info->arr_linebreak && i && i % dims[ndims - 1] == 0) { + if(info->arr_linebreak && i && i % dims[ndims - 1] == 0) { h5tools_str_append(str, "%s", "\n"); h5tools_str_indent(str, info, ctx); } /* end if */ - else if (i && info->arr_sep) { + else if(i && info->arr_sep) { /* if next element begin, add next line with indent */ - if (is_next_arry_elmt) { + if(is_next_arry_elmt) { is_next_arry_elmt = 0; h5tools_str_append(str, "%s", "\n "); @@ -1281,21 +1244,21 @@ h5tools_str_sprint(h5tools_str_t *str, const h5tool_format_t *info, hid_t contai /* Get the number of sequence elements */ nelmts = ((hvl_t *) cp_vp)->len; - for (i = 0; i < nelmts; i++) { - if (i) h5tools_str_append(str, "%s", OPT(info->vlen_sep, "," OPTIONAL_LINE_BREAK)); + for(i = 0; i < nelmts; i++) { + if(i) h5tools_str_append(str, "%s", OPT(info->vlen_sep, "," OPTIONAL_LINE_BREAK)); #ifdef LATER /* Need to fix so VL data breaks at correct location on end of line -QAK */ - if (info->arr_linebreak && h5tools_str_len(str)>=info->line_ncols) { + if(info->arr_linebreak && h5tools_str_len(str)>=info->line_ncols) { int x; h5tools_str_append(str, "%s", "\n"); /* need to indent some more here */ - if (ctx->indent_level >= 0) + if(ctx->indent_level >= 0) h5tools_str_append(str, "%s", OPT(info->line_pre, "")); - for (x = 0; x < ctx->indent_level + 1; x++) + for(x = 0; x < ctx->indent_level + 1; x++) h5tools_str_append(str,"%s",OPT(info->line_indent,"")); } /* end if */ #endif /* LATER */ @@ -1319,13 +1282,11 @@ h5tools_str_sprint(h5tools_str_t *str, const h5tool_format_t *info, hid_t contai { /* All other types get printed as hexadecimal */ size_t i; - if (1 == nsize) { + if(1 == nsize) h5tools_str_append(str, "0x%02x", ucp_vp[0]); - } - else { - for (i = 0; i < nsize; i++) + else + for(i = 0; i < nsize; i++) h5tools_str_append(str, "%s%02x", i ? ":" : "", ucp_vp[i]); - } } break; @@ -1352,14 +1313,14 @@ void h5tools_str_sprint_region(h5tools_str_t *str, const h5tool_format_t *info, hid_t container, void *vp) { - hid_t obj, region; - char ref_name[1024]; + hid_t obj, region; + char ref_name[1024]; H5S_sel_type region_type; obj = H5Rdereference2(container, H5P_DEFAULT, H5R_DATASET_REGION, vp); - if (obj >= 0) { + if(obj >= 0) { region = H5Rget_region(container, H5R_DATASET_REGION, vp); - if (region >= 0) { + if(region >= 0) { H5Rget_name(obj, H5R_DATASET_REGION, vp, (char*) ref_name, 1024); h5tools_str_append(str, info->dset_format, ref_name); @@ -1381,33 +1342,30 @@ h5tools_str_sprint_region(h5tools_str_t *str, const h5tool_format_t *info, } /*------------------------------------------------------------------------- - * Function: h5tools_escape + * Function: h5tools_escape * - * Purpose: Changes all "funny" characters in S into standard C escape - * sequences. + * Purpose: Changes all "funny" characters in S into standard C escape + * sequences. * - * Return: Success: S + * Return: Success: S * - * Failure: NULL if the buffer would overflow. The + * Failure: NULL if the buffer would overflow. The * buffer has as many left-to-right escapes as * possible before overflow would have happened. * * Programmer: Robb Matzke * Monday, April 26, 1999 - * - * Modifications: - * *------------------------------------------------------------------------- */ static char * h5tools_escape(char *s/*in,out*/, size_t size) { - register size_t i; - size_t n = HDstrlen(s); + register size_t i; const char *escape; - char octal[8]; + char octal[8]; + size_t n = HDstrlen(s); - for (i = 0; i < n; i++) { + for(i = 0; i < n; i++) { switch (s[i]) { case '\'': escape = "\\\'"; @@ -1443,21 +1401,20 @@ h5tools_escape(char *s/*in,out*/, size_t size) escape = "\\v"; break; default: - if (!isprint(s[i])) { + if(!isprint(s[i])) { HDsnprintf(octal, sizeof(octal), "\\%03o", (unsigned char) s[i]); escape = octal; } - else { + else escape = NULL; - } break; } - if (escape) { + if(escape) { size_t esc_size = HDstrlen(escape); - if (n + esc_size + 1 > size) + if(n + esc_size + 1 > size) /*would overflow*/ return NULL; @@ -1474,15 +1431,12 @@ h5tools_escape(char *s/*in,out*/, size_t size) /*------------------------------------------------------------------------- * Function: h5tools_str_is_zero * - * Purpose: Determines if memory is initialized to all zero bytes. + * Purpose: Determines if memory is initialized to all zero bytes. * - * Return: TRUE if all bytes are zero; FALSE otherwise + * Return: TRUE if all bytes are zero; FALSE otherwise * * Programmer: Robb Matzke * Monday, June 7, 1999 - * - * Modifications: - * *------------------------------------------------------------------------- */ static hbool_t @@ -1490,8 +1444,8 @@ h5tools_str_is_zero(const void *_mem, size_t size) { const unsigned char *mem = (const unsigned char *) _mem; - while (size-- > 0) - if (mem[size]) + while(size-- > 0) + if(mem[size]) return FALSE; return TRUE; @@ -1516,11 +1470,11 @@ h5tools_str_is_zero(const void *_mem, size_t size) char * h5tools_str_replace ( const char *string, const char *substr, const char *replacement ) { - char *tok = NULL; + char *tok = NULL; char *newstr = NULL; - char *head = NULL; - - if(substr == NULL || replacement == NULL) + char *head = NULL; + + if(substr == NULL || replacement == NULL) return HDstrdup(string); newstr = HDstrdup(string); head = newstr; @@ -1531,8 +1485,8 @@ h5tools_str_replace ( const char *string, const char *substr, const char *replac newstr = (char *)HDmalloc(HDstrlen(oldstr) - HDstrlen(substr) + HDstrlen(replacement) + 1); if(newstr == NULL) { - HDfree(oldstr); - return NULL; + HDfree(oldstr); + return NULL; } HDmemcpy(newstr, oldstr, (size_t)(tok - oldstr)); HDmemcpy(newstr + (tok - oldstr), replacement, HDstrlen(replacement)); diff --git a/tools/src/h5dump/h5dump_xml.c b/tools/src/h5dump/h5dump_xml.c index 49d1ba8..1c3978d 100644 --- a/tools/src/h5dump/h5dump_xml.c +++ b/tools/src/h5dump/h5dump_xml.c @@ -108,7 +108,7 @@ static h5tool_format_t xml_dataformat = { /* internal functions */ -static int xml_name_to_XID(const char *, char *, int , int ); +static int xml_name_to_XID(const char *, char *, int , int ); /* internal functions used by XML option */ static void xml_print_datatype(hid_t, unsigned); @@ -122,34 +122,26 @@ static char *xml_escape_the_name(const char *); * Function: xml_dump_all_cb * * Purpose: function callback called by H5Literate, - * displays everything in the specified object + * displays everything in the specified object * * Return: Success: SUCCEED * * Failure: FAIL * * Programmer: Ruey-Hsia Li - * - * Modifications: - * RMcG, November 2000 - * Added XML support. Also, optionally checks the op_data argument - * - * PVN, May 2008 - * Dump external links - * *------------------------------------------------------------------------- */ static herr_t xml_dump_all_cb(hid_t group, const char *name, const H5L_info_t *linfo, void H5_ATTR_UNUSED *op_data) { - hid_t obj; - herr_t ret = SUCCEED; - char *obj_path = NULL; /* Full path of object */ - h5tools_str_t buffer; /* string into which to render */ - h5tools_context_t ctx; /* print context */ + hid_t obj; + herr_t ret = SUCCEED; + char *obj_path = NULL; /* Full path of object */ + h5tools_str_t buffer; /* string into which to render */ + h5tools_context_t ctx; /* print context */ h5tool_format_t *outputformat = &xml_dataformat; h5tool_format_t string_dataformat; - hsize_t curr_pos = 0; /* total data element position */ + hsize_t curr_pos = 0; /* total data element position */ /* setup */ HDmemset(&buffer, 0, sizeof(h5tools_str_t)); @@ -157,7 +149,7 @@ xml_dump_all_cb(hid_t group, const char *name, const H5L_info_t *linfo, void H5_ HDmemset(&ctx, 0, sizeof(ctx)); ctx.indent_level = dump_indent / COL; ctx.cur_column = dump_indent; - + string_dataformat = *outputformat; if (fp_format) { @@ -180,7 +172,7 @@ xml_dump_all_cb(hid_t group, const char *name, const H5L_info_t *linfo, void H5_ if(!obj_path) { ret = FAIL; goto done; - } + } HDstrcpy(obj_path, prefix); HDstrcat(obj_path, "/"); @@ -268,7 +260,7 @@ xml_dump_all_cb(hid_t group, const char *name, const H5L_info_t *linfo, void H5_ ret = FAIL; H5Dclose(obj); goto done; - } + } else if(found_obj->displayed) { /* the XML version */ char *t_obj_path = xml_escape_the_name(obj_path); @@ -330,14 +322,14 @@ xml_dump_all_cb(hid_t group, const char *name, const H5L_info_t *linfo, void H5_ H5Dclose(obj); goto done; - } + } else found_obj->displayed = TRUE; } /* end if */ dump_function_table->dump_dataset_function(obj, name, NULL); H5Dclose(obj); - } + } else { error_msg("unable to dump dataset \"%s\"\n", name); h5tools_setstatus(EXIT_FAILURE); @@ -350,7 +342,7 @@ xml_dump_all_cb(hid_t group, const char *name, const H5L_info_t *linfo, void H5_ error_msg("unable to dump datatype \"%s\"\n", name); h5tools_setstatus(EXIT_FAILURE); ret = FAIL; - } + } else { dump_function_table->dump_named_datatype_function(obj, name); H5Tclose(obj); @@ -377,7 +369,7 @@ xml_dump_all_cb(hid_t group, const char *name, const H5L_info_t *linfo, void H5_ error_msg("unable to get link value\n"); h5tools_setstatus(EXIT_FAILURE); ret = FAIL; - } + } else { /* print the value of a soft link */ /* XML */ @@ -426,7 +418,7 @@ xml_dump_all_cb(hid_t group, const char *name, const H5L_info_t *linfo, void H5_ parentxid, /* Parents */ t_prefix); /* H5ParentPaths */ h5tools_render_element(rawoutstream, outputformat, &ctx, &buffer, &curr_pos, (size_t)outputformat->line_ncols, (hsize_t)0, (hsize_t)0); - } + } else { /* dangling link -- omit from xml attributes */ ctx.need_prefix = TRUE; @@ -510,7 +502,7 @@ xml_dump_all_cb(hid_t group, const char *name, const H5L_info_t *linfo, void H5_ parentxid, /* Parents */ t_prefix); /* H5ParentPaths */ h5tools_render_element(rawoutstream, outputformat, &ctx, &buffer, &curr_pos, (size_t)outputformat->line_ncols, (hsize_t)0, (hsize_t)0); - + HDfree(t_prefix); HDfree(t_name); HDfree(t_filename); @@ -556,7 +548,7 @@ xml_dump_all_cb(hid_t group, const char *name, const H5L_info_t *linfo, void H5_ parentxid, /* Parents */ t_prefix); /* H5ParentPaths */ h5tools_render_element(rawoutstream, outputformat, &ctx, &buffer, &curr_pos, (size_t)outputformat->line_ncols, (hsize_t)0, (hsize_t)0); - + HDfree(t_prefix); HDfree(t_name); HDfree(t_obj_path); @@ -598,18 +590,18 @@ xml_name_to_XID(const char *str , char *outstr, int outlen, int gen) objno = ref_path_table_gen_fake(str); sprintf(outstr, "xid_"H5_PRINTF_HADDR_FMT, objno); return 0; - } + } else { return 1; } } - } + } else { if (gen) { objno = ref_path_table_gen_fake(str); sprintf(outstr, "xid_"H5_PRINTF_HADDR_FMT, objno); return 0; - } + } else { return 1; } @@ -636,9 +628,6 @@ static const char *apos = "'"; * Return: The revised string. * * Programmer: REMcG - * - * Modifications: - * *------------------------------------------------------------------------- */ static char * @@ -691,23 +680,23 @@ xml_escape_the_name(const char *str) if (*cp == '\'') { HDstrncpy(ncp, apos, ncp_len); esc_len = HDstrlen(apos); - } + } else if (*cp == '<') { HDstrncpy(ncp, lt, ncp_len); esc_len = HDstrlen(lt); - } + } else if (*cp == '>') { HDstrncpy(ncp, gt, ncp_len); esc_len = HDstrlen(gt); - } + } else if (*cp == '\"') { HDstrncpy(ncp, quote, ncp_len); esc_len = HDstrlen(quote); - } + } else if (*cp == '&') { HDstrncpy(ncp, amp, ncp_len); esc_len = HDstrlen(amp); - } + } else { *ncp = *cp; esc_len = 1; @@ -730,9 +719,6 @@ xml_escape_the_name(const char *str) * Return: The revised string. * * Programmer: REMcG - * - * Modifications: - * *------------------------------------------------------------------------- */ static char * @@ -838,9 +824,6 @@ xml_escape_the_string(const char *str, int slen) * Return: void * * Programmer: REMcG - * - * Modifications: - * *------------------------------------------------------------------------- */ static void @@ -865,12 +848,12 @@ xml_print_datatype(hid_t type, unsigned in_group) size_t mpos; size_t msize; int nmembs; - htri_t is_vlstr=FALSE; - h5tools_str_t buffer; /* string into which to render */ - h5tools_context_t ctx; /* print context */ - h5tool_format_t *outputformat = &xml_dataformat; - h5tool_format_t string_dataformat; - hsize_t curr_pos = 0; /* total data element position */ + htri_t is_vlstr = FALSE; + h5tools_str_t buffer; /* string into which to render */ + h5tools_context_t ctx; /* print context */ + h5tool_format_t *outputformat = &xml_dataformat; + h5tool_format_t string_dataformat; + hsize_t curr_pos = 0; /* total data element position */ /* setup */ HDmemset(&buffer, 0, sizeof(h5tools_str_t)); @@ -878,7 +861,7 @@ xml_print_datatype(hid_t type, unsigned in_group) HDmemset(&ctx, 0, sizeof(ctx)); ctx.indent_level = dump_indent / COL; ctx.cur_column = dump_indent; - + string_dataformat = *outputformat; if (fp_format) { @@ -923,7 +906,7 @@ xml_print_datatype(hid_t type, unsigned in_group) h5tools_str_append(&buffer, "<%sNamedDataTypePtr OBJ-XID=\"/%s\"/>", xmlnsprefix, dtxid); h5tools_render_element(rawoutstream, outputformat, &ctx, &buffer, &curr_pos, (size_t)outputformat->line_ncols, (hsize_t)0, (hsize_t)0); - } + } else { /* point to the NDT by name */ char *t_objname = xml_escape_the_name(found_obj->objname); @@ -939,7 +922,7 @@ xml_print_datatype(hid_t type, unsigned in_group) HDfree(t_objname); } HDfree(dtxid); - } + } else { ctx.need_prefix = TRUE; h5tools_simple_prefix(rawoutstream, outputformat, &ctx, (hsize_t)0, 0); @@ -950,7 +933,7 @@ xml_print_datatype(hid_t type, unsigned in_group) h5tools_render_element(rawoutstream, outputformat, &ctx, &buffer, &curr_pos, (size_t)outputformat->line_ncols, (hsize_t)0, (hsize_t)0); h5tools_setstatus(EXIT_FAILURE); } - } + } else { switch (H5Tget_class(type)) { case H5T_INTEGER: @@ -988,9 +971,9 @@ xml_print_datatype(hid_t type, unsigned in_group) h5tools_str_append(&buffer, "ERROR_UNKNOWN"); break; } /* end switch */ - + h5tools_str_append(&buffer, "\" Sign=\""); - + switch (sgn) { case H5T_SGN_NONE: h5tools_str_append(&buffer, "false"); @@ -1004,7 +987,7 @@ xml_print_datatype(hid_t type, unsigned in_group) h5tools_str_append(&buffer, "ERROR_UNKNOWN"); break; } /* end switch */ - + h5tools_str_append(&buffer, "\" Size=\""); sz = H5Tget_size(type); h5tools_str_append(&buffer, "%lu", (unsigned long)sz); @@ -1043,7 +1026,7 @@ xml_print_datatype(hid_t type, unsigned in_group) /* Render the element */ h5tools_str_reset(&buffer); h5tools_str_append(&buffer, "<%sFloatType ByteOrder=\"",xmlnsprefix); - + switch (ord) { case H5T_ORDER_LE: h5tools_str_append(&buffer, "LE"); @@ -1060,7 +1043,7 @@ xml_print_datatype(hid_t type, unsigned in_group) default: h5tools_str_append(&buffer, "ERROR_UNKNOWN"); } /* end switch */ - + h5tools_str_append(&buffer, "\" Size=\""); sz = H5Tget_size(type); h5tools_str_append(&buffer, "%lu", (unsigned long)sz); @@ -1182,7 +1165,7 @@ xml_print_datatype(hid_t type, unsigned in_group) /* Render the element */ h5tools_str_reset(&buffer); h5tools_str_append(&buffer, "<%sBitfieldType ByteOrder=\"",xmlnsprefix); - + switch (ord) { case H5T_ORDER_LE: h5tools_str_append(&buffer, "LE"); @@ -1197,7 +1180,7 @@ xml_print_datatype(hid_t type, unsigned in_group) default: h5tools_str_append(&buffer, "ERROR_UNKNOWN"); } /* end switch */ - + size = H5Tget_size(type); h5tools_str_append(&buffer, "\" Size=\"%lu\"/>", (unsigned long)size); h5tools_render_element(rawoutstream, outputformat, &ctx, &buffer, &curr_pos, (size_t)outputformat->line_ncols, (hsize_t)0, (hsize_t)0); @@ -1559,19 +1542,16 @@ xml_print_datatype(hid_t type, unsigned in_group) * Return: void * * Programmer: REMcG - * - * Modifications: - * *------------------------------------------------------------------------- */ void xml_dump_datatype(hid_t type) { - h5tools_str_t buffer; /* string into which to render */ - h5tools_context_t ctx; /* print context */ + h5tools_str_t buffer; /* string into which to render */ + h5tools_context_t ctx; /* print context */ h5tool_format_t *outputformat = &xml_dataformat; h5tool_format_t string_dataformat; - hsize_t curr_pos = 0; /* total data element position */ + hsize_t curr_pos = 0; /* total data element position */ /* setup */ HDmemset(&buffer, 0, sizeof(h5tools_str_t)); @@ -1579,7 +1559,7 @@ xml_dump_datatype(hid_t type) HDmemset(&ctx, 0, sizeof(ctx)); ctx.indent_level = dump_indent / COL; ctx.cur_column = dump_indent; - + string_dataformat = *outputformat; if (fp_format) { @@ -1629,7 +1609,7 @@ xml_dump_datatype(hid_t type) h5tools_str_append(&buffer, "<%sNamedDataTypePtr OBJ-XID=\"%s\"/>", xmlnsprefix, dtxid); h5tools_render_element(rawoutstream, outputformat, &ctx, &buffer, &curr_pos, (size_t)outputformat->line_ncols, (hsize_t)0, (hsize_t)0); - } + } else { /* pointer to a named datatype already in XML */ char *t_objname = xml_escape_the_name(found_obj->objname); @@ -1645,7 +1625,7 @@ xml_dump_datatype(hid_t type) HDfree(t_objname); } HDfree(dtxid); - } + } else { ctx.need_prefix = TRUE; h5tools_simple_prefix(rawoutstream, outputformat, &ctx, (hsize_t)0, 0); @@ -1692,25 +1672,22 @@ xml_dump_datatype(hid_t type) * Return: void * * Programmer: REMcG - * - * Modifications: - * *------------------------------------------------------------------------- */ void xml_dump_dataspace(hid_t space) { - hsize_t size[H5DUMP_MAX_RANK]; - hsize_t maxsize[H5DUMP_MAX_RANK]; - int i; - h5tools_str_t buffer; /* string into which to render */ - h5tools_context_t ctx; /* print context */ + hsize_t size[H5DUMP_MAX_RANK]; + hsize_t maxsize[H5DUMP_MAX_RANK]; + int i; + h5tools_str_t buffer; /* string into which to render */ + h5tools_context_t ctx; /* print context */ h5tool_format_t *outputformat = &xml_dataformat; h5tool_format_t string_dataformat; - hsize_t curr_pos = 0; /* total data element position */ - - int ndims = H5Sget_simple_extent_dims(space, size, maxsize); - H5S_class_t space_type = H5Sget_simple_extent_type(space); + hsize_t curr_pos = 0; /* total data element position */ + + int ndims = H5Sget_simple_extent_dims(space, size, maxsize); + H5S_class_t space_type = H5Sget_simple_extent_type(space); /* setup */ HDmemset(&buffer, 0, sizeof(h5tools_str_t)); @@ -1718,7 +1695,7 @@ xml_dump_dataspace(hid_t space) HDmemset(&ctx, 0, sizeof(ctx)); ctx.indent_level = dump_indent / COL; ctx.cur_column = dump_indent; - + string_dataformat = *outputformat; if (fp_format) { @@ -1784,7 +1761,7 @@ xml_dump_dataspace(hid_t space) h5tools_str_append(&buffer, "<%sDimension DimSize=\"%" H5_PRINTF_LL_WIDTH "u\" MaxDimSize=\"UNLIMITED\"/>", xmlnsprefix,size[i]); h5tools_render_element(rawoutstream, outputformat, &ctx, &buffer, &curr_pos, (size_t)outputformat->line_ncols, (hsize_t)0, (hsize_t)0); - } + } else if (maxsize[i] == (hsize_t) 0) { ctx.need_prefix = TRUE; h5tools_simple_prefix(rawoutstream, outputformat, &ctx, (hsize_t)0, 0); @@ -1794,7 +1771,7 @@ xml_dump_dataspace(hid_t space) h5tools_str_append(&buffer, "<%sDimension DimSize=\"%" H5_PRINTF_LL_WIDTH "u\" MaxDimSize=\"%" H5_PRINTF_LL_WIDTH "u\"/>", xmlnsprefix,size[i], size[i]); h5tools_render_element(rawoutstream, outputformat, &ctx, &buffer, &curr_pos, (size_t)outputformat->line_ncols, (hsize_t)0, (hsize_t)0); - } + } else { ctx.need_prefix = TRUE; h5tools_simple_prefix(rawoutstream, outputformat, &ctx, (hsize_t)0, 0); @@ -1868,9 +1845,6 @@ xml_dump_dataspace(hid_t space) * Return: void * * Programmer: REMcG - * - * Modifications: - * *------------------------------------------------------------------------- */ void @@ -1886,19 +1860,19 @@ xml_dump_data(hid_t obj_id, int obj_data, struct subset_t H5_ATTR_UNUSED * sset, int status = -1; void *buf = NULL; hsize_t curr_pos = 0; /* total data element position */ - h5tools_str_t buffer; /* string into which to render */ - h5tools_context_t ctx; /* print context */ + h5tools_str_t buffer; /* string into which to render */ + h5tools_context_t ctx; /* print context */ h5tool_format_t *outputformat = &xml_dataformat; h5tool_format_t string_dataformat; HDmemset(&ctx, 0, sizeof(ctx)); ctx.indent_level = dump_indent / COL; ctx.cur_column = dump_indent; - + /* Print all the values. */ /* setup */ HDmemset(&buffer, 0, sizeof(h5tools_str_t)); - + string_dataformat = *outputformat; if (fp_format) { @@ -1922,7 +1896,7 @@ xml_dump_data(hid_t obj_id, int obj_data, struct subset_t H5_ATTR_UNUSED * sset, ctx.need_prefix = TRUE; h5tools_simple_prefix(rawoutstream, outputformat, &ctx, (hsize_t)0, 0); - + /* Render the element */ h5tools_str_reset(&buffer); h5tools_str_append(&buffer, "<%sData>", xmlnsprefix); @@ -1932,14 +1906,14 @@ xml_dump_data(hid_t obj_id, int obj_data, struct subset_t H5_ATTR_UNUSED * sset, ctx.need_prefix = TRUE; h5tools_simple_prefix(rawoutstream, outputformat, &ctx, (hsize_t)0, 0); - + /* Render the element */ h5tools_str_reset(&buffer); h5tools_str_append(&buffer, "<%sDataFromFile>", xmlnsprefix); h5tools_render_element(rawoutstream, outputformat, &ctx, &buffer, &curr_pos, (size_t)outputformat->line_ncols, (hsize_t)0, (hsize_t)0); ctx.indent_level--; - + dump_indent += COL; ctx.indent_level++; @@ -1957,7 +1931,7 @@ xml_dump_data(hid_t obj_id, int obj_data, struct subset_t H5_ATTR_UNUSED * sset, datactx.cur_column = ctx.cur_column; status = h5tools_dump_dset(rawoutstream, outputformat, &datactx, obj_id, NULL); } - } + } else { /* Attribute data */ type = H5Aget_type(obj_id); @@ -1970,15 +1944,15 @@ xml_dump_data(hid_t obj_id, int obj_data, struct subset_t H5_ATTR_UNUSED * sset, */ status = xml_print_refs(obj_id, ATTRIBUTE_DATA); H5Tclose(type); - } + } else if (H5Tget_class(type) == H5T_STRING) { status = xml_print_strs(obj_id, ATTRIBUTE_DATA); - } + } else { /* all other data */ /* VL data special information */ unsigned int vl_data = 0; /* contains VL datatypes */ - - p_type = h5tools_get_native_type(type); + + p_type = H5Tget_native_type(type, H5T_DIR_DEFAULT); /* Check if we have VL data in the dataset's datatype */ if (h5tools_detect_vlen(p_type) == TRUE) @@ -1995,7 +1969,7 @@ xml_dump_data(hid_t obj_id, int obj_data, struct subset_t H5_ATTR_UNUSED * sset, buf = HDmalloc((size_t)(nelmts * MAX(H5Tget_size(type), H5Tget_size(p_type)))); HDassert(buf); - + if (H5Aread(obj_id, p_type, buf) >= 0) { h5tools_context_t datactx; HDmemset(&datactx, 0, sizeof(datactx)); @@ -2020,7 +1994,7 @@ xml_dump_data(hid_t obj_id, int obj_data, struct subset_t H5_ATTR_UNUSED * sset, ctx.need_prefix = TRUE; h5tools_simple_prefix(rawoutstream, outputformat, &ctx, (hsize_t)0, 0); - + /* Render the element */ h5tools_str_reset(&buffer); h5tools_str_append(&buffer, "Unable to print data."); @@ -2036,7 +2010,7 @@ xml_dump_data(hid_t obj_id, int obj_data, struct subset_t H5_ATTR_UNUSED * sset, ctx.indent_level++; ctx.need_prefix = TRUE; - + /* Render the element */ h5tools_str_reset(&buffer); h5tools_str_append(&buffer, "",xmlnsprefix); @@ -2046,7 +2020,7 @@ xml_dump_data(hid_t obj_id, int obj_data, struct subset_t H5_ATTR_UNUSED * sset, ctx.need_prefix = TRUE; h5tools_simple_prefix(rawoutstream, outputformat, &ctx, (hsize_t)0, 0); - + /* Render the element */ h5tools_str_reset(&buffer); h5tools_str_append(&buffer, "", xmlnsprefix); @@ -2063,9 +2037,6 @@ xml_dump_data(hid_t obj_id, int obj_data, struct subset_t H5_ATTR_UNUSED * sset, * Return: herr_t * * Programmer: REMcG - * - * Modifications: - * *------------------------------------------------------------------------- */ herr_t @@ -2077,11 +2048,11 @@ xml_dump_attr(hid_t attr, const char *attr_name, const H5A_info_t H5_ATTR_UNUSED hid_t space = -1; H5S_class_t space_type; hsize_t curr_pos = 0; /* total data element position */ - h5tools_str_t buffer; /* string into which to render */ - h5tools_context_t ctx; /* print context */ + h5tools_str_t buffer; /* string into which to render */ + h5tools_context_t ctx; /* print context */ h5tool_format_t *outputformat = &xml_dataformat; h5tool_format_t string_dataformat; - + char *t_aname = xml_escape_the_name(attr_name); /* setup */ @@ -2090,7 +2061,7 @@ xml_dump_attr(hid_t attr, const char *attr_name, const H5A_info_t H5_ATTR_UNUSED HDmemset(&ctx, 0, sizeof(ctx)); ctx.indent_level = dump_indent / COL; ctx.cur_column = dump_indent; - + string_dataformat = *outputformat; if (fp_format) { @@ -2110,7 +2081,7 @@ xml_dump_attr(hid_t attr, const char *attr_name, const H5A_info_t H5_ATTR_UNUSED ctx.need_prefix = TRUE; h5tools_simple_prefix(rawoutstream, outputformat, &ctx, (hsize_t)0, 0); - + /* Render the element */ h5tools_str_reset(&buffer); h5tools_str_append(&buffer, "<%sAttribute Name=\"%s\">", xmlnsprefix, t_aname); @@ -2146,7 +2117,7 @@ xml_dump_attr(hid_t attr, const char *attr_name, const H5A_info_t H5_ATTR_UNUSED ctx.need_prefix = TRUE; h5tools_simple_prefix(rawoutstream, outputformat, &ctx, (hsize_t)0, 0); - + /* Render the element */ h5tools_str_reset(&buffer); h5tools_str_append(&buffer, "<%sData>", xmlnsprefix); @@ -2154,7 +2125,7 @@ xml_dump_attr(hid_t attr, const char *attr_name, const H5A_info_t H5_ATTR_UNUSED ctx.need_prefix = TRUE; h5tools_simple_prefix(rawoutstream, outputformat, &ctx, (hsize_t)0, 0); - + /* Render the element */ h5tools_str_reset(&buffer); h5tools_str_append(&buffer, ""); @@ -2162,7 +2133,7 @@ xml_dump_attr(hid_t attr, const char *attr_name, const H5A_info_t H5_ATTR_UNUSED ctx.need_prefix = TRUE; h5tools_simple_prefix(rawoutstream, outputformat, &ctx, (hsize_t)0, 0); - + /* Render the element */ h5tools_str_reset(&buffer); h5tools_str_append(&buffer, "<%sNoData/>", xmlnsprefix); @@ -2170,7 +2141,7 @@ xml_dump_attr(hid_t attr, const char *attr_name, const H5A_info_t H5_ATTR_UNUSED ctx.need_prefix = TRUE; h5tools_simple_prefix(rawoutstream, outputformat, &ctx, (hsize_t)0, 0); - + /* Render the element */ h5tools_str_reset(&buffer); h5tools_str_append(&buffer, ""); @@ -2178,7 +2149,7 @@ xml_dump_attr(hid_t attr, const char *attr_name, const H5A_info_t H5_ATTR_UNUSED ctx.need_prefix = TRUE; h5tools_simple_prefix(rawoutstream, outputformat, &ctx, (hsize_t)0, 0); - + /* Render the element */ h5tools_str_reset(&buffer); h5tools_str_append(&buffer, "", xmlnsprefix); @@ -2191,7 +2162,7 @@ xml_dump_attr(hid_t attr, const char *attr_name, const H5A_info_t H5_ATTR_UNUSED case H5T_COMPOUND: ctx.need_prefix = TRUE; h5tools_simple_prefix(rawoutstream, outputformat, &ctx, (hsize_t)0, 0); - + /* Render the element */ h5tools_str_reset(&buffer); h5tools_str_append(&buffer, ""); @@ -2202,7 +2173,7 @@ xml_dump_attr(hid_t attr, const char *attr_name, const H5A_info_t H5_ATTR_UNUSED case H5T_REFERENCE: ctx.need_prefix = TRUE; h5tools_simple_prefix(rawoutstream, outputformat, &ctx, (hsize_t)0, 0); - + /* Render the element */ h5tools_str_reset(&buffer); h5tools_str_append(&buffer, "<%sData>", xmlnsprefix); @@ -2210,7 +2181,7 @@ xml_dump_attr(hid_t attr, const char *attr_name, const H5A_info_t H5_ATTR_UNUSED if (!H5Tequal(type, H5T_STD_REF_OBJ)) { ctx.need_prefix = TRUE; h5tools_simple_prefix(rawoutstream, outputformat, &ctx, (hsize_t)0, 0); - + /* Render the element */ h5tools_str_reset(&buffer); h5tools_str_append(&buffer, ""); @@ -2218,7 +2189,7 @@ xml_dump_attr(hid_t attr, const char *attr_name, const H5A_info_t H5_ATTR_UNUSED ctx.need_prefix = TRUE; h5tools_simple_prefix(rawoutstream, outputformat, &ctx, (hsize_t)0, 0); - + /* Render the element */ h5tools_str_reset(&buffer); h5tools_str_append(&buffer, "<%sNoData />", xmlnsprefix); @@ -2227,7 +2198,7 @@ xml_dump_attr(hid_t attr, const char *attr_name, const H5A_info_t H5_ATTR_UNUSED else { ctx.need_prefix = TRUE; h5tools_simple_prefix(rawoutstream, outputformat, &ctx, (hsize_t)0, 0); - + /* Render the element */ h5tools_str_reset(&buffer); h5tools_str_append(&buffer, "<%sDataFromFile>", xmlnsprefix); @@ -2237,7 +2208,7 @@ xml_dump_attr(hid_t attr, const char *attr_name, const H5A_info_t H5_ATTR_UNUSED ctx.need_prefix = TRUE; h5tools_simple_prefix(rawoutstream, outputformat, &ctx, (hsize_t)0, 0); - + /* Render the element */ h5tools_str_reset(&buffer); h5tools_str_append(&buffer, "", xmlnsprefix); @@ -2246,7 +2217,7 @@ xml_dump_attr(hid_t attr, const char *attr_name, const H5A_info_t H5_ATTR_UNUSED ctx.need_prefix = TRUE; h5tools_simple_prefix(rawoutstream, outputformat, &ctx, (hsize_t)0, 0); - + /* Render the element */ h5tools_str_reset(&buffer); h5tools_str_append(&buffer, "", xmlnsprefix); @@ -2256,7 +2227,7 @@ xml_dump_attr(hid_t attr, const char *attr_name, const H5A_info_t H5_ATTR_UNUSED case H5T_VLEN: ctx.need_prefix = TRUE; h5tools_simple_prefix(rawoutstream, outputformat, &ctx, (hsize_t)0, 0); - + /* Render the element */ h5tools_str_reset(&buffer); h5tools_str_append(&buffer, ""); @@ -2271,7 +2242,7 @@ xml_dump_attr(hid_t attr, const char *attr_name, const H5A_info_t H5_ATTR_UNUSED default: ctx.need_prefix = TRUE; h5tools_simple_prefix(rawoutstream, outputformat, &ctx, (hsize_t)0, 0); - + /* Render the element */ h5tools_str_reset(&buffer); h5tools_str_append(&buffer, "<%sData>", xmlnsprefix); @@ -2279,7 +2250,7 @@ xml_dump_attr(hid_t attr, const char *attr_name, const H5A_info_t H5_ATTR_UNUSED ctx.need_prefix = TRUE; h5tools_simple_prefix(rawoutstream, outputformat, &ctx, (hsize_t)0, 0); - + /* Render the element */ h5tools_str_reset(&buffer); h5tools_str_append(&buffer, "", H5Tget_class(type)); @@ -2287,7 +2258,7 @@ xml_dump_attr(hid_t attr, const char *attr_name, const H5A_info_t H5_ATTR_UNUSED ctx.need_prefix = TRUE; h5tools_simple_prefix(rawoutstream, outputformat, &ctx, (hsize_t)0, 0); - + /* Render the element */ h5tools_str_reset(&buffer); h5tools_str_append(&buffer, "<%sNoData/>", xmlnsprefix); @@ -2295,7 +2266,7 @@ xml_dump_attr(hid_t attr, const char *attr_name, const H5A_info_t H5_ATTR_UNUSED ctx.need_prefix = TRUE; h5tools_simple_prefix(rawoutstream, outputformat, &ctx, (hsize_t)0, 0); - + /* Render the element */ h5tools_str_reset(&buffer); h5tools_str_append(&buffer, "", xmlnsprefix); @@ -2308,7 +2279,7 @@ xml_dump_attr(hid_t attr, const char *attr_name, const H5A_info_t H5_ATTR_UNUSED * Or dataspace is H5S_NULL. */ ctx.need_prefix = TRUE; h5tools_simple_prefix(rawoutstream, outputformat, &ctx, (hsize_t)0, 0); - + /* Render the element */ h5tools_str_reset(&buffer); h5tools_str_append(&buffer, "<%sData>", xmlnsprefix); @@ -2318,7 +2289,7 @@ xml_dump_attr(hid_t attr, const char *attr_name, const H5A_info_t H5_ATTR_UNUSED ctx.need_prefix = TRUE; h5tools_simple_prefix(rawoutstream, outputformat, &ctx, (hsize_t)0, 0); - + /* Render the element */ h5tools_str_reset(&buffer); h5tools_str_append(&buffer, "<%sNoData/>", xmlnsprefix); @@ -2328,7 +2299,7 @@ xml_dump_attr(hid_t attr, const char *attr_name, const H5A_info_t H5_ATTR_UNUSED ctx.need_prefix = TRUE; h5tools_simple_prefix(rawoutstream, outputformat, &ctx, (hsize_t)0, 0); - + /* Render the element */ h5tools_str_reset(&buffer); h5tools_str_append(&buffer, "", xmlnsprefix); @@ -2343,7 +2314,7 @@ xml_dump_attr(hid_t attr, const char *attr_name, const H5A_info_t H5_ATTR_UNUSED ctx.need_prefix = TRUE; h5tools_simple_prefix(rawoutstream, outputformat, &ctx, (hsize_t)0, 0); - + /* Render the element */ h5tools_str_reset(&buffer); h5tools_str_append(&buffer, "", xmlnsprefix); @@ -2358,7 +2329,7 @@ xml_dump_attr(hid_t attr, const char *attr_name, const H5A_info_t H5_ATTR_UNUSED ctx.need_prefix = TRUE; h5tools_simple_prefix(rawoutstream, outputformat, &ctx, (hsize_t)0, 0); - + /* Render the element */ h5tools_str_reset(&buffer); h5tools_str_append(&buffer, ""); @@ -2368,14 +2339,14 @@ xml_dump_attr(hid_t attr, const char *attr_name, const H5A_info_t H5_ATTR_UNUSED ctx.need_prefix = TRUE; h5tools_simple_prefix(rawoutstream, outputformat, &ctx, (hsize_t)0, 0); - + /* Render the element */ h5tools_str_reset(&buffer); h5tools_str_append(&buffer, "", xmlnsprefix); h5tools_render_element(rawoutstream, outputformat, &ctx, &buffer, &curr_pos, (size_t)outputformat->line_ncols, (hsize_t)0, (hsize_t)0); h5tools_str_close(&buffer); - + h5tools_setstatus(EXIT_FAILURE); return FAIL; } @@ -2389,17 +2360,14 @@ xml_dump_attr(hid_t attr, const char *attr_name, const H5A_info_t H5_ATTR_UNUSED * Return: herr_t * * Programmer: REMcG - * - * Modifications: - * *------------------------------------------------------------------------- */ void xml_dump_named_datatype(hid_t type, const char *name) { hsize_t curr_pos = 0; /* total data element position */ - h5tools_str_t buffer; /* string into which to render */ - h5tools_context_t ctx; /* print context */ + h5tools_str_t buffer; /* string into which to render */ + h5tools_context_t ctx; /* print context */ h5tool_format_t *outputformat = &xml_dataformat; h5tool_format_t string_dataformat; char *tmp; @@ -2420,7 +2388,7 @@ xml_dump_named_datatype(hid_t type, const char *name) HDmemset(&ctx, 0, sizeof(ctx)); ctx.indent_level = dump_indent / COL; ctx.cur_column = dump_indent; - + string_dataformat = *outputformat; if (fp_format) { @@ -2458,7 +2426,7 @@ xml_dump_named_datatype(hid_t type, const char *name) ctx.need_prefix = TRUE; h5tools_simple_prefix(rawoutstream, outputformat, &ctx, (hsize_t)0, 0); - + /* Render the element */ h5tools_str_reset(&buffer); h5tools_str_append(&buffer, "<%sNamedDataType Name=\"%s\" OBJ-XID=\"%s\" " @@ -2467,13 +2435,13 @@ xml_dump_named_datatype(hid_t type, const char *name) name, dtxid, parentxid, HDstrcmp(prefix,"") ? t_prefix : "/"); h5tools_render_element(rawoutstream, outputformat, &ctx, &buffer, &curr_pos, (size_t)outputformat->line_ncols, (hsize_t)0, (hsize_t)0); - } + } else { H5O_info_t oinfo; /* Object info */ ctx.need_prefix = TRUE; h5tools_simple_prefix(rawoutstream, outputformat, &ctx, (hsize_t)0, 0); - + /* Render the element */ h5tools_str_reset(&buffer); h5tools_str_append(&buffer, "<%sNamedDataType Name=\"%s\" OBJ-XID=\"%s\" " @@ -2496,7 +2464,7 @@ xml_dump_named_datatype(hid_t type, const char *name) error_msg("internal error (file %s:line %d)\n", __FILE__, __LINE__); h5tools_setstatus(EXIT_FAILURE); goto done; - } + } else if(found_obj->displayed) { /* We have already printed this named datatype, print it as a * NamedDatatypePtr @@ -2505,29 +2473,29 @@ xml_dump_named_datatype(hid_t type, const char *name) char *t_objname = xml_escape_the_name(found_obj->objname); ctx.indent_level++; - + xml_name_to_XID(found_obj->objname, pointerxid, (int)sizeof(pointerxid), 1); ctx.need_prefix = TRUE; h5tools_simple_prefix(rawoutstream, outputformat, &ctx, (hsize_t)0, 0); - + /* Render the element */ h5tools_str_reset(&buffer); h5tools_str_append(&buffer, "<%sNamedDatatypePtr OBJ-XID=\"%s\" H5Path=\"%s\"/>", xmlnsprefix, pointerxid, t_objname); h5tools_render_element(rawoutstream, outputformat, &ctx, &buffer, &curr_pos, (size_t)outputformat->line_ncols, (hsize_t)0, (hsize_t)0); - + ctx.indent_level--; ctx.need_prefix = TRUE; h5tools_simple_prefix(rawoutstream, outputformat, &ctx, (hsize_t)0, 0); - + /* Render the element */ h5tools_str_reset(&buffer); h5tools_str_append(&buffer, "", xmlnsprefix); h5tools_render_element(rawoutstream, outputformat, &ctx, &buffer, &curr_pos, (size_t)outputformat->line_ncols, (hsize_t)0, (hsize_t)0); HDfree(t_objname); goto done; - } + } else found_obj->displayed = TRUE; } @@ -2538,7 +2506,7 @@ xml_dump_named_datatype(hid_t type, const char *name) ctx.need_prefix = TRUE; h5tools_simple_prefix(rawoutstream, outputformat, &ctx, (hsize_t)0, 0); - + /* Render the element */ h5tools_str_reset(&buffer); h5tools_str_append(&buffer, "<%sDataType>",xmlnsprefix); @@ -2549,10 +2517,10 @@ xml_dump_named_datatype(hid_t type, const char *name) xml_print_datatype(type,1); ctx.indent_level--; dump_indent -= COL; - + ctx.need_prefix = TRUE; h5tools_simple_prefix(rawoutstream, outputformat, &ctx, (hsize_t)0, 0); - + /* Render the element */ h5tools_str_reset(&buffer); h5tools_str_append(&buffer, "",xmlnsprefix); @@ -2563,7 +2531,7 @@ xml_dump_named_datatype(hid_t type, const char *name) ctx.need_prefix = TRUE; h5tools_simple_prefix(rawoutstream, outputformat, &ctx, (hsize_t)0, 0); - + /* Render the element */ h5tools_str_reset(&buffer); h5tools_str_append(&buffer, "",xmlnsprefix); @@ -2589,11 +2557,6 @@ done: * Return: void * * Programmer: REMcG - * - * Modifications: - * Pedro Vicente, October 9, 2007 - * added parameters to H5A(L)iterate to allow for other iteration orders - * *------------------------------------------------------------------------- */ void @@ -2611,11 +2574,11 @@ xml_dump_group(hid_t gid, const char *name) char *cp = NULL; char *tmp = NULL; char *par = NULL; - h5tools_str_t buffer; /* string into which to render */ - h5tools_context_t ctx; /* print context */ - h5tool_format_t *outputformat = &xml_dataformat; - h5tool_format_t string_dataformat; - hsize_t curr_pos = 0; /* total data element position */ + h5tools_str_t buffer; /* string into which to render */ + h5tools_context_t ctx; /* print context */ + h5tool_format_t *outputformat = &xml_dataformat; + h5tool_format_t string_dataformat; + hsize_t curr_pos = 0; /* total data element position */ if ((gcpl_id = H5Gget_create_plist(gid)) < 0) { error_msg("error in getting group creation property list ID\n"); @@ -2645,7 +2608,7 @@ xml_dump_group(hid_t gid, const char *name) HDmemset(&ctx, 0, sizeof(ctx)); ctx.indent_level = dump_indent / COL; ctx.cur_column = dump_indent; - + string_dataformat = *outputformat; if (fp_format) { @@ -2733,7 +2696,7 @@ xml_dump_group(hid_t gid, const char *name) h5tools_render_element(rawoutstream, outputformat, &ctx, &buffer, &curr_pos, (size_t)outputformat->line_ncols, (hsize_t)0, (hsize_t)0); HDfree(t_objname); HDfree(par_name); - + ctx.indent_level++; t_objname = xml_escape_the_name(found_obj->objname);/* point to the NDT by name */ @@ -2751,7 +2714,7 @@ xml_dump_group(hid_t gid, const char *name) xmlnsprefix, ptrstr, t_objname, parentxid, par_name); h5tools_render_element(rawoutstream, outputformat, &ctx, &buffer, &curr_pos, (size_t)outputformat->line_ncols, (hsize_t)0, (hsize_t)0); - + ctx.indent_level--; HDfree(t_objname); @@ -2797,7 +2760,7 @@ xml_dump_group(hid_t gid, const char *name) found_obj->displayed = TRUE; /* 1. do all the attributes of the group */ - + ctx.indent_level++; dump_indent += COL; @@ -2880,7 +2843,7 @@ xml_dump_group(hid_t gid, const char *name) HDfree(parentxid); /* 1. do all the attributes of the group */ - + ctx.indent_level++; dump_indent += COL; @@ -2936,7 +2899,7 @@ xml_dump_group(hid_t gid, const char *name) h5tools_render_element(rawoutstream, outputformat, &ctx, &buffer, &curr_pos, (size_t)outputformat->line_ncols, (hsize_t)0, (hsize_t)0); h5tools_str_close(&buffer); - + if(par) HDfree(par); if(tmp) @@ -2951,27 +2914,24 @@ xml_dump_group(hid_t gid, const char *name) * Return: void * * Programmer: REMcG - * - * Modifications: - * *------------------------------------------------------------------------- */ static int xml_print_refs(hid_t did, int source) { - herr_t e; - hid_t type = -1; - hid_t space = -1; - hssize_t ssiz = -1; - hsize_t i; - size_t tsiz; - hobj_ref_t *refbuf = NULL; - char *buf = NULL; - h5tools_str_t buffer; /* string into which to render */ - h5tools_context_t ctx; /* print context */ + herr_t e; + hid_t type = -1; + hid_t space = -1; + hssize_t ssiz = -1; + hsize_t i; + size_t tsiz; + hobj_ref_t *refbuf = NULL; + char *buf = NULL; + h5tools_str_t buffer; /* string into which to render */ + h5tools_context_t ctx; /* print context */ h5tool_format_t *outputformat = &xml_dataformat; h5tool_format_t string_dataformat; - hsize_t curr_pos = 0; /* total data element position */ + hsize_t curr_pos = 0; /* total data element position */ if (source == DATASET_DATA) { type = H5Dget_type(did); @@ -3031,7 +2991,7 @@ xml_print_refs(hid_t did, int source) HDmemset(&ctx, 0, sizeof(ctx)); ctx.indent_level = dump_indent / COL; ctx.cur_column = dump_indent; - + string_dataformat = *outputformat; if (fp_format) { @@ -3085,7 +3045,7 @@ xml_print_refs(hid_t did, int source) H5Tclose(type); H5Sclose(space); return SUCCEED; - + error: if(buf) HDfree(buf); @@ -3105,30 +3065,27 @@ error: * Return: void * * Programmer: REMcG - * - * Modifications: - * *------------------------------------------------------------------------- */ static int xml_print_strs(hid_t did, int source) { - herr_t e; - hid_t type = -1; - hid_t space = -1; - hssize_t ssiz = -1; - htri_t is_vlstr = FALSE; - size_t tsiz = 0; - hsize_t i; - size_t str_size = 0; - char *bp = NULL; - char *onestring = NULL; - void *buf = NULL; - h5tools_str_t buffer; /* string into which to render */ - h5tools_context_t ctx; /* print context */ + herr_t e; + hid_t type = -1; + hid_t space = -1; + hssize_t ssiz = -1; + htri_t is_vlstr = FALSE; + size_t tsiz = 0; + hsize_t i; + size_t str_size = 0; + char *bp = NULL; + char *onestring = NULL; + void *buf = NULL; + h5tools_str_t buffer; /* string into which to render */ + h5tools_context_t ctx; /* print context */ h5tool_format_t *outputformat = &xml_dataformat; h5tool_format_t string_dataformat; - hsize_t curr_pos = 0; /* total data element position */ + hsize_t curr_pos = 0; /* total data element position */ if (source == DATASET_DATA) type = H5Dget_type(did); @@ -3184,7 +3141,7 @@ xml_print_strs(hid_t did, int source) HDmemset(&ctx, 0, sizeof(ctx)); ctx.indent_level = dump_indent / COL; ctx.cur_column = dump_indent; - + string_dataformat = *outputformat; if (fp_format) { @@ -3252,7 +3209,7 @@ xml_print_strs(hid_t did, int source) H5Tclose(type); H5Sclose(space); return SUCCEED; - + error: if(buf) HDfree(buf); @@ -3273,26 +3230,23 @@ error: * Return: void * * Programmer: REMcG - * - * Modifications: - * *------------------------------------------------------------------------- */ static void check_filters(hid_t dcpl) { - int nfilt; - int i; - H5Z_filter_t filter; - char namebuf[120]; - size_t cd_nelmts = 20; - unsigned int cd_values[20]; - unsigned int flags; - h5tools_str_t buffer; /* string into which to render */ - h5tools_context_t ctx; /* print context */ + int nfilt; + int i; + H5Z_filter_t filter; + char namebuf[120]; + size_t cd_nelmts = 20; + unsigned int cd_values[20]; + unsigned int flags; + h5tools_str_t buffer; /* string into which to render */ + h5tools_context_t ctx; /* print context */ h5tool_format_t *outputformat = &xml_dataformat; h5tool_format_t string_dataformat; - hsize_t curr_pos = 0; /* total data element position */ + hsize_t curr_pos = 0; /* total data element position */ /* setup */ HDmemset(&buffer, 0, sizeof(h5tools_str_t)); @@ -3300,7 +3254,7 @@ check_filters(hid_t dcpl) HDmemset(&ctx, 0, sizeof(ctx)); ctx.indent_level = dump_indent / COL; ctx.cur_column = dump_indent; - + string_dataformat = *outputformat; if (fp_format) { @@ -3423,16 +3377,16 @@ check_filters(hid_t dcpl) static void xml_dump_fill_value(hid_t dcpl, hid_t type) { - size_t sz; - size_t i; - hsize_t space; - void *buf; - char *name; - h5tools_str_t buffer; /* string into which to render */ - h5tools_context_t ctx; /* print context */ + size_t sz; + size_t i; + hsize_t space; + void *buf; + char *name; + h5tools_str_t buffer; /* string into which to render */ + h5tools_context_t ctx; /* print context */ h5tool_format_t *outputformat = &xml_dataformat; h5tool_format_t string_dataformat; - hsize_t curr_pos = 0; /* total data element position */ + hsize_t curr_pos = 0; /* total data element position */ /* setup */ HDmemset(&buffer, 0, sizeof(h5tools_str_t)); @@ -3440,7 +3394,7 @@ xml_dump_fill_value(hid_t dcpl, hid_t type) HDmemset(&ctx, 0, sizeof(ctx)); ctx.indent_level = dump_indent / COL; ctx.cur_column = dump_indent; - + string_dataformat = *outputformat; if (fp_format) { @@ -3452,7 +3406,7 @@ xml_dump_fill_value(hid_t dcpl, hid_t type) string_dataformat.line_ncols = 65535; string_dataformat.line_per_line = 1; } - else + else string_dataformat.line_ncols = h5tools_nCols; string_dataformat.do_escape = display_escape; @@ -3764,11 +3718,6 @@ xml_dump_fill_value(hid_t dcpl, hid_t type) * Return: void * * Programmer: REMcG - * - * Modifications: - * Pedro Vicente, October 9, 2007 - * added parameters to H5Aiterate2 to allow for other iteration orders - * *------------------------------------------------------------------------- */ void @@ -3791,11 +3740,11 @@ xml_dump_dataset(hid_t did, const char *name, struct subset_t H5_ATTR_UNUSED * s char *t_prefix; unsigned attr_crt_order_flags; h5tools_str_t buffer; /* string into which to render */ - h5tools_context_t ctx; /* print context */ + h5tools_context_t ctx; /* print context */ h5tool_format_t *outputformat = &xml_dataformat; h5tool_format_t string_dataformat; - hsize_t curr_pos = 0; /* total data element position */ - + hsize_t curr_pos = 0; /* total data element position */ + char *rstr = (char*) HDmalloc((size_t)100); char *pstr = (char*) HDmalloc((size_t)100); @@ -3814,7 +3763,7 @@ xml_dump_dataset(hid_t did, const char *name, struct subset_t H5_ATTR_UNUSED * s t_name = xml_escape_the_name(name); t_tmp = xml_escape_the_name(tmp); t_prefix = xml_escape_the_name(prefix); - + string_dataformat = *outputformat; if (fp_format) { @@ -3925,7 +3874,7 @@ xml_dump_dataset(hid_t did, const char *name, struct subset_t H5_ATTR_UNUSED * s ctx.indent_level--; dump_indent -= COL; - + ctx.need_prefix = TRUE; h5tools_simple_prefix(rawoutstream, outputformat, &ctx, (hsize_t)0, 0); @@ -4376,9 +4325,6 @@ xml_dump_dataset(hid_t did, const char *name, struct subset_t H5_ATTR_UNUSED * s * Return: void * * Programmer: REMcG - * - * Modifications: - * *------------------------------------------------------------------------- */ static void @@ -4392,11 +4338,11 @@ xml_print_enum(hid_t type) size_t dst_size; /*destination value type size */ unsigned i; /*miscellaneous counters */ size_t j; - h5tools_str_t buffer; /* string into which to render */ - h5tools_context_t ctx; /* print context */ - h5tool_format_t *outputformat = &xml_dataformat; - h5tool_format_t string_dataformat; - hsize_t curr_pos = 0; /* total data element position */ + h5tools_str_t buffer; /* string into which to render */ + h5tools_context_t ctx; /* print context */ + h5tool_format_t *outputformat = &xml_dataformat; + h5tool_format_t string_dataformat; + hsize_t curr_pos = 0; /* total data element position */ /* setup */ HDmemset(&buffer, 0, sizeof(h5tools_str_t)); @@ -4404,7 +4350,7 @@ xml_print_enum(hid_t type) HDmemset(&ctx, 0, sizeof(ctx)); ctx.indent_level = dump_indent / COL; ctx.cur_column = dump_indent; - + string_dataformat = *outputformat; if (fp_format) { @@ -4455,11 +4401,11 @@ xml_print_enum(hid_t type) if (H5T_SGN_NONE == H5Tget_sign(type)) { native = H5T_NATIVE_ULLONG; - } + } else { native = H5T_NATIVE_LLONG; } - } + } else { dst_size = H5Tget_size(type); } @@ -4530,11 +4476,11 @@ xml_print_enum(hid_t type) for (j = 0; j < dst_size; j++) h5tools_str_append(&buffer, "%02x", value[i * dst_size + j]); - } + } else if (H5T_SGN_NONE == H5Tget_sign(native)) { h5tools_str_append(&buffer,"%" H5_PRINTF_LL_WIDTH "u", *((unsigned long long *) ((void *) (value + i * dst_size)))); - } + } else { h5tools_str_append(&buffer,"%" H5_PRINTF_LL_WIDTH "d", *((long long *) ((void *) (value + i * dst_size)))); diff --git a/tools/src/h5ls/h5ls.c b/tools/src/h5ls/h5ls.c index 8e28d82..8c18794 100644 --- a/tools/src/h5ls/h5ls.c +++ b/tools/src/h5ls/h5ls.c @@ -1620,7 +1620,7 @@ list_attr(hid_t obj, const char *attr_name, const H5A_info_t H5_ATTR_UNUSED *ain if(hexdump_g) p_type = H5Tcopy(type); else - p_type = h5tools_get_native_type(type); + p_type = H5Tget_native_type(type, H5T_DIR_DEFAULT); if(p_type >= 0) { /* VL data special information */ diff --git a/tools/src/h5repack/h5repack_refs.c b/tools/src/h5repack/h5repack_refs.c index 2c38d94..408142c 100644 --- a/tools/src/h5repack/h5repack_refs.c +++ b/tools/src/h5repack/h5repack_refs.c @@ -25,7 +25,7 @@ static const char* MapIdToName(hid_t refobj_id,trav_table_t *travt); static int copy_refs_attr(hid_t loc_in, hid_t loc_out, pack_opt_t *options, trav_table_t *travt, hid_t fidout); static herr_t update_ref_value(hid_t obj_id, H5R_type_t ref_type, void *ref_in, - hid_t fid_out, void *ref_out, trav_table_t *travt); + hid_t fid_out, void *ref_out, trav_table_t *travt); /*------------------------------------------------------------------------- * Function: do_copy_refobjs @@ -126,8 +126,8 @@ int do_copy_refobjs(hid_t fidin, for(k = 0; k < rank; k++) nelmts *= dims[k]; - if((mtype_id = h5tools_get_native_type(ftype_id)) < 0) - HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "h5tools_get_native_type failed"); + if((mtype_id = H5Tget_native_type(ftype_id, H5T_DIR_DEFAULT)) < 0) + HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Tget_native_type failed"); if((msize = H5Tget_size(mtype_id)) == 0) HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Tget_size failed"); @@ -425,13 +425,13 @@ done: * Programmer: Pedro Vicente, pvn@ncsa.uiuc.edu * * Modifier: xcao@hdfgroup.org, 9/12/2011 - * Update values of references(object and region) for the following types: + * Update values of references(object and region) for the following types: * 1) References, * 2) ARRAY of reference, * 3) VLEN of references. * 4) COMPOUND of references. * This function does not handle references in other complicated structures, - * such as references in nested compound datatypes. + * such as references in nested compound datatypes. * * Date: October, 28, 2003 * @@ -472,7 +472,7 @@ static int copy_refs_attr(hid_t loc_in, HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Oget_info failed"); for(u = 0; u < (unsigned)oinfo.num_attrs; u++) { - is_ref = is_ref_vlen = is_ref_array = is_ref_comp = 0; + is_ref = is_ref_vlen = is_ref_array = is_ref_comp = 0; /* open attribute */ if((attr_id = H5Aopen_by_idx(loc_in, ".", H5_INDEX_CRT_ORDER, H5_ITER_INC, (hsize_t)u, H5P_DEFAULT, H5P_DEFAULT)) < 0) @@ -484,8 +484,8 @@ static int copy_refs_attr(hid_t loc_in, type_class = H5Tget_class(ftype_id); - if((mtype_id = h5tools_get_native_type(ftype_id)) < 0) - HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "h5tools_get_native_type failed"); + if((mtype_id = H5Tget_native_type(ftype_id, H5T_DIR_DEFAULT)) < 0) + HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Tget_native_type failed"); if((msize = H5Tget_size(mtype_id)) == 0) HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Tget_size failed"); @@ -528,9 +528,9 @@ static int copy_refs_attr(hid_t loc_in, } H5Tclose(mtid); } - - /* if compound don't contain reference type member, free the above - * mallocs. Otherwise there can be memory leaks by the 'continue' + + /* if compound don't contain reference type member, free the above + * mallocs. Otherwise there can be memory leaks by the 'continue' * statement below. */ if (!ref_comp_field_n) { if (ref_comp_index) { @@ -539,7 +539,7 @@ static int copy_refs_attr(hid_t loc_in, } if (ref_comp_size) { - HDfree(ref_comp_size); + HDfree(ref_comp_size); ref_comp_size = NULL; } } @@ -588,7 +588,7 @@ static int copy_refs_attr(hid_t loc_in, array_rank = (unsigned)H5Tget_array_ndims(mtype_id); H5Tget_array_dims2(mtype_id, array_dims); for(j = 0; j /dev/null 2>&1 ; then echo " PASSED" else diff --git a/tools/test/h5dump/h5dumpgentest.c b/tools/test/h5dump/h5dumpgentest.c index 48bc27d..169eddb 100644 --- a/tools/test/h5dump/h5dumpgentest.c +++ b/tools/test/h5dump/h5dumpgentest.c @@ -9717,18 +9717,19 @@ static void gent_bitnopaquefields(void) /* Compound datatype */ typedef struct s_t { - unsigned char a; - unsigned int b; - unsigned long c; - unsigned long long d; + uint8_t a; + uint16_t b; + uint32_t c; + uint64_t d; } s_t; + hid_t file, grp=-1, type=-1, space=-1, dset=-1; size_t i; hsize_t nelmts = F80_DIM32; - unsigned char buf[F80_DIM32]; /* bitfield, opaque */ - unsigned int buf2[F80_DIM32]; /* bitfield, opaque */ - unsigned long buf3[F80_DIM32]; /* bitfield, opaque */ - unsigned long long buf4[F80_DIM32]; /* bitfield, opaque */ + uint8_t buf[F80_DIM32]; /* bitfield, opaque */ + uint16_t buf2[F80_DIM32]; /* bitfield, opaque */ + uint32_t buf3[F80_DIM32]; /* bitfield, opaque */ + uint64_t buf4[F80_DIM32]; /* bitfield, opaque */ s_t buf5[F80_DIM32]; /* compound */ file = H5Fcreate(FILE80, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT); @@ -9739,7 +9740,7 @@ static void gent_bitnopaquefields(void) if ((space = H5Screate_simple(1, &nelmts, NULL)) >= 0) { if ((dset = H5Dcreate2(grp, "bitfield_1", type, space, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) >= 0) { for (i = 0; i < nelmts; i++) { - buf[i] = (unsigned char)0xff ^ (unsigned char)i; + buf[i] = (uint8_t)0xff ^ (uint8_t)i; } H5Dwrite(dset, type, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf); H5Dclose(dset); @@ -9754,7 +9755,7 @@ static void gent_bitnopaquefields(void) if ((space = H5Screate_simple(1, &nelmts, NULL)) >= 0) { if ((dset = H5Dcreate2(grp, "bitfield_2", type, space, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) >= 0) { for (i = 0; i < nelmts; i++) { - buf2[i] = (unsigned int)0xffff ^ (unsigned int)(i * 16); + buf2[i] = (uint16_t)0xffff ^ (uint16_t)(i * 16); } H5Dwrite(dset, type, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf2); H5Dclose(dset); @@ -9769,7 +9770,7 @@ static void gent_bitnopaquefields(void) if ((space = H5Screate_simple(1, &nelmts, NULL)) >= 0) { if ((dset = H5Dcreate2(grp, "bitfield_3", type, space, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) >= 0) { for (i = 0; i < nelmts; i++) { - buf3[i] = (unsigned long)0xffffffff ^ (unsigned long)(i * 32); + buf3[i] = (uint32_t)0xffffffff ^ (uint32_t)(i * 32); } H5Dwrite(dset, type, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf3); H5Dclose(dset); @@ -9784,7 +9785,7 @@ static void gent_bitnopaquefields(void) if ((space = H5Screate_simple(1, &nelmts, NULL)) >= 0) { if ((dset = H5Dcreate2(grp, "bitfield_4", type, space, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) >= 0) { for (i = 0; i < nelmts; i++) { - buf4[i] = (unsigned long long)0xffffffffffffffff ^ (unsigned long long)(i * 64); + buf4[i] = (uint64_t)0xffffffffffffffff ^ (uint64_t)(i * 64); } H5Dwrite(dset, type, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf4); H5Dclose(dset); @@ -9804,7 +9805,7 @@ static void gent_bitnopaquefields(void) if ((space = H5Screate_simple(1, &nelmts, NULL)) >= 0) { if ((dset = H5Dcreate2(grp, "opaque_1", type, space, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) >= 0) { for(i = 0; i < nelmts; i++) - buf[i] = (unsigned char)0xff ^ (unsigned char)i; + buf[i] = (uint8_t)0xff ^ (uint8_t)i; H5Dwrite(dset, type, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf); H5Dclose(dset); } @@ -9820,7 +9821,7 @@ static void gent_bitnopaquefields(void) if ((space = H5Screate_simple(1, &nelmts, NULL)) >= 0) { if ((dset = H5Dcreate2(grp, "opaque_2", type, space, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) >= 0) { for(i = 0; i < nelmts; i++) - buf2[i] = (unsigned int)0xffff ^ (unsigned int)(i * 16); + buf2[i] = (uint16_t)0xffff ^ (uint16_t)(i * 16); H5Dwrite(dset, type, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf2); H5Dclose(dset); @@ -9843,10 +9844,10 @@ static void gent_bitnopaquefields(void) if ((space = H5Screate_simple(1, &nelmts, NULL)) >= 0) { if ((dset = H5Dcreate2(grp, "compound_1", type, space, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) >= 0) { for(i = 0; i < nelmts; i++) { - buf5[i].a = (unsigned char)0xff ^ (unsigned char)i; - buf5[i].b = (unsigned int)0xffff ^ (unsigned int)(i * 16); - buf5[i].c = (unsigned long)0xffffffff ^ (unsigned long)(i * 32); - buf5[i].d = (unsigned long long)0xffffffffffffffff ^ (unsigned long long)(i * 64); + buf5[i].a = (uint8_t)0xff ^ (uint8_t)i; + buf5[i].b = (uint16_t)0xffff ^ (uint16_t)(i * 16); + buf5[i].c = (uint32_t)0xffffffff ^ (uint32_t)(i * 32); + buf5[i].d = (uint64_t)0xffffffffffffffff ^ (uint64_t)(i * 64); } H5Dwrite(dset, type, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf5); diff --git a/tools/test/h5dump/testh5dump.sh.in b/tools/test/h5dump/testh5dump.sh.in index cf5f246..1136742 100644 --- a/tools/test/h5dump/testh5dump.sh.in +++ b/tools/test/h5dump/testh5dump.sh.in @@ -42,6 +42,8 @@ AWK='awk' # Skip plugin module to test missing filter ENVCMD="env HDF5_PLUGIN_PRELOAD=::" +WORDS_BIGENDIAN="@WORDS_BIGENDIAN@" + nerrors=0 verbose=yes @@ -97,6 +99,7 @@ $SRC_H5DUMP_TESTFILES/tattrintsize.h5 $SRC_H5DUMP_TESTFILES/tattrreg.h5 $SRC_H5DUMP_TESTFILES/tbigdims.h5 $SRC_H5DUMP_TESTFILES/tbinary.h5 +$SRC_H5DUMP_TESTFILES/tbitnopaque.h5 $SRC_H5DUMP_TESTFILES/tchar.h5 $SRC_H5DUMP_TESTFILES/tcmpdattrintsize.h5 $SRC_H5DUMP_TESTFILES/tcmpdintsize.h5 @@ -217,6 +220,8 @@ $SRC_H5DUMP_TESTFILES/tbin3.ddl $SRC_H5DUMP_TESTFILES/tbin4.ddl $SRC_H5DUMP_TESTFILES/tbinregR.ddl $SRC_H5DUMP_TESTFILES/tbigdims.ddl +$SRC_H5DUMP_TESTFILES/tbitnopaque_be.ddl +$SRC_H5DUMP_TESTFILES/tbitnopaque_le.ddl $SRC_H5DUMP_TESTFILES/tboot1.ddl $SRC_H5DUMP_TESTFILES/tboot2.ddl $SRC_H5DUMP_TESTFILES/tboot2A.ddl @@ -487,6 +492,8 @@ TOOLTEST() { # 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" else @@ -529,11 +536,15 @@ TOOLTEST2() { # 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 $CMP $expect $actual; then if [ ! -f $expectdata ]; then # Create the expect data file if it doesn't yet exist. echo " CREATED" cp $actualdata $expectdata + echo " Expected data (*.exp) missing" + nerrors="`expr $nerrors + 1`" elif $CMP $expectdata $actualdata; then echo " PASSED" else @@ -584,16 +595,22 @@ TOOLTEST2A() { # 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 $CMP $expect $actual; then if [ ! -f $expectdata ]; then # Create the expect data file if it doesn't yet exist. echo " CREATED" cp $actualdata $expectdata + echo " Expected data (*.exp) missing" + nerrors="`expr $nerrors + 1`" elif $DIFF $expectdata $actualdata; then if [ ! -f $expectmeta ]; then # Create the expect meta file if it doesn't yet exist. echo " CREATED" cp $actualmeta $expectmeta + echo " Expected metafile (*.ddl) missing" + nerrors="`expr $nerrors + 1`" elif $CMP $expectmeta $actualmeta; then echo " PASSED" else @@ -645,6 +662,8 @@ TOOLTEST2B() { # Create the expect data file if it doesn't yet exist. echo " CREATED" cp $actualdata $expectdata + echo " Expected data (*.exp) missing" + nerrors="`expr $nerrors + 1`" elif $CMP $expectdata $actualdata; then echo " PASSED" else @@ -700,6 +719,8 @@ TOOLTEST3() { # 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 $CMP $expect $actual; then echo " PASSED" else @@ -757,15 +778,17 @@ TOOLTEST4() { # 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 $CMP $expect $actual; then if $CMP $expect_err $actual_ext; then echo " PASSED" - else - echo "*FAILED*" - echo " Expected result (*.err) differs from actual result (*.oerr)" - nerrors="`expr $nerrors + 1`" - test yes = "$verbose" && $DIFF $expect_err $actual_ext |sed 's/^/ /' - fi + else + echo "*FAILED*" + echo " Expected result (*.err) differs from actual result (*.oerr)" + nerrors="`expr $nerrors + 1`" + test yes = "$verbose" && $DIFF $expect_err $actual_ext |sed 's/^/ /' + fi else echo "*FAILED*" echo " Expected result (*.ddl) differs from actual result (*.out)" @@ -821,15 +844,17 @@ TOOLTEST5() { # 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 $CMP $expect $actual; then if $CMP $expect_err $actual_ext; then echo " PASSED" - else - echo "*FAILED*" - echo " Expected result (*.err) differs from actual result (*.oerr)" - nerrors="`expr $nerrors + 1`" - test yes = "$verbose" && $DIFF $expect_err $actual_ext |sed 's/^/ /' - fi + else + echo "*FAILED*" + echo " Expected result (*.err) differs from actual result (*.oerr)" + nerrors="`expr $nerrors + 1`" + test yes = "$verbose" && $DIFF $expect_err $actual_ext |sed 's/^/ /' + fi else echo "*FAILED*" echo " Expected result (*.ddl) differs from actual result (*.out)" @@ -863,6 +888,8 @@ TOOLTEST_HELP() { # Create the expect data file if it doesn't yet exist. echo " CREATED" cp $actual $expect-CREATED + echo " Expected output (*.txt) missing" + nerrors="`expr $nerrors + 1`" elif $CMP $expect $actual; then echo " PASSED" else @@ -1036,9 +1063,13 @@ TOOLTEST tcomp-2.ddl --enable-error-stack -N /type1 --any_path /type2 --any_path TOOLTEST4 tcomp-3.ddl --enable-error-stack -t /#6632 -g /group2 tcompound.h5 # test complicated compound datatype TOOLTEST tcomp-4.ddl --enable-error-stack tcompound_complex.h5 -TOOLTEST tcompound_complex.ddl --enable-error-stack tcompound_complex2.h5 +TOOLTEST tcompound_complex2.ddl --enable-error-stack tcompound_complex2.h5 # tests for bitfields and opaque data types -TOOLTEST tbitnopaque.ddl --enable-error-stack tbitnopaque.h5 +if test $WORDS_BIGENDIAN != "yes"; then +TOOLTEST tbitnopaque_le.ddl --enable-error-stack tbitnopaque.h5 +else +TOOLTEST tbitnopaque_be.ddl --enable-error-stack tbitnopaque.h5 +fi #test for the nested compound type TOOLTEST tnestcomp-1.ddl --enable-error-stack tnestedcomp.h5 diff --git a/tools/test/h5dump/testh5dumppbits.sh.in b/tools/test/h5dump/testh5dumppbits.sh.in index 3b9b078..9cf5c99 100644 --- a/tools/test/h5dump/testh5dumppbits.sh.in +++ b/tools/test/h5dump/testh5dumppbits.sh.in @@ -241,6 +241,8 @@ TOOLTEST() { # 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 $CMP $expect $actual; then echo " PASSED" else @@ -282,11 +284,15 @@ TOOLTEST2() { # 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 $CMP $expect $actual; then if [ ! -f $expectdata ]; then # Create the expect data file if it doesn't yet exist. echo " CREATED" cp $actualdata $expectdata + echo " Expected data (*.exp) missing" + nerrors="`expr $nerrors + 1`" elif $CMP $expectdata $actualdata; then echo " PASSED" else @@ -348,6 +354,8 @@ TOOLTEST3() { # 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 $CMP $expect $actual; then echo " PASSED" else @@ -404,15 +412,17 @@ TOOLTEST4() { # 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 $CMP $expect $actual; then if $CMP $expect_err $actual_ext; then echo " PASSED" - else - echo "*FAILED*" - echo " Expected result (*.err) differs from actual result (*.oerr)" - nerrors="`expr $nerrors + 1`" - test yes = "$verbose" && $DIFF $expect_err $actual_ext |sed 's/^/ /' - fi + else + echo "*FAILED*" + echo " Expected result (*.err) differs from actual result (*.oerr)" + nerrors="`expr $nerrors + 1`" + test yes = "$verbose" && $DIFF $expect_err $actual_ext |sed 's/^/ /' + fi else echo "*FAILED*" echo " Expected result (*.ddl) differs from actual result (*.out)" diff --git a/tools/test/h5dump/testh5dumpvds.sh.in b/tools/test/h5dump/testh5dumpvds.sh.in index 63c0d85..f89234e 100644 --- a/tools/test/h5dump/testh5dumpvds.sh.in +++ b/tools/test/h5dump/testh5dumpvds.sh.in @@ -220,6 +220,8 @@ TOOLTEST() { # 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 $CMP $expect $actual; then echo " PASSED" else @@ -261,11 +263,15 @@ TOOLTEST2() { # 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 $CMP $expect $actual; then if [ ! -f $expectdata ]; then # Create the expect data file if it doesn't yet exist. echo " CREATED" cp $actualdata $expectdata + echo " Expected data (*.exp) missing" + nerrors="`expr $nerrors + 1`" elif $CMP $expectdata $actualdata; then echo " PASSED" else @@ -327,6 +333,8 @@ TOOLTEST3() { # 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 $CMP $expect $actual; then echo " PASSED" else diff --git a/tools/test/h5dump/testh5dumpxml.sh.in b/tools/test/h5dump/testh5dumpxml.sh.in index 5a69845..5f62946 100644 --- a/tools/test/h5dump/testh5dumpxml.sh.in +++ b/tools/test/h5dump/testh5dumpxml.sh.in @@ -30,6 +30,8 @@ DIRNAME='dirname' LS='ls' AWK='awk' +WORDS_BIGENDIAN="@WORDS_BIGENDIAN@" + nerrors=0 verbose=yes @@ -124,7 +126,8 @@ $SRC_H5DUMP_TESTFILES/tarray3.h5.xml $SRC_H5DUMP_TESTFILES/tarray6.h5.xml $SRC_H5DUMP_TESTFILES/tarray7.h5.xml $SRC_H5DUMP_TESTFILES/tattr.h5.xml -$SRC_H5DUMP_TESTFILES/tbitfields.h5.xml +$SRC_H5DUMP_TESTFILES/tbitfields_be.h5.xml +$SRC_H5DUMP_TESTFILES/tbitfields_le.h5.xml $SRC_H5DUMP_TESTFILES/tcompound_complex.h5.xml $SRC_H5DUMP_TESTFILES/tcompound.h5.xml $SRC_H5DUMP_TESTFILES/tcompound2.h5.xml @@ -202,10 +205,10 @@ COPY_TESTFILES_TO_TESTDIR() INODE_SDIR=`$LS -i -d $SDIR | $AWK -F' ' '{print $1}'` INODE_DDIR=`$LS -i -d $TESTDIR | $AWK -F' ' '{print $1}'` if [ "$INODE_SDIR" != "$INODE_DDIR" ]; then - $CP -f $tstfile $TESTDIR + $CP -f $tstfile $TESTDIR if [ $? -ne 0 ]; then echo "Error: FAILED to copy $tstfile ." - + # Comment out this to CREATE expected file exit $EXIT_FAILURE fi @@ -263,7 +266,9 @@ TOOLTEST() { if [ ! -f $expect ]; then # Create the expect file if it doesn't yet exist. echo " CREATED" - cp $actual $expect + cp $actual $expect + echo " Expected result (*.xml) missing" + nerrors="`expr $nerrors + 1`" elif $CMP $expect $actual; then echo " PASSED" else @@ -279,7 +284,7 @@ TOOLTEST() { fi } -# Print a "SKIP" message +# Print a "SKIP" message SKIP() { TESTING $DUMPER $@ echo " -SKIP-" @@ -297,7 +302,11 @@ COPY_TESTFILES_TO_TESTDIR # test XML TOOLTEST tall.h5.xml --xml tall.h5 TOOLTEST tattr.h5.xml --xml tattr.h5 -TOOLTEST tbitfields.h5.xml --xml tbitfields.h5 +if test $WORDS_BIGENDIAN != "yes"; then +TOOLTEST tbitfields_le.h5.xml --xml tbitfields.h5 +else +TOOLTEST tbitfields_be.h5.xml --xml tbitfields.h5 +fi TOOLTEST tcompound.h5.xml --xml tcompound.h5 TOOLTEST tcompound2.h5.xml --xml tcompound2.h5 TOOLTEST tdatareg.h5.xml --xml tdatareg.h5 @@ -345,7 +354,7 @@ TOOLTEST tsaf.h5.xml --xml tsaf.h5 TOOLTEST tempty.h5.xml --xml tempty.h5 TOOLTEST tnamed_dtype_attr.h5.xml --xml tnamed_dtype_attr.h5 ##Test dataset and attribute of null space. Commented out: -## wait until the XML schema is updated for null space. +## wait until the XML schema is updated for null space. ##TOOLTEST tnullspace.h5.xml --xml tnulspace.h5 # other options for xml @@ -356,7 +365,7 @@ TOOLTEST tempty-nons.h5.xml --xml -X ":" tempty.h5 TOOLTEST tempty-nons-2.h5.xml --xml --xml-ns=":" tempty.h5 ## Some of these combinations are syntactically correct but -## the URLs are dummies +## the URLs are dummies TOOLTEST tempty-ns.h5.xml --xml -X "thing:" tempty.h5 TOOLTEST tempty-ns-2.h5.xml --xml --xml-ns="thing:" tempty.h5 TOOLTEST tempty-nons-uri.h5.xml --xml --xml-ns=":" --xml-dtd="http://somewhere.net" tempty.h5 diff --git a/tools/test/h5jam/testh5jam.sh.in b/tools/test/h5jam/testh5jam.sh.in index d3d7a9a..3ae180b 100644 --- a/tools/test/h5jam/testh5jam.sh.in +++ b/tools/test/h5jam/testh5jam.sh.in @@ -107,10 +107,10 @@ COPY_TESTFILES_TO_TESTDIR() INODE_SDIR=`$LS -i -d $SDIR | $AWK -F' ' '{print $1}'` INODE_DDIR=`$LS -i -d $TESTDIR | $AWK -F' ' '{print $1}'` if [ "$INODE_SDIR" != "$INODE_DDIR" ]; then - $CP -f $tstfile $TESTDIR + $CP -f $tstfile $TESTDIR if [ $? -ne 0 ]; then echo "Error: FAILED to copy $tstfile ." - + # Comment out this to CREATE expected file exit $EXIT_FAILURE fi @@ -154,19 +154,19 @@ SKIP() { echo " -SKIP-" } -# +# # COMPARE_FILES a.h5 b.h5 -# Compare two files, skipping the first line. This is used to +# Compare two files, skipping the first line. This is used to # compare the output of the dumper, skipping the file name which # is different. # The result is stored in 'compval'. # cmpval=0; COMPARE_FILES() { - $AWK 'NR > 1' $1 > $1.cmp - $AWK 'NR > 1' $2 > $2.cmp - $CMP $1.cmp $2.cmp - cmpval=$? + $AWK 'NR > 1' $1 > $1.cmp + $AWK 'NR > 1' $2 > $2.cmp + $CMP $1.cmp $2.cmp + cmpval=$? rm -f $1.cmp $2.cmp } @@ -174,10 +174,10 @@ COMPARE_FILES() { # Clean up named files. CLEANUP() { if test -z "$HDF5_NOCLEANUP"; then - for i in $* - do - rm -f $i - done + for i in $* + do + rm -f $i + done fi } @@ -190,7 +190,7 @@ CLEANUP() { # the "cat" command. # SETUP() { - cat < $1 > $2 + cat < $1 > $2 } # @@ -233,7 +233,7 @@ CHECKFILE() { } # -# CHECK_UB file.h5 user_block_file origfile.h5 +# CHECK_UB file.h5 user_block_file origfile.h5 # # Check the user block in 'file.h5' is the same as # 'user_block' (allowing for padding). @@ -243,73 +243,73 @@ CHECKFILE() { # and the test file compared to: # cat compare_ub user_block_file. # -# This test uses './getub' to extract the user block from +# This test uses './getub' to extract the user block from # 'file.h5', which is compared to the file described above. # # The result is set in variable 'result1'. # result1=0; CHECK_UB_1() { - hfile="$1" - ufile="$2" - - # check for third argument (the original file) - origfile=""; - if [ -n "$3" ]; - then - origfile="$3" - fi - - # find the length of the user block to check - s1=`cat $ufile | wc -c | sed -e 's/ //g'` - if [ "$s1" = "0" ]; - then - echo "File "$ufile" is empty" - result1=1; - fi - - # Get the size of the original user block, if any. - if [ -n "$origfile" ]; - then - # 'tellub' calls H5Fget_user_block to get the size - # of the user block - s2=`$JAM_BIN/tellub $origfile` - if [ "$s2" = "0" ]; - then - size=$s1; - cmpfile=$ufile - else - cmpfile="tt2" - size=`expr $s2 + $s1` - $JAM_BIN/getub -c $s2 $origfile > $cmpfile - cat $ufile >> $cmpfile - fi - else - # assume no user block - s2="0" - size=$s1; - cmpfile=$ufile - fi - - # Extract 'size' bytes from the front of 'hfile' - # Compare to 'cmpfile', result is set in result1 - tfile="tt1" - $JAM_BIN/getub -c $size $hfile > $tfile - res=`cmp $cmpfile $tfile` - if [ "$?" != "0" ]; - then - echo $res - result1=1; - else - result1=0; - fi - - # clean up - rm -f $tfile - if [ "$s2" != "0" ] ; - then - rm -f $cmpfile - fi + hfile="$1" + ufile="$2" + + # check for third argument (the original file) + origfile=""; + if [ -n "$3" ]; + then + origfile="$3" + fi + + # find the length of the user block to check + s1=`cat $ufile | wc -c | sed -e 's/ //g'` + if [ "$s1" = "0" ]; + then + echo "File "$ufile" is empty" + result1=1; + fi + + # Get the size of the original user block, if any. + if [ -n "$origfile" ]; + then + # 'tellub' calls H5Fget_user_block to get the size + # of the user block + s2=`$JAM_BIN/tellub $origfile` + if [ "$s2" = "0" ]; + then + size=$s1; + cmpfile=$ufile + else + cmpfile="tt2" + size=`expr $s2 + $s1` + $JAM_BIN/getub -c $s2 $origfile > $cmpfile + cat $ufile >> $cmpfile + fi + else + # assume no user block + s2="0" + size=$s1; + cmpfile=$ufile + fi + + # Extract 'size' bytes from the front of 'hfile' + # Compare to 'cmpfile', result is set in result1 + tfile="tt1" + $JAM_BIN/getub -c $size $hfile > $tfile + res=`cmp $cmpfile $tfile` + if [ "$?" != "0" ]; + then + echo $res + result1=1; + else + result1=0; + fi + + # clean up + rm -f $tfile + if [ "$s2" != "0" ] ; + then + rm -f $cmpfile + fi } @@ -321,25 +321,25 @@ CHECK_UB_1() { result2=0; CHECK_NOUB() { - hfile="$1" - - # call 'ubsize' to get the size of the user block - ubsize=`$JAM_BIN/tellub $hfile` - - if [ "$?" != "0" ]; - then - # error - result2=1; - else - if [ "$ubsize" = "0" ]; - then - # pass - result2=0; - else - # fail - result2=1; - fi - fi + hfile="$1" + + # call 'ubsize' to get the size of the user block + ubsize=`$JAM_BIN/tellub $hfile` + + if [ "$?" != "0" ]; + then + # error + result2=1; + else + if [ "$ubsize" = "0" ]; + then + # pass + result2=0; + else + # fail + result2=1; + fi + fi } # JAMTEST user_block file.h5 [--clobber] [ofile.h5] @@ -351,119 +351,119 @@ CHECK_NOUB() { # 3. check the user block is correct in the output (Check_UB) # If the user block is correct, print "PASSED", else "*FAILED*" JAMTEST() { - ufile="$1" - ifile="$2" - compare_test="" # the file to test - compare_orig="" # the comparison to test against - cleanup="" - - # sort out the arguments for the test and the check - do_clobber="no" - if [ "$3" = "--clobber" ]; - then - # clobber overwrites any existing user block - do_clobber="yes" - clobber="--clobber" - compare_orig="" - if [ -z "$4" ]; - then - # output goes to infile, compare ubfile to infile - ofile="" - compare_test="$ifile" - else - # output goes to $4, compare ofile to ubfile - ofile="$4" - compare_test="$ofile" - fi - else - clobber="" - # add user block to existing ub, if any - if [ -z "$3" ]; - then - # output goes to infile, compare ubfile to infile - ofile="" - compare_test="$ifile" - cp $ifile xxofile.h5 - compare_orig="xxofile.h5" - cleanup="$cleanup $compare_orig" - else - # output goes to $3, compare ofile to ubfile - ofile="$3" - compare_test="$ofile" - compare_orig="$ifile" - fi - fi - - # call 'jam' with the appropriate arguments - if [ -n "$ofile" ]; - then - TESTING h5jam -u `basename $ufile` -i `basename $ifile` -o `basename $ofile` $clobber - $JAM_BIN/$JAM -u $ufile -i $ifile -o $ofile $clobber - else - TESTING jam -u `basename $ufile` -i `basename $ifile` $clobber - $JAM_BIN/$JAM -u $ufile -i $ifile $clobber - fi - - #echo "CHECK_UB_1 $compare_test $ufile $compare_orig" - CHECK_UB_1 $compare_test $ufile $compare_orig - - if [ "$result1" = "0" ] ; - then - echo " PASSED" - else - echo " *FAILED*" - nerrors="`expr $nerrors + 1`" - fi - CLEANUP $cleanup + ufile="$1" + ifile="$2" + compare_test="" # the file to test + compare_orig="" # the comparison to test against + cleanup="" + + # sort out the arguments for the test and the check + do_clobber="no" + if [ "$3" = "--clobber" ]; + then + # clobber overwrites any existing user block + do_clobber="yes" + clobber="--clobber" + compare_orig="" + if [ -z "$4" ]; + then + # output goes to infile, compare ubfile to infile + ofile="" + compare_test="$ifile" + else + # output goes to $4, compare ofile to ubfile + ofile="$4" + compare_test="$ofile" + fi + else + clobber="" + # add user block to existing ub, if any + if [ -z "$3" ]; + then + # output goes to infile, compare ubfile to infile + ofile="" + compare_test="$ifile" + cp $ifile xxofile.h5 + compare_orig="xxofile.h5" + cleanup="$cleanup $compare_orig" + else + # output goes to $3, compare ofile to ubfile + ofile="$3" + compare_test="$ofile" + compare_orig="$ifile" + fi + fi + + # call 'jam' with the appropriate arguments + if [ -n "$ofile" ]; + then + TESTING h5jam -u `basename $ufile` -i `basename $ifile` -o `basename $ofile` $clobber + $JAM_BIN/$JAM -u $ufile -i $ifile -o $ofile $clobber + else + TESTING jam -u `basename $ufile` -i `basename $ifile` $clobber + $JAM_BIN/$JAM -u $ufile -i $ifile $clobber + fi + + #echo "CHECK_UB_1 $compare_test $ufile $compare_orig" + CHECK_UB_1 $compare_test $ufile $compare_orig + + if [ "$result1" = "0" ] ; + then + echo " PASSED" + else + echo " *FAILED*" + nerrors="`expr $nerrors + 1`" + fi + CLEANUP $cleanup } - + # UNJAMTEST file.h5 [- | --delete] ofile # # Test the 'unjam' tool # ###fix the working directory here and in jamtest UNJAMTEST () { - infile="$1" - ofile="$3" - if [ "$2" = "-" ]; - then - uofile="uofile" - TESTING h5unjam -i `basename $infile` -o `basename $ofile` "> "`basename $uofile` - $JAM_BIN/$UNJAM -i $infile -o $ofile > $uofile - else - if [ "$2" = "--delete" ]; - then - uofile="none" - TESTING h5unjam -i `basename $infile` -o `basename $ofile` --delete - $JAM_BIN/$UNJAM -i $infile -o $ofile --delete - - else - uofile="$2" - TESTING h5unjam -i `basename $infile` -u `basename $uofile` -o `basename $ofile` - $JAM_BIN/$UNJAM -i $infile -u $uofile -o $ofile - fi - fi - - result1=0 - result2=0 - cleanup="" - if [ "$uofile" != "none" ]; - then - # sets result1 - CHECK_UB_1 $infile $uofile - CLEANUP $uofile - fi - - # sets result2 - CHECK_NOUB $ofile - - if [ "$result1" = "0" -a "$result2" = "0" ]; - then - echo " PASSED" - else - echo " *FAILED*" - nerrors="`expr $nerrors + 1`" - fi + infile="$1" + ofile="$3" + if [ "$2" = "-" ]; + then + uofile="uofile" + TESTING h5unjam -i `basename $infile` -o `basename $ofile` "> "`basename $uofile` + $JAM_BIN/$UNJAM -i $infile -o $ofile > $uofile + else + if [ "$2" = "--delete" ]; + then + uofile="none" + TESTING h5unjam -i `basename $infile` -o `basename $ofile` --delete + $JAM_BIN/$UNJAM -i $infile -o $ofile --delete + + else + uofile="$2" + TESTING h5unjam -i `basename $infile` -u `basename $uofile` -o `basename $ofile` + $JAM_BIN/$UNJAM -i $infile -u $uofile -o $ofile + fi + fi + + result1=0 + result2=0 + cleanup="" + if [ "$uofile" != "none" ]; + then + # sets result1 + CHECK_UB_1 $infile $uofile + CLEANUP $uofile + fi + + # sets result2 + CHECK_NOUB $ofile + + if [ "$result1" = "0" -a "$result2" = "0" ]; + then + echo " PASSED" + else + echo " *FAILED*" + nerrors="`expr $nerrors + 1`" + fi } @@ -500,28 +500,30 @@ TOOLTEST_OUTPUT() { STDOUT_FILTER $actual cp $actual_err $actual_err_sav STDERR_FILTER $actual_err - # combine stderr to stdout for output compare + # combine stderr to stdout for output compare cat $actual_err >> $actual if [ ! -f $expect ]; then - # Create the expect file if it doesn't yet exist. + # Create the expect file if it doesn't yet exist. echo " CREATED" cp $actual $expect - rm -f $actual $actual_sav $actual_err $actual_err_sav + echo " Expected result (*.ls) missing" + nerrors="`expr $nerrors + 1`" + rm -f $actual $actual_sav $actual_err $actual_err_sav elif $CMP $expect $actual; then echo " PASSED" - rm -f $actual $actual_sav $actual_err $actual_err_sav + rm -f $actual $actual_sav $actual_err $actual_err_sav else echo "*FAILED*" - echo " Expected result differs from actual result" - nerrors="`expr $nerrors + 1`" + echo " Expected result differs from actual result" + nerrors="`expr $nerrors + 1`" test yes = "$verbose" && $DIFF $expect $actual |sed 's/^/ /' fi } ############################################################################## ############################################################################## -### T H E T E S T S ### +### T H E T E S T S ### ############################################################################## ############################################################################## # prepare for test @@ -550,19 +552,19 @@ CHECKFILE $TESTDIR/tall.h5 ta5.h5 CLEANUP ta5.h5 SETUP $TESTDIR/tall.h5 ta6.h5 -JAMTEST $TESTDIR/u10.txt ta6.h5 +JAMTEST $TESTDIR/u10.txt ta6.h5 CHECKFILE $TESTDIR/tall.h5 ta6.h5 CLEANUP ta6.h5 SETUP $TESTDIR/tall.h5 ta7.h5 -JAMTEST $TESTDIR/u511.txt ta7.h5 +JAMTEST $TESTDIR/u511.txt ta7.h5 CHECKFILE $TESTDIR/tall.h5 ta7.h5 CLEANUP ta7.h5 SETUP $TESTDIR/tall.h5 ta8.h5 -JAMTEST $TESTDIR/u512.txt ta8.h5 +JAMTEST $TESTDIR/u512.txt ta8.h5 CHECKFILE $TESTDIR/tall.h5 ta8.h5 CLEANUP ta8.h5 SETUP $TESTDIR/tall.h5 ta9.h5 -JAMTEST $TESTDIR/u513.txt ta9.h5 +JAMTEST $TESTDIR/u513.txt ta9.h5 CHECKFILE $TESTDIR/tall.h5 ta9.h5 CLEANUP ta9.h5 @@ -592,29 +594,29 @@ JAMTEST $TESTDIR/u513.txt $TESTDIR/twithub513.h5 tax9.h5 CHECKFILE $TESTDIR/tall.h5 tax9.h5 CLEANUP tax9.h5 -JAMTEST $TESTDIR/u10.txt $TESTDIR/twithub.h5 --clobber taz2.h5 +JAMTEST $TESTDIR/u10.txt $TESTDIR/twithub.h5 --clobber taz2.h5 CHECKFILE $TESTDIR/tall.h5 taz2.h5 CLEANUP taz2.h5 JAMTEST $TESTDIR/u511.txt $TESTDIR/twithub.h5 --clobber taz3.h5 CHECKFILE $TESTDIR/tall.h5 taz3.h5 CLEANUP taz3.h5 -JAMTEST $TESTDIR/u512.txt $TESTDIR/twithub.h5 --clobber taz4.h5 +JAMTEST $TESTDIR/u512.txt $TESTDIR/twithub.h5 --clobber taz4.h5 CHECKFILE $TESTDIR/tall.h5 taz4.h5 CLEANUP taz4.h5 -JAMTEST $TESTDIR/u513.txt $TESTDIR/twithub.h5 --clobber taz5.h5 +JAMTEST $TESTDIR/u513.txt $TESTDIR/twithub.h5 --clobber taz5.h5 CHECKFILE $TESTDIR/tall.h5 taz5.h5 CLEANUP taz5.h5 -JAMTEST $TESTDIR/u10.txt $TESTDIR/twithub513.h5 --clobber taz6.h5 +JAMTEST $TESTDIR/u10.txt $TESTDIR/twithub513.h5 --clobber taz6.h5 CHECKFILE $TESTDIR/tall.h5 taz6.h5 CLEANUP taz6.h5 JAMTEST $TESTDIR/u511.txt $TESTDIR/twithub513.h5 --clobber taz7.h5 CHECKFILE $TESTDIR/tall.h5 taz7.h5 CLEANUP taz7.h5 -JAMTEST $TESTDIR/u512.txt $TESTDIR/twithub513.h5 --clobber taz8.h5 +JAMTEST $TESTDIR/u512.txt $TESTDIR/twithub513.h5 --clobber taz8.h5 CHECKFILE $TESTDIR/tall.h5 taz8.h5 CLEANUP taz8.h5 -JAMTEST $TESTDIR/u513.txt $TESTDIR/twithub513.h5 --clobber taz9.h5 +JAMTEST $TESTDIR/u513.txt $TESTDIR/twithub513.h5 --clobber taz9.h5 CHECKFILE $TESTDIR/tall.h5 taz9.h5 CLEANUP taz9.h5 @@ -653,7 +655,7 @@ CHECKFILE $TESTDIR/tall.h5 tay9.h5 CLEANUP tay9.h5 #--------------------------------- -# Testing h5unjam +# Testing h5unjam #--------------------------------- # help page TOOLTEST_OUTPUT UNJAM h5unjam-help.txt 0 -h diff --git a/tools/test/h5ls/Makefile.am b/tools/test/h5ls/Makefile.am index 2494e18..8ace14d 100644 --- a/tools/test/h5ls/Makefile.am +++ b/tools/test/h5ls/Makefile.am @@ -47,6 +47,7 @@ libdynlibls.la: $(libdynlibls_la_OBJECTS) $(libdynlibls_la_DEPENDENCIES) $(EXTRA # $(RM) $(DESTDIR)$(dyndir)/*dynlib* endif + DISTCLEANFILES=h5ls_plugin.sh include $(top_srcdir)/config/conclude.am diff --git a/tools/test/h5ls/h5ls_plugin.sh.in b/tools/test/h5ls/h5ls_plugin.sh.in index 34114d8..c89269d 100644 --- a/tools/test/h5ls/h5ls_plugin.sh.in +++ b/tools/test/h5ls/h5ls_plugin.sh.in @@ -184,7 +184,7 @@ TOOLTEST() { # any unexpected output from that stream too. TESTING $H5LS $@ ( - cd $TESTDIR + cd $TESTDIR $ENVCMD $RUNSERIAL $H5LS_BIN "$@" ) >$actual 2>$actual_err @@ -196,31 +196,33 @@ TOOLTEST() { STDERR_FILTER $actual_err cat $actual_err >> $actual if [ $h5haveexitcode = 'yes' -a $exitcode -ne $retvalexpect ]; then - echo "*FAILED*" - nerrors="`expr $nerrors + 1`" - if [ yes = "$verbose" ]; then - echo "test returned with exit code $exitcode" - echo "test output: (up to $NLINES lines)" - head -$NLINES $actual - echo "***end of test output***" - echo "" - fi + echo "*FAILED*" + nerrors="`expr $nerrors + 1`" + if [ yes = "$verbose" ]; then + echo "test returned with exit code $exitcode" + echo "test output: (up to $NLINES lines)" + head -$NLINES $actual + echo "***end of test output***" + echo "" + fi elif [ ! -f $expect ]; then # Create the expect file if it doesn't yet exist. echo " CREATED" cp $actual $expect + echo " Expected result (*.ls) missing" + nerrors="`expr $nerrors + 1`" elif $CMP $expect $actual; then echo " PASSED" else echo "*FAILED*" - echo " Expected result differs from actual result" - nerrors="`expr $nerrors + 1`" - test yes = "$verbose" && $DIFF $expect $actual |sed 's/^/ /' + echo " Expected result differs from actual result" + nerrors="`expr $nerrors + 1`" + test yes = "$verbose" && $DIFF $expect $actual |sed 's/^/ /' fi # Clean up output file if test -z "$HDF5_NOCLEANUP"; then - rm -f $actual $actual_err $actual_sav $actual_err_sav + rm -f $actual $actual_err $actual_sav $actual_err_sav fi } diff --git a/tools/test/h5ls/testh5ls.sh.in b/tools/test/h5ls/testh5ls.sh.in index 31877d9..a88ae88 100644 --- a/tools/test/h5ls/testh5ls.sh.in +++ b/tools/test/h5ls/testh5ls.sh.in @@ -181,7 +181,7 @@ COPY_TESTFILES_TO_TESTDIR() INODE_SDIR=`$LS -i -d $SDIR | $AWK -F' ' '{print $1}'` INODE_DDIR=`$LS -i -d $TESTDIR | $AWK -F' ' '{print $1}'` if [ "$INODE_SDIR" != "$INODE_DDIR" ]; then - $CP -f $tstfile $TESTDIR + $CP -f $tstfile $TESTDIR if [ $? -ne 0 ]; then echo "Error: FAILED to copy $tstfile ." @@ -239,7 +239,7 @@ TOOLTEST() { # any unexpected output from that stream too. TESTING $H5LS $@ ( - cd $TESTDIR + cd $TESTDIR $RUNSERIAL $H5LS_BIN "$@" ) >$actual 2>$actual_err @@ -251,37 +251,39 @@ TOOLTEST() { STDERR_FILTER $actual_err cat $actual_err >> $actual if [ $h5haveexitcode = 'yes' -a $exitcode -ne $retvalexpect ]; then - echo "*FAILED*" - nerrors="`expr $nerrors + 1`" - if [ yes = "$verbose" ]; then - echo "test returned with exit code $exitcode" - echo "test output: (up to $NLINES lines)" - head -$NLINES $actual - echo "***end of test output***" - echo "" - fi + echo "*FAILED*" + nerrors="`expr $nerrors + 1`" + if [ yes = "$verbose" ]; then + echo "test returned with exit code $exitcode" + echo "test output: (up to $NLINES lines)" + head -$NLINES $actual + echo "***end of test output***" + echo "" + fi elif [ ! -f $expect ]; then - # Create the expect file if it doesn't yet exist. + # Create the expect file if it doesn't yet exist. echo " CREATED" cp $actual $expect + echo " Expected result (*.ls) missing" + nerrors="`expr $nerrors + 1`" elif $CMP $expect $actual; then echo " PASSED" else echo "*FAILED*" - echo " Expected result differs from actual result" - nerrors="`expr $nerrors + 1`" - test yes = "$verbose" && $DIFF $expect $actual |sed 's/^/ /' + echo " Expected result differs from actual result" + nerrors="`expr $nerrors + 1`" + test yes = "$verbose" && $DIFF $expect $actual |sed 's/^/ /' fi # Clean up output file if test -z "$HDF5_NOCLEANUP"; then - rm -f $actual $actual_err $actual_sav $actual_err_sav + rm -f $actual $actual_err $actual_sav $actual_err_sav fi } ############################################################################## ############################################################################## -### T H E T E S T S ### +### T H E T E S T S ### ############################################################################## ############################################################################## # prepare for test diff --git a/tools/test/h5ls/testh5lsvds.sh.in b/tools/test/h5ls/testh5lsvds.sh.in index ddb1632..eb44367 100644 --- a/tools/test/h5ls/testh5lsvds.sh.in +++ b/tools/test/h5ls/testh5lsvds.sh.in @@ -187,7 +187,7 @@ TOOLTEST() { # any unexpected output from that stream too. TESTING $H5LS $@ ( - cd $TESTDIR + cd $TESTDIR $RUNSERIAL $H5LS_BIN "$@" ) >$actual 2>$actual_err @@ -199,37 +199,39 @@ TOOLTEST() { STDERR_FILTER $actual_err cat $actual_err >> $actual if [ $h5haveexitcode = 'yes' -a $exitcode -ne $retvalexpect ]; then - echo "*FAILED*" - nerrors="`expr $nerrors + 1`" - if [ yes = "$verbose" ]; then - echo "test returned with exit code $exitcode" - echo "test output: (up to $NLINES lines)" - head -$NLINES $actual - echo "***end of test output***" - echo "" - fi + echo "*FAILED*" + nerrors="`expr $nerrors + 1`" + if [ yes = "$verbose" ]; then + echo "test returned with exit code $exitcode" + echo "test output: (up to $NLINES lines)" + head -$NLINES $actual + echo "***end of test output***" + echo "" + fi elif [ ! -f $expect ]; then - # Create the expect file if it doesn't yet exist. + # Create the expect file if it doesn't yet exist. echo " CREATED" cp $actual $expect + echo " Expected result (*.ls) missing" + nerrors="`expr $nerrors + 1`" elif $CMP $expect $actual; then echo " PASSED" else echo "*FAILED*" - echo " Expected result differs from actual result" - nerrors="`expr $nerrors + 1`" - test yes = "$verbose" && $DIFF $expect $actual |sed 's/^/ /' + echo " Expected result differs from actual result" + nerrors="`expr $nerrors + 1`" + test yes = "$verbose" && $DIFF $expect $actual |sed 's/^/ /' fi # Clean up output file if test -z "$HDF5_NOCLEANUP"; then - rm -f $actual $actual_err $actual_sav $actual_err_sav + rm -f $actual $actual_err $actual_sav $actual_err_sav fi } ############################################################################## ############################################################################## -### T H E T E S T S ### +### T H E T E S T S ### ############################################################################## ############################################################################## # prepare for test diff --git a/tools/test/h5repack/Makefile.am b/tools/test/h5repack/Makefile.am index a15d6bb..da2a3c3 100644 --- a/tools/test/h5repack/Makefile.am +++ b/tools/test/h5repack/Makefile.am @@ -60,6 +60,7 @@ libdynlibvers.la: $(libdynlibvers_la_OBJECTS) $(libdynlibvers_la_DEPENDENCIES) $ # $(RM) $(DESTDIR)$(dyndir)/*dynlib* endif + # Temporary files. *.h5 are generated by h5repack. They should # copied to the testfiles/ directory if update is required. CHECK_CLEANFILES+=*.h5 *.bin testfiles/h5diff_attr1.h5 testfiles/tfamily*.h5 diff --git a/tools/test/h5repack/h5repack.sh.in b/tools/test/h5repack/h5repack.sh.in index 032494b..bc6b527 100644 --- a/tools/test/h5repack/h5repack.sh.in +++ b/tools/test/h5repack/h5repack.sh.in @@ -179,7 +179,7 @@ COPY_TESTFILES_TO_TESTDIR() INODE_SDIR=`$LS -i -d $SDIR | $AWK -F' ' '{print $1}'` INODE_DDIR=`$LS -i -d $TESTDIR | $AWK -F' ' '{print $1}'` if [ "$INODE_SDIR" != "$INODE_DDIR" ]; then - $CP -f $tstfile $TESTDIR + $CP -f $tstfile $TESTDIR if [ $? -ne 0 ]; then echo "Error: FAILED to copy $tstfile ." @@ -375,6 +375,8 @@ VERIFY_LAYOUT_VDS() # 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 $CMP $expect $actual > /dev/null 2>&1 ; then echo " PASSED" else @@ -386,7 +388,7 @@ VERIFY_LAYOUT_VDS() # Clean up output file if test -z "$HDF5_NOCLEANUP"; then - rm -f $actual $actual_err + rm -f $actual $actual_err fi # clean up tmp files @@ -541,11 +543,11 @@ TOOLTEST1() ) RET=$? if [ $RET != 0 ] ; then - echo "*FAILED*" - nerrors="`expr $nerrors + 1`" + echo "*FAILED*" + nerrors="`expr $nerrors + 1`" else - echo " PASSED" - DIFFTEST $infile $outfile + echo " PASSED" + DIFFTEST $infile $outfile fi rm -f $outfile } @@ -572,11 +574,11 @@ TOOLTESTV() ) >$actual 2>$actual_err RET=$? if [ $RET != 0 ] ; then - echo "*FAILED*" - nerrors="`expr $nerrors + 1`" + echo "*FAILED*" + nerrors="`expr $nerrors + 1`" else - echo " PASSED" - DIFFTEST $infile $outfile + echo " PASSED" + DIFFTEST $infile $outfile fi # display output compare @@ -637,6 +639,8 @@ TOOLTESTM() { # Create the expect file if it doesn't yet exist. echo " CREATED" cp $actual $expect + echo " Expected result (*.tst) missing" + nerrors="`expr $nerrors + 1`" elif $CMP $expect $actual; then echo " PASSED" else @@ -648,7 +652,7 @@ TOOLTESTM() { # Clean up output file if test -z "$HDF5_NOCLEANUP"; then - rm -f $actual $actual_err $actual_sav $actual_err_sav + rm -f $actual $actual_err $actual_sav $actual_err_sav fi } @@ -762,11 +766,11 @@ TOOLTEST_META() # verify sizes. MESSAGE "Verify the sizes of both output files ($size1 vs $size2)" if [ $size1 -lt $size2 ]; then - # pass - echo " PASSED" + # pass + echo " PASSED" else - #fail - echo "*FAILED*" + #fail + echo "*FAILED*" nerrors="`expr $nerrors + 1`" fi @@ -793,6 +797,8 @@ TOOLTEST_HELP() { # Create the expect data file if it doesn't yet exist. echo " CREATED" cp $actual $expect-CREATED + echo " Expected result (*.txt) missing" + nerrors="`expr $nerrors + 1`" elif cmp -s $expect $actual; then echo " PASSED" else @@ -840,7 +846,7 @@ USE_FILTER_SZIP_ENCODER=`$RUNSERIAL $H5DETECTSZIP_BIN` fi ############################################################################## -### T H E T E S T S +### T H E T E S T S ############################################################################## # prepare for test COPY_TESTFILES_TO_TESTDIR @@ -1229,7 +1235,7 @@ TOOLTEST_META meta_long h5repack_layout.h5 --metadata_block_size=8192 if test $USE_FILTER_DEFLATE != "yes" ; then SKIP vds_dset_chunk_20x10x5 else - VERIFY_LAYOUT_VDS vds_dset_chunk_20x10x5 1_vds.h5 vds_dset CHUNKED --layout vds_dset:CHUNK=20x10x5 + VERIFY_LAYOUT_VDS vds_dset_chunk20x10x5 1_vds.h5 vds_dset CHUNKED --layout vds_dset:CHUNK=20x10x5 fi if test $USE_FILTER_DEFLATE != "yes" ; then diff --git a/tools/test/h5stat/testh5stat.sh.in b/tools/test/h5stat/testh5stat.sh.in index c4a52c3..ca7ca4c 100644 --- a/tools/test/h5stat/testh5stat.sh.in +++ b/tools/test/h5stat/testh5stat.sh.in @@ -14,8 +14,8 @@ # Tests for the h5stat tool # # Modifcations: -# Vailin Choi; July 2013 -# Add tests for -l, -m, -a options +# Vailin Choi; July 2013 +# Add tests for -l, -m, -a options # srcdir=@srcdir@ @@ -132,10 +132,10 @@ COPY_TESTFILES_TO_TESTDIR() INODE_SDIR=`$LS -i -d $SDIR | $AWK -F' ' '{print $1}'` INODE_DDIR=`$LS -i -d $TESTDIR | $AWK -F' ' '{print $1}'` if [ "$INODE_SDIR" != "$INODE_DDIR" ]; then - $CP -f $tstfile $TESTDIR + $CP -f $tstfile $TESTDIR if [ $? -ne 0 ]; then echo "Error: FAILED to copy $tstfile ." - + # Comment out this to CREATE expected file exit $EXIT_FAILURE fi @@ -199,9 +199,11 @@ TOOLTEST() { cat $actual_err >> $actual if [ ! -f $expect ]; then - # Create the expect file if it doesn't yet exist. - echo " CREATED" - cp $actual $expect + # 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 $CMP $expect $actual; then echo " PASSED" else @@ -220,15 +222,15 @@ TOOLTEST() { # Print a "SKIP" message SKIP() { - TESTING $STAT $@ - echo " -SKIP-" + TESTING $STAT $@ + echo " -SKIP-" } - + ############################################################################## ############################################################################## -### T H E T E S T S ### +### T H E T E S T S ### ############################################################################## ############################################################################## # prepare for test @@ -252,7 +254,7 @@ TOOLTEST h5stat_filters-dT.ddl -dT h5stat_filters.h5 TOOLTEST h5stat_filters-UD.ddl -D h5stat_filters.h5 TOOLTEST h5stat_filters-UT.ddl -T h5stat_filters.h5 # -# h5stat_tsohm.h5 is a copy of ../../../test/tsohm.h5 generated by tsohm.c +# h5stat_tsohm.h5 is a copy of ../../../test/tsohm.h5 generated by tsohm.c # as of release 1.8.7-snap0 (on a 64-bit machine) TOOLTEST h5stat_tsohm.ddl h5stat_tsohm.h5 # h5stat_newgrat.h5 is generated by h5stat_gentest.c @@ -262,36 +264,36 @@ TOOLTEST h5stat_newgrat-UA.ddl -A h5stat_newgrat.h5 # h5stat_idx.h5 is generated by h5stat_gentest.c TOOLTEST h5stat_idx.ddl h5stat_idx.h5 # -# Tests for -l (--links) option on h5stat_threshold.h5: -# -l 0 (incorrect threshold value) -# -g -l 8 -# --links=8 -# --links=20 -g +# Tests for -l (--links) option on h5stat_threshold.h5: +# -l 0 (incorrect threshold value) +# -g -l 8 +# --links=8 +# --links=20 -g TOOLTEST h5stat_err1_links.ddl -l 0 h5stat_threshold.h5 TOOLTEST h5stat_links1.ddl -g -l 8 h5stat_threshold.h5 TOOLTEST h5stat_links2.ddl --links=8 h5stat_threshold.h5 TOOLTEST h5stat_links3.ddl --links=20 -g h5stat_threshold.h5 # -# Tests for -l (--links) option on h5stat_newgrat.h5: -# -g -# -g -l 40000 +# Tests for -l (--links) option on h5stat_newgrat.h5: +# -g +# -g -l 40000 TOOLTEST h5stat_links4.ddl -g h5stat_newgrat.h5 TOOLTEST h5stat_links5.ddl -g -l 40000 h5stat_newgrat.h5 # # Tests for -m (--dims) option on h5stat_threshold.h5 -# -d --dims=-1 (incorrect threshold value) -# -gd -m 5 -# -d --di=15 +# -d --dims=-1 (incorrect threshold value) +# -gd -m 5 +# -d --di=15 TOOLTEST h5stat_err1_dims.ddl -d --dims=-1 h5stat_threshold.h5 TOOLTEST h5stat_dims1.ddl -gd -m 5 h5stat_threshold.h5 TOOLTEST h5stat_dims2.ddl -d --di=15 h5stat_threshold.h5 # # Tests for -a option on h5stat_threshold.h5 -# -a -2 (incorrect threshold value) -# --numattrs (without threshold value) -# -AS -a 10 -# -a 1 -# -A --numattrs=25 +# -a -2 (incorrect threshold value) +# --numattrs (without threshold value) +# -AS -a 10 +# -a 1 +# -A --numattrs=25 TOOLTEST h5stat_err1_numattrs.ddl -a -2 h5stat_threshold.h5 TOOLTEST h5stat_err2_numattrs.ddl --numattrs h5stat_threshold.h5 TOOLTEST h5stat_numattrs1.ddl -AS -a 10 h5stat_threshold.h5 @@ -299,7 +301,7 @@ TOOLTEST h5stat_numattrs2.ddl -a 1 h5stat_threshold.h5 TOOLTEST h5stat_numattrs3.ddl -A --numattrs=25 h5stat_threshold.h5 # # Tests for -a option on h5stat_newgrat.h5 -# -A -a 100 +# -A -a 100 TOOLTEST h5stat_numattrs4.ddl -A -a 100 h5stat_newgrat.h5 # diff --git a/tools/test/misc/talign.c b/tools/test/misc/talign.c index 7ca1f92..9a72557 100644 --- a/tools/test/misc/talign.c +++ b/tools/test/misc/talign.c @@ -17,7 +17,7 @@ */ #include #include -/*#include *//* Required for unlink() */ +/*#include *//* Required for unlink() */ #include "hdf5.h" #include "H5private.h" @@ -86,8 +86,7 @@ int main(void) H5Tinsert(cmp, "Not Ok", sizeof(fok) + sizeof(string5), array_dt); H5Tclose(array_dt); - fix = h5tools_get_native_type(cmp); - + fix = H5Tget_native_type(cmp, H5T_DIR_DEFAULT); cmp1 = H5Tcreate(H5T_COMPOUND, sizeof(fok)); cdim[0] = sizeof(fok) / sizeof(float); @@ -106,7 +105,7 @@ int main(void) H5Tclose(array_dt); plist = H5Pcreate(H5P_DATASET_XFER); - if((error = H5Pset_preserve(plist, 1)) < 0) + if((error = H5Pset_preserve(plist, 1)) < 0) goto out; /* @@ -208,35 +207,3 @@ out: return result; } -/*------------------------------------------------------------------------- - * Function: h5tools_get_native_type - * - * Purpose: Wrapper around H5Tget_native_type() to work around - * Problems with bitfields. - * - * Return: Success: datatype ID - * - * Failure: FAIL - * - * Programmer: Quincey Koziol - * Tuesday, October 5, 2004 - * - * Modifications: - * - *------------------------------------------------------------------------- - */ -hid_t -h5tools_get_native_type(hid_t type) -{ - hid_t p_type; - H5T_class_t type_class; - - type_class = H5Tget_class(type); - if(type_class==H5T_BITFIELD) - p_type=H5Tcopy(type); - else - p_type = H5Tget_native_type(type,H5T_DIR_DEFAULT); - - return(p_type); -} - diff --git a/tools/test/misc/testh5mkgrp.sh.in b/tools/test/misc/testh5mkgrp.sh.in index 3990bd2..3ad1f71 100644 --- a/tools/test/misc/testh5mkgrp.sh.in +++ b/tools/test/misc/testh5mkgrp.sh.in @@ -98,7 +98,7 @@ COPY_TESTFILES_TO_TESTDIR() $CP -f $tstfile $TESTDIR if [ $? -ne 0 ]; then echo "Error: FAILED to copy $tstfile ." - + # Comment out this to CREATE expected file exit $EXIT_FAILURE fi @@ -122,7 +122,7 @@ CLEAN_TESTFILES_AND_TESTDIR() # Print a line-line message left justified in a field of 70 characters # beginning with the word "Testing". -TESTING() +TESTING() { SPACES=" " echo "Testing $* $SPACES" |cut -c1-70 |tr -d '\012' @@ -134,7 +134,7 @@ TESTING() # Print a line-line message left justified in a field of 70 characters # beginning with the word "Verifying". # -VERIFY_H5LS() +VERIFY_H5LS() { SPACES=" " echo "Verifying h5ls file structure $* $SPACES" | cut -c1-70 | tr -d '\012' @@ -146,7 +146,7 @@ VERIFY_H5LS() # Assumed arguments: # $* arguments for h5mkgrp. -TOOLTEST() +TOOLTEST() { TESTING $H5MKGRP $@ ( @@ -171,7 +171,7 @@ TOOLTEST() # Call the h5ls tool to verify the correct output data in the destination file # -H5LSTEST() +H5LSTEST() { expect="$TESTDIR/`basename $1 .h5`.ls" actual="$TESTDIR/`basename $1 .h5`.out" @@ -191,9 +191,11 @@ H5LSTEST() STDERR_FILTER $actual if [ ! -f $expect ]; then - # Create the expect file if it doesn't yet exist. - echo " CREATED" - cp $actual $expect + # Create the expect file if it doesn't yet exist. + echo " CREATED" + cp $actual $expect + echo " Expected result (*.ls) missing" + nerrors="`expr $nerrors + 1`" elif $CMP $expect $actual; then echo " PASSED" else @@ -215,7 +217,7 @@ H5LSTEST() # $1 is test file name # $2 is h5mkgrp options # $* are groups to create -RUNTEST() +RUNTEST() { FILEOUT=$1 shift @@ -244,7 +246,7 @@ RUNTEST() # $1 is test expected output file # $2 is h5mkgrp options # $* are groups to create -CMPTEST() +CMPTEST() { FILEOUT=$1 expect="$TESTDIR/`basename $1 .h5`.txt" @@ -260,11 +262,13 @@ CMPTEST() $RUNSERIAL $H5MKGRP_BIN $@ ) >$actual 2>$actual_err cat $actual_err >> $actual - + if [ ! -f $expect ]; then # Create the expect file if it doesn't yet exist. - echo " CREATED" - cp $actual $expect + echo " CREATED" + cp $actual $expect + echo " Expected result (*.txt) missing" + nerrors="`expr $nerrors + 1`" elif $CMP $expect $actual; then echo " PASSED" else @@ -302,7 +306,7 @@ RUNTEST h5mkgrp_several_v.h5 "-v" one two RUNTEST h5mkgrp_several_p.h5 "-p" one two RUNTEST h5mkgrp_several_l.h5 "-l" one two -# Create various nested groups +# Create various nested groups RUNTEST h5mkgrp_nested_p.h5 "-p" /one/two RUNTEST h5mkgrp_nested_lp.h5 "-lp" /one/two RUNTEST h5mkgrp_nested_mult_p.h5 "-p" /one/two /three/four diff --git a/tools/testfiles/tbitfields_be.h5.xml b/tools/testfiles/tbitfields_be.h5.xml new file mode 100644 index 0000000..26bbd91 --- /dev/null +++ b/tools/testfiles/tbitfields_be.h5.xml @@ -0,0 +1,103 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + 0xff + 0xfe + 0xfd + 0xfc + 0xfb + 0xfa + 0xf9 + 0xf8 + 0xf7 + 0xf6 + 0xf5 + 0xf4 + 0xf3 + 0xf2 + 0xf1 + 0xf0 + 0xef + 0xee + 0xed + 0xec + 0xeb + 0xea + 0xe9 + 0xe8 + 0xe7 + 0xe6 + 0xe5 + 0xe4 + 0xe3 + 0xe2 + 0xe1 + 0xe0 + + + + + + + + + + + + + + + + + + + + + + + + + fe:ff + fc:fd + fa:fb + f8:f9 + f6:f7 + f4:f5 + f2:f3 + f0:f1 + ee:ef + ec:ed + ea:eb + e8:e9 + e6:e7 + e4:e5 + e2:e3 + e0:e1 + + + + + + diff --git a/tools/testfiles/tbitfields_le.h5.xml b/tools/testfiles/tbitfields_le.h5.xml new file mode 100644 index 0000000..c8ba026 --- /dev/null +++ b/tools/testfiles/tbitfields_le.h5.xml @@ -0,0 +1,103 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + 0xff + 0xfe + 0xfd + 0xfc + 0xfb + 0xfa + 0xf9 + 0xf8 + 0xf7 + 0xf6 + 0xf5 + 0xf4 + 0xf3 + 0xf2 + 0xf1 + 0xf0 + 0xef + 0xee + 0xed + 0xec + 0xeb + 0xea + 0xe9 + 0xe8 + 0xe7 + 0xe6 + 0xe5 + 0xe4 + 0xe3 + 0xe2 + 0xe1 + 0xe0 + + + + + + + + + + + + + + + + + + + + + + + + + ff:fe + fd:fc + fb:fa + f9:f8 + f7:f6 + f5:f4 + f3:f2 + f1:f0 + ef:ee + ed:ec + eb:ea + e9:e8 + e7:e6 + e5:e4 + e3:e2 + e1:e0 + + + + + + diff --git a/tools/testfiles/tbitnopaque.ddl b/tools/testfiles/tbitnopaque.ddl deleted file mode 100644 index 9000463..0000000 --- a/tools/testfiles/tbitnopaque.ddl +++ /dev/null @@ -1,293 +0,0 @@ -HDF5 "tbitnopaque.h5" { -GROUP "/" { - GROUP "bittypetests" { - DATASET "bitfield_1" { - DATATYPE H5T_STD_B8LE - DATASPACE SIMPLE { ( 32 ) / ( 32 ) } - DATA { - (0): 0xff, 0xfe, 0xfd, 0xfc, 0xfb, 0xfa, 0xf9, 0xf8, 0xf7, 0xf6, - (10): 0xf5, 0xf4, 0xf3, 0xf2, 0xf1, 0xf0, 0xef, 0xee, 0xed, 0xec, - (20): 0xeb, 0xea, 0xe9, 0xe8, 0xe7, 0xe6, 0xe5, 0xe4, 0xe3, 0xe2, - (30): 0xe1, 0xe0 - } - } - DATASET "bitfield_2" { - DATATYPE H5T_STD_B16LE - DATASPACE SIMPLE { ( 32 ) / ( 32 ) } - DATA { - (0): ff:ff, 00:00, ef:ff, 00:00, df:ff, 00:00, cf:ff, 00:00, bf:ff, - (9): 00:00, af:ff, 00:00, 9f:ff, 00:00, 8f:ff, 00:00, 7f:ff, 00:00, - (18): 6f:ff, 00:00, 5f:ff, 00:00, 4f:ff, 00:00, 3f:ff, 00:00, 2f:ff, - (27): 00:00, 1f:ff, 00:00, 0f:ff, 00:00 - } - } - DATASET "bitfield_3" { - DATATYPE H5T_STD_B32LE - DATASPACE SIMPLE { ( 32 ) / ( 32 ) } - DATA { - (0): ff:ff:ff:ff, 00:00:00:00, df:ff:ff:ff, 00:00:00:00, - (4): bf:ff:ff:ff, 00:00:00:00, 9f:ff:ff:ff, 00:00:00:00, - (8): 7f:ff:ff:ff, 00:00:00:00, 5f:ff:ff:ff, 00:00:00:00, - (12): 3f:ff:ff:ff, 00:00:00:00, 1f:ff:ff:ff, 00:00:00:00, - (16): ff:fe:ff:ff, 00:00:00:00, df:fe:ff:ff, 00:00:00:00, - (20): bf:fe:ff:ff, 00:00:00:00, 9f:fe:ff:ff, 00:00:00:00, - (24): 7f:fe:ff:ff, 00:00:00:00, 5f:fe:ff:ff, 00:00:00:00, - (28): 3f:fe:ff:ff, 00:00:00:00, 1f:fe:ff:ff, 00:00:00:00 - } - } - DATASET "bitfield_4" { - DATATYPE H5T_STD_B64LE - DATASPACE SIMPLE { ( 32 ) / ( 32 ) } - DATA { - (0): ff:ff:ff:ff:ff:ff:ff:ff, bf:ff:ff:ff:ff:ff:ff:ff, - (2): 7f:ff:ff:ff:ff:ff:ff:ff, 3f:ff:ff:ff:ff:ff:ff:ff, - (4): ff:fe:ff:ff:ff:ff:ff:ff, bf:fe:ff:ff:ff:ff:ff:ff, - (6): 7f:fe:ff:ff:ff:ff:ff:ff, 3f:fe:ff:ff:ff:ff:ff:ff, - (8): ff:fd:ff:ff:ff:ff:ff:ff, bf:fd:ff:ff:ff:ff:ff:ff, - (10): 7f:fd:ff:ff:ff:ff:ff:ff, 3f:fd:ff:ff:ff:ff:ff:ff, - (12): ff:fc:ff:ff:ff:ff:ff:ff, bf:fc:ff:ff:ff:ff:ff:ff, - (14): 7f:fc:ff:ff:ff:ff:ff:ff, 3f:fc:ff:ff:ff:ff:ff:ff, - (16): ff:fb:ff:ff:ff:ff:ff:ff, bf:fb:ff:ff:ff:ff:ff:ff, - (18): 7f:fb:ff:ff:ff:ff:ff:ff, 3f:fb:ff:ff:ff:ff:ff:ff, - (20): ff:fa:ff:ff:ff:ff:ff:ff, bf:fa:ff:ff:ff:ff:ff:ff, - (22): 7f:fa:ff:ff:ff:ff:ff:ff, 3f:fa:ff:ff:ff:ff:ff:ff, - (24): ff:f9:ff:ff:ff:ff:ff:ff, bf:f9:ff:ff:ff:ff:ff:ff, - (26): 7f:f9:ff:ff:ff:ff:ff:ff, 3f:f9:ff:ff:ff:ff:ff:ff, - (28): ff:f8:ff:ff:ff:ff:ff:ff, bf:f8:ff:ff:ff:ff:ff:ff, - (30): 7f:f8:ff:ff:ff:ff:ff:ff, 3f:f8:ff:ff:ff:ff:ff:ff - } - } - } - GROUP "cmpdtypetests" { - DATASET "compound_1" { - DATATYPE H5T_COMPOUND { - H5T_STD_B8LE "a"; - H5T_STD_B16LE "b"; - H5T_STD_B32LE "c"; - H5T_STD_B64LE "d"; - } - DATASPACE SIMPLE { ( 32 ) / ( 32 ) } - DATA { - (0): { - 0xff, - ff:ff, - ff:ff:ff:ff, - ff:ff:ff:ff:ff:ff:ff:ff - }, - (1): { - 0xfe, - ef:ff, - df:ff:ff:ff, - bf:ff:ff:ff:ff:ff:ff:ff - }, - (2): { - 0xfd, - df:ff, - bf:ff:ff:ff, - 7f:ff:ff:ff:ff:ff:ff:ff - }, - (3): { - 0xfc, - cf:ff, - 9f:ff:ff:ff, - 3f:ff:ff:ff:ff:ff:ff:ff - }, - (4): { - 0xfb, - bf:ff, - 7f:ff:ff:ff, - ff:fe:ff:ff:ff:ff:ff:ff - }, - (5): { - 0xfa, - af:ff, - 5f:ff:ff:ff, - bf:fe:ff:ff:ff:ff:ff:ff - }, - (6): { - 0xf9, - 9f:ff, - 3f:ff:ff:ff, - 7f:fe:ff:ff:ff:ff:ff:ff - }, - (7): { - 0xf8, - 8f:ff, - 1f:ff:ff:ff, - 3f:fe:ff:ff:ff:ff:ff:ff - }, - (8): { - 0xf7, - 7f:ff, - ff:fe:ff:ff, - ff:fd:ff:ff:ff:ff:ff:ff - }, - (9): { - 0xf6, - 6f:ff, - df:fe:ff:ff, - bf:fd:ff:ff:ff:ff:ff:ff - }, - (10): { - 0xf5, - 5f:ff, - bf:fe:ff:ff, - 7f:fd:ff:ff:ff:ff:ff:ff - }, - (11): { - 0xf4, - 4f:ff, - 9f:fe:ff:ff, - 3f:fd:ff:ff:ff:ff:ff:ff - }, - (12): { - 0xf3, - 3f:ff, - 7f:fe:ff:ff, - ff:fc:ff:ff:ff:ff:ff:ff - }, - (13): { - 0xf2, - 2f:ff, - 5f:fe:ff:ff, - bf:fc:ff:ff:ff:ff:ff:ff - }, - (14): { - 0xf1, - 1f:ff, - 3f:fe:ff:ff, - 7f:fc:ff:ff:ff:ff:ff:ff - }, - (15): { - 0xf0, - 0f:ff, - 1f:fe:ff:ff, - 3f:fc:ff:ff:ff:ff:ff:ff - }, - (16): { - 0xef, - ff:fe, - ff:fd:ff:ff, - ff:fb:ff:ff:ff:ff:ff:ff - }, - (17): { - 0xee, - ef:fe, - df:fd:ff:ff, - bf:fb:ff:ff:ff:ff:ff:ff - }, - (18): { - 0xed, - df:fe, - bf:fd:ff:ff, - 7f:fb:ff:ff:ff:ff:ff:ff - }, - (19): { - 0xec, - cf:fe, - 9f:fd:ff:ff, - 3f:fb:ff:ff:ff:ff:ff:ff - }, - (20): { - 0xeb, - bf:fe, - 7f:fd:ff:ff, - ff:fa:ff:ff:ff:ff:ff:ff - }, - (21): { - 0xea, - af:fe, - 5f:fd:ff:ff, - bf:fa:ff:ff:ff:ff:ff:ff - }, - (22): { - 0xe9, - 9f:fe, - 3f:fd:ff:ff, - 7f:fa:ff:ff:ff:ff:ff:ff - }, - (23): { - 0xe8, - 8f:fe, - 1f:fd:ff:ff, - 3f:fa:ff:ff:ff:ff:ff:ff - }, - (24): { - 0xe7, - 7f:fe, - ff:fc:ff:ff, - ff:f9:ff:ff:ff:ff:ff:ff - }, - (25): { - 0xe6, - 6f:fe, - df:fc:ff:ff, - bf:f9:ff:ff:ff:ff:ff:ff - }, - (26): { - 0xe5, - 5f:fe, - bf:fc:ff:ff, - 7f:f9:ff:ff:ff:ff:ff:ff - }, - (27): { - 0xe4, - 4f:fe, - 9f:fc:ff:ff, - 3f:f9:ff:ff:ff:ff:ff:ff - }, - (28): { - 0xe3, - 3f:fe, - 7f:fc:ff:ff, - ff:f8:ff:ff:ff:ff:ff:ff - }, - (29): { - 0xe2, - 2f:fe, - 5f:fc:ff:ff, - bf:f8:ff:ff:ff:ff:ff:ff - }, - (30): { - 0xe1, - 1f:fe, - 3f:fc:ff:ff, - 7f:f8:ff:ff:ff:ff:ff:ff - }, - (31): { - 0xe0, - 0f:fe, - 1f:fc:ff:ff, - 3f:f8:ff:ff:ff:ff:ff:ff - } - } - } - } - GROUP "opaquetypetests" { - DATASET "opaque_1" { - DATATYPE H5T_OPAQUE { - OPAQUE_TAG "1-byte opaque type"; - } - DATASPACE SIMPLE { ( 32 ) / ( 32 ) } - DATA { - (0): 0xff, 0xfe, 0xfd, 0xfc, 0xfb, 0xfa, 0xf9, 0xf8, 0xf7, 0xf6, - (10): 0xf5, 0xf4, 0xf3, 0xf2, 0xf1, 0xf0, 0xef, 0xee, 0xed, 0xec, - (20): 0xeb, 0xea, 0xe9, 0xe8, 0xe7, 0xe6, 0xe5, 0xe4, 0xe3, 0xe2, - (30): 0xe1, 0xe0 - } - } - DATASET "opaque_2" { - DATATYPE H5T_OPAQUE { - OPAQUE_TAG "2-byte opaque type"; - } - DATASPACE SIMPLE { ( 32 ) / ( 32 ) } - DATA { - (0): ff:ff, 00:00, ef:ff, 00:00, df:ff, 00:00, cf:ff, 00:00, bf:ff, - (9): 00:00, af:ff, 00:00, 9f:ff, 00:00, 8f:ff, 00:00, 7f:ff, 00:00, - (18): 6f:ff, 00:00, 5f:ff, 00:00, 4f:ff, 00:00, 3f:ff, 00:00, 2f:ff, - (27): 00:00, 1f:ff, 00:00, 0f:ff, 00:00 - } - } - } -} -} diff --git a/tools/testfiles/tbitnopaque.h5 b/tools/testfiles/tbitnopaque.h5 index 2b1f23d..089a86d 100644 Binary files a/tools/testfiles/tbitnopaque.h5 and b/tools/testfiles/tbitnopaque.h5 differ diff --git a/tools/testfiles/tbitnopaque_be.ddl b/tools/testfiles/tbitnopaque_be.ddl new file mode 100644 index 0000000..b0de7c4 --- /dev/null +++ b/tools/testfiles/tbitnopaque_be.ddl @@ -0,0 +1,293 @@ +HDF5 "tbitnopaque.h5" { +GROUP "/" { + GROUP "bittypetests" { + DATASET "bitfield_1" { + DATATYPE H5T_STD_B8LE + DATASPACE SIMPLE { ( 32 ) / ( 32 ) } + DATA { + (0): 0xff, 0xfe, 0xfd, 0xfc, 0xfb, 0xfa, 0xf9, 0xf8, 0xf7, 0xf6, + (10): 0xf5, 0xf4, 0xf3, 0xf2, 0xf1, 0xf0, 0xef, 0xee, 0xed, 0xec, + (20): 0xeb, 0xea, 0xe9, 0xe8, 0xe7, 0xe6, 0xe5, 0xe4, 0xe3, 0xe2, + (30): 0xe1, 0xe0 + } + } + DATASET "bitfield_2" { + DATATYPE H5T_STD_B16LE + DATASPACE SIMPLE { ( 32 ) / ( 32 ) } + DATA { + (0): ff:ff, ff:ef, ff:df, ff:cf, ff:bf, ff:af, ff:9f, ff:8f, ff:7f, + (9): ff:6f, ff:5f, ff:4f, ff:3f, ff:2f, ff:1f, ff:0f, fe:ff, fe:ef, + (18): fe:df, fe:cf, fe:bf, fe:af, fe:9f, fe:8f, fe:7f, fe:6f, fe:5f, + (27): fe:4f, fe:3f, fe:2f, fe:1f, fe:0f + } + } + DATASET "bitfield_3" { + DATATYPE H5T_STD_B32LE + DATASPACE SIMPLE { ( 32 ) / ( 32 ) } + DATA { + (0): ff:ff:ff:ff, ff:ff:ff:df, ff:ff:ff:bf, ff:ff:ff:9f, + (4): ff:ff:ff:7f, ff:ff:ff:5f, ff:ff:ff:3f, ff:ff:ff:1f, + (8): ff:ff:fe:ff, ff:ff:fe:df, ff:ff:fe:bf, ff:ff:fe:9f, + (12): ff:ff:fe:7f, ff:ff:fe:5f, ff:ff:fe:3f, ff:ff:fe:1f, + (16): ff:ff:fd:ff, ff:ff:fd:df, ff:ff:fd:bf, ff:ff:fd:9f, + (20): ff:ff:fd:7f, ff:ff:fd:5f, ff:ff:fd:3f, ff:ff:fd:1f, + (24): ff:ff:fc:ff, ff:ff:fc:df, ff:ff:fc:bf, ff:ff:fc:9f, + (28): ff:ff:fc:7f, ff:ff:fc:5f, ff:ff:fc:3f, ff:ff:fc:1f + } + } + DATASET "bitfield_4" { + DATATYPE H5T_STD_B64LE + DATASPACE SIMPLE { ( 32 ) / ( 32 ) } + DATA { + (0): ff:ff:ff:ff:ff:ff:ff:ff, ff:ff:ff:ff:ff:ff:ff:bf, + (2): ff:ff:ff:ff:ff:ff:ff:7f, ff:ff:ff:ff:ff:ff:ff:3f, + (4): ff:ff:ff:ff:ff:ff:fe:ff, ff:ff:ff:ff:ff:ff:fe:bf, + (6): ff:ff:ff:ff:ff:ff:fe:7f, ff:ff:ff:ff:ff:ff:fe:3f, + (8): ff:ff:ff:ff:ff:ff:fd:ff, ff:ff:ff:ff:ff:ff:fd:bf, + (10): ff:ff:ff:ff:ff:ff:fd:7f, ff:ff:ff:ff:ff:ff:fd:3f, + (12): ff:ff:ff:ff:ff:ff:fc:ff, ff:ff:ff:ff:ff:ff:fc:bf, + (14): ff:ff:ff:ff:ff:ff:fc:7f, ff:ff:ff:ff:ff:ff:fc:3f, + (16): ff:ff:ff:ff:ff:ff:fb:ff, ff:ff:ff:ff:ff:ff:fb:bf, + (18): ff:ff:ff:ff:ff:ff:fb:7f, ff:ff:ff:ff:ff:ff:fb:3f, + (20): ff:ff:ff:ff:ff:ff:fa:ff, ff:ff:ff:ff:ff:ff:fa:bf, + (22): ff:ff:ff:ff:ff:ff:fa:7f, ff:ff:ff:ff:ff:ff:fa:3f, + (24): ff:ff:ff:ff:ff:ff:f9:ff, ff:ff:ff:ff:ff:ff:f9:bf, + (26): ff:ff:ff:ff:ff:ff:f9:7f, ff:ff:ff:ff:ff:ff:f9:3f, + (28): ff:ff:ff:ff:ff:ff:f8:ff, ff:ff:ff:ff:ff:ff:f8:bf, + (30): ff:ff:ff:ff:ff:ff:f8:7f, ff:ff:ff:ff:ff:ff:f8:3f + } + } + } + GROUP "cmpdtypetests" { + DATASET "compound_1" { + DATATYPE H5T_COMPOUND { + H5T_STD_B8LE "a"; + H5T_STD_B16LE "b"; + H5T_STD_B32LE "c"; + H5T_STD_B64LE "d"; + } + DATASPACE SIMPLE { ( 32 ) / ( 32 ) } + DATA { + (0): { + 0xff, + ff:ff, + ff:ff:ff:ff, + ff:ff:ff:ff:ff:ff:ff:ff + }, + (1): { + 0xfe, + ff:ef, + ff:ff:ff:df, + ff:ff:ff:ff:ff:ff:ff:bf + }, + (2): { + 0xfd, + ff:df, + ff:ff:ff:bf, + ff:ff:ff:ff:ff:ff:ff:7f + }, + (3): { + 0xfc, + ff:cf, + ff:ff:ff:9f, + ff:ff:ff:ff:ff:ff:ff:3f + }, + (4): { + 0xfb, + ff:bf, + ff:ff:ff:7f, + ff:ff:ff:ff:ff:ff:fe:ff + }, + (5): { + 0xfa, + ff:af, + ff:ff:ff:5f, + ff:ff:ff:ff:ff:ff:fe:bf + }, + (6): { + 0xf9, + ff:9f, + ff:ff:ff:3f, + ff:ff:ff:ff:ff:ff:fe:7f + }, + (7): { + 0xf8, + ff:8f, + ff:ff:ff:1f, + ff:ff:ff:ff:ff:ff:fe:3f + }, + (8): { + 0xf7, + ff:7f, + ff:ff:fe:ff, + ff:ff:ff:ff:ff:ff:fd:ff + }, + (9): { + 0xf6, + ff:6f, + ff:ff:fe:df, + ff:ff:ff:ff:ff:ff:fd:bf + }, + (10): { + 0xf5, + ff:5f, + ff:ff:fe:bf, + ff:ff:ff:ff:ff:ff:fd:7f + }, + (11): { + 0xf4, + ff:4f, + ff:ff:fe:9f, + ff:ff:ff:ff:ff:ff:fd:3f + }, + (12): { + 0xf3, + ff:3f, + ff:ff:fe:7f, + ff:ff:ff:ff:ff:ff:fc:ff + }, + (13): { + 0xf2, + ff:2f, + ff:ff:fe:5f, + ff:ff:ff:ff:ff:ff:fc:bf + }, + (14): { + 0xf1, + ff:1f, + ff:ff:fe:3f, + ff:ff:ff:ff:ff:ff:fc:7f + }, + (15): { + 0xf0, + ff:0f, + ff:ff:fe:1f, + ff:ff:ff:ff:ff:ff:fc:3f + }, + (16): { + 0xef, + fe:ff, + ff:ff:fd:ff, + ff:ff:ff:ff:ff:ff:fb:ff + }, + (17): { + 0xee, + fe:ef, + ff:ff:fd:df, + ff:ff:ff:ff:ff:ff:fb:bf + }, + (18): { + 0xed, + fe:df, + ff:ff:fd:bf, + ff:ff:ff:ff:ff:ff:fb:7f + }, + (19): { + 0xec, + fe:cf, + ff:ff:fd:9f, + ff:ff:ff:ff:ff:ff:fb:3f + }, + (20): { + 0xeb, + fe:bf, + ff:ff:fd:7f, + ff:ff:ff:ff:ff:ff:fa:ff + }, + (21): { + 0xea, + fe:af, + ff:ff:fd:5f, + ff:ff:ff:ff:ff:ff:fa:bf + }, + (22): { + 0xe9, + fe:9f, + ff:ff:fd:3f, + ff:ff:ff:ff:ff:ff:fa:7f + }, + (23): { + 0xe8, + fe:8f, + ff:ff:fd:1f, + ff:ff:ff:ff:ff:ff:fa:3f + }, + (24): { + 0xe7, + fe:7f, + ff:ff:fc:ff, + ff:ff:ff:ff:ff:ff:f9:ff + }, + (25): { + 0xe6, + fe:6f, + ff:ff:fc:df, + ff:ff:ff:ff:ff:ff:f9:bf + }, + (26): { + 0xe5, + fe:5f, + ff:ff:fc:bf, + ff:ff:ff:ff:ff:ff:f9:7f + }, + (27): { + 0xe4, + fe:4f, + ff:ff:fc:9f, + ff:ff:ff:ff:ff:ff:f9:3f + }, + (28): { + 0xe3, + fe:3f, + ff:ff:fc:7f, + ff:ff:ff:ff:ff:ff:f8:ff + }, + (29): { + 0xe2, + fe:2f, + ff:ff:fc:5f, + ff:ff:ff:ff:ff:ff:f8:bf + }, + (30): { + 0xe1, + fe:1f, + ff:ff:fc:3f, + ff:ff:ff:ff:ff:ff:f8:7f + }, + (31): { + 0xe0, + fe:0f, + ff:ff:fc:1f, + ff:ff:ff:ff:ff:ff:f8:3f + } + } + } + } + GROUP "opaquetypetests" { + DATASET "opaque_1" { + DATATYPE H5T_OPAQUE { + OPAQUE_TAG "1-byte opaque type"; + } + DATASPACE SIMPLE { ( 32 ) / ( 32 ) } + DATA { + (0): 0xff, 0xfe, 0xfd, 0xfc, 0xfb, 0xfa, 0xf9, 0xf8, 0xf7, 0xf6, + (10): 0xf5, 0xf4, 0xf3, 0xf2, 0xf1, 0xf0, 0xef, 0xee, 0xed, 0xec, + (20): 0xeb, 0xea, 0xe9, 0xe8, 0xe7, 0xe6, 0xe5, 0xe4, 0xe3, 0xe2, + (30): 0xe1, 0xe0 + } + } + DATASET "opaque_2" { + DATATYPE H5T_OPAQUE { + OPAQUE_TAG "2-byte opaque type"; + } + DATASPACE SIMPLE { ( 32 ) / ( 32 ) } + DATA { + (0): ff:ff, ef:ff, df:ff, cf:ff, bf:ff, af:ff, 9f:ff, 8f:ff, 7f:ff, + (9): 6f:ff, 5f:ff, 4f:ff, 3f:ff, 2f:ff, 1f:ff, 0f:ff, ff:fe, ef:fe, + (18): df:fe, cf:fe, bf:fe, af:fe, 9f:fe, 8f:fe, 7f:fe, 6f:fe, 5f:fe, + (27): 4f:fe, 3f:fe, 2f:fe, 1f:fe, 0f:fe + } + } + } +} +} diff --git a/tools/testfiles/tbitnopaque_le.ddl b/tools/testfiles/tbitnopaque_le.ddl new file mode 100644 index 0000000..0c59c0b --- /dev/null +++ b/tools/testfiles/tbitnopaque_le.ddl @@ -0,0 +1,293 @@ +HDF5 "tbitnopaque.h5" { +GROUP "/" { + GROUP "bittypetests" { + DATASET "bitfield_1" { + DATATYPE H5T_STD_B8LE + DATASPACE SIMPLE { ( 32 ) / ( 32 ) } + DATA { + (0): 0xff, 0xfe, 0xfd, 0xfc, 0xfb, 0xfa, 0xf9, 0xf8, 0xf7, 0xf6, + (10): 0xf5, 0xf4, 0xf3, 0xf2, 0xf1, 0xf0, 0xef, 0xee, 0xed, 0xec, + (20): 0xeb, 0xea, 0xe9, 0xe8, 0xe7, 0xe6, 0xe5, 0xe4, 0xe3, 0xe2, + (30): 0xe1, 0xe0 + } + } + DATASET "bitfield_2" { + DATATYPE H5T_STD_B16LE + DATASPACE SIMPLE { ( 32 ) / ( 32 ) } + DATA { + (0): ff:ff, ef:ff, df:ff, cf:ff, bf:ff, af:ff, 9f:ff, 8f:ff, 7f:ff, + (9): 6f:ff, 5f:ff, 4f:ff, 3f:ff, 2f:ff, 1f:ff, 0f:ff, ff:fe, ef:fe, + (18): df:fe, cf:fe, bf:fe, af:fe, 9f:fe, 8f:fe, 7f:fe, 6f:fe, 5f:fe, + (27): 4f:fe, 3f:fe, 2f:fe, 1f:fe, 0f:fe + } + } + DATASET "bitfield_3" { + DATATYPE H5T_STD_B32LE + DATASPACE SIMPLE { ( 32 ) / ( 32 ) } + DATA { + (0): ff:ff:ff:ff, df:ff:ff:ff, bf:ff:ff:ff, 9f:ff:ff:ff, + (4): 7f:ff:ff:ff, 5f:ff:ff:ff, 3f:ff:ff:ff, 1f:ff:ff:ff, + (8): ff:fe:ff:ff, df:fe:ff:ff, bf:fe:ff:ff, 9f:fe:ff:ff, + (12): 7f:fe:ff:ff, 5f:fe:ff:ff, 3f:fe:ff:ff, 1f:fe:ff:ff, + (16): ff:fd:ff:ff, df:fd:ff:ff, bf:fd:ff:ff, 9f:fd:ff:ff, + (20): 7f:fd:ff:ff, 5f:fd:ff:ff, 3f:fd:ff:ff, 1f:fd:ff:ff, + (24): ff:fc:ff:ff, df:fc:ff:ff, bf:fc:ff:ff, 9f:fc:ff:ff, + (28): 7f:fc:ff:ff, 5f:fc:ff:ff, 3f:fc:ff:ff, 1f:fc:ff:ff + } + } + DATASET "bitfield_4" { + DATATYPE H5T_STD_B64LE + DATASPACE SIMPLE { ( 32 ) / ( 32 ) } + DATA { + (0): ff:ff:ff:ff:ff:ff:ff:ff, bf:ff:ff:ff:ff:ff:ff:ff, + (2): 7f:ff:ff:ff:ff:ff:ff:ff, 3f:ff:ff:ff:ff:ff:ff:ff, + (4): ff:fe:ff:ff:ff:ff:ff:ff, bf:fe:ff:ff:ff:ff:ff:ff, + (6): 7f:fe:ff:ff:ff:ff:ff:ff, 3f:fe:ff:ff:ff:ff:ff:ff, + (8): ff:fd:ff:ff:ff:ff:ff:ff, bf:fd:ff:ff:ff:ff:ff:ff, + (10): 7f:fd:ff:ff:ff:ff:ff:ff, 3f:fd:ff:ff:ff:ff:ff:ff, + (12): ff:fc:ff:ff:ff:ff:ff:ff, bf:fc:ff:ff:ff:ff:ff:ff, + (14): 7f:fc:ff:ff:ff:ff:ff:ff, 3f:fc:ff:ff:ff:ff:ff:ff, + (16): ff:fb:ff:ff:ff:ff:ff:ff, bf:fb:ff:ff:ff:ff:ff:ff, + (18): 7f:fb:ff:ff:ff:ff:ff:ff, 3f:fb:ff:ff:ff:ff:ff:ff, + (20): ff:fa:ff:ff:ff:ff:ff:ff, bf:fa:ff:ff:ff:ff:ff:ff, + (22): 7f:fa:ff:ff:ff:ff:ff:ff, 3f:fa:ff:ff:ff:ff:ff:ff, + (24): ff:f9:ff:ff:ff:ff:ff:ff, bf:f9:ff:ff:ff:ff:ff:ff, + (26): 7f:f9:ff:ff:ff:ff:ff:ff, 3f:f9:ff:ff:ff:ff:ff:ff, + (28): ff:f8:ff:ff:ff:ff:ff:ff, bf:f8:ff:ff:ff:ff:ff:ff, + (30): 7f:f8:ff:ff:ff:ff:ff:ff, 3f:f8:ff:ff:ff:ff:ff:ff + } + } + } + GROUP "cmpdtypetests" { + DATASET "compound_1" { + DATATYPE H5T_COMPOUND { + H5T_STD_B8LE "a"; + H5T_STD_B16LE "b"; + H5T_STD_B32LE "c"; + H5T_STD_B64LE "d"; + } + DATASPACE SIMPLE { ( 32 ) / ( 32 ) } + DATA { + (0): { + 0xff, + ff:ff, + ff:ff:ff:ff, + ff:ff:ff:ff:ff:ff:ff:ff + }, + (1): { + 0xfe, + ef:ff, + df:ff:ff:ff, + bf:ff:ff:ff:ff:ff:ff:ff + }, + (2): { + 0xfd, + df:ff, + bf:ff:ff:ff, + 7f:ff:ff:ff:ff:ff:ff:ff + }, + (3): { + 0xfc, + cf:ff, + 9f:ff:ff:ff, + 3f:ff:ff:ff:ff:ff:ff:ff + }, + (4): { + 0xfb, + bf:ff, + 7f:ff:ff:ff, + ff:fe:ff:ff:ff:ff:ff:ff + }, + (5): { + 0xfa, + af:ff, + 5f:ff:ff:ff, + bf:fe:ff:ff:ff:ff:ff:ff + }, + (6): { + 0xf9, + 9f:ff, + 3f:ff:ff:ff, + 7f:fe:ff:ff:ff:ff:ff:ff + }, + (7): { + 0xf8, + 8f:ff, + 1f:ff:ff:ff, + 3f:fe:ff:ff:ff:ff:ff:ff + }, + (8): { + 0xf7, + 7f:ff, + ff:fe:ff:ff, + ff:fd:ff:ff:ff:ff:ff:ff + }, + (9): { + 0xf6, + 6f:ff, + df:fe:ff:ff, + bf:fd:ff:ff:ff:ff:ff:ff + }, + (10): { + 0xf5, + 5f:ff, + bf:fe:ff:ff, + 7f:fd:ff:ff:ff:ff:ff:ff + }, + (11): { + 0xf4, + 4f:ff, + 9f:fe:ff:ff, + 3f:fd:ff:ff:ff:ff:ff:ff + }, + (12): { + 0xf3, + 3f:ff, + 7f:fe:ff:ff, + ff:fc:ff:ff:ff:ff:ff:ff + }, + (13): { + 0xf2, + 2f:ff, + 5f:fe:ff:ff, + bf:fc:ff:ff:ff:ff:ff:ff + }, + (14): { + 0xf1, + 1f:ff, + 3f:fe:ff:ff, + 7f:fc:ff:ff:ff:ff:ff:ff + }, + (15): { + 0xf0, + 0f:ff, + 1f:fe:ff:ff, + 3f:fc:ff:ff:ff:ff:ff:ff + }, + (16): { + 0xef, + ff:fe, + ff:fd:ff:ff, + ff:fb:ff:ff:ff:ff:ff:ff + }, + (17): { + 0xee, + ef:fe, + df:fd:ff:ff, + bf:fb:ff:ff:ff:ff:ff:ff + }, + (18): { + 0xed, + df:fe, + bf:fd:ff:ff, + 7f:fb:ff:ff:ff:ff:ff:ff + }, + (19): { + 0xec, + cf:fe, + 9f:fd:ff:ff, + 3f:fb:ff:ff:ff:ff:ff:ff + }, + (20): { + 0xeb, + bf:fe, + 7f:fd:ff:ff, + ff:fa:ff:ff:ff:ff:ff:ff + }, + (21): { + 0xea, + af:fe, + 5f:fd:ff:ff, + bf:fa:ff:ff:ff:ff:ff:ff + }, + (22): { + 0xe9, + 9f:fe, + 3f:fd:ff:ff, + 7f:fa:ff:ff:ff:ff:ff:ff + }, + (23): { + 0xe8, + 8f:fe, + 1f:fd:ff:ff, + 3f:fa:ff:ff:ff:ff:ff:ff + }, + (24): { + 0xe7, + 7f:fe, + ff:fc:ff:ff, + ff:f9:ff:ff:ff:ff:ff:ff + }, + (25): { + 0xe6, + 6f:fe, + df:fc:ff:ff, + bf:f9:ff:ff:ff:ff:ff:ff + }, + (26): { + 0xe5, + 5f:fe, + bf:fc:ff:ff, + 7f:f9:ff:ff:ff:ff:ff:ff + }, + (27): { + 0xe4, + 4f:fe, + 9f:fc:ff:ff, + 3f:f9:ff:ff:ff:ff:ff:ff + }, + (28): { + 0xe3, + 3f:fe, + 7f:fc:ff:ff, + ff:f8:ff:ff:ff:ff:ff:ff + }, + (29): { + 0xe2, + 2f:fe, + 5f:fc:ff:ff, + bf:f8:ff:ff:ff:ff:ff:ff + }, + (30): { + 0xe1, + 1f:fe, + 3f:fc:ff:ff, + 7f:f8:ff:ff:ff:ff:ff:ff + }, + (31): { + 0xe0, + 0f:fe, + 1f:fc:ff:ff, + 3f:f8:ff:ff:ff:ff:ff:ff + } + } + } + } + GROUP "opaquetypetests" { + DATASET "opaque_1" { + DATATYPE H5T_OPAQUE { + OPAQUE_TAG "1-byte opaque type"; + } + DATASPACE SIMPLE { ( 32 ) / ( 32 ) } + DATA { + (0): 0xff, 0xfe, 0xfd, 0xfc, 0xfb, 0xfa, 0xf9, 0xf8, 0xf7, 0xf6, + (10): 0xf5, 0xf4, 0xf3, 0xf2, 0xf1, 0xf0, 0xef, 0xee, 0xed, 0xec, + (20): 0xeb, 0xea, 0xe9, 0xe8, 0xe7, 0xe6, 0xe5, 0xe4, 0xe3, 0xe2, + (30): 0xe1, 0xe0 + } + } + DATASET "opaque_2" { + DATATYPE H5T_OPAQUE { + OPAQUE_TAG "2-byte opaque type"; + } + DATASPACE SIMPLE { ( 32 ) / ( 32 ) } + DATA { + (0): ff:ff, ef:ff, df:ff, cf:ff, bf:ff, af:ff, 9f:ff, 8f:ff, 7f:ff, + (9): 6f:ff, 5f:ff, 4f:ff, 3f:ff, 2f:ff, 1f:ff, 0f:ff, ff:fe, ef:fe, + (18): df:fe, cf:fe, bf:fe, af:fe, 9f:fe, 8f:fe, 7f:fe, 6f:fe, 5f:fe, + (27): 4f:fe, 3f:fe, 2f:fe, 1f:fe, 0f:fe + } + } + } +} +} -- cgit v0.12 From b3a1d66c09b8bd0c9bd663665a564c47159f4504 Mon Sep 17 00:00:00 2001 From: Dana Robinson Date: Thu, 25 May 2017 13:41:57 -0400 Subject: Added missing casts for the return value of H5I_object_verify(). (cherry picked from commit 8807f918b9b00916efa822dda0301d3aa9debd80) --- src/H5S.c | 2 +- src/H5Shyper.c | 12 ++++++------ src/H5Zszip.c | 4 ++-- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/H5S.c b/src/H5S.c index dd390d9..9ac40a7 100644 --- a/src/H5S.c +++ b/src/H5S.c @@ -1544,7 +1544,7 @@ H5Sencode(hid_t obj_id, void *buf, size_t *nalloc) H5TRACE3("e", "i*x*z", obj_id, buf, nalloc); /* Check argument and retrieve object */ - if (NULL==(dspace=(H5S_t *)H5I_object_verify(obj_id, H5I_DATASPACE))) + if (NULL == (dspace = (H5S_t *)H5I_object_verify(obj_id, H5I_DATASPACE))) HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a dataspace") if(H5S_encode(dspace, (unsigned char **)&buf, nalloc)<0) diff --git a/src/H5Shyper.c b/src/H5Shyper.c index e6e6cff..9263cd8 100644 --- a/src/H5Shyper.c +++ b/src/H5Shyper.c @@ -7571,7 +7571,7 @@ H5Sselect_hyperslab(hid_t space_id, H5S_seloper_t op, const hsize_t start[], H5TRACE6("e", "iSs*h*h*h*h", space_id, op, start, stride, count, block); /* Check args */ - if (NULL == (space=H5I_object_verify(space_id, H5I_DATASPACE))) + if (NULL == (space = (H5S_t *)H5I_object_verify(space_id, H5I_DATASPACE))) HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a data space") if (H5S_SCALAR==H5S_GET_EXTENT_TYPE(space)) HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "hyperslab doesn't support H5S_SCALAR space") @@ -7640,7 +7640,7 @@ H5Scombine_hyperslab(hid_t space_id, H5S_seloper_t op, const hsize_t start[], H5TRACE6("i", "iSs*h*h*h*h", space_id, op, start, stride, count, block); /* Check args */ - if (NULL == (space=H5I_object_verify(space_id, H5I_DATASPACE))) + if (NULL == (space = (H5S_t *)H5I_object_verify(space_id, H5I_DATASPACE))) HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a data space") if(start==NULL || count==NULL) HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "hyperslab not specified") @@ -7768,9 +7768,9 @@ H5Scombine_select(hid_t space1_id, H5S_seloper_t op, hid_t space2_id) H5TRACE3("i", "iSsi", space1_id, op, space2_id); /* Check args */ - if (NULL == (space1=H5I_object_verify(space1_id, H5I_DATASPACE))) + if (NULL == (space1 = (H5S_t *)H5I_object_verify(space1_id, H5I_DATASPACE))) HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a data space") - if (NULL == (space2=H5I_object_verify(space2_id, H5I_DATASPACE))) + if (NULL == (space2 = (H5S_t *)H5I_object_verify(space2_id, H5I_DATASPACE))) HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a data space") if(!(op>H5S_SELECT_NOOP && opH5S_SELECT_NOOP && op Date: Thu, 25 May 2017 15:55:55 -0500 Subject: Reduce warnings --- java/src/jni/h5Constants.c | 1 + java/src/jni/h5lImp.c | 2 +- java/src/jni/h5pImp.c | 4 ++-- java/src/jni/h5plImp.c | 8 ++++---- java/src/jni/h5sImp.c | 4 ++-- 5 files changed, 10 insertions(+), 9 deletions(-) diff --git a/java/src/jni/h5Constants.c b/java/src/jni/h5Constants.c index cd1c2f0..d4511e1 100644 --- a/java/src/jni/h5Constants.c +++ b/java/src/jni/h5Constants.c @@ -24,6 +24,7 @@ extern "C" { #include #include "hdf5.h" +#pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wmissing-prototypes" JNIEXPORT jlong JNICALL diff --git a/java/src/jni/h5lImp.c b/java/src/jni/h5lImp.c index bf2d7b1..ac71845 100644 --- a/java/src/jni/h5lImp.c +++ b/java/src/jni/h5lImp.c @@ -457,7 +457,7 @@ Java_hdf_hdf5lib_H5_H5Lget_1value_1by_1idx } /* end if */ else { buf_size = infobuf.u.val_size; - if(buf_size < 0) { + if(buf_size == 0) { h5libraryError(env); } /* end if */ else { diff --git a/java/src/jni/h5pImp.c b/java/src/jni/h5pImp.c index df8b3c9..dcfcd82 100644 --- a/java/src/jni/h5pImp.c +++ b/java/src/jni/h5pImp.c @@ -5127,8 +5127,8 @@ Java_hdf_hdf5lib_H5_H5Pget_1mdc_1log_1options else { /* get the length of the filename */ H5Pget_mdc_log_options((hid_t)fapl_id, &is_enabled, NULL, &location_size, &start_on_access); - if (location_size < 0) { - h5badArgument(env, "H5Pget_mdc_log_options: location_size < 0"); + if (location_size == 0) { + h5badArgument(env, "H5Pget_mdc_log_options: location_size is 0"); }/* end if */ else if (location_size > 0) { location_size++; /* add extra space for the null terminator */ diff --git a/java/src/jni/h5plImp.c b/java/src/jni/h5plImp.c index f064634..ffd5b7a 100644 --- a/java/src/jni/h5plImp.c +++ b/java/src/jni/h5plImp.c @@ -68,7 +68,7 @@ JNIEXPORT void JNICALL Java_hdf_hdf5lib_H5_H5PLappend (JNIEnv *env, jclass clss, jobjectArray plugin_path) { - char *aName; + const char *aName; herr_t retVal = -1; PIN_JAVA_STRING(plugin_path, aName); @@ -90,7 +90,7 @@ JNIEXPORT void JNICALL Java_hdf_hdf5lib_H5_H5PLprepend (JNIEnv *env, jclass clss, jobjectArray plugin_path) { - char *aName; + const char *aName; herr_t retVal = -1; PIN_JAVA_STRING(plugin_path, aName); @@ -113,7 +113,7 @@ JNIEXPORT void JNICALL Java_hdf_hdf5lib_H5_H5PLreplace (JNIEnv *env, jclass clss, jobjectArray plugin_path, jint index) { - char *aName; + const char *aName; herr_t retVal = -1; PIN_JAVA_STRING(plugin_path, aName); @@ -136,7 +136,7 @@ JNIEXPORT void JNICALL Java_hdf_hdf5lib_H5_H5PLinsert (JNIEnv *env, jclass clss, jobjectArray plugin_path, jint index) { - char *aName; + const char *aName; herr_t retVal = -1; PIN_JAVA_STRING(plugin_path, aName); diff --git a/java/src/jni/h5sImp.c b/java/src/jni/h5sImp.c index c578ab8..10f69eb 100644 --- a/java/src/jni/h5sImp.c +++ b/java/src/jni/h5sImp.c @@ -1206,8 +1206,8 @@ Java_hdf_hdf5lib_H5_H5Sencode if (status < 0) { h5libraryError(env); } /* end else if */ - else if (buf_size < 0) { - h5badArgument(env, "H5Sencode: buf_size < 0"); + else if (buf_size == 0) { + h5badArgument(env, "H5Sencode: buf_size = 0"); } /* end if */ else { bufPtr = (unsigned char*)HDcalloc((size_t) 1, buf_size); -- cgit v0.12 From 4f17cdd5d2138a8118e67289a17418314e851123 Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Fri, 26 May 2017 11:17:44 -0500 Subject: Note HDFFV-8611 change --- release_docs/RELEASE.txt | 25 +++++++++++++++---------- 1 file changed, 15 insertions(+), 10 deletions(-) diff --git a/release_docs/RELEASE.txt b/release_docs/RELEASE.txt index 382420a..765fe0a 100644 --- a/release_docs/RELEASE.txt +++ b/release_docs/RELEASE.txt @@ -70,19 +70,19 @@ New Features C++ Library: ------------ - - + - Tools: ------ - - + - High-Level APIs: --------------- - - + - C Packet Table API ------------------ - - + - Internal header file -------------------- @@ -105,7 +105,7 @@ Bug Fixes since HDF5-1.10.0-patch1 release Configuration ------------- - - + - Performance ------------- @@ -117,6 +117,11 @@ Bug Fixes since HDF5-1.10.0-patch1 release Tools ----- + - Improved h5repack by retaining creation order and adding + arguments to set the order and index direction. + + (ADB, 2017/05/26, HDFFV-8611) + - Improved h5diff compare of strings and arrays. (ADB, 2017/05/18, HDFFV-9055, HDFFV-10128) @@ -144,7 +149,7 @@ Bug Fixes since HDF5-1.10.0-patch1 release C++ APIs -------- - - + - Testing ------- @@ -293,16 +298,16 @@ The following platforms are not supported but have been tested for this release. (cmake and autotools) Fedora 24 4.7.2-201.fc24.x86_64 #1 SMP x86_64 x86_64 x86_64 GNU/Linux - gcc, g++ (GCC) 6.1.1 20160621 + gcc, g++ (GCC) 6.1.1 20160621 (Red Hat 6.1.1-3) - GNU Fortran (GCC) 6.1.1 20160621 + GNU Fortran (GCC) 6.1.1 20160621 (Red Hat 6.1.1-3) (cmake and autotools) Ubuntu 16.04.1 4.4.0-38-generic #57-Ubuntu SMP x86_64 GNU/Linux - gcc, g++ (Ubuntu 5.4.0-6ubuntu1~16.04.2) + gcc, g++ (Ubuntu 5.4.0-6ubuntu1~16.04.2) 5.4.0 20160609 - GNU Fortran (Ubuntu 5.4.0-6ubuntu1~16.04.2) + GNU Fortran (Ubuntu 5.4.0-6ubuntu1~16.04.2) 5.4.0 20160609 (cmake and autotools) -- cgit v0.12 From 1a0551aa373cc9dda8a3a4b3d89b38697a8d462d Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Fri, 26 May 2017 13:07:47 -0500 Subject: Updated note based on guidelines --- release_docs/RELEASE.txt | 25 ++++++++++++++++++++----- 1 file changed, 20 insertions(+), 5 deletions(-) diff --git a/release_docs/RELEASE.txt b/release_docs/RELEASE.txt index 765fe0a..0a424f3 100644 --- a/release_docs/RELEASE.txt +++ b/release_docs/RELEASE.txt @@ -117,14 +117,29 @@ Bug Fixes since HDF5-1.10.0-patch1 release Tools ----- - - Improved h5repack by retaining creation order and adding - arguments to set the order and index direction. + - h5repack - (ADB, 2017/05/26, HDFFV-8611) + h5repack did not maintain the creation order flag of the root + group. - - Improved h5diff compare of strings and arrays. + Improved h5repack by reading the creation order and applying the + flag to the new root group. Also added arguments to set the + order and index direction, which applys to the traversing of the + original file, on the command line. - (ADB, 2017/05/18, HDFFV-9055, HDFFV-10128) + (ADB - 2017/05/26, HDFFV-8611) + + - h5diff + + h5diff failed to account for strpad type and null terminators + of char strings. Also, h5diff failed to account for string length + differences and would give a different result depending on file + order in the command line. + + Improved h5diff compare of strings and arrays by adding a check for + string lengths and if the strpad was null filled. + + (ADB - 2017/05/18, HDFFV-9055, HDFFV-10128) High-Level APIs: ------ -- cgit v0.12 From 938dc838b8ad1e815ea6eda820411cb22dfe56c6 Mon Sep 17 00:00:00 2001 From: lrknox Date: Sat, 27 May 2017 11:01:48 -0500 Subject: Test split tbitfields.h5.xml into big and little endian files. tbitfields.h5.xml was removed from MANIFEST but the file still needs to be removed, as it was in the develop branch. --- tools/testfiles/tbitfields.h5.xml | 103 -------------------------------------- 1 file changed, 103 deletions(-) delete mode 100644 tools/testfiles/tbitfields.h5.xml diff --git a/tools/testfiles/tbitfields.h5.xml b/tools/testfiles/tbitfields.h5.xml deleted file mode 100644 index c8ba026..0000000 --- a/tools/testfiles/tbitfields.h5.xml +++ /dev/null @@ -1,103 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - 0xff - 0xfe - 0xfd - 0xfc - 0xfb - 0xfa - 0xf9 - 0xf8 - 0xf7 - 0xf6 - 0xf5 - 0xf4 - 0xf3 - 0xf2 - 0xf1 - 0xf0 - 0xef - 0xee - 0xed - 0xec - 0xeb - 0xea - 0xe9 - 0xe8 - 0xe7 - 0xe6 - 0xe5 - 0xe4 - 0xe3 - 0xe2 - 0xe1 - 0xe0 - - - - - - - - - - - - - - - - - - - - - - - - - ff:fe - fd:fc - fb:fa - f9:f8 - f7:f6 - f5:f4 - f3:f2 - f1:f0 - ef:ee - ed:ec - eb:ea - e9:e8 - e7:e6 - e5:e4 - e3:e2 - e1:e0 - - - - - - -- cgit v0.12 From 91855efe6ea09425c769d1bb33674e21b5d1ca6c Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Tue, 30 May 2017 11:50:29 -0500 Subject: Synchronize cmake files with develop --- config/cmake/CTestScript.cmake | 6 +- config/cmake/HDF518_Examples.cmake.in | 205 +++++++++------------------------- config/cmake/HDF5_Examples.cmake.in | 123 ++++++++++---------- config/cmake_ext_mod/HDFMacros.cmake | 39 ++++--- 4 files changed, 142 insertions(+), 231 deletions(-) diff --git a/config/cmake/CTestScript.cmake b/config/cmake/CTestScript.cmake index a3779d6..c59b10c 100755 --- a/config/cmake/CTestScript.cmake +++ b/config/cmake/CTestScript.cmake @@ -117,8 +117,12 @@ endif () #----------------------------------------------------------------------------- # Initialize the CTEST commands #------------------------------ +set(CTEST_CONFIGURE_TOOLSET "") +if(CMAKE_GENERATOR_TOOLSET) + set(CTEST_CONFIGURE_TOOLSET "-T${CMAKE_GENERATOR_TOOLSET}") +endif() set (CTEST_CONFIGURE_COMMAND - "${CTEST_CMAKE_COMMAND} -C \"${CTEST_SOURCE_DIRECTORY}/config/cmake/cacheinit.cmake\" -DCMAKE_BUILD_TYPE:STRING=${CTEST_CONFIGURATION_TYPE} ${BUILD_OPTIONS} \"-G${CTEST_CMAKE_GENERATOR}\" \"${CTEST_SOURCE_DIRECTORY}\"" + "${CTEST_CMAKE_COMMAND} -C \"${CTEST_SOURCE_DIRECTORY}/config/cmake/cacheinit.cmake\" -DCMAKE_BUILD_TYPE:STRING=${CTEST_CONFIGURATION_TYPE} ${BUILD_OPTIONS} \"-G${CTEST_CMAKE_GENERATOR}\" \"${CTEST_CONFIGURE_TOOLSET}\" \"${CTEST_SOURCE_DIRECTORY}\"" ) #----------------------------------------------------------------------------- diff --git a/config/cmake/HDF518_Examples.cmake.in b/config/cmake/HDF518_Examples.cmake.in index 33d3a40..4f61563 100644 --- a/config/cmake/HDF518_Examples.cmake.in +++ b/config/cmake/HDF518_Examples.cmake.in @@ -17,92 +17,79 @@ cmake_minimum_required(VERSION 3.2.2 FATAL_ERROR) ############################################################################################################### set(CTEST_CMAKE_GENERATOR "@CMAKE_GENERATOR@") +if() + set(CMAKE_GENERATOR_TOOLSET "@GENERATOR_TOOLSET@" +endif() set(CTEST_DASHBOARD_ROOT ${CTEST_SCRIPT_DIRECTORY}) # handle input parameters to script. #INSTALLDIR - HDF5-1.8 root folder #CTEST_CONFIGURATION_TYPE - Release, Debug, RelWithDebInfo -#CTEST_SOURCE_NAME - name of source folder; HDF4Examples -#STATIC_ONLY - Default is YES -#FORTRAN_LIBRARIES - Default is NO -##NO_MAC_FORTRAN - set to TRUE to allow shared libs on a Mac) +#CTEST_SOURCE_NAME - name of source folder; HDF5Examples if(DEFINED CTEST_SCRIPT_ARG) - # transform ctest script arguments of the form - # script.ctest,var1=value1,var2=value2 - # to variables with the respective names set to the respective values - string(REPLACE "," ";" script_args "${CTEST_SCRIPT_ARG}") - foreach(current_var ${script_args}) - if ("${current_var}" MATCHES "^([^=]+)=(.+)$") - set("${CMAKE_MATCH_1}" "${CMAKE_MATCH_2}") - endif () - endforeach () -endif () -if(NOT DEFINED INSTALLDIR) - set(INSTALLDIR "@CMAKE_INSTALL_PREFIX@") -endif () + # transform ctest script arguments of the form + # script.ctest,var1=value1,var2=value2 + # to variables with the respective names set to the respective values + string(REPLACE "," ";" script_args "${CTEST_SCRIPT_ARG}") + foreach(current_var ${script_args}) + if("${current_var}" MATCHES "^([^=]+)=(.+)$") + set("${CMAKE_MATCH_1}" "${CMAKE_MATCH_2}") + endif() + endforeach() +endif() + +################################################################### +### Following Line is one of [Release, RelWithDebInfo, Debug] ##### +set(CTEST_CONFIGURATION_TYPE "$ENV{CMAKE_CONFIG_TYPE}") if(NOT DEFINED CTEST_CONFIGURATION_TYPE) - set(CTEST_CONFIGURATION_TYPE "Release") -endif () + set(CTEST_CONFIGURATION_TYPE "Release") +endif() +set(ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DCTEST_CONFIGURATION_TYPE:STRING=${CTEST_CONFIGURATION_TYPE}") +################################################################## + +if(NOT DEFINED INSTALLDIR) + set(INSTALLDIR "@CMAKE_INSTALL_PREFIX@") +endif() + if(NOT DEFINED CTEST_SOURCE_NAME) - set(CTEST_SOURCE_NAME "HDF5Examples") -endif () -if(NOT DEFINED STATIC_ONLY) - set(STATICONLYLIBRARIES "YES") -else(NOT DEFINED STATIC_ONLY) - set(STATICONLYLIBRARIES "NO") -endif () -if(NOT DEFINED FORTRAN_LIBRARIES) - set(FORTRANLIBRARIES "NO") -else(NOT DEFINED FORTRAN_LIBRARIES) - set(FORTRANLIBRARIES "YES") -endif () + set(CTEST_SOURCE_NAME "HDF5Examples") +endif() + if(NOT DEFINED HDF_LOCAL) - set(CDASH_LOCAL "NO") -else(NOT HDF_LOCAL) - set(CDASH_LOCAL "YES") -endif () + set(CDASH_LOCAL "NO") +else() + set(CDASH_LOCAL "YES") +endif() if(NOT DEFINED CTEST_SITE) - set(CTEST_SITE "local") -endif () + set(CTEST_SITE "local") +endif() if(NOT DEFINED CTEST_BUILD_NAME) - set(CTEST_BUILD_NAME "examples") -endif () + set(CTEST_BUILD_NAME "examples") +endif() set(BUILD_OPTIONS "${BUILD_OPTIONS} -DSITE:STRING=${CTEST_SITE} -DBUILDNAME:STRING=${CTEST_BUILD_NAME}") #TAR_SOURCE - name of tarfile #if(NOT DEFINED TAR_SOURCE) # set(CTEST_USE_TAR_SOURCE "HDF5Examples-1.2.1-Source") -#endif () +#endif() ############################################################################################################### -# Adjust the following SET Commands as needed -############################################################################################################### if(WIN32) - if(${STATICONLYLIBRARIES}) - set(BUILD_OPTIONS "${BUILD_OPTIONS} -DBUILD_SHARED_LIBS:BOOL=OFF") - endif () + set(SITE_OS_NAME "Windows") set(ENV{HDF5_DIR} "${INSTALLDIR}/cmake") set(CTEST_BINARY_NAME ${CTEST_SOURCE_NAME}\\build) set(CTEST_SOURCE_DIRECTORY "${CTEST_DASHBOARD_ROOT}\\${CTEST_SOURCE_NAME}") set(CTEST_BINARY_DIRECTORY "${CTEST_DASHBOARD_ROOT}\\${CTEST_BINARY_NAME}") -else(WIN32) - if(${STATICONLYLIBRARIES}) - set(BUILD_OPTIONS "${BUILD_OPTIONS} -DBUILD_SHARED_LIBS:BOOL=OFF -DCMAKE_ANSI_CFLAGS:STRING=-fPIC") - endif () +else() set(ENV{HDF5_DIR} "${INSTALLDIR}/share/cmake") set(ENV{LD_LIBRARY_PATH} "${INSTALLDIR}/lib") set(CTEST_BINARY_NAME ${CTEST_SOURCE_NAME}/build) set(CTEST_SOURCE_DIRECTORY "${CTEST_DASHBOARD_ROOT}/${CTEST_SOURCE_NAME}") set(CTEST_BINARY_DIRECTORY "${CTEST_DASHBOARD_ROOT}/${CTEST_BINARY_NAME}") -endif(WIN32) -if(${FORTRANLIBRARIES}) - set(BUILD_OPTIONS "${BUILD_OPTIONS} -DHDF_BUILD_FORTRAN:BOOL=ON") -else () - set(BUILD_OPTIONS "${BUILD_OPTIONS} -DHDF_BUILD_FORTRAN:BOOL=OFF") -endif () +endif() if(${CDASH_LOCAL}) set(BUILD_OPTIONS "${BUILD_OPTIONS} -DCDASH_LOCAL:BOOL=ON") -endif () +endif() set(BUILD_OPTIONS "${BUILD_OPTIONS} -DHDF5_PACKAGE_NAME:STRING=@HDF5_PACKAGE@@HDF_PACKAGE_EXT@") ############################################################################################################### @@ -110,102 +97,10 @@ set(BUILD_OPTIONS "${BUILD_OPTIONS} -DHDF5_PACKAGE_NAME:STRING=@HDF5_PACKAGE@@HD # ############################################################################################################### -#----------------------------------------------------------------------------- -# MAC machines need special option -#----------------------------------------------------------------------------- -if(APPLE) - # Compiler choice - execute_process(COMMAND xcrun --find cc OUTPUT_VARIABLE XCODE_CC OUTPUT_STRIP_TRAILING_WHITESPACE) - execute_process(COMMAND xcrun --find c++ OUTPUT_VARIABLE XCODE_CXX OUTPUT_STRIP_TRAILING_WHITESPACE) - set(ENV{CC} "${XCODE_CC}") - set(ENV{CXX} "${XCODE_CXX}") - if(NOT NO_MAC_FORTRAN) - # Shared fortran is not supported, build static - set(BUILD_OPTIONS "${BUILD_OPTIONS} -DBUILD_SHARED_LIBS:BOOL=OFF -DCMAKE_ANSI_CFLAGS:STRING=-fPIC") - else () - set(BUILD_OPTIONS "${BUILD_OPTIONS} -DHDF_BUILD_FORTRAN:BOOL=OFF") - endif () - set(BUILD_OPTIONS "${BUILD_OPTIONS} -DCTEST_USE_LAUNCHERS:BOOL=ON -DCMAKE_BUILD_WITH_INSTALL_RPATH:BOOL=OFF") -endif () - -#----------------------------------------------------------------------------- -set(CTEST_CMAKE_COMMAND "\"${CMAKE_COMMAND}\"") -## -------------------------- -if(CTEST_USE_TAR_SOURCE) - ## Uncompress source if tar or zip file provided - ## -------------------------- - if(WIN32) - message(STATUS "extracting... [${CMAKE_EXECUTABLE_NAME} -E tar -xvf ${CTEST_USE_TAR_SOURCE}.zip]") - execute_process(COMMAND ${CMAKE_EXECUTABLE_NAME} -E tar -xvf ${CTEST_DASHBOARD_ROOT}\\${CTEST_USE_TAR_SOURCE}.zip RESULT_VARIABLE rv) - else () - message(STATUS "extracting... [${CMAKE_EXECUTABLE_NAME} -E tar -xvf ${CTEST_USE_TAR_SOURCE}.tar]") - execute_process(COMMAND ${CMAKE_EXECUTABLE_NAME} -E tar -xvf ${CTEST_DASHBOARD_ROOT}/${CTEST_USE_TAR_SOURCE}.tar RESULT_VARIABLE rv) - endif () - - if(NOT rv EQUAL 0) - message(STATUS "extracting... [error-(${rv}) clean up]") - file(REMOVE_RECURSE "${CTEST_SOURCE_DIRECTORY}") - message(FATAL_ERROR "error: extract of ${CTEST_SOURCE_NAME} failed") - endif () -endif(CTEST_USE_TAR_SOURCE) - -#----------------------------------------------------------------------------- -## Clear the build directory -## -------------------------- -set(CTEST_START_WITH_EMPTY_BINARY_DIRECTORY TRUE) -if (EXISTS "${CTEST_BINARY_DIRECTORY}" AND IS_DIRECTORY "${CTEST_BINARY_DIRECTORY}") - ctest_empty_binary_directory(${CTEST_BINARY_DIRECTORY}) -else () - file(MAKE_DIRECTORY "${CTEST_BINARY_DIRECTORY}") -endif () - -# Use multiple CPU cores to build -include(ProcessorCount) -ProcessorCount(N) -if(NOT N EQUAL 0) - if(NOT WIN32) - set(CTEST_BUILD_FLAGS -j${N}) - endif () - set(ctest_test_args ${ctest_test_args} PARALLEL_LEVEL ${N}) -endif () -set (CTEST_CONFIGURE_COMMAND - "${CTEST_CMAKE_COMMAND} -C \"${CTEST_SOURCE_DIRECTORY}/config/cmake/cacheinit.cmake\" -DCMAKE_BUILD_TYPE:STRING=${CTEST_CONFIGURATION_TYPE} ${BUILD_OPTIONS} \"-G${CTEST_CMAKE_GENERATOR}\" \"${CTEST_SOURCE_DIRECTORY}\"" -) - -#----------------------------------------------------------------------------- -## -- set output to english -set($ENV{LC_MESSAGES} "en_EN") - -#----------------------------------------------------------------------------- -configure_file(${CTEST_SOURCE_DIRECTORY}/config/cmake/CTestCustom.cmake ${CTEST_BINARY_DIRECTORY}/CTestCustom.cmake) -ctest_read_custom_files ("${CTEST_BINARY_DIRECTORY}") -## NORMAL process -## -------------------------- -ctest_start (Experimental) -ctest_configure (BUILD "${CTEST_BINARY_DIRECTORY}" RETURN_VALUE res) -if(${res} LESS 0 OR ${res} GREATER 0) - file(APPEND ${CTEST_SCRIPT_DIRECTORY}/FailedCTest.txt "Failed Configure: ${res}\n") -endif () -if(LOCAL_SUBMIT) - ctest_submit (PARTS Configure Notes) -endif () -ctest_build (BUILD "${CTEST_BINARY_DIRECTORY}" APPEND APPEND RETURN_VALUE res NUMBER_ERRORS errval) -if(${res} LESS 0 OR ${res} GREATER 0 OR ${errval} GREATER 0) - file(APPEND ${CTEST_SCRIPT_DIRECTORY}/FailedCTest.txt "Failed ${errval} Build: ${res}\n") -endif () -if(LOCAL_SUBMIT) - ctest_submit (PARTS Build) -endif () -ctest_test (BUILD "${CTEST_BINARY_DIRECTORY}" APPEND ${ctest_test_args} RETURN_VALUE res) -if(${res} LESS 0 OR ${res} GREATER 0) - file(APPEND ${CTEST_SCRIPT_DIRECTORY}/FailedCTest.txt "Failed Tests: ${res}\n") -endif () -if(LOCAL_SUBMIT) - ctest_submit (PARTS Test) -endif () -if(${res} LESS 0 OR ${res} GREATER 0) - message (FATAL_ERROR "tests FAILED") -endif () -#----------------------------------------------------------------------------- -############################################################################################################## -message(STATUS "DONE") \ No newline at end of file +if(WIN32) + include(${CTEST_SCRIPT_DIRECTORY}\\HDF5_Examples_options.cmake) + include(${CTEST_SCRIPT_DIRECTORY}\\CTestScript.cmake) +else() + include(${CTEST_SCRIPT_DIRECTORY}/HDF5_Examples_options.cmake) + include(${CTEST_SCRIPT_DIRECTORY}/CTestScript.cmake) +endif() diff --git a/config/cmake/HDF5_Examples.cmake.in b/config/cmake/HDF5_Examples.cmake.in index 6918bb3..08456ce 100644 --- a/config/cmake/HDF5_Examples.cmake.in +++ b/config/cmake/HDF5_Examples.cmake.in @@ -13,91 +13,94 @@ cmake_minimum_required(VERSION 3.2.2 FATAL_ERROR) ############################################################################################################### # This script will build and run the examples from a folder # Execute from a command line: -# ctest -S HDF5_Examples.cmake,OPTION=VALUE -C Release -V -O test.log +# ctest -S HDF5_Examples.cmake,OPTION=VALUE -C Release -VV -O test.log ############################################################################################################### -set (CTEST_CMAKE_GENERATOR "@CMAKE_GENERATOR@") -set (CTEST_DASHBOARD_ROOT ${CTEST_SCRIPT_DIRECTORY}) +set(CTEST_CMAKE_GENERATOR "@CMAKE_GENERATOR@") +if() + set(CMAKE_GENERATOR_TOOLSET "@GENERATOR_TOOLSET@" +endif() +set(CTEST_DASHBOARD_ROOT ${CTEST_SCRIPT_DIRECTORY}) # handle input parameters to script. #INSTALLDIR - HDF5 root folder #CTEST_CONFIGURATION_TYPE - Release, Debug, RelWithDebInfo #CTEST_SOURCE_NAME - name of source folder; HDF5Examples -if (DEFINED CTEST_SCRIPT_ARG) +if(DEFINED CTEST_SCRIPT_ARG) # transform ctest script arguments of the form # script.ctest,var1=value1,var2=value2 # to variables with the respective names set to the respective values - string (REPLACE "," ";" script_args "${CTEST_SCRIPT_ARG}") - foreach (current_var ${script_args}) - if ("${current_var}" MATCHES "^([^=]+)=(.+)$") - set ("${CMAKE_MATCH_1}" "${CMAKE_MATCH_2}") - endif () - endforeach () -endif () + string(REPLACE "," ";" script_args "${CTEST_SCRIPT_ARG}") + foreach(current_var ${script_args}) + if("${current_var}" MATCHES "^([^=]+)=(.+)$") + set("${CMAKE_MATCH_1}" "${CMAKE_MATCH_2}") + endif() + endforeach() +endif() ################################################################### ### Following Line is one of [Release, RelWithDebInfo, Debug] ##### -set (CTEST_CONFIGURATION_TYPE "$ENV{CMAKE_CONFIG_TYPE}") -if (NOT DEFINED CTEST_CONFIGURATION_TYPE) - set (CTEST_CONFIGURATION_TYPE "Release") -endif () -set (ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DCTEST_CONFIGURATION_TYPE:STRING=${CTEST_CONFIGURATION_TYPE}") +set(CTEST_CONFIGURATION_TYPE "$ENV{CMAKE_CONFIG_TYPE}") +if(NOT DEFINED CTEST_CONFIGURATION_TYPE) + set(CTEST_CONFIGURATION_TYPE "Release") +endif() +set(ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DCTEST_CONFIGURATION_TYPE:STRING=${CTEST_CONFIGURATION_TYPE}") ################################################################## -if (NOT DEFINED INSTALLDIR) - set (INSTALLDIR "@CMAKE_INSTALL_PREFIX@") -endif () +if(NOT DEFINED INSTALLDIR) + set(INSTALLDIR "@CMAKE_INSTALL_PREFIX@") +endif() -if (NOT DEFINED CTEST_SOURCE_NAME) - set (CTEST_SOURCE_NAME "HDF5Examples") -endif () +if(NOT DEFINED CTEST_SOURCE_NAME) + set(CTEST_SOURCE_NAME "HDF5Examples") +endif() -if (NOT DEFINED HDF_LOCAL) - set (CDASH_LOCAL "NO") -else () - set (CDASH_LOCAL "YES") -endif () +if(NOT DEFINED HDF_LOCAL) + set(CDASH_LOCAL "NO") +else() + set(CDASH_LOCAL "YES") +endif() if(NOT DEFINED CTEST_SITE) - set (CTEST_SITE "local") -endif () -if (NOT DEFINED CTEST_BUILD_NAME) - set (CTEST_BUILD_NAME "examples") -endif () -set (BUILD_OPTIONS "${BUILD_OPTIONS} -DSITE:STRING=${CTEST_SITE} -DBUILDNAME:STRING=${CTEST_BUILD_NAME}") + set(CTEST_SITE "local") +endif() +if(NOT DEFINED CTEST_BUILD_NAME) + set(CTEST_BUILD_NAME "examples") +endif() +set(BUILD_OPTIONS "${BUILD_OPTIONS} -DSITE:STRING=${CTEST_SITE} -DBUILDNAME:STRING=${CTEST_BUILD_NAME}") #TAR_SOURCE - name of tarfile -#if (NOT DEFINED TAR_SOURCE) -# set (CTEST_USE_TAR_SOURCE "HDF5Examples-1.10.5-Source") -#endif () +#if(NOT DEFINED TAR_SOURCE) +# set(CTEST_USE_TAR_SOURCE "HDF5Examples-1.10.5-Source") +#endif() ############################################################################################################### -if (WIN32) - set (SITE_OS_NAME "Windows") - set (ENV{HDF5_DIR} "${INSTALLDIR}/cmake") - set (CTEST_BINARY_NAME ${CTEST_SOURCE_NAME}\\build) - set (CTEST_SOURCE_DIRECTORY "${CTEST_DASHBOARD_ROOT}\\${CTEST_SOURCE_NAME}") - set (CTEST_BINARY_DIRECTORY "${CTEST_DASHBOARD_ROOT}\\${CTEST_BINARY_NAME}") -else () - set (ENV{HDF5_DIR} "${INSTALLDIR}/share/cmake") - set (ENV{LD_LIBRARY_PATH} "${INSTALLDIR}/lib") - set (CTEST_BINARY_NAME ${CTEST_SOURCE_NAME}/build) - set (CTEST_SOURCE_DIRECTORY "${CTEST_DASHBOARD_ROOT}/${CTEST_SOURCE_NAME}") - set (CTEST_BINARY_DIRECTORY "${CTEST_DASHBOARD_ROOT}/${CTEST_BINARY_NAME}") -endif () -if (${CDASH_LOCAL}) - set (BUILD_OPTIONS "${BUILD_OPTIONS} -DCDASH_LOCAL:BOOL=ON") -endif () -set (BUILD_OPTIONS "${BUILD_OPTIONS} -DHDF5_PACKAGE_NAME:STRING=@HDF5_PACKAGE@@HDF_PACKAGE_EXT@") +if(WIN32) + set(SITE_OS_NAME "Windows") + set(ENV{HDF5_DIR} "${INSTALLDIR}/cmake") + set(CTEST_BINARY_NAME ${CTEST_SOURCE_NAME}\\build) + set(CTEST_SOURCE_DIRECTORY "${CTEST_DASHBOARD_ROOT}\\${CTEST_SOURCE_NAME}") + set(CTEST_BINARY_DIRECTORY "${CTEST_DASHBOARD_ROOT}\\${CTEST_BINARY_NAME}") +else() + set(ENV{HDF5_DIR} "${INSTALLDIR}/share/cmake") + set(ENV{LD_LIBRARY_PATH} "${INSTALLDIR}/lib") + set(CTEST_BINARY_NAME ${CTEST_SOURCE_NAME}/build) + set(CTEST_SOURCE_DIRECTORY "${CTEST_DASHBOARD_ROOT}/${CTEST_SOURCE_NAME}") + set(CTEST_BINARY_DIRECTORY "${CTEST_DASHBOARD_ROOT}/${CTEST_BINARY_NAME}") +endif() +if(${CDASH_LOCAL}) + set(BUILD_OPTIONS "${BUILD_OPTIONS} -DCDASH_LOCAL:BOOL=ON") +endif() +set(BUILD_OPTIONS "${BUILD_OPTIONS} -DHDF5_PACKAGE_NAME:STRING=@HDF5_PACKAGE@@HDF_PACKAGE_EXT@") ############################################################################################################### # For any comments please contact cdashhelp@hdfgroup.org # ############################################################################################################### -if (WIN32) - include (${CTEST_SCRIPT_DIRECTORY}\\HDF5_Examples_options.cmake) - include (${CTEST_SCRIPT_DIRECTORY}\\CTestScript.cmake) -else () - include (${CTEST_SCRIPT_DIRECTORY}/HDF5_Examples_options.cmake) - include (${CTEST_SCRIPT_DIRECTORY}/CTestScript.cmake) -endif () +if(WIN32) + include(${CTEST_SCRIPT_DIRECTORY}\\HDF5_Examples_options.cmake) + include(${CTEST_SCRIPT_DIRECTORY}\\CTestScript.cmake) +else() + include(${CTEST_SCRIPT_DIRECTORY}/HDF5_Examples_options.cmake) + include(${CTEST_SCRIPT_DIRECTORY}/CTestScript.cmake) +endif() diff --git a/config/cmake_ext_mod/HDFMacros.cmake b/config/cmake_ext_mod/HDFMacros.cmake index 48f57e6..602b6bf 100644 --- a/config/cmake_ext_mod/HDFMacros.cmake +++ b/config/cmake_ext_mod/HDFMacros.cmake @@ -247,21 +247,30 @@ macro (HDF_README_PROPERTIES target_fortran) elseif (${CMAKE_SYSTEM_VERSION} MATCHES "6.3") set (BINARY_PLATFORM "${BINARY_PLATFORM} 10") endif () - set (BINARY_PLATFORM "${BINARY_PLATFORM} ${MSVC_C_ARCHITECTURE_ID}") - if (${CMAKE_C_COMPILER_VERSION} MATCHES "^16.*") - set (BINARY_PLATFORM "${BINARY_PLATFORM}, using VISUAL STUDIO 2010") - elseif (${CMAKE_C_COMPILER_VERSION} MATCHES "^15.*") - set (BINARY_PLATFORM "${BINARY_PLATFORM}, using VISUAL STUDIO 2008") - elseif (${CMAKE_C_COMPILER_VERSION} MATCHES "^17.*") - set (BINARY_PLATFORM "${BINARY_PLATFORM}, using VISUAL STUDIO 2012") - elseif (${CMAKE_C_COMPILER_VERSION} MATCHES "^18.*") - set (BINARY_PLATFORM "${BINARY_PLATFORM}, using VISUAL STUDIO 2013") - elseif (${CMAKE_C_COMPILER_VERSION} MATCHES "^19.*") - set (BINARY_PLATFORM "${BINARY_PLATFORM}, using VISUAL STUDIO 2015") - elseif (${CMAKE_C_COMPILER_VERSION} MATCHES "^20.*") - set (BINARY_PLATFORM "${BINARY_PLATFORM}, using VISUAL STUDIO 2017") - else () - set (BINARY_PLATFORM "${BINARY_PLATFORM}, using VISUAL STUDIO ${CMAKE_C_COMPILER_VERSION}") + if (CMAKE_C_COMPILER_ID MATCHES "Intel") + set (BINARY_PLATFORM "${BINARY_PLATFORM} Intel") + if (${CMAKE_C_COMPILER_VERSION} MATCHES "^17.*") + set (BINARY_PLATFORM "${BINARY_PLATFORM}, using Intel 17") + else () + set (BINARY_PLATFORM "${BINARY_PLATFORM}, using Intel ${CMAKE_C_COMPILER_VERSION}") + endif () + elseif (CMAKE_C_COMPILER_ID MATCHES "MSVC") + set (BINARY_PLATFORM "${BINARY_PLATFORM} ${MSVC_C_ARCHITECTURE_ID}") + if (${CMAKE_C_COMPILER_VERSION} MATCHES "^16.*") + set (BINARY_PLATFORM "${BINARY_PLATFORM}, using VISUAL STUDIO 2010") + elseif (${CMAKE_C_COMPILER_VERSION} MATCHES "^15.*") + set (BINARY_PLATFORM "${BINARY_PLATFORM}, using VISUAL STUDIO 2008") + elseif (${CMAKE_C_COMPILER_VERSION} MATCHES "^17.*") + set (BINARY_PLATFORM "${BINARY_PLATFORM}, using VISUAL STUDIO 2012") + elseif (${CMAKE_C_COMPILER_VERSION} MATCHES "^18.*") + set (BINARY_PLATFORM "${BINARY_PLATFORM}, using VISUAL STUDIO 2013") + elseif (${CMAKE_C_COMPILER_VERSION} MATCHES "^19.*") + set (BINARY_PLATFORM "${BINARY_PLATFORM}, using VISUAL STUDIO 2015") + elseif (${CMAKE_C_COMPILER_VERSION} MATCHES "^20.*") + set (BINARY_PLATFORM "${BINARY_PLATFORM}, using VISUAL STUDIO 2017") + else () + set (BINARY_PLATFORM "${BINARY_PLATFORM}, using VISUAL STUDIO ${CMAKE_C_COMPILER_VERSION}") + endif () endif () elseif (APPLE) set (BINARY_EXAMPLE_ENDING "tar.gz") -- cgit v0.12 From fb5c13d59c8f17dca9bbe0e35e00920be2690af3 Mon Sep 17 00:00:00 2001 From: Dana Robinson Date: Wed, 31 May 2017 17:45:41 -0400 Subject: Merge of recent develop work to 1.10 branch: * H5FD_FEAT_DEFAULT_VFD_COMPATIBLE VFD feature flag (HDFFV-10214) * H5FDdriver_query() API call (HDFFV-10215) * Fix to skip SWMR tests that when the current VFD is not compatible with the default VFD (HDFFV-10197) * Removed obsolete compiler versions from config/gnu-flags (HDFFV-9937) * Many warning fixes --- config/freebsd | 4 +- config/gnu-fflags | 2 +- config/gnu-flags | 695 +++++------------------------------ hl/test/test_dset_opt.c | 2 +- hl/test/test_packet_vlen.c | 77 ++-- hl/tools/h5watch/extend_dset.c | 76 ++-- hl/tools/h5watch/h5watchgentest.c | 16 +- release_docs/RELEASE.txt | 44 ++- src/H5Dint.c | 200 +++++----- src/H5Dio.c | 1 - src/H5FD.c | 79 ++-- src/H5FDcore.c | 8 +- src/H5FDdirect.c | 1 + src/H5FDint.c | 35 ++ src/H5FDlog.c | 3 +- src/H5FDmpio.c | 9 +- src/H5FDprivate.h | 1 + src/H5FDpublic.h | 11 + src/H5FDsec2.c | 3 +- src/H5FDspace.c | 2 - src/H5FDstdio.c | 9 +- src/H5Fint.c | 4 - src/H5I.c | 4 +- src/H5MFdbg.c | 50 +-- src/H5MFsection.c | 2 +- src/H5Ocache_image.c | 2 +- src/H5Ofsinfo.c | 2 +- test/dsets.c | 3 + test/flushrefresh.c | 1 + test/mf.c | 6 + test/plugin.c | 8 +- test/swmr.c | 33 +- test/swmr_remove_reader.c | 2 +- test/swmr_remove_writer.c | 2 +- test/tfile.c | 6 +- test/use_common.c | 14 +- test/vfd.c | 156 +++++++- tools/lib/h5diff_array.c | 12 +- tools/lib/h5tools.h | 2 +- tools/lib/h5tools_str.c | 7 +- tools/src/h5repack/h5repack_verify.c | 2 +- tools/test/h5copy/h5copygentest.c | 2 +- tools/test/h5diff/h5diffgentest.c | 41 +-- tools/test/h5dump/h5dumpgentest.c | 3 +- tools/test/h5repack/h5repacktst.c | 2 +- 45 files changed, 704 insertions(+), 940 deletions(-) diff --git a/config/freebsd b/config/freebsd index 936c29f..9a9348b 100644 --- a/config/freebsd +++ b/config/freebsd @@ -34,8 +34,8 @@ fi if test "X-" = "X-$FC"; then case $CC_BASENAME in gcc*|pgcc*) - FC=gfortran40 - FC_BASENAME=gfortran40 + FC=gfortran + FC_BASENAME=gfortran ;; icc*) FC=ifort diff --git a/config/gnu-fflags b/config/gnu-fflags index e92e054..6b5e6a1 100644 --- a/config/gnu-fflags +++ b/config/gnu-fflags @@ -71,7 +71,7 @@ if test "X-gfortran" = "X-$f9x_vendor"; then #esac # General - FC_BASENAME=gfortran40 + FC_BASENAME=gfortran F9XSUFFIXFLAG="" FSEARCH_DIRS="" H5_FCFLAGS="$H5_FCFLAGS -pedantic -Wall -Wextra -Wunderflow -Wimplicit-interface -Wsurprising" diff --git a/config/gnu-flags b/config/gnu-flags index 44ed480..b4d5e8d 100644 --- a/config/gnu-flags +++ b/config/gnu-flags @@ -91,13 +91,27 @@ case "$cc_vendor-$cc_version" in ;; esac - # General - H5_CFLAGS="$H5_CFLAGS $arch -std=c99 -pedantic -Wall -W -Wundef -Wshadow -Wpointer-arith -Wbad-function-cast -Wcast-qual -Wcast-align -Wwrite-strings -Wconversion -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -Wredundant-decls -Wnested-externs" + # General flags + # + # Note that some of the flags listed here really should be developer + # flags (listed in a separate variable, below) but we put them here + # because they are not raised by the current code and we'd like to + # know if they do start showing up. + # + # NOTE: Don't add -Wpadded here since we can't/won't fix the (many) + # warnings that are emitted. If you need it, add it from the + # environment variable at configure time. + H5_CFLAGS="$H5_CFLAGS $arch -std=c99 -pedantic -Wall -Wextra -Wbad-function-cast -Wc++-compat -Wcast-align" + H5_CFLAGS="$H5_CFLAGS -Wcast-qual -Wconversion -Wdeclaration-after-statement -Wdisabled-optimization -Wfloat-equal" + H5_CFLAGS="$H5_CFLAGS -Wformat=2 -Winit-self -Winvalid-pch -Wmissing-declarations -Wmissing-include-dirs" + H5_CFLAGS="$H5_CFLAGS -Wmissing-prototypes -Wnested-externs -Wold-style-definition -Wpacked -Wpointer-arith" + H5_CFLAGS="$H5_CFLAGS -Wredundant-decls -Wshadow -Wstrict-prototypes -Wswitch-default -Wswitch-enum" + H5_CFLAGS="$H5_CFLAGS -Wundef -Wunused-macros -Wunsafe-loop-optimizations -Wwrite-strings" # Production # NDEBUG is handled explicitly by the configure script case "$cc_vendor-$cc_version" in - gcc-[34].*) + gcc-4.*) PROD_CFLAGS= ;; gcc-[56].*) @@ -112,7 +126,7 @@ case "$cc_vendor-$cc_version" in # Debug # NDEBUG is handled explicitly by the configure script - # -g is hanled by the symbols flags + # -g is handled by the symbols flags case "$cc_vendor-$cc_version" in gcc-[56].*) DEBUG_CFLAGS="-ftrapv -fno-common" @@ -121,11 +135,10 @@ case "$cc_vendor-$cc_version" in DEBUG_CFLAGS= ;; esac - #DEBUG_CFLAGS="-fsanitize=undefined" # Developer warnings (suggestions from gcc, not code problems) - DEVELOPER_WARNING_CFLAGS="-Winline -Waggregate-return" - NO_DEVELOPER_WARNING_CFLAGS="-Wno-inline -Wno-aggregate-return" + DEVELOPER_WARNING_CFLAGS="-Winline -Waggregate-return -Wmissing-format-attribute -Wmissing-noreturn" + NO_DEVELOPER_WARNING_CFLAGS="-Wno-inline -Wno-aggregate-return -Wno-missing-format-attribute -Wno-missing-noreturn" # Symbols NO_SYMBOLS_CFLAGS="-s" @@ -136,7 +149,7 @@ case "$cc_vendor-$cc_version" in # Optimization case "$cc_vendor-$cc_version" in - gcc-[34].*) + gcc-4.*) HIGH_OPT_CFLAGS="-O3" DEBUG_OPT_CFLAGS= ;; @@ -151,10 +164,6 @@ case "$cc_vendor-$cc_version" in esac NO_OPT_CFLAGS="-O0" - # Try out the new "stack protector" feature introduced in gcc 4.1 - # (We should also think about adding some of the other memory protection options) - #DEBUG_CFLAGS="$DEBUG_CFLAGS -Wstack-protector -fstack-protector-all" - # Flags are set cc_flags_set=yes ;; @@ -170,375 +179,169 @@ case "$cc_vendor-$cc_version" in # include and break it out into it's own section, like the other versions # below. -QAK gcc-6*) - # Append warning flags - # Don't use the '-Wtraditional' flag, we're way past having K&R C code - # H5_CFLAGS="$H5_CFLAGS -Wtraditional" - # Don't use the '-Wtraditional-conversion' flag, there's too many warnings - # from GCC's assert macro - # H5_CFLAGS="$H5_CFLAGS -Wtraditional-conversion" - - # Append warning flags from gcc-3* case - # (don't use -Wpadded flag for normal builds, many of the warnings its - # issuing can't be fixed and they are making it hard to detect other, - # more important warnings) - #H5_CFLAGS="$H5_CFLAGS -Wfloat-equal -Wmissing-format-attribute -Wpadded" - H5_CFLAGS="$H5_CFLAGS -Wfloat-equal -Wmissing-format-attribute" - - # Append warning flags from gcc-3.2* case - H5_CFLAGS="$H5_CFLAGS -Wpacked -Wdisabled-optimization" - DEVELOPER_WARNING_CFLAGS="$DEVELOPER_WARNING_CFLAGS -Wmissing-noreturn" - NO_DEVELOPER_WARNING_CFLAGS="$NO_DEVELOPER_WARNING_CFLAGS -Wno-missing-noreturn" - - # Enable more format checking flags, beyond the basic -Wformat included - # in -Wall - H5_CFLAGS="$H5_CFLAGS -Wformat=2" - - # The "unreachable code" warning appears to be reliable now... - H5_CFLAGS="$H5_CFLAGS -Wunreachable-code" - - # Append warning flags from gcc-3.3* case - H5_CFLAGS="$H5_CFLAGS -Wendif-labels" - - # Append warning flags from gcc-3.4* case - H5_CFLAGS="$H5_CFLAGS -Wdeclaration-after-statement -Wold-style-definition -Winvalid-pch" - - # Replace old -W flag with new -Wextra flag - H5_CFLAGS="`echo $H5_CFLAGS | sed -e 's/-W\ /-Wextra\ /g'`" - - # Append more extra warning flags that only gcc4.0+ know about - H5_CFLAGS="$H5_CFLAGS -Wvariadic-macros -Winit-self -Wmissing-include-dirs -Wswitch-default -Wswitch-enum -Wunused-macros" - - # Append more extra warning flags that only gcc 4.1+ know about - H5_CFLAGS="$H5_CFLAGS -Wunsafe-loop-optimizations -Wc++-compat -Wnormalized" - - # Append more extra warning flags that only gcc 4.2+ know about + # Append warning flags that only gcc 4.2+ knows about # (none, or incorporated in -Wall / -Wextra now) - # Append more extra warning flags that only gcc 4.3+ know about + # Append warning flags that only gcc 4.3+ knows about # # Technically, variable-length arrays are part of the C99 standard, but # we should approach them a bit cautiously... -QAK H5_CFLAGS="$H5_CFLAGS -Wlogical-op -Wlarger-than=2048 -Wvla" - # Append more extra warning flags that only gcc 4.4+ know about + # Append warning flags that only gcc 4.4+ knows about H5_CFLAGS="$H5_CFLAGS -Wsync-nand -Wframe-larger-than=16384 -Wpacked-bitfield-compat" - # Append more extra warning flags that only gcc 4.5+ know about + # Append warning flags that only gcc 4.5+ knows about H5_CFLAGS="$H5_CFLAGS -Wstrict-overflow=5 -Wjump-misses-init -Wunsuffixed-float-constants" - # Append more extra warning flags that only gcc 4.6+ know about + # Append warning flags that only gcc 4.6+ knows about H5_CFLAGS="$H5_CFLAGS -Wdouble-promotion -Wtrampolines" DEVELOPER_WARNING_CFLAGS="$DEVELOPER_WARNING_CFLAGS -Wsuggest-attribute=const" NO_DEVELOPER_WARNING_CFLAGS="$NO_DEVELOPER_WARNING_CFLAGS -Wno-suggest-attribute=const" - # Append more extra warning flags that only gcc 4.7+ know about + # Append warning flags that only gcc 4.7+ knows about H5_CFLAGS="$H5_CFLAGS -Wstack-usage=8192 -Wvector-operation-performance" DEVELOPER_WARNING_CFLAGS="$DEVELOPER_WARNING_CFLAGS -Wsuggest-attribute=pure -Wsuggest-attribute=noreturn" NO_DEVELOPER_WARNING_CFLAGS="$NO_DEVELOPER_WARNING_CFLAGS -Wno-suggest-attribute=pure -Wno-suggest-attribute=noreturn" - # Append more extra warning flags that only gcc 4.8+ know about + # Append warning flags that only gcc 4.8+ knows about DEVELOPER_WARNING_CFLAGS="$DEVELOPER_WARNING_CFLAGS -Wsuggest-attribute=format" NO_DEVELOPER_WARNING_CFLAGS="$NO_DEVELOPER_WARNING_CFLAGS -Wno-suggest-attribute=format" - # Append more extra warning flags that only gcc 4.9+ know about + # Append warning flags that only gcc 4.9+ knows about H5_CFLAGS="$H5_CFLAGS -Wdate-time" - # Append more extra warning flags that only gcc 5.x+ know about + # Append warning flags that only gcc 5.x+ knows about H5_CFLAGS="$H5_CFLAGS -Warray-bounds=2 -Wc99-c11-compat" - # Append more extra warning flags that only gcc 6.x+ know about + # Append warning flags that only gcc 6.x+ knows about H5_CFLAGS="$H5_CFLAGS -Wnull-dereference -Wunused-const-variable -Wduplicated-cond -Whsa" ;; gcc-5*) - # Append warning flags - # Don't use the '-Wtraditional' flag, we're way past having K&R C code - # H5_CFLAGS="$H5_CFLAGS -Wtraditional" - # Don't use the '-Wtraditional-conversion' flag, there's too many warnings - # from GCC's assert macro - # H5_CFLAGS="$H5_CFLAGS -Wtraditional-conversion" - - # Append warning flags from gcc-3* case - # (don't use -Wpadded flag for normal builds, many of the warnings its - # issuing can't be fixed and they are making it hard to detect other, - # more important warnings) - #H5_CFLAGS="$H5_CFLAGS -Wfloat-equal -Wmissing-format-attribute -Wpadded" - H5_CFLAGS="$H5_CFLAGS -Wfloat-equal -Wmissing-format-attribute" - - # Append warning flags from gcc-3.2* case - H5_CFLAGS="$H5_CFLAGS -Wpacked -Wdisabled-optimization" - DEVELOPER_WARNING_CFLAGS="$DEVELOPER_WARNING_CFLAGS -Wmissing-noreturn" - NO_DEVELOPER_WARNING_CFLAGS="$NO_DEVELOPER_WARNING_CFLAGS -Wno-missing-noreturn" - - # Enable more format checking flags, beyond the basic -Wformat included - # in -Wall - H5_CFLAGS="$H5_CFLAGS -Wformat=2" - - # The "unreachable code" warning appears to be reliable now... - H5_CFLAGS="$H5_CFLAGS -Wunreachable-code" - - # Append warning flags from gcc-3.3* case - H5_CFLAGS="$H5_CFLAGS -Wendif-labels" - - # Append warning flags from gcc-3.4* case - H5_CFLAGS="$H5_CFLAGS -Wdeclaration-after-statement -Wold-style-definition -Winvalid-pch" - - # Replace old -W flag with new -Wextra flag - H5_CFLAGS="`echo $H5_CFLAGS | sed -e 's/-W\ /-Wextra\ /g'`" - - # Append more extra warning flags that only gcc4.0+ know about - H5_CFLAGS="$H5_CFLAGS -Wvariadic-macros -Winit-self -Wmissing-include-dirs -Wswitch-default -Wswitch-enum -Wunused-macros" - - # Append more extra warning flags that only gcc 4.1+ know about - H5_CFLAGS="$H5_CFLAGS -Wunsafe-loop-optimizations -Wc++-compat -Wnormalized" - - # Append more extra warning flags that only gcc 4.2+ know about + # Append warning flags that only gcc 4.2+ knows about # (none, or incorporated in -Wall / -Wextra now) - # Append more extra warning flags that only gcc 4.3+ know about + # Append warning flags that only gcc 4.3+ knows about # # Technically, variable-length arrays are part of the C99 standard, but # we should approach them a bit cautiously... -QAK H5_CFLAGS="$H5_CFLAGS -Wlogical-op -Wlarger-than=2048 -Wvla" - # Append more extra warning flags that only gcc 4.4+ know about + # Append warning flags that only gcc 4.4+ knows about H5_CFLAGS="$H5_CFLAGS -Wsync-nand -Wframe-larger-than=16384 -Wpacked-bitfield-compat" - # Append more extra warning flags that only gcc 4.5+ know about + # Append warning flags that only gcc 4.5+ knows about H5_CFLAGS="$H5_CFLAGS -Wstrict-overflow=5 -Wjump-misses-init -Wunsuffixed-float-constants" - # Append more extra warning flags that only gcc 4.6+ know about + # Append warning flags that only gcc 4.6+ knows about H5_CFLAGS="$H5_CFLAGS -Wdouble-promotion -Wtrampolines" DEVELOPER_WARNING_CFLAGS="$DEVELOPER_WARNING_CFLAGS -Wsuggest-attribute=const" NO_DEVELOPER_WARNING_CFLAGS="$NO_DEVELOPER_WARNING_CFLAGS -Wno-suggest-attribute=const" - # Append more extra warning flags that only gcc 4.7+ know about + # Append warning flags that only gcc 4.7+ knows about H5_CFLAGS="$H5_CFLAGS -Wstack-usage=8192 -Wvector-operation-performance" DEVELOPER_WARNING_CFLAGS="$DEVELOPER_WARNING_CFLAGS -Wsuggest-attribute=pure -Wsuggest-attribute=noreturn" NO_DEVELOPER_WARNING_CFLAGS="$NO_DEVELOPER_WARNING_CFLAGS -Wno-suggest-attribute=pure -Wno-suggest-attribute=noreturn" - # Append more extra warning flags that only gcc 4.8+ know about + # Append warning flags that only gcc 4.8+ knows about DEVELOPER_WARNING_CFLAGS="$DEVELOPER_WARNING_CFLAGS -Wsuggest-attribute=format" NO_DEVELOPER_WARNING_CFLAGS="$NO_DEVELOPER_WARNING_CFLAGS -Wno-suggest-attribute=format" - # Append more extra warning flags that only gcc 4.9+ know about + # Append warning flags that only gcc 4.9+ knows about H5_CFLAGS="$H5_CFLAGS -Wdate-time" - # Append more extra warning flags that only gcc 5.x+ know about + # Append warning flags that only gcc 5.x+ knows about H5_CFLAGS="$H5_CFLAGS -Warray-bounds=2 -Wc99-c11-compat" ;; gcc-4.9*) - # Append warning flags - # Don't use the '-Wtraditional' flag, we're way past having K&R C code - # H5_CFLAGS="$H5_CFLAGS -Wtraditional" - # Don't use the '-Wtraditional-conversion' flag, there's too many warnings - # from GCC's assert macro - # H5_CFLAGS="$H5_CFLAGS -Wtraditional-conversion" - - # Append warning flags from gcc-3* case - # (don't use -Wpadded flag for normal builds, many of the warnings its - # issuing can't be fixed and they are making it hard to detect other, - # more important warnings) - #H5_CFLAGS="$H5_CFLAGS -Wfloat-equal -Wmissing-format-attribute -Wpadded" - H5_CFLAGS="$H5_CFLAGS -Wfloat-equal -Wmissing-format-attribute" - - # Append warning flags from gcc-3.2* case - H5_CFLAGS="$H5_CFLAGS -Wpacked -Wdisabled-optimization" - DEVELOPER_WARNING_CFLAGS="$DEVELOPER_WARNING_CFLAGS -Wmissing-noreturn" - NO_DEVELOPER_WARNING_CFLAGS="$NO_DEVELOPER_WARNING_CFLAGS -Wno-missing-noreturn" - - # Enable more format checking flags, beyond the basic -Wformat included - # in -Wall - H5_CFLAGS="$H5_CFLAGS -Wformat=2" - - # The "unreachable code" warning appears to be reliable now... - H5_CFLAGS="$H5_CFLAGS -Wunreachable-code" - - # Append warning flags from gcc-3.3* case - H5_CFLAGS="$H5_CFLAGS -Wendif-labels" - - # Append warning flags from gcc-3.4* case - H5_CFLAGS="$H5_CFLAGS -Wdeclaration-after-statement -Wold-style-definition -Winvalid-pch" - - # Replace old -W flag with new -Wextra flag - H5_CFLAGS="`echo $H5_CFLAGS | sed -e 's/-W\ /-Wextra\ /g'`" - - # Append more extra warning flags that only gcc4.0+ know about - H5_CFLAGS="$H5_CFLAGS -Wvariadic-macros -Winit-self -Wmissing-include-dirs -Wswitch-default -Wswitch-enum -Wunused-macros" - - # Append more extra warning flags that only gcc 4.1+ know about - H5_CFLAGS="$H5_CFLAGS -Wunsafe-loop-optimizations -Wc++-compat" - - # Append more extra warning flags that only gcc 4.2+ know about + # Append warning flags that only gcc 4.2+ knows about # (none, or incorporated in -Wall / -Wextra now) - # Append more extra warning flags that only gcc 4.3+ know about + # Append warning flags that only gcc 4.3+ knows about # # Technically, variable-length arrays are part of the C99 standard, but # we should approach them a bit cautiously... -QAK H5_CFLAGS="$H5_CFLAGS -Wlogical-op -Wlarger-than=2048 -Wvla" - # Append more extra warning flags that only gcc 4.4+ know about + # Append warning flags that only gcc 4.4+ knows about H5_CFLAGS="$H5_CFLAGS -Wsync-nand -Wframe-larger-than=16384 -Wpacked-bitfield-compat" - # Append more extra warning flags that only gcc 4.5+ know about + # Append warning flags that only gcc 4.5+ knows about H5_CFLAGS="$H5_CFLAGS -Wstrict-overflow=5 -Wjump-misses-init -Wunsuffixed-float-constants" - # Append more extra warning flags that only gcc 4.6+ know about + # Append warning flags that only gcc 4.6+ knows about H5_CFLAGS="$H5_CFLAGS -Wdouble-promotion -Wtrampolines" DEVELOPER_WARNING_CFLAGS="$DEVELOPER_WARNING_CFLAGS -Wsuggest-attribute=const" NO_DEVELOPER_WARNING_CFLAGS="$NO_DEVELOPER_WARNING_CFLAGS -Wno-suggest-attribute=const" - # Append more extra warning flags that only gcc 4.7+ know about + # Append warning flags that only gcc 4.7+ knows about H5_CFLAGS="$H5_CFLAGS -Wstack-usage=8192 -Wvector-operation-performance" DEVELOPER_WARNING_CFLAGS="$DEVELOPER_WARNING_CFLAGS -Wsuggest-attribute=pure -Wsuggest-attribute=noreturn" NO_DEVELOPER_WARNING_CFLAGS="$NO_DEVELOPER_WARNING_CFLAGS -Wno-suggest-attribute=pure -Wno-suggest-attribute=noreturn" - # Append more extra warning flags that only gcc 4.8+ know about + # Append warning flags that only gcc 4.8+ knows about DEVELOPER_WARNING_CFLAGS="$DEVELOPER_WARNING_CFLAGS -Wsuggest-attribute=format" NO_DEVELOPER_WARNING_CFLAGS="$NO_DEVELOPER_WARNING_CFLAGS -Wno-suggest-attribute=format" - # Append more extra warning flags that only gcc 4.9+ know about + # Append warning flags that only gcc 4.9+ knows about H5_CFLAGS="$H5_CFLAGS -Wdate-time" ;; gcc-4.8*) - # Append warning flags - # Don't use the '-Wtraditional' flag, we're way past having K&R C code - # H5_CFLAGS="$H5_CFLAGS -Wtraditional" - # Don't use the '-Wtraditional-conversion' flag, there's too many warnings - # from GCC's assert macro - # H5_CFLAGS="$H5_CFLAGS -Wtraditional-conversion" - - # Append warning flags from gcc-3* case - # (don't use -Wpadded flag for normal builds, many of the warnings its - # issuing can't be fixed and they are making it hard to detect other, - # more important warnings) - #H5_CFLAGS="$H5_CFLAGS -Wfloat-equal -Wmissing-format-attribute -Wpadded" - H5_CFLAGS="$H5_CFLAGS -Wfloat-equal -Wmissing-format-attribute" - - # Append warning flags from gcc-3.2* case - H5_CFLAGS="$H5_CFLAGS -Wpacked -Wdisabled-optimization" - DEVELOPER_WARNING_CFLAGS="$DEVELOPER_WARNING_CFLAGS -Wmissing-noreturn" - NO_DEVELOPER_WARNING_CFLAGS="$NO_DEVELOPER_WARNING_CFLAGS -Wno-missing-noreturn" - - # Enable more format checking flags, beyond the basic -Wformat included - # in -Wall - H5_CFLAGS="$H5_CFLAGS -Wformat=2" - - # The "unreachable code" warning appears to be reliable now... - H5_CFLAGS="$H5_CFLAGS -Wunreachable-code" - - # Append warning flags from gcc-3.3* case - H5_CFLAGS="$H5_CFLAGS -Wendif-labels" - - # Append warning flags from gcc-3.4* case - H5_CFLAGS="$H5_CFLAGS -Wdeclaration-after-statement -Wold-style-definition -Winvalid-pch" - - # Replace old -W flag with new -Wextra flag - H5_CFLAGS="`echo $H5_CFLAGS | sed -e 's/-W\ /-Wextra\ /g'`" - - # Append more extra warning flags that only gcc4.0+ know about - H5_CFLAGS="$H5_CFLAGS -Wvariadic-macros -Winit-self -Wmissing-include-dirs -Wswitch-default -Wswitch-enum -Wunused-macros" - - # Append more extra warning flags that only gcc 4.1+ know about - H5_CFLAGS="$H5_CFLAGS -Wunsafe-loop-optimizations -Wc++-compat" - - # Append more extra warning flags that only gcc 4.2+ know about + # Append warning flags that only gcc 4.2+ knows about # (none, or incorporated in -Wall / -Wextra now) - # Append more extra warning flags that only gcc 4.3+ know about + # Append warning flags that only gcc 4.3+ knows about # # Technically, variable-length arrays are part of the C99 standard, but # we should approach them a bit cautiously... -QAK H5_CFLAGS="$H5_CFLAGS -Wlogical-op -Wlarger-than=2048 -Wvla" - # Append more extra warning flags that only gcc 4.4+ know about + # Append warning flags that only gcc 4.4+ knows about H5_CFLAGS="$H5_CFLAGS -Wsync-nand -Wframe-larger-than=16384 -Wpacked-bitfield-compat" - # Append more extra warning flags that only gcc 4.5+ know about + # Append warning flags that only gcc 4.5+ knows about H5_CFLAGS="$H5_CFLAGS -Wstrict-overflow=5 -Wjump-misses-init" - # Append more extra warning flags that only gcc 4.6+ know about + # Append warning flags that only gcc 4.6+ knows about H5_CFLAGS="$H5_CFLAGS -Wdouble-promotion -Wtrampolines" DEVELOPER_WARNING_CFLAGS="$DEVELOPER_WARNING_CFLAGS -Wsuggest-attribute=const" NO_DEVELOPER_WARNING_CFLAGS="$NO_DEVELOPER_WARNING_CFLAGS -Wno-suggest-attribute=const" - # Append more extra warning flags that only gcc 4.7+ know about + # Append warning flags that only gcc 4.7+ knows about H5_CFLAGS="$H5_CFLAGS -Wstack-usage=8192 -Wvector-operation-performance" DEVELOPER_WARNING_CFLAGS="$DEVELOPER_WARNING_CFLAGS -Wsuggest-attribute=pure -Wsuggest-attribute=noreturn" NO_DEVELOPER_WARNING_CFLAGS="$NO_DEVELOPER_WARNING_CFLAGS -Wno-suggest-attribute=pure -Wno-suggest-attribute=noreturn" - # Append more extra warning flags that only gcc 4.8+ know about + # Append warning flags that only gcc 4.8+ knows about DEVELOPER_WARNING_CFLAGS="$DEVELOPER_WARNING_CFLAGS -Wsuggest-attribute=format" NO_DEVELOPER_WARNING_CFLAGS="$NO_DEVELOPER_WARNING_CFLAGS -Wno-suggest-attribute=format" ;; gcc-4.7*) - # Append warning flags - # Don't use the '-Wtraditional' flag, we're way past having K&R C code - # H5_CFLAGS="$H5_CFLAGS -Wtraditional" - # Don't use the '-Wtraditional-conversion' flag, there's too many warnings - # from GCC's assert macro - # H5_CFLAGS="$H5_CFLAGS -Wtraditional-conversion" - - # Append warning flags from gcc-3* case - # (don't use -Wpadded flag for normal builds, many of the warnings its - # issuing can't be fixed and they are making it hard to detect other, - # more important warnings) - #H5_CFLAGS="$H5_CFLAGS -Wfloat-equal -Wmissing-format-attribute -Wpadded" - H5_CFLAGS="$H5_CFLAGS -Wfloat-equal -Wmissing-format-attribute" - - # Append warning flags from gcc-3.2* case - H5_CFLAGS="$H5_CFLAGS -Wpacked -Wdisabled-optimization" - DEVELOPER_WARNING_CFLAGS="$DEVELOPER_WARNING_CFLAGS -Wmissing-noreturn" - NO_DEVELOPER_WARNING_CFLAGS="$NO_DEVELOPER_WARNING_CFLAGS -Wno-missing-noreturn" - - # Enable more format checking flags, beyond the basic -Wformat included - # in -Wall - H5_CFLAGS="$H5_CFLAGS -Wformat=2" - - # The "unreachable code" warning appears to be reliable now... - # (this warning was removed in gcc 4.5+) - #H5_CFLAGS="$H5_CFLAGS -Wunreachable-code" - - # Append warning flags from gcc-3.3* case - H5_CFLAGS="$H5_CFLAGS -Wendif-labels" - - # Append warning flags from gcc-3.4* case - H5_CFLAGS="$H5_CFLAGS -Wdeclaration-after-statement -Wold-style-definition -Winvalid-pch" - - # Replace old -W flag with new -Wextra flag - H5_CFLAGS="`echo $H5_CFLAGS | sed -e 's/-W\ /-Wextra\ /g'`" - - # Append more extra warning flags that only gcc4.0+ know about - H5_CFLAGS="$H5_CFLAGS -Wvariadic-macros -Winit-self -Wmissing-include-dirs -Wswitch-default -Wswitch-enum -Wunused-macros" - - # Append more extra warning flags that only gcc 4.1+ know about - H5_CFLAGS="$H5_CFLAGS -Wunsafe-loop-optimizations -Wc++-compat" - - # Append more extra warning flags that only gcc 4.2+ know about + # Append warning flags that only gcc 4.2+ knows about # (none, or incorporated in -Wall / -Wextra now) - # Append more extra warning flags that only gcc 4.3+ know about + # Append warning flags that only gcc 4.3+ knows about # # Technically, variable-length arrays are part of the C99 standard, but # we should approach them a bit cautiously... -QAK H5_CFLAGS="$H5_CFLAGS -Wlogical-op -Wlarger-than=2048 -Wvla" - # Append more extra warning flags that only gcc 4.4+ know about + # Append warning flags that only gcc 4.4+ knows about H5_CFLAGS="$H5_CFLAGS -Wsync-nand -Wframe-larger-than=16384 -Wpacked-bitfield-compat" - # Append more extra warning flags that only gcc 4.5+ know about + # Append warning flags that only gcc 4.5+ knows about H5_CFLAGS="$H5_CFLAGS -Wstrict-overflow=5 -Wjump-misses-init -Wunsuffixed-float-constants" - # Append more extra warning flags that only gcc 4.6+ know about + # Append warning flags that only gcc 4.6+ knows about H5_CFLAGS="$H5_CFLAGS -Wdouble-promotion -Wtrampolines" DEVELOPER_WARNING_CFLAGS="$DEVELOPER_WARNING_CFLAGS -Wsuggest-attribute=const" NO_DEVELOPER_WARNING_CFLAGS="$NO_DEVELOPER_WARNING_CFLAGS -Wno-suggest-attribute=const" - # Append more extra warning flags that only gcc 4.7+ know about + # Append warning flags that only gcc 4.7+ knows about H5_CFLAGS="$H5_CFLAGS -Wstack-usage=8192 -Wvector-operation-performance" DEVELOPER_WARNING_CFLAGS="$DEVELOPER_WARNING_CFLAGS -Wsuggest-attribute=pure -Wsuggest-attribute=noreturn" NO_DEVELOPER_WARNING_CFLAGS="$NO_DEVELOPER_WARNING_CFLAGS -Wno-suggest-attribute=pure -Wno-suggest-attribute=noreturn" @@ -548,57 +351,22 @@ case "$cc_vendor-$cc_version" in # Disable warnings about using 'long long' type H5_CFLAGS="$H5_CFLAGS -Wno-long-long" - # Append warning flags from gcc-3* case - # (don't use -Wpadded flag for normal builds, many of the warnings its - # issuing can't be fixed and they are making it hard to detect other, - # more important warnings) - #H5_CFLAGS="$H5_CFLAGS -Wfloat-equal -Wmissing-format-attribute -Wpadded" - H5_CFLAGS="$H5_CFLAGS -Wfloat-equal -Wmissing-format-attribute" - - # Append warning flags from gcc-3.2* case - H5_CFLAGS="$H5_CFLAGS -Wpacked -Wdisabled-optimization" - DEVELOPER_WARNING_CFLAGS="$DEVELOPER_WARNING_CFLAGS -Wmissing-noreturn" - NO_DEVELOPER_WARNING_CFLAGS="$NO_DEVELOPER_WARNING_CFLAGS -Wno-missing-noreturn" - - # Enable more format checking flags, beyond the basic -Wformat included - # in -Wall - H5_CFLAGS="$H5_CFLAGS -Wformat=2" - - # The "unreachable code" warning appears to be reliable now... - # (this warning was removed in gcc 4.5+) - #H5_CFLAGS="$H5_CFLAGS -Wunreachable-code" - - # Append warning flags from gcc-3.3* case - H5_CFLAGS="$H5_CFLAGS -Wendif-labels" - - # Append warning flags from gcc-3.4* case - H5_CFLAGS="$H5_CFLAGS -Wdeclaration-after-statement -Wold-style-definition -Winvalid-pch" - - # Replace old -W flag with new -Wextra flag - H5_CFLAGS="`echo $H5_CFLAGS | sed -e 's/-W\ /-Wextra\ /g'`" - - # Append more extra warning flags that only gcc4.0+ know about - H5_CFLAGS="$H5_CFLAGS -Wvariadic-macros -Wnonnull -Winit-self -Wmissing-include-dirs -Wswitch-default -Wswitch-enum -Wunused-macros" - - # Append more extra warning flags that only gcc 4.1+ know about - H5_CFLAGS="$H5_CFLAGS -Wunsafe-loop-optimizations -Wc++-compat" - - # Append more extra warning flags that only gcc 4.2+ know about + # Append warning flags that only gcc 4.2+ knows about # (none, or incorporated in -Wall / -Wextra now) - # Append more extra warning flags that only gcc 4.3+ know about + # Append warning flags that only gcc 4.3+ knows about # # Technically, variable-length arrays are part of the C99 standard, but # we should approach them a bit cautiously... -QAK H5_CFLAGS="$H5_CFLAGS -Wlogical-op -Wlarger-than=2048 -Wvla" - # Append more extra warning flags that only gcc 4.4+ know about + # Append warning flags that only gcc 4.4+ knows about H5_CFLAGS="$H5_CFLAGS -Wsync-nand -Wframe-larger-than=16384 -Wpacked-bitfield-compat" - # Append more extra warning flags that only gcc 4.5+ know about + # Append warning flags that only gcc 4.5+ knows about H5_CFLAGS="$H5_CFLAGS -Wstrict-aliasing -Wstrict-overflow=5 -Wjump-misses-init -Wunsuffixed-float-constants" - # Append more extra warning flags that only gcc 4.6+ know about + # Append warning flags that only gcc 4.6+ knows about H5_CFLAGS="$H5_CFLAGS -Wdouble-promotion -Wtrampolines" DEVELOPER_WARNING_CFLAGS="$DEVELOPER_WARNING_CFLAGS -Wsuggest-attribute=const" NO_DEVELOPER_WARNING_CFLAGS="$NO_DEVELOPER_WARNING_CFLAGS -Wno-suggest-attribute=const" @@ -608,54 +376,19 @@ case "$cc_vendor-$cc_version" in # Disable warnings about using 'long long' type H5_CFLAGS="$H5_CFLAGS -Wno-long-long" - # Append warning flags from gcc-3* case - # (don't use -Wpadded flag for normal builds, many of the warnings its - # issuing can't be fixed and they are making it hard to detect other, - # more important warnings) - #H5_CFLAGS="$H5_CFLAGS -Wfloat-equal -Wmissing-format-attribute -Wpadded" - H5_CFLAGS="$H5_CFLAGS -Wfloat-equal -Wmissing-format-attribute" - - # Append warning flags from gcc-3.2* case - H5_CFLAGS="$H5_CFLAGS -Wpacked -Wdisabled-optimization" - DEVELOPER_WARNING_CFLAGS="$DEVELOPER_WARNING_CFLAGS -Wmissing-noreturn" - NO_DEVELOPER_WARNING_CFLAGS="$NO_DEVELOPER_WARNING_CFLAGS -Wno-missing-noreturn" - - # Enable more format checking flags, beyond the basic -Wformat included - # in -Wall - H5_CFLAGS="$H5_CFLAGS -Wformat=2" - - # The "unreachable code" warning appears to be reliable now... - # (this warning was removed in gcc 4.5+) - #H5_CFLAGS="$H5_CFLAGS -Wunreachable-code" - - # Append warning flags from gcc-3.3* case - H5_CFLAGS="$H5_CFLAGS -Wendif-labels" - - # Append warning flags from gcc-3.4* case - H5_CFLAGS="$H5_CFLAGS -Wdeclaration-after-statement -Wold-style-definition -Winvalid-pch" - - # Replace old -W flag with new -Wextra flag - H5_CFLAGS="`echo $H5_CFLAGS | sed -e 's/-W\ /-Wextra\ /g'`" - - # Append more extra warning flags that only gcc4.0+ know about - H5_CFLAGS="$H5_CFLAGS -Wvariadic-macros -Wnonnull -Winit-self -Wmissing-include-dirs -Wswitch-default -Wswitch-enum -Wunused-macros" - - # Append more extra warning flags that only gcc 4.1+ know about - H5_CFLAGS="$H5_CFLAGS -Wunsafe-loop-optimizations -Wc++-compat" - - # Append more extra warning flags that only gcc 4.2+ know about + # Append warning flags that only gcc 4.2+ knows about # (none, or incorporated in -Wall / -Wextra now) - # Append more extra warning flags that only gcc 4.3+ know about + # Append warning flags that only gcc 4.3+ knows about # # Technically, variable-length arrays are part of the C99 standard, but # we should approach them a bit cautiously... -QAK H5_CFLAGS="$H5_CFLAGS -Wlogical-op -Wlarger-than=2048 -Wvla" - # Append more extra warning flags that only gcc 4.4+ know about + # Append warning flags that only gcc 4.4+ knows about H5_CFLAGS="$H5_CFLAGS -Wsync-nand -Wframe-larger-than=16384 -Wpacked-bitfield-compat" - # Append more extra warning flags that only gcc 4.5+ know about + # Append warning flags that only gcc 4.5+ knows about H5_CFLAGS="$H5_CFLAGS -Wstrict-aliasing -Wstrict-overflow=5 -Wjump-misses-init -Wunsuffixed-float-constants" ;; @@ -663,50 +396,16 @@ case "$cc_vendor-$cc_version" in # Disable warnings about using 'long long' type H5_CFLAGS="$H5_CFLAGS -Wno-long-long" - # Append warning flags from gcc-3* case - # (don't use -Wpadded flag for normal builds, many of the warnings its - # issuing can't be fixed and they are making it hard to detect other, - # more important warnings) - #H5_CFLAGS="$H5_CFLAGS -Wfloat-equal -Wmissing-format-attribute -Wpadded" - H5_CFLAGS="$H5_CFLAGS -Wfloat-equal -Wmissing-format-attribute" - - # Append warning flags from gcc-3.2* case - H5_CFLAGS="$H5_CFLAGS -Wpacked -Wdisabled-optimization" - DEVELOPER_WARNING_CFLAGS="$DEVELOPER_WARNING_CFLAGS -Wmissing-noreturn" - NO_DEVELOPER_WARNING_CFLAGS="$NO_DEVELOPER_WARNING_CFLAGS -Wno-missing-noreturn" - - # Enable more format checking flags, beyond the basic -Wformat included - # in -Wall - H5_CFLAGS="$H5_CFLAGS -Wformat=2" - - # The "unreachable code" warning appears to be reliable now... - H5_CFLAGS="$H5_CFLAGS -Wunreachable-code" - - # Append warning flags from gcc-3.3* case - H5_CFLAGS="$H5_CFLAGS -Wendif-labels" - - # Append warning flags from gcc-3.4* case - H5_CFLAGS="$H5_CFLAGS -Wdeclaration-after-statement -Wold-style-definition -Winvalid-pch" - - # Replace old -W flag with new -Wextra flag - H5_CFLAGS="`echo $H5_CFLAGS | sed -e 's/-W\ /-Wextra\ /g'`" - - # Append more extra warning flags that only gcc4.0+ know about - H5_CFLAGS="$H5_CFLAGS -Wvariadic-macros -Wnonnull -Winit-self -Wmissing-include-dirs -Wswitch-default -Wswitch-enum -Wunused-macros" - - # Append more extra warning flags that only gcc 4.1+ know about - H5_CFLAGS="$H5_CFLAGS -Wunsafe-loop-optimizations -Wc++-compat" - - # Append more extra warning flags that only gcc 4.2+ know about + # Append warning flags that only gcc 4.2+ knows about H5_CFLAGS="$H5_CFLAGS -Wstrict-overflow" - # Append more extra warning flags that only gcc 4.3+ know about + # Append warning flags that only gcc 4.3+ knows about # # Technically, variable-length arrays are part of the C99 standard, but # we should approach them a bit cautiously... -QAK H5_CFLAGS="$H5_CFLAGS -Wlogical-op -Wlarger-than=2048 -Wvla" - # Append more extra warning flags that only gcc 4.4+ know about + # Append warning flags that only gcc 4.4+ knows about H5_CFLAGS="$H5_CFLAGS -Wsync-nand -Wframe-larger-than=16384 -Wpacked-bitfield-compat" ;; @@ -714,44 +413,15 @@ case "$cc_vendor-$cc_version" in # Disable warnings about using 'long long' type H5_CFLAGS="$H5_CFLAGS -Wno-long-long" - # Append warning flags from gcc-3* case - # (don't use -Wpadded flag for normal builds, many of the warnings its - # issuing can't be fixed and they are making it hard to detect other, - # more important warnings) - #H5_CFLAGS="$H5_CFLAGS -Wfloat-equal -Wmissing-format-attribute -Wpadded" - H5_CFLAGS="$H5_CFLAGS -Wfloat-equal -Wmissing-format-attribute" - - # Append warning flags from gcc-3.2* case - H5_CFLAGS="$H5_CFLAGS -Wpacked -Wdisabled-optimization" - DEVELOPER_WARNING_CFLAGS="$DEVELOPER_WARNING_CFLAGS -Wmissing-noreturn" - NO_DEVELOPER_WARNING_CFLAGS="$NO_DEVELOPER_WARNING_CFLAGS -Wno-missing-noreturn" - - # Enable more format checking flags, beyond the basic -Wformat included - # in -Wall - H5_CFLAGS="$H5_CFLAGS -Wformat=2" - - # The "unreachable code" warning appears to be reliable now... - H5_CFLAGS="$H5_CFLAGS -Wunreachable-code" - - # Append warning flags from gcc-3.3* case - H5_CFLAGS="$H5_CFLAGS -Wendif-labels" + # Append warning flags that only gcc 4.1+ knows about + # -Wvolatile-register-var was later incorporated into -Wall and + # needs to be specified explicitly for gcc 4.1-4.3. + H5_CFLAGS="$H5_CFLAGS -Wvolatile-register-var" - # Append warning flags from gcc-3.4* case - H5_CFLAGS="$H5_CFLAGS -Wdeclaration-after-statement -Wold-style-definition -Winvalid-pch" - - # Replace old -W flag with new -Wextra flag - H5_CFLAGS="`echo $H5_CFLAGS | sed -e 's/-W\ /-Wextra\ /g'`" - - # Append more extra warning flags that only gcc4.0+ know about - H5_CFLAGS="$H5_CFLAGS -Wvariadic-macros -Wnonnull -Winit-self -Wmissing-include-dirs -Wswitch-default -Wswitch-enum -Wunused-macros" - - # Append more extra warning flags that only gcc 4.1+ know about - H5_CFLAGS="$H5_CFLAGS -Wunsafe-loop-optimizations -Wc++-compat -Wvolatile-register-var" - - # Append more extra warning flags that only gcc 4.2+ know about + # Append warning flags that only gcc 4.2+ knows about H5_CFLAGS="$H5_CFLAGS -Wstrict-overflow" - # Append more extra warning flags that only gcc 4.3+ know about + # Append warning flags that only gcc 4.3+ knows about # # Technically, variable-length arrays are part of the C99 standard, but # we should approach them a bit cautiously... -QAK @@ -762,41 +432,12 @@ case "$cc_vendor-$cc_version" in # Disable warnings about using 'long long' type H5_CFLAGS="$H5_CFLAGS -Wno-long-long" - # Append warning flags from gcc-3* case - # (don't use -Wpadded flag for normal builds, many of the warnings its - # issuing can't be fixed and they are making it hard to detect other, - # more important warnings) - #H5_CFLAGS="$H5_CFLAGS -Wfloat-equal -Wmissing-format-attribute -Wpadded" - H5_CFLAGS="$H5_CFLAGS -Wfloat-equal -Wmissing-format-attribute" - - # Append warning flags from gcc-3.2* case - H5_CFLAGS="$H5_CFLAGS -Wpacked -Wdisabled-optimization" - DEVELOPER_WARNING_CFLAGS="$DEVELOPER_WARNING_CFLAGS -Wmissing-noreturn" - NO_DEVELOPER_WARNING_CFLAGS="$NO_DEVELOPER_WARNING_CFLAGS -Wno-missing-noreturn" - - # Enable more format checking flags, beyond the basic -Wformat included - # in -Wall - H5_CFLAGS="$H5_CFLAGS -Wformat=2" - - # The "unreachable code" warning does not appear to be reliable yet... - H5_CFLAGS="$H5_CFLAGS -Wunreachable-code" - - # Append warning flags from gcc-3.3* case - H5_CFLAGS="$H5_CFLAGS -Wendif-labels" - - # Append warning flags from gcc-3.4* case - H5_CFLAGS="$H5_CFLAGS -Wdeclaration-after-statement -Wold-style-definition -Winvalid-pch" + # Append warning flags that only gcc 4.1+ knows about + # -Wvolatile-register-var was later incorporated into -Wall and + # needs to be specified explicitly for gcc 4.1-4.3. + H5_CFLAGS="$H5_CFLAGS -Wvolatile-register-var" - # Replace old -W flag with new -Wextra flag - H5_CFLAGS="`echo $H5_CFLAGS | sed -e 's/-W\ /-Wextra\ /g'`" - - # Append more extra warning flags that only gcc 4.0+ know about - H5_CFLAGS="$H5_CFLAGS -Wvariadic-macros -Wnonnull -Winit-self -Wmissing-include-dirs -Wswitch-default -Wswitch-enum -Wunused-macros" - - # Append more extra warning flags that only gcc 4.1+ know about - H5_CFLAGS="$H5_CFLAGS -Wunsafe-loop-optimizations -Wc++-compat -Wvolatile-register-var" - - # Append more extra warning flags that only gcc 4.2+ know about + # Append warning flags that only gcc 4.2+ knows about H5_CFLAGS="$H5_CFLAGS -Wstrict-overflow" ;; @@ -804,172 +445,12 @@ case "$cc_vendor-$cc_version" in # Disable warnings about using 'long long' type H5_CFLAGS="$H5_CFLAGS -Wno-long-long" - # Append warning flags from gcc-3* case - # (don't use -Wpadded flag for normal builds, many of the warnings its - # issuing can't be fixed and they are making it hard to detect other, - # more important warnings) - #H5_CFLAGS="$H5_CFLAGS -Wfloat-equal -Wmissing-format-attribute -Wpadded" - H5_CFLAGS="$H5_CFLAGS -Wfloat-equal -Wmissing-format-attribute" - - # Append warning flags from gcc-3.2* case - H5_CFLAGS="$H5_CFLAGS -Wpacked -Wdisabled-optimization" - DEVELOPER_WARNING_CFLAGS="$DEVELOPER_WARNING_CFLAGS -Wmissing-noreturn" - NO_DEVELOPER_WARNING_CFLAGS="$NO_DEVELOPER_WARNING_CFLAGS -Wno-missing-noreturn" - - # Enable more format checking flags, beyond the basic -Wformat included - # in -Wall - H5_CFLAGS="$H5_CFLAGS -Wformat=2" - - # The "unreachable code" warning does not appear to be reliable yet... - H5_CFLAGS="$H5_CFLAGS -Wunreachable-code" - - # Append warning flags from gcc-3.3* case - H5_CFLAGS="$H5_CFLAGS -Wendif-labels" - - # Append warning flags from gcc-3.4* case - H5_CFLAGS="$H5_CFLAGS -Wdeclaration-after-statement -Wold-style-definition -Winvalid-pch" - - # Replace old -W flag with new -Wextra flag - H5_CFLAGS="`echo $H5_CFLAGS | sed -e 's/-W\ /-Wextra\ /g'`" - - # Append more extra warning flags that only gcc 4.0+ know about - H5_CFLAGS="$H5_CFLAGS -Wvariadic-macros -Wnonnull -Winit-self -Wmissing-include-dirs -Wswitch-default -Wswitch-enum -Wunused-macros" - - # Append more extra warning flags that only gcc 4.1+ know about - H5_CFLAGS="$H5_CFLAGS -Wunsafe-loop-optimizations -Wc++-compat -Wvolatile-register-var" - ;; - - gcc-4.0*) - # Disable warnings about using 'long long' type - H5_CFLAGS="$H5_CFLAGS -Wno-long-long" - - # Append warning flags from gcc-3* case - # (don't use -Wpadded flag for normal builds, many of the warnings its - # issuing can't be fixed and they are making it hard to detect other, - # more important warnings) - #H5_CFLAGS="$H5_CFLAGS -Wfloat-equal -Wmissing-format-attribute -Wpadded" - H5_CFLAGS="$H5_CFLAGS -Wfloat-equal -Wmissing-format-attribute" - - # Append warning flags from gcc-3.2* case - H5_CFLAGS="$H5_CFLAGS -Wpacked -Wdisabled-optimization" - DEVELOPER_WARNING_CFLAGS="$DEVELOPER_WARNING_CFLAGS -Wmissing-noreturn" - NO_DEVELOPER_WARNING_CFLAGS="$NO_DEVELOPER_WARNING_CFLAGS -Wno-missing-noreturn" - - # The "format=2" warning generates too many warnings about valid - # usage in the library. - #CFLAGS="$CFLAGS -Wformat=2" - - # The "unreachable code" warning does not appear to be reliable yet... - #CFLAGS="$CFLAGS -Wunreachable-code" - - # Append warning flags from gcc-3.3* case - H5_CFLAGS="$H5_CFLAGS -Wendif-labels" - - # Append warning flags from gcc-3.4* case - H5_CFLAGS="$H5_CFLAGS -Wdeclaration-after-statement -Wold-style-definition -Winvalid-pch" - - # Replace old -W flag with new -Wextra flag - H5_CFLAGS="`echo $H5_CFLAGS | sed -e 's/-W\ /-Wextra\ /g'`" - - # Append more extra warning flags that only gcc 4.0+ know about - H5_CFLAGS="$H5_CFLAGS -Wvariadic-macros -Wnonnull -Winit-self -Wmissing-include-dirs -Wswitch-default -Wswitch-enum -Wunused-macros" - ;; - - gcc-3.4*) - # Disable warnings about using 'long long' type - H5_CFLAGS="$H5_CFLAGS -Wno-long-long" - - # Append warning flags from gcc-3* case - # (don't use -Wpadded flag for normal builds, many of the warnings its - # issuing can't be fixed and they are making it hard to detect other, - # more important warnings) - #H5_CFLAGS="$H5_CFLAGS -Wfloat-equal -Wmissing-format-attribute -Wpadded" - H5_CFLAGS="$H5_CFLAGS -Wfloat-equal -Wmissing-format-attribute" - - # Append warning flags from gcc-3.2* case - H5_CFLAGS="$H5_CFLAGS -Wpacked -Wdisabled-optimization" - DEVELOPER_WARNING_CFLAGS="$DEVELOPER_WARNING_CFLAGS -Wmissing-noreturn" - NO_DEVELOPER_WARNING_CFLAGS="$NO_DEVELOPER_WARNING_CFLAGS -Wno-missing-noreturn" - - # The "format=2" warning generates too many warnings about valid - # usage in the library. - #CFLAGS="$CFLAGS -Wformat=2" - - # The "unreachable code" warning does not appear to be reliable yet... - #CFLAGS="$CFLAGS -Wunreachable-code" - - # Append warning flags from gcc-3.3* case - H5_CFLAGS="$H5_CFLAGS -Wendif-labels" - - # Append more extra warning flags that only gcc3.4+ know about - H5_CFLAGS="$H5_CFLAGS -Wdeclaration-after-statement -Wold-style-definition -Winvalid-pch" - - # Replace old -W flag with new -Wextra flag - H5_CFLAGS="`echo $H5_CFLAGS | sed -e 's/-W\ /-Wextra\ /g'`" + # Append warning flags that only gcc 4.1+ knows about + # -Wvolatile-register-var was later incorporated into -Wall and + # needs to be specified explicitly for gcc 4.1-4.3. + H5_CFLAGS="$H5_CFLAGS -Wvolatile-register-var" ;; - gcc-3.3*) - # Disable warnings about using 'long long' type - H5_CFLAGS="$H5_CFLAGS -Wno-long-long" - - # Append warning flags from gcc-3* case - # (don't use -Wpadded flag for normal builds, many of the warnings its - # issuing can't be fixed and they are making it hard to detect other, - # more important warnings) - #H5_CFLAGS="$H5_CFLAGS -Wfloat-equal -Wmissing-format-attribute -Wpadded" - H5_CFLAGS="$H5_CFLAGS -Wfloat-equal -Wmissing-format-attribute" - - # Append warning flags from gcc-3.2* case - H5_CFLAGS="$H5_CFLAGS -Wpacked -Wdisabled-optimization" - DEVELOPER_WARNING_CFLAGS="$DEVELOPER_WARNING_CFLAGS -Wmissing-noreturn" - NO_DEVELOPER_WARNING_CFLAGS="$NO_DEVELOPER_WARNING_CFLAGS -Wno-missing-noreturn" - - # The "format=2" warning generates too many warnings about valid - # usage in the library. - #CFLAGS="$CFLAGS -Wformat=2" - - # The "unreachable code" warning does not appear to be reliable yet... - #CFLAGS="$CFLAGS -Wunreachable-code" - - # Append more extra warning flags that only gcc3.3+ know about - H5_CFLAGS="$H5_CFLAGS -Wendif-labels" - ;; - - gcc-3.2*) - # Disable warnings about using 'long long' type - H5_CFLAGS="$H5_CFLAGS -Wno-long-long" - - # Append warning flags from gcc-3* case - # (don't use -Wpadded flag for normal builds, many of the warnings its - # issuing can't be fixed and they are making it hard to detect other, - # more important warnings) - #H5_CFLAGS="$H5_CFLAGS -Wfloat-equal -Wmissing-format-attribute -Wpadded" - H5_CFLAGS="$H5_CFLAGS -Wfloat-equal -Wmissing-format-attribute" - - # Append more extra warning flags that only gcc3.2+ know about - H5_CFLAGS="$H5_CFLAGS -Wpacked -Wdisabled-optimization" - DEVELOPER_WARNING_CFLAGS="$DEVELOPER_WARNING_CFLAGS -Wmissing-noreturn" - NO_DEVELOPER_WARNING_CFLAGS="$NO_DEVELOPER_WARNING_CFLAGS -Wno-missing-noreturn" - - # The "format=2" warning generates too many warnings about valid - # usage in the library. - #CFLAGS="$CFLAGS -Wformat=2" - - # The "unreachable code" warning does not appear to be reliable yet... - #CFLAGS="$CFLAGS -Wunreachable-code" - ;; - - gcc-3*) - # Disable warnings about using 'long long' type - H5_CFLAGS="$H5_CFLAGS -Wno-long-long" - - # Append some extra warning flags that only gcc3+ know about - # (don't use -Wpadded flag for normal builds, many of the warnings its - # issuing can't be fixed and they are making it hard to detect other, - # more important warnings) - #H5_CFLAGS="$H5_CFLAGS -Wfloat-equal -Wmissing-format-attribute -Wpadded" - H5_CFLAGS="$H5_CFLAGS -Wfloat-equal -Wmissing-format-attribute" - ;; esac # Clear cc info if no flags set diff --git a/hl/test/test_dset_opt.c b/hl/test/test_dset_opt.c index 4b5fa19..383a87a 100644 --- a/hl/test/test_dset_opt.c +++ b/hl/test/test_dset_opt.c @@ -47,7 +47,7 @@ #define CHUNK_NX 4 #define CHUNK_NY 4 -#define DEFLATE_SIZE_ADJUST(s) (ceil(((double)(s))*1.001)+12) +#define DEFLATE_SIZE_ADJUST(s) (HDceil(((double)(s))*H5_DOUBLE(1.001))+H5_DOUBLE(12.0)) /* Temporary filter IDs used for testing */ #define H5Z_FILTER_BOGUS1 305 diff --git a/hl/test/test_packet_vlen.c b/hl/test/test_packet_vlen.c index 35bd43a..1d6231e 100644 --- a/hl/test/test_packet_vlen.c +++ b/hl/test/test_packet_vlen.c @@ -928,64 +928,60 @@ error: /* An error has occurred. Clean up and exit. */ * 2016/01/27 -BMR *------------------------------------------------------------------------- */ -static herr_t verify_accessors(hid_t fid, const char *table_name, herr_t expected_value) +static herr_t verify_accessors(hid_t fid, const char *table_name, hbool_t uses_vlen_type) { - hid_t ptable=H5I_INVALID_HID; /* Packet table identifier */ - hid_t dset_id=H5I_INVALID_HID; /* Dataset associated with the pt */ - hid_t dtype_id=H5I_INVALID_HID; /* Dataset identifier */ + hid_t ptable = H5I_INVALID_HID; /* Packet table identifier */ + hid_t dset_id = H5I_INVALID_HID; /* Dataset associated with the pt */ + hid_t dtype_id = H5I_INVALID_HID; /* Dataset identifier */ char buf[NAME_BUF_SIZE]; ssize_t name_size; - herr_t is_varlen = 0; - herr_t ret = FAIL; /* Returned status from a callee */ + htri_t vlen_check_result = -1; /* Open the named packet table. */ - ptable = H5PTopen(fid, table_name); - if (ptable < 0) - goto error; + if((ptable = H5PTopen(fid, table_name)) < 0) + goto error; /* Get the associated dataset ID. */ - dset_id = H5PTget_dataset(ptable); - if (dset_id < 0) - goto error; + if((dset_id = H5PTget_dataset(ptable)) < 0) + goto error; /* Check if the packet table's name matches its associated dataset's. */ *buf = '\0'; - name_size = H5Iget_name(dset_id, (char*)buf, NAME_BUF_SIZE); - if (name_size < 0) - goto error; + if((name_size = H5Iget_name(dset_id, (char*)buf, NAME_BUF_SIZE)) < 0) + goto error; VERIFY(HDstrcmp(buf, table_name), "Names of dataset and packet table don't match"); /* Get the packet table's datatype ID */ - dtype_id = H5PTget_type(ptable); - if (dtype_id < 0) - goto error; + if((dtype_id = H5PTget_type(ptable)) < 0) + goto error; /* Check if the type class matches that of the packet table. */ - is_varlen = H5Tdetect_class(dtype_id, H5T_VLEN); - if (is_varlen == FAIL) /* failure occurred */ - goto error; - else if (is_varlen == expected_value) /* length types match */ - ret = SUCCEED; - else /* length types don't match */ - { - /* Give lengthtype "fixed-length" or "variable-length" depending on the - expected_value passed in, then print the error message. */ - char lenthtype[20]; - HDstrcpy(lenthtype, "fixed-length"); - if (expected_value == 1) - HDstrcpy(lenthtype, "variable-length"); - fprintf(stderr, "\nThe dataset '%s' should be %s but is not\n", table_name, lenthtype); - ret = FAIL; + if((vlen_check_result = H5Tdetect_class(dtype_id, H5T_VLEN)) < 0) + goto error; + + /* Check if length types match */ + if (vlen_check_result != (htri_t)uses_vlen_type) { + /* Give lengthtype "fixed-length" or "variable-length" depending on the + * expected_value passed in, then print the error message. + */ + char lenthtype[20]; + if (uses_vlen_type == TRUE) + HDstrcpy(lenthtype, "variable-length"); + else + HDstrcpy(lenthtype, "fixed-length"); + HDfprintf(stderr, "\nThe dataset '%s' should be %s but is not\n", table_name, lenthtype); + goto error; } /* Close the packet table */ if (H5PTclose(ptable) < 0) - goto error; + goto error; return SUCCEED; error: /* An error has occurred. Clean up and exit. */ - if (H5PTis_valid(ptable) > 0) H5PTclose(ptable); + if (H5PTis_valid(ptable) > 0) + H5PTclose(ptable); H5_FAILED(); return FAIL; } /* verify_accessors */ @@ -1010,25 +1006,26 @@ static int test_accessors(void) /* Open the file */ fid = H5Fopen(TEST_FILE_NAME, H5F_ACC_RDWR, H5P_DEFAULT); if (fid < 0) - goto error; + goto error; ret = verify_accessors(fid, PT_VLEN_ATOMIC, TRUE); if (ret < 0) - goto error; + goto error; ret = verify_accessors(fid, PT_FIXED_LEN, FALSE); if (ret < 0) - goto error; + goto error; /* Close the file */ if (H5Fclose(fid) < 0) - goto error; + goto error; PASSED(); return SUCCEED; error: /* An error has occurred. Clean up and exit. */ - if (fid > 0) H5Fclose(fid); + if (fid > 0) + H5Fclose(fid); H5_FAILED(); return FAIL; } /* test_accessors */ diff --git a/hl/tools/h5watch/extend_dset.c b/hl/tools/h5watch/extend_dset.c index 957db10..4dcf25e 100644 --- a/hl/tools/h5watch/extend_dset.c +++ b/hl/tools/h5watch/extend_dset.c @@ -38,24 +38,24 @@ static herr_t extend_dset_one(const char *file, char *dname, int action); /* Data structures for datasets with compound data type */ typedef struct sub22_t { - unsigned int a; - unsigned int b; - unsigned int c; + int a; + int b; + int c; } sub22_t; typedef struct sub2_t { - unsigned int a; + int a; sub22_t b; - unsigned int c; + int c; } sub2_t; typedef struct sub4_t { - unsigned int a; - unsigned int b; + int a; + int b; } sub4_t; typedef struct set_t { - unsigned int field1; + int field1; sub2_t field2; double field3; sub4_t field4; @@ -78,7 +78,7 @@ extend_dset_two(const char *file, char *dname, int action1, int action2) hid_t sid = -1; /* dataspace id */ hid_t dtid = -1; /* dataset's datatype id */ int ndims; /* # of dimension sizes */ - unsigned i, j; /* local index variable */ + unsigned i; /* local index variable */ hsize_t ext_dims[2]; /* new dimension sizes after extension */ hsize_t cur_dims[2]; /* current dimension sizes */ size_t dtype_size; /* size of the dataset's datatype */ @@ -144,23 +144,23 @@ extend_dset_two(const char *file, char *dname, int action1, int action2) goto error; num_elmts = 1; - for(j = 0; j < (unsigned)ndims; j++) - num_elmts *= (unsigned)ext_dims[j]; + for(i = 0; i < (unsigned)ndims; i++) + num_elmts *= (unsigned)ext_dims[i]; /* Compound type */ if(!HDstrcmp(dname, DSET_CMPD_TWO)) { HDmemset(cbuf, 0, TEST_BUF_SIZE * sizeof(set_t)); - for(j = 0; j < num_elmts; j++) { - cbuf[j].field1 = action1; - cbuf[j].field2.a = action1; - cbuf[j].field2.c = action1; - cbuf[j].field2.b.a = action1; - cbuf[j].field2.b.b = action1; - cbuf[j].field2.b.c = action1; - cbuf[j].field3 = action1; - cbuf[j].field4.a = action1; - cbuf[j].field4.b = action1; + for(i = 0; i < num_elmts; i++) { + cbuf[i].field1 = action1; + cbuf[i].field2.a = action1; + cbuf[i].field2.c = action1; + cbuf[i].field2.b.a = action1; + cbuf[i].field2.b.b = action1; + cbuf[i].field2.b.c = action1; + cbuf[i].field3 = action1; + cbuf[i].field4.a = action1; + cbuf[i].field4.b = action1; } /* end for */ /* Write to the dataset */ @@ -169,8 +169,8 @@ extend_dset_two(const char *file, char *dname, int action1, int action2) } else { /* Integer type */ HDmemset(ibuf, 0, TEST_BUF_SIZE * sizeof(int)); - for(j = 0; j < num_elmts; j++) - ibuf[j] = action1; + for(i = 0; i < num_elmts; i++) + ibuf[i] = action1; /* Write to the dataset */ if(H5Dwrite(did, dtid, H5S_ALL, H5S_ALL, H5P_DEFAULT, ibuf) < 0) @@ -225,7 +225,7 @@ extend_dset_one(const char *file, char *dname, int action) hid_t dtid = -1; /* dataset's datatype id */ hid_t sid = -1; /* dataspace id */ hid_t mid = -1; /* memory space id */ - unsigned i, j; /* local index variable */ + int i; /* local index variable */ hsize_t cur_dims[1]; /* current dimension sizes */ hsize_t ext_dims[1]; /* new dimension sizes after extension */ hsize_t offset[1]; /* starting offsets of appended data */ @@ -304,18 +304,18 @@ extend_dset_one(const char *file, char *dname, int action) if(!HDstrcmp(dname, DSET_CMPD) || !HDstrcmp(dname, DSET_CMPD_ESC)) { HDmemset(cbuf, 0, TEST_BUF_SIZE * sizeof(set_t)); - for(j = 0; j < (unsigned)action; j++) { - cbuf[j].field1 = j + 1; - cbuf[j].field2.a = j + 2; - cbuf[j].field2.b.a = j + 2; - cbuf[j].field2.b.b = j + 2; - cbuf[j].field2.b.c = j + 2; - cbuf[j].field2.c = j + 2; - - cbuf[j].field3 = j + 3; - - cbuf[j].field4.a = j + 4; - cbuf[j].field4.b = j + 4; + for(i = 0; i < action; i++) { + cbuf[i].field1 = i + 1; + cbuf[i].field2.a = i + 2; + cbuf[i].field2.b.a = i + 2; + cbuf[i].field2.b.b = i + 2; + cbuf[i].field2.b.c = i + 2; + cbuf[i].field2.c = i + 2; + + cbuf[i].field3 = i + 3; + + cbuf[i].field4.a = i + 4; + cbuf[i].field4.b = i + 4; } /* end for */ /* Write to the extended region of the dataset */ @@ -324,8 +324,8 @@ extend_dset_one(const char *file, char *dname, int action) } else { /* Integer type */ HDmemset(ibuf, 0, TEST_BUF_SIZE * sizeof(int)); - for(j = 0; j < (unsigned)action; j++) - ibuf[j] = (int)j; + for(i = 0; i < action; i++) + ibuf[i] = (int)i; /* Write to the extended region of the dataset */ if(H5Dwrite(did, dtid, mid, sid, H5P_DEFAULT, ibuf) < 0) diff --git a/hl/tools/h5watch/h5watchgentest.c b/hl/tools/h5watch/h5watchgentest.c index c5b76de..18e15fc 100644 --- a/hl/tools/h5watch/h5watchgentest.c +++ b/hl/tools/h5watch/h5watchgentest.c @@ -58,24 +58,24 @@ /* Data structures for datasets with compound types */ typedef struct sub22_t { - unsigned int a; - unsigned int b; - unsigned int c; + int a; + int b; + int c; } sub22_t; typedef struct sub2_t { - unsigned int a; + int a; sub22_t b; - unsigned int c; + int c; } sub2_t; typedef struct sub4_t { - unsigned int a; - unsigned int b; + int a; + int b; } sub4_t; typedef struct set_t { - unsigned int field1; + int field1; sub2_t field2; double field3; sub4_t field4; diff --git a/release_docs/RELEASE.txt b/release_docs/RELEASE.txt index 382420a..0e33857 100644 --- a/release_docs/RELEASE.txt +++ b/release_docs/RELEASE.txt @@ -54,11 +54,53 @@ New Features Configuration: ------------- + - Removed version-specific gcc/gfortran flags for version 4.0 (inclusive) + and earlier + + The config/gnu-flags file, which is sourced as a part of the configure + process, adds version-specific flags for use when building HDF5. Most of + these flags control warnings and do not affect the final product. + + Flags for older versions of the compiler were consolidated into the + common flags section. Moving these flags simplifies maintenance of + the file. + + The upshot of this is that building with ancient versions of gcc + (<= 4.0) will possibly no longer work without hand-hacking the file + to remove the flags not understood by that version of the compiler. + Nothing should change when building with gcc >= 4.1. + + Also, as a part of this work, the string 'gfortran40' was changed to + 'gfortran' in the config/gnu-fflags file. + + (HDFFV-9937, DER, 2017/05/31) + - Library: -------- - - + - H5FDdriver_query() API call added to the C library. + + This new library call allows the user to query a virtual file driver + (VFD) for the feature flags it supports (listed in H5FDpublic.h). + This can be useful to determine if a VFD supports SWMR, for example. + + Note that some VFDs have feature flags that may only be present + after a file has been created or opened (e.g.: the core VFD will + have the H5FD_FEAT_POSIX_COMPAT_HANDLE flag set if the backing + store is switched on). Since the new API call queries a generic VFD + unassociated with a file, these flags will never be returned. + + (HDFFV-10215, DER, 2017/05/31) + + + - H5FD_FEAT_DEFAULT_VFD_COMPATIBLE VFD feature flag added to the C library. + + This new feature flag indicates that the VFD is compatible with the + default VFD. VFDs that set this flag create single files that follow + the canonical HDF5 file format. + + (HDFFV-10214, DER, 2017/05/31) Parallel Library: ----------------- diff --git a/src/H5Dint.c b/src/H5Dint.c index 1813ca6..08b3eb8 100644 --- a/src/H5Dint.c +++ b/src/H5Dint.c @@ -3004,10 +3004,10 @@ H5D__format_convert(H5D_t *dataset, hid_t dxpl_id) { H5D_chk_idx_info_t new_idx_info; /* Index info for the new layout */ H5D_chk_idx_info_t idx_info; /* Index info for the current layout */ - H5O_layout_t newlayout; /* The new layout */ - hbool_t init_new_index = FALSE; /* Indicate that the new chunk index is initialized */ + H5O_layout_t *newlayout = NULL; /* The new layout */ + hbool_t init_new_index = FALSE; /* Indicate that the new chunk index is initialized */ hbool_t delete_old_layout = FALSE; /* Indicate that the old layout message is deleted */ - hbool_t add_new_layout = FALSE; /* Indicate that the new layout message is added */ + hbool_t add_new_layout = FALSE; /* Indicate that the new layout message is added */ herr_t ret_value = SUCCEED; /* Return value */ FUNC_ENTER_PACKAGE_TAG(dxpl_id, dataset->oloc.addr, FAIL) @@ -3017,121 +3017,127 @@ H5D__format_convert(H5D_t *dataset, hid_t dxpl_id) switch(dataset->shared->layout.type) { case H5D_CHUNKED: - HDassert(dataset->shared->layout.u.chunk.idx_type != H5D_CHUNK_IDX_BTREE); - - /* Set up the current index info */ - idx_info.f = dataset->oloc.file; - idx_info.dxpl_id = dxpl_id; - idx_info.pline = &dataset->shared->dcpl_cache.pline; - idx_info.layout = &dataset->shared->layout.u.chunk; - idx_info.storage = &dataset->shared->layout.storage.u.chunk; - - /* Copy the current layout info to the new layout */ - HDmemcpy(&newlayout, &dataset->shared->layout, sizeof(H5O_layout_t)); - - /* Set up info for version 1 B-tree in the new layout */ - newlayout.version = H5O_LAYOUT_VERSION_3; - newlayout.storage.u.chunk.idx_type = H5D_CHUNK_IDX_BTREE; - newlayout.storage.u.chunk.idx_addr = HADDR_UNDEF; - newlayout.storage.u.chunk.ops = H5D_COPS_BTREE; - newlayout.storage.u.chunk.u.btree.shared = NULL; - - /* Set up the index info to version 1 B-tree */ - new_idx_info.f = dataset->oloc.file; - new_idx_info.dxpl_id = dxpl_id; - new_idx_info.pline = &dataset->shared->dcpl_cache.pline; - new_idx_info.layout = &newlayout.u.chunk; - new_idx_info.storage = &newlayout.storage.u.chunk; - - /* Initialize version 1 B-tree */ - if(new_idx_info.storage->ops->init && - (new_idx_info.storage->ops->init)(&new_idx_info, dataset->shared->space, dataset->oloc.addr) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "can't initialize indexing information") - init_new_index = TRUE; - - /* If the current chunk index exists */ - if(H5F_addr_defined(idx_info.storage->idx_addr)) { - - /* Create v1 B-tree chunk index */ - if((new_idx_info.storage->ops->create)(&new_idx_info) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "can't create chunk index") - - /* Iterate over the chunks in the current index and insert the chunk addresses - * into the version 1 B-tree chunk index */ - if(H5D__chunk_format_convert(dataset, &idx_info, &new_idx_info) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_BADITER, FAIL, "unable to iterate/convert chunk index") - } /* end if */ + HDassert(dataset->shared->layout.u.chunk.idx_type != H5D_CHUNK_IDX_BTREE); + + if(NULL == (newlayout = (H5O_layout_t *)H5MM_calloc(sizeof(H5O_layout_t)))) + HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "unable to allocate buffer") + + /* Set up the current index info */ + idx_info.f = dataset->oloc.file; + idx_info.dxpl_id = dxpl_id; + idx_info.pline = &dataset->shared->dcpl_cache.pline; + idx_info.layout = &dataset->shared->layout.u.chunk; + idx_info.storage = &dataset->shared->layout.storage.u.chunk; + + /* Copy the current layout info to the new layout */ + HDmemcpy(newlayout, &dataset->shared->layout, sizeof(H5O_layout_t)); + + /* Set up info for version 1 B-tree in the new layout */ + newlayout->version = H5O_LAYOUT_VERSION_3; + newlayout->storage.u.chunk.idx_type = H5D_CHUNK_IDX_BTREE; + newlayout->storage.u.chunk.idx_addr = HADDR_UNDEF; + newlayout->storage.u.chunk.ops = H5D_COPS_BTREE; + newlayout->storage.u.chunk.u.btree.shared = NULL; + + /* Set up the index info to version 1 B-tree */ + new_idx_info.f = dataset->oloc.file; + new_idx_info.dxpl_id = dxpl_id; + new_idx_info.pline = &dataset->shared->dcpl_cache.pline; + new_idx_info.layout = &(newlayout->u).chunk; + new_idx_info.storage = &(newlayout->storage).u.chunk; + + /* Initialize version 1 B-tree */ + if(new_idx_info.storage->ops->init && (new_idx_info.storage->ops->init)(&new_idx_info, dataset->shared->space, dataset->oloc.addr) < 0) + HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "can't initialize indexing information") + init_new_index = TRUE; + + /* If the current chunk index exists */ + if(H5F_addr_defined(idx_info.storage->idx_addr)) { + + /* Create v1 B-tree chunk index */ + if((new_idx_info.storage->ops->create)(&new_idx_info) < 0) + HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "can't create chunk index") + + /* Iterate over the chunks in the current index and insert the chunk addresses + * into the version 1 B-tree chunk index + */ + if(H5D__chunk_format_convert(dataset, &idx_info, &new_idx_info) < 0) + HGOTO_ERROR(H5E_DATASET, H5E_BADITER, FAIL, "unable to iterate/convert chunk index") + } /* end if */ - /* Delete the old "current" layout message */ - if(H5O_msg_remove(&dataset->oloc, H5O_LAYOUT_ID, H5O_ALL, FALSE, dxpl_id) < 0) - HGOTO_ERROR(H5E_SYM, H5E_CANTDELETE, FAIL, "unable to delete layout message") + /* Delete the old "current" layout message */ + if(H5O_msg_remove(&dataset->oloc, H5O_LAYOUT_ID, H5O_ALL, FALSE, dxpl_id) < 0) + HGOTO_ERROR(H5E_SYM, H5E_CANTDELETE, FAIL, "unable to delete layout message") - delete_old_layout = TRUE; + delete_old_layout = TRUE; - /* Append the new layout message to the object header */ - if(H5O_msg_create(&dataset->oloc, H5O_LAYOUT_ID, 0, H5O_UPDATE_TIME, &newlayout, dxpl_id) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to update layout header message") + /* Append the new layout message to the object header */ + if(H5O_msg_create(&dataset->oloc, H5O_LAYOUT_ID, 0, H5O_UPDATE_TIME, newlayout, dxpl_id) < 0) + HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to update layout header message") - add_new_layout = TRUE; + add_new_layout = TRUE; - /* Release the old (current) chunk index */ - if(idx_info.storage->ops->dest && (idx_info.storage->ops->dest)(&idx_info) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTFREE, FAIL, "unable to release chunk index info") + /* Release the old (current) chunk index */ + if(idx_info.storage->ops->dest && (idx_info.storage->ops->dest)(&idx_info) < 0) + HGOTO_ERROR(H5E_DATASET, H5E_CANTFREE, FAIL, "unable to release chunk index info") - /* Copy the new layout to the dataset's layout */ - HDmemcpy(&dataset->shared->layout, &newlayout, sizeof(H5O_layout_t)); + /* Copy the new layout to the dataset's layout */ + HDmemcpy(&dataset->shared->layout, newlayout, sizeof(H5O_layout_t)); - break; + break; - case H5D_CONTIGUOUS: + case H5D_CONTIGUOUS: case H5D_COMPACT: - HDassert(dataset->shared->layout.version > H5O_LAYOUT_VERSION_DEFAULT); - dataset->shared->layout.version = H5O_LAYOUT_VERSION_DEFAULT; - if(H5O_msg_write(&(dataset->oloc), H5O_LAYOUT_ID, 0, H5O_UPDATE_TIME, &(dataset->shared->layout), dxpl_id) < 0) - HGOTO_ERROR(H5E_FILE, H5E_CANTINIT, FAIL, "unable to update layout message") - break; + HDassert(dataset->shared->layout.version > H5O_LAYOUT_VERSION_DEFAULT); + dataset->shared->layout.version = H5O_LAYOUT_VERSION_DEFAULT; + if(H5O_msg_write(&(dataset->oloc), H5O_LAYOUT_ID, 0, H5O_UPDATE_TIME, &(dataset->shared->layout), dxpl_id) < 0) + HGOTO_ERROR(H5E_FILE, H5E_CANTINIT, FAIL, "unable to update layout message") + break; - case H5D_VIRTUAL: - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "virtual dataset layout not supported") + case H5D_VIRTUAL: + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "virtual dataset layout not supported") case H5D_LAYOUT_ERROR: case H5D_NLAYOUTS: - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid dataset layout type") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid dataset layout type") - default: - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "unknown dataset layout type") + default: + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "unknown dataset layout type") } /* end switch */ done: if(ret_value < 0 && dataset->shared->layout.type == H5D_CHUNKED) { - /* Remove new layout message */ - if(add_new_layout) - if(H5O_msg_remove(&dataset->oloc, H5O_LAYOUT_ID, H5O_ALL, FALSE, dxpl_id) < 0) - HDONE_ERROR(H5E_SYM, H5E_CANTDELETE, FAIL, "unable to delete layout message") - - /* Add back old layout message */ - if(delete_old_layout) - if(H5O_msg_create(&dataset->oloc, H5O_LAYOUT_ID, 0, H5O_UPDATE_TIME, &dataset->shared->layout, dxpl_id) < 0) - HDONE_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to add layout header message") - - /* Clean up v1 b-tree chunk index */ - if(init_new_index) { - if(H5F_addr_defined(new_idx_info.storage->idx_addr)) { - /* Check for valid address i.e. tag */ - if(!H5F_addr_defined(dataset->oloc.addr)) - HDONE_ERROR(H5E_DATASET, H5E_BADVALUE, FAIL, "address undefined") - - /* Expunge from cache all v1 B-tree type entries associated with tag */ - if(H5AC_expunge_tag_type_metadata(dataset->oloc.file, dxpl_id, dataset->oloc.addr, H5AC_BT_ID, H5AC__NO_FLAGS_SET)) - HDONE_ERROR(H5E_DATASET, H5E_CANTEXPUNGE, FAIL, "unable to expunge index metadata") - } /* end if */ + /* Remove new layout message */ + if(add_new_layout) + if(H5O_msg_remove(&dataset->oloc, H5O_LAYOUT_ID, H5O_ALL, FALSE, dxpl_id) < 0) + HDONE_ERROR(H5E_SYM, H5E_CANTDELETE, FAIL, "unable to delete layout message") + + /* Add back old layout message */ + if(delete_old_layout) + if(H5O_msg_create(&dataset->oloc, H5O_LAYOUT_ID, 0, H5O_UPDATE_TIME, &dataset->shared->layout, dxpl_id) < 0) + HDONE_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to add layout header message") + + /* Clean up v1 b-tree chunk index */ + if(init_new_index) { + if(H5F_addr_defined(new_idx_info.storage->idx_addr)) { + /* Check for valid address i.e. tag */ + if(!H5F_addr_defined(dataset->oloc.addr)) + HDONE_ERROR(H5E_DATASET, H5E_BADVALUE, FAIL, "address undefined") + + /* Expunge from cache all v1 B-tree type entries associated with tag */ + if(H5AC_expunge_tag_type_metadata(dataset->oloc.file, dxpl_id, dataset->oloc.addr, H5AC_BT_ID, H5AC__NO_FLAGS_SET)) + HDONE_ERROR(H5E_DATASET, H5E_CANTEXPUNGE, FAIL, "unable to expunge index metadata") + } /* end if */ - /* Delete v1 B-tree chunk index */ - if(new_idx_info.storage->ops->dest && (new_idx_info.storage->ops->dest)(&new_idx_info) < 0) - HDONE_ERROR(H5E_DATASET, H5E_CANTFREE, FAIL, "unable to release chunk index info") - } /* end if */ + /* Delete v1 B-tree chunk index */ + if(new_idx_info.storage->ops->dest && (new_idx_info.storage->ops->dest)(&new_idx_info) < 0) + HDONE_ERROR(H5E_DATASET, H5E_CANTFREE, FAIL, "unable to release chunk index info") + } /* end if */ } /* end if */ + if(newlayout != NULL) + newlayout = (H5O_layout_t *)H5MM_xfree(newlayout); + FUNC_LEAVE_NOAPI_TAG(ret_value, FAIL) } /* end H5D__format_convert() */ diff --git a/src/H5Dio.c b/src/H5Dio.c index 572e6cf..1766422 100644 --- a/src/H5Dio.c +++ b/src/H5Dio.c @@ -181,7 +181,6 @@ H5Dread(hid_t dset_id, hid_t mem_type_id, hid_t mem_space_id, if(direct_read) { unsigned u; - hsize_t dims[H5O_LAYOUT_NDIMS]; hsize_t internal_offset[H5O_LAYOUT_NDIMS]; if(H5D_CHUNKED != dset->shared->layout.type) diff --git a/src/H5FD.c b/src/H5FD.c index dcfaa6d..67cf963 100644 --- a/src/H5FD.c +++ b/src/H5FD.c @@ -62,7 +62,6 @@ /********************/ static herr_t H5FD_free_cls(H5FD_class_t *cls); static int H5FD_query(const H5FD_t *f, unsigned long *flags/*out*/); -static int H5FD_driver_query(const H5FD_class_t *driver, unsigned long *flags/*out*/); /*********************/ /* Package Variables */ @@ -790,7 +789,8 @@ H5FD_open(const char *name, unsigned flags, hid_t fapl_id, haddr_t maxaddr) HGOTO_ERROR(H5E_VFL, H5E_UNSUPPORTED, NULL, "file driver has no `open' method") /* Query driver flag */ - H5FD_driver_query(driver, &driver_flags); + if(H5FD_driver_query(driver, &driver_flags) < 0) + HGOTO_ERROR(H5E_VFL, H5E_BADVALUE, NULL, "can't query VFD flags") /* Get initial file image info */ if(H5P_peek(plist, H5F_ACS_FILE_IMAGE_INFO_NAME, &file_image_info) < 0) @@ -1085,42 +1085,6 @@ H5FD_query(const H5FD_t *f, unsigned long *flags/*out*/) /*------------------------------------------------------------------------- -* Function: H5FD_driver_query -* -* Purpose: Similar to H5FD_query(), but intended for cases when we don't -* have a file available (e.g. before one is opened). Since we -* can't use the file to get the driver, the driver is passed in -* as a parameter. -* -* Return: Success: non-negative -* Failure: negative -* -* Programmer: Jacob Gruber -* Wednesday, August 17, 2011 -* -*------------------------------------------------------------------------- -*/ -static int -H5FD_driver_query(const H5FD_class_t *driver, unsigned long *flags/*out*/) -{ - int ret_value = 0; /* Return value */ - - FUNC_ENTER_NOAPI_NOINIT_NOERR - - HDassert(driver); - HDassert(flags); - - /* Check for the driver to query and then query it */ - if(driver->query) - ret_value = (driver->query)(NULL, flags); - else - *flags = 0; - - FUNC_LEAVE_NOAPI(ret_value) -} /* end H5FD_driver_query() */ - - -/*------------------------------------------------------------------------- * Function: H5FDalloc * * Purpose: Allocates SIZE bytes of memory from the FILE. The memory will @@ -2076,3 +2040,42 @@ H5FD_set_paged_aggr(H5FD_t *file, hbool_t paged) FUNC_LEAVE_NOAPI(SUCCEED) } /* end H5FD_set_paged_aggr() */ + + +/*------------------------------------------------------------------------- +* Function: H5FDdriver_query +* +* Purpose: Similar to H5FD_query(), but intended for cases when we don't +* have a file available (e.g. before one is opened). Since we +* can't use the file to get the driver, the driver ID is passed +* in as a parameter. +* +* Return: SUCCEED/FAIL +* +* Programmer: Jacob Gruber +* Wednesday, August 17, 2011 +* +*------------------------------------------------------------------------- +*/ +herr_t +H5FDdriver_query(hid_t driver_id, unsigned long *flags/*out*/) +{ + H5FD_class_t *driver = NULL; /* Pointer to VFD class struct */ + herr_t ret_value = SUCCEED; /* Return value */ + + FUNC_ENTER_API(FAIL) + H5TRACE2("e", "ix", driver_id, flags); + + if(NULL == flags) + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "flags parameter cannot be NULL") + + /* Check for the driver to query and then query it */ + if (NULL == (driver = (H5FD_class_t *)H5I_object_verify(driver_id, H5I_VFL))) + HGOTO_ERROR(H5E_ATOM, H5E_BADATOM, FAIL, "not a VFL ID") + if (H5FD_driver_query(driver, flags) < 0) + HGOTO_ERROR(H5E_VFL, H5E_BADVALUE, FAIL, "driver flag query failed") + +done: + FUNC_LEAVE_API(ret_value) +} /* end H5FDdriver_query() */ + diff --git a/src/H5FDcore.c b/src/H5FDcore.c index d100a8b..b980b7e 100644 --- a/src/H5FDcore.c +++ b/src/H5FDcore.c @@ -982,9 +982,11 @@ H5FD__core_query(const H5FD_t * _file, unsigned long *flags /* out */) *flags |= H5FD_FEAT_ALLOW_FILE_IMAGE; /* OK to use file image feature with this VFD */ *flags |= H5FD_FEAT_CAN_USE_FILE_IMAGE_CALLBACKS; /* OK to use file image callbacks with this VFD */ - /* If the backing store is open, a POSIX file handle is available */ - if(file && file->fd >= 0 && file->backing_store) - *flags |= H5FD_FEAT_POSIX_COMPAT_HANDLE; /* VFD handle is POSIX I/O call compatible */ + /* These feature flags are only applicable if the backing store is enabled */ + if(file && file->fd >= 0 && file->backing_store) { + *flags |= H5FD_FEAT_POSIX_COMPAT_HANDLE; /* get_handle callback returns a POSIX file descriptor */ + *flags |= H5FD_FEAT_DEFAULT_VFD_COMPATIBLE; /* VFD creates a file which can be opened with the default VFD */ + } } /* end if */ FUNC_LEAVE_NOAPI(SUCCEED) diff --git a/src/H5FDdirect.c b/src/H5FDdirect.c index 1487cda..7a4c99c 100644 --- a/src/H5FDdirect.c +++ b/src/H5FDdirect.c @@ -698,6 +698,7 @@ H5FD_direct_query(const H5FD_t H5_ATTR_UNUSED * _f, unsigned long *flags /* out *flags |= H5FD_FEAT_ACCUMULATE_METADATA; /* OK to accumulate metadata for faster writes */ *flags |= H5FD_FEAT_DATA_SIEVE; /* OK to perform data sieving for faster raw data reads & writes */ *flags |= H5FD_FEAT_AGGREGATE_SMALLDATA; /* OK to aggregate "small" raw data allocations */ + *flags |= H5FD_FEAT_DEFAULT_VFD_COMPATIBLE; /* VFD creates a file which can be opened with the default VFD */ } FUNC_LEAVE_NOAPI(SUCCEED) diff --git a/src/H5FDint.c b/src/H5FDint.c index bc322d6..52fbc23 100644 --- a/src/H5FDint.c +++ b/src/H5FDint.c @@ -433,3 +433,38 @@ done: FUNC_LEAVE_NOAPI(ret_value) } /* end H5FD_get_eof() */ + +/*------------------------------------------------------------------------- +* Function: H5FD_driver_query +* +* Purpose: Similar to H5FD_query(), but intended for cases when we don't +* have a file available (e.g. before one is opened). Since we +* can't use the file to get the driver, the driver is passed in +* as a parameter. +* +* Return: SUCCEED/FAIL +* +* Programmer: Jacob Gruber +* Wednesday, August 17, 2011 +* +*------------------------------------------------------------------------- +*/ +herr_t +H5FD_driver_query(const H5FD_class_t *driver, unsigned long *flags/*out*/) +{ + herr_t ret_value = SUCCEED; /* Return value */ + + FUNC_ENTER_NOAPI_NOINIT_NOERR + + HDassert(driver); + HDassert(flags); + + /* Check for the driver to query and then query it */ + if(driver->query) + ret_value = (driver->query)(NULL, flags); + else + *flags = 0; + + FUNC_LEAVE_NOAPI(ret_value) +} /* end H5FD_driver_query() */ + diff --git a/src/H5FDlog.c b/src/H5FDlog.c index 75333c2..7c6bbd4 100644 --- a/src/H5FDlog.c +++ b/src/H5FDlog.c @@ -895,8 +895,9 @@ H5FD_log_query(const H5FD_t *_file, unsigned long *flags /* out */) *flags |= H5FD_FEAT_ACCUMULATE_METADATA; /* OK to accumulate metadata for faster writes */ *flags |= H5FD_FEAT_DATA_SIEVE; /* OK to perform data sieving for faster raw data reads & writes */ *flags |= H5FD_FEAT_AGGREGATE_SMALLDATA; /* OK to aggregate "small" raw data allocations */ - *flags |= H5FD_FEAT_POSIX_COMPAT_HANDLE; /* VFD handle is POSIX I/O call compatible */ + *flags |= H5FD_FEAT_POSIX_COMPAT_HANDLE; /* get_handle callback returns a POSIX file descriptor */ *flags |= H5FD_FEAT_SUPPORTS_SWMR_IO; /* VFD supports the single-writer/multiple-readers (SWMR) pattern */ + *flags |= H5FD_FEAT_DEFAULT_VFD_COMPATIBLE; /* VFD creates a file which can be opened with the default VFD */ /* Check for flags that are set by h5repart */ if(file && file->fam_to_sec2) diff --git a/src/H5FDmpio.c b/src/H5FDmpio.c index ace91f8..f594d8e 100644 --- a/src/H5FDmpio.c +++ b/src/H5FDmpio.c @@ -1150,10 +1150,11 @@ H5FD_mpio_query(const H5FD_t H5_ATTR_UNUSED *_file, unsigned long *flags /* out /* Set the VFL feature flags that this driver supports */ if(flags) { *flags=0; - *flags|=H5FD_FEAT_AGGREGATE_METADATA; /* OK to aggregate metadata allocations */ - *flags|=H5FD_FEAT_AGGREGATE_SMALLDATA; /* OK to aggregate "small" raw data allocations */ - *flags|=H5FD_FEAT_HAS_MPI; /* This driver uses MPI */ - *flags|=H5FD_FEAT_ALLOCATE_EARLY; /* Allocate space early instead of late */ + *flags |= H5FD_FEAT_AGGREGATE_METADATA; /* OK to aggregate metadata allocations */ + *flags |= H5FD_FEAT_AGGREGATE_SMALLDATA; /* OK to aggregate "small" raw data allocations */ + *flags |= H5FD_FEAT_HAS_MPI; /* This driver uses MPI */ + *flags |= H5FD_FEAT_ALLOCATE_EARLY; /* Allocate space early instead of late */ + *flags |= H5FD_FEAT_DEFAULT_VFD_COMPATIBLE; /* VFD creates a file which can be opened with the default VFD */ } /* end if */ FUNC_LEAVE_NOAPI(SUCCEED) diff --git a/src/H5FDprivate.h b/src/H5FDprivate.h index 0fc2135..e758951 100644 --- a/src/H5FDprivate.h +++ b/src/H5FDprivate.h @@ -153,6 +153,7 @@ H5_DLL H5FD_t *H5FD_open(const char *name, unsigned flags, hid_t fapl_id, haddr_t maxaddr); H5_DLL herr_t H5FD_close(H5FD_t *file); H5_DLL int H5FD_cmp(const H5FD_t *f1, const H5FD_t *f2); +H5_DLL herr_t H5FD_driver_query(const H5FD_class_t *driver, unsigned long *flags/*out*/); H5_DLL haddr_t H5FD_alloc(H5FD_t *file, hid_t dxpl_id, H5FD_mem_t type, struct H5F_t *f, hsize_t size, haddr_t *frag_addr, hsize_t *frag_size); H5_DLL herr_t H5FD_free(H5FD_t *file, hid_t dxpl_id, H5FD_mem_t type, struct H5F_t *f, diff --git a/src/H5FDpublic.h b/src/H5FDpublic.h index 3032e8a..514d1bf 100644 --- a/src/H5FDpublic.h +++ b/src/H5FDpublic.h @@ -250,6 +250,14 @@ typedef enum H5F_mem_t H5FD_mem_t; * This is specifically used for the multi/split driver. */ #define H5FD_FEAT_PAGED_AGGR 0x00004000 + /* + * Defining H5FD_FEAT_DEFAULT_VFD_COMPATIBLE for a VFL driver + * that creates a file which is compatible with the default VFD. + * Generally, this means that the VFD creates a single file that follows + * the canonical HDF5 file format. + */ +#define H5FD_FEAT_DEFAULT_VFD_COMPATIBLE 0x00008000 + /* Forward declaration */ typedef struct H5FD_t H5FD_t; @@ -376,6 +384,9 @@ H5_DLL herr_t H5FDtruncate(H5FD_t *file, hid_t dxpl_id, hbool_t closing); H5_DLL herr_t H5FDlock(H5FD_t *file, hbool_t rw); H5_DLL herr_t H5FDunlock(H5FD_t *file); +/* Allows querying a VFD ID for features before the file is opened */ +H5_DLL herr_t H5FDdriver_query(hid_t driver_id, unsigned long *flags/*out*/); + #ifdef __cplusplus } #endif diff --git a/src/H5FDsec2.c b/src/H5FDsec2.c index 26913e2..b6385fb 100644 --- a/src/H5FDsec2.c +++ b/src/H5FDsec2.c @@ -527,8 +527,9 @@ H5FD_sec2_query(const H5FD_t *_file, unsigned long *flags /* out */) *flags |= H5FD_FEAT_ACCUMULATE_METADATA; /* OK to accumulate metadata for faster writes */ *flags |= H5FD_FEAT_DATA_SIEVE; /* OK to perform data sieving for faster raw data reads & writes */ *flags |= H5FD_FEAT_AGGREGATE_SMALLDATA; /* OK to aggregate "small" raw data allocations */ - *flags |= H5FD_FEAT_POSIX_COMPAT_HANDLE; /* VFD handle is POSIX I/O call compatible */ + *flags |= H5FD_FEAT_POSIX_COMPAT_HANDLE; /* get_handle callback returns a POSIX file descriptor */ *flags |= H5FD_FEAT_SUPPORTS_SWMR_IO; /* VFD supports the single-writer/multiple-readers (SWMR) pattern */ + *flags |= H5FD_FEAT_DEFAULT_VFD_COMPATIBLE; /* VFD creates a file which can be opened with the default VFD */ /* Check for flags that are set by h5repart */ if(file && file->fam_to_sec2) diff --git a/src/H5FDspace.c b/src/H5FDspace.c index e451d6b..0af755f 100644 --- a/src/H5FDspace.c +++ b/src/H5FDspace.c @@ -99,9 +99,7 @@ H5FL_DEFINE(H5FD_free_t); static haddr_t H5FD_extend(H5FD_t *file, H5FD_mem_t type, hsize_t size) { - hsize_t orig_size = size; /* Original allocation size */ haddr_t eoa; /* Address of end-of-allocated space */ - hsize_t extra; /* Extra space to allocate, to align request */ haddr_t ret_value = HADDR_UNDEF; /* Return value */ FUNC_ENTER_NOAPI_NOINIT diff --git a/src/H5FDstdio.c b/src/H5FDstdio.c index 5023af3..861c6a6 100644 --- a/src/H5FDstdio.c +++ b/src/H5FDstdio.c @@ -555,10 +555,11 @@ H5FD_stdio_query(const H5FD_t *_f, unsigned long /*OUT*/ *flags) */ if(flags) { *flags = 0; - *flags|=H5FD_FEAT_AGGREGATE_METADATA; /* OK to aggregate metadata allocations */ - *flags|=H5FD_FEAT_ACCUMULATE_METADATA; /* OK to accumulate metadata for faster writes */ - *flags|=H5FD_FEAT_DATA_SIEVE; /* OK to perform data sieving for faster raw data reads & writes */ - *flags|=H5FD_FEAT_AGGREGATE_SMALLDATA; /* OK to aggregate "small" raw data allocations */ + *flags |= H5FD_FEAT_AGGREGATE_METADATA; /* OK to aggregate metadata allocations */ + *flags |= H5FD_FEAT_ACCUMULATE_METADATA; /* OK to accumulate metadata for faster writes */ + *flags |= H5FD_FEAT_DATA_SIEVE; /* OK to perform data sieving for faster raw data reads & writes */ + *flags |= H5FD_FEAT_AGGREGATE_SMALLDATA; /* OK to aggregate "small" raw data allocations */ + *flags |= H5FD_FEAT_DEFAULT_VFD_COMPATIBLE; /* VFD creates a file which can be opened with the default VFD */ } return 0; diff --git a/src/H5Fint.c b/src/H5Fint.c index fe532b2..e52d539 100644 --- a/src/H5Fint.c +++ b/src/H5Fint.c @@ -715,10 +715,6 @@ H5F_new(H5F_file_t *shared, unsigned flags, hid_t fcpl_id, hid_t fapl_id, H5FD_t if(!H5F_HAS_FEATURE(f, H5FD_FEAT_SUPPORTS_SWMR_IO) && (H5F_INTENT(f) & (H5F_ACC_SWMR_WRITE | H5F_ACC_SWMR_READ))) HGOTO_ERROR(H5E_FILE, H5E_BADVALUE, NULL, "must use a SWMR-compatible VFD when SWMR is specified") - /* Require a POSIX compatible VFD to use SWMR feature */ - /* (It's reasonable to try to expand this to other VFDs eventually -QAK) */ - if(!H5F_HAS_FEATURE(f, H5FD_FEAT_POSIX_COMPAT_HANDLE) && (H5F_INTENT(f) & (H5F_ACC_SWMR_WRITE | H5F_ACC_SWMR_READ))) - HGOTO_ERROR(H5E_FILE, H5E_BADVALUE, NULL, "must use POSIX compatible VFD with SWMR write access") if(H5FD_get_fs_type_map(lf, f->shared->fs_type_map) < 0) HGOTO_ERROR(H5E_FILE, H5E_CANTGET, NULL, "can't get free space type mapping from VFD") if(H5MF_init_merge_flags(f) < 0) diff --git a/src/H5I.c b/src/H5I.c index ce4ecdc..42edf58 100644 --- a/src/H5I.c +++ b/src/H5I.c @@ -888,7 +888,7 @@ H5I_subst(hid_t id, const void *new_object) done: FUNC_LEAVE_NOAPI(ret_value) -} /* end if */ +} /* end H5I_subst() */ /*------------------------------------------------------------------------- @@ -920,7 +920,7 @@ H5I_object(hid_t id) } /* end if */ FUNC_LEAVE_NOAPI(ret_value) -} /* end if */ +} /* end H5I_object() */ /*------------------------------------------------------------------------- diff --git a/src/H5MFdbg.c b/src/H5MFdbg.c index 49cfbfc..1ae902f 100644 --- a/src/H5MFdbg.c +++ b/src/H5MFdbg.c @@ -156,7 +156,7 @@ herr_t H5MF_sects_debug(H5F_t *f, hid_t dxpl_id, haddr_t fs_addr, FILE *stream, int indent, int fwidth) { herr_t ret_value = SUCCEED; /* Return value */ - H5FD_mem_t type; /* Memory type for iteration */ + H5F_mem_page_t type; /* Memory type for iteration */ FUNC_ENTER_NOAPI_TAG(dxpl_id, H5AC__FREESPACE_TAG, FAIL) @@ -168,31 +168,31 @@ H5MF_sects_debug(H5F_t *f, hid_t dxpl_id, haddr_t fs_addr, FILE *stream, int ind HDassert(indent >= 0); HDassert(fwidth >= 0); - for(type = H5FD_MEM_DEFAULT; type < H5FD_MEM_NTYPES; H5_INC_ENUM(H5FD_mem_t, type)) - if(H5F_addr_eq(f->shared->fs_addr[type], fs_addr)) { - if(!f->shared->fs_man[type]) + for(type = H5F_MEM_PAGE_DEFAULT; type < H5F_MEM_PAGE_NTYPES; H5_INC_ENUM(H5F_mem_page_t, type)) + if(H5F_addr_eq(f->shared->fs_addr[type], fs_addr)) { + if(!f->shared->fs_man[type]) if(H5MF_open_fstype(f, dxpl_id, type) < 0) - HGOTO_ERROR(H5E_RESOURCE, H5E_CANTINIT, FAIL, "can't initialize file free space") - - if(f->shared->fs_man[type]) { - H5MF_debug_iter_ud_t udata; /* User data for callbacks */ - - /* Prepare user data for section iteration callback */ - udata.fspace = f->shared->fs_man[type]; - udata.stream = stream; - udata.indent = indent; - udata.fwidth = fwidth; - - /* Iterate over all the free space sections */ - if(H5FS_sect_iterate(f, dxpl_id, f->shared->fs_man[type], H5MF_sects_debug_cb, &udata) < 0) - HGOTO_ERROR(H5E_HEAP, H5E_BADITER, FAIL, "can't iterate over heap's free space") - - /* Close the free space information */ - if(H5FS_close(f, dxpl_id, f->shared->fs_man[type]) < 0) - HGOTO_ERROR(H5E_HEAP, H5E_CANTRELEASE, FAIL, "can't release free space info") - } /* end if */ - break; - } /* end if */ + HGOTO_ERROR(H5E_RESOURCE, H5E_CANTINIT, FAIL, "can't initialize file free space") + + if(f->shared->fs_man[type]) { + H5MF_debug_iter_ud_t udata; /* User data for callbacks */ + + /* Prepare user data for section iteration callback */ + udata.fspace = f->shared->fs_man[type]; + udata.stream = stream; + udata.indent = indent; + udata.fwidth = fwidth; + + /* Iterate over all the free space sections */ + if(H5FS_sect_iterate(f, dxpl_id, f->shared->fs_man[type], H5MF_sects_debug_cb, &udata) < 0) + HGOTO_ERROR(H5E_HEAP, H5E_BADITER, FAIL, "can't iterate over heap's free space") + + /* Close the free space information */ + if(H5FS_close(f, dxpl_id, f->shared->fs_man[type]) < 0) + HGOTO_ERROR(H5E_HEAP, H5E_CANTRELEASE, FAIL, "can't release free space info") + } /* end if */ + break; + } /* end if */ done: FUNC_LEAVE_NOAPI_TAG(ret_value, FAIL) diff --git a/src/H5MFsection.c b/src/H5MFsection.c index 0dd26b3..02fc2d9 100644 --- a/src/H5MFsection.c +++ b/src/H5MFsection.c @@ -360,7 +360,7 @@ H5MF_sect_valid(const H5FS_section_class_t H5_ATTR_UNUSED *cls, static H5FS_section_info_t * H5MF_sect_split(H5FS_section_info_t *sect, hsize_t frag_size) { - H5MF_free_section_t *ret_value; /* Return value */ + H5MF_free_section_t *ret_value = NULL; /* Return value */ FUNC_ENTER_NOAPI_NOINIT diff --git a/src/H5Ocache_image.c b/src/H5Ocache_image.c index 29b2503..a427b49 100644 --- a/src/H5Ocache_image.c +++ b/src/H5Ocache_image.c @@ -323,7 +323,7 @@ H5O__mdci_delete(H5F_t *f, hid_t dxpl_id, H5O_t *open_oh, void *_mesg) * time constraints, I don't want to go there now. */ if(H5F_FIRST_ALLOC_DEALLOC(f)) { - HDassert(HADDR_UNDEF !=H5F_EOA_PRE_FSM_FSALLOC(f)); + HDassert(HADDR_UNDEF != H5F_EOA_PRE_FSM_FSALLOC(f)); HDassert(H5F_addr_ge(mesg->addr, H5F_EOA_PRE_FSM_FSALLOC(f))); if(H5MF_tidy_self_referential_fsm_hack(f, dxpl_id) < 0) HGOTO_ERROR(H5E_OHDR, H5E_CANTFREE, FAIL, "tidy of self referential fsm hack failed") diff --git a/src/H5Ofsinfo.c b/src/H5Ofsinfo.c index 89dc8ee..4d62f49 100644 --- a/src/H5Ofsinfo.c +++ b/src/H5Ofsinfo.c @@ -85,7 +85,7 @@ H5FL_DEFINE_STATIC(H5O_fsinfo_t); *------------------------------------------------------------------------- */ static void * -H5O_fsinfo_decode(H5F_t *f, hid_t dxpl_id, H5O_t H5_ATTR_UNUSED *open_oh, +H5O_fsinfo_decode(H5F_t *f, hid_t H5_ATTR_UNUSED dxpl_id, H5O_t H5_ATTR_UNUSED *open_oh, unsigned H5_ATTR_UNUSED mesg_flags, unsigned H5_ATTR_UNUSED *ioflags, const uint8_t *p) { H5O_fsinfo_t *fsinfo = NULL; /* File space info message */ diff --git a/test/dsets.c b/test/dsets.c index ba0ad82..12d2e83 100644 --- a/test/dsets.c +++ b/test/dsets.c @@ -17,6 +17,8 @@ * * Purpose: Tests the dataset interface (H5D) */ +#define H5D_FRIEND /*suppress error about including H5Dpkg */ +#define H5D_TESTING #define H5FD_FRIEND /*suppress error about including H5FDpkg */ #define H5FD_TESTING @@ -24,6 +26,7 @@ #include "h5test.h" #include "H5srcdir.h" +#include "H5Dpkg.h" #include "H5FDpkg.h" #include "H5VMprivate.h" #include "H5Zpkg.h" diff --git a/test/flushrefresh.c b/test/flushrefresh.c index f35ed5e..0775dee 100644 --- a/test/flushrefresh.c +++ b/test/flushrefresh.c @@ -9,6 +9,7 @@ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * * If you do not have access to either file, you may request a copy from * * help@hdfgroup.org. * + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* * Programmer: Mike McGreevy diff --git a/test/mf.c b/test/mf.c index 3197989..fea5ee2 100644 --- a/test/mf.c +++ b/test/mf.c @@ -45,8 +45,10 @@ #define TBLOCK_SIZE4 4 #define TBLOCK_SIZE5 5 #define TBLOCK_SIZE6 6 +#ifdef PB_OUT #define TBLOCK_SIZE7 7 #define TBLOCK_SIZE8 8 +#endif /* PB_OUT */ #define TBLOCK_SIZE10 10 #define TBLOCK_SIZE11 11 #define TBLOCK_SIZE20 20 @@ -138,8 +140,10 @@ static unsigned test_mf_fs_gone(const char *env_h5_drvr, hid_t fapl, hbool_t new static unsigned test_mf_strat_thres_gone(const char *env_h5_drvr, hid_t fapl, hbool_t new_format); static unsigned test_mf_fs_persist(const char *env_h5_drvr, hid_t fapl, hbool_t new_format); static unsigned test_mf_strat_thres_persist(const char *env_h5_drvr, hid_t fapl, hbool_t new_format); +#ifdef PB_OUT static unsigned test_mf_fs_persist_split(void); static unsigned test_mf_fs_persist_multi(void); +#endif static unsigned test_page_alloc_xfree(const char *env_h5_drvr, hid_t fapl); static unsigned test_page_small(const char *env_h5_drvr, hid_t fapl); static unsigned test_page_large(const char *env_h5_drvr, hid_t fapl); @@ -6091,6 +6095,7 @@ error: * Verify that the file's free-space manager(s) are persistent for a split-file *------------------------------------------------------------------------- */ +#ifdef PB_OUT static unsigned test_mf_fs_persist_split(void) { @@ -6716,6 +6721,7 @@ error: } H5E_END_TRY; return(1); } /* test_mf_fs_persist_multi() */ +#endif /* PB_OUT */ /* *------------------------------------------------------------------------- diff --git a/test/plugin.c b/test/plugin.c index 8b4324d..1254e9a 100644 --- a/test/plugin.c +++ b/test/plugin.c @@ -574,7 +574,9 @@ test_noread_with_filters(hid_t file) /* disable filter plugin */ if(H5PLget_loading_state(&plugin_state) < 0) TEST_ERROR - plugin_state = plugin_state & ~H5PL_FILTER_PLUGIN; + + plugin_state = plugin_state & (unsigned)(~H5PL_FILTER_PLUGIN); + if(H5PLset_loading_state(plugin_state) < 0) TEST_ERROR if((dset = H5Dopen2(file, DSET_DYNLIB1_NAME, H5P_DEFAULT)) < 0) TEST_ERROR @@ -672,8 +674,8 @@ static herr_t test_groups_with_filters(hid_t file) { herr_t ret_value = -1; - hid_t gid; - hid_t group; + hid_t gid = -1; + hid_t group = -1; int i; char gname[256]; diff --git a/test/swmr.c b/test/swmr.c index 399a9ec..3b1bd09 100644 --- a/test/swmr.c +++ b/test/swmr.c @@ -116,16 +116,37 @@ static int test_multiple_same(hid_t in_fapl, hbool_t new_format); static int test_metadata_read_attempts(hid_t in_fapl) { - hid_t fapl; /* File access property list */ - hid_t file_fapl; /* The file's access property list */ - hid_t fid, fid1, fid2; /* File IDs */ - unsigned attempts; /* The # of read attempts */ - char filename[NAME_BUF_SIZE]; /* File name */ - herr_t ret; /* Generic return value */ + hid_t fapl = -1; /* File access property list */ + hid_t file_fapl = -1; /* The file's access property list */ + hid_t fid = -1, fid1 = -1, fid2 = -1; /* File IDs */ + hid_t driver_id = -1; /* ID for this VFD */ + unsigned long driver_flags = 0; /* VFD feature flags */ + hbool_t compat_w_default_vfd; /* current VFD compat w/ H5P_DEFAULT? */ + unsigned attempts; /* The # of read attempts */ + char filename[NAME_BUF_SIZE]; /* File name */ + herr_t ret; /* Generic return value */ /* Output message about test being performed */ TESTING("H5Pget/set_metadata_read_attempts()"); + /* Check if the driver is compatible with the default VFD. + * Most of the tests will attempt to create and open files with both the + * VFD specified in the passed-in fapl and the default VFD. Since this + * will clearly not work with VFDs that are not compatible with the default + * fapl (e.g.: split/multi), we just skip this entire test. + */ + if ((driver_id = H5Pget_driver(in_fapl)) < 0) + FAIL_STACK_ERROR + if (H5FDdriver_query(driver_id, &driver_flags) < 0) + FAIL_STACK_ERROR + compat_w_default_vfd = (driver_flags & H5FD_FEAT_DEFAULT_VFD_COMPATIBLE) ? TRUE : FALSE; + + if (!compat_w_default_vfd) { + SKIPPED() + HDputs(" The current VFD is not compatible with the default VFD."); + return 0; + } + /* Get a copy of the parameter fapl */ if((fapl = H5Pcopy(in_fapl)) < 0) FAIL_STACK_ERROR diff --git a/test/swmr_remove_reader.c b/test/swmr_remove_reader.c index 11649e3..1fae5e7 100644 --- a/test/swmr_remove_reader.c +++ b/test/swmr_remove_reader.c @@ -227,7 +227,7 @@ read_records(const char *filename, unsigned verbose, unsigned long nseconds, /* Determine the offset of the symbol, within level 0 symbols */ /* (level 0 symbols are the most common symbols) */ - offset = (unsigned)(HDrandom() % symbol_count[0]); + offset = (unsigned)HDrandom() % symbol_count[0]; sym_com[v] = &symbol_info[0][offset]; /* Emit informational message */ diff --git a/test/swmr_remove_writer.c b/test/swmr_remove_writer.c index 82c2f8b..43743d9 100644 --- a/test/swmr_remove_writer.c +++ b/test/swmr_remove_writer.c @@ -187,7 +187,7 @@ remove_records(hid_t fid, unsigned verbose, unsigned long nshrinks, unsigned lon symbol->nrecords = 0; else symbol->nrecords -= remove_size; - dim[1] = symbol->nrecords; + dim[1] = symbol->nrecords; if(H5Dset_extent(symbol->dsid, dim) < 0) return -1; diff --git a/test/tfile.c b/test/tfile.c index 7274c82..c59e756 100644 --- a/test/tfile.c +++ b/test/tfile.c @@ -4929,9 +4929,9 @@ test_libver_bounds(void) static void test_libver_macros(void) { - unsigned major = H5_VERS_MAJOR; - unsigned minor = H5_VERS_MINOR; - unsigned release = H5_VERS_RELEASE; + int major = H5_VERS_MAJOR; + int minor = H5_VERS_MINOR; + int release = H5_VERS_RELEASE; /* Output message about test being performed */ MESSAGE(5, ("Testing macros for library version comparison\n")); diff --git a/test/use_common.c b/test/use_common.c index 908cac9..5aa6692 100644 --- a/test/use_common.c +++ b/test/use_common.c @@ -48,6 +48,8 @@ parse_option(int argc, char * const argv[]) { int ret_value=0; int c; + int use_swmr; /* Need an int to detect errors */ + /* command line options: See function usage for a description */ const char *nagg_options = "f:hi:l:n:s:y:z:"; @@ -96,11 +98,13 @@ parse_option(int argc, char * const argv[]) }; break; case 's': /* use swmr file open mode */ - if ((UC_opts.use_swmr = HDatoi(optarg)) < 0) { - fprintf(stderr, "swmr value should be 0(no) or 1(yes)\n"); - usage(progname_g); - Hgoto_error(-1); - }; + use_swmr = HDatoi(optarg); + if (use_swmr != 0 && use_swmr != 1) { + HDfprintf(stderr, "swmr value should be 0(no) or 1(yes)\n"); + usage(progname_g); + Hgoto_error(-1); + } + UC_opts.use_swmr = (hbool_t)use_swmr; break; case 'y': /* Number of planes per chunk */ if ((UC_opts.chunkplanes = HDstrtoul(optarg, NULL, 0)) <= 0) { diff --git a/test/vfd.c b/test/vfd.c index 1932d2c..5d5ebfc 100644 --- a/test/vfd.c +++ b/test/vfd.c @@ -86,6 +86,8 @@ test_sec2(void) hid_t fid = -1; /* file ID */ hid_t fapl_id = -1; /* file access property list ID */ hid_t fapl_id_out = -1; /* from H5Fget_access_plist */ + hid_t driver_id = -1; /* ID for this VFD */ + unsigned long driver_flags = 0; /* VFD feature flags */ char filename[1024]; /* filename */ void *os_file_handle = NULL; /* OS file handle */ hsize_t file_size; /* file size */ @@ -99,6 +101,28 @@ test_sec2(void) TEST_ERROR; h5_fixname(FILENAME[0], fapl_id, filename, sizeof(filename)); + /* Check that the VFD feature flags are correct */ + if ((driver_id = H5Pget_driver(fapl_id)) < 0) + TEST_ERROR + if (H5FDdriver_query(driver_id, &driver_flags) < 0) + TEST_ERROR + if(!(driver_flags & H5FD_FEAT_AGGREGATE_METADATA)) TEST_ERROR + if(!(driver_flags & H5FD_FEAT_ACCUMULATE_METADATA)) TEST_ERROR + if(!(driver_flags & H5FD_FEAT_DATA_SIEVE)) TEST_ERROR + if(!(driver_flags & H5FD_FEAT_AGGREGATE_SMALLDATA)) TEST_ERROR + if(!(driver_flags & H5FD_FEAT_POSIX_COMPAT_HANDLE)) TEST_ERROR + if(!(driver_flags & H5FD_FEAT_SUPPORTS_SWMR_IO)) TEST_ERROR + if(!(driver_flags & H5FD_FEAT_DEFAULT_VFD_COMPATIBLE)) TEST_ERROR + /* Check for extra flags not accounted for above */ + if(driver_flags != (H5FD_FEAT_AGGREGATE_METADATA + | H5FD_FEAT_ACCUMULATE_METADATA + | H5FD_FEAT_DATA_SIEVE + | H5FD_FEAT_AGGREGATE_SMALLDATA + | H5FD_FEAT_POSIX_COMPAT_HANDLE + | H5FD_FEAT_SUPPORTS_SWMR_IO + | H5FD_FEAT_DEFAULT_VFD_COMPATIBLE)) + TEST_ERROR + if((fid = H5Fcreate(filename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl_id)) < 0) TEST_ERROR; @@ -174,6 +198,8 @@ test_core(void) hid_t fid = -1; /* file ID */ hid_t fapl_id = -1; /* file access property list ID */ hid_t fapl_id_out = -1; /* from H5Fget_access_plist */ + hid_t driver_id = -1; /* ID for this VFD */ + unsigned long driver_flags = 0; /* VFD feature flags */ hid_t did = -1; /* dataset ID */ hid_t sid = -1; /* dataspace ID */ char filename[1024]; /* filename */ @@ -208,9 +234,34 @@ test_core(void) if(HDaccess(filename, F_OK) != -1) if(HDremove(filename) < 0) FAIL_PUTS_ERROR("unable to remove backing store file"); + /* Create and close file w/ backing store off */ if(H5Pset_fapl_core(fapl_id, (size_t)CORE_INCREMENT, FALSE) < 0) TEST_ERROR; + + /* Check that the VFD feature flags are correct. + * Note that the H5FDdriver_query() API call does not require a file + * so backing-store related flags will not be returned here. + */ + if ((driver_id = H5Pget_driver(fapl_id)) < 0) + TEST_ERROR + if (H5FDdriver_query(driver_id, &driver_flags) < 0) + TEST_ERROR + if(!(driver_flags & H5FD_FEAT_AGGREGATE_METADATA)) TEST_ERROR + if(!(driver_flags & H5FD_FEAT_ACCUMULATE_METADATA)) TEST_ERROR + if(!(driver_flags & H5FD_FEAT_DATA_SIEVE)) TEST_ERROR + if(!(driver_flags & H5FD_FEAT_AGGREGATE_SMALLDATA)) TEST_ERROR + if(!(driver_flags & H5FD_FEAT_ALLOW_FILE_IMAGE)) TEST_ERROR + if(!(driver_flags & H5FD_FEAT_CAN_USE_FILE_IMAGE_CALLBACKS)) TEST_ERROR + /* Check for extra flags not accounted for above */ + if(driver_flags != (H5FD_FEAT_AGGREGATE_METADATA + | H5FD_FEAT_ACCUMULATE_METADATA + | H5FD_FEAT_DATA_SIEVE + | H5FD_FEAT_AGGREGATE_SMALLDATA + | H5FD_FEAT_ALLOW_FILE_IMAGE + | H5FD_FEAT_CAN_USE_FILE_IMAGE_CALLBACKS)) + TEST_ERROR + if((fid = H5Fcreate(filename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl_id)) < 0) TEST_ERROR; if(H5Fclose(fid) < 0) @@ -219,7 +270,6 @@ test_core(void) if(HDaccess(filename, F_OK) != -1) FAIL_PUTS_ERROR("file created when backing store set to FALSE"); - /************************************************************************ * Check basic core VFD operation and properties. This is done with the * backing store on so a file will be created for later use. @@ -795,6 +845,8 @@ test_family(void) { hid_t file=-1, fapl=-1, fapl2=-1, space=-1, dset=-1; hid_t access_fapl = -1; + hid_t driver_id = -1; /* ID for this VFD */ + unsigned long driver_flags = 0; /* VFD feature flags */ char filename[1024]; char dname[]="dataset"; unsigned int i, j; @@ -812,6 +864,22 @@ test_family(void) TEST_ERROR; h5_fixname(FILENAME[2], fapl, filename, sizeof(filename)); + /* Check that the VFD feature flags are correct */ + if ((driver_id = H5Pget_driver(fapl)) < 0) + TEST_ERROR + if (H5FDdriver_query(driver_id, &driver_flags) < 0) + TEST_ERROR + if(!(driver_flags & H5FD_FEAT_AGGREGATE_METADATA)) TEST_ERROR + if(!(driver_flags & H5FD_FEAT_ACCUMULATE_METADATA)) TEST_ERROR + if(!(driver_flags & H5FD_FEAT_DATA_SIEVE)) TEST_ERROR + if(!(driver_flags & H5FD_FEAT_AGGREGATE_SMALLDATA)) TEST_ERROR + /* Check for extra flags not accounted for above */ + if(driver_flags != (H5FD_FEAT_AGGREGATE_METADATA + | H5FD_FEAT_ACCUMULATE_METADATA + | H5FD_FEAT_DATA_SIEVE + | H5FD_FEAT_AGGREGATE_SMALLDATA)) + TEST_ERROR + if((file=H5Fcreate(filename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0) TEST_ERROR; @@ -1096,6 +1164,8 @@ test_multi(void) hid_t file=-1, fapl=-1, fapl2=-1, dset=-1, space=-1; hid_t root=-1, attr=-1, aspace=-1, atype=-1; hid_t access_fapl = -1; + hid_t driver_id = -1; /* ID for this VFD */ + unsigned long driver_flags = 0; /* VFD feature flags */ char filename[1024]; int *fhandle2=NULL, *fhandle=NULL; hsize_t file_size; @@ -1152,6 +1222,22 @@ test_multi(void) TEST_ERROR; h5_fixname(FILENAME[4], fapl, filename, sizeof filename); + /* Check that the VFD feature flags are correct */ + if ((driver_id = H5Pget_driver(fapl)) < 0) + TEST_ERROR + if (H5FDdriver_query(driver_id, &driver_flags) < 0) + TEST_ERROR + if(!(driver_flags & H5FD_FEAT_DATA_SIEVE)) TEST_ERROR + if(!(driver_flags & H5FD_FEAT_AGGREGATE_SMALLDATA)) TEST_ERROR + if(!(driver_flags & H5FD_FEAT_USE_ALLOC_SIZE)) TEST_ERROR + if(!(driver_flags & H5FD_FEAT_PAGED_AGGR)) TEST_ERROR + /* Check for extra flags not accounted for above */ + if(driver_flags != (H5FD_FEAT_DATA_SIEVE + | H5FD_FEAT_AGGREGATE_SMALLDATA + | H5FD_FEAT_USE_ALLOC_SIZE + | H5FD_FEAT_PAGED_AGGR)) + TEST_ERROR + if((file=H5Fcreate(filename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0) TEST_ERROR; @@ -1484,6 +1570,8 @@ test_log(void) hid_t file = -1; hid_t fapl = -1; hid_t access_fapl = -1; + hid_t driver_id = -1; /* ID for this VFD */ + unsigned long driver_flags = 0; /* VFD feature flags */ char filename[1024]; int *fhandle = NULL; hsize_t file_size = 0; @@ -1499,6 +1587,28 @@ test_log(void) TEST_ERROR; h5_fixname(FILENAME[6], fapl, filename, sizeof filename); + /* Check that the VFD feature flags are correct */ + if ((driver_id = H5Pget_driver(fapl)) < 0) + TEST_ERROR + if (H5FDdriver_query(driver_id, &driver_flags) < 0) + TEST_ERROR + if(!(driver_flags & H5FD_FEAT_AGGREGATE_METADATA)) TEST_ERROR + if(!(driver_flags & H5FD_FEAT_ACCUMULATE_METADATA)) TEST_ERROR + if(!(driver_flags & H5FD_FEAT_DATA_SIEVE)) TEST_ERROR + if(!(driver_flags & H5FD_FEAT_AGGREGATE_SMALLDATA)) TEST_ERROR + if(!(driver_flags & H5FD_FEAT_POSIX_COMPAT_HANDLE)) TEST_ERROR + if(!(driver_flags & H5FD_FEAT_SUPPORTS_SWMR_IO)) TEST_ERROR + if(!(driver_flags & H5FD_FEAT_DEFAULT_VFD_COMPATIBLE)) TEST_ERROR + /* Check for extra flags not accounted for above */ + if(driver_flags != (H5FD_FEAT_AGGREGATE_METADATA + | H5FD_FEAT_ACCUMULATE_METADATA + | H5FD_FEAT_DATA_SIEVE + | H5FD_FEAT_AGGREGATE_SMALLDATA + | H5FD_FEAT_POSIX_COMPAT_HANDLE + | H5FD_FEAT_SUPPORTS_SWMR_IO + | H5FD_FEAT_DEFAULT_VFD_COMPATIBLE)) + TEST_ERROR + /* Create the test file */ if((file = H5Fcreate(filename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0) TEST_ERROR; @@ -1571,6 +1681,8 @@ test_stdio(void) hid_t file = -1; hid_t fapl = -1; hid_t access_fapl = -1; + hid_t driver_id = -1; /* ID for this VFD */ + unsigned long driver_flags = 0; /* VFD feature flags */ char filename[1024]; FILE *fhandle = NULL; hsize_t file_size = 0; @@ -1584,6 +1696,24 @@ test_stdio(void) TEST_ERROR; h5_fixname(FILENAME[7], fapl, filename, sizeof filename); + /* Check that the VFD feature flags are correct */ + if ((driver_id = H5Pget_driver(fapl)) < 0) + TEST_ERROR + if (H5FDdriver_query(driver_id, &driver_flags) < 0) + TEST_ERROR + if(!(driver_flags & H5FD_FEAT_AGGREGATE_METADATA)) TEST_ERROR + if(!(driver_flags & H5FD_FEAT_ACCUMULATE_METADATA)) TEST_ERROR + if(!(driver_flags & H5FD_FEAT_DATA_SIEVE)) TEST_ERROR + if(!(driver_flags & H5FD_FEAT_AGGREGATE_SMALLDATA)) TEST_ERROR + if(!(driver_flags & H5FD_FEAT_DEFAULT_VFD_COMPATIBLE)) TEST_ERROR + /* Check for extra flags not accounted for above */ + if(driver_flags != (H5FD_FEAT_AGGREGATE_METADATA + | H5FD_FEAT_ACCUMULATE_METADATA + | H5FD_FEAT_DATA_SIEVE + | H5FD_FEAT_AGGREGATE_SMALLDATA + | H5FD_FEAT_DEFAULT_VFD_COMPATIBLE)) + TEST_ERROR + if((file = H5Fcreate(filename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0) TEST_ERROR; @@ -1658,6 +1788,8 @@ test_windows(void) hid_t file = -1; hid_t fapl = -1; hid_t access_fapl = -1; + hid_t driver_id = -1; /* ID for this VFD */ + unsigned long driver_flags = 0; /* VFD feature flags */ char filename[1024]; int *fhandle = NULL; hsize_t file_size = 0; @@ -1680,6 +1812,28 @@ test_windows(void) TEST_ERROR; h5_fixname(FILENAME[8], fapl, filename, sizeof filename); + /* Check that the VFD feature flags are correct */ + if ((driver_id = H5Pget_driver(fapl)) < 0) + TEST_ERROR + if (H5FDdriver_query(driver_id, &driver_flags) < 0) + TEST_ERROR + if(!(driver_flags & H5FD_FEAT_AGGREGATE_METADATA)) TEST_ERROR + if(!(driver_flags & H5FD_FEAT_ACCUMULATE_METADATA)) TEST_ERROR + if(!(driver_flags & H5FD_FEAT_DATA_SIEVE)) TEST_ERROR + if(!(driver_flags & H5FD_FEAT_AGGREGATE_SMALLDATA)) TEST_ERROR + if(!(driver_flags & H5FD_FEAT_POSIX_COMPAT_HANDLE)) TEST_ERROR + if(!(driver_flags & H5FD_FEAT_SUPPORTS_SWMR_IO)) TEST_ERROR + if(!(driver_flags & H5FD_FEAT_DEFAULT_VFD_COMPATIBLE)) TEST_ERROR + /* Check for extra flags not accounted for above */ + if(driver_flags != (H5FD_FEAT_AGGREGATE_METADATA + | H5FD_FEAT_ACCUMULATE_METADATA + | H5FD_FEAT_DATA_SIEVE + | H5FD_FEAT_AGGREGATE_SMALLDATA + | H5FD_FEAT_POSIX_COMPAT_HANDLE + | H5FD_FEAT_SUPPORTS_SWMR_IO + | H5FD_FEAT_DEFAULT_VFD_COMPATIBLE)) + TEST_ERROR + if((file = H5Fcreate(filename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0) TEST_ERROR; diff --git a/tools/lib/h5diff_array.c b/tools/lib/h5diff_array.c index 499d5eb..0b1a96e 100644 --- a/tools/lib/h5diff_array.c +++ b/tools/lib/h5diff_array.c @@ -140,7 +140,7 @@ typedef struct mcomp_t static hsize_t diff_region(hid_t obj1_id, hid_t obj2_id,hid_t region1_id, hid_t region2_id, diff_opt_t *options); static hbool_t all_zero(const void *_mem, size_t size); static int ull2float(unsigned long long ull_value, float *f_value); -static hsize_t character_compare(char *mem1,char *mem2,hsize_t i,unsigned u,int rank,hsize_t *dims,hsize_t *acc,hsize_t *pos,diff_opt_t *options,const char *obj1,const char *obj2,int *ph); +static hsize_t character_compare(char *mem1,char *mem2,hsize_t i,size_t u,int rank,hsize_t *dims,hsize_t *acc,hsize_t *pos,diff_opt_t *options,const char *obj1,const char *obj2,int *ph); static hsize_t character_compare_opt(unsigned char *mem1,unsigned char *mem2,hsize_t i,int rank,hsize_t *dims,hsize_t *acc,hsize_t *pos,diff_opt_t *options,const char *obj1,const char *obj2,int *ph); static hbool_t equal_float(float value, float expected, diff_opt_t *options); static hbool_t equal_double(double value, double expected, diff_opt_t *options); @@ -149,7 +149,7 @@ static hbool_t equal_ldouble(long double value, long double expected, diff_opt_t #endif static int print_data(diff_opt_t *options); static void print_pos(int *ph,int pp,hsize_t curr_pos,hsize_t *acc,hsize_t *pos,int rank,hsize_t *dims,const char *obj1,const char *obj2 ); -static void print_char_pos(int *ph,int pp,hsize_t curr_pos,unsigned u,hsize_t *acc,hsize_t *pos,int rank,hsize_t *dims,const char *obj1,const char *obj2 ); +static void print_char_pos(int *ph,int pp,hsize_t curr_pos,size_t u,hsize_t *acc,hsize_t *pos,int rank,hsize_t *dims,const char *obj1,const char *obj2 ); static void h5diff_print_char(char ch); static hsize_t diff_datum(void *_mem1, void *_mem2, @@ -575,7 +575,7 @@ static hsize_t diff_datum(void *_mem1, { unsigned char *mem1 = (unsigned char*)_mem1; unsigned char *mem2 = (unsigned char*)_mem2; - unsigned u; + size_t u; hid_t memb_type; size_t type_size; H5T_sign_t type_sign; @@ -2813,7 +2813,7 @@ static hsize_t character_compare(char *mem1, char *mem2, hsize_t i, - unsigned u, + size_t u, int rank, hsize_t *dims, hsize_t *acc, @@ -5906,7 +5906,7 @@ static void print_char_pos( int *ph, /* print header */ int pp, /* print percentage */ hsize_t curr_pos, - unsigned u, + size_t u, hsize_t *acc, hsize_t *pos, int rank, @@ -5944,7 +5944,7 @@ void print_char_pos( int *ph, /* print header */ } else { - parallel_print("%u", (unsigned)u); + parallel_print("%zu", u); } parallel_print("]" ); } diff --git a/tools/lib/h5tools.h b/tools/lib/h5tools.h index 3d38dd0..6383df5 100644 --- a/tools/lib/h5tools.h +++ b/tools/lib/h5tools.h @@ -522,7 +522,7 @@ typedef struct h5tools_context_t { hsize_t acc[H5S_MAX_RANK]; /* accumulator position */ hsize_t pos[H5S_MAX_RANK]; /* matrix position */ hsize_t sm_pos; /* current stripmine element position */ - struct H5LD_memb_t **cmpd_listv; /* h5watch: vector containing info about the list of compound fields to be printed */ + const struct H5LD_memb_t * const *cmpd_listv; /* h5watch: vector containing info about the list of compound fields to be printed */ } h5tools_context_t; typedef struct subset_d { diff --git a/tools/lib/h5tools_str.c b/tools/lib/h5tools_str.c index b7a2c1e..fa15785 100644 --- a/tools/lib/h5tools_str.c +++ b/tools/lib/h5tools_str.c @@ -1000,10 +1000,11 @@ h5tools_str_sprint(h5tools_str_t *str, const h5tool_format_t *info, hid_t contai case H5T_COMPOUND: if(ctx->cmpd_listv) { /* there is */ - int save_indent_level; /* The indentation level */ + unsigned save_indent_level; /* The indentation level */ size_t curr_field; /* Current field to display */ - int i = 0, x = 0; /* Local index variable */ - H5LD_memb_t **listv; /* Vector of information for */ + int i = 0; /* Local index variable */ + unsigned x = 0; /* Local index variable */ + const H5LD_memb_t * const *listv; /* Vector of information for */ listv = ctx->cmpd_listv; ctx->cmpd_listv = NULL; diff --git a/tools/src/h5repack/h5repack_verify.c b/tools/src/h5repack/h5repack_verify.c index 4ff4875..1a0dab7 100644 --- a/tools/src/h5repack/h5repack_verify.c +++ b/tools/src/h5repack/h5repack_verify.c @@ -249,7 +249,7 @@ h5repack_verify(const char *in_fname, const char *out_fname, pack_opt_t *options * the same as the input file's strategy. */ if(options->fs_strategy) { - if(out_strategy != (options->fs_strategy == (-1) ? 0 : options->fs_strategy)) { + if(out_strategy != (options->fs_strategy == (H5F_fspace_strategy_t)-1 ? 0 : options->fs_strategy)) { error_msg("file space strategy not set as unexpected\n"); HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "file space strategy not set as unexpected"); } diff --git a/tools/test/h5copy/h5copygentest.c b/tools/test/h5copy/h5copygentest.c index bda0686..d4d6a08 100644 --- a/tools/test/h5copy/h5copygentest.c +++ b/tools/test/h5copy/h5copygentest.c @@ -336,7 +336,7 @@ static void gent_att_compound_vlstr(hid_t loc_id) { typedef struct { /* Compound structure for the attribute */ int i; - char *v; + const char *v; } s1; hsize_t dim[1] = {1}; /* Dimension size */ hid_t sid = -1; /* Dataspace ID */ diff --git a/tools/test/h5diff/h5diffgentest.c b/tools/test/h5diff/h5diffgentest.c index 708f371..459a37e 100644 --- a/tools/test/h5diff/h5diffgentest.c +++ b/tools/test/h5diff/h5diffgentest.c @@ -3632,8 +3632,8 @@ static int test_comp_vlen_strings(const char *fname1, const char *grp_name, int char *str_vlen_repeat; /* vlen string */ char str_fixlen[FIXLEN_STR_SIZE]; /* fixed len string */ char str_fixlen_repeat[FIXLEN_STR_SIZE]; /* fixed len string */ - char *str_array_vlen[VLEN_STR_ARRY_DIM]; /* vlen string array */ - char *str_vlen_array_again[VLEN_STR_ARRY_DIM]; /* vlen string array */ + const char *str_array_vlen[VLEN_STR_ARRY_DIM]; /* vlen string array */ + const char *str_vlen_array_again[VLEN_STR_ARRY_DIM]; /* vlen string array */ char str_array_fixlen[FIXLEN_STR_ARRY_DIM][FIXLEN_STR_ARRY_SIZE]; /* fixed len string array */ char str_fixlen_array_again[FIXLEN_STR_ARRY_DIM][FIXLEN_STR_ARRY_SIZE]; /* fixed len string array */ } comp1_t; @@ -3645,9 +3645,9 @@ static int test_comp_vlen_strings(const char *fname1, const char *grp_name, int char str_fixlen[FIXLEN_STR_SIZE]; /* fixed len string */ char *str_vlen_repeat; /* vlen string */ char str_fixlen_repeat[FIXLEN_STR_SIZE]; /* fixed len string */ - char *str_array_vlen[VLEN_STR_ARRY_DIM]; /* vlen string array */ + const char *str_array_vlen[VLEN_STR_ARRY_DIM]; /* vlen string array */ char str_array_fixlen[FIXLEN_STR_ARRY_DIM][FIXLEN_STR_ARRY_SIZE]; /* fixed len string array */ - char *str_vlen_array_again[VLEN_STR_ARRY_DIM]; /* vlen string array */ + const char *str_vlen_array_again[VLEN_STR_ARRY_DIM]; /* vlen string array */ char str_fixlen_array_again[FIXLEN_STR_ARRY_DIM][FIXLEN_STR_ARRY_SIZE]; /* fixed len string array */ } comp2_t; @@ -3660,8 +3660,8 @@ static int test_comp_vlen_strings(const char *fname1, const char *grp_name, int char *str_vlen_repeat; /* vlen string */ char str_array_fixlen[FIXLEN_STR_ARRY_DIM][FIXLEN_STR_ARRY_SIZE]; /* fixed len string array */ char str_fixlen_array_again[FIXLEN_STR_ARRY_DIM][FIXLEN_STR_ARRY_SIZE]; /* fixed len string array */ - char *str_array_vlen[VLEN_STR_ARRY_DIM]; /* vlen string array */ - char *str_vlen_array_again[VLEN_STR_ARRY_DIM]; /* vlen string array */ + const char *str_array_vlen[VLEN_STR_ARRY_DIM]; /* vlen string array */ + const char *str_vlen_array_again[VLEN_STR_ARRY_DIM]; /* vlen string array */ } comp3_t; /* compound4 datatype */ @@ -3672,16 +3672,16 @@ static int test_comp_vlen_strings(const char *fname1, const char *grp_name, int char str_fixlen_repeat[FIXLEN_STR_SIZE]; /* fixed len string */ char *str_vlen_repeat; /* vlen string */ char str_array_fixlen[FIXLEN_STR_ARRY_DIM][FIXLEN_STR_ARRY_SIZE]; /* fixed len string array */ - char *str_array_vlen[VLEN_STR_ARRY_DIM]; /* vlen string array */ + const char *str_array_vlen[VLEN_STR_ARRY_DIM]; /* vlen string array */ char str_fixlen_array_again[FIXLEN_STR_ARRY_DIM][FIXLEN_STR_ARRY_SIZE]; /* fixed len string array */ - char *str_vlen_array_again[VLEN_STR_ARRY_DIM]; /* vlen string array */ + const char *str_vlen_array_again[VLEN_STR_ARRY_DIM]; /* vlen string array */ } comp4_t; /* compound5 datatype */ typedef struct comp5_t { - char *str_array_vlen[VLEN_STR_ARRY_DIM]; /* vlen string array */ - char *str_vlen_array_again[VLEN_STR_ARRY_DIM]; /* vlen string array */ + const char *str_array_vlen[VLEN_STR_ARRY_DIM]; /* vlen string array */ + const char *str_vlen_array_again[VLEN_STR_ARRY_DIM]; /* vlen string array */ char str_array_fixlen[FIXLEN_STR_ARRY_DIM][FIXLEN_STR_ARRY_SIZE]; /* fixed len string array */ char str_fixlen_array_again[FIXLEN_STR_ARRY_DIM][FIXLEN_STR_ARRY_SIZE]; /* fixed len string array */ char *str_vlen; /* vlen string */ @@ -3693,9 +3693,9 @@ static int test_comp_vlen_strings(const char *fname1, const char *grp_name, int /* compound6 datatype */ typedef struct comp6_t { - char *str_array_vlen[VLEN_STR_ARRY_DIM]; /* vlen string array */ + const char *str_array_vlen[VLEN_STR_ARRY_DIM]; /* vlen string array */ char str_array_fixlen[FIXLEN_STR_ARRY_DIM][FIXLEN_STR_ARRY_SIZE]; /* fixed len string array */ - char *str_vlen_array_again[VLEN_STR_ARRY_DIM]; /* vlen string array */ + const char *str_vlen_array_again[VLEN_STR_ARRY_DIM]; /* vlen string array */ char str_fixlen_array_again[FIXLEN_STR_ARRY_DIM][FIXLEN_STR_ARRY_SIZE]; /* fixed len string array */ char *str_vlen; /* vlen string */ char str_fixlen[FIXLEN_STR_SIZE]; /* fixed len string */ @@ -3708,8 +3708,8 @@ static int test_comp_vlen_strings(const char *fname1, const char *grp_name, int { char str_array_fixlen[FIXLEN_STR_ARRY_DIM][FIXLEN_STR_ARRY_SIZE]; /* fixed len string array */ char str_fixlen_array_again[FIXLEN_STR_ARRY_DIM][FIXLEN_STR_ARRY_SIZE]; /* fixed len string array */ - char *str_array_vlen[VLEN_STR_ARRY_DIM]; /* vlen string array */ - char *str_vlen_array_again[VLEN_STR_ARRY_DIM]; /* vlen string array */ + const char *str_array_vlen[VLEN_STR_ARRY_DIM]; /* vlen string array */ + const char *str_vlen_array_again[VLEN_STR_ARRY_DIM]; /* vlen string array */ char str_fixlen[FIXLEN_STR_SIZE]; /* fixed len string */ char str_fixlen_repeat[FIXLEN_STR_SIZE]; /* fixed len string */ char *str_vlen; /* vlen string */ @@ -3720,9 +3720,9 @@ static int test_comp_vlen_strings(const char *fname1, const char *grp_name, int typedef struct comp8_t { char str_array_fixlen[FIXLEN_STR_ARRY_DIM][FIXLEN_STR_ARRY_SIZE]; /* fixed len string array */ - char *str_array_vlen[VLEN_STR_ARRY_DIM]; /* vlen string array */ + const char *str_array_vlen[VLEN_STR_ARRY_DIM]; /* vlen string array */ char str_fixlen_array_again[FIXLEN_STR_ARRY_DIM][FIXLEN_STR_ARRY_SIZE]; /* fixed len string array */ - char *str_vlen_array_again[VLEN_STR_ARRY_DIM]; /* vlen string array */ + const char *str_vlen_array_again[VLEN_STR_ARRY_DIM]; /* vlen string array */ char str_fixlen[FIXLEN_STR_SIZE]; /* fixed len string */ char *str_vlen; /* vlen string */ char str_fixlen_repeat[FIXLEN_STR_SIZE]; /* fixed len string */ @@ -3734,8 +3734,8 @@ static int test_comp_vlen_strings(const char *fname1, const char *grp_name, int { char str_array_fixlen[FIXLEN_STR_ARRY_DIM][FIXLEN_STR_ARRY_SIZE]; /* fixed len string array */ char str_fixlen_array_again[FIXLEN_STR_ARRY_DIM][FIXLEN_STR_ARRY_SIZE]; /* fixed len string array */ - char *str_array_vlen[VLEN_STR_ARRY_DIM]; /* vlen string array */ - char *str_vlen_array_again[VLEN_STR_ARRY_DIM]; /* vlen string array */ + const char *str_array_vlen[VLEN_STR_ARRY_DIM]; /* vlen string array */ + const char *str_vlen_array_again[VLEN_STR_ARRY_DIM]; /* vlen string array */ char str_fixlen[FIXLEN_STR_SIZE]; /* fixed len string */ int int_data1; hobj_ref_t objref1; /* reference */ @@ -3768,7 +3768,7 @@ static int test_comp_vlen_strings(const char *fname1, const char *grp_name, int hid_t sid_vlen_str_array=0; /* dataspace ID */ hid_t tid_vlen_str_array_pre=0; /* datatype ID */ hid_t tid_vlen_str_array=0; /* datatype ID */ - char *vlen_str_array_buf[VLEN_STR_ARRY_DIM]= { + const char *vlen_str_array_buf[VLEN_STR_ARRY_DIM]= { "1 - Variable length string Array", "2 - Testing variable length string array in compound type", "3 - Four score and seven\n years ago our forefathers brought forth on this continent a new nation," @@ -5343,7 +5343,6 @@ static hid_t mkstr(int size, H5T_str_t pad) { *-------------------------------------------------------------------------*/ static void test_objs_strings(const char *fname1, const char *fname2) { - herr_t status = SUCCEED; hid_t fid1=0; hid_t fid2=0; hid_t dataset=0; @@ -5398,7 +5397,6 @@ static void test_objs_strings(const char *fname1, const char *fname2) if (fid1 < 0) { fprintf(stderr, "Error: %s> H5Fcreate failed.\n", fname1); - status = FAIL; goto out; } @@ -5407,7 +5405,6 @@ static void test_objs_strings(const char *fname1, const char *fname2) if (fid2 < 0) { fprintf(stderr, "Error: %s> H5Fcreate failed.\n", fname2); - status = FAIL; goto out; } diff --git a/tools/test/h5dump/h5dumpgentest.c b/tools/test/h5dump/h5dumpgentest.c index 169eddb..44c4369 100644 --- a/tools/test/h5dump/h5dumpgentest.c +++ b/tools/test/h5dump/h5dumpgentest.c @@ -3479,7 +3479,7 @@ static void gent_array8(void) unsigned int i; /* Allocate data buffer */ - wdata = HDmalloc(F64_DIM1 * sizeof(int)); + wdata = (int *)HDmalloc(F64_DIM1 * sizeof(int)); HDassert(wdata); /* @@ -10318,7 +10318,6 @@ static void gent_udfilter(void) hid_t dcpl; /* dataset creation property list */ hid_t dsid; /* dataset ID */ hid_t sid; /* dataspace ID */ - hid_t tid; /* datatype ID */ hsize_t dims1[RANK] = {DIM1,DIM2}; hsize_t chunk_dims[RANK] = {CDIM1,CDIM2}; diff --git a/tools/test/h5repack/h5repacktst.c b/tools/test/h5repack/h5repacktst.c index 3b82383..efce43f 100644 --- a/tools/test/h5repack/h5repacktst.c +++ b/tools/test/h5repack/h5repacktst.c @@ -266,7 +266,7 @@ int main (void) fname = H5REPACK_FSPACE_FNAMES[j]; if(h5repack_init(&pack_options, 0, FALSE) < 0) GOERROR; - pack_options.fs_strategy = -1; /* "FSM_AGGR" specified via -S FSM_AGGR */ + pack_options.fs_strategy = (H5F_fspace_strategy_t)-1; /* "FSM_AGGR" specified via -S FSM_AGGR */ pack_options.fs_threshold = -1; /* "0" specified via -T 0 */ if(h5repack(fname, FSPACE_OUT, &pack_options) < 0) GOERROR; -- cgit v0.12 From 0563edffa18320e8d09e13073930390624ab3368 Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Fri, 2 Jun 2017 11:52:55 -0500 Subject: Add toolset option --- config/cmake/HDF518_Examples.cmake.in | 4 ++-- config/cmake/HDF5_Examples.cmake.in | 4 ++-- config/cmake/hdf5-config.cmake.in | 1 + 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/config/cmake/HDF518_Examples.cmake.in b/config/cmake/HDF518_Examples.cmake.in index 4f61563..6af0b09 100644 --- a/config/cmake/HDF518_Examples.cmake.in +++ b/config/cmake/HDF518_Examples.cmake.in @@ -17,8 +17,8 @@ cmake_minimum_required(VERSION 3.2.2 FATAL_ERROR) ############################################################################################################### set(CTEST_CMAKE_GENERATOR "@CMAKE_GENERATOR@") -if() - set(CMAKE_GENERATOR_TOOLSET "@GENERATOR_TOOLSET@" +if("@CMAKE_GENERATOR_TOOLSET@") + set(CMAKE_GENERATOR_TOOLSET "@CMAKE_GENERATOR_TOOLSET@") endif() set(CTEST_DASHBOARD_ROOT ${CTEST_SCRIPT_DIRECTORY}) diff --git a/config/cmake/HDF5_Examples.cmake.in b/config/cmake/HDF5_Examples.cmake.in index 08456ce..d137b37 100644 --- a/config/cmake/HDF5_Examples.cmake.in +++ b/config/cmake/HDF5_Examples.cmake.in @@ -17,8 +17,8 @@ cmake_minimum_required(VERSION 3.2.2 FATAL_ERROR) ############################################################################################################### set(CTEST_CMAKE_GENERATOR "@CMAKE_GENERATOR@") -if() - set(CMAKE_GENERATOR_TOOLSET "@GENERATOR_TOOLSET@" +if("@CMAKE_GENERATOR_TOOLSET@") + set(CMAKE_GENERATOR_TOOLSET "@CMAKE_GENERATOR_TOOLSET@") endif() set(CTEST_DASHBOARD_ROOT ${CTEST_SCRIPT_DIRECTORY}) diff --git a/config/cmake/hdf5-config.cmake.in b/config/cmake/hdf5-config.cmake.in index c54391f..904c083 100644 --- a/config/cmake/hdf5-config.cmake.in +++ b/config/cmake/hdf5-config.cmake.in @@ -44,6 +44,7 @@ set (${HDF5_PACKAGE_NAME}_ENABLE_SZIP_ENCODING @HDF5_ENABLE_SZIP_ENCODING@) set (${HDF5_PACKAGE_NAME}_BUILD_SHARED_LIBS @BUILD_SHARED_LIBS@) set (${HDF5_PACKAGE_NAME}_PACKAGE_EXTLIBS @HDF5_PACKAGE_EXTLIBS@) set (${HDF5_PACKAGE_NAME}_EXPORT_LIBRARIES @HDF5_LIBRARIES_TO_EXPORT@) +set (${HDF5_PACKAGE_NAME}_TOOLSET "@CMAKE_GENERATOR_TOOLSET@") #----------------------------------------------------------------------------- # Dependencies -- cgit v0.12 From 63647cd36336e35cac95c9ed4ab48deadee8ebd0 Mon Sep 17 00:00:00 2001 From: Dana Robinson Date: Wed, 5 Jul 2017 11:35:03 -0700 Subject: Merge of recent develop work to 1.10 branch. Fixes for: * HDFFV-10247 (autotools Fortran long double bug) * HDFFV-10248 (autotools deprecated debug/production tweak) * HDFFV-10250 (-fno-omit-frame-pointer w/ symbols) * Disabled missing parameter warnings in Java constant code * Added H5I_VFL ID checks to tmisc.c * Added 'get a dummy VFD' call to h5test library --- config/gnu-flags | 2 +- configure.ac | 38 +++--- java/src/jni/h5Constants.c | 1 + m4/aclocal_fc.f90 | 2 +- m4/aclocal_fc.m4 | 1 - release_docs/RELEASE.txt | 51 ++++++++- src/H5FD.c | 279 +++++++++------------------------------------ src/H5Ipublic.h | 34 +++--- test/h5test.c | 100 ++++++++++++++++ test/h5test.h | 1 + test/tmisc.c | 69 ++++++++--- 11 files changed, 290 insertions(+), 288 deletions(-) diff --git a/config/gnu-flags b/config/gnu-flags index b4d5e8d..2f2e428 100644 --- a/config/gnu-flags +++ b/config/gnu-flags @@ -142,7 +142,7 @@ case "$cc_vendor-$cc_version" in # Symbols NO_SYMBOLS_CFLAGS="-s" - SYMBOLS_CFLAGS="-g" + SYMBOLS_CFLAGS="-g -fno-omit-frame-pointer" # Profile PROFILE_CFLAGS="-pg" diff --git a/configure.ac b/configure.ac index e941ae7..6ddf294 100644 --- a/configure.ac +++ b/configure.ac @@ -585,11 +585,11 @@ if test "X$HDF_FORTRAN" = "Xyes"; then AC_DEFINE([FORTRAN_HAVE_STORAGE_SIZE], [1], [Define if we have Fortran intrinsic STORAGE_SIZE]) fi - if test "X$HAVE_C_SIZEOF_FORTRAN" = "Xyes"; then + if test "X$HAVE_C_SIZEOF_FORTRAN" = "Xyes"; then AC_DEFINE([FORTRAN_HAVE_C_SIZEOF], [1], [Define if we have Fortran intrinsic C_SIZEOF]) fi - if test "X$HAVE_SIZEOF_FORTRAN" = "Xyes"; then + if test "X$HAVE_SIZEOF_FORTRAN" = "Xyes"; then AC_DEFINE([FORTRAN_HAVE_SIZEOF], [1], [Define if we have Fortran intrinsic SIZEOF]) fi @@ -604,7 +604,7 @@ if test "X$HDF_FORTRAN" = "Xyes"; then ## Is C_LONG_DOUBLE different from C_DOUBLE FORTRAN_C_LONG_DOUBLE_IS_UNIQUE="0" - if test "X$FORTRAN_HAVE_C_LONG_DOUBLE"; then + if test "$FORTRAN_HAVE_C_LONG_DOUBLE" = "1"; then PAC_PROG_FC_C_LONG_DOUBLE_EQ_C_DOUBLE if test "X$C_LONG_DOUBLE_IS_UNIQUE_FORTRAN" = "Xyes"; then FORTRAN_C_LONG_DOUBLE_IS_UNIQUE="1" @@ -1252,10 +1252,11 @@ AC_ARG_WITH([fnord], ]) ## ---------------------------------------------------------------------- -## Is the dmalloc present? It has a header file `dmalloc.h' and a library -## `-ldmalloc' and their locations might be specified with the `--with-dmalloc' -## command-line switch. The value is an include path and/or a library path. -## If the library path is specified then it must be preceded by a comma. +## Is dmalloc (debug malloc library) requested? It has a header file +## `dmalloc.h' and a library `-ldmalloc' and their locations might be +## specified with the `--with-dmalloc' command-line switch. The value +## is an include path and/or a library path. If the library path is +## specified then it must be preceded by a comma. ## AC_SUBST([HAVE_DMALLOC]) @@ -1941,26 +1942,17 @@ AC_DEFINE_UNQUOTED([PRINTF_LL_WIDTH], ["$hdf5_cv_printf_ll"], [Width for printf() for type `long long' or `__int64', use `ll']) ## ---------------------------------------------------------------------- -## Deprecate old ways of determining debug/production build -## These can probably be removed in the future (1.10.1?) +## Remove old ways of determining debug/production build. +## These were used in 1.8.x and earlier. We should probably keep these checks +## around to help people migrate to 1.10.x and newer versions. ## AC_ARG_ENABLE([debug], - [AS_HELP_STRING([--enable-debug], - [DEPRECATED: use --enable-build-mode=debug])], - [DEPRECATED_DEBUG=$enableval]) - -if test "X-$DEPRECATED_DEBUG" != "X-" ; then - AC_MSG_ERROR([--enable-debug is deprecated, use --enable-build-mode=debug instead.]) -fi + [AS_HELP_STRING([--enable-debug], [DEPRECATED: use --enable-build-mode=debug])], + [AC_MSG_ERROR([--enable-debug is deprecated, use --enable-build-mode=debug instead.])]) AC_ARG_ENABLE([production], - [AS_HELP_STRING([--enable-production], - [DEPRECATED: use --enable-build-mode=production])], - [DEPRECATED_PRODUCTION=$enableval]) - -if test "X-$DEPRECATED_PRODUCTION" != "X-" ; then - AC_MSG_ERROR([--enable-production is deprecated, use --enable-build-mode=production instead.]) -fi + [AS_HELP_STRING([--enable-production], [DEPRECATED: use --enable-build-mode=production])], + [AC_MSG_ERROR([--enable-production is deprecated, use --enable-build-mode=production instead.])]) ## ---------------------------------------------------------------------- diff --git a/java/src/jni/h5Constants.c b/java/src/jni/h5Constants.c index d4511e1..f6f8bfa 100644 --- a/java/src/jni/h5Constants.c +++ b/java/src/jni/h5Constants.c @@ -26,6 +26,7 @@ extern "C" { #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wmissing-prototypes" +#pragma GCC diagnostic ignored "-Wunused-parameter" JNIEXPORT jlong JNICALL Java_hdf_hdf5lib_HDF5Constants_H5_1QUARTER_1HADDR_1MAX(JNIEnv *env, jclass cls) { return (hsize_t)HADDR_MAX/4; } diff --git a/m4/aclocal_fc.f90 b/m4/aclocal_fc.f90 index 4c58e4e..664a3c6 100644 --- a/m4/aclocal_fc.f90 +++ b/m4/aclocal_fc.f90 @@ -58,7 +58,7 @@ END PROGRAM PROG_FC_HAVE_F2003_REQUIREMENTS !---- START ----- Check to see C_LONG_DOUBLE is different from C_DOUBLE MODULE type_mod USE ISO_C_BINDING - INTERFACE h5t + INTERFACE h5t MODULE PROCEDURE h5t_c_double MODULE PROCEDURE h5t_c_long_double END INTERFACE diff --git a/m4/aclocal_fc.m4 b/m4/aclocal_fc.m4 index 0bf3cb1..ab45bbc 100644 --- a/m4/aclocal_fc.m4 +++ b/m4/aclocal_fc.m4 @@ -476,4 +476,3 @@ rm -f pac_Cconftest.out ],[]) ]) - diff --git a/release_docs/RELEASE.txt b/release_docs/RELEASE.txt index 695f771..7df405d 100644 --- a/release_docs/RELEASE.txt +++ b/release_docs/RELEASE.txt @@ -55,7 +55,7 @@ New Features Configuration: ------------- - Removed version-specific gcc/gfortran flags for version 4.0 (inclusive) - and earlier + and earlier. The config/gnu-flags file, which is sourced as a part of the configure process, adds version-specific flags for use when building HDF5. Most of @@ -70,12 +70,53 @@ New Features to remove the flags not understood by that version of the compiler. Nothing should change when building with gcc >= 4.1. - Also, as a part of this work, the string 'gfortran40' was changed to - 'gfortran' in the config/gnu-fflags file. - (HDFFV-9937, DER, 2017/05/31) - - + - Corrected FORTRAN_HAVE_C_LONG_DOUBLE processing in the autotools. + + A bug in the autotools Fortran processing code always set the + FORTRAN_HAVE_C_LONG_DOUBLE variable to be true regardless of + whether or not a C long double type was present. + + This would cause compilation failures on platforms where a C + long double type was not available and the Fortran wrappers + were being built. + + (HDFFV-10247, DER, 2017/07/05) + + - The deprecated --enable-production and --enable-debug configure options + failed to emit errors when passed an empty string + (e.g.: --enable-debug=""). + + Due to the way we checked for these options being set, it was possible + to avoid the error message and continue configuration if an empty string + was passed to the option. + + Any use of --enable-production or --enable-debug will now halt the + configuration step and emit a helpful error message + (use --enable-build-mode=debug|production instead). + + (HDFFV-10248, DER, 2017/07/05) + + - FC_BASENAME was set to 'gfortran40' instead 'gfortran' in the autotools + processing on gcc (any platform) and freebsd. + + This was probably a historical artifact and so was changed to + 'gfortran'. We don't use FC_BASENAME in our processing, so this + had no effect on building the library normally. + + (HDFFV-10249, DER, 2017/05/31) + + - -fno-omit-frame-pointer was added when building with debugging symbols + enabled. + + Debugging symbols can be enabled independently of the overall build + mode in both the autotools and CMake. This allows (limited) debugging + of optimized code. Since many debuggers rely on the frame pointer, + we've disabled this optimization when debugging symbols are requested + (e.g.: via building with --enable-symbols). + + (HDFFV-10250, DER, 2017/05/31) Library: -------- diff --git a/src/H5FD.c b/src/H5FD.c index 67cf963..9f62065 100644 --- a/src/H5FD.c +++ b/src/H5FD.c @@ -12,14 +12,11 @@ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* - * Programmer: Robb Matzke - * Monday, July 26, 1999 - * - * Purpose: The Virtual File Layer as described in documentation. - * This is the greatest common denominator for all types of - * storage access whether a file, memory, network, etc. This - * layer usually just dispatches the request to an actual - * file driver layer. + * Purpose: The Virtual File Layer as described in documentation. + * This is the greatest common denominator for all types of + * storage access whether a file, memory, network, etc. This + * layer usually just dispatches the request to an actual + * file driver layer. */ /****************/ @@ -112,9 +109,6 @@ static const H5I_class_t H5I_VFL_CLS[1] = {{ * Return: Success: Non-negative * Failure: Negative * - * Programmer: Robb Matzke - * Monday, July 26, 1999 - * *------------------------------------------------------------------------- */ herr_t @@ -147,9 +141,6 @@ done: * otherwise. * Failure: Never fails. * - * Programmer: Robb Matzke - * Friday, February 19, 1999 - * *------------------------------------------------------------------------- */ int @@ -189,11 +180,6 @@ H5FD_term_package(void) * * Failure: Negative * - * Programmer: Robb Matzke - * Monday, July 26, 1999 - * - * Modifications: - * *------------------------------------------------------------------------- */ static herr_t @@ -221,26 +207,18 @@ done: /*------------------------------------------------------------------------- - * Function: H5FDregister - * - * Purpose: Registers a new file driver as a member of the virtual file - * driver class. Certain fields of the class struct are - * required and that is checked here so it doesn't have to be - * checked every time the field is accessed. - * - * Return: Success: A file driver ID which is good until the - * library is closed or the driver is - * unregistered. + * Function: H5FDregister * - * Failure: A negative value. + * Purpose: Registers a new file driver as a member of the virtual file + * driver class. Certain fields of the class struct are + * required and that is checked here so it doesn't have to be + * checked every time the field is accessed. * - * Programmer: Robb Matzke - * Monday, July 26, 1999 + * Return: Success: A file driver ID which is good until the + * library is closed or the driver is + * unregistered. * - * Modifications: - * Copied guts of function into H5FD_register - * Quincey Koziol - * Friday, January 30, 2004 + * Failure: A negative value. * *------------------------------------------------------------------------- */ @@ -255,18 +233,18 @@ H5FDregister(const H5FD_class_t *cls) /* Check arguments */ if(!cls) - HGOTO_ERROR(H5E_ARGS, H5E_UNINITIALIZED, FAIL, "null class pointer is disallowed") + HGOTO_ERROR(H5E_ARGS, H5E_UNINITIALIZED, FAIL, "null class pointer is disallowed") if(!cls->open || !cls->close) - HGOTO_ERROR(H5E_ARGS, H5E_UNINITIALIZED, FAIL, "`open' and/or `close' methods are not defined") + HGOTO_ERROR(H5E_ARGS, H5E_UNINITIALIZED, FAIL, "`open' and/or `close' methods are not defined") if(!cls->get_eoa || !cls->set_eoa) - HGOTO_ERROR(H5E_ARGS, H5E_UNINITIALIZED, FAIL, "`get_eoa' and/or `set_eoa' methods are not defined") + HGOTO_ERROR(H5E_ARGS, H5E_UNINITIALIZED, FAIL, "`get_eoa' and/or `set_eoa' methods are not defined") if(!cls->get_eof) - HGOTO_ERROR(H5E_ARGS, H5E_UNINITIALIZED, FAIL, "`get_eof' method is not defined") + HGOTO_ERROR(H5E_ARGS, H5E_UNINITIALIZED, FAIL, "`get_eof' method is not defined") if(!cls->read || !cls->write) - HGOTO_ERROR(H5E_ARGS, H5E_UNINITIALIZED, FAIL, "`read' and/or `write' method is not defined") - for (type=H5FD_MEM_DEFAULT; typefl_map[type]fl_map[type]>=H5FD_MEM_NTYPES) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid free-list mapping") + HGOTO_ERROR(H5E_ARGS, H5E_UNINITIALIZED, FAIL, "`read' and/or `write' method is not defined") + for (type = H5FD_MEM_DEFAULT; type < H5FD_MEM_NTYPES; H5_INC_ENUM(H5FD_mem_t,type)) + if(cls->fl_map[type] < H5FD_MEM_NOLIST || cls->fl_map[type] >= H5FD_MEM_NTYPES) + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid free-list mapping") /* Create the new class ID */ if((ret_value=H5FD_register(cls, sizeof(H5FD_class_t), TRUE)) < 0) @@ -278,29 +256,18 @@ done: /*------------------------------------------------------------------------- - * Function: H5FD_register - * - * Purpose: Registers a new file driver as a member of the virtual file - * driver class. Certain fields of the class struct are - * required and that is checked here so it doesn't have to be - * checked every time the field is accessed. - * - * Return: Success: A file driver ID which is good until the - * library is closed or the driver is - * unregistered. + * Function: H5FD_register * - * Failure: A negative value. + * Purpose: Registers a new file driver as a member of the virtual file + * driver class. Certain fields of the class struct are + * required and that is checked here so it doesn't have to be + * checked every time the field is accessed. * - * Programmer: Robb Matzke - * Monday, July 26, 1999 + * Return: Success: A file driver ID which is good until the + * library is closed or the driver is + * unregistered. * - * Modifications: - * Broke into public and internal routines & added 'size' - * parameter to internal routine, which allows us to create - * sub-classes of H5FD_class_t for internal support (see the - * MPI drivers, etc.) - * Quincey Koziol - * January 30, 2004 + * Failure: A negative value. * *------------------------------------------------------------------------- */ @@ -325,7 +292,7 @@ H5FD_register(const void *_cls, size_t size, hbool_t app_ref) /* Copy the class structure so the caller can reuse or free it */ if(NULL == (saved = (H5FD_class_t *)H5MM_malloc(size))) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed for file driver class struct") + HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed for file driver class struct") HDmemcpy(saved, cls, size); /* Create the new class ID */ @@ -342,19 +309,16 @@ done: /*------------------------------------------------------------------------- - * Function: H5FDunregister - * - * Purpose: Removes a driver ID from the library. This in no way affects - * file access property lists which have been defined to use - * this driver or files which are already opened under this - * driver. + * Function: H5FDunregister * - * Return: Success: Non-negative + * Purpose: Removes a driver ID from the library. This in no way affects + * file access property lists which have been defined to use + * this driver or files which are already opened under this + * driver. * - * Failure: Negative + * Return: Success: Non-negative * - * Programmer: Robb Matzke - * Monday, July 26, 1999 + * Failure: Negative * *------------------------------------------------------------------------- */ @@ -394,9 +358,6 @@ done: * * Failure: NULL * - * Programmer: Robb Matzke - * Friday, August 20, 1999 - * *------------------------------------------------------------------------- */ H5FD_class_t * @@ -442,11 +403,6 @@ done: * Failure: 0 if an error occurs or if the driver has no * data to store in the superblock. * - * Programmer: Robb Matzke - * Monday, August 16, 1999 - * - * Modifications: - * *------------------------------------------------------------------------- */ hsize_t @@ -480,11 +436,6 @@ done: * * Failure: Negative * - * Programmer: Robb Matzke - * Monday, August 16, 1999 - * - * Modifications: - * *------------------------------------------------------------------------- */ herr_t @@ -511,9 +462,6 @@ done: * Return: Success: Non-negative * Failure: Negative * - * Programmer: Robb Matzke - * Monday, August 16, 1999 - * *------------------------------------------------------------------------- */ static herr_t @@ -542,9 +490,6 @@ done: * Return: Success: Non-negative * Failure: Negative * - * Programmer: Quincey Koziol - * Friday, July 19, 2013 - * *------------------------------------------------------------------------- */ herr_t @@ -592,9 +537,6 @@ done: * Failure: NULL, including when the file has no * properties. * - * Programmer: Robb Matzke - * Friday, August 13, 1999 - * *------------------------------------------------------------------------- */ void * @@ -622,9 +564,6 @@ done: * Return: Success: non-negative * Failure: negative * - * Programmer: Robb Matzke - * Tuesday, August 3, 1999 - * *------------------------------------------------------------------------- */ herr_t @@ -706,11 +645,6 @@ done: * * Failure: NULL * - * Programmer: Robb Matzke - * Tuesday, July 27, 1999 - * - * Modifications: - * *------------------------------------------------------------------------- */ H5FD_t * @@ -745,16 +679,6 @@ done: * * Failure: NULL * - * Programmer: Robb Matzke - * Wednesday, August 4, 1999 - * - * Modifications: - * - * Raymond Lu - * Tuesday, Oct 23, 2001 - * Changed the file access list to the new generic property - * list. - * *------------------------------------------------------------------------- */ H5FD_t * @@ -861,9 +785,6 @@ done: * Return: Success: Non-negative * Failure: Negative * - * Programmer: Robb Matzke - * Tuesday, July 27, 1999 - * *------------------------------------------------------------------------- */ herr_t @@ -893,9 +814,6 @@ done: * Return: Success: Non-negative * Failure: Negative * - * Programmer: Robb Matzke - * Wednesday, August 4, 1999 - * *------------------------------------------------------------------------- */ herr_t @@ -944,11 +862,6 @@ done: * comparison callback then the file pointers * themselves are compared. * - * Programmer: Robb Matzke - * Tuesday, July 27, 1999 - * - * Modifications: - * *------------------------------------------------------------------------- */ int @@ -975,11 +888,6 @@ done: * * Failure: Must never fail. * - * Programmer: Robb Matzke - * Wednesday, August 4, 1999 - * - * Modifications: - * *------------------------------------------------------------------------- */ int @@ -1025,11 +933,6 @@ done: * * Failure: negative * - * Programmer: Quincey Koziol - * Friday, August 25, 2000 - * - * Modifications: - * *------------------------------------------------------------------------- */ int @@ -1059,9 +962,6 @@ done: * * Failure: negative * - * Programmer: Quincey Koziol - * Friday, August 25, 2000 - * *------------------------------------------------------------------------- */ static int @@ -1118,9 +1018,6 @@ H5FD_query(const H5FD_t *f, unsigned long *flags/*out*/) * * Failure: The undefined address HADDR_UNDEF * - * Programmer: Robb Matzke - * Tuesday, July 27, 1999 - * *------------------------------------------------------------------------- */ haddr_t @@ -1170,11 +1067,6 @@ done: * * Failure: Negative * - * Programmer: Robb Matzke - * Wednesday, July 28, 1999 - * - * Modifications: - * *------------------------------------------------------------------------- */ herr_t @@ -1207,16 +1099,13 @@ done: /*------------------------------------------------------------------------- - * Function: H5FDget_eoa - * - * Purpose: Returns the address of the first byte after the last - * allocated memory in the file. + * Function: H5FDget_eoa * - * Return: Success: First byte after allocated memory. - * Failure: HADDR_UNDEF + * Purpose: Returns the address of the first byte after the last + * allocated memory in the file. * - * Programmer: Robb Matzke - * Friday, July 30, 1999 + * Return: Success: First byte after allocated memory. + * Failure: HADDR_UNDEF * *------------------------------------------------------------------------- */ @@ -1230,13 +1119,13 @@ H5FDget_eoa(H5FD_t *file, H5FD_mem_t type) /* Check args */ if(!file || !file->cls) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, HADDR_UNDEF, "invalid file pointer") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, HADDR_UNDEF, "invalid file pointer") if(type < H5FD_MEM_DEFAULT || type >= H5FD_MEM_NTYPES) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, HADDR_UNDEF, "invalid file type") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, HADDR_UNDEF, "invalid file type") /* The real work */ if(HADDR_UNDEF == (ret_value = H5FD_get_eoa(file, type))) - HGOTO_ERROR(H5E_VFL, H5E_CANTINIT, HADDR_UNDEF, "file get eoa request failed") + HGOTO_ERROR(H5E_VFL, H5E_CANTINIT, HADDR_UNDEF, "file get eoa request failed") /* (Note compensating for base address subtraction in internal routine) */ ret_value += file->base_addr; @@ -1265,9 +1154,6 @@ done: * Return: Success: Non-negative * Failure: Negative, no side effect * - * Programmer: Robb Matzke - * Friday, July 30, 1999 - * *------------------------------------------------------------------------- */ herr_t @@ -1280,16 +1166,16 @@ H5FDset_eoa(H5FD_t *file, H5FD_mem_t type, haddr_t addr) /* Check args */ if(!file || !file->cls) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid file pointer") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid file pointer") if(type < H5FD_MEM_DEFAULT || type >= H5FD_MEM_NTYPES) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid file type") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid file type") if(!H5F_addr_defined(addr) || addr > file->maxaddr) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid end-of-address value") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid end-of-address value") /* The real work */ /* (Note compensating for base address addition in internal routine) */ if(H5FD_set_eoa(file, type, addr - file->base_addr) < 0) - HGOTO_ERROR(H5E_VFL, H5E_CANTINIT, FAIL, "file set eoa request failed") + HGOTO_ERROR(H5E_VFL, H5E_CANTINIT, FAIL, "file set eoa request failed") done: FUNC_LEAVE_API(ret_value) @@ -1315,11 +1201,6 @@ done: * * Failure: HADDR_UNDEF * - * Programmer: Robb Matzke - * Thursday, July 29, 1999 - * - * Modifications: - * *------------------------------------------------------------------------- */ haddr_t @@ -1332,11 +1213,11 @@ H5FDget_eof(H5FD_t *file, H5FD_mem_t type) /* Check arguments */ if(!file || !file->cls) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, HADDR_UNDEF, "invalid file pointer") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, HADDR_UNDEF, "invalid file pointer") /* The real work */ if(HADDR_UNDEF == (ret_value = H5FD_get_eof(file, type))) - HGOTO_ERROR(H5E_VFL, H5E_CANTINIT, HADDR_UNDEF, "file get eof request failed") + HGOTO_ERROR(H5E_VFL, H5E_CANTINIT, HADDR_UNDEF, "file get eof request failed") /* (Note compensating for base address subtraction in internal routine) */ ret_value += file->base_addr; @@ -1354,9 +1235,6 @@ done: * Return: Success: The maximum address allowed in the file. * Failure: HADDR_UNDEF * - * Programmer: Quincey Koziol - * Thursday, January 3, 2008 - * *------------------------------------------------------------------------- */ haddr_t @@ -1384,9 +1262,6 @@ done: * Return: Success: Non-negative * Failure: Negative * - * Programmer: Quincey Koziol - * Tuesday, January 8, 2008 - * *------------------------------------------------------------------------- */ herr_t @@ -1412,8 +1287,6 @@ H5FD_get_feature_flags(const H5FD_t *file, unsigned long *feature_flags) * Return: Success: Non-negative * Failure: Negative * - * Programmer: Vailin Choi; Oct 2013 - * *------------------------------------------------------------------------- */ herr_t @@ -1438,9 +1311,6 @@ H5FD_set_feature_flags(H5FD_t *file, unsigned long feature_flags) * Return: Success: Non-negative * Failure: Negative * - * Programmer: Quincey Koziol - * Thursday, January 17, 2008 - * *------------------------------------------------------------------------- */ herr_t @@ -1483,9 +1353,6 @@ done: * * Failure: Negative. The contents of BUF is undefined. * - * Programmer: Robb Matzke - * Thursday, July 29, 1999 - * *------------------------------------------------------------------------- */ herr_t @@ -1548,9 +1415,6 @@ done: * * Failure: Negative * - * Programmer: Robb Matzke - * Thursday, July 29, 1999 - * *------------------------------------------------------------------------- */ herr_t @@ -1613,10 +1477,6 @@ done: * Programmer: Robb Matzke * Thursday, July 29, 1999 * - * Modifications: - * Quincey Koziol, May 20, 2002 - * Added 'closing' parameter - * *------------------------------------------------------------------------- */ herr_t @@ -1653,9 +1513,6 @@ done: * Return: Success: Non-negative * Failure: Negative * - * Programmer: Robb Matzke - * Wednesday, August 4, 1999 - * *------------------------------------------------------------------------- */ herr_t @@ -1683,9 +1540,6 @@ done: * Return: Success: Non-negative * Failure: Negative * - * Programmer: Quincey Koziol - * Thursday, January 31, 2008 - * *------------------------------------------------------------------------- */ herr_t @@ -1722,9 +1576,6 @@ done: * Return: Success: Non-negative * Failure: Negative * - * Programmer: Quincey Koziol - * Thursday, January 31, 2008 - * *------------------------------------------------------------------------- */ herr_t @@ -1752,8 +1603,6 @@ done: * Return: Success: Non-negative * Failure: Negative * - * Programmer: Vailin Choi; March 2015 - * *------------------------------------------------------------------------- */ herr_t @@ -1786,8 +1635,6 @@ done: * Return: Success: Non-negative * Failure: Negative * - * Programmer: Vailin Choi; May 2013 - * *------------------------------------------------------------------------- */ herr_t @@ -1815,8 +1662,6 @@ done: * Return: Success: Non-negative * Failure: Negative * - * Programmer: Vailin Choi; March 2015 - * *------------------------------------------------------------------------- */ herr_t @@ -1848,8 +1693,6 @@ done: * Return: Success: Non-negative * Failure: Negative * - * Programmer: Vailin Choi; May 2013 - * *------------------------------------------------------------------------- */ herr_t @@ -1878,9 +1721,6 @@ done: * * Return: Non-negative on success/Negative on failure * - * Programmer: Quincey Koziol - * March 27, 2002 - * *------------------------------------------------------------------------- */ herr_t @@ -1909,8 +1749,6 @@ H5FD_get_fileno(const H5FD_t *file, unsigned long *filenum) * Programmer: Raymond Lu * Sep. 16, 2002 * - * Modifications: - * *-------------------------------------------------------------------------- */ herr_t @@ -1972,9 +1810,6 @@ done: * * Return: Non-negative if succeed; negative if fails. * - * Programmer: Quincey Koziol - * Jan. 17, 2008 - * *-------------------------------------------------------------------------- */ herr_t @@ -2000,9 +1835,6 @@ H5FD_set_base_addr(H5FD_t *file, haddr_t base_addr) * Return: Success: The absolute base address of the file * Failure: The undefined address (HADDR_UNDEF) * - * Programmer: Quincey Koziol - * Sept. 10, 2009 - * *-------------------------------------------------------------------------- */ haddr_t @@ -2024,8 +1856,6 @@ H5FD_get_base_addr(const H5FD_t *file) * * Return: Non-negative if succeed; negative if fails. * - * Programmer: Vailin Choi; April 2013 - * *-------------------------------------------------------------------------- */ herr_t @@ -2052,9 +1882,6 @@ H5FD_set_paged_aggr(H5FD_t *file, hbool_t paged) * * Return: SUCCEED/FAIL * -* Programmer: Jacob Gruber -* Wednesday, August 17, 2011 -* *------------------------------------------------------------------------- */ herr_t diff --git a/src/H5Ipublic.h b/src/H5Ipublic.h index 896f82f..831874b 100644 --- a/src/H5Ipublic.h +++ b/src/H5Ipublic.h @@ -28,26 +28,26 @@ * 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 in. + * to verify that the H5I{inc|dec|get}_ref() routines work correctly with it. * */ 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, /*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, /* 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 */ diff --git a/test/h5test.c b/test/h5test.c index 2d77dc8..1e1e290 100644 --- a/test/h5test.c +++ b/test/h5test.c @@ -104,6 +104,68 @@ static herr_t h5_errors(hid_t estack, void *client_data); static char * h5_fixname_real(const char *base_name, hid_t fapl, const char *suffix, char *fullname, size_t size, hbool_t nest_printf); + + +/* A non-usable VFD class and its functions. + * + * Usable for testing things like ID handling where we shouldn't mess with the real VFDs. + */ +static H5FD_t *dummy_vfd_open(const char *name, unsigned flags, hid_t fapl_id, haddr_t maxaddr); +static H5FD_t *dummy_vfd_open(const char H5_ATTR_UNUSED *name, unsigned H5_ATTR_UNUSED flags, hid_t H5_ATTR_UNUSED fapl_id, haddr_t H5_ATTR_UNUSED maxaddr) { return NULL; } + +static herr_t dummy_vfd_close(H5FD_t *_file); +static herr_t dummy_vfd_close(H5FD_t H5_ATTR_UNUSED *_file) { return FAIL; } + +static haddr_t dummy_vfd_get_eoa(const H5FD_t *file, H5FD_mem_t type); +static haddr_t dummy_vfd_get_eoa(const H5FD_t H5_ATTR_UNUSED *file, H5FD_mem_t H5_ATTR_UNUSED type) { return HADDR_UNDEF; } + +static herr_t dummy_vfd_set_eoa(H5FD_t *_file, H5FD_mem_t type, haddr_t addr); +static herr_t dummy_vfd_set_eoa(H5FD_t H5_ATTR_UNUSED *_file, H5FD_mem_t H5_ATTR_UNUSED type, haddr_t H5_ATTR_UNUSED addr) { return FAIL; } + +static haddr_t dummy_vfd_get_eof(const H5FD_t *file, H5FD_mem_t type); +static haddr_t dummy_vfd_get_eof(const H5FD_t H5_ATTR_UNUSED *file, H5FD_mem_t H5_ATTR_UNUSED type) { return HADDR_UNDEF; } + +static herr_t dummy_vfd_read(H5FD_t *_file, H5FD_mem_t type, hid_t fapl_id, haddr_t addr, size_t size, void *buf); +static herr_t dummy_vfd_read(H5FD_t H5_ATTR_UNUSED *_file, H5FD_mem_t H5_ATTR_UNUSED type, hid_t H5_ATTR_UNUSED fapl_id, haddr_t H5_ATTR_UNUSED addr, size_t H5_ATTR_UNUSED size, void H5_ATTR_UNUSED *buf) { return FAIL; } + +static herr_t dummy_vfd_write(H5FD_t *_file, H5FD_mem_t type, hid_t fapl_id, haddr_t addr, size_t size, const void *buf); +static herr_t dummy_vfd_write(H5FD_t H5_ATTR_UNUSED *_file, H5FD_mem_t H5_ATTR_UNUSED type, hid_t H5_ATTR_UNUSED fapl_id, haddr_t H5_ATTR_UNUSED addr, size_t H5_ATTR_UNUSED size, const void H5_ATTR_UNUSED *buf) { return FAIL; } + +static H5FD_class_t dummy_vfd_class_g = { + "fake", /* name */ + 1, /* maxaddr */ + H5F_CLOSE_WEAK, /* fc_degree */ + NULL, /* terminate */ + NULL, /* sb_size */ + NULL, /* sb_encode */ + NULL, /* sb_decode */ + 0, /* fapl_size */ + NULL, /* fapl_get */ + NULL, /* fapl_copy */ + NULL, /* fapl_free */ + 0, /* dxpl_size */ + NULL, /* dxpl_copy */ + NULL, /* dxpl_free */ + dummy_vfd_open, /* open */ + dummy_vfd_close, /* close */ + NULL, /* cmp */ + NULL, /* query */ + NULL, /* get_type_map */ + NULL, /* alloc */ + NULL, /* free */ + dummy_vfd_get_eoa, /* get_eoa */ + dummy_vfd_set_eoa, /* set_eoa */ + dummy_vfd_get_eof, /* get_eof */ + NULL, /* get_handle */ + dummy_vfd_read, /* read */ + dummy_vfd_write, /* write */ + NULL, /* flush */ + NULL, /* truncate */ + NULL, /* lock */ + NULL, /* unlock */ + H5FD_FLMAP_DEFAULT /* fl_map */ +}; + /*------------------------------------------------------------------------- * Function: h5_errors @@ -1828,3 +1890,41 @@ error: return FAIL; } /* h5_wait_message() */ +/*------------------------------------------------------------------------- + * Function: h5_get_dummy_vfd_class() + * + * Purpose: Returns a disposable, generally non-functional, + * VFD class struct. + * + * In some of the test code, we need a disposable VFD but + * we don't want to mess with the real VFDs and we also + * don't have access to the internals of the real VFDs (which + * use static globals and functions) to easily duplicate + * them (e.g.: for testing VFD ID handling). + * + * This API call will return a pointer to a VFD class that + * can be used to construct a test VFD using H5FDregister(). + * + * Return: Success: A pointer to a VFD class struct + * Failure: NULL + * + *------------------------------------------------------------------------- + */ +H5FD_class_t * +h5_get_dummy_vfd_class(void) +{ + H5FD_class_t *vfd_class = NULL; + + if(NULL == (vfd_class = (H5FD_class_t *)HDmalloc(sizeof(H5FD_class_t)))) + TEST_ERROR; + + HDmemcpy(vfd_class, &dummy_vfd_class_g, sizeof(H5FD_class_t)); + + return vfd_class; + +error: + if(vfd_class) + HDfree(vfd_class); + return NULL; +} /* h5_get_dummy_vfd_class */ + diff --git a/test/h5test.h b/test/h5test.h index 0e23255..ce5c64d 100644 --- a/test/h5test.h +++ b/test/h5test.h @@ -136,6 +136,7 @@ H5TEST_DLL h5_stat_size_t h5_get_file_size(const char *filename, hid_t fapl); H5TEST_DLL int print_func(const char *format, ...); H5TEST_DLL int h5_make_local_copy(const char *origfilename, const char *local_copy_name); H5TEST_DLL herr_t h5_verify_cached_stabs(const char *base_name[], hid_t fapl); +H5TEST_DLL H5FD_class_t *h5_get_dummy_vfd_class(void); /* Functions that will replace VFD-dependent functions that violate * the single responsibility principle. Unlike their predecessors, diff --git a/test/tmisc.c b/test/tmisc.c index dc69e18..bec80b2 100644 --- a/test/tmisc.c +++ b/test/tmisc.c @@ -29,7 +29,7 @@ #include "hdf5.h" #include "testhdf5.h" #include "H5srcdir.h" -#include "H5Dpkg.h" /* Datasets */ +#include "H5Dpkg.h" /* Datasets */ /* Definitions for misc. test #1 */ #define MISC1_FILE "tmisc1.h5" @@ -2984,19 +2984,21 @@ test_misc18(void) static void test_misc19(void) { - hid_t fid; /* File ID */ - hid_t sid; /* 'Space ID */ - hid_t did; /* Dataset ID */ - hid_t tid; /* 'Type ID */ - hid_t aid; /* Attribute ID */ - hid_t plid; /* Property List ID */ - hid_t pcid; /* Property Class ID */ - hid_t gid; /* Group ID */ - hid_t ecid; /* Error Class ID */ - hid_t emid; /* Error Message ID */ - hid_t esid; /* Error Stack ID */ - int rc; /* Reference count */ - herr_t ret; /* Generic return value */ + hid_t fid = -1; /* File ID */ + hid_t sid = -1; /* Dataspace ID */ + hid_t did = -1; /* Dataset ID */ + hid_t tid = -1; /* Datatype ID */ + hid_t aid = -1; /* Attribute ID */ + hid_t plid = -1; /* Property List ID */ + hid_t pcid = -1; /* Property Class ID */ + hid_t gid = -1; /* Group ID */ + hid_t ecid = -1; /* Error Class ID */ + hid_t emid = -1; /* Error Message ID */ + hid_t esid = -1; /* Error Stack ID */ + hid_t vfdid = -1; /* Virtual File Driver ID */ + H5FD_class_t *vfd_cls = NULL; /* VFD class */ + int rc; /* Reference count */ + herr_t ret; /* Generic return value */ /* Check H5I operations on files */ @@ -3406,6 +3408,45 @@ test_misc19(void) } H5E_END_TRY; VERIFY(ret, FAIL, "H5Eclose_stack"); + +/* Check H5I operations on virtual file drivers */ + + /* Get a VFD class to register */ + vfd_cls = h5_get_dummy_vfd_class(); + CHECK(vfd_cls, NULL, "h5_get_dummy_vfd_class"); + + /* Register a virtual file driver */ + vfdid = H5FDregister(vfd_cls); + CHECK(vfdid, FAIL, "H5FDregister"); + + /* Check the reference count */ + rc = H5Iget_ref(vfdid); + VERIFY(rc, 1, "H5Iget_ref"); + + /* Increment the reference count */ + rc = H5Iinc_ref(vfdid); + VERIFY(rc, 2, "H5Iinc_ref"); + + /* Unregister the VFD normally */ + ret = H5FDunregister(vfdid); + CHECK(ret, FAIL, "H5FDunregister"); + + /* Check the reference count */ + rc = H5Iget_ref(vfdid); + VERIFY(rc, 1, "H5Iget_ref"); + + /* Unregister the VFD by decrementing the reference count */ + rc = H5Idec_ref(vfdid); + VERIFY(rc, 0, "H5Idec_ref"); + + /* Try unregistering the VFD again (should fail) */ + H5E_BEGIN_TRY { + ret = H5FDunregister(vfdid); + } H5E_END_TRY; + VERIFY(ret, FAIL, "H5FDunregister"); + + HDfree(vfd_cls); + } /* end test_misc19() */ /**************************************************************** -- cgit v0.12 From dc048e96f3d57a4804101d17528e40051734c022 Mon Sep 17 00:00:00 2001 From: Dana Robinson Date: Wed, 5 Jul 2017 11:49:20 -0700 Subject: Marked H5I_REFERENCE as deprecated in H5Ipublic.h. --- src/H5Ipublic.h | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/H5Ipublic.h b/src/H5Ipublic.h index 831874b..7bc3c22 100644 --- a/src/H5Ipublic.h +++ b/src/H5Ipublic.h @@ -40,7 +40,12 @@ typedef enum H5I_type_t { H5I_DATASPACE, /* type ID for Dataspace objects */ H5I_DATASET, /* type ID for Dataset objects */ H5I_ATTR, /* type ID for Attribute objects */ - H5I_REFERENCE, /* type ID for Reference objects */ + H5I_REFERENCE, /* type ID for Reference objects + ** DEPRECATED** + H5I_REFERENCE is not used in the library and + will be removed from this enumeration in a + future major release of the library. + */ 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 */ -- cgit v0.12 From 5bf108432ba9b49ee545af3947b7fb2e2b6e8514 Mon Sep 17 00:00:00 2001 From: Dana Robinson Date: Wed, 5 Jul 2017 14:37:11 -0700 Subject: Updated RELEASE.txt --- release_docs/RELEASE.txt | 90 ++++++++++++++++++++++++++++-------------------- 1 file changed, 53 insertions(+), 37 deletions(-) diff --git a/release_docs/RELEASE.txt b/release_docs/RELEASE.txt index 7df405d..a4a74a7 100644 --- a/release_docs/RELEASE.txt +++ b/release_docs/RELEASE.txt @@ -72,41 +72,6 @@ New Features (HDFFV-9937, DER, 2017/05/31) - - Corrected FORTRAN_HAVE_C_LONG_DOUBLE processing in the autotools. - - A bug in the autotools Fortran processing code always set the - FORTRAN_HAVE_C_LONG_DOUBLE variable to be true regardless of - whether or not a C long double type was present. - - This would cause compilation failures on platforms where a C - long double type was not available and the Fortran wrappers - were being built. - - (HDFFV-10247, DER, 2017/07/05) - - - The deprecated --enable-production and --enable-debug configure options - failed to emit errors when passed an empty string - (e.g.: --enable-debug=""). - - Due to the way we checked for these options being set, it was possible - to avoid the error message and continue configuration if an empty string - was passed to the option. - - Any use of --enable-production or --enable-debug will now halt the - configuration step and emit a helpful error message - (use --enable-build-mode=debug|production instead). - - (HDFFV-10248, DER, 2017/07/05) - - - FC_BASENAME was set to 'gfortran40' instead 'gfortran' in the autotools - processing on gcc (any platform) and freebsd. - - This was probably a historical artifact and so was changed to - 'gfortran'. We don't use FC_BASENAME in our processing, so this - had no effect on building the library normally. - - (HDFFV-10249, DER, 2017/05/31) - - -fno-omit-frame-pointer was added when building with debugging symbols enabled. @@ -116,7 +81,7 @@ New Features we've disabled this optimization when debugging symbols are requested (e.g.: via building with --enable-symbols). - (HDFFV-10250, DER, 2017/05/31) + (HDFFV-10226, DER, 2017/05/31) Library: -------- @@ -143,6 +108,17 @@ New Features (HDFFV-10214, DER, 2017/05/31) + - The H5I_REFERENCE value in the H5I_type_t enum (defined in H5Ipublic.h) + has been marked as deprectated. + + This ID type value is not used in the C library. i.e.: There are no + hid_t values that are of ID type H5I_REFERENCE. + + This enum value will be removed in a future major version of the library. + The code will remain unchanged in the HDF5 1.10.x branches. + + (HDFFV-10252, DER, 2017/04/05) + Parallel Library: ----------------- - @@ -155,6 +131,21 @@ New Features ------------ - + Java Library: + ------------- + + - The H5I_REFERENCE value in the H5I_type_t enum (defined in H5Ipublic.h) + has been marked as deprectated. + + JNI code which refers to this value will be removed in a future + major version of the library. The code will remain unchanged in the + 1.10.x branches. + + See the C library section, above, for further information. + + (HDFFV-10252, DER, 2017/04/05) + + Tools: ------ - @@ -188,7 +179,32 @@ Bug Fixes since HDF5-1.10.0-patch1 release Configuration ------------- - - + - Corrected FORTRAN_HAVE_C_LONG_DOUBLE processing in the autotools. + + A bug in the autotools Fortran processing code always set the + FORTRAN_HAVE_C_LONG_DOUBLE variable to be true regardless of + whether or not a C long double type was present. + + This would cause compilation failures on platforms where a C + long double type was not available and the Fortran wrappers + were being built. + + (HDFFV-10247, DER, 2017/07/05) + + - The deprecated --enable-production and --enable-debug configure options + failed to emit errors when passed an empty string + (e.g.: --enable-debug=""). + + Due to the way we checked for these options being set, it was possible + to avoid the error message and continue configuration if an empty string + was passed to the option. + + Any use of --enable-production or --enable-debug will now halt the + configuration step and emit a helpful error message + (use --enable-build-mode=debug|production instead). + + (HDFFV-10248, DER, 2017/07/05) + Performance ------------- -- cgit v0.12 From d4896f7c30650ebe1a7ce5b5f742491a7b78e677 Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Mon, 19 Jun 2017 09:37:55 -0500 Subject: Synch with CMake master --- config/cmake/CMakeFindJavaCommon.cmake | 27 ++++++++----------------- config/cmake/FindJNI.cmake | 2 -- config/cmake/UseJava.cmake | 36 ++++++++++++++++++++-------------- 3 files changed, 29 insertions(+), 36 deletions(-) diff --git a/config/cmake/CMakeFindJavaCommon.cmake b/config/cmake/CMakeFindJavaCommon.cmake index fe6ee82..eabb622 100644 --- a/config/cmake/CMakeFindJavaCommon.cmake +++ b/config/cmake/CMakeFindJavaCommon.cmake @@ -1,41 +1,30 @@ +# Distributed under the OSI-approved BSD 3-Clause License. See https://cmake.org/licensing for details. -#============================================================================= -# Copyright 2013-2014 Kitware, Inc. -# -# Distributed under the OSI-approved BSD License (the "License"); -# see accompanying file Copyright.txt for details. -# -# This software is distributed WITHOUT ANY WARRANTY; without even the -# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. -# See the License for more information. -#============================================================================= -# (To distribute this file outside of CMake, substitute the full -# License text for the above reference.) # Do not include this module directly from code outside CMake! set(_JAVA_HOME "") if(JAVA_HOME AND IS_DIRECTORY "${JAVA_HOME}") set(_JAVA_HOME "${JAVA_HOME}") set(_JAVA_HOME_EXPLICIT 1) -else () +else() set(_ENV_JAVA_HOME "") if(DEFINED ENV{JAVA_HOME}) file(TO_CMAKE_PATH "$ENV{JAVA_HOME}" _ENV_JAVA_HOME) - endif () + endif() if(_ENV_JAVA_HOME AND IS_DIRECTORY "${_ENV_JAVA_HOME}") set(_JAVA_HOME "${_ENV_JAVA_HOME}") set(_JAVA_HOME_EXPLICIT 1) - else () + else() set(_CMD_JAVA_HOME "") if(APPLE AND EXISTS /usr/libexec/java_home) execute_process(COMMAND /usr/libexec/java_home OUTPUT_VARIABLE _CMD_JAVA_HOME OUTPUT_STRIP_TRAILING_WHITESPACE) - endif () + endif() if(_CMD_JAVA_HOME AND IS_DIRECTORY "${_CMD_JAVA_HOME}") set(_JAVA_HOME "${_CMD_JAVA_HOME}") set(_JAVA_HOME_EXPLICIT 0) - endif () + endif() unset(_CMD_JAVA_HOME) - endif () + endif() unset(_ENV_JAVA_HOME) -endif () +endif() diff --git a/config/cmake/FindJNI.cmake b/config/cmake/FindJNI.cmake index c82d308..1e6daf6 100644 --- a/config/cmake/FindJNI.cmake +++ b/config/cmake/FindJNI.cmake @@ -345,5 +345,3 @@ set(JNI_INCLUDE_DIRS ${JAVA_AWT_INCLUDE_PATH} ) -message ("JNI_LIBRARIES=${JNI_LIBRARIES}") -message ("JNI_INCLUDE_DIRS=${JNI_INCLUDE_DIRS}") diff --git a/config/cmake/UseJava.cmake b/config/cmake/UseJava.cmake index 3e74d4f..9b3bf02 100644 --- a/config/cmake/UseJava.cmake +++ b/config/cmake/UseJava.cmake @@ -243,21 +243,23 @@ # # :: # -# install_jar_exports(TARGETS jar1 [jar2 ...] -# FILE export_filename -# DESTINATION destination [COMPONENT component]) +# install_jar_exports(TARGETS jars... +# [NAMESPACE ] +# FILE +# DESTINATION [COMPONENT ]) # -# This command installs a target export file export_filename for the named jar -# targets to the given DESTINATION. Its function is similar to that of -# install(EXPORTS). +# This command installs a target export file ```` for the named jar +# targets to the given ``DESTINATION``. Its function is similar to that of +# :command:`install(EXPORTS ...)`. # # :: # -# export_jars(TARGETS jar1 [jar2 ...] -# FILE export_filename) +# export_jars(TARGETS jars... +# [NAMESPACE ] +# FILE ) # -# This command writes a target export file export_filename for the named jar -# targets. Its function is similar to that of export(). +# This command writes a target export file ```` for the named jar +# targets. Its function is similar to that of :command:`export(...)`. # # :: # @@ -425,10 +427,12 @@ endfunction() function(__java_export_jar VAR TARGET PATH) get_target_property(_jarpath ${TARGET} JAR_FILE) get_filename_component(_jarname ${_jarpath} NAME) + set(_target "${_jar_NAMESPACE}${TARGET}") __java_lcat(${VAR} - "# Create imported target ${TARGET}" - "add_custom_target(${TARGET})" - "set_target_properties(${TARGET} PROPERTIES" + "# Create imported target ${_target}" + "add_library(${_target} IMPORTED STATIC)" + "set_target_properties(${_target} PROPERTIES" + " IMPORTED_LOCATION \"${PATH}/${_jarname}\"" " JAR_FILE \"${PATH}/${_jarname}\")" "" ) @@ -1402,7 +1406,7 @@ function(export_jars) # Parse and validate arguments cmake_parse_arguments(_export_jars "" - "FILE" + "FILE;NAMESPACE" "TARGETS" ${ARGN} ) @@ -1412,6 +1416,7 @@ function(export_jars) if (NOT _export_jars_TARGETS) message(SEND_ERROR "export_jars: TARGETS must be specified.") endif() + set(_jar_NAMESPACE "${_export_jars_NAMESPACE}") # Set content of generated exports file string(REPLACE ";" " " __targets__ "${_export_jars_TARGETS}") @@ -1434,7 +1439,7 @@ function(install_jar_exports) # Parse and validate arguments cmake_parse_arguments(_install_jar_exports "" - "FILE;DESTINATION;COMPONENT" + "FILE;DESTINATION;COMPONENT;NAMESPACE" "TARGETS" ${ARGN} ) @@ -1447,6 +1452,7 @@ function(install_jar_exports) if (NOT _install_jar_exports_TARGETS) message(SEND_ERROR "install_jar_exports: TARGETS must be specified.") endif() + set(_jar_NAMESPACE "${_install_jar_exports_NAMESPACE}") if (_install_jar_exports_COMPONENT) set (_COMPONENT COMPONENT ${_install_jar_exports_COMPONENT}) -- cgit v0.12 From 82bf61e397034dab6888109d958766edd6a62868 Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Mon, 26 Jun 2017 09:31:16 -0500 Subject: Correct name of VAR --- config/cmake/HDF5_Examples.cmake.in | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/config/cmake/HDF5_Examples.cmake.in b/config/cmake/HDF5_Examples.cmake.in index d137b37..bede701 100644 --- a/config/cmake/HDF5_Examples.cmake.in +++ b/config/cmake/HDF5_Examples.cmake.in @@ -66,7 +66,7 @@ endif() if(NOT DEFINED CTEST_BUILD_NAME) set(CTEST_BUILD_NAME "examples") endif() -set(BUILD_OPTIONS "${BUILD_OPTIONS} -DSITE:STRING=${CTEST_SITE} -DBUILDNAME:STRING=${CTEST_BUILD_NAME}") +set(ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DSITE:STRING=${CTEST_SITE} -DBUILDNAME:STRING=${CTEST_BUILD_NAME}") #TAR_SOURCE - name of tarfile #if(NOT DEFINED TAR_SOURCE) @@ -88,9 +88,9 @@ else() set(CTEST_BINARY_DIRECTORY "${CTEST_DASHBOARD_ROOT}/${CTEST_BINARY_NAME}") endif() if(${CDASH_LOCAL}) - set(BUILD_OPTIONS "${BUILD_OPTIONS} -DCDASH_LOCAL:BOOL=ON") + set(ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DCDASH_LOCAL:BOOL=ON") endif() -set(BUILD_OPTIONS "${BUILD_OPTIONS} -DHDF5_PACKAGE_NAME:STRING=@HDF5_PACKAGE@@HDF_PACKAGE_EXT@") +set(ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF5_PACKAGE_NAME:STRING=@HDF5_PACKAGE@@HDF_PACKAGE_EXT@") ############################################################################################################### # For any comments please contact cdashhelp@hdfgroup.org -- cgit v0.12 From 00c5a9fc4f9cc7ecc90b43db3c152467e296f811 Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Wed, 12 Jul 2017 14:18:01 -0500 Subject: HDFF-10254 - Copy test files with macro to avoid POST_BUILD failure --- hl/tools/h5watch/CMakeTests.cmake | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/hl/tools/h5watch/CMakeTests.cmake b/hl/tools/h5watch/CMakeTests.cmake index 35e7829..0b7b4d4 100644 --- a/hl/tools/h5watch/CMakeTests.cmake +++ b/hl/tools/h5watch/CMakeTests.cmake @@ -56,18 +56,11 @@ set (H5WATCH_TEST_FILES # make test dir file (MAKE_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles") -add_custom_target(h5watch-files ALL COMMENT "Copying files needed by h5watch tests") foreach (h5watch_file ${H5WATCH_TEST_FILES}) - set (dest "${PROJECT_BINARY_DIR}/testfiles/${h5watch_file}") - #message (STATUS " Copying ${h5watch_file}") - add_custom_command ( - TARGET h5watch-files - POST_BUILD - COMMAND ${CMAKE_COMMAND} - ARGS -E copy_if_different ${HDF5_HL_TOOLS_DIR}/testfiles/${h5watch_file} ${dest} - ) + HDFTEST_COPY_FILE("${HDF5_HL_TOOLS_DIR}/testfiles/${h5watch_file}" "${PROJECT_BINARY_DIR}/testfiles/${h5watch_file}" "H5WATCH_files") endforeach () +add_custom_target(H5WATCH_files ALL COMMENT "Copying files needed by H5WATCH tests" DEPENDS ${H5WATCH_files_list}) ############################################################################## ############################################################################## -- cgit v0.12 From 4c34ec0668595edcdb5cf5b5e8bd500d130b7575 Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Wed, 12 Jul 2017 14:27:24 -0500 Subject: HDFFV-10254 release note for change to use macro for copy files --- release_docs/RELEASE.txt | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/release_docs/RELEASE.txt b/release_docs/RELEASE.txt index a4a74a7..45b8fe2 100644 --- a/release_docs/RELEASE.txt +++ b/release_docs/RELEASE.txt @@ -63,8 +63,8 @@ New Features Flags for older versions of the compiler were consolidated into the common flags section. Moving these flags simplifies maintenance of - the file. - + the file. + The upshot of this is that building with ancient versions of gcc (<= 4.0) will possibly no longer work without hand-hacking the file to remove the flags not understood by that version of the compiler. @@ -205,6 +205,15 @@ Bug Fixes since HDF5-1.10.0-patch1 release (HDFFV-10248, DER, 2017/07/05) + - cmake + + To many commands for POST_BUILD step caused command line to be + too big on windows. + + Changed foreach of copy command to use a custom command with the + use of the HDFTEST_COPY_FILE macro. + + (ADB - 2017/07/12, HDFFV-10254) Performance ------------- -- cgit v0.12 From 863c9b2ea557838006bfb320a3cef56e3e34be3d Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Thu, 13 Jul 2017 14:19:31 -0500 Subject: HDFFV-10254 fix spelling --- release_docs/RELEASE.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/release_docs/RELEASE.txt b/release_docs/RELEASE.txt index 45b8fe2..42cf488 100644 --- a/release_docs/RELEASE.txt +++ b/release_docs/RELEASE.txt @@ -207,7 +207,7 @@ Bug Fixes since HDF5-1.10.0-patch1 release - cmake - To many commands for POST_BUILD step caused command line to be + Too many commands for POST_BUILD step caused command line to be too big on windows. Changed foreach of copy command to use a custom command with the -- cgit v0.12 From 201af70c24ccdd84e8fba376dab9b2024bf21dc4 Mon Sep 17 00:00:00 2001 From: Vailin Choi Date: Sat, 10 Jun 2017 19:40:19 -0500 Subject: Fix for HDFFV-7853 H5Ocopy doesn't work with open identifiers Changes made so that raw data for dataset objects are copied from cached info when possible instead of flushing objects to file and read them back in again. --- src/H5Dchunk.c | 147 ++++++++++---- src/H5Dcompact.c | 8 +- src/H5Dcontig.c | 55 ++++-- src/H5Ocopy.c | 32 +-- src/H5Oprivate.h | 1 + test/objcopy.c | 592 ++++++++++++++++++++++++++++++++++++++++++++----------- 6 files changed, 630 insertions(+), 205 deletions(-) diff --git a/src/H5Dchunk.c b/src/H5Dchunk.c index 33fc036..d693466 100644 --- a/src/H5Dchunk.c +++ b/src/H5Dchunk.c @@ -188,6 +188,10 @@ typedef struct H5D_chunk_it_ud3_t { /* needed for copy object pointed by refs */ H5O_copy_t *cpy_info; /* Copy options */ + + /* needed for getting raw data from chunk cache */ + hbool_t chunk_in_cache; + uint8_t *chunk; /* the unfiltered chunk data */ } H5D_chunk_it_ud3_t; /* Callback info for iteration to dump index */ @@ -2280,8 +2284,8 @@ H5D__chunk_read(H5D_io_info_t *io_info, const H5D_type_info_t *type_info, void *chunk = NULL; /* Pointer to locked chunk buffer */ htri_t cacheable; /* Whether the chunk is cacheable */ - /* Set chunk's [scaled] coordinates */ - io_info->store->chunk.scaled = chunk_info->scaled; + /* Set chunk's [scaled] coordinates */ + io_info->store->chunk.scaled = chunk_info->scaled; /* Determine if we should use the chunk cache */ if((cacheable = H5D__chunk_cacheable(io_info, udata.chunk_block.offset, FALSE)) < 0) @@ -2796,7 +2800,7 @@ H5D__chunk_cinfo_cache_found(const H5D_chunk_cached_t *last, H5D_chunk_ud_t *uda /* Retrieve the information from the cache */ udata->chunk_block.offset = last->addr; udata->chunk_block.length = last->nbytes; - udata->chunk_idx = last->chunk_idx; + udata->chunk_idx = last->chunk_idx; udata->filter_mask = last->filter_mask; /* Indicate that the data was found */ @@ -3065,19 +3069,19 @@ H5D__chunk_flush_entry(const H5D_t *dset, hid_t dxpl_id, const H5D_dxpl_cache_t buf = ent->chunk; if(ent->dirty) { - H5D_chk_idx_info_t idx_info; /* Chunked index info */ + H5D_chk_idx_info_t idx_info; /* Chunked index info */ H5D_chunk_ud_t udata; /* pass through B-tree */ hbool_t must_alloc = FALSE; /* Whether the chunk must be allocated */ - hbool_t need_insert = FALSE; /* Whether the chunk needs to be inserted into the index */ + hbool_t need_insert = FALSE; /* Whether the chunk needs to be inserted into the index */ /* Set up user data for index callbacks */ udata.common.layout = &dset->shared->layout.u.chunk; udata.common.storage = &dset->shared->layout.storage.u.chunk; - udata.common.scaled = ent->scaled; + udata.common.scaled = ent->scaled; udata.chunk_block.offset = ent->chunk_block.offset; udata.chunk_block.length = dset->shared->layout.u.chunk.size; udata.filter_mask = 0; - udata.chunk_idx = ent->chunk_idx; + udata.chunk_idx = ent->chunk_idx; /* Should the chunk be filtered before writing it to disk? */ if(dset->shared->dcpl_cache.pline.nused @@ -3155,8 +3159,8 @@ H5D__chunk_flush_entry(const H5D_t *dset, hid_t dxpl_id, const H5D_dxpl_cache_t /* Create the chunk it if it doesn't exist, or reallocate the chunk * if its size changed. */ - if(H5D__chunk_file_alloc(&idx_info, &(ent->chunk_block), &udata.chunk_block, &need_insert, ent->scaled) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTINSERT, FAIL, "unable to insert/resize chunk on chunk level") + if(H5D__chunk_file_alloc(&idx_info, &(ent->chunk_block), &udata.chunk_block, &need_insert, ent->scaled) < 0) + HGOTO_ERROR(H5E_DATASET, H5E_CANTINSERT, FAIL, "unable to insert/resize chunk on chunk level") /* Update the chunk entry's info, in case it was allocated or relocated */ ent->chunk_block.offset = udata.chunk_block.offset; @@ -3170,7 +3174,7 @@ H5D__chunk_flush_entry(const H5D_t *dset, hid_t dxpl_id, const H5D_dxpl_cache_t HGOTO_ERROR(H5E_DATASET, H5E_WRITEERROR, FAIL, "unable to write raw data to file") /* Insert the chunk record into the index */ - if(need_insert && dset->shared->layout.storage.u.chunk.ops->insert) + if(need_insert && dset->shared->layout.storage.u.chunk.ops->insert) if((dset->shared->layout.storage.u.chunk.ops->insert)(&idx_info, &udata, dset) < 0) HGOTO_ERROR(H5E_DATASET, H5E_CANTINSERT, FAIL, "unable to insert chunk addr into index") @@ -3644,7 +3648,7 @@ H5D__chunk_lock(const H5D_io_info_t *io_info, H5D_chunk_ud_t *udata, if(H5F_block_read(dset->oloc.file, H5FD_MEM_DRAW, chunk_addr, my_chunk_alloc, io_info->raw_dxpl_id, chunk) < 0) HGOTO_ERROR(H5E_IO, H5E_READERROR, NULL, "unable to read raw data chunk") - if(old_pline && old_pline->nused) { + if(old_pline && old_pline->nused) { if(H5Z_pipeline(old_pline, H5Z_FLAG_REVERSE, &(udata->filter_mask), io_info->dxpl_cache->err_detect, @@ -3733,14 +3737,14 @@ H5D__chunk_lock(const H5D_io_info_t *io_info, H5D_chunk_ud_t *udata, if(NULL == (ent = H5FL_CALLOC(H5D_rdcc_ent_t))) HGOTO_ERROR(H5E_DATASET, H5E_CANTALLOC, NULL, "can't allocate raw data chunk entry") - ent->edge_chunk_state = disable_filters ? H5D_RDCC_DISABLE_FILTERS : 0; - if(udata->new_unfilt_chunk) - ent->edge_chunk_state |= H5D_RDCC_NEWLY_DISABLED_FILTERS; + ent->edge_chunk_state = disable_filters ? H5D_RDCC_DISABLE_FILTERS : 0; + if(udata->new_unfilt_chunk) + ent->edge_chunk_state |= H5D_RDCC_NEWLY_DISABLED_FILTERS; /* Initialize the new entry */ ent->chunk_block.offset = chunk_addr; ent->chunk_block.length = chunk_alloc; - ent->chunk_idx = udata->chunk_idx; + ent->chunk_idx = udata->chunk_idx; HDmemcpy(ent->scaled, udata->common.scaled, sizeof(hsize_t) * layout->u.chunk.ndims); H5_CHECKED_ASSIGN(ent->rd_count, uint32_t, chunk_size, size_t); H5_CHECKED_ASSIGN(ent->wr_count, uint32_t, chunk_size, size_t); @@ -3761,8 +3765,8 @@ H5D__chunk_lock(const H5D_io_info_t *io_info, H5D_chunk_ud_t *udata, } /* end if */ else rdcc->head = rdcc->tail = ent; - ent->tmp_next = NULL; - ent->tmp_prev = NULL; + ent->tmp_next = NULL; + ent->tmp_prev = NULL; } /* end if */ else @@ -5658,11 +5662,22 @@ H5D__chunk_copy_cb(const H5D_chunk_rec_t *chunk_rec, void *_udata) H5Z_cb_t cb_struct; /* Filter failure callback struct */ int ret_value = H5_ITER_CONT; /* Return value */ + FUNC_ENTER_STATIC /* Get 'size_t' local value for number of bytes in chunk */ H5_CHECKED_ASSIGN(nbytes, size_t, chunk_rec->nbytes, uint32_t); + /* Check for filtered chunks */ + /* Check for an edge chunk that is not filtered */ + if(pline && pline->nused) { + must_filter = TRUE; + if( (udata->common.layout->flags & H5O_LAYOUT_CHUNK_DONT_FILTER_PARTIAL_BOUND_CHUNKS) && + (H5D__chunk_is_partial_edge_chunk(udata->dset_ndims, udata->common.layout->dim, + chunk_rec->scaled, udata->dset_dims)) ) + must_filter = FALSE; + } + /* Check parameter for type conversion */ if(udata->do_convert) { if(H5T_detect_class(udata->dt_src, H5T_VLEN, FALSE) > 0) @@ -5673,19 +5688,6 @@ H5D__chunk_copy_cb(const H5D_chunk_rec_t *chunk_rec, void *_udata) HGOTO_ERROR(H5E_DATASET, H5E_CANTCOPY, H5_ITER_ERROR, "unable to copy dataset elements") } /* end if */ - /* Check for filtered chunks */ - if((is_vlen || fix_ref) && pline && pline->nused) { - /* Check if we should disable filters on this chunk */ - if(udata->common.layout->flags - & H5O_LAYOUT_CHUNK_DONT_FILTER_PARTIAL_BOUND_CHUNKS) { - /* Check if the chunk is an edge chunk, and disable filters if so */ - if(!H5D__chunk_is_partial_edge_chunk(udata->dset_ndims, udata->common.layout->dim, chunk_rec->scaled, udata->dset_dims)) - must_filter = TRUE; - } /* end if */ - else - must_filter = TRUE; - } /* end if */ - /* Resize the buf if it is too small to hold the data */ if(nbytes > buf_size) { void *new_buf; /* New buffer for data */ @@ -5708,12 +5710,51 @@ H5D__chunk_copy_cb(const H5D_chunk_rec_t *chunk_rec, void *_udata) udata->buf_size = buf_size = nbytes; } /* end if */ - /* read chunk data from the source file */ - if(H5F_block_read(udata->file_src, H5FD_MEM_DRAW, chunk_rec->chunk_addr, nbytes, H5AC_rawdata_dxpl_id, buf) < 0) - HGOTO_ERROR(H5E_IO, H5E_READERROR, H5_ITER_ERROR, "unable to read raw data chunk") + if(udata->chunk_in_cache && udata->chunk) { + HDassert(!H5F_addr_defined(chunk_rec->chunk_addr)); + HDmemcpy(buf, udata->chunk, nbytes); + udata->chunk = NULL; + } else { + H5D_rdcc_ent_t *ent = NULL; /* Cache entry */ + unsigned idx; /* Index of chunk in cache, if present */ + unsigned u; /* Counter */ + H5D_shared_t *shared_fo = udata->cpy_info->shared_fo; + + /* See if the written chunk is in the chunk cache */ + if(shared_fo && shared_fo->cache.chunk.nslots > 0) { + /* Determine the chunk's location in the hash table */ + idx = H5D__chunk_hash_val(shared_fo, chunk_rec->scaled); + + /* Get the chunk cache entry for that location */ + ent = shared_fo->cache.chunk.slot[idx]; + if(ent) { + /* Speculatively set the 'found' flag */ + udata->chunk_in_cache = TRUE; + + /* Verify that the cache entry is the correct chunk */ + for(u = 0; u < shared_fo->ndims; u++) + if(chunk_rec->scaled[u] != ent->scaled[u]) { + udata->chunk_in_cache = FALSE; + break; + } /* end if */ + } /* end if */ + } /* end if */ + + if(udata->chunk_in_cache) { + HDassert(H5F_addr_defined(chunk_rec->chunk_addr)); + HDassert(H5F_addr_defined(ent->chunk_block.offset)); + + H5_CHECKED_ASSIGN(nbytes, size_t, shared_fo->layout.u.chunk.size, uint32_t); + HDmemcpy(buf, ent->chunk, nbytes); + } else { + /* read chunk data from the source file */ + if(H5F_block_read(udata->file_src, H5FD_MEM_DRAW, chunk_rec->chunk_addr, nbytes, H5AC_rawdata_dxpl_id, buf) < 0) + HGOTO_ERROR(H5E_IO, H5E_READERROR, H5_ITER_ERROR, "unable to read raw data chunk") + } + } - /* Need to uncompress variable-length & reference data elements */ - if(must_filter) { + /* Need to uncompress filtered variable-length & reference data elements that are not found in chunk cache */ + if(must_filter && (is_vlen || fix_ref) && !udata->chunk_in_cache) { unsigned filter_mask = chunk_rec->filter_mask; cb_struct.func = NULL; /* no callback function when failed */ @@ -5777,8 +5818,8 @@ H5D__chunk_copy_cb(const H5D_chunk_rec_t *chunk_rec, void *_udata) udata_dst.chunk_block.length = chunk_rec->nbytes; udata_dst.filter_mask = chunk_rec->filter_mask; - /* Need to compress variable-length & reference data elements before writing to file */ - if(must_filter) { + /* Need to compress variable-length or reference data elements or a chunk found in cache before writing to file */ + if(must_filter && (is_vlen || fix_ref || udata->chunk_in_cache) ) { if(H5Z_pipeline(pline, 0, &(udata_dst.filter_mask), H5Z_NO_EDC, cb_struct, &nbytes, &buf_size, &buf) < 0) HGOTO_ERROR(H5E_PLINE, H5E_CANTFILTER, H5_ITER_ERROR, "output pipeline failed") #if H5_SIZEOF_SIZE_T > 4 @@ -5787,12 +5828,14 @@ H5D__chunk_copy_cb(const H5D_chunk_rec_t *chunk_rec, void *_udata) HGOTO_ERROR(H5E_DATASET, H5E_BADRANGE, H5_ITER_ERROR, "chunk too large for 32-bit length") #endif /* H5_SIZEOF_SIZE_T > 4 */ H5_CHECKED_ASSIGN(udata_dst.chunk_block.length, uint32_t, nbytes, size_t); - udata->buf = buf; - udata->buf_size = buf_size; + udata->buf = buf; + udata->buf_size = buf_size; } /* end if */ + udata->chunk_in_cache = FALSE; + udata_dst.chunk_idx = H5VM_array_offset_pre(udata_dst.common.layout->ndims - 1, - udata_dst.common.layout->max_down_chunks, udata_dst.common.scaled); + udata_dst.common.layout->max_down_chunks, udata_dst.common.scaled); /* Allocate chunk in the file */ if(H5D__chunk_file_alloc(udata->idx_info_dst, NULL, &udata_dst.chunk_block, &need_insert, udata_dst.common.scaled) < 0) @@ -6047,11 +6090,35 @@ H5D__chunk_copy(H5F_t *f_src, H5O_storage_chunk_t *storage_src, udata.dset_ndims = (unsigned)sndims; udata.dset_dims = curr_dims; udata.cpy_info = cpy_info; + udata.chunk_in_cache = FALSE; + udata.chunk = NULL; /* Iterate over chunks to copy data */ if((storage_src->ops->iterate)(&idx_info_src, H5D__chunk_copy_cb, &udata) < 0) HGOTO_ERROR(H5E_DATASET, H5E_BADITER, FAIL, "unable to iterate over chunk index to copy data") + /* Iterate over the chunk cache to copy data for chunks with undefined address */ + if(udata.cpy_info->shared_fo) { + H5D_rdcc_ent_t *ent, *next; + H5D_chunk_rec_t chunk_rec; + H5D_shared_t *shared_fo = (H5D_shared_t *)udata.cpy_info->shared_fo; + + chunk_rec.nbytes = layout_src->size; + chunk_rec.filter_mask = 0; + chunk_rec.chunk_addr = HADDR_UNDEF; + + for(ent = shared_fo->cache.chunk.head; ent; ent = next) { + if(!H5F_addr_defined(ent->chunk_block.offset)) { + HDmemcpy(chunk_rec.scaled, ent->scaled, sizeof(chunk_rec.scaled)); + udata.chunk = ent->chunk; + udata.chunk_in_cache = TRUE; + if(H5D__chunk_copy_cb(&chunk_rec, &udata) < 0) + HGOTO_ERROR(H5E_DATASET, H5E_CANTCOPY, FAIL, "unable to copy chunk data in cache") + } + next = ent->next; + } /* end for */ + } + /* I/O buffers may have been re-allocated */ buf = udata.buf; bkg = udata.bkg; diff --git a/src/H5Dcompact.c b/src/H5Dcompact.c index 99a25b6..041d28f 100644 --- a/src/H5Dcompact.c +++ b/src/H5Dcompact.c @@ -420,7 +420,7 @@ H5D__compact_dest(H5D_t *dset, hid_t H5_ATTR_UNUSED dxpl_id) *------------------------------------------------------------------------- */ herr_t -H5D__compact_copy(H5F_t *f_src, H5O_storage_compact_t *storage_src, H5F_t *f_dst, +H5D__compact_copy(H5F_t *f_src, H5O_storage_compact_t *_storage_src, H5F_t *f_dst, H5O_storage_compact_t *storage_dst, H5T_t *dt_src, H5O_copy_t *cpy_info, hid_t dxpl_id) { @@ -431,6 +431,8 @@ H5D__compact_copy(H5F_t *f_src, H5O_storage_compact_t *storage_src, H5F_t *f_dst void *bkg = NULL; /* Temporary buffer for copying data */ void *reclaim_buf = NULL; /* Buffer for reclaiming data */ hid_t buf_sid = -1; /* ID for buffer dataspace */ + H5D_shared_t *shared_fo = cpy_info->shared_fo; /* Pointer to the shared struct for dataset object */ + H5O_storage_compact_t *storage_src = _storage_src; /* Pointer to storage_src */ herr_t ret_value = SUCCEED; /* Return value */ FUNC_ENTER_PACKAGE @@ -443,6 +445,10 @@ H5D__compact_copy(H5F_t *f_src, H5O_storage_compact_t *storage_src, H5F_t *f_dst HDassert(storage_dst->buf); HDassert(dt_src); + /* If the dataset is open in the file, point to "layout" in the shared struct */ + if(shared_fo != NULL) + storage_src = &(shared_fo->layout.storage.u.compact); + /* Create datatype ID for src datatype, so it gets freed */ if((tid_src = H5I_register(H5I_DATATYPE, dt_src, FALSE)) < 0) HGOTO_ERROR(H5E_DATASET, H5E_CANTREGISTER, FAIL, "unable to register source file datatype") diff --git a/src/H5Dcontig.c b/src/H5Dcontig.c index 0ee4d28..86de017 100644 --- a/src/H5Dcontig.c +++ b/src/H5Dcontig.c @@ -31,17 +31,18 @@ /***********/ /* Headers */ /***********/ -#include "H5private.h" /* Generic Functions */ -#include "H5Dpkg.h" /* Dataset functions */ -#include "H5Eprivate.h" /* Error handling */ -#include "H5Fprivate.h" /* Files */ -#include "H5FDprivate.h" /* File drivers */ -#include "H5FLprivate.h" /* Free Lists */ -#include "H5Iprivate.h" /* IDs */ -#include "H5MFprivate.h" /* File memory management */ -#include "H5Oprivate.h" /* Object headers */ -#include "H5Pprivate.h" /* Property lists */ -#include "H5VMprivate.h" /* Vector and array functions */ +#include "H5private.h" /* Generic Functions */ +#include "H5Dpkg.h" /* Dataset functions */ +#include "H5Eprivate.h" /* Error handling */ +#include "H5Fprivate.h" /* Files */ +#include "H5FDprivate.h" /* File drivers */ +#include "H5FLprivate.h" /* Free Lists */ +#include "H5Iprivate.h" /* IDs */ +#include "H5MFprivate.h" /* File memory management */ +#include "H5FOprivate.h" /* File objects */ +#include "H5Oprivate.h" /* Object headers */ +#include "H5Pprivate.h" /* Property lists */ +#include "H5VMprivate.h" /* Vector and array functions */ /****************/ @@ -1362,6 +1363,10 @@ H5D__contig_copy(H5F_t *f_src, const H5O_storage_contig_t *storage_src, hsize_t buf_dim[1] = {0}; /* Dimension for buffer */ hbool_t is_vlen = FALSE; /* Flag to indicate that VL type conversion should occur */ hbool_t fix_ref = FALSE; /* Flag to indicate that ref values should be fixed */ + H5D_shared_t *shared_fo = cpy_info->shared_fo; /* Pointer to the shared struct for dataset object */ + hbool_t try_sieve = FALSE; /* Try to get data from the sieve buffer */ + haddr_t sieve_start = HADDR_UNDEF; /* Start location of sieve buffer */ + haddr_t sieve_end = HADDR_UNDEF; /* End locations of sieve buffer */ herr_t ret_value = SUCCEED; /* Return value */ FUNC_ENTER_PACKAGE @@ -1485,6 +1490,16 @@ H5D__contig_copy(H5F_t *f_src, const H5O_storage_contig_t *storage_src, /* Loop over copying data */ addr_src = storage_src->addr; addr_dst = storage_dst->addr; + + /* If data sieving is enabled and the dataset is open in the file, + set up to copy data out of the sieve buffer if deemed possible later */ + if(H5F_HAS_FEATURE(f_src, H5FD_FEAT_DATA_SIEVE) && + shared_fo && shared_fo->cache.contig.sieve_buf) { + try_sieve = TRUE; + sieve_start = shared_fo->cache.contig.sieve_loc; + sieve_end = sieve_start + shared_fo->cache.contig.sieve_size; + } + while(total_src_nbytes > 0) { /* Check if we should reduce the number of bytes to transfer */ if(total_src_nbytes < src_nbytes) { @@ -1510,14 +1525,20 @@ H5D__contig_copy(H5F_t *f_src, const H5O_storage_contig_t *storage_src, dst_nbytes = mem_nbytes = src_nbytes; } /* end if */ - /* Read raw data from source file - use raw dxpl because passed in one is metadata */ - if(H5F_block_read(f_src, H5FD_MEM_DRAW, addr_src, src_nbytes, H5AC_rawdata_dxpl_id, buf) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_READERROR, FAIL, "unable to read raw data") + /* If the entire copy is within the sieve buffer, copy data from the sieve buffer */ + if(try_sieve && (addr_src >= sieve_start) && ((addr_src + src_nbytes -1) < sieve_end)) { + unsigned char *base_sieve_buf = shared_fo->cache.contig.sieve_buf + (addr_src - sieve_start); + + HDmemcpy(buf, base_sieve_buf, src_nbytes); + } else + /* Read raw data from source file - use raw dxpl because passed in one is metadata */ + if(H5F_block_read(f_src, H5FD_MEM_DRAW, addr_src, src_nbytes, H5AC_rawdata_dxpl_id, buf) < 0) + HGOTO_ERROR(H5E_DATASET, H5E_READERROR, FAIL, "unable to read raw data") /* Perform datatype conversion, if necessary */ if(is_vlen) { /* Convert from source file to memory */ - if(H5T_convert(tpath_src_mem, tid_src, tid_mem, nelmts, (size_t)0, (size_t)0, buf, bkg, dxpl_id) < 0) + if(H5T_convert(tpath_src_mem, tid_src, tid_mem, nelmts, (size_t)0, (size_t)0, buf, bkg, dxpl_id) < 0) HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "datatype conversion failed") /* Copy into another buffer, to reclaim memory later */ @@ -1527,13 +1548,13 @@ H5D__contig_copy(H5F_t *f_src, const H5O_storage_contig_t *storage_src, HDmemset(bkg, 0, buf_size); /* Convert from memory to destination file */ - if(H5T_convert(tpath_mem_dst, tid_mem, tid_dst, nelmts, (size_t)0, (size_t)0, buf, bkg, dxpl_id) < 0) + if(H5T_convert(tpath_mem_dst, tid_mem, tid_dst, nelmts, (size_t)0, (size_t)0, buf, bkg, dxpl_id) < 0) HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "datatype conversion failed") /* Reclaim space from variable length data */ if(H5D_vlen_reclaim(tid_mem, buf_space, dxpl_id, reclaim_buf) < 0) HGOTO_ERROR(H5E_DATASET, H5E_BADITER, FAIL, "unable to reclaim variable-length data") - } /* end if */ + } /* end if */ else if(fix_ref) { /* Check for expanding references */ if(cpy_info->expand_ref) { diff --git a/src/H5Ocopy.c b/src/H5Ocopy.c index 597af63..aa2a9e0 100644 --- a/src/H5Ocopy.c +++ b/src/H5Ocopy.c @@ -347,36 +347,8 @@ H5O_copy_header_real(const H5O_loc_t *oloc_src, H5O_loc_t *oloc_dst /*out*/, if(NULL == (obj_class = H5O_obj_class(oloc_src, dxpl_id))) HGOTO_ERROR(H5E_OHDR, H5E_CANTINIT, FAIL, "unable to determine object type") - /* Check if the object at the address is already open in the file */ - if(H5FO_opened(oloc_src->file, oloc_src->addr) != NULL) { - H5G_loc_t tmp_loc; /* Location of object */ - H5O_loc_t tmp_oloc; /* Location of object */ - H5G_name_t tmp_path; /* Object's path */ - void *obj_ptr = NULL; /* Object pointer */ - hid_t tmp_id = -1; /* Object ID */ - - tmp_loc.oloc = &tmp_oloc; - tmp_loc.path = &tmp_path; - tmp_oloc.file = oloc_src->file; - tmp_oloc.addr = oloc_src->addr; - tmp_oloc.holding_file = FALSE; - H5G_name_reset(tmp_loc.path); - - /* Get a temporary ID */ - if((tmp_id = obj_class->open(&tmp_loc, H5P_DEFAULT, dxpl_id, FALSE)) < 0) - HGOTO_ERROR(H5E_OHDR, H5E_CANTFLUSH, FAIL, "unable to open object") - - /* Get object pointer */ - obj_ptr = H5I_object(tmp_id); - - /* Flush the object */ - if(obj_class->flush && obj_class->flush(obj_ptr, dxpl_id) < 0) - HGOTO_ERROR(H5E_OHDR, H5E_CANTFLUSH, FAIL, "unable to flush object") - - /* Release the temporary ID */ - if(tmp_id != -1 && H5I_dec_app_ref(tmp_id)) - HGOTO_ERROR(H5E_OHDR, H5E_CANTRELEASE, FAIL, "unable to close temporary ID") - } /* end if */ + /* Set the pointer to the shared struct for the object if opened in the file */ + cpy_info->shared_fo = H5FO_opened(oloc_src->file, oloc_src->addr); /* Get source object header */ if(NULL == (oh_src = H5O_protect(oloc_src, dxpl_id, H5AC__READ_ONLY_FLAG, FALSE))) diff --git a/src/H5Oprivate.h b/src/H5Oprivate.h index 0f798b2..563f8fa 100644 --- a/src/H5Oprivate.h +++ b/src/H5Oprivate.h @@ -174,6 +174,7 @@ typedef struct H5O_copy_t { H5SL_t *dst_dt_list; /* Skip list to hold committed datatypes in dest file */ hbool_t dst_dt_list_complete; /* Whether the destination datatype list is complete (i.e. not only populated with "suggestions" from H5Padd_merge_committed_dtype_path) */ H5O_t *oh_dst; /* The destination object header */ + void *shared_fo; /* The shared pointer for the object */ H5O_mcdt_search_cb_t mcdt_cb; /* The callback to invoke before searching the global list of committed datatypes at destination */ void *mcdt_ud; /* User data passed to callback */ } H5O_copy_t; diff --git a/test/objcopy.c b/test/objcopy.c index b7f5673..216d111 100644 --- a/test/objcopy.c +++ b/test/objcopy.c @@ -2200,6 +2200,9 @@ error: * Purpose: Create a simple dataset in SRC file and copy it to DST file * (Note: dataset has no data) * + * Note: The parameter "test_open" is added to test for H5Ocopy when + * the dataset is open in the file (HDFFV-7853). + * * Return: Success: 0 * Failure: number of errors * @@ -2209,7 +2212,7 @@ error: *------------------------------------------------------------------------- */ static int -test_copy_dataset_simple_empty(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t dst_fapl) +test_copy_dataset_simple_empty(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t dst_fapl, hbool_t test_open) { hid_t fid_src = -1, fid_dst = -1; /* File IDs */ hid_t sid = -1; /* Dataspace ID */ @@ -2218,7 +2221,11 @@ test_copy_dataset_simple_empty(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, h char src_filename[NAME_BUF_SIZE]; char dst_filename[NAME_BUF_SIZE]; - TESTING("H5Ocopy(): empty contiguous dataset"); + if(test_open) { + TESTING("H5Ocopy(): empty and openend contiguous dataset"); + } else { + TESTING("H5Ocopy(): empty contiguous dataset"); + } /* Initialize the filenames */ h5_fixname(FILENAME[0], src_fapl, src_filename, sizeof src_filename); @@ -2246,15 +2253,18 @@ test_copy_dataset_simple_empty(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, h /* attach attributes to the dataset */ if(test_copy_attach_attributes(did, H5T_NATIVE_INT) < 0) TEST_ERROR - /* close the dataset */ - if(H5Dclose(did) < 0) TEST_ERROR + if(!test_open) { - /* close the SRC file */ - if(H5Fclose(fid_src) < 0) TEST_ERROR + /* close the dataset */ + if(H5Dclose(did) < 0) TEST_ERROR + /* close the SRC file */ + if(H5Fclose(fid_src) < 0) TEST_ERROR - /* open the source file with read-only */ - if((fid_src = H5Fopen(src_filename, H5F_ACC_RDONLY, src_fapl)) < 0) TEST_ERROR + /* open the source file with read-only */ + if((fid_src = H5Fopen(src_filename, H5F_ACC_RDONLY, src_fapl)) < 0) TEST_ERROR + + } /* create destination file */ if((fid_dst = H5Fcreate(dst_filename, H5F_ACC_TRUNC, fcpl_dst, dst_fapl)) < 0) TEST_ERROR @@ -2265,8 +2275,10 @@ test_copy_dataset_simple_empty(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, h /* copy the dataset from SRC to DST */ if(H5Ocopy(fid_src, NAME_DATASET_SIMPLE, fid_dst, NAME_DATASET_SIMPLE, H5P_DEFAULT, H5P_DEFAULT) < 0) TEST_ERROR - /* open the dataset for copy */ - if((did = H5Dopen2(fid_src, NAME_DATASET_SIMPLE, H5P_DEFAULT)) < 0) TEST_ERROR + if(!test_open) { + /* open the dataset for copy */ + if((did = H5Dopen2(fid_src, NAME_DATASET_SIMPLE, H5P_DEFAULT)) < 0) TEST_ERROR + } /* open the destination dataset */ if((did2 = H5Dopen2(fid_dst, NAME_DATASET_SIMPLE, H5P_DEFAULT)) < 0) TEST_ERROR @@ -3890,6 +3902,9 @@ error: * * Purpose: Create a compressed, chunked dataset in SRC file and copy it to DST file * + * Note: The parameter "test_open" is added to test for H5Ocopy when + * the dataset is open in the file (HDFFV-7853). + * * Return: Success: 0 * Failure: number of errors * @@ -3902,7 +3917,7 @@ error: */ static int test_copy_dataset_no_edge_filt(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, - hid_t dst_fapl) + hid_t dst_fapl, hbool_t test_open) { #ifdef H5_HAVE_FILTER_DEFLATE hid_t fid_src = -1, fid_dst = -1; /* File IDs */ @@ -3917,7 +3932,11 @@ test_copy_dataset_no_edge_filt(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, char dst_filename[NAME_BUF_SIZE]; #endif /* H5_HAVE_FILTER_DEFLATE */ - TESTING("H5Ocopy(): compressed dataset with no edge filters"); + if(test_open) { + TESTING("H5Ocopy(): compressed and opened dataset with no edge filters"); + } else { + TESTING("H5Ocopy(): compressed dataset with no edge filters"); + } #ifndef H5_HAVE_FILTER_DEFLATE SKIPPED(); @@ -3966,15 +3985,19 @@ test_copy_dataset_no_edge_filt(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, /* attach attributes to the dataset */ if(test_copy_attach_attributes(did, H5T_NATIVE_INT) < 0) TEST_ERROR - /* close the dataset */ - if(H5Dclose(did) < 0) TEST_ERROR + if(!test_open) { - /* close the SRC file */ - if(H5Fclose(fid_src) < 0) TEST_ERROR + /* close the dataset */ + if(H5Dclose(did) < 0) TEST_ERROR + /* close the SRC file */ + if(H5Fclose(fid_src) < 0) TEST_ERROR - /* open the source file with read-only */ - if((fid_src = H5Fopen(src_filename, H5F_ACC_RDONLY, src_fapl)) < 0) TEST_ERROR + + /* open the source file with read-only */ + if((fid_src = H5Fopen(src_filename, H5F_ACC_RDONLY, src_fapl)) < 0) TEST_ERROR + + } /* create destination file */ if((fid_dst = H5Fcreate(dst_filename, H5F_ACC_TRUNC, fcpl_dst, dst_fapl)) < 0) TEST_ERROR @@ -3985,8 +4008,10 @@ test_copy_dataset_no_edge_filt(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, /* copy the dataset from SRC to DST */ if(H5Ocopy(fid_src, NAME_DATASET_CHUNKED, fid_dst, NAME_DATASET_CHUNKED, H5P_DEFAULT, H5P_DEFAULT) < 0) TEST_ERROR - /* open the dataset for copy */ - if((did = H5Dopen2(fid_src, NAME_DATASET_CHUNKED, H5P_DEFAULT)) < 0) TEST_ERROR + if(!test_open) { + /* open the dataset for copy */ + if((did = H5Dopen2(fid_src, NAME_DATASET_CHUNKED, H5P_DEFAULT)) < 0) TEST_ERROR + } /* open the destination dataset */ if((did2 = H5Dopen2(fid_dst, NAME_DATASET_CHUNKED, H5P_DEFAULT)) < 0) TEST_ERROR @@ -4034,6 +4059,9 @@ error: * * Purpose: Create a compact dataset in SRC file and copy it to DST file * + * Note: The parameter "test_open" is added to test for H5Ocopy when + * the dataset is open in the file (HDFFV-7853). + * * Return: Success: 0 * Failure: number of errors * @@ -4043,7 +4071,7 @@ error: *------------------------------------------------------------------------- */ static int -test_copy_dataset_compact(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t dst_fapl) +test_copy_dataset_compact(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t dst_fapl, hbool_t test_open) { hid_t fid_src = -1, fid_dst = -1; /* File IDs */ hid_t sid = -1; /* Dataspace ID */ @@ -4055,7 +4083,11 @@ test_copy_dataset_compact(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t char src_filename[NAME_BUF_SIZE]; char dst_filename[NAME_BUF_SIZE]; - TESTING("H5Ocopy(): compact dataset"); + if(test_open) { + TESTING("H5Ocopy(): compact and opened dataset"); + } else { + TESTING("H5Ocopy(): compact dataset"); + } /* set initial data values */ for (i=0; i Date: Mon, 10 Jul 2017 03:22:48 -0500 Subject: Fix for HDFFV-10217 infinite loop in H5VM_power2up(). The function H5VM_power2up() returns the next power of 2 for n. When n exceeds 2^63, it overflows and becomes 0 causing the infinite looping. The fix ensures that the function checks for n >= 2^63 and returns 0. --- src/H5Dchunk.c | 7 +++- src/H5Ddeprec.c | 5 ++- src/H5Dint.c | 14 ++++++-- src/H5VMprivate.h | 6 +++- test/dsets.c | 97 +++++++++++++++++++++++++++++++++++++++++++++++++++++-- 5 files changed, 121 insertions(+), 8 deletions(-) diff --git a/src/H5Dchunk.c b/src/H5Dchunk.c index d693466..b7b8b03 100644 --- a/src/H5Dchunk.c +++ b/src/H5Dchunk.c @@ -1019,11 +1019,16 @@ H5D__chunk_init(H5F_t *f, hid_t dxpl_id, const H5D_t *dset, hid_t dapl_id) unsigned u; /* Local index value */ for(u = 0; u < dset->shared->ndims; u++) { + hsize_t scaled_power2up; /* Scaled value, rounded to next power of 2 */ + /* Initial scaled dimension sizes */ rdcc->scaled_dims[u] = dset->shared->curr_dims[u] / dset->shared->layout.u.chunk.dim[u]; + if( !(scaled_power2up = H5VM_power2up(rdcc->scaled_dims[u])) ) + HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "unable to get the next power of 2") + /* Inital 'power2up' values for scaled dimensions */ - rdcc->scaled_power2up[u] = H5VM_power2up(rdcc->scaled_dims[u]); + rdcc->scaled_power2up[u] = scaled_power2up; /* Number of bits required to encode scaled dimension size */ rdcc->scaled_encode_bits[u] = H5VM_log2_gen(rdcc->scaled_power2up[u]); diff --git a/src/H5Ddeprec.c b/src/H5Ddeprec.c index 8d9461c..0807048 100644 --- a/src/H5Ddeprec.c +++ b/src/H5Ddeprec.c @@ -329,8 +329,11 @@ H5D__extend(H5D_t *dataset, const hsize_t *size, hid_t dxpl_id) dataset->shared->cache.chunk.scaled_dims[u] > dataset->shared->cache.chunk.nslots)) update_chunks = TRUE; + if( !(scaled_power2up = H5VM_power2up(scaled)) ) + HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "unable to get the next power of 2") + /* Check if the number of bits required to encode the scaled size value changed */ - if(dataset->shared->cache.chunk.scaled_power2up[u] != (scaled_power2up = H5VM_power2up(scaled))) { + if(dataset->shared->cache.chunk.scaled_power2up[u] != scaled_power2up) { /* Update the 'power2up' & 'encode_bits' values for the current dimension */ dataset->shared->cache.chunk.scaled_power2up[u] = scaled_power2up; dataset->shared->cache.chunk.scaled_encode_bits[u] = H5VM_log2_gen(scaled_power2up); diff --git a/src/H5Dint.c b/src/H5Dint.c index 08b3eb8..3b938e2 100644 --- a/src/H5Dint.c +++ b/src/H5Dint.c @@ -745,8 +745,13 @@ H5D__cache_dataspace_info(const H5D_t *dset) dset->shared->ndims = (unsigned)sndims; /* Compute the inital 'power2up' values */ - for(u = 0; u < dset->shared->ndims; u++) - dset->shared->curr_power2up[u] = H5VM_power2up(dset->shared->curr_dims[u]); + for(u = 0; u < dset->shared->ndims; u++) { + hsize_t scaled_power2up; /* Scaled value, rounded to next power of 2 */ + + if( !(scaled_power2up = H5VM_power2up(dset->shared->curr_dims[u])) ) + HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "unable to get the next power of 2") + dset->shared->curr_power2up[u] = scaled_power2up; + } done: FUNC_LEAVE_NOAPI(ret_value) @@ -2809,8 +2814,11 @@ H5D__set_extent(H5D_t *dset, const hsize_t *size, hid_t dxpl_id) dset->shared->cache.chunk.scaled_dims[u] > dset->shared->cache.chunk.nslots)) update_chunks = TRUE; + if( !(scaled_power2up = H5VM_power2up(scaled)) ) + HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "unable to get the next power of 2") + /* Check if the number of bits required to encode the scaled size value changed */ - if(dset->shared->cache.chunk.scaled_power2up[u] != (scaled_power2up = H5VM_power2up(scaled))) { + if(dset->shared->cache.chunk.scaled_power2up[u] != scaled_power2up) { /* Update the 'power2up' & 'encode_bits' values for the current dimension */ dset->shared->cache.chunk.scaled_power2up[u] = scaled_power2up; dset->shared->cache.chunk.scaled_encode_bits[u] = H5VM_log2_gen(scaled_power2up); diff --git a/src/H5VMprivate.h b/src/H5VMprivate.h index 4d71b29..decac7e 100644 --- a/src/H5VMprivate.h +++ b/src/H5VMprivate.h @@ -460,7 +460,11 @@ H5VM_power2up(hsize_t n) { hsize_t ret_value = 1; /* Return value */ - while(ret_value < n) + /* Returns 0 when n exceeds 2^63 */ + if(n >= (hsize_t)1 << ((sizeof(hsize_t) * CHAR_BIT) - 1)) + ret_value = 0; + + while(ret_value && ret_value < n) ret_value <<= 1; return(ret_value); diff --git a/test/dsets.c b/test/dsets.c index 12d2e83..fb09892 100644 --- a/test/dsets.c +++ b/test/dsets.c @@ -51,14 +51,15 @@ const char *FILENAME[] = { "copy_dcpl_newfile",/* 13 */ "partial_chunks", /* 14 */ "layout_extend", /* 15 */ - "zero_chunk", /* 16 */ + "zero_chunk", /* 16 */ "chunk_single", /* 17 */ "swmr_non_latest", /* 18 */ "earray_hdr_fd", /* 19 */ "farray_hdr_fd", /* 20 */ "bt2_hdr_fd", /* 21 */ - "storage_size", /* 22 */ + "storage_size", /* 22 */ "dls_01_strings", /* 23 */ + "power2up", /* 24 */ NULL }; #define FILENAME_BUF_SIZE 1024 @@ -11345,6 +11346,97 @@ error: /*------------------------------------------------------------------------- + * Function: test_power2up + * + * Purpose: Tests that the H5VM_power2up(n) function does not result in an + * infinite loop when input n exceeds 2^63. (HDFFV-10217) + * H5VM_power2up() is used to calculate the next power of 2 for + * a dataset's scaled dimension sizes. + * + * Return: Success: 0 + * Failure: -1 + * + * Programmer: Vailin Choi; June 2017 + * + *------------------------------------------------------------------------- + */ +static herr_t +test_power2up(hid_t fapl) +{ + char filename[FILENAME_BUF_SIZE]; + hid_t fid = -1; /* File ID */ + hid_t dcpl = -1; /* Dataset creation property list */ + hid_t sid = -1; /* Dataspace ID */ + hid_t did = -1; /* Dataset ID */ + hsize_t dims[2]; /* Dataset dimension sizes */ + hsize_t max_dims[2]; /* Maximum dimension sizes */ + hsize_t chunk_dims[2]; /* Chunk dimensions */ + hsize_t ext_dims[2]; /* Extended dimension sizes */ + herr_t status; /* Error status */ + + TESTING("the next power of 2"); + + h5_fixname(FILENAME[24], fapl, filename, sizeof filename); + + /* Create file */ + if((fid = H5Fcreate(filename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0) FAIL_STACK_ERROR + + /* Set dims[1] to ((2^63) -1) */ + dims[0] = 0; + dims[1] = ((hsize_t)1 << ((sizeof(hsize_t) * CHAR_BIT) -1)) - 1; + max_dims[0] = max_dims[1] = H5S_UNLIMITED; + sid = H5Screate_simple(2, dims, max_dims); + + /* Create dataset creation property list */ + if((dcpl = H5Pcreate(H5P_DATASET_CREATE)) < 0) + TEST_ERROR + + /* Set chunk size */ + chunk_dims[0] = chunk_dims[1] = 1; + if(H5Pset_chunk(dcpl, 2, chunk_dims) < 0) + TEST_ERROR + + /* Create chunked dataset */ + if((did = H5Dcreate2(fid, "dset", H5T_NATIVE_INT64, sid, H5P_DEFAULT, dcpl, H5P_DEFAULT)) < 0) + TEST_ERROR + + ext_dims[0] = 1; + ext_dims[1] = dims[1] + 5; + + /* Extend to (2^63)+ */ + H5E_BEGIN_TRY { + status = H5Dset_extent(did, ext_dims); + } H5E_END_TRY; + if(status >= 0) + TEST_ERROR + + /* Closing */ + if(H5Dclose(did) < 0) + TEST_ERROR + if(H5Sclose(sid) < 0) + TEST_ERROR + if(H5Pclose(dcpl) < 0) + TEST_ERROR + if(H5Fclose(fid) < 0) + TEST_ERROR + + PASSED(); + + return 0; + +error: + H5E_BEGIN_TRY { + H5Pclose(dcpl); + H5Dclose(did); + H5Sclose(sid); + H5Pclose(dcpl); + H5Fclose(fid); + } H5E_END_TRY; + return -1; +} /* end test_power2up() */ + + +/*------------------------------------------------------------------------- * Function: test_scatter * * Purpose: Tests H5Dscatter with a variety of different selections @@ -12928,6 +13020,7 @@ main(void) nerrors += (test_large_chunk_shrink(my_fapl) < 0 ? 1 : 0); nerrors += (test_zero_dim_dset(my_fapl) < 0 ? 1 : 0); nerrors += (test_storage_size(my_fapl) < 0 ? 1 : 0); + nerrors += (test_power2up(my_fapl) < 0 ? 1 : 0); nerrors += (test_swmr_non_latest(envval, my_fapl) < 0 ? 1 : 0); nerrors += (test_earray_hdr_fd(envval, my_fapl) < 0 ? 1 : 0); -- cgit v0.12 From 4b7013194cd545b73b1cf70874470dc6abfcb3bd Mon Sep 17 00:00:00 2001 From: Dana Robinson Date: Mon, 24 Jul 2017 11:02:15 -0700 Subject: Cherry pick of some minor tools fixes from develop: ee7816bbfb3 ffc9b1d917c ec7450c4b4b --- tools/lib/h5diff.c | 2 - tools/lib/h5tools.c | 6 -- tools/lib/h5tools_dump.c | 6 -- tools/lib/h5tools_ref.c | 2 - tools/lib/h5tools_str.c | 8 --- tools/lib/h5tools_utils.c | 10 --- tools/lib/io_timer.c | 7 -- tools/lib/ph5diff.h | 4 -- tools/src/h5copy/h5copy.c | 2 - tools/src/h5diff/h5diff_common.c | 2 - tools/src/h5diff/h5diff_main.c | 3 - tools/src/h5diff/ph5diff_main.c | 3 - tools/src/h5dump/h5dump.c | 2 - tools/src/h5dump/h5dump_ddl.c | 2 - tools/src/h5dump/h5dump_xml.c | 2 - tools/src/h5repack/h5repack.c | 4 -- tools/src/h5stat/h5stat.c | 2 - tools/src/misc/h5mkgrp.c | 2 - tools/src/misc/h5repart.c | 34 +-------- tools/test/h5copy/h5copygentest.c | 1 - tools/test/h5dump/h5dumpgentest.c | 1 - tools/test/h5import/h5importtest.c | 1 - tools/test/h5jam/h5jamgentest.c | 2 - tools/test/h5jam/tellub.c | 6 -- tools/test/h5repack/testh5repack_detect_szip.c | 1 - tools/test/misc/repart_test.c | 95 ++++++++++++-------------- tools/test/misc/talign.c | 3 - 27 files changed, 44 insertions(+), 169 deletions(-) diff --git a/tools/lib/h5diff.c b/tools/lib/h5diff.c index afb36d9..9da5b6b 100644 --- a/tools/lib/h5diff.c +++ b/tools/lib/h5diff.c @@ -11,8 +11,6 @@ * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ -#include - #include "H5private.h" #include "h5tools.h" #include "h5tools_utils.h" diff --git a/tools/lib/h5tools.c b/tools/lib/h5tools.c index 22fd863..5f01a41 100644 --- a/tools/lib/h5tools.c +++ b/tools/lib/h5tools.c @@ -12,16 +12,10 @@ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* - * Programmer: Robb Matzke - * Thursday, July 23, 1998 - * * Purpose: A library for displaying the values of a dataset in a human * readable format. */ -#include -#include - #include "h5tools.h" #include "h5tools_dump.h" #include "h5tools_ref.h" diff --git a/tools/lib/h5tools_dump.c b/tools/lib/h5tools_dump.c index 1a57512..fb79b77 100644 --- a/tools/lib/h5tools_dump.c +++ b/tools/lib/h5tools_dump.c @@ -12,16 +12,10 @@ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* - * Programmer: Robb Matzke - * Thursday, July 23, 1998 - * * Purpose: A library for displaying the values of a dataset in a human * readable format. */ -#include -#include - #include "h5tools.h" #include "h5tools_dump.h" #include "h5tools_ref.h" diff --git a/tools/lib/h5tools_ref.c b/tools/lib/h5tools_ref.c index 85850e3..e000080 100644 --- a/tools/lib/h5tools_ref.c +++ b/tools/lib/h5tools_ref.c @@ -11,8 +11,6 @@ * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ -#include -#include #include "h5tools_ref.h" #include "H5private.h" #include "H5SLprivate.h" diff --git a/tools/lib/h5tools_str.c b/tools/lib/h5tools_str.c index fa15785..a66cfe5 100644 --- a/tools/lib/h5tools_str.c +++ b/tools/lib/h5tools_str.c @@ -12,16 +12,8 @@ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* - * Programmer: Bill Wendling - * Monday, 19. February 2001 - * * Purpose: These are string functions for us to use and abuse. */ -#include -#include -#include -#include - #include "H5private.h" #include "h5tools.h" /* for h5tool_format_t structure */ #include "h5tools_ref.h" diff --git a/tools/lib/h5tools_utils.c b/tools/lib/h5tools_utils.c index c361e25..08213df 100644 --- a/tools/lib/h5tools_utils.c +++ b/tools/lib/h5tools_utils.c @@ -12,20 +12,10 @@ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* - * Programmer: Bill Wendling - * Tuesday, 6. March 2001 - */ - -/* * Portions of this work are derived from _Obfuscated C and Other Mysteries_, * by Don Libes, copyright (c) 1993 by John Wiley & Sons, Inc. */ -#include -#include -#include -#include - #include "h5tools.h" #include "h5tools_utils.h" #include "H5private.h" diff --git a/tools/lib/io_timer.c b/tools/lib/io_timer.c index e3318e9..a6885df 100644 --- a/tools/lib/io_timer.c +++ b/tools/lib/io_timer.c @@ -22,16 +22,9 @@ * This is a module of useful timing functions for performance testing. */ -#include -#include - #include "H5private.h" #include "hdf5.h" -#ifdef H5_HAVE_PARALLEL -#include -#endif - #include "io_timer.h" /* diff --git a/tools/lib/ph5diff.h b/tools/lib/ph5diff.h index 9628d45..996a611 100644 --- a/tools/lib/ph5diff.h +++ b/tools/lib/ph5diff.h @@ -42,9 +42,5 @@ struct diffs_found int not_cmp; }; -#ifdef H5_HAVE_PARALLEL -#include -#endif - #endif /* _PH5DIFF_H__ */ diff --git a/tools/src/h5copy/h5copy.c b/tools/src/h5copy/h5copy.c index 390b93e..3f91fce 100644 --- a/tools/src/h5copy/h5copy.c +++ b/tools/src/h5copy/h5copy.c @@ -14,8 +14,6 @@ #include "H5private.h" #include "h5tools.h" #include "h5tools_utils.h" -#include -#include /* Name of tool */ #define PROGRAMNAME "h5copy" diff --git a/tools/src/h5diff/h5diff_common.c b/tools/src/h5diff/h5diff_common.c index 0537b9f..1069a31 100644 --- a/tools/src/h5diff/h5diff_common.c +++ b/tools/src/h5diff/h5diff_common.c @@ -11,8 +11,6 @@ * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ -#include -#include #include "H5private.h" #include "h5diff.h" #include "h5diff_common.h" diff --git a/tools/src/h5diff/h5diff_main.c b/tools/src/h5diff/h5diff_main.c index 92a1610..66ff71e 100644 --- a/tools/src/h5diff/h5diff_main.c +++ b/tools/src/h5diff/h5diff_main.c @@ -11,9 +11,6 @@ * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ -#include -#include -#include #include "H5private.h" #include "h5diff.h" #include "h5diff_common.h" diff --git a/tools/src/h5diff/ph5diff_main.c b/tools/src/h5diff/ph5diff_main.c index bfeb408..192067f 100644 --- a/tools/src/h5diff/ph5diff_main.c +++ b/tools/src/h5diff/ph5diff_main.c @@ -11,9 +11,6 @@ * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ -#include -#include -#include #include "H5private.h" #include "h5diff.h" #include "ph5diff.h" diff --git a/tools/src/h5dump/h5dump.c b/tools/src/h5dump/h5dump.c index b53c212..bf2e127 100644 --- a/tools/src/h5dump/h5dump.c +++ b/tools/src/h5dump/h5dump.c @@ -10,8 +10,6 @@ * If you do not have access to either file, you may request a copy from * * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ -#include -#include #include "h5dump.h" #include "h5dump_ddl.h" diff --git a/tools/src/h5dump/h5dump_ddl.c b/tools/src/h5dump/h5dump_ddl.c index 8ce6cd6..0a45840 100644 --- a/tools/src/h5dump/h5dump_ddl.c +++ b/tools/src/h5dump/h5dump_ddl.c @@ -10,8 +10,6 @@ * If you do not have access to either file, you may request a copy from * * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ -#include -#include #include "H5private.h" #include "h5tools.h" diff --git a/tools/src/h5dump/h5dump_xml.c b/tools/src/h5dump/h5dump_xml.c index 1c3978d..bb0fd7a 100644 --- a/tools/src/h5dump/h5dump_xml.c +++ b/tools/src/h5dump/h5dump_xml.c @@ -10,8 +10,6 @@ * If you do not have access to either file, you may request a copy from * * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ -#include -#include #include "H5private.h" #include "h5tools.h" diff --git a/tools/src/h5repack/h5repack.c b/tools/src/h5repack/h5repack.c index bc8527b..4860d9e 100644 --- a/tools/src/h5repack/h5repack.c +++ b/tools/src/h5repack/h5repack.c @@ -11,10 +11,6 @@ * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ -#include -#include -#include - #include "H5private.h" #include "h5repack.h" #include "h5tools.h" diff --git a/tools/src/h5stat/h5stat.c b/tools/src/h5stat/h5stat.c index 6aee7a8..6f196b4 100644 --- a/tools/src/h5stat/h5stat.c +++ b/tools/src/h5stat/h5stat.c @@ -11,8 +11,6 @@ * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ -#include -#include #include "H5private.h" /* Generic Functions */ #include "h5tools.h" #include "h5tools_utils.h" diff --git a/tools/src/misc/h5mkgrp.c b/tools/src/misc/h5mkgrp.c index 597b6b3..43d6bfe 100644 --- a/tools/src/misc/h5mkgrp.c +++ b/tools/src/misc/h5mkgrp.c @@ -15,8 +15,6 @@ #include "H5private.h" #include "h5tools.h" #include "h5tools_utils.h" -#include -#include /* Name of tool */ #define PROGRAMNAME "h5mkgrp" diff --git a/tools/src/misc/h5repart.c b/tools/src/misc/h5repart.c index 911e0c6..5190197 100644 --- a/tools/src/misc/h5repart.c +++ b/tools/src/misc/h5repart.c @@ -25,39 +25,9 @@ /* See H5private.h for how to include system headers */ #include "hdf5.h" #include "H5private.h" -#ifdef H5_STDC_HEADERS -# include -# include -# include -# include -# include -# include -#endif - -#ifdef H5_HAVE_UNISTD_H -# include -# include -#endif - -#ifdef H5_HAVE_SYS_STAT_H -# include -#endif - -#ifndef FALSE -# define FALSE 0 -#endif -#ifndef TRUE -# define TRUE 1 -#endif -# define NAMELEN 4096 -#define GB *1024*1024*1024 -#ifndef MIN -# define MIN(X,Y) ((X)<(Y)?(X):(Y)) -#endif -#ifndef MIN3 -# define MIN3(X,Y,Z) MIN(MIN(X,Y),Z) -#endif +#define NAMELEN 4096 +#define GB *1024*1024*1024 /*Make these 2 private properties(defined in H5Fprivate.h) available to h5repart. *The first one updates the member file size in the superblock. The second one diff --git a/tools/test/h5copy/h5copygentest.c b/tools/test/h5copy/h5copygentest.c index d4d6a08..35f9132 100644 --- a/tools/test/h5copy/h5copygentest.c +++ b/tools/test/h5copy/h5copygentest.c @@ -14,7 +14,6 @@ /* * Generate the binary hdf5 file for the h5copy tests */ -#include #include "hdf5.h" #include "H5private.h" diff --git a/tools/test/h5dump/h5dumpgentest.c b/tools/test/h5dump/h5dumpgentest.c index 44c4369..2128acb 100644 --- a/tools/test/h5dump/h5dumpgentest.c +++ b/tools/test/h5dump/h5dumpgentest.c @@ -20,7 +20,6 @@ * trying it on a new platform, ...), you need to verify the correctness * of the expected output and update the corresponding *.ddl files. */ -#include #include "hdf5.h" #include "H5private.h" diff --git a/tools/test/h5import/h5importtest.c b/tools/test/h5import/h5importtest.c index 135b8e4..670559f 100644 --- a/tools/test/h5import/h5importtest.c +++ b/tools/test/h5import/h5importtest.c @@ -11,7 +11,6 @@ * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ -#include #include "H5private.h" #ifdef H5_HAVE_WIN32_API diff --git a/tools/test/h5jam/h5jamgentest.c b/tools/test/h5jam/h5jamgentest.c index 8648f07..ff3d35f 100644 --- a/tools/test/h5jam/h5jamgentest.c +++ b/tools/test/h5jam/h5jamgentest.c @@ -20,8 +20,6 @@ * trying it on a new platform, ...), you need to verify the correctness * of the expected output and update the corresponding *.ddl files. */ -#include -#include #include "hdf5.h" #include "H5private.h" diff --git a/tools/test/h5jam/tellub.c b/tools/test/h5jam/tellub.c index fad14b7..8e4b3ac 100644 --- a/tools/test/h5jam/tellub.c +++ b/tools/test/h5jam/tellub.c @@ -11,12 +11,6 @@ * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ -#include - -#ifdef H5_HAVE_UNISTD_H -#include -#endif - #include "hdf5.h" #include "H5private.h" #include "h5tools.h" diff --git a/tools/test/h5repack/testh5repack_detect_szip.c b/tools/test/h5repack/testh5repack_detect_szip.c index e08d5ab..6e7a24e 100644 --- a/tools/test/h5repack/testh5repack_detect_szip.c +++ b/tools/test/h5repack/testh5repack_detect_szip.c @@ -11,7 +11,6 @@ * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ -#include #include "h5repack.h" #include "h5tools.h" #include "h5tools_utils.h" diff --git a/tools/test/misc/repart_test.c b/tools/test/misc/repart_test.c index 372f46a..4016ee8 100644 --- a/tools/test/misc/repart_test.c +++ b/tools/test/misc/repart_test.c @@ -12,19 +12,16 @@ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* - * Programmer: Raymond Lu - * June 1, 2005 - * * Purpose: This program tests family files after being repartitioned * by h5repart. It simply tries to reopen the files with * correct family driver and member size. */ #include "hdf5.h" +#include "H5private.h" #define KB 1024 #define FAMILY_H5REPART_SIZE1 20000 #define FAMILY_H5REPART_SIZE2 (5*KB) -#define MAX(a,b) (a>b ? a:b) const char *FILENAME[] = { "fst_family%05d.h5", @@ -42,52 +39,54 @@ herr_t test_sec2_h5repart_opens(void); * * Purpose: Tries to reopen family files. * - * Return: Success: exit(0) - * - * Failure: exit(1) + * Return: SUCCEED/FAIL * - * Programmer: Raymond Lu - * June 1, 2005 - * - * Modifications: *------------------------------------------------------------------------- */ herr_t test_family_h5repart_opens(void) { - hid_t file=(-1), fapl=(-1); + hid_t fid = -1; + hid_t fapl_id = -1; /* open 1st file(single member file) with correct family size(20000 byte) */ - if ((fapl=H5Pcreate(H5P_FILE_ACCESS))<0) + if ((fapl_id = H5Pcreate(H5P_FILE_ACCESS)) < 0) goto error; - if(H5Pset_fapl_family(fapl, (hsize_t)FAMILY_H5REPART_SIZE1, H5P_DEFAULT)<0) + if (H5Pset_fapl_family(fapl_id, (hsize_t)FAMILY_H5REPART_SIZE1, H5P_DEFAULT) < 0) goto error; - if((file=H5Fopen(FILENAME[0], H5F_ACC_RDWR, fapl))<0) + if ((fid = H5Fopen(FILENAME[0], H5F_ACC_RDWR, fapl_id))<0) goto error; - if(H5Fclose(file)<0) + if (H5Fclose(fid) < 0) goto error; /* open 2nd file(multiple member files) with correct family size(5KB) */ - if(H5Pset_fapl_family(fapl, (hsize_t)FAMILY_H5REPART_SIZE2, H5P_DEFAULT)<0) + if (H5Pset_fapl_family(fapl_id, (hsize_t)FAMILY_H5REPART_SIZE2, H5P_DEFAULT) < 0) + goto error; + + if ((fid = H5Fopen(FILENAME[1], H5F_ACC_RDWR, fapl_id)) < 0) goto error; - if((file=H5Fopen(FILENAME[1], H5F_ACC_RDWR, fapl))<0) + if (H5Pclose(fapl_id) < 0) goto error; - if(H5Fclose(file)<0) + if (H5Fclose(fid) < 0) goto error; - return 0; + return SUCCEED; error: H5E_BEGIN_TRY { - H5Fclose(file); + H5Pclose(fapl_id); + H5Fclose(fid); } H5E_END_TRY; - return -1; -} + + return FAIL; + +} /* end test_family_h5repart_opens() */ + /*------------------------------------------------------------------------- @@ -95,36 +94,32 @@ error: * * Purpose: Tries to reopen a sec2 file. * - * Return: Success: exit(0) + * Return: SUCCEED/FAIL * - * Failure: exit(1) - * - * Programmer: Raymond Lu - * June 21, 2005 - * - * Modifications: *------------------------------------------------------------------------- */ herr_t test_sec2_h5repart_opens(void) { - hid_t file=(-1); + hid_t fid = -1; /* open the sec2 file */ - if((file=H5Fopen(FILENAME[2], H5F_ACC_RDWR, H5P_DEFAULT))<0) + if ((fid = H5Fopen(FILENAME[2], H5F_ACC_RDWR, H5P_DEFAULT)) < 0) goto error; - if(H5Fclose(file)<0) + if (H5Fclose(fid) < 0) goto error; - return 0; + return SUCCEED; error: H5E_BEGIN_TRY { - H5Fclose(file); + H5Fclose(fid); } H5E_END_TRY; - return -1; -} + + return FAIL; + +} /* end test_sec2_h5repart_opens() */ /*------------------------------------------------------------------------- @@ -132,32 +127,26 @@ error: * * Purpose: Tests h5repart-ed family files * - * Return: Success: exit(0) - * - * Failure: exit(1) - * - * Programmer: Raymond Lu - * June 1, 2005 - * - * Modifications: + * Return: EXIT_SUCCESS/EXIT_FAILURE * *------------------------------------------------------------------------- */ int main(void) { - int nerrors=0; + int nerrors = 0; - nerrors += test_family_h5repart_opens()<0 ?1:0; - nerrors += test_sec2_h5repart_opens()<0 ?1:0; + nerrors += test_family_h5repart_opens() < 0 ? 1 : 0; + nerrors += test_sec2_h5repart_opens() < 0 ? 1 : 0; - if (nerrors) goto error; + if (nerrors) + goto error; - return 0; + HDexit(EXIT_SUCCESS); error: nerrors = MAX(1, nerrors); - printf("***** %d FAMILY FILE TEST%s FAILED! *****\n", + HDprintf("***** %d FAMILY FILE TEST%s FAILED! *****\n", nerrors, 1 == nerrors ? "" : "S"); - return 1; -} + HDexit(EXIT_FAILURE); +} /* end main() */ diff --git a/tools/test/misc/talign.c b/tools/test/misc/talign.c index 9a72557..ce866b4 100644 --- a/tools/test/misc/talign.c +++ b/tools/test/misc/talign.c @@ -15,9 +15,6 @@ * Small program to illustrate the "misalignment" of members within a compound * datatype, in a datatype fixed by H5Tget_native_type(). */ -#include -#include -/*#include *//* Required for unlink() */ #include "hdf5.h" #include "H5private.h" -- cgit v0.12 From 7bb2e5dfef2a94d281ea8e6a937ede6ad7289601 Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Mon, 24 Jul 2017 16:33:48 -0500 Subject: Correct case of var --- config/cmake_ext_mod/HDFLibMacros.cmake | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/config/cmake_ext_mod/HDFLibMacros.cmake b/config/cmake_ext_mod/HDFLibMacros.cmake index f2e03d7..54e408b 100644 --- a/config/cmake_ext_mod/HDFLibMacros.cmake +++ b/config/cmake_ext_mod/HDFLibMacros.cmake @@ -74,14 +74,14 @@ macro (EXTERNAL_JPEG_LIBRARY compress_type jpeg_pic) HDF_IMPORT_SET_LIB_OPTIONS (jpeg-static "jpeg" STATIC "") add_dependencies (JPEG jpeg-static) set (JPEG_STATIC_LIBRARY "jpeg-static") - set (JPEG_LIBRARIES ${JPEG_static_LIBRARY}) + set (JPEG_LIBRARIES ${JPEG_STATIC_LIBRARY}) if (BUILD_SHARED_LIBS) # Create imported target jpeg-shared add_library(jpeg-shared SHARED IMPORTED) HDF_IMPORT_SET_LIB_OPTIONS (jpeg-shared "jpeg" SHARED "") add_dependencies (JPEG jpeg-shared) set (JPEG_SHARED_LIBRARY "jpeg-shared") - set (JPEG_LIBRARIES ${JPEG_LIBRARIES} ${JPEG_shared_LIBRARY}) + set (JPEG_LIBRARIES ${JPEG_LIBRARIES} ${JPEG_SHARED_LIBRARY}) endif () set (JPEG_INCLUDE_DIR_GEN "${BINARY_DIR}") @@ -167,14 +167,14 @@ macro (EXTERNAL_SZIP_LIBRARY compress_type encoding) HDF_IMPORT_SET_LIB_OPTIONS (szip-static "szip" STATIC "") add_dependencies (SZIP szip-static) set (SZIP_STATIC_LIBRARY "szip-static") - set (SZIP_LIBRARIES ${SZIP_static_LIBRARY}) + set (SZIP_LIBRARIES ${SZIP_STATIC_LIBRARY}) if (BUILD_SHARED_LIBS) # Create imported target szip-shared add_library(szip-shared SHARED IMPORTED) HDF_IMPORT_SET_LIB_OPTIONS (szip-shared "szip" SHARED "") add_dependencies (SZIP szip-shared) set (SZIP_SHARED_LIBRARY "szip-shared") - set (SZIP_LIBRARIES ${SZIP_LIBRARIES} ${SZIP_shared_LIBRARY}) + set (SZIP_LIBRARIES ${SZIP_LIBRARIES} ${SZIP_SHARED_LIBRARY}) endif () set (SZIP_INCLUDE_DIR_GEN "${BINARY_DIR}") @@ -262,7 +262,7 @@ macro (EXTERNAL_ZLIB_LIBRARY compress_type) HDF_IMPORT_SET_LIB_OPTIONS (zlib-static ${ZLIB_LIB_NAME} STATIC "") add_dependencies (ZLIB zlib-static) set (ZLIB_STATIC_LIBRARY "zlib-static") - set (ZLIB_LIBRARIES ${ZLIB_static_LIBRARY}) + set (ZLIB_LIBRARIES ${ZLIB_STATIC_LIBRARY}) if (BUILD_SHARED_LIBS) # Create imported target zlib-shared add_library(zlib-shared SHARED IMPORTED) -- cgit v0.12 From 9dd678856e8a22a77055b51c6836ed2f95ec156c Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Wed, 26 Jul 2017 09:59:43 -0500 Subject: HDFFV-10246 Fix vl string compare in h5diff --- MANIFEST | 1 + release_docs/RELEASE.txt | 9 +++++++++ tools/lib/h5diff_array.c | 20 ++++++++++++++++---- tools/test/h5diff/CMakeTests.cmake | 8 ++++++++ tools/test/h5diff/testfiles/h5diff_vlstr.txt | 16 ++++++++++++++++ tools/test/h5diff/testh5diff.sh.in | 5 +++++ 6 files changed, 55 insertions(+), 4 deletions(-) create mode 100644 tools/test/h5diff/testfiles/h5diff_vlstr.txt diff --git a/MANIFEST b/MANIFEST index c34e614..6decb7d 100644 --- a/MANIFEST +++ b/MANIFEST @@ -2399,6 +2399,7 @@ ./tools/test/h5diff/testfiles/h5diff_udfail.txt ./tools/test/h5diff/testfiles/diff_strings1.h5 ./tools/test/h5diff/testfiles/diff_strings2.h5 +./tools/test/h5diff/testfiles/h5diff_vlstr.txt #vds ./tools/test/h5diff/testfiles/h5diff_v1.txt ./tools/test/h5diff/testfiles/h5diff_v2.txt diff --git a/release_docs/RELEASE.txt b/release_docs/RELEASE.txt index 42cf488..b6f508b 100644 --- a/release_docs/RELEASE.txt +++ b/release_docs/RELEASE.txt @@ -225,6 +225,15 @@ Bug Fixes since HDF5-1.10.0-patch1 release Tools ----- + - h5diff + + h5diff segfaulted on compare of a NULL variable length string. + + Improved h5diff compare of strings by adding a check for + NULL strings and setting the lengths to zero. + + (ADB - 2017/07/25, HDFFV-10246) + - h5repack h5repack did not maintain the creation order flag of the root diff --git a/tools/lib/h5diff_array.c b/tools/lib/h5diff_array.c index 0b1a96e..7236ad1 100644 --- a/tools/lib/h5diff_array.c +++ b/tools/lib/h5diff_array.c @@ -673,21 +673,33 @@ static hsize_t diff_datum(void *_mem1, h5difftrace("diff_datum H5T_STRING variable\n"); /* Get pointer to first string */ s1 = *(char**) mem1; - size1 = HDstrlen(s1); + if(s1) + size1 = HDstrlen(s1); + else + size1 = 0; /* Get pointer to second string */ s2 = *(char**) mem2; - size2 = HDstrlen(s2); + if(s2) + size2 = HDstrlen(s2); + else + size2 = 0; } else if (H5T_STR_NULLTERM == pad) { h5difftrace("diff_datum H5T_STRING null term\n"); /* Get pointer to first string */ s1 = (char*) mem1; - size1 = HDstrlen(s1); + if(s1) + size1 = HDstrlen(s1); + else + size1 = 0; if (size1 > size_mtype) size1 = size_mtype; /* Get pointer to second string */ s2 = (char*) mem2; - size2 = HDstrlen(s2); + if(s2) + size2 = HDstrlen(s2); + else + size2 = 0; if (size2 > size_mtype) size2 = size_mtype; } diff --git a/tools/test/h5diff/CMakeTests.cmake b/tools/test/h5diff/CMakeTests.cmake index 72dda6b..02db446 100644 --- a/tools/test/h5diff/CMakeTests.cmake +++ b/tools/test/h5diff/CMakeTests.cmake @@ -95,6 +95,8 @@ ${HDF5_TOOLS_DIR}/testfiles/vds/5_b.h5 ${HDF5_TOOLS_DIR}/testfiles/vds/5_c.h5 ${HDF5_TOOLS_DIR}/testfiles/vds/5_vds.h5 + # tools/testfiles + ${HDF5_TOOLS_DIR}/testfiles/tvlstr.h5 ) set (LIST_OTHER_TEST_FILES @@ -286,6 +288,7 @@ ${HDF5_TOOLS_TEST_H5DIFF_SOURCE_DIR}/testfiles/h5diff_v1.txt ${HDF5_TOOLS_TEST_H5DIFF_SOURCE_DIR}/testfiles/h5diff_v2.txt ${HDF5_TOOLS_TEST_H5DIFF_SOURCE_DIR}/testfiles/h5diff_v3.txt + ${HDF5_TOOLS_TEST_H5DIFF_SOURCE_DIR}/testfiles/h5diff_vlstr.txt ) set (LIST_WIN_TEST_FILES @@ -311,6 +314,8 @@ HDFTEST_COPY_FILE("${h5_tstfiles}" "${PROJECT_BINARY_DIR}/PAR/testfiles/${fname}" "h5diff_files") endif () endforeach () + # copy second version of tvlstr.h5 + HDFTEST_COPY_FILE("${HDF5_TOOLS_DIR}/testfiles/tvlstr.h5" "${PROJECT_BINARY_DIR}/testfiles/tvlstr2.h5" "h5diff_files") # @@ -888,6 +893,8 @@ h5diff_v2.out.err h5diff_v3.out h5diff_v3.out.err + h5diff_vlstr.out + h5diff_vlstr.out.err ) set_tests_properties (H5DIFF-clearall-objects PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles") if (NOT "${last_test}" STREQUAL "") @@ -1465,6 +1472,7 @@ ADD_H5_TEST (h5diff_487 1 -v --exclude-path "/group1/dset" h5diff_exclude3-1.h5 # # diff various multiple vlen and fixed strings in a compound type dataset # ############################################################################## ADD_H5_TEST (h5diff_530 0 -v ${COMP_VL_STRS_FILE} ${COMP_VL_STRS_FILE} /group /group_copy) +ADD_H5_TEST (h5diff_vlstr 0 -v tvlstr.h5 tvlstr2.h5) # ############################################################################## # # Test container types (array,vlen) with multiple nested compound types diff --git a/tools/test/h5diff/testfiles/h5diff_vlstr.txt b/tools/test/h5diff/testfiles/h5diff_vlstr.txt new file mode 100644 index 0000000..67141f1 --- /dev/null +++ b/tools/test/h5diff/testfiles/h5diff_vlstr.txt @@ -0,0 +1,16 @@ + +file1 file2 +--------------------------------------- + x x / + x x /Dataset1 + x x /vl_string_type + +group : and +0 differences found +attribute: > and > +0 differences found +dataset: and +0 differences found +datatype: and +0 differences found +EXIT CODE: 0 diff --git a/tools/test/h5diff/testh5diff.sh.in b/tools/test/h5diff/testh5diff.sh.in index d769c23..df472d4 100644 --- a/tools/test/h5diff/testh5diff.sh.in +++ b/tools/test/h5diff/testh5diff.sh.in @@ -124,6 +124,7 @@ $SRC_H5DIFF_TESTFILES/tmpSingleSiteBethe.reference.h5 $SRC_H5DIFF_TESTFILES/tmpSingleSiteBethe.output.h5 $SRC_H5DIFF_TESTFILES/diff_strings1.h5 $SRC_H5DIFF_TESTFILES/diff_strings2.h5 +$SRC_TOOLS_TESTFILES/tvlstr.h5 " LIST_HDF5_VDS_TEST_FILES=" @@ -341,6 +342,7 @@ $SRC_H5DIFF_TESTFILES/h5diff_tmp2.txt $SRC_H5DIFF_TESTFILES/h5diff_v1.txt $SRC_H5DIFF_TESTFILES/h5diff_v2.txt $SRC_H5DIFF_TESTFILES/h5diff_v3.txt +$SRC_H5DIFF_TESTFILES/h5diff_vlstr.txt " # @@ -566,6 +568,8 @@ SKIP() { ############################################################################## # prepare for test COPY_TESTFILES_TO_TESTDIR +# second copy of tvlstr.h5 +$CP -f $SRC_TOOLS_TESTFILES/tvlstr.h5 $TESTDIR/tvlstr2.h5 # ############################################################################ # # Common usage @@ -1141,6 +1145,7 @@ TOOLTEST h5diff_487.txt -v --exclude-path "/group1/dset" h5diff_exclude3-1.h5 h5 # # diff various multiple vlen and fixed strings in a compound type dataset # ############################################################################## TOOLTEST h5diff_530.txt -v h5diff_comp_vl_strs.h5 h5diff_comp_vl_strs.h5 /group /group_copy +TOOLTEST h5diff_vlstr.txt -v tvlstr.h5 tvlstr2.h5 # ############################################################################## # # Test container types (array,vlen) with multiple nested compound types -- cgit v0.12 From fab0a6e6f1ee574528d9b624fb06f9d33109a809 Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Wed, 26 Jul 2017 10:48:15 -0500 Subject: Add check for plugin initialize --- test/plugin.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/test/plugin.c b/test/plugin.c index 1254e9a..3034c0b 100644 --- a/test/plugin.c +++ b/test/plugin.c @@ -733,7 +733,10 @@ test_filter_path_apis(void) if(H5Zfilter_avail(H5Z_FILTER_DYNLIB1) != TRUE) TEST_ERROR + TESTING(" initialize"); H5PLsize(&ndx); + if(ndx!=2) TEST_ERROR + PASSED(); TESTING(" remove"); /* Remove all existing paths*/ -- cgit v0.12 From 8551126dcfa869b0f8f4c7adfab351ed97de10c1 Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Wed, 26 Jul 2017 11:04:36 -0500 Subject: Insure zip_perf program does not run concurrently --- tools/test/perform/CMakeTests.cmake | 1 + 1 file changed, 1 insertion(+) diff --git a/tools/test/perform/CMakeTests.cmake b/tools/test/perform/CMakeTests.cmake index 2933563..39faa73 100644 --- a/tools/test/perform/CMakeTests.cmake +++ b/tools/test/perform/CMakeTests.cmake @@ -146,6 +146,7 @@ else () -P "${HDF_RESOURCES_EXT_DIR}/runTest.cmake" ) endif () +set_tests_properties (PERFORM_zip_perf PROPERTIES DEPENDS PERFORM_zip_perf_help) if (H5_HAVE_PARALLEL) add_test (NAME PERFORM_h5perf COMMAND ${MPIEXEC} ${MPIEXEC_PREFLAGS} ${MPIEXEC_NUMPROC_FLAG} ${MPIEXEC_MAX_NUMPROCS} ${MPIEXEC_POSTFLAGS} $) -- cgit v0.12 From fe0ca45e13960fca175c4cea75b6239bf79161a6 Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Thu, 27 Jul 2017 11:21:20 -0500 Subject: Parallel needs copy of file in PAR folder --- tools/test/h5diff/CMakeTests.cmake | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tools/test/h5diff/CMakeTests.cmake b/tools/test/h5diff/CMakeTests.cmake index 02db446..608795c 100644 --- a/tools/test/h5diff/CMakeTests.cmake +++ b/tools/test/h5diff/CMakeTests.cmake @@ -316,6 +316,9 @@ endforeach () # copy second version of tvlstr.h5 HDFTEST_COPY_FILE("${HDF5_TOOLS_DIR}/testfiles/tvlstr.h5" "${PROJECT_BINARY_DIR}/testfiles/tvlstr2.h5" "h5diff_files") + if (H5_HAVE_PARALLEL) + HDFTEST_COPY_FILE("${HDF5_TOOLS_DIR}/testfiles/tvlstr.h5" "${PROJECT_BINARY_DIR}/PAR/testfiles/tvlstr2.h5" "h5diff_files") + endif () # -- cgit v0.12 From d7bfd458c4eadcfb338e9856256ecd98aa47aa10 Mon Sep 17 00:00:00 2001 From: Vailin Choi Date: Fri, 9 Jun 2017 14:01:07 -0500 Subject: Changes made based on RFC review comments Test the changes in a branch via daily testing. --- src/H5Fprivate.h | 4 +++- src/H5MF.c | 2 +- src/H5MFsection.c | 32 ++++++++++++++++---------------- src/H5Pfcpl.c | 3 +++ test/tfile.c | 17 +++++++++++++++++ 5 files changed, 40 insertions(+), 18 deletions(-) diff --git a/src/H5Fprivate.h b/src/H5Fprivate.h index 6f68a62..eba48de 100644 --- a/src/H5Fprivate.h +++ b/src/H5Fprivate.h @@ -549,9 +549,11 @@ #define H5F_FILE_SPACE_PAGE_SIZE_DEF 4096 /* For paged aggregation: minimum value for file space page size */ #define H5F_FILE_SPACE_PAGE_SIZE_MIN 512 +/* For paged aggregation: maxiumum value for file space page size: 1 gigabyte */ +#define H5F_FILE_SPACE_PAGE_SIZE_MAX 1024*1024*1024 /* For paged aggregation: drop free-space with size <= this threshold for small meta section */ -#define H5F_FILE_SPACE_PGEND_META_THRES 10 +#define H5F_FILE_SPACE_PGEND_META_THRES 0 /* Default for threshold for alignment (can be set via H5Pset_alignment()) */ #define H5F_ALIGN_DEF 1 diff --git a/src/H5MF.c b/src/H5MF.c index e54d809..d7af56a 100644 --- a/src/H5MF.c +++ b/src/H5MF.c @@ -1519,7 +1519,7 @@ H5MF_try_shrink(H5F_t *f, H5FD_mem_t alloc_type, hid_t dxpl_id, haddr_t addr, H5AC_ring_t fsm_ring = H5AC_RING_INV; /* Ring of fsm */ H5F_mem_page_t fs_type; /* Free space type */ hbool_t reset_ring = FALSE; /* Whether the ring was set */ - htri_t ret_value = FAIL; /* Return value */ + htri_t ret_value = FALSE; /* Return value */ FUNC_ENTER_NOAPI_TAG(dxpl_id, H5AC__FREESPACE_TAG, FAIL) #ifdef H5MF_ALLOC_DEBUG diff --git a/src/H5MFsection.c b/src/H5MFsection.c index 02fc2d9..14e0ad1 100644 --- a/src/H5MFsection.c +++ b/src/H5MFsection.c @@ -130,27 +130,27 @@ H5FS_section_class_t H5MF_FSPACE_SECT_CLS_SIMPLE[1] = {{ /* Class info for "small" free space sections */ H5FS_section_class_t H5MF_FSPACE_SECT_CLS_SMALL[1] = {{ /* Class variables */ - H5MF_FSPACE_SECT_SMALL, /* Section type */ - 0, /* Extra serialized size */ - H5FS_CLS_MERGE_SYM | H5FS_CLS_ADJUST_OK, /* Class flags */ - NULL, /* Class private info */ + H5MF_FSPACE_SECT_SMALL, /* Section type */ + 0, /* Extra serialized size */ + H5FS_CLS_MERGE_SYM | H5FS_CLS_ADJUST_OK, /* Class flags */ + NULL, /* Class private info */ /* Class methods */ - NULL, /* Initialize section class */ - NULL, /* Terminate section class */ + NULL, /* Initialize section class */ + NULL, /* Terminate section class */ /* Object methods */ - H5MF_sect_small_add, /* Add section */ - NULL, /* Serialize section */ + H5MF_sect_small_add, /* Add section */ + NULL, /* Serialize section */ H5MF_sect_deserialize, /* Deserialize section */ - H5MF_sect_small_can_merge, /* Can sections merge? */ - H5MF_sect_small_merge, /* Merge sections */ - H5MF_sect_small_can_shrink, /* Can section shrink container?*/ - H5MF_sect_small_shrink, /* Shrink container w/section */ - H5MF_sect_free, /* Free section */ - H5MF_sect_valid, /* Check validity of section */ - H5MF_sect_split, /* Split section node for alignment */ - NULL, /* Dump debugging for section */ + H5MF_sect_small_can_merge, /* Can sections merge? */ + H5MF_sect_small_merge, /* Merge sections */ + NULL, /* Can section shrink container?*/ + NULL, /* Shrink container w/section */ + H5MF_sect_free, /* Free section */ + H5MF_sect_valid, /* Check validity of section */ + H5MF_sect_split, /* Split section node for alignment */ + NULL, /* Dump debugging for section */ }}; /* Class info for "large" free space sections */ diff --git a/src/H5Pfcpl.c b/src/H5Pfcpl.c index 5383aae..6b0d2c0 100644 --- a/src/H5Pfcpl.c +++ b/src/H5Pfcpl.c @@ -1472,6 +1472,9 @@ H5Pset_file_space_page_size(hid_t plist_id, hsize_t fsp_size) if(fsp_size < H5F_FILE_SPACE_PAGE_SIZE_MIN) HGOTO_ERROR(H5E_ATOM, H5E_BADATOM, FAIL, "cannot set file space page size to less than 512") + if(fsp_size > H5F_FILE_SPACE_PAGE_SIZE_MAX) + HGOTO_ERROR(H5E_ATOM, H5E_BADATOM, FAIL, "cannot set file space page size to more than 1GB") + /* Set the value*/ if(H5P_set(plist, H5F_CRT_FILE_SPACE_PAGE_SIZE_NAME, &fsp_size) < 0) HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't set file space page size") diff --git a/test/tfile.c b/test/tfile.c index c59e756..70508cd 100644 --- a/test/tfile.c +++ b/test/tfile.c @@ -109,6 +109,7 @@ #define TEST_THRESHOLD10 10 /* Free space section threshold */ #define FSP_SIZE_DEF 4096 /* File space page size default */ #define FSP_SIZE512 512 /* File space page size */ +#define FSP_SIZE1G 1024*1024*1024 /* File space page size */ /* Declaration for test_libver_macros2() */ #define FILE6 "tfile6.h5" /* Test file */ @@ -3581,6 +3582,9 @@ test_filespace_info(const char *env_h5_drvr) * Setting value less than 512 will return an error; * --setting file space page size to 0 * --setting file space page size to 511 + * + * File space page size has a maximum size of 1 gigabyte. + * Setting value greater than 1 gigabyte will return an error. */ /* Create file creation property list template */ fcpl = H5Pcreate(H5P_FILE_CREATE); @@ -3598,6 +3602,12 @@ test_filespace_info(const char *env_h5_drvr) } H5E_END_TRY; VERIFY(ret, FAIL, "H5Pset_file_space_page_size"); + /* Setting to 1GB+1: should fail */ + H5E_BEGIN_TRY { + ret = H5Pset_file_space_page_size(fcpl, FSP_SIZE1G+1); + } H5E_END_TRY; + VERIFY(ret, FAIL, "H5Pset_file_space_page_size"); + /* Setting to 512: should succeed */ ret = H5Pset_file_space_page_size(fcpl, FSP_SIZE512); CHECK(ret, FAIL, "H5Pset_file_space_page_size"); @@ -3605,6 +3615,13 @@ test_filespace_info(const char *env_h5_drvr) CHECK(ret, FAIL, "H5Pget_file_space_page_size"); VERIFY(fsp_size, FSP_SIZE512, "H5Pget_file_space_page_size"); + /* Setting to 1GB: should succeed */ + ret = H5Pset_file_space_page_size(fcpl, FSP_SIZE1G); + CHECK(ret, FAIL, "H5Pset_file_space_page_size"); + ret = H5Pget_file_space_page_size(fcpl, &fsp_size); + CHECK(ret, FAIL, "H5Pget_file_space_page_size"); + VERIFY(fsp_size, FSP_SIZE1G, "H5Pget_file_space_page_size"); + /* Close property list */ H5Pclose(fcpl); -- cgit v0.12 From d4e75f6a50d028cae250f764fe118a5f0c2257f6 Mon Sep 17 00:00:00 2001 From: Vailin Choi Date: Mon, 10 Jul 2017 02:40:59 -0500 Subject: Skip test in test/fheap.c when: a) multi/split drivers and b) persisting free-space or using paged aggregation strategy because the library will fail file creation (temporary) for the above conditions. --- src/H5MFsection.c | 2 +- test/fheap.c | 16 ++++++++++++++++ 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/src/H5MFsection.c b/src/H5MFsection.c index 14e0ad1..02e3218 100644 --- a/src/H5MFsection.c +++ b/src/H5MFsection.c @@ -674,7 +674,7 @@ HDfprintf(stderr, "%s: Entering, section {%a, %Hu}\n", FUNC, (*sect)->sect_info. HDfprintf(stderr, "%s: section is dropped\n", FUNC); #endif /* H5MF_ALLOC_DEBUG_MORE */ } /* end if */ - /* Adjust the section if it is not at page end but its size + pgend threshold is at page end */ + /* 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; diff --git a/test/fheap.c b/test/fheap.c index 4be6cb9..6c3a8ac 100644 --- a/test/fheap.c +++ b/test/fheap.c @@ -16377,6 +16377,16 @@ main(void) unsigned nerrors = 0; /* Cumulative error count */ unsigned num_pb_fs = 1; /* The number of settings to test for page buffering and file space handling */ int ExpressMode; /* Express testing level */ + const char *envval; /* Environment variable */ + hbool_t contig_addr_vfd; /* Whether VFD used has a contigous address space */ + + /* Don't run this test using certain file drivers */ + envval = HDgetenv("HDF5_DRIVER"); + if(envval == NULL) + envval = "nomatch"; + + /* Current VFD that does not support contigous address space */ + contig_addr_vfd = (hbool_t)(HDstrcmp(envval, "split") && HDstrcmp(envval, "multi")); /* Reset library */ h5_reset(); @@ -16428,6 +16438,12 @@ main(void) shared_wobj_g[u] = (unsigned char)u; for(v = 0; v < num_pb_fs; v++) { + /* Skip test when: + a) multi/split drivers and + b) persisting free-space or using paged aggregation strategy + because the library will fail file creation (temporary) for the above conditions */ + if(!contig_addr_vfd && v) + break; if((fcpl = H5Pcopy(def_fcpl)) < 0) TEST_ERROR -- cgit v0.12 From aa0ad22a941e6d7fb4f31718c47d045931f8b317 Mon Sep 17 00:00:00 2001 From: Vailin Choi Date: Sat, 29 Jul 2017 01:10:25 -0500 Subject: Add h5repack tests for paged aggregation Add tests to h5repack.sh.in to verify options added for paged aggregation work as expected. --- MANIFEST | 12 +++ tools/test/h5repack/h5repack.sh.in | 103 +++++++++++++++++++++ .../testfiles/GS.h5repack_paged_nopersist.h5.ddl | 15 +++ .../testfiles/S.h5repack_fsm_aggr_persist.h5.ddl | 15 +++ .../SP.h5repack_fsm_aggr_nopersist.h5.ddl | 16 ++++ .../testfiles/SP.h5repack_paged_persist.h5.ddl | 15 +++ .../h5repack/testfiles/SPT.h5repack_aggr.h5.ddl | 16 ++++ .../h5repack/testfiles/STG.h5repack_none.h5.ddl | 15 +++ tools/test/h5repack/testfiles/h5repack_aggr.h5 | Bin 0 -> 2448 bytes .../testfiles/h5repack_fsm_aggr_nopersist.h5 | Bin 0 -> 2448 bytes .../testfiles/h5repack_fsm_aggr_persist.h5 | Bin 0 -> 2565 bytes tools/test/h5repack/testfiles/h5repack_none.h5 | Bin 0 -> 1808 bytes .../h5repack/testfiles/h5repack_paged_nopersist.h5 | Bin 0 -> 8192 bytes .../h5repack/testfiles/h5repack_paged_persist.h5 | Bin 0 -> 16384 bytes 14 files changed, 207 insertions(+) create mode 100644 tools/test/h5repack/testfiles/GS.h5repack_paged_nopersist.h5.ddl create mode 100644 tools/test/h5repack/testfiles/S.h5repack_fsm_aggr_persist.h5.ddl create mode 100644 tools/test/h5repack/testfiles/SP.h5repack_fsm_aggr_nopersist.h5.ddl create mode 100644 tools/test/h5repack/testfiles/SP.h5repack_paged_persist.h5.ddl create mode 100644 tools/test/h5repack/testfiles/SPT.h5repack_aggr.h5.ddl create mode 100644 tools/test/h5repack/testfiles/STG.h5repack_none.h5.ddl create mode 100644 tools/test/h5repack/testfiles/h5repack_aggr.h5 create mode 100644 tools/test/h5repack/testfiles/h5repack_fsm_aggr_nopersist.h5 create mode 100644 tools/test/h5repack/testfiles/h5repack_fsm_aggr_persist.h5 create mode 100644 tools/test/h5repack/testfiles/h5repack_none.h5 create mode 100644 tools/test/h5repack/testfiles/h5repack_paged_nopersist.h5 create mode 100644 tools/test/h5repack/testfiles/h5repack_paged_persist.h5 diff --git a/MANIFEST b/MANIFEST index 6decb7d..8e33cfb 100644 --- a/MANIFEST +++ b/MANIFEST @@ -2407,6 +2407,7 @@ #test files for h5repack ./tools/test/h5repack/testfiles/README +./tools/test/h5repack/testfiles/h5repack_aggr.h5 ./tools/test/h5repack/testfiles/h5repack_attr.h5 ./tools/test/h5repack/testfiles/h5repack_attr_refs.h5 ./tools/test/h5repack/testfiles/h5repack_deflate.h5 @@ -2416,6 +2417,8 @@ ./tools/test/h5repack/testfiles/h5repack_fill.h5 ./tools/test/h5repack/testfiles/h5repack_filters.h5 ./tools/test/h5repack/testfiles/h5repack_fletcher.h5 +./tools/test/h5repack/testfiles/h5repack_fsm_aggr_nopersist.h5 +./tools/test/h5repack/testfiles/h5repack_fsm_aggr_persist.h5 ./tools/test/h5repack/testfiles/h5repack_hlink.h5 ./tools/test/h5repack/testfiles/h5repack.info ./tools/test/h5repack/testfiles/h5repack_layout.h5 @@ -2427,7 +2430,10 @@ ./tools/test/h5repack/testfiles/h5repack_nested_8bit_enum_deflated.h5 ./tools/test/h5repack/testfiles/h5repack_nested_8bit_enum.h5 ./tools/test/h5repack/testfiles/h5repack_nbit.h5 +./tools/test/h5repack/testfiles/h5repack_none.h5 ./tools/test/h5repack/testfiles/h5repack_objs.h5 +./tools/test/h5repack/testfiles/h5repack_paged_nopersist.h5 +./tools/test/h5repack/testfiles/h5repack_paged_persist.h5 ./tools/test/h5repack/testfiles/h5repack_refs.h5 ./tools/test/h5repack/testfiles/h5repack_shuffle.h5 ./tools/test/h5repack/testfiles/h5repack_soffset.h5 @@ -2446,6 +2452,12 @@ ./tools/test/h5repack/testfiles/h5repack_layout.h5-plugin_test.ddl ./tools/test/h5repack/testfiles/h5repack_layout.h5-plugin_version_test.ddl ./tools/test/h5repack/testfiles/h5repack_layout.h5-plugin_zero.tst +./tools/test/h5repack/testfiles/GS.h5repack_paged_nopersist.h5.ddl +./tools/test/h5repack/testfiles/S.h5repack_fsm_aggr_persist.h5.ddl +./tools/test/h5repack/testfiles/SP.h5repack_fsm_aggr_nopersist.h5.ddl +./tools/test/h5repack/testfiles/SP.h5repack_paged_persist.h5.ddl +./tools/test/h5repack/testfiles/SPT.h5repack_aggr.h5.ddl +./tools/test/h5repack/testfiles/STG.h5repack_none.h5.ddl ./tools/test/h5repack/testfiles/1_vds.h5-vds_dset_chunk20x10x5-v.ddl ./tools/test/h5repack/testfiles/2_vds.h5-vds_chunk3x6x9-v.ddl ./tools/test/h5repack/testfiles/3_1_vds.h5-vds_chunk2x5x8-v.ddl diff --git a/tools/test/h5repack/h5repack.sh.in b/tools/test/h5repack/h5repack.sh.in index bc6b527..e474bc3 100644 --- a/tools/test/h5repack/h5repack.sh.in +++ b/tools/test/h5repack/h5repack.sh.in @@ -36,6 +36,9 @@ H5DIFF_BIN=`pwd`/$H5DIFF # The path of the h5diff tool binary H5DUMP=../../src/h5dump/h5dump # The h5dump tool name H5DUMP_BIN=`pwd`/$H5DUMP # The path of the h5dump tool binary +H5STAT=../../src/h5stat/h5stat # The h5stat tool name +H5STAT_BIN=`pwd`/$H5STAT # The path of the h5stat tool binary + RM='rm -rf' CMP='cmp' DIFF='diff -c' @@ -101,6 +104,12 @@ $SRC_H5REPACK_TESTFILES/h5repack_refs.h5 $SRC_H5REPACK_TESTFILES/h5repack_shuffle.h5 $SRC_H5REPACK_TESTFILES/h5repack_soffset.h5 $SRC_H5REPACK_TESTFILES/h5repack_szip.h5 +$SRC_H5REPACK_TESTFILES/h5repack_aggr.h5 +$SRC_H5REPACK_TESTFILES/h5repack_fsm_aggr_nopersist.h5 +$SRC_H5REPACK_TESTFILES/h5repack_fsm_aggr_persist.h5 +$SRC_H5REPACK_TESTFILES/h5repack_none.h5 +$SRC_H5REPACK_TESTFILES/h5repack_paged_nopersist.h5 +$SRC_H5REPACK_TESTFILES/h5repack_paged_persist.h5 $SRC_H5DIFF_TESTFILES/h5diff_attr1.h5 $SRC_TOOLS_TESTFILES/tfamily00000.h5 $SRC_TOOLS_TESTFILES/tfamily00001.h5 @@ -156,6 +165,12 @@ $SRC_H5REPACK_TESTFILES/2_vds.h5-vds_chunk3x6x9-v.ddl $SRC_H5REPACK_TESTFILES/3_1_vds.h5-vds_chunk2x5x8-v.ddl $SRC_H5REPACK_TESTFILES/4_vds.h5-vds_compa-v.ddl $SRC_H5REPACK_TESTFILES/4_vds.h5-vds_conti-v.ddl +$SRC_H5REPACK_TESTFILES/SP.h5repack_fsm_aggr_nopersist.h5.ddl +$SRC_H5REPACK_TESTFILES/S.h5repack_fsm_aggr_persist.h5.ddl +$SRC_H5REPACK_TESTFILES/STG.h5repack_none.h5.ddl +$SRC_H5REPACK_TESTFILES/GS.h5repack_paged_nopersist.h5.ddl +$SRC_H5REPACK_TESTFILES/SP.h5repack_paged_persist.h5.ddl +$SRC_H5REPACK_TESTFILES/SPT.h5repack_aggr.h5.ddl " # @@ -707,6 +722,58 @@ TOOLTEST_DUMP() rm -f $outfile } +# This is similar to TOOLTEST_DUMP(). +# Test h5repack with options added for paged aggregation. +# h5stat is used on the repacked file and the expected output +# is compared for correctness. +# +TOOLTEST_STAT() +{ + infile=$2 + outfile=out-$1.$2 + expect="$TESTDIR/$1.$2.ddl" + actual="$TESTDIR/out-$1.$2.out" + actual_err="$TESTDIR/out-$1.$2.err" + + shift + shift + + # Run test. + TESTING $H5REPACK $@ + ( + cd $TESTDIR + $RUNSERIAL $H5REPACK_BIN "$@" $infile $outfile + ) >$actual 2>$actual_err + RET=$? + if [ $RET != 0 ] ; then + echo "*FAILED*" + nerrors="`expr $nerrors + 1`" + else + echo " PASSED" + VERIFY h5stat output $@ + ( + cd $TESTDIR + $RUNSERIAL $H5STAT_BIN -S -s $outfile + ) >$actual 2>$actual_err + cat $actual_err >> $actual + + RET=$? + + fi + + if cmp -s $expect $actual; then + echo " PASSED" + else + echo "*FAILED*" + echo " Expected result (*.ddl) differs from actual result (*.out)" + nerrors="`expr $nerrors + 1`" + test yes = "$verbose" && diff -c $expect $actual |sed 's/^/ /' + fi + + rm -f $actual $actual_err + rm -f $outfile +} + # TOOLTEST_META: # Test metadata block size option. # Reason to create a function here is to localize all special steps related to @@ -1057,6 +1124,42 @@ fi arg="tordergr.h5 -L" TOOLTEST_DUMP crtorder $arg +################################################################################################### +# Testing paged aggregation related options: +# -G pagesize +# -P 1 or 0 +# -S strategy +# -T threshold +# +# The testfiles used are generated by test/gen_filespace.c and the file names are prepended with "h5repack_": +# (1) "fsm_aggr_nopersist.h5" /* H5F_FSPACE_STRATEGY_FSM_AGGR + not persisting free-space */ +# (2) "fsm_aggr_persist.h5" /* H5F_FSPACE_STRATEGY_FSM_AGGR + persisting free-space */ +# (3) "paged_nopersist.h5" /* H5F_FSPACE_STRATEGY_PAGE + not persisting free-space */ +# (4) "paged_persist.h5" /* H5F_FSPACE_STRATEGY_PAGE + persisting free-space */ +# (5) "aggr.h5" /* H5F_FSPACE_STRATEGY_AGGR */ +# (6) "none.h5" /* H5F_FSPACE_STRATEGY_NONE */ +# +##################################################################################################### +# +arg="h5repack_fsm_aggr_nopersist.h5 -S PAGE -P 1" +TOOLTEST_STAT SP $arg +# +arg="h5repack_fsm_aggr_persist.h5 -S AGGR" +TOOLTEST_STAT S $arg +# +arg="h5repack_none.h5 -S PAGE -T 10 -G 2048" +TOOLTEST_STAT STG $arg +# +arg="h5repack_paged_nopersist.h5 -G 512 -S AGGR" +TOOLTEST_STAT GS $arg +# +arg="h5repack_paged_persist.h5 -S NONE -P 1" +TOOLTEST_STAT SP $arg +# +arg="h5repack_aggr.h5 -S FSM_AGGR -P 1 -T 5" +TOOLTEST_STAT SPT $arg + + ######################################################### # layout options (these files have no filters) ######################################################### diff --git a/tools/test/h5repack/testfiles/GS.h5repack_paged_nopersist.h5.ddl b/tools/test/h5repack/testfiles/GS.h5repack_paged_nopersist.h5.ddl new file mode 100644 index 0000000..d8ca992 --- /dev/null +++ b/tools/test/h5repack/testfiles/GS.h5repack_paged_nopersist.h5.ddl @@ -0,0 +1,15 @@ +Filename: out-GS.h5repack_paged_nopersist.h5 +Free-space persist: FALSE +Free-space section threshold: 1 bytes +Small size free-space sections (< 10 bytes): + Total # of small size sections: 0 +Free-space section bins: + Total # of sections: 0 +File space management strategy: H5F_FSPACE_STRATEGY_AGGR +File space page size: 512 bytes +Summary of file space information: + File metadata: 1272 bytes + Raw data: 400 bytes + Amount/Percent of tracked free space: 0 bytes/0.0% + Unaccounted space: 776 bytes +Total space: 2448 bytes diff --git a/tools/test/h5repack/testfiles/S.h5repack_fsm_aggr_persist.h5.ddl b/tools/test/h5repack/testfiles/S.h5repack_fsm_aggr_persist.h5.ddl new file mode 100644 index 0000000..87ccbc4 --- /dev/null +++ b/tools/test/h5repack/testfiles/S.h5repack_fsm_aggr_persist.h5.ddl @@ -0,0 +1,15 @@ +Filename: out-S.h5repack_fsm_aggr_persist.h5 +Free-space persist: FALSE +Free-space section threshold: 1 bytes +Small size free-space sections (< 10 bytes): + Total # of small size sections: 0 +Free-space section bins: + Total # of sections: 0 +File space management strategy: H5F_FSPACE_STRATEGY_AGGR +File space page size: 4096 bytes +Summary of file space information: + File metadata: 1272 bytes + Raw data: 400 bytes + Amount/Percent of tracked free space: 0 bytes/0.0% + Unaccounted space: 776 bytes +Total space: 2448 bytes diff --git a/tools/test/h5repack/testfiles/SP.h5repack_fsm_aggr_nopersist.h5.ddl b/tools/test/h5repack/testfiles/SP.h5repack_fsm_aggr_nopersist.h5.ddl new file mode 100644 index 0000000..affa93b --- /dev/null +++ b/tools/test/h5repack/testfiles/SP.h5repack_fsm_aggr_nopersist.h5.ddl @@ -0,0 +1,16 @@ +Filename: out-SP.h5repack_fsm_aggr_nopersist.h5 +Free-space persist: TRUE +Free-space section threshold: 1 bytes +Small size free-space sections (< 10 bytes): + Total # of small size sections: 0 +Free-space section bins: + # of sections of size 1000 - 9999: 2 + Total # of sections: 2 +File space management strategy: H5F_FSPACE_STRATEGY_PAGE +File space page size: 4096 bytes +Summary of file space information: + File metadata: 1602 bytes + Raw data: 400 bytes + Amount/Percent of tracked free space: 6307 bytes/38.5% + Unaccounted space: 8075 bytes +Total space: 16384 bytes diff --git a/tools/test/h5repack/testfiles/SP.h5repack_paged_persist.h5.ddl b/tools/test/h5repack/testfiles/SP.h5repack_paged_persist.h5.ddl new file mode 100644 index 0000000..1084090 --- /dev/null +++ b/tools/test/h5repack/testfiles/SP.h5repack_paged_persist.h5.ddl @@ -0,0 +1,15 @@ +Filename: out-SP.h5repack_paged_persist.h5 +Free-space persist: FALSE +Free-space section threshold: 1 bytes +Small size free-space sections (< 10 bytes): + Total # of small size sections: 0 +Free-space section bins: + Total # of sections: 0 +File space management strategy: H5F_FSPACE_STRATEGY_NONE +File space page size: 4096 bytes +Summary of file space information: + File metadata: 1272 bytes + Raw data: 400 bytes + Amount/Percent of tracked free space: 0 bytes/0.0% + Unaccounted space: 0 bytes +Total space: 1672 bytes diff --git a/tools/test/h5repack/testfiles/SPT.h5repack_aggr.h5.ddl b/tools/test/h5repack/testfiles/SPT.h5repack_aggr.h5.ddl new file mode 100644 index 0000000..1ce06b2 --- /dev/null +++ b/tools/test/h5repack/testfiles/SPT.h5repack_aggr.h5.ddl @@ -0,0 +1,16 @@ +Filename: out-SPT.h5repack_aggr.h5 +Free-space persist: TRUE +Free-space section threshold: 5 bytes +Small size free-space sections (< 10 bytes): + Total # of small size sections: 0 +Free-space section bins: + # of sections of size 100 - 999: 1 + Total # of sections: 1 +File space management strategy: H5F_FSPACE_STRATEGY_FSM_AGGR +File space page size: 4096 bytes +Summary of file space information: + File metadata: 1485 bytes + Raw data: 400 bytes + Amount/Percent of tracked free space: 680 bytes/26.5% + Unaccounted space: 0 bytes +Total space: 2565 bytes diff --git a/tools/test/h5repack/testfiles/STG.h5repack_none.h5.ddl b/tools/test/h5repack/testfiles/STG.h5repack_none.h5.ddl new file mode 100644 index 0000000..51cd7e5 --- /dev/null +++ b/tools/test/h5repack/testfiles/STG.h5repack_none.h5.ddl @@ -0,0 +1,15 @@ +Filename: out-STG.h5repack_none.h5 +Free-space persist: FALSE +Free-space section threshold: 10 bytes +Small size free-space sections (< 10 bytes): + Total # of small size sections: 0 +Free-space section bins: + Total # of sections: 0 +File space management strategy: H5F_FSPACE_STRATEGY_PAGE +File space page size: 2048 bytes +Summary of file space information: + File metadata: 1272 bytes + Raw data: 400 bytes + Amount/Percent of tracked free space: 0 bytes/0.0% + Unaccounted space: 2424 bytes +Total space: 4096 bytes diff --git a/tools/test/h5repack/testfiles/h5repack_aggr.h5 b/tools/test/h5repack/testfiles/h5repack_aggr.h5 new file mode 100644 index 0000000..8da0751 Binary files /dev/null and b/tools/test/h5repack/testfiles/h5repack_aggr.h5 differ diff --git a/tools/test/h5repack/testfiles/h5repack_fsm_aggr_nopersist.h5 b/tools/test/h5repack/testfiles/h5repack_fsm_aggr_nopersist.h5 new file mode 100644 index 0000000..1cd5f3f Binary files /dev/null and b/tools/test/h5repack/testfiles/h5repack_fsm_aggr_nopersist.h5 differ diff --git a/tools/test/h5repack/testfiles/h5repack_fsm_aggr_persist.h5 b/tools/test/h5repack/testfiles/h5repack_fsm_aggr_persist.h5 new file mode 100644 index 0000000..469dbce Binary files /dev/null and b/tools/test/h5repack/testfiles/h5repack_fsm_aggr_persist.h5 differ diff --git a/tools/test/h5repack/testfiles/h5repack_none.h5 b/tools/test/h5repack/testfiles/h5repack_none.h5 new file mode 100644 index 0000000..2e4d789 Binary files /dev/null and b/tools/test/h5repack/testfiles/h5repack_none.h5 differ diff --git a/tools/test/h5repack/testfiles/h5repack_paged_nopersist.h5 b/tools/test/h5repack/testfiles/h5repack_paged_nopersist.h5 new file mode 100644 index 0000000..352e586 Binary files /dev/null and b/tools/test/h5repack/testfiles/h5repack_paged_nopersist.h5 differ diff --git a/tools/test/h5repack/testfiles/h5repack_paged_persist.h5 b/tools/test/h5repack/testfiles/h5repack_paged_persist.h5 new file mode 100644 index 0000000..64c3b23 Binary files /dev/null and b/tools/test/h5repack/testfiles/h5repack_paged_persist.h5 differ -- cgit v0.12 From bda86da40b5c4937fa02ff4aa5a8f0bf89ba2d0b Mon Sep 17 00:00:00 2001 From: Vailin Choi Date: Wed, 2 Aug 2017 23:36:35 -0500 Subject: Update release notes 1) Fixes for paged aggregation 2) Fix for HDFFV-10217 3) Fix for HDFFV-7853 --- release_docs/RELEASE.txt | 43 ++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 42 insertions(+), 1 deletion(-) diff --git a/release_docs/RELEASE.txt b/release_docs/RELEASE.txt index b6f508b..08e2477 100644 --- a/release_docs/RELEASE.txt +++ b/release_docs/RELEASE.txt @@ -175,7 +175,41 @@ Bug Fixes since HDF5-1.10.0-patch1 release Library ------- - - + - Fixes for paged aggregation + + Skip test in test/fheap.c when: + (1) multi/split drivers and + (2) persisting free-space or using paged aggregation strategy + + (VC, 2017/07/10) + + - Fixes for paged aggregation + + Changes made based on RFC review comments: + (1) Add maximum value for file space page size + (2) Drop check for page end metadata threshold + (3) Remove "can_shrink" and "shrink" callbacks for small section class + + (VC, 2017/06/09) + + - Fix for infinite loop in H5VM_power2up(). + + The function H5VM_power2up() returns the next power of 2 + for n. When n exceeds 2^63, it overflows and becomes 0 causing + the infinite looping. + + The fix ensures that the function checks for n >= 2^63 + and returns 0. + + (HDFFV-10217, VC, 2017/07/10) + + - Fix for H5Ocopy doesn't work with open identifiers + + Changes made so that raw data for dataset objects are copied from + cached info when possible instead of flushing objects to file and + read them back in again. + + (HDFFV-7853, VC, 2017/07/05) Configuration ------------- @@ -225,6 +259,13 @@ Bug Fixes since HDF5-1.10.0-patch1 release Tools ----- + - h5repack + + Add tests to h5repack.sh.in to verify options added for paged + aggregation work as expected. + + (VC, 2017/08/03) + - h5diff h5diff segfaulted on compare of a NULL variable length string. -- cgit v0.12 From 98d4addcf7cbec71600663e7023b6b7e0b5b5f35 Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Wed, 2 Aug 2017 10:53:17 -0500 Subject: Add h5repack tests for paged aggregation --- tools/test/h5repack/CMakeTests.cmake | 97 ++++++++++++++++++++++++++++++++++-- 1 file changed, 94 insertions(+), 3 deletions(-) diff --git a/tools/test/h5repack/CMakeTests.cmake b/tools/test/h5repack/CMakeTests.cmake index 897209c..225f6a8 100644 --- a/tools/test/h5repack/CMakeTests.cmake +++ b/tools/test/h5repack/CMakeTests.cmake @@ -76,6 +76,12 @@ ${HDF5_TOOLS_TEST_H5REPACK_SOURCE_DIR}/testfiles/h5repack_shuffle.h5 ${HDF5_TOOLS_TEST_H5REPACK_SOURCE_DIR}/testfiles/h5repack_soffset.h5 ${HDF5_TOOLS_TEST_H5REPACK_SOURCE_DIR}/testfiles/h5repack_szip.h5 + ${HDF5_TOOLS_TEST_H5REPACK_SOURCE_DIR}/testfiles/h5repack_aggr.h5 + ${HDF5_TOOLS_TEST_H5REPACK_SOURCE_DIR}/testfiles/h5repack_fsm_aggr_nopersist.h5 + ${HDF5_TOOLS_TEST_H5REPACK_SOURCE_DIR}/testfiles/h5repack_fsm_aggr_persist.h5 + ${HDF5_TOOLS_TEST_H5REPACK_SOURCE_DIR}/testfiles/h5repack_none.h5 + ${HDF5_TOOLS_TEST_H5REPACK_SOURCE_DIR}/testfiles/h5repack_paged_nopersist.h5 + ${HDF5_TOOLS_TEST_H5REPACK_SOURCE_DIR}/testfiles/h5repack_paged_persist.h5 # h5diff/testfile ${HDF5_TOOLS_TEST_H5DIFF_SOURCE_DIR}/testfiles/h5diff_attr1.h5 # tools/testfiles @@ -139,6 +145,12 @@ ${HDF5_TOOLS_TEST_H5REPACK_SOURCE_DIR}/testfiles/4_vds.h5-vds_conti-v.ddl ${HDF5_TOOLS_TEST_H5REPACK_SOURCE_DIR}/testfiles/h5repack_layout.h5-plugin_zero.tst ${HDF5_TOOLS_TEST_H5REPACK_SOURCE_DIR}/testfiles/crtorder.tordergr.h5.ddl + ${HDF5_TOOLS_TEST_H5REPACK_SOURCE_DIR}/testfiles/SP.h5repack_fsm_aggr_nopersist.h5.ddl + ${HDF5_TOOLS_TEST_H5REPACK_SOURCE_DIR}/testfiles/S.h5repack_fsm_aggr_persist.h5.ddl + ${HDF5_TOOLS_TEST_H5REPACK_SOURCE_DIR}/testfiles/STG.h5repack_none.h5.ddl + ${HDF5_TOOLS_TEST_H5REPACK_SOURCE_DIR}/testfiles/GS.h5repack_paged_nopersist.h5.ddl + ${HDF5_TOOLS_TEST_H5REPACK_SOURCE_DIR}/testfiles/SP.h5repack_paged_persist.h5.ddl + ${HDF5_TOOLS_TEST_H5REPACK_SOURCE_DIR}/testfiles/SPT.h5repack_aggr.h5.ddl ) foreach (h5_file ${LIST_HDF5_TEST_FILES} ${LIST_OTHER_TEST_FILES}) @@ -238,7 +250,8 @@ if (HDF5_ENABLE_USING_MEMCHECKER) add_test ( NAME H5REPACK_CMP-${testname} - COMMAND $ ${ARGN} ${PROJECT_BINARY_DIR}/testfiles/${resultfile} ${PROJECT_BINARY_DIR}/testfiles/out-${testname}.${resultfile}) + COMMAND $ ${ARGN} ${PROJECT_BINARY_DIR}/testfiles/${resultfile} ${PROJECT_BINARY_DIR}/testfiles/out-${testname}.${resultfile} + ) else () add_test ( NAME H5REPACK_CMP-${testname} @@ -272,7 +285,8 @@ if (HDF5_ENABLE_USING_MEMCHECKER) add_test ( NAME H5REPACK_MASK-${testname} - COMMAND $ ${ARGN} ${PROJECT_BINARY_DIR}/testfiles/${resultfile} ${PROJECT_BINARY_DIR}/testfiles/out-${testname}.${resultfile}) + COMMAND $ ${ARGN} ${PROJECT_BINARY_DIR}/testfiles/${resultfile} ${PROJECT_BINARY_DIR}/testfiles/out-${testname}.${resultfile} + ) else (HDF5_ENABLE_USING_MEMCHECKER) add_test ( NAME H5REPACK_MASK-${testname} @@ -305,7 +319,8 @@ # If using memchecker add tests without using scripts add_test ( NAME H5REPACK_DMP-${testname} - COMMAND $ ${ARGN} ${PROJECT_BINARY_DIR}/testfiles/${resultfile} ${PROJECT_BINARY_DIR}/testfiles/out-${testname}.${resultfile}) + COMMAND $ ${ARGN} ${PROJECT_BINARY_DIR}/testfiles/${resultfile} ${PROJECT_BINARY_DIR}/testfiles/out-${testname}.${resultfile} + ) if (NOT "${last_test}" STREQUAL "") set_tests_properties (H5REPACK_DMP-${testname} PROPERTIES DEPENDS ${last_test}) endif () @@ -326,6 +341,40 @@ endif () endmacro () + macro (ADD_H5_STAT_TEST testname testtype resultcode statarg resultfile) + if ("${testtype}" STREQUAL "SKIP") + if (NOT HDF5_ENABLE_USING_MEMCHECKER) + add_test ( + NAME H5REPACK_STAT-${testname}-SKIPPED + COMMAND ${CMAKE_COMMAND} -E echo "SKIP ${ARGN} ${PROJECT_BINARY_DIR}/testfiles/${resultfile} ${PROJECT_BINARY_DIR}/testfiles/out-${statarg}.${resultfile}" + ) + endif () + else () + # If using memchecker add tests without using scripts + add_test ( + NAME H5REPACK_STAT-${testname} + COMMAND $ ${ARGN} ${PROJECT_BINARY_DIR}/testfiles/${resultfile} ${PROJECT_BINARY_DIR}/testfiles/out-${statarg}.${resultfile} + ) + if (NOT "${last_test}" STREQUAL "") + set_tests_properties (H5REPACK_STAT-${testname} PROPERTIES DEPENDS ${last_test}) + endif () + if (NOT HDF5_ENABLE_USING_MEMCHECKER) + add_test ( + NAME H5REPACK_STAT-h5stat-${testname} + COMMAND "${CMAKE_COMMAND}" + -D "TEST_PROGRAM=$" + -D "TEST_ARGS:STRING=-S;-s;out-${statarg}.${resultfile}" + -D "TEST_FOLDER=${PROJECT_BINARY_DIR}/testfiles" + -D "TEST_OUTPUT=${resultfile}-${testname}.out" + -D "TEST_EXPECT=${resultcode}" + -D "TEST_REFERENCE=${statarg}.${resultfile}.ddl" + -P "${HDF_RESOURCES_EXT_DIR}/runTest.cmake" + ) + set_tests_properties (H5REPACK_STAT-h5stat-${testname} PROPERTIES DEPENDS "H5REPACK_STAT-${testname}") + endif () + endif () + endmacro () + macro (ADD_H5_VERIFY_TEST testname testtype resultcode testfile testdset testfilter) if ("${testtype}" STREQUAL "SKIP") if (NOT HDF5_ENABLE_USING_MEMCHECKER) @@ -972,6 +1021,48 @@ set (TESTTYPE "TEST") ADD_H5_DMP_TEST (crtorder ${TESTTYPE} 0 ${arg}) +################################################################################################### +# Testing paged aggregation related options: +# -G pagesize +# -P 1 or 0 +# -S strategy +# -T threshold +# +# The testfiles used are generated by test/gen_filespace.c and the file names are prepended with "h5repack_": +# (1) "fsm_aggr_nopersist.h5" /* H5F_FSPACE_STRATEGY_FSM_AGGR + not persisting free-space */ +# (2) "fsm_aggr_persist.h5" /* H5F_FSPACE_STRATEGY_FSM_AGGR + persisting free-space */ +# (3) "paged_nopersist.h5" /* H5F_FSPACE_STRATEGY_PAGE + not persisting free-space */ +# (4) "paged_persist.h5" /* H5F_FSPACE_STRATEGY_PAGE + persisting free-space */ +# (5) "aggr.h5" /* H5F_FSPACE_STRATEGY_AGGR */ +# (6) "none.h5" /* H5F_FSPACE_STRATEGY_NONE */ +# +##################################################################################################### +# + set (arg h5repack_fsm_aggr_nopersist.h5 -S PAGE -P 1) + set (TESTTYPE "TEST") + ADD_H5_STAT_TEST (SP_PAGE ${TESTTYPE} 0 SP ${arg}) + + set (arg h5repack_fsm_aggr_persist.h5 -S AGGR) + set (TESTTYPE "TEST") + ADD_H5_STAT_TEST (S_AGGR ${TESTTYPE} 0 S ${arg}) + + set (arg h5repack_none.h5 -S PAGE -T 10 -G 2048) + set (TESTTYPE "TEST") + ADD_H5_STAT_TEST (STG_PAGE ${TESTTYPE} 0 STG ${arg}) + + set (arg h5repack_paged_nopersist.h5 -G 512 -S AGGR) + set (TESTTYPE "TEST") + ADD_H5_STAT_TEST (GS_AGGR ${TESTTYPE} 0 GS ${arg}) + + set (arg h5repack_paged_persist.h5 -S NONE -P 1) + set (TESTTYPE "TEST") + ADD_H5_STAT_TEST (SP_NONE ${TESTTYPE} 0 SP ${arg}) + + set (arg h5repack_aggr.h5 -S FSM_AGGR -P 1 -T 5) + set (TESTTYPE "TEST") + ADD_H5_STAT_TEST (SPT_FSM_AGGR ${TESTTYPE} 0 SPT ${arg}) + + ######################################################### # layout options (these files have no filters) ######################################################### -- cgit v0.12 From 04d72b2c4200c68e9bdaf09b015c62a00c6a12d4 Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Fri, 4 Aug 2017 11:20:10 -0500 Subject: HDFFV-10219 and HDFFV-10256 merge from develop --- MANIFEST | 12 +- release_docs/RELEASE.txt | 24 +- tools/lib/h5tools.c | 2 +- tools/src/h5dump/h5dump_xml.c | 8 +- tools/src/h5import/h5import.c | 982 ++++++++++++++++++++--- tools/src/h5import/h5import.h | 8 +- tools/test/h5dump/CMakeTests.cmake | 4 +- tools/test/h5dump/CMakeTestsXML.cmake | 7 + tools/test/h5dump/testh5dump.sh.in | 4 +- tools/test/h5dump/testh5dumpxml.sh.in | 5 + tools/test/h5import/CMakeTests.cmake | 131 ++- tools/test/h5import/h5importtest.c | 131 ++- tools/test/h5import/h5importtestutil.sh.in | 110 ++- tools/test/h5import/testfiles/binfp64.conf | 13 - tools/test/h5import/testfiles/binin16.conf | 12 - tools/test/h5import/testfiles/binin32.conf | 12 - tools/test/h5import/testfiles/binin32.h5 | Bin 9472 -> 6920 bytes tools/test/h5import/testfiles/binin8.conf | 16 - tools/test/h5import/testfiles/binin8w.conf | 9 - tools/test/h5import/testfiles/binuin16.conf | 12 - tools/test/h5import/testfiles/binuin32.conf | 12 - tools/test/h5import/testfiles/tall_fp32.ddl | 28 + tools/test/h5import/testfiles/tall_i32.ddl | 32 + tools/test/h5import/testfiles/tintsattrs_u32.ddl | 28 + tools/testfiles/test35.nc | Bin 0 -> 14297 bytes tools/testfiles/test35.nc.xml | 20 + 26 files changed, 1333 insertions(+), 289 deletions(-) delete mode 100644 tools/test/h5import/testfiles/binfp64.conf delete mode 100644 tools/test/h5import/testfiles/binin16.conf delete mode 100644 tools/test/h5import/testfiles/binin32.conf delete mode 100644 tools/test/h5import/testfiles/binin8.conf delete mode 100644 tools/test/h5import/testfiles/binin8w.conf delete mode 100644 tools/test/h5import/testfiles/binuin16.conf delete mode 100644 tools/test/h5import/testfiles/binuin32.conf create mode 100644 tools/test/h5import/testfiles/tall_fp32.ddl create mode 100644 tools/test/h5import/testfiles/tall_i32.ddl create mode 100644 tools/test/h5import/testfiles/tintsattrs_u32.ddl create mode 100644 tools/testfiles/test35.nc create mode 100644 tools/testfiles/test35.nc.xml diff --git a/MANIFEST b/MANIFEST index 8e33cfb..c7be549 100644 --- a/MANIFEST +++ b/MANIFEST @@ -1275,20 +1275,16 @@ ./tools/test/h5import/h5importtestutil.sh.in # testfiles for h5import -./tools/test/h5import/testfiles/binfp64.conf ./tools/test/h5import/testfiles/binfp64.h5 -./tools/test/h5import/testfiles/binin16.conf ./tools/test/h5import/testfiles/binin16.h5 -./tools/test/h5import/testfiles/binin32.conf ./tools/test/h5import/testfiles/binin32.h5 -./tools/test/h5import/testfiles/binin8.conf ./tools/test/h5import/testfiles/binin8.h5 -./tools/test/h5import/testfiles/binin8w.conf ./tools/test/h5import/testfiles/binin8w.h5 -./tools/test/h5import/testfiles/binuin16.conf ./tools/test/h5import/testfiles/binuin16.h5 -./tools/test/h5import/testfiles/binuin32.conf ./tools/test/h5import/testfiles/binuin32.h5 +./tools/test/h5import/testfiles/tall_fp32.ddl +./tools/test/h5import/testfiles/tall_i32.ddl +./tools/test/h5import/testfiles/tintsattrs_u32.ddl ./tools/test/h5import/testfiles/textpfe.conf ./tools/test/h5import/testfiles/textpfe.h5 ./tools/test/h5import/testfiles/textpfe64.txt @@ -2090,6 +2086,8 @@ ./tools/testfiles/tdset2.h5.xml ./tools/testfiles/tempty.h5.xml ./tools/testfiles/tenum.h5.xml +./tools/testfiles/test35.nc +./tools/testfiles/test35.nc.xml ./tools/testfiles/tfpformat.h5.xml ./tools/testfiles/tgroup.h5.xml ./tools/testfiles/thlink.h5.xml diff --git a/release_docs/RELEASE.txt b/release_docs/RELEASE.txt index 08e2477..b5a06f5 100644 --- a/release_docs/RELEASE.txt +++ b/release_docs/RELEASE.txt @@ -266,6 +266,16 @@ Bug Fixes since HDF5-1.10.0-patch1 release (VC, 2017/08/03) + - h5dump + + h5dump segfaulted on output of XML file. + + Function that escape'd strings used the full buffer length + instead of just the length of the replacement string in a + strncpy call. Using the correct length fixed the issue. + + (ADB - 2017/08/01, HDFFV-10256) + - h5diff h5diff segfaulted on compare of a NULL variable length string. @@ -275,6 +285,18 @@ Bug Fixes since HDF5-1.10.0-patch1 release (ADB - 2017/07/25, HDFFV-10246) + - h5import + + h5import crashed trying to import data from a subset of a dataset. + + Improved h5import by adding the SUBSET keyword. h5import understands + to use the Count times the Block as the size of the dimensions. + Added INPUT_B_ORDER keyword to old-style configuration files. + The import from h5dump function expects the binary files to use native + types (FILE '-b' option) in the binary file. + + (ADB - 2017/06/15, HDFFV-10219) + - h5repack h5repack did not maintain the creation order flag of the root @@ -282,7 +304,7 @@ Bug Fixes since HDF5-1.10.0-patch1 release Improved h5repack by reading the creation order and applying the flag to the new root group. Also added arguments to set the - order and index direction, which applys to the traversing of the + order and index direction, which applies to the traversing of the original file, on the command line. (ADB - 2017/05/26, HDFFV-8611) diff --git a/tools/lib/h5tools.c b/tools/lib/h5tools.c index 5f01a41..5031e44 100644 --- a/tools/lib/h5tools.c +++ b/tools/lib/h5tools.c @@ -34,7 +34,7 @@ FILE *rawinstream = NULL; /* should initialize to stdin but gcc moa FILE *rawoutstream = NULL; /* should initialize to stdout but gcc moans about it */ FILE *rawerrorstream = NULL; /* should initialize to stderr but gcc moans about it */ int bin_output; /* binary output */ -int bin_form; /* binary form */ +int bin_form = 0; /* binary form, default NATIVE */ int region_output; /* region output */ int oid_output; /* oid output */ int data_output; /* data output */ diff --git a/tools/src/h5dump/h5dump_xml.c b/tools/src/h5dump/h5dump_xml.c index bb0fd7a..49d4f96 100644 --- a/tools/src/h5dump/h5dump_xml.c +++ b/tools/src/h5dump/h5dump_xml.c @@ -780,20 +780,20 @@ xml_escape_the_string(const char *str, int slen) esc_len = 1; } else if (*cp == '\'') { - HDstrncpy(ncp, apos, ncp_len); esc_len = HDstrlen(apos); + HDstrncpy(ncp, apos, esc_len); } else if (*cp == '<') { - HDstrncpy(ncp, lt, ncp_len); esc_len = HDstrlen(lt); + HDstrncpy(ncp, lt, esc_len); } else if (*cp == '>') { - HDstrncpy(ncp, gt, ncp_len); esc_len = HDstrlen(gt); + HDstrncpy(ncp, gt, esc_len); } else if (*cp == '&') { - HDstrncpy(ncp, amp, ncp_len); esc_len = HDstrlen(amp); + HDstrncpy(ncp, amp, esc_len); } else { *ncp = *cp; diff --git a/tools/src/h5import/h5import.c b/tools/src/h5import/h5import.c index c71aeef..36a8c21 100644 --- a/tools/src/h5import/h5import.c +++ b/tools/src/h5import/h5import.c @@ -13,10 +13,6 @@ #include "hdf5.h" #include "H5private.h" -#include -#include -#include -#include #include "h5import.h" #include "h5tools.h" #include "h5tools_utils.h" @@ -40,6 +36,7 @@ static int parseDimensions(struct Input *in, char *strm); static int getInputSize(struct Input *in, int ival); static int getInputClass(struct Input *in, char * strm); static int getInputClassType(struct Input *in, char * strm); +static int getInputByteOrder(struct Input *in, FILE *strm); static int InputClassStrToInt(char *temp); static int getRank(struct Input *in, FILE *strm); static int getDimensionSizes(struct Input *in, FILE *strm); @@ -66,6 +63,12 @@ static int allocateUIntegerStorage(struct Input *in); static int validateConfigurationParameters(struct Input *in); static int processStrData(FILE *strm, struct Input *in, hid_t file_id); static int processStrHDFData(FILE *strm, struct Input *in, hid_t file_id); +uint16_t swap_uint16(uint16_t val); +int16_t swap_int16(int16_t val); +uint32_t swap_uint32(uint32_t val); +int32_t swap_int32(int32_t val); +int64_t swap_int64(int64_t val); +uint64_t swap_uint64(uint64_t val); int main(int argc, char *argv[]) { @@ -226,7 +229,7 @@ int main(int argc, char *argv[]) if (process(&opt) == -1) goto err; - + for (i = 0; i < opt.fcount; i++) { in = &(opt.infiles[i].in); if (in->sizeOfDimension) @@ -242,7 +245,7 @@ int main(int argc, char *argv[]) } return (EXIT_SUCCESS); -err: +err: (void) HDfprintf(stderr, "%s", err4); for (i = 0; i < opt.fcount; i++) { in = &(opt.infiles[i].in); @@ -450,10 +453,12 @@ static int readIntegerData(FILE *strm, struct Input *in) { H5DT_INT8 *in08; H5DT_INT16 *in16; - H5DT_INT16 temp; + H5DT_INT16 temp16; H5DT_INT32 *in32; + H5DT_INT32 temp32; #ifdef H5_SIZEOF_LONG_LONG H5DT_INT64 *in64; + H5DT_INT64 temp64; char buffer[256]; #endif hsize_t len = 1; @@ -473,11 +478,11 @@ static int readIntegerData(FILE *strm, struct Input *in) case 0: /* TEXTIN */ in08 = (H5DT_INT8 *) in->data; for (i = 0; i < len; i++, in08++) { - if (fscanf(strm, "%hd", &temp) != 1) { + if (fscanf(strm, "%hd", &temp16) != 1) { (void) HDfprintf(stderr, "%s", err1); return (-1); } - (*in08) = (H5DT_INT8) temp; + (*in08) = (H5DT_INT8) temp16; } break; @@ -488,6 +493,9 @@ static int readIntegerData(FILE *strm, struct Input *in) (void) HDfprintf(stderr, "%s", err1); return (-1); } +#ifdef H5DEBUGIMPORT + printf("readIntegerData %d (0x%.8X)\n", *in08, *in08); +#endif } break; @@ -512,10 +520,19 @@ static int readIntegerData(FILE *strm, struct Input *in) case 4: /* IN */ for (i = 0; i < len; i++, in16++) { - if (HDfread((char *) in16, sizeof(H5DT_INT16), 1, strm) != 1) { + if (HDfread((char *)&temp16, sizeof(H5DT_INT16), 1, strm) != 1) { (void) HDfprintf(stderr, "%s", err1); return (-1); } +/* + if (in-> h5dumpInput && (in->inputByteOrder != in->outputByteOrder)) + *in16 = swap_int16(temp16); + else +*/ + *in16 = temp16; +#ifdef H5DEBUGIMPORT + printf("readIntegerData %d (0x%.8X)\n", *in16, temp16); +#endif } break; @@ -539,10 +556,19 @@ static int readIntegerData(FILE *strm, struct Input *in) case 4: /* IN */ for (i = 0; i < len; i++, in32++) { - if (HDfread((char *) in32, sizeof(H5DT_INT32), 1, strm) != 1) { + if (HDfread((char *)&temp32, sizeof(H5DT_INT32), 1, strm) != 1) { (void) HDfprintf(stderr, "%s", err1); return (-1); } +/* + if (in-> h5dumpInput && (in->inputByteOrder != in->outputByteOrder)) + *in32 = swap_int32(temp32); + else +*/ + *in32 = temp32; +#ifdef H5DEBUGIMPORT + printf("readIntegerData %d (0x%.8X = 0x%.8X)\n", *in32, *in32, temp32); +#endif } break; @@ -568,10 +594,19 @@ static int readIntegerData(FILE *strm, struct Input *in) case 4: /* IN */ for (i = 0; i < len; i++, in64++) { - if (HDfread((char *) in64, sizeof(H5DT_INT64), 1, strm) != 1) { + if (HDfread((char *)&temp64, sizeof(H5DT_INT64), 1, strm) != 1) { (void) HDfprintf(stderr, "%s", err1); return (-1); } +/* + if (in-> h5dumpInput && (in->inputByteOrder != in->outputByteOrder)) + *in64 = swap_int64(temp64); + else +*/ + *in64 = temp64; +#ifdef H5DEBUGIMPORT + printf("readIntegerData %d (0x%.8X)\n", *in64, temp64); +#endif } break; @@ -593,10 +628,12 @@ static int readUIntegerData(FILE *strm, struct Input *in) { H5DT_UINT8 *in08; H5DT_UINT16 *in16; - H5DT_UINT16 temp; + H5DT_UINT16 temp16; H5DT_UINT32 *in32; + H5DT_UINT32 temp32; #ifdef H5_SIZEOF_LONG_LONG H5DT_UINT64 *in64; + H5DT_UINT64 temp64; char buffer[256]; #endif hsize_t len = 1; @@ -615,11 +652,11 @@ static int readUIntegerData(FILE *strm, struct Input *in) case 6: /* TEXTUIN */ in08 = (H5DT_UINT8 *) in->data; for (i = 0; i < len; i++, in08++) { - if (fscanf(strm, "%hu", &temp) != 1) { + if (fscanf(strm, "%hu", &temp16) != 1) { (void) HDfprintf(stderr, "%s", err1); return (-1); } - (*in08) = (H5DT_UINT8) temp; + (*in08) = (H5DT_UINT8) temp16; } break; @@ -653,10 +690,19 @@ static int readUIntegerData(FILE *strm, struct Input *in) case 7: /* UIN */ for (i = 0; i < len; i++, in16++) { - if (HDfread((char *) in16, sizeof(H5DT_UINT16), 1, strm) != 1) { + if (HDfread((char *)&temp16, sizeof(H5DT_UINT16), 1, strm) != 1) { (void) HDfprintf(stderr, "%s", err1); return (-1); } +/* + if (in-> h5dumpInput && (in->inputByteOrder != in->outputByteOrder)) + *in16 = swap_uint16(temp16); + else +*/ + *in16 = temp16; +#ifdef H5DEBUGIMPORT + printf("readUIntegerData %d (0x%.4X = 0x%.4X)\n", *in16, *in16, temp16); +#endif } break; @@ -680,10 +726,19 @@ static int readUIntegerData(FILE *strm, struct Input *in) case 7: /* UIN */ for (i = 0; i < len; i++, in32++) { - if (HDfread((char *) in32, sizeof(H5DT_UINT32), 1, strm) != 1) { + if (HDfread((char *)&temp32, sizeof(H5DT_UINT32), 1, strm) != 1) { (void) HDfprintf(stderr, "%s", err1); return (-1); } +/* + if (in-> h5dumpInput && (in->inputByteOrder != in->outputByteOrder)) + *in32 = swap_uint32(temp32); + else +*/ + *in32 = temp32; +#ifdef H5DEBUGIMPORT + printf("readUIntegerData %d (0x%.8X = 0x%.8X)\n", *in32, *in32, temp32); +#endif } break; @@ -709,10 +764,19 @@ static int readUIntegerData(FILE *strm, struct Input *in) case 7: /* UIN */ for (i = 0; i < len; i++, in64++) { - if (HDfread((char *) in64, sizeof(H5DT_UINT64), 1, strm) != 1) { + if (HDfread((char *)&temp64, sizeof(H5DT_UINT64), 1, strm) != 1) { (void) HDfprintf(stderr, "%s", err1); return (-1); } +/* + if (in-> h5dumpInput && (in->inputByteOrder != in->outputByteOrder)) + *in64 = swap_uint64(temp64); + else +*/ + *in64 = temp64; +#ifdef H5DEBUGIMPORT + printf("readUIntegerData %ld (0x%.8X = 0x%.8X)\n", *in64, *in64, temp64); +#endif } break; @@ -733,12 +797,16 @@ static int readUIntegerData(FILE *strm, struct Input *in) static int readFloatData(FILE *strm, struct Input *in) { H5DT_FLOAT32 *fp32; + uint32_t *bfp32; + uint32_t temp32; H5DT_FLOAT64 *fp64; + uint64_t *bfp64; + uint64_t temp64; hsize_t len = 1; hsize_t i; int j; - const char *err1 = "Unable to get integer value from file.\n"; + const char *err1 = "Unable to get float value from file.\n"; const char *err2 = "Unrecognized input class type.\n"; const char *err3 = "Invalid input size type.\n"; @@ -774,11 +842,21 @@ static int readFloatData(FILE *strm, struct Input *in) break; case 3: /* FP */ - for (i = 0; i < len; i++, fp32++) { - if (HDfread((char *) fp32, sizeof(H5DT_FLOAT32), 1, strm) != 1) { + bfp32 = (uint32_t *) in->data; + for (i = 0; i < len; i++, bfp32++) { + if (HDfread((char *)&temp32, sizeof(uint32_t), 1, strm) != 1) { (void) HDfprintf(stderr, "%s", err1); return (-1); } +/* + if (in-> h5dumpInput && (in->inputByteOrder != in->outputByteOrder)) + *bfp32 = swap_uint32(temp32); + else +*/ + *bfp32 = temp32; +#ifdef H5DEBUGIMPORT + printf("readFloatData %ld (0x%.8X = 0x%.8X)\n", *bfp32, *bfp32, temp32); +#endif } break; @@ -816,11 +894,21 @@ static int readFloatData(FILE *strm, struct Input *in) break; case 3: /* FP */ - for (i = 0; i < len; i++, fp64++) { - if (HDfread((char *) fp64, sizeof(H5DT_FLOAT64), 1, strm) != 1) { + bfp64 = (uint64_t *) in->data; + for (i = 0; i < len; i++, bfp64++) { + if (HDfread((char *)&temp64, sizeof(uint64_t), 1, strm) != 1) { (void) HDfprintf(stderr, "%s", err1); return (-1); } +/* + if (in-> h5dumpInput && (in->inputByteOrder != in->outputByteOrder)) + *bfp64 = swap_uint64(temp64); + else +*/ + *bfp64 = temp64; +#ifdef H5DEBUGIMPORT + printf("readFloatData %ld (0x%.16lX)\n", *bfp64, temp64); +#endif } break; @@ -897,7 +985,7 @@ static int processStrData(FILE *strm, struct Input *in, hid_t file_id) goto out; /* disable error reporting */ - H5E_BEGIN_TRY + H5E_BEGIN_TRY { /* create parent groups */ if (in->path.count > 1) { @@ -1286,7 +1374,7 @@ static int processConfigurationFile(char *infile, struct Input *in) int retval = -1; const char *err1 = "Unable to open the configuration file: %s for reading.\n"; - const char *err2 = "Unknown keyword in configuration file: %s\n"; + const char *err2 = "Unknown keyword: %s in configuration file: %s\n"; const char *err3a = "PATH keyword appears twice in %s.\n"; const char *err3b = "Error in parsing the path information from %s.\n"; const char *err4a = "INPUT-CLASS keyword appears twice in %s.\n"; @@ -1306,6 +1394,9 @@ static int processConfigurationFile(char *infile, struct Input *in) const char *err10b = "Error in retrieving the output architecture from %s.\n"; const char *err11a = "OUTPUT-BYTE-ORDER keyword appears twice in %s.\n"; const char *err11b = "Error in retrieving the output byte order from %s.\n"; + const char *err11c = "INPUT-BYTE-ORDER keyword appears twice in %s.\n"; + const char *err11d = "Error in retrieving the input byte order from %s.\n"; + const char *err11e = "Invalid value for output byte-order.\n"; const char *err12a = "CHUNKED-DIMENSION-SIZES keyword appears twice in %s.\n"; const char *err12b = "CHUNKED-DIMENSION-SIZES cannot appear before DIMENSION-SIZES are provided.\n"; const char *err12c = "Error in retrieving the chunked dimension sizes from %s.\n"; @@ -1321,6 +1412,7 @@ static int processConfigurationFile(char *infile, struct Input *in) const char *err17 = "Configuration parameters are invalid in %s.\n"; const char *err18 = "Unable to get string value.\n"; const char *err19 = "Unable to get integer value.\n"; + const char *err20 = "Unable to get subset values.\n"; /* create vector to map which keywords have been found check vector after each keyword to check for violation @@ -1328,6 +1420,27 @@ static int processConfigurationFile(char *infile, struct Input *in) process the output file according to the options */ + /* Initialize machine endian */ + volatile uint32_t ibyte=0x01234567; + /* 0 for big endian, 1 for little endian. */ + if ((*((uint8_t*)(&ibyte))) == 0x67) { + if ((kindex = OutputByteOrderStrToInt("LE")) == -1) { + (void) HDfprintf(stderr, "%s", err11e); + return (-1); + } + } + else { + if ((kindex = OutputByteOrderStrToInt("BE")) == -1) { + (void) HDfprintf(stderr, "%s", err11e); + return (-1); + } + } + in->inputByteOrder = kindex; +#ifdef H5DEBUGIMPORT + printf("h5dump inputByteOrder %d\n", in->inputByteOrder); +#endif + in->inputArchitecture = 0; /* default to NATIVE */ + if ((strm = HDfopen(infile, "r")) == NULL) { (void) HDfprintf(stderr, err1, infile); goto error; @@ -1563,15 +1676,15 @@ static int processConfigurationFile(char *infile, struct Input *in) goto error; } #ifdef H5DEBUGIMPORT - printf("h5dump DATASPACE SIMPLE %d rank\n", in->rank); + printf("h5dump DATASPACE SIMPLE %ld rank\n", in->rank); #endif for (i = 0; i < in->rank; i++) { in->sizeOfDimension[i] = temp_dims[i]; } #ifdef H5DEBUGIMPORT - printf("h5dump DATASPACE SIMPLE dims:", in->rank); + printf("h5dump DATASPACE SIMPLE dims[%ld]:", in->rank); for (pndx = 0; pndx < in->rank; pndx++) { - printf(" %d", in->sizeOfDimension[pndx]); + printf(" %ld", in->sizeOfDimension[pndx]); } printf("\n"); #endif @@ -1644,9 +1757,9 @@ static int processConfigurationFile(char *infile, struct Input *in) } } /* while (get_next_dim) */ #ifdef H5DEBUGIMPORT - printf("h5dump DATASPACE SIMPLE maxdims:", in->rank); + printf("h5dump DATASPACE SIMPLE maxdims[%ld]:", in->rank); for (pndx = 0; pndx < in->rank; pndx++) { - printf(" %d", in->maxsizeOfDimension[pndx]); + printf(" %ld", in->maxsizeOfDimension[pndx]); } printf("\n"); printf("h5dump DATASPACE SIMPLE get max dim finished\n"); @@ -1731,9 +1844,9 @@ static int processConfigurationFile(char *infile, struct Input *in) } } /* while (get_next_dim) */ #ifdef H5DEBUGIMPORT - printf("h5dump STORAGE_LAYOUT CHUNKED dims:", in->rank); + printf("h5dump STORAGE_LAYOUT CHUNKED dims [%ld]:", in->rank); for (pndx = 0; pndx < in->rank; pndx++) { - printf(" %d", in->sizeOfChunk[pndx]); + printf(" %ld", in->sizeOfChunk[pndx]); } printf("\n"); #endif @@ -1852,6 +1965,151 @@ static int processConfigurationFile(char *infile, struct Input *in) printf("h5dump FILTERS %s found\n", temp); #endif } + else if(!HDstrcmp("SUBSET", key)) { /* reduce dimensions */ + hsize_t temp_dims[MAX_NUM_DIMENSION]; + int get_next_prop = 1; +#ifdef H5DEBUGIMPORT + printf("h5dump SUBSET key\n"); +#endif + if (fscanf(strm, "%s", temp) != 1) { /* start bracket */ + (void) HDfprintf(stderr, err20, infile); + goto error; + } +#ifdef H5DEBUGIMPORT + printf("h5dump SUBSET %s found\n", temp); +#endif + if (fscanf(strm, "%s", temp) != 1) { /* SUBSET keyword */ + (void) HDfprintf(stderr, "%s", err18); + goto error; + } +#ifdef H5DEBUGIMPORT + printf("h5dump SUBSET %s found\n", temp); +#endif + while (get_next_prop) { + if(!HDstrcmp("COUNT", temp)) { /* COUNT */ + int icount = 0; + if (fscanf(strm, "%s", temp) != 1) { /* start paren */ + (void) HDfprintf(stderr, err6b, infile); + goto error; + } +#ifdef H5DEBUGIMPORT + printf("h5dump SUBSET %s found\n", temp); +#endif + if(!HDstrcmp("(", temp)) { /* start paren */ + int get_next_dim = 1; + int i = 0; + + if (fscanf(strm, "%s", temp) != 1) { /* Dimension with optional comma */ + (void) HDfprintf(stderr, err16c, infile); + goto error; + } +#ifdef H5DEBUGIMPORT + printf("h5dump SUBSET COUNT [%s] found\n", temp); +#endif + while (get_next_dim) { + char *more = temp; + temp_dims[icount] = HDstrtoull(more, &more, 10); + if (fscanf(strm, "%s", temp) != 1) { /* Dimension or end paren */ + (void) HDfprintf(stderr, err6b, infile); + goto error; + } +#ifdef H5DEBUGIMPORT + printf("h5dump SUBSET COUNT %s found\n", temp); +#endif + if(!HDstrcmp(");", temp)) { /* end paren */ + in->rank = ++icount; + in->configOptionVector[RANK] = 1; + get_next_dim = 0; + } + else { /* Dimension */ + icount++; + if (icount > MAX_NUM_DIMENSION) { + (void) HDfprintf(stderr, "Invalid value for rank.\n"); + goto error; + } + } + } /* while (get_next_dim) */ + for (i = 0; i < in->rank; i++) { + in->sizeOfDimension[i] = temp_dims[i]; + } +#ifdef H5DEBUGIMPORT + printf("h5dump SUBSET COUNT dims: [%d]", in->rank); + for (pndx = 0; pndx < in->rank; pndx++) { + printf(" %ld", in->sizeOfDimension[pndx]); + } + printf("\n"); +#endif + in->configOptionVector[DIM] = 1; + } /* if(!HDstrcmp("(", key)) start paren */ + } /* if(!HDstrcmp("COUNT", temp)) COUNT */ + if(!HDstrcmp("BLOCK", temp)) { /* BLOCK */ + int icount = 0; + if (fscanf(strm, "%s", temp) != 1) { /* start paren */ + (void) HDfprintf(stderr, err6b, infile); + goto error; + } +#ifdef H5DEBUGIMPORT + printf("h5dump SUBSET %s found\n", temp); +#endif + if(!HDstrcmp("(", temp)) { /* start paren */ + int get_next_dim = 1; + int i = 0; + + if (fscanf(strm, "%s", temp) != 1) { /* Dimension with optional comma */ + (void) HDfprintf(stderr, err16c, infile); + goto error; + } +#ifdef H5DEBUGIMPORT + printf("h5dump SUBSET BLOCK [%s] found\n", temp); +#endif + while (get_next_dim) { + char *more = temp; + temp_dims[icount] = HDstrtoull(more, &more, 10); + if (fscanf(strm, "%s", temp) != 1) { /* Dimension or end paren */ + (void) HDfprintf(stderr, err6b, infile); + goto error; + } +#ifdef H5DEBUGIMPORT + printf("h5dump SUBSET BLOCK %s found\n", temp); +#endif + if(!HDstrcmp(");", temp)) { /* end paren */ + in->rank = ++icount; + in->configOptionVector[RANK] = 1; + get_next_dim = 0; + } + else { /* Dimension */ + icount++; + if (icount > MAX_NUM_DIMENSION) { + (void) HDfprintf(stderr, "Invalid value for rank.\n"); + goto error; + } + } + } /* while (get_next_dim) */ + for (i = 0; i < in->rank; i++) { + in->sizeOfDimension[i] = in->sizeOfDimension[i] * temp_dims[i]; + } +#ifdef H5DEBUGIMPORT + printf("h5dump SUBSET BLOCK dims: [%d]", in->rank); + for (pndx = 0; pndx < in->rank; pndx++) { + printf(" %ld", in->sizeOfDimension[pndx]); + } + printf("\n"); +#endif + in->configOptionVector[DIM] = 1; + } /* if(!HDstrcmp("(", key)) start paren */ + } /* if(!HDstrcmp("BLOCK", temp)) BLOCK */ + if (fscanf(strm, "%s", temp) != 1) { + (void) HDfprintf(stderr, "%s", err18); + goto error; + } +#ifdef H5DEBUGIMPORT + printf("h5dump SUBSET %s found\n", temp); +#endif + if(!HDstrcmp("}", temp)) { /* end bracket */ + get_next_prop = 0; + } + } /* while (get_next_prop) */ + } /* else if(!HDstrcmp("SUBSET", key)) */ else if(!HDstrcmp("DATA", key)) { /* FINSHED */ #ifdef H5DEBUGIMPORT printf("h5dump DATA key\n"); @@ -1869,6 +2127,8 @@ static int processConfigurationFile(char *infile, struct Input *in) printf("\n"); printf("h5dump inputClass=%d\n", in->inputClass); printf("h5dump inputSize=%d\n", in->inputSize); + printf("h5dump inputArchitecture=%d\n", in->inputArchitecture); + printf("h5dump inputByteOrder=%d\n", in->inputByteOrder); printf("h5dump rank=%d\n", in->rank); printf("h5dump outputClass=%d\n", in->outputClass); printf("h5dump outputSize=%d\n", in->outputSize); @@ -1877,16 +2137,19 @@ static int processConfigurationFile(char *infile, struct Input *in) printf("h5dump compressionType=%d\n", in->compressionType); printf("h5dump compressionParam=%d\n", in->compressionParam); printf("h5dump externFilename=%s\n", in->externFilename); - printf("h5dump configOptionVector:\n"); - for (pndx = 0; pndx < NUM_KEYS; pndx++) { - printf(" %s=%d\n", keytable[pndx], in->configOptionVector[pndx]); + printf("h5dump sizeOfDimensions:\n"); + for (pndx = 0; pndx < in->rank; pndx++) { + printf(" %ld\n", in->sizeOfDimension[pndx]); } #endif } else { +#ifdef H5DEBUGIMPORT + printf("original option keyword parsing\n"); +#endif while (scanret == 1) { if ((kindex = mapKeywordToIndex(key)) == -1) { - (void) HDfprintf(stderr, err2, infile); + (void) HDfprintf(stderr, err2, key, infile); goto error; } switch (kindex) { @@ -2121,21 +2384,34 @@ static int processConfigurationFile(char *infile, struct Input *in) in->configOptionVector[EXTEND] = 1; break; + case 14: /* INPUT-BYTE-ORDER */ + if (in->configOptionVector[INPUT_B_ORDER] == 1) { + (void) HDfprintf(stderr, err11c, infile); + goto error; + } + + if (getInputByteOrder(in, strm) == -1) { + (void) HDfprintf(stderr, err11d, infile); + goto error; + } + in->configOptionVector[INPUT_B_ORDER] = 1; + break; + default: break; } scanret = fscanf(strm, "%s", key); } - } - /* - check if keywords obtained are valid - if yes, return 0 else error - */ + /* + check if keywords obtained are valid + if yes, return 0 else error + */ - if (validateConfigurationParameters(in) == -1) { - (void) HDfprintf(stderr, err17, infile); - goto error; + if (validateConfigurationParameters(in) == -1) { + (void) HDfprintf(stderr, err17, infile); + goto error; + } } /* Set success return value */ @@ -2361,7 +2637,7 @@ static int getInputClassType(struct Input *in, char * buffer) int kindex = -1; const char *err1 = "Invalid value for input class.\n"; const char *err2 = "Invalid value for output architecture.\n"; - const char *err3 = "Invalid value for output byte-order.\n"; + const char *err3 = "Invalid value for input byte-order.\n"; if (!HDstrcmp(buffer, "H5T_STD_I8BE")) { in->inputSize = 8; @@ -2378,6 +2654,9 @@ static int getInputClassType(struct Input *in, char * buffer) return (-1); } in->outputByteOrder = kindex; + #ifdef H5DEBUGIMPORT + printf("h5dump inputByteOrder %d\n", in->inputByteOrder); + #endif kindex = 4; } @@ -2396,6 +2675,9 @@ static int getInputClassType(struct Input *in, char * buffer) return (-1); } in->outputByteOrder = kindex; + #ifdef H5DEBUGIMPORT + printf("h5dump inputByteOrder %d\n", in->inputByteOrder); + #endif kindex = 4; } @@ -2414,6 +2696,9 @@ static int getInputClassType(struct Input *in, char * buffer) return (-1); } in->outputByteOrder = kindex; + #ifdef H5DEBUGIMPORT + printf("h5dump inputByteOrder %d\n", in->inputByteOrder); + #endif kindex = 4; } @@ -2432,6 +2717,9 @@ static int getInputClassType(struct Input *in, char * buffer) return (-1); } in->outputByteOrder = kindex; + #ifdef H5DEBUGIMPORT + printf("h5dump inputByteOrder %d\n", in->inputByteOrder); + #endif kindex = 4; } @@ -2450,6 +2738,9 @@ static int getInputClassType(struct Input *in, char * buffer) return (-1); } in->outputByteOrder = kindex; + #ifdef H5DEBUGIMPORT + printf("h5dump inputByteOrder %d\n", in->inputByteOrder); + #endif kindex = 4; } @@ -2468,6 +2759,9 @@ static int getInputClassType(struct Input *in, char * buffer) return (-1); } in->outputByteOrder = kindex; + #ifdef H5DEBUGIMPORT + printf("h5dump inputByteOrder %d\n", in->inputByteOrder); + #endif kindex = 4; } @@ -2486,6 +2780,9 @@ static int getInputClassType(struct Input *in, char * buffer) return (-1); } in->outputByteOrder = kindex; + #ifdef H5DEBUGIMPORT + printf("h5dump inputByteOrder %d\n", in->inputByteOrder); + #endif kindex = 4; } @@ -2504,6 +2801,9 @@ static int getInputClassType(struct Input *in, char * buffer) return (-1); } in->outputByteOrder = kindex; + #ifdef H5DEBUGIMPORT + printf("h5dump inputByteOrder %d\n", in->inputByteOrder); + #endif kindex = 4; } @@ -2522,6 +2822,9 @@ static int getInputClassType(struct Input *in, char * buffer) return (-1); } in->outputByteOrder = kindex; + #ifdef H5DEBUGIMPORT + printf("h5dump inputByteOrder %d\n", in->inputByteOrder); + #endif kindex = 7; } @@ -2540,6 +2843,9 @@ static int getInputClassType(struct Input *in, char * buffer) return (-1); } in->outputByteOrder = kindex; + #ifdef H5DEBUGIMPORT + printf("h5dump inputByteOrder %d\n", in->inputByteOrder); + #endif kindex = 7; } @@ -2558,6 +2864,9 @@ static int getInputClassType(struct Input *in, char * buffer) return (-1); } in->outputByteOrder = kindex; + #ifdef H5DEBUGIMPORT + printf("h5dump inputByteOrder %d\n", in->inputByteOrder); + #endif kindex = 7; } @@ -2576,6 +2885,9 @@ static int getInputClassType(struct Input *in, char * buffer) return (-1); } in->outputByteOrder = kindex; + #ifdef H5DEBUGIMPORT + printf("h5dump inputByteOrder %d\n", in->inputByteOrder); + #endif kindex = 7; } @@ -2594,6 +2906,9 @@ static int getInputClassType(struct Input *in, char * buffer) return (-1); } in->outputByteOrder = kindex; + #ifdef H5DEBUGIMPORT + printf("h5dump inputByteOrder %d\n", in->inputByteOrder); + #endif kindex = 7; } @@ -2612,6 +2927,9 @@ static int getInputClassType(struct Input *in, char * buffer) return (-1); } in->outputByteOrder = kindex; + #ifdef H5DEBUGIMPORT + printf("h5dump inputByteOrder %d\n", in->inputByteOrder); + #endif kindex = 7; } @@ -2630,6 +2948,9 @@ static int getInputClassType(struct Input *in, char * buffer) return (-1); } in->outputByteOrder = kindex; + #ifdef H5DEBUGIMPORT + printf("h5dump inputByteOrder %d\n", in->inputByteOrder); + #endif kindex = 7; } @@ -2648,6 +2969,9 @@ static int getInputClassType(struct Input *in, char * buffer) return (-1); } in->outputByteOrder = kindex; + #ifdef H5DEBUGIMPORT + printf("h5dump inputByteOrder %d\n", in->inputByteOrder); + #endif kindex = 7; } @@ -2786,6 +3110,9 @@ static int getInputClassType(struct Input *in, char * buffer) return (-1); } in->outputByteOrder = kindex; + #ifdef H5DEBUGIMPORT + printf("h5dump inputByteOrder %d\n", in->inputByteOrder); + #endif kindex = 3; } @@ -2804,6 +3131,9 @@ static int getInputClassType(struct Input *in, char * buffer) return (-1); } in->outputByteOrder = kindex; + #ifdef H5DEBUGIMPORT + printf("h5dump inputByteOrder %d\n", in->inputByteOrder); + #endif kindex = 3; } @@ -2822,6 +3152,9 @@ static int getInputClassType(struct Input *in, char * buffer) return (-1); } in->outputByteOrder = kindex; + #ifdef H5DEBUGIMPORT + printf("h5dump inputByteOrder %d\n", in->inputByteOrder); + #endif kindex = 3; } @@ -2840,6 +3173,9 @@ static int getInputClassType(struct Input *in, char * buffer) return (-1); } in->outputByteOrder = kindex; + #ifdef H5DEBUGIMPORT + printf("h5dump inputByteOrder %d\n", in->inputByteOrder); + #endif kindex = 3; } @@ -2913,6 +3249,9 @@ static int getInputClassType(struct Input *in, char * buffer) return (-1); } in->outputByteOrder = kindex; + #ifdef H5DEBUGIMPORT + printf("h5dump inputByteOrder %d\n", in->inputByteOrder); + #endif kindex = -1; } @@ -2929,6 +3268,9 @@ static int getInputClassType(struct Input *in, char * buffer) return (-1); } in->outputByteOrder = kindex; + #ifdef H5DEBUGIMPORT + printf("h5dump inputByteOrder %d\n", in->inputByteOrder); + #endif kindex = -1; } @@ -2945,6 +3287,9 @@ static int getInputClassType(struct Input *in, char * buffer) return (-1); } in->outputByteOrder = kindex; + #ifdef H5DEBUGIMPORT + printf("h5dump inputByteOrder %d\n", in->inputByteOrder); + #endif kindex = -1; } @@ -2961,6 +3306,9 @@ static int getInputClassType(struct Input *in, char * buffer) return (-1); } in->outputByteOrder = kindex; + #ifdef H5DEBUGIMPORT + printf("h5dump inputByteOrder %d\n", in->inputByteOrder); + #endif kindex = -1; } @@ -2977,6 +3325,9 @@ static int getInputClassType(struct Input *in, char * buffer) return (-1); } in->outputByteOrder = kindex; + #ifdef H5DEBUGIMPORT + printf("h5dump inputByteOrder %d\n", in->inputByteOrder); + #endif kindex = -1; } @@ -2993,6 +3344,9 @@ static int getInputClassType(struct Input *in, char * buffer) return (-1); } in->outputByteOrder = kindex; + #ifdef H5DEBUGIMPORT + printf("h5dump inputByteOrder %d\n", in->inputByteOrder); + #endif kindex = -1; } @@ -3009,6 +3363,9 @@ static int getInputClassType(struct Input *in, char * buffer) return (-1); } in->outputByteOrder = kindex; + #ifdef H5DEBUGIMPORT + printf("h5dump inputByteOrder %d\n", in->inputByteOrder); + #endif kindex = -1; } @@ -3025,6 +3382,9 @@ static int getInputClassType(struct Input *in, char * buffer) return (-1); } in->outputByteOrder = kindex; + #ifdef H5DEBUGIMPORT + printf("h5dump inputByteOrder %d\n", in->inputByteOrder); + #endif kindex = -1; } @@ -3062,8 +3422,9 @@ static int getInputClassType(struct Input *in, char * buffer) if (in->configOptionVector[OUTPUT_SIZE] == 0) in->outputSize = in->inputSize; #ifdef H5DEBUGIMPORT - printf("h5dump DATATYPE STRING %d inputSize\n", in->inputSize); - printf("h5dump DATATYPE STRING %d outputSize\n", in->outputSize); + printf("h5dump DATATYPE InClass %d inputSize\n", in->inputSize); + printf("h5dump DATATYPE InClass %d outputSize\n", in->outputSize); + printf("h5dump DATATYPE InClass %d outputArchitecture\n", in->outputArchitecture); #endif in->inputClass = kindex; @@ -3096,6 +3457,27 @@ static int getInputSize(struct Input *in, int ival) return (-1); } +static int getInputByteOrder(struct Input *in, FILE *strm) +{ + char temp[255]; + int kindex; + const char *err1 = "Unable to get 'string' value.\n"; + const char *err2 = "Invalid value for input byte-order.\n"; + + if (fscanf(strm, "%s", temp) != 1) { + (void) HDfprintf(stderr, "%s", err1); + return (-1); + } + + if ((kindex = OutputByteOrderStrToInt(temp)) == -1) { + (void) HDfprintf(stderr, "%s", err2); + return (-1); + } + + in->inputByteOrder = kindex; + return (0); +} + static int getRank(struct Input *in, FILE *strm) { int ival; @@ -3361,6 +3743,7 @@ void setDefaultValues(struct Input *in, int count) in->inputSize = 32; in->outputClass = 1; /* FP */ in->outputSize = 32; + in->inputByteOrder = -1; /* use default */ in->rank = 0; in->path.count = 1; @@ -3382,7 +3765,7 @@ hid_t createOutputDataType(struct Input *in) const char *err1 = "Invalid value for output class.\n"; const char *err2 = "Invalid value for output size.\n"; const char *err3 = "Invalid value for output byte order.\n"; - const char *err4 = "Invalid value for output architecture.\n"; + const char *err4 = "Invalid value for output architecture.\n"; const char *err5 = "STD not supported for float.\n"; const char *err6 = "IEEE not supported for INT.\n"; @@ -3504,9 +3887,9 @@ hid_t createOutputDataType(struct Input *in) } break; - default: - (void) HDfprintf(stderr, "%s", err4); - return (-1); + default: + (void) HDfprintf(stderr, "%s", err4); + return (-1); } break; @@ -3589,9 +3972,9 @@ hid_t createOutputDataType(struct Input *in) } break; - default: - (void) HDfprintf(stderr, "%s", err4); - return (-1); + default: + (void) HDfprintf(stderr, "%s", err4); + return (-1); } break; @@ -3733,85 +4116,433 @@ hid_t createInputDataType(struct Input *in) { hid_t new_type = (-1); const char *err1 = "Invalid value for input class.\n"; - const char *err2 = "Invalid value for output size.\n"; + const char *err2 = "Invalid value for input size.\n"; + const char *err3 = "Invalid value for input byte order.\n"; + const char *err4 = "Invalid value for output architecture.\n"; + const char *err5 = "STD not supported for float.\n"; + const char *err6 = "IEEE not supported for INT.\n"; - switch (in->inputClass) { - case 0: - case 4: - switch (in->inputSize) { - case 8: - new_type = H5Tcopy(H5T_NATIVE_CHAR); - break; + if (in->h5dumpInput) { + switch (in->inputClass) { + case 4: + switch (in->inputArchitecture) { + case 0: /*NATIVE*/ + switch (in->inputSize) { + case 8: + new_type = H5Tcopy(H5T_NATIVE_CHAR); + break; - case 16: - new_type = H5Tcopy(H5T_NATIVE_SHORT); - break; + case 16: + new_type = H5Tcopy(H5T_NATIVE_SHORT); + break; - case 32: - new_type = H5Tcopy(H5T_NATIVE_INT); - break; + case 32: + new_type = H5Tcopy(H5T_NATIVE_INT); + break; + + case 64: + new_type = H5Tcopy(H5T_NATIVE_LLONG); + break; + + default: + (void) HDfprintf(stderr, "%s", err2); + return (-1); + } + switch (in->inputByteOrder) { + case -1: /* default */ + break; + case 0: + H5Tset_order(new_type, H5T_ORDER_BE); + break; + + case 1: + H5Tset_order(new_type, H5T_ORDER_LE); + break; + + default: + (void) HDfprintf(stderr, "%s", err3); + return (-1); + } + break; + + case 1: /*STD*/ + switch (in->inputSize) { + case 8: + switch (in->inputByteOrder) { + case -1: + case 0: + new_type = H5Tcopy(H5T_STD_I8BE); + break; + + case 1: + new_type = H5Tcopy(H5T_STD_I8LE); + break; + + default: + (void) HDfprintf(stderr, "%s", err3); + return (-1); + } + break; + + case 16: + switch (in->inputByteOrder) { + case -1: + case 0: + new_type = H5Tcopy(H5T_STD_I16BE); + break; + + case 1: + new_type = H5Tcopy(H5T_STD_I16LE); + break; + + default: + (void) HDfprintf(stderr, "%s", err3); + return (-1); + } + break; + + case 32: + switch (in->inputByteOrder) { + case -1: + case 0: + new_type = H5Tcopy(H5T_STD_I32BE); + break; + + case 1: + new_type = H5Tcopy(H5T_STD_I32LE); + break; + + default: + (void) HDfprintf(stderr, "%s", err3); + return (-1); + } + break; - case 64: - new_type = H5Tcopy(H5T_NATIVE_LLONG); + case 64: + switch (in->inputByteOrder) { + case -1: + case 0: + new_type = H5Tcopy(H5T_STD_I64BE); + break; + + case 1: + new_type = H5Tcopy(H5T_STD_I64LE); + break; + + default: + (void) HDfprintf(stderr, "%s", err3); + return (-1); + } + break; + + default: + (void) HDfprintf(stderr, "%s", err2); + return (-1); + } + break; + + default: + (void) HDfprintf(stderr, "%s", err4); + return (-1); + } break; - default: - (void) HDfprintf(stderr, "%s", err2); - return (-1); - } - break; + case 3: + switch (in->inputArchitecture) { + case 0: + switch (in->inputSize) { + case 32: + new_type = H5Tcopy(H5T_NATIVE_FLOAT); + break; - case 1: - case 2: - case 3: - switch (in->inputSize) { - case 32: - new_type = H5Tcopy(H5T_NATIVE_FLOAT); + case 64: + new_type = H5Tcopy(H5T_NATIVE_DOUBLE); + break; + + default: + (void) HDfprintf(stderr, "%s", err2); + return (-1); + } + switch (in->inputByteOrder) { + case -1: /* DEFAULT */ + break; + case 0: + H5Tset_order(new_type, H5T_ORDER_BE); + break; + + case 1: + H5Tset_order(new_type, H5T_ORDER_LE); + break; + + default: + (void) HDfprintf(stderr, "%s", err3); + return (-1); + } + break; + + case 1: + (void) HDfprintf(stderr, "%s", err5); + return (-1); + + case 2: + switch (in->inputSize) { + case 32: + switch (in->inputByteOrder) { + case -1: + case 0: + new_type = H5Tcopy(H5T_IEEE_F32BE); + break; + + case 1: + new_type = H5Tcopy(H5T_IEEE_F32LE); + break; + + default: + (void) HDfprintf(stderr, "%s", err3); + return (-1); + } + break; + + case 64: + switch (in->inputByteOrder) { + case -1: + case 0: + new_type = H5Tcopy(H5T_IEEE_F64BE); + break; + + case 1: + new_type = H5Tcopy(H5T_IEEE_F64LE); + break; + + default: + (void) HDfprintf(stderr, "%s", err3); + return (-1); + } + break; + + default: + (void) HDfprintf(stderr, "%s", err2); + return (-1); + } + break; + + default: + (void) HDfprintf(stderr, "%s", err4); + return (-1); + } break; - case 64: - new_type = H5Tcopy(H5T_NATIVE_DOUBLE); + case 7: + switch (in->inputArchitecture) { + case 0: + switch (in->inputSize) { + case 8: + new_type = H5Tcopy(H5T_NATIVE_UCHAR); + break; + + case 16: + new_type = H5Tcopy(H5T_NATIVE_USHORT); + break; + + case 32: + new_type = H5Tcopy(H5T_NATIVE_UINT); + break; + + case 64: + new_type = H5Tcopy(H5T_NATIVE_ULLONG); + break; + + default: + (void) HDfprintf(stderr, "%s", err2); + return (-1); + } + switch (in->inputByteOrder) { + case -1: /* Default */ + break; + case 0: + H5Tset_order(new_type, H5T_ORDER_BE); + break; + + case 1: + H5Tset_order(new_type, H5T_ORDER_LE); + break; + + default: + (void) HDfprintf(stderr, "%s", err3); + return (-1); + } + break; + + case 1: + switch (in->inputSize) { + case 8: + switch (in->inputByteOrder) { + case -1: + case 0: + new_type = H5Tcopy(H5T_STD_U8BE); + break; + + case 1: + new_type = H5Tcopy(H5T_STD_U8LE); + break; + + default: + (void) HDfprintf(stderr, "%s", err3); + return (-1); + } + break; + + case 16: + switch (in->inputByteOrder) { + case -1: + case 0: + new_type = H5Tcopy(H5T_STD_U16BE); + break; + + case 1: + new_type = H5Tcopy(H5T_STD_U16LE); + break; + + default: + (void) HDfprintf(stderr, "%s", err3); + return (-1); + } + break; + + case 32: + switch (in->inputByteOrder) { + case -1: + case 0: + new_type = H5Tcopy(H5T_STD_U32BE); + break; + + case 1: + new_type = H5Tcopy(H5T_STD_U32LE); + break; + + default: + (void) HDfprintf(stderr, "%s", err3); + return (-1); + } + break; + + case 64: + switch (in->inputByteOrder) { + case -1: + case 0: + new_type = H5Tcopy(H5T_STD_U64BE); + break; + + case 1: + new_type = H5Tcopy(H5T_STD_U64LE); + break; + + default: + (void) HDfprintf(stderr, "%s", err3); + return (-1); + } + break; + + default: + (void) HDfprintf(stderr, "%s", err2); + return (-1); + } + break; + + case 2: + (void) HDfprintf(stderr, "%s", err6); + return (-1); + + default: + (void) HDfprintf(stderr, "%s", err4); + return (-1); + } break; default: - (void) HDfprintf(stderr, "%s", err2); + (void) HDfprintf(stderr, "%s", err1); return (-1); } - break; + } + else { + switch (in->inputClass) { + case 0: + case 4: + switch (in->inputSize) { + case 8: + new_type = H5Tcopy(H5T_NATIVE_CHAR); + break; - case 5: - (void) HDfprintf(stderr, "%s", err1); - return (-1); - break; + case 16: + new_type = H5Tcopy(H5T_NATIVE_SHORT); + break; + + case 32: + new_type = H5Tcopy(H5T_NATIVE_INT); + break; + + case 64: + new_type = H5Tcopy(H5T_NATIVE_LLONG); + break; - case 6: - case 7: - switch (in->inputSize) { - case 8: - new_type = H5Tcopy(H5T_NATIVE_UCHAR); + default: + (void) HDfprintf(stderr, "%s", err2); + return (-1); + } break; - case 16: - new_type = H5Tcopy(H5T_NATIVE_USHORT); + case 1: + case 2: + case 3: + switch (in->inputSize) { + case 32: + new_type = H5Tcopy(H5T_NATIVE_FLOAT); + break; + + case 64: + new_type = H5Tcopy(H5T_NATIVE_DOUBLE); + break; + + default: + (void) HDfprintf(stderr, "%s", err2); + return (-1); + } break; - case 32: - new_type = H5Tcopy(H5T_NATIVE_UINT); + case 5: + (void) HDfprintf(stderr, "%s", err1); + return (-1); break; - case 64: - new_type = H5Tcopy(H5T_NATIVE_ULLONG); + case 6: + case 7: + switch (in->inputSize) { + case 8: + new_type = H5Tcopy(H5T_NATIVE_UCHAR); + break; + + case 16: + new_type = H5Tcopy(H5T_NATIVE_USHORT); + break; + + case 32: + new_type = H5Tcopy(H5T_NATIVE_UINT); + break; + + case 64: + new_type = H5Tcopy(H5T_NATIVE_ULLONG); + break; + + default: + (void) HDfprintf(stderr, "%s", err2); + return (-1); + } break; default: - (void) HDfprintf(stderr, "%s", err2); + (void) HDfprintf(stderr, "%s", err1); return (-1); } - break; - - default: - (void) HDfprintf(stderr, "%s", err1); - return (-1); } return new_type; } @@ -3900,7 +4631,7 @@ static int process(struct Options *opt) intype = createInputDataType(in); outtype = createOutputDataType(in); #ifdef H5DEBUGIMPORT - printf("process intype %d outtype %d\n", intype, outtype); + printf("process intype %ld outtype %ld\n", intype, outtype); #endif /* create property list */ @@ -3971,6 +4702,42 @@ static int process(struct Options *opt) return (0); } +uint16_t swap_uint16( uint16_t val) +{ + return (val << 8) | (val >> 8); +} + +int16_t swap_int16(int16_t val) +{ + return (val << 8) | ((val >> 8) & 0xFF); +} + +uint32_t swap_uint32(uint32_t val) +{ + val = ((val << 8) & 0xFF00FF00) | ((val >> 8) & 0xFF00FF); + return (val << 16) | (val >> 16); +} + +int32_t swap_int32(int32_t val) +{ + val = ((val << 8) & 0xFF00FF00) | ((val >> 8) & 0xFF00FF); + return (val << 16) | ((val >> 16) & 0xFFFF); +} + +int64_t swap_int64(int64_t val) +{ + val = ((val << 8) & 0xFF00FF00FF00FF00ULL) | ((val >> 8) & 0x00FF00FF00FF00FFULL); + val = ((val << 16) & 0xFFFF0000FFFF0000ULL) | ((val >> 16) & 0x0000FFFF0000FFFFULL); + return (val << 32) | ((val >> 32) & 0xFFFFFFFFULL); +} + +uint64_t swap_uint64(uint64_t val) +{ + val = ((val << 8) & 0xFF00FF00FF00FF00ULL) | ((val >> 8) & 0x00FF00FF00FF00FFULL); + val = ((val << 16) & 0xFFFF0000FFFF0000ULL) | ((val >> 16) & 0x0000FFFF0000FFFFULL); + return (val << 32) | (val >> 32); +} + /* * Name: * help @@ -4163,6 +4930,7 @@ void help(char *name) (void) HDfprintf(stdout, "\t PATH\n"); (void) HDfprintf(stdout, "\t INPUT-CLASS\n"); (void) HDfprintf(stdout, "\t INPUT-SIZE\n"); + (void) HDfprintf(stdout, "\t INPUT-BYTE-ORDER\n"); (void) HDfprintf(stdout, "\t RANK\n"); (void) HDfprintf(stdout, "\t DIMENSION-SIZES\n"); (void) HDfprintf(stdout, "\t OUTPUT-CLASS\n"); diff --git a/tools/src/h5import/h5import.h b/tools/src/h5import/h5import.h index c69a542..c55717d 100644 --- a/tools/src/h5import/h5import.h +++ b/tools/src/h5import/h5import.h @@ -37,7 +37,7 @@ #define MAX_GROUPS_IN_PATH 20 #define MAX_PATH_NAME_LENGTH 255 -#define NUM_KEYS 14 +#define NUM_KEYS 15 #define MIN_NUM_DIMENSION 1 #define MAX_NUM_DIMENSION 32 #define BASE_10 10 @@ -56,6 +56,7 @@ #define COMPRESS_PARAM 11 #define EXTERNALSTORE 12 #define EXTEND 13 +#define INPUT_B_ORDER 14 /* data types */ #define H5DT_INT8 signed char @@ -82,6 +83,8 @@ struct Input struct path_info path; int inputClass; int inputSize; + int inputArchitecture; + int inputByteOrder; int rank; hsize_t* sizeOfDimension; int outputClass; @@ -126,7 +129,8 @@ char keytable[NUM_KEYS][30] = { "COMPRESSION-TYPE", "COMPRESSION-PARAM", "EXTERNAL-STORAGE", - "MAXIMUM-DIMENSIONS" + "MAXIMUM-DIMENSIONS", + "INPUT-BYTE-ORDER" }; static int state_table[15][8] = diff --git a/tools/test/h5dump/CMakeTests.cmake b/tools/test/h5dump/CMakeTests.cmake index ae4649a..0a72709 100644 --- a/tools/test/h5dump/CMakeTests.cmake +++ b/tools/test/h5dump/CMakeTests.cmake @@ -1412,14 +1412,14 @@ ADD_H5_EXPORT_TEST (tstr2bin6 tstr2.h5 0 --enable-error-stack -d /g6/dset6 -b -o) # NATIVE default. the NATIVE test can be validated with h5import/h5diff - ADD_H5_TEST_IMPORT (tbin1 out1D tbinary.h5 0 --enable-error-stack -d integer -b) +# ADD_H5_TEST_IMPORT (tbin1 out1D tbinary.h5 0 --enable-error-stack -d integer -b) if (NOT HDF5_ENABLE_USING_MEMCHECKER) ADD_H5_TEST (tbin2 0 --enable-error-stack -b BE -d float -o tbin2.bin tbinary.h5) endif () # the NATIVE test can be validated with h5import/h5diff - ADD_H5_TEST_IMPORT (tbin3 out3D tbinary.h5 0 --enable-error-stack -d integer -b NATIVE) +# ADD_H5_TEST_IMPORT (tbin3 out3D tbinary.h5 0 --enable-error-stack -d integer -b NATIVE) if (NOT HDF5_ENABLE_USING_MEMCHECKER) ADD_H5_TEST (tbin4 0 --enable-error-stack -d double -b FILE -o tbin4.bin tbinary.h5) diff --git a/tools/test/h5dump/CMakeTestsXML.cmake b/tools/test/h5dump/CMakeTestsXML.cmake index 92e08a0..bdc6755 100644 --- a/tools/test/h5dump/CMakeTestsXML.cmake +++ b/tools/test/h5dump/CMakeTestsXML.cmake @@ -50,6 +50,7 @@ ${HDF5_TOOLS_DIR}/testfiles/tname-quot.h5 ${HDF5_TOOLS_DIR}/testfiles/tname-sp.h5 ${HDF5_TOOLS_DIR}/testfiles/tnamed_dtype_attr.h5 + ${HDF5_TOOLS_DIR}/testfiles/test35.nc ${HDF5_TOOLS_DIR}/testfiles/tnestedcomp.h5 ${HDF5_TOOLS_DIR}/testfiles/tnodata.h5 ${HDF5_TOOLS_DIR}/testfiles/tobjref.h5 @@ -99,6 +100,7 @@ ${HDF5_TOOLS_DIR}/testfiles/tempty-ns.h5.xml ${HDF5_TOOLS_DIR}/testfiles/tempty-ns-2.h5.xml ${HDF5_TOOLS_DIR}/testfiles/tenum.h5.xml + ${HDF5_TOOLS_DIR}/testfiles/test35.nc.xml ${HDF5_TOOLS_DIR}/testfiles/textlink.h5.xml ${HDF5_TOOLS_DIR}/testfiles/tfpformat.h5.xml ${HDF5_TOOLS_DIR}/testfiles/tgroup.h5.xml @@ -258,6 +260,8 @@ tempty.h5.out.err tenum.h5.out tenum.h5.out.err + test35.nc.out + test35.nc.out.err textlink.h5.out textlink.h5.out.err tfpformat.h5.out @@ -430,3 +434,6 @@ # tests for floating point user defined printf format ADD_XML_H5_TEST (tfpformat.h5 0 -u -m %.7f tfpformat.h5) + # test for HDFFV-10256 issue + ADD_XML_H5_TEST (test35.nc 0 test35.nc) + diff --git a/tools/test/h5dump/testh5dump.sh.in b/tools/test/h5dump/testh5dump.sh.in index 1136742..f0c01e6 100644 --- a/tools/test/h5dump/testh5dump.sh.in +++ b/tools/test/h5dump/testh5dump.sh.in @@ -1291,7 +1291,7 @@ IMPORTTEST out1.bin -c out3.h5import -o out1.h5 DIFFTEST tbinary.h5 out1.h5 /integer /integer # Same but use h5dump as input to h5import IMPORTTEST out1.bin -c tbin1.ddl -o out1D.h5 -DIFFTEST tbinary.h5 out1D.h5 /integer /integer +#DIFFTEST tbinary.h5 out1D.h5 /integer /integer TOOLTEST tbin2.ddl --enable-error-stack -b BE -d float -o out2.bin tbinary.h5 @@ -1301,7 +1301,7 @@ IMPORTTEST out3.bin -c out3.h5import -o out3.h5 DIFFTEST tbinary.h5 out3.h5 /integer /integer # Same but use h5dump as input to h5import IMPORTTEST out3.bin -c tbin3.ddl -o out3D.h5 -DIFFTEST tbinary.h5 out3D.h5 /integer /integer +#DIFFTEST tbinary.h5 out3D.h5 /integer /integer TOOLTEST tbin4.ddl --enable-error-stack -d double -b FILE -o out4.bin tbinary.h5 diff --git a/tools/test/h5dump/testh5dumpxml.sh.in b/tools/test/h5dump/testh5dumpxml.sh.in index 5f62946..b3b9e14 100644 --- a/tools/test/h5dump/testh5dumpxml.sh.in +++ b/tools/test/h5dump/testh5dumpxml.sh.in @@ -80,6 +80,7 @@ $SRC_H5DUMP_TESTFILES/tdset.h5 $SRC_H5DUMP_TESTFILES/tdset2.h5 $SRC_H5DUMP_TESTFILES/tempty.h5 $SRC_H5DUMP_TESTFILES/tenum.h5 +$SRC_H5DUMP_TESTFILES/test35.nc $SRC_H5DUMP_TESTFILES/textlink.h5 $SRC_H5DUMP_TESTFILES/tfpformat.h5 $SRC_H5DUMP_TESTFILES/tgroup.h5 @@ -144,6 +145,7 @@ $SRC_H5DUMP_TESTFILES/tempty-nons-uri.h5.xml $SRC_H5DUMP_TESTFILES/tempty-ns.h5.xml $SRC_H5DUMP_TESTFILES/tempty-ns-2.h5.xml $SRC_H5DUMP_TESTFILES/tenum.h5.xml +$SRC_H5DUMP_TESTFILES/test35.nc.xml $SRC_H5DUMP_TESTFILES/textlink.h5.xml $SRC_H5DUMP_TESTFILES/tfpformat.h5.xml $SRC_H5DUMP_TESTFILES/tgroup.h5.xml @@ -383,6 +385,9 @@ TOOLTEST torderattr4.h5.xml --xml -H --sort_by=creation_order --sort_order=desce # tests for floating point user defined printf format TOOLTEST tfpformat.h5.xml -u -m %.7f tfpformat.h5 +# test for HDFFV-10256 issue +TOOLTEST test35.nc.xml --xml test35.nc + # Clean up temporary files/directories CLEAN_TESTFILES_AND_TESTDIR diff --git a/tools/test/h5import/CMakeTests.cmake b/tools/test/h5import/CMakeTests.cmake index 27c736a..3c65b0b 100644 --- a/tools/test/h5import/CMakeTests.cmake +++ b/tools/test/h5import/CMakeTests.cmake @@ -17,13 +17,6 @@ ############################################################################## set (HDF5_REFERENCE_CONF_FILES - binfp64.conf - binin8.conf - binin8w.conf - binin16.conf - binin32.conf - binuin16.conf - binuin32.conf txtfp32.conf txtfp64.conf txtin8.conf @@ -52,6 +45,9 @@ dbinuin16.h5.txt dbinuin32.h5.txt dtxtstr.h5.txt + tall_fp32.ddl + tall_i32.ddl + tintsattrs_u32.ddl ) set (HDF5_REFERENCE_TEST_FILES binfp64.h5 @@ -71,6 +67,10 @@ txtstr.h5 textpfe.h5 ) + set (HDF5_TOOLS_TEST_FILES + tall.h5 + tintsattrs.h5 + ) file (MAKE_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles") foreach (conf_file ${HDF5_REFERENCE_CONF_FILES}) @@ -84,6 +84,10 @@ foreach (h5_file ${HDF5_REFERENCE_TEST_FILES}) HDFTEST_COPY_FILE("${HDF5_TOOLS_TEST_H5IMPORT_SOURCE_DIR}/testfiles/${h5_file}" "${PROJECT_BINARY_DIR}/testfiles/${h5_file}" "h5import_files") endforeach () + + foreach (h5_file ${HDF5_TOOLS_TEST_FILES}) + HDFTEST_COPY_FILE("${HDF5_TOOLS_DIR}/testfiles/${h5_file}" "${PROJECT_BINARY_DIR}/testfiles/${h5_file}" "h5import_files") + endforeach () add_custom_target(h5import_files ALL COMMENT "Copying files needed by h5import tests" DEPENDS ${h5import_files_list}) ############################################################################## @@ -104,6 +108,11 @@ COMMAND ${CMAKE_COMMAND} -E remove ${testfile} + ${testfile}.new + ${testfile}.new.err + ${testfile}.out + ${testfile}.out.err + ${testfile} ) set_tests_properties (H5IMPORT-${testname}-clear-objects PROPERTIES DEPENDS H5IMPORT-h5importtest) @@ -148,6 +157,12 @@ -E remove d${testfile} d${testfile}.bin + d${testfile}.dmp + d${testfile}.dmp.err + d${testfile}.imp + d${testfile}.imp.err + d${testfile}.dff + d${testfile}.dff.err ) set_tests_properties (H5IMPORT-DUMP-${testname}-clear-objects PROPERTIES DEPENDS H5IMPORT-h5importtest) @@ -156,7 +171,7 @@ NAME H5IMPORT-DUMP-${testname}-H5DMP COMMAND "${CMAKE_COMMAND}" -D "TEST_PROGRAM=$" - -D "TEST_ARGS:STRING=-p;-d;${datasetname};-o;d${testfile}.bin;-b;testfiles/${testfile}" + -D "TEST_ARGS:STRING=-p;-d;${datasetname};-o;d${testfile}.bin;-b;NATIVE;testfiles/${testfile}" -D "TEST_FOLDER=${PROJECT_BINARY_DIR}" -D "TEST_OUTPUT=d${testfile}.dmp" -D "TEST_EXPECT=0" @@ -207,6 +222,64 @@ endif () endmacro () + macro (ADD_H5_DUMPSUBTEST testname testfile datasetname) + # If using memchecker skip tests + if (NOT HDF5_ENABLE_USING_MEMCHECKER) + add_test ( + NAME H5IMPORT_SUB-DUMP-${testname}-clear-objects + COMMAND ${CMAKE_COMMAND} + -E remove + d-${testname}.dmp + d-${testname}.dmp.err + d-${testname}.h5 + ${testname}.dmp + ${testname}.dmp.err + ${testname}.imp + ${testname}.imp.err + ${testname}.bin + ) + set_tests_properties (H5IMPORT_SUB-DUMP-${testname}-clear-objects PROPERTIES DEPENDS H5IMPORT-h5importtest) + + add_test ( + NAME H5IMPORT_SUB-DUMP-${testname}-H5DMP + COMMAND "${CMAKE_COMMAND}" + -D "TEST_PROGRAM=$" + -D "TEST_ARGS:STRING=-p;-d;${datasetname};${ARGN};-o;${testname}.bin;-b;NATIVE;testfiles/${testfile}" + -D "TEST_FOLDER=${PROJECT_BINARY_DIR}" + -D "TEST_OUTPUT=${testname}.dmp" + -D "TEST_EXPECT=0" + -D "TEST_SKIP_COMPARE=TRUE" + -P "${HDF_RESOURCES_EXT_DIR}/runTest.cmake" + ) + set_tests_properties (H5IMPORT_SUB-DUMP-${testname}-H5DMP PROPERTIES DEPENDS "H5IMPORT_SUB-DUMP-${testname}-clear-objects") + + add_test ( + NAME H5IMPORT_SUB-DUMP-${testname}-H5IMP + COMMAND "${CMAKE_COMMAND}" + -D "TEST_PROGRAM=$" + -D "TEST_ARGS:STRING=${testname}.bin;-c;${testname}.dmp;-o;d-${testname}.h5" + -D "TEST_FOLDER=${PROJECT_BINARY_DIR}" + -D "TEST_OUTPUT=${testname}.imp" + -D "TEST_EXPECT=0" + -D "TEST_SKIP_COMPARE=TRUE" + -P "${HDF_RESOURCES_EXT_DIR}/runTest.cmake" + ) + set_tests_properties (H5IMPORT_SUB-DUMP-${testname}-H5IMP PROPERTIES DEPENDS "H5IMPORT_SUB-DUMP-${testname}-H5DMP") + add_test ( + NAME H5IMPORT_SUB-DUMP-${testname}-CMP + COMMAND "${CMAKE_COMMAND}" + -D "TEST_PROGRAM=$" + -D "TEST_ARGS:STRING=-p;d-${testname}.h5" + -D "TEST_FOLDER=${PROJECT_BINARY_DIR}" + -D "TEST_OUTPUT=d-${testname}.dmp" + -D "TEST_EXPECT=0" + -D "TEST_REFERENCE=testfiles/${testname}.ddl" + -P "${HDF_RESOURCES_EXT_DIR}/runTest.cmake" + ) + set_tests_properties (H5IMPORT_SUB-DUMP-${testname}-CMP PROPERTIES DEPENDS "H5IMPORT_SUB-DUMP-${testname}-H5IMP") + endif () + endmacro () + macro (ADD_H5_SKIP_DUMPTEST testname datasetname testfile) if (NOT HDF5_ENABLE_USING_MEMCHECKER) add_test ( @@ -386,6 +459,22 @@ dtxtstr.h5.dmp.err dtxtstr.h5.dff dtxtstr.h5.dff.err + tall_fp32.dmp + tall_fp32.dmp.err + tall_fp32.bin + tall_fp32.imp + tall_fp32.imp.err + d-tall_fp32.dmp + d-tall_fp32.dmp.err + d-tall_fp32.h5 + tall_i32.dmp + tall_i32.dmp.err + tall_i32.bin + tall_i32.imp + tall_i32.imp.err + d-tall_i32.dmp + d-tall_i32.dmp.err + d-tall_i32.h5 ) set (last_test "H5IMPORT-clear-objects") endif () @@ -395,12 +484,19 @@ COMMAND ${CMAKE_COMMAND} -E remove binfp64.bin + binfp64.conf binin8.bin + binin8.conf binin8w.bin + binin8w.conf binin16.bin + binin16.conf binin32.bin + binin32.conf binuin16.bin + binuin16.conf binuin32.bin + binuin32.conf ) if (NOT "${last_test}" STREQUAL "") set_tests_properties (H5IMPORT-h5importtest-clear-objects PROPERTIES DEPENDS ${last_test}) @@ -432,7 +528,7 @@ ADD_H5_TEST (ASCII_F64 testfiles/txtfp64.txt testfiles/txtfp64.conf txtfp64.h5) # ----- TESTING "BINARY F64 - rank 3 - Output LE+CHUNKED+Extended+Compressed " - ADD_H5_TEST (BINARY_F64 binfp64.bin testfiles/binfp64.conf binfp64.h5) + ADD_H5_TEST (BINARY_F64 binfp64.bin binfp64.conf binfp64.h5) if (NOT USE_FILTER_DEFLATE) ADD_H5_SKIP_DUMPTEST (BINARY_F64 "/fp/bin/64-bit" binfp64.h5 BINARY) else () @@ -440,7 +536,7 @@ endif () # ----- TESTING "BINARY I8 - rank 3 - Output I16LE + Chunked+Extended+Compressed " - ADD_H5_TEST (BINARY_I8 binin8.bin testfiles/binin8.conf binin8.h5) + ADD_H5_TEST (BINARY_I8 binin8.bin binin8.conf binin8.h5) if (NOT USE_FILTER_DEFLATE) ADD_H5_SKIP_DUMPTEST (BINARY_I8 "/int/bin/8-bit" binin8.h5 BINARY) else () @@ -448,19 +544,19 @@ endif () # ----- TESTING "BINARY I16 - rank 3 - Output order LE + CHUNKED + extended " - ADD_H5_TEST (BINARY_I16 binin16.bin testfiles/binin16.conf binin16.h5) + ADD_H5_TEST (BINARY_I16 binin16.bin binin16.conf binin16.h5) ADD_H5_DUMPTEST (BINARY_I16 "/int/bin/16-bit" binin16.h5 BINARY) # ----- TESTING "BINARY I32 - rank 3 - Output BE + CHUNKED " - ADD_H5_TEST (BINARY_I32 binin32.bin testfiles/binin32.conf binin32.h5) + ADD_H5_TEST (BINARY_I32 binin32.bin binin32.conf binin32.h5) ADD_H5_DUMPTEST (BINARY_I32 "/int/bin/32-bit" binin32.h5 BINARY) # ----- TESTING "BINARY UI16 - rank 3 - Output byte BE + CHUNKED " - ADD_H5_TEST (BINARY_UI16 binuin16.bin testfiles/binuin16.conf binuin16.h5) + ADD_H5_TEST (BINARY_UI16 binuin16.bin binuin16.conf binuin16.h5) ADD_H5_DUMPTEST (BINARY_UI16 "/int/buin/16-bit" binuin16.h5 BINARY) # ----- TESTING "BINARY UI32 - rank 3 - Output LE " - ADD_H5_TEST (BINARY_UI32 binuin32.bin testfiles/binuin32.conf binuin32.h5) + ADD_H5_TEST (BINARY_UI32 binuin32.bin binuin32.conf binuin32.h5) ADD_H5_DUMPTEST (BINARY_UI32 "/int/buin/32-bit" binuin32.h5 BINARY) # ----- TESTING "STR" @@ -468,9 +564,14 @@ ADD_H5_DUMPTEST (STR "/mytext/data" txtstr.h5) # ----- TESTING "BINARY I8 CR LF EOF" - ADD_H5_TEST (BINARY_I8_EOF binin8w.bin testfiles/binin8w.conf binin8w.h5) + ADD_H5_TEST (BINARY_I8_EOF binin8w.bin binin8w.conf binin8w.h5) ADD_H5_DUMPTEST (BINARY_I8_EOF "/dataset0" binin8w.h5 BINARY) # ----- TESTING "ASCII F64 - rank 1 - INPUT-CLASS TEXTFPE " ADD_H5_TEST (ASCII_F64_R1 testfiles/textpfe64.txt testfiles/textpfe.conf textpfe.h5) + # ----- TESTING "Binary Subset " + ADD_H5_DUMPSUBTEST (tall_fp32 tall.h5 /g2/dset2.2 --start=1,1 --stride=2,3 --count=1,2 --block=1,1) + ADD_H5_DUMPSUBTEST (tall_i32 tall.h5 /g1/g1.1/dset1.1.1 --start=1,1 --stride=2,3 --count=3,2 --block=1,1) + ADD_H5_DUMPSUBTEST (tintsattrs_u32 tintsattrs.h5 /DU32BITS --start=1,1 --stride=2,3 --count=3,2 --block=1,1) + diff --git a/tools/test/h5import/h5importtest.c b/tools/test/h5import/h5importtest.c index 670559f..489bc01 100644 --- a/tools/test/h5import/h5importtest.c +++ b/tools/test/h5import/h5importtest.c @@ -24,7 +24,7 @@ * h5importtest * * Description: - * This program creates that can be + * This program creates files that can be * used to test the h5import program. * */ @@ -35,6 +35,7 @@ main(void) int nrow = 3, ncol = 4, npln = 5; int i, j, k; FILE *sp; + char machine_order[3] = {0, 0, 0}; float row4[3], col4[4], pln4[5]; float rowo4 = 11.0F, colo4 = 21.0F, plno4 = 51.0F; @@ -66,6 +67,14 @@ main(void) double rowo8 = 11.0F, colo8 = 21.0F, plno8 = 51.0F; double rowi8 = 1.0F, coli8 = 2.0F, plni8 = 5.0F; + /* Initialize machine endian */ + volatile uint32_t ibyte=0x01234567; + /* 0 for big endian, 1 for little endian. */ + if ((*((uint8_t*)(&ibyte))) == 0x67) + strncpy(machine_order, "LE", 2); + else + strncpy(machine_order, "BE", 2); + /* * initialize the row, column, and plane vectors @@ -216,7 +225,7 @@ main(void) #endif /*------------------------------------------------------------------------- - * TOOLTEST binin32.bin -c $srcdir/testfiles/binin32.conf -o binin32.h5 + * TOOLTEST binin32.bin -c binin32.conf -o binin32.h5 *------------------------------------------------------------------------- */ @@ -233,8 +242,21 @@ main(void) } (void) HDfclose(sp); + sp = HDfopen("binin32.conf", "w"); + (void) fprintf(sp, "PATH /int/bin/32-bit\n"); + (void) fprintf(sp, "INPUT-CLASS IN\n"); + (void) fprintf(sp, "INPUT-SIZE 32\n"); + (void) fprintf(sp, "INPUT-BYTE-ORDER %s\n", machine_order); + (void) fprintf(sp, "RANK 3\n"); + (void) fprintf(sp, "OUTPUT-ARCHITECTURE STD\n"); + (void) fprintf(sp, "OUTPUT-BYTE-ORDER BE\n"); + (void) fprintf(sp, "DIMENSION-SIZES 5 3 4\n"); + (void) fprintf(sp, "CHUNKED-DIMENSION-SIZES 1 2 1\n"); + (void) fprintf(sp, "\n"); + (void) HDfclose(sp); + /*------------------------------------------------------------------------- - * TOOLTEST binuin32.bin -c $srcdir/testfiles/binuin32.conf -o binuin32.h5 + * TOOLTEST binuin32.bin -c binuin32.conf -o binuin32.h5 *------------------------------------------------------------------------- */ @@ -251,11 +273,20 @@ main(void) } (void) HDfclose(sp); - - + sp = HDfopen("binuin32.conf", "w"); + (void) fprintf(sp, "PATH /int/buin/32-bit\n"); + (void) fprintf(sp, "INPUT-CLASS UIN\n"); + (void) fprintf(sp, "INPUT-SIZE 32\n"); + (void) fprintf(sp, "INPUT-BYTE-ORDER %s\n", machine_order); + (void) fprintf(sp, "RANK 3\n"); + (void) fprintf(sp, "OUTPUT-ARCHITECTURE STD\n"); + (void) fprintf(sp, "OUTPUT-BYTE-ORDER LE\n"); + (void) fprintf(sp, "DIMENSION-SIZES 5 3 4\n"); + (void) fprintf(sp, "\n"); + (void) HDfclose(sp); /*------------------------------------------------------------------------- - * TOOLTEST binin16.bin -c $srcdir/testfiles/binin16.conf -o binin16.h5 + * TOOLTEST binin16.bin -c binin16.conf -o binin16.h5 *------------------------------------------------------------------------- */ @@ -272,8 +303,22 @@ main(void) } (void) HDfclose(sp); + sp = HDfopen("binin16.conf", "w"); + (void) fprintf(sp, "PATH /int/bin/16-bit\n"); + (void) fprintf(sp, "INPUT-CLASS IN\n"); + (void) fprintf(sp, "INPUT-SIZE 16\n"); + (void) fprintf(sp, "INPUT-BYTE-ORDER %s\n", machine_order); + (void) fprintf(sp, "RANK 3\n"); + (void) fprintf(sp, "OUTPUT-ARCHITECTURE STD\n"); + (void) fprintf(sp, "OUTPUT-BYTE-ORDER LE\n"); + (void) fprintf(sp, "DIMENSION-SIZES 2 3 4\n"); + (void) fprintf(sp, "CHUNKED-DIMENSION-SIZES 2 2 2\n"); + (void) fprintf(sp, "MAXIMUM-DIMENSIONS -1 -1 8\n"); + (void) fprintf(sp, "\n"); + (void) HDfclose(sp); + /*------------------------------------------------------------------------- - * TOOLTEST binuin16.bin -c $srcdir/testfiles/binuin16.conf -o binuin16.h5 + * TOOLTEST binuin16.bin -c binuin16.conf -o binuin16.h5 *------------------------------------------------------------------------- */ sp = HDfopen("binuin16.bin", OPEN_FLAGS); @@ -289,10 +334,22 @@ main(void) } (void) HDfclose(sp); - + sp = HDfopen("binuin16.conf", "w"); + (void) fprintf(sp, "PATH /int/buin/16-bit\n"); + (void) fprintf(sp, "INPUT-CLASS UIN\n"); + (void) fprintf(sp, "INPUT-SIZE 16\n"); + (void) fprintf(sp, "INPUT-BYTE-ORDER %s\n", machine_order); + (void) fprintf(sp, "RANK 3\n"); + (void) fprintf(sp, "OUTPUT-ARCHITECTURE STD\n"); + (void) fprintf(sp, "OUTPUT-BYTE-ORDER BE\n"); + (void) fprintf(sp, "DIMENSION-SIZES 2 3 4\n"); + (void) fprintf(sp, "CHUNKED-DIMENSION-SIZES 2 2 2\n"); + (void) fprintf(sp, "MAXIMUM-DIMENSIONS -1 -1 8\n"); + (void) fprintf(sp, "\n"); + (void) HDfclose(sp); /*------------------------------------------------------------------------- - * TOOLTEST binin8.bin -c $srcdir/testfiles/binin8.conf -o binin8.h5 + * TOOLTEST binin8.bin -c binin8.conf -o binin8.h5 *------------------------------------------------------------------------- */ @@ -309,13 +366,27 @@ main(void) } (void) HDfclose(sp); -#endif /* UNICOS */ - - + sp = HDfopen("binin8.conf", "w"); + (void) fprintf(sp, "PATH /int/bin/8-bit\n"); + (void) fprintf(sp, "INPUT-CLASS IN\n"); + (void) fprintf(sp, "INPUT-SIZE 8\n"); + (void) fprintf(sp, "INPUT-BYTE-ORDER %s\n", machine_order); + (void) fprintf(sp, "RANK 3\n"); + (void) fprintf(sp, "OUTPUT-CLASS IN\n"); + (void) fprintf(sp, "OUTPUT-SIZE 16\n"); + (void) fprintf(sp, "OUTPUT-ARCHITECTURE STD\n"); + (void) fprintf(sp, "OUTPUT-BYTE-ORDER LE\n"); + (void) fprintf(sp, "DIMENSION-SIZES 5 3 4\n"); + (void) fprintf(sp, "CHUNKED-DIMENSION-SIZES 2 2 2\n"); + (void) fprintf(sp, "MAXIMUM-DIMENSIONS -1 -1 -1\n"); + (void) fprintf(sp, "COMPRESSION-PARAM 3\n"); + (void) fprintf(sp, "\n"); + (void) HDfclose(sp); +#endif /* UNICOS */ /*------------------------------------------------------------------------- - * TOOLTEST binfp64.bin -c $srcdir/testfiles/binfp64.conf -o binfp64.h5 + * TOOLTEST binfp64.bin -c binfp64.conf -o binfp64.h5 *------------------------------------------------------------------------- */ @@ -336,10 +407,23 @@ main(void) } (void) HDfclose(sp); - + sp = HDfopen("binfp64.conf", "w"); + (void) fprintf(sp, "PATH /fp/bin/64-bit\n"); + (void) fprintf(sp, "INPUT-CLASS FP\n"); + (void) fprintf(sp, "INPUT-SIZE 64\n"); + (void) fprintf(sp, "INPUT-BYTE-ORDER %s\n", machine_order); + (void) fprintf(sp, "RANK 3\n"); + (void) fprintf(sp, "OUTPUT-ARCHITECTURE IEEE\n"); + (void) fprintf(sp, "OUTPUT-BYTE-ORDER LE\n"); + (void) fprintf(sp, "DIMENSION-SIZES 5 3 4\n"); + (void) fprintf(sp, "CHUNKED-DIMENSION-SIZES 2 2 2\n"); + (void) fprintf(sp, "MAXIMUM-DIMENSIONS -1 6 7\n"); + (void) fprintf(sp, "COMPRESSION-PARAM 8\n"); + (void) fprintf(sp, "\n"); + (void) HDfclose(sp); /*------------------------------------------------------------------------- - * TOOLTEST binin8w.bin -c $srcdir/testfiles/binin8w.conf -o binin8w.h5 + * TOOLTEST binin8w.bin -c binin8w.conf -o binin8w.h5 *------------------------------------------------------------------------- */ @@ -356,13 +440,20 @@ main(void) } HDfclose(sp); + sp = HDfopen("binin8w.conf", "w"); + (void) fprintf(sp, "INPUT-CLASS IN\n"); + (void) fprintf(sp, "INPUT-SIZE 8\n"); + (void) fprintf(sp, "INPUT-BYTE-ORDER %s\n", machine_order); + (void) fprintf(sp, "RANK 1\n"); + (void) fprintf(sp, "OUTPUT-CLASS IN\n"); + (void) fprintf(sp, "OUTPUT-SIZE 8\n"); + (void) fprintf(sp, "OUTPUT-ARCHITECTURE STD\n"); + (void) fprintf(sp, "OUTPUT-BYTE-ORDER LE\n"); + (void) fprintf(sp, "DIMENSION-SIZES 4\n"); + (void) fprintf(sp, "\n"); + (void) HDfclose(sp); } - - - - - return (EXIT_SUCCESS); } diff --git a/tools/test/h5import/h5importtestutil.sh.in b/tools/test/h5import/h5importtestutil.sh.in index 3bbe37b..7dff689 100644 --- a/tools/test/h5import/h5importtestutil.sh.in +++ b/tools/test/h5import/h5importtestutil.sh.in @@ -83,16 +83,11 @@ $SRC_H5IMPORT_TESTFILES/txtuin16.h5 $SRC_H5IMPORT_TESTFILES/txtuin32.h5 $SRC_H5IMPORT_TESTFILES/txtstr.h5 $SRC_H5IMPORT_TESTFILES/textpfe.h5 +$SRC_TOOLS_TESTFILES/tall.h5 +$SRC_TOOLS_TESTFILES/tintsattrs.h5 " LIST_OTHER_TEST_FILES=" -$SRC_H5IMPORT_TESTFILES/binfp64.conf -$SRC_H5IMPORT_TESTFILES/binin8.conf -$SRC_H5IMPORT_TESTFILES/binin8w.conf -$SRC_H5IMPORT_TESTFILES/binin16.conf -$SRC_H5IMPORT_TESTFILES/binin32.conf -$SRC_H5IMPORT_TESTFILES/binuin16.conf -$SRC_H5IMPORT_TESTFILES/binuin32.conf $SRC_H5IMPORT_TESTFILES/txtfp32.conf $SRC_H5IMPORT_TESTFILES/txtfp64.conf $SRC_H5IMPORT_TESTFILES/txtin8.conf @@ -119,6 +114,9 @@ $SRC_H5IMPORT_TESTFILES/dbinin32.h5.txt $SRC_H5IMPORT_TESTFILES/dbinuin16.h5.txt $SRC_H5IMPORT_TESTFILES/dbinuin32.h5.txt $SRC_H5IMPORT_TESTFILES/dtxtstr.h5.txt +$SRC_H5IMPORT_TESTFILES/tall_fp32.ddl +$SRC_H5IMPORT_TESTFILES/tall_i32.ddl +$SRC_H5IMPORT_TESTFILES/tintsattrs_u32.ddl " # @@ -142,10 +140,10 @@ COPY_TESTFILES_TO_TESTDIR() INODE_SDIR=`$LS -i -d $SDIR | $AWK -F' ' '{print $1}'` INODE_DDIR=`$LS -i -d $TESTDIR | $AWK -F' ' '{print $1}'` if [ "$INODE_SDIR" != "$INODE_DDIR" ]; then - $CP -f $tstfile $TESTDIR + $CP -f $tstfile $TESTDIR if [ $? -ne 0 ]; then echo "Error: FAILED to copy $tstfile ." - + # Comment out this to CREATE expected file exit $EXIT_FAILURE fi @@ -206,7 +204,7 @@ fi TOOLTEST2() { err=0 -$RUNSERIAL $DUMPER_BIN -p -d $1 -o d$2.bin -b tmp_testfiles/$2 > d$2.dmp +$RUNSERIAL $DUMPER_BIN -p -d $1 -o d$2.bin -b NATIVE tmp_testfiles/$2 > d$2.dmp $RUNSERIAL $H5IMPORT_BIN d$2.bin -c d$2.dmp -o d$2 > d$2.imp $RUNSERIAL $H5DIFF_BIN -v d$2 tmp_testfiles/$2 $1 $1 > log2 $CP -f $SRC_H5IMPORT_TESTFILES/d$2.txt log1 @@ -264,7 +262,28 @@ else fi } -echo "" +# Same as TOOLTEST2 except for subsets +# Use h5dump output as input to h5import for binary numbers +# Use h5dump to verify results +TOOLTEST5() +{ +err=0 +$RUNSERIAL $DUMPER_BIN -p -d $3 $4 -o d-$1.bin -b NATIVE tmp_testfiles/$2 > d-$1.dmp +$RUNSERIAL $H5IMPORT_BIN d-$1.bin -c d-$1.dmp -o d-$1.h5 > d-$1.imp +$RUNSERIAL $DUMPER_BIN -p d-$1.h5 > log2 +$CP -f $SRC_H5IMPORT_TESTFILES/$1.ddl log1 + +cmp -s log1 log2 || err=1 +rm -f log1 log2 +if [ $err -eq 1 ]; then +nerrors="` expr $nerrors + 1 `"; + echo "*FAILED*" +else + echo " PASSED" +fi +} + +echo "" echo "==============================" echo "H5IMPORT tests started" echo "==============================" @@ -288,30 +307,30 @@ $RUNSERIAL ./h5importtest TESTING "ASCII I32 rank 3 - Output BE " ; TOOLTEST $TESTDIR/txtin32.txt -c $TESTDIR/txtin32.conf -o txtin32.h5 -TESTING "ASCII I16 rank 3 - Output LE - CHUNKED - extended" +TESTING "ASCII I16 rank 3 - Output LE - CHUNKED - extended" TOOLTEST $TESTDIR/txtin16.txt -c $TESTDIR/txtin16.conf -o txtin16.h5 -TESTING "ASCII I8 - rank 3 - Output I8 LE-Chunked+Extended+Compressed " +TESTING "ASCII I8 - rank 3 - Output I8 LE-Chunked+Extended+Compressed " TOOLTEST $TESTDIR/txtin8.txt -c $TESTDIR/txtin8.conf -o txtin8.h5 -TESTING "ASCII UI16 - rank 2 - Output LE+Chunked+Compressed " +TESTING "ASCII UI16 - rank 2 - Output LE+Chunked+Compressed " TOOLTEST $TESTDIR/txtuin16.txt -c $TESTDIR/txtuin16.conf -o txtuin16.h5 -TESTING "ASCII UI32 - rank 3 - Output BE" +TESTING "ASCII UI32 - rank 3 - Output BE" TOOLTEST $TESTDIR/txtuin32.txt -c $TESTDIR/txtuin32.conf -o txtuin32.h5 -TESTING "ASCII F32 - rank 3 - Output LE " +TESTING "ASCII F32 - rank 3 - Output LE " TOOLTEST $TESTDIR/txtfp32.txt -c $TESTDIR/txtfp32.conf -o txtfp32.h5 -TESTING "ASCII F64 - rank 3 - Output BE + CHUNKED+Extended+Compressed " +TESTING "ASCII F64 - rank 3 - Output BE + CHUNKED+Extended+Compressed " TOOLTEST $TESTDIR/txtfp64.txt -c $TESTDIR/txtfp64.conf -o txtfp64.h5 -TESTING "BINARY F64 - rank 3 - Output LE+CHUNKED+Extended+Compressed " -TOOLTEST binfp64.bin -c $TESTDIR/binfp64.conf -o binfp64.h5 -TESTING "H5DUMP-BINARY F64 - rank 3 - Output LE+CHUNKED+Extended+Compressed " +TESTING "BINARY F64 - rank 3 - Output LE+CHUNKED+Extended+Compressed " +TOOLTEST binfp64.bin -c binfp64.conf -o binfp64.h5 +TESTING "H5DUMP-BINARY F64 - rank 3 - Output LE+CHUNKED+Extended+Compressed " if test $USE_FILTER_DEFLATE != "yes"; then SKIP "/fp/bin/64-bit" binfp64.h5 else @@ -319,53 +338,60 @@ else fi -TESTING "BINARY I8 - rank 3 - Output I16LE + Chunked+Extended+Compressed " -TOOLTEST binin8.bin -c $TESTDIR/binin8.conf -o binin8.h5 -TESTING "H5DUMP-BINARY I8 - rank 3 - Output I16LE + Chunked+Extended+Compressed " +TESTING "BINARY I8 - rank 3 - Output I16LE + Chunked+Extended+Compressed " +TOOLTEST binin8.bin -c binin8.conf -o binin8.h5 +TESTING "H5DUMP-BINARY I8 - rank 3 - Output I16LE + Chunked+Extended+Compressed " if test $USE_FILTER_DEFLATE != "yes"; then SKIP "/int/bin/8-bit" binin8.h5 else TOOLTEST2 "/int/bin/8-bit" binin8.h5 fi -TESTING "BINARY I16 - rank 3 - Output order LE + CHUNKED + extended " -TOOLTEST binin16.bin -c $TESTDIR/binin16.conf -o binin16.h5 -TESTING "H5DUMP-BINARY I16 - rank 3 - Output order LE + CHUNKED + extended " +TESTING "BINARY I16 - rank 3 - Output order LE + CHUNKED + extended " +TOOLTEST binin16.bin -c binin16.conf -o binin16.h5 +TESTING "H5DUMP-BINARY I16 - rank 3 - Output order LE + CHUNKED + extended " TOOLTEST2 "/int/bin/16-bit" binin16.h5 -TESTING "BINARY I32 - rank 3 - Output BE + CHUNKED " -TOOLTEST binin32.bin -c $TESTDIR/binin32.conf -o binin32.h5 -TESTING "H5DUMP-BINARY I32 - rank 3 - Output BE + CHUNKED " +TESTING "BINARY I32 - rank 3 - Output BE + CHUNKED " +TOOLTEST binin32.bin -c binin32.conf -o binin32.h5 +TESTING "H5DUMP-BINARY I32 - rank 3 - Output BE + CHUNKED " TOOLTEST2 "/int/bin/32-bit" binin32.h5 -TESTING "BINARY UI16 - rank 3 - Output byte BE + CHUNKED " -TOOLTEST binuin16.bin -c $TESTDIR/binuin16.conf -o binuin16.h5 -TESTING "H5DUMP-BINARY UI16 - rank 3 - Output byte BE + CHUNKED " +TESTING "BINARY UI16 - rank 3 - Output byte BE + CHUNKED " +TOOLTEST binuin16.bin -c binuin16.conf -o binuin16.h5 +TESTING "H5DUMP-BINARY UI16 - rank 3 - Output byte BE + CHUNKED " TOOLTEST2 "/int/buin/16-bit" binuin16.h5 -TESTING "BINARY UI32 - rank 3 - Output LE + CHUNKED " -TOOLTEST binuin32.bin -c $TESTDIR/binuin32.conf -o binuin32.h5 -TESTING "H5DUMP-BINARY UI32 - rank 3 - Output LE + CHUNKED " +TESTING "BINARY UI32 - rank 3 - Output LE + CHUNKED " +TOOLTEST binuin32.bin -c binuin32.conf -o binuin32.h5 +TESTING "H5DUMP-BINARY UI32 - rank 3 - Output LE + CHUNKED " TOOLTEST2 "/int/buin/32-bit" binuin32.h5 -TESTING "STR" +TESTING "STR" TOOLTEST $TESTDIR/txtstr.txt -c $TESTDIR/txtstr.conf -o txtstr.h5 -TESTING "H5DUMP-STR" +TESTING "H5DUMP-STR" TOOLTEST4 "/mytext/data" txtstr.h5 -TESTING "BINARY I8 CR LF EOF" -TOOLTEST binin8w.bin -c $TESTDIR/binin8w.conf -o binin8w.h5 -TESTING "H5DUMP-BINARY I8 CR LF EOF" +TESTING "BINARY I8 CR LF EOF" +TOOLTEST binin8w.bin -c binin8w.conf -o binin8w.h5 +TESTING "H5DUMP-BINARY I8 CR LF EOF" TOOLTEST2 "/dataset0" binin8w.h5 -TESTING "ASCII F64 - rank 1 - INPUT-CLASS TEXTFPE " +TESTING "ASCII F64 - rank 1 - INPUT-CLASS TEXTFPE " TOOLTEST $TESTDIR/textpfe64.txt -c $TESTDIR/textpfe.conf -o textpfe.h5 +TESTING "Binary Subset FP" +TOOLTEST5 tall_fp32 tall.h5 "/g2/dset2.2" "--start=1,1 --stride=2,3 --count=1,2 --block=1,1" +TESTING "Binary Subset INT" +TOOLTEST5 tall_i32 tall.h5 "/g1/g1.1/dset1.1.1" "--start=1,1 --stride=2,3 --count=3,2 --block=1,1" +TESTING "Binary Subset UINT" +TOOLTEST5 tintsattrs_u32 tintsattrs.h5 "/DU32BITS" "--start=1,1 --stride=2,3 --count=3,2 --block=1,1" + -rm -f txtin32.txt txtin16.txt txtin8.txt txtuin32.txt txtuin16.txt *.bin *.dmp *.imp *.h5 +rm -f txtin32.txt txtin16.txt txtin8.txt txtuin32.txt txtuin16.txt *.bin *.dmp *.conf *.imp *.h5 rm -rf tmp_testfiles # Clean up temporary files/directories diff --git a/tools/test/h5import/testfiles/binfp64.conf b/tools/test/h5import/testfiles/binfp64.conf deleted file mode 100644 index 6b4c361..0000000 --- a/tools/test/h5import/testfiles/binfp64.conf +++ /dev/null @@ -1,13 +0,0 @@ -PATH /fp/bin/64-bit -INPUT-CLASS FP -INPUT-SIZE 64 -RANK 3 -DIMENSION-SIZES 5 3 4 -OUTPUT-ARCHITECTURE IEEE -OUTPUT-BYTE-ORDER LE -CHUNKED-DIMENSION-SIZES 2 2 2 -COMPRESSION-PARAM 8 -MAXIMUM-DIMENSIONS -1 6 7 - - - diff --git a/tools/test/h5import/testfiles/binin16.conf b/tools/test/h5import/testfiles/binin16.conf deleted file mode 100644 index 06869cb..0000000 --- a/tools/test/h5import/testfiles/binin16.conf +++ /dev/null @@ -1,12 +0,0 @@ -PATH /int/bin/16-bit -INPUT-CLASS IN -INPUT-SIZE 16 -RANK 3 -DIMENSION-SIZES 2 3 4 -CHUNKED-DIMENSION-SIZES 2 2 2 -MAXIMUM-DIMENSIONS -1 -1 8 -OUTPUT-ARCHITECTURE STD -OUTPUT-BYTE-ORDER LE - - - diff --git a/tools/test/h5import/testfiles/binin32.conf b/tools/test/h5import/testfiles/binin32.conf deleted file mode 100644 index 11996ef..0000000 --- a/tools/test/h5import/testfiles/binin32.conf +++ /dev/null @@ -1,12 +0,0 @@ -PATH /int/bin/32-bit -INPUT-CLASS IN -INPUT-SIZE 32 -RANK 3 -DIMENSION-SIZES 5 3 4 -OUTPUT-ARCHITECTURE STD -OUTPUT-BYTE-ORDER BE -CHUNKED-DIMENSION-SIZES 1 2 1 - - - - diff --git a/tools/test/h5import/testfiles/binin32.h5 b/tools/test/h5import/testfiles/binin32.h5 index fd8faa9..2ec5b7c 100644 Binary files a/tools/test/h5import/testfiles/binin32.h5 and b/tools/test/h5import/testfiles/binin32.h5 differ diff --git a/tools/test/h5import/testfiles/binin8.conf b/tools/test/h5import/testfiles/binin8.conf deleted file mode 100644 index 1edd80a..0000000 --- a/tools/test/h5import/testfiles/binin8.conf +++ /dev/null @@ -1,16 +0,0 @@ -PATH /int/bin/8-bit -INPUT-CLASS IN -INPUT-SIZE 8 -OUTPUT-CLASS IN -OUTPUT-SIZE 16 -RANK 3 -OUTPUT-ARCHITECTURE STD -OUTPUT-BYTE-ORDER LE -DIMENSION-SIZES 5 3 4 -CHUNKED-DIMENSION-SIZES 2 2 2 -MAXIMUM-DIMENSIONS -1 -1 -1 -COMPRESSION-PARAM 3 - - - - diff --git a/tools/test/h5import/testfiles/binin8w.conf b/tools/test/h5import/testfiles/binin8w.conf deleted file mode 100644 index fccb4ac..0000000 --- a/tools/test/h5import/testfiles/binin8w.conf +++ /dev/null @@ -1,9 +0,0 @@ - -INPUT-CLASS IN -INPUT-SIZE 8 -RANK 1 -DIMENSION-SIZES 4 -OUTPUT-BYTE-ORDER LE -OUTPUT-CLASS IN -OUTPUT-SIZE 8 -OUTPUT-ARCHITECTURE STD diff --git a/tools/test/h5import/testfiles/binuin16.conf b/tools/test/h5import/testfiles/binuin16.conf deleted file mode 100644 index a4603df..0000000 --- a/tools/test/h5import/testfiles/binuin16.conf +++ /dev/null @@ -1,12 +0,0 @@ -PATH /int/buin/16-bit -INPUT-CLASS UIN -INPUT-SIZE 16 -RANK 3 -DIMENSION-SIZES 2 3 4 -CHUNKED-DIMENSION-SIZES 2 2 2 -MAXIMUM-DIMENSIONS -1 -1 8 -OUTPUT-ARCHITECTURE STD -OUTPUT-BYTE-ORDER BE - - - diff --git a/tools/test/h5import/testfiles/binuin32.conf b/tools/test/h5import/testfiles/binuin32.conf deleted file mode 100644 index a649e97..0000000 --- a/tools/test/h5import/testfiles/binuin32.conf +++ /dev/null @@ -1,12 +0,0 @@ -PATH /int/buin/32-bit -INPUT-CLASS UIN -INPUT-SIZE 32 -RANK 3 -DIMENSION-SIZES 5 3 4 -OUTPUT-ARCHITECTURE STD -OUTPUT-BYTE-ORDER LE - - - - - diff --git a/tools/test/h5import/testfiles/tall_fp32.ddl b/tools/test/h5import/testfiles/tall_fp32.ddl new file mode 100644 index 0000000..2a0dc1b --- /dev/null +++ b/tools/test/h5import/testfiles/tall_fp32.ddl @@ -0,0 +1,28 @@ +HDF5 "d-tall_fp32.h5" { +GROUP "/" { + GROUP "g2" { + DATASET "dset2.2" { + DATATYPE H5T_IEEE_F32BE + DATASPACE SIMPLE { ( 1, 2 ) / ( 1, 2 ) } + STORAGE_LAYOUT { + CONTIGUOUS + SIZE 8 + OFFSET 2432 + } + FILTERS { + NONE + } + FILLVALUE { + FILL_TIME H5D_FILL_TIME_IFSET + VALUE H5D_FILL_VALUE_DEFAULT + } + ALLOCATION_TIME { + H5D_ALLOC_TIME_LATE + } + DATA { + (0,0): 0.2, 0.8 + } + } + } +} +} diff --git a/tools/test/h5import/testfiles/tall_i32.ddl b/tools/test/h5import/testfiles/tall_i32.ddl new file mode 100644 index 0000000..d9280bc --- /dev/null +++ b/tools/test/h5import/testfiles/tall_i32.ddl @@ -0,0 +1,32 @@ +HDF5 "d-tall_i32.h5" { +GROUP "/" { + GROUP "g1" { + GROUP "g1.1" { + DATASET "dset1.1.1" { + DATATYPE H5T_STD_I32BE + DATASPACE SIMPLE { ( 3, 2 ) / ( 3, 2 ) } + STORAGE_LAYOUT { + CONTIGUOUS + SIZE 24 + OFFSET 3464 + } + FILTERS { + NONE + } + FILLVALUE { + FILL_TIME H5D_FILL_TIME_IFSET + VALUE H5D_FILL_VALUE_DEFAULT + } + ALLOCATION_TIME { + H5D_ALLOC_TIME_LATE + } + DATA { + (0,0): 1, 4, + (1,0): 3, 12, + (2,0): 5, 20 + } + } + } + } +} +} diff --git a/tools/test/h5import/testfiles/tintsattrs_u32.ddl b/tools/test/h5import/testfiles/tintsattrs_u32.ddl new file mode 100644 index 0000000..cf8889c --- /dev/null +++ b/tools/test/h5import/testfiles/tintsattrs_u32.ddl @@ -0,0 +1,28 @@ +HDF5 "d-tintsattrs_u32.h5" { +GROUP "/" { + DATASET "DU32BITS" { + DATATYPE H5T_STD_U32LE + DATASPACE SIMPLE { ( 3, 2 ) / ( 3, 2 ) } + STORAGE_LAYOUT { + CONTIGUOUS + SIZE 24 + 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): 4294967292, 4294967264, + (1,0): 4294967280, 4294967168, + (2,0): 4294967232, 4294966784 + } + } +} +} diff --git a/tools/testfiles/test35.nc b/tools/testfiles/test35.nc new file mode 100644 index 0000000..4bd5d7f Binary files /dev/null and b/tools/testfiles/test35.nc differ diff --git a/tools/testfiles/test35.nc.xml b/tools/testfiles/test35.nc.xml new file mode 100644 index 0000000..a38ed8a --- /dev/null +++ b/tools/testfiles/test35.nc.xml @@ -0,0 +1,20 @@ + + + + + + + + + + + + + + + "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa<aaaa>aaaa<aaaa>aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa<aaaaa>aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa<aaaaaa>aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa<aaaaaa>aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa<aaa>aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa<aaa>aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa<aaaaa>aaaaaaaa<aaaaaa>aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa<aaaaaaaaaa>aaaa<aaaaaaaaaa>aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa<aaaaaa>a<aaaaaa>aaaaaaaa<aaaaaa>a<aaaaaa>aaaaaaaa<aaaaaa>aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa<aaaaaa>aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa<aa>aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa<aaaaaaaaa>aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa<aaaaaaa>aaaaaaaaaaaaa<aaaaaaaaaa>aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa<aaaaaaaaaa>aaaaaaaaaaaaaaaaaaaaaaaaa<aaaaa>aaaaaaaaaaaaaaaaaaa<aaaaaaaaaaa>aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa<aaaaaa>aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa>aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa>aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa<aaa>aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa>aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa<aaa>aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa<aaaaa>aaaaaaaaaaaaa>aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa>aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa>aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa<aaaaaaaaaaaaaaaaaaaaa>aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa>aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa<aaa>aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa<aaaaaaaaaaaaaaaa>aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa<aaaaaaaaaa>aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa<aaaaaaaaaaaa>aaaaaaaaaaaaaaaaaaaaaaaaa<aaaaaaaa>aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\"aaaaa\"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa<aaaaaaaaaaaaaaaaa>aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa<aaaaaaaaaaaaa<aaaa>aaaa<aaaa>>aaaaaaaaaaaaaaaaaaaa<aaaaaaaaaaaaaaaa>aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa<aaaa>aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa<aaa>aaaaaaaaaaaaaaaaaa<aaaa>aaaaaaaaaaaaaaaaaaaaaaaaaa<aaaaaaaa>aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa<aaaaaaaaa>aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa<a>aaaaaaaaaaaaaaaaaaaaaaa<aaaaa>aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa<aaaaaaaaaaaaaaaaaaaaaaaaaaa>aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa<aaaaaaaaaaaaaaaaaaaaaaaaaa>aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa<aaaaaaaa>aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa<aaaaaaaa>aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa<aaaaaaaaaaaa>aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa<aaaaaaaa>aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa<aaaaaaaaaa>aaaaaaaaaaaaaaaaaaaaaaaa<>aaaaaaaaaaaaaaaaaaaa<aaaaaaaaaa>aaaaaaaaaaaaaaaaaaaaaaaa<aa>aaaaaaaaaaaaaaaaaaa<aaaaaaaaa>aaaaaaaaaaaaaaaaaaaaaaaa<aa>aaaaaaaaaaaaaaaaaaaa<aaaaaaaa>aaaaaaaaaaaaaaaaaaaaaaaa<aa>aaaaaaaaaaaaaaaaaaaaaaaaaaa<aaaaa>aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa<aaaaa>aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa<aaaaa>aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa<aaaaa>aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa<aaaaa>aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa<aaaaaa>aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa<aaaaaa>aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa<aaaaaa>aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa<aaaaaa>aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa<aaaaa>aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa<aaaaa>aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa<aaaaaaa>aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa<aaaa>aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa<aaaaaaaaaaaaaaaaaaaaa>aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa<aaaaa>aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa<aaaaaaaaaa>aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa<aaaaa>aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa<aaaaa>aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa<aaaaaaaaaa>aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa<aaaaa>aaaaaaaaaaaaaaaaaaaaa<aaaaa>aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa<aaaaa>aaaaaaaaaaaaaaaaaaaaa<aaaaaa>aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa<aaaaa>aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa<aaaaa>aaaaa<aaaaaa>aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa<aaaaaaa>aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" + + + + + -- cgit v0.12 From d3b803713786b83afb96961ae920733f5429abb0 Mon Sep 17 00:00:00 2001 From: hdftest Date: Fri, 4 Aug 2017 15:49:04 -0500 Subject: Snapshot 1.10.2-snap1 (Committed 8/1/2017 but not pushed from fork) --- README.txt | 2 +- c++/src/cpp_doc_config | 2 +- config/cmake/scripts/HDF5config.cmake | 2 +- configure.ac | 2 +- release_docs/RELEASE.txt | 2 +- src/H5public.h | 4 ++-- 6 files changed, 7 insertions(+), 7 deletions(-) diff --git a/README.txt b/README.txt index eb0e35a..41791b0 100644 --- a/README.txt +++ b/README.txt @@ -1,4 +1,4 @@ -HDF5 version 1.10.2-snap0 currently under development +HDF5 version 1.10.2-snap1 currently under development Please refer to the release_docs/INSTALL file for installation instructions. ------------------------------------------------------------------------------ diff --git a/c++/src/cpp_doc_config b/c++/src/cpp_doc_config index 2b90350..2cf3ecb 100644 --- a/c++/src/cpp_doc_config +++ b/c++/src/cpp_doc_config @@ -38,7 +38,7 @@ PROJECT_NAME = "HDF5 C++ API" # could be handy for archiving the generated documentation or if some version # control system is used. -PROJECT_NUMBER = "1.10.2-snap0, currently under development" +PROJECT_NUMBER = "1.10.2-snap1, currently under development" # Using the PROJECT_BRIEF tag one can provide an optional one line description # for a project that appears at the top of each page and should give viewer a diff --git a/config/cmake/scripts/HDF5config.cmake b/config/cmake/scripts/HDF5config.cmake index 21d196f..7be8592 100755 --- a/config/cmake/scripts/HDF5config.cmake +++ b/config/cmake/scripts/HDF5config.cmake @@ -39,7 +39,7 @@ cmake_minimum_required (VERSION 3.2.2 FATAL_ERROR) ############################################################################## set (CTEST_SOURCE_VERSION "1.10.2") -set (CTEST_SOURCE_VERSEXT "-snap0") +set (CTEST_SOURCE_VERSEXT "-snap1") ############################################################################## # handle input parameters to script. diff --git a/configure.ac b/configure.ac index 6ddf294..1327f2a 100644 --- a/configure.ac +++ b/configure.ac @@ -24,7 +24,7 @@ AC_PREREQ([2.69]) ## NOTE: Do not forget to change the version number here when we do a ## release!!! ## -AC_INIT([HDF5], [1.10.2-snap0], [help@hdfgroup.org]) +AC_INIT([HDF5], [1.10.2-snap1], [help@hdfgroup.org]) AC_CONFIG_SRCDIR([src/H5.c]) AC_CONFIG_HEADERS([src/H5config.h]) diff --git a/release_docs/RELEASE.txt b/release_docs/RELEASE.txt index b5a06f5..7db1a39 100644 --- a/release_docs/RELEASE.txt +++ b/release_docs/RELEASE.txt @@ -1,4 +1,4 @@ -HDF5 version 1.10.2-snap0 currently under development +HDF5 version 1.10.2-snap1 currently under development ================================================================================ diff --git a/src/H5public.h b/src/H5public.h index dce20f4..084c782 100644 --- a/src/H5public.h +++ b/src/H5public.h @@ -93,9 +93,9 @@ extern "C" { #define H5_VERS_MAJOR 1 /* For major interface/format changes */ #define H5_VERS_MINOR 10 /* For minor interface/format changes */ #define H5_VERS_RELEASE 2 /* For tweaks, bug-fixes, or development */ -#define H5_VERS_SUBRELEASE "snap0" /* For pre-releases like snap0 */ +#define H5_VERS_SUBRELEASE "snap1" /* For pre-releases like snap0 */ /* Empty string for real releases. */ -#define H5_VERS_INFO "HDF5 library version: 1.10.2-snap0" /* Full version string */ +#define H5_VERS_INFO "HDF5 library version: 1.10.2-snap1" /* Full version string */ #define H5check() H5check_version(H5_VERS_MAJOR,H5_VERS_MINOR, \ H5_VERS_RELEASE) -- cgit v0.12 From 1015828c1fbfbce16d6e75656dadeea123775ef1 Mon Sep 17 00:00:00 2001 From: hdftest Date: Tue, 8 Aug 2017 23:31:21 -0500 Subject: Snapshot version 1.10 release 2 (snap1) --- README.txt | 2 +- c++/src/cpp_doc_config | 2 +- config/cmake/scripts/HDF5config.cmake | 2 +- configure.ac | 2 +- release_docs/RELEASE.txt | 2 +- src/H5public.h | 4 ++-- 6 files changed, 7 insertions(+), 7 deletions(-) diff --git a/README.txt b/README.txt index 41791b0..893cfeb 100644 --- a/README.txt +++ b/README.txt @@ -1,4 +1,4 @@ -HDF5 version 1.10.2-snap1 currently under development +HDF5 version 1.10.2-snap2 currently under development Please refer to the release_docs/INSTALL file for installation instructions. ------------------------------------------------------------------------------ diff --git a/c++/src/cpp_doc_config b/c++/src/cpp_doc_config index 2cf3ecb..c651c4d 100644 --- a/c++/src/cpp_doc_config +++ b/c++/src/cpp_doc_config @@ -38,7 +38,7 @@ PROJECT_NAME = "HDF5 C++ API" # could be handy for archiving the generated documentation or if some version # control system is used. -PROJECT_NUMBER = "1.10.2-snap1, currently under development" +PROJECT_NUMBER = "1.10.2-snap2, currently under development" # Using the PROJECT_BRIEF tag one can provide an optional one line description # for a project that appears at the top of each page and should give viewer a diff --git a/config/cmake/scripts/HDF5config.cmake b/config/cmake/scripts/HDF5config.cmake index 7be8592..646917c 100755 --- a/config/cmake/scripts/HDF5config.cmake +++ b/config/cmake/scripts/HDF5config.cmake @@ -39,7 +39,7 @@ cmake_minimum_required (VERSION 3.2.2 FATAL_ERROR) ############################################################################## set (CTEST_SOURCE_VERSION "1.10.2") -set (CTEST_SOURCE_VERSEXT "-snap1") +set (CTEST_SOURCE_VERSEXT "-snap2") ############################################################################## # handle input parameters to script. diff --git a/configure.ac b/configure.ac index 1327f2a..e19a790 100644 --- a/configure.ac +++ b/configure.ac @@ -24,7 +24,7 @@ AC_PREREQ([2.69]) ## NOTE: Do not forget to change the version number here when we do a ## release!!! ## -AC_INIT([HDF5], [1.10.2-snap1], [help@hdfgroup.org]) +AC_INIT([HDF5], [1.10.2-snap2], [help@hdfgroup.org]) AC_CONFIG_SRCDIR([src/H5.c]) AC_CONFIG_HEADERS([src/H5config.h]) diff --git a/release_docs/RELEASE.txt b/release_docs/RELEASE.txt index 7db1a39..591741f 100644 --- a/release_docs/RELEASE.txt +++ b/release_docs/RELEASE.txt @@ -1,4 +1,4 @@ -HDF5 version 1.10.2-snap1 currently under development +HDF5 version 1.10.2-snap2 currently under development ================================================================================ diff --git a/src/H5public.h b/src/H5public.h index 084c782..e65ec28 100644 --- a/src/H5public.h +++ b/src/H5public.h @@ -93,9 +93,9 @@ extern "C" { #define H5_VERS_MAJOR 1 /* For major interface/format changes */ #define H5_VERS_MINOR 10 /* For minor interface/format changes */ #define H5_VERS_RELEASE 2 /* For tweaks, bug-fixes, or development */ -#define H5_VERS_SUBRELEASE "snap1" /* For pre-releases like snap0 */ +#define H5_VERS_SUBRELEASE "snap2" /* For pre-releases like snap0 */ /* Empty string for real releases. */ -#define H5_VERS_INFO "HDF5 library version: 1.10.2-snap1" /* Full version string */ +#define H5_VERS_INFO "HDF5 library version: 1.10.2-snap2" /* Full version string */ #define H5check() H5check_version(H5_VERS_MAJOR,H5_VERS_MINOR, \ H5_VERS_RELEASE) -- cgit v0.12 From 00d66e3cb84b0341572b267f4d24a4ff44720a7f Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Mon, 21 Aug 2017 12:11:24 -0500 Subject: HDFFV-10188 merge fix and tests from develop --- MANIFEST | 4 +++ release_docs/RELEASE.txt | 10 ++++++ tools/lib/h5tools_ref.c | 3 +- tools/src/h5dump/h5dump_xml.c | 38 +++++++++++---------- tools/src/h5ls/h5ls.c | 62 ++++++++++++++++++---------------- tools/test/h5dump/CMakeTests.cmake | 5 +++ tools/test/h5dump/CMakeTestsXML.cmake | 8 +++-- tools/test/h5dump/h5dumpgentest.c | 41 +++++++++++++++++++++- tools/test/h5dump/testh5dump.sh.in | 3 ++ tools/test/h5dump/testh5dumpxml.sh.in | 4 +-- tools/test/h5ls/CMakeTests.cmake | 7 ++++ tools/test/h5ls/testh5ls.sh.in | 5 +++ tools/testfiles/tgrpnullspace.ddl | 33 ++++++++++++++++++ tools/testfiles/tgrpnullspace.h5 | Bin 0 -> 2504 bytes tools/testfiles/tgrpnullspace.ls | 7 ++++ tools/testfiles/tnullspace.h5.xml | 39 +++++++++++++++++++++ 16 files changed, 214 insertions(+), 55 deletions(-) create mode 100644 tools/testfiles/tgrpnullspace.ddl create mode 100644 tools/testfiles/tgrpnullspace.h5 create mode 100644 tools/testfiles/tgrpnullspace.ls create mode 100644 tools/testfiles/tnullspace.h5.xml diff --git a/MANIFEST b/MANIFEST index c7be549..ccb1528 100644 --- a/MANIFEST +++ b/MANIFEST @@ -1706,6 +1706,9 @@ ./tools/testfiles/tgrp_comments.ls ./tools/testfiles/tgrp_comments.ddl ./tools/testfiles/tgrp_comments.h5 +./tools/testfiles/tgrpnullspace.h5 +./tools/testfiles/tgrpnullspace.ddl +./tools/testfiles/tgrpnullspace.ls ./tools/testfiles/thlink-1.ddl ./tools/testfiles/thlink-2.ddl ./tools/testfiles/thlink-3.ddl @@ -1761,6 +1764,7 @@ ./tools/testfiles/tno-subset.h5 ./tools/testfiles/tno-subset.ddl ./tools/testfiles/tnullspace.h5 +./tools/testfiles/tnullspace.h5.xml ./tools/testfiles/tnullspace.ddl ./tools/testfiles/tobjref.h5 ./tools/testfiles/topaque.h5 diff --git a/release_docs/RELEASE.txt b/release_docs/RELEASE.txt index 591741f..d296ffa 100644 --- a/release_docs/RELEASE.txt +++ b/release_docs/RELEASE.txt @@ -259,6 +259,16 @@ Bug Fixes since HDF5-1.10.0-patch1 release Tools ----- + - h5ls + + h5ls generated error on stack when it encountered a H5S_NULL + dataspace. + + Adding checks for H5S_NULL before calling H5Sis_simple (located + in the h5tools_dump_mem function) fixed the issue. + + (ADB - 2017/08/17, HDFFV-10188) + - h5repack Add tests to h5repack.sh.in to verify options added for paged diff --git a/tools/lib/h5tools_ref.c b/tools/lib/h5tools_ref.c index e000080..16a949d 100644 --- a/tools/lib/h5tools_ref.c +++ b/tools/lib/h5tools_ref.c @@ -164,7 +164,8 @@ haddr_t ref_path_table_lookup(const char *thepath) { H5O_info_t oi; - + if((HDstrlen(thepath) == 0) || (thepath == NULL)) + return HADDR_UNDEF; /* Allow lookups on the root group, even though it doesn't have any link info */ if(HDstrcmp(thepath, "/")) { H5L_info_t li; diff --git a/tools/src/h5dump/h5dump_xml.c b/tools/src/h5dump/h5dump_xml.c index 49d4f96..d731013 100644 --- a/tools/src/h5dump/h5dump_xml.c +++ b/tools/src/h5dump/h5dump_xml.c @@ -1959,28 +1959,32 @@ xml_dump_data(hid_t obj_id, int obj_data, struct subset_t H5_ATTR_UNUSED * sset, H5Tclose(type); space = H5Aget_space(obj_id); + if(space == H5S_NULL || space == H5S_NO_CLASS) { + status = SUCCEED; + } + else { + ndims = H5Sget_simple_extent_dims(space, size, NULL); - ndims = H5Sget_simple_extent_dims(space, size, NULL); + for (i = 0; i < ndims; i++) + nelmts *= size[i]; - for (i = 0; i < ndims; i++) - nelmts *= size[i]; + buf = HDmalloc((size_t)(nelmts * MAX(H5Tget_size(type), H5Tget_size(p_type)))); + HDassert(buf); - buf = HDmalloc((size_t)(nelmts * MAX(H5Tget_size(type), H5Tget_size(p_type)))); - HDassert(buf); + if (H5Aread(obj_id, p_type, buf) >= 0) { + h5tools_context_t datactx; + HDmemset(&datactx, 0, sizeof(datactx)); + datactx.need_prefix = TRUE; + datactx.indent_level = ctx.indent_level; + datactx.cur_column = ctx.cur_column; + status = h5tools_dump_mem(rawoutstream, outputformat, &datactx, obj_id, p_type, space, buf); + } + /* Reclaim any VL memory, if necessary */ + if (vl_data) + H5Dvlen_reclaim(p_type, space, H5P_DEFAULT, buf); - if (H5Aread(obj_id, p_type, buf) >= 0) { - h5tools_context_t datactx; - HDmemset(&datactx, 0, sizeof(datactx)); - datactx.need_prefix = TRUE; - datactx.indent_level = ctx.indent_level; - datactx.cur_column = ctx.cur_column; - status = h5tools_dump_mem(rawoutstream, outputformat, &datactx, obj_id, p_type, space, buf); + HDfree(buf); } - /* Reclaim any VL memory, if necessary */ - if (vl_data) - H5Dvlen_reclaim(p_type, space, H5P_DEFAULT, buf); - - HDfree(buf); H5Tclose(p_type); H5Sclose(space); H5Tclose(type); diff --git a/tools/src/h5ls/h5ls.c b/tools/src/h5ls/h5ls.c index 8c18794..a181186 100644 --- a/tools/src/h5ls/h5ls.c +++ b/tools/src/h5ls/h5ls.c @@ -1617,38 +1617,40 @@ list_attr(hid_t obj, const char *attr_name, const H5A_info_t H5_ATTR_UNUSED *ain info = &outputformat; - if(hexdump_g) - p_type = H5Tcopy(type); - else - p_type = H5Tget_native_type(type, H5T_DIR_DEFAULT); - - if(p_type >= 0) { - /* VL data special information */ - unsigned int vl_data = 0; /* contains VL datatypes */ - - /* Check if we have VL data in the dataset's datatype */ - if (h5tools_detect_vlen(p_type) == TRUE) - vl_data = TRUE; - - temp_need= nelmts * MAX(H5Tget_size(type), H5Tget_size(p_type)); - HDassert(temp_need == (hsize_t)((size_t)temp_need)); - need = (size_t)temp_need; - buf = HDmalloc(need); - HDassert(buf); - if(H5Aread(attr, p_type, buf) >= 0) { - ctx.need_prefix = TRUE; - ctx.indent_level = 2; - ctx.cur_column = (size_t)curr_pos; - h5tools_dump_mem(rawoutstream, info, &ctx, attr, p_type, space, buf); - } + if(space_type != H5S_NULL && space_type != H5S_NO_CLASS) { + if(hexdump_g) + p_type = H5Tcopy(type); + else + p_type = H5Tget_native_type(type, H5T_DIR_DEFAULT); + + if(p_type >= 0) { + /* VL data special information */ + unsigned int vl_data = 0; /* contains VL datatypes */ + + /* Check if we have VL data in the dataset's datatype */ + if (h5tools_detect_vlen(p_type) == TRUE) + vl_data = TRUE; + + temp_need= nelmts * MAX(H5Tget_size(type), H5Tget_size(p_type)); + HDassert(temp_need == (hsize_t)((size_t)temp_need)); + need = (size_t)temp_need; + buf = HDmalloc(need); + HDassert(buf); + if(H5Aread(attr, p_type, buf) >= 0) { + ctx.need_prefix = TRUE; + ctx.indent_level = 2; + ctx.cur_column = (size_t)curr_pos; + h5tools_dump_mem(rawoutstream, info, &ctx, attr, p_type, space, buf); + } - /* Reclaim any VL memory, if necessary */ - if (vl_data) - H5Dvlen_reclaim(p_type, space, H5P_DEFAULT, buf); + /* Reclaim any VL memory, if necessary */ + if (vl_data) + H5Dvlen_reclaim(p_type, space, H5P_DEFAULT, buf); - HDfree(buf); - H5Tclose(p_type); - } /* end if */ + HDfree(buf); + H5Tclose(p_type); + } /* end if */ + } H5Sclose(space); H5Tclose(type); diff --git a/tools/test/h5dump/CMakeTests.cmake b/tools/test/h5dump/CMakeTests.cmake index 0a72709..d3d1c4d 100644 --- a/tools/test/h5dump/CMakeTests.cmake +++ b/tools/test/h5dump/CMakeTests.cmake @@ -104,6 +104,7 @@ ${HDF5_TOOLS_DIR}/testfiles/tgroup-1.ddl ${HDF5_TOOLS_DIR}/testfiles/tgroup-2.ddl ${HDF5_TOOLS_DIR}/testfiles/tgrp_comments.ddl + ${HDF5_TOOLS_DIR}/testfiles/tgrpnullspace.ddl ${HDF5_TOOLS_DIR}/testfiles/thlink-1.ddl ${HDF5_TOOLS_DIR}/testfiles/thlink-2.ddl ${HDF5_TOOLS_DIR}/testfiles/thlink-3.ddl @@ -272,6 +273,7 @@ ${HDF5_TOOLS_DIR}/testfiles/tfvalues.h5 ${HDF5_TOOLS_DIR}/testfiles/tgroup.h5 ${HDF5_TOOLS_DIR}/testfiles/tgrp_comments.h5 + ${HDF5_TOOLS_DIR}/testfiles/tgrpnullspace.h5 ${HDF5_TOOLS_DIR}/testfiles/thlink.h5 ${HDF5_TOOLS_DIR}/testfiles/thyperslab.h5 ${HDF5_TOOLS_DIR}/testfiles/tints4dims.h5 @@ -887,6 +889,8 @@ tgroup-2.out.err tgrp_comments.out tgrp_comments.out.err + tgrpnullspace.out + tgrpnullspace.out.err thlink-1.out thlink-1.out.err thlink-2.out @@ -1394,6 +1398,7 @@ # test for displaying dataset and attribute of null space ADD_H5_TEST (tnullspace 0 --enable-error-stack tnullspace.h5) + ADD_H5_TEST (tgrpnullspace 0 -p --enable-error-stack tgrpnullspace.h5) # test for displaying dataset and attribute of space with 0 dimension size ADD_H5_TEST (zerodim 0 --enable-error-stack zerodim.h5) diff --git a/tools/test/h5dump/CMakeTestsXML.cmake b/tools/test/h5dump/CMakeTestsXML.cmake index bdc6755..e068c5e 100644 --- a/tools/test/h5dump/CMakeTestsXML.cmake +++ b/tools/test/h5dump/CMakeTestsXML.cmake @@ -53,6 +53,7 @@ ${HDF5_TOOLS_DIR}/testfiles/test35.nc ${HDF5_TOOLS_DIR}/testfiles/tnestedcomp.h5 ${HDF5_TOOLS_DIR}/testfiles/tnodata.h5 + ${HDF5_TOOLS_DIR}/testfiles/tnullspace.h5 ${HDF5_TOOLS_DIR}/testfiles/tobjref.h5 ${HDF5_TOOLS_DIR}/testfiles/topaque.h5 ${HDF5_TOOLS_DIR}/testfiles/torderattr.h5 @@ -117,6 +118,7 @@ ${HDF5_TOOLS_DIR}/testfiles/tname-sp.h5.xml ${HDF5_TOOLS_DIR}/testfiles/tnestedcomp.h5.xml ${HDF5_TOOLS_DIR}/testfiles/tnodata.h5.xml + ${HDF5_TOOLS_DIR}/testfiles/tnullspace.h5.xml ${HDF5_TOOLS_DIR}/testfiles/tobjref.h5.xml ${HDF5_TOOLS_DIR}/testfiles/topaque.h5.xml ${HDF5_TOOLS_DIR}/testfiles/torderattr1.h5.xml @@ -296,6 +298,8 @@ tnodata.h5.out.err tnoname.h5.out tnoname.h5.out.err + tnullspace.h5.out + tnullspace.h5.out.err tobjref.h5.out tobjref.h5.out.err topaque.h5.out @@ -402,9 +406,7 @@ ADD_XML_H5_TEST (tsaf.h5 0 tsaf.h5) ADD_XML_H5_TEST (tempty.h5 0 tempty.h5) ADD_XML_H5_TEST (tnamed_dtype_attr.h5 0 tnamed_dtype_attr.h5) - ##Test dataset and attribute of null space. Commented out: - ## wait until the XML schema is updated for null space. - ## ADD_XML_H5_TEST (tnullspace.h5 0 tnulspace.h5) + ADD_XML_H5_TEST (tnullspace.h5 0 tnullspace.h5) ## So is dataspace with 0 dimension size. ## ADD_XML_H5_TEST (zerodim.h5 0 zerodim.h5) diff --git a/tools/test/h5dump/h5dumpgentest.c b/tools/test/h5dump/h5dumpgentest.c index 2128acb..50a09fc 100644 --- a/tools/test/h5dump/h5dumpgentest.c +++ b/tools/test/h5dump/h5dumpgentest.c @@ -112,6 +112,7 @@ #define FILE82 "tcompound_complex2.h5" #define FILE83 "tvlenstr_array.h5" #define FILE84 "tudfilter.h5" +#define FILE85 "tgrpnullspace.h5" /*------------------------------------------------------------------------- * prototypes @@ -9721,7 +9722,7 @@ static void gent_bitnopaquefields(void) uint32_t c; uint64_t d; } s_t; - + hid_t file, grp=-1, type=-1, space=-1, dset=-1; size_t i; hsize_t nelmts = F80_DIM32; @@ -10437,6 +10438,43 @@ H5Z_filter_dynlibud(unsigned int flags, size_t cd_nelmts, *------------------------------------------------------------------------- */ +/*------------------------------------------------------------------------- + * Function: gent_null_space_group + * + * Purpose: generates dataset and attribute of null dataspace in a group + *------------------------------------------------------------------------- + */ +static void gent_null_space_group(void) +{ + hid_t fid, root, group, dataset, space, attr; + int dset_buf = 10; + int point = 4; + + fid = H5Fcreate(FILE85, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT); + root = H5Gopen2(fid, "/", H5P_DEFAULT); + + group = H5Gcreate2(fid, "/g1", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); + + /* null space */ + space = H5Screate(H5S_NULL); + + /* dataset */ + dataset = H5Dcreate2(group, "dset", H5T_STD_I32BE, space, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); + /* nothing should be written */ + H5Dwrite(dataset, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, &dset_buf); + + /* attribute */ + attr = H5Acreate2(group, "attr", H5T_NATIVE_UINT, space, H5P_DEFAULT, H5P_DEFAULT); + H5Awrite(attr, H5T_NATIVE_INT, &point); /* Nothing can be written */ + + H5Dclose(dataset); + H5Aclose(attr); + H5Gclose(group); + H5Gclose(root); + H5Sclose(space); + H5Fclose(fid); +} + int main(void) { gent_group(); @@ -10526,6 +10564,7 @@ int main(void) gent_bitnopaquefields(); gent_intsfourdims(); + gent_null_space_group(); gent_udfilter(); diff --git a/tools/test/h5dump/testh5dump.sh.in b/tools/test/h5dump/testh5dump.sh.in index f0c01e6..1935b0d 100644 --- a/tools/test/h5dump/testh5dump.sh.in +++ b/tools/test/h5dump/testh5dump.sh.in @@ -132,6 +132,7 @@ $SRC_H5DUMP_TESTFILES/tfpformat.h5 $SRC_H5DUMP_TESTFILES/tfvalues.h5 $SRC_H5DUMP_TESTFILES/tgroup.h5 $SRC_H5DUMP_TESTFILES/tgrp_comments.h5 +$SRC_H5DUMP_TESTFILES/tgrpnullspace.h5 $SRC_H5DUMP_TESTFILES/thlink.h5 $SRC_H5DUMP_TESTFILES/thyperslab.h5 $SRC_H5DUMP_TESTFILES/tintsattrs.h5 @@ -260,6 +261,7 @@ $SRC_H5DUMP_TESTFILES/tfpformat.ddl $SRC_H5DUMP_TESTFILES/tgroup-1.ddl $SRC_H5DUMP_TESTFILES/tgroup-2.ddl $SRC_H5DUMP_TESTFILES/tgrp_comments.ddl +$SRC_H5DUMP_TESTFILES/tgrpnullspace.ddl $SRC_H5DUMP_TESTFILES/thlink-1.ddl $SRC_H5DUMP_TESTFILES/thlink-2.ddl $SRC_H5DUMP_TESTFILES/thlink-3.ddl @@ -1268,6 +1270,7 @@ TOOLTEST thyperslab.ddl --enable-error-stack thyperslab.h5 # test for displaying dataset and attribute of null space TOOLTEST tnullspace.ddl --enable-error-stack tnullspace.h5 +TOOLTEST tgrpnullspace.ddl -p --enable-error-stack tgrpnullspace.h5 # test for displaying dataset and attribute of space with 0 dimension size TOOLTEST zerodim.ddl --enable-error-stack zerodim.h5 diff --git a/tools/test/h5dump/testh5dumpxml.sh.in b/tools/test/h5dump/testh5dumpxml.sh.in index b3b9e14..f740a34 100644 --- a/tools/test/h5dump/testh5dumpxml.sh.in +++ b/tools/test/h5dump/testh5dumpxml.sh.in @@ -355,9 +355,7 @@ TOOLTEST tvlstr.h5.xml --xml tvlstr.h5 TOOLTEST tsaf.h5.xml --xml tsaf.h5 TOOLTEST tempty.h5.xml --xml tempty.h5 TOOLTEST tnamed_dtype_attr.h5.xml --xml tnamed_dtype_attr.h5 -##Test dataset and attribute of null space. Commented out: -## wait until the XML schema is updated for null space. -##TOOLTEST tnullspace.h5.xml --xml tnulspace.h5 +TOOLTEST tnullspace.h5.xml --xml tnullspace.h5 # other options for xml diff --git a/tools/test/h5ls/CMakeTests.cmake b/tools/test/h5ls/CMakeTests.cmake index 5f61eab..62ee835 100644 --- a/tools/test/h5ls/CMakeTests.cmake +++ b/tools/test/h5ls/CMakeTests.cmake @@ -33,6 +33,7 @@ ${HDF5_TOOLS_DIR}/testfiles/textlinktar.h5 ${HDF5_TOOLS_DIR}/testfiles/tgroup.h5 ${HDF5_TOOLS_DIR}/testfiles/tgrp_comments.h5 + ${HDF5_TOOLS_DIR}/testfiles/tgrpnullspace.h5 ${HDF5_TOOLS_DIR}/testfiles/thlink.h5 ${HDF5_TOOLS_DIR}/testfiles/tloop.h5 ${HDF5_TOOLS_DIR}/testfiles/tnestedcomp.h5 @@ -89,6 +90,7 @@ ${HDF5_TOOLS_DIR}/testfiles/tgroup-1.ls ${HDF5_TOOLS_DIR}/testfiles/tgroup-2.ls ${HDF5_TOOLS_DIR}/testfiles/tgroup-3.ls + ${HDF5_TOOLS_DIR}/testfiles/tgrpnullspace.ls ${HDF5_TOOLS_DIR}/testfiles/thlink-1.ls ${HDF5_TOOLS_DIR}/testfiles/tloop-1.ls ${HDF5_TOOLS_DIR}/testfiles/tmultifile.ls @@ -241,6 +243,8 @@ textlinksrc-7-old.out.err tgrp_comments.out tgrp_comments.out.err + tgrpnullspace.out + tgrpnullspace.out.err tsoftlinks-1.out tsoftlinks-1.out.err tsoftlinks-2.out @@ -415,6 +419,9 @@ # test for empty data ADD_H5_TEST (tempty 0 -w80 -d tempty.h5) + # test for displaying dataset and attribute of null space + ADD_H5_TEST (tgrpnullspace 0 -w80 -v tgrpnullspace.h5) + # test for all dataset types written to attributes # enable -S for avoiding printing NATIVE types ADD_H5_TEST (tattr2 0 -w80 -v -S tattr2.h5) diff --git a/tools/test/h5ls/testh5ls.sh.in b/tools/test/h5ls/testh5ls.sh.in index a88ae88..6259af8 100644 --- a/tools/test/h5ls/testh5ls.sh.in +++ b/tools/test/h5ls/testh5ls.sh.in @@ -80,6 +80,7 @@ $SRC_H5LS_TESTFILES/textlinksrc.h5 $SRC_H5LS_TESTFILES/textlinktar.h5 $SRC_H5LS_TESTFILES/tgroup.h5 $SRC_H5LS_TESTFILES/tgrp_comments.h5 +$SRC_H5LS_TESTFILES/tgrpnullspace.h5 $SRC_H5LS_TESTFILES/thlink.h5 $SRC_H5LS_TESTFILES/tloop.h5 $SRC_H5LS_TESTFILES/tnestedcomp.h5 @@ -135,6 +136,7 @@ $SRC_H5LS_TESTFILES/tgroup.ls $SRC_H5LS_TESTFILES/tgroup-1.ls $SRC_H5LS_TESTFILES/tgroup-2.ls $SRC_H5LS_TESTFILES/tgroup-3.ls +$SRC_H5LS_TESTFILES/tgrpnullspace.ls $SRC_H5LS_TESTFILES/thlink-1.ls $SRC_H5LS_TESTFILES/tloop-1.ls $SRC_H5LS_TESTFILES/tmultifile.ls @@ -392,6 +394,9 @@ TOOLTEST tarray1.ls 0 -w80 -r -d tarray1.h5 # test for empty data TOOLTEST tempty.ls 0 -w80 -d tempty.h5 +# test for displaying dataset and attribute of null space +TOOLTEST tgrpnullspace.ls 0 -w80 -v tgrpnullspace.h5 + # test for all dataset types written to attributes # enable -S for avoiding printing NATIVE types TOOLTEST tattr2.ls 0 -w80 -v -S tattr2.h5 diff --git a/tools/testfiles/tgrpnullspace.ddl b/tools/testfiles/tgrpnullspace.ddl new file mode 100644 index 0000000..2b91527 --- /dev/null +++ b/tools/testfiles/tgrpnullspace.ddl @@ -0,0 +1,33 @@ +HDF5 "tgrpnullspace.h5" { +GROUP "/" { + GROUP "g1" { + ATTRIBUTE "attr" { + DATATYPE H5T_STD_U32LE + DATASPACE NULL + DATA { + } + } + DATASET "dset" { + DATATYPE H5T_STD_I32BE + DATASPACE NULL + STORAGE_LAYOUT { + CONTIGUOUS + SIZE 0 + OFFSET 18446744073709551615 + } + FILTERS { + NONE + } + FILLVALUE { + FILL_TIME H5D_FILL_TIME_IFSET + VALUE H5D_FILL_VALUE_DEFAULT + } + ALLOCATION_TIME { + H5D_ALLOC_TIME_LATE + } + DATA { + } + } + } +} +} diff --git a/tools/testfiles/tgrpnullspace.h5 b/tools/testfiles/tgrpnullspace.h5 new file mode 100644 index 0000000..82a405e Binary files /dev/null and b/tools/testfiles/tgrpnullspace.h5 differ diff --git a/tools/testfiles/tgrpnullspace.ls b/tools/testfiles/tgrpnullspace.ls new file mode 100644 index 0000000..b1a1223 --- /dev/null +++ b/tools/testfiles/tgrpnullspace.ls @@ -0,0 +1,7 @@ +Opened "tgrpnullspace.h5" with sec2 driver. +g1 Group + Attribute: attr null + Type: native unsigned int + + Location: 1:800 + Links: 1 diff --git a/tools/testfiles/tnullspace.h5.xml b/tools/testfiles/tnullspace.h5.xml new file mode 100644 index 0000000..b1c1974 --- /dev/null +++ b/tools/testfiles/tnullspace.h5.xml @@ -0,0 +1,39 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -- cgit v0.12 From bd6bf373db66799d7a5037acc0e7aa0b38c8e9e9 Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Mon, 21 Aug 2017 12:28:12 -0500 Subject: HDFFV-10188 add copy of test files --- tools/test/h5dump/testh5dumpxml.sh.in | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tools/test/h5dump/testh5dumpxml.sh.in b/tools/test/h5dump/testh5dumpxml.sh.in index f740a34..f465570 100644 --- a/tools/test/h5dump/testh5dumpxml.sh.in +++ b/tools/test/h5dump/testh5dumpxml.sh.in @@ -97,6 +97,7 @@ $SRC_H5DUMP_TESTFILES/tname-sp.h5 $SRC_H5DUMP_TESTFILES/tnamed_dtype_attr.h5 $SRC_H5DUMP_TESTFILES/tnestedcomp.h5 $SRC_H5DUMP_TESTFILES/tnodata.h5 +$SRC_H5DUMP_TESTFILES/tnnullspace.h5 $SRC_H5DUMP_TESTFILES/tobjref.h5 $SRC_H5DUMP_TESTFILES/topaque.h5 $SRC_H5DUMP_TESTFILES/torderattr.h5 @@ -162,6 +163,7 @@ $SRC_H5DUMP_TESTFILES/tname-quot.h5.xml $SRC_H5DUMP_TESTFILES/tname-sp.h5.xml $SRC_H5DUMP_TESTFILES/tnestedcomp.h5.xml $SRC_H5DUMP_TESTFILES/tnodata.h5.xml +$SRC_H5DUMP_TESTFILES/tnullspace.h5.xml $SRC_H5DUMP_TESTFILES/tobjref.h5.xml $SRC_H5DUMP_TESTFILES/topaque.h5.xml $SRC_H5DUMP_TESTFILES/torderattr1.h5.xml -- cgit v0.12 From 6e193a03f61c727c2e7a9fce6dfdd28e1e7abb52 Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Mon, 21 Aug 2017 13:07:44 -0500 Subject: HDFFV-10188 merge typo fix --- tools/test/h5dump/testh5dumpxml.sh.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/test/h5dump/testh5dumpxml.sh.in b/tools/test/h5dump/testh5dumpxml.sh.in index f465570..f7af300 100644 --- a/tools/test/h5dump/testh5dumpxml.sh.in +++ b/tools/test/h5dump/testh5dumpxml.sh.in @@ -97,7 +97,7 @@ $SRC_H5DUMP_TESTFILES/tname-sp.h5 $SRC_H5DUMP_TESTFILES/tnamed_dtype_attr.h5 $SRC_H5DUMP_TESTFILES/tnestedcomp.h5 $SRC_H5DUMP_TESTFILES/tnodata.h5 -$SRC_H5DUMP_TESTFILES/tnnullspace.h5 +$SRC_H5DUMP_TESTFILES/tnullspace.h5 $SRC_H5DUMP_TESTFILES/tobjref.h5 $SRC_H5DUMP_TESTFILES/topaque.h5 $SRC_H5DUMP_TESTFILES/torderattr.h5 -- cgit v0.12 From 65209ee5d526b89e0f21ef797acedb062e4941b0 Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Wed, 23 Aug 2017 10:26:26 -0500 Subject: HDFFV-10188 Force non-native type description --- tools/test/h5ls/CMakeTests.cmake | 2 +- tools/test/h5ls/testh5ls.sh.in | 2 +- tools/testfiles/tgrpnullspace.ls | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/tools/test/h5ls/CMakeTests.cmake b/tools/test/h5ls/CMakeTests.cmake index 62ee835..a04a4b6 100644 --- a/tools/test/h5ls/CMakeTests.cmake +++ b/tools/test/h5ls/CMakeTests.cmake @@ -420,7 +420,7 @@ ADD_H5_TEST (tempty 0 -w80 -d tempty.h5) # test for displaying dataset and attribute of null space - ADD_H5_TEST (tgrpnullspace 0 -w80 -v tgrpnullspace.h5) + ADD_H5_TEST (tgrpnullspace 0 -w80 -v -S tgrpnullspace.h5) # test for all dataset types written to attributes # enable -S for avoiding printing NATIVE types diff --git a/tools/test/h5ls/testh5ls.sh.in b/tools/test/h5ls/testh5ls.sh.in index 6259af8..8c6551b 100644 --- a/tools/test/h5ls/testh5ls.sh.in +++ b/tools/test/h5ls/testh5ls.sh.in @@ -395,7 +395,7 @@ TOOLTEST tarray1.ls 0 -w80 -r -d tarray1.h5 TOOLTEST tempty.ls 0 -w80 -d tempty.h5 # test for displaying dataset and attribute of null space -TOOLTEST tgrpnullspace.ls 0 -w80 -v tgrpnullspace.h5 +TOOLTEST tgrpnullspace.ls 0 -w80 -v -S tgrpnullspace.h5 # test for all dataset types written to attributes # enable -S for avoiding printing NATIVE types diff --git a/tools/testfiles/tgrpnullspace.ls b/tools/testfiles/tgrpnullspace.ls index b1a1223..439414c 100644 --- a/tools/testfiles/tgrpnullspace.ls +++ b/tools/testfiles/tgrpnullspace.ls @@ -1,7 +1,7 @@ Opened "tgrpnullspace.h5" with sec2 driver. g1 Group Attribute: attr null - Type: native unsigned int + Type: 32-bit little-endian unsigned integer Location: 1:800 Links: 1 -- cgit v0.12 From 8e71bbec754ef11728dab6108b570ffbc7228407 Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Mon, 28 Aug 2017 10:27:21 -0500 Subject: HDFFV-10282 merge from develop --- tools/lib/h5diff_dset.c | 12 +- tools/lib/h5diff_util.c | 7 +- tools/lib/h5tools.c | 33 +-- tools/lib/h5tools_ref.c | 43 ++-- tools/lib/h5tools_type.c | 2 - tools/lib/h5tools_utils.c | 8 +- tools/lib/h5trav.c | 32 ++- tools/src/h5copy/h5copy.c | 96 +++---- tools/src/h5dump/h5dump.c | 182 +++++++------- tools/src/h5dump/h5dump_ddl.c | 210 ++++++++-------- tools/src/h5dump/h5dump_xml.c | 457 +++++++++++++++++----------------- tools/src/h5jam/h5jam.c | 13 +- tools/src/h5jam/h5unjam.c | 54 ++-- tools/src/h5ls/h5ls.c | 33 ++- tools/src/h5repack/h5repack.c | 1 - tools/src/h5repack/h5repack_copy.c | 9 +- tools/src/h5repack/h5repack_filters.c | 368 ++++++++++++--------------- tools/src/h5repack/h5repack_refs.c | 8 +- 18 files changed, 757 insertions(+), 811 deletions(-) diff --git a/tools/lib/h5diff_dset.c b/tools/lib/h5diff_dset.c index 991ef48..ea79c6c 100644 --- a/tools/lib/h5diff_dset.c +++ b/tools/lib/h5diff_dset.c @@ -358,7 +358,6 @@ hsize_t diff_datasetid( hid_t did1, nelmts2 *= dims2[i]; h5diffdebug3("nelmts: %ld - %ld\n", nelmts1, nelmts2); - HDassert(nelmts1 == nelmts2); if(tclass != H5T_ARRAY) { /*----------------------------------------------------------------- @@ -459,7 +458,6 @@ hsize_t diff_datasetid( hid_t did1, size = 1; sm_size[i - 1] = MIN(dadims[i - 1], size); sm_nbytes *= sm_size[i - 1]; - HDassert(sm_nbytes > 0); } /* end for */ /* malloc return code should be verified. @@ -469,10 +467,10 @@ hsize_t diff_datasetid( hid_t did1, * that fails to address freeing other objects created here. * E.g., sm_space. */ - sm_buf1 = HDmalloc((size_t)sm_nbytes); - HDassert(sm_buf1); - sm_buf2 = HDmalloc((size_t)sm_nbytes); - HDassert(sm_buf2); + if((sm_buf1 = HDmalloc((size_t)sm_nbytes)) == NULL) + goto error; + if((sm_buf2 = HDmalloc((size_t)sm_nbytes)) == NULL) + goto error; sm_nelmts = sm_nbytes / p_type_nbytes; sm_space = H5Screate_simple(1, &sm_nelmts, NULL); @@ -682,7 +680,6 @@ int diff_can_type( hid_t f_tid1, /* file data type */ * check for non supported classes *------------------------------------------------------------------------- */ - HDassert(tclass1 == tclass2); switch (tclass1) { case H5T_TIME: if((options->m_verbose || options->m_list_not_cmp) && obj1_name && obj2_name) { @@ -754,7 +751,6 @@ int diff_can_type( hid_t f_tid1, /* file data type */ * check for different dimensions *------------------------------------------------------------------------- */ - HDassert(rank1 == rank2); for(i = 0; indims); - - ctx->acc[ctx->ndims - 1] = 1; - for (i = ((int)ctx->ndims - 2); i >= 0; i--) - ctx->acc[i] = ctx->acc[i + 1] * dims[i + 1]; - for (j = 0; j < ctx->ndims; j++) - ctx->pos[j] = 0; + if(ctx->ndims > 0) { + ctx->acc[ctx->ndims - 1] = 1; + for (i = ((int)ctx->ndims - 2); i >= 0; i--) + ctx->acc[i] = ctx->acc[i + 1] * dims[i + 1]; + for (j = 0; j < ctx->ndims; j++) + ctx->pos[j] = 0; + } } /*------------------------------------------------------------------------- @@ -1410,13 +1410,17 @@ render_bin_output(FILE *stream, hid_t container, hid_t tid, void *_mem, hsize_t memb = H5Tget_super(tid); ndims = H5Tget_array_ndims(tid); H5Tget_array_dims2(tid, dims); - HDassert(ndims >= 1 && ndims <= H5S_MAX_RANK); - - /* calculate the number of array elements */ - for (k = 0, nelmts = 1; k < ndims; k++) { - temp_nelmts = nelmts; - temp_nelmts *= dims[k]; - nelmts = (size_t) temp_nelmts; + if(ndims >= 1 && ndims <= H5S_MAX_RANK) { + /* calculate the number of array elements */ + for (k = 0, nelmts = 1; k < ndims; k++) { + temp_nelmts = nelmts; + temp_nelmts *= dims[k]; + nelmts = (size_t) temp_nelmts; + } + } + else { + H5Tclose(memb); + H5E_THROW(FAIL, H5E_tools_min_id_g, "calculate the number of array elements failed"); } for (block_index = 0; block_index < block_nelmts; block_index++) { @@ -1641,7 +1645,6 @@ render_bin_output_region_blocks(hid_t region_space, hid_t region_id, ndims = (unsigned)sndims; alloc_size = nblocks * ndims * 2 * sizeof(ptdata[0]); - HDassert(alloc_size == (hsize_t) ((size_t) alloc_size)); /*check for overflow*/ if((ptdata = (hsize_t*) HDmalloc((size_t) alloc_size)) == NULL) HGOTO_ERROR(FALSE, H5E_tools_min_id_g, "Could not allocate buffer for ptdata"); diff --git a/tools/lib/h5tools_ref.c b/tools/lib/h5tools_ref.c index 16a949d..6153f0c 100644 --- a/tools/lib/h5tools_ref.c +++ b/tools/lib/h5tools_ref.c @@ -107,19 +107,21 @@ static int init_ref_path_table(void) { /* Sanity check */ - HDassert(thefile > 0); - - /* Create skip list to store reference path information */ - if((ref_path_table = H5SL_create(H5SL_TYPE_HADDR, NULL))==NULL) + if(thefile > 0) { + /* Create skip list to store reference path information */ + if((ref_path_table = H5SL_create(H5SL_TYPE_HADDR, NULL))==NULL) + return (-1); + + /* Iterate over objects in this file */ + if(h5trav_visit(thefile, "/", TRUE, TRUE, init_ref_path_cb, NULL, NULL) < 0) { + error_msg("unable to construct reference path table\n"); + h5tools_setstatus(EXIT_FAILURE); + } /* end if */ + + return(0); + } + else return (-1); - - /* Iterate over objects in this file */ - if(h5trav_visit(thefile, "/", TRUE, TRUE, init_ref_path_cb, NULL, NULL) < 0) { - error_msg("unable to construct reference path table\n"); - h5tools_setstatus(EXIT_FAILURE); - } /* end if */ - - return(0); } /*------------------------------------------------------------------------- @@ -212,16 +214,17 @@ ref_path_table_put(const char *path, haddr_t objno) { ref_path_node_t *new_node; - HDassert(ref_path_table); - HDassert(path); - - if((new_node = (ref_path_node_t *)HDmalloc(sizeof(ref_path_node_t))) == NULL) - return(-1); + if(ref_path_table && path) { + if((new_node = (ref_path_node_t *)HDmalloc(sizeof(ref_path_node_t))) == NULL) + return(-1); - new_node->objno = objno; - new_node->path = HDstrdup(path); + new_node->objno = objno; + new_node->path = HDstrdup(path); - return(H5SL_insert(ref_path_table, new_node, &(new_node->objno))); + return(H5SL_insert(ref_path_table, new_node, &(new_node->objno))); + } + else + return (-1); } /* diff --git a/tools/lib/h5tools_type.c b/tools/lib/h5tools_type.c index ae7160b..ee58ccb 100644 --- a/tools/lib/h5tools_type.c +++ b/tools/lib/h5tools_type.c @@ -92,7 +92,6 @@ h5tools_get_little_endian_type(hid_t tid) case H5T_NO_CLASS: case H5T_NCLASSES: default: - HDassert(0); break; } /* end switch */ @@ -179,7 +178,6 @@ h5tools_get_big_endian_type(hid_t tid) case H5T_NO_CLASS: case H5T_NCLASSES: default: - HDassert(0); break; } /* end switch */ diff --git a/tools/lib/h5tools_utils.c b/tools/lib/h5tools_utils.c index 08213df..8c435b2 100644 --- a/tools/lib/h5tools_utils.c +++ b/tools/lib/h5tools_utils.c @@ -608,7 +608,6 @@ find_objs_cb(const char *name, const H5O_info_t *oinfo, const char *already_seen case H5O_TYPE_UNKNOWN: case H5O_TYPE_NTYPES: default: - HDassert(0); break; } /* end switch */ @@ -777,8 +776,11 @@ H5tools_get_symlink_info(hid_t file_id, const char * linkpath, h5tool_link_info_ } /* end if */ /* trg_path must be freed out of this function when finished using */ - link_info->trg_path = (char*)HDcalloc(link_info->linfo.u.val_size, sizeof(char)); - HDassert(link_info->trg_path); + if((link_info->trg_path = (char*)HDcalloc(link_info->linfo.u.val_size, sizeof(char))) == NULL) { + if(link_info->opt.msg_mode == 1) + parallel_print("Warning: unable to allocate buffer for <%s>\n",linkpath); + goto out; + } /* end if */ /* get link value */ if(H5Lget_val(file_id, linkpath, (void *)link_info->trg_path, link_info->linfo.u.val_size, H5P_DEFAULT) < 0) { diff --git a/tools/lib/h5trav.c b/tools/lib/h5trav.c index 3d55f2d..ddc0109 100644 --- a/tools/lib/h5trav.c +++ b/tools/lib/h5trav.c @@ -557,7 +557,7 @@ trav_info_free(trav_info_t *info) if(info) { /* Free visited symbolic links path and file (if alloc) */ - for(u=0; u < info->symlink_visited.nused; u++) + for(u=0; u < info->symlink_visited.nused; u++) { if (info->symlink_visited.objs[u].file) HDfree(info->symlink_visited.objs[u].file); @@ -789,8 +789,6 @@ trav_table_addlink(trav_table_t *table, haddr_t objno, const char *path) return; } /* end for */ } /* end for */ - - HDassert(0 && "object not in table?!?"); } @@ -1017,7 +1015,7 @@ trav_print_visit_obj(const char *path, const H5O_info_t *oinfo, /* Finish printing line about object */ printf("\n"); if(trav_verbosity > 0) - H5Aiterate_by_name(print_udata->fid, path, trav_index_by, trav_index_order, + H5Aiterate_by_name(print_udata->fid, path, trav_index_by, trav_index_order, NULL, trav_attr, &op_data, H5P_DEFAULT); } else @@ -1051,12 +1049,12 @@ trav_print_visit_lnk(const char *path, const H5L_info_t *linfo, void *udata) case H5L_TYPE_SOFT: if(linfo->u.val_size > 0) { char *targbuf = (char*)HDmalloc(linfo->u.val_size + 1); - HDassert(targbuf); - - if(H5Lget_val(print_udata->fid, path, targbuf, linfo->u.val_size + 1, H5P_DEFAULT) < 0) - targbuf[0] = 0; - printf(" %-10s %s -> %s\n", "link", path, targbuf); - HDfree(targbuf); + if(targbuf) { + if(H5Lget_val(print_udata->fid, path, targbuf, linfo->u.val_size + 1, H5P_DEFAULT) < 0) + targbuf[0] = 0; + printf(" %-10s %s -> %s\n", "link", path, targbuf); + HDfree(targbuf); + } } /* end if */ else printf(" %-10s %s ->\n", "link", path); @@ -1069,13 +1067,13 @@ trav_print_visit_lnk(const char *path, const H5L_info_t *linfo, void *udata) const char *objname = NULL; targbuf = (char*)HDmalloc(linfo->u.val_size + 1); - HDassert(targbuf); - - if(H5Lget_val(print_udata->fid, path, targbuf, linfo->u.val_size + 1, H5P_DEFAULT) < 0) - targbuf[0] = 0; - if(H5Lunpack_elink_val(targbuf, linfo->u.val_size, NULL, &filename, &objname) >= 0) - printf(" %-10s %s -> %s %s\n", "ext link", path, filename, objname); - HDfree(targbuf); + if(targbuf) { + if(H5Lget_val(print_udata->fid, path, targbuf, linfo->u.val_size + 1, H5P_DEFAULT) < 0) + targbuf[0] = 0; + if(H5Lunpack_elink_val(targbuf, linfo->u.val_size, NULL, &filename, &objname) >= 0) + printf(" %-10s %s -> %s %s\n", "ext link", path, filename, objname); + HDfree(targbuf); + } } /* end if */ else printf(" %-10s %s ->\n", "ext link", path); diff --git a/tools/src/h5copy/h5copy.c b/tools/src/h5copy/h5copy.c index 3f91fce..be84b26 100644 --- a/tools/src/h5copy/h5copy.c +++ b/tools/src/h5copy/h5copy.c @@ -159,36 +159,28 @@ static int parse_flag(const char* s_flag, unsigned *flag) { unsigned fla=0; - if (HDstrcmp(s_flag,"shallow")==0) - { + if (HDstrcmp(s_flag, "shallow") == 0) { fla = H5O_COPY_SHALLOW_HIERARCHY_FLAG; } - else if (HDstrcmp(s_flag,"soft")==0) - { + else if (HDstrcmp(s_flag, "soft") == 0) { fla = H5O_COPY_EXPAND_SOFT_LINK_FLAG; } - else if (HDstrcmp(s_flag,"ext")==0) - { + else if (HDstrcmp(s_flag, "ext") == 0) { fla = H5O_COPY_EXPAND_EXT_LINK_FLAG; } - else if (HDstrcmp(s_flag,"ref")==0) - { + else if (HDstrcmp(s_flag, "ref") == 0) { fla = H5O_COPY_EXPAND_REFERENCE_FLAG; } - else if (HDstrcmp(s_flag,"noattr")==0) - { + else if (HDstrcmp(s_flag, "noattr") == 0) { fla = H5O_COPY_WITHOUT_ATTR_FLAG; } - else if (HDstrcmp(s_flag,"allflags")==0) - { + else if (HDstrcmp(s_flag, "allflags") == 0) { fla = H5O_COPY_ALL; } - else if (HDstrcmp(s_flag,"nullmsg")==0) - { + else if (HDstrcmp(s_flag, "nullmsg") == 0) { fla = H5O_COPY_PRESERVE_NULL_FLAG; } - else - { + else { error_msg("Error in input flag\n"); return -1; } @@ -247,25 +239,21 @@ main (int argc, const char *argv[]) HDmemset(&linkinfo, 0, sizeof(h5tool_link_info_t)); /* Check for no command line parameters */ - if(argc == 1) - { + if(argc == 1) { usage(); leave(EXIT_FAILURE); } /* end if */ /* parse command line options */ - while ((opt = get_option(argc, argv, s_opts, l_opts)) != EOF) - { - switch ((char)opt) - { + while ((opt = get_option(argc, argv, s_opts, l_opts)) != EOF) { + switch ((char)opt) { case 'd': oname_dst = HDstrdup(opt_arg); break; case 'f': /* validate flag */ - if (parse_flag(opt_arg,&flag)<0) - { + if (parse_flag(opt_arg, &flag) < 0) { usage(); leave(EXIT_FAILURE); } @@ -316,29 +304,25 @@ main (int argc, const char *argv[]) * check for missing file/object names *-------------------------------------------------------------------------*/ - if (fname_src==NULL) - { + if (fname_src==NULL) { error_msg("Input file name missing\n"); usage(); leave(EXIT_FAILURE); } - if (fname_dst==NULL) - { + if (fname_dst==NULL) { error_msg("Output file name missing\n"); usage(); leave(EXIT_FAILURE); } - if (oname_src==NULL) - { + if (oname_src==NULL) { error_msg("Source object name missing\n"); usage(); leave(EXIT_FAILURE); } - if (oname_dst==NULL) - { + if (oname_dst==NULL) { error_msg("Destination object name missing\n"); usage(); leave(EXIT_FAILURE); @@ -367,8 +351,7 @@ main (int argc, const char *argv[]) /*------------------------------------------------------------------------- * test for error in opening input file *-------------------------------------------------------------------------*/ - if (fid_src==-1) - { + if (fid_src==-1) { error_msg("Could not open input file <%s>...Exiting\n", fname_src); leave(EXIT_FAILURE); } @@ -386,8 +369,7 @@ main (int argc, const char *argv[]) /*------------------------------------------------------------------------- * test for error in opening output file *-------------------------------------------------------------------------*/ - if (fid_dst==-1) - { + if (fid_dst==-1) { error_msg("Could not open output file <%s>...Exiting\n", fname_dst); leave(EXIT_FAILURE); } @@ -396,12 +378,10 @@ main (int argc, const char *argv[]) * print some info *-------------------------------------------------------------------------*/ - if (verbose) - { + if (verbose) { printf("Copying file <%s> and object <%s> to file <%s> and object <%s>\n", fname_src, oname_src, fname_dst, oname_dst); if (flag) { - HDassert(str_flag); printf("Using %s flag\n", str_flag); } } @@ -416,8 +396,7 @@ main (int argc, const char *argv[]) HGOTO_ERROR(EXIT_FAILURE, H5E_tools_min_id_g, "H5Pcreate failed"); /* set options for object copy */ - if (flag) - { + if (flag) { if ( H5Pset_copy_object(ocpl_id, flag) < 0) HGOTO_ERROR(EXIT_FAILURE, H5E_tools_min_id_g, "H5Pset_copy_object failed"); } @@ -440,24 +419,21 @@ main (int argc, const char *argv[]) if(verbose) printf("%s: Creating parent groups\n", h5tools_getprogname()); } /* end if */ - else /* error, if parent groups doesn't already exist in destination file */ - { + else { + /* error, if parent groups doesn't already exist in destination file */ size_t i, len; len = HDstrlen(oname_dst); /* check if all the parents groups exist. skip root group */ - for (i = 1; i < len; i++) - { - if ('/'==oname_dst[i]) - { + for (i = 1; i < len; i++) { + if ('/'==oname_dst[i]) { char *str_ptr; str_ptr = (char *)HDcalloc(i + 1, sizeof(char)); HDstrncpy(str_ptr, oname_dst, i); str_ptr[i]='\0'; - if (H5Lexists(fid_dst, str_ptr, H5P_DEFAULT) <= 0) - { + if (H5Lexists(fid_dst, str_ptr, H5P_DEFAULT) <= 0) { error_msg("group <%s> doesn't exist. Use -p to create parent groups.\n", str_ptr); HDfree(str_ptr); HGOTO_ERROR(EXIT_FAILURE, H5E_tools_min_id_g, "H5Lexists failed"); @@ -475,15 +451,15 @@ main (int argc, const char *argv[]) linkinfo.opt.msg_mode = 1; li_ret = H5tools_get_symlink_info(fid_src, oname_src, &linkinfo, 1); - if (li_ret == 0) /* dangling link */ - { + if (li_ret == 0) { + /* dangling link */ if(H5Lcopy(fid_src, oname_src, fid_dst, oname_dst, H5P_DEFAULT, H5P_DEFAULT) < 0) HGOTO_ERROR(EXIT_FAILURE, H5E_tools_min_id_g, "H5Lcopy failed"); } - else /* valid link */ - { + else { + /* valid link */ if (H5Ocopy(fid_src, /* Source file or group identifier */ oname_src, /* Name of the source object to be copied */ fid_dst, /* Destination file or group identifier */ @@ -518,13 +494,13 @@ done: if (linkinfo.trg_path) HDfree(linkinfo.trg_path); - H5E_BEGIN_TRY { - H5Pclose(ocpl_id); - H5Pclose(lcpl_id); - H5Fclose(fid_src); - H5Fclose(fid_dst); - } H5E_END_TRY; + H5E_BEGIN_TRY { + H5Pclose(ocpl_id); + H5Pclose(lcpl_id); + H5Fclose(fid_src); + H5Fclose(fid_dst); + } H5E_END_TRY; - leave(ret_value); + leave(ret_value); } diff --git a/tools/src/h5dump/h5dump.c b/tools/src/h5dump/h5dump.c index bf2e127..b90d60f 100644 --- a/tools/src/h5dump/h5dump.c +++ b/tools/src/h5dump/h5dump.c @@ -721,93 +721,100 @@ parse_mask_list(const char *h_list) const char *ptr = NULL; /* sanity check */ - HDassert(h_list); + if(h_list) { + HDmemset(packed_mask,0,sizeof(packed_mask)); + + packed_bits_num = 0; + /* scan in pair of offset,length separated by commas. */ + ptr = h_list; + while (*ptr) { + /* scan for an offset which is an unsigned int */ + if (!HDisdigit(*ptr)) { + error_msg("Bad mask list(%s)\n", h_list); + return FAIL; + } + soffset_value = HDatoi(ptr); + offset_value = (unsigned)soffset_value; + if (soffset_value < 0 || offset_value >= PACKED_BITS_SIZE_MAX) { + error_msg("Packed Bit offset value(%d) must be between 0 and %u\n", + soffset_value, (unsigned)(PACKED_BITS_SIZE_MAX - 1)); + return FAIL; + } - HDmemset(packed_mask,0,sizeof(packed_mask)); + /* skip to end of integer */ + while (HDisdigit(*++ptr)) + ; + /* Look for the common separator */ + if (*ptr++ != ',') { + error_msg("Bad mask list(%s), missing expected comma separator.\n", h_list); + return FAIL; + } - packed_bits_num = 0; - /* scan in pair of offset,length separated by commas. */ - ptr = h_list; - while (*ptr) { - /* scan for an offset which is an unsigned int */ - if (!HDisdigit(*ptr)) { - error_msg("Bad mask list(%s)\n", h_list); - return FAIL; - } - soffset_value = HDatoi(ptr); - offset_value = (unsigned)soffset_value; - if (soffset_value < 0 || offset_value >= PACKED_BITS_SIZE_MAX) { - error_msg("Packed Bit offset value(%d) must be between 0 and %u\n", - soffset_value, (unsigned)(PACKED_BITS_SIZE_MAX - 1)); - return FAIL; - } + /* scan for a length which is a positive int */ + if (!HDisdigit(*ptr)) { + error_msg("Bad mask list(%s)\n", h_list); + return FAIL; + } + slength_value = HDatoi(ptr); + if (slength_value <= 0) { + error_msg("Packed Bit length value(%d) must be positive.\n", slength_value); + return FAIL; + } + length_value = (unsigned)slength_value; + if ((offset_value + length_value) > PACKED_BITS_SIZE_MAX) { + error_msg("Packed Bit offset+length value(%u) too large. Max is %u\n", + offset_value+length_value, (unsigned)PACKED_BITS_SIZE_MAX); + return FAIL; + } - /* skip to end of integer */ - while (HDisdigit(*++ptr)) - ; - /* Look for the common separator */ - if (*ptr++ != ',') { - error_msg("Bad mask list(%s), missing expected comma separator.\n", h_list); - return FAIL; - } + /* skip to end of int */ + while (HDisdigit(*++ptr)) + ; - /* scan for a length which is a positive int */ - if (!HDisdigit(*ptr)) { - error_msg("Bad mask list(%s)\n", h_list); - return FAIL; - } - slength_value = HDatoi(ptr); - if (slength_value <= 0) { - error_msg("Packed Bit length value(%d) must be positive.\n", slength_value); - return FAIL; + /* store the offset,length pair */ + if (packed_bits_num >= PACKED_BITS_MAX) { + /* too many requests */ + error_msg("Too many masks requested (max. %d). Mask list(%s)\n", PACKED_BITS_MAX, h_list); + return FAIL; + } + packed_offset[packed_bits_num] = offset_value; + packed_length[packed_bits_num] = length_value; + /* create the bit mask by left shift 1's by length, then negate it. */ + /* After packed_mask is calculated, packed_length is not needed but */ + /* keep it for debug purpose. */ + temp_mask = ~0ULL; + if(length_value < (int)(8 *sizeof(unsigned long long))) { + temp_mask = temp_mask << length_value; + packed_mask[packed_bits_num] = ~temp_mask; + } + else + packed_mask[packed_bits_num] = temp_mask; + packed_bits_num++; + + /* skip a possible comma separator */ + if (*ptr == ',') { + if (!(*++ptr)) { + /* unexpected end of string */ + error_msg("Bad mask list(%s), unexpected end of string.\n", h_list); + return FAIL; + } + } } - length_value = (unsigned)slength_value; - if ((offset_value + length_value) > PACKED_BITS_SIZE_MAX) { - error_msg("Packed Bit offset+length value(%u) too large. Max is %u\n", - offset_value+length_value, (unsigned)PACKED_BITS_SIZE_MAX); + if(packed_bits_num > PACKED_BITS_MAX) { + error_msg("Maximum number of packed bits exceeded\n"); return FAIL; } - - /* skip to end of int */ - while (HDisdigit(*++ptr)) - ; - - /* store the offset,length pair */ - if (packed_bits_num >= PACKED_BITS_MAX) { - /* too many requests */ - error_msg("Too many masks requested (max. %d). Mask list(%s)\n", PACKED_BITS_MAX, h_list); + if (packed_bits_num == 0) { + /* got no masks! */ + error_msg("Bad mask list(%s)\n", h_list); return FAIL; } - packed_offset[packed_bits_num] = offset_value; - packed_length[packed_bits_num] = length_value; - /* create the bit mask by left shift 1's by length, then negate it. */ - /* After packed_mask is calculated, packed_length is not needed but */ - /* keep it for debug purpose. */ - temp_mask = ~0ULL; - if(length_value < (int)(8 *sizeof(unsigned long long))) { - temp_mask = temp_mask << length_value; - packed_mask[packed_bits_num] = ~temp_mask; - } - else - packed_mask[packed_bits_num] = temp_mask; - packed_bits_num++; - - /* skip a possible comma separator */ - if (*ptr == ',') { - if (!(*++ptr)) { - /* unexpected end of string */ - error_msg("Bad mask list(%s), unexpected end of string.\n", h_list); - return FAIL; - } - } + return SUCCEED; } - HDassert(packed_bits_num <= PACKED_BITS_MAX); - if (packed_bits_num == 0) { - /* got no masks! */ - error_msg("Bad mask list(%s)\n", h_list); + else { + error_msg("Bad mask list argument\n"); return FAIL; } - return SUCCEED; } @@ -1708,13 +1715,18 @@ h5_fileaccess(void) HDmemset(memb_name, 0, sizeof memb_name); HDmemset(memb_addr, 0, sizeof memb_addr); - HDassert(HDstrlen(multi_letters)==H5FD_MEM_NTYPES); - for (mt=H5FD_MEM_DEFAULT; mt 0); - *prfx = (char *)HDcalloc(prfx_len, 1); + if(prfx_len > 0) + *prfx = (char *)HDcalloc(prfx_len, 1); + else + error_msg("unable to allocate prefix buffer\n"); } diff --git a/tools/src/h5dump/h5dump_ddl.c b/tools/src/h5dump/h5dump_ddl.c index 0a45840..eecd113 100644 --- a/tools/src/h5dump/h5dump_ddl.c +++ b/tools/src/h5dump/h5dump_ddl.c @@ -248,17 +248,19 @@ dump_all_cb(hid_t group, const char *name, const H5L_info_t *linfo, void H5_ATTR /* Keep copy of prefix before iterating into group */ old_prefix = HDstrdup(prefix); - HDassert(old_prefix); + if (old_prefix) { + /* Append group name to prefix */ + add_prefix(&prefix, &prefix_len, name); - /* Append group name to prefix */ - add_prefix(&prefix, &prefix_len, name); + /* Iterate into group */ + dump_function_table->dump_group_function(obj, name); - /* Iterate into group */ - dump_function_table->dump_group_function(obj, name); - - /* Restore old prefix name */ - HDstrcpy(prefix, old_prefix); - HDfree(old_prefix); + /* Restore old prefix name */ + HDstrcpy(prefix, old_prefix); + HDfree(old_prefix); + } + else + error_msg("warning: null prefix\n"); /* Close group */ H5Gclose(obj); @@ -408,131 +410,137 @@ dump_all_cb(hid_t group, const char *name, const H5L_info_t *linfo, void H5_ATTR switch(linfo->type) { case H5L_TYPE_SOFT: - targbuf = (char *)HDmalloc(linfo->u.val_size); - HDassert(targbuf); - - ctx.need_prefix = TRUE; - - /* Render the element */ - h5tools_str_reset(&buffer); - h5tools_str_append(&buffer, "%s \"%s\" %s", - h5tools_dump_header_format->softlinkbegin, name, - h5tools_dump_header_format->softlinkblockbegin); - h5tools_render_element(rawoutstream, outputformat, &ctx, &buffer, &curr_pos, (size_t)outputformat->line_ncols, (hsize_t)0, (hsize_t)0); - - ctx.indent_level++; - - if(H5Lget_val(group, name, targbuf, linfo->u.val_size, H5P_DEFAULT) < 0) { - error_msg("unable to get link value\n"); + if((targbuf = (char *)HDmalloc(linfo->u.val_size)) == NULL) { + error_msg("unable to allocate buffer\n"); h5tools_setstatus(EXIT_FAILURE); ret = FAIL; } else { - /* print the value of a soft link */ - /* Standard DDL: no modification */ ctx.need_prefix = TRUE; - h5tools_simple_prefix(rawoutstream, outputformat, &ctx, (hsize_t)0, 0); /* Render the element */ h5tools_str_reset(&buffer); - h5tools_str_append(&buffer, "LINKTARGET \"%s\"", targbuf); + h5tools_str_append(&buffer, "%s \"%s\" %s", + h5tools_dump_header_format->softlinkbegin, name, + h5tools_dump_header_format->softlinkblockbegin); h5tools_render_element(rawoutstream, outputformat, &ctx, &buffer, &curr_pos, (size_t)outputformat->line_ncols, (hsize_t)0, (hsize_t)0); - } - ctx.indent_level--; + ctx.indent_level++; - ctx.need_prefix = TRUE; - h5tools_simple_prefix(rawoutstream, outputformat, &ctx, (hsize_t)0, 0); + if(H5Lget_val(group, name, targbuf, linfo->u.val_size, H5P_DEFAULT) < 0) { + error_msg("unable to get link value\n"); + h5tools_setstatus(EXIT_FAILURE); + ret = FAIL; + } + else { + /* print the value of a soft link */ + /* Standard DDL: no modification */ + ctx.need_prefix = TRUE; + h5tools_simple_prefix(rawoutstream, outputformat, &ctx, (hsize_t)0, 0); - /* Render the element */ - h5tools_str_reset(&buffer); - if(HDstrlen(h5tools_dump_header_format->softlinkblockend)) { - h5tools_str_append(&buffer, "%s", h5tools_dump_header_format->softlinkblockend); - if(HDstrlen(h5tools_dump_header_format->softlinkend)) - h5tools_str_append(&buffer, " "); - } - if(HDstrlen(h5tools_dump_header_format->softlinkend)) - h5tools_str_append(&buffer, "%s", h5tools_dump_header_format->softlinkend); - h5tools_render_element(rawoutstream, outputformat, &ctx, &buffer, &curr_pos, (size_t)outputformat->line_ncols, (hsize_t)0, (hsize_t)0); + /* Render the element */ + h5tools_str_reset(&buffer); + h5tools_str_append(&buffer, "LINKTARGET \"%s\"", targbuf); + h5tools_render_element(rawoutstream, outputformat, &ctx, &buffer, &curr_pos, (size_t)outputformat->line_ncols, (hsize_t)0, (hsize_t)0); + } - HDfree(targbuf); - break; + ctx.indent_level--; - case H5L_TYPE_EXTERNAL: - targbuf = (char *)HDmalloc(linfo->u.val_size); - HDassert(targbuf); + ctx.need_prefix = TRUE; + h5tools_simple_prefix(rawoutstream, outputformat, &ctx, (hsize_t)0, 0); - ctx.need_prefix = TRUE; - h5tools_simple_prefix(rawoutstream, outputformat, &ctx, (hsize_t)0, 0); + /* Render the element */ + h5tools_str_reset(&buffer); + if(HDstrlen(h5tools_dump_header_format->softlinkblockend)) { + h5tools_str_append(&buffer, "%s", h5tools_dump_header_format->softlinkblockend); + if(HDstrlen(h5tools_dump_header_format->softlinkend)) + h5tools_str_append(&buffer, " "); + } + if(HDstrlen(h5tools_dump_header_format->softlinkend)) + h5tools_str_append(&buffer, "%s", h5tools_dump_header_format->softlinkend); + h5tools_render_element(rawoutstream, outputformat, &ctx, &buffer, &curr_pos, (size_t)outputformat->line_ncols, (hsize_t)0, (hsize_t)0); - /* Render the element */ - h5tools_str_reset(&buffer); - h5tools_str_append(&buffer, "%s \"%s\" %s", - h5tools_dump_header_format->extlinkbegin, name, - h5tools_dump_header_format->extlinkblockbegin); - h5tools_render_element(rawoutstream, outputformat, &ctx, &buffer, &curr_pos, (size_t)outputformat->line_ncols, (hsize_t)0, (hsize_t)0); + HDfree(targbuf); + } + break; - if(H5Lget_val(group, name, targbuf, linfo->u.val_size, H5P_DEFAULT) < 0) { - indentation(dump_indent); - error_msg("unable to get external link value\n"); + case H5L_TYPE_EXTERNAL: + if((targbuf = (char *)HDmalloc(linfo->u.val_size)) == NULL) { + error_msg("unable to allocate buffer\n"); h5tools_setstatus(EXIT_FAILURE); ret = FAIL; - } /* end if */ + } else { - const char *filename; - const char *targname; + ctx.need_prefix = TRUE; + h5tools_simple_prefix(rawoutstream, outputformat, &ctx, (hsize_t)0, 0); - if(H5Lunpack_elink_val(targbuf, linfo->u.val_size, NULL, &filename, &targname) < 0) { + /* Render the element */ + h5tools_str_reset(&buffer); + h5tools_str_append(&buffer, "%s \"%s\" %s", + h5tools_dump_header_format->extlinkbegin, name, + h5tools_dump_header_format->extlinkblockbegin); + h5tools_render_element(rawoutstream, outputformat, &ctx, &buffer, &curr_pos, (size_t)outputformat->line_ncols, (hsize_t)0, (hsize_t)0); + + if(H5Lget_val(group, name, targbuf, linfo->u.val_size, H5P_DEFAULT) < 0) { indentation(dump_indent); - error_msg("unable to unpack external link value\n"); + error_msg("unable to get external link value\n"); h5tools_setstatus(EXIT_FAILURE); ret = FAIL; } /* end if */ else { - ctx.indent_level++; + const char *filename; + const char *targname; - ctx.need_prefix = TRUE; - h5tools_simple_prefix(rawoutstream, outputformat, &ctx, (hsize_t)0, 0); + if(H5Lunpack_elink_val(targbuf, linfo->u.val_size, NULL, &filename, &targname) < 0) { + indentation(dump_indent); + error_msg("unable to unpack external link value\n"); + h5tools_setstatus(EXIT_FAILURE); + ret = FAIL; + } /* end if */ + else { + ctx.indent_level++; - /* Render the element */ - h5tools_str_reset(&buffer); - h5tools_str_append(&buffer, "TARGETFILE \"%s\"", filename); - h5tools_render_element(rawoutstream, outputformat, &ctx, &buffer, &curr_pos, (size_t)outputformat->line_ncols, (hsize_t)0, (hsize_t)0); + ctx.need_prefix = TRUE; + h5tools_simple_prefix(rawoutstream, outputformat, &ctx, (hsize_t)0, 0); - ctx.need_prefix = TRUE; - h5tools_simple_prefix(rawoutstream, outputformat, &ctx, (hsize_t)0, 0); + /* Render the element */ + h5tools_str_reset(&buffer); + h5tools_str_append(&buffer, "TARGETFILE \"%s\"", filename); + h5tools_render_element(rawoutstream, outputformat, &ctx, &buffer, &curr_pos, (size_t)outputformat->line_ncols, (hsize_t)0, (hsize_t)0); - /* Render the element */ - h5tools_str_reset(&buffer); - h5tools_str_append(&buffer, "TARGETPATH \"%s\"", targname); - h5tools_render_element(rawoutstream, outputformat, &ctx, &buffer, &curr_pos, (size_t)outputformat->line_ncols, (hsize_t)0, (hsize_t)0); + ctx.need_prefix = TRUE; + h5tools_simple_prefix(rawoutstream, outputformat, &ctx, (hsize_t)0, 0); - /* dump the external link */ - dump_extlink(group, name, targname); - ctx.indent_level--; + /* Render the element */ + h5tools_str_reset(&buffer); + h5tools_str_append(&buffer, "TARGETPATH \"%s\"", targname); + h5tools_render_element(rawoutstream, outputformat, &ctx, &buffer, &curr_pos, (size_t)outputformat->line_ncols, (hsize_t)0, (hsize_t)0); + + /* dump the external link */ + dump_extlink(group, name, targname); + ctx.indent_level--; + } /* end else */ } /* end else */ - } /* end else */ - ctx.need_prefix = TRUE; - h5tools_simple_prefix(rawoutstream, outputformat, &ctx, (hsize_t)0, 0); + ctx.need_prefix = TRUE; + h5tools_simple_prefix(rawoutstream, outputformat, &ctx, (hsize_t)0, 0); - /* Render the element */ - h5tools_str_reset(&buffer); - if(HDstrlen(h5tools_dump_header_format->extlinkblockend)) { - h5tools_str_append(&buffer, "%s", h5tools_dump_header_format->extlinkblockend); + /* Render the element */ + h5tools_str_reset(&buffer); + if(HDstrlen(h5tools_dump_header_format->extlinkblockend)) { + h5tools_str_append(&buffer, "%s", h5tools_dump_header_format->extlinkblockend); + if(HDstrlen(h5tools_dump_header_format->extlinkend)) + h5tools_str_append(&buffer, " "); + } if(HDstrlen(h5tools_dump_header_format->extlinkend)) - h5tools_str_append(&buffer, " "); - } - if(HDstrlen(h5tools_dump_header_format->extlinkend)) - h5tools_str_append(&buffer, "%s", h5tools_dump_header_format->extlinkend); - h5tools_render_element(rawoutstream, outputformat, &ctx, &buffer, &curr_pos, (size_t)outputformat->line_ncols, (hsize_t)0, (hsize_t)0); + h5tools_str_append(&buffer, "%s", h5tools_dump_header_format->extlinkend); + h5tools_render_element(rawoutstream, outputformat, &ctx, &buffer, &curr_pos, (size_t)outputformat->line_ncols, (hsize_t)0, (hsize_t)0); - HDfree(targbuf); + HDfree(targbuf); + } break; case H5L_TYPE_ERROR: case H5L_TYPE_MAX: - HDassert(0); - /* fall through */ case H5L_TYPE_HARD: default: ctx.need_prefix = TRUE; @@ -1082,7 +1090,7 @@ dump_dataset(hid_t did, const char *name, struct subset_t *sset) case H5T_NO_CLASS: case H5T_NCLASSES: default: - HDassert(0); + error_msg("invalid H5TCLASS type\n"); break; } /* end switch */ } /* for(u=0; uudlinkbegin, links, h5tools_dump_header_format->udlinkblockbegin); diff --git a/tools/src/h5dump/h5dump_xml.c b/tools/src/h5dump/h5dump_xml.c index d731013..a83ec08 100644 --- a/tools/src/h5dump/h5dump_xml.c +++ b/tools/src/h5dump/h5dump_xml.c @@ -198,18 +198,22 @@ xml_dump_all_cb(hid_t group, const char *name, const H5L_info_t *linfo, void H5_ char *old_prefix; /* Pointer to previous prefix */ /* Keep copy of prefix before iterating into group */ - old_prefix = HDstrdup(prefix); - HDassert(old_prefix); - - /* Append group name to prefix */ - add_prefix(&prefix, &prefix_len, name); + if((old_prefix = HDstrdup(prefix)) == NULL) { + error_msg("unable to allocate buffer\n"); + h5tools_setstatus(EXIT_FAILURE); + ret = FAIL; + } + else { + /* Append group name to prefix */ + add_prefix(&prefix, &prefix_len, name); - /* Iterate into group */ - dump_function_table->dump_group_function(obj, name); + /* Iterate into group */ + dump_function_table->dump_group_function(obj, name); - /* Restore old prefix name */ - HDstrcpy(prefix, old_prefix); - HDfree(old_prefix); + /* Restore old prefix name */ + HDstrcpy(prefix, old_prefix); + HDfree(old_prefix); + } /* Close group */ H5Gclose(obj); @@ -360,161 +364,167 @@ xml_dump_all_cb(hid_t group, const char *name, const H5L_info_t *linfo, void H5_ switch(linfo->type) { case H5L_TYPE_SOFT: - targbuf = (char *)HDmalloc(linfo->u.val_size); - HDassert(targbuf); - - if(H5Lget_val(group, name, targbuf, linfo->u.val_size, H5P_DEFAULT) < 0) { - error_msg("unable to get link value\n"); + if((targbuf = (char *)HDmalloc(linfo->u.val_size)) == NULL) { + error_msg("unable to allocate buffer\n"); h5tools_setstatus(EXIT_FAILURE); ret = FAIL; } else { - /* print the value of a soft link */ - /* XML */ - char linkxid[100]; - char parentxid[100]; - char targetxid[100]; - char *t_prefix = xml_escape_the_name(HDstrcmp(prefix,"") ? prefix : "/"); - char *t_name = xml_escape_the_name(name); - char *t_targbuf = xml_escape_the_name(targbuf); - char *t_obj_path = xml_escape_the_name(obj_path); - char *t_link_path; - int res; - - t_link_path = (char *)HDmalloc(HDstrlen(prefix) + linfo->u.val_size + 1); - if(targbuf[0] == '/') - HDstrcpy(t_link_path, targbuf); + if(H5Lget_val(group, name, targbuf, linfo->u.val_size, H5P_DEFAULT) < 0) { + error_msg("unable to get link value\n"); + h5tools_setstatus(EXIT_FAILURE); + ret = FAIL; + } else { - HDstrcpy(t_link_path, prefix); - HDstrcat(HDstrcat(t_link_path, "/"), targbuf); - } /* end else */ + /* print the value of a soft link */ + /* XML */ + char linkxid[100]; + char parentxid[100]; + char targetxid[100]; + char *t_prefix = xml_escape_the_name(HDstrcmp(prefix,"") ? prefix : "/"); + char *t_name = xml_escape_the_name(name); + char *t_targbuf = xml_escape_the_name(targbuf); + char *t_obj_path = xml_escape_the_name(obj_path); + char *t_link_path; + int res; - /* Create OBJ-XIDs for the parent and object */ - xml_name_to_XID(t_obj_path, linkxid, (int)sizeof(linkxid), 1); - xml_name_to_XID(prefix, parentxid, (int)sizeof(parentxid), 1); + t_link_path = (char *)HDmalloc(HDstrlen(prefix) + linfo->u.val_size + 1); + if(targbuf[0] == '/') + HDstrcpy(t_link_path, targbuf); + else { + HDstrcpy(t_link_path, prefix); + HDstrcat(HDstrcat(t_link_path, "/"), targbuf); + } /* end else */ - /* Try to create an OBJ-XID for the object pointed to */ - res = xml_name_to_XID(t_link_path, targetxid, (int)sizeof(targetxid), 0); - if (res == 0) { - /* target obj found */ - ctx.need_prefix = TRUE; - h5tools_simple_prefix(rawoutstream, outputformat, &ctx, (hsize_t)0, 0); + /* Create OBJ-XIDs for the parent and object */ + xml_name_to_XID(t_obj_path, linkxid, (int)sizeof(linkxid), 1); + xml_name_to_XID(prefix, parentxid, (int)sizeof(parentxid), 1); - /* Render the element */ - h5tools_str_reset(&buffer); - h5tools_str_append(&buffer, "<%sSoftLink LinkName=\"%s\" " - "OBJ-XID=\"%s\" " - "H5SourcePath=\"%s\" " - "TargetPath=\"%s\" TargetObj=\"%s\" " - "Parents=\"%s\" H5ParentPaths=\"%s\" />", - xmlnsprefix, - t_name, /* LinkName */ - linkxid, /* OBJ-XID */ - t_obj_path, /* H5SourcePath */ - t_targbuf, /* TargetPath */ - targetxid, /* TargetObj */ - parentxid, /* Parents */ - t_prefix); /* H5ParentPaths */ - h5tools_render_element(rawoutstream, outputformat, &ctx, &buffer, &curr_pos, (size_t)outputformat->line_ncols, (hsize_t)0, (hsize_t)0); - } - else { - /* dangling link -- omit from xml attributes */ - ctx.need_prefix = TRUE; - h5tools_simple_prefix(rawoutstream, outputformat, &ctx, (hsize_t)0, 0); + /* Try to create an OBJ-XID for the object pointed to */ + res = xml_name_to_XID(t_link_path, targetxid, (int)sizeof(targetxid), 0); + if (res == 0) { + /* target obj found */ + ctx.need_prefix = TRUE; + h5tools_simple_prefix(rawoutstream, outputformat, &ctx, (hsize_t)0, 0); - /* Render the element */ - h5tools_str_reset(&buffer); - h5tools_str_append(&buffer, "<%sSoftLink LinkName=\"%s\" " - "OBJ-XID=\"%s\" " - "H5SourcePath=\"%s\" " - "TargetPath=\"%s\" " - "Parents=\"%s\" H5ParentPaths=\"%s\" />", - xmlnsprefix, - t_name, /* LinkName */ - linkxid, /* OBJ-XID */ - t_obj_path, /* H5SourcePath */ - t_targbuf, /* TargetPath */ - parentxid, /* Parents */ - t_prefix); /* H5ParentPaths */ - h5tools_render_element(rawoutstream, outputformat, &ctx, &buffer, &curr_pos, (size_t)outputformat->line_ncols, (hsize_t)0, (hsize_t)0); + /* Render the element */ + h5tools_str_reset(&buffer); + h5tools_str_append(&buffer, "<%sSoftLink LinkName=\"%s\" " + "OBJ-XID=\"%s\" " + "H5SourcePath=\"%s\" " + "TargetPath=\"%s\" TargetObj=\"%s\" " + "Parents=\"%s\" H5ParentPaths=\"%s\" />", + xmlnsprefix, + t_name, /* LinkName */ + linkxid, /* OBJ-XID */ + t_obj_path, /* H5SourcePath */ + t_targbuf, /* TargetPath */ + targetxid, /* TargetObj */ + parentxid, /* Parents */ + t_prefix); /* H5ParentPaths */ + h5tools_render_element(rawoutstream, outputformat, &ctx, &buffer, &curr_pos, (size_t)outputformat->line_ncols, (hsize_t)0, (hsize_t)0); + } + else { + /* dangling link -- omit from xml attributes */ + ctx.need_prefix = TRUE; + h5tools_simple_prefix(rawoutstream, outputformat, &ctx, (hsize_t)0, 0); + + /* Render the element */ + h5tools_str_reset(&buffer); + h5tools_str_append(&buffer, "<%sSoftLink LinkName=\"%s\" " + "OBJ-XID=\"%s\" " + "H5SourcePath=\"%s\" " + "TargetPath=\"%s\" " + "Parents=\"%s\" H5ParentPaths=\"%s\" />", + xmlnsprefix, + t_name, /* LinkName */ + linkxid, /* OBJ-XID */ + t_obj_path, /* H5SourcePath */ + t_targbuf, /* TargetPath */ + parentxid, /* Parents */ + t_prefix); /* H5ParentPaths */ + h5tools_render_element(rawoutstream, outputformat, &ctx, &buffer, &curr_pos, (size_t)outputformat->line_ncols, (hsize_t)0, (hsize_t)0); + } + + HDfree(t_prefix); + HDfree(t_name); + HDfree(t_targbuf); + HDfree(t_obj_path); + HDfree(t_link_path); } - HDfree(t_prefix); - HDfree(t_name); - HDfree(t_targbuf); - HDfree(t_obj_path); - HDfree(t_link_path); + HDfree(targbuf); } - - HDfree(targbuf); break; case H5L_TYPE_EXTERNAL: - targbuf = (char *)HDmalloc(linfo->u.val_size); - HDassert(targbuf); - - if(H5Lget_val(group, name, targbuf, linfo->u.val_size, H5P_DEFAULT) < 0) { - error_msg("unable to get external link value\n"); + if((targbuf = (char *)HDmalloc(linfo->u.val_size)) == NULL) { + error_msg("unable to allocate buffer\n"); h5tools_setstatus(EXIT_FAILURE); ret = FAIL; - } /* end if */ + } else { - const char *filename; - const char *targname; - - if(H5Lunpack_elink_val(targbuf, linfo->u.val_size, NULL, &filename, &targname) < 0) { - error_msg("unable to unpack external link value\n"); + if(H5Lget_val(group, name, targbuf, linfo->u.val_size, H5P_DEFAULT) < 0) { + error_msg("unable to get external link value\n"); h5tools_setstatus(EXIT_FAILURE); ret = FAIL; } /* end if */ else { - char linkxid[100]; - char parentxid[100]; - char *t_name = xml_escape_the_name(name); - char *t_prefix = xml_escape_the_name(HDstrcmp(prefix,"") ? prefix : "/"); - char *t_obj_path = xml_escape_the_name(obj_path); - char *t_filename = xml_escape_the_name(filename); - char *t_targname = xml_escape_the_name(targname); + const char *filename; + const char *targname; - /* Create OBJ-XIDs for the parent and object */ - xml_name_to_XID(t_obj_path, linkxid, (int)sizeof(linkxid), 1); - xml_name_to_XID(prefix, parentxid, (int)sizeof(parentxid), 1); + if(H5Lunpack_elink_val(targbuf, linfo->u.val_size, NULL, &filename, &targname) < 0) { + error_msg("unable to unpack external link value\n"); + h5tools_setstatus(EXIT_FAILURE); + ret = FAIL; + } /* end if */ + else { + char linkxid[100]; + char parentxid[100]; + char *t_name = xml_escape_the_name(name); + char *t_prefix = xml_escape_the_name(HDstrcmp(prefix,"") ? prefix : "/"); + char *t_obj_path = xml_escape_the_name(obj_path); + char *t_filename = xml_escape_the_name(filename); + char *t_targname = xml_escape_the_name(targname); - ctx.need_prefix = TRUE; - h5tools_simple_prefix(rawoutstream, outputformat, &ctx, (hsize_t)0, 0); + /* Create OBJ-XIDs for the parent and object */ + xml_name_to_XID(t_obj_path, linkxid, (int)sizeof(linkxid), 1); + xml_name_to_XID(prefix, parentxid, (int)sizeof(parentxid), 1); - /* Render the element */ - h5tools_str_reset(&buffer); - h5tools_str_append(&buffer, "<%sExternalLink LinkName=\"%s\" " - "OBJ-XID=\"%s\" " - "H5SourcePath=\"%s\" " - "TargetFilename=\"%s\" " - "TargetPath=\"%s\" " - "Parents=\"%s\" H5ParentPaths=\"%s\" />", - xmlnsprefix, - t_name, /* LinkName */ - linkxid, /* OBJ-XID */ - t_obj_path, /* H5SourcePath */ - filename, /* TargetFilename */ - targname, /* TargetPath*/ - parentxid, /* Parents */ - t_prefix); /* H5ParentPaths */ - h5tools_render_element(rawoutstream, outputformat, &ctx, &buffer, &curr_pos, (size_t)outputformat->line_ncols, (hsize_t)0, (hsize_t)0); + ctx.need_prefix = TRUE; + h5tools_simple_prefix(rawoutstream, outputformat, &ctx, (hsize_t)0, 0); - HDfree(t_prefix); - HDfree(t_name); - HDfree(t_filename); - HDfree(t_targname); - HDfree(t_obj_path); + /* Render the element */ + h5tools_str_reset(&buffer); + h5tools_str_append(&buffer, "<%sExternalLink LinkName=\"%s\" " + "OBJ-XID=\"%s\" " + "H5SourcePath=\"%s\" " + "TargetFilename=\"%s\" " + "TargetPath=\"%s\" " + "Parents=\"%s\" H5ParentPaths=\"%s\" />", + xmlnsprefix, + t_name, /* LinkName */ + linkxid, /* OBJ-XID */ + t_obj_path, /* H5SourcePath */ + filename, /* TargetFilename */ + targname, /* TargetPath*/ + parentxid, /* Parents */ + t_prefix); /* H5ParentPaths */ + h5tools_render_element(rawoutstream, outputformat, &ctx, &buffer, &curr_pos, (size_t)outputformat->line_ncols, (hsize_t)0, (hsize_t)0); + + HDfree(t_prefix); + HDfree(t_name); + HDfree(t_filename); + HDfree(t_targname); + HDfree(t_obj_path); + } /* end else */ } /* end else */ - } /* end else */ - HDfree(targbuf); + HDfree(targbuf); + } break; case H5L_TYPE_ERROR: case H5L_TYPE_MAX: - HDassert(0); - /* fall through */ case H5L_TYPE_HARD: default: { @@ -674,7 +684,6 @@ xml_escape_the_name(const char *str) for (i = 0; i < len; i++) { size_t esc_len; - HDassert(ncp_len); if (*cp == '\'') { HDstrncpy(ncp, apos, ncp_len); esc_len = HDstrlen(apos); @@ -768,7 +777,6 @@ xml_escape_the_string(const char *str, int slen) for (i = 0; i < len; i++) { size_t esc_len; - HDassert(ncp_len); if (*cp == '\\') { *ncp++ = '\\'; *ncp = *cp; @@ -1514,8 +1522,6 @@ xml_print_datatype(hid_t type, unsigned in_group) case H5T_NO_CLASS: case H5T_NCLASSES: - HDassert(0); - /* fall through */ default: ctx.need_prefix = TRUE; h5tools_simple_prefix(rawoutstream, outputformat, &ctx, (hsize_t)0, 0); @@ -1968,22 +1974,26 @@ xml_dump_data(hid_t obj_id, int obj_data, struct subset_t H5_ATTR_UNUSED * sset, for (i = 0; i < ndims; i++) nelmts *= size[i]; - buf = HDmalloc((size_t)(nelmts * MAX(H5Tget_size(type), H5Tget_size(p_type)))); - HDassert(buf); - - if (H5Aread(obj_id, p_type, buf) >= 0) { - h5tools_context_t datactx; - HDmemset(&datactx, 0, sizeof(datactx)); - datactx.need_prefix = TRUE; - datactx.indent_level = ctx.indent_level; - datactx.cur_column = ctx.cur_column; - status = h5tools_dump_mem(rawoutstream, outputformat, &datactx, obj_id, p_type, space, buf); + if((buf = HDmalloc((size_t)(nelmts * MAX(H5Tget_size(type), H5Tget_size(p_type))))) == NULL) { + error_msg("unable to allocate buffer\n"); + h5tools_setstatus(EXIT_FAILURE); + status = FAIL; } - /* Reclaim any VL memory, if necessary */ - if (vl_data) - H5Dvlen_reclaim(p_type, space, H5P_DEFAULT, buf); + else { + if (H5Aread(obj_id, p_type, buf) >= 0) { + h5tools_context_t datactx; + HDmemset(&datactx, 0, sizeof(datactx)); + datactx.need_prefix = TRUE; + datactx.indent_level = ctx.indent_level; + datactx.cur_column = ctx.cur_column; + status = h5tools_dump_mem(rawoutstream, outputformat, &datactx, obj_id, p_type, space, buf); + } + /* Reclaim any VL memory, if necessary */ + if (vl_data) + H5Dvlen_reclaim(p_type, space, H5P_DEFAULT, buf); - HDfree(buf); + HDfree(buf); + } } H5Tclose(p_type); H5Sclose(space); @@ -2239,8 +2249,6 @@ xml_dump_attr(hid_t attr, const char *attr_name, const H5A_info_t H5_ATTR_UNUSED break; case H5T_NO_CLASS: case H5T_NCLASSES: - HDassert(0); - /* fall through */ default: ctx.need_prefix = TRUE; h5tools_simple_prefix(rawoutstream, outputformat, &ctx, (hsize_t)0, 0); @@ -3672,8 +3680,6 @@ xml_dump_fill_value(hid_t dcpl, hid_t type) break; case H5T_NO_CLASS: case H5T_NCLASSES: - HDassert(0); - /* fall through */ case H5T_STRING: case H5T_REFERENCE: default: @@ -3812,91 +3818,95 @@ xml_dump_dataset(hid_t did, const char *name, struct subset_t H5_ATTR_UNUSED * s /* Print information about storage layout */ if (H5D_CHUNKED == H5Pget_layout(dcpl)) { - maxdims = H5Sget_simple_extent_ndims(space); - HDassert(maxdims >= 0); - chsize = (hsize_t *)HDmalloc((size_t)maxdims * sizeof(hsize_t)); - ctx.indent_level++; - dump_indent += COL; + if((maxdims = H5Sget_simple_extent_ndims(space)) < 0) { + error_msg("unable to get maxdims\n"); + h5tools_setstatus(EXIT_FAILURE); + } + else { + chsize = (hsize_t *)HDmalloc((size_t)maxdims * sizeof(hsize_t)); + ctx.indent_level++; + dump_indent += COL; - ctx.need_prefix = TRUE; - h5tools_simple_prefix(rawoutstream, outputformat, &ctx, (hsize_t)0, 0); + ctx.need_prefix = TRUE; + h5tools_simple_prefix(rawoutstream, outputformat, &ctx, (hsize_t)0, 0); - /* Render the element */ - h5tools_str_reset(&buffer); - h5tools_str_append(&buffer, "<%sStorageLayout>", xmlnsprefix); - h5tools_render_element(rawoutstream, outputformat, &ctx, &buffer, &curr_pos, (size_t)outputformat->line_ncols, (hsize_t)0, (hsize_t)0); - ctx.indent_level++; - dump_indent += COL; + /* Render the element */ + h5tools_str_reset(&buffer); + h5tools_str_append(&buffer, "<%sStorageLayout>", xmlnsprefix); + h5tools_render_element(rawoutstream, outputformat, &ctx, &buffer, &curr_pos, (size_t)outputformat->line_ncols, (hsize_t)0, (hsize_t)0); + ctx.indent_level++; + dump_indent += COL; - ctx.need_prefix = TRUE; - h5tools_simple_prefix(rawoutstream, outputformat, &ctx, (hsize_t)0, 0); + ctx.need_prefix = TRUE; + h5tools_simple_prefix(rawoutstream, outputformat, &ctx, (hsize_t)0, 0); - /* Render the element */ - h5tools_str_reset(&buffer); - h5tools_str_append(&buffer, "<%sChunkedLayout ", xmlnsprefix); - ndims = H5Pget_chunk(dcpl, maxdims, chsize); - h5tools_str_append(&buffer, "Ndims=\"%d\">", ndims); - h5tools_render_element(rawoutstream, outputformat, &ctx, &buffer, &curr_pos, (size_t)outputformat->line_ncols, (hsize_t)0, (hsize_t)0); + /* Render the element */ + h5tools_str_reset(&buffer); + h5tools_str_append(&buffer, "<%sChunkedLayout ", xmlnsprefix); + ndims = H5Pget_chunk(dcpl, maxdims, chsize); + h5tools_str_append(&buffer, "Ndims=\"%d\">", ndims); + h5tools_render_element(rawoutstream, outputformat, &ctx, &buffer, &curr_pos, (size_t)outputformat->line_ncols, (hsize_t)0, (hsize_t)0); - ctx.indent_level++; - dump_indent += COL; + ctx.indent_level++; + dump_indent += COL; - for (i = 0; i < ndims; i++) { + for (i = 0; i < ndims; i++) { + + ctx.need_prefix = TRUE; + h5tools_simple_prefix(rawoutstream, outputformat, &ctx, (hsize_t)0, 0); + + /* Render the element */ + h5tools_str_reset(&buffer); + h5tools_str_append(&buffer, "<%sChunkDimension DimSize=\"%" H5_PRINTF_LL_WIDTH "u\" />", xmlnsprefix, chsize[i]); + h5tools_render_element(rawoutstream, outputformat, &ctx, &buffer, &curr_pos, (size_t)outputformat->line_ncols, (hsize_t)0, (hsize_t)0); + } ctx.need_prefix = TRUE; h5tools_simple_prefix(rawoutstream, outputformat, &ctx, (hsize_t)0, 0); /* Render the element */ h5tools_str_reset(&buffer); - h5tools_str_append(&buffer, "<%sChunkDimension DimSize=\"%" H5_PRINTF_LL_WIDTH "u\" />", xmlnsprefix, chsize[i]); + h5tools_str_append(&buffer, "<%sRequiredFilter>", xmlnsprefix); h5tools_render_element(rawoutstream, outputformat, &ctx, &buffer, &curr_pos, (size_t)outputformat->line_ncols, (hsize_t)0, (hsize_t)0); - } - - ctx.need_prefix = TRUE; - h5tools_simple_prefix(rawoutstream, outputformat, &ctx, (hsize_t)0, 0); - - /* Render the element */ - h5tools_str_reset(&buffer); - h5tools_str_append(&buffer, "<%sRequiredFilter>", xmlnsprefix); - h5tools_render_element(rawoutstream, outputformat, &ctx, &buffer, &curr_pos, (size_t)outputformat->line_ncols, (hsize_t)0, (hsize_t)0); - ctx.indent_level++; - dump_indent += COL; - check_filters(dcpl); - ctx.indent_level--; - dump_indent -= COL; + ctx.indent_level++; + dump_indent += COL; + check_filters(dcpl); + ctx.indent_level--; + dump_indent -= COL; - ctx.need_prefix = TRUE; - h5tools_simple_prefix(rawoutstream, outputformat, &ctx, (hsize_t)0, 0); + ctx.need_prefix = TRUE; + h5tools_simple_prefix(rawoutstream, outputformat, &ctx, (hsize_t)0, 0); - /* Render the element */ - h5tools_str_reset(&buffer); - h5tools_str_append(&buffer, "", xmlnsprefix); - h5tools_render_element(rawoutstream, outputformat, &ctx, &buffer, &curr_pos, (size_t)outputformat->line_ncols, (hsize_t)0, (hsize_t)0); + /* Render the element */ + h5tools_str_reset(&buffer); + h5tools_str_append(&buffer, "", xmlnsprefix); + h5tools_render_element(rawoutstream, outputformat, &ctx, &buffer, &curr_pos, (size_t)outputformat->line_ncols, (hsize_t)0, (hsize_t)0); - ctx.indent_level--; - dump_indent -= COL; + ctx.indent_level--; + dump_indent -= COL; - ctx.need_prefix = TRUE; - h5tools_simple_prefix(rawoutstream, outputformat, &ctx, (hsize_t)0, 0); + ctx.need_prefix = TRUE; + h5tools_simple_prefix(rawoutstream, outputformat, &ctx, (hsize_t)0, 0); - /* Render the element */ - h5tools_str_reset(&buffer); - h5tools_str_append(&buffer, "", xmlnsprefix); - h5tools_render_element(rawoutstream, outputformat, &ctx, &buffer, &curr_pos, (size_t)outputformat->line_ncols, (hsize_t)0, (hsize_t)0); - ctx.indent_level--; - dump_indent -= COL; + /* Render the element */ + h5tools_str_reset(&buffer); + h5tools_str_append(&buffer, "", xmlnsprefix); + h5tools_render_element(rawoutstream, outputformat, &ctx, &buffer, &curr_pos, (size_t)outputformat->line_ncols, (hsize_t)0, (hsize_t)0); + ctx.indent_level--; + dump_indent -= COL; - ctx.need_prefix = TRUE; - h5tools_simple_prefix(rawoutstream, outputformat, &ctx, (hsize_t)0, 0); + ctx.need_prefix = TRUE; + h5tools_simple_prefix(rawoutstream, outputformat, &ctx, (hsize_t)0, 0); - /* Render the element */ - h5tools_str_reset(&buffer); - h5tools_str_append(&buffer, "", xmlnsprefix); - h5tools_render_element(rawoutstream, outputformat, &ctx, &buffer, &curr_pos, (size_t)outputformat->line_ncols, (hsize_t)0, (hsize_t)0); - ctx.indent_level--; - dump_indent -= COL; - HDfree(chsize); + /* Render the element */ + h5tools_str_reset(&buffer); + h5tools_str_append(&buffer, "", xmlnsprefix); + h5tools_render_element(rawoutstream, outputformat, &ctx, &buffer, &curr_pos, (size_t)outputformat->line_ncols, (hsize_t)0, (hsize_t)0); + ctx.indent_level--; + dump_indent -= COL; + HDfree(chsize); + } } else if (H5D_CONTIGUOUS == H5Pget_layout(dcpl)) { ctx.indent_level++; @@ -3984,8 +3994,6 @@ xml_dump_dataset(hid_t did, const char *name, struct subset_t H5_ATTR_UNUSED * s h5tools_str_append(&buffer, "FillIfSet"); break; case H5D_FILL_TIME_ERROR: - HDassert(0); - /* fall through */ default: h5tools_str_append(&buffer, "?"); break; @@ -4005,8 +4013,6 @@ xml_dump_dataset(hid_t did, const char *name, struct subset_t H5_ATTR_UNUSED * s break; case H5D_ALLOC_TIME_DEFAULT: case H5D_ALLOC_TIME_ERROR: - HDassert(0); - /* fall through */ default: h5tools_str_append(&buffer, "?"); break; @@ -4233,9 +4239,6 @@ xml_dump_dataset(hid_t did, const char *name, struct subset_t H5_ATTR_UNUSED * s break; case H5T_NO_CLASS: case H5T_NCLASSES: - HDassert(0); - /* fall through */ - default: ctx.need_prefix = TRUE; h5tools_simple_prefix(rawoutstream, outputformat, &ctx, (hsize_t)0, 0); diff --git a/tools/src/h5jam/h5jam.c b/tools/src/h5jam/h5jam.c index 61de604..e668f2a 100644 --- a/tools/src/h5jam/h5jam.c +++ b/tools/src/h5jam/h5jam.c @@ -73,13 +73,13 @@ usage (const char *prog) HDfprintf (stdout, "Adds user block to front of an HDF5 file and creates a new concatenated file.\n"); HDfprintf (stdout, "\n"); - HDfprintf (stdout, + HDfprintf (stdout, "OPTIONS\n"); - HDfprintf (stdout, + HDfprintf (stdout, " -i in_file.h5 Specifies the input HDF5 file.\n"); - HDfprintf (stdout, + HDfprintf (stdout, " -u in_user_file Specifies the file to be inserted into the user block.\n"); - HDfprintf (stdout, + HDfprintf (stdout, " Can be any file format except an HDF5 format.\n"); HDfprintf (stdout, " -o out_file.h5 Specifies the output HDF5 file.\n"); @@ -392,7 +392,7 @@ main (int argc, const char *argv[]) HDfree (input_file); if(output_file) HDfree (output_file); - + if(ufid >= 0) HDclose (ufid); if(h5fid >= 0) @@ -548,7 +548,8 @@ write_pad(int ofile, hsize_t old_where, hsize_t *new_where) char buf[1]; hsize_t psize; - HDassert(new_where); + if(new_where == NULL) + return FAIL; buf[0] = '\0'; diff --git a/tools/src/h5jam/h5unjam.c b/tools/src/h5jam/h5unjam.c index 1cc8cb3..4e9798e 100644 --- a/tools/src/h5jam/h5unjam.c +++ b/tools/src/h5jam/h5unjam.c @@ -133,28 +133,28 @@ static int parse_command_line(int argc, const char *argv[]) { int opt = FALSE; - + /* parse command line options */ while ((opt = get_option(argc, argv, s_opts, l_opts)) != EOF) { switch((char)opt) { case 'o': output_file = HDstrdup(opt_arg); - if (output_file) - h5tools_set_data_output_file(output_file, 1); - break; + if (output_file) + h5tools_set_data_output_file(output_file, 1); + break; case 'i': input_file = HDstrdup(opt_arg); - if (input_file) - h5tools_set_input_file(input_file, 1); - break;; + if (input_file) + h5tools_set_input_file(input_file, 1); + break;; case 'u': ub_file = HDstrdup(opt_arg); - if (ub_file) - h5tools_set_output_file(ub_file, 1); - else - rawoutstream = stdout; + if (ub_file) + h5tools_set_output_file(ub_file, 1); + else + rawoutstream = stdout; break; case 'd': @@ -180,7 +180,7 @@ parse_command_line(int argc, const char *argv[]) } return EXIT_SUCCESS; - + done: if(input_file) HDfree(input_file); @@ -240,7 +240,7 @@ main(int argc, const char *argv[]) h5tools_setstatus(EXIT_FAILURE); goto done; } - + testval = H5Fis_hdf5(input_file); if (testval <= 0) { @@ -272,10 +272,8 @@ main(int argc, const char *argv[]) goto done; } - status = H5Pclose(plist); - HDassert(status >= 0); - status = H5Fclose(ifile); - HDassert(status >= 0); + H5Pclose(plist); + H5Fclose(ifile); if (usize == 0) { /* no user block to remove: message? */ @@ -303,7 +301,7 @@ main(int argc, const char *argv[]) error_msg("unable to open output HDF5 file \"%s\"\n", input_file); h5tools_setstatus(EXIT_FAILURE); goto done; - } + } /* copy from 0 to 'usize - 1' into ufid */ if (!do_delete) { @@ -321,18 +319,18 @@ main(int argc, const char *argv[]) h5tools_setstatus(EXIT_FAILURE); goto done; } - + done: if(input_file) HDfree(input_file); - + if(output_file) HDfree(output_file); - + if(ub_file) { HDfree(ub_file); } - + h5tools_close(); return h5tools_getstatus(); @@ -374,7 +372,7 @@ copy_to_file( FILE *infid, FILE *ofid, ssize_t _where, ssize_t show_much ) else bytes_in = how_much; - /* Seek to correct position in input file */ + /* Seek to correct position in input file */ HDfseek(infid, from, SEEK_SET); /* Read data to buffer */ @@ -396,11 +394,11 @@ copy_to_file( FILE *infid, FILE *ofid, ssize_t _where, ssize_t show_much ) to += (off_t)bytes_read; /* Write nchars bytes to output file */ - bytes_wrote = HDfwrite(buf, (size_t)1, bytes_read, ofid); - if(bytes_wrote != bytes_read || (0 == bytes_wrote && HDferror(ofid))) { /* error */ - ret_value = -1; - goto done; - } /* end if */ + bytes_wrote = HDfwrite(buf, (size_t)1, bytes_read, ofid); + if(bytes_wrote != bytes_read || (0 == bytes_wrote && HDferror(ofid))) { /* error */ + ret_value = -1; + goto done; + } /* end if */ } /* end while */ done: diff --git a/tools/src/h5ls/h5ls.c b/tools/src/h5ls/h5ls.c index a181186..d397067 100644 --- a/tools/src/h5ls/h5ls.c +++ b/tools/src/h5ls/h5ls.c @@ -1619,9 +1619,9 @@ list_attr(hid_t obj, const char *attr_name, const H5A_info_t H5_ATTR_UNUSED *ain if(space_type != H5S_NULL && space_type != H5S_NO_CLASS) { if(hexdump_g) - p_type = H5Tcopy(type); + p_type = H5Tcopy(type); else - p_type = H5Tget_native_type(type, H5T_DIR_DEFAULT); + p_type = H5Tget_native_type(type, H5T_DIR_DEFAULT); if(p_type >= 0) { /* VL data special information */ @@ -1631,23 +1631,22 @@ list_attr(hid_t obj, const char *attr_name, const H5A_info_t H5_ATTR_UNUSED *ain if (h5tools_detect_vlen(p_type) == TRUE) vl_data = TRUE; - temp_need= nelmts * MAX(H5Tget_size(type), H5Tget_size(p_type)); - HDassert(temp_need == (hsize_t)((size_t)temp_need)); + temp_need = nelmts * MAX(H5Tget_size(type), H5Tget_size(p_type)); need = (size_t)temp_need; - buf = HDmalloc(need); - HDassert(buf); - if(H5Aread(attr, p_type, buf) >= 0) { - ctx.need_prefix = TRUE; - ctx.indent_level = 2; - ctx.cur_column = (size_t)curr_pos; - h5tools_dump_mem(rawoutstream, info, &ctx, attr, p_type, space, buf); - } + if((buf = HDmalloc(need)) != NULL) { + if(H5Aread(attr, p_type, buf) >= 0) { + ctx.need_prefix = TRUE; + ctx.indent_level = 2; + ctx.cur_column = (size_t)curr_pos; + h5tools_dump_mem(rawoutstream, info, &ctx, attr, p_type, space, buf); + } - /* Reclaim any VL memory, if necessary */ - if (vl_data) - H5Dvlen_reclaim(p_type, space, H5P_DEFAULT, buf); + /* Reclaim any VL memory, if necessary */ + if (vl_data) + H5Dvlen_reclaim(p_type, space, H5P_DEFAULT, buf); - HDfree(buf); + HDfree(buf); + } H5Tclose(p_type); } /* end if */ } @@ -1875,7 +1874,7 @@ dataset_list2(hid_t dset, const char H5_ATTR_UNUSED *name) case H5D_LAYOUT_ERROR: case H5D_NLAYOUTS: default: - HDassert(0); + h5tools_str_append(&buffer, "layout information not available"); break; } /* Print total raw storage size */ diff --git a/tools/src/h5repack/h5repack.c b/tools/src/h5repack/h5repack.c index 4860d9e..76ca117 100644 --- a/tools/src/h5repack/h5repack.c +++ b/tools/src/h5repack/h5repack.c @@ -262,7 +262,6 @@ hid_t copy_named_datatype(hid_t type_in, hid_t fidout, /* Check if this type is the one requested */ if (oinfo.addr == dt->addr_in) { - HDassert(!dt_ret); dt_ret = dt; } /* end if */ } /* end if */ diff --git a/tools/src/h5repack/h5repack_copy.c b/tools/src/h5repack/h5repack_copy.c index 42fedbc..501f084 100644 --- a/tools/src/h5repack/h5repack_copy.c +++ b/tools/src/h5repack/h5repack_copy.c @@ -782,7 +782,6 @@ int do_copy_objects(hid_t fidin, hid_t fidout, trav_table_t *travt, switch (travt->objs[i].type) { case H5TRAV_TYPE_UNKNOWN: - HDassert(0); break; /*------------------------------------------------------------------------- @@ -1486,12 +1485,11 @@ static int copy_user_block(const char *infile, const char *outfile, hsize_t size int infid = -1, outfid = -1; /* File descriptors */ /* User block must be any power of 2 equal to 512 or greater (512, 1024, 2048, etc.) */ - HDassert(size > 0); /* Open files */ - if ((infid = HDopen(infile, O_RDONLY, 0)) < 0) + if ((infid = HDopen(infile, O_RDONLY)) < 0) HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "HDopen failed"); - if ((outfid = HDopen(outfile, O_WRONLY, 0644)) < 0) + if ((outfid = HDopen(outfile, O_WRONLY)) < 0) HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "HDopen failed"); /* Copy the userblock from the input file to the output file */ @@ -1583,7 +1581,8 @@ void print_user_block(const char *filename, hid_t fid) } /* open file */ - if((fh = HDopen(filename, O_RDONLY, 0)) < 0) { + if((fh = HDopen(filename, O_RDONLY)) < 0) { + error_msg("failed to open file\n"); HGOTO_ERROR(H5E_tools_g, H5E_tools_min_id_g, "HDopen failed"); } diff --git a/tools/src/h5repack/h5repack_filters.c b/tools/src/h5repack/h5repack_filters.c index 804727b..c48158c 100644 --- a/tools/src/h5repack/h5repack_filters.c +++ b/tools/src/h5repack/h5repack_filters.c @@ -32,37 +32,32 @@ * *------------------------------------------------------------------------- */ -static int -aux_find_obj(const char* name, /* object name from traverse list */ - pack_opt_t *options, /* repack options */ - pack_info_t *obj /*OUT*/) /* info about object to filter */ +static int aux_find_obj(const char* name, /* object name from traverse list */ + pack_opt_t *options, /* repack options */ + pack_info_t *obj /*OUT*/) /* info about object to filter */ { - char *pdest; - int result; - unsigned int i; - - for ( i=0; iop_tbl->nelems; i++) - { - if (HDstrcmp(options->op_tbl->objs[i].path,name)==0) - { - *obj = options->op_tbl->objs[i]; - return (int)i; - } - - pdest = HDstrstr(name,options->op_tbl->objs[i].path); - result = (int)(pdest - name); - - /* found at position 1, meaning without '/' */ - if( pdest != NULL && result==1 ) - { - *obj = options->op_tbl->objs[i]; - return (int)i; - } - }/*i*/ - - return -1; -} + char *pdest; + int result; + unsigned int i; + + for (i = 0; i < options->op_tbl->nelems; i++) { + if (HDstrcmp(options->op_tbl->objs[i].path,name) == 0) { + *obj = options->op_tbl->objs[i]; + return (int) i; + } + pdest = HDstrstr(name, options->op_tbl->objs[i].path); + result = (int) (pdest - name); + + /* found at position 1, meaning without '/' */ + if (pdest != NULL && result == 1) { + *obj = options->op_tbl->objs[i]; + return (int) i; + } + }/*i*/ + + return -1; +} /*------------------------------------------------------------------------- * Function: aux_assign_obj @@ -74,35 +69,31 @@ aux_find_obj(const char* name, /* object name from traverse list */ * *------------------------------------------------------------------------- */ -static int -aux_assign_obj(const char* name, /* object name from traverse list */ - pack_opt_t *options, /* repack options */ - pack_info_t *obj /*OUT*/) /* info about object to filter */ +static int aux_assign_obj(const char* name, /* object name from traverse list */ + pack_opt_t *options, /* repack options */ + pack_info_t *obj /*OUT*/) /* info about object to filter */ { - int idx, i; + int idx, i; pack_info_t tmp; init_packobject(&tmp); - idx = aux_find_obj(name,options,&tmp); + idx = aux_find_obj(name, options, &tmp); /* name was on input */ - if (idx>=0) - { - + if (idx >= 0) { /* applying to all objects */ - if (options->all_layout) - { + if (options->all_layout) { /* assign the global layout info to the OBJ info */ - tmp.layout=options->layout_g; - switch (options->layout_g) - { + tmp.layout = options->layout_g; + switch (options->layout_g) { case H5D_CHUNKED: - tmp.chunk.rank=options->chunk_g.rank; - for ( i=0; ichunk_g.chunk_lengths[i]; + tmp.chunk.rank = options->chunk_g.rank; + for (i = 0; i < tmp.chunk.rank; i++) + tmp.chunk.chunk_lengths[i] = + options->chunk_g.chunk_lengths[i]; break; case H5D_LAYOUT_ERROR: case H5D_COMPACT: @@ -114,15 +105,14 @@ aux_assign_obj(const char* name, /* object name from traverse list */ break; }/*switch*/ } - else - { + else { tmp.layout = options->op_tbl->objs[idx].layout; - switch (tmp.layout) - { + switch (tmp.layout) { case H5D_CHUNKED: tmp.chunk.rank = options->op_tbl->objs[idx].chunk.rank; - for ( i=0; iop_tbl->objs[idx].chunk.chunk_lengths[i]; + for (i = 0; i < tmp.chunk.rank; i++) + tmp.chunk.chunk_lengths[i] = + options->op_tbl->objs[idx].chunk.chunk_lengths[i]; break; case H5D_LAYOUT_ERROR: case H5D_COMPACT: @@ -137,49 +127,37 @@ aux_assign_obj(const char* name, /* object name from traverse list */ } /* applying to all objects */ - if (options->all_filter) - { + if (options->all_filter) { /* assign the global filter */ - tmp.nfilters=1; - tmp.filter[0]=options->filter_g[0]; + tmp.nfilters = 1; + tmp.filter[0] = options->filter_g[0]; } /* if all */ - else - { - tmp.nfilters=options->op_tbl->objs[idx].nfilters; - for ( i=0; iop_tbl->objs[idx].nfilters; + for (i = 0; i < tmp.nfilters; i++) { tmp.filter[i] = options->op_tbl->objs[idx].filter[i]; } } - - } /* if idx */ - - /* no input name */ - - else - { - - if (options->all_filter) - { + else { + if (options->all_filter) { int k; /* assign the global filters */ - tmp.nfilters=options->n_filter_g; - for ( k = 0; k < options->n_filter_g; k++) - tmp.filter[k]=options->filter_g[k]; + tmp.nfilters = options->n_filter_g; + for (k = 0; k < options->n_filter_g; k++) + tmp.filter[k] = options->filter_g[k]; } - if (options->all_layout) - { + if (options->all_layout) { /* assign the global layout info to the OBJ info */ - tmp.layout=options->layout_g; - switch (options->layout_g) - { + tmp.layout = options->layout_g; + switch (options->layout_g) { case H5D_CHUNKED: - tmp.chunk.rank=options->chunk_g.rank; - for ( i=0; ichunk_g.chunk_lengths[i]; + tmp.chunk.rank = options->chunk_g.rank; + for (i = 0; i < tmp.chunk.rank; i++) + tmp.chunk.chunk_lengths[i] = + options->chunk_g.chunk_lengths[i]; break; case H5D_LAYOUT_ERROR: case H5D_COMPACT: @@ -195,10 +173,8 @@ aux_assign_obj(const char* name, /* object name from traverse list */ *obj = tmp; return 1; - } - /*------------------------------------------------------------------------- * Function: apply_filters * @@ -215,74 +191,69 @@ aux_assign_obj(const char* name, /* object name from traverse list */ *------------------------------------------------------------------------- */ -int apply_filters(const char* name, /* object name from traverse list */ - int rank, /* rank of dataset */ - hsize_t *dims, /* dimensions of dataset */ - size_t msize, /* size of type */ - hid_t dcpl_id, /* dataset creation property list */ - pack_opt_t *options, /* repack options */ - int *has_filter) /* (OUT) object NAME has a filter */ - - +int apply_filters(const char* name, /* object name from traverse list */ + int rank, /* rank of dataset */ + hsize_t *dims, /* dimensions of dataset */ + size_t msize, /* size of type */ + hid_t dcpl_id, /* dataset creation property list */ + pack_opt_t *options, /* repack options */ + int *has_filter) /* (OUT) object NAME has a filter */ { - int nfilters; /* number of filters in DCPL */ - hsize_t chsize[64]; /* chunk size in elements */ + int nfilters; /* number of filters in DCPL */ + hsize_t chsize[64]; /* chunk size in elements */ H5D_layout_t layout; - int i; - pack_info_t obj; + int i; + pack_info_t obj; *has_filter = 0; - if (rank==0) /* scalar dataset, do not apply */ + if (rank == 0) /* scalar dataset, do not apply */ return 0; - /*------------------------------------------------------------------------- + /*------------------------------------------------------------------------- * initialize the assigment object *------------------------------------------------------------------------- */ init_packobject(&obj); - /*------------------------------------------------------------------------- + /*------------------------------------------------------------------------- * find options *------------------------------------------------------------------------- */ - if (aux_assign_obj(name,options,&obj)==0) + if (aux_assign_obj(name, options, &obj) == 0) return 0; /* get information about input filters */ - if ((nfilters = H5Pget_nfilters(dcpl_id))<0) + if ((nfilters = H5Pget_nfilters(dcpl_id)) < 0) return -1; - /*------------------------------------------------------------------------- + /*------------------------------------------------------------------------- * check if we have filters in the pipeline * we want to replace them with the input filters * only remove if we are inserting new ones *------------------------------------------------------------------------- */ - if (nfilters && obj.nfilters ) - { + if (nfilters && obj.nfilters) { *has_filter = 1; - if (H5Premove_filter(dcpl_id,H5Z_FILTER_ALL)<0) + if (H5Premove_filter(dcpl_id, H5Z_FILTER_ALL) < 0) return -1; } - /*------------------------------------------------------------------------- + /*------------------------------------------------------------------------- * check if there is an existent chunk * read it only if there is not a requested layout *------------------------------------------------------------------------- */ - if (obj.layout == -1 ) - { - if ((layout = H5Pget_layout(dcpl_id))<0) + if (obj.layout == -1) { + if ((layout = H5Pget_layout(dcpl_id)) < 0) return -1; - if (layout == H5D_CHUNKED) - { - if ((rank = H5Pget_chunk(dcpl_id,NELMTS(chsize),chsize/*out*/))<0) + if (layout == H5D_CHUNKED) { + if ((rank = H5Pget_chunk(dcpl_id, NELMTS(chsize), chsize/*out*/)) < 0) return -1; obj.layout = H5D_CHUNKED; obj.chunk.rank = rank; - for ( i = 0; i < rank; i++) + for (i = 0; i < rank; i++) obj.chunk.chunk_lengths[i] = chsize[i]; } } @@ -300,19 +271,15 @@ int apply_filters(const char* name, /* object name from traverse list */ *------------------------------------------------------------------------- */ - if (obj.nfilters) - { - - /*------------------------------------------------------------------------- - * filters require CHUNK layout; if we do not have one define a default - *------------------------------------------------------------------------- - */ - if (obj.layout==-1) - { - + if (obj.nfilters) { + /*------------------------------------------------------------------------- + * filters require CHUNK layout; if we do not have one define a default + *------------------------------------------------------------------------- + */ + if (obj.layout == -1) { /* stripmine info */ hsize_t sm_size[H5S_MAX_RANK]; /*stripmine size */ - hsize_t sm_nbytes; /*bytes per stripmine */ + hsize_t sm_nbytes; /*bytes per stripmine */ obj.chunk.rank = rank; @@ -321,138 +288,129 @@ int apply_filters(const char* name, /* object name from traverse list */ * a hyperslab whose size is manageable. */ - - sm_nbytes = msize; - for ( i = rank; i > 0; --i) - { + for (i = rank; i > 0; --i) { hsize_t size = H5TOOLS_BUFSIZE / sm_nbytes; - if ( size == 0) /* datum size > H5TOOLS_BUFSIZE */ + if (size == 0) /* datum size > H5TOOLS_BUFSIZE */ size = 1; sm_size[i - 1] = MIN(dims[i - 1], size); sm_nbytes *= sm_size[i - 1]; HDassert(sm_nbytes > 0); - } - for ( i = 0; i < rank; i++) - { + for (i = 0; i < rank; i++) { obj.chunk.chunk_lengths[i] = sm_size[i]; } - } - for ( i=0; i=0) - { + if (obj.layout >= 0) { /* a layout was defined */ - if (H5Pset_layout(dcpl_id, obj.layout)<0) + if (H5Pset_layout(dcpl_id, obj.layout) < 0) return -1; - if (H5D_CHUNKED == obj.layout) - { - if(H5Pset_chunk(dcpl_id, obj.chunk.rank, obj.chunk.chunk_lengths)<0) + if (H5D_CHUNKED == obj.layout) { + if (H5Pset_chunk(dcpl_id, obj.chunk.rank, obj.chunk.chunk_lengths) < 0) return -1; } - else if (H5D_COMPACT == obj.layout) - { - if (H5Pset_alloc_time(dcpl_id, H5D_ALLOC_TIME_EARLY)<0) + else if (H5D_COMPACT == obj.layout) { + if (H5Pset_alloc_time(dcpl_id, H5D_ALLOC_TIME_EARLY) < 0) return -1; } /* remove filters for the H5D_CONTIGUOUS case */ - else if (H5D_CONTIGUOUS == obj.layout) - { - if (H5Premove_filter(dcpl_id,H5Z_FILTER_ALL)<0) + else if (H5D_CONTIGUOUS == obj.layout) { + if (H5Premove_filter(dcpl_id, H5Z_FILTER_ALL) < 0) return -1; } } - return 0; + return 0; } diff --git a/tools/src/h5repack/h5repack_refs.c b/tools/src/h5repack/h5repack_refs.c index 408142c..36038b5 100644 --- a/tools/src/h5repack/h5repack_refs.c +++ b/tools/src/h5repack/h5repack_refs.c @@ -189,8 +189,7 @@ int do_copy_refobjs(hid_t fidin, /* create the reference, -1 parameter for objects */ if(H5Rcreate(&refbuf[u], fidout, refname, H5R_OBJECT, (hid_t)-1) < 0) HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Rcreate failed"); - if(options->verbose) - { + if(options->verbose) { printf(FORMAT_OBJ,"dset",travt->objs[i].name ); printf("object <%s> object reference created to <%s>\n", travt->objs[i].name, @@ -278,8 +277,7 @@ int do_copy_refobjs(hid_t fidin, HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Rcreate failed"); if(H5Sclose(region_id) < 0) HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Sclose failed"); - if(options->verbose) - { + if(options->verbose) { printf(FORMAT_OBJ,"dset",travt->objs[i].name ); printf("object <%s> region reference created to <%s>\n", travt->objs[i].name, @@ -320,8 +318,6 @@ int do_copy_refobjs(hid_t fidin, HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Dopen2 failed"); } /* end else */ - HDassert(dset_out != FAIL); - /*------------------------------------------------------------------------- * copy referenced objects in attributes *------------------------------------------------------------------------- -- cgit v0.12 From f6c94f3ba60d071ce1ba8b731a66e47fbc39c095 Mon Sep 17 00:00:00 2001 From: Vailin Choi Date: Tue, 22 Aug 2017 01:36:20 -0500 Subject: Fix for HDFFV-10216 segfault in H5G_node_cmp3 with corrupt h5 file Fix H5HL_offset_into() to return error when offset exceeds heap data block size. Also fix other places that call this routine to detect error return. --- MANIFEST | 2 + src/H5Gent.c | 20 +- src/H5Glink.c | 12 +- src/H5Gnode.c | 748 +++++++++++++++++++++++++------------------------- src/H5Gstab.c | 16 +- src/H5HL.c | 10 +- src/H5Oefl.c | 47 ++-- test/CMakeTests.cmake | 2 + test/Makefile.am | 2 +- test/bad_offset.h5 | Bin 0 -> 3312 bytes test/gen_bad_offset.c | 112 ++++++++ test/tmisc.c | 55 ++++ 12 files changed, 610 insertions(+), 416 deletions(-) create mode 100644 test/bad_offset.h5 create mode 100644 test/gen_bad_offset.c diff --git a/MANIFEST b/MANIFEST index ccb1528..31dce81 100644 --- a/MANIFEST +++ b/MANIFEST @@ -906,6 +906,7 @@ ./test/atomic_reader.c ./test/atomic_writer.c ./test/bad_compound.h5 +./test/bad_offset.h5 ./test/be_data.h5 ./test/be_extlink1.h5 ./test/be_extlink2.h5 @@ -968,6 +969,7 @@ ./test/fsm_aggr_persist.h5 ./test/genall5.c ./test/genall5.h +./test/gen_bad_offset.c ./test/gen_bad_ohdr.c ./test/gen_bad_compound.c ./test/gen_bogus.c diff --git a/src/H5Gent.c b/src/H5Gent.c index b781fae..7987850 100644 --- a/src/H5Gent.c +++ b/src/H5Gent.c @@ -541,8 +541,8 @@ herr_t H5G__ent_debug(const H5G_entry_t *ent, FILE *stream, int indent, int fwidth, const H5HL_t *heap) { - const char *lval = NULL; - int nested_indent, nested_fwidth; + const char *lval = NULL; + int nested_indent, nested_fwidth; FUNC_ENTER_PACKAGE_NOERR @@ -551,14 +551,14 @@ H5G__ent_debug(const H5G_entry_t *ent, FILE *stream, int indent, int fwidth, nested_fwidth = MAX(0, fwidth - 3); HDfprintf(stream, "%*s%-*s %lu\n", indent, "", fwidth, - "Name offset into private heap:", - (unsigned long) (ent->name_off)); + "Name offset into private heap:", + (unsigned long) (ent->name_off)); HDfprintf(stream, "%*s%-*s %a\n", indent, "", fwidth, - "Object header address:", ent->header); + "Object header address:", ent->header); HDfprintf(stream, "%*s%-*s ", indent, "", fwidth, - "Cache info type:"); + "Cache info type:"); switch(ent->type) { case H5G_NOTHING_CACHED: HDfprintf(stream, "Nothing Cached\n"); @@ -581,13 +581,13 @@ H5G__ent_debug(const H5G_entry_t *ent, FILE *stream, int indent, int fwidth, HDfprintf(stream, "%*s%-*s\n", indent, "", fwidth, "Cached information:"); HDfprintf(stream, "%*s%-*s %lu\n", nested_indent, "", nested_fwidth, - "Link value offset:", - (unsigned long)(ent->cache.slink.lval_offset)); + "Link value offset:", + (unsigned long)(ent->cache.slink.lval_offset)); if(heap) { lval = (const char *)H5HL_offset_into(heap, ent->cache.slink.lval_offset); HDfprintf(stream, "%*s%-*s %s\n", nested_indent, "", nested_fwidth, - "Link value:", - lval); + "Link value:", + (lval == NULL) ? "" : lval); } /* end if */ else HDfprintf(stream, "%*s%-*s\n", nested_indent, "", nested_fwidth, "Warning: Invalid heap address given, name not displayed!"); diff --git a/src/H5Glink.c b/src/H5Glink.c index d246ee7..77b69cb 100644 --- a/src/H5Glink.c +++ b/src/H5Glink.c @@ -224,7 +224,9 @@ herr_t H5G__ent_to_link(H5O_link_t *lnk, const H5HL_t *heap, const H5G_entry_t *ent, const char *name) { - FUNC_ENTER_PACKAGE_NOERR + herr_t ret_value = SUCCEED; /* Return value */ + + FUNC_ENTER_PACKAGE /* check arguments */ HDassert(lnk); @@ -243,7 +245,8 @@ H5G__ent_to_link(H5O_link_t *lnk, const H5HL_t *heap, if(ent->type == H5G_CACHED_SLINK) { const char *s; /* Pointer to link value */ - s = (const char *)H5HL_offset_into(heap, ent->cache.slink.lval_offset); + if((s = (const char *)H5HL_offset_into(heap, ent->cache.slink.lval_offset)) == NULL) + HGOTO_ERROR(H5E_LINK, H5E_CANTGET, FAIL, "unable to get link name") HDassert(s); /* Copy the link value */ @@ -260,7 +263,10 @@ H5G__ent_to_link(H5O_link_t *lnk, const H5HL_t *heap, lnk->type = H5L_TYPE_HARD; } /* end else */ - FUNC_LEAVE_NOAPI(SUCCEED) +done: + if(ret_value < 0 && lnk->name) + H5MM_xfree(lnk->name); + FUNC_LEAVE_NOAPI(ret_value) } /* end H5G__ent_to_link() */ diff --git a/src/H5Gnode.c b/src/H5Gnode.c index 20924ee..4ddcf53 100644 --- a/src/H5Gnode.c +++ b/src/H5Gnode.c @@ -13,14 +13,14 @@ /*------------------------------------------------------------------------- * - * Created: H5Gnode.c - * Jun 26 1997 - * Robb Matzke + * Created: H5Gnode.c + * Jun 26 1997 + * Robb Matzke * - * Purpose: Functions for handling symbol table nodes. A - * symbol table node is a small collection of symbol - * table entries. A B-tree usually points to the - * symbol table nodes for any given symbol table. + * Purpose: Functions for handling symbol table nodes. A + * symbol table node is a small collection of symbol + * table entries. A B-tree usually points to the + * symbol table nodes for any given symbol table. * *------------------------------------------------------------------------- */ @@ -35,16 +35,16 @@ /***********/ /* Headers */ /***********/ -#include "H5private.h" /* Generic Functions */ -#include "H5ACprivate.h" /* Metadata cache */ -#include "H5Eprivate.h" /* Error handling */ -#include "H5Fprivate.h" /* File access */ -#include "H5FLprivate.h" /* Free Lists */ -#include "H5Gpkg.h" /* Groups */ -#include "H5HLprivate.h" /* Local Heaps */ -#include "H5MFprivate.h" /* File memory management */ -#include "H5MMprivate.h" /* Memory management */ -#include "H5Ppublic.h" /* Property Lists */ +#include "H5private.h" /* Generic Functionsi */ +#include "H5ACprivate.h" /* Metadata cache */ +#include "H5Eprivate.h" /* Error handling */ +#include "H5Fprivate.h" /* File access */ +#include "H5FLprivate.h" /* Free Lists */ +#include "H5Gpkg.h" /* Groups */ +#include "H5HLprivate.h" /* Local Heaps */ +#include "H5MFprivate.h" /* File memory management */ +#include "H5MMprivate.h" /* Memory management */ +#include "H5Ppublic.h" /* Property Lists */ /****************/ @@ -77,20 +77,16 @@ typedef struct H5G_node_key_t { /* B-tree callbacks */ static H5UC_t *H5G_node_get_shared(const H5F_t *f, const void *_udata); static herr_t H5G_node_create(H5F_t *f, hid_t dxpl_id, H5B_ins_t op, void *_lt_key, - void *_udata, void *_rt_key, - haddr_t *addr_p/*out*/); + void *_udata, void *_rt_key, haddr_t *addr_p/*out*/); static int H5G_node_cmp2(void *_lt_key, void *_udata, void *_rt_key); static int H5G_node_cmp3(void *_lt_key, void *_udata, void *_rt_key); static htri_t H5G_node_found(H5F_t *f, hid_t dxpl_id, haddr_t addr, const void *_lt_key, - void *_udata); + void *_udata); static H5B_ins_t H5G_node_insert(H5F_t *f, hid_t dxpl_id, haddr_t addr, void *_lt_key, - hbool_t *lt_key_changed, void *_md_key, - void *_udata, void *_rt_key, - hbool_t *rt_key_changed, - haddr_t *new_node_p/*out*/); + hbool_t *lt_key_changed, void *_md_key, void *_udata, void *_rt_key, + hbool_t *rt_key_changed, haddr_t *new_node_p/*out*/); static H5B_ins_t H5G_node_remove(H5F_t *f, hid_t dxpl_id, haddr_t addr, void *lt_key, - hbool_t *lt_key_changed, void *udata, - void *rt_key, hbool_t *rt_key_changed); + hbool_t *lt_key_changed, void *udata, void *rt_key, hbool_t *rt_key_changed); static herr_t H5G_node_decode_key(const H5B_shared_t *shared, const uint8_t *raw, void *_key); static herr_t H5G_node_encode_key(const H5B_shared_t *shared, uint8_t *raw, const void *_key); static herr_t H5G_node_debug_key(FILE *stream, int indent, int fwidth, @@ -103,21 +99,21 @@ static herr_t H5G_node_debug_key(FILE *stream, int indent, int fwidth, /* H5G inherits B-tree like properties from H5B */ H5B_class_t H5B_SNODE[1] = {{ - H5B_SNODE_ID, /*id */ - sizeof(H5G_node_key_t), /*sizeof_nkey */ - H5G_node_get_shared, /*get_shared */ - H5G_node_create, /*new */ - H5G_node_cmp2, /*cmp2 */ - H5G_node_cmp3, /*cmp3 */ - H5G_node_found, /*found */ - H5G_node_insert, /*insert */ - TRUE, /*follow min branch? */ - TRUE, /*follow max branch? */ - H5B_RIGHT, /*critical key */ - H5G_node_remove, /*remove */ - H5G_node_decode_key, /*decode */ - H5G_node_encode_key, /*encode */ - H5G_node_debug_key /*debug */ + H5B_SNODE_ID, /*id */ + sizeof(H5G_node_key_t), /*sizeof_nkey */ + H5G_node_get_shared, /*get_shared */ + H5G_node_create, /*new */ + H5G_node_cmp2, /*cmp2 */ + H5G_node_cmp3, /*cmp3 */ + H5G_node_found, /*found */ + H5G_node_insert, /*insert */ + TRUE, /*follow min branch? */ + TRUE, /*follow max branch? */ + H5B_RIGHT, /*critical key */ + H5G_node_remove, /*remove */ + H5G_node_decode_key, /*decode */ + H5G_node_encode_key, /*encode */ + H5G_node_debug_key /*debug */ }}; /* Declare a free list to manage the H5G_node_t struct */ @@ -138,17 +134,16 @@ H5FL_SEQ_DEFINE(H5G_entry_t); /*------------------------------------------------------------------------- - * Function: H5G_node_get_shared + * Function: H5G_node_get_shared * - * Purpose: Returns the shared B-tree info for the specified UDATA. + * Purpose: Returns the shared B-tree info for the specified UDATA. * - * Return: Success: Pointer to the raw B-tree page for this - file's groups + * Return: Success: Pointer to the raw B-tree page for this file's groups * - * Failure: Can't fail + * Failure: Can't fail * - * Programmer: Robb Matzke - * Wednesday, October 8, 1997 + * Programmer: Robb Matzke + * Wednesday, October 8, 1997 * * Modifications: * @@ -167,22 +162,22 @@ H5G_node_get_shared(const H5F_t *f, const void H5_ATTR_UNUSED *_udata) /*------------------------------------------------------------------------- - * Function: H5G_node_decode_key + * Function: H5G_node_decode_key * - * Purpose: Decodes a raw key into a native key. + * Purpose: Decodes a raw key into a native key. * - * Return: Non-negative on success/Negative on failure + * Return: Non-negative on success/Negative on failure * - * Programmer: Robb Matzke - * matzke@llnl.gov - * Jul 8 1997 + * Programmer: Robb Matzke + * matzke@llnl.gov + * Jul 8 1997 * *------------------------------------------------------------------------- */ static herr_t H5G_node_decode_key(const H5B_shared_t *shared, const uint8_t *raw, void *_key) { - H5G_node_key_t *key = (H5G_node_key_t *) _key; + H5G_node_key_t *key = (H5G_node_key_t *) _key; FUNC_ENTER_NOAPI_NOINIT_NOERR @@ -199,13 +194,13 @@ H5G_node_decode_key(const H5B_shared_t *shared, const uint8_t *raw, void *_key) /*------------------------------------------------------------------------- * Function: H5G_node_encode_key * - * Purpose: Encodes a native key into a raw key. + * Purpose: Encodes a native key into a raw key. * - * Return: Non-negative on success/Negative on failure + * Return: Non-negative on success/Negative on failure * - * Programmer: Robb Matzke - * matzke@llnl.gov - * Jul 8 1997 + * Programmer: Robb Matzke + * matzke@llnl.gov + * Jul 8 1997 * *------------------------------------------------------------------------- */ @@ -227,13 +222,13 @@ H5G_node_encode_key(const H5B_shared_t *shared, uint8_t *raw, const void *_key) /*------------------------------------------------------------------------- - * Function: H5G_node_debug_key + * Function: H5G_node_debug_key * - * Purpose: Prints a key. + * Purpose: Prints a key. * - * Return: Non-negative on success/Negative on failure + * Return: Non-negative on success/Negative on failure * - * Programmer: Quincey Koziol + * Programmer: Quincey Koziol * Friday, February 28, 2003 * *------------------------------------------------------------------------- @@ -242,7 +237,7 @@ static herr_t H5G_node_debug_key(FILE *stream, int indent, int fwidth, const void *_key, const void *_udata) { - const H5G_node_key_t *key = (const H5G_node_key_t *) _key; + const H5G_node_key_t *key = (const H5G_node_key_t *) _key; const H5G_bt_common_t *udata = (const H5G_bt_common_t *) _udata; FUNC_ENTER_NOAPI_NOINIT_NOERR @@ -250,15 +245,15 @@ H5G_node_debug_key(FILE *stream, int indent, int fwidth, const void *_key, HDassert(key); HDfprintf(stream, "%*s%-*s %u\n", indent, "", fwidth, "Heap offset:", - (unsigned)key->offset); + (unsigned)key->offset); if(udata->heap) { const char *s; HDfprintf(stream, "%*s%-*s ", indent, "", fwidth, "Name:"); - s = (const char *)H5HL_offset_into(udata->heap, key->offset); - HDfprintf(stream, "%s\n", s); + if((s = (const char *)H5HL_offset_into(udata->heap, key->offset)) != NULL) + HDfprintf(stream, "%s\n", s); } /* end if */ else HDfprintf(stream, "%*s%-*s ", indent, "", fwidth, "Cannot get name; heap address not specified\n"); @@ -270,13 +265,13 @@ H5G_node_debug_key(FILE *stream, int indent, int fwidth, const void *_key, /*------------------------------------------------------------------------- * Function: H5G__node_free * - * Purpose: Destroy a symbol table node in memory. + * Purpose: Destroy a symbol table node in memory. * - * Return: Non-negative on success/Negative on failure + * Return: Non-negative on success/Negative on failure * - * Programmer: Quincey Koziol - * koziol@ncsa.uiuc.edu - * Jan 15 2003 + * Programmer: Quincey Koziol + * koziol@ncsa.uiuc.edu + * Jan 15 2003 * *------------------------------------------------------------------------- */ @@ -305,29 +300,29 @@ H5G__node_free(H5G_node_t *sym) * Function: H5G_node_create * * Purpose: Creates a new empty symbol table node. This function is - * called by the B-tree insert function for an empty tree. It - * is also called internally to split a symbol node with LT_KEY - * and RT_KEY null pointers. + * called by the B-tree insert function for an empty tree. It + * is also called internally to split a symbol node with LT_KEY + * and RT_KEY null pointers. * - * Return: Success: Non-negative. The address of symbol table - * node is returned through the ADDR_P argument. + * Return: Success: Non-negative. The address of symbol table + * node is returned through the ADDR_P argument. * - * Failure: Negative + * Failure: Negative * - * Programmer: Robb Matzke - * matzke@llnl.gov - * Jun 23 1997 + * Programmer: Robb Matzke + * matzke@llnl.gov + * Jun 23 1997 * *------------------------------------------------------------------------- */ static herr_t H5G_node_create(H5F_t *f, hid_t dxpl_id, H5B_ins_t H5_ATTR_UNUSED op, void *_lt_key, - void H5_ATTR_UNUSED *_udata, void *_rt_key, haddr_t *addr_p/*out*/) + void H5_ATTR_UNUSED *_udata, void *_rt_key, haddr_t *addr_p/*out*/) { - H5G_node_key_t *lt_key = (H5G_node_key_t *)_lt_key; - H5G_node_key_t *rt_key = (H5G_node_key_t *)_rt_key; - H5G_node_t *sym = NULL; - herr_t ret_value = SUCCEED; /* Return value */ + H5G_node_key_t *lt_key = (H5G_node_key_t *)_lt_key; + H5G_node_key_t *rt_key = (H5G_node_key_t *)_rt_key; + H5G_node_t *sym = NULL; + herr_t ret_value = SUCCEED; /* Return value */ FUNC_ENTER_NOAPI_NOINIT @@ -338,15 +333,15 @@ H5G_node_create(H5F_t *f, hid_t dxpl_id, H5B_ins_t H5_ATTR_UNUSED op, void *_lt_ HDassert(H5B_INS_FIRST == op); if(NULL == (sym = H5FL_CALLOC(H5G_node_t))) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed") + HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed") sym->node_size = H5G_NODE_SIZE(f); if(HADDR_UNDEF == (*addr_p = H5MF_alloc(f, H5FD_MEM_BTREE, dxpl_id, (hsize_t)sym->node_size))) - HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "unable to allocate file space") + HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "unable to allocate file space") if(NULL == (sym->entry = H5FL_SEQ_CALLOC(H5G_entry_t, (size_t)(2 * H5F_SYM_LEAF_K(f))))) - HGOTO_ERROR(H5E_SYM, H5E_CANTALLOC, FAIL, "memory allocation failed") + HGOTO_ERROR(H5E_SYM, H5E_CANTALLOC, FAIL, "memory allocation failed") if(H5AC_insert_entry(f, dxpl_id, H5AC_SNODE, *addr_p, sym, H5AC__NO_FLAGS_SET) < 0) - HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "unable to cache symbol table leaf node") + HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "unable to cache symbol table leaf node") /* * The left and right symbols in an empty tree are both the * empty string stored at offset zero by the H5G functions. This @@ -375,36 +370,36 @@ done: * Function: H5G_node_cmp2 * * Purpose: Compares two keys from a B-tree node (LT_KEY and RT_KEY). - * The UDATA pointer supplies extra data not contained in the - * keys (in this case, the heap address). + * The UDATA pointer supplies extra data not contained in the + * keys (in this case, the heap address). * - * Return: Success: negative if LT_KEY is less than RT_KEY. + * Return: Success: negative if LT_KEY is less than RT_KEY. * - * positive if LT_KEY is greater than RT_KEY. + * positive if LT_KEY is greater than RT_KEY. * - * zero if LT_KEY and RT_KEY are equal. + * zero if LT_KEY and RT_KEY are equal. * - * Failure: FAIL (same as LT_KEYheap); @@ -416,12 +411,15 @@ H5G_node_cmp2(void *_lt_key, void *_udata, void *_rt_key) HDassert(base); /* Get pointers to string names */ - s1 = base + lt_key->offset; - s2 = base + rt_key->offset; + if((s1 = (const char *)H5HL_offset_into(udata->heap, lt_key->offset)) == NULL) + HGOTO_ERROR(H5E_SYM, H5E_CANTGET, FAIL, "unable to get key name") + if((s2 = (const char *)H5HL_offset_into(udata->heap, rt_key->offset)) == NULL) + HGOTO_ERROR(H5E_SYM, H5E_CANTGET, FAIL, "unable to get key name") /* Set return value */ ret_value = HDstrcmp(s1, s2); +done: FUNC_LEAVE_NOAPI(ret_value) } /* H5G_node_cmp2() */ @@ -430,40 +428,40 @@ H5G_node_cmp2(void *_lt_key, void *_udata, void *_rt_key) * Function: H5G_node_cmp3 * * Purpose: Compares two keys from a B-tree node (LT_KEY and RT_KEY) - * against another key (not necessarily the same type) - * pointed to by UDATA. + * against another key (not necessarily the same type) + * pointed to by UDATA. * - * Return: Success: negative if the UDATA key is less than - * or equal to the LT_KEY + * Return: Success: negative if the UDATA key is less than + * or equal to the LT_KEY * - * positive if the UDATA key is greater - * than the RT_KEY. + * positive if the UDATA key is greater + * than the RT_KEY. * - * zero if the UDATA key falls between - * the LT_KEY (exclusive) and the - * RT_KEY (inclusive). + * zero if the UDATA key falls between + * the LT_KEY (exclusive) and the + * RT_KEY (inclusive). * - * Failure: FAIL (same as UDATA < LT_KEY) + * Failure: FAIL (same as UDATA < LT_KEY) * - * Programmer: Robb Matzke - * matzke@llnl.gov - * Jun 23 1997 + * Programmer: Robb Matzke + * matzke@llnl.gov + * Jun 23 1997 * * Modifications: * *------------------------------------------------------------------------- */ -static int +static herr_t H5G_node_cmp3(void *_lt_key, void *_udata, void *_rt_key) { - H5G_bt_common_t *udata = (H5G_bt_common_t *) _udata; - H5G_node_key_t *lt_key = (H5G_node_key_t *) _lt_key; - H5G_node_key_t *rt_key = (H5G_node_key_t *) _rt_key; - const char *s; - const char *base; /* Base of heap */ - int ret_value = 0; /* Return value */ + H5G_bt_common_t *udata = (H5G_bt_common_t *) _udata; + H5G_node_key_t *lt_key = (H5G_node_key_t *) _lt_key; + H5G_node_key_t *rt_key = (H5G_node_key_t *) _rt_key; + const char *s; + const char *base; /* Base of heap */ + herr_t ret_value = SUCCEED; /* Return value */ - FUNC_ENTER_NOAPI_NOINIT_NOERR + FUNC_ENTER_NOAPI_NOINIT /* Sanity checks */ HDassert(udata && udata->heap); @@ -475,43 +473,46 @@ H5G_node_cmp3(void *_lt_key, void *_udata, void *_rt_key) HDassert(base); /* left side */ - s = base + lt_key->offset; + if((s = (const char *)H5HL_offset_into(udata->heap, lt_key->offset)) == NULL) + HGOTO_ERROR(H5E_SYM, H5E_CANTGET, FAIL, "unable to get key name") if(HDstrcmp(udata->name, s) <= 0) - ret_value = (-1); + ret_value = (-1); else { /* right side */ - s = base + rt_key->offset; + if((s = (const char *)H5HL_offset_into(udata->heap, rt_key->offset)) == NULL) + HGOTO_ERROR(H5E_SYM, H5E_CANTGET, FAIL, "unable to get key name") if(HDstrcmp(udata->name, s) > 0) ret_value = 1; } /* end else */ +done: FUNC_LEAVE_NOAPI(ret_value) } /* end H5G_node_cmp3() */ /*------------------------------------------------------------------------- - * Function: H5G_node_found + * Function: H5G_node_found * - * Purpose: The B-tree search engine has found the symbol table node - * which contains the requested symbol if the symbol exists. - * This function should examine that node for the symbol and - * return information about the symbol through the UDATA - * structure which contains the symbol name on function - * entry. + * Purpose: The B-tree search engine has found the symbol table node + * which contains the requested symbol if the symbol exists. + * This function should examine that node for the symbol and + * return information about the symbol through the UDATA + * structure which contains the symbol name on function + * entry. * - * If the operation flag in UDATA is H5G_OPER_FIND, then - * the entry is copied from the symbol table to the UDATA - * entry field. Otherwise the entry is copied from the - * UDATA entry field to the symbol table. + * If the operation flag in UDATA is H5G_OPER_FIND, then + * the entry is copied from the symbol table to the UDATA + * entry field. Otherwise the entry is copied from the + * UDATA entry field to the symbol table. * - * Return: Success: Non-negative (TRUE/FALSE) if found and data - * returned through the UDATA pointer. + * Return: Success: Non-negative (TRUE/FALSE) if found and data + * returned through the UDATA pointer. * - * Failure: Negative if not found. + * Failure: Negative if not found. * - * Programmer: Robb Matzke - * matzke@llnl.gov - * Jun 23 1997 + * Programmer: Robb Matzke + * matzke@llnl.gov + * Jun 23 1997 * *------------------------------------------------------------------------- */ @@ -519,13 +520,13 @@ static htri_t H5G_node_found(H5F_t *f, hid_t dxpl_id, haddr_t addr, const void H5_ATTR_UNUSED *_lt_key, void *_udata) { - H5G_bt_lkp_t *udata = (H5G_bt_lkp_t *)_udata; - H5G_node_t *sn = NULL; - unsigned lt = 0, idx = 0, rt; - int cmp = 1; - const char *s; - const char *base; /* Base of heap */ - htri_t ret_value = TRUE; /* Return value */ + H5G_bt_lkp_t *udata = (H5G_bt_lkp_t *)_udata; + H5G_node_t *sn = NULL; + unsigned lt = 0, idx = 0, rt; + int cmp = 1; + const char *s; + const char *base; /* Base of heap */ + htri_t ret_value = TRUE; /* Return value */ FUNC_ENTER_NOAPI_NOINIT @@ -540,7 +541,7 @@ H5G_node_found(H5F_t *f, hid_t dxpl_id, haddr_t addr, const void H5_ATTR_UNUSED * Load the symbol table node for exclusive access. */ if(NULL == (sn = (H5G_node_t *)H5AC_protect(f, dxpl_id, H5AC_SNODE, addr, f, H5AC__READ_ONLY_FLAG))) - HGOTO_ERROR(H5E_SYM, H5E_CANTLOAD, FAIL, "unable to protect symbol table node") + HGOTO_ERROR(H5E_SYM, H5E_CANTLOAD, FAIL, "unable to protect symbol table node") /* Get base address of heap */ base = (const char *)H5HL_offset_into(udata->common.heap, (size_t)0); @@ -551,14 +552,16 @@ H5G_node_found(H5F_t *f, hid_t dxpl_id, haddr_t addr, const void H5_ATTR_UNUSED */ rt = sn->nsyms; while(lt < rt && cmp) { - idx = (lt + rt) / 2; - s = base + sn->entry[idx].name_off; - cmp = HDstrcmp(udata->common.name, s); - - if (cmp < 0) - rt = idx; - else - lt = idx + 1; + idx = (lt + rt) / 2; + + if((s = (const char *)H5HL_offset_into(udata->common.heap, sn->entry[idx].name_off)) == NULL) + HGOTO_ERROR(H5E_SYM, H5E_CANTGET, FAIL, "unable to get symbol table name") + cmp = HDstrcmp(udata->common.name, s); + + if (cmp < 0) + rt = idx; + else + lt = idx + 1; } /* end while */ if(cmp) @@ -570,43 +573,41 @@ H5G_node_found(H5F_t *f, hid_t dxpl_id, haddr_t addr, const void H5_ATTR_UNUSED done: if(sn && H5AC_unprotect(f, dxpl_id, H5AC_SNODE, addr, sn, H5AC__NO_FLAGS_SET) < 0) - HDONE_ERROR(H5E_SYM, H5E_PROTECT, FAIL, "unable to release symbol table node") + HDONE_ERROR(H5E_SYM, H5E_PROTECT, FAIL, "unable to release symbol table node") FUNC_LEAVE_NOAPI(ret_value) } /* end H5G_node_found() */ /*------------------------------------------------------------------------- - * Function: H5G_node_insert + * Function: H5G_node_insert * - * Purpose: The B-tree insertion engine has found the symbol table node - * which should receive the new symbol/address pair. This - * function adds it to that node unless it already existed. + * Purpose: The B-tree insertion engine has found the symbol table node + * which should receive the new symbol/address pair. This + * function adds it to that node unless it already existed. * - * If the node has no room for the symbol then the node is - * split into two nodes. The original node contains the - * low values and the new node contains the high values. - * The new symbol table entry is added to either node as - * appropriate. When a split occurs, this function will - * write the maximum key of the low node to the MID buffer - * and return the address of the new node. + * If the node has no room for the symbol then the node is + * split into two nodes. The original node contains the + * low values and the new node contains the high values. + * The new symbol table entry is added to either node as + * appropriate. When a split occurs, this function will + * write the maximum key of the low node to the MID buffer + * and return the address of the new node. * - * If the new key is larger than RIGHT then update RIGHT - * with the new key. + * If the new key is larger than RIGHT then update RIGHT + * with the new key. * - * Return: Success: An insertion command for the caller, one of - * the H5B_INS_* constants. The address of the - * new node, if any, is returned through the - * NEW_NODE_P argument. NEW_NODE_P might not be - * initialized if the return value is - * H5B_INS_NOOP. + * Return: Success: An insertion command for the caller, one of + * the H5B_INS_* constants. The address of the + * new node, if any, is returned through the + * NEW_NODE_P argument. NEW_NODE_P might not be + * initialized if the return value is H5B_INS_NOOP. * - * Failure: H5B_INS_ERROR, NEW_NODE_P might not be - * initialized. + * Failure: H5B_INS_ERROR, NEW_NODE_P might not be initialized. * - * Programmer: Robb Matzke - * matzke@llnl.gov - * Jun 24 1997 + * Programmer: Robb Matzke + * matzke@llnl.gov + * Jun 24 1997 * *------------------------------------------------------------------------- */ @@ -617,18 +618,18 @@ H5G_node_insert(H5F_t *f, hid_t dxpl_id, haddr_t addr, void *_rt_key, hbool_t *rt_key_changed, haddr_t *new_node_p) { - H5G_node_key_t *md_key = (H5G_node_key_t *) _md_key; - H5G_node_key_t *rt_key = (H5G_node_key_t *) _rt_key; - H5G_bt_ins_t *udata = (H5G_bt_ins_t *) _udata; - H5G_node_t *sn = NULL, *snrt = NULL; - unsigned sn_flags = H5AC__NO_FLAGS_SET, snrt_flags = H5AC__NO_FLAGS_SET; - const char *s; - const char *base; /* Base of heap */ - unsigned lt = 0, rt; /* Binary search cntrs */ - int cmp = 1, idx = -1; - H5G_node_t *insert_into = NULL; /*node that gets new entry*/ - H5G_entry_t ent; /* Entry to insert in node */ - H5B_ins_t ret_value = H5B_INS_ERROR; + H5G_node_key_t *md_key = (H5G_node_key_t *) _md_key; + H5G_node_key_t *rt_key = (H5G_node_key_t *) _rt_key; + H5G_bt_ins_t *udata = (H5G_bt_ins_t *) _udata; + H5G_node_t *sn = NULL, *snrt = NULL; + unsigned sn_flags = H5AC__NO_FLAGS_SET, snrt_flags = H5AC__NO_FLAGS_SET; + const char *s; + const char *base; /* Base of heap */ + unsigned lt = 0, rt; /* Binary search cntrs */ + int cmp = 1, idx = -1; + H5G_node_t *insert_into = NULL; /*node that gets new entry*/ + H5G_entry_t ent; /* Entry to insert in node */ + H5B_ins_t ret_value = H5B_INS_ERROR; FUNC_ENTER_NOAPI_NOINIT @@ -646,7 +647,7 @@ H5G_node_insert(H5F_t *f, hid_t dxpl_id, haddr_t addr, * Load the symbol node. */ if(NULL == (sn = (H5G_node_t *)H5AC_protect(f, dxpl_id, H5AC_SNODE, addr, f, H5AC__NO_FLAGS_SET))) - HGOTO_ERROR(H5E_SYM, H5E_CANTLOAD, H5B_INS_ERROR, "unable to protect symbol table node") + HGOTO_ERROR(H5E_SYM, H5E_CANTLOAD, H5B_INS_ERROR, "unable to protect symbol table node") /* Get base address of heap */ base = (const char *)H5HL_offset_into(udata->common.heap, (size_t)0); @@ -657,85 +658,86 @@ H5G_node_insert(H5F_t *f, hid_t dxpl_id, haddr_t addr, */ rt = sn->nsyms; while(lt < rt) { - idx = (int)((lt + rt) / 2); - s = base + sn->entry[idx].name_off; + idx = (int)((lt + rt) / 2); + if((s = (const char *)H5HL_offset_into(udata->common.heap, sn->entry[idx].name_off)) == NULL) + HGOTO_ERROR(H5E_SYM, H5E_CANTGET, FAIL, "unable to get symbol table name") /* Check if symbol is already present */ - if(0 == (cmp = HDstrcmp(udata->common.name, s))) + if(0 == (cmp = HDstrcmp(udata->common.name, s))) HGOTO_ERROR(H5E_SYM, H5E_CANTINSERT, H5B_INS_ERROR, "symbol is already present in symbol table") - if (cmp < 0) - rt = (unsigned)idx; - else - lt = (unsigned)(idx + 1); + if (cmp < 0) + rt = (unsigned)idx; + else + lt = (unsigned)(idx + 1); } /* end while */ idx += cmp > 0 ? 1 : 0; /* Convert link information & name to symbol table entry */ if(H5G__ent_convert(f, dxpl_id, udata->common.heap, udata->common.name, udata->lnk, udata->obj_type, udata->crt_info, &ent) < 0) - HGOTO_ERROR(H5E_SYM, H5E_CANTCONVERT, H5B_INS_ERROR, "unable to convert link") + HGOTO_ERROR(H5E_SYM, H5E_CANTCONVERT, H5B_INS_ERROR, "unable to convert link") /* Determine where to place entry in node */ if(sn->nsyms >= 2 * H5F_SYM_LEAF_K(f)) { - /* - * The node is full. Split it into a left and right - * node and return the address of the new right node (the - * left node is at the same address as the original node). - */ - ret_value = H5B_INS_RIGHT; - - /* The right node */ - if(H5G_node_create(f, dxpl_id, H5B_INS_FIRST, NULL, NULL, NULL, new_node_p/*out*/) < 0) - HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, H5B_INS_ERROR, "unable to split symbol table node") - - if(NULL == (snrt = (H5G_node_t *)H5AC_protect(f, dxpl_id, H5AC_SNODE, *new_node_p, f, H5AC__NO_FLAGS_SET))) - HGOTO_ERROR(H5E_SYM, H5E_CANTLOAD, H5B_INS_ERROR, "unable to split symbol table node") - - HDmemcpy(snrt->entry, sn->entry + H5F_SYM_LEAF_K(f), - H5F_SYM_LEAF_K(f) * sizeof(H5G_entry_t)); - snrt->nsyms = H5F_SYM_LEAF_K(f); + /* + * The node is full. Split it into a left and right + * node and return the address of the new right node (the + * left node is at the same address as the original node). + */ + ret_value = H5B_INS_RIGHT; + + /* The right node */ + if(H5G_node_create(f, dxpl_id, H5B_INS_FIRST, NULL, NULL, NULL, new_node_p/*out*/) < 0) + HGOTO_ERROR (H5E_SYM, H5E_CANTINIT, H5B_INS_ERROR, "unable to split symbol table node") + + if(NULL == (snrt = (H5G_node_t *)H5AC_protect(f, dxpl_id, H5AC_SNODE, *new_node_p, f, H5AC__NO_FLAGS_SET))) + HGOTO_ERROR(H5E_SYM, H5E_CANTLOAD, H5B_INS_ERROR, "unable to split symbol table node") + + HDmemcpy(snrt->entry, sn->entry + H5F_SYM_LEAF_K(f), + H5F_SYM_LEAF_K(f) * sizeof(H5G_entry_t)); + snrt->nsyms = H5F_SYM_LEAF_K(f); snrt_flags |= H5AC__DIRTIED_FLAG; - /* The left node */ - HDmemset(sn->entry + H5F_SYM_LEAF_K(f), 0, - H5F_SYM_LEAF_K(f) * sizeof(H5G_entry_t)); - sn->nsyms = H5F_SYM_LEAF_K(f); + /* The left node */ + HDmemset(sn->entry + H5F_SYM_LEAF_K(f), 0, + H5F_SYM_LEAF_K(f) * sizeof(H5G_entry_t)); + sn->nsyms = H5F_SYM_LEAF_K(f); sn_flags |= H5AC__DIRTIED_FLAG; - /* The middle key */ - md_key->offset = sn->entry[sn->nsyms - 1].name_off; + /* The middle key */ + md_key->offset = sn->entry[sn->nsyms - 1].name_off; - /* Where to insert the new entry? */ - if(idx <= (int)H5F_SYM_LEAF_K(f)) { - insert_into = sn; - if(idx == (int)H5F_SYM_LEAF_K(f)) - md_key->offset = ent.name_off; - } /* end if */ + /* Where to insert the new entry? */ + if(idx <= (int)H5F_SYM_LEAF_K(f)) { + insert_into = sn; + if(idx == (int)H5F_SYM_LEAF_K(f)) + md_key->offset = ent.name_off; + } /* end if */ else { - idx -= (int)H5F_SYM_LEAF_K(f); - insert_into = snrt; - if(idx == (int)H5F_SYM_LEAF_K(f)) { - rt_key->offset = ent.name_off; - *rt_key_changed = TRUE; - } /* end if */ - } /* end else */ + idx -= (int)H5F_SYM_LEAF_K(f); + insert_into = snrt; + if(idx == (int)H5F_SYM_LEAF_K(f)) { + rt_key->offset = ent.name_off; + *rt_key_changed = TRUE; + } /* end if */ + } /* end else */ } /* end if */ else { - /* Where to insert the new entry? */ - ret_value = H5B_INS_NOOP; + /* Where to insert the new entry? */ + ret_value = H5B_INS_NOOP; sn_flags |= H5AC__DIRTIED_FLAG; - insert_into = sn; - if(idx == (int)sn->nsyms) { - rt_key->offset = ent.name_off; - *rt_key_changed = TRUE; - } /* end if */ + insert_into = sn; + if(idx == (int)sn->nsyms) { + rt_key->offset = ent.name_off; + *rt_key_changed = TRUE; + } /* end if */ } /* end else */ /* Move entries down to make room for new entry */ HDassert(idx >= 0); HDmemmove(insert_into->entry + idx + 1, insert_into->entry + idx, - (insert_into->nsyms - (unsigned)idx) * sizeof(H5G_entry_t)); + (insert_into->nsyms - (unsigned)idx) * sizeof(H5G_entry_t)); /* Copy new entry into table */ H5G__ent_copy(&(insert_into->entry[idx]), &ent, H5_COPY_SHALLOW); @@ -745,56 +747,56 @@ H5G_node_insert(H5F_t *f, hid_t dxpl_id, haddr_t addr, done: if(snrt && H5AC_unprotect(f, dxpl_id, H5AC_SNODE, *new_node_p, snrt, snrt_flags) < 0) - HDONE_ERROR(H5E_SYM, H5E_PROTECT, H5B_INS_ERROR, "unable to release symbol table node") + HDONE_ERROR(H5E_SYM, H5E_PROTECT, H5B_INS_ERROR, "unable to release symbol table node") if(sn && H5AC_unprotect(f, dxpl_id, H5AC_SNODE, addr, sn, sn_flags) < 0) - HDONE_ERROR(H5E_SYM, H5E_PROTECT, H5B_INS_ERROR, "unable to release symbol table node") + HDONE_ERROR(H5E_SYM, H5E_PROTECT, H5B_INS_ERROR, "unable to release symbol table node") FUNC_LEAVE_NOAPI(ret_value) } /* end H5G_node_insert() */ /*------------------------------------------------------------------------- - * Function: H5G_node_remove + * Function: H5G_node_remove * - * Purpose: The B-tree removal engine has found the symbol table node - * which should contain the name which is being removed. This - * function removes the name from the symbol table and - * decrements the link count on the object to which the name - * points. + * Purpose: The B-tree removal engine has found the symbol table node + * which should contain the name which is being removed. This + * function removes the name from the symbol table and + * decrements the link count on the object to which the name + * points. * - * If the udata->name parameter is set to NULL, then remove - * all entries in this symbol table node. This only occurs - * during the deletion of the entire group, so don't bother - * freeing individual name entries in the local heap, the group's - * symbol table removal code will just free the entire local - * heap eventually. Do reduce the link counts for each object - * however. + * If the udata->name parameter is set to NULL, then remove + * all entries in this symbol table node. This only occurs + * during the deletion of the entire group, so don't bother + * freeing individual name entries in the local heap, the group's + * symbol table removal code will just free the entire local + * heap eventually. Do reduce the link counts for each object + * however. * - * Return: Success: If all names are removed from the symbol - * table node then H5B_INS_REMOVE is returned; - * otherwise H5B_INS_NOOP is returned. + * Return: Success: If all names are removed from the symbol + * table node then H5B_INS_REMOVE is returned; + * otherwise H5B_INS_NOOP is returned. * - * Failure: H5B_INS_ERROR + * Failure: H5B_INS_ERROR * - * Programmer: Robb Matzke + * Programmer: Robb Matzke * Thursday, September 24, 1998 * *------------------------------------------------------------------------- */ static H5B_ins_t H5G_node_remove(H5F_t *f, hid_t dxpl_id, haddr_t addr, void *_lt_key/*in,out*/, - hbool_t H5_ATTR_UNUSED *lt_key_changed/*out*/, - void *_udata/*in,out*/, void *_rt_key/*in,out*/, - hbool_t *rt_key_changed/*out*/) + hbool_t H5_ATTR_UNUSED *lt_key_changed/*out*/, + void *_udata/*in,out*/, void *_rt_key/*in,out*/, + hbool_t *rt_key_changed/*out*/) { - H5G_node_key_t *lt_key = (H5G_node_key_t *)_lt_key; - H5G_node_key_t *rt_key = (H5G_node_key_t *)_rt_key; - H5G_bt_rm_t *udata = (H5G_bt_rm_t *)_udata; - H5G_node_t *sn = NULL; - unsigned sn_flags = H5AC__NO_FLAGS_SET; - unsigned lt = 0, rt, idx = 0; - int cmp = 1; - H5B_ins_t ret_value = H5B_INS_ERROR; + H5G_node_key_t *lt_key = (H5G_node_key_t *)_lt_key; + H5G_node_key_t *rt_key = (H5G_node_key_t *)_rt_key; + H5G_bt_rm_t *udata = (H5G_bt_rm_t *)_udata; + H5G_node_t *sn = NULL; + unsigned sn_flags = H5AC__NO_FLAGS_SET; + unsigned lt = 0, rt, idx = 0; + int cmp = 1; + H5B_ins_t ret_value = H5B_INS_ERROR; FUNC_ENTER_NOAPI_NOINIT @@ -807,7 +809,7 @@ H5G_node_remove(H5F_t *f, hid_t dxpl_id, haddr_t addr, void *_lt_key/*in,out*/, /* Load the symbol table */ if(NULL == (sn = (H5G_node_t *)H5AC_protect(f, dxpl_id, H5AC_SNODE, addr, f, H5AC__NO_FLAGS_SET))) - HGOTO_ERROR(H5E_SYM, H5E_CANTLOAD, H5B_INS_ERROR, "unable to protect symbol table node") + HGOTO_ERROR(H5E_SYM, H5E_CANTLOAD, H5B_INS_ERROR, "unable to protect symbol table node") /* "Normal" removal of a single entry from the symbol table node */ if(udata->common.name != NULL) { @@ -824,7 +826,8 @@ H5G_node_remove(H5F_t *f, hid_t dxpl_id, haddr_t addr, void *_lt_key/*in,out*/, const char *s; /* Pointer to string in local heap */ idx = (lt + rt) / 2; - s = base + sn->entry[idx].name_off; + if((s = H5HL_offset_into(udata->common.heap, sn->entry[idx].name_off)) == NULL) + HGOTO_ERROR(H5E_SYM, H5E_CANTGET, FAIL, "unable to get symbol table name") cmp = HDstrcmp(udata->common.name, s); if(cmp < 0) rt = idx; @@ -846,7 +849,8 @@ H5G_node_remove(H5F_t *f, hid_t dxpl_id, haddr_t addr, void *_lt_key/*in,out*/, lnk.cset = H5T_CSET_ASCII; if(sn->entry[idx].type == H5G_CACHED_SLINK) { lnk.type = H5L_TYPE_SOFT; - lnk.u.soft.name = (char *)H5HL_offset_into(udata->common.heap, sn->entry[idx].cache.slink.lval_offset); + if(NULL == (lnk.u.soft.name = (char *)H5HL_offset_into(udata->common.heap, sn->entry[idx].cache.slink.lval_offset))) + HGOTO_ERROR(H5E_SYM, H5E_CANTGET, H5B_INS_ERROR, "unable to get link name") } /* end if */ else { lnk.type = H5L_TYPE_HARD; @@ -960,22 +964,22 @@ H5G_node_remove(H5F_t *f, hid_t dxpl_id, haddr_t addr, void *_lt_key/*in,out*/, done: if(sn && H5AC_unprotect(f, dxpl_id, H5AC_SNODE, addr, sn, sn_flags) < 0) - HDONE_ERROR(H5E_SYM, H5E_CANTUNPROTECT, H5B_INS_ERROR, "unable to release symbol table node") + HDONE_ERROR(H5E_SYM, H5E_CANTUNPROTECT, H5B_INS_ERROR, "unable to release symbol table node") FUNC_LEAVE_NOAPI(ret_value) } /* end H5G_node_remove() */ /*------------------------------------------------------------------------- - * Function: H5G__node_iterate + * Function: H5G__node_iterate * - * Purpose: This function gets called during a group iterate operation. + * Purpose: This function gets called during a group iterate operation. * - * Return: Non-negative on success/Negative on failure + * Return: Non-negative on success/Negative on failure * - * Programmer: Robb Matzke - * matzke@llnl.gov - * Jun 24 1997 + * Programmer: Robb Matzke + * matzke@llnl.gov + * Jun 24 1997 * *------------------------------------------------------------------------- */ @@ -983,11 +987,11 @@ int H5G__node_iterate(H5F_t *f, hid_t dxpl_id, const void H5_ATTR_UNUSED *_lt_key, haddr_t addr, const void H5_ATTR_UNUSED *_rt_key, void *_udata) { - H5G_bt_it_it_t *udata = (H5G_bt_it_it_t *)_udata; - H5G_node_t *sn = NULL; - H5G_entry_t *ents; /* Pointer to entries in this node */ - unsigned u; /* Local index variable */ - int ret_value = H5_ITER_CONT; + H5G_bt_it_it_t *udata = (H5G_bt_it_it_t *)_udata; + H5G_node_t *sn = NULL; + H5G_entry_t *ents; /* Pointer to entries in this node */ + unsigned u; /* Local index variable */ + int ret_value = H5_ITER_CONT; FUNC_ENTER_PACKAGE @@ -1000,7 +1004,7 @@ H5G__node_iterate(H5F_t *f, hid_t dxpl_id, const void H5_ATTR_UNUSED *_lt_key, h /* Protect the symbol table node & local heap while we iterate over entries */ if(NULL == (sn = (H5G_node_t *)H5AC_protect(f, dxpl_id, H5AC_SNODE, addr, f, H5AC__READ_ONLY_FLAG))) - HGOTO_ERROR(H5E_SYM, H5E_CANTLOAD, H5_ITER_ERROR, "unable to load symbol table node") + HGOTO_ERROR(H5E_SYM, H5E_CANTLOAD, H5_ITER_ERROR, "unable to load symbol table node") /* * Iterate over the symbol table node entries. @@ -1013,7 +1017,8 @@ H5G__node_iterate(H5F_t *f, hid_t dxpl_id, const void H5_ATTR_UNUSED *_lt_key, h const char *name; /* Pointer to link name in heap */ /* Get the pointer to the name of the link in the heap */ - name = (const char *)H5HL_offset_into(udata->heap, ents[u].name_off); + if((name = (const char *)H5HL_offset_into(udata->heap, ents[u].name_off)) == NULL) + HGOTO_ERROR(H5E_SYM, H5E_CANTGET, H5_ITER_ERROR, "unable to get symbol table node name") HDassert(name); /* Convert the entry to a link */ @@ -1043,15 +1048,14 @@ done: FUNC_LEAVE_NOAPI(ret_value) } /* end H5G__node_iterate() */ - /*------------------------------------------------------------------------- - * Function: H5G__node_sumup + * Function: H5G__node_sumup * - * Purpose: This function gets called during a group iterate operation + * Purpose: This function gets called during a group iterate operation * to return total number of members in the group. * - * Return: Non-negative on success/Negative on failure + * Return: Non-negative on success/Negative on failure * * Programmer: Raymond Lu * Nov 20, 2002 @@ -1060,11 +1064,11 @@ done: */ int H5G__node_sumup(H5F_t *f, hid_t dxpl_id, const void H5_ATTR_UNUSED *_lt_key, haddr_t addr, - const void H5_ATTR_UNUSED *_rt_key, void *_udata) + const void H5_ATTR_UNUSED *_rt_key, void *_udata) { hsize_t *num_objs = (hsize_t *)_udata; - H5G_node_t *sn = NULL; - int ret_value = H5_ITER_CONT; + H5G_node_t *sn = NULL; + int ret_value = H5_ITER_CONT; FUNC_ENTER_PACKAGE @@ -1077,7 +1081,7 @@ H5G__node_sumup(H5F_t *f, hid_t dxpl_id, const void H5_ATTR_UNUSED *_lt_key, had /* Find the object node and add the number of symbol entries. */ if(NULL == (sn = (H5G_node_t *)H5AC_protect(f, dxpl_id, H5AC_SNODE, addr, f, H5AC__READ_ONLY_FLAG))) - HGOTO_ERROR(H5E_SYM, H5E_CANTLOAD, H5_ITER_ERROR, "unable to load symbol table node") + HGOTO_ERROR(H5E_SYM, H5E_CANTLOAD, H5_ITER_ERROR, "unable to load symbol table node") *num_objs += sn->nsyms; @@ -1090,12 +1094,12 @@ done: /*------------------------------------------------------------------------- - * Function: H5G__node_by_idx + * Function: H5G__node_by_idx * - * Purpose: This function gets called during a group iterate operation + * Purpose: This function gets called during a group iterate operation * to return object name by giving idx. * - * Return: 0 if object isn't found in this node; 1 if object is found; + * Return: 0 if object isn't found in this node; 1 if object is found; * Negative on failure * * Programmer: Raymond Lu @@ -1105,11 +1109,11 @@ done: */ int H5G__node_by_idx(H5F_t *f, hid_t dxpl_id, const void H5_ATTR_UNUSED *_lt_key, haddr_t addr, - const void H5_ATTR_UNUSED *_rt_key, void *_udata) + const void H5_ATTR_UNUSED *_rt_key, void *_udata) { - H5G_bt_it_idx_common_t *udata = (H5G_bt_it_idx_common_t *)_udata; - H5G_node_t *sn = NULL; - int ret_value = H5_ITER_CONT; + H5G_bt_it_idx_common_t *udata = (H5G_bt_it_idx_common_t *)_udata; + H5G_node_t *sn = NULL; + int ret_value = H5_ITER_CONT; FUNC_ENTER_PACKAGE @@ -1122,7 +1126,7 @@ H5G__node_by_idx(H5F_t *f, hid_t dxpl_id, const void H5_ATTR_UNUSED *_lt_key, ha /* Get a pointer to the symbol table node */ if(NULL == (sn = (H5G_node_t *)H5AC_protect(f, dxpl_id, H5AC_SNODE, addr, f, H5AC__READ_ONLY_FLAG))) - HGOTO_ERROR(H5E_SYM, H5E_CANTLOAD, H5_ITER_ERROR, "unable to load symbol table node"); + HGOTO_ERROR(H5E_SYM, H5E_CANTLOAD, H5_ITER_ERROR, "unable to load symbol table node"); /* Find the node, locate the object symbol table entry and retrieve the name */ if(udata->idx >= udata->num_objs && udata->idx < (udata->num_objs + sn->nsyms)) { @@ -1151,12 +1155,12 @@ done: /*------------------------------------------------------------------------- - * Function: H5G__node_init + * Function: H5G__node_init * - * Purpose: This function gets called during a file opening to initialize + * Purpose: This function gets called during a file opening to initialize * global information about group B-tree nodes for file. * - * Return: Non-negative on success + * Return: Non-negative on success * Negative on failure * * Programmer: Quincey Koziol @@ -1167,9 +1171,9 @@ done: herr_t H5G__node_init(H5F_t *f) { - H5B_shared_t *shared; /* Shared B-tree node info */ - size_t sizeof_rkey; /* Size of raw (disk) key */ - herr_t ret_value = SUCCEED; /* Return value */ + H5B_shared_t *shared; /* Shared B-tree node info */ + size_t sizeof_rkey; /* Size of raw (disk) key */ + herr_t ret_value = SUCCEED; /* Return value */ FUNC_ENTER_PACKAGE @@ -1181,14 +1185,14 @@ H5G__node_init(H5F_t *f) /* Allocate & initialize global info for the shared structure */ if(NULL == (shared = H5B_shared_new(f, H5B_SNODE, sizeof_rkey))) - HGOTO_ERROR(H5E_BTREE, H5E_NOSPACE, FAIL, "memory allocation failed for shared B-tree info") + HGOTO_ERROR(H5E_BTREE, H5E_NOSPACE, FAIL, "memory allocation failed for shared B-tree info") /* Set up the "local" information for this file's groups */ - /* */ + /* */ /* Make shared B-tree info reference counted */ if(H5F_SET_GRP_BTREE_SHARED(f, H5UC_create(shared, H5B_shared_free)) < 0) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "can't create ref-count wrapper for shared B-tree info") + HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "can't create ref-count wrapper for shared B-tree info") done: FUNC_LEAVE_NOAPI(ret_value) @@ -1196,12 +1200,12 @@ done: /*------------------------------------------------------------------------- - * Function: H5G_node_close + * Function: H5G_node_close * - * Purpose: This function gets called during a file close to shutdown + * Purpose: This function gets called during a file close to shutdown * global information about group B-tree nodes for file. * - * Return: Non-negative on success + * Return: Non-negative on success * Negative on failure * * Programmer: Quincey Koziol @@ -1227,12 +1231,12 @@ H5G_node_close(const H5F_t *f) /*------------------------------------------------------------------------- - * Function: H5G__node_copy + * Function: H5G__node_copy * - * Purpose: This function gets called during a group iterate operation + * Purpose: This function gets called during a group iterate operation * to copy objects of this node into a new location. * - * Return: 0(zero) on success/Negative on failure + * Return: 0(zero) on success/Negative on failure * * Programmer: Peter Cao * Sept 10, 2005 @@ -1241,7 +1245,7 @@ H5G_node_close(const H5F_t *f) */ int H5G__node_copy(H5F_t *f, hid_t dxpl_id, const void H5_ATTR_UNUSED *_lt_key, haddr_t addr, - const void H5_ATTR_UNUSED *_rt_key, void *_udata) + const void H5_ATTR_UNUSED *_rt_key, void *_udata) { H5G_bt_it_cpy_t *udata = (H5G_bt_it_cpy_t *)_udata; const H5O_loc_t *src_oloc = udata->src_oloc; @@ -1260,7 +1264,7 @@ H5G__node_copy(H5F_t *f, hid_t dxpl_id, const void H5_ATTR_UNUSED *_lt_key, hadd /* load the symbol table into memory from the source file */ if(NULL == (sn = (H5G_node_t *)H5AC_protect(f, dxpl_id, H5AC_SNODE, addr, f, H5AC__READ_ONLY_FLAG))) - HGOTO_ERROR(H5E_SYM, H5E_CANTLOAD, H5_ITER_ERROR, "unable to load symbol table node") + HGOTO_ERROR(H5E_SYM, H5E_CANTLOAD, H5_ITER_ERROR, "unable to load symbol table node") /* get the base address of the heap */ if(NULL == (heap = H5HL_protect(f, dxpl_id, udata->src_heap_addr, H5AC__READ_ONLY_FLAG))) @@ -1292,7 +1296,8 @@ H5G__node_copy(H5F_t *f, hid_t dxpl_id, const void H5_ATTR_UNUSED *_lt_key, hadd grp_loc.oloc = (H5O_loc_t *)src_oloc; /* Get pointer to link value in local heap */ - link_name = (char *)H5HL_offset_into(heap, tmp_src_ent.cache.slink.lval_offset); + if((link_name = (char *)H5HL_offset_into(heap, tmp_src_ent.cache.slink.lval_offset)) == NULL) + HGOTO_ERROR(H5E_OHDR, H5E_CANTGET, H5_ITER_ERROR, "unable to get link name") /* Check if the object pointed by the soft link exists in the source file */ if(H5G_loc_info(&grp_loc, link_name, FALSE, &oinfo, H5P_DEFAULT, dxpl_id) >= 0) { @@ -1342,7 +1347,8 @@ H5G__node_copy(H5F_t *f, hid_t dxpl_id, const void H5_ATTR_UNUSED *_lt_key, hadd /* Construct link information for eventual insertion */ lnk.type = H5L_TYPE_SOFT; - lnk.u.soft.name = (char *)H5HL_offset_into(heap, src_ent->cache.slink.lval_offset); + if((lnk.u.soft.name = (char *)H5HL_offset_into(heap, src_ent->cache.slink.lval_offset)) == NULL) + HGOTO_ERROR(H5E_OHDR, H5E_CANTGET, H5_ITER_ERROR, "unable to get link name") } /* else if */ else HDassert(0 && "Unknown entry type"); @@ -1354,8 +1360,9 @@ H5G__node_copy(H5F_t *f, hid_t dxpl_id, const void H5_ATTR_UNUSED *_lt_key, hadd /* lnk.name = name; */ /* This will be set in callback */ /* Determine name of source object */ - name = (const char *)H5HL_offset_into(heap, src_ent->name_off); - HDassert(name); + if((name = (const char *)H5HL_offset_into(heap, src_ent->name_off)) == NULL) + HGOTO_ERROR(H5E_OHDR, H5E_CANTGET, H5_ITER_ERROR, "unable to get source object name") + HDassert(name); /* Set copied metadata tag */ H5_BEGIN_TAG(dxpl_id, H5AC__COPIED_TAG, H5_ITER_ERROR); @@ -1384,15 +1391,15 @@ done: /*------------------------------------------------------------------------- - * Function: H5G__node_build_table + * Function: H5G__node_build_table * - * Purpose: B-link tree callback for building table of links + * Purpose: B-link tree callback for building table of links * - * Return: Non-negative on success/Negative on failure + * Return: Non-negative on success/Negative on failure * - * Programmer: Quincey Koziol - * koziol@hdfgroup.org - * Nov 19 2006 + * Programmer: Quincey Koziol + * koziol@hdfgroup.org + * Nov 19 2006 * *------------------------------------------------------------------------- */ @@ -1400,10 +1407,10 @@ int H5G__node_build_table(H5F_t *f, hid_t dxpl_id, const void H5_ATTR_UNUSED *_lt_key, haddr_t addr, const void H5_ATTR_UNUSED *_rt_key, void *_udata) { - H5G_bt_it_bt_t *udata = (H5G_bt_it_bt_t *)_udata; - H5G_node_t *sn = NULL; /* Symbol table node */ - unsigned u; /* Local index variable */ - int ret_value = H5_ITER_CONT; + H5G_bt_it_bt_t *udata = (H5G_bt_it_bt_t *)_udata; + H5G_node_t *sn = NULL; /* Symbol table node */ + unsigned u; /* Local index variable */ + int ret_value = H5_ITER_CONT; FUNC_ENTER_PACKAGE @@ -1419,7 +1426,7 @@ H5G__node_build_table(H5F_t *f, hid_t dxpl_id, const void H5_ATTR_UNUSED *_lt_ke * because we're about to call an application function. */ if(NULL == (sn = (H5G_node_t *)H5AC_protect(f, dxpl_id, H5AC_SNODE, addr, f, H5AC__READ_ONLY_FLAG))) - HGOTO_ERROR(H5E_SYM, H5E_CANTLOAD, H5_ITER_ERROR, "unable to load symbol table node") + HGOTO_ERROR(H5E_SYM, H5E_CANTLOAD, H5_ITER_ERROR, "unable to load symbol table node") /* Check if the link table needs to be extended */ if((udata->ltable->nlinks + sn->nsyms) >= udata->alloc_nlinks) { @@ -1438,7 +1445,8 @@ H5G__node_build_table(H5F_t *f, hid_t dxpl_id, const void H5_ATTR_UNUSED *_lt_ke size_t linkno; /* Link allocated */ /* Get pointer to link's name in the heap */ - name = (const char *)H5HL_offset_into(udata->heap, sn->entry[u].name_off); + if((name = (const char *)H5HL_offset_into(udata->heap, sn->entry[u].name_off)) == NULL) + HGOTO_ERROR(H5E_SYM, H5E_CANTGET, H5_ITER_ERROR, "unable to get symbol table link name") HDassert(name); /* Determine the link to operate on in the table */ @@ -1472,8 +1480,8 @@ done: *------------------------------------------------------------------------- */ herr_t -H5G__node_iterate_size(H5F_t *f, hid_t H5_ATTR_UNUSED dxpl_id, const void H5_ATTR_UNUSED *_lt_key, haddr_t H5_ATTR_UNUSED addr, - const void H5_ATTR_UNUSED *_rt_key, void *_udata) +H5G__node_iterate_size(H5F_t *f, hid_t H5_ATTR_UNUSED dxpl_id, const void H5_ATTR_UNUSED *_lt_key, + haddr_t H5_ATTR_UNUSED addr, const void H5_ATTR_UNUSED *_rt_key, void *_udata) { hsize_t *stab_size = (hsize_t *)_udata; /* User data */ @@ -1490,16 +1498,16 @@ H5G__node_iterate_size(H5F_t *f, hid_t H5_ATTR_UNUSED dxpl_id, const void H5_ATT /*------------------------------------------------------------------------- - * Function: H5G_node_debug + * Function: H5G_node_debug * - * Purpose: Prints debugging information about a symbol table node - * or a B-tree node for a symbol table B-tree. + * Purpose: Prints debugging information about a symbol table node + * or a B-tree node for a symbol table B-tree. * - * Return: 0(zero) on success/Negative on failure + * Return: 0(zero) on success/Negative on failure * - * Programmer: Robb Matzke - * matzke@llnl.gov - * Aug 4 1997 + * Programmer: Robb Matzke + * matzke@llnl.gov + * Aug 4 1997 * *------------------------------------------------------------------------- */ @@ -1507,10 +1515,10 @@ herr_t H5G_node_debug(H5F_t *f, hid_t dxpl_id, haddr_t addr, FILE * stream, int indent, int fwidth, haddr_t heap_addr) { - H5G_node_t *sn = NULL; - H5HL_t *heap = NULL; - unsigned u; /* Local index variable */ - herr_t ret_value = SUCCEED; /* Return value */ + H5G_node_t *sn = NULL; + H5HL_t *heap = NULL; + unsigned u; /* Local index variable */ + herr_t ret_value = SUCCEED; /* Return value */ FUNC_ENTER_NOAPI(FAIL) @@ -1537,8 +1545,8 @@ H5G_node_debug(H5F_t *f, hid_t dxpl_id, haddr_t addr, FILE * stream, int indent, H5E_clear_stack(NULL); /* discard that error */ udata.heap = heap; - if(H5B_debug(f, dxpl_id, addr, stream, indent, fwidth, H5B_SNODE, &udata) < 0) - HGOTO_ERROR(H5E_SYM, H5E_CANTLOAD, FAIL, "unable to debug B-tree node"); + if(H5B_debug(f, dxpl_id, addr, stream, indent, fwidth, H5B_SNODE, &udata) < 0) + HGOTO_ERROR(H5E_SYM, H5E_CANTLOAD, FAIL, "unable to debug B-tree node"); } /* end if */ else { fprintf(stream, "%*sSymbol Table Node...\n", indent, ""); @@ -1571,7 +1579,7 @@ H5G_node_debug(H5F_t *f, hid_t dxpl_id, haddr_t addr, FILE * stream, int indent, done: if(sn && H5AC_unprotect(f, dxpl_id, H5AC_SNODE, addr, sn, H5AC__NO_FLAGS_SET) < 0) - HDONE_ERROR(H5E_SYM, H5E_PROTECT, FAIL, "unable to release symbol table node") + HDONE_ERROR(H5E_SYM, H5E_PROTECT, FAIL, "unable to release symbol table node") if(heap && H5HL_unprotect(heap) < 0) HDONE_ERROR(H5E_SYM, H5E_PROTECT, FAIL, "unable to unprotect symbol table heap") diff --git a/src/H5Gstab.c b/src/H5Gstab.c index a239cfe..7750671 100644 --- a/src/H5Gstab.c +++ b/src/H5Gstab.c @@ -707,11 +707,12 @@ done: static herr_t H5G_stab_get_name_by_idx_cb(const H5G_entry_t *ent, void *_udata) { - H5G_bt_it_gnbi_t *udata = (H5G_bt_it_gnbi_t *)_udata; + H5G_bt_it_gnbi_t *udata = (H5G_bt_it_gnbi_t *)_udata; size_t name_off; /* Offset of name in heap */ const char *name; /* Pointer to name string in heap */ + herr_t ret_value = SUCCEED; /* Return value */ - FUNC_ENTER_NOAPI_NOINIT_NOERR + FUNC_ENTER_NOAPI_NOINIT /* Sanity check */ HDassert(ent); @@ -719,12 +720,16 @@ H5G_stab_get_name_by_idx_cb(const H5G_entry_t *ent, void *_udata) /* Get name offset in heap */ name_off = ent->name_off; - name = (const char *)H5HL_offset_into(udata->heap, name_off); + + if((name = (const char *)H5HL_offset_into(udata->heap, name_off)) == NULL) + HGOTO_ERROR(H5E_SYM, H5E_CANTGET, FAIL, "unable to get symbol table link name") + HDassert(name); udata->name = H5MM_strdup(name); HDassert(udata->name); - FUNC_LEAVE_NOAPI(SUCCEED) +done: + FUNC_LEAVE_NOAPI(ret_value) } /* end H5G_stab_get_name_by_idx_cb */ @@ -941,7 +946,8 @@ H5G_stab_lookup_by_idx_cb(const H5G_entry_t *ent, void *_udata) HDassert(udata && udata->heap); /* Get a pointer to the link name */ - name = (const char *)H5HL_offset_into(udata->heap, ent->name_off); + if((name = (const char *)H5HL_offset_into(udata->heap, ent->name_off)) == NULL) + HGOTO_ERROR(H5E_SYM, H5E_CANTGET, FAIL, "unable to get symbol table link name") HDassert(name); /* Convert the entry to a link */ diff --git a/src/H5HL.c b/src/H5HL.c index fa577c3..dd756f5 100644 --- a/src/H5HL.c +++ b/src/H5HL.c @@ -400,18 +400,20 @@ END_FUNC(PRIV) /* end H5HL_protect() */ * *------------------------------------------------------------------------- */ -BEGIN_FUNC(PRIV, NOERR, -void *, NULL, -, +BEGIN_FUNC(PRIV, ERR, +void *, NULL, NULL, H5HL_offset_into(const H5HL_t *heap, size_t offset)) /* Sanity check */ HDassert(heap); - HDassert(offset < heap->dblk_size); + if(offset >= heap->dblk_size) + H5E_THROW(H5E_CANTGET, "unable to offset into local heap data block"); ret_value = heap->dblk_image + offset; +CATCH + /* No special processing on errors */ END_FUNC(PRIV) /* end H5HL_offset_into() */ - /*------------------------------------------------------------------------- * Function: H5HL_unprotect diff --git a/src/H5Oefl.c b/src/H5Oefl.c index 0456b00..2273289 100644 --- a/src/H5Oefl.c +++ b/src/H5Oefl.c @@ -67,17 +67,17 @@ const H5O_msg_class_t H5O_MSG_EFL[1] = {{ /*------------------------------------------------------------------------- - * Function: H5O_efl_decode + * Function: H5O_efl_decode * * Purpose: Decode an external file list message and return a pointer to - * the message (and some other data). + * the message (and some other data). * - * Return: Success: Ptr to a new message struct. + * Return: Success: Ptr to a new message struct. * - * Failure: NULL + * Failure: NULL * * Programmer: Robb Matzke - * Tuesday, November 25, 1997 + * Tuesday, November 25, 1997 * * Modification: * Raymond Lu @@ -90,12 +90,12 @@ static void * H5O_efl_decode(H5F_t *f, hid_t dxpl_id, H5O_t H5_ATTR_UNUSED *open_oh, unsigned H5_ATTR_UNUSED mesg_flags, unsigned H5_ATTR_UNUSED *ioflags, const uint8_t *p) { - H5O_efl_t *mesg = NULL; - int version; - const char *s = NULL; - H5HL_t *heap; - size_t u; /* Local index variable */ - void *ret_value = NULL; /* Return value */ + H5O_efl_t *mesg = NULL; + int version; + const char *s = NULL; + H5HL_t *heap; + size_t u; /* Local index variable */ + void *ret_value = NULL; /* Return value */ FUNC_ENTER_NOAPI_NOINIT @@ -104,12 +104,12 @@ H5O_efl_decode(H5F_t *f, hid_t dxpl_id, H5O_t H5_ATTR_UNUSED *open_oh, HDassert(p); if(NULL == (mesg = (H5O_efl_t *)H5MM_calloc(sizeof(H5O_efl_t)))) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed") + HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed") /* Version */ version = *p++; if(version != H5O_EFL_VERSION) - HGOTO_ERROR(H5E_OHDR, H5E_CANTLOAD, NULL, "bad version number for external file list message") + HGOTO_ERROR(H5E_OHDR, H5E_CANTLOAD, NULL, "bad version number for external file list message") /* Reserved */ p += 3; @@ -141,24 +141,25 @@ H5O_efl_decode(H5F_t *f, hid_t dxpl_id, H5O_t H5_ATTR_UNUSED *open_oh, /* Decode the file list */ mesg->slot = (H5O_efl_entry_t *)H5MM_calloc(mesg->nalloc * sizeof(H5O_efl_entry_t)); if(NULL == mesg->slot) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed") + HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed") if(NULL == (heap = H5HL_protect(f, dxpl_id, mesg->heap_addr, H5AC__READ_ONLY_FLAG))) HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, NULL, "unable to read protect link value") for(u = 0; u < mesg->nused; u++) { - /* Name */ - H5F_DECODE_LENGTH (f, p, mesg->slot[u].name_offset); + /* Name */ + H5F_DECODE_LENGTH (f, p, mesg->slot[u].name_offset); - s = (const char *)H5HL_offset_into(heap, mesg->slot[u].name_offset); - HDassert(s && *s); - mesg->slot[u].name = H5MM_xstrdup (s); + if((s = (const char *)H5HL_offset_into(heap, mesg->slot[u].name_offset)) == NULL) + HGOTO_ERROR(H5E_SYM, H5E_CANTGET, NULL, "unable to get external file name") + HDassert(s && *s); + mesg->slot[u].name = H5MM_xstrdup (s); HDassert(mesg->slot[u].name); - /* File offset */ - H5F_DECODE_LENGTH (f, p, mesg->slot[u].offset); + /* File offset */ + H5F_DECODE_LENGTH (f, p, mesg->slot[u].offset); - /* Size */ - H5F_DECODE_LENGTH (f, p, mesg->slot[u].size); + /* Size */ + H5F_DECODE_LENGTH (f, p, mesg->slot[u].size); } /* end for */ if(H5HL_unprotect(heap) < 0) diff --git a/test/CMakeTests.cmake b/test/CMakeTests.cmake index 94b099c..ca2ca77 100644 --- a/test/CMakeTests.cmake +++ b/test/CMakeTests.cmake @@ -183,6 +183,7 @@ endforeach () set (HDF5_REFERENCE_TEST_FILES aggr.h5 bad_compound.h5 + bad_offset.h5 be_data.h5 be_extlink1.h5 be_extlink2.h5 @@ -1307,6 +1308,7 @@ if (HDF5_BUILD_GENERATORS) # generator executables set (H5_GENERATORS + gen_bad_offset gen_bad_ohdr gen_bogus gen_cross diff --git a/test/Makefile.am b/test/Makefile.am index 20b63f6..64f1d3d 100644 --- a/test/Makefile.am +++ b/test/Makefile.am @@ -92,7 +92,7 @@ endif BUILD_ALL_PROGS=gen_bad_ohdr gen_bogus gen_cross gen_deflate gen_filters gen_new_array \ gen_new_fill gen_new_group gen_new_mtime gen_new_super gen_noencoder \ gen_nullspace gen_udlinks space_overflow gen_filespace gen_specmetaread \ - gen_sizes_lheap gen_file_image gen_plist + gen_sizes_lheap gen_file_image gen_plist gen_bad_offset if BUILD_ALL_CONDITIONAL noinst_PROGRAMS=$(BUILD_ALL_PROGS) diff --git a/test/bad_offset.h5 b/test/bad_offset.h5 new file mode 100644 index 0000000..6500ffe Binary files /dev/null and b/test/bad_offset.h5 differ diff --git a/test/gen_bad_offset.c b/test/gen_bad_offset.c new file mode 100644 index 0000000..2be4af1 --- /dev/null +++ b/test/gen_bad_offset.c @@ -0,0 +1,112 @@ +/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + * Copyright by The HDF Group. * + * Copyright by the Board of Trustees of the University of Illinois. * + * All rights reserved. * + * * + * This file is part of HDF5. The full HDF5 copyright notice, including * + * terms governing use, modification, and redistribution, is contained in * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ + +/* + * Purpose: Generate an HDF5 file for testing H5FFV-10216 + */ +#include "h5test.h" + +#define TESTFILE "bad_offset.h5" +#define GRP1 "group1" +#define GRP2 "group2" +#define DSET "dsetA" +#define SOFT1 "soft_one" +#define SOFT2 "soft_two" + + + +/*------------------------------------------------------------------------- + * Function: main + * Generate an HDF5 file with groups, datasets and symbolic links. + * + * After this file is generated, write bad offset values to + * the heap at 3 locations in the file: + * (A) Open the file: + * fd = HDopen(TESTFILE, O_RDWR, 0663); + * (B) Position the file at: + * (1) HDlseek(fd, (HDoff_t)880, SEEK_SET); + * "/group1/group2": replace heap offset "8" by bad offset + * (2) HDlseek(fd, (HDoff_t)1512, SEEK_SET); + * "/dsetA": replace name offset into private heap "72" by bad offset + * (3) HDlseek(fd, (HDoff_t)1616, SEEK_SET); + * /soft_one: replace link value offset in the scratch pad "32" by bad offset + * (C) Write the bad offset value to the file: + * write(fd, &val, sizeof(val)); + * + * Note: if the groups/datasets/symbolic links are changed in the file, + * the above locations need to be adjusted accordingly. + * + * Return: EXIT_SUCCESS/EXIT_FAILURE + * + *------------------------------------------------------------------------- + */ +int +main(void) +{ + hid_t fid = -1, gid1 = -1, gid2 = -1; /* File and group IDs */ + hid_t did = -1, sid = -1; /* Dataset and dataspace IDs */ + + /* Create the test file */ + if((fid = H5Fcreate(TESTFILE, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0) + FAIL_STACK_ERROR + + /* Create two groups */ + if((gid1 = H5Gcreate2(fid, GRP1, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) + FAIL_STACK_ERROR + if((gid2 = H5Gcreate2(gid1, GRP2, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) + FAIL_STACK_ERROR + + /* Close the groups */ + if(H5Gclose(gid1) < 0) + FAIL_STACK_ERROR + if(H5Gclose(gid2) < 0) + FAIL_STACK_ERROR + + /* Create soft links to the groups */ + if(H5Lcreate_soft("/group1", fid, SOFT1, H5P_DEFAULT, H5P_DEFAULT) < 0) + FAIL_STACK_ERROR + if(H5Lcreate_soft("/group1/group2", fid, SOFT2, H5P_DEFAULT, H5P_DEFAULT) < 0) + FAIL_STACK_ERROR + + /* Create a dataset */ + if((sid = H5Screate(H5S_SCALAR)) < 0) + FAIL_STACK_ERROR + if((did = H5Dcreate2(fid, DSET, H5T_NATIVE_INT, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) + FAIL_STACK_ERROR + + /* Close the dataset */ + if(H5Dclose(did) < 0) + FAIL_STACK_ERROR + + /* Close the dataspace */ + if(H5Sclose(sid) < 0) + FAIL_STACK_ERROR + + /* Close the file */ + if(H5Fclose(fid) < 0) + FAIL_STACK_ERROR + + return EXIT_SUCCESS; + +error: + H5E_BEGIN_TRY { + H5Gclose(gid1); + H5Gclose(gid2); + H5Dclose(did); + H5Sclose(sid); + H5Fclose(fid); + } H5E_END_TRY; + + return EXIT_FAILURE; +} /* end main() */ + diff --git a/test/tmisc.c b/test/tmisc.c index bec80b2..594a513 100644 --- a/test/tmisc.c +++ b/test/tmisc.c @@ -323,6 +323,11 @@ unsigned m13_rdata[MISC13_DIM1][MISC13_DIM2]; /* Data read from dataset #define MISC31_PROPNAME "misc31_prop" #define MISC31_DTYPENAME "dtype" +/* Definitions for misc. test #33 */ +/* Note that this test file is generated by "gen_bad_offset.c" */ +/* and bad offset values are written to that file for testing */ +#define MISC33_FILE "bad_offset.h5" + /**************************************************************** ** ** test_misc1(): test unlinking a dataset from a group and immediately @@ -5445,6 +5450,55 @@ test_misc32(void) } /* end test_misc32() */ +/**************************************************************** +** +** test_misc33(): Test for H5FFV-10216 +** --verify that H5HL_offset_into() returns error if the +** input parameter "offset" exceeds heap data block size. +** --case (1), (2), (3) are scenarios that will traverse to the +** the 3 locations in the file having bad offset values to +** the heap. (See description in gen_bad_offset.c) +** +****************************************************************/ +static void +test_misc33(void) +{ + hid_t fid = -1; /* File ID */ + const char *testfile = H5_get_srcdir_filename(MISC33_FILE); /* Corrected test file name */ + H5O_info_t oinfo; /* Structure for object metadata information */ + herr_t ret; /* Generic return value */ + + /* Output message about test being performed */ + MESSAGE(5, ("Testing that bad offset into the heap returns error")); + + /* Open the test file */ + fid = H5Fopen(testfile, H5F_ACC_RDWR, H5P_DEFAULT); + CHECK(fid, FAIL, "H5Fopen"); + + /* Case (1) */ + H5E_BEGIN_TRY { + ret = H5Oget_info_by_name(fid, "/soft_two", &oinfo, H5P_DEFAULT); + } H5E_END_TRY; + VERIFY(ret, FAIL, "H5Oget_info_by_name"); + + /* Case (2) */ + H5E_BEGIN_TRY { + ret = H5Oget_info_by_name(fid, "/dsetA", &oinfo, H5P_DEFAULT); + } H5E_END_TRY; + VERIFY(ret, FAIL, "H5Oget_info_by_name"); + + /* Case (3) */ + H5E_BEGIN_TRY { + ret = H5Oget_info_by_name(fid, "/soft_one", &oinfo, H5P_DEFAULT); + } H5E_END_TRY; + VERIFY(ret, FAIL, "H5Oget_info_by_name"); + + /* Close the file */ + ret = H5Fclose(fid); + CHECK(fid, FAIL, "H5Fclose"); + +} /* end test_misc33() */ + /**************************************************************** ** @@ -5493,6 +5547,7 @@ test_misc(void) test_misc30(); /* Exercise local heap loading bug where free lists were getting dropped */ test_misc31(); /* Test Reentering library through deprecated routines after H5close() */ test_misc32(); /* Test filter memory allocation functions */ + test_misc33(); /* ??? */ } /* test_misc() */ -- cgit v0.12 From b9f294a9440d72ce55cd85340583a56b10c1de25 Mon Sep 17 00:00:00 2001 From: Vailin Choi Date: Wed, 23 Aug 2017 16:23:09 -0500 Subject: Modifications based on comments from pull request review (1) Remove unnecessary asserts (2) Add code to insert bad offset values to the test file in gen_bad_offset.c --- src/H5Glink.c | 21 ++++++++++++++------- src/H5Gnode.c | 43 ++++++++----------------------------------- src/H5Gstab.c | 6 ++---- src/H5Oefl.c | 3 ++- test/bad_offset.h5 | Bin 3312 -> 3312 bytes test/gen_bad_offset.c | 41 ++++++++++++++++++++++++++++++++++++++--- test/tmisc.c | 2 +- 7 files changed, 65 insertions(+), 51 deletions(-) diff --git a/src/H5Glink.c b/src/H5Glink.c index 77b69cb..e199f89 100644 --- a/src/H5Glink.c +++ b/src/H5Glink.c @@ -224,6 +224,7 @@ herr_t H5G__ent_to_link(H5O_link_t *lnk, const H5HL_t *heap, const H5G_entry_t *ent, const char *name) { + hbool_t dup_soft = FALSE; /* xstrdup the symbolic link name or not */ herr_t ret_value = SUCCEED; /* Return value */ FUNC_ENTER_PACKAGE @@ -238,19 +239,21 @@ H5G__ent_to_link(H5O_link_t *lnk, const H5HL_t *heap, lnk->cset = H5F_DEFAULT_CSET; lnk->corder = 0; lnk->corder_valid = FALSE; /* Creation order not valid for this link */ - lnk->name = H5MM_xstrdup(name); - HDassert(lnk->name); + if((lnk->name = H5MM_xstrdup(name)) == NULL) + HGOTO_ERROR(H5E_LINK, H5E_CANTGET, FAIL, "unable to duplicate link name") /* Object is a symbolic or hard link */ if(ent->type == H5G_CACHED_SLINK) { const char *s; /* Pointer to link value */ if((s = (const char *)H5HL_offset_into(heap, ent->cache.slink.lval_offset)) == NULL) - HGOTO_ERROR(H5E_LINK, H5E_CANTGET, FAIL, "unable to get link name") - HDassert(s); + HGOTO_ERROR(H5E_LINK, H5E_CANTGET, FAIL, "unable to get symbolic link name") /* Copy the link value */ - lnk->u.soft.name = H5MM_xstrdup(s); + if((lnk->u.soft.name = H5MM_xstrdup(s)) == NULL) + HGOTO_ERROR(H5E_LINK, H5E_CANTGET, FAIL, "unable to duplicate symbolic link name") + + dup_soft = TRUE; /* Set link type */ lnk->type = H5L_TYPE_SOFT; @@ -264,8 +267,12 @@ H5G__ent_to_link(H5O_link_t *lnk, const H5HL_t *heap, } /* end else */ done: - if(ret_value < 0 && lnk->name) - H5MM_xfree(lnk->name); + if(ret_value < 0) { + if(lnk->name) + H5MM_xfree(lnk->name); + if(ent->type == H5G_CACHED_SLINK && dup_soft) + H5MM_xfree(lnk->u.soft.name); + } FUNC_LEAVE_NOAPI(ret_value) } /* end H5G__ent_to_link() */ diff --git a/src/H5Gnode.c b/src/H5Gnode.c index 4ddcf53..76e2c4b 100644 --- a/src/H5Gnode.c +++ b/src/H5Gnode.c @@ -35,7 +35,7 @@ /***********/ /* Headers */ /***********/ -#include "H5private.h" /* Generic Functionsi */ +#include "H5private.h" /* Generic Functions */ #include "H5ACprivate.h" /* Metadata cache */ #include "H5Eprivate.h" /* Error handling */ #include "H5Fprivate.h" /* File access */ @@ -396,7 +396,6 @@ H5G_node_cmp2(void *_lt_key, void *_udata, void *_rt_key) H5G_node_key_t *lt_key = (H5G_node_key_t *) _lt_key; H5G_node_key_t *rt_key = (H5G_node_key_t *) _rt_key; const char *s1, *s2; - const char *base; /* Base of heap */ int ret_value = SUCCEED; /* Return value */ FUNC_ENTER_NOAPI_NOINIT @@ -406,10 +405,6 @@ H5G_node_cmp2(void *_lt_key, void *_udata, void *_rt_key) HDassert(lt_key); HDassert(rt_key); - /* Get base address of heap */ - base = (const char *)H5HL_offset_into(udata->heap, (size_t)0); - HDassert(base); - /* Get pointers to string names */ if((s1 = (const char *)H5HL_offset_into(udata->heap, lt_key->offset)) == NULL) HGOTO_ERROR(H5E_SYM, H5E_CANTGET, FAIL, "unable to get key name") @@ -458,7 +453,6 @@ H5G_node_cmp3(void *_lt_key, void *_udata, void *_rt_key) H5G_node_key_t *lt_key = (H5G_node_key_t *) _lt_key; H5G_node_key_t *rt_key = (H5G_node_key_t *) _rt_key; const char *s; - const char *base; /* Base of heap */ herr_t ret_value = SUCCEED; /* Return value */ FUNC_ENTER_NOAPI_NOINIT @@ -468,10 +462,6 @@ H5G_node_cmp3(void *_lt_key, void *_udata, void *_rt_key) HDassert(lt_key); HDassert(rt_key); - /* Get base address of heap */ - base = (const char *)H5HL_offset_into(udata->heap, (size_t)0); - HDassert(base); - /* left side */ if((s = (const char *)H5HL_offset_into(udata->heap, lt_key->offset)) == NULL) HGOTO_ERROR(H5E_SYM, H5E_CANTGET, FAIL, "unable to get key name") @@ -525,7 +515,6 @@ H5G_node_found(H5F_t *f, hid_t dxpl_id, haddr_t addr, const void H5_ATTR_UNUSED unsigned lt = 0, idx = 0, rt; int cmp = 1; const char *s; - const char *base; /* Base of heap */ htri_t ret_value = TRUE; /* Return value */ FUNC_ENTER_NOAPI_NOINIT @@ -543,10 +532,6 @@ H5G_node_found(H5F_t *f, hid_t dxpl_id, haddr_t addr, const void H5_ATTR_UNUSED if(NULL == (sn = (H5G_node_t *)H5AC_protect(f, dxpl_id, H5AC_SNODE, addr, f, H5AC__READ_ONLY_FLAG))) HGOTO_ERROR(H5E_SYM, H5E_CANTLOAD, FAIL, "unable to protect symbol table node") - /* Get base address of heap */ - base = (const char *)H5HL_offset_into(udata->common.heap, (size_t)0); - HDassert(base); - /* * Binary search. */ @@ -624,7 +609,6 @@ H5G_node_insert(H5F_t *f, hid_t dxpl_id, haddr_t addr, H5G_node_t *sn = NULL, *snrt = NULL; unsigned sn_flags = H5AC__NO_FLAGS_SET, snrt_flags = H5AC__NO_FLAGS_SET; const char *s; - const char *base; /* Base of heap */ unsigned lt = 0, rt; /* Binary search cntrs */ int cmp = 1, idx = -1; H5G_node_t *insert_into = NULL; /*node that gets new entry*/ @@ -649,10 +633,6 @@ H5G_node_insert(H5F_t *f, hid_t dxpl_id, haddr_t addr, if(NULL == (sn = (H5G_node_t *)H5AC_protect(f, dxpl_id, H5AC_SNODE, addr, f, H5AC__NO_FLAGS_SET))) HGOTO_ERROR(H5E_SYM, H5E_CANTLOAD, H5B_INS_ERROR, "unable to protect symbol table node") - /* Get base address of heap */ - base = (const char *)H5HL_offset_into(udata->common.heap, (size_t)0); - HDassert(base); - /* * Where does the new symbol get inserted? We use a binary search. */ @@ -815,10 +795,6 @@ H5G_node_remove(H5F_t *f, hid_t dxpl_id, haddr_t addr, void *_lt_key/*in,out*/, if(udata->common.name != NULL) { H5O_link_t lnk; /* Constructed link for replacement */ size_t link_name_len; /* Length of string in local heap */ - const char *base; /* Base of heap */ - - /* Get base address of heap */ - base = (const char *)H5HL_offset_into(udata->common.heap, (size_t)0); /* Find the name with a binary search */ rt = sn->nsyms; @@ -1019,7 +995,6 @@ H5G__node_iterate(H5F_t *f, hid_t dxpl_id, const void H5_ATTR_UNUSED *_lt_key, h /* Get the pointer to the name of the link in the heap */ if((name = (const char *)H5HL_offset_into(udata->heap, ents[u].name_off)) == NULL) HGOTO_ERROR(H5E_SYM, H5E_CANTGET, H5_ITER_ERROR, "unable to get symbol table node name") - HDassert(name); /* Convert the entry to a link */ if(H5G__ent_to_link(&lnk, udata->heap, &ents[u], name) < 0) @@ -1362,7 +1337,6 @@ H5G__node_copy(H5F_t *f, hid_t dxpl_id, const void H5_ATTR_UNUSED *_lt_key, hadd /* Determine name of source object */ if((name = (const char *)H5HL_offset_into(heap, src_ent->name_off)) == NULL) HGOTO_ERROR(H5E_OHDR, H5E_CANTGET, H5_ITER_ERROR, "unable to get source object name") - HDassert(name); /* Set copied metadata tag */ H5_BEGIN_TAG(dxpl_id, H5AC__COPIED_TAG, H5_ITER_ERROR); @@ -1447,7 +1421,6 @@ H5G__node_build_table(H5F_t *f, hid_t dxpl_id, const void H5_ATTR_UNUSED *_lt_ke /* Get pointer to link's name in the heap */ if((name = (const char *)H5HL_offset_into(udata->heap, sn->entry[u].name_off)) == NULL) HGOTO_ERROR(H5E_SYM, H5E_CANTGET, H5_ITER_ERROR, "unable to get symbol table link name") - HDassert(name); /* Determine the link to operate on in the table */ linkno = udata->ltable->nlinks++; @@ -1549,29 +1522,29 @@ H5G_node_debug(H5F_t *f, hid_t dxpl_id, haddr_t addr, FILE * stream, int indent, HGOTO_ERROR(H5E_SYM, H5E_CANTLOAD, FAIL, "unable to debug B-tree node"); } /* end if */ else { - fprintf(stream, "%*sSymbol Table Node...\n", indent, ""); - fprintf(stream, "%*s%-*s %s\n", indent, "", fwidth, + HDfprintf(stream, "%*sSymbol Table Node...\n", indent, ""); + HDfprintf(stream, "%*s%-*s %s\n", indent, "", fwidth, "Dirty:", sn->cache_info.is_dirty ? "Yes" : "No"); - fprintf(stream, "%*s%-*s %u\n", indent, "", fwidth, + HDfprintf(stream, "%*s%-*s %u\n", indent, "", fwidth, "Size of Node (in bytes):", (unsigned)sn->node_size); - fprintf(stream, "%*s%-*s %u of %u\n", indent, "", fwidth, + HDfprintf(stream, "%*s%-*s %u of %u\n", indent, "", fwidth, "Number of Symbols:", sn->nsyms, (unsigned)(2 * H5F_SYM_LEAF_K(f))); indent += 3; fwidth = MAX(0, fwidth - 3); for(u = 0; u < sn->nsyms; u++) { - fprintf(stream, "%*sSymbol %u:\n", indent - 3, "", u); + HDfprintf(stream, "%*sSymbol %u:\n", indent - 3, "", u); if(heap) { const char *s = (const char *)H5HL_offset_into(heap, sn->entry[u].name_off); if(s) - fprintf(stream, "%*s%-*s `%s'\n", indent, "", fwidth, "Name:", s); + HDfprintf(stream, "%*s%-*s `%s'\n", indent, "", fwidth, "Name:", s); } /* end if */ else - fprintf(stream, "%*s%-*s\n", indent, "", fwidth, "Warning: Invalid heap address given, name not displayed!"); + HDfprintf(stream, "%*s%-*s\n", indent, "", fwidth, "Warning: Invalid heap address given, name not displayed!"); H5G__ent_debug(sn->entry + u, stream, indent, fwidth, heap); } /* end for */ diff --git a/src/H5Gstab.c b/src/H5Gstab.c index 7750671..4dc06ca 100644 --- a/src/H5Gstab.c +++ b/src/H5Gstab.c @@ -724,9 +724,8 @@ H5G_stab_get_name_by_idx_cb(const H5G_entry_t *ent, void *_udata) if((name = (const char *)H5HL_offset_into(udata->heap, name_off)) == NULL) HGOTO_ERROR(H5E_SYM, H5E_CANTGET, FAIL, "unable to get symbol table link name") - HDassert(name); - udata->name = H5MM_strdup(name); - HDassert(udata->name); + if((udata->name = H5MM_strdup(name)) == NULL) + HGOTO_ERROR(H5E_SYM, H5E_CANTGET, FAIL, "unable to duplicate symbol table link name") done: FUNC_LEAVE_NOAPI(ret_value) @@ -948,7 +947,6 @@ H5G_stab_lookup_by_idx_cb(const H5G_entry_t *ent, void *_udata) /* Get a pointer to the link name */ if((name = (const char *)H5HL_offset_into(udata->heap, ent->name_off)) == NULL) HGOTO_ERROR(H5E_SYM, H5E_CANTGET, FAIL, "unable to get symbol table link name") - HDassert(name); /* Convert the entry to a link */ if(H5G__ent_to_link(udata->lnk, udata->heap, ent, name) < 0) diff --git a/src/H5Oefl.c b/src/H5Oefl.c index 2273289..7d78caf 100644 --- a/src/H5Oefl.c +++ b/src/H5Oefl.c @@ -151,7 +151,8 @@ H5O_efl_decode(H5F_t *f, hid_t dxpl_id, H5O_t H5_ATTR_UNUSED *open_oh, if((s = (const char *)H5HL_offset_into(heap, mesg->slot[u].name_offset)) == NULL) HGOTO_ERROR(H5E_SYM, H5E_CANTGET, NULL, "unable to get external file name") - HDassert(s && *s); + if(*s == NULL) + HGOTO_ERROR(H5E_SYM, H5E_CANTGET, NULL, "invalid external file name") mesg->slot[u].name = H5MM_xstrdup (s); HDassert(mesg->slot[u].name); diff --git a/test/bad_offset.h5 b/test/bad_offset.h5 index 6500ffe..231dca2 100644 Binary files a/test/bad_offset.h5 and b/test/bad_offset.h5 differ diff --git a/test/gen_bad_offset.c b/test/gen_bad_offset.c index 2be4af1..82e94cd 100644 --- a/test/gen_bad_offset.c +++ b/test/gen_bad_offset.c @@ -27,9 +27,9 @@ /*------------------------------------------------------------------------- * Function: main - * Generate an HDF5 file with groups, datasets and symbolic links. * - * After this file is generated, write bad offset values to + * Generate an HDF5 file with groups, datasets and symbolic links. + * After the file is generated, write bad offset values to * the heap at 3 locations in the file: * (A) Open the file: * fd = HDopen(TESTFILE, O_RDWR, 0663); @@ -40,7 +40,7 @@ * "/dsetA": replace name offset into private heap "72" by bad offset * (3) HDlseek(fd, (HDoff_t)1616, SEEK_SET); * /soft_one: replace link value offset in the scratch pad "32" by bad offset - * (C) Write the bad offset value to the file: + * (C) Write the bad offset value to the file for (1), (2) and (3): * write(fd, &val, sizeof(val)); * * Note: if the groups/datasets/symbolic links are changed in the file, @@ -55,6 +55,8 @@ main(void) { hid_t fid = -1, gid1 = -1, gid2 = -1; /* File and group IDs */ hid_t did = -1, sid = -1; /* Dataset and dataspace IDs */ + int fd = -1; /* File descriptor */ + int64_t val = 999; /* Bad offset value */ /* Create the test file */ if((fid = H5Fcreate(TESTFILE, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0) @@ -96,6 +98,39 @@ main(void) if(H5Fclose(fid) < 0) FAIL_STACK_ERROR + /* + * Write bad offset values at 3 locations in the file + */ + + /* Open the file */ + if((fd = HDopen(TESTFILE, O_RDWR, 0663)) < 0) + FAIL_STACK_ERROR + + /* Position the file for /group1/group2: replace heap offset "8" by bad offset */ + if(HDlseek(fd, (HDoff_t)880, SEEK_SET) < 0) + FAIL_STACK_ERROR + /* Write the bad offset value to the file */ + if(HDwrite(fd, &val, sizeof(val)) < 0) + FAIL_STACK_ERROR + + /* Position the file for /dsetA: replace name offset into private heap "72" by bad offset */ + if(HDlseek(fd, (HDoff_t)1512, SEEK_SET) < 0) + FAIL_STACK_ERROR + /* Write the bad offset value to the file */ + if(HDwrite(fd, &val, sizeof(val)) < 0) + FAIL_STACK_ERROR + + /* Position the file for /soft_one: replace link value offset in the scratch pad "32" by bad offset */ + if(HDlseek(fd, (HDoff_t)1616, SEEK_SET) < 0) + FAIL_STACK_ERROR + /* Write the bad offset value to the file */ + if(HDwrite(fd, &val, sizeof(val)) < 0) + FAIL_STACK_ERROR + + /* Close the file */ + if(HDclose(fd) < 0) + FAIL_STACK_ERROR + return EXIT_SUCCESS; error: diff --git a/test/tmisc.c b/test/tmisc.c index 594a513..2c0fa96 100644 --- a/test/tmisc.c +++ b/test/tmisc.c @@ -5547,7 +5547,7 @@ test_misc(void) test_misc30(); /* Exercise local heap loading bug where free lists were getting dropped */ test_misc31(); /* Test Reentering library through deprecated routines after H5close() */ test_misc32(); /* Test filter memory allocation functions */ - test_misc33(); /* ??? */ + test_misc33(); /* Test to verify that H5HL_offset_into() returns error if offset exceeds heap block */ } /* test_misc() */ -- cgit v0.12 From c038988663cfa5aa3dec949609b174d98db90c2d Mon Sep 17 00:00:00 2001 From: Vailin Choi Date: Thu, 24 Aug 2017 11:42:35 -0500 Subject: Fix for daily test failure Fix for the compilation error from the PGI compiler. --- src/H5Oefl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/H5Oefl.c b/src/H5Oefl.c index 7d78caf..49c442f 100644 --- a/src/H5Oefl.c +++ b/src/H5Oefl.c @@ -151,7 +151,7 @@ H5O_efl_decode(H5F_t *f, hid_t dxpl_id, H5O_t H5_ATTR_UNUSED *open_oh, if((s = (const char *)H5HL_offset_into(heap, mesg->slot[u].name_offset)) == NULL) HGOTO_ERROR(H5E_SYM, H5E_CANTGET, NULL, "unable to get external file name") - if(*s == NULL) + if(*s == (char)NULL) HGOTO_ERROR(H5E_SYM, H5E_CANTGET, NULL, "invalid external file name") mesg->slot[u].name = H5MM_xstrdup (s); HDassert(mesg->slot[u].name); -- cgit v0.12 From 359d31df9b28a6ea4c4e8aa7c5241757331bc6fa Mon Sep 17 00:00:00 2001 From: Vailin Choi Date: Wed, 30 Aug 2017 18:15:04 -0500 Subject: Update RELEASE.txt Add info for HDFFV-10216 to release notes. --- release_docs/RELEASE.txt | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/release_docs/RELEASE.txt b/release_docs/RELEASE.txt index d296ffa..1ead4c7 100644 --- a/release_docs/RELEASE.txt +++ b/release_docs/RELEASE.txt @@ -175,6 +175,15 @@ Bug Fixes since HDF5-1.10.0-patch1 release Library ------- + - Fix H5HL_offset_into() + + (1) Fix H5HL_offset_into() to return error when offset exceeds heap data + block size. + (2) Fix other places in the library that call this routine to detect + error routine. + + (HDFFV-10216, VC, 2017/08/30) + - Fixes for paged aggregation Skip test in test/fheap.c when: -- cgit v0.12 From fcf3b935185969e5102859cc535dfd4024a6ef42 Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Thu, 31 Aug 2017 09:02:48 -0500 Subject: Fix function call args --- tools/src/h5repack/h5repack_copy.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/tools/src/h5repack/h5repack_copy.c b/tools/src/h5repack/h5repack_copy.c index 501f084..8e82b11 100644 --- a/tools/src/h5repack/h5repack_copy.c +++ b/tools/src/h5repack/h5repack_copy.c @@ -1487,9 +1487,9 @@ static int copy_user_block(const char *infile, const char *outfile, hsize_t size /* User block must be any power of 2 equal to 512 or greater (512, 1024, 2048, etc.) */ /* Open files */ - if ((infid = HDopen(infile, O_RDONLY)) < 0) + if ((infid = HDopen(infile, O_RDONLY, 0)) < 0) HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "HDopen failed"); - if ((outfid = HDopen(outfile, O_WRONLY)) < 0) + if ((outfid = HDopen(outfile, O_WRONLY, 0644)) < 0) HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "HDopen failed"); /* Copy the userblock from the input file to the output file */ @@ -1581,8 +1581,7 @@ void print_user_block(const char *filename, hid_t fid) } /* open file */ - if((fh = HDopen(filename, O_RDONLY)) < 0) { - error_msg("failed to open file\n"); + if((fh = HDopen(filename, O_RDONLY, 0)) < 0) { HGOTO_ERROR(H5E_tools_g, H5E_tools_min_id_g, "HDopen failed"); } -- cgit v0.12 From f4bc89003916b013cf90ef84726aa68864b15a9d Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Thu, 31 Aug 2017 15:20:34 -0500 Subject: HDFFV-10284 Add VS2017 merged from develop --- config/cmake/scripts/HDF5config.cmake | 102 +++++++++++++++++----------------- release_docs/INSTALL_CMake.txt | 46 +++++++-------- 2 files changed, 74 insertions(+), 74 deletions(-) diff --git a/config/cmake/scripts/HDF5config.cmake b/config/cmake/scripts/HDF5config.cmake index 646917c..52f081f 100755 --- a/config/cmake/scripts/HDF5config.cmake +++ b/config/cmake/scripts/HDF5config.cmake @@ -11,7 +11,7 @@ # ############################################################################################# ### ${CTEST_SCRIPT_ARG} is of the form OPTION=VALUE ### -### BUILD_GENERATOR required [Unix, VS2015, VS201564, VS2013, VS201364, VS2012, VS201264] ### +### BUILD_GENERATOR required [Unix, VS2017, VS201764, VS2015, VS201564, VS2013, VS201364] ### ### ctest -S HDF5config.cmake,BUILD_GENERATOR=VS201264 -C Release -VV -O hdf5.log ### ############################################################################################# @@ -22,12 +22,12 @@ cmake_minimum_required (VERSION 3.2.2 FATAL_ERROR) # where valid options for OPTION are: # BUILD_GENERATOR - The cmake build generator: # Unix * Unix Makefiles -# VS2015 * Visual Studio 14 2015 -# VS201564 * Visual Studio 14 2015 Win64 -# VS2013 * Visual Studio 12 2013 -# VS201364 * Visual Studio 12 2013 Win64 -# VS2012 * Visual Studio 11 2012 -# VS201264 * Visual Studio 11 2012 Win64 +# VS2017 * Visual Studio 15 2017 +# VS201764 * Visual Studio 15 2017 Win64 +# VS2015 * Visual Studio 14 2015 +# VS201564 * Visual Studio 14 2015 Win64 +# VS2013 * Visual Studio 12 2013 +# VS201364 * Visual Studio 12 2013 Win64 # # INSTALLDIR - root folder where hdf5 is installed # CTEST_CONFIGURATION_TYPE - Release, Debug, etc @@ -65,25 +65,7 @@ endif () # build generator must be defined if (NOT DEFINED BUILD_GENERATOR) - message (FATAL_ERROR "BUILD_GENERATOR must be defined - Unix, VS2015, VS201564, VS2013, VS201364, VS2012, or VS201264") -else () - if (${BUILD_GENERATOR} STREQUAL "Unix") - set (CTEST_CMAKE_GENERATOR "Unix Makefiles") - elseif (${BUILD_GENERATOR} STREQUAL "VS2015") - set (CTEST_CMAKE_GENERATOR "Visual Studio 14 2015") - elseif (${BUILD_GENERATOR} STREQUAL "VS201564") - set (CTEST_CMAKE_GENERATOR "Visual Studio 14 2015 Win64") - elseif (${BUILD_GENERATOR} STREQUAL "VS2013") - set (CTEST_CMAKE_GENERATOR "Visual Studio 12 2013") - elseif (${BUILD_GENERATOR} STREQUAL "VS201364") - set (CTEST_CMAKE_GENERATOR "Visual Studio 12 2013 Win64") - elseif (${BUILD_GENERATOR} STREQUAL "VS2012") - set (CTEST_CMAKE_GENERATOR "Visual Studio 11 2012") - elseif (${BUILD_GENERATOR} STREQUAL "VS201264") - set (CTEST_CMAKE_GENERATOR "Visual Studio 11 2012 Win64") - else () - message (FATAL_ERROR "Invalid BUILD_GENERATOR must be - Unix, VS2015, VS201564, VS2013, VS201364, VS2012, or VS201264") - endif () + message (FATAL_ERROR "BUILD_GENERATOR must be defined - Unix, VS2017, or VS201764, VS2015, VS201564, VS2013, VS201364") endif () ################################################################### @@ -135,31 +117,49 @@ endif () if (WIN32) set (SITE_OS_NAME "Windows") set (SITE_OS_VERSION "WIN7") - if (${BUILD_GENERATOR} STREQUAL "VS201564") - set (SITE_OS_BITS "64") - set (SITE_COMPILER_NAME "vs2015") - set (SITE_COMPILER_VERSION "14") - elseif (${BUILD_GENERATOR} STREQUAL "VS2015") - set (SITE_OS_BITS "32") - set (SITE_COMPILER_NAME "vs2015") - set (SITE_COMPILER_VERSION "14") - elseif (${BUILD_GENERATOR} STREQUAL "VS201364") - set (SITE_OS_BITS "64") - set (SITE_COMPILER_NAME "vs2013") - set (SITE_COMPILER_VERSION "12") - elseif (${BUILD_GENERATOR} STREQUAL "VS2013") - set (SITE_OS_BITS "32") - set (SITE_COMPILER_NAME "vs2013") - set (SITE_COMPILER_VERSION "12") - elseif (${BUILD_GENERATOR} STREQUAL "VS201264") - set (SITE_OS_BITS "64") - set (SITE_COMPILER_NAME "vs2012") - set (SITE_COMPILER_VERSION "11") - elseif (${BUILD_GENERATOR} STREQUAL "VS2012") - set (SITE_OS_BITS "32") - set (SITE_COMPILER_NAME "vs2012") - set (SITE_COMPILER_VERSION "11") - endif () + if (${BUILD_GENERATOR} STREQUAL "VS201764") + set (CTEST_CMAKE_GENERATOR "Visual Studio 15 2017 Win64") + set (SITE_OS_BITS "64") + set (SITE_COMPILER_NAME "vs2017") + set (SITE_COMPILER_VERSION "15") + elseif (${BUILD_GENERATOR} STREQUAL "VS2017") + set (CTEST_CMAKE_GENERATOR "Visual Studio 15 2017") + set (SITE_OS_BITS "32") + set (SITE_COMPILER_NAME "vs2017") + set (SITE_COMPILER_VERSION "15") + elseif (${BUILD_GENERATOR} STREQUAL "VS201564") + set (CTEST_CMAKE_GENERATOR "Visual Studio 14 2015 Win64") + set (SITE_OS_BITS "64") + set (SITE_COMPILER_NAME "vs2015") + set (SITE_COMPILER_VERSION "14") + elseif (${BUILD_GENERATOR} STREQUAL "VS2015") + set (CTEST_CMAKE_GENERATOR "Visual Studio 14 2015") + set (SITE_OS_BITS "32") + set (SITE_COMPILER_NAME "vs2015") + set (SITE_COMPILER_VERSION "14") + elseif (${BUILD_GENERATOR} STREQUAL "VS201364") + set (CTEST_CMAKE_GENERATOR "Visual Studio 12 2013 Win64") + set (SITE_OS_BITS "64") + set (SITE_COMPILER_NAME "vs2013") + set (SITE_COMPILER_VERSION "12") + elseif (${BUILD_GENERATOR} STREQUAL "VS2013") + set (CTEST_CMAKE_GENERATOR "Visual Studio 12 2013") + set (SITE_OS_BITS "32") + set (SITE_COMPILER_NAME "vs2013") + set (SITE_COMPILER_VERSION "12") + elseif (${BUILD_GENERATOR} STREQUAL "VS201264") + set (CTEST_CMAKE_GENERATOR "Visual Studio 11 2012 Win64") + set (SITE_OS_BITS "64") + set (SITE_COMPILER_NAME "vs2012") + set (SITE_COMPILER_VERSION "11") + elseif (${BUILD_GENERATOR} STREQUAL "VS2012") + set (CTEST_CMAKE_GENERATOR "Visual Studio 11 2012") + set (SITE_OS_BITS "32") + set (SITE_COMPILER_NAME "vs2012") + set (SITE_COMPILER_VERSION "11") + else () + message (FATAL_ERROR "Invalid BUILD_GENERATOR must be - Unix, VS2017, or VS201764, VS2015, VS201564, VS2013, VS201364") + endif () ## Set the following to unique id your computer ## set (CTEST_SITE "WIN7${BUILD_GENERATOR}.XXXX") else () diff --git a/release_docs/INSTALL_CMake.txt b/release_docs/INSTALL_CMake.txt index 7cb0225..85f7962 100644 --- a/release_docs/INSTALL_CMake.txt +++ b/release_docs/INSTALL_CMake.txt @@ -658,7 +658,7 @@ adding an option (${CTEST_SCRIPT_ARG}) to the platform configuration script. ############################################################################################# ### ${CTEST_SCRIPT_ARG} is of the form OPTION=VALUE ### -### BUILD_GENERATOR required [Unix, VS2015, VS201564, VS2013, VS201364, VS2012, VS201264] ### +### BUILD_GENERATOR required [Unix, VS2017, VS201764, VS2015, VS201564, VS2013, VS201364] ### ### ctest -S HDF5config.cmake,BUILD_GENERATOR=VS201264 -C Release -VV -O hdf5.log ### ############################################################################################# @@ -669,12 +669,12 @@ cmake_minimum_required (VERSION 3.2.2 FATAL_ERROR) # where valid options for OPTION are: # BUILD_GENERATOR - The cmake build generator: # Unix * Unix Makefiles +# VS2017 * Visual Studio 15 2017 +# VS201764 * Visual Studio 15 2017 Win64 # VS2015 * Visual Studio 14 2015 # VS201564 * Visual Studio 14 2015 Win64 # VS2013 * Visual Studio 12 2013 # VS201364 * Visual Studio 12 2013 Win64 -# VS2012 * Visual Studio 11 2012 -# VS201264 * Visual Studio 11 2012 Win64 # # INSTALLDIR - root folder where hdf5 is installed # CTEST_CONFIGURATION_TYPE - Release, Debug, etc @@ -712,25 +712,7 @@ endif () # build generator must be defined if (NOT DEFINED BUILD_GENERATOR) - message (FATAL_ERROR "BUILD_GENERATOR must be defined - Unix, VS2015, VS201564, VS2013, VS201364, VS2012, or VS201264") -else () - if (${BUILD_GENERATOR} STREQUAL "Unix") - set (CTEST_CMAKE_GENERATOR "Unix Makefiles") - elseif (${BUILD_GENERATOR} STREQUAL "VS2015") - set (CTEST_CMAKE_GENERATOR "Visual Studio 14 2015") - elseif (${BUILD_GENERATOR} STREQUAL "VS201564") - set (CTEST_CMAKE_GENERATOR "Visual Studio 14 2015 Win64") - elseif (${BUILD_GENERATOR} STREQUAL "VS2013") - set (CTEST_CMAKE_GENERATOR "Visual Studio 12 2013") - elseif (${BUILD_GENERATOR} STREQUAL "VS201364") - set (CTEST_CMAKE_GENERATOR "Visual Studio 12 2013 Win64") - elseif (${BUILD_GENERATOR} STREQUAL "VS2012") - set (CTEST_CMAKE_GENERATOR "Visual Studio 11 2012") - elseif (${BUILD_GENERATOR} STREQUAL "VS201264") - set (CTEST_CMAKE_GENERATOR "Visual Studio 11 2012 Win64") - else () - message (FATAL_ERROR "Invalid BUILD_GENERATOR must be - Unix, VS2015, VS201564, VS2013, VS201364, VS2012, or VS201264") - endif () + message (FATAL_ERROR "BUILD_GENERATOR must be defined - Unix, VS2017, or VS201764, VS2015, VS201564, VS2013, VS201364") endif () ################################################################### @@ -782,30 +764,48 @@ endif () if (WIN32) set (SITE_OS_NAME "Windows") set (SITE_OS_VERSION "WIN7") - if (${BUILD_GENERATOR} STREQUAL "VS201564") + if (${BUILD_GENERATOR} STREQUAL "VS201764") + set (CTEST_CMAKE_GENERATOR "Visual Studio 15 2017 Win64") + set (SITE_OS_BITS "64") + set (SITE_COMPILER_NAME "vs2017") + set (SITE_COMPILER_VERSION "15") + elseif (${BUILD_GENERATOR} STREQUAL "VS2017") + set (CTEST_CMAKE_GENERATOR "Visual Studio 15 2017") + set (SITE_OS_BITS "32") + set (SITE_COMPILER_NAME "vs2017") + set (SITE_COMPILER_VERSION "15") + elseif (${BUILD_GENERATOR} STREQUAL "VS201564") + set (CTEST_CMAKE_GENERATOR "Visual Studio 14 2015 Win64") set (SITE_OS_BITS "64") set (SITE_COMPILER_NAME "vs2015") set (SITE_COMPILER_VERSION "14") elseif (${BUILD_GENERATOR} STREQUAL "VS2015") + set (CTEST_CMAKE_GENERATOR "Visual Studio 14 2015") set (SITE_OS_BITS "32") set (SITE_COMPILER_NAME "vs2015") set (SITE_COMPILER_VERSION "14") elseif (${BUILD_GENERATOR} STREQUAL "VS201364") + set (CTEST_CMAKE_GENERATOR "Visual Studio 12 2013 Win64") set (SITE_OS_BITS "64") set (SITE_COMPILER_NAME "vs2013") set (SITE_COMPILER_VERSION "12") elseif (${BUILD_GENERATOR} STREQUAL "VS2013") + set (CTEST_CMAKE_GENERATOR "Visual Studio 12 2013") set (SITE_OS_BITS "32") set (SITE_COMPILER_NAME "vs2013") set (SITE_COMPILER_VERSION "12") elseif (${BUILD_GENERATOR} STREQUAL "VS201264") + set (CTEST_CMAKE_GENERATOR "Visual Studio 11 2012 Win64") set (SITE_OS_BITS "64") set (SITE_COMPILER_NAME "vs2012") set (SITE_COMPILER_VERSION "11") elseif (${BUILD_GENERATOR} STREQUAL "VS2012") + set (CTEST_CMAKE_GENERATOR "Visual Studio 11 2012") set (SITE_OS_BITS "32") set (SITE_COMPILER_NAME "vs2012") set (SITE_COMPILER_VERSION "11") + else () + message (FATAL_ERROR "Invalid BUILD_GENERATOR must be - Unix, VS2017, or VS201764, VS2015, VS201564, VS2013, VS201364") endif () ## Set the following to unique id your computer ## set (CTEST_SITE "WIN7${BUILD_GENERATOR}.XXXX") -- cgit v0.12 From c1afe1c21aeeb927fd65c528150edc4121cdea31 Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Tue, 5 Sep 2017 13:29:59 -0500 Subject: Correct VS2017 references --- bin/release | 4 ++-- config/cmake/scripts/HDF5config.cmake | 18 +++++++++--------- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/bin/release b/bin/release index 09c033d..6358b0d 100755 --- a/bin/release +++ b/bin/release @@ -214,12 +214,12 @@ tar2cmakezip() fi # step 2: add batch file for building CMake on window - cp /mnt/scr1/pre-release/hdf5/CMake/build-VS2012-32.bat $cmziptmpdir - cp /mnt/scr1/pre-release/hdf5/CMake/build-VS2012-64.bat $cmziptmpdir cp /mnt/scr1/pre-release/hdf5/CMake/build-VS2013-32.bat $cmziptmpdir cp /mnt/scr1/pre-release/hdf5/CMake/build-VS2013-64.bat $cmziptmpdir cp /mnt/scr1/pre-release/hdf5/CMake/build-VS2015-32.bat $cmziptmpdir cp /mnt/scr1/pre-release/hdf5/CMake/build-VS2015-64.bat $cmziptmpdir + cp /mnt/scr1/pre-release/hdf5/CMake/build-VS2017-32.bat $cmziptmpdir + cp /mnt/scr1/pre-release/hdf5/CMake/build-VS2017-64.bat $cmziptmpdir # step 3: add SZIP.tar.gz, ZLib.tar.gz and cmake files cp /mnt/scr1/pre-release/hdf5/CMake/SZip.tar.gz $cmziptmpdir diff --git a/config/cmake/scripts/HDF5config.cmake b/config/cmake/scripts/HDF5config.cmake index 52f081f..68bd109 100755 --- a/config/cmake/scripts/HDF5config.cmake +++ b/config/cmake/scripts/HDF5config.cmake @@ -11,8 +11,8 @@ # ############################################################################################# ### ${CTEST_SCRIPT_ARG} is of the form OPTION=VALUE ### -### BUILD_GENERATOR required [Unix, VS2017, VS201764, VS2015, VS201564, VS2013, VS201364] ### -### ctest -S HDF5config.cmake,BUILD_GENERATOR=VS201264 -C Release -VV -O hdf5.log ### +### BUILD_GENERATOR required [Unix, VS2017, VS201764, VS2015, VS201564, VS2013, VS201364] ### +### ctest -S HDF5config.cmake,BUILD_GENERATOR=VS201764 -C Release -VV -O hdf5.log ### ############################################################################################# cmake_minimum_required (VERSION 3.2.2 FATAL_ERROR) @@ -21,13 +21,13 @@ cmake_minimum_required (VERSION 3.2.2 FATAL_ERROR) # ctest -S HDF5config.cmake,OPTION=VALUE -C Release -VV -O test.log # where valid options for OPTION are: # BUILD_GENERATOR - The cmake build generator: -# Unix * Unix Makefiles +# Unix * Unix Makefiles # VS2017 * Visual Studio 15 2017 -# VS201764 * Visual Studio 15 2017 Win64 -# VS2015 * Visual Studio 14 2015 -# VS201564 * Visual Studio 14 2015 Win64 -# VS2013 * Visual Studio 12 2013 -# VS201364 * Visual Studio 12 2013 Win64 +# VS201764 * Visual Studio 15 2017 Win64 +# VS2015 * Visual Studio 14 2015 +# VS201564 * Visual Studio 14 2015 Win64 +# VS2013 * Visual Studio 12 2013 +# VS201364 * Visual Studio 12 2013 Win64 # # INSTALLDIR - root folder where hdf5 is installed # CTEST_CONFIGURATION_TYPE - Release, Debug, etc @@ -65,7 +65,7 @@ endif () # build generator must be defined if (NOT DEFINED BUILD_GENERATOR) - message (FATAL_ERROR "BUILD_GENERATOR must be defined - Unix, VS2017, or VS201764, VS2015, VS201564, VS2013, VS201364") + message (FATAL_ERROR "BUILD_GENERATOR must be defined - Unix, VS2017, or VS201764, VS2015, VS201564, VS2013, VS201364") endif () ################################################################### -- cgit v0.12 From 5584938600b0237b90eb2870e93905b4e3365917 Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Wed, 6 Sep 2017 11:44:03 -0500 Subject: HDFFV-9988 Merge from develop --- config/cmake_ext_mod/FindMPI.cmake | 130 +++++++++++++++++++++++++------------ 1 file changed, 87 insertions(+), 43 deletions(-) diff --git a/config/cmake_ext_mod/FindMPI.cmake b/config/cmake_ext_mod/FindMPI.cmake index ff1ead2..f566ade 100644 --- a/config/cmake_ext_mod/FindMPI.cmake +++ b/config/cmake_ext_mod/FindMPI.cmake @@ -9,71 +9,78 @@ # The Message Passing Interface (MPI) is a library used to write # high-performance distributed-memory parallel applications, and is # typically deployed on a cluster. MPI is a standard interface (defined -# by the MPI forum) for which many implementations are available. All -# of them have somewhat different include paths, libraries to link -# against, etc., and this module tries to smooth out those differences. +# by the MPI forum) for which many implementations are available. # # Variables # ^^^^^^^^^ # # This module will set the following variables per language in your -# project, where is one of C, CXX, or Fortran: -# -# :: -# -# MPI__FOUND TRUE if FindMPI found MPI flags for -# MPI__COMPILER MPI Compiler wrapper for -# MPI__COMPILE_FLAGS Compilation flags for MPI programs -# MPI__INCLUDE_PATH Include path(s) for MPI header -# MPI__LINK_FLAGS Linking flags for MPI programs -# MPI__LIBRARIES All libraries to link MPI programs against +# project, where ```` is one of C, CXX, or Fortran: +# +# ``MPI__FOUND`` +# Variable indicating the MPI settings for ```` were found. +# ``MPI__COMPILER`` +# MPI Compiler wrapper for ````. +# ``MPI__COMPILE_FLAGS`` +# Compilation flags for MPI programs, separated by spaces. +# This is *not* a :ref:`;-list `. +# ``MPI__INCLUDE_PATH`` +# Include path(s) for MPI header. +# ``MPI__LINK_FLAGS`` +# Linker flags for MPI programs. +# ``MPI__LIBRARIES`` +# All libraries to link MPI programs against. +# +# Additionally, the following :prop_tgt:`IMPORTED` targets are defined: +# +# ``MPI::MPI_`` +# Target for using MPI from ````. # # Additionally, FindMPI sets the following variables for running MPI # programs from the command line: # -# :: -# -# MPIEXEC Executable for running MPI programs -# MPIEXEC_NUMPROC_FLAG Flag to pass to MPIEXEC before giving -# it the number of processors to run on -# MPIEXEC_PREFLAGS Flags to pass to MPIEXEC directly -# before the executable to run. -# MPIEXEC_POSTFLAGS Flags to pass to MPIEXEC after other flags +# ``MPIEXEC`` +# Executable for running MPI programs, if provided. +# ``MPIEXEC_NUMPROC_FLAG`` +# Flag to pass to ``MPIEXEC`` before giving it the number of processors to run on. +# ``MPIEXEC_MAX_NUMPROCS`` +# Number of MPI processors to utilize. Defaults to the number +# of processors detected on the host system. +# ``MPIEXEC_PREFLAGS`` +# Flags to pass to ``MPIEXEC`` directly before the executable to run. +# ``MPIEXEC_POSTFLAGS`` +# Flags to pass to ``MPIEXEC`` after other flags. # # Usage # ^^^^^ # -# To use this module, simply call FindMPI from a CMakeLists.txt file, or -# run ``find_package(MPI)``, then run CMake. If you are happy with the +# To use this module, call ``find_package(MPI)``. If you are happy with the # auto-detected configuration for your language, then you're done. If # not, you have two options: # -# :: -# -# 1. Set MPI__COMPILER to the MPI wrapper (mpicc, etc.) of your -# choice and reconfigure. FindMPI will attempt to determine all the -# necessary variables using THAT compiler's compile and link flags. -# 2. If this fails, or if your MPI implementation does not come with -# a compiler wrapper, then set both MPI__LIBRARIES and -# MPI__INCLUDE_PATH. You may also set any other variables -# listed above, but these two are required. This will circumvent -# autodetection entirely. +# 1. Set ``MPI__COMPILER`` to the MPI wrapper (e.g. ``mpicc``) of your +# choice and reconfigure. FindMPI will attempt to determine all the +# necessary variables using *that* compiler's compile and link flags. +# 2. If this fails, or if your MPI implementation does not come with +# a compiler wrapper, then set both ``MPI__LIBRARIES`` and +# ``MPI__INCLUDE_PATH``. You may also set any other variables +# listed above, but these two are required. This will circumvent +# autodetection entirely. # # When configuration is successful, ``MPI__COMPILER`` will be set to -# the compiler wrapper for , if it was found. ``MPI__FOUND`` +# the compiler wrapper for ````, if it was found. ``MPI__FOUND`` # and other variables above will be set if any MPI implementation was -# found for , regardless of whether a compiler was found. +# found for ````, regardless of whether a compiler was found. # # When using ``MPIEXEC`` to execute MPI applications, you should typically # use all of the ``MPIEXEC`` flags as follows: # # :: # -# ${MPIEXEC} ${MPIEXEC_NUMPROC_FLAG} PROCS +# ${MPIEXEC} ${MPIEXEC_NUMPROC_FLAG} ${MPIEXEC_MAX_NUMPROCS} # ${MPIEXEC_PREFLAGS} EXECUTABLE ${MPIEXEC_POSTFLAGS} ARGS # -# where ``PROCS`` is the number of processors on which to execute the -# program, ``EXECUTABLE`` is the MPI program, and ``ARGS`` are the arguments to +# where ``EXECUTABLE`` is the MPI program, and ``ARGS`` are the arguments to # pass to the MPI program. # # Backward Compatibility @@ -101,12 +108,12 @@ include(GetPrerequisites) # The compilers are detected in this order: # # 1. Try to find the most generic available MPI compiler, as this is usually set up by -# cluster admins. e.g., if plain old mpicc is available, we'll use it and assume it's +# cluster admins, e.g. if plain old mpicc is available, we'll use it and assume it's # the right compiler. # # 2. If a generic mpicc is NOT found, then we attempt to find one that matches # CMAKE__COMPILER_ID. e.g. if you are using XL compilers, we'll try to find mpixlc -# and company, but not mpiicc. This hopefully prevents toolchain mismatches. +# and company, but not mpiicc. This hopefully prevents toolchain mismatches. # # If you want to force a particular MPI compiler other than what we autodetect (e.g. if you # want to compile regular stuff with GNU and parallel stuff with Intel), you can always set @@ -175,6 +182,9 @@ if(WIN32) list(APPEND _MPI_PREFIX_PATH "[HKEY_LOCAL_MACHINE\\SOFTWARE\\MPICH\\SMPD;binary]/..") list(APPEND _MPI_PREFIX_PATH "[HKEY_LOCAL_MACHINE\\SOFTWARE\\MPICH2;Path]") list(APPEND _MPI_PREFIX_PATH "$ENV{ProgramW6432}/MPICH2/") + # INTEL MPI + list(APPEND _MPI_PREFIX_PATH "$ENV{I_MPI_ROOT}/intel64/") + endif() # Build a list of prefixes to search for MPI. @@ -495,7 +505,7 @@ function (interrogate_mpi_compiler lang try_libs) set(MPI_${lang}_LIBRARIES ${MPI_LIBRARIES_WORK} CACHE STRING "MPI ${lang} libraries to link against" FORCE) mark_as_advanced(MPI_${lang}_COMPILE_FLAGS MPI_${lang}_INCLUDE_PATH MPI_${lang}_LINK_FLAGS MPI_${lang}_LIBRARIES) - # clear out our temporary lib/header detectionv variable here. + # clear out our temporary lib/header detection variable here. set(MPI_LIB "MPI_LIB-NOTFOUND" CACHE INTERNAL "Scratch variable for MPI lib detection" FORCE) set(MPI_HEADER_PATH "MPI_HEADER_PATH-NOTFOUND" CACHE INTERNAL "Scratch variable for MPI header detection" FORCE) endif() @@ -565,10 +575,21 @@ find_program(MPIEXEC get_filename_component(_MPI_BASE_DIR "${MPIEXEC}" PATH) get_filename_component(_MPI_BASE_DIR "${_MPI_BASE_DIR}" PATH) -set(MPIEXEC_NUMPROC_FLAG "-np" CACHE STRING "Flag used by MPI to specify the number of processes for MPIEXEC; the next option will be the number of processes.") +# According to the MPI standard, section 8.8 -n is a guaranteed, and the only guaranteed way to +# launch an MPI process using mpiexec if such a program exists. +set(MPIEXEC_NUMPROC_FLAG "-n" CACHE STRING "Flag used by MPI to specify the number of processes for MPIEXEC; the next option will be the number of processes.") set(MPIEXEC_PREFLAGS "" CACHE STRING "These flags will be directly before the executable that is being run by MPIEXEC.") set(MPIEXEC_POSTFLAGS "" CACHE STRING "These flags will come after all flags given to MPIEXEC.") -set(MPIEXEC_MAX_NUMPROCS "2" CACHE STRING "Maximum number of processors available to run MPI applications.") + +# Set the number of processes to the processor count and the previous default +# of 2 if that couldn't be determined. +include(${CMAKE_ROOT}/Modules/ProcessorCount.cmake) +ProcessorCount(_MPIEXEC_NUMPROCS) +if("${_MPIEXEC_NUMPROCS}" EQUAL "0") + set(_MPIEXEC_NUMPROCS 2) +endif() +set(MPIEXEC_MAX_NUMPROCS "${_MPIEXEC_NUMPROCS}" CACHE STRING "Maximum number of processors available to run MPI applications.") +unset(_MPIEXEC_NUMPROCS) mark_as_advanced(MPIEXEC MPIEXEC_NUMPROC_FLAG MPIEXEC_PREFLAGS MPIEXEC_POSTFLAGS MPIEXEC_MAX_NUMPROCS) @@ -643,6 +664,28 @@ foreach (lang C CXX Fortran) else() find_package_handle_standard_args(MPI_${lang} DEFAULT_MSG MPI_${lang}_LIBRARIES MPI_${lang}_INCLUDE_PATH) endif() + + if(MPI_${lang}_FOUND) + if(NOT TARGET MPI::MPI_${lang}) + add_library(MPI::MPI_${lang} INTERFACE IMPORTED) + endif() + if(MPI_${lang}_COMPILE_FLAGS) + separate_arguments(_MPI_${lang}_COMPILE_OPTIONS NATIVE_COMMAND "${MPI_${lang}_COMPILE_FLAGS}") + set_property(TARGET MPI::MPI_${lang} PROPERTY + INTERFACE_COMPILE_OPTIONS "${_MPI_${lang}_COMPILE_OPTIONS}") + endif() + + unset(_MPI_${lang}_LINK_LINE) + if(MPI_${lang}_LINK_FLAGS) + list(APPEND _MPI_${lang}_LINK_LINE "${MPI_${lang}_LINK_FLAGS}") + endif() + list(APPEND _MPI_${lang}_LINK_LINE "${MPI_${lang}_LIBRARIES}") + set_property(TARGET MPI::MPI_${lang} PROPERTY + INTERFACE_LINK_LIBRARIES "${_MPI_${lang}_LINK_LINE}") + + set_property(TARGET MPI::MPI_${lang} PROPERTY + INTERFACE_INCLUDE_DIRECTORIES "${MPI_${lang}_INCLUDE_PATH}") + endif() endif() endforeach() @@ -682,6 +725,7 @@ if (MPI_NUMLIBS GREATER 1) else() set(MPI_EXTRA_LIBRARY "MPI_EXTRA_LIBRARY-NOTFOUND" CACHE STRING "Extra MPI libraries to link against" FORCE) endif() +mark_as_advanced(MPI_LIBRARY MPI_EXTRA_LIBRARY) #============================================================================= # unset these vars to cleanup namespace -- cgit v0.12 From a8dd6f697319f332ffede33e7585a7071976db7b Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Thu, 7 Sep 2017 09:55:53 -0500 Subject: HDFFV-9774 - add enable-error-stack, Merge from develop --- MANIFEST | 12 + release_docs/RELEASE.txt | 11 +- tools/lib/h5diff.c | 281 +++++++--------- tools/lib/h5tools_error.h | 8 + tools/src/h5copy/h5copy.c | 2 + tools/src/h5diff/h5diff_common.c | 432 ++++++++++++------------- tools/src/h5diff/h5diff_main.c | 27 +- tools/src/h5diff/ph5diff_main.c | 2 + tools/src/h5repack/h5repack_copy.c | 1 + tools/test/h5diff/CMakeTests.cmake | 109 +++++++ tools/test/h5diff/testfiles/h5diff_10.txt | 2 + tools/test/h5diff/testfiles/h5diff_454_ERR.err | 4 + tools/test/h5diff/testfiles/h5diff_454_ERR.txt | 6 + tools/test/h5diff/testfiles/h5diff_455_ERR.err | 4 + tools/test/h5diff/testfiles/h5diff_455_ERR.txt | 6 + tools/test/h5diff/testfiles/h5diff_457_ERR.err | 4 + tools/test/h5diff/testfiles/h5diff_457_ERR.txt | 6 + tools/test/h5diff/testfiles/h5diff_458_ERR.err | 4 + tools/test/h5diff/testfiles/h5diff_458_ERR.txt | 6 + tools/test/h5diff/testfiles/h5diff_459_ERR.err | 4 + tools/test/h5diff/testfiles/h5diff_459_ERR.txt | 6 + tools/test/h5diff/testfiles/h5diff_600.txt | 2 + tools/test/h5diff/testfiles/h5diff_601_ERR.err | 4 + tools/test/h5diff/testfiles/h5diff_601_ERR.txt | 6 + tools/test/h5diff/testfiles/h5diff_603.txt | 2 + tools/test/h5diff/testfiles/h5diff_606.txt | 2 + tools/test/h5diff/testfiles/h5diff_612.txt | 2 + tools/test/h5diff/testfiles/h5diff_615.txt | 2 + tools/test/h5diff/testfiles/h5diff_621.txt | 2 + tools/test/h5diff/testfiles/h5diff_622.txt | 2 + tools/test/h5diff/testfiles/h5diff_623.txt | 2 + tools/test/h5diff/testfiles/h5diff_624.txt | 2 + tools/test/h5dump/h5dumpgentest.c | 4 +- 33 files changed, 573 insertions(+), 396 deletions(-) create mode 100644 tools/test/h5diff/testfiles/h5diff_454_ERR.err create mode 100644 tools/test/h5diff/testfiles/h5diff_454_ERR.txt create mode 100644 tools/test/h5diff/testfiles/h5diff_455_ERR.err create mode 100644 tools/test/h5diff/testfiles/h5diff_455_ERR.txt create mode 100644 tools/test/h5diff/testfiles/h5diff_457_ERR.err create mode 100644 tools/test/h5diff/testfiles/h5diff_457_ERR.txt create mode 100644 tools/test/h5diff/testfiles/h5diff_458_ERR.err create mode 100644 tools/test/h5diff/testfiles/h5diff_458_ERR.txt create mode 100644 tools/test/h5diff/testfiles/h5diff_459_ERR.err create mode 100644 tools/test/h5diff/testfiles/h5diff_459_ERR.txt create mode 100644 tools/test/h5diff/testfiles/h5diff_601_ERR.err create mode 100644 tools/test/h5diff/testfiles/h5diff_601_ERR.txt diff --git a/MANIFEST b/MANIFEST index 31dce81..2ec4e34 100644 --- a/MANIFEST +++ b/MANIFEST @@ -2197,6 +2197,8 @@ ./tools/test/h5diff/testfiles/h5diff_63.txt ./tools/test/h5diff/testfiles/h5diff_600.txt ./tools/test/h5diff/testfiles/h5diff_601.txt +./tools/test/h5diff/testfiles/h5diff_601_ERR.err +./tools/test/h5diff/testfiles/h5diff_601_ERR.txt ./tools/test/h5diff/testfiles/h5diff_603.txt ./tools/test/h5diff/testfiles/h5diff_604.txt ./tools/test/h5diff/testfiles/h5diff_605.txt @@ -2303,11 +2305,21 @@ ./tools/test/h5diff/testfiles/h5diff_452.txt ./tools/test/h5diff/testfiles/h5diff_453.txt ./tools/test/h5diff/testfiles/h5diff_454.txt +./tools/test/h5diff/testfiles/h5diff_454_ERR.err +./tools/test/h5diff/testfiles/h5diff_454_ERR.txt ./tools/test/h5diff/testfiles/h5diff_455.txt +./tools/test/h5diff/testfiles/h5diff_455_ERR.err +./tools/test/h5diff/testfiles/h5diff_455_ERR.txt ./tools/test/h5diff/testfiles/h5diff_456.txt ./tools/test/h5diff/testfiles/h5diff_457.txt +./tools/test/h5diff/testfiles/h5diff_457_ERR.err +./tools/test/h5diff/testfiles/h5diff_457_ERR.txt ./tools/test/h5diff/testfiles/h5diff_458.txt +./tools/test/h5diff/testfiles/h5diff_458_ERR.err +./tools/test/h5diff/testfiles/h5diff_458_ERR.txt ./tools/test/h5diff/testfiles/h5diff_459.txt +./tools/test/h5diff/testfiles/h5diff_459_ERR.err +./tools/test/h5diff/testfiles/h5diff_459_ERR.txt ./tools/test/h5diff/testfiles/h5diff_465.txt ./tools/test/h5diff/testfiles/h5diff_466.txt ./tools/test/h5diff/testfiles/h5diff_467.txt diff --git a/release_docs/RELEASE.txt b/release_docs/RELEASE.txt index 1ead4c7..3bba0d2 100644 --- a/release_docs/RELEASE.txt +++ b/release_docs/RELEASE.txt @@ -148,7 +148,16 @@ New Features Tools: ------ - - + - h5diff + + h5diff has new option enable-error-stack. + + Updated h5diff with the --enable-error-stack argument, which + enables the display of the hdf5 error stack. This completes the + improvement to the main tools; h5copy, h5diff, h5dump, h5ls and + h5repack. + + (ADB - 2017/08/30, HDFFV-9774) High-Level APIs: --------------- diff --git a/tools/lib/h5diff.c b/tools/lib/h5diff.c index 9da5b6b..0be6f5c 100644 --- a/tools/lib/h5diff.c +++ b/tools/lib/h5diff.c @@ -449,32 +449,27 @@ static herr_t trav_grp_objs(const char *path, const H5O_info_t *oinfo, static herr_t trav_grp_symlinks(const char *path, const H5L_info_t *linfo, void *udata) { - trav_info_t *tinfo = (trav_info_t *)udata; - diff_opt_t *opts = (diff_opt_t *)tinfo->opts; - int ret; + int ret_value = 0; + trav_info_t *tinfo = (trav_info_t *)udata; + diff_opt_t *opts = (diff_opt_t *)tinfo->opts; h5tool_link_info_t lnk_info; - const char *ext_fname; - const char *ext_path; + const char *ext_fname; + const char *ext_path; /* init linkinfo struct */ HDmemset(&lnk_info, 0, sizeof(h5tool_link_info_t)); - if (!opts->follow_links) - { + if (!opts->follow_links) { trav_info_visit_lnk(path, linfo, tinfo); goto done; } - switch(linfo->type) - { + switch(linfo->type) { case H5L_TYPE_SOFT: - ret = H5tools_get_symlink_info(tinfo->fid, path, &lnk_info, opts->follow_links); - /* error */ - if (ret < 0) + if((ret_value = H5tools_get_symlink_info(tinfo->fid, path, &lnk_info, opts->follow_links)) < 0) goto done; /* no dangling link option given and detect dangling link */ - else if (ret == 0) - { + else if (ret_value == 0) { tinfo->symlink_visited.dangle_link = TRUE; trav_info_visit_lnk(path, linfo, tinfo); if (opts->no_dangle_links) @@ -491,22 +486,18 @@ static herr_t trav_grp_symlinks(const char *path, const H5L_info_t *linfo, goto done; if(h5trav_visit(tinfo->fid, path, TRUE, TRUE, - trav_grp_objs,trav_grp_symlinks, tinfo) < 0) - { + trav_grp_objs,trav_grp_symlinks, tinfo) < 0) { parallel_print("Error: Could not get file contents\n"); opts->err_stat = 1; - goto done; + HGOTO_ERROR(opts->err_stat, H5E_tools_min_id_g, "Error: Could not get file contents"); } break; case H5L_TYPE_EXTERNAL: - ret = H5tools_get_symlink_info(tinfo->fid, path, &lnk_info, opts->follow_links); - /* error */ - if (ret < 0) + if ((ret_value = H5tools_get_symlink_info(tinfo->fid, path, &lnk_info, opts->follow_links)) < 0) goto done; /* no dangling link option given and detect dangling link */ - else if (ret == 0) - { + else if (ret_value == 0) { tinfo->symlink_visited.dangle_link = TRUE; trav_info_visit_lnk(path, linfo, tinfo); if (opts->no_dangle_links) @@ -526,11 +517,10 @@ static herr_t trav_grp_symlinks(const char *path, const H5L_info_t *linfo, goto done; if(h5trav_visit(tinfo->fid, path, TRUE, TRUE, - trav_grp_objs,trav_grp_symlinks, tinfo) < 0) - { + trav_grp_objs,trav_grp_symlinks, tinfo) < 0) { parallel_print("Error: Could not get file contents\n"); opts->err_stat = 1; - goto done; + HGOTO_ERROR(opts->err_stat, H5E_tools_min_id_g, "Error: Could not get file contents\n"); } break; @@ -540,7 +530,7 @@ static herr_t trav_grp_symlinks(const char *path, const H5L_info_t *linfo, default: parallel_print("Error: Invalid link type\n"); opts->err_stat = 1; - goto done; + HGOTO_ERROR(opts->err_stat, H5E_tools_min_id_g, "Error: Invalid link type"); break; } /* end of switch */ @@ -569,8 +559,9 @@ hsize_t h5diff(const char *fname1, const char *fname2, const char *objname1, const char *objname2, - diff_opt_t *options) + diff_opt_t *opts) { + int ret_value = 0; hid_t file1_id = (-1); hid_t file2_id = (-1); char filenames[2][MAX_FILENAME]; @@ -612,10 +603,10 @@ hsize_t h5diff(const char *fname1, /*------------------------------------------------------------------------- * check invalid combination of options *-----------------------------------------------------------------------*/ - if(!is_valid_options(options)) - goto out; + if(!is_valid_options(opts)) + goto done; - options->cmn_objs = 1; /* eliminate warning */ + opts->cmn_objs = 1; /* eliminate warning */ /*------------------------------------------------------------------------- * open the files first; if they are not valid, no point in continuing @@ -626,20 +617,18 @@ hsize_t h5diff(const char *fname1, H5E_BEGIN_TRY { /* open file 1 */ - if((file1_id = h5tools_fopen(fname1, H5F_ACC_RDONLY, H5P_DEFAULT, NULL, NULL, (size_t)0)) < 0) - { + if((file1_id = h5tools_fopen(fname1, H5F_ACC_RDONLY, H5P_DEFAULT, NULL, NULL, (size_t)0)) < 0) { parallel_print("h5diff: <%s>: unable to open file\n", fname1); - options->err_stat = 1; - goto out; + opts->err_stat = 1; + goto done; } /* end if */ /* open file 2 */ - if((file2_id = h5tools_fopen(fname2, H5F_ACC_RDONLY, H5P_DEFAULT, NULL, NULL, (size_t)0)) < 0) - { + if((file2_id = h5tools_fopen(fname2, H5F_ACC_RDONLY, H5P_DEFAULT, NULL, NULL, (size_t)0)) < 0) { parallel_print("h5diff: <%s>: unable to open file\n", fname2); - options->err_stat = 1; - goto out; + opts->err_stat = 1; + goto done; } /* end if */ /* enable error reporting */ } H5E_END_TRY; @@ -653,15 +642,13 @@ hsize_t h5diff(const char *fname1, h5difftrace("trav_info_init initialized\n"); /* if any object is specified */ - if (objname1) - { + if (objname1) { /* make the given object1 fullpath, start with "/" */ - if (HDstrncmp(objname1, "/", 1)) - { + if (HDstrncmp(objname1, "/", 1)) { #ifdef H5_HAVE_ASPRINTF /* Use the asprintf() routine, since it does what we're trying to do below */ if(HDasprintf(&obj1fullname, "/%s", objname1) < 0) - goto out; + goto done; #else /* H5_HAVE_ASPRINTF */ /* (malloc 2 more for "/" and end-of-line) */ obj1fullname = (char*)HDmalloc(HDstrlen(objname1) + 2); @@ -673,12 +660,11 @@ hsize_t h5diff(const char *fname1, obj1fullname = HDstrdup(objname1); /* make the given object2 fullpath, start with "/" */ - if (HDstrncmp(objname2, "/", 1)) - { + if (HDstrncmp(objname2, "/", 1)) { #ifdef H5_HAVE_ASPRINTF /* Use the asprintf() routine, since it does what we're trying to do below */ if(HDasprintf(&obj2fullname, "/%s", objname2) < 0) - goto out; + goto done; #else /* H5_HAVE_ASPRINTF */ /* (malloc 2 more for "/" and end-of-line) */ obj2fullname = (char*)HDmalloc(HDstrlen(objname2) + 2); @@ -693,24 +679,21 @@ hsize_t h5diff(const char *fname1, * check if obj1 is root, group, single object or symlink */ h5difftrace("h5diff check if obj1 is root, group, single object or symlink\n"); - if(!HDstrcmp(obj1fullname, "/")) - { + if(!HDstrcmp(obj1fullname, "/")) { obj1type = H5TRAV_TYPE_GROUP; } - else - { + else { /* check if link itself exist */ - if(H5Lexists(file1_id, obj1fullname, H5P_DEFAULT) <= 0) - { + if(H5Lexists(file1_id, obj1fullname, H5P_DEFAULT) <= 0) { parallel_print ("Object <%s> could not be found in <%s>\n", obj1fullname, fname1); - options->err_stat = 1; - goto out; + opts->err_stat = 1; + HGOTO_ERROR(opts->err_stat, H5E_tools_min_id_g, "Error: Object could not be found"); } /* get info from link */ - if(H5Lget_info(file1_id, obj1fullname, &src_linfo1, H5P_DEFAULT) < 0) - { + if(H5Lget_info(file1_id, obj1fullname, &src_linfo1, H5P_DEFAULT) < 0) { parallel_print("Unable to get link info from <%s>\n", obj1fullname); - goto out; + H5TOOLS_INFO(H5E_tools_min_id_g, "Unable to get link info\n"); + goto done; } info1_lp = info1_obj; @@ -718,18 +701,16 @@ hsize_t h5diff(const char *fname1, /* * check the type of specified path for hard and symbolic links */ - if(src_linfo1.type == H5L_TYPE_HARD) - { + if(src_linfo1.type == H5L_TYPE_HARD) { size_t idx; /* optional data pass */ - info1_obj->opts = (diff_opt_t*)options; + info1_obj->opts = (diff_opt_t*)opts; - if(H5Oget_info_by_name(file1_id, obj1fullname, &oinfo1, H5P_DEFAULT) < 0) - { + if(H5Oget_info_by_name(file1_id, obj1fullname, &oinfo1, H5P_DEFAULT) < 0) { parallel_print("Error: Could not get file contents\n"); - options->err_stat = 1; - goto out; + opts->err_stat = 1; + HGOTO_ERROR(opts->err_stat, H5E_tools_min_id_g, "Error: Could not get file contents"); } obj1type = (h5trav_type_t)oinfo1.type; trav_info_add(info1_obj, obj1fullname, obj1type); @@ -737,13 +718,11 @@ hsize_t h5diff(const char *fname1, info1_obj->paths[idx].objno = oinfo1.addr; info1_obj->paths[idx].fileno = oinfo1.fileno; } - else if (src_linfo1.type == H5L_TYPE_SOFT) - { + else if (src_linfo1.type == H5L_TYPE_SOFT) { obj1type = H5TRAV_TYPE_LINK; trav_info_add(info1_obj, obj1fullname, obj1type); } - else if (src_linfo1.type == H5L_TYPE_EXTERNAL) - { + else if (src_linfo1.type == H5L_TYPE_EXTERNAL) { obj1type = H5TRAV_TYPE_UDLINK; trav_info_add(info1_obj, obj1fullname, obj1type); } @@ -753,24 +732,20 @@ hsize_t h5diff(const char *fname1, * check if obj2 is root, group, single object or symlink */ h5difftrace("h5diff check if obj2 is root, group, single object or symlink\n"); - if(!HDstrcmp(obj2fullname, "/")) - { + if(!HDstrcmp(obj2fullname, "/")) { obj2type = H5TRAV_TYPE_GROUP; } - else - { + else { /* check if link itself exist */ - if(H5Lexists(file2_id, obj2fullname, H5P_DEFAULT) <= 0) - { + if(H5Lexists(file2_id, obj2fullname, H5P_DEFAULT) <= 0) { parallel_print ("Object <%s> could not be found in <%s>\n", obj2fullname, fname2); - options->err_stat = 1; - goto out; + opts->err_stat = 1; + HGOTO_ERROR(opts->err_stat, H5E_tools_min_id_g, "Error: Object could not be found"); } /* get info from link */ - if(H5Lget_info(file2_id, obj2fullname, &src_linfo2, H5P_DEFAULT) < 0) - { + if(H5Lget_info(file2_id, obj2fullname, &src_linfo2, H5P_DEFAULT) < 0) { parallel_print("Unable to get link info from <%s>\n", obj2fullname); - goto out; + goto done; } info2_lp = info2_obj; @@ -778,18 +753,16 @@ hsize_t h5diff(const char *fname1, /* * check the type of specified path for hard and symbolic links */ - if(src_linfo2.type == H5L_TYPE_HARD) - { + if(src_linfo2.type == H5L_TYPE_HARD) { size_t idx; /* optional data pass */ - info2_obj->opts = (diff_opt_t*)options; + info2_obj->opts = (diff_opt_t*)opts; - if(H5Oget_info_by_name(file2_id, obj2fullname, &oinfo2, H5P_DEFAULT) < 0) - { + if(H5Oget_info_by_name(file2_id, obj2fullname, &oinfo2, H5P_DEFAULT) < 0) { parallel_print("Error: Could not get file contents\n"); - options->err_stat = 1; - goto out; + opts->err_stat = 1; + HGOTO_ERROR(opts->err_stat, H5E_tools_min_id_g, "Error: Could not get file contents"); } obj2type = (h5trav_type_t)oinfo2.type; trav_info_add(info2_obj, obj2fullname, obj2type); @@ -797,21 +770,18 @@ hsize_t h5diff(const char *fname1, info2_obj->paths[idx].objno = oinfo2.addr; info2_obj->paths[idx].fileno = oinfo2.fileno; } - else if (src_linfo2.type == H5L_TYPE_SOFT) - { + else if (src_linfo2.type == H5L_TYPE_SOFT) { obj2type = H5TRAV_TYPE_LINK; trav_info_add(info2_obj, obj2fullname, obj2type); } - else if (src_linfo2.type == H5L_TYPE_EXTERNAL) - { + else if (src_linfo2.type == H5L_TYPE_EXTERNAL) { obj2type = H5TRAV_TYPE_UDLINK; trav_info_add(info2_obj, obj2fullname, obj2type); } } } /* if no object specified */ - else - { + else { h5difftrace("h5diff no object specified\n"); /* set root group */ obj1fullname = (char*)HDstrdup("/"); @@ -822,16 +792,15 @@ hsize_t h5diff(const char *fname1, /* get any symbolic links info */ - l_ret1 = H5tools_get_symlink_info(file1_id, obj1fullname, &trg_linfo1, options->follow_links); - l_ret2 = H5tools_get_symlink_info(file2_id, obj2fullname, &trg_linfo2, options->follow_links); + l_ret1 = H5tools_get_symlink_info(file1_id, obj1fullname, &trg_linfo1, opts->follow_links); + l_ret2 = H5tools_get_symlink_info(file2_id, obj2fullname, &trg_linfo2, opts->follow_links); /*--------------------------------------------- * check for following symlinks */ - if (options->follow_links) - { + if (opts->follow_links) { /* pass how to handle printing warning to linkinfo option */ - if(print_warn(options)) + if(print_warn(opts)) trg_linfo1.opt.msg_mode = trg_linfo2.opt.msg_mode = 1; /*------------------------------- @@ -839,37 +808,31 @@ hsize_t h5diff(const char *fname1, */ h5difftrace("h5diff check symbolic link (object1)\n"); /* dangling link */ - if (l_ret1 == 0) - { + if (l_ret1 == 0) { h5difftrace("h5diff ... dangling link\n"); - if (options->no_dangle_links) - { - /* treat dangling link is error */ - if(options->m_verbose) + if (opts->no_dangle_links) { + /* treat dangling link as error */ + if(opts->m_verbose) parallel_print("Warning: <%s> is a dangling link.\n", obj1fullname); - options->err_stat = 1; - goto out; + opts->err_stat = 1; + HGOTO_ERROR(opts->err_stat, H5E_tools_min_id_g, "Error: treat dangling link as error"); } - else - { - if(options->m_verbose) + else { + if(opts->m_verbose) parallel_print("obj1 <%s> is a dangling link.\n", obj1fullname); - if (l_ret1 != 0 || l_ret2 != 0) - { + if (l_ret1 != 0 || l_ret2 != 0) { nfound++; print_found(nfound); - goto out; + goto done; } } } - else if(l_ret1 < 0) /* fail */ - { + else if(l_ret1 < 0) { /* fail */ parallel_print ("Object <%s> could not be found in <%s>\n", obj1fullname, fname1); - options->err_stat = 1; - goto out; + opts->err_stat = 1; + HGOTO_ERROR(opts->err_stat, H5E_tools_min_id_g, "Error: Object could not be found"); } - else if(l_ret1 != 2) /* symbolic link */ - { + else if(l_ret1 != 2) { /* symbolic link */ obj1type = (h5trav_type_t)trg_linfo1.trg_type; h5difftrace("h5diff ... ... trg_linfo1.trg_type == H5L_TYPE_HARD\n"); if (info1_lp != NULL) { @@ -888,37 +851,31 @@ hsize_t h5diff(const char *fname1, */ h5difftrace("h5diff check symbolic link (object2)\n"); /* dangling link */ - if (l_ret2 == 0) - { + if (l_ret2 == 0) { h5difftrace("h5diff ... dangling link\n"); - if (options->no_dangle_links) - { - /* treat dangling link is error */ - if(options->m_verbose) + if (opts->no_dangle_links) { + /* treat dangling link as error */ + if(opts->m_verbose) parallel_print("Warning: <%s> is a dangling link.\n", obj2fullname); - options->err_stat = 1; - goto out; + opts->err_stat = 1; + HGOTO_ERROR(opts->err_stat, H5E_tools_min_id_g, "Error: treat dangling link as error"); } - else - { - if(options->m_verbose) + else { + if(opts->m_verbose) parallel_print("obj2 <%s> is a dangling link.\n", obj2fullname); - if (l_ret1 != 0 || l_ret2 != 0) - { + if (l_ret1 != 0 || l_ret2 != 0) { nfound++; print_found(nfound); - goto out; + goto done; } } } - else if(l_ret2 < 0) /* fail */ - { + else if(l_ret2 < 0) { /* fail */ parallel_print ("Object <%s> could not be found in <%s>\n", obj2fullname, fname2); - options->err_stat = 1; - goto out; + opts->err_stat = 1; + HGOTO_ERROR(opts->err_stat, H5E_tools_min_id_g, "Error: Object could not be found"); } - else if(l_ret2 != 2) /* symbolic link */ - { + else if(l_ret2 != 2) { /* symbolic link */ obj2type = (h5trav_type_t)trg_linfo2.trg_type; if (info2_lp != NULL) { size_t idx = info2_lp->nused - 1; @@ -939,32 +896,29 @@ hsize_t h5diff(const char *fname1, * comparing details of same objects. */ - if(!(options->m_verbose || options->m_report)) - { - h5difftrace("h5diff NOT (options->m_verbose || options->m_report)\n"); + if(!(opts->m_verbose || opts->m_report)) { + h5difftrace("h5diff NOT (opts->m_verbose || opts->m_report)\n"); /* if no danglink links */ if ( l_ret1 > 0 && l_ret2 > 0 ) if (h5tools_is_obj_same(file1_id, obj1fullname, file2_id, obj2fullname)!=0) - goto out; + goto done; } both_objs_grp = (obj1type == H5TRAV_TYPE_GROUP && obj2type == H5TRAV_TYPE_GROUP); - if (both_objs_grp) - { + if (both_objs_grp) { h5difftrace("h5diff both_objs_grp TRUE\n"); /* * traverse group1 */ trav_info_init(fname1, file1_id, &info1_grp); /* optional data pass */ - info1_grp->opts = (diff_opt_t*)options; + info1_grp->opts = (diff_opt_t*)opts; if(h5trav_visit(file1_id, obj1fullname, TRUE, TRUE, - trav_grp_objs, trav_grp_symlinks, info1_grp) < 0) - { + trav_grp_objs, trav_grp_symlinks, info1_grp) < 0) { parallel_print("Error: Could not get file contents\n"); - options->err_stat = 1; - goto out; + opts->err_stat = 1; + HGOTO_ERROR(opts->err_stat, H5E_tools_min_id_g, "Error: Could not get file contents"); } info1_lp = info1_grp; @@ -973,25 +927,22 @@ hsize_t h5diff(const char *fname1, */ trav_info_init(fname2, file2_id, &info2_grp); /* optional data pass */ - info2_grp->opts = (diff_opt_t*)options; + info2_grp->opts = (diff_opt_t*)opts; if(h5trav_visit(file2_id, obj2fullname, TRUE, TRUE, - trav_grp_objs, trav_grp_symlinks, info2_grp) < 0) - { + trav_grp_objs, trav_grp_symlinks, info2_grp) < 0) { parallel_print("Error: Could not get file contents\n"); - options->err_stat = 1; - goto out; - } /* end if */ + opts->err_stat = 1; + HGOTO_ERROR(opts->err_stat, H5E_tools_min_id_g, "Error: Could not get file contents"); + } /* end if */ info2_lp = info2_grp; } #ifdef H5_HAVE_PARALLEL - if(g_Parallel) - { + if(g_Parallel) { int i; - if((HDstrlen(fname1) > MAX_FILENAME) || (HDstrlen(fname2) > MAX_FILENAME)) - { + if((HDstrlen(fname1) > MAX_FILENAME) || (HDstrlen(fname2) > MAX_FILENAME)) { HDfprintf(stderr, "The parallel diff only supports path names up to %d characters\n", MAX_FILENAME); MPI_Abort(MPI_COMM_WORLD, 0); } /* end if */ @@ -1007,13 +958,12 @@ hsize_t h5diff(const char *fname1, /* process the objects */ build_match_list (obj1fullname, info1_lp, obj2fullname, info2_lp, - &match_list, options); - if (both_objs_grp) - { + &match_list, opts); + if (both_objs_grp) { /*------------------------------------------------------ * print the list */ - if(options->m_verbose) + if(opts->m_verbose) { unsigned u; @@ -1024,8 +974,7 @@ hsize_t h5diff(const char *fname1, else parallel_print("file1 file2\n"); parallel_print("---------------------------------------\n"); - for(u = 0; u < match_list->nobjs; u++) - { + for(u = 0; u < match_list->nobjs; u++) { char c1, c2; c1 = (match_list->objs[u].flags[0]) ? 'x' : ' '; c2 = (match_list->objs[u].flags[1]) ? 'x' : ' '; @@ -1036,9 +985,9 @@ hsize_t h5diff(const char *fname1, } nfound = diff_match(file1_id, obj1fullname, info1_lp, file2_id, obj2fullname, info2_lp, - match_list, options); + match_list, opts); -out: +done: #ifdef H5_HAVE_PARALLEL if(g_Parallel) /* All done at this point, let tasks know that they won't be needed */ diff --git a/tools/lib/h5tools_error.h b/tools/lib/h5tools_error.h index 136c5ed..a556b0a 100644 --- a/tools/lib/h5tools_error.h +++ b/tools/lib/h5tools_error.h @@ -62,6 +62,14 @@ H5TOOLS_DLLVAR hid_t H5E_tools_min_id_g; /* + * H5TOOLS_INFO macro, used to facilitate error reporting . The arguments are the major + * error number, the minor error number, and a description of the error. + */ +#define H5TOOLS_INFO(min_id, str) { \ + H5Epush2(H5tools_ERR_STACK_g, __FILE__, FUNC, __LINE__, H5tools_ERR_CLS_g, H5E_tools_g, min_id, str); \ +} + +/* * HERROR macro, used to facilitate error reporting . The arguments are the major * error number, the minor error number, and a description of the error. */ diff --git a/tools/src/h5copy/h5copy.c b/tools/src/h5copy/h5copy.c index be84b26..1d15d12 100644 --- a/tools/src/h5copy/h5copy.c +++ b/tools/src/h5copy/h5copy.c @@ -101,6 +101,8 @@ usage (void) PRINTVALSTREAM(rawoutstream, " -p, --parents No error if existing, make parent groups as needed\n"); PRINTVALSTREAM(rawoutstream, " -v, --verbose Print information about OBJECTS and OPTIONS\n"); PRINTVALSTREAM(rawoutstream, " -V, --version Print version number and exit\n"); + PRINTVALSTREAM(rawoutstream, " --enable-error-stack\n"); + PRINTVALSTREAM(rawoutstream, " Prints messages from the HDF5 error stack as they occur.\n"); PRINTVALSTREAM(rawoutstream, " -f, --flag Flag type\n\n"); PRINTVALSTREAM(rawoutstream, " Flag type is one of the following strings:\n\n"); PRINTVALSTREAM(rawoutstream, " shallow Copy only immediate members for groups\n\n"); diff --git a/tools/src/h5diff/h5diff_common.c b/tools/src/h5diff/h5diff_common.c index 1069a31..e4696c0 100644 --- a/tools/src/h5diff/h5diff_common.c +++ b/tools/src/h5diff/h5diff_common.c @@ -17,15 +17,15 @@ #include "h5tools.h" #include "h5tools_utils.h" -static int check_n_input( const char* ); -static int check_p_input( const char* ); -static int check_d_input( const char* ); +static int check_n_input(const char*); +static int check_p_input(const char*); +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:Nc"; +static const char *s_opts = "hVrv:qn:d:p:NcelxE:S"; static struct long_options l_opts[] = { { "help", no_arg, 'h' }, { "version", no_arg, 'V' }, @@ -41,6 +41,7 @@ static struct long_options l_opts[] = { { "follow-symlinks", no_arg, 'l' }, { "no-dangling-links", no_arg, 'x' }, { "exclude-path", require_arg, 'E' }, + { "enable-error-stack", no_arg, 'S' }, { NULL, 0, '\0' } }; @@ -60,8 +61,7 @@ static void check_options(diff_opt_t* options) /* check between -d , -p, --use-system-epsilon. * These options are mutually exclusive. */ - if ((options->d + options->p + options->use_system_epsilon) > 1) - { + if ((options->d + options->p + options->use_system_epsilon) > 1) { printf("%s error: -d, -p and --use-system-epsilon options are mutually-exclusive;\n", PROGRAMNAME); printf("use no more than one.\n"); printf("Try '-h' or '--help' option for more information or see the %s entry in the 'HDF5 Reference Manual'.\n", PROGRAMNAME); @@ -110,75 +110,79 @@ void parse_command_line(int argc, exclude_head = NULL; /* parse command line options */ - while ((opt = get_option(argc, argv, s_opts, l_opts)) != EOF) - { - switch ((char)opt) - { + while ((opt = get_option(argc, argv, s_opts, l_opts)) != EOF) { + switch ((char)opt) { default: usage(); h5diff_exit(EXIT_FAILURE); + case 'h': usage(); h5diff_exit(EXIT_SUCCESS); + case 'V': print_version(h5tools_getprogname()); h5diff_exit(EXIT_SUCCESS); + case 'v': options->m_verbose = 1; /* This for loop is for handling style like * -v, -v1, --verbose, --verbose=1. */ - for (i = 1; i < argc; i++) - { + for (i = 1; i < argc; i++) { /* * short opt */ - if (!strcmp (argv[i], "-v")) /* no arg */ - { + if (!strcmp (argv[i], "-v")) { /* no arg */ opt_ind--; options->m_verbose_level = 0; break; - } - else if (!strncmp (argv[i], "-v", (size_t)2)) - { + } + else if (!strncmp (argv[i], "-v", (size_t)2)) { options->m_verbose_level = atoi(&argv[i][2]); break; - } + } /* * long opt */ - if (!strcmp (argv[i], "--verbose")) /* no arg */ - { + if (!strcmp (argv[i], "--verbose")) { /* no arg */ options->m_verbose_level = 0; break; - } - else if ( !strncmp (argv[i], "--verbose", (size_t)9) && argv[i][9]=='=') - { + } + else if ( !strncmp (argv[i], "--verbose", (size_t)9) && argv[i][9]=='=') { options->m_verbose_level = atoi(&argv[i][10]); break; } } break; + case 'q': /* use quiet mode; supress the message "0 differences found" */ options->m_quiet = 1; break; + case 'r': options->m_report = 1; break; + case 'l': options->follow_links = TRUE; break; + case 'x': options->no_dangle_links = 1; break; + + case 'S': + enable_error_stack = TRUE; + break; + case 'E': options->exclude_path = 1; /* create linked list of excluding objects */ - if( (exclude_node = (struct exclude_path_list*) HDmalloc(sizeof(struct exclude_path_list))) == NULL) - { + if( (exclude_node = (struct exclude_path_list*) HDmalloc(sizeof(struct exclude_path_list))) == NULL) { printf("Error: lack of memory!\n"); h5diff_exit(EXIT_FAILURE); } @@ -188,13 +192,11 @@ void parse_command_line(int argc, exclude_node->obj_type = H5TRAV_TYPE_UNKNOWN; exclude_prev = exclude_head; - if (NULL == exclude_head) - { + if (NULL == exclude_head) { exclude_head = exclude_node; exclude_head->next = NULL; } - else - { + else { while(NULL != exclude_prev->next) exclude_prev=exclude_prev->next; @@ -202,46 +204,40 @@ void parse_command_line(int argc, exclude_prev->next = exclude_node; } break; + case 'd': options->d=1; - if ( check_d_input( opt_arg )==-1) - { - printf("<-d %s> is not a valid option\n", opt_arg ); + if (check_d_input(opt_arg) == - 1) { + printf("<-d %s> is not a valid option\n", opt_arg); usage(); h5diff_exit(EXIT_FAILURE); } - options->delta = atof( opt_arg ); + options->delta = atof(opt_arg); /* -d 0 is the same as default */ if (H5_DBL_ABS_EQUAL(options->delta, (double)0.0F)) - options->d=0; - + options->d=0; break; case 'p': - options->p=1; - if ( check_p_input( opt_arg )==-1) - { - printf("<-p %s> is not a valid option\n", opt_arg ); + if (check_p_input(opt_arg) == -1) { + printf("<-p %s> is not a valid option\n", opt_arg); usage(); h5diff_exit(EXIT_FAILURE); } - options->percent = atof( opt_arg ); + options->percent = atof(opt_arg); /* -p 0 is the same as default */ if (H5_DBL_ABS_EQUAL(options->percent, (double)0.0F)) - options->p = 0; - + options->p = 0; break; case 'n': - options->n=1; - if ( check_n_input( opt_arg )==-1) - { - printf("<-n %s> is not a valid option\n", opt_arg ); + if ( check_n_input(opt_arg) == -1) { + printf("<-n %s> is not a valid option\n", opt_arg); usage(); h5diff_exit(EXIT_FAILURE); } @@ -270,8 +266,7 @@ void parse_command_line(int argc, options->exclude = exclude_head; /* check for file names to be processed */ - if (argc <= opt_ind || argv[ opt_ind + 1 ] == NULL) - { + if (argc <= opt_ind || argv[ opt_ind + 1 ] == NULL) { error_msg("missing file names\n"); usage(); h5diff_exit(EXIT_FAILURE); @@ -281,18 +276,15 @@ void parse_command_line(int argc, *fname2 = argv[ opt_ind + 1 ]; *objname1 = argv[ opt_ind + 2 ]; - if ( *objname1 == NULL ) - { + if (*objname1 == NULL) { *objname2 = NULL; return; } - if ( argv[ opt_ind + 3 ] != NULL) - { + if (argv[ opt_ind + 3 ] != NULL) { *objname2 = argv[ opt_ind + 3 ]; } - else - { + else { *objname2 = *objname1; } @@ -310,20 +302,17 @@ void parse_command_line(int argc, void print_info(diff_opt_t* options) { - if (options->m_quiet || options->err_stat ) + if (options->m_quiet || options->err_stat) return; - if (options->cmn_objs==0) - { + if (options->cmn_objs == 0) { printf("No common objects found. Files are not comparable.\n"); if (!options->m_verbose) printf("Use -v for a list of objects.\n"); } - if (options->not_cmp==1) - { - if ( options->m_list_not_cmp == 0 ) - { + if (options->not_cmp == 1) { + if (options->m_list_not_cmp == 0) { printf("--------------------------------\n"); printf("Some objects are not comparable\n"); printf("--------------------------------\n"); @@ -332,10 +321,7 @@ void parse_command_line(int argc, else printf("Use -c for a list of objects.\n"); } - - } - } /*------------------------------------------------------------------------- @@ -361,16 +347,14 @@ check_n_input( const char *str ) unsigned i; char c; - for ( i = 0; i < strlen(str); i++) - { + for (i = 0; i < strlen(str); i++) { c = str[i]; - if ( i==0 ) - { - if ( c < 49 || c > 57 ) /* ascii values between 1 and 9 */ + if (i == 0) { + if (c < 49 || c > 57) /* ascii values between 1 and 9 */ return -1; } else - if ( c < 48 || c > 57 ) /* 0 also */ + if (c < 48 || c > 57) /* 0 also */ return -1; } return 1; @@ -400,11 +384,11 @@ check_p_input( const char *str ) the atof return value on a hexadecimal input is different on some systems; we do a character check for this */ - if (strlen(str)>2 && str[0]=='0' && str[1]=='x') + if (strlen(str) > 2 && str[0] == '0' && str[1] == 'x') return -1; - x=atof(str); - if (x<0) + x = atof(str); + if (x < 0) return -1; return 1; @@ -434,11 +418,11 @@ check_d_input( const char *str ) the atof return value on a hexadecimal input is different on some systems; we do a character check for this */ - if (strlen(str)>2 && str[0]=='0' && str[1]=='x') + if (strlen(str) > 2 && str[0] == '0' && str[1] == 'x') return -1; - x=atof(str); - if (x <0) + x = atof(str); + if (x < 0) return -1; return 1; @@ -456,151 +440,153 @@ check_d_input( const char *str ) void usage(void) { - printf("usage: h5diff [OPTIONS] file1 file2 [obj1[ obj2]]\n"); - printf(" file1 File name of the first HDF5 file\n"); - printf(" file2 File name of the second HDF5 file\n"); - printf(" [obj1] Name of an HDF5 object, in absolute path\n"); - printf(" [obj2] Name of an HDF5 object, in absolute path\n"); - printf("\n"); - printf(" OPTIONS\n"); - printf(" -h, --help\n"); - printf(" Print a usage message and exit.\n"); - printf(" -V, --version\n"); - printf(" Print version number and exit.\n"); - printf(" -r, --report\n"); - printf(" Report mode. Print differences.\n"); - printf(" -v --verbose\n"); - printf(" Verbose mode. Print differences information and list of objects.\n"); - printf(" -vN --verbose=N\n"); - printf(" Verbose mode with level. Print differences and list of objects.\n"); - printf(" Level of detail depends on value of N:\n"); - printf(" 0 : Identical to '-v' or '--verbose'.\n"); - printf(" 1 : All level 0 information plus one-line attribute\n"); - printf(" status summary.\n"); - printf(" 2 : All level 1 information plus extended attribute\n"); - printf(" status report.\n"); - printf(" -q, --quiet\n"); - printf(" Quiet mode. Do not produce output.\n"); - printf(" --follow-symlinks\n"); - printf(" Follow symbolic links (soft links and external links and compare the)\n"); - printf(" links' target objects.\n"); - printf(" If symbolic link(s) with the same name exist in the files being\n"); - printf(" compared, then determine whether the target of each link is an existing\n"); - printf(" object (dataset, group, or named datatype) or the link is a dangling\n"); - printf(" link (a soft or external link pointing to a target object that does\n"); - printf(" not yet exist).\n"); - printf(" - If both symbolic links are dangling links, they are treated as being\n"); - printf(" the same; by default, h5diff returns an exit code of 0.\n"); - printf(" If, however, --no-dangling-links is used with --follow-symlinks,\n"); - printf(" this situation is treated as an error and h5diff returns an\n"); - printf(" exit code of 2.\n"); - printf(" - If only one of the two links is a dangling link,they are treated as\n"); - printf(" being different and h5diff returns an exit code of 1.\n"); - printf(" If, however, --no-dangling-links is used with --follow-symlinks,\n"); - printf(" this situation is treated as an error and h5diff returns an\n"); - printf(" exit code of 2.\n"); - printf(" - If both symbolic links point to existing objects, h5diff compares the\n"); - printf(" two objects.\n"); - printf(" If any symbolic link specified in the call to h5diff does not exist,\n"); - printf(" h5diff treats it as an error and returns an exit code of 2.\n"); - printf(" --no-dangling-links\n"); - printf(" Must be used with --follow-symlinks option; otherwise, h5diff shows\n"); - printf(" error message and returns an exit code of 2.\n"); - printf(" Check for any symbolic links (soft links or external links) that do not\n"); - printf(" resolve to an existing object (dataset, group, or named datatype).\n"); - printf(" If any dangling link is found, this situation is treated as an error\n"); - printf(" and h5diff returns an exit code of 2.\n"); - printf(" -c, --compare\n"); - printf(" List objects that are not comparable\n"); - printf(" -N, --nan\n"); - printf(" Avoid NaNs detection\n"); - printf(" -n C, --count=C\n"); - printf(" Print differences up to C. C must be a positive integer.\n"); - printf(" -d D, --delta=D\n"); - printf(" Print difference if (|a-b| > D). D must be a positive number. Where a\n"); - printf(" is the data point value in file1 and b is the data point value in file2.\n"); - printf(" Can not use with '-p' or '--use-system-epsilon'.\n"); - printf(" -p R, --relative=R\n"); - printf(" Print difference if (|(a-b)/b| > R). R must be a positive number. Where a\n"); - printf(" is the data point value in file1 and b is the data point value in file2.\n"); - printf(" Can not use with '-d' or '--use-system-epsilon'.\n"); - printf(" --use-system-epsilon\n"); - printf(" Print difference if (|a-b| > EPSILON), EPSILON is system defined value. Where a\n"); - printf(" is the data point value in file1 and b is the data point value in file2.\n"); - printf(" If the system epsilon is not defined,one of the following predefined\n"); - printf(" values will be used:\n"); - printf(" FLT_EPSILON = 1.19209E-07 for floating-point type\n"); - printf(" DBL_EPSILON = 2.22045E-16 for double precision type\n"); - printf(" Can not use with '-p' or '-d'.\n"); - printf(" --exclude-path \"path\"\n"); - printf(" Exclude the specified path to an object when comparing files or groups.\n"); - printf(" If a group is excluded, all member objects will also be excluded.\n"); - printf(" The specified path is excluded wherever it occurs.\n"); - printf(" This flexibility enables the same option to exclude either objects that\n"); - printf(" exist only in one file or common objects that are known to differ.\n"); - printf("\n"); - printf(" When comparing files, \"path\" is the absolute path to the excluded;\n"); - printf(" object; when comparing groups, \"path\" is similar to the relative\n"); - printf(" path from the group to the excluded object. This \"path\" can be\n"); - printf(" taken from the first section of the output of the --verbose option.\n"); - printf(" For example, if you are comparing the group /groupA in two files and\n"); - printf(" you want to exclude /groupA/groupB/groupC in both files, the exclude\n"); - printf(" option would read as follows:\n"); - printf(" --exclude-path \"/groupB/groupC\"\n"); - printf("\n"); - printf(" If there are multiple paths to an object, only the specified path(s)\n"); - printf(" will be excluded; the comparison will include any path not explicitly\n"); - printf(" excluded.\n"); - printf(" This option can be used repeatedly to exclude multiple paths.\n"); - printf("\n"); - - printf(" Modes of output:\n"); - printf(" Default mode: print the number of differences found and where they occured\n"); - printf(" -r Report mode: print the above plus the differences\n"); - printf(" -v Verbose mode: print the above plus a list of objects and warnings\n"); - printf(" -q Quiet mode: do not print output\n"); - - printf("\n"); - - printf(" File comparison:\n"); - printf(" If no objects [obj1[ obj2]] are specified, the h5diff comparison proceeds as\n"); - printf(" a comparison of the two files' root groups. That is, h5diff first compares\n"); - printf(" the names of root group members, generates a report of root group objects\n"); - printf(" that appear in only one file or in both files, and recursively compares\n"); - printf(" common objects.\n"); - printf("\n"); - - printf(" Object comparison:\n"); - printf(" 1) Groups\n"); - printf(" First compares the names of member objects (relative path, from the\n"); - printf(" specified group) and generates a report of objects that appear in only\n"); - printf(" one group or in both groups. Common objects are then compared recursively.\n"); - printf(" 2) Datasets\n"); - printf(" Array rank and dimensions, datatypes, and data values are compared.\n"); - printf(" 3) Datatypes\n"); - printf(" The comparison is based on the return value of H5Tequal.\n"); - printf(" 4) Symbolic links\n"); - printf(" The paths to the target objects are compared.\n"); - printf(" (The option --follow-symlinks overrides the default behavior when\n"); - printf(" symbolic links are compared.).\n"); - printf("\n"); - - printf(" Exit code:\n"); - printf(" 0 if no differences, 1 if differences found, 2 if error\n"); - printf("\n"); - printf(" Examples of use:\n"); - printf(" 1) h5diff file1 file2 /g1/dset1 /g1/dset2\n"); - printf(" Compares object '/g1/dset1' in file1 with '/g1/dset2' in file2\n"); - printf("\n"); - printf(" 2) h5diff file1 file2 /g1/dset1\n"); - printf(" Compares object '/g1/dset1' in both files\n"); - printf("\n"); - printf(" 3) h5diff file1 file2\n"); - printf(" Compares all objects in both files\n"); - printf("\n"); - printf(" Notes:\n"); - printf(" file1 and file2 can be the same file.\n"); - printf(" Use h5diff file1 file1 /g1/dset1 /g1/dset2 to compare\n"); - printf(" '/g1/dset1' and '/g1/dset2' in the same file\n"); - printf("\n"); + PRINTVALSTREAM(rawoutstream, "usage: h5diff [OPTIONS] file1 file2 [obj1[ obj2]]\n"); + PRINTVALSTREAM(rawoutstream, " file1 File name of the first HDF5 file\n"); + PRINTVALSTREAM(rawoutstream, " file2 File name of the second HDF5 file\n"); + PRINTVALSTREAM(rawoutstream, " [obj1] Name of an HDF5 object, in absolute path\n"); + PRINTVALSTREAM(rawoutstream, " [obj2] Name of an HDF5 object, in absolute path\n"); + PRINTVALSTREAM(rawoutstream, "\n"); + PRINTVALSTREAM(rawoutstream, " OPTIONS\n"); + PRINTVALSTREAM(rawoutstream, " -h, --help\n"); + PRINTVALSTREAM(rawoutstream, " Print a usage message and exit.\n"); + PRINTVALSTREAM(rawoutstream, " -V, --version\n"); + PRINTVALSTREAM(rawoutstream, " Print version number and exit.\n"); + PRINTVALSTREAM(rawoutstream, " -r, --report\n"); + PRINTVALSTREAM(rawoutstream, " Report mode. Print differences.\n"); + PRINTVALSTREAM(rawoutstream, " -v --verbose\n"); + PRINTVALSTREAM(rawoutstream, " Verbose mode. Print differences information and list of objects.\n"); + PRINTVALSTREAM(rawoutstream, " -vN --verbose=N\n"); + PRINTVALSTREAM(rawoutstream, " Verbose mode with level. Print differences and list of objects.\n"); + PRINTVALSTREAM(rawoutstream, " Level of detail depends on value of N:\n"); + PRINTVALSTREAM(rawoutstream, " 0 : Identical to '-v' or '--verbose'.\n"); + PRINTVALSTREAM(rawoutstream, " 1 : All level 0 information plus one-line attribute\n"); + PRINTVALSTREAM(rawoutstream, " status summary.\n"); + PRINTVALSTREAM(rawoutstream, " 2 : All level 1 information plus extended attribute\n"); + PRINTVALSTREAM(rawoutstream, " status report.\n"); + PRINTVALSTREAM(rawoutstream, " -q, --quiet\n"); + PRINTVALSTREAM(rawoutstream, " Quiet mode. Do not produce output.\n"); + PRINTVALSTREAM(rawoutstream, " --enable-error-stack\n"); + PRINTVALSTREAM(rawoutstream, " Prints messages from the HDF5 error stack as they occur.\n"); + PRINTVALSTREAM(rawoutstream, " --follow-symlinks\n"); + PRINTVALSTREAM(rawoutstream, " Follow symbolic links (soft links and external links and compare the)\n"); + PRINTVALSTREAM(rawoutstream, " links' target objects.\n"); + PRINTVALSTREAM(rawoutstream, " If symbolic link(s) with the same name exist in the files being\n"); + PRINTVALSTREAM(rawoutstream, " compared, then determine whether the target of each link is an existing\n"); + PRINTVALSTREAM(rawoutstream, " object (dataset, group, or named datatype) or the link is a dangling\n"); + PRINTVALSTREAM(rawoutstream, " link (a soft or external link pointing to a target object that does\n"); + PRINTVALSTREAM(rawoutstream, " not yet exist).\n"); + PRINTVALSTREAM(rawoutstream, " - If both symbolic links are dangling links, they are treated as being\n"); + PRINTVALSTREAM(rawoutstream, " the same; by default, h5diff returns an exit code of 0.\n"); + PRINTVALSTREAM(rawoutstream, " If, however, --no-dangling-links is used with --follow-symlinks,\n"); + PRINTVALSTREAM(rawoutstream, " this situation is treated as an error and h5diff returns an\n"); + PRINTVALSTREAM(rawoutstream, " exit code of 2.\n"); + PRINTVALSTREAM(rawoutstream, " - If only one of the two links is a dangling link,they are treated as\n"); + PRINTVALSTREAM(rawoutstream, " being different and h5diff returns an exit code of 1.\n"); + PRINTVALSTREAM(rawoutstream, " If, however, --no-dangling-links is used with --follow-symlinks,\n"); + PRINTVALSTREAM(rawoutstream, " this situation is treated as an error and h5diff returns an\n"); + PRINTVALSTREAM(rawoutstream, " exit code of 2.\n"); + PRINTVALSTREAM(rawoutstream, " - If both symbolic links point to existing objects, h5diff compares the\n"); + PRINTVALSTREAM(rawoutstream, " two objects.\n"); + PRINTVALSTREAM(rawoutstream, " If any symbolic link specified in the call to h5diff does not exist,\n"); + PRINTVALSTREAM(rawoutstream, " h5diff treats it as an error and returns an exit code of 2.\n"); + PRINTVALSTREAM(rawoutstream, " --no-dangling-links\n"); + PRINTVALSTREAM(rawoutstream, " Must be used with --follow-symlinks option; otherwise, h5diff shows\n"); + PRINTVALSTREAM(rawoutstream, " error message and returns an exit code of 2.\n"); + PRINTVALSTREAM(rawoutstream, " Check for any symbolic links (soft links or external links) that do not\n"); + PRINTVALSTREAM(rawoutstream, " resolve to an existing object (dataset, group, or named datatype).\n"); + PRINTVALSTREAM(rawoutstream, " If any dangling link is found, this situation is treated as an error\n"); + PRINTVALSTREAM(rawoutstream, " and h5diff returns an exit code of 2.\n"); + PRINTVALSTREAM(rawoutstream, " -c, --compare\n"); + PRINTVALSTREAM(rawoutstream, " List objects that are not comparable\n"); + PRINTVALSTREAM(rawoutstream, " -N, --nan\n"); + PRINTVALSTREAM(rawoutstream, " Avoid NaNs detection\n"); + PRINTVALSTREAM(rawoutstream, " -n C, --count=C\n"); + PRINTVALSTREAM(rawoutstream, " Print differences up to C. C must be a positive integer.\n"); + PRINTVALSTREAM(rawoutstream, " -d D, --delta=D\n"); + PRINTVALSTREAM(rawoutstream, " Print difference if (|a-b| > D). D must be a positive number. Where a\n"); + PRINTVALSTREAM(rawoutstream, " is the data point value in file1 and b is the data point value in file2.\n"); + PRINTVALSTREAM(rawoutstream, " Can not use with '-p' or '--use-system-epsilon'.\n"); + PRINTVALSTREAM(rawoutstream, " -p R, --relative=R\n"); + PRINTVALSTREAM(rawoutstream, " Print difference if (|(a-b)/b| > R). R must be a positive number. Where a\n"); + PRINTVALSTREAM(rawoutstream, " is the data point value in file1 and b is the data point value in file2.\n"); + PRINTVALSTREAM(rawoutstream, " Can not use with '-d' or '--use-system-epsilon'.\n"); + PRINTVALSTREAM(rawoutstream, " --use-system-epsilon\n"); + PRINTVALSTREAM(rawoutstream, " Print difference if (|a-b| > EPSILON), EPSILON is system defined value. Where a\n"); + PRINTVALSTREAM(rawoutstream, " is the data point value in file1 and b is the data point value in file2.\n"); + PRINTVALSTREAM(rawoutstream, " If the system epsilon is not defined,one of the following predefined\n"); + PRINTVALSTREAM(rawoutstream, " values will be used:\n"); + PRINTVALSTREAM(rawoutstream, " FLT_EPSILON = 1.19209E-07 for floating-point type\n"); + PRINTVALSTREAM(rawoutstream, " DBL_EPSILON = 2.22045E-16 for double precision type\n"); + PRINTVALSTREAM(rawoutstream, " Can not use with '-p' or '-d'.\n"); + PRINTVALSTREAM(rawoutstream, " --exclude-path \"path\"\n"); + PRINTVALSTREAM(rawoutstream, " Exclude the specified path to an object when comparing files or groups.\n"); + PRINTVALSTREAM(rawoutstream, " If a group is excluded, all member objects will also be excluded.\n"); + PRINTVALSTREAM(rawoutstream, " The specified path is excluded wherever it occurs.\n"); + PRINTVALSTREAM(rawoutstream, " This flexibility enables the same option to exclude either objects that\n"); + PRINTVALSTREAM(rawoutstream, " exist only in one file or common objects that are known to differ.\n"); + PRINTVALSTREAM(rawoutstream, "\n"); + PRINTVALSTREAM(rawoutstream, " When comparing files, \"path\" is the absolute path to the excluded;\n"); + PRINTVALSTREAM(rawoutstream, " object; when comparing groups, \"path\" is similar to the relative\n"); + PRINTVALSTREAM(rawoutstream, " path from the group to the excluded object. This \"path\" can be\n"); + PRINTVALSTREAM(rawoutstream, " taken from the first section of the output of the --verbose option.\n"); + PRINTVALSTREAM(rawoutstream, " For example, if you are comparing the group /groupA in two files and\n"); + PRINTVALSTREAM(rawoutstream, " you want to exclude /groupA/groupB/groupC in both files, the exclude\n"); + PRINTVALSTREAM(rawoutstream, " option would read as follows:\n"); + PRINTVALSTREAM(rawoutstream, " --exclude-path \"/groupB/groupC\"\n"); + PRINTVALSTREAM(rawoutstream, "\n"); + PRINTVALSTREAM(rawoutstream, " If there are multiple paths to an object, only the specified path(s)\n"); + PRINTVALSTREAM(rawoutstream, " will be excluded; the comparison will include any path not explicitly\n"); + PRINTVALSTREAM(rawoutstream, " excluded.\n"); + PRINTVALSTREAM(rawoutstream, " This option can be used repeatedly to exclude multiple paths.\n"); + PRINTVALSTREAM(rawoutstream, "\n"); + + PRINTVALSTREAM(rawoutstream, " Modes of output:\n"); + PRINTVALSTREAM(rawoutstream, " Default mode: print the number of differences found and where they occured\n"); + PRINTVALSTREAM(rawoutstream, " -r Report mode: print the above plus the differences\n"); + PRINTVALSTREAM(rawoutstream, " -v Verbose mode: print the above plus a list of objects and warnings\n"); + PRINTVALSTREAM(rawoutstream, " -q Quiet mode: do not print output\n"); + + PRINTVALSTREAM(rawoutstream, "\n"); + + PRINTVALSTREAM(rawoutstream, " File comparison:\n"); + PRINTVALSTREAM(rawoutstream, " If no objects [obj1[ obj2]] are specified, the h5diff comparison proceeds as\n"); + PRINTVALSTREAM(rawoutstream, " a comparison of the two files' root groups. That is, h5diff first compares\n"); + PRINTVALSTREAM(rawoutstream, " the names of root group members, generates a report of root group objects\n"); + PRINTVALSTREAM(rawoutstream, " that appear in only one file or in both files, and recursively compares\n"); + PRINTVALSTREAM(rawoutstream, " common objects.\n"); + PRINTVALSTREAM(rawoutstream, "\n"); + + PRINTVALSTREAM(rawoutstream, " Object comparison:\n"); + PRINTVALSTREAM(rawoutstream, " 1) Groups\n"); + PRINTVALSTREAM(rawoutstream, " First compares the names of member objects (relative path, from the\n"); + PRINTVALSTREAM(rawoutstream, " specified group) and generates a report of objects that appear in only\n"); + PRINTVALSTREAM(rawoutstream, " one group or in both groups. Common objects are then compared recursively.\n"); + PRINTVALSTREAM(rawoutstream, " 2) Datasets\n"); + PRINTVALSTREAM(rawoutstream, " Array rank and dimensions, datatypes, and data values are compared.\n"); + PRINTVALSTREAM(rawoutstream, " 3) Datatypes\n"); + PRINTVALSTREAM(rawoutstream, " The comparison is based on the return value of H5Tequal.\n"); + PRINTVALSTREAM(rawoutstream, " 4) Symbolic links\n"); + PRINTVALSTREAM(rawoutstream, " The paths to the target objects are compared.\n"); + PRINTVALSTREAM(rawoutstream, " (The option --follow-symlinks overrides the default behavior when\n"); + PRINTVALSTREAM(rawoutstream, " symbolic links are compared.).\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"); + PRINTVALSTREAM(rawoutstream, " Examples of use:\n"); + PRINTVALSTREAM(rawoutstream, " 1) h5diff file1 file2 /g1/dset1 /g1/dset2\n"); + PRINTVALSTREAM(rawoutstream, " Compares object '/g1/dset1' in file1 with '/g1/dset2' in file2\n"); + PRINTVALSTREAM(rawoutstream, "\n"); + PRINTVALSTREAM(rawoutstream, " 2) h5diff file1 file2 /g1/dset1\n"); + PRINTVALSTREAM(rawoutstream, " Compares object '/g1/dset1' in both files\n"); + PRINTVALSTREAM(rawoutstream, "\n"); + PRINTVALSTREAM(rawoutstream, " 3) h5diff file1 file2\n"); + PRINTVALSTREAM(rawoutstream, " Compares all objects in both files\n"); + PRINTVALSTREAM(rawoutstream, "\n"); + PRINTVALSTREAM(rawoutstream, " Notes:\n"); + PRINTVALSTREAM(rawoutstream, " file1 and file2 can be the same file.\n"); + PRINTVALSTREAM(rawoutstream, " Use h5diff file1 file1 /g1/dset1 /g1/dset2 to compare\n"); + PRINTVALSTREAM(rawoutstream, " '/g1/dset1' and '/g1/dset2' in the same file\n"); + PRINTVALSTREAM(rawoutstream, "\n"); } diff --git a/tools/src/h5diff/h5diff_main.c b/tools/src/h5diff/h5diff_main.c index 66ff71e..8dab3b4 100644 --- a/tools/src/h5diff/h5diff_main.c +++ b/tools/src/h5diff/h5diff_main.c @@ -69,6 +69,10 @@ int main(int argc, const char *argv[]) { int ret; + H5E_auto2_t func; + H5E_auto2_t tools_func; + void *edata; + void *tools_edata; const char *fname1 = NULL; const char *fname2 = NULL; const char *objname1 = NULL; @@ -79,21 +83,34 @@ int main(int argc, const char *argv[]) h5tools_setprogname(PROGRAMNAME); h5tools_setstatus(EXIT_SUCCESS); + /* Disable error reporting */ + H5Eget_auto2(H5E_DEFAULT, &func, &edata); + H5Eset_auto2(H5E_DEFAULT, NULL, NULL); + /* Initialize h5tools lib */ h5tools_init(); + /* Disable tools error reporting */ + H5Eget_auto2(H5tools_ERR_STACK_g, &tools_func, &tools_edata); + H5Eset_auto2(H5tools_ERR_STACK_g, NULL, NULL); + /*------------------------------------------------------------------------- * process the command-line *------------------------------------------------------------------------- */ parse_command_line(argc, argv, &fname1, &fname2, &objname1, &objname2, &options); + if (enable_error_stack) { + H5Eset_auto2(H5E_DEFAULT, func, edata); + H5Eset_auto2(H5tools_ERR_STACK_g, tools_func, tools_edata); + } + /*------------------------------------------------------------------------- * do the diff *------------------------------------------------------------------------- */ - nfound = h5diff(fname1,fname2,objname1,objname2,&options); + nfound = h5diff(fname1, fname2, objname1, objname2, &options); print_info(&options); @@ -103,17 +120,17 @@ int main(int argc, const char *argv[]) *------------------------------------------------------------------------- */ - ret = (nfound == 0 ? 0 : 1 ); + ret = (nfound == 0 ? 0 : 1); /* if graph difference return 1 for differences */ - if ( options.contents == 0 ) + if (options.contents == 0) ret = 1; /* and return 2 for error */ if (options.err_stat) ret = 2; - return ret; + h5diff_exit(ret); } /*------------------------------------------------------------------------- @@ -135,6 +152,8 @@ int main(int argc, const char *argv[]) H5_ATTR_NORETURN void h5diff_exit(int status) { + h5tools_close(); + HDexit(status); } diff --git a/tools/src/h5diff/ph5diff_main.c b/tools/src/h5diff/ph5diff_main.c index 192067f..89efc39 100644 --- a/tools/src/h5diff/ph5diff_main.c +++ b/tools/src/h5diff/ph5diff_main.c @@ -316,6 +316,8 @@ void h5diff_exit(int status) status = EXIT_SUCCESS; /* Reset exit status, since some mpiexec commands generate output on failure status */ } + h5tools_close(); + /* Always exit(0), since MPI implementations do weird stuff when they * receive a non-zero exit value. - QAK */ diff --git a/tools/src/h5repack/h5repack_copy.c b/tools/src/h5repack/h5repack_copy.c index 8e82b11..e77cc30 100644 --- a/tools/src/h5repack/h5repack_copy.c +++ b/tools/src/h5repack/h5repack_copy.c @@ -1582,6 +1582,7 @@ void print_user_block(const char *filename, hid_t fid) /* open file */ if((fh = HDopen(filename, O_RDONLY, 0)) < 0) { + error_msg("failed to open file\n"); HGOTO_ERROR(H5E_tools_g, H5E_tools_min_id_g, "HDopen failed"); } diff --git a/tools/test/h5diff/CMakeTests.cmake b/tools/test/h5diff/CMakeTests.cmake index 608795c..0f61539 100644 --- a/tools/test/h5diff/CMakeTests.cmake +++ b/tools/test/h5diff/CMakeTests.cmake @@ -171,11 +171,21 @@ ${HDF5_TOOLS_TEST_H5DIFF_SOURCE_DIR}/testfiles/h5diff_452.txt ${HDF5_TOOLS_TEST_H5DIFF_SOURCE_DIR}/testfiles/h5diff_453.txt ${HDF5_TOOLS_TEST_H5DIFF_SOURCE_DIR}/testfiles/h5diff_454.txt + ${HDF5_TOOLS_TEST_H5DIFF_SOURCE_DIR}/testfiles/h5diff_454_ERR.txt + ${HDF5_TOOLS_TEST_H5DIFF_SOURCE_DIR}/testfiles/h5diff_454_ERR.err ${HDF5_TOOLS_TEST_H5DIFF_SOURCE_DIR}/testfiles/h5diff_455.txt + ${HDF5_TOOLS_TEST_H5DIFF_SOURCE_DIR}/testfiles/h5diff_455_ERR.txt + ${HDF5_TOOLS_TEST_H5DIFF_SOURCE_DIR}/testfiles/h5diff_455_ERR.err ${HDF5_TOOLS_TEST_H5DIFF_SOURCE_DIR}/testfiles/h5diff_456.txt ${HDF5_TOOLS_TEST_H5DIFF_SOURCE_DIR}/testfiles/h5diff_457.txt + ${HDF5_TOOLS_TEST_H5DIFF_SOURCE_DIR}/testfiles/h5diff_457_ERR.txt + ${HDF5_TOOLS_TEST_H5DIFF_SOURCE_DIR}/testfiles/h5diff_457_ERR.err ${HDF5_TOOLS_TEST_H5DIFF_SOURCE_DIR}/testfiles/h5diff_458.txt + ${HDF5_TOOLS_TEST_H5DIFF_SOURCE_DIR}/testfiles/h5diff_458_ERR.txt + ${HDF5_TOOLS_TEST_H5DIFF_SOURCE_DIR}/testfiles/h5diff_458_ERR.err ${HDF5_TOOLS_TEST_H5DIFF_SOURCE_DIR}/testfiles/h5diff_459.txt + ${HDF5_TOOLS_TEST_H5DIFF_SOURCE_DIR}/testfiles/h5diff_459_ERR.txt + ${HDF5_TOOLS_TEST_H5DIFF_SOURCE_DIR}/testfiles/h5diff_459_ERR.err ${HDF5_TOOLS_TEST_H5DIFF_SOURCE_DIR}/testfiles/h5diff_465.txt ${HDF5_TOOLS_TEST_H5DIFF_SOURCE_DIR}/testfiles/h5diff_466.txt ${HDF5_TOOLS_TEST_H5DIFF_SOURCE_DIR}/testfiles/h5diff_467.txt @@ -231,6 +241,8 @@ ${HDF5_TOOLS_TEST_H5DIFF_SOURCE_DIR}/testfiles/h5diff_63.txt ${HDF5_TOOLS_TEST_H5DIFF_SOURCE_DIR}/testfiles/h5diff_600.txt ${HDF5_TOOLS_TEST_H5DIFF_SOURCE_DIR}/testfiles/h5diff_601.txt + ${HDF5_TOOLS_TEST_H5DIFF_SOURCE_DIR}/testfiles/h5diff_601_ERR.txt + ${HDF5_TOOLS_TEST_H5DIFF_SOURCE_DIR}/testfiles/h5diff_601_ERR.err ${HDF5_TOOLS_TEST_H5DIFF_SOURCE_DIR}/testfiles/h5diff_603.txt ${HDF5_TOOLS_TEST_H5DIFF_SOURCE_DIR}/testfiles/h5diff_604.txt ${HDF5_TOOLS_TEST_H5DIFF_SOURCE_DIR}/testfiles/h5diff_605.txt @@ -379,6 +391,38 @@ endif () endmacro () + macro (ADD_H5_ERR_TEST resultfile resultcode) + # If using memchecker add tests without using scripts + if (HDF5_ENABLE_USING_MEMCHECKER) + add_test (NAME H5DIFF_ERR-${resultfile} COMMAND $ --enable-error-stack ${ARGN}) + set_tests_properties (H5DIFF_ERR-${resultfile} PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles") + if (NOT ${resultcode} STREQUAL "0") + set_tests_properties (H5DIFF_ERR-${resultfile} PROPERTIES WILL_FAIL "true") + endif () + if (NOT "${last_test}" STREQUAL "") + set_tests_properties (H5DIFF_ERR-${resultfile} PROPERTIES DEPENDS ${last_test}) + endif () + else () + add_test ( + NAME H5DIFF_ERR-${resultfile} + COMMAND "${CMAKE_COMMAND}" + -D "TEST_PROGRAM=$" + -D "TEST_ARGS:STRING=--enable-error-stack;${ARGN}" + -D "TEST_FOLDER=${PROJECT_BINARY_DIR}/testfiles" + -D "TEST_OUTPUT=${resultfile}_ERR.out" + -D "TEST_EXPECT=${resultcode}" + -D "TEST_REFERENCE=${resultfile}_ERR.txt" + -D "TEST_MASK_ERROR=true" + -D "TEST_APPEND=EXIT CODE:" + -P "${HDF_RESOURCES_EXT_DIR}/runTest.cmake" + ) + endif () + if (NOT "${last_test}" STREQUAL "") + set_tests_properties (H5DIFF_ERR-${resultfile} PROPERTIES DEPENDS ${last_test}) + endif () + set (last_test "H5DIFF_ERR-${resultfile}") + endmacro () + macro (ADD_PH5_TEST resultfile resultcode) # If using memchecker add tests without using scripts if (HDF5_ENABLE_USING_MEMCHECKER) @@ -458,6 +502,53 @@ endif () endmacro () + macro (ADD_H5_UD_ERR_TEST testname resultcode resultfile) + if (NOT HDF5_ENABLE_USING_MEMCHECKER) + # Remove any output file left over from previous test run + add_test ( + NAME H5DIFF_UD_ERR-${testname}-clearall-objects + COMMAND ${CMAKE_COMMAND} + -E remove + testfiles/${resultfile}_ERR.out + testfiles/${resultfile}_ERR.out.err + ) + if (${resultcode} STREQUAL "2") + add_test ( + NAME H5DIFF_UD_ERR-${testname} + COMMAND "${CMAKE_COMMAND}" + -D "TEST_PROGRAM=$" + -D "TEST_ARGS:STRING=--enable-error-stack;${ARGN}" + -D "TEST_FOLDER=${PROJECT_BINARY_DIR}/testfiles" + -D "TEST_OUTPUT=${resultfile}_ERR.out" + -D "TEST_EXPECT=${resultcode}" + -D "TEST_REFERENCE=${resultfile}_ERR.txt" + -D "TEST_MASK_ERROR=true" + -D "TEST_APPEND=EXIT CODE:" + -D "TEST_ENV_VAR=HDF5_PLUGIN_PATH" + -D "TEST_ENV_VALUE=${CMAKE_BINARY_DIR}" + -P "${HDF_RESOURCES_EXT_DIR}/runTest.cmake" + ) + else () + add_test ( + NAME H5DIFF_UD_ERR-${testname} + COMMAND "${CMAKE_COMMAND}" + -D "TEST_PROGRAM=$" + -D "TEST_ARGS:STRING=--enable-error-stack;${ARGN}" + -D "TEST_FOLDER=${PROJECT_BINARY_DIR}/testfiles" + -D "TEST_OUTPUT=${resultfile}_ERR.out" + -D "TEST_EXPECT=${resultcode}" + -D "TEST_REFERENCE=${resultfile}_ERR.txt" + -D "TEST_MASK_ERROR=true" + -D "TEST_APPEND=EXIT CODE:" + -D "TEST_ENV_VAR=HDF5_PLUGIN_PATH" + -D "TEST_ENV_VALUE=${CMAKE_BINARY_DIR}/plugins" + -P "${HDF_RESOURCES_EXT_DIR}/runTest.cmake" + ) + endif () + set_tests_properties (H5DIFF_UD_ERR-${testname} PROPERTIES DEPENDS H5DIFF_UD_ERR-${testname}-clearall-objects) + endif () + endmacro () + ############################################################################## ############################################################################## ### T H E T E S T S ### @@ -680,16 +771,26 @@ h5diff_453.out.err h5diff_454.out h5diff_454.out.err + h5diff_454_ERR.out + h5diff_454_ERR.out.err h5diff_455.out h5diff_455.out.err + h5diff_455_ERR.out + h5diff_455_ERR.out.err h5diff_456.out h5diff_456.out.err h5diff_457.out h5diff_457.out.err + h5diff_457_ERR.out + h5diff_457_ERR.out.err h5diff_458.out h5diff_458.out.err + h5diff_458_ERR.out + h5diff_458_ERR.out.err h5diff_459.out h5diff_459.out.err + h5diff_459_ERR.out + h5diff_459_ERR.out.err h5diff_465.out h5diff_465.out.err h5diff_466.out @@ -794,6 +895,8 @@ h5diff_600.out.err h5diff_601.out h5diff_601.out.err + h5diff_601_ERR.out + h5diff_601_ERR.out.err h5diff_603.out h5diff_603.out.err h5diff_604.out @@ -1047,6 +1150,7 @@ ADD_H5_TEST (h5diff_600 1 ${FILE1}) # 6.1: Check if non-exist object name is specified ADD_H5_TEST (h5diff_601 2 ${FILE1} ${FILE1} nono_obj) +ADD_H5_ERR_TEST (h5diff_601 2 ${FILE1} ${FILE1} nono_obj) # ############################################################################## # # -d @@ -1350,21 +1454,26 @@ ADD_H5_TEST (h5diff_453 2 --follow-symlinks -v --no-dangling-links ${FILE13} $ # dangling link found for soft links (obj to obj) ADD_H5_TEST (h5diff_454 2 --follow-symlinks -v --no-dangling-links ${FILE13} ${FILE13} /softlink_dset2 /softlink_noexist) +ADD_H5_ERR_TEST (h5diff_454 2 --follow-symlinks -v --no-dangling-links ${FILE13} ${FILE13} /softlink_dset2 /softlink_noexist) # dangling link found for soft links (obj to obj) Both dangle links ADD_H5_TEST (h5diff_455 2 --follow-symlinks -v --no-dangling-links ${FILE13} ${FILE13} /softlink_noexist /softlink_noexist) +ADD_H5_ERR_TEST (h5diff_455 2 --follow-symlinks -v --no-dangling-links ${FILE13} ${FILE13} /softlink_noexist /softlink_noexist) # dangling link found for ext links (FILE to FILE) ADD_H5_TEST (h5diff_456 2 --follow-symlinks -v --no-dangling-links ${FILE15} ${FILE15}) # dangling link found for ext links (obj to obj). target file exist ADD_H5_TEST (h5diff_457 2 --follow-symlinks -v --no-dangling-links ${FILE15} ${FILE15} /ext_link_dset1 /ext_link_noexist1) +ADD_H5_ERR_TEST (h5diff_457 2 --follow-symlinks -v --no-dangling-links ${FILE15} ${FILE15} /ext_link_dset1 /ext_link_noexist1) # dangling link found for ext links (obj to obj). target file NOT exist ADD_H5_TEST (h5diff_458 2 --follow-symlinks -v --no-dangling-links ${FILE15} ${FILE15} /ext_link_dset1 /ext_link_noexist2) +ADD_H5_ERR_TEST (h5diff_458 2 --follow-symlinks -v --no-dangling-links ${FILE15} ${FILE15} /ext_link_dset1 /ext_link_noexist2) # dangling link found for ext links (obj to obj). Both dangle links ADD_H5_TEST (h5diff_459 2 --follow-symlinks -v --no-dangling-links ${FILE15} ${FILE15} /ext_link_noexist1 /ext_link_noexist2) +ADD_H5_ERR_TEST (h5diff_459 2 --follow-symlinks -v --no-dangling-links ${FILE15} ${FILE15} /ext_link_noexist1 /ext_link_noexist2) # dangling link --follow-symlinks (obj vs obj) # (HDFFV-7836) diff --git a/tools/test/h5diff/testfiles/h5diff_10.txt b/tools/test/h5diff/testfiles/h5diff_10.txt index 0a0ee22..11ad800 100644 --- a/tools/test/h5diff/testfiles/h5diff_10.txt +++ b/tools/test/h5diff/testfiles/h5diff_10.txt @@ -23,6 +23,8 @@ usage: h5diff [OPTIONS] file1 file2 [obj1[ obj2]] status report. -q, --quiet Quiet mode. Do not produce output. + --enable-error-stack + Prints messages from the HDF5 error stack as they occur. --follow-symlinks Follow symbolic links (soft links and external links and compare the) links' target objects. diff --git a/tools/test/h5diff/testfiles/h5diff_454_ERR.err b/tools/test/h5diff/testfiles/h5diff_454_ERR.err new file mode 100644 index 0000000..8fa1718 --- /dev/null +++ b/tools/test/h5diff/testfiles/h5diff_454_ERR.err @@ -0,0 +1,4 @@ +H5tools-DIAG: Error detected in HDF5:tools (version (number)) thread (IDs): + #000: (file name) line (number) in h5diff(): Error: treat dangling link as error + major: Failure in tools library + minor: error in function diff --git a/tools/test/h5diff/testfiles/h5diff_454_ERR.txt b/tools/test/h5diff/testfiles/h5diff_454_ERR.txt new file mode 100644 index 0000000..de25a69 --- /dev/null +++ b/tools/test/h5diff/testfiles/h5diff_454_ERR.txt @@ -0,0 +1,6 @@ +Warning: is a dangling link. +H5tools-DIAG: Error detected in HDF5:tools (version (number)) thread (IDs): + #000: (file name) line (number) in h5diff(): Error: treat dangling link as error + major: Failure in tools library + minor: error in function +EXIT CODE: 2 diff --git a/tools/test/h5diff/testfiles/h5diff_455_ERR.err b/tools/test/h5diff/testfiles/h5diff_455_ERR.err new file mode 100644 index 0000000..8fa1718 --- /dev/null +++ b/tools/test/h5diff/testfiles/h5diff_455_ERR.err @@ -0,0 +1,4 @@ +H5tools-DIAG: Error detected in HDF5:tools (version (number)) thread (IDs): + #000: (file name) line (number) in h5diff(): Error: treat dangling link as error + major: Failure in tools library + minor: error in function diff --git a/tools/test/h5diff/testfiles/h5diff_455_ERR.txt b/tools/test/h5diff/testfiles/h5diff_455_ERR.txt new file mode 100644 index 0000000..de25a69 --- /dev/null +++ b/tools/test/h5diff/testfiles/h5diff_455_ERR.txt @@ -0,0 +1,6 @@ +Warning: is a dangling link. +H5tools-DIAG: Error detected in HDF5:tools (version (number)) thread (IDs): + #000: (file name) line (number) in h5diff(): Error: treat dangling link as error + major: Failure in tools library + minor: error in function +EXIT CODE: 2 diff --git a/tools/test/h5diff/testfiles/h5diff_457_ERR.err b/tools/test/h5diff/testfiles/h5diff_457_ERR.err new file mode 100644 index 0000000..8fa1718 --- /dev/null +++ b/tools/test/h5diff/testfiles/h5diff_457_ERR.err @@ -0,0 +1,4 @@ +H5tools-DIAG: Error detected in HDF5:tools (version (number)) thread (IDs): + #000: (file name) line (number) in h5diff(): Error: treat dangling link as error + major: Failure in tools library + minor: error in function diff --git a/tools/test/h5diff/testfiles/h5diff_457_ERR.txt b/tools/test/h5diff/testfiles/h5diff_457_ERR.txt new file mode 100644 index 0000000..6594c9a --- /dev/null +++ b/tools/test/h5diff/testfiles/h5diff_457_ERR.txt @@ -0,0 +1,6 @@ +Warning: is a dangling link. +H5tools-DIAG: Error detected in HDF5:tools (version (number)) thread (IDs): + #000: (file name) line (number) in h5diff(): Error: treat dangling link as error + major: Failure in tools library + minor: error in function +EXIT CODE: 2 diff --git a/tools/test/h5diff/testfiles/h5diff_458_ERR.err b/tools/test/h5diff/testfiles/h5diff_458_ERR.err new file mode 100644 index 0000000..8fa1718 --- /dev/null +++ b/tools/test/h5diff/testfiles/h5diff_458_ERR.err @@ -0,0 +1,4 @@ +H5tools-DIAG: Error detected in HDF5:tools (version (number)) thread (IDs): + #000: (file name) line (number) in h5diff(): Error: treat dangling link as error + major: Failure in tools library + minor: error in function diff --git a/tools/test/h5diff/testfiles/h5diff_458_ERR.txt b/tools/test/h5diff/testfiles/h5diff_458_ERR.txt new file mode 100644 index 0000000..9a09c17 --- /dev/null +++ b/tools/test/h5diff/testfiles/h5diff_458_ERR.txt @@ -0,0 +1,6 @@ +Warning: is a dangling link. +H5tools-DIAG: Error detected in HDF5:tools (version (number)) thread (IDs): + #000: (file name) line (number) in h5diff(): Error: treat dangling link as error + major: Failure in tools library + minor: error in function +EXIT CODE: 2 diff --git a/tools/test/h5diff/testfiles/h5diff_459_ERR.err b/tools/test/h5diff/testfiles/h5diff_459_ERR.err new file mode 100644 index 0000000..8fa1718 --- /dev/null +++ b/tools/test/h5diff/testfiles/h5diff_459_ERR.err @@ -0,0 +1,4 @@ +H5tools-DIAG: Error detected in HDF5:tools (version (number)) thread (IDs): + #000: (file name) line (number) in h5diff(): Error: treat dangling link as error + major: Failure in tools library + minor: error in function diff --git a/tools/test/h5diff/testfiles/h5diff_459_ERR.txt b/tools/test/h5diff/testfiles/h5diff_459_ERR.txt new file mode 100644 index 0000000..6594c9a --- /dev/null +++ b/tools/test/h5diff/testfiles/h5diff_459_ERR.txt @@ -0,0 +1,6 @@ +Warning: is a dangling link. +H5tools-DIAG: Error detected in HDF5:tools (version (number)) thread (IDs): + #000: (file name) line (number) in h5diff(): Error: treat dangling link as error + major: Failure in tools library + minor: error in function +EXIT CODE: 2 diff --git a/tools/test/h5diff/testfiles/h5diff_600.txt b/tools/test/h5diff/testfiles/h5diff_600.txt index 4362711..f3b346a 100644 --- a/tools/test/h5diff/testfiles/h5diff_600.txt +++ b/tools/test/h5diff/testfiles/h5diff_600.txt @@ -23,6 +23,8 @@ usage: h5diff [OPTIONS] file1 file2 [obj1[ obj2]] status report. -q, --quiet Quiet mode. Do not produce output. + --enable-error-stack + Prints messages from the HDF5 error stack as they occur. --follow-symlinks Follow symbolic links (soft links and external links and compare the) links' target objects. diff --git a/tools/test/h5diff/testfiles/h5diff_601_ERR.err b/tools/test/h5diff/testfiles/h5diff_601_ERR.err new file mode 100644 index 0000000..f9a7212 --- /dev/null +++ b/tools/test/h5diff/testfiles/h5diff_601_ERR.err @@ -0,0 +1,4 @@ +H5tools-DIAG: Error detected in HDF5:tools (version (number)) thread (IDs): + #000: (file name) line (number) in h5diff(): Error: Object could not be found + major: Failure in tools library + minor: error in function diff --git a/tools/test/h5diff/testfiles/h5diff_601_ERR.txt b/tools/test/h5diff/testfiles/h5diff_601_ERR.txt new file mode 100644 index 0000000..b58124a --- /dev/null +++ b/tools/test/h5diff/testfiles/h5diff_601_ERR.txt @@ -0,0 +1,6 @@ +Object could not be found in +H5tools-DIAG: Error detected in HDF5:tools (version (number)) thread (IDs): + #000: (file name) line (number) in h5diff(): Error: Object could not be found + major: Failure in tools library + minor: error in function +EXIT CODE: 2 diff --git a/tools/test/h5diff/testfiles/h5diff_603.txt b/tools/test/h5diff/testfiles/h5diff_603.txt index 9ab3204..0d6b474 100644 --- a/tools/test/h5diff/testfiles/h5diff_603.txt +++ b/tools/test/h5diff/testfiles/h5diff_603.txt @@ -24,6 +24,8 @@ usage: h5diff [OPTIONS] file1 file2 [obj1[ obj2]] status report. -q, --quiet Quiet mode. Do not produce output. + --enable-error-stack + Prints messages from the HDF5 error stack as they occur. --follow-symlinks Follow symbolic links (soft links and external links and compare the) links' target objects. diff --git a/tools/test/h5diff/testfiles/h5diff_606.txt b/tools/test/h5diff/testfiles/h5diff_606.txt index afe0e72..94f44e8 100644 --- a/tools/test/h5diff/testfiles/h5diff_606.txt +++ b/tools/test/h5diff/testfiles/h5diff_606.txt @@ -24,6 +24,8 @@ usage: h5diff [OPTIONS] file1 file2 [obj1[ obj2]] status report. -q, --quiet Quiet mode. Do not produce output. + --enable-error-stack + Prints messages from the HDF5 error stack as they occur. --follow-symlinks Follow symbolic links (soft links and external links and compare the) links' target objects. diff --git a/tools/test/h5diff/testfiles/h5diff_612.txt b/tools/test/h5diff/testfiles/h5diff_612.txt index 97a1747..7f83c64 100644 --- a/tools/test/h5diff/testfiles/h5diff_612.txt +++ b/tools/test/h5diff/testfiles/h5diff_612.txt @@ -24,6 +24,8 @@ usage: h5diff [OPTIONS] file1 file2 [obj1[ obj2]] status report. -q, --quiet Quiet mode. Do not produce output. + --enable-error-stack + Prints messages from the HDF5 error stack as they occur. --follow-symlinks Follow symbolic links (soft links and external links and compare the) links' target objects. diff --git a/tools/test/h5diff/testfiles/h5diff_615.txt b/tools/test/h5diff/testfiles/h5diff_615.txt index 78770f0..3cfe6b9 100644 --- a/tools/test/h5diff/testfiles/h5diff_615.txt +++ b/tools/test/h5diff/testfiles/h5diff_615.txt @@ -24,6 +24,8 @@ usage: h5diff [OPTIONS] file1 file2 [obj1[ obj2]] status report. -q, --quiet Quiet mode. Do not produce output. + --enable-error-stack + Prints messages from the HDF5 error stack as they occur. --follow-symlinks Follow symbolic links (soft links and external links and compare the) links' target objects. diff --git a/tools/test/h5diff/testfiles/h5diff_621.txt b/tools/test/h5diff/testfiles/h5diff_621.txt index b2a5881..9c34945 100644 --- a/tools/test/h5diff/testfiles/h5diff_621.txt +++ b/tools/test/h5diff/testfiles/h5diff_621.txt @@ -24,6 +24,8 @@ usage: h5diff [OPTIONS] file1 file2 [obj1[ obj2]] status report. -q, --quiet Quiet mode. Do not produce output. + --enable-error-stack + Prints messages from the HDF5 error stack as they occur. --follow-symlinks Follow symbolic links (soft links and external links and compare the) links' target objects. diff --git a/tools/test/h5diff/testfiles/h5diff_622.txt b/tools/test/h5diff/testfiles/h5diff_622.txt index 66a3025..2b2df2f 100644 --- a/tools/test/h5diff/testfiles/h5diff_622.txt +++ b/tools/test/h5diff/testfiles/h5diff_622.txt @@ -24,6 +24,8 @@ usage: h5diff [OPTIONS] file1 file2 [obj1[ obj2]] status report. -q, --quiet Quiet mode. Do not produce output. + --enable-error-stack + Prints messages from the HDF5 error stack as they occur. --follow-symlinks Follow symbolic links (soft links and external links and compare the) links' target objects. diff --git a/tools/test/h5diff/testfiles/h5diff_623.txt b/tools/test/h5diff/testfiles/h5diff_623.txt index f9258d1..3e80438 100644 --- a/tools/test/h5diff/testfiles/h5diff_623.txt +++ b/tools/test/h5diff/testfiles/h5diff_623.txt @@ -24,6 +24,8 @@ usage: h5diff [OPTIONS] file1 file2 [obj1[ obj2]] status report. -q, --quiet Quiet mode. Do not produce output. + --enable-error-stack + Prints messages from the HDF5 error stack as they occur. --follow-symlinks Follow symbolic links (soft links and external links and compare the) links' target objects. diff --git a/tools/test/h5diff/testfiles/h5diff_624.txt b/tools/test/h5diff/testfiles/h5diff_624.txt index 57a4ddd..7a2f585 100644 --- a/tools/test/h5diff/testfiles/h5diff_624.txt +++ b/tools/test/h5diff/testfiles/h5diff_624.txt @@ -24,6 +24,8 @@ usage: h5diff [OPTIONS] file1 file2 [obj1[ obj2]] status report. -q, --quiet Quiet mode. Do not produce output. + --enable-error-stack + Prints messages from the HDF5 error stack as they occur. --follow-symlinks Follow symbolic links (soft links and external links and compare the) links' target objects. diff --git a/tools/test/h5dump/h5dumpgentest.c b/tools/test/h5dump/h5dumpgentest.c index 50a09fc..01f6623 100644 --- a/tools/test/h5dump/h5dumpgentest.c +++ b/tools/test/h5dump/h5dumpgentest.c @@ -7042,8 +7042,8 @@ gent_extlinks(void) * Function: gent_fs_strategy_threshold * * Purpose: Generate a file with non-default file space strategy, - * non-default free-space section threshold, - * non-default file space page size. + * non-default free-space section threshold, + * non-default file space page size. *------------------------------------------------------------------------- */ static void -- cgit v0.12 From c3fcd62ea6714eba07b03d4b0e2a2a46029a90da Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Thu, 7 Sep 2017 13:28:35 -0500 Subject: HDFFV-10276 Add UD flag option to h5repack --- release_docs/INSTALL_CMake.txt | 10 +++++----- release_docs/RELEASE.txt | 9 +++++++++ tools/src/h5repack/h5repack.h | 1 + tools/src/h5repack/h5repack_filters.c | 2 +- tools/src/h5repack/h5repack_main.c | 8 ++++---- tools/src/h5repack/h5repack_parse.c | 17 ++++++++++++++--- tools/test/h5repack/CMakeTests.cmake | 6 +++--- tools/test/h5repack/h5repack_plugin.sh.in | 14 +++++++------- tools/test/h5repack/testfiles/h5repack-help.txt | 12 ++++++------ 9 files changed, 50 insertions(+), 29 deletions(-) diff --git a/release_docs/INSTALL_CMake.txt b/release_docs/INSTALL_CMake.txt index 85f7962..4e9d7da 100644 --- a/release_docs/INSTALL_CMake.txt +++ b/release_docs/INSTALL_CMake.txt @@ -659,7 +659,7 @@ adding an option (${CTEST_SCRIPT_ARG}) to the platform configuration script. ############################################################################################# ### ${CTEST_SCRIPT_ARG} is of the form OPTION=VALUE ### ### BUILD_GENERATOR required [Unix, VS2017, VS201764, VS2015, VS201564, VS2013, VS201364] ### -### ctest -S HDF5config.cmake,BUILD_GENERATOR=VS201264 -C Release -VV -O hdf5.log ### +### ctest -S HDF5config.cmake,BUILD_GENERATOR=VS201764 -C Release -VV -O hdf5.log ### ############################################################################################# cmake_minimum_required (VERSION 3.2.2 FATAL_ERROR) @@ -668,13 +668,13 @@ cmake_minimum_required (VERSION 3.2.2 FATAL_ERROR) # ctest -S HDF5config.cmake,OPTION=VALUE -C Release -VV -O test.log # where valid options for OPTION are: # BUILD_GENERATOR - The cmake build generator: -# Unix * Unix Makefiles +# Unix * Unix Makefiles # VS2017 * Visual Studio 15 2017 -# VS201764 * Visual Studio 15 2017 Win64 +# VS201764 * Visual Studio 15 2017 Win64 # VS2015 * Visual Studio 14 2015 -# VS201564 * Visual Studio 14 2015 Win64 +# VS201564 * Visual Studio 14 2015 Win64 # VS2013 * Visual Studio 12 2013 -# VS201364 * Visual Studio 12 2013 Win64 +# VS201364 * Visual Studio 12 2013 Win64 # # INSTALLDIR - root folder where hdf5 is installed # CTEST_CONFIGURATION_TYPE - Release, Debug, etc diff --git a/release_docs/RELEASE.txt b/release_docs/RELEASE.txt index 3bba0d2..c35c195 100644 --- a/release_docs/RELEASE.txt +++ b/release_docs/RELEASE.txt @@ -277,6 +277,15 @@ Bug Fixes since HDF5-1.10.0-patch1 release Tools ----- + - h5repack + + h5repack always set the User Defined filter flag to H5Z_FLAG_MANDATORY. + + Added another parameter to the 'UD=' option to set the flag by default + to '0' or H5Z_FLAG_MANDATORY, the other choice is '1' or H5Z_FLAG_OPTIONAL. + + (ADB - 2017/08/31, HDFFV-10276) + - h5ls h5ls generated error on stack when it encountered a H5S_NULL diff --git a/tools/src/h5repack/h5repack.h b/tools/src/h5repack/h5repack.h index e5ae03f..c8c6a0e 100644 --- a/tools/src/h5repack/h5repack.h +++ b/tools/src/h5repack/h5repack.h @@ -61,6 +61,7 @@ typedef struct { typedef struct { H5Z_filter_t filtn; /* filter identification number */ + unsigned filt_flag; /* filter definition flag */ unsigned cd_values[CD_VALUES]; /* filter client data values */ size_t cd_nelmts; /* filter client number of values */ } filter_info_t; diff --git a/tools/src/h5repack/h5repack_filters.c b/tools/src/h5repack/h5repack_filters.c index c48158c..5ccb2ef 100644 --- a/tools/src/h5repack/h5repack_filters.c +++ b/tools/src/h5repack/h5repack_filters.c @@ -402,7 +402,7 @@ int apply_filters(const char* name, /* object name from traverse list */ default: { if (H5Pset_filter(dcpl_id, obj.filter[i].filtn, - H5Z_FLAG_MANDATORY, obj.filter[i].cd_nelmts, + obj.filter[i].filt_flag, obj.filter[i].cd_nelmts, obj.filter[i].cd_values) < 0) return -1; if (H5Pset_chunk(dcpl_id, obj.chunk.rank, obj.chunk.chunk_lengths) < 0) diff --git a/tools/src/h5repack/h5repack_main.c b/tools/src/h5repack/h5repack_main.c index 31b1e14..136d550 100644 --- a/tools/src/h5repack/h5repack_main.c +++ b/tools/src/h5repack/h5repack_main.c @@ -101,7 +101,7 @@ static void usage(const char *prog) { PRINTVALSTREAM(rawoutstream, " -T FS_THRESHOLD, --fs_threshold=FS_THRESHOLD Free-space section threshold for H5Pset_file_space_strategy\n"); PRINTVALSTREAM(rawoutstream, " -G FS_PAGESIZE, --fs_pagesize=FS_PAGESIZE File space page size for H5Pset_file_space_page_size\n"); PRINTVALSTREAM(rawoutstream, "\n"); - PRINTVALSTREAM(rawoutstream, " M - is an integer greater than 1, size of dataset in bytes (default is 0) \n"); + PRINTVALSTREAM(rawoutstream, " M - is an integer greater than 1, size of dataset in bytes (default is 0)\n"); PRINTVALSTREAM(rawoutstream, " E - is a filename.\n"); PRINTVALSTREAM(rawoutstream, " S - is an integer\n"); PRINTVALSTREAM(rawoutstream, " U - is a filename.\n"); @@ -164,8 +164,8 @@ static void usage(const char *prog) { PRINTVALSTREAM(rawoutstream, " NBIT (no parameter)\n"); PRINTVALSTREAM(rawoutstream, " SOFF= scale_factor is an integer and scale_type\n"); PRINTVALSTREAM(rawoutstream, " is either IN or DS\n"); - PRINTVALSTREAM(rawoutstream, " UD=\n"); - PRINTVALSTREAM(rawoutstream, " required values for filter_number,cd_value_count,value_1\n"); + PRINTVALSTREAM(rawoutstream, " UD=\n"); + PRINTVALSTREAM(rawoutstream, " required values for filter_number,filter_flag,cd_value_count,value_1\n"); PRINTVALSTREAM(rawoutstream, " optional values for value_2 to value_N\n"); PRINTVALSTREAM(rawoutstream, " NONE (no parameter)\n"); PRINTVALSTREAM(rawoutstream, "\n"); @@ -209,7 +209,7 @@ static void usage(const char *prog) { PRINTVALSTREAM(rawoutstream, "\n"); PRINTVALSTREAM(rawoutstream, " Add both filters SHUF and GZIP in this order to all datasets\n"); PRINTVALSTREAM(rawoutstream, "\n"); - PRINTVALSTREAM(rawoutstream, "6) h5repack -f UD=307,1,9 file1 file2 \n"); + PRINTVALSTREAM(rawoutstream, "6) h5repack -f UD=307,0,1,9 file1 file2 \n"); PRINTVALSTREAM(rawoutstream, "\n"); PRINTVALSTREAM(rawoutstream, " Add bzip2 filter to all datasets\n"); PRINTVALSTREAM(rawoutstream, "\n"); diff --git a/tools/src/h5repack/h5repack_parse.c b/tools/src/h5repack/h5repack_parse.c index a9a890d..4d62723 100644 --- a/tools/src/h5repack/h5repack_parse.c +++ b/tools/src/h5repack/h5repack_parse.c @@ -42,7 +42,7 @@ obj_list_t* parse_filter(const char *str, unsigned *n_objs, filter_info_t *filt, size_t i, m, u; char c; size_t len = HDstrlen(str); - int k, l, p, q, end_obj = -1, no_param = 0; + int f, k, l, p, q, end_obj = -1, no_param = 0; unsigned j, n; char sobj[MAX_NC_NAME]; char scomp[10] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; @@ -209,13 +209,14 @@ obj_list_t* parse_filter(const char *str, unsigned *n_objs, filter_info_t *filt, /*------------------------------------------------------------------------- * User Defined - * has the format UD= + * has the format UD= * BZIP2 example - * UD=307,1,9 + * UD=307,0,1,9 *------------------------------------------------------------------------- */ else if (HDstrcmp(scomp, "UD") == 0) { l = -1; /* filter number index check */ + f = -1; /* filter flag index check */ p = -1; /* CD_VAL count check */ for (m = 0, q = 0, u = i + 1; u < len; u++, m++, q++) { if (str[u] == ',') { @@ -224,6 +225,10 @@ obj_list_t* parse_filter(const char *str, unsigned *n_objs, filter_info_t *filt, filt->filtn = HDatoi(stype); l = 0; } + else if (f == -1) { + filt->filt_flag = HDstrtoul(stype, NULL, 0); + f = 0; + } else if (p == -1) { filt->cd_nelmts = HDstrtoull(stype, NULL, 0); p = 0; @@ -240,6 +245,12 @@ obj_list_t* parse_filter(const char *str, unsigned *n_objs, filter_info_t *filt, error_msg("filter number parameter is not a digit in <%s>\n", str); HDexit(EXIT_FAILURE); } + else if (!HDisdigit(c) && f == -1) { + if (obj_list) + HDfree(obj_list); + error_msg("filter flag parameter is not a digit in <%s>\n", str); + HDexit(EXIT_FAILURE); + } stype[q] = c; } /* for u */ stype[q] = '\0'; diff --git a/tools/test/h5repack/CMakeTests.cmake b/tools/test/h5repack/CMakeTests.cmake index 225f6a8..dfdbb14 100644 --- a/tools/test/h5repack/CMakeTests.cmake +++ b/tools/test/h5repack/CMakeTests.cmake @@ -1256,15 +1256,15 @@ ############################################################################## ### P L U G I N T E S T S ############################################################################## - ADD_H5_UD_TEST (plugin_version_test 0 h5repack_layout.h5 -v -f UD=260,4,9,${H5_VERS_MAJOR},${H5_VERS_MINOR},${H5_VERS_RELEASE}) - ADD_H5_UD_TEST (plugin_test 0 h5repack_layout.h5 -v -f UD=257,1,9) + ADD_H5_UD_TEST (plugin_version_test 0 h5repack_layout.h5 -v -f UD=260,0,4,9,${H5_VERS_MAJOR},${H5_VERS_MINOR},${H5_VERS_RELEASE}) + ADD_H5_UD_TEST (plugin_test 0 h5repack_layout.h5 -v -f UD=257,0,1,9) ADD_H5_UD_TEST (plugin_none 0 h5repack_layout.UD.h5 -v -f NONE) # check for no parameters set (TESTRETVAL 255) if (WIN32) set (TESTRETVAL -1) endif () - ADD_H5_CMP_TEST (plugin_zero "" "TEST" ${TESTRETVAL} h5repack_layout.h5 -v -f UD=250,0) + ADD_H5_CMP_TEST (plugin_zero "" "TEST" ${TESTRETVAL} h5repack_layout.h5 -v -f UD=250,0,0) if (HDF5_TEST_VFD) # Run test with different Virtual File Driver diff --git a/tools/test/h5repack/h5repack_plugin.sh.in b/tools/test/h5repack/h5repack_plugin.sh.in index c9fe53c..5efd9e8 100644 --- a/tools/test/h5repack/h5repack_plugin.sh.in +++ b/tools/test/h5repack/h5repack_plugin.sh.in @@ -1,10 +1,10 @@ #! /bin/sh # -# 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 +# Copyright by The HDF Group. +# All rights reserved. +# +# This file is part of HDF5. The full HDF5 copyright notice, including +# terms governing use, modification, and redistribution, is contained in # the COPYING file, which can be found at the root of the source code # distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. # If you do not have access to either file, you may request a copy from @@ -247,10 +247,10 @@ COPY_TESTFILES_TO_TESTDIR version_str=`echo @H5_VERSION@ | awk -F"-" '{print $1}' | sed 's/\./,/g'` # Run the test -arg="h5repack_layout.h5 -v -f UD=260,4,9,$version_str" +arg="h5repack_layout.h5 -v -f UD=260,0,4,9,$version_str" TOOLTEST_DUMP plugin_version_test $arg -arg="h5repack_layout.h5 -v -f UD=257,1,9" +arg="h5repack_layout.h5 -v -f UD=257,0,1,9" TOOLTEST_DUMP plugin_test $arg #arg="h5repack_layout.UD.h5 -v -f NONE" diff --git a/tools/test/h5repack/testfiles/h5repack-help.txt b/tools/test/h5repack/testfiles/h5repack-help.txt index 65edd89..1ff5b73 100644 --- a/tools/test/h5repack/testfiles/h5repack-help.txt +++ b/tools/test/h5repack/testfiles/h5repack-help.txt @@ -26,7 +26,7 @@ usage: h5repack [OPTIONS] file1 file2 -T FS_THRESHOLD, --fs_threshold=FS_THRESHOLD Free-space section threshold for H5Pset_file_space_strategy -G FS_PAGESIZE, --fs_pagesize=FS_PAGESIZE File space page size for H5Pset_file_space_page_size - M - is an integer greater than 1, size of dataset in bytes (default is 0) + M - is an integer greater than 1, size of dataset in bytes (default is 0) E - is a filename. S - is an integer U - is a filename. @@ -89,8 +89,8 @@ usage: h5repack [OPTIONS] file1 file2 NBIT (no parameter) SOFF= scale_factor is an integer and scale_type is either IN or DS - UD= - required values for filter_number,cd_value_count,value_1 + UD= + required values for filter_number,filter_flag,cd_value_count,value_1 optional values for value_2 to value_N NONE (no parameter) @@ -125,16 +125,16 @@ Examples of use: Chunked layout, with a layout size of 20x10, to objects dset1 and dset2 and remove filters to objects dset3, dset4, dset5 -4) h5repack -L -c 10 -s 20:dtype file1 file2 +4) h5repack -L -c 10 -s 20:dtype file1 file2 Using latest file format with maximum compact group size of 10 and and minimum shared datatype size of 20 -5) h5repack -f SHUF -f GZIP=1 file1 file2 +5) h5repack -f SHUF -f GZIP=1 file1 file2 Add both filters SHUF and GZIP in this order to all datasets -6) h5repack -f UD=307,1,9 file1 file2 +6) h5repack -f UD=307,0,1,9 file1 file2 Add bzip2 filter to all datasets -- cgit v0.12 From 10676247a825627feea046d025170b4c6849cc83 Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Fri, 8 Sep 2017 09:31:04 -0500 Subject: HDFFV-10276 Remove whitespace --- tools/src/h5repack/h5repack_main.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tools/src/h5repack/h5repack_main.c b/tools/src/h5repack/h5repack_main.c index 136d550..a3f5678 100644 --- a/tools/src/h5repack/h5repack_main.c +++ b/tools/src/h5repack/h5repack_main.c @@ -200,16 +200,16 @@ static void usage(const char *prog) { PRINTVALSTREAM(rawoutstream, " Chunked layout, with a layout size of 20x10, to objects dset1 and dset2\n"); PRINTVALSTREAM(rawoutstream, " and remove filters to objects dset3, dset4, dset5\n"); PRINTVALSTREAM(rawoutstream, "\n"); - PRINTVALSTREAM(rawoutstream, "4) h5repack -L -c 10 -s 20:dtype file1 file2 \n"); + PRINTVALSTREAM(rawoutstream, "4) h5repack -L -c 10 -s 20:dtype file1 file2\n"); PRINTVALSTREAM(rawoutstream, "\n"); PRINTVALSTREAM(rawoutstream, " Using latest file format with maximum compact group size of 10 and\n"); PRINTVALSTREAM(rawoutstream, " and minimum shared datatype size of 20\n"); PRINTVALSTREAM(rawoutstream, "\n"); - PRINTVALSTREAM(rawoutstream, "5) h5repack -f SHUF -f GZIP=1 file1 file2 \n"); + PRINTVALSTREAM(rawoutstream, "5) h5repack -f SHUF -f GZIP=1 file1 file2\n"); PRINTVALSTREAM(rawoutstream, "\n"); PRINTVALSTREAM(rawoutstream, " Add both filters SHUF and GZIP in this order to all datasets\n"); PRINTVALSTREAM(rawoutstream, "\n"); - PRINTVALSTREAM(rawoutstream, "6) h5repack -f UD=307,0,1,9 file1 file2 \n"); + PRINTVALSTREAM(rawoutstream, "6) h5repack -f UD=307,0,1,9 file1 file2\n"); PRINTVALSTREAM(rawoutstream, "\n"); PRINTVALSTREAM(rawoutstream, " Add bzip2 filter to all datasets\n"); PRINTVALSTREAM(rawoutstream, "\n"); -- cgit v0.12 From 884d926a3e6e4cda60586cacaa9c7decdb0aa0eb Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Fri, 8 Sep 2017 16:56:43 -0500 Subject: HDFFV-9774 Fix code merge whitespace --- tools/lib/h5diff_array.c | 5814 ++++++++++++++++++---------------------------- 1 file changed, 2231 insertions(+), 3583 deletions(-) diff --git a/tools/lib/h5diff_array.c b/tools/lib/h5diff_array.c index 7236ad1..68a9575 100644 --- a/tools/lib/h5diff_array.c +++ b/tools/lib/h5diff_array.c @@ -17,7 +17,6 @@ #include "h5diff.h" #include "ph5diff.h" - /*------------------------------------------------------------------------- * printf formatting *------------------------------------------------------------------------- @@ -66,9 +65,8 @@ #define LLI_FORMAT_P_NOTCOMP "%-15" H5_PRINTF_LL_WIDTH "d %-15" H5_PRINTF_LL_WIDTH "d %-15" H5_PRINTF_LL_WIDTH "d not comparable\n" #define ULLI_FORMAT_P_NOTCOMP "%-15" H5_PRINTF_LL_WIDTH "u %-15" H5_PRINTF_LL_WIDTH "u %-15" H5_PRINTF_LL_WIDTH "d not comparable\n" - /* if system EPSILON is defined, use the system EPSILON; otherwise, use - constants that are close to most EPSILON values */ + constants that are close to most EPSILON values */ #ifndef FLT_EPSILON #define FLT_EPSILON 1.19209E-07 @@ -78,7 +76,6 @@ #define DBL_EPSILON 2.22045E-16 #endif - /*------------------------------------------------------------------------- * -p relative error formula * @@ -108,7 +105,6 @@ static hbool_t not_comparable; not_comparable = TRUE; \ } - #define PER_UNSIGN(TYPE,A,B) { \ per = -1; \ not_comparable = FALSE; \ @@ -121,210 +117,110 @@ static hbool_t not_comparable; not_comparable = TRUE; \ } - #define PDIFF(a,b) (((b) > (a)) ? ((b) - (a)) : ((a) -(b))) -typedef struct mcomp_t -{ - unsigned n; /* number of members */ - hid_t *ids; /* member type id */ - size_t *offsets; - struct mcomp_t **m; /* members */ -}mcomp_t; - +typedef struct mcomp_t { + unsigned n; /* number of members */ + hid_t *ids; /* member type id */ + size_t *offsets; + struct mcomp_t **m; /* members */ +} mcomp_t; /*------------------------------------------------------------------------- * local prototypes *------------------------------------------------------------------------- */ -static hsize_t diff_region(hid_t obj1_id, hid_t obj2_id,hid_t region1_id, hid_t region2_id, diff_opt_t *options); +static hsize_t diff_region(hid_t obj1_id, hid_t obj2_id, hid_t region1_id, + hid_t region2_id, diff_opt_t *options); static hbool_t all_zero(const void *_mem, size_t size); -static int ull2float(unsigned long long ull_value, float *f_value); -static hsize_t character_compare(char *mem1,char *mem2,hsize_t i,size_t u,int rank,hsize_t *dims,hsize_t *acc,hsize_t *pos,diff_opt_t *options,const char *obj1,const char *obj2,int *ph); -static hsize_t character_compare_opt(unsigned char *mem1,unsigned char *mem2,hsize_t i,int rank,hsize_t *dims,hsize_t *acc,hsize_t *pos,diff_opt_t *options,const char *obj1,const char *obj2,int *ph); +static int ull2float(unsigned long long ull_value, float *f_value); +static hsize_t character_compare(char *mem1, char *mem2, hsize_t i, size_t u, + int rank, hsize_t *dims, hsize_t *acc, hsize_t *pos, + diff_opt_t *options, const char *obj1, const char *obj2, int *ph); +static hsize_t character_compare_opt(unsigned char *mem1, unsigned char *mem2, + hsize_t i, int rank, hsize_t *dims, hsize_t *acc, hsize_t *pos, + diff_opt_t *options, const char *obj1, const char *obj2, int *ph); static hbool_t equal_float(float value, float expected, diff_opt_t *options); static hbool_t equal_double(double value, double expected, diff_opt_t *options); #if H5_SIZEOF_LONG_DOUBLE !=0 static hbool_t equal_ldouble(long double value, long double expected, diff_opt_t *options); #endif static int print_data(diff_opt_t *options); -static void print_pos(int *ph,int pp,hsize_t curr_pos,hsize_t *acc,hsize_t *pos,int rank,hsize_t *dims,const char *obj1,const char *obj2 ); -static void print_char_pos(int *ph,int pp,hsize_t curr_pos,size_t u,hsize_t *acc,hsize_t *pos,int rank,hsize_t *dims,const char *obj1,const char *obj2 ); +static void print_pos(int *ph, int pp, hsize_t curr_pos, hsize_t *acc, + hsize_t *pos, int rank, hsize_t *dims, const char *obj1, + const char *obj2); +static void print_char_pos(int *ph, int pp, hsize_t curr_pos, size_t u, + hsize_t *acc, hsize_t *pos, int rank, hsize_t *dims, const char *obj1, + const char *obj2); static void h5diff_print_char(char ch); -static hsize_t diff_datum(void *_mem1, - void *_mem2, - hid_t m_type, - hsize_t i, - int rank, - hsize_t *dims, - hsize_t *acc, - hsize_t *pos, - diff_opt_t *options, - const char *obj1, - const char *obj2, - hid_t container1_id, - hid_t container2_id, /*where the reference came from*/ - int *ph, /*print header */ - mcomp_t *members); /*compound members */ -static hsize_t diff_float(unsigned char *mem1, - unsigned char *mem2, - hsize_t nelmts, - hsize_t hyper_start, - int rank, - hsize_t *dims, - hsize_t *acc, - hsize_t *pos, - diff_opt_t *options, - const char *obj1, - const char *obj2, - int *ph); -static hsize_t diff_double(unsigned char *mem1, - unsigned char *mem2, - hsize_t nelmts, - hsize_t hyper_start, - int rank, - hsize_t *dims, - hsize_t *acc, - hsize_t *pos, - diff_opt_t *options, - const char *obj1, - const char *obj2, - int *ph); +static hsize_t diff_datum(void *_mem1, void *_mem2, hid_t m_type, hsize_t index, + int rank, hsize_t *dims, hsize_t *acc, hsize_t *pos, + diff_opt_t *options, const char *obj1, const char *obj2, + hid_t container1_id, hid_t container2_id, /*where the reference came from*/ + int *ph, /*print header */ + mcomp_t *members); /*compound members */ +static hsize_t diff_float(unsigned char *mem1, unsigned char *mem2, + hsize_t nelmts, hsize_t hyper_start, int rank, hsize_t *dims, + hsize_t *acc, hsize_t *pos, diff_opt_t *options, const char *obj1, + const char *obj2, int *ph); +static hsize_t diff_double(unsigned char *mem1, unsigned char *mem2, + hsize_t nelmts, hsize_t hyper_start, int rank, hsize_t *dims, + hsize_t *acc, hsize_t *pos, diff_opt_t *options, const char *obj1, + const char *obj2, int *ph); #if H5_SIZEOF_LONG_DOUBLE !=0 static hsize_t diff_ldouble(unsigned char *mem1, - unsigned char *mem2, - hsize_t nelmts, - hsize_t hyper_start, - int rank, - hsize_t *dims, - hsize_t *acc, - hsize_t *pos, - diff_opt_t *options, - const char *obj1, - const char *obj2, - int *ph); + unsigned char *mem2, + hsize_t nelmts, + hsize_t hyper_start, + int rank, + hsize_t *dims, + hsize_t *acc, + hsize_t *pos, + diff_opt_t *options, + const char *obj1, + const char *obj2, + int *ph); #endif -static hsize_t diff_schar(unsigned char *mem1, - unsigned char *mem2, - hsize_t nelmts, - hsize_t hyper_start, - int rank, - hsize_t *dims, - hsize_t *acc, - hsize_t *pos, - diff_opt_t *options, - const char *obj1, - const char *obj2, - int *ph); -static hsize_t diff_uchar(unsigned char *mem1, - unsigned char *mem2, - hsize_t nelmts, - hsize_t hyper_start, - int rank, - hsize_t *dims, - hsize_t *acc, - hsize_t *pos, - diff_opt_t *options, - const char *obj1, - const char *obj2, - int *ph); -static hsize_t diff_short(unsigned char *mem1, - unsigned char *mem2, - hsize_t nelmts, - hsize_t hyper_start, - int rank, - hsize_t *dims, - hsize_t *acc, - hsize_t *pos, - diff_opt_t *options, - const char *obj1, - const char *obj2, - int *ph); -static hsize_t diff_ushort(unsigned char *mem1, - unsigned char *mem2, - hsize_t nelmts, - hsize_t hyper_start, - int rank, - hsize_t *dims, - hsize_t *acc, - hsize_t *pos, - diff_opt_t *options, - const char *obj1, - const char *obj2, - int *ph); -static hsize_t diff_int(unsigned char *mem1, - unsigned char *mem2, - hsize_t nelmts, - hsize_t hyper_start, - int rank, - hsize_t *dims, - hsize_t *acc, - hsize_t *pos, - diff_opt_t *options, - const char *obj1, - const char *obj2, - int *ph); -static hsize_t diff_uint(unsigned char *mem1, - unsigned char *mem2, - hsize_t nelmts, - hsize_t hyper_start, - int rank, - hsize_t *dims, - hsize_t *acc, - hsize_t *pos, - diff_opt_t *options, - const char *obj1, - const char *obj2, - int *ph); -static hsize_t diff_long(unsigned char *mem1, - unsigned char *mem2, - hsize_t nelmts, - hsize_t hyper_start, - int rank, - hsize_t *dims, - hsize_t *acc, - hsize_t *pos, - diff_opt_t *options, - const char *obj1, - const char *obj2, - int *ph); -static hsize_t diff_ulong(unsigned char *mem1, - unsigned char *mem2, - hsize_t nelmts, - hsize_t hyper_start, - int rank, - hsize_t *dims, - hsize_t *acc, - hsize_t *pos, - diff_opt_t *options, - const char *obj1, - const char *obj2, - int *ph); -static hsize_t diff_llong(unsigned char *mem1, - unsigned char *mem2, - hsize_t nelmts, - hsize_t hyper_start, - int rank, - hsize_t *dims, - hsize_t *acc, - hsize_t *pos, - diff_opt_t *options, - const char *obj1, - const char *obj2, - int *ph); -static hsize_t diff_ullong(unsigned char *mem1, - unsigned char *mem2, - hsize_t nelmts, - hsize_t hyper_start, - int rank, - hsize_t *dims, - hsize_t *acc, - hsize_t *pos, - diff_opt_t *options, - const char *obj1, - const char *obj2, - int *ph); - +static hsize_t diff_schar(unsigned char *mem1, unsigned char *mem2, + hsize_t nelmts, hsize_t hyper_start, int rank, hsize_t *dims, + hsize_t *acc, hsize_t *pos, diff_opt_t *options, const char *obj1, + const char *obj2, int *ph); +static hsize_t diff_uchar(unsigned char *mem1, unsigned char *mem2, + hsize_t nelmts, hsize_t hyper_start, int rank, hsize_t *dims, + hsize_t *acc, hsize_t *pos, diff_opt_t *options, const char *obj1, + const char *obj2, int *ph); +static hsize_t diff_short(unsigned char *mem1, unsigned char *mem2, + hsize_t nelmts, hsize_t hyper_start, int rank, hsize_t *dims, + hsize_t *acc, hsize_t *pos, diff_opt_t *options, const char *obj1, + const char *obj2, int *ph); +static hsize_t diff_ushort(unsigned char *mem1, unsigned char *mem2, + hsize_t nelmts, hsize_t hyper_start, int rank, hsize_t *dims, + hsize_t *acc, hsize_t *pos, diff_opt_t *options, const char *obj1, + const char *obj2, int *ph); +static hsize_t diff_int(unsigned char *mem1, unsigned char *mem2, + hsize_t nelmts, hsize_t hyper_start, int rank, hsize_t *dims, + hsize_t *acc, hsize_t *pos, diff_opt_t *options, const char *obj1, + const char *obj2, int *ph); +static hsize_t diff_uint(unsigned char *mem1, unsigned char *mem2, + hsize_t nelmts, hsize_t hyper_start, int rank, hsize_t *dims, + hsize_t *acc, hsize_t *pos, diff_opt_t *options, const char *obj1, + const char *obj2, int *ph); +static hsize_t diff_long(unsigned char *mem1, unsigned char *mem2, + hsize_t nelmts, hsize_t hyper_start, int rank, hsize_t *dims, + hsize_t *acc, hsize_t *pos, diff_opt_t *options, const char *obj1, + const char *obj2, int *ph); +static hsize_t diff_ulong(unsigned char *mem1, unsigned char *mem2, + hsize_t nelmts, hsize_t hyper_start, int rank, hsize_t *dims, + hsize_t *acc, hsize_t *pos, diff_opt_t *options, const char *obj1, + const char *obj2, int *ph); +static hsize_t diff_llong(unsigned char *mem1, unsigned char *mem2, + hsize_t nelmts, hsize_t hyper_start, int rank, hsize_t *dims, + hsize_t *acc, hsize_t *pos, diff_opt_t *options, const char *obj1, + const char *obj2, int *ph); +static hsize_t diff_ullong(unsigned char *mem1, unsigned char *mem2, + hsize_t nelmts, hsize_t hyper_start, int rank, hsize_t *dims, + hsize_t *acc, hsize_t *pos, diff_opt_t *options, const char *obj1, + const char *obj2, int *ph); /*------------------------------------------------------------------------- * NaN detection @@ -337,13 +233,11 @@ typedef enum dtype_t FLT_FLOAT, FLT_DOUBLE, FLT_LDOUBLE -} dtype_t; +}dtype_t; #else -typedef enum dtype_t -{ - FLT_FLOAT, - FLT_DOUBLE +typedef enum dtype_t { + FLT_FLOAT, FLT_DOUBLE } dtype_t; #endif @@ -356,8 +250,6 @@ static hbool_t my_isnan(dtype_t type, void *val); static void get_member_types(hid_t tid, mcomp_t *members); static void close_member_types(mcomp_t *members); - - /*------------------------------------------------------------------------- * Function: diff_array * @@ -372,34 +264,35 @@ static void close_member_types(mcomp_t *members); *------------------------------------------------------------------------- */ -hsize_t diff_array( void *_mem1, - void *_mem2, - hsize_t nelmts, - hsize_t hyper_start, - int rank, - hsize_t *dims, - diff_opt_t *options, - const char *name1, - const char *name2, - hid_t m_type, - hid_t container1_id, - hid_t container2_id) /* dataset where the reference came from*/ +hsize_t diff_array( + void *_mem1, + void *_mem2, + hsize_t nelmts, + hsize_t hyper_start, + int rank, + hsize_t *dims, + diff_opt_t *options, + const char *name1, + const char *name2, + hid_t m_type, + hid_t container1_id, + hid_t container2_id) /* dataset where the reference came from*/ { - hsize_t nfound=0; /* number of differences found */ - size_t size; /* size of datum */ - unsigned char *mem1 = (unsigned char*)_mem1; - unsigned char *mem2 = (unsigned char*)_mem2; - hsize_t acc[32]; /* accumulator position */ - hsize_t pos[32]; /* matrix position */ - int ph=1; /* print header */ - hsize_t i; - int j; - mcomp_t members; - H5T_class_t type_class; + hsize_t nfound = 0; /* number of differences found */ + size_t size; /* size of datum */ + unsigned char *mem1 = (unsigned char*) _mem1; + unsigned char *mem2 = (unsigned char*) _mem2; + hsize_t acc[32]; /* accumulator position */ + hsize_t pos[32]; /* matrix position */ + int ph = 1; /* print header */ + hsize_t i; + int j; + mcomp_t members; + H5T_class_t type_class; h5difftrace("diff_array start\n"); /* get the size. */ - size = H5Tget_size( m_type ); + size = H5Tget_size(m_type); type_class = H5Tget_class(m_type); /* Fast comparison first for atomic type by memcmp(). @@ -407,26 +300,22 @@ hsize_t diff_array( void *_mem1, * by the condition, but it gives more clarity for code planning */ if (type_class != H5T_REFERENCE && - type_class != H5T_COMPOUND && - type_class != H5T_STRING && - type_class != H5T_VLEN && - HDmemcmp(mem1, mem2, size*nelmts)==0) + type_class != H5T_COMPOUND && + type_class != H5T_STRING && + type_class != H5T_VLEN && + HDmemcmp(mem1, mem2, size*nelmts) == 0) return 0; - if ( rank > 0 ) - { - - acc[rank-1]=1; - for(j=(rank-2); j>=0; j--) - { - acc[j]=acc[j+1]*dims[j+1]; + if (rank > 0) { + acc[rank - 1] = 1; + for (j = (rank - 2); j >= 0; j--) { + acc[j] = acc[j + 1] * dims[j + 1]; } - for ( j = 0; j < rank; j++) - pos[j]=0; + for (j = 0; j < rank; j++) + pos[j] = 0; } - switch (type_class) - { + switch (type_class) { case H5T_NO_CLASS: case H5T_TIME: case H5T_NCLASSES: @@ -434,52 +323,48 @@ hsize_t diff_array( void *_mem1, HDassert(0); break; - /*------------------------------------------------------------------------- - * float and integer atomic types - *------------------------------------------------------------------------- - */ - + /*------------------------------------------------------------------------- + * float and integer atomic types + *------------------------------------------------------------------------- + */ case H5T_FLOAT: if (H5Tequal(m_type, H5T_NATIVE_FLOAT)) - nfound=diff_float(mem1,mem2,nelmts,hyper_start,rank,dims,acc,pos,options,name1,name2,&ph); + nfound = diff_float(mem1, mem2, nelmts, hyper_start, rank, dims, acc, pos, options, name1, name2, &ph); else if (H5Tequal(m_type, H5T_NATIVE_DOUBLE)) - nfound=diff_double(mem1,mem2,nelmts,hyper_start,rank,dims,acc,pos,options,name1,name2,&ph); -#if H5_SIZEOF_LONG_DOUBLE !=0 + nfound = diff_double(mem1, mem2, nelmts, hyper_start, rank, dims, acc, pos, options, name1, name2, &ph); +#if H5_SIZEOF_LONG_DOUBLE != 0 else if (H5Tequal(m_type, H5T_NATIVE_LDOUBLE)) - nfound=diff_ldouble(mem1,mem2,nelmts,hyper_start,rank,dims,acc,pos,options,name1,name2,&ph); + nfound = diff_ldouble(mem1, mem2, nelmts, hyper_start, rank, dims, acc, pos, options, name1, name2, &ph); #endif break; case H5T_INTEGER: - if (H5Tequal(m_type, H5T_NATIVE_SCHAR)) - nfound=diff_schar(mem1,mem2,nelmts,hyper_start,rank,dims,acc,pos,options,name1,name2,&ph); + nfound = diff_schar(mem1, mem2, nelmts, hyper_start, rank, dims, acc, pos, options, name1, name2, &ph); else if (H5Tequal(m_type, H5T_NATIVE_UCHAR)) - nfound=diff_uchar(mem1,mem2,nelmts,hyper_start,rank,dims,acc,pos,options,name1,name2,&ph); + nfound = diff_uchar(mem1, mem2, nelmts, hyper_start, rank, dims, acc, pos, options, name1, name2, &ph); else if (H5Tequal(m_type, H5T_NATIVE_SHORT)) - nfound=diff_short(mem1,mem2,nelmts,hyper_start,rank,dims,acc,pos,options,name1,name2,&ph); + nfound = diff_short(mem1, mem2, nelmts, hyper_start, rank, dims, acc, pos, options, name1, name2, &ph); else if (H5Tequal(m_type, H5T_NATIVE_USHORT)) - nfound=diff_ushort(mem1,mem2,nelmts,hyper_start,rank,dims,acc,pos,options,name1,name2,&ph); + nfound = diff_ushort(mem1, mem2, nelmts, hyper_start, rank, dims, acc, pos, options, name1, name2, &ph); else if (H5Tequal(m_type, H5T_NATIVE_INT)) - nfound=diff_int(mem1,mem2,nelmts,hyper_start,rank,dims,acc,pos,options,name1,name2,&ph); + nfound = diff_int(mem1, mem2, nelmts, hyper_start, rank, dims, acc, pos, options, name1, name2, &ph); else if (H5Tequal(m_type, H5T_NATIVE_UINT)) - nfound=diff_uint(mem1,mem2,nelmts,hyper_start,rank,dims,acc,pos,options,name1,name2,&ph); + nfound = diff_uint(mem1, mem2, nelmts, hyper_start, rank, dims, acc, pos, options, name1, name2, &ph); else if (H5Tequal(m_type, H5T_NATIVE_LONG)) - nfound=diff_long(mem1,mem2,nelmts,hyper_start,rank,dims,acc,pos,options,name1,name2,&ph); + nfound = diff_long(mem1, mem2, nelmts, hyper_start, rank, dims, acc, pos, options, name1, name2, &ph); else if (H5Tequal(m_type, H5T_NATIVE_ULONG)) - nfound=diff_ulong(mem1,mem2,nelmts,hyper_start,rank,dims,acc,pos,options,name1,name2,&ph); + nfound = diff_ulong(mem1, mem2, nelmts, hyper_start, rank, dims, acc, pos, options, name1, name2, &ph); else if (H5Tequal(m_type, H5T_NATIVE_LLONG)) - nfound=diff_llong(mem1,mem2,nelmts,hyper_start,rank,dims,acc,pos,options,name1,name2,&ph); + nfound = diff_llong(mem1, mem2, nelmts, hyper_start, rank, dims, acc, pos, options, name1, name2, &ph); else if (H5Tequal(m_type, H5T_NATIVE_ULLONG)) - nfound=diff_ullong(mem1,mem2,nelmts,hyper_start,rank,dims,acc,pos,options,name1,name2,&ph); - + nfound = diff_ullong(mem1, mem2, nelmts, hyper_start, rank, dims, acc, pos, options, name1, name2, &ph); break; /*------------------------------------------------------------------------- * Other types than float and integer *------------------------------------------------------------------------- */ - case H5T_COMPOUND: case H5T_STRING: case H5T_BITFIELD: @@ -488,27 +373,12 @@ hsize_t diff_array( void *_mem1, case H5T_ARRAY: case H5T_VLEN: case H5T_REFERENCE: - HDmemset(&members, 0, sizeof (mcomp_t)); + HDmemset(&members, 0, sizeof(mcomp_t)); get_member_types(m_type, &members); - for ( i = 0; i < nelmts; i++) - { - nfound+=diff_datum( - mem1 + i * size, - mem2 + i * size, /* offset */ - m_type, - i, - rank, - dims, - acc, - pos, - options, - name1, - name2, - container1_id, - container2_id, - &ph, &members); - if (options->n && nfound>=options->count) - { + for (i = 0; i < nelmts; i++) { + nfound += diff_datum(mem1 + i * size, mem2 + i * size, m_type, i, rank, dims, acc, pos, options, + name1, name2, container1_id, container2_id, &ph, &members); + if (options->n && nfound >= options->count) { close_member_types(&members); return nfound; } @@ -557,45 +427,46 @@ hsize_t diff_array( void *_mem1, * Dereference the object and compare the type (basic object type). *------------------------------------------------------------------------- */ -static hsize_t diff_datum(void *_mem1, - void *_mem2, - hid_t m_type, - hsize_t i, - int rank, - hsize_t *dims, - hsize_t *acc, - hsize_t *pos, - diff_opt_t *options, - const char *obj1, - const char *obj2, - hid_t container1_id, - hid_t container2_id, /*where the reference came from*/ - int *ph, /*print header */ - mcomp_t *members) /*compound members */ +static hsize_t diff_datum( + void *_mem1, + void *_mem2, + hid_t m_type, + hsize_t index, + int rank, + hsize_t *dims, + hsize_t *acc, + hsize_t *pos, + diff_opt_t *options, + const char *obj1, + const char *obj2, + hid_t container1_id, + hid_t container2_id, /*where the reference came from*/ + int *ph, /*print header */ + mcomp_t *members) /*compound members */ { - unsigned char *mem1 = (unsigned char*)_mem1; - unsigned char *mem2 = (unsigned char*)_mem2; - size_t u; - hid_t memb_type; - size_t type_size; - H5T_sign_t type_sign; - H5T_class_t type_class; - size_t offset; - unsigned nmembs; - unsigned j; - hsize_t nelmts; - size_t size=0; - hbool_t iszero1; - hbool_t iszero2; - hid_t obj1_id; - hid_t obj2_id; - hsize_t nfound=0; /* differences found */ - int ret=0; /* check return error */ - double per; - hbool_t both_zero; + unsigned char *mem1 = (unsigned char*) _mem1; + unsigned char *mem2 = (unsigned char*) _mem2; + size_t u; + hid_t memb_type; + size_t type_size; + H5T_sign_t type_sign; + H5T_class_t type_class; + size_t offset; + unsigned nmembs; + unsigned j; + hsize_t nelmts; + size_t size = 0; + hbool_t iszero1; + hbool_t iszero2; + hid_t obj1_id; + hid_t obj2_id; + hsize_t nfound = 0; /* differences found */ + int ret = 0; /* check return error */ + double per; + hbool_t both_zero; h5difftrace("diff_datum start\n"); - type_size = H5Tget_size( m_type ); + type_size = H5Tget_size(m_type); type_class = H5Tget_class(m_type); /* Fast comparison first for atomic type by memcmp(). @@ -603,14 +474,13 @@ static hsize_t diff_datum(void *_mem1, * by the condition, but it gives more clarity for code planning */ if (type_class != H5T_REFERENCE && - type_class != H5T_COMPOUND && - type_class != H5T_STRING && - type_class != H5T_VLEN && - HDmemcmp(mem1, mem2, type_size)==0) + type_class != H5T_COMPOUND && + type_class != H5T_STRING && + type_class != H5T_VLEN && + HDmemcmp(mem1, mem2, type_size) == 0) return 0; - switch (H5Tget_class(m_type)) - { + switch (H5Tget_class(m_type)) { case H5T_NO_CLASS: case H5T_TIME: case H5T_NCLASSES: @@ -618,68 +488,53 @@ static hsize_t diff_datum(void *_mem1, HDassert(0); break; - /*------------------------------------------------------------------------- - * H5T_COMPOUND - *------------------------------------------------------------------------- - */ + /*------------------------------------------------------------------------- + * H5T_COMPOUND + *------------------------------------------------------------------------- + */ case H5T_COMPOUND: h5difftrace("diff_datum H5T_COMPOUND\n"); nmembs = members->n; - - for (j = 0; j < nmembs; j++) - { - offset = members->offsets[j]; + for (j = 0; j < nmembs; j++) { + offset = members->offsets[j]; memb_type = members->ids[j]; - nfound+=diff_datum( - mem1 + offset, - mem2 + offset, - memb_type, - i, - rank, - dims, - acc, - pos, - options, - obj1, - obj2, - container1_id, - container2_id, - ph, members->m[j]); + nfound += diff_datum(mem1 + offset, mem2 + offset, memb_type, index, + rank, dims, acc, pos, options, obj1, obj2, container1_id, container2_id, ph, members->m[j]); } break; - /*------------------------------------------------------------------------- - * H5T_STRING - *------------------------------------------------------------------------- - */ + /*------------------------------------------------------------------------- + * H5T_STRING + *------------------------------------------------------------------------- + */ case H5T_STRING: h5difftrace("diff_datum H5T_STRING\n"); { - char *s = NULL; - char *sx = NULL; - char *s1 = NULL; - char *s2 = NULL; - size_t size1; - size_t size2; - size_t sizex; - size_t size_mtype = H5Tget_size(m_type); - H5T_str_t pad = H5Tget_strpad(m_type); + char *s = NULL; + char *sx = NULL; + char *s1 = NULL; + char *s2 = NULL; + size_t size1; + size_t size2; + size_t sizex; + size_t size_mtype = H5Tget_size(m_type); + H5T_str_t pad = H5Tget_strpad(m_type); /* if variable length string */ - if(H5Tis_variable_str(m_type)) { + if (H5Tis_variable_str(m_type)) { h5difftrace("diff_datum H5T_STRING variable\n"); /* Get pointer to first string */ s1 = *(char**) mem1; - if(s1) + if (s1) size1 = HDstrlen(s1); else size1 = 0; /* Get pointer to second string */ s2 = *(char**) mem2; - if(s2) + if (s2) size2 = HDstrlen(s2); else size2 = 0; @@ -688,7 +543,7 @@ static hsize_t diff_datum(void *_mem1, h5difftrace("diff_datum H5T_STRING null term\n"); /* Get pointer to first string */ s1 = (char*) mem1; - if(s1) + if (s1) size1 = HDstrlen(s1); else size1 = 0; @@ -696,7 +551,7 @@ static hsize_t diff_datum(void *_mem1, size1 = size_mtype; /* Get pointer to second string */ s2 = (char*) mem2; - if(s2) + if (s2) size2 = HDstrlen(s2); else size2 = 0; @@ -705,10 +560,10 @@ static hsize_t diff_datum(void *_mem1, } else { /* Get pointer to first string */ - s1 = (char *)mem1; + s1 = (char *) mem1; size1 = size_mtype; /* Get pointer to second string */ - s2 = (char *)mem2; + s2 = (char *) mem2; size2 = size_mtype; } @@ -720,11 +575,11 @@ static hsize_t diff_datum(void *_mem1, */ h5diffdebug2("diff_datum string size:%d\n",size1); h5diffdebug2("diff_datum string size:%d\n",size2); - if(size1 != size2) { + if (size1 != size2) { h5difftrace("diff_datum string sizes\n"); nfound++; } - if(size1 < size2) { + if (size1 < size2) { size = size1; s = s1; sizex = size2; @@ -738,68 +593,30 @@ static hsize_t diff_datum(void *_mem1, } /* check for NULL pointer for string */ - if(s!=NULL) { + if (s != NULL) { /* try fast compare first */ - if(HDmemcmp(s1, s2, size)==0) { - if(size1 != size2) - if(print_data(options)) - for (u=size; u= 1 && ndims <= H5S_MAX_RANK); /* calculate the number of array elements */ - for (u = 0, nelmts = 1; u < (unsigned)ndims; u++) + for (u = 0, nelmts = 1; u < (unsigned) ndims; u++) nelmts *= adims[u]; for (u = 0; u < nelmts; u++) { - nfound += diff_datum( - mem1 + u * size, - mem2 + u * size, /* offset */ - memb_type, - i, /* index position */ - rank, - dims, - acc, - pos, - options, - obj1, - obj2, - container1_id, - container2_id, - ph, members); + nfound += diff_datum(mem1 + u * size, mem2 + u * size, memb_type, index, + rank, dims, acc, pos, options, obj1, obj2, container1_id, container2_id, ph, members); } H5Tclose(memb_type); } break; - - - /*------------------------------------------------------------------------- - * H5T_REFERENCE - *------------------------------------------------------------------------- - */ - + /*------------------------------------------------------------------------- + * H5T_REFERENCE + *------------------------------------------------------------------------- + */ case H5T_REFERENCE: - - iszero1=all_zero(_mem1, H5Tget_size(m_type)); - iszero2=all_zero(_mem2, H5Tget_size(m_type)); - if (iszero1 != iszero2) - { + iszero1 = all_zero(_mem1, H5Tget_size(m_type)); + iszero2 = all_zero(_mem2, H5Tget_size(m_type)); + if (iszero1 != iszero2) { return 1; } - else if (!iszero1 && !iszero2) - { + else if (!iszero1 && !iszero2) { + /*------------------------------------------------------------------------- + * H5T_STD_REF_DSETREG + * Dataset region reference + *------------------------------------------------------------------------- + */ + if (type_size == H5R_DSET_REG_REF_BUF_SIZE) { + hid_t region1_id; + hid_t region2_id; - /*------------------------------------------------------------------------- - * H5T_STD_REF_DSETREG - * Dataset region reference - *------------------------------------------------------------------------- - */ - if (type_size==H5R_DSET_REG_REF_BUF_SIZE) - { - hid_t region1_id; - hid_t region2_id; - - if ((obj1_id = H5Rdereference2(container1_id, H5P_DEFAULT, H5R_DATASET_REGION, _mem1))<0) - ret= -1; - if ((obj2_id = H5Rdereference2(container2_id, H5P_DEFAULT, H5R_DATASET_REGION, _mem2))<0) - ret= -1; - if ((region1_id = H5Rget_region(container1_id, H5R_DATASET_REGION, _mem1))<0) - ret= -1; - if ((region2_id = H5Rget_region(container2_id, H5R_DATASET_REGION, _mem2))<0) - ret= -1; - - if (ret==-1) { - options->err_stat=1; + if ((obj1_id = H5Rdereference2(container1_id, H5P_DEFAULT, H5R_DATASET_REGION, _mem1)) < 0) + ret = -1; + if ((obj2_id = H5Rdereference2(container2_id, H5P_DEFAULT, H5R_DATASET_REGION, _mem2)) < 0) + ret = -1; + if ((region1_id = H5Rget_region(container1_id, H5R_DATASET_REGION, _mem1)) < 0) + ret = -1; + if ((region2_id = H5Rget_region(container2_id, H5R_DATASET_REGION, _mem2)) < 0) + ret = -1; + + if (ret == -1) { + options->err_stat = 1; return 0; } - nfound = diff_region(obj1_id,obj2_id,region1_id,region2_id,options); - + nfound = diff_region(obj1_id, obj2_id, region1_id, region2_id, options); H5Oclose(obj1_id); H5Oclose(obj2_id); H5Sclose(region1_id); H5Sclose(region2_id); - }/*dataset reference*/ + /*------------------------------------------------------------------------- + * H5T_STD_REF_OBJ + * Object references. get the type and OID of the referenced object + *------------------------------------------------------------------------- + */ + else if (type_size == H5R_OBJ_REF_BUF_SIZE) { + H5O_type_t obj1_type; + H5O_type_t obj2_type; - /*------------------------------------------------------------------------- - * H5T_STD_REF_OBJ - * Object references. get the type and OID of the referenced object - *------------------------------------------------------------------------- - */ - else if (type_size == H5R_OBJ_REF_BUF_SIZE) - { - H5O_type_t obj1_type; - H5O_type_t obj2_type; - - if(H5Rget_obj_type2(container1_id, H5R_OBJECT, _mem1, &obj1_type) < 0) + if (H5Rget_obj_type2(container1_id, H5R_OBJECT, _mem1, &obj1_type) < 0) ret = -1; - if(H5Rget_obj_type2(container2_id, H5R_OBJECT, _mem2, &obj2_type) < 0) + if (H5Rget_obj_type2(container2_id, H5R_OBJECT, _mem2, &obj2_type) < 0) ret = -1; - if(ret == -1) { + if (ret == -1) { options->err_stat = 1; return 0; } /* end if */ /* check object type */ - if(obj1_type != obj2_type) - { - parallel_print("Different object types referenced: <%s> and <%s>", obj1, obj2); + if (obj1_type != obj2_type) { + parallel_print( + "Different object types referenced: <%s> and <%s>", obj1, obj2); options->not_cmp = 1; return 0; } - if((obj1_id = H5Rdereference2(container1_id, H5P_DEFAULT, H5R_OBJECT, _mem1)) < 0) + if ((obj1_id = H5Rdereference2(container1_id, H5P_DEFAULT, H5R_OBJECT, _mem1)) < 0) ret = -1; - if((obj2_id = H5Rdereference2(container2_id, H5P_DEFAULT, H5R_OBJECT, _mem2)) < 0) + if ((obj2_id = H5Rdereference2(container2_id, H5P_DEFAULT, H5R_OBJECT, _mem2)) < 0) ret = -1; - if(ret == -1) { + if (ret == -1) { options->err_stat = 1; return 0; - } /* end if */ + } /* compare */ - if(obj1_type == H5O_TYPE_DATASET) - nfound = diff_datasetid(obj1_id, - obj2_id, - NULL, - NULL, - options); + if (obj1_type == H5O_TYPE_DATASET) + nfound = diff_datasetid(obj1_id, obj2_id, NULL, NULL, options); else { - if(options->m_verbose) - parallel_print("Warning: Comparison not possible of object types referenced: <%s> and <%s>\n", - obj1, obj2); + if (options->m_verbose) + parallel_print( + "Warning: Comparison not possible of object types referenced: <%s> and <%s>\n", + obj1, obj2); options->not_cmp = 1; } H5Oclose(obj1_id); H5Oclose(obj2_id); - }/*object reference*/ - }/*is zero*/ - - break; - /*------------------------------------------------------------------------- - * H5T_VLEN - *------------------------------------------------------------------------- - */ - + /*------------------------------------------------------------------------- + * H5T_VLEN + *------------------------------------------------------------------------- + */ case H5T_VLEN: - /* get the VL sequences's base datatype for each element */ memb_type = H5Tget_super(m_type); - size = H5Tget_size(memb_type); + size = H5Tget_size(memb_type); /* get the number of sequence elements */ - nelmts = ((hvl_t *)mem1)->len; + nelmts = ((hvl_t *) mem1)->len; for (j = 0; j < nelmts; j++) - nfound += diff_datum( - ((char *)(((hvl_t *)mem1)->p)) + j * size, - ((char *)(((hvl_t *)mem2)->p)) + j * size, /* offset */ - memb_type, - i, /* index position */ - rank, - dims, - acc, - pos, - options, - obj1, - obj2, - container1_id, - container2_id, - ph, members); + nfound += diff_datum(((char *) (((hvl_t *) mem1)->p)) + j * size, ((char *) (((hvl_t *) mem2)->p)) + j * size, memb_type, index, + rank, dims, acc, pos, options, obj1, obj2, container1_id, container2_id, ph, members); H5Tclose(memb_type); - break; - - - /*------------------------------------------------------------------------- - * H5T_INTEGER - *------------------------------------------------------------------------- - */ - + /*------------------------------------------------------------------------- + * H5T_INTEGER + *------------------------------------------------------------------------- + */ case H5T_INTEGER: type_sign = H5Tget_sign(m_type); - - /*------------------------------------------------------------------------- - * H5T_NATIVE_SCHAR - *------------------------------------------------------------------------- - */ - if (type_size==1 && type_sign!=H5T_SGN_NONE) - { - char temp1_char; - char temp2_char; - HDassert(type_size==sizeof(char)); + /*------------------------------------------------------------------------- + * H5T_NATIVE_SCHAR + *------------------------------------------------------------------------- + */ + if (type_size == 1 && type_sign != H5T_SGN_NONE) { + char temp1_char; + char temp2_char; + HDassert(type_size == sizeof(char)); HDmemcpy(&temp1_char, mem1, sizeof(char)); HDmemcpy(&temp2_char, mem2, sizeof(char)); /* -d and !-p */ - if (options->d && !options->p) - { - if (ABS(temp1_char-temp2_char) > options->delta) - { - if ( print_data(options) ) - { - print_pos(ph,0,i,acc,pos,rank,dims,obj1,obj2); + if (options->d && !options->p) { + if (ABS(temp1_char-temp2_char) > options->delta) { + if (print_data(options)) { + print_pos(ph, 0, index, acc, pos, rank, dims, obj1, obj2); parallel_print(SPACES); - parallel_print(I_FORMAT,temp1_char,temp2_char,ABS(temp1_char-temp2_char)); + parallel_print(I_FORMAT, temp1_char, temp2_char, ABS(temp1_char - temp2_char)); } nfound++; } } /* !-d and -p */ - else if (!options->d && options->p) - { - PER(temp1_char,temp2_char); - - if (not_comparable && !both_zero) /* not comparable */ - { - if ( print_data(options) ) - { - print_pos(ph,1,i,acc,pos,rank,dims,obj1,obj2); + else if (!options->d && options->p) { + PER(temp1_char, temp2_char); + + if (not_comparable && !both_zero) { + if (print_data(options)) { + print_pos(ph, 1, index, acc, pos, rank, dims, obj1, obj2); parallel_print(SPACES); - parallel_print(I_FORMAT_P_NOTCOMP,temp1_char,temp2_char,ABS(temp1_char-temp2_char)); + parallel_print(I_FORMAT_P_NOTCOMP, temp1_char, temp2_char, ABS(temp1_char - temp2_char)); } nfound++; } - - else - - if ( per > options->percent ) - { - if ( print_data(options) ) - { - print_pos(ph,1,i,acc,pos,rank,dims,obj1,obj2); - parallel_print(SPACES); - parallel_print(I_FORMAT_P,temp1_char,temp2_char,ABS(temp1_char-temp2_char),per); - } - nfound++; + else if (per > options->percent) { + if (print_data(options)) { + print_pos(ph, 1, index, acc, pos, rank, dims, obj1, obj2); + parallel_print(SPACES); + parallel_print(I_FORMAT_P, temp1_char, temp2_char, ABS(temp1_char - temp2_char), per); } + nfound++; + } } /* -d and -p */ - else if ( options->d && options->p) - { - PER(temp1_char,temp2_char); - - if (not_comparable && !both_zero) /* not comparable */ - { - if ( print_data(options) ) - { - print_pos(ph,1,i,acc,pos,rank,dims,obj1,obj2); + else if (options->d && options->p) { + PER(temp1_char, temp2_char); + + if (not_comparable && !both_zero) { + if (print_data(options)) { + print_pos(ph, 1, index, acc, pos, rank, dims, obj1, obj2); parallel_print(SPACES); - parallel_print(I_FORMAT_P_NOTCOMP,temp1_char,temp2_char,ABS(temp1_char-temp2_char)); + parallel_print(I_FORMAT_P_NOTCOMP, temp1_char, temp2_char, ABS(temp1_char - temp2_char)); } nfound++; } - - else - - if ( per > options->percent && ABS(temp1_char-temp2_char) > options->delta ) - { - if ( print_data(options) ) - { - print_pos(ph,1,i,acc,pos,rank,dims,obj1,obj2); - parallel_print(SPACES); - parallel_print(I_FORMAT_P,temp1_char,temp2_char,ABS(temp1_char-temp2_char),per); - } - nfound++; + else if (per > options->percent && ABS(temp1_char - temp2_char) > options->delta) { + if (print_data(options)) { + print_pos(ph, 1, index, acc, pos, rank, dims, obj1, obj2); + parallel_print(SPACES); + parallel_print(I_FORMAT_P, temp1_char, temp2_char, ABS(temp1_char - temp2_char), per); } + nfound++; + } } - else if (temp1_char != temp2_char) - { - if ( print_data(options) ) - { - print_pos(ph,0,i,acc,pos,rank,dims,obj1,obj2); + else if (temp1_char != temp2_char) { + if (print_data(options)) { + print_pos(ph, 0, index, acc, pos, rank, dims, obj1, obj2); parallel_print(SPACES); - parallel_print(I_FORMAT,temp1_char,temp2_char,ABS(temp1_char-temp2_char)); + parallel_print(I_FORMAT, temp1_char, temp2_char, ABS(temp1_char - temp2_char)); } nfound++; } - } /*H5T_NATIVE_SCHAR*/ - /*------------------------------------------------------------------------- - * H5T_NATIVE_UCHAR - *------------------------------------------------------------------------- - */ - else if (type_size==1 && type_sign==H5T_SGN_NONE) - { - unsigned char temp1_uchar; - unsigned char temp2_uchar; - HDassert(type_size==sizeof(unsigned char)); + /*------------------------------------------------------------------------- + * H5T_NATIVE_UCHAR + *------------------------------------------------------------------------- + */ + else if (type_size == 1 && type_sign == H5T_SGN_NONE) { + unsigned char temp1_uchar; + unsigned char temp2_uchar; + HDassert(type_size == sizeof(unsigned char)); HDmemcpy(&temp1_uchar, mem1, sizeof(unsigned char)); HDmemcpy(&temp2_uchar, mem2, sizeof(unsigned char)); /* -d and !-p */ - if (options->d && !options->p) - { - if ( PDIFF(temp1_uchar,temp2_uchar) > options->delta) - { - if ( print_data(options) ) - { - print_pos(ph,0,i,acc,pos,rank,dims,obj1,obj2); + if (options->d && !options->p) { + if (PDIFF(temp1_uchar, temp2_uchar) > options->delta) { + if (print_data(options)) { + print_pos(ph, 0, index, acc, pos, rank, dims, obj1, obj2); parallel_print(SPACES); - parallel_print(I_FORMAT,temp1_uchar,temp2_uchar,PDIFF(temp1_uchar,temp2_uchar)); + parallel_print(I_FORMAT, temp1_uchar, temp2_uchar, PDIFF(temp1_uchar, temp2_uchar)); } nfound++; } } /* !-d and -p */ - else if (!options->d && options->p) - { - PER_UNSIGN(signed char,temp1_uchar,temp2_uchar); - - if (not_comparable && !both_zero) /* not comparable */ - { - if ( print_data(options) ) - { - print_pos(ph,1,i,acc,pos,rank,dims,obj1,obj2); + else if (!options->d && options->p) { + PER_UNSIGN(signed char, temp1_uchar, temp2_uchar); + + if (not_comparable && !both_zero) { + if (print_data(options)) { + print_pos(ph, 1, index, acc, pos, rank, dims, obj1, obj2); parallel_print(SPACES); - parallel_print(I_FORMAT_P_NOTCOMP,temp1_uchar,temp2_uchar,PDIFF(temp1_uchar,temp2_uchar)); + parallel_print(I_FORMAT_P_NOTCOMP, temp1_uchar, temp2_uchar, PDIFF(temp1_uchar, temp2_uchar)); } nfound++; } - - else - - if ( per > options->percent ) - { - if ( print_data(options) ) - { - print_pos(ph,1,i,acc,pos,rank,dims,obj1,obj2); - parallel_print(SPACES); - parallel_print(I_FORMAT_P,temp1_uchar,temp2_uchar,PDIFF(temp1_uchar,temp2_uchar),per); - } - nfound++; + else if (per > options->percent) { + if (print_data(options)) { + print_pos(ph, 1, index, acc, pos, rank, dims, obj1, obj2); + parallel_print(SPACES); + parallel_print(I_FORMAT_P, temp1_uchar, temp2_uchar, PDIFF(temp1_uchar, temp2_uchar), per); } + nfound++; + } } /* -d and -p */ - else if ( options->d && options->p) - { - PER_UNSIGN(signed char,temp1_uchar,temp2_uchar); - - if (not_comparable && !both_zero) /* not comparable */ - { - if ( print_data(options) ) - { - print_pos(ph,1,i,acc,pos,rank,dims,obj1,obj2); + else if (options->d && options->p) { + PER_UNSIGN(signed char, temp1_uchar, temp2_uchar); + + if (not_comparable && !both_zero) { + if (print_data(options)) { + print_pos(ph, 1, index, acc, pos, rank, dims, obj1, obj2); parallel_print(SPACES); - parallel_print(I_FORMAT_P_NOTCOMP,temp1_uchar,temp2_uchar,PDIFF(temp1_uchar,temp2_uchar)); + parallel_print(I_FORMAT_P_NOTCOMP, temp1_uchar, temp2_uchar, PDIFF(temp1_uchar, temp2_uchar)); } nfound++; } - - else - - if ( per > options->percent && PDIFF(temp1_uchar,temp2_uchar) > options->delta ) - { - if ( print_data(options) ) - { - print_pos(ph,1,i,acc,pos,rank,dims,obj1,obj2); - parallel_print(SPACES); - parallel_print(I_FORMAT_P,temp1_uchar,temp2_uchar,PDIFF(temp1_uchar,temp2_uchar),per); - } - nfound++; + else if (per > options->percent && PDIFF(temp1_uchar, temp2_uchar) > options->delta) { + if (print_data(options)) { + print_pos(ph, 1, index, acc, pos, rank, dims, obj1, obj2); + parallel_print(SPACES); + parallel_print(I_FORMAT_P, temp1_uchar, temp2_uchar, PDIFF(temp1_uchar, temp2_uchar), per); } + nfound++; + } } - else if (temp1_uchar != temp2_uchar) - { - if ( print_data(options) ) - { - print_pos(ph,0,i,acc,pos,rank,dims,obj1,obj2); + else if (temp1_uchar != temp2_uchar) { + if (print_data(options)) { + print_pos(ph, 0, index, acc, pos, rank, dims, obj1, obj2); parallel_print(SPACES); - parallel_print(I_FORMAT,temp1_uchar,temp2_uchar,PDIFF(temp1_uchar,temp2_uchar)); + parallel_print(I_FORMAT, temp1_uchar, temp2_uchar, PDIFF(temp1_uchar, temp2_uchar)); } nfound++; } - } /*H5T_NATIVE_UCHAR*/ - - /*------------------------------------------------------------------------- - * H5T_NATIVE_SHORT - *------------------------------------------------------------------------- - */ - - else if (type_size==2 && type_sign!=H5T_SGN_NONE) - { - short temp1_short; - short temp2_short; - HDassert(type_size==sizeof(short)); + /*------------------------------------------------------------------------- + * H5T_NATIVE_SHORT + *------------------------------------------------------------------------- + */ + else if (type_size == 2 && type_sign != H5T_SGN_NONE) { + short temp1_short; + short temp2_short; + HDassert(type_size == sizeof(short)); HDmemcpy(&temp1_short, mem1, sizeof(short)); HDmemcpy(&temp2_short, mem2, sizeof(short)); /* -d and !-p */ - if (options->d && !options->p) - { - if (ABS(temp1_short-temp2_short) > options->delta) - { - if ( print_data(options) ) - { - print_pos(ph,0,i,acc,pos,rank,dims,obj1,obj2); + if (options->d && !options->p) { + if (ABS(temp1_short - temp2_short) > options->delta) { + if (print_data(options)) { + print_pos(ph, 0, index, acc, pos, rank, dims, obj1, obj2); parallel_print(SPACES); - parallel_print(I_FORMAT,temp1_short,temp2_short,ABS(temp1_short-temp2_short)); + parallel_print(I_FORMAT, temp1_short, temp2_short, ABS(temp1_short - temp2_short)); } nfound++; } } /* !-d and -p */ - else if (!options->d && options->p) - { - PER(temp1_short,temp2_short); - - if (not_comparable && !both_zero) /* not comparable */ - { - if ( print_data(options) ) - { - print_pos(ph,1,i,acc,pos,rank,dims,obj1,obj2); + else if (!options->d && options->p) { + PER(temp1_short, temp2_short); + + if (not_comparable && !both_zero) { + if (print_data(options)) { + print_pos(ph, 1, index, acc, pos, rank, dims, obj1, obj2); parallel_print(SPACES); - parallel_print(I_FORMAT_P_NOTCOMP,temp1_short,temp2_short,ABS(temp1_short-temp2_short)); + parallel_print(I_FORMAT_P_NOTCOMP, temp1_short, temp2_short, ABS(temp1_short - temp2_short)); } nfound++; } - - else - - if ( per > options->percent ) - { - if ( print_data(options) ) - { - print_pos(ph,1,i,acc,pos,rank,dims,obj1,obj2); - parallel_print(SPACES); - parallel_print(I_FORMAT_P,temp1_short,temp2_short,ABS(temp1_short-temp2_short),per); - } - nfound++; + else if (per > options->percent) { + if (print_data(options)) { + print_pos(ph, 1, index, acc, pos, rank, dims, obj1, obj2); + parallel_print(SPACES); + parallel_print(I_FORMAT_P, temp1_short, temp2_short, ABS(temp1_short - temp2_short), per); } + nfound++; + } } /* -d and -p */ - else if ( options->d && options->p) - { - PER(temp1_short,temp2_short); - - if (not_comparable && !both_zero) /* not comparable */ - { - if ( print_data(options) ) - { - print_pos(ph,1,i,acc,pos,rank,dims,obj1,obj2); + else if (options->d && options->p) { + PER(temp1_short, temp2_short); + + if (not_comparable && !both_zero) { + if (print_data(options)) { + print_pos(ph, 1, index, acc, pos, rank, dims, obj1, obj2); parallel_print(SPACES); - parallel_print(I_FORMAT_P_NOTCOMP,temp1_short,temp2_short,ABS(temp1_short-temp2_short)); + parallel_print(I_FORMAT_P_NOTCOMP, temp1_short, temp2_short, ABS(temp1_short - temp2_short)); } nfound++; } - - else - - if ( per > options->percent && ABS(temp1_short-temp2_short) > options->delta ) - { - if ( print_data(options) ) - { - print_pos(ph,1,i,acc,pos,rank,dims,obj1,obj2); - parallel_print(SPACES); - parallel_print(I_FORMAT_P,temp1_short,temp2_short,ABS(temp1_short-temp2_short),per); - } - nfound++; + else if (per > options->percent && ABS(temp1_short - temp2_short) > options->delta) { + if (print_data(options)) { + print_pos(ph, 1, index, acc, pos, rank, dims, obj1, obj2); + parallel_print(SPACES); + parallel_print(I_FORMAT_P, temp1_short, temp2_short, ABS(temp1_short - temp2_short), per); } + nfound++; + } } - else if (temp1_short != temp2_short) - { - if ( print_data(options) ) - { - print_pos(ph,0,i,acc,pos,rank,dims,obj1,obj2); + else if (temp1_short != temp2_short) { + if (print_data(options)) { + print_pos(ph, 0, index, acc, pos, rank, dims, obj1, obj2); parallel_print(SPACES); - parallel_print(I_FORMAT,temp1_short,temp2_short,ABS(temp1_short-temp2_short)); + parallel_print(I_FORMAT, temp1_short, temp2_short, ABS(temp1_short - temp2_short)); } nfound++; } - - } /*H5T_NATIVE_SHORT*/ - /*------------------------------------------------------------------------- - * H5T_NATIVE_USHORT - *------------------------------------------------------------------------- - */ - - else if (type_size==2 && type_sign==H5T_SGN_NONE) - { - unsigned short temp1_ushort; - unsigned short temp2_ushort; - HDassert(type_size==sizeof(short)); + /*------------------------------------------------------------------------- + * H5T_NATIVE_USHORT + *------------------------------------------------------------------------- + */ + else if (type_size == 2 && type_sign == H5T_SGN_NONE) { + unsigned short temp1_ushort; + unsigned short temp2_ushort; + HDassert(type_size == sizeof(short)); HDmemcpy(&temp1_ushort, mem1, sizeof(unsigned short)); HDmemcpy(&temp2_ushort, mem2, sizeof(unsigned short)); /* -d and !-p */ - if (options->d && !options->p) - { - if ( PDIFF(temp1_ushort,temp2_ushort) > options->delta) - { - - if ( print_data(options) ) - { - print_pos(ph,0,i,acc,pos,rank,dims,obj1,obj2); + if (options->d && !options->p) { + if (PDIFF(temp1_ushort, temp2_ushort) > options->delta) { + if (print_data(options)) { + print_pos(ph, 0, index, acc, pos, rank, dims, obj1, obj2); parallel_print(SPACES); - parallel_print(I_FORMAT,temp1_ushort,temp2_ushort,PDIFF(temp1_ushort,temp2_ushort)); + parallel_print(I_FORMAT, temp1_ushort, temp2_ushort, PDIFF(temp1_ushort, temp2_ushort)); } nfound++; } } /* !-d and -p */ - else if (!options->d && options->p) - { - PER_UNSIGN(signed short,temp1_ushort,temp2_ushort); - - if (not_comparable && !both_zero) /* not comparable */ - { - if ( print_data(options) ) - { - print_pos(ph,1,i,acc,pos,rank,dims,obj1,obj2); + else if (!options->d && options->p) { + PER_UNSIGN(signed short, temp1_ushort, temp2_ushort); + + if (not_comparable && !both_zero) { + if (print_data(options)) { + print_pos(ph, 1, index, acc, pos, rank, dims, obj1, obj2); parallel_print(SPACES); - parallel_print(I_FORMAT_P_NOTCOMP,temp1_ushort,temp2_ushort, - PDIFF(temp1_ushort,temp2_ushort)); + parallel_print(I_FORMAT_P_NOTCOMP, temp1_ushort, temp2_ushort, PDIFF(temp1_ushort, temp2_ushort)); } nfound++; } - - else - - if ( per > options->percent ) - { - if ( print_data(options) ) - { - print_pos(ph,1,i,acc,pos,rank,dims,obj1,obj2); - parallel_print(SPACES); - parallel_print(I_FORMAT_P,temp1_ushort,temp2_ushort,PDIFF(temp1_ushort,temp2_ushort),per); - } - nfound++; + else if (per > options->percent) { + if (print_data(options)) { + print_pos(ph, 1, index, acc, pos, rank, dims, obj1, obj2); + parallel_print(SPACES); + parallel_print(I_FORMAT_P, temp1_ushort, temp2_ushort, PDIFF(temp1_ushort, temp2_ushort), per); } + nfound++; + } } /* -d and -p */ - else if ( options->d && options->p) - { - PER_UNSIGN(signed short,temp1_ushort,temp2_ushort); - - if (not_comparable && !both_zero) /* not comparable */ - { - if ( print_data(options) ) - { - print_pos(ph,1,i,acc,pos,rank,dims,obj1,obj2); + else if (options->d && options->p) { + PER_UNSIGN(signed short, temp1_ushort, temp2_ushort); + + if (not_comparable && !both_zero) { + if (print_data(options)) { + print_pos(ph, 1, index, acc, pos, rank, dims, obj1, obj2); parallel_print(SPACES); - parallel_print(I_FORMAT_P_NOTCOMP,temp1_ushort,temp2_ushort,PDIFF(temp1_ushort,temp2_ushort)); + parallel_print(I_FORMAT_P_NOTCOMP, temp1_ushort, temp2_ushort, PDIFF(temp1_ushort, temp2_ushort)); } nfound++; } - - else - - if ( per > options->percent && PDIFF(temp1_ushort,temp2_ushort) > options->delta ) - { - if ( print_data(options) ) - { - print_pos(ph,1,i,acc,pos,rank,dims,obj1,obj2); - parallel_print(SPACES); - parallel_print(I_FORMAT_P,temp1_ushort,temp2_ushort,PDIFF(temp1_ushort,temp2_ushort),per); - } - nfound++; + else if (per > options->percent && PDIFF(temp1_ushort, temp2_ushort) > options->delta) { + if (print_data(options)) { + print_pos(ph, 1, index, acc, pos, rank, dims, obj1, obj2); + parallel_print(SPACES); + parallel_print(I_FORMAT_P, temp1_ushort, temp2_ushort, PDIFF(temp1_ushort, temp2_ushort), per); } + nfound++; + } } - else if (temp1_ushort != temp2_ushort) - { - if ( print_data(options) ) - { - print_pos(ph,0,i,acc,pos,rank,dims,obj1,obj2); + else if (temp1_ushort != temp2_ushort) { + if (print_data(options)) { + print_pos(ph, 0, index, acc, pos, rank, dims, obj1, obj2); parallel_print(SPACES); - parallel_print(I_FORMAT,temp1_ushort,temp2_ushort,PDIFF(temp1_ushort,temp2_ushort)); + parallel_print(I_FORMAT, temp1_ushort, temp2_ushort, PDIFF(temp1_ushort, temp2_ushort)); } nfound++; } } /*H5T_NATIVE_USHORT*/ - - /*------------------------------------------------------------------------- - * H5T_NATIVE_INT - *------------------------------------------------------------------------- - */ - - else if (type_size==4 && type_sign!=H5T_SGN_NONE) - { - int temp1_int; - int temp2_int; - HDassert(type_size==sizeof(int)); + /*------------------------------------------------------------------------- + * H5T_NATIVE_INT + *------------------------------------------------------------------------- + */ + else if (type_size == 4 && type_sign != H5T_SGN_NONE) { + int temp1_int; + int temp2_int; + HDassert(type_size == sizeof(int)); HDmemcpy(&temp1_int, mem1, sizeof(int)); HDmemcpy(&temp2_int, mem2, sizeof(int)); /* -d and !-p */ - if (options->d && !options->p) - { - if (ABS(temp1_int-temp2_int) > options->delta) - { - if ( print_data(options) ) - { - print_pos(ph,0,i,acc,pos,rank,dims,obj1,obj2); + if (options->d && !options->p) { + if (ABS(temp1_int-temp2_int) > options->delta) { + if (print_data(options)) { + print_pos(ph, 0, index, acc, pos, rank, dims, obj1, obj2); parallel_print(SPACES); - parallel_print(I_FORMAT,temp1_int,temp2_int,ABS(temp1_int-temp2_int)); + parallel_print(I_FORMAT, temp1_int, temp2_int, ABS(temp1_int - temp2_int)); } nfound++; } } /* !-d and -p */ - else if (!options->d && options->p) - { - PER(temp1_int,temp2_int); - - if (not_comparable && !both_zero) /* not comparable */ - { - if ( print_data(options) ) - { - print_pos(ph,1,i,acc,pos,rank,dims,obj1,obj2); + else if (!options->d && options->p) { + PER(temp1_int, temp2_int); + + if (not_comparable && !both_zero) { + if (print_data(options)) { + print_pos(ph, 1, index, acc, pos, rank, dims, obj1, obj2); parallel_print(SPACES); - parallel_print(I_FORMAT_P_NOTCOMP,temp1_int,temp2_int,ABS(temp1_int-temp2_int)); + parallel_print(I_FORMAT_P_NOTCOMP, temp1_int, temp2_int, ABS(temp1_int - temp2_int)); } nfound++; } - - else - - if ( per > options->percent ) - { - if ( print_data(options) ) - { - print_pos(ph,1,i,acc,pos,rank,dims,obj1,obj2); - parallel_print(SPACES); - parallel_print(I_FORMAT_P,temp1_int,temp2_int,ABS(temp1_int-temp2_int),per); - } - nfound++; + else if (per > options->percent) { + if (print_data(options)) { + print_pos(ph, 1, index, acc, pos, rank, dims, obj1, obj2); + parallel_print(SPACES); + parallel_print(I_FORMAT_P, temp1_int, temp2_int, ABS(temp1_int - temp2_int), per); } + nfound++; + } } /* -d and -p */ - else if ( options->d && options->p) - { - PER(temp1_int,temp2_int); - - if (not_comparable && !both_zero) /* not comparable */ - { - if ( print_data(options) ) - { - print_pos(ph,1,i,acc,pos,rank,dims,obj1,obj2); + else if (options->d && options->p) { + PER(temp1_int, temp2_int); + + if (not_comparable && !both_zero) { + if (print_data(options)) { + print_pos(ph, 1, index, acc, pos, rank, dims, obj1, obj2); parallel_print(SPACES); - parallel_print(I_FORMAT_P_NOTCOMP,temp1_int,temp2_int,ABS(temp1_int-temp2_int)); + parallel_print(I_FORMAT_P_NOTCOMP, temp1_int, temp2_int, ABS(temp1_int - temp2_int)); } nfound++; } - - else - - if ( per > options->percent && ABS(temp1_int-temp2_int) > options->delta ) - { - if ( print_data(options) ) - { - print_pos(ph,1,i,acc,pos,rank,dims,obj1,obj2); - parallel_print(SPACES); - parallel_print(I_FORMAT_P,temp1_int,temp2_int,ABS(temp1_int-temp2_int),per); - } - nfound++; + else if (per > options->percent && ABS(temp1_int - temp2_int) > options->delta) { + if (print_data(options)) { + print_pos(ph, 1, index, acc, pos, rank, dims, obj1, obj2); + parallel_print(SPACES); + parallel_print(I_FORMAT_P, temp1_int, temp2_int, ABS(temp1_int - temp2_int), per); } + nfound++; + } } - else if (temp1_int != temp2_int) - { - if ( print_data(options) ) - { - print_pos(ph,0,i,acc,pos,rank,dims,obj1,obj2); + else if (temp1_int != temp2_int) { + if (print_data(options)) { + print_pos(ph, 0, index, acc, pos, rank, dims, obj1, obj2); parallel_print(SPACES); - parallel_print(I_FORMAT,temp1_int,temp2_int,ABS(temp1_int-temp2_int)); + parallel_print(I_FORMAT, temp1_int, temp2_int, ABS(temp1_int - temp2_int)); } nfound++; } } /*H5T_NATIVE_INT*/ - - /*------------------------------------------------------------------------- - * H5T_NATIVE_UINT - *------------------------------------------------------------------------- - */ - - else if (type_size==4 && type_sign==H5T_SGN_NONE) - { - unsigned int temp1_uint; - unsigned int temp2_uint; - HDassert(type_size==sizeof(int)); + /*------------------------------------------------------------------------- + * H5T_NATIVE_UINT + *------------------------------------------------------------------------- + */ + else if (type_size == 4 && type_sign == H5T_SGN_NONE) { + unsigned int temp1_uint; + unsigned int temp2_uint; + HDassert(type_size == sizeof(int)); HDmemcpy(&temp1_uint, mem1, sizeof(unsigned int)); HDmemcpy(&temp2_uint, mem2, sizeof(unsigned int)); /* -d and !-p */ - if (options->d && !options->p) - { - if ( PDIFF(temp1_uint,temp2_uint) > options->delta) - { - if ( print_data(options) ) - { - print_pos(ph,0,i,acc,pos,rank,dims,obj1,obj2); + if (options->d && !options->p) { + if (PDIFF(temp1_uint, temp2_uint) > options->delta) { + if (print_data(options)) { + print_pos(ph, 0, index, acc, pos, rank, dims, obj1, obj2); parallel_print(SPACES); - parallel_print(UI_FORMAT,temp1_uint,temp2_uint,PDIFF(temp1_uint,temp2_uint)); + parallel_print(UI_FORMAT, temp1_uint, temp2_uint, PDIFF(temp1_uint, temp2_uint)); } nfound++; } } /* !-d and -p */ - else if (!options->d && options->p) - { - PER_UNSIGN(signed int,temp1_uint,temp2_uint); - - if (not_comparable && !both_zero) /* not comparable */ - { - if ( print_data(options) ) - { - print_pos(ph,1,i,acc,pos,rank,dims,obj1,obj2); + else if (!options->d && options->p) { + PER_UNSIGN(signed int, temp1_uint, temp2_uint); + + if (not_comparable && !both_zero) { + if (print_data(options)) { + print_pos(ph, 1, index, acc, pos, rank, dims, obj1, obj2); parallel_print(SPACES); - parallel_print(UI_FORMAT_P_NOTCOMP,temp1_uint,temp2_uint,PDIFF(temp1_uint,temp2_uint)); + parallel_print(UI_FORMAT_P_NOTCOMP, temp1_uint, temp2_uint, PDIFF(temp1_uint, temp2_uint)); } nfound++; } - - else - - if ( per > options->percent ) - { - if ( print_data(options) ) - { - print_pos(ph,1,i,acc,pos,rank,dims,obj1,obj2); - parallel_print(SPACES); - parallel_print(UI_FORMAT_P,temp1_uint,temp2_uint,PDIFF(temp1_uint,temp2_uint),per); - } - nfound++; + else if (per > options->percent) { + if (print_data(options)) { + print_pos(ph, 1, index, acc, pos, rank, dims, obj1, obj2); + parallel_print(SPACES); + parallel_print(UI_FORMAT_P, temp1_uint, temp2_uint, PDIFF(temp1_uint, temp2_uint), per); } + nfound++; + } } /* -d and -p */ - else if ( options->d && options->p) - { - PER_UNSIGN(signed int,temp1_uint,temp2_uint); - - if (not_comparable && !both_zero) /* not comparable */ - { - if ( print_data(options) ) - { - print_pos(ph,1,i,acc,pos,rank,dims,obj1,obj2); + else if (options->d && options->p) { + PER_UNSIGN(signed int, temp1_uint, temp2_uint); + + if (not_comparable && !both_zero) { + if (print_data(options)) { + print_pos(ph, 1, index, acc, pos, rank, dims, obj1, obj2); parallel_print(SPACES); - parallel_print(UI_FORMAT_P_NOTCOMP,temp1_uint,temp2_uint,PDIFF(temp1_uint,temp2_uint)); + parallel_print(UI_FORMAT_P_NOTCOMP, temp1_uint, temp2_uint, PDIFF(temp1_uint, temp2_uint)); } nfound++; } - - else - - if ( per > options->percent && PDIFF(temp1_uint,temp2_uint) > options->delta ) - { - if ( print_data(options) ) - { - print_pos(ph,1,i,acc,pos,rank,dims,obj1,obj2); - parallel_print(SPACES); - parallel_print(UI_FORMAT_P,temp1_uint,temp2_uint,PDIFF(temp1_uint,temp2_uint),per); - } - nfound++; + else if (per > options->percent && PDIFF(temp1_uint,temp2_uint) > options->delta) { + if (print_data(options)) { + print_pos(ph, 1, index, acc, pos, rank, dims, obj1, obj2); + parallel_print(SPACES); + parallel_print(UI_FORMAT_P, temp1_uint, temp2_uint, PDIFF(temp1_uint, temp2_uint), per); } + nfound++; + } } - else if (temp1_uint != temp2_uint) - { - if ( print_data(options) ) - { - print_pos(ph,0,i,acc,pos,rank,dims,obj1,obj2); + else if (temp1_uint != temp2_uint) { + if (print_data(options)) { + print_pos(ph, 0, index, acc, pos, rank, dims, obj1, obj2); parallel_print(SPACES); - parallel_print(UI_FORMAT,temp1_uint,temp2_uint,PDIFF(temp1_uint,temp2_uint)); + parallel_print(UI_FORMAT, temp1_uint, temp2_uint, PDIFF(temp1_uint, temp2_uint)); } nfound++; } } /*H5T_NATIVE_UINT*/ - - /*------------------------------------------------------------------------- - * H5T_NATIVE_LONG - *------------------------------------------------------------------------- - */ - - else if (type_size==8 && type_sign!=H5T_SGN_NONE) - { - long temp1_long; - long temp2_long; - HDassert(type_size==sizeof(long)); + /*------------------------------------------------------------------------- + * H5T_NATIVE_LONG + *------------------------------------------------------------------------- + */ + else if (type_size == 8 && type_sign != H5T_SGN_NONE) { + long temp1_long; + long temp2_long; + HDassert(type_size == sizeof(long)); HDmemcpy(&temp1_long, mem1, sizeof(long)); HDmemcpy(&temp2_long, mem2, sizeof(long)); /* -d and !-p */ - if (options->d && !options->p) - { - if (ABS(temp1_long-temp2_long) > options->delta) - { - if ( print_data(options) ) - { - print_pos(ph,0,i,acc,pos,rank,dims,obj1,obj2); + if (options->d && !options->p) { + if (ABS(temp1_long-temp2_long) > options->delta) { + if (print_data(options)) { + print_pos(ph, 0, index, acc, pos, rank, dims, obj1, obj2); parallel_print(SPACES); - parallel_print(LI_FORMAT,temp1_long,temp2_long,ABS(temp1_long-temp2_long)); + parallel_print(LI_FORMAT, temp1_long, temp2_long, ABS(temp1_long - temp2_long)); } nfound++; } } /* !-d and -p */ - else if (!options->d && options->p) - { - PER(temp1_long,temp2_long); - - if (not_comparable && !both_zero) /* not comparable */ - { - if ( print_data(options) ) - { - print_pos(ph,1,i,acc,pos,rank,dims,obj1,obj2); + else if (!options->d && options->p) { + PER(temp1_long, temp2_long); + + if (not_comparable && !both_zero) { + if (print_data(options)) { + print_pos(ph, 1, index, acc, pos, rank, dims, obj1, obj2); parallel_print(SPACES); - parallel_print(LI_FORMAT_P_NOTCOMP,temp1_long,temp2_long, - ABS(temp1_long-temp2_long)); + parallel_print(LI_FORMAT_P_NOTCOMP, temp1_long, temp2_long, ABS(temp1_long - temp2_long)); } nfound++; } - - else - - if ( per > options->percent ) - { - if ( print_data(options) ) - { - print_pos(ph,1,i,acc,pos,rank,dims,obj1,obj2); - parallel_print(SPACES); - parallel_print(LI_FORMAT_P,temp1_long,temp2_long,ABS(temp1_long-temp2_long),per); - } - nfound++; + else if (per > options->percent) { + if (print_data(options)) { + print_pos(ph, 1, index, acc, pos, rank, dims, obj1, obj2); + parallel_print(SPACES); + parallel_print(LI_FORMAT_P, temp1_long, temp2_long, ABS(temp1_long - temp2_long), per); } + nfound++; + } } /* -d and -p */ - else if ( options->d && options->p) - { - PER(temp1_long,temp2_long); - - if (not_comparable && !both_zero) /* not comparable */ - { - if ( print_data(options) ) - { - print_pos(ph,1,i,acc,pos,rank,dims,obj1,obj2); + else if (options->d && options->p) { + PER(temp1_long, temp2_long); + + if (not_comparable && !both_zero) { + if (print_data(options)) { + print_pos(ph, 1, index, acc, pos, rank, dims, obj1, obj2); parallel_print(SPACES); - parallel_print(LI_FORMAT_P_NOTCOMP,temp1_long,temp2_long,ABS(temp1_long-temp2_long)); + parallel_print(LI_FORMAT_P_NOTCOMP, temp1_long, temp2_long, ABS(temp1_long - temp2_long)); } nfound++; } - - else - - if ( per > options->percent && ABS(temp1_long-temp2_long) > options->delta ) - { - if ( print_data(options) ) - { - print_pos(ph,1,i,acc,pos,rank,dims,obj1,obj2); - parallel_print(SPACES); - parallel_print(LI_FORMAT_P,temp1_long,temp2_long, - ABS(temp1_long-temp2_long), - per); - } - nfound++; + else if (per > options->percent && ABS(temp1_long-temp2_long) > options->delta) { + if (print_data(options)) { + print_pos(ph, 1, index, acc, pos, rank, dims, obj1, obj2); + parallel_print(SPACES); + parallel_print(LI_FORMAT_P, temp1_long, temp2_long, ABS(temp1_long - temp2_long), per); } + nfound++; + } } - else if (temp1_long != temp2_long) - { - if ( print_data(options) ) - { - print_pos(ph,0,i,acc,pos,rank,dims,obj1,obj2); + else if (temp1_long != temp2_long) { + if (print_data(options)) { + print_pos(ph, 0, index, acc, pos, rank, dims, obj1, obj2); parallel_print(SPACES); - parallel_print(LI_FORMAT,temp1_long,temp2_long,ABS(temp1_long-temp2_long)); + parallel_print(LI_FORMAT, temp1_long, temp2_long, ABS(temp1_long - temp2_long)); } nfound++; } } /*H5T_NATIVE_LONG*/ - /*------------------------------------------------------------------------- - * H5T_NATIVE_ULONG - *------------------------------------------------------------------------- - */ - - else if (type_size==8 && type_sign==H5T_SGN_NONE) - { - unsigned long temp1_ulong; - unsigned long temp2_ulong; - HDassert(type_size==sizeof(unsigned long)); + /*------------------------------------------------------------------------- + * H5T_NATIVE_ULONG + *------------------------------------------------------------------------- + */ + else if (type_size == 8 && type_sign == H5T_SGN_NONE) { + unsigned long temp1_ulong; + unsigned long temp2_ulong; + HDassert(type_size == sizeof(unsigned long)); HDmemcpy(&temp1_ulong, mem1, sizeof(unsigned long)); HDmemcpy(&temp2_ulong, mem2, sizeof(unsigned long)); /* -d and !-p */ - if (options->d && !options->p) - { - if ( PDIFF(temp1_ulong,temp2_ulong) > options->delta) - { - if ( print_data(options) ) - { - print_pos(ph,0,i,acc,pos,rank,dims,obj1,obj2); + if (options->d && !options->p) { + if (PDIFF(temp1_ulong, temp2_ulong) > options->delta) { + if (print_data(options)) { + print_pos(ph, 0, index, acc, pos, rank, dims, obj1, obj2); parallel_print(SPACES); - parallel_print(ULI_FORMAT,temp1_ulong,temp2_ulong,PDIFF(temp1_ulong,temp2_ulong)); + parallel_print(ULI_FORMAT, temp1_ulong, temp2_ulong, PDIFF(temp1_ulong, temp2_ulong)); } nfound++; } } /* !-d and -p */ - else if (!options->d && options->p) - { - PER_UNSIGN(signed long,temp1_ulong,temp2_ulong); - - if (not_comparable && !both_zero) /* not comparable */ - { - if ( print_data(options) ) - { - print_pos(ph,1,i,acc,pos,rank,dims,obj1,obj2); + else if (!options->d && options->p) { + PER_UNSIGN(signed long, temp1_ulong, temp2_ulong); + + if (not_comparable && !both_zero) { + if (print_data(options)) { + print_pos(ph, 1, index, acc, pos, rank, dims, obj1, obj2); parallel_print(SPACES); - parallel_print(ULI_FORMAT_P_NOTCOMP,temp1_ulong,temp2_ulong,PDIFF(temp1_ulong,temp2_ulong)); + parallel_print(ULI_FORMAT_P_NOTCOMP, temp1_ulong, temp2_ulong, PDIFF(temp1_ulong, temp2_ulong)); } nfound++; } - - else - - if ( per > options->percent ) - { - if ( print_data(options) ) - { - print_pos(ph,1,i,acc,pos,rank,dims,obj1,obj2); - parallel_print(SPACES); - parallel_print(ULI_FORMAT_P,temp1_ulong,temp2_ulong,PDIFF(temp1_ulong,temp2_ulong),per); - } - nfound++; + else if (per > options->percent) { + if (print_data(options)) { + print_pos(ph, 1, index, acc, pos, rank, dims, obj1, obj2); + parallel_print(SPACES); + parallel_print(ULI_FORMAT_P, temp1_ulong, temp2_ulong, PDIFF(temp1_ulong, temp2_ulong), per); } + nfound++; + } } /* -d and -p */ - else if ( options->d && options->p) - { - PER_UNSIGN(signed long,temp1_ulong,temp2_ulong); - - if (not_comparable && !both_zero) /* not comparable */ - { - if ( print_data(options) ) - { - print_pos(ph,1,i,acc,pos,rank,dims,obj1,obj2); + else if (options->d && options->p) { + PER_UNSIGN(signed long, temp1_ulong, temp2_ulong); + + if (not_comparable && !both_zero) { + if (print_data(options)) { + print_pos(ph, 1, index, acc, pos, rank, dims, obj1, obj2); parallel_print(SPACES); - parallel_print(ULI_FORMAT_P_NOTCOMP,temp1_ulong,temp2_ulong,PDIFF(temp1_ulong,temp2_ulong)); + parallel_print(ULI_FORMAT_P_NOTCOMP, temp1_ulong, temp2_ulong, PDIFF(temp1_ulong, temp2_ulong)); } nfound++; } - - else - - if ( per > options->percent && PDIFF(temp1_ulong,temp2_ulong) > options->delta ) - { - if ( print_data(options) ) - { - print_pos(ph,1,i,acc,pos,rank,dims,obj1,obj2); - parallel_print(SPACES); - parallel_print(ULI_FORMAT_P,temp1_ulong,temp2_ulong,PDIFF(temp1_ulong,temp2_ulong),per); - } - nfound++; + else if (per > options->percent && PDIFF(temp1_ulong,temp2_ulong) > options->delta) { + if (print_data(options)) { + print_pos(ph, 1, index, acc, pos, rank, dims, obj1, obj2); + parallel_print(SPACES); + parallel_print(ULI_FORMAT_P, temp1_ulong, temp2_ulong, PDIFF(temp1_ulong, temp2_ulong), per); } + nfound++; + } } - else if (temp1_ulong != temp2_ulong) - { - if ( print_data(options) ) - { - print_pos(ph,0,i,acc,pos,rank,dims,obj1,obj2); + else if (temp1_ulong != temp2_ulong) { + if (print_data(options)) { + print_pos(ph, 0, index, acc, pos, rank, dims, obj1, obj2); parallel_print(SPACES); - parallel_print(ULI_FORMAT,temp1_ulong,temp2_ulong,PDIFF(temp1_ulong,temp2_ulong)); + parallel_print(ULI_FORMAT, temp1_ulong, temp2_ulong, PDIFF(temp1_ulong, temp2_ulong)); } nfound++; } - - } /*H5T_NATIVE_ULONG*/ - break; /* H5T_INTEGER class */ - - /*------------------------------------------------------------------------- - * H5T_FLOAT - *------------------------------------------------------------------------- - */ - + /*------------------------------------------------------------------------- + * H5T_FLOAT + *------------------------------------------------------------------------- + */ case H5T_FLOAT: - - - - /*------------------------------------------------------------------------- - * H5T_NATIVE_FLOAT - *------------------------------------------------------------------------- - */ - if (type_size==4) - { + /*------------------------------------------------------------------------- + * H5T_NATIVE_FLOAT + *------------------------------------------------------------------------- + */ + if (type_size == 4) { float temp1_float; float temp2_float; - hbool_t isnan1 = FALSE; - hbool_t isnan2 = FALSE; + hbool_t isnan1 = FALSE; + hbool_t isnan2 = FALSE; - HDassert(type_size==sizeof(float)); + HDassert(type_size == sizeof(float)); HDmemcpy(&temp1_float, mem1, sizeof(float)); HDmemcpy(&temp2_float, mem2, sizeof(float)); /* logic for detecting NaNs is different with options -d, -p and no options */ - /*------------------------------------------------------------------------- - * -d and !-p - *------------------------------------------------------------------------- - */ - if (options->d && !options->p) - { - - - /*------------------------------------------------------------------------- - * detect NaNs - *------------------------------------------------------------------------- - */ - if ( options->do_nans ) - { - isnan1 = my_isnan(FLT_FLOAT,&temp1_float); - isnan2 = my_isnan(FLT_FLOAT,&temp2_float); + /*------------------------------------------------------------------------- + * -d and !-p + *------------------------------------------------------------------------- + */ + if (options->d && !options->p) { + /*------------------------------------------------------------------------- + * detect NaNs + *------------------------------------------------------------------------- + */ + if (options->do_nans) { + isnan1 = my_isnan(FLT_FLOAT, &temp1_float); + isnan2 = my_isnan(FLT_FLOAT, &temp2_float); } - /* both not NaN, do the comparison */ - if ( !isnan1 && !isnan2) - { - - if (ABS(temp1_float-temp2_float) > (float)options->delta) - { - if ( print_data(options) ) - { - print_pos(ph,0,i,acc,pos,rank,dims,obj1,obj2); + /* both not NaN, do the comparison */ + if (!isnan1 && !isnan2) { + if (ABS(temp1_float-temp2_float) > (float) options->delta) { + if (print_data(options)) { + print_pos(ph, 0, index, acc, pos, rank, dims, obj1, obj2); parallel_print(SPACES); - parallel_print(F_FORMAT,(double)temp1_float,(double)temp2_float, (double)ABS(temp1_float - temp2_float)); + parallel_print(F_FORMAT, (double) temp1_float, (double) temp2_float, (double) ABS(temp1_float - temp2_float)); } nfound++; } - } /* only one is NaN, assume difference */ - else if ((isnan1 && !isnan2) || (!isnan1 && isnan2)) - { - if ( print_data(options) ) - { - print_pos(ph,0,i,acc,pos,rank,dims,obj1,obj2); + else if ((isnan1 && !isnan2) || (!isnan1 && isnan2)) { + if (print_data(options)) { + print_pos(ph, 0, index, acc, pos, rank, dims, obj1, obj2); parallel_print(SPACES); - parallel_print(F_FORMAT, (double)temp1_float, (double)temp2_float, (double)ABS(temp1_float - temp2_float)); + parallel_print(F_FORMAT, (double) temp1_float, (double) temp2_float, (double) ABS(temp1_float - temp2_float)); } nfound++; - } } - /*------------------------------------------------------------------------- - * !-d and -p - *------------------------------------------------------------------------- - */ - else if (!options->d && options->p) - { - - /*------------------------------------------------------------------------- - * detect NaNs - *------------------------------------------------------------------------- - */ - if ( options->do_nans ) - { - isnan1 = my_isnan(FLT_FLOAT,&temp1_float); - isnan2 = my_isnan(FLT_FLOAT,&temp2_float); + /*------------------------------------------------------------------------- + * !-d and -p + *------------------------------------------------------------------------- + */ + else if (!options->d && options->p) { + /*------------------------------------------------------------------------- + * detect NaNs + *------------------------------------------------------------------------- + */ + if (options->do_nans) { + isnan1 = my_isnan(FLT_FLOAT, &temp1_float); + isnan2 = my_isnan(FLT_FLOAT, &temp2_float); } /* both not NaN, do the comparison */ - if ( !isnan1 && !isnan2) - { + if (!isnan1 && !isnan2) { + PER(temp1_float, temp2_float); - PER(temp1_float,temp2_float); - - if (not_comparable && !both_zero) /* not comparable */ - { - if ( print_data(options) ) - { - print_pos(ph,1,i,acc,pos,rank,dims,obj1,obj2); + if (not_comparable && !both_zero) { + if (print_data(options)) { + print_pos(ph, 1, index, acc, pos, rank, dims, obj1, obj2); parallel_print(SPACES); - parallel_print(F_FORMAT_P_NOTCOMP, (double)temp1_float, (double)temp2_float, (double)ABS(temp1_float - temp2_float)); + parallel_print(F_FORMAT_P_NOTCOMP, (double) temp1_float, (double) temp2_float, (double) ABS(temp1_float - temp2_float)); } nfound++; } - - else - - if ( per > options->percent && (double)ABS(temp1_float-temp2_float) > options->delta ) - { - if ( print_data(options) ) - { - print_pos(ph,1,i,acc,pos,rank,dims,obj1,obj2); - parallel_print(SPACES); - parallel_print(F_FORMAT_P, (double)temp1_float, (double)temp2_float, - (double)ABS(temp1_float - temp2_float), - (double)ABS(1 - temp2_float / temp1_float)); - } - nfound++; + else if (per > options->percent && (double) ABS(temp1_float - temp2_float) > options->delta) { + if (print_data(options)) { + print_pos(ph, 1, index, acc, pos, rank, dims, obj1, + parallel_print(SPACES); + parallel_print(F_FORMAT_P, (double) temp1_float, (double) temp2_float, + (double) ABS(temp1_float - temp2_float), (double) ABS(1 - temp2_float / temp1_float)); } - + nfound++; + } } /* only one is NaN, assume difference */ - else if ((isnan1 && !isnan2) || (!isnan1 && isnan2)) - { - if ( print_data(options) ) - { - print_pos(ph,0,i,acc,pos,rank,dims,obj1,obj2); + else if ((isnan1 && !isnan2) || (!isnan1 && isnan2)) { + if (print_data(options)) { + print_pos(ph, 0, index, acc, pos, rank, dims, obj1, obj2); parallel_print(SPACES); - parallel_print(F_FORMAT, (double)temp1_float, (double)temp2_float, (double)ABS(temp1_float - temp2_float)); + parallel_print(F_FORMAT, (double) temp1_float, (double) temp2_float, (double) ABS(temp1_float - temp2_float)); } nfound++; - } } - - /*------------------------------------------------------------------------- - * -d and -p - *------------------------------------------------------------------------- - */ - - else if ( options->d && options->p) - { - - /*------------------------------------------------------------------------- - * detect NaNs - *------------------------------------------------------------------------- - */ - if ( options->do_nans ) - { - isnan1 = my_isnan(FLT_FLOAT,&temp1_float); - isnan2 = my_isnan(FLT_FLOAT,&temp2_float); + /*------------------------------------------------------------------------- + * -d and -p + *------------------------------------------------------------------------- + */ + else if (options->d && options->p) { + /*------------------------------------------------------------------------- + * detect NaNs + *------------------------------------------------------------------------- + */ + if (options->do_nans) { + isnan1 = my_isnan(FLT_FLOAT, &temp1_float); + isnan2 = my_isnan(FLT_FLOAT, &temp2_float); } - /* both not NaN, do the comparison */ - if ( !isnan1 && !isnan2) - { - - PER(temp1_float,temp2_float); + /* both not NaN, do the comparison */ + if (!isnan1 && !isnan2) { + PER(temp1_float, temp2_float); - if (not_comparable && !both_zero) /* not comparable */ - { - if ( print_data(options) ) - { - print_pos(ph,1,i,acc,pos,rank,dims,obj1,obj2); + if (not_comparable && !both_zero) { + if (print_data(options)) { + print_pos(ph, 1, index, acc, pos, rank, dims, obj1, obj2); parallel_print(SPACES); - parallel_print(F_FORMAT_P_NOTCOMP, (double)temp1_float, (double)temp2_float, - (double)ABS(temp1_float - temp2_float)); + parallel_print(F_FORMAT_P_NOTCOMP, (double) temp1_float, (double) temp2_float, (double) ABS(temp1_float - temp2_float)); } nfound++; } - - else - - if ( per > options->percent ) - { - if ( print_data(options) ) - { - print_pos(ph,1,i,acc,pos,rank,dims,obj1,obj2); - parallel_print(SPACES); - parallel_print(F_FORMAT_P, (double)temp1_float, (double)temp2_float, - (double)ABS(temp1_float - temp2_float), - (double)ABS(1 - temp2_float / temp1_float)); - } - nfound++; + else if (per > options->percent) { + if (print_data(options)) { + print_pos(ph, 1, index, acc, pos, rank, dims, obj1, obj2); + parallel_print(SPACES); + parallel_print(F_FORMAT_P, (double) temp1_float, (double) temp2_float, + (double) ABS(temp1_float - temp2_float), (double) ABS(1 - temp2_float / temp1_float)); } - + nfound++; + } } /* only one is NaN, assume difference */ - else if ((isnan1 && !isnan2) || (!isnan1 && isnan2)) - { - if ( print_data(options) ) - { - print_pos(ph,0,i,acc,pos,rank,dims,obj1,obj2); + else if ((isnan1 && !isnan2) || (!isnan1 && isnan2)) { + if (print_data(options)) { + print_pos(ph, 0, index, acc, pos, rank, dims, obj1, obj2); parallel_print(SPACES); - parallel_print(F_FORMAT, (double)temp1_float, (double)temp2_float, (double)ABS(temp1_float - temp2_float)); + parallel_print(F_FORMAT, (double) temp1_float, (double) temp2_float, (double) ABS(temp1_float - temp2_float)); } nfound++; - } } - - /*------------------------------------------------------------------------- - * no -d and -p - *------------------------------------------------------------------------- - */ - else if (equal_float(temp1_float,temp2_float,options)==FALSE) - { - - if ( print_data(options) ) - { - print_pos(ph,0,i,acc,pos,rank,dims,obj1,obj2); + /*------------------------------------------------------------------------- + * no -d and -p + *------------------------------------------------------------------------- + */ + else if (equal_float(temp1_float, temp2_float, options) == FALSE) { + if (print_data(options)) { + print_pos(ph, 0, index, acc, pos, rank, dims, obj1, obj2); parallel_print(SPACES); - parallel_print(F_FORMAT, (double)temp1_float, (double)temp2_float, (double)ABS(temp1_float - temp2_float)); + parallel_print(F_FORMAT, (double) temp1_float, (double) temp2_float, (double) ABS(temp1_float - temp2_float)); } nfound++; } } /*H5T_NATIVE_FLOAT*/ - /*------------------------------------------------------------------------- - * H5T_NATIVE_DOUBLE - *------------------------------------------------------------------------- - */ - - else if (type_size==8) - { + /*------------------------------------------------------------------------- + * H5T_NATIVE_DOUBLE + *------------------------------------------------------------------------- + */ + else if (type_size == 8) { double temp1_double; double temp2_double; - hbool_t isnan1 = FALSE; - hbool_t isnan2 = FALSE; + hbool_t isnan1 = FALSE; + hbool_t isnan2 = FALSE; - HDassert(type_size==sizeof(double)); + HDassert(type_size == sizeof(double)); HDmemcpy(&temp1_double, mem1, sizeof(double)); HDmemcpy(&temp2_double, mem2, sizeof(double)); - /* logic for detecting NaNs is different with options -d, -p and no options */ - - /*------------------------------------------------------------------------- - * -d and !-p - *------------------------------------------------------------------------- - */ - if (options->d && !options->p) - { - /*------------------------------------------------------------------------- - * detect NaNs - *------------------------------------------------------------------------- - */ - if ( options->do_nans ) - { - isnan1 = my_isnan(FLT_DOUBLE,&temp1_double); - isnan2 = my_isnan(FLT_DOUBLE,&temp2_double); + /* logic for detecting NaNs is different with options -d, -p and no options */ + /*------------------------------------------------------------------------- + * -d and !-p + *------------------------------------------------------------------------- + */ + if (options->d && !options->p) { + /*------------------------------------------------------------------------- + * detect NaNs + *------------------------------------------------------------------------- + */ + if (options->do_nans) { + isnan1 = my_isnan(FLT_DOUBLE, &temp1_double); + isnan2 = my_isnan(FLT_DOUBLE, &temp2_double); } /* both not NaN, do the comparison */ - if ( !isnan1 && !isnan2) - { - - if (ABS(temp1_double-temp2_double) > options->delta) - { - if ( print_data(options) ) - { - print_pos(ph,0,i,acc,pos,rank,dims,obj1,obj2); + if (!isnan1 && !isnan2) { + if (ABS(temp1_double-temp2_double) > options->delta) { + if (print_data(options)) { + print_pos(ph, 0, index, acc, pos, rank, dims, obj1, obj2); parallel_print(SPACES); - parallel_print(F_FORMAT,temp1_double,temp2_double,ABS(temp1_double-temp2_double)); + parallel_print(F_FORMAT, temp1_double, temp2_double, ABS(temp1_double - temp2_double)); } nfound++; } - } /* only one is NaN, assume difference */ - else if ((isnan1 && !isnan2) || (!isnan1 && isnan2)) - { - if ( print_data(options) ) - { - print_pos(ph,0,i,acc,pos,rank,dims,obj1,obj2); + else if ((isnan1 && !isnan2) || (!isnan1 && isnan2)) { + if (print_data(options)) { + print_pos(ph, 0, index, acc, pos, rank, dims, obj1, obj2); parallel_print(SPACES); - parallel_print(F_FORMAT,temp1_double,temp2_double,ABS(temp1_double-temp2_double)); + parallel_print(F_FORMAT, temp1_double, temp2_double, ABS(temp1_double - temp2_double)); } nfound++; - } } /* options->d && !options->p */ - - /*------------------------------------------------------------------------- - * !-d and -p - *------------------------------------------------------------------------- - */ - else if (!options->d && options->p) - { - - /*------------------------------------------------------------------------- - * detect NaNs - *------------------------------------------------------------------------- - */ - if ( options->do_nans ) - { - isnan1 = my_isnan(FLT_DOUBLE,&temp1_double); - isnan2 = my_isnan(FLT_DOUBLE,&temp2_double); + /*------------------------------------------------------------------------- + * !-d and -p + *------------------------------------------------------------------------- + */ + else if (!options->d && options->p) { + /*------------------------------------------------------------------------- + * detect NaNs + *------------------------------------------------------------------------- + */ + if (options->do_nans) { + isnan1 = my_isnan(FLT_DOUBLE, &temp1_double); + isnan2 = my_isnan(FLT_DOUBLE, &temp2_double); } /* both not NaN, do the comparison */ - if ( !isnan1 && !isnan2) - { - - PER(temp1_double,temp2_double); + if (!isnan1 && !isnan2) { + PER(temp1_double, temp2_double); - if (not_comparable && !both_zero) /* not comparable */ - { - if ( print_data(options) ) - { - print_pos(ph,1,i,acc,pos,rank,dims,obj1,obj2); + if (not_comparable && !both_zero) { + if (print_data(options)) { + print_pos(ph, 1, index, acc, pos, rank, dims, obj1, obj2); parallel_print(SPACES); - parallel_print(F_FORMAT_P_NOTCOMP,temp1_double,temp2_double, - ABS(temp1_double-temp2_double)); + parallel_print(F_FORMAT_P_NOTCOMP, temp1_double, temp2_double, ABS(temp1_double - temp2_double)); } nfound++; } - - else - - if ( per > options->percent ) - { - if ( print_data(options) ) - { - print_pos(ph,1,i,acc,pos,rank,dims,obj1,obj2); - parallel_print(SPACES); - parallel_print(F_FORMAT_P,temp1_double,temp2_double, - ABS(temp1_double-temp2_double), - ABS(1-temp2_double/temp1_double)); - } - nfound++; + else if (per > options->percent) { + if (print_data(options)) { + print_pos(ph, 1, index, acc, pos, rank, dims, obj1, obj2); + parallel_print(SPACES); + parallel_print(F_FORMAT_P, temp1_double, temp2_double, ABS(temp1_double - temp2_double), ABS(1 - temp2_double / temp1_double)); } - + nfound++; + } } /* only one is NaN, assume difference */ - else if ((isnan1 && !isnan2) || (!isnan1 && isnan2)) - { - if ( print_data(options) ) - { - print_pos(ph,0,i,acc,pos,rank,dims,obj1,obj2); + else if ((isnan1 && !isnan2) || (!isnan1 && isnan2)) { + if (print_data(options)) { + print_pos(ph, 0, index, acc, pos, rank, dims, obj1, obj2); parallel_print(SPACES); - parallel_print(F_FORMAT,temp1_double,temp2_double,ABS(temp1_double-temp2_double)); + parallel_print(F_FORMAT, temp1_double, temp2_double, ABS(temp1_double - temp2_double)); } nfound++; - } } - - /*------------------------------------------------------------------------- - * -d and -p - *------------------------------------------------------------------------- - */ - else if ( options->d && options->p) - { - - /*------------------------------------------------------------------------- + /*------------------------------------------------------------------------- + * -d and -p + *------------------------------------------------------------------------- + */ + else if (options->d && options->p) { + /*------------------------------------------------------------------------- * detect NaNs *------------------------------------------------------------------------- */ - if ( options->do_nans ) - { - isnan1 = my_isnan(FLT_DOUBLE,&temp1_double); - isnan2 = my_isnan(FLT_DOUBLE,&temp2_double); + if (options->do_nans) { + isnan1 = my_isnan(FLT_DOUBLE, &temp1_double); + isnan2 = my_isnan(FLT_DOUBLE, &temp2_double); } /* both not NaN, do the comparison */ - if ( !isnan1 && !isnan2) - { - - PER(temp1_double,temp2_double); + if (!isnan1 && !isnan2) { + PER(temp1_double, temp2_double); - if (not_comparable && !both_zero) /* not comparable */ - { - if ( print_data(options) ) - { - print_pos(ph,1,i,acc,pos,rank,dims,obj1,obj2); + if (not_comparable && !both_zero) { + if (print_data(options)) { + print_pos(ph, 1, index, acc, pos, rank, dims, obj1, obj2); parallel_print(SPACES); - parallel_print(F_FORMAT_P_NOTCOMP,temp1_double,temp2_double, - ABS(temp1_double-temp2_double)); + parallel_print(F_FORMAT_P_NOTCOMP, temp1_double, temp2_double, ABS(temp1_double - temp2_double)); } nfound++; } - - else - - if ( per > options->percent && - ABS(temp1_double-temp2_double) > options->delta ) - { - if ( print_data(options) ) - { - print_pos(ph,1,i,acc,pos,rank,dims,obj1,obj2); - parallel_print(SPACES); - parallel_print(F_FORMAT_P,temp1_double,temp2_double, - ABS(temp1_double-temp2_double), - ABS(1-temp2_double/temp1_double)); - } - nfound++; + else if (per > options->percent && + ABS(temp1_double-temp2_double) > options->delta) { + if (print_data(options)) { + print_pos(ph, 1, index, acc, pos, rank, dims, obj1, obj2); + parallel_print(SPACES); + parallel_print(F_FORMAT_P, temp1_double, temp2_double, ABS(temp1_double - temp2_double), ABS(1 - temp2_double / temp1_double)); } - + nfound++; + } } /* only one is NaN, assume difference */ - else if ((isnan1 && !isnan2) || (!isnan1 && isnan2)) - { - if ( print_data(options) ) - { - print_pos(ph,0,i,acc,pos,rank,dims,obj1,obj2); + else if ((isnan1 && !isnan2) || (!isnan1 && isnan2)) { + if (print_data(options)) { + print_pos(ph, 0, index, acc, pos, rank, dims, obj1, obj2); parallel_print(SPACES); - parallel_print(F_FORMAT,temp1_double,temp2_double,ABS(temp1_double-temp2_double)); + parallel_print(F_FORMAT, temp1_double, temp2_double, ABS(temp1_double - temp2_double)); } nfound++; } } - - /*------------------------------------------------------------------------- - * no -d and -p - *------------------------------------------------------------------------- - */ - else if (equal_double(temp1_double,temp2_double,options)==FALSE) - { - if ( print_data(options) ) - { - print_pos(ph,0,i,acc,pos,rank,dims,obj1,obj2); + /*------------------------------------------------------------------------- + * no -d and -p + *------------------------------------------------------------------------- + */ + else if (equal_double(temp1_double, temp2_double, options) == FALSE) { + if (print_data(options)) { + print_pos(ph, 0, index, acc, pos, rank, dims, obj1, obj2); parallel_print(SPACES); - parallel_print(F_FORMAT,temp1_double,temp2_double,ABS(temp1_double-temp2_double)); + parallel_print(F_FORMAT, temp1_double, temp2_double, ABS(temp1_double - temp2_double)); } nfound++; } - } /*H5T_NATIVE_DOUBLE*/ + } /*H5T_NATIVE_DOUBLE*/ #if H5_SIZEOF_LONG_DOUBLE != H5_SIZEOF_DOUBLE - - /*------------------------------------------------------------------------- - * H5T_NATIVE_LDOUBLE - *------------------------------------------------------------------------- - */ - - else if (type_size == H5_SIZEOF_LONG_DOUBLE) - { + /*------------------------------------------------------------------------- + * H5T_NATIVE_LDOUBLE + *------------------------------------------------------------------------- + */ + else if (type_size == H5_SIZEOF_LONG_DOUBLE) { long double temp1_double; long double temp2_double; - hbool_t isnan1 = FALSE; - hbool_t isnan2 = FALSE; - + hbool_t isnan1 = FALSE; + hbool_t isnan2 = FALSE; HDassert(type_size == sizeof(long double)); HDmemcpy(&temp1_double, mem1, sizeof(long double)); HDmemcpy(&temp2_double, mem2, sizeof(long double)); - /* logic for detecting NaNs is different with options -d, -p and no options */ - - /*------------------------------------------------------------------------- - * -d and !-p - *------------------------------------------------------------------------- - */ - if (options->d && !options->p) - { + /* logic for detecting NaNs is different with options -d, -p and no options */ - /*------------------------------------------------------------------------- - * detect NaNs - *------------------------------------------------------------------------- - */ - if ( options->do_nans ) - { + /*------------------------------------------------------------------------- + * -d and !-p + *------------------------------------------------------------------------- + */ + if (options->d && !options->p) { + /*------------------------------------------------------------------------- + * detect NaNs + *------------------------------------------------------------------------- + */ + if (options->do_nans) { isnan1 = my_isnan(FLT_LDOUBLE,&temp1_double); isnan2 = my_isnan(FLT_LDOUBLE,&temp2_double); } - /* both not NaN, do the comparison */ - if ( !isnan1 && !isnan2) - { - - if (ABS(temp1_double-temp2_double) > options->delta) - { - if ( print_data(options) ) - { - print_pos(ph,0,i,acc,pos,rank,dims,obj1,obj2); + /* both not NaN, do the comparison */ + if (!isnan1 && !isnan2) { + if (ABS(temp1_double-temp2_double) > options->delta) { + if (print_data(options)) { + print_pos(ph, 0, index, acc, pos, rank, dims, obj1, obj2); parallel_print(SPACES); - parallel_print(LD_FORMAT,temp1_double,temp2_double,ABS(temp1_double-temp2_double)); + parallel_print(LD_FORMAT, temp1_double, temp2_double, ABS(temp1_double - temp2_double)); } nfound++; } } /* NaN */ /* only one is NaN, assume difference */ - else if ((isnan1 && !isnan2) || (!isnan1 && isnan2)) - { - if ( print_data(options) ) - { - print_pos(ph,0,i,acc,pos,rank,dims,obj1,obj2); + else if ((isnan1 && !isnan2) || (!isnan1 && isnan2)) { + if (print_data(options)) { + print_pos(ph, 0, index, acc, pos, rank, dims, obj1, obj2); parallel_print(SPACES); - parallel_print(F_FORMAT,temp1_double,temp2_double,ABS(temp1_double-temp2_double)); + parallel_print(F_FORMAT, temp1_double, temp2_double, ABS(temp1_double - temp2_double)); } nfound++; } } - - /*------------------------------------------------------------------------- - * !-d and -p - *------------------------------------------------------------------------- - */ - else if (!options->d && options->p) - { - - /*------------------------------------------------------------------------- - * detect NaNs - *------------------------------------------------------------------------- - */ - if ( options->do_nans ) - { - isnan1 = my_isnan(FLT_LDOUBLE,&temp1_double); - isnan2 = my_isnan(FLT_LDOUBLE,&temp2_double); + /*------------------------------------------------------------------------- + * !-d and -p + *------------------------------------------------------------------------- + */ + else if (!options->d && options->p) { + /*------------------------------------------------------------------------- + * detect NaNs + *------------------------------------------------------------------------- + */ + if (options->do_nans) { + isnan1 = my_isnan(FLT_LDOUBLE, &temp1_double); + isnan2 = my_isnan(FLT_LDOUBLE, &temp2_double); } - /* both not NaN, do the comparison */ - if ( !isnan1 && !isnan2) - { - + /* both not NaN, do the comparison */ + if (!isnan1 && !isnan2) { PER(temp1_double,temp2_double); - if (not_comparable && !both_zero) /* not comparable */ - { - if ( print_data(options) ) - { - print_pos(ph,1,i,acc,pos,rank,dims,obj1,obj2); + if (not_comparable && !both_zero) { + if (print_data(options)) { + print_pos(ph, 1, index, acc, pos, rank, dims, obj1, obj2); parallel_print(SPACES); - parallel_print(LD_FORMAT_P_NOTCOMP,temp1_double,temp2_double, - ABS(temp1_double-temp2_double)); + parallel_print(LD_FORMAT_P_NOTCOMP, temp1_double, temp2_double, ABS(temp1_double - temp2_double)); } nfound++; } - - else - - if ( per > options->percent ) - { - if ( print_data(options) ) - { - print_pos(ph,1,i,acc,pos,rank,dims,obj1,obj2); - parallel_print(SPACES); - parallel_print(LD_FORMAT_P,temp1_double,temp2_double, - ABS(temp1_double-temp2_double), - ABS(1-temp2_double/temp1_double)); - } - nfound++; + else if (per > options->percent) { + if (print_data(options)) { + print_pos(ph, 1, index, acc, pos, rank, dims, obj1, obj2); + parallel_print(SPACES); + parallel_print(LD_FORMAT_P, temp1_double, temp2_double, ABS(temp1_double - temp2_double), ABS(1 - temp2_double / temp1_double)); } - + nfound++; + } } /* NaN */ /* only one is NaN, assume difference */ - else if ((isnan1 && !isnan2) || (!isnan1 && isnan2)) - { - if ( print_data(options) ) - { - print_pos(ph,0,i,acc,pos,rank,dims,obj1,obj2); + else if ((isnan1 && !isnan2) || (!isnan1 && isnan2)) { + if (print_data(options)) { + print_pos(ph, 0, index, acc, pos, rank, dims, obj1, obj2); parallel_print(SPACES); - parallel_print(F_FORMAT,temp1_double,temp2_double,ABS(temp1_double-temp2_double)); + parallel_print(F_FORMAT, temp1_double, temp2_double, ABS(temp1_double - temp2_double)); } nfound++; } - } - - /*------------------------------------------------------------------------- - * -d and -p - *------------------------------------------------------------------------- - */ - else if ( options->d && options->p) - { - - /*------------------------------------------------------------------------- - * detect NaNs - *------------------------------------------------------------------------- - */ - if ( options->do_nans ) - { - isnan1 = my_isnan(FLT_LDOUBLE,&temp1_double); - isnan2 = my_isnan(FLT_LDOUBLE,&temp2_double); + } + /*------------------------------------------------------------------------- + * -d and -p + *------------------------------------------------------------------------- + */ + else if ( options->d && options->p) { + /*------------------------------------------------------------------------- + * detect NaNs + *------------------------------------------------------------------------- + */ + if (options->do_nans) { + isnan1 = my_isnan(FLT_LDOUBLE, &temp1_double); + isnan2 = my_isnan(FLT_LDOUBLE, &temp2_double); } - /* both not NaN, do the comparison */ - if ( !isnan1 && !isnan2) - { - + /* both not NaN, do the comparison */ + if ( !isnan1 && !isnan2) { PER(temp1_double,temp2_double); - if (not_comparable && !both_zero) /* not comparable */ - { - if ( print_data(options) ) - { - print_pos(ph,1,i,acc,pos,rank,dims,obj1,obj2); + if (not_comparable && !both_zero) { + if (print_data(options)) { + print_pos(ph, 1, index, acc, pos, rank, dims, obj1, obj2); parallel_print(SPACES); - parallel_print(LD_FORMAT_P_NOTCOMP,temp1_double,temp2_double, - ABS(temp1_double-temp2_double)); + parallel_print(LD_FORMAT_P_NOTCOMP, temp1_double, temp2_double, ABS(temp1_double - temp2_double)); } nfound++; } - - else - - if ( per > options->percent && - ABS(temp1_double-temp2_double) > options->delta ) - { - if ( print_data(options) ) - { - print_pos(ph,1,i,acc,pos,rank,dims,obj1,obj2); - parallel_print(SPACES); - parallel_print(LD_FORMAT_P,temp1_double,temp2_double, - ABS(temp1_double-temp2_double), - ABS(1-temp2_double/temp1_double)); - } - nfound++; + else if (per > options->percent && ABS(temp1_double-temp2_double) > options->delta) { + if (print_data(options)) { + print_pos(ph, 1, index, acc, pos, rank, dims, obj1, obj2); + parallel_print(SPACES); + parallel_print(LD_FORMAT_P, temp1_double, temp2_double, ABS(temp1_double - temp2_double), ABS(1 - temp2_double / temp1_double)); } - + nfound++; + } } /* NaN */ /* only one is NaN, assume difference */ - else if ((isnan1 && !isnan2) || (!isnan1 && isnan2)) - { - if ( print_data(options) ) - { - print_pos(ph,0,i,acc,pos,rank,dims,obj1,obj2); + else if ((isnan1 && !isnan2) || (!isnan1 && isnan2)) { + if (print_data(options)) { + print_pos(ph, 0, index, acc, pos, rank, dims, obj1, obj2); parallel_print(SPACES); - parallel_print(F_FORMAT,temp1_double,temp2_double,ABS(temp1_double-temp2_double)); + parallel_print(F_FORMAT, temp1_double, temp2_double, ABS(temp1_double - temp2_double)); } nfound++; } } - - /*------------------------------------------------------------------------- - * no -d and -p - *------------------------------------------------------------------------- - */ - else if (equal_ldouble(temp1_double,temp2_double,options)==FALSE) - { - if ( print_data(options) ) - { - print_pos(ph,0,i,acc,pos,rank,dims,obj1,obj2); + /*------------------------------------------------------------------------- + * no -d and -p + *------------------------------------------------------------------------- + */ + else if (equal_ldouble(temp1_double, temp2_double, options) == FALSE) { + if (print_data(options)) { + print_pos(ph, 0, index, acc, pos, rank, dims, obj1, obj2); parallel_print(SPACES); - parallel_print(LD_FORMAT,temp1_double,temp2_double,ABS(temp1_double-temp2_double)); + parallel_print(LD_FORMAT, temp1_double, temp2_double, ABS(temp1_double - temp2_double)); } nfound++; } - } /*H5T_NATIVE_LDOUBLE*/ + } /*H5T_NATIVE_LDOUBLE*/ #endif /* H5_SIZEOF_LONG_DOUBLE */ + break; /* H5T_FLOAT class */ - - break; /* H5T_FLOAT class */ - - } /* switch */ + } /* switch */ h5difftrace("diff_datum finish\n"); - return nfound; + return nfound; } /*------------------------------------------------------------------------- @@ -2569,12 +1926,11 @@ static hsize_t diff_datum(void *_mem1, *------------------------------------------------------------------------- */ -static hbool_t all_zero(const void *_mem, size_t size) -{ - const unsigned char *mem = (const unsigned char *)_mem; +static hbool_t all_zero(const void *_mem, size_t size) { + const unsigned char *mem = (const unsigned char *) _mem; - while(size-- > 0) - if(mem[size]) + while (size-- > 0) + if (mem[size]) return FALSE; return TRUE; @@ -2591,22 +1947,18 @@ static hbool_t all_zero(const void *_mem, size_t size) */ static -void print_region_block(int i, hsize_t *ptdata, int ndims) -{ +void print_region_block(int i, hsize_t *ptdata, int ndims) { int j; parallel_print(" "); for (j = 0; j < ndims; j++) - parallel_print("%s%lu", j ? "," : " (", - (unsigned long)ptdata[i * 2 * ndims + j]); + parallel_print("%s%lu", j ? "," : " (", (unsigned long) ptdata[i * 2 * ndims + j]); for (j = 0; j < ndims; j++) - parallel_print("%s%lu", j ? "," : ")-(", - (unsigned long)ptdata[i * 2 * ndims + j + ndims]); + parallel_print("%s%lu", j ? "," : ")-(", (unsigned long) ptdata[i * 2 * ndims + j + ndims]); parallel_print(")"); } - /*------------------------------------------------------------------------- * Function: print_points * @@ -2618,14 +1970,12 @@ void print_region_block(int i, hsize_t *ptdata, int ndims) */ static -void print_points(int i, hsize_t *ptdata, int ndims) -{ +void print_points(int i, hsize_t *ptdata, int ndims) { int j; parallel_print(" "); for (j = 0; j < ndims; j++) - parallel_print("%s%lu", j ? "," : "(", - (unsigned long)(ptdata[i * ndims + j])); + parallel_print("%s%lu", j ? "," : "(", (unsigned long) (ptdata[i * ndims + j])); parallel_print(")"); } @@ -2640,62 +1990,61 @@ void print_points(int i, hsize_t *ptdata, int ndims) *------------------------------------------------------------------------- */ -static -hsize_t diff_region(hid_t obj1_id, - hid_t obj2_id, - hid_t region1_id, - hid_t region2_id, - diff_opt_t *options) +static hsize_t diff_region(hid_t obj1_id, hid_t obj2_id, hid_t region1_id, hid_t region2_id, diff_opt_t *options) { - hssize_t nblocks1, npoints1; - hssize_t nblocks2, npoints2; - hsize_t alloc_size; - hsize_t *ptdata1; - hsize_t *ptdata2; - int ndims1; - int ndims2; - int i, j; - hsize_t nfound_b = 0; /* block differences found */ - hsize_t nfound_p = 0; /* point differences found */ + hssize_t nblocks1, npoints1; + hssize_t nblocks2, npoints2; + hsize_t alloc_size; + hsize_t *ptdata1; + hsize_t *ptdata2; + int ndims1; + int ndims2; + int i, j; + hsize_t nfound_b = 0; /* block differences found */ + hsize_t nfound_p = 0; /* point differences found */ ndims1 = H5Sget_simple_extent_ndims(region1_id); ndims2 = H5Sget_simple_extent_ndims(region2_id); /* - * These two functions fail if the region does not have blocks or points, - * respectively. They do not currently know how to translate from one to - * the other. - */ - H5E_BEGIN_TRY { - nblocks1 = H5Sget_select_hyper_nblocks(region1_id); - nblocks2 = H5Sget_select_hyper_nblocks(region2_id); + * These two functions fail if the region does not have blocks or points, + * respectively. They do not currently know how to translate from one to + * the other. + */ + H5E_BEGIN_TRY + { + nblocks1 = H5Sget_select_hyper_nblocks(region1_id); + nblocks2 = H5Sget_select_hyper_nblocks(region2_id); - npoints1 = H5Sget_select_elem_npoints(region1_id); - npoints2 = H5Sget_select_elem_npoints(region2_id); - } H5E_END_TRY; + npoints1 = H5Sget_select_elem_npoints(region1_id); + npoints2 = H5Sget_select_elem_npoints(region2_id); + }H5E_END_TRY; - if(nblocks1 != nblocks2 || npoints1 != npoints2 || ndims1 != ndims2) { + if (nblocks1 != nblocks2 || npoints1 != npoints2 || ndims1 != ndims2) { options->not_cmp = 1; return 0; } /*------------------------------------------------------------------------- - * compare block information - *------------------------------------------------------------------------- - */ - if(nblocks1 > 0) { + * compare block information + *------------------------------------------------------------------------- + */ + if (nblocks1 > 0) { HDassert(ndims1 > 0); - alloc_size = (hsize_t)nblocks1 * (unsigned)ndims1 * 2 * sizeof(ptdata1[0]); - HDassert(alloc_size == (hsize_t)((size_t)alloc_size)); /*check for overflow*/ + alloc_size = (hsize_t) nblocks1 * (unsigned) ndims1 * 2 + * sizeof(ptdata1[0]); + HDassert(alloc_size == (hsize_t)((size_t )alloc_size)); /*check for overflow*/ - ptdata1 = (hsize_t *)HDmalloc((size_t)alloc_size); + ptdata1 = (hsize_t *) HDmalloc((size_t )alloc_size); H5_CHECK_OVERFLOW(nblocks1, hssize_t, hsize_t); - H5Sget_select_hyper_blocklist(region1_id, (hsize_t)0, (hsize_t)nblocks1, ptdata1); + H5Sget_select_hyper_blocklist(region1_id, (hsize_t) 0, + (hsize_t) nblocks1, ptdata1); - ptdata2 = (hsize_t *)HDmalloc((size_t)alloc_size); + ptdata2 = (hsize_t *) HDmalloc((size_t )alloc_size); H5_CHECK_OVERFLOW(nblocks2, hssize_t, hsize_t); - H5Sget_select_hyper_blocklist(region2_id, (hsize_t)0, (hsize_t)nblocks2, ptdata2); + H5Sget_select_hyper_blocklist(region2_id, (hsize_t) 0, + (hsize_t) nblocks2, ptdata2); for (i = 0; i < nblocks1; i++) { /* start coordinates and opposite corner */ @@ -2704,14 +2053,13 @@ hsize_t diff_region(hid_t obj1_id, start1 = ptdata1[i * 2 * ndims1 + j]; start2 = ptdata2[i * 2 * ndims1 + j]; - end1 = ptdata1[i * 2 * ndims1 + j + ndims1]; - end2 = ptdata2[i * 2 * ndims1 + j + ndims1]; + end1 = ptdata1[i * 2 * ndims1 + j + ndims1]; + end2 = ptdata2[i * 2 * ndims1 + j + ndims1]; if (start1 != start2 || end1 != end2) nfound_b++; } } - /* print differences if found */ if (nfound_b && options->m_verbose) { H5O_info_t oi1, oi2; @@ -2720,8 +2068,9 @@ hsize_t diff_region(hid_t obj1_id, H5Oget_info(obj2_id, &oi2); parallel_print("Referenced dataset %lu %lu\n", - (unsigned long)oi1.addr, (unsigned long)oi2.addr); - parallel_print("------------------------------------------------------------\n"); + (unsigned long) oi1.addr, (unsigned long) oi2.addr); + parallel_print( + "------------------------------------------------------------\n"); parallel_print("Region blocks\n"); for (i = 0; i < nblocks1; i++) { @@ -2737,47 +2086,50 @@ hsize_t diff_region(hid_t obj1_id, } /*------------------------------------------------------------------------- - * compare point information - *------------------------------------------------------------------------- - */ - if(npoints1 > 0) { - alloc_size = (hsize_t)npoints1 * (unsigned)ndims1 * sizeof(ptdata1[0]); - HDassert(alloc_size == (hsize_t)((size_t)alloc_size)); /*check for overflow*/ + * compare point information + *------------------------------------------------------------------------- + */ + if (npoints1 > 0) { + alloc_size = (hsize_t) npoints1 * (unsigned) ndims1 + * sizeof(ptdata1[0]); + HDassert(alloc_size == (hsize_t)((size_t )alloc_size)); /*check for overflow*/ - ptdata1 = (hsize_t *)HDmalloc((size_t)alloc_size); - H5_CHECK_OVERFLOW(npoints1,hssize_t,hsize_t); - H5Sget_select_elem_pointlist(region1_id, (hsize_t)0, (hsize_t)npoints1, ptdata1); + ptdata1 = (hsize_t *) HDmalloc((size_t )alloc_size); + H5_CHECK_OVERFLOW(npoints1, hssize_t, hsize_t); + H5Sget_select_elem_pointlist(region1_id, (hsize_t) 0, + (hsize_t) npoints1, ptdata1); - ptdata2 = (hsize_t *)HDmalloc((size_t)alloc_size); - H5_CHECK_OVERFLOW(npoints1,hssize_t,hsize_t); - H5Sget_select_elem_pointlist(region2_id, (hsize_t)0, (hsize_t)npoints2, ptdata2); + ptdata2 = (hsize_t *) HDmalloc((size_t )alloc_size); + H5_CHECK_OVERFLOW(npoints1, hssize_t, hsize_t); + H5Sget_select_elem_pointlist(region2_id, (hsize_t) 0, + (hsize_t) npoints2, ptdata2); - for(i = 0; i < npoints1; i++) { + for (i = 0; i < npoints1; i++) { hsize_t pt1, pt2; - for(j = 0; j < ndims1; j++) { + for (j = 0; j < ndims1; j++) { pt1 = ptdata1[i * ndims1 + j]; pt2 = ptdata2[i * ndims1 + j]; - if(pt1 != pt2) + if (pt1 != pt2) nfound_p++; } } - if(nfound_p && options->m_verbose) { + if (nfound_p && options->m_verbose) { parallel_print("Region points\n"); - for(i = 0; i < npoints1; i++) { + for (i = 0; i < npoints1; i++) { hsize_t pt1, pt2; - int diff_data = 0; + int diff_data = 0; - for(j = 0; j < ndims1; j++) { + for (j = 0; j < ndims1; j++) { pt1 = ptdata1[i * ndims1 + j]; pt2 = ptdata2[i * ndims1 + j]; - if(pt1 != pt2) { + if (pt1 != pt2) { diff_data = 1; break; } } - if(diff_data) { + if (diff_data) { parallel_print("point #%d", i); print_points(i, ptdata1, ndims1); print_points(i, ptdata2, ndims1); @@ -2786,7 +2138,6 @@ hsize_t diff_region(hid_t obj1_id, } } - #if defined (H5DIFF_DEBUG) for (i = 0; i < npoints1; i++) { int j; @@ -2794,8 +2145,8 @@ hsize_t diff_region(hid_t obj1_id, parallel_print("%sPt%lu: " , i ? "," : "", (unsigned long)i); for (j = 0; j < ndims1; j++) - parallel_print("%s%lu", j ? "," : "(", - (unsigned long)(ptdata1[i * ndims1 + j])); + parallel_print("%s%lu", j ? "," : "(", + (unsigned long)(ptdata1[i * ndims1 + j])); parallel_print(")"); } @@ -2805,12 +2156,11 @@ hsize_t diff_region(hid_t obj1_id, HDfree(ptdata2); } - nfound_b = nfound_b / (unsigned)ndims1; - nfound_p = nfound_p / (unsigned)ndims1; + nfound_b = nfound_b / (unsigned) ndims1; + nfound_p = nfound_p / (unsigned) ndims1; return (nfound_p + nfound_b); } - /*------------------------------------------------------------------------- * Function: character_compare * @@ -2821,33 +2171,18 @@ hsize_t diff_region(hid_t obj1_id, *------------------------------------------------------------------------- */ -static -hsize_t character_compare(char *mem1, - char *mem2, - hsize_t i, - size_t u, - int rank, - hsize_t *dims, - hsize_t *acc, - hsize_t *pos, - diff_opt_t *options, - const char *obj1, - const char *obj2, - int *ph) -{ - hsize_t nfound=0; /* differences found */ - char temp1_uchar; - char temp2_uchar; +static hsize_t character_compare(char *mem1, char *mem2, hsize_t i, size_t u, + int rank, hsize_t *dims, hsize_t *acc, hsize_t *pos, diff_opt_t *options, const char *obj1, const char *obj2, int *ph) { + hsize_t nfound = 0; /* differences found */ + char temp1_uchar; + char temp2_uchar; HDmemcpy(&temp1_uchar, mem1, sizeof(unsigned char)); - HDmemcpy(&temp2_uchar, mem2, sizeof(unsigned char)); - h5diffdebug3("character_compare start %d=%d\n",temp1_uchar,temp2_uchar); + HDmemcpy(&temp2_uchar, mem2, sizeof(unsigned char)); h5diffdebug3("character_compare start %d=%d\n",temp1_uchar,temp2_uchar); - if (temp1_uchar != temp2_uchar) - { - if ( print_data(options) ) - { - print_char_pos(ph,0,i,u,acc,pos,rank,dims,obj1,obj2); + if (temp1_uchar != temp2_uchar) { + if (print_data(options)) { + print_char_pos(ph, 0, i, u, acc, pos, rank, dims, obj1, obj2); parallel_print(" "); h5diff_print_char(temp1_uchar); parallel_print(" "); @@ -2861,7 +2196,6 @@ hsize_t character_compare(char *mem1, return nfound; } - /*------------------------------------------------------------------------- * Function: character_compare_opt * @@ -2872,23 +2206,13 @@ hsize_t character_compare(char *mem1, *------------------------------------------------------------------------- */ -static hsize_t character_compare_opt(unsigned char *mem1, - unsigned char *mem2, - hsize_t i, - int rank, - hsize_t *dims, - hsize_t *acc, - hsize_t *pos, - diff_opt_t *options, - const char *obj1, - const char *obj2, - int *ph) -{ - hsize_t nfound=0; /* differences found */ - unsigned char temp1_uchar; - unsigned char temp2_uchar; - double per; - hbool_t both_zero; +static hsize_t character_compare_opt(unsigned char *mem1, unsigned char *mem2, + hsize_t i, int rank, hsize_t *dims, hsize_t *acc, hsize_t *pos, diff_opt_t *options, const char *obj1, const char *obj2, int *ph) { + hsize_t nfound = 0; /* differences found */ + unsigned char temp1_uchar; + unsigned char temp2_uchar; + double per; + hbool_t both_zero; HDmemcpy(&temp1_uchar, mem1, sizeof(unsigned char)); HDmemcpy(&temp2_uchar, mem2, sizeof(unsigned char)); @@ -2896,66 +2220,52 @@ static hsize_t character_compare_opt(unsigned char *mem1, h5difftrace("character_compare_opt start\n"); /* -d and !-p */ - if (options->d && !options->p) - { - if ( PDIFF(temp1_uchar,temp2_uchar) > options->delta) - { - if ( print_data(options) ) - { - print_pos(ph,0,i,acc,pos,rank,dims,obj1,obj2); + if (options->d && !options->p) { + if (PDIFF(temp1_uchar,temp2_uchar) > options->delta) { + if (print_data(options)) { + print_pos(ph, 0, i, acc, pos, rank, dims, obj1, obj2); parallel_print(SPACES); - parallel_print(I_FORMAT,temp1_uchar,temp2_uchar,PDIFF(temp1_uchar,temp2_uchar)); + parallel_print(I_FORMAT, temp1_uchar, temp2_uchar, PDIFF(temp1_uchar, temp2_uchar)); } nfound++; } } /* !-d and -p */ - else if (!options->d && options->p) - { - PER_UNSIGN(signed char,temp1_uchar,temp2_uchar); - if ( per > options->percent ) - { - if ( print_data(options) ) - { - print_pos(ph,1,i,acc,pos,rank,dims,obj1,obj2); + else if (!options->d && options->p) { + PER_UNSIGN(signed char, temp1_uchar, temp2_uchar); + if (per > options->percent) { + if (print_data(options)) { + print_pos(ph, 1, i, acc, pos, rank, dims, obj1, obj2); parallel_print(SPACES); - parallel_print(I_FORMAT_P,temp1_uchar,temp2_uchar,PDIFF(temp1_uchar,temp2_uchar),per); + parallel_print(I_FORMAT_P, temp1_uchar, temp2_uchar, PDIFF(temp1_uchar, temp2_uchar), per); } nfound++; } } /* -d and -p */ - else if ( options->d && options->p) - { - PER_UNSIGN(signed char,temp1_uchar,temp2_uchar); - if ( per > options->percent && PDIFF(temp1_uchar,temp2_uchar) > options->delta ) - { - if ( print_data(options) ) - { - print_pos(ph,1,i,acc,pos,rank,dims,obj1,obj2); + else if (options->d && options->p) { + PER_UNSIGN(signed char, temp1_uchar, temp2_uchar); + if (per > options->percent && PDIFF(temp1_uchar,temp2_uchar) > options->delta) { + if (print_data(options)) { + print_pos(ph, 1, i, acc, pos, rank, dims, obj1, obj2); parallel_print(SPACES); - parallel_print(I_FORMAT_P,temp1_uchar,temp2_uchar,PDIFF(temp1_uchar,temp2_uchar),per); + parallel_print(I_FORMAT_P, temp1_uchar, temp2_uchar, PDIFF(temp1_uchar, temp2_uchar), per); } nfound++; } } - else if (temp1_uchar != temp2_uchar) - { - if ( print_data(options) ) - { - print_pos(ph,0,i,acc,pos,rank,dims,obj1,obj2); + else if (temp1_uchar != temp2_uchar) { + if (print_data(options)) { + print_pos(ph, 0, i, acc, pos, rank, dims, obj1, obj2); parallel_print(SPACES); - parallel_print(I_FORMAT,temp1_uchar,temp2_uchar,PDIFF(temp1_uchar,temp2_uchar)); + parallel_print(I_FORMAT, temp1_uchar, temp2_uchar, PDIFF(temp1_uchar, temp2_uchar)); } nfound++; - } - h5difftrace("character_compare_opt finish\n"); + } h5difftrace("character_compare_opt finish\n"); return nfound; - } - /*------------------------------------------------------------------------- * Function: diff_float * @@ -2965,273 +2275,210 @@ static hsize_t character_compare_opt(unsigned char *mem1, * *------------------------------------------------------------------------- */ -static hsize_t diff_float(unsigned char *mem1, - unsigned char *mem2, - hsize_t nelmts, - hsize_t hyper_start, - int rank, - hsize_t *dims, - hsize_t *acc, - hsize_t *pos, - diff_opt_t *options, - const char *obj1, - const char *obj2, - int *ph) +static hsize_t diff_float(unsigned char *mem1, unsigned char *mem2, + hsize_t nelmts, hsize_t hyper_start, int rank, hsize_t *dims, hsize_t *acc, hsize_t *pos, diff_opt_t *options, const char *obj1, + const char *obj2, int *ph) { - hsize_t nfound=0; /* number of differences found */ - float temp1_float; - float temp2_float; - hsize_t i; - double per; - hbool_t both_zero; - hbool_t isnan1 = FALSE; - hbool_t isnan2 = FALSE; + hsize_t nfound = 0; /* number of differences found */ + float temp1_float; + float temp2_float; + hsize_t i; + double per; + hbool_t both_zero; + hbool_t isnan1 = FALSE; + hbool_t isnan2 = FALSE; h5difftrace("diff_float start\n"); - /*------------------------------------------------------------------------- - * -d and !-p - *------------------------------------------------------------------------- - */ + /*------------------------------------------------------------------------- + * -d and !-p + *------------------------------------------------------------------------- + */ - if (options->d && !options->p) - { - for ( i = 0; i < nelmts; i++) - { + if (options->d && !options->p) { + for (i = 0; i < nelmts; i++) { HDmemcpy(&temp1_float, mem1, sizeof(float)); HDmemcpy(&temp2_float, mem2, sizeof(float)); - /*------------------------------------------------------------------------- - * detect NaNs - *------------------------------------------------------------------------- - */ - if ( options->do_nans ) - { - isnan1 = my_isnan(FLT_FLOAT,&temp1_float); - isnan2 = my_isnan(FLT_FLOAT,&temp2_float); + /*------------------------------------------------------------------------- + * detect NaNs + *------------------------------------------------------------------------- + */ + if (options->do_nans) { + isnan1 = my_isnan(FLT_FLOAT, &temp1_float); + isnan2 = my_isnan(FLT_FLOAT, &temp2_float); } /* both not NaN, do the comparison */ - if ( !isnan1 && !isnan2) - { - if ((double)ABS(temp1_float-temp2_float) > options->delta) - { - if ( print_data(options) ) - { - print_pos(ph,0,hyper_start+i,acc,pos,rank,dims,obj1,obj2); + if (!isnan1 && !isnan2) { + if ((double) ABS(temp1_float - temp2_float) > options->delta) { + if (print_data(options)) { + print_pos(ph, 0, hyper_start + i, acc, pos, rank, dims, obj1, obj2); parallel_print(SPACES); - parallel_print(F_FORMAT, (double)temp1_float, (double)temp2_float, (double)ABS(temp1_float - temp2_float)); + parallel_print(F_FORMAT, (double) temp1_float, (double) temp2_float, (double) ABS(temp1_float - temp2_float)); } nfound++; } } /* only one is NaN, assume difference */ - else if ((isnan1 && !isnan2) || (!isnan1 && isnan2)) - { - if ( print_data(options) ) - { - print_pos(ph,0,hyper_start+i,acc,pos,rank,dims,obj1,obj2); + else if ((isnan1 && !isnan2) || (!isnan1 && isnan2)) { + if (print_data(options)) { + print_pos(ph, 0, hyper_start + i, acc, pos, rank, dims, obj1, obj2); parallel_print(SPACES); - parallel_print(F_FORMAT, (double)temp1_float, (double)temp2_float, (double)ABS(temp1_float - temp2_float)); + parallel_print(F_FORMAT, (double) temp1_float, (double) temp2_float, (double) ABS(temp1_float - temp2_float)); } nfound++; } - mem1+=sizeof(float); - mem2+=sizeof(float); - if (options->n && nfound>=options->count) + mem1 += sizeof(float); + mem2 += sizeof(float); + if (options->n && nfound >= options->count) return nfound; } /* i */ } - - /*------------------------------------------------------------------------- - * !-d and -p - *------------------------------------------------------------------------- - */ - else if (!options->d && options->p) - { - for ( i = 0; i < nelmts; i++) - { + /*------------------------------------------------------------------------- + * !-d and -p + *------------------------------------------------------------------------- + */ + else if (!options->d && options->p) { + for (i = 0; i < nelmts; i++) { HDmemcpy(&temp1_float, mem1, sizeof(float)); HDmemcpy(&temp2_float, mem2, sizeof(float)); - /*------------------------------------------------------------------------- - * detect NaNs - *------------------------------------------------------------------------- - */ - if ( options->do_nans ) - { - isnan1 = my_isnan(FLT_FLOAT,&temp1_float); - isnan2 = my_isnan(FLT_FLOAT,&temp2_float); + /*------------------------------------------------------------------------- + * detect NaNs + *------------------------------------------------------------------------- + */ + if (options->do_nans) { + isnan1 = my_isnan(FLT_FLOAT, &temp1_float); + isnan2 = my_isnan(FLT_FLOAT, &temp2_float); } /* both not NaN, do the comparison */ - if ( (!isnan1 && !isnan2)) - { + if ((!isnan1 && !isnan2)) { + PER(temp1_float, temp2_float); - PER(temp1_float,temp2_float); - - if (not_comparable && !both_zero) /* not comparable */ - { - if ( print_data(options) ) - { - print_pos(ph,1,hyper_start+i,acc,pos,rank,dims,obj1,obj2); + if (not_comparable && !both_zero) { + if (print_data(options)) { + print_pos(ph, 1, hyper_start + i, acc, pos, rank, dims, obj1, obj2); parallel_print(SPACES); - parallel_print(F_FORMAT_P_NOTCOMP, (double)temp1_float, (double)temp2_float, - (double)ABS(temp1_float - temp2_float)); + parallel_print(F_FORMAT_P_NOTCOMP, (double) temp1_float, (double) temp2_float, (double) ABS(temp1_float - temp2_float)); } nfound++; } - - else - - if ( per > options->percent ) - { - if ( print_data(options) ) - { - print_pos(ph,1,hyper_start+i,acc,pos,rank,dims,obj1,obj2); - parallel_print(SPACES); - parallel_print(F_FORMAT_P, (double)temp1_float, (double)temp2_float, - (double)ABS(temp1_float - temp2_float), - (double)ABS(1 - temp2_float / temp1_float)); - } - nfound++; + else if (per > options->percent) { + if (print_data(options)) { + print_pos(ph, 1, hyper_start + i, acc, pos, rank, dims, obj1, obj2); + parallel_print(SPACES); + parallel_print(F_FORMAT_P, (double) temp1_float, (double) temp2_float, + (double) ABS(temp1_float - temp2_float), (double) ABS(1 - temp2_float / temp1_float)); } + nfound++; + } } /* only one is NaN, assume difference */ - else if ((isnan1 && !isnan2) || (!isnan1 && isnan2)) - { - if ( print_data(options) ) - { - print_pos(ph,0,hyper_start+i,acc,pos,rank,dims,obj1,obj2); + else if ((isnan1 && !isnan2) || (!isnan1 && isnan2)) { + if (print_data(options)) { + print_pos(ph, 0, hyper_start + i, acc, pos, rank, dims, obj1, obj2); parallel_print(SPACES); - parallel_print(F_FORMAT, (double)temp1_float, (double)temp2_float, (double)ABS(temp1_float - temp2_float)); + parallel_print(F_FORMAT, (double) temp1_float, (double) temp2_float, (double) ABS(temp1_float - temp2_float)); } nfound++; } - mem1+=sizeof(float); - mem2+=sizeof(float); - if (options->n && nfound>=options->count) + mem1 += sizeof(float); + mem2 += sizeof(float); + if (options->n && nfound >= options->count) return nfound; } /* i */ } - - /*------------------------------------------------------------------------- - * -d and -p - *------------------------------------------------------------------------- - */ - else if ( options->d && options->p) - { - - for ( i = 0; i < nelmts; i++) - { + /*------------------------------------------------------------------------- + * -d and -p + *------------------------------------------------------------------------- + */ + else if (options->d && options->p) { + for (i = 0; i < nelmts; i++) { HDmemcpy(&temp1_float, mem1, sizeof(float)); HDmemcpy(&temp2_float, mem2, sizeof(float)); /*------------------------------------------------------------------------- - * detect NaNs - *------------------------------------------------------------------------- - */ - if ( options->do_nans ) - { - isnan1 = my_isnan(FLT_FLOAT,&temp1_float); - isnan2 = my_isnan(FLT_FLOAT,&temp2_float); + * detect NaNs + *------------------------------------------------------------------------- + */ + if (options->do_nans) { + isnan1 = my_isnan(FLT_FLOAT, &temp1_float); + isnan2 = my_isnan(FLT_FLOAT, &temp2_float); } /* both not NaN, do the comparison */ - if ( !isnan1 && !isnan2) - { + if (!isnan1 && !isnan2) { + PER(temp1_float, temp2_float); - PER(temp1_float,temp2_float); - - if (not_comparable && !both_zero) /* not comparable */ - { - if ( print_data(options) ) - { - print_pos(ph,1,hyper_start+i,acc,pos,rank,dims,obj1,obj2); + if (not_comparable && !both_zero) { + if (print_data(options)) { + print_pos(ph, 1, hyper_start + i, acc, pos, rank, dims, obj1, obj2); parallel_print(SPACES); - parallel_print(F_FORMAT_P_NOTCOMP, (double)temp1_float, (double)temp2_float, - (double)ABS(temp1_float - temp2_float)); + parallel_print(F_FORMAT_P_NOTCOMP, (double) temp1_float, (double) temp2_float, (double) ABS(temp1_float - temp2_float)); } nfound++; } - - else - - if ( per > options->percent && (double)ABS(temp1_float - temp2_float) > options->delta ) - { - if ( print_data(options) ) - { - print_pos(ph,1,hyper_start+i,acc,pos,rank,dims,obj1,obj2); - parallel_print(SPACES); - parallel_print(F_FORMAT_P, (double)temp1_float, (double)temp2_float, - (double)ABS(temp1_float - temp2_float), - (double)ABS(1 - temp2_float / temp1_float)); - } - nfound++; + else if (per > options->percent && (double) ABS(temp1_float - temp2_float) > options->delta) { + if (print_data(options)) { + print_pos(ph, 1, hyper_start + i, acc, pos, rank, dims, obj1, obj2); + parallel_print(SPACES); + parallel_print(F_FORMAT_P, (double) temp1_float, (double) temp2_float, + (double) ABS(temp1_float - temp2_float), (double) ABS(1 - temp2_float / temp1_float)); } + nfound++; + } } /* only one is NaN, assume difference */ - else if ((isnan1 && !isnan2) || (!isnan1 && isnan2)) - { - if ( print_data(options) ) - { - print_pos(ph,0,hyper_start+i,acc,pos,rank,dims,obj1,obj2); + else if ((isnan1 && !isnan2) || (!isnan1 && isnan2)) { + if (print_data(options)) { + print_pos(ph, 0, hyper_start + i, acc, pos, rank, dims, obj1, obj2); parallel_print(SPACES); - parallel_print(F_FORMAT, (double)temp1_float, (double)temp2_float, (double)ABS(temp1_float - temp2_float)); + parallel_print(F_FORMAT, (double) temp1_float, (double) temp2_float, (double) ABS(temp1_float - temp2_float)); } nfound++; } - mem1+=sizeof(float); - mem2+=sizeof(float); - if (options->n && nfound>=options->count) + mem1 += sizeof(float); + mem2 += sizeof(float); + if (options->n && nfound >= options->count) return nfound; } /* i */ } - /*------------------------------------------------------------------------- - * no -d and -p - *------------------------------------------------------------------------- - */ - else - { - for ( i = 0; i < nelmts; i++) - { + /*------------------------------------------------------------------------- + * no -d and -p + *------------------------------------------------------------------------- + */ + else { + for (i = 0; i < nelmts; i++) { HDmemcpy(&temp1_float, mem1, sizeof(float)); HDmemcpy(&temp2_float, mem2, sizeof(float)); - if (equal_float(temp1_float,temp2_float,options)==FALSE) - { - if ( print_data(options) ) - { - print_pos(ph,0,hyper_start+i,acc,pos,rank,dims,obj1,obj2); + if (equal_float(temp1_float, temp2_float, options) == FALSE) { + if (print_data(options)) { + print_pos(ph, 0, hyper_start + i, acc, pos, rank, dims, obj1, obj2); parallel_print(SPACES); - parallel_print(F_FORMAT, (double)temp1_float, (double)temp2_float, (double)ABS(temp1_float - temp2_float)); + parallel_print(F_FORMAT, (double) temp1_float, (double) temp2_float, (double) ABS(temp1_float - temp2_float)); } nfound++; } - mem1+=sizeof(float); - mem2+=sizeof(float); - if (options->n && nfound>=options->count) + mem1 += sizeof(float); + mem2 += sizeof(float); + if (options->n && nfound >= options->count) return nfound; - } /* nelmts */ - - - - - } h5difftrace("diff_float finish\n"); return nfound; } - /*------------------------------------------------------------------------- * Function: diff_double * @@ -3241,279 +2488,209 @@ static hsize_t diff_float(unsigned char *mem1, * *------------------------------------------------------------------------- */ -static hsize_t diff_double(unsigned char *mem1, - unsigned char *mem2, - hsize_t nelmts, - hsize_t hyper_start, - int rank, - hsize_t *dims, - hsize_t *acc, - hsize_t *pos, - diff_opt_t *options, - const char *obj1, - const char *obj2, - int *ph) +static hsize_t diff_double(unsigned char *mem1, unsigned char *mem2, + hsize_t nelmts, hsize_t hyper_start, int rank, hsize_t *dims, + hsize_t *acc, hsize_t *pos, diff_opt_t *options, const char *obj1, + const char *obj2, int *ph) { - hsize_t nfound=0; /* number of differences found */ - double temp1_double; - double temp2_double; - hsize_t i; - double per; - hbool_t both_zero; - hbool_t isnan1 = FALSE; - hbool_t isnan2 = FALSE; + hsize_t nfound = 0; /* number of differences found */ + double temp1_double; + double temp2_double; + hsize_t i; + double per; + hbool_t both_zero; + hbool_t isnan1 = FALSE; + hbool_t isnan2 = FALSE; h5difftrace("diff_double start\n"); - /*------------------------------------------------------------------------- - * -d and !-p - *------------------------------------------------------------------------- - */ + /*------------------------------------------------------------------------- + * -d and !-p + *------------------------------------------------------------------------- + */ - if (options->d && !options->p) - { - for ( i = 0; i < nelmts; i++) - { + if (options->d && !options->p) { + for (i = 0; i < nelmts; i++) { HDmemcpy(&temp1_double, mem1, sizeof(double)); HDmemcpy(&temp2_double, mem2, sizeof(double)); - /*------------------------------------------------------------------------- - * detect NaNs - *------------------------------------------------------------------------- - */ - if ( options->do_nans ) - { - isnan1 = my_isnan(FLT_DOUBLE,&temp1_double); - isnan2 = my_isnan(FLT_DOUBLE,&temp2_double); + /*------------------------------------------------------------------------- + * detect NaNs + *------------------------------------------------------------------------- + */ + if (options->do_nans) { + isnan1 = my_isnan(FLT_DOUBLE, &temp1_double); + isnan2 = my_isnan(FLT_DOUBLE, &temp2_double); } /* both not NaN, do the comparison */ - if ( !isnan1 && !isnan2) - { - if (ABS(temp1_double-temp2_double) > options->delta) - { - if ( print_data(options) ) - { - print_pos(ph,0,hyper_start+i,acc,pos,rank,dims,obj1,obj2); + if (!isnan1 && !isnan2) { + if (ABS(temp1_double-temp2_double) > options->delta) { + if (print_data(options)) { + print_pos(ph, 0, hyper_start + i, acc, pos, rank, dims, obj1, obj2); parallel_print(SPACES); - parallel_print(F_FORMAT,temp1_double,temp2_double,ABS(temp1_double-temp2_double)); + parallel_print(F_FORMAT, temp1_double, temp2_double, ABS(temp1_double - temp2_double)); } nfound++; } } /* only one is NaN, assume difference */ - else if ((isnan1 && !isnan2) || (!isnan1 && isnan2)) - { - if ( print_data(options) ) - { - print_pos(ph,0,hyper_start+i,acc,pos,rank,dims,obj1,obj2); + else if ((isnan1 && !isnan2) || (!isnan1 && isnan2)) { + if (print_data(options)) { + print_pos(ph, 0, hyper_start + i, acc, pos, rank, dims, obj1, obj2); parallel_print(SPACES); - parallel_print(F_FORMAT,temp1_double,temp2_double,ABS(temp1_double-temp2_double)); + parallel_print(F_FORMAT, temp1_double, temp2_double, ABS(temp1_double - temp2_double)); } nfound++; } - mem1+=sizeof(double); - mem2+=sizeof(double); - if (options->n && nfound>=options->count) + mem1 += sizeof(double); + mem2 += sizeof(double); + if (options->n && nfound >= options->count) return nfound; } /* i */ } - /*------------------------------------------------------------------------- - * !-d and -p - *------------------------------------------------------------------------- - */ - else if (!options->d && options->p) - { - for ( i = 0; i < nelmts; i++) - { + /*------------------------------------------------------------------------- + * !-d and -p + *------------------------------------------------------------------------- + */ + else if (!options->d && options->p) { + for (i = 0; i < nelmts; i++) { HDmemcpy(&temp1_double, mem1, sizeof(double)); HDmemcpy(&temp2_double, mem2, sizeof(double)); - /*------------------------------------------------------------------------- - * detect NaNs - *------------------------------------------------------------------------- - */ - if ( options->do_nans ) - { - isnan1 = my_isnan(FLT_DOUBLE,&temp1_double); - isnan2 = my_isnan(FLT_DOUBLE,&temp2_double); + /*------------------------------------------------------------------------- + * detect NaNs + *------------------------------------------------------------------------- + */ + if (options->do_nans) { + isnan1 = my_isnan(FLT_DOUBLE, &temp1_double); + isnan2 = my_isnan(FLT_DOUBLE, &temp2_double); } /* both not NaN, do the comparison */ - if ( !isnan1 && !isnan2) - { + if (!isnan1 && !isnan2) { + PER(temp1_double, temp2_double); - PER(temp1_double,temp2_double); - - if (not_comparable && !both_zero) /* not comparable */ - { - if ( print_data(options) ) - { - print_pos(ph,1,hyper_start+i,acc,pos,rank,dims,obj1,obj2); + if (not_comparable && !both_zero) { + if (print_data(options)) { + print_pos(ph, 1, hyper_start + i, acc, pos, rank, dims, obj1, obj2); parallel_print(SPACES); - parallel_print(F_FORMAT_P_NOTCOMP,temp1_double,temp2_double, - ABS(temp1_double-temp2_double)); + parallel_print(F_FORMAT_P_NOTCOMP, temp1_double, temp2_double, ABS(temp1_double - temp2_double)); } nfound++; } - - else - - if ( per > options->percent ) - { - if ( print_data(options) ) - { - print_pos(ph,1,hyper_start+i,acc,pos,rank,dims,obj1,obj2); - parallel_print(SPACES); - parallel_print(F_FORMAT_P,temp1_double,temp2_double, - ABS(temp1_double-temp2_double), - ABS(1-temp2_double/temp1_double)); - } - nfound++; + else if (per > options->percent) { + if (print_data(options)) { + print_pos(ph, 1, hyper_start + i, acc, pos, rank, dims, obj1, obj2); + parallel_print(SPACES); + parallel_print(F_FORMAT_P, temp1_double, temp2_double, + ABS(temp1_double - temp2_double), ABS(1 - temp2_double / temp1_double)); } + nfound++; + } } /* only one is NaN, assume difference */ - else if ((isnan1 && !isnan2) || (!isnan1 && isnan2)) - { - if ( print_data(options) ) - { - print_pos(ph,0,hyper_start+i,acc,pos,rank,dims,obj1,obj2); + else if ((isnan1 && !isnan2) || (!isnan1 && isnan2)) { + if (print_data(options)) { + print_pos(ph, 0, hyper_start + i, acc, pos, rank, dims, obj1, obj2); parallel_print(SPACES); - parallel_print(F_FORMAT,temp1_double,temp2_double,ABS(temp1_double-temp2_double)); + parallel_print(F_FORMAT, temp1_double, temp2_double, ABS(temp1_double - temp2_double)); } nfound++; } - mem1+=sizeof(double); - mem2+=sizeof(double); - if (options->n && nfound>=options->count) + mem1 += sizeof(double); + mem2 += sizeof(double); + if (options->n && nfound >= options->count) return nfound; } /* i */ } + /*------------------------------------------------------------------------- + * -d and -p + *------------------------------------------------------------------------- + */ + else if (options->d && options->p) { - /*------------------------------------------------------------------------- - * -d and -p - *------------------------------------------------------------------------- - */ - else if ( options->d && options->p) - { - - for ( i = 0; i < nelmts; i++) - { + for (i = 0; i < nelmts; i++) { HDmemcpy(&temp1_double, mem1, sizeof(double)); HDmemcpy(&temp2_double, mem2, sizeof(double)); /*------------------------------------------------------------------------- - * detect NaNs - *------------------------------------------------------------------------- - */ - if ( options->do_nans ) - { - isnan1 = my_isnan(FLT_DOUBLE,&temp1_double); - isnan2 = my_isnan(FLT_DOUBLE,&temp2_double); + * detect NaNs + *------------------------------------------------------------------------- + */ + if (options->do_nans) { + isnan1 = my_isnan(FLT_DOUBLE, &temp1_double); + isnan2 = my_isnan(FLT_DOUBLE, &temp2_double); } /* both not NaN, do the comparison */ - if ( !isnan1 && !isnan2) - { - - PER(temp1_double,temp2_double); + if (!isnan1 && !isnan2) { + PER(temp1_double, temp2_double); - if (not_comparable && !both_zero) /* not comparable */ - { - if ( print_data(options) ) - { - print_pos(ph,1,hyper_start+i,acc,pos,rank,dims,obj1,obj2); + if (not_comparable && !both_zero) { + if (print_data(options)) { + print_pos(ph, 1, hyper_start + i, acc, pos, rank, dims, obj1, obj2); parallel_print(SPACES); - parallel_print(F_FORMAT_P_NOTCOMP,temp1_double,temp2_double, - ABS(temp1_double-temp2_double)); + parallel_print(F_FORMAT_P_NOTCOMP, temp1_double, temp2_double, ABS(temp1_double - temp2_double)); } nfound++; } - - else - - if ( per > options->percent && ABS(temp1_double-temp2_double) > options->delta ) - { - if ( print_data(options) ) - { - print_pos(ph,1,hyper_start+i,acc,pos,rank,dims,obj1,obj2); - parallel_print(SPACES); - parallel_print(F_FORMAT_P,temp1_double,temp2_double, - ABS(temp1_double-temp2_double), - ABS(1-temp2_double/temp1_double)); - } - nfound++; + else if (per > options->percent && ABS(temp1_double-temp2_double) > options->delta) { + if (print_data(options)) { + print_pos(ph, 1, hyper_start + i, acc, pos, rank, dims, obj1, obj2); + parallel_print(SPACES); + parallel_print(F_FORMAT_P, temp1_double, temp2_double, + ABS(temp1_double - temp2_double), ABS(1 - temp2_double / temp1_double)); } - + nfound++; + } } /* only one is NaN, assume difference */ - else if ((isnan1 && !isnan2) || (!isnan1 && isnan2)) - { - if ( print_data(options) ) - { - print_pos(ph,0,hyper_start+i,acc,pos,rank,dims,obj1,obj2); + else if ((isnan1 && !isnan2) || (!isnan1 && isnan2)) { + if (print_data(options)) { + print_pos(ph, 0, hyper_start + i, acc, pos, rank, dims, obj1, obj2); parallel_print(SPACES); - parallel_print(F_FORMAT,temp1_double,temp2_double,ABS(temp1_double-temp2_double)); + parallel_print(F_FORMAT, temp1_double, temp2_double, ABS(temp1_double - temp2_double)); } nfound++; - } - mem1+=sizeof(double); - mem2+=sizeof(double); - if (options->n && nfound>=options->count) + mem1 += sizeof(double); + mem2 += sizeof(double); + if (options->n && nfound >= options->count) return nfound; } /* i */ } - - /*------------------------------------------------------------------------- - * no -d and -p - *------------------------------------------------------------------------- - */ - else - { - - - - for ( i = 0; i < nelmts; i++) - { + /*------------------------------------------------------------------------- + * no -d and -p + *------------------------------------------------------------------------- + */ + else { + for (i = 0; i < nelmts; i++) { HDmemcpy(&temp1_double, mem1, sizeof(double)); HDmemcpy(&temp2_double, mem2, sizeof(double)); - - if (equal_double(temp1_double,temp2_double,options)==FALSE) - { - if ( print_data(options) ) - { - print_pos(ph,0,hyper_start+i,acc,pos,rank,dims,obj1,obj2); + if (equal_double(temp1_double, temp2_double, options) == FALSE) { + if (print_data(options)) { + print_pos(ph, 0, hyper_start + i, acc, pos, rank, dims, obj1, obj2); parallel_print(SPACES); - parallel_print(F_FORMAT,temp1_double,temp2_double,ABS(temp1_double-temp2_double)); + parallel_print(F_FORMAT, temp1_double, temp2_double, ABS(temp1_double - temp2_double)); } nfound++; } - mem1+=sizeof(double); - mem2+=sizeof(double); - if (options->n && nfound>=options->count) + mem1 += sizeof(double); + mem2 += sizeof(double); + if (options->n && nfound >= options->count) return nfound; - } /* nelmts */ - - - - - } h5difftrace("diff_double finish\n"); return nfound; } - - - - /*------------------------------------------------------------------------- * Function: diff_ldouble * @@ -3526,20 +2703,20 @@ static hsize_t diff_double(unsigned char *mem1, #if H5_SIZEOF_LONG_DOUBLE !=0 static hsize_t diff_ldouble(unsigned char *mem1, - unsigned char *mem2, - hsize_t nelmts, - hsize_t hyper_start, - int rank, - hsize_t *dims, - hsize_t *acc, - hsize_t *pos, - diff_opt_t *options, - const char *obj1, - const char *obj2, - int *ph) + unsigned char *mem2, + hsize_t nelmts, + hsize_t hyper_start, + int rank, + hsize_t *dims, + hsize_t *acc, + hsize_t *pos, + diff_opt_t *options, + const char *obj1, + const char *obj2, + int *ph) { - hsize_t nfound=0; /* number of differences found */ + hsize_t nfound=0; /* number of differences found */ long double temp1_double; long double temp2_double; hsize_t i; @@ -3550,245 +2727,183 @@ static hsize_t diff_ldouble(unsigned char *mem1, h5difftrace("diff_ldouble start\n"); - /*------------------------------------------------------------------------- - * -d and !-p - *------------------------------------------------------------------------- - */ + /*------------------------------------------------------------------------- + * -d and !-p + *------------------------------------------------------------------------- + */ - if (options->d && !options->p) - { - for ( i = 0; i < nelmts; i++) - { + if (options->d && !options->p) { + for ( i = 0; i < nelmts; i++) { HDmemcpy(&temp1_double, mem1, sizeof(long double)); HDmemcpy(&temp2_double, mem2, sizeof(long double)); - /*------------------------------------------------------------------------- - * detect NaNs - *------------------------------------------------------------------------- - */ - if ( options->do_nans ) - { + /*------------------------------------------------------------------------- + * detect NaNs + *------------------------------------------------------------------------- + */ + if (options->do_nans) { isnan1 = my_isnan(FLT_LDOUBLE,&temp1_double); isnan2 = my_isnan(FLT_LDOUBLE,&temp2_double); } /* both not NaN, do the comparison */ - if ( !isnan1 && !isnan2) - { - if (ABS(temp1_double-temp2_double) > options->delta) - { - if ( print_data(options) ) - { - print_pos(ph,0,hyper_start+i,acc,pos,rank,dims,obj1,obj2); + if (!isnan1 && !isnan2) { + if (ABS(temp1_double-temp2_double) > options->delta) { + if (print_data(options)) { + print_pos(ph, 0, hyper_start + i, acc, pos, rank, dims, obj1, obj2); parallel_print(SPACES); - parallel_print(F_FORMAT,temp1_double,temp2_double,ABS(temp1_double-temp2_double)); + parallel_print(F_FORMAT, temp1_double, temp2_double, ABS(temp1_double - temp2_double)); } nfound++; } } /* only one is NaN, assume difference */ - else if ((isnan1 && !isnan2) || (!isnan1 && isnan2)) - { - if ( print_data(options) ) - { - print_pos(ph,0,hyper_start+i,acc,pos,rank,dims,obj1,obj2); + else if ((isnan1 && !isnan2) || (!isnan1 && isnan2)) { + if (print_data(options)) { + print_pos(ph, 0, hyper_start + i, acc, pos, rank, dims, obj1, obj2); parallel_print(SPACES); - parallel_print(F_FORMAT,temp1_double,temp2_double,ABS(temp1_double-temp2_double)); + parallel_print(F_FORMAT, temp1_double, temp2_double, ABS(temp1_double - emp2_double)); } nfound++; } - mem1+=sizeof(long double); - mem2+=sizeof(long double); - if (options->n && nfound>=options->count) + mem1 += sizeof(long double); + mem2 += sizeof(long double); + if (options->n && nfound >= options->count) return nfound; } /* i */ } - /*------------------------------------------------------------------------- - * !-d and -p - *------------------------------------------------------------------------- - */ - else if (!options->d && options->p) - { - for ( i = 0; i < nelmts; i++) - { + /*------------------------------------------------------------------------- + * !-d and -p + *------------------------------------------------------------------------- + */ + else if (!options->d && options->p) { + for (i = 0; i < nelmts; i++) { HDmemcpy(&temp1_double, mem1, sizeof(long double)); HDmemcpy(&temp2_double, mem2, sizeof(long double)); - /*------------------------------------------------------------------------- - * detect NaNs - *------------------------------------------------------------------------- - */ - if ( options->do_nans ) - { - isnan1 = my_isnan(FLT_LDOUBLE,&temp1_double); - isnan2 = my_isnan(FLT_LDOUBLE,&temp2_double); + /*------------------------------------------------------------------------- + * detect NaNs + *------------------------------------------------------------------------- + */ + if (options->do_nans) { + isnan1 = my_isnan(FLT_LDOUBLE, &temp1_double); + isnan2 = my_isnan(FLT_LDOUBLE, &temp2_double); } /* both not NaN, do the comparison */ - if ( !isnan1 && !isnan2) - { + if (!isnan1 && !isnan2) { + PER(temp1_double, temp2_double); - PER(temp1_double,temp2_double); - - if (not_comparable && !both_zero) /* not comparable */ - { - if ( print_data(options) ) - { - print_pos(ph,1,hyper_start+i,acc,pos,rank,dims,obj1,obj2); + if (not_comparable && !both_zero) { + if (print_data(options)) { + print_pos(ph, 1, hyper_start + i, acc, pos, rank, dims, obj1, obj2); parallel_print(SPACES); - parallel_print(F_FORMAT_P_NOTCOMP,temp1_double,temp2_double, - ABS(temp1_double-temp2_double)); + parallel_print(F_FORMAT_P_NOTCOMP, temp1_double, temp2_double, ABS(temp1_double - temp2_double)); } nfound++; } - - else - - if ( per > options->percent ) - { - if ( print_data(options) ) - { - print_pos(ph,1,hyper_start+i,acc,pos,rank,dims,obj1,obj2); - parallel_print(SPACES); - parallel_print(F_FORMAT_P,temp1_double,temp2_double, - ABS(temp1_double-temp2_double), - ABS(1-temp2_double/temp1_double)); - } - nfound++; + else if (per > options->percent) { + if (print_data(options)) { + print_pos(ph, 1, hyper_start + i, acc, pos, rank, dims, obj1, obj2); + parallel_print(SPACES); + parallel_print(F_FORMAT_P, temp1_double, temp2_double, + ABS(temp1_double - temp2_double), ABS(1-temp2_double / temp1_double)); } + nfound++; + } } /* only one is NaN, assume difference */ - else if ((isnan1 && !isnan2) || (!isnan1 && isnan2)) - { - if ( print_data(options) ) - { - print_pos(ph,0,hyper_start+i,acc,pos,rank,dims,obj1,obj2); + else if ((isnan1 && !isnan2) || (!isnan1 && isnan2)) { + if (print_data(options)) { + print_pos(ph, 0, hyper_start+i, acc, pos, rank, dims, obj1, obj2); parallel_print(SPACES); - parallel_print(F_FORMAT,temp1_double,temp2_double,ABS(temp1_double-temp2_double)); + parallel_print(F_FORMAT, temp1_double, temp2_double, ABS(temp1_double - temp2_double)); } nfound++; - } - mem1+=sizeof(long double); - mem2+=sizeof(long double); - if (options->n && nfound>=options->count) + mem1 += sizeof(long double); + mem2 += sizeof(long double); + if (options->n && nfound >= options->count) return nfound; } /* i */ } - - /*------------------------------------------------------------------------- - * -d and -p - *------------------------------------------------------------------------- - */ - else if ( options->d && options->p) - { - - for ( i = 0; i < nelmts; i++) - { + /*------------------------------------------------------------------------- + * -d and -p + *------------------------------------------------------------------------- + */ + else if (options->d && options->p) { + for (i = 0; i < nelmts; i++) { HDmemcpy(&temp1_double, mem1, sizeof(long double)); HDmemcpy(&temp2_double, mem2, sizeof(long double)); /*------------------------------------------------------------------------- - * detect NaNs - *------------------------------------------------------------------------- - */ - if ( options->do_nans ) - { - isnan1 = my_isnan(FLT_LDOUBLE,&temp1_double); - isnan2 = my_isnan(FLT_LDOUBLE,&temp2_double); + * detect NaNs + *------------------------------------------------------------------------- + */ + if (options->do_nans) { + isnan1 = my_isnan(FLT_LDOUBLE, &temp1_double); + isnan2 = my_isnan(FLT_LDOUBLE, &temp2_double); } /* both not NaN, do the comparison */ - if ( !isnan1 && !isnan2) - { - - PER(temp1_double,temp2_double); + if (!isnan1 && !isnan2) { + PER(temp1_double, temp2_double); - if (not_comparable && !both_zero) /* not comparable */ - { - if ( print_data(options) ) - { - print_pos(ph,1,hyper_start+i,acc,pos,rank,dims,obj1,obj2); + if (not_comparable && !both_zero) { + if (print_data(options)) { + print_pos(ph, 1, hyper_start + i, acc, pos, rank, dims, obj1, obj2); parallel_print(SPACES); - parallel_print(F_FORMAT_P_NOTCOMP,temp1_double,temp2_double, - ABS(temp1_double-temp2_double)); + parallel_print(F_FORMAT_P_NOTCOMP, temp1_double, temp2_double, ABS(temp1_double - temp2_double)); } nfound++; } - - else - - if ( per > options->percent && ABS(temp1_double-temp2_double) > options->delta ) - { - if ( print_data(options) ) - { - print_pos(ph,1,hyper_start+i,acc,pos,rank,dims,obj1,obj2); - parallel_print(SPACES); - parallel_print(F_FORMAT_P,temp1_double,temp2_double, - ABS(temp1_double-temp2_double), - ABS(1-temp2_double/temp1_double)); - } - nfound++; + else if (per > options->percent && ABS(temp1_double - temp2_double) > options->delta) { + if (print_data(options)) { + print_pos(ph, 1, hyper_start + i, acc, pos, rank, dims, obj1, obj2); + parallel_print(SPACES); + parallel_print(F_FORMAT_P, temp1_double, temp2_double, ABS(temp1_double - temp2_double), ABS(1-temp2_double / temp1_double)); } - + nfound++; + } } /* only one is NaN, assume difference */ - else if ((isnan1 && !isnan2) || (!isnan1 && isnan2)) - { - if ( print_data(options) ) - { - print_pos(ph,0,hyper_start+i,acc,pos,rank,dims,obj1,obj2); + else if ((isnan1 && !isnan2) || (!isnan1 && isnan2)) { + if (print_data(options)) { + print_pos(ph, 0, hyper_start + i, acc, pos, rank, dims, obj1, obj2); parallel_print(SPACES); - parallel_print(F_FORMAT,temp1_double,temp2_double,ABS(temp1_double-temp2_double)); + parallel_print(F_FORMAT, temp1_double, temp2_double, ABS(temp1_double - temp2_double)); } nfound++; - } - mem1+=sizeof(long double); - mem2+=sizeof(long double); - if (options->n && nfound>=options->count) + mem1 += sizeof(long double); + mem2 += sizeof(long double); + if (options->n && nfound >= options->count) return nfound; } /* i */ } - - /*------------------------------------------------------------------------- - * no -d and -p - *------------------------------------------------------------------------- - */ - else - { - - - - for ( i = 0; i < nelmts; i++) - { + /*------------------------------------------------------------------------- + * no -d and -p + *------------------------------------------------------------------------- + */ + else { + for (i = 0; i < nelmts; i++) { HDmemcpy(&temp1_double, mem1, sizeof(long double)); HDmemcpy(&temp2_double, mem2, sizeof(long double)); - - if (equal_ldouble(temp1_double,temp2_double,options)==FALSE) - { - if ( print_data(options) ) - { - print_pos(ph,0,hyper_start+i,acc,pos,rank,dims,obj1,obj2); + if (equal_ldouble(temp1_double, temp2_double, options) == FALSE) { + if (print_data(options)) { + print_pos(ph, 0, hyper_start + i, acc, pos, rank, dims, obj1, obj2); parallel_print(SPACES); - parallel_print(F_FORMAT,temp1_double,temp2_double,ABS(temp1_double-temp2_double)); + parallel_print(F_FORMAT, temp1_double, temp2_double, ABS(temp1_double - temp2_double)); } nfound++; } - - mem1+=sizeof(long double); - mem2+=sizeof(long double); - if (options->n && nfound>=options->count) + mem1 += sizeof(long double); + mem2 += sizeof(long double); + if (options->n && nfound >= options->count) return nfound; - } /* nelmts */ - - - - - } h5difftrace("diff_ldouble finish\n"); @@ -3796,11 +2911,6 @@ static hsize_t diff_ldouble(unsigned char *mem1, } #endif /* H5_SIZEOF_LONG_DOUBLE */ - - - - - /*------------------------------------------------------------------------- * Function: diff_schar * @@ -3810,171 +2920,125 @@ static hsize_t diff_ldouble(unsigned char *mem1, * *------------------------------------------------------------------------- */ -static hsize_t diff_schar(unsigned char *mem1, - unsigned char *mem2, - hsize_t nelmts, - hsize_t hyper_start, - int rank, - hsize_t *dims, - hsize_t *acc, - hsize_t *pos, - diff_opt_t *options, - const char *obj1, - const char *obj2, - int *ph) +static hsize_t diff_schar(unsigned char *mem1, unsigned char *mem2, + hsize_t nelmts, hsize_t hyper_start, int rank, hsize_t *dims, + hsize_t *acc, hsize_t *pos, diff_opt_t *options, const char *obj1, + const char *obj2, int *ph) { - hsize_t nfound=0; /* number of differences found */ - char temp1_char; - char temp2_char; - hsize_t i; - double per; - hbool_t both_zero; + hsize_t nfound = 0; /* number of differences found */ + char temp1_char; + char temp2_char; + hsize_t i; + double per; + hbool_t both_zero; h5difftrace("diff_schar start\n"); - /* -d and !-p */ - if (options->d && !options->p) - { - - for ( i = 0; i < nelmts; i++) - { + if (options->d && !options->p) { + for (i = 0; i < nelmts; i++) { HDmemcpy(&temp1_char, mem1, sizeof(char)); HDmemcpy(&temp2_char, mem2, sizeof(char)); - if (ABS(temp1_char-temp2_char) > options->delta) - { - if ( print_data(options) ) - { - print_pos(ph,0,hyper_start+i,acc,pos,rank,dims,obj1,obj2); + if (ABS(temp1_char-temp2_char) > options->delta) { + if (print_data(options)) { + print_pos(ph, 0, hyper_start + i, acc, pos, rank, dims, obj1, obj2); parallel_print(SPACES); - parallel_print(I_FORMAT,temp1_char,temp2_char,ABS(temp1_char-temp2_char)); + parallel_print(I_FORMAT, temp1_char, temp2_char, ABS(temp1_char - temp2_char)); } nfound++; } - mem1+=sizeof(char); - mem2+=sizeof(char); - if (options->n && nfound>=options->count) + mem1 += sizeof(char); + mem2 += sizeof(char); + if (options->n && nfound >= options->count) return nfound; } } - /* !-d and -p */ - else if (!options->d && options->p) - { - - for ( i = 0; i < nelmts; i++) - { + else if (!options->d && options->p) { + for (i = 0; i < nelmts; i++) { HDmemcpy(&temp1_char, mem1, sizeof(char)); HDmemcpy(&temp2_char, mem2, sizeof(char)); - PER(temp1_char,temp2_char); + PER(temp1_char, temp2_char); - if (not_comparable && !both_zero) /* not comparable */ - { - if ( print_data(options) ) - { - print_pos(ph,1,hyper_start+i,acc,pos,rank,dims,obj1,obj2); + if (not_comparable && !both_zero) { + if (print_data(options)) { + print_pos(ph, 1, hyper_start + i, acc, pos, rank, dims, obj1, obj2); parallel_print(SPACES); - parallel_print(I_FORMAT_P_NOTCOMP,temp1_char,temp2_char, - ABS(temp1_char-temp2_char)); + parallel_print(I_FORMAT_P_NOTCOMP, temp1_char, temp2_char, ABS(temp1_char - temp2_char)); } nfound++; } - else - if ( per > options->percent ) - { - if ( print_data(options) ) - { - print_pos(ph,1,hyper_start+i,acc,pos,rank,dims,obj1,obj2); - parallel_print(SPACES); - parallel_print(I_FORMAT_P,temp1_char,temp2_char, - ABS(temp1_char-temp2_char), - per); - } - nfound++; + else if (per > options->percent) { + if (print_data(options)) { + print_pos(ph, 1, hyper_start + i, acc, pos, rank, dims, obj1, obj2); + parallel_print(SPACES); + parallel_print(I_FORMAT_P, temp1_char, temp2_char, ABS(temp1_char - temp2_char), per); } - mem1+=sizeof(char); - mem2+=sizeof(char); - if (options->n && nfound>=options->count) + nfound++; + } + mem1 += sizeof(char); + mem2 += sizeof(char); + if (options->n && nfound >= options->count) return nfound; } } - /* -d and -p */ - else if ( options->d && options->p) - { - - for ( i = 0; i < nelmts; i++) - { + else if (options->d && options->p) { + for (i = 0; i < nelmts; i++) { HDmemcpy(&temp1_char, mem1, sizeof(char)); HDmemcpy(&temp2_char, mem2, sizeof(char)); - PER(temp1_char,temp2_char); + PER(temp1_char, temp2_char); - if (not_comparable && !both_zero) /* not comparable */ - { - if ( print_data(options) ) - { - print_pos(ph,1,hyper_start+i,acc,pos,rank,dims,obj1,obj2); + if (not_comparable && !both_zero) { + if (print_data(options)) { + print_pos(ph, 1, hyper_start + i, acc, pos, rank, dims, obj1, obj2); parallel_print(SPACES); - parallel_print(I_FORMAT_P_NOTCOMP,temp1_char,temp2_char, - ABS(temp1_char-temp2_char)); + parallel_print(I_FORMAT_P_NOTCOMP, temp1_char, temp2_char, ABS(temp1_char - temp2_char)); } nfound++; } - else - if ( per > options->percent && ABS(temp1_char-temp2_char) > options->delta ) - { - if ( print_data(options) ) - { - print_pos(ph,1,hyper_start+i,acc,pos,rank,dims,obj1,obj2); - parallel_print(SPACES); - parallel_print(I_FORMAT_P,temp1_char,temp2_char, - ABS(temp1_char-temp2_char), - per); - } - nfound++; + else if (per > options->percent && ABS(temp1_char-temp2_char) > options->delta) { + if (print_data(options)) { + print_pos(ph, 1, hyper_start + i, acc, pos, rank, dims, obj1, obj2); + parallel_print(SPACES); + parallel_print(I_FORMAT_P, temp1_char, temp2_char, ABS(temp1_char - temp2_char), per); } - mem1+=sizeof(char); - mem2+=sizeof(char); - if (options->n && nfound>=options->count) + nfound++; + } + mem1 += sizeof(char); + mem2 += sizeof(char); + if (options->n && nfound >= options->count) return nfound; } - } - else - { - for ( i = 0; i < nelmts; i++) - { + else { + for (i = 0; i < nelmts; i++) { HDmemcpy(&temp1_char, mem1, sizeof(char)); HDmemcpy(&temp2_char, mem2, sizeof(char)); - if (temp1_char != temp2_char) - { - if ( print_data(options) ) - { - print_pos(ph,0,hyper_start+i,acc,pos,rank,dims,obj1,obj2); + if (temp1_char != temp2_char) { + if (print_data(options)) { + print_pos(ph, 0, hyper_start + i, acc, pos, rank, dims, obj1, obj2); parallel_print(SPACES); - parallel_print(I_FORMAT,temp1_char,temp2_char,ABS(temp1_char-temp2_char)); + parallel_print(I_FORMAT, temp1_char, temp2_char, ABS(temp1_char - temp2_char)); } nfound++; } - mem1+=sizeof(char); - mem2+=sizeof(char); - if (options->n && nfound>=options->count) + mem1 += sizeof(char); + mem2 += sizeof(char); + if (options->n && nfound >= options->count) return nfound; } /* nelmts */ - } h5difftrace("diff_schar finish\n"); return nfound; } - - /*------------------------------------------------------------------------- * Function: diff_uchar * @@ -3984,159 +3048,118 @@ static hsize_t diff_schar(unsigned char *mem1, * *------------------------------------------------------------------------- */ -static hsize_t diff_uchar(unsigned char *mem1, - unsigned char *mem2, - hsize_t nelmts, - hsize_t hyper_start, - int rank, - hsize_t *dims, - hsize_t *acc, - hsize_t *pos, - diff_opt_t *options, - const char *obj1, - const char *obj2, - int *ph) - +static hsize_t diff_uchar(unsigned char *mem1, unsigned char *mem2, + hsize_t nelmts, hsize_t hyper_start, int rank, hsize_t *dims, + hsize_t *acc, hsize_t *pos, diff_opt_t *options, const char *obj1, + const char *obj2, int *ph) { - hsize_t nfound=0; /* number of differences found */ + hsize_t nfound = 0; /* number of differences found */ unsigned char temp1_uchar; unsigned char temp2_uchar; - hsize_t i; - double per; - hbool_t both_zero; + hsize_t i; + double per; + hbool_t both_zero; h5difftrace("diff_uchar start\n"); - /* -d and !-p */ - if (options->d && !options->p) - { - for ( i = 0; i < nelmts; i++) - { + if (options->d && !options->p) { + for (i = 0; i < nelmts; i++) { HDmemcpy(&temp1_uchar, mem1, sizeof(unsigned char)); HDmemcpy(&temp2_uchar, mem2, sizeof(unsigned char)); - if ( PDIFF(temp1_uchar,temp2_uchar) > options->delta) - { - if ( print_data(options) ) - { - print_pos(ph,0,hyper_start+i,acc,pos,rank,dims,obj1,obj2); + if (PDIFF(temp1_uchar,temp2_uchar) > options->delta) { + if (print_data(options)) { + print_pos(ph, 0, hyper_start + i, acc, pos, rank, dims, obj1, obj2); parallel_print(SPACES); - parallel_print(I_FORMAT,temp1_uchar,temp2_uchar,PDIFF(temp1_uchar,temp2_uchar)); + parallel_print(I_FORMAT, temp1_uchar, temp2_uchar, PDIFF(temp1_uchar, temp2_uchar)); } nfound++; } - mem1+=sizeof(unsigned char); - mem2+=sizeof(unsigned char); - if (options->n && nfound>=options->count) + mem1 += sizeof(unsigned char); + mem2 += sizeof(unsigned char); + if (options->n && nfound >= options->count) return nfound; } } - /* !-d and -p */ - else if (!options->d && options->p) - { - for ( i = 0; i < nelmts; i++) - { + else if (!options->d && options->p) { + for (i = 0; i < nelmts; i++) { HDmemcpy(&temp1_uchar, mem1, sizeof(unsigned char)); HDmemcpy(&temp2_uchar, mem2, sizeof(unsigned char)); - PER_UNSIGN(signed char,temp1_uchar,temp2_uchar); + PER_UNSIGN(signed char, temp1_uchar, temp2_uchar); - if (not_comparable && !both_zero) /* not comparable */ - { - if ( print_data(options) ) - { - print_pos(ph,1,hyper_start+i,acc,pos,rank,dims,obj1,obj2); + if (not_comparable && !both_zero) { + if (print_data(options)) { + print_pos(ph, 1, hyper_start + i, acc, pos, rank, dims, obj1, obj2); parallel_print(SPACES); - parallel_print(I_FORMAT_P_NOTCOMP,temp1_uchar,temp2_uchar, - PDIFF(temp1_uchar,temp2_uchar)); + parallel_print(I_FORMAT_P_NOTCOMP, temp1_uchar, temp2_uchar, PDIFF(temp1_uchar, temp2_uchar)); } nfound++; } - else - if ( per > options->percent ) - { - if ( print_data(options) ) - { - print_pos(ph,1,hyper_start+i,acc,pos,rank,dims,obj1,obj2); - parallel_print(SPACES); - parallel_print(I_FORMAT_P,temp1_uchar,temp2_uchar, - PDIFF(temp1_uchar,temp2_uchar), - per); - } - nfound++; + else if (per > options->percent) { + if (print_data(options)) { + print_pos(ph, 1, hyper_start + i, acc, pos, rank, dims, obj1, obj2); + parallel_print(SPACES); + parallel_print(I_FORMAT_P, temp1_uchar, temp2_uchar, PDIFF(temp1_uchar, temp2_uchar), per); } - mem1+=sizeof(unsigned char); - mem2+=sizeof(unsigned char); - if (options->n && nfound>=options->count) + nfound++; + } + mem1 += sizeof(unsigned char); + mem2 += sizeof(unsigned char); + if (options->n && nfound >= options->count) return nfound; } } - /* -d and -p */ - else if ( options->d && options->p) - { - for ( i = 0; i < nelmts; i++) - { + else if (options->d && options->p) { + for (i = 0; i < nelmts; i++) { HDmemcpy(&temp1_uchar, mem1, sizeof(unsigned char)); HDmemcpy(&temp2_uchar, mem2, sizeof(unsigned char)); - PER_UNSIGN(signed char,temp1_uchar,temp2_uchar); + PER_UNSIGN(signed char, temp1_uchar, temp2_uchar); - if (not_comparable && !both_zero) /* not comparable */ - { - if ( print_data(options) ) - { - print_pos(ph,1,hyper_start+i,acc,pos,rank,dims,obj1,obj2); + if (not_comparable && !both_zero) { + if (print_data(options)) { + print_pos(ph, 1, hyper_start + i, acc, pos, rank, dims, obj1, obj2); parallel_print(SPACES); - parallel_print(I_FORMAT_P_NOTCOMP,temp1_uchar,temp2_uchar, - PDIFF(temp1_uchar,temp2_uchar)); + parallel_print(I_FORMAT_P_NOTCOMP, temp1_uchar, temp2_uchar, PDIFF(temp1_uchar, temp2_uchar)); } nfound++; } - else - if ( per > options->percent && PDIFF(temp1_uchar,temp2_uchar) > options->delta ) - { - if ( print_data(options) ) - { - print_pos(ph,1,hyper_start+i,acc,pos,rank,dims,obj1,obj2); - parallel_print(SPACES); - parallel_print(I_FORMAT_P,temp1_uchar,temp2_uchar, - PDIFF(temp1_uchar,temp2_uchar), - per); - } - nfound++; + else if (per > options->percent && PDIFF(temp1_uchar,temp2_uchar) > options->delta) { + if (print_data(options)) { + print_pos(ph, 1, hyper_start + i, acc, pos, rank, dims, obj1, obj2); + parallel_print(SPACES); + parallel_print(I_FORMAT_P, temp1_uchar, temp2_uchar, PDIFF(temp1_uchar, temp2_uchar), per); } - mem1+=sizeof(unsigned char); - mem2+=sizeof(unsigned char); - if (options->n && nfound>=options->count) + nfound++; + } + mem1 += sizeof(unsigned char); + mem2 += sizeof(unsigned char); + if (options->n && nfound >= options->count) return nfound; } } - else - { - for ( i = 0; i < nelmts; i++) - { + else { + for (i = 0; i < nelmts; i++) { HDmemcpy(&temp1_uchar, mem1, sizeof(unsigned char)); HDmemcpy(&temp2_uchar, mem2, sizeof(unsigned char)); - if (temp1_uchar != temp2_uchar) - { - if ( print_data(options) ) - { - print_pos(ph,0,hyper_start+i,acc,pos,rank,dims,obj1,obj2); + if (temp1_uchar != temp2_uchar) { + if (print_data(options)) { + print_pos(ph, 0, hyper_start + i, acc, pos, rank, dims, obj1, obj2); parallel_print(SPACES); - parallel_print(I_FORMAT,temp1_uchar,temp2_uchar,PDIFF(temp1_uchar,temp2_uchar)); + parallel_print(I_FORMAT, temp1_uchar, temp2_uchar, PDIFF(temp1_uchar, temp2_uchar)); } nfound++; } - mem1+=sizeof(unsigned char); - mem2+=sizeof(unsigned char); - if (options->n && nfound>=options->count) + mem1 += sizeof(unsigned char); + mem2 += sizeof(unsigned char); + if (options->n && nfound >= options->count) return nfound; } /* nelmts */ - } h5difftrace("diff_uchar finish\n"); @@ -4152,155 +3175,116 @@ static hsize_t diff_uchar(unsigned char *mem1, * *------------------------------------------------------------------------- */ -static hsize_t diff_short(unsigned char *mem1, - unsigned char *mem2, - hsize_t nelmts, - hsize_t hyper_start, - int rank, - hsize_t *dims, - hsize_t *acc, - hsize_t *pos, - diff_opt_t *options, - const char *obj1, - const char *obj2, - int *ph) - +static hsize_t diff_short(unsigned char *mem1, unsigned char *mem2, + hsize_t nelmts, hsize_t hyper_start, int rank, hsize_t *dims, + hsize_t *acc, hsize_t *pos, diff_opt_t *options, const char *obj1, + const char *obj2, int *ph) { - hsize_t nfound=0; /* number of differences found */ - short temp1_short; - short temp2_short; - hsize_t i; - double per; - hbool_t both_zero; + hsize_t nfound = 0; /* number of differences found */ + short temp1_short; + short temp2_short; + hsize_t i; + double per; + hbool_t both_zero; h5difftrace("diff_short start\n"); /* -d and !-p */ - if (options->d && !options->p) - { - for ( i = 0; i < nelmts; i++) - { + if (options->d && !options->p) { + for (i = 0; i < nelmts; i++) { HDmemcpy(&temp1_short, mem1, sizeof(short)); HDmemcpy(&temp2_short, mem2, sizeof(short)); - if (ABS(temp1_short-temp2_short) > options->delta) - { - if ( print_data(options) ) - { - print_pos(ph,0,hyper_start+i,acc,pos,rank,dims,obj1,obj2); + if (ABS(temp1_short-temp2_short) > options->delta) { + if (print_data(options)) { + print_pos(ph, 0, hyper_start + i, acc, pos, rank, dims obj1, obj2); parallel_print(SPACES); - parallel_print(I_FORMAT,temp1_short,temp2_short,ABS(temp1_short-temp2_short)); + parallel_print(I_FORMAT, temp1_short, temp2_short, ABS(temp1_short - temp2_short)); } nfound++; } - mem1+=sizeof(short); - mem2+=sizeof(short); - if (options->n && nfound>=options->count) + mem1 += sizeof(short); + mem2 += sizeof(short); + if (options->n && nfound >= options->count) return nfound; } } - /* !-d and -p */ - else if (!options->d && options->p) - { - for ( i = 0; i < nelmts; i++) - { + else if (!options->d && options->p) { + for (i = 0; i < nelmts; i++) { HDmemcpy(&temp1_short, mem1, sizeof(short)); HDmemcpy(&temp2_short, mem2, sizeof(short)); - PER(temp1_short,temp2_short); + PER(temp1_short, temp2_short); - if (not_comparable && !both_zero) /* not comparable */ - { - if ( print_data(options) ) - { - print_pos(ph,1,hyper_start+i,acc,pos,rank,dims,obj1,obj2); + if (not_comparable && !both_zero) { + if (print_data(options)) { + print_pos(ph, 1, hyper_start + i, acc, pos, rank, dims, obj1, obj2); parallel_print(SPACES); - parallel_print(I_FORMAT_P_NOTCOMP,temp1_short,temp2_short, - ABS(temp1_short-temp2_short)); + parallel_print(I_FORMAT_P_NOTCOMP, temp1_short, temp2_short, ABS(temp1_short - temp2_short)); } nfound++; } - else - if ( per > options->percent ) - { - if ( print_data(options) ) - { - print_pos(ph,1,hyper_start+i,acc,pos,rank,dims,obj1,obj2); - parallel_print(SPACES); - parallel_print(I_FORMAT_P,temp1_short,temp2_short, - ABS(temp1_short-temp2_short), - per); - } - nfound++; + else if (per > options->percent) { + if (print_data(options)) { + print_pos(ph, 1, hyper_start + i, acc, pos, rank, dims, obj1, obj2); + parallel_print(SPACES); + parallel_print(I_FORMAT_P, temp1_short, temp2_short, ABS(temp1_short - temp2_short), per); } - mem1+=sizeof(short); - mem2+=sizeof(short); - if (options->n && nfound>=options->count) + nfound++; + } + mem1 += sizeof(short); + mem2 += sizeof(short); + if (options->n && nfound >= options->count) return nfound; } } - /* -d and -p */ - else if ( options->d && options->p) - { - for ( i = 0; i < nelmts; i++) - { + else if (options->d && options->p) { + for (i = 0; i < nelmts; i++) { HDmemcpy(&temp1_short, mem1, sizeof(short)); HDmemcpy(&temp2_short, mem2, sizeof(short)); - PER(temp1_short,temp2_short); + PER(temp1_short, temp2_short); - if (not_comparable && !both_zero) /* not comparable */ - { - if ( print_data(options) ) - { - print_pos(ph,1,hyper_start+i,acc,pos,rank,dims,obj1,obj2); + if (not_comparable && !both_zero) { + if (print_data(options)) { + print_pos(ph, 1, hyper_start + i, acc, pos, rank, dims, obj1, obj2); parallel_print(SPACES); - parallel_print(I_FORMAT_P_NOTCOMP,temp1_short,temp2_short, - ABS(temp1_short-temp2_short)); + parallel_print(I_FORMAT_P_NOTCOMP, temp1_short, temp2_short, ABS(temp1_short - temp2_short)); } nfound++; } - else - if ( per > options->percent && ABS(temp1_short-temp2_short) > options->delta ) - { - if ( print_data(options) ) - { - print_pos(ph,1,hyper_start+i,acc,pos,rank,dims,obj1,obj2); - parallel_print(SPACES); - parallel_print(I_FORMAT_P,temp1_short,temp2_short, - ABS(temp1_short-temp2_short), - per); - } - nfound++; + else if (per > options->percent && ABS(temp1_short-temp2_short) > options->delta) { + if (print_data(options)) { + print_pos(ph, 1, hyper_start + i, acc, pos, rank, dims, obj1, obj2); + parallel_print(SPACES); + parallel_print(I_FORMAT_P, temp1_short, temp2_short, ABS(temp1_short - temp2_short), per); } - mem1+=sizeof(short); - mem2+=sizeof(short); - if (options->n && nfound>=options->count) + nfound++; + } + mem1 += sizeof(short); + mem2 += sizeof(short); + if (options->n && nfound >= options->count) return nfound; } } - else - { - for ( i = 0; i < nelmts; i++) - { + else { + for (i = 0; i < nelmts; i++) { HDmemcpy(&temp1_short, mem1, sizeof(short)); HDmemcpy(&temp2_short, mem2, sizeof(short)); - if (temp1_short != temp2_short) - { - if ( print_data(options) ) - { - print_pos(ph,0,hyper_start+i,acc,pos,rank,dims,obj1,obj2); + if (temp1_short != temp2_short) { + if (print_data(options)) { + print_pos(ph, 0, hyper_start + i, acc, pos, rank, dims, obj1, obj2); parallel_print(SPACES); - parallel_print(I_FORMAT,temp1_short,temp2_short,ABS(temp1_short-temp2_short)); + parallel_print(I_FORMAT, temp1_short, temp2_short, ABS(temp1_short - temp2_short)); } nfound++; } - mem1+=sizeof(short); - mem2+=sizeof(short); - if (options->n && nfound>=options->count) + mem1 += sizeof(short); + mem2 += sizeof(short); + if (options->n && nfound >= options->count) return nfound; } /* nelmts */ } @@ -4309,7 +3293,6 @@ static hsize_t diff_short(unsigned char *mem1, return nfound; } - /*------------------------------------------------------------------------- * Function: diff_ushort * @@ -4319,163 +3302,125 @@ static hsize_t diff_short(unsigned char *mem1, * *------------------------------------------------------------------------- */ -static hsize_t diff_ushort(unsigned char *mem1, - unsigned char *mem2, - hsize_t nelmts, - hsize_t hyper_start, - int rank, - hsize_t *dims, - hsize_t *acc, - hsize_t *pos, - diff_opt_t *options, - const char *obj1, - const char *obj2, - int *ph) +static hsize_t diff_ushort(unsigned char *mem1, unsigned char *mem2, + hsize_t nelmts, hsize_t hyper_start, int rank, hsize_t *dims, + hsize_t *acc, hsize_t *pos, diff_opt_t *options, const char *obj1, + const char *obj2, int *ph) { - hsize_t nfound=0; /* number of differences found */ + hsize_t nfound = 0; /* number of differences found */ unsigned short temp1_ushort; unsigned short temp2_ushort; - hsize_t i; - double per; - hbool_t both_zero; + hsize_t i; + double per; + hbool_t both_zero; h5difftrace("diff_ushort start\n"); /* -d and !-p */ - if (options->d && !options->p) - { - for ( i = 0; i < nelmts; i++) - { + if (options->d && !options->p) { + for (i = 0; i < nelmts; i++) { HDmemcpy(&temp1_ushort, mem1, sizeof(unsigned short)); HDmemcpy(&temp2_ushort, mem2, sizeof(unsigned short)); - if ( PDIFF(temp1_ushort,temp2_ushort) > options->delta) - { - if ( print_data(options) ) - { - print_pos(ph,0,hyper_start+i,acc,pos,rank,dims,obj1,obj2); + if (PDIFF(temp1_ushort,temp2_ushort) > options->delta) { + if (print_data(options)) { + print_pos(ph, 0, hyper_start + i, acc, pos, rank, dims, obj1, obj2); parallel_print(SPACES); - parallel_print(I_FORMAT,temp1_ushort,temp2_ushort,PDIFF(temp1_ushort,temp2_ushort)); + parallel_print(I_FORMAT, temp1_ushort, temp2_ushort, PDIFF(temp1_ushort, temp2_ushort)); } nfound++; } - mem1+=sizeof(unsigned short); - mem2+=sizeof(unsigned short); - if (options->n && nfound>=options->count) + mem1 += sizeof(unsigned short); + mem2 += sizeof(unsigned short); + if (options->n && nfound >= options->count) return nfound; } } - /* !-d and -p */ - else if (!options->d && options->p) - { - for ( i = 0; i < nelmts; i++) - { + /* !-d and -p */ + else if (!options->d && options->p) { + for (i = 0; i < nelmts; i++) { HDmemcpy(&temp1_ushort, mem1, sizeof(unsigned short)); HDmemcpy(&temp2_ushort, mem2, sizeof(unsigned short)); - PER_UNSIGN(signed short,temp1_ushort,temp2_ushort); + PER_UNSIGN(signed short, temp1_ushort, temp2_ushort); - if (not_comparable && !both_zero) /* not comparable */ - { - if ( print_data(options) ) - { - print_pos(ph,1,hyper_start+i,acc,pos,rank,dims,obj1,obj2); + if (not_comparable && !both_zero) { + if (print_data(options)) { + print_pos(ph, 1, hyper_start + i, acc, pos, rank, dims, obj1, obj2); parallel_print(SPACES); - parallel_print(I_FORMAT_P_NOTCOMP,temp1_ushort,temp2_ushort, - PDIFF(temp1_ushort,temp2_ushort)); + parallel_print(I_FORMAT_P_NOTCOMP, temp1_ushort, temp2_ushort, PDIFF(temp1_ushort, temp2_ushort)); } nfound++; } - else - if ( per > options->percent ) - { - if ( print_data(options) ) - { - print_pos(ph,1,hyper_start+i,acc,pos,rank,dims,obj1,obj2); - parallel_print(SPACES); - parallel_print(I_FORMAT_P,temp1_ushort,temp2_ushort, - PDIFF(temp1_ushort,temp2_ushort), - per); - } - nfound++; + else if (per > options->percent) { + if (print_data(options)) { + print_pos(ph, 1, hyper_start + i, acc, pos, rank, dims, obj1, obj2); + parallel_print(SPACES); + parallel_print(I_FORMAT_P, temp1_ushort, temp2_ushort, PDIFF(temp1_ushort, temp2_ushort), per); } - mem1+=sizeof(unsigned short); - mem2+=sizeof(unsigned short); - if (options->n && nfound>=options->count) + nfound++; + } + mem1 += sizeof(unsigned short); + mem2 += sizeof(unsigned short); + if (options->n && nfound >= options->count) return nfound; } } /* -d and -p */ - else if ( options->d && options->p) - { - for ( i = 0; i < nelmts; i++) - { + else if (options->d && options->p) { + for (i = 0; i < nelmts; i++) { HDmemcpy(&temp1_ushort, mem1, sizeof(unsigned short)); HDmemcpy(&temp2_ushort, mem2, sizeof(unsigned short)); - PER_UNSIGN(signed short,temp1_ushort,temp2_ushort); + PER_UNSIGN(signed short, temp1_ushort, temp2_ushort); - if (not_comparable && !both_zero) /* not comparable */ - { - if ( print_data(options) ) - { - print_pos(ph,1,hyper_start+i,acc,pos,rank,dims,obj1,obj2); + if (not_comparable && !both_zero) { + if (print_data(options)) { + print_pos(ph, 1, hyper_start + i, acc, pos, rank, dims, obj1, obj2); parallel_print(SPACES); - parallel_print(I_FORMAT_P_NOTCOMP,temp1_ushort,temp2_ushort, - PDIFF(temp1_ushort,temp2_ushort)); + parallel_print(I_FORMAT_P_NOTCOMP, temp1_ushort, temp2_ushort, PDIFF(temp1_ushort, temp2_ushort)); } nfound++; } - else - if ( per > options->percent && PDIFF(temp1_ushort,temp2_ushort) > options->delta ) - { - if ( print_data(options) ) - { - print_pos(ph,1,hyper_start+i,acc,pos,rank,dims,obj1,obj2); - parallel_print(SPACES); - parallel_print(I_FORMAT_P,temp1_ushort,temp2_ushort, - PDIFF(temp1_ushort,temp2_ushort), - per); - } - nfound++; + else if (per > options->percent && PDIFF(temp1_ushort,temp2_ushort) > options->delta) { + if (print_data(options)) { + print_pos(ph, 1, hyper_start + i, acc, pos, rank, dims, obj1, obj2); + parallel_print(SPACES); + parallel_print(I_FORMAT_P, temp1_ushort, temp2_ushort, PDIFF(temp1_ushort, temp2_ushort), per); } - mem1+=sizeof(unsigned short); - mem2+=sizeof(unsigned short); - if (options->n && nfound>=options->count) + nfound++; + } + mem1 += sizeof(unsigned short); + mem2 += sizeof(unsigned short); + if (options->n && nfound >= options->count) return nfound; } } - else - { - for ( i = 0; i < nelmts; i++) - { + else { + for (i = 0; i < nelmts; i++) { HDmemcpy(&temp1_ushort, mem1, sizeof(unsigned short)); HDmemcpy(&temp2_ushort, mem2, sizeof(unsigned short)); - if (temp1_ushort != temp2_ushort) - { - if ( print_data(options) ) - { - print_pos(ph,0,hyper_start+i,acc,pos,rank,dims,obj1,obj2); + if (temp1_ushort != temp2_ushort) { + if (print_data(options)) { + print_pos(ph, 0, hyper_start + i, acc, pos, rank, dims, obj1, obj2); parallel_print(SPACES); - parallel_print(I_FORMAT,temp1_ushort,temp2_ushort,PDIFF(temp1_ushort,temp2_ushort)); + parallel_print(I_FORMAT, temp1_ushort, temp2_ushort, PDIFF(temp1_ushort, temp2_ushort)); } nfound++; } - mem1+=sizeof(unsigned short); - mem2+=sizeof(unsigned short); - if (options->n && nfound>=options->count) + mem1 += sizeof(unsigned short); + mem2 += sizeof(unsigned short); + if (options->n && nfound >= options->count) return nfound; } /* nelmts */ - } h5difftrace("diff_ushort finish\n"); return nfound; } - /*------------------------------------------------------------------------- * Function: diff_int * @@ -4485,163 +3430,124 @@ static hsize_t diff_ushort(unsigned char *mem1, * *------------------------------------------------------------------------- */ -static hsize_t diff_int(unsigned char *mem1, - unsigned char *mem2, - hsize_t nelmts, - hsize_t hyper_start, - int rank, - hsize_t *dims, - hsize_t *acc, - hsize_t *pos, - diff_opt_t *options, - const char *obj1, - const char *obj2, - int *ph) - +static hsize_t diff_int(unsigned char *mem1, unsigned char *mem2, + hsize_t nelmts, hsize_t hyper_start, int rank, hsize_t *dims, + hsize_t *acc, hsize_t *pos, diff_opt_t *options, const char *obj1, + const char *obj2, int *ph) { - hsize_t nfound=0; /* number of differences found */ - int temp1_int; - int temp2_int; - hsize_t i; - double per; - hbool_t both_zero; + hsize_t nfound = 0; /* number of differences found */ + int temp1_int; + int temp2_int; + hsize_t i; + double per; + hbool_t both_zero; h5difftrace("diff_int start\n"); /* -d and !-p */ - if (options->d && !options->p) - { - for ( i = 0; i < nelmts; i++) - { + if (options->d && !options->p) { + for (i = 0; i < nelmts; i++) { HDmemcpy(&temp1_int, mem1, sizeof(int)); HDmemcpy(&temp2_int, mem2, sizeof(int)); - if (ABS(temp1_int-temp2_int) > options->delta) - { - if ( print_data(options) ) - { - print_pos(ph,0,hyper_start+i,acc,pos,rank,dims,obj1,obj2); + if (ABS(temp1_int-temp2_int) > options->delta) { + if (print_data(options)) { + print_pos(ph, 0, hyper_start + i, acc, pos, rank, dims, obj1, obj2); parallel_print(SPACES); - parallel_print(I_FORMAT,temp1_int,temp2_int,ABS(temp1_int-temp2_int)); + parallel_print(I_FORMAT, temp1_int, temp2_int, ABS(temp1_int - temp2_int)); } nfound++; } - mem1+=sizeof(int); - mem2+=sizeof(int); - if (options->n && nfound>=options->count) + mem1 += sizeof(int); + mem2 += sizeof(int); + if (options->n && nfound >= options->count) return nfound; } } /* !-d and -p */ - else if (!options->d && options->p) - { - for ( i = 0; i < nelmts; i++) - { + else if (!options->d && options->p) { + for (i = 0; i < nelmts; i++) { HDmemcpy(&temp1_int, mem1, sizeof(int)); HDmemcpy(&temp2_int, mem2, sizeof(int)); - PER(temp1_int,temp2_int); + PER(temp1_int, temp2_int); - if (not_comparable && !both_zero) /* not comparable */ - { - if ( print_data(options) ) - { - print_pos(ph,1,hyper_start+i,acc,pos,rank,dims,obj1,obj2); + if (not_comparable && !both_zero) { + if (print_data(options)) { + print_pos(ph, 1, hyper_start + i, acc, pos, rank, dims, obj1, obj2); parallel_print(SPACES); - parallel_print(I_FORMAT_P_NOTCOMP,temp1_int,temp2_int, - ABS(temp1_int-temp2_int)); + parallel_print(I_FORMAT_P_NOTCOMP, temp1_int, temp2_int, ABS(temp1_int - temp2_int)); } nfound++; } - else - if ( per > options->percent ) - { - if ( print_data(options) ) - { - print_pos(ph,1,hyper_start+i,acc,pos,rank,dims,obj1,obj2); - parallel_print(SPACES); - parallel_print(I_FORMAT_P,temp1_int,temp2_int, - ABS(temp1_int-temp2_int), - per); - } - nfound++; + else if (per > options->percent) { + if (print_data(options)) { + print_pos(ph, 1, hyper_start + i, acc, pos, rank, dims, obj1, obj2); + parallel_print(SPACES); + parallel_print(I_FORMAT_P, temp1_int, temp2_int, ABS(temp1_int - temp2_int), per); } - mem1+=sizeof(int); - mem2+=sizeof(int); - if (options->n && nfound>=options->count) + nfound++; + } + mem1 += sizeof(int); + mem2 += sizeof(int); + if (options->n && nfound >= options->count) return nfound; } } /* -d and -p */ - else if ( options->d && options->p) - { - for ( i = 0; i < nelmts; i++) - { + else if (options->d && options->p) { + for (i = 0; i < nelmts; i++) { HDmemcpy(&temp1_int, mem1, sizeof(int)); HDmemcpy(&temp2_int, mem2, sizeof(int)); - PER(temp1_int,temp2_int); + PER(temp1_int, temp2_int); - if (not_comparable && !both_zero) /* not comparable */ - { - if ( print_data(options) ) - { - print_pos(ph,1,hyper_start+i,acc,pos,rank,dims,obj1,obj2); + if (not_comparable && !both_zero) { + if (print_data(options)) { + print_pos(ph, 1, hyper_start + i, acc, pos, rank, dims, obj1, obj2); parallel_print(SPACES); - parallel_print(I_FORMAT_P_NOTCOMP,temp1_int,temp2_int, - ABS(temp1_int-temp2_int)); + parallel_print(I_FORMAT_P_NOTCOMP, temp1_int, temp2_int, ABS(temp1_int - temp2_int)); } nfound++; } - else - if ( per > options->percent && ABS(temp1_int-temp2_int) > options->delta ) - { - if ( print_data(options) ) - { - print_pos(ph,1,hyper_start+i,acc,pos,rank,dims,obj1,obj2); - parallel_print(SPACES); - parallel_print(I_FORMAT_P,temp1_int,temp2_int, - ABS(temp1_int-temp2_int), - per); - } - nfound++; + else if (per > options->percent && ABS(temp1_int-temp2_int) > options->delta) { + if (print_data(options)) { + print_pos(ph, 1, hyper_start + i, acc, pos, rank, dims, obj1, obj2); + parallel_print(SPACES); + parallel_print(I_FORMAT_P, temp1_int, temp2_int, ABS(temp1_int - temp2_int), per); } - mem1+=sizeof(int); - mem2+=sizeof(int); - if (options->n && nfound>=options->count) + nfound++; + } + mem1 += sizeof(int); + mem2 += sizeof(int); + if (options->n && nfound >= options->count) return nfound; } } - else - { - for ( i = 0; i < nelmts; i++) - { + else { + for (i = 0; i < nelmts; i++) { HDmemcpy(&temp1_int, mem1, sizeof(int)); HDmemcpy(&temp2_int, mem2, sizeof(int)); - if (temp1_int != temp2_int) - { - if ( print_data(options) ) - { - print_pos(ph,0,hyper_start+i,acc,pos,rank,dims,obj1,obj2); + if (temp1_int != temp2_int) { + if (print_data(options)) { + print_pos(ph, 0, hyper_start + i, acc, pos, rank, dims, obj1, obj2); parallel_print(SPACES); - parallel_print(I_FORMAT,temp1_int,temp2_int,ABS(temp1_int-temp2_int)); + parallel_print(I_FORMAT, temp1_int, temp2_int, ABS(temp1_int - temp2_int)); } nfound++; } - mem1+=sizeof(int); - mem2+=sizeof(int); - if (options->n && nfound>=options->count) + mem1 += sizeof(int); + mem2 += sizeof(int); + if (options->n && nfound >= options->count) return nfound; } /* nelmts */ } h5difftrace("diff_int finish\n"); - return nfound; } - /*------------------------------------------------------------------------- * Function: diff_uint * @@ -4651,151 +3557,117 @@ static hsize_t diff_int(unsigned char *mem1, * *------------------------------------------------------------------------- */ -static hsize_t diff_uint(unsigned char *mem1, - unsigned char *mem2, - hsize_t nelmts, - hsize_t hyper_start, - int rank, - hsize_t *dims, - hsize_t *acc, - hsize_t *pos, - diff_opt_t *options, - const char *obj1, - const char *obj2, - int *ph) - +static hsize_t diff_uint(unsigned char *mem1, unsigned char *mem2, + hsize_t nelmts, hsize_t hyper_start, int rank, hsize_t *dims, + hsize_t *acc, hsize_t *pos, diff_opt_t *options, const char *obj1, + const char *obj2, int *ph) { - hsize_t nfound=0; /* number of differences found */ - unsigned int temp1_uint; - unsigned int temp2_uint; - hsize_t i; - double per; - hbool_t both_zero; + hsize_t nfound = 0; /* number of differences found */ + unsigned int temp1_uint; + unsigned int temp2_uint; + hsize_t i; + double per; + hbool_t both_zero; h5difftrace("diff_uint start\n"); /* -d and !-p */ - if (options->d && !options->p) - { - for ( i = 0; i < nelmts; i++) - { + if (options->d && !options->p) { + for (i = 0; i < nelmts; i++) { HDmemcpy(&temp1_uint, mem1, sizeof(unsigned int)); HDmemcpy(&temp2_uint, mem2, sizeof(unsigned int)); - if ( PDIFF(temp1_uint,temp2_uint) > options->delta) - { - if ( print_data(options) ) - { - print_pos(ph,0,hyper_start+i,acc,pos,rank,dims,obj1,obj2); + if (PDIFF(temp1_uint,temp2_uint) > options->delta) { + if (print_data(options)) { + print_pos(ph, 0, hyper_start + i, acc, pos, rank, dims, obj1, obj2); parallel_print(SPACES); - parallel_print(I_FORMAT,temp1_uint,temp2_uint,PDIFF(temp1_uint,temp2_uint)); + parallel_print(I_FORMAT, temp1_uint, temp2_uint, PDIFF(temp1_uint, temp2_uint)); } nfound++; } - mem1+=sizeof(unsigned int); - mem2+=sizeof(unsigned int); - if (options->n && nfound>=options->count) + mem1 += sizeof(unsigned int); + mem2 += sizeof(unsigned int); + if (options->n && nfound >= options->count) return nfound; } } /* !-d and -p */ - else if (!options->d && options->p) - { - for ( i = 0; i < nelmts; i++) - { + else if (!options->d && options->p) { + for (i = 0; i < nelmts; i++) { HDmemcpy(&temp1_uint, mem1, sizeof(unsigned int)); HDmemcpy(&temp2_uint, mem2, sizeof(unsigned int)); - PER_UNSIGN(signed int,temp1_uint,temp2_uint); + PER_UNSIGN(signed int, temp1_uint, temp2_uint); - if (not_comparable && !both_zero) /* not comparable */ - { - if ( print_data(options) ) - { - print_pos(ph,1,hyper_start+i,acc,pos,rank,dims,obj1,obj2); + if (not_comparable && !both_zero) { + if (print_data(options)) { + print_pos(ph, 1, hyper_start + i, acc, pos, rank, dims, obj1, obj2); parallel_print(SPACES); - parallel_print(I_FORMAT_P_NOTCOMP,temp1_uint,temp2_uint,PDIFF(temp1_uint,temp2_uint)); + parallel_print(I_FORMAT_P_NOTCOMP, temp1_uint, temp2_uint, PDIFF(temp1_uint, temp2_uint)); } nfound++; } - else - if ( per > options->percent ) - { - if ( print_data(options) ) - { - print_pos(ph,1,hyper_start+i,acc,pos,rank,dims,obj1,obj2); - parallel_print(SPACES); - parallel_print(I_FORMAT_P,temp1_uint,temp2_uint, - PDIFF(temp1_uint,temp2_uint), - per); - } - nfound++; + else if (per > options->percent) { + if (print_data(options)) { + print_pos(ph, 1, hyper_start + i, acc, pos, rank, dims, obj1, obj2); + parallel_print(SPACES); + parallel_print(I_FORMAT_P, temp1_uint, temp2_uint, PDIFF(temp1_uint, temp2_uint), per); } - mem1+=sizeof(unsigned int); - mem2+=sizeof(unsigned int); - if (options->n && nfound>=options->count) + nfound++; + } + mem1 += sizeof(unsigned int); + mem2 += sizeof(unsigned int); + if (options->n && nfound >= options->count) return nfound; } } /* -d and -p */ - else if ( options->d && options->p) - { - for ( i = 0; i < nelmts; i++) - { + else if (options->d && options->p) { + for (i = 0; i < nelmts; i++) { HDmemcpy(&temp1_uint, mem1, sizeof(unsigned int)); HDmemcpy(&temp2_uint, mem2, sizeof(unsigned int)); - PER_UNSIGN(signed int,temp1_uint,temp2_uint); + PER_UNSIGN(signed int, temp1_uint, temp2_uint); - if (not_comparable && !both_zero) /* not comparable */ - { - if ( print_data(options) ) - { - print_pos(ph,1,hyper_start+i,acc,pos,rank,dims,obj1,obj2); + if (not_comparable && !both_zero) { + if (print_data(options)) { + print_pos(ph, 1, hyper_start + i, acc, pos, rank, dims, obj1, obj2); parallel_print(SPACES); - parallel_print(I_FORMAT_P_NOTCOMP,temp1_uint,temp2_uint,PDIFF(temp1_uint,temp2_uint)); + parallel_print(I_FORMAT_P_NOTCOMP, temp1_uint, temp2_uint, PDIFF(temp1_uint, temp2_uint)); } nfound++; } - else - if ( per > options->percent && PDIFF(temp1_uint,temp2_uint) > options->delta ) - { - if ( print_data(options) ) - { - print_pos(ph,1,hyper_start+i,acc,pos,rank,dims,obj1,obj2); - parallel_print(SPACES); - parallel_print(I_FORMAT_P,temp1_uint,temp2_uint, - PDIFF(temp1_uint,temp2_uint), - per); - } - nfound++; + else if (per > options->percent + && PDIFF(temp1_uint,temp2_uint) > options->delta) { + if (print_data(options)) { + print_pos(ph, 1, hyper_start + i, acc, pos, rank, dims, obj1, obj2); + parallel_print(SPACES); + parallel_print(I_FORMAT_P, temp1_uint, temp2_uint, PDIFF(temp1_uint, temp2_uint), per); } - mem1+=sizeof(unsigned int); - mem2+=sizeof(unsigned int); - if (options->n && nfound>=options->count) + nfound++; + } + mem1 += sizeof(unsigned int); + mem2 += sizeof(unsigned int); + if (options->n && nfound >= options->count) return nfound; } } - else - { - for ( i = 0; i < nelmts; i++) - { + else { + for (i = 0; i < nelmts; i++) { HDmemcpy(&temp1_uint, mem1, sizeof(unsigned int)); HDmemcpy(&temp2_uint, mem2, sizeof(unsigned int)); - if (temp1_uint != temp2_uint) - { - if ( print_data(options) ) - { - print_pos(ph,0,hyper_start+i,acc,pos,rank,dims,obj1,obj2); + if (temp1_uint != temp2_uint) { + if (print_data(options)) { + print_pos(ph, 0, hyper_start + i, acc, pos, rank, dims, obj1, obj2); parallel_print(SPACES); - parallel_print(I_FORMAT,temp1_uint,temp2_uint,PDIFF(temp1_uint,temp2_uint)); + parallel_print(I_FORMAT, temp1_uint, temp2_uint, PDIFF(temp1_uint, temp2_uint)); } nfound++; } - mem1+=sizeof(unsigned int); - mem2+=sizeof(unsigned int); - if (options->n && nfound>=options->count) + mem1 += sizeof(unsigned int); + mem2 += sizeof(unsigned int); + if (options->n && nfound >= options->count) return nfound; } /* nelmts */ } @@ -4804,7 +3676,6 @@ static hsize_t diff_uint(unsigned char *mem1, return nfound; } - /*------------------------------------------------------------------------- * Function: diff_long * @@ -4814,166 +3685,126 @@ static hsize_t diff_uint(unsigned char *mem1, * *------------------------------------------------------------------------- */ -static hsize_t diff_long(unsigned char *mem1, - unsigned char *mem2, - hsize_t nelmts, - hsize_t hyper_start, - int rank, - hsize_t *dims, - hsize_t *acc, - hsize_t *pos, - diff_opt_t *options, - const char *obj1, - const char *obj2, - int *ph) - +static hsize_t diff_long(unsigned char *mem1, unsigned char *mem2, + hsize_t nelmts, hsize_t hyper_start, int rank, hsize_t *dims, + hsize_t *acc, hsize_t *pos, diff_opt_t *options, const char *obj1, + const char *obj2, int *ph) { - hsize_t nfound=0; /* number of differences found */ - long temp1_long; - long temp2_long; - hsize_t i; - double per; - hbool_t both_zero; + hsize_t nfound = 0; /* number of differences found */ + long temp1_long; + long temp2_long; + hsize_t i; + double per; + hbool_t both_zero; h5difftrace("diff_long start\n"); /* -d and !-p */ - if (options->d && !options->p) - { - for ( i = 0; i < nelmts; i++) - { - for ( i = 0; i < nelmts; i++) - { + if (options->d && !options->p) { + for (i = 0; i < nelmts; i++) { + for (i = 0; i < nelmts; i++) { HDmemcpy(&temp1_long, mem1, sizeof(long)); HDmemcpy(&temp2_long, mem2, sizeof(long)); - if (ABS(temp1_long-temp2_long) > options->delta) - { - if ( print_data(options) ) - { - print_pos(ph,0,hyper_start+i,acc,pos,rank,dims,obj1,obj2); + if (ABS(temp1_long-temp2_long) > options->delta) { + if (print_data(options)) { + print_pos(ph, 0, hyper_start + i, acc, pos, rank, dims, obj1, obj2); parallel_print(SPACES); - parallel_print(LI_FORMAT,temp1_long,temp2_long,ABS(temp1_long-temp2_long)); + parallel_print(LI_FORMAT, temp1_long, temp2_long, ABS(temp1_long - temp2_long)); } nfound++; } - mem1+=sizeof(long); - mem2+=sizeof(long); - if (options->n && nfound>=options->count) + mem1 += sizeof(long); + mem2 += sizeof(long); + if (options->n && nfound >= options->count) return nfound; } } } /* !-d and -p */ - else if (!options->d && options->p) - { - for ( i = 0; i < nelmts; i++) - { + else if (!options->d && options->p) { + for (i = 0; i < nelmts; i++) { HDmemcpy(&temp1_long, mem1, sizeof(long)); HDmemcpy(&temp2_long, mem2, sizeof(long)); - PER(temp1_long,temp2_long); + PER(temp1_long, temp2_long); - if (not_comparable && !both_zero) /* not comparable */ - { - if ( print_data(options) ) - { - print_pos(ph,1,hyper_start+i,acc,pos,rank,dims,obj1,obj2); + if (not_comparable && !both_zero) { + if (print_data(options)) { + print_pos(ph, 1, hyper_start + i, acc, pos, rank, dims, obj1, obj2); parallel_print(SPACES); - parallel_print(LI_FORMAT_P_NOTCOMP,temp1_long,temp2_long, - ABS(temp1_long-temp2_long)); + parallel_print(LI_FORMAT_P_NOTCOMP, temp1_long, temp2_long, ABS(temp1_long - temp2_long)); } nfound++; } - else - if ( per > options->percent ) - { - if ( print_data(options) ) - { - print_pos(ph,1,hyper_start+i,acc,pos,rank,dims,obj1,obj2); - parallel_print(SPACES); - parallel_print(LI_FORMAT_P,temp1_long,temp2_long, - ABS(temp1_long-temp2_long), - per); - } - nfound++; + else if (per > options->percent) { + if (print_data(options)) { + print_pos(ph, 1, hyper_start + i, acc, pos, rank, dims, obj1, obj2); + parallel_print(SPACES); + parallel_print(LI_FORMAT_P, temp1_long, temp2_long, ABS(temp1_long - temp2_long), per); } - mem1+=sizeof(long); - mem2+=sizeof(long); - if (options->n && nfound>=options->count) + nfound++; + } + mem1 += sizeof(long); + mem2 += sizeof(long); + if (options->n && nfound >= options->count) return nfound; } } /* -d and -p */ - else if ( options->d && options->p) - { - for ( i = 0; i < nelmts; i++) - { + else if (options->d && options->p) { + for (i = 0; i < nelmts; i++) { HDmemcpy(&temp1_long, mem1, sizeof(long)); HDmemcpy(&temp2_long, mem2, sizeof(long)); - PER(temp1_long,temp2_long); + PER(temp1_long, temp2_long); - if (not_comparable && !both_zero) /* not comparable */ - { - if ( print_data(options) ) - { - print_pos(ph,1,hyper_start+i,acc,pos,rank,dims,obj1,obj2); + if (not_comparable && !both_zero) { + if (print_data(options)) { + print_pos(ph, 1, hyper_start + i, acc, pos, rank, dims, obj1, obj2); parallel_print(SPACES); - parallel_print(LI_FORMAT_P_NOTCOMP,temp1_long,temp2_long, - ABS(temp1_long-temp2_long)); + parallel_print(LI_FORMAT_P_NOTCOMP, temp1_long, temp2_long, ABS(temp1_long - temp2_long)); } nfound++; } - else - if ( per > options->percent && ABS(temp1_long-temp2_long) > options->delta ) - { - if ( print_data(options) ) - { - print_pos(ph,1,hyper_start+i,acc,pos,rank,dims,obj1,obj2); - parallel_print(SPACES); - parallel_print(LI_FORMAT_P,temp1_long,temp2_long, - ABS(temp1_long-temp2_long), - per); - } - nfound++; + else if (per > options->percent && ABS(temp1_long-temp2_long) > options->delta) { + if (print_data(options)) { + print_pos(ph, 1, hyper_start + i, acc, pos, rank, dims, obj1, obj2); + parallel_print(SPACES); + parallel_print(LI_FORMAT_P, temp1_long, temp2_long, ABS(temp1_long - temp2_long), per); } - mem1+=sizeof(long); - mem2+=sizeof(long); - if (options->n && nfound>=options->count) + nfound++; + } + mem1 += sizeof(long); + mem2 += sizeof(long); + if (options->n && nfound >= options->count) return nfound; } } - else - { - for ( i = 0; i < nelmts; i++) - { + else { + for (i = 0; i < nelmts; i++) { HDmemcpy(&temp1_long, mem1, sizeof(long)); HDmemcpy(&temp2_long, mem2, sizeof(long)); - if (temp1_long != temp2_long) - { - if ( print_data(options) ) - { - print_pos(ph,0,hyper_start+i,acc,pos,rank,dims,obj1,obj2); + if (temp1_long != temp2_long) { + if (print_data(options)) { + print_pos(ph, 0, hyper_start + i, acc, pos, rank, dims, obj1, obj2); parallel_print(SPACES); - parallel_print(LI_FORMAT,temp1_long,temp2_long,ABS(temp1_long-temp2_long)); + parallel_print(LI_FORMAT, temp1_long, temp2_long, ABS(temp1_long - temp2_long)); } nfound++; } - mem1+=sizeof(long); - mem2+=sizeof(long); - if (options->n && nfound>=options->count) + mem1 += sizeof(long); + mem2 += sizeof(long); + if (options->n && nfound >= options->count) return nfound; } /* nelmts */ - } h5difftrace("diff_long finish\n"); return nfound; } - /*------------------------------------------------------------------------- * Function: diff_ulong * @@ -4983,155 +3814,120 @@ static hsize_t diff_long(unsigned char *mem1, * *------------------------------------------------------------------------- */ -static hsize_t diff_ulong(unsigned char *mem1, - unsigned char *mem2, - hsize_t nelmts, - hsize_t hyper_start, - int rank, - hsize_t *dims, - hsize_t *acc, - hsize_t *pos, - diff_opt_t *options, - const char *obj1, - const char *obj2, - int *ph) - +static hsize_t diff_ulong(unsigned char *mem1, unsigned char *mem2, + hsize_t nelmts, hsize_t hyper_start, int rank, hsize_t *dims, + hsize_t *acc, hsize_t *pos, diff_opt_t *options, const char *obj1, + const char *obj2, int *ph) { - hsize_t nfound=0; /* number of differences found */ - unsigned long temp1_ulong; - unsigned long temp2_ulong; - hsize_t i; - double per; - hbool_t both_zero; + hsize_t nfound = 0; /* number of differences found */ + unsigned long temp1_ulong; + unsigned long temp2_ulong; + hsize_t i; + double per; + hbool_t both_zero; h5difftrace("diff_ulong start\n"); /* -d and !-p */ - if (options->d && !options->p) - { - for ( i = 0; i < nelmts; i++) - { - for ( i = 0; i < nelmts; i++) - { + if (options->d && !options->p) { + for (i = 0; i < nelmts; i++) { + for (i = 0; i < nelmts; i++) { HDmemcpy(&temp1_ulong, mem1, sizeof(unsigned long)); HDmemcpy(&temp2_ulong, mem2, sizeof(unsigned long)); - if ( PDIFF(temp1_ulong,temp2_ulong) > options->delta) - { - if ( print_data(options) ) - { - print_pos(ph,0,hyper_start+i,acc,pos,rank,dims,obj1,obj2); + if (PDIFF(temp1_ulong,temp2_ulong) > options->delta) { + if (print_data(options)) { + print_pos(ph, 0, hyper_start + i, acc, pos, rank, dims, obj1, obj2); parallel_print(SPACES); - parallel_print(LI_FORMAT,temp1_ulong,temp2_ulong,PDIFF(temp1_ulong,temp2_ulong)); + parallel_print(LI_FORMAT, temp1_ulong, temp2_ulong, PDIFF(temp1_ulong, temp2_ulong)); } nfound++; } - mem1+=sizeof(unsigned long); - mem2+=sizeof(unsigned long); - if (options->n && nfound>=options->count) + mem1 += sizeof(unsigned long); + mem2 += sizeof(unsigned long); + if (options->n && nfound >= options->count) return nfound; } } } /* !-d and -p */ - else if (!options->d && options->p) - { - for ( i = 0; i < nelmts; i++) - { + else if (!options->d && options->p) { + for (i = 0; i < nelmts; i++) { HDmemcpy(&temp1_ulong, mem1, sizeof(unsigned long)); HDmemcpy(&temp2_ulong, mem2, sizeof(unsigned long)); - PER_UNSIGN(signed long,temp1_ulong,temp2_ulong); + PER_UNSIGN(signed long, temp1_ulong, temp2_ulong); - if (not_comparable && !both_zero) /* not comparable */ - { - if ( print_data(options) ) - { - print_pos(ph,1,hyper_start+i,acc,pos,rank,dims,obj1,obj2); + if (not_comparable && !both_zero) { + if (print_data(options)) { + print_pos(ph, 1, hyper_start + i, acc, pos, rank, dims, obj1, obj2); parallel_print(SPACES); - parallel_print(ULI_FORMAT_P_NOTCOMP,temp1_ulong,temp2_ulong,PDIFF(temp1_ulong,temp2_ulong)); + parallel_print(ULI_FORMAT_P_NOTCOMP, temp1_ulong, temp2_ulong, PDIFF(temp1_ulong, temp2_ulong)); } nfound++; } - else - if ( per > options->percent ) - { - if ( print_data(options) ) - { - print_pos(ph,1,hyper_start+i,acc,pos,rank,dims,obj1,obj2); - parallel_print(SPACES); - parallel_print(LI_FORMAT_P,temp1_ulong,temp2_ulong, - PDIFF(temp1_ulong,temp2_ulong), - per); - } - nfound++; + else if (per > options->percent) { + if (print_data(options)) { + print_pos(ph, 1, hyper_start + i, acc, pos, rank, dims, obj1, obj2); + parallel_print(SPACES); + parallel_print(LI_FORMAT_P, temp1_ulong, temp2_ulong, PDIFF(temp1_ulong, temp2_ulong), per); } - mem1+=sizeof(unsigned long); - mem2+=sizeof(unsigned long); - if (options->n && nfound>=options->count) + nfound++; + } + mem1 += sizeof(unsigned long); + mem2 += sizeof(unsigned long); + if (options->n && nfound >= options->count) return nfound; } } /* -d and -p */ - else if ( options->d && options->p) - { - for ( i = 0; i < nelmts; i++) - { + else if (options->d && options->p) { + for (i = 0; i < nelmts; i++) { HDmemcpy(&temp1_ulong, mem1, sizeof(unsigned long)); HDmemcpy(&temp2_ulong, mem2, sizeof(unsigned long)); - PER_UNSIGN(signed long,temp1_ulong,temp2_ulong); + PER_UNSIGN(signed long, temp1_ulong, temp2_ulong); - if (not_comparable && !both_zero) /* not comparable */ - { - if ( print_data(options) ) - { - print_pos(ph,1,hyper_start+i,acc,pos,rank,dims,obj1,obj2); + if (not_comparable && !both_zero) { + if (print_data(options)) { + print_pos(ph, 1, hyper_start + i, acc, pos, rank, dims, obj1, obj2); parallel_print(SPACES); - parallel_print(ULI_FORMAT_P_NOTCOMP,temp1_ulong,temp2_ulong,PDIFF(temp1_ulong,temp2_ulong)); + parallel_print(ULI_FORMAT_P_NOTCOMP, temp1_ulong, temp2_ulong, PDIFF(temp1_ulong, temp2_ulong)); } nfound++; } - else - if ( per > options->percent && PDIFF(temp1_ulong,temp2_ulong) > options->delta ) - { - if ( print_data(options) ) - { - print_pos(ph,1,hyper_start+i,acc,pos,rank,dims,obj1,obj2); - parallel_print(SPACES); - parallel_print(LI_FORMAT_P,temp1_ulong,temp2_ulong, - PDIFF(temp1_ulong,temp2_ulong), - per); - } - nfound++; + else if (per > options->percent + && PDIFF(temp1_ulong,temp2_ulong) > options->delta) { + if (print_data(options)) { + print_pos(ph, 1, hyper_start + i, acc, pos, rank, dims, obj1, obj2); + parallel_print(SPACES); + parallel_print(LI_FORMAT_P, temp1_ulong, temp2_ulong, PDIFF(temp1_ulong, temp2_ulong), per); } - mem1+=sizeof(unsigned long); - mem2+=sizeof(unsigned long); - if (options->n && nfound>=options->count) + nfound++; + } + mem1 += sizeof(unsigned long); + mem2 += sizeof(unsigned long); + if (options->n && nfound >= options->count) return nfound; } } - else - { - for ( i = 0; i < nelmts; i++) - { + else { + for (i = 0; i < nelmts; i++) { HDmemcpy(&temp1_ulong, mem1, sizeof(unsigned long)); HDmemcpy(&temp2_ulong, mem2, sizeof(unsigned long)); - if (temp1_ulong != temp2_ulong) - { - if ( print_data(options) ) - { - print_pos(ph,0,hyper_start+i,acc,pos,rank,dims,obj1,obj2); + if (temp1_ulong != temp2_ulong) { + if (print_data(options)) { + print_pos(ph, 0, hyper_start + i, acc, pos, rank, dims, obj1, obj2); parallel_print(SPACES); - parallel_print(LI_FORMAT,temp1_ulong,temp2_ulong,PDIFF(temp1_ulong,temp2_ulong)); + parallel_print(LI_FORMAT, temp1_ulong, temp2_ulong, PDIFF(temp1_ulong, temp2_ulong)); } nfound++; } - mem1+=sizeof(unsigned long); - mem2+=sizeof(unsigned long); - if (options->n && nfound>=options->count) + mem1 += sizeof(unsigned long); + mem2 += sizeof(unsigned long); + if (options->n && nfound >= options->count) return nfound; } /* nelmts */ } @@ -5140,7 +3936,6 @@ static hsize_t diff_ulong(unsigned char *mem1, return nfound; } - /*------------------------------------------------------------------------- * Function: diff_llong * @@ -5150,147 +3945,117 @@ static hsize_t diff_ulong(unsigned char *mem1, * *------------------------------------------------------------------------- */ -static hsize_t diff_llong(unsigned char *mem1, - unsigned char *mem2, - hsize_t nelmts, - hsize_t hyper_start, - int rank, - hsize_t *dims, - hsize_t *acc, - hsize_t *pos, - diff_opt_t *options, - const char *obj1, - const char *obj2, - int *ph) - +static hsize_t diff_llong(unsigned char *mem1, unsigned char *mem2, + hsize_t nelmts, hsize_t hyper_start, int rank, hsize_t *dims, + hsize_t *acc, hsize_t *pos, diff_opt_t *options, const char *obj1, + const char *obj2, int *ph) { - hsize_t nfound=0; /* number of differences found */ - long long temp1_llong; - long long temp2_llong; - hsize_t i; - double per; - hbool_t both_zero; + hsize_t nfound = 0; /* number of differences found */ + long long temp1_llong; + long long temp2_llong; + hsize_t i; + double per; + hbool_t both_zero; h5difftrace("diff_llong start\n"); /* -d and !-p */ - if (options->d && !options->p) - { - for ( i = 0; i < nelmts; i++) - { + if (options->d && !options->p) { + for (i = 0; i < nelmts; i++) { HDmemcpy(&temp1_llong, mem1, sizeof(long long)); HDmemcpy(&temp2_llong, mem2, sizeof(long long)); - if (ABS( temp1_llong-temp2_llong) > options->delta) - { - if ( print_data(options) ) - { - print_pos(ph,0,hyper_start+i,acc,pos,rank,dims,obj1,obj2); + if (ABS( temp1_llong-temp2_llong) > options->delta) { + if (print_data(options)) { + print_pos(ph, 0, hyper_start + i, acc, pos, rank, dims, obj1, obj2); parallel_print(SPACES); - parallel_print(LLI_FORMAT,temp1_llong,temp2_llong,ABS(temp1_llong-temp2_llong)); + parallel_print(LLI_FORMAT, temp1_llong, temp2_llong, ABS(temp1_llong - temp2_llong)); } nfound++; } - mem1+=sizeof(long long); - mem2+=sizeof(long long); - if (options->n && nfound>=options->count) + mem1 += sizeof(long long); + mem2 += sizeof(long long); + if (options->n && nfound >= options->count) return nfound; } } /* !-d and -p */ - else if (!options->d && options->p) - { - for ( i = 0; i < nelmts; i++) - { + else if (!options->d && options->p) { + for (i = 0; i < nelmts; i++) { HDmemcpy(&temp1_llong, mem1, sizeof(long long)); HDmemcpy(&temp2_llong, mem2, sizeof(long long)); - PER(temp1_llong,temp2_llong); + PER(temp1_llong, temp2_llong); - if (not_comparable && !both_zero) /* not comparable */ - { - if ( print_data(options) ) - { - print_pos(ph,1,hyper_start+i,acc,pos,rank,dims,obj1,obj2); + if (not_comparable && !both_zero) { + if (print_data(options)) { + print_pos(ph, 1, hyper_start + i, acc, pos, rank, dims, obj1, obj2); parallel_print(SPACES); - parallel_print(LLI_FORMAT_P_NOTCOMP,temp1_llong,temp2_llong,ABS(temp1_llong-temp2_llong)); - } - nfound++; + parallel_print(LLI_FORMAT_P_NOTCOMP, temp1_llong, temp2_llong, ABS(temp1_llong - temp2_llong)); } - else - if ( per > options->percent ) - { - if ( print_data(options) ) - { - print_pos(ph,1,hyper_start+i,acc,pos,rank,dims,obj1,obj2); - parallel_print(SPACES); - parallel_print(LLI_FORMAT_P,temp1_llong,temp2_llong,ABS(temp1_llong-temp2_llong),per); - } - nfound++; - } - mem1+=sizeof(long long); - mem2+=sizeof(long long); - if (options->n && nfound>=options->count) - return nfound; + nfound++; + } + else if (per > options->percent) { + if (print_data(options)) { + print_pos(ph, 1, hyper_start + i, acc, pos, rank, dims, obj1, obj2); + parallel_print(SPACES); + parallel_print(LLI_FORMAT_P, temp1_llong, temp2_llong, ABS(temp1_llong - temp2_llong),per); + } + nfound++; + } + mem1 += sizeof(long long); + mem2 += sizeof(long long); + if (options->n && nfound >= options->count) + return nfound; } } /* -d and -p */ - else if ( options->d && options->p) - { - for ( i = 0; i < nelmts; i++) - { + else if (options->d && options->p) { + for (i = 0; i < nelmts; i++) { HDmemcpy(&temp1_llong, mem1, sizeof(long long)); HDmemcpy(&temp2_llong, mem2, sizeof(long long)); - PER(temp1_llong,temp2_llong); + PER(temp1_llong, temp2_llong); - if (not_comparable && !both_zero) /* not comparable */ - { - if ( print_data(options) ) - { - print_pos(ph,1,hyper_start+i,acc,pos,rank,dims,obj1,obj2); + if (not_comparable && !both_zero) { + if (print_data(options)) { + print_pos(ph, 1, hyper_start + i, acc, pos, rank, dims, obj1, obj2); parallel_print(SPACES); - parallel_print(LLI_FORMAT_P_NOTCOMP,temp1_llong,temp2_llong,ABS(temp1_llong-temp2_llong)); + parallel_print(LLI_FORMAT_P_NOTCOMP, temp1_llong, temp2_llong, ABS(temp1_llong - temp2_llong)); } nfound++; } - else - if ( per > options->percent && ABS(temp1_llong-temp2_llong) > options->delta ) - { - if ( print_data(options) ) - { - print_pos(ph,1,hyper_start+i,acc,pos,rank,dims,obj1,obj2); - parallel_print(SPACES); - parallel_print(LLI_FORMAT_P,temp1_llong,temp2_llong,ABS(temp1_llong-temp2_llong),per); - } - nfound++; + else if (per > options->percent + && ABS(temp1_llong-temp2_llong) > options->delta) { + if (print_data(options)) { + print_pos(ph, 1, hyper_start + i, acc, pos, rank, dims, obj1, obj2); + parallel_print(SPACES); + parallel_print(LLI_FORMAT_P, temp1_llong, temp2_llong, ABS(temp1_llong - temp2_llong),per); } - mem1+=sizeof(long long); - mem2+=sizeof(long long); - if (options->n && nfound>=options->count) + nfound++; + } + mem1 += sizeof(long long); + mem2 += sizeof(long long); + if (options->n && nfound >= options->count) return nfound; } } - else - { - for ( i = 0; i < nelmts; i++) - { + else { + for (i = 0; i < nelmts; i++) { HDmemcpy(&temp1_llong, mem1, sizeof(long long)); HDmemcpy(&temp2_llong, mem2, sizeof(long long)); - if (temp1_llong != temp2_llong) - { - if ( print_data(options) ) - { - print_pos(ph,0,hyper_start+i,acc,pos,rank,dims,obj1,obj2); + if (temp1_llong != temp2_llong) { + if (print_data(options)) { + print_pos(ph, 0, hyper_start + i, acc, pos, rank, dims, obj1, obj2); parallel_print(SPACES); - parallel_print(LLI_FORMAT,temp1_llong,temp2_llong,ABS(temp1_llong-temp2_llong)); + parallel_print(LLI_FORMAT, temp1_llong, temp2_llong, ABS(temp1_llong - temp2_llong)); } nfound++; } - mem1+=sizeof(long long); - mem2+=sizeof(long long); - if (options->n && nfound>=options->count) + mem1 += sizeof(long long); + mem2 += sizeof(long long); + if (options->n && nfound >= options->count) return nfound; } /* nelmts */ } @@ -5299,7 +4064,6 @@ static hsize_t diff_llong(unsigned char *mem1, return nfound; } - /*------------------------------------------------------------------------- * Function: diff_ullong * @@ -5309,152 +4073,122 @@ static hsize_t diff_llong(unsigned char *mem1, * *------------------------------------------------------------------------- */ -static hsize_t diff_ullong(unsigned char *mem1, - unsigned char *mem2, - hsize_t nelmts, - hsize_t hyper_start, - int rank, - hsize_t *dims, - hsize_t *acc, - hsize_t *pos, - diff_opt_t *options, - const char *obj1, - const char *obj2, - int *ph) +static hsize_t diff_ullong(unsigned char *mem1, unsigned char *mem2, + hsize_t nelmts, hsize_t hyper_start, int rank, hsize_t *dims, hsize_t *acc, + hsize_t *pos, diff_opt_t *options, const char *obj1, const char *obj2, int *ph) { - hsize_t nfound=0; /* number of differences found */ - unsigned long long temp1_ullong; - unsigned long long temp2_ullong; - hsize_t i; - float f1, f2; - double per; - hbool_t both_zero; + hsize_t nfound = 0; /* number of differences found */ + unsigned long long temp1_ullong; + unsigned long long temp2_ullong; + hsize_t i; + float f1, f2; + double per; + hbool_t both_zero; h5difftrace("diff_ullong start\n"); /* -d and !-p */ - if (options->d && !options->p) - { - for ( i = 0; i < nelmts; i++) - { + if (options->d && !options->p) { + for (i = 0; i < nelmts; i++) { HDmemcpy(&temp1_ullong, mem1, sizeof(unsigned long long)); HDmemcpy(&temp2_ullong, mem2, sizeof(unsigned long long)); - if ( PDIFF(temp1_ullong,temp2_ullong) > (unsigned long long) options->delta) - { - if ( print_data(options) ) - { - print_pos(ph,0,hyper_start+i,acc,pos,rank,dims,obj1,obj2); + if (PDIFF(temp1_ullong,temp2_ullong) > (unsigned long long) options->delta) { + if (print_data(options)) { + print_pos(ph, 0, hyper_start + i, acc, pos, rank, dims, obj1, obj2); parallel_print(SPACES); parallel_print(ULLI_FORMAT,temp1_ullong,temp2_ullong,PDIFF(temp1_ullong,temp2_ullong)); } nfound++; } - mem1+=sizeof(unsigned long long); - mem2+=sizeof(unsigned long long); - if (options->n && nfound>=options->count) + mem1 += sizeof(unsigned long long); + mem2 += sizeof(unsigned long long); + if (options->n && nfound >= options->count) return nfound; } } /* !-d and -p */ - else if (!options->d && options->p) - { - for ( i = 0; i < nelmts; i++) - { + else if (!options->d && options->p) { + for (i = 0; i < nelmts; i++) { HDmemcpy(&temp1_ullong, mem1, sizeof(unsigned long long)); HDmemcpy(&temp2_ullong, mem2, sizeof(unsigned long long)); - ull2float(temp1_ullong,&f1); - ull2float(temp2_ullong,&f2); - PER(f1,f2); + ull2float(temp1_ullong, &f1); + ull2float(temp2_ullong, &f2); + PER(f1, f2); - if (not_comparable && !both_zero) /* not comparable */ - { - if ( print_data(options) ) - { - print_pos(ph,1,hyper_start+i,acc,pos,rank,dims,obj1,obj2); + if (not_comparable && !both_zero) { + if (print_data(options)) { + print_pos(ph, 1, hyper_start + i, acc, pos, rank, dims, obj1, obj2); parallel_print(SPACES); parallel_print(ULLI_FORMAT_P_NOTCOMP,temp1_ullong,temp2_ullong,PDIFF(temp1_ullong,temp2_ullong)); } nfound++; } - else - if ( per > options->percent ) - { - if ( print_data(options) ) - { - print_pos(ph,1,hyper_start+i,acc,pos,rank,dims,obj1,obj2); - parallel_print(SPACES); - parallel_print(ULLI_FORMAT_P,temp1_ullong,temp2_ullong,PDIFF(temp1_ullong,temp2_ullong),per); - } - nfound++; + else if (per > options->percent) { + if (print_data(options)) { + print_pos(ph, 1, hyper_start + i, acc, pos, rank, dims, obj1, obj2); + parallel_print(SPACES); + parallel_print(ULLI_FORMAT_P,temp1_ullong,temp2_ullong,PDIFF(temp1_ullong,temp2_ullong),per); } - mem1+=sizeof(unsigned long long); - mem2+=sizeof(unsigned long long); - if (options->n && nfound>=options->count) + nfound++; + } + mem1 += sizeof(unsigned long long); + mem2 += sizeof(unsigned long long); + if (options->n && nfound >= options->count) return nfound; } } /* -d and -p */ - else if ( options->d && options->p) - { - for ( i = 0; i < nelmts; i++) - { + else if (options->d && options->p) { + for (i = 0; i < nelmts; i++) { HDmemcpy(&temp1_ullong, mem1, sizeof(unsigned long long)); HDmemcpy(&temp2_ullong, mem2, sizeof(unsigned long long)); - ull2float(temp1_ullong,&f1); - ull2float(temp2_ullong,&f2); - PER(f1,f2); + ull2float(temp1_ullong, &f1); + ull2float(temp2_ullong, &f2); + PER(f1, f2); - if (not_comparable && !both_zero) /* not comparable */ - { - if ( print_data(options) ) - { - print_pos(ph,1,hyper_start+i,acc,pos,rank,dims,obj1,obj2); + if (not_comparable && !both_zero) { + if (print_data(options)) { + print_pos(ph, 1, hyper_start + i, acc, pos, rank, dims, obj1, obj2); parallel_print(SPACES); parallel_print(ULLI_FORMAT_P_NOTCOMP,temp1_ullong,temp2_ullong,PDIFF(temp1_ullong,temp2_ullong)); } nfound++; } - else - if ( per > options->percent && PDIFF(temp1_ullong,temp2_ullong) > (unsigned long long)options->delta ) - { - if ( print_data(options) ) - { - print_pos(ph,1,hyper_start+i,acc,pos,rank,dims,obj1,obj2); - parallel_print(SPACES); - parallel_print(ULLI_FORMAT_P,temp1_ullong,temp2_ullong,PDIFF(temp1_ullong,temp2_ullong),per); - } - nfound++; + else if (per > options->percent + && PDIFF(temp1_ullong,temp2_ullong) > (unsigned long long) options->delta) { + if (print_data(options)) { + print_pos(ph, 1, hyper_start + i, acc, pos, rank, dims, obj1, obj2); + parallel_print(SPACES); + parallel_print(ULLI_FORMAT_P,temp1_ullong,temp2_ullong,PDIFF(temp1_ullong,temp2_ullong),per); } - mem1+=sizeof(unsigned long long); - mem2+=sizeof(unsigned long long); - if (options->n && nfound>=options->count) + nfound++; + } + mem1 += sizeof(unsigned long long); + mem2 += sizeof(unsigned long long); + if (options->n && nfound >= options->count) return nfound; } } - else - { - for ( i = 0; i < nelmts; i++) - { + else { + for (i = 0; i < nelmts; i++) { HDmemcpy(&temp1_ullong, mem1, sizeof(unsigned long long)); HDmemcpy(&temp2_ullong, mem2, sizeof(unsigned long long)); - if (temp1_ullong != temp2_ullong) - { - if ( print_data(options) ) - { - print_pos(ph,0,hyper_start+i,acc,pos,rank,dims,obj1,obj2); + if (temp1_ullong != temp2_ullong) { + if (print_data(options)) { + print_pos(ph, 0, hyper_start + i, acc, pos, rank, dims, obj1, obj2); parallel_print(SPACES); parallel_print(ULLI_FORMAT,temp1_ullong,temp2_ullong,PDIFF(temp1_ullong,temp2_ullong)); } nfound++; } - mem1+=sizeof(unsigned long long); - mem2+=sizeof(unsigned long long); - if (options->n && nfound>=options->count) + mem1 += sizeof(unsigned long long); + mem2 += sizeof(unsigned long long); + if (options->n && nfound >= options->count) return nfound; } /* nelmts */ } @@ -5463,7 +4197,6 @@ static hsize_t diff_ullong(unsigned char *mem1, return nfound; } - /*------------------------------------------------------------------------- * Function: ull2float * @@ -5477,49 +4210,46 @@ static hsize_t diff_ullong(unsigned char *mem1, *------------------------------------------------------------------------- */ static -int ull2float(unsigned long long ull_value, float *f_value) -{ - hid_t dxpl_id; - unsigned char *buf = NULL; - size_t src_size; - size_t dst_size; +int ull2float(unsigned long long ull_value, float *f_value) { + hid_t dxpl_id; + unsigned char *buf = NULL; + size_t src_size; + size_t dst_size; h5difftrace("ull2float start\n"); - if((dxpl_id = H5Pcreate(H5P_DATASET_XFER))<0) + if ((dxpl_id = H5Pcreate(H5P_DATASET_XFER)) < 0) goto error; src_size = H5Tget_size(H5T_NATIVE_ULLONG); dst_size = H5Tget_size(H5T_NATIVE_FLOAT); - buf = (unsigned char*)HDcalloc((size_t)1, MAX(src_size, dst_size)); - if(!buf) + buf = (unsigned char*) HDcalloc((size_t )1, MAX(src_size, dst_size)); + if (!buf) goto error; HDmemcpy(buf, &ull_value, src_size); /* do conversion */ - if(H5Tconvert(H5T_NATIVE_ULLONG, H5T_NATIVE_FLOAT, (size_t)1, buf, NULL, dxpl_id)<0) + if (H5Tconvert(H5T_NATIVE_ULLONG, H5T_NATIVE_FLOAT, (size_t) 1, buf, NULL, dxpl_id) < 0) goto error; HDmemcpy(f_value, buf, dst_size); - if(buf) - HDfree(buf); - h5difftrace("ull2float finish\n"); + if (buf) + HDfree(buf);h5difftrace("ull2float finish\n"); return 0; error: - H5E_BEGIN_TRY { + H5E_BEGIN_TRY + { H5Pclose(dxpl_id); - } H5E_END_TRY; - if(buf) - HDfree(buf); - h5difftrace("ull2float errored\n"); + }H5E_END_TRY; + if (buf) + HDfree(buf);h5difftrace("ull2float errored\n"); return -1; } - /*------------------------------------------------------------------------- * Function: equal_double * @@ -5531,26 +4261,21 @@ error: * *------------------------------------------------------------------------- */ -static -hbool_t equal_double(double value, double expected, diff_opt_t *options) -{ +static hbool_t equal_double(double value, double expected, diff_opt_t *options) { h5difftrace("equal_double start\n"); - if ( options->do_nans ) - { - + if (options->do_nans) { /*------------------------------------------------------------------------- * detect NaNs *------------------------------------------------------------------------- */ - hbool_t isnan1 = my_isnan(FLT_DOUBLE,&value); - hbool_t isnan2 = my_isnan(FLT_DOUBLE,&expected); + hbool_t isnan1 = my_isnan(FLT_DOUBLE, &value); + hbool_t isnan2 = my_isnan(FLT_DOUBLE, &expected); /*------------------------------------------------------------------------- * we consider NaN == NaN to be true *------------------------------------------------------------------------- */ - if ( isnan1 && isnan2 ) - { + if (isnan1 && isnan2) { return TRUE; } @@ -5558,8 +4283,7 @@ hbool_t equal_double(double value, double expected, diff_opt_t *options) * one is a NaN, do not compare but assume difference *------------------------------------------------------------------------- */ - if ( (isnan1 && !isnan2) || ( !isnan1 && isnan2 ) ) - { + if ((isnan1 && !isnan2) || (!isnan1 && isnan2)) { return FALSE; } } @@ -5590,31 +4314,27 @@ static hbool_t equal_ldouble(long double value, long double expected, diff_opt_t *options) { h5difftrace("equal_ldouble start\n"); - if ( options->do_nans ) - { - + if (options->do_nans) { /*------------------------------------------------------------------------- - * detect NaNs - *------------------------------------------------------------------------- - */ - hbool_t isnan1 = my_isnan(FLT_LDOUBLE,&value); - hbool_t isnan2 = my_isnan(FLT_LDOUBLE,&expected); + * detect NaNs + *------------------------------------------------------------------------- + */ + hbool_t isnan1 = my_isnan(FLT_LDOUBLE, &value); + hbool_t isnan2 = my_isnan(FLT_LDOUBLE, &expected); /*------------------------------------------------------------------------- - * we consider NaN == NaN to be true - *------------------------------------------------------------------------- - */ - if ( isnan1 && isnan2 ) - { + * we consider NaN == NaN to be true + *------------------------------------------------------------------------- + */ + if (isnan1 && isnan2) { return TRUE; } /*------------------------------------------------------------------------- - * one is a NaN, do not compare but assume difference - *------------------------------------------------------------------------- - */ - if ( (isnan1 && !isnan2) || ( !isnan1 && isnan2 ) ) - { + * one is a NaN, do not compare but assume difference + *------------------------------------------------------------------------- + */ + if ((isnan1 && !isnan2) || (!isnan1 && isnan2)) { return FALSE; } } @@ -5623,7 +4343,7 @@ hbool_t equal_ldouble(long double value, long double expected, diff_opt_t *optio return TRUE; if (options->use_system_epsilon) { - if ( ABS( (value-expected) ) < DBL_EPSILON) + if (ABS((value-expected)) < DBL_EPSILON) return TRUE; } h5difftrace("equal_ldouble finish\n"); @@ -5633,7 +4353,6 @@ hbool_t equal_ldouble(long double value, long double expected, diff_opt_t *optio #endif /* #if H5_SIZEOF_LONG_DOUBLE !=0 */ - /*------------------------------------------------------------------------- * Function: equal_float * @@ -5645,35 +4364,29 @@ hbool_t equal_ldouble(long double value, long double expected, diff_opt_t *optio * *------------------------------------------------------------------------- */ -static -hbool_t equal_float(float value, float expected, diff_opt_t *options) -{ +static hbool_t equal_float(float value, float expected, diff_opt_t *options) { h5difftrace("equal_float start\n"); - if ( options->do_nans ) - { - + if (options->do_nans) { /*------------------------------------------------------------------------- * detect NaNs *------------------------------------------------------------------------- */ - hbool_t isnan1 = my_isnan(FLT_FLOAT,&value); - hbool_t isnan2 = my_isnan(FLT_FLOAT,&expected); + hbool_t isnan1 = my_isnan(FLT_FLOAT, &value); + hbool_t isnan2 = my_isnan(FLT_FLOAT, &expected); /*------------------------------------------------------------------------- - * we consider NaN == NaN to be true - *------------------------------------------------------------------------- - */ - if ( isnan1 && isnan2 ) - { + * we consider NaN == NaN to be true + *------------------------------------------------------------------------- + */ + if (isnan1 && isnan2) { return TRUE; } /*------------------------------------------------------------------------- - * one is a NaN, do not compare but assume difference - *------------------------------------------------------------------------- - */ - if ( (isnan1 && !isnan2) || ( !isnan1 && isnan2 ) ) - { + * one is a NaN, do not compare but assume difference + *------------------------------------------------------------------------- + */ + if ((isnan1 && !isnan2) || (!isnan1 && isnan2)) { return FALSE; } } @@ -5691,8 +4404,6 @@ hbool_t equal_float(float value, float expected, diff_opt_t *options) } - - /*------------------------------------------------------------------------- * Function: my_isnan * @@ -5709,81 +4420,68 @@ hbool_t equal_float(float value, float expected, diff_opt_t *options) * *------------------------------------------------------------------------- */ -static hbool_t -my_isnan(dtype_t type, void *val) -{ +static hbool_t my_isnan(dtype_t type, void *val) { hbool_t retval = FALSE; char s[256]; h5difftrace("my_isnan start\n"); - if (FLT_FLOAT==type) - { + if (FLT_FLOAT == type) { float x; HDmemcpy(&x, val, sizeof(float)); - retval = (x!=x); + retval = (x != x); } - else if (FLT_DOUBLE==type) - { + else if (FLT_DOUBLE == type) { double x; HDmemcpy(&x, val, sizeof(double)); - retval = (x!=x); + retval = (x != x); } -#if H5_SIZEOF_LONG_DOUBLE!=H5_SIZEOF_DOUBLE && H5_SIZEOF_LONG_DOUBLE!=0 - else if (FLT_LDOUBLE==type) - { +#if H5_SIZEOF_LONG_DOUBLE != H5_SIZEOF_DOUBLE && H5_SIZEOF_LONG_DOUBLE != 0 + else if (FLT_LDOUBLE == type) { long double x; HDmemcpy(&x, val, sizeof(long double)); retval = (x!=x); } #endif - else - { + else { return FALSE; } - /* + /* * Sometimes NaN==NaN (e.g., DEC Alpha) so we try to print it and see if * the result contains a NaN string. */ - if (!retval) - { - if (FLT_FLOAT==type) - { + if (!retval) { + if (FLT_FLOAT == type) { float x; HDmemcpy(&x, val, sizeof(float)); - HDsnprintf(s, sizeof(s), "%g", (double)x); + HDsnprintf(s, sizeof(s), "%g", (double) x); } - else if (FLT_DOUBLE==type) - { + else if (FLT_DOUBLE == type) { double x; HDmemcpy(&x, val, sizeof(double)); HDsnprintf(s, sizeof(s), "%g", x); } -#if H5_SIZEOF_LONG_DOUBLE!=H5_SIZEOF_DOUBLE && H5_SIZEOF_LONG_DOUBLE!=0 - else if (FLT_LDOUBLE==type) - { +#if H5_SIZEOF_LONG_DOUBLE != H5_SIZEOF_DOUBLE && H5_SIZEOF_LONG_DOUBLE != 0 + else if (FLT_LDOUBLE == type) { long double x; HDmemcpy(&x, val, sizeof(long double)); HDsnprintf(s, sizeof(s), "%Lg", x); } #endif - else - { + else { return FALSE; } - if ( HDstrstr(s, "NaN") || - HDstrstr(s, "NAN") || - HDstrstr(s, "nan") || - HDstrstr(s, "-1.#IND") /* WIN32 */ - ) - { + if (HDstrstr(s, "NaN") || + HDstrstr(s, "NAN") || + HDstrstr(s, "nan") || + HDstrstr(s, "-1.#IND")) { retval = TRUE; } } @@ -5793,7 +4491,6 @@ my_isnan(dtype_t type, void *val) return retval; } - /*------------------------------------------------------------------------- * * Local functions @@ -5808,9 +4505,8 @@ my_isnan(dtype_t type, void *val) *------------------------------------------------------------------------- */ static -int print_data(diff_opt_t *options) -{ - return ( (options->m_report || options->m_verbose) && !options->m_quiet)?1:0; +int print_data(diff_opt_t *options) { + return ((options->m_report || options->m_verbose) && !options->m_quiet) ? 1 : 0; } /*------------------------------------------------------------------------- @@ -5820,37 +4516,28 @@ int print_data(diff_opt_t *options) * *------------------------------------------------------------------------- */ - static -void print_header(int pp, /* print percentage */ - int rank, - hsize_t *dims, - const char *obj1, - const char *obj2 ) -{ +void print_header(int pp, /* print percentage */ + int rank, hsize_t *dims, const char *obj1, const char *obj2) { /* print header */ - parallel_print("%-16s","size:"); - print_dimensions (rank,dims); - parallel_print("%-11s",""); - print_dimensions (rank,dims); + parallel_print("%-16s", "size:"); + print_dimensions(rank, dims); + parallel_print("%-11s", ""); + print_dimensions(rank, dims); parallel_print("\n"); - if(pp) { - parallel_print("%-15s %-15s %-15s %-15s %-15s\n", - "position", - (obj1!=NULL) ? obj1 : " ", - (obj2!=NULL) ? obj2 : " ", - "difference", - "relative"); - parallel_print("------------------------------------------------------------------------\n"); + if (pp) { + parallel_print("%-15s %-15s %-15s %-15s %-15s\n", "position", + (obj1 != NULL) ? obj1 : " ", (obj2 != NULL) ? obj2 : " ", "difference", + "relative"); + parallel_print( + "------------------------------------------------------------------------\n"); } else { - parallel_print("%-15s %-15s %-15s %-20s\n", - "position", - (obj1!=NULL) ? obj1 : " ", - (obj2!=NULL) ? obj2 : " ", - "difference"); - parallel_print("------------------------------------------------------------\n"); + parallel_print("%-15s %-15s %-15s %-20s\n", "position", + (obj1 != NULL) ? obj1 : " ", (obj2 != NULL) ? obj2 : " ", "difference"); + parallel_print( + "------------------------------------------------------------\n"); } } @@ -5861,48 +4548,36 @@ void print_header(int pp, /* print percentage */ * *------------------------------------------------------------------------- */ - static -void print_pos( int *ph, /* print header */ - int pp, /* print percentage */ - hsize_t curr_pos, - hsize_t *acc, - hsize_t *pos, - int rank, - hsize_t *dims, - const char *obj1, - const char *obj2 ) -{ +void print_pos(int *ph, /* print header */ + int pp, /* print percentage */ + hsize_t curr_pos, hsize_t *acc, hsize_t *pos, int rank, hsize_t *dims, + const char *obj1, const char *obj2) { int i; /* print header */ - if ( *ph==1 ) - { - *ph=0; + if (*ph == 1) { + *ph = 0; print_header(pp, rank, dims, obj1, obj2); } /* end print header */ - for ( i = 0; i < rank; i++) - { - pos[i] = curr_pos/acc[i]; - curr_pos -= acc[i]*pos[i]; + for (i = 0; i < rank; i++) { + pos[i] = curr_pos / acc[i]; + curr_pos -= acc[i] * pos[i]; } - HDassert( curr_pos == 0 ); + HDassert(curr_pos == 0); - if ( rank > 0 ) - { - parallel_print("[ " ); - for ( i = 0; i < rank; i++) - { + if (rank > 0) { + parallel_print("[ "); + for (i = 0; i < rank; i++) { parallel_print(HSIZE_T_FORMAT, (unsigned long long)pos[i]); parallel_print(" "); } - parallel_print("]" ); + parallel_print("]"); } - else - { - parallel_print(" "); + else { + parallel_print(" "); } } @@ -5913,52 +4588,38 @@ void print_pos( int *ph, /* print header */ * *------------------------------------------------------------------------- */ - static -void print_char_pos( int *ph, /* print header */ - int pp, /* print percentage */ - hsize_t curr_pos, - size_t u, - hsize_t *acc, - hsize_t *pos, - int rank, - hsize_t *dims, - const char *obj1, - const char *obj2 ) -{ +void print_char_pos(int *ph, /* print header */ + int pp, /* print percentage */ + hsize_t curr_pos, size_t u, hsize_t *acc, hsize_t *pos, int rank, hsize_t *dims, + const char *obj1, const char *obj2) { int i; /* print header */ - if ( *ph==1 ) - { - *ph=0; + if (*ph == 1) { + *ph = 0; print_header(pp, rank, dims, obj1, obj2); } /* end print header */ - for ( i = 0; i < rank; i++) - { - pos[i] = curr_pos/acc[i]; - curr_pos -= acc[i]*pos[i]; + for (i = 0; i < rank; i++) { + pos[i] = curr_pos / acc[i]; + curr_pos -= acc[i] * pos[i]; } - HDassert( curr_pos == 0 ); + HDassert(curr_pos == 0); - parallel_print("[ " ); - if ( rank > 0 ) - { - - for ( i = 0; i < rank; i++) - { + parallel_print("[ "); + if (rank > 0) { + for (i = 0; i < rank; i++) { parallel_print(HSIZE_T_FORMAT, (unsigned long long)pos[i]); parallel_print(" "); } } - else - { + else { parallel_print("%zu", u); } - parallel_print("]" ); + parallel_print("]"); } /*------------------------------------------------------------------------- @@ -5968,16 +4629,13 @@ void print_char_pos( int *ph, /* print header */ * *------------------------------------------------------------------------- */ -static void h5diff_print_char(char ch) -{ - - switch (ch) - { +static void h5diff_print_char(char ch) { + switch (ch) { case '"': parallel_print("\\\""); break; case '\\': - parallel_print( "\\\\"); + parallel_print("\\\\"); break; case '\b': parallel_print("\\b"); @@ -5996,60 +4654,53 @@ static void h5diff_print_char(char ch) break; default: if (isprint(ch)) - parallel_print( "%c", ch); + parallel_print("%c", ch); else - parallel_print( "\\%03o", ch); - + parallel_print("\\%03o", ch); break; } } - /*------------------------------------------------------------------------- * XCAO, 11/10/2010 * added to improve performance for compound datasets * set up compound datatype structures. */ -static void get_member_types(hid_t tid, mcomp_t *members) -{ +static void get_member_types(hid_t tid, mcomp_t *members) { int tclass; unsigned u; - if (tid <=0 || !members) + if (tid <= 0 || !members) return; tclass = H5Tget_class(tid); - if (tclass == H5T_ARRAY || tclass == H5T_VLEN) - { + if (tclass == H5T_ARRAY || tclass == H5T_VLEN) { hid_t base_tid = H5Tget_super(tid); get_member_types(base_tid, members); H5Tclose(base_tid); } - else if (tclass == H5T_COMPOUND) - { - int nmembs; + else if (tclass == H5T_COMPOUND) { + int nmembs; nmembs = H5Tget_nmembers(tid); - if(nmembs <= 0) + if (nmembs <= 0) return; - members->n = (unsigned)nmembs; - - members->ids = (hid_t *)HDcalloc((size_t)members->n, sizeof(hid_t)); - members->offsets = (size_t *)HDcalloc((size_t)members->n, sizeof(size_t)); - members->m = (mcomp_t **)HDcalloc((size_t)members->n, sizeof(mcomp_t *)); - - for(u = 0; u < members->n; u++) - { - members->ids[u] = H5Tget_member_type( tid, u ); - members->offsets[u] = H5Tget_member_offset( tid, u ); - members->m[u] = (mcomp_t *)HDmalloc(sizeof(mcomp_t)); - HDmemset(members->m[u], 0, sizeof(mcomp_t)); - get_member_types(members->ids[u], members->m[u]); + members->n = (unsigned) nmembs; + + members->ids = (hid_t *) HDcalloc((size_t )members->n, sizeof(hid_t)); + members->offsets = (size_t *) HDcalloc((size_t )members->n, sizeof(size_t)); + members->m = (mcomp_t **) HDcalloc((size_t )members->n, sizeof(mcomp_t *)); + + for (u = 0; u < members->n; u++) { + members->ids[u] = H5Tget_member_type(tid, u); + members->offsets[u] = H5Tget_member_offset(tid, u); + members->m[u] = (mcomp_t *) HDmalloc(sizeof(mcomp_t)); + HDmemset(members->m[u], 0, sizeof(mcomp_t)); + get_member_types(members->ids[u], members->m[u]); } } - return; - + return; } @@ -6058,17 +4709,14 @@ static void get_member_types(hid_t tid, mcomp_t *members) * added to improve performance for compound datasets * clean and close compound members. */ -static void close_member_types(mcomp_t *members) -{ +static void close_member_types(mcomp_t *members) { unsigned u; - if (!members || members->n<=0 || !members->ids) + if (!members || members->n <= 0 || !members->ids) return; - for(u = 0; u < members->n; u++) - { - if(members->m[u]) - { + for (u = 0; u < members->n; u++) { + if (members->m[u]) { close_member_types(members->m[u]); HDfree(members->m[u]); } -- cgit v0.12 From 3495502a778d84ab3d40da94995229d106fd54bb Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Mon, 11 Sep 2017 12:46:07 -0500 Subject: Fix merge typos --- tools/lib/h5diff_array.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tools/lib/h5diff_array.c b/tools/lib/h5diff_array.c index 68a9575..32ce3db 100644 --- a/tools/lib/h5diff_array.c +++ b/tools/lib/h5diff_array.c @@ -1515,7 +1515,7 @@ static hsize_t diff_datum( } else if (per > options->percent && (double) ABS(temp1_float - temp2_float) > options->delta) { if (print_data(options)) { - print_pos(ph, 1, index, acc, pos, rank, dims, obj1, + print_pos(ph, 1, index, acc, pos, rank, dims, obj1, obj2); parallel_print(SPACES); parallel_print(F_FORMAT_P, (double) temp1_float, (double) temp2_float, (double) ABS(temp1_float - temp2_float), (double) ABS(1 - temp2_float / temp1_float)); @@ -2762,7 +2762,7 @@ static hsize_t diff_ldouble(unsigned char *mem1, if (print_data(options)) { print_pos(ph, 0, hyper_start + i, acc, pos, rank, dims, obj1, obj2); parallel_print(SPACES); - parallel_print(F_FORMAT, temp1_double, temp2_double, ABS(temp1_double - emp2_double)); + parallel_print(F_FORMAT, temp1_double, temp2_double, ABS(temp1_double - temp2_double)); } nfound++; @@ -3196,7 +3196,7 @@ static hsize_t diff_short(unsigned char *mem1, unsigned char *mem2, if (ABS(temp1_short-temp2_short) > options->delta) { if (print_data(options)) { - print_pos(ph, 0, hyper_start + i, acc, pos, rank, dims obj1, obj2); + print_pos(ph, 0, hyper_start + i, acc, pos, rank, dims, obj1, obj2); parallel_print(SPACES); parallel_print(I_FORMAT, temp1_short, temp2_short, ABS(temp1_short - temp2_short)); } -- cgit v0.12 From 3719ce7c5b06e1811d945372f18ca1010692bf21 Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Tue, 12 Sep 2017 08:46:49 -0500 Subject: Generate headers for 1.10 should default off --- src/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 178c954..e2acd30 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -816,7 +816,7 @@ set (H5_GENERATED_HEADERS ${HDF5_SRC_DIR}/H5overflow.h ) -option (HDF5_GENERATE_HEADERS "Rebuild Generated Files" ON) +option (HDF5_GENERATE_HEADERS "Rebuild Generated Files" OFF) if (HDF5_GENERATE_HEADERS) set_source_files_properties(${H5_GENERATED_HEADERS} PROPERTIES GENERATED TRUE) find_package (Perl) -- cgit v0.12 From 3a4d573f030b3e4ac1a54b00eadf1b1881f12dfc Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Tue, 12 Sep 2017 09:20:23 -0500 Subject: Generate headers for 1.10 should default off --- release_docs/INSTALL_CMake.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/release_docs/INSTALL_CMake.txt b/release_docs/INSTALL_CMake.txt index 4e9d7da..f15e94e 100644 --- a/release_docs/INSTALL_CMake.txt +++ b/release_docs/INSTALL_CMake.txt @@ -591,7 +591,7 @@ HDF5_ENABLE_LARGE_FILE "Enable support for large (64-bit) files on Linux HDF5_ENABLE_PARALLEL "Enable parallel build (requires MPI)" OFF HDF5_ENABLE_TRACE "Enable API tracing capability" OFF HDF5_ENABLE_USING_MEMCHECKER "Indicate that a memory checker is used" OFF -HDF5_GENERATE_HEADERS "Rebuild Generated Files" ON +HDF5_GENERATE_HEADERS "Rebuild Generated Files" OFF HDF5_JAVA_PACK_JRE "Package a JRE installer directory" OFF HDF5_MEMORY_ALLOC_SANITY_CHECK "Indicate that internal memory allocation sanity checks are enabled" OFF HDF5_METADATA_TRACE_FILE "Enable metadata trace file collection" OFF -- cgit v0.12 From 2c8092705c33946c73557fd74ca728d9b0da4c86 Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Tue, 12 Sep 2017 09:24:27 -0500 Subject: Test program generation should default off --- CMakeLists.txt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index ce91052..1b6e14d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -575,6 +575,9 @@ if (MAKE_SYSTEM) set (CFG_INIT "") endif () +# Do not generate test programs by default +option (HDF5_BUILD_GENERATORS "Build Test Generators" OFF) + #----------------------------------------------------------------------------- # Add some definitions for Debug Builds #----------------------------------------------------------------------------- -- cgit v0.12 From 163cd4cf0012386c7e264478b6f14fc025ea87b6 Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Tue, 12 Sep 2017 10:35:35 -0500 Subject: Generators need to be ON for development work --- config/cmake/cacheinit.cmake | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/config/cmake/cacheinit.cmake b/config/cmake/cacheinit.cmake index 6a66c8a..98b55b6 100644 --- a/config/cmake/cacheinit.cmake +++ b/config/cmake/cacheinit.cmake @@ -17,11 +17,13 @@ set (CMAKE_INSTALL_FRAMEWORK_PREFIX "Library/Frameworks" CACHE STRING "Frameworks installation directory" FORCE) +set (HDF5_GENERATE_HEADERS ON CACHE BOOL "Rebuild Generated Files" FORCE) + set (HDF_PACKAGE_EXT "" CACHE STRING "Name of HDF package extension" FORCE) set (HDF5_BUILD_FORTRAN ON CACHE BOOL "Build FORTRAN support" FORCE) -set (HDF5_BUILD_GENERATORS OFF CACHE BOOL "Build Test Generators" FORCE) +set (HDF5_BUILD_GENERATORS ON CACHE BOOL "Build Test Generators" FORCE) set (HDF5_ENABLE_Z_LIB_SUPPORT ON CACHE BOOL "Enable Zlib Filters" FORCE) -- cgit v0.12 From e59038e391344be45e2c411505a6a7a82311567d Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Wed, 13 Sep 2017 15:03:52 -0500 Subject: restore GEN HDRS and remove cache sets for defoult options --- CMakeFilters.cmake | 15 ++++++--------- CMakeInstallation.cmake | 2 +- CMakeLists.txt | 2 +- config/cmake/cacheinit.cmake | 38 ++------------------------------------ config/cmake/mccacheinit.cmake | 34 ++-------------------------------- release_docs/INSTALL_CMake.txt | 32 +++++++++----------------------- 6 files changed, 21 insertions(+), 102 deletions(-) diff --git a/CMakeFilters.cmake b/CMakeFilters.cmake index 9b66d95..804b16b 100644 --- a/CMakeFilters.cmake +++ b/CMakeFilters.cmake @@ -11,10 +11,10 @@ # include (ExternalProject) -#option (HDF5_ALLOW_EXTERNAL_SUPPORT "Allow External Library Building (NO GIT SVN TGZ)" "NO") -set (HDF5_ALLOW_EXTERNAL_SUPPORT "NO" CACHE STRING "Allow External Library Building (NO SVN TGZ)") -set_property (CACHE HDF5_ALLOW_EXTERNAL_SUPPORT PROPERTY STRINGS NO GIT SVN TGZ) -if (HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "GIT" OR HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "SVN" OR HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "TGZ") +#option (HDF5_ALLOW_EXTERNAL_SUPPORT "Allow External Library Building (NO GIT TGZ)" "NO") +set (HDF5_ALLOW_EXTERNAL_SUPPORT "NO" CACHE STRING "Allow External Library Building (NO GIT TGZ)") +set_property (CACHE HDF5_ALLOW_EXTERNAL_SUPPORT PROPERTY STRINGS NO GIT TGZ) +if (HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "GIT" OR HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "TGZ") option (ZLIB_USE_EXTERNAL "Use External Library Building for ZLIB" 1) option (SZIP_USE_EXTERNAL "Use External Library Building for SZIP" 1) if (HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "GIT") @@ -22,9 +22,6 @@ if (HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "GIT" OR HDF5_ALLOW_EXTERNAL_SUPPORT MAT set (ZLIB_BRANCH ${ZLIB_GIT_BRANCH}) set (SZIP_URL ${SZIP_GIT_URL} CACHE STRING "Path to szip git repository") set (SZIP_BRANCH ${SZIP_GIT_BRANCH}) - elseif (HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "SVN") - set (ZLIB_URL ${ZLIB_SVN_URL} CACHE STRING "Path to zlib Subversion repository") - set (SZIP_URL ${SZIP_SVN_URL} CACHE STRING "Path to szip Subversion repository") elseif (HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "TGZ") if (NOT TGZPATH) set (TGZPATH ${HDF5_SOURCE_DIR}) @@ -61,7 +58,7 @@ if (HDF5_ENABLE_Z_LIB_SUPPORT) set (ZLIB_INCLUDE_DIR_GEN ${ZLIB_INCLUDE_DIR}) set (ZLIB_INCLUDE_DIRS ${ZLIB_INCLUDE_DIRS} ${ZLIB_INCLUDE_DIR}) else () - if (HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "GIT" OR HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "SVN" OR HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "TGZ") + if (HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "GIT" OR HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "TGZ") EXTERNAL_ZLIB_LIBRARY (${HDF5_ALLOW_EXTERNAL_SUPPORT}) set (H5_HAVE_FILTER_DEFLATE 1) set (H5_HAVE_ZLIB_H 1) @@ -111,7 +108,7 @@ if (HDF5_ENABLE_SZIP_SUPPORT) set (SZIP_INCLUDE_DIR_GEN ${SZIP_INCLUDE_DIR}) set (SZIP_INCLUDE_DIRS ${SZIP_INCLUDE_DIRS} ${SZIP_INCLUDE_DIR}) else () - if (HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "GIT" OR HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "SVN" OR HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "TGZ") + if (HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "GIT" OR HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "TGZ") EXTERNAL_SZIP_LIBRARY (${HDF5_ALLOW_EXTERNAL_SUPPORT} ${HDF5_ENABLE_SZIP_ENCODING}) set (H5_HAVE_FILTER_SZIP 1) set (H5_HAVE_SZLIB_H 1) diff --git a/CMakeInstallation.cmake b/CMakeInstallation.cmake index 70638d6..8804964 100644 --- a/CMakeInstallation.cmake +++ b/CMakeInstallation.cmake @@ -478,7 +478,7 @@ The HDF5 data model, file format, API, library, and tools are open and distribut set (CPACK_INSTALL_CMAKE_PROJECTS "${HDF5_BINARY_DIR};HDF5;ALL;/") if (HDF5_PACKAGE_EXTLIBS) - if (HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "SVN" OR HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "TGZ") + if (HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "GIT" OR HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "TGZ") if (ZLIB_FOUND AND ZLIB_USE_EXTERNAL) if (WIN32) set (CPACK_INSTALL_CMAKE_PROJECTS "${CPACK_INSTALL_CMAKE_PROJECTS};${ZLIB_INCLUDE_DIR_GEN};ZLIB;ALL;/") diff --git a/CMakeLists.txt b/CMakeLists.txt index 1b6e14d..264d099 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -756,7 +756,7 @@ endif () #----------------------------------------------------------------------------- add_subdirectory (${HDF5_SOURCE_DIR}/src ${PROJECT_BINARY_DIR}/src) -if (HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "SVN" OR HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "GIT" OR HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "TGZ") +if (HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "GIT" OR HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "TGZ") if (ZLIB_FOUND AND ZLIB_USE_EXTERNAL) ADD_DEPENDENCIES (${HDF5_LIB_TARGET} ZLIB) if (BUILD_SHARED_LIBS) diff --git a/config/cmake/cacheinit.cmake b/config/cmake/cacheinit.cmake index 98b55b6..d37c339 100644 --- a/config/cmake/cacheinit.cmake +++ b/config/cmake/cacheinit.cmake @@ -17,8 +17,6 @@ set (CMAKE_INSTALL_FRAMEWORK_PREFIX "Library/Frameworks" CACHE STRING "Frameworks installation directory" FORCE) -set (HDF5_GENERATE_HEADERS ON CACHE BOOL "Rebuild Generated Files" FORCE) - set (HDF_PACKAGE_EXT "" CACHE STRING "Name of HDF package extension" FORCE) set (HDF5_BUILD_FORTRAN ON CACHE BOOL "Build FORTRAN support" FORCE) @@ -31,46 +29,14 @@ set (HDF5_ENABLE_SZIP_SUPPORT ON CACHE BOOL "Use SZip Filter" FORCE) set (HDF5_ENABLE_SZIP_ENCODING ON CACHE BOOL "Use SZip Encoding" FORCE) -set (HDF5_ENABLE_HSIZET ON CACHE BOOL "Enable datasets larger than memory" FORCE) - -set (ALLOW_UNSUPPORTED OFF CACHE BOOL "Enable unsupported combinations of configuration options" FORCE) - -set (HDF5_ENABLE_DEPRECATED_SYMBOLS ON CACHE BOOL "Enable deprecated public API symbols" FORCE) - -set (HDF5_ENABLE_DIRECT_VFD OFF CACHE BOOL "Build the Direct I/O Virtual File Driver" FORCE) - -set (HDF5_ENABLE_PARALLEL OFF CACHE BOOL "Enable parallel build (requires MPI)" FORCE) - set (MPIEXEC_MAX_NUMPROCS "3" CACHE STRING "Minimum number of processes for HDF parallel tests" FORCE) -set (HDF5_BUILD_PARALLEL_ALL OFF CACHE BOOL "Build Parallel Programs" FORCE) - -set (HDF5_ENABLE_COVERAGE OFF CACHE BOOL "Enable code coverage for Libraries and Programs" FORCE) - -set (HDF5_ENABLE_USING_MEMCHECKER OFF CACHE BOOL "Indicate that a memory checker is used" FORCE) - -set (HDF5_MEMORY_ALLOC_SANITY_CHECK OFF CACHE BOOL "Indicate that internal memory allocation sanity checks are enabled" FORCE) - -set (HDF5_DISABLE_COMPILER_WARNINGS OFF CACHE BOOL "Disable compiler warnings" FORCE) - set (HDF5_ENABLE_ALL_WARNINGS ON CACHE BOOL "Enable all warnings" FORCE) -set (HDF5_USE_FOLDERS ON CACHE BOOL "Enable folder grouping of projects in IDEs." FORCE) - -set (HDF5_USE_16_API_DEFAULT OFF CACHE BOOL "Use the HDF5 1.6.x API by default" FORCE) - -set (HDF5_USE_18_API_DEFAULT OFF CACHE BOOL "Use the HDF5 1.8.x API by default" FORCE) - -set (HDF5_ENABLE_THREADSAFE OFF CACHE BOOL "(WINDOWS)Enable Threadsafety" FORCE) - set (HDF_TEST_EXPRESS "2" CACHE STRING "Control testing framework (0-3)" FORCE) -set (HDF5_PACKAGE_EXTLIBS OFF CACHE BOOL "(WINDOWS)CPACK - include external libraries" FORCE) - -set (HDF5_NO_PACKAGES OFF CACHE BOOL "CPACK - Disable packaging" FORCE) - -set (HDF5_ALLOW_EXTERNAL_SUPPORT "NO" CACHE STRING "Allow External Library Building (NO GIT SVN TGZ)" FORCE) -set_property (CACHE HDF5_ALLOW_EXTERNAL_SUPPORT PROPERTY STRINGS NO GIT SVN TGZ) +set (HDF5_ALLOW_EXTERNAL_SUPPORT "NO" CACHE STRING "Allow External Library Building (NO GIT TGZ)" FORCE) +set_property (CACHE HDF5_ALLOW_EXTERNAL_SUPPORT PROPERTY STRINGS NO GIT TGZ) set (ZLIB_TGZ_NAME "ZLib.tar.gz" CACHE STRING "Use ZLib from compressed file" FORCE) diff --git a/config/cmake/mccacheinit.cmake b/config/cmake/mccacheinit.cmake index 3f0dd4f..577144b 100644 --- a/config/cmake/mccacheinit.cmake +++ b/config/cmake/mccacheinit.cmake @@ -33,50 +33,20 @@ set (HDF5_BUILD_HL_LIB ON CACHE BOOL "Build HIGH Level HDF5 Library" FORCE) set (HDF5_BUILD_TOOLS ON CACHE BOOL "Build HDF5 Tools" FORCE) -set (HDF5_BUILD_GENERATORS OFF CACHE BOOL "Build Test Generators" FORCE) - set (HDF5_ENABLE_Z_LIB_SUPPORT ON CACHE BOOL "Enable Zlib Filters" FORCE) set (HDF5_ENABLE_SZIP_SUPPORT ON CACHE BOOL "Use SZip Filter" FORCE) set (HDF5_ENABLE_SZIP_ENCODING ON CACHE BOOL "Use SZip Encoding" FORCE) -set (HDF5_ENABLE_HSIZET ON CACHE BOOL "Enable datasets larger than memory" FORCE) - -set (ALLOW_UNSUPPORTED OFF CACHE BOOL "Enable unsupported combinations of configuration options" FORCE) - -set (HDF5_ENABLE_DEPRECATED_SYMBOLS ON CACHE BOOL "Enable deprecated public API symbols" FORCE) - -set (HDF5_ENABLE_DIRECT_VFD OFF CACHE BOOL "Build the Direct I/O Virtual File Driver" FORCE) - -set (HDF5_ENABLE_PARALLEL OFF CACHE BOOL "Enable parallel build (requires MPI)" FORCE) - set (MPIEXEC_MAX_NUMPROCS "3" CACHE STRING "Minimum number of processes for HDF parallel tests" FORCE) -set (HDF5_BUILD_PARALLEL_ALL OFF CACHE BOOL "Build Parallel Programs" FORCE) - -set (HDF5_ENABLE_COVERAGE OFF CACHE BOOL "Enable code coverage for Libraries and Programs" FORCE) - set (HDF5_ENABLE_USING_MEMCHECKER ON CACHE BOOL "Indicate that a memory checker is used" FORCE) -set (HDF5_MEMORY_ALLOC_SANITY_CHECK OFF CACHE BOOL "Indicate that internal memory allocation sanity checks are enabled" FORCE) - -set (HDF5_DISABLE_COMPILER_WARNINGS OFF CACHE BOOL "Disable compiler warnings" FORCE) - -set (HDF5_USE_FOLDERS ON CACHE BOOL "Enable folder grouping of projects in IDEs." FORCE) - -set (HDF5_USE_16_API_DEFAULT OFF CACHE BOOL "Use the HDF5 1.6.x API by default" FORCE) - -set (HDF5_USE_18_API_DEFAULT OFF CACHE BOOL "Use the HDF5 1.8.x API by default" FORCE) - -set (HDF5_ENABLE_THREADSAFE OFF CACHE BOOL "(WINDOWS)Enable Threadsafety" FORCE) - -set (HDF5_PACKAGE_EXTLIBS OFF CACHE BOOL "(WINDOWS)CPACK - include external libraries" FORCE) - set (HDF5_NO_PACKAGES ON CACHE BOOL "CPACK - Disable packaging" FORCE) -set (HDF5_ALLOW_EXTERNAL_SUPPORT "NO" CACHE STRING "Allow External Library Building (NO GIT SVN TGZ)" FORCE) -set_property (CACHE HDF5_ALLOW_EXTERNAL_SUPPORT PROPERTY STRINGS NO GIT SVN TGZ) +set (HDF5_ALLOW_EXTERNAL_SUPPORT "NO" CACHE STRING "Allow External Library Building (NO GIT TGZ)" FORCE) +set_property (CACHE HDF5_ALLOW_EXTERNAL_SUPPORT PROPERTY STRINGS NO GIT TGZ) set (ZLIB_TGZ_NAME "ZLib.tar.gz" CACHE STRING "Use ZLib from compressed file" FORCE) diff --git a/release_docs/INSTALL_CMake.txt b/release_docs/INSTALL_CMake.txt index f15e94e..f36c29d 100644 --- a/release_docs/INSTALL_CMake.txt +++ b/release_docs/INSTALL_CMake.txt @@ -261,7 +261,7 @@ IV. Further considerations -DSZIP_INCLUDE_DIR:PATH=some_location/include where "some_location" is the full path to the extlibs folder. - B. Use source packages from an SVN server by adding the following CMake + B. Use source packages from an GIT server by adding the following CMake options: HDF5_ALLOW_EXTERNAL_SUPPORT:STRING="GIT" ZLIB_GIT_URL:STRING="http://some_location/zlib" @@ -397,32 +397,16 @@ These five steps are described in detail below. ######################## set (CMAKE_INSTALL_FRAMEWORK_PREFIX "Library/Frameworks" CACHE STRING "Frameworks installation directory" FORCE) set (HDF_PACKAGE_EXT "" CACHE STRING "Name of HDF package extension" FORCE) + set (HDF5_GENERATE_HEADERS ON CACHE BOOL "Rebuild Generated Files" FORCE) set (HDF5_BUILD_FORTRAN ON CACHE BOOL "Build FORTRAN support" FORCE) - set (HDF5_BUILD_GENERATORS OFF CACHE BOOL "Build Test Generators" FORCE) set (HDF5_ENABLE_Z_LIB_SUPPORT ON CACHE BOOL "Enable Zlib Filters" FORCE) set (HDF5_ENABLE_SZIP_SUPPORT ON CACHE BOOL "Use SZip Filter" FORCE) set (HDF5_ENABLE_SZIP_ENCODING ON CACHE BOOL "Use SZip Encoding" FORCE) - set (HDF5_ENABLE_HSIZET ON CACHE BOOL "Enable datasets larger than memory" FORCE) - set (ALLOW_UNSUPPORTED OFF CACHE BOOL "Enable unsupported combinations of configuration options" FORCE) - set (HDF5_ENABLE_DEPRECATED_SYMBOLS ON CACHE BOOL "Enable deprecated public API symbols" FORCE) - set (HDF5_ENABLE_DIRECT_VFD OFF CACHE BOOL "Build the Direct I/O Virtual File Driver" FORCE) - set (HDF5_ENABLE_PARALLEL OFF CACHE BOOL "Enable parallel build (requires MPI)" FORCE) set (MPIEXEC_MAX_NUMPROCS "3" CACHE STRING "Minimum number of processes for HDF parallel tests" FORCE) - set (HDF5_BUILD_PARALLEL_ALL OFF CACHE BOOL "Build Parallel Programs" FORCE) - set (HDF5_ENABLE_COVERAGE OFF CACHE BOOL "Enable code coverage for Libraries and Programs" FORCE) - set (HDF5_ENABLE_USING_MEMCHECKER OFF CACHE BOOL "Indicate that a memory checker is used" FORCE) - set (HDF5_MEMORY_ALLOC_SANITY_CHECK OFF CACHE BOOL "Indicate that internal memory allocation sanity checks are enabled" FORCE) - set (HDF5_DISABLE_COMPILER_WARNINGS OFF CACHE BOOL "Disable compiler warnings" FORCE) set (HDF5_ENABLE_ALL_WARNINGS ON CACHE BOOL "Enable all warnings" FORCE) - set (HDF5_USE_FOLDERS ON CACHE BOOL "Enable folder grouping of projects in IDEs." FORCE) - set (HDF5_USE_16_API_DEFAULT OFF CACHE BOOL "Use the HDF5 1.6.x API by default" FORCE) - set (HDF5_USE_18_API_DEFAULT OFF CACHE BOOL "Use the HDF5 1.8.x API by default" FORCE) - set (HDF5_ENABLE_THREADSAFE OFF CACHE BOOL "(WINDOWS)Enable Threadsafety" FORCE) set (HDF_TEST_EXPRESS "2" CACHE STRING "Control testing framework (0-3)" FORCE) - set (HDF5_PACKAGE_EXTLIBS OFF CACHE BOOL "(WINDOWS)CPACK - include external libraries" FORCE) - set (HDF5_NO_PACKAGES OFF CACHE BOOL "CPACK - Disable packaging" FORCE) - set (HDF5_ALLOW_EXTERNAL_SUPPORT "NO" CACHE STRING "Allow External Library Building (NO GIT SVN TGZ)" FORCE) - set_property (CACHE HDF5_ALLOW_EXTERNAL_SUPPORT PROPERTY STRINGS NO GIT SVN TGZ) + set (HDF5_ALLOW_EXTERNAL_SUPPORT "NO" CACHE STRING "Allow External Library Building (NO GIT TGZ)" FORCE) + set_property (CACHE HDF5_ALLOW_EXTERNAL_SUPPORT PROPERTY STRINGS NO GIT TGZ) set (ZLIB_TGZ_NAME "ZLib.tar.gz" CACHE STRING "Use ZLib from compressed file" FORCE) set (SZIP_TGZ_NAME "SZip.tar.gz" CACHE STRING "Use SZip from compressed file" FORCE) set (ZLIB_PACKAGE_NAME "zlib" CACHE STRING "Name of ZLIB package" FORCE) @@ -579,6 +563,7 @@ HDF5_BUILD_TOOLS "Build HDF5 Tools" ON ---------------- HDF5 Advanced Options --------------------- ALLOW_UNSUPPORTED "Allow unsupported combinations of configure options" OFF HDF5_DISABLE_COMPILER_WARNINGS "Disable compiler warnings" OFF +HDF5_ENABLE_ALL_WARNINGS "Enable all warnings" OFF HDF5_ENABLE_INSTRUMENT "Instrument The library" OFF HDF5_ENABLE_CODESTACK "Enable the function stack tracing (for developer debugging)." OFF HDF5_ENABLE_COVERAGE "Enable code coverage for Libraries and Programs" OFF @@ -591,7 +576,8 @@ HDF5_ENABLE_LARGE_FILE "Enable support for large (64-bit) files on Linux HDF5_ENABLE_PARALLEL "Enable parallel build (requires MPI)" OFF HDF5_ENABLE_TRACE "Enable API tracing capability" OFF HDF5_ENABLE_USING_MEMCHECKER "Indicate that a memory checker is used" OFF -HDF5_GENERATE_HEADERS "Rebuild Generated Files" OFF +HDF5_GENERATE_HEADERS "Rebuild Generated Files" ON +HDF5_BUILD_GENERATORS "Build Test Generators" OFF HDF5_JAVA_PACK_JRE "Package a JRE installer directory" OFF HDF5_MEMORY_ALLOC_SANITY_CHECK "Indicate that internal memory allocation sanity checks are enabled" OFF HDF5_METADATA_TRACE_FILE "Enable metadata trace file collection" OFF @@ -604,7 +590,7 @@ HDF_TEST_EXPRESS "Control testing framework (0-3)" HDF5_TEST_VFD "Execute tests with different VFDs" OFF HDF5_USE_16_API_DEFAULT "Use the HDF5 1.6.x API by default" OFF HDF5_USE_18_API_DEFAULT "Use the HDF5 1.8.x API by default" OFF -HDF5_USE_FOLDERS "Enable folder grouping of projects in IDEs." OFF +HDF5_USE_FOLDERS "Enable folder grouping of projects in IDEs." ON HDF5_WANT_DATA_ACCURACY "IF data accuracy is guaranteed during data conversions" ON HDF5_WANT_DCONV_EXCEPTION "exception handling functions is checked during data conversions" ON HDF5_ENABLE_THREADSAFE "Enable Threadsafety" OFF @@ -685,7 +671,7 @@ cmake_minimum_required (VERSION 3.2.2 FATAL_ERROR) # NO_MAC_FORTRAN - Yes to be SHARED on a Mac ############################################################################## -set (CTEST_SOURCE_VERSION 1.10.1) +set (CTEST_SOURCE_VERSION 1.10.2) set (CTEST_SOURCE_VERSEXT "") ############################################################################## -- cgit v0.12 From 478db1140635fd6250380c23d90cd4063dcad585 Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Tue, 19 Sep 2017 11:42:38 -0500 Subject: Restore previous --- src/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index e2acd30..178c954 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -816,7 +816,7 @@ set (H5_GENERATED_HEADERS ${HDF5_SRC_DIR}/H5overflow.h ) -option (HDF5_GENERATE_HEADERS "Rebuild Generated Files" OFF) +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) -- cgit v0.12 From b8039b3e00c7da44c746a683b7f357a578670aa8 Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Tue, 19 Sep 2017 12:39:18 -0500 Subject: Fix find package process --- config/cmake/hdf5-config.cmake.in | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/config/cmake/hdf5-config.cmake.in b/config/cmake/hdf5-config.cmake.in index 904c083..712dc05 100644 --- a/config/cmake/hdf5-config.cmake.in +++ b/config/cmake/hdf5-config.cmake.in @@ -158,9 +158,17 @@ foreach (libtype IN LISTS ${HDF5_PACKAGE_NAME}_LIB_TYPE) set (hdf5_comp2 "hdf5_hl_f90cstub") set (hdf5_comp "hdf5_hl_fortran") endif () - list (FIND ${HDF5_PACKAGE_NAME}_EXPORT_LIBRARIES "${hdf5_comp}-${libtype}" HAVE_COMP) + if (${comp} STREQUAL "Java") + list (FIND ${HDF5_PACKAGE_NAME}_EXPORT_LIBRARIES "${hdf5_comp}" HAVE_COMP) + else () + list (FIND ${HDF5_PACKAGE_NAME}_EXPORT_LIBRARIES "${hdf5_comp}-${libtype}" HAVE_COMP) + endif () if (${HAVE_COMP} LESS 0) - set (${HDF5_PACKAGE_NAME}_${libtype}_${comp}_FOUND 0) + if (${comp} STREQUAL "Java") + set (${HDF5_PACKAGE_NAME}_${comp}_FOUND 0) + else () + set (${HDF5_PACKAGE_NAME}_${libtype}_${comp}_FOUND 0) + endif () else () if (hdf5_comp2) list (FIND ${HDF5_PACKAGE_NAME}_EXPORT_LIBRARIES "${hdf5_comp2}-${libtype}" HAVE_COMP2) @@ -171,6 +179,10 @@ foreach (libtype IN LISTS ${HDF5_PACKAGE_NAME}_LIB_TYPE) string(TOUPPER ${HDF5_PACKAGE_NAME}_${comp}_${libtype}_LIBRARY COMP_LIBRARY) set (${COMP_LIBRARY} ${${COMP_LIBRARY}} @HDF5_PACKAGE@::${hdf5_comp2}-${libtype} @HDF5_PACKAGE@::${hdf5_comp}-${libtype}) endif () + elseif (${comp} STREQUAL "Java") + set (${HDF5_PACKAGE_NAME}_${comp}_FOUND 1) + string(TOUPPER ${HDF5_PACKAGE_NAME}_${comp}_LIBRARY COMP_LIBRARY) + set (${COMP_LIBRARY} ${${COMP_LIBRARY}} hdf5::${hdf5_comp}) else () set (${HDF5_PACKAGE_NAME}_${libtype}_${comp}_FOUND 1) string(TOUPPER ${HDF5_PACKAGE_NAME}_${comp}_${libtype}_LIBRARY COMP_LIBRARY) -- cgit v0.12 From 2822d9c9fb6c13dccdc6e391aebc249db08ca523 Mon Sep 17 00:00:00 2001 From: Richard Warren Date: Wed, 20 Sep 2017 10:54:47 -0400 Subject: Merge candidate for the 1_10 branch --- src/H5Smpio.c | 504 ++++++++++++++++++++++++++++++++++++++++++++----- src/H5Sprivate.h | 1 + testpar/CMakeLists.txt | 1 + testpar/Makefile.am | 2 +- 4 files changed, 461 insertions(+), 47 deletions(-) diff --git a/src/H5Smpio.c b/src/H5Smpio.c index c24c455..46f7a59 100644 --- a/src/H5Smpio.c +++ b/src/H5Smpio.c @@ -33,7 +33,7 @@ #include "H5Oprivate.h" /* Object headers */ #include "H5Pprivate.h" /* Property lists */ #include "H5Spkg.h" /* Dataspaces */ -#include "H5VMprivate.h" /* Vector and array functions */ +#include "H5VMprivate.h" /* Vector and array functions */ #ifdef H5_HAVE_PARALLEL @@ -55,9 +55,42 @@ static herr_t H5S_mpio_span_hyper_type(const H5S_t *space, size_t elmt_size, MPI_Datatype *new_type, int *count, hbool_t *is_derived_type); static herr_t H5S_obtain_datatype(const hsize_t down[], H5S_hyper_span_t* span, const MPI_Datatype *elmt_type, MPI_Datatype *span_type, size_t elmt_size); +static herr_t H5S_mpio_create_large_type (hsize_t, MPI_Aint, MPI_Datatype , MPI_Datatype *); + #define H5S_MPIO_INITIAL_ALLOC_COUNT 256 +#define TWO_GIG_LIMIT 2147483648 + +#ifndef H5S_MAX_MPI_COUNT +#define H5S_MAX_MPI_COUNT 536870911 /* (2^29)-1 */ +#endif + +static hsize_t bigio_count = H5S_MAX_MPI_COUNT; + +/*------------------------------------------------------------------------- + * Function: H5S_mpio_set_bigio_count + * + * Purpose: Allow us to programatically change the switch point + * when we utilize derived datatypes. This is of + * particular interest for allowing nightly testing + * + * Return: the current/previous value of bigio_count. + * + * Programmer: Richard Warren, March 10, 2017 + * + *------------------------------------------------------------------------- + */ +hsize_t +H5S_mpio_set_bigio_count(hsize_t new_count) +{ + hsize_t orig_count = bigio_count; + if ((new_count > 0) && (new_count < TWO_GIG_LIMIT)) { + bigio_count = new_count; + } + return orig_count; +} + /*------------------------------------------------------------------------- * Function: H5S_mpio_all_type @@ -72,6 +105,11 @@ static herr_t H5S_obtain_datatype(const hsize_t down[], H5S_hyper_span_t* span, * *is_derived_type 0 if MPI primitive type, 1 if derived * * Programmer: rky 980813 + * Modifications: + * Mohamad Chaarawi + * Adding support for large datatypes (beyond the limit of a + * 32 bit integer. + * * *------------------------------------------------------------------------- */ @@ -95,11 +133,22 @@ H5S_mpio_all_type(const H5S_t *space, size_t elmt_size, H5_CHECKED_ASSIGN(nelmts, hsize_t, snelmts, hssize_t); total_bytes = (hsize_t)elmt_size * nelmts; - - /* fill in the return values */ - *new_type = MPI_BYTE; - H5_CHECKED_ASSIGN(*count, int, total_bytes, hsize_t); - *is_derived_type = FALSE; + /* Verify that the size can be expressed as a 32 bit integer */ + if(bigio_count >= total_bytes) { + /* fill in the return values */ + *new_type = MPI_BYTE; + H5_CHECKED_ASSIGN(*count, int, total_bytes, hsize_t); + *is_derived_type = FALSE; + } + else { + /* Create a LARGE derived datatype for this transfer */ + if (H5S_mpio_create_large_type (total_bytes, 0, MPI_BYTE, new_type) < 0) { + HGOTO_ERROR(H5E_DATASPACE, H5E_BADTYPE, FAIL, + "couldn't create a large datatype from the all selection") + } + *count = 1; + *is_derived_type = TRUE; + } done: FUNC_LEAVE_NOAPI(ret_value) @@ -167,27 +216,103 @@ H5S_mpio_create_point_datatype (size_t elmt_size, hsize_t num_points, HMPI_GOTO_ERROR(FAIL, "MPI_Type_contiguous failed", mpi_code) elmt_type_created = TRUE; + /* Check whether standard or BIGIO processing will be employeed */ + if(bigio_count >= num_points) { #if MPI_VERSION >= 3 - /* Create an MPI datatype for the whole point selection */ - if(MPI_SUCCESS != (mpi_code = MPI_Type_create_hindexed_block((int)num_points, 1, disp, elmt_type, new_type))) - HMPI_GOTO_ERROR(FAIL, "MPI_Type_create_indexed_block failed", mpi_code) + /* Create an MPI datatype for the whole point selection */ + if(MPI_SUCCESS != (mpi_code = MPI_Type_create_hindexed_block((int)num_points, 1, disp, elmt_type, new_type))) + HMPI_GOTO_ERROR(FAIL, "MPI_Type_create_indexed_block failed", mpi_code) #else - /* Allocate block sizes for MPI datatype call */ - if(NULL == (blocks = (int *)H5MM_malloc(sizeof(int) * num_points))) - HGOTO_ERROR(H5E_DATASPACE, H5E_CANTALLOC, FAIL, "can't allocate array of blocks") + /* Allocate block sizes for MPI datatype call */ + if(NULL == (blocks = (int *)H5MM_malloc(sizeof(int) * num_points))) + HGOTO_ERROR(H5E_DATASPACE, H5E_CANTALLOC, FAIL, "can't allocate array of blocks") - for(u = 0; u < num_points; u++) - blocks[u] = 1; + for(u = 0; u < num_points; u++) + blocks[u] = 1; - /* Create an MPI datatype for the whole point selection */ - if(MPI_SUCCESS != (mpi_code = MPI_Type_create_hindexed((int)num_points, blocks, disp, elmt_type, new_type))) - HMPI_GOTO_ERROR(FAIL, "MPI_Type_create_indexed_block failed", mpi_code) + /* Create an MPI datatype for the whole point selection */ + if(MPI_SUCCESS != (mpi_code = MPI_Type_create_hindexed((int)num_points, blocks, disp, elmt_type, new_type))) + HMPI_GOTO_ERROR(FAIL, "MPI_Type_create_hindexed failed", mpi_code) #endif - /* Commit MPI datatype for later use */ - if(MPI_SUCCESS != (mpi_code = MPI_Type_commit(new_type))) - HMPI_GOTO_ERROR(FAIL, "MPI_Type_commit failed", mpi_code) + /* Commit MPI datatype for later use */ + if(MPI_SUCCESS != (mpi_code = MPI_Type_commit(new_type))) + HMPI_GOTO_ERROR(FAIL, "MPI_Type_commit failed", mpi_code) + } + else { + /* use LARGE_DATATYPE:: + * We'll create an hindexed_block type for every 2G point count and then combine + * those and any remaining points into a single large datatype. + */ + int total_types, i; + int remaining_points; + int num_big_types; + hsize_t leftover; + + int *inner_blocks; + MPI_Aint *inner_disps; + MPI_Datatype *inner_types = NULL; + + /* Calculate how many Big MPI datatypes are needed to represent the buffer */ + num_big_types = (int)(num_points/bigio_count); + + leftover = (hsize_t)num_points - (hsize_t)num_big_types * (hsize_t)bigio_count; + H5_CHECKED_ASSIGN(remaining_points, int, leftover, hsize_t); + + total_types = (int)(remaining_points) ? (num_big_types + 1) : num_big_types; + + /* Allocate array if MPI derived types needed */ + if(NULL == (inner_types = (MPI_Datatype *)H5MM_malloc((sizeof(MPI_Datatype) * (size_t)total_types)))) + HGOTO_ERROR(H5E_DATASPACE, H5E_CANTALLOC, FAIL, "can't allocate array of blocks") + + if(NULL == (inner_blocks = (int *)H5MM_malloc(sizeof(int) * (size_t)total_types))) + HGOTO_ERROR(H5E_DATASPACE, H5E_CANTALLOC, FAIL, "can't allocate array of blocks") + + if(NULL == (inner_disps = (MPI_Aint *)H5MM_malloc(sizeof(MPI_Aint) * (size_t)total_types))) + HGOTO_ERROR(H5E_DATASPACE, H5E_CANTALLOC, FAIL, "can't allocate array of blocks") + + for(i=0 ; i= elmt_size) { + /* Use a single MPI datatype that has a 32 bit size */ + if(MPI_SUCCESS != (mpi_code = MPI_Type_contiguous((int)elmt_size, MPI_BYTE, &inner_type))) HMPI_GOTO_ERROR(FAIL, "MPI_Type_contiguous failed", mpi_code) + } + else { + /* Create the compound datatype for this operation (> 2GB) */ + if (H5S_mpio_create_large_type (elmt_size, 0, MPI_BYTE, &inner_type) < 0) { + HGOTO_ERROR(H5E_DATASPACE, H5E_BADTYPE, FAIL, + "couldn't ccreate a large inner datatype in hyper selection") + } + } /******************************************************* * Construct the type by walking the hyperslab dims @@ -645,30 +790,93 @@ H5S_mpio_hyper_type(const H5S_t *space, size_t elmt_size, *******************************************************/ for(i = ((int)rank) - 1; i >= 0; --i) { #ifdef H5S_DEBUG - 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", - FUNC, i, d[i].start, d[i].count, d[i].block, d[i].strid, d[i].xtent, max_xtent[i]); + 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", + FUNC, i, d[i].start, d[i].count, d[i].block, d[i].strid, d[i].xtent, max_xtent[i]); #endif #ifdef H5S_DEBUG - if(H5DEBUG(S)) - HDfprintf(H5DEBUG(S), "%s: i=%d Making vector-type \n", FUNC,i); + if(H5DEBUG(S)) + HDfprintf(H5DEBUG(S), "%s: i=%d Making vector-type \n", FUNC,i); #endif /**************************************** * Build vector type of the selection. ****************************************/ - mpi_code = MPI_Type_vector((int)(d[i].count), /* count */ - (int)(d[i].block), /* blocklength */ - (int)(d[i].strid), /* stride */ - inner_type, /* old type */ - &outer_type); /* new type */ + if (bigio_count >= d[i].count && + bigio_count >= d[i].block && + bigio_count >= d[i].strid) { + + /* All the parameters fit into 32 bit integers so create the vector type normally */ + mpi_code = MPI_Type_vector((int)(d[i].count), /* count */ + (int)(d[i].block), /* blocklength */ + (int)(d[i].strid), /* stride */ + inner_type, /* old type */ + &outer_type); /* new type */ + + MPI_Type_free(&inner_type); + if(mpi_code != MPI_SUCCESS) + HMPI_GOTO_ERROR(FAIL, "couldn't create MPI vector type", mpi_code) + } + else { + /* Things get a bit more complicated and require LARGE_DATATYPE processing + * There are two MPI datatypes that need to be created: + * 1) an internal contiguous block; and + * 2) a collection of elements where an element is a contiguous block(1). + * Remember that the input arguments to the MPI-IO functions use integer + * values to represent element counts. We ARE allowed however, in the + * more recent MPI implementations to use constructed datatypes whereby + * the total number of bytes in a transfer could be : + * (2GB-1)number_of_blocks * the_datatype_extent. + */ + + MPI_Aint stride_in_bytes, inner_extent; + MPI_Datatype block_type; + + /* create a contiguous datatype inner_type x number of BLOCKS. + * Again we need to check that the number of BLOCKS can fit into + * a 32 bit integer */ + if (bigio_count < d[i].block) { + if (H5S_mpio_create_large_type(d[i].block, 0, inner_type, + &block_type) < 0) { + HGOTO_ERROR(H5E_DATASPACE, H5E_BADTYPE, FAIL, + "couldn't ccreate a large block datatype in hyper selection") + } + } + else { + if(MPI_SUCCESS != (mpi_code = MPI_Type_contiguous((int)d[i].block, + inner_type, + &block_type))) + HMPI_GOTO_ERROR(FAIL, "MPI_Type_contiguous failed", mpi_code) + } - MPI_Type_free(&inner_type); - if(mpi_code != MPI_SUCCESS) - HMPI_GOTO_ERROR(FAIL, "couldn't create MPI vector type", mpi_code) + MPI_Type_extent (inner_type, &inner_extent); + stride_in_bytes = inner_extent * (MPI_Aint)d[i].strid; - /**************************************** + /* If the element count is larger than what a 32 bit integer can hold, + * we call the large type creation function to handle that + */ + if (bigio_count < d[i].count) { + if (H5S_mpio_create_large_type (d[i].count, stride_in_bytes, block_type, + &outer_type) < 0) { + HGOTO_ERROR(H5E_DATASPACE, H5E_BADTYPE, FAIL, + "couldn't create a large outer datatype in hyper selection") + } + } + /* otherwise a regular create_hvector will do */ + else { + mpi_code = MPI_Type_create_hvector((int)d[i].count, /* count */ + 1, /* blocklength */ + stride_in_bytes, /* stride in bytes*/ + block_type, /* old type */ + &outer_type); /* new type */ + if(MPI_SUCCESS != mpi_code) + HMPI_GOTO_ERROR(FAIL, "MPI_Type_create_hvector failed", mpi_code) + } + MPI_Type_free(&block_type); + MPI_Type_free(&inner_type); + } + /**************************************** * Then build the dimension type as (start, vector type, xtent). ****************************************/ /* calculate start and extent values of this dimension */ @@ -752,6 +960,10 @@ done: * * Programmer: kyang * + * Modifications: + * Mohamad Chaarawi + * Adding support for large datatypes (beyond the limit of a + * 32 bit integer. *------------------------------------------------------------------------- */ static herr_t @@ -774,8 +986,17 @@ H5S_mpio_span_hyper_type(const H5S_t *space, size_t elmt_size, HDassert(space->select.sel_info.hslab->span_lst->head); /* Create the base type for an element */ - if(MPI_SUCCESS != (mpi_code = MPI_Type_contiguous((int)elmt_size, MPI_BYTE, &elmt_type))) - HMPI_GOTO_ERROR(FAIL, "MPI_Type_contiguous failed", mpi_code) + if (bigio_count >= elmt_size) { + if(MPI_SUCCESS != (mpi_code = MPI_Type_contiguous((int)elmt_size, MPI_BYTE, &elmt_type))) { + HMPI_GOTO_ERROR(FAIL, "MPI_Type_contiguous failed", mpi_code) + } + } + else { + if (H5S_mpio_create_large_type (elmt_size, 0, MPI_BYTE, &elmt_type) < 0) { + HGOTO_ERROR(H5E_DATASPACE, H5E_BADTYPE, FAIL, + "couldn't create a large element datatype in span_hyper selection") + } + } elmt_type_is_derived = TRUE; /* Compute 'down' sizes for each dimension */ @@ -821,14 +1042,15 @@ static herr_t H5S_obtain_datatype(const hsize_t *down, H5S_hyper_span_t *span, const MPI_Datatype *elmt_type, MPI_Datatype *span_type, size_t elmt_size) { - size_t alloc_count; /* Number of span tree nodes allocated at this level */ - size_t outercount; /* Number of span tree nodes at this level */ + size_t alloc_count = 0; /* Number of span tree nodes allocated at this level */ + size_t outercount = 0; /* Number of span tree nodes at this level */ MPI_Datatype *inner_type = NULL; hbool_t inner_types_freed = FALSE; /* Whether the inner_type MPI datatypes have been freed */ hbool_t span_type_valid = FALSE; /* Whether the span_type MPI datatypes is valid */ + hbool_t large_block = FALSE; /* Wether the block length is larger than 32 bit integer */ int *blocklen = NULL; MPI_Aint *disp = NULL; - H5S_hyper_span_t *tspan; /* Temporary pointer to span tree node */ + H5S_hyper_span_t *tspan = NULL; /* Temporary pointer to span tree node */ int mpi_code; /* MPI return status code */ herr_t ret_value = SUCCEED; /* Return value */ @@ -870,14 +1092,70 @@ H5S_obtain_datatype(const hsize_t *down, H5S_hyper_span_t *span, disp[outercount] = (MPI_Aint)elmt_size * tspan->low; H5_CHECK_OVERFLOW(tspan->nelem, hsize_t, int) blocklen[outercount] = (int)tspan->nelem; - tspan = tspan->next; + + if (bigio_count < blocklen[outercount]) { + large_block = TRUE; /* at least one block type is large, so set this flag to true */ + } + outercount++; } /* end while */ - if(MPI_SUCCESS != (mpi_code = MPI_Type_create_hindexed((int)outercount, blocklen, disp, *elmt_type, span_type))) - HMPI_GOTO_ERROR(FAIL, "MPI_Type_create_hindexed failed", mpi_code) - span_type_valid = TRUE; + /* Everything fits into integers, so cast them and use hindexed */ + if (bigio_count >= outercount && large_block == FALSE) { + + if(MPI_SUCCESS != (mpi_code = MPI_Type_create_hindexed((int)outercount, blocklen, disp, *elmt_type, span_type))) + HMPI_GOTO_ERROR(FAIL, "MPI_Type_create_hindexed failed", mpi_code) + span_type_valid = TRUE; + } + else { /* LARGE_DATATYPE:: Something doesn't fit into a 32 bit integer */ + size_t i; + + for (i=0 ; i bigio_count) { + if (H5S_mpio_create_large_type (blocklen[i], 0, *elmt_type, &temp_type) < 0) { + HGOTO_ERROR(H5E_DATASPACE, H5E_BADTYPE, FAIL, + "couldn't create a large element datatype in span_hyper selection") + } + } + else { + if(MPI_SUCCESS != (mpi_code = MPI_Type_contiguous((int)blocklen[i], + *elmt_type, + &temp_type))) + HMPI_GOTO_ERROR(FAIL, "MPI_Type_contiguous failed", mpi_code) + } + + /* combine the current datatype that is created with this current block type */ + if (0 == i) { /* first iteration, there is no combined datatype yet */ + *span_type = temp_type; + } + else { + int bl[2] = {1,1}; + MPI_Aint ds[2] = {disp[i-1],disp[i]}; + MPI_Datatype dt[2] = {*span_type, temp_type}; + + if (MPI_SUCCESS != (mpi_code = MPI_Type_create_struct (2, /* count */ + bl, /* blocklength */ + ds, /* stride in bytes*/ + dt, /* old type */ + &outer_type))){ /* new type */ + HMPI_GOTO_ERROR(FAIL, "MPI_Type_create_struct failed", mpi_code) + } + *span_type = outer_type; + } + + if (outer_type != MPI_DATATYPE_NULL) + MPI_Type_free(&outer_type); + /* temp_type shouldn't be freed here... + * Note that we have simply copied it above (not MPI_Type_dup) + * into the 'span_type' argument of the caller. + * The caller needs to deal with it there! + */ + } + } /* end (LARGE_DATATYPE::) */ + } /* end if */ else { size_t u; /* Local index variable */ @@ -1091,5 +1369,139 @@ H5S_mpio_space_type(const H5S_t *space, size_t elmt_size, MPI_Datatype *new_type done: FUNC_LEAVE_NOAPI(ret_value) } /* end H5S_mpio_space_type() */ + + +/*------------------------------------------------------------------------- + * Function: H5S_mpio_create_large_type + * + * Purpose: Create a large datatype of size larger than what a 32 bit integer + * can hold. + * + * Return: non-negative on success, negative on failure. + * + * *new_type the new datatype created + * + * Programmer: Mohamad Chaarawi + * + *------------------------------------------------------------------------- + */ +static herr_t H5S_mpio_create_large_type (hsize_t num_elements, + MPI_Aint stride_bytes, + MPI_Datatype old_type, + MPI_Datatype *new_type) +{ + int num_big_types; /* num times the 2G datatype will be repeated */ + int remaining_bytes; /* the number of bytes left that can be held in an int value */ + hsize_t leftover; + int block_len[2]; + int mpi_code; /* MPI return code */ + MPI_Datatype inner_type, outer_type, leftover_type, type[2]; + MPI_Aint disp[2], old_extent; + herr_t ret_value = SUCCEED; /* Return value */ + + FUNC_ENTER_NOAPI_NOINIT + + /* Calculate how many Big MPI datatypes are needed to represent the buffer */ + num_big_types = (int)(num_elements/bigio_count); + leftover = num_elements - num_big_types * (hsize_t)bigio_count; + H5_CHECKED_ASSIGN(remaining_bytes, int, leftover, hsize_t); + + /* Create a contiguous datatype of size equal to the largest + * number that a 32 bit integer can hold x size of old type. + * If the displacement is 0, then the type is contiguous, otherwise + * use type_hvector to create the type with the displacement provided + */ + if (0 == stride_bytes) { + if(MPI_SUCCESS != (mpi_code = MPI_Type_contiguous(bigio_count, + old_type, + &inner_type))) { + HMPI_GOTO_ERROR(FAIL, "MPI_Type_contiguous failed", mpi_code) + } + } + else { + if(MPI_SUCCESS != (mpi_code = MPI_Type_create_hvector (bigio_count, + 1, + stride_bytes, + old_type, + &inner_type))) { + HMPI_GOTO_ERROR(FAIL, "MPI_Type_create_hvector failed", mpi_code) + } + } + + /* Create a contiguous datatype of the buffer (minus the remaining < 2GB part) + * If a stride is present, use hvector type + */ + if (0 == stride_bytes) { + if(MPI_SUCCESS != (mpi_code = MPI_Type_contiguous(num_big_types, + inner_type, + &outer_type))) { + HMPI_GOTO_ERROR(FAIL, "MPI_Type_contiguous failed", mpi_code) + } + } + else { + if(MPI_SUCCESS != (mpi_code = MPI_Type_create_hvector (num_big_types, + 1, + stride_bytes, + inner_type, + &outer_type))) { + HMPI_GOTO_ERROR(FAIL, "MPI_Type_create_hvector failed", mpi_code) + } + } + + MPI_Type_free(&inner_type); + + /* If there is a remaining part create a contiguous/vector datatype and then + * use a struct datatype to encapsulate everything. + */ + if(remaining_bytes) { + if (stride_bytes == 0) { + if(MPI_SUCCESS != (mpi_code = MPI_Type_contiguous (remaining_bytes, + old_type, + &leftover_type))) { + HMPI_GOTO_ERROR(FAIL, "MPI_Type_contiguous failed", mpi_code) + } + } + else { + if(MPI_SUCCESS != (mpi_code = MPI_Type_create_hvector + ((int)(num_elements - (hsize_t)num_big_types*bigio_count), + 1, + stride_bytes, + old_type, + &leftover_type))) { + HMPI_GOTO_ERROR(FAIL, "MPI_Type_create_hvector failed", mpi_code) + } + } + + MPI_Type_extent (old_type, &old_extent); + + /* Set up the arguments for MPI_Type_struct constructor */ + type[0] = outer_type; + type[1] = leftover_type; + block_len[0] = 1; + block_len[1] = 1; + disp[0] = 0; + disp[1] = (old_extent+stride_bytes)*num_big_types*(MPI_Aint)bigio_count; + + if(MPI_SUCCESS != (mpi_code = + MPI_Type_create_struct(2, block_len, disp, type, new_type))) { + HMPI_GOTO_ERROR(FAIL, "MPI_Type_create_struct failed", mpi_code) + } + + MPI_Type_free(&outer_type); + MPI_Type_free(&leftover_type); + } + else { + /* There are no remaining bytes so just set the new type to + * the outer type created */ + *new_type = outer_type; + } + + if(MPI_SUCCESS != (mpi_code = MPI_Type_commit(new_type))) + HMPI_GOTO_ERROR(FAIL, "MPI_Type_commit failed", mpi_code) + +done: + FUNC_LEAVE_NOAPI(ret_value) +} /* end H5S_mpio_create_large_type */ + #endif /* H5_HAVE_PARALLEL */ diff --git a/src/H5Sprivate.h b/src/H5Sprivate.h index 60e0630..8934726 100644 --- a/src/H5Sprivate.h +++ b/src/H5Sprivate.h @@ -311,6 +311,7 @@ H5_DLL herr_t H5S_select_iter_next(H5S_sel_iter_t *sel_iter, size_t nelem); H5_DLL herr_t H5S_select_iter_release(H5S_sel_iter_t *sel_iter); #ifdef H5_HAVE_PARALLEL +H5_DLL hsize_t H5S_mpio_set_bigio_count(hsize_t new_count); H5_DLL herr_t H5S_mpio_space_type(const H5S_t *space, size_t elmt_size, /* out: */ MPI_Datatype *new_type, int *count, diff --git a/testpar/CMakeLists.txt b/testpar/CMakeLists.txt index 298d326..e994b65 100644 --- a/testpar/CMakeLists.txt +++ b/testpar/CMakeLists.txt @@ -43,6 +43,7 @@ ENDMACRO (ADD_H5P_EXE file) set (H5P_TESTS t_mpi + t_bigio t_cache t_pflush1 t_pflush2 diff --git a/testpar/Makefile.am b/testpar/Makefile.am index b87c1df..7029bd5 100644 --- a/testpar/Makefile.am +++ b/testpar/Makefile.am @@ -23,7 +23,7 @@ AM_CPPFLAGS+=-I$(top_srcdir)/src -I$(top_srcdir)/test # Test programs. These are our main targets. # -TEST_PROG_PARA=t_mpi testphdf5 t_cache t_cache_image t_pflush1 t_pflush2 t_pshutdown t_prestart t_init_term t_shapesame +TEST_PROG_PARA=t_mpi t_bigio testphdf5 t_cache t_cache_image t_pflush1 t_pflush2 t_pshutdown t_prestart t_init_term t_shapesame check_PROGRAMS = $(TEST_PROG_PARA) -- cgit v0.12 From 80e99b73f9ba6ef61adf6b03e2337ca084923fe6 Mon Sep 17 00:00:00 2001 From: Richard Warren Date: Wed, 20 Sep 2017 11:02:28 -0400 Subject: Added the missing test code --- testpar/t_bigio.c | 2173 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 2173 insertions(+) create mode 100644 testpar/t_bigio.c diff --git a/testpar/t_bigio.c b/testpar/t_bigio.c new file mode 100644 index 0000000..611ff1a --- /dev/null +++ b/testpar/t_bigio.c @@ -0,0 +1,2173 @@ + +#include "hdf5.h" +#include "testphdf5.h" +#include "H5Dprivate.h" /* For Chunk tests */ + +// int TestVerbosity = VERBO_LO; /* Default Verbosity is Low */ + +/* Constants definitions */ +#define MAX_ERR_REPORT 10 /* Maximum number of errors reported */ + +/* Define some handy debugging shorthands, routines, ... */ +/* debugging tools */ + +#define MAINPROCESS (!mpi_rank) /* define process 0 as main process */ + +/* Constants definitions */ +#define RANK 2 + +#define IN_ORDER 1 +#define OUT_OF_ORDER 2 + +#define DATASET1 "DSET1" +#define DATASET2 "DSET2" +#define DATASET3 "DSET3" +#define DATASET4 "DSET4" +#define DATASET5 "DSET5" +#define DXFER_COLLECTIVE_IO 0x1 /* Collective IO*/ +#define DXFER_INDEPENDENT_IO 0x2 /* Independent IO collectively */ +#define DXFER_BIGCOUNT 536870916 + +#define HYPER 1 +#define POINT 2 +#define ALL 3 + +/* Dataset data type. Int's can be easily octo dumped. */ +typedef hsize_t B_DATATYPE; + +int facc_type = FACC_MPIO; /*Test file access type */ +int dxfer_coll_type = DXFER_COLLECTIVE_IO; +size_t bigcount = DXFER_BIGCOUNT; +char filename[20] = "bigio_test.h5"; +int nerrors = 0; +int mpi_size, mpi_rank; + +hsize_t space_dim1 = SPACE_DIM1 * 256; // 4096 +hsize_t space_dim2 = SPACE_DIM2; + +static void coll_chunktest(const char* filename, int chunk_factor, int select_factor, + int api_option, int file_selection, int mem_selection, int mode); +hid_t create_faccess_plist(MPI_Comm comm, MPI_Info info, int l_facc_type); + +/* + * Setup the coordinates for point selection. + */ +static void +set_coords(hsize_t start[], + hsize_t count[], + hsize_t stride[], + hsize_t block[], + size_t num_points, + hsize_t coords[], + int order) +{ + hsize_t i,j, k = 0, m ,n, s1 ,s2; + + if(OUT_OF_ORDER == order) + k = (num_points * RANK) - 1; + else if(IN_ORDER == order) + k = 0; + + s1 = start[0]; + s2 = start[1]; + + for(i = 0 ; i < count[0]; i++) + for(j = 0 ; j < count[1]; j++) + for(m = 0 ; m < block[0]; m++) + for(n = 0 ; n < block[1]; n++) + if(OUT_OF_ORDER == order) { + coords[k--] = s2 + (stride[1] * j) + n; + coords[k--] = s1 + (stride[0] * i) + m; + } + else if(IN_ORDER == order) { + coords[k++] = s1 + stride[0] * i + m; + coords[k++] = s2 + stride[1] * j + n; + } +} + +/* + * Fill the dataset with trivial data for testing. + * Assume dimension rank is 2 and data is stored contiguous. + */ +static void +fill_datasets(hsize_t start[], hsize_t block[], B_DATATYPE * dataset) +{ + B_DATATYPE *dataptr = dataset; + hsize_t i, j; + + /* put some trivial data in the data_array */ + for (i=0; i < block[0]; i++){ + for (j=0; j < block[1]; j++){ + *dataptr = (B_DATATYPE)((i+start[0])*100 + (j+start[1]+1)); + dataptr++; + } + } +} + +/* + * Setup the coordinates for point selection. + */ +void point_set(hsize_t start[], + hsize_t count[], + hsize_t stride[], + hsize_t block[], + size_t num_points, + hsize_t coords[], + int order) +{ + hsize_t i,j, k = 0, m ,n, s1 ,s2; + + HDcompile_assert(RANK == 2); + + if(OUT_OF_ORDER == order) + k = (num_points * RANK) - 1; + else if(IN_ORDER == order) + k = 0; + + s1 = start[0]; + s2 = start[1]; + + for(i = 0 ; i < count[0]; i++) + for(j = 0 ; j < count[1]; j++) + for(m = 0 ; m < block[0]; m++) + for(n = 0 ; n < block[1]; n++) + if(OUT_OF_ORDER == order) { + coords[k--] = s2 + (stride[1] * j) + n; + coords[k--] = s1 + (stride[0] * i) + m; + } + else if(IN_ORDER == order) { + coords[k++] = s1 + stride[0] * i + m; + coords[k++] = s2 + stride[1] * j + n; + } + + if(VERBOSE_MED) { + printf("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])); + k = 0; + for(i = 0; i < num_points ; i++) { + printf("(%d, %d)\n", (int)coords[k], (int)coords[k + 1]); + k += 2; + } + } +} + +/* + * Print the content of the dataset. + */ +static void +dataset_print(hsize_t start[], hsize_t block[], B_DATATYPE * dataset) +{ + B_DATATYPE *dataptr = dataset; + hsize_t i, j; + + /* print the column heading */ + printf("%-8s", "Cols:"); + for (j=0; j < block[1]; j++){ + printf("%3lu ", (unsigned long)(start[1]+j)); + } + printf("\n"); + + /* print the slab data */ + for (i=0; i < block[0]; i++){ + printf("Row %2lu: ", (unsigned long)(i+start[0])); + for (j=0; j < block[1]; j++){ + printf("%llu ", *dataptr++); + } + printf("\n"); + } +} + + +/* + * Print the content of the dataset. + */ +static int +verify_data(hsize_t start[], hsize_t count[], hsize_t stride[], hsize_t block[], B_DATATYPE *dataset, B_DATATYPE *original) +{ + hsize_t i, j; + int vrfyerrs; + + /* print it if VERBOSE_MED */ + if(VERBOSE_MED) { + printf("verify_data dumping:::\n"); + printf("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]); + printf("original values:\n"); + dataset_print(start, block, original); + printf("compared values:\n"); + dataset_print(start, block, dataset); + } + + vrfyerrs = 0; + for (i=0; i < block[0]; i++){ + for (j=0; j < block[1]; j++){ + if(*dataset != *original){ + if(vrfyerrs++ < MAX_ERR_REPORT || VERBOSE_MED){ + printf("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)); + } + dataset++; + original++; + } + } + } + if(vrfyerrs > MAX_ERR_REPORT && !VERBOSE_MED) + printf("[more errors ...]\n"); + if(vrfyerrs) + printf("%d errors found in verify_data\n", vrfyerrs); + return(vrfyerrs); +} + +/* Set up the selection */ +static void +ccslab_set(int mpi_rank, + int mpi_size, + hsize_t start[], + hsize_t count[], + hsize_t stride[], + hsize_t block[], + int mode) +{ + + switch (mode){ + + case BYROW_CONT: + /* Each process takes a slabs of rows. */ + block[0] = 1; + block[1] = 1; + stride[0] = 1; + stride[1] = 1; + count[0] = space_dim1; + count[1] = space_dim2; + start[0] = mpi_rank*count[0]; + start[1] = 0; + + break; + + case BYROW_DISCONT: + /* Each process takes several disjoint blocks. */ + block[0] = 1; + block[1] = 1; + stride[0] = 3; + 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[1] = 0; + + break; + + case BYROW_SELECTNONE: + /* Each process takes a slabs of rows, there are + no selections for the last process. */ + block[0] = 1; + block[1] = 1; + stride[0] = 1; + 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[1] = 0; + + break; + + case BYROW_SELECTUNBALANCE: + /* The first one-third of the number of processes only + select top half of the domain, The rest will select the bottom + half of the domain. */ + + block[0] = 1; + count[0] = 2; + stride[0] = space_dim1*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; + else start[0] = 1 + space_dim1*mpi_size/2 + (mpi_rank-2*mpi_size/3); + break; + + case BYROW_SELECTINCHUNK: + /* Each process will only select one chunk */ + + block[0] = 1; + count[0] = 1; + start[0] = mpi_rank*space_dim1; + stride[0]= 1; + block[1] = space_dim2; + count[1] = 1; + stride[1]= 1; + start[1] = 0; + + break; + + default: + /* Unknown mode. Set it to cover the whole dataset. */ + block[0] = space_dim1*mpi_size; + block[1] = space_dim2; + stride[0] = block[0]; + stride[1] = block[1]; + count[0] = 1; + count[1] = 1; + start[0] = 0; + start[1] = 0; + + break; + } + if (VERBOSE_MED){ + printf("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])); + } +} + + +/* + * Fill the dataset with trivial data for testing. + * Assume dimension rank is 2. + */ +static void +ccdataset_fill(hsize_t start[], + hsize_t stride[], + hsize_t count[], + hsize_t block[], + DATATYPE * dataset, + int mem_selection) +{ + DATATYPE *dataptr = dataset; + DATATYPE *tmptr; + hsize_t i,j,k1,k2,k=0; + /* put some trivial data in the data_array */ + tmptr = dataptr; + + /* assign the disjoint block (two-dimensional)data array value + through the pointer */ + + for (k1 = 0; k1 < count[0]; k1++) { + for(i = 0; i < block[0]; i++) { + for(k2 = 0; k2 < count[1]; k2++) { + for(j = 0;j < block[1]; j++) { + + if (ALL != mem_selection) { + dataptr = tmptr + ((start[0]+k1*stride[0]+i)*space_dim2+ + start[1]+k2*stride[1]+j); + } + else { + dataptr = tmptr + k; + k++; + } + + *dataptr = (DATATYPE)(k1+k2+i+j); + } + } + } + } +} + +/* + * Print the first block of the content of the dataset. + */ +static void +ccdataset_print(hsize_t start[], + hsize_t block[], + DATATYPE * dataset) + +{ + DATATYPE *dataptr = dataset; + hsize_t i, j; + + /* print the column heading */ + printf("Print only the first block of the dataset\n"); + printf("%-8s", "Cols:"); + for (j=0; j < block[1]; j++){ + printf("%3lu ", (unsigned long)(start[1]+j)); + } + printf("\n"); + + /* print the slab data */ + for (i=0; i < block[0]; i++){ + printf("Row %2lu: ", (unsigned long)(i+start[0])); + for (j=0; j < block[1]; j++){ + printf("%03d ", *dataptr++); + } + printf("\n"); + } +} + +/* + * Print the content of the dataset. + */ +static int +ccdataset_vrfy(hsize_t start[], + hsize_t count[], + hsize_t stride[], + hsize_t block[], + DATATYPE *dataset, + DATATYPE *original, + int mem_selection) +{ + hsize_t i, j,k1,k2,k=0; + int vrfyerrs; + DATATYPE *dataptr,*oriptr; + + /* print it if VERBOSE_MED */ + if (VERBOSE_MED) { + printf("dataset_vrfy dumping:::\n"); + printf("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]); + printf("original values:\n"); + ccdataset_print(start, block, original); + printf("compared values:\n"); + ccdataset_print(start, block, dataset); + } + + vrfyerrs = 0; + + for (k1=0;k1 MAX_ERR_REPORT && !VERBOSE_MED) + printf("[more errors ...]\n"); + if (vrfyerrs) + printf("%d errors found in ccdataset_vrfy\n", vrfyerrs); + return(vrfyerrs); +} + +/* + * Example of using the parallel HDF5 library to create two datasets + * in one HDF5 file with collective parallel access support. + * The Datasets are of sizes (number-of-mpi-processes x dim0) x dim1. + * Each process controls only a slab of size dim0 x dim1 within each + * dataset. [Note: not so yet. Datasets are of sizes dim0xdim1 and + * each process controls a hyperslab within.] + */ + +static void +dataset_big_write(void) +{ + + hid_t xfer_plist; /* Dataset transfer properties list */ + hid_t sid; /* Dataspace ID */ + hid_t file_dataspace; /* File dataspace ID */ + hid_t mem_dataspace; /* memory dataspace ID */ + hid_t dataset; + hid_t datatype; /* Datatype ID */ + hsize_t dims[RANK]; /* dataset dim sizes */ + hsize_t start[RANK]; /* for hyperslab setting */ + hsize_t count[RANK], stride[RANK]; /* for hyperslab setting */ + hsize_t block[RANK]; /* for hyperslab setting */ + hsize_t *coords = NULL; + int i; + herr_t ret; /* Generic return value */ + hid_t fid; /* HDF5 file ID */ + hid_t acc_tpl; /* File access templates */ + hsize_t h; + size_t num_points; + B_DATATYPE * wdata; + + + /* allocate memory for data buffer */ + wdata = (B_DATATYPE *)malloc(bigcount*sizeof(B_DATATYPE)); + VRFY((wdata != NULL), "wdata malloc succeeded"); + + /* setup file access template */ + acc_tpl = H5Pcreate (H5P_FILE_ACCESS); + VRFY((acc_tpl >= 0), "H5P_FILE_ACCESS"); + H5Pset_fapl_mpio(acc_tpl, MPI_COMM_WORLD, MPI_INFO_NULL); + + /* create the file collectively */ + fid = H5Fcreate(filename, H5F_ACC_TRUNC, H5P_DEFAULT, acc_tpl); + VRFY((fid >= 0), "H5Fcreate succeeded"); + + /* Release file-access template */ + ret = H5Pclose(acc_tpl); + VRFY((ret >= 0), ""); + + + /* Each process takes a slabs of rows. */ + printf("\nTesting Dataset1 write by ROW\n"); + /* Create a large dataset */ + dims[0] = bigcount; + dims[1] = mpi_size; + + sid = H5Screate_simple (RANK, dims, NULL); + VRFY((sid >= 0), "H5Screate_simple succeeded"); + dataset = H5Dcreate2(fid, DATASET1, H5T_NATIVE_LLONG, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); + VRFY((dataset >= 0), "H5Dcreate2 succeeded"); + H5Sclose(sid); + + block[0] = dims[0]/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[1] = 0; + + /* create a file dataspace independently */ + file_dataspace = H5Dget_space (dataset); + VRFY((file_dataspace >= 0), "H5Dget_space succeeded"); + ret = H5Sselect_hyperslab(file_dataspace, H5S_SELECT_SET, start, stride, count, block); + VRFY((ret >= 0), "H5Sset_hyperslab succeeded"); + + /* create a memory dataspace independently */ + mem_dataspace = H5Screate_simple (RANK, block, NULL); + VRFY((mem_dataspace >= 0), ""); + + /* fill the local slab with some trivial data */ + fill_datasets(start, block, wdata); + MESG("data_array initialized"); + if(VERBOSE_MED){ + MESG("data_array created"); + dataset_print(start, block, wdata); + } + + /* set up the collective transfer properties list */ + xfer_plist = H5Pcreate (H5P_DATASET_XFER); + VRFY((xfer_plist >= 0), "H5Pcreate xfer succeeded"); + ret = H5Pset_dxpl_mpio(xfer_plist, H5FD_MPIO_COLLECTIVE); + VRFY((ret >= 0), "H5Pset_dxpl_mpio succeeded"); + if(dxfer_coll_type == DXFER_INDEPENDENT_IO) { + ret = H5Pset_dxpl_mpio_collective_opt(xfer_plist,H5FD_MPIO_INDIVIDUAL_IO); + VRFY((ret>= 0),"set independent IO collectively succeeded"); + } + + /* write data collectively */ + MESG("writeAll by Row"); + { + int j,k =0; + for (i=0; i < block[0]; i++){ + for (j=0; j < block[1]; j++){ + if(k < 10) { + printf("%lld ", wdata[k]); + k++; + } + } + } + printf("\n"); + } + + ret = H5Dwrite(dataset, H5T_NATIVE_LLONG, mem_dataspace, file_dataspace, + xfer_plist, wdata); + VRFY((ret >= 0), "H5Dwrite dataset1 succeeded"); + + /* release all temporary handles. */ + H5Sclose(file_dataspace); + H5Sclose(mem_dataspace); + H5Pclose(xfer_plist); + + ret = H5Dclose(dataset); + VRFY((ret >= 0), "H5Dclose1 succeeded"); + + + + /* Each process takes a slabs of cols. */ + printf("\nTesting Dataset2 write by COL\n"); + /* Create a large dataset */ + dims[0] = bigcount; + dims[1] = mpi_size; + + sid = H5Screate_simple (RANK, dims, NULL); + VRFY((sid >= 0), "H5Screate_simple succeeded"); + dataset = H5Dcreate2(fid, DATASET2, H5T_NATIVE_LLONG, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); + VRFY((dataset >= 0), "H5Dcreate2 succeeded"); + H5Sclose(sid); + + block[0] = dims[0]; + block[1] = dims[1]/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]; + + /* create a file dataspace independently */ + file_dataspace = H5Dget_space (dataset); + VRFY((file_dataspace >= 0), "H5Dget_space succeeded"); + ret = H5Sselect_hyperslab(file_dataspace, H5S_SELECT_SET, start, stride, count, block); + VRFY((ret >= 0), "H5Sset_hyperslab succeeded"); + + /* create a memory dataspace independently */ + mem_dataspace = H5Screate_simple (RANK, block, NULL); + VRFY((mem_dataspace >= 0), ""); + + /* fill the local slab with some trivial data */ + fill_datasets(start, block, wdata); + MESG("data_array initialized"); + if(VERBOSE_MED){ + MESG("data_array created"); + dataset_print(start, block, wdata); + } + + /* set up the collective transfer properties list */ + xfer_plist = H5Pcreate (H5P_DATASET_XFER); + VRFY((xfer_plist >= 0), "H5Pcreate xfer succeeded"); + ret = H5Pset_dxpl_mpio(xfer_plist, H5FD_MPIO_COLLECTIVE); + VRFY((ret >= 0), "H5Pset_dxpl_mpio succeeded"); + if(dxfer_coll_type == DXFER_INDEPENDENT_IO) { + ret = H5Pset_dxpl_mpio_collective_opt(xfer_plist,H5FD_MPIO_INDIVIDUAL_IO); + VRFY((ret>= 0),"set independent IO collectively succeeded"); + } + + /* write data collectively */ + MESG("writeAll by Col"); + { + int j,k =0; + for (i=0; i < block[0]; i++){ + for (j=0; j < block[1]; j++){ + if(k < 10) { + printf("%lld ", wdata[k]); + k++; + } + } + } + printf("\n"); + } + + ret = H5Dwrite(dataset, H5T_NATIVE_LLONG, mem_dataspace, file_dataspace, + xfer_plist, wdata); + VRFY((ret >= 0), "H5Dwrite dataset1 succeeded"); + + /* release all temporary handles. */ + H5Sclose(file_dataspace); + H5Sclose(mem_dataspace); + H5Pclose(xfer_plist); + + ret = H5Dclose(dataset); + VRFY((ret >= 0), "H5Dclose1 succeeded"); + + + + /* ALL selection */ + printf("\nTesting Dataset3 write select ALL proc 0, NONE others\n"); + /* Create a large dataset */ + dims[0] = bigcount; + dims[1] = 1; + + sid = H5Screate_simple (RANK, dims, NULL); + VRFY((sid >= 0), "H5Screate_simple succeeded"); + dataset = H5Dcreate2(fid, DATASET3, H5T_NATIVE_LLONG, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); + VRFY((dataset >= 0), "H5Dcreate2 succeeded"); + H5Sclose(sid); + + /* create a file dataspace independently */ + file_dataspace = H5Dget_space (dataset); + VRFY((file_dataspace >= 0), "H5Dget_space succeeded"); + if(MAINPROCESS) { + ret = H5Sselect_all(file_dataspace); + VRFY((ret >= 0), "H5Sset_all succeeded"); + } + else { + ret = H5Sselect_none(file_dataspace); + VRFY((ret >= 0), "H5Sset_none succeeded"); + } + + /* create a memory dataspace independently */ + mem_dataspace = H5Screate_simple (RANK, dims, NULL); + VRFY((mem_dataspace >= 0), ""); + if(!MAINPROCESS) { + ret = H5Sselect_none(mem_dataspace); + VRFY((ret >= 0), "H5Sset_none succeeded"); + } + + /* set up the collective transfer properties list */ + xfer_plist = H5Pcreate (H5P_DATASET_XFER); + VRFY((xfer_plist >= 0), "H5Pcreate xfer succeeded"); + ret = H5Pset_dxpl_mpio(xfer_plist, H5FD_MPIO_COLLECTIVE); + VRFY((ret >= 0), "H5Pset_dxpl_mpio succeeded"); + if(dxfer_coll_type == DXFER_INDEPENDENT_IO) { + ret = H5Pset_dxpl_mpio_collective_opt(xfer_plist,H5FD_MPIO_INDIVIDUAL_IO); + VRFY((ret>= 0),"set independent IO collectively succeeded"); + } + + /* fill the local slab with some trivial data */ + fill_datasets(start, dims, wdata); + MESG("data_array initialized"); + if(VERBOSE_MED){ + MESG("data_array created"); + } + + /* write data collectively */ + MESG("writeAll by process 0"); + { + int j,k =0; + for (i=0; i < block[0]; i++){ + for (j=0; j < block[1]; j++){ + if(k < 10) { + printf("%lld ", wdata[k]); + k++; + } + } + } + printf("\n"); + } + + ret = H5Dwrite(dataset, H5T_NATIVE_LLONG, mem_dataspace, file_dataspace, + xfer_plist, wdata); + VRFY((ret >= 0), "H5Dwrite dataset1 succeeded"); + + /* release all temporary handles. */ + H5Sclose(file_dataspace); + H5Sclose(mem_dataspace); + H5Pclose(xfer_plist); + + ret = H5Dclose(dataset); + VRFY((ret >= 0), "H5Dclose1 succeeded"); + + /* Point selection */ + printf("\nTesting Dataset4 write point selection\n"); + /* Create a large dataset */ + dims[0] = bigcount; + dims[1] = mpi_size * 4; + + sid = H5Screate_simple (RANK, dims, NULL); + VRFY((sid >= 0), "H5Screate_simple succeeded"); + dataset = H5Dcreate2(fid, DATASET4, H5T_NATIVE_LLONG, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); + VRFY((dataset >= 0), "H5Dcreate2 succeeded"); + H5Sclose(sid); + + block[0] = dims[0]/2; + block[1] = 2; + stride[0] = dims[0]/2; + stride[1] = 2; + count[0] = 1; + count[1] = 1; + start[0] = 0; + start[1] = dims[1]/mpi_size * mpi_rank; + + num_points = bigcount; + + coords = (hsize_t *)malloc(num_points * RANK * sizeof(hsize_t)); + VRFY((coords != NULL), "coords malloc succeeded"); + + set_coords (start, count, stride, block, num_points, coords, IN_ORDER); + /* create a file dataspace */ + file_dataspace = H5Dget_space (dataset); + VRFY((file_dataspace >= 0), "H5Dget_space succeeded"); + ret = H5Sselect_elements(file_dataspace, H5S_SELECT_SET, num_points, coords); + VRFY((ret >= 0), "H5Sselect_elements succeeded"); + + if(coords) free(coords); + + fill_datasets(start, block, wdata); + MESG("data_array initialized"); + if(VERBOSE_MED){ + MESG("data_array created"); + dataset_print(start, block, wdata); + } + + /* create a memory dataspace */ + /* Warning: H5Screate_simple requires an array of hsize_t elements + * even if we only pass only a single value. Attempting anything else + * appears to cause problems with 32 bit compilers. + */ + mem_dataspace = H5Screate_simple (1, dims, NULL); + VRFY((mem_dataspace >= 0), ""); + + /* set up the collective transfer properties list */ + xfer_plist = H5Pcreate (H5P_DATASET_XFER); + VRFY((xfer_plist >= 0), "H5Pcreate xfer succeeded"); + ret = H5Pset_dxpl_mpio(xfer_plist, H5FD_MPIO_COLLECTIVE); + VRFY((ret >= 0), "H5Pset_dxpl_mpio succeeded"); + if(dxfer_coll_type == DXFER_INDEPENDENT_IO) { + ret = H5Pset_dxpl_mpio_collective_opt(xfer_plist,H5FD_MPIO_INDIVIDUAL_IO); + VRFY((ret>= 0),"set independent IO collectively succeeded"); + } + + ret = H5Dwrite(dataset, H5T_NATIVE_LLONG, mem_dataspace, file_dataspace, + xfer_plist, wdata); + VRFY((ret >= 0), "H5Dwrite dataset1 succeeded"); + + /* release all temporary handles. */ + H5Sclose(file_dataspace); + H5Sclose(mem_dataspace); + H5Pclose(xfer_plist); + + ret = H5Dclose(dataset); + VRFY((ret >= 0), "H5Dclose1 succeeded"); + + /* Irregular selection */ + /* Need larger memory for data buffer */ + free(wdata); +#if 0 + wdata = (B_DATATYPE *)malloc(bigcount*4*sizeof(B_DATATYPE)); + VRFY((wdata != NULL), "wdata malloc succeeded"); + + printf("\nTesting Dataset5 write irregular selection\n"); + /* Create a large dataset */ + dims[0] = bigcount/6; + dims[1] = mpi_size * 4; + + sid = H5Screate_simple (RANK, dims, NULL); + VRFY((sid >= 0), "H5Screate_simple succeeded"); + dataset = H5Dcreate2(fid, DATASET5, H5T_NATIVE_LLONG, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); + VRFY((dataset >= 0), "H5Dcreate2 succeeded"); + H5Sclose(sid); + + /* first select 1 col in this procs splice */ + block[0] = dims[0]; + block[1] = 1; + stride[0] = block[0]; + stride[1] = block[1]; + count[0] = 1; + count[1] = 1; + start[0] = 0; + start[1] = mpi_rank * 4; + + /* create a file dataspace */ + file_dataspace = H5Dget_space (dataset); + VRFY((file_dataspace >= 0), "H5Dget_space succeeded"); + + // dims[1] = 4; + /* create a memory dataspace */ + mem_dataspace = H5Screate_simple (RANK, dims, NULL); + VRFY((mem_dataspace >= 0), ""); + + ret = H5Sselect_hyperslab(file_dataspace, H5S_SELECT_SET, start, stride, count, block); + VRFY((ret >= 0), "H5Sset_hyperslab succeeded"); + + start[1] = 0; + ret = H5Sselect_hyperslab(mem_dataspace, H5S_SELECT_SET, start, stride, count, block); + VRFY((ret >= 0), "H5Sset_hyperslab succeeded"); + + /* select every other row in the process splice and OR it with + the col selection to create an irregular selection */ + for(h=0 ; h= 0), "H5Sset_hyperslab succeeded"); + + start[1] = 0; + ret = H5Sselect_hyperslab(mem_dataspace, H5S_SELECT_OR, start, stride, count, block); + VRFY((ret >= 0), "H5Sset_hyperslab succeeded"); + } + printf("Setting up for collective transfer\n"); + /* set up the collective transfer properties list */ + xfer_plist = H5Pcreate (H5P_DATASET_XFER); + VRFY((xfer_plist >= 0), "H5Pcreate xfer succeeded"); + ret = H5Pset_dxpl_mpio(xfer_plist, H5FD_MPIO_COLLECTIVE); + VRFY((ret >= 0), "H5Pset_dxpl_mpio succeeded"); + if(dxfer_coll_type == DXFER_INDEPENDENT_IO) { + ret = H5Pset_dxpl_mpio_collective_opt(xfer_plist,H5FD_MPIO_INDIVIDUAL_IO); + VRFY((ret>= 0),"set independent IO collectively succeeded"); + } + + /* fill the local slab with some trivial data */ + fill_datasets(start, dims, wdata); + MESG("data_array initialized"); + if(VERBOSE_MED){ + MESG("data_array created"); + } + + ret = H5Dwrite(dataset, H5T_NATIVE_LLONG, mem_dataspace, file_dataspace, + xfer_plist, wdata); + VRFY((ret >= 0), "H5Dwrite dataset1 succeeded"); + + /* release all temporary handles. */ + H5Sclose(file_dataspace); + H5Sclose(mem_dataspace); + H5Pclose(xfer_plist); + + ret = H5Dclose(dataset); + VRFY((ret >= 0), "H5Dclose1 succeeded"); + + free(wdata); +#endif + H5Fclose(fid); +} + +/* + * Example of using the parallel HDF5 library to read two datasets + * in one HDF5 file with collective parallel access support. + * The Datasets are of sizes (number-of-mpi-processes x dim0) x dim1. + * Each process controls only a slab of size dim0 x dim1 within each + * dataset. [Note: not so yet. Datasets are of sizes dim0xdim1 and + * each process controls a hyperslab within.] + */ + +static void +dataset_big_read(void) +{ + hid_t fid; /* HDF5 file ID */ + hid_t acc_tpl; /* File access templates */ + hid_t xfer_plist; /* Dataset transfer properties list */ + hid_t file_dataspace; /* File dataspace ID */ + hid_t mem_dataspace; /* memory dataspace ID */ + hid_t dataset; + B_DATATYPE *rdata = NULL; /* data buffer */ + B_DATATYPE *wdata = NULL; /* expected data buffer */ + hsize_t dims[RANK]; /* dataset dim sizes */ + hsize_t start[RANK]; /* for hyperslab setting */ + hsize_t count[RANK], stride[RANK]; /* for hyperslab setting */ + hsize_t block[RANK]; /* for hyperslab setting */ + int i,j,k; + hsize_t h; + size_t num_points; + hsize_t *coords = NULL; + herr_t ret; /* Generic return value */ + + /* allocate memory for data buffer */ + rdata = (B_DATATYPE *)malloc(bigcount*sizeof(B_DATATYPE)); + VRFY((rdata != NULL), "rdata malloc succeeded"); + wdata = (B_DATATYPE *)malloc(bigcount*sizeof(B_DATATYPE)); + VRFY((wdata != NULL), "wdata malloc succeeded"); + + memset(rdata, 0, bigcount*sizeof(B_DATATYPE)); + + /* setup file access template */ + acc_tpl = H5Pcreate (H5P_FILE_ACCESS); + VRFY((acc_tpl >= 0), "H5P_FILE_ACCESS"); + H5Pset_fapl_mpio(acc_tpl, MPI_COMM_WORLD, MPI_INFO_NULL); + + /* open the file collectively */ + fid=H5Fopen(filename,H5F_ACC_RDONLY,acc_tpl); + VRFY((fid >= 0), "H5Fopen succeeded"); + + /* Release file-access template */ + ret = H5Pclose(acc_tpl); + VRFY((ret >= 0), ""); + + + printf("\nRead Testing Dataset1 by COL\n"); + dataset = H5Dopen2(fid, DATASET1, H5P_DEFAULT); + VRFY((dataset >= 0), "H5Dopen2 succeeded"); + + dims[0] = bigcount; + dims[1] = mpi_size; + /* Each process takes a slabs of cols. */ + block[0] = dims[0]; + block[1] = dims[1]/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]; + + /* create a file dataspace independently */ + file_dataspace = H5Dget_space (dataset); + VRFY((file_dataspace >= 0), "H5Dget_space succeeded"); + ret = H5Sselect_hyperslab(file_dataspace, H5S_SELECT_SET, start, stride, count, block); + VRFY((ret >= 0), "H5Sset_hyperslab succeeded"); + + /* create a memory dataspace independently */ + mem_dataspace = H5Screate_simple (RANK, block, NULL); + VRFY((mem_dataspace >= 0), ""); + + /* fill dataset with test data */ + fill_datasets(start, block, wdata); + MESG("data_array initialized"); + if(VERBOSE_MED){ + MESG("data_array created"); + } + + /* set up the collective transfer properties list */ + xfer_plist = H5Pcreate (H5P_DATASET_XFER); + VRFY((xfer_plist >= 0), ""); + ret = H5Pset_dxpl_mpio(xfer_plist, H5FD_MPIO_COLLECTIVE); + VRFY((ret >= 0), "H5Pcreate xfer succeeded"); + if(dxfer_coll_type == DXFER_INDEPENDENT_IO) { + ret = H5Pset_dxpl_mpio_collective_opt(xfer_plist,H5FD_MPIO_INDIVIDUAL_IO); + VRFY((ret>= 0),"set independent IO collectively succeeded"); + } + + /* read data collectively */ + ret = H5Dread(dataset, H5T_NATIVE_LLONG, mem_dataspace, file_dataspace, + xfer_plist, rdata); + VRFY((ret >= 0), "H5Dread dataset1 succeeded"); + + { + for (i=0; i < block[0]; i++){ + for (j=0; j < block[1]; j++){ + if(k < 10) { + printf("%lld ", rdata[k]); + k++; + } + } + } + printf("\n"); + } + + /* verify the read data with original expected data */ + ret = verify_data(start, count, stride, block, rdata, wdata); + if(ret) {fprintf(stderr, "verify failed\n"); exit(1);} + + /* release all temporary handles. */ + H5Sclose(file_dataspace); + H5Sclose(mem_dataspace); + H5Pclose(xfer_plist); + ret = H5Dclose(dataset); + VRFY((ret >= 0), "H5Dclose1 succeeded"); + + + printf("\nRead Testing Dataset2 by ROW\n"); + memset(rdata, 0, bigcount*sizeof(B_DATATYPE)); + dataset = H5Dopen2(fid, DATASET2, H5P_DEFAULT); + VRFY((dataset >= 0), "H5Dopen2 succeeded"); + + dims[0] = bigcount; + dims[1] = mpi_size; + /* Each process takes a slabs of rows. */ + block[0] = dims[0]/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[1] = 0; + + /* create a file dataspace independently */ + file_dataspace = H5Dget_space (dataset); + VRFY((file_dataspace >= 0), "H5Dget_space succeeded"); + ret = H5Sselect_hyperslab(file_dataspace, H5S_SELECT_SET, start, stride, count, block); + VRFY((ret >= 0), "H5Sset_hyperslab succeeded"); + + /* create a memory dataspace independently */ + mem_dataspace = H5Screate_simple (RANK, block, NULL); + VRFY((mem_dataspace >= 0), ""); + + /* fill dataset with test data */ + fill_datasets(start, block, wdata); + MESG("data_array initialized"); + if(VERBOSE_MED){ + MESG("data_array created"); + } + + /* set up the collective transfer properties list */ + xfer_plist = H5Pcreate (H5P_DATASET_XFER); + VRFY((xfer_plist >= 0), ""); + ret = H5Pset_dxpl_mpio(xfer_plist, H5FD_MPIO_COLLECTIVE); + VRFY((ret >= 0), "H5Pcreate xfer succeeded"); + if(dxfer_coll_type == DXFER_INDEPENDENT_IO) { + ret = H5Pset_dxpl_mpio_collective_opt(xfer_plist,H5FD_MPIO_INDIVIDUAL_IO); + VRFY((ret>= 0),"set independent IO collectively succeeded"); + } + + /* read data collectively */ + ret = H5Dread(dataset, H5T_NATIVE_LLONG, mem_dataspace, file_dataspace, + xfer_plist, rdata); + VRFY((ret >= 0), "H5Dread dataset2 succeeded"); + + { + for (i=0; i < block[0]; i++){ + for (j=0; j < block[1]; j++){ + if(k < 10) { + printf("%lld ", rdata[k]); + k++; + } + } + } + printf("\n"); + } + + /* verify the read data with original expected data */ + ret = verify_data(start, count, stride, block, rdata, wdata); + if(ret) {fprintf(stderr, "verify failed\n"); exit(1);} + + /* release all temporary handles. */ + H5Sclose(file_dataspace); + H5Sclose(mem_dataspace); + H5Pclose(xfer_plist); + ret = H5Dclose(dataset); + VRFY((ret >= 0), "H5Dclose1 succeeded"); + + + printf("\nRead Testing Dataset3 read select ALL proc 0, NONE others\n"); + memset(rdata, 0, bigcount*sizeof(B_DATATYPE)); + dataset = H5Dopen2(fid, DATASET3, H5P_DEFAULT); + VRFY((dataset >= 0), "H5Dopen2 succeeded"); + + dims[0] = bigcount; + dims[1] = 1; + + /* create a file dataspace independently */ + file_dataspace = H5Dget_space (dataset); + VRFY((file_dataspace >= 0), "H5Dget_space succeeded"); + if(MAINPROCESS) { + ret = H5Sselect_all(file_dataspace); + VRFY((ret >= 0), "H5Sset_all succeeded"); + } + else { + ret = H5Sselect_none(file_dataspace); + VRFY((ret >= 0), "H5Sset_none succeeded"); + } + + /* create a memory dataspace independently */ + mem_dataspace = H5Screate_simple (RANK, dims, NULL); + VRFY((mem_dataspace >= 0), ""); + if(!MAINPROCESS) { + ret = H5Sselect_none(mem_dataspace); + VRFY((ret >= 0), "H5Sset_none succeeded"); + } + + /* fill dataset with test data */ + fill_datasets(start, dims, wdata); + MESG("data_array initialized"); + if(VERBOSE_MED){ + MESG("data_array created"); + } + + /* set up the collective transfer properties list */ + xfer_plist = H5Pcreate (H5P_DATASET_XFER); + VRFY((xfer_plist >= 0), ""); + ret = H5Pset_dxpl_mpio(xfer_plist, H5FD_MPIO_COLLECTIVE); + VRFY((ret >= 0), "H5Pcreate xfer succeeded"); + if(dxfer_coll_type == DXFER_INDEPENDENT_IO) { + ret = H5Pset_dxpl_mpio_collective_opt(xfer_plist,H5FD_MPIO_INDIVIDUAL_IO); + VRFY((ret>= 0),"set independent IO collectively succeeded"); + } + + /* read data collectively */ + ret = H5Dread(dataset, H5T_NATIVE_LLONG, mem_dataspace, file_dataspace, + xfer_plist, rdata); + VRFY((ret >= 0), "H5Dread dataset3 succeeded"); + + { + for (i=0; i < block[0]; i++){ + for (j=0; j < block[1]; j++){ + if(k < 10) { + printf("%lld ", rdata[k]); + k++; + } + } + } + printf("\n"); + } + + if(MAINPROCESS) { + /* verify the read data with original expected data */ + ret = verify_data(start, count, stride, block, rdata, wdata); + if(ret) {fprintf(stderr, "verify failed\n"); exit(1);} + } + + /* release all temporary handles. */ + H5Sclose(file_dataspace); + H5Sclose(mem_dataspace); + H5Pclose(xfer_plist); + ret = H5Dclose(dataset); + VRFY((ret >= 0), "H5Dclose1 succeeded"); + + printf("\nRead Testing Dataset4 with Point selection\n"); + dataset = H5Dopen2(fid, DATASET4, H5P_DEFAULT); + VRFY((dataset >= 0), "H5Dopen2 succeeded"); + + dims[0] = bigcount; + dims[1] = mpi_size * 4; + + block[0] = dims[0]/2; + block[1] = 2; + stride[0] = dims[0]/2; + stride[1] = 2; + count[0] = 1; + count[1] = 1; + start[0] = 0; + start[1] = dims[1]/mpi_size * mpi_rank; + + fill_datasets(start, block, wdata); + MESG("data_array initialized"); + if(VERBOSE_MED){ + MESG("data_array created"); + dataset_print(start, block, wdata); + } + + num_points = bigcount; + + coords = (hsize_t *)malloc(num_points * RANK * sizeof(hsize_t)); + VRFY((coords != NULL), "coords malloc succeeded"); + + set_coords (start, count, stride, block, num_points, coords, IN_ORDER); + /* create a file dataspace */ + file_dataspace = H5Dget_space (dataset); + VRFY((file_dataspace >= 0), "H5Dget_space succeeded"); + ret = H5Sselect_elements(file_dataspace, H5S_SELECT_SET, num_points, coords); + VRFY((ret >= 0), "H5Sselect_elements succeeded"); + + if(coords) free(coords); + + /* create a memory dataspace */ + /* Warning: H5Screate_simple requires an array of hsize_t elements + * even if we only pass only a single value. Attempting anything else + * appears to cause problems with 32 bit compilers. + */ + mem_dataspace = H5Screate_simple (1, dims, NULL); + VRFY((mem_dataspace >= 0), ""); + + /* set up the collective transfer properties list */ + xfer_plist = H5Pcreate (H5P_DATASET_XFER); + VRFY((xfer_plist >= 0), ""); + ret = H5Pset_dxpl_mpio(xfer_plist, H5FD_MPIO_COLLECTIVE); + VRFY((ret >= 0), "H5Pcreate xfer succeeded"); + if(dxfer_coll_type == DXFER_INDEPENDENT_IO) { + ret = H5Pset_dxpl_mpio_collective_opt(xfer_plist,H5FD_MPIO_INDIVIDUAL_IO); + VRFY((ret>= 0),"set independent IO collectively succeeded"); + } + + /* read data collectively */ + ret = H5Dread(dataset, H5T_NATIVE_LLONG, mem_dataspace, file_dataspace, + xfer_plist, rdata); + VRFY((ret >= 0), "H5Dread dataset1 succeeded"); + + ret = verify_data(start, count, stride, block, rdata, wdata); + if(ret) {fprintf(stderr, "verify failed\n"); exit(1);} + + /* release all temporary handles. */ + H5Sclose(file_dataspace); + H5Sclose(mem_dataspace); + H5Pclose(xfer_plist); + ret = H5Dclose(dataset); + VRFY((ret >= 0), "H5Dclose1 succeeded"); + + printf("\nRead Testing Dataset5 with Irregular selection\n"); + /* Need larger memory for data buffer */ + free(wdata); + free(rdata); +#if 0 + wdata = (B_DATATYPE *)malloc(bigcount*4*sizeof(B_DATATYPE)); + VRFY((wdata != NULL), "wdata malloc succeeded"); + rdata = (B_DATATYPE *)malloc(bigcount*4*sizeof(B_DATATYPE)); + VRFY((rdata != NULL), "rdata malloc succeeded"); + + dataset = H5Dopen2(fid, DATASET5, H5P_DEFAULT); + VRFY((dataset >= 0), "H5Dopen2 succeeded"); + + dims[0] = bigcount; + dims[1] = mpi_size * 4; + + /* first select 1 col in this proc splice */ + block[0] = dims[0]; + block[1] = 1; + stride[0] = block[0]; + stride[1] = block[1]; + count[0] = 1; + count[1] = 1; + start[0] = 0; + start[1] = mpi_rank * 4; + + /* get file dataspace */ + file_dataspace = H5Dget_space (dataset); + VRFY((file_dataspace >= 0), "H5Dget_space succeeded"); + + /* create a memory dataspace */ + mem_dataspace = H5Screate_simple (RANK, dims, NULL); + VRFY((mem_dataspace >= 0), ""); + + ret = H5Sselect_hyperslab(file_dataspace, H5S_SELECT_SET, start, stride, count, block); + VRFY((ret >= 0), "H5Sset_hyperslab succeeded"); + + start[1] = 0; + ret = H5Sselect_hyperslab(mem_dataspace, H5S_SELECT_SET, start, stride, count, block); + VRFY((ret >= 0), "H5Sset_hyperslab succeeded"); + + /* select every other row in the process splice and OR it with + the col selection to create an irregular selection */ + for(h=0 ; h= 0), "H5Sset_hyperslab succeeded"); + + start[1] = 0; + ret = H5Sselect_hyperslab(mem_dataspace, H5S_SELECT_OR, start, stride, count, block); + VRFY((ret >= 0), "H5Sset_hyperslab succeeded"); + + //fprintf(stderr, "%d: %d - %d\n", mpi_rank, (int)h, (int)H5Sget_select_npoints(mem_dataspace)); + } + + /* set up the collective transfer properties list */ + xfer_plist = H5Pcreate (H5P_DATASET_XFER); + VRFY((xfer_plist >= 0), ""); + ret = H5Pset_dxpl_mpio(xfer_plist, H5FD_MPIO_COLLECTIVE); + VRFY((ret >= 0), "H5Pcreate xfer succeeded"); + if(dxfer_coll_type == DXFER_INDEPENDENT_IO) { + ret = H5Pset_dxpl_mpio_collective_opt(xfer_plist,H5FD_MPIO_INDIVIDUAL_IO); + VRFY((ret>= 0),"set independent IO collectively succeeded"); + } + + /* read data collectively */ + ret = H5Dread(dataset, H5T_NATIVE_LLONG, mem_dataspace, file_dataspace, + xfer_plist, rdata); + VRFY((ret >= 0), "H5Dread dataset1 succeeded"); + + /* fill dataset with test data */ + fill_datasets(start, dims, wdata); + MESG("data_array initialized"); + if(VERBOSE_MED){ + MESG("data_array created"); + } + + + + /* verify the read data with original expected data */ + block[0] = dims[0]; + block[1] = 1; + stride[0] = block[0]; + stride[1] = block[1]; + count[0] = 1; + count[1] = 1; + start[0] = 0; + start[1] = 0; + ret = verify_data(start, count, stride, block, rdata, wdata); + if(ret) {fprintf(stderr, "verify failed\n"); exit(1);} + + for(h=0 ; h= 0), "H5Dclose1 succeeded"); + + H5Fclose(fid); + + /* release data buffers */ + if(rdata) free(rdata); + if(wdata) free(wdata); +#endif +} /* dataset_large_readAll */ + + +/* + * Create the appropriate File access property list + */ +hid_t +create_faccess_plist(MPI_Comm comm, MPI_Info info, int l_facc_type) +{ + hid_t ret_pl = -1; + herr_t ret; /* generic return value */ + int mpi_rank; /* mpi variables */ + + /* need the rank for error checking macros */ + MPI_Comm_rank(MPI_COMM_WORLD, &mpi_rank); + + ret_pl = H5Pcreate (H5P_FILE_ACCESS); + VRFY((ret_pl >= 0), "H5P_FILE_ACCESS"); + + if (l_facc_type == FACC_DEFAULT) + return (ret_pl); + + if (l_facc_type == FACC_MPIO){ + /* set Parallel access with communicator */ + ret = H5Pset_fapl_mpio(ret_pl, comm, info); + VRFY((ret >= 0), ""); + ret = H5Pset_all_coll_metadata_ops(ret_pl, TRUE); + VRFY((ret >= 0), ""); + ret = H5Pset_coll_metadata_write(ret_pl, TRUE); + VRFY((ret >= 0), ""); + return(ret_pl); + } + + if (l_facc_type == (FACC_MPIO | FACC_SPLIT)){ + hid_t mpio_pl; + + mpio_pl = H5Pcreate (H5P_FILE_ACCESS); + VRFY((mpio_pl >= 0), ""); + /* set Parallel access with communicator */ + ret = H5Pset_fapl_mpio(mpio_pl, comm, info); + VRFY((ret >= 0), ""); + + /* setup file access template */ + ret_pl = H5Pcreate (H5P_FILE_ACCESS); + VRFY((ret_pl >= 0), ""); + /* set Parallel access with communicator */ + ret = H5Pset_fapl_split(ret_pl, ".meta", mpio_pl, ".raw", mpio_pl); + VRFY((ret >= 0), "H5Pset_fapl_split succeeded"); + H5Pclose(mpio_pl); + return(ret_pl); + } + + /* unknown file access types */ + return (ret_pl); +} + + +/*------------------------------------------------------------------------- + * Function: coll_chunk1 + * + * Purpose: Wrapper to test the collective chunk IO for regular JOINT + selection with a single chunk + * + * Return: Success: 0 + * + * Failure: -1 + * + * Programmer: Unknown + * July 12th, 2004 + * + * Modifications: + * + *------------------------------------------------------------------------- + */ + +/* ------------------------------------------------------------------------ + * Descriptions for the selection: One big singluar selection inside one chunk + * Two dimensions, + * + * dim1 = space_dim1(5760)*mpi_size + * dim2 = space_dim2(3) + * chunk_dim1 = dim1 + * chunk_dim2 = dim2 + * block = 1 for all dimensions + * stride = 1 for all dimensions + * count0 = space_dim1(5760) + * count1 = space_dim2(3) + * start0 = mpi_rank*space_dim1 + * start1 = 0 + * ------------------------------------------------------------------------ + */ + +void +coll_chunk1(void) +{ + if (MAINPROCESS) + printf("coll_chunk1\n"); + + coll_chunktest(filename, 1, BYROW_CONT, API_NONE, HYPER, HYPER, OUT_OF_ORDER); + coll_chunktest(filename, 1, BYROW_CONT, API_NONE, HYPER, POINT, OUT_OF_ORDER); + coll_chunktest(filename, 1, BYROW_CONT, API_NONE, POINT, ALL, OUT_OF_ORDER); + coll_chunktest(filename, 1, BYROW_CONT, API_NONE, POINT, POINT, OUT_OF_ORDER); + coll_chunktest(filename, 1, BYROW_CONT, API_NONE, POINT, HYPER, OUT_OF_ORDER); + + coll_chunktest(filename, 1, BYROW_CONT, API_NONE, POINT, ALL, IN_ORDER); + coll_chunktest(filename, 1, BYROW_CONT, API_NONE, POINT, POINT, IN_ORDER); + coll_chunktest(filename, 1, BYROW_CONT, API_NONE, POINT, HYPER, IN_ORDER); +} + + +/*------------------------------------------------------------------------- + * Function: coll_chunk2 + * + * Purpose: Wrapper to test the collective chunk IO for regular DISJOINT + selection with a single chunk + * + * Return: Success: 0 + * + * Failure: -1 + * + * Programmer: Unknown + * July 12th, 2004 + * + * Modifications: + * + *------------------------------------------------------------------------- + */ + + /* ------------------------------------------------------------------------ + * Descriptions for the selection: many disjoint selections inside one chunk + * Two dimensions, + * + * dim1 = space_dim1*mpi_size(5760) + * dim2 = space_dim2(3) + * chunk_dim1 = dim1 + * chunk_dim2 = dim2 + * block = 1 for all dimensions + * stride = 3 for all dimensions + * count0 = space_dim1/stride0(5760/3) + * count1 = space_dim2/stride(3/3 = 1) + * start0 = mpi_rank*space_dim1 + * start1 = 0 + * + * ------------------------------------------------------------------------ + */ +void +coll_chunk2(void) +{ + if (MAINPROCESS) + printf("coll_chunk2\n"); + + coll_chunktest(filename, 1, BYROW_DISCONT, API_NONE, HYPER, HYPER, OUT_OF_ORDER); + coll_chunktest(filename, 1, BYROW_DISCONT, API_NONE, HYPER, POINT, OUT_OF_ORDER); + coll_chunktest(filename, 1, BYROW_DISCONT, API_NONE, POINT, ALL, OUT_OF_ORDER); + coll_chunktest(filename, 1, BYROW_DISCONT, API_NONE, POINT, POINT, OUT_OF_ORDER); + coll_chunktest(filename, 1, BYROW_DISCONT, API_NONE, POINT, HYPER, OUT_OF_ORDER); + + coll_chunktest(filename, 1, BYROW_DISCONT, API_NONE, POINT, ALL, IN_ORDER); + coll_chunktest(filename, 1, BYROW_DISCONT, API_NONE, POINT, POINT, IN_ORDER); + coll_chunktest(filename, 1, BYROW_DISCONT, API_NONE, POINT, HYPER, IN_ORDER); +} + + +/*------------------------------------------------------------------------- + * Function: coll_chunk3 + * + * Purpose: Wrapper to test the collective chunk IO for regular JOINT + selection with at least number of 2*mpi_size chunks + * + * Return: Success: 0 + * + * Failure: -1 + * + * Programmer: Unknown + * July 12th, 2004 + * + * Modifications: + * + *------------------------------------------------------------------------- + */ + +/* ------------------------------------------------------------------------ + * Descriptions for the selection: one singular selection accross many chunks + * Two dimensions, Num of chunks = 2* mpi_size + * + * dim1 = space_dim1*mpi_size + * dim2 = space_dim2(3) + * chunk_dim1 = space_dim1 + * chunk_dim2 = dim2/2 + * block = 1 for all dimensions + * stride = 1 for all dimensions + * count0 = space_dim1 + * count1 = space_dim2(3) + * start0 = mpi_rank*space_dim1 + * start1 = 0 + * + * ------------------------------------------------------------------------ + */ + +void +coll_chunk3(void) +{ + if (MAINPROCESS) + printf("coll_chunk3\n"); + + coll_chunktest(filename, mpi_size, BYROW_CONT, API_NONE, HYPER, HYPER, OUT_OF_ORDER); + coll_chunktest(filename, mpi_size, BYROW_CONT, API_NONE, HYPER, POINT, OUT_OF_ORDER); + coll_chunktest(filename, mpi_size, BYROW_CONT, API_NONE, POINT, ALL, OUT_OF_ORDER); + coll_chunktest(filename, mpi_size, BYROW_CONT, API_NONE, POINT, POINT, OUT_OF_ORDER); + coll_chunktest(filename, mpi_size, BYROW_CONT, API_NONE, POINT, HYPER, OUT_OF_ORDER); + + coll_chunktest(filename, mpi_size, BYROW_CONT, API_NONE, POINT, ALL, IN_ORDER); + coll_chunktest(filename, mpi_size, BYROW_CONT, API_NONE, POINT, POINT, IN_ORDER); + coll_chunktest(filename, mpi_size, BYROW_CONT, API_NONE, POINT, HYPER, IN_ORDER); +} + + +//------------------------------------------------------------------------- +// Borrowed/Modified (slightly) from t_coll_chunk.c +/*------------------------------------------------------------------------- + * Function: coll_chunktest + * + * Purpose: The real testing routine for regular selection of collective + chunking storage + testing both write and read, + If anything fails, it may be read or write. There is no + separation test between read and write. + * + * Return: Success: 0 + * + * 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: + * + *------------------------------------------------------------------------- + */ + +static void +coll_chunktest(const char* filename, + int chunk_factor, + int select_factor, + int api_option, + int file_selection, + int mem_selection, + int mode) +{ + hid_t file, dataset, file_dataspace, mem_dataspace; + hid_t acc_plist,xfer_plist,crp_plist; + + hsize_t dims[RANK], chunk_dims[RANK]; + int* data_array1 = NULL; + int* data_origin1 = NULL; + + hsize_t start[RANK],count[RANK],stride[RANK],block[RANK]; + +#ifdef H5_HAVE_INSTRUMENTED_LIBRARY + unsigned prop_value; +#endif /* H5_HAVE_INSTRUMENTED_LIBRARY */ + + herr_t status; + MPI_Comm comm = MPI_COMM_WORLD; + MPI_Info info = MPI_INFO_NULL; + + size_t num_points; /* for point selection */ + hsize_t *coords = NULL; /* for point selection */ + int i; + + /* Create the data space */ + + acc_plist = create_faccess_plist(comm,info,facc_type); + VRFY((acc_plist >= 0),""); + + file = H5Fcreate(filename,H5F_ACC_TRUNC,H5P_DEFAULT,acc_plist); + VRFY((file >= 0),"H5Fcreate succeeded"); + + status = H5Pclose(acc_plist); + VRFY((status >= 0),""); + + /* setup dimensionality object */ + dims[0] = space_dim1*mpi_size; + dims[1] = space_dim2; + + /* allocate memory for data buffer */ + data_array1 = (int *)HDmalloc(dims[0] * dims[1] * sizeof(int)); + VRFY((data_array1 != NULL), "data_array1 malloc succeeded"); + + /* set up dimensions of the slab this process accesses */ + ccslab_set(mpi_rank, mpi_size, start, count, stride, block, select_factor); + + /* set up the coords array selection */ + num_points = block[0] * block[1] * count[0] * count[1]; + coords = (hsize_t *)HDmalloc(num_points * RANK * sizeof(hsize_t)); + VRFY((coords != NULL), "coords malloc succeeded"); + point_set(start, count, stride, block, num_points, coords, mode); + + /* Warning: H5Screate_simple requires an array of hsize_t elements + * even if we only pass only a single value. Attempting anything else + * appears to cause problems with 32 bit compilers. + */ + file_dataspace = H5Screate_simple(2, dims, NULL); + VRFY((file_dataspace >= 0), "file dataspace created succeeded"); + + if(ALL != mem_selection) { + mem_dataspace = H5Screate_simple(2, dims, NULL); + VRFY((mem_dataspace >= 0), "mem dataspace created succeeded"); + } + else { + /* Putting the warning about H5Screate_simple (above) into practice... */ + hsize_t dsdims[1] = {num_points}; + mem_dataspace = H5Screate_simple (1, dsdims, NULL); + VRFY((mem_dataspace >= 0), "mem_dataspace create succeeded"); + } + + crp_plist = H5Pcreate(H5P_DATASET_CREATE); + VRFY((crp_plist >= 0),""); + + /* Set up chunk information. */ + chunk_dims[0] = dims[0]/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); + status = H5Pset_chunk(crp_plist, 2, chunk_dims); + VRFY((status >= 0),"chunk creation property list succeeded"); + + dataset = H5Dcreate2(file, DSET_COLLECTIVE_CHUNK_NAME, H5T_NATIVE_INT, + file_dataspace, H5P_DEFAULT, crp_plist, H5P_DEFAULT); + VRFY((dataset >= 0),"dataset created succeeded"); + + status = H5Pclose(crp_plist); + VRFY((status >= 0), ""); + + /*put some trivial data in the data array */ + ccdataset_fill(start, stride, count,block, data_array1, mem_selection); + + MESG("data_array initialized"); + + switch (file_selection) { + case HYPER: + status = H5Sselect_hyperslab(file_dataspace, H5S_SELECT_SET, start, stride, count, block); + VRFY((status >= 0),"hyperslab selection succeeded"); + break; + + case POINT: + if (num_points) { + status = H5Sselect_elements(file_dataspace, H5S_SELECT_SET, num_points, coords); + VRFY((status >= 0),"Element selection succeeded"); + } + else { + status = H5Sselect_none(file_dataspace); + VRFY((status >= 0),"none selection succeeded"); + } + break; + + case ALL: + status = H5Sselect_all(file_dataspace); + VRFY((status >= 0), "H5Sselect_all succeeded"); + break; + } + + switch (mem_selection) { + case HYPER: + status = H5Sselect_hyperslab(mem_dataspace, H5S_SELECT_SET, start, stride, count, block); + VRFY((status >= 0),"hyperslab selection succeeded"); + break; + + case POINT: + if (num_points) { + status = H5Sselect_elements(mem_dataspace, H5S_SELECT_SET, num_points, coords); + VRFY((status >= 0),"Element selection succeeded"); + } + else { + status = H5Sselect_none(mem_dataspace); + VRFY((status >= 0),"none selection succeeded"); + } + break; + + case ALL: + status = H5Sselect_all(mem_dataspace); + VRFY((status >= 0), "H5Sselect_all succeeded"); + break; + } + + /* set up the collective transfer property list */ + xfer_plist = H5Pcreate(H5P_DATASET_XFER); + VRFY((xfer_plist >= 0), ""); + + status = H5Pset_dxpl_mpio(xfer_plist, H5FD_MPIO_COLLECTIVE); + VRFY((status>= 0),"MPIO collective transfer property succeeded"); + if(dxfer_coll_type == DXFER_INDEPENDENT_IO) { + status = H5Pset_dxpl_mpio_collective_opt(xfer_plist, H5FD_MPIO_INDIVIDUAL_IO); + VRFY((status>= 0),"set independent IO collectively succeeded"); + } + + switch(api_option){ + case API_LINK_HARD: + status = H5Pset_dxpl_mpio_chunk_opt(xfer_plist,H5FD_MPIO_CHUNK_ONE_IO); + VRFY((status>= 0),"collective chunk optimization succeeded"); + break; + + case API_MULTI_HARD: + status = H5Pset_dxpl_mpio_chunk_opt(xfer_plist,H5FD_MPIO_CHUNK_MULTI_IO); + VRFY((status>= 0),"collective chunk optimization succeeded "); + break; + + case API_LINK_TRUE: + status = H5Pset_dxpl_mpio_chunk_opt_num(xfer_plist,2); + VRFY((status>= 0),"collective chunk optimization set chunk number succeeded"); + break; + + case API_LINK_FALSE: + status = H5Pset_dxpl_mpio_chunk_opt_num(xfer_plist,6); + VRFY((status>= 0),"collective chunk optimization set chunk number succeeded"); + break; + + case API_MULTI_COLL: + status = H5Pset_dxpl_mpio_chunk_opt_num(xfer_plist,8);/* make sure it is using multi-chunk IO */ + VRFY((status>= 0),"collective chunk optimization set chunk number succeeded"); + status = H5Pset_dxpl_mpio_chunk_opt_ratio(xfer_plist,50); + VRFY((status>= 0),"collective chunk optimization set chunk ratio succeeded"); + break; + + case API_MULTI_IND: + status = H5Pset_dxpl_mpio_chunk_opt_num(xfer_plist,8);/* make sure it is using multi-chunk IO */ + VRFY((status>= 0),"collective chunk optimization set chunk number succeeded"); + status = H5Pset_dxpl_mpio_chunk_opt_ratio(xfer_plist,100); + VRFY((status>= 0),"collective chunk optimization set chunk ratio succeeded"); + break; + + default: + ; + } + +#ifdef H5_HAVE_INSTRUMENTED_LIBRARY + if(facc_type == FACC_MPIO) { + switch(api_option) { + case API_LINK_HARD: + prop_value = H5D_XFER_COLL_CHUNK_DEF; + status = H5Pinsert2(xfer_plist, H5D_XFER_COLL_CHUNK_LINK_HARD_NAME, H5D_XFER_COLL_CHUNK_SIZE, &prop_value, + NULL, NULL, NULL, NULL, NULL, NULL); + VRFY((status >= 0),"testing property list inserted succeeded"); + break; + + case API_MULTI_HARD: + prop_value = H5D_XFER_COLL_CHUNK_DEF; + status = H5Pinsert2(xfer_plist, H5D_XFER_COLL_CHUNK_MULTI_HARD_NAME, H5D_XFER_COLL_CHUNK_SIZE, &prop_value, + NULL, NULL, NULL, NULL, NULL, NULL); + VRFY((status >= 0),"testing property list inserted succeeded"); + break; + + case API_LINK_TRUE: + prop_value = H5D_XFER_COLL_CHUNK_DEF; + status = H5Pinsert2(xfer_plist, H5D_XFER_COLL_CHUNK_LINK_NUM_TRUE_NAME, H5D_XFER_COLL_CHUNK_SIZE, &prop_value, + NULL, NULL, NULL, NULL, NULL, NULL); + VRFY((status >= 0),"testing property list inserted succeeded"); + break; + + case API_LINK_FALSE: + prop_value = H5D_XFER_COLL_CHUNK_DEF; + status = H5Pinsert2(xfer_plist, H5D_XFER_COLL_CHUNK_LINK_NUM_FALSE_NAME, H5D_XFER_COLL_CHUNK_SIZE, &prop_value, + NULL, NULL, NULL, NULL, NULL, NULL); + VRFY((status >= 0),"testing property list inserted succeeded"); + break; + + case API_MULTI_COLL: + prop_value = H5D_XFER_COLL_CHUNK_DEF; + status = H5Pinsert2(xfer_plist, H5D_XFER_COLL_CHUNK_MULTI_RATIO_COLL_NAME, H5D_XFER_COLL_CHUNK_SIZE, &prop_value, + NULL, NULL, NULL, NULL, NULL, NULL); + VRFY((status >= 0),"testing property list inserted succeeded"); + break; + + case API_MULTI_IND: + prop_value = H5D_XFER_COLL_CHUNK_DEF; + status = H5Pinsert2(xfer_plist, H5D_XFER_COLL_CHUNK_MULTI_RATIO_IND_NAME, H5D_XFER_COLL_CHUNK_SIZE, &prop_value, + NULL, NULL, NULL, NULL, NULL, NULL); + VRFY((status >= 0),"testing property list inserted succeeded"); + break; + + default: + ; + } + } +#endif + + /* write data collectively */ + status = H5Dwrite(dataset, H5T_NATIVE_INT, mem_dataspace, file_dataspace, + xfer_plist, data_array1); + VRFY((status >= 0),"dataset write succeeded"); + +#ifdef H5_HAVE_INSTRUMENTED_LIBRARY + if(facc_type == FACC_MPIO) { + switch(api_option){ + case API_LINK_HARD: + status = H5Pget(xfer_plist,H5D_XFER_COLL_CHUNK_LINK_HARD_NAME,&prop_value); + VRFY((status >= 0),"testing property list get succeeded"); + VRFY((prop_value == 0),"API to set LINK COLLECTIVE IO directly succeeded"); + break; + + case API_MULTI_HARD: + status = H5Pget(xfer_plist,H5D_XFER_COLL_CHUNK_MULTI_HARD_NAME,&prop_value); + VRFY((status >= 0),"testing property list get succeeded"); + VRFY((prop_value == 0),"API to set MULTI-CHUNK COLLECTIVE IO optimization succeeded"); + break; + + case API_LINK_TRUE: + status = H5Pget(xfer_plist,H5D_XFER_COLL_CHUNK_LINK_NUM_TRUE_NAME,&prop_value); + VRFY((status >= 0),"testing property list get succeeded"); + VRFY((prop_value == 0),"API to set LINK COLLECTIVE IO succeeded"); + break; + + case API_LINK_FALSE: + status = H5Pget(xfer_plist,H5D_XFER_COLL_CHUNK_LINK_NUM_FALSE_NAME,&prop_value); + VRFY((status >= 0),"testing property list get succeeded"); + VRFY((prop_value == 0),"API to set LINK IO transferring to multi-chunk IO succeeded"); + break; + + case API_MULTI_COLL: + status = H5Pget(xfer_plist,H5D_XFER_COLL_CHUNK_MULTI_RATIO_COLL_NAME,&prop_value); + VRFY((status >= 0),"testing property list get succeeded"); + VRFY((prop_value == 0),"API to set MULTI-CHUNK COLLECTIVE IO with optimization succeeded"); + break; + + case API_MULTI_IND: + status = H5Pget(xfer_plist,H5D_XFER_COLL_CHUNK_MULTI_RATIO_IND_NAME,&prop_value); + VRFY((status >= 0),"testing property list get succeeded"); + VRFY((prop_value == 0),"API to set MULTI-CHUNK IO transferring to independent IO succeeded"); + break; + + default: + ; + } + } +#endif + + status = H5Dclose(dataset); + VRFY((status >= 0),""); + + status = H5Pclose(xfer_plist); + VRFY((status >= 0),"property list closed"); + + status = H5Sclose(file_dataspace); + VRFY((status >= 0),""); + + status = H5Sclose(mem_dataspace); + VRFY((status >= 0),""); + + + status = H5Fclose(file); + VRFY((status >= 0),""); + + if (data_array1) HDfree(data_array1); + + /* Use collective read to verify the correctness of collective write. */ + + /* allocate memory for data buffer */ + data_array1 = (int *)HDmalloc(dims[0]*dims[1]*sizeof(int)); + VRFY((data_array1 != NULL), "data_array1 malloc succeeded"); + + /* allocate memory for data buffer */ + data_origin1 = (int *)HDmalloc(dims[0]*dims[1]*sizeof(int)); + VRFY((data_origin1 != NULL), "data_origin1 malloc succeeded"); + + acc_plist = create_faccess_plist(comm, info, facc_type); + VRFY((acc_plist >= 0),"MPIO creation property list succeeded"); + + file = H5Fopen(filename,H5F_ACC_RDONLY,acc_plist); + VRFY((file >= 0),"H5Fcreate succeeded"); + + status = H5Pclose(acc_plist); + VRFY((status >= 0),""); + + /* open the collective dataset*/ + dataset = H5Dopen2(file, DSET_COLLECTIVE_CHUNK_NAME, H5P_DEFAULT); + VRFY((dataset >= 0), ""); + + /* set up dimensions of the slab this process accesses */ + ccslab_set(mpi_rank, mpi_size, start, count, stride, block, select_factor); + + /* obtain the file and mem dataspace*/ + file_dataspace = H5Dget_space (dataset); + VRFY((file_dataspace >= 0), ""); + + if (ALL != mem_selection) { + mem_dataspace = H5Dget_space (dataset); + VRFY((mem_dataspace >= 0), ""); + } + else { + /* Warning: H5Screate_simple requires an array of hsize_t elements + * even if we only pass only a single value. Attempting anything else + * appears to cause problems with 32 bit compilers. + */ + hsize_t dsdims[1] = {num_points}; + mem_dataspace = H5Screate_simple (1, dsdims, NULL); + VRFY((mem_dataspace >= 0), "mem_dataspace create succeeded"); + } + + switch (file_selection) { + case HYPER: + status = H5Sselect_hyperslab(file_dataspace, H5S_SELECT_SET, start, stride, count, block); + VRFY((status >= 0),"hyperslab selection succeeded"); + break; + + case POINT: + if (num_points) { + status = H5Sselect_elements(file_dataspace, H5S_SELECT_SET, num_points, coords); + VRFY((status >= 0),"Element selection succeeded"); + } + else { + status = H5Sselect_none(file_dataspace); + VRFY((status >= 0),"none selection succeeded"); + } + break; + + case ALL: + status = H5Sselect_all(file_dataspace); + VRFY((status >= 0), "H5Sselect_all succeeded"); + break; + } + + switch (mem_selection) { + case HYPER: + status = H5Sselect_hyperslab(mem_dataspace, H5S_SELECT_SET, start, stride, count, block); + VRFY((status >= 0),"hyperslab selection succeeded"); + break; + + case POINT: + if (num_points) { + status = H5Sselect_elements(mem_dataspace, H5S_SELECT_SET, num_points, coords); + VRFY((status >= 0),"Element selection succeeded"); + } + else { + status = H5Sselect_none(mem_dataspace); + VRFY((status >= 0),"none selection succeeded"); + } + break; + + case ALL: + status = H5Sselect_all(mem_dataspace); + VRFY((status >= 0), "H5Sselect_all succeeded"); + break; + } + + /* fill dataset with test data */ + ccdataset_fill(start, stride,count,block, data_origin1, mem_selection); + xfer_plist = H5Pcreate (H5P_DATASET_XFER); + VRFY((xfer_plist >= 0),""); + + status = H5Pset_dxpl_mpio(xfer_plist, H5FD_MPIO_COLLECTIVE); + VRFY((status>= 0),"MPIO collective transfer property succeeded"); + if(dxfer_coll_type == DXFER_INDEPENDENT_IO) { + status = H5Pset_dxpl_mpio_collective_opt(xfer_plist,H5FD_MPIO_INDIVIDUAL_IO); + VRFY((status>= 0),"set independent IO collectively succeeded"); + } + + status = H5Dread(dataset, H5T_NATIVE_INT, mem_dataspace, file_dataspace, + xfer_plist, data_array1); + VRFY((status >=0),"dataset read succeeded"); + + /* verify the read data with original expected data */ + status = ccdataset_vrfy(start, count, stride, block, data_array1, data_origin1, mem_selection); + if (status) nerrors++; + + status = H5Pclose(xfer_plist); + VRFY((status >= 0),"property list closed"); + + /* close dataset collectively */ + status=H5Dclose(dataset); + VRFY((status >= 0), "H5Dclose"); + + /* release all IDs created */ + status = H5Sclose(file_dataspace); + VRFY((status >= 0),"H5Sclose"); + + status = H5Sclose(mem_dataspace); + VRFY((status >= 0),"H5Sclose"); + + /* close the file collectively */ + status = H5Fclose(file); + VRFY((status >= 0),"H5Fclose"); + + /* release data buffers */ + if(coords) HDfree(coords); + if(data_array1) HDfree(data_array1); + if(data_origin1) HDfree(data_origin1); + +} + + + +/***************************************************************************** + * + * Function: do_express_test() + * + * Purpose: Do an MPI_Allreduce to obtain the maximum value returned + * by GetTestExpress() across all processes. Return this + * value. + * + * Envirmoment variables can be different across different + * processes. This function ensures that all processes agree + * on whether to do an express test. + * + * Return: Success: Maximum of the values returned by + * GetTestExpress() across all processes. + * + * Failure: -1 + * + * Programmer: JRM -- 4/25/06 + * + *****************************************************************************/ +static int +do_express_test(int world_mpi_rank) +{ + int express_test; + int max_express_test; + int result; + + express_test = GetTestExpress(); + + result = MPI_Allreduce((void *)&express_test, + (void *)&max_express_test, + 1, + MPI_INT, + MPI_MAX, + MPI_COMM_WORLD); + + if ( result != MPI_SUCCESS ) { + nerrors++; + max_express_test = -1; + if ( VERBOSE_MED && (world_mpi_rank == 0)) { + HDfprintf(stdout, "%d:%s: MPI_Allreduce() failed.\n", + world_mpi_rank, FUNC ); + } + } + + return(max_express_test); + +} /* do_express_test() */ + + +int main(int argc, char **argv) +{ + int ExpressMode = 0; + hsize_t newsize = 1048576; + hsize_t oldsize = H5S_mpio_set_bigio_count(newsize); + + if (newsize != oldsize) { + bigcount = newsize * 2; + } + + MPI_Init(&argc, &argv); + MPI_Comm_size(MPI_COMM_WORLD,&mpi_size); + MPI_Comm_rank(MPI_COMM_WORLD,&mpi_rank); + + ExpressMode = do_express_test(mpi_rank); + + dataset_big_write(); + MPI_Barrier(MPI_COMM_WORLD); + + dataset_big_read(); + MPI_Barrier(MPI_COMM_WORLD); + + if (ExpressMode > 0) { + printf("***Express test mode on. Several tests are skipped\n"); + } + else { + coll_chunk1(); + MPI_Barrier(MPI_COMM_WORLD); + coll_chunk2(); + MPI_Barrier(MPI_COMM_WORLD); + coll_chunk3(); + } + + /* close HDF5 library */ + H5close(); + + MPI_Finalize(); + + return 0; +} + -- cgit v0.12 From f25e3bd91ffe63f14b89e18335094f7e60ce47ff Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Wed, 20 Sep 2017 10:43:30 -0500 Subject: Merge java autotools script chkexe and chklog changes --- java/examples/datasets/runExample.sh.in | 90 +++++++++++++++++++++++++------- java/examples/datatypes/runExample.sh.in | 54 ++++++++++++------- java/examples/groups/runExample.sh.in | 23 +++++--- java/examples/intro/runExample.sh.in | 21 +++++--- java/test/junit.sh.in | 8 ++- 5 files changed, 143 insertions(+), 53 deletions(-) diff --git a/java/examples/datasets/runExample.sh.in b/java/examples/datasets/runExample.sh.in index 21c3439..740b07d 100644 --- a/java/examples/datasets/runExample.sh.in +++ b/java/examples/datasets/runExample.sh.in @@ -228,7 +228,10 @@ esac export LD_LIBRARY_PATH echo "$JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH examples.datasets.H5Ex_D_Alloc" -($JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH examples.datasets.H5Ex_D_Alloc > H5Ex_D_Alloc.out) +TESTING examples.datasets.H5Ex_D_Alloc +( +$RUNSERIAL $JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH examples.datasets.H5Ex_D_Alloc > H5Ex_D_Alloc.out +) if diff H5Ex_D_Alloc.out examples.datasets.H5Ex_D_Alloc.txt > /dev/null; then echo " PASSED datasets.H5Ex_D_Alloc" else @@ -237,7 +240,10 @@ else fi echo "$JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH examples.datasets.H5Ex_D_Checksum" -($JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH examples.datasets.H5Ex_D_Checksum > H5Ex_D_Checksum.out) +TESTING examples.datasets.H5Ex_D_Checksum +( +$RUNSERIAL $JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH examples.datasets.H5Ex_D_Checksum > H5Ex_D_Checksum.out +) if diff H5Ex_D_Checksum.out examples.datasets.H5Ex_D_Checksum.txt > /dev/null; then echo " PASSED datasets.H5Ex_D_Checksum" else @@ -246,7 +252,10 @@ else fi echo "$JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH examples.datasets.H5Ex_D_Chunk" -($JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH examples.datasets.H5Ex_D_Chunk > H5Ex_D_Chunk.out) +TESTING examples.datasets.H5Ex_D_Chunk +( +$RUNSERIAL $JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH examples.datasets.H5Ex_D_Chunk > H5Ex_D_Chunk.out +) if diff H5Ex_D_Chunk.out examples.datasets.H5Ex_D_Chunk.txt > /dev/null; then echo " PASSED datasets.H5Ex_D_Chunk" else @@ -255,7 +264,10 @@ else fi echo "$JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH examples.datasets.H5Ex_D_Compact" -($JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH examples.datasets.H5Ex_D_Compact > H5Ex_D_Compact.out) +TESTING examples.datasets.H5Ex_D_Compact +( +$RUNSERIAL $JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH examples.datasets.H5Ex_D_Compact > H5Ex_D_Compact.out +) if diff H5Ex_D_Compact.out examples.datasets.H5Ex_D_Compact.txt > /dev/null; then echo " PASSED datasets.H5Ex_D_Compact" else @@ -264,7 +276,10 @@ else fi echo "$JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH examples.datasets.H5Ex_D_External" -($JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH examples.datasets.H5Ex_D_External > H5Ex_D_External.out) +TESTING examples.datasets.H5Ex_D_External +( +$RUNSERIAL $JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH examples.datasets.H5Ex_D_External > H5Ex_D_External.out +) if diff H5Ex_D_External.out examples.datasets.H5Ex_D_External.txt > /dev/null; then echo " PASSED datasets.H5Ex_D_External" else @@ -273,7 +288,10 @@ else fi echo "$JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH examples.datasets.H5Ex_D_FillValue" -($JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH examples.datasets.H5Ex_D_FillValue > H5Ex_D_FillValue.out) +TESTING examples.datasets.H5Ex_D_FillValue +( +$RUNSERIAL $JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH examples.datasets.H5Ex_D_FillValue > H5Ex_D_FillValue.out +) if diff H5Ex_D_FillValue.out examples.datasets.H5Ex_D_FillValue.txt > /dev/null; then echo " PASSED datasets.H5Ex_D_FillValue" else @@ -282,7 +300,10 @@ else fi echo "$JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH examples.datasets.H5Ex_D_Gzip" -($JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH examples.datasets.H5Ex_D_Gzip > H5Ex_D_Gzip.out) +TESTING examples.datasets.H5Ex_D_Gzip +( +$RUNSERIAL $JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH examples.datasets.H5Ex_D_Gzip > H5Ex_D_Gzip.out +) if diff H5Ex_D_Gzip.out examples.datasets.H5Ex_D_Gzip.txt > /dev/null; then echo " PASSED datasets.H5Ex_D_Gzip" else @@ -291,7 +312,10 @@ else fi echo "$JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH examples.datasets.H5Ex_D_Hyperslab" -($JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH examples.datasets.H5Ex_D_Hyperslab > H5Ex_D_Hyperslab.out) +TESTING examples.datasets.H5Ex_D_Hyperslab +( +$RUNSERIAL $JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH examples.datasets.H5Ex_D_Hyperslab > H5Ex_D_Hyperslab.out +) if diff H5Ex_D_Hyperslab.out examples.datasets.H5Ex_D_Hyperslab.txt > /dev/null; then echo " PASSED datasets.H5Ex_D_Hyperslab" else @@ -300,7 +324,10 @@ else fi echo "$JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH examples.datasets.H5Ex_D_ReadWrite" -($JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH examples.datasets.H5Ex_D_ReadWrite > H5Ex_D_ReadWrite.out) +TESTING examples.datasets.H5Ex_D_ReadWrite +( +$RUNSERIAL $JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH examples.datasets.H5Ex_D_ReadWrite > H5Ex_D_ReadWrite.out +) if diff H5Ex_D_ReadWrite.out examples.datasets.H5Ex_D_ReadWrite.txt > /dev/null; then echo " PASSED datasets.H5Ex_D_ReadWrite" else @@ -309,7 +336,10 @@ else fi echo "$JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH examples.datasets.H5Ex_D_Shuffle" -($JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH examples.datasets.H5Ex_D_Shuffle > H5Ex_D_Shuffle.out) +TESTING examples.datasets.H5Ex_D_Shuffle +( +$RUNSERIAL $JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH examples.datasets.H5Ex_D_Shuffle > H5Ex_D_Shuffle.out +) if diff H5Ex_D_Shuffle.out examples.datasets.H5Ex_D_Shuffle.txt > /dev/null; then echo " PASSED datasets.H5Ex_D_Shuffle" else @@ -319,7 +349,10 @@ fi if test $USE_FILTER_SZIP = "yes"; then echo "$JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH examples.datasets.H5Ex_D_Szip" - ($JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH examples.datasets.H5Ex_D_Szip > H5Ex_D_Szip.out) + TESTING examples.datasets.H5Ex_D_Szip + ( + $RUNSERIAL $JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH examples.datasets.H5Ex_D_Szip > H5Ex_D_Szip.out + ) if diff H5Ex_D_Szip.out examples.datasets.H5Ex_D_Szip.txt > /dev/null; then echo " PASSED datasets.H5Ex_D_Szip" else @@ -329,7 +362,10 @@ if test $USE_FILTER_SZIP = "yes"; then fi echo "$JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH examples.datasets.H5Ex_D_UnlimitedAdd" -($JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH examples.datasets.H5Ex_D_UnlimitedAdd > H5Ex_D_UnlimitedAdd.out) +TESTING examples.datasets.H5Ex_D_UnlimitedAdd +( +$RUNSERIAL $JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH examples.datasets.H5Ex_D_UnlimitedAdd > H5Ex_D_UnlimitedAdd.out +) if diff H5Ex_D_UnlimitedAdd.out examples.datasets.H5Ex_D_UnlimitedAdd.txt > /dev/null; then echo " PASSED datasets.H5Ex_D_UnlimitedAdd" else @@ -338,7 +374,10 @@ else fi echo "$JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH examples.datasets.H5Ex_D_UnlimitedGzip" -($JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH examples.datasets.H5Ex_D_UnlimitedGzip > H5Ex_D_UnlimitedGzip.out) +TESTING examples.datasets.H5Ex_D_UnlimitedGzip +( +$RUNSERIAL $JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH examples.datasets.H5Ex_D_UnlimitedGzip > H5Ex_D_UnlimitedGzip.out +) if diff H5Ex_D_External.out examples.datasets.H5Ex_D_External.txt > /dev/null; then echo " PASSED datasets.H5Ex_D_UnlimitedGzip" else @@ -347,7 +386,10 @@ else fi echo "$JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH examples.datasets.H5Ex_D_UnlimitedMod" -($JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH examples.datasets.H5Ex_D_UnlimitedMod > H5Ex_D_UnlimitedMod.out) +TESTING examples.datasets.H5Ex_D_UnlimitedMod +( +$RUNSERIAL $JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH examples.datasets.H5Ex_D_UnlimitedMod > H5Ex_D_UnlimitedMod.out +) if diff H5Ex_D_UnlimitedMod.out examples.datasets.H5Ex_D_UnlimitedMod.txt > /dev/null; then echo " PASSED datasets.H5Ex_D_UnlimitedMod" else @@ -356,7 +398,10 @@ else fi echo "$JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH examples.datasets.H5Ex_D_Nbit" -($JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH examples.datasets.H5Ex_D_Nbit > H5Ex_D_Nbit.out) +TESTING examples.datasets.H5Ex_D_Nbit +( +$RUNSERIAL $JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH examples.datasets.H5Ex_D_Nbit > H5Ex_D_Nbit.out +) if diff H5Ex_D_Nbit.out examples.datasets.H5Ex_D_Nbit.txt > /dev/null; then echo " PASSED datasets.H5Ex_D_Nbit" else @@ -365,7 +410,10 @@ else fi echo "$JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH examples.datasets.H5Ex_D_Transform" -($JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH examples.datasets.H5Ex_D_Transform > H5Ex_D_Transform.out) +TESTING examples.datasets.H5Ex_D_Transform +( +$RUNSERIAL $JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH examples.datasets.H5Ex_D_Transform > H5Ex_D_Transform.out +) if diff H5Ex_D_Transform.out examples.datasets.H5Ex_D_Transform.txt > /dev/null; then echo " PASSED datasets.H5Ex_D_Transform" else @@ -374,7 +422,10 @@ else fi echo "$JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH examples.datasets.H5Ex_D_Sofloat" -($JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH examples.datasets.H5Ex_D_Sofloat > H5Ex_D_Sofloat.out) +TESTING examples.datasets.H5Ex_D_Sofloat +( +$RUNSERIAL $JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH examples.datasets.H5Ex_D_Sofloat > H5Ex_D_Sofloat.out +) if diff H5Ex_D_Sofloat.out examples.datasets.H5Ex_D_Sofloat.txt > /dev/null; then echo " PASSED datasets.H5Ex_D_Sofloat" else @@ -383,7 +434,10 @@ else fi echo "$JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH examples.datasets.H5Ex_D_Soint" -($JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH examples.datasets.H5Ex_D_Soint > H5Ex_D_Soint.out) +TESTING examples.datasets.H5Ex_D_Soint +( +$RUNSERIAL $JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH examples.datasets.H5Ex_D_Soint > H5Ex_D_Soint.out +) if diff H5Ex_D_Soint.out examples.datasets.H5Ex_D_Soint.txt > /dev/null; then echo " PASSED datasets.H5Ex_D_Soint" else diff --git a/java/examples/datatypes/runExample.sh.in b/java/examples/datatypes/runExample.sh.in index 32e9ade..590a547 100644 --- a/java/examples/datatypes/runExample.sh.in +++ b/java/examples/datatypes/runExample.sh.in @@ -224,7 +224,8 @@ esac export LD_LIBRARY_PATH echo "$JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH examples.datatypes.H5Ex_T_Array" -($JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH examples.datatypes.H5Ex_T_Array > H5Ex_T_Array.out) +TESTING examples.datatypes.H5Ex_T_Array +($RUNSERIAL $JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH examples.datatypes.H5Ex_T_Array > H5Ex_T_Array.out) if diff H5Ex_T_Array.out examples.datatypes.H5Ex_T_Array.txt > /dev/null; then echo " PASSED datatypes.H5Ex_T_Array" else @@ -233,7 +234,8 @@ else fi echo "$JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH examples.datatypes.H5Ex_T_ArrayAttribute" -($JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH examples.datatypes.H5Ex_T_ArrayAttribute > H5Ex_T_ArrayAttribute.out) +TESTING examples.datatypes.H5Ex_T_ArrayAttribute +($RUNSERIAL $JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH examples.datatypes.H5Ex_T_ArrayAttribute > H5Ex_T_ArrayAttribute.out) if diff H5Ex_T_ArrayAttribute.out examples.datatypes.H5Ex_T_ArrayAttribute.txt > /dev/null; then echo " PASSED datatypes.H5Ex_T_ArrayAttribute" else @@ -242,7 +244,8 @@ else fi echo "$JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH examples.datatypes.H5Ex_T_Bit" -($JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH examples.datatypes.H5Ex_T_Bit > H5Ex_T_Bit.out) +TESTING examples.datatypes.H5Ex_T_Bit +($RUNSERIAL $JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH examples.datatypes.H5Ex_T_Bit > H5Ex_T_Bit.out) if diff H5Ex_T_Bit.out examples.datatypes.H5Ex_T_Bit.txt > /dev/null; then echo " PASSED datatypes.H5Ex_T_Bit" else @@ -251,7 +254,8 @@ else fi echo "$JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH examples.datatypes.H5Ex_T_BitAttribute" -($JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH examples.datatypes.H5Ex_T_BitAttribute > H5Ex_T_BitAttribute.out) +TESTING examples.datatypes.H5Ex_T_BitAttribute +($RUNSERIAL $JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH examples.datatypes.H5Ex_T_BitAttribute > H5Ex_T_BitAttribute.out) if diff H5Ex_T_BitAttribute.out examples.datatypes.H5Ex_T_BitAttribute.txt > /dev/null; then echo " PASSED datatypes.H5Ex_T_BitAttribute" else @@ -260,7 +264,8 @@ else fi echo "$JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH examples.datatypes.H5Ex_T_Commit" -($JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH examples.datatypes.H5Ex_T_Commit > H5Ex_T_Commit.out) +TESTING examples.datasets.H5Ex_T_Commit +($RUNSERIAL $JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH examples.datatypes.H5Ex_T_Commit > H5Ex_T_Commit.out) if diff H5Ex_T_Commit.out examples.datatypes.H5Ex_T_Commit.txt > /dev/null; then echo " PASSED datatypes.H5Ex_T_Commit" else @@ -269,7 +274,8 @@ else fi echo "$JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH examples.datatypes.H5Ex_T_Compound" -($JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH examples.datatypes.H5Ex_T_Compound > H5Ex_T_Compound.out) +TESTING examples.datatypes.H5Ex_T_Compound +($RUNSERIAL $JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH examples.datatypes.H5Ex_T_Compound > H5Ex_T_Compound.out) if diff H5Ex_T_Compound.out examples.datatypes.H5Ex_T_Compound.txt > /dev/null; then echo " PASSED datatypes.H5Ex_T_Compound" else @@ -278,7 +284,8 @@ else fi echo "$JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH examples.datatypes.H5Ex_T_CompoundAttribute" -($JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH examples.datatypes.H5Ex_T_CompoundAttribute > H5Ex_T_CompoundAttribute.out) +TESTING examples.datatypes.H5Ex_T_CompoundAttribute +($RUNSERIAL $JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH examples.datatypes.H5Ex_T_CompoundAttribute > H5Ex_T_CompoundAttribute.out) if diff H5Ex_T_CompoundAttribute.out examples.datatypes.H5Ex_T_CompoundAttribute.txt > /dev/null; then echo " PASSED datatypes.H5Ex_T_CompoundAttribute" else @@ -287,7 +294,8 @@ else fi echo "$JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH examples.datatypes.H5Ex_T_Float" -($JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH examples.datatypes.H5Ex_T_Float > H5Ex_T_Float.out) +TESTING examples.datatypes.H5Ex_T_Float +($RUNSERIAL $JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH examples.datatypes.H5Ex_T_Float > H5Ex_T_Float.out) if diff H5Ex_T_Float.out examples.datatypes.H5Ex_T_Float.txt > /dev/null; then echo " PASSED datatypes.H5Ex_T_Float" else @@ -296,7 +304,8 @@ else fi echo "$JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH examples.datatypes.H5Ex_T_FloatAttribute" -($JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH examples.datatypes.H5Ex_T_FloatAttribute > H5Ex_T_FloatAttribute.out) +TESTING examples.datatypes.H5Ex_T_FloatAttribute +($RUNSERIAL $JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH examples.datatypes.H5Ex_T_FloatAttribute > H5Ex_T_FloatAttribute.out) if diff H5Ex_T_FloatAttribute.out examples.datatypes.H5Ex_T_FloatAttribute.txt > /dev/null; then echo " PASSED datatypes.H5Ex_T_FloatAttribute" else @@ -305,7 +314,8 @@ else fi echo "$JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH examples.datatypes.H5Ex_T_Integer" -($JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH examples.datatypes.H5Ex_T_Integer > H5Ex_T_Integer.out) +TESTING examples.datatypes.H5Ex_T_Integer +($RUNSERIAL $JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH examples.datatypes.H5Ex_T_Integer > H5Ex_T_Integer.out) if diff H5Ex_T_Integer.out examples.datatypes.H5Ex_T_Integer.txt > /dev/null; then echo " PASSED datatypes.H5Ex_T_Integer" else @@ -314,7 +324,8 @@ else fi echo "$JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH examples.datatypes.H5Ex_T_IntegerAttribute" -($JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH examples.datatypes.H5Ex_T_IntegerAttribute > H5Ex_T_IntegerAttribute.out) +TESTING examples.datatypes.H5Ex_T_IntegerAttribute +($RUNSERIAL $JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH examples.datatypes.H5Ex_T_IntegerAttribute > H5Ex_T_IntegerAttribute.out) if diff H5Ex_T_IntegerAttribute.out examples.datatypes.H5Ex_T_IntegerAttribute.txt > /dev/null; then echo " PASSED datatypes.H5Ex_T_IntegerAttribute" else @@ -323,7 +334,8 @@ else fi echo "$JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH examples.datatypes.H5Ex_T_ObjectReference" -($JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH examples.datatypes.H5Ex_T_ObjectReference > H5Ex_T_ObjectReference.out) +TESTING examples.datatypes.H5Ex_T_ObjectReference +($RUNSERIAL $JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH examples.datatypes.H5Ex_T_ObjectReference > H5Ex_T_ObjectReference.out) if diff H5Ex_T_ObjectReference.out examples.datatypes.H5Ex_T_ObjectReference.txt > /dev/null; then echo " PASSED datatypes.H5Ex_T_ObjectReference" else @@ -332,7 +344,8 @@ else fi echo "$JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH examples.datatypes.H5Ex_T_ObjectReferenceAttribute" -($JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH examples.datatypes.H5Ex_T_ObjectReferenceAttribute > H5Ex_T_ObjectReferenceAttribute.out) +TESTING examples.datatypes.H5Ex_T_ObjectReferenceAttribute +($RUNSERIAL $JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH examples.datatypes.H5Ex_T_ObjectReferenceAttribute > H5Ex_T_ObjectReferenceAttribute.out) if diff H5Ex_T_ObjectReferenceAttribute.out examples.datatypes.H5Ex_T_ObjectReferenceAttribute.txt > /dev/null; then echo " PASSED datatypes.H5Ex_T_ObjectReferenceAttribute" else @@ -341,7 +354,8 @@ else fi echo "$JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH examples.datatypes.H5Ex_T_Opaque" -($JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH examples.datatypes.H5Ex_T_Opaque > H5Ex_T_Opaque.out) +TESTING examples.datatypes.H5Ex_T_Opaque +($RUNSERIAL $JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH examples.datatypes.H5Ex_T_Opaque > H5Ex_T_Opaque.out) if diff H5Ex_T_Opaque.out examples.datatypes.H5Ex_T_Opaque.txt > /dev/null; then echo " PASSED datatypes.H5Ex_T_Opaque" else @@ -350,7 +364,8 @@ else fi echo "$JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH examples.datatypes.H5Ex_T_OpaqueAttribute" -($JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH examples.datatypes.H5Ex_T_OpaqueAttribute > H5Ex_T_OpaqueAttribute.out) +TESTING examples.datatypes.H5Ex_T_OpaqueAttribute +($RUNSERIAL $JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH examples.datatypes.H5Ex_T_OpaqueAttribute > H5Ex_T_OpaqueAttribute.out) if diff H5Ex_T_OpaqueAttribute.out examples.datatypes.H5Ex_T_OpaqueAttribute.txt > /dev/null; then echo " PASSED datatypes.H5Ex_T_OpaqueAttribute" else @@ -359,7 +374,8 @@ else fi echo "$JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH examples.datatypes.H5Ex_T_String" -($JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH examples.datatypes.H5Ex_T_String > H5Ex_T_String.out) +TESTING examples.datatypes.H5Ex_T_String +($RUNSERIAL $JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH examples.datatypes.H5Ex_T_String > H5Ex_T_String.out) if diff H5Ex_T_String.out examples.datatypes.H5Ex_T_String.txt > /dev/null; then echo " PASSED datatypes.H5Ex_T_String" else @@ -368,7 +384,8 @@ else fi echo "$JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH examples.datatypes.H5Ex_T_StringAttribute" -($JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH examples.datatypes.H5Ex_T_StringAttribute > H5Ex_T_StringAttribute.out) +TESTING examples.datatypes.H5Ex_T_StringAttribute +($RUNSERIAL $JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH examples.datatypes.H5Ex_T_StringAttribute > H5Ex_T_StringAttribute.out) if diff H5Ex_T_StringAttribute.out examples.datatypes.H5Ex_T_StringAttribute.txt > /dev/null; then echo " PASSED datatypes.H5Ex_T_StringAttribute" else @@ -377,7 +394,8 @@ else fi echo "$JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH examples.datatypes.H5Ex_T_VLString" -($JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH examples.datatypes.H5Ex_T_VLString > H5Ex_T_VLString.out) +TESTING examples.datatypes.H5Ex_T_VLString +($RUNSERIAL $JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH examples.datatypes.H5Ex_T_VLString > H5Ex_T_VLString.out) if diff H5Ex_T_VLString.out examples.datatypes.H5Ex_T_VLString.txt > /dev/null; then echo " PASSED datatypes.H5Ex_T_VLString" else diff --git a/java/examples/groups/runExample.sh.in b/java/examples/groups/runExample.sh.in index 3732e7f..53c0045 100644 --- a/java/examples/groups/runExample.sh.in +++ b/java/examples/groups/runExample.sh.in @@ -158,7 +158,7 @@ CLEAN_DATAFILES_AND_BLDDIR() if [ "$INODE_SDIR" != "$INODE_DDIR" ]; then SDIR=`$DIRNAME $tstfile` $RM $BLDDIR/h5ex_g_iterate.h5 $RM $BLDDIR/h5ex_g_visit.h5 - fi + fi } COPY_REFFILES="$LIST_REF_FILES" @@ -270,7 +270,8 @@ esac export LD_LIBRARY_PATH echo "$JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH examples.groups.H5Ex_G_Create" -($JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH examples.groups.H5Ex_G_Create > H5Ex_G_Create.out) +TESTING examples.groups.H5Ex_G_Create +($RUNSERIAL $JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH examples.groups.H5Ex_G_Create > H5Ex_G_Create.out) if diff H5Ex_G_Create.out examples.groups.H5Ex_G_Create.txt > /dev/null; then echo " PASSED groups.H5Ex_G_Create" else @@ -279,7 +280,8 @@ else fi echo "$JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH examples.groups.H5Ex_G_Iterate" -($JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH examples.groups.H5Ex_G_Iterate > H5Ex_G_Iterate.out) +TESTING examples.groups.H5Ex_G_Iterate +($RUNSERIAL $JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH examples.groups.H5Ex_G_Iterate > H5Ex_G_Iterate.out) if diff H5Ex_G_Iterate.out examples.groups.H5Ex_G_Iterate.txt > /dev/null; then echo " PASSED groups.H5Ex_G_Iterate" else @@ -288,7 +290,8 @@ else fi echo "$JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH examples.groups.H5Ex_G_Compact" -($JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH examples.groups.H5Ex_G_Compact > H5Ex_G_Compact.out) +TESTING examples.groups.H5Ex_G_Compact +($RUNSERIAL $JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH examples.groups.H5Ex_G_Compact > H5Ex_G_Compact.out) if diff H5Ex_G_Compact.out examples.groups.H5Ex_G_Compact.txt > /dev/null; then echo " PASSED groups.H5Ex_G_Compact" else @@ -297,7 +300,8 @@ else fi echo "$JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH examples.groups.H5Ex_G_Corder" -($JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH examples.groups.H5Ex_G_Corder > H5Ex_G_Corder.out) +TESTING examples.groups.H5Ex_G_Corder +($RUNSERIAL $JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH examples.groups.H5Ex_G_Corder > H5Ex_G_Corder.out) if diff H5Ex_G_Corder.out examples.groups.H5Ex_G_Corder.txt > /dev/null; then echo " PASSED groups.H5Ex_G_Corder" else @@ -306,7 +310,8 @@ else fi echo "$JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH examples.groups.H5Ex_G_Intermediate" -($JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH examples.groups.H5Ex_G_Intermediate > H5Ex_G_Intermediate.out) +TESTING examples.groups.H5Ex_G_Intermediate +($RUNSERIAL $JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH examples.groups.H5Ex_G_Intermediate > H5Ex_G_Intermediate.out) if diff H5Ex_G_Intermediate.out examples.groups.H5Ex_G_Intermediate.txt > /dev/null; then echo " PASSED groups.H5Ex_G_Intermediate" else @@ -315,7 +320,8 @@ else fi echo "$JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH examples.groups.H5Ex_G_Phase" -($JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH examples.groups.H5Ex_G_Phase > H5Ex_G_Phase.out) +TESTING examples.groups.H5Ex_G_Phase +($RUNSERIAL $JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH examples.groups.H5Ex_G_Phase > H5Ex_G_Phase.out) if diff H5Ex_G_Phase.out examples.groups.H5Ex_G_Phase.txt > /dev/null; then echo " PASSED groups.H5Ex_G_Phase" else @@ -324,7 +330,8 @@ else fi echo "$JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH examples.groups.H5Ex_G_Visit" -($JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH examples.groups.H5Ex_G_Visit > H5Ex_G_Visit.out) +TESTING examples.groups.H5Ex_G_Visit +($RUNSERIAL $JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH examples.groups.H5Ex_G_Visit > H5Ex_G_Visit.out) if diff H5Ex_G_Visit.out examples.groups.H5Ex_G_Visit.txt > /dev/null; then echo " PASSED groups.H5Ex_G_Visit" else diff --git a/java/examples/intro/runExample.sh.in b/java/examples/intro/runExample.sh.in index 4533a1b..3c3036a 100644 --- a/java/examples/intro/runExample.sh.in +++ b/java/examples/intro/runExample.sh.in @@ -213,7 +213,8 @@ esac export LD_LIBRARY_PATH echo "$JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH examples.intro.H5_CreateDataset" -($JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH examples.intro.H5_CreateDataset > H5_CreateDataset.out) +TESTING examples.intro.H5_CreateDataset +($RUNSERIAL $JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH examples.intro.H5_CreateDataset > H5_CreateDataset.out) if diff H5_CreateDataset.out examples.intro.H5_CreateDataset.txt > /dev/null; then echo " PASSED intro.H5_CreateDataset" else @@ -222,7 +223,8 @@ else fi echo "$JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH examples.intro.H5_CreateAttribute" -($JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH examples.intro.H5_CreateAttribute > H5_CreateAttribute.out) +TESTING examples.intro.H5_CreateAttribute +($RUNSERIAL $JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH examples.intro.H5_CreateAttribute > H5_CreateAttribute.out) if diff H5_CreateAttribute.out examples.intro.H5_CreateAttribute.txt > /dev/null; then echo " PASSED intro.H5_CreateAttribute" else @@ -231,7 +233,8 @@ else fi echo "$JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH examples.intro.H5_CreateFile" -($JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH examples.intro.H5_CreateFile > H5_CreateFile.out) +TESTING examples.intro.H5_CreateFile +($RUNSERIAL $JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH examples.intro.H5_CreateFile > H5_CreateFile.out) if diff H5_CreateFile.out examples.intro.H5_CreateFile.txt > /dev/null; then echo " PASSED intro.H5_CreateFile" else @@ -240,7 +243,8 @@ else fi echo "$JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH examples.intro.H5_CreateGroup" -($JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH examples.intro.H5_CreateGroup > H5_CreateGroup.out) +TESTING examples.intro.H5_CreateGroup +($RUNSERIAL $JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH examples.intro.H5_CreateGroup > H5_CreateGroup.out) if diff H5_CreateGroup.out examples.intro.H5_CreateGroup.txt > /dev/null; then echo " PASSED intro.H5_CreateGroup" else @@ -249,7 +253,8 @@ else fi echo "$JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH examples.intro.H5_CreateGroupAbsoluteRelative" -($JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH examples.intro.H5_CreateGroupAbsoluteRelative > H5_CreateGroupAbsoluteRelative.out) +TESTING examples.intro.H5_CreateGroupAbsoluteRelative +($RUNSERIAL $JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH examples.intro.H5_CreateGroupAbsoluteRelative > H5_CreateGroupAbsoluteRelative.out) if diff H5_CreateGroupAbsoluteRelative.out examples.intro.H5_CreateGroupAbsoluteRelative.txt > /dev/null; then echo " PASSED intro.H5_CreateGroupAbsoluteRelative" else @@ -258,7 +263,8 @@ else fi echo "$JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH examples.intro.H5_CreateGroupDataset" -($JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH examples.intro.H5_CreateGroupDataset > H5_CreateGroupDataset.out) +TESTING examples.intro.H5_CreateGroupDataset +($RUNSERIAL $JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH examples.intro.H5_CreateGroupDataset > H5_CreateGroupDataset.out) if diff H5_CreateGroupDataset.out examples.intro.H5_CreateGroupDataset.txt > /dev/null; then echo " PASSED intro.H5_CreateGroupDataset" else @@ -267,7 +273,8 @@ else fi echo "$JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH examples.intro.H5_ReadWrite" -($JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH examples.intro.H5_ReadWrite > H5_ReadWrite.out) +TESTING examples.intro.H5_ReadWrite +($RUNSERIAL $JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH examples.intro.H5_ReadWrite > H5_ReadWrite.out) if diff H5_ReadWrite.out examples.intro.H5_ReadWrite.txt > /dev/null; then echo " PASSED intro.H5_ReadWrite" else diff --git a/java/test/junit.sh.in b/java/test/junit.sh.in index 32b0832..77379d0 100644 --- a/java/test/junit.sh.in +++ b/java/test/junit.sh.in @@ -190,7 +190,7 @@ CLEAN_DATAFILES_AND_BLDDIR() if [ "$INODE_SDIR" != "$INODE_DDIR" ]; then $RM $BLDDIR/JUnit-interface.ert $RM $BLDDIR/JUnit-interface.txt - fi + fi } # Print a line-line message left justified in a field of 70 characters @@ -258,7 +258,11 @@ esac export LD_LIBRARY_PATH echo "$JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH -ea org.junit.runner.JUnitCore test.TestAll" -($JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH -ea org.junit.runner.JUnitCore test.TestAll 1>$actual_ext 2>$actual_err) + # Run test. + TESTING JUnit + ( + $RUNSERIAL $JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH -ea org.junit.runner.JUnitCore test.TestAll + ) >$actual_ext 2>$actual_err # Extract file name, line number, version and thread IDs because they may be different sed -e 's/thread [0-9]*/thread (IDs)/' -e 's/: .*\.c /: (file name) /' \ -- cgit v0.12 From 2713d84ed3c392407abe74c893467b2dbebc509b Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Wed, 20 Sep 2017 10:49:27 -0500 Subject: Fix VS2013 build error --- tools/test/misc/vds/UC_common.h | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/tools/test/misc/vds/UC_common.h b/tools/test/misc/vds/UC_common.h index 962a091..c3fdb91 100644 --- a/tools/test/misc/vds/UC_common.h +++ b/tools/test/misc/vds/UC_common.h @@ -14,6 +14,15 @@ #ifndef USE_CASE_COMMON_H #define USE_CASE_COMMON_H +/* Use FUNC to safely handle variations of C99 __func__ keyword handling */ +#ifdef H5_HAVE_C99_FUNC +#define FUNC __func__ +#elif defined(H5_HAVE_FUNCTION) +#define FUNC __FUNCTION__ +#else +#error "We need __func__ or __FUNCTION__ to test function names!" +#endif + /****************************************** * Symbols used across multiple use cases * ******************************************/ -- cgit v0.12 From e082c984f1ed2902e789666ad36b7834ae723830 Mon Sep 17 00:00:00 2001 From: Richard Warren Date: Wed, 20 Sep 2017 12:10:38 -0400 Subject: Added t_bigio.c into the manifest and also added the issue description into RELEASE.txt --- MANIFEST | 1 + release_docs/RELEASE.txt | 24 +++++++++++++++++++++++- 2 files changed, 24 insertions(+), 1 deletion(-) diff --git a/MANIFEST b/MANIFEST index 2ec4e34..d51838c 100644 --- a/MANIFEST +++ b/MANIFEST @@ -1222,6 +1222,7 @@ ./testpar/COPYING ./testpar/Makefile.am +./testpar/t_bigio.c ./testpar/t_cache.c ./testpar/t_cache_image.c ./testpar/t_chunk_alloc.c diff --git a/release_docs/RELEASE.txt b/release_docs/RELEASE.txt index c35c195..7c87c4c 100644 --- a/release_docs/RELEASE.txt +++ b/release_docs/RELEASE.txt @@ -121,7 +121,29 @@ New Features Parallel Library: ----------------- - - + - Large MPI-IO transfers + + Previous releases of PHDF5 would fail when attempting to + read or write greater than 2GB of data in a single IO operation. + This issue stems principally from an MPI API whose definitions + utilize 32 bit integers to describe the number of data elements + and datatype that MPI should use to effect a data transfer. + Historically, HDF5 has invoked MPI-IO with the number of + elements in a contiguous buffer represented as the length + of that buffer in bytes. + + Resolving the issue and thus enabling larger MPI-IO transfers + is accomplished first, by detecting when a user IO request would + exceed the 2GB limit as described above. Once a transfer request + is identified as requiring special handling, PHDF5 now creates a + derived datatype consisting of a vector of fixed sized blocks + which is in turn wrapped within a single MPI_Type_struct to + contain the vector and any remaining data. The newly created + datatype is then used in place of MPI_BYTE and can be used to + fulfill the original user request without encountering API + errors. + + (RAW – 2017/09/20, HDFFV-8839) Fortran Library: ---------------- -- cgit v0.12 From d75400082e56a9e1912960d5b26ac74756c354fa Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Wed, 20 Sep 2017 11:55:51 -0500 Subject: Merge fix for VS2013 --- tools/test/misc/vds/UC_common.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/test/misc/vds/UC_common.h b/tools/test/misc/vds/UC_common.h index c3fdb91..78d8a11 100644 --- a/tools/test/misc/vds/UC_common.h +++ b/tools/test/misc/vds/UC_common.h @@ -41,7 +41,7 @@ #define FALSE 0 /* Testing macros */ -#define AT() printf (" at %s:%d in %s()...\n", __FILE__, __LINE__, __func__); +#define AT() printf (" at %s:%d in %s()...\n", __FILE__, __LINE__, FUNC); #define UC_ERROR {puts("*ERROR*"); fflush(stdout); AT(); goto error;} #endif /* USE_CASE_COMMON_H */ -- cgit v0.12 From ab561773326ed8d07fbcbe155e72c2a65ae5d6ba Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Wed, 20 Sep 2017 14:35:06 -0500 Subject: Rename java example scripts for test results table --- MANIFEST | 8 +- java/examples/datasets/JavaDatasetExample.sh.in | 459 ++++++++++++++++++++++ java/examples/datasets/Makefile.am | 4 +- java/examples/datasets/runExample.sh.in | 459 ---------------------- java/examples/datatypes/JavaDatatypeExample.sh.in | 417 ++++++++++++++++++++ java/examples/datatypes/Makefile.am | 4 +- java/examples/datatypes/runExample.sh.in | 417 -------------------- java/examples/groups/JavaGroupExample.sh.in | 354 +++++++++++++++++ java/examples/groups/Makefile.am | 4 +- java/examples/groups/runExample.sh.in | 354 ----------------- java/examples/intro/JavaIntroExample.sh.in | 296 ++++++++++++++ java/examples/intro/Makefile.am | 4 +- java/examples/intro/runExample.sh.in | 296 -------------- 13 files changed, 1538 insertions(+), 1538 deletions(-) create mode 100644 java/examples/datasets/JavaDatasetExample.sh.in delete mode 100644 java/examples/datasets/runExample.sh.in create mode 100644 java/examples/datatypes/JavaDatatypeExample.sh.in delete mode 100644 java/examples/datatypes/runExample.sh.in create mode 100644 java/examples/groups/JavaGroupExample.sh.in delete mode 100644 java/examples/groups/runExample.sh.in create mode 100644 java/examples/intro/JavaIntroExample.sh.in delete mode 100644 java/examples/intro/runExample.sh.in diff --git a/MANIFEST b/MANIFEST index 2ec4e34..ae9f637 100644 --- a/MANIFEST +++ b/MANIFEST @@ -2872,7 +2872,7 @@ ./java/examples/intro/Makefile.am ./java/examples/intro/CMakeLists.txt -./java/examples/intro/runExample.sh.in +./java/examples/intro/JavaIntroExample.sh.in ./java/examples/intro/H5_CreateAttribute.java ./java/examples/intro/H5_CreateDataset.java ./java/examples/intro/H5_CreateFile.java @@ -2883,7 +2883,7 @@ ./java/examples/groups/Makefile.am ./java/examples/groups/CMakeLists.txt -./java/examples/groups/runExample.sh.in +./java/examples/groups/JavaGroupExample.sh.in ./java/examples/groups/H5Ex_G_Create.java ./java/examples/groups/H5Ex_G_Iterate.java ./java/examples/groups/H5Ex_G_Compact.java @@ -2897,7 +2897,7 @@ ./java/examples/datasets/Makefile.am ./java/examples/datasets/CMakeLists.txt -./java/examples/datasets/runExample.sh.in +./java/examples/datasets/JavaDatasetExample.sh.in ./java/examples/datasets/H5Ex_D_Alloc.java ./java/examples/datasets/H5Ex_D_Checksum.java ./java/examples/datasets/H5Ex_D_Chunk.java @@ -2919,7 +2919,7 @@ ./java/examples/datatypes/Makefile.am ./java/examples/datatypes/CMakeLists.txt -./java/examples/datatypes/runExample.sh.in +./java/examples/datatypes/JavaDatatypeExample.sh.in ./java/examples/datatypes/H5Ex_T_Array.java ./java/examples/datatypes/H5Ex_T_ArrayAttribute.java ./java/examples/datatypes/H5Ex_T_Bit.java diff --git a/java/examples/datasets/JavaDatasetExample.sh.in b/java/examples/datasets/JavaDatasetExample.sh.in new file mode 100644 index 0000000..740b07d --- /dev/null +++ b/java/examples/datasets/JavaDatasetExample.sh.in @@ -0,0 +1,459 @@ +#! /bin/sh +# +# Copyright by The HDF Group. +# Copyright by the Board of Trustees of the University of Illinois. +# All rights reserved. +# +# This file is part of HDF5. The full HDF5 copyright notice, including +# terms governing use, modification, and redistribution, is contained in +# the COPYING file, which can be found at the root of the source code +# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. +# If you do not have access to either file, you may request a copy from +# help@hdfgroup.org. +# + +top_builddir=@top_builddir@ +top_srcdir=@top_srcdir@ +srcdir=@srcdir@ + +USE_FILTER_SZIP="@USE_FILTER_SZIP@" +USE_FILTER_DEFLATE="@USE_FILTER_DEFLATE@" + +TESTNAME=EX_Datasets +EXIT_SUCCESS=0 +EXIT_FAILURE=1 + +# Set up default variable values if not supplied by the user. +RM='rm -rf' +CMP='cmp' +DIFF='diff -c' +CP='cp' +DIRNAME='dirname' +LS='ls' +AWK='awk' + +nerrors=0 + +# where the libs exist +HDFLIB_HOME="$top_srcdir/java/lib" +BLDLIBDIR="$top_builddir/hdf5/lib" +BLDDIR="." +HDFTEST_HOME="$top_srcdir/java/examples/datasets" +JARFILE=jar@PACKAGE_TARNAME@-@PACKAGE_VERSION@.jar +TESTJARFILE=jar@PACKAGE_TARNAME@datasets.jar +test -d $BLDLIBDIR || mkdir -p $BLDLIBDIR + +###################################################################### +# library files +# -------------------------------------------------------------------- +# All the library files copy from source directory to test directory +# NOTE: Keep this framework to add/remove test files. +# This list are also used for checking exist. +# Comment '#' without space can be used. +# -------------------------------------------------------------------- +LIST_LIBRARY_FILES=" +$HDFLIB_HOME/slf4j-api-1.7.5.jar +$HDFLIB_HOME/ext/slf4j-simple-1.7.5.jar +$top_builddir/src/.libs/libhdf5.* +$top_builddir/java/src/jni/.libs/libhdf5_java.* +$top_builddir/java/src/$JARFILE +" +LIST_DATA_FILES=" +$HDFTEST_HOME/../testfiles/examples.datasets.H5Ex_D_Alloc.txt +$HDFTEST_HOME/../testfiles/examples.datasets.H5Ex_D_Checksum.txt +$HDFTEST_HOME/../testfiles/examples.datasets.H5Ex_D_Chunk.txt +$HDFTEST_HOME/../testfiles/examples.datasets.H5Ex_D_Compact.txt +$HDFTEST_HOME/../testfiles/examples.datasets.H5Ex_D_External.txt +$HDFTEST_HOME/../testfiles/examples.datasets.H5Ex_D_FillValue.txt +$HDFTEST_HOME/../testfiles/examples.datasets.H5Ex_D_Gzip.txt +$HDFTEST_HOME/../testfiles/examples.datasets.H5Ex_D_Hyperslab.txt +$HDFTEST_HOME/../testfiles/examples.datasets.H5Ex_D_ReadWrite.txt +$HDFTEST_HOME/../testfiles/examples.datasets.H5Ex_D_Shuffle.txt +$HDFTEST_HOME/../testfiles/examples.datasets.H5Ex_D_Szip.txt +$HDFTEST_HOME/../testfiles/examples.datasets.H5Ex_D_UnlimitedAdd.txt +$HDFTEST_HOME/../testfiles/examples.datasets.H5Ex_D_UnlimitedGzip.txt +$HDFTEST_HOME/../testfiles/examples.datasets.H5Ex_D_UnlimitedMod.txt +$HDFTEST_HOME/../testfiles/examples.datasets.H5Ex_D_Nbit.txt +$HDFTEST_HOME/../testfiles/examples.datasets.H5Ex_D_Transform.txt +$HDFTEST_HOME/../testfiles/examples.datasets.H5Ex_D_Sofloat.txt +$HDFTEST_HOME/../testfiles/examples.datasets.H5Ex_D_Soint.txt +" + +# +# copy files from source dirs to test dir +# +COPY_LIBFILES="$LIST_LIBRARY_FILES" + +COPY_LIBFILES_TO_BLDLIBDIR() +{ + # copy test files. Used -f to make sure get a new copy + for tstfile in $COPY_LIBFILES + do + # ignore '#' comment + echo $tstfile | tr -d ' ' | grep '^#' > /dev/null + RET=$? + if [ $RET -eq 1 ]; then + # skip cp if srcdir is same as destdir + # this occurs when build/test performed in source dir and + # make cp fail + SDIR=`$DIRNAME $tstfile` + INODE_SDIR=`$LS -i -d $SDIR | $AWK -F' ' '{print $1}'` + INODE_DDIR=`$LS -i -d $BLDLIBDIR | $AWK -F' ' '{print $1}'` + if [ "$INODE_SDIR" != "$INODE_DDIR" ]; then + $CP -f $tstfile $BLDLIBDIR + if [ $? -ne 0 ]; then + echo "Error: FAILED to copy $tstfile ." + + # Comment out this to CREATE expected file + exit $EXIT_FAILURE + fi + fi + fi + done +} + +CLEAN_LIBFILES_AND_BLDLIBDIR() +{ + # skip rm if srcdir is same as destdir + # this occurs when build/test performed in source dir and + # make cp fail + SDIR=`$DIRNAME $HDFLIB_HOME/slf4j-api-1.7.5.jar` + INODE_SDIR=`$LS -i -d $SDIR | $AWK -F' ' '{print $1}'` + INODE_DDIR=`$LS -i -d $BLDLIBDIR | $AWK -F' ' '{print $1}'` + if [ "$INODE_SDIR" != "$INODE_DDIR" ]; then + $RM $BLDLIBDIR + fi +} + +COPY_DATAFILES="$LIST_DATA_FILES" + +COPY_DATAFILES_TO_BLDDIR() +{ + # copy test files. Used -f to make sure get a new copy + for tstfile in $COPY_DATAFILES + do + # ignore '#' comment + echo $tstfile | tr -d ' ' | grep '^#' > /dev/null + RET=$? + if [ $RET -eq 1 ]; then + # skip cp if srcdir is same as destdir + # this occurs when build/test performed in source dir and + # make cp fail + SDIR=`$DIRNAME $tstfile` + INODE_SDIR=`$LS -i -d $SDIR | $AWK -F' ' '{print $1}'` + INODE_DDIR=`$LS -i -d $BLDDIR | $AWK -F' ' '{print $1}'` + if [ "$INODE_SDIR" != "$INODE_DDIR" ]; then + $CP -f $tstfile $BLDDIR + if [ $? -ne 0 ]; then + echo "Error: FAILED to copy $tstfile ." + + # Comment out this to CREATE expected file + exit $EXIT_FAILURE + fi + fi + fi + done +} + +CLEAN_DATAFILES_AND_BLDDIR() +{ + $RM $BLDDIR/examples.datasets.H5Ex_D_*.txt + $RM $BLDDIR/H5Ex_D_*.out + $RM $BLDDIR/H5Ex_D_*.h5 + $RM $BLDDIR/H5Ex_D_External.data +} + +# Print a line-line message left justified in a field of 70 characters +# beginning with the word "Testing". +# +TESTING() { + SPACES=" " + echo "Testing $* $SPACES" | cut -c1-70 | tr -d '\012' +} + +# where Java is installed (requires jdk1.7.x) +JAVAEXE=@JAVA@ +JAVAEXEFLAGS=@H5_JAVAFLAGS@ + +############################################################################### +# DO NOT MODIFY BELOW THIS LINE +############################################################################### + +# prepare for test +COPY_LIBFILES_TO_BLDLIBDIR +COPY_DATAFILES_TO_BLDDIR + +CPATH=".:"$BLDLIBDIR"/"$JARFILE":"$BLDLIBDIR"/slf4j-api-1.7.5.jar:"$BLDLIBDIR"/slf4j-simple-1.7.5.jar:"$TESTJARFILE"" + +TEST=/usr/bin/test +if [ ! -x /usr/bin/test ] +then +TEST=`which test` +fi + +if $TEST -z "$CLASSPATH"; then + CLASSPATH="" +fi +CLASSPATH=$CPATH":"$CLASSPATH +export CLASSPATH + +if $TEST -n "$JAVAPATH" ; then + PATH=$JAVAPATH":"$PATH + export PATH +fi + +if $TEST -e /bin/uname; then + os_name=`/bin/uname -s` +elif $TEST -e /usr/bin/uname; then + os_name=`/usr/bin/uname -s` +else + os_name=unknown +fi + +if $TEST -z "$LD_LIBRARY_PATH" ; then + LD_LIBRARY_PATH="" +fi + +case $os_name in + Darwin) + DYLD_LIBRARY_PATH=$BLDLIBDIR:$DYLD_LIBRARY_PATH + export DYLD_LIBRARY_PATH + LD_LIBRARY_PATH=$DYLD_LIBRARY_PATH + ;; + *) + LD_LIBRARY_PATH=$BLDLIBDIR:$LD_LIBRARY_PATH + ;; +esac + +export LD_LIBRARY_PATH + +echo "$JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH examples.datasets.H5Ex_D_Alloc" +TESTING examples.datasets.H5Ex_D_Alloc +( +$RUNSERIAL $JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH examples.datasets.H5Ex_D_Alloc > H5Ex_D_Alloc.out +) +if diff H5Ex_D_Alloc.out examples.datasets.H5Ex_D_Alloc.txt > /dev/null; then + echo " PASSED datasets.H5Ex_D_Alloc" +else + echo "**FAILED** datasets.H5Ex_D_Alloc" + nerrors="`expr $nerrors + 1`" +fi + +echo "$JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH examples.datasets.H5Ex_D_Checksum" +TESTING examples.datasets.H5Ex_D_Checksum +( +$RUNSERIAL $JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH examples.datasets.H5Ex_D_Checksum > H5Ex_D_Checksum.out +) +if diff H5Ex_D_Checksum.out examples.datasets.H5Ex_D_Checksum.txt > /dev/null; then + echo " PASSED datasets.H5Ex_D_Checksum" +else + echo "**FAILED** datasets.H5Ex_D_Checksum" + nerrors="`expr $nerrors + 1`" +fi + +echo "$JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH examples.datasets.H5Ex_D_Chunk" +TESTING examples.datasets.H5Ex_D_Chunk +( +$RUNSERIAL $JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH examples.datasets.H5Ex_D_Chunk > H5Ex_D_Chunk.out +) +if diff H5Ex_D_Chunk.out examples.datasets.H5Ex_D_Chunk.txt > /dev/null; then + echo " PASSED datasets.H5Ex_D_Chunk" +else + echo "**FAILED** datasets.H5Ex_D_Chunk" + nerrors="`expr $nerrors + 1`" +fi + +echo "$JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH examples.datasets.H5Ex_D_Compact" +TESTING examples.datasets.H5Ex_D_Compact +( +$RUNSERIAL $JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH examples.datasets.H5Ex_D_Compact > H5Ex_D_Compact.out +) +if diff H5Ex_D_Compact.out examples.datasets.H5Ex_D_Compact.txt > /dev/null; then + echo " PASSED datasets.H5Ex_D_Compact" +else + echo "**FAILED** datasets.H5Ex_D_Compact" + nerrors="`expr $nerrors + 1`" +fi + +echo "$JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH examples.datasets.H5Ex_D_External" +TESTING examples.datasets.H5Ex_D_External +( +$RUNSERIAL $JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH examples.datasets.H5Ex_D_External > H5Ex_D_External.out +) +if diff H5Ex_D_External.out examples.datasets.H5Ex_D_External.txt > /dev/null; then + echo " PASSED datasets.H5Ex_D_External" +else + echo "**FAILED** datasets.H5Ex_D_External" + nerrors="`expr $nerrors + 1`" +fi + +echo "$JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH examples.datasets.H5Ex_D_FillValue" +TESTING examples.datasets.H5Ex_D_FillValue +( +$RUNSERIAL $JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH examples.datasets.H5Ex_D_FillValue > H5Ex_D_FillValue.out +) +if diff H5Ex_D_FillValue.out examples.datasets.H5Ex_D_FillValue.txt > /dev/null; then + echo " PASSED datasets.H5Ex_D_FillValue" +else + echo "**FAILED** datasets.H5Ex_D_FillValue" + nerrors="`expr $nerrors + 1`" +fi + +echo "$JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH examples.datasets.H5Ex_D_Gzip" +TESTING examples.datasets.H5Ex_D_Gzip +( +$RUNSERIAL $JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH examples.datasets.H5Ex_D_Gzip > H5Ex_D_Gzip.out +) +if diff H5Ex_D_Gzip.out examples.datasets.H5Ex_D_Gzip.txt > /dev/null; then + echo " PASSED datasets.H5Ex_D_Gzip" +else + echo "**FAILED** datasets.H5Ex_D_Gzip" + nerrors="`expr $nerrors + 1`" +fi + +echo "$JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH examples.datasets.H5Ex_D_Hyperslab" +TESTING examples.datasets.H5Ex_D_Hyperslab +( +$RUNSERIAL $JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH examples.datasets.H5Ex_D_Hyperslab > H5Ex_D_Hyperslab.out +) +if diff H5Ex_D_Hyperslab.out examples.datasets.H5Ex_D_Hyperslab.txt > /dev/null; then + echo " PASSED datasets.H5Ex_D_Hyperslab" +else + echo "**FAILED** datasets.H5Ex_D_Hyperslab" + nerrors="`expr $nerrors + 1`" +fi + +echo "$JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH examples.datasets.H5Ex_D_ReadWrite" +TESTING examples.datasets.H5Ex_D_ReadWrite +( +$RUNSERIAL $JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH examples.datasets.H5Ex_D_ReadWrite > H5Ex_D_ReadWrite.out +) +if diff H5Ex_D_ReadWrite.out examples.datasets.H5Ex_D_ReadWrite.txt > /dev/null; then + echo " PASSED datasets.H5Ex_D_ReadWrite" +else + echo "**FAILED** datasets.H5Ex_D_ReadWrite" + nerrors="`expr $nerrors + 1`" +fi + +echo "$JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH examples.datasets.H5Ex_D_Shuffle" +TESTING examples.datasets.H5Ex_D_Shuffle +( +$RUNSERIAL $JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH examples.datasets.H5Ex_D_Shuffle > H5Ex_D_Shuffle.out +) +if diff H5Ex_D_Shuffle.out examples.datasets.H5Ex_D_Shuffle.txt > /dev/null; then + echo " PASSED datasets.H5Ex_D_Shuffle" +else + echo "**FAILED** datasets.H5Ex_D_Shuffle" + nerrors="`expr $nerrors + 1`" +fi + +if test $USE_FILTER_SZIP = "yes"; then + echo "$JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH examples.datasets.H5Ex_D_Szip" + TESTING examples.datasets.H5Ex_D_Szip + ( + $RUNSERIAL $JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH examples.datasets.H5Ex_D_Szip > H5Ex_D_Szip.out + ) + if diff H5Ex_D_Szip.out examples.datasets.H5Ex_D_Szip.txt > /dev/null; then + echo " PASSED datasets.H5Ex_D_Szip" + else + echo "**FAILED** datasets.H5Ex_D_Szip" + nerrors="`expr $nerrors + 1`" + fi +fi + +echo "$JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH examples.datasets.H5Ex_D_UnlimitedAdd" +TESTING examples.datasets.H5Ex_D_UnlimitedAdd +( +$RUNSERIAL $JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH examples.datasets.H5Ex_D_UnlimitedAdd > H5Ex_D_UnlimitedAdd.out +) +if diff H5Ex_D_UnlimitedAdd.out examples.datasets.H5Ex_D_UnlimitedAdd.txt > /dev/null; then + echo " PASSED datasets.H5Ex_D_UnlimitedAdd" +else + echo "**FAILED** datasets.H5Ex_D_UnlimitedAdd" + nerrors="`expr $nerrors + 1`" +fi + +echo "$JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH examples.datasets.H5Ex_D_UnlimitedGzip" +TESTING examples.datasets.H5Ex_D_UnlimitedGzip +( +$RUNSERIAL $JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH examples.datasets.H5Ex_D_UnlimitedGzip > H5Ex_D_UnlimitedGzip.out +) +if diff H5Ex_D_External.out examples.datasets.H5Ex_D_External.txt > /dev/null; then + echo " PASSED datasets.H5Ex_D_UnlimitedGzip" +else + echo "**FAILED** datasets.H5Ex_D_UnlimitedGzip" + nerrors="`expr $nerrors + 1`" +fi + +echo "$JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH examples.datasets.H5Ex_D_UnlimitedMod" +TESTING examples.datasets.H5Ex_D_UnlimitedMod +( +$RUNSERIAL $JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH examples.datasets.H5Ex_D_UnlimitedMod > H5Ex_D_UnlimitedMod.out +) +if diff H5Ex_D_UnlimitedMod.out examples.datasets.H5Ex_D_UnlimitedMod.txt > /dev/null; then + echo " PASSED datasets.H5Ex_D_UnlimitedMod" +else + echo "**FAILED** datasets.H5Ex_D_UnlimitedMod" + nerrors="`expr $nerrors + 1`" +fi + +echo "$JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH examples.datasets.H5Ex_D_Nbit" +TESTING examples.datasets.H5Ex_D_Nbit +( +$RUNSERIAL $JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH examples.datasets.H5Ex_D_Nbit > H5Ex_D_Nbit.out +) +if diff H5Ex_D_Nbit.out examples.datasets.H5Ex_D_Nbit.txt > /dev/null; then + echo " PASSED datasets.H5Ex_D_Nbit" +else + echo "**FAILED** datasets.H5Ex_D_Nbit" + nerrors="`expr $nerrors + 1`" +fi + +echo "$JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH examples.datasets.H5Ex_D_Transform" +TESTING examples.datasets.H5Ex_D_Transform +( +$RUNSERIAL $JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH examples.datasets.H5Ex_D_Transform > H5Ex_D_Transform.out +) +if diff H5Ex_D_Transform.out examples.datasets.H5Ex_D_Transform.txt > /dev/null; then + echo " PASSED datasets.H5Ex_D_Transform" +else + echo "**FAILED** datasets.H5Ex_D_Transform" + nerrors="`expr $nerrors + 1`" +fi + +echo "$JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH examples.datasets.H5Ex_D_Sofloat" +TESTING examples.datasets.H5Ex_D_Sofloat +( +$RUNSERIAL $JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH examples.datasets.H5Ex_D_Sofloat > H5Ex_D_Sofloat.out +) +if diff H5Ex_D_Sofloat.out examples.datasets.H5Ex_D_Sofloat.txt > /dev/null; then + echo " PASSED datasets.H5Ex_D_Sofloat" +else + echo "**FAILED** datasets.H5Ex_D_Sofloat" + nerrors="`expr $nerrors + 1`" +fi + +echo "$JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH examples.datasets.H5Ex_D_Soint" +TESTING examples.datasets.H5Ex_D_Soint +( +$RUNSERIAL $JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH examples.datasets.H5Ex_D_Soint > H5Ex_D_Soint.out +) +if diff H5Ex_D_Soint.out examples.datasets.H5Ex_D_Soint.txt > /dev/null; then + echo " PASSED datasets.H5Ex_D_Soint" +else + echo "**FAILED** datasets.H5Ex_D_Soint" + nerrors="`expr $nerrors + 1`" +fi + +# Clean up temporary files/directories +CLEAN_LIBFILES_AND_BLDLIBDIR +CLEAN_DATAFILES_AND_BLDDIR + +# Report test results and exit +if test $nerrors -eq 0 ; then + echo "All $TESTNAME tests passed." + exit $EXIT_SUCCESS +else + echo "$TESTNAME tests failed with $nerrors errors." + exit $EXIT_FAILURE +fi diff --git a/java/examples/datasets/Makefile.am b/java/examples/datasets/Makefile.am index 18100a6..ddd6d39 100644 --- a/java/examples/datasets/Makefile.am +++ b/java/examples/datasets/Makefile.am @@ -63,10 +63,10 @@ noinst_DATA = $(jarfile) .PHONY: classes -check_SCRIPTS = runExample.sh +check_SCRIPTS = JavaDatasetExample.sh TEST_SCRIPT = $(check_SCRIPTS) -CLEANFILES = classnoinst.stamp $(jarfile) $(JAVAROOT)/$(pkgpath)/*.class runExample.sh +CLEANFILES = classnoinst.stamp $(jarfile) $(JAVAROOT)/$(pkgpath)/*.class JavaDatasetExample.sh clean: rm -rf $(JAVAROOT)/* diff --git a/java/examples/datasets/runExample.sh.in b/java/examples/datasets/runExample.sh.in deleted file mode 100644 index 740b07d..0000000 --- a/java/examples/datasets/runExample.sh.in +++ /dev/null @@ -1,459 +0,0 @@ -#! /bin/sh -# -# Copyright by The HDF Group. -# Copyright by the Board of Trustees of the University of Illinois. -# All rights reserved. -# -# This file is part of HDF5. The full HDF5 copyright notice, including -# terms governing use, modification, and redistribution, is contained in -# the COPYING file, which can be found at the root of the source code -# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. -# If you do not have access to either file, you may request a copy from -# help@hdfgroup.org. -# - -top_builddir=@top_builddir@ -top_srcdir=@top_srcdir@ -srcdir=@srcdir@ - -USE_FILTER_SZIP="@USE_FILTER_SZIP@" -USE_FILTER_DEFLATE="@USE_FILTER_DEFLATE@" - -TESTNAME=EX_Datasets -EXIT_SUCCESS=0 -EXIT_FAILURE=1 - -# Set up default variable values if not supplied by the user. -RM='rm -rf' -CMP='cmp' -DIFF='diff -c' -CP='cp' -DIRNAME='dirname' -LS='ls' -AWK='awk' - -nerrors=0 - -# where the libs exist -HDFLIB_HOME="$top_srcdir/java/lib" -BLDLIBDIR="$top_builddir/hdf5/lib" -BLDDIR="." -HDFTEST_HOME="$top_srcdir/java/examples/datasets" -JARFILE=jar@PACKAGE_TARNAME@-@PACKAGE_VERSION@.jar -TESTJARFILE=jar@PACKAGE_TARNAME@datasets.jar -test -d $BLDLIBDIR || mkdir -p $BLDLIBDIR - -###################################################################### -# library files -# -------------------------------------------------------------------- -# All the library files copy from source directory to test directory -# NOTE: Keep this framework to add/remove test files. -# This list are also used for checking exist. -# Comment '#' without space can be used. -# -------------------------------------------------------------------- -LIST_LIBRARY_FILES=" -$HDFLIB_HOME/slf4j-api-1.7.5.jar -$HDFLIB_HOME/ext/slf4j-simple-1.7.5.jar -$top_builddir/src/.libs/libhdf5.* -$top_builddir/java/src/jni/.libs/libhdf5_java.* -$top_builddir/java/src/$JARFILE -" -LIST_DATA_FILES=" -$HDFTEST_HOME/../testfiles/examples.datasets.H5Ex_D_Alloc.txt -$HDFTEST_HOME/../testfiles/examples.datasets.H5Ex_D_Checksum.txt -$HDFTEST_HOME/../testfiles/examples.datasets.H5Ex_D_Chunk.txt -$HDFTEST_HOME/../testfiles/examples.datasets.H5Ex_D_Compact.txt -$HDFTEST_HOME/../testfiles/examples.datasets.H5Ex_D_External.txt -$HDFTEST_HOME/../testfiles/examples.datasets.H5Ex_D_FillValue.txt -$HDFTEST_HOME/../testfiles/examples.datasets.H5Ex_D_Gzip.txt -$HDFTEST_HOME/../testfiles/examples.datasets.H5Ex_D_Hyperslab.txt -$HDFTEST_HOME/../testfiles/examples.datasets.H5Ex_D_ReadWrite.txt -$HDFTEST_HOME/../testfiles/examples.datasets.H5Ex_D_Shuffle.txt -$HDFTEST_HOME/../testfiles/examples.datasets.H5Ex_D_Szip.txt -$HDFTEST_HOME/../testfiles/examples.datasets.H5Ex_D_UnlimitedAdd.txt -$HDFTEST_HOME/../testfiles/examples.datasets.H5Ex_D_UnlimitedGzip.txt -$HDFTEST_HOME/../testfiles/examples.datasets.H5Ex_D_UnlimitedMod.txt -$HDFTEST_HOME/../testfiles/examples.datasets.H5Ex_D_Nbit.txt -$HDFTEST_HOME/../testfiles/examples.datasets.H5Ex_D_Transform.txt -$HDFTEST_HOME/../testfiles/examples.datasets.H5Ex_D_Sofloat.txt -$HDFTEST_HOME/../testfiles/examples.datasets.H5Ex_D_Soint.txt -" - -# -# copy files from source dirs to test dir -# -COPY_LIBFILES="$LIST_LIBRARY_FILES" - -COPY_LIBFILES_TO_BLDLIBDIR() -{ - # copy test files. Used -f to make sure get a new copy - for tstfile in $COPY_LIBFILES - do - # ignore '#' comment - echo $tstfile | tr -d ' ' | grep '^#' > /dev/null - RET=$? - if [ $RET -eq 1 ]; then - # skip cp if srcdir is same as destdir - # this occurs when build/test performed in source dir and - # make cp fail - SDIR=`$DIRNAME $tstfile` - INODE_SDIR=`$LS -i -d $SDIR | $AWK -F' ' '{print $1}'` - INODE_DDIR=`$LS -i -d $BLDLIBDIR | $AWK -F' ' '{print $1}'` - if [ "$INODE_SDIR" != "$INODE_DDIR" ]; then - $CP -f $tstfile $BLDLIBDIR - if [ $? -ne 0 ]; then - echo "Error: FAILED to copy $tstfile ." - - # Comment out this to CREATE expected file - exit $EXIT_FAILURE - fi - fi - fi - done -} - -CLEAN_LIBFILES_AND_BLDLIBDIR() -{ - # skip rm if srcdir is same as destdir - # this occurs when build/test performed in source dir and - # make cp fail - SDIR=`$DIRNAME $HDFLIB_HOME/slf4j-api-1.7.5.jar` - INODE_SDIR=`$LS -i -d $SDIR | $AWK -F' ' '{print $1}'` - INODE_DDIR=`$LS -i -d $BLDLIBDIR | $AWK -F' ' '{print $1}'` - if [ "$INODE_SDIR" != "$INODE_DDIR" ]; then - $RM $BLDLIBDIR - fi -} - -COPY_DATAFILES="$LIST_DATA_FILES" - -COPY_DATAFILES_TO_BLDDIR() -{ - # copy test files. Used -f to make sure get a new copy - for tstfile in $COPY_DATAFILES - do - # ignore '#' comment - echo $tstfile | tr -d ' ' | grep '^#' > /dev/null - RET=$? - if [ $RET -eq 1 ]; then - # skip cp if srcdir is same as destdir - # this occurs when build/test performed in source dir and - # make cp fail - SDIR=`$DIRNAME $tstfile` - INODE_SDIR=`$LS -i -d $SDIR | $AWK -F' ' '{print $1}'` - INODE_DDIR=`$LS -i -d $BLDDIR | $AWK -F' ' '{print $1}'` - if [ "$INODE_SDIR" != "$INODE_DDIR" ]; then - $CP -f $tstfile $BLDDIR - if [ $? -ne 0 ]; then - echo "Error: FAILED to copy $tstfile ." - - # Comment out this to CREATE expected file - exit $EXIT_FAILURE - fi - fi - fi - done -} - -CLEAN_DATAFILES_AND_BLDDIR() -{ - $RM $BLDDIR/examples.datasets.H5Ex_D_*.txt - $RM $BLDDIR/H5Ex_D_*.out - $RM $BLDDIR/H5Ex_D_*.h5 - $RM $BLDDIR/H5Ex_D_External.data -} - -# Print a line-line message left justified in a field of 70 characters -# beginning with the word "Testing". -# -TESTING() { - SPACES=" " - echo "Testing $* $SPACES" | cut -c1-70 | tr -d '\012' -} - -# where Java is installed (requires jdk1.7.x) -JAVAEXE=@JAVA@ -JAVAEXEFLAGS=@H5_JAVAFLAGS@ - -############################################################################### -# DO NOT MODIFY BELOW THIS LINE -############################################################################### - -# prepare for test -COPY_LIBFILES_TO_BLDLIBDIR -COPY_DATAFILES_TO_BLDDIR - -CPATH=".:"$BLDLIBDIR"/"$JARFILE":"$BLDLIBDIR"/slf4j-api-1.7.5.jar:"$BLDLIBDIR"/slf4j-simple-1.7.5.jar:"$TESTJARFILE"" - -TEST=/usr/bin/test -if [ ! -x /usr/bin/test ] -then -TEST=`which test` -fi - -if $TEST -z "$CLASSPATH"; then - CLASSPATH="" -fi -CLASSPATH=$CPATH":"$CLASSPATH -export CLASSPATH - -if $TEST -n "$JAVAPATH" ; then - PATH=$JAVAPATH":"$PATH - export PATH -fi - -if $TEST -e /bin/uname; then - os_name=`/bin/uname -s` -elif $TEST -e /usr/bin/uname; then - os_name=`/usr/bin/uname -s` -else - os_name=unknown -fi - -if $TEST -z "$LD_LIBRARY_PATH" ; then - LD_LIBRARY_PATH="" -fi - -case $os_name in - Darwin) - DYLD_LIBRARY_PATH=$BLDLIBDIR:$DYLD_LIBRARY_PATH - export DYLD_LIBRARY_PATH - LD_LIBRARY_PATH=$DYLD_LIBRARY_PATH - ;; - *) - LD_LIBRARY_PATH=$BLDLIBDIR:$LD_LIBRARY_PATH - ;; -esac - -export LD_LIBRARY_PATH - -echo "$JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH examples.datasets.H5Ex_D_Alloc" -TESTING examples.datasets.H5Ex_D_Alloc -( -$RUNSERIAL $JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH examples.datasets.H5Ex_D_Alloc > H5Ex_D_Alloc.out -) -if diff H5Ex_D_Alloc.out examples.datasets.H5Ex_D_Alloc.txt > /dev/null; then - echo " PASSED datasets.H5Ex_D_Alloc" -else - echo "**FAILED** datasets.H5Ex_D_Alloc" - nerrors="`expr $nerrors + 1`" -fi - -echo "$JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH examples.datasets.H5Ex_D_Checksum" -TESTING examples.datasets.H5Ex_D_Checksum -( -$RUNSERIAL $JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH examples.datasets.H5Ex_D_Checksum > H5Ex_D_Checksum.out -) -if diff H5Ex_D_Checksum.out examples.datasets.H5Ex_D_Checksum.txt > /dev/null; then - echo " PASSED datasets.H5Ex_D_Checksum" -else - echo "**FAILED** datasets.H5Ex_D_Checksum" - nerrors="`expr $nerrors + 1`" -fi - -echo "$JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH examples.datasets.H5Ex_D_Chunk" -TESTING examples.datasets.H5Ex_D_Chunk -( -$RUNSERIAL $JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH examples.datasets.H5Ex_D_Chunk > H5Ex_D_Chunk.out -) -if diff H5Ex_D_Chunk.out examples.datasets.H5Ex_D_Chunk.txt > /dev/null; then - echo " PASSED datasets.H5Ex_D_Chunk" -else - echo "**FAILED** datasets.H5Ex_D_Chunk" - nerrors="`expr $nerrors + 1`" -fi - -echo "$JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH examples.datasets.H5Ex_D_Compact" -TESTING examples.datasets.H5Ex_D_Compact -( -$RUNSERIAL $JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH examples.datasets.H5Ex_D_Compact > H5Ex_D_Compact.out -) -if diff H5Ex_D_Compact.out examples.datasets.H5Ex_D_Compact.txt > /dev/null; then - echo " PASSED datasets.H5Ex_D_Compact" -else - echo "**FAILED** datasets.H5Ex_D_Compact" - nerrors="`expr $nerrors + 1`" -fi - -echo "$JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH examples.datasets.H5Ex_D_External" -TESTING examples.datasets.H5Ex_D_External -( -$RUNSERIAL $JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH examples.datasets.H5Ex_D_External > H5Ex_D_External.out -) -if diff H5Ex_D_External.out examples.datasets.H5Ex_D_External.txt > /dev/null; then - echo " PASSED datasets.H5Ex_D_External" -else - echo "**FAILED** datasets.H5Ex_D_External" - nerrors="`expr $nerrors + 1`" -fi - -echo "$JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH examples.datasets.H5Ex_D_FillValue" -TESTING examples.datasets.H5Ex_D_FillValue -( -$RUNSERIAL $JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH examples.datasets.H5Ex_D_FillValue > H5Ex_D_FillValue.out -) -if diff H5Ex_D_FillValue.out examples.datasets.H5Ex_D_FillValue.txt > /dev/null; then - echo " PASSED datasets.H5Ex_D_FillValue" -else - echo "**FAILED** datasets.H5Ex_D_FillValue" - nerrors="`expr $nerrors + 1`" -fi - -echo "$JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH examples.datasets.H5Ex_D_Gzip" -TESTING examples.datasets.H5Ex_D_Gzip -( -$RUNSERIAL $JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH examples.datasets.H5Ex_D_Gzip > H5Ex_D_Gzip.out -) -if diff H5Ex_D_Gzip.out examples.datasets.H5Ex_D_Gzip.txt > /dev/null; then - echo " PASSED datasets.H5Ex_D_Gzip" -else - echo "**FAILED** datasets.H5Ex_D_Gzip" - nerrors="`expr $nerrors + 1`" -fi - -echo "$JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH examples.datasets.H5Ex_D_Hyperslab" -TESTING examples.datasets.H5Ex_D_Hyperslab -( -$RUNSERIAL $JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH examples.datasets.H5Ex_D_Hyperslab > H5Ex_D_Hyperslab.out -) -if diff H5Ex_D_Hyperslab.out examples.datasets.H5Ex_D_Hyperslab.txt > /dev/null; then - echo " PASSED datasets.H5Ex_D_Hyperslab" -else - echo "**FAILED** datasets.H5Ex_D_Hyperslab" - nerrors="`expr $nerrors + 1`" -fi - -echo "$JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH examples.datasets.H5Ex_D_ReadWrite" -TESTING examples.datasets.H5Ex_D_ReadWrite -( -$RUNSERIAL $JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH examples.datasets.H5Ex_D_ReadWrite > H5Ex_D_ReadWrite.out -) -if diff H5Ex_D_ReadWrite.out examples.datasets.H5Ex_D_ReadWrite.txt > /dev/null; then - echo " PASSED datasets.H5Ex_D_ReadWrite" -else - echo "**FAILED** datasets.H5Ex_D_ReadWrite" - nerrors="`expr $nerrors + 1`" -fi - -echo "$JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH examples.datasets.H5Ex_D_Shuffle" -TESTING examples.datasets.H5Ex_D_Shuffle -( -$RUNSERIAL $JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH examples.datasets.H5Ex_D_Shuffle > H5Ex_D_Shuffle.out -) -if diff H5Ex_D_Shuffle.out examples.datasets.H5Ex_D_Shuffle.txt > /dev/null; then - echo " PASSED datasets.H5Ex_D_Shuffle" -else - echo "**FAILED** datasets.H5Ex_D_Shuffle" - nerrors="`expr $nerrors + 1`" -fi - -if test $USE_FILTER_SZIP = "yes"; then - echo "$JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH examples.datasets.H5Ex_D_Szip" - TESTING examples.datasets.H5Ex_D_Szip - ( - $RUNSERIAL $JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH examples.datasets.H5Ex_D_Szip > H5Ex_D_Szip.out - ) - if diff H5Ex_D_Szip.out examples.datasets.H5Ex_D_Szip.txt > /dev/null; then - echo " PASSED datasets.H5Ex_D_Szip" - else - echo "**FAILED** datasets.H5Ex_D_Szip" - nerrors="`expr $nerrors + 1`" - fi -fi - -echo "$JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH examples.datasets.H5Ex_D_UnlimitedAdd" -TESTING examples.datasets.H5Ex_D_UnlimitedAdd -( -$RUNSERIAL $JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH examples.datasets.H5Ex_D_UnlimitedAdd > H5Ex_D_UnlimitedAdd.out -) -if diff H5Ex_D_UnlimitedAdd.out examples.datasets.H5Ex_D_UnlimitedAdd.txt > /dev/null; then - echo " PASSED datasets.H5Ex_D_UnlimitedAdd" -else - echo "**FAILED** datasets.H5Ex_D_UnlimitedAdd" - nerrors="`expr $nerrors + 1`" -fi - -echo "$JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH examples.datasets.H5Ex_D_UnlimitedGzip" -TESTING examples.datasets.H5Ex_D_UnlimitedGzip -( -$RUNSERIAL $JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH examples.datasets.H5Ex_D_UnlimitedGzip > H5Ex_D_UnlimitedGzip.out -) -if diff H5Ex_D_External.out examples.datasets.H5Ex_D_External.txt > /dev/null; then - echo " PASSED datasets.H5Ex_D_UnlimitedGzip" -else - echo "**FAILED** datasets.H5Ex_D_UnlimitedGzip" - nerrors="`expr $nerrors + 1`" -fi - -echo "$JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH examples.datasets.H5Ex_D_UnlimitedMod" -TESTING examples.datasets.H5Ex_D_UnlimitedMod -( -$RUNSERIAL $JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH examples.datasets.H5Ex_D_UnlimitedMod > H5Ex_D_UnlimitedMod.out -) -if diff H5Ex_D_UnlimitedMod.out examples.datasets.H5Ex_D_UnlimitedMod.txt > /dev/null; then - echo " PASSED datasets.H5Ex_D_UnlimitedMod" -else - echo "**FAILED** datasets.H5Ex_D_UnlimitedMod" - nerrors="`expr $nerrors + 1`" -fi - -echo "$JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH examples.datasets.H5Ex_D_Nbit" -TESTING examples.datasets.H5Ex_D_Nbit -( -$RUNSERIAL $JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH examples.datasets.H5Ex_D_Nbit > H5Ex_D_Nbit.out -) -if diff H5Ex_D_Nbit.out examples.datasets.H5Ex_D_Nbit.txt > /dev/null; then - echo " PASSED datasets.H5Ex_D_Nbit" -else - echo "**FAILED** datasets.H5Ex_D_Nbit" - nerrors="`expr $nerrors + 1`" -fi - -echo "$JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH examples.datasets.H5Ex_D_Transform" -TESTING examples.datasets.H5Ex_D_Transform -( -$RUNSERIAL $JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH examples.datasets.H5Ex_D_Transform > H5Ex_D_Transform.out -) -if diff H5Ex_D_Transform.out examples.datasets.H5Ex_D_Transform.txt > /dev/null; then - echo " PASSED datasets.H5Ex_D_Transform" -else - echo "**FAILED** datasets.H5Ex_D_Transform" - nerrors="`expr $nerrors + 1`" -fi - -echo "$JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH examples.datasets.H5Ex_D_Sofloat" -TESTING examples.datasets.H5Ex_D_Sofloat -( -$RUNSERIAL $JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH examples.datasets.H5Ex_D_Sofloat > H5Ex_D_Sofloat.out -) -if diff H5Ex_D_Sofloat.out examples.datasets.H5Ex_D_Sofloat.txt > /dev/null; then - echo " PASSED datasets.H5Ex_D_Sofloat" -else - echo "**FAILED** datasets.H5Ex_D_Sofloat" - nerrors="`expr $nerrors + 1`" -fi - -echo "$JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH examples.datasets.H5Ex_D_Soint" -TESTING examples.datasets.H5Ex_D_Soint -( -$RUNSERIAL $JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH examples.datasets.H5Ex_D_Soint > H5Ex_D_Soint.out -) -if diff H5Ex_D_Soint.out examples.datasets.H5Ex_D_Soint.txt > /dev/null; then - echo " PASSED datasets.H5Ex_D_Soint" -else - echo "**FAILED** datasets.H5Ex_D_Soint" - nerrors="`expr $nerrors + 1`" -fi - -# Clean up temporary files/directories -CLEAN_LIBFILES_AND_BLDLIBDIR -CLEAN_DATAFILES_AND_BLDDIR - -# Report test results and exit -if test $nerrors -eq 0 ; then - echo "All $TESTNAME tests passed." - exit $EXIT_SUCCESS -else - echo "$TESTNAME tests failed with $nerrors errors." - exit $EXIT_FAILURE -fi diff --git a/java/examples/datatypes/JavaDatatypeExample.sh.in b/java/examples/datatypes/JavaDatatypeExample.sh.in new file mode 100644 index 0000000..590a547 --- /dev/null +++ b/java/examples/datatypes/JavaDatatypeExample.sh.in @@ -0,0 +1,417 @@ +#! /bin/sh +# +# Copyright by The HDF Group. +# Copyright by the Board of Trustees of the University of Illinois. +# All rights reserved. +# +# This file is part of HDF5. The full HDF5 copyright notice, including +# terms governing use, modification, and redistribution, is contained in +# the COPYING file, which can be found at the root of the source code +# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. +# If you do not have access to either file, you may request a copy from +# help@hdfgroup.org. +# + +top_builddir=@top_builddir@ +top_srcdir=@top_srcdir@ +srcdir=@srcdir@ + +TESTNAME=EX_Datatypes +EXIT_SUCCESS=0 +EXIT_FAILURE=1 + +# Set up default variable values if not supplied by the user. +RM='rm -rf' +CMP='cmp' +DIFF='diff -c' +CP='cp' +DIRNAME='dirname' +LS='ls' +AWK='awk' + +nerrors=0 + +# where the libs exist +HDFLIB_HOME="$top_srcdir/java/lib" +BLDLIBDIR="$top_builddir/hdf5/lib" +BLDDIR="." +HDFTEST_HOME="$top_srcdir/java/examples/datatypes" +JARFILE=jar@PACKAGE_TARNAME@-@PACKAGE_VERSION@.jar +TESTJARFILE=jar@PACKAGE_TARNAME@datatypes.jar +test -d $BLDLIBDIR || mkdir -p $BLDLIBDIR + +###################################################################### +# library files +# -------------------------------------------------------------------- +# All the library files copy from source directory to test directory +# NOTE: Keep this framework to add/remove test files. +# This list are also used for checking exist. +# Comment '#' without space can be used. +# -------------------------------------------------------------------- +LIST_LIBRARY_FILES=" +$HDFLIB_HOME/slf4j-api-1.7.5.jar +$HDFLIB_HOME/ext/slf4j-simple-1.7.5.jar +$top_builddir/src/.libs/libhdf5.* +$top_builddir/java/src/jni/.libs/libhdf5_java.* +$top_builddir/java/src/$JARFILE +" +LIST_DATA_FILES=" +$HDFTEST_HOME/../testfiles/examples.datatypes.H5Ex_T_Array.txt +$HDFTEST_HOME/../testfiles/examples.datatypes.H5Ex_T_ArrayAttribute.txt +$HDFTEST_HOME/../testfiles/examples.datatypes.H5Ex_T_Bit.txt +$HDFTEST_HOME/../testfiles/examples.datatypes.H5Ex_T_BitAttribute.txt +$HDFTEST_HOME/../testfiles/examples.datatypes.H5Ex_T_Commit.txt +$HDFTEST_HOME/../testfiles/examples.datatypes.H5Ex_T_Compound.txt +$HDFTEST_HOME/../testfiles/examples.datatypes.H5Ex_T_CompoundAttribute.txt +$HDFTEST_HOME/../testfiles/examples.datatypes.H5Ex_T_Float.txt +$HDFTEST_HOME/../testfiles/examples.datatypes.H5Ex_T_FloatAttribute.txt +$HDFTEST_HOME/../testfiles/examples.datatypes.H5Ex_T_Integer.txt +$HDFTEST_HOME/../testfiles/examples.datatypes.H5Ex_T_IntegerAttribute.txt +$HDFTEST_HOME/../testfiles/examples.datatypes.H5Ex_T_ObjectReference.txt +$HDFTEST_HOME/../testfiles/examples.datatypes.H5Ex_T_ObjectReferenceAttribute.txt +$HDFTEST_HOME/../testfiles/examples.datatypes.H5Ex_T_Opaque.txt +$HDFTEST_HOME/../testfiles/examples.datatypes.H5Ex_T_OpaqueAttribute.txt +$HDFTEST_HOME/../testfiles/examples.datatypes.H5Ex_T_String.txt +$HDFTEST_HOME/../testfiles/examples.datatypes.H5Ex_T_StringAttribute.txt +$HDFTEST_HOME/../testfiles/examples.datatypes.H5Ex_T_VLString.txt +" + +# +# copy files from source dirs to test dir +# +COPY_LIBFILES="$LIST_LIBRARY_FILES" + +COPY_LIBFILES_TO_BLDLIBDIR() +{ + # copy test files. Used -f to make sure get a new copy + for tstfile in $COPY_LIBFILES + do + # ignore '#' comment + echo $tstfile | tr -d ' ' | grep '^#' > /dev/null + RET=$? + if [ $RET -eq 1 ]; then + # skip cp if srcdir is same as destdir + # this occurs when build/test performed in source dir and + # make cp fail + SDIR=`$DIRNAME $tstfile` + INODE_SDIR=`$LS -i -d $SDIR | $AWK -F' ' '{print $1}'` + INODE_DDIR=`$LS -i -d $BLDLIBDIR | $AWK -F' ' '{print $1}'` + if [ "$INODE_SDIR" != "$INODE_DDIR" ]; then + $CP -f $tstfile $BLDLIBDIR + if [ $? -ne 0 ]; then + echo "Error: FAILED to copy $tstfile ." + + # Comment out this to CREATE expected file + exit $EXIT_FAILURE + fi + fi + fi + done +} + +CLEAN_LIBFILES_AND_BLDLIBDIR() +{ + # skip rm if srcdir is same as destdir + # this occurs when build/test performed in source dir and + # make cp fail + SDIR=`$DIRNAME $HDFLIB_HOME/slf4j-api-1.7.5.jar` + INODE_SDIR=`$LS -i -d $SDIR | $AWK -F' ' '{print $1}'` + INODE_DDIR=`$LS -i -d $BLDLIBDIR | $AWK -F' ' '{print $1}'` + if [ "$INODE_SDIR" != "$INODE_DDIR" ]; then + $RM $BLDLIBDIR + fi +} + +COPY_DATAFILES="$LIST_DATA_FILES" + +COPY_DATAFILES_TO_BLDDIR() +{ + # copy test files. Used -f to make sure get a new copy + for tstfile in $COPY_DATAFILES + do + # ignore '#' comment + echo $tstfile | tr -d ' ' | grep '^#' > /dev/null + RET=$? + if [ $RET -eq 1 ]; then + # skip cp if srcdir is same as destdir + # this occurs when build/test performed in source dir and + # make cp fail + SDIR=`$DIRNAME $tstfile` + INODE_SDIR=`$LS -i -d $SDIR | $AWK -F' ' '{print $1}'` + INODE_DDIR=`$LS -i -d $BLDDIR | $AWK -F' ' '{print $1}'` + if [ "$INODE_SDIR" != "$INODE_DDIR" ]; then + $CP -f $tstfile $BLDDIR + if [ $? -ne 0 ]; then + echo "Error: FAILED to copy $tstfile ." + + # Comment out this to CREATE expected file + exit $EXIT_FAILURE + fi + fi + fi + done +} + +CLEAN_DATAFILES_AND_BLDDIR() +{ + $RM $BLDDIR/examples.datatypes.H5Ex_T_*.txt + $RM $BLDDIR/H5Ex_T_*.out + $RM $BLDDIR/H5Ex_T_*.h5 +} + +# Print a line-line message left justified in a field of 70 characters +# beginning with the word "Testing". +# +TESTING() { + SPACES=" " + echo "Testing $* $SPACES" | cut -c1-70 | tr -d '\012' +} + +# where Java is installed (requires jdk1.7.x) +JAVAEXE=@JAVA@ +JAVAEXEFLAGS=@H5_JAVAFLAGS@ + +############################################################################### +# DO NOT MODIFY BELOW THIS LINE +############################################################################### + +# prepare for test +COPY_LIBFILES_TO_BLDLIBDIR +COPY_DATAFILES_TO_BLDDIR + +CPATH=".:"$BLDLIBDIR"/"$JARFILE":"$BLDLIBDIR"/slf4j-api-1.7.5.jar:"$BLDLIBDIR"/slf4j-simple-1.7.5.jar:"$TESTJARFILE"" + +TEST=/usr/bin/test +if [ ! -x /usr/bin/test ] +then +TEST=`which test` +fi + +if $TEST -z "$CLASSPATH"; then + CLASSPATH="" +fi +CLASSPATH=$CPATH":"$CLASSPATH +export CLASSPATH + +if $TEST -n "$JAVAPATH" ; then + PATH=$JAVAPATH":"$PATH + export PATH +fi + +if $TEST -e /bin/uname; then + os_name=`/bin/uname -s` +elif $TEST -e /usr/bin/uname; then + os_name=`/usr/bin/uname -s` +else + os_name=unknown +fi + +if $TEST -z "$LD_LIBRARY_PATH" ; then + LD_LIBRARY_PATH="" +fi + +case $os_name in + Darwin) + DYLD_LIBRARY_PATH=$BLDLIBDIR:$DYLD_LIBRARY_PATH + export DYLD_LIBRARY_PATH + LD_LIBRARY_PATH=$DYLD_LIBRARY_PATH + ;; + *) + LD_LIBRARY_PATH=$BLDLIBDIR:$LD_LIBRARY_PATH + ;; +esac + +export LD_LIBRARY_PATH + +echo "$JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH examples.datatypes.H5Ex_T_Array" +TESTING examples.datatypes.H5Ex_T_Array +($RUNSERIAL $JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH examples.datatypes.H5Ex_T_Array > H5Ex_T_Array.out) +if diff H5Ex_T_Array.out examples.datatypes.H5Ex_T_Array.txt > /dev/null; then + echo " PASSED datatypes.H5Ex_T_Array" +else + echo "**FAILED** datatypes.H5Ex_T_Array" + nerrors="`expr $nerrors + 1`" +fi + +echo "$JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH examples.datatypes.H5Ex_T_ArrayAttribute" +TESTING examples.datatypes.H5Ex_T_ArrayAttribute +($RUNSERIAL $JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH examples.datatypes.H5Ex_T_ArrayAttribute > H5Ex_T_ArrayAttribute.out) +if diff H5Ex_T_ArrayAttribute.out examples.datatypes.H5Ex_T_ArrayAttribute.txt > /dev/null; then + echo " PASSED datatypes.H5Ex_T_ArrayAttribute" +else + echo "**FAILED** datatypes.H5Ex_T_ArrayAttribute" + nerrors="`expr $nerrors + 1`" +fi + +echo "$JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH examples.datatypes.H5Ex_T_Bit" +TESTING examples.datatypes.H5Ex_T_Bit +($RUNSERIAL $JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH examples.datatypes.H5Ex_T_Bit > H5Ex_T_Bit.out) +if diff H5Ex_T_Bit.out examples.datatypes.H5Ex_T_Bit.txt > /dev/null; then + echo " PASSED datatypes.H5Ex_T_Bit" +else + echo "**FAILED** datatypes.H5Ex_T_Bit" + nerrors="`expr $nerrors + 1`" +fi + +echo "$JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH examples.datatypes.H5Ex_T_BitAttribute" +TESTING examples.datatypes.H5Ex_T_BitAttribute +($RUNSERIAL $JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH examples.datatypes.H5Ex_T_BitAttribute > H5Ex_T_BitAttribute.out) +if diff H5Ex_T_BitAttribute.out examples.datatypes.H5Ex_T_BitAttribute.txt > /dev/null; then + echo " PASSED datatypes.H5Ex_T_BitAttribute" +else + echo "**FAILED** datatypes.H5Ex_T_BitAttribute" + nerrors="`expr $nerrors + 1`" +fi + +echo "$JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH examples.datatypes.H5Ex_T_Commit" +TESTING examples.datasets.H5Ex_T_Commit +($RUNSERIAL $JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH examples.datatypes.H5Ex_T_Commit > H5Ex_T_Commit.out) +if diff H5Ex_T_Commit.out examples.datatypes.H5Ex_T_Commit.txt > /dev/null; then + echo " PASSED datatypes.H5Ex_T_Commit" +else + echo "**FAILED** datatypes.H5Ex_T_Commit" + nerrors="`expr $nerrors + 1`" +fi + +echo "$JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH examples.datatypes.H5Ex_T_Compound" +TESTING examples.datatypes.H5Ex_T_Compound +($RUNSERIAL $JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH examples.datatypes.H5Ex_T_Compound > H5Ex_T_Compound.out) +if diff H5Ex_T_Compound.out examples.datatypes.H5Ex_T_Compound.txt > /dev/null; then + echo " PASSED datatypes.H5Ex_T_Compound" +else + echo "**FAILED** datatypes.H5Ex_T_Compound" + nerrors="`expr $nerrors + 1`" +fi + +echo "$JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH examples.datatypes.H5Ex_T_CompoundAttribute" +TESTING examples.datatypes.H5Ex_T_CompoundAttribute +($RUNSERIAL $JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH examples.datatypes.H5Ex_T_CompoundAttribute > H5Ex_T_CompoundAttribute.out) +if diff H5Ex_T_CompoundAttribute.out examples.datatypes.H5Ex_T_CompoundAttribute.txt > /dev/null; then + echo " PASSED datatypes.H5Ex_T_CompoundAttribute" +else + echo "**FAILED** datatypes.H5Ex_T_CompoundAttribute" + nerrors="`expr $nerrors + 1`" +fi + +echo "$JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH examples.datatypes.H5Ex_T_Float" +TESTING examples.datatypes.H5Ex_T_Float +($RUNSERIAL $JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH examples.datatypes.H5Ex_T_Float > H5Ex_T_Float.out) +if diff H5Ex_T_Float.out examples.datatypes.H5Ex_T_Float.txt > /dev/null; then + echo " PASSED datatypes.H5Ex_T_Float" +else + echo "**FAILED** datatypes.H5Ex_T_Float" + nerrors="`expr $nerrors + 1`" +fi + +echo "$JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH examples.datatypes.H5Ex_T_FloatAttribute" +TESTING examples.datatypes.H5Ex_T_FloatAttribute +($RUNSERIAL $JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH examples.datatypes.H5Ex_T_FloatAttribute > H5Ex_T_FloatAttribute.out) +if diff H5Ex_T_FloatAttribute.out examples.datatypes.H5Ex_T_FloatAttribute.txt > /dev/null; then + echo " PASSED datatypes.H5Ex_T_FloatAttribute" +else + echo "**FAILED** datatypes.H5Ex_T_FloatAttribute" + nerrors="`expr $nerrors + 1`" +fi + +echo "$JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH examples.datatypes.H5Ex_T_Integer" +TESTING examples.datatypes.H5Ex_T_Integer +($RUNSERIAL $JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH examples.datatypes.H5Ex_T_Integer > H5Ex_T_Integer.out) +if diff H5Ex_T_Integer.out examples.datatypes.H5Ex_T_Integer.txt > /dev/null; then + echo " PASSED datatypes.H5Ex_T_Integer" +else + echo "**FAILED** datatypes.H5Ex_T_Integer" + nerrors="`expr $nerrors + 1`" +fi + +echo "$JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH examples.datatypes.H5Ex_T_IntegerAttribute" +TESTING examples.datatypes.H5Ex_T_IntegerAttribute +($RUNSERIAL $JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH examples.datatypes.H5Ex_T_IntegerAttribute > H5Ex_T_IntegerAttribute.out) +if diff H5Ex_T_IntegerAttribute.out examples.datatypes.H5Ex_T_IntegerAttribute.txt > /dev/null; then + echo " PASSED datatypes.H5Ex_T_IntegerAttribute" +else + echo "**FAILED** datatypes.H5Ex_T_IntegerAttribute" + nerrors="`expr $nerrors + 1`" +fi + +echo "$JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH examples.datatypes.H5Ex_T_ObjectReference" +TESTING examples.datatypes.H5Ex_T_ObjectReference +($RUNSERIAL $JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH examples.datatypes.H5Ex_T_ObjectReference > H5Ex_T_ObjectReference.out) +if diff H5Ex_T_ObjectReference.out examples.datatypes.H5Ex_T_ObjectReference.txt > /dev/null; then + echo " PASSED datatypes.H5Ex_T_ObjectReference" +else + echo "**FAILED** datatypes.H5Ex_T_ObjectReference" + nerrors="`expr $nerrors + 1`" +fi + +echo "$JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH examples.datatypes.H5Ex_T_ObjectReferenceAttribute" +TESTING examples.datatypes.H5Ex_T_ObjectReferenceAttribute +($RUNSERIAL $JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH examples.datatypes.H5Ex_T_ObjectReferenceAttribute > H5Ex_T_ObjectReferenceAttribute.out) +if diff H5Ex_T_ObjectReferenceAttribute.out examples.datatypes.H5Ex_T_ObjectReferenceAttribute.txt > /dev/null; then + echo " PASSED datatypes.H5Ex_T_ObjectReferenceAttribute" +else + echo "**FAILED** datatypes.H5Ex_T_ObjectReferenceAttribute" + nerrors="`expr $nerrors + 1`" +fi + +echo "$JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH examples.datatypes.H5Ex_T_Opaque" +TESTING examples.datatypes.H5Ex_T_Opaque +($RUNSERIAL $JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH examples.datatypes.H5Ex_T_Opaque > H5Ex_T_Opaque.out) +if diff H5Ex_T_Opaque.out examples.datatypes.H5Ex_T_Opaque.txt > /dev/null; then + echo " PASSED datatypes.H5Ex_T_Opaque" +else + echo "**FAILED** datatypes.H5Ex_T_Opaque" + nerrors="`expr $nerrors + 1`" +fi + +echo "$JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH examples.datatypes.H5Ex_T_OpaqueAttribute" +TESTING examples.datatypes.H5Ex_T_OpaqueAttribute +($RUNSERIAL $JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH examples.datatypes.H5Ex_T_OpaqueAttribute > H5Ex_T_OpaqueAttribute.out) +if diff H5Ex_T_OpaqueAttribute.out examples.datatypes.H5Ex_T_OpaqueAttribute.txt > /dev/null; then + echo " PASSED datatypes.H5Ex_T_OpaqueAttribute" +else + echo "**FAILED** datatypes.H5Ex_T_OpaqueAttribute" + nerrors="`expr $nerrors + 1`" +fi + +echo "$JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH examples.datatypes.H5Ex_T_String" +TESTING examples.datatypes.H5Ex_T_String +($RUNSERIAL $JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH examples.datatypes.H5Ex_T_String > H5Ex_T_String.out) +if diff H5Ex_T_String.out examples.datatypes.H5Ex_T_String.txt > /dev/null; then + echo " PASSED datatypes.H5Ex_T_String" +else + echo "**FAILED** datatypes.H5Ex_T_String" + nerrors="`expr $nerrors + 1`" +fi + +echo "$JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH examples.datatypes.H5Ex_T_StringAttribute" +TESTING examples.datatypes.H5Ex_T_StringAttribute +($RUNSERIAL $JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH examples.datatypes.H5Ex_T_StringAttribute > H5Ex_T_StringAttribute.out) +if diff H5Ex_T_StringAttribute.out examples.datatypes.H5Ex_T_StringAttribute.txt > /dev/null; then + echo " PASSED datatypes.H5Ex_T_StringAttribute" +else + echo "**FAILED** datatypes.H5Ex_T_StringAttribute" + nerrors="`expr $nerrors + 1`" +fi + +echo "$JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH examples.datatypes.H5Ex_T_VLString" +TESTING examples.datatypes.H5Ex_T_VLString +($RUNSERIAL $JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH examples.datatypes.H5Ex_T_VLString > H5Ex_T_VLString.out) +if diff H5Ex_T_VLString.out examples.datatypes.H5Ex_T_VLString.txt > /dev/null; then + echo " PASSED datatypes.H5Ex_T_VLString" +else + echo "**FAILED** datatypes.H5Ex_T_VLString" + nerrors="`expr $nerrors + 1`" +fi + +# Clean up temporary files/directories +CLEAN_LIBFILES_AND_BLDLIBDIR +CLEAN_DATAFILES_AND_BLDDIR + +# Report test results and exit +if test $nerrors -eq 0 ; then + echo "All $TESTNAME tests passed." + exit $EXIT_SUCCESS +else + echo "$TESTNAME tests failed with $nerrors errors." + exit $EXIT_FAILURE +fi diff --git a/java/examples/datatypes/Makefile.am b/java/examples/datatypes/Makefile.am index 71f7769..f6e58f1 100644 --- a/java/examples/datatypes/Makefile.am +++ b/java/examples/datatypes/Makefile.am @@ -63,10 +63,10 @@ noinst_DATA = $(jarfile) .PHONY: classes -check_SCRIPTS = runExample.sh +check_SCRIPTS = JavaDatatypeExample.sh TEST_SCRIPT = $(check_SCRIPTS) -CLEANFILES = classnoinst.stamp $(jarfile) $(JAVAROOT)/$(pkgpath)/*.class runExample.sh +CLEANFILES = classnoinst.stamp $(jarfile) $(JAVAROOT)/$(pkgpath)/*.class JavaDatatypeExample.sh clean: rm -rf $(JAVAROOT)/* diff --git a/java/examples/datatypes/runExample.sh.in b/java/examples/datatypes/runExample.sh.in deleted file mode 100644 index 590a547..0000000 --- a/java/examples/datatypes/runExample.sh.in +++ /dev/null @@ -1,417 +0,0 @@ -#! /bin/sh -# -# Copyright by The HDF Group. -# Copyright by the Board of Trustees of the University of Illinois. -# All rights reserved. -# -# This file is part of HDF5. The full HDF5 copyright notice, including -# terms governing use, modification, and redistribution, is contained in -# the COPYING file, which can be found at the root of the source code -# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. -# If you do not have access to either file, you may request a copy from -# help@hdfgroup.org. -# - -top_builddir=@top_builddir@ -top_srcdir=@top_srcdir@ -srcdir=@srcdir@ - -TESTNAME=EX_Datatypes -EXIT_SUCCESS=0 -EXIT_FAILURE=1 - -# Set up default variable values if not supplied by the user. -RM='rm -rf' -CMP='cmp' -DIFF='diff -c' -CP='cp' -DIRNAME='dirname' -LS='ls' -AWK='awk' - -nerrors=0 - -# where the libs exist -HDFLIB_HOME="$top_srcdir/java/lib" -BLDLIBDIR="$top_builddir/hdf5/lib" -BLDDIR="." -HDFTEST_HOME="$top_srcdir/java/examples/datatypes" -JARFILE=jar@PACKAGE_TARNAME@-@PACKAGE_VERSION@.jar -TESTJARFILE=jar@PACKAGE_TARNAME@datatypes.jar -test -d $BLDLIBDIR || mkdir -p $BLDLIBDIR - -###################################################################### -# library files -# -------------------------------------------------------------------- -# All the library files copy from source directory to test directory -# NOTE: Keep this framework to add/remove test files. -# This list are also used for checking exist. -# Comment '#' without space can be used. -# -------------------------------------------------------------------- -LIST_LIBRARY_FILES=" -$HDFLIB_HOME/slf4j-api-1.7.5.jar -$HDFLIB_HOME/ext/slf4j-simple-1.7.5.jar -$top_builddir/src/.libs/libhdf5.* -$top_builddir/java/src/jni/.libs/libhdf5_java.* -$top_builddir/java/src/$JARFILE -" -LIST_DATA_FILES=" -$HDFTEST_HOME/../testfiles/examples.datatypes.H5Ex_T_Array.txt -$HDFTEST_HOME/../testfiles/examples.datatypes.H5Ex_T_ArrayAttribute.txt -$HDFTEST_HOME/../testfiles/examples.datatypes.H5Ex_T_Bit.txt -$HDFTEST_HOME/../testfiles/examples.datatypes.H5Ex_T_BitAttribute.txt -$HDFTEST_HOME/../testfiles/examples.datatypes.H5Ex_T_Commit.txt -$HDFTEST_HOME/../testfiles/examples.datatypes.H5Ex_T_Compound.txt -$HDFTEST_HOME/../testfiles/examples.datatypes.H5Ex_T_CompoundAttribute.txt -$HDFTEST_HOME/../testfiles/examples.datatypes.H5Ex_T_Float.txt -$HDFTEST_HOME/../testfiles/examples.datatypes.H5Ex_T_FloatAttribute.txt -$HDFTEST_HOME/../testfiles/examples.datatypes.H5Ex_T_Integer.txt -$HDFTEST_HOME/../testfiles/examples.datatypes.H5Ex_T_IntegerAttribute.txt -$HDFTEST_HOME/../testfiles/examples.datatypes.H5Ex_T_ObjectReference.txt -$HDFTEST_HOME/../testfiles/examples.datatypes.H5Ex_T_ObjectReferenceAttribute.txt -$HDFTEST_HOME/../testfiles/examples.datatypes.H5Ex_T_Opaque.txt -$HDFTEST_HOME/../testfiles/examples.datatypes.H5Ex_T_OpaqueAttribute.txt -$HDFTEST_HOME/../testfiles/examples.datatypes.H5Ex_T_String.txt -$HDFTEST_HOME/../testfiles/examples.datatypes.H5Ex_T_StringAttribute.txt -$HDFTEST_HOME/../testfiles/examples.datatypes.H5Ex_T_VLString.txt -" - -# -# copy files from source dirs to test dir -# -COPY_LIBFILES="$LIST_LIBRARY_FILES" - -COPY_LIBFILES_TO_BLDLIBDIR() -{ - # copy test files. Used -f to make sure get a new copy - for tstfile in $COPY_LIBFILES - do - # ignore '#' comment - echo $tstfile | tr -d ' ' | grep '^#' > /dev/null - RET=$? - if [ $RET -eq 1 ]; then - # skip cp if srcdir is same as destdir - # this occurs when build/test performed in source dir and - # make cp fail - SDIR=`$DIRNAME $tstfile` - INODE_SDIR=`$LS -i -d $SDIR | $AWK -F' ' '{print $1}'` - INODE_DDIR=`$LS -i -d $BLDLIBDIR | $AWK -F' ' '{print $1}'` - if [ "$INODE_SDIR" != "$INODE_DDIR" ]; then - $CP -f $tstfile $BLDLIBDIR - if [ $? -ne 0 ]; then - echo "Error: FAILED to copy $tstfile ." - - # Comment out this to CREATE expected file - exit $EXIT_FAILURE - fi - fi - fi - done -} - -CLEAN_LIBFILES_AND_BLDLIBDIR() -{ - # skip rm if srcdir is same as destdir - # this occurs when build/test performed in source dir and - # make cp fail - SDIR=`$DIRNAME $HDFLIB_HOME/slf4j-api-1.7.5.jar` - INODE_SDIR=`$LS -i -d $SDIR | $AWK -F' ' '{print $1}'` - INODE_DDIR=`$LS -i -d $BLDLIBDIR | $AWK -F' ' '{print $1}'` - if [ "$INODE_SDIR" != "$INODE_DDIR" ]; then - $RM $BLDLIBDIR - fi -} - -COPY_DATAFILES="$LIST_DATA_FILES" - -COPY_DATAFILES_TO_BLDDIR() -{ - # copy test files. Used -f to make sure get a new copy - for tstfile in $COPY_DATAFILES - do - # ignore '#' comment - echo $tstfile | tr -d ' ' | grep '^#' > /dev/null - RET=$? - if [ $RET -eq 1 ]; then - # skip cp if srcdir is same as destdir - # this occurs when build/test performed in source dir and - # make cp fail - SDIR=`$DIRNAME $tstfile` - INODE_SDIR=`$LS -i -d $SDIR | $AWK -F' ' '{print $1}'` - INODE_DDIR=`$LS -i -d $BLDDIR | $AWK -F' ' '{print $1}'` - if [ "$INODE_SDIR" != "$INODE_DDIR" ]; then - $CP -f $tstfile $BLDDIR - if [ $? -ne 0 ]; then - echo "Error: FAILED to copy $tstfile ." - - # Comment out this to CREATE expected file - exit $EXIT_FAILURE - fi - fi - fi - done -} - -CLEAN_DATAFILES_AND_BLDDIR() -{ - $RM $BLDDIR/examples.datatypes.H5Ex_T_*.txt - $RM $BLDDIR/H5Ex_T_*.out - $RM $BLDDIR/H5Ex_T_*.h5 -} - -# Print a line-line message left justified in a field of 70 characters -# beginning with the word "Testing". -# -TESTING() { - SPACES=" " - echo "Testing $* $SPACES" | cut -c1-70 | tr -d '\012' -} - -# where Java is installed (requires jdk1.7.x) -JAVAEXE=@JAVA@ -JAVAEXEFLAGS=@H5_JAVAFLAGS@ - -############################################################################### -# DO NOT MODIFY BELOW THIS LINE -############################################################################### - -# prepare for test -COPY_LIBFILES_TO_BLDLIBDIR -COPY_DATAFILES_TO_BLDDIR - -CPATH=".:"$BLDLIBDIR"/"$JARFILE":"$BLDLIBDIR"/slf4j-api-1.7.5.jar:"$BLDLIBDIR"/slf4j-simple-1.7.5.jar:"$TESTJARFILE"" - -TEST=/usr/bin/test -if [ ! -x /usr/bin/test ] -then -TEST=`which test` -fi - -if $TEST -z "$CLASSPATH"; then - CLASSPATH="" -fi -CLASSPATH=$CPATH":"$CLASSPATH -export CLASSPATH - -if $TEST -n "$JAVAPATH" ; then - PATH=$JAVAPATH":"$PATH - export PATH -fi - -if $TEST -e /bin/uname; then - os_name=`/bin/uname -s` -elif $TEST -e /usr/bin/uname; then - os_name=`/usr/bin/uname -s` -else - os_name=unknown -fi - -if $TEST -z "$LD_LIBRARY_PATH" ; then - LD_LIBRARY_PATH="" -fi - -case $os_name in - Darwin) - DYLD_LIBRARY_PATH=$BLDLIBDIR:$DYLD_LIBRARY_PATH - export DYLD_LIBRARY_PATH - LD_LIBRARY_PATH=$DYLD_LIBRARY_PATH - ;; - *) - LD_LIBRARY_PATH=$BLDLIBDIR:$LD_LIBRARY_PATH - ;; -esac - -export LD_LIBRARY_PATH - -echo "$JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH examples.datatypes.H5Ex_T_Array" -TESTING examples.datatypes.H5Ex_T_Array -($RUNSERIAL $JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH examples.datatypes.H5Ex_T_Array > H5Ex_T_Array.out) -if diff H5Ex_T_Array.out examples.datatypes.H5Ex_T_Array.txt > /dev/null; then - echo " PASSED datatypes.H5Ex_T_Array" -else - echo "**FAILED** datatypes.H5Ex_T_Array" - nerrors="`expr $nerrors + 1`" -fi - -echo "$JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH examples.datatypes.H5Ex_T_ArrayAttribute" -TESTING examples.datatypes.H5Ex_T_ArrayAttribute -($RUNSERIAL $JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH examples.datatypes.H5Ex_T_ArrayAttribute > H5Ex_T_ArrayAttribute.out) -if diff H5Ex_T_ArrayAttribute.out examples.datatypes.H5Ex_T_ArrayAttribute.txt > /dev/null; then - echo " PASSED datatypes.H5Ex_T_ArrayAttribute" -else - echo "**FAILED** datatypes.H5Ex_T_ArrayAttribute" - nerrors="`expr $nerrors + 1`" -fi - -echo "$JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH examples.datatypes.H5Ex_T_Bit" -TESTING examples.datatypes.H5Ex_T_Bit -($RUNSERIAL $JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH examples.datatypes.H5Ex_T_Bit > H5Ex_T_Bit.out) -if diff H5Ex_T_Bit.out examples.datatypes.H5Ex_T_Bit.txt > /dev/null; then - echo " PASSED datatypes.H5Ex_T_Bit" -else - echo "**FAILED** datatypes.H5Ex_T_Bit" - nerrors="`expr $nerrors + 1`" -fi - -echo "$JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH examples.datatypes.H5Ex_T_BitAttribute" -TESTING examples.datatypes.H5Ex_T_BitAttribute -($RUNSERIAL $JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH examples.datatypes.H5Ex_T_BitAttribute > H5Ex_T_BitAttribute.out) -if diff H5Ex_T_BitAttribute.out examples.datatypes.H5Ex_T_BitAttribute.txt > /dev/null; then - echo " PASSED datatypes.H5Ex_T_BitAttribute" -else - echo "**FAILED** datatypes.H5Ex_T_BitAttribute" - nerrors="`expr $nerrors + 1`" -fi - -echo "$JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH examples.datatypes.H5Ex_T_Commit" -TESTING examples.datasets.H5Ex_T_Commit -($RUNSERIAL $JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH examples.datatypes.H5Ex_T_Commit > H5Ex_T_Commit.out) -if diff H5Ex_T_Commit.out examples.datatypes.H5Ex_T_Commit.txt > /dev/null; then - echo " PASSED datatypes.H5Ex_T_Commit" -else - echo "**FAILED** datatypes.H5Ex_T_Commit" - nerrors="`expr $nerrors + 1`" -fi - -echo "$JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH examples.datatypes.H5Ex_T_Compound" -TESTING examples.datatypes.H5Ex_T_Compound -($RUNSERIAL $JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH examples.datatypes.H5Ex_T_Compound > H5Ex_T_Compound.out) -if diff H5Ex_T_Compound.out examples.datatypes.H5Ex_T_Compound.txt > /dev/null; then - echo " PASSED datatypes.H5Ex_T_Compound" -else - echo "**FAILED** datatypes.H5Ex_T_Compound" - nerrors="`expr $nerrors + 1`" -fi - -echo "$JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH examples.datatypes.H5Ex_T_CompoundAttribute" -TESTING examples.datatypes.H5Ex_T_CompoundAttribute -($RUNSERIAL $JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH examples.datatypes.H5Ex_T_CompoundAttribute > H5Ex_T_CompoundAttribute.out) -if diff H5Ex_T_CompoundAttribute.out examples.datatypes.H5Ex_T_CompoundAttribute.txt > /dev/null; then - echo " PASSED datatypes.H5Ex_T_CompoundAttribute" -else - echo "**FAILED** datatypes.H5Ex_T_CompoundAttribute" - nerrors="`expr $nerrors + 1`" -fi - -echo "$JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH examples.datatypes.H5Ex_T_Float" -TESTING examples.datatypes.H5Ex_T_Float -($RUNSERIAL $JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH examples.datatypes.H5Ex_T_Float > H5Ex_T_Float.out) -if diff H5Ex_T_Float.out examples.datatypes.H5Ex_T_Float.txt > /dev/null; then - echo " PASSED datatypes.H5Ex_T_Float" -else - echo "**FAILED** datatypes.H5Ex_T_Float" - nerrors="`expr $nerrors + 1`" -fi - -echo "$JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH examples.datatypes.H5Ex_T_FloatAttribute" -TESTING examples.datatypes.H5Ex_T_FloatAttribute -($RUNSERIAL $JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH examples.datatypes.H5Ex_T_FloatAttribute > H5Ex_T_FloatAttribute.out) -if diff H5Ex_T_FloatAttribute.out examples.datatypes.H5Ex_T_FloatAttribute.txt > /dev/null; then - echo " PASSED datatypes.H5Ex_T_FloatAttribute" -else - echo "**FAILED** datatypes.H5Ex_T_FloatAttribute" - nerrors="`expr $nerrors + 1`" -fi - -echo "$JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH examples.datatypes.H5Ex_T_Integer" -TESTING examples.datatypes.H5Ex_T_Integer -($RUNSERIAL $JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH examples.datatypes.H5Ex_T_Integer > H5Ex_T_Integer.out) -if diff H5Ex_T_Integer.out examples.datatypes.H5Ex_T_Integer.txt > /dev/null; then - echo " PASSED datatypes.H5Ex_T_Integer" -else - echo "**FAILED** datatypes.H5Ex_T_Integer" - nerrors="`expr $nerrors + 1`" -fi - -echo "$JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH examples.datatypes.H5Ex_T_IntegerAttribute" -TESTING examples.datatypes.H5Ex_T_IntegerAttribute -($RUNSERIAL $JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH examples.datatypes.H5Ex_T_IntegerAttribute > H5Ex_T_IntegerAttribute.out) -if diff H5Ex_T_IntegerAttribute.out examples.datatypes.H5Ex_T_IntegerAttribute.txt > /dev/null; then - echo " PASSED datatypes.H5Ex_T_IntegerAttribute" -else - echo "**FAILED** datatypes.H5Ex_T_IntegerAttribute" - nerrors="`expr $nerrors + 1`" -fi - -echo "$JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH examples.datatypes.H5Ex_T_ObjectReference" -TESTING examples.datatypes.H5Ex_T_ObjectReference -($RUNSERIAL $JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH examples.datatypes.H5Ex_T_ObjectReference > H5Ex_T_ObjectReference.out) -if diff H5Ex_T_ObjectReference.out examples.datatypes.H5Ex_T_ObjectReference.txt > /dev/null; then - echo " PASSED datatypes.H5Ex_T_ObjectReference" -else - echo "**FAILED** datatypes.H5Ex_T_ObjectReference" - nerrors="`expr $nerrors + 1`" -fi - -echo "$JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH examples.datatypes.H5Ex_T_ObjectReferenceAttribute" -TESTING examples.datatypes.H5Ex_T_ObjectReferenceAttribute -($RUNSERIAL $JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH examples.datatypes.H5Ex_T_ObjectReferenceAttribute > H5Ex_T_ObjectReferenceAttribute.out) -if diff H5Ex_T_ObjectReferenceAttribute.out examples.datatypes.H5Ex_T_ObjectReferenceAttribute.txt > /dev/null; then - echo " PASSED datatypes.H5Ex_T_ObjectReferenceAttribute" -else - echo "**FAILED** datatypes.H5Ex_T_ObjectReferenceAttribute" - nerrors="`expr $nerrors + 1`" -fi - -echo "$JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH examples.datatypes.H5Ex_T_Opaque" -TESTING examples.datatypes.H5Ex_T_Opaque -($RUNSERIAL $JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH examples.datatypes.H5Ex_T_Opaque > H5Ex_T_Opaque.out) -if diff H5Ex_T_Opaque.out examples.datatypes.H5Ex_T_Opaque.txt > /dev/null; then - echo " PASSED datatypes.H5Ex_T_Opaque" -else - echo "**FAILED** datatypes.H5Ex_T_Opaque" - nerrors="`expr $nerrors + 1`" -fi - -echo "$JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH examples.datatypes.H5Ex_T_OpaqueAttribute" -TESTING examples.datatypes.H5Ex_T_OpaqueAttribute -($RUNSERIAL $JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH examples.datatypes.H5Ex_T_OpaqueAttribute > H5Ex_T_OpaqueAttribute.out) -if diff H5Ex_T_OpaqueAttribute.out examples.datatypes.H5Ex_T_OpaqueAttribute.txt > /dev/null; then - echo " PASSED datatypes.H5Ex_T_OpaqueAttribute" -else - echo "**FAILED** datatypes.H5Ex_T_OpaqueAttribute" - nerrors="`expr $nerrors + 1`" -fi - -echo "$JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH examples.datatypes.H5Ex_T_String" -TESTING examples.datatypes.H5Ex_T_String -($RUNSERIAL $JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH examples.datatypes.H5Ex_T_String > H5Ex_T_String.out) -if diff H5Ex_T_String.out examples.datatypes.H5Ex_T_String.txt > /dev/null; then - echo " PASSED datatypes.H5Ex_T_String" -else - echo "**FAILED** datatypes.H5Ex_T_String" - nerrors="`expr $nerrors + 1`" -fi - -echo "$JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH examples.datatypes.H5Ex_T_StringAttribute" -TESTING examples.datatypes.H5Ex_T_StringAttribute -($RUNSERIAL $JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH examples.datatypes.H5Ex_T_StringAttribute > H5Ex_T_StringAttribute.out) -if diff H5Ex_T_StringAttribute.out examples.datatypes.H5Ex_T_StringAttribute.txt > /dev/null; then - echo " PASSED datatypes.H5Ex_T_StringAttribute" -else - echo "**FAILED** datatypes.H5Ex_T_StringAttribute" - nerrors="`expr $nerrors + 1`" -fi - -echo "$JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH examples.datatypes.H5Ex_T_VLString" -TESTING examples.datatypes.H5Ex_T_VLString -($RUNSERIAL $JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH examples.datatypes.H5Ex_T_VLString > H5Ex_T_VLString.out) -if diff H5Ex_T_VLString.out examples.datatypes.H5Ex_T_VLString.txt > /dev/null; then - echo " PASSED datatypes.H5Ex_T_VLString" -else - echo "**FAILED** datatypes.H5Ex_T_VLString" - nerrors="`expr $nerrors + 1`" -fi - -# Clean up temporary files/directories -CLEAN_LIBFILES_AND_BLDLIBDIR -CLEAN_DATAFILES_AND_BLDDIR - -# Report test results and exit -if test $nerrors -eq 0 ; then - echo "All $TESTNAME tests passed." - exit $EXIT_SUCCESS -else - echo "$TESTNAME tests failed with $nerrors errors." - exit $EXIT_FAILURE -fi diff --git a/java/examples/groups/JavaGroupExample.sh.in b/java/examples/groups/JavaGroupExample.sh.in new file mode 100644 index 0000000..53c0045 --- /dev/null +++ b/java/examples/groups/JavaGroupExample.sh.in @@ -0,0 +1,354 @@ +#! /bin/sh +# +# Copyright by The HDF Group. +# Copyright by the Board of Trustees of the University of Illinois. +# All rights reserved. +# +# This file is part of HDF5. The full HDF5 copyright notice, including +# terms governing use, modification, and redistribution, is contained in +# the COPYING file, which can be found at the root of the source code +# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. +# If you do not have access to either file, you may request a copy from +# help@hdfgroup.org. +# + +top_builddir=@top_builddir@ +top_srcdir=@top_srcdir@ +srcdir=@srcdir@ + +TESTNAME=EX_Groups +EXIT_SUCCESS=0 +EXIT_FAILURE=1 + +# Set up default variable values if not supplied by the user. +RM='rm -rf' +CMP='cmp' +DIFF='diff -c' +CP='cp' +DIRNAME='dirname' +LS='ls' +AWK='awk' + +nerrors=0 + +# where the libs exist +HDFLIB_HOME="$top_srcdir/java/lib" +BLDLIBDIR="$top_builddir/hdf5/lib" +BLDREFDIR="./groups" +BLDDIR="." +HDFTEST_HOME="$top_srcdir/java/examples/groups" +JARFILE=jar@PACKAGE_TARNAME@-@PACKAGE_VERSION@.jar +TESTJARFILE=jar@PACKAGE_TARNAME@groups.jar +test -d $BLDLIBDIR || mkdir -p $BLDLIBDIR +test -d $BLDREFDIR || mkdir -p $BLDREFDIR + +###################################################################### +# library files +# -------------------------------------------------------------------- +# All the library files copy from source directory to test directory +# NOTE: Keep this framework to add/remove test files. +# This list are also used for checking exist. +# Comment '#' without space can be used. +# -------------------------------------------------------------------- +LIST_LIBRARY_FILES=" +$HDFLIB_HOME/slf4j-api-1.7.5.jar +$HDFLIB_HOME/ext/slf4j-simple-1.7.5.jar +$top_builddir/src/.libs/libhdf5.* +$top_builddir/java/src/jni/.libs/libhdf5_java.* +$top_builddir/java/src/$JARFILE +" +LIST_REF_FILES=" +$HDFTEST_HOME/h5ex_g_iterate.h5 +$HDFTEST_HOME/h5ex_g_visit.h5 +" +LIST_DATA_FILES=" +$HDFTEST_HOME/../testfiles/examples.groups.H5Ex_G_Create.txt +$HDFTEST_HOME/../testfiles/examples.groups.H5Ex_G_Iterate.txt +$HDFTEST_HOME/../testfiles/examples.groups.H5Ex_G_Compact.txt +$HDFTEST_HOME/../testfiles/examples.groups.H5Ex_G_Corder.txt +$HDFTEST_HOME/../testfiles/examples.groups.H5Ex_G_Intermediate.txt +$HDFTEST_HOME/../testfiles/examples.groups.H5Ex_G_Phase.txt +$HDFTEST_HOME/../testfiles/examples.groups.H5Ex_G_Visit.txt +" + +# +# copy files from source dirs to test dir +# +COPY_LIBFILES="$LIST_LIBRARY_FILES" + +COPY_LIBFILES_TO_BLDLIBDIR() +{ + # copy test files. Used -f to make sure get a new copy + for tstfile in $COPY_LIBFILES + do + # ignore '#' comment + echo $tstfile | tr -d ' ' | grep '^#' > /dev/null + RET=$? + if [ $RET -eq 1 ]; then + # skip cp if srcdir is same as destdir + # this occurs when build/test performed in source dir and + # make cp fail + SDIR=`$DIRNAME $tstfile` + INODE_SDIR=`$LS -i -d $SDIR | $AWK -F' ' '{print $1}'` + INODE_DDIR=`$LS -i -d $BLDLIBDIR | $AWK -F' ' '{print $1}'` + if [ "$INODE_SDIR" != "$INODE_DDIR" ]; then + $CP -f $tstfile $BLDLIBDIR + if [ $? -ne 0 ]; then + echo "Error: FAILED to copy $tstfile ." + + # Comment out this to CREATE expected file + exit $EXIT_FAILURE + fi + fi + fi + done +} + +CLEAN_LIBFILES_AND_BLDLIBDIR() +{ + # skip rm if srcdir is same as destdir + # this occurs when build/test performed in source dir and + # make cp fail + SDIR=`$DIRNAME $HDFLIB_HOME/slf4j-api-1.7.5.jar` + INODE_SDIR=`$LS -i -d $SDIR | $AWK -F' ' '{print $1}'` + INODE_DDIR=`$LS -i -d $BLDLIBDIR | $AWK -F' ' '{print $1}'` + if [ "$INODE_SDIR" != "$INODE_DDIR" ]; then + $RM $BLDLIBDIR + fi +} + +COPY_DATAFILES="$LIST_DATA_FILES" + +COPY_DATAFILES_TO_BLDDIR() +{ + # copy test files. Used -f to make sure get a new copy + for tstfile in $COPY_DATAFILES + do + # ignore '#' comment + echo $tstfile | tr -d ' ' | grep '^#' > /dev/null + RET=$? + if [ $RET -eq 1 ]; then + # skip cp if srcdir is same as destdir + # this occurs when build/test performed in source dir and + # make cp fail + SDIR=`$DIRNAME $tstfile` + INODE_SDIR=`$LS -i -d $SDIR | $AWK -F' ' '{print $1}'` + INODE_DDIR=`$LS -i -d $BLDDIR | $AWK -F' ' '{print $1}'` + if [ "$INODE_SDIR" != "$INODE_DDIR" ]; then + $CP -f $tstfile $BLDDIR + if [ $? -ne 0 ]; then + echo "Error: FAILED to copy $tstfile ." + + # Comment out this to CREATE expected file + exit $EXIT_FAILURE + fi + fi + fi + done +} + +CLEAN_DATAFILES_AND_BLDDIR() +{ + $RM $BLDDIR/examples.groups.H5Ex_G_*.txt + $RM $BLDDIR/H5Ex_G_*.out + $RM $BLDDIR/H5Ex_G_*.h5 + SDIR=`$DIRNAME $tstfile` + INODE_SDIR=`$LS -i -d $SDIR | $AWK -F' ' '{print $1}'` + INODE_DDIR=`$LS -i -d $BLDDIR | $AWK -F' ' '{print $1}'` + if [ "$INODE_SDIR" != "$INODE_DDIR" ]; then SDIR=`$DIRNAME $tstfile` + $RM $BLDDIR/h5ex_g_iterate.h5 + $RM $BLDDIR/h5ex_g_visit.h5 + fi +} + +COPY_REFFILES="$LIST_REF_FILES" + +COPY_REFFILES_TO_BLDREFDIR() +{ + # copy test files. Used -f to make sure get a new copy + for tstfile in $COPY_REFFILES + do + # ignore '#' comment + echo $tstfile | tr -d ' ' | grep '^#' > /dev/null + RET=$? + if [ $RET -eq 1 ]; then + # skip cp if srcdir is same as destdir + # this occurs when build/test performed in source dir and + # make cp fail + SDIR=`$DIRNAME $tstfile` + INODE_SDIR=`$LS -i -d $SDIR | $AWK -F' ' '{print $1}'` + INODE_DDIR=`$LS -i -d $BLDREFDIR | $AWK -F' ' '{print $1}'` + if [ "$INODE_SDIR" != "$INODE_DDIR" ]; then + $CP -f $tstfile $BLDREFDIR + if [ $? -ne 0 ]; then + echo "Error: FAILED to copy $tstfile ." + + # Comment out this to CREATE expected file + exit $EXIT_FAILURE + fi + fi + fi + done +} + +CLEAN_REFFILES_AND_BLDREFDIR() +{ + # skip rm if srcdir is same as destdir + # this occurs when build/test performed in source dir and + # make cp fail + SDIR=`$DIRNAME $HDFTEST_HOME/h5ex_g_iterate.h5` + INODE_SDIR=`$LS -i -d $SDIR | $AWK -F' ' '{print $1}'` + INODE_DDIR=`$LS -i -d $BLDREFDIR | $AWK -F' ' '{print $1}'` + if [ "$INODE_SDIR" != "$INODE_DDIR" ]; then + $RM $BLDREFDIR + fi +} + +# Print a line-line message left justified in a field of 70 characters +# beginning with the word "Testing". +# +TESTING() { + SPACES=" " + echo "Testing $* $SPACES" | cut -c1-70 | tr -d '\012' +} + +# where Java is installed (requires jdk1.7.x) +JAVAEXE=@JAVA@ +JAVAEXEFLAGS=@H5_JAVAFLAGS@ + +############################################################################### +# DO NOT MODIFY BELOW THIS LINE +############################################################################### + +# prepare for test +COPY_LIBFILES_TO_BLDLIBDIR +COPY_DATAFILES_TO_BLDDIR +COPY_REFFILES_TO_BLDREFDIR + +CPATH=".:"$BLDLIBDIR"/"$JARFILE":"$BLDLIBDIR"/slf4j-api-1.7.5.jar:"$BLDLIBDIR"/slf4j-simple-1.7.5.jar:"$TESTJARFILE"" + +TEST=/usr/bin/test +if [ ! -x /usr/bin/test ] +then +TEST=`which test` +fi + +if $TEST -z "$CLASSPATH"; then + CLASSPATH="" +fi +CLASSPATH=$CPATH":"$CLASSPATH +export CLASSPATH + +if $TEST -n "$JAVAPATH" ; then + PATH=$JAVAPATH":"$PATH + export PATH +fi + +if $TEST -e /bin/uname; then + os_name=`/bin/uname -s` +elif $TEST -e /usr/bin/uname; then + os_name=`/usr/bin/uname -s` +else + os_name=unknown +fi + +if $TEST -z "$LD_LIBRARY_PATH" ; then + LD_LIBRARY_PATH="" +fi + +case $os_name in + Darwin) + DYLD_LIBRARY_PATH=$BLDLIBDIR:$DYLD_LIBRARY_PATH + export DYLD_LIBRARY_PATH + LD_LIBRARY_PATH=$DYLD_LIBRARY_PATH + ;; + *) + LD_LIBRARY_PATH=$BLDLIBDIR:$LD_LIBRARY_PATH + ;; +esac + +export LD_LIBRARY_PATH + +echo "$JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH examples.groups.H5Ex_G_Create" +TESTING examples.groups.H5Ex_G_Create +($RUNSERIAL $JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH examples.groups.H5Ex_G_Create > H5Ex_G_Create.out) +if diff H5Ex_G_Create.out examples.groups.H5Ex_G_Create.txt > /dev/null; then + echo " PASSED groups.H5Ex_G_Create" +else + echo "**FAILED** groups.H5Ex_G_Create" + nerrors="`expr $nerrors + 1`" +fi + +echo "$JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH examples.groups.H5Ex_G_Iterate" +TESTING examples.groups.H5Ex_G_Iterate +($RUNSERIAL $JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH examples.groups.H5Ex_G_Iterate > H5Ex_G_Iterate.out) +if diff H5Ex_G_Iterate.out examples.groups.H5Ex_G_Iterate.txt > /dev/null; then + echo " PASSED groups.H5Ex_G_Iterate" +else + echo "**FAILED** groups.H5Ex_G_Iterate" + nerrors="`expr $nerrors + 1`" +fi + +echo "$JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH examples.groups.H5Ex_G_Compact" +TESTING examples.groups.H5Ex_G_Compact +($RUNSERIAL $JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH examples.groups.H5Ex_G_Compact > H5Ex_G_Compact.out) +if diff H5Ex_G_Compact.out examples.groups.H5Ex_G_Compact.txt > /dev/null; then + echo " PASSED groups.H5Ex_G_Compact" +else + echo "**FAILED** groups.H5Ex_G_Compact" + nerrors="`expr $nerrors + 1`" +fi + +echo "$JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH examples.groups.H5Ex_G_Corder" +TESTING examples.groups.H5Ex_G_Corder +($RUNSERIAL $JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH examples.groups.H5Ex_G_Corder > H5Ex_G_Corder.out) +if diff H5Ex_G_Corder.out examples.groups.H5Ex_G_Corder.txt > /dev/null; then + echo " PASSED groups.H5Ex_G_Corder" +else + echo "**FAILED** groups.H5Ex_G_Corder" + nerrors="`expr $nerrors + 1`" +fi + +echo "$JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH examples.groups.H5Ex_G_Intermediate" +TESTING examples.groups.H5Ex_G_Intermediate +($RUNSERIAL $JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH examples.groups.H5Ex_G_Intermediate > H5Ex_G_Intermediate.out) +if diff H5Ex_G_Intermediate.out examples.groups.H5Ex_G_Intermediate.txt > /dev/null; then + echo " PASSED groups.H5Ex_G_Intermediate" +else + echo "**FAILED** groups.H5Ex_G_Intermediate" + nerrors="`expr $nerrors + 1`" +fi + +echo "$JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH examples.groups.H5Ex_G_Phase" +TESTING examples.groups.H5Ex_G_Phase +($RUNSERIAL $JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH examples.groups.H5Ex_G_Phase > H5Ex_G_Phase.out) +if diff H5Ex_G_Phase.out examples.groups.H5Ex_G_Phase.txt > /dev/null; then + echo " PASSED groups.H5Ex_G_Phase" +else + echo "**FAILED** groups.H5Ex_G_Phase" + nerrors="`expr $nerrors + 1`" +fi + +echo "$JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH examples.groups.H5Ex_G_Visit" +TESTING examples.groups.H5Ex_G_Visit +($RUNSERIAL $JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH examples.groups.H5Ex_G_Visit > H5Ex_G_Visit.out) +if diff H5Ex_G_Visit.out examples.groups.H5Ex_G_Visit.txt > /dev/null; then + echo " PASSED groups.H5Ex_G_Visit" +else + echo "**FAILED** groups.H5Ex_G_Visit" + nerrors="`expr $nerrors + 1`" +fi + +# Clean up temporary files/directories +CLEAN_LIBFILES_AND_BLDLIBDIR +CLEAN_DATAFILES_AND_BLDDIR +CLEAN_REFFILES_AND_BLDREFDIR + +# Report test results and exit +if test $nerrors -eq 0 ; then + echo "All $TESTNAME tests passed." + exit $EXIT_SUCCESS +else + echo "$TESTNAME tests failed with $nerrors errors." + exit $EXIT_FAILURE +fi diff --git a/java/examples/groups/Makefile.am b/java/examples/groups/Makefile.am index 08721e0..4da17f9 100644 --- a/java/examples/groups/Makefile.am +++ b/java/examples/groups/Makefile.am @@ -53,10 +53,10 @@ noinst_DATA = $(jarfile) .PHONY: classes -check_SCRIPTS = runExample.sh +check_SCRIPTS = JavaGroupExample.sh TEST_SCRIPT = $(check_SCRIPTS) -CLEANFILES = classnoinst.stamp $(jarfile) $(JAVAROOT)/$(pkgpath)/*.class runExample.sh +CLEANFILES = classnoinst.stamp $(jarfile) $(JAVAROOT)/$(pkgpath)/*.class JavaGroupExample.sh clean: rm -rf $(JAVAROOT)/* diff --git a/java/examples/groups/runExample.sh.in b/java/examples/groups/runExample.sh.in deleted file mode 100644 index 53c0045..0000000 --- a/java/examples/groups/runExample.sh.in +++ /dev/null @@ -1,354 +0,0 @@ -#! /bin/sh -# -# Copyright by The HDF Group. -# Copyright by the Board of Trustees of the University of Illinois. -# All rights reserved. -# -# This file is part of HDF5. The full HDF5 copyright notice, including -# terms governing use, modification, and redistribution, is contained in -# the COPYING file, which can be found at the root of the source code -# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. -# If you do not have access to either file, you may request a copy from -# help@hdfgroup.org. -# - -top_builddir=@top_builddir@ -top_srcdir=@top_srcdir@ -srcdir=@srcdir@ - -TESTNAME=EX_Groups -EXIT_SUCCESS=0 -EXIT_FAILURE=1 - -# Set up default variable values if not supplied by the user. -RM='rm -rf' -CMP='cmp' -DIFF='diff -c' -CP='cp' -DIRNAME='dirname' -LS='ls' -AWK='awk' - -nerrors=0 - -# where the libs exist -HDFLIB_HOME="$top_srcdir/java/lib" -BLDLIBDIR="$top_builddir/hdf5/lib" -BLDREFDIR="./groups" -BLDDIR="." -HDFTEST_HOME="$top_srcdir/java/examples/groups" -JARFILE=jar@PACKAGE_TARNAME@-@PACKAGE_VERSION@.jar -TESTJARFILE=jar@PACKAGE_TARNAME@groups.jar -test -d $BLDLIBDIR || mkdir -p $BLDLIBDIR -test -d $BLDREFDIR || mkdir -p $BLDREFDIR - -###################################################################### -# library files -# -------------------------------------------------------------------- -# All the library files copy from source directory to test directory -# NOTE: Keep this framework to add/remove test files. -# This list are also used for checking exist. -# Comment '#' without space can be used. -# -------------------------------------------------------------------- -LIST_LIBRARY_FILES=" -$HDFLIB_HOME/slf4j-api-1.7.5.jar -$HDFLIB_HOME/ext/slf4j-simple-1.7.5.jar -$top_builddir/src/.libs/libhdf5.* -$top_builddir/java/src/jni/.libs/libhdf5_java.* -$top_builddir/java/src/$JARFILE -" -LIST_REF_FILES=" -$HDFTEST_HOME/h5ex_g_iterate.h5 -$HDFTEST_HOME/h5ex_g_visit.h5 -" -LIST_DATA_FILES=" -$HDFTEST_HOME/../testfiles/examples.groups.H5Ex_G_Create.txt -$HDFTEST_HOME/../testfiles/examples.groups.H5Ex_G_Iterate.txt -$HDFTEST_HOME/../testfiles/examples.groups.H5Ex_G_Compact.txt -$HDFTEST_HOME/../testfiles/examples.groups.H5Ex_G_Corder.txt -$HDFTEST_HOME/../testfiles/examples.groups.H5Ex_G_Intermediate.txt -$HDFTEST_HOME/../testfiles/examples.groups.H5Ex_G_Phase.txt -$HDFTEST_HOME/../testfiles/examples.groups.H5Ex_G_Visit.txt -" - -# -# copy files from source dirs to test dir -# -COPY_LIBFILES="$LIST_LIBRARY_FILES" - -COPY_LIBFILES_TO_BLDLIBDIR() -{ - # copy test files. Used -f to make sure get a new copy - for tstfile in $COPY_LIBFILES - do - # ignore '#' comment - echo $tstfile | tr -d ' ' | grep '^#' > /dev/null - RET=$? - if [ $RET -eq 1 ]; then - # skip cp if srcdir is same as destdir - # this occurs when build/test performed in source dir and - # make cp fail - SDIR=`$DIRNAME $tstfile` - INODE_SDIR=`$LS -i -d $SDIR | $AWK -F' ' '{print $1}'` - INODE_DDIR=`$LS -i -d $BLDLIBDIR | $AWK -F' ' '{print $1}'` - if [ "$INODE_SDIR" != "$INODE_DDIR" ]; then - $CP -f $tstfile $BLDLIBDIR - if [ $? -ne 0 ]; then - echo "Error: FAILED to copy $tstfile ." - - # Comment out this to CREATE expected file - exit $EXIT_FAILURE - fi - fi - fi - done -} - -CLEAN_LIBFILES_AND_BLDLIBDIR() -{ - # skip rm if srcdir is same as destdir - # this occurs when build/test performed in source dir and - # make cp fail - SDIR=`$DIRNAME $HDFLIB_HOME/slf4j-api-1.7.5.jar` - INODE_SDIR=`$LS -i -d $SDIR | $AWK -F' ' '{print $1}'` - INODE_DDIR=`$LS -i -d $BLDLIBDIR | $AWK -F' ' '{print $1}'` - if [ "$INODE_SDIR" != "$INODE_DDIR" ]; then - $RM $BLDLIBDIR - fi -} - -COPY_DATAFILES="$LIST_DATA_FILES" - -COPY_DATAFILES_TO_BLDDIR() -{ - # copy test files. Used -f to make sure get a new copy - for tstfile in $COPY_DATAFILES - do - # ignore '#' comment - echo $tstfile | tr -d ' ' | grep '^#' > /dev/null - RET=$? - if [ $RET -eq 1 ]; then - # skip cp if srcdir is same as destdir - # this occurs when build/test performed in source dir and - # make cp fail - SDIR=`$DIRNAME $tstfile` - INODE_SDIR=`$LS -i -d $SDIR | $AWK -F' ' '{print $1}'` - INODE_DDIR=`$LS -i -d $BLDDIR | $AWK -F' ' '{print $1}'` - if [ "$INODE_SDIR" != "$INODE_DDIR" ]; then - $CP -f $tstfile $BLDDIR - if [ $? -ne 0 ]; then - echo "Error: FAILED to copy $tstfile ." - - # Comment out this to CREATE expected file - exit $EXIT_FAILURE - fi - fi - fi - done -} - -CLEAN_DATAFILES_AND_BLDDIR() -{ - $RM $BLDDIR/examples.groups.H5Ex_G_*.txt - $RM $BLDDIR/H5Ex_G_*.out - $RM $BLDDIR/H5Ex_G_*.h5 - SDIR=`$DIRNAME $tstfile` - INODE_SDIR=`$LS -i -d $SDIR | $AWK -F' ' '{print $1}'` - INODE_DDIR=`$LS -i -d $BLDDIR | $AWK -F' ' '{print $1}'` - if [ "$INODE_SDIR" != "$INODE_DDIR" ]; then SDIR=`$DIRNAME $tstfile` - $RM $BLDDIR/h5ex_g_iterate.h5 - $RM $BLDDIR/h5ex_g_visit.h5 - fi -} - -COPY_REFFILES="$LIST_REF_FILES" - -COPY_REFFILES_TO_BLDREFDIR() -{ - # copy test files. Used -f to make sure get a new copy - for tstfile in $COPY_REFFILES - do - # ignore '#' comment - echo $tstfile | tr -d ' ' | grep '^#' > /dev/null - RET=$? - if [ $RET -eq 1 ]; then - # skip cp if srcdir is same as destdir - # this occurs when build/test performed in source dir and - # make cp fail - SDIR=`$DIRNAME $tstfile` - INODE_SDIR=`$LS -i -d $SDIR | $AWK -F' ' '{print $1}'` - INODE_DDIR=`$LS -i -d $BLDREFDIR | $AWK -F' ' '{print $1}'` - if [ "$INODE_SDIR" != "$INODE_DDIR" ]; then - $CP -f $tstfile $BLDREFDIR - if [ $? -ne 0 ]; then - echo "Error: FAILED to copy $tstfile ." - - # Comment out this to CREATE expected file - exit $EXIT_FAILURE - fi - fi - fi - done -} - -CLEAN_REFFILES_AND_BLDREFDIR() -{ - # skip rm if srcdir is same as destdir - # this occurs when build/test performed in source dir and - # make cp fail - SDIR=`$DIRNAME $HDFTEST_HOME/h5ex_g_iterate.h5` - INODE_SDIR=`$LS -i -d $SDIR | $AWK -F' ' '{print $1}'` - INODE_DDIR=`$LS -i -d $BLDREFDIR | $AWK -F' ' '{print $1}'` - if [ "$INODE_SDIR" != "$INODE_DDIR" ]; then - $RM $BLDREFDIR - fi -} - -# Print a line-line message left justified in a field of 70 characters -# beginning with the word "Testing". -# -TESTING() { - SPACES=" " - echo "Testing $* $SPACES" | cut -c1-70 | tr -d '\012' -} - -# where Java is installed (requires jdk1.7.x) -JAVAEXE=@JAVA@ -JAVAEXEFLAGS=@H5_JAVAFLAGS@ - -############################################################################### -# DO NOT MODIFY BELOW THIS LINE -############################################################################### - -# prepare for test -COPY_LIBFILES_TO_BLDLIBDIR -COPY_DATAFILES_TO_BLDDIR -COPY_REFFILES_TO_BLDREFDIR - -CPATH=".:"$BLDLIBDIR"/"$JARFILE":"$BLDLIBDIR"/slf4j-api-1.7.5.jar:"$BLDLIBDIR"/slf4j-simple-1.7.5.jar:"$TESTJARFILE"" - -TEST=/usr/bin/test -if [ ! -x /usr/bin/test ] -then -TEST=`which test` -fi - -if $TEST -z "$CLASSPATH"; then - CLASSPATH="" -fi -CLASSPATH=$CPATH":"$CLASSPATH -export CLASSPATH - -if $TEST -n "$JAVAPATH" ; then - PATH=$JAVAPATH":"$PATH - export PATH -fi - -if $TEST -e /bin/uname; then - os_name=`/bin/uname -s` -elif $TEST -e /usr/bin/uname; then - os_name=`/usr/bin/uname -s` -else - os_name=unknown -fi - -if $TEST -z "$LD_LIBRARY_PATH" ; then - LD_LIBRARY_PATH="" -fi - -case $os_name in - Darwin) - DYLD_LIBRARY_PATH=$BLDLIBDIR:$DYLD_LIBRARY_PATH - export DYLD_LIBRARY_PATH - LD_LIBRARY_PATH=$DYLD_LIBRARY_PATH - ;; - *) - LD_LIBRARY_PATH=$BLDLIBDIR:$LD_LIBRARY_PATH - ;; -esac - -export LD_LIBRARY_PATH - -echo "$JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH examples.groups.H5Ex_G_Create" -TESTING examples.groups.H5Ex_G_Create -($RUNSERIAL $JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH examples.groups.H5Ex_G_Create > H5Ex_G_Create.out) -if diff H5Ex_G_Create.out examples.groups.H5Ex_G_Create.txt > /dev/null; then - echo " PASSED groups.H5Ex_G_Create" -else - echo "**FAILED** groups.H5Ex_G_Create" - nerrors="`expr $nerrors + 1`" -fi - -echo "$JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH examples.groups.H5Ex_G_Iterate" -TESTING examples.groups.H5Ex_G_Iterate -($RUNSERIAL $JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH examples.groups.H5Ex_G_Iterate > H5Ex_G_Iterate.out) -if diff H5Ex_G_Iterate.out examples.groups.H5Ex_G_Iterate.txt > /dev/null; then - echo " PASSED groups.H5Ex_G_Iterate" -else - echo "**FAILED** groups.H5Ex_G_Iterate" - nerrors="`expr $nerrors + 1`" -fi - -echo "$JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH examples.groups.H5Ex_G_Compact" -TESTING examples.groups.H5Ex_G_Compact -($RUNSERIAL $JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH examples.groups.H5Ex_G_Compact > H5Ex_G_Compact.out) -if diff H5Ex_G_Compact.out examples.groups.H5Ex_G_Compact.txt > /dev/null; then - echo " PASSED groups.H5Ex_G_Compact" -else - echo "**FAILED** groups.H5Ex_G_Compact" - nerrors="`expr $nerrors + 1`" -fi - -echo "$JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH examples.groups.H5Ex_G_Corder" -TESTING examples.groups.H5Ex_G_Corder -($RUNSERIAL $JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH examples.groups.H5Ex_G_Corder > H5Ex_G_Corder.out) -if diff H5Ex_G_Corder.out examples.groups.H5Ex_G_Corder.txt > /dev/null; then - echo " PASSED groups.H5Ex_G_Corder" -else - echo "**FAILED** groups.H5Ex_G_Corder" - nerrors="`expr $nerrors + 1`" -fi - -echo "$JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH examples.groups.H5Ex_G_Intermediate" -TESTING examples.groups.H5Ex_G_Intermediate -($RUNSERIAL $JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH examples.groups.H5Ex_G_Intermediate > H5Ex_G_Intermediate.out) -if diff H5Ex_G_Intermediate.out examples.groups.H5Ex_G_Intermediate.txt > /dev/null; then - echo " PASSED groups.H5Ex_G_Intermediate" -else - echo "**FAILED** groups.H5Ex_G_Intermediate" - nerrors="`expr $nerrors + 1`" -fi - -echo "$JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH examples.groups.H5Ex_G_Phase" -TESTING examples.groups.H5Ex_G_Phase -($RUNSERIAL $JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH examples.groups.H5Ex_G_Phase > H5Ex_G_Phase.out) -if diff H5Ex_G_Phase.out examples.groups.H5Ex_G_Phase.txt > /dev/null; then - echo " PASSED groups.H5Ex_G_Phase" -else - echo "**FAILED** groups.H5Ex_G_Phase" - nerrors="`expr $nerrors + 1`" -fi - -echo "$JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH examples.groups.H5Ex_G_Visit" -TESTING examples.groups.H5Ex_G_Visit -($RUNSERIAL $JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH examples.groups.H5Ex_G_Visit > H5Ex_G_Visit.out) -if diff H5Ex_G_Visit.out examples.groups.H5Ex_G_Visit.txt > /dev/null; then - echo " PASSED groups.H5Ex_G_Visit" -else - echo "**FAILED** groups.H5Ex_G_Visit" - nerrors="`expr $nerrors + 1`" -fi - -# Clean up temporary files/directories -CLEAN_LIBFILES_AND_BLDLIBDIR -CLEAN_DATAFILES_AND_BLDDIR -CLEAN_REFFILES_AND_BLDREFDIR - -# Report test results and exit -if test $nerrors -eq 0 ; then - echo "All $TESTNAME tests passed." - exit $EXIT_SUCCESS -else - echo "$TESTNAME tests failed with $nerrors errors." - exit $EXIT_FAILURE -fi diff --git a/java/examples/intro/JavaIntroExample.sh.in b/java/examples/intro/JavaIntroExample.sh.in new file mode 100644 index 0000000..3c3036a --- /dev/null +++ b/java/examples/intro/JavaIntroExample.sh.in @@ -0,0 +1,296 @@ +#! /bin/sh +# +# Copyright by The HDF Group. +# Copyright by the Board of Trustees of the University of Illinois. +# All rights reserved. +# +# This file is part of HDF5. The full HDF5 copyright notice, including +# terms governing use, modification, and redistribution, is contained in +# the COPYING file, which can be found at the root of the source code +# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. +# If you do not have access to either file, you may request a copy from +# help@hdfgroup.org. +# + +top_builddir=@top_builddir@ +top_srcdir=@top_srcdir@ +srcdir=@srcdir@ + +TESTNAME=EX_Intro +EXIT_SUCCESS=0 +EXIT_FAILURE=1 + +# Set up default variable values if not supplied by the user. +RM='rm -rf' +CMP='cmp' +DIFF='diff -c' +CP='cp' +DIRNAME='dirname' +LS='ls' +AWK='awk' + +nerrors=0 + +# where the libs exist +HDFLIB_HOME="$top_srcdir/java/lib" +BLDLIBDIR="$top_builddir/hdf5/lib" +BLDDIR="." +HDFTEST_HOME="$top_srcdir/java/examples/intro" +JARFILE=jar@PACKAGE_TARNAME@-@PACKAGE_VERSION@.jar +TESTJARFILE=jar@PACKAGE_TARNAME@intro.jar +test -d $BLDLIBDIR || mkdir -p $BLDLIBDIR + +###################################################################### +# library files +# -------------------------------------------------------------------- +# All the library files copy from source directory to test directory +# NOTE: Keep this framework to add/remove test files. +# This list are also used for checking exist. +# Comment '#' without space can be used. +# -------------------------------------------------------------------- +LIST_LIBRARY_FILES=" +$HDFLIB_HOME/slf4j-api-1.7.5.jar +$HDFLIB_HOME/ext/slf4j-simple-1.7.5.jar +$top_builddir/src/.libs/libhdf5.* +$top_builddir/java/src/jni/.libs/libhdf5_java.* +$top_builddir/java/src/$JARFILE +" +LIST_DATA_FILES=" +$HDFTEST_HOME/../testfiles/examples.intro.H5_CreateDataset.txt +$HDFTEST_HOME/../testfiles/examples.intro.H5_CreateAttribute.txt +$HDFTEST_HOME/../testfiles/examples.intro.H5_CreateFile.txt +$HDFTEST_HOME/../testfiles/examples.intro.H5_CreateGroup.txt +$HDFTEST_HOME/../testfiles/examples.intro.H5_CreateGroupAbsoluteRelative.txt +$HDFTEST_HOME/../testfiles/examples.intro.H5_CreateGroupDataset.txt +$HDFTEST_HOME/../testfiles/examples.intro.H5_ReadWrite.txt +" + +# +# copy files from source dirs to test dir +# +COPY_LIBFILES="$LIST_LIBRARY_FILES" + +COPY_LIBFILES_TO_BLDLIBDIR() +{ + # copy test files. Used -f to make sure get a new copy + for tstfile in $COPY_LIBFILES + do + # ignore '#' comment + echo $tstfile | tr -d ' ' | grep '^#' > /dev/null + RET=$? + if [ $RET -eq 1 ]; then + # skip cp if srcdir is same as destdir + # this occurs when build/test performed in source dir and + # make cp fail + SDIR=`$DIRNAME $tstfile` + INODE_SDIR=`$LS -i -d $SDIR | $AWK -F' ' '{print $1}'` + INODE_DDIR=`$LS -i -d $BLDLIBDIR | $AWK -F' ' '{print $1}'` + if [ "$INODE_SDIR" != "$INODE_DDIR" ]; then + $CP -f $tstfile $BLDLIBDIR + if [ $? -ne 0 ]; then + echo "Error: FAILED to copy $tstfile ." + + # Comment out this to CREATE expected file + exit $EXIT_FAILURE + fi + fi + fi + done +} + +CLEAN_LIBFILES_AND_BLDLIBDIR() +{ + # skip rm if srcdir is same as destdir + # this occurs when build/test performed in source dir and + # make cp fail + SDIR=`$DIRNAME $HDFLIB_HOME/slf4j-api-1.7.5.jar` + INODE_SDIR=`$LS -i -d $SDIR | $AWK -F' ' '{print $1}'` + INODE_DDIR=`$LS -i -d $BLDLIBDIR | $AWK -F' ' '{print $1}'` + if [ "$INODE_SDIR" != "$INODE_DDIR" ]; then + $RM $BLDLIBDIR + fi +} + +COPY_DATAFILES="$LIST_DATA_FILES" + +COPY_DATAFILES_TO_BLDDIR() +{ + # copy test files. Used -f to make sure get a new copy + for tstfile in $COPY_DATAFILES + do + # ignore '#' comment + echo $tstfile | tr -d ' ' | grep '^#' > /dev/null + RET=$? + if [ $RET -eq 1 ]; then + # skip cp if srcdir is same as destdir + # this occurs when build/test performed in source dir and + # make cp fail + SDIR=`$DIRNAME $tstfile` + INODE_SDIR=`$LS -i -d $SDIR | $AWK -F' ' '{print $1}'` + INODE_DDIR=`$LS -i -d $BLDDIR | $AWK -F' ' '{print $1}'` + if [ "$INODE_SDIR" != "$INODE_DDIR" ]; then + $CP -f $tstfile $BLDDIR + if [ $? -ne 0 ]; then + echo "Error: FAILED to copy $tstfile ." + + # Comment out this to CREATE expected file + exit $EXIT_FAILURE + fi + fi + fi + done +} + +CLEAN_DATAFILES_AND_BLDDIR() +{ + $RM $BLDDIR/examples.intro.H5_*.txt + $RM $BLDDIR/H5_*.out + $RM $BLDDIR/H5_*.h5 +} + +# Print a line-line message left justified in a field of 70 characters +# beginning with the word "Testing". +# +TESTING() { + SPACES=" " + echo "Testing $* $SPACES" | cut -c1-70 | tr -d '\012' +} + +# where Java is installed (requires jdk1.7.x) +JAVAEXE=@JAVA@ +JAVAEXEFLAGS=@H5_JAVAFLAGS@ + +############################################################################### +# DO NOT MODIFY BELOW THIS LINE +############################################################################### + +# prepare for test +COPY_LIBFILES_TO_BLDLIBDIR +COPY_DATAFILES_TO_BLDDIR + +CPATH=".:"$BLDLIBDIR"/"$JARFILE":"$BLDLIBDIR"/slf4j-api-1.7.5.jar:"$BLDLIBDIR"/slf4j-simple-1.7.5.jar:"$TESTJARFILE"" + +TEST=/usr/bin/test +if [ ! -x /usr/bin/test ] +then +TEST=`which test` +fi + +if $TEST -z "$CLASSPATH"; then + CLASSPATH="" +fi +CLASSPATH=$CPATH":"$CLASSPATH +export CLASSPATH + +if $TEST -n "$JAVAPATH" ; then + PATH=$JAVAPATH":"$PATH + export PATH +fi + +if $TEST -e /bin/uname; then + os_name=`/bin/uname -s` +elif $TEST -e /usr/bin/uname; then + os_name=`/usr/bin/uname -s` +else + os_name=unknown +fi + +if $TEST -z "$LD_LIBRARY_PATH" ; then + LD_LIBRARY_PATH="" +fi + +case $os_name in + Darwin) + DYLD_LIBRARY_PATH=$BLDLIBDIR:$DYLD_LIBRARY_PATH + export DYLD_LIBRARY_PATH + LD_LIBRARY_PATH=$DYLD_LIBRARY_PATH + ;; + *) + LD_LIBRARY_PATH=$BLDLIBDIR:$LD_LIBRARY_PATH + ;; +esac + +export LD_LIBRARY_PATH + +echo "$JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH examples.intro.H5_CreateDataset" +TESTING examples.intro.H5_CreateDataset +($RUNSERIAL $JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH examples.intro.H5_CreateDataset > H5_CreateDataset.out) +if diff H5_CreateDataset.out examples.intro.H5_CreateDataset.txt > /dev/null; then + echo " PASSED intro.H5_CreateDataset" +else + echo "**FAILED** intro.H5_CreateDataset" + nerrors="`expr $nerrors + 1`" +fi + +echo "$JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH examples.intro.H5_CreateAttribute" +TESTING examples.intro.H5_CreateAttribute +($RUNSERIAL $JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH examples.intro.H5_CreateAttribute > H5_CreateAttribute.out) +if diff H5_CreateAttribute.out examples.intro.H5_CreateAttribute.txt > /dev/null; then + echo " PASSED intro.H5_CreateAttribute" +else + echo "**FAILED** intro.H5_CreateAttribute" + nerrors="`expr $nerrors + 1`" +fi + +echo "$JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH examples.intro.H5_CreateFile" +TESTING examples.intro.H5_CreateFile +($RUNSERIAL $JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH examples.intro.H5_CreateFile > H5_CreateFile.out) +if diff H5_CreateFile.out examples.intro.H5_CreateFile.txt > /dev/null; then + echo " PASSED intro.H5_CreateFile" +else + echo "**FAILED** intro.H5_CreateFile" + nerrors="`expr $nerrors + 1`" +fi + +echo "$JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH examples.intro.H5_CreateGroup" +TESTING examples.intro.H5_CreateGroup +($RUNSERIAL $JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH examples.intro.H5_CreateGroup > H5_CreateGroup.out) +if diff H5_CreateGroup.out examples.intro.H5_CreateGroup.txt > /dev/null; then + echo " PASSED intro.H5_CreateGroup" +else + echo "**FAILED** intro.H5_CreateGroup" + nerrors="`expr $nerrors + 1`" +fi + +echo "$JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH examples.intro.H5_CreateGroupAbsoluteRelative" +TESTING examples.intro.H5_CreateGroupAbsoluteRelative +($RUNSERIAL $JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH examples.intro.H5_CreateGroupAbsoluteRelative > H5_CreateGroupAbsoluteRelative.out) +if diff H5_CreateGroupAbsoluteRelative.out examples.intro.H5_CreateGroupAbsoluteRelative.txt > /dev/null; then + echo " PASSED intro.H5_CreateGroupAbsoluteRelative" +else + echo "**FAILED** intro.H5_CreateGroupAbsoluteRelative" + nerrors="`expr $nerrors + 1`" +fi + +echo "$JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH examples.intro.H5_CreateGroupDataset" +TESTING examples.intro.H5_CreateGroupDataset +($RUNSERIAL $JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH examples.intro.H5_CreateGroupDataset > H5_CreateGroupDataset.out) +if diff H5_CreateGroupDataset.out examples.intro.H5_CreateGroupDataset.txt > /dev/null; then + echo " PASSED intro.H5_CreateGroupDataset" +else + echo "**FAILED** intro.H5_CreateGroupDataset" + nerrors="`expr $nerrors + 1`" +fi + +echo "$JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH examples.intro.H5_ReadWrite" +TESTING examples.intro.H5_ReadWrite +($RUNSERIAL $JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH examples.intro.H5_ReadWrite > H5_ReadWrite.out) +if diff H5_ReadWrite.out examples.intro.H5_ReadWrite.txt > /dev/null; then + echo " PASSED intro.H5_ReadWrite" +else + echo "**FAILED** intro.H5_ReadWrite" + nerrors="`expr $nerrors + 1`" +fi + +# Clean up temporary files/directories +CLEAN_LIBFILES_AND_BLDLIBDIR +CLEAN_DATAFILES_AND_BLDDIR + +# Report test results and exit +if test $nerrors -eq 0 ; then + echo "All $TESTNAME tests passed." + exit $EXIT_SUCCESS +else + echo "$TESTNAME tests failed with $nerrors errors." + exit $EXIT_FAILURE +fi diff --git a/java/examples/intro/Makefile.am b/java/examples/intro/Makefile.am index 95743d9..0df08cb 100644 --- a/java/examples/intro/Makefile.am +++ b/java/examples/intro/Makefile.am @@ -52,10 +52,10 @@ noinst_DATA = $(jarfile) .PHONY: classes -check_SCRIPTS = runExample.sh +check_SCRIPTS = JavaIntroExample.sh TEST_SCRIPT = $(check_SCRIPTS) -CLEANFILES = classnoinst.stamp $(jarfile) $(JAVAROOT)/$(pkgpath)/*.class runExample.sh +CLEANFILES = classnoinst.stamp $(jarfile) $(JAVAROOT)/$(pkgpath)/*.class JavaIntroExample.sh clean: rm -rf $(JAVAROOT)/* diff --git a/java/examples/intro/runExample.sh.in b/java/examples/intro/runExample.sh.in deleted file mode 100644 index 3c3036a..0000000 --- a/java/examples/intro/runExample.sh.in +++ /dev/null @@ -1,296 +0,0 @@ -#! /bin/sh -# -# Copyright by The HDF Group. -# Copyright by the Board of Trustees of the University of Illinois. -# All rights reserved. -# -# This file is part of HDF5. The full HDF5 copyright notice, including -# terms governing use, modification, and redistribution, is contained in -# the COPYING file, which can be found at the root of the source code -# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. -# If you do not have access to either file, you may request a copy from -# help@hdfgroup.org. -# - -top_builddir=@top_builddir@ -top_srcdir=@top_srcdir@ -srcdir=@srcdir@ - -TESTNAME=EX_Intro -EXIT_SUCCESS=0 -EXIT_FAILURE=1 - -# Set up default variable values if not supplied by the user. -RM='rm -rf' -CMP='cmp' -DIFF='diff -c' -CP='cp' -DIRNAME='dirname' -LS='ls' -AWK='awk' - -nerrors=0 - -# where the libs exist -HDFLIB_HOME="$top_srcdir/java/lib" -BLDLIBDIR="$top_builddir/hdf5/lib" -BLDDIR="." -HDFTEST_HOME="$top_srcdir/java/examples/intro" -JARFILE=jar@PACKAGE_TARNAME@-@PACKAGE_VERSION@.jar -TESTJARFILE=jar@PACKAGE_TARNAME@intro.jar -test -d $BLDLIBDIR || mkdir -p $BLDLIBDIR - -###################################################################### -# library files -# -------------------------------------------------------------------- -# All the library files copy from source directory to test directory -# NOTE: Keep this framework to add/remove test files. -# This list are also used for checking exist. -# Comment '#' without space can be used. -# -------------------------------------------------------------------- -LIST_LIBRARY_FILES=" -$HDFLIB_HOME/slf4j-api-1.7.5.jar -$HDFLIB_HOME/ext/slf4j-simple-1.7.5.jar -$top_builddir/src/.libs/libhdf5.* -$top_builddir/java/src/jni/.libs/libhdf5_java.* -$top_builddir/java/src/$JARFILE -" -LIST_DATA_FILES=" -$HDFTEST_HOME/../testfiles/examples.intro.H5_CreateDataset.txt -$HDFTEST_HOME/../testfiles/examples.intro.H5_CreateAttribute.txt -$HDFTEST_HOME/../testfiles/examples.intro.H5_CreateFile.txt -$HDFTEST_HOME/../testfiles/examples.intro.H5_CreateGroup.txt -$HDFTEST_HOME/../testfiles/examples.intro.H5_CreateGroupAbsoluteRelative.txt -$HDFTEST_HOME/../testfiles/examples.intro.H5_CreateGroupDataset.txt -$HDFTEST_HOME/../testfiles/examples.intro.H5_ReadWrite.txt -" - -# -# copy files from source dirs to test dir -# -COPY_LIBFILES="$LIST_LIBRARY_FILES" - -COPY_LIBFILES_TO_BLDLIBDIR() -{ - # copy test files. Used -f to make sure get a new copy - for tstfile in $COPY_LIBFILES - do - # ignore '#' comment - echo $tstfile | tr -d ' ' | grep '^#' > /dev/null - RET=$? - if [ $RET -eq 1 ]; then - # skip cp if srcdir is same as destdir - # this occurs when build/test performed in source dir and - # make cp fail - SDIR=`$DIRNAME $tstfile` - INODE_SDIR=`$LS -i -d $SDIR | $AWK -F' ' '{print $1}'` - INODE_DDIR=`$LS -i -d $BLDLIBDIR | $AWK -F' ' '{print $1}'` - if [ "$INODE_SDIR" != "$INODE_DDIR" ]; then - $CP -f $tstfile $BLDLIBDIR - if [ $? -ne 0 ]; then - echo "Error: FAILED to copy $tstfile ." - - # Comment out this to CREATE expected file - exit $EXIT_FAILURE - fi - fi - fi - done -} - -CLEAN_LIBFILES_AND_BLDLIBDIR() -{ - # skip rm if srcdir is same as destdir - # this occurs when build/test performed in source dir and - # make cp fail - SDIR=`$DIRNAME $HDFLIB_HOME/slf4j-api-1.7.5.jar` - INODE_SDIR=`$LS -i -d $SDIR | $AWK -F' ' '{print $1}'` - INODE_DDIR=`$LS -i -d $BLDLIBDIR | $AWK -F' ' '{print $1}'` - if [ "$INODE_SDIR" != "$INODE_DDIR" ]; then - $RM $BLDLIBDIR - fi -} - -COPY_DATAFILES="$LIST_DATA_FILES" - -COPY_DATAFILES_TO_BLDDIR() -{ - # copy test files. Used -f to make sure get a new copy - for tstfile in $COPY_DATAFILES - do - # ignore '#' comment - echo $tstfile | tr -d ' ' | grep '^#' > /dev/null - RET=$? - if [ $RET -eq 1 ]; then - # skip cp if srcdir is same as destdir - # this occurs when build/test performed in source dir and - # make cp fail - SDIR=`$DIRNAME $tstfile` - INODE_SDIR=`$LS -i -d $SDIR | $AWK -F' ' '{print $1}'` - INODE_DDIR=`$LS -i -d $BLDDIR | $AWK -F' ' '{print $1}'` - if [ "$INODE_SDIR" != "$INODE_DDIR" ]; then - $CP -f $tstfile $BLDDIR - if [ $? -ne 0 ]; then - echo "Error: FAILED to copy $tstfile ." - - # Comment out this to CREATE expected file - exit $EXIT_FAILURE - fi - fi - fi - done -} - -CLEAN_DATAFILES_AND_BLDDIR() -{ - $RM $BLDDIR/examples.intro.H5_*.txt - $RM $BLDDIR/H5_*.out - $RM $BLDDIR/H5_*.h5 -} - -# Print a line-line message left justified in a field of 70 characters -# beginning with the word "Testing". -# -TESTING() { - SPACES=" " - echo "Testing $* $SPACES" | cut -c1-70 | tr -d '\012' -} - -# where Java is installed (requires jdk1.7.x) -JAVAEXE=@JAVA@ -JAVAEXEFLAGS=@H5_JAVAFLAGS@ - -############################################################################### -# DO NOT MODIFY BELOW THIS LINE -############################################################################### - -# prepare for test -COPY_LIBFILES_TO_BLDLIBDIR -COPY_DATAFILES_TO_BLDDIR - -CPATH=".:"$BLDLIBDIR"/"$JARFILE":"$BLDLIBDIR"/slf4j-api-1.7.5.jar:"$BLDLIBDIR"/slf4j-simple-1.7.5.jar:"$TESTJARFILE"" - -TEST=/usr/bin/test -if [ ! -x /usr/bin/test ] -then -TEST=`which test` -fi - -if $TEST -z "$CLASSPATH"; then - CLASSPATH="" -fi -CLASSPATH=$CPATH":"$CLASSPATH -export CLASSPATH - -if $TEST -n "$JAVAPATH" ; then - PATH=$JAVAPATH":"$PATH - export PATH -fi - -if $TEST -e /bin/uname; then - os_name=`/bin/uname -s` -elif $TEST -e /usr/bin/uname; then - os_name=`/usr/bin/uname -s` -else - os_name=unknown -fi - -if $TEST -z "$LD_LIBRARY_PATH" ; then - LD_LIBRARY_PATH="" -fi - -case $os_name in - Darwin) - DYLD_LIBRARY_PATH=$BLDLIBDIR:$DYLD_LIBRARY_PATH - export DYLD_LIBRARY_PATH - LD_LIBRARY_PATH=$DYLD_LIBRARY_PATH - ;; - *) - LD_LIBRARY_PATH=$BLDLIBDIR:$LD_LIBRARY_PATH - ;; -esac - -export LD_LIBRARY_PATH - -echo "$JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH examples.intro.H5_CreateDataset" -TESTING examples.intro.H5_CreateDataset -($RUNSERIAL $JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH examples.intro.H5_CreateDataset > H5_CreateDataset.out) -if diff H5_CreateDataset.out examples.intro.H5_CreateDataset.txt > /dev/null; then - echo " PASSED intro.H5_CreateDataset" -else - echo "**FAILED** intro.H5_CreateDataset" - nerrors="`expr $nerrors + 1`" -fi - -echo "$JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH examples.intro.H5_CreateAttribute" -TESTING examples.intro.H5_CreateAttribute -($RUNSERIAL $JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH examples.intro.H5_CreateAttribute > H5_CreateAttribute.out) -if diff H5_CreateAttribute.out examples.intro.H5_CreateAttribute.txt > /dev/null; then - echo " PASSED intro.H5_CreateAttribute" -else - echo "**FAILED** intro.H5_CreateAttribute" - nerrors="`expr $nerrors + 1`" -fi - -echo "$JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH examples.intro.H5_CreateFile" -TESTING examples.intro.H5_CreateFile -($RUNSERIAL $JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH examples.intro.H5_CreateFile > H5_CreateFile.out) -if diff H5_CreateFile.out examples.intro.H5_CreateFile.txt > /dev/null; then - echo " PASSED intro.H5_CreateFile" -else - echo "**FAILED** intro.H5_CreateFile" - nerrors="`expr $nerrors + 1`" -fi - -echo "$JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH examples.intro.H5_CreateGroup" -TESTING examples.intro.H5_CreateGroup -($RUNSERIAL $JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH examples.intro.H5_CreateGroup > H5_CreateGroup.out) -if diff H5_CreateGroup.out examples.intro.H5_CreateGroup.txt > /dev/null; then - echo " PASSED intro.H5_CreateGroup" -else - echo "**FAILED** intro.H5_CreateGroup" - nerrors="`expr $nerrors + 1`" -fi - -echo "$JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH examples.intro.H5_CreateGroupAbsoluteRelative" -TESTING examples.intro.H5_CreateGroupAbsoluteRelative -($RUNSERIAL $JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH examples.intro.H5_CreateGroupAbsoluteRelative > H5_CreateGroupAbsoluteRelative.out) -if diff H5_CreateGroupAbsoluteRelative.out examples.intro.H5_CreateGroupAbsoluteRelative.txt > /dev/null; then - echo " PASSED intro.H5_CreateGroupAbsoluteRelative" -else - echo "**FAILED** intro.H5_CreateGroupAbsoluteRelative" - nerrors="`expr $nerrors + 1`" -fi - -echo "$JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH examples.intro.H5_CreateGroupDataset" -TESTING examples.intro.H5_CreateGroupDataset -($RUNSERIAL $JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH examples.intro.H5_CreateGroupDataset > H5_CreateGroupDataset.out) -if diff H5_CreateGroupDataset.out examples.intro.H5_CreateGroupDataset.txt > /dev/null; then - echo " PASSED intro.H5_CreateGroupDataset" -else - echo "**FAILED** intro.H5_CreateGroupDataset" - nerrors="`expr $nerrors + 1`" -fi - -echo "$JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH examples.intro.H5_ReadWrite" -TESTING examples.intro.H5_ReadWrite -($RUNSERIAL $JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH examples.intro.H5_ReadWrite > H5_ReadWrite.out) -if diff H5_ReadWrite.out examples.intro.H5_ReadWrite.txt > /dev/null; then - echo " PASSED intro.H5_ReadWrite" -else - echo "**FAILED** intro.H5_ReadWrite" - nerrors="`expr $nerrors + 1`" -fi - -# Clean up temporary files/directories -CLEAN_LIBFILES_AND_BLDLIBDIR -CLEAN_DATAFILES_AND_BLDDIR - -# Report test results and exit -if test $nerrors -eq 0 ; then - echo "All $TESTNAME tests passed." - exit $EXIT_SUCCESS -else - echo "$TESTNAME tests failed with $nerrors errors." - exit $EXIT_FAILURE -fi -- cgit v0.12 From da75ed371fda7e01dc74d92575b44e1ce9bd921c Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Wed, 20 Sep 2017 14:39:08 -0500 Subject: Update configure --- configure.ac | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/configure.ac b/configure.ac index e19a790..2b54d70 100644 --- a/configure.ac +++ b/configure.ac @@ -3434,13 +3434,13 @@ AC_CONFIG_FILES([src/libhdf5.settings java/test/junit.sh java/examples/Makefile java/examples/intro/Makefile - java/examples/intro/runExample.sh + java/examples/intro/JavaIntroExample.sh java/examples/datasets/Makefile - java/examples/datasets/runExample.sh + java/examples/datasets/JavaDatasetExample.sh java/examples/datatypes/Makefile - java/examples/datatypes/runExample.sh + java/examples/datatypes/JavaDatatypeExample.sh java/examples/groups/Makefile - java/examples/groups/runExample.sh + java/examples/groups/JavaGroupExample.sh hl/Makefile hl/src/Makefile hl/test/Makefile -- cgit v0.12 From 76d90e4d9d24157734fda253fd1e472eb886f8fc Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Tue, 3 Oct 2017 14:40:24 -0500 Subject: HDFFV-10297 merge tools changes from develop --- MANIFEST | 3 +- tools/lib/h5diff_array.c | 2 +- tools/lib/h5tools_error.h | 16 +- tools/lib/h5tools_ref.c | 3 +- tools/src/h5repack/h5repack.c | 161 ++--- tools/src/h5repack/h5repack_copy.c | 107 ++-- tools/src/h5repack/h5repack_filters.c | 52 +- tools/src/h5repack/h5repack_main.c | 17 - tools/src/h5repack/h5repack_opttable.c | 191 +++--- tools/src/h5repack/h5repack_verify.c | 177 ++---- tools/test/h5copy/CMakeTests.cmake | 20 +- tools/test/h5diff/CMakeTests.cmake | 56 +- tools/test/h5dump/CMakeTests.cmake | 89 ++- tools/test/h5dump/CMakeTestsPBITS.cmake | 10 + tools/test/h5dump/CMakeTestsVDS.cmake | 23 +- tools/test/h5dump/CMakeTestsXML.cmake | 20 +- tools/test/h5format_convert/CMakeTests.cmake | 24 +- tools/test/h5jam/CMakeTests.cmake | 28 +- tools/test/h5ls/CMakeTests.cmake | 15 +- tools/test/h5ls/CMakeTestsVDS.cmake | 11 +- tools/test/h5repack/CMakeTests.cmake | 687 ++++++++++++--------- .../testfiles/h5repack_layout.h5-plugin_zero.ddl | 4 + .../testfiles/h5repack_layout.h5-plugin_zero.tst | 9 - .../testfiles/plugin_zero.h5repack_layout.h5.tst | 7 + tools/test/h5stat/CMakeTests.cmake | 144 ++--- tools/test/misc/CMakeTestsClear.cmake | 102 +-- tools/test/misc/CMakeTestsMkgrp.cmake | 4 + tools/test/perform/CMakeTests.cmake | 24 +- 28 files changed, 1049 insertions(+), 957 deletions(-) create mode 100644 tools/test/h5repack/testfiles/h5repack_layout.h5-plugin_zero.ddl delete mode 100644 tools/test/h5repack/testfiles/h5repack_layout.h5-plugin_zero.tst create mode 100644 tools/test/h5repack/testfiles/plugin_zero.h5repack_layout.h5.tst diff --git a/MANIFEST b/MANIFEST index 281aadd..bb43974 100644 --- a/MANIFEST +++ b/MANIFEST @@ -2460,6 +2460,7 @@ ./tools/test/h5repack/testfiles/deflate_limit.h5repack_layout.h5.ddl ./tools/test/h5repack/testfiles/plugin_none.h5repack_layout.UD.h5.tst ./tools/test/h5repack/testfiles/plugin_test.h5repack_layout.h5.tst +./tools/test/h5repack/testfiles/plugin_zero.h5repack_layout.h5.tst ./tools/test/h5repack/testfiles/plugin_version_test.h5repack_layout.h5.tst ./tools/test/h5repack/testfiles/h5repack-help.txt ./tools/test/h5repack/testfiles/h5repack_filters.h5-gzip_verbose_filters.tst @@ -2468,7 +2469,7 @@ ./tools/test/h5repack/testfiles/h5repack_layout.UD.h5-plugin_none.ddl ./tools/test/h5repack/testfiles/h5repack_layout.h5-plugin_test.ddl ./tools/test/h5repack/testfiles/h5repack_layout.h5-plugin_version_test.ddl -./tools/test/h5repack/testfiles/h5repack_layout.h5-plugin_zero.tst +./tools/test/h5repack/testfiles/h5repack_layout.h5-plugin_zero.ddl ./tools/test/h5repack/testfiles/GS.h5repack_paged_nopersist.h5.ddl ./tools/test/h5repack/testfiles/S.h5repack_fsm_aggr_persist.h5.ddl ./tools/test/h5repack/testfiles/SP.h5repack_fsm_aggr_nopersist.h5.ddl diff --git a/tools/lib/h5diff_array.c b/tools/lib/h5diff_array.c index 32ce3db..09894e6 100644 --- a/tools/lib/h5diff_array.c +++ b/tools/lib/h5diff_array.c @@ -640,8 +640,8 @@ static hsize_t diff_datum( * compared, we convert both bit patterns to their corresponding * enumeration constant and do a string comparison */ + h5difftrace("diff_datum H5T_ENUM\n"); { - h5difftrace("diff_datum H5T_ENUM\n"); char enum_name1[1024]; char enum_name2[1024]; herr_t err1; diff --git a/tools/lib/h5tools_error.h b/tools/lib/h5tools_error.h index a556b0a..2cdaf74 100644 --- a/tools/lib/h5tools_error.h +++ b/tools/lib/h5tools_error.h @@ -65,16 +65,16 @@ H5TOOLS_DLLVAR hid_t H5E_tools_min_id_g; * H5TOOLS_INFO macro, used to facilitate error reporting . The arguments are the major * error number, the minor error number, and a description of the error. */ -#define H5TOOLS_INFO(min_id, str) { \ - H5Epush2(H5tools_ERR_STACK_g, __FILE__, FUNC, __LINE__, H5tools_ERR_CLS_g, H5E_tools_g, min_id, str); \ +#define H5TOOLS_INFO(min_id, ...) { \ + H5Epush2(H5tools_ERR_STACK_g, __FILE__, FUNC, __LINE__, H5tools_ERR_CLS_g, H5E_tools_g, min_id, __VA_ARGS__); \ } /* * HERROR macro, used to facilitate error reporting . The arguments are the major * error number, the minor error number, and a description of the error. */ -#define HERROR(maj_id, min_id, str) { \ - H5Epush2(H5tools_ERR_STACK_g, __FILE__, FUNC, __LINE__, H5tools_ERR_CLS_g, maj_id, min_id, str); \ +#define HERROR(maj_id, min_id, ...) { \ + H5Epush2(H5tools_ERR_STACK_g, __FILE__, FUNC, __LINE__, H5tools_ERR_CLS_g, maj_id, min_id, __VA_ARGS__); \ ret_value = FAIL; \ } @@ -103,8 +103,8 @@ H5TOOLS_DLLVAR hid_t H5E_tools_min_id_g; * The return value is assigned to a variable `ret_value' and control branches * to the `catch_except' label, if we're not already past it. */ -#define H5E_THROW(fail_value, min_id, str) { \ - H5Epush2(H5tools_ERR_STACK_g, __FILE__, FUNC, __LINE__, H5tools_ERR_CLS_g, H5E_tools_g, min_id, str); \ +#define H5E_THROW(fail_value, min_id, ...) { \ + H5Epush2(H5tools_ERR_STACK_g, __FILE__, FUNC, __LINE__, H5tools_ERR_CLS_g, H5E_tools_g, min_id, __VA_ARGS__); \ H5_LEAVE(fail_value) \ } @@ -114,8 +114,8 @@ H5TOOLS_DLLVAR hid_t H5E_tools_min_id_g; * error string. The return value is assigned to a variable `ret_value' and * control branches to the `done' label. */ -#define HGOTO_ERROR(fail_value, min_id, str) { \ - HERROR(H5E_tools_g, min_id, str); \ +#define HGOTO_ERROR(fail_value, min_id, ...) { \ + HERROR(H5E_tools_g, min_id, __VA_ARGS__); \ HGOTO_DONE(fail_value) \ } diff --git a/tools/lib/h5tools_ref.c b/tools/lib/h5tools_ref.c index 6153f0c..d6e5f01 100644 --- a/tools/lib/h5tools_ref.c +++ b/tools/lib/h5tools_ref.c @@ -166,7 +166,8 @@ haddr_t ref_path_table_lookup(const char *thepath) { H5O_info_t oi; - if((HDstrlen(thepath) == 0) || (thepath == NULL)) + + if((thepath == NULL) || (HDstrlen(thepath) == 0)) return HADDR_UNDEF; /* Allow lookups on the root group, even though it doesn't have any link info */ if(HDstrcmp(thepath, "/")) { diff --git a/tools/src/h5repack/h5repack.c b/tools/src/h5repack/h5repack.c index 76ca117..7ed9a90 100644 --- a/tools/src/h5repack/h5repack.c +++ b/tools/src/h5repack/h5repack.c @@ -39,11 +39,6 @@ static int have_request(pack_opt_t *options); * object name requests * * Return: 0, ok, -1, fail - * - * Programmer: pvn@ncsa.uiuc.edu - * - * Date: September, 22, 2003 - * *------------------------------------------------------------------------- */ int h5repack(const char* infile, const char* outfile, pack_opt_t *options) { @@ -68,7 +63,6 @@ int h5repack(const char* infile, const char* outfile, pack_opt_t *options) { * Purpose: initialize options * * Return: 0, ok, -1, fail - * *------------------------------------------------------------------------- */ int @@ -96,7 +90,6 @@ h5repack_init(pack_opt_t *options, int verbose, hbool_t latest) * Function: h5repack_end * * Purpose: free options table - * *------------------------------------------------------------------------- */ @@ -111,18 +104,17 @@ int h5repack_end(pack_opt_t *options) { * Example: -f dset:GZIP=6 * * Return: 0, ok, -1, fail - * *------------------------------------------------------------------------- */ int -h5repack_addfilter(const char* str, pack_opt_t *options) +h5repack_addfilter(const char *str, pack_opt_t *options) { obj_list_t *obj_list = NULL; /* one object list for the -f and -l option entry */ filter_info_t filter; /* filter info for the current -f option entry */ unsigned n_objs; /* number of objects in the current -f or -l option entry */ int is_glb; /* is the filter global */ - /* parse the -f option */ + /* parse the -f (--filter) option */ if (NULL == (obj_list = parse_filter(str, &n_objs, &filter, options, &is_glb))) return -1; @@ -152,11 +144,10 @@ h5repack_addfilter(const char* str, pack_opt_t *options) * Purpose: add a layout option * * Return: 0, ok, -1, fail - * *------------------------------------------------------------------------- */ int -h5repack_addlayout(const char* str, pack_opt_t *options) +h5repack_addlayout(const char *str, pack_opt_t *options) { obj_list_t *obj_list = NULL; /*one object list for the -t and -c option entry */ unsigned n_objs; /*number of objects in the current -t or -c option entry */ @@ -220,11 +211,6 @@ h5repack_addlayout(const char* str, pack_opt_t *options) * returned must be closed after it is no longer needed. * named_datatype_free must be called before the program exits * to free the stack. - * - * Programmer: Neil Fortner - * - * Date: April 14, 2009 - * *------------------------------------------------------------------------- */ hid_t copy_named_datatype(hid_t type_in, hid_t fidout, @@ -304,18 +290,13 @@ hid_t copy_named_datatype(hid_t type_in, hid_t fidout, ret_value = -1; done: - return (ret_value); + return ret_value; } /* end copy_named_datatype */ /*------------------------------------------------------------------------- * Function: named_datatype_free * * Purpose: Frees the stack of named datatypes. - * - * Programmer: Neil Fortner - * - * Date: April 14, 2009 - * *------------------------------------------------------------------------- */ int named_datatype_free(named_dt_t **named_dt_head_p, int ignore_err) { @@ -346,11 +327,6 @@ done: * loc_id = H5Topen2( fid, name); * * Return: 0, ok, -1 no - * - * Programmer: Pedro Vicente, pvn@ncsa.uiuc.edu - * - * Date: October, 28, 2003 - * *------------------------------------------------------------------------- */ int @@ -477,7 +453,6 @@ copy_attr(hid_t loc_in, hid_t loc_out, named_dt_t **named_dt_head_p, buf = (void *)HDmalloc((size_t)(nelmts * msize)); if (buf == NULL) { - error_msg("h5repack", "cannot read into memory\n"); HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "HDmalloc failed"); } /* end if */ if (H5Aread(attr_id, wtype_id, buf) < 0) @@ -489,7 +464,7 @@ copy_attr(hid_t loc_in, hid_t loc_out, named_dt_t **named_dt_head_p, */ if ((attr_out = H5Acreate2(loc_out, name, wtype_id, space_id, H5P_DEFAULT, H5P_DEFAULT)) < 0) - HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Acreate2 failed"); + HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Acreate2 failed on ,%s>", name); if (H5Awrite(attr_out, wtype_id, buf) < 0) HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Awrite failed"); @@ -553,13 +528,10 @@ done: * Purpose: print options, checks for invalid options * * Return: void, return -1 on error - * - * Programmer: pvn@ncsa.uiuc.edu - * - * Date: September, 22, 2003 *------------------------------------------------------------------------- */ static int check_options(pack_opt_t *options) { + int ret_value = 0; /*no need to LEAVE() on ERROR: HERR_INIT(int, SUCCEED) */ unsigned int i; int k, j, has_cp = 0, has_ck = 0; char slayout[30]; @@ -586,11 +558,10 @@ static int check_options(pack_opt_t *options) { break; case H5D_LAYOUT_ERROR: case H5D_NLAYOUTS: - error_msg("invalid layout\n"); - return -1; + HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "invalid layout"); default: strcpy(slayout, "invalid layout\n"); - return -1; + HGOTO_DONE(FAIL); } printf(" Apply %s layout to all\n", slayout); if (H5D_CHUNKED == options->layout_g) { @@ -609,25 +580,20 @@ static int check_options(pack_opt_t *options) { if (options->verbose) { printf(" <%s> with chunk size ", name); for (k = 0; k < options->op_tbl->objs[i].chunk.rank; k++) - printf("%d ", - (int) options->op_tbl->objs[i].chunk.chunk_lengths[k]); + printf("%d ", (int) options->op_tbl->objs[i].chunk.chunk_lengths[k]); printf("\n"); } has_ck = 1; } else if (options->op_tbl->objs[i].chunk.rank == -2) { if (options->verbose) - printf(" <%s> %s\n", name, "NONE (contigous)"); + printf(" <%s> %s\n", name, "NONE (contiguous)"); has_ck = 1; } } - if (options->all_layout == 1 && has_ck) { - error_msg( - "invalid chunking input: 'all' option\ - is present with other objects\n"); - return -1; - } + if (options->all_layout == 1 && has_ck) + HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "invalid chunking input: 'all' option is present with other objects"); /*------------------------------------------------------------------------- * objects to filter @@ -649,8 +615,7 @@ static int check_options(pack_opt_t *options) { break; case H5Z_FILTER_SZIP: case H5Z_FILTER_DEFLATE: - printf(" All with %s, parameter %d\n", get_sfilter(filtn), - options->filter_g[k].cd_values[0]); + printf(" All with %s, parameter %d\n", get_sfilter(filtn), options->filter_g[k].cd_values[0]); break; default: printf(" User Defined %d\n", filtn); @@ -666,48 +631,29 @@ static int check_options(pack_opt_t *options) { for (j = 0; j < pack.nfilters; j++) { if (options->verbose) { - printf(" <%s> with %s filter\n", name, - get_sfilter(pack.filter[j].filtn)); + printf(" <%s> with %s filter\n", name, get_sfilter(pack.filter[j].filtn)); } - has_cp = 1; - } /* j */ } /* i */ - if (options->all_filter == 1 && has_cp) { - error_msg( - "invalid compression input: 'all' option\ - is present with other objects\n"); - return -1; - } + if (options->all_filter == 1 && has_cp) + HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "invalid compression input: 'all' option is present with other objects"); /*------------------------------------------------------------------------- * check options for the latest format *------------------------------------------------------------------------- */ - if (options->grp_compact < 0) { - error_msg( - "invalid maximum number of links to store as header messages\n"); - return -1; - } - if (options->grp_indexed < 0) { - error_msg( - "invalid minimum number of links to store in the indexed format\n"); - return -1; - } - if (options->grp_indexed > options->grp_compact) { - error_msg( - "minimum indexed size is greater than the maximum compact size\n"); - return -1; - } - for (i = 0; i < 8; i++) { - if (options->msg_size[i] < 0) { - error_msg("invalid shared message size\n"); - return -1; - } - } + if (options->grp_compact < 0) + HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "invalid maximum number of links to store as header messages"); + if (options->grp_indexed < 0) + HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "invalid minimum number of links to store in the indexed format"); + if (options->grp_indexed > options->grp_compact) + HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "minimum indexed size is greater than the maximum compact size"); + for (i = 0; i < 8; i++) + if (options->msg_size[i] < 0) + HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "invalid shared message size"); /*-------------------------------------------------------------------------------- * verify new user userblock options; file name must be present @@ -715,30 +661,25 @@ static int check_options(pack_opt_t *options) { */ if (options->ublock_filename != NULL && options->ublock_size == 0) { if (options->verbose) { - printf( - "Warning: user block size missing for file %s. Assigning a default size of 1024...\n", + printf("Warning: user block size missing for file %s. Assigning a default size of 1024...\n", options->ublock_filename); options->ublock_size = 1024; } } - if (options->ublock_filename == NULL && options->ublock_size != 0) { - error_msg("file name missing for user block\n", - options->ublock_filename); - return -1; - } + if (options->ublock_filename == NULL && options->ublock_size != 0) + HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "file name missing for user block", options->ublock_filename); /*-------------------------------------------------------------------------------- * verify alignment options; threshold is zero default but alignment not *--------------------------------------------------------------------------------- */ - if (options->alignment == 0 && options->threshold != 0) { - error_msg("alignment for H5Pset_alignment missing\n"); - return -1; - } + if (options->alignment == 0 && options->threshold != 0) + HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "alignment for H5Pset_alignment missing"); - return 0; +done: + return ret_value; } /*------------------------------------------------------------------------- @@ -748,11 +689,6 @@ static int check_options(pack_opt_t *options) { * supplied list * * Return: 0, ok, -1 no - * - * Programmer: Pedro Vicente, pvn@ncsa.uiuc.edu - * - * Date: September, 23, 2003 - * *------------------------------------------------------------------------- */ static int check_objects(const char* fname, pack_opt_t *options) { @@ -768,8 +704,7 @@ static int check_objects(const char* fname, pack_opt_t *options) { * open the file *------------------------------------------------------------------------- */ - if ((fid = h5tools_fopen(fname, H5F_ACC_RDONLY, H5P_DEFAULT, NULL, NULL, 0)) - < 0) { + if ((fid = h5tools_fopen(fname, H5F_ACC_RDONLY, H5P_DEFAULT, NULL, NULL, 0)) < 0) { printf("<%s>: %s\n", fname, H5FOPENERROR); return -1; } @@ -786,7 +721,7 @@ static int check_objects(const char* fname, pack_opt_t *options) { /* get the list of objects in the file */ if (h5trav_gettable(fid, travt) < 0) - goto out; + goto done; /*------------------------------------------------------------------------- * compare with user supplied list @@ -794,8 +729,7 @@ static int check_objects(const char* fname, pack_opt_t *options) { */ if (options->verbose) - printf("Opening file <%s>. Searching for objects to modify...\n", - fname); + printf("Opening file <%s>. Searching for objects to modify...\n", fname); for (i = 0; i < options->op_tbl->nelems; i++) { char* name = options->op_tbl->objs[i].path; @@ -806,7 +740,7 @@ static int check_objects(const char* fname, pack_opt_t *options) { if (h5trav_getindext(name, travt) < 0) { error_msg("%s Could not find <%s> in file <%s>. Exiting...\n", (options->verbose ? "\n" : ""), name, fname); - goto out; + goto done; } if (options->verbose) printf("...Found\n"); @@ -831,26 +765,25 @@ static int check_objects(const char* fname, pack_opt_t *options) { } else { if ((did = H5Dopen2(fid, name, H5P_DEFAULT)) < 0) - goto out; + goto done; if ((sid = H5Dget_space(did)) < 0) - goto out; + goto done; if ((rank = H5Sget_simple_extent_ndims(sid)) < 0) - goto out; + goto done; HDmemset(dims, 0, sizeof dims); if (H5Sget_simple_extent_dims(sid, dims, NULL) < 0) - goto out; + goto done; for (j = 0; j < rank; j++) csize *= dims[j]; if (H5Sclose(sid) < 0) - goto out; + goto done; if (H5Dclose(did) < 0) - goto out; + goto done; } if (csize < ppb) { - printf( - " \n"); - goto out; + printf(" \n"); + goto done; } } break; @@ -867,7 +800,7 @@ static int check_objects(const char* fname, pack_opt_t *options) { trav_table_free(travt); return 0; -out: +done: H5Fclose(fid); trav_table_free(travt); return -1; @@ -879,9 +812,6 @@ out: * Purpose: check if a filter or layout was requested * * Return: 1 yes, 0 no - * - * Date: May, 24, 2007 - * *------------------------------------------------------------------------- */ static int have_request(pack_opt_t *options) { @@ -899,7 +829,6 @@ static int have_request(pack_opt_t *options) { * Purpose: return the filter as a string name * * Return: name of filter, exit on error - * *------------------------------------------------------------------------- */ diff --git a/tools/src/h5repack/h5repack_copy.c b/tools/src/h5repack/h5repack_copy.c index e77cc30..9df7917 100644 --- a/tools/src/h5repack/h5repack_copy.c +++ b/tools/src/h5repack/h5repack_copy.c @@ -110,8 +110,7 @@ int copy_objects(const char* fnamein, const char* fnameout, pack_opt_t *options) *------------------------------------------------------------------------- */ if ((fidin = h5tools_fopen(fnamein, H5F_ACC_RDONLY, H5P_DEFAULT, NULL, NULL, (size_t) 0)) < 0) { - error_msg("<%s>: %s\n", fnamein, H5FOPENERROR); - HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Pclose failed"); + HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "h5tools_fopen failed <%s>: %s", fnamein, H5FOPENERROR); } /* get user block size and file space strategy/persist/threshold */ @@ -121,25 +120,21 @@ int copy_objects(const char* fnamein, const char* fnameout, pack_opt_t *options) hid_t gcpl_in = -1; /* group creation property list */ if ((fcpl_in = H5Fget_create_plist(fidin)) < 0) { - error_msg("failed to retrieve file creation property list\n"); - HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Pclose failed"); + HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Fget_create_plist failed to retrieve file creation property list"); } if (H5Pget_userblock(fcpl_in, &ub_size) < 0) { - error_msg("failed to retrieve userblock size\n"); - HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Pclose failed"); + HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Pget_userblock failed to retrieve userblock size"); } /* If the -S option is not set, get "strategy" from the input file */ if(H5Pget_file_space_strategy(fcpl_in, &in_strategy, &in_persist, &in_threshold) < 0) { - error_msg("failed to retrieve file space strategy\n"); - HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Pclose failed"); + HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Pget_file_space_strategy failed to retrieve file space strategy"); } /* If the -G option is not set, get "pagesize" from the input file */ if(H5Pget_file_space_page_size(fcpl_in, &in_pagesize) < 0) { - error_msg("failed to retrieve file space threshold\n"); - HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Pclose failed"); + HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Pget_file_space_page_size failed to retrieve file space threshold"); } /* open root group */ if ((grp_in = H5Gopen2(fidin, "/", H5P_DEFAULT)) < 0) @@ -154,8 +149,7 @@ int copy_objects(const char* fnamein, const char* fnameout, pack_opt_t *options) HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Pget_link_creation_order failed"); if (H5Pclose(fcpl_in) < 0) { - error_msg("failed to close property list\n"); - HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Pclose failed"); + HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Pclose failed to close property list"); } } @@ -163,14 +157,12 @@ int copy_objects(const char* fnamein, const char* fnameout, pack_opt_t *options) if (options->latest || ub_size > 0) { /* Create file creation property list */ if ((fcpl = H5Pcreate(H5P_FILE_CREATE)) < 0) { - error_msg("fail to create a file creation property list\n"); - HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Pclose failed"); + HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Pcreate failed to create a file creation property list"); } if (ub_size > 0) { if (H5Pset_userblock(fcpl, ub_size) < 0) { - error_msg("failed to set non-default userblock size\n"); - HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Pclose failed"); + HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Pset_userblock failed to set non-default userblock size"); } } @@ -181,8 +173,7 @@ int copy_objects(const char* fnamein, const char* fnameout, pack_opt_t *options) /* (So that it is created in "dense storage" form) */ if (H5Pset_link_phase_change(fcpl, (unsigned) options->grp_compact, (unsigned) options->grp_indexed) < 0) { - error_msg("fail to adjust group creation parameters for root group\n"); - HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Pclose failed"); + HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Pset_link_phase_change failed to adjust group creation parameters for root group"); } for (i = 0; i < 5; i++) { @@ -219,28 +210,24 @@ int copy_objects(const char* fnamein, const char* fnameout, pack_opt_t *options) if (nindex > 0) { if (H5Pset_shared_mesg_nindexes(fcpl, nindex) < 0) { - error_msg("fail to set the number of shared object header message indexes\n"); - HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Pclose failed"); + HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Pset_shared_mesg_nindexes failed to set the number of shared object header message indexes"); } /* msg_size[0]=dataspace, 1=datatype, 2=file value, 3=filter pipleline, 4=attribute */ for (i = 0; i < (nindex - 1); i++) { if (H5Pset_shared_mesg_index(fcpl, i, mesg_type_flags[i], min_mesg_sizes[i]) < 0) { - error_msg("fail to configure the specified shared object header message index\n"); - HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Pclose failed"); + HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Pset_shared_mesg_index failed to configure the specified shared object header message index"); } /* end if */ } /* end for */ } /* if (nindex>0) */ /* Create file access property list */ if ((fapl = H5Pcreate(H5P_FILE_ACCESS)) < 0) { - error_msg("Could not create file access property list\n"); - HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Pclose failed"); + HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Pcreate failed to create file access property list"); } /* end if */ if (H5Pset_libver_bounds(fapl, H5F_LIBVER_LATEST, H5F_LIBVER_LATEST) < 0) { - error_msg("Could not set property for using latest version of the format\n"); - HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Pclose failed"); + HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Pset_libver_bounds failed to set property for using latest version of the format"); } /* end if */ } /* end if */ } /* end if */ @@ -257,15 +244,13 @@ print_user_block(fnamein, fidin); if (fcpl == H5P_DEFAULT) { /* create a file creation property list */ if ((fcpl = H5Pcreate(H5P_FILE_CREATE)) < 0) { - error_msg("fail to create a file creation property list\n"); - HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Pclose failed"); + HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Pcreate failed to create a file creation property list"); } } /* set user block size */ if (H5Pset_userblock(fcpl, options->ublock_size) < 0) { - error_msg("failed to set userblock size\n"); - HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Pclose failed"); + HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Pset_userblock failed to set userblock size"); } } @@ -278,14 +263,12 @@ print_user_block(fnamein, fidin); if (fapl == H5P_DEFAULT) { /* create a file access property list */ if ((fapl = H5Pcreate(H5P_FILE_ACCESS)) < 0) { - error_msg("Could not create file access property list\n"); - HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Pclose failed"); + HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Pcreate failed to create file access property list"); } } if (H5Pset_alignment(fapl, options->threshold, options->alignment) < 0) { - error_msg("failed to set alignment\n"); - HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Pclose failed"); + HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Pset_alignment failed to set alignment"); } } @@ -298,14 +281,12 @@ print_user_block(fnamein, fidin); if (fapl == H5P_DEFAULT) { /* create a file access property list */ if ((fapl = H5Pcreate(H5P_FILE_ACCESS)) < 0) { - error_msg("Could not create file access property list\n"); - HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Pclose failed"); + HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Pcreate failed to create file access property list"); } } if (H5Pset_meta_block_size(fapl, options->meta_block_size) < 0) { - error_msg("failed to set metadata block size\n"); - HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Pclose failed"); + HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Pset_meta_block_size failed to set metadata block size"); } } @@ -318,8 +299,7 @@ print_user_block(fnamein, fidin); if (fcpl == H5P_DEFAULT) { /* create a file creation property list */ if ((fcpl = H5Pcreate(H5P_FILE_CREATE)) < 0) { - error_msg("fail to create a file creation property list\n"); - HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Pclose failed"); + HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Pcreate failed to create a file creation property list"); } } @@ -349,8 +329,7 @@ print_user_block(fnamein, fidin); /* Set file space information as specified */ if(H5Pset_file_space_strategy(fcpl, set_strategy, set_persist, set_threshold) < 0) { - error_msg("failed to set file space strategy\n"); - HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Pclose failed"); + HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Pset_file_space_strategy failed to set file space strategy"); } if(options->fs_pagesize == -1) /* A "0" file space page size is specified by user */ @@ -360,8 +339,7 @@ print_user_block(fnamein, fidin); if(set_pagesize != FS_PAGESIZE_DEF) /* Set non-default file space page size as specified */ if(H5Pset_file_space_page_size(fcpl, set_pagesize) < 0) { - error_msg("failed to set file space page size\n"); - HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Pclose failed"); + HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Pset_file_space_page_size failed to set file space page size"); } /*------------------------------------------------------------------------- @@ -372,8 +350,7 @@ print_user_block(fnamein, fidin); printf("Making file <%s>...\n", fnameout); if ((fidout = H5Fcreate(fnameout, H5F_ACC_TRUNC, fcpl, fapl)) < 0) { - error_msg("<%s>: Could not create file\n", fnameout); - HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Pclose failed"); + HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Fcreate could not create file <%s>:", fnameout); } /*------------------------------------------------------------------------- @@ -382,8 +359,7 @@ print_user_block(fnamein, fidin); */ if (options->ublock_size > 0) { if (copy_user_block(options->ublock_filename, fnameout, options->ublock_size) < 0) { - error_msg("Could not copy user block. Exiting...\n"); - HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Pclose failed"); + HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "Could not copy user block. Exiting..."); } } @@ -399,15 +375,14 @@ print_user_block(fnamein, fidin); /* get the list of objects in the file */ if (h5trav_gettable(fidin, travt) < 0) - HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Pclose failed"); + HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "h5trav_gettable failed"); /*------------------------------------------------------------------------- * do the copy *------------------------------------------------------------------------- */ if (do_copy_objects(fidin, fidout, travt, options) < 0) { - error_msg("<%s>: Could not copy data to: %s\n", fnamein, fnameout); - HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Pclose failed"); + HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "do_copy_objects from <%s> could not copy data to <%s>", fnamein, fnameout); } /* end if */ /*------------------------------------------------------------------------- @@ -416,8 +391,7 @@ print_user_block(fnamein, fidin); *------------------------------------------------------------------------- */ if (do_copy_refobjs(fidin, fidout, travt, options) < 0) { - printf("h5repack: <%s>: Could not copy data to: %s\n", fnamein, fnameout); - HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Pclose failed"); + HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "do_copy_refobjs from <%s> could not copy data to <%s>", fnamein, fnameout); } /*------------------------------------------------------------------------- @@ -445,8 +419,7 @@ print_user_block(fnamein, fidin); if (ub_size > 0 && options->ublock_size == 0) { if (copy_user_block(fnamein, fnameout, ub_size) < 0) { - error_msg("Could not copy user block. Exiting...\n"); - HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Pclose failed"); + HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "Could not copy user block. Exiting..."); } } @@ -533,7 +506,7 @@ int Get_hyperslab(hid_t dcpl_id, int rank_dset, hsize_t dims_dset[], /* get chunk dims */ rank_chunk = H5Pget_chunk(dcpl_id, rank_dset, dims_chunk); if (rank_chunk < 0) - HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Pclose failed"); + HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Pget_chunk failed"); for (k = rank_dset; k > 0; --k) size_chunk *= dims_chunk[k - 1]; @@ -595,7 +568,7 @@ int Get_hyperslab(hid_t dcpl_id, int rank_dset, hsize_t dims_dset[], hslab_nbytes *= dims_hslab[k - 1]; if (hslab_nbytes <= 0) - HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Pclose failed"); + HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "calculate total size for the hyperslab failed"); } } } @@ -619,7 +592,7 @@ int Get_hyperslab(hid_t dcpl_id, int rank_dset, hsize_t dims_dset[], hslab_nbytes *= dims_hslab[k - 1]; if (hslab_nbytes <= 0) - HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Pclose failed"); + HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "calculate total size for the hyperslab failed"); } } @@ -1488,9 +1461,9 @@ static int copy_user_block(const char *infile, const char *outfile, hsize_t size /* Open files */ if ((infid = HDopen(infile, O_RDONLY, 0)) < 0) - HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "HDopen failed"); + HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "HDopen failed input file <%s>", infile); if ((outfid = HDopen(outfile, O_WRONLY, 0644)) < 0) - HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "HDopen failed"); + HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "HDopen failed output file <%s>", outfile); /* Copy the userblock from the input file to the output file */ while (size > 0) { @@ -1504,7 +1477,7 @@ static int copy_user_block(const char *infile, const char *outfile, hsize_t size else nread = HDread(infid, rbuf, (size_t)size); if (nread < 0) - HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "HDread failed"); + HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "HDread failed to read userblock"); /* Write buffer to destination file */ /* (compensating for interrupted writes & checking for errors, etc.) */ @@ -1566,24 +1539,20 @@ void print_user_block(const char *filename, hid_t fid) /* get user block size */ if(( fcpl = H5Fget_create_plist(fid)) < 0) { - error_msg("failed to retrieve file creation property list\n"); - HGOTO_ERROR(H5E_tools_g, H5E_tools_min_id_g, "H5Fget_create_plist failed"); + HGOTO_ERROR(H5E_tools_g, H5E_tools_min_id_g, "H5Fget_create_plist failed to retrieve file creation property list"); } if(H5Pget_userblock(fcpl, &ub_size) < 0) { - error_msg("failed to retrieve userblock size\n"); - HGOTO_ERROR(H5E_tools_g, H5E_tools_min_id_g, "H5Pget_userblock failed"); + HGOTO_ERROR(H5E_tools_g, H5E_tools_min_id_g, "H5Pget_userblock failed to retrieve userblock size"); } if(H5Pclose(fcpl) < 0) { - error_msg("failed to close property list\n"); - HGOTO_ERROR(H5E_tools_g, H5E_tools_min_id_g, "H5Pclose failed"); + HGOTO_ERROR(H5E_tools_g, H5E_tools_min_id_g, "H5Pclose failed to close property list"); } /* open file */ if((fh = HDopen(filename, O_RDONLY, 0)) < 0) { - error_msg("failed to open file\n"); - HGOTO_ERROR(H5E_tools_g, H5E_tools_min_id_g, "HDopen failed"); + HGOTO_ERROR(H5E_tools_g, H5E_tools_min_id_g, "HDopen failed to open file <%s>", filename); } size = ub_size; diff --git a/tools/src/h5repack/h5repack_filters.c b/tools/src/h5repack/h5repack_filters.c index 5ccb2ef..a74e5f3 100644 --- a/tools/src/h5repack/h5repack_filters.c +++ b/tools/src/h5repack/h5repack_filters.c @@ -199,6 +199,7 @@ int apply_filters(const char* name, /* object name from traverse list */ pack_opt_t *options, /* repack options */ int *has_filter) /* (OUT) object NAME has a filter */ { + int ret_value = 0; /*no need to LEAVE() on ERROR: HERR_INIT(int, SUCCEED) */ int nfilters; /* number of filters in DCPL */ hsize_t chsize[64]; /* chunk size in elements */ H5D_layout_t layout; @@ -208,7 +209,7 @@ int apply_filters(const char* name, /* object name from traverse list */ *has_filter = 0; if (rank == 0) /* scalar dataset, do not apply */ - return 0; + HGOTO_DONE(0); /*------------------------------------------------------------------------- * initialize the assigment object @@ -221,11 +222,11 @@ int apply_filters(const char* name, /* object name from traverse list */ *------------------------------------------------------------------------- */ if (aux_assign_obj(name, options, &obj) == 0) - return 0; + HGOTO_DONE(0); /* get information about input filters */ if ((nfilters = H5Pget_nfilters(dcpl_id)) < 0) - return -1; + HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Pget_nfilters failed"); /*------------------------------------------------------------------------- * check if we have filters in the pipeline @@ -236,7 +237,7 @@ int apply_filters(const char* name, /* object name from traverse list */ if (nfilters && obj.nfilters) { *has_filter = 1; if (H5Premove_filter(dcpl_id, H5Z_FILTER_ALL) < 0) - return -1; + HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Premove_filter failed"); } /*------------------------------------------------------------------------- @@ -246,11 +247,11 @@ int apply_filters(const char* name, /* object name from traverse list */ */ if (obj.layout == -1) { if ((layout = H5Pget_layout(dcpl_id)) < 0) - return -1; + HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Pget_layout failed"); if (layout == H5D_CHUNKED) { if ((rank = H5Pget_chunk(dcpl_id, NELMTS(chsize), chsize/*out*/)) < 0) - return -1; + HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Pget_chunk failed"); obj.layout = H5D_CHUNKED; obj.chunk.rank = rank; for (i = 0; i < rank; i++) @@ -323,9 +324,9 @@ int apply_filters(const char* name, /* object name from traverse list */ aggression = obj.filter[i].cd_values[0]; /* set up for deflated data */ if (H5Pset_chunk(dcpl_id, obj.chunk.rank, obj.chunk.chunk_lengths) < 0) - return -1; + HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Pset_chunk failed"); if (H5Pset_deflate(dcpl_id, aggression) < 0) - return -1; + HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Pset_deflate failed"); } break; @@ -343,9 +344,9 @@ int apply_filters(const char* name, /* object name from traverse list */ /* set up for szip data */ if (H5Pset_chunk(dcpl_id, obj.chunk.rank, obj.chunk.chunk_lengths) < 0) - return -1; + HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Pset_chunk failed"); if (H5Pset_szip(dcpl_id, options_mask, pixels_per_block) < 0) - return -1; + HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Pset_szip failed"); } break; @@ -355,9 +356,9 @@ int apply_filters(const char* name, /* object name from traverse list */ */ case H5Z_FILTER_SHUFFLE: if (H5Pset_chunk(dcpl_id, obj.chunk.rank, obj.chunk.chunk_lengths) < 0) - return -1; + HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Pset_chunk failed"); if (H5Pset_shuffle(dcpl_id) < 0) - return -1; + HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Pset_shuffle failed"); break; /*------------------------------------------------------------------------- @@ -366,9 +367,9 @@ int apply_filters(const char* name, /* object name from traverse list */ */ case H5Z_FILTER_FLETCHER32: if (H5Pset_chunk(dcpl_id, obj.chunk.rank, obj.chunk.chunk_lengths) < 0) - return -1; + HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Pset_chunk failed"); if (H5Pset_fletcher32(dcpl_id) < 0) - return -1; + HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Pset_fletcher32 failed"); break; /*----------- ------------------------------------------------------------- * H5Z_FILTER_NBIT , NBIT compression @@ -376,9 +377,9 @@ int apply_filters(const char* name, /* object name from traverse list */ */ case H5Z_FILTER_NBIT: if (H5Pset_chunk(dcpl_id, obj.chunk.rank, obj.chunk.chunk_lengths) < 0) - return -1; + HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Pset_chunk failed"); if (H5Pset_nbit(dcpl_id) < 0) - return -1; + HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Pset_nbit failed"); break; /*----------- ------------------------------------------------------------- * H5Z_FILTER_SCALEOFFSET , scale+offset compression @@ -394,9 +395,9 @@ int apply_filters(const char* name, /* object name from traverse list */ scale_factor = (int) obj.filter[i].cd_values[1]; if (H5Pset_chunk(dcpl_id, obj.chunk.rank, obj.chunk.chunk_lengths) < 0) - return -1; + HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Pset_chunk failed"); if (H5Pset_scaleoffset(dcpl_id, scale_type, scale_factor) < 0) - return -1; + HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Pset_scaleoffset failed"); } break; default: @@ -404,9 +405,9 @@ int apply_filters(const char* name, /* object name from traverse list */ if (H5Pset_filter(dcpl_id, obj.filter[i].filtn, obj.filter[i].filt_flag, obj.filter[i].cd_nelmts, obj.filter[i].cd_values) < 0) - return -1; + HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Pset_filter failed"); if (H5Pset_chunk(dcpl_id, obj.chunk.rank, obj.chunk.chunk_lengths) < 0) - return -1; + HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Pset_chunk failed"); } break; } /* switch */ @@ -422,24 +423,25 @@ int apply_filters(const char* name, /* object name from traverse list */ if (obj.layout >= 0) { /* a layout was defined */ if (H5Pset_layout(dcpl_id, obj.layout) < 0) - return -1; + HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Pset_layout failed"); if (H5D_CHUNKED == obj.layout) { if (H5Pset_chunk(dcpl_id, obj.chunk.rank, obj.chunk.chunk_lengths) < 0) - return -1; + HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Pset_chunk failed"); } else if (H5D_COMPACT == obj.layout) { if (H5Pset_alloc_time(dcpl_id, H5D_ALLOC_TIME_EARLY) < 0) - return -1; + HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Pset_alloc_time failed"); } /* remove filters for the H5D_CONTIGUOUS case */ else if (H5D_CONTIGUOUS == obj.layout) { if (H5Premove_filter(dcpl_id, H5Z_FILTER_ALL) < 0) - return -1; + HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Premove_filter failed"); } } - return 0; +done: + return ret_value; } diff --git a/tools/src/h5repack/h5repack_main.c b/tools/src/h5repack/h5repack_main.c index a3f5678..3860451 100644 --- a/tools/src/h5repack/h5repack_main.c +++ b/tools/src/h5repack/h5repack_main.c @@ -221,10 +221,6 @@ static void usage(const char *prog) { * Purpose: Shutdown MPI & HDF5 and call exit() * * Return: Does not return - * - * Programmer: Quincey Koziol - * Saturday, 31. January 2004 - * *------------------------------------------------------------------------- */ static void leave(int ret) @@ -239,11 +235,6 @@ static void leave(int ret) * Purpose: read comp and chunk options from a file * * Return: void, exit on error - * - * Programmer: pvn@ncsa.uiuc.edu - * - * Date: September, 22, 2003 - * *------------------------------------------------------------------------- */ static @@ -425,7 +416,6 @@ set_sort_order(const char *form) * Function: parse_command_line * * Purpose: parse command line input - * *------------------------------------------------------------------------- */ static @@ -674,13 +664,6 @@ done: * Return: Success: EXIT_SUCCESS(0) * * Failure: EXIT_FAILURE(1) - * - * Programmer: Pedro Vicente, pvn@ncsa.uiuc.edu - * - * Date: May 9, 2003 - * - * Comments: - * *------------------------------------------------------------------------- */ int main(int argc, const char **argv) diff --git a/tools/src/h5repack/h5repack_opttable.c b/tools/src/h5repack/h5repack_opttable.c index 93e34b3..6c409ec 100644 --- a/tools/src/h5repack/h5repack_opttable.c +++ b/tools/src/h5repack/h5repack_opttable.c @@ -21,23 +21,22 @@ * Purpose: initialize a pack_info_t structure * * Return: void - * - *------------------------------------------------------------------------- + *------------------------------------------------------------------------- */ void init_packobject(pack_info_t *obj) { - int j, k; - - HDstrcpy(obj->path, "\0"); - for (j = 0; j < H5_REPACK_MAX_NFILTERS; j++) { - obj->filter[j].filtn = -1; - for (k = 0; k < CD_VALUES; k++) - obj->filter[j].cd_values[k] = 0; - } - obj->chunk.rank = -1; - obj->refobj_id = -1; - obj->layout = H5D_LAYOUT_ERROR; - obj->nfilters = 0; + int j, k; + + HDstrcpy(obj->path, "\0"); + for (j = 0; j < H5_REPACK_MAX_NFILTERS; j++) { + obj->filter[j].filtn = -1; + for (k = 0; k < CD_VALUES; k++) + obj->filter[j].cd_values[k] = 0; + } + obj->chunk.rank = -1; + obj->refobj_id = -1; + obj->layout = H5D_LAYOUT_ERROR; + obj->nfilters = 0; } /*------------------------------------------------------------------------- @@ -46,20 +45,14 @@ void init_packobject(pack_info_t *obj) { * Purpose: auxiliary function, inserts the filter in object OBJS[ I ] * * Return: void - * *------------------------------------------------------------------------- */ -static void aux_tblinsert_filter(pack_opttbl_t *table, unsigned int I, - filter_info_t filt) { - if (table->objs[I].nfilters < H5_REPACK_MAX_NFILTERS) { - table->objs[I].filter[table->objs[I].nfilters++] = filt; - } - else { - error_msg( - "cannot insert the filter in this object.\ - Maximum capacity exceeded\n"); - } +static void aux_tblinsert_filter(pack_opttbl_t *table, unsigned int I, filter_info_t filt) { + if (table->objs[I].nfilters < H5_REPACK_MAX_NFILTERS) + table->objs[I].filter[table->objs[I].nfilters++] = filt; + else + H5TOOLS_INFO(H5E_tools_min_id_g, "cannot insert the filter in this object. Maximum capacity exceeded"); } /*------------------------------------------------------------------------- @@ -68,30 +61,27 @@ static void aux_tblinsert_filter(pack_opttbl_t *table, unsigned int I, * Purpose: auxiliary function, inserts the layout in object OBJS[ I ] * * Return: void - * *------------------------------------------------------------------------- */ - -static void aux_tblinsert_layout(pack_opttbl_t *table, unsigned int I, - pack_info_t *pack) { - int k; - - table->objs[I].layout = pack->layout; - if (H5D_CHUNKED == pack->layout) { - /* -2 means the NONE option, remove chunking - and set the layout to contiguous */ - if (pack->chunk.rank == -2) { - table->objs[I].layout = H5D_CONTIGUOUS; - table->objs[I].chunk.rank = -2; - } - /* otherwise set the chunking type */ - else { - table->objs[I].chunk.rank = pack->chunk.rank; - for (k = 0; k < pack->chunk.rank; k++) - table->objs[I].chunk.chunk_lengths[k] = - pack->chunk.chunk_lengths[k]; - } - } +static void aux_tblinsert_layout(pack_opttbl_t *table, unsigned int I, pack_info_t *pack) { + int k; + + table->objs[I].layout = pack->layout; + if (H5D_CHUNKED == pack->layout) { + /* -2 means the NONE option, remove chunking + and set the layout to contiguous */ + if (pack->chunk.rank == -2) { + table->objs[I].layout = H5D_CONTIGUOUS; + table->objs[I].chunk.rank = -2; + } + /* otherwise set the chunking type */ + else { + table->objs[I].chunk.rank = pack->chunk.rank; + for (k = 0; k < pack->chunk.rank; k++) + table->objs[I].chunk.chunk_lengths[k] = + pack->chunk.chunk_lengths[k]; + } + } } /*------------------------------------------------------------------------- @@ -100,7 +90,6 @@ static void aux_tblinsert_layout(pack_opttbl_t *table, unsigned int I, * Purpose: auxiliary function, increases the size of the collection by N_OBJS * * Return: 0, ok, -1, fail - * *------------------------------------------------------------------------- */ static int @@ -111,7 +100,7 @@ aux_inctable(pack_opttbl_t *table, unsigned n_objs) table->size += n_objs; table->objs = (pack_info_t*) HDrealloc(table->objs, table->size * sizeof(pack_info_t)); if (table->objs == NULL) { - error_msg("not enough memory for options table\n"); + H5TOOLS_INFO(H5E_tools_min_id_g, "not enough memory for options table"); return -1; } @@ -128,32 +117,30 @@ aux_inctable(pack_opttbl_t *table, unsigned n_objs) * Purpose: init options table * * Return: 0, ok, -1, fail - * - *------------------------------------------------------------------------- + *------------------------------------------------------------------------- */ int options_table_init(pack_opttbl_t **tbl) { - unsigned int i; - pack_opttbl_t *table; - - if (NULL == (table = (pack_opttbl_t *) HDmalloc(sizeof(pack_opttbl_t)))) { - error_msg("not enough memory for options table\n"); - return -1; - } - - table->size = 30; - table->nelems = 0; - if (NULL == (table->objs = - (pack_info_t*) HDmalloc(table->size * sizeof(pack_info_t)))) { - error_msg("not enough memory for options table\n"); - HDfree(table); - return -1; - } - - for (i = 0; i < table->size; i++) - init_packobject(&table->objs[i]); - - *tbl = table; - return 0; + unsigned int i; + pack_opttbl_t *table; + + if (NULL == (table = (pack_opttbl_t *) HDmalloc(sizeof(pack_opttbl_t)))) { + H5TOOLS_INFO(H5E_tools_min_id_g, "not enough memory for options table"); + return -1; + } + + table->size = 30; + table->nelems = 0; + if (NULL == (table->objs = (pack_info_t*) HDmalloc(table->size * sizeof(pack_info_t)))) { + H5TOOLS_INFO(H5E_tools_min_id_g, "not enough memory for options table"); + HDfree(table); + return -1; + } + + for (i = 0; i < table->size; i++) + init_packobject(&table->objs[i]); + + *tbl = table; + return 0; } @@ -163,14 +150,13 @@ int options_table_init(pack_opttbl_t **tbl) { * Purpose: free table memory * * Return: 0 - * *------------------------------------------------------------------------- */ int options_table_free(pack_opttbl_t *table) { - HDfree(table->objs); - HDfree(table); - return 0; + HDfree(table->objs); + HDfree(table); + return 0; } /*------------------------------------------------------------------------- @@ -179,12 +165,10 @@ int options_table_free(pack_opttbl_t *table) { * Purpose: add a layout option to the option list * * Return: 0, ok, -1, fail - * - *------------------------------------------------------------------------- + *------------------------------------------------------------------------- */ int -options_add_layout(obj_list_t *obj_list, unsigned n_objs, pack_info_t *pack, - pack_opttbl_t *table) +options_add_layout(obj_list_t *obj_list, unsigned n_objs, pack_info_t *pack, pack_opttbl_t *table) { unsigned i, j, I; unsigned added = 0; @@ -205,7 +189,7 @@ options_add_layout(obj_list_t *obj_list, unsigned n_objs, pack_info_t *pack, if (HDstrcmp(obj_list[j].obj,table->objs[i].path) == 0) { /* already chunk info inserted for this one; exit */ if (table->objs[i].chunk.rank > 0) { - error_msg("chunk information already inserted for <%s>\n", obj_list[j].obj); + H5TOOLS_INFO(H5E_tools_min_id_g, "chunk information already inserted for <%s>\n", obj_list[j].obj); HDexit(EXIT_FAILURE); } /* insert the layout info */ @@ -261,12 +245,10 @@ options_add_layout(obj_list_t *obj_list, unsigned n_objs, pack_info_t *pack, * Purpose: add a compression -f option to the option list * * Return: 0, ok, -1, fail - * *------------------------------------------------------------------------- */ int -options_add_filter(obj_list_t *obj_list, unsigned n_objs, filter_info_t filt, - pack_opttbl_t *table) +options_add_filter(obj_list_t *obj_list, unsigned n_objs, filter_info_t filt, pack_opttbl_t *table) { unsigned int i, j, I; unsigned added = 0; @@ -337,29 +319,26 @@ options_add_filter(obj_list_t *obj_list, unsigned n_objs, filter_info_t filt, * Purpose: get object from table; "path" is the key * * Return: pack_info_t* OBJECT or NULL if not found; PATH is the key - * *------------------------------------------------------------------------- */ pack_info_t* options_get_object(const char *path, pack_opttbl_t *table) { - unsigned int i; - char tbl_path[MAX_NC_NAME + 1]; /* +1 for start with "/" case */ - - for (i = 0; i < table->nelems; i++) { - /* make full path (start with "/") to compare correctly */ - if (HDstrncmp(table->objs[i].path, "/", 1)) { - HDstrcpy(tbl_path, "/"); - HDstrcat(tbl_path, table->objs[i].path); - } - else - HDstrcpy(tbl_path, table->objs[i].path); - - /* found it */ - if (HDstrcmp(tbl_path, path) == 0) { - return (&table->objs[i]); - } - } - - return NULL; -} + unsigned int i; + char tbl_path[MAX_NC_NAME + 1]; /* +1 for start with "/" case */ + + for (i = 0; i < table->nelems; i++) { + /* make full path (start with "/") to compare correctly */ + if (HDstrncmp(table->objs[i].path, "/", 1)) { + HDstrcpy(tbl_path, "/"); + HDstrcat(tbl_path, table->objs[i].path); + } + else + HDstrcpy(tbl_path, table->objs[i].path); + /* found it */ + if (HDstrcmp(tbl_path, path) == 0) { + return (&table->objs[i]); + } + } + return NULL; +} diff --git a/tools/src/h5repack/h5repack_verify.c b/tools/src/h5repack/h5repack_verify.c index 1a0dab7..e276b7b 100644 --- a/tools/src/h5repack/h5repack_verify.c +++ b/tools/src/h5repack/h5repack_verify.c @@ -33,11 +33,6 @@ static int verify_filters(hid_t pid, hid_t tid, int nfilters, filter_info_t *fil * 1 match * 0 do not match * -1 error - * - * Programmer: Pedro Vicente, pvn@hdfgroup.org - * - * Date: December 19, 2003 - * *------------------------------------------------------------------------- */ @@ -63,11 +58,10 @@ h5repack_verify(const char *in_fname, const char *out_fname, pack_opt_t *options /* open the output file */ if((fidout = H5Fopen(out_fname, H5F_ACC_RDONLY, H5P_DEFAULT)) < 0 ) - return -1; + HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Fopen failed on <%s>", out_fname); - for(i = 0; i < options->op_tbl->nelems; i++) - { - char* name = options->op_tbl->objs[i].path; + for(i = 0; i < options->op_tbl->nelems; i++) { + char *name = options->op_tbl->objs[i].path; pack_info_t *obj = &options->op_tbl->objs[i]; /*------------------------------------------------------------------------- @@ -75,7 +69,7 @@ h5repack_verify(const char *in_fname, const char *out_fname, pack_opt_t *options *------------------------------------------------------------------------- */ if((did = H5Dopen2(fidout, name, H5P_DEFAULT)) < 0) - HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Dopen2 failed"); + HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Dopen2 failed on <%s>", name); if((sid = H5Dget_space(did)) < 0) HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Dget_space failed"); if((pid = H5Dget_create_plist(did)) < 0) @@ -119,9 +113,7 @@ h5repack_verify(const char *in_fname, const char *out_fname, pack_opt_t *options *------------------------------------------------------------------------- */ - if(options->all_filter == 1 || options->all_layout == 1) - { - + if(options->all_filter == 1 || options->all_layout == 1) { /* Initialize indexing options */ h5trav_set_index(sort_by, sort_order); /* init table */ @@ -131,19 +123,16 @@ h5repack_verify(const char *in_fname, const char *out_fname, pack_opt_t *options if(h5trav_gettable(fidout, travt) < 0) HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "h5trav_gettable failed"); - for(i = 0; i < travt->nobjs; i++) - { + for(i = 0; i < travt->nobjs; i++) { char *name = travt->objs[i].name; - if(travt->objs[i].type == H5TRAV_TYPE_DATASET) - { - + if(travt->objs[i].type == H5TRAV_TYPE_DATASET) { /*------------------------------------------------------------------------- * open *------------------------------------------------------------------------- */ if((did = H5Dopen2(fidout, name, H5P_DEFAULT)) < 0) - HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Dopen2 failed"); + HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Dopen2 failed on <%s>", name); if((sid = H5Dget_space(did)) < 0) HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Dget_space failed"); if((pid = H5Dget_create_plist(did)) < 0) @@ -155,8 +144,7 @@ h5repack_verify(const char *in_fname, const char *out_fname, pack_opt_t *options * filter check *------------------------------------------------------------------------- */ - if(options->all_filter == 1) - { + if(options->all_filter == 1) { if(verify_filters(pid, tid, options->n_filter_g, options->filter_g) <= 0) ok = 0; } @@ -165,8 +153,7 @@ h5repack_verify(const char *in_fname, const char *out_fname, pack_opt_t *options * layout check *------------------------------------------------------------------------- */ - if(options->all_layout == 1) - { + if(options->all_layout == 1) { pack_info_t pack; init_packobject(&pack); @@ -204,43 +191,37 @@ h5repack_verify(const char *in_fname, const char *out_fname, pack_opt_t *options /* open the input file */ if((fidin = H5Fopen(in_fname, H5F_ACC_RDONLY, H5P_DEFAULT)) < 0 ) - HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Fopen failed"); + HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Fopen failed on file <%s>", in_fname); /* Get file creation property list for input file */ if((fcpl_in = H5Fget_create_plist(fidin)) < 0) { - error_msg("failed to retrieve file creation property list\n"); - HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Fget_create_plist failed"); + HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Fget_create_plist failed to retrieve file creation property list"); } /* Get file space info for input file */ if(H5Pget_file_space_strategy(fcpl_in, &in_strategy, &in_persist, &in_threshold) < 0) { - error_msg("failed to retrieve file space strategy & threshold\n"); - HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Pget_file_space failed"); + HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Pget_file_space_strategy failed to retrieve file space strategy & threshold"); } /* Get file space page size for input file */ if(H5Pget_file_space_page_size(fcpl_in, &in_pagesize) < 0) { - error_msg("failed to retrieve file space page size\n"); - HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Fget_create_plist failed"); + HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Pget_file_space_page_size failed to retrieve file space page size"); } /* Output file is already opened */ /* Get file creation property list for output file */ if((fcpl_out = H5Fget_create_plist(fidout)) < 0) { - error_msg("failed to retrieve file creation property list\n"); - HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Fget_create_plist failed"); + HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Fget_create_plist failed to retrieve file creation property list"); } /* Get file space info for output file */ if(H5Pget_file_space_strategy(fcpl_out, &out_strategy, &out_persist, &out_threshold) < 0) { - error_msg("failed to retrieve file space strategy & threshold\n"); - HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Pget_file_space failed"); + HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Pget_file_space_strategy failed to retrieve file space strategy & threshold"); } /* Get file space page size for output file */ if(H5Pget_file_space_page_size(fcpl_out, &out_pagesize) < 0) { - error_msg("failed to retrieve file space page size\n"); - HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Fget_create_plist failed"); + HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Pget_file_space_page_size failed to retrieve file space page size"); } /* @@ -250,12 +231,11 @@ h5repack_verify(const char *in_fname, const char *out_fname, pack_opt_t *options */ if(options->fs_strategy) { if(out_strategy != (options->fs_strategy == (H5F_fspace_strategy_t)-1 ? 0 : options->fs_strategy)) { - error_msg("file space strategy not set as unexpected\n"); HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "file space strategy not set as unexpected"); } - } else { + } + else { if(out_strategy != in_strategy) { - error_msg("file space strategy not set as unexpected\n"); HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "file space strategy not set as unexpected"); } } @@ -267,13 +247,12 @@ h5repack_verify(const char *in_fname, const char *out_fname, pack_opt_t *options */ if(options->fs_persist) { if(out_persist != (hbool_t)(options->fs_persist == (-1) ? FALSE : options->fs_persist)) { - error_msg("free-space persist status is not set as unexpected\n"); - HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "file space strategy not set as unexpected"); + HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "free-space persist status not set as unexpected"); } - } else { + } + else { if(out_persist != in_persist) { - error_msg("free-space persist status is not set as unexpected\n"); - HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "file space strategy not set as unexpected"); + HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "free-space persist status not set as unexpected"); } } @@ -284,13 +263,12 @@ h5repack_verify(const char *in_fname, const char *out_fname, pack_opt_t *options */ if(options->fs_threshold) { if(out_threshold != (hsize_t)(options->fs_threshold == (-1) ? 0 : options->fs_threshold)) { - error_msg("threshold is not set as unexpectec\n"); - HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "file space strategy not set as unexpected"); + HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "threshold not set as unexpected"); } - } else { + } + else { if(out_threshold != in_threshold) { - error_msg("threshold is not set as unexpected\n"); - HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "file space strategy not set as unexpected"); + HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "threshold not set as unexpected"); } } @@ -301,13 +279,12 @@ h5repack_verify(const char *in_fname, const char *out_fname, pack_opt_t *options */ if(options->fs_pagesize) { if(out_pagesize != (hsize_t)(options->fs_pagesize == (-1) ? 0 : options->fs_pagesize)) { - error_msg("file space page size is not set as unexpected\n"); - HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "file space strategy not set as unexpected"); + HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "file space page size not set as unexpected"); } - } else { /* "-G" is not set */ + } + else { /* "-G" is not set */ if(out_pagesize != in_pagesize) { - error_msg("file space page size is not set as unexpected\n"); - HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "file space strategy not set as unexpected"); + HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "file space page size not set as unexpected"); } } @@ -339,8 +316,6 @@ done: return ret_value; } /* h5repack_verify() */ - - /*------------------------------------------------------------------------- * Function: verify_layout * @@ -351,16 +326,10 @@ done: * H5D_CHUNKED = 2 * * Return: 1 has, 0 does not, -1 error - * - * Programmer: Pedro Vicente, pvn@ncsa.uiuc.edu - * - * Date: December 30, 2003 - * *------------------------------------------------------------------------- */ -int verify_layout(hid_t pid, - pack_info_t *obj) +int verify_layout(hid_t pid, pack_info_t *obj) { hsize_t chsize[64]; /* chunk size in elements */ H5D_layout_t layout; /* layout */ @@ -383,8 +352,7 @@ int verify_layout(hid_t pid, if (obj->layout != layout) return 0; - if (layout==H5D_CHUNKED) - { + if (layout==H5D_CHUNKED) { if ((rank = H5Pget_chunk(pid,NELMTS(chsize),chsize/*out*/)) < 0) return -1; if (obj->chunk.rank != rank) @@ -403,16 +371,10 @@ int verify_layout(hid_t pid, * Purpose: compare 2 files for identical property lists of all objects * * Return: 1=identical, 0=not identical, -1=error - * - * Programmer: Pedro Vicente, pvn@ncsa.uiuc.edu - * - * Date: December 31, 2003 - * *------------------------------------------------------------------------- */ -int h5repack_cmp_pl(const char *fname1, - const char *fname2) +int h5repack_cmp_pl(const char *fname1, const char *fname2) { int ret_value = 0; /*no need to LEAVE() on ERROR: HERR_INIT(int, SUCCEED) */ hid_t fid1=-1; /* file ID */ @@ -439,13 +401,11 @@ int h5repack_cmp_pl(const char *fname1, { /* Open the files */ - if ((fid1 = H5Fopen(fname1,H5F_ACC_RDONLY,H5P_DEFAULT)) < 0 ) - { + if ((fid1 = H5Fopen(fname1,H5F_ACC_RDONLY,H5P_DEFAULT)) < 0 ) { error_msg("<%s>: %s\n", fname1, H5FOPENERROR ); return -1; } - if ((fid2 = H5Fopen(fname2,H5F_ACC_RDONLY,H5P_DEFAULT)) < 0 ) - { + if ((fid2 = H5Fopen(fname2,H5F_ACC_RDONLY,H5P_DEFAULT)) < 0 ) { error_msg("<%s>: %s\n", fname2, H5FOPENERROR ); H5Fclose(fid1); return -1; @@ -468,14 +428,10 @@ int h5repack_cmp_pl(const char *fname1, * traverse the suppplied object list *------------------------------------------------------------------------- */ - for(i = 0; i < trav->nobjs; i++) - { - - if(trav->objs[i].type == H5TRAV_TYPE_GROUP) - { - + for(i = 0; i < trav->nobjs; i++) { + if(trav->objs[i].type == H5TRAV_TYPE_GROUP) { if ((gid = H5Gopen2(fid1, trav->objs[i].name, H5P_DEFAULT)) < 0) - HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Gopen2 failed"); + HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Gopen2 failed on first <%s>", trav->objs[i].name); if ((gcplid = H5Gget_create_plist(gid)) < 0) HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Gget_create_plist failed"); if (H5Pget_link_creation_order(gcplid, &crt_order_flag1) < 0) @@ -486,7 +442,7 @@ int h5repack_cmp_pl(const char *fname1, HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Gclose failed"); if ((gid = H5Gopen2(fid2, trav->objs[i].name, H5P_DEFAULT)) < 0) - HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Gopen2 failed"); + HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Gopen2 failed on second <%s>", trav->objs[i].name); if ((gcplid = H5Gget_create_plist(gid)) < 0) HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Gget_create_plist failed"); if (H5Pget_link_creation_order(gcplid, &crt_order_flag2) < 0) @@ -497,20 +453,14 @@ int h5repack_cmp_pl(const char *fname1, HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Gclose failed"); if (crt_order_flag1 != crt_order_flag2) { - error_msg("property lists for <%s> are different\n",trav->objs[i].name); - HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "property lists failed"); + HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "property lists failed for <%s> are different", trav->objs[i].name); } - } - - - - else if(trav->objs[i].type == H5TRAV_TYPE_DATASET) - { + else if(trav->objs[i].type == H5TRAV_TYPE_DATASET) { if((dset1 = H5Dopen2(fid1, trav->objs[i].name, H5P_DEFAULT)) < 0) - HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Dopen2 failed"); + HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Dopen2 failed on first <%s>", trav->objs[i].name); if((dset2 = H5Dopen2(fid2, trav->objs[i].name, H5P_DEFAULT)) < 0) - HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Dopen2 failed"); + HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Dopen2 failed on second <%s>", trav->objs[i].name); if((dcpl1 = H5Dget_create_plist(dset1)) < 0) HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Dget_create_plist failed"); if((dcpl2 = H5Dget_create_plist(dset2)) < 0) @@ -524,8 +474,7 @@ int h5repack_cmp_pl(const char *fname1, HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Pequal failed"); if(ret == 0) { - error_msg("property lists for <%s> are different\n",trav->objs[i].name); - HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "property lists failed"); + HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "property lists failed for <%s> are different",trav->objs[i].name); } /*------------------------------------------------------------------------- @@ -593,11 +542,6 @@ done: * 1 match * 0 do not match * -1 error - * - * Programmer: Pedro Vicente, pvn@hdfgroup.org - * - * Date: December 21, 2007 - * *------------------------------------------------------------------------- */ @@ -621,11 +565,11 @@ int verify_filters(hid_t pid, hid_t tid, int nfilters, filter_info_t *filter) /* if we do not have filters and the requested filter is NONE, return 1 */ if(!nfilters_dcpl && nfilters == 1 && - filter[0].filtn == H5Z_FILTER_NONE ) + filter[0].filtn == H5Z_FILTER_NONE) return 1; /* else the numbers of filters must match */ - if (nfilters_dcpl != nfilters ) + if (nfilters_dcpl != nfilters) return 0; /*------------------------------------------------------------------------- @@ -633,8 +577,7 @@ int verify_filters(hid_t pid, hid_t tid, int nfilters, filter_info_t *filter) *------------------------------------------------------------------------- */ - for( i = 0; i < nfilters_dcpl; i++) - { + for (i = 0; i < nfilters_dcpl; i++) { cd_nelmts = NELMTS(cd_values); filtn = H5Pget_filter2(pid, (unsigned)i, &filt_flags, &cd_nelmts, cd_values, sizeof(f_name), f_name, NULL); @@ -644,15 +587,13 @@ int verify_filters(hid_t pid, hid_t tid, int nfilters, filter_info_t *filter) return 0; /* compare client data values. some filters do return local values */ - switch (filtn) - { - + switch (filtn) { case H5Z_FILTER_NONE: break; case H5Z_FILTER_SHUFFLE: /* 1 private client value is returned by DCPL */ - if ( cd_nelmts != H5Z_SHUFFLE_TOTAL_NPARMS && filter[i].cd_nelmts != H5Z_SHUFFLE_USER_NPARMS ) + if (cd_nelmts != H5Z_SHUFFLE_TOTAL_NPARMS && filter[i].cd_nelmts != H5Z_SHUFFLE_USER_NPARMS) return 0; /* get dataset's type size */ @@ -660,31 +601,31 @@ int verify_filters(hid_t pid, hid_t tid, int nfilters, filter_info_t *filter) return -1; /* the private client value holds the dataset's type size */ - if ( size != cd_values[0] ) + if (size != cd_values[0]) return 0; break; case H5Z_FILTER_SZIP: /* 4 private client values are returned by DCPL */ - if ( cd_nelmts != H5Z_SZIP_TOTAL_NPARMS && filter[i].cd_nelmts != H5Z_SZIP_USER_NPARMS ) + if (cd_nelmts != H5Z_SZIP_TOTAL_NPARMS && filter[i].cd_nelmts != H5Z_SZIP_USER_NPARMS) return 0; /* "User" parameter for pixels-per-block (index 1) */ - if ( cd_values[H5Z_SZIP_PARM_PPB] != filter[i].cd_values[H5Z_SZIP_PARM_PPB] ) + if (cd_values[H5Z_SZIP_PARM_PPB] != filter[i].cd_values[H5Z_SZIP_PARM_PPB]) return 0; break; case H5Z_FILTER_NBIT: /* only client data values number of values checked */ - if ( H5Z_NBIT_USER_NPARMS != filter[i].cd_nelmts) + if (H5Z_NBIT_USER_NPARMS != filter[i].cd_nelmts) return 0; break; case H5Z_FILTER_SCALEOFFSET: /* only client data values checked */ - for( j = 0; j < H5Z_SCALEOFFSET_USER_NPARMS; j++) + for (j = 0; j < H5Z_SCALEOFFSET_USER_NPARMS; j++) if (cd_values[j] != filter[i].cd_values[j]) return 0; break; @@ -693,20 +634,20 @@ int verify_filters(hid_t pid, hid_t tid, int nfilters, filter_info_t *filter) case H5Z_FILTER_FLETCHER32: case H5Z_FILTER_DEFLATE: - if ( cd_nelmts != filter[i].cd_nelmts) + if (cd_nelmts != filter[i].cd_nelmts) return 0; - for( j = 0; j < cd_nelmts; j++) + for (j = 0; j < cd_nelmts; j++) if (cd_values[j] != filter[i].cd_values[j]) return 0; break; default: - if ( cd_nelmts != filter[i].cd_nelmts) + if (cd_nelmts != filter[i].cd_nelmts) return 0; - for( j = 0; j < cd_nelmts; j++) + for (j = 0; j < cd_nelmts; j++) if (cd_values[j] != filter[i].cd_values[j]) return 0; break; diff --git a/tools/test/h5copy/CMakeTests.cmake b/tools/test/h5copy/CMakeTests.cmake index 2536ef3..b60c0e9 100644 --- a/tools/test/h5copy/CMakeTests.cmake +++ b/tools/test/h5copy/CMakeTests.cmake @@ -71,13 +71,13 @@ endif () # resultcode=2 will cause the test to skip the diff test - if (NOT ${resultcode} STREQUAL "2") + if (NOT "${resultcode}" STREQUAL "2") add_test ( NAME H5COPY_F-${testname}-DIFF COMMAND $ -q ./testfiles/${infile} ./testfiles/${testname}.out.h5 ${srcname} ${dstname} ) SET_TESTS_PROPERTIES(H5COPY_F-${testname}-DIFF PROPERTIES DEPENDS H5COPY_F-${testname}) - if (${resultcode} STREQUAL "1") + if ("${resultcode}" STREQUAL "1") set_tests_properties (H5COPY_F-${testname}-DIFF PROPERTIES WILL_FAIL "true") endif () endif () @@ -107,13 +107,13 @@ endif () # resultcode=2 will cause the test to skip the diff test - if (NOT ${resultcode} STREQUAL "2") + if (NOT "${resultcode}" STREQUAL "2") add_test ( NAME H5COPY-${testname}-DIFF COMMAND $ -q ./testfiles/${infile} ./testfiles/${testname}.out.h5 ${srcname} ${dstname} ) SET_TESTS_PROPERTIES(H5COPY-${testname}-DIFF PROPERTIES DEPENDS H5COPY-${testname}) - if (${resultcode} STREQUAL "1") + if ("${resultcode}" STREQUAL "1") set_tests_properties (H5COPY-${testname}-DIFF PROPERTIES WILL_FAIL "true") endif () endif () @@ -157,13 +157,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} STREQUAL "2") + if (NOT "${resultcode}" STREQUAL "2") add_test ( NAME H5COPY-${testname}-DIFF COMMAND $ -q ./testfiles/${infile} ./testfiles/${testname}.out.h5 ${srcname} ${dstname} ) SET_TESTS_PROPERTIES(H5COPY-${testname}-DIFF PROPERTIES DEPENDS H5COPY-${testname}) - if (${resultcode} STREQUAL "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} STREQUAL "2") + if (NOT "${resultcode}" STREQUAL "2") add_test ( NAME H5COPY_SAME-${testname}-DIFF COMMAND $ -q ./testfiles/${testname}.out.h5 ./testfiles/${testname}.out.h5 ${srcname} ${dstname} ) SET_TESTS_PROPERTIES(H5COPY_SAME-${testname}-DIFF PROPERTIES DEPENDS H5COPY_SAME-${testname}) - if (${resultcode} STREQUAL "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 $ -i ./testfiles/${infile} -o ./testfiles/${testname}.out.h5 ${vparam} ${sparam} ${srcname} ${dparam} ${dstname} ${ARGN}) - if (${resultcode} STREQUAL "1") + if ("${resultcode}" STREQUAL "1") set_tests_properties (H5COPY-CMP-${testname} PROPERTIES WILL_FAIL "true") endif () if (NOT "${last_test}" STREQUAL "") @@ -231,6 +231,8 @@ COMMAND ${CMAKE_COMMAND} -E remove ./testfiles/${testname}.out.h5 + ./testfiles/${testname}.out.out + ./testfiles/${testname}.out.out.err ) add_test ( NAME H5COPY-CMP-${testname} diff --git a/tools/test/h5diff/CMakeTests.cmake b/tools/test/h5diff/CMakeTests.cmake index 0f61539..1c15880 100644 --- a/tools/test/h5diff/CMakeTests.cmake +++ b/tools/test/h5diff/CMakeTests.cmake @@ -366,13 +366,24 @@ if (HDF5_ENABLE_USING_MEMCHECKER) add_test (NAME H5DIFF-${resultfile} COMMAND $ ${ARGN}) set_tests_properties (H5DIFF-${resultfile} PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles") - if (NOT ${resultcode} STREQUAL "0") + if (NOT "${resultcode}" STREQUAL "0") set_tests_properties (H5DIFF-${resultfile} PROPERTIES WILL_FAIL "true") endif () if (NOT "${last_test}" STREQUAL "") set_tests_properties (H5DIFF-${resultfile} PROPERTIES DEPENDS ${last_test}) endif () else () + # Remove any output file left over from previous test run + add_test ( + NAME H5DIFF-${resultfile}-clear-objects + COMMAND ${CMAKE_COMMAND} + -E remove + testfiles/${resultfile}.out + testfiles/${resultfile}.out.err + ) + if (NOT "${last_test}" STREQUAL "") + set_tests_properties (H5DIFF-${resultfile}-clear-objects PROPERTIES DEPENDS ${last_test}) + endif () add_test ( NAME H5DIFF-${resultfile} COMMAND "${CMAKE_COMMAND}" @@ -385,6 +396,7 @@ -D "TEST_APPEND=EXIT CODE:" -P "${HDF_RESOURCES_EXT_DIR}/runTest.cmake" ) + set_tests_properties (H5DIFF-${resultfile} PROPERTIES DEPENDS H5DIFF-${resultfile}-clear-objects) endif () if (H5_HAVE_PARALLEL) ADD_PH5_TEST (${resultfile} ${resultcode} ${ARGN}) @@ -396,13 +408,24 @@ if (HDF5_ENABLE_USING_MEMCHECKER) add_test (NAME H5DIFF_ERR-${resultfile} COMMAND $ --enable-error-stack ${ARGN}) set_tests_properties (H5DIFF_ERR-${resultfile} PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles") - if (NOT ${resultcode} STREQUAL "0") + if (NOT "${resultcode}" STREQUAL "0") set_tests_properties (H5DIFF_ERR-${resultfile} PROPERTIES WILL_FAIL "true") endif () if (NOT "${last_test}" STREQUAL "") set_tests_properties (H5DIFF_ERR-${resultfile} PROPERTIES DEPENDS ${last_test}) endif () else () + # Remove any output file left over from previous test run + add_test ( + NAME H5DIFF_ERR-${resultfile}-clear-objects + COMMAND ${CMAKE_COMMAND} + -E remove + testfiles/${resultfile}_ERR.out + testfiles/${resultfile}_ERR.out.err + ) + if (NOT "${last_test}" STREQUAL "") + set_tests_properties (H5DIFF_ERR-${resultfile}-clear-objects PROPERTIES DEPENDS ${last_test}) + endif () add_test ( NAME H5DIFF_ERR-${resultfile} COMMAND "${CMAKE_COMMAND}" @@ -416,9 +439,7 @@ -D "TEST_APPEND=EXIT CODE:" -P "${HDF_RESOURCES_EXT_DIR}/runTest.cmake" ) - endif () - if (NOT "${last_test}" STREQUAL "") - set_tests_properties (H5DIFF_ERR-${resultfile} PROPERTIES DEPENDS ${last_test}) + set_tests_properties (H5DIFF_ERR-${resultfile} PROPERTIES DEPENDS H5DIFF_ERR-${resultfile}-clear-objects) endif () set (last_test "H5DIFF_ERR-${resultfile}") endmacro () @@ -428,13 +449,24 @@ if (HDF5_ENABLE_USING_MEMCHECKER) add_test (NAME PH5DIFF-${resultfile} COMMAND $ ${MPIEXEC} ${MPIEXEC_PREFLAGS} ${MPIEXEC_NUMPROC_FLAG} ${MPIEXEC_MAX_NUMPROCS} ${MPIEXEC_POSTFLAGS} ${ARGN}) set_tests_properties (PH5DIFF-${resultfile} PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/PAR/testfiles") - if (NOT ${resultcode} STREQUAL "0") + if (NOT "${resultcode}" STREQUAL "0") set_tests_properties (PH5DIFF-${resultfile} PROPERTIES WILL_FAIL "true") endif () if (NOT "${last_test}" STREQUAL "") set_tests_properties (PH5DIFF-${resultfile} PROPERTIES DEPENDS ${last_test}) endif () else () + # Remove any output file left over from previous test run + add_test ( + NAME PH5DIFF-${resultfile}-clear-objects + COMMAND ${CMAKE_COMMAND} + -E remove + PAR/testfiles/${resultfile}.out + PAR/testfiles/${resultfile}.out.err + ) + if (NOT "${last_test}" STREQUAL "") + set_tests_properties (PH5DIFF-${resultfile}-clear-objects PROPERTIES DEPENDS ${last_test}) + endif () add_test ( NAME PH5DIFF-${resultfile} COMMAND "${CMAKE_COMMAND}" @@ -450,9 +482,7 @@ -D "TEST_SORT_COMPARE=TRUE" -P "${HDF_RESOURCES_EXT_DIR}/runTest.cmake" ) - if (NOT "${last_test}" STREQUAL "") - set_tests_properties (PH5DIFF-${resultfile} PROPERTIES DEPENDS ${last_test}) - endif () + set_tests_properties (PH5DIFF-${resultfile} PROPERTIES DEPENDS PH5DIFF-${resultfile}-clear-objects) set (last_test "PH5DIFF-${resultfile}") endif () endmacro () @@ -461,13 +491,13 @@ if (NOT HDF5_ENABLE_USING_MEMCHECKER) # Remove any output file left over from previous test run add_test ( - NAME H5DIFF_UD-${testname}-clearall-objects + NAME H5DIFF_UD-${testname}-clear-objects COMMAND ${CMAKE_COMMAND} -E remove testfiles/${resultfile}.out testfiles/${resultfile}.out.err ) - if (${resultcode} STREQUAL "2") + if ("${resultcode}" STREQUAL "2") add_test ( NAME H5DIFF_UD-${testname} COMMAND "${CMAKE_COMMAND}" @@ -498,7 +528,7 @@ -P "${HDF_RESOURCES_EXT_DIR}/runTest.cmake" ) endif () - set_tests_properties (H5DIFF_UD-${testname} PROPERTIES DEPENDS H5DIFF_UD-${testname}-clearall-objects) + set_tests_properties (H5DIFF_UD-${testname} PROPERTIES DEPENDS H5DIFF_UD-${testname}-clear-objects) endif () endmacro () @@ -512,7 +542,7 @@ testfiles/${resultfile}_ERR.out testfiles/${resultfile}_ERR.out.err ) - if (${resultcode} STREQUAL "2") + if ("${resultcode}" STREQUAL "2") add_test ( NAME H5DIFF_UD_ERR-${testname} COMMAND "${CMAKE_COMMAND}" diff --git a/tools/test/h5dump/CMakeTests.cmake b/tools/test/h5dump/CMakeTests.cmake index d3d1c4d..cdd3e6d 100644 --- a/tools/test/h5dump/CMakeTests.cmake +++ b/tools/test/h5dump/CMakeTests.cmake @@ -407,8 +407,19 @@ endif () set (last_test "H5DUMP-${testname}") else () + # Remove any output file left over from previous test run + add_test ( + NAME H5DUMP-${testname}-clear-objects + COMMAND ${CMAKE_COMMAND} + -E remove + testfiles/std/h5dump-${testname}.out + testfiles/std/h5dump-${testname}.out.err + ) + if (NOT "${last_test}" STREQUAL "") + set_tests_properties (H5DUMP-${testname}-clear-objects PROPERTIES DEPENDS ${last_test}) + endif () add_test ( - NAME H5DUMP-h5dump-${testname} + NAME H5DUMP-${testname} COMMAND "${CMAKE_COMMAND}" -D "TEST_PROGRAM=$" -D "TEST_ARGS:STRING=${ARGN}" @@ -418,11 +429,12 @@ -D "TEST_REFERENCE=h5dump-${testname}.txt" -P "${HDF_RESOURCES_EXT_DIR}/runTest.cmake" ) + set_tests_properties (H5DUMP-${testname} PROPERTIES DEPENDS H5DUMP-${testname}-clear-objects) endif () endmacro () macro (ADD_SKIP_H5_TEST skipresultfile skipresultcode testtype) - if (${testtype} STREQUAL "SKIP") + if ("${testtype}" STREQUAL "SKIP") if (NOT HDF5_ENABLE_USING_MEMCHECKER) add_test ( NAME H5DUMP-${skipresultfile}-SKIPPED @@ -439,7 +451,7 @@ if (HDF5_ENABLE_USING_MEMCHECKER) add_test (NAME H5DUMP-${resultfile} COMMAND $ ${ARGN}) set_tests_properties (H5DUMP-${resultfile} PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/std") - if (NOT ${resultcode} STREQUAL "0") + if (NOT "${resultcode}" STREQUAL "0") set_tests_properties (H5DUMP-${resultfile} PROPERTIES WILL_FAIL "true") endif () if (NOT "${last_test}" STREQUAL "") @@ -449,7 +461,10 @@ add_test ( NAME H5DUMP-${resultfile}-clear-objects COMMAND ${CMAKE_COMMAND} - -E remove ${resultfile}.bin + -E remove + ${resultfile}.bin + ${resultfile}.out + ${resultfile}.out.err ) set_tests_properties (H5DUMP-${resultfile}-clear-objects PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/std") add_test ( @@ -472,7 +487,7 @@ if (HDF5_ENABLE_USING_MEMCHECKER) add_test (NAME H5DUMP-N-${resultfile} COMMAND $ ${ARGN}) set_tests_properties (H5DUMP-N-${resultfile} PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/std") - if (NOT ${resultcode} STREQUAL "0") + if (NOT "${resultcode}" STREQUAL "0") set_tests_properties (H5DUMP-N-${resultfile} PROPERTIES WILL_FAIL "true") endif () if (NOT "${last_test}" STREQUAL "") @@ -482,7 +497,10 @@ add_test ( NAME H5DUMP-N-${resultfile}-clear-objects COMMAND ${CMAKE_COMMAND} - -E remove ${resultfile}-N.bin + -E remove + ${resultfile}-N.bin + ${resultfile}-N.out + ${resultfile}-N.out.err ) set_tests_properties (H5DUMP-N-${resultfile}-clear-objects PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/std") add_test ( @@ -505,7 +523,7 @@ if (HDF5_ENABLE_USING_MEMCHECKER) add_test (NAME H5DUMP-${resultfile} COMMAND $ ${ARGN} ${resultfile}.txt ${targetfile}) set_tests_properties (H5DUMP-${resultfile} PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/std") - if (NOT ${resultcode} STREQUAL "0") + if (NOT "${resultcode}" STREQUAL "0") set_tests_properties (H5DUMP-${resultfile} PROPERTIES WILL_FAIL "true") endif () if (NOT "${last_test}" STREQUAL "") @@ -515,7 +533,10 @@ add_test ( NAME H5DUMP-${resultfile}-clear-objects COMMAND ${CMAKE_COMMAND} - -E remove ${resultfile}.txt + -E remove + ${resultfile}.txt + ${resultfile}.out + ${resultfile}.out.err ) set_tests_properties (H5DUMP-${resultfile}-clear-objects PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/std") add_test ( @@ -545,7 +566,7 @@ if (HDF5_ENABLE_USING_MEMCHECKER) add_test (NAME H5DUMP-${resultfile} COMMAND $ --ddl=${ddlfile}.txt ${ARGN} ${resultfile}.txt ${targetfile}) set_tests_properties (H5DUMP-${resultfile} PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/std") - if (NOT ${resultcode} STREQUAL "0") + if (NOT "${resultcode}" STREQUAL "0") set_tests_properties (H5DUMP-${resultfile} PROPERTIES WILL_FAIL "true") endif () if (NOT "${last_test}" STREQUAL "") @@ -555,7 +576,11 @@ add_test ( NAME H5DUMP-${resultfile}-clear-objects COMMAND ${CMAKE_COMMAND} - -E remove ${ddlfile}.txt ${resultfile}.txt + -E remove + ${ddlfile}.txt + ${resultfile}.txt + ${resultfile}.out + ${resultfile}.out.err ) set_tests_properties (H5DUMP-${resultfile}-clear-objects PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/std") add_test ( @@ -613,6 +638,15 @@ macro (ADD_H5_MASK_TEST resultfile resultcode) if (NOT HDF5_ENABLE_USING_MEMCHECKER) + # Remove any output file left over from previous test run + add_test ( + NAME H5DUMP-${resultfile}-clear-objects + COMMAND ${CMAKE_COMMAND} + -E remove + ${resultfile}.out + ${resultfile}.out.err + ) + set_tests_properties (H5DUMP-${resultfile}-clear-objects PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/std") add_test ( NAME H5DUMP-${resultfile} COMMAND "${CMAKE_COMMAND}" @@ -625,11 +659,21 @@ -D "TEST_MASK_ERROR=true" -P "${HDF_RESOURCES_EXT_DIR}/runTest.cmake" ) + set_tests_properties (H5DUMP-${resultfile} PROPERTIES DEPENDS "H5DUMP-${resultfile}-clear-objects") endif () endmacro () macro (ADD_H5ERR_MASK_TEST resultfile resultcode) if (NOT HDF5_ENABLE_USING_MEMCHECKER) + # Remove any output file left over from previous test run + add_test ( + NAME H5DUMP-${resultfile}-clear-objects + COMMAND ${CMAKE_COMMAND} + -E remove + ${resultfile}.out + ${resultfile}.out.err + ) + set_tests_properties (H5DUMP-${resultfile}-clear-objects PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/std") add_test ( NAME H5DUMP-${resultfile} COMMAND "${CMAKE_COMMAND}" @@ -643,11 +687,21 @@ -D "TEST_MASK_ERROR=true" -P "${HDF_RESOURCES_EXT_DIR}/runTest.cmake" ) + set_tests_properties (H5DUMP-${resultfile} PROPERTIES DEPENDS "H5DUMP-${resultfile}-clear-objects") endif () endmacro () macro (ADD_H5ERR_MASK_ENV_TEST resultfile resultcode envvar envval) if (NOT HDF5_ENABLE_USING_MEMCHECKER) + # Remove any output file left over from previous test run + add_test ( + NAME H5DUMP-${resultfile}-clear-objects + COMMAND ${CMAKE_COMMAND} + -E remove + ${resultfile}.out + ${resultfile}.out.err + ) + set_tests_properties (H5DUMP-${resultfile}-clear-objects PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/std") add_test ( NAME H5DUMP-${resultfile} COMMAND "${CMAKE_COMMAND}" @@ -663,6 +717,7 @@ -D "TEST_ENV_VALUE:STRING=${envval}" -P "${HDF_RESOURCES_EXT_DIR}/runTest.cmake" ) + set_tests_properties (H5DUMP-${resultfile} PROPERTIES DEPENDS "H5DUMP-${resultfile}-clear-objects") endif () endmacro () @@ -672,7 +727,10 @@ add_test ( NAME H5DUMP-IMPORT-${resultfile}-clear-objects COMMAND ${CMAKE_COMMAND} - -E remove ${resultfile}.bin ${resultfile}.h5 + -E remove + ${resultfile}.bin + ${resultfile}.h5 + ${conffile}.out ) set_tests_properties (H5DUMP-IMPORT-${resultfile}-clear-objects PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/std") add_test ( @@ -700,12 +758,13 @@ if (NOT HDF5_ENABLE_USING_MEMCHECKER) # Remove any output file left over from previous test run add_test ( - NAME H5DUMP_UD-${testname}-clearall-objects + NAME H5DUMP_UD-${testname}-clear-objects COMMAND ${CMAKE_COMMAND} -E remove - testfiles/std/${resultfile}.out - testfiles/std/${resultfile}.out.err + ${resultfile}.out + ${resultfile}.out.err ) + set_tests_properties (H5DUMP_UD-${testname}-clear-objects PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/std") add_test ( NAME H5DUMP_UD-${testname} COMMAND "${CMAKE_COMMAND}" @@ -719,7 +778,7 @@ -D "TEST_ENV_VALUE=${CMAKE_BINARY_DIR}/plugins" -P "${HDF_RESOURCES_EXT_DIR}/runTest.cmake" ) - set_tests_properties (H5DUMP_UD-${testname} PROPERTIES DEPENDS H5DUMP_UD-${testname}-clearall-objects) + set_tests_properties (H5DUMP_UD-${testname} PROPERTIES DEPENDS H5DUMP_UD-${testname}-clear-objects) endif () endmacro () diff --git a/tools/test/h5dump/CMakeTestsPBITS.cmake b/tools/test/h5dump/CMakeTestsPBITS.cmake index 986f1a1..4f3ee9f 100644 --- a/tools/test/h5dump/CMakeTestsPBITS.cmake +++ b/tools/test/h5dump/CMakeTestsPBITS.cmake @@ -131,6 +131,15 @@ set_tests_properties (H5DUMP-${resultfile} PROPERTIES DEPENDS ${last_pbits_test}) endif () else () + # Remove any output file left over from previous test run + add_test ( + NAME H5DUMP-${resultfile}-clear-objects + COMMAND ${CMAKE_COMMAND} + -E remove + ${resultfile}.out + ${resultfile}.out.err + ) + set_tests_properties (H5DUMP-${resultfile}-clear-objects PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/pbits") add_test ( NAME H5DUMP-${resultfile} COMMAND "${CMAKE_COMMAND}" @@ -142,6 +151,7 @@ -D "TEST_REFERENCE=${resultfile}.ddl" -P "${HDF_RESOURCES_EXT_DIR}/runTest.cmake" ) + set_tests_properties (H5DUMP-${resultfile} PROPERTIES DEPENDS H5DUMP-${resultfile}-clear-objects) endif () endmacro () diff --git a/tools/test/h5dump/CMakeTestsVDS.cmake b/tools/test/h5dump/CMakeTestsVDS.cmake index 310f9ce..3addecf 100644 --- a/tools/test/h5dump/CMakeTestsVDS.cmake +++ b/tools/test/h5dump/CMakeTestsVDS.cmake @@ -103,13 +103,22 @@ if (HDF5_ENABLE_USING_MEMCHECKER) add_test (NAME H5DUMP-${resultfile} COMMAND $ ${ARGN}) set_tests_properties (H5DUMP-${resultfile} PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/vds") - if (NOT ${resultcode} STREQUAL "0") + if (NOT "${resultcode}" STREQUAL "0") set_tests_properties (H5DUMP-${resultfile} PROPERTIES WILL_FAIL "true") endif () if (NOT "${last_vds_test}" STREQUAL "") set_tests_properties (H5DUMP-${resultfile} PROPERTIES DEPENDS ${last_VDS_test}) endif () else () + # Remove any output file left over from previous test run + add_test ( + NAME H5DUMP-${resultfile}-clear-objects + COMMAND ${CMAKE_COMMAND} + -E remove + ${resultfile}.out + ${resultfile}.out.err + ) + set_tests_properties (H5DUMP-${resultfile}-clear-objects PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/vds") add_test ( NAME H5DUMP-${resultfile} COMMAND "${CMAKE_COMMAND}" @@ -121,6 +130,7 @@ -D "TEST_REFERENCE=${resultfile}.ddl" -P "${HDF_RESOURCES_EXT_DIR}/runTest.cmake" ) + set_tests_properties (H5DUMP-${resultfile} PROPERTIES DEPENDS H5DUMP-${resultfile}-clear-objects) endif () endmacro () @@ -129,13 +139,22 @@ if (HDF5_ENABLE_USING_MEMCHECKER) add_test (NAME H5DUMP-${resultfile} COMMAND $ -p ${ARGN}) set_tests_properties (H5DUMP-${resultfile} PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/vds") - if (NOT ${resultcode} STREQUAL "0") + if (NOT "${resultcode}" STREQUAL "0") set_tests_properties (H5DUMP-${resultfile} PROPERTIES WILL_FAIL "true") endif () if (NOT "${last_vds_test}" STREQUAL "") set_tests_properties (H5DUMP-${resultfile} PROPERTIES DEPENDS ${last_VDS_test}) endif () else () + # Remove any output file left over from previous test run + add_test ( + NAME H5DUMP-${resultfile}-clear-objects + COMMAND ${CMAKE_COMMAND} + -E remove + ${resultfile}.out + ${resultfile}.out.err + ) + set_tests_properties (H5DUMP-${resultfile}-clear-objects PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/vds") add_test ( NAME H5DUMP-${resultfile} COMMAND "${CMAKE_COMMAND}" diff --git a/tools/test/h5dump/CMakeTestsXML.cmake b/tools/test/h5dump/CMakeTestsXML.cmake index e068c5e..0f8875f 100644 --- a/tools/test/h5dump/CMakeTestsXML.cmake +++ b/tools/test/h5dump/CMakeTestsXML.cmake @@ -161,10 +161,10 @@ ############################################################################## macro (ADD_XML_SKIP_H5_TEST skipresultfile skipresultcode testtype) - if (${testtype} STREQUAL "SKIP") + if ("${testtype}" STREQUAL "SKIP") if (NOT HDF5_ENABLE_USING_MEMCHECKER) add_test ( - NAME H5DUMP-XML-${skipresultfile}-SKIPPED + NAME H5DUMP_XML-${skipresultfile}-SKIPPED COMMAND ${CMAKE_COMMAND} -E echo "SKIP ${skipresultfile}.xml --xml ${ARGN}" ) endif () @@ -175,17 +175,26 @@ macro (ADD_XML_H5_TEST resultfile resultcode) if (HDF5_ENABLE_USING_MEMCHECKER) - add_test (NAME H5DUMP-XML-${resultfile} COMMAND $ --xml ${ARGN}) + add_test (NAME H5DUMP_XML-${resultfile} COMMAND $ --xml ${ARGN}) set_tests_properties (H5DUMP-XML-${resultfile} PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/xml") - if (NOT ${resultcode} STREQUAL "0") + if (NOT "${resultcode}" STREQUAL "0") set_tests_properties (H5DUMP-XML-${resultfile} PROPERTIES WILL_FAIL "true") endif () if (NOT "${last_xml_test}" STREQUAL "") set_tests_properties (H5DUMP-XML-${resultfile} PROPERTIES DEPENDS ${last_xml_test}) endif () else () + # Remove any output file left over from previous test run add_test ( - NAME H5DUMP-XML-${resultfile} + NAME H5DUMP_XML-${resultfile}-clear-objects + COMMAND ${CMAKE_COMMAND} + -E remove + ${resultfile}.out + ${resultfile}.out.err + ) + set_tests_properties (H5DUMP_XML-${resultfile}-clear-objects PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/xml") + add_test ( + NAME H5DUMP_XML-${resultfile} COMMAND "${CMAKE_COMMAND}" -D "TEST_PROGRAM=$" -D "TEST_ARGS:STRING=--xml;${ARGN}" @@ -195,6 +204,7 @@ -D "TEST_REFERENCE=${resultfile}.xml" -P "${HDF_RESOURCES_EXT_DIR}/runTest.cmake" ) + set_tests_properties (H5DUMP_XML-${resultfile} PROPERTIES DEPENDS H5DUMP_XML-${resultfile}-clear-objects) endif () endmacro () diff --git a/tools/test/h5format_convert/CMakeTests.cmake b/tools/test/h5format_convert/CMakeTests.cmake index 3e423da..4af220b 100644 --- a/tools/test/h5format_convert/CMakeTests.cmake +++ b/tools/test/h5format_convert/CMakeTests.cmake @@ -94,7 +94,10 @@ add_test ( NAME H5FC-${testname}-clear-objects COMMAND ${CMAKE_COMMAND} - -E remove ./testfiles/outtmp.h5 + -E remove + ./testfiles/outtmp.h5 + ./testfiles/${testname}.out + ./testfiles/${testname}.out.err ) if (NOT "${last_test}" STREQUAL "") set_tests_properties (H5FC-${testname}-clear-objects PROPERTIES DEPENDS ${last_test}) @@ -143,7 +146,10 @@ add_test ( NAME H5FC-${testname}-clear-objects COMMAND ${CMAKE_COMMAND} - -E remove ./testfiles/tmp.h5 + -E remove + ./testfiles/tmp.h5 + ./testfiles/${testname}.out + ./testfiles/${testname}.out.err ) if (NOT "${last_test}" STREQUAL "") set_tests_properties (H5FC-${testname}-clear-objects PROPERTIES DEPENDS ${last_test}) @@ -187,7 +193,10 @@ add_test ( NAME H5FC-${testname}-clear-objects COMMAND ${CMAKE_COMMAND} - -E remove ./testfiles/chktmp.h5 + -E remove + ./testfiles/chktmp.h5 + ./testfiles/${testname}.out + ./testfiles/${testname}.out.err ) if (NOT "${last_test}" STREQUAL "") set_tests_properties (H5FC-${testname}-clear-objects PROPERTIES DEPENDS ${last_test}) @@ -225,7 +234,12 @@ add_test ( NAME H5FC-${testname}-clear-objects COMMAND ${CMAKE_COMMAND} - -E remove ./testfiles/dmptmp.h5 + -E remove + ./testfiles/dmptmp.h5 + ./testfiles/${testname}.out + ./testfiles/${testname}.out.err + ./testfiles/${testname}_chk.out + ./testfiles/${testname}_chk.out.err ) if (NOT "${last_test}" STREQUAL "") set_tests_properties (H5FC-${testname}-clear-objects PROPERTIES DEPENDS ${last_test}) @@ -254,7 +268,7 @@ -D "TEST_PROGRAM=$" -D "TEST_ARGS:STRING=-BH;./testfiles/dmptmp.h5" -D "TEST_FOLDER=${PROJECT_BINARY_DIR}" - -D "TEST_OUTPUT=testfiles/${testname}.out" + -D "TEST_OUTPUT=testfiles/${testname}_chk.out" -D "TEST_EXPECT=0" -D "TEST_REFERENCE=testfiles/${testname}.ddl" -P "${HDF_RESOURCES_EXT_DIR}/runTest.cmake" diff --git a/tools/test/h5jam/CMakeTests.cmake b/tools/test/h5jam/CMakeTests.cmake index ae6d440..66ff715 100644 --- a/tools/test/h5jam/CMakeTests.cmake +++ b/tools/test/h5jam/CMakeTests.cmake @@ -60,6 +60,13 @@ endif () else () add_test ( + NAME H5JAM-${expectfile}-clear-objects + COMMAND ${CMAKE_COMMAND} + -E remove + ${expectfile}.out + ${expectfile}.out.err + ) + add_test ( NAME H5JAM-${expectfile} COMMAND "${CMAKE_COMMAND}" -D "TEST_PROGRAM=$" @@ -70,6 +77,7 @@ -D "TEST_REFERENCE=testfiles/${expectfile}.txt" -P "${HDF_RESOURCES_EXT_DIR}/runTest.cmake" ) + set_tests_properties (H5JAM-${expectfile} PROPERTIES DEPENDS "H5JAM-${expectfile}-clear-objects") endif () endmacro () @@ -86,6 +94,13 @@ endif () else () add_test ( + NAME H5JAM-UNJAM-${expectfile}-clear-objects + COMMAND ${CMAKE_COMMAND} + -E remove + ${expectfile}.out + ${expectfile}.out.err + ) + add_test ( NAME H5JAM-UNJAM-${expectfile} COMMAND "${CMAKE_COMMAND}" -D "TEST_PROGRAM=$" @@ -96,6 +111,7 @@ -D "TEST_REFERENCE=testfiles/${expectfile}.txt" -P "${HDF_RESOURCES_EXT_DIR}/runTest.cmake" ) + set_tests_properties (H5JAM-UNJAM-${expectfile} PROPERTIES DEPENDS "H5JAM-UNJAM-${expectfile}-clear-objects") endif () endmacro () @@ -103,6 +119,16 @@ # If using memchecker add tests without using scripts if (NOT HDF5_ENABLE_USING_MEMCHECKER) add_test ( + NAME H5JAM-${testname}-CHECKFILE-clear-objects + COMMAND ${CMAKE_COMMAND} + -E remove + ${actual}.new + ${actual}.new.err + ${actual}.out + ${actual}.out.err + ) + set_tests_properties (H5JAM-${testname}-CHECKFILE-clear-objects PROPERTIES DEPENDS ${testdepends}) + add_test ( NAME H5JAM-${testname}-CHECKFILE-H5DMP COMMAND "${CMAKE_COMMAND}" -D "TEST_PROGRAM=$" @@ -114,7 +140,7 @@ -D "TEST_SKIP_COMPARE=TRUE" -P "${HDF_RESOURCES_EXT_DIR}/runTest.cmake" ) - set_tests_properties (H5JAM-${testname}-CHECKFILE-H5DMP PROPERTIES DEPENDS ${testdepends}) + set_tests_properties (H5JAM-${testname}-CHECKFILE-H5DMP PROPERTIES DEPENDS H5JAM-${testname}-CHECKFILE-clear-objects) add_test ( NAME H5JAM-${testname}-CHECKFILE-H5DMP_CMP COMMAND "${CMAKE_COMMAND}" diff --git a/tools/test/h5ls/CMakeTests.cmake b/tools/test/h5ls/CMakeTests.cmake index a04a4b6..d03a344 100644 --- a/tools/test/h5ls/CMakeTests.cmake +++ b/tools/test/h5ls/CMakeTests.cmake @@ -129,13 +129,21 @@ if (HDF5_ENABLE_USING_MEMCHECKER) add_test (NAME H5LS-${resultfile} COMMAND $ ${ARGN}) set_tests_properties (H5LS-${resultfile} PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles") - if (${resultcode} STREQUAL "1") + if ("${resultcode}" STREQUAL "1") set_tests_properties (H5LS-${resultfile} PROPERTIES WILL_FAIL "true") endif () if (NOT "${last_test}" STREQUAL "") set_tests_properties (H5LS-${resultfile} PROPERTIES DEPENDS ${last_test}) endif () else () + # Remove any output file left over from previous test run + add_test ( + NAME H5LS-${resultfile}-clear-objects + COMMAND ${CMAKE_COMMAND} + -E remove + testfiles/${resultfile}.out + testfiles/${resultfile}.out.err + ) add_test ( NAME H5LS-${resultfile} COMMAND "${CMAKE_COMMAND}" @@ -147,6 +155,7 @@ -D "TEST_REFERENCE=${resultfile}.ls" -P "${HDF_RESOURCES_EXT_DIR}/runTest.cmake" ) + set_tests_properties (H5LS-${resultfile} PROPERTIES DEPENDS H5LS-${resultfile}-clear-objects) endif () endmacro () @@ -154,7 +163,7 @@ if (NOT HDF5_ENABLE_USING_MEMCHECKER) # Remove any output file left over from previous test run add_test ( - NAME H5LS_UD-${testname}-clearall-objects + NAME H5LS_UD-${testname}-clear-objects COMMAND ${CMAKE_COMMAND} -E remove testfiles/${resultfile}.out @@ -173,7 +182,7 @@ -D "TEST_ENV_VALUE=${CMAKE_BINARY_DIR}/plugins" -P "${HDF_RESOURCES_EXT_DIR}/runTest.cmake" ) - set_tests_properties (H5LS_UD-${testname} PROPERTIES DEPENDS H5LS_UD-${testname}-clearall-objects) + set_tests_properties (H5LS_UD-${testname} PROPERTIES DEPENDS H5LS_UD-${testname}-clear-objects) endif () endmacro () diff --git a/tools/test/h5ls/CMakeTestsVDS.cmake b/tools/test/h5ls/CMakeTestsVDS.cmake index 4a665a5..5df61bb 100644 --- a/tools/test/h5ls/CMakeTestsVDS.cmake +++ b/tools/test/h5ls/CMakeTestsVDS.cmake @@ -74,7 +74,7 @@ if (HDF5_ENABLE_USING_MEMCHECKER) add_test (NAME H5LS-${resultfile} COMMAND $ ${ARGN}) set_tests_properties (H5LS-${resultfile} PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/vds") - if (${resultcode} STREQUAL "1") + if ("${resultcode}" STREQUAL "1") set_tests_properties (H5LS-${resultfile} PROPERTIES WILL_FAIL "true") endif () if (NOT "${last_test}" STREQUAL "") @@ -82,6 +82,14 @@ endif () else () add_test ( + NAME H5LS-${resultfile}-clear-objects + COMMAND ${CMAKE_COMMAND} + -E remove + ${resultfile}.out + ${resultfile}.out.err + ) + set_tests_properties (H5LS-${resultfile}-clear-objects PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/vds") + add_test ( NAME H5LS-${resultfile} COMMAND "${CMAKE_COMMAND}" -D "TEST_PROGRAM=$" @@ -92,6 +100,7 @@ -D "TEST_REFERENCE=${resultfile}.ls" -P "${HDF_RESOURCES_EXT_DIR}/runTest.cmake" ) + set_tests_properties (H5LS-${resultfile} PROPERTIES DEPENDS H5LS-${resultfile}-clear-objects) endif () endmacro () diff --git a/tools/test/h5repack/CMakeTests.cmake b/tools/test/h5repack/CMakeTests.cmake index dfdbb14..c68f18a 100644 --- a/tools/test/h5repack/CMakeTests.cmake +++ b/tools/test/h5repack/CMakeTests.cmake @@ -76,6 +76,7 @@ ${HDF5_TOOLS_TEST_H5REPACK_SOURCE_DIR}/testfiles/h5repack_shuffle.h5 ${HDF5_TOOLS_TEST_H5REPACK_SOURCE_DIR}/testfiles/h5repack_soffset.h5 ${HDF5_TOOLS_TEST_H5REPACK_SOURCE_DIR}/testfiles/h5repack_szip.h5 + # fsm ${HDF5_TOOLS_TEST_H5REPACK_SOURCE_DIR}/testfiles/h5repack_aggr.h5 ${HDF5_TOOLS_TEST_H5REPACK_SOURCE_DIR}/testfiles/h5repack_fsm_aggr_nopersist.h5 ${HDF5_TOOLS_TEST_H5REPACK_SOURCE_DIR}/testfiles/h5repack_fsm_aggr_persist.h5 @@ -124,39 +125,62 @@ ) set (LIST_OTHER_TEST_FILES - ${HDF5_TOOLS_TEST_H5REPACK_SOURCE_DIR}/testfiles/h5repack-help.txt - ${HDF5_TOOLS_TEST_H5REPACK_SOURCE_DIR}/testfiles/h5repack_ext.bin - ${HDF5_TOOLS_TEST_H5REPACK_SOURCE_DIR}/testfiles/ublock.bin - ${HDF5_TOOLS_TEST_H5REPACK_SOURCE_DIR}/testfiles/h5repack.info - ${HDF5_TOOLS_TEST_H5REPACK_SOURCE_DIR}/testfiles/deflate_limit.h5repack_layout.h5.ddl - ${HDF5_TOOLS_TEST_H5REPACK_SOURCE_DIR}/testfiles/h5repack_layout.h5.ddl - ${HDF5_TOOLS_TEST_H5REPACK_SOURCE_DIR}/testfiles/h5repack_filters.h5-gzip_verbose_filters.tst - ${HDF5_TOOLS_TEST_H5REPACK_SOURCE_DIR}/testfiles/h5repack_layout.h5-dset2_chunk_20x10-errstk.tst - ${HDF5_TOOLS_TEST_H5REPACK_SOURCE_DIR}/testfiles/h5repack_layout.h5-plugin_test.ddl - ${HDF5_TOOLS_TEST_H5REPACK_SOURCE_DIR}/testfiles/plugin_test.h5repack_layout.h5.tst - ${HDF5_TOOLS_TEST_H5REPACK_SOURCE_DIR}/testfiles/h5repack_layout.UD.h5-plugin_none.ddl - ${HDF5_TOOLS_TEST_H5REPACK_SOURCE_DIR}/testfiles/plugin_none.h5repack_layout.UD.h5.tst - ${HDF5_TOOLS_TEST_H5REPACK_SOURCE_DIR}/testfiles/h5repack_layout.h5-plugin_version_test.ddl - ${HDF5_TOOLS_TEST_H5REPACK_SOURCE_DIR}/testfiles/plugin_version_test.h5repack_layout.h5.tst - ${HDF5_TOOLS_TEST_H5REPACK_SOURCE_DIR}/testfiles/1_vds.h5-vds_dset_chunk20x10x5-v.ddl - ${HDF5_TOOLS_TEST_H5REPACK_SOURCE_DIR}/testfiles/2_vds.h5-vds_chunk3x6x9-v.ddl - ${HDF5_TOOLS_TEST_H5REPACK_SOURCE_DIR}/testfiles/3_1_vds.h5-vds_chunk2x5x8-v.ddl - ${HDF5_TOOLS_TEST_H5REPACK_SOURCE_DIR}/testfiles/4_vds.h5-vds_compa-v.ddl - ${HDF5_TOOLS_TEST_H5REPACK_SOURCE_DIR}/testfiles/4_vds.h5-vds_conti-v.ddl - ${HDF5_TOOLS_TEST_H5REPACK_SOURCE_DIR}/testfiles/h5repack_layout.h5-plugin_zero.tst - ${HDF5_TOOLS_TEST_H5REPACK_SOURCE_DIR}/testfiles/crtorder.tordergr.h5.ddl - ${HDF5_TOOLS_TEST_H5REPACK_SOURCE_DIR}/testfiles/SP.h5repack_fsm_aggr_nopersist.h5.ddl - ${HDF5_TOOLS_TEST_H5REPACK_SOURCE_DIR}/testfiles/S.h5repack_fsm_aggr_persist.h5.ddl - ${HDF5_TOOLS_TEST_H5REPACK_SOURCE_DIR}/testfiles/STG.h5repack_none.h5.ddl - ${HDF5_TOOLS_TEST_H5REPACK_SOURCE_DIR}/testfiles/GS.h5repack_paged_nopersist.h5.ddl - ${HDF5_TOOLS_TEST_H5REPACK_SOURCE_DIR}/testfiles/SP.h5repack_paged_persist.h5.ddl - ${HDF5_TOOLS_TEST_H5REPACK_SOURCE_DIR}/testfiles/SPT.h5repack_aggr.h5.ddl + h5repack-help.txt + h5repack_ext.bin + h5repack.info + ublock.bin ) - foreach (h5_file ${LIST_HDF5_TEST_FILES} ${LIST_OTHER_TEST_FILES}) + set (LIST_TST_TEST_FILES + ${HDF5_TOOLS_TEST_H5REPACK_SOURCE_DIR}/testfiles/h5repack_filters.h5-gzip_verbose_filters + ${HDF5_TOOLS_TEST_H5REPACK_SOURCE_DIR}/testfiles/h5repack_layout.h5-dset2_chunk_20x10-errstk + ${HDF5_TOOLS_TEST_H5REPACK_SOURCE_DIR}/testfiles/plugin_test.h5repack_layout.h5 + ${HDF5_TOOLS_TEST_H5REPACK_SOURCE_DIR}/testfiles/plugin_version_test.h5repack_layout.h5 + ${HDF5_TOOLS_TEST_H5REPACK_SOURCE_DIR}/testfiles/plugin_zero.h5repack_layout.h5 + ${HDF5_TOOLS_TEST_H5REPACK_SOURCE_DIR}/testfiles/plugin_none.h5repack_layout.UD.h5 + ) + + set (LIST_DDL_TEST_FILES + ${HDF5_TOOLS_TEST_H5REPACK_SOURCE_DIR}/testfiles/crtorder.tordergr.h5 + ${HDF5_TOOLS_TEST_H5REPACK_SOURCE_DIR}/testfiles/deflate_limit.h5repack_layout.h5 + ${HDF5_TOOLS_TEST_H5REPACK_SOURCE_DIR}/testfiles/h5repack_layout.h5 + ${HDF5_TOOLS_TEST_H5REPACK_SOURCE_DIR}/testfiles/h5repack_layout.h5-plugin_test + ${HDF5_TOOLS_TEST_H5REPACK_SOURCE_DIR}/testfiles/h5repack_layout.h5-plugin_version_test + ${HDF5_TOOLS_TEST_H5REPACK_SOURCE_DIR}/testfiles/h5repack_layout.h5-plugin_zero + ${HDF5_TOOLS_TEST_H5REPACK_SOURCE_DIR}/testfiles/h5repack_layout.UD.h5-plugin_none + # fsm + ${HDF5_TOOLS_TEST_H5REPACK_SOURCE_DIR}/testfiles/STG.h5repack_none.h5 + ${HDF5_TOOLS_TEST_H5REPACK_SOURCE_DIR}/testfiles/SPT.h5repack_aggr.h5 + ${HDF5_TOOLS_TEST_H5REPACK_SOURCE_DIR}/testfiles/SP.h5repack_fsm_aggr_nopersist.h5 + ${HDF5_TOOLS_TEST_H5REPACK_SOURCE_DIR}/testfiles/S.h5repack_fsm_aggr_persist.h5 + ${HDF5_TOOLS_TEST_H5REPACK_SOURCE_DIR}/testfiles/GS.h5repack_paged_nopersist.h5 + ${HDF5_TOOLS_TEST_H5REPACK_SOURCE_DIR}/testfiles/SP.h5repack_paged_persist.h5 + # vds + ${HDF5_TOOLS_TEST_H5REPACK_SOURCE_DIR}/testfiles/1_vds.h5-vds_dset_chunk20x10x5-v + ${HDF5_TOOLS_TEST_H5REPACK_SOURCE_DIR}/testfiles/2_vds.h5-vds_chunk3x6x9-v + ${HDF5_TOOLS_TEST_H5REPACK_SOURCE_DIR}/testfiles/3_1_vds.h5-vds_chunk2x5x8-v + ${HDF5_TOOLS_TEST_H5REPACK_SOURCE_DIR}/testfiles/4_vds.h5-vds_compa-v + ${HDF5_TOOLS_TEST_H5REPACK_SOURCE_DIR}/testfiles/4_vds.h5-vds_conti-v + ) + + foreach (h5_file ${LIST_HDF5_TEST_FILES}) get_filename_component(fname "${h5_file}" NAME) HDFTEST_COPY_FILE("${h5_file}" "${PROJECT_BINARY_DIR}/testfiles/${fname}" "h5repack_files") endforeach () + + foreach (h5_file ${LIST_OTHER_TEST_FILES}) + HDFTEST_COPY_FILE("${HDF5_TOOLS_TEST_H5REPACK_SOURCE_DIR}/testfiles/${h5_file}" "${PROJECT_BINARY_DIR}/testfiles/${h5_file}" "h5repack_files") + endforeach () + + foreach (h5_file ${LIST_TST_TEST_FILES}) + get_filename_component(fname "${h5_file}" NAME) + HDFTEST_COPY_FILE("${h5_file}.tst" "${PROJECT_BINARY_DIR}/testfiles/${fname}.tst" "h5repack_files") + endforeach () + + foreach (h5_file ${LIST_DDL_TEST_FILES}) + get_filename_component(fname "${h5_file}" NAME) + HDFTEST_COPY_FILE("${h5_file}.ddl" "${PROJECT_BINARY_DIR}/testfiles/${fname}.ddl" "h5repack_files") + endforeach () add_custom_target(h5repack_files ALL COMMENT "Copying files needed by h5repack tests" DEPENDS ${h5repack_files_list}) ############################################################################## @@ -168,14 +192,24 @@ macro (ADD_HELP_TEST testname resultcode) # If using memchecker add tests without using scripts if (HDF5_ENABLE_USING_MEMCHECKER) - add_test (NAME H5REPACK-${testname} COMMAND $ ${ARGN}) - set_tests_properties (H5REPACK-${testname} PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles") + add_test (NAME H5REPACK-h5repack-${testname} COMMAND $ ${ARGN}) + set_tests_properties (H5REPACK-h5repack-${testname} PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles") if (NOT "${last_test}" STREQUAL "") - set_tests_properties (H5REPACK-${testname} PROPERTIES DEPENDS ${last_test}) + set_tests_properties (H5REPACK-h5repack-${testname} PROPERTIES DEPENDS ${last_test}) endif () - set (last_test "H5REPACK-${testname}") + set (last_test "H5REPACK-h5repack-${testname}") else () add_test ( + NAME H5REPACK-h5repack-${testname}-clear-objects + COMMAND ${CMAKE_COMMAND} + -E remove + testfiles/h5repack-${testname}.out + testfiles/h5repack-${testname}.out.err + ) + if (NOT "${last_test}" STREQUAL "") + set_tests_properties (H5REPACK-h5repack-${testname}-clear-objects PROPERTIES DEPENDS ${last_test}) + endif () + add_test ( NAME H5REPACK-h5repack-${testname} COMMAND "${CMAKE_COMMAND}" -D "TEST_PROGRAM=$" @@ -186,6 +220,7 @@ -D "TEST_REFERENCE=h5repack-${testname}.txt" -P "${HDF_RESOURCES_EXT_DIR}/runTest.cmake" ) + set_tests_properties (H5REPACK-h5repack-${testname} PROPERTIES DEPENDS H5REPACK-h5repack-${testname}-clear-objects) endif () endmacro () @@ -199,13 +234,20 @@ endif () else () add_test ( - NAME H5REPACK_OLD-${testname} - COMMAND $ ${ARGN} -i ${PROJECT_BINARY_DIR}/testfiles/${testfile} -o ${PROJECT_BINARY_DIR}/testfiles/out-${testname}.${testfile} + NAME H5REPACK_OLD-${testname}-clear-objects + COMMAND ${CMAKE_COMMAND} + -E remove + testfiles/out-${testname}.${testfile} ) if (NOT "${last_test}" STREQUAL "") - set_tests_properties (H5REPACK_OLD-${testname} PROPERTIES DEPENDS ${last_test}) + set_tests_properties (H5REPACK_OLD-${testname}-clear-objects PROPERTIES DEPENDS ${last_test}) endif () add_test ( + NAME H5REPACK_OLD-${testname} + COMMAND $ ${ARGN} -i ${PROJECT_BINARY_DIR}/testfiles/${testfile} -o ${PROJECT_BINARY_DIR}/testfiles/out-${testname}.${testfile} + ) + set_tests_properties (H5REPACK_OLD-${testname} PROPERTIES DEPENDS H5REPACK_OLD-${testname}-clear-objects) + add_test ( NAME H5REPACK_OLD-${testname}_DFF COMMAND $ ${PROJECT_BINARY_DIR}/testfiles/${testfile} ${PROJECT_BINARY_DIR}/testfiles/out-${testname}.${testfile} ) @@ -223,13 +265,20 @@ endif () else () add_test ( - NAME H5REPACK-${testname} - COMMAND $ ${ARGN} ${PROJECT_BINARY_DIR}/testfiles/${testfile} ${PROJECT_BINARY_DIR}/testfiles/out-${testname}.${testfile} + NAME H5REPACK-${testname}-clear-objects + COMMAND ${CMAKE_COMMAND} + -E remove + testfiles/out-${testname}.${testfile} ) if (NOT "${last_test}" STREQUAL "") - set_tests_properties (H5REPACK-${testname} PROPERTIES DEPENDS ${last_test}) + set_tests_properties (H5REPACK-${testname}-clear-objects PROPERTIES DEPENDS ${last_test}) endif () add_test ( + NAME H5REPACK-${testname} + COMMAND $ ${ARGN} ${PROJECT_BINARY_DIR}/testfiles/${testfile} ${PROJECT_BINARY_DIR}/testfiles/out-${testname}.${testfile} + ) + set_tests_properties (H5REPACK-${testname} PROPERTIES DEPENDS H5REPACK-${testname}-clear-objects) + add_test ( NAME H5REPACK-${testname}_DFF COMMAND $ ${PROJECT_BINARY_DIR}/testfiles/${testfile} ${PROJECT_BINARY_DIR}/testfiles/out-${testname}.${testfile} ) @@ -252,8 +301,22 @@ NAME H5REPACK_CMP-${testname} COMMAND $ ${ARGN} ${PROJECT_BINARY_DIR}/testfiles/${resultfile} ${PROJECT_BINARY_DIR}/testfiles/out-${testname}.${resultfile} ) + if (NOT "${last_test}" STREQUAL "") + set_tests_properties (H5REPACK_CMP-${testname} PROPERTIES DEPENDS ${last_test}) + endif () else () add_test ( + NAME H5REPACK_CMP-${testname}-clear-objects + COMMAND ${CMAKE_COMMAND} + -E remove + testfiles/out-${testname}.${resultfile} + testfiles/${resultfile}-${testname}.out + testfiles/${resultfile}-${testname}.out.err + ) + if (NOT "${last_test}" STREQUAL "") + set_tests_properties (H5REPACK_CMP-${testname}-clear-objects PROPERTIES DEPENDS ${last_test}) + endif () + add_test ( NAME H5REPACK_CMP-${testname} COMMAND "${CMAKE_COMMAND}" -D "TEST_PROGRAM=$" @@ -265,9 +328,7 @@ -D "TEST_REFERENCE=${resultfile}-${testname}.tst" -P "${HDF_RESOURCES_EXT_DIR}/runTest.cmake" ) - endif () - if (NOT "${last_test}" STREQUAL "") - set_tests_properties (H5REPACK_CMP-${testname} PROPERTIES DEPENDS ${last_test}) + set_tests_properties (H5REPACK_CMP-${testname} PROPERTIES DEPENDS H5REPACK_CMP-${testname}-clear-objects) endif () endif () endmacro () @@ -287,8 +348,22 @@ NAME H5REPACK_MASK-${testname} COMMAND $ ${ARGN} ${PROJECT_BINARY_DIR}/testfiles/${resultfile} ${PROJECT_BINARY_DIR}/testfiles/out-${testname}.${resultfile} ) + if (NOT "${last_test}" STREQUAL "") + set_tests_properties (H5REPACK_MASK-${testname} PROPERTIES DEPENDS ${last_test}) + endif () else (HDF5_ENABLE_USING_MEMCHECKER) add_test ( + NAME H5REPACK_MASK-${testname}-clear-objects + COMMAND ${CMAKE_COMMAND} + -E remove + testfiles/out-${testname}.${resultfile} + testfiles/${resultfile}-${testname}.out + testfiles/${resultfile}-${testname}.out.err + ) + if (NOT "${last_test}" STREQUAL "") + set_tests_properties (H5REPACK_MASK-${testname}-clear-objects PROPERTIES DEPENDS ${last_test}) + endif () + add_test ( NAME H5REPACK_MASK-${testname} COMMAND "${CMAKE_COMMAND}" -D "TEST_PROGRAM=$" @@ -300,9 +375,7 @@ -D "TEST_REFERENCE=${resultfile}-${testname}.tst" -P "${HDF_RESOURCES_EXT_DIR}/runTest.cmake" ) - endif () - if (NOT "${last_test}" STREQUAL "") - set_tests_properties (H5REPACK_MASK-${testname} PROPERTIES DEPENDS ${last_test}) + set_tests_properties (H5REPACK_MASK-${testname} PROPERTIES DEPENDS H5REPACK_MASK-${testname}-clear-objects) endif () endif () endmacro () @@ -316,14 +389,22 @@ ) endif () else () - # If using memchecker add tests without using scripts add_test ( - NAME H5REPACK_DMP-${testname} - COMMAND $ ${ARGN} ${PROJECT_BINARY_DIR}/testfiles/${resultfile} ${PROJECT_BINARY_DIR}/testfiles/out-${testname}.${resultfile} + NAME H5REPACK_DMP-${testname}-clear-objects + COMMAND ${CMAKE_COMMAND} + -E remove + testfiles/out-${testname}.${resultfile} + testfiles/${resultfile}-${testname}.out + testfiles/${resultfile}-${testname}.out.err ) if (NOT "${last_test}" STREQUAL "") - set_tests_properties (H5REPACK_DMP-${testname} PROPERTIES DEPENDS ${last_test}) + set_tests_properties (H5REPACK_DMP-${testname}-clear-objects PROPERTIES DEPENDS ${last_test}) endif () + add_test ( + NAME H5REPACK_DMP-${testname} + COMMAND $ ${ARGN} ${PROJECT_BINARY_DIR}/testfiles/${resultfile} ${PROJECT_BINARY_DIR}/testfiles/out-${testname}.${resultfile} + ) + set_tests_properties (H5REPACK_DMP-${testname} PROPERTIES DEPENDS H5REPACK_DMP-${testname}-clear-objects) if (NOT HDF5_ENABLE_USING_MEMCHECKER) add_test ( NAME H5REPACK_DMP-h5dump-${testname} @@ -350,14 +431,22 @@ ) endif () else () - # If using memchecker add tests without using scripts add_test ( - NAME H5REPACK_STAT-${testname} - COMMAND $ ${ARGN} ${PROJECT_BINARY_DIR}/testfiles/${resultfile} ${PROJECT_BINARY_DIR}/testfiles/out-${statarg}.${resultfile} + NAME H5REPACK_STAT-${testname}-clear-objects + COMMAND ${CMAKE_COMMAND} + -E remove + testfiles/out-${statarg}.${resultfile} + testfiles/${resultfile}-${testname}.out + testfiles/${resultfile}-${testname}.out.err ) if (NOT "${last_test}" STREQUAL "") - set_tests_properties (H5REPACK_STAT-${testname} PROPERTIES DEPENDS ${last_test}) + set_tests_properties (H5REPACK_STAT-${testname}-clear-objects PROPERTIES DEPENDS ${last_test}) endif () + add_test ( + NAME H5REPACK_STAT-${testname} + COMMAND $ ${ARGN} ${PROJECT_BINARY_DIR}/testfiles/${resultfile} ${PROJECT_BINARY_DIR}/testfiles/out-${statarg}.${resultfile} + ) + set_tests_properties (H5REPACK_STAT-${testname} PROPERTIES DEPENDS H5REPACK_STAT-${testname}-clear-objects) if (NOT HDF5_ENABLE_USING_MEMCHECKER) add_test ( NAME H5REPACK_STAT-h5stat-${testname} @@ -386,13 +475,22 @@ else () if (NOT HDF5_ENABLE_USING_MEMCHECKER) add_test ( - NAME H5REPACK_VERIFY_LAYOUT-${testname} - COMMAND $ ${ARGN} ${PROJECT_BINARY_DIR}/testfiles/${testfile} ${PROJECT_BINARY_DIR}/testfiles/out-${testname}.${testfile} + NAME H5REPACK_VERIFY_LAYOUT-${testname}-clear-objects + COMMAND ${CMAKE_COMMAND} + -E remove + testfiles/out-${testname}.${testfile} + testfiles/${testfile}-${testname}-v.out + testfiles/${testfile}-${testname}-v.out.err ) if (NOT "${last_test}" STREQUAL "") - set_tests_properties (H5REPACK_VERIFY_LAYOUT-${testname} PROPERTIES DEPENDS ${last_test}) + set_tests_properties (H5REPACK_VERIFY_LAYOUT-${testname}-clear-objects PROPERTIES DEPENDS ${last_test}) endif () add_test ( + NAME H5REPACK_VERIFY_LAYOUT-${testname} + COMMAND $ ${ARGN} ${PROJECT_BINARY_DIR}/testfiles/${testfile} ${PROJECT_BINARY_DIR}/testfiles/out-${testname}.${testfile} + ) + set_tests_properties (H5REPACK_VERIFY_LAYOUT-${testname} PROPERTIES DEPENDS H5REPACK_VERIFY_LAYOUT-${testname}-clear-objects) + add_test ( NAME H5REPACK_VERIFY_LAYOUT-${testname}_DFF COMMAND $ ${PROJECT_BINARY_DIR}/testfiles/${testfile} ${PROJECT_BINARY_DIR}/testfiles/out-${testname}.${testfile} ) @@ -449,14 +547,24 @@ endif () else () if (NOT HDF5_ENABLE_USING_MEMCHECKER) + # Remove any output file left over from previous test run + add_test ( + NAME H5REPACK_VERIFY_LAYOUT_VDS-${testname}-clear-objects + COMMAND ${CMAKE_COMMAND} + -E remove + testfiles/out-${testname}.${testfile} + testfiles/${testfile}-${testname}-v.out + testfiles/${testfile}-${testname}-v.out.err + ) + if (NOT "${last_test}" STREQUAL "") + set_tests_properties (H5REPACK_VERIFY_LAYOUT_VDS-${testname}-clear-objects PROPERTIES DEPENDS ${last_test}) + endif () add_test ( NAME H5REPACK_VERIFY_LAYOUT_VDS-${testname} COMMAND $ ${ARGN} ${PROJECT_BINARY_DIR}/testfiles/${testfile} ${PROJECT_BINARY_DIR}/testfiles/out-${testname}.${testfile} ) set_tests_properties (H5REPACK_VERIFY_LAYOUT_VDS-${testname} PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles") - if (NOT "${last_test}" STREQUAL "") - set_tests_properties (H5REPACK_VERIFY_LAYOUT_VDS-${testname} PROPERTIES DEPENDS ${last_test}) - endif () + set_tests_properties (H5REPACK_VERIFY_LAYOUT_VDS-${testname} PROPERTIES DEPENDS H5REPACK_VERIFY_LAYOUT_VDS-${testname}-clear-objects) add_test ( NAME H5REPACK_VERIFY_LAYOUT_VDS-${testname}_DMP COMMAND "${CMAKE_COMMAND}" @@ -475,14 +583,23 @@ endmacro () macro (ADD_H5_TEST_META testname testfile) + # Remove any output file left over from previous test run add_test ( - NAME H5REPACK_META-${testname}_N - COMMAND $ ${PROJECT_BINARY_DIR}/testfiles/${testfile} ${PROJECT_BINARY_DIR}/testfiles/out-${testname}_N.${testname}.h5 + NAME H5REPACK_META-${testname}_N-clear-objects + COMMAND ${CMAKE_COMMAND} + -E remove + testfiles/out-${testname}_N.${testname}.h5 + testfiles/out-${testname}_M.${testname}.h5 ) if (NOT "${last_test}" STREQUAL "") - set_tests_properties (H5REPACK_META-${testname}_N PROPERTIES DEPENDS ${last_test}) + set_tests_properties (H5REPACK_META-${testname}_N-clear-objects PROPERTIES DEPENDS ${last_test}) endif () add_test ( + NAME H5REPACK_META-${testname}_N + COMMAND $ ${PROJECT_BINARY_DIR}/testfiles/${testfile} ${PROJECT_BINARY_DIR}/testfiles/out-${testname}_N.${testname}.h5 + ) + set_tests_properties (H5REPACK_META-${testname}_N PROPERTIES DEPENDS H5REPACK_META-${testname}_N-clear-objects) + add_test ( NAME H5REPACK_META-${testname}_M COMMAND $ ${ARGN} ${PROJECT_BINARY_DIR}/testfiles/${testfile} ${PROJECT_BINARY_DIR}/testfiles/out-${testname}_M.${testname}.h5 ) @@ -497,11 +614,18 @@ if (NOT HDF5_ENABLE_USING_MEMCHECKER) # Remove any output file left over from previous test run add_test ( - NAME H5REPACK_UD-${testname}-clearall-objects + NAME H5REPACK_UD-${testname}-clear-objects COMMAND ${CMAKE_COMMAND} -E remove testfiles/out-${testname}.${resultfile} + testfiles/${testname}.${resultfile}.out + testfiles/${testname}.${resultfile}.out.err + testfiles/${resultfile}-${testname}.out + testfiles/${resultfile}-${testname}.out.err ) + if (NOT "${last_test}" STREQUAL "") + set_tests_properties (H5REPACK_UD-${testname}-clear-objects PROPERTIES DEPENDS ${last_test}) + endif () add_test ( NAME H5REPACK_UD-${testname} COMMAND "${CMAKE_COMMAND}" @@ -516,21 +640,21 @@ -D "TEST_ENV_VALUE=${CMAKE_BINARY_DIR}/plugins" -P "${HDF_RESOURCES_EXT_DIR}/runTest.cmake" ) - set_tests_properties (H5REPACK_UD-${testname} PROPERTIES DEPENDS H5REPACK_UD-${testname}-clearall-objects) + set_tests_properties (H5REPACK_UD-${testname} PROPERTIES DEPENDS H5REPACK_UD-${testname}-clear-objects) add_test ( - NAME H5REPACK_UD-h5dump-${testname} + NAME H5REPACK_UD-${testname}-h5dump COMMAND "${CMAKE_COMMAND}" -D "TEST_PROGRAM=$" -D "TEST_ARGS:STRING=-pH;out-${testname}.${resultfile}" -D "TEST_FOLDER=${PROJECT_BINARY_DIR}/testfiles" -D "TEST_OUTPUT=${resultfile}-${testname}.out" - -D "TEST_EXPECT=${resultcode}" + -D "TEST_EXPECT=0" -D "TEST_REFERENCE=${resultfile}-${testname}.ddl" -D "TEST_ENV_VAR=HDF5_PLUGIN_PATH" -D "TEST_ENV_VALUE=${CMAKE_BINARY_DIR}/plugins" -P "${HDF_RESOURCES_EXT_DIR}/runTest.cmake" ) - set_tests_properties (H5REPACK_UD-h5dump-${testname} PROPERTIES DEPENDS "H5REPACK_UD-${testname}") + set_tests_properties (H5REPACK_UD-${testname}-h5dump PROPERTIES DEPENDS "H5REPACK_UD-${testname}") endif () endmacro () @@ -571,205 +695,182 @@ set (FILEV4 4_vds.h5) set (FILEV5 5_vds.h5) - # Remove any output file left over from previous test run - add_test ( - NAME H5REPACK-clearall-objects - COMMAND ${CMAKE_COMMAND} - -E remove - ./testfiles/h5dump-help.out - ./testfiles/h5repack_filters.h5-gzip_verbose_filters.out - ./testfiles/h5repack_filters.h5-gzip_verbose_filters.out.err - ./testfiles/h5repack_layout.h5-chunk_18x13-v.out - ./testfiles/h5repack_layout.h5-chunk_18x13-v.out.err - ./testfiles/h5repack_layout.h5-chunk_20x10-v.out - ./testfiles/h5repack_layout.h5-chunk_20x10-v.out.err - ./testfiles/h5repack_layout.h5-chunk_compa-v.out - ./testfiles/h5repack_layout.h5-chunk_compa-v.out.err - ./testfiles/h5repack_layout.h5-chunk_conti-v.out - ./testfiles/h5repack_layout.h5-chunk_conti-v.out.err - ./testfiles/h5repack_layout.h5-compa-v.out - ./testfiles/h5repack_layout.h5-compa-v.out.err - ./testfiles/h5repack_layout.h5-conti-v.out - ./testfiles/h5repack_layout.h5-conti-v.out.err - ./testfiles/h5repack_layout.h5-deflate_limit.out - ./testfiles/h5repack_layout.h5-deflate_limit.out.err - ./testfiles/h5repack_layout.h5-dset2_chunk_20x10-v.out - ./testfiles/h5repack_layout.h5-dset2_chunk_20x10-v.out.err - ./testfiles/h5repack_layout.h5-dset2_chunk_20x10-errstk.out - ./testfiles/h5repack_layout.h5-dset2_chunk_20x10-errstk.out.err - ./testfiles/h5repack_layout.h5-dset2_compa-v.out - ./testfiles/h5repack_layout.h5-dset2_compa-v.out.err - ./testfiles/h5repack_layout.h5-dset2_conti-v.out - ./testfiles/h5repack_layout.h5-dset2_conti-v.out.err - ./testfiles/h5repack_layout.h5-dset_compa_chunk-v.out - ./testfiles/h5repack_layout.h5-dset_compa_chunk-v.out.err - ./testfiles/h5repack_layout.h5-dset_compa_compa-v.out - ./testfiles/h5repack_layout.h5-dset_compa_compa-v.out.err - ./testfiles/h5repack_layout.h5-dset_compa_conti-v.out - ./testfiles/h5repack_layout.h5-dset_compa_conti-v.out.err - ./testfiles/h5repack_layout.h5-dset_conti_chunk-v.out - ./testfiles/h5repack_layout.h5-dset_conti_chunk-v.out.err - ./testfiles/h5repack_layout.h5-dset_conti_compa-v.out - ./testfiles/h5repack_layout.h5-dset_conti_compa-v.out.err - ./testfiles/h5repack_layout.h5-dset_conti_conti-v.out - ./testfiles/h5repack_layout.h5-dset_conti_conti-v.out.err - ./testfiles/h5repack_layout.h5-layout_long_switches-v.out - ./testfiles/h5repack_layout.h5-layout_long_switches-v.out.err - ./testfiles/h5repack_layout.h5-layout_short_switches-v.out - ./testfiles/h5repack_layout.h5-layout_short_switches-v.out.err - ./testfiles/h5repack_layout.h5-plugin_test.out - ./testfiles/h5repack_layout.h5-plugin_test.out.err - ./testfiles/h5repack_layout2.h5-contig_small_compa-v.out - ./testfiles/h5repack_layout2.h5-contig_small_compa-v.out.err - ./testfiles/h5repack_layout2.h5-contig_small_fixed_compa-v.out - ./testfiles/h5repack_layout2.h5-contig_small_fixed_compa-v.out.err - ./testfiles/h5repack_layout3.h5-ckdim_biger-v.out - ./testfiles/h5repack_layout3.h5-ckdim_biger-v.out.err - ./testfiles/h5repack_layout3.h5-ckdim_smaller-v.out - ./testfiles/h5repack_layout3.h5-ckdim_smaller-v.out.err - ./testfiles/h5repack_layout3.h5-chunk2chunk-v.out - ./testfiles/h5repack_layout3.h5-chunk2chunk-v.out.err - ./testfiles/h5repack_layout3.h5-chunk2compa-v.out - ./testfiles/h5repack_layout3.h5-chunk2compa-v.out.err - ./testfiles/h5repack_layout3.h5-chunk2conti-v.out - ./testfiles/h5repack_layout3.h5-chunk2conti-v.out.err - ./testfiles/h5repack_layout3.h5-error1-v.out - ./testfiles/h5repack_layout3.h5-error1-v.out.err - ./testfiles/h5repack_layout3.h5-error2-v.out - ./testfiles/h5repack_layout3.h5-error2-v.out.err - ./testfiles/h5repack_layout3.h5-error3-v.out - ./testfiles/h5repack_layout3.h5-error3-v.out.err - ./testfiles/out-family.tfamily%05d.h5 - ./testfiles/out-HDFFV-7840.h5diff_attr1.h5 - ./testfiles/out-attr.h5repack_attr.h5 - ./testfiles/out-native_attr.h5repack_attr.h5 - ./testfiles/out-HDFFV-5932.h5repack_attr_refs.h5 - ./testfiles/out-deflate_copy.h5repack_deflate.h5 - ./testfiles/out-deflate_remove.h5repack_deflate.h5 - ./testfiles/out-early.h5repack_early.h5 - ./testfiles/out-fill.h5repack_fill.h5 - ./testfiles/out-native_fill.h5repack_fill.h5 - ./testfiles/out-gzip_verbose_filters.h5repack_filters.h5 - ./testfiles/out-fletcher_copy.h5repack_fletcher.h5 - ./testfiles/out-fletcher_remove.h5repack_fletcher.h5 - ./testfiles/out-hlink.h5repack_hlink.h5 - ./testfiles/out-chunk_18x13.h5repack_layout.h5 - ./testfiles/out-chunk_20x10.h5repack_layout.h5 - ./testfiles/out-chunk_compa.h5repack_layout.h5 - ./testfiles/out-chunk_conti.h5repack_layout.h5 - ./testfiles/out-compa.h5repack_layout.h5 - ./testfiles/out-conti.h5repack_layout.h5 - ./testfiles/out-deflate_file.h5repack_layout.h5 - ./testfiles/out-deflate_limit.h5repack_layout.h5 - ./testfiles/out-dset2_chunk_20x10.h5repack_layout.h5 - ./testfiles/out-dset2_compa.h5repack_layout.h5 - ./testfiles/out-dset2_conti.h5repack_layout.h5 - ./testfiles/out-dset_compa_chunk.h5repack_layout.h5 - ./testfiles/out-dset_compa_compa.h5repack_layout.h5 - ./testfiles/out-dset_compa_conti.h5repack_layout.h5 - ./testfiles/out-dset_conti_chunk.h5repack_layout.h5 - ./testfiles/out-dset_conti_compa.h5repack_layout.h5 - ./testfiles/out-dset_conti_conti.h5repack_layout.h5 - ./testfiles/out-fletcher_all.h5repack_layout.h5 - ./testfiles/out-fletcher_individual.h5repack_layout.h5 - ./testfiles/out-global_filters.h5repack_layout.h5 - ./testfiles/out-gzip_all.h5repack_layout.h5 - ./testfiles/out-gzip_individual.h5repack_layout.h5 - ./testfiles/out-layout.h5repack_layout.h5 - ./testfiles/out-layout_long_switches.h5repack_layout.h5 - ./testfiles/out-layout_short_switches.h5repack_layout.h5 - ./testfiles/out-old_style_layout_short_switches.h5repack_layout.h5 - ./testfiles/out-plugin_test.h5repack_layout.h5 - ./testfiles/out-shuffle_all.h5repack_layout.h5 - ./testfiles/out-shuffle_individual.h5repack_layout.h5 - ./testfiles/out-upgrade_layout.h5repack_layouto.h5 - ./testfiles/out-contig_small_compa.h5repack_layout2.h5 - ./testfiles/out-contig_small_fixed_compa.h5repack_layout2.h5 - ./testfiles/out-ckdim_biger.h5repack_layout3.h5 - ./testfiles/out-ckdim_smaller.h5repack_layout3.h5 - ./testfiles/out-chunk2chunk.h5repack_layout3.h5 - ./testfiles/out-chunk2compa.h5repack_layout3.h5 - ./testfiles/out-chunk2conti.h5repack_layout3.h5 - ./testfiles/out-error1.h5repack_layout3.h5 - ./testfiles/out-error2.h5repack_layout3.h5 - ./testfiles/out-error3.h5repack_layout3.h5 - ./testfiles/out-error4.h5repack_layout3.h5 - ./testfiles/out-committed_dt.h5repack_named_dtypes.h5 - ./testfiles/out-nbit_add.h5repack_nbit.h5 - ./testfiles/out-nbit_copy.h5repack_nbit.h5 - ./testfiles/out-nbit_remove.h5repack_nbit.h5 - ./testfiles/out-add_alignment.h5repack_objs.h5 - ./testfiles/out-add_userblock.h5repack_objs.h5 - ./testfiles/out-objs.h5repack_objs.h5 - ./testfiles/out-gt_mallocsize.h5repack_objs.h5 - ./testfiles/out-bug1814.h5repack_refs.h5 - ./testfiles/out-shuffle_copy.h5repack_shuffle.h5 - ./testfiles/out-shuffle_remove.h5repack_shuffle.h5 - ./testfiles/out-scale_add.h5repack_soffset.h5 - ./testfiles/out-scale_copy.h5repack_soffset.h5 - ./testfiles/out-scale_remove.h5repack_soffset.h5 - ./testfiles/out-meta_short_M.meta_short.h5 - ./testfiles/out-meta_short_N.meta_short.h5 - ./testfiles/out-meta_long_M.meta_long.h5 - ./testfiles/out-meta_long_N.meta_long.h5 - ./testfiles/1_vds.h5-vds_dset_chunk20x10x5-v.out - ./testfiles/1_vds.h5-vds_dset_chunk20x10x5-v.out.err - ./testfiles/2_vds.h5-vds_chunk3x6x9-v.out - ./testfiles/2_vds.h5-vds_chunk3x6x9-v.out.err - ./testfiles/3_1_vds.h5-vds_chunk2x5x8-v.out - ./testfiles/3_1_vds.h5-vds_chunk2x5x8-v.out.err - ./testfiles/4_vds.h5-vds_compa-v.out - ./testfiles/4_vds.h5-vds_compa-v.out.err - ./testfiles/4_vds.h5-vds_conti-v.out - ./testfiles/4_vds.h5-vds_conti-v.out.err - ./testfiles/out-vds_compa.4_vds.h5 - ./testfiles/out-vds_conti.4_vds.h5 - ./testfiles/out-vds_chunk2x5x8.3_1_vds.h5 - ./testfiles/out-vds_chunk3x6x9.2_vds.h5 - ./testfiles/out-vds_dset_chunk20x10x5.1_vds.h5 - h5repack_attr.h5 - h5repack_attr_out.h5 - h5repack_attr_refs.h5 - h5repack_big.h5 - h5repack_deflate.h5 - h5repack_deflate_out.h5 - h5repack_early2.h5 - h5repack_early.h5 - h5repack_early_out.h5 - h5repack_ext.h5 - h5repack_ext_out.h5 - h5repack_fill.h5 - h5repack_fill_out.h5 - h5repack_filters.h5 - h5repack_filters_out.h5 - h5repack_fletcher.h5 - h5repack_fletcher_out.h5 - h5repack_hlink.h5 - h5repack_hlink_out.h5 - h5repack_layout.h5 - h5repack_layout_out.h5 - h5repack_layout2.h5 - h5repack_layout3.h5 - h5repack_named_dtypes.h5 - h5repack_named_dtypes_out.h5 - h5repack_nbit.h5 - h5repack_nbit_out.h5 - h5repack_objs.h5 - h5repack_objs_out.h5 - h5repack_refs.h5 - h5repack_shuffle.h5 - h5repack_shuffle_out.h5 - h5repack_soffset.h5 - h5repack_soffset_out.h5 - h5repack_szip.h5 - h5repack_szip_out.h5 - h5repack_ub.h5 - h5repack_ub_out.h5 - h5repack_ext.bin - ublock.bin - ) - if (NOT "${last_test}" STREQUAL "") - set_tests_properties (H5REPACK-clearall-objects PROPERTIES DEPENDS ${last_test}) + if (HDF5_ENABLE_USING_MEMCHECKER) + # Remove any output file left over from previous test run + set (LIST_TO_CLEAR + h5dump-help.out + h5repack_layout.h5-chunk_18x13-v.out + h5repack_layout.h5-chunk_18x13-v.out.err + h5repack_layout.h5-chunk_20x10-v.out + h5repack_layout.h5-chunk_20x10-v.out.err + h5repack_layout.h5-chunk_compa-v.out + h5repack_layout.h5-chunk_compa-v.out.err + h5repack_layout.h5-chunk_conti-v.out + h5repack_layout.h5-chunk_conti-v.out.err + h5repack_layout.h5-compa-v.out + h5repack_layout.h5-compa-v.out.err + h5repack_layout.h5-conti-v.out + h5repack_layout.h5-conti-v.out.err + h5repack_layout.h5-deflate_limit.out + h5repack_layout.h5-deflate_limit.out.err + h5repack_layout.h5-dset2_chunk_20x10-v.out + h5repack_layout.h5-dset2_chunk_20x10-v.out.err + h5repack_layout.h5-dset2_chunk_20x10-errstk.out + h5repack_layout.h5-dset2_chunk_20x10-errstk.out.err + h5repack_layout.h5-dset2_compa-v.out + h5repack_layout.h5-dset2_compa-v.out.err + h5repack_layout.h5-dset2_conti-v.out + h5repack_layout.h5-dset2_conti-v.out.err + h5repack_layout.h5-dset_compa_chunk-v.out + h5repack_layout.h5-dset_compa_chunk-v.out.err + h5repack_layout.h5-dset_compa_compa-v.out + h5repack_layout.h5-dset_compa_compa-v.out.err + h5repack_layout.h5-dset_compa_conti-v.out + h5repack_layout.h5-dset_compa_conti-v.out.err + h5repack_layout.h5-dset_conti_chunk-v.out + h5repack_layout.h5-dset_conti_chunk-v.out.err + h5repack_layout.h5-dset_conti_compa-v.out + h5repack_layout.h5-dset_conti_compa-v.out.err + h5repack_layout.h5-dset_conti_conti-v.out + h5repack_layout.h5-dset_conti_conti-v.out.err + h5repack_layout.h5-layout_long_switches-v.out + h5repack_layout.h5-layout_long_switches-v.out.err + h5repack_layout.h5-layout_short_switches-v.out + h5repack_layout.h5-layout_short_switches-v.out.err + h5repack_layout.h5-plugin_test.out + h5repack_layout.h5-plugin_test.out.err + h5repack_layout2.h5-contig_small_compa-v.out + h5repack_layout2.h5-contig_small_compa-v.out.err + h5repack_layout2.h5-contig_small_fixed_compa-v.out + h5repack_layout2.h5-contig_small_fixed_compa-v.out.err + h5repack_layout3.h5-ckdim_biger-v.out + h5repack_layout3.h5-ckdim_biger-v.out.err + h5repack_layout3.h5-ckdim_smaller-v.out + h5repack_layout3.h5-ckdim_smaller-v.out.err + h5repack_layout3.h5-chunk2chunk-v.out + h5repack_layout3.h5-chunk2chunk-v.out.err + h5repack_layout3.h5-chunk2compa-v.out + h5repack_layout3.h5-chunk2compa-v.out.err + h5repack_layout3.h5-chunk2conti-v.out + h5repack_layout3.h5-chunk2conti-v.out.err + h5repack_layout3.h5-error1-v.out + h5repack_layout3.h5-error1-v.out.err + h5repack_layout3.h5-error2-v.out + h5repack_layout3.h5-error2-v.out.err + h5repack_layout3.h5-error3-v.out + h5repack_layout3.h5-error3-v.out.err + out-family.tfamily%05d.h5 + out-HDFFV-7840.h5diff_attr1.h5 + out-attr.h5repack_attr.h5 + out-native_attr.h5repack_attr.h5 + out-HDFFV-5932.h5repack_attr_refs.h5 + out-deflate_copy.h5repack_deflate.h5 + out-deflate_remove.h5repack_deflate.h5 + out-early.h5repack_early.h5 + out-fill.h5repack_fill.h5 + out-native_fill.h5repack_fill.h5 + out-gzip_verbose_filters.h5repack_filters.h5 + out-fletcher_copy.h5repack_fletcher.h5 + out-fletcher_remove.h5repack_fletcher.h5 + out-hlink.h5repack_hlink.h5 + out-chunk_18x13.h5repack_layout.h5 + out-chunk_20x10.h5repack_layout.h5 + out-chunk_compa.h5repack_layout.h5 + out-chunk_conti.h5repack_layout.h5 + out-compa.h5repack_layout.h5 + out-conti.h5repack_layout.h5 + out-deflate_file.h5repack_layout.h5 + out-deflate_limit.h5repack_layout.h5 + out-dset2_chunk_20x10.h5repack_layout.h5 + out-dset2_compa.h5repack_layout.h5 + out-dset2_conti.h5repack_layout.h5 + out-dset_compa_chunk.h5repack_layout.h5 + out-dset_compa_compa.h5repack_layout.h5 + out-dset_compa_conti.h5repack_layout.h5 + out-dset_conti_chunk.h5repack_layout.h5 + out-dset_conti_compa.h5repack_layout.h5 + out-dset_conti_conti.h5repack_layout.h5 + out-fletcher_all.h5repack_layout.h5 + out-fletcher_individual.h5repack_layout.h5 + out-global_filters.h5repack_layout.h5 + out-gzip_all.h5repack_layout.h5 + out-gzip_individual.h5repack_layout.h5 + out-layout.h5repack_layout.h5 + out-layout_long_switches.h5repack_layout.h5 + out-layout_short_switches.h5repack_layout.h5 + out-old_style_layout_short_switches.h5repack_layout.h5 + out-plugin_test.h5repack_layout.h5 + out-shuffle_all.h5repack_layout.h5 + out-shuffle_individual.h5repack_layout.h5 + out-upgrade_layout.h5repack_layouto.h5 + out-contig_small_compa.h5repack_layout2.h5 + out-contig_small_fixed_compa.h5repack_layout2.h5 + out-ckdim_biger.h5repack_layout3.h5 + out-ckdim_smaller.h5repack_layout3.h5 + out-chunk2chunk.h5repack_layout3.h5 + out-chunk2compa.h5repack_layout3.h5 + out-chunk2conti.h5repack_layout3.h5 + out-error1.h5repack_layout3.h5 + out-error2.h5repack_layout3.h5 + out-error3.h5repack_layout3.h5 + out-error4.h5repack_layout3.h5 + out-committed_dt.h5repack_named_dtypes.h5 + out-nbit_add.h5repack_nbit.h5 + out-nbit_copy.h5repack_nbit.h5 + out-nbit_remove.h5repack_nbit.h5 + out-add_alignment.h5repack_objs.h5 + out-add_userblock.h5repack_objs.h5 + out-objs.h5repack_objs.h5 + out-gt_mallocsize.h5repack_objs.h5 + out-bug1814.h5repack_refs.h5 + out-shuffle_copy.h5repack_shuffle.h5 + out-shuffle_remove.h5repack_shuffle.h5 + out-scale_add.h5repack_soffset.h5 + out-scale_copy.h5repack_soffset.h5 + out-scale_remove.h5repack_soffset.h5 + out-meta_short_M.meta_short.h5 + out-meta_short_N.meta_short.h5 + out-meta_long_M.meta_long.h5 + out-meta_long_N.meta_long.h5 + out-vds_compa.4_vds.h5 + out-vds_conti.4_vds.h5 + out-vds_chunk2x5x8.3_1_vds.h5 + out-vds_chunk3x6x9.2_vds.h5 + out-vds_dset_chunk20x10x5.1_vds.h5 + ) + + set (LIST_TO_CLEAR ${LIST_TO_CLEAR} ${LIST_OTHER_TEST_FILES}) + + foreach (h5_file ${LIST_HDF5_TEST_FILES}) + get_filename_component(fname "${h5_file}" NAME) + set (LIST_TO_CLEAR ${LIST_TO_CLEAR} + ${h5_file}.h5 + ) + endforeach () + + foreach (h5_file ${LIST_TST_TEST_FILES}) + get_filename_component(fname "${h5_file}" NAME) + set (LIST_TO_CLEAR ${LIST_TO_CLEAR} + ${h5_file}.tst.out + ${h5_file}.tst.out.err + ) + endforeach () + + foreach (h5_file ${LIST_DDL_TEST_FILES}) + get_filename_component(fname "${h5_file}" NAME) + set (LIST_TO_CLEAR ${LIST_TO_CLEAR} + ${h5_file}.ddl.out + ${h5_file}.ddl.out.err + ) + endforeach () + add_test ( + NAME H5REPACK-clearall-objects + COMMAND ${CMAKE_COMMAND} -E remove ${LIST_TO_CLEAR} + ) + set_tests_properties (H5REPACK-clearall-objects PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles") + if (NOT "${last_test}" STREQUAL "") + set_tests_properties (H5REPACK-clearall-objects PROPERTIES DEPENDS ${last_test}) + endif () endif () ADD_HELP_TEST(help 0 -h) @@ -807,17 +908,17 @@ # filters are defined. # detect whether the encoder is present. - set (USE_FILTER_SZIP_ENCODER "no") +# set (USE_FILTER_SZIP_ENCODER 0) if (HDF5_ENABLE_SZIP_ENCODING) set (USE_FILTER_SZIP_ENCODER ${testh5repack_detect_szip}) endif () if (H5_HAVE_FILTER_DEFLATE) - set (USE_FILTER_DEFLATE "true") + set (USE_FILTER_DEFLATE 1) endif () if (H5_HAVE_FILTER_SZIP) - set (USE_FILTER_SZIP "true") + set (USE_FILTER_SZIP 1) endif () # copy files (these files have no filters) @@ -856,16 +957,20 @@ # szip with individual object set (arg ${FILE4} -f dset2:SZIP=8,EC -l dset2:CHUNK=20x10) set (TESTTYPE "TEST") - if (NOT USE_FILTER_SZIP_ENCODER OR NOT USE_FILTER_SZIP) - set (TESTTYPE "SKIP") + if (NOT USE_FILTER_SZIP_ENCODER) + if (NOT USE_FILTER_SZIP) + set (TESTTYPE "SKIP") + endif () endif () ADD_H5_TEST (szip_individual ${TESTTYPE} ${arg}) # szip for all set (arg ${FILE4} -f SZIP=8,NN) set (TESTTYPE "TEST") - if (NOT USE_FILTER_SZIP_ENCODER OR NOT USE_FILTER_SZIP) - set (TESTTYPE "SKIP") + if (NOT USE_FILTER_SZIP_ENCODER) + if (NOT USE_FILTER_SZIP) + set (TESTTYPE "SKIP") + endif () endif () ADD_H5_TEST (szip_all ${TESTTYPE} ${arg}) @@ -888,8 +993,10 @@ # all filters set (arg ${FILE4} -f dset2:SHUF -f dset2:FLET -f dset2:SZIP=8,NN -f dset2:GZIP=1 -l dset2:CHUNK=20x10) set (TESTTYPE "TEST") - if (NOT USE_FILTER_SZIP_ENCODER OR NOT USE_FILTER_SZIP OR NOT USE_FILTER_DEFLATE) - set (TESTTYPE "SKIP") + if (NOT USE_FILTER_SZIP_ENCODER) + if (NOT USE_FILTER_SZIP OR NOT USE_FILTER_DEFLATE) + set (TESTTYPE "SKIP") + endif () endif () ADD_H5_TEST (all_filters ${TESTTYPE} ${arg}) @@ -908,16 +1015,20 @@ # szip copy set (arg ${FILE7}) set (TESTTYPE "TEST") - if (NOT USE_FILTER_SZIP_ENCODER OR NOT USE_FILTER_SZIP) - set (TESTTYPE "SKIP") + if (NOT USE_FILTER_SZIP_ENCODER) + if (NOT USE_FILTER_SZIP) + set (TESTTYPE "SKIP") + endif () endif () ADD_H5_TEST (szip_copy ${TESTTYPE} ${arg}) # szip remove set (arg ${FILE7} --filter=dset_szip:NONE) set (TESTTYPE "TEST") - if (NOT USE_FILTER_SZIP_ENCODER OR NOT USE_FILTER_SZIP) - set (TESTTYPE "SKIP") + if (NOT USE_FILTER_SZIP_ENCODER) + if (NOT USE_FILTER_SZIP) + set (TESTTYPE "SKIP") + endif () endif () ADD_H5_TEST (szip_remove ${TESTTYPE} ${arg}) @@ -980,23 +1091,29 @@ # remove all filters set (arg ${FILE11} -f NONE) set (TESTTYPE "TEST") - if (NOT USE_FILTER_DEFLATE OR NOT USE_FILTER_SZIP OR NOT USE_FILTER_SZIP_ENCODER) - set (TESTTYPE "SKIP") + if (NOT USE_FILTER_SZIP_ENCODER) + if (NOT USE_FILTER_SZIP OR NOT USE_FILTER_DEFLATE) + set (TESTTYPE "SKIP") + endif () endif () ADD_H5_TEST (remove_all ${TESTTYPE} ${arg}) #filter conversions set (arg ${FILE8} -f dset_deflate:SZIP=8,NN) set (TESTTYPE "TEST") - if (NOT USE_FILTER_SZIP_ENCODER OR NOT USE_FILTER_SZIP OR NOT USE_FILTER_DEFLATE) - set (TESTTYPE "SKIP") + if (NOT USE_FILTER_SZIP_ENCODER) + if (NOT USE_FILTER_SZIP OR NOT USE_FILTER_DEFLATE) + set (TESTTYPE "SKIP") + endif () endif () ADD_H5_TEST (deflate_convert ${TESTTYPE} ${arg}) set (arg ${FILE7} -f dset_szip:GZIP=1) set (TESTTYPE "TEST") - if (NOT USE_FILTER_SZIP OR NOT USE_FILTER_SZIP_ENCODER OR NOT USE_FILTER_DEFLATE) - set (TESTTYPE "SKIP") + if (NOT USE_FILTER_SZIP_ENCODER) + if (NOT USE_FILTER_SZIP OR NOT USE_FILTER_DEFLATE) + set (TESTTYPE "SKIP") + endif () endif () ADD_H5_TEST (szip_convert ${TESTTYPE} ${arg}) @@ -1264,7 +1381,7 @@ if (WIN32) set (TESTRETVAL -1) endif () - ADD_H5_CMP_TEST (plugin_zero "" "TEST" ${TESTRETVAL} h5repack_layout.h5 -v -f UD=250,0,0) + ADD_H5_UD_TEST (plugin_zero ${TESTRETVAL} h5repack_layout.h5 -v -f UD=250,0,0) if (HDF5_TEST_VFD) # Run test with different Virtual File Driver diff --git a/tools/test/h5repack/testfiles/h5repack_layout.h5-plugin_zero.ddl b/tools/test/h5repack/testfiles/h5repack_layout.h5-plugin_zero.ddl new file mode 100644 index 0000000..97cbfc0 --- /dev/null +++ b/tools/test/h5repack/testfiles/h5repack_layout.h5-plugin_zero.ddl @@ -0,0 +1,4 @@ +HDF5 "out-plugin_zero.h5repack_layout.h5" { +GROUP "/" { +} +} diff --git a/tools/test/h5repack/testfiles/h5repack_layout.h5-plugin_zero.tst b/tools/test/h5repack/testfiles/h5repack_layout.h5-plugin_zero.tst deleted file mode 100644 index 0993d5b..0000000 --- a/tools/test/h5repack/testfiles/h5repack_layout.h5-plugin_zero.tst +++ /dev/null @@ -1,9 +0,0 @@ -Objects to modify layout are... -Objects to apply filter are... - User Defined 250 -Making file ... ------------------------------------------ - Type Filter (Compression) Name ------------------------------------------ - group / -h5repack error: : Could not copy data to: out-plugin_zero.h5repack_layout.h5 diff --git a/tools/test/h5repack/testfiles/plugin_zero.h5repack_layout.h5.tst b/tools/test/h5repack/testfiles/plugin_zero.h5repack_layout.h5.tst new file mode 100644 index 0000000..20f8a40 --- /dev/null +++ b/tools/test/h5repack/testfiles/plugin_zero.h5repack_layout.h5.tst @@ -0,0 +1,7 @@ +Objects to modify layout are... +Objects to apply filter are... + User Defined 250 +----------------------------------------- + Type Filter (Compression) Name +----------------------------------------- + group / diff --git a/tools/test/h5stat/CMakeTests.cmake b/tools/test/h5stat/CMakeTests.cmake index cd52886..8d796ad 100644 --- a/tools/test/h5stat/CMakeTests.cmake +++ b/tools/test/h5stat/CMakeTests.cmake @@ -20,37 +20,37 @@ # Copy all the HDF5 files from the test directory into the source directory # -------------------------------------------------------------------- set (HDF5_REFERENCE_FILES - h5stat_help1.ddl - h5stat_help2.ddl - h5stat_notexist.ddl - h5stat_nofile.ddl - h5stat_filters.ddl - h5stat_filters-file.ddl - h5stat_filters-F.ddl - h5stat_filters-d.ddl - h5stat_filters-g.ddl - h5stat_filters-dT.ddl - h5stat_filters-UD.ddl - h5stat_filters-UT.ddl - h5stat_tsohm.ddl - h5stat_newgrat.ddl - h5stat_newgrat-UG.ddl - h5stat_newgrat-UA.ddl - h5stat_err1_links.ddl - h5stat_links1.ddl - h5stat_links2.ddl - h5stat_links3.ddl - h5stat_links4.ddl - h5stat_links5.ddl - h5stat_err1_dims.ddl - h5stat_dims1.ddl - h5stat_dims2.ddl - h5stat_err1_numattrs.ddl - h5stat_err2_numattrs.ddl - h5stat_numattrs1.ddl - h5stat_numattrs2.ddl - h5stat_numattrs3.ddl - h5stat_numattrs4.ddl + h5stat_help1 + h5stat_help2 + h5stat_notexist + h5stat_nofile + h5stat_filters + h5stat_filters-file + h5stat_filters-F + h5stat_filters-d + h5stat_filters-g + h5stat_filters-dT + h5stat_filters-UD + h5stat_filters-UT + h5stat_tsohm + h5stat_newgrat + h5stat_newgrat-UG + h5stat_newgrat-UA + h5stat_err1_links + h5stat_links1 + h5stat_links2 + h5stat_links3 + h5stat_links4 + h5stat_links5 + h5stat_err1_dims + h5stat_dims1 + h5stat_dims2 + h5stat_err1_numattrs + h5stat_err2_numattrs + h5stat_numattrs1 + h5stat_numattrs2 + h5stat_numattrs3 + h5stat_numattrs4 ) set (HDF5_REFERENCE_TEST_FILES h5stat_filters.h5 @@ -60,7 +60,7 @@ ) foreach (ddl_file ${HDF5_REFERENCE_FILES}) - HDFTEST_COPY_FILE("${HDF5_TOOLS_TEST_H5STAT_SOURCE_DIR}/testfiles/${ddl_file}" "${PROJECT_BINARY_DIR}/${ddl_file}" "h5stat_files") + HDFTEST_COPY_FILE("${HDF5_TOOLS_TEST_H5STAT_SOURCE_DIR}/testfiles/${ddl_file}.ddl" "${PROJECT_BINARY_DIR}/${ddl_file}.ddl" "h5stat_files") endforeach () foreach (h5_file ${HDF5_REFERENCE_TEST_FILES}) @@ -78,7 +78,7 @@ # If using memchecker add tests without using scripts if (HDF5_ENABLE_USING_MEMCHECKER) add_test (NAME H5STAT-${resultfile} COMMAND $ ${ARGN}) - if (NOT ${resultcode} STREQUAL "0") + if (NOT "${resultcode}" STREQUAL "0") set_tests_properties (H5STAT-${resultfile} PROPERTIES WILL_FAIL "true") endif () if (NOT "${last_test}" STREQUAL "") @@ -86,6 +86,16 @@ endif () else (HDF5_ENABLE_USING_MEMCHECKER) add_test ( + NAME H5STAT-${resultfile}-clear-objects + COMMAND ${CMAKE_COMMAND} + -E remove + ${resultfile}.out + ${resultfile}.out.err + ) + if (NOT "${last_test}" STREQUAL "") + set_tests_properties (H5STAT-${resultfile}-clear-objects PROPERTIES DEPENDS ${last_test}) + endif () + add_test ( NAME H5STAT-${resultfile} COMMAND "${CMAKE_COMMAND}" -D "TEST_PROGRAM=$" @@ -96,6 +106,7 @@ -D "TEST_REFERENCE=${resultfile}.ddl" -P "${HDF_RESOURCES_EXT_DIR}/runTest.cmake" ) + set_tests_properties (H5STAT-${resultfile} PROPERTIES DEPENDS H5STAT-${resultfile}-clear-objects) endif () endmacro () @@ -107,72 +118,13 @@ if (HDF5_ENABLE_USING_MEMCHECKER) # Remove any output file left over from previous test run + foreach (ddl_file ${HDF5_REFERENCE_FILES}) + set (CLEAR_LIST ${CLEAR_LIST} ${ddl_file}.out ${ddl_file}.out.err) + endforeach () add_test ( NAME H5STAT-clearall-objects COMMAND ${CMAKE_COMMAND} - -E remove - h5stat_help1.out - h5stat_help1.out.err - h5stat_help2.out - h5stat_help2.out.err - h5stat_notexist.out - h5stat_notexist.out.err - h5stat_nofile.out - h5stat_nofile.out.err - h5stat_filters.out - h5stat_filters.out.err - h5stat_filters-file.out - h5stat_filters-file.out.err - h5stat_filters-F.out - h5stat_filters-F.out.err - h5stat_filters-d.out - h5stat_filters-d.out.err - h5stat_filters-g.out - h5stat_filters-g.out.err - h5stat_filters-dT.out - h5stat_filters-dT.out.err - h5stat_filters-UD.out - h5stat_filters-UD.out.err - h5stat_filters-UT.out - h5stat_filters-UT.out.err - h5stat_tsohm.out - h5stat_tsohm.out.err - h5stat_newgrat.out - h5stat_newgrat.out.err - h5stat_newgrat-UG.out - h5stat_newgrat-UG.out.err - h5stat_newgrat-UA.out - h5stat_newgrat-UA.out.err - h5stat_err1_links.out - h5stat_err1_links.out.err - h5stat_links1.out - h5stat_links1.out.err - h5stat_links2.out - h5stat_links2.out.err - h5stat_links3.out - h5stat_links3.out.err - h5stat_links4.out - h5stat_links4.out.err - h5stat_links5.out - h5stat_links5.out.err - h5stat_err1_dims.out - h5stat_err1_dims.out.err - h5stat_dims1.out - h5stat_dims1.out.err - h5stat_dims2.out - h5stat_dims2.out.err - h5stat_err1_numattrs.out - h5stat_err1_numattrs.out.err - h5stat_err2_numattrs.out - h5stat_err2_numattrs.out.err - h5stat_numattrs1.out - h5stat_numattrs1.out.err - h5stat_numattrs2.out - h5stat_numattrs2.out.err - h5stat_numattrs3.out - h5stat_numattrs3.out.err - h5stat_numattrs4.out - h5stat_numattrs4.out.err + -E remove ${CLEAR_LIST} ) if (NOT "${last_test}" STREQUAL "") set_tests_properties (H5STAT-clearall-objects PROPERTIES DEPENDS ${last_test}) diff --git a/tools/test/misc/CMakeTestsClear.cmake b/tools/test/misc/CMakeTestsClear.cmake index 7eba4a1..b9095fb 100644 --- a/tools/test/misc/CMakeTestsClear.cmake +++ b/tools/test/misc/CMakeTestsClear.cmake @@ -61,8 +61,8 @@ NAME H5CLEAR_CMP-${testname}-clear-objects COMMAND ${CMAKE_COMMAND} -E remove - ${testname}.out - ${testname}.out.err + testfiles/${testname}.out + testfiles/${testname}.out.err ) add_test ( NAME H5CLEAR_CMP-${testname} @@ -94,34 +94,36 @@ endif () endmacro () - macro (ADD_H5_TEST testname resultcode) + macro (ADD_H5_TEST testname testfile resultcode) if (NOT HDF5_ENABLE_USING_MEMCHECKER) add_test ( - NAME H5CLEAR-clear_open_chk-copy_${testname}.h5 + NAME H5CLEAR-clr_open_chk-copy_${testname}.h5 COMMAND ${CMAKE_COMMAND} -E copy_if_different - "${PROJECT_SOURCE_DIR}/testfiles/${testname}.h5" "${PROJECT_BINARY_DIR}/testfiles/${testname}.h5" + "${PROJECT_SOURCE_DIR}/testfiles/${testfile}.h5" "${PROJECT_BINARY_DIR}/testfiles/${testfile}.h5" ) if (NOT "${last_test}" STREQUAL "") - set_tests_properties (H5CLEAR-clear_open_chk-copy_${testname}.h5 PROPERTIES DEPENDS ${last_test}) + set_tests_properties (H5CLEAR-clr_open_chk-copy_${testname}.h5 PROPERTIES DEPENDS ${last_test}) endif () - set (last_test "H5CLEAR-clear_open_chk-copy_${testname}.h5") + set (last_test "H5CLEAR-clr_open_chk-copy_${testname}.h5") + # Initial file open fails OR # File open succeeds because the library does not check status_flags for file with < v3 superblock - add_test (NAME H5CLEAR-clear_open_chk-${testname}_${resultcode} COMMAND $ ${testname}.h5) - set_tests_properties (H5CLEAR-clear_open_chk-${testname}_${resultcode} PROPERTIES WILL_FAIL "${resultcode}") - set_tests_properties (H5CLEAR-clear_open_chk-${testname}_${resultcode} PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles") + add_test (NAME H5CLEAR-clr_open_chk-${testname}_${resultcode} COMMAND $ ${testfile}.h5) + set_tests_properties (H5CLEAR-clr_open_chk-${testname}_${resultcode} PROPERTIES WILL_FAIL "${resultcode}") + set_tests_properties (H5CLEAR-clr_open_chk-${testname}_${resultcode} PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles") if (NOT "${last_test}" STREQUAL "") - set_tests_properties (H5CLEAR-clear_open_chk-${testname}_${resultcode} PROPERTIES DEPENDS ${last_test}) + set_tests_properties (H5CLEAR-clr_open_chk-${testname}_${resultcode} PROPERTIES DEPENDS ${last_test}) endif () + # After "h5clear" the file, the subsequent file open succeeds - add_test (NAME H5CLEAR-h5clear-${testname} COMMAND $ -s ${testname}.h5) - set_tests_properties (H5CLEAR-h5clear-${testname} PROPERTIES DEPENDS H5CLEAR-clear_open_chk-${testname}_${resultcode}) - set_tests_properties (H5CLEAR-h5clear-${testname} PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles") - add_test (NAME H5CLEAR-clear_open_chk-${testname} COMMAND $ ${testname}.h5) - set_tests_properties (H5CLEAR-clear_open_chk-${testname} PROPERTIES DEPENDS H5CLEAR-h5clear-${testname}) - set_tests_properties (H5CLEAR-clear_open_chk-${testname} PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles") - set (last_test "H5CLEAR-clear_open_chk-${testname}") + add_test (NAME H5CLEAR-h5clr-${testname} COMMAND $ -s ${testfile}.h5) + set_tests_properties (H5CLEAR-h5clr-${testname} PROPERTIES DEPENDS H5CLEAR-clr_open_chk-${testname}_${resultcode}) + set_tests_properties (H5CLEAR-h5clr-${testname} PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles") + add_test (NAME H5CLEAR-clr_open_chk-${testname} COMMAND $ ${testfile}.h5) + set_tests_properties (H5CLEAR-clr_open_chk-${testname} PROPERTIES DEPENDS H5CLEAR-h5clr-${testname}) + set_tests_properties (H5CLEAR-clr_open_chk-${testname} PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles") + set (last_test "H5CLEAR-clr_open_chk-${testname}") endif () endmacro () @@ -185,15 +187,15 @@ if (HDF5_ENABLE_USING_MEMCHECKER) endforeach () # make second copy of mod_h5clear_mdc_image.h5 add_test ( - NAME H5CLEAR-copy_mod_h5clear_mdc_image2.h5 + NAME H5CLEAR-copy_mod_h5clr_mdc_image2.h5 COMMAND ${CMAKE_COMMAND} -E copy_if_different "${PROJECT_SOURCE_DIR}/testfiles/mod_h5clear_mdc_image.h5" "${PROJECT_BINARY_DIR}/testfiles/mod_h5clear_mdc_image2.h5" ) if (NOT "${last_test}" STREQUAL "") - set_tests_properties (H5CLEAR-copy_mod_h5clear_mdc_image2.h5 PROPERTIES DEPENDS ${last_test}) + set_tests_properties (H5CLEAR-copy_mod_h5clr_mdc_image2.h5 PROPERTIES DEPENDS ${last_test}) endif () - set (last_test "H5CLEAR-copy_mod_h5clear_mdc_image2.h5") + set (last_test "H5CLEAR-copy_mod_h5clr_mdc_image2.h5") endif() # @@ -210,16 +212,16 @@ endif() # "h5clear -m -s junk.h5" (valid 2 options, nonexisting file) # "h5clear -m orig_h5clear_sec2_v2.h5" (valid 1 option, existing file, no cache image) # "h5clear -s -m orig_h5clear_sec2_v0.h5" (valid 2 options, existing file, no cache image) - ADD_H5_CMP (h5clear_usage_h h5clear_usage 0 "-h") - ADD_H5_CMP (h5clear_usage h5clear_usage 1 "") - ADD_H5_CMP (h5clear_usage_junk h5clear_usage 1 "" junk.h5) - ADD_H5_CMP (h5clear_usage_none h5clear_usage 1 "" orig_h5clear_sec2_v3.h5) - ADD_H5_CMP (h5clear_missing_file_m h5clear_missing_file 1 "-m") - ADD_H5_CMP (h5clear_open_fail_s h5clear_open_fail 1 "-s" junk.h5) - ADD_H5_CMP (h5clear_missing_file_ms h5clear_missing_file 1 "-m" "-s") - ADD_H5_CMP (h5clear_open_fail_ms h5clear_open_fail 1 "-m" "-s" junk.h5) - ADD_H5_CMP (h5clear_no_mdc_image_m h5clear_no_mdc_image 0 "-m" orig_h5clear_sec2_v2.h5) - ADD_H5_CMP (h5clear_no_mdc_image_ms h5clear_no_mdc_image 0 "-s" "-m" orig_h5clear_sec2_v0.h5) + ADD_H5_CMP (h5clr_usage_h h5clear_usage 0 "-h") + ADD_H5_CMP (h5clr_usage h5clear_usage 1 "") + ADD_H5_CMP (h5clr_usage_junk h5clear_usage 1 "" junk.h5) + ADD_H5_CMP (h5clr_usage_none h5clear_usage 1 "" orig_h5clear_sec2_v3.h5) + ADD_H5_CMP (h5clr_missing_file_m h5clear_missing_file 1 "-m") + ADD_H5_CMP (h5clr_open_fail_s h5clear_open_fail 1 "-s" junk.h5) + ADD_H5_CMP (h5clr_missing_file_ms h5clear_missing_file 1 "-m" "-s") + ADD_H5_CMP (h5clr_open_fail_ms h5clear_open_fail 1 "-m" "-s" junk.h5) + ADD_H5_CMP (h5clr_no_mdc_image_m h5clear_no_mdc_image 0 "-m" orig_h5clear_sec2_v2.h5) + ADD_H5_CMP (h5clr_no_mdc_image_ms h5clear_no_mdc_image 0 "-s" "-m" orig_h5clear_sec2_v0.h5) # # # @@ -235,30 +237,30 @@ endif() # "h5clear -l -m junk.h5" (invalid/valid 2 options, nonexisting file, fail exit code) # "h5clear -m -l h5clear_sec2_v0.h5" (valid/invalid 2 options, existing file, fail exit code) # "h5clear -l -m h5clear_sec2_v0.h5" (invalid/valid 2 options, existing file, fail exit code) - ADD_H5_RETTEST (h5clear_mdc_image "false" "-m" h5clear_mdc_image.h5) - ADD_H5_RETTEST (h5clear_vers "false" "--vers") - ADD_H5_RETTEST (h5clear_k "true" "-k") - ADD_H5_RETTEST (h5clear_k_junk "true" "-k" junk.h5) - ADD_H5_RETTEST (h5clear_l_sec2 "true" "-l" h5clear_sec2_v2.h5) - ADD_H5_RETTEST (h5clear_mk "true" "-m" "-k") - ADD_H5_RETTEST (h5clear_lm "true" "-l" "-m") - ADD_H5_RETTEST (h5clear_ml_junk "true" "-m" "-l" junk.h5) - ADD_H5_RETTEST (h5clear_lm_junk "true" "-l" "-m" junk.h5) - ADD_H5_RETTEST (h5clear_ml_sec2 "true" "-m" "-l" h5clear_sec2_v0.h5) - ADD_H5_RETTEST (h5clear_lm_sec2 "true" "-l" "-m" h5clear_sec2_v0.h5) + ADD_H5_RETTEST (h5clr_mdc_image "false" "-m" h5clear_mdc_image.h5) + ADD_H5_RETTEST (h5clr_vers "false" "--vers") + ADD_H5_RETTEST (h5clr_k "true" "-k") + ADD_H5_RETTEST (h5clr_k_junk "true" "-k" junk.h5) + ADD_H5_RETTEST (h5clr_l_sec2 "true" "-l" h5clear_sec2_v2.h5) + ADD_H5_RETTEST (h5clr_mk "true" "-m" "-k") + ADD_H5_RETTEST (h5clr_lm "true" "-l" "-m") + ADD_H5_RETTEST (h5clr_ml_junk "true" "-m" "-l" junk.h5) + ADD_H5_RETTEST (h5clr_lm_junk "true" "-l" "-m" junk.h5) + ADD_H5_RETTEST (h5clr_ml_sec2 "true" "-m" "-l" h5clear_sec2_v0.h5) + ADD_H5_RETTEST (h5clr_lm_sec2 "true" "-l" "-m" h5clear_sec2_v0.h5) # # # # h5clear_mdc_image.h5 already has cache image removed earlier, verify the expected warning from h5clear: - ADD_H5_CMP (h5clear_mdc_image_m h5clear_no_mdc_image 0 "-m" mod_h5clear_mdc_image.h5) - ADD_H5_CMP (h5clear_mdc_image_sm h5clear_no_mdc_image 0 "-s" "-m" mod_h5clear_mdc_image2.h5) + ADD_H5_CMP (h5clr_mdc_image_m h5clear_no_mdc_image 0 "-m" mod_h5clear_mdc_image.h5) + ADD_H5_CMP (h5clr_mdc_image_sm h5clear_no_mdc_image 0 "-s" "-m" mod_h5clear_mdc_image2.h5) # # # # The following are tests to verify the status_flags field is cleared properly: - ADD_H5_TEST (h5clear_sec2_v3 "true") - ADD_H5_TEST (h5clear_log_v3 "true") - ADD_H5_TEST (latest_h5clear_sec2_v3 "true") - ADD_H5_TEST (latest_h5clear_log_v3 "true") - ADD_H5_TEST (h5clear_sec2_v0 "false") - ADD_H5_TEST (h5clear_sec2_v2 "false") + ADD_H5_TEST (h5clr_sec2_v3 h5clear_sec2_v3 "true") + ADD_H5_TEST (h5clr_log_v3 h5clear_log_v3 "true") + ADD_H5_TEST (latest_h5clr_sec2_v3 latest_h5clear_sec2_v3 "true") + ADD_H5_TEST (latest_h5clr_log_v3 latest_h5clear_log_v3 "true") + ADD_H5_TEST (h5clr_sec2_v0 h5clear_sec2_v0 "false") + ADD_H5_TEST (h5clr_sec2_v2 h5clear_sec2_v2 "false") diff --git a/tools/test/misc/CMakeTestsMkgrp.cmake b/tools/test/misc/CMakeTestsMkgrp.cmake index 7011b19..e99983b 100644 --- a/tools/test/misc/CMakeTestsMkgrp.cmake +++ b/tools/test/misc/CMakeTestsMkgrp.cmake @@ -61,6 +61,8 @@ COMMAND ${CMAKE_COMMAND} -E remove ${resultfile}.h5 + ${resultfile}.out + ${resultfile}.out.err ) set_tests_properties (H5MKGRP-${resultfile}-clear-objects PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles") endif () @@ -101,6 +103,8 @@ COMMAND ${CMAKE_COMMAND} -E remove ${resultfile}.h5 + ${resultfile}.out + ${resultfile}.out.err ) set_tests_properties (H5MKGRP_CMP-${resultfile}-clear-objects PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles") add_test ( diff --git a/tools/test/perform/CMakeTests.cmake b/tools/test/perform/CMakeTests.cmake index 39faa73..2bd8d46 100644 --- a/tools/test/perform/CMakeTests.cmake +++ b/tools/test/perform/CMakeTests.cmake @@ -25,7 +25,7 @@ add_custom_target(zip_perf_files ALL COMMENT "Copying files needed by zip_perf t # Remove any output file left over from previous test run add_test ( - NAME PERFORM_h5perform-clear-objects + NAME PERFORM_h5perform-clearall-objects COMMAND ${CMAKE_COMMAND} -E remove chunk.h5 @@ -36,6 +36,20 @@ add_test ( x-rowmaj-rd.dat x-rowmaj-wr.dat x-gnuplot + h5perf_serial.txt + h5perf_serial.txt.err + chunk.txt + chunk.txt.err + iopipe.txt + iopipe.txt.err + overhead.txt + overhead.txt.err + perf_meta.txt + perf_meta.txt.err + zip_perf-h.txt + zip_perf-h.txt.err + zip_perf.txt + zip_perf.txt.err ) if (HDF5_ENABLE_USING_MEMCHECKER) @@ -53,6 +67,7 @@ else () ) endif () set_tests_properties (PERFORM_h5perf_serial PROPERTIES TIMEOUT 1800) +set_tests_properties (PERFORM_h5perf_serial PROPERTIES DEPENDS "PERFORM_h5perform-clearall-objects") if (HDF5_BUILD_PERFORM_STANDALONE) add_test (NAME PERFORM_h5perf_serial_alone COMMAND $) @@ -72,6 +87,7 @@ else () -P "${HDF_RESOURCES_EXT_DIR}/runTest.cmake" ) endif () +set_tests_properties (PERFORM_chunk PROPERTIES DEPENDS "PERFORM_h5perform-clearall-objects") if (HDF5_ENABLE_USING_MEMCHECKER) add_test (NAME PERFORM_iopipe COMMAND $) @@ -87,6 +103,7 @@ else () -P "${HDF_RESOURCES_EXT_DIR}/runTest.cmake" ) endif () +set_tests_properties (PERFORM_iopipe PROPERTIES DEPENDS "PERFORM_h5perform-clearall-objects") if (HDF5_ENABLE_USING_MEMCHECKER) add_test (NAME PERFORM_overhead COMMAND $) @@ -102,6 +119,7 @@ else () -P "${HDF_RESOURCES_EXT_DIR}/runTest.cmake" ) endif () +set_tests_properties (PERFORM_overhead PROPERTIES DEPENDS "PERFORM_h5perform-clearall-objects") if (HDF5_ENABLE_USING_MEMCHECKER) add_test (NAME PERFORM_perf_meta COMMAND $) @@ -117,6 +135,7 @@ else () -P "${HDF_RESOURCES_EXT_DIR}/runTest.cmake" ) endif () +set_tests_properties (PERFORM_perf_meta PROPERTIES DEPENDS "PERFORM_h5perform-clearall-objects") if (HDF5_ENABLE_USING_MEMCHECKER) add_test (NAME PERFORM_zip_perf_help COMMAND $ "-h") @@ -132,6 +151,8 @@ else () -P "${HDF_RESOURCES_EXT_DIR}/runTest.cmake" ) endif () +set_tests_properties (PERFORM_zip_perf_help PROPERTIES DEPENDS "PERFORM_h5perform-clearall-objects") + if (HDF5_ENABLE_USING_MEMCHECKER) add_test (NAME PERFORM_zip_perf COMMAND $ tfilters.h5) else () @@ -147,6 +168,7 @@ else () ) endif () set_tests_properties (PERFORM_zip_perf PROPERTIES DEPENDS PERFORM_zip_perf_help) +set_tests_properties (PERFORM_zip_perf PROPERTIES DEPENDS "PERFORM_h5perform-clearall-objects") if (H5_HAVE_PARALLEL) add_test (NAME PERFORM_h5perf COMMAND ${MPIEXEC} ${MPIEXEC_PREFLAGS} ${MPIEXEC_NUMPROC_FLAG} ${MPIEXEC_MAX_NUMPROCS} ${MPIEXEC_POSTFLAGS} $) -- cgit v0.12 From ca685d0dc2e7e423f88ebbd57039dfbceaaf9878 Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Thu, 5 Oct 2017 08:53:36 -0500 Subject: Fix cmake test name for valgrind --- tools/test/h5dump/CMakeTestsXML.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/test/h5dump/CMakeTestsXML.cmake b/tools/test/h5dump/CMakeTestsXML.cmake index 0f8875f..17d0286b 100644 --- a/tools/test/h5dump/CMakeTestsXML.cmake +++ b/tools/test/h5dump/CMakeTestsXML.cmake @@ -176,7 +176,7 @@ macro (ADD_XML_H5_TEST resultfile resultcode) if (HDF5_ENABLE_USING_MEMCHECKER) add_test (NAME H5DUMP_XML-${resultfile} COMMAND $ --xml ${ARGN}) - set_tests_properties (H5DUMP-XML-${resultfile} PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/xml") + set_tests_properties (H5DUMP_XML-${resultfile} PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/xml") if (NOT "${resultcode}" STREQUAL "0") set_tests_properties (H5DUMP-XML-${resultfile} PROPERTIES WILL_FAIL "true") endif () -- cgit v0.12 From 49031748302822467887923c59d02d01e857d25b Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Thu, 5 Oct 2017 08:56:52 -0500 Subject: Fix other test name typos --- tools/test/h5dump/CMakeTestsXML.cmake | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/test/h5dump/CMakeTestsXML.cmake b/tools/test/h5dump/CMakeTestsXML.cmake index 17d0286b..9c68e5f 100644 --- a/tools/test/h5dump/CMakeTestsXML.cmake +++ b/tools/test/h5dump/CMakeTestsXML.cmake @@ -178,10 +178,10 @@ add_test (NAME H5DUMP_XML-${resultfile} COMMAND $ --xml ${ARGN}) set_tests_properties (H5DUMP_XML-${resultfile} PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/xml") if (NOT "${resultcode}" STREQUAL "0") - set_tests_properties (H5DUMP-XML-${resultfile} PROPERTIES WILL_FAIL "true") + set_tests_properties (H5DUMP_XML-${resultfile} PROPERTIES WILL_FAIL "true") endif () if (NOT "${last_xml_test}" STREQUAL "") - set_tests_properties (H5DUMP-XML-${resultfile} PROPERTIES DEPENDS ${last_xml_test}) + set_tests_properties (H5DUMP_XML-${resultfile} PROPERTIES DEPENDS ${last_xml_test}) endif () else () # Remove any output file left over from previous test run -- cgit v0.12 From 34a31e7e132e60d188c613454153a686528c5d3d Mon Sep 17 00:00:00 2001 From: Larry Knox Date: Wed, 27 Sep 2017 11:50:17 -0500 Subject: Merge pull request #686 in HDFFV/hdf5 from ~LRKNOX/hdf5_lrk:develop to develop * commit 'fded10f0815f593301ac88d08d05343c8077746a': Add note to bin/release script with hint for situations where files generated by autogen.sh are missing, causing chkmanifest to fail. --- bin/release | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/bin/release b/bin/release index 6358b0d..040711a 100755 --- a/bin/release +++ b/bin/release @@ -445,6 +445,12 @@ fi bin/chkmanifest || fail=yes if [ "X$fail" = "Xyes" ]; then if [ $check = yes ]; then + echo "" + echo "Note! If you are running bin/release in a development branch" + echo "later than v 1.8 the MANIFEST check is expected to fail when" + echo "autogen.sh has not been run successfully. Either run autogen.sh " + echo "with /usr/hdf/bin/AUTOTOOLS at the beginning of PATH or add the" + echo "--nocheck argument to the bin/release command." exit 1 else echo "Continuing anyway..." -- cgit v0.12 From 3490160ad84d4104885878d3d0e0142e2b8e9483 Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Mon, 9 Oct 2017 13:20:47 -0500 Subject: HDFFV-10297 - Changes to code makes old failure moot --- tools/test/h5repack/CMakeTests.cmake | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/tools/test/h5repack/CMakeTests.cmake b/tools/test/h5repack/CMakeTests.cmake index c68f18a..559dd88 100644 --- a/tools/test/h5repack/CMakeTests.cmake +++ b/tools/test/h5repack/CMakeTests.cmake @@ -1377,11 +1377,7 @@ ADD_H5_UD_TEST (plugin_test 0 h5repack_layout.h5 -v -f UD=257,0,1,9) ADD_H5_UD_TEST (plugin_none 0 h5repack_layout.UD.h5 -v -f NONE) # check for no parameters - set (TESTRETVAL 255) - if (WIN32) - set (TESTRETVAL -1) - endif () - ADD_H5_UD_TEST (plugin_zero ${TESTRETVAL} h5repack_layout.h5 -v -f UD=250,0,0) + ADD_H5_UD_TEST (plugin_zero 0 h5repack_layout.h5 -v -f UD=250,0,0) if (HDF5_TEST_VFD) # Run test with different Virtual File Driver -- cgit v0.12 From bd6de98d175b8fee9e7ba6a647a380a7b4295e1b Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Mon, 9 Oct 2017 13:21:32 -0500 Subject: Undo commit --- tools/test/h5repack/CMakeTests.cmake | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/tools/test/h5repack/CMakeTests.cmake b/tools/test/h5repack/CMakeTests.cmake index 559dd88..c68f18a 100644 --- a/tools/test/h5repack/CMakeTests.cmake +++ b/tools/test/h5repack/CMakeTests.cmake @@ -1377,7 +1377,11 @@ ADD_H5_UD_TEST (plugin_test 0 h5repack_layout.h5 -v -f UD=257,0,1,9) ADD_H5_UD_TEST (plugin_none 0 h5repack_layout.UD.h5 -v -f NONE) # check for no parameters - ADD_H5_UD_TEST (plugin_zero 0 h5repack_layout.h5 -v -f UD=250,0,0) + set (TESTRETVAL 255) + if (WIN32) + set (TESTRETVAL -1) + endif () + ADD_H5_UD_TEST (plugin_zero ${TESTRETVAL} h5repack_layout.h5 -v -f UD=250,0,0) if (HDF5_TEST_VFD) # Run test with different Virtual File Driver -- cgit v0.12 From f92ccce1f9134ccb06c59278075403657392ee0c Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Tue, 10 Oct 2017 14:46:59 -0500 Subject: HDFFV-10297 merge from develop --- config/cmake/jrunTest.cmake | 30 +- config/cmake/vfdTest.cmake | 6 +- config/cmake_ext_mod/grepTest.cmake | 6 +- config/cmake_ext_mod/runTest.cmake | 28 +- java/examples/datasets/CMakeLists.txt | 4 +- java/examples/groups/CMakeLists.txt | 4 +- release_docs/RELEASE.txt | 23 + src/H5PLextern.h | 4 +- src/H5PLmodule.h | 10 +- src/H5PLprivate.h | 4 +- src/H5Pocpl.c | 440 ++- src/H5Z.c | 929 +++---- test/CMakeTests.cmake | 12 +- test/dsets.c | 2879 ++++++++++---------- tools/lib/h5diff_attr.c | 4 +- tools/lib/h5diff_dset.c | 105 +- tools/lib/h5tools_filters.c | 202 +- tools/src/h5repack/h5repack.c | 201 +- tools/src/h5repack/h5repack.h | 106 +- tools/src/h5repack/h5repack_copy.c | 185 +- tools/src/h5repack/h5repack_filters.c | 270 +- tools/src/h5repack/h5repack_main.c | 10 +- tools/src/h5repack/h5repack_opttable.c | 3 +- tools/src/h5repack/h5repack_parse.c | 13 +- tools/src/h5repack/h5repack_refs.c | 259 +- tools/src/h5repack/h5repack_verify.c | 205 +- tools/test/h5diff/CMakeLists.txt | 10 +- tools/test/h5diff/CMakeTests.cmake | 14 +- tools/test/h5dump/h5dumpgentest.c | 6 +- tools/test/h5repack/CMakeTests.cmake | 6 +- tools/test/h5repack/h5repacktst.c | 1692 ++++++------ .../testfiles/deflate_limit.h5repack_layout.h5.ddl | 4 +- .../h5repack_filters.h5-gzip_verbose_filters.tst | 5 +- .../testfiles/h5repack_layout.h5-plugin_test.ddl | 2 +- .../h5repack_layout.h5-plugin_version_test.ddl | 16 +- .../testfiles/h5repack_layout.h5-plugin_zero.ddl | 131 + .../plugin_none.h5repack_layout.UD.h5.tst | 5 +- .../testfiles/plugin_test.h5repack_layout.h5.tst | 5 +- .../plugin_version_test.h5repack_layout.h5.tst | 5 +- .../testfiles/plugin_zero.h5repack_layout.h5.tst | 19 +- 40 files changed, 3826 insertions(+), 4036 deletions(-) diff --git a/config/cmake/jrunTest.cmake b/config/cmake/jrunTest.cmake index 7af0590..b66f3a8 100644 --- a/config/cmake/jrunTest.cmake +++ b/config/cmake/jrunTest.cmake @@ -122,7 +122,7 @@ if (TEST_MASK_ERROR) endif () # if the return value is !=0 bail out -if (NOT ${TEST_RESULT} STREQUAL ${TEST_EXPECT}) +if (NOT "${TEST_RESULT}" STREQUAL "${TEST_EXPECT}") message (STATUS "ERROR OUTPUT: ${TEST_STREAM}") message (FATAL_ERROR "Failed: Test program ${TEST_PROGRAM} exited != 0.\n${TEST_ERROR}") endif () @@ -141,13 +141,13 @@ if (NOT TEST_SKIP_COMPARE) COMMAND ${CMAKE_COMMAND} -E compare_files ${TEST_FOLDER}/${TEST_OUTPUT} ${TEST_FOLDER}/${TEST_REFERENCE} RESULT_VARIABLE TEST_RESULT ) - if (NOT ${TEST_RESULT} STREQUAL 0) + if (NOT "${TEST_RESULT}" STREQUAL "0") set (TEST_RESULT 0) file (STRINGS ${TEST_FOLDER}/${TEST_OUTPUT} test_act) list (LENGTH test_act len_act) file (STRINGS ${TEST_FOLDER}/${TEST_REFERENCE} test_ref) list (LENGTH test_ref len_ref) - if (NOT ${len_act} STREQUAL "0" AND NOT ${len_ref} STREQUAL "0") + if (NOT "${len_act}" STREQUAL "0" AND NOT "${len_ref}" STREQUAL "0") math (EXPR _FP_LEN "${len_ref} - 1") foreach (line RANGE 0 ${_FP_LEN}) list (GET test_act ${line} str_act) @@ -160,14 +160,14 @@ if (NOT TEST_SKIP_COMPARE) endif () endforeach () else () - if (${len_act} STREQUAL "0") + if ("${len_act}" STREQUAL "0") message (STATUS "COMPARE Failed: ${TEST_FOLDER}/${TEST_OUTPUT} is empty") endif () - if (${len_ref} STREQUAL "0") + if ("${len_ref}" STREQUAL "0") message (STATUS "COMPARE Failed: ${TEST_FOLDER}/${TEST_REFERENCE} is empty") endif () endif () - if (NOT ${len_act} STREQUAL ${len_ref}) + if (NOT "${len_act}" STREQUAL "${len_ref}") set (TEST_RESULT 1) endif () endif () @@ -175,7 +175,7 @@ if (NOT TEST_SKIP_COMPARE) message (STATUS "COMPARE Result: ${TEST_RESULT}") # again, if return value is !=0 scream and shout - if (NOT ${TEST_RESULT} STREQUAL 0) + if (NOT "${TEST_RESULT}" STREQUAL "0") message (FATAL_ERROR "Failed: The output of ${TEST_OUTPUT} did not match ${TEST_REFERENCE}") endif () @@ -191,14 +191,14 @@ if (NOT TEST_SKIP_COMPARE) COMMAND ${CMAKE_COMMAND} -E compare_files ${TEST_FOLDER}/${TEST_OUTPUT}.err ${TEST_FOLDER}/${TEST_ERRREF} RESULT_VARIABLE TEST_RESULT ) - if (NOT ${TEST_RESULT} STREQUAL 0) + if (NOT "${TEST_RESULT}" STREQUAL "0") set (TEST_RESULT 0) file (STRINGS ${TEST_FOLDER}/${TEST_OUTPUT}.err test_act) list (LENGTH test_act len_act) file (STRINGS ${TEST_FOLDER}/${TEST_ERRREF} test_ref) list (LENGTH test_ref len_ref) math (EXPR _FP_LEN "${len_ref} - 1") - if (NOT ${len_act} STREQUAL "0" AND NOT ${len_ref} STREQUAL "0") + if (NOT "${len_act}" STREQUAL "0" AND NOT "${len_ref}" STREQUAL "0") math (EXPR _FP_LEN "${len_ref} - 1") foreach (line RANGE 0 ${_FP_LEN}) list (GET test_act ${line} str_act) @@ -211,14 +211,14 @@ if (NOT TEST_SKIP_COMPARE) endif () endforeach () else () - if (${len_act} STREQUAL "0") + if ("${len_act}" STREQUAL "0") message (STATUS "COMPARE Failed: ${TEST_FOLDER}/${TEST_OUTPUT}.err is empty") endif () - if (${len_ref} STREQUAL "0") + if ("${len_ref}" STREQUAL "0") message (STATUS "COMPARE Failed: ${TEST_FOLDER}/${TEST_ERRREF} is empty") endif () endif() - if (NOT ${len_act} STREQUAL ${len_ref}) + if (NOT "${len_act}" STREQUAL "${len_ref}") set (TEST_RESULT 1) endif () endif () @@ -239,15 +239,15 @@ if (TEST_GREP_COMPARE) # TEST_REFERENCE should always be matched string (REGEX MATCH "${TEST_REFERENCE}" TEST_MATCH ${TEST_STREAM}) string (COMPARE EQUAL "${TEST_REFERENCE}" "${TEST_MATCH}" TEST_RESULT) - if (${TEST_RESULT} STREQUAL "0") + if ("${TEST_RESULT}" STREQUAL "0") 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} STREQUAL "1") + if ("${TEST_EXPECT}" STREQUAL "1") # TEST_EXPECT (1) interperts TEST_FILTER as NOT to match string (LENGTH "${TEST_MATCH}" TEST_RESULT) - if (NOT ${TEST_RESULT} STREQUAL "0") + if (NOT "${TEST_RESULT}" STREQUAL "0") message (FATAL_ERROR "Failed: The output of ${TEST_PROGRAM} did contain ${TEST_FILTER}") endif () endif () diff --git a/config/cmake/vfdTest.cmake b/config/cmake/vfdTest.cmake index 67a2566..66a97c0 100644 --- a/config/cmake/vfdTest.cmake +++ b/config/cmake/vfdTest.cmake @@ -60,12 +60,12 @@ if (ERROR_APPEND AND EXISTS ${TEST_FOLDER}/${TEST_OUTPUT}_${TEST_VFD}.err) endif () # if the return value is !=${TEST_EXPECT} bail out -if (NOT ${TEST_RESULT} STREQUAL ${TEST_EXPECT}) +if (NOT "${TEST_RESULT}" STREQUAL "${TEST_EXPECT}") if (NOT TEST_NOERRDISPLAY) if (EXISTS ${TEST_FOLDER}/${TEST_OUTPUT}_${TEST_VFD}.out) file (READ ${TEST_FOLDER}/${TEST_OUTPUT}_${TEST_VFD}.out TEST_STREAM) - message (STATUS "Output USING ${TEST_VFD}:\n${TEST_STREAM}") - endif () + message (STATUS "Output USING ${TEST_VFD}:\n${TEST_STREAM}") + endif () endif () message (FATAL_ERROR "Failed: Test program ${TEST_PROGRAM} exited != ${TEST_EXPECT}.\n${TEST_ERROR}") endif () diff --git a/config/cmake_ext_mod/grepTest.cmake b/config/cmake_ext_mod/grepTest.cmake index 5b0e8fd..b812d73 100644 --- a/config/cmake_ext_mod/grepTest.cmake +++ b/config/cmake_ext_mod/grepTest.cmake @@ -57,15 +57,15 @@ file (READ ${TEST_FOLDER}/${TEST_OUTPUT} TEST_STREAM) # TEST_REFERENCE should always be matched string (REGEX MATCH "${TEST_REFERENCE}" TEST_MATCH ${TEST_STREAM}) string (COMPARE EQUAL "${TEST_REFERENCE}" "${TEST_MATCH}" TEST_RESULT) -if (${TEST_RESULT} STREQUAL "0") +if ("${TEST_RESULT}" STREQUAL "0") 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} STREQUAL "1") +if ("${TEST_EXPECT}" STREQUAL "1") # TEST_EXPECT (1) interperts TEST_FILTER as NOT to match string (LENGTH "${TEST_MATCH}" TEST_RESULT) - if (NOT ${TEST_RESULT} STREQUAL "0") + if (NOT "${TEST_RESULT}" STREQUAL "0") message (FATAL_ERROR "Failed: The output of ${TEST_PROGRAM} did contain ${TEST_FILTER}") endif () endif () diff --git a/config/cmake_ext_mod/runTest.cmake b/config/cmake_ext_mod/runTest.cmake index 3a02614..2479728 100644 --- a/config/cmake_ext_mod/runTest.cmake +++ b/config/cmake_ext_mod/runTest.cmake @@ -87,7 +87,7 @@ if (TEST_REGEX) 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 (${REGEX_RESULT} STREQUAL "0") + if ("${REGEX_RESULT}" STREQUAL "0") message (STATUS "Failed: The output of ${TEST_PROGRAM} did not contain ${TEST_MATCH}") endif () endif () @@ -106,7 +106,7 @@ if (TEST_APPEND) endif () # if the return value is !=${TEST_EXPECT} bail out -if (NOT ${TEST_RESULT} STREQUAL ${TEST_EXPECT}) +if (NOT "${TEST_RESULT}" STREQUAL "${TEST_EXPECT}") if (NOT TEST_NOERRDISPLAY) if (EXISTS ${TEST_FOLDER}/${TEST_OUTPUT}) file (READ ${TEST_FOLDER}/${TEST_OUTPUT} TEST_STREAM) @@ -193,13 +193,13 @@ if (NOT TEST_SKIP_COMPARE) endif () endif () - if (NOT ${TEST_RESULT} STREQUAL 0) + if (NOT "${TEST_RESULT}" STREQUAL "0") set (TEST_RESULT 0) file (STRINGS ${TEST_FOLDER}/${TEST_OUTPUT} test_act) list (LENGTH test_act len_act) file (STRINGS ${TEST_FOLDER}/${TEST_REFERENCE} test_ref) list (LENGTH test_ref len_ref) - if (NOT ${len_act} STREQUAL "0" AND NOT ${len_ref} STREQUAL "0") + if (NOT "${len_act}" STREQUAL "0" AND NOT "${len_ref}" STREQUAL "0") math (EXPR _FP_LEN "${len_ref} - 1") foreach (line RANGE 0 ${_FP_LEN}) list (GET test_act ${line} str_act) @@ -212,14 +212,14 @@ if (NOT TEST_SKIP_COMPARE) endif () endforeach () else () - if (${len_act} STREQUAL "0") + if ("${len_act}" STREQUAL "0") message (STATUS "COMPARE Failed: ${TEST_FOLDER}/${TEST_OUTPUT} is empty") endif () - if (${len_ref} STREQUAL "0") + if ("${len_ref}" STREQUAL "0") message (STATUS "COMPARE Failed: ${TEST_FOLDER}/${TEST_REFERENCE} is empty") endif () endif () - if (NOT ${len_act} STREQUAL ${len_ref}) + if (NOT "${len_act}" STREQUAL "${len_ref}") set (TEST_RESULT 1) endif () endif () @@ -227,7 +227,7 @@ if (NOT TEST_SKIP_COMPARE) message (STATUS "COMPARE Result: ${TEST_RESULT}") # again, if return value is !=0 scream and shout - if (NOT ${TEST_RESULT} STREQUAL 0) + if (NOT "${TEST_RESULT}" STREQUAL "0") message (FATAL_ERROR "Failed: The output of ${TEST_OUTPUT} did not match ${TEST_REFERENCE}") endif () @@ -243,14 +243,14 @@ if (NOT TEST_SKIP_COMPARE) COMMAND ${CMAKE_COMMAND} -E compare_files ${TEST_FOLDER}/${TEST_OUTPUT}.err ${TEST_FOLDER}/${TEST_ERRREF} RESULT_VARIABLE TEST_RESULT ) - if (NOT ${TEST_RESULT} STREQUAL 0) + if (NOT "${TEST_RESULT}" STREQUAL "0") set (TEST_RESULT 0) file (STRINGS ${TEST_FOLDER}/${TEST_OUTPUT}.err test_act) list (LENGTH test_act len_act) file (STRINGS ${TEST_FOLDER}/${TEST_ERRREF} test_ref) list (LENGTH test_ref len_ref) math (EXPR _FP_LEN "${len_ref} - 1") - if (NOT ${len_act} STREQUAL "0" AND NOT ${len_ref} STREQUAL "0") + if (NOT "${len_act}" STREQUAL "0" AND NOT "${len_ref}" STREQUAL "0") math (EXPR _FP_LEN "${len_ref} - 1") foreach (line RANGE 0 ${_FP_LEN}) list (GET test_act ${line} str_act) @@ -263,14 +263,14 @@ if (NOT TEST_SKIP_COMPARE) endif () endforeach () else () - if (${len_act} STREQUAL "0") + if ("${len_act}" STREQUAL "0") message (STATUS "COMPARE Failed: ${TEST_FOLDER}/${TEST_OUTPUT}.err is empty") endif () - if (${len_ref} STREQUAL "0") + if ("${len_ref}" STREQUAL "0") message (STATUS "COMPARE Failed: ${TEST_FOLDER}/${TEST_ERRREF} is empty") endif () endif () - if (NOT ${len_act} STREQUAL ${len_ref}) + if (NOT "${len_act}" STREQUAL "${len_ref}") set (TEST_RESULT 1) endif () endif () @@ -278,7 +278,7 @@ if (NOT TEST_SKIP_COMPARE) message (STATUS "COMPARE Result: ${TEST_RESULT}") # again, if return value is !=0 scream and shout - if (NOT ${TEST_RESULT} STREQUAL 0) + if (NOT "${TEST_RESULT}" STREQUAL "0") message (FATAL_ERROR "Failed: The error output of ${TEST_OUTPUT}.err did not match ${TEST_ERRREF}") endif () endif () diff --git a/java/examples/datasets/CMakeLists.txt b/java/examples/datasets/CMakeLists.txt index d698cfd..3972ec8 100644 --- a/java/examples/datasets/CMakeLists.txt +++ b/java/examples/datasets/CMakeLists.txt @@ -101,7 +101,7 @@ if (BUILD_TESTING) endif (H5_HAVE_FILTER_SZIP) foreach (example ${HDF_JAVA_EXAMPLES}) - if (${example} STREQUAL "H5Ex_D_External") + if ("${example}" STREQUAL "H5Ex_D_External") add_test ( NAME JAVA_datasets-${example}-clear-objects COMMAND ${CMAKE_COMMAND} @@ -129,7 +129,7 @@ if (BUILD_TESTING) ) set_tests_properties (JAVA_datasets-${example}-copy-objects PROPERTIES DEPENDS JAVA_datasets-${example}-clear-objects) set (last_test "JAVA_datasets-${example}-copy-objects") - if (${example} STREQUAL "H5Ex_D_Szip") + if ("${example}" STREQUAL "H5Ex_D_Szip") if (USE_FILTER_SZIP) ADD_H5_TEST (${example} 0) endif () diff --git a/java/examples/groups/CMakeLists.txt b/java/examples/groups/CMakeLists.txt index bb5f80f..b912208 100644 --- a/java/examples/groups/CMakeLists.txt +++ b/java/examples/groups/CMakeLists.txt @@ -90,8 +90,8 @@ ENDMACRO () if (BUILD_TESTING) foreach (example ${HDF_JAVA_EXAMPLES}) - if (NOT ${example} STREQUAL "H5Ex_G_Iterate" AND NOT ${example} STREQUAL "H5Ex_G_Visit") - if (${example} STREQUAL "H5Ex_G_Compact") + if (NOT "${example}" STREQUAL "H5Ex_G_Iterate" AND NOT "${example}" STREQUAL "H5Ex_G_Visit") + if ("${example}" STREQUAL "H5Ex_G_Compact") add_test ( NAME JAVA_groups-${example}-clear-h5s COMMAND ${CMAKE_COMMAND} diff --git a/release_docs/RELEASE.txt b/release_docs/RELEASE.txt index 7c87c4c..3e2660d 100644 --- a/release_docs/RELEASE.txt +++ b/release_docs/RELEASE.txt @@ -206,6 +206,17 @@ Bug Fixes since HDF5-1.10.0-patch1 release Library ------- + - H5Zfilter_avail in H5Z.c + + The public function checked for plugins, while the private + function did not. + + Modified H5Zfilter_avail and private function, H5Z_filter_avail. + Moved check for plugin from public to private function. Updated + H5P__set_filter due to change in H5Z_filter_avail. Updated tests. + + (ADB - 2017/10/10, HDFFV-10297) + - Fix H5HL_offset_into() (1) Fix H5HL_offset_into() to return error when offset exceeds heap data @@ -301,6 +312,18 @@ Bug Fixes since HDF5-1.10.0-patch1 release ----- - h5repack + h5repack failed to copy a dataset with existing filter. + + Reworked code for h5repack and h5diff code in tools library. Added + improved error handling, cleanup of resources and checks of calls. + Modified H5Zfilter_avail and private function, H5Z_filter_avail. + Moved check for plugin from public to private function. Updated + H5P__set_filter due to change in H5Z_filter_avail. Updated tests. + + (ADB - 2017/10/10, HDFFV-10297) + + - h5repack + h5repack always set the User Defined filter flag to H5Z_FLAG_MANDATORY. Added another parameter to the 'UD=' option to set the flag by default diff --git a/src/H5PLextern.h b/src/H5PLextern.h index 7547ad7..cd5464d 100644 --- a/src/H5PLextern.h +++ b/src/H5PLextern.h @@ -11,9 +11,9 @@ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* - * Programmer: Raymond Lu - * 13 February 2013 + * Purpose: Header file for writing external HDF5 plugins. */ + #ifndef _H5PLextern_H #define _H5PLextern_H diff --git a/src/H5PLmodule.h b/src/H5PLmodule.h index b441aed..945441e 100644 --- a/src/H5PLmodule.h +++ b/src/H5PLmodule.h @@ -11,13 +11,11 @@ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* - * Programmer: Quincey Koziol - * Saturday, September 12, 2015 - * - * Purpose: This file contains declarations which define macros for the - * H5PL package. Including this header means that the source file - * is part of the H5PL package. + * Purpose: This file contains declarations which define macros for the + * H5PL package. Including this header means that the source file + * is part of the H5PL package. */ + #ifndef _H5PLmodule_H #define _H5PLmodule_H diff --git a/src/H5PLprivate.h b/src/H5PLprivate.h index 0ab8f8c..bc12e64 100644 --- a/src/H5PLprivate.h +++ b/src/H5PLprivate.h @@ -10,8 +10,8 @@ * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ -/* Programmer: Raymond Lu - * 13 February 2013 +/* + * This file contains private information about the H5PL module */ #ifndef _H5PLprivate_H diff --git a/src/H5Pocpl.c b/src/H5Pocpl.c index 0393f7f..be41e32 100644 --- a/src/H5Pocpl.c +++ b/src/H5Pocpl.c @@ -13,11 +13,11 @@ /*------------------------------------------------------------------------- * - * Created: H5Pocpl.c - * Nov 28 2006 - * Quincey Koziol + * Created: H5Pocpl.c + * Nov 28 2006 + * Quincey Koziol * - * Purpose: Object creation property list class routines + * Purpose: Object creation property list class routines * *------------------------------------------------------------------------- */ @@ -26,21 +26,21 @@ /* Module Setup */ /****************/ -#define H5O_FRIEND /*suppress error about including H5Opkg */ +#define H5O_FRIEND /*suppress error about including H5Opkg */ #include "H5Pmodule.h" /* This source code file is part of the H5P module */ /***********/ /* Headers */ /***********/ -#include "H5private.h" /* Generic Functions */ -#include "H5Eprivate.h" /* Error handling */ -#include "H5Iprivate.h" /* IDs */ -#include "H5MMprivate.h" /* Memory management */ -#include "H5Opkg.h" /* Object headers */ -#include "H5Ppkg.h" /* Property lists */ -#include "H5PLprivate.h" /* Dynamic plugin */ -#include "H5Zprivate.h" /* Filter pipeline */ +#include "H5private.h" /* Generic Functions */ +#include "H5Eprivate.h" /* Error handling */ +#include "H5Iprivate.h" /* IDs */ +#include "H5MMprivate.h" /* Memory management */ +#include "H5Opkg.h" /* Object headers */ +#include "H5Ppkg.h" /* Property lists */ +#include "H5PLprivate.h" /* Dynamic plugin */ +#include "H5Zprivate.h" /* Filter pipeline */ /****************/ @@ -100,7 +100,7 @@ static int H5P__ocrt_pipeline_cmp(const void *value1, const void *value2, size_t static herr_t H5P__ocrt_pipeline_close(const char *name, size_t size, void *value); /* Local routines */ -static herr_t H5P__set_filter(H5P_genplist_t *plist, H5Z_filter_t filter, +static herr_t H5P__set_filter(H5P_genplist_t *plist, H5Z_filter_t filter, unsigned int flags, size_t cd_nelmts, const unsigned int cd_values[/*cd_nelmts*/]); /*********************/ @@ -109,21 +109,21 @@ static herr_t H5P__set_filter(H5P_genplist_t *plist, H5Z_filter_t filter, /* Object creation property list class library initialization object */ const H5P_libclass_t H5P_CLS_OCRT[1] = {{ - "object create", /* Class name for debugging */ - H5P_TYPE_OBJECT_CREATE, /* Class type */ - - &H5P_CLS_ROOT_g, /* Parent class */ - &H5P_CLS_OBJECT_CREATE_g, /* Pointer to class */ - &H5P_CLS_OBJECT_CREATE_ID_g, /* Pointer to class ID */ - NULL, /* Pointer to default property list ID */ - H5P__ocrt_reg_prop, /* Default property registration routine */ - - NULL, /* Class creation callback */ - NULL, /* Class creation callback info */ - NULL, /* Class copy callback */ - NULL, /* Class copy callback info */ - NULL, /* Class close callback */ - NULL /* Class close callback info */ + "object create", /* Class name for debugging */ + H5P_TYPE_OBJECT_CREATE, /* Class type */ + + &H5P_CLS_ROOT_g, /* Parent class */ + &H5P_CLS_OBJECT_CREATE_g, /* Pointer to class */ + &H5P_CLS_OBJECT_CREATE_ID_g, /* Pointer to class ID */ + NULL, /* Pointer to default property list ID */ + H5P__ocrt_reg_prop, /* Default property registration routine */ + + NULL, /* Class creation callback */ + NULL, /* Class creation callback info */ + NULL, /* Class copy callback */ + NULL, /* Class copy callback info */ + NULL, /* Class close callback */ + NULL /* Class close callback info */ }}; @@ -165,25 +165,25 @@ H5P__ocrt_reg_prop(H5P_genclass_t *pclass) FUNC_ENTER_STATIC /* Register max. compact attribute storage property */ - if(H5P_register_real(pclass, H5O_CRT_ATTR_MAX_COMPACT_NAME, H5O_CRT_ATTR_MAX_COMPACT_SIZE, &H5O_def_attr_max_compact_g, + if(H5P_register_real(pclass, H5O_CRT_ATTR_MAX_COMPACT_NAME, H5O_CRT_ATTR_MAX_COMPACT_SIZE, &H5O_def_attr_max_compact_g, NULL, NULL, NULL, H5O_CRT_ATTR_MAX_COMPACT_ENC, H5O_CRT_ATTR_MAX_COMPACT_DEC, NULL, NULL, NULL, NULL) < 0) HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL, "can't insert property into class") /* Register min. dense attribute storage property */ - if(H5P_register_real(pclass, H5O_CRT_ATTR_MIN_DENSE_NAME, H5O_CRT_ATTR_MIN_DENSE_SIZE, &H5O_def_attr_min_dense_g, + if(H5P_register_real(pclass, H5O_CRT_ATTR_MIN_DENSE_NAME, H5O_CRT_ATTR_MIN_DENSE_SIZE, &H5O_def_attr_min_dense_g, NULL, NULL, NULL, H5O_CRT_ATTR_MIN_DENSE_ENC, H5O_CRT_ATTR_MIN_DENSE_DEC, NULL, NULL, NULL, NULL) < 0) HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL, "can't insert property into class") /* Register object header flags property */ - if(H5P_register_real(pclass, H5O_CRT_OHDR_FLAGS_NAME, H5O_CRT_OHDR_FLAGS_SIZE, &H5O_def_ohdr_flags_g, + if(H5P_register_real(pclass, H5O_CRT_OHDR_FLAGS_NAME, H5O_CRT_OHDR_FLAGS_SIZE, &H5O_def_ohdr_flags_g, NULL, NULL, NULL, H5O_CRT_OHDR_FLAGS_ENC, H5O_CRT_OHDR_FLAGS_DEC, NULL, NULL, NULL, NULL) < 0) HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL, "can't insert property into class") /* Register the pipeline property */ - if(H5P_register_real(pclass, H5O_CRT_PIPELINE_NAME, H5O_CRT_PIPELINE_SIZE, &H5O_def_pline_g, + if(H5P_register_real(pclass, H5O_CRT_PIPELINE_NAME, H5O_CRT_PIPELINE_SIZE, &H5O_def_pline_g, NULL, H5O_CRT_PIPELINE_SET, H5O_CRT_PIPELINE_GET, H5O_CRT_PIPELINE_ENC, H5O_CRT_PIPELINE_DEC, H5O_CRT_PIPELINE_DEL, H5O_CRT_PIPELINE_COPY, H5O_CRT_PIPELINE_CMP, H5O_CRT_PIPELINE_CLOSE) < 0) HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL, "can't insert property into class") @@ -194,9 +194,9 @@ done: /*------------------------------------------------------------------------- - * Function: H5Pset_attr_phase_change + * Function: H5Pset_attr_phase_change * - * Purpose: Sets the cutoff values for indexes storing attributes + * Purpose: Sets the cutoff values for indexes storing attributes * in object headers for this file. If more than max_compact * attributes are in an object header, the attributes will be * moved to a heap and indexed with a B-tree. @@ -208,10 +208,10 @@ done: * never be stored in the object header but will be always be * stored in a heap. * - * Return: Non-negative on success/Negative on failure + * Return: Non-negative on success/Negative on failure * - * Programmer: Quincey Koziol - * Tuesday, November 28, 2006 + * Programmer: Quincey Koziol + * Tuesday, November 28, 2006 * *------------------------------------------------------------------------- */ @@ -248,14 +248,14 @@ done: /*------------------------------------------------------------------------- - * Function: H5Pget_attr_phase_change + * Function: H5Pget_attr_phase_change * - * Purpose: Gets the phase change values for attribute storage + * Purpose: Gets the phase change values for attribute storage * - * Return: Non-negative on success/Negative on failure + * Return: Non-negative on success/Negative on failure * - * Programmer: Quincey Koziol - * Tuesday, November 28, 2006 + * Programmer: Quincey Koziol + * Tuesday, November 28, 2006 * *------------------------------------------------------------------------- */ @@ -486,37 +486,37 @@ done: /*------------------------------------------------------------------------- - * Function: H5P_modify_filter - * - * Purpose: Modifies the specified FILTER in the - * transient or permanent output filter pipeline - * depending on whether PLIST is a dataset creation or dataset - * transfer property list. The FLAGS argument specifies certain - * general properties of the filter and is documented below. - * The CD_VALUES is an array of CD_NELMTS integers which are - * auxiliary data for the filter. The integer vlues will be - * stored in the dataset object header as part of the filter - * information. - * - * The FLAGS argument is a bit vector of the following fields: - * - * H5Z_FLAG_OPTIONAL(0x0001) - * If this bit is set then the filter is optional. If the - * filter fails 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. If this bit is clear and - * the filter fails then the entire I/O operation fails. + * Function: H5P_modify_filter + * + * Purpose: Modifies the specified FILTER in the + * transient or permanent output filter pipeline + * depending on whether PLIST is a dataset creation or dataset + * transfer property list. The FLAGS argument specifies certain + * general properties of the filter and is documented below. + * The CD_VALUES is an array of CD_NELMTS integers which are + * auxiliary data for the filter. The integer vlues will be + * stored in the dataset object header as part of the filter + * information. + * + * The FLAGS argument is a bit vector of the following fields: + * + * H5Z_FLAG_OPTIONAL(0x0001) + * If this bit is set then the filter is optional. If the + * filter fails 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. If this bit is clear and + * the filter fails then the entire I/O operation fails. * If this bit is set but encoding is disabled for a filter, * attempting to write will generate an error. * - * Note: This function currently supports only the permanent filter - * pipeline. That is, PLIST_ID must be a dataset creation - * property list. + * Note: This function currently supports only the permanent filter + * pipeline. That is, PLIST_ID must be a dataset creation + * property list. * - * Return: Non-negative on success/Negative on failure + * Return: Non-negative on success/Negative on failure * - * Programmer: Quincey Koziol + * Programmer: Quincey Koziol * Wednesday, October 17, 2007 * *------------------------------------------------------------------------- @@ -623,33 +623,33 @@ done: /*------------------------------------------------------------------------- - * Function: H5Pset_filter - * - * Purpose: Adds the specified FILTER and corresponding properties to the - * end of the data or link output filter pipeline - * depending on whether PLIST is a dataset creation or group - * creation property list. The FLAGS argument specifies certain - * general properties of the filter and is documented below. - * The CD_VALUES is an array of CD_NELMTS integers which are - * auxiliary data for the filter. The integer vlues will be - * stored in the dataset object header as part of the filter - * information. - * - * The FLAGS argument is a bit vector of the following fields: - * - * H5Z_FLAG_OPTIONAL(0x0001) - * If this bit is set then the filter is optional. If the - * filter fails 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. If this bit is clear and - * the filter fails then the entire I/O operation fails. + * Function: H5Pset_filter + * + * Purpose: Adds the specified FILTER and corresponding properties to the + * end of the data or link output filter pipeline + * depending on whether PLIST is a dataset creation or group + * creation property list. The FLAGS argument specifies certain + * general properties of the filter and is documented below. + * The CD_VALUES is an array of CD_NELMTS integers which are + * auxiliary data for the filter. The integer vlues will be + * stored in the dataset object header as part of the filter + * information. + * + * The FLAGS argument is a bit vector of the following fields: + * + * H5Z_FLAG_OPTIONAL(0x0001) + * If this bit is set then the filter is optional. If the + * filter fails 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. If this bit is clear and + * the filter fails then the entire I/O operation fails. * If this bit is set but encoding is disabled for a filter, * attempting to write will generate an error. * - * Return: Non-negative on success/Negative on failure + * Return: Non-negative on success/Negative on failure * - * Programmer: Robb Matzke + * Programmer: Robb Matzke * Wednesday, April 15, 1998 * * Modifications: @@ -668,7 +668,7 @@ done: */ herr_t H5Pset_filter(hid_t plist_id, H5Z_filter_t filter, unsigned int flags, - size_t cd_nelmts, const unsigned int cd_values[/*cd_nelmts*/]) + size_t cd_nelmts, const unsigned int cd_values[/*cd_nelmts*/]) { H5P_genplist_t *plist; /* Property list */ herr_t ret_value=SUCCEED; /* return value */ @@ -698,43 +698,43 @@ done: /*------------------------------------------------------------------------- - * Function: H5P__set_filter - * - * Purpose: Adds the specified FILTER and corresponding properties to the - * end of the data or link output filter pipeline - * depending on whether PLIST is a dataset creation or group - * creation property list. The FLAGS argument specifies certain - * general properties of the filter and is documented below. - * The CD_VALUES is an array of CD_NELMTS integers which are - * auxiliary data for the filter. The integer vlues will be - * stored in the dataset object header as part of the filter - * information. - * - * The FLAGS argument is a bit vector of the following fields: - * - * H5Z_FLAG_OPTIONAL(0x0001) - * If this bit is set then the filter is optional. If the - * filter fails 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. If this bit is clear and - * the filter fails then the entire I/O operation fails. - * If this bit is set but encoding is disabled for a filter, - * attempting to write will generate an error. - * - * If the filter is not registered, this function tries to load + * Function: H5P__set_filter + * + * Purpose: Adds the specified FILTER and corresponding properties to the + * end of the data or link output filter pipeline + * depending on whether PLIST is a dataset creation or group + * creation property list. The FLAGS argument specifies certain + * general properties of the filter and is documented below. + * The CD_VALUES is an array of CD_NELMTS integers which are + * auxiliary data for the filter. The integer vlues will be + * stored in the dataset object header as part of the filter + * information. + * + * The FLAGS argument is a bit vector of the following fields: + * + * H5Z_FLAG_OPTIONAL(0x0001) + * If this bit is set then the filter is optional. If the + * filter fails 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. If this bit is clear and + * the filter fails then the entire I/O operation fails. + * If this bit is set but encoding is disabled for a filter, + * attempting to write will generate an error. + * + * If the filter is not registered, this function tries to load * it dynamically during run time. * - * Return: Non-negative on success/Negative on failure + * Return: Non-negative on success/Negative on failure * - * Programmer: Robb Matzke + * Programmer: Robb Matzke * Wednesday, April 15, 1998 * *------------------------------------------------------------------------- */ static herr_t H5P__set_filter(H5P_genplist_t *plist, H5Z_filter_t filter, unsigned int flags, - size_t cd_nelmts, const unsigned int cd_values[/*cd_nelmts*/]) + size_t cd_nelmts, const unsigned int cd_values[/*cd_nelmts*/]) { H5O_pline_t pline; /* Filter pipeline */ htri_t filter_avail; /* Filter availability */ @@ -746,16 +746,6 @@ H5P__set_filter(H5P_genplist_t *plist, H5Z_filter_t filter, unsigned int flags, if((filter_avail = H5Z_filter_avail(filter)) < 0) HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "can't check filter availability") - /* If filter is not available, try to dynamically load it */ - if(!filter_avail) { - const H5Z_class2_t *filter_info; - - if(NULL == (filter_info = (const H5Z_class2_t *)H5PL_load(H5PL_TYPE_FILTER, (int)filter))) - HGOTO_ERROR(H5E_PLINE, H5E_CANTLOAD, FAIL, "failed to load dynamically loaded plugin") - if(H5Z_register(filter_info) < 0) - HGOTO_ERROR(H5E_PLINE, H5E_CANTINIT, FAIL, "unable to register filter") - } /* end if */ - /* Get the pipeline property to append to */ if(H5P_peek(plist, H5O_CRT_PIPELINE_NAME, &pline) < 0) HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get pipeline") @@ -774,21 +764,21 @@ done: /*------------------------------------------------------------------------- - * Function: H5Pget_nfilters + * Function: H5Pget_nfilters * - * Purpose: Returns the number of filters in the data or link - * pipeline depending on whether PLIST_ID is a dataset creation - * or group creation property list. In each pipeline the - * filters are numbered from zero through N-1 where N is the - * value returned by this function. During output to the file - * the filters of a pipeline are applied in increasing order - * (the inverse is true for input). + * Purpose: Returns the number of filters in the data or link + * pipeline depending on whether PLIST_ID is a dataset creation + * or group creation property list. In each pipeline the + * filters are numbered from zero through N-1 where N is the + * value returned by this function. During output to the file + * the filters of a pipeline are applied in increasing order + * (the inverse is true for input). * - * Return: Success: Number of filters or zero if there are none. + * Return: Success: Number of filters or zero if there are none. * - * Failure: Negative + * Failure: Negative * - * Programmer: Robb Matzke + * Programmer: Robb Matzke * Tuesday, August 4, 1998 * * Modifications: @@ -827,25 +817,25 @@ done: /*------------------------------------------------------------------------- - * Function: H5Pget_filter2 - * - * Purpose: This is the query counterpart of H5Pset_filter() and returns - * information about a particular filter number in a permanent - * or transient pipeline depending on whether PLIST_ID is a - * dataset creation or transfer property list. On input, - * CD_NELMTS indicates the number of entries in the CD_VALUES - * array allocated by the caller while on exit it contains the - * number of values defined by the filter. FILTER_CONFIG is a bit + * Function: H5Pget_filter2 + * + * Purpose: This is the query counterpart of H5Pset_filter() and returns + * information about a particular filter number in a permanent + * or transient pipeline depending on whether PLIST_ID is a + * dataset creation or transfer property list. On input, + * CD_NELMTS indicates the number of entries in the CD_VALUES + * array allocated by the caller while on exit it contains the + * number of values defined by the filter. FILTER_CONFIG is a bit * field contaning encode/decode flags from H5Zpublic.h. The IDX * should be a value between zero and N-1 as described for * H5Pget_nfilters() and the function will return failure if the * filter number is out of range. * - * Return: Success: Filter identification number. + * Return: Success: Filter identification number. * - * Failure: H5Z_FILTER_ERROR (Negative) + * Failure: H5Z_FILTER_ERROR (Negative) * - * Programmer: Robb Matzke + * Programmer: Robb Matzke * Wednesday, April 15, 1998 * * Modifications: @@ -859,8 +849,8 @@ done: */ H5Z_filter_t H5Pget_filter2(hid_t plist_id, unsigned idx, unsigned int *flags/*out*/, - size_t *cd_nelmts/*in_out*/, unsigned cd_values[]/*out*/, - size_t namelen, char name[]/*out*/, + size_t *cd_nelmts/*in_out*/, unsigned cd_values[]/*out*/, + size_t namelen, char name[]/*out*/, unsigned *filter_config /*out*/) { H5P_genplist_t *plist; /* Property list */ @@ -921,23 +911,23 @@ done: /*------------------------------------------------------------------------- - * Function: H5P_get_filter_by_id + * Function: H5P_get_filter_by_id * - * Purpose: This is an additional query counterpart of H5Pset_filter() and + * Purpose: This is an additional query counterpart of H5Pset_filter() and * returns information about a particular filter in a permanent - * or transient pipeline depending on whether PLIST_ID is a - * dataset creation or transfer property list. On input, - * CD_NELMTS indicates the number of entries in the CD_VALUES - * array allocated by the caller while on exit it contains the - * number of values defined by the filter. FILTER_CONFIG is a bit + * or transient pipeline depending on whether PLIST_ID is a + * dataset creation or transfer property list. On input, + * CD_NELMTS indicates the number of entries in the CD_VALUES + * array allocated by the caller while on exit it contains the + * number of values defined by the filter. FILTER_CONFIG is a bit * field contaning encode/decode flags from H5Zpublic.h. The ID * should be the filter ID to retrieve the parameters for. If the * filter is not set for the property list, an error will be returned. * - * Return: Success: Non-negative - * Failure: Negative + * Return: Success: Non-negative + * Failure: Negative * - * Programmer: Quincey Koziol + * Programmer: Quincey Koziol * Wednesday, October 17, 2007 * *------------------------------------------------------------------------- @@ -971,23 +961,23 @@ done: /*------------------------------------------------------------------------- - * Function: H5Pget_filter_by_id2 + * Function: H5Pget_filter_by_id2 * - * Purpose: This is an additional query counterpart of H5Pset_filter() and + * Purpose: This is an additional query counterpart of H5Pset_filter() and * returns information about a particular filter in a permanent - * or transient pipeline depending on whether PLIST_ID is a - * dataset creation or transfer property list. On input, - * CD_NELMTS indicates the number of entries in the CD_VALUES - * array allocated by the caller while on exit it contains the - * number of values defined by the filter. FILTER_CONFIG is a bit + * or transient pipeline depending on whether PLIST_ID is a + * dataset creation or transfer property list. On input, + * CD_NELMTS indicates the number of entries in the CD_VALUES + * array allocated by the caller while on exit it contains the + * number of values defined by the filter. FILTER_CONFIG is a bit * field contaning encode/decode flags from H5Zpublic.h. The ID * should be the filter ID to retrieve the parameters for. If the * filter is not set for the property list, an error will be returned. * - * Return: Success: Non-negative - * Failure: Negative + * Return: Success: Non-negative + * Failure: Negative * - * Programmer: Quincey Koziol + * Programmer: Quincey Koziol * Friday, April 5, 2003 * * Modifications: @@ -1047,16 +1037,16 @@ done: /*------------------------------------------------------------------------- - * Function: H5Pall_filters_avail + * Function: H5Pall_filters_avail * - * Purpose: This is a query routine to verify that all the filters set + * Purpose: This is a query routine to verify that all the filters set * in the dataset creation property list are available currently. * - * Return: Success: TRUE if all filters available, FALSE if one or + * Return: Success: TRUE if all filters available, FALSE if one or * more filters not currently available. - * Failure: FAIL on error + * Failure: FAIL on error * - * Programmer: Quincey Koziol + * Programmer: Quincey Koziol * Tuesday, April 8, 2003 * * Modifications: @@ -1096,16 +1086,16 @@ done: /*------------------------------------------------------------------------- - * Function: H5P_filter_in_pline + * Function: H5P_filter_in_pline * - * Purpose: Check whether the filter is in the pipeline of the object - * creation property list. + * Purpose: Check whether the filter is in the pipeline of the object + * creation property list. * - * Return: TRUE: found - * FALSE: not found - * FAIL: error + * Return: TRUE: found + * FALSE: not found + * FAIL: error * - * Programmer: Raymond Lu + * Programmer: Raymond Lu * 26 April 2013 * *------------------------------------------------------------------------- @@ -1198,7 +1188,7 @@ done: * * Return: Non-negative on success/Negative on failure * - * Programmer: Robb Matzke + * Programmer: Robb Matzke * Wednesday, April 15, 1998 * * Modifications: @@ -1258,7 +1248,7 @@ done: * * Return: Non-negative on success/Negative on failure * - * Programmer: Raymond Lu + * Programmer: Raymond Lu * Dec 19, 2002 * * Modifications: @@ -1302,13 +1292,13 @@ done: /*------------------------------------------------------------------------- - * Function: H5P_get_filter + * Function: H5P_get_filter * - * Purpose: Internal component of H5Pget_filter & H5Pget_filter_id + * Purpose: Internal component of H5Pget_filter & H5Pget_filter_id * - * Return: Non-negative on success/Negative on failure + * Return: Non-negative on success/Negative on failure * - * Programmer: Quincey Koziol + * Programmer: Quincey Koziol * Monday, October 23, 2006 * *------------------------------------------------------------------------- @@ -1330,7 +1320,7 @@ H5P_get_filter(const H5Z_filter_info_t *filter, unsigned int *flags/*out*/, /* Filter parameters */ if(cd_values) { - size_t i; /* Local index variable */ + size_t i; /* Local index variable */ for(i = 0; i < filter->cd_nelmts && i < *cd_nelmts; i++) cd_values[i] = filter->cd_values[i]; @@ -1460,8 +1450,8 @@ done: * property in the dataset access property list is * decoded. * - * Return: Success: Non-negative - * Failure: Negative + * Return: Success: Non-negative + * Failure: Negative * * Programmer: Mohamad Chaarawi * Monday, October 10, 2011 @@ -1553,15 +1543,15 @@ H5P__ocrt_pipeline_enc(const void *value, void **_pp, size_t *size) * property in the dataset access property list is * decoded. * - * Return: Success: Non-negative - * Failure: Negative + * Return: Success: Non-negative + * Failure: Negative * * Programmer: Mohamad Chaarawi * Monday, October 10, 2011 * *------------------------------------------------------------------------- */ -static herr_t +static herr_t H5P__ocrt_pipeline_dec(const void **_pp, void *_value) { H5O_pline_t *pline = (H5O_pline_t *)_value; /* Property to set */ @@ -1637,7 +1627,7 @@ H5P__ocrt_pipeline_dec(const void **_pp, void *_value) filter.cd_values = (unsigned *)H5MM_xfree(filter.cd_values); } /* end for */ -done: +done: FUNC_LEAVE_NOAPI(ret_value) } /* H5P__ocrt_pipeline_dec() */ @@ -1830,32 +1820,32 @@ done: #ifndef H5_NO_DEPRECATED_SYMBOLS /*------------------------------------------------------------------------- - * Function: H5Pget_filter1 - * - * Purpose: This is the query counterpart of H5Pset_filter() and returns - * information about a particular filter number in a permanent - * or transient pipeline depending on whether PLIST_ID is a - * dataset creation or transfer property list. On input, - * CD_NELMTS indicates the number of entries in the CD_VALUES - * array allocated by the caller while on exit it contains the - * number of values defined by the filter. The IDX + * Function: H5Pget_filter1 + * + * Purpose: This is the query counterpart of H5Pset_filter() and returns + * information about a particular filter number in a permanent + * or transient pipeline depending on whether PLIST_ID is a + * dataset creation or transfer property list. On input, + * CD_NELMTS indicates the number of entries in the CD_VALUES + * array allocated by the caller while on exit it contains the + * number of values defined by the filter. The IDX * should be a value between zero and N-1 as described for * H5Pget_nfilters() and the function will return failure if the * filter number is out of range. * - * Return: Success: Filter identification number. + * Return: Success: Filter identification number. * - * Failure: H5Z_FILTER_ERROR (Negative) + * Failure: H5Z_FILTER_ERROR (Negative) * - * Programmer: Robb Matzke + * Programmer: Robb Matzke * Wednesday, April 15, 1998 * *------------------------------------------------------------------------- */ H5Z_filter_t H5Pget_filter1(hid_t plist_id, unsigned idx, unsigned int *flags/*out*/, - size_t *cd_nelmts/*in_out*/, unsigned cd_values[]/*out*/, - size_t namelen, char name[]/*out*/) + size_t *cd_nelmts/*in_out*/, unsigned cd_values[]/*out*/, + size_t namelen, char name[]/*out*/) { H5O_pline_t pline; /* Filter pipeline */ const H5Z_filter_info_t *filter; /* Pointer to filter information */ @@ -1915,22 +1905,22 @@ done: /*------------------------------------------------------------------------- - * Function: H5Pget_filter_by_id1 + * Function: H5Pget_filter_by_id1 * - * Purpose: This is an additional query counterpart of H5Pset_filter() and + * Purpose: This is an additional query counterpart of H5Pset_filter() and * returns information about a particular filter in a permanent - * or transient pipeline depending on whether PLIST_ID is a - * dataset creation or transfer property list. On input, - * CD_NELMTS indicates the number of entries in the CD_VALUES - * array allocated by the caller while on exit it contains the - * number of values defined by the filter. The ID + * or transient pipeline depending on whether PLIST_ID is a + * dataset creation or transfer property list. On input, + * CD_NELMTS indicates the number of entries in the CD_VALUES + * array allocated by the caller while on exit it contains the + * number of values defined by the filter. The ID * should be the filter ID to retrieve the parameters for. If the * filter is not set for the property list, an error will be returned. * - * Return: Success: Non-negative - * Failure: Negative + * Return: Success: Non-negative + * Failure: Negative * - * Programmer: Quincey Koziol + * Programmer: Quincey Koziol * Friday, April 5, 2003 * *------------------------------------------------------------------------- diff --git a/src/H5Z.c b/src/H5Z.c index ef34d7c..1d023b5 100644 --- a/src/H5Z.c +++ b/src/H5Z.c @@ -14,17 +14,17 @@ #include "H5Zmodule.h" /* This source code file is part of the H5Z module */ -#include "H5private.h" /* Generic Functions */ -#include "H5Dprivate.h" /* Dataset functions */ -#include "H5Eprivate.h" /* Error handling */ -#include "H5Fprivate.h" /* File */ -#include "H5Iprivate.h" /* IDs */ -#include "H5MMprivate.h" /* Memory management */ -#include "H5Oprivate.h" /* Object headers */ -#include "H5Pprivate.h" /* Property lists */ -#include "H5PLprivate.h" /* Plugins */ -#include "H5Sprivate.h" /* Dataspace functions */ -#include "H5Zpkg.h" /* Data filters */ +#include "H5private.h" /* Generic Functions */ +#include "H5Dprivate.h" /* Dataset functions */ +#include "H5Eprivate.h" /* Error handling */ +#include "H5Fprivate.h" /* File */ +#include "H5Iprivate.h" /* IDs */ +#include "H5MMprivate.h" /* Memory management */ +#include "H5Oprivate.h" /* Object headers */ +#include "H5Pprivate.h" /* Property lists */ +#include "H5PLprivate.h" /* Plugins */ +#include "H5Sprivate.h" /* Dataspace functions */ +#include "H5Zpkg.h" /* Data filters */ #ifdef H5_HAVE_SZLIB_H # include "szlib.h" @@ -34,10 +34,10 @@ #ifdef H5Z_DEBUG typedef struct H5Z_stats_t { struct { - hsize_t total; /*total number of bytes processed */ - hsize_t errors; /*bytes of total attributable to errors */ - H5_timer_t timer; /*execution time including errors */ - } stats[2]; /*0=output, 1=input */ + hsize_t total; /*total number of bytes processed */ + hsize_t errors; /*bytes of total attributable to errors */ + H5_timer_t timer; /*execution time including errors */ + } stats[2]; /*0=output, 1=input */ } H5Z_stats_t; #endif /* H5Z_DEBUG */ @@ -56,11 +56,11 @@ typedef enum { hbool_t H5_PKG_INIT_VAR = FALSE; /* Local variables */ -static size_t H5Z_table_alloc_g = 0; -static size_t H5Z_table_used_g = 0; -static H5Z_class2_t *H5Z_table_g = NULL; +static size_t H5Z_table_alloc_g = 0; +static size_t H5Z_table_used_g = 0; +static H5Z_class2_t *H5Z_table_g = NULL; #ifdef H5Z_DEBUG -static H5Z_stats_t *H5Z_stat_table_g = NULL; +static H5Z_stats_t *H5Z_stat_table_g = NULL; #endif /* H5Z_DEBUG */ /* Local functions */ @@ -71,15 +71,11 @@ static int H5Z__flush_file_cb(void *obj_ptr, hid_t obj_id, void *key); /*------------------------------------------------------------------------- - * Function: H5Z__init_package + * Function: H5Z__init_package * - * Purpose: Initializes the data filter layer. - * - * Return: Non-negative on success/Negative on failure - * - * Programmer: Robb Matzke - * Thursday, April 16, 1998 + * Purpose: Initializes the data filter layer. * + * Return: Non-negative on success/Negative on failure *------------------------------------------------------------------------- */ herr_t @@ -116,21 +112,17 @@ done: /*------------------------------------------------------------------------- - * Function: H5Z_term_package - * - * Purpose: Terminate the H5Z layer. - * - * Return: void + * Function: H5Z_term_package * - * Programmer: Robb Matzke - * Thursday, April 16, 1998 + * Purpose: Terminate the H5Z layer. * + * Return: void *------------------------------------------------------------------------- */ int H5Z_term_package(void) { - int n = 0; + int n = 0; FUNC_ENTER_NOAPI_NOINIT_NOERR @@ -140,54 +132,54 @@ H5Z_term_package(void) int dir, nprint = 0; size_t i; - if(H5DEBUG(Z)) { - for(i = 0; i < H5Z_table_used_g; i++) { - for(dir = 0; dir<2; dir++) { - if(0 == H5Z_stat_table_g[i].stats[dir].total) + if(H5DEBUG(Z)) { + for(i = 0; i < H5Z_table_used_g; i++) { + for(dir = 0; dir<2; dir++) { + if(0 == H5Z_stat_table_g[i].stats[dir].total) continue; - if(0 == nprint++) { - /* Print column headers */ - HDfprintf(H5DEBUG(Z), "H5Z: filter statistics " - "accumulated over life of library:\n"); - HDfprintf(H5DEBUG(Z), - " %-16s %10s %10s %8s %8s %8s %10s\n", - "Filter", "Total", "Errors", "User", - "System", "Elapsed", "Bandwidth"); - HDfprintf(H5DEBUG(Z), - " %-16s %10s %10s %8s %8s %8s %10s\n", - "------", "-----", "------", "----", - "------", "-------", "---------"); - } /* end if */ - - /* Truncate the comment to fit in the field */ - HDstrncpy(comment, H5Z_table_g[i].name, sizeof comment); - comment[sizeof(comment) - 1] = '\0'; - - /* - * Format bandwidth to have four significant digits and - * units of `B/s', `kB/s', `MB/s', `GB/s', or `TB/s' or - * the word `Inf' if the elapsed time is zero. - */ - H5_bandwidth(bandwidth, - (double)(H5Z_stat_table_g[i].stats[dir].total), - H5Z_stat_table_g[i].stats[dir].timer.etime); - - /* Print the statistics */ - HDfprintf(H5DEBUG(Z), - " %s%-15s %10Hd %10Hd %8.2f %8.2f %8.2f " - "%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].timer.utime, - H5Z_stat_table_g[i].stats[dir].timer.stime, - H5Z_stat_table_g[i].stats[dir].timer.etime, - bandwidth); - } /* end for */ - } /* end for */ - } /* end if */ + if(0 == nprint++) { + /* Print column headers */ + HDfprintf(H5DEBUG(Z), "H5Z: filter statistics " + "accumulated over life of library:\n"); + HDfprintf(H5DEBUG(Z), + " %-16s %10s %10s %8s %8s %8s %10s\n", + "Filter", "Total", "Errors", "User", + "System", "Elapsed", "Bandwidth"); + HDfprintf(H5DEBUG(Z), + " %-16s %10s %10s %8s %8s %8s %10s\n", + "------", "-----", "------", "----", + "------", "-------", "---------"); + } /* end if */ + + /* Truncate the comment to fit in the field */ + HDstrncpy(comment, H5Z_table_g[i].name, sizeof comment); + comment[sizeof(comment) - 1] = '\0'; + + /* + * Format bandwidth to have four significant digits and + * units of `B/s', `kB/s', `MB/s', `GB/s', or `TB/s' or + * the word `Inf' if the elapsed time is zero. + */ + H5_bandwidth(bandwidth, + (double)(H5Z_stat_table_g[i].stats[dir].total), + H5Z_stat_table_g[i].stats[dir].timer.etime); + + /* Print the statistics */ + HDfprintf(H5DEBUG(Z), + " %s%-15s %10Hd %10Hd %8.2f %8.2f %8.2f " + "%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].timer.utime, + H5Z_stat_table_g[i].stats[dir].timer.stime, + H5Z_stat_table_g[i].stats[dir].timer.etime, + bandwidth); + } /* end for */ + } /* end for */ + } /* end if */ #endif /* H5Z_DEBUG */ - /* Free the table of filters */ + /* Free the table of filters */ if(H5Z_table_g) { H5Z_table_g = (H5Z_class2_t *)H5MM_xfree(H5Z_table_g); #ifdef H5Z_DEBUG @@ -198,7 +190,7 @@ H5Z_term_package(void) n++; } /* end if */ - /* Mark interface as closed */ + /* Mark interface as closed */ if(0 == n) H5_PKG_INIT_VAR = FALSE; } /* end if */ @@ -208,19 +200,11 @@ H5Z_term_package(void) /*------------------------------------------------------------------------- - * Function: H5Zregister - * - * Purpose: This function registers new filter. - * - * Return: Non-negative on success/Negative on failure - * - * Programmer: Robb Matzke - * Thursday, April 16, 1998 + * Function: H5Zregister * - * Modifications: - * Changed to pass in H5Z_class_t struct - * Quincey Koziol, April 5, 2003 + * Purpose: This function registers new filter. * + * Return: Non-negative on success/Negative on failure *------------------------------------------------------------------------- */ herr_t @@ -235,7 +219,7 @@ H5Zregister(const void *cls) /* Check args */ if (cls_real==NULL) - HGOTO_ERROR (H5E_ARGS, H5E_BADVALUE, FAIL, "invalid filter class") + HGOTO_ERROR (H5E_ARGS, H5E_BADVALUE, FAIL, "invalid filter class") /* Check H5Z_class_t version number; this is where a function to convert * from an outdated version should be called. @@ -272,15 +256,15 @@ H5Zregister(const void *cls) } /* end if */ if (cls_real->id<0 || cls_real->id>H5Z_FILTER_MAX) - HGOTO_ERROR (H5E_ARGS, H5E_BADVALUE, FAIL, "invalid filter identification number") + HGOTO_ERROR (H5E_ARGS, H5E_BADVALUE, FAIL, "invalid filter identification number") if (cls_real->idfilter==NULL) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no filter function specified") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no filter function specified") /* Do it */ if (H5Z_register (cls_real)<0) - HGOTO_ERROR (H5E_PLINE, H5E_CANTINIT, FAIL, "unable to register filter") + HGOTO_ERROR (H5E_PLINE, H5E_CANTINIT, FAIL, "unable to register filter") done: FUNC_LEAVE_API(ret_value) @@ -288,24 +272,18 @@ done: /*------------------------------------------------------------------------- - * Function: H5Z_register - * - * Purpose: Same as the public version except this one allows filters - * to be set for predefined method numbers id) + if(H5Z_table_g[i].id == cls->id) break; /* Filter not already registered */ if(i >= H5Z_table_used_g) { - if(H5Z_table_used_g >= H5Z_table_alloc_g) { - size_t n = MAX(H5Z_MAX_NFILTERS, 2*H5Z_table_alloc_g); - H5Z_class2_t *table = (H5Z_class2_t *)H5MM_realloc(H5Z_table_g, n * sizeof(H5Z_class2_t)); + if(H5Z_table_used_g >= H5Z_table_alloc_g) { + size_t n = MAX(H5Z_MAX_NFILTERS, 2*H5Z_table_alloc_g); + H5Z_class2_t *table = (H5Z_class2_t *)H5MM_realloc(H5Z_table_g, n * sizeof(H5Z_class2_t)); #ifdef H5Z_DEBUG - H5Z_stats_t *stat_table = (H5Z_stats_t *)H5MM_realloc(H5Z_stat_table_g, n * sizeof(H5Z_stats_t)); + H5Z_stats_t *stat_table = (H5Z_stats_t *)H5MM_realloc(H5Z_stat_table_g, n * sizeof(H5Z_stats_t)); #endif /* H5Z_DEBUG */ - if(!table) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "unable to extend filter table") - H5Z_table_g = table; + if(!table) + HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "unable to extend filter table") + H5Z_table_g = table; #ifdef H5Z_DEBUG - if(!stat_table) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "unable to extend filter statistics table") - H5Z_stat_table_g = stat_table; + if(!stat_table) + HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "unable to extend filter statistics table") + H5Z_stat_table_g = stat_table; #endif /* H5Z_DEBUG */ - H5Z_table_alloc_g = n; - } /* end if */ + H5Z_table_alloc_g = n; + } /* end if */ - /* Initialize */ - i = H5Z_table_used_g++; - HDmemcpy(H5Z_table_g+i, cls, sizeof(H5Z_class2_t)); + /* Initialize */ + i = H5Z_table_used_g++; + HDmemcpy(H5Z_table_g+i, cls, sizeof(H5Z_class2_t)); #ifdef H5Z_DEBUG - HDmemset(H5Z_stat_table_g+i, 0, sizeof(H5Z_stats_t)); + HDmemset(H5Z_stat_table_g+i, 0, sizeof(H5Z_stats_t)); #endif /* H5Z_DEBUG */ } /* end if */ /* Filter already registered */ else { - /* Replace old contents */ - HDmemcpy(H5Z_table_g+i, cls, sizeof(H5Z_class2_t)); + /* Replace old contents */ + HDmemcpy(H5Z_table_g+i, cls, sizeof(H5Z_class2_t)); } /* end else */ done: @@ -356,15 +334,11 @@ done: /*------------------------------------------------------------------------- - * Function: H5Zunregister - * - * Purpose: This function unregisters a filter. - * - * Return: Non-negative on success/Negative on failure + * Function: H5Zunregister * - * Programmer: Quincey Koziol - * Thursday, November 14, 2002 + * Purpose: This function unregisters a filter. * + * Return: Non-negative on success/Negative on failure *------------------------------------------------------------------------- */ herr_t @@ -377,13 +351,13 @@ H5Zunregister(H5Z_filter_t id) /* Check args */ if(id < 0 || id > H5Z_FILTER_MAX) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid filter identification number") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid filter identification number") if(id < H5Z_FILTER_RESERVED) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "unable to modify predefined filters") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "unable to modify predefined filters") /* Do it */ if(H5Z_unregister(id) < 0) - HGOTO_ERROR(H5E_PLINE, H5E_CANTINIT, FAIL, "unable to unregister filter") + HGOTO_ERROR(H5E_PLINE, H5E_CANTINIT, FAIL, "unable to unregister filter") done: FUNC_LEAVE_API(ret_value) @@ -391,16 +365,12 @@ done: /*------------------------------------------------------------------------- - * Function: H5Z_unregister + * Function: H5Z_unregister * - * Purpose: Same as the public version except this one allows filters - * to be unset for predefined method numbers found = TRUE; ret_value = TRUE; @@ -546,19 +508,15 @@ done: /*------------------------------------------------------------------------- - * Function: H5Z__check_unregister_dset_cb + * Function: H5Z__check_unregister_dset_cb * - * Purpose: The callback function for H5Z_unregister. It iterates - * through all opened objects. If the object is a dataset - * or a group and it uses the filter to be unregistered, the - * function returns TRUE. - * - * Return: TRUE if the object uses the filter. - * FALSE otherwise. - * - * Programmer: Raymond Lu - * 6 May 2013 + * Purpose: The callback function for H5Z_unregister. It iterates + * through all opened objects. If the object is a dataset + * or a group and it uses the filter to be unregistered, the + * function returns TRUE. * + * Return: TRUE if the object uses the filter. + * FALSE otherwise. *------------------------------------------------------------------------- */ static int @@ -574,7 +532,7 @@ H5Z__check_unregister_dset_cb(void *obj_ptr, hid_t H5_ATTR_UNUSED obj_id, void * HDassert(obj_ptr); /* Get the dataset creation property */ - if((ocpl_id = H5D_get_create_plist((H5D_t *)obj_ptr)) < 0) + if((ocpl_id = H5D_get_create_plist((H5D_t *)obj_ptr)) < 0) HGOTO_ERROR(H5E_PLINE, H5E_CANTGET, FAIL, "can't get dataset creation property list") /* Check if the filter is in the dataset creation property list */ @@ -583,7 +541,7 @@ H5Z__check_unregister_dset_cb(void *obj_ptr, hid_t H5_ATTR_UNUSED obj_id, void * /* H5I_iterate expects TRUE to stop the loop over objects. Stop the loop and * let H5Z_unregister return failure. - */ + */ if(filter_in_pline) { object->found = TRUE; ret_value = TRUE; @@ -599,17 +557,13 @@ done: /*------------------------------------------------------------------------- - * Function: H5Z__flush_file_cb + * Function: H5Z__flush_file_cb * - * Purpose: The callback function for H5Z_unregister. It iterates - * through all opened files and flush them. - * - * Return: FALSE if finishes flushing and moves on - * FAIL if there is an error - * - * Programmer: Raymond Lu - * 6 May 2013 + * Purpose: The callback function for H5Z_unregister. It iterates + * through all opened files and flush them. * + * Return: FALSE if finishes flushing and moves on + * FAIL if there is an error *------------------------------------------------------------------------- */ static int @@ -621,7 +575,7 @@ H5Z__flush_file_cb(void *obj_ptr, hid_t H5_ATTR_UNUSED obj_id, void H5_ATTR_UNUS HDassert(obj_ptr); - /* Call the flush routine for mounted file hierarchies. Do a global flush + /* Call the flush routine for mounted file hierarchies. Do a global flush * if the file is opened for write */ if(H5F_ACC_RDWR & H5F_INTENT((H5F_t *)obj_ptr)) { if(H5F_flush_mounts((H5F_t *)obj_ptr, H5AC_ind_read_dxpl_id, H5AC_rawdata_dxpl_id) < 0) @@ -634,17 +588,11 @@ done: /*------------------------------------------------------------------------- - * Function: H5Zfilter_avail - * - * Purpose: Check if a filter is available - * - * Return: Non-negative (TRUE/FALSE) on success/Negative on failure + * Function: H5Zfilter_avail * - * Programmer: Quincey Koziol - * Thursday, November 14, 2002 - * - * Modifications: + * Purpose: Check if a filter is available * + * Return: Non-negative (TRUE/FALSE) on success/Negative on failure *------------------------------------------------------------------------- */ htri_t @@ -658,15 +606,9 @@ H5Zfilter_avail(H5Z_filter_t id) /* Check args */ if(id<0 || id>H5Z_FILTER_MAX) HGOTO_ERROR (H5E_ARGS, H5E_BADVALUE, FAIL, "invalid filter identification number") - - if((ret_value = H5Z_filter_avail(id)) < 0) - HGOTO_ERROR(H5E_PLINE, H5E_NOTFOUND, FAIL, "unable to check the availability of the filter") - else if(ret_value == FALSE) { - const H5Z_class2_t *filter_info; - if(NULL != (filter_info = (const H5Z_class2_t *)H5PL_load(H5PL_TYPE_FILTER, (int)id))) - ret_value = TRUE; - } /* end if */ + if((ret_value = H5Z_filter_avail(id)) < 0) + HGOTO_ERROR(H5E_PLINE, H5E_NOTFOUND, FAIL, "unable to check the availability of the filter") done: FUNC_LEAVE_API(ret_value) @@ -674,51 +616,48 @@ done: /*------------------------------------------------------------------------- - * Function: H5Z_filter_avail - * - * Purpose: Private function to check if a filter is available + * Function: H5Z_filter_avail * - * Return: Non-negative (TRUE/FALSE) on success/Negative on failure - * - * Programmer: Raymond Lu - * 13 February 2013 + * Purpose: Private function to check if a filter is available * + * Return: Non-negative (TRUE/FALSE) on success/Negative on failure *------------------------------------------------------------------------- */ htri_t H5Z_filter_avail(H5Z_filter_t id) { size_t i; /* Local index variable */ + const H5Z_class2_t *filter_info; htri_t ret_value = FALSE; /* Return value */ FUNC_ENTER_NOAPI(FAIL) /* Is the filter already registered? */ for(i = 0; i < H5Z_table_used_g; i++) - if(H5Z_table_g[i].id == id) - HGOTO_DONE(TRUE) + if(H5Z_table_g[i].id == id) + HGOTO_DONE(TRUE) + if(NULL != (filter_info = (const H5Z_class2_t *)H5PL_load(H5PL_TYPE_FILTER, (int)id))) { + if(H5Z_register(filter_info) < 0) + HGOTO_ERROR(H5E_PLINE, H5E_CANTINIT, FAIL, "unable to register loaded filter") + HGOTO_DONE(TRUE) + } done: FUNC_LEAVE_NOAPI(ret_value) } /* end H5Z_filter_avail() */ /*------------------------------------------------------------------------- - * Function: H5Z_prelude_callback + * Function: H5Z_prelude_callback * - * Purpose: Makes a dataset creation "prelude" callback for the "can_apply" - * or "set_local" routines. + * Purpose: Makes a dataset creation "prelude" callback for the "can_apply" + * or "set_local" routines. * - * Return: Non-negative on success/Negative on failure - * - * Programmer: Quincey Koziol - * Friday, April 4, 2003 - * - * Notes: - * The chunk dimensions are used to create a dataspace, instead - * of passing in the dataset's dataspace, since the chunk - * dimensions are what the I/O filter will actually see + * Return: Non-negative on success/Negative on failure * + * Notes: The chunk dimensions are used to create a dataspace, instead + * of passing in the dataset's dataspace, since the chunk + * dimensions are what the I/O filter will actually see *------------------------------------------------------------------------- */ static herr_t @@ -761,7 +700,7 @@ H5Z_prelude_callback(const H5O_pline_t *pline, hid_t dcpl_id, hid_t type_id, if(status < 0) HGOTO_ERROR(H5E_PLINE, H5E_CANAPPLY, FAIL, "error during user callback") - /* Indicate filter can't apply to this combination of parameters. + /* Indicate filter can't apply to this combination of parameters. * If the filter is NOT optional, returns failure. */ if(status == FALSE && !(pline->filter[u].flags & H5Z_FLAG_OPTIONAL)) HGOTO_ERROR(H5E_PLINE, H5E_CANAPPLY, FAIL, "filter parameters not appropriate") @@ -791,21 +730,16 @@ done: /*------------------------------------------------------------------------- - * Function: H5Z_prepare_prelude_callback_dcpl - * - * Purpose: Prepares to make a dataset creation "prelude" callback - * for the "can_apply" or "set_local" routines. + * Function: H5Z_prepare_prelude_callback_dcpl * - * Return: Non-negative on success/Negative on failure + * Purpose: Prepares to make a dataset creation "prelude" callback + * for the "can_apply" or "set_local" routines. * - * Programmer: Quincey Koziol - * Friday, April 4, 2003 - * - * Notes: - * The chunk dimensions are used to create a dataspace, instead - * of passing in the dataset's dataspace, since the chunk - * dimensions are what the I/O filter will actually see + * Return: Non-negative on success/Negative on failure * + * Notes: The chunk dimensions are used to create a dataspace, instead + * of passing in the dataset's dataspace, since the chunk + * dimensions are what the I/O filter will actually see *------------------------------------------------------------------------- */ static herr_t @@ -821,7 +755,7 @@ H5Z_prepare_prelude_callback_dcpl(hid_t dcpl_id, hid_t type_id, H5Z_prelude_type /* Check if the property list is non-default */ if(dcpl_id != H5P_DATASET_CREATE_DEFAULT) { - H5P_genplist_t *dc_plist; /* Dataset creation property list object */ + H5P_genplist_t *dc_plist; /* Dataset creation property list object */ H5O_layout_t dcpl_layout; /* Dataset's layout information */ /* Get dataset creation property list object */ @@ -874,22 +808,17 @@ done: /*------------------------------------------------------------------------- - * Function: H5Z_can_apply - * - * Purpose: Checks if all the filters defined in the dataset creation - * property list can be applied to a particular combination of - * datatype and dataspace for a dataset. + * Function: H5Z_can_apply * - * Return: Non-negative on success/Negative on failure + * Purpose: Checks if all the filters defined in the dataset creation + * property list can be applied to a particular combination of + * datatype and dataspace for a dataset. * - * Programmer: Quincey Koziol - * Thursday, April 3, 2003 - * - * Notes: - * The chunk dimensions are used to create a dataspace, instead - * of passing in the dataset's dataspace, since the chunk - * dimensions are what the I/O filter will actually see + * Return: Non-negative on success/Negative on failure * + * Notes: The chunk dimensions are used to create a dataspace, instead + * of passing in the dataset's dataspace, since the chunk + * dimensions are what the I/O filter will actually see *------------------------------------------------------------------------- */ herr_t @@ -909,22 +838,17 @@ done: /*------------------------------------------------------------------------- - * Function: H5Z_set_local - * - * Purpose: Makes callbacks to modify dataset creation list property - * settings for filters on a new dataset, based on the datatype - * and dataspace of that dataset (chunk). + * Function: H5Z_set_local * - * Return: Non-negative on success/Negative on failure + * Purpose: Makes callbacks to modify dataset creation list property + * settings for filters on a new dataset, based on the datatype + * and dataspace of that dataset (chunk). * - * Programmer: Quincey Koziol - * Friday, April 4, 2003 - * - * Notes: - * The chunk dimensions are used to create a dataspace, instead - * of passing in the dataset's dataspace, since the chunk - * dimensions are what the I/O filter will actually see + * Return: Non-negative on success/Negative on failure * + * Notes: The chunk dimensions are used to create a dataspace, instead + * of passing in the dataset's dataspace, since the chunk + * dimensions are what the I/O filter will actually see *------------------------------------------------------------------------- */ herr_t @@ -944,17 +868,13 @@ done: /*------------------------------------------------------------------------- - * Function: H5Z_can_apply_direct - * - * Purpose: Checks if all the filters defined in the pipeline can be - * applied to an opaque byte stream (currently only a group). - * The pipeline is assumed to have at least one filter. - * - * Return: Non-negative on success/Negative on failure + * Function: H5Z_can_apply_direct * - * Programmer: Neil Fortner - * Tuesday, September 22, 2009 + * Purpose: Checks if all the filters defined in the pipeline can be + * applied to an opaque byte stream (currently only a group). + * The pipeline is assumed to have at least one filter. * + * Return: Non-negative on success/Negative on failure *------------------------------------------------------------------------- */ herr_t @@ -976,22 +896,17 @@ done: /*------------------------------------------------------------------------- - * Function: H5Z_set_local_direct + * Function: H5Z_set_local_direct * - * Purpose: Makes callbacks to modify local settings for filters on a - * new opaque object. The pipeline is assumed to have at - * least one filter. + * Purpose: Makes callbacks to modify local settings for filters on a + * new opaque object. The pipeline is assumed to have at + * least one filter. * - * Return: Non-negative on success/Negative on failure - * - * Programmer: Neil Fortner - * Tuesday, September 22, 2009 - * - * Notes: - * This callback will almost certainly not do anything - * useful, other than to make certain that the filter will - * accept opque data. + * Return: Non-negative on success/Negative on failure * + * Notes: This callback will almost certainly not do anything + * useful, other than to make certain that the filter will + * accept opaque data. *------------------------------------------------------------------------- */ herr_t @@ -1013,24 +928,18 @@ done: /*------------------------------------------------------------------------- - * Function: H5Z_modify - * - * Purpose: Modify filter parameters for specified pipeline. + * Function: H5Z_modify * - * Return: Non-negative on success/Negative on failure - * - * Programmer: Quincey Koziol - * Friday, April 5, 2003 - * - * Modifications: + * Purpose: Modify filter parameters for specified pipeline. * + * Return: Non-negative on success/Negative on failure *------------------------------------------------------------------------- */ herr_t H5Z_modify(const H5O_pline_t *pline, H5Z_filter_t filter, unsigned flags, - size_t cd_nelmts, const unsigned int cd_values[/*cd_nelmts*/]) + size_t cd_nelmts, const unsigned int cd_values[/*cd_nelmts*/]) { - size_t idx; /* Index of filter in pipeline */ + size_t idx; /* Index of filter in pipeline */ herr_t ret_value = SUCCEED; /* Return value */ FUNC_ENTER_NOAPI(FAIL) @@ -1047,7 +956,7 @@ H5Z_modify(const H5O_pline_t *pline, H5Z_filter_t filter, unsigned flags, /* Check if the filter was not already in the pipeline */ if(idx > pline->nused) - HGOTO_ERROR(H5E_PLINE, H5E_NOTFOUND, FAIL, "filter not in pipeline") + HGOTO_ERROR(H5E_PLINE, H5E_NOTFOUND, FAIL, "filter not in pipeline") /* Change parameters for filter */ pline->filter[idx].flags = flags; @@ -1055,11 +964,11 @@ H5Z_modify(const H5O_pline_t *pline, H5Z_filter_t filter, unsigned flags, /* Free any existing parameters */ if(pline->filter[idx].cd_values != NULL && pline->filter[idx].cd_values != pline->filter[idx]._cd_values) - H5MM_xfree(pline->filter[idx].cd_values); + H5MM_xfree(pline->filter[idx].cd_values); /* Set parameters */ if(cd_nelmts > 0) { - size_t i; /* Local index variable */ + size_t i; /* Local index variable */ /* Allocate memory or point at internal buffer */ if(cd_nelmts > H5Z_COMMON_CD_VALUES) { @@ -1071,8 +980,8 @@ H5Z_modify(const H5O_pline_t *pline, H5Z_filter_t filter, unsigned flags, pline->filter[idx].cd_values = pline->filter[idx]._cd_values; /* Copy client data values */ - for(i = 0; i < cd_nelmts; i++) - pline->filter[idx].cd_values[i] = cd_values[i]; + for(i = 0; i < cd_nelmts; i++) + pline->filter[idx].cd_values[i] = cd_values[i]; } /* end if */ else pline->filter[idx].cd_values = NULL; @@ -1083,24 +992,18 @@ done: /*------------------------------------------------------------------------- - * Function: H5Z_append - * - * Purpose: Append another filter to the specified pipeline. + * Function: H5Z_append * - * Return: Non-negative on success/Negative on failure - * - * Programmer: Robb Matzke - * Tuesday, August 4, 1998 - * - * Modifications: + * Purpose: Append another filter to the specified pipeline. * + * Return: Non-negative on success/Negative on failure *------------------------------------------------------------------------- */ herr_t H5Z_append(H5O_pline_t *pline, H5Z_filter_t filter, unsigned flags, - size_t cd_nelmts, const unsigned int cd_values[/*cd_nelmts*/]) + size_t cd_nelmts, const unsigned int cd_values[/*cd_nelmts*/]) { - size_t idx; + size_t idx; herr_t ret_value = SUCCEED; /* Return value */ FUNC_ENTER_NOAPI(FAIL) @@ -1115,7 +1018,7 @@ H5Z_append(H5O_pline_t *pline, H5Z_filter_t filter, unsigned flags, * decide to relax this restriction in the future. */ if(pline->nused >= H5Z_MAX_NFILTERS) - HGOTO_ERROR(H5E_PLINE, H5E_CANTINIT, FAIL, "too many filters in pipeline") + HGOTO_ERROR(H5E_PLINE, H5E_CANTINIT, FAIL, "too many filters in pipeline") /* Check for freshly allocated filter pipeline */ if(pline->version == 0) @@ -1123,7 +1026,7 @@ H5Z_append(H5O_pline_t *pline, H5Z_filter_t filter, unsigned flags, /* Allocate additional space in the pipeline if it's full */ if(pline->nused >= pline->nalloc) { - H5O_pline_t x; + H5O_pline_t x; size_t n; /* Each filter's data may be stored internally or may be @@ -1137,10 +1040,10 @@ H5Z_append(H5O_pline_t *pline, H5Z_filter_t filter, unsigned flags, if(pline->filter[n].cd_values == pline->filter[n]._cd_values) pline->filter[n].cd_values = (unsigned *)((void *) ~((size_t)NULL)); - x.nalloc = MAX(H5Z_MAX_NFILTERS, 2 * pline->nalloc); - x.filter = (H5Z_filter_info_t *)H5MM_realloc(pline->filter, x.nalloc * sizeof(x.filter[0])); - if(NULL == x.filter) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed for filter pipeline") + x.nalloc = MAX(H5Z_MAX_NFILTERS, 2 * pline->nalloc); + x.filter = (H5Z_filter_info_t *)H5MM_realloc(pline->filter, x.nalloc * sizeof(x.filter[0])); + if(NULL == x.filter) + HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed for filter pipeline") /* Fix pointers in previous filters that need to point to their own * internal data. @@ -1150,18 +1053,18 @@ H5Z_append(H5O_pline_t *pline, H5Z_filter_t filter, unsigned flags, x.filter[n].cd_values = x.filter[n]._cd_values; /* Point to newly allocated buffer */ - pline->nalloc = x.nalloc; - pline->filter = x.filter; + pline->nalloc = x.nalloc; + pline->filter = x.filter; } /* end if */ /* Add the new filter to the pipeline */ idx = pline->nused; pline->filter[idx].id = filter; pline->filter[idx].flags = flags; - pline->filter[idx].name = NULL; /*we'll pick it up later*/ + pline->filter[idx].name = NULL; /* we'll pick it up later*/ pline->filter[idx].cd_nelmts = cd_nelmts; if(cd_nelmts > 0) { - size_t i; /* Local index variable */ + size_t i; /* Local index variable */ /* Allocate memory or point at internal buffer */ if(cd_nelmts > H5Z_COMMON_CD_VALUES) { @@ -1173,8 +1076,8 @@ H5Z_append(H5O_pline_t *pline, H5Z_filter_t filter, unsigned flags, pline->filter[idx].cd_values = pline->filter[idx]._cd_values; /* Copy client data values */ - for(i = 0; i < cd_nelmts; i++) - pline->filter[idx].cd_values[i] = cd_values[i]; + for(i = 0; i < cd_nelmts; i++) + pline->filter[idx].cd_values[i] = cd_values[i]; } /* end if */ else pline->filter[idx].cd_values = NULL; @@ -1187,32 +1090,26 @@ done: /*------------------------------------------------------------------------- - * Function: H5Z_find_idx - * - * Purpose: Given a filter ID return the offset in the global array - * that holds all the registered filters. - * - * Return: Success: Non-negative index of entry in global filter table. - * Failure: Negative + * Function: H5Z_find_idx * - * Programmer: Quincey Koziol - * Friday, April 5, 2003 - * - * Modifications: + * Purpose: Given a filter ID return the offset in the global array + * that holds all the registered filters. * + * Return: Success: Non-negative index of entry in global filter table. + * Failure: Negative *------------------------------------------------------------------------- */ static int H5Z_find_idx(H5Z_filter_t id) { size_t i; /* Local index variable */ - int ret_value=FAIL; /* Return value */ + int ret_value = FAIL; /* Return value */ FUNC_ENTER_NOAPI_NOINIT_NOERR for (i=0; ifilter[].flags). The filters are processed in - * definition order unless the H5Z_FLAG_REVERSE is set. The - * FILTER_MASK is a bit-mask to indicate which filters to skip - * and on exit will indicate which filters failed. Each - * filter has an index number in the pipeline and that index - * number is the filter's bit in the FILTER_MASK. NBYTES is the - * number of bytes of data to filter and on exit should be the - * number of resulting bytes while BUF_SIZE holds the total - * allocated size of the buffer, which is pointed to BUF. - * - * If the buffer must grow during processing of the pipeline - * then the pipeline function should free the original buffer - * and return a fresh buffer, adjusting BUF_SIZE accordingly. - * - * Return: Non-negative on success/Negative on failure - * - * Programmer: Robb Matzke - * Tuesday, August 4, 1998 - * - * Modifications: - * + * Function: H5Z_pipeline + * + * Purpose: Process data through the filter pipeline. The FLAGS argument + * is the filter invocation flags (definition flags come from + * the PLINE->filter[].flags). The filters are processed in + * definition order unless the H5Z_FLAG_REVERSE is set. The + * FILTER_MASK is a bit-mask to indicate which filters to skip + * and on exit will indicate which filters failed. Each + * filter has an index number in the pipeline and that index + * number is the filter's bit in the FILTER_MASK. NBYTES is the + * number of bytes of data to filter and on exit should be the + * number of resulting bytes while BUF_SIZE holds the total + * allocated size of the buffer, which is pointed to BUF. + * + * If the buffer must grow during processing of the pipeline + * then the pipeline function should free the original buffer + * and return a fresh buffer, adjusting BUF_SIZE accordingly. + * + * Return: Non-negative on success/Negative on failure *------------------------------------------------------------------------- */ herr_t H5Z_pipeline(const H5O_pline_t *pline, unsigned flags, - unsigned *filter_mask/*in,out*/, H5Z_EDC_t edc_read, - H5Z_cb_t cb_struct, size_t *nbytes/*in,out*/, - size_t *buf_size/*in,out*/, void **buf/*in,out*/) + unsigned *filter_mask/*in,out*/, H5Z_EDC_t edc_read, + H5Z_cb_t cb_struct, size_t *nbytes/*in,out*/, + size_t *buf_size/*in,out*/, void **buf/*in,out*/) { - size_t i, idx, new_nbytes; - int fclass_idx; /* Index of filter class in global table */ - H5Z_class2_t *fclass=NULL; /* Filter class pointer */ + size_t i, idx, new_nbytes; + int fclass_idx; /* Index of filter class in global table */ + H5Z_class2_t *fclass = NULL; /* Filter class pointer */ #ifdef H5Z_DEBUG - H5Z_stats_t *fstats=NULL; /* Filter stats pointer */ - H5_timer_t timer; + H5Z_stats_t *fstats = NULL; /* Filter stats pointer */ + H5_timer_t timer; #endif - unsigned failed = 0; - unsigned tmp_flags; - herr_t ret_value=SUCCEED; /* Return value */ + unsigned failed = 0; + unsigned tmp_flags; + herr_t ret_value = SUCCEED; /* Return value */ FUNC_ENTER_NOAPI(FAIL) - HDassert(0==(flags & ~((unsigned)H5Z_FLAG_INVMASK))); + HDassert(0 == (flags & ~((unsigned)H5Z_FLAG_INVMASK))); HDassert(filter_mask); - HDassert(nbytes && *nbytes>0); - HDassert(buf_size && *buf_size>0); + HDassert(nbytes && *nbytes > 0); + HDassert(buf_size && *buf_size > 0); HDassert(buf && *buf); - HDassert(!pline || pline->nusednused < H5Z_MAX_NFILTERS); if (pline && (flags & H5Z_FLAG_REVERSE)) { /* Read */ - for (i=pline->nused; i>0; --i) { - idx = i-1; - - if (*filter_mask & ((unsigned)1<filter[idx].id)) < 0) { + for (i = pline->nused; i > 0; --i) { + idx = i - 1; + + if (*filter_mask & ((unsigned)1 << idx)) { + failed |= (unsigned)1 << idx; + continue;/*filter excluded*/ + } + + /* If the filter isn't registered and the application doesn't + * indicate no plugin through HDF5_PRELOAD_PLUG (using the symbol "::"), + * try to load it dynamically and register it. Otherwise, return failure + */ + if((fclass_idx = H5Z_find_idx(pline->filter[idx].id)) < 0) { hbool_t issue_error = FALSE; - const H5Z_class2_t *filter_info; + const H5Z_class2_t *filter_info; - /* Try loading the filter */ - if(NULL != (filter_info = (const H5Z_class2_t *)H5PL_load(H5PL_TYPE_FILTER, (int)(pline->filter[idx].id)))) { - /* Register the filter we loaded */ - if(H5Z_register(filter_info) < 0) - HGOTO_ERROR(H5E_PLINE, H5E_CANTINIT, FAIL, "unable to register filter") + /* Try loading the filter */ + if(NULL != (filter_info = (const H5Z_class2_t *)H5PL_load(H5PL_TYPE_FILTER, (int)(pline->filter[idx].id)))) { + /* Register the filter we loaded */ + if(H5Z_register(filter_info) < 0) + HGOTO_ERROR(H5E_PLINE, H5E_CANTINIT, FAIL, "unable to register filter") - /* Search in the table of registered filters again to find the dynamic filter just loaded and registered */ - if((fclass_idx = H5Z_find_idx(pline->filter[idx].id)) < 0) - issue_error = TRUE; - } /* end if */ - else - issue_error = TRUE; + /* Search in the table of registered filters again to find the dynamic filter just loaded and registered */ + if((fclass_idx = H5Z_find_idx(pline->filter[idx].id)) < 0) + issue_error = TRUE; + } /* end if */ + else + issue_error = TRUE; /* Check for error */ if(issue_error) { - /* Print out the filter name to give more info. But the name is optional for - * the filter */ + /* Print out the filter name to give more info. But the name is optional for + * the filter */ if(pline->filter[idx].name) HGOTO_ERROR(H5E_PLINE, H5E_READERROR, FAIL, "required filter '%s' is not registered", pline->filter[idx].name) else @@ -1352,65 +1235,65 @@ H5Z_pipeline(const H5O_pline_t *pline, unsigned flags, } /* end if */ } /* end if */ - fclass=&H5Z_table_g[fclass_idx]; + fclass = &H5Z_table_g[fclass_idx]; #ifdef H5Z_DEBUG - fstats=&H5Z_stat_table_g[fclass_idx]; - H5_timer_begin(&timer); + fstats = &H5Z_stat_table_g[fclass_idx]; + H5_timer_begin(&timer); #endif - tmp_flags=flags|(pline->filter[idx].flags); - tmp_flags|=(edc_read== H5Z_DISABLE_EDC) ? H5Z_FLAG_SKIP_EDC : 0; - new_nbytes = (fclass->filter)(tmp_flags, pline->filter[idx].cd_nelmts, - pline->filter[idx].cd_values, *nbytes, buf_size, buf); + tmp_flags = flags|(pline->filter[idx].flags); + tmp_flags |= (edc_read== H5Z_DISABLE_EDC) ? H5Z_FLAG_SKIP_EDC : 0; + new_nbytes = (fclass->filter)(tmp_flags, pline->filter[idx].cd_nelmts, + pline->filter[idx].cd_values, *nbytes, buf_size, buf); #ifdef H5Z_DEBUG - H5_timer_end(&(fstats->stats[1].timer), &timer); - fstats->stats[1].total += MAX(*nbytes, new_nbytes); - if (0==new_nbytes) fstats->stats[1].errors += *nbytes; + H5_timer_end(&(fstats->stats[1].timer), &timer); + fstats->stats[1].total += MAX(*nbytes, new_nbytes); + if (0 == new_nbytes) fstats->stats[1].errors += *nbytes; #endif if(0==new_nbytes) { - if((cb_struct.func && (H5Z_CB_FAIL==cb_struct.func(pline->filter[idx].id, *buf, *buf_size, cb_struct.op_data))) - || !cb_struct.func) - HGOTO_ERROR(H5E_PLINE, H5E_READERROR, FAIL, "filter returned failure during read") + if((cb_struct.func && (H5Z_CB_FAIL == cb_struct.func(pline->filter[idx].id, *buf, *buf_size, cb_struct.op_data))) || !cb_struct.func) + HGOTO_ERROR(H5E_PLINE, H5E_READERROR, FAIL, "filter returned failure during read") *nbytes = *buf_size; failed |= (unsigned)1 << idx; H5E_clear_stack(NULL); - } else { + } + else { *nbytes = new_nbytes; } - } - } else if (pline) { /* Write */ - for (idx=0; idxnused; idx++) { - if (*filter_mask & ((unsigned)1<filter[idx].id))<0) { + } + } + else if (pline) { /* Write */ + for (idx = 0; idx < pline->nused; idx++) { + if (*filter_mask & ((unsigned)1 << idx)) { + failed |= (unsigned)1 << idx; + continue; /*filter excluded*/ + } + if ((fclass_idx = H5Z_find_idx(pline->filter[idx].id)) < 0) { /* Check if filter is optional -- If it isn't, then error */ - if ((pline->filter[idx].flags & H5Z_FLAG_OPTIONAL) == 0) - HGOTO_ERROR(H5E_PLINE, H5E_WRITEERROR, FAIL, "required filter is not registered") + if ((pline->filter[idx].flags & H5Z_FLAG_OPTIONAL) == 0) + HGOTO_ERROR(H5E_PLINE, H5E_WRITEERROR, FAIL, "required filter is not registered") - failed |= (unsigned)1 << idx; + failed |= (unsigned)1 << idx; H5E_clear_stack(NULL); - continue; /*filter excluded*/ - } - fclass=&H5Z_table_g[fclass_idx]; + continue; /*filter excluded*/ + } + fclass = &H5Z_table_g[fclass_idx]; #ifdef H5Z_DEBUG - fstats=&H5Z_stat_table_g[fclass_idx]; - H5_timer_begin(&timer); + fstats = &H5Z_stat_table_g[fclass_idx]; + H5_timer_begin(&timer); #endif - new_nbytes = (fclass->filter)(flags|(pline->filter[idx].flags), pline->filter[idx].cd_nelmts, - pline->filter[idx].cd_values, *nbytes, buf_size, buf); + new_nbytes = (fclass->filter)(flags|(pline->filter[idx].flags), pline->filter[idx].cd_nelmts, + pline->filter[idx].cd_values, *nbytes, buf_size, buf); #ifdef H5Z_DEBUG - H5_timer_end(&(fstats->stats[0].timer), &timer); - fstats->stats[0].total += MAX(*nbytes, new_nbytes); - if (0==new_nbytes) fstats->stats[0].errors += *nbytes; + H5_timer_end(&(fstats->stats[0].timer), &timer); + fstats->stats[0].total += MAX(*nbytes, new_nbytes); + if (0 == new_nbytes) fstats->stats[0].errors += *nbytes; #endif - if(0==new_nbytes) { - if (0==(pline->filter[idx].flags & H5Z_FLAG_OPTIONAL)) { - if((cb_struct.func && (H5Z_CB_FAIL==cb_struct.func(pline->filter[idx].id, *buf, *nbytes, cb_struct.op_data))) - || !cb_struct.func) + if(0 == new_nbytes) { + if (0 == (pline->filter[idx].flags & H5Z_FLAG_OPTIONAL)) { + if((cb_struct.func && (H5Z_CB_FAIL == cb_struct.func(pline->filter[idx].id, *buf, *nbytes, cb_struct.op_data))) || !cb_struct.func) HGOTO_ERROR(H5E_PLINE, H5E_WRITEERROR, FAIL, "filter returned failure") *nbytes = *buf_size; @@ -1418,10 +1301,11 @@ H5Z_pipeline(const H5O_pline_t *pline, unsigned flags, failed |= (unsigned)1 << idx; H5E_clear_stack(NULL); - } else { + } + else { *nbytes = new_nbytes; } - } + } } *filter_mask = failed; @@ -1432,41 +1316,35 @@ done: /*------------------------------------------------------------------------- - * Function: H5Z_filter_info - * - * Purpose: Get pointer to filter info for pipeline - * - * Return: Non-negative on success/Negative on failure - * - * Programmer: Quincey Koziol - * Friday, April 5, 2003 + * Function: H5Z_filter_info * - * Modifications: + * Purpose: Get pointer to filter info for pipeline * + * Return: Non-negative on success/Negative on failure *------------------------------------------------------------------------- */ H5Z_filter_info_t * H5Z_filter_info(const H5O_pline_t *pline, H5Z_filter_t filter) { - size_t idx; /* Index of filter in pipeline */ + size_t idx; /* Index of filter in pipeline */ H5Z_filter_info_t *ret_value = NULL; /* Return value */ FUNC_ENTER_NOAPI(NULL) HDassert(pline); - HDassert(filter>=0 && filter<=H5Z_FILTER_MAX); + HDassert(filter >= 0 && filter <= H5Z_FILTER_MAX); /* Locate the filter in the pipeline */ - for(idx=0; idxnused; idx++) - if(pline->filter[idx].id==filter) + for(idx = 0; idx < pline->nused; idx++) + if(pline->filter[idx].id == filter) break; /* Check if the filter was not already in the pipeline */ - if(idx>=pline->nused) - HGOTO_ERROR(H5E_PLINE, H5E_NOTFOUND, NULL, "filter not in pipeline") + if(idx >= pline->nused) + HGOTO_ERROR(H5E_PLINE, H5E_NOTFOUND, NULL, "filter not in pipeline") /* Set return value */ - ret_value=&pline->filter[idx]; + ret_value = &pline->filter[idx]; done: FUNC_LEAVE_NOAPI(ret_value) @@ -1474,41 +1352,35 @@ done: /*------------------------------------------------------------------------- - * Function: H5Z_filter_in_pline + * Function: H5Z_filter_in_pline * - * Purpose: Check wheter a filter is in the filter pipeline using the - * filter ID. This function is very similar to H5Z_filter_info - * - * Return: TRUE - found filter - * FALSE - not found - * FAIL - error - * - * Programmer: Raymond Lu - * 26 April 2013 - * - * Modifications: + * Purpose: Check wheter a filter is in the filter pipeline using the + * filter ID. This function is very similar to H5Z_filter_info * + * Return: TRUE - found filter + * FALSE - not found + * FAIL - error *------------------------------------------------------------------------- */ htri_t H5Z_filter_in_pline(const H5O_pline_t *pline, H5Z_filter_t filter) { - size_t idx; /* Index of filter in pipeline */ + size_t idx; /* Index of filter in pipeline */ htri_t ret_value = TRUE; /* Return value */ FUNC_ENTER_NOAPI(FAIL) HDassert(pline); - HDassert(filter>=0 && filter<=H5Z_FILTER_MAX); + HDassert(filter >= 0 && filter <= H5Z_FILTER_MAX); /* Locate the filter in the pipeline */ - for(idx=0; idxnused; idx++) - if(pline->filter[idx].id==filter) + for(idx = 0; idx < pline->nused; idx++) + if(pline->filter[idx].id == filter) break; /* Check if the filter was not already in the pipeline */ - if(idx>=pline->nused) - ret_value = FALSE; + if(idx >= pline->nused) + ret_value = FALSE; done: FUNC_LEAVE_NOAPI(ret_value) @@ -1517,18 +1389,12 @@ done: /*------------------------------------------------------------------------- - * Function: H5Z_all_filters_avail - * - * Purpose: Verify that all the filters in a pipeline are currently - * available (i.e. registered) + * Function: H5Z_all_filters_avail * - * Return: Non-negative (TRUE/FALSE) on success/Negative on failure - * - * Programmer: Quincey Koziol - * Tuesday, April 8, 2003 - * - * Modifications: + * Purpose: Verify that all the filters in a pipeline are currently + * available (i.e. registered) * + * Return: Non-negative (TRUE/FALSE) on success/Negative on failure *------------------------------------------------------------------------- */ htri_t @@ -1543,15 +1409,14 @@ H5Z_all_filters_avail(const H5O_pline_t *pline) HDassert(pline); /* Iterate through all the filters in pipeline */ - for(i=0; inused; i++) { - + for(i = 0; i < pline->nused; i++) { /* Look for each filter in the list of registered filters */ - for(j=0; jfilter[i].id) + for(j = 0; j < H5Z_table_used_g; j++) + if(H5Z_table_g[j].id == pline->filter[i].id) break; /* Check if we didn't find the filter */ - if(j==H5Z_table_used_g) + if(j == H5Z_table_used_g) HGOTO_DONE(FALSE) } /* end for */ @@ -1564,16 +1429,10 @@ done: /*------------------------------------------------------------------------- * Function: H5Z_delete * - * Purpose: Delete filter FILTER from pipeline PLINE; - * deletes all filters if FILTER is H5Z_FILTER_NONE - * - * Return: Non-negative on success/Negative on failure - * - * Programmer: Pedro Vicente - * Monday, January 26, 2004 - * - * Modifications: + * Purpose: Delete filter FILTER from pipeline PLINE; + * deletes all filters if FILTER is H5Z_FILTER_NONE * + * Return: Non-negative on success/Negative on failure *------------------------------------------------------------------------- */ herr_t @@ -1588,7 +1447,7 @@ H5Z_delete(H5O_pline_t *pline, H5Z_filter_t filter) HDassert(filter >= 0 && filter <= H5Z_FILTER_MAX); /* if the pipeline has no filters, just return */ - if(pline->nused==0) + if(pline->nused == 0) HGOTO_DONE(SUCCEED) /* Delete all filters */ @@ -1649,14 +1508,8 @@ done: /*------------------------------------------------------------------------- * Function: H5Zget_filter_info * - * Purpose: Gets information about a pipeline data filter and stores it - * in filter_config_flags. - * - * Return: zero on success / negative on failure - * - * Programmer: James Laird and Nat Furrer - * Monday, June 7, 2004 - * + * Purpose: Gets information about a pipeline data filter and stores it + * in filter_config_flags. *------------------------------------------------------------------------- */ herr_t @@ -1679,21 +1532,15 @@ done: /*------------------------------------------------------------------------- * Function: H5Z_get_filter_info * - * Purpose: Gets information about a pipeline data filter and stores it - * in filter_config_flags. - * - * Return: zero on success / negative on failure - * - * Programmer: Quincey Koziol - * Saturday, May 11, 2013 - * + * Purpose: Gets information about a pipeline data filter and stores it + * in filter_config_flags. *------------------------------------------------------------------------- */ herr_t H5Z_get_filter_info(H5Z_filter_t filter, unsigned int *filter_config_flags) { H5Z_class2_t *fclass; - herr_t ret_value = SUCCEED; + herr_t ret_value = SUCCEED; FUNC_ENTER_NOAPI(FAIL) diff --git a/test/CMakeTests.cmake b/test/CMakeTests.cmake index ca2ca77..b8d3689 100644 --- a/test/CMakeTests.cmake +++ b/test/CMakeTests.cmake @@ -660,7 +660,7 @@ foreach (test ${H5TEST_TESTS}) WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/H5TEST ) else () - if (${test} STREQUAL "big" AND CYGWIN) + if ("${test}" STREQUAL "big" AND CYGWIN) add_test (NAME H5TEST-${test} COMMAND ${CMAKE_COMMAND} -E echo "SKIP ${test}" ) @@ -701,7 +701,7 @@ if (BUILD_SHARED_LIBS) ) foreach (test ${H5TEST_TESTS}) - if (${test} STREQUAL "big" AND CYGWIN) + if ("${test}" STREQUAL "big" AND CYGWIN) add_test (NAME H5TEST-shared-${test} COMMAND ${CMAKE_COMMAND} -E echo "SKIP ${test}-shared" ) @@ -998,8 +998,10 @@ endif () ############################################################################## if (WIN32) set (CMAKE_SEP "\;") + set (BIN_REL_PATH "../../") else () set (CMAKE_SEP ":") + set (BIN_REL_PATH "../") endif () add_test (NAME H5PLUGIN-plugin COMMAND $) @@ -1086,8 +1088,8 @@ if (HDF5_TEST_VFD) # Windows only macro macro (CHECK_VFD_TEST vfdtest vfdname resultcode) - if (${vfdtest} STREQUAL "flush1" OR ${vfdtest} STREQUAL "flush2") - if (${vfdname} STREQUAL "multi" OR ${vfdname} STREQUAL "split") + if ("${vfdtest}" STREQUAL "flush1" OR "${vfdtest}" STREQUAL "flush2") + if ("${vfdname}" STREQUAL "multi" OR "${vfdname}" STREQUAL "split") if (NOT BUILD_SHARED_LIBS AND NOT CMAKE_BUILD_TYPE MATCHES Debug) add_test (NAME VFD-${vfdname}-${vfdtest} COMMAND "${CMAKE_COMMAND}" @@ -1176,7 +1178,7 @@ if (HDF5_TEST_VFD) ENVIRONMENT "srcdir=${HDF5_TEST_BINARY_DIR}/${vfdname};HDF5TestExpress=${HDF_TEST_EXPRESS}" WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/${vfdname} ) - if (BUILD_SHARED_LIBS AND NOT ${vfdtest} STREQUAL "cache") + if (BUILD_SHARED_LIBS AND NOT "${vfdtest}" STREQUAL "cache") add_test (NAME VFD-${vfdname}-${vfdtest}-shared COMMAND "${CMAKE_COMMAND}" -D "TEST_PROGRAM=$" diff --git a/test/dsets.c b/test/dsets.c index fb09892..6c6574a 100644 --- a/test/dsets.c +++ b/test/dsets.c @@ -12,17 +12,17 @@ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* - * Programmer: Robb Matzke - * Tuesday, December 9, 1997 + * Programmer: Robb Matzke + * Tuesday, December 9, 1997 * - * Purpose: Tests the dataset interface (H5D) + * Purpose: Tests the dataset interface (H5D) */ -#define H5D_FRIEND /*suppress error about including H5Dpkg */ +#define H5D_FRIEND /*suppress error about including H5Dpkg */ #define H5D_TESTING -#define H5FD_FRIEND /*suppress error about including H5FDpkg */ +#define H5FD_FRIEND /*suppress error about including H5FDpkg */ #define H5FD_TESTING -#define H5Z_FRIEND /*suppress error about including H5Zpkg */ +#define H5Z_FRIEND /*suppress error about including H5Zpkg */ #include "h5test.h" #include "H5srcdir.h" @@ -35,29 +35,29 @@ #endif const char *FILENAME[] = { - "dataset", /* 0 */ - "compact_dataset", /* 1 */ - "dset_offset", /* 2 */ - "max_compact_dataset", /* 3 */ - "simple", /* 4 */ - "set_local", /* 5 */ - "random_chunks", /* 6 */ - "huge_chunks", /* 7 */ - "chunk_cache", /* 8 */ - "big_chunk", /* 9 */ - "chunk_fast", /* 10 */ - "chunk_expand", /* 11 */ - "chunk_fixed", /* 12 */ + "dataset", /* 0 */ + "compact_dataset", /* 1 */ + "dset_offset", /* 2 */ + "max_compact_dataset", /* 3 */ + "simple", /* 4 */ + "set_local", /* 5 */ + "random_chunks", /* 6 */ + "huge_chunks", /* 7 */ + "chunk_cache", /* 8 */ + "big_chunk", /* 9 */ + "chunk_fast", /* 10 */ + "chunk_expand", /* 11 */ + "chunk_fixed", /* 12 */ "copy_dcpl_newfile",/* 13 */ "partial_chunks", /* 14 */ "layout_extend", /* 15 */ - "zero_chunk", /* 16 */ + "zero_chunk", /* 16 */ "chunk_single", /* 17 */ "swmr_non_latest", /* 18 */ "earray_hdr_fd", /* 19 */ "farray_hdr_fd", /* 20 */ "bt2_hdr_fd", /* 21 */ - "storage_size", /* 22 */ + "storage_size", /* 22 */ "dls_01_strings", /* 23 */ "power2up", /* 24 */ NULL @@ -68,39 +68,39 @@ const char *FILENAME[] = { #define FILE_DEFLATE_NAME "deflate.h5" /* Dataset names for testing filters */ -#define DSET_DEFAULT_NAME "default" -#define DSET_CHUNKED_NAME "chunked" -#define DSET_COMPACT_NAME "compact" -#define DSET_SIMPLE_IO_NAME "simple_io" -#define DSET_USERBLOCK_IO_NAME "userblock_io" -#define DSET_COMPACT_IO_NAME "compact_io" -#define DSET_COMPACT_MAX_NAME "max_compact" -#define DSET_COMPACT_MAX2_NAME "max_compact_2" -#define DSET_CONV_BUF_NAME "conv_buf" -#define DSET_TCONV_NAME "tconv" -#define DSET_DEFLATE_NAME "deflate" -#define DSET_SHUFFLE_NAME "shuffle" -#define DSET_FLETCHER32_NAME "fletcher32" -#define DSET_FLETCHER32_NAME_2 "fletcher32_2" -#define DSET_FLETCHER32_NAME_3 "fletcher32_3" -#define DSET_SHUF_DEF_FLET_NAME "shuffle+deflate+fletcher32" -#define DSET_SHUF_DEF_FLET_NAME_2 "shuffle+deflate+fletcher32_2" +#define DSET_DEFAULT_NAME "default" +#define DSET_CHUNKED_NAME "chunked" +#define DSET_COMPACT_NAME "compact" +#define DSET_SIMPLE_IO_NAME "simple_io" +#define DSET_USERBLOCK_IO_NAME "userblock_io" +#define DSET_COMPACT_IO_NAME "compact_io" +#define DSET_COMPACT_MAX_NAME "max_compact" +#define DSET_COMPACT_MAX2_NAME "max_compact_2" +#define DSET_CONV_BUF_NAME "conv_buf" +#define DSET_TCONV_NAME "tconv" +#define DSET_DEFLATE_NAME "deflate" +#define DSET_SHUFFLE_NAME "shuffle" +#define DSET_FLETCHER32_NAME "fletcher32" +#define DSET_FLETCHER32_NAME_2 "fletcher32_2" +#define DSET_FLETCHER32_NAME_3 "fletcher32_3" +#define DSET_SHUF_DEF_FLET_NAME "shuffle+deflate+fletcher32" +#define DSET_SHUF_DEF_FLET_NAME_2 "shuffle+deflate+fletcher32_2" #ifdef H5_HAVE_FILTER_SZIP -#define DSET_SZIP_NAME "szip" -#define DSET_SHUF_SZIP_FLET_NAME "shuffle+szip+fletcher32" -#define DSET_SHUF_SZIP_FLET_NAME_2 "shuffle+szip+fletcher32_2" +#define DSET_SZIP_NAME "szip" +#define DSET_SHUF_SZIP_FLET_NAME "shuffle+szip+fletcher32" +#define DSET_SHUF_SZIP_FLET_NAME_2 "shuffle+szip+fletcher32_2" #endif /* H5_HAVE_FILTER_SZIP */ -#define DSET_BOGUS_NAME "bogus" -#define DSET_MISSING_NAME "missing" -#define DSET_CAN_APPLY_NAME "can_apply" -#define DSET_CAN_APPLY_NAME2 "can_apply2" +#define DSET_BOGUS_NAME "bogus" +#define DSET_MISSING_NAME "missing" +#define DSET_CAN_APPLY_NAME "can_apply" +#define DSET_CAN_APPLY_NAME2 "can_apply2" #ifdef H5_HAVE_FILTER_SZIP -#define DSET_CAN_APPLY_SZIP_NAME "can_apply_szip" +#define DSET_CAN_APPLY_SZIP_NAME "can_apply_szip" #endif /* H5_HAVE_FILTER_SZIP */ -#define DSET_SET_LOCAL_NAME "set_local" -#define DSET_SET_LOCAL_NAME_2 "set_local_2" -#define DSET_ONEBYTE_SHUF_NAME "onebyte_shuffle" +#define DSET_SET_LOCAL_NAME "set_local" +#define DSET_SET_LOCAL_NAME_2 "set_local_2" +#define DSET_ONEBYTE_SHUF_NAME "onebyte_shuffle" #define DSET_NBIT_INT_NAME "nbit_int" #define DSET_NBIT_FLOAT_NAME "nbit_float" #define DSET_NBIT_DOUBLE_NAME "nbit_double" @@ -116,27 +116,27 @@ const char *FILENAME[] = { #define DSET_SCALEOFFSET_FLOAT_NAME_2 "scaleoffset_float_2" #define DSET_SCALEOFFSET_DOUBLE_NAME "scaleoffset_double" #define DSET_SCALEOFFSET_DOUBLE_NAME_2 "scaleoffset_double_2" -#define DSET_COMPARE_DCPL_NAME "compare_dcpl" -#define DSET_COMPARE_DCPL_NAME_2 "compare_dcpl_2" -#define DSET_COPY_DCPL_NAME_1 "copy_dcpl_1" -#define DSET_COPY_DCPL_NAME_2 "copy_dcpl_2" -#define COPY_DCPL_EXTFILE_NAME "ext_file" -#define DSET_DEPREC_NAME "deprecated" -#define DSET_DEPREC_NAME_CHUNKED "deprecated_chunked" -#define DSET_DEPREC_NAME_COMPACT "deprecated_compact" -#define DSET_DEPREC_NAME_FILTER "deprecated_filter" +#define DSET_COMPARE_DCPL_NAME "compare_dcpl" +#define DSET_COMPARE_DCPL_NAME_2 "compare_dcpl_2" +#define DSET_COPY_DCPL_NAME_1 "copy_dcpl_1" +#define DSET_COPY_DCPL_NAME_2 "copy_dcpl_2" +#define COPY_DCPL_EXTFILE_NAME "ext_file" +#define DSET_DEPREC_NAME "deprecated" +#define DSET_DEPREC_NAME_CHUNKED "deprecated_chunked" +#define DSET_DEPREC_NAME_COMPACT "deprecated_compact" +#define DSET_DEPREC_NAME_FILTER "deprecated_filter" /* Dataset names for testing Fixed Array Indexing */ -#define DSET_FIXED_MAX "DSET_FIXED_MAX" -#define DSET_FIXED_NOMAX "DSET_FIXED_NOMAX" -#define DSET_FIXED_BIG "DSET_FIXED_BIG" -#define POINTS 72 -#define POINTS_BIG 2500 +#define DSET_FIXED_MAX "DSET_FIXED_MAX" +#define DSET_FIXED_NOMAX "DSET_FIXED_NOMAX" +#define DSET_FIXED_BIG "DSET_FIXED_BIG" +#define POINTS 72 +#define POINTS_BIG 2500 /* Dataset names used for testing header flush dependencies */ #define DSET_EARRAY_HDR_FD "earray_hdr_fd" #define DSET_FARRAY_HDR_FD "farray_hdr_fd" -#define DSET_BT2_HDR_FD "bt2_hdr_fd" +#define DSET_BT2_HDR_FD "bt2_hdr_fd" /* Dataset names for testing Implicit Indexing */ #define DSET_SINGLE_MAX "DSET_SINGLE_MAX" @@ -146,14 +146,14 @@ const char *FILENAME[] = { #define SIXTY_FOUR_KB 65536 /* Temporary filter IDs used for testing */ -#define H5Z_FILTER_BOGUS 305 -#define H5Z_FILTER_CORRUPT 306 -#define H5Z_FILTER_CAN_APPLY_TEST 307 -#define H5Z_FILTER_SET_LOCAL_TEST 308 -#define H5Z_FILTER_DEPREC 309 -#define H5Z_FILTER_EXPAND 310 -#define H5Z_FILTER_CAN_APPLY_TEST2 311 -#define H5Z_FILTER_COUNT 312 +#define H5Z_FILTER_BOGUS 305 +#define H5Z_FILTER_CORRUPT 306 +#define H5Z_FILTER_CAN_APPLY_TEST 307 +#define H5Z_FILTER_SET_LOCAL_TEST 308 +#define H5Z_FILTER_DEPREC 309 +#define H5Z_FILTER_EXPAND 310 +#define H5Z_FILTER_CAN_APPLY_TEST2 311 +#define H5Z_FILTER_COUNT 312 /* Flags for testing filters */ #define DISABLE_FLETCHER32 0 @@ -182,15 +182,15 @@ const char *FILENAME[] = { /* Names for noencoder test */ #ifdef H5_HAVE_FILTER_SZIP -#define NOENCODER_FILENAME "noencoder.h5" +#define NOENCODER_FILENAME "noencoder.h5" #define NOENCODER_COPY_FILENAME "noencoder.h5.copy" -#define NOENCODER_TEST_DATASET "noencoder_tdset.h5" -#define NOENCODER_SZIP_DATASET "noencoder_szip_dset.h5" +#define NOENCODER_TEST_DATASET "noencoder_tdset.h5" +#define NOENCODER_SZIP_DATASET "noencoder_szip_dset.h5" #define NOENCODER_SZIP_SHUFF_FLETCH_DATASET "noencoder_szip_shuffle_fletcher_dset.h5" #endif /* H5_HAVE_FILTER_SZIP */ /* Names for zero-dim test */ -#define ZERODIM_DATASET "zerodim" +#define ZERODIM_DATASET "zerodim" #define ZERODIM_DATASET2 "zerodim2" /* Parameters for zero-dim test */ @@ -221,8 +221,8 @@ const char *FILENAME[] = { #define BYPASS_DATASET1 "Dset1" #define BYPASS_DATASET2 "Dset2" -#define T_BYPASS_DATASET1 "T_Dset1" -#define T_BYPASS_DATASET2 "T_Dset2" +#define T_BYPASS_DATASET1 "T_Dset1" +#define T_BYPASS_DATASET2 "T_Dset2" #define BYPASS_DIM 1000 #define BYPASS_CHUNK_DIM 500 @@ -234,7 +234,7 @@ const char *FILENAME[] = { #define EARRAY_CHUNK_DIM 3 #define EARRAY_EXTEND_INCR 15 #define EARRAY_MAX_EXTEND 75 - + /* Parameters for datasets in query storage size tests */ #define STORAGE_SIZE_DIM1 12 #define STORAGE_SIZE_DIM2 6 @@ -246,8 +246,8 @@ const char *FILENAME[] = { /* Shared global arrays */ #define DSET_DIM1 100 #define DSET_DIM2 200 -int points[DSET_DIM1][DSET_DIM2], check[DSET_DIM1][DSET_DIM2]; -double points_dbl[DSET_DIM1][DSET_DIM2], check_dbl[DSET_DIM1][DSET_DIM2]; +int points[DSET_DIM1][DSET_DIM2], check[DSET_DIM1][DSET_DIM2]; +double points_dbl[DSET_DIM1][DSET_DIM2], check_dbl[DSET_DIM1][DSET_DIM2]; size_t count_nbytes_read = 0; size_t count_nbytes_written = 0; @@ -266,29 +266,29 @@ const char *OLD_FILENAME[] = { /* Files created under 1.6 branch and 1.8 branch /* Local prototypes for filter functions */ static size_t filter_bogus(unsigned int flags, size_t cd_nelmts, - const unsigned int *cd_values, size_t nbytes, size_t *buf_size, void **buf); + const unsigned int *cd_values, size_t nbytes, size_t *buf_size, void **buf); static htri_t can_apply_bogus(hid_t dcpl_id, hid_t type_id, hid_t space_id); static herr_t set_local_bogus2(hid_t dcpl_id, hid_t type_id, hid_t space_id); static size_t filter_bogus2(unsigned int flags, size_t cd_nelmts, - const unsigned int *cd_values, size_t nbytes, size_t *buf_size, void **buf); + const unsigned int *cd_values, size_t nbytes, size_t *buf_size, void **buf); static size_t filter_bogus3(unsigned int flags, size_t cd_nelmts, - const unsigned int *cd_values, size_t nbytes, size_t *buf_size, void **buf); + const unsigned int *cd_values, size_t nbytes, size_t *buf_size, void **buf); static size_t filter_corrupt(unsigned int flags, size_t cd_nelmts, - const unsigned int *cd_values, size_t nbytes, size_t *buf_size, void **buf); + const unsigned int *cd_values, size_t nbytes, size_t *buf_size, void **buf); static size_t filter_expand(unsigned int flags, size_t cd_nelmts, - const unsigned int *cd_values, size_t nbytes, size_t *buf_size, void **buf); + const unsigned int *cd_values, size_t nbytes, size_t *buf_size, void **buf); static size_t filter_count(unsigned int flags, size_t cd_nelmts, - const unsigned int *cd_values, size_t nbytes, size_t *buf_size, void **buf); + const unsigned int *cd_values, size_t nbytes, size_t *buf_size, void **buf); /* This message derives from H5Z */ const H5Z_class2_t H5Z_COUNT[1] = {{ - H5Z_CLASS_T_VERS, /* H5Z_class_t version */ - H5Z_FILTER_COUNT, /* Filter id number */ - 1, 1, /* Encoding and decoding enabled */ - "count", /* Filter name for debugging */ - NULL, /* The "can apply" callback */ - NULL, /* The "set local" callback */ - filter_count, /* The actual filter function */ + H5Z_CLASS_T_VERS, /* H5Z_class_t version */ + H5Z_FILTER_COUNT, /* Filter id number */ + 1, 1, /* Encoding and decoding enabled */ + "count", /* Filter name for debugging */ + NULL, /* The "can apply" callback */ + NULL, /* The "set local" callback */ + filter_count, /* The actual filter function */ }}; @@ -300,12 +300,7 @@ const H5Z_class2_t H5Z_COUNT[1] = {{ * appropriate. * * Return: Success: Data chunk size - * * Failure: 0 - * - * Programmer: Neil Fortner - * Wednesday, March 17, 2010 - * *------------------------------------------------------------------------- */ static size_t @@ -323,26 +318,21 @@ filter_count(unsigned int flags, size_t H5_ATTR_UNUSED cd_nelmts, /*------------------------------------------------------------------------- - * Function: test_create - * - * Purpose: Attempts to create a dataset. + * Function: test_create * - * Return: Success: 0 - * - * Failure: -1 - * - * Programmer: Robb Matzke - * Tuesday, December 9, 1997 + * Purpose: Attempts to create a dataset. * + * Return: Success: 0 + * Failure: -1 *------------------------------------------------------------------------- */ static herr_t test_create(hid_t file) { - hid_t dataset, space, small_space, create_parms; - hsize_t dims[2], small_dims[2]; - herr_t status; - hsize_t csize[2]; + hid_t dataset, space, small_space, create_parms; + hsize_t dims[2], small_dims[2]; + herr_t status; + hsize_t csize[2]; TESTING("create, open, close"); @@ -359,11 +349,11 @@ test_create(hid_t file) assert(space>=0); /* - * Create a dataset using the default dataset creation properties. We're + * Create a dataset using the default dataset creation properties. We're * not sure what they are, so we won't check. */ dataset = H5Dcreate2(file, DSET_DEFAULT_NAME, H5T_NATIVE_DOUBLE, space, - H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); + H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); if(dataset < 0) goto error; /* Close the dataset */ @@ -379,13 +369,13 @@ test_create(hid_t file) * reporting. */ H5E_BEGIN_TRY { - dataset = H5Dcreate2(file, DSET_DEFAULT_NAME, H5T_NATIVE_DOUBLE, space, - H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); + dataset = H5Dcreate2(file, DSET_DEFAULT_NAME, H5T_NATIVE_DOUBLE, space, + H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); } H5E_END_TRY; if(dataset >= 0) { - H5_FAILED(); - puts(" Library allowed overwrite of existing dataset."); - goto error; + H5_FAILED(); + puts(" Library allowed overwrite of existing dataset."); + goto error; } /* @@ -402,12 +392,12 @@ test_create(hid_t file) * reporting. */ H5E_BEGIN_TRY { - dataset = H5Dopen2(file, "does_not_exist", H5P_DEFAULT); + dataset = H5Dopen2(file, "does_not_exist", H5P_DEFAULT); } H5E_END_TRY; if(dataset >= 0) { - H5_FAILED(); - puts(" Opened a non-existent dataset."); - goto error; + H5_FAILED(); + puts(" Opened a non-existent dataset."); + goto error; } /* @@ -424,12 +414,12 @@ test_create(hid_t file) assert(status >= 0); H5E_BEGIN_TRY { dataset = H5Dcreate2(file, DSET_CHUNKED_NAME, H5T_NATIVE_DOUBLE, space, - H5P_DEFAULT, create_parms, H5P_DEFAULT); + H5P_DEFAULT, create_parms, H5P_DEFAULT); } H5E_END_TRY; if(dataset >= 0) { - H5_FAILED(); - puts(" Opened a dataset with incorrect chunking parameters."); - goto error; + H5_FAILED(); + puts(" Opened a dataset with incorrect chunking parameters."); + goto error; } csize[0] = 5; @@ -438,7 +428,7 @@ test_create(hid_t file) assert(status >= 0); dataset = H5Dcreate2(file, DSET_CHUNKED_NAME, H5T_NATIVE_DOUBLE, space, - H5P_DEFAULT, create_parms, H5P_DEFAULT); + H5P_DEFAULT, create_parms, H5P_DEFAULT); if(dataset < 0) goto error; H5Pclose(create_parms); @@ -475,19 +465,14 @@ test_create(hid_t file) /*------------------------------------------------------------------------- - * Function: test_simple_io - * - * Purpose: Tests simple I/O. That is, reading and writing a complete - * multi-dimensional array without data type or data space - * conversions, without compression, and stored contiguously. + * Function: test_simple_io * - * Return: Success: 0 - * - * Failure: -1 - * - * Programmer: Robb Matzke - * Wednesday, December 10, 1997 + * Purpose: Tests simple I/O. That is, reading and writing a complete + * multi-dimensional array without data type or data space + * conversions, without compression, and stored contiguously. * + * Return: Success: 0 + * Failure: -1 *------------------------------------------------------------------------- */ static herr_t @@ -592,8 +577,8 @@ test_simple_io(const char *env_h5_drvr, hid_t fapl) PASSED(); } /* end if */ else { - SKIPPED(); - puts(" Current VFD doesn't support continuous address space"); + SKIPPED(); + puts(" Current VFD doesn't support continuous address space"); } /* end else */ return 0; @@ -616,26 +601,21 @@ error: /*------------------------------------------------------------------------- - * Function: test_userblock_offset - * - * Purpose: Tests H5Dget_offset when user block exists. + * Function: test_userblock_offset * - * Return: Success: 0 - * - * Failure: -1 - * - * Programmer: Raymond Lu - * Wednesday, November 27, 2002 + * Purpose: Tests H5Dget_offset when user block exists. * + * Return: Success: 0 + * Failure: -1 *------------------------------------------------------------------------- */ static herr_t test_userblock_offset(const char *env_h5_drvr, hid_t fapl, hbool_t new_format) { char filename[FILENAME_BUF_SIZE]; - hid_t file = -1, fcpl = -1, dataset = -1, space = -1; - int i, j; - hsize_t dims[2]; + hid_t file = -1, fcpl = -1, dataset = -1, space = -1; + int i, j; + hsize_t dims[2]; int f = -1; haddr_t offset; int rdata[DSET_DIM1][DSET_DIM2]; @@ -648,9 +628,9 @@ test_userblock_offset(const char *env_h5_drvr, hid_t fapl, hbool_t new_format) if((fcpl=H5Pcreate(H5P_FILE_CREATE)) < 0) goto error; if(H5Pset_userblock(fcpl, (hsize_t)USER_BLOCK) < 0) goto error; - if(new_format) - if(H5Pset_file_space_page_size(fcpl, (hsize_t)USER_BLOCK) < 0) - goto error; + if(new_format) + if(H5Pset_file_space_page_size(fcpl, (hsize_t)USER_BLOCK) < 0) + goto error; if((file=H5Fcreate(filename, H5F_ACC_TRUNC, fcpl, fapl)) < 0) goto error; @@ -705,8 +685,8 @@ test_userblock_offset(const char *env_h5_drvr, hid_t fapl, hbool_t new_format) PASSED(); } /* end if */ else { - SKIPPED(); - puts(" Current VFD doesn't support continuous address space"); + SKIPPED(); + puts(" Current VFD doesn't support continuous address space"); } /* end else */ return 0; @@ -735,12 +715,7 @@ error: * compact dataset. * * Return: Success: 0 - * * Failure: -1 - * - * Programmer: Raymond Lu - * August 8, 2002 - * *------------------------------------------------------------------------- */ static herr_t @@ -749,7 +724,7 @@ test_compact_io(hid_t fapl) hid_t file, dataset, space, plist; hsize_t dims[2]; int wbuf[16][8], rbuf[16][8]; - char filename[FILENAME_BUF_SIZE]; + char filename[FILENAME_BUF_SIZE]; int i, j, n; TESTING("compact dataset I/O"); @@ -834,10 +809,6 @@ test_compact_io(hid_t fapl) * * Return: Success: 0 * Failure: -1 - * - * Programmer: Raymond Lu - * August 8, 2002 - * *------------------------------------------------------------------------- */ static herr_t @@ -851,7 +822,7 @@ test_max_compact(hid_t fapl) size_t compact_size; int *wbuf = NULL; int *rbuf = NULL; - char filename[FILENAME_BUF_SIZE]; + char filename[FILENAME_BUF_SIZE]; int n; size_t u; @@ -988,31 +959,28 @@ error: * Function: test_layout_extend * * Purpose: Verify that the creation of extendible dataset with dataspace: - * cur_dims < max_dims (max_dims can be fixed size or H5S_UNLIMITED) - * will behave as follows: - * H5D_COMPACT layout: fail - * H5D_CONTIGUOUS layout: fail - * H5D_CHUNKED layout: succeed + * cur_dims < max_dims (max_dims can be fixed size or H5S_UNLIMITED) + * will behave as follows: + * H5D_COMPACT layout: fail + * H5D_CONTIGUOUS layout: fail + * H5D_CHUNKED layout: succeed * * Return: Success: 0 * Failure: -1 - * - * Programmer: Vailin Choi; August 2010 - * *------------------------------------------------------------------------- */ static herr_t test_layout_extend(hid_t fapl) { - char filename[FILENAME_BUF_SIZE]; /* File name */ - hid_t fid = -1; /* File id */ - hid_t sid_fix = -1, sid_unlim = -1; /* Dataspace id */ + char filename[FILENAME_BUF_SIZE]; /* File name */ + hid_t fid = -1; /* File id */ + hid_t sid_fix = -1, sid_unlim = -1; /* Dataspace id */ hid_t dcpl_compact = -1, dcpl_contig = -1, dcpl_chunked = -1; /* Dataset creation property list id */ - hid_t did_fixed = -1, did_unlim = -1; /* Dataset id */ - hsize_t cur_size[1] = {10}; /* Current size of dataspace */ - hsize_t max_unlim[1] = {H5S_UNLIMITED}; /* Maximum size of dataspace (unlimited) */ - hsize_t max_fix[1] = {100}; /* Maximum size of dataspace (fixed) */ - hsize_t chunk_dim[1] = {10}; /* Chunk size */ + hid_t did_fixed = -1, did_unlim = -1; /* Dataset id */ + hsize_t cur_size[1] = {10}; /* Current size of dataspace */ + hsize_t max_unlim[1] = {H5S_UNLIMITED}; /* Maximum size of dataspace (unlimited) */ + hsize_t max_fix[1] = {100}; /* Maximum size of dataspace (fixed) */ + hsize_t chunk_dim[1] = {10}; /* Chunk size */ TESTING("extendible dataset with various layout"); @@ -1035,14 +1003,14 @@ test_layout_extend(hid_t fapl) /* Create dataset with extendible dataspace (fixed max_dims) should fail */ H5E_BEGIN_TRY { - if(H5Dcreate2(fid, "compact", H5T_NATIVE_INT, sid_fix, H5P_DEFAULT, dcpl_compact, H5P_DEFAULT) != FAIL) - TEST_ERROR + if(H5Dcreate2(fid, "compact", H5T_NATIVE_INT, sid_fix, H5P_DEFAULT, dcpl_compact, H5P_DEFAULT) != FAIL) + TEST_ERROR } H5E_END_TRY; /* Create dataset with extendible dataspace (unlimited max_dims) should fail */ H5E_BEGIN_TRY { - if(H5Dcreate2(fid, "compact", H5T_NATIVE_INT, sid_unlim, H5P_DEFAULT, dcpl_compact, H5P_DEFAULT) != FAIL) - TEST_ERROR + if(H5Dcreate2(fid, "compact", H5T_NATIVE_INT, sid_unlim, H5P_DEFAULT, dcpl_compact, H5P_DEFAULT) != FAIL) + TEST_ERROR } H5E_END_TRY; /* Create property list for contiguous dataset creation */ @@ -1053,14 +1021,14 @@ test_layout_extend(hid_t fapl) /* Create dataset with extendible dataspace (fixed max_dims) should fail */ H5E_BEGIN_TRY { - if(H5Dcreate2(fid, "contig", H5T_NATIVE_INT, sid_fix, H5P_DEFAULT, dcpl_contig, H5P_DEFAULT) != FAIL) - TEST_ERROR + if(H5Dcreate2(fid, "contig", H5T_NATIVE_INT, sid_fix, H5P_DEFAULT, dcpl_contig, H5P_DEFAULT) != FAIL) + TEST_ERROR } H5E_END_TRY; /* Create dataset with extendible dataspace (unlimited max_dims) should fail*/ H5E_BEGIN_TRY { - if(H5Dcreate2(fid, "contig", H5T_NATIVE_INT, sid_unlim, H5P_DEFAULT, dcpl_contig, H5P_DEFAULT) != FAIL) - TEST_ERROR + if(H5Dcreate2(fid, "contig", H5T_NATIVE_INT, sid_unlim, H5P_DEFAULT, dcpl_contig, H5P_DEFAULT) != FAIL) + TEST_ERROR } H5E_END_TRY; /* Create property list for chunked dataset creation */ @@ -1072,11 +1040,11 @@ test_layout_extend(hid_t fapl) /* Create dataset with extendible dataspace (fixed max_dims) should succeed */ if((did_fixed = H5Dcreate2(fid, "chunked_fixed", H5T_NATIVE_INT, sid_fix, H5P_DEFAULT, dcpl_chunked, H5P_DEFAULT)) < 0) - FAIL_STACK_ERROR + FAIL_STACK_ERROR /* Create dataset with extendible dataspace (unlimited max_dims) should succeed */ if((did_unlim = H5Dcreate2(fid, "chunked_unlim", H5T_NATIVE_INT, sid_unlim, H5P_DEFAULT, dcpl_chunked, H5P_DEFAULT)) < 0) - FAIL_STACK_ERROR + FAIL_STACK_ERROR /* Closing */ if(H5Sclose(sid_fix) < 0) FAIL_STACK_ERROR @@ -1111,17 +1079,12 @@ error: /*------------------------------------------------------------------------- - * Function: test_conv_buffer - * - * Purpose: Test size of data type conversion buffer. - * - * Return: Success: 0 + * Function: test_conv_buffer * - * Failure: -1 - * - * Programmer: Raymond Lu - * Monday, May 12, 2003 + * Purpose: Test size of data type conversion buffer. * + * Return: Success: 0 + * Failure: -1 *------------------------------------------------------------------------- */ static herr_t @@ -1255,26 +1218,21 @@ error: /*------------------------------------------------------------------------- - * Function: test_tconv - * - * Purpose: Test some simple data type conversion stuff. - * - * Return: Success: 0 + * Function: test_tconv * - * Failure: -1 - * - * Programmer: Robb Matzke - * Wednesday, January 14, 1998 + * Purpose: Test some simple data type conversion stuff. * + * Return: Success: 0 + * Failure: -1 *------------------------------------------------------------------------- */ static herr_t test_tconv(hid_t file) { - char *out = NULL, *in = NULL; - hsize_t dims[1]; - hid_t space = -1, dataset = -1; - int i; + char *out = NULL, *in = NULL; + hsize_t dims[1]; + hid_t space = -1, dataset = -1; + int i; if ((out = (char *)HDmalloc((size_t)(4 * 1000 * 1000))) == NULL) goto error; @@ -1297,7 +1255,7 @@ test_tconv(hid_t file) /* Create the data set */ if((dataset = H5Dcreate2(file, DSET_TCONV_NAME, H5T_STD_I32LE, space, - H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) + H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) goto error; /* Write the data to the dataset */ @@ -1345,27 +1303,23 @@ error: /* This message derives from H5Z */ const H5Z_class2_t H5Z_BOGUS[1] = {{ H5Z_CLASS_T_VERS, /* H5Z_class_t version */ - H5Z_FILTER_BOGUS, /* Filter id number */ + H5Z_FILTER_BOGUS, /* Filter id number */ 1, 1, /* Encoding and decoding enabled */ - "bogus", /* Filter name for debugging */ + "bogus", /* Filter name for debugging */ NULL, /* The "can apply" callback */ NULL, /* The "set local" callback */ - filter_bogus, /* The actual filter function */ + filter_bogus, /* The actual filter function */ }}; /*------------------------------------------------------------------------- - * Function: can_apply_bogus - * - * Purpose: A bogus 'can apply' callback that returns 0 for H5T_NATIVE_DOUBLE - * dataype, but returns 1 for all other datatypes + * Function: can_apply_bogus * - * Return: Success: Described above - * Failure: 0 - * - * Programmer: Quincey Koziol - * Friday, April 5, 2003 + * Purpose: A bogus 'can apply' callback that returns 0 for H5T_NATIVE_DOUBLE + * dataype, but returns 1 for all other datatypes * + * Return: Success: Described above + * Failure: 0 *------------------------------------------------------------------------- */ static htri_t @@ -1381,17 +1335,12 @@ can_apply_bogus(hid_t H5_ATTR_UNUSED dcpl_id, hid_t type_id, hid_t H5_ATTR_UNUSE /*------------------------------------------------------------------------- - * Function: filter_bogus - * - * Purpose: A bogus compression method that doesn't do anything. - * - * Return: Success: Data chunk size - * - * Failure: 0 + * Function: filter_bogus * - * Programmer: Robb Matzke - * Tuesday, April 21, 1998 + * Purpose: A bogus compression method that doesn't do anything. * + * Return: Success: Data chunk size + * Failure: 0 *------------------------------------------------------------------------- */ static size_t @@ -1404,18 +1353,14 @@ filter_bogus(unsigned int H5_ATTR_UNUSED flags, size_t H5_ATTR_UNUSED cd_nelmts, /*------------------------------------------------------------------------- - * Function: set_local_bogus2 + * Function: set_local_bogus2 * - * Purpose: A 'set local' callback that stores the size of the datatype - * and adds it to all the H5T_NATIVE_INT values during - * filter operation. - * - * Return: Success: non-negative - * Failure: negative - * - * Programmer: Quincey Koziol - * Friday, April 5, 2003 + * Purpose: A 'set local' callback that stores the size of the datatype + * and adds it to all the H5T_NATIVE_INT values during + * filter operation. * + * Return: Success: non-negative + * Failure: negative *------------------------------------------------------------------------- */ static herr_t @@ -1454,19 +1399,15 @@ set_local_bogus2(hid_t dcpl_id, hid_t type_id, hid_t H5_ATTR_UNUSED space_id) /*------------------------------------------------------------------------- - * Function: filter_bogus2 - * - * Purpose: A filter method that adds a value to data values on writing - * (if the parameter is set), but does not modify data values on - * reading (so that correct operation of the filter can be - * checked). + * Function: filter_bogus2 * - * Return: Success: Data chunk size - * Failure: 0 - * - * Programmer: Quincey Koziol - * Monday, April 7, 2003 + * Purpose: A filter method that adds a value to data values on writing + * (if the parameter is set), but does not modify data values on + * reading (so that correct operation of the filter can be + * checked). * + * Return: Success: Data chunk size + * Failure: 0 *------------------------------------------------------------------------- */ static size_t @@ -1512,17 +1453,12 @@ filter_bogus2(unsigned int flags, size_t cd_nelmts, /*------------------------------------------------------------------------- - * Function: filter_bogus3 - * - * Purpose: A bogus compression method that returns a failure. + * Function: filter_bogus3 * - * Return: Success: Data chunk size - * - * Failure: 0 - * - * Programmer: Raymond Lu - * 4 August 2010 + * Purpose: A bogus compression method that returns a failure. * + * Return: Success: Data chunk size + * Failure: 0 *------------------------------------------------------------------------- */ static size_t @@ -1536,29 +1472,24 @@ filter_bogus3(unsigned int H5_ATTR_UNUSED flags, size_t H5_ATTR_UNUSED cd_nelmts /* This message derives from H5Z */ const H5Z_class2_t H5Z_CORRUPT[1] = {{ H5Z_CLASS_T_VERS, /* H5Z_class_t version */ - H5Z_FILTER_CORRUPT, /* Filter id number */ + H5Z_FILTER_CORRUPT, /* Filter id number */ 1, 1, /* Encoding and decoding enabled */ - "corrupt", /* Filter name for debugging */ + "corrupt", /* Filter name for debugging */ NULL, /* The "can apply" callback */ NULL, /* The "set local" callback */ - filter_corrupt, /* The actual filter function */ + filter_corrupt, /* The actual filter function */ }}; /*------------------------------------------------------------------------- - * Function: filter_corrupt - * - * Purpose: For testing Fletcher32 checksum. modify data slightly during - * writing so that when data is read back, the checksum should - * fail. + * Function: filter_corrupt * - * Return: Success: Data chunk size - * - * Failure: 0 - * - * Programmer: Raymond Lu - * Jan 14, 2003 + * Purpose: For testing Fletcher32 checksum. modify data slightly during + * writing so that when data is read back, the checksum should + * fail. * + * Return: Success: Data chunk size + * Failure: 0 *------------------------------------------------------------------------- */ static size_t @@ -1581,7 +1512,7 @@ filter_corrupt(unsigned int flags, size_t cd_nelmts, if(offset > nbytes || (offset + length) > nbytes || length < sizeof(unsigned int)) TEST_ERROR - if(NULL == (data = HDmalloc((size_t)length))) + if(NULL == (data = HDmalloc((size_t)length))) TEST_ERROR HDmemset(data, (int)value, (size_t)length); @@ -1615,10 +1546,6 @@ error: * Purpose: Callback function to handle checksum failure. Let it continue. * * Return: continue - * - * Programmer: Raymond Lu - * Jan 14, 2003 - * *------------------------------------------------------------------------- */ static H5Z_cb_return_t @@ -1638,10 +1565,6 @@ filter_cb_cont(H5Z_filter_t filter, void H5_ATTR_UNUSED *buf, size_t H5_ATTR_UNU * Purpose: Callback function to handle checksum failure. Let it fail. * * Return: fail - * - * Programmer: Raymond Lu - * Jan 14, 2003 - * *------------------------------------------------------------------------- */ static H5Z_cb_return_t @@ -1656,35 +1579,31 @@ filter_cb_fail(H5Z_filter_t filter, void H5_ATTR_UNUSED *buf, size_t H5_ATTR_UNU /*------------------------------------------------------------------------- - * Function: test_filter_internal - * - * Purpose: Tests dataset compression. If compression is requested when - * it hasn't been compiled into the library (such as when - * updating an existing compressed dataset) then data is sent to - * the file uncompressed but no errors are returned. + * Function: test_filter_internal * - * Return: Success: 0 - * Failure: -1 - * - * Programmer: Robb Matzke - * Wednesday, April 15, 1998 + * Purpose: Tests dataset compression. If compression is requested when + * it hasn't been compiled into the library (such as when + * updating an existing compressed dataset) then data is sent to + * the file uncompressed but no errors are returned. * + * Return: Success: 0 + * Failure: -1 *------------------------------------------------------------------------- */ static herr_t test_filter_internal(hid_t fid, const char *name, hid_t dcpl, int if_fletcher32, int corrupted, hsize_t *dset_size) { - hid_t dataset; /* Dataset ID */ - hid_t dxpl; /* Dataset xfer property list ID */ - hid_t write_dxpl; /* Dataset xfer property list ID for writing */ - hid_t sid; /* Dataspace ID */ - const hsize_t size[2] = {DSET_DIM1, DSET_DIM2}; /* Dataspace dimensions */ - const hsize_t hs_offset[2] = {FILTER_HS_OFFSET1, FILTER_HS_OFFSET2}; /* Hyperslab offset */ - const hsize_t hs_size[2] = {FILTER_HS_SIZE1, FILTER_HS_SIZE2}; /* Hyperslab size */ - void *tconv_buf = NULL; /* Temporary conversion buffer */ - size_t i, j, n; /* Local index variables */ - herr_t status; /* Error status */ + hid_t dataset; /* Dataset ID */ + hid_t dxpl; /* Dataset xfer property list ID */ + hid_t write_dxpl; /* Dataset xfer property list ID for writing */ + hid_t sid; /* Dataspace ID */ + const hsize_t size[2] = {DSET_DIM1, DSET_DIM2}; /* Dataspace dimensions */ + const hsize_t hs_offset[2] = {FILTER_HS_OFFSET1, FILTER_HS_OFFSET2}; /* Hyperslab offset */ + const hsize_t hs_size[2] = {FILTER_HS_SIZE1, FILTER_HS_SIZE2}; /* Hyperslab size */ + void *tconv_buf = NULL; /* Temporary conversion buffer */ + size_t i, j, n; /* Local index variables */ + herr_t status; /* Error status */ /* Create the data space */ if((sid = H5Screate_simple(2, size, NULL)) < 0) goto error; @@ -1716,7 +1635,7 @@ test_filter_internal(hid_t fid, const char *name, hid_t dcpl, int if_fletcher32, /* Create the dataset */ if((dataset = H5Dcreate2(fid, name, H5T_NATIVE_INT, sid, H5P_DEFAULT, - dcpl, H5P_DEFAULT)) < 0) goto error; + dcpl, H5P_DEFAULT)) < 0) goto error; PASSED(); @@ -1727,18 +1646,18 @@ test_filter_internal(hid_t fid, const char *name, hid_t dcpl, int if_fletcher32, TESTING(" filters (uninitialized read)"); if(H5Dread(dataset, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, dxpl, check) < 0) - TEST_ERROR; + TEST_ERROR; for(i=0; i<(size_t)size[0]; i++) { - for(j=0; j<(size_t)size[1]; j++) { - if(0!=check[i][j]) { - H5_FAILED(); - printf(" Read a non-zero value.\n"); - printf(" At index %lu,%lu\n", - (unsigned long)i, (unsigned long)j); - goto error; - } - } + for(j=0; j<(size_t)size[1]; j++) { + if(0!=check[i][j]) { + H5_FAILED(); + printf(" Read a non-zero value.\n"); + printf(" At index %lu,%lu\n", + (unsigned long)i, (unsigned long)j); + goto error; + } + } } PASSED(); @@ -1750,13 +1669,13 @@ test_filter_internal(hid_t fid, const char *name, hid_t dcpl, int if_fletcher32, TESTING(" filters (write)"); for(i=n=0; i=0) TEST_ERROR; - } else { + } + else { if(H5Dread(dataset, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, dxpl, check) < 0) - TEST_ERROR; + TEST_ERROR; /* Check that the values read are the same as the values written */ for(i=0; i=0) TEST_ERROR; - } else { + } + else { /* Read the dataset back and check it */ if(H5Dread(dataset, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, dxpl, check) < 0) - TEST_ERROR; + TEST_ERROR; /* Check that the values read are the same as the values written */ for(i=0; i=0) TEST_ERROR; - } else { + } + else { if(H5Dread (dataset, H5T_NATIVE_INT, sid, sid, dxpl, check) < 0) - TEST_ERROR; + TEST_ERROR; /* Check that the values read are the same as the values written */ for(i=0; i<(size_t)hs_size[0]; i++) { - for(j=0; j<(size_t)hs_size[1]; j++) { - if(points[(size_t)hs_offset[0]+i][(size_t)hs_offset[1]+j] != - check[(size_t)hs_offset[0]+i][(size_t)hs_offset[1]+j]) { - H5_FAILED(); - fprintf(stderr," Read different values than written.\n"); - fprintf(stderr," At index %lu,%lu\n", - (unsigned long)((size_t)hs_offset[0]+i), - (unsigned long)((size_t)hs_offset[1]+j)); - fprintf(stderr," At original: %d\n", - (int)points[(size_t)hs_offset[0]+i][(size_t)hs_offset[1]+j]); - fprintf(stderr," At returned: %d\n", - (int)check[(size_t)hs_offset[0]+i][(size_t)hs_offset[1]+j]); - goto error; - } - } + for(j=0; j<(size_t)hs_size[1]; j++) { + if(points[(size_t)hs_offset[0]+i][(size_t)hs_offset[1]+j] != + check[(size_t)hs_offset[0]+i][(size_t)hs_offset[1]+j]) { + H5_FAILED(); + fprintf(stderr," Read different values than written.\n"); + fprintf(stderr," At index %lu,%lu\n", + (unsigned long)((size_t)hs_offset[0]+i), + (unsigned long)((size_t)hs_offset[1]+j)); + fprintf(stderr," At original: %d\n", + (int)points[(size_t)hs_offset[0]+i][(size_t)hs_offset[1]+j]); + fprintf(stderr," At returned: %d\n", + (int)check[(size_t)hs_offset[0]+i][(size_t)hs_offset[1]+j]); + goto error; + } + } } } @@ -2004,18 +1926,14 @@ error: } /*------------------------------------------------------------------------- - * Function: test_filter_noencoder - * - * Purpose: Tests filters with no encoder present. Ensures that data - * can still be decoded correctly and that errors are thrown - * when the application tries to write. - * - * Return: Success: 0 - * Failure: -1 + * Function: test_filter_noencoder * - * Programmer: Nat Furrer and James Laird - * Monday, June 7, 2004 + * Purpose: Tests filters with no encoder present. Ensures that data + * can still be decoded correctly and that errors are thrown + * when the application tries to write. * + * Return: Success: 0 + * Failure: -1 *------------------------------------------------------------------------- */ #ifdef H5_HAVE_FILTER_SZIP @@ -2086,7 +2004,7 @@ test_filter_noencoder(const char *dset_name) */ dims = 20; /* Dataset is originally of size 10 */ H5E_BEGIN_TRY{ - err = H5Dset_extent(dset_id, &dims); + err = H5Dset_extent(dset_id, &dims); }H5E_END_TRY if(err >= 0) goto error; @@ -2095,7 +2013,7 @@ test_filter_noencoder(const char *dset_name) * the filter does not have an encoder. */ H5E_BEGIN_TRY{ - err = H5Dwrite(dset_id, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, test_ints); + err = H5Dwrite(dset_id, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, test_ints); }H5E_END_TRY if(err >= 0) goto error; @@ -2133,10 +2051,6 @@ error: * * Return: Success: 0 * Failure: -1 - * - * Programmer: Nat Furrer and James Laird - * Thursday, June 10, 2004 - * *------------------------------------------------------------------------- */ static herr_t @@ -2200,16 +2114,12 @@ error: } /*------------------------------------------------------------------------- - * Function: test_filters - * - * Purpose: Tests dataset filter. - * - * Return: Success: 0 - * Failure: -1 + * Function: test_filters * - * Programmer: Robb Matzke - * Wednesday, April 15, 1998 + * Purpose: Tests dataset filter. * + * Return: Success: 0 + * Failure: -1 *------------------------------------------------------------------------- */ static herr_t @@ -2219,27 +2129,27 @@ H5_ATTR_UNUSED #endif /* H5_HAVE_FILTER_SZIP */ fapl) { - hid_t dc; /* Dataset creation property list ID */ + hid_t dc; /* Dataset creation property list ID */ const hsize_t chunk_size[2] = {FILTER_CHUNK_DIM1, FILTER_CHUNK_DIM2}; /* Chunk dimensions */ - hsize_t null_size; /* Size of dataset with null filter */ + hsize_t null_size; /* Size of dataset with null filter */ - hsize_t fletcher32_size; /* Size of dataset with Fletcher32 checksum */ + hsize_t fletcher32_size; /* Size of dataset with Fletcher32 checksum */ unsigned data_corrupt[3]; /* position and length of data to be corrupted */ #ifdef H5_HAVE_FILTER_DEFLATE - hsize_t deflate_size; /* Size of dataset with deflate filter */ + hsize_t deflate_size; /* Size of dataset with deflate filter */ #endif /* H5_HAVE_FILTER_DEFLATE */ #ifdef H5_HAVE_FILTER_SZIP - hsize_t szip_size; /* Size of dataset with szip filter */ - unsigned szip_options_mask=H5_SZIP_NN_OPTION_MASK; - unsigned szip_pixels_per_block=4; + hsize_t szip_size; /* Size of dataset with szip filter */ + unsigned szip_options_mask = H5_SZIP_NN_OPTION_MASK; + unsigned szip_pixels_per_block = 4; #endif /* H5_HAVE_FILTER_SZIP */ hsize_t shuffle_size; /* Size of dataset with shuffle filter */ #if(defined H5_HAVE_FILTER_DEFLATE | defined H5_HAVE_FILTER_SZIP) - hsize_t combo_size; /* Size of dataset with multiple filters */ + hsize_t combo_size; /* Size of dataset with multiple filters */ #endif /* defined H5_HAVE_FILTER_DEFLATE | defined H5_HAVE_FILTER_SZIP */ /* test the H5Zget_filter_info function */ @@ -2334,21 +2244,23 @@ H5_ATTR_UNUSED if((dc = H5Pcreate(H5P_DATASET_CREATE)) < 0) goto error; if(H5Pset_chunk (dc, 2, chunk_size) < 0) goto error; - puts(""); - if(H5Pset_szip(dc, szip_options_mask, szip_pixels_per_block) < 0) goto error; - if(test_filter_internal(file,DSET_SZIP_NAME,dc,DISABLE_FLETCHER32,DATA_NOT_CORRUPTED,&szip_size) < 0) goto error; + puts(""); + if(H5Pset_szip(dc, szip_options_mask, szip_pixels_per_block) < 0) goto error; + if(test_filter_internal(file,DSET_SZIP_NAME,dc,DISABLE_FLETCHER32,DATA_NOT_CORRUPTED,&szip_size) < 0) goto error; if(H5Pclose (dc) < 0) goto error; - } else { - SKIPPED(); + } + else { + SKIPPED(); } TESTING("szip filter (without encoder)"); if( h5_szip_can_encode() != 1) { - puts(""); - if(test_filter_noencoder(NOENCODER_SZIP_DATASET) < 0) goto error; - } else { - SKIPPED(); + puts(""); + if(test_filter_noencoder(NOENCODER_SZIP_DATASET) < 0) goto error; + } + else { + SKIPPED(); } #else /* H5_HAVE_FILTER_SZIP */ @@ -2422,22 +2334,24 @@ H5_ATTR_UNUSED if(H5Pset_fletcher32 (dc) < 0) goto error; if(H5Pset_shuffle (dc) < 0) goto error; - /* Make sure encoding is enabled */ + /* Make sure encoding is enabled */ if( h5_szip_can_encode() == 1) { - puts(""); - if(H5Pset_szip(dc, szip_options_mask, szip_pixels_per_block) < 0) goto error; - if(test_filter_internal(file,DSET_SHUF_SZIP_FLET_NAME,dc,ENABLE_FLETCHER32,DATA_NOT_CORRUPTED,&combo_size) < 0) goto error; - } else { - SKIPPED(); + puts(""); + if(H5Pset_szip(dc, szip_options_mask, szip_pixels_per_block) < 0) goto error; + if(test_filter_internal(file,DSET_SHUF_SZIP_FLET_NAME,dc,ENABLE_FLETCHER32,DATA_NOT_CORRUPTED,&combo_size) < 0) goto error; + } + else { + SKIPPED(); } TESTING("shuffle+szip+checksum filters(checksum first, without encoder)"); if( h5_szip_can_encode() != 1) { - puts(""); - if(test_filter_noencoder(NOENCODER_SZIP_SHUFF_FLETCH_DATASET) < 0) goto error; - } else { - SKIPPED(); + puts(""); + if(test_filter_noencoder(NOENCODER_SZIP_SHUFF_FLETCH_DATASET) < 0) goto error; + } + else { + SKIPPED(); } /* Clean up objects used for this test */ @@ -2447,20 +2361,20 @@ H5_ATTR_UNUSED /* Make sure encoding is enabled */ if( h5_szip_can_encode() == 1) { - puts(""); - if((dc = H5Pcreate(H5P_DATASET_CREATE)) < 0) goto error; - if(H5Pset_chunk (dc, 2, chunk_size) < 0) goto error; - if(H5Pset_shuffle (dc) < 0) goto error; - if(H5Pset_szip(dc, szip_options_mask, szip_pixels_per_block) < 0) goto error; - if(H5Pset_fletcher32 (dc) < 0) goto error; - - if(test_filter_internal(file,DSET_SHUF_SZIP_FLET_NAME_2,dc,ENABLE_FLETCHER32,DATA_NOT_CORRUPTED,&combo_size) < 0) goto error; + puts(""); + if((dc = H5Pcreate(H5P_DATASET_CREATE)) < 0) goto error; + if(H5Pset_chunk (dc, 2, chunk_size) < 0) goto error; + if(H5Pset_shuffle (dc) < 0) goto error; + if(H5Pset_szip(dc, szip_options_mask, szip_pixels_per_block) < 0) goto error; + if(H5Pset_fletcher32 (dc) < 0) goto error; - /* Clean up objects used for this test */ - if(H5Pclose (dc) < 0) goto error; + if(test_filter_internal(file,DSET_SHUF_SZIP_FLET_NAME_2,dc,ENABLE_FLETCHER32,DATA_NOT_CORRUPTED,&combo_size) < 0) goto error; - } else { - SKIPPED(); + /* Clean up objects used for this test */ + if(H5Pclose (dc) < 0) goto error; + } + else { + SKIPPED(); } #else /* H5_HAVE_FILTER_SZIP */ @@ -2476,16 +2390,12 @@ error: /*------------------------------------------------------------------------- - * Function: test_missing_filter - * - * Purpose: Tests library behavior when filter is missing + * Function: test_missing_filter * - * Return: Success: 0 - * Failure: -1 - * - * Programmer: Quincey Koziol - * Thursday, November 14, 2002 + * Purpose: Tests library behavior when filter is missing * + * Return: Success: 0 + * Failure: -1 *------------------------------------------------------------------------- */ static herr_t @@ -2610,16 +2520,16 @@ test_missing_filter(hid_t file) /* Compare data */ /* Check that the values read are the same as the values written */ for(i=0; i<(size_t)dims[0]; i++) { - for(j=0; j<(size_t)dims[1]; j++) { - if(points[i][j] != check[i][j]) { - H5_FAILED(); - printf(" Line %d: Read different values than written.\n",__LINE__); - printf(" At index %lu,%lu\n", (unsigned long)(i), (unsigned long)(j)); - printf(" At original: %d\n",points[i][j]); - printf(" At returned: %d\n",check[i][j]); - goto error; - } /* end if */ - } /* end for */ + for(j=0; j<(size_t)dims[1]; j++) { + if(points[i][j] != check[i][j]) { + H5_FAILED(); + printf(" Line %d: Read different values than written.\n",__LINE__); + printf(" At index %lu,%lu\n", (unsigned long)(i), (unsigned long)(j)); + printf(" At original: %d\n",points[i][j]); + printf(" At returned: %d\n",check[i][j]); + goto error; + } /* end if */ + } /* end for */ } /* end for */ /* Close dataset */ @@ -2716,30 +2626,25 @@ error: /*------------------------------------------------------------------------- - * Function: test_onebyte_shuffle - * - * Purpose: Tests the 8-bit array with shuffling algorithm. - * The shuffled array should be the same result as - * that before the shuffling. - * - * Return: Success: 0 + * Function: test_onebyte_shuffle * - * Failure: -1 - * - * Programmer: Kent Yang - * Wednesday, Nov. 13th, 2002 + * Purpose: Tests the 8-bit array with shuffling algorithm. + * The shuffled array should be the same result as + * that before the shuffling. * + * Return: Success: 0 + * Failure: -1 *------------------------------------------------------------------------- */ static herr_t test_onebyte_shuffle(hid_t file) { - hid_t dataset, space,dc; - const hsize_t size[2] = {10, 20}; - const hsize_t chunk_size[2] = {10, 20}; - unsigned char orig_data[10][20]; - unsigned char new_data[10][20]; - size_t i, j; + hid_t dataset, space,dc; + const hsize_t size[2] = {10, 20}; + const hsize_t chunk_size[2] = {10, 20}; + unsigned char orig_data[10][20]; + unsigned char new_data[10][20]; + size_t i, j; TESTING("8-bit shuffling (setup)"); @@ -2753,11 +2658,11 @@ test_onebyte_shuffle(hid_t file) /* Create the dataset */ if((dataset = H5Dcreate2(file, DSET_ONEBYTE_SHUF_NAME, H5T_NATIVE_UCHAR, - space, H5P_DEFAULT, dc, H5P_DEFAULT)) < 0) goto error; + space, H5P_DEFAULT, dc, H5P_DEFAULT)) < 0) goto error; for(i= 0;i< 10; i++) - for(j = 0; j < 20; j++) - orig_data[i][j] = (unsigned char)HDrandom(); + for(j = 0; j < 20; j++) + orig_data[i][j] = (unsigned char)HDrandom(); PASSED(); @@ -2768,9 +2673,8 @@ test_onebyte_shuffle(hid_t file) */ TESTING("8-bit shuffling (write)"); - if(H5Dwrite(dataset, H5T_NATIVE_UCHAR, H5S_ALL, H5S_ALL, H5P_DEFAULT, - orig_data) < 0) - goto error; + if(H5Dwrite(dataset, H5T_NATIVE_UCHAR, H5S_ALL, H5S_ALL, H5P_DEFAULT, orig_data) < 0) + goto error; PASSED(); @@ -2781,21 +2685,20 @@ test_onebyte_shuffle(hid_t file) TESTING("8-bit shuffling (read)"); /* Read the dataset back */ - if(H5Dread(dataset, H5T_NATIVE_UCHAR, H5S_ALL, H5S_ALL, H5P_DEFAULT, - new_data) < 0) - goto error; + if(H5Dread(dataset, H5T_NATIVE_UCHAR, H5S_ALL, H5S_ALL, H5P_DEFAULT, new_data) < 0) + goto error; /* Check that the values read are the same as the values written */ for(i=0; i<(size_t)size[0]; i++) { - for(j=0; j<(size_t)size[1]; j++) { - if(new_data[i][j] != orig_data[i][j]) { - H5_FAILED(); - printf(" Read different values than written.\n"); - printf(" At index %lu,%lu\n", - (unsigned long)i, (unsigned long)j); - goto error; - } - } + for(j=0; j<(size_t)size[1]; j++) { + if(new_data[i][j] != orig_data[i][j]) { + H5_FAILED(); + printf(" Read different values than written.\n"); + printf(" At index %lu,%lu\n", + (unsigned long)i, (unsigned long)j); + goto error; + } + } } /*---------------------------------------------------------------------- @@ -2820,12 +2723,7 @@ error: * Purpose: Tests the integer datatype for nbit filter * * Return: Success: 0 - * * Failure: -1 - * - * Programmer: Xiaowen Wu - * Wednesday, Dec. 23th, 2004 - * *------------------------------------------------------------------------- */ static herr_t @@ -2871,14 +2769,14 @@ test_nbit_int(hid_t file) /* Initialize data, assuming size of long long >= size of int */ for(i= 0;i< (size_t)size[0]; i++) - for(j = 0; j < (size_t)size[1]; j++) { - power = HDpow(2.0f, (double)(precision - 1)); - orig_data[i][j] = (int)(((long long)HDrandom() % (long long)power) << offset); + for(j = 0; j < (size_t)size[1]; j++) { + power = HDpow(2.0f, (double)(precision - 1)); + orig_data[i][j] = (int)(((long long)HDrandom() % (long long)power) << offset); - /* even-numbered values are negtive */ - if((i*size[1]+j+1)%2 == 0) - orig_data[i][j] = -orig_data[i][j]; - } + /* even-numbered values are negtive */ + if((i*size[1]+j+1)%2 == 0) + orig_data[i][j] = -orig_data[i][j]; + } PASSED(); @@ -2889,8 +2787,7 @@ test_nbit_int(hid_t file) */ TESTING(" nbit int (write)"); - if(H5Dwrite(dataset, mem_datatype, H5S_ALL, H5S_ALL, H5P_DEFAULT, - orig_data) < 0) + if(H5Dwrite(dataset, mem_datatype, H5S_ALL, H5S_ALL, H5P_DEFAULT, orig_data) < 0) goto error; PASSED(); @@ -2901,8 +2798,7 @@ test_nbit_int(hid_t file) TESTING(" nbit int (read)"); /* Read the dataset back */ - if(H5Dread(dataset, mem_datatype, H5S_ALL, H5S_ALL, H5P_DEFAULT, - new_data) < 0) + if(H5Dread(dataset, mem_datatype, H5S_ALL, H5S_ALL, H5P_DEFAULT, new_data) < 0) goto error; /* Check that the values read are the same as the values written @@ -2945,12 +2841,7 @@ error: * Purpose: Tests the float datatype of nbit filter * * Return: Success: 0 - * * Failure: -1 - * - * Programmer: Xiaowen Wu - * Friday, Jan. 21th, 2005 - * *------------------------------------------------------------------------- */ static herr_t @@ -2966,7 +2857,7 @@ test_nbit_float(hid_t file) {-49140.0f, 2350.25f, -3.2110596e-1f, 6.4998865e-5f, -0.0f}}; float new_data[2][5]; size_t precision, offset; - size_t i, j; + size_t i, j; TESTING(" nbit float (setup)"); @@ -3068,12 +2959,7 @@ error: * Purpose: Tests the double datatype of nbit filter * * Return: Success: 0 - * * Failure: -1 - * - * Programmer: Xiaowen Wu - * Wednesday, Jan. 26th, 2005 - * *------------------------------------------------------------------------- */ static herr_t @@ -3093,12 +2979,12 @@ test_nbit_double(hid_t file) H5_DOUBLE(1.2677579992621376e-61), H5_DOUBLE(64568.289448797700), H5_DOUBLE(-1.0619721778839084e-75) - }, + }, { H5_DOUBLE(2.1499497833454840e+56), - H5_DOUBLE(6.6562295504670740e-3), - H5_DOUBLE(-1.5747263393432150), - H5_DOUBLE(1.0711093225222612), + H5_DOUBLE(6.6562295504670740e-3), + H5_DOUBLE(-1.5747263393432150), + H5_DOUBLE(1.0711093225222612), H5_DOUBLE(-9.8971679387636870e-1) }}; double new_data[2][5]; @@ -3205,12 +3091,7 @@ error: * Purpose: Tests the simple version array datatype for nbit filter * * Return: Success: 0 - * * Failure: -1 - * - * Programmer: Xiaowen Wu - * Tuesday, Jan. 18th, 2005 - * *------------------------------------------------------------------------- */ static herr_t @@ -3362,7 +3243,7 @@ test_nbit_compound(hid_t file) hid_t dataset, space, dc; const hsize_t size[2] = {2, 5}; const hsize_t chunk_size[2] = {2, 5}; - const float float_val[2][5] = {{188384.0F, 19.103516F, -1.0831790e9F, -84.242188F, 5.2045898F}, + const float float_val[2][5] = {{188384.0F, 19.103516F, -1.0831790e9F, -84.242188F, 5.2045898F}, {-49140.0F, 2350.25F, -3.2110596e-1F, 6.4998865e-5F, -0.0F}}; atomic orig_data[2][5]; atomic new_data[2][5]; @@ -3796,7 +3677,7 @@ test_nbit_compound_2(hid_t file) /* Check that the values read are the same as the values written * Use mask for checking the significant bits, ignoring the padding bits */ - /* The original code + /* The original code * i_mask = ~((unsigned)~0 << (precision[0] + offset[0])) & ((unsigned)~0 << offset[0]); * left shift a 32-bit integer for 32-bit. The result is undefined by C language. A user * discovered it using clang compiler with -fcatch-undefined-behavior option (see Issue 7674 @@ -4134,7 +4015,7 @@ test_nbit_int_size(hid_t file) printf(" line %d: H5Pset_order failed\n",__LINE__); goto error; } /* end if */ - + if(H5Tset_size(datatype, 4)<0) { H5_FAILED(); printf(" line %d: H5Pset_size failed\n",__LINE__); @@ -4190,7 +4071,7 @@ test_nbit_int_size(hid_t file) * Create a new dataset within the file. */ if((dataset = H5Dcreate2 (file, DSET_NBIT_INT_SIZE_NAME, datatype, - dataspace, H5P_DEFAULT, + dataspace, H5P_DEFAULT, dset_create_props, H5P_DEFAULT))<0) { H5_FAILED(); printf(" line %d: H5dwrite failed\n",__LINE__); @@ -4207,7 +4088,7 @@ test_nbit_int_size(hid_t file) goto error; } /* end if */ - /* + /* * Get the precision of the data type */ if((precision = H5Tget_precision(datatype)) == 0) { @@ -4216,10 +4097,10 @@ test_nbit_int_size(hid_t file) goto error; } /* end if */ - /* + /* * The size of the dataset after compression should around 2 * DSET_DIM1 * DSET_DIM2 */ - if((dset_size = H5Dget_storage_size(dataset)) < DSET_DIM1*DSET_DIM2*(precision/8) || + 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); @@ -4243,7 +4124,7 @@ error: /*------------------------------------------------------------------------- * Function: test_nbit_flt_size * - * Purpose: Tests the correct size of the floating-number datatype for + * Purpose: Tests the correct size of the floating-number datatype for * nbit filter * * Return: Success: 0 @@ -4334,15 +4215,15 @@ test_nbit_flt_size(hid_t file) printf(" line %d: H5Pset_order failed\n",__LINE__); goto error; } /* end if */ - + if(H5Tset_ebias(datatype, 31)<0) { H5_FAILED(); printf(" line %d: H5Pset_size failed\n",__LINE__); goto error; } /* end if */ - /* - * Initiliaze data buffer with random data + /* + * Initiliaze data buffer with random data */ for (i=0; i < DSET_DIM1; i++) for (j=0; j < DSET_DIM2; j++) @@ -4388,7 +4269,7 @@ test_nbit_flt_size(hid_t file) * Create a new dataset within the file. */ if((dataset = H5Dcreate2 (file, DSET_NBIT_FLT_SIZE_NAME, datatype, - dataspace, H5P_DEFAULT, + dataspace, H5P_DEFAULT, dset_create_props, H5P_DEFAULT))<0) { H5_FAILED(); printf(" line %d: H5dwrite failed\n",__LINE__); @@ -4405,7 +4286,7 @@ test_nbit_flt_size(hid_t file) goto error; } /* end if */ - /* + /* * Get the precision of the data type */ if((precision = H5Tget_precision(datatype)) == 0) { @@ -4414,10 +4295,10 @@ test_nbit_flt_size(hid_t file) goto error; } /* end if */ - /* + /* * The size of the dataset after compression should around 2 * DSET_DIM1 * DSET_DIM2 */ - if((dset_size = H5Dget_storage_size(dataset)) < DSET_DIM1*DSET_DIM2*(precision/8) || + 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); @@ -5162,18 +5043,18 @@ error: /*------------------------------------------------------------------------- - * Function: test_multiopen + * Function: test_multiopen * - * Purpose: Tests that a bug no longer exists. If a dataset is opened - * twice and one of the handles is used to extend the dataset, - * then the other handle should return the new size when - * queried. + * Purpose: Tests that a bug no longer exists. If a dataset is opened + * twice and one of the handles is used to extend the dataset, + * then the other handle should return the new size when + * queried. * - * Return: Success: 0 + * Return: Success: 0 * - * Failure: -1 + * Failure: -1 * - * Programmer: Robb Matzke + * Programmer: Robb Matzke * Tuesday, June 9, 1998 * *------------------------------------------------------------------------- @@ -5181,10 +5062,10 @@ error: static herr_t test_multiopen (hid_t file) { - hid_t dcpl = -1, space = -1, dset1 = -1, dset2 = -1; - hsize_t cur_size[1] = {10}; - static hsize_t max_size[1] = {H5S_UNLIMITED}; - hsize_t tmp_size[1]; + hid_t dcpl = -1, space = -1, dset1 = -1, dset2 = -1; + hsize_t cur_size[1] = {10}; + static hsize_t max_size[1] = {H5S_UNLIMITED}; + hsize_t tmp_size[1]; TESTING("multi-open with extending"); @@ -5204,9 +5085,9 @@ test_multiopen (hid_t file) if((space = H5Dget_space(dset2)) < 0) goto error; if(H5Sget_simple_extent_dims(space, tmp_size, NULL) < 0) goto error; if(cur_size[0] != tmp_size[0]) { - H5_FAILED(); - printf(" Got %d instead of %d!\n", (int)tmp_size[0], (int)cur_size[0]); - goto error; + H5_FAILED(); + printf(" Got %d instead of %d!\n", (int)tmp_size[0], (int)cur_size[0]); + goto error; } /* end if */ if(H5Dclose(dset1) < 0) goto error; @@ -5219,25 +5100,25 @@ test_multiopen (hid_t file) error: H5E_BEGIN_TRY { - H5Dclose(dset1); - H5Dclose(dset2); - H5Sclose(space); - H5Pclose(dcpl); + H5Dclose(dset1); + H5Dclose(dset2); + H5Sclose(space); + H5Pclose(dcpl); } H5E_END_TRY; return -1; } /*------------------------------------------------------------------------- - * Function: test_types + * Function: test_types * - * Purpose: Make some datasets with various types so we can test h5ls. + * Purpose: Make some datasets with various types so we can test h5ls. * - * Return: Success: 0 + * Return: Success: 0 * - * Failure: -1 + * Failure: -1 * - * Programmer: Robb Matzke + * Programmer: Robb Matzke * Monday, June 7, 1999 * *------------------------------------------------------------------------- @@ -5245,10 +5126,10 @@ test_multiopen (hid_t file) static herr_t test_types(hid_t file) { - hid_t grp=-1, type=-1, space=-1, dset=-1; - size_t i; - hsize_t nelmts; - unsigned char buf[32]; + hid_t grp=-1, type=-1, space=-1, dset=-1; + size_t i; + hsize_t nelmts; + unsigned char buf[32]; TESTING("various datatypes"); if((grp = H5Gcreate2(file, "typetests", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) goto error; @@ -5256,12 +5137,12 @@ test_types(hid_t file) /* bitfield_1 */ nelmts = sizeof(buf); if((type=H5Tcopy(H5T_STD_B8LE)) < 0 || - (space=H5Screate_simple(1, &nelmts, NULL)) < 0 || - (dset=H5Dcreate2(grp, "bitfield_1", type, space, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) - goto error; + (space=H5Screate_simple(1, &nelmts, NULL)) < 0 || + (dset=H5Dcreate2(grp, "bitfield_1", type, space, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) + goto error; for(i=0; i= 5 || (j % 10) >= 5) { - if(rdata2[i][j] != 911) { - printf(" Line %d: Incorrect value, rdata2[%u][%u] = %d\n", - __LINE__,(unsigned)i, (unsigned)j, rdata2[i][j]); - TEST_ERROR; - } /* end if */ - } /* end if */ - else { - if(rdata2[i][j] != wdata2[i][j]) { - printf(" Line %d: Incorrect value, wdata2[%u][%u] = %d, rdata2[%u][%u] = %d\n", - __LINE__,(unsigned)i, (unsigned)j, wdata2[i][j],(unsigned)i, (unsigned)j, rdata2[i][j]); - TEST_ERROR; - } /* end if */ - } /* end else */ - } /* end for */ + for(j = 0; j < MISSING_CHUNK_DIM; j++) { + + if((i % 10) >= 5 || (j % 10) >= 5) { + if(rdata2[i][j] != 911) { + printf(" Line %d: Incorrect value, rdata2[%u][%u] = %d\n", + __LINE__,(unsigned)i, (unsigned)j, rdata2[i][j]); + TEST_ERROR; + } /* end if */ + } /* end if */ + else { + if(rdata2[i][j] != wdata2[i][j]) { + printf(" Line %d: Incorrect value, wdata2[%u][%u] = %d, rdata2[%u][%u] = %d\n", + __LINE__,(unsigned)i, (unsigned)j, wdata2[i][j],(unsigned)i, (unsigned)j, rdata2[i][j]); + TEST_ERROR; + } /* end if */ + } /* end else */ + } /* end for */ } /* end for */ /* Close everything */ @@ -6992,7 +6873,7 @@ error: /*------------------------------------------------------------------------- * Function: test_random_chunks_real * - * Purpose: Tests that write/read on randomly selected chunks + * Purpose: Tests that write/read on randomly selected chunks * * * Return: Success: 0 @@ -7013,7 +6894,7 @@ test_random_chunks_real(const char *testname, hbool_t early_alloc, hid_t fapl) check2[20][20]; hsize_t coord[NPOINTS][2]; hsize_t dsize[2]={100,100}, dmax[2]={H5S_UNLIMITED, H5S_UNLIMITED}, csize[2]={10,10}, nsize[2]={200,200}; - hsize_t fixed_dmax[2] = {1000, 1000}; + hsize_t fixed_dmax[2] = {1000, 1000}; hsize_t msize[1]={NPOINTS}; const char dname[]="dataset"; int chunk_row, chunk_col; @@ -7101,8 +6982,8 @@ test_random_chunks_real(const char *testname, hbool_t early_alloc, hid_t fapl) if(idx_type != H5D_CHUNK_IDX_FARRAY) FAIL_PUTS_ERROR("should be using Fixed Array as index"); } /* end else */ - } else if(idx_type != H5D_CHUNK_IDX_BTREE) - FAIL_PUTS_ERROR("should be using v1 B-tree as index"); + } else if(idx_type != H5D_CHUNK_IDX_BTREE) + FAIL_PUTS_ERROR("should be using v1 B-tree as index"); /* Get dataset dataspace */ if((s = H5Dget_space(d)) < 0) TEST_ERROR; @@ -7136,9 +7017,9 @@ test_random_chunks_real(const char *testname, hbool_t early_alloc, hid_t fapl) /* Create dataspace with unlimited maximum dimensions */ if(early_alloc) { - if((s = H5Screate_simple(2, dsize, fixed_dmax)) < 0) TEST_ERROR; + if((s = H5Screate_simple(2, dsize, fixed_dmax)) < 0) TEST_ERROR; } else - if((s = H5Screate_simple(2, dsize, dmax)) < 0) TEST_ERROR; + if((s = H5Screate_simple(2, dsize, dmax)) < 0) TEST_ERROR; /* Create dataset creation property list */ if((dcpl = H5Pcreate(H5P_DATASET_CREATE)) < 0) TEST_ERROR; @@ -7158,13 +7039,13 @@ test_random_chunks_real(const char *testname, hbool_t early_alloc, hid_t fapl) /* Verify index type */ if(low == H5F_LIBVER_LATEST) { - if(early_alloc) { - if(idx_type != H5D_CHUNK_IDX_NONE) - FAIL_PUTS_ERROR("should be using implicit indexing"); - } else if(idx_type != H5D_CHUNK_IDX_BT2) - FAIL_PUTS_ERROR("should be using v2 B-tree as index"); - } else if(idx_type != H5D_CHUNK_IDX_BTREE) - FAIL_PUTS_ERROR("should be using v1 B-tree as index"); + if(early_alloc) { + if(idx_type != H5D_CHUNK_IDX_NONE) + FAIL_PUTS_ERROR("should be using implicit indexing"); + } else if(idx_type != H5D_CHUNK_IDX_BT2) + FAIL_PUTS_ERROR("should be using v2 B-tree as index"); + } else if(idx_type != H5D_CHUNK_IDX_BTREE) + FAIL_PUTS_ERROR("should be using v1 B-tree as index"); /* Extend both dimensions of the dataset */ if(H5Dset_extent(d, nsize) < 0) TEST_ERROR; @@ -7269,8 +7150,8 @@ test_random_chunks_real(const char *testname, hbool_t early_alloc, hid_t fapl) if(idx_type != H5D_CHUNK_IDX_FARRAY) FAIL_PUTS_ERROR("should be using Fixed Array as index"); } /* end else */ - } else if(idx_type != H5D_CHUNK_IDX_BTREE) - FAIL_PUTS_ERROR("should be using v1 B-tree as index"); + } else if(idx_type != H5D_CHUNK_IDX_BTREE) + FAIL_PUTS_ERROR("should be using v1 B-tree as index"); /* Extend both dimensions of the dataset */ if(H5Dset_extent(d, nsize) < 0) TEST_ERROR; @@ -7360,16 +7241,16 @@ error: /*------------------------------------------------------------------------- * Function: test_random_chunks * - * Purpose: Tests that write/read on randomly selected chunks + * Purpose: Tests that write/read on randomly selected chunks * First file: * One dataset has fixed dimensions without max. dims & H5D_ALLOC_TIME_EARLY * One dataset has fixed dimensions without max. dims & default alloc time - * Second file: - * One extendible dataset with unlimited max. dims & H5D_ALLOC_TIME_EARLY - * One extendible dataset with unlimited max. dims & default alloc time - * third file: - * one extendible dataset with fixed max. dims & H5D_ALLOC_TIME_EARLY - * one extendible dataset with fixed max. dims & default alloc time + * Second file: + * One extendible dataset with unlimited max. dims & H5D_ALLOC_TIME_EARLY + * One extendible dataset with unlimited max. dims & default alloc time + * third file: + * one extendible dataset with fixed max. dims & H5D_ALLOC_TIME_EARLY + * one extendible dataset with fixed max. dims & default alloc time * * All the datasets in second & third files are extended before write/read operations * @@ -7409,11 +7290,11 @@ set_local_deprec(hid_t H5_ATTR_UNUSED dcpl_id, hid_t H5_ATTR_UNUSED type_id, hid /* Old style H5Z_class_t, essentially a copy of the "bogus" filter */ const H5Z_class1_t H5Z_DEPREC[1] = {{ - H5Z_FILTER_DEPREC, /* Filter id number */ - "deprec", /* Filter name for debugging */ + H5Z_FILTER_DEPREC, /* Filter id number */ + "deprec", /* Filter name for debugging */ can_apply_deprec, /* The "can apply" callback */ set_local_deprec, /* The "set local" callback */ - filter_bogus, /* The actual filter function */ + filter_bogus, /* The actual filter function */ }}; @@ -7433,11 +7314,11 @@ const H5Z_class1_t H5Z_DEPREC[1] = {{ static herr_t test_deprec(hid_t file) { - hid_t dataset, space, small_space, create_parms, dcpl; - hsize_t dims[2], small_dims[2]; + hid_t dataset, space, small_space, create_parms, dcpl; + hsize_t dims[2], small_dims[2]; hsize_t deprec_size; - herr_t status; - hsize_t csize[2]; + herr_t status; + hsize_t csize[2]; TESTING("deprecated API routines"); @@ -7454,7 +7335,7 @@ test_deprec(hid_t file) assert(space>=0); /* - * Create a dataset using the default dataset creation properties. We're + * Create a dataset using the default dataset creation properties. We're * not sure what they are, so we won't check. */ if((dataset = H5Dcreate1(file, DSET_DEPREC_NAME, H5T_NATIVE_DOUBLE, space, H5P_DEFAULT)) < 0) goto error; @@ -7468,13 +7349,13 @@ test_deprec(hid_t file) * reporting. */ H5E_BEGIN_TRY { - dataset = H5Dcreate1(file, DSET_DEFAULT_NAME, H5T_NATIVE_DOUBLE, space, - H5P_DEFAULT); + dataset = H5Dcreate1(file, DSET_DEFAULT_NAME, H5T_NATIVE_DOUBLE, space, + H5P_DEFAULT); } H5E_END_TRY; if(dataset >= 0) { - H5_FAILED(); - puts(" Library allowed overwrite of existing dataset."); - goto error; + H5_FAILED(); + puts(" Library allowed overwrite of existing dataset."); + goto error; } /* @@ -7490,12 +7371,12 @@ test_deprec(hid_t file) * reporting. */ H5E_BEGIN_TRY { - dataset = H5Dopen1(file, "does_not_exist"); + dataset = H5Dopen1(file, "does_not_exist"); } H5E_END_TRY; if(dataset >= 0) { - H5_FAILED(); - puts(" Opened a non-existent dataset."); - goto error; + H5_FAILED(); + puts(" Opened a non-existent dataset."); + goto error; } /* @@ -7539,12 +7420,12 @@ test_deprec(hid_t file) assert(status >= 0); H5E_BEGIN_TRY { dataset = H5Dcreate1(file, DSET_DEPREC_NAME_CHUNKED, H5T_NATIVE_DOUBLE, space, - create_parms); + create_parms); } H5E_END_TRY; if(dataset >= 0) { - H5_FAILED(); - puts(" Opened a dataset with incorrect chunking parameters."); - goto error; + H5_FAILED(); + puts(" Opened a dataset with incorrect chunking parameters."); + goto error; } csize[0] = 5; @@ -7649,7 +7530,7 @@ test_huge_chunks(hid_t fapl) ret = H5Pset_chunk(dcpl, 1, &chunk_dim); } H5E_END_TRY; if(ret >= 0) - FAIL_PUTS_ERROR(" Set chunk size with too large of chunk dimensions.") + FAIL_PUTS_ERROR(" Set chunk size with too large of chunk dimensions.") /* Try to set too large of a chunk for n-D dataset (# of elements) */ chunk_dim2[0] = TOO_HUGE_CHUNK_DIM2_0; @@ -7659,7 +7540,7 @@ test_huge_chunks(hid_t fapl) ret = H5Pset_chunk(dcpl, 3, chunk_dim2); } H5E_END_TRY; if(ret >= 0) - FAIL_PUTS_ERROR(" Set chunk size with too large of chunk dimensions.") + FAIL_PUTS_ERROR(" Set chunk size with too large of chunk dimensions.") /* Set 1-D chunk size */ chunk_dim = HUGE_CHUNK_DIM; @@ -7674,7 +7555,7 @@ test_huge_chunks(hid_t fapl) dsid = H5Dcreate2(fid, HUGE_DATASET, H5T_NATIVE_INT, sid, H5P_DEFAULT, dcpl, H5P_DEFAULT); } H5E_END_TRY; if(dsid >= 0) - FAIL_PUTS_ERROR(" 1-D Dataset with too large of chunk dimensions created.") + FAIL_PUTS_ERROR(" 1-D Dataset with too large of chunk dimensions created.") /* Close 1-D dataspace */ if(H5Sclose(sid) < 0) FAIL_STACK_ERROR @@ -7697,7 +7578,7 @@ test_huge_chunks(hid_t fapl) dsid = H5Dcreate2(fid, HUGE_DATASET2, H5T_NATIVE_INT, sid, H5P_DEFAULT, dcpl, H5P_DEFAULT); } H5E_END_TRY; if(dsid >= 0) - FAIL_PUTS_ERROR(" n-D Dataset with too large of chunk dimensions created.") + FAIL_PUTS_ERROR(" n-D Dataset with too large of chunk dimensions created.") /* Close n-D dataspace */ if(H5Sclose(sid) < 0) FAIL_STACK_ERROR @@ -7950,24 +7831,24 @@ static herr_t test_big_chunks_bypass_cache(hid_t fapl) { char filename[FILENAME_BUF_SIZE]; - hid_t fid = -1; /* File ID */ - hid_t fapl_local = -1; /* File access property list ID */ - hid_t dcpl = -1, t_dcpl = -1; /* Dataset creation property list ID */ - hid_t sid = -1, t_sid = -1; /* Dataspace ID */ - hid_t mid; /* Memory space ID */ - hid_t dsid = -1, t_dsid = -1; /* Dataset ID */ - hsize_t dim, chunk_dim; /* Dataset and chunk dimensions */ + hid_t fid = -1; /* File ID */ + hid_t fapl_local = -1; /* File access property list ID */ + hid_t dcpl = -1, t_dcpl = -1; /* Dataset creation property list ID */ + hid_t sid = -1, t_sid = -1; /* Dataspace ID */ + hid_t mid; /* Memory space ID */ + hid_t dsid = -1, t_dsid = -1; /* Dataset ID */ + hsize_t dim, chunk_dim; /* Dataset and chunk dimensions */ hsize_t t_dim[2], t_max[2], t_chunk_dim[2]; /* Dataset and chunk dimensions */ - size_t rdcc_nelmts, rdcc_nbytes; /* Chunk cache parameters */ - int fvalue = BYPASS_FILL_VALUE; /* Fill value */ - hsize_t count, stride, offset, block; /* Setting for hyperslab (1-D) */ + size_t rdcc_nelmts, rdcc_nbytes; /* Chunk cache parameters */ + int fvalue = BYPASS_FILL_VALUE; /* Fill value */ + hsize_t count, stride, offset, block; /* Setting for hyperslab (1-D) */ hsize_t t_count[2], t_stride[2], t_offset[2], t_block[2]; /* Setting for hyperslab (2-D) */ - /* Buffers for reading and writing data (1-D) */ - int *wdata = NULL, *rdata1 = NULL, *rdata2 = NULL; - /* Buffer for reading and writing data (2-D) */ + /* Buffers for reading and writing data (1-D) */ + int *wdata = NULL, *rdata1 = NULL, *rdata2 = NULL; + /* Buffer for reading and writing data (2-D) */ static int t_wdata[BYPASS_CHUNK_DIM/2][BYPASS_CHUNK_DIM/2], t_rdata1[BYPASS_DIM][BYPASS_DIM], t_rdata2[BYPASS_CHUNK_DIM/2][BYPASS_CHUNK_DIM/2]; - int i, j; /* Local index variables */ + int i, j; /* Local index variables */ H5F_libver_t low; /* File format low bound */ H5D_chunk_index_t idx_type, t_idx_type; /* Dataset chunk index types */ @@ -8030,13 +7911,13 @@ test_big_chunks_bypass_cache(hid_t fapl) /* Chunk index type expected depends on whether we are using the latest version of the format */ if(low == H5F_LIBVER_LATEST) { - /* Verify index type */ - if(idx_type != H5D_CHUNK_IDX_FARRAY) FAIL_PUTS_ERROR("should be using Fixed Array as index"); - if(t_idx_type != H5D_CHUNK_IDX_BT2) FAIL_PUTS_ERROR("should be using v2 B-tree as index"); + /* Verify index type */ + if(idx_type != H5D_CHUNK_IDX_FARRAY) FAIL_PUTS_ERROR("should be using Fixed Array as index"); + if(t_idx_type != H5D_CHUNK_IDX_BT2) FAIL_PUTS_ERROR("should be using v2 B-tree as index"); } else { - /* Verify index type */ - if(idx_type != H5D_CHUNK_IDX_BTREE) FAIL_PUTS_ERROR("should be using v1 B-tree as index"); - if(t_idx_type != H5D_CHUNK_IDX_BTREE) FAIL_PUTS_ERROR("should be using v1 B-tree as index"); + /* Verify index type */ + if(idx_type != H5D_CHUNK_IDX_BTREE) FAIL_PUTS_ERROR("should be using v1 B-tree as index"); + if(t_idx_type != H5D_CHUNK_IDX_BTREE) FAIL_PUTS_ERROR("should be using v1 B-tree as index"); } /* end else */ /* Select first chunk to write the data */ @@ -8064,8 +7945,8 @@ test_big_chunks_bypass_cache(hid_t fapl) /* Initialize data to write for 2-D dataset */ for(i = 0; i < BYPASS_CHUNK_DIM / 2; i++) - for(j = 0; j < BYPASS_CHUNK_DIM / 2; j++) - t_wdata[i][j] = j; + for(j = 0; j < BYPASS_CHUNK_DIM / 2; j++) + t_wdata[i][j] = j; /* Set up memory space for the 2-D dataset */ mid = H5Screate_simple(2, t_block, NULL); @@ -8109,22 +7990,22 @@ test_big_chunks_bypass_cache(hid_t fapl) /* Verify data for the first 2-D dataset */ for(i = 0; i < BYPASS_CHUNK_DIM / 2; i++) - for(j = 0; j < BYPASS_CHUNK_DIM / 2; j++) - if(t_rdata1[i][j] != j) { - printf(" Read different values than written in the 1st chunk.\n"); - printf(" At line %d and index (%d, %d), t_rdata1 = %d. It should be %d.\n", - __LINE__, i, j, t_rdata1[i][j], j); - TEST_ERROR - } /* end if */ + for(j = 0; j < BYPASS_CHUNK_DIM / 2; j++) + if(t_rdata1[i][j] != j) { + printf(" Read different values than written in the 1st chunk.\n"); + printf(" At line %d and index (%d, %d), t_rdata1 = %d. It should be %d.\n", + __LINE__, i, j, t_rdata1[i][j], j); + TEST_ERROR + } /* end if */ for(i = BYPASS_CHUNK_DIM / 2; i < BYPASS_DIM; i++) - for(j = BYPASS_CHUNK_DIM / 2; j < BYPASS_DIM; j++) - if(t_rdata1[i][j] != fvalue) { - printf(" Read different values than written in the 2nd chunk.\n"); - printf(" At line %d and index (%d, %d), t_rdata1 = %d. It should be %d.\n", - __LINE__, i, j, t_rdata1[i][j], fvalue); + for(j = BYPASS_CHUNK_DIM / 2; j < BYPASS_DIM; j++) + if(t_rdata1[i][j] != fvalue) { + printf(" Read different values than written in the 2nd chunk.\n"); + printf(" At line %d and index (%d, %d), t_rdata1 = %d. It should be %d.\n", + __LINE__, i, j, t_rdata1[i][j], fvalue); TEST_ERROR - } /* end if */ + } /* end if */ /* Close the first 1-D & 2-D datasets */ if(H5Dclose(dsid) < 0) FAIL_STACK_ERROR @@ -8160,13 +8041,13 @@ test_big_chunks_bypass_cache(hid_t fapl) * half chunk should bypass the cache because the chunk is bigger than * the cache size. */ if(H5Dread(dsid, H5T_NATIVE_INT, H5S_ALL, sid, H5P_DEFAULT, rdata2) < 0) - FAIL_STACK_ERROR + FAIL_STACK_ERROR if(H5Dread(t_dsid, H5T_NATIVE_INT, mid, t_sid, H5P_DEFAULT, t_rdata2) < 0) - FAIL_STACK_ERROR + FAIL_STACK_ERROR /* Verify data for the second 1-D dataset */ for(i = 0; i < BYPASS_CHUNK_DIM / 2; i++) - if(rdata2[i] != i) { + if(rdata2[i] != i) { printf(" Read different values than written in the chunk.\n"); printf(" At line %d and index %d, rdata2 = %d. It should be %d.\n", __LINE__, i, rdata2[i], i); TEST_ERROR @@ -8174,13 +8055,13 @@ test_big_chunks_bypass_cache(hid_t fapl) /* Verify data for the second 2-D dataset */ for(i = 0; i < BYPASS_CHUNK_DIM / 2; i++) - for(j = 0; j < BYPASS_CHUNK_DIM / 2; j++) - if(t_rdata2[i][j] != j) { - printf(" Read different values than written in the chunk.\n"); - printf(" At line %d and index (%d, %d), t_rdata2 = %d. It should be %d.\n", - __LINE__, i, j, t_rdata2[i][j], j); - TEST_ERROR - } /* end if */ + for(j = 0; j < BYPASS_CHUNK_DIM / 2; j++) + if(t_rdata2[i][j] != j) { + printf(" Read different values than written in the chunk.\n"); + printf(" At line %d and index (%d, %d), t_rdata2 = %d. It should be %d.\n", + __LINE__, i, j, t_rdata2[i][j], j); + TEST_ERROR + } /* end if */ /* Close IDs */ if(H5Sclose(sid) < 0) FAIL_STACK_ERROR @@ -8285,10 +8166,10 @@ test_chunk_fast(const char *env_h5_driver, hid_t fapl) /* Loop over using SWMR access to write */ for(swmr = 0; swmr <= 1; swmr++) { - int compress; /* Whether chunks should be compressed */ + int compress; /* Whether chunks should be compressed */ /* SWMR is now supported with/without latest format: */ - /* (1) write+latest-format (2) SWMR-write+non-latest-format */ + /* (1) write+latest-format (2) SWMR-write+non-latest-format */ /* Skip this iteration if SWMR I/O is not supported for the VFD specified * by the environment variable. @@ -8300,10 +8181,10 @@ test_chunk_fast(const char *env_h5_driver, hid_t fapl) /* Loop over compressing chunks */ for(compress = 0; compress <= 1; compress++) #else - /* Loop over without compression */ + /* Loop over without compression */ for(compress = 0; compress <= 0; compress++) #endif /* H5_HAVE_FILTER_DEFLATE */ - { + { H5D_alloc_time_t alloc_time; /* Storage allocation time */ /* Loop over storage allocation time */ @@ -8572,11 +8453,11 @@ error: * Function: test_reopen_chunk_fast * * Purpose: To verify a bug in extensible arrays as chunk index. - * When the dataset is closed in H5D_close(), the pointer - * to the extensible array struct in the layout message - * is copied via H5D_flush_real() before H5D_chunk_dest(). - * This causes an abort from "Assertion `ea->hdr' failed." - * later when the dataset is re-opened and read. + * When the dataset is closed in H5D_close(), the pointer + * to the extensible array struct in the layout message + * is copied via H5D_flush_real() before H5D_chunk_dest(). + * This causes an abort from "Assertion `ea->hdr' failed." + * later when the dataset is re-opened and read. * * Return: Success: 0 * Failure: -1 @@ -8596,8 +8477,8 @@ test_reopen_chunk_fast(hid_t fapl) hid_t scalar_sid = -1;/* Scalar dataspace ID */ hid_t dsid = -1; /* Dataset ID */ hsize_t dim, max_dim, chunk_dim; /* Dataset and chunk dimensions */ - hsize_t hs_offset; /* Hyperslab offset */ - hsize_t hs_size; /* Hyperslab size */ + hsize_t hs_offset; /* Hyperslab offset */ + hsize_t hs_size; /* Hyperslab size */ H5D_alloc_time_t alloc_time; /* Storage allocation time */ unsigned write_elem, read_elem; /* Element written/read */ unsigned u; /* Local index variable */ @@ -8608,71 +8489,71 @@ test_reopen_chunk_fast(hid_t fapl) /* Loop over storage allocation time */ for(alloc_time = H5D_ALLOC_TIME_EARLY; alloc_time <= H5D_ALLOC_TIME_INCR; H5_INC_ENUM(H5D_alloc_time_t, alloc_time)) { - /* Create file */ - if((fid = H5Fcreate(filename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0) FAIL_STACK_ERROR - - /* Create dataset creation property list */ - if((dcpl = H5Pcreate(H5P_DATASET_CREATE)) < 0) FAIL_STACK_ERROR - - /* Set chunking */ - chunk_dim = 10; - if(H5Pset_chunk(dcpl, 1, &chunk_dim) < 0) FAIL_STACK_ERROR - - /* Set fill time */ - if(H5Pset_fill_time(dcpl, H5D_FILL_TIME_ALLOC) < 0) FAIL_STACK_ERROR - - /* Set allocation time */ - if(H5Pset_alloc_time(dcpl, alloc_time) < 0) FAIL_STACK_ERROR - - /* Create scalar dataspace */ - if((scalar_sid = H5Screate(H5S_SCALAR)) < 0) FAIL_STACK_ERROR - - /* Create 1-D dataspace */ - dim = 100; - max_dim = H5S_UNLIMITED; - if((sid = H5Screate_simple(1, &dim, &max_dim)) < 0) FAIL_STACK_ERROR - - /* Create chunked dataset */ - if((dsid = H5Dcreate2(fid, "dset", H5T_NATIVE_UINT, sid, H5P_DEFAULT, dcpl, H5P_DEFAULT)) < 0) - FAIL_STACK_ERROR - - /* Fill existing elements */ - hs_size = 1; - for(u = 0; u < 100; u++) { - /* Select a single element in the dataset */ - hs_offset = u; - if(H5Sselect_hyperslab(sid, H5S_SELECT_SET, &hs_offset, NULL, &hs_size, NULL) < 0) - FAIL_STACK_ERROR - /* Write element to dataset */ - write_elem = u; - if(H5Dwrite(dsid, H5T_NATIVE_UINT, scalar_sid, sid, H5P_DEFAULT, &write_elem) < 0) - FAIL_STACK_ERROR - } /* end for */ - - /* Close everything */ - if(H5Dclose(dsid) < 0) FAIL_STACK_ERROR - - /* Reopen the dataset */ - if((dsid = H5Dopen2(fid, "dset", H5P_DEFAULT)) < 0) FAIL_STACK_ERROR - hs_size = 1; - - /* Read from dataset */ - for(u = 0; u < 100; u++) { - /* Select a single element in the dataset */ - hs_offset = u; - if(H5Sselect_hyperslab(sid, H5S_SELECT_SET, &hs_offset, NULL, &hs_size, NULL) < 0) - FAIL_STACK_ERROR - - /* Read element from dataset */ - if(H5Dread(dsid, H5T_NATIVE_UINT, scalar_sid, sid, H5P_DEFAULT, &read_elem) < 0) - FAIL_STACK_ERROR - } /* end for */ - - if(H5Dclose(dsid) < 0) FAIL_STACK_ERROR - if(H5Sclose(sid) < 0) FAIL_STACK_ERROR - if(H5Sclose(scalar_sid) < 0) FAIL_STACK_ERROR - if(H5Pclose(dcpl) < 0) FAIL_STACK_ERROR - if(H5Fclose(fid) < 0) FAIL_STACK_ERROR + /* Create file */ + if((fid = H5Fcreate(filename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0) FAIL_STACK_ERROR + + /* Create dataset creation property list */ + if((dcpl = H5Pcreate(H5P_DATASET_CREATE)) < 0) FAIL_STACK_ERROR + + /* Set chunking */ + chunk_dim = 10; + if(H5Pset_chunk(dcpl, 1, &chunk_dim) < 0) FAIL_STACK_ERROR + + /* Set fill time */ + if(H5Pset_fill_time(dcpl, H5D_FILL_TIME_ALLOC) < 0) FAIL_STACK_ERROR + + /* Set allocation time */ + if(H5Pset_alloc_time(dcpl, alloc_time) < 0) FAIL_STACK_ERROR + + /* Create scalar dataspace */ + if((scalar_sid = H5Screate(H5S_SCALAR)) < 0) FAIL_STACK_ERROR + + /* Create 1-D dataspace */ + dim = 100; + max_dim = H5S_UNLIMITED; + if((sid = H5Screate_simple(1, &dim, &max_dim)) < 0) FAIL_STACK_ERROR + + /* Create chunked dataset */ + if((dsid = H5Dcreate2(fid, "dset", H5T_NATIVE_UINT, sid, H5P_DEFAULT, dcpl, H5P_DEFAULT)) < 0) + FAIL_STACK_ERROR + + /* Fill existing elements */ + hs_size = 1; + for(u = 0; u < 100; u++) { + /* Select a single element in the dataset */ + hs_offset = u; + if(H5Sselect_hyperslab(sid, H5S_SELECT_SET, &hs_offset, NULL, &hs_size, NULL) < 0) + FAIL_STACK_ERROR + /* Write element to dataset */ + write_elem = u; + if(H5Dwrite(dsid, H5T_NATIVE_UINT, scalar_sid, sid, H5P_DEFAULT, &write_elem) < 0) + FAIL_STACK_ERROR + } /* end for */ + + /* Close everything */ + if(H5Dclose(dsid) < 0) FAIL_STACK_ERROR + + /* Reopen the dataset */ + if((dsid = H5Dopen2(fid, "dset", H5P_DEFAULT)) < 0) FAIL_STACK_ERROR + hs_size = 1; + + /* Read from dataset */ + for(u = 0; u < 100; u++) { + /* Select a single element in the dataset */ + hs_offset = u; + if(H5Sselect_hyperslab(sid, H5S_SELECT_SET, &hs_offset, NULL, &hs_size, NULL) < 0) + FAIL_STACK_ERROR + + /* Read element from dataset */ + if(H5Dread(dsid, H5T_NATIVE_UINT, scalar_sid, sid, H5P_DEFAULT, &read_elem) < 0) + FAIL_STACK_ERROR + } /* end for */ + + if(H5Dclose(dsid) < 0) FAIL_STACK_ERROR + if(H5Sclose(sid) < 0) FAIL_STACK_ERROR + if(H5Sclose(scalar_sid) < 0) FAIL_STACK_ERROR + if(H5Pclose(dcpl) < 0) FAIL_STACK_ERROR + if(H5Fclose(fid) < 0) FAIL_STACK_ERROR } /* end for */ @@ -8801,12 +8682,12 @@ error: /* This message derives from H5Z */ const H5Z_class2_t H5Z_EXPAND[1] = {{ H5Z_CLASS_T_VERS, /* H5Z_class_t version */ - H5Z_FILTER_EXPAND, /* Filter id number */ + H5Z_FILTER_EXPAND, /* Filter id number */ 1, 1, /* Encoding and decoding enabled */ - "expand", /* Filter name for debugging */ + "expand", /* Filter name for debugging */ NULL, /* The "can apply" callback */ NULL, /* The "set local" callback */ - filter_expand, /* The actual filter function */ + filter_expand, /* The actual filter function */ }}; /* Global "expansion factor" for filter_expand() routine */ @@ -8819,15 +8700,15 @@ static size_t filter_expand_factor_g = 0; * Purpose: For testing library's behavior when a filter expands a chunk * too much. * - * Note: This filter doesn't actually re-allocate the buffer to be - * larger, it just changes the buffer size to a value that's too - * large. The library should throw an error before using the - * incorrect buffer information. + * Note: This filter doesn't actually re-allocate the buffer to be + * larger, it just changes the buffer size to a value that's too + * large. The library should throw an error before using the + * incorrect buffer information. * - * Return: Success: Data chunk size - * Failure: 0 + * Return: Success: Data chunk size + * Failure: 0 * - * Programmer: Quincey Koziol + * Programmer: Quincey Koziol * Mar 31, 2009 * *------------------------------------------------------------------------- @@ -8880,22 +8761,22 @@ static herr_t test_chunk_expand(hid_t fapl) { char filename[FILENAME_BUF_SIZE]; - hid_t fid = -1; /* File ID */ - hid_t dcpl = -1, dcpl2 = -1; /* Dataset creation property list ID */ - hid_t sid = -1, sid2 = -1; /* Dataspace ID */ - hid_t scalar_sid = -1; /* Scalar dataspace ID */ - hid_t dsid = -1, dsid2 = -1; /* Dataset ID */ - hsize_t dim, max_dim, chunk_dim; /* Dataset and chunk dimensions */ - hsize_t dim2[2], max_dim2[2], chunk_dim2[2]; /* Dataset and chunk dimensions */ - H5D_chunk_index_t idx_type, idx_type2; /* Dataset chunk index type */ - H5F_libver_t low, high; /* File format bounds */ - hsize_t hs_offset, hs_offset2[2]; /* Hyperslab offset */ - hsize_t hs_size, hs_size2[2]; /* Hyperslab size */ - H5D_alloc_time_t alloc_time; /* Storage allocation time */ - unsigned write_elem, read_elem; /* Element written/read */ - unsigned write_elem2, read_elem2; /* Element written/read */ - unsigned u; /* Local index variable */ - herr_t status; /* Generic return value */ + hid_t fid = -1; /* File ID */ + hid_t dcpl = -1, dcpl2 = -1; /* Dataset creation property list ID */ + hid_t sid = -1, sid2 = -1; /* Dataspace ID */ + hid_t scalar_sid = -1; /* Scalar dataspace ID */ + hid_t dsid = -1, dsid2 = -1; /* Dataset ID */ + hsize_t dim, max_dim, chunk_dim; /* Dataset and chunk dimensions */ + hsize_t dim2[2], max_dim2[2], chunk_dim2[2]; /* Dataset and chunk dimensions */ + H5D_chunk_index_t idx_type, idx_type2; /* Dataset chunk index type */ + H5F_libver_t low, high; /* File format bounds */ + hsize_t hs_offset, hs_offset2[2]; /* Hyperslab offset */ + hsize_t hs_size, hs_size2[2]; /* Hyperslab size */ + H5D_alloc_time_t alloc_time; /* Storage allocation time */ + unsigned write_elem, read_elem; /* Element written/read */ + unsigned write_elem2, read_elem2; /* Element written/read */ + unsigned u; /* Local index variable */ + herr_t status; /* Generic return value */ TESTING("filter expanding chunks too much"); @@ -8905,8 +8786,8 @@ test_chunk_expand(hid_t fapl) if(H5Pget_libver_bounds(fapl, &low, &high) < 0) FAIL_STACK_ERROR if(sizeof(size_t) <= 4 && low != H5F_LIBVER_LATEST) { - SKIPPED(); - puts(" Current machine can't test for error w/old file format"); + SKIPPED(); + puts(" Current machine can't test for error w/old file format"); } /* end if */ else { /* Register "expansion" filter */ @@ -9261,25 +9142,25 @@ error: /*------------------------------------------------------------------------- * Function: test_fixed_array * - * Purpose: Tests support for Fixed Array and Implicit Indexing + * Purpose: Tests support for Fixed Array and Implicit Indexing * - * Create the following 3 datasets: - * 1) extendible chunked dataset with fixed max. dims - * 2) extendible chunked dataset with NULL max. dims - * 3) extendible chunked dataset with same max. dims - * (Note that the third dataset is created with bigger size for curr & max. dims - * so that Fixed Array Indexing with paging is exercised) + * Create the following 3 datasets: + * 1) extendible chunked dataset with fixed max. dims + * 2) extendible chunked dataset with NULL max. dims + * 3) extendible chunked dataset with same max. dims + * (Note that the third dataset is created with bigger size for curr & max. dims + * so that Fixed Array Indexing with paging is exercised) * * Repeat the following test with/without compression filter * Repeat the following test with H5D_ALLOC_TIME_EARLY/H5D_ALLOC_TIME_LATE/H5D_ALLOC_TIME_INCR - * For the old format, - * verify that v1 btree indexing type is used for - * all 3 datasets with all settings + * For the old format, + * verify that v1 btree indexing type is used for + * all 3 datasets with all settings * For the new format: - * Verify that Implicit Index type is used for - * #1, #2, #3 datasets when ALLOC_TIME_EARLY and compression are true - * Verify Fixed Array indexing type is used for - * #1, #2, #3 datasets with all other settings + * Verify that Implicit Index type is used for + * #1, #2, #3 datasets when ALLOC_TIME_EARLY and compression are true + * Verify Fixed Array indexing type is used for + * #1, #2, #3 datasets with all other settings * * Return: Success: 0 * Failure: -1 @@ -9291,7 +9172,7 @@ error: static herr_t test_fixed_array(hid_t fapl) { - char filename[FILENAME_BUF_SIZE]; /* File name */ + char filename[FILENAME_BUF_SIZE]; /* File name */ hid_t fid = -1; /* File ID */ hid_t dcpl = -1; /* Dataset creation property list ID */ @@ -9300,23 +9181,23 @@ test_fixed_array(hid_t fapl) hid_t sid_max = -1; /* Dataspace ID for dataset with maximum dimensions set */ hid_t dsid = -1; /* Dataset ID for dataset with fixed dimensions */ - hid_t dsid_big = -1; /* Dataset ID for big dataset with fixed dimensions */ - hid_t dsid_max = -1; /* Dataset ID for dataset with maximum dimensions set */ + hid_t dsid_big = -1; /* Dataset ID for big dataset with fixed dimensions */ + hid_t dsid_max = -1; /* Dataset ID for dataset with maximum dimensions set */ - hsize_t dim2[2] = {48, 18}; /* Dataset dimensions */ - hsize_t dim2_big[2] = {500, 60}; /* Big dataset dimensions */ - hsize_t dim2_max[2] = {120, 50}; /* Maximum dataset dimensions */ + hsize_t dim2[2] = {48, 18}; /* Dataset dimensions */ + hsize_t dim2_big[2] = {500, 60}; /* Big dataset dimensions */ + hsize_t dim2_max[2] = {120, 50}; /* Maximum dataset dimensions */ - hid_t mem_id; /* Memory space ID */ - hid_t big_mem_id; /* Memory space ID for big dataset */ + hid_t mem_id; /* Memory space ID */ + hid_t big_mem_id; /* Memory space ID for big dataset */ - hsize_t msize[1] = {POINTS}; /* Size of memory space */ + hsize_t msize[1] = {POINTS}; /* Size of memory space */ hsize_t msize_big[1] = {POINTS_BIG}; /* Size of memory space for big dataset */ int wbuf[POINTS]; /* write buffer */ - int *wbuf_big = NULL; /* write buffer for big dataset */ - int rbuf[POINTS]; /* read buffer */ - int *rbuf_big = NULL; /* read buffer for big dataset */ + int *wbuf_big = NULL; /* write buffer for big dataset */ + int rbuf[POINTS]; /* read buffer */ + int *rbuf_big = NULL; /* read buffer for big dataset */ hsize_t chunk_dim2[2] = {4, 3}; /* Chunk dimensions */ int chunks[12][6]; /* # of chunks for dataset dimensions */ @@ -9324,22 +9205,22 @@ test_fixed_array(hid_t fapl) int chunk_row; /* chunk row index */ int chunk_col; /* chunk column index */ - hsize_t coord[POINTS][2]; /* datdaset coordinates */ + hsize_t coord[POINTS][2]; /* datdaset coordinates */ hsize_t coord_big[POINTS_BIG][2]; /* big dataset coordinates */ - H5D_chunk_index_t idx_type; /* Dataset chunk index type */ - H5F_libver_t low, high; /* File format bounds */ + H5D_chunk_index_t idx_type; /* Dataset chunk index type */ + H5F_libver_t low, high; /* File format bounds */ H5D_alloc_time_t alloc_time; /* Storage allocation time */ #ifdef H5_HAVE_FILTER_DEFLATE - unsigned compress; /* Whether chunks should be compressed */ + unsigned compress; /* Whether chunks should be compressed */ #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 */ + h5_stat_size_t empty_size; /* Size of an empty file */ + h5_stat_size_t file_size; /* Size of each file created */ - size_t i, j; /* local index variables */ - herr_t ret; /* Generic return value */ + size_t i, j; /* local index variables */ + herr_t ret; /* Generic return value */ TESTING("datasets w/fixed array as chunk index"); @@ -9378,8 +9259,8 @@ test_fixed_array(hid_t fapl) if((dcpl = H5Pcreate(H5P_DATASET_CREATE)) < 0) FAIL_STACK_ERROR /* Set chunking */ - if((ret = H5Pset_chunk(dcpl, 2, chunk_dim2)) < 0) - FAIL_PUTS_ERROR(" Problem with setting chunk.") + if((ret = H5Pset_chunk(dcpl, 2, chunk_dim2)) < 0) + FAIL_PUTS_ERROR(" Problem with setting chunk.") #ifdef H5_HAVE_FILTER_DEFLATE /* Check if we should compress the chunks */ @@ -9393,243 +9274,243 @@ test_fixed_array(hid_t fapl) /* Set allocation time */ if(H5Pset_alloc_time(dcpl, alloc_time) < 0) FAIL_STACK_ERROR - /* Initialization of chunk array for repeated coordinates */ - for(i = 0; i < dim2[0]/chunk_dim2[0]; i++) - for(j = 0; j < dim2[1]/chunk_dim2[1]; j++) - chunks[i][j] = 0; - - /* Generate random point coordinates. Only one point is selected per chunk */ - for(i = 0; i < POINTS; i++){ - do { - chunk_row = (int)HDrandom () % (int)(dim2[0]/chunk_dim2[0]); - chunk_col = (int)HDrandom () % (int)(dim2[1]/chunk_dim2[1]); - } while (chunks[chunk_row][chunk_col]); - - wbuf[i] = chunks[chunk_row][chunk_col] = chunk_row+chunk_col+1; - coord[i][0] = (hsize_t)chunk_row * chunk_dim2[0]; - coord[i][1] = (hsize_t)chunk_col * chunk_dim2[1]; - } /* end for */ - - /* Create first dataset with cur and max dimensions */ - if((sid_max = H5Screate_simple(2, dim2, dim2_max)) < 0) FAIL_STACK_ERROR - dsid_max = H5Dcreate2(fid, DSET_FIXED_MAX, H5T_NATIVE_INT, sid_max, H5P_DEFAULT, dcpl, H5P_DEFAULT); - if(dsid_max < 0) - FAIL_PUTS_ERROR(" Creating Chunked Dataset with maximum dimensions.") - - /* Get the chunk index type */ - if(H5D__layout_idx_type_test(dsid_max, &idx_type) < 0) FAIL_STACK_ERROR - - /* Chunk index type depends on whether we are using the latest version of the format */ - if(low == H5F_LIBVER_LATEST) { - if(alloc_time == H5D_ALLOC_TIME_EARLY + /* Initialization of chunk array for repeated coordinates */ + for(i = 0; i < dim2[0]/chunk_dim2[0]; i++) + for(j = 0; j < dim2[1]/chunk_dim2[1]; j++) + chunks[i][j] = 0; + + /* Generate random point coordinates. Only one point is selected per chunk */ + for(i = 0; i < POINTS; i++){ + do { + chunk_row = (int)HDrandom () % (int)(dim2[0]/chunk_dim2[0]); + chunk_col = (int)HDrandom () % (int)(dim2[1]/chunk_dim2[1]); + } while (chunks[chunk_row][chunk_col]); + + wbuf[i] = chunks[chunk_row][chunk_col] = chunk_row+chunk_col+1; + coord[i][0] = (hsize_t)chunk_row * chunk_dim2[0]; + coord[i][1] = (hsize_t)chunk_col * chunk_dim2[1]; + } /* end for */ + + /* Create first dataset with cur and max dimensions */ + if((sid_max = H5Screate_simple(2, dim2, dim2_max)) < 0) FAIL_STACK_ERROR + dsid_max = H5Dcreate2(fid, DSET_FIXED_MAX, H5T_NATIVE_INT, sid_max, H5P_DEFAULT, dcpl, H5P_DEFAULT); + if(dsid_max < 0) + FAIL_PUTS_ERROR(" Creating Chunked Dataset with maximum dimensions.") + + /* Get the chunk index type */ + if(H5D__layout_idx_type_test(dsid_max, &idx_type) < 0) FAIL_STACK_ERROR + + /* Chunk index type depends on whether we are using the latest version of the format */ + if(low == H5F_LIBVER_LATEST) { + if(alloc_time == H5D_ALLOC_TIME_EARLY #ifdef H5_HAVE_FILTER_DEFLATE - && !compress + && !compress #endif /* H5_HAVE_FILTER_DEFLATE */ - ) { - if(idx_type != H5D_CHUNK_IDX_NONE) - FAIL_PUTS_ERROR("should be using Non Index as index"); - } else if (idx_type != H5D_CHUNK_IDX_FARRAY) - FAIL_PUTS_ERROR("should be using Fixed Array as index"); - } /* end if */ - else { - if(idx_type != H5D_CHUNK_IDX_BTREE) - FAIL_PUTS_ERROR("should be using v1 B-tree as index"); - } /* end else */ - - /* Create dataspace for write buffer */ - if((mem_id = H5Screate_simple(1, msize, NULL)) < 0) TEST_ERROR; - - /* Select the random points for writing */ - if(H5Sselect_elements(sid_max, H5S_SELECT_SET, POINTS, (const hsize_t *)coord) < 0) - TEST_ERROR; - - /* Write into dataset */ - if(H5Dwrite(dsid_max, H5T_NATIVE_INT, mem_id, sid_max, H5P_DEFAULT, wbuf) < 0) TEST_ERROR; - - /* Closing */ - if(H5Dclose(dsid_max) < 0) FAIL_STACK_ERROR - if(H5Sclose(sid_max) < 0) FAIL_STACK_ERROR - if(H5Sclose(mem_id) < 0) FAIL_STACK_ERROR - - - /* Create second dataset with curr dim but NULL max dim */ - if((sid = H5Screate_simple(2, dim2, NULL)) < 0) FAIL_STACK_ERROR - dsid = H5Dcreate2(fid, DSET_FIXED_NOMAX, H5T_NATIVE_INT, sid, H5P_DEFAULT, dcpl, H5P_DEFAULT); - if(dsid < 0) - FAIL_PUTS_ERROR(" Creating Chunked Dataset.") - - /* Get the chunk index type */ - if(H5D__layout_idx_type_test(dsid, &idx_type) < 0) FAIL_STACK_ERROR - - /* Chunk index type depends on whether we are using the latest version of the format */ - if(low == H5F_LIBVER_LATEST) { - if(alloc_time == H5D_ALLOC_TIME_EARLY + ) { + if(idx_type != H5D_CHUNK_IDX_NONE) + FAIL_PUTS_ERROR("should be using Non Index as index"); + } else if (idx_type != H5D_CHUNK_IDX_FARRAY) + FAIL_PUTS_ERROR("should be using Fixed Array as index"); + } /* end if */ + else { + if(idx_type != H5D_CHUNK_IDX_BTREE) + FAIL_PUTS_ERROR("should be using v1 B-tree as index"); + } /* end else */ + + /* Create dataspace for write buffer */ + if((mem_id = H5Screate_simple(1, msize, NULL)) < 0) TEST_ERROR; + + /* Select the random points for writing */ + if(H5Sselect_elements(sid_max, H5S_SELECT_SET, POINTS, (const hsize_t *)coord) < 0) + TEST_ERROR; + + /* Write into dataset */ + if(H5Dwrite(dsid_max, H5T_NATIVE_INT, mem_id, sid_max, H5P_DEFAULT, wbuf) < 0) TEST_ERROR; + + /* Closing */ + if(H5Dclose(dsid_max) < 0) FAIL_STACK_ERROR + if(H5Sclose(sid_max) < 0) FAIL_STACK_ERROR + if(H5Sclose(mem_id) < 0) FAIL_STACK_ERROR + + + /* Create second dataset with curr dim but NULL max dim */ + if((sid = H5Screate_simple(2, dim2, NULL)) < 0) FAIL_STACK_ERROR + dsid = H5Dcreate2(fid, DSET_FIXED_NOMAX, H5T_NATIVE_INT, sid, H5P_DEFAULT, dcpl, H5P_DEFAULT); + if(dsid < 0) + FAIL_PUTS_ERROR(" Creating Chunked Dataset.") + + /* Get the chunk index type */ + if(H5D__layout_idx_type_test(dsid, &idx_type) < 0) FAIL_STACK_ERROR + + /* Chunk index type depends on whether we are using the latest version of the format */ + if(low == H5F_LIBVER_LATEST) { + if(alloc_time == H5D_ALLOC_TIME_EARLY #ifdef H5_HAVE_FILTER_DEFLATE - && !compress + && !compress #endif /* H5_HAVE_FILTER_DEFLATE */ - ) { - if(idx_type != H5D_CHUNK_IDX_NONE) - FAIL_PUTS_ERROR("should be using Non Index as index"); - } else if(idx_type != H5D_CHUNK_IDX_FARRAY) - FAIL_PUTS_ERROR("should be using Fixed Array as index"); - } else { - if(idx_type != H5D_CHUNK_IDX_BTREE) - FAIL_PUTS_ERROR("should be using v1 B-tree as index"); - } /* end else */ - - /* Create dataspace for write buffer */ - if((mem_id = H5Screate_simple(1, msize, NULL)) < 0) TEST_ERROR; - - /* Select the random points for writing */ - if(H5Sselect_elements(sid, H5S_SELECT_SET, POINTS, (const hsize_t *)coord) < 0) - TEST_ERROR; - - /* Write into dataset */ - if(H5Dwrite(dsid, H5T_NATIVE_INT, mem_id, sid, H5P_DEFAULT, wbuf) < 0) TEST_ERROR; - - /* Closing */ - if(H5Dclose(dsid) < 0) FAIL_STACK_ERROR - if(H5Sclose(sid) < 0) FAIL_STACK_ERROR - if(H5Sclose(mem_id) < 0) FAIL_STACK_ERROR - - /* Create the third dataset with bigger size and both curr & max dimensions are the same */ - if((sid_big = H5Screate_simple(2, dim2_big, dim2_big)) < 0) FAIL_STACK_ERROR - dsid_big = H5Dcreate2(fid, DSET_FIXED_BIG, H5T_NATIVE_INT, sid_big, H5P_DEFAULT, dcpl, H5P_DEFAULT); - if(dsid_big < 0) - FAIL_PUTS_ERROR(" Creating Big Chunked Dataset.") - - /* Get the chunk index type */ - if(H5D__layout_idx_type_test(dsid_big, &idx_type) < 0) FAIL_STACK_ERROR - - /* Chunk index type depends on whether we are using the latest version of the format */ - if(low == H5F_LIBVER_LATEST) { - if(alloc_time == H5D_ALLOC_TIME_EARLY + ) { + if(idx_type != H5D_CHUNK_IDX_NONE) + FAIL_PUTS_ERROR("should be using Non Index as index"); + } else if(idx_type != H5D_CHUNK_IDX_FARRAY) + FAIL_PUTS_ERROR("should be using Fixed Array as index"); + } else { + if(idx_type != H5D_CHUNK_IDX_BTREE) + FAIL_PUTS_ERROR("should be using v1 B-tree as index"); + } /* end else */ + + /* Create dataspace for write buffer */ + if((mem_id = H5Screate_simple(1, msize, NULL)) < 0) TEST_ERROR; + + /* Select the random points for writing */ + if(H5Sselect_elements(sid, H5S_SELECT_SET, POINTS, (const hsize_t *)coord) < 0) + TEST_ERROR; + + /* Write into dataset */ + if(H5Dwrite(dsid, H5T_NATIVE_INT, mem_id, sid, H5P_DEFAULT, wbuf) < 0) TEST_ERROR; + + /* Closing */ + if(H5Dclose(dsid) < 0) FAIL_STACK_ERROR + if(H5Sclose(sid) < 0) FAIL_STACK_ERROR + if(H5Sclose(mem_id) < 0) FAIL_STACK_ERROR + + /* Create the third dataset with bigger size and both curr & max dimensions are the same */ + if((sid_big = H5Screate_simple(2, dim2_big, dim2_big)) < 0) FAIL_STACK_ERROR + dsid_big = H5Dcreate2(fid, DSET_FIXED_BIG, H5T_NATIVE_INT, sid_big, H5P_DEFAULT, dcpl, H5P_DEFAULT); + if(dsid_big < 0) + FAIL_PUTS_ERROR(" Creating Big Chunked Dataset.") + + /* Get the chunk index type */ + if(H5D__layout_idx_type_test(dsid_big, &idx_type) < 0) FAIL_STACK_ERROR + + /* Chunk index type depends on whether we are using the latest version of the format */ + if(low == H5F_LIBVER_LATEST) { + if(alloc_time == H5D_ALLOC_TIME_EARLY #ifdef H5_HAVE_FILTER_DEFLATE - && !compress + && !compress #endif /* H5_HAVE_FILTER_DEFLATE */ - ) { - if(idx_type != H5D_CHUNK_IDX_NONE) - FAIL_PUTS_ERROR("should be using Non Index as index"); - } else if(idx_type != H5D_CHUNK_IDX_FARRAY) - FAIL_PUTS_ERROR("should be using Fixed Array as index"); - } /* end if */ - else { - if(idx_type != H5D_CHUNK_IDX_BTREE) - FAIL_PUTS_ERROR("should be using v1 B-tree as index"); - } /* end else */ - - /* Initialization of chunk array for repeated coordinates */ - for(i = 0; i < dim2_big[0]/chunk_dim2[0]; i++) - for(j = 0; j < dim2_big[1]/chunk_dim2[1]; j++) - chunks_big[i][j] = 0; - - /* Generate random point coordinates. Only one point is selected per chunk */ - for(i = 0; i < POINTS_BIG; i++){ - do { - chunk_row = (int)HDrandom () % (int)(dim2_big[0]/chunk_dim2[0]); - chunk_col = (int)HDrandom () % (int)(dim2_big[1]/chunk_dim2[1]); - } while (chunks_big[chunk_row][chunk_col]); - - wbuf_big[i] = chunks_big[chunk_row][chunk_col] = chunk_row+chunk_col+1; - coord_big[i][0] = (hsize_t)chunk_row * chunk_dim2[0]; - coord_big[i][1] = (hsize_t)chunk_col * chunk_dim2[1]; - } /* end for */ - - /* Create dataspace for write buffer */ - if((big_mem_id = H5Screate_simple(1, msize_big, NULL)) < 0) TEST_ERROR; - - /* Select the random points for writing */ - if(H5Sselect_elements(sid_big, H5S_SELECT_SET, POINTS_BIG, (const hsize_t *)coord_big) < 0) - TEST_ERROR; - - /* Write into dataset */ - if(H5Dwrite(dsid_big, H5T_NATIVE_INT, big_mem_id, sid_big, H5P_DEFAULT, wbuf_big) < 0) TEST_ERROR; - - /* Closing */ - if(H5Dclose(dsid_big) < 0) FAIL_STACK_ERROR - if(H5Sclose(sid_big) < 0) FAIL_STACK_ERROR - if(H5Sclose(big_mem_id) < 0) FAIL_STACK_ERROR - if(H5Pclose(dcpl) < 0) FAIL_STACK_ERROR - - /* Open the first dataset */ - if((dsid = H5Dopen2(fid, DSET_FIXED_MAX, H5P_DEFAULT)) < 0) TEST_ERROR; - - /* Get dataset dataspace */ - if((sid = H5Dget_space(dsid)) < 0) TEST_ERROR; - - /* Create dataspace for read buffer */ - if((mem_id = H5Screate_simple(1, msize, NULL)) < 0) TEST_ERROR; - - /* Select the random points for reading */ - if(H5Sselect_elements (sid, H5S_SELECT_SET, POINTS, (const hsize_t *)coord) < 0) TEST_ERROR; - - /* Read from dataset */ - if(H5Dread(dsid, H5T_NATIVE_INT, mem_id, sid, H5P_DEFAULT, rbuf) < 0) TEST_ERROR; - - /* Verify that written and read data are the same */ - for(i = 0; i < POINTS; i++) - if(rbuf[i] != wbuf[i]){ - printf(" Line %d: Incorrect value, wbuf[%u]=%d, rbuf[%u]=%d\n", - __LINE__,(unsigned)i,wbuf[i],(unsigned)i,rbuf[i]); - TEST_ERROR; - } /* end if */ - - /* Closing */ - if(H5Dclose(dsid) < 0) FAIL_STACK_ERROR + ) { + if(idx_type != H5D_CHUNK_IDX_NONE) + FAIL_PUTS_ERROR("should be using Non Index as index"); + } else if(idx_type != H5D_CHUNK_IDX_FARRAY) + FAIL_PUTS_ERROR("should be using Fixed Array as index"); + } /* end if */ + else { + if(idx_type != H5D_CHUNK_IDX_BTREE) + FAIL_PUTS_ERROR("should be using v1 B-tree as index"); + } /* end else */ + + /* Initialization of chunk array for repeated coordinates */ + for(i = 0; i < dim2_big[0]/chunk_dim2[0]; i++) + for(j = 0; j < dim2_big[1]/chunk_dim2[1]; j++) + chunks_big[i][j] = 0; + + /* Generate random point coordinates. Only one point is selected per chunk */ + for(i = 0; i < POINTS_BIG; i++){ + do { + chunk_row = (int)HDrandom () % (int)(dim2_big[0]/chunk_dim2[0]); + chunk_col = (int)HDrandom () % (int)(dim2_big[1]/chunk_dim2[1]); + } while (chunks_big[chunk_row][chunk_col]); + + wbuf_big[i] = chunks_big[chunk_row][chunk_col] = chunk_row+chunk_col+1; + coord_big[i][0] = (hsize_t)chunk_row * chunk_dim2[0]; + coord_big[i][1] = (hsize_t)chunk_col * chunk_dim2[1]; + } /* end for */ + + /* Create dataspace for write buffer */ + if((big_mem_id = H5Screate_simple(1, msize_big, NULL)) < 0) TEST_ERROR; + + /* Select the random points for writing */ + if(H5Sselect_elements(sid_big, H5S_SELECT_SET, POINTS_BIG, (const hsize_t *)coord_big) < 0) + TEST_ERROR; + + /* Write into dataset */ + if(H5Dwrite(dsid_big, H5T_NATIVE_INT, big_mem_id, sid_big, H5P_DEFAULT, wbuf_big) < 0) TEST_ERROR; + + /* Closing */ + if(H5Dclose(dsid_big) < 0) FAIL_STACK_ERROR + if(H5Sclose(sid_big) < 0) FAIL_STACK_ERROR + if(H5Sclose(big_mem_id) < 0) FAIL_STACK_ERROR + if(H5Pclose(dcpl) < 0) FAIL_STACK_ERROR + + /* Open the first dataset */ + if((dsid = H5Dopen2(fid, DSET_FIXED_MAX, H5P_DEFAULT)) < 0) TEST_ERROR; + + /* Get dataset dataspace */ + if((sid = H5Dget_space(dsid)) < 0) TEST_ERROR; + + /* Create dataspace for read buffer */ + if((mem_id = H5Screate_simple(1, msize, NULL)) < 0) TEST_ERROR; + + /* Select the random points for reading */ + if(H5Sselect_elements (sid, H5S_SELECT_SET, POINTS, (const hsize_t *)coord) < 0) TEST_ERROR; + + /* Read from dataset */ + if(H5Dread(dsid, H5T_NATIVE_INT, mem_id, sid, H5P_DEFAULT, rbuf) < 0) TEST_ERROR; + + /* Verify that written and read data are the same */ + for(i = 0; i < POINTS; i++) + if(rbuf[i] != wbuf[i]){ + printf(" Line %d: Incorrect value, wbuf[%u]=%d, rbuf[%u]=%d\n", + __LINE__,(unsigned)i,wbuf[i],(unsigned)i,rbuf[i]); + TEST_ERROR; + } /* end if */ + + /* Closing */ + if(H5Dclose(dsid) < 0) FAIL_STACK_ERROR if(H5Sclose(sid) < 0) FAIL_STACK_ERROR if(H5Sclose(mem_id) < 0) FAIL_STACK_ERROR - /* Open the second dataset */ - if((dsid = H5Dopen2(fid, DSET_FIXED_NOMAX, H5P_DEFAULT)) < 0) TEST_ERROR; + /* Open the second dataset */ + if((dsid = H5Dopen2(fid, DSET_FIXED_NOMAX, H5P_DEFAULT)) < 0) TEST_ERROR; - /* Get dataset dataspace */ - if((sid = H5Dget_space(dsid)) < 0) TEST_ERROR; + /* Get dataset dataspace */ + if((sid = H5Dget_space(dsid)) < 0) TEST_ERROR; - /* Create dataspace for read buffer */ - if((mem_id = H5Screate_simple(1, msize, NULL)) < 0) TEST_ERROR; + /* Create dataspace for read buffer */ + if((mem_id = H5Screate_simple(1, msize, NULL)) < 0) TEST_ERROR; - /* Select the random points for reading */ - if(H5Sselect_elements (sid, H5S_SELECT_SET, POINTS, (const hsize_t *)coord) < 0) TEST_ERROR; + /* Select the random points for reading */ + if(H5Sselect_elements (sid, H5S_SELECT_SET, POINTS, (const hsize_t *)coord) < 0) TEST_ERROR; - /* Read from dataset */ - if(H5Dread(dsid, H5T_NATIVE_INT, mem_id, sid, H5P_DEFAULT, rbuf) < 0) TEST_ERROR; + /* Read from dataset */ + if(H5Dread(dsid, H5T_NATIVE_INT, mem_id, sid, H5P_DEFAULT, rbuf) < 0) TEST_ERROR; - /* Verify that written and read data are the same */ - for(i = 0; i < POINTS; i++) - if(rbuf[i] != wbuf[i]){ - printf(" Line %d: Incorrect value, wbuf[%u]=%d, rbuf[%u]=%d\n", - __LINE__,(unsigned)i,wbuf[i],(unsigned)i,rbuf[i]); - TEST_ERROR; - } /* end if */ + /* Verify that written and read data are the same */ + for(i = 0; i < POINTS; i++) + if(rbuf[i] != wbuf[i]){ + printf(" Line %d: Incorrect value, wbuf[%u]=%d, rbuf[%u]=%d\n", + __LINE__,(unsigned)i,wbuf[i],(unsigned)i,rbuf[i]); + TEST_ERROR; + } /* end if */ - /* Closing */ - if(H5Dclose(dsid) < 0) FAIL_STACK_ERROR + /* Closing */ + if(H5Dclose(dsid) < 0) FAIL_STACK_ERROR if(H5Sclose(sid) < 0) FAIL_STACK_ERROR if(H5Sclose(mem_id) < 0) FAIL_STACK_ERROR - /* Open the third dataset */ - if((dsid_big = H5Dopen2(fid, DSET_FIXED_BIG, H5P_DEFAULT)) < 0) TEST_ERROR; - /* Get dataset dataspace */ - if((sid_big = H5Dget_space(dsid_big)) < 0) TEST_ERROR; - - /* Create dataspace for read buffer */ - if((big_mem_id = H5Screate_simple(1, msize_big, NULL)) < 0) TEST_ERROR; - - /* Select the random points for reading */ - if(H5Sselect_elements (sid_big, H5S_SELECT_SET, POINTS_BIG, (const hsize_t *)coord_big) < 0) TEST_ERROR; - /* Read from dataset */ - if(H5Dread(dsid_big, H5T_NATIVE_INT, big_mem_id, sid_big, H5P_DEFAULT, rbuf_big) < 0) TEST_ERROR; - - /* Verify that written and read data are the same */ - for(i = 0; i < POINTS_BIG; i++) - if(rbuf_big[i] != wbuf_big[i]) { - printf(" Line %d: Incorrect value, wbuf_bif[%u]=%d, rbuf_big[%u]=%d\n", - __LINE__,(unsigned)i,wbuf_big[i],(unsigned)i,rbuf_big[i]); - TEST_ERROR; - } /* end if */ - - /* Closing */ - if(H5Dclose(dsid_big) < 0) FAIL_STACK_ERROR + /* Open the third dataset */ + if((dsid_big = H5Dopen2(fid, DSET_FIXED_BIG, H5P_DEFAULT)) < 0) TEST_ERROR; + /* Get dataset dataspace */ + if((sid_big = H5Dget_space(dsid_big)) < 0) TEST_ERROR; + + /* Create dataspace for read buffer */ + if((big_mem_id = H5Screate_simple(1, msize_big, NULL)) < 0) TEST_ERROR; + + /* Select the random points for reading */ + if(H5Sselect_elements (sid_big, H5S_SELECT_SET, POINTS_BIG, (const hsize_t *)coord_big) < 0) TEST_ERROR; + /* Read from dataset */ + if(H5Dread(dsid_big, H5T_NATIVE_INT, big_mem_id, sid_big, H5P_DEFAULT, rbuf_big) < 0) TEST_ERROR; + + /* Verify that written and read data are the same */ + for(i = 0; i < POINTS_BIG; i++) + if(rbuf_big[i] != wbuf_big[i]) { + printf(" Line %d: Incorrect value, wbuf_bif[%u]=%d, rbuf_big[%u]=%d\n", + __LINE__,(unsigned)i,wbuf_big[i],(unsigned)i,rbuf_big[i]); + TEST_ERROR; + } /* end if */ + + /* Closing */ + if(H5Dclose(dsid_big) < 0) FAIL_STACK_ERROR if(H5Sclose(sid_big) < 0) FAIL_STACK_ERROR if(H5Sclose(big_mem_id) < 0) FAIL_STACK_ERROR @@ -9641,13 +9522,13 @@ test_fixed_array(hid_t fapl) /* Close everything */ if(H5Fclose(fid) < 0) FAIL_STACK_ERROR - /* Get the size of the file */ - if((file_size = h5_get_file_size(filename, fapl)) < 0) - TEST_ERROR + /* Get the size of the file */ + if((file_size = h5_get_file_size(filename, fapl)) < 0) + TEST_ERROR - /* Verify the file is correct size */ - if(file_size != empty_size) - TEST_ERROR + /* Verify the file is correct size */ + if(file_size != empty_size) + TEST_ERROR } /* end for */ #ifdef H5_HAVE_FILTER_DEFLATE @@ -9682,18 +9563,18 @@ error: * * Purpose: Tests support for Single Chunk indexing type * - * Create the following 2 datasets: - * 1) chunked dataset with NULL max dims and cur_dims = chunk_dims - * 2) chunked dataset with cur_dims = max_dims = chunk_dims + * Create the following 2 datasets: + * 1) chunked dataset with NULL max dims and cur_dims = chunk_dims + * 2) chunked dataset with cur_dims = max_dims = chunk_dims * * Repeat the following test with/without compression filter * Repeat the following test with H5D_ALLOC_TIME_EARLY/H5D_ALLOC_TIME_LATE/H5D_ALLOC_TIME_INCR - * For the old format, - * verify that v1 btree indexing type is used for - * all datasets with all settings + * For the old format, + * verify that v1 btree indexing type is used for + * all datasets with all settings * For the new format: - * Verify that Single Chunk indexing type is used for - * all datasets with all settings + * Verify that Single Chunk indexing type is used for + * all datasets with all settings * * Return: Success: 0 * Failure: -1 @@ -9705,30 +9586,30 @@ error: static herr_t test_single_chunk(hid_t fapl) { - char filename[FILENAME_BUF_SIZE]; /* File name */ + char filename[FILENAME_BUF_SIZE]; /* File name */ hid_t fid = -1; /* File ID */ hid_t dcpl = -1; /* Dataset creation property list ID */ hid_t t_dcpl = -1; /* Dataset creation property list ID */ - hid_t sid = -1, sid_max = -1; /* Dataspace ID for dataset with fixed dimensions */ - hid_t did = -1, did_max = -1; /* Dataset ID for dataset with fixed dimensions */ - hsize_t dim2[2] = {DSET_DIM1, DSET_DIM2}; /* Dataset dimensions */ + hid_t sid = -1, sid_max = -1; /* Dataspace ID for dataset with fixed dimensions */ + hid_t did = -1, did_max = -1; /* Dataset ID for dataset with fixed dimensions */ + hsize_t dim2[2] = {DSET_DIM1, DSET_DIM2}; /* Dataset dimensions */ hsize_t t_dim2[2] = {DSET_TMP_DIM1, DSET_TMP_DIM2}; /* Dataset dimensions */ int *wbuf = NULL; /* write buffer */ int *t_wbuf = NULL; /* write buffer */ - int *rbuf = NULL; /* read buffer */ + int *rbuf = NULL; /* read buffer */ int *t_rbuf = NULL; /* read buffer */ - H5D_chunk_index_t idx_type; /* Dataset chunk index type */ - H5F_libver_t low, high; /* File format bounds */ + H5D_chunk_index_t idx_type; /* Dataset chunk index type */ + H5F_libver_t low, high; /* File format bounds */ H5D_alloc_time_t alloc_time; /* Storage allocation time */ #ifdef H5_HAVE_FILTER_DEFLATE - unsigned compress; /* Whether chunks should be compressed */ + unsigned compress; /* Whether chunks should be compressed */ #endif /* H5_HAVE_FILTER_DEFLATE */ - size_t n, i; /* local index variables */ - herr_t ret; /* Generic return value */ + size_t n, i; /* local index variables */ + herr_t ret; /* Generic return value */ h5_stat_size_t empty_size; /* Size of an empty file */ h5_stat_size_t file_size; /* Size of each file created */ @@ -9760,10 +9641,10 @@ test_single_chunk(hid_t fapl) TEST_ERROR for(i = n = 0; i < (DSET_DIM1 * DSET_DIM2); i++) - wbuf[i] = (int)n++; + wbuf[i] = (int)n++; for(i = n = 0; i < (DSET_TMP_DIM1* DSET_TMP_DIM2); i++) - t_wbuf[i] = (int)n++; + t_wbuf[i] = (int)n++; #ifdef H5_HAVE_FILTER_DEFLATE /* Loop over compressing chunks */ @@ -9780,18 +9661,18 @@ test_single_chunk(hid_t fapl) if((t_dcpl = H5Pcreate(H5P_DATASET_CREATE)) < 0) FAIL_STACK_ERROR /* Set chunking */ - if((ret = H5Pset_chunk(dcpl, 2, dim2)) < 0) - FAIL_PUTS_ERROR(" Problem with setting chunk.") + if((ret = H5Pset_chunk(dcpl, 2, dim2)) < 0) + FAIL_PUTS_ERROR(" Problem with setting chunk.") - if((ret = H5Pset_chunk(t_dcpl, 2, t_dim2)) < 0) - FAIL_PUTS_ERROR(" Problem with setting chunk.") + if((ret = H5Pset_chunk(t_dcpl, 2, t_dim2)) < 0) + FAIL_PUTS_ERROR(" Problem with setting chunk.") #ifdef H5_HAVE_FILTER_DEFLATE /* Check if we should compress the chunks */ if(compress) { if(H5Pset_deflate(dcpl, 9) < 0) FAIL_STACK_ERROR if(H5Pset_deflate(t_dcpl, 9) < 0) FAIL_STACK_ERROR - } + } #endif /* H5_HAVE_FILTER_DEFLATE */ /* Set fill time */ @@ -9802,94 +9683,94 @@ test_single_chunk(hid_t fapl) if(H5Pset_alloc_time(dcpl, alloc_time) < 0) FAIL_STACK_ERROR if(H5Pset_alloc_time(t_dcpl, alloc_time) < 0) FAIL_STACK_ERROR - /* Create first dataset with cur and max dimensions */ - if((sid_max = H5Screate_simple(2, dim2, dim2)) < 0) FAIL_STACK_ERROR - did_max = H5Dcreate2(fid, DSET_SINGLE_MAX, H5T_NATIVE_INT, sid_max, H5P_DEFAULT, dcpl, H5P_DEFAULT); - if(did_max < 0) - FAIL_PUTS_ERROR(" Creating Chunked Dataset with maximum dimensions.") - - /* Get the chunk index type */ - if(H5D__layout_idx_type_test(did_max, &idx_type) < 0) FAIL_STACK_ERROR - - /* Chunk index type depends on whether we are using the latest version of the format */ - if(low == H5F_LIBVER_LATEST) { - if(idx_type != H5D_CHUNK_IDX_SINGLE) - FAIL_PUTS_ERROR("should be using Single Chunk indexing"); - } /* end if */ - else { - if(idx_type != H5D_CHUNK_IDX_BTREE) - FAIL_PUTS_ERROR("should be using v1 B-tree as index"); - } /* end else */ - - /* Write into dataset */ - if(H5Dwrite(did_max, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, wbuf) < 0) TEST_ERROR; - - /* Closing */ - if(H5Dclose(did_max) < 0) FAIL_STACK_ERROR - if(H5Sclose(sid_max) < 0) FAIL_STACK_ERROR - - /* Create second dataset with curr dim but NULL max dim */ - if((sid = H5Screate_simple(2, t_dim2, NULL)) < 0) FAIL_STACK_ERROR - did = H5Dcreate2(fid, DSET_SINGLE_NOMAX, H5T_NATIVE_INT, sid, H5P_DEFAULT, t_dcpl, H5P_DEFAULT); - if(did < 0) - FAIL_PUTS_ERROR(" Creating Chunked Dataset.") - - /* Get the chunk index type */ - if(H5D__layout_idx_type_test(did, &idx_type) < 0) FAIL_STACK_ERROR - - /* Chunk index type depends on whether we are using the latest version of the format */ - if(low == H5F_LIBVER_LATEST) { - if(idx_type != H5D_CHUNK_IDX_SINGLE) - FAIL_PUTS_ERROR("should be using Single Chunk indexing"); - } else { - if(idx_type != H5D_CHUNK_IDX_BTREE) - FAIL_PUTS_ERROR("should be using v1 B-tree as index"); - } /* end else */ - - /* Write into dataset */ - if(H5Dwrite(did, H5T_NATIVE_INT, H5S_ALL, sid, H5P_DEFAULT, t_wbuf) < 0) TEST_ERROR; - - /* Closing */ - if(H5Dclose(did) < 0) FAIL_STACK_ERROR - if(H5Sclose(sid) < 0) FAIL_STACK_ERROR - - /* Open the first dataset */ - if((did_max = H5Dopen2(fid, DSET_SINGLE_MAX, H5P_DEFAULT)) < 0) TEST_ERROR; - - /* Read from dataset */ - if(H5Dread(did_max, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, rbuf) < 0) TEST_ERROR; - - /* Verify that written and read data are the same */ - for(i = 0; i < (DSET_DIM1 * DSET_DIM2); i++) - if(rbuf[i] != wbuf[i]){ - printf(" Line %d: Incorrect value, wbuf[%u]=%d, rbuf[%u]=%d\n", - __LINE__,(unsigned)i,wbuf[i],(unsigned)i,rbuf[i]); - TEST_ERROR; - } /* end if */ - - /* Closing */ - if(H5Dclose(did_max) < 0) FAIL_STACK_ERROR - - /* Open the second dataset */ - if((did = H5Dopen2(fid, DSET_SINGLE_NOMAX, H5P_DEFAULT)) < 0) TEST_ERROR; - - HDmemset(rbuf, 0, sizeof(int) * (DSET_DIM1 * DSET_DIM2)); - - /* Read from dataset */ - if(H5Dread(did, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, t_rbuf) < 0) TEST_ERROR; - - /* Verify that written and read data are the same */ - for(i = 0; i < (DSET_TMP_DIM1* DSET_TMP_DIM2); i++) - if(t_rbuf[i] != t_wbuf[i]) { - printf(" Line %d: Incorrect value, t_wbuf[%u]=%d, t_rbuf[%u]=%d\n", - __LINE__,(unsigned)i,t_wbuf[i],(unsigned)i,t_rbuf[i]); - TEST_ERROR; - } /* end if */ - - /* Closing */ - if(H5Dclose(did) < 0) FAIL_STACK_ERROR - - /* Delete datasets */ + /* Create first dataset with cur and max dimensions */ + if((sid_max = H5Screate_simple(2, dim2, dim2)) < 0) FAIL_STACK_ERROR + did_max = H5Dcreate2(fid, DSET_SINGLE_MAX, H5T_NATIVE_INT, sid_max, H5P_DEFAULT, dcpl, H5P_DEFAULT); + if(did_max < 0) + FAIL_PUTS_ERROR(" Creating Chunked Dataset with maximum dimensions.") + + /* Get the chunk index type */ + if(H5D__layout_idx_type_test(did_max, &idx_type) < 0) FAIL_STACK_ERROR + + /* Chunk index type depends on whether we are using the latest version of the format */ + if(low == H5F_LIBVER_LATEST) { + if(idx_type != H5D_CHUNK_IDX_SINGLE) + FAIL_PUTS_ERROR("should be using Single Chunk indexing"); + } /* end if */ + else { + if(idx_type != H5D_CHUNK_IDX_BTREE) + FAIL_PUTS_ERROR("should be using v1 B-tree as index"); + } /* end else */ + + /* Write into dataset */ + if(H5Dwrite(did_max, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, wbuf) < 0) TEST_ERROR; + + /* Closing */ + if(H5Dclose(did_max) < 0) FAIL_STACK_ERROR + if(H5Sclose(sid_max) < 0) FAIL_STACK_ERROR + + /* Create second dataset with curr dim but NULL max dim */ + if((sid = H5Screate_simple(2, t_dim2, NULL)) < 0) FAIL_STACK_ERROR + did = H5Dcreate2(fid, DSET_SINGLE_NOMAX, H5T_NATIVE_INT, sid, H5P_DEFAULT, t_dcpl, H5P_DEFAULT); + if(did < 0) + FAIL_PUTS_ERROR(" Creating Chunked Dataset.") + + /* Get the chunk index type */ + if(H5D__layout_idx_type_test(did, &idx_type) < 0) FAIL_STACK_ERROR + + /* Chunk index type depends on whether we are using the latest version of the format */ + if(low == H5F_LIBVER_LATEST) { + if(idx_type != H5D_CHUNK_IDX_SINGLE) + FAIL_PUTS_ERROR("should be using Single Chunk indexing"); + } else { + if(idx_type != H5D_CHUNK_IDX_BTREE) + FAIL_PUTS_ERROR("should be using v1 B-tree as index"); + } /* end else */ + + /* Write into dataset */ + if(H5Dwrite(did, H5T_NATIVE_INT, H5S_ALL, sid, H5P_DEFAULT, t_wbuf) < 0) TEST_ERROR; + + /* Closing */ + if(H5Dclose(did) < 0) FAIL_STACK_ERROR + if(H5Sclose(sid) < 0) FAIL_STACK_ERROR + + /* Open the first dataset */ + if((did_max = H5Dopen2(fid, DSET_SINGLE_MAX, H5P_DEFAULT)) < 0) TEST_ERROR; + + /* Read from dataset */ + if(H5Dread(did_max, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, rbuf) < 0) TEST_ERROR; + + /* Verify that written and read data are the same */ + for(i = 0; i < (DSET_DIM1 * DSET_DIM2); i++) + if(rbuf[i] != wbuf[i]){ + printf(" Line %d: Incorrect value, wbuf[%u]=%d, rbuf[%u]=%d\n", + __LINE__,(unsigned)i,wbuf[i],(unsigned)i,rbuf[i]); + TEST_ERROR; + } /* end if */ + + /* Closing */ + if(H5Dclose(did_max) < 0) FAIL_STACK_ERROR + + /* Open the second dataset */ + if((did = H5Dopen2(fid, DSET_SINGLE_NOMAX, H5P_DEFAULT)) < 0) TEST_ERROR; + + HDmemset(rbuf, 0, sizeof(int) * (DSET_DIM1 * DSET_DIM2)); + + /* Read from dataset */ + if(H5Dread(did, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, t_rbuf) < 0) TEST_ERROR; + + /* Verify that written and read data are the same */ + for(i = 0; i < (DSET_TMP_DIM1* DSET_TMP_DIM2); i++) + if(t_rbuf[i] != t_wbuf[i]) { + printf(" Line %d: Incorrect value, t_wbuf[%u]=%d, t_rbuf[%u]=%d\n", + __LINE__,(unsigned)i,t_wbuf[i],(unsigned)i,t_rbuf[i]); + TEST_ERROR; + } /* end if */ + + /* Closing */ + if(H5Dclose(did) < 0) FAIL_STACK_ERROR + + /* Delete datasets */ if(H5Ldelete(fid, DSET_SINGLE_NOMAX, H5P_DEFAULT) < 0) FAIL_STACK_ERROR if(H5Ldelete(fid, DSET_SINGLE_MAX, H5P_DEFAULT) < 0) FAIL_STACK_ERROR @@ -9942,19 +9823,19 @@ error: /*------------------------------------------------------------------------- * - * test_idx_compatible(): - * Verify that the library can read datasets created with - * 1.6/1.8 library that use the B-tree indexing method. + * test_idx_compatible(): + * Verify that the library can read datasets created with + * 1.6/1.8 library that use the B-tree indexing method. * * Programmer: Vailin Choi; 26th August, 2009 * *------------------------------------------------------------------------- */ -static herr_t +static herr_t test_idx_compatible(void) { - hid_t fid = -1; /* File id */ - hid_t did = -1; /* Dataset id */ + hid_t fid = -1; /* File id */ + hid_t did = -1; /* Dataset id */ const char *filename = NULL; /* old test file name */ unsigned j; /* Local index variable */ H5D_chunk_index_t idx_type; /* Chunked dataset index type */ @@ -9964,41 +9845,41 @@ test_idx_compatible(void) for(j = 0; j < NELMTS(OLD_FILENAME); j++) { - /* Generate correct name for test file by prepending the source path */ - filename = H5_get_srcdir_filename(OLD_FILENAME[j]); + /* Generate correct name for test file by prepending the source path */ + filename = H5_get_srcdir_filename(OLD_FILENAME[j]); - /* Open the file */ - if((fid = H5Fopen(filename, H5F_ACC_RDONLY, H5P_DEFAULT)) < 0) - TEST_ERROR + /* Open the file */ + if((fid = H5Fopen(filename, H5F_ACC_RDONLY, H5P_DEFAULT)) < 0) + TEST_ERROR - /* Should be able to read the dataset w/o filter created under 1.8/1.6 */ - if((did = H5Dopen2(fid, DSET, H5P_DEFAULT)) < 0) - TEST_ERROR + /* Should be able to read the dataset w/o filter created under 1.8/1.6 */ + if((did = H5Dopen2(fid, DSET, H5P_DEFAULT)) < 0) + TEST_ERROR - /* Get the chunk index type */ - if(H5D__layout_idx_type_test(did, &idx_type) < 0) FAIL_STACK_ERROR + /* Get the chunk index type */ + if(H5D__layout_idx_type_test(did, &idx_type) < 0) FAIL_STACK_ERROR - /* Verify index type */ - if(idx_type != H5D_CHUNK_IDX_BTREE) - FAIL_PUTS_ERROR("should be using v1 B-tree as index") + /* Verify index type */ + if(idx_type != H5D_CHUNK_IDX_BTREE) + FAIL_PUTS_ERROR("should be using v1 B-tree as index") - if(H5Dclose(did) < 0) FAIL_STACK_ERROR + if(H5Dclose(did) < 0) FAIL_STACK_ERROR - /* Should be able to read the dataset w/ filter created under 1.8/1.6 */ - if((did = H5Dopen2(fid, DSET_FILTER, H5P_DEFAULT)) < 0) - TEST_ERROR + /* Should be able to read the dataset w/ filter created under 1.8/1.6 */ + if((did = H5Dopen2(fid, DSET_FILTER, H5P_DEFAULT)) < 0) + TEST_ERROR - /* Get the chunk index type */ - if(H5D__layout_idx_type_test(did, &idx_type) < 0) FAIL_STACK_ERROR + /* Get the chunk index type */ + if(H5D__layout_idx_type_test(did, &idx_type) < 0) FAIL_STACK_ERROR - /* Verify index type */ - if(idx_type != H5D_CHUNK_IDX_BTREE) - FAIL_PUTS_ERROR("should be using v1 B-tree as index") + /* Verify index type */ + if(idx_type != H5D_CHUNK_IDX_BTREE) + FAIL_PUTS_ERROR("should be using v1 B-tree as index") - if(H5Dclose(did) < 0) FAIL_STACK_ERROR + if(H5Dclose(did) < 0) FAIL_STACK_ERROR - /* Close the file */ - if(H5Fclose(fid) < 0) FAIL_STACK_ERROR + /* Close the file */ + if(H5Fclose(fid) < 0) FAIL_STACK_ERROR } PASSED(); @@ -10007,7 +9888,7 @@ test_idx_compatible(void) error: H5E_BEGIN_TRY { H5Dclose(did); - H5Fclose(fid); + H5Fclose(fid); } H5E_END_TRY; return -1; } /* test_idx_compatible */ @@ -10271,7 +10152,7 @@ error: /*------------------------------------------------------------------------- * Function: test_zero_dim_dset * - * Purpose: Tests support for reading a 1D chunled dataset with + * Purpose: Tests support for reading a 1D chunled dataset with * dimension size = 0. * * Return: Success: 0 @@ -10346,9 +10227,9 @@ error: * Function: test_swmr_non_latest * * Purpose: Checks that a file created with either: - * (a) SWMR-write + non-latest-format - * (b) write + latest format - * will generate datset with latest chunk indexing type. + * (a) SWMR-write + non-latest-format + * (b) write + latest format + * will generate datset with latest chunk indexing type. * * Return: Success: 0 * Failure: -1 @@ -10359,17 +10240,17 @@ static herr_t test_swmr_non_latest(const char *env_h5_driver, hid_t fapl) { char filename[FILENAME_BUF_SIZE]; - hid_t fid = -1; /* File ID */ - hid_t gid = -1; /* Group ID */ - hid_t dcpl = -1; /* Dataset creation property list ID */ - hid_t sid = -1; /* Dataspace ID */ - hid_t did = -1; /* Dataset ID */ - hsize_t dim[1], dims2[2]; /* Size of dataset */ - hsize_t max_dim[1], max_dims2[2]; /* Maximum size of dataset */ - hsize_t chunk_dim[1], chunk_dims2[2]; /* Chunk dimensions */ - H5D_chunk_index_t idx_type; /* Chunk index type */ - int data; /* Data to be written to the dataset */ - H5F_libver_t low; /* File format low bound */ + hid_t fid = -1; /* File ID */ + hid_t gid = -1; /* Group ID */ + hid_t dcpl = -1; /* Dataset creation property list ID */ + hid_t sid = -1; /* Dataspace ID */ + hid_t did = -1; /* Dataset ID */ + hsize_t dim[1], dims2[2]; /* Size of dataset */ + hsize_t max_dim[1], max_dims2[2]; /* Maximum size of dataset */ + hsize_t chunk_dim[1], chunk_dims2[2]; /* Chunk dimensions */ + H5D_chunk_index_t idx_type; /* Chunk index type */ + int data; /* Data to be written to the dataset */ + H5F_libver_t low; /* File format low bound */ TESTING("File created with write+latest-format/SWMR-write+non-latest-format: dataset with latest chunk index"); @@ -10383,35 +10264,35 @@ test_swmr_non_latest(const char *env_h5_driver, hid_t fapl) } /* end if */ /* Check if we are using the latest version of the format */ - if(H5Pget_libver_bounds(fapl, &low, NULL) < 0) + if(H5Pget_libver_bounds(fapl, &low, NULL) < 0) FAIL_STACK_ERROR h5_fixname(FILENAME[18], fapl, filename, sizeof filename); if(low == H5F_LIBVER_LATEST) { /* Create file with write+latest-format */ - if((fid = H5Fcreate(filename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0) + if((fid = H5Fcreate(filename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0) FAIL_STACK_ERROR } else { /* Create file with SWMR-write+non-latest-format */ - if((fid = H5Fcreate(filename, H5F_ACC_TRUNC|H5F_ACC_SWMR_WRITE, H5P_DEFAULT, fapl)) < 0) + if((fid = H5Fcreate(filename, H5F_ACC_TRUNC|H5F_ACC_SWMR_WRITE, H5P_DEFAULT, fapl)) < 0) FAIL_STACK_ERROR } /* end else */ /* Create a chunked dataset: this will use extensible array chunk indexing */ - if((dcpl = H5Pcreate(H5P_DATASET_CREATE)) < 0) + if((dcpl = H5Pcreate(H5P_DATASET_CREATE)) < 0) FAIL_STACK_ERROR chunk_dim[0] = 6; - if(H5Pset_chunk(dcpl, 1, chunk_dim) < 0) + if(H5Pset_chunk(dcpl, 1, chunk_dim) < 0) FAIL_STACK_ERROR dim[0] = 1; max_dim[0] = H5S_UNLIMITED; - if((sid = H5Screate_simple(1, dim, max_dim)) < 0) + if((sid = H5Screate_simple(1, dim, max_dim)) < 0) FAIL_STACK_ERROR - if((did = H5Dcreate2(fid, DSET_CHUNKED_NAME, H5T_NATIVE_INT, sid, H5P_DEFAULT, dcpl, H5P_DEFAULT)) < 0) + if((did = H5Dcreate2(fid, DSET_CHUNKED_NAME, H5T_NATIVE_INT, sid, H5P_DEFAULT, dcpl, H5P_DEFAULT)) < 0) FAIL_STACK_ERROR /* Write to the dataset */ @@ -10420,9 +10301,9 @@ test_swmr_non_latest(const char *env_h5_driver, hid_t fapl) FAIL_STACK_ERROR /* Verify the dataset's indexing type */ - if(H5D__layout_idx_type_test(did, &idx_type) < 0) + if(H5D__layout_idx_type_test(did, &idx_type) < 0) FAIL_STACK_ERROR - if(idx_type != H5D_CHUNK_IDX_EARRAY) + if(idx_type != H5D_CHUNK_IDX_EARRAY) FAIL_PUTS_ERROR("created dataset not indexed by extensible array") /* Closing */ @@ -10432,7 +10313,7 @@ test_swmr_non_latest(const char *env_h5_driver, hid_t fapl) if(H5Fclose(fid) < 0) FAIL_STACK_ERROR /* Open the file again */ - if((fid = H5Fopen(filename, H5F_ACC_RDWR, fapl)) < 0) + if((fid = H5Fopen(filename, H5F_ACC_RDWR, fapl)) < 0) FAIL_STACK_ERROR /* Open the dataset in the file */ @@ -10440,9 +10321,9 @@ test_swmr_non_latest(const char *env_h5_driver, hid_t fapl) FAIL_STACK_ERROR /* Verify the dataset's indexing type */ - if(H5D__layout_idx_type_test(did, &idx_type) < 0) + if(H5D__layout_idx_type_test(did, &idx_type) < 0) FAIL_STACK_ERROR - if(idx_type != H5D_CHUNK_IDX_EARRAY) + if(idx_type != H5D_CHUNK_IDX_EARRAY) FAIL_PUTS_ERROR("created dataset not indexed by extensible array") /* Read from the dataset and verify data read is correct */ @@ -10459,25 +10340,25 @@ test_swmr_non_latest(const char *env_h5_driver, hid_t fapl) FAIL_STACK_ERROR /* Create a chunked dataset in the group: this will use v2 B-tree chunk indexing */ - if((dcpl = H5Pcreate(H5P_DATASET_CREATE)) < 0) + if((dcpl = H5Pcreate(H5P_DATASET_CREATE)) < 0) FAIL_STACK_ERROR chunk_dims2[0] = chunk_dims2[1] = 10; - if(H5Pset_chunk(dcpl, 2, chunk_dims2) < 0) + if(H5Pset_chunk(dcpl, 2, chunk_dims2) < 0) FAIL_STACK_ERROR dims2[0] = dims2[1] = 1; max_dims2[0] = max_dims2[1] = H5S_UNLIMITED; - if((sid = H5Screate_simple(2, dims2, max_dims2)) < 0) + if((sid = H5Screate_simple(2, dims2, max_dims2)) < 0) FAIL_STACK_ERROR - if((did = H5Dcreate2(gid, DSET_CHUNKED_NAME, H5T_NATIVE_INT, sid, H5P_DEFAULT, dcpl, H5P_DEFAULT)) < 0) + if((did = H5Dcreate2(gid, DSET_CHUNKED_NAME, H5T_NATIVE_INT, sid, H5P_DEFAULT, dcpl, H5P_DEFAULT)) < 0) FAIL_STACK_ERROR /* Verify the dataset's indexing type */ - if(H5D__layout_idx_type_test(did, &idx_type) < 0) + if(H5D__layout_idx_type_test(did, &idx_type) < 0) FAIL_STACK_ERROR - if(idx_type != H5D_CHUNK_IDX_BT2) + if(idx_type != H5D_CHUNK_IDX_BT2) FAIL_PUTS_ERROR("created dataset not indexed by v2 B-tree") /* Closing */ @@ -10500,9 +10381,9 @@ test_swmr_non_latest(const char *env_h5_driver, hid_t fapl) FAIL_STACK_ERROR /* Verify the dataset's indexing type */ - if(H5D__layout_idx_type_test(did, &idx_type) < 0) + if(H5D__layout_idx_type_test(did, &idx_type) < 0) FAIL_STACK_ERROR - if(idx_type != H5D_CHUNK_IDX_BT2) + if(idx_type != H5D_CHUNK_IDX_BT2) FAIL_PUTS_ERROR("created dataset not indexed by v2 B-tree") /* Closing */ @@ -10520,9 +10401,9 @@ test_swmr_non_latest(const char *env_h5_driver, hid_t fapl) FAIL_STACK_ERROR /* Verify the dataset's indexing type */ - if(H5D__layout_idx_type_test(did, &idx_type) < 0) + if(H5D__layout_idx_type_test(did, &idx_type) < 0) FAIL_STACK_ERROR - if(idx_type != H5D_CHUNK_IDX_EARRAY) + if(idx_type != H5D_CHUNK_IDX_EARRAY) FAIL_PUTS_ERROR("created dataset not indexed by extensible array") /* Close the dataset */ @@ -10537,9 +10418,9 @@ test_swmr_non_latest(const char *env_h5_driver, hid_t fapl) FAIL_STACK_ERROR /* Verify the dataset's indexing type */ - if(H5D__layout_idx_type_test(did, &idx_type) < 0) + if(H5D__layout_idx_type_test(did, &idx_type) < 0) FAIL_STACK_ERROR - if(idx_type != H5D_CHUNK_IDX_BT2) + if(idx_type != H5D_CHUNK_IDX_BT2) FAIL_PUTS_ERROR("created dataset not indexed by v2 B-tree") /* Write to the dataset in the group */ @@ -10553,7 +10434,7 @@ test_swmr_non_latest(const char *env_h5_driver, hid_t fapl) if(H5Fclose(fid) < 0) FAIL_STACK_ERROR /* Open the file again with SWMR read access */ - if((fid = H5Fopen(filename, H5F_ACC_RDONLY | H5F_ACC_SWMR_READ, fapl)) < 0) + if((fid = H5Fopen(filename, H5F_ACC_RDONLY | H5F_ACC_SWMR_READ, fapl)) < 0) FAIL_STACK_ERROR if((gid = H5Gopen2(fid, "group", H5P_DEFAULT)) < 0) @@ -10653,7 +10534,7 @@ test_earray_hdr_fd(const char *env_h5_driver, hid_t fapl) FAIL_STACK_ERROR; /* Verify the chunk index type */ - if(H5D__layout_idx_type_test(did, &idx_type) < 0) + if(H5D__layout_idx_type_test(did, &idx_type) < 0) FAIL_STACK_ERROR; if(idx_type != H5D_CHUNK_IDX_EARRAY) FAIL_PUTS_ERROR("should be using extensible array as index"); @@ -10773,7 +10654,7 @@ test_farray_hdr_fd(const char *env_h5_driver, hid_t fapl) FAIL_STACK_ERROR; /* Verify the chunk index type */ - if(H5D__layout_idx_type_test(did, &idx_type) < 0) + if(H5D__layout_idx_type_test(did, &idx_type) < 0) FAIL_STACK_ERROR; if(idx_type != H5D_CHUNK_IDX_FARRAY) FAIL_PUTS_ERROR("should be using fixed array as index"); @@ -10893,7 +10774,7 @@ test_bt2_hdr_fd(const char *env_h5_driver, hid_t fapl) FAIL_STACK_ERROR; /* Verify the chunk index type */ - if(H5D__layout_idx_type_test(did, &idx_type) < 0) + if(H5D__layout_idx_type_test(did, &idx_type) < 0) FAIL_STACK_ERROR; if(idx_type != H5D_CHUNK_IDX_BT2) FAIL_PUTS_ERROR("should be using fixed array as index"); @@ -11348,7 +11229,7 @@ error: /*------------------------------------------------------------------------- * Function: test_power2up * - * Purpose: Tests that the H5VM_power2up(n) function does not result in an + * Purpose: Tests that the H5VM_power2up(n) function does not result in an * infinite loop when input n exceeds 2^63. (HDFFV-10217) * H5VM_power2up() is used to calculate the next power of 2 for * a dataset's scaled dimension sizes. @@ -11388,12 +11269,12 @@ test_power2up(hid_t fapl) sid = H5Screate_simple(2, dims, max_dims); /* Create dataset creation property list */ - if((dcpl = H5Pcreate(H5P_DATASET_CREATE)) < 0) + if((dcpl = H5Pcreate(H5P_DATASET_CREATE)) < 0) TEST_ERROR /* Set chunk size */ chunk_dims[0] = chunk_dims[1] = 1; - if(H5Pset_chunk(dcpl, 2, chunk_dims) < 0) + if(H5Pset_chunk(dcpl, 2, chunk_dims) < 0) TEST_ERROR /* Create chunked dataset */ @@ -11411,13 +11292,13 @@ test_power2up(hid_t fapl) TEST_ERROR /* Closing */ - if(H5Dclose(did) < 0) + if(H5Dclose(did) < 0) TEST_ERROR - if(H5Sclose(sid) < 0) + if(H5Sclose(sid) < 0) TEST_ERROR - if(H5Pclose(dcpl) < 0) + if(H5Pclose(dcpl) < 0) TEST_ERROR - if(H5Fclose(fid) < 0) + if(H5Fclose(fid) < 0) TEST_ERROR PASSED(); @@ -12460,33 +12341,33 @@ error: /*------------------------------------------------------------------------- * DLS bug -- HDFFV-9672 * - * The following functions replicate the test code provided by DLS to + * The following functions replicate the test code provided by DLS to * expose bug hdffv-9672. All functions associated with this test * have the prefix DLS_01_ * * The note documenting the bug is reproduced below: * * ------------------------------------------------------ - * + * * Hi, * We've found an issue regarding fixed length strings. * - * If we create a chunked dataset of large fixed length strings - * (up to 1kb per string) with small chunk sizes (~8 elements per + * If we create a chunked dataset of large fixed length strings + * (up to 1kb per string) with small chunk sizes (~8 elements per * chunk) then the resulting dataset may not be read later. - * This only happens if the file is created with LIBVER_LATEST + * This only happens if the file is created with LIBVER_LATEST * for the version bounds. * * Calling H5Oget_info(...) on the dataset results in the following: - * - * H5Dearray.c:250: H5D__earray_crt_context: Assertion + * + * H5Dearray.c:250: H5D__earray_crt_context: Assertion * `udata->chunk_size > 0' failed. - * + * * Example: - * void create_data(...) + * void create_data(...) * { * ... - * + * * hsize_t chunks[1] = {8} ; * * err = H5Tset_size( tid, 256 ); @@ -12494,45 +12375,45 @@ error: * err = H5Pset_chunk( dcpl, 1, chunks ); * * H5Dcreate2( fid, "data", tid, sid, H5P_DEFAULT, dcpl, H5P_DEFAULT ); - * + * * // write data - * } - * - * void read_data(...) - * { - * ... - * + * } + * + * void read_data(...) + * { + * ... + * * H5O_into_t info; status = H5Oget_info( did, &info ) // crash - * ... - * } - * - * If the size of the chunk is increased (usually matching the - * string length) then this problem disappears. - * - * A full program that produces such a file (and crashes trying to + * ... + * } + * + * If the size of the chunk is increased (usually matching the + * string length) then this problem disappears. + * + * A full program that produces such a file (and crashes trying to * read it) is attached. - * + * * Tested with 1.10.0-alpha1. - * + * * Regards, - * + * * Charles Mita * Software Engineer * Diamond Light Source Ltd. * +44 1235 778029 * * ------------------------------------------------------ - * + * * The bug in question turned out to be caused by a failure to update - * the enc_bytes_per_dim field in the layout if the size of the - * underlying type required more bytes to encode than any of the + * the enc_bytes_per_dim field in the layout if the size of the + * underlying type required more bytes to encode than any of the * chunk dimensions. * - * At least in debug builds, the following test code exposes the + * At least in debug builds, the following test code exposes the * failure via an assertion failure. * - * Note that the test code make no attempt to run with different - * file drivers, as the bug is in the actual on disk encoding of + * Note that the test code make no attempt to run with different + * file drivers, as the bug is in the actual on disk encoding of * the chunk layout. * * JRM -- 2/5/16 @@ -12540,10 +12421,10 @@ error: *------------------------------------------------------------------------- */ -#define DLS_01_DATASET "data" -#define DLS_01_STR_SIZE 256 -#define DLS_01_CHUNK_SIZE 8 -#define DLS_01_DIMS 4 +#define DLS_01_DATASET "data" +#define DLS_01_STR_SIZE 256 +#define DLS_01_CHUNK_SIZE 8 +#define DLS_01_DIMS 4 static herr_t dls_01_setup_file( hid_t fid ); static herr_t dls_01_write_data( hid_t fid, char* buffer ); @@ -12664,18 +12545,18 @@ dls_01_main( void ) { char filename[512]; int status = 0; hid_t fapl = 0, fid = 0; - const char* strings[DLS_01_DIMS] = - { "String 1", "Test string 2", "Another string", "Final String" }; + const char* strings[DLS_01_DIMS] = + { "String 1", "Test string 2", "Another string", "Final String" }; char* buffer = NULL; TESTING("Testing DLS bugfix 1"); - if ( NULL == h5_fixname(FILENAME[23], H5P_DEFAULT, filename, + if ( NULL == h5_fixname(FILENAME[23], H5P_DEFAULT, filename, sizeof(filename)) ) - TEST_ERROR + TEST_ERROR buffer = (char *)HDcalloc( DLS_01_DIMS, DLS_01_STR_SIZE ); - if ( NULL == buffer ) + if ( NULL == buffer ) TEST_ERROR HDstrcpy( buffer, strings[0] ); @@ -12693,10 +12574,10 @@ dls_01_main( void ) { if ( fid <= 0 ) TEST_ERROR if ( 0 != dls_01_setup_file( fid ) ) - goto error; + goto error; if ( 0 != dls_01_write_data( fid, buffer ) ) - goto error; + goto error; status = H5Fclose( fid ); if ( status != 0 ) TEST_ERROR @@ -12705,7 +12586,7 @@ dls_01_main( void ) { if ( fid <= 0 ) TEST_ERROR if ( 0 != dls_01_read_stuff( fid ) ) - goto error; + goto error; status = H5Fclose( fid ); if ( status != 0 ) TEST_ERROR @@ -12754,7 +12635,7 @@ test_compact_open_close_dirty(hid_t fapl) hid_t dcpl = -1; /* Dataset creation property list */ hsize_t dims[1] = {10}; /* Dimension */ int wbuf[10]; /* Data buffer */ - char filename[FILENAME_BUF_SIZE]; /* Filename */ + char filename[FILENAME_BUF_SIZE]; /* Filename */ int i; /* Local index variable */ hbool_t dirty; /* The dirty flag */ @@ -12770,15 +12651,15 @@ test_compact_open_close_dirty(hid_t fapl) wbuf[i] = i; /* Create dataspace */ - if((sid = H5Screate_simple(1, dims, NULL)) < 0) + if((sid = H5Screate_simple(1, dims, NULL)) < 0) TEST_ERROR /* Set compact layout */ - if((dcpl = H5Pcreate(H5P_DATASET_CREATE)) < 0) + if((dcpl = H5Pcreate(H5P_DATASET_CREATE)) < 0) TEST_ERROR - if(H5Pset_layout(dcpl, H5D_COMPACT) < 0) + if(H5Pset_layout(dcpl, H5D_COMPACT) < 0) TEST_ERROR - if(H5Pset_alloc_time(dcpl, H5D_ALLOC_TIME_EARLY) < 0) + if(H5Pset_alloc_time(dcpl, H5D_ALLOC_TIME_EARLY) < 0) TEST_ERROR /* Create a compact dataset */ @@ -12790,7 +12671,7 @@ test_compact_open_close_dirty(hid_t fapl) TEST_ERROR /* Close the dataset */ - if(H5Dclose(did) < 0) + if(H5Dclose(did) < 0) TEST_ERROR /* Verify the repeated open/close of the dataset will not fail */ @@ -12802,7 +12683,7 @@ test_compact_open_close_dirty(hid_t fapl) TEST_ERROR if(H5Dclose(did) < 0) TEST_ERROR - } + } /* Open the dataset */ if((did = H5Dopen2(fid, DSET_COMPACT_MAX_NAME, H5P_DEFAULT)) < 0) @@ -12817,11 +12698,11 @@ test_compact_open_close_dirty(hid_t fapl) TEST_ERROR /* Close the dataset */ - if(H5Dclose(did) < 0) + if(H5Dclose(did) < 0) TEST_ERROR /* Close the dataspace */ - if(H5Sclose(sid) < 0) + if(H5Sclose(sid) < 0) TEST_ERROR /* Close the dataset creation property list */ @@ -12847,24 +12728,24 @@ error: /*------------------------------------------------------------------------- - * Function: main + * Function: main * - * Purpose: Tests the dataset interface (H5D) + * Purpose: Tests the dataset interface (H5D) * - * Return: Success: exit(EXIT_SUCCESS) + * Return: Success: exit(EXIT_SUCCESS) * - * Failure: exit(EXIT_FAILURE) + * Failure: exit(EXIT_FAILURE) * - * Programmer: Robb Matzke - * Tuesday, December 9, 1997 + * Programmer: Robb Matzke + * Tuesday, December 9, 1997 * *------------------------------------------------------------------------- */ int main(void) { - char filename[FILENAME_BUF_SIZE]; - hid_t file, grp, fapl, fapl2; + char filename[FILENAME_BUF_SIZE]; + hid_t file, grp, fapl, fapl2; hid_t fcpl = -1, fcpl2 = -1; unsigned new_format; unsigned paged; @@ -12872,7 +12753,7 @@ main(void) size_t rdcc_nelmts; size_t rdcc_nbytes; double rdcc_w0; - int nerrors = 0; + int nerrors = 0; const char *envval; hbool_t contig_addr_vfd; /* Whether VFD used has a contigous address space */ @@ -12961,62 +12842,62 @@ main(void) if(H5Gclose(grp) < 0) goto error; - nerrors += (test_create(file) < 0 ? 1 : 0); - nerrors += (test_simple_io(envval, my_fapl) < 0 ? 1 : 0); - nerrors += (test_compact_io(my_fapl) < 0 ? 1 : 0); - nerrors += (test_max_compact(my_fapl) < 0 ? 1 : 0); + nerrors += (test_create(file) < 0 ? 1 : 0); + nerrors += (test_simple_io(envval, my_fapl) < 0 ? 1 : 0); + nerrors += (test_compact_io(my_fapl) < 0 ? 1 : 0); + nerrors += (test_max_compact(my_fapl) < 0 ? 1 : 0); nerrors += (test_compact_open_close_dirty(my_fapl) < 0 ? 1 : 0); - nerrors += (test_conv_buffer(file) < 0 ? 1 : 0); - nerrors += (test_tconv(file) < 0 ? 1 : 0); - nerrors += (test_filters(file, my_fapl) < 0 ? 1 : 0); - nerrors += (test_onebyte_shuffle(file) < 0 ? 1 : 0); - nerrors += (test_nbit_int(file) < 0 ? 1 : 0); - nerrors += (test_nbit_float(file) < 0 ? 1 : 0); - nerrors += (test_nbit_double(file) < 0 ? 1 : 0); - nerrors += (test_nbit_array(file) < 0 ? 1 : 0); - nerrors += (test_nbit_compound(file) < 0 ? 1 : 0); - nerrors += (test_nbit_compound_2(file) < 0 ? 1 : 0); - nerrors += (test_nbit_compound_3(file) < 0 ? 1 : 0); - nerrors += (test_nbit_int_size(file) < 0 ? 1 : 0); - nerrors += (test_nbit_flt_size(file) < 0 ? 1 : 0); - nerrors += (test_scaleoffset_int(file) < 0 ? 1 : 0); - nerrors += (test_scaleoffset_int_2(file) < 0 ? 1 : 0); - nerrors += (test_scaleoffset_float(file) < 0 ? 1 : 0); - nerrors += (test_scaleoffset_float_2(file) < 0 ? 1 : 0); - nerrors += (test_scaleoffset_double(file) < 0 ? 1 : 0); - nerrors += (test_scaleoffset_double_2(file) < 0 ? 1 : 0); - nerrors += (test_multiopen (file) < 0 ? 1 : 0); - nerrors += (test_types(file) < 0 ? 1 : 0); + nerrors += (test_conv_buffer(file) < 0 ? 1 : 0); + nerrors += (test_tconv(file) < 0 ? 1 : 0); + nerrors += (test_filters(file, my_fapl) < 0 ? 1 : 0); + nerrors += (test_onebyte_shuffle(file) < 0 ? 1 : 0); + nerrors += (test_nbit_int(file) < 0 ? 1 : 0); + nerrors += (test_nbit_float(file) < 0 ? 1 : 0); + nerrors += (test_nbit_double(file) < 0 ? 1 : 0); + nerrors += (test_nbit_array(file) < 0 ? 1 : 0); + nerrors += (test_nbit_compound(file) < 0 ? 1 : 0); + nerrors += (test_nbit_compound_2(file) < 0 ? 1 : 0); + nerrors += (test_nbit_compound_3(file) < 0 ? 1 : 0); + nerrors += (test_nbit_int_size(file) < 0 ? 1 : 0); + nerrors += (test_nbit_flt_size(file) < 0 ? 1 : 0); + nerrors += (test_scaleoffset_int(file) < 0 ? 1 : 0); + nerrors += (test_scaleoffset_int_2(file) < 0 ? 1 : 0); + nerrors += (test_scaleoffset_float(file) < 0 ? 1 : 0); + nerrors += (test_scaleoffset_float_2(file) < 0 ? 1 : 0); + nerrors += (test_scaleoffset_double(file) < 0 ? 1 : 0); + nerrors += (test_scaleoffset_double_2(file) < 0 ? 1 : 0); + nerrors += (test_multiopen (file) < 0 ? 1 : 0); + nerrors += (test_types(file) < 0 ? 1 : 0); nerrors += (test_userblock_offset(envval, my_fapl, new_format) < 0 ? 1 : 0); - nerrors += (test_missing_filter(file) < 0 ? 1 : 0); - nerrors += (test_can_apply(file) < 0 ? 1 : 0); - nerrors += (test_can_apply2(file) < 0 ? 1 : 0); - nerrors += (test_set_local(my_fapl) < 0 ? 1 : 0); - nerrors += (test_can_apply_szip(file) < 0 ? 1 : 0); - nerrors += (test_compare_dcpl(file) < 0 ? 1 : 0); - nerrors += (test_copy_dcpl(file, my_fapl) < 0 ? 1 : 0); - nerrors += (test_filter_delete(file) < 0 ? 1 : 0); - nerrors += (test_filters_endianess() < 0 ? 1 : 0); - nerrors += (test_zero_dims(file) < 0 ? 1 : 0); - nerrors += (test_missing_chunk(file) < 0 ? 1 : 0); - nerrors += (test_random_chunks(my_fapl) < 0 ? 1 : 0); + nerrors += (test_missing_filter(file) < 0 ? 1 : 0); + nerrors += (test_can_apply(file) < 0 ? 1 : 0); + nerrors += (test_can_apply2(file) < 0 ? 1 : 0); + nerrors += (test_set_local(my_fapl) < 0 ? 1 : 0); + nerrors += (test_can_apply_szip(file) < 0 ? 1 : 0); + nerrors += (test_compare_dcpl(file) < 0 ? 1 : 0); + nerrors += (test_copy_dcpl(file, my_fapl) < 0 ? 1 : 0); + nerrors += (test_filter_delete(file) < 0 ? 1 : 0); + nerrors += (test_filters_endianess() < 0 ? 1 : 0); + nerrors += (test_zero_dims(file) < 0 ? 1 : 0); + nerrors += (test_missing_chunk(file) < 0 ? 1 : 0); + nerrors += (test_random_chunks(my_fapl) < 0 ? 1 : 0); #ifndef H5_NO_DEPRECATED_SYMBOLS - nerrors += (test_deprec(file) < 0 ? 1 : 0); + nerrors += (test_deprec(file) < 0 ? 1 : 0); #endif /* H5_NO_DEPRECATED_SYMBOLS */ - nerrors += (test_huge_chunks(my_fapl) < 0 ? 1 : 0); - nerrors += (test_chunk_cache(my_fapl) < 0 ? 1 : 0); + nerrors += (test_huge_chunks(my_fapl) < 0 ? 1 : 0); + nerrors += (test_chunk_cache(my_fapl) < 0 ? 1 : 0); nerrors += (test_big_chunks_bypass_cache(my_fapl) < 0 ? 1 : 0); - nerrors += (test_chunk_fast(envval, my_fapl) < 0 ? 1 : 0); - nerrors += (test_reopen_chunk_fast(my_fapl) < 0 ? 1 : 0); + nerrors += (test_chunk_fast(envval, my_fapl) < 0 ? 1 : 0); + nerrors += (test_reopen_chunk_fast(my_fapl) < 0 ? 1 : 0); nerrors += (test_chunk_fast_bug1(my_fapl) < 0 ? 1 : 0); - nerrors += (test_chunk_expand(my_fapl) < 0 ? 1 : 0); - nerrors += (test_layout_extend(my_fapl) < 0 ? 1 : 0); - nerrors += (test_fixed_array(my_fapl) < 0 ? 1 : 0); - nerrors += (test_idx_compatible() < 0 ? 1 : 0); + nerrors += (test_chunk_expand(my_fapl) < 0 ? 1 : 0); + nerrors += (test_layout_extend(my_fapl) < 0 ? 1 : 0); + nerrors += (test_fixed_array(my_fapl) < 0 ? 1 : 0); + nerrors += (test_idx_compatible() < 0 ? 1 : 0); nerrors += (test_unfiltered_edge_chunks(my_fapl) < 0 ? 1 : 0); - nerrors += (test_single_chunk(my_fapl) < 0 ? 1 : 0); + nerrors += (test_single_chunk(my_fapl) < 0 ? 1 : 0); nerrors += (test_large_chunk_shrink(my_fapl) < 0 ? 1 : 0); nerrors += (test_zero_dim_dset(my_fapl) < 0 ? 1 : 0); nerrors += (test_storage_size(my_fapl) < 0 ? 1 : 0); diff --git a/tools/lib/h5diff_attr.c b/tools/lib/h5diff_attr.c index b7448db..ed03cf4 100644 --- a/tools/lib/h5diff_attr.c +++ b/tools/lib/h5diff_attr.c @@ -461,8 +461,8 @@ hsize_t diff_attr(hid_t loc1_id, for(j = 0; j < rank1; j++) nelmts1 *= dims1[j]; - buf1 = (void *)HDmalloc((size_t)(nelmts1 * msize1)); - buf2 = (void *)HDmalloc((size_t)(nelmts1 * msize2)); + buf1 = (void *)HDcalloc((size_t)(nelmts1), msize1); + buf2 = (void *)HDcalloc((size_t)(nelmts1), msize2); if(buf1 == NULL || buf2 == NULL) { parallel_print("cannot read into memory\n"); goto error; diff --git a/tools/lib/h5diff_dset.c b/tools/lib/h5diff_dset.c index ea79c6c..f046369 100644 --- a/tools/lib/h5diff_dset.c +++ b/tools/lib/h5diff_dset.c @@ -170,6 +170,7 @@ hsize_t diff_datasetid( hid_t did1, const char *obj2_name, diff_opt_t *options) { + int ret_value = 0; /*no need to LEAVE() on ERROR: HERR_INIT(int, SUCCEED) */ hid_t sid1=-1; hid_t sid2=-1; hid_t f_tid1=-1; @@ -211,30 +212,31 @@ hsize_t diff_datasetid( hid_t did1, int i; unsigned int vl_data = 0; /*contains VL datatypes */ + options->err_stat = 1; h5difftrace("diff_datasetid start\n"); /* Get the dataspace handle */ if((sid1 = H5Dget_space(did1)) < 0) - goto error; + HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Dget_space failed"); /* Get rank */ if((rank1 = H5Sget_simple_extent_ndims(sid1)) < 0) - goto error; + HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Sget_simple_extent_ndims failed"); /* Get the dataspace handle */ if((sid2 = H5Dget_space(did2)) < 0 ) - goto error; + HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Dget_space failed"); /* Get rank */ if((rank2 = H5Sget_simple_extent_ndims(sid2)) < 0) - goto error; + HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Sget_simple_extent_ndims failed"); /* Get dimensions */ if(H5Sget_simple_extent_dims(sid1, dims1, maxdim1) < 0) - goto error; + HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Sget_simple_extent_dims failed"); /* Get dimensions */ if(H5Sget_simple_extent_dims(sid2, dims2, maxdim2) < 0) - goto error; + HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Sget_simple_extent_dims failed"); h5diffdebug3("rank: %ld - %ld\n", rank1, rank2); /*------------------------------------------------------------------------- @@ -244,25 +246,25 @@ hsize_t diff_datasetid( hid_t did1, /* Get the data type */ if((f_tid1 = H5Dget_type(did1)) < 0) - goto error; + HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Dget_type failed"); /* Get the data type */ if((f_tid2 = H5Dget_type(did2)) < 0) - goto error; + HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Dget_type failed"); /*------------------------------------------------------------------------- * get the storage layout type *------------------------------------------------------------------------- */ if((dcpl1 = H5Dget_create_plist(did1)) < 0) - goto error; + HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Dget_create_plist failed"); if((dcpl2 = H5Dget_create_plist(did2)) < 0) - goto error; + HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Dget_create_plist failed"); if((stl1 = H5Pget_layout(dcpl1)) < 0) - goto error; + HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Pget_layout failed"); if((stl2 = H5Pget_layout(dcpl2)) < 0) - goto error; + HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Pget_layout failed"); /*------------------------------------------------------------------------- * check for empty datasets @@ -303,10 +305,10 @@ hsize_t diff_datasetid( hid_t did1, */ h5difftrace("check for memory type and sizes\n"); if((m_tid1 = H5Tget_native_type(f_tid1, H5T_DIR_DEFAULT)) < 0) - goto error; + HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Tget_native_type failed"); if((m_tid2 = H5Tget_native_type(f_tid2, H5T_DIR_DEFAULT)) < 0) - goto error; + HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Tget_native_type failed"); m_size1 = H5Tget_size(m_tid1); m_size2 = H5Tget_size(m_tid2); @@ -368,14 +370,14 @@ hsize_t diff_datasetid( hid_t did1, if (FAIL == match_up_memsize (f_tid1, f_tid2, &m_tid1, &m_tid2, &m_size1, &m_size2)) - goto error; + HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "match_up_memsize failed"); h5diffdebug3("m_size: %ld - %ld\n", m_size1, m_size2); dadims = dims1; dam_size = m_size1; dam_tid = m_tid1; danelmts = nelmts1; need = (size_t)(nelmts1 * m_size1); /* bytes needed */ - } + } else { h5diffdebug3("Array dims: %d - %d\n", dims1[0], dims2[0]); /* Compare the smallest array, but create the largest buffer */ @@ -413,10 +415,10 @@ hsize_t diff_datasetid( hid_t did1, if(buf1 != NULL && buf2 != NULL) { h5difftrace("buf1 != NULL && buf2 != NULL\n"); if(H5Dread(did1, m_tid1, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf1) < 0) - goto error; + HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Dread failed"); h5difftrace("H5Dread did2\n"); if(H5Dread(did2, m_tid2, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf2) < 0) - goto error; + HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Dread failed"); /* array diff */ nfound = diff_array(buf1, buf2, danelmts, (hsize_t)0, rank1, dadims, @@ -427,6 +429,14 @@ hsize_t diff_datasetid( hid_t did1, H5Dvlen_reclaim(m_tid1, sid1, H5P_DEFAULT, buf1); H5Dvlen_reclaim(m_tid2, sid2, H5P_DEFAULT, buf2); } /* end if */ + if(buf1 != NULL) { + HDfree(buf1); + buf1 = NULL; + } + if(buf2 != NULL) { + HDfree(buf2); + buf2 = NULL; + } } /* end if */ else { /* possibly not enough memory, read/compare by hyperslabs */ size_t p_type_nbytes = dam_size; /*size of memory type */ @@ -468,9 +478,9 @@ hsize_t diff_datasetid( hid_t did1, * E.g., sm_space. */ if((sm_buf1 = HDmalloc((size_t)sm_nbytes)) == NULL) - goto error; + HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "HDmalloc failed"); if((sm_buf2 = HDmalloc((size_t)sm_nbytes)) == NULL) - goto error; + HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "HDmalloc failed"); sm_nelmts = sm_nbytes / p_type_nbytes; sm_space = H5Screate_simple(1, &sm_nelmts, NULL); @@ -487,19 +497,19 @@ hsize_t diff_datasetid( hid_t did1, hs_nelmts *= hs_size[i]; } /* end for */ if(H5Sselect_hyperslab(sid1, H5S_SELECT_SET, hs_offset, NULL, hs_size, NULL) < 0) - goto error; + HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Sselect_hyperslab failed"); if(H5Sselect_hyperslab(sid2, H5S_SELECT_SET, hs_offset, NULL, hs_size, NULL) < 0) - goto error; + HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Sselect_hyperslab failed"); if(H5Sselect_hyperslab(sm_space, H5S_SELECT_SET, zero, NULL, &hs_nelmts, NULL) < 0) - goto error; + HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Sselect_hyperslab failed"); } /* end if */ else hs_nelmts = 1; if(H5Dread(did1, m_tid1, sm_space, sid1, H5P_DEFAULT, sm_buf1) < 0) - goto error; + HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Dread failed"); if(H5Dread(did2, m_tid2, sm_space, sid2, H5P_DEFAULT, sm_buf2) < 0) - goto error; + HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Dread failed"); /* get array differences. in the case of hyperslab read, increment the number of differences found in each hyperslab and pass the position at the beginning for printing */ @@ -521,6 +531,14 @@ hsize_t diff_datasetid( hid_t did1, carry = 0; } /* i */ } /* elmtno */ + if(sm_buf1 != NULL) { + HDfree(sm_buf1); + sm_buf1 = NULL; + } + if(sm_buf2 != NULL) { + HDfree(sm_buf2); + sm_buf2 = NULL; + } H5Sclose(sm_space); } /* hyperslab read */ @@ -531,40 +549,11 @@ hsize_t diff_datasetid( hid_t did1, * close *------------------------------------------------------------------------- */ - h5difftrace("compare attributes?\n"); - - /* free */ - if(buf1 != NULL) { - HDfree(buf1); - buf1 = NULL; - } /* end if */ - if(buf2 != NULL) { - HDfree(buf2); - buf2 = NULL; - } /* end if */ - if(sm_buf1 != NULL) { - HDfree(sm_buf1); - sm_buf1 = NULL; - } /* end if */ - if(sm_buf2 != NULL) { - HDfree(sm_buf2); - sm_buf2 = NULL; - } /* end if */ + h5difftrace("reclaim any VL memory\n"); - H5E_BEGIN_TRY { - H5Sclose(sid1); - H5Sclose(sid2); - H5Tclose(f_tid1); - H5Tclose(f_tid2); - H5Tclose(m_tid1); - H5Tclose(m_tid2); - } H5E_END_TRY; - h5difftrace("diff_datasetid finish\n"); - - return nfound; +done: -error: - options->err_stat=1; + options->err_stat = ret_value; /* free */ if(buf1 != NULL) { @@ -606,7 +595,7 @@ error: H5Tclose(m_tid2); /* enable error reporting */ } H5E_END_TRY; - h5difftrace("diff_datasetid errored\n"); + h5diffdebug3("diff_datasetid return:%d with nfound:%d\n", ret_value, nfound); return nfound; } diff --git a/tools/lib/h5tools_filters.c b/tools/lib/h5tools_filters.c index 6ee58c5..abd55db 100644 --- a/tools/lib/h5tools_filters.c +++ b/tools/lib/h5tools_filters.c @@ -20,9 +20,9 @@ */ static void print_warning(const char *dname, const char *fname) { - fprintf(stderr, - "warning: dataset <%s> cannot be read, %s filter is not available\n", - dname, fname); + fprintf(stderr, + "warning: dataset <%s> cannot be read, %s filter is not available\n", + dname, fname); } /*------------------------------------------------------------------------- @@ -34,100 +34,97 @@ static void print_warning(const char *dname, const char *fname) * 2) the internal filters might be turned off * * Return: 1, can read, 0, cannot, -1 error - * - * Programmer: Pedro Vicente, pvn@ncsa.uiuc.edu - * - * Date: March 1, 2004 - * *------------------------------------------------------------------------- */ int h5tools_canreadf(const char* name, /* object name, serves also as boolean print */ hid_t dcpl_id) /* dataset creation property list */ { + int ret_value = 1; /*no need to LEAVE() on ERROR: HERR_INIT(int, SUCCEED) */ + int nfilters; /* number of filters */ + H5Z_filter_t filtn; /* filter identification number */ + int i; /* index */ + int udfilter_avail; /* index */ + + /* get information about filters */ + if ((nfilters = H5Pget_nfilters(dcpl_id)) < 0) + HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Pget_nfilters failed"); + + /* if we do not have filters, we can read the dataset safely */ + if (!nfilters) + HGOTO_DONE(1); + + /* check availability of filters */ + for (i = 0; i < nfilters; i++) { + if ((filtn = H5Pget_filter2(dcpl_id, (unsigned) i, 0, 0, 0, (size_t) 0, 0, NULL)) < 0) + HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Pget_filter2 failed"); + + switch (filtn) { + /*------------------------------------------------------------------------- + * user defined filter + *------------------------------------------------------------------------- + */ + default: + if ((udfilter_avail = H5Zfilter_avail(filtn)) < 0) { + HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Zfilter_avail failed"); + } + else if (!udfilter_avail) { + if (name) + print_warning(name, "user defined"); + ret_value = 0; + } + break; - int nfilters; /* number of filters */ - H5Z_filter_t filtn; /* filter identification number */ - int i; /* index */ - int udfilter_avail; /* index */ - - /* get information about filters */ - if ((nfilters = H5Pget_nfilters(dcpl_id)) < 0) - return -1; - - /* if we do not have filters, we can read the dataset safely */ - if (!nfilters) - return 1; - - /* check availability of filters */ - for (i = 0; i < nfilters; i++) { - if ((filtn = H5Pget_filter2(dcpl_id, (unsigned) i, 0, 0, 0, (size_t) 0, 0, NULL)) < 0) - return -1; - - switch (filtn) { - /*------------------------------------------------------------------------- - * user defined filter - *------------------------------------------------------------------------- - */ - default: - if ((udfilter_avail = H5Zfilter_avail(filtn)) < 0) - return -1; - else if (udfilter_avail == 0) { - if (name) - print_warning(name, "user defined"); - return 0; - } - break; - - /*------------------------------------------------------------------------- - * H5Z_FILTER_DEFLATE 1 , deflation like gzip - *------------------------------------------------------------------------- - */ - case H5Z_FILTER_DEFLATE: + /*------------------------------------------------------------------------- + * H5Z_FILTER_DEFLATE 1 , deflation like gzip + *------------------------------------------------------------------------- + */ + case H5Z_FILTER_DEFLATE: #ifndef H5_HAVE_FILTER_DEFLATE - if (name) - print_warning(name,"deflate"); - return 0; + if (name) + print_warning(name,"deflate"); + ret_value = 0; #endif - break; - /*------------------------------------------------------------------------- - * H5Z_FILTER_SZIP 4 , szip compression - *------------------------------------------------------------------------- - */ - case H5Z_FILTER_SZIP: + break; + /*------------------------------------------------------------------------- + * H5Z_FILTER_SZIP 4 , szip compression + *------------------------------------------------------------------------- + */ + case H5Z_FILTER_SZIP: #ifndef H5_HAVE_FILTER_SZIP - if (name) - print_warning(name,"SZIP"); - return 0; + if (name) + print_warning(name,"SZIP"); + ret_value = 0; #endif - break; - /*------------------------------------------------------------------------- - * H5Z_FILTER_SHUFFLE 2 , shuffle the data - *------------------------------------------------------------------------- - */ - case H5Z_FILTER_SHUFFLE: - break; - /*------------------------------------------------------------------------- - * H5Z_FILTER_FLETCHER32 3 , fletcher32 checksum of EDC - *------------------------------------------------------------------------- - */ - case H5Z_FILTER_FLETCHER32: - break; - /*------------------------------------------------------------------------- - * H5Z_FILTER_NBIT - *------------------------------------------------------------------------- - */ - case H5Z_FILTER_NBIT: - break; - /*------------------------------------------------------------------------- - * H5Z_FILTER_SCALEOFFSET - *------------------------------------------------------------------------- - */ - case H5Z_FILTER_SCALEOFFSET: - break; - }/*switch*/ - }/*for*/ - - return 1; + break; + /*------------------------------------------------------------------------- + * H5Z_FILTER_SHUFFLE 2 , shuffle the data + *------------------------------------------------------------------------- + */ + case H5Z_FILTER_SHUFFLE: + break; + /*------------------------------------------------------------------------- + * H5Z_FILTER_FLETCHER32 3 , fletcher32 checksum of EDC + *------------------------------------------------------------------------- + */ + case H5Z_FILTER_FLETCHER32: + break; + /*------------------------------------------------------------------------- + * H5Z_FILTER_NBIT + *------------------------------------------------------------------------- + */ + case H5Z_FILTER_NBIT: + break; + /*------------------------------------------------------------------------- + * H5Z_FILTER_SCALEOFFSET + *------------------------------------------------------------------------- + */ + case H5Z_FILTER_SCALEOFFSET: + break; + }/*switch*/ + }/*for*/ + +done: + return ret_value; } /*------------------------------------------------------------------------- @@ -138,31 +135,26 @@ int h5tools_canreadf(const char* name, /* object name, serves also as boolean pr * except SZIP, which may be configured decoder-only. * * Return: 1, can write, 0, cannot, -1 error - * - * Programmer: - * - * Date: October 5, 2004 - * *------------------------------------------------------------------------- */ H5_ATTR_CONST int h5tools_can_encode(H5Z_filter_t filtn) { switch (filtn) { - /* user defined filter */ - default: + /* user defined filter */ + default: return 0; - case H5Z_FILTER_DEFLATE: + case H5Z_FILTER_DEFLATE: #ifndef H5_HAVE_FILTER_DEFLATE return 0; #endif break; - case H5Z_FILTER_SZIP: + case H5Z_FILTER_SZIP: #ifndef H5_HAVE_FILTER_SZIP return 0; #else - { + { unsigned int filter_config_flags; if (H5Zget_filter_info(filtn, &filter_config_flags) < 0) @@ -171,36 +163,36 @@ h5tools_can_encode(H5Z_filter_t filtn) { & (H5Z_FILTER_CONFIG_ENCODE_ENABLED | H5Z_FILTER_CONFIG_DECODE_ENABLED)) == 0) { /* filter present but neither encode nor decode is supported (???) */ return -1; - } + } else if ((filter_config_flags & (H5Z_FILTER_CONFIG_ENCODE_ENABLED | H5Z_FILTER_CONFIG_DECODE_ENABLED)) == H5Z_FILTER_CONFIG_DECODE_ENABLED) { /* decoder only: read but not write */ return 0; - } + } else if ((filter_config_flags & (H5Z_FILTER_CONFIG_ENCODE_ENABLED | H5Z_FILTER_CONFIG_DECODE_ENABLED)) == H5Z_FILTER_CONFIG_ENCODE_ENABLED) { /* encoder only: write but not read (???) */ return -1; - } + } else if ((filter_config_flags & (H5Z_FILTER_CONFIG_ENCODE_ENABLED | H5Z_FILTER_CONFIG_DECODE_ENABLED)) == (H5Z_FILTER_CONFIG_ENCODE_ENABLED | H5Z_FILTER_CONFIG_DECODE_ENABLED)) { return 1; } - } + } #endif break; - case H5Z_FILTER_SHUFFLE: + case H5Z_FILTER_SHUFFLE: break; - case H5Z_FILTER_FLETCHER32: + case H5Z_FILTER_FLETCHER32: break; - case H5Z_FILTER_NBIT: + case H5Z_FILTER_NBIT: break; - case H5Z_FILTER_SCALEOFFSET: + case H5Z_FILTER_SCALEOFFSET: break; }/*switch*/ diff --git a/tools/src/h5repack/h5repack.c b/tools/src/h5repack/h5repack.c index 7ed9a90..6b8cf8a 100644 --- a/tools/src/h5repack/h5repack.c +++ b/tools/src/h5repack/h5repack.c @@ -284,8 +284,7 @@ hid_t copy_named_datatype(hid_t type_in, hid_t fidout, /* Set return value */ ret_value = dt_ret->id_out; - /* Increment the ref count on id_out, because the calling function will try - * to close it */ + /* Increment the ref count on id_out, because the calling function will try to close it */ if(H5Iinc_ref(ret_value) < 0) ret_value = -1; @@ -482,24 +481,8 @@ copy_attr(hid_t loc_in, hid_t loc_out, named_dt_t **named_dt_head_p, if (options->verbose) printf(FORMAT_OBJ_ATTR, "attr", name); - - /*------------------------------------------------------------------------- - * close - *------------------------------------------------------------------------- - */ - - if (H5Tclose(ftype_id) < 0) - HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Tclose failed"); - if (H5Tclose(wtype_id) < 0) - HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Tclose failed"); - if (H5Sclose(space_id) < 0) - HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Sclose failed"); - if (H5Aclose(attr_id) < 0) - HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Aclose failed"); } /* u */ - return 0; - done: H5E_BEGIN_TRY { if (buf) { @@ -541,8 +524,8 @@ static int check_options(pack_opt_t *options) { *------------------------------------------------------------------------- */ if (options->verbose && have_request(options) /* only print if requested */) { - printf("Objects to modify layout are...\n"); if (options->all_layout == 1) { + printf("All objects to modify layout are...\n"); switch (options->layout_g) { case H5D_COMPACT: strcpy(slayout, "compact"); @@ -563,14 +546,17 @@ static int check_options(pack_opt_t *options) { strcpy(slayout, "invalid layout\n"); HGOTO_DONE(FAIL); } - printf(" Apply %s layout to all\n", slayout); + printf(" Apply %s layout to all", slayout); if (H5D_CHUNKED == options->layout_g) { - printf("with dimension ["); + printf("with dimension [ "); for (j = 0; j < options->chunk_g.rank; j++) printf("%d ", (int) options->chunk_g.chunk_lengths[j]); - printf("]\n"); + printf("]"); } + printf("\n"); } + else + printf("No all objects to modify layout\n"); }/* verbose */ for (i = 0; i < options->op_tbl->nelems; i++) { @@ -601,10 +587,14 @@ static int check_options(pack_opt_t *options) { */ if (options->verbose && have_request(options) /* only print if requested */) { - printf("Objects to apply filter are...\n"); if (options->all_filter == 1) { + printf("All objects to apply filter are...\n"); for (k = 0; k < options->n_filter_g; k++) { H5Z_filter_t filtn = options->filter_g[k].filtn; + if (filtn < 0) { + printf(" Unknown\n"); + continue; + } switch (filtn) { case H5Z_FILTER_NONE: printf(" Uncompress all\n"); @@ -623,6 +613,8 @@ static int check_options(pack_opt_t *options) { } /* k */ }; } + else + printf("No all objects to apply filter\n"); } /* verbose */ for (i = 0; i < options->op_tbl->nelems; i++) { @@ -631,7 +623,12 @@ static int check_options(pack_opt_t *options) { for (j = 0; j < pack.nfilters; j++) { if (options->verbose) { - printf(" <%s> with %s filter\n", name, get_sfilter(pack.filter[j].filtn)); + if(pack.filter[j].filtn >= 0) { + if(pack.filter[j].filtn > H5Z_FILTER_SCALEOFFSET) + printf(" <%s> with %s filter %d\n", name, get_sfilter(pack.filter[j].filtn), pack.filter[j].filtn); + else + printf(" <%s> with %s filter\n", name, get_sfilter(pack.filter[j].filtn)); + } } has_cp = 1; } /* j */ @@ -661,8 +658,7 @@ static int check_options(pack_opt_t *options) { */ if (options->ublock_filename != NULL && options->ublock_size == 0) { if (options->verbose) { - printf("Warning: user block size missing for file %s. Assigning a default size of 1024...\n", - options->ublock_filename); + printf("Warning: user block size missing for file %s. Assigning a default size of 1024...\n", options->ublock_filename); options->ublock_size = 1024; } } @@ -692,27 +688,29 @@ done: *------------------------------------------------------------------------- */ static int check_objects(const char* fname, pack_opt_t *options) { + int ret_value = 0; /*no need to LEAVE() on ERROR: HERR_INIT(int, SUCCEED) */ hid_t fid; + hid_t did; + hid_t sid; unsigned int i; + unsigned int uf; trav_table_t *travt = NULL; /* nothing to do */ if (options->op_tbl->nelems == 0) - return 0; + HGOTO_DONE(0); /*------------------------------------------------------------------------- - * open the file - *------------------------------------------------------------------------- - */ - if ((fid = h5tools_fopen(fname, H5F_ACC_RDONLY, H5P_DEFAULT, NULL, NULL, 0)) < 0) { - printf("<%s>: %s\n", fname, H5FOPENERROR); - return -1; - } + * open the file + *------------------------------------------------------------------------- + */ + if ((fid = h5tools_fopen(fname, H5F_ACC_RDONLY, H5P_DEFAULT, NULL, NULL, 0)) < 0) + HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "h5tools_fopen failed <%s>: %s", fname, H5FOPENERROR); /*------------------------------------------------------------------------- - * get the list of objects in the file - *------------------------------------------------------------------------- - */ + * get the list of objects in the file + *------------------------------------------------------------------------- + */ /* Initialize indexing options */ h5trav_set_index(sort_by, sort_order); @@ -721,15 +719,15 @@ static int check_objects(const char* fname, pack_opt_t *options) { /* get the list of objects in the file */ if (h5trav_gettable(fid, travt) < 0) - goto done; + HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "h5trav_gettable failed"); /*------------------------------------------------------------------------- - * compare with user supplied list - *------------------------------------------------------------------------- - */ + * compare with user supplied list + *------------------------------------------------------------------------- + */ if (options->verbose) - printf("Opening file <%s>. Searching for objects to modify...\n", fname); + printf("Opening file. Searching %d objects to modify ...\n", travt->nobjs); for (i = 0; i < options->op_tbl->nelems; i++) { char* name = options->op_tbl->objs[i].path; @@ -737,73 +735,70 @@ static int check_objects(const char* fname, pack_opt_t *options) { printf(" <%s>", name); /* the input object names are present in the file and are valid */ - if (h5trav_getindext(name, travt) < 0) { - error_msg("%s Could not find <%s> in file <%s>. Exiting...\n", + if (h5trav_getindext(name, travt) < 0) + HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "%s Could not find <%s> in file <%s>. Exiting...\n", (options->verbose ? "\n" : ""), name, fname); - goto done; - } if (options->verbose) printf("...Found\n"); - /* check for extra filter conditions */ - switch (options->op_tbl->objs[i].filter->filtn) { - /* chunk size must be smaller than pixels per block */ - case H5Z_FILTER_SZIP: - { - int j; - hsize_t csize = 1; - unsigned ppb = options->op_tbl->objs[i].filter->cd_values[0]; - hsize_t dims[H5S_MAX_RANK]; - int rank; - hid_t did; - hid_t sid; - - if (options->op_tbl->objs[i].chunk.rank > 0) { - rank = options->op_tbl->objs[i].chunk.rank; - for (j = 0; j < rank; j++) - csize *= options->op_tbl->objs[i].chunk.chunk_lengths[j]; - } - else { - if ((did = H5Dopen2(fid, name, H5P_DEFAULT)) < 0) - goto done; - if ((sid = H5Dget_space(did)) < 0) - goto done; - if ((rank = H5Sget_simple_extent_ndims(sid)) < 0) - goto done; - HDmemset(dims, 0, sizeof dims); - if (H5Sget_simple_extent_dims(sid, dims, NULL) < 0) - goto done; - for (j = 0; j < rank; j++) - csize *= dims[j]; - if (H5Sclose(sid) < 0) - goto done; - if (H5Dclose(did) < 0) - goto done; - } - - if (csize < ppb) { - printf(" \n"); - goto done; + for (uf = 0; uf < options->op_tbl->objs[i].nfilters; uf++) { + if (options->op_tbl->objs[i].filter[uf].filtn < 0) + HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "invalid filter"); + /* check for extra filter conditions */ + switch (options->op_tbl->objs[i].filter[uf].filtn) { + /* chunk size must be smaller than pixels per block */ + case H5Z_FILTER_SZIP: + { + int j; + hsize_t csize = 1; + unsigned ppb = options->op_tbl->objs[i].filter[uf].cd_values[0]; + hsize_t dims[H5S_MAX_RANK]; + int rank; + + if (options->op_tbl->objs[i].chunk.rank > 0) { + rank = options->op_tbl->objs[i].chunk.rank; + for (j = 0; j < rank; j++) + csize *= options->op_tbl->objs[i].chunk.chunk_lengths[j]; + } + else { + if ((did = H5Dopen2(fid, name, H5P_DEFAULT)) < 0) + HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Dopen2 failed"); + if ((sid = H5Dget_space(did)) < 0) + HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Dget_space failed"); + if ((rank = H5Sget_simple_extent_ndims(sid)) < 0) + HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Sget_simple_extent_ndims failed"); + HDmemset(dims, 0, sizeof dims); + if (H5Sget_simple_extent_dims(sid, dims, NULL) < 0) + HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Sget_simple_extent_dims failed"); + for (j = 0; j < rank; j++) + csize *= dims[j]; + if (H5Sclose(sid) < 0) + HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Sclose failed"); + if (H5Dclose(did) < 0) + HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Dclose failed"); + } + + if (csize < ppb) { + printf(" \n"); + HGOTO_DONE(0); + } } + break; + default: + break; } - break; - default: - break; - } - } /* i */ - - /*------------------------------------------------------------------------- - * close - *------------------------------------------------------------------------- - */ - H5Fclose(fid); - trav_table_free(travt); - return 0; + } /* for uf */ + } /* for i */ done: - H5Fclose(fid); - trav_table_free(travt); - return -1; + H5E_BEGIN_TRY { + H5Fclose(fid); + H5Sclose(sid); + H5Dclose(did); + } H5E_END_TRY; + if (travt) + trav_table_free(travt); + return ret_value; } /*------------------------------------------------------------------------- @@ -833,7 +828,9 @@ static int have_request(pack_opt_t *options) { */ static const char* get_sfilter(H5Z_filter_t filtn) { - if (filtn == H5Z_FILTER_NONE) + if (filtn < 0) + return NULL; + else if (filtn == H5Z_FILTER_NONE) return "NONE"; else if (filtn == H5Z_FILTER_DEFLATE) return "GZIP"; diff --git a/tools/src/h5repack/h5repack.h b/tools/src/h5repack/h5repack.h index c8c6a0e..0252768 100644 --- a/tools/src/h5repack/h5repack.h +++ b/tools/src/h5repack/h5repack.h @@ -29,7 +29,7 @@ #define MAX_COMPACT_DSIZE 64512 /* max data size for compact layout. -1k for header size */ /* File space default information */ -#define FS_PAGESIZE_DEF 4096 +#define FS_PAGESIZE_DEF 4096 #define FS_STRATEGY_DEF H5F_FSPACE_STRATEGY_FSM_AGGR #define FS_PERSIST_DEF FALSE #define FS_THRESHOLD_DEF 1 @@ -42,7 +42,7 @@ /* a list of names */ typedef struct { - char obj[MAX_NC_NAME]; + char obj[MAX_NC_NAME]; } obj_list_t; /* @@ -60,16 +60,16 @@ typedef struct { #define CD_VALUES 20 typedef struct { - H5Z_filter_t filtn; /* filter identification number */ - unsigned filt_flag; /* filter definition flag */ - unsigned cd_values[CD_VALUES]; /* filter client data values */ - size_t cd_nelmts; /* filter client number of values */ + H5Z_filter_t filtn; /* filter identification number */ + unsigned filt_flag; /* filter definition flag */ + unsigned cd_values[CD_VALUES]; /* filter client data values */ + size_t cd_nelmts; /* filter client number of values */ } filter_info_t; /* chunk lengths along each dimension and rank */ typedef struct { - hsize_t chunk_lengths[MAX_VAR_DIMS]; - int rank; + hsize_t chunk_lengths[MAX_VAR_DIMS]; + int rank; } chunk_info_t; /* we currently define a maximum value for the filters array, @@ -78,19 +78,19 @@ typedef struct { /* information for one object, contains PATH, CHUNK info and FILTER info */ typedef struct { - char path[MAX_NC_NAME]; /* name of object */ - filter_info_t filter[H5_REPACK_MAX_NFILTERS]; /* filter array */ - int nfilters; /* current number of filters */ - H5D_layout_t layout; /* layout information */ - chunk_info_t chunk; /* chunk information */ - hid_t refobj_id; /* object ID, references */ + char path[MAX_NC_NAME]; /* name of object */ + filter_info_t filter[H5_REPACK_MAX_NFILTERS]; /* filter array */ + int nfilters; /* current number of filters */ + H5D_layout_t layout; /* layout information */ + chunk_info_t chunk; /* chunk information */ + hid_t refobj_id; /* object ID, references */ } pack_info_t; /* store a table of all objects */ typedef struct { - unsigned int size; - unsigned int nelems; - pack_info_t *objs; + unsigned int size; + unsigned int nelems; + pack_info_t *objs; } pack_opttbl_t; @@ -101,30 +101,30 @@ typedef struct { /* all the above, ready to go to the hrepack call */ typedef struct { - pack_opttbl_t *op_tbl; /*table with all -c and -f options */ - int all_layout; /*apply the layout to all objects */ - int all_filter; /*apply the filter to all objects */ - filter_info_t filter_g[H5_REPACK_MAX_NFILTERS]; /*global filter array for the ALL case */ - int n_filter_g; /*number of global filters */ - chunk_info_t chunk_g; /*global chunk INFO for the ALL case */ - H5D_layout_t layout_g; /*global layout information for the ALL case */ - int verbose; /*verbose mode */ - hsize_t min_comp; /*minimum size to compress, in bytes */ - int use_native; /*use a native type in write */ - hbool_t latest; /*pack file with the latest file format */ - int grp_compact; /* Set the maximum number of links to store as header messages in the group */ - int grp_indexed; /* Set the minimum number of links to store in the indexed format */ - int msg_size[8]; /* Minimum size of shared messages: dataspace, - datatype, fill value, filter pipleline, attribute */ - const char *ublock_filename; /* user block file name */ - hsize_t ublock_size; /* user block size */ - hsize_t meta_block_size; /* metadata aggregation block size (for H5Pset_meta_block_size) */ - hsize_t threshold; /* alignment threshold for H5Pset_alignment */ - hsize_t alignment; /* alignment for H5Pset_alignment */ - H5F_fspace_strategy_t fs_strategy; /* File space handling strategy */ - int fs_persist; /* Free space section threshold */ - long fs_threshold; /* Free space section threshold */ - long long fs_pagesize; /* File space page size */ + pack_opttbl_t *op_tbl; /*table with all -c and -f options */ + int all_layout; /*apply the layout to all objects */ + int all_filter; /*apply the filter to all objects */ + filter_info_t filter_g[H5_REPACK_MAX_NFILTERS]; /*global filter array for the ALL case */ + int n_filter_g; /*number of global filters */ + chunk_info_t chunk_g; /*global chunk INFO for the ALL case */ + H5D_layout_t layout_g; /*global layout information for the ALL case */ + int verbose; /*verbose mode */ + hsize_t min_comp; /*minimum size to compress, in bytes */ + int use_native; /*use a native type in write */ + hbool_t latest; /*pack file with the latest file format */ + int grp_compact; /* Set the maximum number of links to store as header messages in the group */ + int grp_indexed; /* Set the minimum number of links to store in the indexed format */ + int msg_size[8]; /* Minimum size of shared messages: dataspace, + datatype, fill value, filter pipleline, attribute */ + const char *ublock_filename; /* user block file name */ + hsize_t ublock_size; /* user block size */ + hsize_t meta_block_size; /* metadata aggregation block size (for H5Pset_meta_block_size) */ + hsize_t threshold; /* alignment threshold for H5Pset_alignment */ + hsize_t alignment; /* alignment for H5Pset_alignment */ + H5F_fspace_strategy_t fs_strategy; /* File space handling strategy */ + int fs_persist; /* Free space section threshold */ + long fs_threshold; /* Free space section threshold */ + long long fs_pagesize; /* File space page size */ } pack_opt_t; @@ -214,18 +214,18 @@ int apply_filters(const char* name, /* object name from traverse list */ * options table *------------------------------------------------------------------------- */ -int options_table_init( pack_opttbl_t **tbl ); -int options_table_free( pack_opttbl_t *table ); -int options_add_layout( obj_list_t *obj_list, - unsigned n_objs, - pack_info_t *pack, - pack_opttbl_t *table ); -int options_add_filter ( obj_list_t *obj_list, - unsigned n_objs, - filter_info_t filt, - pack_opttbl_t *table ); -pack_info_t* options_get_object( const char *path, - pack_opttbl_t *table); +int options_table_init(pack_opttbl_t **tbl); +int options_table_free(pack_opttbl_t *table); +int options_add_layout(obj_list_t *obj_list, + unsigned n_objs, + pack_info_t *pack, + pack_opttbl_t *table); +int options_add_filter(obj_list_t *obj_list, + unsigned n_objs, + filter_info_t filt, + pack_opttbl_t *table); +pack_info_t* options_get_object(const char *path, + pack_opttbl_t *table); /*------------------------------------------------------------------------- * parse functions diff --git a/tools/src/h5repack/h5repack_copy.c b/tools/src/h5repack/h5repack_copy.c index 9df7917..080defa 100644 --- a/tools/src/h5repack/h5repack_copy.c +++ b/tools/src/h5repack/h5repack_copy.c @@ -109,9 +109,8 @@ int copy_objects(const char* fnamein, const char* fnameout, pack_opt_t *options) * open input file *------------------------------------------------------------------------- */ - if ((fidin = h5tools_fopen(fnamein, H5F_ACC_RDONLY, H5P_DEFAULT, NULL, NULL, (size_t) 0)) < 0) { + if ((fidin = h5tools_fopen(fnamein, H5F_ACC_RDONLY, H5P_DEFAULT, NULL, NULL, (size_t) 0)) < 0) HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "h5tools_fopen failed <%s>: %s", fnamein, H5FOPENERROR); - } /* get user block size and file space strategy/persist/threshold */ { @@ -119,23 +118,20 @@ int copy_objects(const char* fnamein, const char* fnameout, pack_opt_t *options) hid_t grp_in = -1; /* group ID */ hid_t gcpl_in = -1; /* group creation property list */ - if ((fcpl_in = H5Fget_create_plist(fidin)) < 0) { + if ((fcpl_in = H5Fget_create_plist(fidin)) < 0) HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Fget_create_plist failed to retrieve file creation property list"); - } - if (H5Pget_userblock(fcpl_in, &ub_size) < 0) { + if (H5Pget_userblock(fcpl_in, &ub_size) < 0) HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Pget_userblock failed to retrieve userblock size"); - } /* If the -S option is not set, get "strategy" from the input file */ - if(H5Pget_file_space_strategy(fcpl_in, &in_strategy, &in_persist, &in_threshold) < 0) { + if(H5Pget_file_space_strategy(fcpl_in, &in_strategy, &in_persist, &in_threshold) < 0) HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Pget_file_space_strategy failed to retrieve file space strategy"); - } /* If the -G option is not set, get "pagesize" from the input file */ - if(H5Pget_file_space_page_size(fcpl_in, &in_pagesize) < 0) { + if(H5Pget_file_space_page_size(fcpl_in, &in_pagesize) < 0) HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Pget_file_space_page_size failed to retrieve file space threshold"); - } + /* open root group */ if ((grp_in = H5Gopen2(fidin, "/", H5P_DEFAULT)) < 0) HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Gopen2 failed"); @@ -148,23 +144,19 @@ int copy_objects(const char* fnamein, const char* fnameout, pack_opt_t *options) if (H5Pget_link_creation_order(gcpl_in, &crt_order_flags) < 0) HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Pget_link_creation_order failed"); - if (H5Pclose(fcpl_in) < 0) { + if (H5Pclose(fcpl_in) < 0) HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Pclose failed to close property list"); - } } /* Check if we need to create a non-default file creation property list */ if (options->latest || ub_size > 0) { /* Create file creation property list */ - if ((fcpl = H5Pcreate(H5P_FILE_CREATE)) < 0) { + if ((fcpl = H5Pcreate(H5P_FILE_CREATE)) < 0) HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Pcreate failed to create a file creation property list"); - } - if (ub_size > 0) { - if (H5Pset_userblock(fcpl, ub_size) < 0) { + if (ub_size > 0) + if (H5Pset_userblock(fcpl, ub_size) < 0) HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Pset_userblock failed to set non-default userblock size"); - } - } if (options->latest) { unsigned i = 0, nindex = 0, mesg_type_flags[5], min_mesg_sizes[5]; @@ -172,9 +164,8 @@ int copy_objects(const char* fnamein, const char* fnameout, pack_opt_t *options) /* Adjust group creation parameters for root group */ /* (So that it is created in "dense storage" form) */ if (H5Pset_link_phase_change(fcpl, (unsigned) options->grp_compact, - (unsigned) options->grp_indexed) < 0) { + (unsigned) options->grp_indexed) < 0) HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Pset_link_phase_change failed to adjust group creation parameters for root group"); - } for (i = 0; i < 5; i++) { if (options->msg_size[i] > 0) { @@ -209,26 +200,21 @@ int copy_objects(const char* fnamein, const char* fnameout, pack_opt_t *options) } /* end for */ if (nindex > 0) { - if (H5Pset_shared_mesg_nindexes(fcpl, nindex) < 0) { + if (H5Pset_shared_mesg_nindexes(fcpl, nindex) < 0) HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Pset_shared_mesg_nindexes failed to set the number of shared object header message indexes"); - } /* msg_size[0]=dataspace, 1=datatype, 2=file value, 3=filter pipleline, 4=attribute */ - for (i = 0; i < (nindex - 1); i++) { - if (H5Pset_shared_mesg_index(fcpl, i, mesg_type_flags[i], min_mesg_sizes[i]) < 0) { + for (i = 0; i < (nindex - 1); i++) + if (H5Pset_shared_mesg_index(fcpl, i, mesg_type_flags[i], min_mesg_sizes[i]) < 0) HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Pset_shared_mesg_index failed to configure the specified shared object header message index"); - } /* end if */ - } /* end for */ } /* if (nindex>0) */ /* Create file access property list */ - if ((fapl = H5Pcreate(H5P_FILE_ACCESS)) < 0) { + if ((fapl = H5Pcreate(H5P_FILE_ACCESS)) < 0) HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Pcreate failed to create file access property list"); - } /* end if */ - if (H5Pset_libver_bounds(fapl, H5F_LIBVER_LATEST, H5F_LIBVER_LATEST) < 0) { + if (H5Pset_libver_bounds(fapl, H5F_LIBVER_LATEST, H5F_LIBVER_LATEST) < 0) HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Pset_libver_bounds failed to set property for using latest version of the format"); - } /* end if */ } /* end if */ } /* end if */ #if defined (H5REPACK_DEBUG_USER_BLOCK) @@ -241,17 +227,14 @@ print_user_block(fnamein, fidin); */ if (options->ublock_size > 0) { /* either use the FCPL already created or create a new one */ - if (fcpl == H5P_DEFAULT) { + if (fcpl == H5P_DEFAULT) /* create a file creation property list */ - if ((fcpl = H5Pcreate(H5P_FILE_CREATE)) < 0) { + if ((fcpl = H5Pcreate(H5P_FILE_CREATE)) < 0) HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Pcreate failed to create a file creation property list"); - } - } /* set user block size */ - if (H5Pset_userblock(fcpl, options->ublock_size) < 0) { + if (H5Pset_userblock(fcpl, options->ublock_size) < 0) HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Pset_userblock failed to set userblock size"); - } } /*------------------------------------------------------------------------- @@ -260,16 +243,13 @@ print_user_block(fnamein, fidin); */ if (options->alignment > 0) { /* either use the FAPL already created or create a new one */ - if (fapl == H5P_DEFAULT) { + if (fapl == H5P_DEFAULT) /* create a file access property list */ - if ((fapl = H5Pcreate(H5P_FILE_ACCESS)) < 0) { + if ((fapl = H5Pcreate(H5P_FILE_ACCESS)) < 0) HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Pcreate failed to create file access property list"); - } - } - if (H5Pset_alignment(fapl, options->threshold, options->alignment) < 0) { + if (H5Pset_alignment(fapl, options->threshold, options->alignment) < 0) HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Pset_alignment failed to set alignment"); - } } /*------------------------------------------------------------------------- @@ -278,16 +258,13 @@ print_user_block(fnamein, fidin); */ if (options->meta_block_size > 0) { /* either use the FAPL already created or create a new one */ - if (fapl == H5P_DEFAULT) { + if (fapl == H5P_DEFAULT) /* create a file access property list */ - if ((fapl = H5Pcreate(H5P_FILE_ACCESS)) < 0) { + if ((fapl = H5Pcreate(H5P_FILE_ACCESS)) < 0) HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Pcreate failed to create file access property list"); - } - } - if (H5Pset_meta_block_size(fapl, options->meta_block_size) < 0) { + if (H5Pset_meta_block_size(fapl, options->meta_block_size) < 0) HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Pset_meta_block_size failed to set metadata block size"); - } } /*------------------------------------------------------------------------- @@ -296,12 +273,10 @@ print_user_block(fnamein, fidin); */ /* either use the FCPL already created or create a new one */ - if (fcpl == H5P_DEFAULT) { + if (fcpl == H5P_DEFAULT) /* create a file creation property list */ - if ((fcpl = H5Pcreate(H5P_FILE_CREATE)) < 0) { + if ((fcpl = H5Pcreate(H5P_FILE_CREATE)) < 0) HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Pcreate failed to create a file creation property list"); - } - } if(H5Pset_link_creation_order(fcpl, crt_order_flags ) < 0) HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Pset_link_creation_order failed"); @@ -328,9 +303,8 @@ print_user_block(fnamein, fidin); set_threshold = (hsize_t)options->fs_threshold; /* Set file space information as specified */ - if(H5Pset_file_space_strategy(fcpl, set_strategy, set_persist, set_threshold) < 0) { + if(H5Pset_file_space_strategy(fcpl, set_strategy, set_persist, set_threshold) < 0) HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Pset_file_space_strategy failed to set file space strategy"); - } if(options->fs_pagesize == -1) /* A "0" file space page size is specified by user */ set_pagesize = (hsize_t)0; @@ -338,30 +312,26 @@ print_user_block(fnamein, fidin); set_pagesize = (hsize_t)options->fs_pagesize; if(set_pagesize != FS_PAGESIZE_DEF) /* Set non-default file space page size as specified */ - if(H5Pset_file_space_page_size(fcpl, set_pagesize) < 0) { + if(H5Pset_file_space_page_size(fcpl, set_pagesize) < 0) HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Pset_file_space_page_size failed to set file space page size"); - } /*------------------------------------------------------------------------- * create the output file *------------------------------------------------------------------------- */ if (options->verbose) - printf("Making file <%s>...\n", fnameout); + printf("Making new file ...\n"); - if ((fidout = H5Fcreate(fnameout, H5F_ACC_TRUNC, fcpl, fapl)) < 0) { + if ((fidout = H5Fcreate(fnameout, H5F_ACC_TRUNC, fcpl, fapl)) < 0) HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Fcreate could not create file <%s>:", fnameout); - } /*------------------------------------------------------------------------- * write a new user block if requested *------------------------------------------------------------------------- */ - if (options->ublock_size > 0) { - if (copy_user_block(options->ublock_filename, fnameout, options->ublock_size) < 0) { + if (options->ublock_size > 0) + if (copy_user_block(options->ublock_filename, fnameout, options->ublock_size) < 0) HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "Could not copy user block. Exiting..."); - } - } /*------------------------------------------------------------------------- * get list of objects @@ -381,18 +351,16 @@ print_user_block(fnamein, fidin); * do the copy *------------------------------------------------------------------------- */ - if (do_copy_objects(fidin, fidout, travt, options) < 0) { + if (do_copy_objects(fidin, fidout, travt, options) < 0) HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "do_copy_objects from <%s> could not copy data to <%s>", fnamein, fnameout); - } /* end if */ /*------------------------------------------------------------------------- * do the copy of referenced objects * and create hard links *------------------------------------------------------------------------- */ - if (do_copy_refobjs(fidin, fidout, travt, options) < 0) { + if (do_copy_refobjs(fidin, fidout, travt, options) < 0) HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "do_copy_refobjs from <%s> could not copy data to <%s>", fnamein, fnameout); - } /*------------------------------------------------------------------------- * close @@ -417,11 +385,9 @@ print_user_block(fnamein, fidin); *------------------------------------------------------------------------- */ - if (ub_size > 0 && options->ublock_size == 0) { - if (copy_user_block(fnamein, fnameout, ub_size) < 0) { + if (ub_size > 0 && options->ublock_size == 0) + if (copy_user_block(fnamein, fnameout, ub_size) < 0) HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "Could not copy user block. Exiting..."); - } - } return 0; @@ -732,13 +698,14 @@ int do_copy_objects(hid_t fidin, hid_t fidout, trav_table_t *travt, unsigned crt_order_flags; /* group creation order flag */ unsigned i; unsigned u; + unsigned uf; int is_ref = 0; htri_t is_named; hbool_t limit_maxdims; hsize_t size_dset; /*------------------------------------------------------------------------- - * copy the suppplied object list + * copy the supplied object list *------------------------------------------------------------------------- */ @@ -748,12 +715,13 @@ int do_copy_objects(hid_t fidin, hid_t fidout, trav_table_t *travt, printf("-----------------------------------------\n"); } - for (i = 0; i < travt->nobjs; i++) { - /* init variables per obj */ - buf = NULL; - limit_maxdims = FALSE; + if (travt->objs) { + for (i = 0; i < travt->nobjs; i++) { + /* init variables per obj */ + buf = NULL; + limit_maxdims = FALSE; - switch (travt->objs[i].type) { + switch (travt->objs[i].type) { case H5TRAV_TYPE_UNKNOWN: break; @@ -833,10 +801,15 @@ int do_copy_objects(hid_t fidin, hid_t fidout, trav_table_t *travt, req_filter = 1; /* check if filters were requested for individual objects */ - for (u = 0; u < options->op_tbl->nelems; u++) - if (HDstrcmp(travt->objs[i].name, options->op_tbl->objs[u].path) == 0) - if (options->op_tbl->objs[u].filter->filtn > 0) - req_filter = 1; + if (options->op_tbl->objs) { + for (u = 0; u < options->op_tbl->nelems; u++) { + if (HDstrcmp(travt->objs[i].name, options->op_tbl->objs[u].path) == 0) + for (uf = 0; uf < options->op_tbl->objs[uf].nfilters; uf++) { + if (options->op_tbl->objs[u].filter[uf].filtn > 0) + req_filter = 1; + } + } + } /* check if layout change requested individual object */ if (options->layout_g != H5D_LAYOUT_ERROR) { @@ -1012,9 +985,10 @@ int do_copy_objects(hid_t fidin, hid_t fidout, trav_table_t *travt, buf = HDmalloc(need); if (buf != NULL) { - /* read/write: use the macro to check error, e.g. memory allocation error inside the library. */ - CHECK_H5DRW_ERROR(H5Dread, FAIL, dset_in, wtype_id, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf); - CHECK_H5DRW_ERROR(H5Dwrite, FAIL, dset_out, wtype_id, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf); + if(H5Dread(dset_in, wtype_id, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf) < 0) + HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Dread failed"); + if(H5Dwrite(dset_out, wtype_id, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf) < 0) + HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Dread failed"); /* Check if we have VL data in the dataset's * datatype that must be reclaimed */ @@ -1097,9 +1071,10 @@ int do_copy_objects(hid_t fidin, hid_t fidout, trav_table_t *travt, hs_select_nelmts = 1; } /* rank */ - /* read/write: use the macro to check error, e.g. memory allocation error inside the library. */ - CHECK_H5DRW_ERROR(H5Dread, FAIL, dset_in, wtype_id, hslab_space, f_space_id, H5P_DEFAULT, hslab_buf); - CHECK_H5DRW_ERROR(H5Dwrite, FAIL, dset_out, wtype_id, hslab_space, f_space_id, H5P_DEFAULT, hslab_buf); + if(H5Dread(dset_in, wtype_id, hslab_space, f_space_id, H5P_DEFAULT, hslab_buf) < 0) + HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Dread failed"); + if(H5Dwrite(dset_out, wtype_id, hslab_space, f_space_id, H5P_DEFAULT, hslab_buf) < 0) + HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Dread failed"); /* reclaim any VL memory, if necessary */ if (vl_data) @@ -1293,19 +1268,9 @@ int do_copy_objects(hid_t fidin, hid_t fidout, trav_table_t *travt, default: HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "Object type not found"); - } /* switch */ - - /* free */ - if (buf != NULL) { - HDfree(buf); - buf = NULL; - } - } /* i */ - - /* Finalize (link) the stack of named datatypes (if any) */ - named_datatype_free(&named_dt_head, 0); - - return ret_value; + } /* switch */ + } /* end for */ + } /* end if */ done: H5E_BEGIN_TRY @@ -1322,8 +1287,7 @@ done: H5Tclose(wtype_id); H5Tclose(type_in); H5Tclose(type_out); - named_datatype_free(&named_dt_head, 1); - }H5E_END_TRY; + } H5E_END_TRY; /* free */ if (buf != NULL) @@ -1331,6 +1295,14 @@ done: if (hslab_buf != NULL) HDfree(hslab_buf); + /* Finalize (link) the stack of named datatypes (if any) */ + if (0 == ret_value && named_dt_head != NULL) + named_datatype_free(&named_dt_head, 0); + else + H5E_BEGIN_TRY { + named_datatype_free(&named_dt_head, 1); + } H5E_END_TRY; + return ret_value; } @@ -1364,8 +1336,11 @@ static void print_dataset_info(hid_t dcpl_id, char *objname, double ratio, int p for (i = 0; i < nfilters; i++) { cd_nelmts = NELMTS(cd_values); - filtn = H5Pget_filter2(dcpl_id, (unsigned) i, &filt_flags, &cd_nelmts, - cd_values, sizeof(f_objname), f_objname, NULL); + if ((filtn = H5Pget_filter2(dcpl_id, (unsigned) i, &filt_flags, &cd_nelmts, + cd_values, sizeof(f_objname), f_objname, NULL)) < 0) { + HDstrcat(strfilter, "ERROR "); + continue; + } switch (filtn) { case H5Z_FILTER_NONE: @@ -1551,7 +1526,7 @@ void print_user_block(const char *filename, hid_t fid) } /* open file */ - if((fh = HDopen(filename, O_RDONLY, 0)) < 0) { + if((fh = HDopen(filename, O_RDONLY)) < 0) { HGOTO_ERROR(H5E_tools_g, H5E_tools_min_id_g, "HDopen failed to open file <%s>", filename); } diff --git a/tools/src/h5repack/h5repack_filters.c b/tools/src/h5repack/h5repack_filters.c index a74e5f3..e968b3c 100644 --- a/tools/src/h5repack/h5repack_filters.c +++ b/tools/src/h5repack/h5repack_filters.c @@ -25,23 +25,71 @@ #define MIN(a,b) (((a)<(b)) ? (a) : (b)) /*------------------------------------------------------------------------- + * Function: aux_copy_obj + * + * Purpose: copy the object filters for object copy + * + * Return: 0 success, -1 failure + *------------------------------------------------------------------------- + */ +static int aux_copy_obj(hid_t dcpl_id, /* dataset creation property list */ + const char* name, /* object name from traverse list */ + pack_info_t *objout /*OUT*/) /* info about object to filter */ +{ + int ret_value = 0; /*no need to LEAVE() on ERROR: HERR_INIT(int, SUCCEED) */ + int nfilters; /* number of filters in DCPL */ + char f_objname[256]; /* filter objname */ + H5D_layout_t layout; + int rank; /* rank of dataset */ + hsize_t chsize[64]; /* chunk size in elements */ + unsigned int i, j; + + /* get information about input filters */ + if ((nfilters = H5Pget_nfilters(dcpl_id)) < 0) + HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Pget_nfilters failed"); + /* copy filter_info_t structure */ + for (i = 0; i < nfilters; i++) { + if ((objout->filter[i].filtn = H5Pget_filter2(dcpl_id, (unsigned) i, &objout->filter[i].filt_flag, &objout->filter[i].cd_nelmts, + objout->filter[i].cd_values, sizeof(f_objname), f_objname, NULL)) < 0) + HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Pget_filter2 failed"); + } + + objout->nfilters = nfilters; + HDstrcpy(objout->path, name); + + if ((layout = H5Pget_layout(dcpl_id)) < 0) + HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Pget_layout failed"); + objout->layout = layout; + + if (layout == H5D_CHUNKED) { + if ((rank = H5Pget_chunk(dcpl_id, NELMTS(chsize), chsize/*out*/)) < 0) + HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Pget_chunk failed"); + objout->chunk.rank = rank; + for (i = 0; i < rank; i++) + objout->chunk.chunk_lengths[i] = chsize[i]; + } + +done: + return ret_value; +} + +/*------------------------------------------------------------------------- * Function: aux_find_obj * * Purpose: find the object name NAME (got from the traverse list) * in the repack options list - * *------------------------------------------------------------------------- */ static int aux_find_obj(const char* name, /* object name from traverse list */ - pack_opt_t *options, /* repack options */ - pack_info_t *obj /*OUT*/) /* info about object to filter */ + pack_opt_t *options, /* repack options */ + pack_info_t *obj /*OUT*/) /* info about object to filter */ { char *pdest; int result; unsigned int i; for (i = 0; i < options->op_tbl->nelems; i++) { - if (HDstrcmp(options->op_tbl->objs[i].path,name) == 0) { + if (HDstrcmp(options->op_tbl->objs[i].path, name) == 0) { *obj = options->op_tbl->objs[i]; return (int) i; } @@ -66,14 +114,12 @@ static int aux_find_obj(const char* name, /* object name from traverse list */ * in the repack options list; assign the filter information OBJ * * Return: 0 not found, 1 found - * *------------------------------------------------------------------------- */ static int aux_assign_obj(const char* name, /* object name from traverse list */ - pack_opt_t *options, /* repack options */ - pack_info_t *obj /*OUT*/) /* info about object to filter */ + pack_opt_t *options, /* repack options */ + pack_info_t *obj /*OUT*/) /* info about object to filter */ { - int idx, i; pack_info_t tmp; @@ -83,7 +129,6 @@ static int aux_assign_obj(const char* name, /* object name from traverse list */ /* name was on input */ if (idx >= 0) { - /* applying to all objects */ if (options->all_layout) { /* assign the global layout info to the OBJ info */ @@ -92,8 +137,7 @@ static int aux_assign_obj(const char* name, /* object name from traverse list */ case H5D_CHUNKED: tmp.chunk.rank = options->chunk_g.rank; for (i = 0; i < tmp.chunk.rank; i++) - tmp.chunk.chunk_lengths[i] = - options->chunk_g.chunk_lengths[i]; + tmp.chunk.chunk_lengths[i] = options->chunk_g.chunk_lengths[i]; break; case H5D_LAYOUT_ERROR: case H5D_COMPACT: @@ -111,8 +155,7 @@ static int aux_assign_obj(const char* name, /* object name from traverse list */ case H5D_CHUNKED: tmp.chunk.rank = options->op_tbl->objs[idx].chunk.rank; for (i = 0; i < tmp.chunk.rank; i++) - tmp.chunk.chunk_lengths[i] = - options->op_tbl->objs[idx].chunk.chunk_lengths[i]; + tmp.chunk.chunk_lengths[i] = options->op_tbl->objs[idx].chunk.chunk_lengths[i]; break; case H5D_LAYOUT_ERROR: case H5D_COMPACT: @@ -123,7 +166,6 @@ static int aux_assign_obj(const char* name, /* object name from traverse list */ default: break; }/*switch*/ - } /* applying to all objects */ @@ -183,28 +225,24 @@ static int aux_assign_obj(const char* name, /* object name from traverse list */ * of H5Z_FILTER_NONE present in the PACK_INFO_T filter array * * Return: 0 success, -1 an error occured - * - * Programmer: Pedro Vicente, pvn@ncsa.uiuc.edu - * - * Date: December 19, 2003 - * *------------------------------------------------------------------------- */ int apply_filters(const char* name, /* object name from traverse list */ - int rank, /* rank of dataset */ - hsize_t *dims, /* dimensions of dataset */ - size_t msize, /* size of type */ - hid_t dcpl_id, /* dataset creation property list */ - pack_opt_t *options, /* repack options */ - int *has_filter) /* (OUT) object NAME has a filter */ + int rank, /* rank of dataset */ + hsize_t *dims, /* dimensions of dataset */ + size_t msize, /* size of type */ + hid_t dcpl_id, /* dataset creation property list */ + pack_opt_t *options, /* repack options */ + int *has_filter) /* (OUT) object NAME has a filter */ { int ret_value = 0; /*no need to LEAVE() on ERROR: HERR_INIT(int, SUCCEED) */ - int nfilters; /* number of filters in DCPL */ - hsize_t chsize[64]; /* chunk size in elements */ + int nfilters; /* number of filters in DCPL */ + hsize_t chsize[64]; /* chunk size in elements */ H5D_layout_t layout; - int i; + int i, j; pack_info_t obj; + pack_info_t filtobj; *has_filter = 0; @@ -212,15 +250,16 @@ int apply_filters(const char* name, /* object name from traverse list */ HGOTO_DONE(0); /*------------------------------------------------------------------------- - * initialize the assigment object - *------------------------------------------------------------------------- - */ + * initialize the assigment object + *------------------------------------------------------------------------- + */ init_packobject(&obj); + init_packobject(&filtobj); /*------------------------------------------------------------------------- - * find options - *------------------------------------------------------------------------- - */ + * find options + *------------------------------------------------------------------------- + */ if (aux_assign_obj(name, options, &obj) == 0) HGOTO_DONE(0); @@ -228,55 +267,61 @@ int apply_filters(const char* name, /* object name from traverse list */ if ((nfilters = H5Pget_nfilters(dcpl_id)) < 0) HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Pget_nfilters failed"); + /*------------------------------------------------------------------------- - * check if we have filters in the pipeline - * we want to replace them with the input filters - * only remove if we are inserting new ones - *------------------------------------------------------------------------- - */ + * check if we have filters in the pipeline + * we want to replace them with the input filters + * only remove if we are inserting new ones + *------------------------------------------------------------------------- + */ if (nfilters && obj.nfilters) { *has_filter = 1; if (H5Premove_filter(dcpl_id, H5Z_FILTER_ALL) < 0) HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Premove_filter failed"); - } - /*------------------------------------------------------------------------- - * check if there is an existent chunk - * read it only if there is not a requested layout - *------------------------------------------------------------------------- - */ - if (obj.layout == -1) { - if ((layout = H5Pget_layout(dcpl_id)) < 0) - HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Pget_layout failed"); - - if (layout == H5D_CHUNKED) { - if ((rank = H5Pget_chunk(dcpl_id, NELMTS(chsize), chsize/*out*/)) < 0) - HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Pget_chunk failed"); - obj.layout = H5D_CHUNKED; - obj.chunk.rank = rank; - for (i = 0; i < rank; i++) - obj.chunk.chunk_lengths[i] = chsize[i]; + /*------------------------------------------------------------------------- + * check if there is an existent chunk + * read it only if there is not a requested layout + *------------------------------------------------------------------------- + */ + if (obj.layout == -1) { + if ((layout = H5Pget_layout(dcpl_id)) < 0) + HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Pget_layout failed"); + + if (layout == H5D_CHUNKED) { + if ((rank = H5Pget_chunk(dcpl_id, NELMTS(chsize), chsize/*out*/)) < 0) + HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Pget_chunk failed"); + obj.layout = H5D_CHUNKED; + obj.chunk.rank = rank; + for (i = 0; i < rank; i++) + obj.chunk.chunk_lengths[i] = chsize[i]; + } } } + else if(nfilters) { + *has_filter = 1; + if (aux_copy_obj(dcpl_id, name, &filtobj) < 0) + HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "aux_copy_obj failed"); + } /*------------------------------------------------------------------------- - * the type of filter and additional parameter - * type can be one of the filters - * H5Z_FILTER_NONE 0 , uncompress if compressed - * H5Z_FILTER_DEFLATE 1 , deflation like gzip - * H5Z_FILTER_SHUFFLE 2 , shuffle the data - * H5Z_FILTER_FLETCHER32 3 , fletcher32 checksum of EDC - * H5Z_FILTER_SZIP 4 , szip compression - * H5Z_FILTER_NBIT 5 , nbit compression - * H5Z_FILTER_SCALEOFFSET 6 , scaleoffset compression - *------------------------------------------------------------------------- - */ + * the type of filter and additional parameter + * type can be one of the filters + * H5Z_FILTER_NONE 0 , uncompress if compressed + * H5Z_FILTER_DEFLATE 1 , deflation like gzip + * H5Z_FILTER_SHUFFLE 2 , shuffle the data + * H5Z_FILTER_FLETCHER32 3 , fletcher32 checksum of EDC + * H5Z_FILTER_SZIP 4 , szip compression + * H5Z_FILTER_NBIT 5 , nbit compression + * H5Z_FILTER_SCALEOFFSET 6 , scaleoffset compression + *------------------------------------------------------------------------- + */ if (obj.nfilters) { /*------------------------------------------------------------------------- - * filters require CHUNK layout; if we do not have one define a default - *------------------------------------------------------------------------- - */ + * filters require CHUNK layout; if we do not have one define a default + *------------------------------------------------------------------------- + */ if (obj.layout == -1) { /* stripmine info */ hsize_t sm_size[H5S_MAX_RANK]; /*stripmine size */ @@ -285,9 +330,9 @@ int apply_filters(const char* name, /* object name from traverse list */ obj.chunk.rank = rank; /* - * determine the strip mine size. The strip mine is - * a hyperslab whose size is manageable. - */ + * determine the strip mine size. The strip mine is + * a hyperslab whose size is manageable. + */ sm_nbytes = msize; for (i = rank; i > 0; --i) { @@ -305,18 +350,21 @@ int apply_filters(const char* name, /* object name from traverse list */ } for (i = 0; i < obj.nfilters; i++) { + if (obj.filter[i].filtn < 0) + HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "invalid filter"); + switch (obj.filter[i].filtn) { /*------------------------------------------------------------------------- - * H5Z_FILTER_NONE 0 , uncompress if compressed - *------------------------------------------------------------------------- - */ + * H5Z_FILTER_NONE 0 , uncompress if compressed + *------------------------------------------------------------------------- + */ case H5Z_FILTER_NONE: break; - /*------------------------------------------------------------------------- - * H5Z_FILTER_DEFLATE 1 , deflation like gzip - *------------------------------------------------------------------------- - */ + /*------------------------------------------------------------------------- + * H5Z_FILTER_DEFLATE 1 , deflation like gzip + *------------------------------------------------------------------------- + */ case H5Z_FILTER_DEFLATE: { unsigned aggression; /* the deflate level */ @@ -330,10 +378,10 @@ int apply_filters(const char* name, /* object name from traverse list */ } break; - /*------------------------------------------------------------------------- - * H5Z_FILTER_SZIP 4 , szip compression - *------------------------------------------------------------------------- - */ + /*------------------------------------------------------------------------- + * H5Z_FILTER_SZIP 4 , szip compression + *------------------------------------------------------------------------- + */ case H5Z_FILTER_SZIP: { unsigned options_mask; @@ -350,10 +398,10 @@ int apply_filters(const char* name, /* object name from traverse list */ } break; - /*------------------------------------------------------------------------- - * H5Z_FILTER_SHUFFLE 2 , shuffle the data - *------------------------------------------------------------------------- - */ + /*------------------------------------------------------------------------- + * H5Z_FILTER_SHUFFLE 2 , shuffle the data + *------------------------------------------------------------------------- + */ case H5Z_FILTER_SHUFFLE: if (H5Pset_chunk(dcpl_id, obj.chunk.rank, obj.chunk.chunk_lengths) < 0) HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Pset_chunk failed"); @@ -361,31 +409,30 @@ int apply_filters(const char* name, /* object name from traverse list */ HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Pset_shuffle failed"); break; - /*------------------------------------------------------------------------- - * H5Z_FILTER_FLETCHER32 3 , fletcher32 checksum of EDC - *------------------------------------------------------------------------- - */ + /*------------------------------------------------------------------------- + * H5Z_FILTER_FLETCHER32 3 , fletcher32 checksum of EDC + *------------------------------------------------------------------------- + */ case H5Z_FILTER_FLETCHER32: if (H5Pset_chunk(dcpl_id, obj.chunk.rank, obj.chunk.chunk_lengths) < 0) HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Pset_chunk failed"); if (H5Pset_fletcher32(dcpl_id) < 0) HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Pset_fletcher32 failed"); break; - /*----------- ------------------------------------------------------------- - * H5Z_FILTER_NBIT , NBIT compression - *------------------------------------------------------------------------- - */ + /*----------- ------------------------------------------------------------- + * H5Z_FILTER_NBIT , NBIT compression + *------------------------------------------------------------------------- + */ case H5Z_FILTER_NBIT: if (H5Pset_chunk(dcpl_id, obj.chunk.rank, obj.chunk.chunk_lengths) < 0) HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Pset_chunk failed"); if (H5Pset_nbit(dcpl_id) < 0) HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Pset_nbit failed"); break; - /*----------- ------------------------------------------------------------- - * H5Z_FILTER_SCALEOFFSET , scale+offset compression - *------------------------------------------------------------------------- - */ - + /*----------- ------------------------------------------------------------- + * H5Z_FILTER_SCALEOFFSET , scale+offset compression + *------------------------------------------------------------------------- + */ case H5Z_FILTER_SCALEOFFSET: { H5Z_SO_scale_type_t scale_type; @@ -402,12 +449,12 @@ int apply_filters(const char* name, /* object name from traverse list */ break; default: { + if (H5Pset_chunk(dcpl_id, obj.chunk.rank, obj.chunk.chunk_lengths) < 0) + HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Pset_chunk failed"); if (H5Pset_filter(dcpl_id, obj.filter[i].filtn, obj.filter[i].filt_flag, obj.filter[i].cd_nelmts, obj.filter[i].cd_values) < 0) HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Pset_filter failed"); - if (H5Pset_chunk(dcpl_id, obj.chunk.rank, obj.chunk.chunk_lengths) < 0) - HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Pset_chunk failed"); } break; } /* switch */ @@ -415,10 +462,20 @@ int apply_filters(const char* name, /* object name from traverse list */ } /*obj.nfilters*/ + if (filtobj.nfilters) { + for (i = 0; i < filtobj.nfilters; i++) { + if (filtobj.filter[i].filtn < 0) + HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "invalid filter"); + + if (H5Zfilter_avail(filtobj.filter[i].filtn) <= 0) + HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "%d filter unavailable", filtobj.filter[i].filtn); + } /* for */ + } /* nfilters */ + /*------------------------------------------------------------------------- - * layout - *------------------------------------------------------------------------- - */ + * layout + *------------------------------------------------------------------------- + */ if (obj.layout >= 0) { /* a layout was defined */ @@ -438,7 +495,6 @@ int apply_filters(const char* name, /* object name from traverse list */ if (H5Premove_filter(dcpl_id, H5Z_FILTER_ALL) < 0) HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Premove_filter failed"); } - } done: diff --git a/tools/src/h5repack/h5repack_main.c b/tools/src/h5repack/h5repack_main.c index 3860451..d34c394 100644 --- a/tools/src/h5repack/h5repack_main.c +++ b/tools/src/h5repack/h5repack_main.c @@ -428,13 +428,13 @@ int parse_command_line(int argc, const char **argv, pack_opt_t* options) while ((opt = get_option(argc, argv, s_opts, l_opts)) != EOF) { switch ((char) opt) { - /* -i for backward compability */ + /* -i for backward compatibility */ case 'i': infile = opt_arg; has_i_o = 1; break; - /* -o for backward compability */ + /* -o for backward compatibility */ case 'o': outfile = opt_arg; has_i_o = 1; @@ -695,8 +695,10 @@ int main(int argc, const char **argv) } /* initialize options */ - h5repack_init(&options, 0, FALSE); - + if (h5repack_init(&options, 0, FALSE) < 0) { + h5tools_setstatus(EXIT_FAILURE); + goto done; + } /* Initialize default indexing options */ sort_by = H5_INDEX_CRT_ORDER; diff --git a/tools/src/h5repack/h5repack_opttable.c b/tools/src/h5repack/h5repack_opttable.c index 6c409ec..7ab8c6e 100644 --- a/tools/src/h5repack/h5repack_opttable.c +++ b/tools/src/h5repack/h5repack_opttable.c @@ -30,6 +30,7 @@ void init_packobject(pack_info_t *obj) { HDstrcpy(obj->path, "\0"); for (j = 0; j < H5_REPACK_MAX_NFILTERS; j++) { obj->filter[j].filtn = -1; + obj->filter[j].cd_nelmts = CD_VALUES; for (k = 0; k < CD_VALUES; k++) obj->filter[j].cd_values[k] = 0; } @@ -261,7 +262,7 @@ options_add_filter(obj_list_t *obj_list, unsigned n_objs, filter_info_t filt, pa /* search if this object is already in the table; "path" is the key */ if (table->nelems > 0) { - /* go tru the supplied list of names */ + /* go through the supplied list of names */ for (j = 0; j < n_objs; j++) { /* linear table search */ for (i = 0; i < table->nelems; i++) { diff --git a/tools/src/h5repack/h5repack_parse.c b/tools/src/h5repack/h5repack_parse.c index 4d62723..05af197 100644 --- a/tools/src/h5repack/h5repack_parse.c +++ b/tools/src/h5repack/h5repack_parse.c @@ -58,26 +58,30 @@ obj_list_t* parse_filter(const char *str, unsigned *n_objs, filter_info_t *filt, /* check for the end of object list and number of objects */ for (i = 0, n = 0; i < len; i++) { c = str[i]; - if (c == ':') + if (c == ':') { end_obj = (int) i; + break; + } if (c == ',') n++; } + n++; /* Check for missing : */ if (end_obj == -1) { /* apply to all objects */ options->all_filter = 1; *is_glb = 1; + *n_objs = 1; } + else + *n_objs = n; - n++; obj_list = (obj_list_t *) HDmalloc(n * sizeof(obj_list_t)); if (obj_list == NULL) { error_msg("could not allocate object list\n"); return NULL; } - *n_objs = n; /* get object list */ if (end_obj > 0) @@ -89,6 +93,7 @@ obj_list_t* parse_filter(const char *str, unsigned *n_objs, filter_info_t *filt, sobj[k] = '\0'; else sobj[k + 1] = '\0'; + HDstrcpy(obj_list[n].obj, sobj); HDmemset(sobj, 0, sizeof(sobj)); n++; @@ -142,7 +147,6 @@ obj_list_t* parse_filter(const char *str, unsigned *n_objs, filter_info_t *filt, if (l == 2) { smask[l] = '\0'; i = len - 1; /* end */ - (*n_objs)--; /* we counted an extra ',' */ if (HDstrcmp(smask,"NN") == 0) filt->cd_values[j++] = H5_SZIP_NN_OPTION_MASK; else if (HDstrcmp(smask,"EC") == 0) @@ -193,7 +197,6 @@ obj_list_t* parse_filter(const char *str, unsigned *n_objs, filter_info_t *filt, if (l == 2) { smask[l] = '\0'; i = len - 1; /* end */ - (*n_objs)--; /* we counted an extra ',' */ if (HDstrcmp(smask,"IN") == 0) filt->cd_values[j++] = H5Z_SO_INT; else if (HDstrcmp(smask, "DS") == H5Z_SO_FLOAT_DSCALE) diff --git a/tools/src/h5repack/h5repack_refs.c b/tools/src/h5repack/h5repack_refs.c index 36038b5..376ab92 100644 --- a/tools/src/h5repack/h5repack_refs.c +++ b/tools/src/h5repack/h5repack_refs.c @@ -30,15 +30,10 @@ static herr_t update_ref_value(hid_t obj_id, H5R_type_t ref_type, void *ref_in, /*------------------------------------------------------------------------- * Function: do_copy_refobjs * - * Purpose: duplicate all referenced HDF5 objects in the file - * and create hard links - * - * Return: 0, ok, -1 no - * - * Programmer: Pedro Vicente, pvn@ncsa.uiuc.edu - * - * Date: December, 10, 2003 + * Purpose: duplicate all referenced HDF5 objects in the file + * and create hard links * + * Return: 0, ok, -1 no *------------------------------------------------------------------------- */ @@ -47,41 +42,39 @@ int do_copy_refobjs(hid_t fidin, trav_table_t *travt, pack_opt_t *options) /* repack options */ { - int ret_value = 0; /*no need to LEAVE() on ERROR: HERR_INIT(int, SUCCEED) */ - hid_t grp_in = (-1); /* read group ID */ - hid_t grp_out = (-1); /* write group ID */ - hid_t dset_in = (-1); /* read dataset ID */ - hid_t dset_out = (-1); /* write dataset ID */ - hid_t type_in = (-1); /* named type ID */ - hid_t dcpl_id = (-1); /* dataset creation property list ID */ - hid_t space_id = (-1); /* space ID */ - hid_t ftype_id = (-1); /* file data type ID */ - hid_t mtype_id = (-1); /* memory data type ID */ + int ret_value = 0; /*no need to LEAVE() on ERROR: HERR_INIT(int, SUCCEED) */ + hid_t grp_in = -1; /* read group ID */ + hid_t grp_out = -1; /* write group ID */ + hid_t dset_in = -1; /* read dataset ID */ + hid_t dset_out = -1; /* write dataset ID */ + hid_t type_in = -1; /* named type ID */ + hid_t dcpl_id = -1; /* dataset creation property list ID */ + hid_t space_id = -1; /* space ID */ + hid_t ftype_id = -1; /* file data type ID */ + hid_t mtype_id = -1; /* memory data type ID */ size_t msize; /* memory size of memory type */ hsize_t nelmts; /* number of elements in dataset */ int rank; /* rank of dataset */ hsize_t dims[H5S_MAX_RANK]; /* dimensions of dataset */ unsigned int i, j; int k; - named_dt_t *named_dt_head=NULL; /* Pointer to the stack of named datatypes - copied */ + named_dt_t *named_dt_head = NULL; /* Pointer to the stack of named datatypes copied */ /*------------------------------------------------------------------------- * browse *------------------------------------------------------------------------- */ for(i = 0; i < travt->nobjs; i++) { - switch(travt->objs[i].type) - { + switch(travt->objs[i].type) { /*------------------------------------------------------------------------- - * H5TRAV_TYPE_GROUP - *------------------------------------------------------------------------- - */ + * H5TRAV_TYPE_GROUP + *------------------------------------------------------------------------- + */ case H5TRAV_TYPE_GROUP: /*------------------------------------------------------------------------- - * copy referenced objects in attributes - *------------------------------------------------------------------------- - */ + * copy referenced objects in attributes + *------------------------------------------------------------------------- + */ if((grp_out = H5Gopen2(fidout, travt->objs[i].name, H5P_DEFAULT)) < 0) HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Gopen2 failed"); @@ -97,18 +90,18 @@ int do_copy_refobjs(hid_t fidin, HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Gclose failed"); /*------------------------------------------------------------------------- - * check for hard links - *------------------------------------------------------------------------- - */ + * check for hard links + *------------------------------------------------------------------------- + */ if(travt->objs[i].nlinks) for(j = 0; j < travt->objs[i].nlinks; j++) H5Lcreate_hard(fidout, travt->objs[i].name, H5L_SAME_LOC, travt->objs[i].links[j].new_name, H5P_DEFAULT, H5P_DEFAULT); break; /*------------------------------------------------------------------------- - * H5TRAV_TYPE_DATASET - *------------------------------------------------------------------------- - */ + * H5TRAV_TYPE_DATASET + *------------------------------------------------------------------------- + */ case H5TRAV_TYPE_DATASET: if((dset_in = H5Dopen2(fidin, travt->objs[i].name, H5P_DEFAULT)) < 0) HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Dopen2 failed"); @@ -141,16 +134,16 @@ int do_copy_refobjs(hid_t fidin, */ if(h5tools_canreadf(NULL, dcpl_id) == 1) { /*------------------------------------------------------------------------- - * test for a valid output dataset - *------------------------------------------------------------------------- - */ + * test for a valid output dataset + *------------------------------------------------------------------------- + */ dset_out = FAIL; /*------------------------------------------------------------------------- - * object references are a special case - * we cannot just copy the buffers, but instead we recreate the reference - *------------------------------------------------------------------------- - */ + * object references are a special case + * we cannot just copy the buffers, but instead we recreate the reference + *------------------------------------------------------------------------- + */ if(H5Tequal(mtype_id, H5T_STD_REF_OBJ)) { hid_t refobj_id; hobj_ref_t *refbuf = NULL; /* buffer for object references */ @@ -159,9 +152,9 @@ int do_copy_refobjs(hid_t fidin, unsigned u; /*------------------------------------------------------------------------- - * read to memory - *------------------------------------------------------------------------- - */ + * read to memory + *------------------------------------------------------------------------- + */ if(nelmts) { buf = (hobj_ref_t *)HDmalloc((unsigned)(nelmts * msize)); if(buf==NULL) { @@ -201,9 +194,9 @@ int do_copy_refobjs(hid_t fidin, } /*nelmts*/ /*------------------------------------------------------------------------- - * create/write dataset/close - *------------------------------------------------------------------------- - */ + * create/write dataset/close + *------------------------------------------------------------------------- + */ if((dset_out = H5Dcreate2(fidout, travt->objs[i].name, mtype_id, space_id, H5P_DEFAULT, dcpl_id, H5P_DEFAULT)) < 0) HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Dcreate2 failed"); if(nelmts) @@ -223,11 +216,10 @@ int do_copy_refobjs(hid_t fidin, } /*H5T_STD_REF_OBJ*/ /*------------------------------------------------------------------------- - * dataset region references - *------------------------------------------------------------------------- - */ - else if(H5Tequal(mtype_id, H5T_STD_REF_DSETREG)) - { + * dataset region references + *------------------------------------------------------------------------- + */ + else if(H5Tequal(mtype_id, H5T_STD_REF_DSETREG)) { hid_t refobj_id; hdset_reg_ref_t *refbuf = NULL; /* input buffer for region references */ hdset_reg_ref_t *buf = NULL; /* output buffer */ @@ -235,9 +227,9 @@ int do_copy_refobjs(hid_t fidin, unsigned u; /*------------------------------------------------------------------------- - * read input to memory - *------------------------------------------------------------------------- - */ + * read input to memory + *------------------------------------------------------------------------- + */ if(nelmts) { buf = (hdset_reg_ref_t *)HDmalloc((unsigned)(nelmts * msize)); if(buf == NULL) { @@ -248,9 +240,9 @@ int do_copy_refobjs(hid_t fidin, HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Dread failed"); /*------------------------------------------------------------------------- - * create output - *------------------------------------------------------------------------- - */ + * create output + *------------------------------------------------------------------------- + */ refbuf = (hdset_reg_ref_t *)HDcalloc(sizeof(hdset_reg_ref_t), (size_t)nelmts); /*init to zero */ if(refbuf == NULL) { printf("cannot allocate memory\n"); @@ -289,9 +281,9 @@ int do_copy_refobjs(hid_t fidin, } /*nelmts*/ /*------------------------------------------------------------------------- - * create/write dataset/close - *------------------------------------------------------------------------- - */ + * create/write dataset/close + *------------------------------------------------------------------------- + */ if((dset_out = H5Dcreate2(fidout, travt->objs[i].name, mtype_id, space_id, H5P_DEFAULT, dcpl_id, H5P_DEFAULT)) < 0) HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Dcreate2 failed"); if(nelmts) @@ -310,25 +302,25 @@ int do_copy_refobjs(hid_t fidin, HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "copy_attr failed"); } /* H5T_STD_REF_DSETREG */ /*------------------------------------------------------------------------- - * not references, open previously created object in 1st traversal - *------------------------------------------------------------------------- - */ + * not references, open previously created object in 1st traversal + *------------------------------------------------------------------------- + */ else { if((dset_out = H5Dopen2(fidout, travt->objs[i].name, H5P_DEFAULT)) < 0) HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Dopen2 failed"); } /* end else */ /*------------------------------------------------------------------------- - * copy referenced objects in attributes - *------------------------------------------------------------------------- - */ + * copy referenced objects in attributes + *------------------------------------------------------------------------- + */ if(copy_refs_attr(dset_in, dset_out, options, travt, fidout) < 0) HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "copy_refs_attr failed"); /*------------------------------------------------------------------------- - * check for hard links - *------------------------------------------------------------------------- - */ + * check for hard links + *------------------------------------------------------------------------- + */ if(travt->objs[i].nlinks) for(j = 0; j < travt->objs[i].nlinks; j++) H5Lcreate_hard(fidout, travt->objs[i].name, H5L_SAME_LOC, travt->objs[i].links[j].new_name, H5P_DEFAULT, H5P_DEFAULT); @@ -338,9 +330,9 @@ int do_copy_refobjs(hid_t fidin, } /*can_read*/ /*------------------------------------------------------------------------- - * close - *------------------------------------------------------------------------- - */ + * close + *------------------------------------------------------------------------- + */ if(H5Tclose(ftype_id) < 0) HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Tclose failed"); if(H5Tclose(mtype_id) < 0) @@ -354,9 +346,9 @@ int do_copy_refobjs(hid_t fidin, break; /*------------------------------------------------------------------------- - * H5TRAV_TYPE_NAMED_DATATYPE - *------------------------------------------------------------------------- - */ + * H5TRAV_TYPE_NAMED_DATATYPE + *------------------------------------------------------------------------- + */ case H5TRAV_TYPE_NAMED_DATATYPE: if((type_in = H5Topen2(fidin, travt->objs[i].name, H5P_DEFAULT)) < 0) HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Topen2 failed"); @@ -365,9 +357,9 @@ int do_copy_refobjs(hid_t fidin, break; /*------------------------------------------------------------------------- - * H5TRAV_TYPE_LINK - *------------------------------------------------------------------------- - */ + * H5TRAV_TYPE_LINK + *------------------------------------------------------------------------- + */ case H5TRAV_TYPE_LINK: /*nothing to do */ break; @@ -410,27 +402,22 @@ done: /*------------------------------------------------------------------------- * Function: copy_refs_attr * - * Purpose: duplicate all referenced HDF5 located in attributes - * relative to LOC_IN, which is obtained either from - * loc_id = H5Gopen2(fid, name, H5P_DEFAULT); - * loc_id = H5Dopen2(fid, name, H5P_DEFAULT); - * loc_id = H5Topen2(fid, name, H5P_DEFAULT); - * - * Return: 0, ok, -1 no + * Purpose: duplicate all referenced HDF5 located in attributes + * relative to LOC_IN, which is obtained either from + * loc_id = H5Gopen2(fid, name, H5P_DEFAULT); + * loc_id = H5Dopen2(fid, name, H5P_DEFAULT); + * loc_id = H5Topen2(fid, name, H5P_DEFAULT); * - * Programmer: Pedro Vicente, pvn@ncsa.uiuc.edu + * Return: 0, ok, -1 no * - * Modifier: xcao@hdfgroup.org, 9/12/2011 - * Update values of references(object and region) for the following types: + * Modified: + * Update values of references(object and region) for the following types: * 1) References, * 2) ARRAY of reference, * 3) VLEN of references. * 4) COMPOUND of references. - * This function does not handle references in other complicated structures, - * such as references in nested compound datatypes. - * - * Date: October, 28, 2003 - * + * This function does not handle references in other complicated structures, + * such as references in nested compound datatypes. *------------------------------------------------------------------------- */ @@ -438,30 +425,32 @@ static int copy_refs_attr(hid_t loc_in, hid_t loc_out, pack_opt_t *options, trav_table_t *travt, - hid_t fidout /* for saving references */ - ) + hid_t fidout) /* for saving references */ { - int ret_value = 0; /*no need to LEAVE() on ERROR: HERR_INIT(int, SUCCEED) */ - hid_t attr_id = -1; /* attr ID */ - hid_t attr_out = -1; /* attr ID */ - hid_t space_id = -1; /* space ID */ - hid_t ftype_id = -1; /* file data type ID */ - hid_t mtype_id = -1; /* memory data type ID */ - size_t msize; /* memory size of type */ - hsize_t nelmts; /* number of elements in dataset */ - hsize_t dims[H5S_MAX_RANK];/* dimensions of dataset */ - char name[255]; - H5O_info_t oinfo; /* Object info */ - unsigned u, i, j; - int rank; + int ret_value = 0; /*no need to LEAVE() on ERROR: HERR_INIT(int, SUCCEED) */ + hid_t attr_id = -1; /* attr ID */ + hid_t attr_out = -1; /* attr ID */ + hid_t space_id = -1; /* space ID */ + hid_t ftype_id = -1; /* file data type ID */ + hid_t mtype_id = -1; /* memory data type ID */ + size_t msize; /* memory size of type */ + hsize_t nelmts; /* number of elements in dataset */ + hsize_t dims[H5S_MAX_RANK];/* dimensions of dataset */ + char name[255]; + H5O_info_t oinfo; /* Object info */ + unsigned u, i, j; + int rank; H5T_class_t type_class = -1; - hbool_t is_ref=0, is_ref_vlen=0, is_ref_array=0, is_ref_comp=0; - void *refbuf = NULL; - void *buf = NULL; - const char* refname = NULL; - unsigned *ref_comp_index = NULL; - size_t *ref_comp_size = NULL; - int ref_comp_field_n = 0; + hbool_t is_ref = 0, + is_ref_vlen = 0, + is_ref_array = 0, + is_ref_comp = 0; + void *refbuf = NULL; + void *buf = NULL; + const char *refname = NULL; + unsigned *ref_comp_index = NULL; + size_t *ref_comp_size = NULL; + int ref_comp_field_n = 0; if(H5Oget_info(loc_in, &oinfo) < 0) @@ -492,7 +481,7 @@ static int copy_refs_attr(hid_t loc_in, hid_t base_type; base_type = H5Tget_super(ftype_id); - is_ref_vlen = (H5Tget_class(base_type)==H5T_REFERENCE); + is_ref_vlen = (H5Tget_class(base_type) == H5T_REFERENCE); msize = H5Tget_size(base_type); H5Tclose(base_type); } @@ -500,7 +489,7 @@ static int copy_refs_attr(hid_t loc_in, hid_t base_type; base_type = H5Tget_super(ftype_id); - is_ref_array = (H5Tget_class(base_type)==H5T_REFERENCE); + is_ref_array = (H5Tget_class(base_type) == H5T_REFERENCE); msize = H5Tget_size(base_type); H5Tclose(base_type); } @@ -515,9 +504,9 @@ static int copy_refs_attr(hid_t loc_in, ref_comp_field_n = 0; for (i=0; i<(unsigned)nmembers; i++) { - hid_t mtid = H5Tget_member_type( ftype_id, i ); + hid_t mtid = H5Tget_member_type(ftype_id, i); - if ((H5Tget_class(mtid)==H5T_REFERENCE)) { + if ((H5Tget_class(mtid) == H5T_REFERENCE)) { ref_comp_index[ref_comp_field_n] = i; ref_comp_size[ref_comp_field_n] = H5Tget_size(mtid); ref_comp_field_n++; @@ -627,9 +616,9 @@ static int copy_refs_attr(hid_t loc_in, HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Aread failed"); /*------------------------------------------------------------------------- - * create output - *------------------------------------------------------------------------- - */ + * create output + *------------------------------------------------------------------------- + */ refbuf = (hdset_reg_ref_t *)HDcalloc(sizeof(hdset_reg_ref_t), (size_t)nelmts); /*init to zero */ if(refbuf == NULL) { printf( "cannot allocate memory\n" ); @@ -669,7 +658,8 @@ static int copy_refs_attr(hid_t loc_in, HDmemcpy(&(ptr[j]), &ref_out, msize); } } /* for (i=0; inobjs; u++) { @@ -830,18 +817,16 @@ out: /*------------------------------------------------------------------------- * Function: Update_Ref_value * - * Purpose: Update a reference value - * - * Programmer: xcao@hdfgroup.org 9/12/2011 - * + * Purpose: Update a reference value *------------------------------------------------------------------------- */ static herr_t update_ref_value(hid_t obj_id, H5R_type_t ref_type, void *ref_in, hid_t fid_out, void *ref_out, trav_table_t *travt) { - int ret_value = 0; /*no need to LEAVE() on ERROR: HERR_INIT(int, SUCCEED) */ - const char* ref_obj_name; - hid_t space_id=-1, ref_obj_id=-1; + int ret_value = 0; /*no need to LEAVE() on ERROR: HERR_INIT(int, SUCCEED) */ + const char *ref_obj_name; + hid_t space_id = -1; + hid_t ref_obj_id = -1; ref_obj_id = H5Rdereference2(obj_id, H5P_DEFAULT, ref_type, ref_in); if (ref_obj_id < 0) diff --git a/tools/src/h5repack/h5repack_verify.c b/tools/src/h5repack/h5repack_verify.c index e276b7b..dbe8e1a 100644 --- a/tools/src/h5repack/h5repack_verify.c +++ b/tools/src/h5repack/h5repack_verify.c @@ -39,22 +39,22 @@ static int verify_filters(hid_t pid, hid_t tid, int nfilters, filter_info_t *fil int h5repack_verify(const char *in_fname, const char *out_fname, pack_opt_t *options) { - int ret_value = 0; /*no need to LEAVE() on ERROR: HERR_INIT(int, SUCCEED) */ + int ret_value = 0; /*no need to LEAVE() on ERROR: HERR_INIT(int, SUCCEED) */ hid_t fidin = -1; /* file ID for input file*/ hid_t fidout = -1; /* file ID for output file*/ hid_t did = -1; /* dataset ID */ hid_t pid = -1; /* dataset creation property list ID */ hid_t sid = -1; /* space ID */ hid_t tid = -1; /* type ID */ + int ok = 1; /* step results */ unsigned int i; trav_table_t *travt = NULL; - int ok = 1; - hid_t fcpl_in = -1; /* file creation property for input file */ - hid_t fcpl_out = -1; /* file creation property for output file */ + hid_t fcpl_in = -1; /* file creation property for input file */ + hid_t fcpl_out = -1; /* file creation property for output file */ H5F_fspace_strategy_t in_strategy, out_strategy; /* file space handling strategy for in/output file */ - hbool_t in_persist, out_persist; /* free-space persist status for in/output file */ - hsize_t in_threshold, out_threshold; /* free-space section threshold for in/output file */ - hsize_t in_pagesize, out_pagesize; /* file space page size for input/output file */ + hbool_t in_persist, out_persist; /* free-space persist status for in/output file */ + hsize_t in_threshold, out_threshold; /* free-space section threshold for in/output file */ + hsize_t in_pagesize, out_pagesize; /* file space page size for input/output file */ /* open the output file */ if((fidout = H5Fopen(out_fname, H5F_ACC_RDONLY, H5P_DEFAULT)) < 0 ) @@ -84,7 +84,6 @@ h5repack_verify(const char *in_fname, const char *out_fname, pack_opt_t *options if(verify_filters(pid, tid, obj->nfilters, obj->filter) <= 0) ok = 0; - /*------------------------------------------------------------------------- * layout check *------------------------------------------------------------------------- @@ -104,10 +103,8 @@ h5repack_verify(const char *in_fname, const char *out_fname, pack_opt_t *options HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Dclose failed"); if (H5Tclose(tid) < 0) HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Tclose failed"); - } - /*------------------------------------------------------------------------- * check for the "all" objects option *------------------------------------------------------------------------- @@ -163,7 +160,6 @@ h5repack_verify(const char *in_fname, const char *out_fname, pack_opt_t *options ok = 0; } - /*------------------------------------------------------------------------- * close *------------------------------------------------------------------------- @@ -177,11 +173,11 @@ h5repack_verify(const char *in_fname, const char *out_fname, pack_opt_t *options if (H5Tclose(tid) < 0) HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Tclose failed"); } /* if */ - } /* i */ /* free table */ trav_table_free(travt); + travt = NULL; } /*------------------------------------------------------------------------- @@ -190,39 +186,33 @@ h5repack_verify(const char *in_fname, const char *out_fname, pack_opt_t *options */ /* open the input file */ - if((fidin = H5Fopen(in_fname, H5F_ACC_RDONLY, H5P_DEFAULT)) < 0 ) + if((fidin = H5Fopen(in_fname, H5F_ACC_RDONLY, H5P_DEFAULT)) < 0) HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Fopen failed on file <%s>", in_fname); /* Get file creation property list for input file */ - if((fcpl_in = H5Fget_create_plist(fidin)) < 0) { + if((fcpl_in = H5Fget_create_plist(fidin)) < 0) HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Fget_create_plist failed to retrieve file creation property list"); - } /* Get file space info for input file */ - if(H5Pget_file_space_strategy(fcpl_in, &in_strategy, &in_persist, &in_threshold) < 0) { + if(H5Pget_file_space_strategy(fcpl_in, &in_strategy, &in_persist, &in_threshold) < 0) HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Pget_file_space_strategy failed to retrieve file space strategy & threshold"); - } /* Get file space page size for input file */ - if(H5Pget_file_space_page_size(fcpl_in, &in_pagesize) < 0) { + if(H5Pget_file_space_page_size(fcpl_in, &in_pagesize) < 0) HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Pget_file_space_page_size failed to retrieve file space page size"); - } /* Output file is already opened */ /* Get file creation property list for output file */ - if((fcpl_out = H5Fget_create_plist(fidout)) < 0) { + if((fcpl_out = H5Fget_create_plist(fidout)) < 0) HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Fget_create_plist failed to retrieve file creation property list"); - } /* Get file space info for output file */ - if(H5Pget_file_space_strategy(fcpl_out, &out_strategy, &out_persist, &out_threshold) < 0) { + if(H5Pget_file_space_strategy(fcpl_out, &out_strategy, &out_persist, &out_threshold) < 0) HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Pget_file_space_strategy failed to retrieve file space strategy & threshold"); - } /* Get file space page size for output file */ - if(H5Pget_file_space_page_size(fcpl_out, &out_pagesize) < 0) { + if(H5Pget_file_space_page_size(fcpl_out, &out_pagesize) < 0) HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Pget_file_space_page_size failed to retrieve file space page size"); - } /* * If -S option is set, the file space handling strategy should be set as specified. @@ -230,14 +220,12 @@ h5repack_verify(const char *in_fname, const char *out_fname, pack_opt_t *options * the same as the input file's strategy. */ if(options->fs_strategy) { - if(out_strategy != (options->fs_strategy == (H5F_fspace_strategy_t)-1 ? 0 : options->fs_strategy)) { + if(out_strategy != (options->fs_strategy == (H5F_fspace_strategy_t)-1 ? 0 : options->fs_strategy)) HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "file space strategy not set as unexpected"); - } } else { - if(out_strategy != in_strategy) { + if(out_strategy != in_strategy) HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "file space strategy not set as unexpected"); - } } /* @@ -246,14 +234,12 @@ h5repack_verify(const char *in_fname, const char *out_fname, pack_opt_t *options * the same as the input file's free-space persist status */ if(options->fs_persist) { - if(out_persist != (hbool_t)(options->fs_persist == (-1) ? FALSE : options->fs_persist)) { + if(out_persist != (hbool_t)(options->fs_persist == (-1) ? FALSE : options->fs_persist)) HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "free-space persist status not set as unexpected"); - } } else { - if(out_persist != in_persist) { + if(out_persist != in_persist) HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "free-space persist status not set as unexpected"); - } } /* @@ -262,14 +248,12 @@ h5repack_verify(const char *in_fname, const char *out_fname, pack_opt_t *options * input file's threshold size. */ if(options->fs_threshold) { - if(out_threshold != (hsize_t)(options->fs_threshold == (-1) ? 0 : options->fs_threshold)) { + if(out_threshold != (hsize_t)(options->fs_threshold == (-1) ? 0 : options->fs_threshold)) HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "threshold not set as unexpected"); - } } else { - if(out_threshold != in_threshold) { + if(out_threshold != in_threshold) HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "threshold not set as unexpected"); - } } /* @@ -278,27 +262,16 @@ h5repack_verify(const char *in_fname, const char *out_fname, pack_opt_t *options * the same as the input file's file space page size. */ if(options->fs_pagesize) { - if(out_pagesize != (hsize_t)(options->fs_pagesize == (-1) ? 0 : options->fs_pagesize)) { + if(out_pagesize != (hsize_t)(options->fs_pagesize == (-1) ? 0 : options->fs_pagesize)) HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "file space page size not set as unexpected"); - } } else { /* "-G" is not set */ - if(out_pagesize != in_pagesize) { + if(out_pagesize != in_pagesize) HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "file space page size not set as unexpected"); - } - } - /* Closing */ - if (H5Pclose(fcpl_in) < 0) - HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Pclose failed"); - if (H5Pclose(fcpl_out) < 0) - HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Pclose failed"); - if (H5Fclose(fidin) < 0) - HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Fclose failed"); - if (H5Fclose(fidout) < 0) - HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Fclose failed"); + } - return ok; + ret_value = ok; done: H5E_BEGIN_TRY { @@ -307,6 +280,7 @@ done: H5Pclose(pid); H5Sclose(sid); H5Dclose(did); + H5Tclose(tid); H5Fclose(fidin); H5Fclose(fidout); if (travt) @@ -319,13 +293,15 @@ done: /*------------------------------------------------------------------------- * Function: verify_layout * - * Purpose: verify which layout is present in the property list DCPL_ID - * - * H5D_COMPACT = 0 - * H5D_CONTIGUOUS = 1 - * H5D_CHUNKED = 2 + * Purpose: verify which layout is present in the property list DCPL_ID + * H5D_COMPACT = 0 + * H5D_CONTIGUOUS = 1 + * H5D_CHUNKED = 2 * - * Return: 1 has, 0 does not, -1 error + * Return: + * 1 has, + * 0 does not, + * -1 error *------------------------------------------------------------------------- */ @@ -342,7 +318,7 @@ int verify_layout(hid_t pid, pack_info_t *obj) return -1; /* a non chunked layout was requested on a filtered object */ - if (nfilters && obj->layout!=H5D_CHUNKED) + if (nfilters && obj->layout != H5D_CHUNKED) return 0; /* get layout */ @@ -353,11 +329,11 @@ int verify_layout(hid_t pid, pack_info_t *obj) return 0; if (layout==H5D_CHUNKED) { - if ((rank = H5Pget_chunk(pid,NELMTS(chsize),chsize/*out*/)) < 0) + if ((rank = H5Pget_chunk(pid, NELMTS(chsize), chsize/*out*/)) < 0) return -1; if (obj->chunk.rank != rank) return 0; - for ( i=0; ichunk.chunk_lengths[i]) return 0; } @@ -368,50 +344,40 @@ int verify_layout(hid_t pid, pack_info_t *obj) /*------------------------------------------------------------------------- * Function: h5repack_cmp_pl * - * Purpose: compare 2 files for identical property lists of all objects + * Purpose: compare 2 files for identical property lists of all objects * - * Return: 1=identical, 0=not identical, -1=error + * Return: + * 1 = identical, + * 0 = not identical, + * -1 = error *------------------------------------------------------------------------- */ int h5repack_cmp_pl(const char *fname1, const char *fname2) { - int ret_value = 0; /*no need to LEAVE() on ERROR: HERR_INIT(int, SUCCEED) */ - hid_t fid1=-1; /* file ID */ - hid_t fid2=-1; /* file ID */ - hid_t dset1=-1; /* dataset ID */ - hid_t dset2=-1; /* dataset ID */ - hid_t gid=-1; /* group ID */ - hid_t dcpl1=-1; /* dataset creation property list ID */ - hid_t dcpl2=-1; /* dataset creation property list ID */ - hid_t gcplid=-1; /* group creation property list */ - unsigned crt_order_flag1; /* group creation order flag */ - unsigned crt_order_flag2; /* group creation order flag */ - trav_table_t *trav=NULL; - int ret=1; + int ret_value = 1; /*no need to LEAVE() on ERROR: HERR_INIT(int, SUCCEED) */ + hid_t fid1 =-1; /* file ID */ + hid_t fid2 =-1; /* file ID */ + hid_t dset1 =-1; /* dataset ID */ + hid_t dset2 =-1; /* dataset ID */ + hid_t gid =-1; /* group ID */ + hid_t dcpl1 =-1; /* dataset creation property list ID */ + hid_t dcpl2 =-1; /* dataset creation property list ID */ + hid_t gcplid =-1; /* group creation property list */ + unsigned crt_order_flag1; /* group creation order flag */ + unsigned crt_order_flag2; /* group creation order flag */ + trav_table_t *trav = NULL; unsigned int i; /*------------------------------------------------------------------------- * open the files *------------------------------------------------------------------------- */ - - /* disable error reporting */ - H5E_BEGIN_TRY - { - - /* Open the files */ - if ((fid1 = H5Fopen(fname1,H5F_ACC_RDONLY,H5P_DEFAULT)) < 0 ) { - error_msg("<%s>: %s\n", fname1, H5FOPENERROR ); - return -1; - } - if ((fid2 = H5Fopen(fname2,H5F_ACC_RDONLY,H5P_DEFAULT)) < 0 ) { - error_msg("<%s>: %s\n", fname2, H5FOPENERROR ); - H5Fclose(fid1); - return -1; - } - /* enable error reporting */ - } H5E_END_TRY; + /* Open the files */ + if ((fid1 = H5Fopen(fname1, H5F_ACC_RDONLY, H5P_DEFAULT)) < 0) + HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "h5tools_fopen failed <%s>: %s", fname1, H5FOPENERROR); + if ((fid2 = H5Fopen(fname2, H5F_ACC_RDONLY, H5P_DEFAULT)) < 0) + HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "h5tools_fopen failed <%s>: %s", fname2, H5FOPENERROR); /*------------------------------------------------------------------------- * get file table list of objects @@ -452,9 +418,8 @@ int h5repack_cmp_pl(const char *fname1, const char *fname2) if (H5Gclose(gid) < 0) HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Gclose failed"); - if (crt_order_flag1 != crt_order_flag2) { - HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "property lists failed for <%s> are different", trav->objs[i].name); - } + if (crt_order_flag1 != crt_order_flag2) + HGOTO_ERROR(0, H5E_tools_min_id_g, "property lists failed for <%s> are different", trav->objs[i].name); } else if(trav->objs[i].type == H5TRAV_TYPE_DATASET) { if((dset1 = H5Dopen2(fid1, trav->objs[i].name, H5P_DEFAULT)) < 0) @@ -470,12 +435,11 @@ int h5repack_cmp_pl(const char *fname1, const char *fname2) * compare the property lists *------------------------------------------------------------------------- */ - if((ret = H5Pequal(dcpl1, dcpl2)) < 0) + if((ret_value = H5Pequal(dcpl1, dcpl2)) < 0) HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Pequal failed"); - if(ret == 0) { - HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "property lists failed for <%s> are different",trav->objs[i].name); - } + if(ret_value == 0) + HGOTO_ERROR(0, H5E_tools_min_id_g, "property lists failed for <%s> are different", trav->objs[i].name); /*------------------------------------------------------------------------- * close @@ -490,29 +454,8 @@ int h5repack_cmp_pl(const char *fname1, const char *fname2) if(H5Dclose(dset2) < 0) HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Dclose failed"); } /*if*/ - } /*i*/ - - /*------------------------------------------------------------------------- - * free - *------------------------------------------------------------------------- - */ - - trav_table_free(trav); + } /*for*/ - /*------------------------------------------------------------------------- - * close - *------------------------------------------------------------------------- - */ - - H5Fclose(fid1); - H5Fclose(fid2); - - return ret; - -/*------------------------------------------------------------------------- -* error -*------------------------------------------------------------------------- -*/ done: H5E_BEGIN_TRY { @@ -524,7 +467,8 @@ done: H5Fclose(fid2); H5Pclose(gcplid); H5Gclose(gid); - trav_table_free(trav); + if(trav) + trav_table_free(trav); } H5E_END_TRY; return ret_value; @@ -534,14 +478,14 @@ done: /*------------------------------------------------------------------------- * Function: verify_filters * - * Purpose: verify if all requested filters in the array FILTER obtained - * from user input are present in the property list PID obtained from - * the output file + * Purpose: verify if all requested filters in the array FILTER obtained + * from user input are present in the property list PID obtained from + * the output file * * Return: - * 1 match - * 0 do not match - * -1 error + * 1 match + * 0 do not match + * -1 error *------------------------------------------------------------------------- */ @@ -583,6 +527,8 @@ int verify_filters(hid_t pid, hid_t tid, int nfilters, filter_info_t *filter) cd_values, sizeof(f_name), f_name, NULL); /* filter ID */ + if (filtn < 0) + return -1; if (filtn != filter[i].filtn) return 0; @@ -657,4 +603,3 @@ int verify_filters(hid_t pid, hid_t tid, int nfilters, filter_info_t *filter) return 1; } - diff --git a/tools/test/h5diff/CMakeLists.txt b/tools/test/h5diff/CMakeLists.txt index f6951a3..9a41fb3 100644 --- a/tools/test/h5diff/CMakeLists.txt +++ b/tools/test/h5diff/CMakeLists.txt @@ -19,9 +19,10 @@ INCLUDE_DIRECTORIES (${HDF5_TOOLS_DIR}/lib) #add_test (NAME h5diffgentest COMMAND $) endif () - #----------------------------------------------------------------------------- - # If plugin library tests can be tested - #----------------------------------------------------------------------------- +#----------------------------------------------------------------------------- +# If plugin library tests can be tested +#----------------------------------------------------------------------------- +if (BUILD_SHARED_LIBS) set (HDF5_TOOL_PLUGIN_LIB_CORENAME "dynlibdiff") set (HDF5_TOOL_PLUGIN_LIB_NAME "${HDF5_EXTERNAL_LIB_PREFIX}${HDF5_TOOL_PLUGIN_LIB_CORENAME}") set (HDF5_TOOL_PLUGIN_LIB_TARGET ${HDF5_TOOL_PLUGIN_LIB_CORENAME}) @@ -46,5 +47,6 @@ INCLUDE_DIRECTORIES (${HDF5_TOOLS_DIR}/lib) "$" "${CMAKE_BINARY_DIR}/plugins/$" ) +endif () - include (CMakeTests.cmake) +include (CMakeTests.cmake) diff --git a/tools/test/h5diff/CMakeTests.cmake b/tools/test/h5diff/CMakeTests.cmake index 1c15880..d87a47f 100644 --- a/tools/test/h5diff/CMakeTests.cmake +++ b/tools/test/h5diff/CMakeTests.cmake @@ -501,7 +501,7 @@ add_test ( NAME H5DIFF_UD-${testname} COMMAND "${CMAKE_COMMAND}" - -D "TEST_PROGRAM=$" + -D "TEST_PROGRAM=$" -D "TEST_ARGS:STRING=${ARGN}" -D "TEST_FOLDER=${PROJECT_BINARY_DIR}/testfiles" -D "TEST_OUTPUT=${resultfile}.out" @@ -516,7 +516,7 @@ add_test ( NAME H5DIFF_UD-${testname} COMMAND "${CMAKE_COMMAND}" - -D "TEST_PROGRAM=$" + -D "TEST_PROGRAM=$" -D "TEST_ARGS:STRING=${ARGN}" -D "TEST_FOLDER=${PROJECT_BINARY_DIR}/testfiles" -D "TEST_OUTPUT=${resultfile}.out" @@ -546,7 +546,7 @@ add_test ( NAME H5DIFF_UD_ERR-${testname} COMMAND "${CMAKE_COMMAND}" - -D "TEST_PROGRAM=$" + -D "TEST_PROGRAM=$" -D "TEST_ARGS:STRING=--enable-error-stack;${ARGN}" -D "TEST_FOLDER=${PROJECT_BINARY_DIR}/testfiles" -D "TEST_OUTPUT=${resultfile}_ERR.out" @@ -562,7 +562,7 @@ add_test ( NAME H5DIFF_UD_ERR-${testname} COMMAND "${CMAKE_COMMAND}" - -D "TEST_PROGRAM=$" + -D "TEST_PROGRAM=$" -D "TEST_ARGS:STRING=--enable-error-stack;${ARGN}" -D "TEST_FOLDER=${PROJECT_BINARY_DIR}/testfiles" -D "TEST_OUTPUT=${resultfile}_ERR.out" @@ -1653,8 +1653,10 @@ ADD_H5_TEST (h5diff_v3 0 -c ${FILEV1} ${FILEV2}) ############################################################################## ### P L U G I N T E S T S ############################################################################## -ADD_H5_UD_TEST (h5diff_plugin_test 0 h5diff_ud -v tudfilter.h5 tudfilter2.h5) -ADD_H5_UD_TEST (h5diff_plugin_fail 2 h5diff_udfail -v tudfilter.h5 tudfilter2.h5) +if (BUILD_SHARED_LIBS) + ADD_H5_UD_TEST (h5diff_plugin_test 0 h5diff_ud -v tudfilter.h5 tudfilter2.h5) + ADD_H5_UD_TEST (h5diff_plugin_fail 2 h5diff_udfail -v tudfilter.h5 tudfilter2.h5) +endif () # ############################################################################## # # END diff --git a/tools/test/h5dump/h5dumpgentest.c b/tools/test/h5dump/h5dumpgentest.c index 01f6623..0eaa2d0 100644 --- a/tools/test/h5dump/h5dumpgentest.c +++ b/tools/test/h5dump/h5dumpgentest.c @@ -287,9 +287,9 @@ typedef struct s1_t { #define F64_DIM1 (F64_ARRAY_BUF_LEN / sizeof(int) + 1) /* 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 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 */ /* "FILE66" macros and for FILE69 */ #define F66_XDIM 8 diff --git a/tools/test/h5repack/CMakeTests.cmake b/tools/test/h5repack/CMakeTests.cmake index c68f18a..559dd88 100644 --- a/tools/test/h5repack/CMakeTests.cmake +++ b/tools/test/h5repack/CMakeTests.cmake @@ -1377,11 +1377,7 @@ ADD_H5_UD_TEST (plugin_test 0 h5repack_layout.h5 -v -f UD=257,0,1,9) ADD_H5_UD_TEST (plugin_none 0 h5repack_layout.UD.h5 -v -f NONE) # check for no parameters - set (TESTRETVAL 255) - if (WIN32) - set (TESTRETVAL -1) - endif () - ADD_H5_UD_TEST (plugin_zero ${TESTRETVAL} h5repack_layout.h5 -v -f UD=250,0,0) + ADD_H5_UD_TEST (plugin_zero 0 h5repack_layout.h5 -v -f UD=250,0,0) if (HDF5_TEST_VFD) # Run test with different Virtual File Driver diff --git a/tools/test/h5repack/h5repacktst.c b/tools/test/h5repack/h5repacktst.c index efce43f..ae9ce25 100644 --- a/tools/test/h5repack/h5repacktst.c +++ b/tools/test/h5repack/h5repacktst.c @@ -1,15 +1,15 @@ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * -* 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 * + * Copyright by The HDF Group. * + * Copyright by the Board of Trustees of the University of Illinois. * + * All rights reserved. * + * * + * This file is part of HDF5. The full HDF5 copyright notice, including * + * terms governing use, modification, and redistribution, is contained in * * the COPYING file, which can be found at the root of the source code * * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * * If you do not have access to either file, you may request a copy from * * help@hdfgroup.org. * -* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #include "h5repack.h" #include "h5test.h" @@ -78,15 +78,15 @@ #define FNAME18 "h5repack_layout2.h5" /* Files for testing file space paging */ -#define FSPACE_OUT "h5repack_fspace_OUT.h5" /* The output file */ +#define FSPACE_OUT "h5repack_fspace_OUT.h5" /* The output file */ #define NELMTS(X) (sizeof(X)/sizeof(X[0])) /* # of elements */ const char *H5REPACK_FSPACE_FNAMES[] = { "h5repack_latest.h5", /* 0 */ "h5repack_default.h5", /* 1 */ - "h5repack_page_persist.h5", /* 2 */ - "h5repack_fsm_aggr_persist.h5", /* 3 */ + "h5repack_page_persist.h5", /* 2 */ + "h5repack_fsm_aggr_persist.h5", /* 3 */ "h5repack_page_threshold.h5", /* 4 */ - "h5repack_fsm_aggr_threshold.h5", /* 5 */ + "h5repack_fsm_aggr_threshold.h5", /* 5 */ "h5repack_aggr.h5", /* 6 */ "h5repack_none.h5" /* 7 */ }; @@ -126,9 +126,9 @@ const char *H5REPACK_FILENAMES[] = { #define REG_REF_DS1 "Dset_REGREF" /*------------------------------------------------------------------------- -* prototypes -*------------------------------------------------------------------------- -*/ + * prototypes + *------------------------------------------------------------------------- + */ static int make_all_objects(hid_t loc_id); static int make_attributes(hid_t loc_id); static int make_hlinks(hid_t loc_id); @@ -164,31 +164,27 @@ static int make_complex_attr_references(hid_t loc_id); /*------------------------------------------------------------------------- -* Function: main -* -* Purpose: Executes h5repack tests -* -* Return: Success: zero -* Failure: 1 -* -* Programmer: Pedro Vicente -* January, 6, 2004 -* -*------------------------------------------------------------------------- -*/ + * Function: main + * + * Purpose: Executes h5repack tests + * + * Return: Success: zero + * Failure: 1 + *------------------------------------------------------------------------- + */ int main (void) { pack_opt_t pack_options; diff_opt_t diff_options; - unsigned j; /* Local index variable for testing file space */ - const char *fname; /* File name for testing file space */ + unsigned j; /* Local index variable for testing file space */ + const char *fname; /* File name for testing file space */ - h5_stat_t file_stat; - h5_stat_size_t fsize1, fsize2; /* file sizes */ + h5_stat_t file_stat; + h5_stat_size_t fsize1, fsize2; /* file sizes */ #if defined (H5_HAVE_FILTER_SZIP) - int szip_can_encode = 0; + int szip_can_encode = 0; #endif h5tools_setprogname(PROGRAMNAME); @@ -211,28 +207,28 @@ int main (void) PASSED(); /*------------------------------------------------------------------------- - * Format of the tests: - * - * 1) make a copy of the file with h5repack - * 2) use the h5diff function to compare the input and output file - *------------------------------------------------------------------------- - */ + * Format of the tests: + * + * 1) make a copy of the file with h5repack + * 2) use the h5diff function to compare the input and output file + *------------------------------------------------------------------------- + */ /*------------------------------------------------------------------------- - * Testing file space info setting - *------------------------------------------------------------------------- - */ + * Testing file space info setting + *------------------------------------------------------------------------- + */ TESTING(" files with file space info setting--no options (-S, -P, -T, -G) are set"); - j = 0; /* #0 */ + j = 0; /* #0 */ HDassert(j < NELMTS(H5REPACK_FSPACE_FNAMES)); fname = H5REPACK_FSPACE_FNAMES[j]; if(h5repack_init(&pack_options, 0, FALSE) < 0) GOERROR; - + if(h5repack(fname, FSPACE_OUT, &pack_options) < 0) GOERROR; if(h5diff(fname, FSPACE_OUT, NULL, NULL, &diff_options) > 0) GOERROR; - if(h5repack_verify(fname, FSPACE_OUT, &pack_options)<=0) + if(h5repack_verify(fname, FSPACE_OUT, &pack_options) <= 0) GOERROR; if(h5repack_end(&pack_options) < 0) GOERROR; @@ -240,20 +236,20 @@ int main (void) TESTING(" files with file space info setting--all options -S, -P, -T, -G are set"); - ++j; /* #1 */ + ++j; /* #1 */ HDassert(j < NELMTS(H5REPACK_FSPACE_FNAMES)); - fname = H5REPACK_FSPACE_FNAMES[j]; + fname = H5REPACK_FSPACE_FNAMES[j]; if(h5repack_init(&pack_options, 0, FALSE) < 0) GOERROR; pack_options.fs_strategy = H5F_FSPACE_STRATEGY_NONE; pack_options.fs_persist = -1; /* "FALSE" is set via -P 0 */ - pack_options.fs_threshold = 1; + pack_options.fs_threshold = 1; pack_options.fs_pagesize = 8192; if(h5repack(fname, FSPACE_OUT, &pack_options) < 0) GOERROR; if(h5diff(fname, FSPACE_OUT, NULL, NULL, &diff_options) > 0) GOERROR; - if(h5repack_verify(fname, FSPACE_OUT, &pack_options)<=0) + if(h5repack_verify(fname, FSPACE_OUT, &pack_options) <= 0) GOERROR; if(h5repack_end(&pack_options) < 0) GOERROR; @@ -261,18 +257,18 @@ int main (void) TESTING(" files with file space info setting--options -S and -T are set"); - ++j; /* #2 */ + ++j; /* #2 */ HDassert(j < NELMTS(H5REPACK_FSPACE_FNAMES)); fname = H5REPACK_FSPACE_FNAMES[j]; if(h5repack_init(&pack_options, 0, FALSE) < 0) GOERROR; - pack_options.fs_strategy = (H5F_fspace_strategy_t)-1; /* "FSM_AGGR" specified via -S FSM_AGGR */ - pack_options.fs_threshold = -1; /* "0" specified via -T 0 */ + pack_options.fs_strategy = (H5F_fspace_strategy_t)-1; /* "FSM_AGGR" specified via -S FSM_AGGR */ + pack_options.fs_threshold = -1; /* "0" specified via -T 0 */ if(h5repack(fname, FSPACE_OUT, &pack_options) < 0) GOERROR; if(h5diff(fname, FSPACE_OUT, NULL, NULL, &diff_options) > 0) GOERROR; - if(h5repack_verify(fname, FSPACE_OUT, &pack_options)<=0) + if(h5repack_verify(fname, FSPACE_OUT, &pack_options) <= 0) GOERROR; if(h5repack_end(&pack_options) < 0) GOERROR; @@ -280,7 +276,7 @@ int main (void) TESTING(" files with file space info setting-- options -S and -P are set & -L"); - ++j; /* #3 */ + ++j; /* #3 */ HDassert(j < NELMTS(H5REPACK_FSPACE_FNAMES)); fname = H5REPACK_FSPACE_FNAMES[j]; if(h5repack_init(&pack_options, 0, TRUE) < 0) @@ -291,32 +287,32 @@ int main (void) GOERROR; if(h5diff(fname, FSPACE_OUT, NULL, NULL, &diff_options) > 0) GOERROR; - if(h5repack_verify(fname, FSPACE_OUT, &pack_options)<=0) + if(h5repack_verify(fname, FSPACE_OUT, &pack_options) <= 0) GOERROR; if(h5repack_end(&pack_options) < 0) GOERROR; PASSED(); TESTING(" files with file space info setting-- options -P and -T are set & -L"); - ++j; /* #4 */ + ++j; /* #4 */ HDassert(j < NELMTS(H5REPACK_FSPACE_FNAMES)); fname = H5REPACK_FSPACE_FNAMES[j]; if(h5repack_init(&pack_options, 0, TRUE) < 0) GOERROR; - pack_options.fs_persist = -1; /* "FALSE" is set via -P 0 */ - pack_options.fs_threshold = 2; + pack_options.fs_persist = -1; /* "FALSE" is set via -P 0 */ + pack_options.fs_threshold = 2; if(h5repack(fname, FSPACE_OUT, &pack_options) < 0) GOERROR; if(h5diff(fname, FSPACE_OUT, NULL, NULL, &diff_options) > 0) GOERROR; - if(h5repack_verify(fname, FSPACE_OUT, &pack_options)<=0) + if(h5repack_verify(fname, FSPACE_OUT, &pack_options) <= 0) GOERROR; if(h5repack_end(&pack_options) < 0) GOERROR; PASSED(); TESTING(" files with file space info setting-- options -S and -G are set & -L"); - ++j; /* #5 */ + ++j; /* #5 */ HDassert(j < NELMTS(H5REPACK_FSPACE_FNAMES)); fname = H5REPACK_FSPACE_FNAMES[j]; if(h5repack_init(&pack_options, 0, TRUE) < 0) @@ -327,180 +323,179 @@ int main (void) GOERROR; if(h5diff(fname, FSPACE_OUT, NULL, NULL, &diff_options) > 0) GOERROR; - if(h5repack_verify(fname, FSPACE_OUT, &pack_options)<=0) + if(h5repack_verify(fname, FSPACE_OUT, &pack_options) <= 0) GOERROR; if(h5repack_end(&pack_options) < 0) GOERROR; PASSED(); TESTING(" files with file space info setting-- options -S, -P, -T, -G are set"); - ++j; /* #6 */ + ++j; /* #6 */ HDassert(j < NELMTS(H5REPACK_FSPACE_FNAMES)); fname = H5REPACK_FSPACE_FNAMES[j]; if(h5repack_init(&pack_options, 0, FALSE) < 0) GOERROR; pack_options.fs_strategy = H5F_FSPACE_STRATEGY_NONE; - pack_options.fs_persist = -1; /* "FALSE" is set via -P 0 */ - pack_options.fs_threshold = 1; + pack_options.fs_persist = -1; /* "FALSE" is set via -P 0 */ + pack_options.fs_threshold = 1; pack_options.fs_pagesize = 8192; if(h5repack(fname, FSPACE_OUT, &pack_options) < 0) GOERROR; if(h5diff(fname, FSPACE_OUT, NULL, NULL, &diff_options) > 0) GOERROR; - if(h5repack_verify(fname, FSPACE_OUT, &pack_options)<=0) + if(h5repack_verify(fname, FSPACE_OUT, &pack_options) <= 0) GOERROR; if(h5repack_end(&pack_options) < 0) GOERROR; PASSED(); TESTING(" files with file space info setting-- options -S, -T, -G are set & -L"); - ++j; /* #7 */ + ++j; /* #7 */ HDassert(j < NELMTS(H5REPACK_FSPACE_FNAMES)); fname = H5REPACK_FSPACE_FNAMES[j]; if(h5repack_init(&pack_options, 0, TRUE) < 0) GOERROR; pack_options.fs_strategy = H5F_FSPACE_STRATEGY_AGGR; - pack_options.fs_threshold = 1; + pack_options.fs_threshold = 1; pack_options.fs_pagesize = 4096; if(h5repack(fname, FSPACE_OUT, &pack_options) < 0) GOERROR; if(h5diff(fname, FSPACE_OUT, NULL, NULL, &diff_options) > 0) GOERROR; - if(h5repack_verify(fname, FSPACE_OUT, &pack_options)<=0) + if(h5repack_verify(fname, FSPACE_OUT, &pack_options) <= 0) GOERROR; if(h5repack_end(&pack_options) < 0) GOERROR; PASSED(); /*------------------------------------------------------------------------- - * file with fill values - *------------------------------------------------------------------------- - */ - + * file with fill values + *------------------------------------------------------------------------- + */ TESTING(" copy of datasets (fill values)"); - if (h5repack_init (&pack_options, 0, FALSE) < 0) + if (h5repack_init(&pack_options, 0, FALSE) < 0) GOERROR; - if (h5repack(FNAME0,FNAME0OUT,&pack_options) < 0) + if (h5repack(FNAME0, FNAME0OUT, &pack_options) < 0) GOERROR; - if (h5diff(FNAME0,FNAME0OUT,NULL,NULL,&diff_options) >0) + if (h5diff(FNAME0, FNAME0OUT, NULL, NULL, &diff_options) > 0) GOERROR; - if (h5repack_verify(FNAME0, FNAME0OUT,&pack_options)<=0) + if (h5repack_verify(FNAME0, FNAME0OUT, &pack_options) <= 0) GOERROR; - if (h5repack_cmp_pl(FNAME0,FNAME0OUT)<=0) + if (h5repack_cmp_pl(FNAME0, FNAME0OUT) <= 0) GOERROR; - if (h5repack_end (&pack_options) < 0) + if (h5repack_end(&pack_options) < 0) GOERROR; PASSED(); /*------------------------------------------------------------------------- - * file with all kinds of dataset datatypes - *------------------------------------------------------------------------- - */ + * file with all kinds of dataset datatypes + *------------------------------------------------------------------------- + */ TESTING(" copy of datasets (all datatypes)"); - if (h5repack_init (&pack_options, 0, FALSE) < 0) + if (h5repack_init(&pack_options, 0, FALSE) < 0) GOERROR; - if (h5repack(FNAME1,FNAME1OUT,&pack_options) < 0) + if (h5repack(FNAME1, FNAME1OUT, &pack_options) < 0) GOERROR; - if (h5diff(FNAME1,FNAME1OUT,NULL,NULL,&diff_options) >0) + if (h5diff(FNAME1, FNAME1OUT, NULL, NULL, &diff_options) > 0) GOERROR; - if (h5repack_verify(FNAME1, FNAME1OUT,&pack_options)<=0) + if (h5repack_verify(FNAME1, FNAME1OUT, &pack_options) <= 0) GOERROR; - if (h5repack_cmp_pl(FNAME1,FNAME1OUT)<=0) + if (h5repack_cmp_pl(FNAME1, FNAME1OUT) <= 0) GOERROR; - if (h5repack_end (&pack_options) < 0) + if (h5repack_end(&pack_options) < 0) GOERROR; PASSED(); /*------------------------------------------------------------------------- - * file with attributes - *------------------------------------------------------------------------- - */ + * file with attributes + *------------------------------------------------------------------------- + */ TESTING(" copy of datasets (attributes)"); - if (h5repack_init (&pack_options, 0, FALSE) < 0) + if (h5repack_init(&pack_options, 0, FALSE) < 0) GOERROR; - if (h5repack(FNAME2,FNAME2OUT,&pack_options) < 0) + if (h5repack(FNAME2, FNAME2OUT, &pack_options) < 0) GOERROR; - if (h5diff(FNAME2,FNAME2OUT,NULL,NULL,&diff_options) >0) + if (h5diff(FNAME2, FNAME2OUT, NULL, NULL, &diff_options) > 0) GOERROR; - if (h5repack_verify(FNAME2, FNAME2OUT,&pack_options)<=0) + if (h5repack_verify(FNAME2, FNAME2OUT, &pack_options) <= 0) GOERROR; - if (h5repack_cmp_pl(FNAME2,FNAME2OUT)<=0) + if (h5repack_cmp_pl(FNAME2, FNAME2OUT) <= 0) GOERROR; - if (h5repack_end (&pack_options) < 0) + if (h5repack_end(&pack_options) < 0) GOERROR; PASSED(); /*------------------------------------------------------------------------- - * file with hardlinks - *------------------------------------------------------------------------- - */ + * file with hardlinks + *------------------------------------------------------------------------- + */ TESTING(" copy of datasets (hardlinks)"); - if (h5repack_init (&pack_options, 0, FALSE) < 0) + if (h5repack_init(&pack_options, 0, FALSE) < 0) GOERROR; - if (h5repack(FNAME3,FNAME3OUT,&pack_options) < 0) + if (h5repack(FNAME3, FNAME3OUT, &pack_options) < 0) GOERROR; - if (h5diff(FNAME3,FNAME3OUT,NULL,NULL,&diff_options) >0) + if (h5diff(FNAME3, FNAME3OUT, NULL, NULL, &diff_options) > 0) GOERROR; - if (h5repack_verify(FNAME3, FNAME3OUT,&pack_options)<=0) + if (h5repack_verify(FNAME3, FNAME3OUT, &pack_options) <= 0) GOERROR; - if (h5repack_cmp_pl(FNAME3,FNAME3OUT)<=0) + if (h5repack_cmp_pl(FNAME3, FNAME3OUT) <= 0) GOERROR; - if (h5repack_end (&pack_options) < 0) + if (h5repack_end(&pack_options) < 0) GOERROR; PASSED(); /*------------------------------------------------------------------------- - * alloc early test - *------------------------------------------------------------------------- - */ + * alloc early test + *------------------------------------------------------------------------- + */ TESTING(" copy of allocation early file"); - if (h5repack_init (&pack_options, 0, FALSE) < 0) + if (h5repack_init(&pack_options, 0, FALSE) < 0) GOERROR; - if (h5repack(FNAME5,FNAME5OUT,&pack_options) < 0) + if (h5repack(FNAME5, FNAME5OUT, &pack_options) < 0) GOERROR; - if (h5diff(FNAME5,FNAME5OUT,NULL,NULL,&diff_options) >0) + if (h5diff(FNAME5, FNAME5OUT, NULL, NULL, &diff_options) > 0) GOERROR; - if (h5repack_verify(FNAME5, FNAME5OUT, &pack_options)<=0) + if (h5repack_verify(FNAME5, FNAME5OUT, &pack_options) <= 0) GOERROR; - if (h5repack_end (&pack_options) < 0) + if (h5repack_end(&pack_options) < 0) GOERROR; PASSED(); /*------------------------------------------------------------------------- - * the remaining files differ in the dcpl's - *------------------------------------------------------------------------- - */ + * the remaining files differ in the dcpl's + *------------------------------------------------------------------------- + */ /*------------------------------------------------------------------------- - * deflate - *------------------------------------------------------------------------- - */ + * deflate + *------------------------------------------------------------------------- + */ TESTING(" adding deflate filter (old_format)"); #ifdef H5_HAVE_FILTER_DEFLATE /*------------------------------------------------------------------------- - * test an individual object option - *------------------------------------------------------------------------- - */ + * test an individual object option + *------------------------------------------------------------------------- + */ - if (h5repack_init (&pack_options, 0, FALSE) < 0) + if (h5repack_init(&pack_options, 0, FALSE) < 0) GOERROR; - if (h5repack_addfilter("dset1:GZIP=9",&pack_options) < 0) + if (h5repack_addfilter("dset1:GZIP=9", &pack_options) < 0) GOERROR; - if (h5repack_addlayout("dset1:CHUNK=20x10",&pack_options) < 0) + if (h5repack_addlayout("dset1:CHUNK=20x10", &pack_options) < 0) GOERROR; - if (h5repack(FNAME4,FNAME4OUT,&pack_options) < 0) + if (h5repack(FNAME4, FNAME4OUT, &pack_options) < 0) GOERROR; - if (h5diff(FNAME4,FNAME4OUT,NULL,NULL,&diff_options) >0) + if (h5diff(FNAME4, FNAME4OUT, NULL, NULL, &diff_options) > 0) GOERROR; if (h5repack_verify(FNAME4, FNAME4OUT, &pack_options) <= 0) GOERROR; - if (h5repack_end (&pack_options) < 0) + if (h5repack_end(&pack_options) < 0) GOERROR; PASSED(); #else @@ -510,24 +505,24 @@ int main (void) TESTING(" adding deflate filter (new format)"); #ifdef H5_HAVE_FILTER_DEFLATE /*------------------------------------------------------------------------- - * test an individual object option - * For new format, "dset1" should be using Fixed Array indexing - *------------------------------------------------------------------------- - */ + * test an individual object option + * For new format, "dset1" should be using Fixed Array indexing + *------------------------------------------------------------------------- + */ - if (h5repack_init (&pack_options, 0, TRUE) < 0) + if (h5repack_init(&pack_options, 0, TRUE) < 0) GOERROR; - if (h5repack_addfilter("dset1:GZIP=9",&pack_options) < 0) + if (h5repack_addfilter("dset1:GZIP=9", &pack_options) < 0) GOERROR; - if (h5repack_addlayout("dset1:CHUNK=20x10",&pack_options) < 0) + if (h5repack_addlayout("dset1:CHUNK=20x10", &pack_options) < 0) GOERROR; - if (h5repack(FNAME4,FNAME4OUT,&pack_options) < 0) + if (h5repack(FNAME4, FNAME4OUT, &pack_options) < 0) GOERROR; - if (h5diff(FNAME4,FNAME4OUT,NULL,NULL,&diff_options) >0) + if (h5diff(FNAME4, FNAME4OUT, NULL, NULL, &diff_options) > 0) GOERROR; if (h5repack_verify(FNAME4, FNAME4OUT, &pack_options) <= 0) GOERROR; - if (h5repack_end (&pack_options) < 0) + if (h5repack_end(&pack_options) < 0) GOERROR; PASSED(); #else @@ -535,27 +530,27 @@ int main (void) #endif /*------------------------------------------------------------------------- - * test all objects option - *------------------------------------------------------------------------- - */ + * test all objects option + *------------------------------------------------------------------------- + */ TESTING(" adding deflate filter to all"); #ifdef H5_HAVE_FILTER_DEFLATE - if (h5repack_init (&pack_options, 0, FALSE) < 0) + if (h5repack_init(&pack_options, 0, FALSE) < 0) GOERROR; - if (h5repack_addfilter("GZIP=1",&pack_options) < 0) + if (h5repack_addfilter("GZIP=1", &pack_options) < 0) GOERROR; - if (h5repack_addlayout("CHUNK=20x10",&pack_options) < 0) + if (h5repack_addlayout("CHUNK=20x10", &pack_options) < 0) GOERROR; - if (h5repack(FNAME4,FNAME4OUT,&pack_options) < 0) + if (h5repack(FNAME4, FNAME4OUT, &pack_options) < 0) GOERROR; - if (h5diff(FNAME4,FNAME4OUT,NULL,NULL,&diff_options) >0) + if (h5diff(FNAME4, FNAME4OUT, NULL, NULL, &diff_options) > 0) GOERROR; - if (h5repack_verify(FNAME4, FNAME4OUT,&pack_options)<=0) + if (h5repack_verify(FNAME4, FNAME4OUT, &pack_options) <= 0) GOERROR; - if (h5repack_end (&pack_options) < 0) + if (h5repack_end(&pack_options) < 0) GOERROR; PASSED(); @@ -564,40 +559,40 @@ int main (void) #endif /*------------------------------------------------------------------------- - * SZIP - *------------------------------------------------------------------------- - */ + * SZIP + *------------------------------------------------------------------------- + */ TESTING(" adding szip filter"); #if defined (H5_HAVE_FILTER_SZIP) - if (h5tools_can_encode(H5Z_FILTER_SZIP) >0) { + if (h5tools_can_encode(H5Z_FILTER_SZIP) > 0) szip_can_encode = 1; - } /*------------------------------------------------------------------------- - * test an individual object option - *------------------------------------------------------------------------- - */ + * test an individual object option + *------------------------------------------------------------------------- + */ if (szip_can_encode) { if (h5repack_init (&pack_options, 0, FALSE) < 0) GOERROR; - if (h5repack_addfilter("dset2:SZIP=8,EC",&pack_options) < 0) + if (h5repack_addfilter("dset2:SZIP=8,EC", &pack_options) < 0) GOERROR; - if (h5repack_addlayout("dset2:CHUNK=20x10",&pack_options) < 0) + if (h5repack_addlayout("dset2:CHUNK=20x10", &pack_options) < 0) GOERROR; - if (h5repack(FNAME4,FNAME4OUT,&pack_options) < 0) + if (h5repack(FNAME4, FNAME4OUT, &pack_options) < 0) GOERROR; - if (h5diff(FNAME4,FNAME4OUT,NULL,NULL,&diff_options) >0) + if (h5diff(FNAME4, FNAME4OUT, NULL, NULL, &diff_options) > 0) GOERROR; - if (h5repack_verify(FNAME4, FNAME4OUT,&pack_options)<=0) + if (h5repack_verify(FNAME4, FNAME4OUT, &pack_options) <= 0) GOERROR; if (h5repack_end (&pack_options) < 0) GOERROR; PASSED(); - } else { + } + else { SKIPPED(); } #else @@ -606,28 +601,29 @@ int main (void) /*------------------------------------------------------------------------- - * test all objects option - *------------------------------------------------------------------------- - */ + * test all objects option + *------------------------------------------------------------------------- + */ TESTING(" adding szip filter to all"); #if defined (H5_HAVE_FILTER_SZIP) if (szip_can_encode) { - if (h5repack_init (&pack_options, 0, FALSE) < 0) + if (h5repack_init(&pack_options, 0, FALSE) < 0) GOERROR; - if (h5repack_addfilter("SZIP=8,NN",&pack_options) < 0) + if (h5repack_addfilter("SZIP=8,NN", &pack_options) < 0) GOERROR; - if (h5repack(FNAME4,FNAME4OUT,&pack_options) < 0) + if (h5repack(FNAME4, FNAME4OUT, &pack_options) < 0) GOERROR; - if (h5diff(FNAME4,FNAME4OUT,NULL,NULL,&diff_options) >0) + if (h5diff(FNAME4, FNAME4OUT, NULL, NULL, &diff_options) > 0) GOERROR; - if (h5repack_verify(FNAME4, FNAME4OUT,&pack_options)<=0) + if (h5repack_verify(FNAME4, FNAME4OUT, &pack_options) <= 0) GOERROR; - if (h5repack_end (&pack_options) < 0) + if (h5repack_end(&pack_options) < 0) GOERROR; PASSED(); - } else { + } + else { SKIPPED(); } #else @@ -638,47 +634,47 @@ int main (void) TESTING(" addding shuffle filter"); /*------------------------------------------------------------------------- - * test an individual object option - *------------------------------------------------------------------------- - */ + * test an individual object option + *------------------------------------------------------------------------- + */ - if (h5repack_init (&pack_options, 0, FALSE) < 0) + if (h5repack_init(&pack_options, 0, FALSE) < 0) GOERROR; - if (h5repack_addfilter("dset1:SHUF",&pack_options) < 0) + if (h5repack_addfilter("dset1:SHUF", &pack_options) < 0) GOERROR; - if (h5repack_addlayout("dset1:CHUNK=20x10",&pack_options) < 0) + if (h5repack_addlayout("dset1:CHUNK=20x10", &pack_options) < 0) GOERROR; - if (h5repack(FNAME4,FNAME4OUT,&pack_options) < 0) + if (h5repack(FNAME4, FNAME4OUT, &pack_options) < 0) GOERROR; - if (h5diff(FNAME4,FNAME4OUT,NULL,NULL,&diff_options) >0) + if (h5diff(FNAME4, FNAME4OUT, NULL, NULL, &diff_options) > 0) GOERROR; - if (h5repack_verify(FNAME4, FNAME4OUT,&pack_options)<=0) + if (h5repack_verify(FNAME4, FNAME4OUT, &pack_options) <= 0) GOERROR; - if (h5repack_end (&pack_options) < 0) + if (h5repack_end(&pack_options) < 0) GOERROR; PASSED(); /*------------------------------------------------------------------------- - * test all objects option - *------------------------------------------------------------------------- - */ + * test all objects option + *------------------------------------------------------------------------- + */ TESTING(" addding shuffle filter to all"); - if (h5repack_init (&pack_options, 0, FALSE) < 0) + if (h5repack_init(&pack_options, 0, FALSE) < 0) GOERROR; - if (h5repack_addfilter("SHUF",&pack_options) < 0) + if (h5repack_addfilter("SHUF", &pack_options) < 0) GOERROR; - if (h5repack_addlayout("CHUNK=20x10",&pack_options) < 0) + if (h5repack_addlayout("CHUNK=20x10", &pack_options) < 0) GOERROR; - if (h5repack(FNAME4,FNAME4OUT,&pack_options) < 0) + if (h5repack(FNAME4, FNAME4OUT, &pack_options) < 0) GOERROR; - if (h5diff(FNAME4,FNAME4OUT,NULL,NULL,&diff_options) >0) + if (h5diff(FNAME4, FNAME4OUT, NULL, NULL, &diff_options) > 0) GOERROR; - if (h5repack_verify(FNAME4, FNAME4OUT,&pack_options)<=0) + if (h5repack_verify(FNAME4, FNAME4OUT, &pack_options) <= 0) GOERROR; - if (h5repack_end (&pack_options) < 0) + if (h5repack_end(&pack_options) < 0) GOERROR; PASSED(); @@ -687,48 +683,45 @@ int main (void) TESTING(" adding checksum filter"); /*------------------------------------------------------------------------- - * test an individual object option - *------------------------------------------------------------------------- - */ - - if (h5repack_init (&pack_options, 0, FALSE) < 0) + * test an individual object option + *------------------------------------------------------------------------- + */ + if (h5repack_init(&pack_options, 0, FALSE) < 0) GOERROR; - if (h5repack_addfilter("dset1:FLET",&pack_options) < 0) + if (h5repack_addfilter("dset1:FLET", &pack_options) < 0) GOERROR; - if (h5repack_addlayout("dset1:CHUNK=20x10",&pack_options) < 0) + if (h5repack_addlayout("dset1:CHUNK=20x10", &pack_options) < 0) GOERROR; - if (h5repack(FNAME4,FNAME4OUT,&pack_options) < 0) + if (h5repack(FNAME4, FNAME4OUT, &pack_options) < 0) GOERROR; - if (h5diff(FNAME4,FNAME4OUT,NULL,NULL,&diff_options) >0) + if (h5diff(FNAME4, FNAME4OUT, NULL, NULL, &diff_options) > 0) GOERROR; - if (h5repack_verify(FNAME4, FNAME4OUT,&pack_options)<=0) + if (h5repack_verify(FNAME4, FNAME4OUT, &pack_options) <= 0) GOERROR; - if (h5repack_end (&pack_options) < 0) + if (h5repack_end(&pack_options) < 0) GOERROR; PASSED(); /*------------------------------------------------------------------------- - * test all objects option - *------------------------------------------------------------------------- - */ - - + * test all objects option + *------------------------------------------------------------------------- + */ TESTING(" adding checksum filter to all"); - if (h5repack_init (&pack_options, 0, FALSE) < 0) + if (h5repack_init(&pack_options, 0, FALSE) < 0) GOERROR; - if (h5repack_addfilter("FLET",&pack_options) < 0) + if (h5repack_addfilter("FLET", &pack_options) < 0) GOERROR; - if (h5repack_addlayout("CHUNK=20x10",&pack_options) < 0) + if (h5repack_addlayout("CHUNK=20x10", &pack_options) < 0) GOERROR; - if (h5repack(FNAME4,FNAME4OUT,&pack_options) < 0) + if (h5repack(FNAME4, FNAME4OUT, &pack_options) < 0) GOERROR; - if (h5diff(FNAME4,FNAME4OUT,NULL,NULL,&diff_options) >0) + if (h5diff(FNAME4, FNAME4OUT, NULL, NULL, &diff_options) > 0) GOERROR; - if (h5repack_verify(FNAME4, FNAME4OUT,&pack_options)<=0) + if (h5repack_verify(FNAME4, FNAME4OUT, &pack_options) <= 0) GOERROR; - if (h5repack_end (&pack_options) < 0) + if (h5repack_end(&pack_options) < 0) GOERROR; PASSED(); @@ -737,38 +730,38 @@ int main (void) TESTING(" filter queue fletcher, shuffle, deflate, szip"); /*------------------------------------------------------------------------- - * add some filters - *------------------------------------------------------------------------- - */ + * add some filters + *------------------------------------------------------------------------- + */ - if (h5repack_init (&pack_options, 0, FALSE) < 0) + if (h5repack_init(&pack_options, 0, FALSE) < 0) GOERROR; - if (h5repack_addlayout("dset1:CHUNK 20x10",&pack_options) < 0) + if (h5repack_addlayout("dset1:CHUNK 20x10", &pack_options) < 0) GOERROR; - if (h5repack_addfilter("dset1:FLET",&pack_options) < 0) + if (h5repack_addfilter("dset1:FLET", &pack_options) < 0) GOERROR; - if (h5repack_addfilter("dset1:SHUF",&pack_options) < 0) + if (h5repack_addfilter("dset1:SHUF", &pack_options) < 0) GOERROR; #if defined (H5_HAVE_FILTER_SZIP) if (szip_can_encode) { - if (h5repack_addfilter("dset1:SZIP=8,NN",&pack_options) < 0) + if (h5repack_addfilter("dset1:SZIP=8,NN", &pack_options) < 0) GOERROR; } #endif #ifdef H5_HAVE_FILTER_DEFLATE - if (h5repack_addfilter("dset1:GZIP=1",&pack_options) < 0) + if (h5repack_addfilter("dset1:GZIP=1", &pack_options) < 0) GOERROR; #endif - if (h5repack(FNAME4,FNAME4OUT,&pack_options) < 0) + if (h5repack(FNAME4, FNAME4OUT, &pack_options) < 0) GOERROR; - if (h5diff(FNAME4,FNAME4OUT,NULL,NULL,&diff_options) >0) + if (h5diff(FNAME4, FNAME4OUT, NULL, NULL, &diff_options) > 0) GOERROR; - if (h5repack_verify(FNAME4, FNAME4OUT,&pack_options)<=0) + if (h5repack_verify(FNAME4, FNAME4OUT, &pack_options) <= 0) GOERROR; - if (h5repack_end (&pack_options) < 0) + if (h5repack_end(&pack_options) < 0) GOERROR; PASSED(); @@ -777,63 +770,63 @@ int main (void) TESTING(" adding layout chunked (old format)"); /*------------------------------------------------------------------------- - * test an individual object option - *------------------------------------------------------------------------- - */ + * test an individual object option + *------------------------------------------------------------------------- + */ - if (h5repack_init (&pack_options, 0, FALSE) < 0) + if (h5repack_init(&pack_options, 0, FALSE) < 0) GOERROR; - if (h5repack_addlayout("dset1:CHUNK=20x10",&pack_options) < 0) + if (h5repack_addlayout("dset1:CHUNK=20x10", &pack_options) < 0) GOERROR; - if (h5repack(FNAME4,FNAME4OUT,&pack_options) < 0) + if (h5repack(FNAME4, FNAME4OUT, &pack_options) < 0) GOERROR; - if (h5diff(FNAME4,FNAME4OUT,NULL,NULL,&diff_options) >0) + if (h5diff(FNAME4, FNAME4OUT, NULL, NULL, &diff_options) > 0) GOERROR; - if (h5repack_verify(FNAME4, FNAME4OUT, &pack_options )<= 0) + if (h5repack_verify(FNAME4, FNAME4OUT, &pack_options ) <= 0) GOERROR; - if (h5repack_end (&pack_options) < 0) + if (h5repack_end(&pack_options) < 0) GOERROR; PASSED(); TESTING(" adding layout chunked (new format)"); /*------------------------------------------------------------------------- - * test an individual object option - * For new format, "dset1" should be using Fixed Array indexing - *------------------------------------------------------------------------- - */ + * test an individual object option + * For new format, "dset1" should be using Fixed Array indexing + *------------------------------------------------------------------------- + */ - if (h5repack_init (&pack_options, 0, TRUE) < 0) + if (h5repack_init(&pack_options, 0, TRUE) < 0) GOERROR; - if (h5repack_addlayout("dset1:CHUNK=20x10",&pack_options) < 0) + if (h5repack_addlayout("dset1:CHUNK=20x10", &pack_options) < 0) GOERROR; - if (h5repack(FNAME4,FNAME4OUT,&pack_options) < 0) + if (h5repack(FNAME4, FNAME4OUT, &pack_options) < 0) GOERROR; - if (h5diff(FNAME4,FNAME4OUT,NULL,NULL,&diff_options) >0) + if (h5diff(FNAME4, FNAME4OUT, NULL, NULL, &diff_options) > 0) GOERROR; - if (h5repack_verify(FNAME4, FNAME4OUT, &pack_options )<= 0) + if (h5repack_verify(FNAME4, FNAME4OUT, &pack_options ) <= 0) GOERROR; - if (h5repack_end (&pack_options) < 0) + if (h5repack_end(&pack_options) < 0) GOERROR; PASSED(); /*------------------------------------------------------------------------- - * test all objects option - *------------------------------------------------------------------------- - */ + * test all objects option + *------------------------------------------------------------------------- + */ TESTING(" adding layout chunked to all"); - if (h5repack_init (&pack_options, 0, FALSE) < 0) + if (h5repack_init(&pack_options, 0, FALSE) < 0) GOERROR; - if (h5repack_addlayout("CHUNK=20x10",&pack_options) < 0) + if (h5repack_addlayout("CHUNK=20x10", &pack_options) < 0) GOERROR; - if (h5repack(FNAME4,FNAME4OUT,&pack_options) < 0) + if (h5repack(FNAME4, FNAME4OUT, &pack_options) < 0) GOERROR; - if (h5diff(FNAME4,FNAME4OUT,NULL,NULL,&diff_options) >0) + if (h5diff(FNAME4, FNAME4OUT, NULL, NULL, &diff_options) > 0) GOERROR; - if (h5repack_verify(FNAME4, FNAME4OUT,&pack_options)<=0) + if (h5repack_verify(FNAME4, FNAME4OUT, &pack_options) <= 0) GOERROR; - if (h5repack_end (&pack_options) < 0) + if (h5repack_end(&pack_options) < 0) GOERROR; PASSED(); @@ -841,20 +834,20 @@ int main (void) TESTING(" adding layout contiguous"); /*------------------------------------------------------------------------- - * test an individual object option - *------------------------------------------------------------------------- - */ - if (h5repack_init (&pack_options, 0, FALSE) < 0) + * test an individual object option + *------------------------------------------------------------------------- + */ + if (h5repack_init(&pack_options, 0, FALSE) < 0) GOERROR; - if (h5repack_addlayout("dset1:CONTI",&pack_options) < 0) + if (h5repack_addlayout("dset1:CONTI", &pack_options) < 0) GOERROR; - if (h5repack(FNAME4,FNAME4OUT,&pack_options) < 0) + if (h5repack(FNAME4, FNAME4OUT, &pack_options) < 0) GOERROR; - if (h5diff(FNAME4,FNAME4OUT,NULL,NULL,&diff_options) >0) + if (h5diff(FNAME4, FNAME4OUT, NULL, NULL, &diff_options) > 0) GOERROR; - if (h5repack_verify(FNAME4, FNAME4OUT,&pack_options)<=0) + if (h5repack_verify(FNAME4, FNAME4OUT, &pack_options) <= 0) GOERROR; - if (h5repack_end (&pack_options) < 0) + if (h5repack_end(&pack_options) < 0) GOERROR; PASSED(); @@ -862,37 +855,37 @@ int main (void) TESTING(" adding layout contiguous to all"); /*------------------------------------------------------------------------- - * test all objects option - *------------------------------------------------------------------------- - */ - if (h5repack_init (&pack_options, 0, FALSE) < 0) + * test all objects option + *------------------------------------------------------------------------- + */ + if (h5repack_init(&pack_options, 0, FALSE) < 0) GOERROR; - if (h5repack_addlayout("CONTI",&pack_options) < 0) + if (h5repack_addlayout("CONTI", &pack_options) < 0) GOERROR; - if (h5repack(FNAME4,FNAME4OUT,&pack_options) < 0) + if (h5repack(FNAME4, FNAME4OUT, &pack_options) < 0) GOERROR; - if (h5diff(FNAME4,FNAME4OUT,NULL,NULL,&diff_options) >0) + if (h5diff(FNAME4, FNAME4OUT, NULL, NULL, &diff_options) > 0) GOERROR; - if (h5repack_verify(FNAME4, FNAME4OUT,&pack_options)<=0) + if (h5repack_verify(FNAME4, FNAME4OUT, &pack_options) <= 0) GOERROR; - if (h5repack_end (&pack_options) < 0) + if (h5repack_end(&pack_options) < 0) GOERROR; /*------------------------------------------------------------------------- - * do the same test for a file with filters (chunked) - *------------------------------------------------------------------------- - */ - if (h5repack_init (&pack_options, 0, FALSE) < 0) + * do the same test for a file with filters (chunked) + *------------------------------------------------------------------------- + */ + if (h5repack_init(&pack_options, 0, FALSE) < 0) GOERROR; - if (h5repack_addlayout("CONTI",&pack_options) < 0) + if (h5repack_addlayout("CONTI", &pack_options) < 0) GOERROR; - if (h5repack(FNAME8,FNAME8OUT,&pack_options) < 0) + if (h5repack(FNAME8, FNAME8OUT, &pack_options) < 0) GOERROR; - if (h5diff(FNAME8,FNAME8OUT,NULL,NULL,&diff_options) >0) + if (h5diff(FNAME8, FNAME8OUT, NULL, NULL, &diff_options) > 0) GOERROR; - if (h5repack_verify(FNAME8, FNAME8OUT,&pack_options)<=0) + if (h5repack_verify(FNAME8, FNAME8OUT, &pack_options) <= 0) GOERROR; - if (h5repack_end (&pack_options) < 0) + if (h5repack_end(&pack_options) < 0) GOERROR; PASSED(); @@ -900,42 +893,42 @@ int main (void) TESTING(" adding layout compact"); /*------------------------------------------------------------------------- - * test an individual object option - *------------------------------------------------------------------------- - */ + * test an individual object option + *------------------------------------------------------------------------- + */ - if (h5repack_init (&pack_options, 0, FALSE) < 0) + if (h5repack_init(&pack_options, 0, FALSE) < 0) GOERROR; - if (h5repack_addlayout("dset1:COMPA",&pack_options) < 0) + if (h5repack_addlayout("dset1:COMPA", &pack_options) < 0) GOERROR; - if (h5repack(FNAME4,FNAME4OUT,&pack_options) < 0) + if (h5repack(FNAME4, FNAME4OUT, &pack_options) < 0) GOERROR; - if (h5diff(FNAME4,FNAME4OUT,NULL,NULL,&diff_options) >0) + if (h5diff(FNAME4, FNAME4OUT, NULL, NULL, &diff_options) > 0) GOERROR; - if (h5repack_verify(FNAME4, FNAME4OUT,&pack_options)<=0) + if (h5repack_verify(FNAME4, FNAME4OUT, &pack_options) <= 0) GOERROR; - if (h5repack_end (&pack_options) < 0) + if (h5repack_end(&pack_options) < 0) GOERROR; PASSED(); TESTING(" adding layout compact to all"); /*------------------------------------------------------------------------- - * test all objects option - *------------------------------------------------------------------------- - */ + * test all objects option + *------------------------------------------------------------------------- + */ - if (h5repack_init (&pack_options, 0, FALSE) < 0) + if (h5repack_init(&pack_options, 0, FALSE) < 0) GOERROR; - if (h5repack_addlayout("COMPA",&pack_options) < 0) + if (h5repack_addlayout("COMPA", &pack_options) < 0) GOERROR; - if (h5repack(FNAME4,FNAME4OUT,&pack_options) < 0) + if (h5repack(FNAME4, FNAME4OUT, &pack_options) < 0) GOERROR; - if (h5diff(FNAME4,FNAME4OUT,NULL,NULL,&diff_options) >0) + if (h5diff(FNAME4, FNAME4OUT, NULL, NULL, &diff_options) > 0) GOERROR; - if (h5repack_verify(FNAME4, FNAME4OUT,&pack_options)<=0) + if (h5repack_verify(FNAME4, FNAME4OUT, &pack_options) <= 0) GOERROR; - if (h5repack_end (&pack_options) < 0) + if (h5repack_end(&pack_options) < 0) GOERROR; PASSED(); @@ -944,210 +937,209 @@ int main (void) TESTING(" layout compact to contiguous conversion"); /*------------------------------------------------------------------------- - * layout compact to contiguous conversion - *------------------------------------------------------------------------- - */ - if (h5repack_init (&pack_options, 0, FALSE) < 0) + * layout compact to contiguous conversion + *------------------------------------------------------------------------- + */ + if (h5repack_init(&pack_options, 0, FALSE) < 0) GOERROR; - if (h5repack_addlayout("dset_compact:CONTI",&pack_options) < 0) + if (h5repack_addlayout("dset_compact:CONTI", &pack_options) < 0) GOERROR; - if (h5repack(FNAME4,FNAME4OUT,&pack_options) < 0) + if (h5repack(FNAME4, FNAME4OUT, &pack_options) < 0) GOERROR; - if (h5diff(FNAME4,FNAME4OUT,NULL,NULL,&diff_options) >0) + if (h5diff(FNAME4, FNAME4OUT, NULL, NULL, &diff_options) > 0) GOERROR; - if (h5repack_verify(FNAME4, FNAME4OUT,&pack_options)<=0) + if (h5repack_verify(FNAME4, FNAME4OUT, &pack_options) <= 0) GOERROR; - if (h5repack_end (&pack_options) < 0) + if (h5repack_end(&pack_options) < 0) GOERROR; PASSED(); TESTING(" layout compact to chunk conversion"); /*------------------------------------------------------------------------- - * layout compact to chunk conversion - *------------------------------------------------------------------------- - */ - if (h5repack_init (&pack_options, 0, FALSE) < 0) + * layout compact to chunk conversion + *------------------------------------------------------------------------- + */ + if (h5repack_init(&pack_options, 0, FALSE) < 0) GOERROR; - if (h5repack_addlayout("dset_compact:CHUNK=2x5",&pack_options) < 0) + if (h5repack_addlayout("dset_compact:CHUNK=2x5", &pack_options) < 0) GOERROR; - if (h5repack(FNAME4,FNAME4OUT,&pack_options) < 0) + if (h5repack(FNAME4, FNAME4OUT, &pack_options) < 0) GOERROR; - if (h5diff(FNAME4,FNAME4OUT,NULL,NULL,&diff_options) >0) + if (h5diff(FNAME4, FNAME4OUT, NULL, NULL, &diff_options) > 0) GOERROR; - if (h5repack_verify(FNAME4, FNAME4OUT,&pack_options)<=0) + if (h5repack_verify(FNAME4, FNAME4OUT, &pack_options) <= 0) GOERROR; - if (h5repack_end (&pack_options) < 0) + if (h5repack_end(&pack_options) < 0) GOERROR; PASSED(); TESTING(" layout compact to compact conversion"); /*------------------------------------------------------------------------- - * layout compact to compact conversion - *------------------------------------------------------------------------- - */ - if (h5repack_init (&pack_options, 0, FALSE) < 0) + * layout compact to compact conversion + *------------------------------------------------------------------------- + */ + if (h5repack_init(&pack_options, 0, FALSE) < 0) GOERROR; - if (h5repack_addlayout("dset_compact:COMPA",&pack_options) < 0) + if (h5repack_addlayout("dset_compact:COMPA", &pack_options) < 0) GOERROR; - if (h5repack(FNAME4,FNAME4OUT,&pack_options) < 0) + if (h5repack(FNAME4, FNAME4OUT, &pack_options) < 0) GOERROR; - if (h5diff(FNAME4,FNAME4OUT,NULL,NULL,&diff_options) >0) + if (h5diff(FNAME4, FNAME4OUT, NULL, NULL, &diff_options) >0) GOERROR; - if (h5repack_verify(FNAME4, FNAME4OUT,&pack_options)<=0) + if (h5repack_verify(FNAME4, FNAME4OUT, &pack_options)<= 0) GOERROR; - if (h5repack_end (&pack_options) < 0) + if (h5repack_end(&pack_options) < 0) GOERROR; PASSED(); TESTING(" layout contiguous to compact conversion"); /*------------------------------------------------------------------------- - * layout contiguous to compact conversion - *------------------------------------------------------------------------- - */ - if (h5repack_init (&pack_options, 0, FALSE) < 0) + * layout contiguous to compact conversion + *------------------------------------------------------------------------- + */ + if (h5repack_init(&pack_options, 0, FALSE) < 0) GOERROR; - if (h5repack_addlayout("dset_contiguous:COMPA",&pack_options) < 0) + if (h5repack_addlayout("dset_contiguous:COMPA", &pack_options) < 0) GOERROR; - if (h5repack(FNAME4,FNAME4OUT,&pack_options) < 0) + if (h5repack(FNAME4, FNAME4OUT, &pack_options) < 0) GOERROR; - if (h5diff(FNAME4,FNAME4OUT,NULL,NULL,&diff_options) >0) + if (h5diff(FNAME4, FNAME4OUT, NULL, NULL, &diff_options) > 0) GOERROR; - if (h5repack_verify(FNAME4, FNAME4OUT,&pack_options)<=0) + if (h5repack_verify(FNAME4, FNAME4OUT, &pack_options) <= 0) GOERROR; - if (h5repack_end (&pack_options) < 0) + if (h5repack_end(&pack_options) < 0) GOERROR; PASSED(); TESTING(" layout contiguous to chunk conversion"); /*------------------------------------------------------------------------- - * layout contiguous to chunk conversion - *------------------------------------------------------------------------- - */ - if (h5repack_init (&pack_options, 0, FALSE) < 0) + * layout contiguous to chunk conversion + *------------------------------------------------------------------------- + */ + if (h5repack_init(&pack_options, 0, FALSE) < 0) GOERROR; - if (h5repack_addlayout("dset_contiguous:CHUNK=3x6",&pack_options) < 0) + if (h5repack_addlayout("dset_contiguous:CHUNK=3x6", &pack_options) < 0) GOERROR; - if (h5repack(FNAME4,FNAME4OUT,&pack_options) < 0) + if (h5repack(FNAME4, FNAME4OUT, &pack_options) < 0) GOERROR; - if (h5diff(FNAME4,FNAME4OUT,NULL,NULL,&diff_options) >0) + if (h5diff(FNAME4, FNAME4OUT, NULL, NULL, &diff_options) > 0) GOERROR; - if (h5repack_verify(FNAME4, FNAME4OUT,&pack_options)<=0) + if (h5repack_verify(FNAME4, FNAME4OUT, &pack_options) <= 0) GOERROR; - if (h5repack_end (&pack_options) < 0) + if (h5repack_end(&pack_options) < 0) GOERROR; PASSED(); TESTING(" layout contiguous to contiguous conversion"); /*------------------------------------------------------------------------- - * layout contiguous to contiguous conversion - *------------------------------------------------------------------------- - */ - if (h5repack_init (&pack_options, 0, FALSE) < 0) + * layout contiguous to contiguous conversion + *------------------------------------------------------------------------- + */ + if (h5repack_init(&pack_options, 0, FALSE) < 0) GOERROR; - if (h5repack_addlayout("dset_contiguous:CONTI",&pack_options) < 0) + if (h5repack_addlayout("dset_contiguous:CONTI", &pack_options) < 0) GOERROR; - if (h5repack(FNAME4,FNAME4OUT,&pack_options) < 0) + if (h5repack(FNAME4, FNAME4OUT, &pack_options) < 0) GOERROR; - if (h5diff(FNAME4,FNAME4OUT,NULL,NULL,&diff_options) >0) + if (h5diff(FNAME4, FNAME4OUT, NULL, NULL, &diff_options) > 0) GOERROR; - if (h5repack_verify(FNAME4, FNAME4OUT,&pack_options)<=0) + if (h5repack_verify(FNAME4, FNAME4OUT, &pack_options) <= 0) GOERROR; - if (h5repack_end (&pack_options) < 0) + if (h5repack_end(&pack_options) < 0) GOERROR; PASSED(); TESTING(" layout chunked to compact conversion"); /*------------------------------------------------------------------------- - * layout chunked to compact conversion - *------------------------------------------------------------------------- - */ - if (h5repack_init (&pack_options, 0, FALSE) < 0) + * layout chunked to compact conversion + *------------------------------------------------------------------------- + */ + if (h5repack_init(&pack_options, 0, FALSE) < 0) GOERROR; - if (h5repack_addlayout("dset_chunk:COMPA",&pack_options) < 0) + if (h5repack_addlayout("dset_chunk:COMPA", &pack_options) < 0) GOERROR; - if (h5repack(FNAME4,FNAME4OUT,&pack_options) < 0) + if (h5repack(FNAME4, FNAME4OUT, &pack_options) < 0) GOERROR; - if (h5diff(FNAME4,FNAME4OUT,NULL,NULL,&diff_options) >0) + if (h5diff(FNAME4, FNAME4OUT, NULL, NULL, &diff_options) > 0) GOERROR; - if (h5repack_verify(FNAME4, FNAME4OUT,&pack_options)<=0) + if (h5repack_verify(FNAME4, FNAME4OUT, &pack_options) <= 0) GOERROR; - if (h5repack_end (&pack_options) < 0) + if (h5repack_end(&pack_options) < 0) GOERROR; PASSED(); TESTING(" layout chunked to contiguous conversion"); /*------------------------------------------------------------------------- - * layout chunked to contiguous conversion - *------------------------------------------------------------------------- - */ - if (h5repack_init (&pack_options, 0, FALSE) < 0) + * layout chunked to contiguous conversion + *------------------------------------------------------------------------- + */ + if (h5repack_init(&pack_options, 0, FALSE) < 0) GOERROR; - if (h5repack_addlayout("dset_chunk:CONTI",&pack_options) < 0) + if (h5repack_addlayout("dset_chunk:CONTI", &pack_options) < 0) GOERROR; - if (h5repack(FNAME4,FNAME4OUT,&pack_options) < 0) + if (h5repack(FNAME4, FNAME4OUT, &pack_options) < 0) GOERROR; - if (h5diff(FNAME4,FNAME4OUT,NULL,NULL,&diff_options) >0) + if (h5diff(FNAME4, FNAME4OUT, NULL, NULL, &diff_options) > 0) GOERROR; - if (h5repack_verify(FNAME4, FNAME4OUT,&pack_options)<=0) + if (h5repack_verify(FNAME4, FNAME4OUT, &pack_options) <= 0) GOERROR; - if (h5repack_end (&pack_options) < 0) + if (h5repack_end(&pack_options) < 0) GOERROR; PASSED(); TESTING(" layout chunked to chunk conversion"); /*------------------------------------------------------------------------- - * layout chunked to chunked conversion - *------------------------------------------------------------------------- - */ - if (h5repack_init (&pack_options, 0, FALSE) < 0) + * layout chunked to chunked conversion + *------------------------------------------------------------------------- + */ + if (h5repack_init(&pack_options, 0, FALSE) < 0) GOERROR; - if (h5repack_addlayout("dset_chunk:CHUNK=18x13",&pack_options) < 0) + if (h5repack_addlayout("dset_chunk:CHUNK=18x13", &pack_options) < 0) GOERROR; - if (h5repack(FNAME4,FNAME4OUT,&pack_options) < 0) + if (h5repack(FNAME4, FNAME4OUT, &pack_options) < 0) GOERROR; - if (h5diff(FNAME4,FNAME4OUT,NULL,NULL,&diff_options) >0) + if (h5diff(FNAME4, FNAME4OUT, NULL, NULL, &diff_options) > 0) GOERROR; - if (h5repack_verify(FNAME4, FNAME4OUT,&pack_options)<=0) + if (h5repack_verify(FNAME4, FNAME4OUT, &pack_options) <= 0) GOERROR; - if (h5repack_end (&pack_options) < 0) + if (h5repack_end(&pack_options) < 0) GOERROR; PASSED(); /*------------------------------------------------------------------------- - * the following tests assume the input files have filters - * FNAME7 - * FNAME8 - * FNAME9 - * FNAME10 - * FNAME11 - *------------------------------------------------------------------------- - */ - - + * the following tests assume the input files have filters + * FNAME7 + * FNAME8 + * FNAME9 + * FNAME10 + * FNAME11 + *------------------------------------------------------------------------- + */ TESTING(" copy of szip filter"); #if defined (H5_HAVE_FILTER_SZIP) if (szip_can_encode) { - if (h5repack_init (&pack_options, 0, FALSE) < 0) + if (h5repack_init(&pack_options, 0, FALSE) < 0) GOERROR; - if (h5repack(FNAME7,FNAME7OUT,&pack_options) < 0) + if (h5repack(FNAME7, FNAME7OUT, &pack_options) < 0) GOERROR; - if (h5diff(FNAME7,FNAME7OUT,NULL,NULL,&diff_options) >0) + if (h5diff(FNAME7, FNAME7OUT, NULL, NULL, &diff_options) > 0) GOERROR; - if (h5repack_verify(FNAME7, FNAME7OUT,&pack_options)<=0) + if (h5repack_verify(FNAME7, FNAME7OUT, &pack_options) <= 0) GOERROR; - if (h5repack_cmp_pl(FNAME7,FNAME7OUT)<=0) + if (h5repack_cmp_pl(FNAME7, FNAME7OUT) <= 0) GOERROR; - if (h5repack_end (&pack_options) < 0) + if (h5repack_end(&pack_options) < 0) GOERROR; PASSED(); - } else { + } + else { SKIPPED(); } #else @@ -1158,21 +1150,22 @@ int main (void) #if defined (H5_HAVE_FILTER_SZIP) if (szip_can_encode) { - if (h5repack_init (&pack_options, 0, FALSE) < 0) + if (h5repack_init(&pack_options, 0, FALSE) < 0) GOERROR; - if (h5repack_addfilter("dset_szip:NONE",&pack_options) < 0) + if (h5repack_addfilter("dset_szip:NONE", &pack_options) < 0) GOERROR; - if (h5repack(FNAME7,FNAME7OUT,&pack_options) < 0) + if (h5repack(FNAME7, FNAME7OUT, &pack_options) < 0) GOERROR; - if (h5diff(FNAME7,FNAME7OUT,NULL,NULL,&diff_options) >0) + if (h5diff(FNAME7, FNAME7OUT, NULL, NULL, &diff_options) > 0) GOERROR; - if (h5repack_verify(FNAME7, FNAME7OUT,&pack_options)<=0) + if (h5repack_verify(FNAME7, FNAME7OUT, &pack_options) <= 0) GOERROR; - if (h5repack_end (&pack_options) < 0) + if (h5repack_end(&pack_options) < 0) GOERROR; PASSED(); - } else { + } + else { SKIPPED(); } #else @@ -1183,15 +1176,15 @@ int main (void) TESTING(" copy of deflate filter"); #ifdef H5_HAVE_FILTER_DEFLATE - if (h5repack_init (&pack_options, 0, FALSE) < 0) + if (h5repack_init(&pack_options, 0, FALSE) < 0) GOERROR; - if (h5repack(FNAME8,FNAME8OUT,&pack_options) < 0) + if (h5repack(FNAME8, FNAME8OUT, &pack_options) < 0) GOERROR; - if (h5diff(FNAME8,FNAME8OUT,NULL,NULL,&diff_options) >0) + if (h5diff(FNAME8, FNAME8OUT, NULL, NULL, &diff_options) > 0) GOERROR; - if (h5repack_verify(FNAME8, FNAME8OUT,&pack_options)<=0) + if (h5repack_verify(FNAME8, FNAME8OUT, &pack_options) <= 0) GOERROR; - if (h5repack_end (&pack_options) < 0) + if (h5repack_end(&pack_options) < 0) GOERROR; PASSED(); @@ -1203,17 +1196,17 @@ int main (void) TESTING(" removing deflate filter"); #ifdef H5_HAVE_FILTER_DEFLATE - if (h5repack_init (&pack_options, 0, FALSE) < 0) + if (h5repack_init(&pack_options, 0, FALSE) < 0) GOERROR; - if (h5repack_addfilter("dset_deflate:NONE",&pack_options) < 0) + if (h5repack_addfilter("dset_deflate:NONE", &pack_options) < 0) GOERROR; - if (h5repack(FNAME8,FNAME8OUT,&pack_options) < 0) + if (h5repack(FNAME8, FNAME8OUT, &pack_options) < 0) GOERROR; - if (h5diff(FNAME8,FNAME8OUT,NULL,NULL,&diff_options) >0) + if (h5diff(FNAME8, FNAME8OUT, NULL, NULL, &diff_options) > 0) GOERROR; - if (h5repack_verify(FNAME8, FNAME8OUT,&pack_options)<=0) + if (h5repack_verify(FNAME8, FNAME8OUT, &pack_options) <= 0) GOERROR; - if (h5repack_end (&pack_options) < 0) + if (h5repack_end(&pack_options) < 0) GOERROR; PASSED(); @@ -1225,15 +1218,15 @@ int main (void) TESTING(" copy of shuffle filter"); - if (h5repack_init (&pack_options, 0, FALSE) < 0) + if (h5repack_init(&pack_options, 0, FALSE) < 0) GOERROR; - if (h5repack(FNAME9,FNAME9OUT,&pack_options) < 0) + if (h5repack(FNAME9, FNAME9OUT, &pack_options) < 0) GOERROR; - if (h5diff(FNAME9,FNAME9OUT,NULL,NULL,&diff_options) >0) + if (h5diff(FNAME9, FNAME9OUT, NULL, NULL, &diff_options) > 0) GOERROR; - if (h5repack_verify(FNAME9, FNAME9OUT,&pack_options)<=0) + if (h5repack_verify(FNAME9, FNAME9OUT, &pack_options) <= 0) GOERROR; - if (h5repack_end (&pack_options) < 0) + if (h5repack_end(&pack_options) < 0) GOERROR; PASSED(); @@ -1241,17 +1234,17 @@ int main (void) TESTING(" removing shuffle filter"); - if (h5repack_init (&pack_options, 0, FALSE) < 0) + if (h5repack_init(&pack_options, 0, FALSE) < 0) GOERROR; - if (h5repack_addfilter("dset_shuffle:NONE",&pack_options) < 0) + if (h5repack_addfilter("dset_shuffle:NONE", &pack_options) < 0) GOERROR; - if (h5repack(FNAME9,FNAME9OUT,&pack_options) < 0) + if (h5repack(FNAME9, FNAME9OUT, &pack_options) < 0) GOERROR; - if (h5diff(FNAME9,FNAME9OUT,NULL,NULL,&diff_options) >0) + if (h5diff(FNAME9, FNAME9OUT, NULL, NULL, &diff_options) > 0) GOERROR; - if (h5repack_verify(FNAME9, FNAME9OUT,&pack_options)<=0) + if (h5repack_verify(FNAME9, FNAME9OUT, &pack_options) <= 0) GOERROR; - if (h5repack_end (&pack_options) < 0) + if (h5repack_end(&pack_options) < 0) GOERROR; PASSED(); @@ -1259,15 +1252,15 @@ int main (void) TESTING(" copy of fletcher filter"); - if (h5repack_init (&pack_options, 0, FALSE) < 0) + if (h5repack_init(&pack_options, 0, FALSE) < 0) GOERROR; - if (h5repack(FNAME10,FNAME10OUT,&pack_options) < 0) + if (h5repack(FNAME10, FNAME10OUT, &pack_options) < 0) GOERROR; - if (h5diff(FNAME10,FNAME10OUT,NULL,NULL,&diff_options) >0) + if (h5diff(FNAME10, FNAME10OUT, NULL, NULL, &diff_options) > 0) GOERROR; - if (h5repack_verify(FNAME10, FNAME10OUT,&pack_options)<=0) + if (h5repack_verify(FNAME10, FNAME10OUT, &pack_options) <= 0) GOERROR; - if (h5repack_end (&pack_options) < 0) + if (h5repack_end(&pack_options) < 0) GOERROR; PASSED(); @@ -1275,17 +1268,17 @@ int main (void) TESTING(" removing fletcher filter"); - if (h5repack_init (&pack_options, 0, FALSE) < 0) + if (h5repack_init(&pack_options, 0, FALSE) < 0) GOERROR; - if (h5repack_addfilter("dset_fletcher32:NONE",&pack_options) < 0) + if (h5repack_addfilter("dset_fletcher32:NONE", &pack_options) < 0) GOERROR; - if (h5repack(FNAME10,FNAME10OUT,&pack_options) < 0) + if (h5repack(FNAME10, FNAME10OUT, &pack_options) < 0) GOERROR; - if (h5diff(FNAME10,FNAME10OUT,NULL,NULL,&diff_options) >0) + if (h5diff(FNAME10, FNAME10OUT, NULL, NULL, &diff_options) > 0) GOERROR; - if (h5repack_verify(FNAME10, FNAME10OUT,&pack_options)<=0) + if (h5repack_verify(FNAME10, FNAME10OUT, &pack_options) <= 0) GOERROR; - if (h5repack_end (&pack_options) < 0) + if (h5repack_end(&pack_options) < 0) GOERROR; PASSED(); @@ -1293,15 +1286,15 @@ int main (void) TESTING(" copy of nbit filter"); - if (h5repack_init (&pack_options, 0, FALSE) < 0) + if (h5repack_init(&pack_options, 0, FALSE) < 0) GOERROR; - if (h5repack(FNAME12,FNAME12OUT,&pack_options) < 0) + if (h5repack(FNAME12, FNAME12OUT, &pack_options) < 0) GOERROR; - if (h5diff(FNAME12,FNAME12OUT,NULL,NULL,&diff_options) >0) + if (h5diff(FNAME12, FNAME12OUT, NULL, NULL, &diff_options) > 0) GOERROR; - if (h5repack_verify(FNAME12, FNAME12OUT,&pack_options)<=0) + if (h5repack_verify(FNAME12, FNAME12OUT, &pack_options) <= 0) GOERROR; - if (h5repack_end (&pack_options) < 0) + if (h5repack_end(&pack_options) < 0) GOERROR; PASSED(); @@ -1309,17 +1302,17 @@ int main (void) TESTING(" removing nbit filter"); - if (h5repack_init (&pack_options, 0, FALSE) < 0) + if (h5repack_init(&pack_options, 0, FALSE) < 0) GOERROR; - if (h5repack_addfilter("dset_nbit:NONE",&pack_options) < 0) + if (h5repack_addfilter("dset_nbit:NONE", &pack_options) < 0) GOERROR; - if (h5repack(FNAME12,FNAME12OUT,&pack_options) < 0) + if (h5repack(FNAME12, FNAME12OUT, &pack_options) < 0) GOERROR; - if (h5diff(FNAME12,FNAME12OUT,NULL,NULL,&diff_options) >0) + if (h5diff(FNAME12, FNAME12OUT, NULL, NULL, &diff_options) > 0) GOERROR; - if (h5repack_verify(FNAME12, FNAME12OUT,&pack_options)<=0) + if (h5repack_verify(FNAME12, FNAME12OUT, &pack_options) <= 0) GOERROR; - if (h5repack_end (&pack_options) < 0) + if (h5repack_end(&pack_options) < 0) GOERROR; PASSED(); @@ -1327,17 +1320,17 @@ int main (void) TESTING(" adding nbit filter"); - if (h5repack_init (&pack_options, 0, FALSE) < 0) + if (h5repack_init(&pack_options, 0, FALSE) < 0) GOERROR; - if (h5repack_addfilter("dset_int31:NBIT",&pack_options) < 0) + if (h5repack_addfilter("dset_int31:NBIT", &pack_options) < 0) GOERROR; - if (h5repack(FNAME12,FNAME12OUT,&pack_options) < 0) + if (h5repack(FNAME12, FNAME12OUT, &pack_options) < 0) GOERROR; - if (h5diff(FNAME12,FNAME12OUT,NULL,NULL,&diff_options) >0) + if (h5diff(FNAME12, FNAME12OUT, NULL, NULL, &diff_options) > 0) GOERROR; - if (h5repack_verify(FNAME12, FNAME12OUT,&pack_options)<=0) + if (h5repack_verify(FNAME12, FNAME12OUT, &pack_options)<= 0) GOERROR; - if (h5repack_end (&pack_options) < 0) + if (h5repack_end(&pack_options) < 0) GOERROR; PASSED(); @@ -1345,15 +1338,15 @@ int main (void) TESTING(" copy of scaleoffset filter"); - if (h5repack_init (&pack_options, 0, FALSE) < 0) + if (h5repack_init(&pack_options, 0, FALSE) < 0) GOERROR; - if (h5repack(FNAME13,FNAME13OUT,&pack_options) < 0) + if (h5repack(FNAME13, FNAME13OUT, &pack_options) < 0) GOERROR; - if (h5diff(FNAME13,FNAME13OUT,NULL,NULL,&diff_options) >0) + if (h5diff(FNAME13, FNAME13OUT, NULL, NULL, &diff_options) > 0) GOERROR; - if (h5repack_verify(FNAME13, FNAME13OUT,&pack_options)<=0) + if (h5repack_verify(FNAME13, FNAME13OUT, &pack_options) <= 0) GOERROR; - if (h5repack_end (&pack_options) < 0) + if (h5repack_end(&pack_options) < 0) GOERROR; PASSED(); @@ -1361,17 +1354,17 @@ int main (void) TESTING(" removing scaleoffset filter"); - if (h5repack_init (&pack_options, 0, FALSE) < 0) + if (h5repack_init(&pack_options, 0, FALSE) < 0) GOERROR; - if (h5repack_addfilter("dset_scaleoffset:NONE",&pack_options) < 0) + if (h5repack_addfilter("dset_scaleoffset:NONE", &pack_options) < 0) GOERROR; - if (h5repack(FNAME13,FNAME13OUT,&pack_options) < 0) + if (h5repack(FNAME13, FNAME13OUT, &pack_options) < 0) GOERROR; - if (h5diff(FNAME13,FNAME13OUT,NULL,NULL,&diff_options) >0) + if (h5diff(FNAME13, FNAME13OUT, NULL, NULL, &diff_options) > 0) GOERROR; - if (h5repack_verify(FNAME13, FNAME13OUT,&pack_options)<=0) + if (h5repack_verify(FNAME13, FNAME13OUT, &pack_options) <= 0) GOERROR; - if (h5repack_end (&pack_options) < 0) + if (h5repack_end(&pack_options) < 0) GOERROR; PASSED(); @@ -1379,53 +1372,52 @@ int main (void) TESTING(" adding scaleoffset filter"); - if (h5repack_init (&pack_options, 0, FALSE) < 0) + if (h5repack_init(&pack_options, 0, FALSE) < 0) GOERROR; - if (h5repack_addfilter("dset_none:SOFF=31,IN",&pack_options) < 0) + if (h5repack_addfilter("dset_none:SOFF=31,IN", &pack_options) < 0) GOERROR; - if (h5repack(FNAME13,FNAME13OUT,&pack_options) < 0) + if (h5repack(FNAME13, FNAME13OUT, &pack_options) < 0) GOERROR; - if (h5diff(FNAME13,FNAME13OUT,NULL,NULL,&diff_options) >0) + if (h5diff(FNAME13, FNAME13OUT, NULL, NULL, &diff_options) > 0) GOERROR; - if (h5repack_verify(FNAME13, FNAME13OUT,&pack_options)<=0) + if (h5repack_verify(FNAME13, FNAME13OUT, &pack_options) <= 0) GOERROR; - if (h5repack_end (&pack_options) < 0) + if (h5repack_end(&pack_options) < 0) GOERROR; PASSED(); /*------------------------------------------------------------------------- - * file with all filters - * dset_all - * dset_deflate - * dset_szip - * dset_shuffle - * dset_fletcher32 - *------------------------------------------------------------------------- - */ - - + * file with all filters + * dset_all + * dset_deflate + * dset_szip + * dset_shuffle + * dset_fletcher32 + *------------------------------------------------------------------------- + */ TESTING(" filter conversion from deflate to szip"); #if defined (H5_HAVE_FILTER_SZIP) && defined (H5_HAVE_FILTER_DEFLATE) if (szip_can_encode) { - if (h5repack_init (&pack_options, 0, FALSE) < 0) + if (h5repack_init(&pack_options, 0, FALSE) < 0) GOERROR; - if (h5repack_addfilter("dset_deflate:SZIP=8,NN",&pack_options) < 0) + if (h5repack_addfilter("dset_deflate:SZIP=8,NN", &pack_options) < 0) GOERROR; - if (h5repack(FNAME11,FNAME11OUT,&pack_options) < 0) + if (h5repack(FNAME11, FNAME11OUT, &pack_options) < 0) GOERROR; - if (h5diff(FNAME11,FNAME11OUT,NULL,NULL,&diff_options) >0) + if (h5diff(FNAME11, FNAME11OUT, NULL, NULL, &diff_options) > 0) GOERROR; - if (h5repack_verify(FNAME11, FNAME11OUT,&pack_options)<=0) + if (h5repack_verify(FNAME11, FNAME11OUT, &pack_options) <= 0) GOERROR; - if (h5repack_end (&pack_options) < 0) + if (h5repack_end(&pack_options) < 0) GOERROR; PASSED(); - } else { + } + else { SKIPPED(); } #else @@ -1437,21 +1429,22 @@ int main (void) #if defined (H5_HAVE_FILTER_SZIP) && defined (H5_HAVE_FILTER_DEFLATE) if (szip_can_encode) { - if (h5repack_init (&pack_options, 0, FALSE) < 0) + if (h5repack_init(&pack_options, 0, FALSE) < 0) GOERROR; - if (h5repack_addfilter("dset_szip:GZIP=1",&pack_options) < 0) + if (h5repack_addfilter("dset_szip:GZIP=1", &pack_options) < 0) GOERROR; - if (h5repack(FNAME11,FNAME11OUT,&pack_options) < 0) + if (h5repack(FNAME11, FNAME11OUT, &pack_options) < 0) GOERROR; - if (h5diff(FNAME11,FNAME11OUT,NULL,NULL,&diff_options) >0) + if (h5diff(FNAME11, FNAME11OUT, NULL, NULL, &diff_options) > 0) GOERROR; - if (h5repack_verify(FNAME11, FNAME11OUT,&pack_options)<=0) + if (h5repack_verify(FNAME11, FNAME11OUT, &pack_options) <= 0) GOERROR; - if (h5repack_end (&pack_options) < 0) + if (h5repack_end(&pack_options) < 0) GOERROR; PASSED(); - } else { + } + else { SKIPPED(); } #else @@ -1460,25 +1453,25 @@ int main (void) /*------------------------------------------------------------------------- - * test the NONE global option - *------------------------------------------------------------------------- - */ + * test the NONE global option + *------------------------------------------------------------------------- + */ TESTING(" removing all filters"); #if defined (H5_HAVE_FILTER_SZIP) && defined (H5_HAVE_FILTER_DEFLATE) - if (h5repack_init (&pack_options, 0, FALSE) < 0) + if (h5repack_init(&pack_options, 0, FALSE) < 0) GOERROR; - if (h5repack_addfilter("NONE",&pack_options) < 0) + if (h5repack_addfilter("NONE", &pack_options) < 0) GOERROR; - if (h5repack(FNAME11,FNAME11OUT,&pack_options) < 0) + if (h5repack(FNAME11, FNAME11OUT, &pack_options) < 0) GOERROR; - if (h5diff(FNAME11,FNAME11OUT,NULL,NULL,&diff_options) >0) + if (h5diff(FNAME11, FNAME11OUT, NULL, NULL, &diff_options) > 0) GOERROR; - if (h5repack_verify(FNAME11, FNAME11OUT,&pack_options)<=0) + if (h5repack_verify(FNAME11, FNAME11OUT, &pack_options) <= 0) GOERROR; - if (h5repack_end (&pack_options) < 0) + if (h5repack_end(&pack_options) < 0) GOERROR; PASSED(); @@ -1487,44 +1480,44 @@ int main (void) #endif /*------------------------------------------------------------------------- - * test a big file - *------------------------------------------------------------------------- - */ + * test a big file + *------------------------------------------------------------------------- + */ TESTING(" big file"); - if (h5repack_init (&pack_options, 0, FALSE) < 0) + if (h5repack_init(&pack_options, 0, FALSE) < 0) GOERROR; - if (h5repack(FNAME14,FNAME14OUT,&pack_options) < 0) + if (h5repack(FNAME14, FNAME14OUT, &pack_options) < 0) GOERROR; - if (h5diff(FNAME14,FNAME14OUT,NULL,NULL,&diff_options) >0) + if (h5diff(FNAME14, FNAME14OUT, NULL, NULL, &diff_options) > 0) GOERROR; - if (h5repack_verify(FNAME14, FNAME14OUT,&pack_options)<=0) + if (h5repack_verify(FNAME14, FNAME14OUT, &pack_options) <= 0) GOERROR; - if (h5repack_end (&pack_options) < 0) + if (h5repack_end(&pack_options) < 0) GOERROR; PASSED(); /*------------------------------------------------------------------------- - * test external dataset - *------------------------------------------------------------------------- - */ + * test external dataset + *------------------------------------------------------------------------- + */ TESTING(" external datasets"); - if (h5repack_init (&pack_options, 0, FALSE) < 0) + if (h5repack_init(&pack_options, 0, FALSE) < 0) GOERROR; - if (h5repack(FNAME15,FNAME15OUT,&pack_options) < 0) + if (h5repack(FNAME15, FNAME15OUT, &pack_options) < 0) GOERROR; - if (h5diff(FNAME15,FNAME15OUT,NULL,NULL,&diff_options) > 0) + if (h5diff(FNAME15, FNAME15OUT, NULL, NULL, &diff_options) > 0) GOERROR; - if (h5repack_verify(FNAME15, FNAME15OUT,&pack_options)<=0) + if (h5repack_verify(FNAME15, FNAME15OUT, &pack_options) <= 0) GOERROR; - if (h5repack_end (&pack_options) < 0) + if (h5repack_end(&pack_options) < 0) GOERROR; PASSED(); /*------------------------------------------------------------------------- - * test file with userblock - *------------------------------------------------------------------------- - */ + * test file with userblock + *------------------------------------------------------------------------- + */ TESTING(" file with userblock"); if(h5repack_init(&pack_options, 0, FALSE) < 0) GOERROR; @@ -1541,53 +1534,53 @@ int main (void) PASSED(); /*------------------------------------------------------------------------- - * test --latest options - *------------------------------------------------------------------------- - */ + * test --latest options + *------------------------------------------------------------------------- + */ TESTING(" latest file format options"); - if (h5repack_init (&pack_options, 0, FALSE) < 0) + if (h5repack_init(&pack_options, 0, FALSE) < 0) GOERROR; - pack_options.latest=1; - pack_options.grp_compact=10; - pack_options.grp_indexed=5; + pack_options.latest = 1; + pack_options.grp_compact = 10; + pack_options.grp_indexed = 5; pack_options.msg_size[0] = 10; pack_options.msg_size[1] = 20; pack_options.msg_size[2] = 30; pack_options.msg_size[3] = 40; pack_options.msg_size[4] = 50; - if (h5repack(FNAME1,FNAME1OUT,&pack_options) < 0) + if (h5repack(FNAME1, FNAME1OUT, &pack_options) < 0) GOERROR; - if (h5diff(FNAME1,FNAME1OUT,NULL,NULL,&diff_options) > 0) + if (h5diff(FNAME1, FNAME1OUT, NULL, NULL, &diff_options) > 0) GOERROR; - if (h5repack_verify(FNAME1, FNAME1OUT,&pack_options)<=0) + if (h5repack_verify(FNAME1, FNAME1OUT, &pack_options)<=0) GOERROR; - if (h5repack_end (&pack_options) < 0) + if (h5repack_end(&pack_options) < 0) GOERROR; PASSED(); /*------------------------------------------------------------------------- - * test several global filters - *------------------------------------------------------------------------- - */ + * test several global filters + *------------------------------------------------------------------------- + */ TESTING(" several global filters"); #if defined (H5_HAVE_FILTER_DEFLATE) - if (h5repack_init (&pack_options, 0, FALSE) < 0) + if (h5repack_init(&pack_options, 0, FALSE) < 0) GOERROR; - if (h5repack_addfilter("GZIP=1",&pack_options) < 0) + if (h5repack_addfilter("GZIP=1", &pack_options) < 0) GOERROR; - if (h5repack_addfilter("SHUF",&pack_options) < 0) + if (h5repack_addfilter("SHUF", &pack_options) < 0) GOERROR; - if (h5repack(FNAME11,FNAME11OUT,&pack_options) < 0) + if (h5repack(FNAME11, FNAME11OUT, &pack_options) < 0) GOERROR; - if (h5diff(FNAME11,FNAME11OUT,NULL,NULL,&diff_options) >0) + if (h5diff(FNAME11, FNAME11OUT, NULL, NULL, &diff_options) > 0) GOERROR; - if (h5repack_verify(FNAME11, FNAME11OUT,&pack_options)<=0) + if (h5repack_verify(FNAME11, FNAME11OUT, &pack_options) <= 0) GOERROR; - if (h5repack_end (&pack_options) < 0) + if (h5repack_end(&pack_options) < 0) GOERROR; PASSED(); @@ -1597,9 +1590,9 @@ int main (void) /*------------------------------------------------------------------------- - * test file with userblock - *------------------------------------------------------------------------- - */ + * test file with userblock + *------------------------------------------------------------------------- + */ TESTING(" file with added userblock"); #ifdef H5_HAVE_FILTER_DEFLATE @@ -1630,9 +1623,9 @@ int main (void) /*------------------------------------------------------------------------- - * test file with aligment - *------------------------------------------------------------------------- - */ + * test file with aligment + *------------------------------------------------------------------------- + */ TESTING(" file with aligment"); #ifdef H5_HAVE_FILTER_DEFLATE @@ -1655,20 +1648,20 @@ int main (void) { hsize_t threshold; hsize_t alignment; - hid_t fapl; - hid_t fid; + hid_t fapl; + hid_t fid; - if (( fid = H5Fopen(FNAME8OUT, H5F_ACC_RDONLY, H5P_DEFAULT)) < 0 ) + if ((fid = H5Fopen(FNAME8OUT, H5F_ACC_RDONLY, H5P_DEFAULT)) < 0) GOERROR; if ((fapl = H5Fget_access_plist(fid)) < 0) GOERROR; - if ( H5Pget_alignment(fapl, &threshold, &alignment ) < 0) + if (H5Pget_alignment(fapl, &threshold, &alignment) < 0) GOERROR; - if ( threshold != 1 ) + if (threshold != 1) GOERROR; - if ( alignment != 1 ) + if (alignment != 1) GOERROR; - if ( H5Pclose(fapl) < 0) + if (H5Pclose(fapl) < 0) GOERROR; if (H5Fclose(fid) < 0) GOERROR; @@ -1686,9 +1679,9 @@ int main (void) #endif /*------------------------------------------------------------------------- - * test file with userblock - *------------------------------------------------------------------------- - */ + * test file with userblock + *------------------------------------------------------------------------- + */ TESTING(" file with committed datatypes"); if(h5repack_init(&pack_options, 0, FALSE) < 0) @@ -1707,13 +1700,13 @@ int main (void) PASSED(); /*------------------------------------------------------------------------- - * test --metadata_block_size option - * Also verify that output file using the metadata_block_size option is - * larger than the output file one not using it. - * FNAME4 is used because it is the same as the test file used for the - * shell script version of this test (h5repack.sh). - *------------------------------------------------------------------------- - */ + * test --metadata_block_size option + * Also verify that output file using the metadata_block_size option is + * larger than the output file one not using it. + * FNAME4 is used because it is the same as the test file used for the + * shell script version of this test (h5repack.sh). + *------------------------------------------------------------------------- + */ TESTING(" metadata block size option"); /* First run without metadata option. No need to verify the correctness */ /* since this has been verified by earlier tests. Just record the file */ @@ -1751,9 +1744,9 @@ int main (void) /*------------------------------------------------------------------------- - * clean temporary test files - *------------------------------------------------------------------------- - */ + * clean temporary test files + *------------------------------------------------------------------------- + */ { hid_t fapl; @@ -1778,24 +1771,24 @@ error: /*------------------------------------------------------------------------- * Function: make_testfiles * -* Purpose: make a test file with all types of HDF5 objects, -* datatypes and filters +* Purpose: make a test file with all types of HDF5 objects, +* datatypes and filters * *------------------------------------------------------------------------- */ static int make_testfiles(void) { - hid_t fid; - hid_t fcpl; /* File creation property list */ - hid_t fapl; /* File access property list */ - unsigned j; /* Local index variable */ + hid_t fid = -1; + hid_t fcpl = -1; /* File creation property list */ + hid_t fapl = -1; /* File access property list */ + unsigned j; /* Local index variable */ /*------------------------------------------------------------------------- - * create a file for general copy test - *------------------------------------------------------------------------- - */ - if((fid = H5Fcreate(FNAME0,H5F_ACC_TRUNC,H5P_DEFAULT,H5P_DEFAULT)) < 0) + * create a file for general copy test + *------------------------------------------------------------------------- + */ + if((fid = H5Fcreate(FNAME0, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0) return -1; if (make_fill(fid) < 0) goto out; @@ -1803,10 +1796,10 @@ int make_testfiles(void) return -1; /*------------------------------------------------------------------------- - * create another file for general copy test (all datatypes) - *------------------------------------------------------------------------- - */ - if((fid = H5Fcreate(FNAME1,H5F_ACC_TRUNC,H5P_DEFAULT,H5P_DEFAULT)) < 0) + * create another file for general copy test (all datatypes) + *------------------------------------------------------------------------- + */ + if((fid = H5Fcreate(FNAME1, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0) return -1; if (make_all_objects(fid) < 0) goto out; @@ -1814,10 +1807,10 @@ int make_testfiles(void) return -1; /*------------------------------------------------------------------------- - * create a file for attributes copy test - *------------------------------------------------------------------------- - */ - if((fid = H5Fcreate(FNAME2,H5F_ACC_TRUNC,H5P_DEFAULT,H5P_DEFAULT)) < 0) + * create a file for attributes copy test + *------------------------------------------------------------------------- + */ + if((fid = H5Fcreate(FNAME2, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0) return -1; if (make_attributes(fid) < 0) goto out; @@ -1825,10 +1818,10 @@ int make_testfiles(void) return -1; /*------------------------------------------------------------------------- - * create a file for hard links test - *------------------------------------------------------------------------- - */ - if((fid = H5Fcreate(FNAME3,H5F_ACC_TRUNC,H5P_DEFAULT,H5P_DEFAULT)) < 0) + * create a file for hard links test + *------------------------------------------------------------------------- + */ + if((fid = H5Fcreate(FNAME3, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0) return -1; if (make_hlinks(fid) < 0) goto out; @@ -1836,10 +1829,10 @@ int make_testfiles(void) return -1; /*------------------------------------------------------------------------- - * create a file for layouts test - *------------------------------------------------------------------------- - */ - if((fid = H5Fcreate(FNAME4,H5F_ACC_TRUNC,H5P_DEFAULT,H5P_DEFAULT)) < 0) + * create a file for layouts test + *------------------------------------------------------------------------- + */ + if((fid = H5Fcreate(FNAME4, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0) return -1; if (make_layout(fid) < 0) goto out; @@ -1847,9 +1840,9 @@ int make_testfiles(void) return -1; /*------------------------------------------------------------------------- - * create a file for layout conversion test - *------------------------------------------------------------------------- - */ + * create a file for layout conversion test + *------------------------------------------------------------------------- + */ if((fid = H5Fcreate(FNAME18, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0) return -1; @@ -1860,9 +1853,9 @@ int make_testfiles(void) return -1; /*------------------------------------------------------------------------- - * for test layout conversions form chunk with unlimited max dims - *------------------------------------------------------------------------- - */ + * for test layout conversions form chunk with unlimited max dims + *------------------------------------------------------------------------- + */ if((fid = H5Fcreate("h5repack_layout3.h5", H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0) return -1; @@ -1873,18 +1866,18 @@ int make_testfiles(void) return -1; /*------------------------------------------------------------------------- - * create a file for the H5D_ALLOC_TIME_EARLY test - *------------------------------------------------------------------------- - */ + * create a file for the H5D_ALLOC_TIME_EARLY test + *------------------------------------------------------------------------- + */ if (make_early() < 0) goto out; /*------------------------------------------------------------------------- - * create a file with the SZIP filter - *------------------------------------------------------------------------- - */ + * create a file with the SZIP filter + *------------------------------------------------------------------------- + */ #ifdef H5_HAVE_FILTER_SZIP - if((fid = H5Fcreate(FNAME7,H5F_ACC_TRUNC,H5P_DEFAULT,H5P_DEFAULT)) < 0) + if((fid = H5Fcreate(FNAME7, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0) return -1; if (make_szip(fid) < 0) goto out; @@ -1894,10 +1887,10 @@ int make_testfiles(void) /*------------------------------------------------------------------------- - * create a file with the deflate filter - *------------------------------------------------------------------------- - */ - if((fid = H5Fcreate(FNAME8,H5F_ACC_TRUNC,H5P_DEFAULT,H5P_DEFAULT)) < 0) + * create a file with the deflate filter + *------------------------------------------------------------------------- + */ + if((fid = H5Fcreate(FNAME8, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0) return -1; if (make_deflate(fid) < 0) goto out; @@ -1905,10 +1898,10 @@ int make_testfiles(void) return -1; /*------------------------------------------------------------------------- - * create a file with the shuffle filter - *------------------------------------------------------------------------- - */ - if((fid = H5Fcreate(FNAME9,H5F_ACC_TRUNC,H5P_DEFAULT,H5P_DEFAULT)) < 0) + * create a file with the shuffle filter + *------------------------------------------------------------------------- + */ + if((fid = H5Fcreate(FNAME9, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0) return -1; if (make_shuffle(fid) < 0) goto out; @@ -1916,10 +1909,10 @@ int make_testfiles(void) return -1; /*------------------------------------------------------------------------- - * create a file with the fletcher32 filter - *------------------------------------------------------------------------- - */ - if((fid = H5Fcreate(FNAME10,H5F_ACC_TRUNC,H5P_DEFAULT,H5P_DEFAULT)) < 0) + * create a file with the fletcher32 filter + *------------------------------------------------------------------------- + */ + if((fid = H5Fcreate(FNAME10, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0) return -1; if (make_fletcher32(fid) < 0) goto out; @@ -1927,10 +1920,10 @@ int make_testfiles(void) return -1; /*------------------------------------------------------------------------- - * create a file with all the filters - *------------------------------------------------------------------------- - */ - if((fid = H5Fcreate(FNAME11,H5F_ACC_TRUNC,H5P_DEFAULT,H5P_DEFAULT)) < 0) + * create a file with all the filters + *------------------------------------------------------------------------- + */ + if((fid = H5Fcreate(FNAME11, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0) return -1; if (make_all_filters(fid) < 0) goto out; @@ -1938,10 +1931,10 @@ int make_testfiles(void) return -1; /*------------------------------------------------------------------------- - * create a file with the nbit filter - *------------------------------------------------------------------------- - */ - if((fid = H5Fcreate(FNAME12,H5F_ACC_TRUNC,H5P_DEFAULT,H5P_DEFAULT)) < 0) + * create a file with the nbit filter + *------------------------------------------------------------------------- + */ + if((fid = H5Fcreate(FNAME12, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0) return -1; if (make_nbit(fid) < 0) goto out; @@ -1949,10 +1942,10 @@ int make_testfiles(void) return -1; /*------------------------------------------------------------------------- - * create a file with the scaleoffset filter - *------------------------------------------------------------------------- - */ - if((fid = H5Fcreate(FNAME13,H5F_ACC_TRUNC,H5P_DEFAULT,H5P_DEFAULT)) < 0) + * create a file with the scaleoffset filter + *------------------------------------------------------------------------- + */ + if((fid = H5Fcreate(FNAME13, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0) return -1; if (make_scaleoffset(fid) < 0) goto out; @@ -1960,10 +1953,10 @@ int make_testfiles(void) return -1; /*------------------------------------------------------------------------- - * create a big dataset - *------------------------------------------------------------------------- - */ - if((fid = H5Fcreate(FNAME14,H5F_ACC_TRUNC,H5P_DEFAULT,H5P_DEFAULT)) < 0) + * create a big dataset + *------------------------------------------------------------------------- + */ + if((fid = H5Fcreate(FNAME14, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0) return -1; if (make_big(fid) < 0) goto out; @@ -1971,10 +1964,10 @@ int make_testfiles(void) return -1; /*------------------------------------------------------------------------- - * create a file with external dataset - *------------------------------------------------------------------------- - */ - if((fid = H5Fcreate(FNAME15,H5F_ACC_TRUNC,H5P_DEFAULT,H5P_DEFAULT)) < 0) + * create a file with external dataset + *------------------------------------------------------------------------- + */ + if((fid = H5Fcreate(FNAME15, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0) return -1; if (make_external(fid) < 0) goto out; @@ -1982,24 +1975,24 @@ int make_testfiles(void) return -1; /*------------------------------------------------------------------------- - * create a file with userblock - *------------------------------------------------------------------------- - */ + * create a file with userblock + *------------------------------------------------------------------------- + */ if(make_userblock() < 0) goto out; /*------------------------------------------------------------------------- - * create a userblock file - *------------------------------------------------------------------------- - */ + * create a userblock file + *------------------------------------------------------------------------- + */ if(make_userblock_file() < 0) goto out; /*------------------------------------------------------------------------- - * create a file with named datatypes - *------------------------------------------------------------------------- - */ - if((fid = H5Fcreate(FNAME17,H5F_ACC_TRUNC,H5P_DEFAULT,H5P_DEFAULT)) < 0) + * create a file with named datatypes + *------------------------------------------------------------------------- + */ + if((fid = H5Fcreate(FNAME17, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0) return -1; if (make_named_dtype(fid) < 0) goto out; @@ -2007,11 +2000,12 @@ int make_testfiles(void) return -1; /*------------------------------------------------------------------------- - * create obj and region reference type datasets (bug1814) - * add attribute with int type (bug1726) - * add attribute with obj and region reference type (bug1726) - *-------------------------------------------------------------------------*/ - if((fid = H5Fcreate(FNAME_REF,H5F_ACC_TRUNC,H5P_DEFAULT,H5P_DEFAULT)) < 0) + * create obj and region reference type datasets (bug1814) + * add attribute with int type (bug1726) + * add attribute with obj and region reference type (bug1726) + *------------------------------------------------------------------------- + */ + if((fid = H5Fcreate(FNAME_REF, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0) return -1; /* create reference type datasets */ if (make_references(fid) < 0) @@ -2020,10 +2014,10 @@ int make_testfiles(void) return -1; /*------------------------------------------------------------------------- - * create a file with obj and region references in attribute of compound and - * vlen datatype - *-------------------------------------------------------------------------*/ - if((fid = H5Fcreate(FNAME_ATTR_REF,H5F_ACC_TRUNC,H5P_DEFAULT,H5P_DEFAULT)) < 0) + * create a file with obj and region references in attribute of compound and + * vlen datatype + *-------------------------------------------------------------------------*/ + if((fid = H5Fcreate(FNAME_ATTR_REF, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0) return -1; if (make_complex_attr_references(fid) < 0) goto out; @@ -2042,9 +2036,9 @@ int make_testfiles(void) if(H5Pset_libver_bounds(fapl, H5F_LIBVER_LATEST, H5F_LIBVER_LATEST) < 0) return -1; - /* - * #0 -- h5repack_latest.h5 - * default: strategy=FSM_AGGR, persist=FALSE, threshold=1 + /* + * #0 -- h5repack_latest.h5 + * default: strategy=FSM_AGGR, persist=FALSE, threshold=1 * default: inpage=4096 */ j = 0; @@ -2053,9 +2047,9 @@ int make_testfiles(void) if(H5Fclose(fid) < 0) return -1; - /* - * #1 -- h5repack_default.h5 - * default: strategy=FSM_AGGR, persist=FALSE, threshold=1 + /* + * #1 -- h5repack_default.h5 + * default: strategy=FSM_AGGR, persist=FALSE, threshold=1 * default: inpage=4096 */ HDassert(j < NELMTS(H5REPACK_FSPACE_FNAMES)); @@ -2064,11 +2058,11 @@ int make_testfiles(void) if(H5Fclose(fid) < 0) return -1; - /* + /* * #2 -- h5repack_page_persist.h5 - * Setting: - * strategy=PAGE, persist=TRUE, threshold=1 - * inpage=512 + * Setting: + * strategy=PAGE, persist=TRUE, threshold=1 + * inpage=512 * latest format */ /* Create file creation property list */ @@ -2087,10 +2081,10 @@ int make_testfiles(void) return -1; - /* + /* * #3 -- h5repack_fsm_aggr_persist.h5 * Setting: - * strategy=FSM_AGGR, persist=TRUE, threshold=1 + * strategy=FSM_AGGR, persist=TRUE, threshold=1 * default: inpage=4096 */ /* Create file creation property list */ @@ -2107,10 +2101,10 @@ int make_testfiles(void) return -1; - /* + /* * #4 -- h5repack_page_threshold.h5 * Setting: - * strategy=PAGE, persist=FALSE, threshold=3 + * strategy=PAGE, persist=FALSE, threshold=3 * inpage=8192 * latest format */ @@ -2133,8 +2127,8 @@ int make_testfiles(void) /* * #5 -- h5repack_fsm_aggr_threshold.h5 * Setting: - * strategy=FSM_AGGR, persist=FALSE, threshold=3 - * inpage=4096 + * strategy=FSM_AGGR, persist=FALSE, threshold=3 + * inpage=4096 */ /* Create file creation property list */ @@ -2152,10 +2146,10 @@ int make_testfiles(void) if(H5Pclose(fcpl) < 0) return -1; - /* - * #6 -- h5repack_aggr.h5 + /* + * #6 -- h5repack_aggr.h5 * Setting: - * strategy=AGGR, persist=FALSE, threshold=1 + * strategy=AGGR, persist=FALSE, threshold=1 * latest format */ @@ -2172,11 +2166,11 @@ int make_testfiles(void) if(H5Pclose(fcpl) < 0) return -1; - /* + /* * #7 -- h5repack_none.h5 * Setting: - * strategy=NONE, persist=FALSE, threshold=1 - * inpage=8192 + * strategy=NONE, persist=FALSE, threshold=1 + * inpage=8192 */ /* Create file creation property list */ @@ -2209,20 +2203,20 @@ out: /*------------------------------------------------------------------------- * Function: make_all_objects * -* Purpose: make a test file with all types of HDF5 objects +* Purpose: make a test file with all types of HDF5 objects * *------------------------------------------------------------------------- */ static int make_all_objects(hid_t loc_id) { - hid_t did=-1; - hid_t gid=-1; - hid_t tid=-1; - hid_t rid=-1; - hid_t sid=-1; - hid_t gcplid=-1; - hsize_t dims[1]={2}; + hid_t did = -1; + hid_t gid = -1; + hid_t tid = -1; + hid_t rid = -1; + hid_t sid = -1; + hid_t gcplid = -1; + hsize_t dims[1] = {2}; /* compound datatype */ typedef struct s_t { @@ -2297,7 +2291,7 @@ int make_all_objects(hid_t loc_id) if ((rid = H5Gopen2(loc_id, "/", H5P_DEFAULT)) < 0) goto out; - if (write_dset_in(rid,"dset_referenced",loc_id,0) < 0) + if (write_dset_in(rid, "dset_referenced", loc_id, 0) < 0) goto out; if (H5Gclose(rid) < 0) goto out; @@ -2331,18 +2325,18 @@ out: /*------------------------------------------------------------------------- * Function: make_attributes * -* Purpose: make a test file with all types of attributes +* Purpose: make a test file with all types of attributes * *------------------------------------------------------------------------- */ static int make_attributes(hid_t loc_id) { - hid_t did=-1; - hid_t gid=-1; - hid_t rid=-1; - hid_t sid=-1; - hsize_t dims[1]={2}; + hid_t did = -1; + hid_t gid = -1; + hid_t rid = -1; + hid_t sid = -1; + hsize_t dims[1] = {2}; /*------------------------------------------------------------------------- * H5G_DATASET @@ -2367,11 +2361,11 @@ int make_attributes(hid_t loc_id) *------------------------------------------------------------------------- */ - if ( write_attr_in(did,"dset",loc_id,0) < 0) + if ( write_attr_in(did, "dset", loc_id, 0) < 0) goto out; - if (write_attr_in(gid,"dset",loc_id,0) < 0) + if (write_attr_in(gid, "dset", loc_id, 0) < 0) goto out; - if (write_attr_in(rid,"dset",loc_id,0) < 0) + if (write_attr_in(rid, "dset", loc_id, 0) < 0) goto out; /* close */ @@ -2401,18 +2395,18 @@ out: /*------------------------------------------------------------------------- * Function: make_hlinks * -* Purpose: make a test file with hard links +* Purpose: make a test file with hard links * *------------------------------------------------------------------------- */ static int make_hlinks(hid_t loc_id) { - hid_t g1id=-1; - hid_t g2id=-1; - hid_t g3id=-1; - hsize_t dims[2]={3,2}; - int buf[3][2]= {{1,1},{1,2},{2,2}}; + hid_t g1id =- 1; + hid_t g2id = -1; + hid_t g3id = -1; + hsize_t dims[2] = {3,2}; + int buf[3][2] = {{1,1}, {1,2}, {2,2}}; /*------------------------------------------------------------------------- * create a dataset and some hard links to it @@ -2471,7 +2465,7 @@ out: /*------------------------------------------------------------------------- * Function: make_szip * -* Purpose: make a dataset with the SZIP filter +* Purpose: make a dataset with the SZIP filter * *------------------------------------------------------------------------- */ @@ -2479,21 +2473,19 @@ out: static int make_szip(hid_t loc_id) { - hid_t dcpl; /* dataset creation property list */ - hid_t sid; /* dataspace ID */ - unsigned szip_options_mask=H5_SZIP_ALLOW_K13_OPTION_MASK|H5_SZIP_NN_OPTION_MASK; - unsigned szip_pixels_per_block=8; - hsize_t dims[RANK]={DIM1,DIM2}; - hsize_t chunk_dims[RANK]={CDIM1,CDIM2}; + hid_t dcpl = -1; /* dataset creation property list */ + hid_t sid = -1; /* dataspace ID */ + unsigned szip_options_mask = H5_SZIP_ALLOW_K13_OPTION_MASK | H5_SZIP_NN_OPTION_MASK; + unsigned szip_pixels_per_block = 8; + hsize_t dims[RANK] = {DIM1, DIM2}; + hsize_t chunk_dims[RANK] = {CDIM1, CDIM2}; int buf[DIM1][DIM2]; int i, j, n; int szip_can_encode = 0; - for (i=n=0; i 0) H5Sclose(sid2); return ret; - + } /*------------------------------------------------------------------------- * Function: gen_obj_ref * - * Purpose: + * Purpose: * Generate object references to objects (dataset,group and named datatype) * * Note: - * copied from h5copygentest.c and upate to create named datatype + * copied from h5copygentest.c and upate to create named datatype * * Programmer: Jonathan Kim (March 18, 2010) *------------------------------------------------------------------------*/ @@ -6478,7 +6432,7 @@ static herr_t gen_obj_ref(hid_t loc_id) /* attr with int type */ hsize_t dim_attr_int[1]={2}; - int data_attr_int[2] = {10,20}; + int data_attr_int[2] = {10,20}; /* write buffer for obj reference */ hobj_ref_t objref_buf[3]; @@ -6515,7 +6469,7 @@ static herr_t gen_obj_ref(hid_t loc_id) } /*--------------------------------------------------------- - * create dataset contain references + * create dataset contain references */ sid = H5Screate_simple (1, dims_dset_objref, NULL); if (sid < 0) @@ -6579,7 +6533,7 @@ out: * Purpose: Generate dataset region references * * Note: - * copied from h5copygentest.c + * copied from h5copygentest.c * * Programmer: Jonathan Kim (March 18, 2010) *------------------------------------------------------------------------*/ @@ -6589,11 +6543,11 @@ static herr_t gen_region_ref(hid_t loc_id) herr_t ret = SUCCEED; /* target dataset */ - hid_t sid_trg=0; + hid_t sid_trg=0; hsize_t dims_trg[2] = {3,16}; /* dset with region ref type */ - hid_t sid_ref=0, oid_ref=0; + hid_t sid_ref=0, oid_ref=0; /* region ref to target dataset */ hsize_t coords[4][2] = { {0,1}, {2,11}, {1,0}, {2,4} }; @@ -6606,7 +6560,7 @@ static herr_t gen_region_ref(hid_t loc_id) /* attr with int type */ hsize_t dim_attr_int[1]={2}; - int data_attr_int[2] = {10,20}; + int data_attr_int[2] = {10,20}; sid_trg = H5Screate_simple (2, dims_trg, NULL); if (sid_trg < 0) @@ -6707,7 +6661,7 @@ out: if (sid_ref > 0) H5Sclose (sid_ref); if (sid_trg > 0) - H5Sclose (sid_trg); + H5Sclose (sid_trg); return ret; } @@ -6715,7 +6669,7 @@ out: /*------------------------------------------------------------------------- * Function: make_references * -* Purpose: create a file with obj and region references +* Purpose: create a file with obj and region references * * Programmer: Jonathan Kim (March 18, 2010) *------------------------------------------------------------------------- @@ -6731,7 +6685,7 @@ static herr_t make_references(hid_t loc_id) { fprintf(stderr, "Failed to generate referenced object.\n"); ret = FAIL; - } + } /* add object reference */ status = gen_obj_ref(loc_id); @@ -6755,7 +6709,7 @@ static herr_t make_references(hid_t loc_id) /*------------------------------------------------------------------------- * Function: make_complex_attr_references * -* Purpose: +* Purpose: * create a file with : * 1. obj ref in attribute of compound type * 2. region ref in attribute of compound type @@ -6787,14 +6741,14 @@ static herr_t make_references(hid_t loc_id) /* 4. region references in vlen attr */ #define RANK_VLEN_REGREF 1 #define DIM_VLEN_REGREF 1 /* for element region */ -#define LEN0_VLEN_REGREF 1 /* element region */ +#define LEN0_VLEN_REGREF 1 /* element region */ static herr_t make_complex_attr_references(hid_t loc_id) { herr_t ret = SUCCEED; - herr_t status; - /* - * for objects + herr_t status; + /* + * for objects */ hid_t objgid=0, objdid=0, objtid=0, objsid=0; hsize_t obj_dims[RANK_OBJ] = {DIM0_OBJ, DIM1_OBJ}; @@ -6815,8 +6769,8 @@ static herr_t make_complex_attr_references(hid_t loc_id) */ hsize_t main_dset_dims[RANK_DSET] = {DIM_DSET}; hid_t main_sid=0, main_did=0; - /* - * 1. obj references in compound attr + /* + * 1. obj references in compound attr */ hid_t comp_objref_tid=0, comp_objref_aid=0; typedef struct comp_objref_t { @@ -6827,8 +6781,8 @@ static herr_t make_complex_attr_references(hid_t loc_id) hid_t comp_objref_attr_sid=0; hsize_t comp_objref_dim[RANK_COMP_OBJREF] = {DIM_COMP_OBJREF}; - /* - * 2. region references in compound attr + /* + * 2. region references in compound attr */ hid_t comp_regref_tid=0, comp_regref_aid=0; typedef struct comp_regref_t { @@ -6839,16 +6793,16 @@ static herr_t make_complex_attr_references(hid_t loc_id) hid_t comp_regref_attr_sid=0; hsize_t comp_regref_dim[RANK_COMP_REGREF] = {DIM_COMP_REGREF}; hsize_t coords[4][2] = { {0,1}, {2,3}, {3,4}, {4,5} }; - - /* - * 3. obj references in vlen attr + + /* + * 3. obj references in vlen attr */ hid_t vlen_objref_attr_tid=0, vlen_objref_attr_sid=0; hid_t vlen_objref_attr_id=0; hvl_t vlen_objref_data[DIM_VLEN_OBJREF]; hsize_t vlen_objref_dims[RANK_VLEN_OBJREF] = {DIM_VLEN_OBJREF}; - /* + /* * 4. region references in vlen attr */ hid_t vlen_regref_attr_tid=0, vlen_regref_attr_sid=0; @@ -6858,7 +6812,7 @@ static herr_t make_complex_attr_references(hid_t loc_id) /* --------------------------------------- - * create objects which to be referenced + * create objects which to be referenced */ /* object1 group */ objgid = H5Gcreate2(loc_id, NAME_OBJ_GRP, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); @@ -6886,7 +6840,7 @@ static herr_t make_complex_attr_references(hid_t loc_id) /* --------------------------------------------- - * Put testing objs in this group + * Put testing objs in this group * create group contain dataset with attribute and the attribute has * compound type which contain obj and region reference */ main_gid = H5Gcreate2(loc_id, "group_main", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); @@ -6903,7 +6857,7 @@ static herr_t make_complex_attr_references(hid_t loc_id) main_sid = H5Screate_simple(RANK_DSET, main_dset_dims, NULL); main_did = H5Dcreate2(main_gid, "dset_main", H5T_NATIVE_INT, main_sid, H5P_DEFAULT,H5P_DEFAULT, H5P_DEFAULT); - + status = H5Dwrite(main_did, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, obj_data[0]); if (status < 0) { @@ -6916,8 +6870,8 @@ static herr_t make_complex_attr_references(hid_t loc_id) * 1. create obj references in a attribute of compound type */ - /* - * create compound type for attribute + /* + * create compound type for attribute */ comp_objref_tid = H5Tcreate (H5T_COMPOUND, sizeof(comp_objref_t)); @@ -6956,8 +6910,8 @@ static herr_t make_complex_attr_references(hid_t loc_id) goto out; } comp_objref_data[2].val_int = 20; - - /* + + /* * create attribute and write the object ref */ comp_objref_attr_sid = H5Screate_simple (RANK_COMP_OBJREF, comp_objref_dim, NULL); @@ -6982,7 +6936,7 @@ static herr_t make_complex_attr_references(hid_t loc_id) H5Tinsert(comp_regref_tid, "value_int", HOFFSET(comp_regref_t, val_int), H5T_NATIVE_INT); /* - * create the region reference + * create the region reference */ status = H5Sselect_elements (objsid, H5S_SELECT_SET, (size_t)4, coords[0]); if (status < 0) @@ -7027,8 +6981,8 @@ static herr_t make_complex_attr_references(hid_t loc_id) vlen_objref_data[2].len = LEN2_VLEN_OBJREF; vlen_objref_data[2].p = HDmalloc (vlen_objref_data[2].len * sizeof(hobj_ref_t)); - /* - * create obj references + /* + * create obj references */ /* reference to dataset */ status = H5Rcreate (&((hobj_ref_t*)vlen_objref_data[0].p)[0], loc_id, NAME_OBJ_DS1, H5R_OBJECT, (hid_t)-1); @@ -7039,7 +6993,7 @@ static herr_t make_complex_attr_references(hid_t loc_id) goto out; } /* reference to group */ - status = H5Rcreate (&((hobj_ref_t*)vlen_objref_data[1].p)[0], loc_id, NAME_OBJ_GRP, H5R_OBJECT, (hid_t)-1); + status = H5Rcreate (&((hobj_ref_t*)vlen_objref_data[1].p)[0], loc_id, NAME_OBJ_GRP, H5R_OBJECT, (hid_t)-1); if (status < 0) { fprintf(stderr, "Error: %s %d> H5Rcreate failed.\n", FUNC, __LINE__); @@ -7054,15 +7008,15 @@ static herr_t make_complex_attr_references(hid_t loc_id) ret = FAIL; goto out; } - - /* + + /* * create vlen type with obj reference */ vlen_objref_attr_tid = H5Tvlen_create (H5T_STD_REF_OBJ); vlen_objref_attr_sid = H5Screate_simple (RANK_VLEN_OBJREF, vlen_objref_dims, NULL); /* - * create attribute and write the object reference + * create attribute and write the object reference */ vlen_objref_attr_id = H5Acreate2(main_did, "Vlen_OBJREF", vlen_objref_attr_tid, vlen_objref_attr_sid, H5P_DEFAULT, H5P_DEFAULT); status = H5Awrite (vlen_objref_attr_id, vlen_objref_attr_tid, vlen_objref_data); @@ -7085,7 +7039,7 @@ static herr_t make_complex_attr_references(hid_t loc_id) /*------------------------------------------------------------------- * 4. create region references in a attribute of vlen type */ - + /* * prepare vlen data */ @@ -7093,7 +7047,7 @@ static herr_t make_complex_attr_references(hid_t loc_id) vlen_regref_data[0].p = HDmalloc (vlen_regref_data[0].len * sizeof(hdset_reg_ref_t)); /* - * create region reference + * create region reference */ status = H5Sselect_elements(objsid, H5S_SELECT_SET, (size_t)4, coords[0]); if (status < 0) @@ -7109,15 +7063,15 @@ static herr_t make_complex_attr_references(hid_t loc_id) ret = FAIL; goto out; } - - /* + + /* * create vlen type with region reference */ vlen_regref_attr_tid = H5Tvlen_create(H5T_STD_REF_DSETREG); vlen_regref_attr_sid = H5Screate_simple(RANK_VLEN_REGREF, vlen_regref_dim, NULL); - + /* - * create attribute and write the region reference + * create attribute and write the region reference */ vlen_regref_attr_id = H5Acreate2(main_did, "Vlen_REGREF", vlen_regref_attr_tid, vlen_regref_attr_sid, H5P_DEFAULT, H5P_DEFAULT); status = H5Awrite(vlen_regref_attr_id, vlen_regref_attr_tid, vlen_regref_data); @@ -7127,7 +7081,7 @@ static herr_t make_complex_attr_references(hid_t loc_id) ret = FAIL; goto out; } - + /* close resource for vlen data */ status = H5Dvlen_reclaim (vlen_regref_attr_tid, vlen_regref_attr_sid, H5P_DEFAULT, vlen_regref_data); if (status < 0) diff --git a/tools/test/h5repack/testfiles/deflate_limit.h5repack_layout.h5.ddl b/tools/test/h5repack/testfiles/deflate_limit.h5repack_layout.h5.ddl index 75f54fa..1dcc742 100644 --- a/tools/test/h5repack/testfiles/deflate_limit.h5repack_layout.h5.ddl +++ b/tools/test/h5repack/testfiles/deflate_limit.h5repack_layout.h5.ddl @@ -76,8 +76,8 @@ GROUP "/" { DATATYPE H5T_STD_I32LE DATASPACE SIMPLE { ( 40, 20 ) / ( 40, 20 ) } STORAGE_LAYOUT { - CHUNKED ( 20, 10 ) - SIZE 1283 (2.494:1 COMPRESSION) + CHUNKED ( 40, 20 ) + SIZE 1150 (2.783:1 COMPRESSION) } FILTERS { COMPRESSION DEFLATE { LEVEL 1 } diff --git a/tools/test/h5repack/testfiles/h5repack_filters.h5-gzip_verbose_filters.tst b/tools/test/h5repack/testfiles/h5repack_filters.h5-gzip_verbose_filters.tst index 36e65b9..cb12172 100644 --- a/tools/test/h5repack/testfiles/h5repack_filters.h5-gzip_verbose_filters.tst +++ b/tools/test/h5repack/testfiles/h5repack_filters.h5-gzip_verbose_filters.tst @@ -1,7 +1,8 @@ -Objects to modify layout are... -Objects to apply filter are... +No all objects to modify layout +No all objects to apply filter with GZIP filter ...Found +Making new file ... ----------------------------------------- Type Filter (Compression) Name ----------------------------------------- diff --git a/tools/test/h5repack/testfiles/h5repack_layout.h5-plugin_test.ddl b/tools/test/h5repack/testfiles/h5repack_layout.h5-plugin_test.ddl index a8b4562..4856f84 100644 --- a/tools/test/h5repack/testfiles/h5repack_layout.h5-plugin_test.ddl +++ b/tools/test/h5repack/testfiles/h5repack_layout.h5-plugin_test.ddl @@ -92,7 +92,7 @@ GROUP "/" { DATATYPE H5T_STD_I32LE DATASPACE SIMPLE { ( 40, 20 ) / ( 40, 20 ) } STORAGE_LAYOUT { - CHUNKED ( 20, 10 ) + CHUNKED ( 40, 20 ) SIZE 3200 (1.000:1 COMPRESSION) } FILTERS { diff --git a/tools/test/h5repack/testfiles/h5repack_layout.h5-plugin_version_test.ddl b/tools/test/h5repack/testfiles/h5repack_layout.h5-plugin_version_test.ddl index 561ab14..283b44c 100644 --- a/tools/test/h5repack/testfiles/h5repack_layout.h5-plugin_version_test.ddl +++ b/tools/test/h5repack/testfiles/h5repack_layout.h5-plugin_version_test.ddl @@ -11,7 +11,7 @@ GROUP "/" { USER_DEFINED_FILTER { FILTER_ID 260 COMMENT dynlib4 - PARAMS { 9 1 10 2 } + PARAMS { 9 1 11 0 } } } FILLVALUE { @@ -33,7 +33,7 @@ GROUP "/" { USER_DEFINED_FILTER { FILTER_ID 260 COMMENT dynlib4 - PARAMS { 9 1 10 2 } + PARAMS { 9 1 11 0 } } } FILLVALUE { @@ -55,7 +55,7 @@ GROUP "/" { USER_DEFINED_FILTER { FILTER_ID 260 COMMENT dynlib4 - PARAMS { 9 1 10 2 } + PARAMS { 9 1 11 0 } } } FILLVALUE { @@ -77,7 +77,7 @@ GROUP "/" { USER_DEFINED_FILTER { FILTER_ID 260 COMMENT dynlib4 - PARAMS { 9 1 10 2 } + PARAMS { 9 1 11 0 } } } FILLVALUE { @@ -92,14 +92,14 @@ GROUP "/" { DATATYPE H5T_STD_I32LE DATASPACE SIMPLE { ( 40, 20 ) / ( 40, 20 ) } STORAGE_LAYOUT { - CHUNKED ( 20, 10 ) + CHUNKED ( 40, 20 ) SIZE 3200 (1.000:1 COMPRESSION) } FILTERS { USER_DEFINED_FILTER { FILTER_ID 260 COMMENT dynlib4 - PARAMS { 9 1 10 2 } + PARAMS { 9 1 11 0 } } } FILLVALUE { @@ -121,7 +121,7 @@ GROUP "/" { USER_DEFINED_FILTER { FILTER_ID 260 COMMENT dynlib4 - PARAMS { 9 1 10 2 } + PARAMS { 9 1 11 0 } } } FILLVALUE { @@ -143,7 +143,7 @@ GROUP "/" { USER_DEFINED_FILTER { FILTER_ID 260 COMMENT dynlib4 - PARAMS { 9 1 10 2 } + PARAMS { 9 1 11 0 } } } FILLVALUE { diff --git a/tools/test/h5repack/testfiles/h5repack_layout.h5-plugin_zero.ddl b/tools/test/h5repack/testfiles/h5repack_layout.h5-plugin_zero.ddl index 97cbfc0..e4ffaf1 100644 --- a/tools/test/h5repack/testfiles/h5repack_layout.h5-plugin_zero.ddl +++ b/tools/test/h5repack/testfiles/h5repack_layout.h5-plugin_zero.ddl @@ -1,4 +1,135 @@ HDF5 "out-plugin_zero.h5repack_layout.h5" { GROUP "/" { + DATASET "dset1" { + DATATYPE H5T_STD_I32LE + DATASPACE SIMPLE { ( 40, 20 ) / ( 40, 20 ) } + STORAGE_LAYOUT { + CONTIGUOUS + SIZE 3200 + OFFSET 2048 + } + FILTERS { + NONE + } + FILLVALUE { + FILL_TIME H5D_FILL_TIME_IFSET + VALUE H5D_FILL_VALUE_DEFAULT + } + ALLOCATION_TIME { + H5D_ALLOC_TIME_LATE + } + } + DATASET "dset2" { + DATATYPE H5T_STD_I32LE + DATASPACE SIMPLE { ( 40, 20 ) / ( 40, 20 ) } + STORAGE_LAYOUT { + CONTIGUOUS + SIZE 3200 + OFFSET 5248 + } + FILTERS { + NONE + } + FILLVALUE { + FILL_TIME H5D_FILL_TIME_IFSET + VALUE H5D_FILL_VALUE_DEFAULT + } + ALLOCATION_TIME { + H5D_ALLOC_TIME_LATE + } + } + DATASET "dset3" { + DATATYPE H5T_STD_I32LE + DATASPACE SIMPLE { ( 40, 20 ) / ( 40, 20 ) } + STORAGE_LAYOUT { + CONTIGUOUS + SIZE 3200 + OFFSET 8448 + } + FILTERS { + NONE + } + FILLVALUE { + FILL_TIME H5D_FILL_TIME_IFSET + VALUE H5D_FILL_VALUE_DEFAULT + } + ALLOCATION_TIME { + H5D_ALLOC_TIME_LATE + } + } + DATASET "dset4" { + DATATYPE H5T_STD_I32LE + DATASPACE SIMPLE { ( 40, 20 ) / ( 40, 20 ) } + STORAGE_LAYOUT { + CONTIGUOUS + SIZE 3200 + OFFSET 13696 + } + FILTERS { + NONE + } + FILLVALUE { + FILL_TIME H5D_FILL_TIME_IFSET + VALUE H5D_FILL_VALUE_DEFAULT + } + ALLOCATION_TIME { + H5D_ALLOC_TIME_LATE + } + } + DATASET "dset_chunk" { + DATATYPE H5T_STD_I32LE + DATASPACE SIMPLE { ( 40, 20 ) / ( 40, 20 ) } + STORAGE_LAYOUT { + CHUNKED ( 20, 10 ) + SIZE 3200 + } + FILTERS { + NONE + } + FILLVALUE { + FILL_TIME H5D_FILL_TIME_IFSET + VALUE H5D_FILL_VALUE_DEFAULT + } + ALLOCATION_TIME { + H5D_ALLOC_TIME_INCR + } + } + DATASET "dset_compact" { + DATATYPE H5T_STD_I32LE + DATASPACE SIMPLE { ( 40, 20 ) / ( 40, 20 ) } + STORAGE_LAYOUT { + COMPACT + SIZE 3200 + } + FILTERS { + NONE + } + FILLVALUE { + FILL_TIME H5D_FILL_TIME_IFSET + VALUE H5D_FILL_VALUE_DEFAULT + } + ALLOCATION_TIME { + H5D_ALLOC_TIME_EARLY + } + } + DATASET "dset_contiguous" { + DATATYPE H5T_STD_I32LE + DATASPACE SIMPLE { ( 40, 20 ) / ( 40, 20 ) } + STORAGE_LAYOUT { + CONTIGUOUS + SIZE 3200 + OFFSET 26184 + } + FILTERS { + NONE + } + FILLVALUE { + FILL_TIME H5D_FILL_TIME_IFSET + VALUE H5D_FILL_VALUE_DEFAULT + } + ALLOCATION_TIME { + H5D_ALLOC_TIME_LATE + } + } } } diff --git a/tools/test/h5repack/testfiles/plugin_none.h5repack_layout.UD.h5.tst b/tools/test/h5repack/testfiles/plugin_none.h5repack_layout.UD.h5.tst index 4fb6906..30aa8ad 100644 --- a/tools/test/h5repack/testfiles/plugin_none.h5repack_layout.UD.h5.tst +++ b/tools/test/h5repack/testfiles/plugin_none.h5repack_layout.UD.h5.tst @@ -1,6 +1,7 @@ -Objects to modify layout are... -Objects to apply filter are... +No all objects to modify layout +All objects to apply filter are... Uncompress all +Making new file ... ----------------------------------------- Type Filter (Compression) Name ----------------------------------------- diff --git a/tools/test/h5repack/testfiles/plugin_test.h5repack_layout.h5.tst b/tools/test/h5repack/testfiles/plugin_test.h5repack_layout.h5.tst index 7f9bd6e..62ea1cc 100644 --- a/tools/test/h5repack/testfiles/plugin_test.h5repack_layout.h5.tst +++ b/tools/test/h5repack/testfiles/plugin_test.h5repack_layout.h5.tst @@ -1,6 +1,7 @@ -Objects to modify layout are... -Objects to apply filter are... +No all objects to modify layout +All objects to apply filter are... User Defined 257 +Making new file ... ----------------------------------------- Type Filter (Compression) Name ----------------------------------------- diff --git a/tools/test/h5repack/testfiles/plugin_version_test.h5repack_layout.h5.tst b/tools/test/h5repack/testfiles/plugin_version_test.h5repack_layout.h5.tst index 1a496c6..f5c4736 100644 --- a/tools/test/h5repack/testfiles/plugin_version_test.h5repack_layout.h5.tst +++ b/tools/test/h5repack/testfiles/plugin_version_test.h5repack_layout.h5.tst @@ -1,6 +1,7 @@ -Objects to modify layout are... -Objects to apply filter are... +No all objects to modify layout +All objects to apply filter are... User Defined 260 +Making new file ... ----------------------------------------- Type Filter (Compression) Name ----------------------------------------- diff --git a/tools/test/h5repack/testfiles/plugin_zero.h5repack_layout.h5.tst b/tools/test/h5repack/testfiles/plugin_zero.h5repack_layout.h5.tst index 20f8a40..54c873c 100644 --- a/tools/test/h5repack/testfiles/plugin_zero.h5repack_layout.h5.tst +++ b/tools/test/h5repack/testfiles/plugin_zero.h5repack_layout.h5.tst @@ -1,7 +1,22 @@ -Objects to modify layout are... -Objects to apply filter are... +No all objects to modify layout +All objects to apply filter are... User Defined 250 +Making new file ... ----------------------------------------- Type Filter (Compression) Name ----------------------------------------- group / + warning: could not create dataset . Applying original settings + dset /dset1 + warning: could not create dataset . Applying original settings + dset /dset2 + warning: could not create dataset . Applying original settings + dset /dset3 + warning: could not create dataset . Applying original settings + dset /dset4 + warning: could not create dataset . Applying original settings + dset /dset_chunk + warning: could not create dataset . Applying original settings + dset /dset_compact + warning: could not create dataset . Applying original settings + dset /dset_contiguous -- cgit v0.12 From 137c4a987830df43e883d9d4d010f0b87fa11a57 Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Wed, 11 Oct 2017 10:05:53 -0500 Subject: HDFFV-10297 correct reference file for 1.10 --- .../testfiles/h5repack_layout.h5-plugin_version_test.ddl | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/tools/test/h5repack/testfiles/h5repack_layout.h5-plugin_version_test.ddl b/tools/test/h5repack/testfiles/h5repack_layout.h5-plugin_version_test.ddl index 283b44c..f79fa93 100644 --- a/tools/test/h5repack/testfiles/h5repack_layout.h5-plugin_version_test.ddl +++ b/tools/test/h5repack/testfiles/h5repack_layout.h5-plugin_version_test.ddl @@ -11,7 +11,7 @@ GROUP "/" { USER_DEFINED_FILTER { FILTER_ID 260 COMMENT dynlib4 - PARAMS { 9 1 11 0 } + PARAMS { 9 1 10 2 } } } FILLVALUE { @@ -33,7 +33,7 @@ GROUP "/" { USER_DEFINED_FILTER { FILTER_ID 260 COMMENT dynlib4 - PARAMS { 9 1 11 0 } + PARAMS { 9 1 10 2 } } } FILLVALUE { @@ -55,7 +55,7 @@ GROUP "/" { USER_DEFINED_FILTER { FILTER_ID 260 COMMENT dynlib4 - PARAMS { 9 1 11 0 } + PARAMS { 9 1 10 2 } } } FILLVALUE { @@ -77,7 +77,7 @@ GROUP "/" { USER_DEFINED_FILTER { FILTER_ID 260 COMMENT dynlib4 - PARAMS { 9 1 11 0 } + PARAMS { 9 1 10 2 } } } FILLVALUE { @@ -99,7 +99,7 @@ GROUP "/" { USER_DEFINED_FILTER { FILTER_ID 260 COMMENT dynlib4 - PARAMS { 9 1 11 0 } + PARAMS { 9 1 10 2 } } } FILLVALUE { @@ -121,7 +121,7 @@ GROUP "/" { USER_DEFINED_FILTER { FILTER_ID 260 COMMENT dynlib4 - PARAMS { 9 1 11 0 } + PARAMS { 9 1 10 2 } } } FILLVALUE { @@ -143,7 +143,7 @@ GROUP "/" { USER_DEFINED_FILTER { FILTER_ID 260 COMMENT dynlib4 - PARAMS { 9 1 11 0 } + PARAMS { 9 1 10 2 } } } FILLVALUE { -- cgit v0.12 From 6029b679a3c5772495419cd16bce97e611e5b4bf Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Wed, 11 Oct 2017 10:25:01 -0500 Subject: Fix test step --- test/CMakeTests.cmake | 2 ++ 1 file changed, 2 insertions(+) diff --git a/test/CMakeTests.cmake b/test/CMakeTests.cmake index b8d3689..332d466 100644 --- a/test/CMakeTests.cmake +++ b/test/CMakeTests.cmake @@ -268,6 +268,7 @@ add_test (NAME H5TEST-clear-testhdf5-objects tfile5.h5 tfile6.h5 tfile7.h5 + tfilespace.h5 th5o_file th5s1.h5 tselect.h5 @@ -334,6 +335,7 @@ else () tfile5.h5 tfile6.h5 tfile7.h5 + tfilespace.h5 th5o_file th5s1.h5 tselect.h5 -- cgit v0.12 From a6fdf1bb0e344e8f5a1870926f6077239de3ce6d Mon Sep 17 00:00:00 2001 From: Larry Knox Date: Tue, 10 Oct 2017 12:43:02 -0500 Subject: Merge pull request #703 in HDFFV/hdf5 from ~LRKNOX/hdf5_lrk:develop to develop * commit '4a3998ac308c2bf24201e470c0b23f7f83f063e1': Correct indentation in h5diff/Makefile.am. Add "-rpath /nowhere" to *_la_LDFLAGS for plugin test libraries. This allows them to be successfully linked but not installed. The change was added for the HDF5 1.8.20 release, but is also needed for all other HDF5 branches. --- configure.ac | 1 + test/Makefile.am | 30 ++++++++++++++---------------- tools/test/h5diff/Makefile.am | 9 +++------ tools/test/h5dump/Makefile.am | 9 +++------ tools/test/h5ls/Makefile.am | 9 +++------ tools/test/h5repack/Makefile.am | 13 +++++-------- 6 files changed, 29 insertions(+), 42 deletions(-) diff --git a/configure.ac b/configure.ac index 2b54d70..0ef4b3d 100644 --- a/configure.ac +++ b/configure.ac @@ -1063,6 +1063,7 @@ esac case "`uname`" in CYGWIN*) AC_CHECK_HEADERS([io.h sys/timeb.h]) + UNAME_CYGWIN="yes" ;; MINGW*) AC_CHECK_HEADERS([io.h winsock2.h sys/timeb.h]) diff --git a/test/Makefile.am b/test/Makefile.am index 64f1d3d..8b8f5c5 100644 --- a/test/Makefile.am +++ b/test/Makefile.am @@ -98,36 +98,34 @@ if BUILD_ALL_CONDITIONAL noinst_PROGRAMS=$(BUILD_ALL_PROGS) endif -# The libh5test library provides common support code for the tests. -noinst_LTLIBRARIES=libh5test.la - if HAVE_SHARED_CONDITIONAL + # The libh5test library provides common support code for the tests. # The libdynlib1, libdynlib2, libdynlib3, and libdynlib4 library for testing plugin module plugin.c. - # Build it as shared library if configure is enabled for shared library. - dyn_LTLIBRARIES=libdynlib1.la libdynlib2.la libdynlib3.la libdynlib4.la + # Build them as shared libraries if configure is enabled for shared library. + noinst_LTLIBRARIES=libh5test.la libdynlib1.la libdynlib2.la libdynlib3.la libdynlib4.la libdynlib1_la_SOURCES=dynlib1.c libdynlib2_la_SOURCES=dynlib2.c libdynlib3_la_SOURCES=dynlib3.c libdynlib4_la_SOURCES=dynlib4.c - libdynlib1_la_LDFLAGS = -avoid-version -module -shared -export-dynamic - libdynlib2_la_LDFLAGS = -avoid-version -module -shared -export-dynamic - libdynlib3_la_LDFLAGS = -avoid-version -module -shared -export-dynamic - libdynlib4_la_LDFLAGS = -avoid-version -module -shared -export-dynamic + libdynlib1_la_LDFLAGS = -avoid-version -module -shared -export-dynamic -rpath /nowhere + libdynlib2_la_LDFLAGS = -avoid-version -module -shared -export-dynamic -rpath /nowhere + libdynlib3_la_LDFLAGS = -avoid-version -module -shared -export-dynamic -rpath /nowhere + libdynlib4_la_LDFLAGS = -avoid-version -module -shared -export-dynamic -rpath /nowhere -libdynlib1.la: $(libdynlib1_la_OBJECTS) $(libdynlib1_la_DEPENDENCIES) $(EXTRA_libdynlib1_la_DEPENDENCIES) + libdynlib1.la: $(libdynlib1_la_OBJECTS) $(libdynlib1_la_DEPENDENCIES) $(EXTRA_libdynlib1_la_DEPENDENCIES) $(AM_V_CCLD)$(libdynlib1_la_LINK) $(am_libdynlib1_la_rpath) $(libdynlib1_la_OBJECTS) $(libdynlib1_la_LIBADD) -libdynlib2.la: $(libdynlib2_la_OBJECTS) $(libdynlib2_la_DEPENDENCIES) $(EXTRA_libdynlib2_la_DEPENDENCIES) + libdynlib2.la: $(libdynlib2_la_OBJECTS) $(libdynlib2_la_DEPENDENCIES) $(EXTRA_libdynlib2_la_DEPENDENCIES) $(AM_V_CCLD)$(libdynlib2_la_LINK) $(am_libdynlib2_la_rpath) $(libdynlib2_la_OBJECTS) $(libdynlib2_la_LIBADD) -libdynlib3.la: $(libdynlib3_la_OBJECTS) $(libdynlib3_la_DEPENDENCIES) $(EXTRA_libdynlib3_la_DEPENDENCIES) + libdynlib3.la: $(libdynlib3_la_OBJECTS) $(libdynlib3_la_DEPENDENCIES) $(EXTRA_libdynlib3_la_DEPENDENCIES) $(AM_V_CCLD)$(libdynlib3_la_LINK) $(am_libdynlib3_la_rpath) $(libdynlib3_la_OBJECTS) $(libdynlib3_la_LIBADD) -libdynlib4.la: $(libdynlib4_la_OBJECTS) $(libdynlib4_la_DEPENDENCIES) $(EXTRA_libdynlib4_la_DEPENDENCIES) + libdynlib4.la: $(libdynlib4_la_OBJECTS) $(libdynlib4_la_DEPENDENCIES) $(EXTRA_libdynlib4_la_DEPENDENCIES) $(AM_V_CCLD)$(libdynlib4_la_LINK) $(am_libdynlib4_la_rpath) $(libdynlib4_la_OBJECTS) $(libdynlib4_la_LIBADD) - -#install-exec-hook: -# $(RM) $(DESTDIR)$(dyndir)/*dynlib* +else + # The libh5test library provides common support code for the tests. + noinst_LTLIBRARIES=libh5test.la endif libh5test_la_SOURCES=h5test.c testframe.c cache_common.c swmr_common.c diff --git a/tools/test/h5diff/Makefile.am b/tools/test/h5diff/Makefile.am index 5721aaa..d2b5ebb 100644 --- a/tools/test/h5diff/Makefile.am +++ b/tools/test/h5diff/Makefile.am @@ -50,15 +50,12 @@ LDADD=$(LIBH5TOOLS) $(LIBHDF5) if HAVE_SHARED_CONDITIONAL # Build it as shared library if configure is enabled for shared library. - dyn_LTLIBRARIES=libdynlibdiff.la + noinst_LTLIBRARIES=libdynlibdiff.la libdynlibdiff_la_SOURCES=dynlib_diff.c - libdynlibdiff_la_LDFLAGS = -avoid-version -module -shared -export-dynamic + libdynlibdiff_la_LDFLAGS = -avoid-version -module -shared -export-dynamic -rpath /nowhere -libdynlibdiff.la: $(libdynlibdiff_la_OBJECTS) $(libdynlibdiff_la_DEPENDENCIES) $(EXTRA_libdynlibdiff_la_DEPENDENCIES) + libdynlibdiff.la: $(libdynlibdiff_la_OBJECTS) $(libdynlibdiff_la_DEPENDENCIES) $(EXTRA_libdynlibdiff_la_DEPENDENCIES) $(AM_V_CCLD)$(libdynlibdiff_la_LINK) $(am_libdynlibdiff_la_rpath) $(libdynlibdiff_la_OBJECTS) $(libdynlibdiff_la_LIBADD) - -#install-exec-hook: -# $(RM) $(DESTDIR)$(dyndir)/*dynlib* endif # Temporary files. *.h5 are generated by h5diff. They should diff --git a/tools/test/h5dump/Makefile.am b/tools/test/h5dump/Makefile.am index df97396..1454987 100644 --- a/tools/test/h5dump/Makefile.am +++ b/tools/test/h5dump/Makefile.am @@ -39,15 +39,12 @@ LDADD=$(LIBH5TOOLS) $(LIBHDF5) if HAVE_SHARED_CONDITIONAL # Build it as shared library if configure is enabled for shared library. - dyn_LTLIBRARIES=libdynlibdump.la + noinst_LTLIBRARIES=libdynlibdump.la libdynlibdump_la_SOURCES=dynlib_dump.c - libdynlibdump_la_LDFLAGS = -avoid-version -module -shared -export-dynamic + libdynlibdump_la_LDFLAGS = -avoid-version -module -shared -export-dynamic -rpath /nowhere -libdynlibdump.la: $(libdynlibdump_la_OBJECTS) $(libdynlibdump_la_DEPENDENCIES) $(EXTRA_libdynlibdump_la_DEPENDENCIES) + libdynlibdump.la: $(libdynlibdump_la_OBJECTS) $(libdynlibdump_la_DEPENDENCIES) $(EXTRA_libdynlibdump_la_DEPENDENCIES) $(AM_V_CCLD)$(libdynlibdump_la_LINK) $(am_libdynlibdump_la_rpath) $(libdynlibdump_la_OBJECTS) $(libdynlibdump_la_LIBADD) - -#install-exec-hook: -# $(RM) $(DESTDIR)$(dyndir)/*dynlib* endif # Temporary files. *.h5 are generated by h5dumpgentest. They should diff --git a/tools/test/h5ls/Makefile.am b/tools/test/h5ls/Makefile.am index 8ace14d..ec8b8c3 100644 --- a/tools/test/h5ls/Makefile.am +++ b/tools/test/h5ls/Makefile.am @@ -36,15 +36,12 @@ LDADD=$(LIBH5TOOLS) $(LIBHDF5) if HAVE_SHARED_CONDITIONAL # Build it as shared library if configure is enabled for shared library. - dyn_LTLIBRARIES=libdynlibls.la + noinst_LTLIBRARIES=libdynlibls.la libdynlibls_la_SOURCES=dynlib_ls.c - libdynlibls_la_LDFLAGS = -avoid-version -module -shared -export-dynamic + libdynlibls_la_LDFLAGS = -avoid-version -module -shared -export-dynamic -rpath /nowhere -libdynlibls.la: $(libdynlibls_la_OBJECTS) $(libdynlibls_la_DEPENDENCIES) $(EXTRA_libdynlibls_la_DEPENDENCIES) + libdynlibls.la: $(libdynlibls_la_OBJECTS) $(libdynlibls_la_DEPENDENCIES) $(EXTRA_libdynlibls_la_DEPENDENCIES) $(AM_V_CCLD)$(libdynlibls_la_LINK) $(am_libdynlibls_la_rpath) $(libdynlibls_la_OBJECTS) $(libdynlibls_la_LIBADD) - -#install-exec-hook: -# $(RM) $(DESTDIR)$(dyndir)/*dynlib* endif diff --git a/tools/test/h5repack/Makefile.am b/tools/test/h5repack/Makefile.am index da2a3c3..d4dc843 100644 --- a/tools/test/h5repack/Makefile.am +++ b/tools/test/h5repack/Makefile.am @@ -45,19 +45,16 @@ h5repacktst_SOURCES=h5repacktst.c if HAVE_SHARED_CONDITIONAL # Build it as shared library if configure is enabled for shared library. - dyn_LTLIBRARIES=libdynlibadd.la libdynlibvers.la + noinst_LTLIBRARIES=libdynlibadd.la libdynlibvers.la libdynlibadd_la_SOURCES=dynlib_rpk.c libdynlibvers_la_SOURCES=dynlib_vrpk.c - libdynlibadd_la_LDFLAGS = -avoid-version -module -shared -export-dynamic - libdynlibvers_la_LDFLAGS = -avoid-version -module -shared -export-dynamic + libdynlibadd_la_LDFLAGS = -avoid-version -module -shared -export-dynamic -rpath /nowhere + libdynlibvers_la_LDFLAGS = -avoid-version -module -shared -export-dynamic -rpath /nowhere -libdynlibadd.la: $(libdynlibadd_la_OBJECTS) $(libdynlibadd_la_DEPENDENCIES) $(EXTRA_libdynlibadd_la_DEPENDENCIES) + libdynlibadd.la: $(libdynlibadd_la_OBJECTS) $(libdynlibadd_la_DEPENDENCIES) $(EXTRA_libdynlibadd_la_DEPENDENCIES) $(AM_V_CCLD)$(libdynlibadd_la_LINK) $(am_libdynlibadd_la_rpath) $(libdynlibadd_la_OBJECTS) $(libdynlibadd_la_LIBADD) -libdynlibvers.la: $(libdynlibvers_la_OBJECTS) $(libdynlibvers_la_DEPENDENCIES) $(EXTRA_libdynlibvers_la_DEPENDENCIES) + libdynlibvers.la: $(libdynlibvers_la_OBJECTS) $(libdynlibvers_la_DEPENDENCIES) $(EXTRA_libdynlibvers_la_DEPENDENCIES) $(AM_V_CCLD)$(libdynlibvers_la_LINK) $(am_libdynlibvers_la_rpath) $(libdynlibvers_la_OBJECTS) $(libdynlibvers_la_LIBADD) - -#install-exec-hook: -# $(RM) $(DESTDIR)$(dyndir)/*dynlib* endif -- cgit v0.12 From b80fe75b7f83f120f4fad3f769bfe707101bfaae Mon Sep 17 00:00:00 2001 From: HDF Tester Date: Mon, 16 Oct 2017 16:50:31 -0500 Subject: Snapshot version 1.10 release 2 (snap2) --- README.txt | 2 +- c++/src/cpp_doc_config | 2 +- config/cmake/scripts/HDF5config.cmake | 2 +- configure.ac | 2 +- release_docs/RELEASE.txt | 2 +- src/H5public.h | 4 ++-- 6 files changed, 7 insertions(+), 7 deletions(-) diff --git a/README.txt b/README.txt index 893cfeb..3415253 100644 --- a/README.txt +++ b/README.txt @@ -1,4 +1,4 @@ -HDF5 version 1.10.2-snap2 currently under development +HDF5 version 1.10.2-snap3 currently under development Please refer to the release_docs/INSTALL file for installation instructions. ------------------------------------------------------------------------------ diff --git a/c++/src/cpp_doc_config b/c++/src/cpp_doc_config index c651c4d..326166f 100644 --- a/c++/src/cpp_doc_config +++ b/c++/src/cpp_doc_config @@ -38,7 +38,7 @@ PROJECT_NAME = "HDF5 C++ API" # could be handy for archiving the generated documentation or if some version # control system is used. -PROJECT_NUMBER = "1.10.2-snap2, currently under development" +PROJECT_NUMBER = "1.10.2-snap3, currently under development" # Using the PROJECT_BRIEF tag one can provide an optional one line description # for a project that appears at the top of each page and should give viewer a diff --git a/config/cmake/scripts/HDF5config.cmake b/config/cmake/scripts/HDF5config.cmake index 68bd109..421d9d7 100755 --- a/config/cmake/scripts/HDF5config.cmake +++ b/config/cmake/scripts/HDF5config.cmake @@ -39,7 +39,7 @@ cmake_minimum_required (VERSION 3.2.2 FATAL_ERROR) ############################################################################## set (CTEST_SOURCE_VERSION "1.10.2") -set (CTEST_SOURCE_VERSEXT "-snap2") +set (CTEST_SOURCE_VERSEXT "-snap3") ############################################################################## # handle input parameters to script. diff --git a/configure.ac b/configure.ac index 2b54d70..6b64713 100644 --- a/configure.ac +++ b/configure.ac @@ -24,7 +24,7 @@ AC_PREREQ([2.69]) ## NOTE: Do not forget to change the version number here when we do a ## release!!! ## -AC_INIT([HDF5], [1.10.2-snap2], [help@hdfgroup.org]) +AC_INIT([HDF5], [1.10.2-snap3], [help@hdfgroup.org]) AC_CONFIG_SRCDIR([src/H5.c]) AC_CONFIG_HEADERS([src/H5config.h]) diff --git a/release_docs/RELEASE.txt b/release_docs/RELEASE.txt index 7c87c4c..e344023 100644 --- a/release_docs/RELEASE.txt +++ b/release_docs/RELEASE.txt @@ -1,4 +1,4 @@ -HDF5 version 1.10.2-snap2 currently under development +HDF5 version 1.10.2-snap3 currently under development ================================================================================ diff --git a/src/H5public.h b/src/H5public.h index e65ec28..c03ce5b 100644 --- a/src/H5public.h +++ b/src/H5public.h @@ -93,9 +93,9 @@ extern "C" { #define H5_VERS_MAJOR 1 /* For major interface/format changes */ #define H5_VERS_MINOR 10 /* For minor interface/format changes */ #define H5_VERS_RELEASE 2 /* For tweaks, bug-fixes, or development */ -#define H5_VERS_SUBRELEASE "snap2" /* For pre-releases like snap0 */ +#define H5_VERS_SUBRELEASE "snap3" /* For pre-releases like snap0 */ /* Empty string for real releases. */ -#define H5_VERS_INFO "HDF5 library version: 1.10.2-snap2" /* Full version string */ +#define H5_VERS_INFO "HDF5 library version: 1.10.2-snap3" /* Full version string */ #define H5check() H5check_version(H5_VERS_MAJOR,H5_VERS_MINOR, \ H5_VERS_RELEASE) -- cgit v0.12 From 0b3b55f791479b7838c602a4f51300de9aa4772e Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Wed, 18 Oct 2017 16:37:49 -0500 Subject: HDFFV-10297 Merge from develop --- MANIFEST | 8 + tools/lib/h5diff.c | 1093 ++++++------- tools/lib/h5diff.h | 22 +- tools/lib/h5diff_array.c | 1720 ++++++++++---------- tools/lib/h5diff_attr.c | 263 +-- tools/lib/h5diff_dset.c | 576 ++++--- tools/lib/h5diff_util.c | 84 +- tools/lib/h5tools_dump.c | 180 +- tools/lib/h5tools_filters.c | 65 +- tools/lib/h5tools_type.c | 124 +- tools/lib/h5tools_utils.c | 231 +-- tools/lib/h5trav.c | 533 +++--- tools/lib/ph5diff.h | 2 +- tools/src/h5diff/h5diff_common.c | 82 +- tools/src/h5diff/h5diff_common.h | 4 +- tools/src/h5diff/h5diff_main.c | 12 +- tools/src/h5diff/ph5diff_main.c | 18 +- tools/src/h5repack/h5repack.c | 50 +- tools/src/h5repack/h5repack_copy.c | 209 +-- tools/src/h5repack/h5repack_refs.c | 32 +- tools/test/h5copy/CMakeLists.txt | 48 +- tools/test/h5copy/CMakeTests.cmake | 158 +- tools/test/h5copy/dynlib_copy.c | 89 + .../testfiles/h5copy_plugin_fail_ERR.out.h5.txt | 3 + .../h5copy/testfiles/h5copy_plugin_test.out.h5.txt | 3 + tools/test/h5copy/testfiles/tudfilter.h5 | Bin 0 -> 4816 bytes tools/test/h5copy/testfiles/tudfilter.h5.txt | 2 + tools/test/h5copy/testfiles/tudfilter.h5_ERR.txt | 2 + tools/test/h5copy/testfiles/tudfilter2.h5 | Bin 0 -> 4816 bytes tools/test/h5diff/testfiles/h5diff_454_ERR.err | 2 +- tools/test/h5diff/testfiles/h5diff_454_ERR.txt | 2 +- tools/test/h5diff/testfiles/h5diff_455_ERR.err | 2 +- tools/test/h5diff/testfiles/h5diff_455_ERR.txt | 2 +- tools/test/h5diff/testfiles/h5diff_457_ERR.err | 2 +- tools/test/h5diff/testfiles/h5diff_457_ERR.txt | 2 +- tools/test/h5diff/testfiles/h5diff_458_ERR.err | 2 +- tools/test/h5diff/testfiles/h5diff_458_ERR.txt | 2 +- tools/test/h5diff/testfiles/h5diff_459_ERR.err | 2 +- tools/test/h5diff/testfiles/h5diff_459_ERR.txt | 2 +- tools/test/h5diff/testfiles/h5diff_60.txt | 4 +- tools/test/h5diff/testfiles/h5diff_61.txt | 48 +- tools/test/h5diff/testfiles/h5diff_62.txt | 62 +- tools/test/h5diff/testfiles/h5diff_63.txt | 8 +- tools/test/h5diff/testfiles/h5diff_70.txt | 756 ++++----- tools/test/h5diff/testfiles/h5diff_700.txt | 756 ++++----- tools/test/h5diff/testfiles/h5diff_701.txt | 756 ++++----- tools/test/h5diff/testfiles/h5diff_702.txt | 756 ++++----- tools/test/h5diff/testfiles/h5diff_703.txt | 756 ++++----- tools/test/h5diff/testfiles/h5diff_80.txt | 252 +-- tools/test/h5diff/testfiles/h5diff_udfail.txt | 2 +- tools/test/h5format_convert/CMakeTests.cmake | 59 +- .../test/h5format_convert/testfiles/h5fc_v_err.ddl | 1 - .../test/h5format_convert/testfiles/h5fc_v_err.err | 8 + tools/test/h5format_convert/testh5fc.sh.in | 136 +- tools/test/h5repack/CMakeTests.cmake | 4 +- tools/test/h5repack/h5repacktst.c | 6 +- 56 files changed, 4949 insertions(+), 5054 deletions(-) create mode 100644 tools/test/h5copy/dynlib_copy.c create mode 100644 tools/test/h5copy/testfiles/h5copy_plugin_fail_ERR.out.h5.txt create mode 100644 tools/test/h5copy/testfiles/h5copy_plugin_test.out.h5.txt create mode 100644 tools/test/h5copy/testfiles/tudfilter.h5 create mode 100644 tools/test/h5copy/testfiles/tudfilter.h5.txt create mode 100644 tools/test/h5copy/testfiles/tudfilter.h5_ERR.txt create mode 100644 tools/test/h5copy/testfiles/tudfilter2.h5 create mode 100644 tools/test/h5format_convert/testfiles/h5fc_v_err.err diff --git a/MANIFEST b/MANIFEST index bb43974..801b2b9 100644 --- a/MANIFEST +++ b/MANIFEST @@ -1346,6 +1346,7 @@ ./tools/test/h5format_convert/testfiles/h5fc_v_n_all.ddl ./tools/test/h5format_convert/testfiles/h5fc_v_bt1.ddl ./tools/test/h5format_convert/testfiles/h5fc_v_err.ddl +./tools/test/h5format_convert/testfiles/h5fc_v_err.ddl.err ./tools/test/h5format_convert/testfiles/h5fc_v_non_chunked.ddl ./tools/test/h5format_convert/testfiles/h5fc_d_file.ddl ./tools/test/h5format_convert/testfiles/h5fc_v_ndata_bt1.ddl @@ -1425,6 +1426,7 @@ ./tools/test/h5copy/Makefile.am ./tools/test/h5copy/h5copygentest.c ./tools/test/h5copy/testh5copy.sh.in +./tools/test/h5copy/dynlib_copy.c ./tools/lib/Makefile.am @@ -2515,6 +2517,12 @@ ./tools/test/h5copy/testfiles/h5copy_misc1.out ./tools/test/h5copy/testfiles/h5copytst_new.h5 ./tools/test/h5copy/testfiles/h5copytst_new.out.ls +./tools/test/h5copy/testfiles/h5copy_plugin_fail_ERR.out.h5.txt +./tools/test/h5copy/testfiles/h5copy_plugin_test.out.h5.txt +./tools/test/h5copy/testfiles/tudfilter.h5 +./tools/test/h5copy/testfiles/tudfilter2.h5 +./tools/test/h5copy/testfiles/tudfilter.h5.txt +./tools/test/h5copy/testfiles/tudfilter.h5_ERR.txt # test files for h5mkgrp ./tools/testfiles/h5mkgrp_nested_p.ls diff --git a/tools/lib/h5diff.c b/tools/lib/h5diff.c index 0be6f5c..94cca58 100644 --- a/tools/lib/h5diff.c +++ b/tools/lib/h5diff.c @@ -21,25 +21,25 @@ /*------------------------------------------------------------------------- * Function: print_objname * - * Purpose: check if object name is to be printed, only when: - * 1) verbose mode - * 2) when diff was found (normal mode) + * Purpose: check if object name is to be printed, only when: + * 1) verbose mode + * 2) when diff was found (normal mode) *------------------------------------------------------------------------- */ H5_ATTR_PURE int -print_objname (diff_opt_t * options, hsize_t nfound) +print_objname (diff_opt_t * opts, hsize_t nfound) { - return ((options->m_verbose || nfound) && !options->m_quiet) ? 1 : 0; + return ((opts->m_verbose || nfound) && !opts->m_quiet) ? 1 : 0; } /*------------------------------------------------------------------------- * Function: do_print_objname * - * Purpose: print object name - * + * Purpose: print object name *------------------------------------------------------------------------- */ -void do_print_objname (const char *OBJ, const char *path1, const char *path2, diff_opt_t * opts) +void +do_print_objname (const char *OBJ, const char *path1, const char *path2, diff_opt_t * opts) { /* if verbose level is higher than 0, put space line before * displaying any object or symbolic links. This improves @@ -53,8 +53,7 @@ void do_print_objname (const char *OBJ, const char *path1, const char *path2, di /*------------------------------------------------------------------------- * Function: do_print_attrname * - * Purpose: print attribute name - * + * Purpose: print attribute name *------------------------------------------------------------------------- */ void @@ -66,17 +65,16 @@ do_print_attrname (const char *attr, const char *path1, const char *path2) /*------------------------------------------------------------------------- * Function: print_warn * - * Purpose: check print warning condition. + * Purpose: check print warning condition. * Return: - * 1 if verbose mode - * 0 if not verbos mode - * Programmer: Jonathan Kim - * Date: Feb 4, 2010 + * 1 if verbose mode + * 0 if not verbos mode *------------------------------------------------------------------------- */ -static int print_warn(diff_opt_t *options) +static int +print_warn(diff_opt_t *opts) { - return ((options->m_verbose))?1:0; + return ((opts->m_verbose)) ? 1: 0; } @@ -84,20 +82,16 @@ static int print_warn(diff_opt_t *options) /*------------------------------------------------------------------------- * Function: phdiff_dismiss_workers * - * Purpose: tell all workers to end. - * - * Return: none - * - * Programmer: Albert Cheng - * - * Date: Feb 6, 2005 + * Purpose: tell all workers to end. * + * Return: none *------------------------------------------------------------------------- */ -void phdiff_dismiss_workers(void) +void +phdiff_dismiss_workers(void) { int i; - for(i=1; im_quiet && (options->m_verbose || options->m_report)) - { + if(opts->m_quiet && (opts->m_verbose || opts->m_report)) { parallel_print("Error: -q (quiet mode) cannot be added to verbose or report modes\n"); - options->err_stat=1; - ret = 0; - goto out; + opts->err_stat = 1; + HGOTO_DONE(0); } /* ------------------------------------------------------- * only allow --no-dangling-links along with --follow-symlinks */ - if(options->no_dangle_links && !options->follow_links) - { + if(opts->no_dangle_links && !opts->follow_links) { parallel_print("Error: --no-dangling-links must be used along with --follow-symlinks option.\n"); - options->err_stat=1; - ret = 0; - goto out; + opts->err_stat = 1; + HGOTO_DONE(0); } -out: +done: - return ret; + return ret_value; } /*------------------------------------------------------------------------- * Function: is_exclude_path * - * Purpose: check if 'paths' are part of exclude path list + * Purpose: check if 'paths' are part of exclude path list * * Return: - * 1 - excluded path - * 0 - not excluded path - * - * Programmer: Jonathan Kim - * Date: Aug 23, 2010 + * 1 - excluded path + * 0 - not excluded path *------------------------------------------------------------------------*/ -static int is_exclude_path (char * path, h5trav_type_t type, diff_opt_t *options) +static int +is_exclude_path (char * path, h5trav_type_t type, diff_opt_t *opts) { struct exclude_path_list * exclude_path_ptr; - int ret_cmp; - int ret = 0; + int ret_cmp; + int ret_value = 0; /* check if exclude path option is given */ - if (!options->exclude_path) - goto out; + if (!opts->exclude_path) + HGOTO_DONE(0); /* assign to local exclude list pointer */ - exclude_path_ptr = options->exclude; + exclude_path_ptr = opts->exclude; /* search objects in exclude list */ - while (NULL != exclude_path_ptr) - { + while (NULL != exclude_path_ptr) { /* if exclude path is is group, exclude its members as well */ - if (exclude_path_ptr->obj_type == H5TRAV_TYPE_GROUP) - { + if (exclude_path_ptr->obj_type == H5TRAV_TYPE_GROUP) { ret_cmp = HDstrncmp(exclude_path_ptr->obj_path, path, HDstrlen(exclude_path_ptr->obj_path)); - if (ret_cmp == 0) /* found matching members */ - { + if (ret_cmp == 0) { /* found matching members */ size_t len_grp; /* check if given path belong to an excluding group, if so @@ -223,22 +198,19 @@ static int is_exclude_path (char * path, h5trav_type_t type, diff_opt_t *options * not under “/grp1xxx/” group. */ len_grp = HDstrlen(exclude_path_ptr->obj_path); - if (path[len_grp] == '/') - { + if (path[len_grp] == '/') { /* belong to excluded group! */ - ret = 1; + ret_value = 1; break; /* while */ } } } /* exclude target is not group, just exclude the object */ - else - { + else { ret_cmp = HDstrcmp(exclude_path_ptr->obj_path, path); - if (ret_cmp == 0) /* found matching object */ - { + if (ret_cmp == 0) { /* found matching object */ /* excluded non-group object */ - ret = 1; + ret_value = 1; /* remember the type of this maching object. * if it's group, it can be used for excluding its member * objects in this while() loop */ @@ -249,26 +221,23 @@ static int is_exclude_path (char * path, h5trav_type_t type, diff_opt_t *options exclude_path_ptr = exclude_path_ptr->next; } -out: - return ret; +done: + return ret_value; } /*------------------------------------------------------------------------- * Function: free_exclude_path_list * - * Purpose: free exclud object list from diff options - * - * Programmer: Jonathan Kim - * Date: Aug 23, 2010 + * Purpose: free exclude object list from diff options *------------------------------------------------------------------------*/ -static void free_exclude_path_list(diff_opt_t *options) +static void +free_exclude_path_list(diff_opt_t *opts) { - struct exclude_path_list * curr = options->exclude; - struct exclude_path_list * next; + struct exclude_path_list *curr = opts->exclude; + struct exclude_path_list *next; - while (NULL != curr) - { + while (NULL != curr) { next = curr->next; HDfree(curr); curr = next; @@ -278,44 +247,43 @@ static void free_exclude_path_list(diff_opt_t *options) /*------------------------------------------------------------------------- * Function: build_match_list * - * Purpose: get list of matching path_name from info1 and info2 + * Purpose: get list of matching path_name from info1 and info2 * * Note: - * Find common objects; the algorithm used for this search is the - * cosequential match algorithm and is described in - * Folk, Michael; Zoellick, Bill. (1992). File Structures. Addison-Wesley. - * Moved out from diff_match() to make code more flexible. + * Find common objects; the algorithm used for this search is the + * cosequential match algorithm and is described in + * Folk, Michael; Zoellick, Bill. (1992). File Structures. Addison-Wesley. + * Moved out from diff_match() to make code more flexible. * * Parameter: - * table_out [OUT] : return the list - * - * Programmer: Jonathan Kim - * - * Date: Aug 18, 2010 + * table_out [OUT] : return the list *------------------------------------------------------------------------*/ -static void build_match_list (const char *objname1, trav_info_t *info1, const char *objname2, trav_info_t *info2, trav_table_t ** table_out, diff_opt_t *options) +static void +build_match_list (const char *objname1, trav_info_t *info1, const char *objname2, trav_info_t *info2, + trav_table_t ** table_out, diff_opt_t *opts) { - size_t curr1 = 0; - size_t curr2 = 0; + size_t curr1 = 0; + size_t curr2 = 0; unsigned infile[2]; - char * path1_lp; - char * path2_lp; + char *path1_lp = NULL; + char *path2_lp = NULL; h5trav_type_t type1_l; h5trav_type_t type2_l; - size_t path1_offset = 0; - size_t path2_offset = 0; - int cmp; - trav_table_t *table; - size_t idx; + size_t path1_offset = 0; + size_t path2_offset = 0; + int cmp; + trav_table_t *table = NULL; + size_t idx; h5difftrace("build_match_list start\n"); /* init */ - trav_table_init( &table ); - + trav_table_init(&table); + if (table == NULL) + H5TOOLS_INFO(H5E_tools_min_id_g, "Cannot create tarverse table"); /* * This is necessary for the case that given objects are group and * have different names (ex: obj1 is /grp1 and obj2 is /grp5). - * All the objects belong to given groups are the cadidates. + * All the objects belong to given groups are the candidates. * So prepare to compare paths without the group names. */ @@ -329,8 +297,7 @@ static void build_match_list (const char *objname1, trav_info_t *info1, const ch /*-------------------------------------------------- * build the list */ - while(curr1 < info1->nused && curr2 < info2->nused) - { + while(curr1 < info1->nused && curr2 < info2->nused) { path1_lp = (info1->paths[curr1].path) + path1_offset; path2_lp = (info2->paths[curr2].path) + path2_offset; type1_l = info1->paths[curr1].type; @@ -338,19 +305,15 @@ static void build_match_list (const char *objname1, trav_info_t *info1, const ch /* criteria is string compare */ cmp = HDstrcmp(path1_lp, path2_lp); - - if(cmp == 0) - { - if(!is_exclude_path(path1_lp, type1_l, options)) - { + if(cmp == 0) { + if(!is_exclude_path(path1_lp, type1_l, opts)) { infile[0] = 1; infile[1] = 1; trav_table_addflags(infile, path1_lp, info1->paths[curr1].type, table); /* if the two point to the same target object, * mark that in table */ if (info1->paths[curr1].fileno == info2->paths[curr2].fileno && - info1->paths[curr1].objno == info2->paths[curr2].objno ) - { + info1->paths[curr1].objno == info2->paths[curr2].objno) { idx = table->nobjs - 1; table->objs[idx].is_same_trgobj = 1; } @@ -358,20 +321,16 @@ static void build_match_list (const char *objname1, trav_info_t *info1, const ch curr1++; curr2++; } /* end if */ - else if(cmp < 0) - { - if(!is_exclude_path(path1_lp, type1_l, options)) - { + else if(cmp < 0) { + if(!is_exclude_path(path1_lp, type1_l, opts)) { infile[0] = 1; infile[1] = 0; trav_table_addflags(infile, path1_lp, info1->paths[curr1].type, table); } curr1++; } /* end else-if */ - else - { - if (!is_exclude_path(path2_lp, type2_l, options)) - { + else { + if (!is_exclude_path(path2_lp, type2_l, opts)) { infile[0] = 0; infile[1] = 1; trav_table_addflags(infile, path2_lp, info2->paths[curr2].type, table); @@ -383,13 +342,11 @@ static void build_match_list (const char *objname1, trav_info_t *info1, const ch /* list1 did not end */ infile[0] = 1; infile[1] = 0; - while(curr1 < info1->nused) - { + while(curr1 < info1->nused) { path1_lp = (info1->paths[curr1].path) + path1_offset; type1_l = info1->paths[curr1].type; - if(!is_exclude_path(path1_lp, type1_l, options)) - { + if(!is_exclude_path(path1_lp, type1_l, opts)) { trav_table_addflags(infile, path1_lp, info1->paths[curr1].type, table); } curr1++; @@ -398,19 +355,17 @@ static void build_match_list (const char *objname1, trav_info_t *info1, const ch /* list2 did not end */ infile[0] = 0; infile[1] = 1; - while(curr2 < info2->nused) - { + while(curr2 < info2->nused) { path2_lp = (info2->paths[curr2].path) + path2_offset; type2_l = info2->paths[curr2].type; - if (!is_exclude_path(path2_lp, type2_l, options)) - { + if (!is_exclude_path(path2_lp, type2_l, opts)) { trav_table_addflags(infile, path2_lp, info2->paths[curr2].type, table); } curr2++; } /* end while */ - free_exclude_path_list (options); + free_exclude_path_list (opts); *table_out = table; h5difftrace("build_match_list finish\n"); @@ -420,15 +375,11 @@ static void build_match_list (const char *objname1, trav_info_t *info1, const ch /*------------------------------------------------------------------------- * Function: trav_grp_objs * - * Purpose: - * Call back function from h5trav_visit(). - * - * Programmer: Jonathan Kim - * - * Date: Aug 16, 2010 + * Purpose: Call back function from h5trav_visit(). *------------------------------------------------------------------------*/ -static herr_t trav_grp_objs(const char *path, const H5O_info_t *oinfo, - const char *already_visited, void *udata) +static herr_t +trav_grp_objs(const char *path, const H5O_info_t *oinfo, + const char *already_visited, void *udata) { trav_info_visit_obj(path, oinfo, already_visited, udata); @@ -438,18 +389,13 @@ static herr_t trav_grp_objs(const char *path, const H5O_info_t *oinfo, /*------------------------------------------------------------------------- * Function: trav_grp_symlinks * - * Purpose: - * Call back function from h5trav_visit(). - * Track and extra checkings while visiting all symbolic-links. - * - * Programmer: Jonathan Kim - * - * Date: Aug 16, 2010 + * Purpose: Call back function from h5trav_visit(). + * Track and extra checkings while visiting all symbolic-links. *------------------------------------------------------------------------*/ -static herr_t trav_grp_symlinks(const char *path, const H5L_info_t *linfo, - void *udata) +static herr_t +trav_grp_symlinks(const char *path, const H5L_info_t *linfo, void *udata) { - int ret_value = 0; + herr_t ret_value = 0; trav_info_t *tinfo = (trav_info_t *)udata; diff_opt_t *opts = (diff_opt_t *)tinfo->opts; h5tool_link_info_t lnk_info; @@ -461,66 +407,68 @@ static herr_t trav_grp_symlinks(const char *path, const H5L_info_t *linfo, if (!opts->follow_links) { trav_info_visit_lnk(path, linfo, tinfo); - goto done; + HGOTO_DONE(0); } switch(linfo->type) { case H5L_TYPE_SOFT: - if((ret_value = H5tools_get_symlink_info(tinfo->fid, path, &lnk_info, opts->follow_links)) < 0) - goto done; - /* no dangling link option given and detect dangling link */ + if((ret_value = H5tools_get_symlink_info(tinfo->fid, path, &lnk_info, opts->follow_links)) < 0) { + HGOTO_DONE(FAIL); + } else if (ret_value == 0) { - tinfo->symlink_visited.dangle_link = TRUE; + /* no dangling link option given and detect dangling link */ + tinfo->symlink_visited.dangle_link = TRUE; trav_info_visit_lnk(path, linfo, tinfo); if (opts->no_dangle_links) opts->err_stat = 1; /* make dangling link is error */ - goto done; + HGOTO_DONE(0); } /* check if already visit the target object */ if(symlink_is_visited( &(tinfo->symlink_visited), linfo->type, NULL, lnk_info.trg_path)) - goto done; + HGOTO_DONE(0); /* add this link as visited link */ if(symlink_visit_add( &(tinfo->symlink_visited), linfo->type, NULL, lnk_info.trg_path) < 0) - goto done; + HGOTO_DONE(0); if(h5trav_visit(tinfo->fid, path, TRUE, TRUE, trav_grp_objs,trav_grp_symlinks, tinfo) < 0) { parallel_print("Error: Could not get file contents\n"); opts->err_stat = 1; - HGOTO_ERROR(opts->err_stat, H5E_tools_min_id_g, "Error: Could not get file contents"); + HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "Error: Could not get file contents"); } break; case H5L_TYPE_EXTERNAL: - if ((ret_value = H5tools_get_symlink_info(tinfo->fid, path, &lnk_info, opts->follow_links)) < 0) - goto done; - /* no dangling link option given and detect dangling link */ + if ((ret_value = H5tools_get_symlink_info(tinfo->fid, path, &lnk_info, opts->follow_links)) < 0) { + HGOTO_DONE(FAIL); + } else if (ret_value == 0) { + /* no dangling link option given and detect dangling link */ tinfo->symlink_visited.dangle_link = TRUE; trav_info_visit_lnk(path, linfo, tinfo); if (opts->no_dangle_links) opts->err_stat = 1; /* make dangling link is error */ - goto done; + HGOTO_DONE(0); } if(H5Lunpack_elink_val(lnk_info.trg_path, linfo->u.val_size, NULL, &ext_fname, &ext_path) < 0) - goto done; + HGOTO_DONE(0); /* check if already visit the target object */ if(symlink_is_visited( &(tinfo->symlink_visited), linfo->type, ext_fname, ext_path)) - goto done; + HGOTO_DONE(0); /* add this link as visited link */ if(symlink_visit_add( &(tinfo->symlink_visited), linfo->type, ext_fname, ext_path) < 0) - goto done; + HGOTO_DONE(0); if(h5trav_visit(tinfo->fid, path, TRUE, TRUE, trav_grp_objs,trav_grp_symlinks, tinfo) < 0) { parallel_print("Error: Could not get file contents\n"); opts->err_stat = 1; - HGOTO_ERROR(opts->err_stat, H5E_tools_min_id_g, "Error: Could not get file contents\n"); + HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "Error: Could not get file contents\n"); } break; @@ -530,52 +478,48 @@ static herr_t trav_grp_symlinks(const char *path, const H5L_info_t *linfo, default: parallel_print("Error: Invalid link type\n"); opts->err_stat = 1; - HGOTO_ERROR(opts->err_stat, H5E_tools_min_id_g, "Error: Invalid link type"); + HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "Error: Invalid link type"); break; } /* end of switch */ done: if (lnk_info.trg_path) HDfree(lnk_info.trg_path); - return 0; + return ret_value; } /*------------------------------------------------------------------------- * Function: h5diff * - * Purpose: public function, can be called in an application program. - * return differences between 2 HDF5 files - * - * Return: Number of differences found. - * - * Programmer: Pedro Vicente, pvn@ncsa.uiuc.edu - * - * Date: October 22, 2003 + * Purpose: public function, can be called in an application program. + * return differences between 2 HDF5 files * + * Return: Number of differences found. *------------------------------------------------------------------------- */ -hsize_t h5diff(const char *fname1, +hsize_t +h5diff(const char *fname1, const char *fname2, const char *objname1, const char *objname2, diff_opt_t *opts) { - int ret_value = 0; - hid_t file1_id = (-1); - hid_t file2_id = (-1); - char filenames[2][MAX_FILENAME]; - hsize_t nfound = 0; - int l_ret1 = -1; - int l_ret2 = -1; - char * obj1fullname = NULL; - char * obj2fullname = NULL; - int both_objs_grp = 0; + int ret_value = 0; + hid_t file1_id = -1; + hid_t file2_id = -1; + char filenames[2][MAX_FILENAME]; + hsize_t nfound = 0; + int l_ret1 = -1; + int l_ret2 = -1; + char *obj1fullname = NULL; + char *obj2fullname = NULL; + int both_objs_grp = 0; /* init to group type */ h5trav_type_t obj1type = H5TRAV_TYPE_GROUP; h5trav_type_t obj2type = H5TRAV_TYPE_GROUP; /* for single object */ - H5O_info_t oinfo1, oinfo2; /* object info */ + H5O_info_t oinfo1, oinfo2; /* object info */ trav_info_t *info1_obj = NULL; trav_info_t *info2_obj = NULL; /* for group object */ @@ -585,8 +529,8 @@ hsize_t h5diff(const char *fname1, trav_info_t *info1_lp = NULL; trav_info_t *info2_lp = NULL; /* link info from specified object */ - H5L_info_t src_linfo1; - H5L_info_t src_linfo2; + H5L_info_t src_linfo1; + H5L_info_t src_linfo2; /* link info from member object */ h5tool_link_info_t trg_linfo1; h5tool_link_info_t trg_linfo2; @@ -604,34 +548,27 @@ hsize_t h5diff(const char *fname1, * check invalid combination of options *-----------------------------------------------------------------------*/ if(!is_valid_options(opts)) - goto done; + HGOTO_DONE(0); opts->cmn_objs = 1; /* eliminate warning */ + opts->err_stat = 0; /* initialize error status */ /*------------------------------------------------------------------------- * open the files first; if they are not valid, no point in continuing *------------------------------------------------------------------------- */ - - /* disable error reporting */ - H5E_BEGIN_TRY - { - /* open file 1 */ - if((file1_id = h5tools_fopen(fname1, H5F_ACC_RDONLY, H5P_DEFAULT, NULL, NULL, (size_t)0)) < 0) { - parallel_print("h5diff: <%s>: unable to open file\n", fname1); - opts->err_stat = 1; - goto done; - } /* end if */ + /* open file 1 */ + if((file1_id = h5tools_fopen(fname1, H5F_ACC_RDONLY, H5P_DEFAULT, NULL, NULL, (size_t)0)) < 0) { + parallel_print("h5diff: <%s>: unable to open file\n", fname1); + HGOTO_ERROR(1, H5E_tools_min_id_g, "<%s>: unable to open file\n", fname1); + } /* end if */ - /* open file 2 */ - if((file2_id = h5tools_fopen(fname2, H5F_ACC_RDONLY, H5P_DEFAULT, NULL, NULL, (size_t)0)) < 0) { - parallel_print("h5diff: <%s>: unable to open file\n", fname2); - opts->err_stat = 1; - goto done; - } /* end if */ - /* enable error reporting */ - } H5E_END_TRY; + /* open file 2 */ + if((file2_id = h5tools_fopen(fname2, H5F_ACC_RDONLY, H5P_DEFAULT, NULL, NULL, (size_t)0)) < 0) { + parallel_print("h5diff: <%s>: unable to open file\n", fname2); + HGOTO_ERROR(1, H5E_tools_min_id_g, "<%s>: unable to open file\n", fname2); + } /* end if */ /*------------------------------------------------------------------------- * Initialize the info structs @@ -648,10 +585,12 @@ hsize_t h5diff(const char *fname1, #ifdef H5_HAVE_ASPRINTF /* Use the asprintf() routine, since it does what we're trying to do below */ if(HDasprintf(&obj1fullname, "/%s", objname1) < 0) - goto done; + HGOTO_ERROR(1, H5E_tools_min_id_g, "name buffer allocation failed"); #else /* H5_HAVE_ASPRINTF */ /* (malloc 2 more for "/" and end-of-line) */ - obj1fullname = (char*)HDmalloc(HDstrlen(objname1) + 2); + if ((obj1fullname = (char*)HDmalloc(HDstrlen(objname1) + 2)) == NULL) + HGOTO_ERROR(1, H5E_tools_min_id_g, "name buffer allocation failed"); + HDstrcpy(obj1fullname, "/"); HDstrcat(obj1fullname, objname1); #endif /* H5_HAVE_ASPRINTF */ @@ -664,10 +603,11 @@ hsize_t h5diff(const char *fname1, #ifdef H5_HAVE_ASPRINTF /* Use the asprintf() routine, since it does what we're trying to do below */ if(HDasprintf(&obj2fullname, "/%s", objname2) < 0) - goto done; + HGOTO_ERROR(1, H5E_tools_min_id_g, "name buffer allocation failed"); #else /* H5_HAVE_ASPRINTF */ /* (malloc 2 more for "/" and end-of-line) */ - obj2fullname = (char*)HDmalloc(HDstrlen(objname2) + 2); + if ((obj2fullname = (char*)HDmalloc(HDstrlen(objname2) + 2)) == NULL) + HGOTO_ERROR(1, H5E_tools_min_id_g, "name buffer allocation failed"); HDstrcpy(obj2fullname, "/"); HDstrcat(obj2fullname, objname2); #endif /* H5_HAVE_ASPRINTF */ @@ -686,14 +626,12 @@ hsize_t h5diff(const char *fname1, /* check if link itself exist */ if(H5Lexists(file1_id, obj1fullname, H5P_DEFAULT) <= 0) { parallel_print ("Object <%s> could not be found in <%s>\n", obj1fullname, fname1); - opts->err_stat = 1; - HGOTO_ERROR(opts->err_stat, H5E_tools_min_id_g, "Error: Object could not be found"); + HGOTO_ERROR(1, H5E_tools_min_id_g, "Error: Object could not be found"); } /* get info from link */ if(H5Lget_info(file1_id, obj1fullname, &src_linfo1, H5P_DEFAULT) < 0) { parallel_print("Unable to get link info from <%s>\n", obj1fullname); - H5TOOLS_INFO(H5E_tools_min_id_g, "Unable to get link info\n"); - goto done; + HGOTO_ERROR(1, H5E_tools_min_id_g, "H5Lget_info failed"); } info1_lp = info1_obj; @@ -709,8 +647,7 @@ hsize_t h5diff(const char *fname1, if(H5Oget_info_by_name(file1_id, obj1fullname, &oinfo1, H5P_DEFAULT) < 0) { parallel_print("Error: Could not get file contents\n"); - opts->err_stat = 1; - HGOTO_ERROR(opts->err_stat, H5E_tools_min_id_g, "Error: Could not get file contents"); + HGOTO_ERROR(1, H5E_tools_min_id_g, "Error: Could not get file contents"); } obj1type = (h5trav_type_t)oinfo1.type; trav_info_add(info1_obj, obj1fullname, obj1type); @@ -739,13 +676,12 @@ hsize_t h5diff(const char *fname1, /* check if link itself exist */ if(H5Lexists(file2_id, obj2fullname, H5P_DEFAULT) <= 0) { parallel_print ("Object <%s> could not be found in <%s>\n", obj2fullname, fname2); - opts->err_stat = 1; - HGOTO_ERROR(opts->err_stat, H5E_tools_min_id_g, "Error: Object could not be found"); + HGOTO_ERROR(1, H5E_tools_min_id_g, "Error: Object could not be found"); } /* get info from link */ if(H5Lget_info(file2_id, obj2fullname, &src_linfo2, H5P_DEFAULT) < 0) { parallel_print("Unable to get link info from <%s>\n", obj2fullname); - goto done; + HGOTO_ERROR(1, H5E_tools_min_id_g, "H5Lget_info failed"); } info2_lp = info2_obj; @@ -761,8 +697,7 @@ hsize_t h5diff(const char *fname1, if(H5Oget_info_by_name(file2_id, obj2fullname, &oinfo2, H5P_DEFAULT) < 0) { parallel_print("Error: Could not get file contents\n"); - opts->err_stat = 1; - HGOTO_ERROR(opts->err_stat, H5E_tools_min_id_g, "Error: Could not get file contents"); + HGOTO_ERROR(1, H5E_tools_min_id_g, "Error: Could not get file contents"); } obj2type = (h5trav_type_t)oinfo2.type; trav_info_add(info2_obj, obj2fullname, obj2type); @@ -790,7 +725,7 @@ hsize_t h5diff(const char *fname1, obj2type = H5TRAV_TYPE_GROUP; } - + h5diffdebug2("get any symbolic links info - errstat:%d\n", opts->err_stat); /* get any symbolic links info */ l_ret1 = H5tools_get_symlink_info(file1_id, obj1fullname, &trg_linfo1, opts->follow_links); l_ret2 = H5tools_get_symlink_info(file2_id, obj2fullname, &trg_linfo2, opts->follow_links); @@ -814,8 +749,7 @@ hsize_t h5diff(const char *fname1, /* treat dangling link as error */ if(opts->m_verbose) parallel_print("Warning: <%s> is a dangling link.\n", obj1fullname); - opts->err_stat = 1; - HGOTO_ERROR(opts->err_stat, H5E_tools_min_id_g, "Error: treat dangling link as error"); + HGOTO_ERROR(1, H5E_tools_min_id_g, "treat dangling link as error"); } else { if(opts->m_verbose) @@ -823,14 +757,13 @@ hsize_t h5diff(const char *fname1, if (l_ret1 != 0 || l_ret2 != 0) { nfound++; print_found(nfound); - goto done; + HGOTO_DONE(0); } } } else if(l_ret1 < 0) { /* fail */ parallel_print ("Object <%s> could not be found in <%s>\n", obj1fullname, fname1); - opts->err_stat = 1; - HGOTO_ERROR(opts->err_stat, H5E_tools_min_id_g, "Error: Object could not be found"); + HGOTO_ERROR(1, H5E_tools_min_id_g, "Object could not be found"); } else if(l_ret1 != 2) { /* symbolic link */ obj1type = (h5trav_type_t)trg_linfo1.trg_type; @@ -857,23 +790,21 @@ hsize_t h5diff(const char *fname1, /* treat dangling link as error */ if(opts->m_verbose) parallel_print("Warning: <%s> is a dangling link.\n", obj2fullname); - opts->err_stat = 1; - HGOTO_ERROR(opts->err_stat, H5E_tools_min_id_g, "Error: treat dangling link as error"); + HGOTO_ERROR(1, H5E_tools_min_id_g, "treat dangling link as error"); } else { if(opts->m_verbose) parallel_print("obj2 <%s> is a dangling link.\n", obj2fullname); - if (l_ret1 != 0 || l_ret2 != 0) { + if (l_ret1 != 0 || l_ret2 != 0) { nfound++; print_found(nfound); - goto done; + HGOTO_DONE(0); } } } else if(l_ret2 < 0) { /* fail */ parallel_print ("Object <%s> could not be found in <%s>\n", obj2fullname, fname2); - opts->err_stat = 1; - HGOTO_ERROR(opts->err_stat, H5E_tools_min_id_g, "Error: Object could not be found"); + HGOTO_ERROR(1, H5E_tools_min_id_g, "Object could not be found"); } else if(l_ret2 != 2) { /* symbolic link */ obj2type = (h5trav_type_t)trg_linfo2.trg_type; @@ -899,9 +830,9 @@ hsize_t h5diff(const char *fname1, if(!(opts->m_verbose || opts->m_report)) { h5difftrace("h5diff NOT (opts->m_verbose || opts->m_report)\n"); /* if no danglink links */ - if ( l_ret1 > 0 && l_ret2 > 0 ) - if (h5tools_is_obj_same(file1_id, obj1fullname, file2_id, obj2fullname)!=0) - goto done; + if (l_ret1 > 0 && l_ret2 > 0) + if (h5tools_is_obj_same(file1_id, obj1fullname, file2_id, obj2fullname) != 0) + HGOTO_DONE(0); } both_objs_grp = (obj1type == H5TRAV_TYPE_GROUP && obj2type == H5TRAV_TYPE_GROUP); @@ -917,8 +848,7 @@ hsize_t h5diff(const char *fname1, if(h5trav_visit(file1_id, obj1fullname, TRUE, TRUE, trav_grp_objs, trav_grp_symlinks, info1_grp) < 0) { parallel_print("Error: Could not get file contents\n"); - opts->err_stat = 1; - HGOTO_ERROR(opts->err_stat, H5E_tools_min_id_g, "Error: Could not get file contents"); + HGOTO_ERROR(1, H5E_tools_min_id_g, "Could not get file contents"); } info1_lp = info1_grp; @@ -932,11 +862,11 @@ hsize_t h5diff(const char *fname1, if(h5trav_visit(file2_id, obj2fullname, TRUE, TRUE, trav_grp_objs, trav_grp_symlinks, info2_grp) < 0) { parallel_print("Error: Could not get file contents\n"); - opts->err_stat = 1; - HGOTO_ERROR(opts->err_stat, H5E_tools_min_id_g, "Error: Could not get file contents"); + HGOTO_ERROR(1, H5E_tools_min_id_g, "Could not get file contents"); } /* end if */ info2_lp = info2_grp; } + h5diffdebug2("groups traversed - errstat:%d\n", opts->err_stat); #ifdef H5_HAVE_PARALLEL if(g_Parallel) { @@ -957,14 +887,12 @@ hsize_t h5diff(const char *fname1, #endif /* process the objects */ - build_match_list (obj1fullname, info1_lp, obj2fullname, info2_lp, - &match_list, opts); + build_match_list (obj1fullname, info1_lp, obj2fullname, info2_lp, &match_list, opts); if (both_objs_grp) { /*------------------------------------------------------ * print the list */ - if(opts->m_verbose) - { + if(opts->m_verbose) { unsigned u; parallel_print("\n"); @@ -988,6 +916,8 @@ hsize_t h5diff(const char *fname1, match_list, opts); done: + opts->err_stat = opts->err_stat | ret_value; + #ifdef H5_HAVE_PARALLEL if(g_Parallel) /* All done at this point, let tasks know that they won't be needed */ @@ -1022,6 +952,7 @@ done: H5Fclose(file1_id); H5Fclose(file2_id); } H5E_END_TRY; + h5difftrace("h5diff finish\n"); return nfound; @@ -1032,43 +963,34 @@ done: /*------------------------------------------------------------------------- * Function: diff_match * - * Purpose: - * Compare common objects in given groups according to table structure. - * The table structure has flags which can be used to find common objects - * and will be compared. - * Common object means same name (absolute path) objects in both location. - * - * Return: Number of differences found - * - * Programmer: Pedro Vicente, pvn@ncsa.uiuc.edu + * Purpose: Compare common objects in given groups according to table structure. + * The table structure has flags which can be used to find common objects + * and will be compared. + * Common object means same name (absolute path) objects in both location. * - * Date: May 9, 2003 + * Return: Number of differences found * - * Modifications: Jan 2005 Leon Arber, larber@uiuc.edu - * Added support for parallel diffing - * - * Pedro Vicente, pvn@hdfgroup.org, Nov 4, 2008 - * Compare the graph and make h5diff return 1 for difference if - * 1) the number of objects in file1 is not the same as in file2 - * 2) the graph does not match, i.e same names (absolute path) - * 3) objects with the same name are not of the same type + * Modifications: Compare the graph and make h5diff return 1 for difference if + * 1) the number of objects in file1 is not the same as in file2 + * 2) the graph does not match, i.e same names (absolute path) + * 3) objects with the same name are not of the same type *------------------------------------------------------------------------- */ -hsize_t diff_match(hid_t file1_id, const char *grp1, trav_info_t *info1, +hsize_t +diff_match(hid_t file1_id, const char *grp1, trav_info_t *info1, hid_t file2_id, const char *grp2, trav_info_t *info2, - trav_table_t *table, diff_opt_t *options) + trav_table_t *table, diff_opt_t *opts) { hsize_t nfound = 0; unsigned i; - - const char * grp1_path = ""; - const char * grp2_path = ""; - char * obj1_fullpath = NULL; - char * obj2_fullpath = NULL; - diff_args_t argdata; - size_t idx1 = 0; - size_t idx2 = 0; - + int ret_value = opts->err_stat; + const char *grp1_path = ""; + const char *grp2_path = ""; + char *obj1_fullpath = NULL; + char *obj2_fullpath = NULL; + diff_args_t argdata; + size_t idx1 = 0; + size_t idx2 = 0; h5difftrace("diff_match start\n"); /* @@ -1081,85 +1003,89 @@ hsize_t diff_match(hid_t file1_id, const char *grp1, trav_info_t *info1, grp2_path = grp2; /*------------------------------------------------------------------------- - * regarding the return value of h5diff (0, no difference in files, 1 difference ) - * 1) the number of objects in file1 must be the same as in file2 - * 2) the graph must match, i.e same names (absolute path) - * 3) objects with the same name must be of the same type - *------------------------------------------------------------------------- - */ + * regarding the return value of h5diff (0, no difference in files, 1 difference ) + * 1) the number of objects in file1 must be the same as in file2 + * 2) the graph must match, i.e same names (absolute path) + * 3) objects with the same name must be of the same type + *------------------------------------------------------------------------- + */ /* not valid compare used when --exclude-path option is used */ - if (!options->exclude_path) - { + if (!opts->exclude_path) { /* number of different objects */ - if ( info1->nused != info2->nused ) - { - options->contents = 0; + if (info1->nused != info2->nused) { + opts->contents = 0; } } /* objects in one file and not the other */ - for( i = 0; i < table->nobjs; i++) - { - if( table->objs[i].flags[0] != table->objs[i].flags[1] ) - { - options->contents = 0; + for(i = 0; i < table->nobjs; i++) { + if(table->objs[i].flags[0] != table->objs[i].flags[1]) { + opts->contents = 0; break; } } - /*------------------------------------------------------------------------- - * do the diff for common objects - *------------------------------------------------------------------------- - */ + * do the diff for common objects + *------------------------------------------------------------------------- + */ #ifdef H5_HAVE_PARALLEL { - char *workerTasks = (char*)HDmalloc((g_nTasks - 1) * sizeof(char)); - int n; - int busyTasks = 0; - struct diffs_found nFoundbyWorker; - struct diff_mpi_args args; - int havePrintToken = 1; - MPI_Status Status; - - /*set all tasks as free */ - HDmemset(workerTasks, 1, (g_nTasks - 1)); + char *workerTasks = (char*)HDmalloc((g_nTasks - 1) * sizeof(char)); + int n; + int busyTasks = 0; + struct diffs_found nFoundbyWorker; + struct diff_mpi_args args; + int havePrintToken = 1; + MPI_Status Status; + + /*set all tasks as free */ + HDmemset(workerTasks, 1, (g_nTasks - 1)); #endif - for(i = 0; i < table->nobjs; i++) - { - if( table->objs[i].flags[0] && table->objs[i].flags[1]) - { + for(i = 0; i < table->nobjs; i++) { + h5diffdebug3("diff for common objects[%d] - errstat:%d\n", i, opts->err_stat); + if(table->objs[i].flags[0] && table->objs[i].flags[1]) { /* make full path for obj1 */ #ifdef H5_HAVE_ASPRINTF /* Use the asprintf() routine, since it does what we're trying to do below */ - if(HDasprintf(&obj1_fullpath, "%s%s", grp1_path, table->objs[i].name) < 0) - goto out; + if(HDasprintf(&obj1_fullpath, "%s%s", grp1_path, table->objs[i].name) < 0) { + HERROR(1, H5E_tools_min_id_g, "name buffer allocation failed"); + } #else /* H5_HAVE_ASPRINTF */ - obj1_fullpath = (char*)HDmalloc(HDstrlen(grp1_path) + HDstrlen(table->objs[i].name) + 1); - HDstrcpy(obj1_fullpath, grp1_path); - HDstrcat(obj1_fullpath, table->objs[i].name); + if((obj1_fullpath = (char*)HDmalloc(HDstrlen(grp1_path) + HDstrlen(table->objs[i].name) + 1)) == NULL) { + HERROR(1, H5E_tools_min_id_g, "name buffer allocation failed"); + } + else { + HDstrcpy(obj1_fullpath, grp1_path); + HDstrcat(obj1_fullpath, table->objs[i].name); + } #endif /* H5_HAVE_ASPRINTF */ + h5diffdebug2("diff_match path1 - %s\n", obj1_fullpath); /* make full path for obj2 */ #ifdef H5_HAVE_ASPRINTF /* Use the asprintf() routine, since it does what we're trying to do below */ - if(HDasprintf(&obj2_fullpath, "%s%s", grp2_path, table->objs[i].name) < 0) - goto out; + if(HDasprintf(&obj2_fullpath, "%s%s", grp2_path, table->objs[i].name) < 0) { + HERROR(1, H5E_tools_min_id_g, "name buffer allocation failed"); + } #else /* H5_HAVE_ASPRINTF */ - obj2_fullpath = (char*)HDmalloc(HDstrlen(grp2_path) + HDstrlen(table->objs[i].name) + 1); - HDstrcpy(obj2_fullpath, grp2_path); - HDstrcat(obj2_fullpath, table->objs[i].name); + if((obj2_fullpath = (char*)HDmalloc(HDstrlen(grp2_path) + HDstrlen(table->objs[i].name) + 1)) == NULL) { + HERROR(1, H5E_tools_min_id_g, "name buffer allocation failed"); + } + else { + HDstrcpy(obj2_fullpath, grp2_path); + HDstrcat(obj2_fullpath, table->objs[i].name); + } #endif /* H5_HAVE_ASPRINTF */ + h5diffdebug2("diff_match path2 - %s\n", obj2_fullpath); /* get index to figure out type of the object in file1 */ - while(info1->paths[idx1].path && - (HDstrcmp(obj1_fullpath, info1->paths[idx1].path) != 0)) + while(info1->paths[idx1].path && (HDstrcmp(obj1_fullpath, info1->paths[idx1].path) != 0)) idx1++; /* get index to figure out type of the object in file2 */ - while(info2->paths[idx2].path && - (HDstrcmp(obj2_fullpath, info2->paths[idx2].path) != 0)) + while(info2->paths[idx2].path && (HDstrcmp(obj2_fullpath, info2->paths[idx2].path) != 0)) idx2++; /* Set argdata to pass other args into diff() */ @@ -1167,16 +1093,14 @@ hsize_t diff_match(hid_t file1_id, const char *grp1, trav_info_t *info1, argdata.type[1] = info2->paths[idx2].type; argdata.is_same_trgobj = table->objs[i].is_same_trgobj; - options->cmn_objs = 1; - if(!g_Parallel) - { + opts->cmn_objs = 1; + if(!g_Parallel) { nfound += diff(file1_id, obj1_fullpath, file2_id, obj2_fullpath, - options, &argdata); + opts, &argdata); } /* end if */ #ifdef H5_HAVE_PARALLEL - else - { + else { int workerFound = 0; h5difftrace("Beginning of big else block\n"); @@ -1190,8 +1114,7 @@ hsize_t diff_match(hid_t file1_id, const char *grp1, trav_info_t *info1, /*Set up args to pass to worker task. */ if(HDstrlen(obj1_fullpath) > 255 || - HDstrlen(obj2_fullpath) > 255) - { + HDstrlen(obj2_fullpath) > 255) { printf("The parallel diff only supports object names up to 255 characters\n"); MPI_Abort(MPI_COMM_WORLD, 0); } /* end if */ @@ -1199,32 +1122,29 @@ hsize_t diff_match(hid_t file1_id, const char *grp1, trav_info_t *info1, /* set args struct to pass */ HDstrcpy(args.name1, obj1_fullpath); HDstrcpy(args.name2, obj2_fullpath); - args.options = *options; + args.opts = *opts; args.argdata.type[0] = info1->paths[idx1].type; args.argdata.type[1] = info2->paths[idx2].type; args.argdata.is_same_trgobj = table->objs[i].is_same_trgobj; /* if there are any outstanding print requests, let's handle one. */ - if(busyTasks > 0) - { + if(busyTasks > 0) { int incomingMessage; /* check if any tasks freed up, and didn't need to print. */ MPI_Iprobe(MPI_ANY_SOURCE, MPI_TAG_DONE, MPI_COMM_WORLD, &incomingMessage, &Status); /* first block*/ - if(incomingMessage) - { + if(incomingMessage) { workerTasks[Status.MPI_SOURCE - 1] = 1; MPI_Recv(&nFoundbyWorker, sizeof(nFoundbyWorker), MPI_BYTE, Status.MPI_SOURCE, MPI_TAG_DONE, MPI_COMM_WORLD, &Status); nfound += nFoundbyWorker.nfound; - options->not_cmp = options->not_cmp | nFoundbyWorker.not_cmp; + opts->not_cmp = opts->not_cmp | nFoundbyWorker.not_cmp; busyTasks--; } /* end if */ /* check to see if the print token was returned. */ - if(!havePrintToken) - { + if(!havePrintToken) { /* If we don't have the token, someone is probably sending us output */ print_incoming_data(); @@ -1236,19 +1156,17 @@ hsize_t diff_match(hid_t file1_id, const char *grp1, trav_info_t *info1, workerTasks[Status.MPI_SOURCE - 1] = 1; MPI_Recv(&nFoundbyWorker, sizeof(nFoundbyWorker), MPI_BYTE, Status.MPI_SOURCE, MPI_TAG_TOK_RETURN, MPI_COMM_WORLD, &Status); nfound += nFoundbyWorker.nfound; - options->not_cmp = options->not_cmp | nFoundbyWorker.not_cmp; + opts->not_cmp = opts->not_cmp | nFoundbyWorker.not_cmp; busyTasks--; havePrintToken = 1; } /* end if */ } /* end if */ /* check to see if anyone needs the print token. */ - if(havePrintToken) - { + if(havePrintToken) { /* check incoming queue for print token requests */ MPI_Iprobe(MPI_ANY_SOURCE, MPI_TAG_TOK_REQUEST, MPI_COMM_WORLD, &incomingMessage, &Status); - if(incomingMessage) - { + if(incomingMessage) { MPI_Recv(NULL, 0, MPI_BYTE, Status.MPI_SOURCE, MPI_TAG_TOK_REQUEST, MPI_COMM_WORLD, &Status); MPI_Send(NULL, 0, MPI_BYTE, Status.MPI_SOURCE, MPI_TAG_PRINT_TOK, MPI_COMM_WORLD); havePrintToken = 0; @@ -1259,10 +1177,8 @@ hsize_t diff_match(hid_t file1_id, const char *grp1, trav_info_t *info1, /* check array of tasks to see which ones are free. * Manager task never does work, so freeTasks[0] is really * worker task 0. */ - for(n = 1; (n < g_nTasks) && !workerFound; n++) - { - if(workerTasks[n-1]) - { + for(n = 1; (n < g_nTasks) && !workerFound; n++) { + if(workerTasks[n-1]) { /* send file id's and names to first free worker */ MPI_Send(&args, sizeof(args), MPI_BYTE, n, MPI_TAG_ARGS, MPI_COMM_WORLD); @@ -1275,55 +1191,47 @@ hsize_t diff_match(hid_t file1_id, const char *grp1, trav_info_t *info1, } /* end if */ } /* end for */ - if(!workerFound) - { + if(!workerFound) { /* if they were all busy, we've got to wait for one free up * before we can move on. If we don't have the token, some * task is currently printing so we'll wait for that task to * return it. */ - if(!havePrintToken) - { - while(!havePrintToken) - { + if(!havePrintToken) { + while(!havePrintToken) { int incomingMessage; print_incoming_data(); MPI_Iprobe(MPI_ANY_SOURCE, MPI_TAG_TOK_RETURN, MPI_COMM_WORLD, &incomingMessage, &Status); - if(incomingMessage) - { + if(incomingMessage) { MPI_Recv(&nFoundbyWorker, sizeof(nFoundbyWorker), MPI_BYTE, MPI_ANY_SOURCE, MPI_TAG_TOK_RETURN, MPI_COMM_WORLD, &Status); havePrintToken = 1; nfound += nFoundbyWorker.nfound; - options->not_cmp = options->not_cmp | nFoundbyWorker.not_cmp; + opts->not_cmp = opts->not_cmp | nFoundbyWorker.not_cmp; /* send this task the work unit. */ MPI_Send(&args, sizeof(args), MPI_BYTE, Status.MPI_SOURCE, MPI_TAG_ARGS, MPI_COMM_WORLD); } /* end if */ } /* end while */ } /* end if */ /* if we do have the token, check for task to free up, or wait for a task to request it */ - else - { + else { /* But first print all the data in our incoming queue */ print_incoming_data(); MPI_Probe(MPI_ANY_SOURCE, MPI_ANY_TAG, MPI_COMM_WORLD, &Status); - if(Status.MPI_TAG == MPI_TAG_DONE) - { + if(Status.MPI_TAG == MPI_TAG_DONE) { MPI_Recv(&nFoundbyWorker, sizeof(nFoundbyWorker), MPI_BYTE, Status.MPI_SOURCE, MPI_TAG_DONE, MPI_COMM_WORLD, &Status); nfound += nFoundbyWorker.nfound; - options->not_cmp = options->not_cmp | nFoundbyWorker.not_cmp; + opts->not_cmp = opts->not_cmp | nFoundbyWorker.not_cmp; MPI_Send(&args, sizeof(args), MPI_BYTE, Status.MPI_SOURCE, MPI_TAG_ARGS, MPI_COMM_WORLD); } /* end if */ - else if(Status.MPI_TAG == MPI_TAG_TOK_REQUEST) - { + else if(Status.MPI_TAG == MPI_TAG_TOK_REQUEST) { int incomingMessage; MPI_Recv(NULL, 0, MPI_BYTE, Status.MPI_SOURCE, MPI_TAG_TOK_REQUEST, MPI_COMM_WORLD, &Status); MPI_Send(NULL, 0, MPI_BYTE, Status.MPI_SOURCE, MPI_TAG_PRINT_TOK, MPI_COMM_WORLD); - do - { + do { MPI_Iprobe(MPI_ANY_SOURCE, MPI_TAG_TOK_RETURN, MPI_COMM_WORLD, &incomingMessage, &Status); print_incoming_data(); @@ -1331,11 +1239,10 @@ hsize_t diff_match(hid_t file1_id, const char *grp1, trav_info_t *info1, MPI_Recv(&nFoundbyWorker, sizeof(nFoundbyWorker), MPI_BYTE, Status.MPI_SOURCE, MPI_TAG_TOK_RETURN, MPI_COMM_WORLD, &Status); nfound += nFoundbyWorker.nfound; - options->not_cmp = options->not_cmp | nFoundbyWorker.not_cmp; + opts->not_cmp = opts->not_cmp | nFoundbyWorker.not_cmp; MPI_Send(&args, sizeof(args), MPI_BYTE, Status.MPI_SOURCE, MPI_TAG_ARGS, MPI_COMM_WORLD); } /* end else-if */ - else - { + else { printf("ERROR: Invalid tag (%d) received \n", Status.MPI_TAG); MPI_Abort(MPI_COMM_WORLD, 0); MPI_Finalize(); @@ -1350,27 +1257,22 @@ hsize_t diff_match(hid_t file1_id, const char *grp1, trav_info_t *info1, HDfree(obj2_fullpath); } /* end if */ } /* end for */ - h5difftrace("done with for loop\n"); + h5diffdebug2("done with for loop - errstat:%d\n", opts->err_stat); #ifdef H5_HAVE_PARALLEL - if(g_Parallel) - { + if(g_Parallel) { /* make sure all tasks are done */ - while(busyTasks > 0) - { + while(busyTasks > 0) { MPI_Probe(MPI_ANY_SOURCE, MPI_ANY_TAG, MPI_COMM_WORLD, &Status); - if(Status.MPI_TAG == MPI_TAG_DONE) - { + if(Status.MPI_TAG == MPI_TAG_DONE) { MPI_Recv(&nFoundbyWorker, sizeof(nFoundbyWorker), MPI_BYTE, Status.MPI_SOURCE, MPI_TAG_DONE, MPI_COMM_WORLD, &Status); nfound += nFoundbyWorker.nfound; - options->not_cmp = options->not_cmp | nFoundbyWorker.not_cmp; + opts->not_cmp = opts->not_cmp | nFoundbyWorker.not_cmp; busyTasks--; } /* end if */ - else if(Status.MPI_TAG == MPI_TAG_TOK_REQUEST) - { + else if(Status.MPI_TAG == MPI_TAG_TOK_REQUEST) { MPI_Recv(NULL, 0, MPI_BYTE, Status.MPI_SOURCE, MPI_TAG_TOK_REQUEST, MPI_COMM_WORLD, &Status); - if(havePrintToken) - { + if(havePrintToken) { int incomingMessage; MPI_Send(NULL, 0, MPI_BYTE, Status.MPI_SOURCE, MPI_TAG_PRINT_TOK, MPI_COMM_WORLD); @@ -1383,17 +1285,15 @@ hsize_t diff_match(hid_t file1_id, const char *grp1, trav_info_t *info1, MPI_Recv(&nFoundbyWorker, sizeof(nFoundbyWorker), MPI_BYTE, Status.MPI_SOURCE, MPI_TAG_TOK_RETURN, MPI_COMM_WORLD, &Status); nfound += nFoundbyWorker.nfound; - options->not_cmp = options->not_cmp | nFoundbyWorker.not_cmp; + opts->not_cmp = opts->not_cmp | nFoundbyWorker.not_cmp; busyTasks--; } /* end if */ /* someone else must have it...wait for them to return it, then give it to the task that just asked for it. */ - else - { + else { int source = Status.MPI_SOURCE; int incomingMessage; - do - { + do { MPI_Iprobe(MPI_ANY_SOURCE, MPI_TAG_TOK_RETURN, MPI_COMM_WORLD, &incomingMessage, &Status); print_incoming_data(); @@ -1402,21 +1302,19 @@ hsize_t diff_match(hid_t file1_id, const char *grp1, trav_info_t *info1, MPI_Recv(&nFoundbyWorker, sizeof(nFoundbyWorker), MPI_BYTE, MPI_ANY_SOURCE, MPI_TAG_TOK_RETURN, MPI_COMM_WORLD, &Status); nfound += nFoundbyWorker.nfound; - options->not_cmp = options->not_cmp | nFoundbyWorker.not_cmp; + opts->not_cmp = opts->not_cmp | nFoundbyWorker.not_cmp; busyTasks--; MPI_Send(NULL, 0, MPI_BYTE, source, MPI_TAG_PRINT_TOK, MPI_COMM_WORLD); } /* end else */ } /* end else-if */ - else if(Status.MPI_TAG == MPI_TAG_TOK_RETURN) - { + else if(Status.MPI_TAG == MPI_TAG_TOK_RETURN) { MPI_Recv(&nFoundbyWorker, sizeof(nFoundbyWorker), MPI_BYTE, Status.MPI_SOURCE, MPI_TAG_TOK_RETURN, MPI_COMM_WORLD, &Status); nfound += nFoundbyWorker.nfound; - options->not_cmp = options->not_cmp | nFoundbyWorker.not_cmp; + opts->not_cmp = opts->not_cmp | nFoundbyWorker.not_cmp; busyTasks--; havePrintToken = 1; } /* end else-if */ - else if(Status.MPI_TAG == MPI_TAG_PRINT_DATA) - { + else if(Status.MPI_TAG == MPI_TAG_PRINT_DATA) { char data[PRINT_DATA_MAX_SIZE + 1]; HDmemset(data, 0, PRINT_DATA_MAX_SIZE + 1); @@ -1424,8 +1322,7 @@ hsize_t diff_match(hid_t file1_id, const char *grp1, trav_info_t *info1, printf("%s", data); } /* end else-if */ - else - { + else { printf("ph5diff-manager: ERROR!! Invalid tag (%d) received \n", Status.MPI_TAG); MPI_Abort(MPI_COMM_WORLD, 0); } /* end else */ @@ -1444,10 +1341,12 @@ hsize_t diff_match(hid_t file1_id, const char *grp1, trav_info_t *info1, #endif /* H5_HAVE_PARALLEL */ out: - /* free table */ + opts->err_stat = opts->err_stat | ret_value; + +/* free table */ if (table) trav_table_free(table); - h5difftrace("diff_match finish\n"); + h5diffdebug2("diff_match finish:%d\n", nfound); return nfound; } @@ -1456,47 +1355,36 @@ out: /*------------------------------------------------------------------------- * Function: diff * - * Purpose: switch between types and choose the diff function - * TYPE is either - * 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 - * - * Return: Number of differences found + * Purpose: switch between types and choose the diff function + * TYPE is either + * 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 * - * Programmer: Jonathan Kim - * - Move follow symlinks code toward top. (March 2812) - * - Add following symlinks feature (Feb 11,2010) - * - Change to use diff_args_t to pass the rest of args. - * Passing through it instead of individual args provides smoother - * extensibility through its members along with MPI code update for ph5diff - * as it doesn't require interface change. - * (May 6,2011) - * - * Programmer: Pedro Vicente, pvn@ncsa.uiuc.edu - * Date: May 9, 2003 + * Return: Number of differences found *------------------------------------------------------------------------- */ - -hsize_t diff(hid_t file1_id, +hsize_t +diff(hid_t file1_id, const char *path1, hid_t file2_id, const char *path2, - diff_opt_t * options, + diff_opt_t * opts, diff_args_t *argdata) { - hid_t dset1_id = (-1); - hid_t dset2_id = (-1); - hid_t type1_id = (-1); - hid_t type2_id = (-1); - hid_t grp1_id = (-1); - hid_t grp2_id = (-1); - int ret; - hbool_t is_dangle_link1 = FALSE; - hbool_t is_dangle_link2 = FALSE; - hbool_t is_hard_link = FALSE; - hsize_t nfound = 0; + int ret_value = opts->err_stat; + int status = -1; + hid_t dset1_id = -1; + hid_t dset2_id = -1; + hid_t type1_id = -1; + hid_t type2_id = -1; + hid_t grp1_id = -1; + hid_t grp2_id = -1; + hbool_t is_dangle_link1 = FALSE; + hbool_t is_dangle_link2 = FALSE; + hbool_t is_hard_link = FALSE; + hsize_t nfound = 0; h5trav_type_t object_type; /* to get link info */ @@ -1506,11 +1394,11 @@ hsize_t diff(hid_t file1_id, h5difftrace("diff start\n"); /*init link info struct */ - HDmemset(&linkinfo1,0,sizeof(h5tool_link_info_t)); - HDmemset(&linkinfo2,0,sizeof(h5tool_link_info_t)); + HDmemset(&linkinfo1, 0, sizeof(h5tool_link_info_t)); + HDmemset(&linkinfo2, 0, sizeof(h5tool_link_info_t)); /* pass how to handle printing warnings to linkinfo option */ - if(print_warn(options)) + if(print_warn(opts)) linkinfo1.opt.msg_mode = linkinfo2.opt.msg_mode = 1; /* for symbolic links, take care follow symlink and no dangling link @@ -1518,78 +1406,69 @@ hsize_t diff(hid_t file1_id, if (argdata->type[0] == H5TRAV_TYPE_LINK || argdata->type[0] == H5TRAV_TYPE_UDLINK || argdata->type[1] == H5TRAV_TYPE_LINK || - argdata->type[1] == H5TRAV_TYPE_UDLINK ) - { + argdata->type[1] == H5TRAV_TYPE_UDLINK) { /* * check dangling links for path1 and path2 */ /* target object1 - get type and name */ - ret = H5tools_get_symlink_info(file1_id, path1, &linkinfo1, options->follow_links); + if ((status = H5tools_get_symlink_info(file1_id, path1, &linkinfo1, opts->follow_links)) < 0) + HGOTO_ERROR(1, H5E_tools_min_id_g, "H5tools_get_symlink_info failed"); + /* dangling link */ - if (ret == 0) - { - if (options->no_dangle_links) - { + if (status == 0) { + if (opts->no_dangle_links) { /* dangling link is error */ - if(options->m_verbose) + if(opts->m_verbose) parallel_print("Warning: <%s> is a dangling link.\n", path1); - goto out; + HGOTO_ERROR(1, H5E_tools_min_id_g, "dangling link is error"); } else is_dangle_link1 = TRUE; } - else if (ret < 0) - goto out; /* target object2 - get type and name */ - ret = H5tools_get_symlink_info(file2_id, path2, &linkinfo2, options->follow_links ); + if ((status = H5tools_get_symlink_info(file2_id, path2, &linkinfo2, opts->follow_links)) < 0) + HGOTO_ERROR(1, H5E_tools_min_id_g, "H5tools_get_symlink_info failed"); /* dangling link */ - if (ret == 0) - { - if (options->no_dangle_links) - { + if (status == 0) { + if (opts->no_dangle_links) { /* dangling link is error */ - if(options->m_verbose) + if(opts->m_verbose) parallel_print("Warning: <%s> is a dangling link.\n", path2); - goto out; + HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "dangling link is error"); } else is_dangle_link2 = TRUE; } - else if (ret < 0) - goto out; /* found dangling link */ - if (is_dangle_link1 || is_dangle_link2) - goto out2; + if (is_dangle_link1 || is_dangle_link2) { + HGOTO_DONE(0); + } /* follow symbolic link option */ - if (options->follow_links) - { + if (opts->follow_links) { if (linkinfo1.linfo.type == H5L_TYPE_SOFT || linkinfo1.linfo.type == H5L_TYPE_EXTERNAL) argdata->type[0] = (h5trav_type_t)linkinfo1.trg_type; - if (linkinfo2.linfo.type == H5L_TYPE_SOFT || - linkinfo2.linfo.type == H5L_TYPE_EXTERNAL) + if (linkinfo2.linfo.type == H5L_TYPE_SOFT || linkinfo2.linfo.type == H5L_TYPE_EXTERNAL) argdata->type[1] = (h5trav_type_t)linkinfo2.trg_type; } } /* if objects are not the same type */ - if (argdata->type[0] != argdata->type[1]) - { - if (options->m_verbose||options->m_list_not_cmp) - { + if (argdata->type[0] != argdata->type[1]) { + if (opts->m_verbose||opts->m_list_not_cmp) { parallel_print("Not comparable: <%s> is of type %s and <%s> is of type %s\n", path1, get_type(argdata->type[0]), path2, get_type(argdata->type[1])); } - options->not_cmp=1; + opts->not_cmp = 1; /* TODO: will need to update non-comparable is different - * options->contents = 0; + * opts->contents = 0; */ - goto out2; + HGOTO_DONE(0); } else /* now both object types are same */ object_type = argdata->type[0]; @@ -1602,88 +1481,79 @@ hsize_t diff(hid_t file1_id, * * Perform this to match the outputs as bypassing. */ - if (argdata->is_same_trgobj) - { + if (argdata->is_same_trgobj) { h5difftrace("argdata->is_same_trgobj\n"); is_hard_link = (object_type == H5TRAV_TYPE_DATASET || object_type == H5TRAV_TYPE_NAMED_DATATYPE || object_type == H5TRAV_TYPE_GROUP); - if (options->follow_links || is_hard_link) - { + if (opts->follow_links || is_hard_link) { /* print information is only verbose option is used */ - if(options->m_verbose || options->m_report) - { - switch(object_type) - { + if(opts->m_verbose || opts->m_report) { + switch(object_type) { case H5TRAV_TYPE_DATASET: - do_print_objname("dataset", path1, path2, options); + do_print_objname("dataset", path1, path2, opts); break; case H5TRAV_TYPE_NAMED_DATATYPE: - do_print_objname("datatype", path1, path2, options); + do_print_objname("datatype", path1, path2, opts); break; case H5TRAV_TYPE_GROUP: - do_print_objname("group", path1, path2, options); + do_print_objname("group", path1, path2, opts); break; case H5TRAV_TYPE_LINK: - do_print_objname("link", path1, path2, options); + do_print_objname("link", path1, path2, opts); break; case H5TRAV_TYPE_UDLINK: if(linkinfo1.linfo.type == H5L_TYPE_EXTERNAL && linkinfo2.linfo.type == H5L_TYPE_EXTERNAL) - do_print_objname("external link", path1, path2, options); + do_print_objname("external link", path1, path2, opts); else - do_print_objname ("user defined link", path1, path2, options); + do_print_objname ("user defined link", path1, path2, opts); break; case H5TRAV_TYPE_UNKNOWN: default: parallel_print("Comparison not supported: <%s> and <%s> are of type %s\n", path1, path2, get_type(object_type) ); - options->not_cmp = 1; + opts->not_cmp = 1; break; } /* switch(type)*/ print_found(nfound); - } /* if(options->m_verbose || options->m_report) */ + } /* if(opts->m_verbose || opts->m_report) */ /* exact same, so comparison is done */ - goto out2; + HGOTO_DONE(0); } } - switch(object_type) - { + switch(object_type) { /*---------------------------------------------------------------------- * H5TRAV_TYPE_DATASET *---------------------------------------------------------------------- */ case H5TRAV_TYPE_DATASET: if((dset1_id = H5Dopen2(file1_id, path1, H5P_DEFAULT)) < 0) - goto out; + HGOTO_ERROR(1, H5E_tools_min_id_g, "H5Dopen2 failed"); if((dset2_id = H5Dopen2(file2_id, path2, H5P_DEFAULT)) < 0) - goto out; - /* verbose (-v) and report (-r) mode */ - if(options->m_verbose || options->m_report) - { - do_print_objname("dataset", path1, path2, options); - nfound = diff_dataset(file1_id, file2_id, path1, path2, options); + HGOTO_ERROR(1, H5E_tools_min_id_g, "H5Dopen2 failed"); + /* verbose (-v) and report (-r) mode */ + if(opts->m_verbose || opts->m_report) { + do_print_objname("dataset", path1, path2, opts); + nfound = diff_dataset(file1_id, file2_id, path1, path2, opts); print_found(nfound); } /* quiet mode (-q), just count differences */ - else if(options->m_quiet) - { - nfound = diff_dataset(file1_id, file2_id, path1, path2, options); + else if(opts->m_quiet) { + nfound = diff_dataset(file1_id, file2_id, path1, path2, opts); } - /* the rest (-c, none, ...) */ - else - { - nfound = diff_dataset(file1_id, file2_id, path1, path2, options); + /* the rest (-c, none, ...) */ + else { + nfound = diff_dataset(file1_id, file2_id, path1, path2, opts); /* print info if difference found */ - if (nfound) - { - do_print_objname("dataset", path1, path2, options); + if (nfound) { + do_print_objname("dataset", path1, path2, opts); print_found(nfound); } } - + h5diffdebug2("diff after dataset:%d\n", nfound); /*--------------------------------------------------------- * compare attributes @@ -1692,13 +1562,13 @@ hsize_t diff(hid_t file1_id, *--------------------------------------------------------- */ if(path1) - nfound += diff_attr(dset1_id, dset2_id, path1, path2, options); + nfound += diff_attr(dset1_id, dset2_id, path1, path2, opts); if(H5Dclose(dset1_id) < 0) - goto out; + HGOTO_ERROR(1, H5E_tools_min_id_g, "H5Dclose failed"); if(H5Dclose(dset2_id) < 0) - goto out; + HGOTO_ERROR(1, H5E_tools_min_id_g, "H5Dclose failed"); break; /*---------------------------------------------------------------------- @@ -1707,21 +1577,21 @@ hsize_t diff(hid_t file1_id, */ case H5TRAV_TYPE_NAMED_DATATYPE: if((type1_id = H5Topen2(file1_id, path1, H5P_DEFAULT)) < 0) - goto out; + HGOTO_ERROR(1, H5E_tools_min_id_g, "H5Topen2 failed"); if((type2_id = H5Topen2(file2_id, path2, H5P_DEFAULT)) < 0) - goto out; + HGOTO_ERROR(1, H5E_tools_min_id_g, "H5Topen2 failed"); - if((ret = H5Tequal(type1_id, type2_id)) < 0) - goto out; + if((status = H5Tequal(type1_id, type2_id)) < 0) + HGOTO_ERROR(1, H5E_tools_min_id_g, "H5Tequal failed"); /* if H5Tequal is > 0 then the datatypes refer to the same datatype */ - nfound = (ret > 0) ? 0 : 1; + nfound = (status > 0) ? 0 : 1; - if(print_objname(options,nfound)) - do_print_objname("datatype", path1, path2, options); + if(print_objname(opts, nfound)) + do_print_objname("datatype", path1, path2, opts); /* always print the number of differences found in verbose mode */ - if(options->m_verbose) + if(opts->m_verbose) print_found(nfound); /*----------------------------------------------------------------- @@ -1731,12 +1601,12 @@ hsize_t diff(hid_t file1_id, *----------------------------------------------------------------- */ if(path1) - nfound += diff_attr(type1_id, type2_id, path1, path2, options); + nfound += diff_attr(type1_id, type2_id, path1, path2, opts); if(H5Tclose(type1_id) < 0) - goto out; + HGOTO_ERROR(1, H5E_tools_min_id_g, "H5Tclose failed"); if(H5Tclose(type2_id) < 0) - goto out; + HGOTO_ERROR(1, H5E_tools_min_id_g, "H5Tclose failed"); break; /*---------------------------------------------------------------------- @@ -1744,17 +1614,17 @@ hsize_t diff(hid_t file1_id, *---------------------------------------------------------------------- */ case H5TRAV_TYPE_GROUP: - if(print_objname(options, nfound)) - do_print_objname("group", path1, path2, options); + if(print_objname(opts, nfound)) + do_print_objname("group", path1, path2, opts); /* always print the number of differences found in verbose mode */ - if(options->m_verbose) + if(opts->m_verbose) print_found(nfound); if((grp1_id = H5Gopen2(file1_id, path1, H5P_DEFAULT)) < 0) - goto out; + HGOTO_ERROR(1, H5E_tools_min_id_g, "H5Gclose failed"); if((grp2_id = H5Gopen2(file2_id, path2, H5P_DEFAULT)) < 0) - goto out; + HGOTO_ERROR(1, H5E_tools_min_id_g, "H5Gclose failed"); /*----------------------------------------------------------------- * compare attributes @@ -1763,12 +1633,12 @@ hsize_t diff(hid_t file1_id, *----------------------------------------------------------------- */ if(path1) - nfound += diff_attr(grp1_id, grp2_id, path1, path2, options); + nfound += diff_attr(grp1_id, grp2_id, path1, path2, opts); if(H5Gclose(grp1_id) < 0) - goto out; + HGOTO_ERROR(1, H5E_tools_min_id_g, "H5Gclose failed"); if(H5Gclose(grp2_id) < 0) - goto out; + HGOTO_ERROR(1, H5E_tools_min_id_g, "H5Gclose failed"); break; @@ -1778,19 +1648,19 @@ hsize_t diff(hid_t file1_id, */ case H5TRAV_TYPE_LINK: { - ret = HDstrcmp(linkinfo1.trg_path, linkinfo2.trg_path); + status = HDstrcmp(linkinfo1.trg_path, linkinfo2.trg_path); - /* if the target link name is not same then the links are "different" */ - nfound = (ret != 0) ? 1 : 0; + /* if the target link name is not same then the links are "different" */ + nfound = (status != 0) ? 1 : 0; - if(print_objname(options, nfound)) - do_print_objname("link", path1, path2, options); + if(print_objname(opts, nfound)) + do_print_objname("link", path1, path2, opts); - /* always print the number of differences found in verbose mode */ - if(options->m_verbose) - print_found(nfound); + /* always print the number of differences found in verbose mode */ + if(opts->m_verbose) + print_found(nfound); - } + } break; /*---------------------------------------------------------------------- @@ -1799,101 +1669,85 @@ hsize_t diff(hid_t file1_id, */ case H5TRAV_TYPE_UDLINK: { - /* Only external links will have a query function registered */ - if(linkinfo1.linfo.type == H5L_TYPE_EXTERNAL && linkinfo2.linfo.type == H5L_TYPE_EXTERNAL) - { - /* If the buffers are the same size, compare them */ - if(linkinfo1.linfo.u.val_size == linkinfo2.linfo.u.val_size) - { - ret = HDmemcmp(linkinfo1.trg_path, linkinfo2.trg_path, linkinfo1.linfo.u.val_size); - } - else - ret = 1; + /* Only external links will have a query function registered */ + if(linkinfo1.linfo.type == H5L_TYPE_EXTERNAL && linkinfo2.linfo.type == H5L_TYPE_EXTERNAL) { + /* If the buffers are the same size, compare them */ + if(linkinfo1.linfo.u.val_size == linkinfo2.linfo.u.val_size) { + status = HDmemcmp(linkinfo1.trg_path, linkinfo2.trg_path, linkinfo1.linfo.u.val_size); + } + else + status = 1; - /* if "linkinfo1.trg_path" != "linkinfo2.trg_path" then the links - * are "different" extlinkinfo#.path is combination string of - * file_name and obj_name - */ - nfound = (ret != 0) ? 1 : 0; + /* if "linkinfo1.trg_path" != "linkinfo2.trg_path" then the links + * are "different" extlinkinfo#.path is combination string of + * file_name and obj_name + */ + nfound = (status != 0) ? 1 : 0; - if(print_objname(options, nfound)) - do_print_objname("external link", path1, path2, options); + if(print_objname(opts, nfound)) + do_print_objname("external link", path1, path2, opts); - } /* end if */ - else - { - /* If one or both of these links isn't an external link, we can only - * compare information from H5Lget_info since we don't have a query - * function registered for them. - * - * If the link classes or the buffer length are not the - * same, the links are "different" - */ - if((linkinfo1.linfo.type != linkinfo2.linfo.type) || - (linkinfo1.linfo.u.val_size != linkinfo2.linfo.u.val_size)) - nfound = 1; - else - nfound = 0; - - if (print_objname (options, nfound)) - do_print_objname ("user defined link", path1, path2, options); - } /* end else */ + } /* end if */ + else { + /* If one or both of these links isn't an external link, we can only + * compare information from H5Lget_info since we don't have a query + * function registered for them. + * + * If the link classes or the buffer length are not the + * same, the links are "different" + */ + if((linkinfo1.linfo.type != linkinfo2.linfo.type) || + (linkinfo1.linfo.u.val_size != linkinfo2.linfo.u.val_size)) + nfound = 1; + else + nfound = 0; - /* always print the number of differences found in verbose mode */ - if(options->m_verbose) - print_found(nfound); + if (print_objname (opts, nfound)) + do_print_objname ("user defined link", path1, path2, opts); + } /* end else */ + + /* always print the number of differences found in verbose mode */ + if(opts->m_verbose) + print_found(nfound); } break; case H5TRAV_TYPE_UNKNOWN: default: - if(options->m_verbose) + if(opts->m_verbose) parallel_print("Comparison not supported: <%s> and <%s> are of type %s\n", path1, path2, get_type(object_type) ); - options->not_cmp = 1; + opts->not_cmp = 1; break; } - /* free link info buffer */ - if (linkinfo1.trg_path) - HDfree(linkinfo1.trg_path); - if (linkinfo2.trg_path) - HDfree(linkinfo2.trg_path); - - return nfound; - -out: - options->err_stat = 1; +done: + opts->err_stat = opts->err_stat | ret_value; -out2: /*----------------------------------- * handle dangling link(s) */ /* both path1 and path2 are dangling links */ - if(is_dangle_link1 && is_dangle_link2) - { - if(print_objname(options, nfound)) - { - do_print_objname("dangling link", path1, path2, options); + if(is_dangle_link1 && is_dangle_link2) { + if(print_objname(opts, nfound)) { + do_print_objname("dangling link", path1, path2, opts); print_found(nfound); } } /* path1 is dangling link */ - else if (is_dangle_link1) - { - if(options->m_verbose) + else if (is_dangle_link1) { + if(opts->m_verbose) parallel_print("obj1 <%s> is a dangling link.\n", path1); nfound++; - if(print_objname(options, nfound)) + if(print_objname(opts, nfound)) print_found(nfound); } /* path2 is dangling link */ - else if (is_dangle_link2) - { - if(options->m_verbose) + else if (is_dangle_link2) { + if(opts->m_verbose) parallel_print("obj2 <%s> is a dangling link.\n", path2); nfound++; - if(print_objname(options, nfound)) + if(print_objname(opts, nfound)) print_found(nfound); } @@ -1906,13 +1760,16 @@ out2: /* close */ /* disable error reporting */ H5E_BEGIN_TRY { + H5Dclose(dset1_id); + H5Dclose(dset2_id); H5Tclose(type1_id); H5Tclose(type2_id); H5Gclose(grp1_id); - H5Tclose(grp2_id); + H5Gclose(grp2_id); /* enable error reporting */ } H5E_END_TRY; - h5difftrace("diff finish\n"); + + h5diffdebug3("diff finish:%d - errstat:%d\n", nfound, opts->err_stat); return nfound; } diff --git a/tools/lib/h5diff.h b/tools/lib/h5diff.h index 0226e83..26bcd95 100644 --- a/tools/lib/h5diff.h +++ b/tools/lib/h5diff.h @@ -38,7 +38,7 @@ /*------------------------------------------------------------------------- * This is used to pass multiple args into diff(). - * Passing this instead of several each arg provides smoother extensibility + * Passing this instead of several each arg provides smoother extensibility * through its members along with MPI code for ph5diff * as it doesn't require interface change. *------------------------------------------------------------------------*/ @@ -95,13 +95,13 @@ H5TOOLS_DLL hsize_t h5diff(const char *fname1, const char *fname2, const char *objname1, const char *objname2, - diff_opt_t *options); + diff_opt_t *opts); H5TOOLS_DLL hsize_t diff( hid_t file1_id, const char *path1, hid_t file2_id, const char *path2, - diff_opt_t *options, + diff_opt_t *opts, diff_args_t *argdata); #ifdef H5_HAVE_PARALLEL @@ -125,18 +125,18 @@ hsize_t diff_dataset( hid_t file1_id, hid_t file2_id, const char *obj1_name, const char *obj2_name, - diff_opt_t *options); + diff_opt_t *opts); hsize_t diff_datasetid( hid_t dset1_id, hid_t dset2_id, const char *obj1_name, const char *obj2_name, - diff_opt_t *options); + diff_opt_t *opts); hsize_t diff_match( hid_t file1_id, const char *grp1, trav_info_t *info1, hid_t file2_id, const char *grp2, trav_info_t *info2, - trav_table_t *table, diff_opt_t *options ); + trav_table_t *table, diff_opt_t *opts ); hsize_t diff_array( void *_mem1, void *_mem2, @@ -144,7 +144,7 @@ hsize_t diff_array( void *_mem1, hsize_t hyper_start, int rank, hsize_t *dims, - diff_opt_t *options, + diff_opt_t *opts, const char *name1, const char *name2, hid_t m_type, @@ -162,7 +162,7 @@ int diff_can_type( hid_t f_type1, /* file data type */ hsize_t *maxdim2, const char *obj1_name, const char *obj2_name, - diff_opt_t *options, + diff_opt_t *opts, int is_compound); @@ -170,7 +170,7 @@ hsize_t diff_attr(hid_t loc1_id, hid_t loc2_id, const char *path1, const char *path2, - diff_opt_t *options); + diff_opt_t *opts); /*------------------------------------------------------------------------- @@ -187,10 +187,10 @@ const char* get_class(H5T_class_t tclass); const char* get_sign(H5T_sign_t sign); void print_dimensions (int rank, hsize_t *dims); herr_t match_up_memsize (hid_t f_tid1_id, hid_t f_tid2_id, - hid_t *m_tid1, hid_t *m_tid2, + hid_t *m_tid1, hid_t *m_tid2, size_t *m_size1, size_t *m_size2); /* in h5diff.c */ -int print_objname(diff_opt_t *options, hsize_t nfound); +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); diff --git a/tools/lib/h5diff_array.c b/tools/lib/h5diff_array.c index 09894e6..54b9109 100644 --- a/tools/lib/h5diff_array.c +++ b/tools/lib/h5diff_array.c @@ -131,21 +131,21 @@ typedef struct mcomp_t { *------------------------------------------------------------------------- */ static hsize_t diff_region(hid_t obj1_id, hid_t obj2_id, hid_t region1_id, - hid_t region2_id, diff_opt_t *options); + hid_t region2_id, diff_opt_t *opts); static hbool_t all_zero(const void *_mem, size_t size); static int ull2float(unsigned long long ull_value, float *f_value); static hsize_t character_compare(char *mem1, char *mem2, hsize_t i, size_t u, int rank, hsize_t *dims, hsize_t *acc, hsize_t *pos, - diff_opt_t *options, const char *obj1, const char *obj2, int *ph); + diff_opt_t *opts, const char *obj1, const char *obj2, int *ph); static hsize_t character_compare_opt(unsigned char *mem1, unsigned char *mem2, hsize_t i, int rank, hsize_t *dims, hsize_t *acc, hsize_t *pos, - diff_opt_t *options, const char *obj1, const char *obj2, int *ph); -static hbool_t equal_float(float value, float expected, diff_opt_t *options); -static hbool_t equal_double(double value, double expected, diff_opt_t *options); + diff_opt_t *opts, const char *obj1, const char *obj2, int *ph); +static hbool_t equal_float(float value, float expected, diff_opt_t *opts); +static hbool_t equal_double(double value, double expected, diff_opt_t *opts); #if H5_SIZEOF_LONG_DOUBLE !=0 -static hbool_t equal_ldouble(long double value, long double expected, diff_opt_t *options); +static hbool_t equal_ldouble(long double value, long double expected, diff_opt_t *opts); #endif -static int print_data(diff_opt_t *options); +static int print_data(diff_opt_t *opts); static void print_pos(int *ph, int pp, hsize_t curr_pos, hsize_t *acc, hsize_t *pos, int rank, hsize_t *dims, const char *obj1, const char *obj2); @@ -155,17 +155,17 @@ static void print_char_pos(int *ph, int pp, hsize_t curr_pos, size_t u, static void h5diff_print_char(char ch); static hsize_t diff_datum(void *_mem1, void *_mem2, hid_t m_type, hsize_t index, int rank, hsize_t *dims, hsize_t *acc, hsize_t *pos, - diff_opt_t *options, const char *obj1, const char *obj2, + diff_opt_t *opts, const char *obj1, const char *obj2, hid_t container1_id, hid_t container2_id, /*where the reference came from*/ int *ph, /*print header */ mcomp_t *members); /*compound members */ static hsize_t diff_float(unsigned char *mem1, unsigned char *mem2, hsize_t nelmts, hsize_t hyper_start, int rank, hsize_t *dims, - hsize_t *acc, hsize_t *pos, diff_opt_t *options, const char *obj1, + hsize_t *acc, hsize_t *pos, diff_opt_t *opts, const char *obj1, const char *obj2, int *ph); static hsize_t diff_double(unsigned char *mem1, unsigned char *mem2, hsize_t nelmts, hsize_t hyper_start, int rank, hsize_t *dims, - hsize_t *acc, hsize_t *pos, diff_opt_t *options, const char *obj1, + hsize_t *acc, hsize_t *pos, diff_opt_t *opts, const char *obj1, const char *obj2, int *ph); #if H5_SIZEOF_LONG_DOUBLE !=0 static hsize_t diff_ldouble(unsigned char *mem1, @@ -176,50 +176,50 @@ static hsize_t diff_ldouble(unsigned char *mem1, hsize_t *dims, hsize_t *acc, hsize_t *pos, - diff_opt_t *options, + diff_opt_t *opts, const char *obj1, const char *obj2, int *ph); #endif static hsize_t diff_schar(unsigned char *mem1, unsigned char *mem2, hsize_t nelmts, hsize_t hyper_start, int rank, hsize_t *dims, - hsize_t *acc, hsize_t *pos, diff_opt_t *options, const char *obj1, + hsize_t *acc, hsize_t *pos, diff_opt_t *opts, const char *obj1, const char *obj2, int *ph); static hsize_t diff_uchar(unsigned char *mem1, unsigned char *mem2, hsize_t nelmts, hsize_t hyper_start, int rank, hsize_t *dims, - hsize_t *acc, hsize_t *pos, diff_opt_t *options, const char *obj1, + hsize_t *acc, hsize_t *pos, diff_opt_t *opts, const char *obj1, const char *obj2, int *ph); static hsize_t diff_short(unsigned char *mem1, unsigned char *mem2, hsize_t nelmts, hsize_t hyper_start, int rank, hsize_t *dims, - hsize_t *acc, hsize_t *pos, diff_opt_t *options, const char *obj1, + hsize_t *acc, hsize_t *pos, diff_opt_t *opts, const char *obj1, const char *obj2, int *ph); static hsize_t diff_ushort(unsigned char *mem1, unsigned char *mem2, hsize_t nelmts, hsize_t hyper_start, int rank, hsize_t *dims, - hsize_t *acc, hsize_t *pos, diff_opt_t *options, const char *obj1, + hsize_t *acc, hsize_t *pos, diff_opt_t *opts, const char *obj1, const char *obj2, int *ph); static hsize_t diff_int(unsigned char *mem1, unsigned char *mem2, hsize_t nelmts, hsize_t hyper_start, int rank, hsize_t *dims, - hsize_t *acc, hsize_t *pos, diff_opt_t *options, const char *obj1, + hsize_t *acc, hsize_t *pos, diff_opt_t *opts, const char *obj1, const char *obj2, int *ph); static hsize_t diff_uint(unsigned char *mem1, unsigned char *mem2, hsize_t nelmts, hsize_t hyper_start, int rank, hsize_t *dims, - hsize_t *acc, hsize_t *pos, diff_opt_t *options, const char *obj1, + hsize_t *acc, hsize_t *pos, diff_opt_t *opts, const char *obj1, const char *obj2, int *ph); static hsize_t diff_long(unsigned char *mem1, unsigned char *mem2, hsize_t nelmts, hsize_t hyper_start, int rank, hsize_t *dims, - hsize_t *acc, hsize_t *pos, diff_opt_t *options, const char *obj1, + hsize_t *acc, hsize_t *pos, diff_opt_t *opts, const char *obj1, const char *obj2, int *ph); static hsize_t diff_ulong(unsigned char *mem1, unsigned char *mem2, hsize_t nelmts, hsize_t hyper_start, int rank, hsize_t *dims, - hsize_t *acc, hsize_t *pos, diff_opt_t *options, const char *obj1, + hsize_t *acc, hsize_t *pos, diff_opt_t *opts, const char *obj1, const char *obj2, int *ph); static hsize_t diff_llong(unsigned char *mem1, unsigned char *mem2, hsize_t nelmts, hsize_t hyper_start, int rank, hsize_t *dims, - hsize_t *acc, hsize_t *pos, diff_opt_t *options, const char *obj1, + hsize_t *acc, hsize_t *pos, diff_opt_t *opts, const char *obj1, const char *obj2, int *ph); static hsize_t diff_ullong(unsigned char *mem1, unsigned char *mem2, hsize_t nelmts, hsize_t hyper_start, int rank, hsize_t *dims, - hsize_t *acc, hsize_t *pos, diff_opt_t *options, const char *obj1, + hsize_t *acc, hsize_t *pos, diff_opt_t *opts, const char *obj1, const char *obj2, int *ph); /*------------------------------------------------------------------------- @@ -256,11 +256,6 @@ static void close_member_types(mcomp_t *members); * Purpose: compare two memory buffers; * * Return: number of differences found - * - * Programmer: Pedro Vicente, pvn@ncsa.uiuc.edu - * - * Date: November 12, 2003 - * *------------------------------------------------------------------------- */ @@ -271,7 +266,7 @@ hsize_t diff_array( hsize_t hyper_start, int rank, hsize_t *dims, - diff_opt_t *options, + diff_opt_t *opts, const char *name1, const char *name2, hid_t m_type, @@ -290,7 +285,7 @@ hsize_t diff_array( mcomp_t members; H5T_class_t type_class; - h5difftrace("diff_array start\n"); + h5diffdebug2("diff_array start - errstat:%d\n", opts->err_stat); /* get the size. */ size = H5Tget_size(m_type); type_class = H5Tget_class(m_type); @@ -329,36 +324,36 @@ hsize_t diff_array( */ case H5T_FLOAT: if (H5Tequal(m_type, H5T_NATIVE_FLOAT)) - nfound = diff_float(mem1, mem2, nelmts, hyper_start, rank, dims, acc, pos, options, name1, name2, &ph); + nfound = diff_float(mem1, mem2, nelmts, hyper_start, rank, dims, acc, pos, opts, name1, name2, &ph); else if (H5Tequal(m_type, H5T_NATIVE_DOUBLE)) - nfound = diff_double(mem1, mem2, nelmts, hyper_start, rank, dims, acc, pos, options, name1, name2, &ph); + nfound = diff_double(mem1, mem2, nelmts, hyper_start, rank, dims, acc, pos, opts, name1, name2, &ph); #if H5_SIZEOF_LONG_DOUBLE != 0 else if (H5Tequal(m_type, H5T_NATIVE_LDOUBLE)) - nfound = diff_ldouble(mem1, mem2, nelmts, hyper_start, rank, dims, acc, pos, options, name1, name2, &ph); + nfound = diff_ldouble(mem1, mem2, nelmts, hyper_start, rank, dims, acc, pos, opts, name1, name2, &ph); #endif break; case H5T_INTEGER: if (H5Tequal(m_type, H5T_NATIVE_SCHAR)) - nfound = diff_schar(mem1, mem2, nelmts, hyper_start, rank, dims, acc, pos, options, name1, name2, &ph); + nfound = diff_schar(mem1, mem2, nelmts, hyper_start, rank, dims, acc, pos, opts, name1, name2, &ph); else if (H5Tequal(m_type, H5T_NATIVE_UCHAR)) - nfound = diff_uchar(mem1, mem2, nelmts, hyper_start, rank, dims, acc, pos, options, name1, name2, &ph); + nfound = diff_uchar(mem1, mem2, nelmts, hyper_start, rank, dims, acc, pos, opts, name1, name2, &ph); else if (H5Tequal(m_type, H5T_NATIVE_SHORT)) - nfound = diff_short(mem1, mem2, nelmts, hyper_start, rank, dims, acc, pos, options, name1, name2, &ph); + nfound = diff_short(mem1, mem2, nelmts, hyper_start, rank, dims, acc, pos, opts, name1, name2, &ph); else if (H5Tequal(m_type, H5T_NATIVE_USHORT)) - nfound = diff_ushort(mem1, mem2, nelmts, hyper_start, rank, dims, acc, pos, options, name1, name2, &ph); + nfound = diff_ushort(mem1, mem2, nelmts, hyper_start, rank, dims, acc, pos, opts, name1, name2, &ph); else if (H5Tequal(m_type, H5T_NATIVE_INT)) - nfound = diff_int(mem1, mem2, nelmts, hyper_start, rank, dims, acc, pos, options, name1, name2, &ph); + nfound = diff_int(mem1, mem2, nelmts, hyper_start, rank, dims, acc, pos, opts, name1, name2, &ph); else if (H5Tequal(m_type, H5T_NATIVE_UINT)) - nfound = diff_uint(mem1, mem2, nelmts, hyper_start, rank, dims, acc, pos, options, name1, name2, &ph); + nfound = diff_uint(mem1, mem2, nelmts, hyper_start, rank, dims, acc, pos, opts, name1, name2, &ph); else if (H5Tequal(m_type, H5T_NATIVE_LONG)) - nfound = diff_long(mem1, mem2, nelmts, hyper_start, rank, dims, acc, pos, options, name1, name2, &ph); + nfound = diff_long(mem1, mem2, nelmts, hyper_start, rank, dims, acc, pos, opts, name1, name2, &ph); else if (H5Tequal(m_type, H5T_NATIVE_ULONG)) - nfound = diff_ulong(mem1, mem2, nelmts, hyper_start, rank, dims, acc, pos, options, name1, name2, &ph); + nfound = diff_ulong(mem1, mem2, nelmts, hyper_start, rank, dims, acc, pos, opts, name1, name2, &ph); else if (H5Tequal(m_type, H5T_NATIVE_LLONG)) - nfound = diff_llong(mem1, mem2, nelmts, hyper_start, rank, dims, acc, pos, options, name1, name2, &ph); + nfound = diff_llong(mem1, mem2, nelmts, hyper_start, rank, dims, acc, pos, opts, name1, name2, &ph); else if (H5Tequal(m_type, H5T_NATIVE_ULLONG)) - nfound = diff_ullong(mem1, mem2, nelmts, hyper_start, rank, dims, acc, pos, options, name1, name2, &ph); + nfound = diff_ullong(mem1, mem2, nelmts, hyper_start, rank, dims, acc, pos, opts, name1, name2, &ph); break; /*------------------------------------------------------------------------- @@ -376,16 +371,14 @@ hsize_t diff_array( HDmemset(&members, 0, sizeof(mcomp_t)); get_member_types(m_type, &members); for (i = 0; i < nelmts; i++) { - nfound += diff_datum(mem1 + i * size, mem2 + i * size, m_type, i, rank, dims, acc, pos, options, + nfound += diff_datum(mem1 + i * size, mem2 + i * size, m_type, i, rank, dims, acc, pos, opts, name1, name2, container1_id, container2_id, &ph, &members); - if (options->n && nfound >= options->count) { - close_member_types(&members); - return nfound; - } + if (opts->n && nfound >= opts->count) + break; } /* i */ close_member_types(&members); } /* switch */ - h5difftrace("diff_array finish\n"); + h5diffdebug3("diff_array finish:%d - errstat:%d\n", nfound, opts->err_stat); return nfound; } @@ -397,10 +390,6 @@ hsize_t diff_array( * * Return: number of differences found * - * Programmer: Pedro Vicente, pvn@ncsa.uiuc.edu - * - * Date: October 29, 2003 - * * The comparison of the 2 buffers read from the files is made datum by datum. * * H5T_INTEGER and H5T_FLOAT @@ -436,18 +425,17 @@ static hsize_t diff_datum( hsize_t *dims, hsize_t *acc, hsize_t *pos, - diff_opt_t *options, + diff_opt_t *opts, const char *obj1, const char *obj2, hid_t container1_id, hid_t container2_id, /*where the reference came from*/ - int *ph, /*print header */ - mcomp_t *members) /*compound members */ + int *ph, /*print header */ + mcomp_t *members) /*compound members */ { unsigned char *mem1 = (unsigned char*) _mem1; unsigned char *mem2 = (unsigned char*) _mem2; size_t u; - hid_t memb_type; size_t type_size; H5T_sign_t type_sign; H5T_class_t type_class; @@ -458,14 +446,13 @@ static hsize_t diff_datum( size_t size = 0; hbool_t iszero1; hbool_t iszero2; - hid_t obj1_id; - hid_t obj2_id; - hsize_t nfound = 0; /* differences found */ - int ret = 0; /* check return error */ + hsize_t nfound = 0; /* differences found */ + hsize_t ret_value = opts->err_stat; double per; hbool_t both_zero; h5difftrace("diff_datum start\n"); + type_size = H5Tget_size(m_type); type_class = H5Tget_class(m_type); @@ -478,14 +465,14 @@ static hsize_t diff_datum( type_class != H5T_STRING && type_class != H5T_VLEN && HDmemcmp(mem1, mem2, type_size) == 0) - return 0; + HGOTO_DONE(opts->err_stat); switch (H5Tget_class(m_type)) { case H5T_NO_CLASS: case H5T_TIME: case H5T_NCLASSES: default: - HDassert(0); + HGOTO_ERROR(1, H5E_tools_min_id_g, "Invalid type class"); break; /*------------------------------------------------------------------------- @@ -494,15 +481,17 @@ static hsize_t diff_datum( */ case H5T_COMPOUND: h5difftrace("diff_datum H5T_COMPOUND\n"); + { + hid_t memb_type = -1; + nmembs = members->n; - nmembs = members->n; - - for (j = 0; j < nmembs; j++) { - offset = members->offsets[j]; - memb_type = members->ids[j]; + for (j = 0; j < nmembs; j++) { + offset = members->offsets[j]; + memb_type = members->ids[j]; - nfound += diff_datum(mem1 + offset, mem2 + offset, memb_type, index, - rank, dims, acc, pos, options, obj1, obj2, container1_id, container2_id, ph, members->m[j]); + nfound += diff_datum(mem1 + offset, mem2 + offset, memb_type, index, + rank, dims, acc, pos, opts, obj1, obj2, container1_id, container2_id, ph, members->m[j]); + } } break; @@ -532,6 +521,7 @@ static hsize_t diff_datum( size1 = HDstrlen(s1); else size1 = 0; + /* Get pointer to second string */ s2 = *(char**) mem2; if (s2) @@ -547,14 +537,17 @@ static hsize_t diff_datum( size1 = HDstrlen(s1); else size1 = 0; + if (size1 > size_mtype) size1 = size_mtype; + /* Get pointer to second string */ s2 = (char*) mem2; if (s2) size2 = HDstrlen(s2); else size2 = 0; + if (size2 > size_mtype) size2 = size_mtype; } @@ -562,6 +555,7 @@ static hsize_t diff_datum( /* Get pointer to first string */ s1 = (char *) mem1; size1 = size_mtype; + /* Get pointer to second string */ s2 = (char *) mem2; size2 = size_mtype; @@ -573,8 +567,8 @@ static hsize_t diff_datum( * of length of strings. * For now mimic the previous way. */ - h5diffdebug2("diff_datum string size:%d\n",size1); - h5diffdebug2("diff_datum string size:%d\n",size2); + h5diffdebug2("diff_datum string size:%d\n", size1); + h5diffdebug2("diff_datum string size:%d\n", size2); if (size1 != size2) { h5difftrace("diff_datum string sizes\n"); nfound++; @@ -595,15 +589,15 @@ static hsize_t diff_datum( /* check for NULL pointer for string */ if (s != NULL) { /* try fast compare first */ - if (HDmemcmp(s1, s2, size) == 0) { + if (HDmemcmp(s, sx, size) == 0) { if (size1 != size2) - if (print_data(options)) + if (print_data(opts)) for (u = size; u < sizex; u++) - character_compare(s1 + u, s2 + u, index, u, rank, dims, acc, pos, options, obj1, obj2, ph); + character_compare(s + u, sx + u, index, u, rank, dims, acc, pos, opts, obj1, obj2, ph); } else for (u = 0; u < size; u++) - nfound += character_compare(s1 + u, s2 + u, index, u, rank, dims, acc, pos, options, obj1, obj2, ph); + nfound += character_compare(s + u, sx + u, index, u, rank, dims, acc, pos, opts, obj1, obj2, ph); } /* end check for NULL pointer for string */ } break; @@ -616,7 +610,7 @@ static hsize_t diff_datum( h5difftrace("diff_datum H5T_BITFIELD\n"); /* byte-by-byte comparison */ for (u = 0; u < type_size; u++) - nfound += character_compare_opt(mem1 + u, mem2 + u, index, rank, dims, acc, pos, options, obj1, obj2, ph); + nfound += character_compare_opt(mem1 + u, mem2 + u, index, rank, dims, acc, pos, opts, obj1, obj2, ph); break; /*------------------------------------------------------------------------- @@ -627,7 +621,7 @@ static hsize_t diff_datum( h5difftrace("diff_datum H5T_OPAQUE\n"); /* byte-by-byte comparison */ for (u = 0; u < type_size; u++) - nfound += character_compare_opt(mem1 + u, mem2 + u, index, rank, dims, acc, pos, options, obj1, obj2, ph); + nfound += character_compare_opt(mem1 + u, mem2 + u, index, rank, dims, acc, pos, opts, obj1, obj2, ph); break; /*------------------------------------------------------------------------- @@ -667,7 +661,7 @@ static hsize_t diff_datum( * don't attempt to convert them - just report errors. */ nfound += 1; - if (print_data(options)) { + if (print_data(opts)) { print_pos(ph, 0, index, acc, pos, rank, dims, obj1, obj2); parallel_print(SPACES); parallel_print(S_FORMAT, enum_name1, enum_name2); @@ -677,7 +671,7 @@ static hsize_t diff_datum( /* Both enum values were valid */ if (HDstrcmp(enum_name1, enum_name2) != 0) { nfound = 1; - if (print_data(options)) { + if (print_data(opts)) { print_pos(ph, 0, index, acc, pos, rank, dims, obj1, obj2); parallel_print(SPACES); parallel_print(S_FORMAT, enum_name1, enum_name2); @@ -685,7 +679,7 @@ static hsize_t diff_datum( } else { for (u = 0; u < type_size; u++) - nfound += character_compare_opt(mem1 + u, mem2 + u, index, rank, dims, acc, pos, options, obj1, obj2, ph); + nfound += character_compare_opt(mem1 + u, mem2 + u, index, rank, dims, acc, pos, opts, obj1, obj2, ph); } } /* enable error reporting */ @@ -699,8 +693,9 @@ static hsize_t diff_datum( */ case H5T_ARRAY: { + hid_t memb_type = -1; hsize_t adims[H5S_MAX_RANK]; - int ndims; + int ndims; /* get the array's base datatype for each element */ memb_type = H5Tget_super(m_type); @@ -714,7 +709,7 @@ static hsize_t diff_datum( nelmts *= adims[u]; for (u = 0; u < nelmts; u++) { nfound += diff_datum(mem1 + u * size, mem2 + u * size, memb_type, index, - rank, dims, acc, pos, options, obj1, obj2, container1_id, container2_id, ph, members); + rank, dims, acc, pos, opts, obj1, obj2, container1_id, container2_id, ph, members); } H5Tclose(memb_type); } @@ -728,7 +723,8 @@ static hsize_t diff_datum( iszero1 = all_zero(_mem1, H5Tget_size(m_type)); iszero2 = all_zero(_mem2, H5Tget_size(m_type)); if (iszero1 != iszero2) { - return 1; + nfound++; + HGOTO_DONE (opts->err_stat); } else if (!iszero1 && !iszero2) { /*------------------------------------------------------------------------- @@ -736,25 +732,32 @@ static hsize_t diff_datum( * Dataset region reference *------------------------------------------------------------------------- */ - if (type_size == H5R_DSET_REG_REF_BUF_SIZE) { - hid_t region1_id; - hid_t region2_id; + hid_t obj1_id = -1; + hid_t obj2_id = -1; - if ((obj1_id = H5Rdereference2(container1_id, H5P_DEFAULT, H5R_DATASET_REGION, _mem1)) < 0) - ret = -1; - if ((obj2_id = H5Rdereference2(container2_id, H5P_DEFAULT, H5R_DATASET_REGION, _mem2)) < 0) - ret = -1; - if ((region1_id = H5Rget_region(container1_id, H5R_DATASET_REGION, _mem1)) < 0) - ret = -1; - if ((region2_id = H5Rget_region(container2_id, H5R_DATASET_REGION, _mem2)) < 0) - ret = -1; + if (type_size == H5R_DSET_REG_REF_BUF_SIZE) { + hid_t region1_id = -1; + hid_t region2_id = -1; - if (ret == -1) { - options->err_stat = 1; - return 0; + if ((obj1_id = H5Rdereference2(container1_id, H5P_DEFAULT, H5R_DATASET_REGION, _mem1)) < 0) { + opts->err_stat = 1; + H5TOOLS_INFO(H5E_tools_min_id_g, "H5Rdereference2 object 1 failed"); + } + if ((obj2_id = H5Rdereference2(container2_id, H5P_DEFAULT, H5R_DATASET_REGION, _mem2)) < 0) { + opts->err_stat = 1; + H5TOOLS_INFO(H5E_tools_min_id_g, "H5Rdereference2 object 2 failed"); + } + if ((region1_id = H5Rget_region(container1_id, H5R_DATASET_REGION, _mem1)) < 0) { + opts->err_stat = 1; + H5TOOLS_INFO(H5E_tools_min_id_g, "H5Rget_region object 1 failed"); } + if ((region2_id = H5Rget_region(container2_id, H5R_DATASET_REGION, _mem2)) < 0) { + opts->err_stat = 1; + H5TOOLS_INFO(H5E_tools_min_id_g, "H5Rget_region object 2 failed"); + } + + nfound = diff_region(obj1_id, obj2_id, region1_id, region2_id, opts); - nfound = diff_region(obj1_id, obj2_id, region1_id, region2_id, options); H5Oclose(obj1_id); H5Oclose(obj2_id); H5Sclose(region1_id); @@ -770,41 +773,41 @@ static hsize_t diff_datum( H5O_type_t obj1_type; H5O_type_t obj2_type; - if (H5Rget_obj_type2(container1_id, H5R_OBJECT, _mem1, &obj1_type) < 0) - ret = -1; - if (H5Rget_obj_type2(container2_id, H5R_OBJECT, _mem2, &obj2_type) < 0) - ret = -1; - if (ret == -1) { - options->err_stat = 1; - return 0; - } /* end if */ + if (H5Rget_obj_type2(container1_id, H5R_OBJECT, _mem1, &obj1_type) < 0) { + opts->err_stat = 1; + H5TOOLS_INFO(H5E_tools_min_id_g, "H5Rget_obj_type2 object 1 failed"); + } + if (H5Rget_obj_type2(container2_id, H5R_OBJECT, _mem2, &obj2_type) < 0) { + opts->err_stat = 1; + H5TOOLS_INFO(H5E_tools_min_id_g, "H5Rget_obj_type2 object 2 failed"); + } /* check object type */ - if (obj1_type != obj2_type) { - parallel_print( - "Different object types referenced: <%s> and <%s>", obj1, obj2); - options->not_cmp = 1; - return 0; - } + if (ret_value >= 0) + if (obj1_type != obj2_type) { + parallel_print("Different object types referenced: <%s> and <%s>", obj1, obj2); + opts->not_cmp = 1; + HGOTO_DONE (opts->err_stat); + } - if ((obj1_id = H5Rdereference2(container1_id, H5P_DEFAULT, H5R_OBJECT, _mem1)) < 0) - ret = -1; - if ((obj2_id = H5Rdereference2(container2_id, H5P_DEFAULT, H5R_OBJECT, _mem2)) < 0) - ret = -1; - if (ret == -1) { - options->err_stat = 1; - return 0; + if ((obj1_id = H5Rdereference2(container1_id, H5P_DEFAULT, H5R_OBJECT, _mem1)) < 0) { + opts->err_stat = 1; + H5TOOLS_INFO(H5E_tools_min_id_g, "H5Rdereference2 object 1 failed"); + } + if ((obj2_id = H5Rdereference2(container2_id, H5P_DEFAULT, H5R_OBJECT, _mem2)) < 0) { + opts->err_stat = 1; + H5TOOLS_INFO(H5E_tools_min_id_g, "H5Rdereference2 object 2 failed"); } /* compare */ if (obj1_type == H5O_TYPE_DATASET) - nfound = diff_datasetid(obj1_id, obj2_id, NULL, NULL, options); + nfound = diff_datasetid(obj1_id, obj2_id, NULL, NULL, opts); else { - if (options->m_verbose) + if (opts->m_verbose) parallel_print( "Warning: Comparison not possible of object types referenced: <%s> and <%s>\n", obj1, obj2); - options->not_cmp = 1; + opts->not_cmp = 1; } H5Oclose(obj1_id); @@ -818,18 +821,22 @@ static hsize_t diff_datum( *------------------------------------------------------------------------- */ case H5T_VLEN: - /* get the VL sequences's base datatype for each element */ - memb_type = H5Tget_super(m_type); - size = H5Tget_size(memb_type); + { + hid_t memb_type = -1; - /* get the number of sequence elements */ - nelmts = ((hvl_t *) mem1)->len; + /* get the VL sequences's base datatype for each element */ + memb_type = H5Tget_super(m_type); + size = H5Tget_size(memb_type); - for (j = 0; j < nelmts; j++) - nfound += diff_datum(((char *) (((hvl_t *) mem1)->p)) + j * size, ((char *) (((hvl_t *) mem2)->p)) + j * size, memb_type, index, - rank, dims, acc, pos, options, obj1, obj2, container1_id, container2_id, ph, members); + /* get the number of sequence elements */ + nelmts = ((hvl_t *) mem1)->len; - H5Tclose(memb_type); + for (j = 0; j < nelmts; j++) + nfound += diff_datum(((char *) (((hvl_t *) mem1)->p)) + j * size, ((char *) (((hvl_t *) mem2)->p)) + j * size, memb_type, index, + rank, dims, acc, pos, opts, obj1, obj2, container1_id, container2_id, ph, members); + + H5Tclose(memb_type); + } break; /*------------------------------------------------------------------------- @@ -845,13 +852,15 @@ static hsize_t diff_datum( if (type_size == 1 && type_sign != H5T_SGN_NONE) { char temp1_char; char temp2_char; - HDassert(type_size == sizeof(char)); + + if(type_size != sizeof(char)) + HGOTO_ERROR(1, H5E_tools_min_id_g, "Type size is not char size"); HDmemcpy(&temp1_char, mem1, sizeof(char)); HDmemcpy(&temp2_char, mem2, sizeof(char)); /* -d and !-p */ - if (options->d && !options->p) { - if (ABS(temp1_char-temp2_char) > options->delta) { - if (print_data(options)) { + if (opts->d && !opts->p) { + if (ABS(temp1_char-temp2_char) > opts->delta) { + if (print_data(opts)) { print_pos(ph, 0, index, acc, pos, rank, dims, obj1, obj2); parallel_print(SPACES); parallel_print(I_FORMAT, temp1_char, temp2_char, ABS(temp1_char - temp2_char)); @@ -860,19 +869,19 @@ static hsize_t diff_datum( } } /* !-d and -p */ - else if (!options->d && options->p) { + else if (!opts->d && opts->p) { PER(temp1_char, temp2_char); if (not_comparable && !both_zero) { - if (print_data(options)) { + if (print_data(opts)) { print_pos(ph, 1, index, acc, pos, rank, dims, obj1, obj2); parallel_print(SPACES); parallel_print(I_FORMAT_P_NOTCOMP, temp1_char, temp2_char, ABS(temp1_char - temp2_char)); } nfound++; } - else if (per > options->percent) { - if (print_data(options)) { + else if (per > opts->percent) { + if (print_data(opts)) { print_pos(ph, 1, index, acc, pos, rank, dims, obj1, obj2); parallel_print(SPACES); parallel_print(I_FORMAT_P, temp1_char, temp2_char, ABS(temp1_char - temp2_char), per); @@ -881,19 +890,19 @@ static hsize_t diff_datum( } } /* -d and -p */ - else if (options->d && options->p) { + else if (opts->d && opts->p) { PER(temp1_char, temp2_char); if (not_comparable && !both_zero) { - if (print_data(options)) { + if (print_data(opts)) { print_pos(ph, 1, index, acc, pos, rank, dims, obj1, obj2); parallel_print(SPACES); parallel_print(I_FORMAT_P_NOTCOMP, temp1_char, temp2_char, ABS(temp1_char - temp2_char)); } nfound++; } - else if (per > options->percent && ABS(temp1_char - temp2_char) > options->delta) { - if (print_data(options)) { + else if (per > opts->percent && ABS(temp1_char - temp2_char) > opts->delta) { + if (print_data(opts)) { print_pos(ph, 1, index, acc, pos, rank, dims, obj1, obj2); parallel_print(SPACES); parallel_print(I_FORMAT_P, temp1_char, temp2_char, ABS(temp1_char - temp2_char), per); @@ -902,7 +911,7 @@ static hsize_t diff_datum( } } else if (temp1_char != temp2_char) { - if (print_data(options)) { + if (print_data(opts)) { print_pos(ph, 0, index, acc, pos, rank, dims, obj1, obj2); parallel_print(SPACES); parallel_print(I_FORMAT, temp1_char, temp2_char, ABS(temp1_char - temp2_char)); @@ -918,14 +927,16 @@ static hsize_t diff_datum( else if (type_size == 1 && type_sign == H5T_SGN_NONE) { unsigned char temp1_uchar; unsigned char temp2_uchar; - HDassert(type_size == sizeof(unsigned char)); + + if(type_size != sizeof(unsigned char)) + HGOTO_ERROR(1, H5E_tools_min_id_g, "Type size is not unsigned char size"); HDmemcpy(&temp1_uchar, mem1, sizeof(unsigned char)); HDmemcpy(&temp2_uchar, mem2, sizeof(unsigned char)); /* -d and !-p */ - if (options->d && !options->p) { - if (PDIFF(temp1_uchar, temp2_uchar) > options->delta) { - if (print_data(options)) { + if (opts->d && !opts->p) { + if (PDIFF(temp1_uchar, temp2_uchar) > opts->delta) { + if (print_data(opts)) { print_pos(ph, 0, index, acc, pos, rank, dims, obj1, obj2); parallel_print(SPACES); parallel_print(I_FORMAT, temp1_uchar, temp2_uchar, PDIFF(temp1_uchar, temp2_uchar)); @@ -934,19 +945,19 @@ static hsize_t diff_datum( } } /* !-d and -p */ - else if (!options->d && options->p) { + else if (!opts->d && opts->p) { PER_UNSIGN(signed char, temp1_uchar, temp2_uchar); if (not_comparable && !both_zero) { - if (print_data(options)) { + if (print_data(opts)) { print_pos(ph, 1, index, acc, pos, rank, dims, obj1, obj2); parallel_print(SPACES); parallel_print(I_FORMAT_P_NOTCOMP, temp1_uchar, temp2_uchar, PDIFF(temp1_uchar, temp2_uchar)); } nfound++; } - else if (per > options->percent) { - if (print_data(options)) { + else if (per > opts->percent) { + if (print_data(opts)) { print_pos(ph, 1, index, acc, pos, rank, dims, obj1, obj2); parallel_print(SPACES); parallel_print(I_FORMAT_P, temp1_uchar, temp2_uchar, PDIFF(temp1_uchar, temp2_uchar), per); @@ -955,19 +966,19 @@ static hsize_t diff_datum( } } /* -d and -p */ - else if (options->d && options->p) { + else if (opts->d && opts->p) { PER_UNSIGN(signed char, temp1_uchar, temp2_uchar); if (not_comparable && !both_zero) { - if (print_data(options)) { + if (print_data(opts)) { print_pos(ph, 1, index, acc, pos, rank, dims, obj1, obj2); parallel_print(SPACES); parallel_print(I_FORMAT_P_NOTCOMP, temp1_uchar, temp2_uchar, PDIFF(temp1_uchar, temp2_uchar)); } nfound++; } - else if (per > options->percent && PDIFF(temp1_uchar, temp2_uchar) > options->delta) { - if (print_data(options)) { + else if (per > opts->percent && PDIFF(temp1_uchar, temp2_uchar) > opts->delta) { + if (print_data(opts)) { print_pos(ph, 1, index, acc, pos, rank, dims, obj1, obj2); parallel_print(SPACES); parallel_print(I_FORMAT_P, temp1_uchar, temp2_uchar, PDIFF(temp1_uchar, temp2_uchar), per); @@ -976,7 +987,7 @@ static hsize_t diff_datum( } } else if (temp1_uchar != temp2_uchar) { - if (print_data(options)) { + if (print_data(opts)) { print_pos(ph, 0, index, acc, pos, rank, dims, obj1, obj2); parallel_print(SPACES); parallel_print(I_FORMAT, temp1_uchar, temp2_uchar, PDIFF(temp1_uchar, temp2_uchar)); @@ -992,14 +1003,16 @@ static hsize_t diff_datum( else if (type_size == 2 && type_sign != H5T_SGN_NONE) { short temp1_short; short temp2_short; - HDassert(type_size == sizeof(short)); + + if(type_size != sizeof(short)) + HGOTO_ERROR(1, H5E_tools_min_id_g, "Type size is not short size"); HDmemcpy(&temp1_short, mem1, sizeof(short)); HDmemcpy(&temp2_short, mem2, sizeof(short)); /* -d and !-p */ - if (options->d && !options->p) { - if (ABS(temp1_short - temp2_short) > options->delta) { - if (print_data(options)) { + if (opts->d && !opts->p) { + if (ABS(temp1_short - temp2_short) > opts->delta) { + if (print_data(opts)) { print_pos(ph, 0, index, acc, pos, rank, dims, obj1, obj2); parallel_print(SPACES); parallel_print(I_FORMAT, temp1_short, temp2_short, ABS(temp1_short - temp2_short)); @@ -1008,19 +1021,19 @@ static hsize_t diff_datum( } } /* !-d and -p */ - else if (!options->d && options->p) { + else if (!opts->d && opts->p) { PER(temp1_short, temp2_short); if (not_comparable && !both_zero) { - if (print_data(options)) { + if (print_data(opts)) { print_pos(ph, 1, index, acc, pos, rank, dims, obj1, obj2); parallel_print(SPACES); parallel_print(I_FORMAT_P_NOTCOMP, temp1_short, temp2_short, ABS(temp1_short - temp2_short)); } nfound++; } - else if (per > options->percent) { - if (print_data(options)) { + else if (per > opts->percent) { + if (print_data(opts)) { print_pos(ph, 1, index, acc, pos, rank, dims, obj1, obj2); parallel_print(SPACES); parallel_print(I_FORMAT_P, temp1_short, temp2_short, ABS(temp1_short - temp2_short), per); @@ -1029,19 +1042,19 @@ static hsize_t diff_datum( } } /* -d and -p */ - else if (options->d && options->p) { + else if (opts->d && opts->p) { PER(temp1_short, temp2_short); if (not_comparable && !both_zero) { - if (print_data(options)) { + if (print_data(opts)) { print_pos(ph, 1, index, acc, pos, rank, dims, obj1, obj2); parallel_print(SPACES); parallel_print(I_FORMAT_P_NOTCOMP, temp1_short, temp2_short, ABS(temp1_short - temp2_short)); } nfound++; } - else if (per > options->percent && ABS(temp1_short - temp2_short) > options->delta) { - if (print_data(options)) { + else if (per > opts->percent && ABS(temp1_short - temp2_short) > opts->delta) { + if (print_data(opts)) { print_pos(ph, 1, index, acc, pos, rank, dims, obj1, obj2); parallel_print(SPACES); parallel_print(I_FORMAT_P, temp1_short, temp2_short, ABS(temp1_short - temp2_short), per); @@ -1050,7 +1063,7 @@ static hsize_t diff_datum( } } else if (temp1_short != temp2_short) { - if (print_data(options)) { + if (print_data(opts)) { print_pos(ph, 0, index, acc, pos, rank, dims, obj1, obj2); parallel_print(SPACES); parallel_print(I_FORMAT, temp1_short, temp2_short, ABS(temp1_short - temp2_short)); @@ -1066,14 +1079,16 @@ static hsize_t diff_datum( else if (type_size == 2 && type_sign == H5T_SGN_NONE) { unsigned short temp1_ushort; unsigned short temp2_ushort; - HDassert(type_size == sizeof(short)); + + if(type_size != sizeof(unsigned short)) + HGOTO_ERROR(1, H5E_tools_min_id_g, "Type size is not unsigned short size"); HDmemcpy(&temp1_ushort, mem1, sizeof(unsigned short)); HDmemcpy(&temp2_ushort, mem2, sizeof(unsigned short)); /* -d and !-p */ - if (options->d && !options->p) { - if (PDIFF(temp1_ushort, temp2_ushort) > options->delta) { - if (print_data(options)) { + if (opts->d && !opts->p) { + if (PDIFF(temp1_ushort, temp2_ushort) > opts->delta) { + if (print_data(opts)) { print_pos(ph, 0, index, acc, pos, rank, dims, obj1, obj2); parallel_print(SPACES); parallel_print(I_FORMAT, temp1_ushort, temp2_ushort, PDIFF(temp1_ushort, temp2_ushort)); @@ -1082,19 +1097,19 @@ static hsize_t diff_datum( } } /* !-d and -p */ - else if (!options->d && options->p) { + else if (!opts->d && opts->p) { PER_UNSIGN(signed short, temp1_ushort, temp2_ushort); if (not_comparable && !both_zero) { - if (print_data(options)) { + if (print_data(opts)) { print_pos(ph, 1, index, acc, pos, rank, dims, obj1, obj2); parallel_print(SPACES); parallel_print(I_FORMAT_P_NOTCOMP, temp1_ushort, temp2_ushort, PDIFF(temp1_ushort, temp2_ushort)); } nfound++; } - else if (per > options->percent) { - if (print_data(options)) { + else if (per > opts->percent) { + if (print_data(opts)) { print_pos(ph, 1, index, acc, pos, rank, dims, obj1, obj2); parallel_print(SPACES); parallel_print(I_FORMAT_P, temp1_ushort, temp2_ushort, PDIFF(temp1_ushort, temp2_ushort), per); @@ -1103,19 +1118,19 @@ static hsize_t diff_datum( } } /* -d and -p */ - else if (options->d && options->p) { + else if (opts->d && opts->p) { PER_UNSIGN(signed short, temp1_ushort, temp2_ushort); if (not_comparable && !both_zero) { - if (print_data(options)) { + if (print_data(opts)) { print_pos(ph, 1, index, acc, pos, rank, dims, obj1, obj2); parallel_print(SPACES); parallel_print(I_FORMAT_P_NOTCOMP, temp1_ushort, temp2_ushort, PDIFF(temp1_ushort, temp2_ushort)); } nfound++; } - else if (per > options->percent && PDIFF(temp1_ushort, temp2_ushort) > options->delta) { - if (print_data(options)) { + else if (per > opts->percent && PDIFF(temp1_ushort, temp2_ushort) > opts->delta) { + if (print_data(opts)) { print_pos(ph, 1, index, acc, pos, rank, dims, obj1, obj2); parallel_print(SPACES); parallel_print(I_FORMAT_P, temp1_ushort, temp2_ushort, PDIFF(temp1_ushort, temp2_ushort), per); @@ -1124,7 +1139,7 @@ static hsize_t diff_datum( } } else if (temp1_ushort != temp2_ushort) { - if (print_data(options)) { + if (print_data(opts)) { print_pos(ph, 0, index, acc, pos, rank, dims, obj1, obj2); parallel_print(SPACES); parallel_print(I_FORMAT, temp1_ushort, temp2_ushort, PDIFF(temp1_ushort, temp2_ushort)); @@ -1140,14 +1155,16 @@ static hsize_t diff_datum( else if (type_size == 4 && type_sign != H5T_SGN_NONE) { int temp1_int; int temp2_int; - HDassert(type_size == sizeof(int)); + + if(type_size != sizeof(int)) + HGOTO_ERROR(1, H5E_tools_min_id_g, "Type size is not int size"); HDmemcpy(&temp1_int, mem1, sizeof(int)); HDmemcpy(&temp2_int, mem2, sizeof(int)); /* -d and !-p */ - if (options->d && !options->p) { - if (ABS(temp1_int-temp2_int) > options->delta) { - if (print_data(options)) { + if (opts->d && !opts->p) { + if (ABS(temp1_int-temp2_int) > opts->delta) { + if (print_data(opts)) { print_pos(ph, 0, index, acc, pos, rank, dims, obj1, obj2); parallel_print(SPACES); parallel_print(I_FORMAT, temp1_int, temp2_int, ABS(temp1_int - temp2_int)); @@ -1156,19 +1173,19 @@ static hsize_t diff_datum( } } /* !-d and -p */ - else if (!options->d && options->p) { + else if (!opts->d && opts->p) { PER(temp1_int, temp2_int); if (not_comparable && !both_zero) { - if (print_data(options)) { + if (print_data(opts)) { print_pos(ph, 1, index, acc, pos, rank, dims, obj1, obj2); parallel_print(SPACES); parallel_print(I_FORMAT_P_NOTCOMP, temp1_int, temp2_int, ABS(temp1_int - temp2_int)); } nfound++; } - else if (per > options->percent) { - if (print_data(options)) { + else if (per > opts->percent) { + if (print_data(opts)) { print_pos(ph, 1, index, acc, pos, rank, dims, obj1, obj2); parallel_print(SPACES); parallel_print(I_FORMAT_P, temp1_int, temp2_int, ABS(temp1_int - temp2_int), per); @@ -1177,19 +1194,19 @@ static hsize_t diff_datum( } } /* -d and -p */ - else if (options->d && options->p) { + else if (opts->d && opts->p) { PER(temp1_int, temp2_int); if (not_comparable && !both_zero) { - if (print_data(options)) { + if (print_data(opts)) { print_pos(ph, 1, index, acc, pos, rank, dims, obj1, obj2); parallel_print(SPACES); parallel_print(I_FORMAT_P_NOTCOMP, temp1_int, temp2_int, ABS(temp1_int - temp2_int)); } nfound++; } - else if (per > options->percent && ABS(temp1_int - temp2_int) > options->delta) { - if (print_data(options)) { + else if (per > opts->percent && ABS(temp1_int - temp2_int) > opts->delta) { + if (print_data(opts)) { print_pos(ph, 1, index, acc, pos, rank, dims, obj1, obj2); parallel_print(SPACES); parallel_print(I_FORMAT_P, temp1_int, temp2_int, ABS(temp1_int - temp2_int), per); @@ -1198,7 +1215,7 @@ static hsize_t diff_datum( } } else if (temp1_int != temp2_int) { - if (print_data(options)) { + if (print_data(opts)) { print_pos(ph, 0, index, acc, pos, rank, dims, obj1, obj2); parallel_print(SPACES); parallel_print(I_FORMAT, temp1_int, temp2_int, ABS(temp1_int - temp2_int)); @@ -1214,14 +1231,16 @@ static hsize_t diff_datum( else if (type_size == 4 && type_sign == H5T_SGN_NONE) { unsigned int temp1_uint; unsigned int temp2_uint; - HDassert(type_size == sizeof(int)); + + if(type_size != sizeof(unsigned int)) + HGOTO_ERROR(1, H5E_tools_min_id_g, "Type size is not unsigned int size"); HDmemcpy(&temp1_uint, mem1, sizeof(unsigned int)); HDmemcpy(&temp2_uint, mem2, sizeof(unsigned int)); /* -d and !-p */ - if (options->d && !options->p) { - if (PDIFF(temp1_uint, temp2_uint) > options->delta) { - if (print_data(options)) { + if (opts->d && !opts->p) { + if (PDIFF(temp1_uint, temp2_uint) > opts->delta) { + if (print_data(opts)) { print_pos(ph, 0, index, acc, pos, rank, dims, obj1, obj2); parallel_print(SPACES); parallel_print(UI_FORMAT, temp1_uint, temp2_uint, PDIFF(temp1_uint, temp2_uint)); @@ -1230,19 +1249,19 @@ static hsize_t diff_datum( } } /* !-d and -p */ - else if (!options->d && options->p) { + else if (!opts->d && opts->p) { PER_UNSIGN(signed int, temp1_uint, temp2_uint); if (not_comparable && !both_zero) { - if (print_data(options)) { + if (print_data(opts)) { print_pos(ph, 1, index, acc, pos, rank, dims, obj1, obj2); parallel_print(SPACES); parallel_print(UI_FORMAT_P_NOTCOMP, temp1_uint, temp2_uint, PDIFF(temp1_uint, temp2_uint)); } nfound++; } - else if (per > options->percent) { - if (print_data(options)) { + else if (per > opts->percent) { + if (print_data(opts)) { print_pos(ph, 1, index, acc, pos, rank, dims, obj1, obj2); parallel_print(SPACES); parallel_print(UI_FORMAT_P, temp1_uint, temp2_uint, PDIFF(temp1_uint, temp2_uint), per); @@ -1251,19 +1270,19 @@ static hsize_t diff_datum( } } /* -d and -p */ - else if (options->d && options->p) { + else if (opts->d && opts->p) { PER_UNSIGN(signed int, temp1_uint, temp2_uint); if (not_comparable && !both_zero) { - if (print_data(options)) { + if (print_data(opts)) { print_pos(ph, 1, index, acc, pos, rank, dims, obj1, obj2); parallel_print(SPACES); parallel_print(UI_FORMAT_P_NOTCOMP, temp1_uint, temp2_uint, PDIFF(temp1_uint, temp2_uint)); } nfound++; } - else if (per > options->percent && PDIFF(temp1_uint,temp2_uint) > options->delta) { - if (print_data(options)) { + else if (per > opts->percent && PDIFF(temp1_uint,temp2_uint) > opts->delta) { + if (print_data(opts)) { print_pos(ph, 1, index, acc, pos, rank, dims, obj1, obj2); parallel_print(SPACES); parallel_print(UI_FORMAT_P, temp1_uint, temp2_uint, PDIFF(temp1_uint, temp2_uint), per); @@ -1272,7 +1291,7 @@ static hsize_t diff_datum( } } else if (temp1_uint != temp2_uint) { - if (print_data(options)) { + if (print_data(opts)) { print_pos(ph, 0, index, acc, pos, rank, dims, obj1, obj2); parallel_print(SPACES); parallel_print(UI_FORMAT, temp1_uint, temp2_uint, PDIFF(temp1_uint, temp2_uint)); @@ -1288,14 +1307,16 @@ static hsize_t diff_datum( else if (type_size == 8 && type_sign != H5T_SGN_NONE) { long temp1_long; long temp2_long; - HDassert(type_size == sizeof(long)); + + if(type_size != sizeof(long)) + HGOTO_ERROR(1, H5E_tools_min_id_g, "Type size is not long size"); HDmemcpy(&temp1_long, mem1, sizeof(long)); HDmemcpy(&temp2_long, mem2, sizeof(long)); /* -d and !-p */ - if (options->d && !options->p) { - if (ABS(temp1_long-temp2_long) > options->delta) { - if (print_data(options)) { + if (opts->d && !opts->p) { + if (ABS(temp1_long-temp2_long) > opts->delta) { + if (print_data(opts)) { print_pos(ph, 0, index, acc, pos, rank, dims, obj1, obj2); parallel_print(SPACES); parallel_print(LI_FORMAT, temp1_long, temp2_long, ABS(temp1_long - temp2_long)); @@ -1304,19 +1325,19 @@ static hsize_t diff_datum( } } /* !-d and -p */ - else if (!options->d && options->p) { + else if (!opts->d && opts->p) { PER(temp1_long, temp2_long); if (not_comparable && !both_zero) { - if (print_data(options)) { + if (print_data(opts)) { print_pos(ph, 1, index, acc, pos, rank, dims, obj1, obj2); parallel_print(SPACES); parallel_print(LI_FORMAT_P_NOTCOMP, temp1_long, temp2_long, ABS(temp1_long - temp2_long)); } nfound++; } - else if (per > options->percent) { - if (print_data(options)) { + else if (per > opts->percent) { + if (print_data(opts)) { print_pos(ph, 1, index, acc, pos, rank, dims, obj1, obj2); parallel_print(SPACES); parallel_print(LI_FORMAT_P, temp1_long, temp2_long, ABS(temp1_long - temp2_long), per); @@ -1325,19 +1346,19 @@ static hsize_t diff_datum( } } /* -d and -p */ - else if (options->d && options->p) { + else if (opts->d && opts->p) { PER(temp1_long, temp2_long); if (not_comparable && !both_zero) { - if (print_data(options)) { + if (print_data(opts)) { print_pos(ph, 1, index, acc, pos, rank, dims, obj1, obj2); parallel_print(SPACES); parallel_print(LI_FORMAT_P_NOTCOMP, temp1_long, temp2_long, ABS(temp1_long - temp2_long)); } nfound++; } - else if (per > options->percent && ABS(temp1_long-temp2_long) > options->delta) { - if (print_data(options)) { + else if (per > opts->percent && ABS(temp1_long-temp2_long) > opts->delta) { + if (print_data(opts)) { print_pos(ph, 1, index, acc, pos, rank, dims, obj1, obj2); parallel_print(SPACES); parallel_print(LI_FORMAT_P, temp1_long, temp2_long, ABS(temp1_long - temp2_long), per); @@ -1346,7 +1367,7 @@ static hsize_t diff_datum( } } else if (temp1_long != temp2_long) { - if (print_data(options)) { + if (print_data(opts)) { print_pos(ph, 0, index, acc, pos, rank, dims, obj1, obj2); parallel_print(SPACES); parallel_print(LI_FORMAT, temp1_long, temp2_long, ABS(temp1_long - temp2_long)); @@ -1362,14 +1383,16 @@ static hsize_t diff_datum( else if (type_size == 8 && type_sign == H5T_SGN_NONE) { unsigned long temp1_ulong; unsigned long temp2_ulong; - HDassert(type_size == sizeof(unsigned long)); + + if(type_size != sizeof(unsigned long)) + HGOTO_ERROR(1, H5E_tools_min_id_g, "Type size is not unsigned long size"); HDmemcpy(&temp1_ulong, mem1, sizeof(unsigned long)); HDmemcpy(&temp2_ulong, mem2, sizeof(unsigned long)); /* -d and !-p */ - if (options->d && !options->p) { - if (PDIFF(temp1_ulong, temp2_ulong) > options->delta) { - if (print_data(options)) { + if (opts->d && !opts->p) { + if (PDIFF(temp1_ulong, temp2_ulong) > opts->delta) { + if (print_data(opts)) { print_pos(ph, 0, index, acc, pos, rank, dims, obj1, obj2); parallel_print(SPACES); parallel_print(ULI_FORMAT, temp1_ulong, temp2_ulong, PDIFF(temp1_ulong, temp2_ulong)); @@ -1378,19 +1401,19 @@ static hsize_t diff_datum( } } /* !-d and -p */ - else if (!options->d && options->p) { + else if (!opts->d && opts->p) { PER_UNSIGN(signed long, temp1_ulong, temp2_ulong); if (not_comparable && !both_zero) { - if (print_data(options)) { + if (print_data(opts)) { print_pos(ph, 1, index, acc, pos, rank, dims, obj1, obj2); parallel_print(SPACES); parallel_print(ULI_FORMAT_P_NOTCOMP, temp1_ulong, temp2_ulong, PDIFF(temp1_ulong, temp2_ulong)); } nfound++; } - else if (per > options->percent) { - if (print_data(options)) { + else if (per > opts->percent) { + if (print_data(opts)) { print_pos(ph, 1, index, acc, pos, rank, dims, obj1, obj2); parallel_print(SPACES); parallel_print(ULI_FORMAT_P, temp1_ulong, temp2_ulong, PDIFF(temp1_ulong, temp2_ulong), per); @@ -1399,19 +1422,19 @@ static hsize_t diff_datum( } } /* -d and -p */ - else if (options->d && options->p) { + else if (opts->d && opts->p) { PER_UNSIGN(signed long, temp1_ulong, temp2_ulong); if (not_comparable && !both_zero) { - if (print_data(options)) { + if (print_data(opts)) { print_pos(ph, 1, index, acc, pos, rank, dims, obj1, obj2); parallel_print(SPACES); parallel_print(ULI_FORMAT_P_NOTCOMP, temp1_ulong, temp2_ulong, PDIFF(temp1_ulong, temp2_ulong)); } nfound++; } - else if (per > options->percent && PDIFF(temp1_ulong,temp2_ulong) > options->delta) { - if (print_data(options)) { + else if (per > opts->percent && PDIFF(temp1_ulong,temp2_ulong) > opts->delta) { + if (print_data(opts)) { print_pos(ph, 1, index, acc, pos, rank, dims, obj1, obj2); parallel_print(SPACES); parallel_print(ULI_FORMAT_P, temp1_ulong, temp2_ulong, PDIFF(temp1_ulong, temp2_ulong), per); @@ -1420,7 +1443,7 @@ static hsize_t diff_datum( } } else if (temp1_ulong != temp2_ulong) { - if (print_data(options)) { + if (print_data(opts)) { print_pos(ph, 0, index, acc, pos, rank, dims, obj1, obj2); parallel_print(SPACES); parallel_print(ULI_FORMAT, temp1_ulong, temp2_ulong, PDIFF(temp1_ulong, temp2_ulong)); @@ -1445,31 +1468,32 @@ static hsize_t diff_datum( hbool_t isnan1 = FALSE; hbool_t isnan2 = FALSE; - HDassert(type_size == sizeof(float)); + if(type_size != sizeof(float)) + HGOTO_ERROR(1, H5E_tools_min_id_g, "Type size is not float size"); HDmemcpy(&temp1_float, mem1, sizeof(float)); HDmemcpy(&temp2_float, mem2, sizeof(float)); - /* logic for detecting NaNs is different with options -d, -p and no options */ + /* logic for detecting NaNs is different with opts -d, -p and no opts */ /*------------------------------------------------------------------------- * -d and !-p *------------------------------------------------------------------------- */ - if (options->d && !options->p) { + if (opts->d && !opts->p) { /*------------------------------------------------------------------------- * detect NaNs *------------------------------------------------------------------------- */ - if (options->do_nans) { + if (opts->do_nans) { isnan1 = my_isnan(FLT_FLOAT, &temp1_float); isnan2 = my_isnan(FLT_FLOAT, &temp2_float); } /* both not NaN, do the comparison */ if (!isnan1 && !isnan2) { - if (ABS(temp1_float-temp2_float) > (float) options->delta) { - if (print_data(options)) { + if (ABS(temp1_float-temp2_float) > (float) opts->delta) { + if (print_data(opts)) { print_pos(ph, 0, index, acc, pos, rank, dims, obj1, obj2); parallel_print(SPACES); parallel_print(F_FORMAT, (double) temp1_float, (double) temp2_float, (double) ABS(temp1_float - temp2_float)); @@ -1479,7 +1503,7 @@ static hsize_t diff_datum( } /* only one is NaN, assume difference */ else if ((isnan1 && !isnan2) || (!isnan1 && isnan2)) { - if (print_data(options)) { + if (print_data(opts)) { print_pos(ph, 0, index, acc, pos, rank, dims, obj1, obj2); parallel_print(SPACES); parallel_print(F_FORMAT, (double) temp1_float, (double) temp2_float, (double) ABS(temp1_float - temp2_float)); @@ -1491,12 +1515,12 @@ static hsize_t diff_datum( * !-d and -p *------------------------------------------------------------------------- */ - else if (!options->d && options->p) { + else if (!opts->d && opts->p) { /*------------------------------------------------------------------------- * detect NaNs *------------------------------------------------------------------------- */ - if (options->do_nans) { + if (opts->do_nans) { isnan1 = my_isnan(FLT_FLOAT, &temp1_float); isnan2 = my_isnan(FLT_FLOAT, &temp2_float); } @@ -1506,15 +1530,15 @@ static hsize_t diff_datum( PER(temp1_float, temp2_float); if (not_comparable && !both_zero) { - if (print_data(options)) { + if (print_data(opts)) { print_pos(ph, 1, index, acc, pos, rank, dims, obj1, obj2); parallel_print(SPACES); parallel_print(F_FORMAT_P_NOTCOMP, (double) temp1_float, (double) temp2_float, (double) ABS(temp1_float - temp2_float)); } nfound++; } - else if (per > options->percent && (double) ABS(temp1_float - temp2_float) > options->delta) { - if (print_data(options)) { + else if (per > opts->percent && (double) ABS(temp1_float - temp2_float) > opts->delta) { + if (print_data(opts)) { print_pos(ph, 1, index, acc, pos, rank, dims, obj1, obj2); parallel_print(SPACES); parallel_print(F_FORMAT_P, (double) temp1_float, (double) temp2_float, @@ -1525,7 +1549,7 @@ static hsize_t diff_datum( } /* only one is NaN, assume difference */ else if ((isnan1 && !isnan2) || (!isnan1 && isnan2)) { - if (print_data(options)) { + if (print_data(opts)) { print_pos(ph, 0, index, acc, pos, rank, dims, obj1, obj2); parallel_print(SPACES); parallel_print(F_FORMAT, (double) temp1_float, (double) temp2_float, (double) ABS(temp1_float - temp2_float)); @@ -1537,12 +1561,12 @@ static hsize_t diff_datum( * -d and -p *------------------------------------------------------------------------- */ - else if (options->d && options->p) { + else if (opts->d && opts->p) { /*------------------------------------------------------------------------- * detect NaNs *------------------------------------------------------------------------- */ - if (options->do_nans) { + if (opts->do_nans) { isnan1 = my_isnan(FLT_FLOAT, &temp1_float); isnan2 = my_isnan(FLT_FLOAT, &temp2_float); } @@ -1552,15 +1576,15 @@ static hsize_t diff_datum( PER(temp1_float, temp2_float); if (not_comparable && !both_zero) { - if (print_data(options)) { + if (print_data(opts)) { print_pos(ph, 1, index, acc, pos, rank, dims, obj1, obj2); parallel_print(SPACES); parallel_print(F_FORMAT_P_NOTCOMP, (double) temp1_float, (double) temp2_float, (double) ABS(temp1_float - temp2_float)); } nfound++; } - else if (per > options->percent) { - if (print_data(options)) { + else if (per > opts->percent) { + if (print_data(opts)) { print_pos(ph, 1, index, acc, pos, rank, dims, obj1, obj2); parallel_print(SPACES); parallel_print(F_FORMAT_P, (double) temp1_float, (double) temp2_float, @@ -1571,7 +1595,7 @@ static hsize_t diff_datum( } /* only one is NaN, assume difference */ else if ((isnan1 && !isnan2) || (!isnan1 && isnan2)) { - if (print_data(options)) { + if (print_data(opts)) { print_pos(ph, 0, index, acc, pos, rank, dims, obj1, obj2); parallel_print(SPACES); parallel_print(F_FORMAT, (double) temp1_float, (double) temp2_float, (double) ABS(temp1_float - temp2_float)); @@ -1583,8 +1607,8 @@ static hsize_t diff_datum( * no -d and -p *------------------------------------------------------------------------- */ - else if (equal_float(temp1_float, temp2_float, options) == FALSE) { - if (print_data(options)) { + else if (equal_float(temp1_float, temp2_float, opts) == FALSE) { + if (print_data(opts)) { print_pos(ph, 0, index, acc, pos, rank, dims, obj1, obj2); parallel_print(SPACES); parallel_print(F_FORMAT, (double) temp1_float, (double) temp2_float, (double) ABS(temp1_float - temp2_float)); @@ -1603,30 +1627,31 @@ static hsize_t diff_datum( hbool_t isnan1 = FALSE; hbool_t isnan2 = FALSE; - HDassert(type_size == sizeof(double)); + if(type_size != sizeof(double)) + HGOTO_ERROR(1, H5E_tools_min_id_g, "Type size is not double size"); HDmemcpy(&temp1_double, mem1, sizeof(double)); HDmemcpy(&temp2_double, mem2, sizeof(double)); - /* logic for detecting NaNs is different with options -d, -p and no options */ + /* logic for detecting NaNs is different with opts -d, -p and no opts */ /*------------------------------------------------------------------------- * -d and !-p *------------------------------------------------------------------------- */ - if (options->d && !options->p) { + if (opts->d && !opts->p) { /*------------------------------------------------------------------------- * detect NaNs *------------------------------------------------------------------------- */ - if (options->do_nans) { + if (opts->do_nans) { isnan1 = my_isnan(FLT_DOUBLE, &temp1_double); isnan2 = my_isnan(FLT_DOUBLE, &temp2_double); } /* both not NaN, do the comparison */ if (!isnan1 && !isnan2) { - if (ABS(temp1_double-temp2_double) > options->delta) { - if (print_data(options)) { + if (ABS(temp1_double-temp2_double) > opts->delta) { + if (print_data(opts)) { print_pos(ph, 0, index, acc, pos, rank, dims, obj1, obj2); parallel_print(SPACES); parallel_print(F_FORMAT, temp1_double, temp2_double, ABS(temp1_double - temp2_double)); @@ -1636,24 +1661,24 @@ static hsize_t diff_datum( } /* only one is NaN, assume difference */ else if ((isnan1 && !isnan2) || (!isnan1 && isnan2)) { - if (print_data(options)) { + if (print_data(opts)) { print_pos(ph, 0, index, acc, pos, rank, dims, obj1, obj2); parallel_print(SPACES); parallel_print(F_FORMAT, temp1_double, temp2_double, ABS(temp1_double - temp2_double)); } nfound++; } - } /* options->d && !options->p */ + } /* opts->d && !opts->p */ /*------------------------------------------------------------------------- * !-d and -p *------------------------------------------------------------------------- */ - else if (!options->d && options->p) { + else if (!opts->d && opts->p) { /*------------------------------------------------------------------------- * detect NaNs *------------------------------------------------------------------------- */ - if (options->do_nans) { + if (opts->do_nans) { isnan1 = my_isnan(FLT_DOUBLE, &temp1_double); isnan2 = my_isnan(FLT_DOUBLE, &temp2_double); } @@ -1663,15 +1688,15 @@ static hsize_t diff_datum( PER(temp1_double, temp2_double); if (not_comparable && !both_zero) { - if (print_data(options)) { + if (print_data(opts)) { print_pos(ph, 1, index, acc, pos, rank, dims, obj1, obj2); parallel_print(SPACES); parallel_print(F_FORMAT_P_NOTCOMP, temp1_double, temp2_double, ABS(temp1_double - temp2_double)); } nfound++; } - else if (per > options->percent) { - if (print_data(options)) { + else if (per > opts->percent) { + if (print_data(opts)) { print_pos(ph, 1, index, acc, pos, rank, dims, obj1, obj2); parallel_print(SPACES); parallel_print(F_FORMAT_P, temp1_double, temp2_double, ABS(temp1_double - temp2_double), ABS(1 - temp2_double / temp1_double)); @@ -1681,7 +1706,7 @@ static hsize_t diff_datum( } /* only one is NaN, assume difference */ else if ((isnan1 && !isnan2) || (!isnan1 && isnan2)) { - if (print_data(options)) { + if (print_data(opts)) { print_pos(ph, 0, index, acc, pos, rank, dims, obj1, obj2); parallel_print(SPACES); parallel_print(F_FORMAT, temp1_double, temp2_double, ABS(temp1_double - temp2_double)); @@ -1693,12 +1718,12 @@ static hsize_t diff_datum( * -d and -p *------------------------------------------------------------------------- */ - else if (options->d && options->p) { + else if (opts->d && opts->p) { /*------------------------------------------------------------------------- * detect NaNs *------------------------------------------------------------------------- */ - if (options->do_nans) { + if (opts->do_nans) { isnan1 = my_isnan(FLT_DOUBLE, &temp1_double); isnan2 = my_isnan(FLT_DOUBLE, &temp2_double); } @@ -1708,16 +1733,16 @@ static hsize_t diff_datum( PER(temp1_double, temp2_double); if (not_comparable && !both_zero) { - if (print_data(options)) { + if (print_data(opts)) { print_pos(ph, 1, index, acc, pos, rank, dims, obj1, obj2); parallel_print(SPACES); parallel_print(F_FORMAT_P_NOTCOMP, temp1_double, temp2_double, ABS(temp1_double - temp2_double)); } nfound++; } - else if (per > options->percent && - ABS(temp1_double-temp2_double) > options->delta) { - if (print_data(options)) { + else if (per > opts->percent && + ABS(temp1_double-temp2_double) > opts->delta) { + if (print_data(opts)) { print_pos(ph, 1, index, acc, pos, rank, dims, obj1, obj2); parallel_print(SPACES); parallel_print(F_FORMAT_P, temp1_double, temp2_double, ABS(temp1_double - temp2_double), ABS(1 - temp2_double / temp1_double)); @@ -1727,7 +1752,7 @@ static hsize_t diff_datum( } /* only one is NaN, assume difference */ else if ((isnan1 && !isnan2) || (!isnan1 && isnan2)) { - if (print_data(options)) { + if (print_data(opts)) { print_pos(ph, 0, index, acc, pos, rank, dims, obj1, obj2); parallel_print(SPACES); parallel_print(F_FORMAT, temp1_double, temp2_double, ABS(temp1_double - temp2_double)); @@ -1739,8 +1764,8 @@ static hsize_t diff_datum( * no -d and -p *------------------------------------------------------------------------- */ - else if (equal_double(temp1_double, temp2_double, options) == FALSE) { - if (print_data(options)) { + else if (equal_double(temp1_double, temp2_double, opts) == FALSE) { + if (print_data(opts)) { print_pos(ph, 0, index, acc, pos, rank, dims, obj1, obj2); parallel_print(SPACES); parallel_print(F_FORMAT, temp1_double, temp2_double, ABS(temp1_double - temp2_double)); @@ -1761,7 +1786,9 @@ static hsize_t diff_datum( hbool_t isnan1 = FALSE; hbool_t isnan2 = FALSE; - HDassert(type_size == sizeof(long double)); + if(type_size != sizeof(long double)) { + HGOTO_ERROR(1, H5E_tools_min_id_g, "Type size is not long double size"); + } HDmemcpy(&temp1_double, mem1, sizeof(long double)); HDmemcpy(&temp2_double, mem2, sizeof(long double)); @@ -1772,20 +1799,20 @@ static hsize_t diff_datum( * -d and !-p *------------------------------------------------------------------------- */ - if (options->d && !options->p) { + if (opts->d && !opts->p) { /*------------------------------------------------------------------------- * detect NaNs *------------------------------------------------------------------------- */ - if (options->do_nans) { + if (opts->do_nans) { isnan1 = my_isnan(FLT_LDOUBLE,&temp1_double); isnan2 = my_isnan(FLT_LDOUBLE,&temp2_double); } /* both not NaN, do the comparison */ if (!isnan1 && !isnan2) { - if (ABS(temp1_double-temp2_double) > options->delta) { - if (print_data(options)) { + if (ABS(temp1_double-temp2_double) > opts->delta) { + if (print_data(opts)) { print_pos(ph, 0, index, acc, pos, rank, dims, obj1, obj2); parallel_print(SPACES); parallel_print(LD_FORMAT, temp1_double, temp2_double, ABS(temp1_double - temp2_double)); @@ -1795,7 +1822,7 @@ static hsize_t diff_datum( } /* NaN */ /* only one is NaN, assume difference */ else if ((isnan1 && !isnan2) || (!isnan1 && isnan2)) { - if (print_data(options)) { + if (print_data(opts)) { print_pos(ph, 0, index, acc, pos, rank, dims, obj1, obj2); parallel_print(SPACES); parallel_print(F_FORMAT, temp1_double, temp2_double, ABS(temp1_double - temp2_double)); @@ -1807,12 +1834,12 @@ static hsize_t diff_datum( * !-d and -p *------------------------------------------------------------------------- */ - else if (!options->d && options->p) { + else if (!opts->d && opts->p) { /*------------------------------------------------------------------------- * detect NaNs *------------------------------------------------------------------------- */ - if (options->do_nans) { + if (opts->do_nans) { isnan1 = my_isnan(FLT_LDOUBLE, &temp1_double); isnan2 = my_isnan(FLT_LDOUBLE, &temp2_double); } @@ -1822,15 +1849,15 @@ static hsize_t diff_datum( PER(temp1_double,temp2_double); if (not_comparable && !both_zero) { - if (print_data(options)) { + if (print_data(opts)) { print_pos(ph, 1, index, acc, pos, rank, dims, obj1, obj2); parallel_print(SPACES); parallel_print(LD_FORMAT_P_NOTCOMP, temp1_double, temp2_double, ABS(temp1_double - temp2_double)); } nfound++; } - else if (per > options->percent) { - if (print_data(options)) { + else if (per > opts->percent) { + if (print_data(opts)) { print_pos(ph, 1, index, acc, pos, rank, dims, obj1, obj2); parallel_print(SPACES); parallel_print(LD_FORMAT_P, temp1_double, temp2_double, ABS(temp1_double - temp2_double), ABS(1 - temp2_double / temp1_double)); @@ -1840,7 +1867,7 @@ static hsize_t diff_datum( } /* NaN */ /* only one is NaN, assume difference */ else if ((isnan1 && !isnan2) || (!isnan1 && isnan2)) { - if (print_data(options)) { + if (print_data(opts)) { print_pos(ph, 0, index, acc, pos, rank, dims, obj1, obj2); parallel_print(SPACES); parallel_print(F_FORMAT, temp1_double, temp2_double, ABS(temp1_double - temp2_double)); @@ -1852,30 +1879,30 @@ static hsize_t diff_datum( * -d and -p *------------------------------------------------------------------------- */ - else if ( options->d && options->p) { + else if (opts->d && opts->p) { /*------------------------------------------------------------------------- * detect NaNs *------------------------------------------------------------------------- */ - if (options->do_nans) { + if (opts->do_nans) { isnan1 = my_isnan(FLT_LDOUBLE, &temp1_double); isnan2 = my_isnan(FLT_LDOUBLE, &temp2_double); } /* both not NaN, do the comparison */ - if ( !isnan1 && !isnan2) { + if (!isnan1 && !isnan2) { PER(temp1_double,temp2_double); if (not_comparable && !both_zero) { - if (print_data(options)) { + if (print_data(opts)) { print_pos(ph, 1, index, acc, pos, rank, dims, obj1, obj2); parallel_print(SPACES); parallel_print(LD_FORMAT_P_NOTCOMP, temp1_double, temp2_double, ABS(temp1_double - temp2_double)); } nfound++; } - else if (per > options->percent && ABS(temp1_double-temp2_double) > options->delta) { - if (print_data(options)) { + else if (per > opts->percent && ABS(temp1_double-temp2_double) > opts->delta) { + if (print_data(opts)) { print_pos(ph, 1, index, acc, pos, rank, dims, obj1, obj2); parallel_print(SPACES); parallel_print(LD_FORMAT_P, temp1_double, temp2_double, ABS(temp1_double - temp2_double), ABS(1 - temp2_double / temp1_double)); @@ -1885,7 +1912,7 @@ static hsize_t diff_datum( } /* NaN */ /* only one is NaN, assume difference */ else if ((isnan1 && !isnan2) || (!isnan1 && isnan2)) { - if (print_data(options)) { + if (print_data(opts)) { print_pos(ph, 0, index, acc, pos, rank, dims, obj1, obj2); parallel_print(SPACES); parallel_print(F_FORMAT, temp1_double, temp2_double, ABS(temp1_double - temp2_double)); @@ -1897,8 +1924,8 @@ static hsize_t diff_datum( * no -d and -p *------------------------------------------------------------------------- */ - else if (equal_ldouble(temp1_double, temp2_double, options) == FALSE) { - if (print_data(options)) { + else if (equal_ldouble(temp1_double, temp2_double, opts) == FALSE) { + if (print_data(opts)) { print_pos(ph, 0, index, acc, pos, rank, dims, obj1, obj2); parallel_print(SPACES); parallel_print(LD_FORMAT, temp1_double, temp2_double, ABS(temp1_double - temp2_double)); @@ -1911,7 +1938,11 @@ static hsize_t diff_datum( break; /* H5T_FLOAT class */ } /* switch */ - h5difftrace("diff_datum finish\n"); + +done: + opts->err_stat = opts->err_stat | ret_value; + + h5diffdebug3("diff_datum finish:%d - errstat:%d\n", nfound, opts->err_stat); return nfound; } @@ -1922,7 +1953,6 @@ static hsize_t diff_datum( * Purpose: Determines if memory is initialized to all zero bytes. * * Return: TRUE if all bytes are zero; FALSE otherwise - * *------------------------------------------------------------------------- */ @@ -1942,7 +1972,6 @@ static hbool_t all_zero(const void *_mem, size_t size) { * Purpose: print start coordinates and opposite corner of a region block * * Return: void - * *------------------------------------------------------------------------- */ @@ -1965,7 +1994,6 @@ void print_region_block(int i, hsize_t *ptdata, int ndims) { * Purpose: print points of a region reference * * Return: void - * *------------------------------------------------------------------------- */ @@ -1986,18 +2014,18 @@ void print_points(int i, hsize_t *ptdata, int ndims) { * Purpose: diff a dataspace region * * Return: number of differences - * *------------------------------------------------------------------------- */ -static hsize_t diff_region(hid_t obj1_id, hid_t obj2_id, hid_t region1_id, hid_t region2_id, diff_opt_t *options) +static hsize_t diff_region(hid_t obj1_id, hid_t obj2_id, hid_t region1_id, hid_t region2_id, diff_opt_t *opts) { + hsize_t ret_value = 0; hssize_t nblocks1, npoints1; hssize_t nblocks2, npoints2; hsize_t alloc_size; - hsize_t *ptdata1; - hsize_t *ptdata2; + hsize_t *ptdata1 = NULL; + hsize_t *ptdata2 = NULL; int ndims1; int ndims2; int i, j; @@ -2012,18 +2040,17 @@ static hsize_t diff_region(hid_t obj1_id, hid_t obj2_id, hid_t region1_id, hid_t * respectively. They do not currently know how to translate from one to * the other. */ - H5E_BEGIN_TRY - { - nblocks1 = H5Sget_select_hyper_nblocks(region1_id); - nblocks2 = H5Sget_select_hyper_nblocks(region2_id); + H5E_BEGIN_TRY { + nblocks1 = H5Sget_select_hyper_nblocks(region1_id); + nblocks2 = H5Sget_select_hyper_nblocks(region2_id); - npoints1 = H5Sget_select_elem_npoints(region1_id); - npoints2 = H5Sget_select_elem_npoints(region2_id); - }H5E_END_TRY; + npoints1 = H5Sget_select_elem_npoints(region1_id); + npoints2 = H5Sget_select_elem_npoints(region2_id); + } H5E_END_TRY; if (nblocks1 != nblocks2 || npoints1 != npoints2 || ndims1 != ndims2) { - options->not_cmp = 1; - return 0; + opts->not_cmp = 1; + HGOTO_DONE (0); } /*------------------------------------------------------------------------- @@ -2032,57 +2059,62 @@ static hsize_t diff_region(hid_t obj1_id, hid_t obj2_id, hid_t region1_id, hid_t */ if (nblocks1 > 0) { HDassert(ndims1 > 0); - alloc_size = (hsize_t) nblocks1 * (unsigned) ndims1 * 2 - * sizeof(ptdata1[0]); + alloc_size = (hsize_t) nblocks1 * (unsigned) ndims1 * 2 * sizeof(ptdata1[0]); HDassert(alloc_size == (hsize_t)((size_t )alloc_size)); /*check for overflow*/ - ptdata1 = (hsize_t *) HDmalloc((size_t )alloc_size); - H5_CHECK_OVERFLOW(nblocks1, hssize_t, hsize_t); - H5Sget_select_hyper_blocklist(region1_id, (hsize_t) 0, - (hsize_t) nblocks1, ptdata1); - - ptdata2 = (hsize_t *) HDmalloc((size_t )alloc_size); - H5_CHECK_OVERFLOW(nblocks2, hssize_t, hsize_t); - H5Sget_select_hyper_blocklist(region2_id, (hsize_t) 0, - (hsize_t) nblocks2, ptdata2); - - for (i = 0; i < nblocks1; i++) { - /* start coordinates and opposite corner */ - for (j = 0; j < ndims1; j++) { - hsize_t start1, start2, end1, end2; + if((ptdata1 = (hsize_t *) HDmalloc((size_t )alloc_size)) == NULL) { + opts->err_stat = 1; + H5TOOLS_INFO(H5E_tools_min_id_g, "Buffer allocation failed"); + } + else { + H5_CHECK_OVERFLOW(nblocks1, hssize_t, hsize_t); + H5Sget_select_hyper_blocklist(region1_id, (hsize_t) 0, (hsize_t) nblocks1, ptdata1); - start1 = ptdata1[i * 2 * ndims1 + j]; - start2 = ptdata2[i * 2 * ndims1 + j]; - end1 = ptdata1[i * 2 * ndims1 + j + ndims1]; - end2 = ptdata2[i * 2 * ndims1 + j + ndims1]; - if (start1 != start2 || end1 != end2) - nfound_b++; + if((ptdata2 = (hsize_t *) HDmalloc((size_t )alloc_size)) == NULL) { + opts->err_stat = 1; + H5TOOLS_INFO(H5E_tools_min_id_g, "Buffer allocation failed"); } - } + else { + H5_CHECK_OVERFLOW(nblocks2, hssize_t, hsize_t); + H5Sget_select_hyper_blocklist(region2_id, (hsize_t) 0, (hsize_t) nblocks2, ptdata2); + + for (i = 0; i < nblocks1; i++) { + /* start coordinates and opposite corner */ + for (j = 0; j < ndims1; j++) { + hsize_t start1, start2, end1, end2; + + start1 = ptdata1[i * 2 * ndims1 + j]; + start2 = ptdata2[i * 2 * ndims1 + j]; + end1 = ptdata1[i * 2 * ndims1 + j + ndims1]; + end2 = ptdata2[i * 2 * ndims1 + j + ndims1]; + if (start1 != start2 || end1 != end2) + nfound_b++; + } + } - /* print differences if found */ - if (nfound_b && options->m_verbose) { - H5O_info_t oi1, oi2; + /* print differences if found */ + if (nfound_b && opts->m_verbose) { + H5O_info_t oi1, oi2; - H5Oget_info(obj1_id, &oi1); - H5Oget_info(obj2_id, &oi2); + H5Oget_info(obj1_id, &oi1); + H5Oget_info(obj2_id, &oi2); - parallel_print("Referenced dataset %lu %lu\n", - (unsigned long) oi1.addr, (unsigned long) oi2.addr); - parallel_print( - "------------------------------------------------------------\n"); + parallel_print("Referenced dataset %lu %lu\n", (unsigned long) oi1.addr, (unsigned long) oi2.addr); + parallel_print( "------------------------------------------------------------\n"); - parallel_print("Region blocks\n"); - for (i = 0; i < nblocks1; i++) { - parallel_print("block #%d", i); - print_region_block(i, ptdata1, ndims1); - print_region_block(i, ptdata2, ndims1); - parallel_print("\n"); - } - } + parallel_print("Region blocks\n"); + for (i = 0; i < nblocks1; i++) { + parallel_print("block #%d", i); + print_region_block(i, ptdata1, ndims1); + print_region_block(i, ptdata2, ndims1); + parallel_print("\n"); + } + } + HDfree(ptdata2); + } /* else ptdata2 */ - HDfree(ptdata1); - HDfree(ptdata2); + HDfree(ptdata1); + } /* else ptdata1 */ } /*------------------------------------------------------------------------- @@ -2090,98 +2122,107 @@ static hsize_t diff_region(hid_t obj1_id, hid_t obj2_id, hid_t region1_id, hid_t *------------------------------------------------------------------------- */ if (npoints1 > 0) { - alloc_size = (hsize_t) npoints1 * (unsigned) ndims1 - * sizeof(ptdata1[0]); + alloc_size = (hsize_t) npoints1 * (unsigned) ndims1 * sizeof(ptdata1[0]); HDassert(alloc_size == (hsize_t)((size_t )alloc_size)); /*check for overflow*/ - ptdata1 = (hsize_t *) HDmalloc((size_t )alloc_size); - H5_CHECK_OVERFLOW(npoints1, hssize_t, hsize_t); - H5Sget_select_elem_pointlist(region1_id, (hsize_t) 0, - (hsize_t) npoints1, ptdata1); - - ptdata2 = (hsize_t *) HDmalloc((size_t )alloc_size); - H5_CHECK_OVERFLOW(npoints1, hssize_t, hsize_t); - H5Sget_select_elem_pointlist(region2_id, (hsize_t) 0, - (hsize_t) npoints2, ptdata2); - - for (i = 0; i < npoints1; i++) { - hsize_t pt1, pt2; + if((ptdata1 = (hsize_t *) HDmalloc((size_t )alloc_size)) == NULL) { + opts->err_stat = 1; + H5TOOLS_INFO(H5E_tools_min_id_g, "Buffer allocation failed"); + } + else { + H5_CHECK_OVERFLOW(npoints1, hssize_t, hsize_t); + H5Sget_select_elem_pointlist(region1_id, (hsize_t) 0, (hsize_t) npoints1, ptdata1); - for (j = 0; j < ndims1; j++) { - pt1 = ptdata1[i * ndims1 + j]; - pt2 = ptdata2[i * ndims1 + j]; - if (pt1 != pt2) - nfound_p++; + if((ptdata2 = (hsize_t *) HDmalloc((size_t )alloc_size)) == NULL) { + opts->err_stat = 1; + H5TOOLS_INFO(H5E_tools_min_id_g, "Buffer allocation failed"); } - } + else { + H5_CHECK_OVERFLOW(npoints1, hssize_t, hsize_t); + H5Sget_select_elem_pointlist(region2_id, (hsize_t) 0, (hsize_t) npoints2, ptdata2); - if (nfound_p && options->m_verbose) { - parallel_print("Region points\n"); - for (i = 0; i < npoints1; i++) { - hsize_t pt1, pt2; - int diff_data = 0; - - for (j = 0; j < ndims1; j++) { - pt1 = ptdata1[i * ndims1 + j]; - pt2 = ptdata2[i * ndims1 + j]; - if (pt1 != pt2) { - diff_data = 1; - break; + for (i = 0; i < npoints1; i++) { + hsize_t pt1, pt2; + + for (j = 0; j < ndims1; j++) { + pt1 = ptdata1[i * ndims1 + j]; + pt2 = ptdata2[i * ndims1 + j]; + if (pt1 != pt2) + nfound_p++; } } - if (diff_data) { - parallel_print("point #%d", i); - print_points(i, ptdata1, ndims1); - print_points(i, ptdata2, ndims1); - parallel_print("\n"); + + if (nfound_p && opts->m_verbose) { + parallel_print("Region points\n"); + for (i = 0; i < npoints1; i++) { + hsize_t pt1, pt2; + int diff_data = 0; + + for (j = 0; j < ndims1; j++) { + pt1 = ptdata1[i * ndims1 + j]; + pt2 = ptdata2[i * ndims1 + j]; + if (pt1 != pt2) { + diff_data = 1; + break; + } + } + if (diff_data) { + parallel_print("point #%d", i); + print_points(i, ptdata1, ndims1); + print_points(i, ptdata2, ndims1); + parallel_print("\n"); + } + } } - } - } + HDfree(ptdata2); + } /* else ptdata2 */ #if defined (H5DIFF_DEBUG) - for (i = 0; i < npoints1; i++) { - int j; - - parallel_print("%sPt%lu: " , i ? "," : "", (unsigned long)i); + for (i = 0; i < npoints1; i++) { + parallel_print("%sPt%lu: " , i ? "," : "", (unsigned long)i); - for (j = 0; j < ndims1; j++) - parallel_print("%s%lu", j ? "," : "(", - (unsigned long)(ptdata1[i * ndims1 + j])); + for (j = 0; j < ndims1; j++) + parallel_print("%s%lu", j ? "," : "(", (unsigned long)(ptdata1[i * ndims1 + j])); - parallel_print(")"); - } + parallel_print(")"); + } #endif - HDfree(ptdata1); - HDfree(ptdata2); + HDfree(ptdata1); + } /* else ptdata1 */ } nfound_b = nfound_b / (unsigned) ndims1; nfound_p = nfound_p / (unsigned) ndims1; - return (nfound_p + nfound_b); + + ret_value = nfound_p + nfound_b; + +done: + return ret_value; } /*------------------------------------------------------------------------- * Function: character_compare * - * Purpose: do a byte-by-byte comparison and print in char format - * - * Return: number of differences found + * Purpose: do a byte-by-byte comparison and print in char format * + * Return: number of differences found *------------------------------------------------------------------------- */ static hsize_t character_compare(char *mem1, char *mem2, hsize_t i, size_t u, - int rank, hsize_t *dims, hsize_t *acc, hsize_t *pos, diff_opt_t *options, const char *obj1, const char *obj2, int *ph) { + int rank, hsize_t *dims, hsize_t *acc, hsize_t *pos, diff_opt_t *opts, const char *obj1, const char *obj2, int *ph) +{ hsize_t nfound = 0; /* differences found */ char temp1_uchar; char temp2_uchar; HDmemcpy(&temp1_uchar, mem1, sizeof(unsigned char)); - HDmemcpy(&temp2_uchar, mem2, sizeof(unsigned char)); h5diffdebug3("character_compare start %d=%d\n",temp1_uchar,temp2_uchar); + HDmemcpy(&temp2_uchar, mem2, sizeof(unsigned char)); + h5diffdebug3("character_compare start %d=%d\n",temp1_uchar,temp2_uchar); if (temp1_uchar != temp2_uchar) { - if (print_data(options)) { + if (print_data(opts)) { print_char_pos(ph, 0, i, u, acc, pos, rank, dims, obj1, obj2); parallel_print(" "); h5diff_print_char(temp1_uchar); @@ -2199,20 +2240,20 @@ static hsize_t character_compare(char *mem1, char *mem2, hsize_t i, size_t u, /*------------------------------------------------------------------------- * Function: character_compare_opt * - * Purpose: do a byte-by-byte comparison and print in numerical format - * - * Return: number of differences found + * Purpose: do a byte-by-byte comparison and print in numerical format * + * Return: number of differences found *------------------------------------------------------------------------- */ static hsize_t character_compare_opt(unsigned char *mem1, unsigned char *mem2, - hsize_t i, int rank, hsize_t *dims, hsize_t *acc, hsize_t *pos, diff_opt_t *options, const char *obj1, const char *obj2, int *ph) { - hsize_t nfound = 0; /* differences found */ + hsize_t i, int rank, hsize_t *dims, hsize_t *acc, hsize_t *pos, diff_opt_t *opts, const char *obj1, const char *obj2, int *ph) +{ + hsize_t nfound = 0; /* differences found */ unsigned char temp1_uchar; unsigned char temp2_uchar; - double per; - hbool_t both_zero; + double per; + hbool_t both_zero; HDmemcpy(&temp1_uchar, mem1, sizeof(unsigned char)); HDmemcpy(&temp2_uchar, mem2, sizeof(unsigned char)); @@ -2220,9 +2261,9 @@ static hsize_t character_compare_opt(unsigned char *mem1, unsigned char *mem2, h5difftrace("character_compare_opt start\n"); /* -d and !-p */ - if (options->d && !options->p) { - if (PDIFF(temp1_uchar,temp2_uchar) > options->delta) { - if (print_data(options)) { + if (opts->d && !opts->p) { + if (PDIFF(temp1_uchar,temp2_uchar) > opts->delta) { + if (print_data(opts)) { print_pos(ph, 0, i, acc, pos, rank, dims, obj1, obj2); parallel_print(SPACES); parallel_print(I_FORMAT, temp1_uchar, temp2_uchar, PDIFF(temp1_uchar, temp2_uchar)); @@ -2231,10 +2272,10 @@ static hsize_t character_compare_opt(unsigned char *mem1, unsigned char *mem2, } } /* !-d and -p */ - else if (!options->d && options->p) { + else if (!opts->d && opts->p) { PER_UNSIGN(signed char, temp1_uchar, temp2_uchar); - if (per > options->percent) { - if (print_data(options)) { + if (per > opts->percent) { + if (print_data(opts)) { print_pos(ph, 1, i, acc, pos, rank, dims, obj1, obj2); parallel_print(SPACES); parallel_print(I_FORMAT_P, temp1_uchar, temp2_uchar, PDIFF(temp1_uchar, temp2_uchar), per); @@ -2243,10 +2284,10 @@ static hsize_t character_compare_opt(unsigned char *mem1, unsigned char *mem2, } } /* -d and -p */ - else if (options->d && options->p) { + else if (opts->d && opts->p) { PER_UNSIGN(signed char, temp1_uchar, temp2_uchar); - if (per > options->percent && PDIFF(temp1_uchar,temp2_uchar) > options->delta) { - if (print_data(options)) { + if (per > opts->percent && PDIFF(temp1_uchar,temp2_uchar) > opts->delta) { + if (print_data(opts)) { print_pos(ph, 1, i, acc, pos, rank, dims, obj1, obj2); parallel_print(SPACES); parallel_print(I_FORMAT_P, temp1_uchar, temp2_uchar, PDIFF(temp1_uchar, temp2_uchar), per); @@ -2255,7 +2296,7 @@ static hsize_t character_compare_opt(unsigned char *mem1, unsigned char *mem2, } } else if (temp1_uchar != temp2_uchar) { - if (print_data(options)) { + if (print_data(opts)) { print_pos(ph, 0, i, acc, pos, rank, dims, obj1, obj2); parallel_print(SPACES); parallel_print(I_FORMAT, temp1_uchar, temp2_uchar, PDIFF(temp1_uchar, temp2_uchar)); @@ -2269,14 +2310,14 @@ static hsize_t character_compare_opt(unsigned char *mem1, unsigned char *mem2, /*------------------------------------------------------------------------- * Function: diff_float * - * Purpose: diff a H5T_NATIVE_FLOAT type - * - * Return: number of differences found + * Purpose: diff a H5T_NATIVE_FLOAT type * + * Return: number of differences found +* *------------------------------------------------------------------------- */ static hsize_t diff_float(unsigned char *mem1, unsigned char *mem2, - hsize_t nelmts, hsize_t hyper_start, int rank, hsize_t *dims, hsize_t *acc, hsize_t *pos, diff_opt_t *options, const char *obj1, + hsize_t nelmts, hsize_t hyper_start, int rank, hsize_t *dims, hsize_t *acc, hsize_t *pos, diff_opt_t *opts, const char *obj1, const char *obj2, int *ph) { @@ -2296,7 +2337,7 @@ static hsize_t diff_float(unsigned char *mem1, unsigned char *mem2, *------------------------------------------------------------------------- */ - if (options->d && !options->p) { + if (opts->d && !opts->p) { for (i = 0; i < nelmts; i++) { HDmemcpy(&temp1_float, mem1, sizeof(float)); HDmemcpy(&temp2_float, mem2, sizeof(float)); @@ -2305,15 +2346,15 @@ static hsize_t diff_float(unsigned char *mem1, unsigned char *mem2, * detect NaNs *------------------------------------------------------------------------- */ - if (options->do_nans) { + if (opts->do_nans) { isnan1 = my_isnan(FLT_FLOAT, &temp1_float); isnan2 = my_isnan(FLT_FLOAT, &temp2_float); } /* both not NaN, do the comparison */ if (!isnan1 && !isnan2) { - if ((double) ABS(temp1_float - temp2_float) > options->delta) { - if (print_data(options)) { + if ((double) ABS(temp1_float - temp2_float) > opts->delta) { + if (print_data(opts)) { print_pos(ph, 0, hyper_start + i, acc, pos, rank, dims, obj1, obj2); parallel_print(SPACES); parallel_print(F_FORMAT, (double) temp1_float, (double) temp2_float, (double) ABS(temp1_float - temp2_float)); @@ -2323,7 +2364,7 @@ static hsize_t diff_float(unsigned char *mem1, unsigned char *mem2, } /* only one is NaN, assume difference */ else if ((isnan1 && !isnan2) || (!isnan1 && isnan2)) { - if (print_data(options)) { + if (print_data(opts)) { print_pos(ph, 0, hyper_start + i, acc, pos, rank, dims, obj1, obj2); parallel_print(SPACES); parallel_print(F_FORMAT, (double) temp1_float, (double) temp2_float, (double) ABS(temp1_float - temp2_float)); @@ -2333,7 +2374,7 @@ static hsize_t diff_float(unsigned char *mem1, unsigned char *mem2, } mem1 += sizeof(float); mem2 += sizeof(float); - if (options->n && nfound >= options->count) + if (opts->n && nfound >= opts->count) return nfound; } /* i */ } @@ -2341,7 +2382,7 @@ static hsize_t diff_float(unsigned char *mem1, unsigned char *mem2, * !-d and -p *------------------------------------------------------------------------- */ - else if (!options->d && options->p) { + else if (!opts->d && opts->p) { for (i = 0; i < nelmts; i++) { HDmemcpy(&temp1_float, mem1, sizeof(float)); HDmemcpy(&temp2_float, mem2, sizeof(float)); @@ -2350,7 +2391,7 @@ static hsize_t diff_float(unsigned char *mem1, unsigned char *mem2, * detect NaNs *------------------------------------------------------------------------- */ - if (options->do_nans) { + if (opts->do_nans) { isnan1 = my_isnan(FLT_FLOAT, &temp1_float); isnan2 = my_isnan(FLT_FLOAT, &temp2_float); } @@ -2359,15 +2400,15 @@ static hsize_t diff_float(unsigned char *mem1, unsigned char *mem2, PER(temp1_float, temp2_float); if (not_comparable && !both_zero) { - if (print_data(options)) { + if (print_data(opts)) { print_pos(ph, 1, hyper_start + i, acc, pos, rank, dims, obj1, obj2); parallel_print(SPACES); parallel_print(F_FORMAT_P_NOTCOMP, (double) temp1_float, (double) temp2_float, (double) ABS(temp1_float - temp2_float)); } nfound++; } - else if (per > options->percent) { - if (print_data(options)) { + else if (per > opts->percent) { + if (print_data(opts)) { print_pos(ph, 1, hyper_start + i, acc, pos, rank, dims, obj1, obj2); parallel_print(SPACES); parallel_print(F_FORMAT_P, (double) temp1_float, (double) temp2_float, @@ -2378,7 +2419,7 @@ static hsize_t diff_float(unsigned char *mem1, unsigned char *mem2, } /* only one is NaN, assume difference */ else if ((isnan1 && !isnan2) || (!isnan1 && isnan2)) { - if (print_data(options)) { + if (print_data(opts)) { print_pos(ph, 0, hyper_start + i, acc, pos, rank, dims, obj1, obj2); parallel_print(SPACES); parallel_print(F_FORMAT, (double) temp1_float, (double) temp2_float, (double) ABS(temp1_float - temp2_float)); @@ -2388,7 +2429,7 @@ static hsize_t diff_float(unsigned char *mem1, unsigned char *mem2, } mem1 += sizeof(float); mem2 += sizeof(float); - if (options->n && nfound >= options->count) + if (opts->n && nfound >= opts->count) return nfound; } /* i */ } @@ -2396,7 +2437,7 @@ static hsize_t diff_float(unsigned char *mem1, unsigned char *mem2, * -d and -p *------------------------------------------------------------------------- */ - else if (options->d && options->p) { + else if (opts->d && opts->p) { for (i = 0; i < nelmts; i++) { HDmemcpy(&temp1_float, mem1, sizeof(float)); HDmemcpy(&temp2_float, mem2, sizeof(float)); @@ -2405,7 +2446,7 @@ static hsize_t diff_float(unsigned char *mem1, unsigned char *mem2, * detect NaNs *------------------------------------------------------------------------- */ - if (options->do_nans) { + if (opts->do_nans) { isnan1 = my_isnan(FLT_FLOAT, &temp1_float); isnan2 = my_isnan(FLT_FLOAT, &temp2_float); } @@ -2415,15 +2456,15 @@ static hsize_t diff_float(unsigned char *mem1, unsigned char *mem2, PER(temp1_float, temp2_float); if (not_comparable && !both_zero) { - if (print_data(options)) { + if (print_data(opts)) { print_pos(ph, 1, hyper_start + i, acc, pos, rank, dims, obj1, obj2); parallel_print(SPACES); parallel_print(F_FORMAT_P_NOTCOMP, (double) temp1_float, (double) temp2_float, (double) ABS(temp1_float - temp2_float)); } nfound++; } - else if (per > options->percent && (double) ABS(temp1_float - temp2_float) > options->delta) { - if (print_data(options)) { + else if (per > opts->percent && (double) ABS(temp1_float - temp2_float) > opts->delta) { + if (print_data(opts)) { print_pos(ph, 1, hyper_start + i, acc, pos, rank, dims, obj1, obj2); parallel_print(SPACES); parallel_print(F_FORMAT_P, (double) temp1_float, (double) temp2_float, @@ -2435,7 +2476,7 @@ static hsize_t diff_float(unsigned char *mem1, unsigned char *mem2, } /* only one is NaN, assume difference */ else if ((isnan1 && !isnan2) || (!isnan1 && isnan2)) { - if (print_data(options)) { + if (print_data(opts)) { print_pos(ph, 0, hyper_start + i, acc, pos, rank, dims, obj1, obj2); parallel_print(SPACES); parallel_print(F_FORMAT, (double) temp1_float, (double) temp2_float, (double) ABS(temp1_float - temp2_float)); @@ -2445,7 +2486,7 @@ static hsize_t diff_float(unsigned char *mem1, unsigned char *mem2, } mem1 += sizeof(float); mem2 += sizeof(float); - if (options->n && nfound >= options->count) + if (opts->n && nfound >= opts->count) return nfound; } /* i */ } @@ -2459,8 +2500,8 @@ static hsize_t diff_float(unsigned char *mem1, unsigned char *mem2, HDmemcpy(&temp1_float, mem1, sizeof(float)); HDmemcpy(&temp2_float, mem2, sizeof(float)); - if (equal_float(temp1_float, temp2_float, options) == FALSE) { - if (print_data(options)) { + if (equal_float(temp1_float, temp2_float, opts) == FALSE) { + if (print_data(opts)) { print_pos(ph, 0, hyper_start + i, acc, pos, rank, dims, obj1, obj2); parallel_print(SPACES); parallel_print(F_FORMAT, (double) temp1_float, (double) temp2_float, (double) ABS(temp1_float - temp2_float)); @@ -2470,7 +2511,7 @@ static hsize_t diff_float(unsigned char *mem1, unsigned char *mem2, mem1 += sizeof(float); mem2 += sizeof(float); - if (options->n && nfound >= options->count) + if (opts->n && nfound >= opts->count) return nfound; } /* nelmts */ } @@ -2482,23 +2523,22 @@ static hsize_t diff_float(unsigned char *mem1, unsigned char *mem2, /*------------------------------------------------------------------------- * Function: diff_double * - * Purpose: diff a H5T_NATIVE_DOUBLE type - * - * Return: number of differences found + * Purpose: diff a H5T_NATIVE_DOUBLE type * + * Return: number of differences found *------------------------------------------------------------------------- */ static hsize_t diff_double(unsigned char *mem1, unsigned char *mem2, hsize_t nelmts, hsize_t hyper_start, int rank, hsize_t *dims, - hsize_t *acc, hsize_t *pos, diff_opt_t *options, const char *obj1, + hsize_t *acc, hsize_t *pos, diff_opt_t *opts, const char *obj1, const char *obj2, int *ph) { hsize_t nfound = 0; /* number of differences found */ - double temp1_double; - double temp2_double; + double temp1_double; + double temp2_double; hsize_t i; - double per; + double per; hbool_t both_zero; hbool_t isnan1 = FALSE; hbool_t isnan2 = FALSE; @@ -2509,7 +2549,7 @@ static hsize_t diff_double(unsigned char *mem1, unsigned char *mem2, *------------------------------------------------------------------------- */ - if (options->d && !options->p) { + if (opts->d && !opts->p) { for (i = 0; i < nelmts; i++) { HDmemcpy(&temp1_double, mem1, sizeof(double)); HDmemcpy(&temp2_double, mem2, sizeof(double)); @@ -2518,15 +2558,15 @@ static hsize_t diff_double(unsigned char *mem1, unsigned char *mem2, * detect NaNs *------------------------------------------------------------------------- */ - if (options->do_nans) { + if (opts->do_nans) { isnan1 = my_isnan(FLT_DOUBLE, &temp1_double); isnan2 = my_isnan(FLT_DOUBLE, &temp2_double); } /* both not NaN, do the comparison */ if (!isnan1 && !isnan2) { - if (ABS(temp1_double-temp2_double) > options->delta) { - if (print_data(options)) { + if (ABS(temp1_double-temp2_double) > opts->delta) { + if (print_data(opts)) { print_pos(ph, 0, hyper_start + i, acc, pos, rank, dims, obj1, obj2); parallel_print(SPACES); parallel_print(F_FORMAT, temp1_double, temp2_double, ABS(temp1_double - temp2_double)); @@ -2536,7 +2576,7 @@ static hsize_t diff_double(unsigned char *mem1, unsigned char *mem2, } /* only one is NaN, assume difference */ else if ((isnan1 && !isnan2) || (!isnan1 && isnan2)) { - if (print_data(options)) { + if (print_data(opts)) { print_pos(ph, 0, hyper_start + i, acc, pos, rank, dims, obj1, obj2); parallel_print(SPACES); parallel_print(F_FORMAT, temp1_double, temp2_double, ABS(temp1_double - temp2_double)); @@ -2546,7 +2586,7 @@ static hsize_t diff_double(unsigned char *mem1, unsigned char *mem2, } mem1 += sizeof(double); mem2 += sizeof(double); - if (options->n && nfound >= options->count) + if (opts->n && nfound >= opts->count) return nfound; } /* i */ } @@ -2555,7 +2595,7 @@ static hsize_t diff_double(unsigned char *mem1, unsigned char *mem2, * !-d and -p *------------------------------------------------------------------------- */ - else if (!options->d && options->p) { + else if (!opts->d && opts->p) { for (i = 0; i < nelmts; i++) { HDmemcpy(&temp1_double, mem1, sizeof(double)); HDmemcpy(&temp2_double, mem2, sizeof(double)); @@ -2564,7 +2604,7 @@ static hsize_t diff_double(unsigned char *mem1, unsigned char *mem2, * detect NaNs *------------------------------------------------------------------------- */ - if (options->do_nans) { + if (opts->do_nans) { isnan1 = my_isnan(FLT_DOUBLE, &temp1_double); isnan2 = my_isnan(FLT_DOUBLE, &temp2_double); } @@ -2573,15 +2613,15 @@ static hsize_t diff_double(unsigned char *mem1, unsigned char *mem2, PER(temp1_double, temp2_double); if (not_comparable && !both_zero) { - if (print_data(options)) { + if (print_data(opts)) { print_pos(ph, 1, hyper_start + i, acc, pos, rank, dims, obj1, obj2); parallel_print(SPACES); parallel_print(F_FORMAT_P_NOTCOMP, temp1_double, temp2_double, ABS(temp1_double - temp2_double)); } nfound++; } - else if (per > options->percent) { - if (print_data(options)) { + else if (per > opts->percent) { + if (print_data(opts)) { print_pos(ph, 1, hyper_start + i, acc, pos, rank, dims, obj1, obj2); parallel_print(SPACES); parallel_print(F_FORMAT_P, temp1_double, temp2_double, @@ -2592,7 +2632,7 @@ static hsize_t diff_double(unsigned char *mem1, unsigned char *mem2, } /* only one is NaN, assume difference */ else if ((isnan1 && !isnan2) || (!isnan1 && isnan2)) { - if (print_data(options)) { + if (print_data(opts)) { print_pos(ph, 0, hyper_start + i, acc, pos, rank, dims, obj1, obj2); parallel_print(SPACES); parallel_print(F_FORMAT, temp1_double, temp2_double, ABS(temp1_double - temp2_double)); @@ -2602,7 +2642,7 @@ static hsize_t diff_double(unsigned char *mem1, unsigned char *mem2, } mem1 += sizeof(double); mem2 += sizeof(double); - if (options->n && nfound >= options->count) + if (opts->n && nfound >= opts->count) return nfound; } /* i */ } @@ -2610,7 +2650,7 @@ static hsize_t diff_double(unsigned char *mem1, unsigned char *mem2, * -d and -p *------------------------------------------------------------------------- */ - else if (options->d && options->p) { + else if (opts->d && opts->p) { for (i = 0; i < nelmts; i++) { HDmemcpy(&temp1_double, mem1, sizeof(double)); @@ -2620,7 +2660,7 @@ static hsize_t diff_double(unsigned char *mem1, unsigned char *mem2, * detect NaNs *------------------------------------------------------------------------- */ - if (options->do_nans) { + if (opts->do_nans) { isnan1 = my_isnan(FLT_DOUBLE, &temp1_double); isnan2 = my_isnan(FLT_DOUBLE, &temp2_double); } @@ -2630,15 +2670,15 @@ static hsize_t diff_double(unsigned char *mem1, unsigned char *mem2, PER(temp1_double, temp2_double); if (not_comparable && !both_zero) { - if (print_data(options)) { + if (print_data(opts)) { print_pos(ph, 1, hyper_start + i, acc, pos, rank, dims, obj1, obj2); parallel_print(SPACES); parallel_print(F_FORMAT_P_NOTCOMP, temp1_double, temp2_double, ABS(temp1_double - temp2_double)); } nfound++; } - else if (per > options->percent && ABS(temp1_double-temp2_double) > options->delta) { - if (print_data(options)) { + else if (per > opts->percent && ABS(temp1_double-temp2_double) > opts->delta) { + if (print_data(opts)) { print_pos(ph, 1, hyper_start + i, acc, pos, rank, dims, obj1, obj2); parallel_print(SPACES); parallel_print(F_FORMAT_P, temp1_double, temp2_double, @@ -2649,7 +2689,7 @@ static hsize_t diff_double(unsigned char *mem1, unsigned char *mem2, } /* only one is NaN, assume difference */ else if ((isnan1 && !isnan2) || (!isnan1 && isnan2)) { - if (print_data(options)) { + if (print_data(opts)) { print_pos(ph, 0, hyper_start + i, acc, pos, rank, dims, obj1, obj2); parallel_print(SPACES); parallel_print(F_FORMAT, temp1_double, temp2_double, ABS(temp1_double - temp2_double)); @@ -2658,7 +2698,7 @@ static hsize_t diff_double(unsigned char *mem1, unsigned char *mem2, } mem1 += sizeof(double); mem2 += sizeof(double); - if (options->n && nfound >= options->count) + if (opts->n && nfound >= opts->count) return nfound; } /* i */ } @@ -2671,8 +2711,8 @@ static hsize_t diff_double(unsigned char *mem1, unsigned char *mem2, HDmemcpy(&temp1_double, mem1, sizeof(double)); HDmemcpy(&temp2_double, mem2, sizeof(double)); - if (equal_double(temp1_double, temp2_double, options) == FALSE) { - if (print_data(options)) { + if (equal_double(temp1_double, temp2_double, opts) == FALSE) { + if (print_data(opts)) { print_pos(ph, 0, hyper_start + i, acc, pos, rank, dims, obj1, obj2); parallel_print(SPACES); parallel_print(F_FORMAT, temp1_double, temp2_double, ABS(temp1_double - temp2_double)); @@ -2682,7 +2722,7 @@ static hsize_t diff_double(unsigned char *mem1, unsigned char *mem2, mem1 += sizeof(double); mem2 += sizeof(double); - if (options->n && nfound >= options->count) + if (opts->n && nfound >= opts->count) return nfound; } /* nelmts */ } @@ -2694,10 +2734,9 @@ static hsize_t diff_double(unsigned char *mem1, unsigned char *mem2, /*------------------------------------------------------------------------- * Function: diff_ldouble * - * Purpose: diff a H5T_NATIVE_LDOUBLE type - * - * Return: number of differences found + * Purpose: diff a H5T_NATIVE_LDOUBLE type * + * Return: number of differences found *------------------------------------------------------------------------- */ #if H5_SIZEOF_LONG_DOUBLE !=0 @@ -2710,13 +2749,13 @@ static hsize_t diff_ldouble(unsigned char *mem1, hsize_t *dims, hsize_t *acc, hsize_t *pos, - diff_opt_t *options, + diff_opt_t *opts, const char *obj1, const char *obj2, int *ph) { - hsize_t nfound=0; /* number of differences found */ + hsize_t nfound = 0; /* number of differences found */ long double temp1_double; long double temp2_double; hsize_t i; @@ -2732,7 +2771,7 @@ static hsize_t diff_ldouble(unsigned char *mem1, *------------------------------------------------------------------------- */ - if (options->d && !options->p) { + if (opts->d && !opts->p) { for ( i = 0; i < nelmts; i++) { HDmemcpy(&temp1_double, mem1, sizeof(long double)); HDmemcpy(&temp2_double, mem2, sizeof(long double)); @@ -2741,15 +2780,15 @@ static hsize_t diff_ldouble(unsigned char *mem1, * detect NaNs *------------------------------------------------------------------------- */ - if (options->do_nans) { + if (opts->do_nans) { isnan1 = my_isnan(FLT_LDOUBLE,&temp1_double); isnan2 = my_isnan(FLT_LDOUBLE,&temp2_double); } /* both not NaN, do the comparison */ if (!isnan1 && !isnan2) { - if (ABS(temp1_double-temp2_double) > options->delta) { - if (print_data(options)) { + if (ABS(temp1_double-temp2_double) > opts->delta) { + if (print_data(opts)) { print_pos(ph, 0, hyper_start + i, acc, pos, rank, dims, obj1, obj2); parallel_print(SPACES); parallel_print(F_FORMAT, temp1_double, temp2_double, ABS(temp1_double - temp2_double)); @@ -2759,7 +2798,7 @@ static hsize_t diff_ldouble(unsigned char *mem1, } /* only one is NaN, assume difference */ else if ((isnan1 && !isnan2) || (!isnan1 && isnan2)) { - if (print_data(options)) { + if (print_data(opts)) { print_pos(ph, 0, hyper_start + i, acc, pos, rank, dims, obj1, obj2); parallel_print(SPACES); parallel_print(F_FORMAT, temp1_double, temp2_double, ABS(temp1_double - temp2_double)); @@ -2769,7 +2808,7 @@ static hsize_t diff_ldouble(unsigned char *mem1, } mem1 += sizeof(long double); mem2 += sizeof(long double); - if (options->n && nfound >= options->count) + if (opts->n && nfound >= opts->count) return nfound; } /* i */ } @@ -2778,7 +2817,7 @@ static hsize_t diff_ldouble(unsigned char *mem1, * !-d and -p *------------------------------------------------------------------------- */ - else if (!options->d && options->p) { + else if (!opts->d && opts->p) { for (i = 0; i < nelmts; i++) { HDmemcpy(&temp1_double, mem1, sizeof(long double)); HDmemcpy(&temp2_double, mem2, sizeof(long double)); @@ -2787,7 +2826,7 @@ static hsize_t diff_ldouble(unsigned char *mem1, * detect NaNs *------------------------------------------------------------------------- */ - if (options->do_nans) { + if (opts->do_nans) { isnan1 = my_isnan(FLT_LDOUBLE, &temp1_double); isnan2 = my_isnan(FLT_LDOUBLE, &temp2_double); } @@ -2796,15 +2835,15 @@ static hsize_t diff_ldouble(unsigned char *mem1, PER(temp1_double, temp2_double); if (not_comparable && !both_zero) { - if (print_data(options)) { + if (print_data(opts)) { print_pos(ph, 1, hyper_start + i, acc, pos, rank, dims, obj1, obj2); parallel_print(SPACES); parallel_print(F_FORMAT_P_NOTCOMP, temp1_double, temp2_double, ABS(temp1_double - temp2_double)); } nfound++; } - else if (per > options->percent) { - if (print_data(options)) { + else if (per > opts->percent) { + if (print_data(opts)) { print_pos(ph, 1, hyper_start + i, acc, pos, rank, dims, obj1, obj2); parallel_print(SPACES); parallel_print(F_FORMAT_P, temp1_double, temp2_double, @@ -2815,7 +2854,7 @@ static hsize_t diff_ldouble(unsigned char *mem1, } /* only one is NaN, assume difference */ else if ((isnan1 && !isnan2) || (!isnan1 && isnan2)) { - if (print_data(options)) { + if (print_data(opts)) { print_pos(ph, 0, hyper_start+i, acc, pos, rank, dims, obj1, obj2); parallel_print(SPACES); parallel_print(F_FORMAT, temp1_double, temp2_double, ABS(temp1_double - temp2_double)); @@ -2824,7 +2863,7 @@ static hsize_t diff_ldouble(unsigned char *mem1, } mem1 += sizeof(long double); mem2 += sizeof(long double); - if (options->n && nfound >= options->count) + if (opts->n && nfound >= opts->count) return nfound; } /* i */ } @@ -2832,7 +2871,7 @@ static hsize_t diff_ldouble(unsigned char *mem1, * -d and -p *------------------------------------------------------------------------- */ - else if (options->d && options->p) { + else if (opts->d && opts->p) { for (i = 0; i < nelmts; i++) { HDmemcpy(&temp1_double, mem1, sizeof(long double)); HDmemcpy(&temp2_double, mem2, sizeof(long double)); @@ -2841,7 +2880,7 @@ static hsize_t diff_ldouble(unsigned char *mem1, * detect NaNs *------------------------------------------------------------------------- */ - if (options->do_nans) { + if (opts->do_nans) { isnan1 = my_isnan(FLT_LDOUBLE, &temp1_double); isnan2 = my_isnan(FLT_LDOUBLE, &temp2_double); } @@ -2851,15 +2890,15 @@ static hsize_t diff_ldouble(unsigned char *mem1, PER(temp1_double, temp2_double); if (not_comparable && !both_zero) { - if (print_data(options)) { + if (print_data(opts)) { print_pos(ph, 1, hyper_start + i, acc, pos, rank, dims, obj1, obj2); parallel_print(SPACES); parallel_print(F_FORMAT_P_NOTCOMP, temp1_double, temp2_double, ABS(temp1_double - temp2_double)); } nfound++; } - else if (per > options->percent && ABS(temp1_double - temp2_double) > options->delta) { - if (print_data(options)) { + else if (per > opts->percent && ABS(temp1_double - temp2_double) > opts->delta) { + if (print_data(opts)) { print_pos(ph, 1, hyper_start + i, acc, pos, rank, dims, obj1, obj2); parallel_print(SPACES); parallel_print(F_FORMAT_P, temp1_double, temp2_double, ABS(temp1_double - temp2_double), ABS(1-temp2_double / temp1_double)); @@ -2869,7 +2908,7 @@ static hsize_t diff_ldouble(unsigned char *mem1, } /* only one is NaN, assume difference */ else if ((isnan1 && !isnan2) || (!isnan1 && isnan2)) { - if (print_data(options)) { + if (print_data(opts)) { print_pos(ph, 0, hyper_start + i, acc, pos, rank, dims, obj1, obj2); parallel_print(SPACES); parallel_print(F_FORMAT, temp1_double, temp2_double, ABS(temp1_double - temp2_double)); @@ -2878,7 +2917,7 @@ static hsize_t diff_ldouble(unsigned char *mem1, } mem1 += sizeof(long double); mem2 += sizeof(long double); - if (options->n && nfound >= options->count) + if (opts->n && nfound >= opts->count) return nfound; } /* i */ } @@ -2891,8 +2930,8 @@ static hsize_t diff_ldouble(unsigned char *mem1, HDmemcpy(&temp1_double, mem1, sizeof(long double)); HDmemcpy(&temp2_double, mem2, sizeof(long double)); - if (equal_ldouble(temp1_double, temp2_double, options) == FALSE) { - if (print_data(options)) { + if (equal_ldouble(temp1_double, temp2_double, opts) == FALSE) { + if (print_data(opts)) { print_pos(ph, 0, hyper_start + i, acc, pos, rank, dims, obj1, obj2); parallel_print(SPACES); parallel_print(F_FORMAT, temp1_double, temp2_double, ABS(temp1_double - temp2_double)); @@ -2901,7 +2940,7 @@ static hsize_t diff_ldouble(unsigned char *mem1, } mem1 += sizeof(long double); mem2 += sizeof(long double); - if (options->n && nfound >= options->count) + if (opts->n && nfound >= opts->count) return nfound; } /* nelmts */ } @@ -2914,34 +2953,33 @@ static hsize_t diff_ldouble(unsigned char *mem1, /*------------------------------------------------------------------------- * Function: diff_schar * - * Purpose: diff a H5T_NATIVE_SCHAR type - * - * Return: number of differences found + * Purpose: diff a H5T_NATIVE_SCHAR type * + * Return: number of differences found *------------------------------------------------------------------------- */ static hsize_t diff_schar(unsigned char *mem1, unsigned char *mem2, hsize_t nelmts, hsize_t hyper_start, int rank, hsize_t *dims, - hsize_t *acc, hsize_t *pos, diff_opt_t *options, const char *obj1, + hsize_t *acc, hsize_t *pos, diff_opt_t *opts, const char *obj1, const char *obj2, int *ph) { hsize_t nfound = 0; /* number of differences found */ - char temp1_char; - char temp2_char; + char temp1_char; + char temp2_char; hsize_t i; - double per; + double per; hbool_t both_zero; h5difftrace("diff_schar start\n"); /* -d and !-p */ - if (options->d && !options->p) { + if (opts->d && !opts->p) { for (i = 0; i < nelmts; i++) { HDmemcpy(&temp1_char, mem1, sizeof(char)); HDmemcpy(&temp2_char, mem2, sizeof(char)); - if (ABS(temp1_char-temp2_char) > options->delta) { - if (print_data(options)) { + if (ABS(temp1_char-temp2_char) > opts->delta) { + if (print_data(opts)) { print_pos(ph, 0, hyper_start + i, acc, pos, rank, dims, obj1, obj2); parallel_print(SPACES); parallel_print(I_FORMAT, temp1_char, temp2_char, ABS(temp1_char - temp2_char)); @@ -2950,12 +2988,12 @@ static hsize_t diff_schar(unsigned char *mem1, unsigned char *mem2, } mem1 += sizeof(char); mem2 += sizeof(char); - if (options->n && nfound >= options->count) + if (opts->n && nfound >= opts->count) return nfound; } } /* !-d and -p */ - else if (!options->d && options->p) { + else if (!opts->d && opts->p) { for (i = 0; i < nelmts; i++) { HDmemcpy(&temp1_char, mem1, sizeof(char)); HDmemcpy(&temp2_char, mem2, sizeof(char)); @@ -2963,15 +3001,15 @@ static hsize_t diff_schar(unsigned char *mem1, unsigned char *mem2, PER(temp1_char, temp2_char); if (not_comparable && !both_zero) { - if (print_data(options)) { + if (print_data(opts)) { print_pos(ph, 1, hyper_start + i, acc, pos, rank, dims, obj1, obj2); parallel_print(SPACES); parallel_print(I_FORMAT_P_NOTCOMP, temp1_char, temp2_char, ABS(temp1_char - temp2_char)); } nfound++; } - else if (per > options->percent) { - if (print_data(options)) { + else if (per > opts->percent) { + if (print_data(opts)) { print_pos(ph, 1, hyper_start + i, acc, pos, rank, dims, obj1, obj2); parallel_print(SPACES); parallel_print(I_FORMAT_P, temp1_char, temp2_char, ABS(temp1_char - temp2_char), per); @@ -2980,12 +3018,12 @@ static hsize_t diff_schar(unsigned char *mem1, unsigned char *mem2, } mem1 += sizeof(char); mem2 += sizeof(char); - if (options->n && nfound >= options->count) + if (opts->n && nfound >= opts->count) return nfound; } } /* -d and -p */ - else if (options->d && options->p) { + else if (opts->d && opts->p) { for (i = 0; i < nelmts; i++) { HDmemcpy(&temp1_char, mem1, sizeof(char)); HDmemcpy(&temp2_char, mem2, sizeof(char)); @@ -2993,15 +3031,15 @@ static hsize_t diff_schar(unsigned char *mem1, unsigned char *mem2, PER(temp1_char, temp2_char); if (not_comparable && !both_zero) { - if (print_data(options)) { + if (print_data(opts)) { print_pos(ph, 1, hyper_start + i, acc, pos, rank, dims, obj1, obj2); parallel_print(SPACES); parallel_print(I_FORMAT_P_NOTCOMP, temp1_char, temp2_char, ABS(temp1_char - temp2_char)); } nfound++; } - else if (per > options->percent && ABS(temp1_char-temp2_char) > options->delta) { - if (print_data(options)) { + else if (per > opts->percent && ABS(temp1_char-temp2_char) > opts->delta) { + if (print_data(opts)) { print_pos(ph, 1, hyper_start + i, acc, pos, rank, dims, obj1, obj2); parallel_print(SPACES); parallel_print(I_FORMAT_P, temp1_char, temp2_char, ABS(temp1_char - temp2_char), per); @@ -3010,7 +3048,7 @@ static hsize_t diff_schar(unsigned char *mem1, unsigned char *mem2, } mem1 += sizeof(char); mem2 += sizeof(char); - if (options->n && nfound >= options->count) + if (opts->n && nfound >= opts->count) return nfound; } } @@ -3020,7 +3058,7 @@ static hsize_t diff_schar(unsigned char *mem1, unsigned char *mem2, HDmemcpy(&temp2_char, mem2, sizeof(char)); if (temp1_char != temp2_char) { - if (print_data(options)) { + if (print_data(opts)) { print_pos(ph, 0, hyper_start + i, acc, pos, rank, dims, obj1, obj2); parallel_print(SPACES); parallel_print(I_FORMAT, temp1_char, temp2_char, ABS(temp1_char - temp2_char)); @@ -3030,7 +3068,7 @@ static hsize_t diff_schar(unsigned char *mem1, unsigned char *mem2, mem1 += sizeof(char); mem2 += sizeof(char); - if (options->n && nfound >= options->count) + if (opts->n && nfound >= opts->count) return nfound; } /* nelmts */ } @@ -3042,33 +3080,32 @@ static hsize_t diff_schar(unsigned char *mem1, unsigned char *mem2, /*------------------------------------------------------------------------- * Function: diff_uchar * - * Purpose: diff a H5T_NATIVE_UCHAR type - * - * Return: number of differences found + * Purpose: diff a H5T_NATIVE_UCHAR type * + * Return: number of differences found *------------------------------------------------------------------------- */ static hsize_t diff_uchar(unsigned char *mem1, unsigned char *mem2, hsize_t nelmts, hsize_t hyper_start, int rank, hsize_t *dims, - hsize_t *acc, hsize_t *pos, diff_opt_t *options, const char *obj1, + hsize_t *acc, hsize_t *pos, diff_opt_t *opts, const char *obj1, const char *obj2, int *ph) { - hsize_t nfound = 0; /* number of differences found */ + hsize_t nfound = 0; /* number of differences found */ unsigned char temp1_uchar; unsigned char temp2_uchar; - hsize_t i; - double per; - hbool_t both_zero; + hsize_t i; + double per; + hbool_t both_zero; h5difftrace("diff_uchar start\n"); /* -d and !-p */ - if (options->d && !options->p) { + if (opts->d && !opts->p) { for (i = 0; i < nelmts; i++) { HDmemcpy(&temp1_uchar, mem1, sizeof(unsigned char)); HDmemcpy(&temp2_uchar, mem2, sizeof(unsigned char)); - if (PDIFF(temp1_uchar,temp2_uchar) > options->delta) { - if (print_data(options)) { + if (PDIFF(temp1_uchar,temp2_uchar) > opts->delta) { + if (print_data(opts)) { print_pos(ph, 0, hyper_start + i, acc, pos, rank, dims, obj1, obj2); parallel_print(SPACES); parallel_print(I_FORMAT, temp1_uchar, temp2_uchar, PDIFF(temp1_uchar, temp2_uchar)); @@ -3077,12 +3114,12 @@ static hsize_t diff_uchar(unsigned char *mem1, unsigned char *mem2, } mem1 += sizeof(unsigned char); mem2 += sizeof(unsigned char); - if (options->n && nfound >= options->count) + if (opts->n && nfound >= opts->count) return nfound; } } /* !-d and -p */ - else if (!options->d && options->p) { + else if (!opts->d && opts->p) { for (i = 0; i < nelmts; i++) { HDmemcpy(&temp1_uchar, mem1, sizeof(unsigned char)); HDmemcpy(&temp2_uchar, mem2, sizeof(unsigned char)); @@ -3090,15 +3127,15 @@ static hsize_t diff_uchar(unsigned char *mem1, unsigned char *mem2, PER_UNSIGN(signed char, temp1_uchar, temp2_uchar); if (not_comparable && !both_zero) { - if (print_data(options)) { + if (print_data(opts)) { print_pos(ph, 1, hyper_start + i, acc, pos, rank, dims, obj1, obj2); parallel_print(SPACES); parallel_print(I_FORMAT_P_NOTCOMP, temp1_uchar, temp2_uchar, PDIFF(temp1_uchar, temp2_uchar)); } nfound++; } - else if (per > options->percent) { - if (print_data(options)) { + else if (per > opts->percent) { + if (print_data(opts)) { print_pos(ph, 1, hyper_start + i, acc, pos, rank, dims, obj1, obj2); parallel_print(SPACES); parallel_print(I_FORMAT_P, temp1_uchar, temp2_uchar, PDIFF(temp1_uchar, temp2_uchar), per); @@ -3107,12 +3144,12 @@ static hsize_t diff_uchar(unsigned char *mem1, unsigned char *mem2, } mem1 += sizeof(unsigned char); mem2 += sizeof(unsigned char); - if (options->n && nfound >= options->count) + if (opts->n && nfound >= opts->count) return nfound; } } /* -d and -p */ - else if (options->d && options->p) { + else if (opts->d && opts->p) { for (i = 0; i < nelmts; i++) { HDmemcpy(&temp1_uchar, mem1, sizeof(unsigned char)); HDmemcpy(&temp2_uchar, mem2, sizeof(unsigned char)); @@ -3120,15 +3157,15 @@ static hsize_t diff_uchar(unsigned char *mem1, unsigned char *mem2, PER_UNSIGN(signed char, temp1_uchar, temp2_uchar); if (not_comparable && !both_zero) { - if (print_data(options)) { + if (print_data(opts)) { print_pos(ph, 1, hyper_start + i, acc, pos, rank, dims, obj1, obj2); parallel_print(SPACES); parallel_print(I_FORMAT_P_NOTCOMP, temp1_uchar, temp2_uchar, PDIFF(temp1_uchar, temp2_uchar)); } nfound++; } - else if (per > options->percent && PDIFF(temp1_uchar,temp2_uchar) > options->delta) { - if (print_data(options)) { + else if (per > opts->percent && PDIFF(temp1_uchar,temp2_uchar) > opts->delta) { + if (print_data(opts)) { print_pos(ph, 1, hyper_start + i, acc, pos, rank, dims, obj1, obj2); parallel_print(SPACES); parallel_print(I_FORMAT_P, temp1_uchar, temp2_uchar, PDIFF(temp1_uchar, temp2_uchar), per); @@ -3137,7 +3174,7 @@ static hsize_t diff_uchar(unsigned char *mem1, unsigned char *mem2, } mem1 += sizeof(unsigned char); mem2 += sizeof(unsigned char); - if (options->n && nfound >= options->count) + if (opts->n && nfound >= opts->count) return nfound; } } @@ -3147,7 +3184,7 @@ static hsize_t diff_uchar(unsigned char *mem1, unsigned char *mem2, HDmemcpy(&temp2_uchar, mem2, sizeof(unsigned char)); if (temp1_uchar != temp2_uchar) { - if (print_data(options)) { + if (print_data(opts)) { print_pos(ph, 0, hyper_start + i, acc, pos, rank, dims, obj1, obj2); parallel_print(SPACES); parallel_print(I_FORMAT, temp1_uchar, temp2_uchar, PDIFF(temp1_uchar, temp2_uchar)); @@ -3157,7 +3194,7 @@ static hsize_t diff_uchar(unsigned char *mem1, unsigned char *mem2, mem1 += sizeof(unsigned char); mem2 += sizeof(unsigned char); - if (options->n && nfound >= options->count) + if (opts->n && nfound >= opts->count) return nfound; } /* nelmts */ } @@ -3169,33 +3206,32 @@ static hsize_t diff_uchar(unsigned char *mem1, unsigned char *mem2, /*------------------------------------------------------------------------- * Function: diff_short * - * Purpose: diff a H5T_NATIVE_SHORT type - * - * Return: number of differences found + * Purpose: diff a H5T_NATIVE_SHORT type * + * Return: number of differences found *------------------------------------------------------------------------- */ static hsize_t diff_short(unsigned char *mem1, unsigned char *mem2, hsize_t nelmts, hsize_t hyper_start, int rank, hsize_t *dims, - hsize_t *acc, hsize_t *pos, diff_opt_t *options, const char *obj1, + hsize_t *acc, hsize_t *pos, diff_opt_t *opts, const char *obj1, const char *obj2, int *ph) { hsize_t nfound = 0; /* number of differences found */ - short temp1_short; - short temp2_short; + short temp1_short; + short temp2_short; hsize_t i; - double per; + double per; hbool_t both_zero; h5difftrace("diff_short start\n"); /* -d and !-p */ - if (options->d && !options->p) { + if (opts->d && !opts->p) { for (i = 0; i < nelmts; i++) { HDmemcpy(&temp1_short, mem1, sizeof(short)); HDmemcpy(&temp2_short, mem2, sizeof(short)); - if (ABS(temp1_short-temp2_short) > options->delta) { - if (print_data(options)) { + if (ABS(temp1_short-temp2_short) > opts->delta) { + if (print_data(opts)) { print_pos(ph, 0, hyper_start + i, acc, pos, rank, dims, obj1, obj2); parallel_print(SPACES); parallel_print(I_FORMAT, temp1_short, temp2_short, ABS(temp1_short - temp2_short)); @@ -3204,12 +3240,12 @@ static hsize_t diff_short(unsigned char *mem1, unsigned char *mem2, } mem1 += sizeof(short); mem2 += sizeof(short); - if (options->n && nfound >= options->count) + if (opts->n && nfound >= opts->count) return nfound; } } /* !-d and -p */ - else if (!options->d && options->p) { + else if (!opts->d && opts->p) { for (i = 0; i < nelmts; i++) { HDmemcpy(&temp1_short, mem1, sizeof(short)); HDmemcpy(&temp2_short, mem2, sizeof(short)); @@ -3217,15 +3253,15 @@ static hsize_t diff_short(unsigned char *mem1, unsigned char *mem2, PER(temp1_short, temp2_short); if (not_comparable && !both_zero) { - if (print_data(options)) { + if (print_data(opts)) { print_pos(ph, 1, hyper_start + i, acc, pos, rank, dims, obj1, obj2); parallel_print(SPACES); parallel_print(I_FORMAT_P_NOTCOMP, temp1_short, temp2_short, ABS(temp1_short - temp2_short)); } nfound++; } - else if (per > options->percent) { - if (print_data(options)) { + else if (per > opts->percent) { + if (print_data(opts)) { print_pos(ph, 1, hyper_start + i, acc, pos, rank, dims, obj1, obj2); parallel_print(SPACES); parallel_print(I_FORMAT_P, temp1_short, temp2_short, ABS(temp1_short - temp2_short), per); @@ -3234,12 +3270,12 @@ static hsize_t diff_short(unsigned char *mem1, unsigned char *mem2, } mem1 += sizeof(short); mem2 += sizeof(short); - if (options->n && nfound >= options->count) + if (opts->n && nfound >= opts->count) return nfound; } } /* -d and -p */ - else if (options->d && options->p) { + else if (opts->d && opts->p) { for (i = 0; i < nelmts; i++) { HDmemcpy(&temp1_short, mem1, sizeof(short)); HDmemcpy(&temp2_short, mem2, sizeof(short)); @@ -3247,15 +3283,15 @@ static hsize_t diff_short(unsigned char *mem1, unsigned char *mem2, PER(temp1_short, temp2_short); if (not_comparable && !both_zero) { - if (print_data(options)) { + if (print_data(opts)) { print_pos(ph, 1, hyper_start + i, acc, pos, rank, dims, obj1, obj2); parallel_print(SPACES); parallel_print(I_FORMAT_P_NOTCOMP, temp1_short, temp2_short, ABS(temp1_short - temp2_short)); } nfound++; } - else if (per > options->percent && ABS(temp1_short-temp2_short) > options->delta) { - if (print_data(options)) { + else if (per > opts->percent && ABS(temp1_short-temp2_short) > opts->delta) { + if (print_data(opts)) { print_pos(ph, 1, hyper_start + i, acc, pos, rank, dims, obj1, obj2); parallel_print(SPACES); parallel_print(I_FORMAT_P, temp1_short, temp2_short, ABS(temp1_short - temp2_short), per); @@ -3264,7 +3300,7 @@ static hsize_t diff_short(unsigned char *mem1, unsigned char *mem2, } mem1 += sizeof(short); mem2 += sizeof(short); - if (options->n && nfound >= options->count) + if (opts->n && nfound >= opts->count) return nfound; } } @@ -3274,7 +3310,7 @@ static hsize_t diff_short(unsigned char *mem1, unsigned char *mem2, HDmemcpy(&temp2_short, mem2, sizeof(short)); if (temp1_short != temp2_short) { - if (print_data(options)) { + if (print_data(opts)) { print_pos(ph, 0, hyper_start + i, acc, pos, rank, dims, obj1, obj2); parallel_print(SPACES); parallel_print(I_FORMAT, temp1_short, temp2_short, ABS(temp1_short - temp2_short)); @@ -3284,7 +3320,7 @@ static hsize_t diff_short(unsigned char *mem1, unsigned char *mem2, mem1 += sizeof(short); mem2 += sizeof(short); - if (options->n && nfound >= options->count) + if (opts->n && nfound >= opts->count) return nfound; } /* nelmts */ } @@ -3296,34 +3332,33 @@ static hsize_t diff_short(unsigned char *mem1, unsigned char *mem2, /*------------------------------------------------------------------------- * Function: diff_ushort * - * Purpose: diff a H5T_NATIVE_USHORT type - * - * Return: number of differences found + * Purpose: diff a H5T_NATIVE_USHORT type * + * Return: number of differences found *------------------------------------------------------------------------- */ static hsize_t diff_ushort(unsigned char *mem1, unsigned char *mem2, hsize_t nelmts, hsize_t hyper_start, int rank, hsize_t *dims, - hsize_t *acc, hsize_t *pos, diff_opt_t *options, const char *obj1, + hsize_t *acc, hsize_t *pos, diff_opt_t *opts, const char *obj1, const char *obj2, int *ph) { - hsize_t nfound = 0; /* number of differences found */ + hsize_t nfound = 0; /* number of differences found */ unsigned short temp1_ushort; unsigned short temp2_ushort; - hsize_t i; - double per; - hbool_t both_zero; + hsize_t i; + double per; + hbool_t both_zero; h5difftrace("diff_ushort start\n"); /* -d and !-p */ - if (options->d && !options->p) { + if (opts->d && !opts->p) { for (i = 0; i < nelmts; i++) { HDmemcpy(&temp1_ushort, mem1, sizeof(unsigned short)); HDmemcpy(&temp2_ushort, mem2, sizeof(unsigned short)); - if (PDIFF(temp1_ushort,temp2_ushort) > options->delta) { - if (print_data(options)) { + if (PDIFF(temp1_ushort,temp2_ushort) > opts->delta) { + if (print_data(opts)) { print_pos(ph, 0, hyper_start + i, acc, pos, rank, dims, obj1, obj2); parallel_print(SPACES); parallel_print(I_FORMAT, temp1_ushort, temp2_ushort, PDIFF(temp1_ushort, temp2_ushort)); @@ -3332,12 +3367,12 @@ static hsize_t diff_ushort(unsigned char *mem1, unsigned char *mem2, } mem1 += sizeof(unsigned short); mem2 += sizeof(unsigned short); - if (options->n && nfound >= options->count) + if (opts->n && nfound >= opts->count) return nfound; } } /* !-d and -p */ - else if (!options->d && options->p) { + else if (!opts->d && opts->p) { for (i = 0; i < nelmts; i++) { HDmemcpy(&temp1_ushort, mem1, sizeof(unsigned short)); HDmemcpy(&temp2_ushort, mem2, sizeof(unsigned short)); @@ -3345,15 +3380,15 @@ static hsize_t diff_ushort(unsigned char *mem1, unsigned char *mem2, PER_UNSIGN(signed short, temp1_ushort, temp2_ushort); if (not_comparable && !both_zero) { - if (print_data(options)) { + if (print_data(opts)) { print_pos(ph, 1, hyper_start + i, acc, pos, rank, dims, obj1, obj2); parallel_print(SPACES); parallel_print(I_FORMAT_P_NOTCOMP, temp1_ushort, temp2_ushort, PDIFF(temp1_ushort, temp2_ushort)); } nfound++; } - else if (per > options->percent) { - if (print_data(options)) { + else if (per > opts->percent) { + if (print_data(opts)) { print_pos(ph, 1, hyper_start + i, acc, pos, rank, dims, obj1, obj2); parallel_print(SPACES); parallel_print(I_FORMAT_P, temp1_ushort, temp2_ushort, PDIFF(temp1_ushort, temp2_ushort), per); @@ -3362,12 +3397,12 @@ static hsize_t diff_ushort(unsigned char *mem1, unsigned char *mem2, } mem1 += sizeof(unsigned short); mem2 += sizeof(unsigned short); - if (options->n && nfound >= options->count) + if (opts->n && nfound >= opts->count) return nfound; } } /* -d and -p */ - else if (options->d && options->p) { + else if (opts->d && opts->p) { for (i = 0; i < nelmts; i++) { HDmemcpy(&temp1_ushort, mem1, sizeof(unsigned short)); HDmemcpy(&temp2_ushort, mem2, sizeof(unsigned short)); @@ -3375,15 +3410,15 @@ static hsize_t diff_ushort(unsigned char *mem1, unsigned char *mem2, PER_UNSIGN(signed short, temp1_ushort, temp2_ushort); if (not_comparable && !both_zero) { - if (print_data(options)) { + if (print_data(opts)) { print_pos(ph, 1, hyper_start + i, acc, pos, rank, dims, obj1, obj2); parallel_print(SPACES); parallel_print(I_FORMAT_P_NOTCOMP, temp1_ushort, temp2_ushort, PDIFF(temp1_ushort, temp2_ushort)); } nfound++; } - else if (per > options->percent && PDIFF(temp1_ushort,temp2_ushort) > options->delta) { - if (print_data(options)) { + else if (per > opts->percent && PDIFF(temp1_ushort,temp2_ushort) > opts->delta) { + if (print_data(opts)) { print_pos(ph, 1, hyper_start + i, acc, pos, rank, dims, obj1, obj2); parallel_print(SPACES); parallel_print(I_FORMAT_P, temp1_ushort, temp2_ushort, PDIFF(temp1_ushort, temp2_ushort), per); @@ -3392,7 +3427,7 @@ static hsize_t diff_ushort(unsigned char *mem1, unsigned char *mem2, } mem1 += sizeof(unsigned short); mem2 += sizeof(unsigned short); - if (options->n && nfound >= options->count) + if (opts->n && nfound >= opts->count) return nfound; } } @@ -3402,7 +3437,7 @@ static hsize_t diff_ushort(unsigned char *mem1, unsigned char *mem2, HDmemcpy(&temp2_ushort, mem2, sizeof(unsigned short)); if (temp1_ushort != temp2_ushort) { - if (print_data(options)) { + if (print_data(opts)) { print_pos(ph, 0, hyper_start + i, acc, pos, rank, dims, obj1, obj2); parallel_print(SPACES); parallel_print(I_FORMAT, temp1_ushort, temp2_ushort, PDIFF(temp1_ushort, temp2_ushort)); @@ -3412,7 +3447,7 @@ static hsize_t diff_ushort(unsigned char *mem1, unsigned char *mem2, mem1 += sizeof(unsigned short); mem2 += sizeof(unsigned short); - if (options->n && nfound >= options->count) + if (opts->n && nfound >= opts->count) return nfound; } /* nelmts */ } @@ -3422,35 +3457,34 @@ static hsize_t diff_ushort(unsigned char *mem1, unsigned char *mem2, } /*------------------------------------------------------------------------- - * Function: diff_int - * - * Purpose: diff a H5T_NATIVE_INT type + * Function: diff_int * - * Return: number of differences found + * Purpose: diff a H5T_NATIVE_INT type * - *------------------------------------------------------------------------- + * Return: number of differences found + *------------------------------------------------------------------------- */ static hsize_t diff_int(unsigned char *mem1, unsigned char *mem2, hsize_t nelmts, hsize_t hyper_start, int rank, hsize_t *dims, - hsize_t *acc, hsize_t *pos, diff_opt_t *options, const char *obj1, + hsize_t *acc, hsize_t *pos, diff_opt_t *opts, const char *obj1, const char *obj2, int *ph) { hsize_t nfound = 0; /* number of differences found */ - int temp1_int; - int temp2_int; + int temp1_int; + int temp2_int; hsize_t i; - double per; + double per; hbool_t both_zero; h5difftrace("diff_int start\n"); /* -d and !-p */ - if (options->d && !options->p) { + if (opts->d && !opts->p) { for (i = 0; i < nelmts; i++) { HDmemcpy(&temp1_int, mem1, sizeof(int)); HDmemcpy(&temp2_int, mem2, sizeof(int)); - if (ABS(temp1_int-temp2_int) > options->delta) { - if (print_data(options)) { + if (ABS(temp1_int-temp2_int) > opts->delta) { + if (print_data(opts)) { print_pos(ph, 0, hyper_start + i, acc, pos, rank, dims, obj1, obj2); parallel_print(SPACES); parallel_print(I_FORMAT, temp1_int, temp2_int, ABS(temp1_int - temp2_int)); @@ -3459,12 +3493,12 @@ static hsize_t diff_int(unsigned char *mem1, unsigned char *mem2, } mem1 += sizeof(int); mem2 += sizeof(int); - if (options->n && nfound >= options->count) + if (opts->n && nfound >= opts->count) return nfound; } } /* !-d and -p */ - else if (!options->d && options->p) { + else if (!opts->d && opts->p) { for (i = 0; i < nelmts; i++) { HDmemcpy(&temp1_int, mem1, sizeof(int)); HDmemcpy(&temp2_int, mem2, sizeof(int)); @@ -3472,15 +3506,15 @@ static hsize_t diff_int(unsigned char *mem1, unsigned char *mem2, PER(temp1_int, temp2_int); if (not_comparable && !both_zero) { - if (print_data(options)) { + if (print_data(opts)) { print_pos(ph, 1, hyper_start + i, acc, pos, rank, dims, obj1, obj2); parallel_print(SPACES); parallel_print(I_FORMAT_P_NOTCOMP, temp1_int, temp2_int, ABS(temp1_int - temp2_int)); } nfound++; } - else if (per > options->percent) { - if (print_data(options)) { + else if (per > opts->percent) { + if (print_data(opts)) { print_pos(ph, 1, hyper_start + i, acc, pos, rank, dims, obj1, obj2); parallel_print(SPACES); parallel_print(I_FORMAT_P, temp1_int, temp2_int, ABS(temp1_int - temp2_int), per); @@ -3489,12 +3523,12 @@ static hsize_t diff_int(unsigned char *mem1, unsigned char *mem2, } mem1 += sizeof(int); mem2 += sizeof(int); - if (options->n && nfound >= options->count) + if (opts->n && nfound >= opts->count) return nfound; } } /* -d and -p */ - else if (options->d && options->p) { + else if (opts->d && opts->p) { for (i = 0; i < nelmts; i++) { HDmemcpy(&temp1_int, mem1, sizeof(int)); HDmemcpy(&temp2_int, mem2, sizeof(int)); @@ -3502,15 +3536,15 @@ static hsize_t diff_int(unsigned char *mem1, unsigned char *mem2, PER(temp1_int, temp2_int); if (not_comparable && !both_zero) { - if (print_data(options)) { + if (print_data(opts)) { print_pos(ph, 1, hyper_start + i, acc, pos, rank, dims, obj1, obj2); parallel_print(SPACES); parallel_print(I_FORMAT_P_NOTCOMP, temp1_int, temp2_int, ABS(temp1_int - temp2_int)); } nfound++; } - else if (per > options->percent && ABS(temp1_int-temp2_int) > options->delta) { - if (print_data(options)) { + else if (per > opts->percent && ABS(temp1_int-temp2_int) > opts->delta) { + if (print_data(opts)) { print_pos(ph, 1, hyper_start + i, acc, pos, rank, dims, obj1, obj2); parallel_print(SPACES); parallel_print(I_FORMAT_P, temp1_int, temp2_int, ABS(temp1_int - temp2_int), per); @@ -3519,7 +3553,7 @@ static hsize_t diff_int(unsigned char *mem1, unsigned char *mem2, } mem1 += sizeof(int); mem2 += sizeof(int); - if (options->n && nfound >= options->count) + if (opts->n && nfound >= opts->count) return nfound; } } @@ -3529,7 +3563,7 @@ static hsize_t diff_int(unsigned char *mem1, unsigned char *mem2, HDmemcpy(&temp2_int, mem2, sizeof(int)); if (temp1_int != temp2_int) { - if (print_data(options)) { + if (print_data(opts)) { print_pos(ph, 0, hyper_start + i, acc, pos, rank, dims, obj1, obj2); parallel_print(SPACES); parallel_print(I_FORMAT, temp1_int, temp2_int, ABS(temp1_int - temp2_int)); @@ -3539,7 +3573,7 @@ static hsize_t diff_int(unsigned char *mem1, unsigned char *mem2, mem1 += sizeof(int); mem2 += sizeof(int); - if (options->n && nfound >= options->count) + if (opts->n && nfound >= opts->count) return nfound; } /* nelmts */ @@ -3551,15 +3585,14 @@ static hsize_t diff_int(unsigned char *mem1, unsigned char *mem2, /*------------------------------------------------------------------------- * Function: diff_uint * - * Purpose: diff a H5T_NATIVE_UINT type - * - * Return: number of differences found + * Purpose: diff a H5T_NATIVE_UINT type * + * Return: number of differences found *------------------------------------------------------------------------- */ static hsize_t diff_uint(unsigned char *mem1, unsigned char *mem2, hsize_t nelmts, hsize_t hyper_start, int rank, hsize_t *dims, - hsize_t *acc, hsize_t *pos, diff_opt_t *options, const char *obj1, + hsize_t *acc, hsize_t *pos, diff_opt_t *opts, const char *obj1, const char *obj2, int *ph) { hsize_t nfound = 0; /* number of differences found */ @@ -3571,13 +3604,13 @@ static hsize_t diff_uint(unsigned char *mem1, unsigned char *mem2, h5difftrace("diff_uint start\n"); /* -d and !-p */ - if (options->d && !options->p) { + if (opts->d && !opts->p) { for (i = 0; i < nelmts; i++) { HDmemcpy(&temp1_uint, mem1, sizeof(unsigned int)); HDmemcpy(&temp2_uint, mem2, sizeof(unsigned int)); - if (PDIFF(temp1_uint,temp2_uint) > options->delta) { - if (print_data(options)) { + if (PDIFF(temp1_uint,temp2_uint) > opts->delta) { + if (print_data(opts)) { print_pos(ph, 0, hyper_start + i, acc, pos, rank, dims, obj1, obj2); parallel_print(SPACES); parallel_print(I_FORMAT, temp1_uint, temp2_uint, PDIFF(temp1_uint, temp2_uint)); @@ -3586,12 +3619,12 @@ static hsize_t diff_uint(unsigned char *mem1, unsigned char *mem2, } mem1 += sizeof(unsigned int); mem2 += sizeof(unsigned int); - if (options->n && nfound >= options->count) + if (opts->n && nfound >= opts->count) return nfound; } } /* !-d and -p */ - else if (!options->d && options->p) { + else if (!opts->d && opts->p) { for (i = 0; i < nelmts; i++) { HDmemcpy(&temp1_uint, mem1, sizeof(unsigned int)); HDmemcpy(&temp2_uint, mem2, sizeof(unsigned int)); @@ -3599,15 +3632,15 @@ static hsize_t diff_uint(unsigned char *mem1, unsigned char *mem2, PER_UNSIGN(signed int, temp1_uint, temp2_uint); if (not_comparable && !both_zero) { - if (print_data(options)) { + if (print_data(opts)) { print_pos(ph, 1, hyper_start + i, acc, pos, rank, dims, obj1, obj2); parallel_print(SPACES); parallel_print(I_FORMAT_P_NOTCOMP, temp1_uint, temp2_uint, PDIFF(temp1_uint, temp2_uint)); } nfound++; } - else if (per > options->percent) { - if (print_data(options)) { + else if (per > opts->percent) { + if (print_data(opts)) { print_pos(ph, 1, hyper_start + i, acc, pos, rank, dims, obj1, obj2); parallel_print(SPACES); parallel_print(I_FORMAT_P, temp1_uint, temp2_uint, PDIFF(temp1_uint, temp2_uint), per); @@ -3616,12 +3649,12 @@ static hsize_t diff_uint(unsigned char *mem1, unsigned char *mem2, } mem1 += sizeof(unsigned int); mem2 += sizeof(unsigned int); - if (options->n && nfound >= options->count) + if (opts->n && nfound >= opts->count) return nfound; } } /* -d and -p */ - else if (options->d && options->p) { + else if (opts->d && opts->p) { for (i = 0; i < nelmts; i++) { HDmemcpy(&temp1_uint, mem1, sizeof(unsigned int)); HDmemcpy(&temp2_uint, mem2, sizeof(unsigned int)); @@ -3629,16 +3662,16 @@ static hsize_t diff_uint(unsigned char *mem1, unsigned char *mem2, PER_UNSIGN(signed int, temp1_uint, temp2_uint); if (not_comparable && !both_zero) { - if (print_data(options)) { + if (print_data(opts)) { print_pos(ph, 1, hyper_start + i, acc, pos, rank, dims, obj1, obj2); parallel_print(SPACES); parallel_print(I_FORMAT_P_NOTCOMP, temp1_uint, temp2_uint, PDIFF(temp1_uint, temp2_uint)); } nfound++; } - else if (per > options->percent - && PDIFF(temp1_uint,temp2_uint) > options->delta) { - if (print_data(options)) { + else if (per > opts->percent + && PDIFF(temp1_uint,temp2_uint) > opts->delta) { + if (print_data(opts)) { print_pos(ph, 1, hyper_start + i, acc, pos, rank, dims, obj1, obj2); parallel_print(SPACES); parallel_print(I_FORMAT_P, temp1_uint, temp2_uint, PDIFF(temp1_uint, temp2_uint), per); @@ -3647,7 +3680,7 @@ static hsize_t diff_uint(unsigned char *mem1, unsigned char *mem2, } mem1 += sizeof(unsigned int); mem2 += sizeof(unsigned int); - if (options->n && nfound >= options->count) + if (opts->n && nfound >= opts->count) return nfound; } } @@ -3657,7 +3690,7 @@ static hsize_t diff_uint(unsigned char *mem1, unsigned char *mem2, HDmemcpy(&temp2_uint, mem2, sizeof(unsigned int)); if (temp1_uint != temp2_uint) { - if (print_data(options)) { + if (print_data(opts)) { print_pos(ph, 0, hyper_start + i, acc, pos, rank, dims, obj1, obj2); parallel_print(SPACES); parallel_print(I_FORMAT, temp1_uint, temp2_uint, PDIFF(temp1_uint, temp2_uint)); @@ -3667,7 +3700,7 @@ static hsize_t diff_uint(unsigned char *mem1, unsigned char *mem2, mem1 += sizeof(unsigned int); mem2 += sizeof(unsigned int); - if (options->n && nfound >= options->count) + if (opts->n && nfound >= opts->count) return nfound; } /* nelmts */ } @@ -3679,15 +3712,14 @@ static hsize_t diff_uint(unsigned char *mem1, unsigned char *mem2, /*------------------------------------------------------------------------- * Function: diff_long * - * Purpose: diff a H5T_NATIVE_LONG type - * - * Return: number of differences found + * Purpose: diff a H5T_NATIVE_LONG type * + * Return: number of differences found *------------------------------------------------------------------------- */ static hsize_t diff_long(unsigned char *mem1, unsigned char *mem2, hsize_t nelmts, hsize_t hyper_start, int rank, hsize_t *dims, - hsize_t *acc, hsize_t *pos, diff_opt_t *options, const char *obj1, + hsize_t *acc, hsize_t *pos, diff_opt_t *opts, const char *obj1, const char *obj2, int *ph) { hsize_t nfound = 0; /* number of differences found */ @@ -3699,14 +3731,14 @@ static hsize_t diff_long(unsigned char *mem1, unsigned char *mem2, h5difftrace("diff_long start\n"); /* -d and !-p */ - if (options->d && !options->p) { + if (opts->d && !opts->p) { for (i = 0; i < nelmts; i++) { for (i = 0; i < nelmts; i++) { HDmemcpy(&temp1_long, mem1, sizeof(long)); HDmemcpy(&temp2_long, mem2, sizeof(long)); - if (ABS(temp1_long-temp2_long) > options->delta) { - if (print_data(options)) { + if (ABS(temp1_long-temp2_long) > opts->delta) { + if (print_data(opts)) { print_pos(ph, 0, hyper_start + i, acc, pos, rank, dims, obj1, obj2); parallel_print(SPACES); parallel_print(LI_FORMAT, temp1_long, temp2_long, ABS(temp1_long - temp2_long)); @@ -3715,13 +3747,13 @@ static hsize_t diff_long(unsigned char *mem1, unsigned char *mem2, } mem1 += sizeof(long); mem2 += sizeof(long); - if (options->n && nfound >= options->count) + if (opts->n && nfound >= opts->count) return nfound; } } } /* !-d and -p */ - else if (!options->d && options->p) { + else if (!opts->d && opts->p) { for (i = 0; i < nelmts; i++) { HDmemcpy(&temp1_long, mem1, sizeof(long)); HDmemcpy(&temp2_long, mem2, sizeof(long)); @@ -3729,15 +3761,15 @@ static hsize_t diff_long(unsigned char *mem1, unsigned char *mem2, PER(temp1_long, temp2_long); if (not_comparable && !both_zero) { - if (print_data(options)) { + if (print_data(opts)) { print_pos(ph, 1, hyper_start + i, acc, pos, rank, dims, obj1, obj2); parallel_print(SPACES); parallel_print(LI_FORMAT_P_NOTCOMP, temp1_long, temp2_long, ABS(temp1_long - temp2_long)); } nfound++; } - else if (per > options->percent) { - if (print_data(options)) { + else if (per > opts->percent) { + if (print_data(opts)) { print_pos(ph, 1, hyper_start + i, acc, pos, rank, dims, obj1, obj2); parallel_print(SPACES); parallel_print(LI_FORMAT_P, temp1_long, temp2_long, ABS(temp1_long - temp2_long), per); @@ -3746,12 +3778,12 @@ static hsize_t diff_long(unsigned char *mem1, unsigned char *mem2, } mem1 += sizeof(long); mem2 += sizeof(long); - if (options->n && nfound >= options->count) + if (opts->n && nfound >= opts->count) return nfound; } } /* -d and -p */ - else if (options->d && options->p) { + else if (opts->d && opts->p) { for (i = 0; i < nelmts; i++) { HDmemcpy(&temp1_long, mem1, sizeof(long)); HDmemcpy(&temp2_long, mem2, sizeof(long)); @@ -3759,15 +3791,15 @@ static hsize_t diff_long(unsigned char *mem1, unsigned char *mem2, PER(temp1_long, temp2_long); if (not_comparable && !both_zero) { - if (print_data(options)) { + if (print_data(opts)) { print_pos(ph, 1, hyper_start + i, acc, pos, rank, dims, obj1, obj2); parallel_print(SPACES); parallel_print(LI_FORMAT_P_NOTCOMP, temp1_long, temp2_long, ABS(temp1_long - temp2_long)); } nfound++; } - else if (per > options->percent && ABS(temp1_long-temp2_long) > options->delta) { - if (print_data(options)) { + else if (per > opts->percent && ABS(temp1_long-temp2_long) > opts->delta) { + if (print_data(opts)) { print_pos(ph, 1, hyper_start + i, acc, pos, rank, dims, obj1, obj2); parallel_print(SPACES); parallel_print(LI_FORMAT_P, temp1_long, temp2_long, ABS(temp1_long - temp2_long), per); @@ -3776,7 +3808,7 @@ static hsize_t diff_long(unsigned char *mem1, unsigned char *mem2, } mem1 += sizeof(long); mem2 += sizeof(long); - if (options->n && nfound >= options->count) + if (opts->n && nfound >= opts->count) return nfound; } } @@ -3786,7 +3818,7 @@ static hsize_t diff_long(unsigned char *mem1, unsigned char *mem2, HDmemcpy(&temp2_long, mem2, sizeof(long)); if (temp1_long != temp2_long) { - if (print_data(options)) { + if (print_data(opts)) { print_pos(ph, 0, hyper_start + i, acc, pos, rank, dims, obj1, obj2); parallel_print(SPACES); parallel_print(LI_FORMAT, temp1_long, temp2_long, ABS(temp1_long - temp2_long)); @@ -3796,7 +3828,7 @@ static hsize_t diff_long(unsigned char *mem1, unsigned char *mem2, mem1 += sizeof(long); mem2 += sizeof(long); - if (options->n && nfound >= options->count) + if (opts->n && nfound >= opts->count) return nfound; } /* nelmts */ } @@ -3808,35 +3840,34 @@ static hsize_t diff_long(unsigned char *mem1, unsigned char *mem2, /*------------------------------------------------------------------------- * Function: diff_ulong * - * Purpose: diff a H5T_NATIVE_ULONG type - * - * Return: number of differences found + * Purpose: diff a H5T_NATIVE_ULONG type * + * Return: number of differences found *------------------------------------------------------------------------- */ static hsize_t diff_ulong(unsigned char *mem1, unsigned char *mem2, hsize_t nelmts, hsize_t hyper_start, int rank, hsize_t *dims, - hsize_t *acc, hsize_t *pos, diff_opt_t *options, const char *obj1, + hsize_t *acc, hsize_t *pos, diff_opt_t *opts, const char *obj1, const char *obj2, int *ph) { - hsize_t nfound = 0; /* number of differences found */ + hsize_t nfound = 0; /* number of differences found */ unsigned long temp1_ulong; unsigned long temp2_ulong; - hsize_t i; - double per; - hbool_t both_zero; + hsize_t i; + double per; + hbool_t both_zero; h5difftrace("diff_ulong start\n"); /* -d and !-p */ - if (options->d && !options->p) { + if (opts->d && !opts->p) { for (i = 0; i < nelmts; i++) { for (i = 0; i < nelmts; i++) { HDmemcpy(&temp1_ulong, mem1, sizeof(unsigned long)); HDmemcpy(&temp2_ulong, mem2, sizeof(unsigned long)); - if (PDIFF(temp1_ulong,temp2_ulong) > options->delta) { - if (print_data(options)) { + if (PDIFF(temp1_ulong,temp2_ulong) > opts->delta) { + if (print_data(opts)) { print_pos(ph, 0, hyper_start + i, acc, pos, rank, dims, obj1, obj2); parallel_print(SPACES); parallel_print(LI_FORMAT, temp1_ulong, temp2_ulong, PDIFF(temp1_ulong, temp2_ulong)); @@ -3845,13 +3876,13 @@ static hsize_t diff_ulong(unsigned char *mem1, unsigned char *mem2, } mem1 += sizeof(unsigned long); mem2 += sizeof(unsigned long); - if (options->n && nfound >= options->count) + if (opts->n && nfound >= opts->count) return nfound; } } } /* !-d and -p */ - else if (!options->d && options->p) { + else if (!opts->d && opts->p) { for (i = 0; i < nelmts; i++) { HDmemcpy(&temp1_ulong, mem1, sizeof(unsigned long)); HDmemcpy(&temp2_ulong, mem2, sizeof(unsigned long)); @@ -3859,15 +3890,15 @@ static hsize_t diff_ulong(unsigned char *mem1, unsigned char *mem2, PER_UNSIGN(signed long, temp1_ulong, temp2_ulong); if (not_comparable && !both_zero) { - if (print_data(options)) { + if (print_data(opts)) { print_pos(ph, 1, hyper_start + i, acc, pos, rank, dims, obj1, obj2); parallel_print(SPACES); parallel_print(ULI_FORMAT_P_NOTCOMP, temp1_ulong, temp2_ulong, PDIFF(temp1_ulong, temp2_ulong)); } nfound++; } - else if (per > options->percent) { - if (print_data(options)) { + else if (per > opts->percent) { + if (print_data(opts)) { print_pos(ph, 1, hyper_start + i, acc, pos, rank, dims, obj1, obj2); parallel_print(SPACES); parallel_print(LI_FORMAT_P, temp1_ulong, temp2_ulong, PDIFF(temp1_ulong, temp2_ulong), per); @@ -3876,12 +3907,12 @@ static hsize_t diff_ulong(unsigned char *mem1, unsigned char *mem2, } mem1 += sizeof(unsigned long); mem2 += sizeof(unsigned long); - if (options->n && nfound >= options->count) + if (opts->n && nfound >= opts->count) return nfound; } } /* -d and -p */ - else if (options->d && options->p) { + else if (opts->d && opts->p) { for (i = 0; i < nelmts; i++) { HDmemcpy(&temp1_ulong, mem1, sizeof(unsigned long)); HDmemcpy(&temp2_ulong, mem2, sizeof(unsigned long)); @@ -3889,16 +3920,16 @@ static hsize_t diff_ulong(unsigned char *mem1, unsigned char *mem2, PER_UNSIGN(signed long, temp1_ulong, temp2_ulong); if (not_comparable && !both_zero) { - if (print_data(options)) { + if (print_data(opts)) { print_pos(ph, 1, hyper_start + i, acc, pos, rank, dims, obj1, obj2); parallel_print(SPACES); parallel_print(ULI_FORMAT_P_NOTCOMP, temp1_ulong, temp2_ulong, PDIFF(temp1_ulong, temp2_ulong)); } nfound++; } - else if (per > options->percent - && PDIFF(temp1_ulong,temp2_ulong) > options->delta) { - if (print_data(options)) { + else if (per > opts->percent + && PDIFF(temp1_ulong,temp2_ulong) > opts->delta) { + if (print_data(opts)) { print_pos(ph, 1, hyper_start + i, acc, pos, rank, dims, obj1, obj2); parallel_print(SPACES); parallel_print(LI_FORMAT_P, temp1_ulong, temp2_ulong, PDIFF(temp1_ulong, temp2_ulong), per); @@ -3907,7 +3938,7 @@ static hsize_t diff_ulong(unsigned char *mem1, unsigned char *mem2, } mem1 += sizeof(unsigned long); mem2 += sizeof(unsigned long); - if (options->n && nfound >= options->count) + if (opts->n && nfound >= opts->count) return nfound; } } @@ -3917,7 +3948,7 @@ static hsize_t diff_ulong(unsigned char *mem1, unsigned char *mem2, HDmemcpy(&temp2_ulong, mem2, sizeof(unsigned long)); if (temp1_ulong != temp2_ulong) { - if (print_data(options)) { + if (print_data(opts)) { print_pos(ph, 0, hyper_start + i, acc, pos, rank, dims, obj1, obj2); parallel_print(SPACES); parallel_print(LI_FORMAT, temp1_ulong, temp2_ulong, PDIFF(temp1_ulong, temp2_ulong)); @@ -3927,7 +3958,7 @@ static hsize_t diff_ulong(unsigned char *mem1, unsigned char *mem2, mem1 += sizeof(unsigned long); mem2 += sizeof(unsigned long); - if (options->n && nfound >= options->count) + if (opts->n && nfound >= opts->count) return nfound; } /* nelmts */ } @@ -3939,33 +3970,32 @@ static hsize_t diff_ulong(unsigned char *mem1, unsigned char *mem2, /*------------------------------------------------------------------------- * Function: diff_llong * - * Purpose: diff a H5T_NATIVE_LLONG type - * - * Return: number of differences found + * Purpose: diff a H5T_NATIVE_LLONG type * + * Return: number of differences found *------------------------------------------------------------------------- */ static hsize_t diff_llong(unsigned char *mem1, unsigned char *mem2, hsize_t nelmts, hsize_t hyper_start, int rank, hsize_t *dims, - hsize_t *acc, hsize_t *pos, diff_opt_t *options, const char *obj1, + hsize_t *acc, hsize_t *pos, diff_opt_t *opts, const char *obj1, const char *obj2, int *ph) { - hsize_t nfound = 0; /* number of differences found */ + hsize_t nfound = 0; /* number of differences found */ long long temp1_llong; long long temp2_llong; - hsize_t i; - double per; - hbool_t both_zero; + hsize_t i; + double per; + hbool_t both_zero; h5difftrace("diff_llong start\n"); /* -d and !-p */ - if (options->d && !options->p) { + if (opts->d && !opts->p) { for (i = 0; i < nelmts; i++) { HDmemcpy(&temp1_llong, mem1, sizeof(long long)); HDmemcpy(&temp2_llong, mem2, sizeof(long long)); - if (ABS( temp1_llong-temp2_llong) > options->delta) { - if (print_data(options)) { + if (ABS( temp1_llong-temp2_llong) > opts->delta) { + if (print_data(opts)) { print_pos(ph, 0, hyper_start + i, acc, pos, rank, dims, obj1, obj2); parallel_print(SPACES); parallel_print(LLI_FORMAT, temp1_llong, temp2_llong, ABS(temp1_llong - temp2_llong)); @@ -3974,12 +4004,12 @@ static hsize_t diff_llong(unsigned char *mem1, unsigned char *mem2, } mem1 += sizeof(long long); mem2 += sizeof(long long); - if (options->n && nfound >= options->count) + if (opts->n && nfound >= opts->count) return nfound; } } /* !-d and -p */ - else if (!options->d && options->p) { + else if (!opts->d && opts->p) { for (i = 0; i < nelmts; i++) { HDmemcpy(&temp1_llong, mem1, sizeof(long long)); HDmemcpy(&temp2_llong, mem2, sizeof(long long)); @@ -3987,15 +4017,15 @@ static hsize_t diff_llong(unsigned char *mem1, unsigned char *mem2, PER(temp1_llong, temp2_llong); if (not_comparable && !both_zero) { - if (print_data(options)) { + if (print_data(opts)) { print_pos(ph, 1, hyper_start + i, acc, pos, rank, dims, obj1, obj2); parallel_print(SPACES); parallel_print(LLI_FORMAT_P_NOTCOMP, temp1_llong, temp2_llong, ABS(temp1_llong - temp2_llong)); } nfound++; } - else if (per > options->percent) { - if (print_data(options)) { + else if (per > opts->percent) { + if (print_data(opts)) { print_pos(ph, 1, hyper_start + i, acc, pos, rank, dims, obj1, obj2); parallel_print(SPACES); parallel_print(LLI_FORMAT_P, temp1_llong, temp2_llong, ABS(temp1_llong - temp2_llong),per); @@ -4004,12 +4034,12 @@ static hsize_t diff_llong(unsigned char *mem1, unsigned char *mem2, } mem1 += sizeof(long long); mem2 += sizeof(long long); - if (options->n && nfound >= options->count) + if (opts->n && nfound >= opts->count) return nfound; } } /* -d and -p */ - else if (options->d && options->p) { + else if (opts->d && opts->p) { for (i = 0; i < nelmts; i++) { HDmemcpy(&temp1_llong, mem1, sizeof(long long)); HDmemcpy(&temp2_llong, mem2, sizeof(long long)); @@ -4017,16 +4047,16 @@ static hsize_t diff_llong(unsigned char *mem1, unsigned char *mem2, PER(temp1_llong, temp2_llong); if (not_comparable && !both_zero) { - if (print_data(options)) { + if (print_data(opts)) { print_pos(ph, 1, hyper_start + i, acc, pos, rank, dims, obj1, obj2); parallel_print(SPACES); parallel_print(LLI_FORMAT_P_NOTCOMP, temp1_llong, temp2_llong, ABS(temp1_llong - temp2_llong)); } nfound++; } - else if (per > options->percent - && ABS(temp1_llong-temp2_llong) > options->delta) { - if (print_data(options)) { + else if (per > opts->percent + && ABS(temp1_llong-temp2_llong) > opts->delta) { + if (print_data(opts)) { print_pos(ph, 1, hyper_start + i, acc, pos, rank, dims, obj1, obj2); parallel_print(SPACES); parallel_print(LLI_FORMAT_P, temp1_llong, temp2_llong, ABS(temp1_llong - temp2_llong),per); @@ -4035,7 +4065,7 @@ static hsize_t diff_llong(unsigned char *mem1, unsigned char *mem2, } mem1 += sizeof(long long); mem2 += sizeof(long long); - if (options->n && nfound >= options->count) + if (opts->n && nfound >= opts->count) return nfound; } } @@ -4045,7 +4075,7 @@ static hsize_t diff_llong(unsigned char *mem1, unsigned char *mem2, HDmemcpy(&temp2_llong, mem2, sizeof(long long)); if (temp1_llong != temp2_llong) { - if (print_data(options)) { + if (print_data(opts)) { print_pos(ph, 0, hyper_start + i, acc, pos, rank, dims, obj1, obj2); parallel_print(SPACES); parallel_print(LLI_FORMAT, temp1_llong, temp2_llong, ABS(temp1_llong - temp2_llong)); @@ -4055,7 +4085,7 @@ static hsize_t diff_llong(unsigned char *mem1, unsigned char *mem2, mem1 += sizeof(long long); mem2 += sizeof(long long); - if (options->n && nfound >= options->count) + if (opts->n && nfound >= opts->count) return nfound; } /* nelmts */ } @@ -4067,34 +4097,33 @@ static hsize_t diff_llong(unsigned char *mem1, unsigned char *mem2, /*------------------------------------------------------------------------- * Function: diff_ullong * - * Purpose: diff a H5T_NATIVE_ULLONG type - * - * Return: number of differences found + * Purpose: diff a H5T_NATIVE_ULLONG type * + * Return: number of differences found *------------------------------------------------------------------------- */ static hsize_t diff_ullong(unsigned char *mem1, unsigned char *mem2, hsize_t nelmts, hsize_t hyper_start, int rank, hsize_t *dims, hsize_t *acc, - hsize_t *pos, diff_opt_t *options, const char *obj1, const char *obj2, int *ph) + hsize_t *pos, diff_opt_t *opts, const char *obj1, const char *obj2, int *ph) { - hsize_t nfound = 0; /* number of differences found */ + hsize_t nfound = 0; /* number of differences found */ unsigned long long temp1_ullong; unsigned long long temp2_ullong; - hsize_t i; - float f1, f2; - double per; - hbool_t both_zero; + hsize_t i; + float f1, f2; + double per; + hbool_t both_zero; h5difftrace("diff_ullong start\n"); /* -d and !-p */ - if (options->d && !options->p) { + if (opts->d && !opts->p) { for (i = 0; i < nelmts; i++) { HDmemcpy(&temp1_ullong, mem1, sizeof(unsigned long long)); HDmemcpy(&temp2_ullong, mem2, sizeof(unsigned long long)); - if (PDIFF(temp1_ullong,temp2_ullong) > (unsigned long long) options->delta) { - if (print_data(options)) { + if (PDIFF(temp1_ullong,temp2_ullong) > (unsigned long long) opts->delta) { + if (print_data(opts)) { print_pos(ph, 0, hyper_start + i, acc, pos, rank, dims, obj1, obj2); parallel_print(SPACES); parallel_print(ULLI_FORMAT,temp1_ullong,temp2_ullong,PDIFF(temp1_ullong,temp2_ullong)); @@ -4103,12 +4132,12 @@ static hsize_t diff_ullong(unsigned char *mem1, unsigned char *mem2, } mem1 += sizeof(unsigned long long); mem2 += sizeof(unsigned long long); - if (options->n && nfound >= options->count) + if (opts->n && nfound >= opts->count) return nfound; } } /* !-d and -p */ - else if (!options->d && options->p) { + else if (!opts->d && opts->p) { for (i = 0; i < nelmts; i++) { HDmemcpy(&temp1_ullong, mem1, sizeof(unsigned long long)); HDmemcpy(&temp2_ullong, mem2, sizeof(unsigned long long)); @@ -4118,15 +4147,15 @@ static hsize_t diff_ullong(unsigned char *mem1, unsigned char *mem2, PER(f1, f2); if (not_comparable && !both_zero) { - if (print_data(options)) { + if (print_data(opts)) { print_pos(ph, 1, hyper_start + i, acc, pos, rank, dims, obj1, obj2); parallel_print(SPACES); parallel_print(ULLI_FORMAT_P_NOTCOMP,temp1_ullong,temp2_ullong,PDIFF(temp1_ullong,temp2_ullong)); } nfound++; } - else if (per > options->percent) { - if (print_data(options)) { + else if (per > opts->percent) { + if (print_data(opts)) { print_pos(ph, 1, hyper_start + i, acc, pos, rank, dims, obj1, obj2); parallel_print(SPACES); parallel_print(ULLI_FORMAT_P,temp1_ullong,temp2_ullong,PDIFF(temp1_ullong,temp2_ullong),per); @@ -4135,12 +4164,12 @@ static hsize_t diff_ullong(unsigned char *mem1, unsigned char *mem2, } mem1 += sizeof(unsigned long long); mem2 += sizeof(unsigned long long); - if (options->n && nfound >= options->count) + if (opts->n && nfound >= opts->count) return nfound; } } /* -d and -p */ - else if (options->d && options->p) { + else if (opts->d && opts->p) { for (i = 0; i < nelmts; i++) { HDmemcpy(&temp1_ullong, mem1, sizeof(unsigned long long)); HDmemcpy(&temp2_ullong, mem2, sizeof(unsigned long long)); @@ -4150,16 +4179,16 @@ static hsize_t diff_ullong(unsigned char *mem1, unsigned char *mem2, PER(f1, f2); if (not_comparable && !both_zero) { - if (print_data(options)) { + if (print_data(opts)) { print_pos(ph, 1, hyper_start + i, acc, pos, rank, dims, obj1, obj2); parallel_print(SPACES); parallel_print(ULLI_FORMAT_P_NOTCOMP,temp1_ullong,temp2_ullong,PDIFF(temp1_ullong,temp2_ullong)); } nfound++; } - else if (per > options->percent - && PDIFF(temp1_ullong,temp2_ullong) > (unsigned long long) options->delta) { - if (print_data(options)) { + else if (per > opts->percent + && PDIFF(temp1_ullong,temp2_ullong) > (unsigned long long) opts->delta) { + if (print_data(opts)) { print_pos(ph, 1, hyper_start + i, acc, pos, rank, dims, obj1, obj2); parallel_print(SPACES); parallel_print(ULLI_FORMAT_P,temp1_ullong,temp2_ullong,PDIFF(temp1_ullong,temp2_ullong),per); @@ -4168,7 +4197,7 @@ static hsize_t diff_ullong(unsigned char *mem1, unsigned char *mem2, } mem1 += sizeof(unsigned long long); mem2 += sizeof(unsigned long long); - if (options->n && nfound >= options->count) + if (opts->n && nfound >= opts->count) return nfound; } } @@ -4178,7 +4207,7 @@ static hsize_t diff_ullong(unsigned char *mem1, unsigned char *mem2, HDmemcpy(&temp2_ullong, mem2, sizeof(unsigned long long)); if (temp1_ullong != temp2_ullong) { - if (print_data(options)) { + if (print_data(opts)) { print_pos(ph, 0, hyper_start + i, acc, pos, rank, dims, obj1, obj2); parallel_print(SPACES); parallel_print(ULLI_FORMAT,temp1_ullong,temp2_ullong,PDIFF(temp1_ullong,temp2_ullong)); @@ -4188,7 +4217,7 @@ static hsize_t diff_ullong(unsigned char *mem1, unsigned char *mem2, mem1 += sizeof(unsigned long long); mem2 += sizeof(unsigned long long); - if (options->n && nfound >= options->count) + if (opts->n && nfound >= opts->count) return nfound; } /* nelmts */ } @@ -4201,69 +4230,59 @@ static hsize_t diff_ullong(unsigned char *mem1, unsigned char *mem2, * Function: ull2float * * Purpose: convert unsigned long long to float - * - * Programmer: pvn - * Mar 22, 2006 - * - * Modifications: - * *------------------------------------------------------------------------- */ static -int ull2float(unsigned long long ull_value, float *f_value) { - hid_t dxpl_id; +int ull2float(unsigned long long ull_value, float *f_value) +{ + int ret_value = SUCCEED; + hid_t dxpl_id = -1; unsigned char *buf = NULL; - size_t src_size; - size_t dst_size; + size_t src_size; + size_t dst_size; h5difftrace("ull2float start\n"); if ((dxpl_id = H5Pcreate(H5P_DATASET_XFER)) < 0) - goto error; + HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Pcreate failed"); src_size = H5Tget_size(H5T_NATIVE_ULLONG); dst_size = H5Tget_size(H5T_NATIVE_FLOAT); - buf = (unsigned char*) HDcalloc((size_t )1, MAX(src_size, dst_size)); - if (!buf) - goto error; + if((buf = (unsigned char*) HDcalloc((size_t )1, MAX(src_size, dst_size))) == NULL) + HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "Could not allocate buffer for dims"); HDmemcpy(buf, &ull_value, src_size); /* do conversion */ if (H5Tconvert(H5T_NATIVE_ULLONG, H5T_NATIVE_FLOAT, (size_t) 1, buf, NULL, dxpl_id) < 0) - goto error; + HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Tconvert failed"); HDmemcpy(f_value, buf, dst_size); if (buf) - HDfree(buf);h5difftrace("ull2float finish\n"); - - return 0; + HDfree(buf); -error: - H5E_BEGIN_TRY - { +done: + H5E_BEGIN_TRY { H5Pclose(dxpl_id); - }H5E_END_TRY; + } H5E_END_TRY; + if (buf) - HDfree(buf);h5difftrace("ull2float errored\n"); + HDfree(buf); + + h5difftrace("ull2float finish\n"); - return -1; + return ret_value; } /*------------------------------------------------------------------------- * Function: equal_double * - * Purpose: use a absolute error formula to deal with floating point - * uncertainty - * - * Modifications: - * 8/1/2007. handle NaNs - * + * Purpose: use a absolute error formula to deal with floating point uncertainty *------------------------------------------------------------------------- */ -static hbool_t equal_double(double value, double expected, diff_opt_t *options) { +static hbool_t equal_double(double value, double expected, diff_opt_t *opts) { h5difftrace("equal_double start\n"); - if (options->do_nans) { + if (opts->do_nans) { /*------------------------------------------------------------------------- * detect NaNs *------------------------------------------------------------------------- @@ -4275,26 +4294,24 @@ static hbool_t equal_double(double value, double expected, diff_opt_t *options) * we consider NaN == NaN to be true *------------------------------------------------------------------------- */ - if (isnan1 && isnan2) { + if (isnan1 && isnan2) return TRUE; - } /*------------------------------------------------------------------------- * one is a NaN, do not compare but assume difference *------------------------------------------------------------------------- */ - if ((isnan1 && !isnan2) || (!isnan1 && isnan2)) { + if ((isnan1 && !isnan2) || (!isnan1 && isnan2)) return FALSE; - } } if (value == expected) return TRUE; - if (options->use_system_epsilon) { - if ( ABS( (value-expected) ) < DBL_EPSILON) + if (opts->use_system_epsilon) + if (ABS((value-expected)) < DBL_EPSILON) return TRUE; - } + h5difftrace("equal_double finish\n"); return FALSE; @@ -4303,18 +4320,16 @@ static hbool_t equal_double(double value, double expected, diff_opt_t *options) /*------------------------------------------------------------------------- * Function: equal_ldouble * - * Purpose: use a absolute error formula to deal with floating point - * uncertainty - * + * Purpose: use a absolute error formula to deal with floating point uncertainty *------------------------------------------------------------------------- */ #if H5_SIZEOF_LONG_DOUBLE !=0 static -hbool_t equal_ldouble(long double value, long double expected, diff_opt_t *options) +hbool_t equal_ldouble(long double value, long double expected, diff_opt_t *opts) { h5difftrace("equal_ldouble start\n"); - if (options->do_nans) { + if (opts->do_nans) { /*------------------------------------------------------------------------- * detect NaNs *------------------------------------------------------------------------- @@ -4326,26 +4341,24 @@ hbool_t equal_ldouble(long double value, long double expected, diff_opt_t *optio * we consider NaN == NaN to be true *------------------------------------------------------------------------- */ - if (isnan1 && isnan2) { + if (isnan1 && isnan2) return TRUE; - } /*------------------------------------------------------------------------- * one is a NaN, do not compare but assume difference *------------------------------------------------------------------------- */ - if ((isnan1 && !isnan2) || (!isnan1 && isnan2)) { + if ((isnan1 && !isnan2) || (!isnan1 && isnan2)) return FALSE; - } } if (value == expected) return TRUE; - if (options->use_system_epsilon) { + if (opts->use_system_epsilon) if (ABS((value-expected)) < DBL_EPSILON) return TRUE; - } + h5difftrace("equal_ldouble finish\n"); return FALSE; @@ -4356,17 +4369,12 @@ hbool_t equal_ldouble(long double value, long double expected, diff_opt_t *optio /*------------------------------------------------------------------------- * Function: equal_float * - * Purpose: use a absolute error formula to deal with floating point - * uncertainty - * - * Modifications: - * 8/1/2007. handle NaNs - * + * Purpose: use a absolute error formula to deal with floating point uncertainty *------------------------------------------------------------------------- */ -static hbool_t equal_float(float value, float expected, diff_opt_t *options) { +static hbool_t equal_float(float value, float expected, diff_opt_t *opts) { h5difftrace("equal_float start\n"); - if (options->do_nans) { + if (opts->do_nans) { /*------------------------------------------------------------------------- * detect NaNs *------------------------------------------------------------------------- @@ -4378,46 +4386,35 @@ static hbool_t equal_float(float value, float expected, diff_opt_t *options) { * we consider NaN == NaN to be true *------------------------------------------------------------------------- */ - if (isnan1 && isnan2) { + if (isnan1 && isnan2) return TRUE; - } /*------------------------------------------------------------------------- * one is a NaN, do not compare but assume difference *------------------------------------------------------------------------- */ - if ((isnan1 && !isnan2) || (!isnan1 && isnan2)) { + if ((isnan1 && !isnan2) || (!isnan1 && isnan2)) return FALSE; - } } if (value == expected) return TRUE; - if (options->use_system_epsilon) { - if ( ABS( (value-expected) ) < FLT_EPSILON) + if (opts->use_system_epsilon) + if (ABS( (value-expected) ) < FLT_EPSILON) return TRUE; - } + h5difftrace("equal_float finish\n"); return FALSE; - } /*------------------------------------------------------------------------- * Function: my_isnan * - * Purpose: Determines whether VAL points to NaN. - * - * Return: TRUE or FALSE - * - * Programmer: Robb Matzke - * Monday, July 6, 1998 - * - * Modifications: - * Pedro Vicente, 12 October 2007. - * Add a string detection type for WIN32 + * Purpose: Determines whether VAL points to NaN. * + * Return: TRUE or FALSE *------------------------------------------------------------------------- */ static hbool_t my_isnan(dtype_t type, void *val) { @@ -4445,9 +4442,8 @@ static hbool_t my_isnan(dtype_t type, void *val) { retval = (x!=x); } #endif - else { + else return FALSE; - } /* * Sometimes NaN==NaN (e.g., DEC Alpha) so we try to print it and see if @@ -4474,9 +4470,8 @@ static hbool_t my_isnan(dtype_t type, void *val) { HDsnprintf(s, sizeof(s), "%Lg", x); } #endif - else { + else return FALSE; - } if (HDstrstr(s, "NaN") || HDstrstr(s, "NAN") || @@ -4501,24 +4496,25 @@ static hbool_t my_isnan(dtype_t type, void *val) { /*------------------------------------------------------------------------- * Function: print_data * - * Purpose: print data only in report or verbose modes, and do not print in quiet mode + * Purpose: print data only in report or verbose modes, and do not print in quiet mode *------------------------------------------------------------------------- */ static -int print_data(diff_opt_t *options) { - return ((options->m_report || options->m_verbose) && !options->m_quiet) ? 1 : 0; +int print_data(diff_opt_t *opts) +{ + return ((opts->m_report || opts->m_verbose) && !opts->m_quiet) ? 1 : 0; } /*------------------------------------------------------------------------- * Function: print_header * - * Purpose: print header for difference - * + * Purpose: print header for difference *------------------------------------------------------------------------- */ static void print_header(int pp, /* print percentage */ - int rank, hsize_t *dims, const char *obj1, const char *obj2) { + int rank, hsize_t *dims, const char *obj1, const char *obj2) +{ /* print header */ parallel_print("%-16s", "size:"); print_dimensions(rank, dims); @@ -4528,8 +4524,7 @@ void print_header(int pp, /* print percentage */ if (pp) { parallel_print("%-15s %-15s %-15s %-15s %-15s\n", "position", - (obj1 != NULL) ? obj1 : " ", (obj2 != NULL) ? obj2 : " ", "difference", - "relative"); + (obj1 != NULL) ? obj1 : " ", (obj2 != NULL) ? obj2 : " ", "difference", "relative"); parallel_print( "------------------------------------------------------------------------\n"); } @@ -4544,15 +4539,15 @@ void print_header(int pp, /* print percentage */ /*------------------------------------------------------------------------- * Function: print_pos * - * Purpose: print in matrix notation, converting from an array index position - * + * Purpose: print in matrix notation, converting from an array index position *------------------------------------------------------------------------- */ static void print_pos(int *ph, /* print header */ int pp, /* print percentage */ hsize_t curr_pos, hsize_t *acc, hsize_t *pos, int rank, hsize_t *dims, - const char *obj1, const char *obj2) { + const char *obj1, const char *obj2) +{ int i; /* print header */ @@ -4576,23 +4571,22 @@ void print_pos(int *ph, /* print header */ } parallel_print("]"); } - else { + else parallel_print(" "); - } } /*------------------------------------------------------------------------- * Function: print_char_pos * - * Purpose: print character position in string - * + * Purpose: print character position in string *------------------------------------------------------------------------- */ static void print_char_pos(int *ph, /* print header */ int pp, /* print percentage */ hsize_t curr_pos, size_t u, hsize_t *acc, hsize_t *pos, int rank, hsize_t *dims, - const char *obj1, const char *obj2) { + const char *obj1, const char *obj2) +{ int i; /* print header */ @@ -4616,20 +4610,20 @@ void print_char_pos(int *ph, /* print header */ } } - else { + else parallel_print("%zu", u); - } + parallel_print("]"); } /*------------------------------------------------------------------------- - * Function: h5diff_print_char. Adapted from h5tools_print_char - * - * Purpose: Print a char + * Function: h5diff_print_char. Adapted from h5tools_print_char * + * Purpose: Print a char *------------------------------------------------------------------------- */ -static void h5diff_print_char(char ch) { +static void h5diff_print_char(char ch) +{ switch (ch) { case '"': parallel_print("\\\""); @@ -4662,12 +4656,13 @@ static void h5diff_print_char(char ch) { } /*------------------------------------------------------------------------- - * XCAO, 11/10/2010 * added to improve performance for compound datasets * set up compound datatype structures. + *------------------------------------------------------------------------- */ -static void get_member_types(hid_t tid, mcomp_t *members) { - int tclass; +static void get_member_types(hid_t tid, mcomp_t *members) +{ + int tclass; unsigned u; if (tid <= 0 || !members) @@ -4682,8 +4677,7 @@ static void get_member_types(hid_t tid, mcomp_t *members) { else if (tclass == H5T_COMPOUND) { int nmembs; - nmembs = H5Tget_nmembers(tid); - if (nmembs <= 0) + if ((nmembs = H5Tget_nmembers(tid)) <= 0) return; members->n = (unsigned) nmembs; @@ -4701,15 +4695,15 @@ static void get_member_types(hid_t tid, mcomp_t *members) { } return; - } /*------------------------------------------------------------------------- - * XCAO, 11/10/2010 * added to improve performance for compound datasets * clean and close compound members. + *------------------------------------------------------------------------- */ -static void close_member_types(mcomp_t *members) { +static void close_member_types(mcomp_t *members) +{ unsigned u; if (!members || members->n <= 0 || !members->ids) diff --git a/tools/lib/h5diff_attr.c b/tools/lib/h5diff_attr.c index ed03cf4..6019738 100644 --- a/tools/lib/h5diff_attr.c +++ b/tools/lib/h5diff_attr.c @@ -136,52 +136,55 @@ static void table_attr_mark_exist(unsigned *exist, char *name, table_attrs_t *ta * * Parameter: * table_out [OUT] : return the list - * - * Programmer: Jonathan Kim - * - * Date: March 15, 2011 *------------------------------------------------------------------------*/ -static herr_t build_match_list_attrs(hid_t loc1_id, hid_t loc2_id, table_attrs_t ** table_out, diff_opt_t *options) +static herr_t build_match_list_attrs(hid_t loc1_id, hid_t loc2_id, table_attrs_t ** table_out, diff_opt_t *opts) { - H5O_info_t oinfo1, oinfo2; /* Object info */ - hid_t attr1_id=-1; /* attr ID */ - hid_t attr2_id=-1; /* attr ID */ - size_t curr1 = 0; - size_t curr2 = 0; - unsigned infile[2]; - char name1[ATTR_NAME_MAX]; - char name2[ATTR_NAME_MAX]; - int cmp; - unsigned i; + int ret_value = 0; + H5O_info_t oinfo1, oinfo2; /* Object info */ + hid_t attr1_id = -1; /* attr ID */ + hid_t attr2_id = -1; /* attr ID */ + size_t curr1 = 0; + size_t curr2 = 0; + unsigned infile[2]; + char name1[ATTR_NAME_MAX]; + char name2[ATTR_NAME_MAX]; + int cmp; + unsigned i; table_attrs_t *table_lp = NULL; + h5difftrace("build_match_list_attrs start\n"); + if(H5Oget_info(loc1_id, &oinfo1) < 0) - goto error; + HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Oget_info first object failed"); if(H5Oget_info(loc2_id, &oinfo2) < 0) - goto error; - - table_attrs_init( &table_lp ); + HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Oget_info second object failed"); + table_attrs_init(&table_lp); + if (table_lp == NULL) + HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "Table allocation failed"); /*-------------------------------------------------- * build the list */ while(curr1 < oinfo1.num_attrs && curr2 < oinfo2.num_attrs) { + h5diffdebug3("build_match_list_attrs 1: %ld - %ld\n", curr1, oinfo1.num_attrs); + h5diffdebug3("build_match_list_attrs 2: %ld - %ld\n", curr2, oinfo2.num_attrs); + /*------------------ * open attribute1 */ if((attr1_id = H5Aopen_by_idx(loc1_id, ".", H5_INDEX_NAME, H5_ITER_INC, (hsize_t)curr1, H5P_DEFAULT, H5P_DEFAULT)) < 0) - goto error; + HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Aopen_by_idx first attribute failed"); /* get name */ if(H5Aget_name(attr1_id, (size_t)ATTR_NAME_MAX, name1) < 0) - goto error; + HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Aget_name first attribute failed"); /*------------------ * open attribute2 */ if((attr2_id = H5Aopen_by_idx(loc2_id, ".", H5_INDEX_NAME, H5_ITER_INC, (hsize_t)curr2, H5P_DEFAULT, H5P_DEFAULT)) < 0) - goto error; + HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Aopen_by_idx second attribute failed"); /* get name */ if(H5Aget_name(attr2_id, (size_t)ATTR_NAME_MAX, name2) < 0) - goto error; + HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Aget_name second attribute failed"); /* criteria is string compare */ cmp = HDstrcmp(name1, name2); @@ -219,13 +222,16 @@ static herr_t build_match_list_attrs(hid_t loc1_id, hid_t loc2_id, table_attrs_t infile[0] = 1; infile[1] = 0; while(curr1 < oinfo1.num_attrs) { + h5diffdebug3("build_match_list_attrs 1: %ld - %ld\n", curr1, oinfo1.num_attrs); + /*------------------ * open attribute1 */ if((attr1_id = H5Aopen_by_idx(loc1_id, ".", H5_INDEX_NAME, H5_ITER_INC, (hsize_t)curr1, H5P_DEFAULT, H5P_DEFAULT)) < 0) - goto error; + HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Aopen_by_idx first attribute failed"); /* get name */ if(H5Aget_name(attr1_id, (size_t)ATTR_NAME_MAX, name1) < 0) - goto error; + HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Aget_name first attribute failed"); + h5diffdebug2("build_match_list_attrs #1 name - %s\n", name1); table_attr_mark_exist(infile, name1, table_lp); table_lp->nattrs_only1++; @@ -240,13 +246,15 @@ static herr_t build_match_list_attrs(hid_t loc1_id, hid_t loc2_id, table_attrs_t infile[0] = 0; infile[1] = 1; while(curr2 < oinfo2.num_attrs) { + h5diffdebug3("build_match_list_attrs 2: %ld - %ld\n", curr2, oinfo2.num_attrs); /*------------------ * open attribute2 */ if((attr2_id = H5Aopen_by_idx(loc2_id, ".", H5_INDEX_NAME, H5_ITER_INC, (hsize_t)curr2, H5P_DEFAULT, H5P_DEFAULT)) < 0) - goto error; + HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Aopen_by_idx second attribute failed"); /* get name */ if(H5Aget_name(attr2_id, (size_t)ATTR_NAME_MAX, name2) < 0) - goto error; + HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Aget_name second attribute failed"); + h5diffdebug2("build_match_list_attrs #2 name - %s\n", name2); table_attr_mark_exist(infile, name2, table_lp); table_lp->nattrs_only2++; @@ -254,12 +262,13 @@ static herr_t build_match_list_attrs(hid_t loc1_id, hid_t loc2_id, table_attrs_t /* close for next turn */ H5Aclose(attr2_id); + attr2_id = -1; } /*------------------------------------------------------ * print the list */ - if(options->m_verbose_level == 2) { + if(opts->m_verbose_level == 2) { /* if '-v2' is detected */ parallel_print(" obj1 obj2\n"); parallel_print(" --------------------------------------\n"); @@ -271,42 +280,35 @@ static herr_t build_match_list_attrs(hid_t loc1_id, hid_t loc2_id, table_attrs_t } /* end for */ } - if(options->m_verbose_level >= 1) + if(opts->m_verbose_level >= 1) parallel_print("Attributes status: %d common, %d only in obj1, %d only in obj2\n", table_lp->nattrs - table_lp->nattrs_only1 - table_lp->nattrs_only2, table_lp->nattrs_only1, table_lp->nattrs_only2); +done: *table_out = table_lp; - return 0; - -error: - if (0 < attr1_id) + /* disable error reporting */ + H5E_BEGIN_TRY { H5Aclose(attr1_id); - if (0 < attr2_id) H5Aclose(attr2_id); + } H5E_END_TRY; + + h5diffdebug2("build_match_list_attrs end - errstat:%d\n", opts->err_stat); - return -1; + return ret_value; } /*------------------------------------------------------------------------- * Function: diff_attr * - * Purpose: compare attributes located in LOC1_ID and LOC2_ID, which are - * obtained either from - * loc_id = H5Gopen2(fid, name, H5P_DEFAULT); - * loc_id = H5Dopen2(fid, name); - * loc_id = H5Topen2(fid, name, H5P_DEFAULT); - * - * Return: number of differences found - * - * Programmer: Pedro Vicente, pvn@ncsa.uiuc.edu - * - * Date: November, 03, 2003 - * - * Modifications: - * March, 02, 2007: return the number of differences found + * Purpose: compare attributes located in LOC1_ID and LOC2_ID, which are + * obtained either from + * loc_id = H5Gopen2(fid, name, H5P_DEFAULT); + * loc_id = H5Dopen2(fid, name); + * loc_id = H5Topen2(fid, name, H5P_DEFAULT); * + * Return: number of differences found *------------------------------------------------------------------------- */ @@ -314,107 +316,118 @@ hsize_t diff_attr(hid_t loc1_id, hid_t loc2_id, const char *path1, const char *path2, - diff_opt_t *options) + diff_opt_t *opts) { - hid_t attr1_id=-1; /* attr ID */ - hid_t attr2_id=-1; /* attr ID */ - hid_t space1_id=-1; /* space ID */ - hid_t space2_id=-1; /* space ID */ - hid_t ftype1_id=-1; /* file data type ID */ - hid_t ftype2_id=-1; /* file data type ID */ - int vstrtype1=0; /* ftype1 is a variable string */ - int vstrtype2=0; /* ftype2 is a variable string */ - hid_t mtype1_id=-1; /* memory data type ID */ - hid_t mtype2_id=-1; /* memory data type ID */ - size_t msize1; /* memory size of memory type */ - size_t msize2; /* memory size of memory type */ - void *buf1=NULL; /* data buffer */ - void *buf2=NULL; /* data buffer */ - hbool_t buf1hasdata=FALSE; /* buffer has data */ - hbool_t buf2hasdata=FALSE; /* buffer has data */ - hsize_t nelmts1; /* number of elements in dataset */ - int rank1; /* rank of dataset */ - int rank2; /* rank of dataset */ - hsize_t dims1[H5S_MAX_RANK];/* dimensions of dataset */ - hsize_t dims2[H5S_MAX_RANK];/* dimensions of dataset */ - char *name1; - char *name2; + int ret_value = opts->err_stat; + hid_t attr1_id = -1; /* attr ID */ + hid_t attr2_id = -1; /* attr ID */ + hid_t space1_id = -1; /* space ID */ + hid_t space2_id = -1; /* space ID */ + hid_t ftype1_id = -1; /* file data type ID */ + hid_t ftype2_id = -1; /* file data type ID */ + int vstrtype1 = 0; /* ftype1 is a variable string */ + int vstrtype2 = 0; /* ftype2 is a variable string */ + hid_t mtype1_id = -1; /* memory data type ID */ + hid_t mtype2_id = -1; /* memory data type ID */ + size_t msize1; /* memory size of memory type */ + size_t msize2; /* memory size of memory type */ + void *buf1 = NULL; /* data buffer */ + void *buf2 = NULL; /* data buffer */ + hbool_t buf1hasdata = FALSE; /* buffer has data */ + hbool_t buf2hasdata = FALSE; /* buffer has data */ + hsize_t nelmts1; /* number of elements in dataset */ + int rank1; /* rank of dataset */ + int rank2; /* rank of dataset */ + hsize_t dims1[H5S_MAX_RANK]; /* dimensions of dataset */ + hsize_t dims2[H5S_MAX_RANK]; /* dimensions of dataset */ + char *name1 = NULL; + char *name2 = NULL; char np1[512]; char np2[512]; - unsigned u; /* Local index variable */ + unsigned u; /* Local index variable */ hsize_t nfound = 0; hsize_t nfound_total = 0; int j; table_attrs_t *match_list_attrs = NULL; - if(build_match_list_attrs(loc1_id, loc2_id, &match_list_attrs, options) < 0) - goto error; + h5difftrace("diff_attr start\n"); + + if(build_match_list_attrs(loc1_id, loc2_id, &match_list_attrs, opts) < 0) { + HGOTO_ERROR(1, H5E_tools_min_id_g, "build_match_list_attrs failed"); + } + h5diffdebug2("build_match_list_attrs - errstat:%d\n", opts->err_stat); /* if detect any unique extra attr */ if(match_list_attrs->nattrs_only1 || match_list_attrs->nattrs_only2) { + h5difftrace("diff_attr attributes only in one file\n"); /* exit will be 1 */ - options->contents = 0; + opts->contents = 0; } + h5diffdebug2("match_list_attrs info - errstat:%d\n", opts->err_stat); for(u = 0; u < (unsigned)match_list_attrs->nattrs; u++) { + h5diffdebug3("match_list_attrs loop[%d] - errstat:%d\n", u, opts->err_stat); if((match_list_attrs->attrs[u].exist[0]) && (match_list_attrs->attrs[u].exist[1])) { name1 = name2 = match_list_attrs->attrs[u].name; + h5diffdebug2("diff_attr name - %s\n", name1); /*-------------- * attribute 1 */ if((attr1_id = H5Aopen(loc1_id, name1, H5P_DEFAULT)) < 0) - goto error; + HGOTO_ERROR(1, H5E_tools_min_id_g, "H5Aopen first attribute failed"); /*-------------- * attribute 2 */ if((attr2_id = H5Aopen(loc2_id, name2, H5P_DEFAULT)) < 0) - goto error; + HGOTO_ERROR(1, H5E_tools_min_id_g, "H5Aopen second attribute failed"); + h5difftrace("diff_attr got attributes\n"); /* get the datatypes */ if((ftype1_id = H5Aget_type(attr1_id)) < 0) - goto error; + HGOTO_ERROR(1, H5E_tools_min_id_g, "H5Aget_type first attribute failed"); vstrtype1 = H5Tis_variable_str(ftype1_id); if((ftype2_id = H5Aget_type(attr2_id)) < 0) - goto error; + HGOTO_ERROR(1, H5E_tools_min_id_g, "H5Aget_type second attribute failed"); vstrtype2 = H5Tis_variable_str(ftype2_id); + /* no compare if either one but not both are variable string type */ if (vstrtype1 != vstrtype2) { - if((options->m_verbose || options->m_list_not_cmp)) + if((opts->m_verbose || opts->m_list_not_cmp)) parallel_print("Not comparable: one of attribute <%s/%s> or <%s/%s> is of variable length type\n", path1, name1, path2, name2); - options->not_cmp = 1; + opts->not_cmp = 1; if (H5Tclose(ftype1_id) < 0) - goto error; + HGOTO_ERROR(1, H5E_tools_min_id_g, "H5Tclose first attribute ftype failed"); if (H5Tclose(ftype2_id) < 0) - goto error; + HGOTO_ERROR(1, H5E_tools_min_id_g, "H5Tclose second attribute ftype failed"); if (H5Aclose(attr1_id) < 0) - goto error; + HGOTO_ERROR(1, H5E_tools_min_id_g, "H5Aclose first attribute failed"); if (H5Aclose(attr2_id) < 0) - goto error; + HGOTO_ERROR(1, H5E_tools_min_id_g, "H5Aclose second attribute failed"); continue; } if((mtype1_id = H5Tget_native_type(ftype1_id, H5T_DIR_DEFAULT)) < 0) - goto error; + HGOTO_ERROR(1, H5E_tools_min_id_g, "H5Tget_native_type first attribute ftype failed"); if((mtype2_id = H5Tget_native_type(ftype2_id, H5T_DIR_DEFAULT)) < 0) - goto error; + HGOTO_ERROR(1, H5E_tools_min_id_g, "H5Tget_native_type second attribute ftype failed"); if((msize1 = H5Tget_size(mtype1_id)) == 0) - goto error; + HGOTO_ERROR(1, H5E_tools_min_id_g, "H5Tget_size first attribute mtype failed"); if((msize2 = H5Tget_size(mtype2_id)) == 0) - goto error; + HGOTO_ERROR(1, H5E_tools_min_id_g, "H5Tget_size second attribute mtype failed"); /* get the dataspace */ if((space1_id = H5Aget_space(attr1_id)) < 0) - goto error; + HGOTO_ERROR(1, H5E_tools_min_id_g, "H5Aget_space first attribute failed"); if((space2_id = H5Aget_space(attr2_id)) < 0) - goto error; + HGOTO_ERROR(1, H5E_tools_min_id_g, "H5Aget_space second attribute failed"); /* get dimensions */ if((rank1 = H5Sget_simple_extent_dims(space1_id, dims1, NULL)) < 0) - goto error; + HGOTO_ERROR(1, H5E_tools_min_id_g, "H5Sget_simple_extent_dims first attribute failed"); if((rank2 = H5Sget_simple_extent_dims(space2_id, dims2, NULL)) < 0) - goto error; + HGOTO_ERROR(1, H5E_tools_min_id_g, "H5Sget_simple_extent_dims second attribute failed"); /*---------------------------------------------------------------------- * check for comparable TYPE and SPACE @@ -424,23 +437,23 @@ hsize_t diff_attr(hid_t loc1_id, /* pass dims1 and dims2 for maxdims as well since attribute's maxdims * are always same */ if(diff_can_type(ftype1_id, ftype2_id, rank1, rank2, dims1, dims2, - dims1, dims2, name1, name2, options, 0) != 1) { + dims1, dims2, name1, name2, opts, 0) != 1) { if(H5Tclose(ftype1_id) < 0) - goto error; + HGOTO_ERROR(1, H5E_tools_min_id_g, "H5Tclose first attribute ftype failed"); if(H5Tclose(ftype2_id) < 0) - goto error; + HGOTO_ERROR(1, H5E_tools_min_id_g, "H5Tclose second attribute ftype failed"); if(H5Sclose(space1_id) < 0) - goto error; + HGOTO_ERROR(1, H5E_tools_min_id_g, "H5Sclose first attribute failed"); if(H5Sclose(space2_id) < 0) - goto error; + HGOTO_ERROR(1, H5E_tools_min_id_g, "H5Sclose second attribute failed"); if(H5Aclose(attr1_id) < 0) - goto error; + HGOTO_ERROR(1, H5E_tools_min_id_g, "H5Aclose first attribute failed"); if(H5Aclose(attr2_id) < 0) - goto error; + HGOTO_ERROR(1, H5E_tools_min_id_g, "H5Aclose second attribute failed"); if(H5Tclose(mtype1_id) < 0) - goto error; + HGOTO_ERROR(1, H5E_tools_min_id_g, "H5Tclose first attribute mtype failed"); if(H5Tclose(mtype2_id) < 0) - goto error; + HGOTO_ERROR(1, H5E_tools_min_id_g, "H5Tclose second attribute mtype failed"); continue; } @@ -451,7 +464,7 @@ hsize_t diff_attr(hid_t loc1_id, */ if(FAIL == match_up_memsize(ftype1_id, ftype2_id, &mtype1_id, &mtype2_id, &msize1, &msize2)) - goto error; + HGOTO_ERROR(1, H5E_tools_min_id_g, "match_up_memsize failed"); /*--------------------------------------------------------------------- * read @@ -465,18 +478,18 @@ hsize_t diff_attr(hid_t loc1_id, buf2 = (void *)HDcalloc((size_t)(nelmts1), msize2); if(buf1 == NULL || buf2 == NULL) { parallel_print("cannot read into memory\n"); - goto error; + HGOTO_ERROR(1, H5E_tools_min_id_g, "buffer allocation failed"); } if(H5Aread(attr1_id, mtype1_id, buf1) < 0) { parallel_print("Failed reading attribute1 %s/%s\n", path1, name1); - goto error; + HGOTO_ERROR(1, H5E_tools_min_id_g, "H5Aget_type first attribute failed"); } else buf1hasdata = TRUE; if(H5Aread(attr2_id, mtype2_id, buf2) < 0) { parallel_print("Failed reading attribute2 %s/%s\n", path2, name2); - goto error; + HGOTO_ERROR(1, H5E_tools_min_id_g, "H5Aget_type second attribute failed"); } else buf2hasdata = TRUE; @@ -492,22 +505,22 @@ hsize_t diff_attr(hid_t loc1_id, /* always print name */ /* verbose (-v) and report (-r) mode */ - if(options->m_verbose || options->m_report) { + if(opts->m_verbose || opts->m_report) { do_print_attrname("attribute", np1, np2); nfound = diff_array(buf1, buf2, nelmts1, (hsize_t) 0, rank1, - dims1, options, np1, np2, mtype1_id, attr1_id, attr2_id); + dims1, opts, np1, np2, mtype1_id, attr1_id, attr2_id); print_found(nfound); } /* quiet mode (-q), just count differences */ - else if(options->m_quiet) { + else if(opts->m_quiet) { nfound = diff_array(buf1, buf2, nelmts1, (hsize_t) 0, rank1, - dims1, options, np1, np2, mtype1_id, attr1_id, attr2_id); + dims1, opts, np1, np2, mtype1_id, attr1_id, attr2_id); } /* the rest (-c, none, ...) */ else { nfound = diff_array(buf1, buf2, nelmts1, (hsize_t) 0, rank1, - dims1, options, np1, np2, mtype1_id, attr1_id, attr2_id); + dims1, opts, np1, np2, mtype1_id, attr1_id, attr2_id); /* print info if compatible and difference found */ if (nfound) { @@ -534,31 +547,29 @@ hsize_t diff_attr(hid_t loc1_id, buf2 = NULL; if(H5Tclose(ftype1_id) < 0) - goto error; + HGOTO_ERROR(1, H5E_tools_min_id_g, "H5Aget_type first attribute failed"); if(H5Tclose(ftype2_id) < 0) - goto error; + HGOTO_ERROR(1, H5E_tools_min_id_g, "H5Aget_type second attribute failed"); if(H5Sclose(space1_id) < 0) - goto error; + HGOTO_ERROR(1, H5E_tools_min_id_g, "H5Aget_type first attribute failed"); if(H5Sclose(space2_id) < 0) - goto error; + HGOTO_ERROR(1, H5E_tools_min_id_g, "H5Aget_type second attribute failed"); if(H5Aclose(attr1_id) < 0) - goto error; + HGOTO_ERROR(1, H5E_tools_min_id_g, "H5Aget_type first attribute failed"); if(H5Aclose(attr2_id) < 0) - goto error; + HGOTO_ERROR(1, H5E_tools_min_id_g, "H5Aget_type second attribute failed"); if(H5Tclose(mtype1_id) < 0) - goto error; + HGOTO_ERROR(1, H5E_tools_min_id_g, "H5Tclose first attribute mtype failed"); if(H5Tclose(mtype2_id) < 0) - goto error; + HGOTO_ERROR(1, H5E_tools_min_id_g, "H5Tclose second attribute mtype failed"); nfound_total += nfound; } } /* u */ - table_attrs_free(match_list_attrs); - - return nfound_total; +done: + opts->err_stat = opts->err_stat | ret_value; -error: H5E_BEGIN_TRY { if(buf1) { if(buf1hasdata && TRUE == h5tools_detect_vlen(mtype1_id)) @@ -583,7 +594,7 @@ error: H5Aclose(attr2_id); } H5E_END_TRY; - options->err_stat = 1; + h5diffdebug2("diff_attr end - errstat:%d\n", opts->err_stat); return nfound_total; } diff --git a/tools/lib/h5diff_dset.c b/tools/lib/h5diff_dset.c index f046369..b03295b 100644 --- a/tools/lib/h5diff_dset.c +++ b/tools/lib/h5diff_dset.c @@ -1,15 +1,15 @@ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * -* 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 * + * Copyright by The HDF Group. * + * Copyright by the Board of Trustees of the University of Illinois. * + * All rights reserved. * + * * + * This file is part of HDF5. The full HDF5 copyright notice, including * + * terms governing use, modification, and redistribution, is contained in * * the COPYING file, which can be found at the root of the source code * * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * * If you do not have access to either file, you may request a copy from * * help@hdfgroup.org. * -* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #include "H5private.h" #include "h5tools.h" @@ -19,25 +19,22 @@ /*------------------------------------------------------------------------- -* Function: diff_dataset -* -* Purpose: check for comparable datasets and read into a compatible -* memory type -* -* Return: Number of differences found -* -* Programmer: Pedro Vicente, pvn@ncsa.uiuc.edu -* -* Date: May 9, 2003 -* -*------------------------------------------------------------------------- -*/ -hsize_t diff_dataset( hid_t file1_id, - hid_t file2_id, - const char *obj1_name, - const char *obj2_name, - diff_opt_t *options) + * Function: diff_dataset + * + * Purpose: check for comparable datasets and read into a compatible + * memory type + * + * Return: Number of differences found + *------------------------------------------------------------------------- + */ +hsize_t diff_dataset(hid_t file1_id, + hid_t file2_id, + const char *obj1_name, + const char *obj2_name, + diff_opt_t *opts) { + int ret_value = opts->err_stat; + int status = -1; hid_t did1 = -1; hid_t did2 = -1; hid_t dcpl1 = -1; @@ -46,53 +43,45 @@ hsize_t diff_dataset( hid_t file1_id, h5difftrace("diff_dataset start\n"); /*------------------------------------------------------------------------- - * open the handles - *------------------------------------------------------------------------- - */ - /* disable error reporting */ - H5E_BEGIN_TRY - { - /* Open the datasets */ - if((did1 = H5Dopen2(file1_id, obj1_name, H5P_DEFAULT)) < 0) { - parallel_print("Cannot open dataset <%s>\n", obj1_name); - goto error; - } - if((did2 = H5Dopen2(file2_id, obj2_name, H5P_DEFAULT)) < 0) { - parallel_print("Cannot open dataset <%s>\n", obj2_name); - goto error; - } - /* enable error reporting */ - } H5E_END_TRY; - + * open the handles + *------------------------------------------------------------------------- + */ + /* Open the datasets */ + if((did1 = H5Dopen2(file1_id, obj1_name, H5P_DEFAULT)) < 0) { + parallel_print("Cannot open dataset <%s>\n", obj1_name); + HGOTO_ERROR(1, H5E_tools_min_id_g, "H5Dopen2 first dataset failed"); + } + if((did2 = H5Dopen2(file2_id, obj2_name, H5P_DEFAULT)) < 0) { + parallel_print("Cannot open dataset <%s>\n", obj2_name); + HGOTO_ERROR(1, H5E_tools_min_id_g, "H5Dopen2 second dataset failed"); + } if((dcpl1 = H5Dget_create_plist(did1)) < 0) - goto error; + HGOTO_ERROR(1, H5E_tools_min_id_g, "H5Dget_create_plist first dataset failed"); if((dcpl2 = H5Dget_create_plist(did2)) < 0) - goto error; - - /*------------------------------------------------------------------------- - * check if the dataset creation property list has filters that - * are not registered in the current configuration - * 1) the external filters GZIP and SZIP might not be available - * 2) the internal filters might be turned off - *------------------------------------------------------------------------- - */ - if ((h5tools_canreadf((options->m_verbose ? obj1_name : NULL), dcpl1) == 1) && - (h5tools_canreadf((options->m_verbose ? obj2_name : NULL), dcpl2) == 1)) - nfound = diff_datasetid(did1, did2, obj1_name, obj2_name, options); - else - goto error; + HGOTO_ERROR(1, H5E_tools_min_id_g, "H5Dget_create_plist second dataset failed"); /*------------------------------------------------------------------------- - * close - *------------------------------------------------------------------------- - */ - goto done; - -error: - options->err_stat = 1; + * check if the dataset creation property list has filters that + * are not registered in the current configuration + * 1) the external filters GZIP and SZIP might not be available + * 2) the internal filters might be turned off + *------------------------------------------------------------------------- + */ + if ((status = h5tools_canreadf((opts->m_verbose ? obj1_name : NULL), dcpl1) == 1) && + (status = h5tools_canreadf((opts->m_verbose ? obj2_name : NULL), dcpl2) == 1)) + nfound = diff_datasetid(did1, did2, obj1_name, obj2_name, opts); + else if (status < 0) { + HGOTO_ERROR(1, H5E_tools_min_id_g, "h5tools_canreadf failed"); + } + else { + ret_value = 1; + opts->not_cmp = 1; + } done: + opts->err_stat = opts->err_stat | ret_value; + /* disable error reporting */ H5E_BEGIN_TRY { H5Pclose(dcpl1); @@ -102,82 +91,75 @@ done: /* enable error reporting */ } H5E_END_TRY; - h5difftrace("diff_dataset end\n"); + h5diffdebug3("diff_dataset finish:%d - errstat:%d\n", nfound, opts->err_stat); return nfound; } /*------------------------------------------------------------------------- -* Function: diff_datasetid -* -* Purpose: check for comparable datasets and read into a compatible -* memory type -* -* Return: Number of differences found -* -* Programmer: Pedro Vicente, pvn@ncsa.uiuc.edu -* -* Date: May 9, 2003 -* -* Modifications: -* -* -* October 2006: Read by hyperslabs for big datasets. -* -* A threshold of H5TOOLS_MALLOCSIZE (128 MB) is the limit upon which I/O hyperslab is done -* i.e., if the memory needed to read a dataset is greater than this limit, -* then hyperslab I/O is done instead of one operation I/O -* For each dataset, the memory needed is calculated according to -* -* memory needed = number of elements * size of each element -* -* if the memory needed is lower than H5TOOLS_MALLOCSIZE, then the following operations -* are done -* -* H5Dread( input_dataset1 ) -* H5Dread( input_dataset2 ) -* -* with all elements in the datasets selected. If the memory needed is greater than -* H5TOOLS_MALLOCSIZE, then the following operations are done instead: -* -* a strip mine is defined for each dimension k (a strip mine is defined as a -* hyperslab whose size is memory manageable) according to the formula -* -* (1) strip_mine_size[k ] = MIN(dimension[k ], H5TOOLS_BUFSIZE / size of memory type) -* -* where H5TOOLS_BUFSIZE is a constant currently defined as 1MB. This formula assures -* that for small datasets (small relative to the H5TOOLS_BUFSIZE constant), the strip -* mine size k is simply defined as its dimension k, but for larger datasets the -* hyperslab size is still memory manageable. -* a cycle is done until the number of elements in the dataset is reached. In each -* iteration, two parameters are defined for the function H5Sselect_hyperslab, -* the start and size of each hyperslab, according to -* -* (2) hyperslab_size [k] = MIN(dimension[k] - hyperslab_offset[k], strip_mine_size [k]) -* -* where hyperslab_offset [k] is initially set to zero, and later incremented in -* hyperslab_size[k] offsets. The reason for the operation -* -* dimension[k] - hyperslab_offset[k] -* -* in (2) is that, when using the strip mine size, it assures that the "remaining" part -* of the dataset that does not fill an entire strip mine is processed. -* -*------------------------------------------------------------------------- -*/ -hsize_t diff_datasetid( hid_t did1, - hid_t did2, - const char *obj1_name, - const char *obj2_name, - diff_opt_t *options) + * Function: diff_datasetid + * + * Purpose: check for comparable datasets and read into a compatible + * memory type + * + * Return: Number of differences found + * + * October 2006: Read by hyperslabs for big datasets. + * + * A threshold of H5TOOLS_MALLOCSIZE (128 MB) is the limit upon which I/O hyperslab is done + * i.e., if the memory needed to read a dataset is greater than this limit, + * then hyperslab I/O is done instead of one operation I/O + * For each dataset, the memory needed is calculated according to + * + * memory needed = number of elements * size of each element + * + * if the memory needed is lower than H5TOOLS_MALLOCSIZE, then the following operations + * are done + * + * H5Dread( input_dataset1 ) + * H5Dread( input_dataset2 ) + * + * with all elements in the datasets selected. If the memory needed is greater than + * H5TOOLS_MALLOCSIZE, then the following operations are done instead: + * + * a strip mine is defined for each dimension k (a strip mine is defined as a + * hyperslab whose size is memory manageable) according to the formula + * + * (1) strip_mine_size[k ] = MIN(dimension[k ], H5TOOLS_BUFSIZE / size of memory type) + * + * where H5TOOLS_BUFSIZE is a constant currently defined as 1MB. This formula assures + * that for small datasets (small relative to the H5TOOLS_BUFSIZE constant), the strip + * mine size k is simply defined as its dimension k, but for larger datasets the + * hyperslab size is still memory manageable. + * a cycle is done until the number of elements in the dataset is reached. In each + * iteration, two parameters are defined for the function H5Sselect_hyperslab, + * the start and size of each hyperslab, according to + * + * (2) hyperslab_size [k] = MIN(dimension[k] - hyperslab_offset[k], strip_mine_size [k]) + * + * where hyperslab_offset [k] is initially set to zero, and later incremented in + * hyperslab_size[k] offsets. The reason for the operation + * + * dimension[k] - hyperslab_offset[k] + * + * in (2) is that, when using the strip mine size, it assures that the "remaining" part + * of the dataset that does not fill an entire strip mine is processed. + * + *------------------------------------------------------------------------- + */ +hsize_t diff_datasetid(hid_t did1, + hid_t did2, + const char *obj1_name, + const char *obj2_name, + diff_opt_t *opts) { - int ret_value = 0; /*no need to LEAVE() on ERROR: HERR_INIT(int, SUCCEED) */ - hid_t sid1=-1; - hid_t sid2=-1; - hid_t f_tid1=-1; - hid_t f_tid2=-1; - hid_t dam_tid=-1; /* m_tid for diff_array function */ - hid_t m_tid1=-1; - hid_t m_tid2=-1; + int ret_value = opts->err_stat; + hid_t sid1 = -1; + hid_t sid2 = -1; + hid_t f_tid1 = -1; + hid_t f_tid2 = -1; + hid_t dam_tid = -1; /* m_tid for diff_array function */ + hid_t m_tid1 = -1; + hid_t m_tid2 = -1; hid_t dcpl1 = -1; hid_t dcpl2 = -1; H5D_layout_t stl1 = -1; @@ -197,42 +179,41 @@ hsize_t diff_datasetid( hid_t did1, hsize_t dims2[H5S_MAX_RANK]; hsize_t maxdim1[H5S_MAX_RANK]; hsize_t maxdim2[H5S_MAX_RANK]; - const char *name1=NULL; /* relative names */ - const char *name2=NULL; + const char *name1 = NULL; /* relative names */ + const char *name2 = NULL; hsize_t storage_size1; hsize_t storage_size2; - hsize_t nfound=0; /* number of differences found */ - int can_compare=1; /* do diff or not */ - void *buf1=NULL; - void *buf2=NULL; - void *sm_buf1=NULL; - void *sm_buf2=NULL; - hid_t sm_space; /*stripmine data space */ - size_t need; /* bytes needed for malloc */ + hsize_t nfound = 0; /* number of differences found */ + int can_compare = 1; /* do diff or not */ + void *buf1 = NULL; + void *buf2 = NULL; + void *sm_buf1 = NULL; + void *sm_buf2 = NULL; + hid_t sm_space; /*stripmine data space */ + size_t need; /* bytes needed for malloc */ int i; - unsigned int vl_data = 0; /*contains VL datatypes */ + unsigned int vl_data = 0; /*contains VL datatypes */ - options->err_stat = 1; h5difftrace("diff_datasetid start\n"); /* Get the dataspace handle */ if((sid1 = H5Dget_space(did1)) < 0) - HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Dget_space failed"); + HGOTO_ERROR(1, H5E_tools_min_id_g, "H5Dget_space failed"); /* Get rank */ if((rank1 = H5Sget_simple_extent_ndims(sid1)) < 0) - HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Sget_simple_extent_ndims failed"); + HGOTO_ERROR(1, H5E_tools_min_id_g, "H5Sget_simple_extent_ndims failed"); /* Get the dataspace handle */ if((sid2 = H5Dget_space(did2)) < 0 ) - HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Dget_space failed"); + HGOTO_ERROR(1, H5E_tools_min_id_g, "H5Dget_space failed"); /* Get rank */ if((rank2 = H5Sget_simple_extent_ndims(sid2)) < 0) - HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Sget_simple_extent_ndims failed"); + HGOTO_ERROR(1, H5E_tools_min_id_g, "H5Sget_simple_extent_ndims failed"); /* Get dimensions */ if(H5Sget_simple_extent_dims(sid1, dims1, maxdim1) < 0) - HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Sget_simple_extent_dims failed"); + HGOTO_ERROR(1, H5E_tools_min_id_g, "H5Sget_simple_extent_dims failed"); /* Get dimensions */ if(H5Sget_simple_extent_dims(sid2, dims2, maxdim2) < 0) @@ -240,36 +221,36 @@ hsize_t diff_datasetid( hid_t did1, h5diffdebug3("rank: %ld - %ld\n", rank1, rank2); /*------------------------------------------------------------------------- - * get the file data type - *------------------------------------------------------------------------- - */ + * get the file data type + *------------------------------------------------------------------------- + */ /* Get the data type */ if((f_tid1 = H5Dget_type(did1)) < 0) - HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Dget_type failed"); + HGOTO_ERROR(1, H5E_tools_min_id_g, "H5Dget_type failed"); /* Get the data type */ if((f_tid2 = H5Dget_type(did2)) < 0) - HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Dget_type failed"); + HGOTO_ERROR(1, H5E_tools_min_id_g, "H5Dget_type failed"); /*------------------------------------------------------------------------- - * get the storage layout type - *------------------------------------------------------------------------- - */ + * get the storage layout type + *------------------------------------------------------------------------- + */ if((dcpl1 = H5Dget_create_plist(did1)) < 0) - HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Dget_create_plist failed"); + HGOTO_ERROR(1, H5E_tools_min_id_g, "H5Dget_create_plist failed"); if((dcpl2 = H5Dget_create_plist(did2)) < 0) - HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Dget_create_plist failed"); + HGOTO_ERROR(1, H5E_tools_min_id_g, "H5Dget_create_plist failed"); if((stl1 = H5Pget_layout(dcpl1)) < 0) - HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Pget_layout failed"); + HGOTO_ERROR(1, H5E_tools_min_id_g, "H5Pget_layout failed"); if((stl2 = H5Pget_layout(dcpl2)) < 0) - HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Pget_layout failed"); + HGOTO_ERROR(1, H5E_tools_min_id_g, "H5Pget_layout failed"); /*------------------------------------------------------------------------- - * check for empty datasets - *------------------------------------------------------------------------- - */ + * check for empty datasets + *------------------------------------------------------------------------- + */ h5difftrace("check for empty datasets\n"); storage_size1 = H5Dget_storage_size(did1); @@ -278,71 +259,74 @@ hsize_t diff_datasetid( hid_t did1, if(storage_size1 == 0 || storage_size2 == 0) { if(stl1 == H5D_VIRTUAL || stl2 == H5D_VIRTUAL) { - if((options->m_verbose||options->m_list_not_cmp) && obj1_name && obj2_name) + if((opts->m_verbose||opts->m_list_not_cmp) && obj1_name && obj2_name) parallel_print("Warning: <%s> or <%s> is a virtual dataset\n", obj1_name, obj2_name); } else { - if((options->m_verbose || options->m_list_not_cmp) && obj1_name && obj2_name) + if((opts->m_verbose || opts->m_list_not_cmp) && obj1_name && obj2_name) parallel_print("Not comparable: <%s> or <%s> is an empty dataset\n", obj1_name, obj2_name); can_compare = 0; - options->not_cmp = 1; + opts->not_cmp = 1; } } /*------------------------------------------------------------------------- - * check for comparable TYPE and SPACE - *------------------------------------------------------------------------- - */ + * check for comparable TYPE and SPACE + *------------------------------------------------------------------------- + */ if (diff_can_type(f_tid1, f_tid2, rank1, rank2, dims1, dims2, maxdim1, maxdim2, obj1_name, obj2_name, - options, 0) != 1) + opts, 0) != 1) can_compare = 0; + h5diffdebug2("diff_can_type - errstat:%d\n", opts->err_stat); /*------------------------------------------------------------------------- - * memory type and sizes - *------------------------------------------------------------------------- - */ + * memory type and sizes + *------------------------------------------------------------------------- + */ h5difftrace("check for memory type and sizes\n"); if((m_tid1 = H5Tget_native_type(f_tid1, H5T_DIR_DEFAULT)) < 0) - HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Tget_native_type failed"); + HGOTO_ERROR(1, H5E_tools_min_id_g, "H5Tget_native_type failed"); if((m_tid2 = H5Tget_native_type(f_tid2, H5T_DIR_DEFAULT)) < 0) - HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Tget_native_type failed"); + HGOTO_ERROR(1, H5E_tools_min_id_g, "H5Tget_native_type failed"); m_size1 = H5Tget_size(m_tid1); m_size2 = H5Tget_size(m_tid2); h5diffdebug3("type size: %ld - %ld\n", m_size1, m_size2); /*------------------------------------------------------------------------- - * check for different signed/unsigned types - *------------------------------------------------------------------------- - */ + * check for different signed/unsigned types + *------------------------------------------------------------------------- + */ if(can_compare) { h5difftrace("can_compare for sign\n"); sign1 = H5Tget_sign(m_tid1); sign2 = H5Tget_sign(m_tid2); if(sign1 != sign2) { h5difftrace("sign1 != sign2\n"); - if((options->m_verbose || options->m_list_not_cmp) && obj1_name && obj2_name) { + if((opts->m_verbose || opts->m_list_not_cmp) && obj1_name && obj2_name) { parallel_print("Not comparable: <%s> has sign %s ", obj1_name, get_sign(sign1)); parallel_print("and <%s> has sign %s\n", obj2_name, get_sign(sign2)); } can_compare = 0; - options->not_cmp = 1; + opts->not_cmp = 1; } } /* Check if type is either VLEN-data or VLEN-string to reclaim any - * VLEN memory buffer later */ + * VLEN memory buffer later + */ if(TRUE == h5tools_detect_vlen(m_tid1)) vl_data = TRUE; + h5diffdebug2("h5tools_detect_vlen - errstat:%d\n", opts->err_stat); /*------------------------------------------------------------------------ - * only attempt to compare if possible - *------------------------------------------------------------------------- - */ + * only attempt to compare if possible + *------------------------------------------------------------------------- + */ if(can_compare) { /* it is possible to compare */ H5T_class_t tclass = H5Tget_class(f_tid1); h5difftrace("can_compare attempt\n"); @@ -363,14 +347,14 @@ hsize_t diff_datasetid( hid_t did1, if(tclass != H5T_ARRAY) { /*----------------------------------------------------------------- - * "upgrade" the smaller memory size - *------------------------------------------------------------------ - */ + * "upgrade" the smaller memory size + *------------------------------------------------------------------ + */ h5difftrace("upgrade the smaller memory size?\n"); if (FAIL == match_up_memsize (f_tid1, f_tid2, &m_tid1, &m_tid2, &m_size1, &m_size2)) - HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "match_up_memsize failed"); + HGOTO_ERROR(1, H5E_tools_min_id_g, "match_up_memsize failed"); h5diffdebug3("m_size: %ld - %ld\n", m_size1, m_size2); dadims = dims1; dam_size = m_size1; @@ -401,12 +385,13 @@ hsize_t diff_datasetid( hid_t did1, name1 = diff_basename(obj1_name); if(obj2_name) name2 = diff_basename(obj2_name); + h5diffdebug3("obj_names: %s - %s\n", name1, name2); /*---------------------------------------------------------------- - * read/compare - *----------------------------------------------------------------- - */ + * read/compare + *----------------------------------------------------------------- + */ if(need < H5TOOLS_MALLOCSIZE) { buf1 = HDmalloc(need); buf2 = HDmalloc(need); @@ -415,17 +400,19 @@ hsize_t diff_datasetid( hid_t did1, if(buf1 != NULL && buf2 != NULL) { h5difftrace("buf1 != NULL && buf2 != NULL\n"); if(H5Dread(did1, m_tid1, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf1) < 0) - HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Dread failed"); + HGOTO_ERROR(1, H5E_tools_min_id_g, "H5Dread failed"); h5difftrace("H5Dread did2\n"); if(H5Dread(did2, m_tid2, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf2) < 0) - HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Dread failed"); + HGOTO_ERROR(1, H5E_tools_min_id_g, "H5Dread failed"); /* array diff */ nfound = diff_array(buf1, buf2, danelmts, (hsize_t)0, rank1, dadims, - options, name1, name2, dam_tid, did1, did2); + opts, name1, name2, dam_tid, did1, did2); + h5diffdebug2("diff_array nfound:%d\n", nfound); /* reclaim any VL memory, if necessary */ if(vl_data) { + h5difftrace("check vl_data\n"); H5Dvlen_reclaim(m_tid1, sid1, H5P_DEFAULT, buf1); H5Dvlen_reclaim(m_tid2, sid2, H5P_DEFAULT, buf2); } /* end if */ @@ -468,6 +455,7 @@ hsize_t diff_datasetid( hid_t did1, size = 1; sm_size[i - 1] = MIN(dadims[i - 1], size); sm_nbytes *= sm_size[i - 1]; + h5diffdebug2("sm_nbytes: %ld\n", sm_nbytes); } /* end for */ /* malloc return code should be verified. @@ -478,9 +466,9 @@ hsize_t diff_datasetid( hid_t did1, * E.g., sm_space. */ if((sm_buf1 = HDmalloc((size_t)sm_nbytes)) == NULL) - HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "HDmalloc failed"); + HGOTO_ERROR(1, H5E_tools_min_id_g, "HDmalloc failed"); if((sm_buf2 = HDmalloc((size_t)sm_nbytes)) == NULL) - HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "HDmalloc failed"); + HGOTO_ERROR(1, H5E_tools_min_id_g, "HDmalloc failed"); sm_nelmts = sm_nbytes / p_type_nbytes; sm_space = H5Screate_simple(1, &sm_nelmts, NULL); @@ -497,24 +485,24 @@ hsize_t diff_datasetid( hid_t did1, hs_nelmts *= hs_size[i]; } /* end for */ if(H5Sselect_hyperslab(sid1, H5S_SELECT_SET, hs_offset, NULL, hs_size, NULL) < 0) - HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Sselect_hyperslab failed"); + HGOTO_ERROR(1, H5E_tools_min_id_g, "H5Sselect_hyperslab failed"); if(H5Sselect_hyperslab(sid2, H5S_SELECT_SET, hs_offset, NULL, hs_size, NULL) < 0) - HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Sselect_hyperslab failed"); + HGOTO_ERROR(1, H5E_tools_min_id_g, "H5Sselect_hyperslab failed"); if(H5Sselect_hyperslab(sm_space, H5S_SELECT_SET, zero, NULL, &hs_nelmts, NULL) < 0) - HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Sselect_hyperslab failed"); + HGOTO_ERROR(1, H5E_tools_min_id_g, "H5Sselect_hyperslab failed"); } /* end if */ else hs_nelmts = 1; if(H5Dread(did1, m_tid1, sm_space, sid1, H5P_DEFAULT, sm_buf1) < 0) - HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Dread failed"); + HGOTO_ERROR(1, H5E_tools_min_id_g, "H5Dread failed"); if(H5Dread(did2, m_tid2, sm_space, sid2, H5P_DEFAULT, sm_buf2) < 0) - HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Dread failed"); + HGOTO_ERROR(1, H5E_tools_min_id_g, "H5Dread failed"); /* get array differences. in the case of hyperslab read, increment the number of differences found in each hyperslab and pass the position at the beginning for printing */ nfound += diff_array(sm_buf1, sm_buf2, hs_nelmts, elmtno, rank1, - dadims, options, name1, name2, dam_tid, did1, did2); + dadims, opts, name1, name2, dam_tid, did1, did2); /* reclaim any VL memory, if necessary */ if(vl_data) { @@ -549,11 +537,10 @@ hsize_t diff_datasetid( hid_t did1, * close *------------------------------------------------------------------------- */ - h5difftrace("reclaim any VL memory\n"); + h5diffdebug2("reclaim any VL memory - errstat:%d\n", opts->err_stat); done: - - options->err_stat = ret_value; + opts->err_stat = opts->err_stat | ret_value; /* free */ if(buf1 != NULL) { @@ -595,60 +582,55 @@ done: H5Tclose(m_tid2); /* enable error reporting */ } H5E_END_TRY; - h5diffdebug3("diff_datasetid return:%d with nfound:%d\n", ret_value, nfound); + h5diffdebug3("diff_datasetid return:%d with nfound:%d\n", ret_value, nfound); return nfound; } /*------------------------------------------------------------------------- -* Function: diff_can_type -* -* Purpose: check for comparable TYPE and SPACE -* -* Return: -* 1, can compare -* 0, cannot compare -* -1, error -* -* Programmer: Pedro Vicente, pvn@ncsa.uiuc.edu -* -* Date: November 3, 2003 -* -*------------------------------------------------------------------------- -*/ - -int diff_can_type( hid_t f_tid1, /* file data type */ - hid_t f_tid2, /* file data type */ - int rank1, - int rank2, - hsize_t *dims1, - hsize_t *dims2, - hsize_t *maxdim1, - hsize_t *maxdim2, - const char *obj1_name, - const char *obj2_name, - diff_opt_t *options, - int is_compound) + * Function: diff_can_type + * + * Purpose: check for comparable TYPE and SPACE + * + * Return: + * 1, can compare + * 0, cannot compare + * -1, error + *------------------------------------------------------------------------- + */ + +int diff_can_type(hid_t f_tid1, /* file data type */ + hid_t f_tid2, /* file data type */ + int rank1, + int rank2, + hsize_t *dims1, + hsize_t *dims2, + hsize_t *maxdim1, + hsize_t *maxdim2, + const char *obj1_name, + const char *obj2_name, + diff_opt_t *opts, + int is_compound) { + int ret_value = 1; /* can_compare value */ H5T_class_t tclass1; H5T_class_t tclass2; int maxdim_diff = 0; /* maximum dimensions are different */ int dim_diff = 0; /* current dimensions are different */ int i; - int can_compare = 1; /* return value */ h5difftrace("diff_can_type start\n"); /*------------------------------------------------------------------------- - * check for the same class - *------------------------------------------------------------------------- - */ + * check for the same class + *------------------------------------------------------------------------- + */ if((tclass1 = H5Tget_class(f_tid1)) < 0) - return -1; + HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Tget_class first object failed"); if((tclass2 = H5Tget_class(f_tid2)) < 0) - return -1; + HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Tget_class second object failed"); if(tclass1 != tclass2) { - if((options->m_verbose || options->m_list_not_cmp) && obj1_name && obj2_name) { + if((opts->m_verbose || opts->m_list_not_cmp) && obj1_name && obj2_name) { if(is_compound) { parallel_print("Not comparable: <%s> has a class %s and <%s> has a class %s\n", obj1_name, get_class(tclass1), @@ -660,24 +642,22 @@ int diff_can_type( hid_t f_tid1, /* file data type */ obj2_name, get_class(tclass2)); } } - can_compare = 0; - options->not_cmp = 1; - goto done; + opts->not_cmp = 1; + HGOTO_DONE(0); } /*------------------------------------------------------------------------- - * check for non supported classes - *------------------------------------------------------------------------- - */ + * check for non supported classes + *------------------------------------------------------------------------- + */ switch (tclass1) { case H5T_TIME: - if((options->m_verbose || options->m_list_not_cmp) && obj1_name && obj2_name) { + if((opts->m_verbose || opts->m_list_not_cmp) && obj1_name && obj2_name) { parallel_print("Not comparable: <%s> and <%s> are of class %s\n", obj1_name, obj2_name, get_class(tclass2)); } /* end if */ - can_compare = 0; - options->not_cmp = 1; - goto done; + opts->not_cmp = 1; + HGOTO_DONE(0); case H5T_INTEGER: case H5T_FLOAT: @@ -697,10 +677,10 @@ int diff_can_type( hid_t f_tid1, /* file data type */ } /* end switch */ /*------------------------------------------------------------------------- - * check for equal file datatype; warning only - *------------------------------------------------------------------------- - */ - if((H5Tequal(f_tid1, f_tid2) == 0) && (options->m_verbose) && obj1_name && obj2_name) { + * check for equal file datatype; warning only + *------------------------------------------------------------------------- + */ + if((H5Tequal(f_tid1, f_tid2) == 0) && (opts->m_verbose) && obj1_name && obj2_name) { H5T_class_t cl = H5Tget_class(f_tid1); parallel_print("Warning: different storage datatype\n"); @@ -715,11 +695,11 @@ int diff_can_type( hid_t f_tid1, /* file data type */ } /*------------------------------------------------------------------------- - * check for the same rank - *------------------------------------------------------------------------- - */ + * check for the same rank + *------------------------------------------------------------------------- + */ if(rank1 != rank2) { - if((options->m_verbose || options->m_list_not_cmp) && obj1_name && obj2_name) { + if((opts->m_verbose || opts->m_list_not_cmp) && obj1_name && obj2_name) { parallel_print("Not comparable: <%s> has rank %d, dimensions ", obj1_name, rank1); print_dimensions(rank1, dims1); parallel_print(", max dimensions "); @@ -731,15 +711,14 @@ int diff_can_type( hid_t f_tid1, /* file data type */ print_dimensions(rank2, maxdim2); parallel_print("\n"); } - can_compare = 0; - options->not_cmp = 1; - goto done; + opts->not_cmp = 1; + HGOTO_DONE(0); } /*------------------------------------------------------------------------- - * check for different dimensions - *------------------------------------------------------------------------- - */ + * check for different dimensions + *------------------------------------------------------------------------- + */ for(i = 0; im_verbose || options->m_list_not_cmp) && obj1_name && obj2_name) { + if((opts->m_verbose || opts->m_list_not_cmp) && obj1_name && obj2_name) { parallel_print("Not comparable: <%s> has rank %d, dimensions ", obj1_name, rank1); print_dimensions(rank1, dims1); if(maxdim1 && maxdim2) { @@ -768,17 +747,16 @@ int diff_can_type( hid_t f_tid1, /* file data type */ parallel_print("\n"); } } - can_compare = 0; - options->not_cmp = 1; - goto done; + opts->not_cmp = 1; + HGOTO_DONE(0); } /*------------------------------------------------------------------------- - * maximum dimensions; just give a warning - *------------------------------------------------------------------------- - */ + * maximum dimensions; just give a warning + *------------------------------------------------------------------------- + */ if(maxdim1 && maxdim2 && maxdim_diff == 1 && obj1_name) { - if(options->m_verbose) { + if(opts->m_verbose) { parallel_print( "Warning: different maximum dimensions\n"); parallel_print("<%s> has max dimensions ", obj1_name); print_dimensions(rank1, maxdim1); @@ -793,21 +771,20 @@ int diff_can_type( hid_t f_tid1, /* file data type */ int nmembs1; int nmembs2; int j; - hid_t memb_type1; - hid_t memb_type2; + hid_t memb_type1 = -1; + hid_t memb_type2 = -1; nmembs1 = H5Tget_nmembers(f_tid1); nmembs2 = H5Tget_nmembers(f_tid2); if(nmembs1 != nmembs2) { - if((options->m_verbose || options->m_list_not_cmp) && obj1_name && obj2_name) { + if((opts->m_verbose || opts->m_list_not_cmp) && obj1_name && obj2_name) { parallel_print("Not comparable: <%s> has %d members ", obj1_name, nmembs1); parallel_print("<%s> has %d members ", obj2_name, nmembs2); parallel_print("\n"); } - can_compare = 0; - options->not_cmp = 1; - goto done; + opts->not_cmp = 1; + HGOTO_DONE(0); } for (j = 0; j < nmembs1; j++) { @@ -816,30 +793,31 @@ int diff_can_type( hid_t f_tid1, /* file data type */ if (diff_can_type(memb_type1, memb_type2, rank1, rank2, dims1, dims2, maxdim1, maxdim2, obj1_name, obj2_name, - options, 1) != 1) { - can_compare = 0; - options->not_cmp = 1; + opts, 1) != 1) { + opts->not_cmp = 1; H5Tclose(memb_type1); H5Tclose(memb_type2); - goto done; + HGOTO_DONE(0); } H5Tclose(memb_type1); H5Tclose(memb_type2); } } done: - h5diffdebug2("diff_can_type end - %d\n", can_compare); - return can_compare; + if (ret_value < 0) + opts->err_stat = 1; + + h5diffdebug2("diff_can_type end - %d\n", ret_value); + return ret_value; } /*------------------------------------------------------------------------- -* Function: print_sizes -* -* Purpose: Print datatype sizes -* -*------------------------------------------------------------------------- -*/ + * Function: print_sizes + * + * Purpose: Print datatype sizes + *------------------------------------------------------------------------- + */ #if defined (H5DIFF_DEBUG) void print_sizes( const char *obj1, const char *obj2, diff --git a/tools/lib/h5diff_util.c b/tools/lib/h5diff_util.c index ad23ccf..d4fc3a2 100644 --- a/tools/lib/h5diff_util.c +++ b/tools/lib/h5diff_util.c @@ -24,8 +24,7 @@ int g_nTasks = 1; /*------------------------------------------------------------------------- * Function: print_dimensions * - * Purpose: print dimensions - * + * Purpose: print dimensions *------------------------------------------------------------------------- */ void @@ -33,14 +32,14 @@ print_dimensions (int rank, hsize_t *dims) { int i; - if( rank <= 0 ) + if(rank <= 0) parallel_print("H5S_SCALAR" ); else { if (!dims) parallel_print("dimension is NULL"); else { parallel_print("["); - for ( i = 0; i < rank-1; i++) { + for (i = 0; i < rank-1; i++) { parallel_print(HSIZE_T_FORMAT, dims[i]); parallel_print("x"); } @@ -55,16 +54,11 @@ print_dimensions (int rank, hsize_t *dims) /*------------------------------------------------------------------------- * Function: print_type * - * Purpose: Print name of datatype - * - * Return: void - * - * Programmer: Pedro Vicente, pvn@ncsa.uiuc.edu + * Purpose: Print name of datatype * - * Date: May 9, 2003 - * - * Comments: Adapted from h5dump for H5T_INTEGER and H5T_FLOAT classes only + * Return: void * + * Comments: Adapted from h5dump for H5T_INTEGER and H5T_FLOAT classes only *------------------------------------------------------------------------- */ void print_type(hid_t type) @@ -188,12 +182,7 @@ void print_type(hid_t type) /*------------------------------------------------------------------------- * Function: diff_basename * - * Purpose: Returns a pointer to the last component absolute name - * - * Programmer: Pedro Vicente, pvn@ncsa.uiuc.edu - * - * Date: May 9, 2003 - * + * Purpose: Returns a pointer to the last component absolute name *------------------------------------------------------------------------- */ H5_ATTR_PURE const char* @@ -219,12 +208,7 @@ diff_basename(const char *name) /*------------------------------------------------------------------------- * Function: get_type * - * Purpose: Returns the type as a string - * - * Programmer: Pedro Vicente, pvn@ncsa.uiuc.edu - * - * Date: May 9, 2003 - * + * Purpose: Returns the type as a string *------------------------------------------------------------------------- */ H5_ATTR_PURE H5_ATTR_CONST const char* @@ -255,21 +239,13 @@ get_type(h5trav_type_t type) /*------------------------------------------------------------------------- * Function: get_sign * - * Purpose: Returns the sign as a string - * - * Programmer: Pedro Vicente, pvn@ncsa.uiuc.edu - * - * Date: May 9, 2003 - * - * Comments: - * + * Purpose: Returns the sign as a string *------------------------------------------------------------------------- */ H5_ATTR_PURE const char* get_sign(H5T_sign_t sign) { - switch(sign) - { + switch(sign) { case H5T_SGN_NONE: return "H5T_SGN_NONE"; @@ -291,12 +267,7 @@ get_sign(H5T_sign_t sign) /*------------------------------------------------------------------------- * Function: get_class * - * Purpose: Returns the class as a string - * - * Programmer: Pedro Vicente, pvn@ncsa.uiuc.edu - * - * Date: May 9, 2003 - * + * Purpose: Returns the class as a string *------------------------------------------------------------------------- */ H5_ATTR_PURE const char* @@ -346,8 +317,7 @@ get_class(H5T_class_t tclass) /*------------------------------------------------------------------------- * Function: print_found * - * Purpose: print number of differences found - * + * Purpose: print number of differences found *------------------------------------------------------------------------- */ void print_found(hsize_t nfound) @@ -362,43 +332,37 @@ void print_found(hsize_t nfound) /*----------------------------------------------------------------- * Function: match_up_memsize * - * Purpose: match smaller memory size up to bigger memory size + * Purpose: match smaller memory size up to bigger memory size *------------------------------------------------------------------ */ herr_t match_up_memsize (hid_t f_tid1_id, hid_t f_tid2_id, hid_t *m_tid1, hid_t *m_tid2, size_t *m_size1, size_t *m_size2) { - herr_t ret = SUCCEED; + herr_t ret_value = SUCCEED; if((*m_size1) != (*m_size2)) { if((*m_size1) < (*m_size2)) { - H5Tclose( *m_tid1 ); + H5Tclose(*m_tid1); - if(((*m_tid1) = H5Tget_native_type(f_tid2_id, H5T_DIR_DEFAULT)) < 0) { - ret = FAIL; - goto out; - } + if(((*m_tid1) = H5Tget_native_type(f_tid2_id, H5T_DIR_DEFAULT)) < 0) + HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Tget_native_type failed"); - *m_size1 = H5Tget_size( *m_tid1 ); + *m_size1 = H5Tget_size(*m_tid1); } /* end if */ else { H5Tclose(*m_tid2); - if(((*m_tid2) = H5Tget_native_type(f_tid1_id, H5T_DIR_DEFAULT)) < 0) { - ret = FAIL; - goto out; - } + if(((*m_tid2) = H5Tget_native_type(f_tid1_id, H5T_DIR_DEFAULT)) < 0) + HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Tget_native_type failed"); *m_size2 = H5Tget_size(*m_tid2); } /* end else */ } /* end if */ - if((*m_size1) != (*m_size2)) { - ret = FAIL; - goto out; - } + if((*m_size1) != (*m_size2)) + HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "native type sizes do not compare"); -out: - return ret; +done: + return ret_value; } diff --git a/tools/lib/h5tools_dump.c b/tools/lib/h5tools_dump.c index fb79b77..f987296 100644 --- a/tools/lib/h5tools_dump.c +++ b/tools/lib/h5tools_dump.c @@ -642,8 +642,7 @@ h5tools_dump_region_data_blocks(hid_t region_space, hid_t region_id, alloc_size = nblocks * ndims * 2 * sizeof(ptdata[0]); HDassert(alloc_size == (hsize_t) ((size_t) alloc_size)); /*check for overflow*/ - if((ptdata = (hsize_t*) HDmalloc((size_t) alloc_size)) == NULL) - { + if((ptdata = (hsize_t*) HDmalloc((size_t) alloc_size)) == NULL) { HERROR(H5E_tools_g, H5E_tools_min_id_g, "Could not allocate buffer for ptdata"); HGOTO_DONE(dimension_break); } @@ -1910,9 +1909,8 @@ h5tools_print_datatype(FILE *stream, h5tools_str_t *buffer, const h5tool_format_ obj = search_obj(h5dump_type_table, oinfo.addr); if(obj) { - if(!obj->recorded) { + if(!obj->recorded) h5tools_str_append(buffer,"\"/#"H5_PRINTF_HADDR_FMT"\"", obj->objno); - } else h5tools_str_append(buffer, "\"%s\"", obj->objname); } @@ -1929,121 +1927,86 @@ h5tools_print_datatype(FILE *stream, h5tools_str_t *buffer, const h5tool_format_ switch (type_class) { case H5T_INTEGER: - if (H5Tequal(type, H5T_STD_I8BE) == TRUE) { + if (H5Tequal(type, H5T_STD_I8BE) == TRUE) h5tools_str_append(buffer, "H5T_STD_I8BE"); - } - else if (H5Tequal(type, H5T_STD_I8LE) == TRUE) { + else if (H5Tequal(type, H5T_STD_I8LE) == TRUE) h5tools_str_append(buffer, "H5T_STD_I8LE"); - } - else if (H5Tequal(type, H5T_STD_I16BE) == TRUE) { + else if (H5Tequal(type, H5T_STD_I16BE) == TRUE) h5tools_str_append(buffer, "H5T_STD_I16BE"); - } - else if (H5Tequal(type, H5T_STD_I16LE) == TRUE) { + else if (H5Tequal(type, H5T_STD_I16LE) == TRUE) h5tools_str_append(buffer, "H5T_STD_I16LE"); - } - else if (H5Tequal(type, H5T_STD_I32BE) == TRUE) { + else if (H5Tequal(type, H5T_STD_I32BE) == TRUE) h5tools_str_append(buffer, "H5T_STD_I32BE"); - } - else if (H5Tequal(type, H5T_STD_I32LE) == TRUE) { + else if (H5Tequal(type, H5T_STD_I32LE) == TRUE) h5tools_str_append(buffer, "H5T_STD_I32LE"); - } - else if (H5Tequal(type, H5T_STD_I64BE) == TRUE) { + else if (H5Tequal(type, H5T_STD_I64BE) == TRUE) h5tools_str_append(buffer, "H5T_STD_I64BE"); - } - else if (H5Tequal(type, H5T_STD_I64LE) == TRUE) { + else if (H5Tequal(type, H5T_STD_I64LE) == TRUE) h5tools_str_append(buffer, "H5T_STD_I64LE"); - } - else if (H5Tequal(type, H5T_STD_U8BE) == TRUE) { + else if (H5Tequal(type, H5T_STD_U8BE) == TRUE) h5tools_str_append(buffer, "H5T_STD_U8BE"); - } - else if (H5Tequal(type, H5T_STD_U8LE) == TRUE) { + else if (H5Tequal(type, H5T_STD_U8LE) == TRUE) h5tools_str_append(buffer, "H5T_STD_U8LE"); - } - else if (H5Tequal(type, H5T_STD_U16BE) == TRUE) { + else if (H5Tequal(type, H5T_STD_U16BE) == TRUE) h5tools_str_append(buffer, "H5T_STD_U16BE"); - } - else if (H5Tequal(type, H5T_STD_U16LE) == TRUE) { + else if (H5Tequal(type, H5T_STD_U16LE) == TRUE) h5tools_str_append(buffer, "H5T_STD_U16LE"); - } - else if (H5Tequal(type, H5T_STD_U32BE) == TRUE) { + else if (H5Tequal(type, H5T_STD_U32BE) == TRUE) h5tools_str_append(buffer, "H5T_STD_U32BE"); - } - else if (H5Tequal(type, H5T_STD_U32LE) == TRUE) { + else if (H5Tequal(type, H5T_STD_U32LE) == TRUE) h5tools_str_append(buffer, "H5T_STD_U32LE"); - } - else if (H5Tequal(type, H5T_STD_U64BE) == TRUE) { + else if (H5Tequal(type, H5T_STD_U64BE) == TRUE) h5tools_str_append(buffer, "H5T_STD_U64BE"); - } - else if (H5Tequal(type, H5T_STD_U64LE) == TRUE) { + else if (H5Tequal(type, H5T_STD_U64LE) == TRUE) h5tools_str_append(buffer, "H5T_STD_U64LE"); - } - else if (H5Tequal(type, H5T_NATIVE_SCHAR) == TRUE) { + else if (H5Tequal(type, H5T_NATIVE_SCHAR) == TRUE) h5tools_str_append(buffer, "H5T_NATIVE_SCHAR"); - } - else if (H5Tequal(type, H5T_NATIVE_UCHAR) == TRUE) { + else if (H5Tequal(type, H5T_NATIVE_UCHAR) == TRUE) h5tools_str_append(buffer, "H5T_NATIVE_UCHAR"); - } - else if (H5Tequal(type, H5T_NATIVE_SHORT) == TRUE) { + else if (H5Tequal(type, H5T_NATIVE_SHORT) == TRUE) h5tools_str_append(buffer, "H5T_NATIVE_SHORT"); - } - else if (H5Tequal(type, H5T_NATIVE_USHORT) == TRUE) { + else if (H5Tequal(type, H5T_NATIVE_USHORT) == TRUE) h5tools_str_append(buffer, "H5T_NATIVE_USHORT"); - } - else if (H5Tequal(type, H5T_NATIVE_INT) == TRUE) { + else if (H5Tequal(type, H5T_NATIVE_INT) == TRUE) h5tools_str_append(buffer, "H5T_NATIVE_INT"); - } - else if (H5Tequal(type, H5T_NATIVE_UINT) == TRUE) { + else if (H5Tequal(type, H5T_NATIVE_UINT) == TRUE) h5tools_str_append(buffer, "H5T_NATIVE_UINT"); - } - else if (H5Tequal(type, H5T_NATIVE_LONG) == TRUE) { + else if (H5Tequal(type, H5T_NATIVE_LONG) == TRUE) h5tools_str_append(buffer, "H5T_NATIVE_LONG"); - } - else if (H5Tequal(type, H5T_NATIVE_ULONG) == TRUE) { + else if (H5Tequal(type, H5T_NATIVE_ULONG) == TRUE) h5tools_str_append(buffer, "H5T_NATIVE_ULONG"); - } - else if (H5Tequal(type, H5T_NATIVE_LLONG) == TRUE) { + else if (H5Tequal(type, H5T_NATIVE_LLONG) == TRUE) h5tools_str_append(buffer, "H5T_NATIVE_LLONG"); - } - else if (H5Tequal(type, H5T_NATIVE_ULLONG) == TRUE) { + else if (H5Tequal(type, H5T_NATIVE_ULLONG) == TRUE) h5tools_str_append(buffer, "H5T_NATIVE_ULLONG"); - } else { /* byte order */ if (H5Tget_size(type) > 1) { order = H5Tget_order(type); - if (H5T_ORDER_LE == order) { + if (H5T_ORDER_LE == order) order_s = " little-endian"; - } - else if (H5T_ORDER_BE == order) { + else if (H5T_ORDER_BE == order) order_s = " big-endian"; - } - else if (H5T_ORDER_VAX == order) { + else if (H5T_ORDER_VAX == order) order_s = " mixed-endian"; - } - else { + else order_s = " unknown-byte-order"; - } } - else { + else order_s = ""; - } /* sign */ if ((sign = H5Tget_sign(type)) >= 0) { - if (H5T_SGN_NONE == sign) { + if (H5T_SGN_NONE == sign) sign_s = " unsigned"; - } - else if (H5T_SGN_2 == sign) { + else if (H5T_SGN_2 == sign) sign_s = ""; - } - else { + else sign_s = " unknown-sign"; - } } - else { + else sign_s = " unknown-sign"; - } /* print size, order, and sign */ h5tools_str_append(buffer, "%lu-bit%s%s integer", @@ -2052,56 +2015,42 @@ h5tools_print_datatype(FILE *stream, h5tools_str_t *buffer, const h5tool_format_ break; case H5T_FLOAT: - if (H5Tequal(type, H5T_IEEE_F32BE) == TRUE) { + if (H5Tequal(type, H5T_IEEE_F32BE) == TRUE) h5tools_str_append(buffer, "H5T_IEEE_F32BE"); - } - else if (H5Tequal(type, H5T_IEEE_F32LE) == TRUE) { + else if (H5Tequal(type, H5T_IEEE_F32LE) == TRUE) h5tools_str_append(buffer, "H5T_IEEE_F32LE"); - } - else if (H5Tequal(type, H5T_IEEE_F64BE) == TRUE) { + else if (H5Tequal(type, H5T_IEEE_F64BE) == TRUE) h5tools_str_append(buffer, "H5T_IEEE_F64BE"); - } - else if (H5Tequal(type, H5T_IEEE_F64LE) == TRUE) { + else if (H5Tequal(type, H5T_IEEE_F64LE) == TRUE) h5tools_str_append(buffer, "H5T_IEEE_F64LE"); - } - else if (H5Tequal(type, H5T_VAX_F32) == TRUE) { + else if (H5Tequal(type, H5T_VAX_F32) == TRUE) h5tools_str_append(buffer, "H5T_VAX_F32"); - } - else if (H5Tequal(type, H5T_VAX_F64) == TRUE) { + else if (H5Tequal(type, H5T_VAX_F64) == TRUE) h5tools_str_append(buffer, "H5T_VAX_F64"); - } - else if (H5Tequal(type, H5T_NATIVE_FLOAT) == TRUE) { + else if (H5Tequal(type, H5T_NATIVE_FLOAT) == TRUE) h5tools_str_append(buffer, "H5T_NATIVE_FLOAT"); - } - else if (H5Tequal(type, H5T_NATIVE_DOUBLE) == TRUE) { + 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) { + else if (H5Tequal(type, H5T_NATIVE_LDOUBLE) == TRUE) h5tools_str_append(buffer, "H5T_NATIVE_LDOUBLE"); #endif - } else { /* byte order */ if (H5Tget_size(type) > 1) { order = H5Tget_order(type); - if (H5T_ORDER_LE == order) { + if (H5T_ORDER_LE == order) order_s = " little-endian"; - } - else if (H5T_ORDER_BE == order) { + else if (H5T_ORDER_BE == order) order_s = " big-endian"; - } - else if (H5T_ORDER_VAX == order) { + else if (H5T_ORDER_VAX == order) order_s = " mixed-endian"; - } - else { + else order_s = " unknown-byte-order"; - } } - else { + else order_s = ""; - } /* print size and byte order */ h5tools_str_append(buffer, "%lu-bit%s floating-point", @@ -2308,33 +2257,24 @@ h5tools_print_datatype(FILE *stream, h5tools_str_t *buffer, const h5tool_format_ break; case H5T_BITFIELD: - if (H5Tequal(type, H5T_STD_B8BE) == TRUE) { + if (H5Tequal(type, H5T_STD_B8BE) == TRUE) h5tools_str_append(buffer, "H5T_STD_B8BE"); - } - else if (H5Tequal(type, H5T_STD_B8LE) == TRUE) { + else if (H5Tequal(type, H5T_STD_B8LE) == TRUE) h5tools_str_append(buffer, "H5T_STD_B8LE"); - } - else if (H5Tequal(type, H5T_STD_B16BE) == TRUE) { + else if (H5Tequal(type, H5T_STD_B16BE) == TRUE) h5tools_str_append(buffer, "H5T_STD_B16BE"); - } - else if (H5Tequal(type, H5T_STD_B16LE) == TRUE) { + else if (H5Tequal(type, H5T_STD_B16LE) == TRUE) h5tools_str_append(buffer, "H5T_STD_B16LE"); - } - else if (H5Tequal(type, H5T_STD_B32BE) == TRUE) { + else if (H5Tequal(type, H5T_STD_B32BE) == TRUE) h5tools_str_append(buffer, "H5T_STD_B32BE"); - } - else if (H5Tequal(type, H5T_STD_B32LE) == TRUE) { + else if (H5Tequal(type, H5T_STD_B32LE) == TRUE) h5tools_str_append(buffer, "H5T_STD_B32LE"); - } - else if (H5Tequal(type, H5T_STD_B64BE) == TRUE) { + else if (H5Tequal(type, H5T_STD_B64BE) == TRUE) h5tools_str_append(buffer, "H5T_STD_B64BE"); - } - else if (H5Tequal(type, H5T_STD_B64LE) == TRUE) { + else if (H5Tequal(type, H5T_STD_B64LE) == TRUE) h5tools_str_append(buffer, "H5T_STD_B64LE"); - } - else { + else h5tools_str_append(buffer, "undefined bitfield"); - } break; case H5T_OPAQUE: diff --git a/tools/lib/h5tools_filters.c b/tools/lib/h5tools_filters.c index abd55db..db61d51 100644 --- a/tools/lib/h5tools_filters.c +++ b/tools/lib/h5tools_filters.c @@ -18,28 +18,32 @@ * print a warning message *------------------------------------------------------------------------- */ -static void print_warning(const char *dname, const char *fname) +static void print_filter_warning(const char *dname, const char *fname) { fprintf(stderr, - "warning: dataset <%s> cannot be read, %s filter is not available\n", + "Warning: dataset <%s> cannot be read, %s filter is not available\n", dname, fname); } /*------------------------------------------------------------------------- * Function: h5tools_canreadf * - * Purpose: check if the dataset creation property list has filters that - * are not registered in the current configuration - * 1) the external filters GZIP and SZIP might not be available - * 2) the internal filters might be turned off + * Purpose: check if the dataset creation property list has filters that + * are not registered in the current configuration + * 1) the external filters GZIP and SZIP might not be available + * 2) the internal filters might be turned off * - * Return: 1, can read, 0, cannot, -1 error + * Return: + * 1 can read, + * 0 cannot, + * -1 error *------------------------------------------------------------------------- */ -int h5tools_canreadf(const char* name, /* object name, serves also as boolean print */ +int +h5tools_canreadf(const char* name, /* object name, serves also as boolean print */ hid_t dcpl_id) /* dataset creation property list */ { - int ret_value = 1; /*no need to LEAVE() on ERROR: HERR_INIT(int, SUCCEED) */ + int ret_value = 1; int nfilters; /* number of filters */ H5Z_filter_t filtn; /* filter identification number */ int i; /* index */ @@ -69,7 +73,7 @@ int h5tools_canreadf(const char* name, /* object name, serves also as boolean pr } else if (!udfilter_avail) { if (name) - print_warning(name, "user defined"); + print_filter_warning(name, "user defined"); ret_value = 0; } break; @@ -81,7 +85,7 @@ int h5tools_canreadf(const char* name, /* object name, serves also as boolean pr case H5Z_FILTER_DEFLATE: #ifndef H5_HAVE_FILTER_DEFLATE if (name) - print_warning(name,"deflate"); + print_filter_warning(name,"deflate"); ret_value = 0; #endif break; @@ -92,7 +96,7 @@ int h5tools_canreadf(const char* name, /* object name, serves also as boolean pr case H5Z_FILTER_SZIP: #ifndef H5_HAVE_FILTER_SZIP if (name) - print_warning(name,"SZIP"); + print_filter_warning(name,"SZIP"); ret_value = 0; #endif break; @@ -130,56 +134,58 @@ done: /*------------------------------------------------------------------------- * Function: h5tools_canwritef * - * Purpose: check if the filter is available and can write data. - * At this time, all filters that are available can write data, - * except SZIP, which may be configured decoder-only. + * Purpose: check if the filter is available and can write data. * - * Return: 1, can write, 0, cannot, -1 error + * Return: 1 can write, + * 0 cannot, + * -1 error *------------------------------------------------------------------------- */ H5_ATTR_CONST int -h5tools_can_encode(H5Z_filter_t filtn) { +h5tools_can_encode(H5Z_filter_t filtn) +{ + int ret_value = 1; + switch (filtn) { /* user defined filter */ default: - return 0; - + HGOTO_DONE(0) case H5Z_FILTER_DEFLATE: #ifndef H5_HAVE_FILTER_DEFLATE - return 0; + HGOTO_DONE(0) #endif break; case H5Z_FILTER_SZIP: #ifndef H5_HAVE_FILTER_SZIP - return 0; + HGOTO_DONE(0) #else - { + { unsigned int filter_config_flags; if (H5Zget_filter_info(filtn, &filter_config_flags) < 0) - return -1; + HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Zget_filter_info failed"); if ((filter_config_flags & (H5Z_FILTER_CONFIG_ENCODE_ENABLED | H5Z_FILTER_CONFIG_DECODE_ENABLED)) == 0) { /* filter present but neither encode nor decode is supported (???) */ - return -1; + HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "neither encode nor decode is supported"); } else if ((filter_config_flags & (H5Z_FILTER_CONFIG_ENCODE_ENABLED | H5Z_FILTER_CONFIG_DECODE_ENABLED)) == H5Z_FILTER_CONFIG_DECODE_ENABLED) { /* decoder only: read but not write */ - return 0; + HGOTO_DONE(0) } else if ((filter_config_flags & (H5Z_FILTER_CONFIG_ENCODE_ENABLED | H5Z_FILTER_CONFIG_DECODE_ENABLED)) == H5Z_FILTER_CONFIG_ENCODE_ENABLED) { /* encoder only: write but not read (???) */ - return -1; + HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "encoder only: write but not read"); } else if ((filter_config_flags & (H5Z_FILTER_CONFIG_ENCODE_ENABLED | H5Z_FILTER_CONFIG_DECODE_ENABLED)) == (H5Z_FILTER_CONFIG_ENCODE_ENABLED | H5Z_FILTER_CONFIG_DECODE_ENABLED)) { - return 1; + HGOTO_DONE(1) } - } + } #endif break; @@ -196,6 +202,7 @@ h5tools_can_encode(H5Z_filter_t filtn) { break; }/*switch*/ - return 1; +done: + return ret_value; } diff --git a/tools/lib/h5tools_type.c b/tools/lib/h5tools_type.c index ee58ccb..f63c228 100644 --- a/tools/lib/h5tools_type.c +++ b/tools/lib/h5tools_type.c @@ -21,12 +21,6 @@ * * Return: Success: datatype ID * Failure: FAIL - * - * Programmer: Pedro Vicente Nunes - * Tuesday, July 18, 2006 - * - * Modifications: - * *------------------------------------------------------------------------- */ hid_t @@ -43,40 +37,40 @@ h5tools_get_little_endian_type(hid_t tid) switch(type_class) { case H5T_INTEGER: - if ( size == 1 && sign == H5T_SGN_2) - p_type=H5Tcopy(H5T_STD_I8LE); - else if ( size == 2 && sign == H5T_SGN_2) - p_type=H5Tcopy(H5T_STD_I16LE); - else if ( size == 4 && sign == H5T_SGN_2) - p_type=H5Tcopy(H5T_STD_I32LE); - else if ( size == 8 && sign == H5T_SGN_2) - p_type=H5Tcopy(H5T_STD_I64LE); - else if ( size == 1 && sign == H5T_SGN_NONE) - p_type=H5Tcopy(H5T_STD_U8LE); - else if ( size == 2 && sign == H5T_SGN_NONE) - p_type=H5Tcopy(H5T_STD_U16LE); - else if ( size == 4 && sign == H5T_SGN_NONE) - p_type=H5Tcopy(H5T_STD_U32LE); - else if ( size == 8 && sign == H5T_SGN_NONE) - p_type=H5Tcopy(H5T_STD_U64LE); + if (size == 1 && sign == H5T_SGN_2) + p_type = H5Tcopy(H5T_STD_I8LE); + else if (size == 2 && sign == H5T_SGN_2) + p_type = H5Tcopy(H5T_STD_I16LE); + else if (size == 4 && sign == H5T_SGN_2) + p_type = H5Tcopy(H5T_STD_I32LE); + else if (size == 8 && sign == H5T_SGN_2) + p_type = H5Tcopy(H5T_STD_I64LE); + else if (size == 1 && sign == H5T_SGN_NONE) + p_type = H5Tcopy(H5T_STD_U8LE); + else if (size == 2 && sign == H5T_SGN_NONE) + p_type = H5Tcopy(H5T_STD_U16LE); + else if (size == 4 && sign == H5T_SGN_NONE) + p_type = H5Tcopy(H5T_STD_U32LE); + else if (size == 8 && sign == H5T_SGN_NONE) + p_type = H5Tcopy(H5T_STD_U64LE); break; case H5T_FLOAT: - if ( size == 4) - p_type=H5Tcopy(H5T_IEEE_F32LE); - else if ( size == 8) - p_type=H5Tcopy(H5T_IEEE_F64LE); + if (size == 4) + p_type = H5Tcopy(H5T_IEEE_F32LE); + else if (size == 8) + p_type = H5Tcopy(H5T_IEEE_F64LE); break; case H5T_BITFIELD: - if ( size == 1) - p_type=H5Tcopy(H5T_STD_B8LE); - else if ( size == 2) - p_type=H5Tcopy(H5T_STD_B16LE); - else if ( size == 4) - p_type=H5Tcopy(H5T_STD_B32LE); - else if ( size == 8) - p_type=H5Tcopy(H5T_STD_B64LE); + if (size == 1) + p_type = H5Tcopy(H5T_STD_B8LE); + else if (size == 2) + p_type = H5Tcopy(H5T_STD_B16LE); + else if (size == 4) + p_type = H5Tcopy(H5T_STD_B32LE); + else if (size == 8) + p_type = H5Tcopy(H5T_STD_B64LE); break; case H5T_TIME: @@ -107,18 +101,12 @@ h5tools_get_little_endian_type(hid_t tid) * * Return: Success: datatype ID * Failure: FAIL - * - * Programmer: Pedro Vicente Nunes - * Tuesday, July 18, 2006 - * - * Modifications: - * *------------------------------------------------------------------------- */ hid_t h5tools_get_big_endian_type(hid_t tid) { - hid_t p_type=-1; + hid_t p_type = -1; H5T_class_t type_class; size_t size; H5T_sign_t sign; @@ -129,39 +117,39 @@ h5tools_get_big_endian_type(hid_t tid) switch(type_class) { case H5T_INTEGER: - if ( size == 1 && sign == H5T_SGN_2) - p_type=H5Tcopy(H5T_STD_I8BE); - else if ( size == 2 && sign == H5T_SGN_2) - p_type=H5Tcopy(H5T_STD_I16BE); - else if ( size == 4 && sign == H5T_SGN_2) - p_type=H5Tcopy(H5T_STD_I32BE); - else if ( size == 8 && sign == H5T_SGN_2) - p_type=H5Tcopy(H5T_STD_I64BE); - else if ( size == 1 && sign == H5T_SGN_NONE) - p_type=H5Tcopy(H5T_STD_U8BE); - else if ( size == 2 && sign == H5T_SGN_NONE) - p_type=H5Tcopy(H5T_STD_U16BE); - else if ( size == 4 && sign == H5T_SGN_NONE) - p_type=H5Tcopy(H5T_STD_U32BE); - else if ( size == 8 && sign == H5T_SGN_NONE) - p_type=H5Tcopy(H5T_STD_U64BE); + if (size == 1 && sign == H5T_SGN_2) + p_type = H5Tcopy(H5T_STD_I8BE); + else if (size == 2 && sign == H5T_SGN_2) + p_type = H5Tcopy(H5T_STD_I16BE); + else if (size == 4 && sign == H5T_SGN_2) + p_type = H5Tcopy(H5T_STD_I32BE); + else if (size == 8 && sign == H5T_SGN_2) + p_type = H5Tcopy(H5T_STD_I64BE); + else if (size == 1 && sign == H5T_SGN_NONE) + p_type = H5Tcopy(H5T_STD_U8BE); + else if (size == 2 && sign == H5T_SGN_NONE) + p_type = H5Tcopy(H5T_STD_U16BE); + else if (size == 4 && sign == H5T_SGN_NONE) + p_type = H5Tcopy(H5T_STD_U32BE); + else if (size == 8 && sign == H5T_SGN_NONE) + p_type = H5Tcopy(H5T_STD_U64BE); break; case H5T_FLOAT: - if ( size == 4) - p_type=H5Tcopy(H5T_IEEE_F32BE); - else if ( size == 8) - p_type=H5Tcopy(H5T_IEEE_F64BE); + if (size == 4) + p_type = H5Tcopy(H5T_IEEE_F32BE); + else if (size == 8) + p_type = H5Tcopy(H5T_IEEE_F64BE); break; case H5T_BITFIELD: - if ( size == 1) - p_type=H5Tcopy(H5T_STD_B8BE); - else if ( size == 2) - p_type=H5Tcopy(H5T_STD_B16BE); - else if ( size == 4) - p_type=H5Tcopy(H5T_STD_B32BE); - else if ( size == 8) + if (size == 1) + p_type = H5Tcopy(H5T_STD_B8BE); + else if (size == 2) + p_type = H5Tcopy(H5T_STD_B16BE); + else if (size == 4) + p_type = H5Tcopy(H5T_STD_B32BE); + else if (size == 8) p_type=H5Tcopy(H5T_STD_B64BE); break; diff --git a/tools/lib/h5tools_utils.c b/tools/lib/h5tools_utils.c index 8c435b2..1b5911b 100644 --- a/tools/lib/h5tools_utils.c +++ b/tools/lib/h5tools_utils.c @@ -58,15 +58,11 @@ static void add_obj(table_t *table, haddr_t objno, const char *objname, hbool_t /*------------------------------------------------------------------------- * Function: parallel_print * - * Purpose: wrapper for printf for use in parallel mode. - * - * Programmer: Leon Arber - * - * Date: December 1, 2004 - * + * Purpose: wrapper for printf for use in parallel mode. *------------------------------------------------------------------------- */ -void parallel_print(const char* format, ...) +void +parallel_print(const char* format, ...) { int bytes_written; va_list ap; @@ -103,18 +99,12 @@ void parallel_print(const char* format, ...) /*------------------------------------------------------------------------- - * Function: error_msg + * Function: error_msg * - * Purpose: Print a nicely formatted error message to stderr flushing the + * Purpose: Print a nicely formatted error message to stderr flushing the * stdout stream first. * - * Return: Nothing - * - * Programmer: Bill Wendling - * Tuesday, 20. February 2001 - * - * Modifications: - * + * Return: Nothing *------------------------------------------------------------------------- */ void @@ -134,18 +124,12 @@ error_msg(const char *fmt, ...) /*------------------------------------------------------------------------- - * Function: warn_msg + * Function: warn_msg * - * Purpose: Print a nicely formatted warning message to stderr flushing + * Purpose: Print a nicely formatted warning message to stderr flushing * the stdout stream first. * - * Return: Nothing - * - * Programmer: Bill Wendling - * Tuesday, 20. February 2001 - * - * Modifications: - * + * Return: Nothing *------------------------------------------------------------------------- */ void @@ -163,14 +147,11 @@ warn_msg(const char *fmt, ...) } /*------------------------------------------------------------------------- - * Function: help_ref_msg + * Function: help_ref_msg * - * Purpose: Print a message to refer help page - * - * Return: Nothing - * - * Modifications: + * Purpose: Print a message to refer help page * + * Return: Nothing *------------------------------------------------------------------------- */ void @@ -182,24 +163,16 @@ help_ref_msg(FILE *output) /*------------------------------------------------------------------------- - * Function: get_option + * Function: get_option * - * Purpose: Determine the command-line options a user specified. We can - * accept both short and long type command-lines. + * Purpose: Determine the command-line options a user specified. We can + * accept both short and long type command-lines. * * Return: Success: The short valued "name" of the command line * parameter or EOF if there are no more * parameters to process. * - * Failure: A question mark. - * - * Programmer: Bill Wendling - * Friday, 5. January 2001 - * - * Modifications: Pedro Vicente - * October, 27 2008 - * Wilcard "*" argument type - * + * Failure: A question mark. *------------------------------------------------------------------------- */ int @@ -232,9 +205,8 @@ get_option(int argc, const char **argv, const char *opts, const struct long_opti opt_opt = l_opts[i].shortval; if (l_opts[i].has_arg != no_arg) { - if (arg[len] == '=') { + 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] != '-') @@ -323,16 +295,13 @@ get_option(int argc, const char **argv, const char *opts, const struct long_opti opt_ind++; /* we do have an extra argument, check if not last */ if ( (opt_ind+1) < argc ) { - if ( argv[opt_ind][0] != '-' ) { + if ( argv[opt_ind][0] != '-' ) opt_arg = argv[opt_ind++]; - } - else { + else opt_arg = NULL; - } } - else { + else opt_arg = NULL; - } } else { /* set up to look at next char in token, next time */ @@ -351,16 +320,11 @@ get_option(int argc, const char **argv, const char *opts, const struct long_opti /*------------------------------------------------------------------------- - * Function: indentation + * Function: indentation * - * Purpose: Print spaces for indentation - * - * Return: void - * - * Programmer: Ruey-Hsia Li - * - * Modifications: + * Purpose: Print spaces for indentation * + * Return: void *------------------------------------------------------------------------- */ void @@ -378,17 +342,12 @@ indentation(unsigned x) /*------------------------------------------------------------------------- - * Function: print_version + * Function: print_version * - * Purpose: Print the program name and the version information which is - * defined the same as the HDF5 library version. - * - * Return: void - * - * Programmer: unknown - * - * Modifications: + * Purpose: Print the program name and the version information which is + * defined the same as the HDF5 library version. * + * Return: void *------------------------------------------------------------------------- */ void @@ -407,11 +366,6 @@ print_version(const char *progname) * and committed types * * Return: void - * - * Programmer: Ruey-Hsia Li - * - * Modifications: - * *------------------------------------------------------------------------- */ static void @@ -434,11 +388,6 @@ init_table(table_t **tbl) * and committed types * * Return: void - * - * Programmer: Paul Harten - * - * Modifications: - * *------------------------------------------------------------------------- */ void @@ -462,11 +411,6 @@ free_table(table_t *table) * Purpose: display the contents of tables for debugging purposes * * Return: void - * - * Programmer: Ruey-Hsia Li - * - * Modifications: - * *------------------------------------------------------------------------- */ static void @@ -488,11 +432,6 @@ dump_table(char* tablename, table_t *table) * Purpose: display the contents of tables for debugging purposes * * Return: void - * - * Programmer: Ruey-Hsia Li - * - * Modifications: - * *------------------------------------------------------------------------- */ void @@ -513,11 +452,6 @@ dump_tables(find_objs_t *info) * Return: Success: an integer, the location of the object * * Failure: FAIL if object is not found - * - * Programmer: Ruey-Hsia Li - * - * Modifications: - * *------------------------------------------------------------------------- */ H5_ATTR_PURE obj_t * @@ -541,11 +475,6 @@ search_obj(table_t *table, haddr_t objno) * Return: Success: SUCCEED * * Failure: FAIL - * - * Programmer: Ruey-Hsia Li - * - * Modifications: - * *------------------------------------------------------------------------- */ static herr_t @@ -623,11 +552,6 @@ find_objs_cb(const char *name, const H5O_info_t *oinfo, const char *already_seen * Return: Success: SUCCEED * * Failure: FAIL - * - * Programmer: Ruey-Hsia Li - * - * Modifications: - * *------------------------------------------------------------------------- */ herr_t @@ -657,11 +581,6 @@ init_objs(hid_t fid, find_objs_t *info, table_t **group_table, * realloc the table if necessary * * Return: void - * - * Programmer: Ruey-Hsia Li - * - * Modifications: - * *------------------------------------------------------------------------- */ static void @@ -695,11 +614,6 @@ add_obj(table_t *table, haddr_t objno, const char *objname, hbool_t record) * * Return: a stream description when succeeds. * NULL if fails. - * - * Programmer: Albert Cheng, 2005/8/9 - * - * Modifications: - * *------------------------------------------------------------------------- */ FILE * @@ -723,70 +637,61 @@ tmpfile(void) * * Return: * 2 : given pathname is object - * 1 : Succed to get link info. + * 1 : Succeed to get link info. * 0 : Detected as a dangling link * -1 : H5 API failed. * * NOTE: * link_info->trg_path must be freed out of this function - * - * Programmer: Jonathan Kim - * - * Date: Feb 8, 2010 *-------------------------------------------------------------------------*/ int -H5tools_get_symlink_info(hid_t file_id, const char * linkpath, h5tool_link_info_t *link_info, - hbool_t get_obj_type) +H5tools_get_symlink_info(hid_t file_id, const char * linkpath, h5tool_link_info_t *link_info, hbool_t get_obj_type) { htri_t l_ret; H5O_info_t trg_oinfo; hid_t fapl = H5P_DEFAULT; hid_t lapl = H5P_DEFAULT; - int ret = -1; /* init to fail */ + int ret_value = -1; /* init to fail */ /* init */ link_info->trg_type = H5O_TYPE_UNKNOWN; /* if path is root, return group type */ - if(!HDstrcmp(linkpath,"/")) - { + if(!HDstrcmp(linkpath,"/")) { link_info->trg_type = H5O_TYPE_GROUP; - ret = 2; - goto out; + HGOTO_DONE(2); } /* check if link itself exist */ if(H5Lexists(file_id, linkpath, H5P_DEFAULT) <= 0) { if(link_info->opt.msg_mode == 1) parallel_print("Warning: link <%s> doesn't exist \n",linkpath); - goto out; + HGOTO_DONE(FAIL); } /* end if */ /* get info from link */ if(H5Lget_info(file_id, linkpath, &(link_info->linfo), H5P_DEFAULT) < 0) { if(link_info->opt.msg_mode == 1) parallel_print("Warning: unable to get link info from <%s>\n",linkpath); - goto out; + HGOTO_DONE(FAIL); } /* end if */ /* given path is hard link (object) */ - if(link_info->linfo.type == H5L_TYPE_HARD) { - ret = 2; - goto out; - } /* end if */ + if(link_info->linfo.type == H5L_TYPE_HARD) + HGOTO_DONE(2); /* trg_path must be freed out of this function when finished using */ if((link_info->trg_path = (char*)HDcalloc(link_info->linfo.u.val_size, sizeof(char))) == NULL) { if(link_info->opt.msg_mode == 1) parallel_print("Warning: unable to allocate buffer for <%s>\n",linkpath); - goto out; + HGOTO_DONE(FAIL); } /* end if */ /* get link value */ if(H5Lget_val(file_id, linkpath, (void *)link_info->trg_path, link_info->linfo.u.val_size, H5P_DEFAULT) < 0) { if(link_info->opt.msg_mode == 1) parallel_print("Warning: unable to get link value from <%s>\n",linkpath); - goto out; + HGOTO_DONE(FAIL); } /* end if */ /*----------------------------------------------------- @@ -795,13 +700,13 @@ H5tools_get_symlink_info(hid_t file_id, const char * linkpath, h5tool_link_info_ */ if(link_info->linfo.type == H5L_TYPE_EXTERNAL) { if((fapl = H5Pcreate(H5P_FILE_ACCESS)) < 0) - goto out; + HGOTO_DONE(FAIL); if(H5Pset_fapl_sec2(fapl) < 0) - goto out; + HGOTO_DONE(FAIL); if((lapl = H5Pcreate(H5P_LINK_ACCESS)) < 0) - goto out; + HGOTO_DONE(FAIL); if(H5Pset_elink_fapl(lapl, fapl) < 0) - goto out; + HGOTO_DONE(FAIL); } /* end if */ /* Check for retrieving object info */ @@ -814,25 +719,24 @@ H5tools_get_symlink_info(hid_t file_id, const char * linkpath, h5tool_link_info_ /* detect dangling link */ if(l_ret == FALSE) { - ret = 0; - goto out; - } /* end if */ - /* function failed */ - else if(l_ret < 0) - goto out; + HGOTO_DONE(0); + } + else if(l_ret < 0) { /* function failed */ + HGOTO_DONE(FAIL); + } /* get target object info */ if(H5Oget_info_by_name(file_id, linkpath, &trg_oinfo, lapl) < 0) { if(link_info->opt.msg_mode == 1) parallel_print("Warning: unable to get object information for <%s>\n", linkpath); - goto out; + HGOTO_DONE(FAIL); } /* end if */ /* check unknown type */ if(trg_oinfo.type < H5O_TYPE_GROUP || trg_oinfo.type >=H5O_TYPE_NTYPES) { if(link_info->opt.msg_mode == 1) parallel_print("Warning: target object of <%s> is unknown type\n", linkpath); - goto out; + HGOTO_DONE(FAIL); } /* end if */ /* set target obj type to return */ @@ -844,31 +748,34 @@ H5tools_get_symlink_info(hid_t file_id, const char * linkpath, h5tool_link_info_ link_info->trg_type = H5O_TYPE_UNKNOWN; /* succeed */ - ret = 1; + ret_value = 1; -out: +done: if(fapl != H5P_DEFAULT) H5Pclose(fapl); if(lapl != H5P_DEFAULT) H5Pclose(lapl); - return ret; + return ret_value; } /* end H5tools_get_symlink_info() */ /*------------------------------------------------------------------------- * Audience: Public - * Chapter: H5Tools Library + * * Purpose: Initialize the name and operation status of the H5 Tools library + * * Description: * These are utility functions to set/get the program name and operation status. *------------------------------------------------------------------------- */ -void h5tools_setprogname(const char *Progname) +void +h5tools_setprogname(const char *Progname) { h5tools_progname = Progname; } -void h5tools_setstatus(int D_status) +void +h5tools_setstatus(int D_status) { h5tools_d_status = D_status; } @@ -892,25 +799,19 @@ h5tools_getstatus(void) * This can be called from each tools main() as part of initial act. * Note: this is more of debugging purpose for now. */ -int h5tools_getenv_update_hyperslab_bufsize(void) +int +h5tools_getenv_update_hyperslab_bufsize(void) { const char *env_str = NULL; long hyperslab_bufsize_mb; + int ret_value = 1; /* check if environment variable is set for the hyperslab buffer size */ - if (NULL != (env_str = HDgetenv ("H5TOOLS_BUFSIZE"))) - { + if (NULL != (env_str = HDgetenv ("H5TOOLS_BUFSIZE"))) { errno = 0; hyperslab_bufsize_mb = HDstrtol(env_str, (char**)NULL, 10); if (errno != 0 || hyperslab_bufsize_mb <= 0) - { - /* TODO: later when pubilshed - HDfprintf(rawerrorstream,"Error: Invalid environment variable \"H5TOOLS_BUFSIZE\" : %s\n", env_str); - */ - - goto error; - } - + HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "hyperslab buffer size failed"); /* convert MB to byte */ H5TOOLS_BUFSIZE = (hsize_t)hyperslab_bufsize_mb * 1024 * 1024; @@ -918,9 +819,7 @@ int h5tools_getenv_update_hyperslab_bufsize(void) H5TOOLS_MALLOCSIZE = MAX(H5TOOLS_BUFSIZE, H5TOOLS_MALLOCSIZE); } - return (1); - -error: - return (-1); +done: + return ret_value; } diff --git a/tools/lib/h5trav.c b/tools/lib/h5trav.c index ddc0109..b6d32f7 100644 --- a/tools/lib/h5trav.c +++ b/tools/lib/h5trav.c @@ -13,6 +13,7 @@ #include "h5trav.h" +#include "h5tools.h" #include "H5private.h" /*------------------------------------------------------------------------- @@ -81,10 +82,9 @@ static int trav_verbosity = 0; /*------------------------------------------------------------------------- * Function: h5trav_set_index * - * Purpose: Set indexing properties for the objects & links in the file - * - * Return: none + * Purpose: Set indexing properties for the objects & links in the file * + * Return: none *------------------------------------------------------------------------- */ void @@ -97,10 +97,9 @@ h5trav_set_index(H5_index_t print_index_by, H5_iter_order_t print_index_order) /*------------------------------------------------------------------------- * Function: h5trav_set_verbose * - * Purpose: Set verbosity of file contents 1=>attributes - * - * Return: none + * Purpose: Set verbosity of file contents 1=>attributes * + * Return: none *------------------------------------------------------------------------- */ void @@ -118,14 +117,9 @@ h5trav_set_verbose(int print_verbose) /*------------------------------------------------------------------------- * Function: trav_addr_add * - * Purpose: Add a hardlink address to visited data structure - * - * Return: void - * - * Programmer: Quincey Koziol, koziol@hdfgroup.org - * - * Date: September 1, 2007 + * Purpose: Add a hardlink address to visited data structure * + * Return: void *------------------------------------------------------------------------- */ static void @@ -149,14 +143,9 @@ trav_addr_add(trav_addr_t *visited, haddr_t addr, const char *path) /*------------------------------------------------------------------------- * Function: trav_addr_visited * - * Purpose: Check if an address has already been visited - * - * Return: TRUE/FALSE - * - * Programmer: Quincey Koziol, koziol@hdfgroup.org - * - * Date: September 1, 2007 + * Purpose: Check if an address has already been visited * + * Return: TRUE/FALSE *------------------------------------------------------------------------- */ H5_ATTR_PURE static const char * @@ -178,12 +167,7 @@ trav_addr_visited(trav_addr_t *visited, haddr_t addr) /*------------------------------------------------------------------------- * Function: traverse_cb * - * Purpose: Iterator callback for traversing objects in file - * - * Programmer: Quincey Koziol, koziol@hdfgroup.org - * - * Date: September 1, 2007 - * + * Purpose: Iterator callback for traversing objects in file *------------------------------------------------------------------------- */ static herr_t @@ -258,26 +242,23 @@ traverse_cb(hid_t loc_id, const char *path, const H5L_info_t *linfo, /*------------------------------------------------------------------------- * Function: traverse * - * Purpose: Iterate over all the objects/links in a file. Conforms to the - * "visitor" pattern. - * - * Return: 0 on success, -1 on failure - * - * Programmer: Quincey Koziol, koziol@hdfgroup.org - * - * Date: September 1, 2007 + * Purpose: Iterate over all the objects/links in a file. Conforms to the + * "visitor" pattern. * + * Return: 0 on success, + * -1 on failure *------------------------------------------------------------------------- */ static int traverse(hid_t file_id, const char *grp_name, hbool_t visit_start, - hbool_t recurse, const trav_visitor_t *visitor) + hbool_t recurse, const trav_visitor_t *visitor) { H5O_info_t oinfo; /* Object info for starting group */ + int ret_value = SUCCEED; /* Get info for starting object */ if(H5Oget_info_by_name(file_id, grp_name, &oinfo, H5P_DEFAULT) < 0) - return -1; + HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Oget_info_by_name failed"); /* Visit the starting object */ if(visit_start && visitor->visit_obj) @@ -306,12 +287,12 @@ traverse(hid_t file_id, const char *grp_name, hbool_t visit_start, if(recurse) { /* Visit all links in group, recursively */ if(H5Lvisit_by_name(file_id, grp_name, trav_index_by, trav_index_order, traverse_cb, &udata, H5P_DEFAULT) < 0) - return -1; + HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Lvisit_by_name failed"); } /* end if */ else { /* Iterate over links in group */ if(H5Literate_by_name(file_id, grp_name, trav_index_by, trav_index_order, NULL, traverse_cb, &udata, H5P_DEFAULT) < 0) - return -1; + HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Literate_by_name failed"); } /* end else */ /* Free visited addresses table */ @@ -325,21 +306,17 @@ traverse(hid_t file_id, const char *grp_name, hbool_t visit_start, } /* end if */ } /* end if */ - return 0; +done: + return ret_value; } /*------------------------------------------------------------------------- * Function: trav_info_add * - * Purpose: Add a link path & type to info struct - * - * Return: void - * - * Programmer: Quincey Koziol, koziol@hdfgroup.org - * - * Date: September 1, 2007 + * Purpose: Add a link path & type to info struct * + * Return: void *------------------------------------------------------------------------- */ void @@ -347,18 +324,20 @@ trav_info_add(trav_info_t *info, const char *path, h5trav_type_t obj_type) { size_t idx; /* Index of address to use */ - /* Allocate space if necessary */ - if(info->nused == info->nalloc) { - info->nalloc = MAX(1, info->nalloc * 2);; - info->paths = (trav_path_t *)HDrealloc(info->paths, info->nalloc * sizeof(trav_path_t)); - } /* end if */ + if (info) { + /* Allocate space if necessary */ + if(info->nused == info->nalloc) { + info->nalloc = MAX(1, info->nalloc * 2);; + info->paths = (trav_path_t *)HDrealloc(info->paths, info->nalloc * sizeof(trav_path_t)); + } /* end if */ - /* Append it */ - idx = info->nused++; - info->paths[idx].path = HDstrdup(path); - info->paths[idx].type = obj_type; - info->paths[idx].fileno = 0; - info->paths[idx].objno = HADDR_UNDEF; + /* Append it */ + idx = info->nused++; + info->paths[idx].path = HDstrdup(path); + info->paths[idx].type = obj_type; + info->paths[idx].fileno = 0; + info->paths[idx].objno = HADDR_UNDEF; + } } /* end trav_info_add() */ @@ -368,7 +347,6 @@ trav_info_add(trav_info_t *info, const char *path, h5trav_type_t obj_type) * Purpose: Add a file addr & fileno to info struct * * Return: void - * *------------------------------------------------------------------------- */ void @@ -390,22 +368,19 @@ trav_fileinfo_add(trav_info_t *info, hid_t loc_id) /*------------------------------------------------------------------------- * Function: trav_info_visit_obj * - * Purpose: Callback for visiting object, with 'info' structure - * - * Return: 0 on success, -1 on failure - * - * Programmer: Quincey Koziol, koziol@hdfgroup.org - * - * Date: September 1, 2007 + * Purpose: Callback for visiting object, with 'info' structure * + * Return: 0 on success, + * -1 on failure *------------------------------------------------------------------------- */ int trav_info_visit_obj(const char *path, const H5O_info_t *oinfo, - const char H5_ATTR_UNUSED *already_visited, void *udata) + const char H5_ATTR_UNUSED *already_visited, void *udata) { size_t idx; trav_info_t *info_p; + /* Add the object to the 'info' struct */ /* (object types map directly to "traversal" types) */ trav_info_add((trav_info_t *)udata, path, (h5trav_type_t)oinfo->type); @@ -423,14 +398,10 @@ trav_info_visit_obj(const char *path, const H5O_info_t *oinfo, /*------------------------------------------------------------------------- * Function: trav_info_visit_lnk * - * Purpose: Callback for visiting link, with 'info' structure - * - * Return: 0 on success, -1 on failure - * - * Programmer: Quincey Koziol, koziol@hdfgroup.org - * - * Date: September 1, 2007 + * Purpose: Callback for visiting link, with 'info' structure * + * Return: 0 on success, + * -1 on failure *------------------------------------------------------------------------- */ int @@ -446,21 +417,18 @@ trav_info_visit_lnk(const char *path, const H5L_info_t *linfo, void *udata) /*------------------------------------------------------------------------- * Function: h5trav_getinfo * - * Purpose: get an array of "trav_info_t" , containing the name and type of - * objects in the file - * - * Return: number of object names in file - * - * Programmer: Pedro Vicente, pvn@ncsa.uiuc.edu - * - * Date: November 6, 2002 + * Purpose: get an array of "trav_info_t" , containing the name and type of + * objects in the file * + * Return: 0 on success, + * -1 on failure *------------------------------------------------------------------------- */ int h5trav_getinfo(hid_t file_id, trav_info_t *info) { trav_visitor_t info_visitor; /* Visitor structure for trav_info_t's */ + int ret_value = SUCCEED; /* Init visitor structure */ info_visitor.visit_obj = trav_info_visit_obj; @@ -469,25 +437,21 @@ h5trav_getinfo(hid_t file_id, trav_info_t *info) /* Traverse all objects in the file, visiting each object & link */ if(traverse(file_id, "/", TRUE, TRUE, &info_visitor) < 0) - return -1; + HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "traverse failed"); - return 0; +done: + return ret_value; } /*------------------------------------------------------------------------- * Function: h5trav_getindex * - * Purpose: get index of OBJ in list - * - * Return: index, -1 if not found - * - * Programmer: Pedro Vicente, pvn@ncsa.uiuc.edu - * - * Date: May 9, 2003 + * Purpose: get index of OBJ in list * + * Return: index on success, + * -1 if not found *------------------------------------------------------------------------- */ - H5_ATTR_PURE ssize_t h5trav_getindex(const trav_info_t *info, const char *obj) { @@ -511,17 +475,11 @@ h5trav_getindex(const trav_info_t *info, const char *obj) /*------------------------------------------------------------------------- * Function: trav_info_init * - * Purpose: Initialize the info - * - * Return: void - * - * Programmer: Quincey Koziol, koziol@hdfgroup.org - * - * Date: September 6, 2007 + * Purpose: Initialize the info * + * Return: void *------------------------------------------------------------------------- */ - void trav_info_init(const char *filename, hid_t fileid, trav_info_t **_info) { @@ -545,11 +503,9 @@ trav_info_init(const char *filename, hid_t fileid, trav_info_t **_info) /*------------------------------------------------------------------------- * Function: trav_info_free * - * Purpose: free info memory - * + * Purpose: free info memory *------------------------------------------------------------------------- */ - void trav_info_free(trav_info_t *info) { @@ -557,11 +513,9 @@ trav_info_free(trav_info_t *info) if(info) { /* Free visited symbolic links path and file (if alloc) */ - for(u=0; u < info->symlink_visited.nused; u++) - { + for(u = 0; u < info->symlink_visited.nused; u++) { if (info->symlink_visited.objs[u].file) HDfree(info->symlink_visited.objs[u].file); - HDfree(info->symlink_visited.objs[u].path); } HDfree(info->symlink_visited.objs); @@ -586,12 +540,8 @@ trav_info_free(trav_info_t *info) * * Purpose: Callback for visiting object, with 'table' sructure * - * Return: 0 on success, -1 on failure - * - * Programmer: Quincey Koziol, koziol@hdfgroup.org - * - * Date: September 1, 2007 - * + * Return: 0 on success, + * -1 on failure *------------------------------------------------------------------------- */ static int @@ -608,21 +558,17 @@ trav_table_visit_obj(const char *path, const H5O_info_t *oinfo, /* Add alias for object to table */ trav_table_addlink(table, oinfo->addr, path); - return(0); + return 0; } /* end trav_table_visit_obj() */ /*------------------------------------------------------------------------- * Function: trav_table_visit_lnk * - * Purpose: Callback for visiting link, with 'table' sructure - * - * Return: 0 on success, -1 on failure - * - * Programmer: Quincey Koziol, koziol@hdfgroup.org - * - * Date: September 1, 2007 + * Purpose: Callback for visiting link, with 'table' sructure * + * Return: 0 on success, + * -1 on failure *------------------------------------------------------------------------- */ static int @@ -631,28 +577,24 @@ trav_table_visit_lnk(const char *path, const H5L_info_t H5_ATTR_UNUSED *linfo, v /* Add the link to the 'table' struct */ trav_table_add((trav_table_t *)udata, path, NULL); - return(0); + return 0; } /* end trav_table_visit_lnk() */ /*------------------------------------------------------------------------- * Function: h5trav_gettable * - * Purpose: get the trav_table_t struct - * - * Return: 0, -1 on error - * - * Programmer: Pedro Vicente, pvn@ncsa.uiuc.edu - * - * Date: December 17, 2003 + * Purpose: get the trav_table_t struct * + * Return: 0 on success, + * -1 on failure *------------------------------------------------------------------------- */ - int h5trav_gettable(hid_t fid, trav_table_t *table) { trav_visitor_t table_visitor; /* Visitor structure for trav_table_t's */ + int ret_value = SUCCEED; /* Init visitor structure */ table_visitor.visit_obj = trav_table_visit_obj; @@ -661,71 +603,63 @@ h5trav_gettable(hid_t fid, trav_table_t *table) /* Traverse all objects in the file, visiting each object & link */ if(traverse(fid, "/", TRUE, TRUE, &table_visitor) < 0) - return -1; - return 0; + HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "traverse failed"); + +done: + return ret_value; } /*------------------------------------------------------------------------- * Function: h5trav_getindext * - * Purpose: get index of NAME in list - * - * Return: index, -1 if not found - * - * Programmer: Pedro Vicente, pvn@ncsa.uiuc.edu - * - * Date: December 18, 2003 + * Purpose: get index of NAME in list * + * Return: index on success, + * -1 if not found *------------------------------------------------------------------------- */ - H5_ATTR_PURE int h5trav_getindext(const char *name, const trav_table_t *table) { unsigned int i; - for(i = 0; i < table->nobjs; i++) { - /* Check for object name having full path (with leading '/') */ - if(HDstrcmp(name, table->objs[i].name) == 0) - return((int)i); - - /* Check for object name without leading '/' */ - if(HDstrcmp(name, table->objs[i].name + 1) == 0) - return((int)i); + if(table) { + for(i = 0; i < table->nobjs; i++) { + /* Check for object name having full path (with leading '/') */ + if(HDstrcmp(name, table->objs[i].name) == 0) + return((int)i); - /* search also in the list of links */ - if(table->objs[i].nlinks) { - unsigned int j; + /* Check for object name without leading '/' */ + if(HDstrcmp(name, table->objs[i].name + 1) == 0) + return((int)i); - for ( j=0; jobjs[i].nlinks; j++) { - /* Check for object name having full path (with leading '/') */ - if(HDstrcmp(name, table->objs[i].links[j].new_name) == 0) - return((int)i); + /* search also in the list of links */ + if(table->objs[i].nlinks) { + unsigned int j; - /* Check for object name without leading '/' */ - if(HDstrcmp(name, table->objs[i].links[j].new_name + 1) == 0) - return((int)i); - } /* end for */ - } /* end if */ - } /* end for */ + for ( j=0; jobjs[i].nlinks; j++) { + /* Check for object name having full path (with leading '/') */ + if(HDstrcmp(name, table->objs[i].links[j].new_name) == 0) + return((int)i); + /* Check for object name without leading '/' */ + if(HDstrcmp(name, table->objs[i].links[j].new_name + 1) == 0) + return((int)i); + } /* end for */ + } /* end if */ + } /* end for */ + } return -1; } /*------------------------------------------------------------------------- * Function: trav_table_add * - * Purpose: Add OBJNO, NAME and TYPE of object to table - * - * Return: void - * - * Programmer: Pedro Vicente, pvn@ncsa.uiuc.edu - * - * Date: November 4, 2002 + * Purpose: Add OBJNO, NAME and TYPE of object to table * + * Return: void *------------------------------------------------------------------------- */ - static void trav_table_add(trav_table_t *table, const char *path, @@ -733,20 +667,22 @@ trav_table_add(trav_table_t *table, { size_t new_obj; - if(table->nobjs == table->size) { - table->size = MAX(1, table->size * 2); - table->objs = (trav_obj_t *)HDrealloc(table->objs, table->size * sizeof(trav_obj_t)); - } /* end if */ + if(table) { + if(table->nobjs == table->size) { + table->size = MAX(1, table->size * 2); + table->objs = (trav_obj_t *)HDrealloc(table->objs, table->size * sizeof(trav_obj_t)); + } /* end if */ - new_obj = table->nobjs++; - table->objs[new_obj].objno = oinfo ? oinfo->addr : HADDR_UNDEF; - table->objs[new_obj].flags[0] = table->objs[new_obj].flags[1] = 0; - table->objs[new_obj].is_same_trgobj = 0; - table->objs[new_obj].name = (char *)HDstrdup(path); - table->objs[new_obj].type = oinfo ? (h5trav_type_t)oinfo->type : H5TRAV_TYPE_LINK; - table->objs[new_obj].nlinks = 0; - table->objs[new_obj].sizelinks = 0; - table->objs[new_obj].links = NULL; + new_obj = table->nobjs++; + table->objs[new_obj].objno = oinfo ? oinfo->addr : HADDR_UNDEF; + table->objs[new_obj].flags[0] = table->objs[new_obj].flags[1] = 0; + table->objs[new_obj].is_same_trgobj = 0; + table->objs[new_obj].name = (char *)HDstrdup(path); + table->objs[new_obj].type = oinfo ? (h5trav_type_t)oinfo->type : H5TRAV_TYPE_LINK; + table->objs[new_obj].nlinks = 0; + table->objs[new_obj].sizelinks = 0; + table->objs[new_obj].links = NULL; + } } /*------------------------------------------------------------------------- @@ -755,58 +691,47 @@ trav_table_add(trav_table_t *table, * Purpose: Add a hardlink name to the object * * Return: void - * - * Programmer: Pedro Vicente, pvn@ncsa.uiuc.edu - * - * Date: December 17, 2003 - * *------------------------------------------------------------------------- */ - static void trav_table_addlink(trav_table_t *table, haddr_t objno, const char *path) { size_t i; /* Local index variable */ - for(i = 0; i < table->nobjs; i++) { - if(table->objs[i].objno == objno) { - size_t n; + if(table) { + for(i = 0; i < table->nobjs; i++) { + if(table->objs[i].objno == objno) { + size_t n; - /* already inserted? */ - if(HDstrcmp(table->objs[i].name, path) == 0) - return; + /* already inserted? */ + if(HDstrcmp(table->objs[i].name, path) == 0) + return; - /* allocate space if necessary */ - if(table->objs[i].nlinks == (unsigned)table->objs[i].sizelinks) { - table->objs[i].sizelinks = MAX(1, table->objs[i].sizelinks * 2); - table->objs[i].links = (trav_link_t *)HDrealloc(table->objs[i].links, table->objs[i].sizelinks * sizeof(trav_link_t)); - } /* end if */ + /* allocate space if necessary */ + if(table->objs[i].nlinks == (unsigned)table->objs[i].sizelinks) { + table->objs[i].sizelinks = MAX(1, table->objs[i].sizelinks * 2); + table->objs[i].links = (trav_link_t *)HDrealloc(table->objs[i].links, table->objs[i].sizelinks * sizeof(trav_link_t)); + } /* end if */ - /* insert it */ - n = table->objs[i].nlinks++; - table->objs[i].links[n].new_name = (char *)HDstrdup(path); + /* insert it */ + n = table->objs[i].nlinks++; + table->objs[i].links[n].new_name = (char *)HDstrdup(path); - return; + return; + } /* end for */ } /* end for */ - } /* end for */ + } } - /*------------------------------------------------------------------------- * Function: trav_table_addflags * - * Purpose: Add FLAGS, NAME and TYPE of object to table - * - * Return: void - * - * Programmer: Pedro Vicente, pvn@ncsa.uiuc.edu - * - * Date: November 4, 2002 + * Purpose: Add FLAGS, NAME and TYPE of object to table * + * Return: void *------------------------------------------------------------------------- */ - void trav_table_addflags(unsigned *flags, char *name, h5trav_type_t type, @@ -814,92 +739,83 @@ void trav_table_addflags(unsigned *flags, { size_t new_obj; - if(table->nobjs == table->size) { - table->size = MAX(1, table->size * 2); - table->objs = (trav_obj_t *)HDrealloc(table->objs, table->size * sizeof(trav_obj_t)); - } /* end if */ + if(table) { + if(table->nobjs == table->size) { + table->size = MAX(1, table->size * 2); + table->objs = (trav_obj_t *)HDrealloc(table->objs, table->size * sizeof(trav_obj_t)); + } /* end if */ - new_obj = table->nobjs++; - table->objs[new_obj].objno = 0; - table->objs[new_obj].flags[0] = flags[0]; - table->objs[new_obj].flags[1] = flags[1]; - table->objs[new_obj].is_same_trgobj = 0; - table->objs[new_obj].name = (char *)HDstrdup(name); - table->objs[new_obj].type = type; - table->objs[new_obj].nlinks = 0; - table->objs[new_obj].sizelinks = 0; - table->objs[new_obj].links = NULL; + new_obj = table->nobjs++; + table->objs[new_obj].objno = 0; + table->objs[new_obj].flags[0] = flags[0]; + table->objs[new_obj].flags[1] = flags[1]; + table->objs[new_obj].is_same_trgobj = 0; + table->objs[new_obj].name = (char *)HDstrdup(name); + table->objs[new_obj].type = type; + table->objs[new_obj].nlinks = 0; + table->objs[new_obj].sizelinks = 0; + table->objs[new_obj].links = NULL; + } } /*------------------------------------------------------------------------- * Function: trav_table_init * - * Purpose: Initialize the table - * - * Return: void - * - * Programmer: Pedro Vicente, pvn@ncsa.uiuc.edu - * - * Date: November 4, 2002 + * Purpose: Initialize the table * + * Return: void *------------------------------------------------------------------------- */ - void trav_table_init(trav_table_t **tbl) { trav_table_t* table = (trav_table_t*) HDmalloc(sizeof(trav_table_t)); - - table->size = 0; - table->nobjs = 0; - table->objs = NULL; - + if(table) { + table->size = 0; + table->nobjs = 0; + table->objs = NULL; + } *tbl = table; } - /*------------------------------------------------------------------------- * Function: trav_table_free * - * Purpose: free table memory - * - * Return: void - * - * Programmer: Pedro Vicente, pvn@ncsa.uiuc.edu - * - * Date: November 4, 2002 + * Purpose: free table memory * + * Return: void *------------------------------------------------------------------------- */ - -void trav_table_free( trav_table_t *table ) +void trav_table_free(trav_table_t *table) { - if(table->objs) { - unsigned int i; + if(table) { + if(table->objs) { + unsigned int i; - for(i = 0; i < table->nobjs; i++) { - HDfree(table->objs[i].name ); - if(table->objs[i].nlinks) { - unsigned int j; + for(i = 0; i < table->nobjs; i++) { + HDfree(table->objs[i].name ); + if(table->objs[i].nlinks) { + unsigned int j; - for(j = 0; j < table->objs[i].nlinks; j++) - HDfree(table->objs[i].links[j].new_name); + for(j = 0; j < table->objs[i].nlinks; j++) + HDfree(table->objs[i].links[j].new_name); - HDfree(table->objs[i].links); - } /* end if */ - } /* end for */ - HDfree(table->objs); - } /* end if */ - HDfree(table); + HDfree(table->objs[i].links); + } /* end if */ + } /* end for */ + HDfree(table->objs); + } /* end if */ + HDfree(table); + } } static herr_t trav_attr(hid_t #ifndef H5TRAV_PRINT_SPACE -H5_ATTR_UNUSED + H5_ATTR_UNUSED #endif /* H5TRAV_PRINT_SPACE */ -obj, const char *attr_name, const H5A_info_t H5_ATTR_UNUSED *ainfo, void *_op_data) + obj, const char *attr_name, const H5A_info_t H5_ATTR_UNUSED *ainfo, void *_op_data) { trav_path_op_data_t *op_data = (trav_path_op_data_t *)_op_data; const char *buf = op_data->path; @@ -938,7 +854,7 @@ obj, const char *attr_name, const H5A_info_t H5_ATTR_UNUSED *ainfo, void *_op_da case H5S_SIMPLE: /* simple dataspace */ printf(" {"); - for (i=0; iu.val_size > 0) { - char *targbuf; + char *targbuf = NULL; const char *filename = NULL; const char *objname = NULL; @@ -1097,22 +1005,18 @@ trav_print_visit_lnk(const char *path, const H5L_info_t *linfo, void *udata) /*------------------------------------------------------------------------- * Function: h5trav_print * - * Purpose: Print information about the objects & links in the file - * - * Return: 0, -1 on error - * - * Programmer: Quincey Koziol, koziol@hdfgroup.org - * - * Date: September 6, 2007 + * Purpose: Print information about the objects & links in the file * + * Return: 0 on success, + * -1 on failure *------------------------------------------------------------------------- */ - int h5trav_print(hid_t fid) { trav_print_udata_t print_udata; /* User data for traversal */ trav_visitor_t print_visitor; /* Visitor structure for printing objects */ + int ret_value = SUCCEED; /* Init user data for printing */ print_udata.fid = fid; @@ -1124,9 +1028,10 @@ h5trav_print(hid_t fid) /* Traverse all objects in the file, visiting each object & link */ if(traverse(fid, "/", TRUE, TRUE, &print_visitor) < 0) - return -1; + HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "traverse failed"); - return 0; +done: + return ret_value; } @@ -1135,21 +1040,17 @@ h5trav_print(hid_t fid) * * Purpose: Generic traversal routine for visiting objects and links * - * Return: 0, -1 on error - * - * Programmer: Quincey Koziol, koziol@hdfgroup.org - * - * Date: November 6, 2007 - * + * Return: 0 on success, + * -1 on failure *------------------------------------------------------------------------- */ - int h5trav_visit(hid_t fid, const char *grp_name, hbool_t visit_start, hbool_t recurse, h5trav_obj_func_t visit_obj, h5trav_lnk_func_t visit_lnk, void *udata) { trav_visitor_t visitor; /* Visitor structure for objects */ + int ret_value = SUCCEED; /* Init visitor structure */ visitor.visit_obj = visit_obj; @@ -1158,9 +1059,10 @@ h5trav_visit(hid_t fid, const char *grp_name, hbool_t visit_start, /* Traverse all objects in the file, visiting each object & link */ if(traverse(fid, grp_name, visit_start, recurse, &visitor) < 0) - return -1; + HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "traverse failed"); - return 0; +done: + return ret_value; } /*------------------------------------------------------------------------- @@ -1168,19 +1070,15 @@ h5trav_visit(hid_t fid, const char *grp_name, hbool_t visit_start, * * Purpose: Add an symbolic link to visited data structure * - * Return: 0 on success, -1 on failure - * - * Programmer: Neil Fortner, nfortne2@hdfgroup.org - * Adapted from trav_addr_add in h5trav.c by Quincey Koziol - * - * Date: September 5, 2008 - * + * Return: 0 on success, + * -1 on failure *------------------------------------------------------------------------- */ herr_t symlink_visit_add(symlink_trav_t *visited, H5L_type_t type, const char *file, const char *path) { - size_t idx; /* Index of address to use */ + herr_t ret_value = SUCCEED; + size_t idx; /* Index of address to use */ /* Allocate space if necessary */ if(visited->nused == visited->nalloc) { @@ -1188,7 +1086,7 @@ symlink_visit_add(symlink_trav_t *visited, H5L_type_t type, const char *file, co visited->nalloc = MAX(1, visited->nalloc * 2); if(NULL == (tmp_ptr = HDrealloc(visited->objs, visited->nalloc * sizeof(symlink_trav_path_t)))) - return -1; + HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "visited data structure realloc failed"); visited->objs = (symlink_trav_path_t *)tmp_ptr; } /* end if */ @@ -1202,7 +1100,7 @@ symlink_visit_add(symlink_trav_t *visited, H5L_type_t type, const char *file, co if(type == H5L_TYPE_EXTERNAL) { if(NULL == (visited->objs[idx].file = HDstrdup(file))) { visited->nused--; - return -1; + HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "visited data structure name allocation failed"); } /* end if */ } /* end if */ @@ -1210,25 +1108,20 @@ symlink_visit_add(symlink_trav_t *visited, H5L_type_t type, const char *file, co visited->nused--; if(visited->objs[idx].file) HDfree (visited->objs[idx].file); - return -1; + HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "visited data structure path allocation failed"); } /* end if */ - return 0; +done: + return ret_value; } /* end symlink_visit_add() */ /*------------------------------------------------------------------------- * Function: symlink_is_visited * - * Purpose: Check if an symbolic link has already been visited - * - * Return: TRUE/FALSE - * - * Programmer: Neil Fortner, nfortne2@hdfgroup.org - * Adapted from trav_addr_visited in h5trav.c by Quincey Koziol - * - * Date: September 5, 2008 + * Purpose: Check if an symbolic link has already been visited * + * Return: TRUE/FALSE *------------------------------------------------------------------------- */ H5_ATTR_PURE hbool_t diff --git a/tools/lib/ph5diff.h b/tools/lib/ph5diff.h index 996a611..2189e31 100644 --- a/tools/lib/ph5diff.h +++ b/tools/lib/ph5diff.h @@ -32,7 +32,7 @@ struct diff_mpi_args { char name1[256]; char name2[256]; - diff_opt_t options; + diff_opt_t opts; diff_args_t argdata; /* rest args */ }; diff --git a/tools/src/h5diff/h5diff_common.c b/tools/src/h5diff/h5diff_common.c index e4696c0..532169f 100644 --- a/tools/src/h5diff/h5diff_common.c +++ b/tools/src/h5diff/h5diff_common.c @@ -52,7 +52,7 @@ static struct long_options l_opts[] = { * *------------------------------------------------------------------------- */ -static void check_options(diff_opt_t* options) +static void check_options(diff_opt_t* opts) { /*-------------------------------------------------------------- * check for mutually exclusive options @@ -61,7 +61,7 @@ static void check_options(diff_opt_t* options) /* check between -d , -p, --use-system-epsilon. * These options are mutually exclusive. */ - if ((options->d + options->p + options->use_system_epsilon) > 1) { + if ((opts->d + opts->p + opts->use_system_epsilon) > 1) { printf("%s error: -d, -p and --use-system-epsilon options are mutually-exclusive;\n", PROGRAMNAME); printf("use no more than one.\n"); printf("Try '-h' or '--help' option for more information or see the %s entry in the 'HDF5 Reference Manual'.\n", PROGRAMNAME); @@ -84,27 +84,27 @@ void parse_command_line(int argc, const char** fname2, const char** objname1, const char** objname2, - diff_opt_t* options) + diff_opt_t* opts) { int i; int opt; struct exclude_path_list *exclude_head, *exclude_prev, *exclude_node; /* process the command-line */ - memset(options, 0, sizeof (diff_opt_t)); + memset(opts, 0, sizeof (diff_opt_t)); /* assume equal contents initially */ - options->contents = 1; + opts->contents = 1; /* NaNs are handled by default */ - options->do_nans = 1; + opts->do_nans = 1; /* not Listing objects that are not comparable */ - options->m_list_not_cmp = 0; + opts->m_list_not_cmp = 0; /* initially no not-comparable. */ /**this is bad in mixing option with results**/ - options->not_cmp=0; + opts->not_cmp=0; /* init for exclude-path option */ exclude_head = NULL; @@ -125,7 +125,7 @@ void parse_command_line(int argc, h5diff_exit(EXIT_SUCCESS); case 'v': - options->m_verbose = 1; + opts->m_verbose = 1; /* This for loop is for handling style like * -v, -v1, --verbose, --verbose=1. */ @@ -135,11 +135,11 @@ void parse_command_line(int argc, */ if (!strcmp (argv[i], "-v")) { /* no arg */ opt_ind--; - options->m_verbose_level = 0; + opts->m_verbose_level = 0; break; } else if (!strncmp (argv[i], "-v", (size_t)2)) { - options->m_verbose_level = atoi(&argv[i][2]); + opts->m_verbose_level = atoi(&argv[i][2]); break; } @@ -147,11 +147,11 @@ void parse_command_line(int argc, * long opt */ if (!strcmp (argv[i], "--verbose")) { /* no arg */ - options->m_verbose_level = 0; + opts->m_verbose_level = 0; break; } else if ( !strncmp (argv[i], "--verbose", (size_t)9) && argv[i][9]=='=') { - options->m_verbose_level = atoi(&argv[i][10]); + opts->m_verbose_level = atoi(&argv[i][10]); break; } } @@ -159,19 +159,19 @@ void parse_command_line(int argc, case 'q': /* use quiet mode; supress the message "0 differences found" */ - options->m_quiet = 1; + opts->m_quiet = 1; break; case 'r': - options->m_report = 1; + opts->m_report = 1; break; case 'l': - options->follow_links = TRUE; + opts->follow_links = TRUE; break; case 'x': - options->no_dangle_links = 1; + opts->no_dangle_links = 1; break; case 'S': @@ -179,7 +179,7 @@ void parse_command_line(int argc, break; case 'E': - options->exclude_path = 1; + opts->exclude_path = 1; /* create linked list of excluding objects */ if( (exclude_node = (struct exclude_path_list*) HDmalloc(sizeof(struct exclude_path_list))) == NULL) { @@ -206,64 +206,64 @@ void parse_command_line(int argc, break; case 'd': - options->d=1; + opts->d=1; if (check_d_input(opt_arg) == - 1) { printf("<-d %s> is not a valid option\n", opt_arg); usage(); h5diff_exit(EXIT_FAILURE); } - options->delta = atof(opt_arg); + opts->delta = atof(opt_arg); /* -d 0 is the same as default */ - if (H5_DBL_ABS_EQUAL(options->delta, (double)0.0F)) - options->d=0; + if (H5_DBL_ABS_EQUAL(opts->delta, (double)0.0F)) + opts->d=0; break; case 'p': - options->p=1; + opts->p=1; if (check_p_input(opt_arg) == -1) { printf("<-p %s> is not a valid option\n", opt_arg); usage(); h5diff_exit(EXIT_FAILURE); } - options->percent = atof(opt_arg); + opts->percent = atof(opt_arg); /* -p 0 is the same as default */ - if (H5_DBL_ABS_EQUAL(options->percent, (double)0.0F)) - options->p = 0; + if (H5_DBL_ABS_EQUAL(opts->percent, (double)0.0F)) + opts->p = 0; break; case 'n': - options->n=1; + opts->n=1; if ( check_n_input(opt_arg) == -1) { printf("<-n %s> is not a valid option\n", opt_arg); usage(); h5diff_exit(EXIT_FAILURE); } - options->count = HDstrtoull(opt_arg, NULL, 0); + opts->count = HDstrtoull(opt_arg, NULL, 0); break; case 'N': - options->do_nans = 0; + opts->do_nans = 0; break; case 'c': - options->m_list_not_cmp = 1; + opts->m_list_not_cmp = 1; break; case 'e': - options->use_system_epsilon = 1; + opts->use_system_epsilon = 1; break; } } /* check options */ - check_options(options); + check_options(opts); /* if exclude-path option is used, keep the exclude path list */ - if (options->exclude_path) - options->exclude = exclude_head; + if (opts->exclude_path) + opts->exclude = exclude_head; /* check for file names to be processed */ if (argc <= opt_ind || argv[ opt_ind + 1 ] == NULL) { @@ -300,23 +300,23 @@ void parse_command_line(int argc, *------------------------------------------------------------------------- */ - void print_info(diff_opt_t* options) + void print_info(diff_opt_t* opts) { - if (options->m_quiet || options->err_stat) + if (opts->m_quiet || opts->err_stat) return; - if (options->cmn_objs == 0) { + if (opts->cmn_objs == 0) { printf("No common objects found. Files are not comparable.\n"); - if (!options->m_verbose) + if (!opts->m_verbose) printf("Use -v for a list of objects.\n"); } - if (options->not_cmp == 1) { - if (options->m_list_not_cmp == 0) { + if (opts->not_cmp == 1) { + if (opts->m_list_not_cmp == 0) { printf("--------------------------------\n"); printf("Some objects are not comparable\n"); printf("--------------------------------\n"); - if (options->m_verbose) + if (opts->m_verbose) printf("Use -c for a list of objects without details of differences.\n"); else printf("Use -c for a list of objects.\n"); diff --git a/tools/src/h5diff/h5diff_common.h b/tools/src/h5diff/h5diff_common.h index e5dfe3f..dc0676c 100644 --- a/tools/src/h5diff/h5diff_common.h +++ b/tools/src/h5diff/h5diff_common.h @@ -23,9 +23,9 @@ extern "C" { #endif void usage(void); -void parse_command_line(int argc, const char* argv[], const char** fname1, const char** fname2, const char** objname1, const char** objname2, diff_opt_t* options); +void parse_command_line(int argc, const char* argv[], const char** fname1, const char** fname2, const char** objname1, const char** objname2, diff_opt_t* opts); void h5diff_exit(int status); -void print_info(diff_opt_t* options); +void print_info(diff_opt_t* opts); #ifdef __cplusplus } diff --git a/tools/src/h5diff/h5diff_main.c b/tools/src/h5diff/h5diff_main.c index 8dab3b4..ad488a4 100644 --- a/tools/src/h5diff/h5diff_main.c +++ b/tools/src/h5diff/h5diff_main.c @@ -78,7 +78,7 @@ int main(int argc, const char *argv[]) const char *objname1 = NULL; const char *objname2 = NULL; hsize_t nfound=0; - diff_opt_t options; + diff_opt_t opts; h5tools_setprogname(PROGRAMNAME); h5tools_setstatus(EXIT_SUCCESS); @@ -98,7 +98,7 @@ int main(int argc, const char *argv[]) * process the command-line *------------------------------------------------------------------------- */ - parse_command_line(argc, argv, &fname1, &fname2, &objname1, &objname2, &options); + parse_command_line(argc, argv, &fname1, &fname2, &objname1, &objname2, &opts); if (enable_error_stack) { H5Eset_auto2(H5E_DEFAULT, func, edata); @@ -110,9 +110,9 @@ int main(int argc, const char *argv[]) *------------------------------------------------------------------------- */ - nfound = h5diff(fname1, fname2, objname1, objname2, &options); + nfound = h5diff(fname1, fname2, objname1, objname2, &opts); - print_info(&options); + print_info(&opts); /*------------------------------------------------------------------------- * exit code @@ -123,11 +123,11 @@ int main(int argc, const char *argv[]) ret = (nfound == 0 ? 0 : 1); /* if graph difference return 1 for differences */ - if (options.contents == 0) + if (opts.contents == 0) ret = 1; /* and return 2 for error */ - if (options.err_stat) + if (opts.err_stat) ret = 2; h5diff_exit(ret); diff --git a/tools/src/h5diff/ph5diff_main.c b/tools/src/h5diff/ph5diff_main.c index 89efc39..83240cb 100644 --- a/tools/src/h5diff/ph5diff_main.c +++ b/tools/src/h5diff/ph5diff_main.c @@ -50,7 +50,7 @@ int main(int argc, const char *argv[]) const char *fname2 = NULL; const char *objname1 = NULL; const char *objname2 = NULL; - diff_opt_t options; + diff_opt_t opts; h5tools_setprogname(PROGRAMNAME); h5tools_setstatus(EXIT_SUCCESS); @@ -72,11 +72,11 @@ int main(int argc, const char *argv[]) g_Parallel = 0; - parse_command_line(argc, argv, &fname1, &fname2, &objname1, &objname2, &options); + parse_command_line(argc, argv, &fname1, &fname2, &objname1, &objname2, &opts); - h5diff(fname1, fname2, objname1, objname2, &options); + h5diff(fname1, fname2, objname1, objname2, &opts); - print_info(&options); + print_info(&opts); } /* Parallel h5diff */ else { @@ -84,13 +84,13 @@ int main(int argc, const char *argv[]) /* Have the manager process the command-line */ if(nID == 0) { - parse_command_line(argc, argv, &fname1, &fname2, &objname1, &objname2, &options); + parse_command_line(argc, argv, &fname1, &fname2, &objname1, &objname2, &opts); - h5diff(fname1, fname2, objname1, objname2, &options); + h5diff(fname1, fname2, objname1, objname2, &opts); MPI_Barrier(MPI_COMM_WORLD); - print_info(&options); + print_info(&opts); print_manager_output(); } /* All other tasks become workers and wait for assignments. */ @@ -178,8 +178,8 @@ ph5diff_worker(int nID) MPI_Recv(&args, sizeof(args), MPI_BYTE, 0, MPI_TAG_ARGS, MPI_COMM_WORLD, &Status); /* Do the diff */ - diffs.nfound = diff(file1_id, args.name1, file2_id, args.name2, &(args.options), &(args.argdata)); - diffs.not_cmp = args.options.not_cmp; + diffs.nfound = diff(file1_id, args.name1, file2_id, args.name2, &(args.opts), &(args.argdata)); + diffs.not_cmp = args.opts.not_cmp; /* If print buffer has something in it, request print token.*/ if(outBuffOffset>0) diff --git a/tools/src/h5repack/h5repack.c b/tools/src/h5repack/h5repack.c index 6b8cf8a..14b9461 100644 --- a/tools/src/h5repack/h5repack.c +++ b/tools/src/h5repack/h5repack.c @@ -221,13 +221,12 @@ hid_t copy_named_datatype(hid_t type_in, hid_t fidout, hid_t ret_value = -1; /* The identifier of the named dtype in the out file */ if (H5Oget_info(type_in, &oinfo) < 0) - goto done; + HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Oget_info failed"); if (*named_dt_head_p) { /* Stack already exists, search for the datatype */ while (dt && dt->addr_in != oinfo.addr) dt = dt->next; - dt_ret = dt; } else { @@ -238,7 +237,7 @@ hid_t copy_named_datatype(hid_t type_in, hid_t fidout, if (travt->objs[i].type == H5TRAV_TYPE_NAMED_DATATYPE) { /* Push onto the stack */ if (NULL == (dt = (named_dt_t *)HDmalloc(sizeof(named_dt_t)))) - goto done; + HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "buffer allocation failed failed"); dt->next = *named_dt_head_p; *named_dt_head_p = dt; @@ -259,7 +258,7 @@ hid_t copy_named_datatype(hid_t type_in, hid_t fidout, if (!dt_ret) { /* Push the new datatype onto the stack */ if (NULL == (dt_ret = (named_dt_t *)HDmalloc(sizeof(named_dt_t)))) - goto done; + HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "buffer allocation failed failed"); dt_ret->next = *named_dt_head_p; *named_dt_head_p = dt_ret; @@ -276,9 +275,9 @@ hid_t copy_named_datatype(hid_t type_in, hid_t fidout, else dt_ret->id_out = H5Tcopy(type_in); if (dt_ret->id_out < 0) - goto done; + HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Tget_native_type-H5Tcopy failed"); if (H5Tcommit_anon(fidout, dt_ret->id_out, H5P_DEFAULT, H5P_DEFAULT) < 0) - goto done; + HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Tcommit_anon failed"); } /* end if */ /* Set return value */ @@ -286,7 +285,7 @@ hid_t copy_named_datatype(hid_t type_in, hid_t fidout, /* Increment the ref count on id_out, because the calling function will try to close it */ if(H5Iinc_ref(ret_value) < 0) - ret_value = -1; + HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Iinc_ref failed"); done: return ret_value; @@ -305,7 +304,7 @@ int named_datatype_free(named_dt_t **named_dt_head_p, int ignore_err) { while (dt) { /* Pop the datatype off the stack and free it */ if (H5Tclose(dt->id_out) < 0 && !ignore_err) - goto done; + HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Tclose failed"); dt = dt->next; HDfree(*named_dt_head_p); *named_dt_head_p = dt; @@ -332,7 +331,7 @@ int copy_attr(hid_t loc_in, hid_t loc_out, named_dt_t **named_dt_head_p, trav_table_t *travt, pack_opt_t *options) { - int ret_value = 0; /*no need to LEAVE() on ERROR: HERR_INIT(int, SUCCEED) */ + int ret_value = 0; hid_t attr_id = -1; /* attr ID */ hid_t attr_out = -1; /* attr ID */ hid_t space_id = -1; /* space ID */ @@ -426,7 +425,8 @@ copy_attr(hid_t loc_in, hid_t loc_out, named_dt_t **named_dt_head_p, base_type = H5Tget_super(ftype_id); is_ref = (is_ref || (H5Tget_class(base_type) == H5T_REFERENCE)); - H5Tclose(base_type); + if (H5Tclose(base_type) < 0) + H5TOOLS_INFO(H5E_tools_min_id_g, "H5Tclose base_type failed"); } if (type_class == H5T_COMPOUND) { @@ -435,7 +435,8 @@ copy_attr(hid_t loc_in, hid_t loc_out, named_dt_t **named_dt_head_p, for (j = 0; j < nmembers; j++) { hid_t mtid = H5Tget_member_type(wtype_id, (unsigned)j); H5T_class_t mtclass = H5Tget_class(mtid); - H5Tclose(mtid); + if (H5Tclose(mtid) < 0) + H5TOOLS_INFO(H5E_tools_min_id_g, "H5Tclose mtid failed"); if (mtclass == H5T_REFERENCE) { is_ref = 1; @@ -481,7 +482,24 @@ copy_attr(hid_t loc_in, hid_t loc_out, named_dt_t **named_dt_head_p, if (options->verbose) printf(FORMAT_OBJ_ATTR, "attr", name); - } /* u */ + + /*------------------------------------------------------------------------- + * close + *------------------------------------------------------------------------- + */ + if (H5Sclose(space_id) < 0) + HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Sclose failed"); + space_id = -1; + if (H5Tclose(wtype_id) < 0) + HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Tclose failed"); + wtype_id = -1; + if (H5Tclose(ftype_id) < 0) + HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Tclose failed"); + ftype_id = -1; + if (H5Aclose(attr_id) < 0) + HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Aclose failed"); + attr_id = -1; + } /* for u */ done: H5E_BEGIN_TRY { @@ -495,11 +513,11 @@ done: HDfree(buf); } /* end if */ - H5Tclose(ftype_id); - H5Tclose(wtype_id); + H5Aclose(attr_out); H5Sclose(space_id); + H5Tclose(wtype_id); + H5Tclose(ftype_id); H5Aclose(attr_id); - H5Aclose(attr_out); } H5E_END_TRY; return ret_value; @@ -792,9 +810,9 @@ static int check_objects(const char* fname, pack_opt_t *options) { done: H5E_BEGIN_TRY { - H5Fclose(fid); H5Sclose(sid); H5Dclose(did); + H5Fclose(fid); } H5E_END_TRY; if (travt) trav_table_free(travt); diff --git a/tools/src/h5repack/h5repack_copy.c b/tools/src/h5repack/h5repack_copy.c index 080defa..1adcceb 100644 --- a/tools/src/h5repack/h5repack_copy.c +++ b/tools/src/h5repack/h5repack_copy.c @@ -78,23 +78,21 @@ static herr_t walk_error_callback(H5_ATTR_UNUSED unsigned n, const H5E_error2_t * * Return: 0, ok, * -1 no - * - * Programmer: Pedro Vicente, pvn@ncsa.uiuc.edu - * - * Date: October, 23, 2003 - * *------------------------------------------------------------------------- */ int copy_objects(const char* fnamein, const char* fnameout, pack_opt_t *options) { - int ret_value = 0; /* no need to LEAVE() on ERROR: HERR_INIT(int, SUCCEED) */ - hid_t fidin; + int ret_value = 0; + hid_t fidin = -1; hid_t fidout = -1; - trav_table_t *travt = NULL; - hsize_t ub_size = 0; /* size of user block */ + hid_t fcpl_in = -1; /* file creation property list ID for input file */ + hid_t grp_in = -1; /* group ID */ + hid_t gcpl_in = -1; /* group creation property list */ hid_t fcpl = H5P_DEFAULT; /* file creation property list ID */ hid_t fapl = H5P_DEFAULT; /* file access property list ID */ + trav_table_t *travt = NULL; + hsize_t ub_size = 0; /* size of user block */ H5F_fspace_strategy_t set_strategy; /* Strategy to be set in outupt file */ hbool_t set_persist; /* Persist free-space status to be set in output file */ hsize_t set_threshold; /* Free-space section threshold to be set in output file */ @@ -114,10 +112,6 @@ int copy_objects(const char* fnamein, const char* fnameout, pack_opt_t *options) /* get user block size and file space strategy/persist/threshold */ { - hid_t fcpl_in; /* file creation property list ID for input file */ - hid_t grp_in = -1; /* group ID */ - hid_t gcpl_in = -1; /* group creation property list */ - if ((fcpl_in = H5Fget_create_plist(fidin)) < 0) HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Fget_create_plist failed to retrieve file creation property list"); @@ -343,42 +337,26 @@ print_user_block(fnamein, fidin); /* init table */ trav_table_init(&travt); - /* get the list of objects in the file */ - if (h5trav_gettable(fidin, travt) < 0) - HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "h5trav_gettable failed"); - - /*------------------------------------------------------------------------- - * do the copy - *------------------------------------------------------------------------- - */ - if (do_copy_objects(fidin, fidout, travt, options) < 0) - HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "do_copy_objects from <%s> could not copy data to <%s>", fnamein, fnameout); - - /*------------------------------------------------------------------------- - * do the copy of referenced objects - * and create hard links - *------------------------------------------------------------------------- - */ - if (do_copy_refobjs(fidin, fidout, travt, options) < 0) - HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "do_copy_refobjs from <%s> could not copy data to <%s>", fnamein, fnameout); - - /*------------------------------------------------------------------------- - * close - *------------------------------------------------------------------------- - */ - - if (fapl > 0) - H5Pclose(fapl); - - if (fcpl > 0) - H5Pclose(fcpl); - - H5Fclose(fidin); - H5Fclose(fidout); - - /* free table */ - trav_table_free(travt); - travt = NULL; + if (travt) { + /* get the list of objects in the file */ + if (h5trav_gettable(fidin, travt) < 0) + HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "h5trav_gettable failed"); + + /*------------------------------------------------------------------------- + * do the copy + *------------------------------------------------------------------------- + */ + if (do_copy_objects(fidin, fidout, travt, options) < 0) + HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "do_copy_objects from <%s> could not copy data to <%s>", fnamein, fnameout); + + /*------------------------------------------------------------------------- + * do the copy of referenced objects + * and create hard links + *------------------------------------------------------------------------- + */ + if (do_copy_refobjs(fidin, fidout, travt, options) < 0) + HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "do_copy_refobjs from <%s> could not copy data to <%s>", fnamein, fnameout); + } /*------------------------------------------------------------------------- * write only the input file user block if there is no user block file input @@ -389,17 +367,15 @@ print_user_block(fnamein, fidin); if (copy_user_block(fnamein, fnameout, ub_size) < 0) HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "Could not copy user block. Exiting..."); - return 0; - - /*------------------------------------------------------------------------- - * out - *------------------------------------------------------------------------- - */ - done: H5E_BEGIN_TRY { + H5Pclose(fcpl_in); + H5Pclose(gcpl_in); H5Pclose(fapl); H5Pclose(fcpl); + H5Gclose(grp_in); + H5Fclose(fidin); + H5Fclose(fidout); H5Fclose(fidin); H5Fclose(fidout); } H5E_END_TRY; @@ -416,7 +392,7 @@ done: * The size of hyperslab is limitted by H5TOOLS_BUFSIZE. * Return the hyperslab dimentions and size in byte. * - * Return: 0 - SUCCEED, -1 FAILED + * Return: 0 - SUCCEED, -1 FAILED * * Parameters: * dcpl_id : [IN] dataset creation property. @@ -426,8 +402,6 @@ done: * dims_hslab[] : [OUT] calculated hyperslab dimentions * * hslab_nbytes_p : [OUT] total byte of the hyperslab * - * Programmer: Jonathan Kim - * Date: Feburary, 2012 * Update: * The hyperslab calucation would be depend on if the dataset is chunked * or not. @@ -441,25 +415,23 @@ done: * the boundary would be dataset's dims. * * The calulation starts from the last dimention (h5dump dims output). - * - * Note: - * Added for JIRA HDFFV-7862. *-----------------------------------------*/ -int Get_hyperslab(hid_t dcpl_id, int rank_dset, hsize_t dims_dset[], +int +Get_hyperslab(hid_t dcpl_id, int rank_dset, hsize_t dims_dset[], size_t size_datum, hsize_t dims_hslab[], hsize_t * hslab_nbytes_p) { - int ret_value = 0; /*no need to LEAVE() on ERROR: HERR_INIT(int, SUCCEED) */ + int ret_value = 0; int k; H5D_layout_t dset_layout; int rank_chunk; hsize_t dims_chunk[H5S_MAX_RANK]; hsize_t size_chunk = 1; - hsize_t nchunk_fit; /* number of chunks that fits in hyperslab buffer (H5TOOLS_BUFSIZE) */ - hsize_t ndatum_fit; /* number of dataum that fits in hyperslab buffer (H5TOOLS_BUFSIZE) */ + hsize_t nchunk_fit; /* number of chunks that fits in hyperslab buffer (H5TOOLS_BUFSIZE) */ + hsize_t ndatum_fit; /* number of dataum that fits in hyperslab buffer (H5TOOLS_BUFSIZE) */ hsize_t chunk_dims_map[H5S_MAX_RANK]; /* mapped chunk dimentions */ - hsize_t hs_dims_map[H5S_MAX_RANK]; /* mapped hyperslab dimentions */ - hsize_t hslab_nbytes; /* size of hyperslab in byte */ + hsize_t hs_dims_map[H5S_MAX_RANK]; /* mapped hyperslab dimentions */ + hsize_t hslab_nbytes; /* size of hyperslab in byte */ /* init to set as size of a data element */ hslab_nbytes = size_datum; @@ -572,24 +544,9 @@ done: /*------------------------------------------------------------------------- * Function: do_copy_objects * - * Purpose: duplicate all HDF5 objects in the file - * - * Return: 0, ok, -1 no - * - * Programmer: Pedro Vicente, pvn@ncsa.uiuc.edu - * - * Date: October, 23, 2003 - * - * Modifications: - * - * July 2004: Introduced the extra EC or NN option for SZIP - * - * December 2004: Added a check for H5Dcreate; if the dataset cannot be created - * with the requested filter, use the input one - * - * October 2006: Read/write using the file type by default. + * Purpose: duplicate all HDF5 objects in the file * - * October 2006: Read by hyperslabs for big datasets. + * Return: 0, ok, -1 no * * A threshold of H5TOOLS_MALLOCSIZE (128 MB) is the limit upon which I/O hyperslab is done * i.e., if the memory needed to read a dataset is greater than this limit, @@ -630,31 +587,6 @@ done: * in (2) is that, when using the strip mine size, it assures that the "remaining" part * of the dataset that does not fill an entire strip mine is processed. * - * November 2006: Use H5Ocopy in the copy of objects. The logic for using - * H5Ocopy or not is if a change of filters or layout is requested by the user - * then use read/write else use H5Ocopy. - * - * May, 1, 2008: Add a printing of the compression ratio of old size / new size - * - * Feburary 2012: improve Read/Write by hyperslabs for big datasets. - * Programmer: Jonathan Kim - * - * A threshold of H5TOOLS_MALLOCSIZE is the limit upon which I/O hyperslab is done - * i.e., if the memory needed to read a dataset is greater than this limit, - * then hyperslab I/O is done instead of one operation I/O - * For each dataset, the memory needed is calculated according to - * - * memory needed = number of elements * size of each element - * - * if the memory needed is lower than H5TOOLS_MALLOCSIZE, then the following operations - * are done - * - * H5Dread( input_dataset ) - * H5Dwrite( output_dataset ) - * - * with all elements in the datasets selected. If the memory needed is greater than - * H5TOOLS_MALLOCSIZE, then the following operations are done instead: - * * 1. figure out a hyperslab (dimentions) and size (refer to Get_hyperslab()). * 2. Calculate the hyperslab selections as the selection is moving forward. * Selection would be same as the hyperslab except for the remaining edge portion @@ -666,7 +598,7 @@ done: int do_copy_objects(hid_t fidin, hid_t fidout, trav_table_t *travt, pack_opt_t *options) /* repack options */ { - int ret_value = 0; /*no need to LEAVE() on ERROR: HERR_INIT(int, SUCCEED) */ + int ret_value = 0; hid_t grp_in = -1; /* group ID */ hid_t grp_out = -1; /* group ID */ hid_t dset_in = -1; /* read dataset ID */ @@ -1243,6 +1175,7 @@ int do_copy_objects(hid_t fidin, hid_t fidout, trav_table_t *travt, HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Tclose failed"); if (H5Tclose(type_out) < 0) HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Tclose failed"); + type_out = -1; /* named datatypes stack, named_dt_head, manages allocation */ break; @@ -1273,6 +1206,18 @@ int do_copy_objects(hid_t fidin, hid_t fidout, trav_table_t *travt, } /* end if */ done: + + /* Finalize (link) the stack of named datatypes (if any) first + * because of reference counting */ + if (0 == ret_value && named_dt_head != NULL) { + if (named_datatype_free(&named_dt_head, 0) < 0) + H5TOOLS_INFO(H5E_tools_min_id_g, "named_datatype_free failed"); + } + else + H5E_BEGIN_TRY { + named_datatype_free(&named_dt_head, 1); + } H5E_END_TRY; + H5E_BEGIN_TRY { H5Gclose(grp_in); @@ -1295,14 +1240,6 @@ done: if (hslab_buf != NULL) HDfree(hslab_buf); - /* Finalize (link) the stack of named datatypes (if any) */ - if (0 == ret_value && named_dt_head != NULL) - named_datatype_free(&named_dt_head, 0); - else - H5E_BEGIN_TRY { - named_datatype_free(&named_dt_head, 1); - } H5E_END_TRY; - return ret_value; } @@ -1310,10 +1247,10 @@ done: * Function: print_dataset_info * * Purpose: print name, filters, percentage compression of a dataset - * *------------------------------------------------------------------------- */ -static void print_dataset_info(hid_t dcpl_id, char *objname, double ratio, int pr) +static void +print_dataset_info(hid_t dcpl_id, char *objname, double ratio, int pr) { char strfilter[255]; #if defined (PRINT_DEBUG ) @@ -1325,7 +1262,7 @@ static void print_dataset_info(hid_t dcpl_id, char *objname, double ratio, int p unsigned cd_values[20]; /* filter client data values */ size_t cd_nelmts; /* filter client number of values */ char f_objname[256]; /* filter objname */ - int i; + int i; HDstrcpy(strfilter, "\0"); @@ -1417,19 +1354,15 @@ static void print_dataset_info(hid_t dcpl_id, char *objname, double ratio, int p /*------------------------------------------------------------------------- * Function: copy_user_block * - * Purpose: copy user block from one file to another - * - * Return: 0, ok, -1 no - * - * Programmer: Peter Cao - * - * Date: October, 25, 2007 + * Purpose: copy user block from one file to another * + * Return: 0, ok, -1 no *------------------------------------------------------------------------- */ -static int copy_user_block(const char *infile, const char *outfile, hsize_t size) +static int +copy_user_block(const char *infile, const char *outfile, hsize_t size) { - int ret_value = 0; /*no need to LEAVE() on ERROR: HERR_INIT(int, SUCCEED) */ + int ret_value = 0; int infid = -1, outfid = -1; /* File descriptors */ /* User block must be any power of 2 equal to 512 or greater (512, 1024, 2048, etc.) */ @@ -1491,21 +1424,17 @@ done: /*------------------------------------------------------------------------- * Function: print_user_block * - * Purpose: print user block - * - * Return: 0, ok, -1 no - * - * Programmer: Pedro Vicente - * - * Date: August, 20, 2008 + * Purpose: print user block * + * Return: 0, ok, -1 no *------------------------------------------------------------------------- */ #if defined (H5REPACK_DEBUG_USER_BLOCK) static -void print_user_block(const char *filename, hid_t fid) +void +print_user_block(const char *filename, hid_t fid) { - int ret_value = 0; /*no need to LEAVE() on ERROR: HERR_INIT(int, SUCCEED) */ + int ret_value = 0; int fh; /* file handle */ hsize_t ub_size; /* user block size */ hsize_t size; /* size read */ diff --git a/tools/src/h5repack/h5repack_refs.c b/tools/src/h5repack/h5repack_refs.c index 376ab92..14294ea 100644 --- a/tools/src/h5repack/h5repack_refs.c +++ b/tools/src/h5repack/h5repack_refs.c @@ -189,7 +189,8 @@ int do_copy_refobjs(hid_t fidin, refname); } } /*refname*/ - H5Oclose(refobj_id); + if (H5Oclose(refobj_id) < 0) + H5TOOLS_INFO(H5E_tools_min_id_g, "H5Oclose refob failed"); } /* u */ } /*nelmts*/ @@ -276,7 +277,8 @@ int do_copy_refobjs(hid_t fidin, refname); } } /*refname*/ - H5Oclose(refobj_id); + if (H5Oclose(refobj_id) < 0) + H5TOOLS_INFO(H5E_tools_min_id_g, "H5Oclose refobj_id failed"); } /* u */ } /*nelmts*/ @@ -377,7 +379,8 @@ int do_copy_refobjs(hid_t fidin, * This function is paired with copy_named_datatype() which is called * in copy_attr(), so need to free. */ - named_datatype_free(&named_dt_head, 0); + if (named_datatype_free(&named_dt_head, 0) < 0) + H5TOOLS_INFO(H5E_tools_min_id_g, "named_datatype_free failed"); return ret_value; @@ -392,7 +395,7 @@ done: H5Tclose(ftype_id); H5Tclose(mtype_id); H5Tclose(type_in); - named_datatype_free(&named_dt_head, 0); + named_datatype_free(&named_dt_head, 1); } H5E_END_TRY; return ret_value; @@ -483,7 +486,8 @@ static int copy_refs_attr(hid_t loc_in, base_type = H5Tget_super(ftype_id); is_ref_vlen = (H5Tget_class(base_type) == H5T_REFERENCE); msize = H5Tget_size(base_type); - H5Tclose(base_type); + if (H5Tclose(base_type) < 0) + H5TOOLS_INFO(H5E_tools_min_id_g, "H5Tclose base_type failed"); } else if(type_class == H5T_ARRAY ) { hid_t base_type; @@ -491,7 +495,8 @@ static int copy_refs_attr(hid_t loc_in, base_type = H5Tget_super(ftype_id); is_ref_array = (H5Tget_class(base_type) == H5T_REFERENCE); msize = H5Tget_size(base_type); - H5Tclose(base_type); + if (H5Tclose(base_type) < 0) + H5TOOLS_INFO(H5E_tools_min_id_g, "H5Tclose base_type failed"); } else if(type_class == H5T_COMPOUND) { int nmembers = H5Tget_nmembers(ftype_id) ; @@ -511,7 +516,8 @@ static int copy_refs_attr(hid_t loc_in, ref_comp_size[ref_comp_field_n] = H5Tget_size(mtid); ref_comp_field_n++; } - H5Tclose(mtid); + if (H5Tclose(mtid) < 0) + H5TOOLS_INFO(H5E_tools_min_id_g, "H5Tclose mtid failed"); } /* if compound don't contain reference type member, free the above @@ -533,9 +539,12 @@ static int copy_refs_attr(hid_t loc_in, is_ref_comp = (ref_comp_field_n > 0); if (!(is_ref || is_ref_vlen || is_ref_array || is_ref_comp)) { - H5Tclose(mtype_id); - H5Tclose(ftype_id); - H5Aclose(attr_id); + if (H5Tclose(mtype_id) < 0) + H5TOOLS_INFO(H5E_tools_min_id_g, "H5Tclose mtype_id failed"); + if (H5Tclose(ftype_id) < 0) + H5TOOLS_INFO(H5E_tools_min_id_g, "H5Tclose ftype_id failed"); + if (H5Aclose(attr_id) < 0) + H5TOOLS_INFO(H5E_tools_min_id_g, "H5Aclose attr_id failed"); continue; } @@ -568,7 +577,8 @@ static int copy_refs_attr(hid_t loc_in, base_type = H5Tget_super(ftype_id); msize = H5Tget_size(base_type); - H5Tclose(base_type); + if (H5Tclose(base_type) < 0) + H5TOOLS_INFO(H5E_tools_min_id_g, "H5Tclose base_type failed"); array_rank = (unsigned)H5Tget_array_ndims(mtype_id); H5Tget_array_dims2(mtype_id, array_dims); diff --git a/tools/test/h5copy/CMakeLists.txt b/tools/test/h5copy/CMakeLists.txt index 4a519ab..c57cd5e 100644 --- a/tools/test/h5copy/CMakeLists.txt +++ b/tools/test/h5copy/CMakeLists.txt @@ -10,14 +10,44 @@ INCLUDE_DIRECTORIES (${HDF5_TOOLS_DIR}/lib) # Add the h5copy test executables # -------------------------------------------------------------------- - if (HDF5_BUILD_GENERATORS) - add_executable (h5copygentest ${HDF5_TOOLS_TEST_H5COPY_SOURCE_DIR}/h5copygentest.c) - TARGET_NAMING (h5copygentest STATIC) - TARGET_C_PROPERTIES (h5copygentest STATIC " " " ") - target_link_libraries (h5copygentest ${HDF5_LIB_TARGET}) - set_target_properties (h5copygentest PROPERTIES FOLDER generator/tools) +if (HDF5_BUILD_GENERATORS) + add_executable (h5copygentest ${HDF5_TOOLS_TEST_H5COPY_SOURCE_DIR}/h5copygentest.c) + TARGET_NAMING (h5copygentest STATIC) + TARGET_C_PROPERTIES (h5copygentest STATIC " " " ") + target_link_libraries (h5copygentest ${HDF5_LIB_TARGET}) + set_target_properties (h5copygentest PROPERTIES FOLDER generator/tools) - #add_test (NAME h5copygentest COMMAND $) - endif () + #add_test (NAME h5copygentest COMMAND $) +endif () - include (CMakeTests.cmake) +#----------------------------------------------------------------------------- +# If plugin library tests can be tested +#----------------------------------------------------------------------------- +if (BUILD_SHARED_LIBS) + set (HDF5_TOOL_PLUGIN_LIB_CORENAME "dynlibcopy") + set (HDF5_TOOL_PLUGIN_LIB_NAME "${HDF5_EXTERNAL_LIB_PREFIX}${HDF5_TOOL_PLUGIN_LIB_CORENAME}") + set (HDF5_TOOL_PLUGIN_LIB_TARGET ${HDF5_TOOL_PLUGIN_LIB_CORENAME}) + add_definitions (${HDF_EXTRA_C_FLAGS}) + INCLUDE_DIRECTORIES (${HDF5_SRC_DIR}) + + add_library (${HDF5_TOOL_PLUGIN_LIB_TARGET} SHARED dynlib_copy.c) + TARGET_C_PROPERTIES (${HDF5_TOOL_PLUGIN_LIB_TARGET} SHARED " " " ") + target_link_libraries (${HDF5_TOOL_PLUGIN_LIB_TARGET} ${HDF5_TEST_LIB_TARGET}) + H5_SET_LIB_OPTIONS (${HDF5_TOOL_PLUGIN_LIB_TARGET} ${HDF5_TOOL_PLUGIN_LIB_NAME} SHARED ${HDF5_PACKAGE_SOVERSION}) + + # make plugins dir + file (MAKE_DIRECTORY "${CMAKE_BINARY_DIR}/plugins") + #----------------------------------------------------------------------------- + # Copy plugin library to a plugins folder + #----------------------------------------------------------------------------- + add_custom_command ( + TARGET ${HDF5_TOOL_PLUGIN_LIB_TARGET} + POST_BUILD + COMMAND ${CMAKE_COMMAND} + ARGS -E copy_if_different + "$" + "${CMAKE_BINARY_DIR}/plugins/$" + ) +endif () + +include (CMakeTests.cmake) diff --git a/tools/test/h5copy/CMakeTests.cmake b/tools/test/h5copy/CMakeTests.cmake index b60c0e9..1bdefa6 100644 --- a/tools/test/h5copy/CMakeTests.cmake +++ b/tools/test/h5copy/CMakeTests.cmake @@ -24,10 +24,16 @@ ${HDF5_TOOLS_TEST_H5COPY_SOURCE_DIR}/testfiles/h5copy_extlinks_trg.h5 ${HDF5_TOOLS_TEST_H5COPY_SOURCE_DIR}/testfiles/h5copy_ref.h5 ${HDF5_TOOLS_TEST_H5COPY_SOURCE_DIR}/testfiles/h5copytst.h5 + ${HDF5_TOOLS_TEST_H5COPY_SOURCE_DIR}/testfiles/tudfilter.h5 + ${HDF5_TOOLS_TEST_H5COPY_SOURCE_DIR}/testfiles/tudfilter2.h5 ) set (LIST_OTHER_TEST_FILES ${HDF5_TOOLS_TEST_H5COPY_SOURCE_DIR}/testfiles/h5copy_misc1.out + ${HDF5_TOOLS_TEST_H5COPY_SOURCE_DIR}/testfiles/tudfilter.h5.txt + ${HDF5_TOOLS_TEST_H5COPY_SOURCE_DIR}/testfiles/tudfilter.h5_ERR.txt + ${HDF5_TOOLS_TEST_H5COPY_SOURCE_DIR}/testfiles/h5copy_plugin_fail_ERR.out.h5.txt + ${HDF5_TOOLS_TEST_H5COPY_SOURCE_DIR}/testfiles/h5copy_plugin_test.out.h5.txt ) file (MAKE_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles") @@ -74,9 +80,9 @@ if (NOT "${resultcode}" STREQUAL "2") add_test ( NAME H5COPY_F-${testname}-DIFF - COMMAND $ -q ./testfiles/${infile} ./testfiles/${testname}.out.h5 ${srcname} ${dstname} + COMMAND $ -v ./testfiles/${infile} ./testfiles/${testname}.out.h5 ${srcname} ${dstname} ) - SET_TESTS_PROPERTIES(H5COPY_F-${testname}-DIFF PROPERTIES DEPENDS H5COPY_F-${testname}) + set_tests_properties (H5COPY_F-${testname}-DIFF PROPERTIES DEPENDS H5COPY_F-${testname}) if ("${resultcode}" STREQUAL "1") set_tests_properties (H5COPY_F-${testname}-DIFF PROPERTIES WILL_FAIL "true") endif () @@ -110,9 +116,9 @@ if (NOT "${resultcode}" STREQUAL "2") add_test ( NAME H5COPY-${testname}-DIFF - COMMAND $ -q ./testfiles/${infile} ./testfiles/${testname}.out.h5 ${srcname} ${dstname} + COMMAND $ -v ./testfiles/${infile} ./testfiles/${testname}.out.h5 ${srcname} ${dstname} ) - SET_TESTS_PROPERTIES(H5COPY-${testname}-DIFF PROPERTIES DEPENDS H5COPY-${testname}) + set_tests_properties (H5COPY-${testname}-DIFF PROPERTIES DEPENDS H5COPY-${testname}) if ("${resultcode}" STREQUAL "1") set_tests_properties (H5COPY-${testname}-DIFF PROPERTIES WILL_FAIL "true") endif () @@ -160,9 +166,9 @@ if (NOT "${resultcode}" STREQUAL "2") add_test ( NAME H5COPY-${testname}-DIFF - COMMAND $ -q ./testfiles/${infile} ./testfiles/${testname}.out.h5 ${srcname} ${dstname} + COMMAND $ -v ./testfiles/${infile} ./testfiles/${testname}.out.h5 ${srcname} ${dstname} ) - SET_TESTS_PROPERTIES(H5COPY-${testname}-DIFF PROPERTIES DEPENDS H5COPY-${testname}) + set_tests_properties (H5COPY-${testname}-DIFF PROPERTIES DEPENDS H5COPY-${testname}) if ("${resultcode}" STREQUAL "1") set_tests_properties (H5COPY-${testname}-DIFF PROPERTIES WILL_FAIL "true") endif () @@ -201,9 +207,9 @@ if (NOT "${resultcode}" STREQUAL "2") add_test ( NAME H5COPY_SAME-${testname}-DIFF - COMMAND $ -q ./testfiles/${testname}.out.h5 ./testfiles/${testname}.out.h5 ${srcname} ${dstname} + COMMAND $ -v ./testfiles/${testname}.out.h5 ./testfiles/${testname}.out.h5 ${srcname} ${dstname} ) - SET_TESTS_PROPERTIES(H5COPY_SAME-${testname}-DIFF PROPERTIES DEPENDS H5COPY_SAME-${testname}) + set_tests_properties (H5COPY_SAME-${testname}-DIFF PROPERTIES DEPENDS H5COPY_SAME-${testname}) if ("${resultcode}" STREQUAL "1") set_tests_properties (H5COPY_SAME-${testname}-DIFF PROPERTIES WILL_FAIL "true") endif () @@ -250,6 +256,134 @@ endif () endmacro () + macro (ADD_H5_UD_TEST testname resultcode infile sparam srcname dparam dstname cmpfile) + if (NOT HDF5_ENABLE_USING_MEMCHECKER) + # Remove any output file left over from previous test run + add_test ( + NAME H5COPY_UD-${testname}-clear-objects + COMMAND ${CMAKE_COMMAND} + -E remove + testfiles/${testname}.out.h5 + testfiles/${infile}.out + testfiles/${infile}.out.err + testfiles/${testname}.out.h5.out + testfiles/${testname}.out.h5.out.err + ) + if ("${resultcode}" STREQUAL "2") + add_test ( + NAME H5COPY_UD-${testname} + COMMAND "${CMAKE_COMMAND}" + -D "TEST_PROGRAM=$" + -D "TEST_ARGS:STRING=-v;-i;./testfiles/${infile};-o;./testfiles/${testname}.out.h5;${sparam};${srcname};${dparam};${dstname}" + -D "TEST_FOLDER=${PROJECT_BINARY_DIR}" + -D "TEST_OUTPUT=./testfiles/${infile}.out" + -D "TEST_EXPECT=${resultcode}" + -D "TEST_REFERENCE=./testfiles/${infile}.txt" + -D "TEST_APPEND=EXIT CODE:" + -D "TEST_ENV_VAR=HDF5_PLUGIN_PATH" + -D "TEST_ENV_VALUE=${CMAKE_BINARY_DIR}" + -P "${HDF_RESOURCES_EXT_DIR}/runTest.cmake" + ) + else () + add_test ( + NAME H5COPY_UD-${testname} + COMMAND "${CMAKE_COMMAND}" + -D "TEST_PROGRAM=$" + -D "TEST_ARGS:STRING=-v;-i;./testfiles/${infile};-o;./testfiles/${testname}.out.h5;${sparam};${srcname};${dparam};${dstname}" + -D "TEST_FOLDER=${PROJECT_BINARY_DIR}" + -D "TEST_OUTPUT=./testfiles/${infile}.out" + -D "TEST_EXPECT=${resultcode}" + -D "TEST_REFERENCE=./testfiles/${infile}.txt" + -D "TEST_APPEND=EXIT CODE:" + -D "TEST_ENV_VAR=HDF5_PLUGIN_PATH" + -D "TEST_ENV_VALUE=${CMAKE_BINARY_DIR}/plugins" + -P "${HDF_RESOURCES_EXT_DIR}/runTest.cmake" + ) + endif () + set_tests_properties (H5COPY_UD-${testname} PROPERTIES DEPENDS H5COPY_UD-${testname}-clear-objects) + add_test ( + NAME H5COPY_UD-${testname}-DIFF + COMMAND "${CMAKE_COMMAND}" + -D "TEST_PROGRAM=$" + -D "TEST_ARGS:STRING=-v;./testfiles/${cmpfile};./testfiles/${testname}.out.h5;${srcname};${dstname}" + -D "TEST_FOLDER=${PROJECT_BINARY_DIR}" + -D "TEST_OUTPUT=./testfiles/${testname}.out.h5.out" + -D "TEST_EXPECT=${resultcode}" + -D "TEST_REFERENCE=./testfiles/${testname}.out.h5.txt" + -D "TEST_APPEND=EXIT CODE:" + -D "TEST_ENV_VAR=HDF5_PLUGIN_PATH" + -D "TEST_ENV_VALUE=${CMAKE_BINARY_DIR}/plugins" + -P "${HDF_RESOURCES_EXT_DIR}/runTest.cmake" + ) + set_tests_properties (H5COPY_UD-${testname}-DIFF PROPERTIES DEPENDS H5COPY_UD-${testname}) + endif () + endmacro () + + macro (ADD_H5_UD_ERR_TEST testname resultcode infile sparam srcname dparam dstname cmpfile) + if (NOT HDF5_ENABLE_USING_MEMCHECKER) + # Remove any output file left over from previous test run + add_test ( + NAME H5COPY_UD_ERR-${testname}-clearall-objects + COMMAND ${CMAKE_COMMAND} + -E remove + testfiles/${testname}_ERR.out.h5 + testfiles/${infile}_ERR.out + testfiles/${infile}_ERR.out.err + testfiles/${testname}_ERR.out.h5.out + testfiles/${testname}_ERR.out.h5.out.err + ) + if ("${resultcode}" STREQUAL "2") + add_test ( + NAME H5COPY_UD_ERR-${testname} + COMMAND "${CMAKE_COMMAND}" + -D "TEST_PROGRAM=$" + -D "TEST_ARGS:STRING=-v;--enable-error-stack;-i;./testfiles/${infile};-o;./testfiles/${testname}_ERR.out.h5;${sparam};${srcname};${dparam};${dstname}" + -D "TEST_FOLDER=${PROJECT_BINARY_DIR}" + -D "TEST_OUTPUT=./testfiles/${infile}_ERR.out" + -D "TEST_EXPECT=0" + -D "TEST_REFERENCE=./testfiles/${infile}_ERR.txt" + -D "TEST_MASK_ERROR=true" + -D "TEST_APPEND=EXIT CODE:" + -D "TEST_ENV_VAR=HDF5_PLUGIN_PATH" + -D "TEST_ENV_VALUE=${CMAKE_BINARY_DIR}" + -P "${HDF_RESOURCES_EXT_DIR}/runTest.cmake" + ) + else () + add_test ( + NAME H5COPY_UD_ERR-${testname} + COMMAND "${CMAKE_COMMAND}" + -D "TEST_PROGRAM=$" + -D "TEST_ARGS:STRING=-v;--enable-error-stack;-i;./testfiles/${infile};-o;./testfiles/${testname}_ERR.out.h5;${sparam};${srcname};${dparam};${dstname}" + -D "TEST_FOLDER=${PROJECT_BINARY_DIR}" + -D "TEST_OUTPUT=./testfiles/${infile}_ERR.out" + -D "TEST_EXPECT=${resultcode}" + -D "TEST_REFERENCE=./testfiles/${infile}_ERR.txt" + -D "TEST_MASK_ERROR=true" + -D "TEST_APPEND=EXIT CODE:" + -D "TEST_ENV_VAR=HDF5_PLUGIN_PATH" + -D "TEST_ENV_VALUE=${CMAKE_BINARY_DIR}/plugins" + -P "${HDF_RESOURCES_EXT_DIR}/runTest.cmake" + ) + endif () + set_tests_properties (H5COPY_UD_ERR-${testname} PROPERTIES DEPENDS H5COPY_UD_ERR-${testname}-clearall-objects) + add_test ( + NAME H5COPY_UD_ERR-${testname}-DIFF + COMMAND "${CMAKE_COMMAND}" + -D "TEST_PROGRAM=$" + -D "TEST_ARGS:STRING=-v;./testfiles/${cmpfile};./testfiles/${testname}_ERR.out.h5;${srcname};${dstname}" + -D "TEST_FOLDER=${PROJECT_BINARY_DIR}" + -D "TEST_OUTPUT=./testfiles/${testname}_ERR.out.h5.out" + -D "TEST_EXPECT=0" + -D "TEST_REFERENCE=./testfiles/${testname}_ERR.out.h5.txt" + -D "TEST_APPEND=EXIT CODE:" + -D "TEST_ENV_VAR=HDF5_PLUGIN_PATH" + -D "TEST_ENV_VALUE=${CMAKE_BINARY_DIR}/plugins" + -P "${HDF_RESOURCES_EXT_DIR}/runTest.cmake" + ) + set_tests_properties (H5COPY_UD_ERR-${testname}-DIFF PROPERTIES DEPENDS H5COPY_UD_ERR-${testname}) + endif () + endmacro () + ############################################################################## ############################################################################## ### T H E T E S T S ### @@ -434,3 +568,11 @@ else () ADD_H5_TEST_SAME (samefile2 2 ${HDF_FILE1}.h5 /grp_dsets /grp_dsets -v -s /grp_dsets -d /grp_dsets_cp) endif () + +############################################################################## +### P L U G I N T E S T S +############################################################################## +if (BUILD_SHARED_LIBS) + ADD_H5_UD_TEST (h5copy_plugin_test 0 tudfilter.h5 -s /dynlibud -d /dynlibud tudfilter2.h5 ) + ADD_H5_UD_ERR_TEST (h5copy_plugin_fail 2 tudfilter.h5 -s /dynlibud -d /dynlibud tudfilter2.h5) +endif () diff --git a/tools/test/h5copy/dynlib_copy.c b/tools/test/h5copy/dynlib_copy.c new file mode 100644 index 0000000..571452e --- /dev/null +++ b/tools/test/h5copy/dynlib_copy.c @@ -0,0 +1,89 @@ +/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + * Copyright by The HDF Group. * + * All rights reserved. * + * * + * This file is part of HDF5. The full HDF5 copyright notice, including * + * terms governing use, modification, and redistribution, is contained in * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ +/* + * Purpose: Tests the plugin module (H5PL) + */ + +#include +#include +#include "H5PLextern.h" + +#define H5Z_FILTER_DYNLIBUD 300 +#define MULTIPLIER 3 + +static size_t H5Z_filter_dynlibud(unsigned int flags, size_t cd_nelmts, + const unsigned int *cd_values, size_t nbytes, size_t *buf_size, void **buf); + +/* This message derives from H5Z */ +const H5Z_class2_t H5Z_DYNLIBUD[1] = {{ + H5Z_CLASS_T_VERS, /* H5Z_class_t version */ + H5Z_FILTER_DYNLIBUD, /* Filter id number */ + 1, 1, /* Encoding and decoding enabled */ + "dynlibud", /* Filter name for debugging */ + NULL, /* The "can apply" callback */ + NULL, /* The "set local" callback */ + (H5Z_func_t)H5Z_filter_dynlibud, /* The actual filter function */ +}}; + +H5PL_type_t H5PLget_plugin_type(void) {return H5PL_TYPE_FILTER;} +const void *H5PLget_plugin_info(void) {return H5Z_DYNLIBUD;} + +/*------------------------------------------------------------------------- + * Function: H5Z_filter_dynlibud + * + * Purpose: A dynlib2 filter method that multiplies the original value + * during write and divide the original value during read. It + * will be built as a shared library. plugin.c test will load + * and use this filter library. + * + * Return: Success: Data chunk size + * + * Failure: 0 + *------------------------------------------------------------------------- + */ +static size_t +H5Z_filter_dynlibud(unsigned int flags, size_t cd_nelmts, + const unsigned int *cd_values, size_t nbytes, + size_t *buf_size, void **buf) +{ + char *int_ptr = (char *)*buf; /* Pointer to the data values */ + size_t buf_left = *buf_size; /* Amount of data buffer left to process */ + + /* Check for the correct number of parameters */ + if(cd_nelmts > 0) + return(0); + + /* Assignment to eliminate unused parameter warning. */ + cd_values = cd_values; + + if(flags & H5Z_FLAG_REVERSE) { /*read*/ + /* Subtract the original value with MULTIPLIER */ + while(buf_left > 0) { + char temp = *int_ptr; + *int_ptr = temp - MULTIPLIER; + int_ptr++; + buf_left -= sizeof(*int_ptr); + } /* end while */ + } /* end if */ + else { /*write*/ + /* Add the original value with MULTIPLIER */ + while(buf_left > 0) { + char temp = *int_ptr; + *int_ptr = temp + MULTIPLIER; + int_ptr++; + buf_left -= sizeof(*int_ptr); + } /* end while */ + } /* end else */ + + return nbytes; +} /* end H5Z_filter_dynlibud() */ + diff --git a/tools/test/h5copy/testfiles/h5copy_plugin_fail_ERR.out.h5.txt b/tools/test/h5copy/testfiles/h5copy_plugin_fail_ERR.out.h5.txt new file mode 100644 index 0000000..66e9eb2 --- /dev/null +++ b/tools/test/h5copy/testfiles/h5copy_plugin_fail_ERR.out.h5.txt @@ -0,0 +1,3 @@ +dataset: and +0 differences found +EXIT CODE: 0 diff --git a/tools/test/h5copy/testfiles/h5copy_plugin_test.out.h5.txt b/tools/test/h5copy/testfiles/h5copy_plugin_test.out.h5.txt new file mode 100644 index 0000000..66e9eb2 --- /dev/null +++ b/tools/test/h5copy/testfiles/h5copy_plugin_test.out.h5.txt @@ -0,0 +1,3 @@ +dataset: and +0 differences found +EXIT CODE: 0 diff --git a/tools/test/h5copy/testfiles/tudfilter.h5 b/tools/test/h5copy/testfiles/tudfilter.h5 new file mode 100644 index 0000000..081b000 Binary files /dev/null and b/tools/test/h5copy/testfiles/tudfilter.h5 differ diff --git a/tools/test/h5copy/testfiles/tudfilter.h5.txt b/tools/test/h5copy/testfiles/tudfilter.h5.txt new file mode 100644 index 0000000..eabe407 --- /dev/null +++ b/tools/test/h5copy/testfiles/tudfilter.h5.txt @@ -0,0 +1,2 @@ +Copying file <./testfiles/tudfilter.h5> and object to file <./testfiles/h5copy_plugin_test.out.h5> and object +EXIT CODE: 0 diff --git a/tools/test/h5copy/testfiles/tudfilter.h5_ERR.txt b/tools/test/h5copy/testfiles/tudfilter.h5_ERR.txt new file mode 100644 index 0000000..3c5b3ca --- /dev/null +++ b/tools/test/h5copy/testfiles/tudfilter.h5_ERR.txt @@ -0,0 +1,2 @@ +Copying file <./testfiles/tudfilter.h5> and object to file <./testfiles/h5copy_plugin_fail_ERR.out.h5> and object +EXIT CODE: 0 diff --git a/tools/test/h5copy/testfiles/tudfilter2.h5 b/tools/test/h5copy/testfiles/tudfilter2.h5 new file mode 100644 index 0000000..081b000 Binary files /dev/null and b/tools/test/h5copy/testfiles/tudfilter2.h5 differ diff --git a/tools/test/h5diff/testfiles/h5diff_454_ERR.err b/tools/test/h5diff/testfiles/h5diff_454_ERR.err index 8fa1718..82802a1 100644 --- a/tools/test/h5diff/testfiles/h5diff_454_ERR.err +++ b/tools/test/h5diff/testfiles/h5diff_454_ERR.err @@ -1,4 +1,4 @@ H5tools-DIAG: Error detected in HDF5:tools (version (number)) thread (IDs): - #000: (file name) line (number) in h5diff(): Error: treat dangling link as error + #000: (file name) line (number) in h5diff(): treat dangling link as error major: Failure in tools library minor: error in function diff --git a/tools/test/h5diff/testfiles/h5diff_454_ERR.txt b/tools/test/h5diff/testfiles/h5diff_454_ERR.txt index de25a69..4501071 100644 --- a/tools/test/h5diff/testfiles/h5diff_454_ERR.txt +++ b/tools/test/h5diff/testfiles/h5diff_454_ERR.txt @@ -1,6 +1,6 @@ Warning: is a dangling link. H5tools-DIAG: Error detected in HDF5:tools (version (number)) thread (IDs): - #000: (file name) line (number) in h5diff(): Error: treat dangling link as error + #000: (file name) line (number) in h5diff(): treat dangling link as error major: Failure in tools library minor: error in function EXIT CODE: 2 diff --git a/tools/test/h5diff/testfiles/h5diff_455_ERR.err b/tools/test/h5diff/testfiles/h5diff_455_ERR.err index 8fa1718..82802a1 100644 --- a/tools/test/h5diff/testfiles/h5diff_455_ERR.err +++ b/tools/test/h5diff/testfiles/h5diff_455_ERR.err @@ -1,4 +1,4 @@ H5tools-DIAG: Error detected in HDF5:tools (version (number)) thread (IDs): - #000: (file name) line (number) in h5diff(): Error: treat dangling link as error + #000: (file name) line (number) in h5diff(): treat dangling link as error major: Failure in tools library minor: error in function diff --git a/tools/test/h5diff/testfiles/h5diff_455_ERR.txt b/tools/test/h5diff/testfiles/h5diff_455_ERR.txt index de25a69..4501071 100644 --- a/tools/test/h5diff/testfiles/h5diff_455_ERR.txt +++ b/tools/test/h5diff/testfiles/h5diff_455_ERR.txt @@ -1,6 +1,6 @@ Warning: is a dangling link. H5tools-DIAG: Error detected in HDF5:tools (version (number)) thread (IDs): - #000: (file name) line (number) in h5diff(): Error: treat dangling link as error + #000: (file name) line (number) in h5diff(): treat dangling link as error major: Failure in tools library minor: error in function EXIT CODE: 2 diff --git a/tools/test/h5diff/testfiles/h5diff_457_ERR.err b/tools/test/h5diff/testfiles/h5diff_457_ERR.err index 8fa1718..82802a1 100644 --- a/tools/test/h5diff/testfiles/h5diff_457_ERR.err +++ b/tools/test/h5diff/testfiles/h5diff_457_ERR.err @@ -1,4 +1,4 @@ H5tools-DIAG: Error detected in HDF5:tools (version (number)) thread (IDs): - #000: (file name) line (number) in h5diff(): Error: treat dangling link as error + #000: (file name) line (number) in h5diff(): treat dangling link as error major: Failure in tools library minor: error in function diff --git a/tools/test/h5diff/testfiles/h5diff_457_ERR.txt b/tools/test/h5diff/testfiles/h5diff_457_ERR.txt index 6594c9a..9d73750 100644 --- a/tools/test/h5diff/testfiles/h5diff_457_ERR.txt +++ b/tools/test/h5diff/testfiles/h5diff_457_ERR.txt @@ -1,6 +1,6 @@ Warning: is a dangling link. H5tools-DIAG: Error detected in HDF5:tools (version (number)) thread (IDs): - #000: (file name) line (number) in h5diff(): Error: treat dangling link as error + #000: (file name) line (number) in h5diff(): treat dangling link as error major: Failure in tools library minor: error in function EXIT CODE: 2 diff --git a/tools/test/h5diff/testfiles/h5diff_458_ERR.err b/tools/test/h5diff/testfiles/h5diff_458_ERR.err index 8fa1718..82802a1 100644 --- a/tools/test/h5diff/testfiles/h5diff_458_ERR.err +++ b/tools/test/h5diff/testfiles/h5diff_458_ERR.err @@ -1,4 +1,4 @@ H5tools-DIAG: Error detected in HDF5:tools (version (number)) thread (IDs): - #000: (file name) line (number) in h5diff(): Error: treat dangling link as error + #000: (file name) line (number) in h5diff(): treat dangling link as error major: Failure in tools library minor: error in function diff --git a/tools/test/h5diff/testfiles/h5diff_458_ERR.txt b/tools/test/h5diff/testfiles/h5diff_458_ERR.txt index 9a09c17..b084914 100644 --- a/tools/test/h5diff/testfiles/h5diff_458_ERR.txt +++ b/tools/test/h5diff/testfiles/h5diff_458_ERR.txt @@ -1,6 +1,6 @@ Warning: is a dangling link. H5tools-DIAG: Error detected in HDF5:tools (version (number)) thread (IDs): - #000: (file name) line (number) in h5diff(): Error: treat dangling link as error + #000: (file name) line (number) in h5diff(): treat dangling link as error major: Failure in tools library minor: error in function EXIT CODE: 2 diff --git a/tools/test/h5diff/testfiles/h5diff_459_ERR.err b/tools/test/h5diff/testfiles/h5diff_459_ERR.err index 8fa1718..82802a1 100644 --- a/tools/test/h5diff/testfiles/h5diff_459_ERR.err +++ b/tools/test/h5diff/testfiles/h5diff_459_ERR.err @@ -1,4 +1,4 @@ H5tools-DIAG: Error detected in HDF5:tools (version (number)) thread (IDs): - #000: (file name) line (number) in h5diff(): Error: treat dangling link as error + #000: (file name) line (number) in h5diff(): treat dangling link as error major: Failure in tools library minor: error in function diff --git a/tools/test/h5diff/testfiles/h5diff_459_ERR.txt b/tools/test/h5diff/testfiles/h5diff_459_ERR.txt index 6594c9a..9d73750 100644 --- a/tools/test/h5diff/testfiles/h5diff_459_ERR.txt +++ b/tools/test/h5diff/testfiles/h5diff_459_ERR.txt @@ -1,6 +1,6 @@ Warning: is a dangling link. H5tools-DIAG: Error detected in HDF5:tools (version (number)) thread (IDs): - #000: (file name) line (number) in h5diff(): Error: treat dangling link as error + #000: (file name) line (number) in h5diff(): treat dangling link as error major: Failure in tools library minor: error in function EXIT CODE: 2 diff --git a/tools/test/h5diff/testfiles/h5diff_60.txt b/tools/test/h5diff/testfiles/h5diff_60.txt index 938f279..dde17f6 100644 --- a/tools/test/h5diff/testfiles/h5diff_60.txt +++ b/tools/test/h5diff/testfiles/h5diff_60.txt @@ -2,8 +2,8 @@ dataset: and size: [3x4] [3x4] position string1 string1 difference ------------------------------------------------------------ -[ 1 0 ] 5 \000 -[ 1 1 ] 6 \000 +[ 1 0 ] \000 5 +[ 1 1 ] \000 6 [ 1 2 ] \000 7 [ 1 3 ] \000 8 4 differences found diff --git a/tools/test/h5diff/testfiles/h5diff_61.txt b/tools/test/h5diff/testfiles/h5diff_61.txt index 1f238b1..5553d63 100644 --- a/tools/test/h5diff/testfiles/h5diff_61.txt +++ b/tools/test/h5diff/testfiles/h5diff_61.txt @@ -2,29 +2,29 @@ dataset: and size: [20] [20] position string2 string2 difference ------------------------------------------------------------ -[ 8 ] 9 e -[ 8 ] f -[ 8 ] 9 -[ 9 ] 0 e -[ 9 ] f -[ 9 ] 0 -[ 10 ] 1 e -[ 10 ] f -[ 10 ] 1 -[ 11 ] 2 e -[ 11 ] f -[ 11 ] 2 -[ 12 ] e 3 -[ 12 ] f -[ 12 ] 3 -[ 13 ] e 4 -[ 13 ] f -[ 13 ] 4 -[ 14 ] e 5 -[ 14 ] f -[ 14 ] 5 -[ 15 ] e 6 -[ 15 ] f -[ 15 ] 6 +[ 8 ] e 9 +[ 8 ] f +[ 8 ] 9 +[ 9 ] e 0 +[ 9 ] f +[ 9 ] 0 +[ 10 ] e 1 +[ 10 ] f +[ 10 ] 1 +[ 11 ] e 2 +[ 11 ] f +[ 11 ] 2 +[ 12 ] 3 e +[ 12 ] f +[ 12 ] 3 +[ 13 ] 4 e +[ 13 ] f +[ 13 ] 4 +[ 14 ] 5 e +[ 14 ] f +[ 14 ] 5 +[ 15 ] 6 e +[ 15 ] f +[ 15 ] 6 24 differences found EXIT CODE: 1 diff --git a/tools/test/h5diff/testfiles/h5diff_62.txt b/tools/test/h5diff/testfiles/h5diff_62.txt index 0cc0947..934f61e 100644 --- a/tools/test/h5diff/testfiles/h5diff_62.txt +++ b/tools/test/h5diff/testfiles/h5diff_62.txt @@ -2,36 +2,36 @@ dataset: and size: [27] [27] position string3 string3 difference ------------------------------------------------------------ -[ 12 ] d c -[ 12 ] 2 d -[ 12 ] \000 2 -[ 13 ] 3 d -[ 13 ] \000 3 -[ 14 ] b a -[ 14 ] c b -[ 14 ] d c -[ 14 ] 4 d -[ 14 ] \000 4 -[ 15 ] c b -[ 15 ] d c -[ 15 ] 5 d -[ 15 ] \000 5 -[ 16 ] c d -[ 16 ] d 6 -[ 16 ] 6 \000 -[ 17 ] d 7 -[ 17 ] 7 \000 -[ 18 ] a b -[ 18 ] b c -[ 18 ] c d -[ 18 ] d 8 -[ 18 ] 8 \000 -[ 19 ] b c -[ 19 ] c d -[ 19 ] d 9 -[ 19 ] 9 \000 -[ 24 ] c d -[ 25 ] c d -[ 26 ] c d +[ 12 ] c d +[ 12 ] d 2 +[ 12 ] 2 \000 +[ 13 ] d 3 +[ 13 ] 3 \000 +[ 14 ] a b +[ 14 ] b c +[ 14 ] c d +[ 14 ] d 4 +[ 14 ] 4 \000 +[ 15 ] b c +[ 15 ] c d +[ 15 ] d 5 +[ 15 ] 5 \000 +[ 16 ] d c +[ 16 ] 6 d +[ 16 ] \000 6 +[ 17 ] 7 d +[ 17 ] \000 7 +[ 18 ] b a +[ 18 ] c b +[ 18 ] d c +[ 18 ] 8 d +[ 18 ] \000 8 +[ 19 ] c b +[ 19 ] d c +[ 19 ] 9 d +[ 19 ] \000 9 +[ 24 ] d c +[ 25 ] d c +[ 26 ] d c 31 differences found EXIT CODE: 1 diff --git a/tools/test/h5diff/testfiles/h5diff_63.txt b/tools/test/h5diff/testfiles/h5diff_63.txt index 043da16..6b46c18 100644 --- a/tools/test/h5diff/testfiles/h5diff_63.txt +++ b/tools/test/h5diff/testfiles/h5diff_63.txt @@ -2,9 +2,9 @@ dataset: and size: [3] [3] position string4 string4 difference ------------------------------------------------------------ -[ 1 ] 8 -[ 1 ] 9 -[ 2 ] 8 -[ 2 ] 9 +[ 1 ] 8 +[ 1 ] 9 +[ 2 ] 8 +[ 2 ] 9 4 differences found EXIT CODE: 1 diff --git a/tools/test/h5diff/testfiles/h5diff_70.txt b/tools/test/h5diff/testfiles/h5diff_70.txt index 0a6b0c0..efa34ea 100644 --- a/tools/test/h5diff/testfiles/h5diff_70.txt +++ b/tools/test/h5diff/testfiles/h5diff_70.txt @@ -11,79 +11,79 @@ attribute: > and > size: [2] [2] position VLstring of VLstring of difference ------------------------------------------------------------ -[ 0 ] a z -[ 0 ] b z -[ 1 ] d z -[ 1 ] e z +[ 0 ] z a +[ 0 ] z b +[ 1 ] z d +[ 1 ] z e 4 differences found attribute: > and > size: [3x2] [3x2] position VLstring2D of VLstring2D of difference ------------------------------------------------------------ -[ 0 0 ] a z -[ 0 0 ] b z -[ 0 1 ] c z -[ 0 1 ] d z -[ 1 0 ] e z -[ 1 0 ] f z -[ 1 1 ] g z -[ 1 1 ] h z -[ 2 0 ] i z -[ 2 0 ] j z -[ 2 1 ] k z -[ 2 1 ] l z +[ 0 0 ] z a +[ 0 0 ] z b +[ 0 1 ] z c +[ 0 1 ] z d +[ 1 0 ] z e +[ 1 0 ] z f +[ 1 1 ] z g +[ 1 1 ] z h +[ 2 0 ] z i +[ 2 0 ] z j +[ 2 1 ] z k +[ 2 1 ] z l 12 differences found attribute: > and > size: [4x3x2] [4x3x2] position VLstring3D of VLstring3D of difference ------------------------------------------------------------ -[ 0 0 0 ] a z -[ 0 0 0 ] b z -[ 0 0 1 ] c z -[ 0 0 1 ] d z -[ 0 1 0 ] e z -[ 0 1 0 ] f z -[ 0 1 1 ] g z -[ 0 1 1 ] h z -[ 0 2 0 ] i z -[ 0 2 0 ] j z -[ 0 2 1 ] k z -[ 0 2 1 ] l z -[ 1 0 0 ] m z -[ 1 0 0 ] n z -[ 1 0 1 ] p z -[ 1 0 1 ] q z -[ 1 1 0 ] r z -[ 1 1 0 ] s z -[ 1 1 1 ] t z -[ 1 1 1 ] u z -[ 1 2 0 ] v z -[ 1 2 0 ] w z -[ 1 2 1 ] x z -[ 2 0 0 ] A z -[ 2 0 0 ] B z -[ 2 0 1 ] C z -[ 2 0 1 ] D z -[ 2 1 0 ] E z -[ 2 1 0 ] F z -[ 2 1 1 ] G z -[ 2 1 1 ] H z -[ 2 2 0 ] I z -[ 2 2 0 ] J z -[ 2 2 1 ] K z -[ 2 2 1 ] L z -[ 3 0 0 ] M z -[ 3 0 0 ] N z -[ 3 0 1 ] P z -[ 3 0 1 ] Q z -[ 3 1 0 ] R z -[ 3 1 0 ] S z -[ 3 1 1 ] T z -[ 3 1 1 ] U z -[ 3 2 0 ] V z -[ 3 2 0 ] W z -[ 3 2 1 ] X z -[ 3 2 1 ] Z z +[ 0 0 0 ] z a +[ 0 0 0 ] z b +[ 0 0 1 ] z c +[ 0 0 1 ] z d +[ 0 1 0 ] z e +[ 0 1 0 ] z f +[ 0 1 1 ] z g +[ 0 1 1 ] z h +[ 0 2 0 ] z i +[ 0 2 0 ] z j +[ 0 2 1 ] z k +[ 0 2 1 ] z l +[ 1 0 0 ] z m +[ 1 0 0 ] z n +[ 1 0 1 ] z p +[ 1 0 1 ] z q +[ 1 1 0 ] z r +[ 1 1 0 ] z s +[ 1 1 1 ] z t +[ 1 1 1 ] z u +[ 1 2 0 ] z v +[ 1 2 0 ] z w +[ 1 2 1 ] z x +[ 2 0 0 ] z A +[ 2 0 0 ] z B +[ 2 0 1 ] z C +[ 2 0 1 ] z D +[ 2 1 0 ] z E +[ 2 1 0 ] z F +[ 2 1 1 ] z G +[ 2 1 1 ] z H +[ 2 2 0 ] z I +[ 2 2 0 ] z J +[ 2 2 1 ] z K +[ 2 2 1 ] z L +[ 3 0 0 ] z M +[ 3 0 0 ] z N +[ 3 0 1 ] z P +[ 3 0 1 ] z Q +[ 3 1 0 ] z R +[ 3 1 0 ] z S +[ 3 1 1 ] z T +[ 3 1 1 ] z U +[ 3 2 0 ] z V +[ 3 2 0 ] z W +[ 3 2 1 ] z X +[ 3 2 1 ] z Z 47 differences found attribute: > and > size: [2] [2] @@ -514,79 +514,79 @@ attribute: > and > size: [2] [2] position string of string of difference ------------------------------------------------------------ -[ 0 ] a z -[ 0 ] b z -[ 1 ] d z -[ 1 ] e z +[ 0 ] z a +[ 0 ] z b +[ 1 ] z d +[ 1 ] z e 4 differences found attribute: > and > size: [3x2] [3x2] position string2D of string2D of difference ------------------------------------------------------------ -[ 0 0 ] a z -[ 0 0 ] b z -[ 0 1 ] c z -[ 0 1 ] d z -[ 1 0 ] e z -[ 1 0 ] f z -[ 1 1 ] g z -[ 1 1 ] h z -[ 2 0 ] i z -[ 2 0 ] j z -[ 2 1 ] k z -[ 2 1 ] l z +[ 0 0 ] z a +[ 0 0 ] z b +[ 0 1 ] z c +[ 0 1 ] z d +[ 1 0 ] z e +[ 1 0 ] z f +[ 1 1 ] z g +[ 1 1 ] z h +[ 2 0 ] z i +[ 2 0 ] z j +[ 2 1 ] z k +[ 2 1 ] z l 12 differences found attribute: > and > size: [4x3x2] [4x3x2] position string3D of string3D of difference ------------------------------------------------------------ -[ 0 0 0 ] a z -[ 0 0 0 ] b z -[ 0 0 1 ] c z -[ 0 0 1 ] d z -[ 0 1 0 ] e z -[ 0 1 0 ] f z -[ 0 1 1 ] g z -[ 0 1 1 ] h z -[ 0 2 0 ] i z -[ 0 2 0 ] j z -[ 0 2 1 ] k z -[ 0 2 1 ] l z -[ 1 0 0 ] m z -[ 1 0 0 ] n z -[ 1 0 1 ] p z -[ 1 0 1 ] q z -[ 1 1 0 ] r z -[ 1 1 0 ] s z -[ 1 1 1 ] t z -[ 1 1 1 ] u z -[ 1 2 0 ] v z -[ 1 2 0 ] w z -[ 1 2 1 ] x z -[ 2 0 0 ] A z -[ 2 0 0 ] B z -[ 2 0 1 ] C z -[ 2 0 1 ] D z -[ 2 1 0 ] E z -[ 2 1 0 ] F z -[ 2 1 1 ] G z -[ 2 1 1 ] H z -[ 2 2 0 ] I z -[ 2 2 0 ] J z -[ 2 2 1 ] K z -[ 2 2 1 ] L z -[ 3 0 0 ] M z -[ 3 0 0 ] N z -[ 3 0 1 ] P z -[ 3 0 1 ] Q z -[ 3 1 0 ] R z -[ 3 1 0 ] S z -[ 3 1 1 ] T z -[ 3 1 1 ] U z -[ 3 2 0 ] V z -[ 3 2 0 ] W z -[ 3 2 1 ] X z -[ 3 2 1 ] Z z +[ 0 0 0 ] z a +[ 0 0 0 ] z b +[ 0 0 1 ] z c +[ 0 0 1 ] z d +[ 0 1 0 ] z e +[ 0 1 0 ] z f +[ 0 1 1 ] z g +[ 0 1 1 ] z h +[ 0 2 0 ] z i +[ 0 2 0 ] z j +[ 0 2 1 ] z k +[ 0 2 1 ] z l +[ 1 0 0 ] z m +[ 1 0 0 ] z n +[ 1 0 1 ] z p +[ 1 0 1 ] z q +[ 1 1 0 ] z r +[ 1 1 0 ] z s +[ 1 1 1 ] z t +[ 1 1 1 ] z u +[ 1 2 0 ] z v +[ 1 2 0 ] z w +[ 1 2 1 ] z x +[ 2 0 0 ] z A +[ 2 0 0 ] z B +[ 2 0 1 ] z C +[ 2 0 1 ] z D +[ 2 1 0 ] z E +[ 2 1 0 ] z F +[ 2 1 1 ] z G +[ 2 1 1 ] z H +[ 2 2 0 ] z I +[ 2 2 0 ] z J +[ 2 2 1 ] z K +[ 2 2 1 ] z L +[ 3 0 0 ] z M +[ 3 0 0 ] z N +[ 3 0 1 ] z P +[ 3 0 1 ] z Q +[ 3 1 0 ] z R +[ 3 1 0 ] z S +[ 3 1 1 ] z T +[ 3 1 1 ] z U +[ 3 2 0 ] z V +[ 3 2 0 ] z W +[ 3 2 1 ] z X +[ 3 2 1 ] z Z 47 differences found attribute: > and > size: [2] [2] @@ -683,79 +683,79 @@ attribute: > and > size: [2] [2] position VLstring of VLstring of difference ------------------------------------------------------------ -[ 0 ] a z -[ 0 ] b z -[ 1 ] d z -[ 1 ] e z +[ 0 ] z a +[ 0 ] z b +[ 1 ] z d +[ 1 ] z e 4 differences found attribute: > and > size: [3x2] [3x2] position VLstring2D of VLstring2D of difference ------------------------------------------------------------ -[ 0 0 ] a z -[ 0 0 ] b z -[ 0 1 ] c z -[ 0 1 ] d z -[ 1 0 ] e z -[ 1 0 ] f z -[ 1 1 ] g z -[ 1 1 ] h z -[ 2 0 ] i z -[ 2 0 ] j z -[ 2 1 ] k z -[ 2 1 ] l z +[ 0 0 ] z a +[ 0 0 ] z b +[ 0 1 ] z c +[ 0 1 ] z d +[ 1 0 ] z e +[ 1 0 ] z f +[ 1 1 ] z g +[ 1 1 ] z h +[ 2 0 ] z i +[ 2 0 ] z j +[ 2 1 ] z k +[ 2 1 ] z l 12 differences found attribute: > and > size: [4x3x2] [4x3x2] position VLstring3D of VLstring3D of difference ------------------------------------------------------------ -[ 0 0 0 ] a z -[ 0 0 0 ] b z -[ 0 0 1 ] c z -[ 0 0 1 ] d z -[ 0 1 0 ] e z -[ 0 1 0 ] f z -[ 0 1 1 ] g z -[ 0 1 1 ] h z -[ 0 2 0 ] i z -[ 0 2 0 ] j z -[ 0 2 1 ] k z -[ 0 2 1 ] l z -[ 1 0 0 ] m z -[ 1 0 0 ] n z -[ 1 0 1 ] p z -[ 1 0 1 ] q z -[ 1 1 0 ] r z -[ 1 1 0 ] s z -[ 1 1 1 ] t z -[ 1 1 1 ] u z -[ 1 2 0 ] v z -[ 1 2 0 ] w z -[ 1 2 1 ] x z -[ 2 0 0 ] A z -[ 2 0 0 ] B z -[ 2 0 1 ] C z -[ 2 0 1 ] D z -[ 2 1 0 ] E z -[ 2 1 0 ] F z -[ 2 1 1 ] G z -[ 2 1 1 ] H z -[ 2 2 0 ] I z -[ 2 2 0 ] J z -[ 2 2 1 ] K z -[ 2 2 1 ] L z -[ 3 0 0 ] M z -[ 3 0 0 ] N z -[ 3 0 1 ] P z -[ 3 0 1 ] Q z -[ 3 1 0 ] R z -[ 3 1 0 ] S z -[ 3 1 1 ] T z -[ 3 1 1 ] U z -[ 3 2 0 ] V z -[ 3 2 0 ] W z -[ 3 2 1 ] X z -[ 3 2 1 ] Z z +[ 0 0 0 ] z a +[ 0 0 0 ] z b +[ 0 0 1 ] z c +[ 0 0 1 ] z d +[ 0 1 0 ] z e +[ 0 1 0 ] z f +[ 0 1 1 ] z g +[ 0 1 1 ] z h +[ 0 2 0 ] z i +[ 0 2 0 ] z j +[ 0 2 1 ] z k +[ 0 2 1 ] z l +[ 1 0 0 ] z m +[ 1 0 0 ] z n +[ 1 0 1 ] z p +[ 1 0 1 ] z q +[ 1 1 0 ] z r +[ 1 1 0 ] z s +[ 1 1 1 ] z t +[ 1 1 1 ] z u +[ 1 2 0 ] z v +[ 1 2 0 ] z w +[ 1 2 1 ] z x +[ 2 0 0 ] z A +[ 2 0 0 ] z B +[ 2 0 1 ] z C +[ 2 0 1 ] z D +[ 2 1 0 ] z E +[ 2 1 0 ] z F +[ 2 1 1 ] z G +[ 2 1 1 ] z H +[ 2 2 0 ] z I +[ 2 2 0 ] z J +[ 2 2 1 ] z K +[ 2 2 1 ] z L +[ 3 0 0 ] z M +[ 3 0 0 ] z N +[ 3 0 1 ] z P +[ 3 0 1 ] z Q +[ 3 1 0 ] z R +[ 3 1 0 ] z S +[ 3 1 1 ] z T +[ 3 1 1 ] z U +[ 3 2 0 ] z V +[ 3 2 0 ] z W +[ 3 2 1 ] z X +[ 3 2 1 ] z Z 47 differences found attribute: > and > size: [2] [2] @@ -1192,79 +1192,79 @@ attribute: > and > size: [2] [2] position string of string of difference ------------------------------------------------------------ -[ 0 ] a z -[ 0 ] b z -[ 1 ] d z -[ 1 ] e z +[ 0 ] z a +[ 0 ] z b +[ 1 ] z d +[ 1 ] z e 4 differences found attribute: > and > size: [3x2] [3x2] position string2D of string2D of difference ------------------------------------------------------------ -[ 0 0 ] a z -[ 0 0 ] b z -[ 0 1 ] c z -[ 0 1 ] d z -[ 1 0 ] e z -[ 1 0 ] f z -[ 1 1 ] g z -[ 1 1 ] h z -[ 2 0 ] i z -[ 2 0 ] j z -[ 2 1 ] k z -[ 2 1 ] l z +[ 0 0 ] z a +[ 0 0 ] z b +[ 0 1 ] z c +[ 0 1 ] z d +[ 1 0 ] z e +[ 1 0 ] z f +[ 1 1 ] z g +[ 1 1 ] z h +[ 2 0 ] z i +[ 2 0 ] z j +[ 2 1 ] z k +[ 2 1 ] z l 12 differences found attribute: > and > size: [4x3x2] [4x3x2] position string3D of string3D of difference ------------------------------------------------------------ -[ 0 0 0 ] a z -[ 0 0 0 ] b z -[ 0 0 1 ] c z -[ 0 0 1 ] d z -[ 0 1 0 ] e z -[ 0 1 0 ] f z -[ 0 1 1 ] g z -[ 0 1 1 ] h z -[ 0 2 0 ] i z -[ 0 2 0 ] j z -[ 0 2 1 ] k z -[ 0 2 1 ] l z -[ 1 0 0 ] m z -[ 1 0 0 ] n z -[ 1 0 1 ] p z -[ 1 0 1 ] q z -[ 1 1 0 ] r z -[ 1 1 0 ] s z -[ 1 1 1 ] t z -[ 1 1 1 ] u z -[ 1 2 0 ] v z -[ 1 2 0 ] w z -[ 1 2 1 ] x z -[ 2 0 0 ] A z -[ 2 0 0 ] B z -[ 2 0 1 ] C z -[ 2 0 1 ] D z -[ 2 1 0 ] E z -[ 2 1 0 ] F z -[ 2 1 1 ] G z -[ 2 1 1 ] H z -[ 2 2 0 ] I z -[ 2 2 0 ] J z -[ 2 2 1 ] K z -[ 2 2 1 ] L z -[ 3 0 0 ] M z -[ 3 0 0 ] N z -[ 3 0 1 ] P z -[ 3 0 1 ] Q z -[ 3 1 0 ] R z -[ 3 1 0 ] S z -[ 3 1 1 ] T z -[ 3 1 1 ] U z -[ 3 2 0 ] V z -[ 3 2 0 ] W z -[ 3 2 1 ] X z -[ 3 2 1 ] Z z +[ 0 0 0 ] z a +[ 0 0 0 ] z b +[ 0 0 1 ] z c +[ 0 0 1 ] z d +[ 0 1 0 ] z e +[ 0 1 0 ] z f +[ 0 1 1 ] z g +[ 0 1 1 ] z h +[ 0 2 0 ] z i +[ 0 2 0 ] z j +[ 0 2 1 ] z k +[ 0 2 1 ] z l +[ 1 0 0 ] z m +[ 1 0 0 ] z n +[ 1 0 1 ] z p +[ 1 0 1 ] z q +[ 1 1 0 ] z r +[ 1 1 0 ] z s +[ 1 1 1 ] z t +[ 1 1 1 ] z u +[ 1 2 0 ] z v +[ 1 2 0 ] z w +[ 1 2 1 ] z x +[ 2 0 0 ] z A +[ 2 0 0 ] z B +[ 2 0 1 ] z C +[ 2 0 1 ] z D +[ 2 1 0 ] z E +[ 2 1 0 ] z F +[ 2 1 1 ] z G +[ 2 1 1 ] z H +[ 2 2 0 ] z I +[ 2 2 0 ] z J +[ 2 2 1 ] z K +[ 2 2 1 ] z L +[ 3 0 0 ] z M +[ 3 0 0 ] z N +[ 3 0 1 ] z P +[ 3 0 1 ] z Q +[ 3 1 0 ] z R +[ 3 1 0 ] z S +[ 3 1 1 ] z T +[ 3 1 1 ] z U +[ 3 2 0 ] z V +[ 3 2 0 ] z W +[ 3 2 1 ] z X +[ 3 2 1 ] z Z 47 differences found attribute: > and > size: [2] [2] @@ -1360,79 +1360,79 @@ attribute: > and > size: [2] [2] position VLstring of VLstring of difference ------------------------------------------------------------ -[ 0 ] a z -[ 0 ] b z -[ 1 ] d z -[ 1 ] e z +[ 0 ] z a +[ 0 ] z b +[ 1 ] z d +[ 1 ] z e 4 differences found attribute: > and > size: [3x2] [3x2] position VLstring2D of VLstring2D of difference ------------------------------------------------------------ -[ 0 0 ] a z -[ 0 0 ] b z -[ 0 1 ] c z -[ 0 1 ] d z -[ 1 0 ] e z -[ 1 0 ] f z -[ 1 1 ] g z -[ 1 1 ] h z -[ 2 0 ] i z -[ 2 0 ] j z -[ 2 1 ] k z -[ 2 1 ] l z +[ 0 0 ] z a +[ 0 0 ] z b +[ 0 1 ] z c +[ 0 1 ] z d +[ 1 0 ] z e +[ 1 0 ] z f +[ 1 1 ] z g +[ 1 1 ] z h +[ 2 0 ] z i +[ 2 0 ] z j +[ 2 1 ] z k +[ 2 1 ] z l 12 differences found attribute: > and > size: [4x3x2] [4x3x2] position VLstring3D of VLstring3D of difference ------------------------------------------------------------ -[ 0 0 0 ] a z -[ 0 0 0 ] b z -[ 0 0 1 ] c z -[ 0 0 1 ] d z -[ 0 1 0 ] e z -[ 0 1 0 ] f z -[ 0 1 1 ] g z -[ 0 1 1 ] h z -[ 0 2 0 ] i z -[ 0 2 0 ] j z -[ 0 2 1 ] k z -[ 0 2 1 ] l z -[ 1 0 0 ] m z -[ 1 0 0 ] n z -[ 1 0 1 ] p z -[ 1 0 1 ] q z -[ 1 1 0 ] r z -[ 1 1 0 ] s z -[ 1 1 1 ] t z -[ 1 1 1 ] u z -[ 1 2 0 ] v z -[ 1 2 0 ] w z -[ 1 2 1 ] x z -[ 2 0 0 ] A z -[ 2 0 0 ] B z -[ 2 0 1 ] C z -[ 2 0 1 ] D z -[ 2 1 0 ] E z -[ 2 1 0 ] F z -[ 2 1 1 ] G z -[ 2 1 1 ] H z -[ 2 2 0 ] I z -[ 2 2 0 ] J z -[ 2 2 1 ] K z -[ 2 2 1 ] L z -[ 3 0 0 ] M z -[ 3 0 0 ] N z -[ 3 0 1 ] P z -[ 3 0 1 ] Q z -[ 3 1 0 ] R z -[ 3 1 0 ] S z -[ 3 1 1 ] T z -[ 3 1 1 ] U z -[ 3 2 0 ] V z -[ 3 2 0 ] W z -[ 3 2 1 ] X z -[ 3 2 1 ] Z z +[ 0 0 0 ] z a +[ 0 0 0 ] z b +[ 0 0 1 ] z c +[ 0 0 1 ] z d +[ 0 1 0 ] z e +[ 0 1 0 ] z f +[ 0 1 1 ] z g +[ 0 1 1 ] z h +[ 0 2 0 ] z i +[ 0 2 0 ] z j +[ 0 2 1 ] z k +[ 0 2 1 ] z l +[ 1 0 0 ] z m +[ 1 0 0 ] z n +[ 1 0 1 ] z p +[ 1 0 1 ] z q +[ 1 1 0 ] z r +[ 1 1 0 ] z s +[ 1 1 1 ] z t +[ 1 1 1 ] z u +[ 1 2 0 ] z v +[ 1 2 0 ] z w +[ 1 2 1 ] z x +[ 2 0 0 ] z A +[ 2 0 0 ] z B +[ 2 0 1 ] z C +[ 2 0 1 ] z D +[ 2 1 0 ] z E +[ 2 1 0 ] z F +[ 2 1 1 ] z G +[ 2 1 1 ] z H +[ 2 2 0 ] z I +[ 2 2 0 ] z J +[ 2 2 1 ] z K +[ 2 2 1 ] z L +[ 3 0 0 ] z M +[ 3 0 0 ] z N +[ 3 0 1 ] z P +[ 3 0 1 ] z Q +[ 3 1 0 ] z R +[ 3 1 0 ] z S +[ 3 1 1 ] z T +[ 3 1 1 ] z U +[ 3 2 0 ] z V +[ 3 2 0 ] z W +[ 3 2 1 ] z X +[ 3 2 1 ] z Z 47 differences found attribute: > and > size: [2] [2] @@ -1863,79 +1863,79 @@ attribute: > and > size: [2] [2] position string of string of difference ------------------------------------------------------------ -[ 0 ] a z -[ 0 ] b z -[ 1 ] d z -[ 1 ] e z +[ 0 ] z a +[ 0 ] z b +[ 1 ] z d +[ 1 ] z e 4 differences found attribute: > and > size: [3x2] [3x2] position string2D of string2D of difference ------------------------------------------------------------ -[ 0 0 ] a z -[ 0 0 ] b z -[ 0 1 ] c z -[ 0 1 ] d z -[ 1 0 ] e z -[ 1 0 ] f z -[ 1 1 ] g z -[ 1 1 ] h z -[ 2 0 ] i z -[ 2 0 ] j z -[ 2 1 ] k z -[ 2 1 ] l z +[ 0 0 ] z a +[ 0 0 ] z b +[ 0 1 ] z c +[ 0 1 ] z d +[ 1 0 ] z e +[ 1 0 ] z f +[ 1 1 ] z g +[ 1 1 ] z h +[ 2 0 ] z i +[ 2 0 ] z j +[ 2 1 ] z k +[ 2 1 ] z l 12 differences found attribute: > and > size: [4x3x2] [4x3x2] position string3D of string3D of difference ------------------------------------------------------------ -[ 0 0 0 ] a z -[ 0 0 0 ] b z -[ 0 0 1 ] c z -[ 0 0 1 ] d z -[ 0 1 0 ] e z -[ 0 1 0 ] f z -[ 0 1 1 ] g z -[ 0 1 1 ] h z -[ 0 2 0 ] i z -[ 0 2 0 ] j z -[ 0 2 1 ] k z -[ 0 2 1 ] l z -[ 1 0 0 ] m z -[ 1 0 0 ] n z -[ 1 0 1 ] p z -[ 1 0 1 ] q z -[ 1 1 0 ] r z -[ 1 1 0 ] s z -[ 1 1 1 ] t z -[ 1 1 1 ] u z -[ 1 2 0 ] v z -[ 1 2 0 ] w z -[ 1 2 1 ] x z -[ 2 0 0 ] A z -[ 2 0 0 ] B z -[ 2 0 1 ] C z -[ 2 0 1 ] D z -[ 2 1 0 ] E z -[ 2 1 0 ] F z -[ 2 1 1 ] G z -[ 2 1 1 ] H z -[ 2 2 0 ] I z -[ 2 2 0 ] J z -[ 2 2 1 ] K z -[ 2 2 1 ] L z -[ 3 0 0 ] M z -[ 3 0 0 ] N z -[ 3 0 1 ] P z -[ 3 0 1 ] Q z -[ 3 1 0 ] R z -[ 3 1 0 ] S z -[ 3 1 1 ] T z -[ 3 1 1 ] U z -[ 3 2 0 ] V z -[ 3 2 0 ] W z -[ 3 2 1 ] X z -[ 3 2 1 ] Z z +[ 0 0 0 ] z a +[ 0 0 0 ] z b +[ 0 0 1 ] z c +[ 0 0 1 ] z d +[ 0 1 0 ] z e +[ 0 1 0 ] z f +[ 0 1 1 ] z g +[ 0 1 1 ] z h +[ 0 2 0 ] z i +[ 0 2 0 ] z j +[ 0 2 1 ] z k +[ 0 2 1 ] z l +[ 1 0 0 ] z m +[ 1 0 0 ] z n +[ 1 0 1 ] z p +[ 1 0 1 ] z q +[ 1 1 0 ] z r +[ 1 1 0 ] z s +[ 1 1 1 ] z t +[ 1 1 1 ] z u +[ 1 2 0 ] z v +[ 1 2 0 ] z w +[ 1 2 1 ] z x +[ 2 0 0 ] z A +[ 2 0 0 ] z B +[ 2 0 1 ] z C +[ 2 0 1 ] z D +[ 2 1 0 ] z E +[ 2 1 0 ] z F +[ 2 1 1 ] z G +[ 2 1 1 ] z H +[ 2 2 0 ] z I +[ 2 2 0 ] z J +[ 2 2 1 ] z K +[ 2 2 1 ] z L +[ 3 0 0 ] z M +[ 3 0 0 ] z N +[ 3 0 1 ] z P +[ 3 0 1 ] z Q +[ 3 1 0 ] z R +[ 3 1 0 ] z S +[ 3 1 1 ] z T +[ 3 1 1 ] z U +[ 3 2 0 ] z V +[ 3 2 0 ] z W +[ 3 2 1 ] z X +[ 3 2 1 ] z Z 47 differences found attribute: > and > size: [2] [2] diff --git a/tools/test/h5diff/testfiles/h5diff_700.txt b/tools/test/h5diff/testfiles/h5diff_700.txt index 1cf71dd..851a407 100644 --- a/tools/test/h5diff/testfiles/h5diff_700.txt +++ b/tools/test/h5diff/testfiles/h5diff_700.txt @@ -13,79 +13,79 @@ attribute: > and > size: [2] [2] position VLstring of VLstring of difference ------------------------------------------------------------ -[ 0 ] a z -[ 0 ] b z -[ 1 ] d z -[ 1 ] e z +[ 0 ] z a +[ 0 ] z b +[ 1 ] z d +[ 1 ] z e 4 differences found attribute: > and > size: [3x2] [3x2] position VLstring2D of VLstring2D of difference ------------------------------------------------------------ -[ 0 0 ] a z -[ 0 0 ] b z -[ 0 1 ] c z -[ 0 1 ] d z -[ 1 0 ] e z -[ 1 0 ] f z -[ 1 1 ] g z -[ 1 1 ] h z -[ 2 0 ] i z -[ 2 0 ] j z -[ 2 1 ] k z -[ 2 1 ] l z +[ 0 0 ] z a +[ 0 0 ] z b +[ 0 1 ] z c +[ 0 1 ] z d +[ 1 0 ] z e +[ 1 0 ] z f +[ 1 1 ] z g +[ 1 1 ] z h +[ 2 0 ] z i +[ 2 0 ] z j +[ 2 1 ] z k +[ 2 1 ] z l 12 differences found attribute: > and > size: [4x3x2] [4x3x2] position VLstring3D of VLstring3D of difference ------------------------------------------------------------ -[ 0 0 0 ] a z -[ 0 0 0 ] b z -[ 0 0 1 ] c z -[ 0 0 1 ] d z -[ 0 1 0 ] e z -[ 0 1 0 ] f z -[ 0 1 1 ] g z -[ 0 1 1 ] h z -[ 0 2 0 ] i z -[ 0 2 0 ] j z -[ 0 2 1 ] k z -[ 0 2 1 ] l z -[ 1 0 0 ] m z -[ 1 0 0 ] n z -[ 1 0 1 ] p z -[ 1 0 1 ] q z -[ 1 1 0 ] r z -[ 1 1 0 ] s z -[ 1 1 1 ] t z -[ 1 1 1 ] u z -[ 1 2 0 ] v z -[ 1 2 0 ] w z -[ 1 2 1 ] x z -[ 2 0 0 ] A z -[ 2 0 0 ] B z -[ 2 0 1 ] C z -[ 2 0 1 ] D z -[ 2 1 0 ] E z -[ 2 1 0 ] F z -[ 2 1 1 ] G z -[ 2 1 1 ] H z -[ 2 2 0 ] I z -[ 2 2 0 ] J z -[ 2 2 1 ] K z -[ 2 2 1 ] L z -[ 3 0 0 ] M z -[ 3 0 0 ] N z -[ 3 0 1 ] P z -[ 3 0 1 ] Q z -[ 3 1 0 ] R z -[ 3 1 0 ] S z -[ 3 1 1 ] T z -[ 3 1 1 ] U z -[ 3 2 0 ] V z -[ 3 2 0 ] W z -[ 3 2 1 ] X z -[ 3 2 1 ] Z z +[ 0 0 0 ] z a +[ 0 0 0 ] z b +[ 0 0 1 ] z c +[ 0 0 1 ] z d +[ 0 1 0 ] z e +[ 0 1 0 ] z f +[ 0 1 1 ] z g +[ 0 1 1 ] z h +[ 0 2 0 ] z i +[ 0 2 0 ] z j +[ 0 2 1 ] z k +[ 0 2 1 ] z l +[ 1 0 0 ] z m +[ 1 0 0 ] z n +[ 1 0 1 ] z p +[ 1 0 1 ] z q +[ 1 1 0 ] z r +[ 1 1 0 ] z s +[ 1 1 1 ] z t +[ 1 1 1 ] z u +[ 1 2 0 ] z v +[ 1 2 0 ] z w +[ 1 2 1 ] z x +[ 2 0 0 ] z A +[ 2 0 0 ] z B +[ 2 0 1 ] z C +[ 2 0 1 ] z D +[ 2 1 0 ] z E +[ 2 1 0 ] z F +[ 2 1 1 ] z G +[ 2 1 1 ] z H +[ 2 2 0 ] z I +[ 2 2 0 ] z J +[ 2 2 1 ] z K +[ 2 2 1 ] z L +[ 3 0 0 ] z M +[ 3 0 0 ] z N +[ 3 0 1 ] z P +[ 3 0 1 ] z Q +[ 3 1 0 ] z R +[ 3 1 0 ] z S +[ 3 1 1 ] z T +[ 3 1 1 ] z U +[ 3 2 0 ] z V +[ 3 2 0 ] z W +[ 3 2 1 ] z X +[ 3 2 1 ] z Z 47 differences found attribute: > and > size: [2] [2] @@ -516,79 +516,79 @@ attribute: > and > size: [2] [2] position string of string of difference ------------------------------------------------------------ -[ 0 ] a z -[ 0 ] b z -[ 1 ] d z -[ 1 ] e z +[ 0 ] z a +[ 0 ] z b +[ 1 ] z d +[ 1 ] z e 4 differences found attribute: > and > size: [3x2] [3x2] position string2D of string2D of difference ------------------------------------------------------------ -[ 0 0 ] a z -[ 0 0 ] b z -[ 0 1 ] c z -[ 0 1 ] d z -[ 1 0 ] e z -[ 1 0 ] f z -[ 1 1 ] g z -[ 1 1 ] h z -[ 2 0 ] i z -[ 2 0 ] j z -[ 2 1 ] k z -[ 2 1 ] l z +[ 0 0 ] z a +[ 0 0 ] z b +[ 0 1 ] z c +[ 0 1 ] z d +[ 1 0 ] z e +[ 1 0 ] z f +[ 1 1 ] z g +[ 1 1 ] z h +[ 2 0 ] z i +[ 2 0 ] z j +[ 2 1 ] z k +[ 2 1 ] z l 12 differences found attribute: > and > size: [4x3x2] [4x3x2] position string3D of string3D of difference ------------------------------------------------------------ -[ 0 0 0 ] a z -[ 0 0 0 ] b z -[ 0 0 1 ] c z -[ 0 0 1 ] d z -[ 0 1 0 ] e z -[ 0 1 0 ] f z -[ 0 1 1 ] g z -[ 0 1 1 ] h z -[ 0 2 0 ] i z -[ 0 2 0 ] j z -[ 0 2 1 ] k z -[ 0 2 1 ] l z -[ 1 0 0 ] m z -[ 1 0 0 ] n z -[ 1 0 1 ] p z -[ 1 0 1 ] q z -[ 1 1 0 ] r z -[ 1 1 0 ] s z -[ 1 1 1 ] t z -[ 1 1 1 ] u z -[ 1 2 0 ] v z -[ 1 2 0 ] w z -[ 1 2 1 ] x z -[ 2 0 0 ] A z -[ 2 0 0 ] B z -[ 2 0 1 ] C z -[ 2 0 1 ] D z -[ 2 1 0 ] E z -[ 2 1 0 ] F z -[ 2 1 1 ] G z -[ 2 1 1 ] H z -[ 2 2 0 ] I z -[ 2 2 0 ] J z -[ 2 2 1 ] K z -[ 2 2 1 ] L z -[ 3 0 0 ] M z -[ 3 0 0 ] N z -[ 3 0 1 ] P z -[ 3 0 1 ] Q z -[ 3 1 0 ] R z -[ 3 1 0 ] S z -[ 3 1 1 ] T z -[ 3 1 1 ] U z -[ 3 2 0 ] V z -[ 3 2 0 ] W z -[ 3 2 1 ] X z -[ 3 2 1 ] Z z +[ 0 0 0 ] z a +[ 0 0 0 ] z b +[ 0 0 1 ] z c +[ 0 0 1 ] z d +[ 0 1 0 ] z e +[ 0 1 0 ] z f +[ 0 1 1 ] z g +[ 0 1 1 ] z h +[ 0 2 0 ] z i +[ 0 2 0 ] z j +[ 0 2 1 ] z k +[ 0 2 1 ] z l +[ 1 0 0 ] z m +[ 1 0 0 ] z n +[ 1 0 1 ] z p +[ 1 0 1 ] z q +[ 1 1 0 ] z r +[ 1 1 0 ] z s +[ 1 1 1 ] z t +[ 1 1 1 ] z u +[ 1 2 0 ] z v +[ 1 2 0 ] z w +[ 1 2 1 ] z x +[ 2 0 0 ] z A +[ 2 0 0 ] z B +[ 2 0 1 ] z C +[ 2 0 1 ] z D +[ 2 1 0 ] z E +[ 2 1 0 ] z F +[ 2 1 1 ] z G +[ 2 1 1 ] z H +[ 2 2 0 ] z I +[ 2 2 0 ] z J +[ 2 2 1 ] z K +[ 2 2 1 ] z L +[ 3 0 0 ] z M +[ 3 0 0 ] z N +[ 3 0 1 ] z P +[ 3 0 1 ] z Q +[ 3 1 0 ] z R +[ 3 1 0 ] z S +[ 3 1 1 ] z T +[ 3 1 1 ] z U +[ 3 2 0 ] z V +[ 3 2 0 ] z W +[ 3 2 1 ] z X +[ 3 2 1 ] z Z 47 differences found attribute: > and > size: [2] [2] @@ -687,79 +687,79 @@ attribute: > and > size: [2] [2] position VLstring of VLstring of difference ------------------------------------------------------------ -[ 0 ] a z -[ 0 ] b z -[ 1 ] d z -[ 1 ] e z +[ 0 ] z a +[ 0 ] z b +[ 1 ] z d +[ 1 ] z e 4 differences found attribute: > and > size: [3x2] [3x2] position VLstring2D of VLstring2D of difference ------------------------------------------------------------ -[ 0 0 ] a z -[ 0 0 ] b z -[ 0 1 ] c z -[ 0 1 ] d z -[ 1 0 ] e z -[ 1 0 ] f z -[ 1 1 ] g z -[ 1 1 ] h z -[ 2 0 ] i z -[ 2 0 ] j z -[ 2 1 ] k z -[ 2 1 ] l z +[ 0 0 ] z a +[ 0 0 ] z b +[ 0 1 ] z c +[ 0 1 ] z d +[ 1 0 ] z e +[ 1 0 ] z f +[ 1 1 ] z g +[ 1 1 ] z h +[ 2 0 ] z i +[ 2 0 ] z j +[ 2 1 ] z k +[ 2 1 ] z l 12 differences found attribute: > and > size: [4x3x2] [4x3x2] position VLstring3D of VLstring3D of difference ------------------------------------------------------------ -[ 0 0 0 ] a z -[ 0 0 0 ] b z -[ 0 0 1 ] c z -[ 0 0 1 ] d z -[ 0 1 0 ] e z -[ 0 1 0 ] f z -[ 0 1 1 ] g z -[ 0 1 1 ] h z -[ 0 2 0 ] i z -[ 0 2 0 ] j z -[ 0 2 1 ] k z -[ 0 2 1 ] l z -[ 1 0 0 ] m z -[ 1 0 0 ] n z -[ 1 0 1 ] p z -[ 1 0 1 ] q z -[ 1 1 0 ] r z -[ 1 1 0 ] s z -[ 1 1 1 ] t z -[ 1 1 1 ] u z -[ 1 2 0 ] v z -[ 1 2 0 ] w z -[ 1 2 1 ] x z -[ 2 0 0 ] A z -[ 2 0 0 ] B z -[ 2 0 1 ] C z -[ 2 0 1 ] D z -[ 2 1 0 ] E z -[ 2 1 0 ] F z -[ 2 1 1 ] G z -[ 2 1 1 ] H z -[ 2 2 0 ] I z -[ 2 2 0 ] J z -[ 2 2 1 ] K z -[ 2 2 1 ] L z -[ 3 0 0 ] M z -[ 3 0 0 ] N z -[ 3 0 1 ] P z -[ 3 0 1 ] Q z -[ 3 1 0 ] R z -[ 3 1 0 ] S z -[ 3 1 1 ] T z -[ 3 1 1 ] U z -[ 3 2 0 ] V z -[ 3 2 0 ] W z -[ 3 2 1 ] X z -[ 3 2 1 ] Z z +[ 0 0 0 ] z a +[ 0 0 0 ] z b +[ 0 0 1 ] z c +[ 0 0 1 ] z d +[ 0 1 0 ] z e +[ 0 1 0 ] z f +[ 0 1 1 ] z g +[ 0 1 1 ] z h +[ 0 2 0 ] z i +[ 0 2 0 ] z j +[ 0 2 1 ] z k +[ 0 2 1 ] z l +[ 1 0 0 ] z m +[ 1 0 0 ] z n +[ 1 0 1 ] z p +[ 1 0 1 ] z q +[ 1 1 0 ] z r +[ 1 1 0 ] z s +[ 1 1 1 ] z t +[ 1 1 1 ] z u +[ 1 2 0 ] z v +[ 1 2 0 ] z w +[ 1 2 1 ] z x +[ 2 0 0 ] z A +[ 2 0 0 ] z B +[ 2 0 1 ] z C +[ 2 0 1 ] z D +[ 2 1 0 ] z E +[ 2 1 0 ] z F +[ 2 1 1 ] z G +[ 2 1 1 ] z H +[ 2 2 0 ] z I +[ 2 2 0 ] z J +[ 2 2 1 ] z K +[ 2 2 1 ] z L +[ 3 0 0 ] z M +[ 3 0 0 ] z N +[ 3 0 1 ] z P +[ 3 0 1 ] z Q +[ 3 1 0 ] z R +[ 3 1 0 ] z S +[ 3 1 1 ] z T +[ 3 1 1 ] z U +[ 3 2 0 ] z V +[ 3 2 0 ] z W +[ 3 2 1 ] z X +[ 3 2 1 ] z Z 47 differences found attribute: > and > size: [2] [2] @@ -1196,79 +1196,79 @@ attribute: > and > size: [2] [2] position string of string of difference ------------------------------------------------------------ -[ 0 ] a z -[ 0 ] b z -[ 1 ] d z -[ 1 ] e z +[ 0 ] z a +[ 0 ] z b +[ 1 ] z d +[ 1 ] z e 4 differences found attribute: > and > size: [3x2] [3x2] position string2D of string2D of difference ------------------------------------------------------------ -[ 0 0 ] a z -[ 0 0 ] b z -[ 0 1 ] c z -[ 0 1 ] d z -[ 1 0 ] e z -[ 1 0 ] f z -[ 1 1 ] g z -[ 1 1 ] h z -[ 2 0 ] i z -[ 2 0 ] j z -[ 2 1 ] k z -[ 2 1 ] l z +[ 0 0 ] z a +[ 0 0 ] z b +[ 0 1 ] z c +[ 0 1 ] z d +[ 1 0 ] z e +[ 1 0 ] z f +[ 1 1 ] z g +[ 1 1 ] z h +[ 2 0 ] z i +[ 2 0 ] z j +[ 2 1 ] z k +[ 2 1 ] z l 12 differences found attribute: > and > size: [4x3x2] [4x3x2] position string3D of string3D of difference ------------------------------------------------------------ -[ 0 0 0 ] a z -[ 0 0 0 ] b z -[ 0 0 1 ] c z -[ 0 0 1 ] d z -[ 0 1 0 ] e z -[ 0 1 0 ] f z -[ 0 1 1 ] g z -[ 0 1 1 ] h z -[ 0 2 0 ] i z -[ 0 2 0 ] j z -[ 0 2 1 ] k z -[ 0 2 1 ] l z -[ 1 0 0 ] m z -[ 1 0 0 ] n z -[ 1 0 1 ] p z -[ 1 0 1 ] q z -[ 1 1 0 ] r z -[ 1 1 0 ] s z -[ 1 1 1 ] t z -[ 1 1 1 ] u z -[ 1 2 0 ] v z -[ 1 2 0 ] w z -[ 1 2 1 ] x z -[ 2 0 0 ] A z -[ 2 0 0 ] B z -[ 2 0 1 ] C z -[ 2 0 1 ] D z -[ 2 1 0 ] E z -[ 2 1 0 ] F z -[ 2 1 1 ] G z -[ 2 1 1 ] H z -[ 2 2 0 ] I z -[ 2 2 0 ] J z -[ 2 2 1 ] K z -[ 2 2 1 ] L z -[ 3 0 0 ] M z -[ 3 0 0 ] N z -[ 3 0 1 ] P z -[ 3 0 1 ] Q z -[ 3 1 0 ] R z -[ 3 1 0 ] S z -[ 3 1 1 ] T z -[ 3 1 1 ] U z -[ 3 2 0 ] V z -[ 3 2 0 ] W z -[ 3 2 1 ] X z -[ 3 2 1 ] Z z +[ 0 0 0 ] z a +[ 0 0 0 ] z b +[ 0 0 1 ] z c +[ 0 0 1 ] z d +[ 0 1 0 ] z e +[ 0 1 0 ] z f +[ 0 1 1 ] z g +[ 0 1 1 ] z h +[ 0 2 0 ] z i +[ 0 2 0 ] z j +[ 0 2 1 ] z k +[ 0 2 1 ] z l +[ 1 0 0 ] z m +[ 1 0 0 ] z n +[ 1 0 1 ] z p +[ 1 0 1 ] z q +[ 1 1 0 ] z r +[ 1 1 0 ] z s +[ 1 1 1 ] z t +[ 1 1 1 ] z u +[ 1 2 0 ] z v +[ 1 2 0 ] z w +[ 1 2 1 ] z x +[ 2 0 0 ] z A +[ 2 0 0 ] z B +[ 2 0 1 ] z C +[ 2 0 1 ] z D +[ 2 1 0 ] z E +[ 2 1 0 ] z F +[ 2 1 1 ] z G +[ 2 1 1 ] z H +[ 2 2 0 ] z I +[ 2 2 0 ] z J +[ 2 2 1 ] z K +[ 2 2 1 ] z L +[ 3 0 0 ] z M +[ 3 0 0 ] z N +[ 3 0 1 ] z P +[ 3 0 1 ] z Q +[ 3 1 0 ] z R +[ 3 1 0 ] z S +[ 3 1 1 ] z T +[ 3 1 1 ] z U +[ 3 2 0 ] z V +[ 3 2 0 ] z W +[ 3 2 1 ] z X +[ 3 2 1 ] z Z 47 differences found attribute: > and > size: [2] [2] @@ -1366,79 +1366,79 @@ attribute: > and > size: [2] [2] position VLstring of VLstring of difference ------------------------------------------------------------ -[ 0 ] a z -[ 0 ] b z -[ 1 ] d z -[ 1 ] e z +[ 0 ] z a +[ 0 ] z b +[ 1 ] z d +[ 1 ] z e 4 differences found attribute: > and > size: [3x2] [3x2] position VLstring2D of VLstring2D of difference ------------------------------------------------------------ -[ 0 0 ] a z -[ 0 0 ] b z -[ 0 1 ] c z -[ 0 1 ] d z -[ 1 0 ] e z -[ 1 0 ] f z -[ 1 1 ] g z -[ 1 1 ] h z -[ 2 0 ] i z -[ 2 0 ] j z -[ 2 1 ] k z -[ 2 1 ] l z +[ 0 0 ] z a +[ 0 0 ] z b +[ 0 1 ] z c +[ 0 1 ] z d +[ 1 0 ] z e +[ 1 0 ] z f +[ 1 1 ] z g +[ 1 1 ] z h +[ 2 0 ] z i +[ 2 0 ] z j +[ 2 1 ] z k +[ 2 1 ] z l 12 differences found attribute: > and > size: [4x3x2] [4x3x2] position VLstring3D of VLstring3D of difference ------------------------------------------------------------ -[ 0 0 0 ] a z -[ 0 0 0 ] b z -[ 0 0 1 ] c z -[ 0 0 1 ] d z -[ 0 1 0 ] e z -[ 0 1 0 ] f z -[ 0 1 1 ] g z -[ 0 1 1 ] h z -[ 0 2 0 ] i z -[ 0 2 0 ] j z -[ 0 2 1 ] k z -[ 0 2 1 ] l z -[ 1 0 0 ] m z -[ 1 0 0 ] n z -[ 1 0 1 ] p z -[ 1 0 1 ] q z -[ 1 1 0 ] r z -[ 1 1 0 ] s z -[ 1 1 1 ] t z -[ 1 1 1 ] u z -[ 1 2 0 ] v z -[ 1 2 0 ] w z -[ 1 2 1 ] x z -[ 2 0 0 ] A z -[ 2 0 0 ] B z -[ 2 0 1 ] C z -[ 2 0 1 ] D z -[ 2 1 0 ] E z -[ 2 1 0 ] F z -[ 2 1 1 ] G z -[ 2 1 1 ] H z -[ 2 2 0 ] I z -[ 2 2 0 ] J z -[ 2 2 1 ] K z -[ 2 2 1 ] L z -[ 3 0 0 ] M z -[ 3 0 0 ] N z -[ 3 0 1 ] P z -[ 3 0 1 ] Q z -[ 3 1 0 ] R z -[ 3 1 0 ] S z -[ 3 1 1 ] T z -[ 3 1 1 ] U z -[ 3 2 0 ] V z -[ 3 2 0 ] W z -[ 3 2 1 ] X z -[ 3 2 1 ] Z z +[ 0 0 0 ] z a +[ 0 0 0 ] z b +[ 0 0 1 ] z c +[ 0 0 1 ] z d +[ 0 1 0 ] z e +[ 0 1 0 ] z f +[ 0 1 1 ] z g +[ 0 1 1 ] z h +[ 0 2 0 ] z i +[ 0 2 0 ] z j +[ 0 2 1 ] z k +[ 0 2 1 ] z l +[ 1 0 0 ] z m +[ 1 0 0 ] z n +[ 1 0 1 ] z p +[ 1 0 1 ] z q +[ 1 1 0 ] z r +[ 1 1 0 ] z s +[ 1 1 1 ] z t +[ 1 1 1 ] z u +[ 1 2 0 ] z v +[ 1 2 0 ] z w +[ 1 2 1 ] z x +[ 2 0 0 ] z A +[ 2 0 0 ] z B +[ 2 0 1 ] z C +[ 2 0 1 ] z D +[ 2 1 0 ] z E +[ 2 1 0 ] z F +[ 2 1 1 ] z G +[ 2 1 1 ] z H +[ 2 2 0 ] z I +[ 2 2 0 ] z J +[ 2 2 1 ] z K +[ 2 2 1 ] z L +[ 3 0 0 ] z M +[ 3 0 0 ] z N +[ 3 0 1 ] z P +[ 3 0 1 ] z Q +[ 3 1 0 ] z R +[ 3 1 0 ] z S +[ 3 1 1 ] z T +[ 3 1 1 ] z U +[ 3 2 0 ] z V +[ 3 2 0 ] z W +[ 3 2 1 ] z X +[ 3 2 1 ] z Z 47 differences found attribute: > and > size: [2] [2] @@ -1869,79 +1869,79 @@ attribute: > and > size: [2] [2] position string of string of difference ------------------------------------------------------------ -[ 0 ] a z -[ 0 ] b z -[ 1 ] d z -[ 1 ] e z +[ 0 ] z a +[ 0 ] z b +[ 1 ] z d +[ 1 ] z e 4 differences found attribute: > and > size: [3x2] [3x2] position string2D of string2D of difference ------------------------------------------------------------ -[ 0 0 ] a z -[ 0 0 ] b z -[ 0 1 ] c z -[ 0 1 ] d z -[ 1 0 ] e z -[ 1 0 ] f z -[ 1 1 ] g z -[ 1 1 ] h z -[ 2 0 ] i z -[ 2 0 ] j z -[ 2 1 ] k z -[ 2 1 ] l z +[ 0 0 ] z a +[ 0 0 ] z b +[ 0 1 ] z c +[ 0 1 ] z d +[ 1 0 ] z e +[ 1 0 ] z f +[ 1 1 ] z g +[ 1 1 ] z h +[ 2 0 ] z i +[ 2 0 ] z j +[ 2 1 ] z k +[ 2 1 ] z l 12 differences found attribute: > and > size: [4x3x2] [4x3x2] position string3D of string3D of difference ------------------------------------------------------------ -[ 0 0 0 ] a z -[ 0 0 0 ] b z -[ 0 0 1 ] c z -[ 0 0 1 ] d z -[ 0 1 0 ] e z -[ 0 1 0 ] f z -[ 0 1 1 ] g z -[ 0 1 1 ] h z -[ 0 2 0 ] i z -[ 0 2 0 ] j z -[ 0 2 1 ] k z -[ 0 2 1 ] l z -[ 1 0 0 ] m z -[ 1 0 0 ] n z -[ 1 0 1 ] p z -[ 1 0 1 ] q z -[ 1 1 0 ] r z -[ 1 1 0 ] s z -[ 1 1 1 ] t z -[ 1 1 1 ] u z -[ 1 2 0 ] v z -[ 1 2 0 ] w z -[ 1 2 1 ] x z -[ 2 0 0 ] A z -[ 2 0 0 ] B z -[ 2 0 1 ] C z -[ 2 0 1 ] D z -[ 2 1 0 ] E z -[ 2 1 0 ] F z -[ 2 1 1 ] G z -[ 2 1 1 ] H z -[ 2 2 0 ] I z -[ 2 2 0 ] J z -[ 2 2 1 ] K z -[ 2 2 1 ] L z -[ 3 0 0 ] M z -[ 3 0 0 ] N z -[ 3 0 1 ] P z -[ 3 0 1 ] Q z -[ 3 1 0 ] R z -[ 3 1 0 ] S z -[ 3 1 1 ] T z -[ 3 1 1 ] U z -[ 3 2 0 ] V z -[ 3 2 0 ] W z -[ 3 2 1 ] X z -[ 3 2 1 ] Z z +[ 0 0 0 ] z a +[ 0 0 0 ] z b +[ 0 0 1 ] z c +[ 0 0 1 ] z d +[ 0 1 0 ] z e +[ 0 1 0 ] z f +[ 0 1 1 ] z g +[ 0 1 1 ] z h +[ 0 2 0 ] z i +[ 0 2 0 ] z j +[ 0 2 1 ] z k +[ 0 2 1 ] z l +[ 1 0 0 ] z m +[ 1 0 0 ] z n +[ 1 0 1 ] z p +[ 1 0 1 ] z q +[ 1 1 0 ] z r +[ 1 1 0 ] z s +[ 1 1 1 ] z t +[ 1 1 1 ] z u +[ 1 2 0 ] z v +[ 1 2 0 ] z w +[ 1 2 1 ] z x +[ 2 0 0 ] z A +[ 2 0 0 ] z B +[ 2 0 1 ] z C +[ 2 0 1 ] z D +[ 2 1 0 ] z E +[ 2 1 0 ] z F +[ 2 1 1 ] z G +[ 2 1 1 ] z H +[ 2 2 0 ] z I +[ 2 2 0 ] z J +[ 2 2 1 ] z K +[ 2 2 1 ] z L +[ 3 0 0 ] z M +[ 3 0 0 ] z N +[ 3 0 1 ] z P +[ 3 0 1 ] z Q +[ 3 1 0 ] z R +[ 3 1 0 ] z S +[ 3 1 1 ] z T +[ 3 1 1 ] z U +[ 3 2 0 ] z V +[ 3 2 0 ] z W +[ 3 2 1 ] z X +[ 3 2 1 ] z Z 47 differences found attribute: > and > size: [2] [2] diff --git a/tools/test/h5diff/testfiles/h5diff_701.txt b/tools/test/h5diff/testfiles/h5diff_701.txt index 405ab2f..33f1a0f 100644 --- a/tools/test/h5diff/testfiles/h5diff_701.txt +++ b/tools/test/h5diff/testfiles/h5diff_701.txt @@ -45,79 +45,79 @@ attribute: > and > size: [2] [2] position VLstring of VLstring of difference ------------------------------------------------------------ -[ 0 ] a z -[ 0 ] b z -[ 1 ] d z -[ 1 ] e z +[ 0 ] z a +[ 0 ] z b +[ 1 ] z d +[ 1 ] z e 4 differences found attribute: > and > size: [3x2] [3x2] position VLstring2D of VLstring2D of difference ------------------------------------------------------------ -[ 0 0 ] a z -[ 0 0 ] b z -[ 0 1 ] c z -[ 0 1 ] d z -[ 1 0 ] e z -[ 1 0 ] f z -[ 1 1 ] g z -[ 1 1 ] h z -[ 2 0 ] i z -[ 2 0 ] j z -[ 2 1 ] k z -[ 2 1 ] l z +[ 0 0 ] z a +[ 0 0 ] z b +[ 0 1 ] z c +[ 0 1 ] z d +[ 1 0 ] z e +[ 1 0 ] z f +[ 1 1 ] z g +[ 1 1 ] z h +[ 2 0 ] z i +[ 2 0 ] z j +[ 2 1 ] z k +[ 2 1 ] z l 12 differences found attribute: > and > size: [4x3x2] [4x3x2] position VLstring3D of VLstring3D of difference ------------------------------------------------------------ -[ 0 0 0 ] a z -[ 0 0 0 ] b z -[ 0 0 1 ] c z -[ 0 0 1 ] d z -[ 0 1 0 ] e z -[ 0 1 0 ] f z -[ 0 1 1 ] g z -[ 0 1 1 ] h z -[ 0 2 0 ] i z -[ 0 2 0 ] j z -[ 0 2 1 ] k z -[ 0 2 1 ] l z -[ 1 0 0 ] m z -[ 1 0 0 ] n z -[ 1 0 1 ] p z -[ 1 0 1 ] q z -[ 1 1 0 ] r z -[ 1 1 0 ] s z -[ 1 1 1 ] t z -[ 1 1 1 ] u z -[ 1 2 0 ] v z -[ 1 2 0 ] w z -[ 1 2 1 ] x z -[ 2 0 0 ] A z -[ 2 0 0 ] B z -[ 2 0 1 ] C z -[ 2 0 1 ] D z -[ 2 1 0 ] E z -[ 2 1 0 ] F z -[ 2 1 1 ] G z -[ 2 1 1 ] H z -[ 2 2 0 ] I z -[ 2 2 0 ] J z -[ 2 2 1 ] K z -[ 2 2 1 ] L z -[ 3 0 0 ] M z -[ 3 0 0 ] N z -[ 3 0 1 ] P z -[ 3 0 1 ] Q z -[ 3 1 0 ] R z -[ 3 1 0 ] S z -[ 3 1 1 ] T z -[ 3 1 1 ] U z -[ 3 2 0 ] V z -[ 3 2 0 ] W z -[ 3 2 1 ] X z -[ 3 2 1 ] Z z +[ 0 0 0 ] z a +[ 0 0 0 ] z b +[ 0 0 1 ] z c +[ 0 0 1 ] z d +[ 0 1 0 ] z e +[ 0 1 0 ] z f +[ 0 1 1 ] z g +[ 0 1 1 ] z h +[ 0 2 0 ] z i +[ 0 2 0 ] z j +[ 0 2 1 ] z k +[ 0 2 1 ] z l +[ 1 0 0 ] z m +[ 1 0 0 ] z n +[ 1 0 1 ] z p +[ 1 0 1 ] z q +[ 1 1 0 ] z r +[ 1 1 0 ] z s +[ 1 1 1 ] z t +[ 1 1 1 ] z u +[ 1 2 0 ] z v +[ 1 2 0 ] z w +[ 1 2 1 ] z x +[ 2 0 0 ] z A +[ 2 0 0 ] z B +[ 2 0 1 ] z C +[ 2 0 1 ] z D +[ 2 1 0 ] z E +[ 2 1 0 ] z F +[ 2 1 1 ] z G +[ 2 1 1 ] z H +[ 2 2 0 ] z I +[ 2 2 0 ] z J +[ 2 2 1 ] z K +[ 2 2 1 ] z L +[ 3 0 0 ] z M +[ 3 0 0 ] z N +[ 3 0 1 ] z P +[ 3 0 1 ] z Q +[ 3 1 0 ] z R +[ 3 1 0 ] z S +[ 3 1 1 ] z T +[ 3 1 1 ] z U +[ 3 2 0 ] z V +[ 3 2 0 ] z W +[ 3 2 1 ] z X +[ 3 2 1 ] z Z 47 differences found attribute: > and > size: [2] [2] @@ -548,79 +548,79 @@ attribute: > and > size: [2] [2] position string of string of difference ------------------------------------------------------------ -[ 0 ] a z -[ 0 ] b z -[ 1 ] d z -[ 1 ] e z +[ 0 ] z a +[ 0 ] z b +[ 1 ] z d +[ 1 ] z e 4 differences found attribute: > and > size: [3x2] [3x2] position string2D of string2D of difference ------------------------------------------------------------ -[ 0 0 ] a z -[ 0 0 ] b z -[ 0 1 ] c z -[ 0 1 ] d z -[ 1 0 ] e z -[ 1 0 ] f z -[ 1 1 ] g z -[ 1 1 ] h z -[ 2 0 ] i z -[ 2 0 ] j z -[ 2 1 ] k z -[ 2 1 ] l z +[ 0 0 ] z a +[ 0 0 ] z b +[ 0 1 ] z c +[ 0 1 ] z d +[ 1 0 ] z e +[ 1 0 ] z f +[ 1 1 ] z g +[ 1 1 ] z h +[ 2 0 ] z i +[ 2 0 ] z j +[ 2 1 ] z k +[ 2 1 ] z l 12 differences found attribute: > and > size: [4x3x2] [4x3x2] position string3D of string3D of difference ------------------------------------------------------------ -[ 0 0 0 ] a z -[ 0 0 0 ] b z -[ 0 0 1 ] c z -[ 0 0 1 ] d z -[ 0 1 0 ] e z -[ 0 1 0 ] f z -[ 0 1 1 ] g z -[ 0 1 1 ] h z -[ 0 2 0 ] i z -[ 0 2 0 ] j z -[ 0 2 1 ] k z -[ 0 2 1 ] l z -[ 1 0 0 ] m z -[ 1 0 0 ] n z -[ 1 0 1 ] p z -[ 1 0 1 ] q z -[ 1 1 0 ] r z -[ 1 1 0 ] s z -[ 1 1 1 ] t z -[ 1 1 1 ] u z -[ 1 2 0 ] v z -[ 1 2 0 ] w z -[ 1 2 1 ] x z -[ 2 0 0 ] A z -[ 2 0 0 ] B z -[ 2 0 1 ] C z -[ 2 0 1 ] D z -[ 2 1 0 ] E z -[ 2 1 0 ] F z -[ 2 1 1 ] G z -[ 2 1 1 ] H z -[ 2 2 0 ] I z -[ 2 2 0 ] J z -[ 2 2 1 ] K z -[ 2 2 1 ] L z -[ 3 0 0 ] M z -[ 3 0 0 ] N z -[ 3 0 1 ] P z -[ 3 0 1 ] Q z -[ 3 1 0 ] R z -[ 3 1 0 ] S z -[ 3 1 1 ] T z -[ 3 1 1 ] U z -[ 3 2 0 ] V z -[ 3 2 0 ] W z -[ 3 2 1 ] X z -[ 3 2 1 ] Z z +[ 0 0 0 ] z a +[ 0 0 0 ] z b +[ 0 0 1 ] z c +[ 0 0 1 ] z d +[ 0 1 0 ] z e +[ 0 1 0 ] z f +[ 0 1 1 ] z g +[ 0 1 1 ] z h +[ 0 2 0 ] z i +[ 0 2 0 ] z j +[ 0 2 1 ] z k +[ 0 2 1 ] z l +[ 1 0 0 ] z m +[ 1 0 0 ] z n +[ 1 0 1 ] z p +[ 1 0 1 ] z q +[ 1 1 0 ] z r +[ 1 1 0 ] z s +[ 1 1 1 ] z t +[ 1 1 1 ] z u +[ 1 2 0 ] z v +[ 1 2 0 ] z w +[ 1 2 1 ] z x +[ 2 0 0 ] z A +[ 2 0 0 ] z B +[ 2 0 1 ] z C +[ 2 0 1 ] z D +[ 2 1 0 ] z E +[ 2 1 0 ] z F +[ 2 1 1 ] z G +[ 2 1 1 ] z H +[ 2 2 0 ] z I +[ 2 2 0 ] z J +[ 2 2 1 ] z K +[ 2 2 1 ] z L +[ 3 0 0 ] z M +[ 3 0 0 ] z N +[ 3 0 1 ] z P +[ 3 0 1 ] z Q +[ 3 1 0 ] z R +[ 3 1 0 ] z S +[ 3 1 1 ] z T +[ 3 1 1 ] z U +[ 3 2 0 ] z V +[ 3 2 0 ] z W +[ 3 2 1 ] z X +[ 3 2 1 ] z Z 47 differences found attribute: > and > size: [2] [2] @@ -754,79 +754,79 @@ attribute: > and > size: [2] [2] position VLstring of VLstring of difference ------------------------------------------------------------ -[ 0 ] a z -[ 0 ] b z -[ 1 ] d z -[ 1 ] e z +[ 0 ] z a +[ 0 ] z b +[ 1 ] z d +[ 1 ] z e 4 differences found attribute: > and > size: [3x2] [3x2] position VLstring2D of VLstring2D of difference ------------------------------------------------------------ -[ 0 0 ] a z -[ 0 0 ] b z -[ 0 1 ] c z -[ 0 1 ] d z -[ 1 0 ] e z -[ 1 0 ] f z -[ 1 1 ] g z -[ 1 1 ] h z -[ 2 0 ] i z -[ 2 0 ] j z -[ 2 1 ] k z -[ 2 1 ] l z +[ 0 0 ] z a +[ 0 0 ] z b +[ 0 1 ] z c +[ 0 1 ] z d +[ 1 0 ] z e +[ 1 0 ] z f +[ 1 1 ] z g +[ 1 1 ] z h +[ 2 0 ] z i +[ 2 0 ] z j +[ 2 1 ] z k +[ 2 1 ] z l 12 differences found attribute: > and > size: [4x3x2] [4x3x2] position VLstring3D of VLstring3D of difference ------------------------------------------------------------ -[ 0 0 0 ] a z -[ 0 0 0 ] b z -[ 0 0 1 ] c z -[ 0 0 1 ] d z -[ 0 1 0 ] e z -[ 0 1 0 ] f z -[ 0 1 1 ] g z -[ 0 1 1 ] h z -[ 0 2 0 ] i z -[ 0 2 0 ] j z -[ 0 2 1 ] k z -[ 0 2 1 ] l z -[ 1 0 0 ] m z -[ 1 0 0 ] n z -[ 1 0 1 ] p z -[ 1 0 1 ] q z -[ 1 1 0 ] r z -[ 1 1 0 ] s z -[ 1 1 1 ] t z -[ 1 1 1 ] u z -[ 1 2 0 ] v z -[ 1 2 0 ] w z -[ 1 2 1 ] x z -[ 2 0 0 ] A z -[ 2 0 0 ] B z -[ 2 0 1 ] C z -[ 2 0 1 ] D z -[ 2 1 0 ] E z -[ 2 1 0 ] F z -[ 2 1 1 ] G z -[ 2 1 1 ] H z -[ 2 2 0 ] I z -[ 2 2 0 ] J z -[ 2 2 1 ] K z -[ 2 2 1 ] L z -[ 3 0 0 ] M z -[ 3 0 0 ] N z -[ 3 0 1 ] P z -[ 3 0 1 ] Q z -[ 3 1 0 ] R z -[ 3 1 0 ] S z -[ 3 1 1 ] T z -[ 3 1 1 ] U z -[ 3 2 0 ] V z -[ 3 2 0 ] W z -[ 3 2 1 ] X z -[ 3 2 1 ] Z z +[ 0 0 0 ] z a +[ 0 0 0 ] z b +[ 0 0 1 ] z c +[ 0 0 1 ] z d +[ 0 1 0 ] z e +[ 0 1 0 ] z f +[ 0 1 1 ] z g +[ 0 1 1 ] z h +[ 0 2 0 ] z i +[ 0 2 0 ] z j +[ 0 2 1 ] z k +[ 0 2 1 ] z l +[ 1 0 0 ] z m +[ 1 0 0 ] z n +[ 1 0 1 ] z p +[ 1 0 1 ] z q +[ 1 1 0 ] z r +[ 1 1 0 ] z s +[ 1 1 1 ] z t +[ 1 1 1 ] z u +[ 1 2 0 ] z v +[ 1 2 0 ] z w +[ 1 2 1 ] z x +[ 2 0 0 ] z A +[ 2 0 0 ] z B +[ 2 0 1 ] z C +[ 2 0 1 ] z D +[ 2 1 0 ] z E +[ 2 1 0 ] z F +[ 2 1 1 ] z G +[ 2 1 1 ] z H +[ 2 2 0 ] z I +[ 2 2 0 ] z J +[ 2 2 1 ] z K +[ 2 2 1 ] z L +[ 3 0 0 ] z M +[ 3 0 0 ] z N +[ 3 0 1 ] z P +[ 3 0 1 ] z Q +[ 3 1 0 ] z R +[ 3 1 0 ] z S +[ 3 1 1 ] z T +[ 3 1 1 ] z U +[ 3 2 0 ] z V +[ 3 2 0 ] z W +[ 3 2 1 ] z X +[ 3 2 1 ] z Z 47 differences found attribute: > and > size: [2] [2] @@ -1263,79 +1263,79 @@ attribute: > and > size: [2] [2] position string of string of difference ------------------------------------------------------------ -[ 0 ] a z -[ 0 ] b z -[ 1 ] d z -[ 1 ] e z +[ 0 ] z a +[ 0 ] z b +[ 1 ] z d +[ 1 ] z e 4 differences found attribute: > and > size: [3x2] [3x2] position string2D of string2D of difference ------------------------------------------------------------ -[ 0 0 ] a z -[ 0 0 ] b z -[ 0 1 ] c z -[ 0 1 ] d z -[ 1 0 ] e z -[ 1 0 ] f z -[ 1 1 ] g z -[ 1 1 ] h z -[ 2 0 ] i z -[ 2 0 ] j z -[ 2 1 ] k z -[ 2 1 ] l z +[ 0 0 ] z a +[ 0 0 ] z b +[ 0 1 ] z c +[ 0 1 ] z d +[ 1 0 ] z e +[ 1 0 ] z f +[ 1 1 ] z g +[ 1 1 ] z h +[ 2 0 ] z i +[ 2 0 ] z j +[ 2 1 ] z k +[ 2 1 ] z l 12 differences found attribute: > and > size: [4x3x2] [4x3x2] position string3D of string3D of difference ------------------------------------------------------------ -[ 0 0 0 ] a z -[ 0 0 0 ] b z -[ 0 0 1 ] c z -[ 0 0 1 ] d z -[ 0 1 0 ] e z -[ 0 1 0 ] f z -[ 0 1 1 ] g z -[ 0 1 1 ] h z -[ 0 2 0 ] i z -[ 0 2 0 ] j z -[ 0 2 1 ] k z -[ 0 2 1 ] l z -[ 1 0 0 ] m z -[ 1 0 0 ] n z -[ 1 0 1 ] p z -[ 1 0 1 ] q z -[ 1 1 0 ] r z -[ 1 1 0 ] s z -[ 1 1 1 ] t z -[ 1 1 1 ] u z -[ 1 2 0 ] v z -[ 1 2 0 ] w z -[ 1 2 1 ] x z -[ 2 0 0 ] A z -[ 2 0 0 ] B z -[ 2 0 1 ] C z -[ 2 0 1 ] D z -[ 2 1 0 ] E z -[ 2 1 0 ] F z -[ 2 1 1 ] G z -[ 2 1 1 ] H z -[ 2 2 0 ] I z -[ 2 2 0 ] J z -[ 2 2 1 ] K z -[ 2 2 1 ] L z -[ 3 0 0 ] M z -[ 3 0 0 ] N z -[ 3 0 1 ] P z -[ 3 0 1 ] Q z -[ 3 1 0 ] R z -[ 3 1 0 ] S z -[ 3 1 1 ] T z -[ 3 1 1 ] U z -[ 3 2 0 ] V z -[ 3 2 0 ] W z -[ 3 2 1 ] X z -[ 3 2 1 ] Z z +[ 0 0 0 ] z a +[ 0 0 0 ] z b +[ 0 0 1 ] z c +[ 0 0 1 ] z d +[ 0 1 0 ] z e +[ 0 1 0 ] z f +[ 0 1 1 ] z g +[ 0 1 1 ] z h +[ 0 2 0 ] z i +[ 0 2 0 ] z j +[ 0 2 1 ] z k +[ 0 2 1 ] z l +[ 1 0 0 ] z m +[ 1 0 0 ] z n +[ 1 0 1 ] z p +[ 1 0 1 ] z q +[ 1 1 0 ] z r +[ 1 1 0 ] z s +[ 1 1 1 ] z t +[ 1 1 1 ] z u +[ 1 2 0 ] z v +[ 1 2 0 ] z w +[ 1 2 1 ] z x +[ 2 0 0 ] z A +[ 2 0 0 ] z B +[ 2 0 1 ] z C +[ 2 0 1 ] z D +[ 2 1 0 ] z E +[ 2 1 0 ] z F +[ 2 1 1 ] z G +[ 2 1 1 ] z H +[ 2 2 0 ] z I +[ 2 2 0 ] z J +[ 2 2 1 ] z K +[ 2 2 1 ] z L +[ 3 0 0 ] z M +[ 3 0 0 ] z N +[ 3 0 1 ] z P +[ 3 0 1 ] z Q +[ 3 1 0 ] z R +[ 3 1 0 ] z S +[ 3 1 1 ] z T +[ 3 1 1 ] z U +[ 3 2 0 ] z V +[ 3 2 0 ] z W +[ 3 2 1 ] z X +[ 3 2 1 ] z Z 47 differences found attribute: > and > size: [2] [2] @@ -1465,79 +1465,79 @@ attribute: > and > size: [2] [2] position VLstring of VLstring of difference ------------------------------------------------------------ -[ 0 ] a z -[ 0 ] b z -[ 1 ] d z -[ 1 ] e z +[ 0 ] z a +[ 0 ] z b +[ 1 ] z d +[ 1 ] z e 4 differences found attribute: > and > size: [3x2] [3x2] position VLstring2D of VLstring2D of difference ------------------------------------------------------------ -[ 0 0 ] a z -[ 0 0 ] b z -[ 0 1 ] c z -[ 0 1 ] d z -[ 1 0 ] e z -[ 1 0 ] f z -[ 1 1 ] g z -[ 1 1 ] h z -[ 2 0 ] i z -[ 2 0 ] j z -[ 2 1 ] k z -[ 2 1 ] l z +[ 0 0 ] z a +[ 0 0 ] z b +[ 0 1 ] z c +[ 0 1 ] z d +[ 1 0 ] z e +[ 1 0 ] z f +[ 1 1 ] z g +[ 1 1 ] z h +[ 2 0 ] z i +[ 2 0 ] z j +[ 2 1 ] z k +[ 2 1 ] z l 12 differences found attribute: > and > size: [4x3x2] [4x3x2] position VLstring3D of VLstring3D of difference ------------------------------------------------------------ -[ 0 0 0 ] a z -[ 0 0 0 ] b z -[ 0 0 1 ] c z -[ 0 0 1 ] d z -[ 0 1 0 ] e z -[ 0 1 0 ] f z -[ 0 1 1 ] g z -[ 0 1 1 ] h z -[ 0 2 0 ] i z -[ 0 2 0 ] j z -[ 0 2 1 ] k z -[ 0 2 1 ] l z -[ 1 0 0 ] m z -[ 1 0 0 ] n z -[ 1 0 1 ] p z -[ 1 0 1 ] q z -[ 1 1 0 ] r z -[ 1 1 0 ] s z -[ 1 1 1 ] t z -[ 1 1 1 ] u z -[ 1 2 0 ] v z -[ 1 2 0 ] w z -[ 1 2 1 ] x z -[ 2 0 0 ] A z -[ 2 0 0 ] B z -[ 2 0 1 ] C z -[ 2 0 1 ] D z -[ 2 1 0 ] E z -[ 2 1 0 ] F z -[ 2 1 1 ] G z -[ 2 1 1 ] H z -[ 2 2 0 ] I z -[ 2 2 0 ] J z -[ 2 2 1 ] K z -[ 2 2 1 ] L z -[ 3 0 0 ] M z -[ 3 0 0 ] N z -[ 3 0 1 ] P z -[ 3 0 1 ] Q z -[ 3 1 0 ] R z -[ 3 1 0 ] S z -[ 3 1 1 ] T z -[ 3 1 1 ] U z -[ 3 2 0 ] V z -[ 3 2 0 ] W z -[ 3 2 1 ] X z -[ 3 2 1 ] Z z +[ 0 0 0 ] z a +[ 0 0 0 ] z b +[ 0 0 1 ] z c +[ 0 0 1 ] z d +[ 0 1 0 ] z e +[ 0 1 0 ] z f +[ 0 1 1 ] z g +[ 0 1 1 ] z h +[ 0 2 0 ] z i +[ 0 2 0 ] z j +[ 0 2 1 ] z k +[ 0 2 1 ] z l +[ 1 0 0 ] z m +[ 1 0 0 ] z n +[ 1 0 1 ] z p +[ 1 0 1 ] z q +[ 1 1 0 ] z r +[ 1 1 0 ] z s +[ 1 1 1 ] z t +[ 1 1 1 ] z u +[ 1 2 0 ] z v +[ 1 2 0 ] z w +[ 1 2 1 ] z x +[ 2 0 0 ] z A +[ 2 0 0 ] z B +[ 2 0 1 ] z C +[ 2 0 1 ] z D +[ 2 1 0 ] z E +[ 2 1 0 ] z F +[ 2 1 1 ] z G +[ 2 1 1 ] z H +[ 2 2 0 ] z I +[ 2 2 0 ] z J +[ 2 2 1 ] z K +[ 2 2 1 ] z L +[ 3 0 0 ] z M +[ 3 0 0 ] z N +[ 3 0 1 ] z P +[ 3 0 1 ] z Q +[ 3 1 0 ] z R +[ 3 1 0 ] z S +[ 3 1 1 ] z T +[ 3 1 1 ] z U +[ 3 2 0 ] z V +[ 3 2 0 ] z W +[ 3 2 1 ] z X +[ 3 2 1 ] z Z 47 differences found attribute: > and > size: [2] [2] @@ -1968,79 +1968,79 @@ attribute: > and > size: [2] [2] position string of string of difference ------------------------------------------------------------ -[ 0 ] a z -[ 0 ] b z -[ 1 ] d z -[ 1 ] e z +[ 0 ] z a +[ 0 ] z b +[ 1 ] z d +[ 1 ] z e 4 differences found attribute: > and > size: [3x2] [3x2] position string2D of string2D of difference ------------------------------------------------------------ -[ 0 0 ] a z -[ 0 0 ] b z -[ 0 1 ] c z -[ 0 1 ] d z -[ 1 0 ] e z -[ 1 0 ] f z -[ 1 1 ] g z -[ 1 1 ] h z -[ 2 0 ] i z -[ 2 0 ] j z -[ 2 1 ] k z -[ 2 1 ] l z +[ 0 0 ] z a +[ 0 0 ] z b +[ 0 1 ] z c +[ 0 1 ] z d +[ 1 0 ] z e +[ 1 0 ] z f +[ 1 1 ] z g +[ 1 1 ] z h +[ 2 0 ] z i +[ 2 0 ] z j +[ 2 1 ] z k +[ 2 1 ] z l 12 differences found attribute: > and > size: [4x3x2] [4x3x2] position string3D of string3D of difference ------------------------------------------------------------ -[ 0 0 0 ] a z -[ 0 0 0 ] b z -[ 0 0 1 ] c z -[ 0 0 1 ] d z -[ 0 1 0 ] e z -[ 0 1 0 ] f z -[ 0 1 1 ] g z -[ 0 1 1 ] h z -[ 0 2 0 ] i z -[ 0 2 0 ] j z -[ 0 2 1 ] k z -[ 0 2 1 ] l z -[ 1 0 0 ] m z -[ 1 0 0 ] n z -[ 1 0 1 ] p z -[ 1 0 1 ] q z -[ 1 1 0 ] r z -[ 1 1 0 ] s z -[ 1 1 1 ] t z -[ 1 1 1 ] u z -[ 1 2 0 ] v z -[ 1 2 0 ] w z -[ 1 2 1 ] x z -[ 2 0 0 ] A z -[ 2 0 0 ] B z -[ 2 0 1 ] C z -[ 2 0 1 ] D z -[ 2 1 0 ] E z -[ 2 1 0 ] F z -[ 2 1 1 ] G z -[ 2 1 1 ] H z -[ 2 2 0 ] I z -[ 2 2 0 ] J z -[ 2 2 1 ] K z -[ 2 2 1 ] L z -[ 3 0 0 ] M z -[ 3 0 0 ] N z -[ 3 0 1 ] P z -[ 3 0 1 ] Q z -[ 3 1 0 ] R z -[ 3 1 0 ] S z -[ 3 1 1 ] T z -[ 3 1 1 ] U z -[ 3 2 0 ] V z -[ 3 2 0 ] W z -[ 3 2 1 ] X z -[ 3 2 1 ] Z z +[ 0 0 0 ] z a +[ 0 0 0 ] z b +[ 0 0 1 ] z c +[ 0 0 1 ] z d +[ 0 1 0 ] z e +[ 0 1 0 ] z f +[ 0 1 1 ] z g +[ 0 1 1 ] z h +[ 0 2 0 ] z i +[ 0 2 0 ] z j +[ 0 2 1 ] z k +[ 0 2 1 ] z l +[ 1 0 0 ] z m +[ 1 0 0 ] z n +[ 1 0 1 ] z p +[ 1 0 1 ] z q +[ 1 1 0 ] z r +[ 1 1 0 ] z s +[ 1 1 1 ] z t +[ 1 1 1 ] z u +[ 1 2 0 ] z v +[ 1 2 0 ] z w +[ 1 2 1 ] z x +[ 2 0 0 ] z A +[ 2 0 0 ] z B +[ 2 0 1 ] z C +[ 2 0 1 ] z D +[ 2 1 0 ] z E +[ 2 1 0 ] z F +[ 2 1 1 ] z G +[ 2 1 1 ] z H +[ 2 2 0 ] z I +[ 2 2 0 ] z J +[ 2 2 1 ] z K +[ 2 2 1 ] z L +[ 3 0 0 ] z M +[ 3 0 0 ] z N +[ 3 0 1 ] z P +[ 3 0 1 ] z Q +[ 3 1 0 ] z R +[ 3 1 0 ] z S +[ 3 1 1 ] z T +[ 3 1 1 ] z U +[ 3 2 0 ] z V +[ 3 2 0 ] z W +[ 3 2 1 ] z X +[ 3 2 1 ] z Z 47 differences found attribute: > and > size: [2] [2] diff --git a/tools/test/h5diff/testfiles/h5diff_702.txt b/tools/test/h5diff/testfiles/h5diff_702.txt index 1cf71dd..851a407 100644 --- a/tools/test/h5diff/testfiles/h5diff_702.txt +++ b/tools/test/h5diff/testfiles/h5diff_702.txt @@ -13,79 +13,79 @@ attribute: > and > size: [2] [2] position VLstring of VLstring of difference ------------------------------------------------------------ -[ 0 ] a z -[ 0 ] b z -[ 1 ] d z -[ 1 ] e z +[ 0 ] z a +[ 0 ] z b +[ 1 ] z d +[ 1 ] z e 4 differences found attribute: > and > size: [3x2] [3x2] position VLstring2D of VLstring2D of difference ------------------------------------------------------------ -[ 0 0 ] a z -[ 0 0 ] b z -[ 0 1 ] c z -[ 0 1 ] d z -[ 1 0 ] e z -[ 1 0 ] f z -[ 1 1 ] g z -[ 1 1 ] h z -[ 2 0 ] i z -[ 2 0 ] j z -[ 2 1 ] k z -[ 2 1 ] l z +[ 0 0 ] z a +[ 0 0 ] z b +[ 0 1 ] z c +[ 0 1 ] z d +[ 1 0 ] z e +[ 1 0 ] z f +[ 1 1 ] z g +[ 1 1 ] z h +[ 2 0 ] z i +[ 2 0 ] z j +[ 2 1 ] z k +[ 2 1 ] z l 12 differences found attribute: > and > size: [4x3x2] [4x3x2] position VLstring3D of VLstring3D of difference ------------------------------------------------------------ -[ 0 0 0 ] a z -[ 0 0 0 ] b z -[ 0 0 1 ] c z -[ 0 0 1 ] d z -[ 0 1 0 ] e z -[ 0 1 0 ] f z -[ 0 1 1 ] g z -[ 0 1 1 ] h z -[ 0 2 0 ] i z -[ 0 2 0 ] j z -[ 0 2 1 ] k z -[ 0 2 1 ] l z -[ 1 0 0 ] m z -[ 1 0 0 ] n z -[ 1 0 1 ] p z -[ 1 0 1 ] q z -[ 1 1 0 ] r z -[ 1 1 0 ] s z -[ 1 1 1 ] t z -[ 1 1 1 ] u z -[ 1 2 0 ] v z -[ 1 2 0 ] w z -[ 1 2 1 ] x z -[ 2 0 0 ] A z -[ 2 0 0 ] B z -[ 2 0 1 ] C z -[ 2 0 1 ] D z -[ 2 1 0 ] E z -[ 2 1 0 ] F z -[ 2 1 1 ] G z -[ 2 1 1 ] H z -[ 2 2 0 ] I z -[ 2 2 0 ] J z -[ 2 2 1 ] K z -[ 2 2 1 ] L z -[ 3 0 0 ] M z -[ 3 0 0 ] N z -[ 3 0 1 ] P z -[ 3 0 1 ] Q z -[ 3 1 0 ] R z -[ 3 1 0 ] S z -[ 3 1 1 ] T z -[ 3 1 1 ] U z -[ 3 2 0 ] V z -[ 3 2 0 ] W z -[ 3 2 1 ] X z -[ 3 2 1 ] Z z +[ 0 0 0 ] z a +[ 0 0 0 ] z b +[ 0 0 1 ] z c +[ 0 0 1 ] z d +[ 0 1 0 ] z e +[ 0 1 0 ] z f +[ 0 1 1 ] z g +[ 0 1 1 ] z h +[ 0 2 0 ] z i +[ 0 2 0 ] z j +[ 0 2 1 ] z k +[ 0 2 1 ] z l +[ 1 0 0 ] z m +[ 1 0 0 ] z n +[ 1 0 1 ] z p +[ 1 0 1 ] z q +[ 1 1 0 ] z r +[ 1 1 0 ] z s +[ 1 1 1 ] z t +[ 1 1 1 ] z u +[ 1 2 0 ] z v +[ 1 2 0 ] z w +[ 1 2 1 ] z x +[ 2 0 0 ] z A +[ 2 0 0 ] z B +[ 2 0 1 ] z C +[ 2 0 1 ] z D +[ 2 1 0 ] z E +[ 2 1 0 ] z F +[ 2 1 1 ] z G +[ 2 1 1 ] z H +[ 2 2 0 ] z I +[ 2 2 0 ] z J +[ 2 2 1 ] z K +[ 2 2 1 ] z L +[ 3 0 0 ] z M +[ 3 0 0 ] z N +[ 3 0 1 ] z P +[ 3 0 1 ] z Q +[ 3 1 0 ] z R +[ 3 1 0 ] z S +[ 3 1 1 ] z T +[ 3 1 1 ] z U +[ 3 2 0 ] z V +[ 3 2 0 ] z W +[ 3 2 1 ] z X +[ 3 2 1 ] z Z 47 differences found attribute: > and > size: [2] [2] @@ -516,79 +516,79 @@ attribute: > and > size: [2] [2] position string of string of difference ------------------------------------------------------------ -[ 0 ] a z -[ 0 ] b z -[ 1 ] d z -[ 1 ] e z +[ 0 ] z a +[ 0 ] z b +[ 1 ] z d +[ 1 ] z e 4 differences found attribute: > and > size: [3x2] [3x2] position string2D of string2D of difference ------------------------------------------------------------ -[ 0 0 ] a z -[ 0 0 ] b z -[ 0 1 ] c z -[ 0 1 ] d z -[ 1 0 ] e z -[ 1 0 ] f z -[ 1 1 ] g z -[ 1 1 ] h z -[ 2 0 ] i z -[ 2 0 ] j z -[ 2 1 ] k z -[ 2 1 ] l z +[ 0 0 ] z a +[ 0 0 ] z b +[ 0 1 ] z c +[ 0 1 ] z d +[ 1 0 ] z e +[ 1 0 ] z f +[ 1 1 ] z g +[ 1 1 ] z h +[ 2 0 ] z i +[ 2 0 ] z j +[ 2 1 ] z k +[ 2 1 ] z l 12 differences found attribute: > and > size: [4x3x2] [4x3x2] position string3D of string3D of difference ------------------------------------------------------------ -[ 0 0 0 ] a z -[ 0 0 0 ] b z -[ 0 0 1 ] c z -[ 0 0 1 ] d z -[ 0 1 0 ] e z -[ 0 1 0 ] f z -[ 0 1 1 ] g z -[ 0 1 1 ] h z -[ 0 2 0 ] i z -[ 0 2 0 ] j z -[ 0 2 1 ] k z -[ 0 2 1 ] l z -[ 1 0 0 ] m z -[ 1 0 0 ] n z -[ 1 0 1 ] p z -[ 1 0 1 ] q z -[ 1 1 0 ] r z -[ 1 1 0 ] s z -[ 1 1 1 ] t z -[ 1 1 1 ] u z -[ 1 2 0 ] v z -[ 1 2 0 ] w z -[ 1 2 1 ] x z -[ 2 0 0 ] A z -[ 2 0 0 ] B z -[ 2 0 1 ] C z -[ 2 0 1 ] D z -[ 2 1 0 ] E z -[ 2 1 0 ] F z -[ 2 1 1 ] G z -[ 2 1 1 ] H z -[ 2 2 0 ] I z -[ 2 2 0 ] J z -[ 2 2 1 ] K z -[ 2 2 1 ] L z -[ 3 0 0 ] M z -[ 3 0 0 ] N z -[ 3 0 1 ] P z -[ 3 0 1 ] Q z -[ 3 1 0 ] R z -[ 3 1 0 ] S z -[ 3 1 1 ] T z -[ 3 1 1 ] U z -[ 3 2 0 ] V z -[ 3 2 0 ] W z -[ 3 2 1 ] X z -[ 3 2 1 ] Z z +[ 0 0 0 ] z a +[ 0 0 0 ] z b +[ 0 0 1 ] z c +[ 0 0 1 ] z d +[ 0 1 0 ] z e +[ 0 1 0 ] z f +[ 0 1 1 ] z g +[ 0 1 1 ] z h +[ 0 2 0 ] z i +[ 0 2 0 ] z j +[ 0 2 1 ] z k +[ 0 2 1 ] z l +[ 1 0 0 ] z m +[ 1 0 0 ] z n +[ 1 0 1 ] z p +[ 1 0 1 ] z q +[ 1 1 0 ] z r +[ 1 1 0 ] z s +[ 1 1 1 ] z t +[ 1 1 1 ] z u +[ 1 2 0 ] z v +[ 1 2 0 ] z w +[ 1 2 1 ] z x +[ 2 0 0 ] z A +[ 2 0 0 ] z B +[ 2 0 1 ] z C +[ 2 0 1 ] z D +[ 2 1 0 ] z E +[ 2 1 0 ] z F +[ 2 1 1 ] z G +[ 2 1 1 ] z H +[ 2 2 0 ] z I +[ 2 2 0 ] z J +[ 2 2 1 ] z K +[ 2 2 1 ] z L +[ 3 0 0 ] z M +[ 3 0 0 ] z N +[ 3 0 1 ] z P +[ 3 0 1 ] z Q +[ 3 1 0 ] z R +[ 3 1 0 ] z S +[ 3 1 1 ] z T +[ 3 1 1 ] z U +[ 3 2 0 ] z V +[ 3 2 0 ] z W +[ 3 2 1 ] z X +[ 3 2 1 ] z Z 47 differences found attribute: > and > size: [2] [2] @@ -687,79 +687,79 @@ attribute: > and > size: [2] [2] position VLstring of VLstring of difference ------------------------------------------------------------ -[ 0 ] a z -[ 0 ] b z -[ 1 ] d z -[ 1 ] e z +[ 0 ] z a +[ 0 ] z b +[ 1 ] z d +[ 1 ] z e 4 differences found attribute: > and > size: [3x2] [3x2] position VLstring2D of VLstring2D of difference ------------------------------------------------------------ -[ 0 0 ] a z -[ 0 0 ] b z -[ 0 1 ] c z -[ 0 1 ] d z -[ 1 0 ] e z -[ 1 0 ] f z -[ 1 1 ] g z -[ 1 1 ] h z -[ 2 0 ] i z -[ 2 0 ] j z -[ 2 1 ] k z -[ 2 1 ] l z +[ 0 0 ] z a +[ 0 0 ] z b +[ 0 1 ] z c +[ 0 1 ] z d +[ 1 0 ] z e +[ 1 0 ] z f +[ 1 1 ] z g +[ 1 1 ] z h +[ 2 0 ] z i +[ 2 0 ] z j +[ 2 1 ] z k +[ 2 1 ] z l 12 differences found attribute: > and > size: [4x3x2] [4x3x2] position VLstring3D of VLstring3D of difference ------------------------------------------------------------ -[ 0 0 0 ] a z -[ 0 0 0 ] b z -[ 0 0 1 ] c z -[ 0 0 1 ] d z -[ 0 1 0 ] e z -[ 0 1 0 ] f z -[ 0 1 1 ] g z -[ 0 1 1 ] h z -[ 0 2 0 ] i z -[ 0 2 0 ] j z -[ 0 2 1 ] k z -[ 0 2 1 ] l z -[ 1 0 0 ] m z -[ 1 0 0 ] n z -[ 1 0 1 ] p z -[ 1 0 1 ] q z -[ 1 1 0 ] r z -[ 1 1 0 ] s z -[ 1 1 1 ] t z -[ 1 1 1 ] u z -[ 1 2 0 ] v z -[ 1 2 0 ] w z -[ 1 2 1 ] x z -[ 2 0 0 ] A z -[ 2 0 0 ] B z -[ 2 0 1 ] C z -[ 2 0 1 ] D z -[ 2 1 0 ] E z -[ 2 1 0 ] F z -[ 2 1 1 ] G z -[ 2 1 1 ] H z -[ 2 2 0 ] I z -[ 2 2 0 ] J z -[ 2 2 1 ] K z -[ 2 2 1 ] L z -[ 3 0 0 ] M z -[ 3 0 0 ] N z -[ 3 0 1 ] P z -[ 3 0 1 ] Q z -[ 3 1 0 ] R z -[ 3 1 0 ] S z -[ 3 1 1 ] T z -[ 3 1 1 ] U z -[ 3 2 0 ] V z -[ 3 2 0 ] W z -[ 3 2 1 ] X z -[ 3 2 1 ] Z z +[ 0 0 0 ] z a +[ 0 0 0 ] z b +[ 0 0 1 ] z c +[ 0 0 1 ] z d +[ 0 1 0 ] z e +[ 0 1 0 ] z f +[ 0 1 1 ] z g +[ 0 1 1 ] z h +[ 0 2 0 ] z i +[ 0 2 0 ] z j +[ 0 2 1 ] z k +[ 0 2 1 ] z l +[ 1 0 0 ] z m +[ 1 0 0 ] z n +[ 1 0 1 ] z p +[ 1 0 1 ] z q +[ 1 1 0 ] z r +[ 1 1 0 ] z s +[ 1 1 1 ] z t +[ 1 1 1 ] z u +[ 1 2 0 ] z v +[ 1 2 0 ] z w +[ 1 2 1 ] z x +[ 2 0 0 ] z A +[ 2 0 0 ] z B +[ 2 0 1 ] z C +[ 2 0 1 ] z D +[ 2 1 0 ] z E +[ 2 1 0 ] z F +[ 2 1 1 ] z G +[ 2 1 1 ] z H +[ 2 2 0 ] z I +[ 2 2 0 ] z J +[ 2 2 1 ] z K +[ 2 2 1 ] z L +[ 3 0 0 ] z M +[ 3 0 0 ] z N +[ 3 0 1 ] z P +[ 3 0 1 ] z Q +[ 3 1 0 ] z R +[ 3 1 0 ] z S +[ 3 1 1 ] z T +[ 3 1 1 ] z U +[ 3 2 0 ] z V +[ 3 2 0 ] z W +[ 3 2 1 ] z X +[ 3 2 1 ] z Z 47 differences found attribute: > and > size: [2] [2] @@ -1196,79 +1196,79 @@ attribute: > and > size: [2] [2] position string of string of difference ------------------------------------------------------------ -[ 0 ] a z -[ 0 ] b z -[ 1 ] d z -[ 1 ] e z +[ 0 ] z a +[ 0 ] z b +[ 1 ] z d +[ 1 ] z e 4 differences found attribute: > and > size: [3x2] [3x2] position string2D of string2D of difference ------------------------------------------------------------ -[ 0 0 ] a z -[ 0 0 ] b z -[ 0 1 ] c z -[ 0 1 ] d z -[ 1 0 ] e z -[ 1 0 ] f z -[ 1 1 ] g z -[ 1 1 ] h z -[ 2 0 ] i z -[ 2 0 ] j z -[ 2 1 ] k z -[ 2 1 ] l z +[ 0 0 ] z a +[ 0 0 ] z b +[ 0 1 ] z c +[ 0 1 ] z d +[ 1 0 ] z e +[ 1 0 ] z f +[ 1 1 ] z g +[ 1 1 ] z h +[ 2 0 ] z i +[ 2 0 ] z j +[ 2 1 ] z k +[ 2 1 ] z l 12 differences found attribute: > and > size: [4x3x2] [4x3x2] position string3D of string3D of difference ------------------------------------------------------------ -[ 0 0 0 ] a z -[ 0 0 0 ] b z -[ 0 0 1 ] c z -[ 0 0 1 ] d z -[ 0 1 0 ] e z -[ 0 1 0 ] f z -[ 0 1 1 ] g z -[ 0 1 1 ] h z -[ 0 2 0 ] i z -[ 0 2 0 ] j z -[ 0 2 1 ] k z -[ 0 2 1 ] l z -[ 1 0 0 ] m z -[ 1 0 0 ] n z -[ 1 0 1 ] p z -[ 1 0 1 ] q z -[ 1 1 0 ] r z -[ 1 1 0 ] s z -[ 1 1 1 ] t z -[ 1 1 1 ] u z -[ 1 2 0 ] v z -[ 1 2 0 ] w z -[ 1 2 1 ] x z -[ 2 0 0 ] A z -[ 2 0 0 ] B z -[ 2 0 1 ] C z -[ 2 0 1 ] D z -[ 2 1 0 ] E z -[ 2 1 0 ] F z -[ 2 1 1 ] G z -[ 2 1 1 ] H z -[ 2 2 0 ] I z -[ 2 2 0 ] J z -[ 2 2 1 ] K z -[ 2 2 1 ] L z -[ 3 0 0 ] M z -[ 3 0 0 ] N z -[ 3 0 1 ] P z -[ 3 0 1 ] Q z -[ 3 1 0 ] R z -[ 3 1 0 ] S z -[ 3 1 1 ] T z -[ 3 1 1 ] U z -[ 3 2 0 ] V z -[ 3 2 0 ] W z -[ 3 2 1 ] X z -[ 3 2 1 ] Z z +[ 0 0 0 ] z a +[ 0 0 0 ] z b +[ 0 0 1 ] z c +[ 0 0 1 ] z d +[ 0 1 0 ] z e +[ 0 1 0 ] z f +[ 0 1 1 ] z g +[ 0 1 1 ] z h +[ 0 2 0 ] z i +[ 0 2 0 ] z j +[ 0 2 1 ] z k +[ 0 2 1 ] z l +[ 1 0 0 ] z m +[ 1 0 0 ] z n +[ 1 0 1 ] z p +[ 1 0 1 ] z q +[ 1 1 0 ] z r +[ 1 1 0 ] z s +[ 1 1 1 ] z t +[ 1 1 1 ] z u +[ 1 2 0 ] z v +[ 1 2 0 ] z w +[ 1 2 1 ] z x +[ 2 0 0 ] z A +[ 2 0 0 ] z B +[ 2 0 1 ] z C +[ 2 0 1 ] z D +[ 2 1 0 ] z E +[ 2 1 0 ] z F +[ 2 1 1 ] z G +[ 2 1 1 ] z H +[ 2 2 0 ] z I +[ 2 2 0 ] z J +[ 2 2 1 ] z K +[ 2 2 1 ] z L +[ 3 0 0 ] z M +[ 3 0 0 ] z N +[ 3 0 1 ] z P +[ 3 0 1 ] z Q +[ 3 1 0 ] z R +[ 3 1 0 ] z S +[ 3 1 1 ] z T +[ 3 1 1 ] z U +[ 3 2 0 ] z V +[ 3 2 0 ] z W +[ 3 2 1 ] z X +[ 3 2 1 ] z Z 47 differences found attribute: > and > size: [2] [2] @@ -1366,79 +1366,79 @@ attribute: > and > size: [2] [2] position VLstring of VLstring of difference ------------------------------------------------------------ -[ 0 ] a z -[ 0 ] b z -[ 1 ] d z -[ 1 ] e z +[ 0 ] z a +[ 0 ] z b +[ 1 ] z d +[ 1 ] z e 4 differences found attribute: > and > size: [3x2] [3x2] position VLstring2D of VLstring2D of difference ------------------------------------------------------------ -[ 0 0 ] a z -[ 0 0 ] b z -[ 0 1 ] c z -[ 0 1 ] d z -[ 1 0 ] e z -[ 1 0 ] f z -[ 1 1 ] g z -[ 1 1 ] h z -[ 2 0 ] i z -[ 2 0 ] j z -[ 2 1 ] k z -[ 2 1 ] l z +[ 0 0 ] z a +[ 0 0 ] z b +[ 0 1 ] z c +[ 0 1 ] z d +[ 1 0 ] z e +[ 1 0 ] z f +[ 1 1 ] z g +[ 1 1 ] z h +[ 2 0 ] z i +[ 2 0 ] z j +[ 2 1 ] z k +[ 2 1 ] z l 12 differences found attribute: > and > size: [4x3x2] [4x3x2] position VLstring3D of VLstring3D of difference ------------------------------------------------------------ -[ 0 0 0 ] a z -[ 0 0 0 ] b z -[ 0 0 1 ] c z -[ 0 0 1 ] d z -[ 0 1 0 ] e z -[ 0 1 0 ] f z -[ 0 1 1 ] g z -[ 0 1 1 ] h z -[ 0 2 0 ] i z -[ 0 2 0 ] j z -[ 0 2 1 ] k z -[ 0 2 1 ] l z -[ 1 0 0 ] m z -[ 1 0 0 ] n z -[ 1 0 1 ] p z -[ 1 0 1 ] q z -[ 1 1 0 ] r z -[ 1 1 0 ] s z -[ 1 1 1 ] t z -[ 1 1 1 ] u z -[ 1 2 0 ] v z -[ 1 2 0 ] w z -[ 1 2 1 ] x z -[ 2 0 0 ] A z -[ 2 0 0 ] B z -[ 2 0 1 ] C z -[ 2 0 1 ] D z -[ 2 1 0 ] E z -[ 2 1 0 ] F z -[ 2 1 1 ] G z -[ 2 1 1 ] H z -[ 2 2 0 ] I z -[ 2 2 0 ] J z -[ 2 2 1 ] K z -[ 2 2 1 ] L z -[ 3 0 0 ] M z -[ 3 0 0 ] N z -[ 3 0 1 ] P z -[ 3 0 1 ] Q z -[ 3 1 0 ] R z -[ 3 1 0 ] S z -[ 3 1 1 ] T z -[ 3 1 1 ] U z -[ 3 2 0 ] V z -[ 3 2 0 ] W z -[ 3 2 1 ] X z -[ 3 2 1 ] Z z +[ 0 0 0 ] z a +[ 0 0 0 ] z b +[ 0 0 1 ] z c +[ 0 0 1 ] z d +[ 0 1 0 ] z e +[ 0 1 0 ] z f +[ 0 1 1 ] z g +[ 0 1 1 ] z h +[ 0 2 0 ] z i +[ 0 2 0 ] z j +[ 0 2 1 ] z k +[ 0 2 1 ] z l +[ 1 0 0 ] z m +[ 1 0 0 ] z n +[ 1 0 1 ] z p +[ 1 0 1 ] z q +[ 1 1 0 ] z r +[ 1 1 0 ] z s +[ 1 1 1 ] z t +[ 1 1 1 ] z u +[ 1 2 0 ] z v +[ 1 2 0 ] z w +[ 1 2 1 ] z x +[ 2 0 0 ] z A +[ 2 0 0 ] z B +[ 2 0 1 ] z C +[ 2 0 1 ] z D +[ 2 1 0 ] z E +[ 2 1 0 ] z F +[ 2 1 1 ] z G +[ 2 1 1 ] z H +[ 2 2 0 ] z I +[ 2 2 0 ] z J +[ 2 2 1 ] z K +[ 2 2 1 ] z L +[ 3 0 0 ] z M +[ 3 0 0 ] z N +[ 3 0 1 ] z P +[ 3 0 1 ] z Q +[ 3 1 0 ] z R +[ 3 1 0 ] z S +[ 3 1 1 ] z T +[ 3 1 1 ] z U +[ 3 2 0 ] z V +[ 3 2 0 ] z W +[ 3 2 1 ] z X +[ 3 2 1 ] z Z 47 differences found attribute: > and > size: [2] [2] @@ -1869,79 +1869,79 @@ attribute: > and > size: [2] [2] position string of string of difference ------------------------------------------------------------ -[ 0 ] a z -[ 0 ] b z -[ 1 ] d z -[ 1 ] e z +[ 0 ] z a +[ 0 ] z b +[ 1 ] z d +[ 1 ] z e 4 differences found attribute: > and > size: [3x2] [3x2] position string2D of string2D of difference ------------------------------------------------------------ -[ 0 0 ] a z -[ 0 0 ] b z -[ 0 1 ] c z -[ 0 1 ] d z -[ 1 0 ] e z -[ 1 0 ] f z -[ 1 1 ] g z -[ 1 1 ] h z -[ 2 0 ] i z -[ 2 0 ] j z -[ 2 1 ] k z -[ 2 1 ] l z +[ 0 0 ] z a +[ 0 0 ] z b +[ 0 1 ] z c +[ 0 1 ] z d +[ 1 0 ] z e +[ 1 0 ] z f +[ 1 1 ] z g +[ 1 1 ] z h +[ 2 0 ] z i +[ 2 0 ] z j +[ 2 1 ] z k +[ 2 1 ] z l 12 differences found attribute: > and > size: [4x3x2] [4x3x2] position string3D of string3D of difference ------------------------------------------------------------ -[ 0 0 0 ] a z -[ 0 0 0 ] b z -[ 0 0 1 ] c z -[ 0 0 1 ] d z -[ 0 1 0 ] e z -[ 0 1 0 ] f z -[ 0 1 1 ] g z -[ 0 1 1 ] h z -[ 0 2 0 ] i z -[ 0 2 0 ] j z -[ 0 2 1 ] k z -[ 0 2 1 ] l z -[ 1 0 0 ] m z -[ 1 0 0 ] n z -[ 1 0 1 ] p z -[ 1 0 1 ] q z -[ 1 1 0 ] r z -[ 1 1 0 ] s z -[ 1 1 1 ] t z -[ 1 1 1 ] u z -[ 1 2 0 ] v z -[ 1 2 0 ] w z -[ 1 2 1 ] x z -[ 2 0 0 ] A z -[ 2 0 0 ] B z -[ 2 0 1 ] C z -[ 2 0 1 ] D z -[ 2 1 0 ] E z -[ 2 1 0 ] F z -[ 2 1 1 ] G z -[ 2 1 1 ] H z -[ 2 2 0 ] I z -[ 2 2 0 ] J z -[ 2 2 1 ] K z -[ 2 2 1 ] L z -[ 3 0 0 ] M z -[ 3 0 0 ] N z -[ 3 0 1 ] P z -[ 3 0 1 ] Q z -[ 3 1 0 ] R z -[ 3 1 0 ] S z -[ 3 1 1 ] T z -[ 3 1 1 ] U z -[ 3 2 0 ] V z -[ 3 2 0 ] W z -[ 3 2 1 ] X z -[ 3 2 1 ] Z z +[ 0 0 0 ] z a +[ 0 0 0 ] z b +[ 0 0 1 ] z c +[ 0 0 1 ] z d +[ 0 1 0 ] z e +[ 0 1 0 ] z f +[ 0 1 1 ] z g +[ 0 1 1 ] z h +[ 0 2 0 ] z i +[ 0 2 0 ] z j +[ 0 2 1 ] z k +[ 0 2 1 ] z l +[ 1 0 0 ] z m +[ 1 0 0 ] z n +[ 1 0 1 ] z p +[ 1 0 1 ] z q +[ 1 1 0 ] z r +[ 1 1 0 ] z s +[ 1 1 1 ] z t +[ 1 1 1 ] z u +[ 1 2 0 ] z v +[ 1 2 0 ] z w +[ 1 2 1 ] z x +[ 2 0 0 ] z A +[ 2 0 0 ] z B +[ 2 0 1 ] z C +[ 2 0 1 ] z D +[ 2 1 0 ] z E +[ 2 1 0 ] z F +[ 2 1 1 ] z G +[ 2 1 1 ] z H +[ 2 2 0 ] z I +[ 2 2 0 ] z J +[ 2 2 1 ] z K +[ 2 2 1 ] z L +[ 3 0 0 ] z M +[ 3 0 0 ] z N +[ 3 0 1 ] z P +[ 3 0 1 ] z Q +[ 3 1 0 ] z R +[ 3 1 0 ] z S +[ 3 1 1 ] z T +[ 3 1 1 ] z U +[ 3 2 0 ] z V +[ 3 2 0 ] z W +[ 3 2 1 ] z X +[ 3 2 1 ] z Z 47 differences found attribute: > and > size: [2] [2] diff --git a/tools/test/h5diff/testfiles/h5diff_703.txt b/tools/test/h5diff/testfiles/h5diff_703.txt index 405ab2f..33f1a0f 100644 --- a/tools/test/h5diff/testfiles/h5diff_703.txt +++ b/tools/test/h5diff/testfiles/h5diff_703.txt @@ -45,79 +45,79 @@ attribute: > and > size: [2] [2] position VLstring of VLstring of difference ------------------------------------------------------------ -[ 0 ] a z -[ 0 ] b z -[ 1 ] d z -[ 1 ] e z +[ 0 ] z a +[ 0 ] z b +[ 1 ] z d +[ 1 ] z e 4 differences found attribute: > and > size: [3x2] [3x2] position VLstring2D of VLstring2D of difference ------------------------------------------------------------ -[ 0 0 ] a z -[ 0 0 ] b z -[ 0 1 ] c z -[ 0 1 ] d z -[ 1 0 ] e z -[ 1 0 ] f z -[ 1 1 ] g z -[ 1 1 ] h z -[ 2 0 ] i z -[ 2 0 ] j z -[ 2 1 ] k z -[ 2 1 ] l z +[ 0 0 ] z a +[ 0 0 ] z b +[ 0 1 ] z c +[ 0 1 ] z d +[ 1 0 ] z e +[ 1 0 ] z f +[ 1 1 ] z g +[ 1 1 ] z h +[ 2 0 ] z i +[ 2 0 ] z j +[ 2 1 ] z k +[ 2 1 ] z l 12 differences found attribute: > and > size: [4x3x2] [4x3x2] position VLstring3D of VLstring3D of difference ------------------------------------------------------------ -[ 0 0 0 ] a z -[ 0 0 0 ] b z -[ 0 0 1 ] c z -[ 0 0 1 ] d z -[ 0 1 0 ] e z -[ 0 1 0 ] f z -[ 0 1 1 ] g z -[ 0 1 1 ] h z -[ 0 2 0 ] i z -[ 0 2 0 ] j z -[ 0 2 1 ] k z -[ 0 2 1 ] l z -[ 1 0 0 ] m z -[ 1 0 0 ] n z -[ 1 0 1 ] p z -[ 1 0 1 ] q z -[ 1 1 0 ] r z -[ 1 1 0 ] s z -[ 1 1 1 ] t z -[ 1 1 1 ] u z -[ 1 2 0 ] v z -[ 1 2 0 ] w z -[ 1 2 1 ] x z -[ 2 0 0 ] A z -[ 2 0 0 ] B z -[ 2 0 1 ] C z -[ 2 0 1 ] D z -[ 2 1 0 ] E z -[ 2 1 0 ] F z -[ 2 1 1 ] G z -[ 2 1 1 ] H z -[ 2 2 0 ] I z -[ 2 2 0 ] J z -[ 2 2 1 ] K z -[ 2 2 1 ] L z -[ 3 0 0 ] M z -[ 3 0 0 ] N z -[ 3 0 1 ] P z -[ 3 0 1 ] Q z -[ 3 1 0 ] R z -[ 3 1 0 ] S z -[ 3 1 1 ] T z -[ 3 1 1 ] U z -[ 3 2 0 ] V z -[ 3 2 0 ] W z -[ 3 2 1 ] X z -[ 3 2 1 ] Z z +[ 0 0 0 ] z a +[ 0 0 0 ] z b +[ 0 0 1 ] z c +[ 0 0 1 ] z d +[ 0 1 0 ] z e +[ 0 1 0 ] z f +[ 0 1 1 ] z g +[ 0 1 1 ] z h +[ 0 2 0 ] z i +[ 0 2 0 ] z j +[ 0 2 1 ] z k +[ 0 2 1 ] z l +[ 1 0 0 ] z m +[ 1 0 0 ] z n +[ 1 0 1 ] z p +[ 1 0 1 ] z q +[ 1 1 0 ] z r +[ 1 1 0 ] z s +[ 1 1 1 ] z t +[ 1 1 1 ] z u +[ 1 2 0 ] z v +[ 1 2 0 ] z w +[ 1 2 1 ] z x +[ 2 0 0 ] z A +[ 2 0 0 ] z B +[ 2 0 1 ] z C +[ 2 0 1 ] z D +[ 2 1 0 ] z E +[ 2 1 0 ] z F +[ 2 1 1 ] z G +[ 2 1 1 ] z H +[ 2 2 0 ] z I +[ 2 2 0 ] z J +[ 2 2 1 ] z K +[ 2 2 1 ] z L +[ 3 0 0 ] z M +[ 3 0 0 ] z N +[ 3 0 1 ] z P +[ 3 0 1 ] z Q +[ 3 1 0 ] z R +[ 3 1 0 ] z S +[ 3 1 1 ] z T +[ 3 1 1 ] z U +[ 3 2 0 ] z V +[ 3 2 0 ] z W +[ 3 2 1 ] z X +[ 3 2 1 ] z Z 47 differences found attribute: > and > size: [2] [2] @@ -548,79 +548,79 @@ attribute: > and > size: [2] [2] position string of string of difference ------------------------------------------------------------ -[ 0 ] a z -[ 0 ] b z -[ 1 ] d z -[ 1 ] e z +[ 0 ] z a +[ 0 ] z b +[ 1 ] z d +[ 1 ] z e 4 differences found attribute: > and > size: [3x2] [3x2] position string2D of string2D of difference ------------------------------------------------------------ -[ 0 0 ] a z -[ 0 0 ] b z -[ 0 1 ] c z -[ 0 1 ] d z -[ 1 0 ] e z -[ 1 0 ] f z -[ 1 1 ] g z -[ 1 1 ] h z -[ 2 0 ] i z -[ 2 0 ] j z -[ 2 1 ] k z -[ 2 1 ] l z +[ 0 0 ] z a +[ 0 0 ] z b +[ 0 1 ] z c +[ 0 1 ] z d +[ 1 0 ] z e +[ 1 0 ] z f +[ 1 1 ] z g +[ 1 1 ] z h +[ 2 0 ] z i +[ 2 0 ] z j +[ 2 1 ] z k +[ 2 1 ] z l 12 differences found attribute: > and > size: [4x3x2] [4x3x2] position string3D of string3D of difference ------------------------------------------------------------ -[ 0 0 0 ] a z -[ 0 0 0 ] b z -[ 0 0 1 ] c z -[ 0 0 1 ] d z -[ 0 1 0 ] e z -[ 0 1 0 ] f z -[ 0 1 1 ] g z -[ 0 1 1 ] h z -[ 0 2 0 ] i z -[ 0 2 0 ] j z -[ 0 2 1 ] k z -[ 0 2 1 ] l z -[ 1 0 0 ] m z -[ 1 0 0 ] n z -[ 1 0 1 ] p z -[ 1 0 1 ] q z -[ 1 1 0 ] r z -[ 1 1 0 ] s z -[ 1 1 1 ] t z -[ 1 1 1 ] u z -[ 1 2 0 ] v z -[ 1 2 0 ] w z -[ 1 2 1 ] x z -[ 2 0 0 ] A z -[ 2 0 0 ] B z -[ 2 0 1 ] C z -[ 2 0 1 ] D z -[ 2 1 0 ] E z -[ 2 1 0 ] F z -[ 2 1 1 ] G z -[ 2 1 1 ] H z -[ 2 2 0 ] I z -[ 2 2 0 ] J z -[ 2 2 1 ] K z -[ 2 2 1 ] L z -[ 3 0 0 ] M z -[ 3 0 0 ] N z -[ 3 0 1 ] P z -[ 3 0 1 ] Q z -[ 3 1 0 ] R z -[ 3 1 0 ] S z -[ 3 1 1 ] T z -[ 3 1 1 ] U z -[ 3 2 0 ] V z -[ 3 2 0 ] W z -[ 3 2 1 ] X z -[ 3 2 1 ] Z z +[ 0 0 0 ] z a +[ 0 0 0 ] z b +[ 0 0 1 ] z c +[ 0 0 1 ] z d +[ 0 1 0 ] z e +[ 0 1 0 ] z f +[ 0 1 1 ] z g +[ 0 1 1 ] z h +[ 0 2 0 ] z i +[ 0 2 0 ] z j +[ 0 2 1 ] z k +[ 0 2 1 ] z l +[ 1 0 0 ] z m +[ 1 0 0 ] z n +[ 1 0 1 ] z p +[ 1 0 1 ] z q +[ 1 1 0 ] z r +[ 1 1 0 ] z s +[ 1 1 1 ] z t +[ 1 1 1 ] z u +[ 1 2 0 ] z v +[ 1 2 0 ] z w +[ 1 2 1 ] z x +[ 2 0 0 ] z A +[ 2 0 0 ] z B +[ 2 0 1 ] z C +[ 2 0 1 ] z D +[ 2 1 0 ] z E +[ 2 1 0 ] z F +[ 2 1 1 ] z G +[ 2 1 1 ] z H +[ 2 2 0 ] z I +[ 2 2 0 ] z J +[ 2 2 1 ] z K +[ 2 2 1 ] z L +[ 3 0 0 ] z M +[ 3 0 0 ] z N +[ 3 0 1 ] z P +[ 3 0 1 ] z Q +[ 3 1 0 ] z R +[ 3 1 0 ] z S +[ 3 1 1 ] z T +[ 3 1 1 ] z U +[ 3 2 0 ] z V +[ 3 2 0 ] z W +[ 3 2 1 ] z X +[ 3 2 1 ] z Z 47 differences found attribute: > and > size: [2] [2] @@ -754,79 +754,79 @@ attribute: > and > size: [2] [2] position VLstring of VLstring of difference ------------------------------------------------------------ -[ 0 ] a z -[ 0 ] b z -[ 1 ] d z -[ 1 ] e z +[ 0 ] z a +[ 0 ] z b +[ 1 ] z d +[ 1 ] z e 4 differences found attribute: > and > size: [3x2] [3x2] position VLstring2D of VLstring2D of difference ------------------------------------------------------------ -[ 0 0 ] a z -[ 0 0 ] b z -[ 0 1 ] c z -[ 0 1 ] d z -[ 1 0 ] e z -[ 1 0 ] f z -[ 1 1 ] g z -[ 1 1 ] h z -[ 2 0 ] i z -[ 2 0 ] j z -[ 2 1 ] k z -[ 2 1 ] l z +[ 0 0 ] z a +[ 0 0 ] z b +[ 0 1 ] z c +[ 0 1 ] z d +[ 1 0 ] z e +[ 1 0 ] z f +[ 1 1 ] z g +[ 1 1 ] z h +[ 2 0 ] z i +[ 2 0 ] z j +[ 2 1 ] z k +[ 2 1 ] z l 12 differences found attribute: > and > size: [4x3x2] [4x3x2] position VLstring3D of VLstring3D of difference ------------------------------------------------------------ -[ 0 0 0 ] a z -[ 0 0 0 ] b z -[ 0 0 1 ] c z -[ 0 0 1 ] d z -[ 0 1 0 ] e z -[ 0 1 0 ] f z -[ 0 1 1 ] g z -[ 0 1 1 ] h z -[ 0 2 0 ] i z -[ 0 2 0 ] j z -[ 0 2 1 ] k z -[ 0 2 1 ] l z -[ 1 0 0 ] m z -[ 1 0 0 ] n z -[ 1 0 1 ] p z -[ 1 0 1 ] q z -[ 1 1 0 ] r z -[ 1 1 0 ] s z -[ 1 1 1 ] t z -[ 1 1 1 ] u z -[ 1 2 0 ] v z -[ 1 2 0 ] w z -[ 1 2 1 ] x z -[ 2 0 0 ] A z -[ 2 0 0 ] B z -[ 2 0 1 ] C z -[ 2 0 1 ] D z -[ 2 1 0 ] E z -[ 2 1 0 ] F z -[ 2 1 1 ] G z -[ 2 1 1 ] H z -[ 2 2 0 ] I z -[ 2 2 0 ] J z -[ 2 2 1 ] K z -[ 2 2 1 ] L z -[ 3 0 0 ] M z -[ 3 0 0 ] N z -[ 3 0 1 ] P z -[ 3 0 1 ] Q z -[ 3 1 0 ] R z -[ 3 1 0 ] S z -[ 3 1 1 ] T z -[ 3 1 1 ] U z -[ 3 2 0 ] V z -[ 3 2 0 ] W z -[ 3 2 1 ] X z -[ 3 2 1 ] Z z +[ 0 0 0 ] z a +[ 0 0 0 ] z b +[ 0 0 1 ] z c +[ 0 0 1 ] z d +[ 0 1 0 ] z e +[ 0 1 0 ] z f +[ 0 1 1 ] z g +[ 0 1 1 ] z h +[ 0 2 0 ] z i +[ 0 2 0 ] z j +[ 0 2 1 ] z k +[ 0 2 1 ] z l +[ 1 0 0 ] z m +[ 1 0 0 ] z n +[ 1 0 1 ] z p +[ 1 0 1 ] z q +[ 1 1 0 ] z r +[ 1 1 0 ] z s +[ 1 1 1 ] z t +[ 1 1 1 ] z u +[ 1 2 0 ] z v +[ 1 2 0 ] z w +[ 1 2 1 ] z x +[ 2 0 0 ] z A +[ 2 0 0 ] z B +[ 2 0 1 ] z C +[ 2 0 1 ] z D +[ 2 1 0 ] z E +[ 2 1 0 ] z F +[ 2 1 1 ] z G +[ 2 1 1 ] z H +[ 2 2 0 ] z I +[ 2 2 0 ] z J +[ 2 2 1 ] z K +[ 2 2 1 ] z L +[ 3 0 0 ] z M +[ 3 0 0 ] z N +[ 3 0 1 ] z P +[ 3 0 1 ] z Q +[ 3 1 0 ] z R +[ 3 1 0 ] z S +[ 3 1 1 ] z T +[ 3 1 1 ] z U +[ 3 2 0 ] z V +[ 3 2 0 ] z W +[ 3 2 1 ] z X +[ 3 2 1 ] z Z 47 differences found attribute: > and > size: [2] [2] @@ -1263,79 +1263,79 @@ attribute: > and > size: [2] [2] position string of string of difference ------------------------------------------------------------ -[ 0 ] a z -[ 0 ] b z -[ 1 ] d z -[ 1 ] e z +[ 0 ] z a +[ 0 ] z b +[ 1 ] z d +[ 1 ] z e 4 differences found attribute: > and > size: [3x2] [3x2] position string2D of string2D of difference ------------------------------------------------------------ -[ 0 0 ] a z -[ 0 0 ] b z -[ 0 1 ] c z -[ 0 1 ] d z -[ 1 0 ] e z -[ 1 0 ] f z -[ 1 1 ] g z -[ 1 1 ] h z -[ 2 0 ] i z -[ 2 0 ] j z -[ 2 1 ] k z -[ 2 1 ] l z +[ 0 0 ] z a +[ 0 0 ] z b +[ 0 1 ] z c +[ 0 1 ] z d +[ 1 0 ] z e +[ 1 0 ] z f +[ 1 1 ] z g +[ 1 1 ] z h +[ 2 0 ] z i +[ 2 0 ] z j +[ 2 1 ] z k +[ 2 1 ] z l 12 differences found attribute: > and > size: [4x3x2] [4x3x2] position string3D of string3D of difference ------------------------------------------------------------ -[ 0 0 0 ] a z -[ 0 0 0 ] b z -[ 0 0 1 ] c z -[ 0 0 1 ] d z -[ 0 1 0 ] e z -[ 0 1 0 ] f z -[ 0 1 1 ] g z -[ 0 1 1 ] h z -[ 0 2 0 ] i z -[ 0 2 0 ] j z -[ 0 2 1 ] k z -[ 0 2 1 ] l z -[ 1 0 0 ] m z -[ 1 0 0 ] n z -[ 1 0 1 ] p z -[ 1 0 1 ] q z -[ 1 1 0 ] r z -[ 1 1 0 ] s z -[ 1 1 1 ] t z -[ 1 1 1 ] u z -[ 1 2 0 ] v z -[ 1 2 0 ] w z -[ 1 2 1 ] x z -[ 2 0 0 ] A z -[ 2 0 0 ] B z -[ 2 0 1 ] C z -[ 2 0 1 ] D z -[ 2 1 0 ] E z -[ 2 1 0 ] F z -[ 2 1 1 ] G z -[ 2 1 1 ] H z -[ 2 2 0 ] I z -[ 2 2 0 ] J z -[ 2 2 1 ] K z -[ 2 2 1 ] L z -[ 3 0 0 ] M z -[ 3 0 0 ] N z -[ 3 0 1 ] P z -[ 3 0 1 ] Q z -[ 3 1 0 ] R z -[ 3 1 0 ] S z -[ 3 1 1 ] T z -[ 3 1 1 ] U z -[ 3 2 0 ] V z -[ 3 2 0 ] W z -[ 3 2 1 ] X z -[ 3 2 1 ] Z z +[ 0 0 0 ] z a +[ 0 0 0 ] z b +[ 0 0 1 ] z c +[ 0 0 1 ] z d +[ 0 1 0 ] z e +[ 0 1 0 ] z f +[ 0 1 1 ] z g +[ 0 1 1 ] z h +[ 0 2 0 ] z i +[ 0 2 0 ] z j +[ 0 2 1 ] z k +[ 0 2 1 ] z l +[ 1 0 0 ] z m +[ 1 0 0 ] z n +[ 1 0 1 ] z p +[ 1 0 1 ] z q +[ 1 1 0 ] z r +[ 1 1 0 ] z s +[ 1 1 1 ] z t +[ 1 1 1 ] z u +[ 1 2 0 ] z v +[ 1 2 0 ] z w +[ 1 2 1 ] z x +[ 2 0 0 ] z A +[ 2 0 0 ] z B +[ 2 0 1 ] z C +[ 2 0 1 ] z D +[ 2 1 0 ] z E +[ 2 1 0 ] z F +[ 2 1 1 ] z G +[ 2 1 1 ] z H +[ 2 2 0 ] z I +[ 2 2 0 ] z J +[ 2 2 1 ] z K +[ 2 2 1 ] z L +[ 3 0 0 ] z M +[ 3 0 0 ] z N +[ 3 0 1 ] z P +[ 3 0 1 ] z Q +[ 3 1 0 ] z R +[ 3 1 0 ] z S +[ 3 1 1 ] z T +[ 3 1 1 ] z U +[ 3 2 0 ] z V +[ 3 2 0 ] z W +[ 3 2 1 ] z X +[ 3 2 1 ] z Z 47 differences found attribute: > and > size: [2] [2] @@ -1465,79 +1465,79 @@ attribute: > and > size: [2] [2] position VLstring of VLstring of difference ------------------------------------------------------------ -[ 0 ] a z -[ 0 ] b z -[ 1 ] d z -[ 1 ] e z +[ 0 ] z a +[ 0 ] z b +[ 1 ] z d +[ 1 ] z e 4 differences found attribute: > and > size: [3x2] [3x2] position VLstring2D of VLstring2D of difference ------------------------------------------------------------ -[ 0 0 ] a z -[ 0 0 ] b z -[ 0 1 ] c z -[ 0 1 ] d z -[ 1 0 ] e z -[ 1 0 ] f z -[ 1 1 ] g z -[ 1 1 ] h z -[ 2 0 ] i z -[ 2 0 ] j z -[ 2 1 ] k z -[ 2 1 ] l z +[ 0 0 ] z a +[ 0 0 ] z b +[ 0 1 ] z c +[ 0 1 ] z d +[ 1 0 ] z e +[ 1 0 ] z f +[ 1 1 ] z g +[ 1 1 ] z h +[ 2 0 ] z i +[ 2 0 ] z j +[ 2 1 ] z k +[ 2 1 ] z l 12 differences found attribute: > and > size: [4x3x2] [4x3x2] position VLstring3D of VLstring3D of difference ------------------------------------------------------------ -[ 0 0 0 ] a z -[ 0 0 0 ] b z -[ 0 0 1 ] c z -[ 0 0 1 ] d z -[ 0 1 0 ] e z -[ 0 1 0 ] f z -[ 0 1 1 ] g z -[ 0 1 1 ] h z -[ 0 2 0 ] i z -[ 0 2 0 ] j z -[ 0 2 1 ] k z -[ 0 2 1 ] l z -[ 1 0 0 ] m z -[ 1 0 0 ] n z -[ 1 0 1 ] p z -[ 1 0 1 ] q z -[ 1 1 0 ] r z -[ 1 1 0 ] s z -[ 1 1 1 ] t z -[ 1 1 1 ] u z -[ 1 2 0 ] v z -[ 1 2 0 ] w z -[ 1 2 1 ] x z -[ 2 0 0 ] A z -[ 2 0 0 ] B z -[ 2 0 1 ] C z -[ 2 0 1 ] D z -[ 2 1 0 ] E z -[ 2 1 0 ] F z -[ 2 1 1 ] G z -[ 2 1 1 ] H z -[ 2 2 0 ] I z -[ 2 2 0 ] J z -[ 2 2 1 ] K z -[ 2 2 1 ] L z -[ 3 0 0 ] M z -[ 3 0 0 ] N z -[ 3 0 1 ] P z -[ 3 0 1 ] Q z -[ 3 1 0 ] R z -[ 3 1 0 ] S z -[ 3 1 1 ] T z -[ 3 1 1 ] U z -[ 3 2 0 ] V z -[ 3 2 0 ] W z -[ 3 2 1 ] X z -[ 3 2 1 ] Z z +[ 0 0 0 ] z a +[ 0 0 0 ] z b +[ 0 0 1 ] z c +[ 0 0 1 ] z d +[ 0 1 0 ] z e +[ 0 1 0 ] z f +[ 0 1 1 ] z g +[ 0 1 1 ] z h +[ 0 2 0 ] z i +[ 0 2 0 ] z j +[ 0 2 1 ] z k +[ 0 2 1 ] z l +[ 1 0 0 ] z m +[ 1 0 0 ] z n +[ 1 0 1 ] z p +[ 1 0 1 ] z q +[ 1 1 0 ] z r +[ 1 1 0 ] z s +[ 1 1 1 ] z t +[ 1 1 1 ] z u +[ 1 2 0 ] z v +[ 1 2 0 ] z w +[ 1 2 1 ] z x +[ 2 0 0 ] z A +[ 2 0 0 ] z B +[ 2 0 1 ] z C +[ 2 0 1 ] z D +[ 2 1 0 ] z E +[ 2 1 0 ] z F +[ 2 1 1 ] z G +[ 2 1 1 ] z H +[ 2 2 0 ] z I +[ 2 2 0 ] z J +[ 2 2 1 ] z K +[ 2 2 1 ] z L +[ 3 0 0 ] z M +[ 3 0 0 ] z N +[ 3 0 1 ] z P +[ 3 0 1 ] z Q +[ 3 1 0 ] z R +[ 3 1 0 ] z S +[ 3 1 1 ] z T +[ 3 1 1 ] z U +[ 3 2 0 ] z V +[ 3 2 0 ] z W +[ 3 2 1 ] z X +[ 3 2 1 ] z Z 47 differences found attribute: > and > size: [2] [2] @@ -1968,79 +1968,79 @@ attribute: > and > size: [2] [2] position string of string of difference ------------------------------------------------------------ -[ 0 ] a z -[ 0 ] b z -[ 1 ] d z -[ 1 ] e z +[ 0 ] z a +[ 0 ] z b +[ 1 ] z d +[ 1 ] z e 4 differences found attribute: > and > size: [3x2] [3x2] position string2D of string2D of difference ------------------------------------------------------------ -[ 0 0 ] a z -[ 0 0 ] b z -[ 0 1 ] c z -[ 0 1 ] d z -[ 1 0 ] e z -[ 1 0 ] f z -[ 1 1 ] g z -[ 1 1 ] h z -[ 2 0 ] i z -[ 2 0 ] j z -[ 2 1 ] k z -[ 2 1 ] l z +[ 0 0 ] z a +[ 0 0 ] z b +[ 0 1 ] z c +[ 0 1 ] z d +[ 1 0 ] z e +[ 1 0 ] z f +[ 1 1 ] z g +[ 1 1 ] z h +[ 2 0 ] z i +[ 2 0 ] z j +[ 2 1 ] z k +[ 2 1 ] z l 12 differences found attribute: > and > size: [4x3x2] [4x3x2] position string3D of string3D of difference ------------------------------------------------------------ -[ 0 0 0 ] a z -[ 0 0 0 ] b z -[ 0 0 1 ] c z -[ 0 0 1 ] d z -[ 0 1 0 ] e z -[ 0 1 0 ] f z -[ 0 1 1 ] g z -[ 0 1 1 ] h z -[ 0 2 0 ] i z -[ 0 2 0 ] j z -[ 0 2 1 ] k z -[ 0 2 1 ] l z -[ 1 0 0 ] m z -[ 1 0 0 ] n z -[ 1 0 1 ] p z -[ 1 0 1 ] q z -[ 1 1 0 ] r z -[ 1 1 0 ] s z -[ 1 1 1 ] t z -[ 1 1 1 ] u z -[ 1 2 0 ] v z -[ 1 2 0 ] w z -[ 1 2 1 ] x z -[ 2 0 0 ] A z -[ 2 0 0 ] B z -[ 2 0 1 ] C z -[ 2 0 1 ] D z -[ 2 1 0 ] E z -[ 2 1 0 ] F z -[ 2 1 1 ] G z -[ 2 1 1 ] H z -[ 2 2 0 ] I z -[ 2 2 0 ] J z -[ 2 2 1 ] K z -[ 2 2 1 ] L z -[ 3 0 0 ] M z -[ 3 0 0 ] N z -[ 3 0 1 ] P z -[ 3 0 1 ] Q z -[ 3 1 0 ] R z -[ 3 1 0 ] S z -[ 3 1 1 ] T z -[ 3 1 1 ] U z -[ 3 2 0 ] V z -[ 3 2 0 ] W z -[ 3 2 1 ] X z -[ 3 2 1 ] Z z +[ 0 0 0 ] z a +[ 0 0 0 ] z b +[ 0 0 1 ] z c +[ 0 0 1 ] z d +[ 0 1 0 ] z e +[ 0 1 0 ] z f +[ 0 1 1 ] z g +[ 0 1 1 ] z h +[ 0 2 0 ] z i +[ 0 2 0 ] z j +[ 0 2 1 ] z k +[ 0 2 1 ] z l +[ 1 0 0 ] z m +[ 1 0 0 ] z n +[ 1 0 1 ] z p +[ 1 0 1 ] z q +[ 1 1 0 ] z r +[ 1 1 0 ] z s +[ 1 1 1 ] z t +[ 1 1 1 ] z u +[ 1 2 0 ] z v +[ 1 2 0 ] z w +[ 1 2 1 ] z x +[ 2 0 0 ] z A +[ 2 0 0 ] z B +[ 2 0 1 ] z C +[ 2 0 1 ] z D +[ 2 1 0 ] z E +[ 2 1 0 ] z F +[ 2 1 1 ] z G +[ 2 1 1 ] z H +[ 2 2 0 ] z I +[ 2 2 0 ] z J +[ 2 2 1 ] z K +[ 2 2 1 ] z L +[ 3 0 0 ] z M +[ 3 0 0 ] z N +[ 3 0 1 ] z P +[ 3 0 1 ] z Q +[ 3 1 0 ] z R +[ 3 1 0 ] z S +[ 3 1 1 ] z T +[ 3 1 1 ] z U +[ 3 2 0 ] z V +[ 3 2 0 ] z W +[ 3 2 1 ] z X +[ 3 2 1 ] z Z 47 differences found attribute: > and > size: [2] [2] diff --git a/tools/test/h5diff/testfiles/h5diff_80.txt b/tools/test/h5diff/testfiles/h5diff_80.txt index 836e073..b223eed 100644 --- a/tools/test/h5diff/testfiles/h5diff_80.txt +++ b/tools/test/h5diff/testfiles/h5diff_80.txt @@ -59,79 +59,79 @@ dataset: and size: [2] [2] position VLstring VLstring difference ------------------------------------------------------------ -[ 0 ] a z -[ 0 ] b z -[ 1 ] d z -[ 1 ] e z +[ 0 ] z a +[ 0 ] z b +[ 1 ] z d +[ 1 ] z e 4 differences found dataset: and size: [3x2] [3x2] position VLstring2D VLstring2D difference ------------------------------------------------------------ -[ 0 0 ] a z -[ 0 0 ] b z -[ 0 1 ] c z -[ 0 1 ] d z -[ 1 0 ] e z -[ 1 0 ] f z -[ 1 1 ] g z -[ 1 1 ] h z -[ 2 0 ] i z -[ 2 0 ] j z -[ 2 1 ] k z -[ 2 1 ] l z +[ 0 0 ] z a +[ 0 0 ] z b +[ 0 1 ] z c +[ 0 1 ] z d +[ 1 0 ] z e +[ 1 0 ] z f +[ 1 1 ] z g +[ 1 1 ] z h +[ 2 0 ] z i +[ 2 0 ] z j +[ 2 1 ] z k +[ 2 1 ] z l 12 differences found dataset: and size: [4x3x2] [4x3x2] position VLstring3D VLstring3D difference ------------------------------------------------------------ -[ 0 0 0 ] a z -[ 0 0 0 ] b z -[ 0 0 1 ] c z -[ 0 0 1 ] d z -[ 0 1 0 ] e z -[ 0 1 0 ] f z -[ 0 1 1 ] g z -[ 0 1 1 ] h z -[ 0 2 0 ] i z -[ 0 2 0 ] j z -[ 0 2 1 ] k z -[ 0 2 1 ] l z -[ 1 0 0 ] m z -[ 1 0 0 ] n z -[ 1 0 1 ] p z -[ 1 0 1 ] q z -[ 1 1 0 ] r z -[ 1 1 0 ] s z -[ 1 1 1 ] t z -[ 1 1 1 ] u z -[ 1 2 0 ] v z -[ 1 2 0 ] w z -[ 1 2 1 ] x z -[ 2 0 0 ] A z -[ 2 0 0 ] B z -[ 2 0 1 ] C z -[ 2 0 1 ] D z -[ 2 1 0 ] E z -[ 2 1 0 ] F z -[ 2 1 1 ] G z -[ 2 1 1 ] H z -[ 2 2 0 ] I z -[ 2 2 0 ] J z -[ 2 2 1 ] K z -[ 2 2 1 ] L z -[ 3 0 0 ] M z -[ 3 0 0 ] N z -[ 3 0 1 ] P z -[ 3 0 1 ] Q z -[ 3 1 0 ] R z -[ 3 1 0 ] S z -[ 3 1 1 ] T z -[ 3 1 1 ] U z -[ 3 2 0 ] V z -[ 3 2 0 ] W z -[ 3 2 1 ] X z -[ 3 2 1 ] Z z +[ 0 0 0 ] z a +[ 0 0 0 ] z b +[ 0 0 1 ] z c +[ 0 0 1 ] z d +[ 0 1 0 ] z e +[ 0 1 0 ] z f +[ 0 1 1 ] z g +[ 0 1 1 ] z h +[ 0 2 0 ] z i +[ 0 2 0 ] z j +[ 0 2 1 ] z k +[ 0 2 1 ] z l +[ 1 0 0 ] z m +[ 1 0 0 ] z n +[ 1 0 1 ] z p +[ 1 0 1 ] z q +[ 1 1 0 ] z r +[ 1 1 0 ] z s +[ 1 1 1 ] z t +[ 1 1 1 ] z u +[ 1 2 0 ] z v +[ 1 2 0 ] z w +[ 1 2 1 ] z x +[ 2 0 0 ] z A +[ 2 0 0 ] z B +[ 2 0 1 ] z C +[ 2 0 1 ] z D +[ 2 1 0 ] z E +[ 2 1 0 ] z F +[ 2 1 1 ] z G +[ 2 1 1 ] z H +[ 2 2 0 ] z I +[ 2 2 0 ] z J +[ 2 2 1 ] z K +[ 2 2 1 ] z L +[ 3 0 0 ] z M +[ 3 0 0 ] z N +[ 3 0 1 ] z P +[ 3 0 1 ] z Q +[ 3 1 0 ] z R +[ 3 1 0 ] z S +[ 3 1 1 ] z T +[ 3 1 1 ] z U +[ 3 2 0 ] z V +[ 3 2 0 ] z W +[ 3 2 1 ] z X +[ 3 2 1 ] z Z 47 differences found dataset: and size: [2] [2] @@ -702,79 +702,79 @@ dataset: and size: [2] [2] position string string difference ------------------------------------------------------------ -[ 0 ] a z -[ 0 ] b z -[ 1 ] d z -[ 1 ] e z +[ 0 ] z a +[ 0 ] z b +[ 1 ] z d +[ 1 ] z e 4 differences found dataset: and size: [3x2] [3x2] position string2D string2D difference ------------------------------------------------------------ -[ 0 0 ] a z -[ 0 0 ] b z -[ 0 1 ] c z -[ 0 1 ] d z -[ 1 0 ] e z -[ 1 0 ] f z -[ 1 1 ] g z -[ 1 1 ] h z -[ 2 0 ] i z -[ 2 0 ] j z -[ 2 1 ] k z -[ 2 1 ] l z +[ 0 0 ] z a +[ 0 0 ] z b +[ 0 1 ] z c +[ 0 1 ] z d +[ 1 0 ] z e +[ 1 0 ] z f +[ 1 1 ] z g +[ 1 1 ] z h +[ 2 0 ] z i +[ 2 0 ] z j +[ 2 1 ] z k +[ 2 1 ] z l 12 differences found dataset: and size: [4x3x2] [4x3x2] position string3D string3D difference ------------------------------------------------------------ -[ 0 0 0 ] a z -[ 0 0 0 ] b z -[ 0 0 1 ] c z -[ 0 0 1 ] d z -[ 0 1 0 ] e z -[ 0 1 0 ] f z -[ 0 1 1 ] g z -[ 0 1 1 ] h z -[ 0 2 0 ] i z -[ 0 2 0 ] j z -[ 0 2 1 ] k z -[ 0 2 1 ] l z -[ 1 0 0 ] m z -[ 1 0 0 ] n z -[ 1 0 1 ] p z -[ 1 0 1 ] q z -[ 1 1 0 ] r z -[ 1 1 0 ] s z -[ 1 1 1 ] t z -[ 1 1 1 ] u z -[ 1 2 0 ] v z -[ 1 2 0 ] w z -[ 1 2 1 ] x z -[ 2 0 0 ] A z -[ 2 0 0 ] B z -[ 2 0 1 ] C z -[ 2 0 1 ] D z -[ 2 1 0 ] E z -[ 2 1 0 ] F z -[ 2 1 1 ] G z -[ 2 1 1 ] H z -[ 2 2 0 ] I z -[ 2 2 0 ] J z -[ 2 2 1 ] K z -[ 2 2 1 ] L z -[ 3 0 0 ] M z -[ 3 0 0 ] N z -[ 3 0 1 ] P z -[ 3 0 1 ] Q z -[ 3 1 0 ] R z -[ 3 1 0 ] S z -[ 3 1 1 ] T z -[ 3 1 1 ] U z -[ 3 2 0 ] V z -[ 3 2 0 ] W z -[ 3 2 1 ] X z -[ 3 2 1 ] Z z +[ 0 0 0 ] z a +[ 0 0 0 ] z b +[ 0 0 1 ] z c +[ 0 0 1 ] z d +[ 0 1 0 ] z e +[ 0 1 0 ] z f +[ 0 1 1 ] z g +[ 0 1 1 ] z h +[ 0 2 0 ] z i +[ 0 2 0 ] z j +[ 0 2 1 ] z k +[ 0 2 1 ] z l +[ 1 0 0 ] z m +[ 1 0 0 ] z n +[ 1 0 1 ] z p +[ 1 0 1 ] z q +[ 1 1 0 ] z r +[ 1 1 0 ] z s +[ 1 1 1 ] z t +[ 1 1 1 ] z u +[ 1 2 0 ] z v +[ 1 2 0 ] z w +[ 1 2 1 ] z x +[ 2 0 0 ] z A +[ 2 0 0 ] z B +[ 2 0 1 ] z C +[ 2 0 1 ] z D +[ 2 1 0 ] z E +[ 2 1 0 ] z F +[ 2 1 1 ] z G +[ 2 1 1 ] z H +[ 2 2 0 ] z I +[ 2 2 0 ] z J +[ 2 2 1 ] z K +[ 2 2 1 ] z L +[ 3 0 0 ] z M +[ 3 0 0 ] z N +[ 3 0 1 ] z P +[ 3 0 1 ] z Q +[ 3 1 0 ] z R +[ 3 1 0 ] z S +[ 3 1 1 ] z T +[ 3 1 1 ] z U +[ 3 2 0 ] z V +[ 3 2 0 ] z W +[ 3 2 1 ] z X +[ 3 2 1 ] z Z 47 differences found dataset: and size: [2] [2] diff --git a/tools/test/h5diff/testfiles/h5diff_udfail.txt b/tools/test/h5diff/testfiles/h5diff_udfail.txt index c154c6b..d51de38 100644 --- a/tools/test/h5diff/testfiles/h5diff_udfail.txt +++ b/tools/test/h5diff/testfiles/h5diff_udfail.txt @@ -8,5 +8,5 @@ group : and 0 differences found dataset: and 0 differences found -warning: dataset cannot be read, user defined filter is not available +Warning: dataset cannot be read, user defined filter is not available EXIT CODE: 2 diff --git a/tools/test/h5format_convert/CMakeTests.cmake b/tools/test/h5format_convert/CMakeTests.cmake index 4af220b..2240813 100644 --- a/tools/test/h5format_convert/CMakeTests.cmake +++ b/tools/test/h5format_convert/CMakeTests.cmake @@ -47,6 +47,7 @@ old_h5fc_ext2_sf.ddl old_h5fc_ext3_isf.ddl h5fc_v_err.ddl + h5fc_v_err.ddl.err ) set (HDF5_REFERENCE_TEST_FILES h5fc_non_v3.h5 @@ -140,6 +141,62 @@ endif () endmacro () + macro (ADD_H5_MASK_OUTPUT testname resultfile resultcode testfile) + # If using memchecker add tests without using scripts + if (NOT HDF5_ENABLE_USING_MEMCHECKER) + add_test ( + NAME H5FC-${testname}-clear-objects + COMMAND ${CMAKE_COMMAND} + -E remove + ./testfiles/outtmp.h5 + ./testfiles/${testname}.out + ./testfiles/${testname}.out.err + ) + if (NOT "${last_test}" STREQUAL "") + set_tests_properties (H5FC-${testname}-clear-objects PROPERTIES DEPENDS ${last_test}) + endif () + if (NOT "${testfile}" STREQUAL "") + add_test ( + NAME H5FC-${testname}-${testfile}-tmpfile + COMMAND ${CMAKE_COMMAND} + -E copy_if_different ${HDF5_TOOLS_TEST_H5FC_SOURCE_DIR}/testfiles/${testfile} ./testfiles/outtmp.h5 + ) + set_tests_properties (H5FC-${testname}-${testfile}-tmpfile PROPERTIES DEPENDS "H5FC-${testname}-clear-objects") + add_test ( + NAME H5FC-${testname}-${testfile} + COMMAND "${CMAKE_COMMAND}" + -D "TEST_PROGRAM=$" + -D "TEST_ARGS=${ARGN};outtmp.h5" + -D "TEST_FOLDER=${PROJECT_BINARY_DIR}/testfiles" + -D "TEST_OUTPUT=${testname}.out" + -D "TEST_EXPECT=${resultcode}" + -D "TEST_REFERENCE=${resultfile}" + -D "TEST_ERRREF=${resultfile}.err" + -D "TEST_MASK_ERROR=true" + -P "${HDF_RESOURCES_EXT_DIR}/runTest.cmake" + ) + set_tests_properties (H5FC-${testname}-${testfile} PROPERTIES DEPENDS "H5FC-${testname}-${testfile}-tmpfile") + set (last_test "H5FC-${testname}-${testfile}") + else () + add_test ( + NAME H5FC-${testname}-NA + COMMAND "${CMAKE_COMMAND}" + -D "TEST_PROGRAM=$" + -D "TEST_ARGS=${ARGN}" + -D "TEST_FOLDER=${PROJECT_BINARY_DIR}/testfiles" + -D "TEST_OUTPUT=${testname}.out" + -D "TEST_EXPECT=${resultcode}" + -D "TEST_REFERENCE=${resultfile}" + -D "TEST_ERRREF=${resultfile}.err" + -D "TEST_MASK_ERROR=true" + -P "${HDF_RESOURCES_EXT_DIR}/runTest.cmake" + ) + set_tests_properties (H5FC-${testname}-NA PROPERTIES DEPENDS "H5FC-${testname}-clear-objects") + set (last_test "H5FC-${testname}-NA") + endif () + endif () + endmacro () + macro (ADD_H5_TEST testname resultcode testfile) # If using memchecker add tests without using scripts if (NOT HDF5_ENABLE_USING_MEMCHECKER) @@ -391,7 +448,7 @@ # # # h5format_convert -v h5fc_err_level.h5 (error encountered in converting the dataset) - ADD_H5_OUTPUT (h5fc_v_err h5fc_v_err.ddl 1 h5fc_err_level.h5 -v) + ADD_H5_MASK_OUTPUT (h5fc_v_err h5fc_v_err.ddl 1 h5fc_err_level.h5 -v) # # # diff --git a/tools/test/h5format_convert/testfiles/h5fc_v_err.ddl b/tools/test/h5format_convert/testfiles/h5fc_v_err.ddl index b671db0..0b7d0ac 100644 --- a/tools/test/h5format_convert/testfiles/h5fc_v_err.ddl +++ b/tools/test/h5format_convert/testfiles/h5fc_v_err.ddl @@ -10,4 +10,3 @@ Dataset's chunk indexing type is not version 1 B-tree Converting the dataset... Error encountered Close the file -h5format_convert error: unable to downgrade dataset "/DSET_ERR" diff --git a/tools/test/h5format_convert/testfiles/h5fc_v_err.err b/tools/test/h5format_convert/testfiles/h5fc_v_err.err new file mode 100644 index 0000000..d85a999 --- /dev/null +++ b/tools/test/h5format_convert/testfiles/h5fc_v_err.err @@ -0,0 +1,8 @@ +h5format_convert error: unable to downgrade dataset "/DSET_ERR" +H5tools-DIAG: Error detected in HDF5:tools (version (number)) thread (IDs): + #000: (file name) line (number) in h5trav_visit(): traverse failed + major: Failure in tools library + minor: error in function + #001: (file name) line (number) in traverse(): H5Lvisit_by_name failed + major: Failure in tools library + minor: error in function diff --git a/tools/test/h5format_convert/testh5fc.sh.in b/tools/test/h5format_convert/testh5fc.sh.in index c3056e8..585d389 100644 --- a/tools/test/h5format_convert/testh5fc.sh.in +++ b/tools/test/h5format_convert/testh5fc.sh.in @@ -32,8 +32,8 @@ EXIT_FAILURE=1 FORMCONV=../../src/h5format_convert/h5format_convert # The tool name FORMCONV_BIN=`pwd`/$FORMCONV # The path of the tool binary -CHK_IDX=h5fc_chk_idx # The program name -CHK_IDX_BIN=`pwd`/$CHK_IDX # The program to verify the chunk indexing type is v1 B-tree +CHK_IDX=h5fc_chk_idx # The program name +CHK_IDX_BIN=`pwd`/$CHK_IDX # The program to verify the chunk indexing type is v1 B-tree RM='rm -rf' CMP='cmp -s' @@ -131,6 +131,7 @@ $SRC_H5FORMCONV_TESTFILES/old_h5fc_ext2_is.ddl $SRC_H5FORMCONV_TESTFILES/old_h5fc_ext2_sf.ddl $SRC_H5FORMCONV_TESTFILES/old_h5fc_ext3_isf.ddl $SRC_H5FORMCONV_TESTFILES/h5fc_v_err.ddl +$SRC_H5FORMCONV_TESTFILES/h5fc_v_err.ddl.err " # @@ -154,10 +155,10 @@ COPY_TESTFILES_TO_TESTDIR() INODE_SDIR=`$LS -i -d $SDIR | $AWK -F' ' '{print $1}'` INODE_DDIR=`$LS -i -d $TESTDIR | $AWK -F' ' '{print $1}'` if [ "$INODE_SDIR" != "$INODE_DDIR" ]; then - $CP -f $tstfile $TESTDIR + $CP -f $tstfile $TESTDIR if [ $? -ne 0 ]; then echo "Error: FAILED to copy $tstfile ." - + # Comment out this to CREATE expected file exit $EXIT_FAILURE fi @@ -177,7 +178,7 @@ CLEAN_TESTFILES_AND_TESTDIR() if [ "$INODE_SDIR" != "$INODE_DDIR" ]; then $RM $TESTDIR else - $RM $TESTDIR/$TMPFILE + $RM $TESTDIR/$TMPFILE $RM $TESTDIR/$TMPOUTFILE $RM $TESTDIR/$TMPCHKFILE $RM $TESTDIR/$TMPDMPFILE @@ -201,13 +202,13 @@ TESTING() { # non-zero value. # # $1: expected output -# $2: the test file name -# --fname might be empty or fname does not exist -# --fname is copied to a temporary file for testing +# $2: the test file name +# --fname might be empty or fname does not exist +# --fname is copied to a temporary file for testing # $3 to at most $6--options to the tool such as: -# -d dname or --dname=dname -# -v or --verbose -# -n or --noop +# -d dname or --dname=dname +# -v or --verbose +# -n or --noop TOOLTEST_OUT() { # Prepare expected and actual output expect="$TESTDIR/$1" @@ -220,15 +221,15 @@ TOOLTEST_OUT() { $RM $TESTDIR/$TMPOUTFILE TFILE=$2 if [ ! -z "$2" ] && [ -e $TESTDIR/$2 ] ; then - $CP $TESTDIR/$2 $TESTDIR/$TMPOUTFILE - TFILE=$TMPOUTFILE + $CP $TESTDIR/$2 $TESTDIR/$TMPOUTFILE + TFILE=$TMPOUTFILE fi # Run test. TESTING $FORMCONV $3 $4 $5 $6 $2 ( - cd $TESTDIR - $RUNSERIAL $FORMCONV_BIN $3 $4 $5 $6 $TFILE + cd $TESTDIR + $RUNSERIAL $FORMCONV_BIN $3 $4 $5 $6 $TFILE ) >$actual 2>$actual_err cp $actual $actual_sav cp $actual_err $actual_err_sav @@ -239,20 +240,81 @@ TOOLTEST_OUT() { # Clean up output file if test -z "$HDF5_NOCLEANUP"; then - $RM $actual $actual_err - $RM $actual $actual_err $actual_sav $actual_err_sav + $RM $actual $actual_err + $RM $actual $actual_err $actual_sav $actual_err_sav + fi +} +# Same as TOOLTEST_OUT but filters error stack output and compares to an error file +TOOLTEST_MASK_OUT() { + # Prepare expected and actual output + expect="$TESTDIR/$1" + expect_err="$TESTDIR/$1.err" + actual_ext="$TESTDIR/$1.ext" + actual="$TESTDIR/`basename $1 .ddl`.out" + actual_err="$TESTDIR/`basename $1 .ddl`.err" + actual_sav=${actual}-sav + actual_err_sav=${actual_err}-sav + + # Prepare the test file + $RM $TESTDIR/$TMPOUTFILE + TFILE=$2 + if [ ! -z "$2" ] && [ -e $TESTDIR/$2 ] ; then + $CP $TESTDIR/$2 $TESTDIR/$TMPOUTFILE + TFILE=$TMPOUTFILE + fi + + # Run test. + TESTING $FORMCONV $3 $4 $5 $6 $2 + ( + cd $TESTDIR + $RUNSERIAL $FORMCONV_BIN $3 $4 $5 $6 $TFILE + ) >$actual 2>$actual_err + cp $actual $actual_sav + cp $actual_err $actual_err_sav + STDERR_FILTER $actual_err + + # Extract file name, line number, version and thread IDs because they may be different + sed -e 's/thread [0-9]*/thread (IDs)/' -e 's/: .*\.c /: (file name) /' \ + -e 's/line [0-9]*/line (number)/' \ + -e 's/v[1-9]*\.[0-9]*\./version (number)\./' \ + -e 's/[1-9]*\.[0-9]*\.[0-9]*[^)]*/version (number)/' \ + -e 's/H5Eget_auto[1-2]*/H5Eget_auto(1 or 2)/' \ + -e 's/H5Eset_auto[1-2]*/H5Eset_auto(1 or 2)/' \ + $actual_err > $actual_ext + + # Compare output + if $CMP $expect $actual; then + if $CMP $expect_err $actual_ext; then + echo " PASSED" + else + echo "*FAILED*" + echo " Expected result (*.err) differs from actual result (*.oerr)" + nerrors="`expr $nerrors + 1`" + test yes = "$verbose" && $DIFF $expect_err $actual_ext |sed 's/^/ /' + fi + else + echo "*FAILED*" + echo " Expected result (*.ddl) differs from actual result (*.out)" + nerrors="`expr $nerrors + 1`" + test yes = "$verbose" && $DIFF $expect $actual |sed 's/^/ /' + fi + + # Clean up output file + if test -z "$HDF5_NOCLEANUP"; then + $RM $actual $actual_err + $RM $actual $actual_err $actual_sav $actual_err_sav fi } -# To check that the tool exits success, no output +# To check that the tool exits success, no output # Assume all short options -# $1 is the test file name -# --fname exists -# --fname is copied to a temporary file for testing -# $2 is the temporary file name +# $1 is the test file name +# --fname exists +# --fname is copied to a temporary file for testing +# $2 is the temporary file name # $3 to at most $5--options to the tool such as: -# -d dname -# -n +# -d dname +# -n TOOLTEST() { TESTING $FORMCONV $3 $4 $5 $1 $RM $TESTDIR/$2 @@ -260,11 +322,11 @@ TOOLTEST() { $RUNSERIAL $FORMCONV_BIN $3 $4 $5 $TESTDIR/$2 exitcode=$? if [ $exitcode -ne 0 ]; then - echo "*FAILED*" - echo " The tool exits failure" - nerrors="`expr $nerrors + 1`" + echo "*FAILED*" + echo " The tool exits failure" + nerrors="`expr $nerrors + 1`" else - echo " PASSED" + echo " PASSED" fi } @@ -280,11 +342,11 @@ IDX_CHECK() { $RUNSERIAL $CHK_IDX_BIN $TESTDIR/$TMPCHKFILE $1 ret=$? if [ $ret -eq 0 ]; then - echo " PASSED" + echo " PASSED" else - echo "*FAILED*" - echo " The chunk indexing type is not correct" - nerrors="`expr $nerrors + 1`" + echo "*FAILED*" + echo " The chunk indexing type is not correct" + nerrors="`expr $nerrors + 1`" fi } @@ -317,7 +379,7 @@ H5DUMP_CHECK() { # Clean up output file if test -z "$HDF5_NOCLEANUP"; then - $RM $actual $actual_err + $RM $actual $actual_err fi } @@ -326,12 +388,12 @@ SKIP() { TESTING $STAT $@ echo " -SKIP-" } - + ############################################################################## ############################################################################## -### T H E T E S T S ### +### T H E T E S T S ### ############################################################################## ############################################################################## # prepare for test @@ -377,7 +439,7 @@ TOOLTEST_OUT h5fc_v_n_all.ddl h5fc_non_v3.h5 -v -n # # # h5format_convert -v h5fc_err_level.h5 (error encountered in converting the dataset) -TOOLTEST_OUT h5fc_v_err.ddl h5fc_err_level.h5 -v +TOOLTEST_MASK_OUT h5fc_v_err.ddl h5fc_err_level.h5 -v # # # @@ -436,7 +498,7 @@ TOOLTEST h5fc_non_v3.h5 $TMPFILE -n # # No output from tests: just check exit code # h5format_convert h5fc_non_v3.h5 -# 1) convert all datasets +# 1) convert all datasets # 2) verify indexing types TOOLTEST h5fc_non_v3.h5 $TMPCHKFILE IDX_CHECK /DSET_NDATA_EA diff --git a/tools/test/h5repack/CMakeTests.cmake b/tools/test/h5repack/CMakeTests.cmake index 559dd88..13ebd17 100644 --- a/tools/test/h5repack/CMakeTests.cmake +++ b/tools/test/h5repack/CMakeTests.cmake @@ -275,12 +275,12 @@ endif () add_test ( NAME H5REPACK-${testname} - COMMAND $ ${ARGN} ${PROJECT_BINARY_DIR}/testfiles/${testfile} ${PROJECT_BINARY_DIR}/testfiles/out-${testname}.${testfile} + COMMAND $ --enable-error-stack ${ARGN} ${PROJECT_BINARY_DIR}/testfiles/${testfile} ${PROJECT_BINARY_DIR}/testfiles/out-${testname}.${testfile} ) set_tests_properties (H5REPACK-${testname} PROPERTIES DEPENDS H5REPACK-${testname}-clear-objects) add_test ( NAME H5REPACK-${testname}_DFF - COMMAND $ ${PROJECT_BINARY_DIR}/testfiles/${testfile} ${PROJECT_BINARY_DIR}/testfiles/out-${testname}.${testfile} + COMMAND $ --enable-error-stack ${PROJECT_BINARY_DIR}/testfiles/${testfile} ${PROJECT_BINARY_DIR}/testfiles/out-${testname}.${testfile} ) set_tests_properties (H5REPACK-${testname}_DFF PROPERTIES DEPENDS H5REPACK-${testname}) endif () diff --git a/tools/test/h5repack/h5repacktst.c b/tools/test/h5repack/h5repacktst.c index ae9ce25..d6e3201 100644 --- a/tools/test/h5repack/h5repacktst.c +++ b/tools/test/h5repack/h5repacktst.c @@ -3041,9 +3041,9 @@ int make_all_filters(hid_t loc_id) /* close */ if(H5Tclose(dtid) < 0) - return -1; + goto out; if(H5Dclose(dsid) < 0) - return -1; + goto out; if(H5Sclose(sid) < 0) goto out; @@ -3055,6 +3055,8 @@ int make_all_filters(hid_t loc_id) out: H5E_BEGIN_TRY { + H5Tclose(dtid); + H5Dclose(dsid); H5Pclose(dcpl); H5Sclose(sid); } H5E_END_TRY; -- cgit v0.12 From bd56b17c2fcbdc9ef3a541e219c24c82f6b54ee6 Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Thu, 19 Oct 2017 12:20:17 -0500 Subject: Fix name of reference file --- tools/test/h5format_convert/testfiles/h5fc_v_err.ddl.err | 8 ++++++++ tools/test/h5format_convert/testfiles/h5fc_v_err.err | 8 -------- 2 files changed, 8 insertions(+), 8 deletions(-) create mode 100644 tools/test/h5format_convert/testfiles/h5fc_v_err.ddl.err delete mode 100644 tools/test/h5format_convert/testfiles/h5fc_v_err.err diff --git a/tools/test/h5format_convert/testfiles/h5fc_v_err.ddl.err b/tools/test/h5format_convert/testfiles/h5fc_v_err.ddl.err new file mode 100644 index 0000000..d85a999 --- /dev/null +++ b/tools/test/h5format_convert/testfiles/h5fc_v_err.ddl.err @@ -0,0 +1,8 @@ +h5format_convert error: unable to downgrade dataset "/DSET_ERR" +H5tools-DIAG: Error detected in HDF5:tools (version (number)) thread (IDs): + #000: (file name) line (number) in h5trav_visit(): traverse failed + major: Failure in tools library + minor: error in function + #001: (file name) line (number) in traverse(): H5Lvisit_by_name failed + major: Failure in tools library + minor: error in function diff --git a/tools/test/h5format_convert/testfiles/h5fc_v_err.err b/tools/test/h5format_convert/testfiles/h5fc_v_err.err deleted file mode 100644 index d85a999..0000000 --- a/tools/test/h5format_convert/testfiles/h5fc_v_err.err +++ /dev/null @@ -1,8 +0,0 @@ -h5format_convert error: unable to downgrade dataset "/DSET_ERR" -H5tools-DIAG: Error detected in HDF5:tools (version (number)) thread (IDs): - #000: (file name) line (number) in h5trav_visit(): traverse failed - major: Failure in tools library - minor: error in function - #001: (file name) line (number) in traverse(): H5Lvisit_by_name failed - major: Failure in tools library - minor: error in function -- cgit v0.12 From f183ecd3f9f872b41a1b6bc40994e0a8e6de3c9c Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Thu, 19 Oct 2017 12:50:28 -0500 Subject: Merge from develop --- tools/lib/h5tools_utils.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/tools/lib/h5tools_utils.c b/tools/lib/h5tools_utils.c index 1b5911b..a081c7e 100644 --- a/tools/lib/h5tools_utils.c +++ b/tools/lib/h5tools_utils.c @@ -205,8 +205,9 @@ get_option(int argc, const char **argv, const char *opts, const struct long_opti opt_opt = l_opts[i].shortval; if (l_opts[i].has_arg != no_arg) { - if (arg[len] == '=') + 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] != '-') @@ -295,13 +296,16 @@ get_option(int argc, const char **argv, const char *opts, const struct long_opti opt_ind++; /* we do have an extra argument, check if not last */ if ( (opt_ind+1) < argc ) { - if ( argv[opt_ind][0] != '-' ) + if ( argv[opt_ind][0] != '-' ) { opt_arg = argv[opt_ind++]; - else + } + else { opt_arg = NULL; + } } - else + else { opt_arg = NULL; + } } else { /* set up to look at next char in token, next time */ -- cgit v0.12 From 2b7ee7e362c0979931754213430d991ec9788fe9 Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Thu, 19 Oct 2017 16:55:33 -0500 Subject: Avoid double free --- tools/lib/h5diff_array.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/tools/lib/h5diff_array.c b/tools/lib/h5diff_array.c index 54b9109..11f5e41 100644 --- a/tools/lib/h5diff_array.c +++ b/tools/lib/h5diff_array.c @@ -4258,9 +4258,6 @@ int ull2float(unsigned long long ull_value, float *f_value) HDmemcpy(f_value, buf, dst_size); - if (buf) - HDfree(buf); - done: H5E_BEGIN_TRY { H5Pclose(dxpl_id); -- cgit v0.12 From 7fbed4481c86511f3b8bfc93f07a16b0199a3242 Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Fri, 20 Oct 2017 08:34:08 -0500 Subject: Merge from develop --- tools/test/misc/CMakeTestsClear.cmake | 38 +++++++++++++++++++++++++++++++---- 1 file changed, 34 insertions(+), 4 deletions(-) diff --git a/tools/test/misc/CMakeTestsClear.cmake b/tools/test/misc/CMakeTestsClear.cmake index b9095fb..fb4826b 100644 --- a/tools/test/misc/CMakeTestsClear.cmake +++ b/tools/test/misc/CMakeTestsClear.cmake @@ -55,6 +55,36 @@ ############################################################################## ############################################################################## + # Need special dependencies for tests that use the same reference file + # This is an issue on Windows + macro (ADD_H5_USAGE testname resultfile resultcode) + if (NOT HDF5_ENABLE_USING_MEMCHECKER) + add_test ( + NAME H5CLEAR_USAGE-${testname}-clear-objects + COMMAND ${CMAKE_COMMAND} + -E remove + testfiles/${testname}.out + testfiles/${testname}.out.err + ) + if (NOT "${last_test}" STREQUAL "") + set_tests_properties (H5CLEAR_USAGE-${testname}-clear-objects PROPERTIES DEPENDS ${last_test}) + endif () + add_test ( + NAME H5CLEAR_USAGE-${testname} + COMMAND "${CMAKE_COMMAND}" + -D "TEST_PROGRAM=$" + -D "TEST_ARGS:STRING=${ARGN}" + -D "TEST_FOLDER=${PROJECT_BINARY_DIR}/testfiles" + -D "TEST_OUTPUT=${testname}.out" + -D "TEST_EXPECT=${resultcode}" + -D "TEST_REFERENCE=${resultfile}.ddl" + -P "${HDF_RESOURCES_EXT_DIR}/runTest.cmake" + ) + set_tests_properties (H5CLEAR_USAGE-${testname} PROPERTIES DEPENDS H5CLEAR_USAGE-${testname}-clear-objects) + set (last_test "H5CLEAR_USAGE-${testname}") + endif () + endmacro () + macro (ADD_H5_CMP testname resultfile resultcode) if (NOT HDF5_ENABLE_USING_MEMCHECKER) add_test ( @@ -212,10 +242,10 @@ endif() # "h5clear -m -s junk.h5" (valid 2 options, nonexisting file) # "h5clear -m orig_h5clear_sec2_v2.h5" (valid 1 option, existing file, no cache image) # "h5clear -s -m orig_h5clear_sec2_v0.h5" (valid 2 options, existing file, no cache image) - ADD_H5_CMP (h5clr_usage_h h5clear_usage 0 "-h") - ADD_H5_CMP (h5clr_usage h5clear_usage 1 "") - ADD_H5_CMP (h5clr_usage_junk h5clear_usage 1 "" junk.h5) - ADD_H5_CMP (h5clr_usage_none h5clear_usage 1 "" orig_h5clear_sec2_v3.h5) + ADD_H5_USAGE (h5clr_usage_h h5clear_usage 0 "-h") + ADD_H5_USAGE (h5clr_usage h5clear_usage 1 "") + ADD_H5_USAGE (h5clr_usage_junk h5clear_usage 1 "" junk.h5) + ADD_H5_USAGE (h5clr_usage_none h5clear_usage 1 "" orig_h5clear_sec2_v3.h5) ADD_H5_CMP (h5clr_missing_file_m h5clear_missing_file 1 "-m") ADD_H5_CMP (h5clr_open_fail_s h5clear_open_fail 1 "-s" junk.h5) ADD_H5_CMP (h5clr_missing_file_ms h5clear_missing_file 1 "-m" "-s") -- cgit v0.12 From 9a8a1282c57f95fa826b19c5948cc27c376113d0 Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Fri, 20 Oct 2017 09:38:26 -0500 Subject: HDFFV-10297 Merge from develop --- tools/test/misc/CMakeTestsClear.cmake | 40 +++++++---------------------------- 1 file changed, 8 insertions(+), 32 deletions(-) diff --git a/tools/test/misc/CMakeTestsClear.cmake b/tools/test/misc/CMakeTestsClear.cmake index fb4826b..942ae7a 100644 --- a/tools/test/misc/CMakeTestsClear.cmake +++ b/tools/test/misc/CMakeTestsClear.cmake @@ -57,34 +57,6 @@ # Need special dependencies for tests that use the same reference file # This is an issue on Windows - macro (ADD_H5_USAGE testname resultfile resultcode) - if (NOT HDF5_ENABLE_USING_MEMCHECKER) - add_test ( - NAME H5CLEAR_USAGE-${testname}-clear-objects - COMMAND ${CMAKE_COMMAND} - -E remove - testfiles/${testname}.out - testfiles/${testname}.out.err - ) - if (NOT "${last_test}" STREQUAL "") - set_tests_properties (H5CLEAR_USAGE-${testname}-clear-objects PROPERTIES DEPENDS ${last_test}) - endif () - add_test ( - NAME H5CLEAR_USAGE-${testname} - COMMAND "${CMAKE_COMMAND}" - -D "TEST_PROGRAM=$" - -D "TEST_ARGS:STRING=${ARGN}" - -D "TEST_FOLDER=${PROJECT_BINARY_DIR}/testfiles" - -D "TEST_OUTPUT=${testname}.out" - -D "TEST_EXPECT=${resultcode}" - -D "TEST_REFERENCE=${resultfile}.ddl" - -P "${HDF_RESOURCES_EXT_DIR}/runTest.cmake" - ) - set_tests_properties (H5CLEAR_USAGE-${testname} PROPERTIES DEPENDS H5CLEAR_USAGE-${testname}-clear-objects) - set (last_test "H5CLEAR_USAGE-${testname}") - endif () - endmacro () - macro (ADD_H5_CMP testname resultfile resultcode) if (NOT HDF5_ENABLE_USING_MEMCHECKER) add_test ( @@ -94,6 +66,9 @@ testfiles/${testname}.out testfiles/${testname}.out.err ) + if (NOT "${last_test}" STREQUAL "") + set_tests_properties (H5CLEAR_CMP-${testname}-clear-objects PROPERTIES DEPENDS ${last_test}) + endif () add_test ( NAME H5CLEAR_CMP-${testname} COMMAND "${CMAKE_COMMAND}" @@ -106,6 +81,7 @@ -P "${HDF_RESOURCES_EXT_DIR}/runTest.cmake" ) set_tests_properties (H5CLEAR_CMP-${testname} PROPERTIES DEPENDS H5CLEAR_CMP-${testname}-clear-objects) + set (last_test "H5CLEAR_CMP-${testname}") endif () endmacro () @@ -242,10 +218,10 @@ endif() # "h5clear -m -s junk.h5" (valid 2 options, nonexisting file) # "h5clear -m orig_h5clear_sec2_v2.h5" (valid 1 option, existing file, no cache image) # "h5clear -s -m orig_h5clear_sec2_v0.h5" (valid 2 options, existing file, no cache image) - ADD_H5_USAGE (h5clr_usage_h h5clear_usage 0 "-h") - ADD_H5_USAGE (h5clr_usage h5clear_usage 1 "") - ADD_H5_USAGE (h5clr_usage_junk h5clear_usage 1 "" junk.h5) - ADD_H5_USAGE (h5clr_usage_none h5clear_usage 1 "" orig_h5clear_sec2_v3.h5) + ADD_H5_CMP (h5clr_usage_h h5clear_usage 0 "-h") + ADD_H5_CMP (h5clr_usage h5clear_usage 1 "") + ADD_H5_CMP (h5clr_usage_junk h5clear_usage 1 "" junk.h5) + ADD_H5_CMP (h5clr_usage_none h5clear_usage 1 "" orig_h5clear_sec2_v3.h5) ADD_H5_CMP (h5clr_missing_file_m h5clear_missing_file 1 "-m") ADD_H5_CMP (h5clr_open_fail_s h5clear_open_fail 1 "-s" junk.h5) ADD_H5_CMP (h5clr_missing_file_ms h5clear_missing_file 1 "-m" "-s") -- cgit v0.12 From b96af1822281a7cb8acbaaba98e3f862ef29946e Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Mon, 23 Oct 2017 09:32:29 -0500 Subject: HDFFV-10297 - Cleanup, initialize variables --- tools/lib/h5diff_dset.c | 2 +- tools/lib/h5tools.c | 464 +++++++++++++++---------------------- tools/lib/h5tools_dump.c | 11 +- tools/lib/h5tools_str.c | 8 +- tools/lib/h5tools_utils.c | 5 +- tools/src/h5repack/h5repack.c | 8 +- tools/src/h5repack/h5repack_copy.c | 28 +-- tools/src/h5repack/h5repack_refs.c | 15 +- 8 files changed, 224 insertions(+), 317 deletions(-) diff --git a/tools/lib/h5diff_dset.c b/tools/lib/h5diff_dset.c index b03295b..ee42b99 100644 --- a/tools/lib/h5diff_dset.c +++ b/tools/lib/h5diff_dset.c @@ -189,7 +189,7 @@ hsize_t diff_datasetid(hid_t did1, void *buf2 = NULL; void *sm_buf1 = NULL; void *sm_buf2 = NULL; - hid_t sm_space; /*stripmine data space */ + hid_t sm_space = -1; /*stripmine data space */ size_t need; /* bytes needed for malloc */ int i; unsigned int vl_data = 0; /*contains VL datatypes */ diff --git a/tools/lib/h5tools.c b/tools/lib/h5tools.c index 344913a..6ea5e47 100644 --- a/tools/lib/h5tools.c +++ b/tools/lib/h5tools.c @@ -23,10 +23,10 @@ #include "H5private.h" /* global variables */ -hid_t H5tools_ERR_STACK_g = 0; -hid_t H5tools_ERR_CLS_g = -1; -hid_t H5E_tools_g = -1; -hid_t H5E_tools_min_id_g = -1; +hid_t H5tools_ERR_STACK_g = 0; +hid_t H5tools_ERR_CLS_g = -1; +hid_t H5E_tools_g = -1; +hid_t H5E_tools_min_id_g = -1; int compound_data; FILE *rawattrstream = NULL; /* should initialize to stdout but gcc moans about it */ FILE *rawdatastream = NULL; /* should initialize to stdout but gcc moans about it */ @@ -77,18 +77,13 @@ typedef enum { #define NUM_DRIVERS (sizeof(drivernames) / sizeof(drivernames[0])) /*------------------------------------------------------------------------- - * Audience: Public - * Chapter: H5Tools Library - * Purpose: Initialize the H5 Tools library - * Description: - * This should be called before any other h5tools function is called. - * Effect of any h5tools function called before this has been called is - * undetermined. - * Return: - * None - * Programmer: - * Albert Cheng, 2000-10-31 - * Modifications: + * Function: h5tools_init + * + * Purpose: This should be called before any other h5tools function is called. + * Effect of any h5tools function called before this has been called is + * undetermined. + * + * Return None *------------------------------------------------------------------------- */ void @@ -121,19 +116,14 @@ h5tools_init(void) } /*------------------------------------------------------------------------- - * Audience: Public - * Chapter: H5Tools Library - * Purpose: Close the H5 Tools library - * Description: - * Close or release resources such as files opened by the library. This - * should be called after all other h5tools functions have been called. - * Effect of any h5tools function called after this has been called is - * undetermined. - * Return: - * None - * Programmer: - * Albert Cheng, 2000-10-31 - * Modifications: + * Function: h5tools_close + * + * Purpose: Close or release resources such as files opened by the library. This + * should be called after all other h5tools functions have been called. + * Effect of any h5tools function called after this has been called is + * undetermined. + * + * Return: None *------------------------------------------------------------------------- */ void @@ -193,19 +183,13 @@ h5tools_close(void) } /*------------------------------------------------------------------------- - * Function: h5tools_set_data_output_file - * - * Purpose: Open fname as the output file for dataset raw data. - * Set rawdatastream as its file stream. + * Function: h5tools_set_data_output_file * - * Return: 0 -- succeeded - * negative -- failed - * - * Programmer: Albert Cheng, 2000/09/30 - * - * Modifications: - * pvn June, 1, 2006. Add a switch for binary output + * Purpose: Open fname as the output file for dataset raw data. + * Set rawdatastream as its file stream. * + * Return: 0 -- succeeded + * negative -- failed *------------------------------------------------------------------------- */ int @@ -247,14 +231,13 @@ h5tools_set_data_output_file(const char *fname, int is_bin) } /*------------------------------------------------------------------------- - * Function: h5tools_set_attr_output_file + * Function: h5tools_set_attr_output_file * - * Purpose: Open fname as the output file for attribute raw data. - * Set rawattrstream as its file stream. - * - * Return: 0 -- succeeded - * negative -- failed + * Purpose: Open fname as the output file for attribute raw data. + * Set rawattrstream as its file stream. * + * Return: 0 -- succeeded + * negative -- failed *------------------------------------------------------------------------- */ int @@ -296,13 +279,13 @@ h5tools_set_attr_output_file(const char *fname, int is_bin) } /*------------------------------------------------------------------------- - * Function: h5tools_set_input_file + * Function: h5tools_set_input_file * - * Purpose: Open fname as the input file for raw input. - * Set rawinstream as its file stream. + * Purpose: Open fname as the input file for raw input. + * Set rawinstream as its file stream. * - * Return: 0 -- succeeded - * negative -- failed + * Return: 0 -- succeeded + * negative -- failed * *------------------------------------------------------------------------- */ @@ -344,13 +327,13 @@ h5tools_set_input_file(const char *fname, int is_bin) } /*------------------------------------------------------------------------- - * Function: h5tools_set_output_file + * Function: h5tools_set_output_file * - * Purpose: Open fname as the output file for raw output. - * Set rawoutstream as its file stream. + * Purpose: Open fname as the output file for raw output. + * Set rawoutstream as its file stream. * - * Return: 0 -- succeeded - * negative -- failed + * Return: 0 -- succeeded + * negative -- failed * *------------------------------------------------------------------------- */ @@ -392,14 +375,13 @@ h5tools_set_output_file(const char *fname, int is_bin) } /*------------------------------------------------------------------------- - * Function: h5tools_set_error_file - * - * Purpose: Open fname as the error output file for dataset raw error. - * Set rawerrorstream as its file stream. + * Function: h5tools_set_error_file * - * Return: 0 -- succeeded - * negative -- failed + * Purpose: Open fname as the error output file for dataset raw error. + * Set rawerrorstream as its file stream. * + * Return: 0 -- succeeded + * negative -- failed *------------------------------------------------------------------------- */ int @@ -441,33 +423,28 @@ h5tools_set_error_file(const char *fname, int is_bin) } /*------------------------------------------------------------------------- - * Audience: Private - * Chapter: H5Tools Library - * Purpose: Get a FAPL for a driver - * Description: - * Get a FAPL for a given VFL driver name. - * Return: - * None - * Programmer: - * Quincey Koziol, 2004-02-04 - * Modifications: - * Pedro Vicente Nunes, Thursday, July 27, 2006 - * Added error return conditions for the H5Pset_fapl calls + * Function: h5tools_get_fapl + * + * Purpose: Get a FAPL for a given VFL driver name. + * + * Return: positive - succeeded + * negative - failed *------------------------------------------------------------------------- */ static hid_t h5tools_get_fapl(hid_t fapl, const char *driver, unsigned *drivernum) { - hid_t new_fapl; /* Copy of file access property list passed in, or new property list */ + hid_t new_fapl = -1; /* Copy of file access property list passed in, or new property list */ + int ret_value = SUCCEED; /* Make a copy of the FAPL, for the file open call to use, eventually */ if (fapl == H5P_DEFAULT) { if ((new_fapl = H5Pcreate(H5P_FILE_ACCESS)) < 0) - goto error; + HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Pcreate failed"); } /* end if */ else { if ((new_fapl = H5Pcopy(fapl)) < 0) - goto error; + HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Pcopy failed"); } /* end else */ /* Determine which driver the user wants to open the file with. Try @@ -475,7 +452,7 @@ h5tools_get_fapl(hid_t fapl, const char *driver, unsigned *drivernum) if (!HDstrcmp(driver, drivernames[SEC2_IDX])) { /* SEC2 driver */ if (H5Pset_fapl_sec2(new_fapl) < 0) - goto error; + HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Pset_fapl_sec2 failed"); if (drivernum) *drivernum = SEC2_IDX; @@ -487,7 +464,7 @@ h5tools_get_fapl(hid_t fapl, const char *driver, unsigned *drivernum) * is the member size. */ if (H5Pset_fapl_family(new_fapl, (hsize_t) 0, H5P_DEFAULT) < 0) - goto error; + HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Pset_fapl_family failed"); if (drivernum) *drivernum = FAMILY_IDX; @@ -495,7 +472,7 @@ h5tools_get_fapl(hid_t fapl, const char *driver, unsigned *drivernum) else if (!HDstrcmp(driver, drivernames[SPLIT_IDX])) { /* SPLIT Driver */ if (H5Pset_fapl_split(new_fapl, "-m.h5", H5P_DEFAULT, "-r.h5", H5P_DEFAULT) < 0) - goto error; + HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Pset_fapl_split failed"); if (drivernum) *drivernum = SPLIT_IDX; @@ -503,7 +480,7 @@ h5tools_get_fapl(hid_t fapl, const char *driver, unsigned *drivernum) else if (!HDstrcmp(driver, drivernames[MULTI_IDX])) { /* MULTI Driver */ if (H5Pset_fapl_multi(new_fapl, NULL, NULL, NULL, NULL, TRUE) < 0) - goto error; + HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Pset_fapl_multi failed"); if(drivernum) *drivernum = MULTI_IDX; @@ -519,29 +496,28 @@ h5tools_get_fapl(hid_t fapl, const char *driver, unsigned *drivernum) if(mpi_initialized && !mpi_finalized) { if(H5Pset_fapl_mpio(new_fapl, MPI_COMM_WORLD, MPI_INFO_NULL) < 0) - goto error; + HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Pset_fapl_mpio failed"); if(drivernum) *drivernum = MPIO_IDX; } /* end if */ } #endif /* H5_HAVE_PARALLEL */ else - goto error; + ret_value = -1; - return(new_fapl); - -error: - if(new_fapl != H5P_DEFAULT) +done: + if((new_fapl != H5P_DEFAULT) && (ret_value < 0)) { H5Pclose(new_fapl); - return -1; + new_fapl = -1; + } + + return(new_fapl); } /*------------------------------------------------------------------------- - * Audience: Public - * Chapter: H5Tools Library - * Purpose: Open a file with various VFL drivers. - * Description: - * Loop through the various types of VFL drivers trying to open FNAME. + * Function: h5tools_fopen + * + * Purpose: Loop through the various types of VFL drivers trying to open FNAME. * If the HDF5 library is version 1.2 or less, then we have only the SEC2 * driver to try out. If the HDF5 library is greater than version 1.2, * then we have the FAMILY, SPLIT, and MULTI drivers to play with. @@ -549,6 +525,7 @@ error: * If DRIVER is non-NULL, then it will try to open the file with that * driver first. We assume that the user knows what they are doing so, if * we fail, then we won't try other file drivers. + * * Return: * On success, returns a file id for the opened file. If DRIVERNAME is * non-null then the first DRIVERNAME_SIZE-1 characters of the driver @@ -556,38 +533,6 @@ error: * * Otherwise, the function returns FAIL. If DRIVERNAME is non-null then * the first byte is set to the null terminator. - * Programmer: - * Lost in the mists of time. - * Modifications: - * Robb Matzke, 2000-06-23 - * We only have to initialize driver[] on the first call, thereby - * preventing memory leaks from repeated calls to H5Pcreate(). - * - * Robb Matzke, 2000-06-23 - * Added DRIVERNAME_SIZE arg to prevent overflows when writing to - * DRIVERNAME. - * - * Robb Matzke, 2000-06-23 - * Added test to prevent coredump when the file could not be opened by - * any driver. - * - * Robb Matzke, 2000-06-23 - * Changed name from H5ToolsFopen() so it jives better with the names we - * already have at the top of this source file. - * - * Thomas Radke, 2000-09-12 - * Added Stream VFD to the driver[] array. - * - * Bill Wendling, 2001-01-10 - * Changed macro behavior so that if we have a version other than 1.2.x - * (i.e., > 1.2), then we do the drivers check. - * - * Bill Wendling, 2001-07-30 - * Added DRIVER parameter so that the user can specify "try this driver" - * instead of the default behaviour. If it fails to open the file with - * that driver, this will fail completely (i.e., we won't try the other - * drivers). We're assuming the user knows what they're doing. How UNIX - * of us. *------------------------------------------------------------------------- */ hid_t @@ -652,18 +597,13 @@ done: } /*------------------------------------------------------------------------- - * Audience: Public - * Chapter: H5Tools Library - * Purpose: Count the number of columns in a string. - * Description: - * Count the number of columns in a string. This is the number of - * characters in the string not counting line-control characters. - * Return: - * On success, returns the width of the string. Otherwise this function - * returns 0. - * Programmer: - * Robb Matzke, Tuesday, April 27, 1999 - * Modifications: + * Function: h5tools_count_ncols + * + * Purpose: Count the number of columns in a string. This is the number of + * characters in the string not counting line-control characters. + * + * Return: success - returns the width of the string. + * failure - 0. *------------------------------------------------------------------------- */ H5_ATTR_PURE static size_t @@ -681,20 +621,17 @@ h5tools_count_ncols(const char *s) /*------------------------------------------------------------------------- * Function: h5tools_detect_vlen * - * Purpose: Recursive check for any variable length data in given type. + * Purpose: Recursive check for any variable length data in given type. * - * Return: - * TRUE : type conatains any variable length data - * FALSE : type doesn't contain any variable length data - * Negative value: error occur - * - * Programmer: Jonathan Kim March 18, 2011 + * Return: TRUE : type conatains any variable length data + * FALSE : type doesn't contain any variable length data + * Negative value: error occur *------------------------------------------------------------------------- */ htri_t h5tools_detect_vlen(hid_t tid) { - htri_t ret; + htri_t ret = FALSE; /* recursive detect any vlen data values in type (compound, array ...) */ ret = H5Tdetect_class(tid, H5T_VLEN); @@ -713,20 +650,18 @@ done: /*------------------------------------------------------------------------- * Function: h5tools_detect_vlen_str * - * Purpose: Recursive check for variable length string of a datatype. - * - * Return: - * TRUE : type conatains any variable length string - * FALSE : type doesn't contain any variable length string - * Negative value: error occur + * Purpose: Recursive check for variable length string of a datatype. * + * Return: TRUE : type conatains any variable length string + * FALSE : type doesn't contain any variable length string + * Negative value: error occur *------------------------------------------------------------------------- */ htri_t h5tools_detect_vlen_str(hid_t tid) { H5T_class_t tclass = -1; - htri_t ret = FALSE; + htri_t ret = FALSE; ret = H5Tis_variable_str(tid); if((ret == TRUE) || (ret < 0)) @@ -774,25 +709,13 @@ done: } /*------------------------------------------------------------------------- - * Audience: Public - * Chapter: H5Tools Library - * Purpose: Emit a simple prefix to STREAM. - * Description: - * If /ctx->need_prefix/ is set then terminate the current line (if - * applicable), calculate the prefix string, and display it at the start - * of a line. - * Return: - * None - * Programmer: - * Robb Matzke, Monday, April 26, 1999 - * Modifications: - * Robb Matzke, 1999-09-29 - * If a new prefix is printed then the current element number is set back - * to zero. - * pvn, 2004-07-08 - * Added support for printing array indices: - * the indentation is printed before the prefix (printed one indentation - * level before) + * Function: h5tools_simple_prefix + * + * Purpose: If /ctx->need_prefix/ is set then terminate the current line (if + * applicable), calculate the prefix string, and display it at the start + * of a line. + * + * Return: None *------------------------------------------------------------------------- */ void @@ -800,7 +723,7 @@ h5tools_simple_prefix(FILE *stream, const h5tool_format_t *info, h5tools_context_t *ctx, hsize_t elmtno, int secnum) { h5tools_str_t prefix; - h5tools_str_t str; /*temporary for indentation */ + h5tools_str_t str; /*temporary for indentation */ size_t templength = 0; unsigned u, indentlevel = 0; @@ -871,15 +794,13 @@ h5tools_simple_prefix(FILE *stream, const h5tool_format_t *info, } /*------------------------------------------------------------------------- - * Audience: Public - * Chapter: H5Tools Library - * Purpose: Emit a simple prefix to STREAM. - * Description: - * If /ctx->need_prefix/ is set then terminate the current line (if - * applicable), calculate the prefix string, and display it at the start - * of a line. Calls region specific function. - * Return: - * None + * Function: h5tools_region_simple_prefix + * + * Purpose: If /ctx->need_prefix/ is set then terminate the current line (if + * applicable), calculate the prefix string, and display it at the start + * of a line. Calls region specific function. + * + * Return: None *------------------------------------------------------------------------- */ void @@ -887,7 +808,7 @@ h5tools_region_simple_prefix(FILE *stream, const h5tool_format_t *info, h5tools_context_t *ctx, hsize_t elmtno, hsize_t *ptdata, int secnum) { h5tools_str_t prefix; - h5tools_str_t str; /*temporary for indentation */ + h5tools_str_t str; /*temporary for indentation */ size_t templength = 0; unsigned u, indentlevel = 0; @@ -958,28 +879,26 @@ h5tools_region_simple_prefix(FILE *stream, const h5tool_format_t *info, } /*------------------------------------------------------------------------- - * Audience: Public - * Chapter: H5Tools Library - * Purpose: Render an element to output STREAM. - * Description: - * Prints the string buffer to the output STREAM. The string is - * printed according to the format described in INFO. The CTX struct - * contains context information shared between calls to this function. + * Function: h5tools_render_element * - * Return: - * False if a dimension end is reached, otherwise true + * Purpose: Prints the string buffer to the output STREAM. The string is + * printed according to the format described in INFO. The CTX struct + * contains context information shared between calls to this function. + * + * Return: False if a dimension end is reached + * True otherwise * * In/Out: - * h5tools_context_t *ctx - * h5tools_str_t *buffer - * hsize_t *curr_pos + * h5tools_context_t *ctx + * h5tools_str_t *buffer + * hsize_t *curr_pos * * Parameters Description: - * h5tools_str_t *buffer is the string into which to render - * hsize_t curr_pos is the total data element position - * size_t ncols - * hsize_t local_elmt_counter is the local element loop counter - * hsize_t elmt_count is the data element loop counter + * h5tools_str_t *buffer is the string into which to render + * hsize_t curr_pos is the total data element position + * size_t ncols + * hsize_t local_elmt_counter is the local element loop counter + * hsize_t elmt_count is the data element loop counter *------------------------------------------------------------------------- */ hbool_t @@ -988,10 +907,10 @@ h5tools_render_element(FILE *stream, const h5tool_format_t *info, size_t ncols, hsize_t local_elmt_counter, hsize_t elmt_counter) { hbool_t dimension_break = TRUE; - char *s; - char *section; /*a section of output */ - int secnum; /*section sequence number */ - int multiline; /*datum was multiline */ + char *s = NULL; + char *section = NULL; /* a section of output */ + int secnum; /* section sequence number */ + int multiline; /* datum was multiline */ if (stream == NULL) return dimension_break; @@ -1114,29 +1033,28 @@ h5tools_render_element(FILE *stream, const h5tool_format_t *info, } /*------------------------------------------------------------------------- - * Audience: Public - * Chapter: H5Tools Library - * Purpose: Render a region element to output STREAM. - * Description: - * Prints the string buffer to the output STREAM. The string is - * printed according to the format described in INFO. The CTX struct - * contains context information shared between calls to this function. + * Function: h5tools_render_region_element + * + * Purpose: Prints the string buffer to the output STREAM. The string is + * printed according to the format described in INFO. The CTX struct + * contains context information shared between calls to this function. * * Return: - * False if a dimension end is reached, otherwise true + * False if a dimension end is reached + * True otherwise * * In/Out: - * h5tools_context_t *ctx - * h5tools_str_t *buffer - * hsize_t *curr_pos + * h5tools_context_t *ctx + * h5tools_str_t *buffer + * hsize_t *curr_pos * * Parameters Description: - * h5tools_str_t *buffer is the string into which to render - * hsize_t curr_pos is the total data element position - * size_t ncols - * hsize_t *ptdata - * hsize_t local_elmt_counter is the local element loop counter - * hsize_t elmt_count is the data element loop counter + * h5tools_str_t *buffer is the string into which to render + * hsize_t curr_pos is the total data element position + * size_t ncols + * hsize_t *ptdata + * hsize_t local_elmt_counter is the local element loop counter + * hsize_t elmt_count is the data element loop counter *------------------------------------------------------------------------- */ hbool_t @@ -1145,10 +1063,10 @@ h5tools_render_region_element(FILE *stream, const h5tool_format_t *info, size_t ncols, hsize_t *ptdata, hsize_t local_elmt_counter, hsize_t elmt_counter) { hbool_t dimension_break = TRUE; - char *s; - char *section; /*a section of output */ - int secnum; /*section sequence number */ - int multiline; /*datum was multiline */ + char *s = NULL; + char *section = NULL; /* a section of output */ + int secnum; /* section sequence number */ + int multiline; /* datum was multiline */ s = h5tools_str_fmt(buffer, (size_t)0, "%s"); @@ -1270,11 +1188,11 @@ h5tools_render_region_element(FILE *stream, const h5tool_format_t *info, } /*------------------------------------------------------------------------- - * Function: init_acc_pos + * Function: init_acc_pos * - * Purpose: initialize accumulator and matrix position + * Purpose: initialize accumulator and matrix position * - * Return: void + * Return: void *------------------------------------------------------------------------- */ void @@ -1295,10 +1213,10 @@ init_acc_pos(h5tools_context_t *ctx, hsize_t *dims) /*------------------------------------------------------------------------- * Function: render_bin_output * - * Purpose: Write one element of memory buffer to a binary file stream + * Purpose: Write one element of memory buffer to a binary file stream * - * Return: Success: SUCCEED - * Failure: FAIL + * Return: Success: SUCCEED + * Failure: FAIL *------------------------------------------------------------------------- */ int @@ -1344,7 +1262,7 @@ render_bin_output(FILE *stream, hid_t container, hid_t tid, void *_mem, hsize_t { unsigned int i; H5T_str_t pad; - char *s; + char *s = NULL; unsigned char tempuchar; pad = H5Tget_strpad(tid); @@ -1372,7 +1290,7 @@ render_bin_output(FILE *stream, hid_t container, hid_t tid, void *_mem, hsize_t break; case H5T_COMPOUND: { - int snmembs; + int snmembs; unsigned nmembs; if((snmembs = H5Tget_nmembers(tid)) < 0) @@ -1384,7 +1302,7 @@ render_bin_output(FILE *stream, hid_t container, hid_t tid, void *_mem, hsize_t mem = ((unsigned char*)_mem) + block_index * size; for (j = 0; j < nmembs; j++) { - hid_t memb; + hid_t memb = -1; size_t offset; offset = H5Tget_member_offset(tid, j); @@ -1404,7 +1322,7 @@ render_bin_output(FILE *stream, hid_t container, hid_t tid, void *_mem, hsize_t { int k, ndims; hsize_t dims[H5S_MAX_RANK], temp_nelmts, nelmts; - hid_t memb; + hid_t memb = -1; /* get the array's base datatype for each element */ memb = H5Tget_super(tid); @@ -1437,7 +1355,7 @@ render_bin_output(FILE *stream, hid_t container, hid_t tid, void *_mem, hsize_t case H5T_VLEN: { hsize_t nelmts; - hid_t memb; + hid_t memb = -1; /* get the VL sequences's base datatype for each element */ memb = H5Tget_super(tid); @@ -1462,7 +1380,8 @@ render_bin_output(FILE *stream, hid_t container, hid_t tid, void *_mem, hsize_t /* if (H5Tequal(tid, H5T_STD_REF_DSETREG)) */ if (region_output) { /* region data */ - hid_t region_id, region_space; + hid_t region_id = -1; + hid_t region_space = -1; H5S_sel_type region_type; for (block_index = 0; block_index < block_nelmts; block_index++) { @@ -1512,15 +1431,13 @@ CATCH } /*------------------------------------------------------------------------- - * Audience: Public - * Chapter: H5Tools Library - * Purpose: Print the data values from a dataset referenced by region blocks. + * Function: render_bin_output_region_data_blocks * - * Description: - * This is a special case subfunction to print the data in a region reference of type blocks. + * Purpose: Print the data values from a dataset referenced by region blocks. + * This is a special case subfunction to print the data in a region reference of type blocks. * - * Return: - * The function returns FAIL if there was an error, otherwise SUCEED + * Return: FAIL if there was an error + * SUCCEED otherwise * *------------------------------------------------------------------------- */ @@ -1609,16 +1526,13 @@ render_bin_output_region_data_blocks(hid_t region_id, FILE *stream, } /*------------------------------------------------------------------------- - * Audience: Public - * Chapter: H5Tools Library - * Purpose: Print some values from a dataset referenced by region blocks. - * - * Description: - * This is a special case subfunction to dump a region reference using blocks. + * Function: render_bin_output_region_blocks * - * Return: - * The function returns False if ERROR, otherwise True + * Purpose: Print some values from a dataset referenced by region blocks. + * This is a special case subfunction to dump a region reference using blocks. * + * Return: False if ERROR + * True otherwise *------------------------------------------------------------------------- */ hbool_t @@ -1629,7 +1543,7 @@ render_bin_output_region_blocks(hid_t region_space, hid_t region_id, hssize_t snblocks; hsize_t nblocks; hsize_t alloc_size; - hsize_t *ptdata; + hsize_t *ptdata = NULL; int sndims; unsigned ndims; hid_t dtype = -1; @@ -1675,8 +1589,7 @@ render_bin_output_region_blocks(hid_t region_space, hid_t region_id, } /*------------------------------------------------------------------------- - * Audience: Public - * Chapter: H5Tools Library + * Function: H5Tools Library * Purpose: Print the data values from a dataset referenced by region points. * * Description: @@ -1736,16 +1649,13 @@ render_bin_output_region_data_points(hid_t region_space, hid_t region_id, } /*------------------------------------------------------------------------- - * Audience: Public - * Chapter: H5Tools Library - * Purpose: Print some values from a dataset referenced by region points. + * Function: render_bin_output_region_points * - * Description: - * This is a special case subfunction to dump a region reference using points. - * - * Return: - * The function returns False if the last dimension has been reached, otherwise True + * Purpose: Print some values from a dataset referenced by region points. + * This is a special case subfunction to dump a region reference using points. * + * Return: False if the last dimension has been reached + * True otherwise *------------------------------------------------------------------------- */ hbool_t @@ -1791,11 +1701,12 @@ CATCH } /*------------------------------------------------------------------------- - * Function: h5tools_is_zero + * Function: h5tools_is_zero * - * Purpose: Determines if memory is initialized to all zero bytes. + * Purpose: Determines if memory is initialized to all zero bytes. * - * Return: TRUE if all bytes are zero; FALSE otherwise + * Return: TRUE if all bytes are zero + * FALSE otherwise *------------------------------------------------------------------------- */ H5_ATTR_PURE hbool_t @@ -1811,23 +1722,20 @@ h5tools_is_zero(const void *_mem, size_t size) } /*------------------------------------------------------------------------- - * Function: h5tools_is_obj_same + * Function: h5tools_is_obj_same * - * Purpose: Check if two given object IDs or link names point to the same object. + * Purpose: Check if two given object IDs or link names point to the same object. * * Parameters: - * hid_t loc_id1: location of the first object - * char *name1: link name of the first object. - * Use "." or NULL if loc_id1 is the object to be compared. - * hid_t loc_id2: location of the second object - * char *name1: link name of the first object. - * Use "." or NULL if loc_id2 is the object to be compared. - * - * Return: TRUE if it is the same object; FALSE otherwise. + * hid_t loc_id1: location of the first object + * char *name1: link name of the first object. + * Use "." or NULL if loc_id1 is the object to be compared. + * hid_t loc_id2: location of the second object + * char *name1: link name of the first object. + * Use "." or NULL if loc_id2 is the object to be compared. * - * Programmer: Peter Cao - * 4/27/2011 - * + * Return: TRUE if it is the same object + * FALSE otherwise. *------------------------------------------------------------------------- */ hbool_t diff --git a/tools/lib/h5tools_dump.c b/tools/lib/h5tools_dump.c index f987296..ed7d38a 100644 --- a/tools/lib/h5tools_dump.c +++ b/tools/lib/h5tools_dump.c @@ -2888,7 +2888,7 @@ void h5tools_print_fill_value(h5tools_str_t *buffer/*in,out*/, const h5tool_format_t *info, h5tools_context_t *ctx/*in,out*/, hid_t dcpl, hid_t type_id, hid_t obj_id) { size_t size; - hid_t n_type; + hid_t n_type = -1; void *buf = NULL; n_type = H5Tget_native_type(type_id, H5T_DIR_DEFAULT); @@ -3638,7 +3638,8 @@ h5tools_dump_attribute(FILE *stream, const h5tool_format_t *info, error_msg("unable to open attribute \"%s\"\n", attr_name); } else { - hid_t type, space; + hid_t type = -1; + hid_t space = -1; ctx->indent_level++; @@ -3857,9 +3858,9 @@ h5tools_dump_data(FILE *stream, const h5tool_format_t *info, H5S_class_t space_type; int ndims; int i; - hid_t space; - hid_t type; - hid_t p_type; + hid_t space = -1; + hid_t type = -1; + hid_t p_type = -1; hsize_t size[64]; hsize_t alloc_size; hsize_t nelmts = 1; diff --git a/tools/lib/h5tools_str.c b/tools/lib/h5tools_str.c index a66cfe5..a018394 100644 --- a/tools/lib/h5tools_str.c +++ b/tools/lib/h5tools_str.c @@ -715,10 +715,11 @@ h5tools_str_sprint(h5tools_str_t *str, const h5tool_format_t *info, hid_t contai { size_t nsize, offset, size=0, nelmts, start; H5T_sign_t nsign; - char *name; + char *name = NULL; unsigned char *ucp_vp = (unsigned char *)vp; char *cp_vp = (char *)vp; - hid_t memb, obj; + hid_t memb = -1; + hid_t obj = -1; static char fmt_llong[8], fmt_ullong[8]; H5T_str_t pad; H5T_class_t type_class; @@ -1306,7 +1307,8 @@ void h5tools_str_sprint_region(h5tools_str_t *str, const h5tool_format_t *info, hid_t container, void *vp) { - hid_t obj, region; + hid_t obj = -1; + hid_t region = -1; char ref_name[1024]; H5S_sel_type region_type; diff --git a/tools/lib/h5tools_utils.c b/tools/lib/h5tools_utils.c index a081c7e..5272e81 100644 --- a/tools/lib/h5tools_utils.c +++ b/tools/lib/h5tools_utils.c @@ -482,8 +482,7 @@ search_obj(table_t *table, haddr_t objno) *------------------------------------------------------------------------- */ static herr_t -find_objs_cb(const char *name, const H5O_info_t *oinfo, const char *already_seen, - void *op_data) +find_objs_cb(const char *name, const H5O_info_t *oinfo, const char *already_seen, void *op_data) { find_objs_t *info = (find_objs_t*)op_data; herr_t ret_value = 0; @@ -496,7 +495,7 @@ find_objs_cb(const char *name, const H5O_info_t *oinfo, const char *already_seen case H5O_TYPE_DATASET: if(NULL == already_seen) { - hid_t dset; + hid_t dset = -1; /* Add the dataset to the list of objects */ add_obj(info->dset_table, oinfo->addr, name, TRUE); diff --git a/tools/src/h5repack/h5repack.c b/tools/src/h5repack/h5repack.c index 14b9461..c98575c 100644 --- a/tools/src/h5repack/h5repack.c +++ b/tools/src/h5repack/h5repack.c @@ -374,7 +374,7 @@ copy_attr(hid_t loc_in, hid_t loc_out, named_dt_t **named_dt_head_p, if ((is_named = H5Tcommitted(ftype_id)) < 0) HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Tcommitted failed"); if (is_named && travt) { - hid_t fidout; + hid_t fidout = -1; /* Create out file id */ if ((fidout = H5Iget_file_id(loc_out)) < 0) @@ -707,9 +707,9 @@ done: */ static int check_objects(const char* fname, pack_opt_t *options) { int ret_value = 0; /*no need to LEAVE() on ERROR: HERR_INIT(int, SUCCEED) */ - hid_t fid; - hid_t did; - hid_t sid; + hid_t fid = -1; + hid_t did = -1; + hid_t sid = -1; unsigned int i; unsigned int uf; trav_table_t *travt = NULL; diff --git a/tools/src/h5repack/h5repack_copy.c b/tools/src/h5repack/h5repack_copy.c index 1adcceb..585d27a 100644 --- a/tools/src/h5repack/h5repack_copy.c +++ b/tools/src/h5repack/h5repack_copy.c @@ -1097,7 +1097,7 @@ int do_copy_objects(hid_t fidin, hid_t fidout, trav_table_t *travt, *------------------------------------------------------------------------- */ else { - hid_t pid; + hid_t pid = -1; /* create property to pass copy options */ if ((pid = H5Pcreate(H5P_OBJECT_COPY)) < 0) @@ -1435,51 +1435,51 @@ void print_user_block(const char *filename, hid_t fid) { int ret_value = 0; - int fh; /* file handle */ - hsize_t ub_size; /* user block size */ - hsize_t size; /* size read */ - hid_t fcpl; /* file creation property list ID for HDF5 file */ + hid_t fh = -1; /* file handle */ + hsize_t ub_size; /* user block size */ + hsize_t size; /* size read */ + hid_t fcpl = -1; /* file creation property list ID for HDF5 file */ int i; /* get user block size */ - if(( fcpl = H5Fget_create_plist(fid)) < 0) { + if ((fcpl = H5Fget_create_plist(fid)) < 0) { HGOTO_ERROR(H5E_tools_g, H5E_tools_min_id_g, "H5Fget_create_plist failed to retrieve file creation property list"); } - if(H5Pget_userblock(fcpl, &ub_size) < 0) { + if (H5Pget_userblock(fcpl, &ub_size) < 0) { HGOTO_ERROR(H5E_tools_g, H5E_tools_min_id_g, "H5Pget_userblock failed to retrieve userblock size"); } - if(H5Pclose(fcpl) < 0) { + if (H5Pclose(fcpl) < 0) { HGOTO_ERROR(H5E_tools_g, H5E_tools_min_id_g, "H5Pclose failed to close property list"); } /* open file */ - if((fh = HDopen(filename, O_RDONLY)) < 0) { + if ((fh = HDopen(filename, O_RDONLY)) < 0) { HGOTO_ERROR(H5E_tools_g, H5E_tools_min_id_g, "HDopen failed to open file <%s>", filename); } size = ub_size; /* read file */ - while(size > 0) { + while (size > 0) { ssize_t nread; /* # of bytes read */ char rbuf[USERBLOCK_XFER_SIZE]; /* buffer for reading */ /* read buffer */ - if(size > USERBLOCK_XFER_SIZE) + if (size > USERBLOCK_XFER_SIZE) nread = HDread(fh, rbuf, (size_t)USERBLOCK_XFER_SIZE); else nread = HDread(fh, rbuf, (size_t)size); - for(i = 0; i < nread; i++) { + for (i = 0; i < nread; i++) { printf("%c ", rbuf[i]); } printf("\n"); - if(nread < 0) { + if (nread < 0) { HGOTO_ERROR(H5E_tools_g, H5E_tools_min_id_g, "nread < 0"); } @@ -1488,7 +1488,7 @@ print_user_block(const char *filename, hid_t fid) } done: - if(fh > 0) + if (fh > 0) HDclose(fh); return; diff --git a/tools/src/h5repack/h5repack_refs.c b/tools/src/h5repack/h5repack_refs.c index 14294ea..7b610a3 100644 --- a/tools/src/h5repack/h5repack_refs.c +++ b/tools/src/h5repack/h5repack_refs.c @@ -145,7 +145,7 @@ int do_copy_refobjs(hid_t fidin, *------------------------------------------------------------------------- */ if(H5Tequal(mtype_id, H5T_STD_REF_OBJ)) { - hid_t refobj_id; + hid_t refobj_id = -1; hobj_ref_t *refbuf = NULL; /* buffer for object references */ hobj_ref_t *buf = NULL; const char* refname; @@ -221,7 +221,7 @@ int do_copy_refobjs(hid_t fidin, *------------------------------------------------------------------------- */ else if(H5Tequal(mtype_id, H5T_STD_REF_DSETREG)) { - hid_t refobj_id; + hid_t refobj_id = -1; hdset_reg_ref_t *refbuf = NULL; /* input buffer for region references */ hdset_reg_ref_t *buf = NULL; /* output buffer */ const char* refname; @@ -260,7 +260,7 @@ int do_copy_refobjs(hid_t fidin, * in the second traversal of the file */ if((refname = MapIdToName(refobj_id, travt)) != NULL) { - hid_t region_id; /* region id of the referenced dataset */ + hid_t region_id = -1; /* region id of the referenced dataset */ if((region_id = H5Rget_region(dset_in, H5R_DATASET_REGION, &buf[u])) < 0) HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Rget_region failed"); @@ -481,18 +481,16 @@ static int copy_refs_attr(hid_t loc_in, is_ref = (type_class == H5T_REFERENCE); if(type_class == H5T_VLEN ) { - hid_t base_type; + hid_t base_type = H5Tget_super(ftype_id); - base_type = H5Tget_super(ftype_id); is_ref_vlen = (H5Tget_class(base_type) == H5T_REFERENCE); msize = H5Tget_size(base_type); if (H5Tclose(base_type) < 0) H5TOOLS_INFO(H5E_tools_min_id_g, "H5Tclose base_type failed"); } else if(type_class == H5T_ARRAY ) { - hid_t base_type; + hid_t base_type = H5Tget_super(ftype_id); - base_type = H5Tget_super(ftype_id); is_ref_array = (H5Tget_class(base_type) == H5T_REFERENCE); msize = H5Tget_size(base_type); if (H5Tclose(base_type) < 0) @@ -573,9 +571,8 @@ static int copy_refs_attr(hid_t loc_in, unsigned array_rank = 0; hsize_t array_size = 1; hsize_t array_dims[H5S_MAX_RANK]; - hid_t base_type; + hid_t base_type = H5Tget_super(ftype_id); - base_type = H5Tget_super(ftype_id); msize = H5Tget_size(base_type); if (H5Tclose(base_type) < 0) H5TOOLS_INFO(H5E_tools_min_id_g, "H5Tclose base_type failed"); -- cgit v0.12 From 4c68000a23e699295e1caa4a66db6c739f53800d Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Mon, 23 Oct 2017 12:43:27 -0500 Subject: HDFFv-10297 Free buffer inside loop --- tools/src/h5repack/h5repack_copy.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tools/src/h5repack/h5repack_copy.c b/tools/src/h5repack/h5repack_copy.c index 585d27a..8e2e4f0 100644 --- a/tools/src/h5repack/h5repack_copy.c +++ b/tools/src/h5repack/h5repack_copy.c @@ -927,6 +927,11 @@ int do_copy_objects(hid_t fidin, hid_t fidout, trav_table_t *travt, if (TRUE == H5Tdetect_class(wtype_id, H5T_VLEN)) if (H5Dvlen_reclaim(wtype_id, f_space_id, H5P_DEFAULT, buf) < 0) HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Dvlen_reclaim failed"); + /* free */ + if (buf != NULL) { + HDfree(buf); + buf = NULL; + } } else { /* possibly not enough memory, read/write by hyperslabs */ size_t p_type_nbytes = msize; /*size of memory type */ -- cgit v0.12 From cb3eb13da469b8df90ed29a974f41e3999ac411d Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Tue, 24 Oct 2017 11:05:15 -0500 Subject: Fix typos --- tools/lib/h5tools.c | 10 +++++----- tools/src/h5repack/h5repack_copy.c | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/tools/lib/h5tools.c b/tools/lib/h5tools.c index 6ea5e47..89cb524 100644 --- a/tools/lib/h5tools.c +++ b/tools/lib/h5tools.c @@ -623,9 +623,9 @@ h5tools_count_ncols(const char *s) * * Purpose: Recursive check for any variable length data in given type. * - * Return: TRUE : type conatains any variable length data + * Return: TRUE : type contains any variable length data * FALSE : type doesn't contain any variable length data - * Negative value: error occur + * Negative value: failed *------------------------------------------------------------------------- */ htri_t @@ -652,9 +652,9 @@ done: * * Purpose: Recursive check for variable length string of a datatype. * - * Return: TRUE : type conatains any variable length string + * Return: TRUE : type contains any variable length string * FALSE : type doesn't contain any variable length string - * Negative value: error occur + * Negative value: failed *------------------------------------------------------------------------- */ htri_t @@ -1652,7 +1652,7 @@ render_bin_output_region_data_points(hid_t region_space, hid_t region_id, * Function: render_bin_output_region_points * * Purpose: Print some values from a dataset referenced by region points. - * This is a special case subfunction to dump a region reference using points. + * This is a special case function to dump a region reference using points. * * Return: False if the last dimension has been reached * True otherwise diff --git a/tools/src/h5repack/h5repack_copy.c b/tools/src/h5repack/h5repack_copy.c index 8e2e4f0..770e19b 100644 --- a/tools/src/h5repack/h5repack_copy.c +++ b/tools/src/h5repack/h5repack_copy.c @@ -1440,7 +1440,7 @@ void print_user_block(const char *filename, hid_t fid) { int ret_value = 0; - hid_t fh = -1; /* file handle */ + int fh = -1; /* file handle */ hsize_t ub_size; /* user block size */ hsize_t size; /* size read */ hid_t fcpl = -1; /* file creation property list ID for HDF5 file */ -- cgit v0.12 From 8e2bf9521c4f18e19cb9f27483c2d4335f12535d Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Tue, 24 Oct 2017 14:18:47 -0500 Subject: Fix typo --- tools/src/h5repack/h5repack_copy.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/src/h5repack/h5repack_copy.c b/tools/src/h5repack/h5repack_copy.c index 770e19b..b7ecc81 100644 --- a/tools/src/h5repack/h5repack_copy.c +++ b/tools/src/h5repack/h5repack_copy.c @@ -920,7 +920,7 @@ int do_copy_objects(hid_t fidin, hid_t fidout, trav_table_t *travt, if(H5Dread(dset_in, wtype_id, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf) < 0) HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Dread failed"); if(H5Dwrite(dset_out, wtype_id, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf) < 0) - HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Dread failed"); + HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Dwrite failed"); /* Check if we have VL data in the dataset's * datatype that must be reclaimed */ @@ -1011,7 +1011,7 @@ int do_copy_objects(hid_t fidin, hid_t fidout, trav_table_t *travt, if(H5Dread(dset_in, wtype_id, hslab_space, f_space_id, H5P_DEFAULT, hslab_buf) < 0) HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Dread failed"); if(H5Dwrite(dset_out, wtype_id, hslab_space, f_space_id, H5P_DEFAULT, hslab_buf) < 0) - HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Dread failed"); + HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Dwrite failed"); /* reclaim any VL memory, if necessary */ if (vl_data) -- cgit v0.12 From e9411e7d89fe1b3f077065b39a7d43153f13efb5 Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Wed, 25 Oct 2017 09:06:05 -0500 Subject: Fix test DEPENDS --- tools/test/perform/CMakeTests.cmake | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/tools/test/perform/CMakeTests.cmake b/tools/test/perform/CMakeTests.cmake index 2bd8d46..1f67abe 100644 --- a/tools/test/perform/CMakeTests.cmake +++ b/tools/test/perform/CMakeTests.cmake @@ -167,8 +167,7 @@ else () -P "${HDF_RESOURCES_EXT_DIR}/runTest.cmake" ) endif () -set_tests_properties (PERFORM_zip_perf PROPERTIES DEPENDS PERFORM_zip_perf_help) -set_tests_properties (PERFORM_zip_perf PROPERTIES DEPENDS "PERFORM_h5perform-clearall-objects") +set_tests_properties (PERFORM_zip_perf PROPERTIES DEPENDS "PERFORM_zip_perf_help;PERFORM_h5perform-clearall-objects") if (H5_HAVE_PARALLEL) add_test (NAME PERFORM_h5perf COMMAND ${MPIEXEC} ${MPIEXEC_PREFLAGS} ${MPIEXEC_NUMPROC_FLAG} ${MPIEXEC_MAX_NUMPROCS} ${MPIEXEC_POSTFLAGS} $) -- cgit v0.12 From 4384aaf8691060eb313e6b95e325068feff4aeb6 Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Wed, 25 Oct 2017 14:09:04 -0500 Subject: HDFFV-10297 Update release note and test platforms --- release_docs/RELEASE.txt | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/release_docs/RELEASE.txt b/release_docs/RELEASE.txt index 709b7b3..dbf1421 100644 --- a/release_docs/RELEASE.txt +++ b/release_docs/RELEASE.txt @@ -319,6 +319,7 @@ Bug Fixes since HDF5-1.10.0-patch1 release Modified H5Zfilter_avail and private function, H5Z_filter_avail. Moved check for plugin from public to private function. Updated H5P__set_filter due to change in H5Z_filter_avail. Updated tests. + Note that the output display of h5repack has changed. (ADB - 2017/10/10, HDFFV-10297) @@ -457,15 +458,20 @@ Supported Platforms Windows 7 Visual Studio 2012 w/ Intel Fortran 15 (cmake) Visual Studio 2013 w/ Intel Fortran 15 (cmake) Visual Studio 2015 w/ Intel Fortran 16 (cmake) - Cygwin(CYGWIN_NT-6.1 2.2.1(0.289/5/3) gcc(4.9.3) compiler and gfortran) - (cmake and autotools) Windows 7 x64 Visual Studio 2012 w/ Intel Fortran 15 (cmake) Visual Studio 2013 w/ Intel Fortran 15 (cmake) Visual Studio 2015 w/ Intel Fortran 16 (cmake) - Visual Studio 2015 w/ Intel Parallel Studio 2017 (cmake) + Visual Studio 2015 w/ Intel C, Fortran 2017 (cmake) + Visual Studio 2015 w/ MSMPI 8 (cmake) + Cygwin(CYGWIN_NT-6.1 2.8.0(0.309/5/3) + gcc and gfortran compilers (GCC 5.4.0) + (cmake and autotools) Windows 10 Visual Studio 2015 w/ Intel Fortran 16 (cmake) + Cygwin(CYGWIN_NT-6.1 2.8.0(0.309/5/3) + gcc and gfortran compilers (GCC 5.4.0) + (cmake and autotools) Windows 10 x64 Visual Studio 2015 w/ Intel Fortran 16 (cmake) -- cgit v0.12 From c899351124f97cdbeaa2b415765518bc22c0d1fd Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Wed, 25 Oct 2017 15:10:52 -0500 Subject: HDFFV-10297 - clarify note. --- release_docs/RELEASE.txt | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/release_docs/RELEASE.txt b/release_docs/RELEASE.txt index dbf1421..1af6d23 100644 --- a/release_docs/RELEASE.txt +++ b/release_docs/RELEASE.txt @@ -223,7 +223,7 @@ Bug Fixes since HDF5-1.10.0-patch1 release block size. (2) Fix other places in the library that call this routine to detect error routine. - + (HDFFV-10216, VC, 2017/08/30) - Fixes for paged aggregation @@ -247,7 +247,7 @@ Bug Fixes since HDF5-1.10.0-patch1 release The function H5VM_power2up() returns the next power of 2 for n. When n exceeds 2^63, it overflows and becomes 0 causing - the infinite looping. + the infinite looping. The fix ensures that the function checks for n >= 2^63 and returns 0. @@ -319,7 +319,10 @@ Bug Fixes since HDF5-1.10.0-patch1 release Modified H5Zfilter_avail and private function, H5Z_filter_avail. Moved check for plugin from public to private function. Updated H5P__set_filter due to change in H5Z_filter_avail. Updated tests. - Note that the output display of h5repack has changed. + Note, h5repack output display has changed to clarify the individual + steps of the repack process. The output indicates if an operation + applies to all objects. Lines with notation and no information + has removed. (ADB - 2017/10/10, HDFFV-10297) @@ -344,7 +347,7 @@ Bug Fixes since HDF5-1.10.0-patch1 release - h5repack - Add tests to h5repack.sh.in to verify options added for paged + Add tests to h5repack.sh.in to verify options added for paged aggregation work as expected. (VC, 2017/08/03) -- cgit v0.12 From ebc36841095eb9b7f69a8e8c31ba76732e58e902 Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Wed, 25 Oct 2017 15:50:27 -0500 Subject: HDFFV-10297 fix grammar --- release_docs/RELEASE.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/release_docs/RELEASE.txt b/release_docs/RELEASE.txt index 1af6d23..c99945a 100644 --- a/release_docs/RELEASE.txt +++ b/release_docs/RELEASE.txt @@ -322,7 +322,7 @@ Bug Fixes since HDF5-1.10.0-patch1 release Note, h5repack output display has changed to clarify the individual steps of the repack process. The output indicates if an operation applies to all objects. Lines with notation and no information - has removed. + have been removed. (ADB - 2017/10/10, HDFFV-10297) -- cgit v0.12 From e80027ab8981003215a10a4850c44f57fa343297 Mon Sep 17 00:00:00 2001 From: "M. Scot Breitenfeld" Date: Thu, 26 Oct 2017 10:36:52 -0500 Subject: fixed merge with develop issues --- src/H5PL.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/H5PL.c b/src/H5PL.c index be12db5..bd02bf3 100644 --- a/src/H5PL.c +++ b/src/H5PL.c @@ -209,13 +209,13 @@ done: *------------------------------------------------------------------------- */ herr_t -H5PLreplace(const char *plugin_path, unsigned int index) +H5PLreplace(const char *search_path, unsigned int index) { unsigned num_paths; /* Current number of stored paths */ herr_t ret_value = SUCCEED; /* Return value */ FUNC_ENTER_API(FAIL) - H5TRACE2("e", "*sIu", plugin_path, index); + H5TRACE2("e", "*sIu", search_path, index); /* Check args */ if (NULL == search_path) -- cgit v0.12 From 4e5fb959edfd9ddcd77fb91e672d36809151dc44 Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Thu, 26 Oct 2017 10:47:50 -0500 Subject: Fix char type --- release_docs/RELEASE.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/release_docs/RELEASE.txt b/release_docs/RELEASE.txt index c99945a..c92b6f5 100644 --- a/release_docs/RELEASE.txt +++ b/release_docs/RELEASE.txt @@ -143,7 +143,7 @@ New Features fulfill the original user request without encountering API errors. - (RAW – 2017/09/20, HDFFV-8839) + (RAW - 2017/09/20, HDFFV-8839) Fortran Library: ---------------- -- cgit v0.12 From a3e40025729fd8c3b2f0488d6745f579eb29c5db Mon Sep 17 00:00:00 2001 From: "M. Scot Breitenfeld" Date: Thu, 26 Oct 2017 15:23:48 -0500 Subject: manual fix from merge with develop --- COPYING | 2 +- src/H5PL.c | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/COPYING b/COPYING index 90aa75a..c668565 100644 --- a/COPYING +++ b/COPYING @@ -49,7 +49,7 @@ advised of the possibility of such damage. Limited portions of HDF5 were developed by Lawrence Berkeley National Laboratory (LBNL). LBNL's Copyright Notice and Licensing Terms can be found here: COPYING_LBNL_HDF5 file in this directory or at -https://support.hdfgroup.org/ftp/HDF5/releases/COPYING_LBNL_HDF5. +http://support.hdfgroup.org/ftp/HDF5/releases/COPYING_LBNL_HDF5. ----------------------------------------------------------------------------- ----------------------------------------------------------------------------- diff --git a/src/H5PL.c b/src/H5PL.c index bd02bf3..fc42554 100644 --- a/src/H5PL.c +++ b/src/H5PL.c @@ -54,6 +54,7 @@ /* Local Variables */ /*******************/ + /*------------------------------------------------------------------------- * Function: H5PLset_loading_state -- cgit v0.12 From 3acacea954a1021e7bd78e28a72be7a8ae3fafb9 Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Mon, 30 Oct 2017 11:45:11 -0500 Subject: New test requirement --- config/cmake/cacheinit.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/cmake/cacheinit.cmake b/config/cmake/cacheinit.cmake index d37c339..d5c5e52 100644 --- a/config/cmake/cacheinit.cmake +++ b/config/cmake/cacheinit.cmake @@ -29,7 +29,7 @@ set (HDF5_ENABLE_SZIP_SUPPORT ON CACHE BOOL "Use SZip Filter" FORCE) set (HDF5_ENABLE_SZIP_ENCODING ON CACHE BOOL "Use SZip Encoding" FORCE) -set (MPIEXEC_MAX_NUMPROCS "3" CACHE STRING "Minimum number of processes for HDF parallel tests" FORCE) +set (MPIEXEC_MAX_NUMPROCS "4" CACHE STRING "Minimum number of processes for HDF parallel tests" FORCE) set (HDF5_ENABLE_ALL_WARNINGS ON CACHE BOOL "Enable all warnings" FORCE) -- cgit v0.12 From 54187f92f4bd30388f8df9a4f2b54b189d779947 Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Tue, 31 Oct 2017 11:24:24 -0500 Subject: Update H5Zfilter_avail note --- release_docs/RELEASE.txt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/release_docs/RELEASE.txt b/release_docs/RELEASE.txt index 7a974eb..326053c 100644 --- a/release_docs/RELEASE.txt +++ b/release_docs/RELEASE.txt @@ -137,7 +137,7 @@ New Features file driver in HDF5 by previously having called H5Pset_fapl_mpio(). HDF5 parallel file operations which do not employ multiple ranks - e.g. specifiying MPI_COMM_SELF (whose MPI_Comm_size == 1) + e.g. specifiying MPI_COMM_SELF (whose MPI_Comm_size == 1) as opposed to MPI_COMM_WORLD, will not be affected by this optimization. Conversely, parallel file operations on subgroups of MPI_COMM_WORLD are allowed to be run in parallel with each @@ -239,7 +239,7 @@ Bug Fixes since HDF5-1.10.1 release Moved check for plugin from public to private function. Updated H5P__set_filter due to change in H5Z_filter_avail. Updated tests. - (ADB - 2017/10/10, HDFFV-10297) + (ADB - 2017/10/10, HDFFV-10297, HDFFV-10319) - Fix H5HL_offset_into() @@ -347,7 +347,7 @@ Bug Fixes since HDF5-1.10.1 release applies to all objects. Lines with notation and no information have been removed. - (ADB - 2017/10/10, HDFFV-10297) + (ADB - 2017/10/10, HDFFV-10297, HDFFV-10319) - h5repack -- cgit v0.12 From c1edb4ad89d228e5834a9ccca6ed3ae04b98cea4 Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Thu, 2 Nov 2017 10:14:14 -0500 Subject: HDFFV-10321 merge from develop --- CMakeLists.txt | 7 +- config/cmake/UseJava.cmake | 6 +- config/cmake/hdf5-config.cmake.in | 8 +- config/cmake_ext_mod/FindMPI.cmake | 1754 ++++++++++++++------ .../cmake_ext_mod/FindMPI/fortranparam_mpi.f90.in | 4 + config/cmake_ext_mod/FindMPI/libver_mpi.c | 19 + config/cmake_ext_mod/FindMPI/libver_mpi.f90.in | 7 + config/cmake_ext_mod/FindMPI/mpiver.f90.in | 10 + config/cmake_ext_mod/FindMPI/test_mpi.c | 37 + config/cmake_ext_mod/FindMPI/test_mpi.f90.in | 6 + fortran/CMakeLists.txt | 2 - fortran/examples/CMakeLists.txt | 2 - fortran/examples/CMakeTests.cmake | 4 +- fortran/src/CMakeLists.txt | 8 +- fortran/testpar/CMakeLists.txt | 4 +- fortran/testpar/CMakeTests.cmake | 2 +- release_docs/RELEASE.txt | 11 + src/CMakeLists.txt | 14 +- testpar/CMakeLists.txt | 4 +- testpar/CMakeTests.cmake | 4 +- tools/test/h5diff/CMakeTests.cmake | 4 +- tools/test/perform/CMakeTests.cmake | 4 +- 22 files changed, 1370 insertions(+), 551 deletions(-) create mode 100644 config/cmake_ext_mod/FindMPI/fortranparam_mpi.f90.in create mode 100644 config/cmake_ext_mod/FindMPI/libver_mpi.c create mode 100644 config/cmake_ext_mod/FindMPI/libver_mpi.f90.in create mode 100644 config/cmake_ext_mod/FindMPI/mpiver.f90.in create mode 100644 config/cmake_ext_mod/FindMPI/test_mpi.c create mode 100644 config/cmake_ext_mod/FindMPI/test_mpi.f90.in diff --git a/CMakeLists.txt b/CMakeLists.txt index 23452cd..2ec2b2d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -623,16 +623,15 @@ INCLUDE_DIRECTORIES (${HDF5_BINARY_DIR} ${HDF5_SRC_DIR} ${CMAKE_RUNTIME_OUTPUT_D set (CMAKE_MODULE_PATH ${HDF_RESOURCES_DIR} ${HDF_RESOURCES_EXT_DIR} ${CMAKE_MODULE_PATH}) option (HDF5_ENABLE_PARALLEL "Enable parallel build (requires MPI)" OFF) if (HDF5_ENABLE_PARALLEL) - include (FindMPI) - INCLUDE_DIRECTORIES (${MPI_C_INCLUDE_PATH}) + find_package(MPI REQUIRED) if (MPI_C_FOUND) set (H5_HAVE_PARALLEL 1) # MPI checks, only do these if MPI_C_FOUND is true, otherwise they always fail # and once set, they are cached as false and not regenerated set (CMAKE_REQUIRED_LIBRARIES "${MPI_C_LIBRARIES}" ) # Used by Fortran + MPI - CHECK_SYMBOL_EXISTS (MPI_Comm_c2f "${MPI_C_INCLUDE_PATH}/mpi.h" H5_HAVE_MPI_MULTI_LANG_Comm) - CHECK_SYMBOL_EXISTS (MPI_Info_c2f "${MPI_C_INCLUDE_PATH}/mpi.h" H5_HAVE_MPI_MULTI_LANG_Info) + CHECK_SYMBOL_EXISTS (MPI_Comm_c2f "${MPI_C_INCLUDE_DIRS}/mpi.h" H5_HAVE_MPI_MULTI_LANG_Comm) + CHECK_SYMBOL_EXISTS (MPI_Info_c2f "${MPI_C_INCLUDE_DIRS}/mpi.h" H5_HAVE_MPI_MULTI_LANG_Info) else () message (STATUS "Parallel libraries not found") endif () diff --git a/config/cmake/UseJava.cmake b/config/cmake/UseJava.cmake index 9b3bf02..52b37a9 100644 --- a/config/cmake/UseJava.cmake +++ b/config/cmake/UseJava.cmake @@ -482,6 +482,8 @@ function(add_jar _TARGET_NAME) else() get_filename_component(_add_jar_OUTPUT_DIR ${_add_jar_OUTPUT_DIR} ABSOLUTE) endif() + # ensure output directory exists + file (MAKE_DIRECTORY "${_add_jar_OUTPUT_DIR}") if (_add_jar_ENTRY_POINT) set(_ENTRY_POINT_OPTION e) @@ -516,7 +518,7 @@ function(add_jar _TARGET_NAME) set(CMAKE_JAVA_INCLUDE_PATH_FINAL "${CMAKE_JAVA_INCLUDE_PATH_FINAL}${CMAKE_JAVA_INCLUDE_FLAG_SEP}${JAVA_INCLUDE_DIR}") endforeach() - set(CMAKE_JAVA_CLASS_OUTPUT_PATH "${_add_jar_OUTPUT_DIR}${CMAKE_FILES_DIRECTORY}/${_TARGET_NAME}.dir") + set(CMAKE_JAVA_CLASS_OUTPUT_PATH "${CMAKE_CURRENT_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/${_TARGET_NAME}.dir") set(_JAVA_TARGET_OUTPUT_NAME "${_TARGET_NAME}.jar") if (_add_jar_OUTPUT_NAME AND _add_jar_VERSION) @@ -547,7 +549,7 @@ function(add_jar _TARGET_NAME) list(APPEND _JAVA_COMPILE_FILELISTS ${_JAVA_FULL}) elseif (_JAVA_EXT MATCHES ".java") - file(RELATIVE_PATH _JAVA_REL_BINARY_PATH ${_add_jar_OUTPUT_DIR} ${_JAVA_FULL}) + file(RELATIVE_PATH _JAVA_REL_BINARY_PATH ${CMAKE_CURRENT_BINARY_DIR} ${_JAVA_FULL}) file(RELATIVE_PATH _JAVA_REL_SOURCE_PATH ${CMAKE_CURRENT_SOURCE_DIR} ${_JAVA_FULL}) string(LENGTH ${_JAVA_REL_BINARY_PATH} _BIN_LEN) string(LENGTH ${_JAVA_REL_SOURCE_PATH} _SRC_LEN) diff --git a/config/cmake/hdf5-config.cmake.in b/config/cmake/hdf5-config.cmake.in index 712dc05..01c27df 100644 --- a/config/cmake/hdf5-config.cmake.in +++ b/config/cmake/hdf5-config.cmake.in @@ -50,8 +50,12 @@ set (${HDF5_PACKAGE_NAME}_TOOLSET "@CMAKE_GENERATOR_TOOLSET@") # Dependencies #----------------------------------------------------------------------------- if (${HDF5_PACKAGE_NAME}_ENABLE_PARALLEL) - set (${HDF5_PACKAGE_NAME}_MPI_C_INCLUDE_PATH "@MPI_C_INCLUDE_PATH@") + set (${HDF5_PACKAGE_NAME}_MPI_C_INCLUDE_PATH "@MPI_C_INCLUDE_DIRS@") set (${HDF5_PACKAGE_NAME}_MPI_C_LIBRARIES "@MPI_C_LIBRARIES@") + if (${HDF5_PACKAGE_NAME}_BUILD_FORTRAN) + set (${HDF5_PACKAGE_NAME}_MPI_Fortran_INCLUDE_PATH "@MPI_Fortran_INCLUDE_DIRS@") + set (${HDF5_PACKAGE_NAME}_MPI_Fortran_LIBRARIES "@MPI_Fortran_LIBRARIES@") + endif () endif () if (${HDF5_PACKAGE_NAME}_BUILD_JAVA) @@ -67,7 +71,7 @@ endif () #----------------------------------------------------------------------------- # Directories #----------------------------------------------------------------------------- -set (${HDF5_PACKAGE_NAME}_INCLUDE_DIR "@PACKAGE_INCLUDE_INSTALL_DIR@" "${${HDF5_PACKAGE_NAME}_MPI_C_INCLUDE_PATH}") +set (${HDF5_PACKAGE_NAME}_INCLUDE_DIR "@PACKAGE_INCLUDE_INSTALL_DIR@" "${${HDF5_PACKAGE_NAME}_MPI_C_INCLUDE_DIRS}") set (${HDF5_PACKAGE_NAME}_SHARE_DIR "@PACKAGE_SHARE_INSTALL_DIR@") set_and_check (${HDF5_PACKAGE_NAME}_BUILD_DIR "@PACKAGE_CURRENT_BUILD_DIR@") diff --git a/config/cmake_ext_mod/FindMPI.cmake b/config/cmake_ext_mod/FindMPI.cmake index f566ade..8084472 100644 --- a/config/cmake_ext_mod/FindMPI.cmake +++ b/config/cmake_ext_mod/FindMPI.cmake @@ -4,27 +4,45 @@ # FindMPI # ------- # -# Find a Message Passing Interface (MPI) implementation +# Find a Message Passing Interface (MPI) implementation. # # The Message Passing Interface (MPI) is a library used to write # high-performance distributed-memory parallel applications, and is # typically deployed on a cluster. MPI is a standard interface (defined # by the MPI forum) for which many implementations are available. # -# Variables -# ^^^^^^^^^ +# Variables for using MPI +# ^^^^^^^^^^^^^^^^^^^^^^^ +# +# The module exposes the components ``C``, ``CXX``, ``MPICXX`` and ``Fortran``. +# Each of these controls the various MPI languages to search for. +# The difference between ``CXX`` and ``MPICXX`` is that ``CXX`` refers to the +# MPI C API being usable from C++, whereas ``MPICXX`` refers to the MPI-2 C++ API +# that was removed again in MPI-3. +# +# Depending on the enabled components the following variables will be set: +# +# ``MPI_FOUND`` +# Variable indicating that MPI settings for all requested languages have been found. +# If no components are specified, this is true if MPI settings for all enabled languages +# were detected. Note that the ``MPICXX`` component does not affect this variable. +# ``MPI_VERSION`` +# Minimal version of MPI detected among the requested languages, or all enabled languages +# if no components were specified. # # This module will set the following variables per language in your # project, where ```` is one of C, CXX, or Fortran: # # ``MPI__FOUND`` -# Variable indicating the MPI settings for ```` were found. +# Variable indicating the MPI settings for ```` were found and that +# simple MPI test programs compile with the provided settings. # ``MPI__COMPILER`` -# MPI Compiler wrapper for ````. -# ``MPI__COMPILE_FLAGS`` -# Compilation flags for MPI programs, separated by spaces. -# This is *not* a :ref:`;-list `. -# ``MPI__INCLUDE_PATH`` +# MPI compiler for ```` if such a program exists. +# ``MPI__COMPILE_OPTIONS`` +# Compilation options for MPI programs in ````, given as a :ref:`;-list `. +# ``MPI__COMPILE_DEFINITIONS`` +# Compilation definitions for MPI programs in ````, given as a :ref:`;-list `. +# ``MPI__INCLUDE_DIRS`` # Include path(s) for MPI header. # ``MPI__LINK_FLAGS`` # Linker flags for MPI programs. @@ -36,53 +54,172 @@ # ``MPI::MPI_`` # Target for using MPI from ````. # -# Additionally, FindMPI sets the following variables for running MPI -# programs from the command line: +# The following variables indicating which bindings are present will be defined: # -# ``MPIEXEC`` -# Executable for running MPI programs, if provided. +# ``MPI_MPICXX_FOUND`` +# Variable indicating whether the MPI-2 C++ bindings are present (introduced in MPI-2, removed with MPI-3). +# ``MPI_Fortran_HAVE_F77_HEADER`` +# True if the Fortran 77 header ``mpif.h`` is available. +# ``MPI_Fortran_HAVE_F90_MODULE`` +# True if the Fortran 90 module ``mpi`` can be used for accessing MPI (MPI-2 and higher only). +# ``MPI_Fortran_HAVE_F08_MODULE`` +# True if the Fortran 2008 ``mpi_f08`` is available to MPI programs (MPI-3 and higher only). +# +# If possible, the MPI version will be determined by this module. The facilities to detect the MPI version +# were introduced with MPI-1.2, and therefore cannot be found for older MPI versions. +# +# ``MPI__VERSION_MAJOR`` +# Major version of MPI implemented for ```` by the MPI distribution. +# ``MPI__VERSION_MINOR`` +# Minor version of MPI implemented for ```` by the MPI distribution. +# ``MPI__VERSION`` +# MPI version implemented for ```` by the MPI distribution. +# +# Note that there's no variable for the C bindings being accessible through ``mpi.h``, since the MPI standards +# always have required this binding to work in both C and C++ code. +# +# For running MPI programs, the module sets the following variables +# +# ``MPIEXEC_EXECUTABLE`` +# Executable for running MPI programs, if such exists. # ``MPIEXEC_NUMPROC_FLAG`` -# Flag to pass to ``MPIEXEC`` before giving it the number of processors to run on. +# Flag to pass to ``mpiexec`` before giving it the number of processors to run on. # ``MPIEXEC_MAX_NUMPROCS`` # Number of MPI processors to utilize. Defaults to the number # of processors detected on the host system. # ``MPIEXEC_PREFLAGS`` -# Flags to pass to ``MPIEXEC`` directly before the executable to run. +# Flags to pass to ``mpiexec`` directly before the executable to run. # ``MPIEXEC_POSTFLAGS`` -# Flags to pass to ``MPIEXEC`` after other flags. +# Flags to pass to ``mpiexec`` after other flags. +# +# Variables for locating MPI +# ^^^^^^^^^^^^^^^^^^^^^^^^^^ +# +# This module performs a three step search for an MPI implementation: +# +# 1. Check if the compiler has MPI support built-in. This is the case if the user passed a +# compiler wrapper as ``CMAKE__COMPILER`` or if they're on a Cray system. +# 2. Attempt to find an MPI compiler wrapper and determine the compiler information from it. +# 3. Try to find an MPI implementation that does not ship such a wrapper by guessing settings. +# Currently, only Microsoft MPI and MPICH2 on Windows are supported. +# +# For controlling the second step, the following variables may be set: +# +# ``MPI__COMPILER`` +# Search for the specified compiler wrapper and use it. +# ``MPI__COMPILER_FLAGS`` +# Flags to pass to the MPI compiler wrapper during interrogation. Some compiler wrappers +# support linking debug or tracing libraries if a specific flag is passed and this variable +# may be used to obtain them. +# ``MPI_COMPILER_FLAGS`` +# Used to initialize ``MPI__COMPILER_FLAGS`` if no language specific flag has been given. +# Empty by default. +# ``MPI_EXECUTABLE_SUFFIX`` +# A suffix which is appended to all names that are being looked for. For instance you may set this +# to ``.mpich`` or ``.openmpi`` to prefer the one or the other on Debian and its derivatives. +# +# In order to control the guessing step, the following variable may be set: # -# Usage -# ^^^^^ +# ``MPI_GUESS_LIBRARY_NAME`` +# Valid values are ``MSMPI`` and ``MPICH2``. If set, only the given library will be searched for. +# By default, ``MSMPI`` will be preferred over ``MPICH2`` if both are available. +# This also sets ``MPI_SKIP_COMPILER_WRAPPER`` to ``true``, which may be overridden. # -# To use this module, call ``find_package(MPI)``. If you are happy with the -# auto-detected configuration for your language, then you're done. If -# not, you have two options: +# Each of the search steps may be skipped with the following control variables: # -# 1. Set ``MPI__COMPILER`` to the MPI wrapper (e.g. ``mpicc``) of your -# choice and reconfigure. FindMPI will attempt to determine all the -# necessary variables using *that* compiler's compile and link flags. -# 2. If this fails, or if your MPI implementation does not come with -# a compiler wrapper, then set both ``MPI__LIBRARIES`` and -# ``MPI__INCLUDE_PATH``. You may also set any other variables -# listed above, but these two are required. This will circumvent -# autodetection entirely. +# ``MPI_ASSUME_NO_BUILTIN_MPI`` +# If true, the module assumes that the compiler itself does not provide an MPI implementation and +# skips to step 2. +# ``MPI_SKIP_COMPILER_WRAPPER`` +# If true, no compiler wrapper will be searched for. +# ``MPI_SKIP_GUESSING`` +# If true, the guessing step will be skipped. # -# When configuration is successful, ``MPI__COMPILER`` will be set to -# the compiler wrapper for ````, if it was found. ``MPI__FOUND`` -# and other variables above will be set if any MPI implementation was -# found for ````, regardless of whether a compiler was found. +# Additionally, the following control variable is available to change search behavior: # -# When using ``MPIEXEC`` to execute MPI applications, you should typically -# use all of the ``MPIEXEC`` flags as follows: +# ``MPI_CXX_SKIP_MPICXX`` +# Add some definitions that will disable the MPI-2 C++ bindings. +# Currently supported are MPICH, Open MPI, Platform MPI and derivatives thereof, +# for example MVAPICH or Intel MPI. +# +# If the find procedure fails for a variable ``MPI__WORKS``, then the settings detected by or passed to +# the module did not work and even a simple MPI test program failed to compile. +# +# If all of these parameters were not sufficient to find the right MPI implementation, a user may +# disable the entire autodetection process by specifying both a list of libraries in ``MPI__LIBRARIES`` +# and a list of include directories in ``MPI__ADDITIONAL_INCLUDE_DIRS``. +# Any other variable may be set in addition to these two. The module will then validate the MPI settings and store the +# settings in the cache. +# +# Cache variables for MPI +# ^^^^^^^^^^^^^^^^^^^^^^^ +# +# The variable ``MPI__INCLUDE_DIRS`` will be assembled from the following variables. +# For C and CXX: +# +# ``MPI__HEADER_DIR`` +# Location of the ``mpi.h`` header on disk. +# +# For Fortran: +# +# ``MPI_Fortran_F77_HEADER_DIR`` +# Location of the Fortran 77 header ``mpif.h``, if it exists. +# ``MPI_Fortran_MODULE_DIR`` +# Location of the ``mpi`` or ``mpi_f08`` modules, if available. +# +# For all languages the following variables are additionally considered: +# +# ``MPI__ADDITIONAL_INCLUDE_DIRS`` +# A :ref:`;-list ` of paths needed in addition to the normal include directories. +# ``MPI__INCLUDE_DIR`` +# Path variables for include folders referred to by ````. +# ``MPI__ADDITIONAL_INCLUDE_VARS`` +# A :ref:`;-list ` of ```` that will be added to the include locations of ````. +# +# The variable ``MPI__LIBRARIES`` will be assembled from the following variables: +# +# ``MPI__LIBRARY`` +# The location of a library called ```` for use with MPI. +# ``MPI__LIB_NAMES`` +# A :ref:`;-list ` of ```` that will be added to the include locations of ````. +# +# Usage of mpiexec +# ^^^^^^^^^^^^^^^^ +# +# When using ``MPIEXEC_EXECUTABLE`` to execute MPI applications, you should typically +# use all of the ``MPIEXEC_EXECUTABLE`` flags as follows: # # :: # -# ${MPIEXEC} ${MPIEXEC_NUMPROC_FLAG} ${MPIEXEC_MAX_NUMPROCS} +# ${MPIEXEC_EXECUTABLE} ${MPIEXEC_NUMPROC_FLAG} ${MPIEXEC_MAX_NUMPROCS} # ${MPIEXEC_PREFLAGS} EXECUTABLE ${MPIEXEC_POSTFLAGS} ARGS # # where ``EXECUTABLE`` is the MPI program, and ``ARGS`` are the arguments to # pass to the MPI program. # +# Advanced variables for using MPI +# ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +# +# The module can perform some advanced feature detections upon explicit request. +# +# **Important notice:** The following checks cannot be performed without *executing* an MPI test program. +# Consider the special considerations for the behavior of :command:`try_run` during cross compilation. +# Moreover, running an MPI program can cause additional issues, like a firewall notification on some systems. +# You should only enable these detections if you absolutely need the information. +# +# If the following variables are set to true, the respective search will be performed: +# +# ``MPI_DETERMINE_Fortran_CAPABILITIES`` +# Determine for all available Fortran bindings what the values of ``MPI_SUBARRAYS_SUPPORTED`` and +# ``MPI_ASYNC_PROTECTS_NONBLOCKING`` are and make their values available as ``MPI_Fortran__SUBARRAYS`` +# and ``MPI_Fortran__ASYNCPROT``, where ```` is one of ``F77_HEADER``, ``F90_MODULE`` and +# ``F08_MODULE``. +# ``MPI_DETERMINE_LIBRARY_VERSION`` +# For each language, find the output of ``MPI_Get_library_version`` and make it available as ``MPI__LIBRARY_VERSION``. +# This information is usually tied to the runtime component of an MPI implementation and might differ depending on ````. +# Note that the return value is entirely implementation defined. This information might be used to identify +# the MPI vendor and for example pick the correct one of multiple third party binaries that matches the MPI vendor. +# # Backward Compatibility # ^^^^^^^^^^^^^^^^^^^^^^ # @@ -91,54 +228,62 @@ # # :: # -# MPI_FOUND MPI_COMPILER MPI_LIBRARY -# MPI_COMPILE_FLAGS MPI_INCLUDE_PATH MPI_EXTRA_LIBRARY -# MPI_LINK_FLAGS MPI_LIBRARIES +# MPI_COMPILER MPI_LIBRARY MPI_EXTRA_LIBRARY +# MPI_COMPILE_FLAGS MPI_INCLUDE_PATH MPI_LINK_FLAGS +# MPI_LIBRARIES # # In new projects, please use the ``MPI__XXX`` equivalents. +# Additionally, the following variables are deprecated: +# +# ``MPI__COMPILE_FLAGS`` +# Use ``MPI__COMPILE_OPTIONS`` and ``MPI__COMPILE_DEFINITIONS`` instead. +# ``MPI__INCLUDE_PATH`` +# For consumption use ``MPI__INCLUDE_DIRS`` and for specifying folders use ``MPI__ADDITIONAL_INCLUDE_DIRS`` instead. +# ``MPIEXEC`` +# Use ``MPIEXEC_EXECUTABLE`` instead. + +cmake_policy(PUSH) +cmake_policy(SET CMP0057 NEW) # if IN_LIST # include this to handle the QUIETLY and REQUIRED arguments include(${CMAKE_ROOT}/Modules/FindPackageHandleStandardArgs.cmake) include(GetPrerequisites) -# -# This part detects MPI compilers, attempting to wade through the mess of compiler names in -# a sensible way. -# -# The compilers are detected in this order: -# -# 1. Try to find the most generic available MPI compiler, as this is usually set up by -# cluster admins, e.g. if plain old mpicc is available, we'll use it and assume it's -# the right compiler. -# -# 2. If a generic mpicc is NOT found, then we attempt to find one that matches -# CMAKE__COMPILER_ID. e.g. if you are using XL compilers, we'll try to find mpixlc -# and company, but not mpiicc. This hopefully prevents toolchain mismatches. -# -# If you want to force a particular MPI compiler other than what we autodetect (e.g. if you -# want to compile regular stuff with GNU and parallel stuff with Intel), you can always set -# your favorite MPI__COMPILER explicitly and this stuff will be ignored. -# - -# Start out with the generic MPI compiler names, as these are most commonly used. -set(_MPI_C_COMPILER_NAMES mpicc mpcc mpicc_r mpcc_r mpicc.bat) -set(_MPI_CXX_COMPILER_NAMES mpicxx mpiCC mpcxx mpCC mpic++ mpc++ - mpicxx_r mpiCC_r mpcxx_r mpCC_r mpic++_r mpc++_r - mpicxx.bat) -set(_MPI_Fortran_COMPILER_NAMES mpif95 mpif95_r mpf95 mpf95_r +# Generic compiler names +set(_MPI_C_GENERIC_COMPILER_NAMES mpicc mpcc mpicc_r mpcc_r) +set(_MPI_CXX_GENERIC_COMPILER_NAMES mpicxx mpiCC mpcxx mpCC mpic++ mpc++ + mpicxx_r mpiCC_r mpcxx_r mpCC_r mpic++_r mpc++_r) +set(_MPI_Fortran_GENERIC_COMPILER_NAMES mpif95 mpif95_r mpf95 mpf95_r mpif90 mpif90_r mpf90 mpf90_r - mpif77 mpif77_r mpf77 mpf77_r) + mpif77 mpif77_r mpf77 mpf77_r + mpifc) # GNU compiler names set(_MPI_GNU_C_COMPILER_NAMES mpigcc mpgcc mpigcc_r mpgcc_r) -set(_MPI_GNU_CXX_COMPILER_NAMES mpig++ mpg++ mpig++_r mpg++_r) +set(_MPI_GNU_CXX_COMPILER_NAMES mpig++ mpg++ mpig++_r mpg++_r mpigxx) set(_MPI_GNU_Fortran_COMPILER_NAMES mpigfortran mpgfortran mpigfortran_r mpgfortran_r mpig77 mpig77_r mpg77 mpg77_r) -# Intel MPI compiler names -set(_MPI_Intel_C_COMPILER_NAMES mpiicc mpiicc.bat) -set(_MPI_Intel_CXX_COMPILER_NAMES mpiicpc mpiicxx mpiic++ mpiiCC mpiicpc.bat) -set(_MPI_Intel_Fortran_COMPILER_NAMES mpiifort mpiif95 mpiif90 mpiif77 mpiifort.bat) +# Intel MPI compiler names on Windows +if(WIN32) + list(APPEND _MPI_C_GENERIC_COMPILER_NAMES mpicc.bat) + list(APPEND _MPI_CXX_GENERIC_COMPILER_NAMES mpicxx.bat) + list(APPEND _MPI_Fortran_GENERIC_COMPILER_NAMES mpifc.bat) + + # Intel MPI compiler names + set(_MPI_Intel_C_COMPILER_NAMES mpiicc.bat) + set(_MPI_Intel_CXX_COMPILER_NAMES mpiicpc.bat) + set(_MPI_Intel_Fortran_COMPILER_NAMES mpiifort.bat mpif77.bat mpif90.bat) + + # Intel MPI compiler names for MSMPI + set(_MPI_MSVC_C_COMPILER_NAMES mpicl.bat) + set(_MPI_MSVC_CXX_COMPILER_NAMES mpicl.bat) +else() + # Intel compiler names + set(_MPI_Intel_C_COMPILER_NAMES mpiicc) + set(_MPI_Intel_CXX_COMPILER_NAMES mpiicpc mpiicxx mpiic++) + set(_MPI_Intel_Fortran_COMPILER_NAMES mpiifort mpiif95 mpiif90 mpiif77) +endif() # PGI compiler names set(_MPI_PGI_C_COMPILER_NAMES mpipgcc mppgcc) @@ -154,548 +299,1127 @@ set(_MPI_XL_Fortran_COMPILER_NAMES mpixlf95 mpixlf95_r mpxlf95 mpxlf95 mpixlf77 mpixlf77_r mpxlf77 mpxlf77_r mpixlf mpixlf_r mpxlf mpxlf_r) -# append vendor-specific compilers to the list if we either don't know the compiler id, -# or if we know it matches the regular compiler. -foreach (lang C CXX Fortran) - foreach (id GNU Intel PGI XL) - if (NOT CMAKE_${lang}_COMPILER_ID OR CMAKE_${lang}_COMPILER_ID STREQUAL id) - list(APPEND _MPI_${lang}_COMPILER_NAMES ${_MPI_${id}_${lang}_COMPILER_NAMES}) +# Prepend vendor-specific compiler wrappers to the list. If we don't know the compiler, +# attempt all of them. +# By attempting vendor-specific compiler names first, we should avoid situations where the compiler wrapper +# stems from a proprietary MPI and won't know which compiler it's being used for. For instance, Intel MPI +# controls its settings via the I_MPI_CC environment variables if the generic name is being used. +# If we know which compiler we're working with, we can use the most specialized wrapper there is in order to +# pick up the right settings for it. +foreach (LANG IN ITEMS C CXX Fortran) + set(_MPI_${LANG}_COMPILER_NAMES "") + foreach (id IN ITEMS GNU Intel MSVC PGI XL) + if (NOT CMAKE_${LANG}_COMPILER_ID OR CMAKE_${LANG}_COMPILER_ID STREQUAL id) + list(APPEND _MPI_${LANG}_COMPILER_NAMES ${_MPI_${id}_${LANG}_COMPILER_NAMES}${MPI_EXECUTABLE_SUFFIX}) endif() - unset(_MPI_${id}_${lang}_COMPILER_NAMES) # clean up the namespace here + unset(_MPI_${id}_${LANG}_COMPILER_NAMES) endforeach() + list(APPEND _MPI_${LANG}_COMPILER_NAMES ${_MPI_${LANG}_GENERIC_COMPILER_NAMES}${MPI_EXECUTABLE_SUFFIX}) + unset(_MPI_${LANG}_GENERIC_COMPILER_NAMES) endforeach() +# Names to try for mpiexec +# Only mpiexec commands are guaranteed to behave as described in the standard, +# mpirun commands are not covered by the standard in any way whatsoever. +# lamexec is the executable for LAM/MPI, srun is for SLURM or Open MPI with SLURM support. +# srun -n X is however a valid command, so it behaves 'like' mpiexec. +set(_MPIEXEC_NAMES_BASE mpiexec mpiexec.hydra mpiexec.mpd mpirun lamexec srun) -# Names to try for MPI exec -set(_MPI_EXEC_NAMES mpiexec mpirun lamexec srun) - -# Grab the path to MPI from the registry if we're on windows. -set(_MPI_PREFIX_PATH) -if(WIN32) - # MSMPI - file(TO_CMAKE_PATH "$ENV{MSMPI_BIN}" msmpi_bin_path) # The default path ends with a '\' and doesn't mix with ';' when appending. - list(APPEND _MPI_PREFIX_PATH "${msmpi_bin_path}") - unset(msmpi_bin_path) - list(APPEND _MPI_PREFIX_PATH "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\MPI;InstallRoot]/Bin") - list(APPEND _MPI_PREFIX_PATH "$ENV{MSMPI_INC}/..") # The SDK is installed separately from the runtime - # MPICH - list(APPEND _MPI_PREFIX_PATH "[HKEY_LOCAL_MACHINE\\SOFTWARE\\MPICH\\SMPD;binary]/..") - list(APPEND _MPI_PREFIX_PATH "[HKEY_LOCAL_MACHINE\\SOFTWARE\\MPICH2;Path]") - list(APPEND _MPI_PREFIX_PATH "$ENV{ProgramW6432}/MPICH2/") - # INTEL MPI - list(APPEND _MPI_PREFIX_PATH "$ENV{I_MPI_ROOT}/intel64/") - -endif() - -# Build a list of prefixes to search for MPI. -foreach(SystemPrefixDir ${CMAKE_SYSTEM_PREFIX_PATH}) - foreach(MpiPackageDir ${_MPI_PREFIX_PATH}) - if(EXISTS ${SystemPrefixDir}/${MpiPackageDir}) - list(APPEND _MPI_PREFIX_PATH "${SystemPrefixDir}/${MpiPackageDir}") - endif() - endforeach() +unset(_MPIEXEC_NAMES) +foreach(_MPIEXEC_NAME IN LISTS _MPIEXEC_NAMES_BASE) + list(APPEND _MPIEXEC_NAMES "${_MPIEXEC_NAME}${MPI_EXECUTABLE_SUFFIX}") endforeach() +unset(_MPIEXEC_NAMES_BASE) -function (_mpi_check_compiler compiler options cmdvar resvar) +function (_MPI_check_compiler LANG QUERY_FLAG OUTPUT_VARIABLE RESULT_VARIABLE) + if(DEFINED MPI_${LANG}_COMPILER_FLAGS) + separate_arguments(_MPI_COMPILER_WRAPPER_OPTIONS NATIVE_COMMAND "${MPI_${LANG}_COMPILER_FLAGS}") + else() + separate_arguments(_MPI_COMPILER_WRAPPER_OPTIONS NATIVE_COMMAND "${MPI_COMPILER_FLAGS}") + endif() execute_process( - COMMAND "${compiler}" ${options} - OUTPUT_VARIABLE cmdline OUTPUT_STRIP_TRAILING_WHITESPACE - ERROR_VARIABLE cmdline ERROR_STRIP_TRAILING_WHITESPACE - RESULT_VARIABLE success) - # Intel MPI 5.0.1 will return a zero return code even when the - # argument to the MPI compiler wrapper is unknown. Attempt to - # catch this case. - if(cmdline MATCHES "undefined reference" OR cmdline MATCHES "unrecognized") - set(success 255 ) - endif() - set(${cmdvar} "${cmdline}" PARENT_SCOPE) - set(${resvar} "${success}" PARENT_SCOPE) + COMMAND ${MPI_${LANG}_COMPILER} ${_MPI_COMPILER_WRAPPER_OPTIONS} ${QUERY_FLAG} + OUTPUT_VARIABLE WRAPPER_OUTPUT OUTPUT_STRIP_TRAILING_WHITESPACE + ERROR_VARIABLE WRAPPER_OUTPUT ERROR_STRIP_TRAILING_WHITESPACE + RESULT_VARIABLE WRAPPER_RETURN) + # Some compiler wrappers will yield spurious zero return values, for example + # Intel MPI tolerates unknown arguments and if the MPI wrappers loads a shared + # library that has invalid or missing version information there would be warning + # messages emitted by ld.so in the compiler output. In either case, we'll treat + # the output as invalid. + if("${WRAPPER_OUTPUT}" MATCHES "undefined reference|unrecognized|need to set|no version information available") + set(WRAPPER_RETURN 255) + endif() + # Ensure that no error output might be passed upwards. + if(NOT WRAPPER_RETURN EQUAL 0) + unset(WRAPPER_OUTPUT) + endif() + set(${OUTPUT_VARIABLE} "${WRAPPER_OUTPUT}" PARENT_SCOPE) + set(${RESULT_VARIABLE} "${WRAPPER_RETURN}" PARENT_SCOPE) endfunction() -# -# interrogate_mpi_compiler(lang try_libs) -# -# Attempts to extract compiler and linker args from an MPI compiler. The arguments set -# by this function are: -# -# MPI__INCLUDE_PATH MPI__LINK_FLAGS MPI__FOUND -# MPI__COMPILE_FLAGS MPI__LIBRARIES -# -# MPI__COMPILER must be set beforehand to the absolute path to an MPI compiler for -# . Additionally, MPI__INCLUDE_PATH and MPI__LIBRARIES may be set -# to skip autodetection. -# -# If try_libs is TRUE, this will also attempt to find plain MPI libraries in the usual -# way. In general, this is not as effective as interrogating the compilers, as it -# ignores language-specific flags and libraries. However, some MPI implementations -# (Windows implementations) do not have compiler wrappers, so this approach must be used. -# -function (interrogate_mpi_compiler lang try_libs) - # MPI_${lang}_NO_INTERROGATE will be set to a compiler name when the *regular* compiler was - # discovered to be the MPI compiler. This happens on machines like the Cray XE6 that use - # modules to set cc, CC, and ftn to the MPI compilers. If the user force-sets another MPI - # compiler, MPI_${lang}_COMPILER won't be equal to MPI_${lang}_NO_INTERROGATE, and we'll - # inspect that compiler anew. This allows users to set new compilers w/o rm'ing cache. - string(COMPARE NOTEQUAL "${MPI_${lang}_NO_INTERROGATE}" "${MPI_${lang}_COMPILER}" interrogate) - - # If MPI is set already in the cache, don't bother with interrogating the compiler. - if (interrogate AND ((NOT MPI_${lang}_INCLUDE_PATH) OR (NOT MPI_${lang}_LIBRARIES))) - if (MPI_${lang}_COMPILER) - # Check whether the -showme:compile option works. This indicates that we have either OpenMPI - # or a newer version of LAM-MPI, and implies that -showme:link will also work. - _mpi_check_compiler("${MPI_${lang}_COMPILER}" "-showme:compile" MPI_COMPILE_CMDLINE MPI_COMPILER_RETURN) - if (MPI_COMPILER_RETURN EQUAL 0) - # If we appear to have -showme:compile, then we should - # also have -showme:link. Try it. - execute_process( - COMMAND ${MPI_${lang}_COMPILER} -showme:link - OUTPUT_VARIABLE MPI_LINK_CMDLINE OUTPUT_STRIP_TRAILING_WHITESPACE - ERROR_VARIABLE MPI_LINK_CMDLINE ERROR_STRIP_TRAILING_WHITESPACE - RESULT_VARIABLE MPI_COMPILER_RETURN) - - if (MPI_COMPILER_RETURN EQUAL 0) - # We probably have -showme:incdirs and -showme:libdirs as well, - # so grab that while we're at it. - execute_process( - COMMAND ${MPI_${lang}_COMPILER} -showme:incdirs - OUTPUT_VARIABLE MPI_INCDIRS OUTPUT_STRIP_TRAILING_WHITESPACE - ERROR_VARIABLE MPI_INCDIRS ERROR_STRIP_TRAILING_WHITESPACE) - - execute_process( - COMMAND ${MPI_${lang}_COMPILER} -showme:libdirs - OUTPUT_VARIABLE MPI_LIBDIRS OUTPUT_STRIP_TRAILING_WHITESPACE - ERROR_VARIABLE MPI_LIBDIRS ERROR_STRIP_TRAILING_WHITESPACE) +function (_MPI_interrogate_compiler lang) + unset(MPI_COMPILE_CMDLINE) + unset(MPI_LINK_CMDLINE) + + unset(MPI_COMPILE_OPTIONS_WORK) + unset(MPI_COMPILE_DEFINITIONS_WORK) + unset(MPI_INCLUDE_DIRS_WORK) + unset(MPI_LINK_FLAGS_WORK) + unset(MPI_LIB_NAMES_WORK) + unset(MPI_LIB_FULLPATHS_WORK) + + # Check whether the -showme:compile option works. This indicates that we have either Open MPI + # or a newer version of LAM/MPI, and implies that -showme:link will also work. + # Open MPI also supports -show, but separates linker and compiler information + _MPI_check_compiler(${LANG} "-showme:compile" MPI_COMPILE_CMDLINE MPI_COMPILER_RETURN) + if (MPI_COMPILER_RETURN EQUAL 0) + _MPI_check_compiler(${LANG} "-showme:link" MPI_LINK_CMDLINE MPI_COMPILER_RETURN) + + if (NOT MPI_COMPILER_RETURN EQUAL 0) + unset(MPI_COMPILE_CMDLINE) + endif() + endif() - else() - # reset things here if something went wrong. - set(MPI_COMPILE_CMDLINE) - set(MPI_LINK_CMDLINE) - endif() - endif () + # MPICH and MVAPICH offer -compile-info and -link-info. + # For modern versions, both do the same as -show. However, for old versions, they do differ + # when called for mpicxx and mpif90 and it's necessary to use them over -show in order to find the + # removed MPI C++ bindings. + if (NOT MPI_COMPILER_RETURN EQUAL 0) + _MPI_check_compiler(${LANG} "-compile-info" MPI_COMPILE_CMDLINE MPI_COMPILER_RETURN) + + if (MPI_COMPILER_RETURN EQUAL 0) + _MPI_check_compiler(${LANG} "-link-info" MPI_LINK_CMDLINE MPI_COMPILER_RETURN) - # Older versions of LAM-MPI have "-showme". Try to find that. if (NOT MPI_COMPILER_RETURN EQUAL 0) - _mpi_check_compiler("${MPI_${lang}_COMPILER}" "-showme" MPI_COMPILE_CMDLINE MPI_COMPILER_RETURN) + unset(MPI_COMPILE_CMDLINE) endif() + endif() + endif() - # MVAPICH uses -compile-info and -link-info. Try them. - if (NOT MPI_COMPILER_RETURN EQUAL 0) - _mpi_check_compiler("${MPI_${lang}_COMPILER}" "-compile-info" MPI_COMPILE_CMDLINE MPI_COMPILER_RETURN) - - # If we have compile-info, also have link-info. - if (MPI_COMPILER_RETURN EQUAL 0) - execute_process( - COMMAND ${MPI_${lang}_COMPILER} -link-info - OUTPUT_VARIABLE MPI_LINK_CMDLINE OUTPUT_STRIP_TRAILING_WHITESPACE - ERROR_VARIABLE MPI_LINK_CMDLINE ERROR_STRIP_TRAILING_WHITESPACE - RESULT_VARIABLE MPI_COMPILER_RETURN) - endif() + # MPICH, MVAPICH2 and Intel MPI just use "-show". Open MPI also offers this, but the + # -showme commands are more specialized. + if (NOT MPI_COMPILER_RETURN EQUAL 0) + _MPI_check_compiler(${LANG} "-show" MPI_COMPILE_CMDLINE MPI_COMPILER_RETURN) + endif() - # make sure we got compile and link. Reset vars if something's wrong. - if (NOT MPI_COMPILER_RETURN EQUAL 0) - set(MPI_COMPILE_CMDLINE) - set(MPI_LINK_CMDLINE) - endif() - endif() + # Older versions of LAM/MPI have "-showme". Open MPI also supports this. + # Unknown to MPICH, MVAPICH and Intel MPI. + if (NOT MPI_COMPILER_RETURN EQUAL 0) + _MPI_check_compiler(${LANG} "-showme" MPI_COMPILE_CMDLINE MPI_COMPILER_RETURN) + endif() - # MPICH just uses "-show". Try it. - if (NOT MPI_COMPILER_RETURN EQUAL 0) - _mpi_check_compiler("${MPI_${lang}_COMPILER}" "-show" MPI_COMPILE_CMDLINE MPI_COMPILER_RETURN) - endif() + if (NOT (MPI_COMPILER_RETURN EQUAL 0) OR NOT (DEFINED MPI_COMPILE_CMDLINE)) + # Cannot interrogate this compiler, so exit. + set(MPI_${LANG}_WRAPPER_FOUND FALSE PARENT_SCOPE) + return() + endif() + unset(MPI_COMPILER_RETURN) - if (MPI_COMPILER_RETURN EQUAL 0) - # We have our command lines, but we might need to copy MPI_COMPILE_CMDLINE - # into MPI_LINK_CMDLINE, if we didn't find the link line. - if (NOT MPI_LINK_CMDLINE) - set(MPI_LINK_CMDLINE ${MPI_COMPILE_CMDLINE}) - endif() + # We have our command lines, but we might need to copy MPI_COMPILE_CMDLINE + # into MPI_LINK_CMDLINE, if we didn't find the link line. + if (NOT DEFINED MPI_LINK_CMDLINE) + set(MPI_LINK_CMDLINE "${MPI_COMPILE_CMDLINE}") + endif() + + # At this point, we obtained some output from a compiler wrapper that works. + # We'll now try to parse it into variables with meaning to us. + if("${LANG}" STREQUAL "Fortran") + # Some MPICH-1 and MVAPICH-1 versions return a three command answer for Fortran, consisting + # out of a symlink command for mpif.h, the actual compiler command and a deletion of the + # created symlink. We need to detect that case, remember the include path and drop the + # symlink/deletion operation to obtain the link/compile lines we'd usually expect. + if("${MPI_COMPILE_CMDLINE}" MATCHES "^ln -s ([^\" ]+|\"[^\"]+\") mpif.h") + get_filename_component(MPI_INCLUDE_DIRS_WORK "${CMAKE_MATCH_1}" DIRECTORY) + string(REGEX REPLACE "^ln -s ([^\" ]+|\"[^\"]+\") mpif.h\n" "" MPI_COMPILE_CMDLINE "${MPI_COMPILE_CMDLINE}") + string(REGEX REPLACE "^ln -s ([^\" ]+|\"[^\"]+\") mpif.h\n" "" MPI_LINK_CMDLINE "${MPI_LINK_CMDLINE}") + string(REGEX REPLACE "\nrm -f mpif.h$" "" MPI_COMPILE_CMDLINE "${MPI_COMPILE_CMDLINE}") + string(REGEX REPLACE "\nrm -f mpif.h$" "" MPI_LINK_CMDLINE "${MPI_LINK_CMDLINE}") + endif() + endif() + + # The Intel MPI wrapper on Linux will emit some objcopy commands after its compile command + # if -static_mpi was passed to the wrapper. To avoid spurious matches, we need to drop these lines. + if(UNIX) + string(REGEX REPLACE "(^|\n)objcopy[^\n]+(\n|$)" "" MPI_COMPILE_CMDLINE "${MPI_COMPILE_CMDLINE}") + string(REGEX REPLACE "(^|\n)objcopy[^\n]+(\n|$)" "" MPI_LINK_CMDLINE "${MPI_LINK_CMDLINE}") + endif() + + # Extract compile options from the compile command line. + string(REGEX MATCHALL "(^| )-f([^\" ]+|\"[^\"]+\")" MPI_ALL_COMPILE_OPTIONS "${MPI_COMPILE_CMDLINE}") + + foreach(_MPI_COMPILE_OPTION IN LISTS MPI_ALL_COMPILE_OPTIONS) + string(REGEX REPLACE "^ " "" _MPI_COMPILE_OPTION "${_MPI_COMPILE_OPTION}") + # Ignore -fstack-protector directives: These occur on MPICH and MVAPICH when the libraries + # themselves were built with this flag. However, this flag is unrelated to using MPI, and + # we won't match the accompanying --param-ssp-size and -Wp,-D_FORTIFY_SOURCE flags and therefore + # produce inconsistent results with the regularly flags. + # Similarly, aliasing flags do not belong into our flag array. + if(NOT "${_MPI_COMPILE_OPTION}" MATCHES "^-f(stack-protector|(no-|)strict-aliasing|PI[CE]|pi[ce])") + list(APPEND MPI_COMPILE_OPTIONS_WORK "${_MPI_COMPILE_OPTION}") + endif() + endforeach() + + # Same deal, with the definitions. We also treat arguments passed to the preprocessor directly. + string(REGEX MATCHALL "(^| )(-Wp,|-Xpreprocessor |)[-/]D([^\" ]+|\"[^\"]+\")" MPI_ALL_COMPILE_DEFINITIONS "${MPI_COMPILE_CMDLINE}") + + foreach(_MPI_COMPILE_DEFINITION IN LISTS MPI_ALL_COMPILE_DEFINITIONS) + string(REGEX REPLACE "^ ?(-Wp,|-Xpreprocessor )?[-/]D" "" _MPI_COMPILE_DEFINITION "${_MPI_COMPILE_DEFINITION}") + string(REPLACE "\"" "" _MPI_COMPILE_DEFINITION "${_MPI_COMPILE_DEFINITION}") + if(NOT "${_MPI_COMPILE_DEFINITION}" MATCHES "^_FORTIFY_SOURCE.*") + list(APPEND MPI_COMPILE_DEFINITIONS_WORK "${_MPI_COMPILE_DEFINITION}") + endif() + endforeach() + + # Extract include paths from compile command line + string(REGEX MATCHALL "(^| )[-/]I([^\" ]+|\"[^\"]+\")" MPI_ALL_INCLUDE_PATHS "${MPI_COMPILE_CMDLINE}") + + # If extracting failed to work, we'll try using -showme:incdirs. + if (NOT MPI_ALL_INCLUDE_PATHS) + _MPI_check_compiler(${LANG} "-showme:incdirs" MPI_INCDIRS_CMDLINE MPI_INCDIRS_COMPILER_RETURN) + if(MPI_INCDIRS_COMPILER_RETURN) + separate_arguments(MPI_ALL_INCLUDE_PATHS NATIVE_COMMAND "${MPI_INCDIRS_CMDLINE}") + endif() + endif() + + foreach(_MPI_INCLUDE_PATH IN LISTS MPI_ALL_INCLUDE_PATHS) + string(REGEX REPLACE "^ ?[-/]I" "" _MPI_INCLUDE_PATH "${_MPI_INCLUDE_PATH}") + string(REPLACE "\"" "" _MPI_INCLUDE_PATH "${_MPI_INCLUDE_PATH}") + get_filename_component(_MPI_INCLUDE_PATH "${_MPI_INCLUDE_PATH}" REALPATH) + list(APPEND MPI_INCLUDE_DIRS_WORK "${_MPI_INCLUDE_PATH}") + endforeach() + + # Extract linker paths from the link command line + string(REGEX MATCHALL "(^| )(-Wl,|-Xlinker |)(-L|[/-]LIBPATH:|[/-]libpath:)([^\" ]+|\"[^\"]+\")" MPI_ALL_LINK_PATHS "${MPI_LINK_CMDLINE}") + + # If extracting failed to work, we'll try using -showme:libdirs. + if (NOT MPI_ALL_LINK_PATHS) + _MPI_check_compiler(${LANG} "-showme:libdirs" MPI_LIBDIRS_CMDLINE MPI_LIBDIRS_COMPILER_RETURN) + if(MPI_LIBDIRS_COMPILER_RETURN) + separate_arguments(MPI_ALL_LINK_PATHS NATIVE_COMMAND "${MPI_LIBDIRS_CMDLINE}") + endif() + endif() + + foreach(_MPI_LPATH IN LISTS MPI_ALL_LINK_PATHS) + string(REGEX REPLACE "^ ?(-Wl,|-Xlinker )?(-L|[/-]LIBPATH:|[/-]libpath:)" "" _MPI_LPATH "${_MPI_LPATH}") + string(REPLACE "\"" "" _MPI_LPATH "${_MPI_LPATH}") + get_filename_component(_MPI_LPATH "${_MPI_LPATH}" REALPATH) + list(APPEND MPI_LINK_DIRECTORIES_WORK "${_MPI_LPATH}") + endforeach() + + # Extract linker flags from the link command line + string(REGEX MATCHALL "(^| )(-Wl,|-Xlinker )([^\" ]+|\"[^\"]+\")" MPI_ALL_LINK_FLAGS "${MPI_LINK_CMDLINE}") + + foreach(_MPI_LINK_FLAG IN LISTS MPI_ALL_LINK_FLAGS) + string(STRIP "${_MPI_LINK_FLAG}" _MPI_LINK_FLAG) + # MPI might be marked to build with non-executable stacks but this should not propagate. + if (NOT "${_MPI_LINK_FLAG}" MATCHES "(-Wl,|-Xlinker )-z,noexecstack") + if (MPI_LINK_FLAGS_WORK) + string(APPEND MPI_LINK_FLAGS_WORK " ${_MPI_LINK_FLAG}") else() - message(STATUS "Unable to determine MPI from MPI driver ${MPI_${lang}_COMPILER}") - set(MPI_COMPILE_CMDLINE) - set(MPI_LINK_CMDLINE) + set(MPI_LINK_FLAGS_WORK "${_MPI_LINK_FLAG}") endif() + endif() + endforeach() - # Here, we're done with the interrogation part, and we'll try to extract args we care - # about from what we learned from the compiler wrapper scripts. - - # If interrogation came back with something, extract our variable from the MPI command line - if (MPI_COMPILE_CMDLINE OR MPI_LINK_CMDLINE) - # Extract compile flags from the compile command line. - string(REGEX MATCHALL "(^| )-[Df]([^\" ]+|\"[^\"]+\")" MPI_ALL_COMPILE_FLAGS "${MPI_COMPILE_CMDLINE}") - set(MPI_COMPILE_FLAGS_WORK) + # Extract the set of libraries to link against from the link command + # line + string(REGEX MATCHALL "(^| )-l([^\" ]+|\"[^\"]+\")" MPI_LIBNAMES "${MPI_LINK_CMDLINE}") - foreach(FLAG ${MPI_ALL_COMPILE_FLAGS}) - string(REGEX REPLACE "^ " "" FLAG ${FLAG}) - if (MPI_COMPILE_FLAGS_WORK) - set(MPI_COMPILE_FLAGS_WORK "${MPI_COMPILE_FLAGS_WORK} ${FLAG}") - else() - set(MPI_COMPILE_FLAGS_WORK ${FLAG}) - endif() - endforeach() + foreach(_MPI_LIB_NAME IN LISTS MPI_LIBNAMES) + string(REGEX REPLACE "^ ?-l" "" _MPI_LIB_NAME "${_MPI_LIB_NAME}") + string(REPLACE "\"" "" _MPI_LIB_NAME "${_MPI_LIB_NAME}") + get_filename_component(_MPI_LIB_PATH "${_MPI_LIB_NAME}" DIRECTORY) + if(NOT "${_MPI_LIB_PATH}" STREQUAL "") + list(APPEND MPI_LIB_FULLPATHS_WORK "${_MPI_LIB_NAME}") + else() + list(APPEND MPI_LIB_NAMES_WORK "${_MPI_LIB_NAME}") + endif() + endforeach() - # Extract include paths from compile command line - string(REGEX MATCHALL "(^| )-I([^\" ]+|\"[^\"]+\")" MPI_ALL_INCLUDE_PATHS "${MPI_COMPILE_CMDLINE}") - set(MPI_INCLUDE_PATH_WORK) + if(WIN32) + # A compiler wrapper on Windows will just have the name of the + # library to link on its link line, potentially with a full path + string(REGEX MATCHALL "(^| )([^\" ]+\\.lib|\"[^\"]+\\.lib\")" MPI_LIBNAMES "${MPI_LINK_CMDLINE}") + foreach(_MPI_LIB_NAME IN LISTS MPI_LIBNAMES) + string(REGEX REPLACE "^ " "" _MPI_LIB_NAME "${_MPI_LIB_NAME}") + string(REPLACE "\"" "" _MPI_LIB_NAME "${_MPI_LIB_NAME}") + get_filename_component(_MPI_LIB_PATH "${_MPI_LIB_NAME}" DIRECTORY) + if(NOT "${_MPI_LIB_PATH}" STREQUAL "") + list(APPEND MPI_LIB_FULLPATHS_WORK "${_MPI_LIB_NAME}") + else() + list(APPEND MPI_LIB_NAMES_WORK "${_MPI_LIB_NAME}") + endif() + endforeach() + else() + # On UNIX platforms, archive libraries can be given with full path. + string(REGEX MATCHALL "(^| )([^\" ]+\\.a|\"[^\"]+\\.a\")" MPI_LIBFULLPATHS "${MPI_LINK_CMDLINE}") + foreach(_MPI_LIB_NAME IN LISTS MPI_LIBFULLPATHS) + string(REGEX REPLACE "^ " "" _MPI_LIB_NAME "${_MPI_LIB_NAME}") + string(REPLACE "\"" "" _MPI_LIB_NAME "${_MPI_LIB_NAME}") + get_filename_component(_MPI_LIB_PATH "${_MPI_LIB_NAME}" DIRECTORY) + if(NOT "${_MPI_LIB_PATH}" STREQUAL "") + list(APPEND MPI_LIB_FULLPATHS_WORK "${_MPI_LIB_NAME}") + else() + list(APPEND MPI_LIB_NAMES_WORK "${_MPI_LIB_NAME}") + endif() + endforeach() + endif() - foreach(IPATH ${MPI_ALL_INCLUDE_PATHS}) - string(REGEX REPLACE "^ ?-I" "" IPATH ${IPATH}) - string(REPLACE "//" "/" IPATH ${IPATH}) - string(REPLACE "\"" "" IPATH ${IPATH}) - file(TO_CMAKE_PATH "${IPATH}" IPATH) - list(APPEND MPI_INCLUDE_PATH_WORK ${IPATH}) - endforeach() + # An MPI compiler wrapper could have its MPI libraries in the implictly + # linked directories of the compiler itself. + if(DEFINED CMAKE_${LANG}_IMPLICIT_LINK_DIRECTORIES) + list(APPEND MPI_LINK_DIRECTORIES_WORK "${CMAKE_${LANG}_IMPLICIT_LINK_DIRECTORIES}") + endif() - # try using showme:incdirs if extracting didn't work. - if (NOT MPI_INCLUDE_PATH_WORK) - set(MPI_INCLUDE_PATH_WORK ${MPI_INCDIRS}) - separate_arguments(MPI_INCLUDE_PATH_WORK) - endif() + # Determine full path names for all of the libraries that one needs + # to link against in an MPI program + unset(MPI_PLAIN_LIB_NAMES_WORK) + foreach(_MPI_LIB_NAME IN LISTS MPI_LIB_NAMES_WORK) + get_filename_component(_MPI_PLAIN_LIB_NAME "${_MPI_LIB_NAME}" NAME_WE) + list(APPEND MPI_PLAIN_LIB_NAMES_WORK "${_MPI_PLAIN_LIB_NAME}") + find_library(MPI_${_MPI_PLAIN_LIB_NAME}_LIBRARY + NAMES "${_MPI_LIB_NAME}" "lib${_MPI_LIB_NAME}" + HINTS ${MPI_LINK_DIRECTORIES_WORK} + DOC "Location of the ${_MPI_PLAIN_LIB_NAME} library for MPI" + ) + mark_as_advanced(MPI_${_MPI_PLAIN_LIB_NAME}_LIBRARY) + endforeach() - # If all else fails, just search for mpi.h in the normal include paths. - if (NOT MPI_INCLUDE_PATH_WORK) - set(MPI_HEADER_PATH "MPI_HEADER_PATH-NOTFOUND" CACHE FILEPATH "Cleared" FORCE) - find_path(MPI_HEADER_PATH mpi.h - HINTS ${_MPI_BASE_DIR} ${_MPI_PREFIX_PATH} - PATH_SUFFIXES include) - set(MPI_INCLUDE_PATH_WORK ${MPI_HEADER_PATH}) - endif() + # Deal with the libraries given with full path next + unset(MPI_DIRECT_LIB_NAMES_WORK) + foreach(_MPI_LIB_FULLPATH IN LISTS MPI_LIB_FULLPATHS_WORK) + get_filename_component(_MPI_PLAIN_LIB_NAME "${_MPI_LIB_FULLPATH}" NAME_WE) + get_filename_component(_MPI_LIB_NAME "${_MPI_LIB_FULLPATH}" NAME) + get_filename_component(_MPI_LIB_PATH "${_MPI_LIB_FULLPATH}" DIRECTORY) + list(APPEND MPI_DIRECT_LIB_NAMES_WORK "${_MPI_PLAIN_LIB_NAME}") + find_library(MPI_${_MPI_PLAIN_LIB_NAME}_LIBRARY + NAMES "${_MPI_LIB_NAME}" + HINTS ${_MPI_LIB_PATH} + DOC "Location of the ${_MPI_PLAIN_LIB_NAME} library for MPI" + ) + mark_as_advanced(MPI_${_MPI_PLAIN_LIB_NAME}_LIBRARY) + endforeach() + if(MPI_DIRECT_LIB_NAMES_WORK) + set(MPI_PLAIN_LIB_NAMES_WORK "${MPI_DIRECT_LIB_NAMES_WORK};${MPI_PLAIN_LIB_NAMES_WORK}") + endif() - # Extract linker paths from the link command line - string(REGEX MATCHALL "(^| |-Wl,)(-L|/LIBPATH:)([^\" ]+|\"[^\"]+\")" MPI_ALL_LINK_PATHS "${MPI_LINK_CMDLINE}") - set(MPI_LINK_PATH) - foreach(LPATH ${MPI_ALL_LINK_PATHS}) - string(REGEX REPLACE "^(| |-Wl,)(-L|/LIBPATH:)" "" LPATH ${LPATH}) - string(REPLACE "//" "/" LPATH ${LPATH}) - list(APPEND MPI_LINK_PATH ${LPATH}) - endforeach() + # MPI might require pthread to work. The above mechanism wouldn't detect it, but we need to + # link it in that case. -lpthread is covered by the normal library treatment on the other hand. + if("${MPI_COMPILE_CMDLINE}" MATCHES "-pthread") + list(APPEND MPI_COMPILE_OPTIONS_WORK "-pthread") + if(MPI_LINK_FLAGS_WORK) + string(APPEND MPI_LINK_FLAGS_WORK " -pthread") + else() + set(MPI_LINK_FLAGS_WORK "-pthread") + endif() + endif() - # try using showme:libdirs if extracting didn't work. - if (NOT MPI_LINK_PATH) - set(MPI_LINK_PATH ${MPI_LIBDIRS}) - separate_arguments(MPI_LINK_PATH) - endif() + # If we found MPI, set up all of the appropriate cache entries + if(NOT MPI_${LANG}_COMPILE_OPTIONS) + set(MPI_${LANG}_COMPILE_OPTIONS ${MPI_COMPILE_OPTIONS_WORK} CACHE STRING "MPI ${LANG} compilation options" FORCE) + endif() + if(NOT MPI_${LANG}_COMPILE_DEFINITIONS) + set(MPI_${LANG}_COMPILE_DEFINITIONS ${MPI_COMPILE_DEFINITIONS_WORK} CACHE STRING "MPI ${LANG} compilation definitions" FORCE) + endif() + if(NOT MPI_${LANG}_ADDITIONAL_INCLUDE_DIRS) + set(MPI_${LANG}_ADDITIONAL_INCLUDE_DIRS ${MPI_INCLUDE_DIRS_WORK} CACHE STRING "MPI ${LANG} additional include directories" FORCE) + endif() + if(NOT MPI_${LANG}_LINK_FLAGS) + set(MPI_${LANG}_LINK_FLAGS ${MPI_LINK_FLAGS_WORK} CACHE STRING "MPI ${LANG} linker flags" FORCE) + endif() + if(NOT MPI_${LANG}_LIB_NAMES) + set(MPI_${LANG}_LIB_NAMES ${MPI_PLAIN_LIB_NAMES_WORK} CACHE STRING "MPI ${LANG} libraries to link against" FORCE) + endif() + set(MPI_${LANG}_WRAPPER_FOUND TRUE PARENT_SCOPE) +endfunction() - # Extract linker flags from the link command line - string(REGEX MATCHALL "(^| )(-Wl,|-Xlinker )([^\" ]+|\"[^\"]+\")" MPI_ALL_LINK_FLAGS "${MPI_LINK_CMDLINE}") - set(MPI_LINK_FLAGS_WORK) - foreach(FLAG ${MPI_ALL_LINK_FLAGS}) - string(REGEX REPLACE "^ " "" FLAG ${FLAG}) - if (MPI_LINK_FLAGS_WORK) - set(MPI_LINK_FLAGS_WORK "${MPI_LINK_FLAGS_WORK} ${FLAG}") - else() - set(MPI_LINK_FLAGS_WORK ${FLAG}) - endif() - endforeach() +function(_MPI_guess_settings LANG) + set(MPI_GUESS_FOUND FALSE) + # Currently only MSMPI and MPICH2 on Windows are supported, so we can skip this search if we're not targeting that. + if(WIN32) + # MSMPI + + # The environment variables MSMPI_INC and MSMPILIB32/64 are the only ways of locating the MSMPI_SDK, + # which is installed separately from the runtime. Thus it's possible to have mpiexec but not MPI headers + # or import libraries and vice versa. + if(NOT MPI_GUESS_LIBRARY_NAME OR "${MPI_GUESS_LIBRARY_NAME}" STREQUAL "MSMPI") + # We first attempt to locate the msmpi.lib. Should be find it, we'll assume that the MPI present is indeed + # Microsoft MPI. + if("${CMAKE_SIZEOF_VOID_P}" EQUAL 8) + set(MPI_MSMPI_LIB_PATH "$ENV{MSMPI_LIB64}") + set(MPI_MSMPI_INC_PATH_EXTRA "$ENV{MSMPI_INC}/x64") + else() + set(MPI_MSMPI_LIB_PATH "$ENV{MSMPI_LIB32}") + set(MPI_MSMPI_INC_PATH_EXTRA "$ENV{MSMPI_INC}/x86") + endif() - # Extract the set of libraries to link against from the link command - # line - string(REGEX MATCHALL "(^| )-l([^\" ]+|\"[^\"]+\")" MPI_LIBNAMES "${MPI_LINK_CMDLINE}") - if(WIN32) - # The intel wrappers on windows link against static versions of the MPI libraries. - # The static libraries are simply listed on the command line without -l. - # For instance: " icl ... impi.lib " - string(REGEX MATCHALL "(^| )([^\" ]+)\\.lib" tmp "${MPI_LINK_CMDLINE}") - list(APPEND MPI_LIBNAMES ${tmp}) + find_library(MPI_msmpi_LIBRARY + NAMES msmpi + HINTS ${MPI_MSMPI_LIB_PATH} + DOC "Location of the msmpi library for Microsoft MPI") + mark_as_advanced(MPI_msmpi_LIBRARY) + + if(MPI_msmpi_LIBRARY) + # Next, we attempt to locate the MPI header. Note that for Fortran we know that mpif.h is a way + # MSMPI can be used and therefore that header has to be present. + if(NOT MPI_${LANG}_ADDITIONAL_INCLUDE_DIRS) + get_filename_component(MPI_MSMPI_INC_DIR "$ENV{MSMPI_INC}" REALPATH) + set(MPI_${LANG}_ADDITIONAL_INCLUDE_DIRS "${MPI_MSMPI_INC_DIR}" CACHE STRING "MPI ${LANG} additional include directories" FORCE) + unset(MPI_MSMPI_INC_DIR) endif() - # add the compiler implicit directories because some compilers - # such as the intel compiler have libraries that show up - # in the showme list that can only be found in the implicit - # link directories of the compiler. - if (DEFINED CMAKE_${lang}_IMPLICIT_LINK_DIRECTORIES) - set(MPI_LINK_PATH "${MPI_LINK_PATH};${CMAKE_${lang}_IMPLICIT_LINK_DIRECTORIES}") - endif () - - # Determine full path names for all of the libraries that one needs - # to link against in an MPI program - foreach(LIB ${MPI_LIBNAMES}) - string(REGEX REPLACE "^ ?-l" "" LIB ${LIB}) - if(WIN32) - string(REGEX REPLACE "\\.lib$" "" LIB ${LIB}) + # For MSMPI, one can compile the MPI module by building the mpi.f90 shipped with the MSMPI SDK, + # thus it might be present or provided by the user. Figuring out which is supported is done later on. + # The PGI Fortran compiler for instance ships a prebuilt set of modules in its own include folder. + # Should a user be employing PGI or have built its own set and provided it via cache variables, the + # splitting routine would have located the module files. + + # For C and C++, we're done here (MSMPI does not ship the MPI-2 C++ bindings) - however, for Fortran + # we need some extra library to glue Fortran support together: + # MSMPI ships 2-4 Fortran libraries, each for different Fortran compiler behaviors. The library names + # ending with a c are using the cdecl calling convention, whereas those ending with an s are for Fortran + # implementations using stdcall. Therefore, the 64-bit MSMPI only ships those ending in 'c', whereas the 32-bit + # has both variants available. + # The second difference is the last but one letter, if it's an e(nd), the length of a string argument is + # passed by the Fortran compiler after all other arguments on the parameter list, if it's an m(ixed), + # it's passed immediately after the string address. + + # To summarize: + # - msmpifec: CHARACTER length passed after the parameter list and using cdecl calling convention + # - msmpifmc: CHARACTER length passed directly after string address and using cdecl calling convention + # - msmpifes: CHARACTER length passed after the parameter list and using stdcall calling convention + # - msmpifms: CHARACTER length passed directly after string address and using stdcall calling convention + # 32-bit MSMPI ships all four libraries, 64-bit MSMPI ships only the first two. + + # As is, Intel Fortran and PGI Fortran both use the 'ec' variant of the calling convention, whereas + # the old Compaq Visual Fortran compiler defaulted to the 'ms' version. It's possible to make Intel Fortran + # use the CVF calling convention using /iface:cvf, but we assume - and this is also assumed in FortranCInterface - + # this isn't the case. It's also possible to make CVF use the 'ec' variant, using /iface=(cref,nomixed_str_len_arg). + + # Our strategy is now to locate all libraries, but enter msmpifec into the LIB_NAMES array. + # Should this not be adequate it's a straightforward way for a user to change the LIB_NAMES array and + # have his library found. Still, this should not be necessary outside of exceptional cases, as reasoned. + if ("${LANG}" STREQUAL "Fortran") + set(MPI_MSMPI_CALLINGCONVS c) + if("${CMAKE_SIZEOF_VOID_P}" EQUAL 4) + list(APPEND MPI_MSMPI_CALLINGCONVS s) endif() - string(STRIP ${LIB} LIB) - # MPI_LIB is cached by find_library, but we don't want that. Clear it first. - set(MPI_LIB "MPI_LIB-NOTFOUND" CACHE FILEPATH "Cleared" FORCE) - find_library(MPI_LIB NAMES ${LIB} HINTS ${MPI_LINK_PATH}) - - if (MPI_LIB) - list(APPEND MPI_LIBRARIES_WORK ${MPI_LIB}) - elseif (NOT MPI_FIND_QUIETLY) - message(WARNING "Unable to find MPI library ${LIB}") + foreach(mpistrlenpos IN ITEMS e m) + foreach(mpicallingconv IN LISTS MPI_MSMPI_CALLINGCONVS) + find_library(MPI_msmpif${mpistrlenpos}${mpicallingconv}_LIBRARY + NAMES msmpif${mpistrlenpos}${mpicallingconv} + HINTS "${MPI_MSMPI_LIB_PATH}" + DOC "Location of the msmpi${mpistrlenpos}${mpicallingconv} library for Microsoft MPI") + mark_as_advanced(MPI_msmpif${mpistrlenpos}${mpicallingconv}_LIBRARY) + endforeach() + endforeach() + if(NOT MPI_${LANG}_LIB_NAMES) + set(MPI_${LANG}_LIB_NAMES "msmpi;msmpifec" CACHE STRING "MPI ${LANG} libraries to link against" FORCE) endif() - endforeach() - # Sanity check MPI_LIBRARIES to make sure there are enough libraries - list(LENGTH MPI_LIBRARIES_WORK MPI_NUMLIBS) - list(LENGTH MPI_LIBNAMES MPI_NUMLIBS_EXPECTED) - if (NOT MPI_NUMLIBS EQUAL MPI_NUMLIBS_EXPECTED) - set(MPI_LIBRARIES_WORK "MPI_${lang}_LIBRARIES-NOTFOUND") + # At this point we're *not* done. MSMPI requires an additional include file for Fortran giving the value + # of MPI_AINT. This file is called mpifptr.h located in the x64 and x86 subfolders, respectively. + find_path(MPI_mpifptr_INCLUDE_DIR + NAMES "mpifptr.h" + HINTS "${MPI_MSMPI_INC_PATH_EXTRA}" + DOC "Location of the mpifptr.h extra header for Microsoft MPI") + if(NOT MPI_${LANG}_ADDITIONAL_INCLUDE_VARS) + set(MPI_${LANG}_ADDITIONAL_INCLUDE_VARS "mpifptr" CACHE STRING "MPI ${LANG} additional include directory variables, given in the form MPI__INCLUDE_DIR." FORCE) + endif() + mark_as_advanced(MPI_${LANG}_ADDITIONAL_INCLUDE_VARS MPI_mpifptr_INCLUDE_DIR) + else() + if(NOT MPI_${LANG}_LIB_NAMES) + set(MPI_${LANG}_LIB_NAMES "msmpi" CACHE STRING "MPI ${LANG} libraries to link against" FORCE) + endif() endif() + mark_as_advanced(MPI_${LANG}_LIB_NAMES) + set(MPI_GUESS_FOUND TRUE) endif() + endif() - elseif(try_libs) - # If we didn't have an MPI compiler script to interrogate, attempt to find everything - # with plain old find functions. This is nasty because MPI implementations have LOTS of - # different library names, so this section isn't going to be very generic. We need to - # make sure it works for MS MPI, though, since there are no compiler wrappers for that. - find_path(MPI_HEADER_PATH mpi.h - HINTS ${_MPI_BASE_DIR} ${_MPI_PREFIX_PATH} - PATH_SUFFIXES include Inc) - set(MPI_INCLUDE_PATH_WORK ${MPI_HEADER_PATH}) - - # Decide between 32-bit and 64-bit libraries for Microsoft's MPI - if("${CMAKE_SIZEOF_VOID_P}" EQUAL 8) - set(MS_MPI_ARCH_DIR x64) - set(MS_MPI_ARCH_DIR2 amd64) - else() - set(MS_MPI_ARCH_DIR x86) - set(MS_MPI_ARCH_DIR2 i386) - endif() + # At this point there's not many MPIs that we could still consider. + # OpenMPI 1.6.x and below supported Windows, but these ship compiler wrappers that still work. + # The only other relevant MPI implementation without a wrapper is MPICH2, which had Windows support in 1.4.1p1 and older. + if(NOT MPI_GUESS_LIBRARY_NAME OR "${MPI_GUESS_LIBRARY_NAME}" STREQUAL "MPICH2") + set(MPI_MPICH_PREFIX_PATHS + "$ENV{ProgramW6432}/MPICH2/lib" + "[HKEY_LOCAL_MACHINE\\SOFTWARE\\MPICH\\SMPD;binary]/../lib" + "[HKEY_LOCAL_MACHINE\\SOFTWARE\\MPICH2;Path]/lib" + ) - set(MPI_LIB "MPI_LIB-NOTFOUND" CACHE FILEPATH "Cleared" FORCE) - find_library(MPI_LIB - NAMES mpi mpich mpich2 msmpi - HINTS ${_MPI_BASE_DIR} ${_MPI_PREFIX_PATH} - PATH_SUFFIXES lib lib/${MS_MPI_ARCH_DIR} Lib Lib/${MS_MPI_ARCH_DIR} lib/${MS_MPI_ARCH_DIR2} Lib/${MS_MPI_ARCH_DIR2}) - set(MPI_LIBRARIES_WORK ${MPI_LIB}) - - # Right now, we only know about the extra libs for C++. - # We could add Fortran here (as there is usually libfmpich, etc.), but - # this really only has to work with MS MPI on Windows. - # Assume that other MPI's are covered by the compiler wrappers. - if (${lang} STREQUAL CXX) - set(MPI_LIB "MPI_LIB-NOTFOUND" CACHE FILEPATH "Cleared" FORCE) - find_library(MPI_LIB - NAMES mpi++ mpicxx cxx mpi_cxx - HINTS ${_MPI_BASE_DIR} ${_MPI_PREFIX_PATH} - PATH_SUFFIXES lib) - if (MPI_LIBRARIES_WORK AND MPI_LIB) - list(APPEND MPI_LIBRARIES_WORK ${MPI_LIB}) + # All of C, C++ and Fortran will need mpi.lib, so we'll look for this first + find_library(MPI_mpi_LIBRARY + NAMES mpi + HINTS ${MPI_MPICH_PREFIX_PATHS}) + mark_as_advanced(MPI_mpi_LIBRARY) + # If we found mpi.lib, we detect the rest of MPICH2 + if(MPI_mpi_LIBRARY) + set(MPI_MPICH_LIB_NAMES "mpi") + # If MPI-2 C++ bindings are requested, we need to locate cxx.lib as well. + # Otherwise, MPICH_SKIP_MPICXX will be defined and these bindings aren't needed. + if("${LANG}" STREQUAL "CXX" AND NOT MPI_CXX_SKIP_MPICXX) + find_library(MPI_cxx_LIBRARY + NAMES cxx + HINTS ${MPI_MPICH_PREFIX_PATHS}) + mark_as_advanced(MPI_cxx_LIBRARY) + list(APPEND MPI_MPICH_LIB_NAMES "cxx") + # For Fortran, MPICH2 provides three different libraries: + # fmpich2.lib which uses uppercase symbols and cdecl, + # fmpich2s.lib which uses uppercase symbols and stdcall (32-bit only), + # fmpich2g.lib which uses lowercase symbols with double underscores and cdecl. + # fmpich2s.lib would be useful for Compaq Visual Fortran, fmpich2g.lib has to be used with GNU g77 and is also + # provided in the form of an .a archive for MinGW and Cygwin. From our perspective, fmpich2.lib is the only one + # we need to try, and if it doesn't work with the given Fortran compiler we'd find out later on during validation + elseif("${LANG}" STREQUAL "Fortran") + find_library(MPI_fmpich2_LIBRARY + NAMES fmpich2 + HINTS ${MPI_MPICH_PREFIX_PATHS}) + find_library(MPI_fmpich2s_LIBRARY + NAMES fmpich2s + HINTS ${MPI_MPICH_PREFIX_PATHS}) + find_library(MPI_fmpich2g_LIBRARY + NAMES fmpich2g + HINTS ${MPI_MPICH_PREFIX_PATHS}) + mark_as_advanced(MPI_fmpich2_LIBRARY MPI_fmpich2s_LIBRARY MPI_fmpich2g_LIBRARY) + list(APPEND MPI_MPICH_LIB_NAMES "fmpich2") endif() - endif() - if (${lang} STREQUAL Fortran) - set(MPI_HEADER_PATH "MPI_HEADER_PATH-NOTFOUND" CACHE FILEPATH "Cleared" FORCE) - find_path(MPI_HEADER_PATH mpifptr.h - HINTS ${_MPI_BASE_DIR} ${_MPI_PREFIX_PATH} - PATH_SUFFIXES include Include include/${MS_MPI_ARCH_DIR} Include/${MS_MPI_ARCH_DIR2} Include/${MS_MPI_ARCH_DIR} include/${MS_MPI_ARCH_DIR2} Inc Inc/${MS_MPI_ARCH_DIR} Inc/${MS_MPI_ARCH_DIR2}) - if (MPI_INCLUDE_PATH_WORK AND MPI_HEADER_PATH) - list(APPEND MPI_INCLUDE_PATH_WORK ${MPI_HEADER_PATH}) - endif () - - set(MPI_LIB "MPI_LIB-NOTFOUND" CACHE FILEPATH "Cleared" FORCE) - find_library(MPI_LIB - NAMES fmpi fmpich fmpich2 fmpich2g msmpifec msmpifmc - HINTS ${_MPI_BASE_DIR} ${_MPI_PREFIX_PATH} - PATH_SUFFIXES lib lib/${MS_MPI_ARCH_DIR} Lib Lib/${MS_MPI_ARCH_DIR}) - if (MPI_LIBRARIES_WORK AND MPI_LIB) - list(APPEND MPI_LIBRARIES_WORK ${MPI_LIB}) - endif () - endif () - - if (NOT MPI_LIBRARIES_WORK) - set(MPI_LIBRARIES_WORK "MPI_${lang}_LIBRARIES-NOTFOUND") + if(NOT MPI_${LANG}_LIB_NAMES) + set(MPI_${LANG}_LIB_NAMES "${MPI_MPICH_LIB_NAMES}" CACHE STRING "MPI ${LANG} libraries to link against" FORCE) + endif() + unset(MPI_MPICH_LIB_NAMES) + + if(NOT MPI_${LANG}_ADDITIONAL_INCLUDE_DIRS) + # For MPICH2, the include folder would be in ../include relative to the library folder. + get_filename_component(MPI_MPICH_ROOT_DIR "${MPI_mpi_LIBRARY}" DIRECTORY) + get_filename_component(MPI_MPICH_ROOT_DIR "${MPI_MPICH_ROOT_DIR}" DIRECTORY) + if(IS_DIRECTORY "${MPI_MPICH_ROOT_DIR}/include") + set(MPI_${LANG}_ADDITIONAL_INCLUDE_DIRS "${MPI_MPICH_ROOT_DIR}/include" CACHE STRING "MPI ${LANG} additional include directory variables, given in the form MPI__INCLUDE_DIR." FORCE) + endif() + unset(MPI_MPICH_ROOT_DIR) + endif() + set(MPI_GUESS_FOUND TRUE) endif() + unset(MPI_MPICH_PREFIX_PATHS) endif() + endif() + set(MPI_${LANG}_GUESS_FOUND "${MPI_GUESS_FOUND}" PARENT_SCOPE) +endfunction() - # If we found MPI, set up all of the appropriate cache entries - set(MPI_${lang}_COMPILE_FLAGS ${MPI_COMPILE_FLAGS_WORK} CACHE STRING "MPI ${lang} compilation flags" FORCE) - set(MPI_${lang}_INCLUDE_PATH ${MPI_INCLUDE_PATH_WORK} CACHE STRING "MPI ${lang} include path" FORCE) - set(MPI_${lang}_LINK_FLAGS ${MPI_LINK_FLAGS_WORK} CACHE STRING "MPI ${lang} linking flags" FORCE) - set(MPI_${lang}_LIBRARIES ${MPI_LIBRARIES_WORK} CACHE STRING "MPI ${lang} libraries to link against" FORCE) - mark_as_advanced(MPI_${lang}_COMPILE_FLAGS MPI_${lang}_INCLUDE_PATH MPI_${lang}_LINK_FLAGS MPI_${lang}_LIBRARIES) +function(_MPI_adjust_compile_definitions LANG) + if("${LANG}" STREQUAL "CXX") + # To disable the C++ bindings, we need to pass some definitions since the mpi.h header has to deal with both C and C++ + # bindings in MPI-2. + if(MPI_CXX_SKIP_MPICXX AND NOT MPI_${LANG}_COMPILE_DEFINITIONS MATCHES "SKIP_MPICXX") + # MPICH_SKIP_MPICXX is being used in MPICH and derivatives like MVAPICH or Intel MPI + # OMPI_SKIP_MPICXX is being used in Open MPI + # _MPICC_H is being used for IBM Platform MPI + list(APPEND MPI_${LANG}_COMPILE_DEFINITIONS "MPICH_SKIP_MPICXX" "OMPI_SKIP_MPICXX" "_MPICC_H") + set(MPI_${LANG}_COMPILE_DEFINITIONS "${MPI_${LANG}_COMPILE_DEFINITIONS}" CACHE STRING "MPI ${LANG} compilation definitions" FORCE) + endif() + endif() +endfunction() + +macro(_MPI_assemble_libraries LANG) + set(MPI_${LANG}_LIBRARIES "") + foreach(mpilib IN LISTS MPI_${LANG}_LIB_NAMES) + list(APPEND MPI_${LANG}_LIBRARIES ${MPI_${mpilib}_LIBRARY}) + endforeach() +endmacro() - # clear out our temporary lib/header detection variable here. - set(MPI_LIB "MPI_LIB-NOTFOUND" CACHE INTERNAL "Scratch variable for MPI lib detection" FORCE) - set(MPI_HEADER_PATH "MPI_HEADER_PATH-NOTFOUND" CACHE INTERNAL "Scratch variable for MPI header detection" FORCE) +macro(_MPI_assemble_include_dirs LANG) + set(MPI_${LANG}_INCLUDE_DIRS "${MPI_${LANG}_ADDITIONAL_INCLUDE_DIRS}") + if("${LANG}" MATCHES "(C|CXX)") + if(MPI_${LANG}_HEADER_DIR) + list(APPEND MPI_${LANG}_INCLUDE_DIRS "${MPI_${LANG}_HEADER_DIR}") + endif() + else() # Fortran + if(MPI_${LANG}_F77_HEADER_DIR) + list(APPEND MPI_${LANG}_INCLUDE_DIRS "${MPI_${LANG}_F77_HEADER_DIR}") + endif() + if(MPI_${LANG}_MODULE_DIR AND NOT "${MPI_${LANG}_MODULE_DIR}" IN_LIST MPI_${LANG}_INCLUDE_DIRS) + list(APPEND MPI_${LANG}_INCLUDE_DIRS "${MPI_${LANG}_MODULE_DIR}") + endif() endif() + if(MPI_${LANG}_ADDITIONAL_INCLUDE_VARS) + foreach(mpiadditionalinclude IN LISTS MPI_${LANG}_ADDITIONAL_INCLUDE_VARS) + list(APPEND MPI_${LANG}_INCLUDE_DIRS "${MPI_${mpiadditionalinclude}_INCLUDE_DIR}") + endforeach() + endif() +endmacro() - # finally set a found variable for each MPI language - if (MPI_${lang}_INCLUDE_PATH AND MPI_${lang}_LIBRARIES) - set(MPI_${lang}_FOUND TRUE PARENT_SCOPE) - else() - set(MPI_${lang}_FOUND FALSE PARENT_SCOPE) +function(_MPI_split_include_dirs LANG) + # Backwards compatibility: Search INCLUDE_PATH if given. + if(MPI_${LANG}_INCLUDE_PATH) + list(APPEND MPI_${LANG}_ADDITIONAL_INCLUDE_DIRS "${MPI_${LANG}_INCLUDE_PATH}") endif() + + # We try to find the headers/modules among those paths (and system paths) + # For C/C++, we just need to have a look for mpi.h. + if("${LANG}" MATCHES "(C|CXX)") + find_path(MPI_${LANG}_HEADER_DIR "mpi.h" + HINTS ${MPI_${LANG}_ADDITIONAL_INCLUDE_DIRS} + ) + mark_as_advanced(MPI_${LANG}_HEADER_DIR) + if(MPI_${LANG}_ADDITIONAL_INCLUDE_DIRS) + list(REMOVE_ITEM MPI_${LANG}_ADDITIONAL_INCLUDE_DIRS "${MPI_${LANG}_HEADER_DIR}") + endif() + # Fortran is more complicated here: An implementation could provide + # any of the Fortran 77/90/2008 APIs for MPI. For example, MSMPI + # only provides Fortran 77 and - if mpi.f90 is built - potentially + # a Fortran 90 module. + elseif("${LANG}" STREQUAL "Fortran") + find_path(MPI_${LANG}_F77_HEADER_DIR "mpif.h" + HINTS ${MPI_${LANG}_ADDITIONAL_INCLUDE_DIRS} + ) + find_path(MPI_${LANG}_MODULE_DIR + NAMES "mpi.mod" "mpi_f08.mod" + HINTS ${MPI_${LANG}_ADDITIONAL_INCLUDE_DIRS} + ) + if(MPI_${LANG}_ADDITIONAL_INCLUDE_DIRS) + list(REMOVE_ITEM MPI_${LANG}_ADDITIONAL_INCLUDE_DIRS + "${MPI_${LANG}_F77_HEADER_DIR}" + "${MPI_${LANG}_MODULE_DIR}" + ) + endif() + mark_as_advanced(MPI_${LANG}_F77_HEADER_DIR MPI_${LANG}_MODULE_DIR) + endif() + set(MPI_${LANG}_ADDITIONAL_INCLUDE_DIRS ${MPI_${LANG}_ADDITIONAL_INCLUDE_DIRS} CACHE STRING "MPI ${LANG} additional include directories" FORCE) endfunction() +macro(_MPI_create_imported_target LANG) + if(NOT TARGET MPI::MPI_${LANG}) + add_library(MPI::MPI_${LANG} INTERFACE IMPORTED) + endif() + + set_property(TARGET MPI::MPI_${LANG} PROPERTY INTERFACE_COMPILE_OPTIONS "${MPI_${LANG}_COMPILE_OPTIONS}") + set_property(TARGET MPI::MPI_${LANG} PROPERTY INTERFACE_COMPILE_DEFINITIONS "${MPI_${LANG}_COMPILE_DEFINITIONS}") -# This function attempts to compile with the regular compiler, to see if MPI programs -# work with it. This is a last ditch attempt after we've tried interrogating mpicc and -# friends, and after we've tried to find generic libraries. Works on machines like -# Cray XE6, where the modules environment changes what MPI version cc, CC, and ftn use. -function(try_regular_compiler lang success) - set(scratch_directory ${CMAKE_CURRENT_BINARY_DIR}${CMAKE_FILES_DIRECTORY}) - if (${lang} STREQUAL Fortran) - set(test_file ${scratch_directory}/cmake_mpi_test.f90) - file(WRITE ${test_file} - "program hello\n" - "include 'mpif.h'\n" - "integer ierror\n" - "call MPI_INIT(ierror)\n" - "call MPI_FINALIZE(ierror)\n" - "end\n") + set_property(TARGET MPI::MPI_${LANG} PROPERTY INTERFACE_LINK_LIBRARIES "") + if(MPI_${LANG}_LINK_FLAGS) + set_property(TARGET MPI::MPI_${LANG} APPEND PROPERTY INTERFACE_LINK_LIBRARIES "${MPI_${LANG}_LINK_FLAGS}") + endif() + # If the compiler links MPI implicitly, no libraries will be found as they're contained within + # CMAKE__IMPLICIT_LINK_LIBRARIES already. + if(MPI_${LANG}_LIBRARIES) + set_property(TARGET MPI::MPI_${LANG} APPEND PROPERTY INTERFACE_LINK_LIBRARIES "${MPI_${LANG}_LIBRARIES}") + endif() + # Given the new design of FindMPI, INCLUDE_DIRS will always be located, even under implicit linking. + set_property(TARGET MPI::MPI_${LANG} PROPERTY INTERFACE_INCLUDE_DIRECTORIES "${MPI_${LANG}_INCLUDE_DIRS}") +endmacro() + +function(_MPI_try_staged_settings LANG MPI_TEST_FILE_NAME MODE RUN_BINARY) + set(WORK_DIR "${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/FindMPI") + set(SRC_DIR "${CMAKE_CURRENT_LIST_DIR}/FindMPI") + set(BIN_FILE "${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/FindMPI/${MPI_TEST_FILE_NAME}_${LANG}.bin") + unset(MPI_TEST_COMPILE_DEFINITIONS) + if("${LANG}" STREQUAL "Fortran") + if("${MODE}" STREQUAL "F90_MODULE") + set(MPI_Fortran_INCLUDE_LINE "use mpi\n implicit none") + elseif("${MODE}" STREQUAL "F08_MODULE") + set(MPI_Fortran_INCLUDE_LINE "use mpi_f08\n implicit none") + else() # F77 header + set(MPI_Fortran_INCLUDE_LINE "implicit none\n include 'mpif.h'") + endif() + configure_file("${SRC_DIR}/${MPI_TEST_FILE_NAME}.f90.in" "${WORK_DIR}/${MPI_TEST_FILE_NAME}.f90" @ONLY) + set(MPI_TEST_SOURCE_FILE "${WORK_DIR}/${MPI_TEST_FILE_NAME}.f90") + elseif("${LANG}" STREQUAL "CXX") + configure_file("${SRC_DIR}/${MPI_TEST_FILE_NAME}.c" "${WORK_DIR}/${MPI_TEST_FILE_NAME}.cpp" COPYONLY) + set(MPI_TEST_SOURCE_FILE "${WORK_DIR}/${MPI_TEST_FILE_NAME}.cpp") + if("${MODE}" STREQUAL "TEST_MPICXX") + set(MPI_TEST_COMPILE_DEFINITIONS TEST_MPI_MPICXX) + endif() + else() # C + set(MPI_TEST_SOURCE_FILE "${SRC_DIR}/${MPI_TEST_FILE_NAME}.c") + endif() + if(RUN_BINARY) + try_run(MPI_RUN_RESULT_${LANG}_${MPI_TEST_FILE_NAME}_${MODE} MPI_RESULT_${LANG}_${MPI_TEST_FILE_NAME}_${MODE} + "${CMAKE_BINARY_DIR}" SOURCES "${MPI_TEST_SOURCE_FILE}" + COMPILE_DEFINITIONS ${MPI_TEST_COMPILE_DEFINITIONS} + LINK_LIBRARIES MPI::MPI_${LANG} + RUN_OUTPUT_VARIABLE MPI_RUN_OUTPUT_${LANG}_${MPI_TEST_FILE_NAME}_${MODE}) + set(MPI_RUN_OUTPUT_${LANG}_${MPI_TEST_FILE_NAME}_${MODE} "${MPI_RUN_OUTPUT_${LANG}_${MPI_TEST_FILE_NAME}_${MODE}}" PARENT_SCOPE) else() - if (${lang} STREQUAL CXX) - set(test_file ${scratch_directory}/cmake_mpi_test.cpp) - else() - set(test_file ${scratch_directory}/cmake_mpi_test.c) - endif() - file(WRITE ${test_file} - "#include \n" - "int main(int argc, char **argv) {\n" - " MPI_Init(&argc, &argv);\n" - " MPI_Finalize();\n" - "}\n") - endif() - try_compile(compiler_has_mpi ${scratch_directory} ${test_file}) - if (compiler_has_mpi) - set(MPI_${lang}_NO_INTERROGATE ${CMAKE_${lang}_COMPILER} CACHE STRING "Whether to interrogate MPI ${lang} compiler" FORCE) - set(MPI_${lang}_COMPILER ${CMAKE_${lang}_COMPILER} CACHE STRING "MPI ${lang} compiler" FORCE) - set(MPI_${lang}_COMPILE_FLAGS "" CACHE STRING "MPI ${lang} compilation flags" FORCE) - set(MPI_${lang}_INCLUDE_PATH "" CACHE STRING "MPI ${lang} include path" FORCE) - set(MPI_${lang}_LINK_FLAGS "" CACHE STRING "MPI ${lang} linking flags" FORCE) - set(MPI_${lang}_LIBRARIES "" CACHE STRING "MPI ${lang} libraries to link against" FORCE) - endif() - set(${success} ${compiler_has_mpi} PARENT_SCOPE) - unset(compiler_has_mpi CACHE) + try_compile(MPI_RESULT_${LANG}_${MPI_TEST_FILE_NAME}_${MODE} + "${CMAKE_BINARY_DIR}" SOURCES "${MPI_TEST_SOURCE_FILE}" + COMPILE_DEFINITIONS ${MPI_TEST_COMPILE_DEFINITIONS} + LINK_LIBRARIES MPI::MPI_${LANG} + COPY_FILE "${BIN_FILE}") + endif() endfunction() -# End definitions, commence real work here. +macro(_MPI_check_lang_works LANG) + # For Fortran we may have by the MPI-3 standard an implementation that provides: + # - the mpi_f08 module + # - *both*, the mpi module and 'mpif.h' + # Since older MPI standards (MPI-1) did not define anything but 'mpif.h', we need to check all three individually. + if( NOT MPI_${LANG}_WORKS ) + if("${LANG}" STREQUAL "Fortran") + set(MPI_Fortran_INTEGER_LINE "(kind=MPI_INTEGER_KIND)") + _MPI_try_staged_settings(${LANG} test_mpi F77_HEADER FALSE) + _MPI_try_staged_settings(${LANG} test_mpi F90_MODULE FALSE) + _MPI_try_staged_settings(${LANG} test_mpi F08_MODULE FALSE) + + set(MPI_${LANG}_WORKS FALSE) + + foreach(mpimethod IN ITEMS F77_HEADER F08_MODULE F90_MODULE) + if(MPI_RESULT_${LANG}_test_mpi_${mpimethod}) + set(MPI_${LANG}_WORKS TRUE) + set(MPI_${LANG}_HAVE_${mpimethod} TRUE) + else() + set(MPI_${LANG}_HAVE_${mpimethod} FALSE) + endif() + endforeach() + # MPI-1 versions had no MPI_INTGER_KIND defined, so we need to try without it. + # However, MPI-1 also did not define the Fortran 90 and 08 modules, so we only try the F77 header. + unset(MPI_Fortran_INTEGER_LINE) + if(NOT MPI_${LANG}_WORKS) + _MPI_try_staged_settings(${LANG} test_mpi F77_HEADER_NOKIND FALSE) + if(MPI_RESULT_${LANG}_test_mpi_F77_HEADER_NOKIND) + set(MPI_${LANG}_WORKS TRUE) + set(MPI_${LANG}_HAVE_F77_HEADER TRUE) + endif() + endif() + else() + _MPI_try_staged_settings(${LANG} test_mpi normal FALSE) + # If 'test_mpi' built correctly, we've found valid MPI settings. There might not be MPI-2 C++ support, but there can't + # be MPI-2 C++ support without the C bindings being present, so checking for them is sufficient. + set(MPI_${LANG}_WORKS "${MPI_RESULT_${LANG}_test_mpi_normal}") + endif() + endif() +endmacro() + +# Some systems install various MPI implementations in separate folders in some MPI prefix +# This macro enumerates all such subfolders and adds them to the list of hints that will be searched. +macro(MPI_search_mpi_prefix_folder PREFIX_FOLDER) + if(EXISTS "${PREFIX_FOLDER}") + file(GLOB _MPI_folder_children RELATIVE "${PREFIX_FOLDER}" "${PREFIX_FOLDER}/*") + foreach(_MPI_folder_child IN LISTS _MPI_folder_children) + if(IS_DIRECTORY "${PREFIX_FOLDER}/${_MPI_folder_child}") + list(APPEND MPI_HINT_DIRS "${PREFIX_FOLDER}/${_MPI_folder_child}") + endif() + endforeach() + endif() +endmacro() + +set(MPI_HINT_DIRS ${MPI_HOME} $ENV{MPI_HOME} $ENV{I_MPI_ROOT}) +if("${CMAKE_HOST_SYSTEM_NAME}" STREQUAL "Linux") + # SUSE Linux Enterprise Server stores its MPI implementations under /usr/lib64/mpi/gcc/ + # We enumerate the subfolders and append each as a prefix + MPI_search_mpi_prefix_folder("/usr/lib64/mpi/gcc") +elseif("${CMAKE_HOST_SYSTEM_NAME}" STREQUAL "Windows") + # MSMPI stores its runtime in a special folder, this adds the possible locations to the hints. + list(APPEND MPI_HINT_DIRS $ENV{MSMPI_BIN} "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\MPI;InstallRoot]") +elseif("${CMAKE_HOST_SYSTEM_NAME}" STREQUAL "FreeBSD") + # FreeBSD ships mpich under the normal system paths - but available openmpi implementations + # will be found in /usr/local/mpi/ + MPI_search_mpi_prefix_folder("/usr/local/mpi/") +endif() -# Most mpi distros have some form of mpiexec which gives us something we can reliably look for. -find_program(MPIEXEC - NAMES ${_MPI_EXEC_NAMES} - HINTS ${MPI_HOME} $ENV{MPI_HOME} - PATHS ${_MPI_PREFIX_PATH} - PATH_SUFFIXES bin +# Most MPI distributions have some form of mpiexec or mpirun which gives us something we can look for. +# The MPI standard does not mandate the existence of either, but instead only makes requirements if a distribution +# ships an mpiexec program (mpirun executables are not regulated by the standard). +find_program(MPIEXEC_EXECUTABLE + NAMES ${_MPIEXEC_NAMES} + PATH_SUFFIXES bin sbin + HINTS ${MPI_HINT_DIRS} DOC "Executable for running MPI programs.") # call get_filename_component twice to remove mpiexec and the directory it exists in (typically bin). # This gives us a fairly reliable base directory to search for /bin /lib and /include from. -get_filename_component(_MPI_BASE_DIR "${MPIEXEC}" PATH) +get_filename_component(_MPI_BASE_DIR "${MPIEXEC_EXECUTABLE}" PATH) get_filename_component(_MPI_BASE_DIR "${_MPI_BASE_DIR}" PATH) # According to the MPI standard, section 8.8 -n is a guaranteed, and the only guaranteed way to # launch an MPI process using mpiexec if such a program exists. -set(MPIEXEC_NUMPROC_FLAG "-n" CACHE STRING "Flag used by MPI to specify the number of processes for MPIEXEC; the next option will be the number of processes.") -set(MPIEXEC_PREFLAGS "" CACHE STRING "These flags will be directly before the executable that is being run by MPIEXEC.") -set(MPIEXEC_POSTFLAGS "" CACHE STRING "These flags will come after all flags given to MPIEXEC.") - -# Set the number of processes to the processor count and the previous default -# of 2 if that couldn't be determined. -include(${CMAKE_ROOT}/Modules/ProcessorCount.cmake) -ProcessorCount(_MPIEXEC_NUMPROCS) -if("${_MPIEXEC_NUMPROCS}" EQUAL "0") - set(_MPIEXEC_NUMPROCS 2) -endif() -set(MPIEXEC_MAX_NUMPROCS "${_MPIEXEC_NUMPROCS}" CACHE STRING "Maximum number of processors available to run MPI applications.") -unset(_MPIEXEC_NUMPROCS) -mark_as_advanced(MPIEXEC MPIEXEC_NUMPROC_FLAG MPIEXEC_PREFLAGS MPIEXEC_POSTFLAGS MPIEXEC_MAX_NUMPROCS) +set(MPIEXEC_NUMPROC_FLAG "-n" CACHE STRING "Flag used by MPI to specify the number of processes for mpiexec; the next option will be the number of processes.") +set(MPIEXEC_PREFLAGS "" CACHE STRING "These flags will be directly before the executable that is being run by mpiexec.") +set(MPIEXEC_POSTFLAGS "" CACHE STRING "These flags will be placed after all flags passed to mpiexec.") +# Set the number of processes to the physical processor count +cmake_host_system_information(RESULT _MPIEXEC_NUMPROCS QUERY NUMBER_OF_PHYSICAL_CORES) +set(MPIEXEC_MAX_NUMPROCS "${_MPIEXEC_NUMPROCS}" CACHE STRING "Maximum number of processors available to run MPI applications.") +unset(_MPIEXEC_NUMPROCS) +mark_as_advanced(MPIEXEC_EXECUTABLE MPIEXEC_NUMPROC_FLAG MPIEXEC_PREFLAGS MPIEXEC_POSTFLAGS MPIEXEC_MAX_NUMPROCS) #============================================================================= # Backward compatibility input hacks. Propagate the FindMPI hints to C and # CXX if the respective new versions are not defined. Translate the old -# MPI_LIBRARY and MPI_EXTRA_LIBRARY to respective MPI_${lang}_LIBRARIES. +# MPI_LIBRARY and MPI_EXTRA_LIBRARY to respective MPI_${LANG}_LIBRARIES. # # Once we find the new variables, we translate them back into their old # equivalents below. -foreach (lang C CXX) +foreach (LANG IN ITEMS C CXX) # Old input variables. set(_MPI_OLD_INPUT_VARS COMPILER COMPILE_FLAGS INCLUDE_PATH LINK_FLAGS) # Set new vars based on their old equivalents, if the new versions are not already set. foreach (var ${_MPI_OLD_INPUT_VARS}) - if (NOT MPI_${lang}_${var} AND MPI_${var}) - set(MPI_${lang}_${var} "${MPI_${var}}") + if (NOT MPI_${LANG}_${var} AND MPI_${var}) + set(MPI_${LANG}_${var} "${MPI_${var}}") endif() endforeach() - # Special handling for MPI_LIBRARY and MPI_EXTRA_LIBRARY, which we nixed in the - # new FindMPI. These need to be merged into MPI__LIBRARIES - if (NOT MPI_${lang}_LIBRARIES AND (MPI_LIBRARY OR MPI_EXTRA_LIBRARY)) - set(MPI_${lang}_LIBRARIES ${MPI_LIBRARY} ${MPI_EXTRA_LIBRARY}) + # Chop the old compile flags into options and definitions + if(MPI_${LANG}_COMPILE_FLAGS) + unset(MPI_${LANG}_COMPILE_OPTIONS) + unset(MPI_${LANG}_COMPILE_DEFINITIONS) + separate_arguments(MPI_SEPARATE_FLAGS NATIVE_COMMAND "${MPI_${LANG}_COMPILE_FLAGS}") + foreach(_MPI_FLAG IN LISTS MPI_SEPARATE_FLAGS) + if("${_MPI_FLAG}" MATCHES "^ *[-/D]([^ ]+)") + list(APPEND MPI_${LANG}_COMPILE_DEFINITIONS "${CMAKE_MATCH_1}") + else() + list(APPEND MPI_${LANG}_COMPILE_FLAGS "${_MPI_FLAG}") + endif() + endforeach() + unset(MPI_SEPARATE_FLAGS) + endif() + + # If a list of libraries was given, we'll split it into new-style cache variables + if(NOT MPI_${LANG}_LIB_NAMES) + foreach(_MPI_LIB IN LISTS MPI_${LANG}_LIBRARIES MPI_LIBRARY MPI_EXTRA_LIBRARY) + get_filename_component(_MPI_PLAIN_LIB_NAME "${_MPI_LIB}" NAME_WE) + get_filename_component(_MPI_LIB_NAME "${_MPI_LIB}" NAME) + get_filename_component(_MPI_LIB_DIR "${_MPI_LIB}" DIRECTORY) + list(APPEND MPI_PLAIN_LIB_NAMES_WORK "${_MPI_PLAIN_LIB_NAME}") + find_library(MPI_${_MPI_PLAIN_LIB_NAME}_LIBRARY + NAMES "${_MPI_LIB_NAME}" "lib${_MPI_LIB_NAME}" + HINTS ${_MPI_LIB_DIR} $ENV{MPI_LIB} + DOC "Location of the ${_MPI_PLAIN_LIB_NAME} library for MPI" + ) + mark_as_advanced(MPI_${_MPI_PLAIN_LIB_NAME}_LIBRARY) + endforeach() endif() endforeach() #============================================================================= +unset(MPI_VERSION) +unset(MPI_VERSION_MAJOR) +unset(MPI_VERSION_MINOR) + +unset(_MPI_MIN_VERSION) # This loop finds the compilers and sends them off for interrogation. -foreach (lang C CXX Fortran) - if (CMAKE_${lang}_COMPILER_WORKS) - # If the user supplies a compiler *name* instead of an absolute path, assume that we need to find THAT compiler. - if (MPI_${lang}_COMPILER) - if (NOT IS_ABSOLUTE "${MPI_${lang}_COMPILER}") - # Get rid of our default list of names and just search for the name the user wants. - set(_MPI_${lang}_COMPILER_NAMES ${MPI_${lang}_COMPILER}) - set(MPI_${lang}_COMPILER "MPI_${lang}_COMPILER-NOTFOUND" CACHE FILEPATH "Cleared" FORCE) - endif() - # If the user specifies a compiler, we don't want to try to search libraries either. - set(try_libs FALSE) +foreach(LANG IN ITEMS C CXX Fortran) + if(CMAKE_${LANG}_COMPILER_LOADED) + if(NOT MPI_FIND_COMPONENTS) + set(_MPI_FIND_${LANG} TRUE) + elseif( ${LANG} IN_LIST MPI_FIND_COMPONENTS) + set(_MPI_FIND_${LANG} TRUE) + elseif( ${LANG} STREQUAL CXX AND NOT MPI_CXX_SKIP_MPICXX AND MPICXX IN_LIST MPI_FIND_COMPONENTS ) + set(_MPI_FIND_${LANG} TRUE) else() - set(try_libs TRUE) + set(_MPI_FIND_${LANG} FALSE) endif() + else() + set(_MPI_FIND_${LANG} FALSE) + endif() + if(_MPI_FIND_${LANG}) + if( ${LANG} STREQUAL CXX AND NOT MPICXX IN_LIST MPI_FIND_COMPONENTS ) + set(MPI_CXX_SKIP_MPICXX FALSE CACHE BOOL "If true, the MPI-2 C++ bindings are disabled using definitions.") + mark_as_advanced(MPI_CXX_SKIP_MPICXX) + endif() + if(NOT (MPI_${LANG}_LIB_NAMES AND (MPI_${LANG}_INCLUDE_PATH OR MPI_${LANG}_INCLUDE_DIRS OR MPI_${LANG}_ADDITIONAL_INCLUDE_DIRS))) + if(NOT MPI_${LANG}_COMPILER AND NOT MPI_ASSUME_NO_BUILTIN_MPI) + # Should the imported targets be empty, we effectively try whether the compiler supports MPI on its own, which is the case on e.g. + # Cray PrgEnv. + _MPI_create_imported_target(${LANG}) + _MPI_check_lang_works(${LANG}) + + # If the compiler can build MPI code on its own, it functions as an MPI compiler and we'll set the variable to point to it. + if(MPI_${LANG}_WORKS) + set(MPI_${LANG}_COMPILER "${CMAKE_${LANG}_COMPILER}" CACHE FILEPATH "MPI compiler for ${LANG}" FORCE) + endif() + endif() - find_program(MPI_${lang}_COMPILER - NAMES ${_MPI_${lang}_COMPILER_NAMES} - HINTS ${_MPI_BASE_DIR}/bin - PATHS ${_MPI_PREFIX_PATH} - ) - interrogate_mpi_compiler(${lang} ${try_libs}) - mark_as_advanced(MPI_${lang}_COMPILER) + # If the user specified a library name we assume they prefer that library over a wrapper. If not, they can disable skipping manually. + if(NOT DEFINED MPI_SKIP_COMPILER_WRAPPER AND MPI_GUESS_LIBRARY_NAME) + set(MPI_SKIP_COMPILER_WRAPPER TRUE) + endif() + if(NOT MPI_SKIP_COMPILER_WRAPPER) + if(MPI_${LANG}_COMPILER) + # If the user supplies a compiler *name* instead of an absolute path, assume that we need to find THAT compiler. + if (NOT IS_ABSOLUTE "${MPI_${LANG}_COMPILER}") + # Get rid of our default list of names and just search for the name the user wants. + set(_MPI_${LANG}_COMPILER_NAMES "${MPI_${LANG}_COMPILER}") + unset(MPI_${LANG}_COMPILER CACHE) + endif() + # If the user specifies a compiler, we don't want to try to search libraries either. + set(MPI_PINNED_COMPILER TRUE) + else() + set(MPI_PINNED_COMPILER FALSE) + endif() - # last ditch try -- if nothing works so far, just try running the regular compiler and - # see if we can create an MPI executable. - set(regular_compiler_worked 0) - if (NOT MPI_${lang}_LIBRARIES OR NOT MPI_${lang}_INCLUDE_PATH) - try_regular_compiler(${lang} regular_compiler_worked) - endif() + # If we have an MPI base directory, we'll try all compiler names in that one first. + # This should prevent mixing different MPI environments + if(_MPI_BASE_DIR) + find_program(MPI_${LANG}_COMPILER + NAMES ${_MPI_${LANG}_COMPILER_NAMES} + PATH_SUFFIXES bin sbin + HINTS ${_MPI_BASE_DIR} + NO_DEFAULT_PATH + DOC "MPI compiler for ${LANG}" + ) + endif() + + # If the base directory did not help (for example because the mpiexec isn't in the same directory as the compilers), + # we shall try searching in the default paths. + find_program(MPI_${LANG}_COMPILER + NAMES ${_MPI_${LANG}_COMPILER_NAMES} + PATH_SUFFIXES bin sbin + DOC "MPI compiler for ${LANG}" + ) + + if(MPI_${LANG}_COMPILER STREQUAL CMAKE_${LANG}_COMPILER) + set(MPI_SKIP_GUESSING TRUE) + elseif(MPI_${LANG}_COMPILER) + _MPI_interrogate_compiler(${LANG}) + else() + set(MPI_${LANG}_WRAPPER_FOUND FALSE) + endif() + else() + set(MPI_${LANG}_WRAPPER_FOUND FALSE) + set(MPI_PINNED_COMPILER FALSE) + endif() - # add fortran mpi module path if ENV VAR exists - set (MPI_${lang}_INCLUDE_PATH "${MPI_${lang}_INCLUDE_PATH};$ENV{MPI_FORTRAN_MOD_DIR}") + if(NOT MPI_${LANG}_WRAPPER_FOUND AND NOT MPI_PINNED_COMPILER) + # For C++, we may use the settings for C. Should a given compiler wrapper for C++ not exist, but one for C does, we copy over the + # settings for C. An MPI distribution that is in this situation would be IBM Platform MPI. + if("${LANG}" STREQUAL "CXX" AND MPI_C_WRAPPER_FOUND) + set(MPI_${LANG}_COMPILE_OPTIONS ${MPI_C_COMPILE_OPTIONS} CACHE STRING "MPI ${LANG} compilation options" ) + set(MPI_${LANG}_COMPILE_DEFINITIONS ${MPI_C_COMPILE_DEFINITIONS} CACHE STRING "MPI ${LANG} compilation definitions" ) + set(MPI_${LANG}_ADDITIONAL_INCLUDE_DIRS ${MPI_C_INCLUDE_DIRS} CACHE STRING "MPI ${LANG} additional include directories") + set(MPI_${LANG}_LINK_FLAGS ${MPI_C_LINK_FLAGS} CACHE STRING "MPI ${LANG} linker flags" ) + set(MPI_${LANG}_LIB_NAMES ${MPI_C_LIB_NAMES} CACHE STRING "MPI ${LANG} libraries to link against" ) + set(MPI_${LANG}_WRAPPER_FOUND TRUE) + elseif(NOT MPI_SKIP_GUESSING) + _MPI_guess_settings(${LANG}) + endif() + endif() + endif() - set(MPI_${lang}_FIND_QUIETLY ${MPI_FIND_QUIETLY}) - set(MPI_${lang}_FIND_REQUIRED ${MPI_FIND_REQUIRED}) - set(MPI_${lang}_FIND_VERSION ${MPI_FIND_VERSION}) - set(MPI_${lang}_FIND_VERSION_EXACT ${MPI_FIND_VERSION_EXACT}) + _MPI_split_include_dirs(${LANG}) + if(NOT MPI_${LANG}_COMPILER STREQUAL CMAKE_${LANG}_COMPILER) + _MPI_assemble_include_dirs(${LANG}) + _MPI_assemble_libraries(${LANG}) + endif() + _MPI_adjust_compile_definitions(${LANG}) + # We always create imported targets even if they're empty + _MPI_create_imported_target(${LANG}) - if (regular_compiler_worked) - find_package_handle_standard_args(MPI_${lang} DEFAULT_MSG MPI_${lang}_COMPILER) - else() - find_package_handle_standard_args(MPI_${lang} DEFAULT_MSG MPI_${lang}_LIBRARIES MPI_${lang}_INCLUDE_PATH) + if(NOT MPI_${LANG}_WORKS) + _MPI_check_lang_works(${LANG}) endif() - if(MPI_${lang}_FOUND) - if(NOT TARGET MPI::MPI_${lang}) - add_library(MPI::MPI_${lang} INTERFACE IMPORTED) + # Next, we'll initialize the MPI variables that have not been previously set. + set(MPI_${LANG}_COMPILE_OPTIONS "" CACHE STRING "MPI ${LANG} compilation flags" ) + set(MPI_${LANG}_COMPILE_DEFINITIONS "" CACHE STRING "MPI ${LANG} compilation definitions" ) + set(MPI_${LANG}_ADDITIONAL_INCLUDE_DIRS "" CACHE STRING "MPI ${LANG} additional include directories") + set(MPI_${LANG}_LINK_FLAGS "" CACHE STRING "MPI ${LANG} linker flags" ) + set(MPI_${LANG}_LIB_NAMES "" CACHE STRING "MPI ${LANG} libraries to link against" ) + mark_as_advanced(MPI_${LANG}_COMPILE_OPTIONS MPI_${LANG}_COMPILE_DEFINITIONS MPI_${LANG}_LINK_FLAGS + MPI_${LANG}_LIB_NAMES MPI_${LANG}_ADDITIONAL_INCLUDE_DIRS MPI_${LANG}_COMPILER) + + # If we've found MPI, then we'll perform additional analysis: Determine the MPI version, MPI library version, supported + # MPI APIs (i.e. MPI-2 C++ bindings). For Fortran we also need to find specific parameters if we're under MPI-3. + if(MPI_${LANG}_WORKS) + if("${LANG}" STREQUAL "CXX" AND NOT DEFINED MPI_MPICXX_FOUND) + if(NOT MPI_CXX_SKIP_MPICXX AND NOT MPI_CXX_VALIDATE_SKIP_MPICXX) + _MPI_try_staged_settings(${LANG} test_mpi MPICXX FALSE) + if(MPI_RESULT_${LANG}_test_mpi_MPICXX) + set(MPI_MPICXX_FOUND TRUE) + else() + set(MPI_MPICXX_FOUND FALSE) + endif() + else() + set(MPI_MPICXX_FOUND FALSE) + endif() + endif() + + # At this point, we know the bindings present but not the MPI version or anything else. + if(NOT DEFINED MPI_${LANG}_VERSION) + unset(MPI_${LANG}_VERSION_MAJOR) + unset(MPI_${LANG}_VERSION_MINOR) + endif() + set(MPI_BIN_FOLDER ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/FindMPI) + + # For Fortran, we'll want to use the most modern MPI binding to test capabilities other than the + # Fortran parameters, since those depend on the method of consumption. + # For C++, we can always use the C bindings, and should do so, since the C++ bindings do not exist in MPI-3 + # whereas the C bindings do, and the C++ bindings never offered any feature advantage over their C counterparts. + if("${LANG}" STREQUAL "Fortran") + if(MPI_${LANG}_HAVE_F08_MODULE) + set(MPI_${LANG}_HIGHEST_METHOD F08_MODULE) + elseif(MPI_${LANG}_HAVE_F90_MODULE) + set(MPI_${LANG}_HIGHEST_METHOD F90_MODULE) + else() + set(MPI_${LANG}_HIGHEST_METHOD F77_HEADER) + endif() + + # Another difference between C and Fortran is that we can't use the preprocessor to determine whether MPI_VERSION + # and MPI_SUBVERSION are provided. These defines did not exist in MPI 1.0 and 1.1 and therefore might not + # exist. For C/C++, test_mpi.c will handle the MPI_VERSION extraction, but for Fortran, we need mpiver.f90. + if(NOT DEFINED MPI_${LANG}_VERSION) + _MPI_try_staged_settings(${LANG} mpiver ${MPI_${LANG}_HIGHEST_METHOD} FALSE) + if(MPI_RESULT_${LANG}_mpiver_${MPI_${LANG}_HIGHEST_METHOD}) + file(STRINGS ${MPI_BIN_FOLDER}/mpiver_${LANG}.bin _MPI_VERSION_STRING LIMIT_COUNT 1 REGEX "INFO:MPI-VER") + if("${_MPI_VERSION_STRING}" MATCHES ".*INFO:MPI-VER\\[([0-9]+)\\.([0-9]+)\\].*") + set(MPI_${LANG}_VERSION_MAJOR "${CMAKE_MATCH_1}") + set(MPI_${LANG}_VERSION_MINOR "${CMAKE_MATCH_2}") + set(MPI_${LANG}_VERSION "${MPI_${LANG}_VERSION_MAJOR}.${MPI_${LANG}_VERSION_MINOR}") + endif() + endif() + endif() + + # Finally, we want to find out which capabilities a given interface supports, compare the MPI-3 standard. + # This is determined by interface specific parameters MPI_SUBARRAYS_SUPPORTED and MPI_ASYNC_PROTECTS_NONBLOCKING + # and might vary between the different methods of consumption. + if(MPI_DETERMINE_Fortran_CAPABILITIES AND NOT MPI_Fortran_CAPABILITIES_DETERMINED) + foreach(mpimethod IN ITEMS F08_MODULE F90_MODULE F77_HEADER) + if(MPI_${LANG}_HAVE_${mpimethod}) + set(MPI_${LANG}_${mpimethod}_SUBARRAYS FALSE) + set(MPI_${LANG}_${mpimethod}_ASYNCPROT FALSE) + _MPI_try_staged_settings(${LANG} fortranparam_mpi ${mpimethod} TRUE) + if(MPI_RESULT_${LANG}_fortranparam_mpi_${mpimethod} AND + NOT "${MPI_RUN_RESULT_${LANG}_fortranparam_mpi_${mpimethod}}" STREQUAL "FAILED_TO_RUN") + if("${MPI_RUN_OUTPUT_${LANG}_fortranparam_mpi_${mpimethod}}" MATCHES + ".*INFO:SUBARRAYS\\[ *([TF]) *\\]-ASYNCPROT\\[ *([TF]) *\\].*") + if("${CMAKE_MATCH_1}" STREQUAL "T") + set(MPI_${LANG}_${mpimethod}_SUBARRAYS TRUE) + endif() + if("${CMAKE_MATCH_2}" STREQUAL "T") + set(MPI_${LANG}_${mpimethod}_ASYNCPROT TRUE) + endif() + endif() + endif() + endif() + endforeach() + set(MPI_Fortran_CAPABILITIES_DETERMINED TRUE) + endif() + else() + set(MPI_${LANG}_HIGHEST_METHOD normal) + + # By the MPI-2 standard, MPI_VERSION and MPI_SUBVERSION are valid for both C and C++ bindings. + if(NOT DEFINED MPI_${LANG}_VERSION) + file(STRINGS ${MPI_BIN_FOLDER}/test_mpi_${LANG}.bin _MPI_VERSION_STRING LIMIT_COUNT 1 REGEX "INFO:MPI-VER") + if("${_MPI_VERSION_STRING}" MATCHES ".*INFO:MPI-VER\\[([0-9]+)\\.([0-9]+)\\].*") + set(MPI_${LANG}_VERSION_MAJOR "${CMAKE_MATCH_1}") + set(MPI_${LANG}_VERSION_MINOR "${CMAKE_MATCH_2}") + set(MPI_${LANG}_VERSION "${MPI_${LANG}_VERSION_MAJOR}.${MPI_${LANG}_VERSION_MINOR}") + endif() + endif() endif() - if(MPI_${lang}_COMPILE_FLAGS) - separate_arguments(_MPI_${lang}_COMPILE_OPTIONS NATIVE_COMMAND "${MPI_${lang}_COMPILE_FLAGS}") - set_property(TARGET MPI::MPI_${lang} PROPERTY - INTERFACE_COMPILE_OPTIONS "${_MPI_${lang}_COMPILE_OPTIONS}") + + unset(MPI_BIN_FOLDER) + + # At this point, we have dealt with determining the MPI version and parameters for each Fortran method available. + # The one remaining issue is to determine which MPI library is installed. + # Determining the version and vendor of the MPI library is only possible via MPI_Get_library_version() at runtime, + # and therefore we cannot do this while cross-compiling (a user may still define MPI__LIBRARY_VERSION_STRING + # themselves and we'll attempt splitting it, which is equivalent to provide the try_run output). + # It's also worth noting that the installed version string can depend on the language, or on the system the binary + # runs on if MPI is not statically linked. + if(MPI_DETERMINE_LIBRARY_VERSION AND NOT MPI_${LANG}_LIBRARY_VERSION_STRING) + _MPI_try_staged_settings(${LANG} libver_mpi ${MPI_${LANG}_HIGHEST_METHOD} TRUE) + if(MPI_RESULT_${LANG}_libver_mpi_${MPI_${LANG}_HIGHEST_METHOD} AND + "${MPI_RUN_RESULT_${LANG}_libver_mpi_${MPI_${LANG}_HIGHEST_METHOD}}" EQUAL "0") + string(STRIP "${MPI_RUN_OUTPUT_${LANG}_libver_mpi_${MPI_${LANG}_HIGHEST_METHOD}}" + MPI_${LANG}_LIBRARY_VERSION_STRING) + else() + set(MPI_${LANG}_LIBRARY_VERSION_STRING "NOTFOUND") + endif() endif() + endif() - unset(_MPI_${lang}_LINK_LINE) - if(MPI_${lang}_LINK_FLAGS) - list(APPEND _MPI_${lang}_LINK_LINE "${MPI_${lang}_LINK_FLAGS}") + set(MPI_${LANG}_FIND_QUIETLY ${MPI_FIND_QUIETLY}) + set(MPI_${LANG}_FIND_VERSION ${MPI_FIND_VERSION}) + set(MPI_${LANG}_FIND_VERSION_EXACT ${MPI_FIND_VERSION_EXACT}) + + unset(MPI_${LANG}_REQUIRED_VARS) + if (MPI_${LANG}_WRAPPER_FOUND OR MPI_${LANG}_GUESS_FOUND) + foreach(mpilibname IN LISTS MPI_${LANG}_LIB_NAMES) + list(APPEND MPI_${LANG}_REQUIRED_VARS "MPI_${mpilibname}_LIBRARY") + endforeach() + list(APPEND MPI_${LANG}_REQUIRED_VARS "MPI_${LANG}_LIB_NAMES") + if("${LANG}" STREQUAL "Fortran") + # For Fortran we only need one of the module or header directories to have *some* support for MPI. + if(NOT MPI_${LANG}_MODULE_DIR) + list(APPEND MPI_${LANG}_REQUIRED_VARS "MPI_${LANG}_F77_HEADER_DIR") + endif() + if(NOT MPI_${LANG}_F77_HEADER_DIR) + list(APPEND MPI_${LANG}_REQUIRED_VARS "MPI_${LANG}_MODULE_DIR") + endif() + else() + list(APPEND MPI_${LANG}_REQUIRED_VARS "MPI_${LANG}_HEADER_DIR") + endif() + if(MPI_${LANG}_ADDITIONAL_INCLUDE_VARS) + foreach(mpiincvar IN LISTS MPI_${LANG}_ADDITIONAL_INCLUDE_VARS) + list(APPEND MPI_${LANG}_REQUIRED_VARS "MPI_${mpiincvar}_INCLUDE_DIR") + endforeach() + endif() + # Append the works variable now. If the settings did not work, this will show up properly. + list(APPEND MPI_${LANG}_REQUIRED_VARS "MPI_${LANG}_WORKS") + else() + # If the compiler worked implicitly, use its path as output. + # Should the compiler variable be set, we also require it to work. + list(APPEND MPI_${LANG}_REQUIRED_VARS "MPI_${LANG}_COMPILER") + if(MPI_${LANG}_COMPILER) + list(APPEND MPI_${LANG}_REQUIRED_VARS "MPI_${LANG}_WORKS") endif() - list(APPEND _MPI_${lang}_LINK_LINE "${MPI_${lang}_LIBRARIES}") - set_property(TARGET MPI::MPI_${lang} PROPERTY - INTERFACE_LINK_LIBRARIES "${_MPI_${lang}_LINK_LINE}") + endif() + find_package_handle_standard_args(MPI_${LANG} REQUIRED_VARS ${MPI_${LANG}_REQUIRED_VARS} + VERSION_VAR MPI_${LANG}_VERSION) - set_property(TARGET MPI::MPI_${lang} PROPERTY - INTERFACE_INCLUDE_DIRECTORIES "${MPI_${lang}_INCLUDE_PATH}") + if(DEFINED MPI_${LANG}_VERSION) + if(NOT _MPI_MIN_VERSION OR _MPI_MIN_VERSION VERSION_GREATER MPI_${LANG}_VERSION) + set(_MPI_MIN_VERSION MPI_${LANG}_VERSION) + endif() endif() endif() endforeach() +unset(_MPI_REQ_VARS) +foreach(LANG IN ITEMS C CXX Fortran) + if((NOT MPI_FIND_COMPONENTS AND CMAKE_${LANG}_COMPILER_LOADED) OR LANG IN_LIST MPI_FIND_COMPONENTS) + list(APPEND _MPI_REQ_VARS "MPI_${LANG}_FOUND") + endif() +endforeach() + +if(MPICXX IN_LIST MPI_FIND_COMPONENTS) + list(APPEND _MPI_REQ_VARS "MPI_MPICXX_FOUND") +endif() + +find_package_handle_standard_args(MPI + REQUIRED_VARS ${_MPI_REQ_VARS} + VERSION_VAR ${_MPI_MIN_VERSION} + HANDLE_COMPONENTS) #============================================================================= # More backward compatibility stuff -# -# Bare MPI sans ${lang} vars are set to CXX then C, depending on what was found. + +# For compatibility reasons, we also define MPIEXEC +set(MPIEXEC "${MPIEXEC_EXECUTABLE}") + +# Copy over MPI__INCLUDE_PATH from the assembled INCLUDE_DIRS. +foreach(LANG IN ITEMS C CXX Fortran) + if(MPI_${LANG}_FOUND) + set(MPI_${LANG}_INCLUDE_PATH "${MPI_${LANG}_INCLUDE_DIRS}") + unset(MPI_${LANG}_COMPILE_FLAGS) + if(MPI_${LANG}_COMPILE_OPTIONS) + set(MPI_${LANG}_COMPILE_FLAGS "${MPI_${LANG}_COMPILE_OPTIONS}") + endif() + if(MPI_${LANG}_COMPILE_DEFINITIONS) + foreach(_MPI_DEF IN LISTS MPI_${LANG}_COMPILE_DEFINITIONS) + string(APPEND MPI_${LANG}_COMPILE_FLAGS " -D${_MPI_DEF}") + endforeach() + endif() + endif() +endforeach() + +# Bare MPI sans ${LANG} vars are set to CXX then C, depending on what was found. # This mimics the behavior of the old language-oblivious FindMPI. -set(_MPI_OLD_VARS FOUND COMPILER INCLUDE_PATH COMPILE_FLAGS LINK_FLAGS LIBRARIES) +set(_MPI_OLD_VARS COMPILER INCLUDE_PATH COMPILE_FLAGS LINK_FLAGS LIBRARIES) if (MPI_CXX_FOUND) foreach (var ${_MPI_OLD_VARS}) set(MPI_${var} ${MPI_CXX_${var}}) @@ -704,28 +1428,26 @@ elseif (MPI_C_FOUND) foreach (var ${_MPI_OLD_VARS}) set(MPI_${var} ${MPI_C_${var}}) endforeach() -else() - # Note that we might still have found Fortran, but you'll need to use MPI_Fortran_FOUND - set(MPI_FOUND FALSE) endif() # Chop MPI_LIBRARIES into the old-style MPI_LIBRARY and MPI_EXTRA_LIBRARY, and set them in cache. if (MPI_LIBRARIES) list(GET MPI_LIBRARIES 0 MPI_LIBRARY_WORK) - set(MPI_LIBRARY ${MPI_LIBRARY_WORK} CACHE FILEPATH "MPI library to link against" FORCE) + set(MPI_LIBRARY "${MPI_LIBRARY_WORK}") + unset(MPI_LIBRARY_WORK) else() - set(MPI_LIBRARY "MPI_LIBRARY-NOTFOUND" CACHE FILEPATH "MPI library to link against" FORCE) + set(MPI_LIBRARY "MPI_LIBRARY-NOTFOUND") endif() list(LENGTH MPI_LIBRARIES MPI_NUMLIBS) if (MPI_NUMLIBS GREATER 1) - set(MPI_EXTRA_LIBRARY_WORK ${MPI_LIBRARIES}) + set(MPI_EXTRA_LIBRARY_WORK "${MPI_LIBRARIES}") list(REMOVE_AT MPI_EXTRA_LIBRARY_WORK 0) - set(MPI_EXTRA_LIBRARY ${MPI_EXTRA_LIBRARY_WORK} CACHE STRING "Extra MPI libraries to link against" FORCE) + set(MPI_EXTRA_LIBRARY "${MPI_EXTRA_LIBRARY_WORK}") + unset(MPI_EXTRA_LIBRARY_WORK) else() - set(MPI_EXTRA_LIBRARY "MPI_EXTRA_LIBRARY-NOTFOUND" CACHE STRING "Extra MPI libraries to link against" FORCE) + set(MPI_EXTRA_LIBRARY "MPI_EXTRA_LIBRARY-NOTFOUND") endif() -mark_as_advanced(MPI_LIBRARY MPI_EXTRA_LIBRARY) #============================================================================= # unset these vars to cleanup namespace @@ -733,5 +1455,7 @@ unset(_MPI_OLD_VARS) unset(_MPI_PREFIX_PATH) unset(_MPI_BASE_DIR) foreach (lang C CXX Fortran) - unset(_MPI_${lang}_COMPILER_NAMES) + unset(_MPI_${LANG}_COMPILER_NAMES) endforeach() + +cmake_policy(POP) diff --git a/config/cmake_ext_mod/FindMPI/fortranparam_mpi.f90.in b/config/cmake_ext_mod/FindMPI/fortranparam_mpi.f90.in new file mode 100644 index 0000000..30f912c --- /dev/null +++ b/config/cmake_ext_mod/FindMPI/fortranparam_mpi.f90.in @@ -0,0 +1,4 @@ + program mpi_ver + @MPI_Fortran_INCLUDE_LINE@ + print *, 'INFO:SUBARRAYS[', MPI_SUBARRAYS_SUPPORTED, ']-ASYNCPROT[', MPI_ASYNC_PROTECTS_NONBLOCKING, ']' + end program mpi_ver diff --git a/config/cmake_ext_mod/FindMPI/libver_mpi.c b/config/cmake_ext_mod/FindMPI/libver_mpi.c new file mode 100644 index 0000000..be9d19d --- /dev/null +++ b/config/cmake_ext_mod/FindMPI/libver_mpi.c @@ -0,0 +1,19 @@ +#include + +#ifdef __cplusplus +#include +#else +#include +#endif + +int main(int argc, char* argv[]) +{ + char mpilibver_str[MPI_MAX_LIBRARY_VERSION_STRING]; + int mpilibver_len; + MPI_Get_library_version(mpilibver_str, &mpilibver_len); +#ifdef __cplusplus + std::puts(mpilibver_str); +#else + puts(mpilibver_str); +#endif +} diff --git a/config/cmake_ext_mod/FindMPI/libver_mpi.f90.in b/config/cmake_ext_mod/FindMPI/libver_mpi.f90.in new file mode 100644 index 0000000..7938587 --- /dev/null +++ b/config/cmake_ext_mod/FindMPI/libver_mpi.f90.in @@ -0,0 +1,7 @@ + program mpi_ver + @MPI_Fortran_INCLUDE_LINE@ + character(len=MPI_MAX_LIBRARY_VERSION_STRING) :: mpilibver_str + integer(kind=MPI_INTEGER_KIND) :: ierror, reslen + call MPI_GET_LIBRARY_VERSION(mpilibver_str, reslen, ierror) + print *, mpilibver_str + end program mpi_ver diff --git a/config/cmake_ext_mod/FindMPI/mpiver.f90.in b/config/cmake_ext_mod/FindMPI/mpiver.f90.in new file mode 100644 index 0000000..a254523 --- /dev/null +++ b/config/cmake_ext_mod/FindMPI/mpiver.f90.in @@ -0,0 +1,10 @@ + program mpi_ver + @MPI_Fortran_INCLUDE_LINE@ + integer(kind=kind(MPI_VERSION)), parameter :: zero = ichar('0') + character, dimension(17), parameter :: mpiver_str =& + (/ 'I', 'N', 'F', 'O', ':', 'M', 'P', 'I', '-', 'V', 'E', 'R', '[', & + char(zero + MPI_VERSION), & + '.', & + char(zero + MPI_SUBVERSION), ']' /) + print *, mpiver_str + end program mpi_ver diff --git a/config/cmake_ext_mod/FindMPI/test_mpi.c b/config/cmake_ext_mod/FindMPI/test_mpi.c new file mode 100644 index 0000000..b8a308a --- /dev/null +++ b/config/cmake_ext_mod/FindMPI/test_mpi.c @@ -0,0 +1,37 @@ +#include + +#ifdef __cplusplus +#include +#else +#include +#endif + +#if defined(MPI_VERSION) && defined(MPI_SUBVERSION) +const char mpiver_str[] = { 'I', 'N', + 'F', 'O', + ':', 'M', + 'P', 'I', + '-', 'V', + 'E', 'R', + '[', ('0' + MPI_VERSION), + '.', ('0' + MPI_SUBVERSION), + ']', '\0' }; +#endif + +int main(int argc, char* argv[]) +{ +#if defined(MPI_VERSION) && defined(MPI_SUBVERSION) +#ifdef __cplusplus + std::puts(mpiver_str); +#else + puts(mpiver_str); +#endif +#endif +#ifdef TEST_MPI_MPICXX + MPI::MPI_Init(&argc, &argv); + MPI::MPI_Finalize(); +#else + MPI_Init(&argc, &argv); + MPI_Finalize(); +#endif +} diff --git a/config/cmake_ext_mod/FindMPI/test_mpi.f90.in b/config/cmake_ext_mod/FindMPI/test_mpi.f90.in new file mode 100644 index 0000000..4d43a04 --- /dev/null +++ b/config/cmake_ext_mod/FindMPI/test_mpi.f90.in @@ -0,0 +1,6 @@ + program hello + @MPI_Fortran_INCLUDE_LINE@ + integer@MPI_Fortran_INTEGER_LINE@ ierror + call MPI_INIT(ierror) + call MPI_FINALIZE(ierror) + end program diff --git a/fortran/CMakeLists.txt b/fortran/CMakeLists.txt index f7179cf..075e1da 100644 --- a/fortran/CMakeLists.txt +++ b/fortran/CMakeLists.txt @@ -2,8 +2,6 @@ cmake_minimum_required (VERSION 3.2.2) PROJECT (HDF5_F90 C CXX Fortran) if (H5_HAVE_PARALLEL) - INCLUDE (FindMPI) - set (LINK_LIBS ${LINK_LIBS} ${MPI_Fortran_LIBRARIES}) if (MPI_Fortran_LINK_FLAGS) set (CMAKE_EXE_LINKER_FLAGS "${MPI_Fortran_LINK_FLAGS} ${CMAKE_EXE_LINKER_FLAGS}") endif () diff --git a/fortran/examples/CMakeLists.txt b/fortran/examples/CMakeLists.txt index a5c3422..82cbd5c 100644 --- a/fortran/examples/CMakeLists.txt +++ b/fortran/examples/CMakeLists.txt @@ -107,7 +107,6 @@ if (H5_HAVE_PARALLEL AND MPI_Fortran_FOUND) target_link_libraries (f90_ex_ph5example ${HDF5_F90_LIB_TARGET} ${HDF5_LIB_TARGET} - ${MPI_Fortran_LIBRARIES} ) target_include_directories (f90_ex_ph5example PRIVATE ${CMAKE_Fortran_MODULE_DIRECTORY}/static) set_target_properties (f90_ex_ph5example PROPERTIES @@ -122,7 +121,6 @@ if (H5_HAVE_PARALLEL AND MPI_Fortran_FOUND) target_link_libraries (f90_ex_ph5example-shared ${HDF5_F90_LIBSH_TARGET} ${HDF5_LIBSH_TARGET} - ${MPI_Fortran_LIBRARIES} ) target_include_directories (f90_ex_ph5example-shared PRIVATE ${CMAKE_Fortran_MODULE_DIRECTORY}/shared) set_target_properties (f90_ex_ph5example-shared PROPERTIES diff --git a/fortran/examples/CMakeTests.cmake b/fortran/examples/CMakeTests.cmake index 3403571..b130f30 100644 --- a/fortran/examples/CMakeTests.cmake +++ b/fortran/examples/CMakeTests.cmake @@ -153,8 +153,8 @@ if (HDF5_ENABLE_F2003) endif () if (H5_HAVE_PARALLEL AND MPI_Fortran_FOUND) - add_test (NAME f90_ex_ph5example COMMAND ${MPIEXEC} ${MPIEXEC_PREFLAGS} ${MPIEXEC_NUMPROC_FLAG} ${MPIEXEC_MAX_NUMPROCS} ${MPIEXEC_POSTFLAGS} $) + add_test (NAME f90_ex_ph5example COMMAND ${MPIEXEC_EXECUTABLE} ${MPIEXEC_NUMPROC_FLAG} ${MPIEXEC_MAX_NUMPROCS} ${MPIEXEC_PREFLAGS} $ ${MPIEXEC_POSTFLAGS}) if (BUILD_SHARED_LIBS AND NOT SKIP_HDF5_FORTRAN_SHARED) - add_test (NAME f90_ex-shared_ph5example COMMAND ${MPIEXEC} ${MPIEXEC_PREFLAGS} ${MPIEXEC_NUMPROC_FLAG} ${MPIEXEC_MAX_NUMPROCS} ${MPIEXEC_POSTFLAGS} $) + add_test (NAME f90_ex-shared_ph5example COMMAND ${MPIEXEC_EXECUTABLE} ${MPIEXEC_NUMPROC_FLAG} ${MPIEXEC_MAX_NUMPROCS} ${MPIEXEC_PREFLAGS} $ ${MPIEXEC_POSTFLAGS}) endif () endif () diff --git a/fortran/src/CMakeLists.txt b/fortran/src/CMakeLists.txt index 6d51feb..51db4f0 100644 --- a/fortran/src/CMakeLists.txt +++ b/fortran/src/CMakeLists.txt @@ -241,9 +241,9 @@ endif () add_library (${HDF5_F90_LIB_TARGET} STATIC ${f90_F_SOURCES}) set (SHARED_LINK_FLAGS " ") TARGET_FORTRAN_PROPERTIES (${HDF5_F90_LIB_TARGET} STATIC " " " ") -target_link_libraries (${HDF5_F90_LIB_TARGET} ${HDF5_F90_C_LIB_TARGET} ${HDF5_LIB_TARGET}) +target_link_libraries (${HDF5_F90_LIB_TARGET} ${HDF5_F90_C_LIB_TARGET} ${HDF5_LIB_TARGET} ${LINK_Fortran_LIBS}) if (H5_HAVE_PARALLEL AND MPI_Fortran_FOUND) - target_link_libraries (${HDF5_F90_LIB_TARGET} ${MPI_Fortran_LIBRARIES}) + target_include_directories (${HDF5_F90_LIB_TARGET} PUBLIC ${MPI_Fortran_INCLUDE_DIRS}) endif () set_global_variable (HDF5_LIBRARIES_TO_EXPORT "${HDF5_LIBRARIES_TO_EXPORT};${HDF5_F90_LIB_TARGET}") H5_SET_LIB_OPTIONS (${HDF5_F90_LIB_TARGET} ${HDF5_F90_LIB_NAME} STATIC) @@ -268,9 +268,9 @@ if (BUILD_SHARED_LIBS AND NOT SKIP_HDF5_FORTRAN_SHARED) set (SHARED_LINK_FLAGS "/DLL /DEF:${HDF5_F90_SRC_BINARY_DIR}/hdf5_fortrandll.def") endif () TARGET_FORTRAN_PROPERTIES (${HDF5_F90_LIBSH_TARGET} SHARED " " ${SHARED_LINK_FLAGS}) - target_link_libraries (${HDF5_F90_LIBSH_TARGET} ${HDF5_F90_C_LIBSH_TARGET} ${HDF5_LIBSH_TARGET}) + target_link_libraries (${HDF5_F90_LIBSH_TARGET} ${HDF5_F90_C_LIBSH_TARGET} ${HDF5_LIBSH_TARGET} ${LINK_Fortran_LIBS}) if (H5_HAVE_PARALLEL AND MPI_Fortran_FOUND) - target_link_libraries (${HDF5_F90_LIBSH_TARGET} ${MPI_Fortran_LIBRARIES}) + target_include_directories (${HDF5_F90_LIBSH_TARGET} PUBLIC ${MPI_Fortran_INCLUDE_DIRS}) endif () set_global_variable (HDF5_LIBRARIES_TO_EXPORT "${HDF5_LIBRARIES_TO_EXPORT};${HDF5_F90_LIBSH_TARGET}") H5_SET_LIB_OPTIONS (${HDF5_F90_LIBSH_TARGET} ${HDF5_F90_LIB_NAME} SHARED ${HDF5_F_PACKAGE_SOVERSION}) diff --git a/fortran/testpar/CMakeLists.txt b/fortran/testpar/CMakeLists.txt index 909cbaf..4aa7f43 100644 --- a/fortran/testpar/CMakeLists.txt +++ b/fortran/testpar/CMakeLists.txt @@ -4,7 +4,7 @@ PROJECT (HDF5_FORTRAN_TESTPAR C CXX Fortran) #----------------------------------------------------------------------------- # Setup include Directories #----------------------------------------------------------------------------- -INCLUDE_DIRECTORIES (${MPI_Fortran_INCLUDE_PATH} ${HDF5_F90_BINARY_DIR} ${HDF5_F90_SRC_DIR}/src) +set (TESTPAR_INCLUDES ${MPI_Fortran_INCLUDE_DIRS} ${CMAKE_Fortran_MODULE_DIRECTORY}/static ${HDF5_F90_BINARY_DIR} ${HDF5_F90_SRC_DIR}/src) #----------------------------------------------------------------------------- # Add Tests @@ -27,7 +27,7 @@ target_link_libraries (parallel_test if (WIN32 AND MSVC) target_link_libraries (parallel_test "ws2_32.lib") endif () -target_include_directories (parallel_test PRIVATE ${CMAKE_Fortran_MODULE_DIRECTORY}/static) +target_include_directories (parallel_test PRIVATE ${TESTPAR_INCLUDES}) set_target_properties (parallel_test PROPERTIES LINKER_LANGUAGE Fortran) set_target_properties (parallel_test PROPERTIES FOLDER test/fortran) diff --git a/fortran/testpar/CMakeTests.cmake b/fortran/testpar/CMakeTests.cmake index 5736256..d00a6fc 100644 --- a/fortran/testpar/CMakeTests.cmake +++ b/fortran/testpar/CMakeTests.cmake @@ -15,4 +15,4 @@ ### T E S T I N G ### ############################################################################## ############################################################################## -add_test (NAME FORT_parallel_test COMMAND ${MPIEXEC} ${MPIEXEC_PREFLAGS} ${MPIEXEC_NUMPROC_FLAG} ${MPIEXEC_MAX_NUMPROCS} ${MPIEXEC_POSTFLAGS} $) +add_test (NAME FORT_parallel_test COMMAND ${MPIEXEC_EXECUTABLE} ${MPIEXEC_NUMPROC_FLAG} ${MPIEXEC_MAX_NUMPROCS} ${MPIEXEC_PREFLAGS} $ ${MPIEXEC_POSTFLAGS}) diff --git a/release_docs/RELEASE.txt b/release_docs/RELEASE.txt index 326053c..f8ed5d0 100644 --- a/release_docs/RELEASE.txt +++ b/release_docs/RELEASE.txt @@ -288,6 +288,17 @@ Bug Fixes since HDF5-1.10.1 release Configuration ------------- + - cmake MPI + + CMake implementation for MPI was problematic and would create incorrect + MPI library references in the hdf5 libraries. + + Reworked the CMake MPI code to properly create CMake targets.Also merged + the latest CMake FindMPI.cmake changes to the local copy. This is necessary + until HDF changes the CMake minimum to 3.9 or greater. + + (ADB - 2017/11/02, HDFFV-10321) + - Corrected FORTRAN_HAVE_C_LONG_DOUBLE processing in the autotools. A bug in the autotools Fortran processing code always set the diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 96ea589..4be86a9 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -881,12 +881,12 @@ set (gen_SRCS ${HDF5_BINARY_DIR}/H5Tinit.c ${HDF5_BINARY_DIR}/H5lib_settings.c) add_library (${HDF5_LIB_TARGET} STATIC ${common_SRCS} ${gen_SRCS} ${H5_PUBLIC_HEADERS} ${H5_PRIVATE_HEADERS} ${H5_GENERATED_HEADERS}) TARGET_C_PROPERTIES (${HDF5_LIB_TARGET} STATIC " " " ") -target_link_libraries (${HDF5_LIB_TARGET} ${LINK_LIBS}) +target_link_libraries (${HDF5_LIB_TARGET} PUBLIC ${LINK_LIBS}) if (NOT WIN32) - target_link_libraries (${HDF5_LIB_TARGET} dl) + target_link_libraries (${HDF5_LIB_TARGET} PUBLIC dl) endif () if (H5_HAVE_PARALLEL AND MPI_C_FOUND) - target_link_libraries (${HDF5_LIB_TARGET} ${MPI_C_LIBRARIES}) + target_include_directories (${HDF5_LIB_TARGET} PUBLIC ${MPI_C_INCLUDE_DIRS}) endif () set_global_variable (HDF5_LIBRARIES_TO_EXPORT ${HDF5_LIB_TARGET}) H5_SET_LIB_OPTIONS (${HDF5_LIB_TARGET} ${HDF5_LIB_NAME} STATIC) @@ -925,12 +925,12 @@ if (BUILD_SHARED_LIBS) set (shared_gen_SRCS ${HDF5_BINARY_DIR}/shared/H5Tinit.c ${HDF5_BINARY_DIR}/shared/H5lib_settings.c) add_library (${HDF5_LIBSH_TARGET} SHARED ${common_SRCS} ${shared_gen_SRCS} ${H5_PUBLIC_HEADERS} ${H5_PRIVATE_HEADERS} ${H5_GENERATED_HEADERS}) TARGET_C_PROPERTIES (${HDF5_LIBSH_TARGET} SHARED " " " ") - target_link_libraries (${HDF5_LIBSH_TARGET} ${LINK_SHARED_LIBS}) + target_link_libraries (${HDF5_LIBSH_TARGET} PUBLIC ${LINK_SHARED_LIBS}) if (NOT WIN32) - target_link_libraries (${HDF5_LIBSH_TARGET} dl) + target_link_libraries (${HDF5_LIBSH_TARGET} PUBLIC dl) endif () if (H5_HAVE_PARALLEL AND MPI_C_FOUND) - target_link_libraries (${HDF5_LIBSH_TARGET} ${MPI_C_LIBRARIES}) + target_include_directories (${HDF5_LIBSH_TARGET} PUBLIC ${MPI_C_INCLUDE_DIRS}) endif () set_global_variable (HDF5_LIBRARIES_TO_EXPORT "${HDF5_LIBRARIES_TO_EXPORT};${HDF5_LIBSH_TARGET}") H5_SET_LIB_OPTIONS (${HDF5_LIBSH_TARGET} ${HDF5_LIB_NAME} SHARED ${HDF5_PACKAGE_SOVERSION}) @@ -945,7 +945,7 @@ if (BUILD_SHARED_LIBS) APPEND PROPERTY COMPILE_DEFINITIONS "H5_HAVE_THREADSAFE" ) - target_link_libraries (${HDF5_LIBSH_TARGET} Threads::Threads) + target_link_libraries (${HDF5_LIBSH_TARGET} PUBLIC Threads::Threads) endif () if (HDF5_ENABLE_DEBUG_APIS) diff --git a/testpar/CMakeLists.txt b/testpar/CMakeLists.txt index 0c9f70e..b116d66 100644 --- a/testpar/CMakeLists.txt +++ b/testpar/CMakeLists.txt @@ -30,14 +30,14 @@ set (testphdf5_SOURCES add_executable (testphdf5 ${testphdf5_SOURCES}) TARGET_NAMING (testphdf5 STATIC) TARGET_C_PROPERTIES (testphdf5 STATIC " " " ") -target_link_libraries (testphdf5 ${HDF5_TEST_LIB_TARGET} ${HDF5_LIB_TARGET} ${LINK_LIBS}) +target_link_libraries (testphdf5 ${HDF5_TEST_LIB_TARGET} ${HDF5_LIB_TARGET}) set_target_properties (testphdf5 PROPERTIES FOLDER test/par) MACRO (ADD_H5P_EXE file) add_executable (${file} ${HDF5_TEST_PAR_SOURCE_DIR}/${file}.c) TARGET_NAMING (${file} STATIC) TARGET_C_PROPERTIES (${file} STATIC " " " ") - target_link_libraries (${file} ${HDF5_TEST_LIB_TARGET} ${HDF5_LIB_TARGET} ${LINK_LIBS}) + target_link_libraries (${file} ${HDF5_TEST_LIB_TARGET} ${HDF5_LIB_TARGET}) set_target_properties (${file} PROPERTIES FOLDER test/par) ENDMACRO (ADD_H5P_EXE file) diff --git a/testpar/CMakeTests.cmake b/testpar/CMakeTests.cmake index 6e2b05e..87470f3 100644 --- a/testpar/CMakeTests.cmake +++ b/testpar/CMakeTests.cmake @@ -16,10 +16,10 @@ ############################################################################## ############################################################################## -add_test (NAME TEST_PAR_testphdf5 COMMAND ${MPIEXEC} ${MPIEXEC_PREFLAGS} ${MPIEXEC_NUMPROC_FLAG} ${MPIEXEC_MAX_NUMPROCS} ${MPIEXEC_POSTFLAGS} $) +add_test (NAME TEST_PAR_testphdf5 COMMAND ${MPIEXEC_EXECUTABLE} ${MPIEXEC_NUMPROC_FLAG} ${MPIEXEC_MAX_NUMPROCS} ${MPIEXEC_PREFLAGS} $ ${MPIEXEC_POSTFLAGS}) foreach (testp ${H5P_TESTS}) - add_test (NAME TEST_PAR_${testp} COMMAND ${MPIEXEC} ${MPIEXEC_PREFLAGS} ${MPIEXEC_NUMPROC_FLAG} ${MPIEXEC_MAX_NUMPROCS} ${MPIEXEC_POSTFLAGS} $) + add_test (NAME TEST_PAR_${testp} COMMAND ${MPIEXEC_EXECUTABLE} ${MPIEXEC_NUMPROC_FLAG} ${MPIEXEC_MAX_NUMPROCS} ${MPIEXEC_PREFLAGS} $ ${MPIEXEC_POSTFLAGS}) endforeach () # The following will only be correct on windows shared diff --git a/tools/test/h5diff/CMakeTests.cmake b/tools/test/h5diff/CMakeTests.cmake index d87a47f..bbc39d8 100644 --- a/tools/test/h5diff/CMakeTests.cmake +++ b/tools/test/h5diff/CMakeTests.cmake @@ -447,7 +447,7 @@ macro (ADD_PH5_TEST resultfile resultcode) # If using memchecker add tests without using scripts if (HDF5_ENABLE_USING_MEMCHECKER) - add_test (NAME PH5DIFF-${resultfile} COMMAND $ ${MPIEXEC} ${MPIEXEC_PREFLAGS} ${MPIEXEC_NUMPROC_FLAG} ${MPIEXEC_MAX_NUMPROCS} ${MPIEXEC_POSTFLAGS} ${ARGN}) + add_test (NAME PH5DIFF-${resultfile} COMMAND ${MPIEXEC_EXECUTABLE} ${MPIEXEC_NUMPROC_FLAG} ${MPIEXEC_MAX_NUMPROCS} ${MPIEXEC_PREFLAGS} $ ${MPIEXEC_POSTFLAGS} ${ARGN}) set_tests_properties (PH5DIFF-${resultfile} PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/PAR/testfiles") if (NOT "${resultcode}" STREQUAL "0") set_tests_properties (PH5DIFF-${resultfile} PROPERTIES WILL_FAIL "true") @@ -470,7 +470,7 @@ add_test ( NAME PH5DIFF-${resultfile} COMMAND "${CMAKE_COMMAND}" - -D "TEST_PROGRAM=${MPIEXEC};${MPIEXEC_PREFLAGS};${MPIEXEC_NUMPROC_FLAG};${MPIEXEC_MAX_NUMPROCS};${MPIEXEC_POSTFLAGS};$" + -D "TEST_PROGRAM=${MPIEXEC_EXECUTABLE};${MPIEXEC_NUMPROC_FLAG};${MPIEXEC_MAX_NUMPROCS};${MPIEXEC_PREFLAGS};$;${MPIEXEC_POSTFLAGS}" -D "TEST_ARGS:STRING=${ARGN}" -D "TEST_FOLDER=${PROJECT_BINARY_DIR}/PAR/testfiles" -D "TEST_OUTPUT=${resultfile}.out" diff --git a/tools/test/perform/CMakeTests.cmake b/tools/test/perform/CMakeTests.cmake index 1f67abe..450667a 100644 --- a/tools/test/perform/CMakeTests.cmake +++ b/tools/test/perform/CMakeTests.cmake @@ -170,9 +170,9 @@ endif () set_tests_properties (PERFORM_zip_perf PROPERTIES DEPENDS "PERFORM_zip_perf_help;PERFORM_h5perform-clearall-objects") if (H5_HAVE_PARALLEL) - add_test (NAME PERFORM_h5perf COMMAND ${MPIEXEC} ${MPIEXEC_PREFLAGS} ${MPIEXEC_NUMPROC_FLAG} ${MPIEXEC_MAX_NUMPROCS} ${MPIEXEC_POSTFLAGS} $) + add_test (NAME PERFORM_h5perf COMMAND ${MPIEXEC_EXECUTABLE} ${MPIEXEC_NUMPROC_FLAG} ${MPIEXEC_MAX_NUMPROCS} ${MPIEXEC_PREFLAGS} $ ${MPIEXEC_POSTFLAGS}) if (HDF5_BUILD_PERFORM_STANDALONE) - add_test (NAME PERFORM_h5perf_alone COMMAND ${MPIEXEC} ${MPIEXEC_PREFLAGS} ${MPIEXEC_NUMPROC_FLAG} ${MPIEXEC_MAX_NUMPROCS} ${MPIEXEC_POSTFLAGS} $) + add_test (NAME PERFORM_h5perf_alone COMMAND ${MPIEXEC_EXECUTABLE} ${MPIEXEC_NUMPROC_FLAG} ${MPIEXEC_MAX_NUMPROCS} ${MPIEXEC_PREFLAGS} $ ${MPIEXEC_POSTFLAGS}) endif () endif () -- cgit v0.12 From b18aeed09a6af6fc15d35447deadcb1dbe41749b Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Thu, 2 Nov 2017 10:35:38 -0500 Subject: HDFFV-10321 Merge changes from develop --- CMakeLists.txt | 6 ++++-- MANIFEST | 6 ++++++ 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 2ec2b2d..f21f8b7 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -877,6 +877,8 @@ if (EXISTS "${HDF5_SOURCE_DIR}/fortran" AND IS_DIRECTORY "${HDF5_SOURCE_DIR}/for endif () include (${HDF_RESOURCES_DIR}/HDF5UseFortran.cmake) + set (LINK_Fortran_LIBS ${LINK_LIBS}) + set (LINK_Fortran_SHARED_LIBS ${LINK_SHARED_LIBS}) if (HDF5_ENABLE_F2003) if (NOT FORTRAN_HAVE_ISO_C_BINDING) @@ -886,8 +888,8 @@ if (EXISTS "${HDF5_SOURCE_DIR}/fortran" AND IS_DIRECTORY "${HDF5_SOURCE_DIR}/for # Parallel IO usage requires MPI to be Linked and Included if (H5_HAVE_PARALLEL) - set (LINK_Fortran_LIBS ${LINK_LIBS} ${MPI_Fortran_LIBRARIES}) - set (LINK_Fortran_SHARED_LIBS ${LINK_SHARED_LIBS} ${MPI_Fortran_LIBRARIES}) + set (LINK_Fortran_LIBS ${LINK_Fortran_LIBS} ${MPI_Fortran_LIBRARIES}) + set (LINK_Fortran_SHARED_LIBS ${LINK_Fortran_SHARED_LIBS} ${MPI_Fortran_LIBRARIES}) if (MPI_Fortran_LINK_FLAGS) set (CMAKE_Fortran_EXE_LINKER_FLAGS "${MPI_Fortran_LINK_FLAGS} ${CMAKE_EXE_LINKER_FLAGS}") endif () diff --git a/MANIFEST b/MANIFEST index c325e64..4270479 100644 --- a/MANIFEST +++ b/MANIFEST @@ -3107,6 +3107,12 @@ ./config/cmake_ext_mod/NSIS.template.in ./config/cmake_ext_mod/runTest.cmake ./config/cmake_ext_mod/version.plist.in +./config/cmake_ext_mod/FindMPI/fortranparam_mpi.f90.in +./config/cmake_ext_mod/FindMPI/libver_mpi.c +./config/cmake_ext_mod/FindMPI/libver_mpi.f90.in +./config/cmake_ext_mod/FindMPI/mpiver.f90.in +./config/cmake_ext_mod/FindMPI/test_mpi.c +./config/cmake_ext_mod/FindMPI/test_mpi.f90.in # CMake-specific User Files ./config/cmake/UserMacros/Windows_MT.cmake -- cgit v0.12 From 4c1d3a9126ef86ad3785377fbbc98e7d505c71c6 Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Thu, 2 Nov 2017 10:55:29 -0500 Subject: Add missing fortran dir reference --- fortran/examples/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fortran/examples/CMakeLists.txt b/fortran/examples/CMakeLists.txt index 82cbd5c..426df7e 100644 --- a/fortran/examples/CMakeLists.txt +++ b/fortran/examples/CMakeLists.txt @@ -81,7 +81,7 @@ foreach (example ${F2003_examples}) set_target_properties (f03_ex_${example} PROPERTIES LINKER_LANGUAGE Fortran FOLDER examples/fortran03 - Fortran_MODULE_DIRECTORY ${CMAKE_Fortran_MODULE_DIRECTORY} + Fortran_MODULE_DIRECTORY ${CMAKE_Fortran_MODULE_DIRECTORY}/static ) if (BUILD_SHARED_LIBS AND NOT SKIP_HDF5_FORTRAN_SHARED) add_executable (f03_ex_${example}-shared ${HDF5_F90_EXAMPLES_SOURCE_DIR}/${example}.f90) -- cgit v0.12 From 3e01676fa4820594abdc31fe1e6ddc716ddb7311 Mon Sep 17 00:00:00 2001 From: Richard Warren Date: Thu, 2 Nov 2017 21:24:38 -0400 Subject: Add the modifications for Cmake testing to a 1_10 based branch: HDFFV-10318 --- testpar/t_pread.c | 46 ++++++++++++++++++++++++++++++++++++++++------ 1 file changed, 40 insertions(+), 6 deletions(-) diff --git a/testpar/t_pread.c b/testpar/t_pread.c index b5a84f2..a527503 100644 --- a/testpar/t_pread.c +++ b/testpar/t_pread.c @@ -55,6 +55,9 @@ fools.\n"; static int generate_test_file(MPI_Comm comm, int mpi_rank, int group); static int test_parallel_read(MPI_Comm comm, int mpi_rank, int group); +static char *test_argv0 = NULL; +extern char *dirname(char *path); /* Avoids additional includes */ + /*------------------------------------------------------------------------- * Function: generate_test_file @@ -392,9 +395,29 @@ generate_test_file( MPI_Comm comm, int mpi_rank, int group_id ) if ( pass ) { char cmd[256]; - - HDsprintf(cmd, "../tools/src/h5jam/h5jam -i %s -u %s -o %s", - data_filename, prolog_filename, reloc_data_filename); + char exe_path[256]; + char *relative_path = "../tools/src/h5jam"; + char *exe_dirname = relative_path; + + /* We're checking for the existance of the h5jam utility + * With Cmake testing, all binaries are in the same directory + * e.g. the same location where this executable is found. + * We've copied the argv[0] argument and check to see + * if h5jam is co-located here. Otherwise, the autotools + * put things into directories, hence the relative path. + */ + if (test_argv0 != NULL) { + HDstrncpy(exe_path, test_argv0, sizeof(exe_path)); + if ( (exe_dirname = (char *)dirname(exe_path)) != NULL) { + HDsprintf(cmd, "%s/h5jam", exe_dirname); + if ( HDaccess(cmd, F_OK) != 0) + exe_dirname = relative_path; + } + } + HDsprintf(cmd, "%s/h5jam -i %s -u %s -o %s", + exe_dirname, + data_filename, + prolog_filename, reloc_data_filename); if ( system(cmd) != 0 ) { pass = FALSE; @@ -680,7 +703,7 @@ test_parallel_read(MPI_Comm comm, int mpi_rank, int group_id) } /* collect results from other processes. - * Only overwrite the failure message if no preveious error + * Only overwrite the failure message if no previous error * has been detected */ local_failure = ( pass ? 0 : 1 ); @@ -761,6 +784,17 @@ main( int argc, char **argv) int split_size; MPI_Comm group_comm = MPI_COMM_WORLD; + /* I don't believe that argv[0] can ever be NULL. + * It should thus be safe to dup and save as a check + * for cmake testing. Note that in our Cmake builds, + * all executables are located in the same directory. + * We assume (but we'll check) that the h5jam utility + * is in the directory as this executable. If that + * isn't true, then we can use a relative path that + * should be valid for the autotools environment. + */ + test_argv0 = HDstrdup(argv[0]); + if ( (MPI_Init(&argc, &argv)) != MPI_SUCCESS) { HDfprintf(stderr, "FATAL: Unable to initialize MPI\n"); HDexit(EXIT_FAILURE); @@ -785,11 +819,11 @@ main( int argc, char **argv) HDfprintf(stdout, "========================================\n"); } - if ( mpi_size < 4 ) { + if ( mpi_size < 3 ) { if ( mpi_rank == 0 ) { - HDprintf(" Need at least 4 processes. Exiting.\n"); + HDprintf(" Need at least 3 processes. Exiting.\n"); } goto finish; } -- cgit v0.12 From e78651f0db850dc68c2595b185b0ecc4e9fe9cb3 Mon Sep 17 00:00:00 2001 From: Richard Warren Date: Thu, 2 Nov 2017 21:32:51 -0400 Subject: Fix the H5WATCH_SOURCES definition --- hl/tools/h5watch/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hl/tools/h5watch/CMakeLists.txt b/hl/tools/h5watch/CMakeLists.txt index fde40e3..6b8d5f2 100644 --- a/hl/tools/h5watch/CMakeLists.txt +++ b/hl/tools/h5watch/CMakeLists.txt @@ -5,7 +5,7 @@ PROJECT (HDF5_HL_TOOLS_H5WATCH) # Define Sources #----------------------------------------------------------------------------- set (H5WATCH_SOURCES - ${HDF5_HL_TOOLS_H5WATCH_SOURCE_DIR}/h5watch + ${HDF5_HL_TOOLS_H5WATCH_SOURCE_DIR}/h5watch.c ) #-- Add h5watch program -- cgit v0.12 From 84dd98014a66037cda8edab5a35c32c52be1d35d Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Mon, 6 Nov 2017 09:28:57 -0600 Subject: Correct issue number --- release_docs/RELEASE.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/release_docs/RELEASE.txt b/release_docs/RELEASE.txt index 572b355..aaffaee 100644 --- a/release_docs/RELEASE.txt +++ b/release_docs/RELEASE.txt @@ -368,7 +368,7 @@ Bug Fixes since HDF5-1.10.1 release Added another parameter to the 'UD=' option to set the flag by default to '0' or H5Z_FLAG_MANDATORY, the other choice is '1' or H5Z_FLAG_OPTIONAL. - (ADB - 2017/08/31, HDFFV-10276) + (ADB - 2017/08/31, HDFFV-10269) - h5ls -- cgit v0.12 From e496d0853f9361a40945e0d2690e312b1a00301c Mon Sep 17 00:00:00 2001 From: Richard Warren Date: Mon, 6 Nov 2017 12:30:40 -0500 Subject: Update the release.txt file with a description of the fix for bug HDFFV-10318 --- release_docs/RELEASE.txt | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/release_docs/RELEASE.txt b/release_docs/RELEASE.txt index aaffaee..4eb7995 100644 --- a/release_docs/RELEASE.txt +++ b/release_docs/RELEASE.txt @@ -335,6 +335,17 @@ Bug Fixes since HDF5-1.10.1 release (ADB - 2017/07/12, HDFFV-10254) + - cmake test execution environment + + The parallel HDF5 test: 't_pread' assumed the use of autotools + and the directory structure associated with that testing approach. + Modified the test code to check whether the 'h5jam' utility can be + found in the same directory as the test executable (which is + preferred directory structure utilized by cmake) and if found + will invoke the tool directly rather than utilizing a relative path. + + (RAW - 2017/11/03, HDFFV-10318) + Performance ------------- - -- cgit v0.12 From 51a5ef118c767c8ca23e98ea5d7dafbdb585df4b Mon Sep 17 00:00:00 2001 From: "Richard.Warren" Date: Wed, 8 Nov 2017 15:31:03 -0600 Subject: Refactored testpar/t_bigio.c and then added a basic description of these test changes into RELEASE.txt (HDFFV-10301) --- release_docs/RELEASE.txt | 10 +++ testpar/t_bigio.c | 197 ++++++++++++++++++++--------------------------- 2 files changed, 95 insertions(+), 112 deletions(-) diff --git a/release_docs/RELEASE.txt b/release_docs/RELEASE.txt index 4eb7995..9989ac9 100644 --- a/release_docs/RELEASE.txt +++ b/release_docs/RELEASE.txt @@ -287,6 +287,16 @@ Bug Fixes since HDF5-1.10.1 release (HDFFV-7853, VC, 2017/07/05) + - Refactored the testpar/t_bigio.c test to include ALARM macros + + Changed the test to include the ALARM_ON and ALARM_OFF macros which + are intended to prevent nightly test hangs that have been observed + with this particular parallel test example. The code was also modified to + simplify status reporting (only from MPI rank 0) and additional + status checking added. + + (RAW - 2017/11/08, HDFFV-10301) + Configuration ------------- - cmake MPI diff --git a/testpar/t_bigio.c b/testpar/t_bigio.c index 611ff1a..a34e4f7 100644 --- a/testpar/t_bigio.c +++ b/testpar/t_bigio.c @@ -1,9 +1,12 @@ -#include "hdf5.h" +#include "testpar.h" #include "testphdf5.h" #include "H5Dprivate.h" /* For Chunk tests */ -// int TestVerbosity = VERBO_LO; /* Default Verbosity is Low */ +/* FILENAME and filenames must have the same number of names */ +const char *FILENAME[2]={ "bigio_test.h5", + NULL + }; /* Constants definitions */ #define MAX_ERR_REPORT 10 /* Maximum number of errors reported */ @@ -38,7 +41,6 @@ typedef hsize_t B_DATATYPE; int facc_type = FACC_MPIO; /*Test file access type */ int dxfer_coll_type = DXFER_COLLECTIVE_IO; size_t bigcount = DXFER_BIGCOUNT; -char filename[20] = "bigio_test.h5"; int nerrors = 0; int mpi_size, mpi_rank; @@ -506,7 +508,7 @@ dataset_big_write(void) H5Pset_fapl_mpio(acc_tpl, MPI_COMM_WORLD, MPI_INFO_NULL); /* create the file collectively */ - fid = H5Fcreate(filename, H5F_ACC_TRUNC, H5P_DEFAULT, acc_tpl); + fid = H5Fcreate(FILENAME[0], H5F_ACC_TRUNC, H5P_DEFAULT, acc_tpl); VRFY((fid >= 0), "H5Fcreate succeeded"); /* Release file-access template */ @@ -515,7 +517,8 @@ dataset_big_write(void) /* Each process takes a slabs of rows. */ - printf("\nTesting Dataset1 write by ROW\n"); + if (MAINPROCESS) + HDprintf("\nTesting Dataset1 write by ROW\n"); /* Create a large dataset */ dims[0] = bigcount; dims[1] = mpi_size; @@ -563,21 +566,6 @@ dataset_big_write(void) VRFY((ret>= 0),"set independent IO collectively succeeded"); } - /* write data collectively */ - MESG("writeAll by Row"); - { - int j,k =0; - for (i=0; i < block[0]; i++){ - for (j=0; j < block[1]; j++){ - if(k < 10) { - printf("%lld ", wdata[k]); - k++; - } - } - } - printf("\n"); - } - ret = H5Dwrite(dataset, H5T_NATIVE_LLONG, mem_dataspace, file_dataspace, xfer_plist, wdata); VRFY((ret >= 0), "H5Dwrite dataset1 succeeded"); @@ -591,9 +579,9 @@ dataset_big_write(void) VRFY((ret >= 0), "H5Dclose1 succeeded"); - /* Each process takes a slabs of cols. */ - printf("\nTesting Dataset2 write by COL\n"); + if (MAINPROCESS) + HDprintf("\nTesting Dataset2 write by COL\n"); /* Create a large dataset */ dims[0] = bigcount; dims[1] = mpi_size; @@ -641,21 +629,6 @@ dataset_big_write(void) VRFY((ret>= 0),"set independent IO collectively succeeded"); } - /* write data collectively */ - MESG("writeAll by Col"); - { - int j,k =0; - for (i=0; i < block[0]; i++){ - for (j=0; j < block[1]; j++){ - if(k < 10) { - printf("%lld ", wdata[k]); - k++; - } - } - } - printf("\n"); - } - ret = H5Dwrite(dataset, H5T_NATIVE_LLONG, mem_dataspace, file_dataspace, xfer_plist, wdata); VRFY((ret >= 0), "H5Dwrite dataset1 succeeded"); @@ -671,7 +644,8 @@ dataset_big_write(void) /* ALL selection */ - printf("\nTesting Dataset3 write select ALL proc 0, NONE others\n"); + if (MAINPROCESS) + HDprintf("\nTesting Dataset3 write select ALL proc 0, NONE others\n"); /* Create a large dataset */ dims[0] = bigcount; dims[1] = 1; @@ -719,21 +693,6 @@ dataset_big_write(void) MESG("data_array created"); } - /* write data collectively */ - MESG("writeAll by process 0"); - { - int j,k =0; - for (i=0; i < block[0]; i++){ - for (j=0; j < block[1]; j++){ - if(k < 10) { - printf("%lld ", wdata[k]); - k++; - } - } - } - printf("\n"); - } - ret = H5Dwrite(dataset, H5T_NATIVE_LLONG, mem_dataspace, file_dataspace, xfer_plist, wdata); VRFY((ret >= 0), "H5Dwrite dataset1 succeeded"); @@ -747,7 +706,8 @@ dataset_big_write(void) VRFY((ret >= 0), "H5Dclose1 succeeded"); /* Point selection */ - printf("\nTesting Dataset4 write point selection\n"); + if (MAINPROCESS) + HDprintf("\nTesting Dataset4 write point selection\n"); /* Create a large dataset */ dims[0] = bigcount; dims[1] = mpi_size * 4; @@ -822,12 +782,14 @@ dataset_big_write(void) /* Need larger memory for data buffer */ free(wdata); #if 0 + /* Ridiculus test... */ wdata = (B_DATATYPE *)malloc(bigcount*4*sizeof(B_DATATYPE)); VRFY((wdata != NULL), "wdata malloc succeeded"); - printf("\nTesting Dataset5 write irregular selection\n"); + if (MAINPROCESS) + HDprintf("\nTesting Dataset5 write irregular selection\n"); /* Create a large dataset */ - dims[0] = bigcount/6; + dims[0] = bigcount/mpi_size; dims[1] = mpi_size * 4; sid = H5Screate_simple (RANK, dims, NULL); @@ -881,7 +843,8 @@ dataset_big_write(void) ret = H5Sselect_hyperslab(mem_dataspace, H5S_SELECT_OR, start, stride, count, block); VRFY((ret >= 0), "H5Sset_hyperslab succeeded"); } - printf("Setting up for collective transfer\n"); + if (MAINPROCESS) + HDprintf("Setting up for collective transfer\n"); /* set up the collective transfer properties list */ xfer_plist = H5Pcreate (H5P_DATASET_XFER); VRFY((xfer_plist >= 0), "H5Pcreate xfer succeeded"); @@ -960,15 +923,16 @@ dataset_big_read(void) H5Pset_fapl_mpio(acc_tpl, MPI_COMM_WORLD, MPI_INFO_NULL); /* open the file collectively */ - fid=H5Fopen(filename,H5F_ACC_RDONLY,acc_tpl); + fid=H5Fopen(FILENAME[0],H5F_ACC_RDONLY,acc_tpl); VRFY((fid >= 0), "H5Fopen succeeded"); /* Release file-access template */ ret = H5Pclose(acc_tpl); VRFY((ret >= 0), ""); + if (MAINPROCESS) + HDprintf("\nRead Testing Dataset1 by COL\n"); - printf("\nRead Testing Dataset1 by COL\n"); dataset = H5Dopen2(fid, DATASET1, H5P_DEFAULT); VRFY((dataset >= 0), "H5Dopen2 succeeded"); @@ -1016,18 +980,6 @@ dataset_big_read(void) xfer_plist, rdata); VRFY((ret >= 0), "H5Dread dataset1 succeeded"); - { - for (i=0; i < block[0]; i++){ - for (j=0; j < block[1]; j++){ - if(k < 10) { - printf("%lld ", rdata[k]); - k++; - } - } - } - printf("\n"); - } - /* verify the read data with original expected data */ ret = verify_data(start, count, stride, block, rdata, wdata); if(ret) {fprintf(stderr, "verify failed\n"); exit(1);} @@ -1040,7 +992,8 @@ dataset_big_read(void) VRFY((ret >= 0), "H5Dclose1 succeeded"); - printf("\nRead Testing Dataset2 by ROW\n"); + if (MAINPROCESS) + HDprintf("\nRead Testing Dataset2 by ROW\n"); memset(rdata, 0, bigcount*sizeof(B_DATATYPE)); dataset = H5Dopen2(fid, DATASET2, H5P_DEFAULT); VRFY((dataset >= 0), "H5Dopen2 succeeded"); @@ -1089,18 +1042,6 @@ dataset_big_read(void) xfer_plist, rdata); VRFY((ret >= 0), "H5Dread dataset2 succeeded"); - { - for (i=0; i < block[0]; i++){ - for (j=0; j < block[1]; j++){ - if(k < 10) { - printf("%lld ", rdata[k]); - k++; - } - } - } - printf("\n"); - } - /* verify the read data with original expected data */ ret = verify_data(start, count, stride, block, rdata, wdata); if(ret) {fprintf(stderr, "verify failed\n"); exit(1);} @@ -1112,8 +1053,8 @@ dataset_big_read(void) ret = H5Dclose(dataset); VRFY((ret >= 0), "H5Dclose1 succeeded"); - - printf("\nRead Testing Dataset3 read select ALL proc 0, NONE others\n"); + if (MAINPROCESS) + HDprintf("\nRead Testing Dataset3 read select ALL proc 0, NONE others\n"); memset(rdata, 0, bigcount*sizeof(B_DATATYPE)); dataset = H5Dopen2(fid, DATASET3, H5P_DEFAULT); VRFY((dataset >= 0), "H5Dopen2 succeeded"); @@ -1163,18 +1104,6 @@ dataset_big_read(void) xfer_plist, rdata); VRFY((ret >= 0), "H5Dread dataset3 succeeded"); - { - for (i=0; i < block[0]; i++){ - for (j=0; j < block[1]; j++){ - if(k < 10) { - printf("%lld ", rdata[k]); - k++; - } - } - } - printf("\n"); - } - if(MAINPROCESS) { /* verify the read data with original expected data */ ret = verify_data(start, count, stride, block, rdata, wdata); @@ -1188,7 +1117,8 @@ dataset_big_read(void) ret = H5Dclose(dataset); VRFY((ret >= 0), "H5Dclose1 succeeded"); - printf("\nRead Testing Dataset4 with Point selection\n"); + if (MAINPROCESS) + HDprintf("\nRead Testing Dataset4 with Point selection\n"); dataset = H5Dopen2(fid, DATASET4, H5P_DEFAULT); VRFY((dataset >= 0), "H5Dopen2 succeeded"); @@ -1258,11 +1188,24 @@ dataset_big_read(void) ret = H5Dclose(dataset); VRFY((ret >= 0), "H5Dclose1 succeeded"); - printf("\nRead Testing Dataset5 with Irregular selection\n"); - /* Need larger memory for data buffer */ free(wdata); free(rdata); + + wdata = NULL; + rdata = NULL; + /* We never wrote Dataset5 in the write section, so we can't + * expect to read it... + */ + file_dataspace = -1; + mem_dataspace = -1; + xfer_plist = -1; + dataset = -1; + #if 0 + /* Need larger memory for data buffer */ + if (MAINPROCESS) + HDprintf("\nRead Testing Dataset5 with Irregular selection\n"); + wdata = (B_DATATYPE *)malloc(bigcount*4*sizeof(B_DATATYPE)); VRFY((wdata != NULL), "wdata malloc succeeded"); rdata = (B_DATATYPE *)malloc(bigcount*4*sizeof(B_DATATYPE)); @@ -1369,20 +1312,22 @@ dataset_big_read(void) ret = verify_data(start, count, stride, block, rdata, wdata); if(ret) {fprintf(stderr, "verify failed\n"); exit(1);} } +#endif /* release all temporary handles. */ - H5Sclose(file_dataspace); - H5Sclose(mem_dataspace); - H5Pclose(xfer_plist); - ret = H5Dclose(dataset); - VRFY((ret >= 0), "H5Dclose1 succeeded"); - + if (file_dataspace != -1) H5Sclose(file_dataspace); + if (mem_dataspace != -1) H5Sclose(mem_dataspace); + if (xfer_plist != -1) H5Pclose(xfer_plist); + if (dataset != -1) { + ret = H5Dclose(dataset); + VRFY((ret >= 0), "H5Dclose1 succeeded"); + } H5Fclose(fid); /* release data buffers */ if(rdata) free(rdata); if(wdata) free(wdata); -#endif + } /* dataset_large_readAll */ @@ -1478,6 +1423,7 @@ create_faccess_plist(MPI_Comm comm, MPI_Info info, int l_facc_type) void coll_chunk1(void) { + const char *filename = FILENAME[0]; if (MAINPROCESS) printf("coll_chunk1\n"); @@ -1531,6 +1477,7 @@ coll_chunk1(void) void coll_chunk2(void) { + const char *filename = FILENAME[0]; if (MAINPROCESS) printf("coll_chunk2\n"); @@ -1585,8 +1532,9 @@ coll_chunk2(void) void coll_chunk3(void) { + const char *filename = FILENAME[0]; if (MAINPROCESS) - printf("coll_chunk3\n"); + printf("coll_chunk3\n"); coll_chunktest(filename, mpi_size, BYROW_CONT, API_NONE, HYPER, HYPER, OUT_OF_ORDER); coll_chunktest(filename, mpi_size, BYROW_CONT, API_NONE, HYPER, POINT, OUT_OF_ORDER); @@ -1956,7 +1904,7 @@ coll_chunktest(const char* filename, acc_plist = create_faccess_plist(comm, info, facc_type); VRFY((acc_plist >= 0),"MPIO creation property list succeeded"); - file = H5Fopen(filename,H5F_ACC_RDONLY,acc_plist); + file = H5Fopen(FILENAME[0],H5F_ACC_RDONLY,acc_plist); VRFY((file >= 0),"H5Fcreate succeeded"); status = H5Pclose(acc_plist); @@ -2134,16 +2082,34 @@ int main(int argc, char **argv) { int ExpressMode = 0; hsize_t newsize = 1048576; + /* Set the bigio processing limit to be 'newsize' bytes */ hsize_t oldsize = H5S_mpio_set_bigio_count(newsize); + /* Having set the bigio handling to a size that is managable, + * we'll set our 'bigcount' variable to be 2X that limit so + * that we try to ensure that our bigio handling is actually + * envoked and tested. + */ if (newsize != oldsize) { - bigcount = newsize * 2; + bigcount = newsize * 2; } MPI_Init(&argc, &argv); MPI_Comm_size(MPI_COMM_WORLD,&mpi_size); MPI_Comm_rank(MPI_COMM_WORLD,&mpi_rank); + /* Attempt to turn off atexit post processing so that in case errors + * happen during the test and the process is aborted, it will not get + * 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){ + HDprintf("Failed to turn off atexit processing. Continue.\n"); + }; + + /* set alarm. */ + ALARM_ON; + ExpressMode = do_express_test(mpi_rank); dataset_big_write(); @@ -2153,7 +2119,8 @@ int main(int argc, char **argv) MPI_Barrier(MPI_COMM_WORLD); if (ExpressMode > 0) { - printf("***Express test mode on. Several tests are skipped\n"); + if (MAINPROCESS) + HDprintf("***Express test mode on. Several tests are skipped\n"); } else { coll_chunk1(); @@ -2163,6 +2130,12 @@ int main(int argc, char **argv) coll_chunk3(); } + /* turn off alarm */ + ALARM_OFF; + + if (MAINPROCESS) + HDremove(FILENAME[0]); + /* close HDF5 library */ H5close(); -- cgit v0.12 From b829979c7047070bb92d67e5a5374c093319bab3 Mon Sep 17 00:00:00 2001 From: "Richard.Warren" Date: Wed, 8 Nov 2017 16:27:12 -0600 Subject: Follow up on editing suggestions by Scot --- testpar/t_bigio.c | 246 ++++-------------------------------------------------- 1 file changed, 18 insertions(+), 228 deletions(-) diff --git a/testpar/t_bigio.c b/testpar/t_bigio.c index a34e4f7..3245865 100644 --- a/testpar/t_bigio.c +++ b/testpar/t_bigio.c @@ -517,7 +517,7 @@ dataset_big_write(void) /* Each process takes a slabs of rows. */ - if (MAINPROCESS) + if (mpi_rank == 0) HDprintf("\nTesting Dataset1 write by ROW\n"); /* Create a large dataset */ dims[0] = bigcount; @@ -580,7 +580,7 @@ dataset_big_write(void) /* Each process takes a slabs of cols. */ - if (MAINPROCESS) + if (mpi_rank == 0) HDprintf("\nTesting Dataset2 write by COL\n"); /* Create a large dataset */ dims[0] = bigcount; @@ -644,7 +644,7 @@ dataset_big_write(void) /* ALL selection */ - if (MAINPROCESS) + if (mpi_rank == 0) HDprintf("\nTesting Dataset3 write select ALL proc 0, NONE others\n"); /* Create a large dataset */ dims[0] = bigcount; @@ -659,7 +659,7 @@ dataset_big_write(void) /* create a file dataspace independently */ file_dataspace = H5Dget_space (dataset); VRFY((file_dataspace >= 0), "H5Dget_space succeeded"); - if(MAINPROCESS) { + if(mpi_rank == 0) { ret = H5Sselect_all(file_dataspace); VRFY((ret >= 0), "H5Sset_all succeeded"); } @@ -671,7 +671,7 @@ dataset_big_write(void) /* create a memory dataspace independently */ mem_dataspace = H5Screate_simple (RANK, dims, NULL); VRFY((mem_dataspace >= 0), ""); - if(!MAINPROCESS) { + if(!mpi_rank == 0) { ret = H5Sselect_none(mem_dataspace); VRFY((ret >= 0), "H5Sset_none succeeded"); } @@ -706,7 +706,7 @@ dataset_big_write(void) VRFY((ret >= 0), "H5Dclose1 succeeded"); /* Point selection */ - if (MAINPROCESS) + if (mpi_rank == 0) HDprintf("\nTesting Dataset4 write point selection\n"); /* Create a large dataset */ dims[0] = bigcount; @@ -778,104 +778,7 @@ dataset_big_write(void) ret = H5Dclose(dataset); VRFY((ret >= 0), "H5Dclose1 succeeded"); - /* Irregular selection */ - /* Need larger memory for data buffer */ free(wdata); -#if 0 - /* Ridiculus test... */ - wdata = (B_DATATYPE *)malloc(bigcount*4*sizeof(B_DATATYPE)); - VRFY((wdata != NULL), "wdata malloc succeeded"); - - if (MAINPROCESS) - HDprintf("\nTesting Dataset5 write irregular selection\n"); - /* Create a large dataset */ - dims[0] = bigcount/mpi_size; - dims[1] = mpi_size * 4; - - sid = H5Screate_simple (RANK, dims, NULL); - VRFY((sid >= 0), "H5Screate_simple succeeded"); - dataset = H5Dcreate2(fid, DATASET5, H5T_NATIVE_LLONG, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); - VRFY((dataset >= 0), "H5Dcreate2 succeeded"); - H5Sclose(sid); - - /* first select 1 col in this procs splice */ - block[0] = dims[0]; - block[1] = 1; - stride[0] = block[0]; - stride[1] = block[1]; - count[0] = 1; - count[1] = 1; - start[0] = 0; - start[1] = mpi_rank * 4; - - /* create a file dataspace */ - file_dataspace = H5Dget_space (dataset); - VRFY((file_dataspace >= 0), "H5Dget_space succeeded"); - - // dims[1] = 4; - /* create a memory dataspace */ - mem_dataspace = H5Screate_simple (RANK, dims, NULL); - VRFY((mem_dataspace >= 0), ""); - - ret = H5Sselect_hyperslab(file_dataspace, H5S_SELECT_SET, start, stride, count, block); - VRFY((ret >= 0), "H5Sset_hyperslab succeeded"); - - start[1] = 0; - ret = H5Sselect_hyperslab(mem_dataspace, H5S_SELECT_SET, start, stride, count, block); - VRFY((ret >= 0), "H5Sset_hyperslab succeeded"); - - /* select every other row in the process splice and OR it with - the col selection to create an irregular selection */ - for(h=0 ; h= 0), "H5Sset_hyperslab succeeded"); - - start[1] = 0; - ret = H5Sselect_hyperslab(mem_dataspace, H5S_SELECT_OR, start, stride, count, block); - VRFY((ret >= 0), "H5Sset_hyperslab succeeded"); - } - if (MAINPROCESS) - HDprintf("Setting up for collective transfer\n"); - /* set up the collective transfer properties list */ - xfer_plist = H5Pcreate (H5P_DATASET_XFER); - VRFY((xfer_plist >= 0), "H5Pcreate xfer succeeded"); - ret = H5Pset_dxpl_mpio(xfer_plist, H5FD_MPIO_COLLECTIVE); - VRFY((ret >= 0), "H5Pset_dxpl_mpio succeeded"); - if(dxfer_coll_type == DXFER_INDEPENDENT_IO) { - ret = H5Pset_dxpl_mpio_collective_opt(xfer_plist,H5FD_MPIO_INDIVIDUAL_IO); - VRFY((ret>= 0),"set independent IO collectively succeeded"); - } - - /* fill the local slab with some trivial data */ - fill_datasets(start, dims, wdata); - MESG("data_array initialized"); - if(VERBOSE_MED){ - MESG("data_array created"); - } - - ret = H5Dwrite(dataset, H5T_NATIVE_LLONG, mem_dataspace, file_dataspace, - xfer_plist, wdata); - VRFY((ret >= 0), "H5Dwrite dataset1 succeeded"); - - /* release all temporary handles. */ - H5Sclose(file_dataspace); - H5Sclose(mem_dataspace); - H5Pclose(xfer_plist); - - ret = H5Dclose(dataset); - VRFY((ret >= 0), "H5Dclose1 succeeded"); - - free(wdata); -#endif H5Fclose(fid); } @@ -930,7 +833,7 @@ dataset_big_read(void) ret = H5Pclose(acc_tpl); VRFY((ret >= 0), ""); - if (MAINPROCESS) + if (mpi_rank == 0) HDprintf("\nRead Testing Dataset1 by COL\n"); dataset = H5Dopen2(fid, DATASET1, H5P_DEFAULT); @@ -992,7 +895,7 @@ dataset_big_read(void) VRFY((ret >= 0), "H5Dclose1 succeeded"); - if (MAINPROCESS) + if (mpi_rank == 0) HDprintf("\nRead Testing Dataset2 by ROW\n"); memset(rdata, 0, bigcount*sizeof(B_DATATYPE)); dataset = H5Dopen2(fid, DATASET2, H5P_DEFAULT); @@ -1053,7 +956,7 @@ dataset_big_read(void) ret = H5Dclose(dataset); VRFY((ret >= 0), "H5Dclose1 succeeded"); - if (MAINPROCESS) + if (mpi_rank == 0) HDprintf("\nRead Testing Dataset3 read select ALL proc 0, NONE others\n"); memset(rdata, 0, bigcount*sizeof(B_DATATYPE)); dataset = H5Dopen2(fid, DATASET3, H5P_DEFAULT); @@ -1065,7 +968,7 @@ dataset_big_read(void) /* create a file dataspace independently */ file_dataspace = H5Dget_space (dataset); VRFY((file_dataspace >= 0), "H5Dget_space succeeded"); - if(MAINPROCESS) { + if(mpi_rank == 0) { ret = H5Sselect_all(file_dataspace); VRFY((ret >= 0), "H5Sset_all succeeded"); } @@ -1077,7 +980,7 @@ dataset_big_read(void) /* create a memory dataspace independently */ mem_dataspace = H5Screate_simple (RANK, dims, NULL); VRFY((mem_dataspace >= 0), ""); - if(!MAINPROCESS) { + if(!mpi_rank == 0) { ret = H5Sselect_none(mem_dataspace); VRFY((ret >= 0), "H5Sset_none succeeded"); } @@ -1104,7 +1007,7 @@ dataset_big_read(void) xfer_plist, rdata); VRFY((ret >= 0), "H5Dread dataset3 succeeded"); - if(MAINPROCESS) { + if(mpi_rank == 0) { /* verify the read data with original expected data */ ret = verify_data(start, count, stride, block, rdata, wdata); if(ret) {fprintf(stderr, "verify failed\n"); exit(1);} @@ -1117,7 +1020,7 @@ dataset_big_read(void) ret = H5Dclose(dataset); VRFY((ret >= 0), "H5Dclose1 succeeded"); - if (MAINPROCESS) + if (mpi_rank == 0) HDprintf("\nRead Testing Dataset4 with Point selection\n"); dataset = H5Dopen2(fid, DATASET4, H5P_DEFAULT); VRFY((dataset >= 0), "H5Dopen2 succeeded"); @@ -1201,119 +1104,6 @@ dataset_big_read(void) xfer_plist = -1; dataset = -1; -#if 0 - /* Need larger memory for data buffer */ - if (MAINPROCESS) - HDprintf("\nRead Testing Dataset5 with Irregular selection\n"); - - wdata = (B_DATATYPE *)malloc(bigcount*4*sizeof(B_DATATYPE)); - VRFY((wdata != NULL), "wdata malloc succeeded"); - rdata = (B_DATATYPE *)malloc(bigcount*4*sizeof(B_DATATYPE)); - VRFY((rdata != NULL), "rdata malloc succeeded"); - - dataset = H5Dopen2(fid, DATASET5, H5P_DEFAULT); - VRFY((dataset >= 0), "H5Dopen2 succeeded"); - - dims[0] = bigcount; - dims[1] = mpi_size * 4; - - /* first select 1 col in this proc splice */ - block[0] = dims[0]; - block[1] = 1; - stride[0] = block[0]; - stride[1] = block[1]; - count[0] = 1; - count[1] = 1; - start[0] = 0; - start[1] = mpi_rank * 4; - - /* get file dataspace */ - file_dataspace = H5Dget_space (dataset); - VRFY((file_dataspace >= 0), "H5Dget_space succeeded"); - - /* create a memory dataspace */ - mem_dataspace = H5Screate_simple (RANK, dims, NULL); - VRFY((mem_dataspace >= 0), ""); - - ret = H5Sselect_hyperslab(file_dataspace, H5S_SELECT_SET, start, stride, count, block); - VRFY((ret >= 0), "H5Sset_hyperslab succeeded"); - - start[1] = 0; - ret = H5Sselect_hyperslab(mem_dataspace, H5S_SELECT_SET, start, stride, count, block); - VRFY((ret >= 0), "H5Sset_hyperslab succeeded"); - - /* select every other row in the process splice and OR it with - the col selection to create an irregular selection */ - for(h=0 ; h= 0), "H5Sset_hyperslab succeeded"); - - start[1] = 0; - ret = H5Sselect_hyperslab(mem_dataspace, H5S_SELECT_OR, start, stride, count, block); - VRFY((ret >= 0), "H5Sset_hyperslab succeeded"); - - //fprintf(stderr, "%d: %d - %d\n", mpi_rank, (int)h, (int)H5Sget_select_npoints(mem_dataspace)); - } - - /* set up the collective transfer properties list */ - xfer_plist = H5Pcreate (H5P_DATASET_XFER); - VRFY((xfer_plist >= 0), ""); - ret = H5Pset_dxpl_mpio(xfer_plist, H5FD_MPIO_COLLECTIVE); - VRFY((ret >= 0), "H5Pcreate xfer succeeded"); - if(dxfer_coll_type == DXFER_INDEPENDENT_IO) { - ret = H5Pset_dxpl_mpio_collective_opt(xfer_plist,H5FD_MPIO_INDIVIDUAL_IO); - VRFY((ret>= 0),"set independent IO collectively succeeded"); - } - - /* read data collectively */ - ret = H5Dread(dataset, H5T_NATIVE_LLONG, mem_dataspace, file_dataspace, - xfer_plist, rdata); - VRFY((ret >= 0), "H5Dread dataset1 succeeded"); - - /* fill dataset with test data */ - fill_datasets(start, dims, wdata); - MESG("data_array initialized"); - if(VERBOSE_MED){ - MESG("data_array created"); - } - - - - /* verify the read data with original expected data */ - block[0] = dims[0]; - block[1] = 1; - stride[0] = block[0]; - stride[1] = block[1]; - count[0] = 1; - count[1] = 1; - start[0] = 0; - start[1] = 0; - ret = verify_data(start, count, stride, block, rdata, wdata); - if(ret) {fprintf(stderr, "verify failed\n"); exit(1);} - - for(h=0 ; h 0) { - if (MAINPROCESS) + if (mpi_rank == 0) HDprintf("***Express test mode on. Several tests are skipped\n"); } else { @@ -2133,7 +1923,7 @@ int main(int argc, char **argv) /* turn off alarm */ ALARM_OFF; - if (MAINPROCESS) + if (mpi_rank == 0) HDremove(FILENAME[0]); /* close HDF5 library */ -- cgit v0.12 From b00b6b4892a21b195c35529a1f00550ef9432620 Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Tue, 14 Nov 2017 15:15:47 -0600 Subject: Fix linking of libs --- CMakeLists.txt | 1 - fortran/src/CMakeLists.txt | 10 ++++++---- src/CMakeLists.txt | 4 ++-- 3 files changed, 8 insertions(+), 7 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index f21f8b7..f2640b1 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -482,7 +482,6 @@ option (BUILD_SHARED_LIBS "Build Shared Libraries" ON) set (H5_ENABLE_SHARED_LIB NO) if (BUILD_SHARED_LIBS) set (H5_ENABLE_SHARED_LIB YES) - set (LINK_SHARED_LIBS ${LINK_LIBS}) endif () set (H5_ENABLE_STATIC_LIB YES) set (CMAKE_POSITION_INDEPENDENT_CODE ON) diff --git a/fortran/src/CMakeLists.txt b/fortran/src/CMakeLists.txt index 51db4f0..e34c778 100644 --- a/fortran/src/CMakeLists.txt +++ b/fortran/src/CMakeLists.txt @@ -126,7 +126,7 @@ set (f90CStub_C_HDRS add_library (${HDF5_F90_C_LIB_TARGET} STATIC ${f90CStub_C_SOURCES} ${f90CStub_C_HDRS}) TARGET_C_PROPERTIES (${HDF5_F90_C_LIB_TARGET} STATIC " " " ") -target_link_libraries (${HDF5_F90_C_LIB_TARGET} ${HDF5_LIB_TARGET} ${LINK_LIBS}) +target_link_libraries (${HDF5_F90_C_LIB_TARGET} PUBLIC ${HDF5_LIB_TARGET}) set_global_variable (HDF5_LIBRARIES_TO_EXPORT "${HDF5_LIBRARIES_TO_EXPORT};${HDF5_F90_C_LIB_TARGET}") H5_SET_LIB_OPTIONS (${HDF5_F90_C_LIB_TARGET} ${HDF5_F90_C_LIB_NAME} STATIC) set_target_properties (${HDF5_F90_C_LIB_TARGET} PROPERTIES @@ -139,7 +139,7 @@ set (install_targets ${HDF5_F90_C_LIB_TARGET}) if (BUILD_SHARED_LIBS AND NOT SKIP_HDF5_FORTRAN_SHARED) add_library (${HDF5_F90_C_LIBSH_TARGET} SHARED ${f90CStub_C_SOURCES} ${f90CStub_C_HDRS}) TARGET_C_PROPERTIES (${HDF5_F90_C_LIBSH_TARGET} SHARED " " " ") - target_link_libraries (${HDF5_F90_C_LIBSH_TARGET} ${HDF5_LIBSH_TARGET} ${LINK_SHARED_LIBS}) + target_link_libraries (${HDF5_F90_C_LIBSH_TARGET} PUBLIC ${HDF5_LIBSH_TARGET}) set_global_variable (HDF5_LIBRARIES_TO_EXPORT "${HDF5_LIBRARIES_TO_EXPORT};${HDF5_F90_C_LIBSH_TARGET}") H5_SET_LIB_OPTIONS (${HDF5_F90_C_LIBSH_TARGET} ${HDF5_F90_C_LIB_NAME} SHARED ${HDF5_F_PACKAGE_SOVERSION}) set_target_properties (${HDF5_F90_C_LIBSH_TARGET} PROPERTIES @@ -241,7 +241,8 @@ endif () add_library (${HDF5_F90_LIB_TARGET} STATIC ${f90_F_SOURCES}) set (SHARED_LINK_FLAGS " ") TARGET_FORTRAN_PROPERTIES (${HDF5_F90_LIB_TARGET} STATIC " " " ") -target_link_libraries (${HDF5_F90_LIB_TARGET} ${HDF5_F90_C_LIB_TARGET} ${HDF5_LIB_TARGET} ${LINK_Fortran_LIBS}) +target_link_libraries (${HDF5_F90_LIB_TARGET} PUBLIC ${HDF5_F90_C_LIB_TARGET}) +target_link_libraries (${HDF5_F90_LIB_TARGET} PRIVATE ${LINK_Fortran_LIBS}) if (H5_HAVE_PARALLEL AND MPI_Fortran_FOUND) target_include_directories (${HDF5_F90_LIB_TARGET} PUBLIC ${MPI_Fortran_INCLUDE_DIRS}) endif () @@ -268,7 +269,8 @@ if (BUILD_SHARED_LIBS AND NOT SKIP_HDF5_FORTRAN_SHARED) set (SHARED_LINK_FLAGS "/DLL /DEF:${HDF5_F90_SRC_BINARY_DIR}/hdf5_fortrandll.def") endif () TARGET_FORTRAN_PROPERTIES (${HDF5_F90_LIBSH_TARGET} SHARED " " ${SHARED_LINK_FLAGS}) - target_link_libraries (${HDF5_F90_LIBSH_TARGET} ${HDF5_F90_C_LIBSH_TARGET} ${HDF5_LIBSH_TARGET} ${LINK_Fortran_LIBS}) + target_link_libraries (${HDF5_F90_LIBSH_TARGET} PUBLIC ${HDF5_F90_C_LIBSH_TARGET}) + target_link_libraries (${HDF5_F90_LIBSH_TARGET} PRIVATE ${LINK_Fortran_LIBS}) if (H5_HAVE_PARALLEL AND MPI_Fortran_FOUND) target_include_directories (${HDF5_F90_LIBSH_TARGET} PUBLIC ${MPI_Fortran_INCLUDE_DIRS}) endif () diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 4be86a9..d95185f 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -881,7 +881,7 @@ set (gen_SRCS ${HDF5_BINARY_DIR}/H5Tinit.c ${HDF5_BINARY_DIR}/H5lib_settings.c) add_library (${HDF5_LIB_TARGET} STATIC ${common_SRCS} ${gen_SRCS} ${H5_PUBLIC_HEADERS} ${H5_PRIVATE_HEADERS} ${H5_GENERATED_HEADERS}) TARGET_C_PROPERTIES (${HDF5_LIB_TARGET} STATIC " " " ") -target_link_libraries (${HDF5_LIB_TARGET} PUBLIC ${LINK_LIBS}) +target_link_libraries (${HDF5_LIB_TARGET} PRIVATE ${LINK_LIBS}) if (NOT WIN32) target_link_libraries (${HDF5_LIB_TARGET} PUBLIC dl) endif () @@ -925,7 +925,7 @@ if (BUILD_SHARED_LIBS) set (shared_gen_SRCS ${HDF5_BINARY_DIR}/shared/H5Tinit.c ${HDF5_BINARY_DIR}/shared/H5lib_settings.c) add_library (${HDF5_LIBSH_TARGET} SHARED ${common_SRCS} ${shared_gen_SRCS} ${H5_PUBLIC_HEADERS} ${H5_PRIVATE_HEADERS} ${H5_GENERATED_HEADERS}) TARGET_C_PROPERTIES (${HDF5_LIBSH_TARGET} SHARED " " " ") - target_link_libraries (${HDF5_LIBSH_TARGET} PUBLIC ${LINK_SHARED_LIBS}) + target_link_libraries (${HDF5_LIBSH_TARGET} PRIVATE ${LINK_LIBS}) if (NOT WIN32) target_link_libraries (${HDF5_LIBSH_TARGET} PUBLIC dl) endif () -- cgit v0.12 From 34068c3341333094fc24720de54f565c4a8d0005 Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Tue, 14 Nov 2017 15:34:11 -0600 Subject: HDFFV-10329 - add new jira issue. --- release_docs/RELEASE.txt | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/release_docs/RELEASE.txt b/release_docs/RELEASE.txt index 297dccb..c235f83 100644 --- a/release_docs/RELEASE.txt +++ b/release_docs/RELEASE.txt @@ -299,6 +299,18 @@ Bug Fixes since HDF5-1.10.1 release Configuration ------------- + - cmake + + The hdf5 library used shared szip and zlib, which needlessly required + applications to link with the same szip and zlib libraries. + + Changed the target_link_libraries commands to use the static libs. + Removed improper link duplication of szip and zlib. + Adjusted the link dependencies and the link interface values of + the target_link_libraries commands. + + (ADB - 2017/11/14, HDFFV-10329) + - cmake MPI CMake implementation for MPI was problematic and would create incorrect -- cgit v0.12 From c03f326f31c0be37b4d96ea67ac12c7ed9b37b13 Mon Sep 17 00:00:00 2001 From: Neil Fortner Date: Fri, 10 Nov 2017 16:37:40 -0600 Subject: Fix HDFFV-10274. When deleting all (or almost all) of the messages in an object header chunk, where the total amount deleted was greater than 64K, an error would occur due to an off by one error in the code that handled that case. Fixed this and added a test case. --- src/H5Oalloc.c | 15 ++++----- test/tattr.c | 98 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 106 insertions(+), 7 deletions(-) diff --git a/src/H5Oalloc.c b/src/H5Oalloc.c index 3512d3e..478d950 100644 --- a/src/H5Oalloc.c +++ b/src/H5Oalloc.c @@ -2434,16 +2434,17 @@ H5O_alloc_shrink_chunk(H5F_t *f, hid_t dxpl_id, H5O_t *oh, unsigned chunkno) oh->nmesgs++; /* Initialize new null message to make the chunk large enough */ - oh->mesg[oh->nmesgs].type = H5O_MSG_NULL; - oh->mesg[oh->nmesgs].dirty = TRUE; - oh->mesg[oh->nmesgs].native = NULL; - oh->mesg[oh->nmesgs].raw = old_image + new_size + sizeof_msghdr - sizeof_chksum; - oh->mesg[oh->nmesgs].raw_size = MAX(H5O_ALIGN_OH(oh, min_chunk_size - total_msg_size), + curr_msg = &oh->mesg[oh->nmesgs - 1]; + curr_msg->type = H5O_MSG_NULL; + curr_msg->dirty = TRUE; + curr_msg->native = NULL; + curr_msg->raw = old_image + new_size + sizeof_msghdr - sizeof_chksum; + curr_msg->raw_size = MAX(H5O_ALIGN_OH(oh, min_chunk_size - total_msg_size), sizeof_msghdr) - sizeof_msghdr; - oh->mesg[oh->nmesgs].chunkno = chunkno; + curr_msg->chunkno = chunkno; /* update the new chunk size */ - new_size += oh->mesg[oh->nmesgs].raw_size + sizeof_msghdr; + new_size += curr_msg->raw_size + sizeof_msghdr; } /* end if */ /* Check for changing the chunk #0 data size enough to need adjusting the flags */ diff --git a/test/tattr.c b/test/tattr.c index 3b0c90e..5b00edc 100644 --- a/test/tattr.c +++ b/test/tattr.c @@ -10578,6 +10578,102 @@ test_attr_bug8(hid_t fcpl, hid_t fapl) /**************************************************************** ** +** test_attr_bug9(): Test basic H5A (attribute) code. +** (Really tests object header code). +** Tests adding several large attributes to an object until +** they convert to dense storage. The total size of all +** attributes is larger than 64K, causing the internal +** object header code to, after merging the deleted +** messages in to a NULL message, shrink the object header +** chunk. Do this twice: once with only attributes in the +** object header chunk and once with a (small) soft link in +** the chunk as well. In both cases, the shrunk chunk will +** initally be too small and a new NULL message must be +** created. +** +****************************************************************/ +static void +test_attr_bug9(hid_t fcpl, hid_t fapl) +{ + hid_t fid; /* File ID */ + hid_t gid; /* Group ID */ + hid_t aid; /* Attribute ID */ + hid_t sid; /* Dataspace ID */ + hsize_t dims[1] = {32768}; /* Attribute dimensions */ + int create_link; /* Whether to create a soft link */ + unsigned max_compact; /* Setting from fcpl */ + unsigned min_dense; /* Setting from fcpl */ + char aname[11]; /* Attribute name */ + unsigned i; /* Local index variable */ + herr_t ret; /* Generic return status */ + + /* Output message about test being performed */ + MESSAGE(5, ("Testing that attributes can always be added to named datatypes\n")); + + /* Create dataspace */ + sid = H5Screate_simple(1, dims, NULL); + CHECK(sid, FAIL, "H5Screate_simple"); + + /* Obtain attribute phase change settings */ + ret = H5Pget_attr_phase_change(fcpl, &max_compact, &min_dense); + CHECK(ret, FAIL, "H5Pget_attr_phase_change"); + + /* Run with and without the soft link */ + for(create_link = 0; create_link < 2; create_link++) { + /* Create file */ + fid = H5Fcreate(FILENAME, H5F_ACC_TRUNC, fcpl, fapl); + CHECK(fid, FAIL, "H5Fcreate"); + + /* Create second group */ + gid = H5Gcreate2(fid, "group", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); + CHECK(gid, FAIL, "H5Gcreate2"); + + /* Close second group */ + ret = H5Gclose(gid); + CHECK(ret, FAIL, "H5Gclose"); + + /* Open root group */ + gid = H5Gopen2(fid, "/", H5P_DEFAULT); + CHECK(gid, FAIL, "H5Gopen2"); + + /* Create enough attributes to cause a change to dense storage */ + for(i = 0; i < max_compact + 1; i++) { + /* Create attribute */ + snprintf(aname, sizeof(aname), "%u", i); + aid = H5Acreate2(gid, aname, H5T_NATIVE_CHAR, sid, H5P_DEFAULT, H5P_DEFAULT); + CHECK(aid, FAIL, "H5Acreate2"); + + /* Close attribute */ + ret = H5Aclose(aid); + CHECK(ret, FAIL, "H5Aclose"); + + /* Create enough soft links that exactly one goes into chunk 1 if + * requested */ + if(i == 0 && create_link) { + ret = H5Lcreate_soft("b", gid, "a", H5P_DEFAULT, H5P_DEFAULT); + CHECK(ret, FAIL, "H5Lcreate_soft"); + ret = H5Lcreate_soft("d", gid, "c", H5P_DEFAULT, H5P_DEFAULT); + CHECK(ret, FAIL, "H5Lcreate_soft"); + ret = H5Lcreate_soft("f", gid, "e", H5P_DEFAULT, H5P_DEFAULT); + CHECK(ret, FAIL, "H5Lcreate_soft"); + } /* end if */ + } /* end for */ + + /* Close IDs */ + ret = H5Gclose(gid); + CHECK(ret, FAIL, "H5Gclose"); + + ret = H5Fclose(fid); + CHECK(ret, FAIL, "H5Fclose"); + } /* end for */ + + /* Close dataspace */ + ret = H5Sclose(sid); + CHECK(ret, FAIL, "H5Sclose"); +} /* test_attr_bug9() */ + +/**************************************************************** +** ** test_attr(): Main H5A (attribute) testing routine. ** ****************************************************************/ @@ -10724,6 +10820,7 @@ test_attr(void) test_attr_bug6(my_fcpl, my_fapl); /* Test reading empty attribute */ test_attr_bug7(my_fcpl, my_fapl); /* Test creating and deleting large attributes in ohdr chunk 0 */ test_attr_bug8(my_fcpl, my_fapl); /* Test attribute expanding object header with undecoded messages */ + test_attr_bug9(my_fcpl, my_fapl); /* Test large attributes converting to dense storage */ } /* end for */ } /* end if */ else { @@ -10752,6 +10849,7 @@ test_attr(void) * header format and in fact fails if used with the old format, due * to the attributes being larger than 64K */ test_attr_bug8(fcpl, my_fapl); /* Test attribute expanding object header with undecoded messages */ + test_attr_bug9(fcpl, my_fapl); /* Test large attributes converting to dense storage */ } /* end else */ } /* end for */ -- cgit v0.12 From e6224c7d8f5b3193561d1058c5ca0cfc3dab2dc8 Mon Sep 17 00:00:00 2001 From: Neil Fortner Date: Mon, 13 Nov 2017 13:43:32 -0600 Subject: Initialize hid_t variables in test_Attr_bug9. --- test/tattr.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/test/tattr.c b/test/tattr.c index 5b00edc..5eaa882 100644 --- a/test/tattr.c +++ b/test/tattr.c @@ -10595,10 +10595,10 @@ test_attr_bug8(hid_t fcpl, hid_t fapl) static void test_attr_bug9(hid_t fcpl, hid_t fapl) { - hid_t fid; /* File ID */ - hid_t gid; /* Group ID */ - hid_t aid; /* Attribute ID */ - hid_t sid; /* Dataspace ID */ + hid_t fid = -1; /* File ID */ + hid_t gid = -1; /* Group ID */ + hid_t aid = -1; /* Attribute ID */ + hid_t sid = -1; /* Dataspace ID */ hsize_t dims[1] = {32768}; /* Attribute dimensions */ int create_link; /* Whether to create a soft link */ unsigned max_compact; /* Setting from fcpl */ -- cgit v0.12 From 837dc4bb51e3d3e823235228a33f6ffeae166b52 Mon Sep 17 00:00:00 2001 From: Neil Fortner Date: Tue, 14 Nov 2017 16:24:44 -0600 Subject: Add RELEASE.txt note for HDFFV-10274. (cherry picked from commit f7a7d0a00613cba997212fa8032091629a678797) --- release_docs/RELEASE.txt | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/release_docs/RELEASE.txt b/release_docs/RELEASE.txt index 297dccb..1ac55c5 100644 --- a/release_docs/RELEASE.txt +++ b/release_docs/RELEASE.txt @@ -231,6 +231,14 @@ Bug Fixes since HDF5-1.10.1 release Library ------- + - Fix rare object header corruption bug + + In certain cases, such as when converting large attributes to dense + storage, an error could occur which would either fail an assertion or + cause file corruption. Fixed and added test. + + (NAF - 2017/11/14, HDFFV-10274) + - H5Zfilter_avail in H5Z.c The public function checked for plugins, while the private -- cgit v0.12 From 4829ed6833e671f679ba7ffd6d93509cc8a47ad3 Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Thu, 16 Nov 2017 09:30:12 -0600 Subject: Fix snprintf to HDsnprintf usage - breaks windows --- test/tattr.c | 794 +++++++++++++++++++++++++++++------------------------------ 1 file changed, 397 insertions(+), 397 deletions(-) diff --git a/test/tattr.c b/test/tattr.c index 5eaa882..3786d0d 100644 --- a/test/tattr.c +++ b/test/tattr.c @@ -13,7 +13,7 @@ /*********************************************************** * -* Test program: tattr +* Test program: tattr * * Test the attribute functionality * @@ -27,25 +27,25 @@ * This file needs to access private information from the H5O package. * This file also needs to access the object header testing code. */ -#define H5O_FRIEND /*suppress error about including H5Opkg */ +#define H5O_FRIEND /*suppress error about including H5Opkg */ #define H5O_TESTING -#include "H5Opkg.h" /* Object headers */ +#include "H5Opkg.h" /* Object headers */ /* * This file needs to access private information from the H5A package. * This file also needs to access the attribute testing code. */ -#define H5A_FRIEND /*suppress error about including H5Apkg */ +#define H5A_FRIEND /*suppress error about including H5Apkg */ #define H5A_TESTING -#include "H5Apkg.h" /* Attributes */ +#include "H5Apkg.h" /* Attributes */ /* * This file needs to access private information from the H5F package. * This file also needs to access the file testing code. */ -#define H5F_FRIEND /*suppress error about including H5Fpkg */ +#define H5F_FRIEND /*suppress error about including H5Fpkg */ #define H5F_TESTING -#include "H5Fpkg.h" /* File access */ +#include "H5Fpkg.h" /* File access */ #define FILENAME "tattr.h5" #define NAME_BUF_SIZE 1024 @@ -55,10 +55,10 @@ #define CORDER_ITER_STOP 3 /* 3-D dataset with fixed dimensions */ -#define SPACE1_RANK 3 -#define SPACE1_DIM1 3 -#define SPACE1_DIM2 15 -#define SPACE1_DIM3 13 +#define SPACE1_RANK 3 +#define SPACE1_DIM1 3 +#define SPACE1_DIM2 15 +#define SPACE1_DIM3 13 /* Dataset Information */ #define DSET1_NAME "Dataset1" @@ -76,8 +76,8 @@ /* Attribute Rank & Dimensions */ #define ATTR1_NAME "Attr1" -#define ATTR1_RANK 1 -#define ATTR1_DIM1 3 +#define ATTR1_RANK 1 +#define ATTR1_DIM1 3 int attr_data1[ATTR1_DIM1]={512,-234,98123}; /* Test data for 1st attribute */ /* rank & dimensions for another attribute */ @@ -85,25 +85,25 @@ int attr_data1[ATTR1_DIM1]={512,-234,98123}; /* Test data for 1st attribute */ int attr_data1a[ATTR1_DIM1]={256,11945,-22107}; #define ATTR2_NAME "Attr2" -#define ATTR2_RANK 2 -#define ATTR2_DIM1 2 -#define ATTR2_DIM2 2 +#define ATTR2_RANK 2 +#define ATTR2_DIM1 2 +#define ATTR2_DIM2 2 int attr_data2[ATTR2_DIM1][ATTR2_DIM2]={{7614,-416},{197814,-3}}; /* Test data for 2nd attribute */ #define ATTR3_NAME "Attr3" -#define ATTR3_RANK 3 -#define ATTR3_DIM1 2 -#define ATTR3_DIM2 2 -#define ATTR3_DIM3 2 +#define ATTR3_RANK 3 +#define ATTR3_DIM1 2 +#define ATTR3_DIM2 2 +#define ATTR3_DIM3 2 double attr_data3[ATTR3_DIM1][ATTR3_DIM2][ATTR3_DIM3]={{{2.3F,-26.1F}, {0.123F,-10.0F}},{{973.23F,-0.91827F},{2.0F,23.0F}}}; /* Test data for 3rd attribute */ #define ATTR4_NAME "Attr4" -#define ATTR4_RANK 2 -#define ATTR4_DIM1 2 -#define ATTR4_DIM2 2 -#define ATTR4_FIELDNAME1 "i" -#define ATTR4_FIELDNAME2 "d" -#define ATTR4_FIELDNAME3 "c" +#define ATTR4_RANK 2 +#define ATTR4_DIM1 2 +#define ATTR4_DIM2 2 +#define ATTR4_FIELDNAME1 "i" +#define ATTR4_FIELDNAME2 "d" +#define ATTR4_FIELDNAME3 "c" size_t attr4_field1_off=0; size_t attr4_field2_off=0; size_t attr4_field3_off=0; @@ -115,13 +115,13 @@ struct attr4_struct { {{-23,981724.2F,'Q'},{0,2.0F,'\n'}}}; /* Test data for 4th attribute */ #define ATTR5_NAME "Attr5" -#define ATTR5_RANK 0 +#define ATTR5_RANK 0 float attr_data5=-5.123F; /* Test data for 5th attribute */ -#define ATTR6_RANK 3 -#define ATTR6_DIM1 100 -#define ATTR6_DIM2 100 -#define ATTR6_DIM3 100 +#define ATTR6_RANK 3 +#define ATTR6_DIM1 100 +#define ATTR6_DIM2 100 +#define ATTR6_DIM3 100 #define ATTR7_NAME "attr 1 - 000000" #define ATTR8_NAME "attr 2" @@ -163,21 +163,21 @@ static herr_t attr_op1(hid_t loc_id, const char *name, const H5A_info_t *ainfo, static void test_attr_basic_write(hid_t fapl) { - hid_t fid1; /* HDF5 File IDs */ - hid_t dataset; /* Dataset ID */ - hid_t group; /* Group ID */ - hid_t sid1,sid2; /* Dataspace ID */ - hid_t attr, attr2; /* Attribute ID */ - hsize_t attr_size; /* storage size for attribute */ - ssize_t attr_name_size; /* size of attribute name */ - char *attr_name=NULL; /* name of attribute */ - hsize_t dims1[] = {SPACE1_DIM1, SPACE1_DIM2, SPACE1_DIM3}; - hsize_t dims2[] = {ATTR1_DIM1}; - hsize_t dims3[] = {ATTR2_DIM1,ATTR2_DIM2}; - int read_data1[ATTR1_DIM1]={0}; /* Buffer for reading 1st attribute */ - int i; - hid_t ret_id; /* Generic hid_t return value */ - herr_t ret; /* Generic return value */ + hid_t fid1; /* HDF5 File IDs */ + hid_t dataset; /* Dataset ID */ + hid_t group; /* Group ID */ + hid_t sid1,sid2; /* Dataspace ID */ + hid_t attr, attr2; /* Attribute ID */ + hsize_t attr_size; /* storage size for attribute */ + ssize_t attr_name_size; /* size of attribute name */ + char *attr_name=NULL; /* name of attribute */ + hsize_t dims1[] = {SPACE1_DIM1, SPACE1_DIM2, SPACE1_DIM3}; + hsize_t dims2[] = {ATTR1_DIM1}; + hsize_t dims3[] = {ATTR2_DIM1,ATTR2_DIM2}; + int read_data1[ATTR1_DIM1]={0}; /* Buffer for reading 1st attribute */ + int i; + hid_t ret_id; /* Generic hid_t return value */ + herr_t ret; /* Generic return value */ /* Output message about test being performed */ MESSAGE(5, ("Testing Basic Scalar Attribute Writing Functions\n")); @@ -278,7 +278,7 @@ test_attr_basic_write(hid_t fapl) if(attr_name_size > 0) { attr_name = (char*)HDcalloc((size_t)(attr_name_size + 1), sizeof(char)); CHECK(attr_name, NULL, "HDcalloc"); - + if(attr_name) { ret = (herr_t)H5Aget_name(attr, (size_t)(attr_name_size + 1), attr_name); CHECK(ret, FAIL, "H5Aget_name"); @@ -314,7 +314,7 @@ test_attr_basic_write(hid_t fapl) if(attr_name_size > 0) { attr_name = (char*)HDcalloc((size_t)(attr_name_size+1), sizeof(char)); CHECK(attr_name, NULL, "HDcalloc"); - + if(attr_name) { ret = (herr_t)H5Aget_name(attr2, (size_t)(attr_name_size + 1), attr_name); CHECK(ret, FAIL, "H5Aget_name"); @@ -402,15 +402,15 @@ test_attr_basic_write(hid_t fapl) static void test_attr_basic_read(hid_t fapl) { - hid_t fid1; /* HDF5 File IDs */ - hid_t dataset; /* Dataset ID */ - hid_t group; /* Group ID */ - hid_t attr; /* Attribute ID */ - H5O_info_t oinfo; /* Object info */ + hid_t fid1; /* HDF5 File IDs */ + hid_t dataset; /* Dataset ID */ + hid_t group; /* Group ID */ + hid_t attr; /* Attribute ID */ + H5O_info_t oinfo; /* Object info */ int read_data1[ATTR1_DIM1] = {0}; /* Buffer for reading 1st attribute */ int read_data2[ATTR2_DIM1][ATTR2_DIM2] = {{0}}; /* Buffer for reading 2nd attribute */ - int i, j; /* Local index variables */ - herr_t ret; /* Generic return value */ + int i, j; /* Local index variables */ + herr_t ret; /* Generic return value */ /* Output message about test being performed */ MESSAGE(5, ("Testing Basic Attribute Functions\n")); @@ -500,7 +500,7 @@ test_attr_flush(hid_t fapl) set; /* Dataset ID */ double wdata=3.14159F; /* Data to write */ double rdata; /* Data read in */ - herr_t ret; /* Generic return value */ + herr_t ret; /* Generic return value */ /* Output message about test being performed */ MESSAGE(5, ("Testing Attribute Flushing\n")); @@ -560,15 +560,15 @@ test_attr_flush(hid_t fapl) static void test_attr_plist(hid_t fapl) { - hid_t fid1; /* HDF5 File IDs */ - hid_t dataset; /* Dataset ID */ - hid_t sid1,sid2; /* Dataspace ID */ - hid_t attr; /* Attribute ID */ - hid_t plist; /* Property list ID */ - hsize_t dims1[] = {SPACE1_DIM1, SPACE1_DIM2, SPACE1_DIM3}; - hsize_t dims2[] = {ATTR1_DIM1}; - H5T_cset_t cset; /* Character set for attributes */ - herr_t ret; /* Generic return value */ + hid_t fid1; /* HDF5 File IDs */ + hid_t dataset; /* Dataset ID */ + hid_t sid1,sid2; /* Dataspace ID */ + hid_t attr; /* Attribute ID */ + hid_t plist; /* Property list ID */ + hsize_t dims1[] = {SPACE1_DIM1, SPACE1_DIM2, SPACE1_DIM3}; + hsize_t dims2[] = {ATTR1_DIM1}; + H5T_cset_t cset; /* Character set for attributes */ + herr_t ret; /* Generic return value */ /* Output message about test being performed */ MESSAGE(5, ("Testing Attribute Property Lists\n")); @@ -674,15 +674,15 @@ test_attr_plist(hid_t fapl) static void test_attr_compound_write(hid_t fapl) { - hid_t fid1; /* HDF5 File IDs */ - hid_t dataset; /* Dataset ID */ - hid_t tid1; /* Attribute datatype ID */ - hid_t sid1,sid2; /* Dataspace ID */ - hid_t attr; /* Attribute ID */ - hsize_t dims1[] = {SPACE1_DIM1, SPACE1_DIM2, SPACE1_DIM3}; - hsize_t dims2[] = {ATTR4_DIM1,ATTR4_DIM2}; - hid_t ret_id; /* Generic hid_t return value */ - herr_t ret; /* Generic return value */ + hid_t fid1; /* HDF5 File IDs */ + hid_t dataset; /* Dataset ID */ + hid_t tid1; /* Attribute datatype ID */ + hid_t sid1,sid2; /* Dataspace ID */ + hid_t attr; /* Attribute ID */ + hsize_t dims1[] = {SPACE1_DIM1, SPACE1_DIM2, SPACE1_DIM3}; + hsize_t dims2[] = {ATTR4_DIM1,ATTR4_DIM2}; + hid_t ret_id; /* Generic hid_t return value */ + herr_t ret; /* Generic return value */ /* Output message about test being performed */ MESSAGE(5, ("Testing Multiple Attribute Functions\n")); @@ -762,11 +762,11 @@ test_attr_compound_write(hid_t fapl) static void test_attr_compound_read(hid_t fapl) { - hid_t fid1; /* HDF5 File ID */ - hid_t dataset; /* Dataset ID */ + hid_t fid1; /* HDF5 File ID */ + hid_t dataset; /* Dataset ID */ hid_t space; /* Attribute dataspace */ hid_t type; /* Attribute datatype */ - hid_t attr; /* Attribute ID */ + hid_t attr; /* Attribute ID */ char attr_name[ATTR_NAME_LEN]; /* Buffer for attribute names */ int rank; /* Attribute rank */ hsize_t dims[ATTR_MAX_DIMS]; /* Attribute dimensions */ @@ -781,7 +781,7 @@ test_attr_compound_read(hid_t fapl) ssize_t name_len; /* Length of attribute name */ H5O_info_t oinfo; /* Object info */ int i, j; /* Local index variables */ - herr_t ret; /* Generic return value */ + herr_t ret; /* Generic return value */ /* Output message about test being performed */ MESSAGE(5, ("Testing Basic Attribute Functions\n")); @@ -830,7 +830,7 @@ test_attr_compound_read(hid_t fapl) HDstrcmp(fieldname, ATTR4_FIELDNAME3))) TestErrPrintf("invalid field name for field #%d: %s\n", i, fieldname); H5free_memory(fieldname); - } /* end for */ + } /* end for */ offset = H5Tget_member_offset(type, 0); VERIFY(offset, attr4_field1_off, "H5Tget_member_offset"); offset = H5Tget_member_offset(type, 1); @@ -878,7 +878,7 @@ test_attr_compound_read(hid_t fapl) printf("%d: attribute data different: attr_data4[%d][%d].i=%d, read_data4[%d][%d].i=%d\n", __LINE__, i, j, attr_data4[i][j].i, i, j, read_data4[i][j].i); printf("%d: attribute data different: attr_data4[%d][%d].d=%f, read_data4[%d][%d].d=%f\n", __LINE__, i, j, attr_data4[i][j].d, i, j, read_data4[i][j].d); TestErrPrintf("%d: attribute data different: attr_data4[%d][%d].c=%c, read_data4[%d][%d].c=%c\n", __LINE__, i, j, attr_data4[i][j].c, i, j, read_data4[i][j].c); - } /* end if */ + } /* end if */ /* Verify Name */ name_len = H5Aget_name(attr, (size_t)ATTR_NAME_LEN, attr_name); @@ -912,13 +912,13 @@ test_attr_compound_read(hid_t fapl) static void test_attr_scalar_write(hid_t fapl) { - hid_t fid1; /* HDF5 File IDs */ - hid_t dataset; /* Dataset ID */ - hid_t sid1,sid2; /* Dataspace ID */ - hid_t attr; /* Attribute ID */ - hsize_t dims1[] = {SPACE1_DIM1, SPACE1_DIM2, SPACE1_DIM3}; - hid_t ret_id; /* Generic hid_t return value */ - herr_t ret; /* Generic return value */ + hid_t fid1; /* HDF5 File IDs */ + hid_t dataset; /* Dataset ID */ + hid_t sid1,sid2; /* Dataspace ID */ + hid_t attr; /* Attribute ID */ + hsize_t dims1[] = {SPACE1_DIM1, SPACE1_DIM2, SPACE1_DIM3}; + hid_t ret_id; /* Generic hid_t return value */ + herr_t ret; /* Generic return value */ /* Output message about test being performed */ MESSAGE(5, ("Testing Basic Attribute Functions\n")); @@ -978,14 +978,14 @@ test_attr_scalar_write(hid_t fapl) static void test_attr_scalar_read(hid_t fapl) { - hid_t fid1; /* HDF5 File IDs */ - hid_t dataset; /* Dataset ID */ - hid_t sid; /* Dataspace ID */ - hid_t attr; /* Attribute ID */ + hid_t fid1; /* HDF5 File IDs */ + hid_t dataset; /* Dataset ID */ + hid_t sid; /* Dataspace ID */ + hid_t attr; /* Attribute ID */ H5S_class_t stype; /* Dataspace class */ - float rdata = 0.0F; /* Buffer for reading 1st attribute */ + float rdata = 0.0F; /* Buffer for reading 1st attribute */ H5O_info_t oinfo; /* Object info */ - herr_t ret; /* Generic return value */ + herr_t ret; /* Generic return value */ /* Output message about test being performed */ MESSAGE(5, ("Testing Basic Scalar Attribute Reading Functions\n")); @@ -1013,8 +1013,8 @@ test_attr_scalar_read(hid_t fapl) /* Verify the floating-poing value in this way to avoid compiler warning. */ if(!H5_FLT_ABS_EQUAL(rdata, attr_data5)) - printf("*** UNEXPECTED VALUE from %s should be %f, but is %f at line %4d in %s\n", - "H5Aread", (double)attr_data5, (double)rdata, (int)__LINE__, __FILE__); + printf("*** UNEXPECTED VALUE from %s should be %f, but is %f at line %4d in %s\n", + "H5Aread", (double)attr_data5, (double)rdata, (int)__LINE__, __FILE__); /* Get the attribute's dataspace */ sid = H5Aget_space(attr); @@ -1050,16 +1050,16 @@ test_attr_scalar_read(hid_t fapl) static void test_attr_mult_write(hid_t fapl) { - hid_t fid1; /* HDF5 File IDs */ - hid_t dataset; /* Dataset ID */ - hid_t sid1,sid2; /* Dataspace ID */ - hid_t attr; /* Attribute ID */ - hsize_t dims1[] = {SPACE1_DIM1, SPACE1_DIM2, SPACE1_DIM3}; - hsize_t dims2[] = {ATTR1_DIM1}; - hsize_t dims3[] = {ATTR2_DIM1,ATTR2_DIM2}; - hsize_t dims4[] = {ATTR3_DIM1,ATTR3_DIM2,ATTR3_DIM3}; - hid_t ret_id; /* Generic hid_t return value */ - herr_t ret; /* Generic return value */ + hid_t fid1; /* HDF5 File IDs */ + hid_t dataset; /* Dataset ID */ + hid_t sid1,sid2; /* Dataspace ID */ + hid_t attr; /* Attribute ID */ + hsize_t dims1[] = {SPACE1_DIM1, SPACE1_DIM2, SPACE1_DIM3}; + hsize_t dims2[] = {ATTR1_DIM1}; + hsize_t dims3[] = {ATTR2_DIM1,ATTR2_DIM2}; + hsize_t dims4[] = {ATTR3_DIM1,ATTR3_DIM2,ATTR3_DIM3}; + hid_t ret_id; /* Generic hid_t return value */ + herr_t ret; /* Generic return value */ /* Output message about test being performed */ MESSAGE(5, ("Testing Multiple Attribute Functions\n")); @@ -1170,11 +1170,11 @@ test_attr_mult_write(hid_t fapl) static void test_attr_mult_read(hid_t fapl) { - hid_t fid1; /* HDF5 File ID */ - hid_t dataset; /* Dataset ID */ + hid_t fid1; /* HDF5 File ID */ + hid_t dataset; /* Dataset ID */ hid_t space; /* Attribute dataspace */ hid_t type; /* Attribute datatype */ - hid_t attr; /* Attribute ID */ + hid_t attr; /* Attribute ID */ char attr_name[ATTR_NAME_LEN]; /* Buffer for attribute names */ char temp_name[ATTR_NAME_LEN]; /* Buffer for mangling attribute names */ int rank; /* Attribute rank */ @@ -1185,10 +1185,10 @@ test_attr_mult_read(hid_t fapl) int read_data1[ATTR1_DIM1] = {0}; /* Buffer for reading 1st attribute */ int read_data2[ATTR2_DIM1][ATTR2_DIM2] = {{0}}; /* Buffer for reading 2nd attribute */ double read_data3[ATTR3_DIM1][ATTR3_DIM2][ATTR3_DIM3] = {{{0}}}; /* Buffer for reading 3rd attribute */ - ssize_t name_len; /* Length of attribute name */ + ssize_t name_len; /* Length of attribute name */ H5O_info_t oinfo; /* Object info */ int i, j, k; /* Local index values */ - herr_t ret; /* Generic return value */ + herr_t ret; /* Generic return value */ /* Output message about test being performed */ MESSAGE(5, ("Testing Basic Attribute Functions\n")); @@ -1432,12 +1432,12 @@ attr_op1(hid_t H5_ATTR_UNUSED loc_id, const char *name, const H5A_info_t H5_ATTR static void test_attr_iterate(hid_t fapl) { - hid_t file; /* HDF5 File ID */ - hid_t dataset; /* Dataset ID */ - hid_t sid; /* Dataspace ID */ + hid_t file; /* HDF5 File ID */ + hid_t dataset; /* Dataset ID */ + hid_t sid; /* Dataspace ID */ int count; /* operator data for the iterator */ H5O_info_t oinfo; /* Object info */ - herr_t ret; /* Generic return value */ + herr_t ret; /* Generic return value */ /* Output message about test being performed */ MESSAGE(5, ("Testing Basic Attribute Functions\n")); @@ -1504,13 +1504,13 @@ test_attr_iterate(hid_t fapl) static void test_attr_delete(hid_t fapl) { - hid_t fid1; /* HDF5 File ID */ - hid_t dataset; /* Dataset ID */ - hid_t attr; /* Attribute ID */ + hid_t fid1; /* HDF5 File ID */ + hid_t dataset; /* Dataset ID */ + hid_t attr; /* Attribute ID */ char attr_name[ATTR_NAME_LEN]; /* Buffer for attribute names */ ssize_t name_len; /* Length of attribute name */ H5O_info_t oinfo; /* Object info */ - herr_t ret; /* Generic return value */ + herr_t ret; /* Generic return value */ /* Output message about test being performed */ MESSAGE(5, ("Testing Basic Attribute Functions\n")); @@ -1635,7 +1635,7 @@ test_attr_dtype_shared(hid_t fapl) H5O_info_t oinfo; /* Object's information */ h5_stat_size_t empty_filesize; /* Size of empty file */ h5_stat_size_t filesize; /* Size of file after modifications */ - herr_t ret; /* Generic return value */ + herr_t ret; /* Generic return value */ /* Output message about test being performed */ MESSAGE(5, ("Testing Shared Datatypes with Attributes\n")); @@ -1802,17 +1802,17 @@ test_attr_dtype_shared(hid_t fapl) static void test_attr_duplicate_ids(hid_t fapl) { - hid_t fid1; /* HDF5 File IDs */ - hid_t dataset; /* Dataset ID */ - hid_t gid1, gid2; /* Group ID */ - hid_t sid1,sid2; /* Dataspace ID */ - hid_t attr, attr2; /* Attribute ID */ - hsize_t dims1[] = {SPACE1_DIM1, SPACE1_DIM2, SPACE1_DIM3}; - hsize_t dims2[] = {ATTR1_DIM1}; - int read_data1[ATTR1_DIM1]={0}; /* Buffer for reading 1st attribute */ - int rewrite_data[ATTR1_DIM1]={1234, -423, 9907256}; /* Test data for rewrite */ - int i; - herr_t ret; /* Generic return value */ + hid_t fid1; /* HDF5 File IDs */ + hid_t dataset; /* Dataset ID */ + hid_t gid1, gid2; /* Group ID */ + hid_t sid1,sid2; /* Dataspace ID */ + hid_t attr, attr2; /* Attribute ID */ + hsize_t dims1[] = {SPACE1_DIM1, SPACE1_DIM2, SPACE1_DIM3}; + hsize_t dims2[] = {ATTR1_DIM1}; + int read_data1[ATTR1_DIM1]={0}; /* Buffer for reading 1st attribute */ + int rewrite_data[ATTR1_DIM1]={1234, -423, 9907256}; /* Test data for rewrite */ + int i; + herr_t ret; /* Generic return value */ /* Output message about test being performed */ MESSAGE(5, ("Testing operations with two ID handles\n")); @@ -1830,7 +1830,7 @@ test_attr_duplicate_ids(hid_t fapl) /* Create a dataset */ dataset = H5Dcreate2(fid1, DSET1_NAME, H5T_NATIVE_UCHAR, sid1, H5P_DEFAULT, - H5P_DEFAULT, H5P_DEFAULT); + H5P_DEFAULT, H5P_DEFAULT); CHECK(dataset, FAIL, "H5Dcreate2"); /* Create dataspace for attribute */ @@ -2047,12 +2047,12 @@ test_attr_duplicate_ids(hid_t fapl) static int test_attr_dense_verify(hid_t loc_id, unsigned max_attr) { - char attrname[NAME_BUF_SIZE]; /* Name of attribute */ - hid_t attr; /* Attribute ID */ + char attrname[NAME_BUF_SIZE]; /* Name of attribute */ + hid_t attr; /* Attribute ID */ unsigned value; /* Attribute value */ unsigned u; /* Local index variable */ int old_nerrs; /* Number of errors when entering this check */ - herr_t ret; /* Generic return value */ + herr_t ret; /* Generic return value */ /* Retrieve the current # of reported errors */ old_nerrs = GetTestNumErrs(); @@ -2117,19 +2117,19 @@ test_attr_dense_verify(hid_t loc_id, unsigned max_attr) static void test_attr_dense_create(hid_t fcpl, hid_t fapl) { - hid_t fid; /* HDF5 File ID */ - hid_t dataset; /* Dataset ID */ - hid_t sid; /* Dataspace ID */ - hid_t attr; /* Attribute ID */ - hid_t dcpl; /* Dataset creation property list ID */ - char attrname[NAME_BUF_SIZE]; /* Name of attribute */ + hid_t fid; /* HDF5 File ID */ + hid_t dataset; /* Dataset ID */ + hid_t sid; /* Dataspace ID */ + hid_t attr; /* Attribute ID */ + hid_t dcpl; /* Dataset creation property list ID */ + char attrname[NAME_BUF_SIZE]; /* Name of attribute */ unsigned max_compact; /* Maximum # of attributes to store compactly */ unsigned min_dense; /* Minimum # of attributes to store "densely" */ - htri_t is_dense; /* Are attributes stored densely? */ + htri_t is_dense; /* Are attributes stored densely? */ unsigned u; /* Local index variable */ h5_stat_size_t empty_filesize; /* Size of empty file */ h5_stat_size_t filesize; /* Size of file after modifications */ - herr_t ret; /* Generic return value */ + herr_t ret; /* Generic return value */ /* Output message about test being performed */ MESSAGE(5, ("Testing Dense Attribute Storage Creation\n")); @@ -2248,19 +2248,19 @@ test_attr_dense_create(hid_t fcpl, hid_t fapl) static void test_attr_dense_open(hid_t fcpl, hid_t fapl) { - hid_t fid; /* HDF5 File ID */ - hid_t dataset; /* Dataset ID */ - hid_t sid; /* Dataspace ID */ - hid_t attr; /* Attribute ID */ - hid_t dcpl; /* Dataset creation property list ID */ - char attrname[NAME_BUF_SIZE]; /* Name of attribute */ + hid_t fid; /* HDF5 File ID */ + hid_t dataset; /* Dataset ID */ + hid_t sid; /* Dataspace ID */ + hid_t attr; /* Attribute ID */ + hid_t dcpl; /* Dataset creation property list ID */ + char attrname[NAME_BUF_SIZE]; /* Name of attribute */ unsigned max_compact; /* Maximum # of attributes to store compactly */ unsigned min_dense; /* Minimum # of attributes to store "densely" */ - htri_t is_dense; /* Are attributes stored densely? */ + htri_t is_dense; /* Are attributes stored densely? */ unsigned u; /* Local index variable */ h5_stat_size_t empty_filesize; /* Size of empty file */ h5_stat_size_t filesize; /* Size of file after modifications */ - herr_t ret; /* Generic return value */ + herr_t ret; /* Generic return value */ /* Output message about test being performed */ MESSAGE(5, ("Testing Opening Attributes in Dense Storage\n")); @@ -2387,20 +2387,20 @@ test_attr_dense_open(hid_t fcpl, hid_t fapl) static void test_attr_dense_delete(hid_t fcpl, hid_t fapl) { - hid_t fid; /* HDF5 File ID */ - hid_t dataset; /* Dataset ID */ - hid_t sid; /* Dataspace ID */ - hid_t attr; /* Attribute ID */ - hid_t dcpl; /* Dataset creation property list ID */ - char attrname[NAME_BUF_SIZE]; /* Name of attribute */ + hid_t fid; /* HDF5 File ID */ + hid_t dataset; /* Dataset ID */ + hid_t sid; /* Dataspace ID */ + hid_t attr; /* Attribute ID */ + hid_t dcpl; /* Dataset creation property list ID */ + char attrname[NAME_BUF_SIZE]; /* Name of attribute */ unsigned max_compact; /* Maximum # of attributes to store compactly */ unsigned min_dense; /* Minimum # of attributes to store "densely" */ - htri_t is_dense; /* Are attributes stored densely? */ + htri_t is_dense; /* Are attributes stored densely? */ unsigned u; /* Local index variable */ h5_stat_size_t empty_filesize; /* Size of empty file */ h5_stat_size_t filesize; /* Size of file after modifications */ H5O_info_t oinfo; /* Object info */ - herr_t ret; /* Generic return value */ + herr_t ret; /* Generic return value */ /* Output message about test being performed */ MESSAGE(5, ("Testing Deleting Attributes in Dense Storage\n")); @@ -2565,21 +2565,21 @@ test_attr_dense_delete(hid_t fcpl, hid_t fapl) static void test_attr_dense_rename(hid_t fcpl, hid_t fapl) { - hid_t fid; /* HDF5 File ID */ - hid_t dataset; /* Dataset ID */ - hid_t sid; /* Dataspace ID */ - hid_t attr; /* Attribute ID */ - hid_t dcpl; /* Dataset creation property list ID */ - char attrname[NAME_BUF_SIZE]; /* Name of attribute */ - char new_attrname[NAME_BUF_SIZE]; /* New name of attribute */ + hid_t fid; /* HDF5 File ID */ + hid_t dataset; /* Dataset ID */ + hid_t sid; /* Dataspace ID */ + hid_t attr; /* Attribute ID */ + hid_t dcpl; /* Dataset creation property list ID */ + char attrname[NAME_BUF_SIZE]; /* Name of attribute */ + char new_attrname[NAME_BUF_SIZE]; /* New name of attribute */ unsigned max_compact; /* Maximum # of attributes to store compactly */ unsigned min_dense; /* Minimum # of attributes to store "densely" */ - htri_t is_dense; /* Are attributes stored densely? */ + htri_t is_dense; /* Are attributes stored densely? */ h5_stat_size_t empty_filesize; /* Size of empty file */ h5_stat_size_t filesize; /* Size of file after modifications */ H5O_info_t oinfo; /* Object info */ unsigned u; /* Local index variable */ - herr_t ret; /* Generic return value */ + herr_t ret; /* Generic return value */ /* Output message about test being performed */ MESSAGE(5, ("Testing Renaming Attributes in Dense Storage\n")); @@ -2724,21 +2724,21 @@ test_attr_dense_rename(hid_t fcpl, hid_t fapl) static void test_attr_dense_unlink(hid_t fcpl, hid_t fapl) { - hid_t fid; /* HDF5 File ID */ - hid_t dataset; /* Dataset ID */ - hid_t sid; /* Dataspace ID */ - hid_t attr; /* Attribute ID */ - hid_t dcpl; /* Dataset creation property list ID */ - char attrname[NAME_BUF_SIZE]; /* Name of attribute */ + hid_t fid; /* HDF5 File ID */ + hid_t dataset; /* Dataset ID */ + hid_t sid; /* Dataspace ID */ + hid_t attr; /* Attribute ID */ + hid_t dcpl; /* Dataset creation property list ID */ + char attrname[NAME_BUF_SIZE]; /* Name of attribute */ unsigned max_compact; /* Maximum # of attributes to store compactly */ unsigned min_dense; /* Minimum # of attributes to store "densely" */ - htri_t is_dense; /* Are attributes stored densely? */ + htri_t is_dense; /* Are attributes stored densely? */ size_t mesg_count; /* # of shared messages */ h5_stat_size_t empty_filesize; /* Size of empty file */ h5_stat_size_t filesize; /* Size of file after modifications */ H5O_info_t oinfo; /* Object info */ unsigned u; /* Local index variable */ - herr_t ret; /* Generic return value */ + herr_t ret; /* Generic return value */ /* Output message about test being performed */ MESSAGE(5, ("Testing Unlinking Object with Attributes in Dense Storage\n")); @@ -2854,19 +2854,19 @@ test_attr_dense_unlink(hid_t fcpl, hid_t fapl) static void test_attr_dense_limits(hid_t fcpl, hid_t fapl) { - hid_t fid; /* HDF5 File ID */ - hid_t dataset; /* Dataset ID */ - hid_t sid; /* Dataspace ID */ - hid_t attr; /* Attribute ID */ - hid_t dcpl; /* Dataset creation property list ID */ - char attrname[NAME_BUF_SIZE]; /* Name of attribute */ + hid_t fid; /* HDF5 File ID */ + hid_t dataset; /* Dataset ID */ + hid_t sid; /* Dataspace ID */ + hid_t attr; /* Attribute ID */ + hid_t dcpl; /* Dataset creation property list ID */ + char attrname[NAME_BUF_SIZE]; /* Name of attribute */ unsigned max_compact, rmax_compact; /* Maximum # of attributes to store compactly */ unsigned min_dense, rmin_dense; /* Minimum # of attributes to store "densely" */ - htri_t is_dense; /* Are attributes stored densely? */ + htri_t is_dense; /* Are attributes stored densely? */ unsigned u; /* Local index variable */ h5_stat_size_t empty_filesize; /* Size of empty file */ h5_stat_size_t filesize; /* Size of file after modifications */ - herr_t ret; /* Generic return value */ + herr_t ret; /* Generic return value */ /* Output message about test being performed */ MESSAGE(5, ("Testing Phase Change Limits For Attributes in Dense Storage\n")); @@ -3019,23 +3019,23 @@ test_attr_dense_limits(hid_t fcpl, hid_t fapl) static void test_attr_dense_dup_ids(hid_t fcpl, hid_t fapl) { - hid_t fid; /* HDF5 File ID */ - hid_t dataset; /* Dataset ID */ - hid_t gid1, gid2; /* Group ID */ - hid_t sid, sid2; /* Dataspace ID */ - hid_t attr, attr2, add_attr; /* Attribute ID */ - hid_t dcpl; /* Dataset creation property list ID */ - char attrname[NAME_BUF_SIZE]; /* Name of attribute */ - hsize_t dims[] = {ATTR1_DIM1}; + hid_t fid; /* HDF5 File ID */ + hid_t dataset; /* Dataset ID */ + hid_t gid1, gid2; /* Group ID */ + hid_t sid, sid2; /* Dataspace ID */ + hid_t attr, attr2, add_attr; /* Attribute ID */ + hid_t dcpl; /* Dataset creation property list ID */ + char attrname[NAME_BUF_SIZE]; /* Name of attribute */ + hsize_t dims[] = {ATTR1_DIM1}; int read_data1[ATTR1_DIM1]={0}; /* Buffer for reading attribute */ int rewrite_data[ATTR1_DIM1]={1234, -423, 9907256}; /* Test data for rewrite */ unsigned scalar_data = 1317; /* scalar data for attribute */ unsigned read_scalar; /* variable for reading attribute*/ unsigned max_compact; /* Maximum # of attributes to store compactly */ unsigned min_dense; /* Minimum # of attributes to store "densely" */ - htri_t is_dense; /* Are attributes stored densely? */ + htri_t is_dense; /* Are attributes stored densely? */ unsigned u, i; /* Local index variable */ - herr_t ret; /* Generic return value */ + herr_t ret; /* Generic return value */ /* Output message about test being performed */ MESSAGE(5, ("Testing operations with two IDs for Dense Storage\n")); @@ -3542,24 +3542,24 @@ test_attr_dense_dup_ids(hid_t fcpl, hid_t fapl) static void test_attr_big(hid_t fcpl, hid_t fapl) { - hid_t fid; /* HDF5 File ID */ - hid_t dataset; /* Dataset ID */ - hid_t sid; /* Dataspace ID */ - hid_t big_sid; /* "Big" dataspace ID */ + hid_t fid; /* HDF5 File ID */ + hid_t dataset; /* Dataset ID */ + hid_t sid; /* Dataspace ID */ + hid_t big_sid; /* "Big" dataspace ID */ hsize_t dims[ATTR6_RANK] = {ATTR6_DIM1, ATTR6_DIM2, ATTR6_DIM3}; /* Attribute dimensions */ - hid_t attr; /* Attribute ID */ - hid_t dcpl; /* Dataset creation property list ID */ - char attrname[NAME_BUF_SIZE]; /* Name of attribute */ + hid_t attr; /* Attribute ID */ + hid_t dcpl; /* Dataset creation property list ID */ + char attrname[NAME_BUF_SIZE]; /* Name of attribute */ unsigned max_compact; /* Maximum # of attributes to store compactly */ unsigned min_dense; /* Minimum # of attributes to store "densely" */ unsigned nshared_indices; /* # of shared message indices */ H5F_libver_t low, high; /* File format bounds */ - htri_t is_empty; /* Are there any attributes? */ - htri_t is_dense; /* Are attributes stored densely? */ + htri_t is_empty; /* Are there any attributes? */ + htri_t is_dense; /* Are attributes stored densely? */ unsigned u; /* Local index variable */ h5_stat_size_t empty_filesize; /* Size of empty file */ h5_stat_size_t filesize; /* Size of file after modifications */ - herr_t ret; /* Generic return value */ + herr_t ret; /* Generic return value */ /* Output message about test being performed */ MESSAGE(5, ("Testing Storing 'Big' Attributes in Dense Storage\n")); @@ -3812,20 +3812,20 @@ test_attr_big(hid_t fcpl, hid_t fapl) static void test_attr_null_space(hid_t fcpl, hid_t fapl) { - hid_t fid; /* HDF5 File ID */ - hid_t dataset; /* Dataset ID */ - hid_t sid; /* Dataspace ID */ - hid_t null_sid; /* "null" dataspace ID */ - hid_t attr_sid; /* Attribute's dataspace ID */ - hid_t attr; /* Attribute ID */ - char attrname[NAME_BUF_SIZE]; /* Name of attribute */ + hid_t fid; /* HDF5 File ID */ + hid_t dataset; /* Dataset ID */ + hid_t sid; /* Dataspace ID */ + hid_t null_sid; /* "null" dataspace ID */ + hid_t attr_sid; /* Attribute's dataspace ID */ + hid_t attr; /* Attribute ID */ + char attrname[NAME_BUF_SIZE]; /* Name of attribute */ unsigned value; /* Attribute value */ htri_t cmp; /* Results of comparison */ hsize_t storage_size; /* Size of storage for attribute */ H5A_info_t ainfo; /* Attribute info */ h5_stat_size_t empty_filesize; /* Size of empty file */ h5_stat_size_t filesize; /* Size of file after modifications */ - herr_t ret; /* Generic return value */ + herr_t ret; /* Generic return value */ /* Output message about test being performed */ MESSAGE(5, ("Testing Storing Attributes with 'null' dataspace\n")); @@ -4031,11 +4031,11 @@ static void test_attr_deprec(hid_t fcpl, hid_t fapl) { #ifndef H5_NO_DEPRECATED_SYMBOLS - hid_t fid; /* HDF5 File ID */ - hid_t dataset; /* Dataset ID */ - hid_t sid; /* Dataspace ID */ - hid_t attr; /* Attribute ID */ - herr_t ret; /* Generic return value */ + hid_t fid; /* HDF5 File ID */ + hid_t dataset; /* Dataset ID */ + hid_t sid; /* Dataspace ID */ + hid_t attr; /* Attribute ID */ + herr_t ret; /* Generic return value */ /* Output message about test being performed */ MESSAGE(5, ("Testing Deprecated Attribute Routines\n")); @@ -4139,15 +4139,15 @@ test_attr_deprec(hid_t fcpl, hid_t fapl) static void test_attr_many(hbool_t new_format, hid_t fcpl, hid_t fapl) { - hid_t fid; /* HDF5 File ID */ - hid_t gid; /* Group ID */ - hid_t sid; /* Dataspace ID */ - hid_t aid; /* Attribute ID */ - char attrname[NAME_BUF_SIZE]; /* Name of attribute */ + hid_t fid; /* HDF5 File ID */ + hid_t gid; /* Group ID */ + hid_t sid; /* Dataspace ID */ + hid_t aid; /* Attribute ID */ + char attrname[NAME_BUF_SIZE]; /* Name of attribute */ unsigned nattr = (new_format ? NATTR_MANY_NEW : NATTR_MANY_OLD); /* Number of attributes */ htri_t exists; /* Whether the attribute exists or not */ unsigned u; /* Local index variable */ - herr_t ret; /* Generic return value */ + herr_t ret; /* Generic return value */ /* Output message about test being performed */ MESSAGE(5, ("Testing Storing Many Attributes\n")); @@ -4268,14 +4268,14 @@ test_attr_many(hbool_t new_format, hid_t fcpl, hid_t fapl) static void test_attr_corder_create_basic(hid_t fcpl, hid_t fapl) { - hid_t fid; /* HDF5 File ID */ - hid_t dataset; /* Dataset ID */ - hid_t sid; /* Dataspace ID */ - hid_t dcpl; /* Dataset creation property list ID */ + hid_t fid; /* HDF5 File ID */ + hid_t dataset; /* Dataset ID */ + hid_t sid; /* Dataspace ID */ + hid_t dcpl; /* Dataset creation property list ID */ unsigned crt_order_flags;/* Creation order flags */ - htri_t is_empty; /* Are there any attributes? */ - htri_t is_dense; /* Are attributes stored densely? */ - herr_t ret; /* Generic return value */ + htri_t is_empty; /* Are there any attributes? */ + htri_t is_dense; /* Are attributes stored densely? */ + herr_t ret; /* Generic return value */ /* Output message about test being performed */ MESSAGE(5, ("Testing Basic Code for Attributes with Creation Order Info\n")); @@ -4384,21 +4384,21 @@ test_attr_corder_create_basic(hid_t fcpl, hid_t fapl) static void test_attr_corder_create_compact(hid_t fcpl, hid_t fapl) { - hid_t fid; /* HDF5 File ID */ - hid_t dset1, dset2, dset3; /* Dataset IDs */ - hid_t my_dataset; /* Current dataset ID */ - hid_t sid; /* Dataspace ID */ - hid_t attr; /* Attribute ID */ - hid_t dcpl; /* Dataset creation property list ID */ + hid_t fid; /* HDF5 File ID */ + hid_t dset1, dset2, dset3; /* Dataset IDs */ + hid_t my_dataset; /* Current dataset ID */ + hid_t sid; /* Dataspace ID */ + hid_t attr; /* Attribute ID */ + hid_t dcpl; /* Dataset creation property list ID */ unsigned max_compact; /* Maximum # of links to store in group compactly */ unsigned min_dense; /* Minimum # of links to store in group "densely" */ - htri_t is_empty; /* Are there any attributes? */ - htri_t is_dense; /* Are attributes stored densely? */ + htri_t is_empty; /* Are there any attributes? */ + htri_t is_dense; /* Are attributes stored densely? */ hsize_t nattrs; /* Number of attributes on object */ - char attrname[NAME_BUF_SIZE]; /* Name of attribute */ + char attrname[NAME_BUF_SIZE]; /* Name of attribute */ unsigned curr_dset; /* Current dataset to work on */ unsigned u; /* Local index variable */ - herr_t ret; /* Generic return value */ + herr_t ret; /* Generic return value */ /* Output message about test being performed */ MESSAGE(5, ("Testing Compact Storage of Attributes with Creation Order Info\n")); @@ -4582,23 +4582,23 @@ test_attr_corder_create_compact(hid_t fcpl, hid_t fapl) static void test_attr_corder_create_dense(hid_t fcpl, hid_t fapl) { - hid_t fid; /* HDF5 File ID */ - hid_t dset1, dset2, dset3; /* Dataset IDs */ - hid_t my_dataset; /* Current dataset ID */ - hid_t sid; /* Dataspace ID */ - hid_t attr; /* Attribute ID */ - hid_t dcpl; /* Dataset creation property list ID */ + hid_t fid; /* HDF5 File ID */ + hid_t dset1, dset2, dset3; /* Dataset IDs */ + hid_t my_dataset; /* Current dataset ID */ + hid_t sid; /* Dataspace ID */ + hid_t attr; /* Attribute ID */ + hid_t dcpl; /* Dataset creation property list ID */ unsigned max_compact; /* Maximum # of links to store in group compactly */ unsigned min_dense; /* Minimum # of links to store in group "densely" */ - htri_t is_empty; /* Are there any attributes? */ - htri_t is_dense; /* Are attributes stored densely? */ + htri_t is_empty; /* Are there any attributes? */ + htri_t is_dense; /* Are attributes stored densely? */ hsize_t nattrs; /* Number of attributes on object */ hsize_t name_count; /* # of records in name index */ hsize_t corder_count; /* # of records in creation order index */ - char attrname[NAME_BUF_SIZE]; /* Name of attribute */ + char attrname[NAME_BUF_SIZE]; /* Name of attribute */ unsigned curr_dset; /* Current dataset to work on */ unsigned u; /* Local index variable */ - herr_t ret; /* Generic return value */ + herr_t ret; /* Generic return value */ /* Output message about test being performed */ MESSAGE(5, ("Testing Dense Storage of Attributes with Creation Order Info\n")); @@ -4816,7 +4816,7 @@ test_attr_corder_create_reopen(hid_t fcpl, hid_t fapl) hid_t sid = -1; /* Dataspace ID */ hid_t aid = -1; /* Attribute ID */ int buf; /* Attribute data */ - herr_t ret; /* Generic return value */ + herr_t ret; /* Generic return value */ /* Output message about test being performed */ MESSAGE(5, ("Testing Creating Attributes w/New & Old Format\n")); @@ -4917,23 +4917,23 @@ test_attr_corder_create_reopen(hid_t fcpl, hid_t fapl) static void test_attr_corder_transition(hid_t fcpl, hid_t fapl) { - hid_t fid; /* HDF5 File ID */ - hid_t dset1, dset2, dset3; /* Dataset IDs */ - hid_t my_dataset; /* Current dataset ID */ - hid_t sid; /* Dataspace ID */ - hid_t attr; /* Attribute ID */ - hid_t dcpl; /* Dataset creation property list ID */ + hid_t fid; /* HDF5 File ID */ + hid_t dset1, dset2, dset3; /* Dataset IDs */ + hid_t my_dataset; /* Current dataset ID */ + hid_t sid; /* Dataspace ID */ + hid_t attr; /* Attribute ID */ + hid_t dcpl; /* Dataset creation property list ID */ unsigned max_compact; /* Maximum # of links to store in group compactly */ unsigned min_dense; /* Minimum # of links to store in group "densely" */ - htri_t is_empty; /* Are there any attributes? */ - htri_t is_dense; /* Are attributes stored densely? */ + htri_t is_empty; /* Are there any attributes? */ + htri_t is_dense; /* Are attributes stored densely? */ hsize_t nattrs; /* Number of attributes on object */ hsize_t name_count; /* # of records in name index */ hsize_t corder_count; /* # of records in creation order index */ - char attrname[NAME_BUF_SIZE]; /* Name of attribute */ + char attrname[NAME_BUF_SIZE]; /* Name of attribute */ unsigned curr_dset; /* Current dataset to work on */ unsigned u; /* Local index variable */ - herr_t ret; /* Generic return value */ + herr_t ret; /* Generic return value */ /* Output message about test being performed */ MESSAGE(5, ("Testing Storage Transitions of Attributes with Creation Order Info\n")); @@ -5323,28 +5323,28 @@ test_attr_corder_transition(hid_t fcpl, hid_t fapl) static void test_attr_corder_delete(hid_t fcpl, hid_t fapl) { - hid_t fid; /* HDF5 File ID */ - hid_t dset1, dset2, dset3; /* Dataset IDs */ - hid_t my_dataset; /* Current dataset ID */ - hid_t sid; /* Dataspace ID */ - hid_t attr; /* Attribute ID */ - hid_t dcpl; /* Dataset creation property list ID */ + hid_t fid; /* HDF5 File ID */ + hid_t dset1, dset2, dset3; /* Dataset IDs */ + hid_t my_dataset; /* Current dataset ID */ + hid_t sid; /* Dataspace ID */ + hid_t attr; /* Attribute ID */ + hid_t dcpl; /* Dataset creation property list ID */ unsigned max_compact; /* Maximum # of links to store in group compactly */ unsigned min_dense; /* Minimum # of links to store in group "densely" */ - htri_t is_empty; /* Are there any attributes? */ - htri_t is_dense; /* Are attributes stored densely? */ + htri_t is_empty; /* Are there any attributes? */ + htri_t is_dense; /* Are attributes stored densely? */ hsize_t nattrs; /* Number of attributes on object */ hsize_t name_count; /* # of records in name index */ hsize_t corder_count; /* # of records in creation order index */ unsigned reopen_file; /* Whether to re-open the file before deleting group */ - char attrname[NAME_BUF_SIZE]; /* Name of attribute */ + char attrname[NAME_BUF_SIZE]; /* Name of attribute */ #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 */ + 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")); @@ -5521,7 +5521,7 @@ test_attr_corder_delete(hid_t fcpl, hid_t fapl) * Purpose: Support routine for attr_info_by_idx, to verify the attribute * info is correct for a attribute * - * Note: This routine assumes that the attributes have been added to the + * Note: This routine assumes that the attributes have been added to the * object in alphabetical order. * * Return: Success: 0 @@ -5539,7 +5539,7 @@ attr_info_by_idx_check(hid_t obj_id, const char *attrname, hsize_t n, char tmpname[NAME_BUF_SIZE]; /* Temporary attribute name */ H5A_info_t ainfo; /* Attribute info struct */ int old_nerrs; /* Number of errors when entering this check */ - herr_t ret; /* Generic return value */ + herr_t ret; /* Generic return value */ /* Retrieve the current # of reported errors */ old_nerrs = GetTestNumErrs(); @@ -5671,26 +5671,26 @@ attr_info_by_idx_check(hid_t obj_id, const char *attrname, hsize_t n, static void test_attr_info_by_idx(hbool_t new_format, hid_t fcpl, hid_t fapl) { - hid_t fid; /* HDF5 File ID */ - hid_t dset1, dset2, dset3; /* Dataset IDs */ - hid_t my_dataset; /* Current dataset ID */ - hid_t sid; /* Dataspace ID */ - hid_t attr; /* Attribute ID */ - hid_t dcpl; /* Dataset creation property list ID */ + hid_t fid; /* HDF5 File ID */ + hid_t dset1, dset2, dset3; /* Dataset IDs */ + hid_t my_dataset; /* Current dataset ID */ + hid_t sid; /* Dataspace ID */ + hid_t attr; /* Attribute ID */ + hid_t dcpl; /* Dataset creation property list ID */ H5A_info_t ainfo; /* Attribute information */ unsigned max_compact; /* Maximum # of links to store in group compactly */ unsigned min_dense; /* Minimum # of links to store in group "densely" */ - htri_t is_empty; /* Are there any attributes? */ - htri_t is_dense; /* Are attributes stored densely? */ + htri_t is_empty; /* Are there any attributes? */ + htri_t is_dense; /* Are attributes stored densely? */ hsize_t nattrs; /* Number of attributes on object */ hsize_t name_count; /* # of records in name index */ hsize_t corder_count; /* # of records in creation order index */ unsigned use_index; /* Use index on creation order values */ - char attrname[NAME_BUF_SIZE]; /* Name of attribute */ + char attrname[NAME_BUF_SIZE]; /* Name of attribute */ char tmpname[NAME_BUF_SIZE]; /* Temporary attribute name */ unsigned curr_dset; /* Current dataset to work on */ unsigned u; /* Local index variable */ - herr_t ret; /* Generic return value */ + herr_t ret; /* Generic return value */ /* Create dataspace for dataset & attributes */ sid = H5Screate(H5S_SCALAR); @@ -5881,28 +5881,28 @@ test_attr_info_by_idx(hbool_t new_format, hid_t fcpl, hid_t fapl) static void test_attr_delete_by_idx(hbool_t new_format, hid_t fcpl, hid_t fapl) { - hid_t fid; /* HDF5 File ID */ - hid_t dset1, dset2, dset3; /* Dataset IDs */ - hid_t my_dataset; /* Current dataset ID */ - hid_t sid; /* Dataspace ID */ - hid_t attr; /* Attribute ID */ - hid_t dcpl; /* Dataset creation property list ID */ + hid_t fid; /* HDF5 File ID */ + hid_t dset1, dset2, dset3; /* Dataset IDs */ + hid_t my_dataset; /* Current dataset ID */ + hid_t sid; /* Dataspace ID */ + hid_t attr; /* Attribute ID */ + hid_t dcpl; /* Dataset creation property list ID */ H5A_info_t ainfo; /* Attribute information */ unsigned max_compact; /* Maximum # of links to store in group compactly */ unsigned min_dense; /* Minimum # of links to store in group "densely" */ - htri_t is_empty; /* Are there any attributes? */ - htri_t is_dense; /* Are attributes stored densely? */ + htri_t is_empty; /* Are there any attributes? */ + htri_t is_dense; /* Are attributes stored densely? */ hsize_t nattrs; /* Number of attributes on object */ hsize_t name_count; /* # of records in name index */ hsize_t corder_count; /* # of records in creation order index */ H5_index_t idx_type; /* Type of index to operate on */ H5_iter_order_t order; /* Order within in the index */ unsigned use_index; /* Use index on creation order values */ - char attrname[NAME_BUF_SIZE]; /* Name of attribute */ + char attrname[NAME_BUF_SIZE]; /* Name of attribute */ char tmpname[NAME_BUF_SIZE]; /* Temporary attribute name */ unsigned curr_dset; /* Current dataset to work on */ unsigned u; /* Local index variable */ - herr_t ret; /* Generic return value */ + herr_t ret; /* Generic return value */ /* Create dataspace for dataset & attributes */ sid = H5Screate(H5S_SCALAR); @@ -6822,16 +6822,16 @@ attr_iterate_check(hid_t fid, const char *dsetname, hid_t obj_id, static void test_attr_iterate2(hbool_t new_format, hid_t fcpl, hid_t fapl) { - hid_t fid; /* HDF5 File ID */ - hid_t dset1, dset2, dset3; /* Dataset IDs */ - hid_t my_dataset; /* Current dataset ID */ - hid_t sid; /* Dataspace ID */ - hid_t attr; /* Attribute ID */ - hid_t dcpl; /* Dataset creation property list ID */ + hid_t fid; /* HDF5 File ID */ + hid_t dset1, dset2, dset3; /* Dataset IDs */ + hid_t my_dataset; /* Current dataset ID */ + hid_t sid; /* Dataspace ID */ + hid_t attr; /* Attribute ID */ + hid_t dcpl; /* Dataset creation property list ID */ unsigned max_compact; /* Maximum # of links to store in group compactly */ unsigned min_dense; /* Minimum # of links to store in group "densely" */ - htri_t is_empty; /* Are there any attributes? */ - htri_t is_dense; /* Are attributes stored densely? */ + htri_t is_empty; /* Are there any attributes? */ + htri_t is_dense; /* Are attributes stored densely? */ hsize_t nattrs; /* Number of attributes on object */ hsize_t name_count; /* # of records in name index */ hsize_t corder_count; /* # of records in creation order index */ @@ -6842,10 +6842,10 @@ test_attr_iterate2(hbool_t new_format, hid_t fcpl, hid_t fapl) hsize_t idx; /* Start index for iteration */ unsigned use_index; /* Use index on creation order values */ const char *dsetname; /* Name of dataset for attributes */ - char attrname[NAME_BUF_SIZE]; /* Name of attribute */ + char attrname[NAME_BUF_SIZE]; /* Name of attribute */ unsigned curr_dset; /* Current dataset to work on */ unsigned u; /* Local index variable */ - herr_t ret; /* Generic return value */ + herr_t ret; /* Generic return value */ /* Create dataspace for dataset & attributes */ sid = H5Screate(H5S_SCALAR); @@ -7138,7 +7138,7 @@ attr_open_by_idx_check(hid_t obj_id, H5_index_t idx_type, H5_iter_order_t order, H5A_info_t ainfo; /* Attribute info */ int old_nerrs; /* Number of errors when entering this check */ unsigned u; /* Local index variable */ - herr_t ret; /* Generic return value */ + herr_t ret; /* Generic return value */ /* Retrieve the current # of reported errors */ old_nerrs = GetTestNumErrs(); @@ -7186,27 +7186,27 @@ attr_open_by_idx_check(hid_t obj_id, H5_index_t idx_type, H5_iter_order_t order, static void test_attr_open_by_idx(hbool_t new_format, hid_t fcpl, hid_t fapl) { - hid_t fid; /* HDF5 File ID */ - hid_t dset1, dset2, dset3; /* Dataset IDs */ - hid_t my_dataset; /* Current dataset ID */ - hid_t sid; /* Dataspace ID */ - hid_t attr; /* Attribute ID */ - hid_t dcpl; /* Dataset creation property list ID */ + hid_t fid; /* HDF5 File ID */ + hid_t dset1, dset2, dset3; /* Dataset IDs */ + hid_t my_dataset; /* Current dataset ID */ + hid_t sid; /* Dataspace ID */ + hid_t attr; /* Attribute ID */ + hid_t dcpl; /* Dataset creation property list ID */ unsigned max_compact; /* Maximum # of links to store in group compactly */ unsigned min_dense; /* Minimum # of links to store in group "densely" */ - htri_t is_empty; /* Are there any attributes? */ - htri_t is_dense; /* Are attributes stored densely? */ + htri_t is_empty; /* Are there any attributes? */ + htri_t is_dense; /* Are attributes stored densely? */ hsize_t nattrs; /* Number of attributes on object */ hsize_t name_count; /* # of records in name index */ hsize_t corder_count; /* # of records in creation order index */ H5_index_t idx_type; /* Type of index to operate on */ H5_iter_order_t order; /* Order within in the index */ unsigned use_index; /* Use index on creation order values */ - char attrname[NAME_BUF_SIZE]; /* Name of attribute */ + char attrname[NAME_BUF_SIZE]; /* Name of attribute */ unsigned curr_dset; /* Current dataset to work on */ unsigned u; /* Local index variable */ - hid_t ret_id; /* Generic hid_t return value */ - herr_t ret; /* Generic return value */ + hid_t ret_id; /* Generic hid_t return value */ + herr_t ret; /* Generic return value */ /* Create dataspace for dataset & attributes */ sid = H5Screate(H5S_SCALAR); @@ -7458,10 +7458,10 @@ attr_open_check(hid_t fid, const char *dsetname, hid_t obj_id, { hid_t attr_id; /* ID of attribute to test */ H5A_info_t ainfo; /* Attribute info */ - char attrname[NAME_BUF_SIZE]; /* Name of attribute */ + char attrname[NAME_BUF_SIZE]; /* Name of attribute */ int old_nerrs; /* Number of errors when entering this check */ unsigned u; /* Local index variable */ - herr_t ret; /* Generic return value */ + herr_t ret; /* Generic return value */ /* Retrieve the current # of reported errors */ old_nerrs = GetTestNumErrs(); @@ -7534,26 +7534,26 @@ attr_open_check(hid_t fid, const char *dsetname, hid_t obj_id, static void test_attr_open_by_name(hbool_t new_format, hid_t fcpl, hid_t fapl) { - hid_t fid; /* HDF5 File ID */ - hid_t dset1, dset2, dset3; /* Dataset IDs */ - hid_t my_dataset; /* Current dataset ID */ - hid_t sid; /* Dataspace ID */ - hid_t attr; /* Attribute ID */ - hid_t dcpl; /* Dataset creation property list ID */ + hid_t fid; /* HDF5 File ID */ + hid_t dset1, dset2, dset3; /* Dataset IDs */ + hid_t my_dataset; /* Current dataset ID */ + hid_t sid; /* Dataspace ID */ + hid_t attr; /* Attribute ID */ + hid_t dcpl; /* Dataset creation property list ID */ unsigned max_compact; /* Maximum # of links to store in group compactly */ unsigned min_dense; /* Minimum # of links to store in group "densely" */ - htri_t is_empty; /* Are there any attributes? */ - htri_t is_dense; /* Are attributes stored densely? */ + htri_t is_empty; /* Are there any attributes? */ + htri_t is_dense; /* Are attributes stored densely? */ hsize_t nattrs; /* Number of attributes on object */ hsize_t name_count; /* # of records in name index */ hsize_t corder_count; /* # of records in creation order index */ unsigned use_index; /* Use index on creation order values */ const char *dsetname; /* Name of dataset for attributes */ - char attrname[NAME_BUF_SIZE]; /* Name of attribute */ + char attrname[NAME_BUF_SIZE]; /* Name of attribute */ unsigned curr_dset; /* Current dataset to work on */ unsigned u; /* Local index variable */ - hid_t ret_id; /* Generic hid_t return value */ - herr_t ret; /* Generic return value */ + hid_t ret_id; /* Generic hid_t return value */ + herr_t ret; /* Generic return value */ /* Create dataspace for dataset & attributes */ sid = H5Screate(H5S_SCALAR); @@ -7789,25 +7789,25 @@ test_attr_open_by_name(hbool_t new_format, hid_t fcpl, hid_t fapl) static void test_attr_create_by_name(hbool_t new_format, hid_t fcpl, hid_t fapl) { - hid_t fid; /* HDF5 File ID */ - hid_t dset1, dset2, dset3; /* Dataset IDs */ - hid_t my_dataset; /* Current dataset ID */ - hid_t sid; /* Dataspace ID */ - hid_t attr; /* Attribute ID */ - hid_t dcpl; /* Dataset creation property list ID */ + hid_t fid; /* HDF5 File ID */ + hid_t dset1, dset2, dset3; /* Dataset IDs */ + hid_t my_dataset; /* Current dataset ID */ + hid_t sid; /* Dataspace ID */ + hid_t attr; /* Attribute ID */ + hid_t dcpl; /* Dataset creation property list ID */ unsigned max_compact; /* Maximum # of links to store in group compactly */ unsigned min_dense; /* Minimum # of links to store in group "densely" */ - htri_t is_empty; /* Are there any attributes? */ - htri_t is_dense; /* Are attributes stored densely? */ + htri_t is_empty; /* Are there any attributes? */ + htri_t is_dense; /* Are attributes stored densely? */ hsize_t nattrs; /* Number of attributes on object */ hsize_t name_count; /* # of records in name index */ hsize_t corder_count; /* # of records in creation order index */ unsigned use_index; /* Use index on creation order values */ const char *dsetname; /* Name of dataset for attributes */ - char attrname[NAME_BUF_SIZE]; /* Name of attribute */ + char attrname[NAME_BUF_SIZE]; /* Name of attribute */ unsigned curr_dset; /* Current dataset to work on */ unsigned u; /* Local index variable */ - herr_t ret; /* Generic return value */ + herr_t ret; /* Generic return value */ /* Create dataspace for dataset & attributes */ sid = H5Screate(H5S_SCALAR); @@ -8012,28 +8012,28 @@ test_attr_create_by_name(hbool_t new_format, hid_t fcpl, hid_t fapl) static void test_attr_shared_write(hid_t fcpl, hid_t fapl) { - hid_t fid; /* File ID */ - hid_t my_fcpl; /* File creation property list ID */ - hid_t dataset, dataset2; /* Dataset IDs */ - hid_t attr_tid; /* Attribute's datatype ID */ - hid_t sid, big_sid; /* Dataspace IDs */ - hsize_t big_dims[] = {SPACE1_DIM1, SPACE1_DIM2, SPACE1_DIM3}; /* Dimensions for "big" attribute */ - hid_t attr; /* Attribute ID */ - hid_t dcpl; /* Dataset creation property list ID */ - char attrname[NAME_BUF_SIZE]; /* Name of attribute */ + hid_t fid; /* File ID */ + hid_t my_fcpl; /* File creation property list ID */ + hid_t dataset, dataset2; /* Dataset IDs */ + hid_t attr_tid; /* Attribute's datatype ID */ + hid_t sid, big_sid; /* Dataspace IDs */ + hsize_t big_dims[] = {SPACE1_DIM1, SPACE1_DIM2, SPACE1_DIM3}; /* Dimensions for "big" attribute */ + hid_t attr; /* Attribute ID */ + hid_t dcpl; /* Dataset creation property list ID */ + char attrname[NAME_BUF_SIZE]; /* Name of attribute */ unsigned max_compact; /* Maximum # of attributes to store compactly */ unsigned min_dense; /* Minimum # of attributes to store "densely" */ - htri_t is_dense; /* Are attributes stored densely? */ - htri_t is_shared; /* Is attributes shared? */ + htri_t is_dense; /* Are attributes stored densely? */ + htri_t is_shared; /* Is attributes shared? */ hsize_t shared_refcount; /* Reference count of shared attribute */ unsigned attr_value; /* Attribute value */ - unsigned *big_value; /* Data for "big" attribute */ + unsigned *big_value; /* Data for "big" attribute */ size_t mesg_count; /* # of shared messages */ unsigned test_shared; /* Index over shared component type */ unsigned u; /* Local index variable */ h5_stat_size_t empty_filesize; /* Size of empty file */ h5_stat_size_t filesize; /* Size of file after modifications */ - herr_t ret; /* Generic return value */ + herr_t ret; /* Generic return value */ /* Output message about test being performed */ MESSAGE(5, ("Testing Writing Shared & Unshared Attributes in Compact & Dense Storage\n")); @@ -8342,29 +8342,29 @@ test_attr_shared_write(hid_t fcpl, hid_t fapl) static void test_attr_shared_rename(hid_t fcpl, hid_t fapl) { - hid_t fid; /* HDF5 File ID */ - hid_t my_fcpl; /* File creation property list ID */ - hid_t dataset, dataset2; /* Dataset ID2 */ - hid_t attr_tid; /* Attribute's datatype ID */ - hid_t sid, big_sid; /* Dataspace IDs */ - hsize_t big_dims[] = {SPACE1_DIM1, SPACE1_DIM2, SPACE1_DIM3}; /* Dimensions for "big" attribute */ - hid_t attr; /* Attribute ID */ - hid_t dcpl; /* Dataset creation property list ID */ - char attrname[NAME_BUF_SIZE]; /* Name of attribute on first dataset */ - char attrname2[NAME_BUF_SIZE]; /* Name of attribute on second dataset */ + hid_t fid; /* HDF5 File ID */ + hid_t my_fcpl; /* File creation property list ID */ + hid_t dataset, dataset2; /* Dataset ID2 */ + hid_t attr_tid; /* Attribute's datatype ID */ + hid_t sid, big_sid; /* Dataspace IDs */ + hsize_t big_dims[] = {SPACE1_DIM1, SPACE1_DIM2, SPACE1_DIM3}; /* Dimensions for "big" attribute */ + hid_t attr; /* Attribute ID */ + hid_t dcpl; /* Dataset creation property list ID */ + char attrname[NAME_BUF_SIZE]; /* Name of attribute on first dataset */ + char attrname2[NAME_BUF_SIZE]; /* Name of attribute on second dataset */ unsigned max_compact; /* Maximum # of attributes to store compactly */ unsigned min_dense; /* Minimum # of attributes to store "densely" */ - htri_t is_dense; /* Are attributes stored densely? */ - htri_t is_shared; /* Is attributes shared? */ + htri_t is_dense; /* Are attributes stored densely? */ + htri_t is_shared; /* Is attributes shared? */ hsize_t shared_refcount; /* Reference count of shared attribute */ unsigned attr_value; /* Attribute value */ - unsigned *big_value; /* Data for "big" attribute */ + unsigned *big_value; /* Data for "big" attribute */ size_t mesg_count; /* # of shared messages */ unsigned test_shared; /* Index over shared component type */ unsigned u; /* Local index variable */ h5_stat_size_t empty_filesize; /* Size of empty file */ h5_stat_size_t filesize; /* Size of file after modifications */ - herr_t ret; /* Generic return value */ + herr_t ret; /* Generic return value */ /* Output message about test being performed */ MESSAGE(5, ("Testing Renaming Shared & Unshared Attributes in Compact & Dense Storage\n")); @@ -8789,28 +8789,28 @@ test_attr_shared_rename(hid_t fcpl, hid_t fapl) static void test_attr_shared_delete(hid_t fcpl, hid_t fapl) { - hid_t fid; /* File ID */ - hid_t my_fcpl; /* File creation property list ID */ - hid_t dataset, dataset2; /* Dataset IDs */ - hid_t attr_tid; /* Attribute's datatype ID */ - hid_t sid, big_sid; /* Dataspace IDs */ - hsize_t big_dims[] = {SPACE1_DIM1, SPACE1_DIM2, SPACE1_DIM3}; /* Dimensions for "big" attribute */ - hid_t attr; /* Attribute ID */ - hid_t dcpl; /* Dataset creation property list ID */ - char attrname[NAME_BUF_SIZE]; /* Name of attribute on first dataset */ + hid_t fid; /* File ID */ + hid_t my_fcpl; /* File creation property list ID */ + hid_t dataset, dataset2; /* Dataset IDs */ + hid_t attr_tid; /* Attribute's datatype ID */ + hid_t sid, big_sid; /* Dataspace IDs */ + hsize_t big_dims[] = {SPACE1_DIM1, SPACE1_DIM2, SPACE1_DIM3}; /* Dimensions for "big" attribute */ + hid_t attr; /* Attribute ID */ + hid_t dcpl; /* Dataset creation property list ID */ + char attrname[NAME_BUF_SIZE]; /* Name of attribute on first dataset */ unsigned max_compact; /* Maximum # of attributes to store compactly */ unsigned min_dense; /* Minimum # of attributes to store "densely" */ - htri_t is_dense; /* Are attributes stored densely? */ - htri_t is_shared; /* Is attributes shared? */ + htri_t is_dense; /* Are attributes stored densely? */ + htri_t is_shared; /* Is attributes shared? */ hsize_t shared_refcount; /* Reference count of shared attribute */ unsigned attr_value; /* Attribute value */ - unsigned *big_value; /* Data for "big" attribute */ + unsigned *big_value; /* Data for "big" attribute */ size_t mesg_count; /* # of shared messages */ unsigned test_shared; /* Index over shared component type */ unsigned u; /* Local index variable */ h5_stat_size_t empty_filesize; /* Size of empty file */ h5_stat_size_t filesize; /* Size of file after modifications */ - herr_t ret; /* Generic return value */ + herr_t ret; /* Generic return value */ /* Output message about test being performed */ MESSAGE(5, ("Testing Deleting Shared & Unshared Attributes in Compact & Dense Storage\n")); @@ -9158,28 +9158,28 @@ test_attr_shared_delete(hid_t fcpl, hid_t fapl) static void test_attr_shared_unlink(hid_t fcpl, hid_t fapl) { - hid_t fid; /* File ID */ - hid_t my_fcpl; /* File creation property list ID */ - hid_t dataset, dataset2; /* Dataset IDs */ - hid_t attr_tid; /* Attribute's datatype ID */ - hid_t sid, big_sid; /* Dataspace IDs */ - hsize_t big_dims[] = {SPACE1_DIM1, SPACE1_DIM2, SPACE1_DIM3}; /* Dimensions for "big" attribute */ - hid_t attr; /* Attribute ID */ - hid_t dcpl; /* Dataset creation property list ID */ - char attrname[NAME_BUF_SIZE]; /* Name of attribute on first dataset */ + hid_t fid; /* File ID */ + hid_t my_fcpl; /* File creation property list ID */ + hid_t dataset, dataset2; /* Dataset IDs */ + hid_t attr_tid; /* Attribute's datatype ID */ + hid_t sid, big_sid; /* Dataspace IDs */ + hsize_t big_dims[] = {SPACE1_DIM1, SPACE1_DIM2, SPACE1_DIM3}; /* Dimensions for "big" attribute */ + hid_t attr; /* Attribute ID */ + hid_t dcpl; /* Dataset creation property list ID */ + char attrname[NAME_BUF_SIZE]; /* Name of attribute on first dataset */ unsigned max_compact; /* Maximum # of attributes to store compactly */ unsigned min_dense; /* Minimum # of attributes to store "densely" */ - htri_t is_dense; /* Are attributes stored densely? */ - htri_t is_shared; /* Is attributes shared? */ + htri_t is_dense; /* Are attributes stored densely? */ + htri_t is_shared; /* Is attributes shared? */ hsize_t shared_refcount; /* Reference count of shared attribute */ unsigned attr_value; /* Attribute value */ - unsigned *big_value; /* Data for "big" attribute */ + unsigned *big_value; /* Data for "big" attribute */ size_t mesg_count; /* # of shared messages */ unsigned test_shared; /* Index over shared component type */ unsigned u; /* Local index variable */ h5_stat_size_t empty_filesize; /* Size of empty file */ h5_stat_size_t filesize; /* Size of file after modifications */ - herr_t ret; /* Generic return value */ + herr_t ret; /* Generic return value */ /* Output message about test being performed */ MESSAGE(5, ("Testing Unlinking Object with Shared Attributes in Compact & Dense Storage\n")); @@ -10639,7 +10639,7 @@ test_attr_bug9(hid_t fcpl, hid_t fapl) /* Create enough attributes to cause a change to dense storage */ for(i = 0; i < max_compact + 1; i++) { /* Create attribute */ - snprintf(aname, sizeof(aname), "%u", i); + HDsnprintf(aname, sizeof(aname), "%u", i); aid = H5Acreate2(gid, aname, H5T_NATIVE_CHAR, sid, H5P_DEFAULT, H5P_DEFAULT); CHECK(aid, FAIL, "H5Acreate2"); @@ -10680,8 +10680,8 @@ test_attr_bug9(hid_t fcpl, hid_t fapl) void test_attr(void) { - hid_t fapl = (-1), fapl2 = (-1); /* File access property lists */ - hid_t fcpl = (-1), fcpl2 = (-1); /* File creation property lists */ + hid_t fapl = (-1), fapl2 = (-1); /* File access property lists */ + hid_t fcpl = (-1), fcpl2 = (-1); /* File creation property lists */ unsigned new_format; /* Whether to use the new format or not */ unsigned use_shared; /* Whether to use shared attributes or not */ herr_t ret; /* Generic return value */ @@ -10868,13 +10868,13 @@ test_attr(void) /*------------------------------------------------------------------------- - * Function: cleanup_attr + * Function: cleanup_attr * - * Purpose: Cleanup temporary test files + * Purpose: Cleanup temporary test files * - * Return: none + * Return: none * - * Programmer: Albert Cheng + * Programmer: Albert Cheng * July 2, 1998 * * Modifications: -- cgit v0.12 From 30ef3de22dab36c3e3364fe0500918faf659d796 Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Thu, 16 Nov 2017 09:40:48 -0600 Subject: HDFFV-10328, HDFFV-10329 Merge from develop --- CMakeFilters.cmake | 16 ++++++++-------- release_docs/RELEASE.txt | 19 +++++++++++++++++++ src/CMakeLists.txt | 4 ++-- test/CMakeLists.txt | 4 ++-- test/dsets.c | 2 +- 5 files changed, 32 insertions(+), 13 deletions(-) diff --git a/CMakeFilters.cmake b/CMakeFilters.cmake index 804b16b..71dabb1 100644 --- a/CMakeFilters.cmake +++ b/CMakeFilters.cmake @@ -45,8 +45,8 @@ if (HDF5_ENABLE_Z_LIB_SUPPORT) if (NOT ZLIB_FOUND) find_package (ZLIB) # Legacy find if (ZLIB_FOUND) - set (LINK_LIBS ${LINK_LIBS} ${ZLIB_LIBRARIES}) - set (LINK_SHARED_LIBS ${LINK_SHARED_LIBS} ${ZLIB_LIBRARIES}) + set (LINK_COMP_LIBS ${LINK_COMP_LIBS} ${ZLIB_LIBRARIES}) + set (LINK_COMP_SHARED_LIBS ${LINK_COMP_SHARED_LIBS} ${ZLIB_LIBRARIES}) endif () endif () endif () @@ -78,9 +78,9 @@ if (HDF5_ENABLE_Z_LIB_SUPPORT) set (EXTERNAL_FILTERS "${EXTERNAL_FILTERS} DEFLATE") endif () if (BUILD_SHARED_LIBS) - set (LINK_SHARED_LIBS ${LINK_SHARED_LIBS} ${ZLIB_SHARED_LIBRARY}) + set (LINK_COMP_SHARED_LIBS ${LINK_COMP_SHARED_LIBS} ${ZLIB_SHARED_LIBRARY}) endif () - set (LINK_LIBS ${LINK_LIBS} ${ZLIB_STATIC_LIBRARY}) + set (LINK_COMP_LIBS ${LINK_COMP_LIBS} ${ZLIB_STATIC_LIBRARY}) INCLUDE_DIRECTORIES (${ZLIB_INCLUDE_DIRS}) message (STATUS "Filter ZLIB is ON") endif () @@ -96,8 +96,8 @@ if (HDF5_ENABLE_SZIP_SUPPORT) if (NOT SZIP_FOUND) find_package (SZIP) # Legacy find if (SZIP_FOUND) - set (LINK_LIBS ${LINK_LIBS} ${SZIP_LIBRARIES}) - set (LINK_SHARED_LIBS ${LINK_SHARED_LIBS} ${SZIP_LIBRARIES}) + set (LINK_COMP_LIBS ${LINK_COMP_LIBS} ${SZIP_LIBRARIES}) + set (LINK_COMP_SHARED_LIBS ${LINK_COMP_SHARED_LIBS} ${SZIP_LIBRARIES}) endif () endif () endif () @@ -119,9 +119,9 @@ if (HDF5_ENABLE_SZIP_SUPPORT) endif () endif () if (BUILD_SHARED_LIBS) - set (LINK_SHARED_LIBS ${LINK_SHARED_LIBS} ${SZIP_SHARED_LIBRARY}) + set (LINK_COMP_SHARED_LIBS ${LINK_COMP_SHARED_LIBS} ${SZIP_SHARED_LIBRARY}) endif () - set (LINK_LIBS ${LINK_LIBS} ${SZIP_STATIC_LIBRARY}) + set (LINK_COMP_LIBS ${LINK_COMP_LIBS} ${SZIP_STATIC_LIBRARY}) INCLUDE_DIRECTORIES (${SZIP_INCLUDE_DIRS}) message (STATUS "Filter SZIP is ON") if (H5_HAVE_FILTER_SZIP) diff --git a/release_docs/RELEASE.txt b/release_docs/RELEASE.txt index 6e4bbcf..096d2d0 100644 --- a/release_docs/RELEASE.txt +++ b/release_docs/RELEASE.txt @@ -231,6 +231,25 @@ Bug Fixes since HDF5-1.10.1 release Library ------- + - filter plugin handling in H5PL.c and H5Z.c + + It was discovered that the dynamic loading process used by + filter plugins had issues with memory allocation and library + dependencies. + + CMake build process changed to use LINK INTERFACE keywords, which + allowed HDF5 C library to make dependent libraries private. The + filter plugin libraries no longer require dependent libraries + (such as szip or zlib) to be available. + (ADB - 2017/11/16, HDFFV-10328) + + The H5Z_class2_t structure returned by the filter plugins are + now dynamically allocated in H5Zregister function. Access to + the functions in the filter library now always use the dynamic + library API. + + (ADB - 2017/11/16, HDFFV-10329) + - Fix rare object header corruption bug In certain cases, such as when converting large attributes to dense diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index d95185f..31155a2 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -881,7 +881,7 @@ set (gen_SRCS ${HDF5_BINARY_DIR}/H5Tinit.c ${HDF5_BINARY_DIR}/H5lib_settings.c) add_library (${HDF5_LIB_TARGET} STATIC ${common_SRCS} ${gen_SRCS} ${H5_PUBLIC_HEADERS} ${H5_PRIVATE_HEADERS} ${H5_GENERATED_HEADERS}) TARGET_C_PROPERTIES (${HDF5_LIB_TARGET} STATIC " " " ") -target_link_libraries (${HDF5_LIB_TARGET} PRIVATE ${LINK_LIBS}) +target_link_libraries (${HDF5_LIB_TARGET} PRIVATE ${LINK_LIBS} ${LINK_COMP_LIBS}) if (NOT WIN32) target_link_libraries (${HDF5_LIB_TARGET} PUBLIC dl) endif () @@ -925,7 +925,7 @@ if (BUILD_SHARED_LIBS) set (shared_gen_SRCS ${HDF5_BINARY_DIR}/shared/H5Tinit.c ${HDF5_BINARY_DIR}/shared/H5lib_settings.c) add_library (${HDF5_LIBSH_TARGET} SHARED ${common_SRCS} ${shared_gen_SRCS} ${H5_PUBLIC_HEADERS} ${H5_PRIVATE_HEADERS} ${H5_GENERATED_HEADERS}) TARGET_C_PROPERTIES (${HDF5_LIBSH_TARGET} SHARED " " " ") - target_link_libraries (${HDF5_LIBSH_TARGET} PRIVATE ${LINK_LIBS}) + target_link_libraries (${HDF5_LIBSH_TARGET} PRIVATE ${LINK_LIBS} ${LINK_COMP_LIBS}) if (NOT WIN32) target_link_libraries (${HDF5_LIBSH_TARGET} PUBLIC dl) endif () diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index 8522c1d..4e6b0e5 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -37,7 +37,7 @@ endif () if (MINGW) target_link_libraries (${HDF5_TEST_LIB_TARGET} "wsock32.lib") endif () -target_link_libraries (${HDF5_TEST_LIB_TARGET} ${HDF5_LIB_TARGET}) +target_link_libraries (${HDF5_TEST_LIB_TARGET} ${HDF5_LIB_TARGET} ${LINK_LIBS}) H5_SET_LIB_OPTIONS (${HDF5_TEST_LIB_TARGET} ${HDF5_TEST_LIB_NAME} STATIC) set_target_properties (${HDF5_TEST_LIB_TARGET} PROPERTIES FOLDER libraries/test @@ -53,7 +53,7 @@ if (BUILD_SHARED_LIBS) if (MINGW) target_link_libraries (${HDF5_TEST_LIBSH_TARGET} "wsock32.lib") endif () - target_link_libraries (${HDF5_TEST_LIBSH_TARGET} ${HDF5_LIBSH_TARGET}) + target_link_libraries (${HDF5_TEST_LIBSH_TARGET} ${HDF5_LIBSH_TARGET} ${LINK_LIBS}) H5_SET_LIB_OPTIONS (${HDF5_TEST_LIBSH_TARGET} ${HDF5_TEST_LIB_NAME} SHARED ${HDF5_PACKAGE_SOVERSION}) set_target_properties (${HDF5_TEST_LIBSH_TARGET} PROPERTIES FOLDER libraries/test diff --git a/test/dsets.c b/test/dsets.c index 4088304..0fff2d1 100644 --- a/test/dsets.c +++ b/test/dsets.c @@ -2087,7 +2087,7 @@ test_get_filter_info(void) #ifdef H5_HAVE_FILTER_SZIP if(H5Zget_filter_info(H5Z_FILTER_SZIP, &flags) < 0) TEST_ERROR - if(SZ_encoder_enabled()) { + if(H5Z_SZIP->encoder_present) { if(((flags & H5Z_FILTER_CONFIG_ENCODE_ENABLED) == 0) || ((flags & H5Z_FILTER_CONFIG_DECODE_ENABLED) == 0)) TEST_ERROR -- cgit v0.12 From f318eed72f1f163120dc71bdfb5747ddc9a45732 Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Fri, 17 Nov 2017 14:10:39 -0600 Subject: HDFFV-10328 - remove plugin allocation changes --- release_docs/RELEASE.txt | 19 +- src/H5PLplugin_cache.c | 4 +- src/H5Z.c | 688 ++++++++++++++++++++++++----------------------- 3 files changed, 357 insertions(+), 354 deletions(-) diff --git a/release_docs/RELEASE.txt b/release_docs/RELEASE.txt index 096d2d0..3a841a6 100644 --- a/release_docs/RELEASE.txt +++ b/release_docs/RELEASE.txt @@ -234,8 +234,7 @@ Bug Fixes since HDF5-1.10.1 release - filter plugin handling in H5PL.c and H5Z.c It was discovered that the dynamic loading process used by - filter plugins had issues with memory allocation and library - dependencies. + filter plugins had issues with library dependencies. CMake build process changed to use LINK INTERFACE keywords, which allowed HDF5 C library to make dependent libraries private. The @@ -243,21 +242,6 @@ Bug Fixes since HDF5-1.10.1 release (such as szip or zlib) to be available. (ADB - 2017/11/16, HDFFV-10328) - The H5Z_class2_t structure returned by the filter plugins are - now dynamically allocated in H5Zregister function. Access to - the functions in the filter library now always use the dynamic - library API. - - (ADB - 2017/11/16, HDFFV-10329) - - - Fix rare object header corruption bug - - In certain cases, such as when converting large attributes to dense - storage, an error could occur which would either fail an assertion or - cause file corruption. Fixed and added test. - - (NAF - 2017/11/14, HDFFV-10274) - - H5Zfilter_avail in H5Z.c The public function checked for plugins, while the private @@ -379,6 +363,7 @@ Bug Fixes since HDF5-1.10.1 release Too many commands for POST_BUILD step caused command line to be too big on windows. + Changed foreach of copy command to use a custom command with the use of the HDFTEST_COPY_FILE macro. diff --git a/src/H5PLplugin_cache.c b/src/H5PLplugin_cache.c index d826ba0..e483e01 100644 --- a/src/H5PLplugin_cache.c +++ b/src/H5PLplugin_cache.c @@ -283,11 +283,11 @@ H5PL__find_plugin_in_cache(const H5PL_search_params_t *search_params, hbool_t *f /* Get the "get plugin info" function from the plugin. */ if (NULL == (get_plugin_info_function = (H5PL_get_plugin_info_t)H5PL_GET_LIB_FUNC((H5PL_cache_g[u]).handle, "H5PLget_plugin_info"))) - HGOTO_ERROR(H5E_DATATYPE, H5E_CANTGET, FAIL, "can't get function for H5PLget_plugin_info") + HGOTO_ERROR(H5E_PLUGIN, H5E_CANTGET, FAIL, "can't get function for H5PLget_plugin_info") /* Call the "get plugin info" function */ if (NULL == (filter_info = (const H5Z_class2_t *)(*get_plugin_info_function)())) - HGOTO_ERROR(H5E_DATATYPE, H5E_CANTGET, FAIL, "can't get plugin info") + HGOTO_ERROR(H5E_PLUGIN, H5E_CANTGET, FAIL, "can't get plugin info") /* Set output parameters */ *found = TRUE; diff --git a/src/H5Z.c b/src/H5Z.c index 1d023b5..1f1a905 100644 --- a/src/H5Z.c +++ b/src/H5Z.c @@ -34,15 +34,15 @@ #ifdef H5Z_DEBUG typedef struct H5Z_stats_t { struct { - hsize_t total; /*total number of bytes processed */ - hsize_t errors; /*bytes of total attributable to errors */ - H5_timer_t timer; /*execution time including errors */ - } stats[2]; /*0=output, 1=input */ + hsize_t total; /* total number of bytes processed */ + hsize_t errors; /* bytes of total attributable to errors */ + H5_timer_t timer; /* execution time including errors */ + } stats[2]; /* 0=output, 1=input */ } H5Z_stats_t; #endif /* H5Z_DEBUG */ typedef struct H5Z_object_t { - H5Z_filter_t filter_id; /* ID of the filter we're looking for */ + H5Z_filter_t filter_id; /* ID of the filter we're looking for */ htri_t found; /* Whether we find an object using the filter */ } H5Z_object_t; @@ -86,23 +86,23 @@ H5Z__init_package(void) FUNC_ENTER_PACKAGE /* Internal filters */ - if(H5Z_register(H5Z_SHUFFLE) < 0) - HGOTO_ERROR(H5E_PLINE, H5E_CANTINIT, FAIL, "unable to register shuffle filter") - if(H5Z_register(H5Z_FLETCHER32) < 0) - HGOTO_ERROR(H5E_PLINE, H5E_CANTINIT, FAIL, "unable to register fletcher32 filter") - if(H5Z_register(H5Z_NBIT) < 0) - HGOTO_ERROR(H5E_PLINE, H5E_CANTINIT, FAIL, "unable to register nbit filter") - if(H5Z_register(H5Z_SCALEOFFSET) < 0) - HGOTO_ERROR(H5E_PLINE, H5E_CANTINIT, FAIL, "unable to register scaleoffset filter") + if (H5Z_register (H5Z_SHUFFLE) < 0) + HGOTO_ERROR (H5E_PLINE, H5E_CANTINIT, FAIL, "unable to register shuffle filter") + if (H5Z_register (H5Z_FLETCHER32) < 0) + HGOTO_ERROR (H5E_PLINE, H5E_CANTINIT, FAIL, "unable to register fletcher32 filter") + if (H5Z_register (H5Z_NBIT) < 0) + HGOTO_ERROR (H5E_PLINE, H5E_CANTINIT, FAIL, "unable to register nbit filter") + if (H5Z_register (H5Z_SCALEOFFSET) < 0) + HGOTO_ERROR (H5E_PLINE, H5E_CANTINIT, FAIL, "unable to register scaleoffset filter") /* External filters */ #ifdef H5_HAVE_FILTER_DEFLATE - if(H5Z_register(H5Z_DEFLATE) < 0) + if (H5Z_register (H5Z_DEFLATE) < 0) HGOTO_ERROR (H5E_PLINE, H5E_CANTINIT, FAIL, "unable to register deflate filter") #endif /* H5_HAVE_FILTER_DEFLATE */ #ifdef H5_HAVE_FILTER_SZIP H5Z_SZIP->encoder_present = SZ_encoder_enabled(); - if(H5Z_register(H5Z_SZIP) < 0) + if (H5Z_register (H5Z_SZIP) < 0) HGOTO_ERROR (H5E_PLINE, H5E_CANTINIT, FAIL, "unable to register szip filter") #endif /* H5_HAVE_FILTER_SZIP */ @@ -211,8 +211,8 @@ herr_t H5Zregister(const void *cls) { const H5Z_class2_t *cls_real = (const H5Z_class2_t *) cls; /* "Real" class pointer */ - H5Z_class2_t cls_new; /* Translated class struct */ - herr_t ret_value=SUCCEED; /* Return value */ + H5Z_class2_t cls_new; /* Translated class struct */ + herr_t ret_value = SUCCEED; /* Return value */ FUNC_ENTER_API(FAIL) H5TRACE1("e", "*x", cls); @@ -231,7 +231,7 @@ H5Zregister(const void *cls) * at least 256, there should be no overlap and the version of the struct * can be determined by the value of the first field. */ - if(cls_real->version != H5Z_CLASS_T_VERS) { + if (cls_real->version != H5Z_CLASS_T_VERS) { #ifndef H5_NO_DEPRECATED_SYMBOLS /* Assume it is an old "H5Z_class1_t" instead */ const H5Z_class1_t *cls_old = (const H5Z_class1_t *) cls; @@ -251,19 +251,19 @@ H5Zregister(const void *cls) #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"); + HGOTO_ERROR (H5E_ARGS, H5E_BADVALUE, FAIL, "invalid H5Z_class_t version number"); #endif /* H5_NO_DEPRECATED_SYMBOLS */ } /* end if */ - if (cls_real->id<0 || cls_real->id>H5Z_FILTER_MAX) + if (cls_real->id < 0 || cls_real->id > H5Z_FILTER_MAX) HGOTO_ERROR (H5E_ARGS, H5E_BADVALUE, FAIL, "invalid filter identification number") - if (cls_real->idid < H5Z_FILTER_RESERVED) HGOTO_ERROR (H5E_ARGS, H5E_BADVALUE, FAIL, "unable to modify predefined filters") - if (cls_real->filter==NULL) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no filter function specified") + if (cls_real->filter == NULL) + HGOTO_ERROR (H5E_ARGS, H5E_BADVALUE, FAIL, "no filter function specified") /* Do it */ - if (H5Z_register (cls_real)<0) + if (H5Z_register (cls_real) < 0) HGOTO_ERROR (H5E_PLINE, H5E_CANTINIT, FAIL, "unable to register filter") done: @@ -277,39 +277,40 @@ done: * Purpose: Same as the public version except this one allows filters * to be set for predefined method numbers id >= 0 && cls->id <= H5Z_FILTER_MAX); + HDassert (cls); + HDassert (cls->id >= 0 && cls->id <= H5Z_FILTER_MAX); /* Is the filter already registered? */ - for(i = 0; i < H5Z_table_used_g; i++) - if(H5Z_table_g[i].id == cls->id) + for (i = 0; i < H5Z_table_used_g; i++) + if (H5Z_table_g[i].id == cls->id) break; /* Filter not already registered */ - if(i >= H5Z_table_used_g) { - if(H5Z_table_used_g >= H5Z_table_alloc_g) { - size_t n = MAX(H5Z_MAX_NFILTERS, 2*H5Z_table_alloc_g); + if (i >= H5Z_table_used_g) { + if (H5Z_table_used_g >= H5Z_table_alloc_g) { + size_t n = MAX(H5Z_MAX_NFILTERS, 2 * H5Z_table_alloc_g); H5Z_class2_t *table = (H5Z_class2_t *)H5MM_realloc(H5Z_table_g, n * sizeof(H5Z_class2_t)); #ifdef H5Z_DEBUG H5Z_stats_t *stat_table = (H5Z_stats_t *)H5MM_realloc(H5Z_stat_table_g, n * sizeof(H5Z_stats_t)); #endif /* H5Z_DEBUG */ - if(!table) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "unable to extend filter table") + if (!table) + HGOTO_ERROR (H5E_RESOURCE, H5E_NOSPACE, FAIL, "unable to extend filter table") H5Z_table_g = table; #ifdef H5Z_DEBUG - if(!stat_table) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "unable to extend filter statistics table") + if (!stat_table) + HGOTO_ERROR (H5E_RESOURCE, H5E_NOSPACE, FAIL, "unable to extend filter statistics table") H5Z_stat_table_g = stat_table; #endif /* H5Z_DEBUG */ H5Z_table_alloc_g = n; @@ -317,15 +318,15 @@ H5Z_register (const H5Z_class2_t *cls) /* Initialize */ i = H5Z_table_used_g++; - HDmemcpy(H5Z_table_g+i, cls, sizeof(H5Z_class2_t)); + HDmemcpy (H5Z_table_g+i, cls, sizeof(H5Z_class2_t)); #ifdef H5Z_DEBUG - HDmemset(H5Z_stat_table_g+i, 0, sizeof(H5Z_stats_t)); + HDmemset (H5Z_stat_table_g+i, 0, sizeof(H5Z_stats_t)); #endif /* H5Z_DEBUG */ } /* end if */ /* Filter already registered */ else { /* Replace old contents */ - HDmemcpy(H5Z_table_g+i, cls, sizeof(H5Z_class2_t)); + HDmemcpy (H5Z_table_g+i, cls, sizeof(H5Z_class2_t)); } /* end else */ done: @@ -338,25 +339,26 @@ done: * * Purpose: This function unregisters a filter. * - * Return: Non-negative on success/Negative on failure + * Return: Non-negative on success + * Negative on failure *------------------------------------------------------------------------- */ herr_t H5Zunregister(H5Z_filter_t id) { - herr_t ret_value=SUCCEED; /* Return value */ + herr_t ret_value = SUCCEED; /* Return value */ FUNC_ENTER_API(FAIL) H5TRACE1("e", "Zf", id); /* Check args */ - if(id < 0 || id > H5Z_FILTER_MAX) + if (id < 0 || id > H5Z_FILTER_MAX) HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid filter identification number") - if(id < H5Z_FILTER_RESERVED) + if (id < H5Z_FILTER_RESERVED) HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "unable to modify predefined filters") /* Do it */ - if(H5Z_unregister(id) < 0) + if (H5Z_unregister(id) < 0) HGOTO_ERROR(H5E_PLINE, H5E_CANTINIT, FAIL, "unable to unregister filter") done: @@ -370,27 +372,28 @@ done: * Purpose: Same as the public version except this one allows filters * to be unset for predefined method numbers =0 && filter_id<=H5Z_FILTER_MAX); /* Is the filter already registered? */ - for (filter_index=0; filter_index=H5Z_table_used_g) + if (filter_index >= H5Z_table_used_g) HGOTO_ERROR(H5E_PLINE, H5E_NOTFOUND, FAIL, "filter is not registered") /* Initialize the structure object for iteration */ @@ -398,28 +401,28 @@ H5Z_unregister(H5Z_filter_t filter_id) object.found = FALSE; /* Iterate through all opened datasets, returns a failure if any of them uses the filter */ - if(H5I_iterate(H5I_DATASET, H5Z__check_unregister_dset_cb, &object, FALSE) < 0) + if (H5I_iterate(H5I_DATASET, H5Z__check_unregister_dset_cb, &object, FALSE) < 0) HGOTO_ERROR(H5E_FILE, H5E_BADITER, FAIL, "iteration failed") - if(object.found) + if (object.found) HGOTO_ERROR(H5E_PLINE, H5E_CANTRELEASE, FAIL, "can't unregister filter because a dataset is still using it") /* Iterate through all opened groups, returns a failure if any of them uses the filter */ - if(H5I_iterate(H5I_GROUP, H5Z__check_unregister_group_cb, &object, FALSE) < 0) + if (H5I_iterate(H5I_GROUP, H5Z__check_unregister_group_cb, &object, FALSE) < 0) HGOTO_ERROR(H5E_FILE, H5E_BADITER, FAIL, "iteration failed") - if(object.found) + if (object.found) HGOTO_ERROR(H5E_PLINE, H5E_CANTRELEASE, FAIL, "can't unregister filter because a group is still using it") /* Iterate through all opened files and flush them */ - if(H5I_iterate(H5I_FILE, H5Z__flush_file_cb, NULL, FALSE) < 0) + if (H5I_iterate(H5I_FILE, H5Z__flush_file_cb, NULL, FALSE) < 0) HGOTO_ERROR(H5E_FILE, H5E_BADITER, FAIL, "iteration failed") /* Remove filter from table */ /* Don't worry about shrinking table size (for now) */ - HDmemmove(&H5Z_table_g[filter_index],&H5Z_table_g[filter_index+1],sizeof(H5Z_class2_t)*((H5Z_table_used_g-1)-filter_index)); + HDmemmove (&H5Z_table_g[filter_index], &H5Z_table_g[filter_index+1], sizeof(H5Z_class2_t)*((H5Z_table_used_g-1)-filter_index)); #ifdef H5Z_DEBUG - HDmemmove(&H5Z_stat_table_g[filter_index],&H5Z_stat_table_g[filter_index+1],sizeof(H5Z_stats_t)*((H5Z_table_used_g-1)-filter_index)); + HDmemmove (&H5Z_stat_table_g[filter_index], &H5Z_stat_table_g[filter_index+1], sizeof(H5Z_stats_t)*((H5Z_table_used_g-1)-filter_index)); #endif /* H5Z_DEBUG */ H5Z_table_used_g--; @@ -431,10 +434,10 @@ done: /*------------------------------------------------------------------------- * Function: H5Z__check_unregister * - * Purpose: Check if an object uses the filter to be unregistered. + * Purpose: Check if an object uses the filter to be unregistered. * - * Return: TRUE if the object uses the filter. - * FALSE if not, NEGATIVE on error. + * Return: TRUE if the object uses the filter. + * FALSE if not, NEGATIVE on error. *------------------------------------------------------------------------- */ static htri_t @@ -446,12 +449,12 @@ H5Z__check_unregister(hid_t ocpl_id, H5Z_filter_t filter_id) FUNC_ENTER_STATIC /* Get the plist structure of object creation */ - if(NULL == (plist = H5P_object_verify(ocpl_id, H5P_OBJECT_CREATE))) - HGOTO_ERROR(H5E_PLINE, H5E_BADATOM, FAIL, "can't find object for ID") + if (NULL == (plist = H5P_object_verify(ocpl_id, H5P_OBJECT_CREATE))) + HGOTO_ERROR (H5E_PLINE, H5E_BADATOM, FAIL, "can't find object for ID") /* Check if the object creation property list uses the filter */ - if((ret_value = H5P_filter_in_pline(plist, filter_id)) < 0) - HGOTO_ERROR(H5E_PLINE, H5E_CANTGET, FAIL, "can't check filter in pipeline") + if ((ret_value = H5P_filter_in_pline(plist, filter_id)) < 0) + HGOTO_ERROR (H5E_PLINE, H5E_CANTGET, FAIL, "can't check filter in pipeline") done: FUNC_LEAVE_NOAPI(ret_value) @@ -483,25 +486,25 @@ H5Z__check_unregister_group_cb(void *obj_ptr, hid_t H5_ATTR_UNUSED obj_id, void HDassert(obj_ptr); /* Get the group creation property */ - if((ocpl_id = H5G_get_create_plist((H5G_t *)obj_ptr)) < 0) - HGOTO_ERROR(H5E_PLINE, H5E_CANTGET, FAIL, "can't get group creation property list") + if ((ocpl_id = H5G_get_create_plist((H5G_t *)obj_ptr)) < 0) + HGOTO_ERROR (H5E_PLINE, H5E_CANTGET, FAIL, "can't get group creation property list") /* Check if the filter is in the group creation property list */ - if((filter_in_pline = H5Z__check_unregister(ocpl_id, object->filter_id)) < 0) - HGOTO_ERROR(H5E_PLINE, H5E_CANTGET, FAIL, "can't check filter in pipeline") + if ((filter_in_pline = H5Z__check_unregister(ocpl_id, object->filter_id)) < 0) + HGOTO_ERROR (H5E_PLINE, H5E_CANTGET, FAIL, "can't check filter in pipeline") /* H5I_iterate expects TRUE to stop the loop over objects. Stop the loop and * let H5Z_unregister return failure. */ - if(filter_in_pline) { + if (filter_in_pline) { object->found = TRUE; ret_value = TRUE; } /* end if */ done: - if(ocpl_id > 0) - if(H5I_dec_app_ref(ocpl_id) < 0) - HDONE_ERROR(H5E_PLINE, H5E_CANTDEC, FAIL, "can't release plist") + if (ocpl_id > 0) + if (H5I_dec_app_ref(ocpl_id) < 0) + HDONE_ERROR (H5E_PLINE, H5E_CANTDEC, FAIL, "can't release plist") FUNC_LEAVE_NOAPI(ret_value) } /* end H5Z__check_unregister_group_cb() */ @@ -510,13 +513,13 @@ done: /*------------------------------------------------------------------------- * Function: H5Z__check_unregister_dset_cb * - * Purpose: The callback function for H5Z_unregister. It iterates - * through all opened objects. If the object is a dataset - * or a group and it uses the filter to be unregistered, the - * function returns TRUE. + * Purpose: The callback function for H5Z_unregister. It iterates + * through all opened objects. If the object is a dataset + * or a group and it uses the filter to be unregistered, the + * function returns TRUE. * - * Return: TRUE if the object uses the filter. - * FALSE otherwise. + * Return: TRUE if the object uses the filter. + * FALSE otherwise. *------------------------------------------------------------------------- */ static int @@ -529,28 +532,28 @@ H5Z__check_unregister_dset_cb(void *obj_ptr, hid_t H5_ATTR_UNUSED obj_id, void * FUNC_ENTER_STATIC - HDassert(obj_ptr); + HDassert (obj_ptr); /* Get the dataset creation property */ - if((ocpl_id = H5D_get_create_plist((H5D_t *)obj_ptr)) < 0) - HGOTO_ERROR(H5E_PLINE, H5E_CANTGET, FAIL, "can't get dataset creation property list") + if ((ocpl_id = H5D_get_create_plist((H5D_t *)obj_ptr)) < 0) + HGOTO_ERROR (H5E_PLINE, H5E_CANTGET, FAIL, "can't get dataset creation property list") /* Check if the filter is in the dataset creation property list */ - if((filter_in_pline = H5Z__check_unregister(ocpl_id, object->filter_id)) < 0) - HGOTO_ERROR(H5E_PLINE, H5E_CANTGET, FAIL, "can't check filter in pipeline") + if ((filter_in_pline = H5Z__check_unregister(ocpl_id, object->filter_id)) < 0) + HGOTO_ERROR (H5E_PLINE, H5E_CANTGET, FAIL, "can't check filter in pipeline") /* H5I_iterate expects TRUE to stop the loop over objects. Stop the loop and * let H5Z_unregister return failure. */ - if(filter_in_pline) { + if (filter_in_pline) { object->found = TRUE; ret_value = TRUE; } /* end if */ done: - if(ocpl_id > 0) - if(H5I_dec_app_ref(ocpl_id) < 0) - HDONE_ERROR(H5E_PLINE, H5E_CANTDEC, FAIL, "can't release plist") + if (ocpl_id > 0) + if (H5I_dec_app_ref(ocpl_id) < 0) + HDONE_ERROR (H5E_PLINE, H5E_CANTDEC, FAIL, "can't release plist") FUNC_LEAVE_NOAPI(ret_value) } /* end H5Z__check_unregister_dset_cb() */ @@ -569,17 +572,17 @@ done: static int H5Z__flush_file_cb(void *obj_ptr, hid_t H5_ATTR_UNUSED obj_id, void H5_ATTR_UNUSED *key) { - int ret_value = FALSE; /* Return value */ + int ret_value = FALSE; /* Return value */ FUNC_ENTER_STATIC - HDassert(obj_ptr); + HDassert (obj_ptr); /* Call the flush routine for mounted file hierarchies. Do a global flush * if the file is opened for write */ - if(H5F_ACC_RDWR & H5F_INTENT((H5F_t *)obj_ptr)) { - if(H5F_flush_mounts((H5F_t *)obj_ptr, H5AC_ind_read_dxpl_id, H5AC_rawdata_dxpl_id) < 0) - HGOTO_ERROR(H5E_PLINE, H5E_CANTFLUSH, FAIL, "unable to flush file hierarchy") + if (H5F_ACC_RDWR & H5F_INTENT((H5F_t *)obj_ptr)) { + if (H5F_flush_mounts((H5F_t *)obj_ptr, H5AC_ind_read_dxpl_id, H5AC_rawdata_dxpl_id) < 0) + HGOTO_ERROR (H5E_PLINE, H5E_CANTFLUSH, FAIL, "unable to flush file hierarchy") } /* end if */ done: @@ -598,17 +601,17 @@ done: htri_t H5Zfilter_avail(H5Z_filter_t id) { - htri_t ret_value=FALSE; /* Return value */ + htri_t ret_value = FALSE; /* Return value */ FUNC_ENTER_API(FAIL) H5TRACE1("t", "Zf", id); /* Check args */ - if(id<0 || id>H5Z_FILTER_MAX) + if (id < 0 || id > H5Z_FILTER_MAX) HGOTO_ERROR (H5E_ARGS, H5E_BADVALUE, FAIL, "invalid filter identification number") - if((ret_value = H5Z_filter_avail(id)) < 0) - HGOTO_ERROR(H5E_PLINE, H5E_NOTFOUND, FAIL, "unable to check the availability of the filter") + if ((ret_value = H5Z_filter_avail(id)) < 0) + HGOTO_ERROR (H5E_PLINE, H5E_NOTFOUND, FAIL, "unable to check the availability of the filter") done: FUNC_LEAVE_API(ret_value) @@ -626,21 +629,21 @@ done: htri_t H5Z_filter_avail(H5Z_filter_t id) { - size_t i; /* Local index variable */ - const H5Z_class2_t *filter_info; - htri_t ret_value = FALSE; /* Return value */ + size_t i; /* Local index variable */ + H5Z_class2_t *filter_info; + htri_t ret_value = FALSE; /* Return value */ FUNC_ENTER_NOAPI(FAIL) /* Is the filter already registered? */ - for(i = 0; i < H5Z_table_used_g; i++) - if(H5Z_table_g[i].id == id) - HGOTO_DONE(TRUE) - - if(NULL != (filter_info = (const H5Z_class2_t *)H5PL_load(H5PL_TYPE_FILTER, (int)id))) { - if(H5Z_register(filter_info) < 0) - HGOTO_ERROR(H5E_PLINE, H5E_CANTINIT, FAIL, "unable to register loaded filter") - HGOTO_DONE(TRUE) + for (i = 0; i < H5Z_table_used_g; i++) + if (H5Z_table_g[i].id == id) + HGOTO_DONE (TRUE) + + if (NULL != (filter_info = (const H5Z_class2_t *)H5PL_load(H5PL_TYPE_FILTER, (int)id))) { + if (H5Z_register (filter_info) < 0) + HGOTO_ERROR (H5E_PLINE, H5E_CANTINIT, FAIL, "unable to register loaded filter") + HGOTO_DONE (TRUE) } done: FUNC_LEAVE_NOAPI(ret_value) @@ -666,59 +669,59 @@ H5Z_prelude_callback(const H5O_pline_t *pline, hid_t dcpl_id, hid_t type_id, { H5Z_class2_t *fclass; /* Individual filter information */ size_t u; /* Local index variable */ - htri_t ret_value = TRUE; /* Return value */ + htri_t ret_value = TRUE; /* Return value */ FUNC_ENTER_NOAPI_NOINIT HDassert(pline->nused > 0); /* Iterate over filters */ - for(u = 0; u < pline->nused; u++) { + for (u = 0; u < pline->nused; u++) { /* Get filter information */ - if(NULL == (fclass = H5Z_find(pline->filter[u].id))) { + if (NULL == (fclass = H5Z_find(pline->filter[u].id))) { /* Ignore errors from optional filters */ - if(pline->filter[u].flags & H5Z_FLAG_OPTIONAL) - H5E_clear_stack(NULL); + if (pline->filter[u].flags & H5Z_FLAG_OPTIONAL) + H5E_clear_stack (NULL); else - HGOTO_ERROR(H5E_PLINE, H5E_NOTFOUND, FAIL, "required filter was not located") + HGOTO_ERROR (H5E_PLINE, H5E_NOTFOUND, FAIL, "required filter was not located") } /* end if */ else { /* Make correct callback */ - switch(prelude_type) { + switch (prelude_type) { case H5Z_PRELUDE_CAN_APPLY: /* Check if filter is configured to be able to encode */ - if(!fclass->encoder_present) - HGOTO_ERROR(H5E_PLINE, H5E_NOENCODER, FAIL, "Filter present but encoding is disabled."); + if (!fclass->encoder_present) + HGOTO_ERROR (H5E_PLINE, H5E_NOENCODER, FAIL, "Filter present but encoding is disabled."); /* Check if there is a "can apply" callback */ - if(fclass->can_apply) { + if (fclass->can_apply) { /* Make callback to filter's "can apply" function */ htri_t status = (fclass->can_apply)(dcpl_id, type_id, space_id); /* Indicate error during filter callback */ - if(status < 0) + if (status < 0) HGOTO_ERROR(H5E_PLINE, H5E_CANAPPLY, FAIL, "error during user callback") /* Indicate filter can't apply to this combination of parameters. * If the filter is NOT optional, returns failure. */ - if(status == FALSE && !(pline->filter[u].flags & H5Z_FLAG_OPTIONAL)) + if (status == FALSE && !(pline->filter[u].flags & H5Z_FLAG_OPTIONAL)) HGOTO_ERROR(H5E_PLINE, H5E_CANAPPLY, FAIL, "filter parameters not appropriate") } /* end if */ break; case H5Z_PRELUDE_SET_LOCAL: /* Check if there is a "set local" callback */ - if(fclass->set_local) { + if (fclass->set_local) { /* Make callback to filter's "set local" function */ - if((fclass->set_local)(dcpl_id, type_id, space_id) < 0) + if ((fclass->set_local)(dcpl_id, type_id, space_id) < 0) /* Indicate error during filter callback */ - HGOTO_ERROR(H5E_PLINE, H5E_SETLOCAL, FAIL, "error during user callback") + HGOTO_ERROR (H5E_PLINE, H5E_SETLOCAL, FAIL, "error during user callback") } /* end if */ break; default: - HDassert("invalid prelude type" && 0); + HDassert ("invalid prelude type" && 0); } /* end switch */ } /* end else */ } /* end for */ @@ -745,62 +748,62 @@ done: static herr_t H5Z_prepare_prelude_callback_dcpl(hid_t dcpl_id, hid_t type_id, H5Z_prelude_type_t prelude_type) { - hid_t space_id = -1; /* ID for dataspace describing chunk */ - herr_t ret_value = SUCCEED; /* Return value */ + hid_t space_id = -1; /* ID for dataspace describing chunk */ + herr_t ret_value = SUCCEED; /* Return value */ FUNC_ENTER_NOAPI_NOINIT - HDassert(H5I_GENPROP_LST == H5I_get_type(dcpl_id)); - HDassert(H5I_DATATYPE == H5I_get_type(type_id)); + HDassert (H5I_GENPROP_LST == H5I_get_type(dcpl_id)); + HDassert (H5I_DATATYPE == H5I_get_type(type_id)); /* Check if the property list is non-default */ - if(dcpl_id != H5P_DATASET_CREATE_DEFAULT) { - H5P_genplist_t *dc_plist; /* Dataset creation property list object */ - H5O_layout_t dcpl_layout; /* Dataset's layout information */ + if (dcpl_id != H5P_DATASET_CREATE_DEFAULT) { + H5P_genplist_t *dc_plist; /* Dataset creation property list object */ + H5O_layout_t dcpl_layout; /* Dataset's layout information */ /* Get dataset creation property list object */ - if(NULL == (dc_plist = (H5P_genplist_t *)H5I_object(dcpl_id))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "can't get dataset creation property list") + if (NULL == (dc_plist = (H5P_genplist_t *)H5I_object(dcpl_id))) + HGOTO_ERROR (H5E_ARGS, H5E_BADTYPE, FAIL, "can't get dataset creation property list") /* Peek at the layout information */ - if(H5P_peek(dc_plist, H5D_CRT_LAYOUT_NAME, &dcpl_layout) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't retrieve layout") + if (H5P_peek(dc_plist, H5D_CRT_LAYOUT_NAME, &dcpl_layout) < 0) + HGOTO_ERROR (H5E_PLIST, H5E_CANTGET, FAIL, "can't retrieve layout") /* Check if the dataset is chunked */ - if(H5D_CHUNKED == dcpl_layout.type) { + if (H5D_CHUNKED == dcpl_layout.type) { H5O_pline_t dcpl_pline; /* Object's I/O pipeline information */ /* Get I/O pipeline information */ - if(H5P_peek(dc_plist, H5O_CRT_PIPELINE_NAME, &dcpl_pline) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't retrieve pipeline filter") + if (H5P_peek(dc_plist, H5O_CRT_PIPELINE_NAME, &dcpl_pline) < 0) + HGOTO_ERROR (H5E_PLIST, H5E_CANTGET, FAIL, "can't retrieve pipeline filter") /* Check if the chunks have filters */ - if(dcpl_pline.nused > 0) { + if (dcpl_pline.nused > 0) { hsize_t chunk_dims[H5O_LAYOUT_NDIMS]; /* Size of chunk dimensions */ - H5S_t *space; /* Dataspace describing chunk */ - size_t u; /* Local index variable */ + H5S_t *space; /* Dataspace describing chunk */ + size_t u; /* Local index variable */ - /* Create a data space for a chunk & set the extent */ - for(u = 0; u < dcpl_layout.u.chunk.ndims; u++) + /* Create a dataspace for a chunk & set the extent */ + for (u = 0; u < dcpl_layout.u.chunk.ndims; u++) chunk_dims[u] = dcpl_layout.u.chunk.dim[u]; - if(NULL == (space = H5S_create_simple(dcpl_layout.u.chunk.ndims, chunk_dims, NULL))) - HGOTO_ERROR(H5E_DATASPACE, H5E_CANTCREATE, FAIL, "can't create simple dataspace") + if (NULL == (space = H5S_create_simple(dcpl_layout.u.chunk.ndims, chunk_dims, NULL))) + HGOTO_ERROR (H5E_DATASPACE, H5E_CANTCREATE, FAIL, "can't create simple dataspace") /* Get ID for dataspace to pass to filter routines */ - if((space_id = H5I_register(H5I_DATASPACE, space, FALSE)) < 0) { - (void)H5S_close(space); - HGOTO_ERROR(H5E_ATOM, H5E_CANTREGISTER, FAIL, "unable to register dataspace ID") + if ((space_id = H5I_register(H5I_DATASPACE, space, FALSE)) < 0) { + (void)H5S_close (space); + HGOTO_ERROR (H5E_ATOM, H5E_CANTREGISTER, FAIL, "unable to register dataspace ID") } /* end if */ /* Make the callbacks */ - if(H5Z_prelude_callback(&dcpl_pline, dcpl_id, type_id, space_id, prelude_type) < 0) - HGOTO_ERROR(H5E_PLINE, H5E_CANAPPLY, FAIL, "unable to apply filter") + if (H5Z_prelude_callback(&dcpl_pline, dcpl_id, type_id, space_id, prelude_type) < 0) + HGOTO_ERROR (H5E_PLINE, H5E_CANAPPLY, FAIL, "unable to apply filter") } /* end if */ } /* end if */ } /* end if */ done: - if(space_id > 0 && H5I_dec_ref(space_id) < 0) + if (space_id > 0 && H5I_dec_ref(space_id) < 0) HDONE_ERROR(H5E_PLINE, H5E_CANTRELEASE, FAIL, "unable to close dataspace") FUNC_LEAVE_NOAPI(ret_value) @@ -814,7 +817,8 @@ done: * property list can be applied to a particular combination of * datatype and dataspace for a dataset. * - * Return: Non-negative on success/Negative on failure + * Return: Non-negative on success + * Negative on failure * * Notes: The chunk dimensions are used to create a dataspace, instead * of passing in the dataset's dataspace, since the chunk @@ -829,8 +833,8 @@ H5Z_can_apply(hid_t dcpl_id, hid_t type_id) FUNC_ENTER_NOAPI(FAIL) /* Make "can apply" callbacks for filters in pipeline */ - if(H5Z_prepare_prelude_callback_dcpl(dcpl_id, type_id, H5Z_PRELUDE_CAN_APPLY) < 0) - HGOTO_ERROR(H5E_PLINE, H5E_CANAPPLY, FAIL, "unable to apply filter") + if (H5Z_prepare_prelude_callback_dcpl(dcpl_id, type_id, H5Z_PRELUDE_CAN_APPLY) < 0) + HGOTO_ERROR (H5E_PLINE, H5E_CANAPPLY, FAIL, "unable to apply filter") done: FUNC_LEAVE_NOAPI(ret_value) @@ -844,7 +848,8 @@ done: * settings for filters on a new dataset, based on the datatype * and dataspace of that dataset (chunk). * - * Return: Non-negative on success/Negative on failure + * Return: Non-negative on success + * Negative on failure * * Notes: The chunk dimensions are used to create a dataspace, instead * of passing in the dataset's dataspace, since the chunk @@ -859,8 +864,8 @@ H5Z_set_local(hid_t dcpl_id, hid_t type_id) FUNC_ENTER_NOAPI(FAIL) /* Make "set local" callbacks for filters in pipeline */ - if(H5Z_prepare_prelude_callback_dcpl(dcpl_id, type_id, H5Z_PRELUDE_SET_LOCAL) < 0) - HGOTO_ERROR(H5E_PLINE, H5E_SETLOCAL, FAIL, "local filter parameters not set") + if (H5Z_prepare_prelude_callback_dcpl(dcpl_id, type_id, H5Z_PRELUDE_SET_LOCAL) < 0) + HGOTO_ERROR (H5E_PLINE, H5E_SETLOCAL, FAIL, "local filter parameters not set") done: FUNC_LEAVE_NOAPI(ret_value) @@ -874,7 +879,8 @@ done: * applied to an opaque byte stream (currently only a group). * The pipeline is assumed to have at least one filter. * - * Return: Non-negative on success/Negative on failure + * Return: Non-negative on success + * Negative on failure *------------------------------------------------------------------------- */ herr_t @@ -884,11 +890,11 @@ H5Z_can_apply_direct(const H5O_pline_t *pline) FUNC_ENTER_NOAPI(FAIL) - HDassert(pline->nused > 0); + HDassert (pline->nused > 0); /* Make "can apply" callbacks for filters in pipeline */ - if(H5Z_prelude_callback(pline, (hid_t)-1, (hid_t)-1, (hid_t)-1, H5Z_PRELUDE_CAN_APPLY) < 0) - HGOTO_ERROR(H5E_PLINE, H5E_CANAPPLY, FAIL, "unable to apply filter") + if (H5Z_prelude_callback(pline, (hid_t)-1, (hid_t)-1, (hid_t)-1, H5Z_PRELUDE_CAN_APPLY) < 0) + HGOTO_ERROR (H5E_PLINE, H5E_CANAPPLY, FAIL, "unable to apply filter") done: FUNC_LEAVE_NOAPI(ret_value) @@ -902,7 +908,8 @@ done: * new opaque object. The pipeline is assumed to have at * least one filter. * - * Return: Non-negative on success/Negative on failure + * Return: Non-negative on success + * Negative on failure * * Notes: This callback will almost certainly not do anything * useful, other than to make certain that the filter will @@ -916,11 +923,11 @@ H5Z_set_local_direct(const H5O_pline_t *pline) FUNC_ENTER_NOAPI(FAIL) - HDassert(pline->nused > 0); + HDassert (pline->nused > 0); /* Make "set local" callbacks for filters in pipeline */ - if(H5Z_prelude_callback(pline, (hid_t)-1, (hid_t)-1, (hid_t)-1, H5Z_PRELUDE_SET_LOCAL) < 0) - HGOTO_ERROR(H5E_PLINE, H5E_SETLOCAL, FAIL, "local filter parameters not set") + if (H5Z_prelude_callback(pline, (hid_t)-1, (hid_t)-1, (hid_t)-1, H5Z_PRELUDE_SET_LOCAL) < 0) + HGOTO_ERROR (H5E_PLINE, H5E_SETLOCAL, FAIL, "local filter parameters not set") done: FUNC_LEAVE_NOAPI(ret_value) @@ -930,58 +937,59 @@ done: /*------------------------------------------------------------------------- * Function: H5Z_modify * - * Purpose: Modify filter parameters for specified pipeline. + * Purpose: Modify filter parameters for specified pipeline. * - * Return: Non-negative on success/Negative on failure + * Return: Non-negative on success + * Negative on failure *------------------------------------------------------------------------- */ herr_t H5Z_modify(const H5O_pline_t *pline, H5Z_filter_t filter, unsigned flags, size_t cd_nelmts, const unsigned int cd_values[/*cd_nelmts*/]) { - size_t idx; /* Index of filter in pipeline */ - herr_t ret_value = SUCCEED; /* Return value */ + size_t idx; /* Index of filter in pipeline */ + herr_t ret_value = SUCCEED; /* Return value */ FUNC_ENTER_NOAPI(FAIL) - HDassert(pline); - HDassert(filter >= 0 && filter <= H5Z_FILTER_MAX); - HDassert(0 == (flags & ~((unsigned)H5Z_FLAG_DEFMASK))); - HDassert(0 == cd_nelmts || cd_values); + HDassert (pline); + HDassert (filter >= 0 && filter <= H5Z_FILTER_MAX); + HDassert (0 == (flags & ~((unsigned)H5Z_FLAG_DEFMASK))); + HDassert (0 == cd_nelmts || cd_values); /* Locate the filter in the pipeline */ - for(idx = 0; idx < pline->nused; idx++) - if(pline->filter[idx].id == filter) + for (idx = 0; idx < pline->nused; idx++) + if (pline->filter[idx].id == filter) break; /* Check if the filter was not already in the pipeline */ - if(idx > pline->nused) - HGOTO_ERROR(H5E_PLINE, H5E_NOTFOUND, FAIL, "filter not in pipeline") + if (idx > pline->nused) + HGOTO_ERROR (H5E_PLINE, H5E_NOTFOUND, FAIL, "filter not in pipeline") /* Change parameters for filter */ pline->filter[idx].flags = flags; pline->filter[idx].cd_nelmts = cd_nelmts; /* Free any existing parameters */ - if(pline->filter[idx].cd_values != NULL && pline->filter[idx].cd_values != pline->filter[idx]._cd_values) + if (pline->filter[idx].cd_values != NULL && pline->filter[idx].cd_values != pline->filter[idx]._cd_values) H5MM_xfree(pline->filter[idx].cd_values); /* Set parameters */ - if(cd_nelmts > 0) { - size_t i; /* Local index variable */ + if (cd_nelmts > 0) { + size_t i; /* Local index variable */ /* Allocate memory or point at internal buffer */ - if(cd_nelmts > H5Z_COMMON_CD_VALUES) { + if (cd_nelmts > H5Z_COMMON_CD_VALUES) { pline->filter[idx].cd_values = (unsigned *)H5MM_malloc(cd_nelmts * sizeof(unsigned)); - if(NULL == pline->filter[idx].cd_values) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed for filter parameters") + if (NULL == pline->filter[idx].cd_values) + HGOTO_ERROR (H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed for filter parameters") } /* end if */ else pline->filter[idx].cd_values = pline->filter[idx]._cd_values; /* Copy client data values */ - for(i = 0; i < cd_nelmts; i++) - pline->filter[idx].cd_values[i] = cd_values[i]; + for (i = 0; i < cd_nelmts; i++) + pline->filter[idx].cd_values[i] = cd_values[i]; } /* end if */ else pline->filter[idx].cd_values = NULL; @@ -996,36 +1004,37 @@ done: * * Purpose: Append another filter to the specified pipeline. * - * Return: Non-negative on success/Negative on failure + * Return: Non-negative on success + * Negative on failure *------------------------------------------------------------------------- */ herr_t H5Z_append(H5O_pline_t *pline, H5Z_filter_t filter, unsigned flags, size_t cd_nelmts, const unsigned int cd_values[/*cd_nelmts*/]) { - size_t idx; - herr_t ret_value = SUCCEED; /* Return value */ + size_t idx; + herr_t ret_value = SUCCEED; /* Return value */ FUNC_ENTER_NOAPI(FAIL) - HDassert(pline); - HDassert(filter >= 0 && filter <= H5Z_FILTER_MAX); - HDassert(0 == (flags & ~((unsigned)H5Z_FLAG_DEFMASK))); - HDassert(0 == cd_nelmts || cd_values); + HDassert (pline); + HDassert (filter >= 0 && filter <= H5Z_FILTER_MAX); + HDassert (0 == (flags & ~((unsigned)H5Z_FLAG_DEFMASK))); + HDassert (0 == cd_nelmts || cd_values); /* * Check filter limit. We do it here for early warnings although we may * decide to relax this restriction in the future. */ - if(pline->nused >= H5Z_MAX_NFILTERS) - HGOTO_ERROR(H5E_PLINE, H5E_CANTINIT, FAIL, "too many filters in pipeline") + if (pline->nused >= H5Z_MAX_NFILTERS) + HGOTO_ERROR (H5E_PLINE, H5E_CANTINIT, FAIL, "too many filters in pipeline") /* Check for freshly allocated filter pipeline */ - if(pline->version == 0) + if (pline->version == 0) pline->version = H5O_PLINE_VERSION_1; /* Allocate additional space in the pipeline if it's full */ - if(pline->nused >= pline->nalloc) { + if (pline->nused >= pline->nalloc) { H5O_pline_t x; size_t n; @@ -1036,14 +1045,14 @@ H5Z_append(H5O_pline_t *pline, H5Z_filter_t filter, unsigned flags, * filter struct is reallocated. Set these pointers to ~NULL * so that we can reset them after reallocating the filters array. */ - for(n = 0; n < pline->nalloc; ++n) - if(pline->filter[n].cd_values == pline->filter[n]._cd_values) + for (n = 0; n < pline->nalloc; ++n) + if (pline->filter[n].cd_values == pline->filter[n]._cd_values) pline->filter[n].cd_values = (unsigned *)((void *) ~((size_t)NULL)); x.nalloc = MAX(H5Z_MAX_NFILTERS, 2 * pline->nalloc); x.filter = (H5Z_filter_info_t *)H5MM_realloc(pline->filter, x.nalloc * sizeof(x.filter[0])); - if(NULL == x.filter) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed for filter pipeline") + if (NULL == x.filter) + HGOTO_ERROR (H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed for filter pipeline") /* Fix pointers in previous filters that need to point to their own * internal data. @@ -1061,22 +1070,22 @@ H5Z_append(H5O_pline_t *pline, H5Z_filter_t filter, unsigned flags, idx = pline->nused; pline->filter[idx].id = filter; pline->filter[idx].flags = flags; - pline->filter[idx].name = NULL; /* we'll pick it up later*/ + pline->filter[idx].name = NULL; /*we'll pick it up later*/ pline->filter[idx].cd_nelmts = cd_nelmts; - if(cd_nelmts > 0) { - size_t i; /* Local index variable */ + if (cd_nelmts > 0) { + size_t i; /* Local index variable */ /* Allocate memory or point at internal buffer */ - if(cd_nelmts > H5Z_COMMON_CD_VALUES) { + if (cd_nelmts > H5Z_COMMON_CD_VALUES) { pline->filter[idx].cd_values = (unsigned *)H5MM_malloc(cd_nelmts * sizeof(unsigned)); - if(NULL == pline->filter[idx].cd_values) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed for filter") + if (NULL == pline->filter[idx].cd_values) + HGOTO_ERROR (H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed for filter") } /* end if */ else pline->filter[idx].cd_values = pline->filter[idx]._cd_values; /* Copy client data values */ - for(i = 0; i < cd_nelmts; i++) + for (i = 0; i < cd_nelmts; i++) pline->filter[idx].cd_values[i] = cd_values[i]; } /* end if */ else @@ -1095,8 +1104,8 @@ done: * Purpose: Given a filter ID return the offset in the global array * that holds all the registered filters. * - * Return: Success: Non-negative index of entry in global filter table. - * Failure: Negative + * Return: Success: Non-negative index of entry in global filter table. + * Failure: Negative *------------------------------------------------------------------------- */ static int @@ -1107,9 +1116,9 @@ H5Z_find_idx(H5Z_filter_t id) FUNC_ENTER_NOAPI_NOINIT_NOERR - for (i=0; ifilter[].flags). The filters are processed in - * definition order unless the H5Z_FLAG_REVERSE is set. The - * FILTER_MASK is a bit-mask to indicate which filters to skip - * and on exit will indicate which filters failed. Each - * filter has an index number in the pipeline and that index - * number is the filter's bit in the FILTER_MASK. NBYTES is the - * number of bytes of data to filter and on exit should be the - * number of resulting bytes while BUF_SIZE holds the total - * allocated size of the buffer, which is pointed to BUF. - * - * If the buffer must grow during processing of the pipeline - * then the pipeline function should free the original buffer - * and return a fresh buffer, adjusting BUF_SIZE accordingly. - * - * Return: Non-negative on success/Negative on failure + * Purpose: Process data through the filter pipeline. The FLAGS argument + * is the filter invocation flags (definition flags come from + * the PLINE->filter[].flags). The filters are processed in + * definition order unless the H5Z_FLAG_REVERSE is set. The + * FILTER_MASK is a bit-mask to indicate which filters to skip + * and on exit will indicate which filters failed. Each + * filter has an index number in the pipeline and that index + * number is the filter's bit in the FILTER_MASK. NBYTES is the + * number of bytes of data to filter and on exit should be the + * number of resulting bytes while BUF_SIZE holds the total + * allocated size of the buffer, which is pointed to BUF. + * + * If the buffer must grow during processing of the pipeline + * then the pipeline function should free the original buffer + * and return a fresh buffer, adjusting BUF_SIZE accordingly. + * + * Return: Non-negative on success + * Negative on failure *------------------------------------------------------------------------- */ herr_t @@ -1174,51 +1184,51 @@ H5Z_pipeline(const H5O_pline_t *pline, unsigned flags, H5Z_cb_t cb_struct, size_t *nbytes/*in,out*/, size_t *buf_size/*in,out*/, void **buf/*in,out*/) { - size_t i, idx, new_nbytes; - int fclass_idx; /* Index of filter class in global table */ - H5Z_class2_t *fclass = NULL; /* Filter class pointer */ + size_t i, idx, new_nbytes; + int fclass_idx; /* Index of filter class in global table */ + H5Z_class2_t *fclass=NULL; /* Filter class pointer */ #ifdef H5Z_DEBUG - H5Z_stats_t *fstats = NULL; /* Filter stats pointer */ + H5Z_stats_t *fstats=NULL; /* Filter stats pointer */ H5_timer_t timer; #endif - unsigned failed = 0; - unsigned tmp_flags; - herr_t ret_value = SUCCEED; /* Return value */ + unsigned failed = 0; + unsigned tmp_flags; + herr_t ret_value = SUCCEED; /* Return value */ FUNC_ENTER_NOAPI(FAIL) - HDassert(0 == (flags & ~((unsigned)H5Z_FLAG_INVMASK))); - HDassert(filter_mask); - HDassert(nbytes && *nbytes > 0); - HDassert(buf_size && *buf_size > 0); - HDassert(buf && *buf); - HDassert(!pline || pline->nused < H5Z_MAX_NFILTERS); + HDassert (0 == (flags & ~((unsigned)H5Z_FLAG_INVMASK))); + HDassert (filter_mask); + HDassert (nbytes && *nbytes>0); + HDassert (buf_size && *buf_size>0); + HDassert (buf && *buf); + HDassert (!pline || pline->nusednused; i > 0; --i) { - idx = i - 1; + idx = i-1; if (*filter_mask & ((unsigned)1 << idx)) { failed |= (unsigned)1 << idx; - continue;/*filter excluded*/ + continue; /* filter excluded */ } /* If the filter isn't registered and the application doesn't - * indicate no plugin through HDF5_PRELOAD_PLUG (using the symbol "::"), - * try to load it dynamically and register it. Otherwise, return failure - */ - if((fclass_idx = H5Z_find_idx(pline->filter[idx].id)) < 0) { + * indicate no plugin through HDF5_PRELOAD_PLUG (using the symbol "::"), + * try to load it dynamically and register it. Otherwise, return failure + */ + if ((fclass_idx = H5Z_find_idx(pline->filter[idx].id)) < 0) { hbool_t issue_error = FALSE; - const H5Z_class2_t *filter_info; + H5Z_class2_t *filter_info; /* Try loading the filter */ - if(NULL != (filter_info = (const H5Z_class2_t *)H5PL_load(H5PL_TYPE_FILTER, (int)(pline->filter[idx].id)))) { + if (NULL != (filter_info = (const H5Z_class2_t *)H5PL_load(H5PL_TYPE_FILTER, (int)(pline->filter[idx].id)))) { /* Register the filter we loaded */ - if(H5Z_register(filter_info) < 0) - HGOTO_ERROR(H5E_PLINE, H5E_CANTINIT, FAIL, "unable to register filter") + if (H5Z_register(filter_info < 0) + HGOTO_ERROR (H5E_PLINE, H5E_CANTINIT, FAIL, "unable to register filter") /* Search in the table of registered filters again to find the dynamic filter just loaded and registered */ - if((fclass_idx = H5Z_find_idx(pline->filter[idx].id)) < 0) + if ((fclass_idx = H5Z_find_idx(pline->filter[idx].id)) < 0) issue_error = TRUE; } /* end if */ else @@ -1227,8 +1237,8 @@ H5Z_pipeline(const H5O_pline_t *pline, unsigned flags, /* Check for error */ if(issue_error) { /* Print out the filter name to give more info. But the name is optional for - * the filter */ - if(pline->filter[idx].name) + * the filter */ + if (pline->filter[idx].name) HGOTO_ERROR(H5E_PLINE, H5E_READERROR, FAIL, "required filter '%s' is not registered", pline->filter[idx].name) else HGOTO_ERROR(H5E_PLINE, H5E_READERROR, FAIL, "required filter (name unavailable) is not registered") @@ -1238,26 +1248,26 @@ H5Z_pipeline(const H5O_pline_t *pline, unsigned flags, fclass = &H5Z_table_g[fclass_idx]; #ifdef H5Z_DEBUG fstats = &H5Z_stat_table_g[fclass_idx]; - H5_timer_begin(&timer); + H5_timer_begin (&timer); #endif - tmp_flags = flags|(pline->filter[idx].flags); + tmp_flags = flags | (pline->filter[idx].flags); tmp_flags |= (edc_read== H5Z_DISABLE_EDC) ? H5Z_FLAG_SKIP_EDC : 0; new_nbytes = (fclass->filter)(tmp_flags, pline->filter[idx].cd_nelmts, - pline->filter[idx].cd_values, *nbytes, buf_size, buf); + pline->filter[idx].cd_values, *nbytes, buf_size, buf); #ifdef H5Z_DEBUG - H5_timer_end(&(fstats->stats[1].timer), &timer); + H5_timer_end (&(fstats->stats[1].timer), &timer); fstats->stats[1].total += MAX(*nbytes, new_nbytes); if (0 == new_nbytes) fstats->stats[1].errors += *nbytes; #endif - if(0==new_nbytes) { - if((cb_struct.func && (H5Z_CB_FAIL == cb_struct.func(pline->filter[idx].id, *buf, *buf_size, cb_struct.op_data))) || !cb_struct.func) - HGOTO_ERROR(H5E_PLINE, H5E_READERROR, FAIL, "filter returned failure during read") + if (0 == new_nbytes) { + if ((cb_struct.func && (H5Z_CB_FAIL == cb_struct.func (pline->filter[idx].id, *buf, *buf_size, cb_struct.op_data))) || !cb_struct.func) + HGOTO_ERROR (H5E_PLINE, H5E_READERROR, FAIL, "filter returned failure during read") *nbytes = *buf_size; failed |= (unsigned)1 << idx; - H5E_clear_stack(NULL); + H5E_clear_stack (NULL); } else { *nbytes = new_nbytes; @@ -1276,35 +1286,34 @@ H5Z_pipeline(const H5O_pline_t *pline, unsigned flags, HGOTO_ERROR(H5E_PLINE, H5E_WRITEERROR, FAIL, "required filter is not registered") failed |= (unsigned)1 << idx; - H5E_clear_stack(NULL); + H5E_clear_stack (NULL); continue; /*filter excluded*/ } fclass = &H5Z_table_g[fclass_idx]; #ifdef H5Z_DEBUG fstats = &H5Z_stat_table_g[fclass_idx]; - H5_timer_begin(&timer); + H5_timer_begin (&timer); #endif - new_nbytes = (fclass->filter)(flags|(pline->filter[idx].flags), pline->filter[idx].cd_nelmts, - pline->filter[idx].cd_values, *nbytes, buf_size, buf); + new_nbytes = (fclass->filter)(flags | (pline->filter[idx].flags), pline->filter[idx].cd_nelmts, + pline->filter[idx].cd_values, *nbytes, buf_size, buf); #ifdef H5Z_DEBUG - H5_timer_end(&(fstats->stats[0].timer), &timer); + H5_timer_end (&(fstats->stats[0].timer), &timer); fstats->stats[0].total += MAX(*nbytes, new_nbytes); if (0 == new_nbytes) fstats->stats[0].errors += *nbytes; #endif - if(0 == new_nbytes) { + if (0 == new_nbytes) { if (0 == (pline->filter[idx].flags & H5Z_FLAG_OPTIONAL)) { - if((cb_struct.func && (H5Z_CB_FAIL == cb_struct.func(pline->filter[idx].id, *buf, *nbytes, cb_struct.op_data))) || !cb_struct.func) - HGOTO_ERROR(H5E_PLINE, H5E_WRITEERROR, FAIL, "filter returned failure") + if ((cb_struct.func && (H5Z_CB_FAIL == cb_struct.func (pline->filter[idx].id, *buf, *nbytes, cb_struct.op_data))) || !cb_struct.func) + HGOTO_ERROR (H5E_PLINE, H5E_WRITEERROR, FAIL, "filter returned failure") *nbytes = *buf_size; } failed |= (unsigned)1 << idx; - H5E_clear_stack(NULL); + H5E_clear_stack (NULL); } - else { + else *nbytes = new_nbytes; - } } } @@ -1320,7 +1329,8 @@ done: * * Purpose: Get pointer to filter info for pipeline * - * Return: Non-negative on success/Negative on failure + * Return: Non-negative on success + * Negative on failure *------------------------------------------------------------------------- */ H5Z_filter_info_t * @@ -1331,17 +1341,17 @@ H5Z_filter_info(const H5O_pline_t *pline, H5Z_filter_t filter) FUNC_ENTER_NOAPI(NULL) - HDassert(pline); - HDassert(filter >= 0 && filter <= H5Z_FILTER_MAX); + HDassert (pline); + HDassert (filter >= 0 && filter <= H5Z_FILTER_MAX); /* Locate the filter in the pipeline */ - for(idx = 0; idx < pline->nused; idx++) - if(pline->filter[idx].id == filter) + for (idx = 0; idx < pline->nused; idx++) + if (pline->filter[idx].id == filter) break; /* Check if the filter was not already in the pipeline */ - if(idx >= pline->nused) - HGOTO_ERROR(H5E_PLINE, H5E_NOTFOUND, NULL, "filter not in pipeline") + if (idx >= pline->nused) + HGOTO_ERROR (H5E_PLINE, H5E_NOTFOUND, NULL, "filter not in pipeline") /* Set return value */ ret_value = &pline->filter[idx]; @@ -1365,21 +1375,21 @@ done: htri_t H5Z_filter_in_pline(const H5O_pline_t *pline, H5Z_filter_t filter) { - size_t idx; /* Index of filter in pipeline */ - htri_t ret_value = TRUE; /* Return value */ + size_t idx; /* Index of filter in pipeline */ + htri_t ret_value = TRUE; /* Return value */ FUNC_ENTER_NOAPI(FAIL) - HDassert(pline); - HDassert(filter >= 0 && filter <= H5Z_FILTER_MAX); + HDassert (pline); + HDassert (filter >= 0 && filter <= H5Z_FILTER_MAX); /* Locate the filter in the pipeline */ - for(idx = 0; idx < pline->nused; idx++) - if(pline->filter[idx].id == filter) + for (idx = 0; idx < pline->nused; idx++) + if (pline->filter[idx].id == filter) break; /* Check if the filter was not already in the pipeline */ - if(idx >= pline->nused) + if (idx >= pline->nused) ret_value = FALSE; done: @@ -1394,30 +1404,31 @@ done: * Purpose: Verify that all the filters in a pipeline are currently * available (i.e. registered) * - * Return: Non-negative (TRUE/FALSE) on success/Negative on failure + * Return: Non-negative (TRUE/FALSE) on success + * Negative on failure *------------------------------------------------------------------------- */ htri_t H5Z_all_filters_avail(const H5O_pline_t *pline) { - size_t i,j; /* Local index variable */ - htri_t ret_value=TRUE; /* Return value */ + size_t i, j; /* Local index variable */ + htri_t ret_value = TRUE; /* Return value */ FUNC_ENTER_NOAPI(FAIL) /* Check args */ - HDassert(pline); + HDassert (pline); /* Iterate through all the filters in pipeline */ - for(i = 0; i < pline->nused; i++) { + for (i = 0; i < pline->nused; i++) { /* Look for each filter in the list of registered filters */ - for(j = 0; j < H5Z_table_used_g; j++) - if(H5Z_table_g[j].id == pline->filter[i].id) + for (j = 0; j < H5Z_table_used_g; j++) + if (H5Z_table_g[j].id == pline->filter[i].id) break; /* Check if we didn't find the filter */ - if(j == H5Z_table_used_g) - HGOTO_DONE(FALSE) + if (j == H5Z_table_used_g) + HGOTO_DONE (FALSE) } /* end for */ done: @@ -1432,7 +1443,8 @@ done: * Purpose: Delete filter FILTER from pipeline PLINE; * deletes all filters if FILTER is H5Z_FILTER_NONE * - * Return: Non-negative on success/Negative on failure + * Return: Non-negative on success + * Negative on failure *------------------------------------------------------------------------- */ herr_t @@ -1443,52 +1455,52 @@ H5Z_delete(H5O_pline_t *pline, H5Z_filter_t filter) FUNC_ENTER_NOAPI(FAIL) /* Check args */ - HDassert(pline); - HDassert(filter >= 0 && filter <= H5Z_FILTER_MAX); + HDassert (pline); + HDassert (filter >= 0 && filter <= H5Z_FILTER_MAX); /* if the pipeline has no filters, just return */ - if(pline->nused == 0) - HGOTO_DONE(SUCCEED) + if (pline->nused == 0) + HGOTO_DONE (SUCCEED) /* Delete all filters */ - if(H5Z_FILTER_ALL == filter) { - if(H5O_msg_reset(H5O_PLINE_ID, pline) < 0) + if (H5Z_FILTER_ALL == filter) { + if (H5O_msg_reset(H5O_PLINE_ID, pline) < 0) HGOTO_ERROR(H5E_PLINE, H5E_CANTFREE, FAIL, "can't release pipeline info") } /* end if */ /* Delete filter */ else { - size_t idx; /* Index of filter in pipeline */ - hbool_t found = FALSE; /* Indicate filter was found in pipeline */ + size_t idx; /* Index of filter in pipeline */ + hbool_t found = FALSE; /* Indicate filter was found in pipeline */ /* Locate the filter in the pipeline */ - for(idx = 0; idx < pline->nused; idx++) - if(pline->filter[idx].id == filter) { + for (idx = 0; idx < pline->nused; idx++) + if (pline->filter[idx].id == filter) { found = TRUE; break; } /* end if */ /* filter was not found in the pipeline */ - if(!found) - HGOTO_ERROR(H5E_PLINE, H5E_NOTFOUND, FAIL, "filter not in pipeline") + if (!found) + HGOTO_ERROR (H5E_PLINE, H5E_NOTFOUND, FAIL, "filter not in pipeline") /* Free information for deleted filter */ - if(pline->filter[idx].name && pline->filter[idx].name != pline->filter[idx]._name) - HDassert((HDstrlen(pline->filter[idx].name) + 1) > H5Z_COMMON_NAME_LEN); - if(pline->filter[idx].name != pline->filter[idx]._name) + if (pline->filter[idx].name && pline->filter[idx].name != pline->filter[idx]._name) + HDassert ((HDstrlen(pline->filter[idx].name) + 1) > H5Z_COMMON_NAME_LEN); + if (pline->filter[idx].name != pline->filter[idx]._name) pline->filter[idx].name = (char *)H5MM_xfree(pline->filter[idx].name); - if(pline->filter[idx].cd_values && pline->filter[idx].cd_values != pline->filter[idx]._cd_values) - HDassert(pline->filter[idx].cd_nelmts > H5Z_COMMON_CD_VALUES); - if(pline->filter[idx].cd_values != pline->filter[idx]._cd_values) + if (pline->filter[idx].cd_values && pline->filter[idx].cd_values != pline->filter[idx]._cd_values) + HDassert (pline->filter[idx].cd_nelmts > H5Z_COMMON_CD_VALUES); + if (pline->filter[idx].cd_values != pline->filter[idx]._cd_values) pline->filter[idx].cd_values = (unsigned *)H5MM_xfree(pline->filter[idx].cd_values); /* Remove filter from pipeline array */ - if((idx + 1) < pline->nused) { + if ((idx + 1) < pline->nused) { /* Copy filters down & fix up any client data value arrays using internal storage */ - for(; (idx + 1) < pline->nused; idx++) { + for (; (idx + 1) < pline->nused; idx++) { pline->filter[idx] = pline->filter[idx + 1]; - if(pline->filter[idx].name && (HDstrlen(pline->filter[idx].name) + 1) <= H5Z_COMMON_NAME_LEN) + if (pline->filter[idx].name && (HDstrlen(pline->filter[idx].name) + 1) <= H5Z_COMMON_NAME_LEN) pline->filter[idx].name = pline->filter[idx]._name; - if(pline->filter[idx].cd_nelmts <= H5Z_COMMON_CD_VALUES) + if (pline->filter[idx].cd_nelmts <= H5Z_COMMON_CD_VALUES) pline->filter[idx].cd_values = pline->filter[idx]._cd_values; } /* end for */ } /* end if */ @@ -1497,7 +1509,7 @@ H5Z_delete(H5O_pline_t *pline, H5Z_filter_t filter) pline->nused--; /* Reset information for previous last filter in pipeline */ - HDmemset(&pline->filter[pline->nused], 0, sizeof(H5Z_filter_info_t)); + HDmemset (&pline->filter[pline->nused], 0, sizeof(H5Z_filter_info_t)); } /* end else */ done: @@ -1510,6 +1522,9 @@ done: * * Purpose: Gets information about a pipeline data filter and stores it * in filter_config_flags. + * + * Return: zero on success + * negative on failure *------------------------------------------------------------------------- */ herr_t @@ -1521,8 +1536,8 @@ H5Zget_filter_info(H5Z_filter_t filter, unsigned int *filter_config_flags) H5TRACE2("e", "Zf*Iu", filter, filter_config_flags); /* Get the filter info */ - if(H5Z_get_filter_info(filter, filter_config_flags) < 0) - HGOTO_ERROR(H5E_PLINE, H5E_CANTGET, FAIL, "Filter info not retrieved") + if (H5Z_get_filter_info(filter, filter_config_flags) < 0) + HGOTO_ERROR (H5E_PLINE, H5E_CANTGET, FAIL, "Filter info not retrieved") done: FUNC_LEAVE_API(ret_value) @@ -1534,6 +1549,9 @@ done: * * Purpose: Gets information about a pipeline data filter and stores it * in filter_config_flags. + * + * Return: zero on success + * negative on failure *------------------------------------------------------------------------- */ herr_t @@ -1545,16 +1563,16 @@ H5Z_get_filter_info(H5Z_filter_t filter, unsigned int *filter_config_flags) FUNC_ENTER_NOAPI(FAIL) /* Look up the filter class info */ - if(NULL == (fclass = H5Z_find(filter))) - HGOTO_ERROR(H5E_PLINE, H5E_BADVALUE, FAIL, "Filter not defined") + if (NULL == (fclass = H5Z_find(filter))) + HGOTO_ERROR (H5E_PLINE, H5E_BADVALUE, FAIL, "Filter not defined") /* Set the filter config flags for the application */ - if(filter_config_flags != NULL) { + if (filter_config_flags != NULL) { *filter_config_flags = 0; - if(fclass->encoder_present) + if (fclass->encoder_present) *filter_config_flags |= H5Z_FILTER_CONFIG_ENCODE_ENABLED; - if(fclass->decoder_present) + if (fclass->decoder_present) *filter_config_flags |= H5Z_FILTER_CONFIG_DECODE_ENABLED; } /* end if */ -- cgit v0.12 From be4641777f07900d3bed28ff6824f61a4b29b813 Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Fri, 17 Nov 2017 14:21:26 -0600 Subject: HDFFV-10328 fix typos --- src/H5Z.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/H5Z.c b/src/H5Z.c index 1f1a905..a9f7336 100644 --- a/src/H5Z.c +++ b/src/H5Z.c @@ -1219,12 +1219,12 @@ H5Z_pipeline(const H5O_pline_t *pline, unsigned flags, */ if ((fclass_idx = H5Z_find_idx(pline->filter[idx].id)) < 0) { hbool_t issue_error = FALSE; - H5Z_class2_t *filter_info; + const H5Z_class2_t *filter_info; /* Try loading the filter */ if (NULL != (filter_info = (const H5Z_class2_t *)H5PL_load(H5PL_TYPE_FILTER, (int)(pline->filter[idx].id)))) { /* Register the filter we loaded */ - if (H5Z_register(filter_info < 0) + if (H5Z_register(filter_info) < 0) HGOTO_ERROR (H5E_PLINE, H5E_CANTINIT, FAIL, "unable to register filter") /* Search in the table of registered filters again to find the dynamic filter just loaded and registered */ @@ -1235,7 +1235,7 @@ H5Z_pipeline(const H5O_pline_t *pline, unsigned flags, issue_error = TRUE; /* Check for error */ - if(issue_error) { + if (issue_error) { /* Print out the filter name to give more info. But the name is optional for * the filter */ if (pline->filter[idx].name) @@ -1269,9 +1269,8 @@ H5Z_pipeline(const H5O_pline_t *pline, unsigned flags, failed |= (unsigned)1 << idx; H5E_clear_stack (NULL); } - else { + else *nbytes = new_nbytes; - } } } else if (pline) { /* Write */ -- cgit v0.12 From 2e3f1b1600b47ac9b89fa41ec7e2a98a78c8a6b7 Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Fri, 17 Nov 2017 14:43:12 -0600 Subject: replace deleted note --- release_docs/RELEASE.txt | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/release_docs/RELEASE.txt b/release_docs/RELEASE.txt index 3a841a6..89d77fd 100644 --- a/release_docs/RELEASE.txt +++ b/release_docs/RELEASE.txt @@ -242,6 +242,14 @@ Bug Fixes since HDF5-1.10.1 release (such as szip or zlib) to be available. (ADB - 2017/11/16, HDFFV-10328) + - Fix rare object header corruption bug + + In certain cases, such as when converting large attributes to dense + storage, an error could occur which would either fail an assertion or + cause file corruption. Fixed and added test. + + (NAF - 2017/11/14, HDFFV-10274) + - H5Zfilter_avail in H5Z.c The public function checked for plugins, while the private -- cgit v0.12 From 9dd1abc0d8d88a919f67e7b13d120feb458437f0 Mon Sep 17 00:00:00 2001 From: hdftest Date: Mon, 20 Nov 2017 10:40:33 -0600 Subject: Snapshot version 1.10 release 2 (snap3) --- README.txt | 2 +- c++/src/cpp_doc_config | 2 +- config/cmake/scripts/HDF5config.cmake | 2 +- configure.ac | 2 +- release_docs/RELEASE.txt | 2 +- src/H5public.h | 4 ++-- 6 files changed, 7 insertions(+), 7 deletions(-) diff --git a/README.txt b/README.txt index 3415253..c78dc20 100644 --- a/README.txt +++ b/README.txt @@ -1,4 +1,4 @@ -HDF5 version 1.10.2-snap3 currently under development +HDF5 version 1.10.2-snap4 currently under development Please refer to the release_docs/INSTALL file for installation instructions. ------------------------------------------------------------------------------ diff --git a/c++/src/cpp_doc_config b/c++/src/cpp_doc_config index 20b1581..8aa987f 100644 --- a/c++/src/cpp_doc_config +++ b/c++/src/cpp_doc_config @@ -38,7 +38,7 @@ PROJECT_NAME = "HDF5 C++ API" # could be handy for archiving the generated documentation or if some version # control system is used. -PROJECT_NUMBER = "1.10.2-snap3, currently under development" +PROJECT_NUMBER = "1.10.2-snap4, currently under development" # Using the PROJECT_BRIEF tag one can provide an optional one line description # for a project that appears at the top of each page and should give viewer a diff --git a/config/cmake/scripts/HDF5config.cmake b/config/cmake/scripts/HDF5config.cmake index 421d9d7..c8b9df7 100755 --- a/config/cmake/scripts/HDF5config.cmake +++ b/config/cmake/scripts/HDF5config.cmake @@ -39,7 +39,7 @@ cmake_minimum_required (VERSION 3.2.2 FATAL_ERROR) ############################################################################## set (CTEST_SOURCE_VERSION "1.10.2") -set (CTEST_SOURCE_VERSEXT "-snap3") +set (CTEST_SOURCE_VERSEXT "-snap4") ############################################################################## # handle input parameters to script. diff --git a/configure.ac b/configure.ac index 1f1fe02..0c0e125 100644 --- a/configure.ac +++ b/configure.ac @@ -24,7 +24,7 @@ AC_PREREQ([2.69]) ## NOTE: Do not forget to change the version number here when we do a ## release!!! ## -AC_INIT([HDF5], [1.10.2-snap3], [help@hdfgroup.org]) +AC_INIT([HDF5], [1.10.2-snap4], [help@hdfgroup.org]) AC_CONFIG_SRCDIR([src/H5.c]) AC_CONFIG_HEADERS([src/H5config.h]) diff --git a/release_docs/RELEASE.txt b/release_docs/RELEASE.txt index 89d77fd..50c422c 100644 --- a/release_docs/RELEASE.txt +++ b/release_docs/RELEASE.txt @@ -1,4 +1,4 @@ -HDF5 version 1.10.2-snap3 currently under development +HDF5 version 1.10.2-snap4 currently under development ================================================================================ diff --git a/src/H5public.h b/src/H5public.h index c03ce5b..518329f 100644 --- a/src/H5public.h +++ b/src/H5public.h @@ -93,9 +93,9 @@ extern "C" { #define H5_VERS_MAJOR 1 /* For major interface/format changes */ #define H5_VERS_MINOR 10 /* For minor interface/format changes */ #define H5_VERS_RELEASE 2 /* For tweaks, bug-fixes, or development */ -#define H5_VERS_SUBRELEASE "snap3" /* For pre-releases like snap0 */ +#define H5_VERS_SUBRELEASE "snap4" /* For pre-releases like snap0 */ /* Empty string for real releases. */ -#define H5_VERS_INFO "HDF5 library version: 1.10.2-snap3" /* Full version string */ +#define H5_VERS_INFO "HDF5 library version: 1.10.2-snap4" /* Full version string */ #define H5check() H5check_version(H5_VERS_MAJOR,H5_VERS_MINOR, \ H5_VERS_RELEASE) -- cgit v0.12 From b4b30418390e01eb94961dd9fc2e0edca6a58fe4 Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Mon, 27 Nov 2017 13:08:07 -0600 Subject: Update macro --- config/cmake_ext_mod/HDFMacros.cmake | 1 + 1 file changed, 1 insertion(+) diff --git a/config/cmake_ext_mod/HDFMacros.cmake b/config/cmake_ext_mod/HDFMacros.cmake index 602b6bf..192a5c8 100644 --- a/config/cmake_ext_mod/HDFMacros.cmake +++ b/config/cmake_ext_mod/HDFMacros.cmake @@ -108,6 +108,7 @@ macro (HDF_SET_LIB_OPTIONS libtarget libname libtype) set_target_properties (${libtarget} PROPERTIES + OUTPUT_NAME ${LIB_RELEASE_NAME} OUTPUT_NAME_DEBUG ${LIB_DEBUG_NAME} OUTPUT_NAME_RELEASE ${LIB_RELEASE_NAME} OUTPUT_NAME_MINSIZEREL ${LIB_RELEASE_NAME} -- cgit v0.12 From 3d84163ad37960ff1ecdd5782af88b442832fd99 Mon Sep 17 00:00:00 2001 From: Vailin Choi Date: Tue, 28 Nov 2017 11:11:27 -0600 Subject: Fix for HDFFV-9947 H5Sencode Modifications to fix H5Sencode bug when num points selected is > 2^32. --- src/H5Dmpio.c | 8 +- src/H5Ffake.c | 21 +++- src/H5Fint.c | 2 +- src/H5Fprivate.h | 9 +- src/H5Fquery.c | 47 ++++++-- src/H5Olayout.c | 14 ++- src/H5P.c | 25 ++++- src/H5Pdapl.c | 8 +- src/H5Pdcpl.c | 21 ++-- src/H5Pdxpl.c | 28 ++--- src/H5Pencdec.c | 28 +++-- src/H5Pfapl.c | 22 ++-- src/H5Pfcpl.c | 16 +-- src/H5Pgcpl.c | 8 +- src/H5Plapl.c | 17 +-- src/H5Pocpl.c | 4 +- src/H5Ppkg.h | 16 +-- src/H5Pprivate.h | 10 ++ src/H5Ppublic.h | 2 - src/H5Pstrcpl.c | 4 +- src/H5R.c | 12 +- src/H5S.c | 14 +-- src/H5Sall.c | 24 ++-- src/H5Shyper.c | 327 +++++++++++++++++++++++++++++++++++++++++-------------- src/H5Snone.c | 24 ++-- src/H5Spkg.h | 30 ++++- src/H5Spoint.c | 179 ++++++++++++++++++++++++++---- src/H5Sprivate.h | 14 +-- src/H5Sselect.c | 9 +- src/H5T.c | 4 +- test/th5s.c | 193 +++++++++++++++++++++++++++++++- test/trefer.c | 235 +++++++++++++++++++++++++++------------ test/vds.c | 2 +- 33 files changed, 1037 insertions(+), 340 deletions(-) diff --git a/src/H5Dmpio.c b/src/H5Dmpio.c index 79572c0..94d763d 100644 --- a/src/H5Dmpio.c +++ b/src/H5Dmpio.c @@ -2859,6 +2859,7 @@ H5D__chunk_redistribute_shared_chunks(const H5D_io_info_t *io_info, const H5D_ty int *send_displacements = NULL; int scatter_recvcount_int; int mpi_rank, mpi_size, mpi_code; + hid_t fapl_id = -1; /* File access property list for H5S_encode() */ herr_t ret_value = SUCCEED; FUNC_ENTER_STATIC @@ -2873,6 +2874,9 @@ H5D__chunk_redistribute_shared_chunks(const H5D_io_info_t *io_info, const H5D_ty if ((mpi_size = H5F_mpi_get_size(io_info->dset->oloc.file)) < 0) HGOTO_ERROR(H5E_IO, H5E_MPI, FAIL, "unable to obtain mpi size") + if((fapl_id = H5F_get_access_plist(io_info->dset->oloc.file, FALSE)) < 0) + HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't get fapl") + if (*local_chunk_array_num_entries) if (NULL == (send_requests = (MPI_Request *) H5MM_malloc(*local_chunk_array_num_entries * sizeof(MPI_Request)))) HGOTO_ERROR(H5E_DATASET, H5E_CANTALLOC, FAIL, "couldn't allocate send requests buffer") @@ -2978,7 +2982,7 @@ H5D__chunk_redistribute_shared_chunks(const H5D_io_info_t *io_info, const H5D_ty /* Determine size of serialized chunk file dataspace, plus the size of * the data being written */ - if (H5S_encode(chunk_info->fspace, &mod_data_p, &mod_data_size) < 0) + if (H5S_encode(chunk_info->fspace, &mod_data_p, &mod_data_size, fapl_id) < 0) HGOTO_ERROR(H5E_DATASET, H5E_CANTENCODE, FAIL, "unable to get encoded dataspace size") if ((iter_nelmts = H5S_GET_SELECT_NPOINTS(chunk_info->mspace)) < 0) @@ -2991,7 +2995,7 @@ H5D__chunk_redistribute_shared_chunks(const H5D_io_info_t *io_info, const H5D_ty /* Serialize the chunk's file dataspace into the buffer */ mod_data_p = mod_data[num_send_requests]; - if (H5S_encode(chunk_info->fspace, &mod_data_p, &mod_data_size) < 0) + if (H5S_encode(chunk_info->fspace, &mod_data_p, &mod_data_size, fapl_id) < 0) HGOTO_ERROR(H5E_DATASET, H5E_CANTENCODE, FAIL, "unable to encode dataspace") /* Intialize iterator for memory selection */ diff --git a/src/H5Ffake.c b/src/H5Ffake.c index 6072f2e..86c4a3d 100644 --- a/src/H5Ffake.c +++ b/src/H5Ffake.c @@ -15,9 +15,10 @@ /* Packages needed by this file... */ -#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 "H5Iprivate.h" /* IDs */ +#include "H5Fpkg.h" /* File access */ /* PRIVATE PROTOTYPES */ @@ -40,9 +41,11 @@ *------------------------------------------------------------------------- */ H5F_t * -H5F_fake_alloc(uint8_t sizeof_size) +H5F_fake_alloc(uint8_t sizeof_size, hid_t fapl_id) { H5F_t *f = NULL; /* Pointer to fake file struct */ + H5P_genplist_t *plist; /* Property list */ + hbool_t latest; H5F_t *ret_value = NULL; /* Return value */ FUNC_ENTER_NOAPI(NULL) @@ -59,6 +62,16 @@ H5F_fake_alloc(uint8_t sizeof_size) else f->shared->sizeof_size = sizeof_size; + /* Activate latest version support according to the setting in fapl_id */ + /* See H5F_new() in H5Fint.c */ + if(NULL == (plist = (H5P_genplist_t *)H5I_object(fapl_id))) + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "not file access property list") + + if(H5P_get(plist, H5F_ACS_LATEST_FORMAT_NAME, &latest) < 0) + HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, NULL, "can't get 'latest format' flag") + if(latest) + f->shared->latest_flags |= H5F_LATEST_ALL_FLAGS; + /* Set return value */ ret_value = f; diff --git a/src/H5Fint.c b/src/H5Fint.c index a48e41c..7b8fdf7 100644 --- a/src/H5Fint.c +++ b/src/H5Fint.c @@ -2669,7 +2669,7 @@ H5F_set_latest_flags(H5F_t *f, unsigned flags) /* Sanity check */ HDassert(f); HDassert(f->shared); - HDassert(0 == ((~flags) & H5F_LATEST_ALL_FLAGS)); + HDassert(0 == ((flags) & ~H5F_LATEST_ALL_FLAGS)); f->shared->latest_flags = flags; diff --git a/src/H5Fprivate.h b/src/H5Fprivate.h index eba48de..1656785 100644 --- a/src/H5Fprivate.h +++ b/src/H5Fprivate.h @@ -309,6 +309,7 @@ #define H5F_SIEVE_BUF_SIZE(F) ((F)->shared->sieve_buf_size) #define H5F_GC_REF(F) ((F)->shared->gc_ref) #define H5F_USE_LATEST_FLAGS(F,FL) ((F)->shared->latest_flags & (FL)) +#define H5F_GET_LATEST_FLAGS(F) ((F)->shared->latest_flags) #define H5F_STORE_MSG_CRT_IDX(F) ((F)->shared->store_msg_crt_idx) #define H5F_SET_STORE_MSG_CRT_IDX(F, FL) ((F)->shared->store_msg_crt_idx = (FL)) #define H5F_GRP_BTREE_SHARED(F) ((F)->shared->grp_btree_shared) @@ -365,7 +366,8 @@ #define H5F_RDCC_W0(F) (H5F_rdcc_w0(F)) #define H5F_SIEVE_BUF_SIZE(F) (H5F_sieve_buf_size(F)) #define H5F_GC_REF(F) (H5F_gc_ref(F)) -#define H5F_USE_LATEST_FLAGS(F,FL) (H5F_use_latest_flags(F,FL)) +#define H5F_USE_LATEST_FLAGS(F,FL) (H5F_use_latest_flags(F,FL)) +#define H5F_GET_LATEST_FLAGS(F) (H5F_get_latest_flags(F)) #define H5F_STORE_MSG_CRT_IDX(F) (H5F_store_msg_crt_idx(F)) #define H5F_SET_STORE_MSG_CRT_IDX(F, FL) (H5F_set_store_msg_crt_idx((F), (FL))) #define H5F_GRP_BTREE_SHARED(F) (H5F_grp_btree_shared(F)) @@ -639,7 +641,8 @@ #define H5F_LATEST_STYLE_GROUP 0x0080 #define H5F_LATEST_OBJ_HEADER 0x0100 #define H5F_LATEST_SUPERBLOCK 0x0200 -#define H5F_LATEST_ALL_FLAGS (H5F_LATEST_DATATYPE | H5F_LATEST_DATASPACE | H5F_LATEST_ATTRIBUTE | H5F_LATEST_FILL_MSG | H5F_LATEST_PLINE_MSG | H5F_LATEST_LAYOUT_MSG | H5F_LATEST_NO_MOD_TIME_MSG | H5F_LATEST_STYLE_GROUP | H5F_LATEST_OBJ_HEADER | H5F_LATEST_SUPERBLOCK) +#define H5F_LATEST_DATASPACE_SELECTION 0x0400 +#define H5F_LATEST_ALL_FLAGS (H5F_LATEST_DATATYPE | H5F_LATEST_DATASPACE | H5F_LATEST_ATTRIBUTE | H5F_LATEST_FILL_MSG | H5F_LATEST_PLINE_MSG | H5F_LATEST_LAYOUT_MSG | H5F_LATEST_NO_MOD_TIME_MSG | H5F_LATEST_STYLE_GROUP | H5F_LATEST_OBJ_HEADER | H5F_LATEST_SUPERBLOCK | H5F_LATEST_DATASPACE_SELECTION) #define H5F_LATEST_DSET_MSG_FLAGS (H5F_LATEST_FILL_MSG | H5F_LATEST_PLINE_MSG | H5F_LATEST_LAYOUT_MSG) @@ -838,7 +841,7 @@ H5_DLL void H5F_addr_decode_len(size_t addr_len, const uint8_t **pp, haddr_t *ad H5_DLL void H5F_sfile_assert_num(unsigned n); /* Routines for creating & destroying "fake" file structures */ -H5_DLL H5F_t *H5F_fake_alloc(uint8_t sizeof_size); +H5_DLL H5F_t *H5F_fake_alloc(uint8_t sizeof_size, hid_t fapl_id); H5_DLL herr_t H5F_fake_free(H5F_t *f); /* Superblock related routines */ diff --git a/src/H5Fquery.c b/src/H5Fquery.c index cc2399b..b382647 100644 --- a/src/H5Fquery.c +++ b/src/H5Fquery.c @@ -686,12 +686,16 @@ H5F_gc_ref(const H5F_t *f) /*------------------------------------------------------------------------- - * Function: H5F_use_latest_flags + * Function: H5F_use_latest_flags * - * Purpose: Retrieve the 'latest version support' for the file. + * Purpose: Retrieve the requested 'latest version support' for the file. * - * Return: Success: Non-negative, the requested 'version support' - * Failure: (can't happen) + * Return: Success: Non-negative, the requested 'version support' + * Failure: (can't happen) + * + * Programmer: Quincey Koziol + * koziol@hdfgroup.org + * Mar 5 2007 *------------------------------------------------------------------------- */ unsigned @@ -708,12 +712,39 @@ H5F_use_latest_flags(const H5F_t *f, unsigned fl) /*------------------------------------------------------------------------- - * Function: H5F_get_fc_degree + * Function: H5F_get_latest_flags * - * Purpose: Retrieve the 'file close degree' for the file. + * Purpose: Retrieve the 'latest version support' setting for the file. * - * Return: Success: Non-negative, the 'file close degree' - * Failure: (can't happen) + * Return: Success: Non-negative + * Failure: (can't happen) + * + * Programmer: Quincey Koziol + * koziol@hdfgroup.org + * Mar 5 2007 + * + *------------------------------------------------------------------------- + */ +unsigned +H5F_get_latest_flags(const H5F_t *f) +{ + /* Use FUNC_ENTER_NOAPI_NOINIT_NOERR here to avoid performance issues */ + FUNC_ENTER_NOAPI_NOINIT_NOERR + + HDassert(f); + HDassert(f->shared); + + FUNC_LEAVE_NOAPI(f->shared->latest_flags) +} /* end H5F_get_latest_flags() */ + + +/*------------------------------------------------------------------------- + * Function: H5F_get_fc_degree + * + * Purpose: Retrieve the 'file close degree' for the file. + * + * Return: Success: Non-negative, the 'file close degree' + * Failure: (can't happen) *------------------------------------------------------------------------- */ H5F_close_degree_t diff --git a/src/H5Olayout.c b/src/H5Olayout.c index 838a80f..1a21926 100644 --- a/src/H5Olayout.c +++ b/src/H5Olayout.c @@ -553,6 +553,7 @@ H5O__layout_encode(H5F_t *f, hbool_t H5_ATTR_UNUSED disable_shared, uint8_t *p, uint8_t *heap_block = NULL; size_t *str_size = NULL; unsigned u; + unsigned saved_latest_flags = H5F_GET_LATEST_FLAGS(f); herr_t ret_value = SUCCEED; /* Return value */ FUNC_ENTER_STATIC @@ -680,6 +681,7 @@ H5O__layout_encode(H5F_t *f, hbool_t H5_ATTR_UNUSED disable_shared, uint8_t *p, /* Note that 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 */ + if((mesg->storage.u.virt.serial_list_hobjid.addr == HADDR_UNDEF) && (mesg->storage.u.virt.list_nused > 0)) { uint8_t *heap_block_p; @@ -689,6 +691,8 @@ H5O__layout_encode(H5F_t *f, hbool_t H5_ATTR_UNUSED disable_shared, uint8_t *p, uint32_t chksum; size_t i; + H5F_SET_LATEST_FLAGS(f, H5F_LATEST_ALL_FLAGS); + /* Allocate array for caching results of strlen */ if(NULL == (str_size = (size_t *)H5MM_malloc(2 * mesg->storage.u.virt.list_nused *sizeof(size_t)))) HGOTO_ERROR(H5E_OHDR, H5E_RESOURCE, FAIL, "unable to allocate string length array") @@ -715,12 +719,12 @@ H5O__layout_encode(H5F_t *f, hbool_t H5_ATTR_UNUSED disable_shared, uint8_t *p, block_size += str_size[(2 * i) + 1]; /* Source selection */ - if((select_serial_size = H5S_SELECT_SERIAL_SIZE(mesg->storage.u.virt.list[i].source_select)) < 0) + if((select_serial_size = H5S_SELECT_SERIAL_SIZE(mesg->storage.u.virt.list[i].source_select, f)) < 0) HGOTO_ERROR(H5E_OHDR, H5E_CANTENCODE, FAIL, "unable to check dataspace selection size") block_size += (size_t)select_serial_size; /* Virtual dataset selection */ - if((select_serial_size = H5S_SELECT_SERIAL_SIZE(mesg->storage.u.virt.list[i].source_dset.virtual_select)) < 0) + if((select_serial_size = H5S_SELECT_SERIAL_SIZE(mesg->storage.u.virt.list[i].source_dset.virtual_select, f)) < 0) HGOTO_ERROR(H5E_OHDR, H5E_CANTENCODE, FAIL, "unable to check dataspace selection size") block_size += (size_t)select_serial_size; } /* end for */ @@ -755,11 +759,11 @@ H5O__layout_encode(H5F_t *f, hbool_t H5_ATTR_UNUSED disable_shared, uint8_t *p, heap_block_p += str_size[(2 * i) + 1]; /* Source selection */ - if(H5S_SELECT_SERIALIZE(mesg->storage.u.virt.list[i].source_select, &heap_block_p) < 0) + if(H5S_SELECT_SERIALIZE(mesg->storage.u.virt.list[i].source_select, &heap_block_p, f) < 0) HGOTO_ERROR(H5E_OHDR, H5E_CANTCOPY, FAIL, "unable to serialize source selection") /* Virtual selection */ - if(H5S_SELECT_SERIALIZE(mesg->storage.u.virt.list[i].source_dset.virtual_select, &heap_block_p) < 0) + if(H5S_SELECT_SERIALIZE(mesg->storage.u.virt.list[i].source_dset.virtual_select, &heap_block_p, f) < 0) HGOTO_ERROR(H5E_OHDR, H5E_CANTCOPY, FAIL, "unable to serialize virtual selection") } /* end for */ @@ -785,6 +789,8 @@ H5O__layout_encode(H5F_t *f, hbool_t H5_ATTR_UNUSED disable_shared, uint8_t *p, } /* end switch */ done: + H5F_SET_LATEST_FLAGS(f, saved_latest_flags); + heap_block = (uint8_t *)H5MM_xfree(heap_block); str_size = (size_t *)H5MM_xfree(str_size); diff --git a/src/H5P.c b/src/H5P.c index 49bea0a..25608aa 100644 --- a/src/H5P.c +++ b/src/H5P.c @@ -26,10 +26,11 @@ /***********/ /* Headers */ /***********/ -#include "H5private.h" /* Generic Functions */ -#include "H5Eprivate.h" /* Error handling */ -#include "H5Iprivate.h" /* IDs */ -#include "H5Ppkg.h" /* Property lists */ +#include "H5private.h" /* Generic Functions */ +#include "H5Eprivate.h" /* Error handling */ +#include "H5Iprivate.h" /* IDs */ +#include "H5Ppkg.h" /* Property lists */ +#include "H5Fprivate.h" /* Files */ /****************/ /* Local Macros */ @@ -839,6 +840,9 @@ herr_t H5Pencode(hid_t plist_id, void *buf, size_t *nalloc) { H5P_genplist_t *plist; /* Property list to query */ + H5P_genplist_t *fapl_plist; + hid_t new_fapl_id; + hbool_t latest_format = TRUE; herr_t ret_value = SUCCEED; /* return value */ FUNC_ENTER_API(FAIL) @@ -848,8 +852,19 @@ H5Pencode(hid_t plist_id, void *buf, size_t *nalloc) if(NULL == (plist = (H5P_genplist_t *)H5I_object_verify(plist_id, H5I_GENPROP_LST))) HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a property list"); + /* Make a copy of the default file access property list */ + if(NULL == (fapl_plist = (H5P_genplist_t *)H5I_object(H5P_LST_FILE_ACCESS_ID_g))) + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a property list") + if((new_fapl_id = H5P_copy_plist(fapl_plist, FALSE)) < 0) + HGOTO_ERROR(H5E_INTERNAL, H5E_CANTINIT, FAIL, "can't copy file access property list") + + /* Set latest format in fapl_plist */ + /* This will eventually be used by VDS to encode datasets via H5P__dcrt_layout_enc() */ + if(H5P_set(fapl_plist, H5F_ACS_LATEST_FORMAT_NAME, &latest_format) < 0) + HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "can't set 'latest format' flag") + /* Call the internal encode routine */ - if((ret_value = H5P__encode(plist, TRUE, buf, nalloc)) < 0) + if((ret_value = H5P__encode(plist, TRUE, buf, nalloc, new_fapl_id)) < 0) HGOTO_ERROR(H5E_PLIST, H5E_CANTENCODE, FAIL, "unable to encode property list"); done: diff --git a/src/H5Pdapl.c b/src/H5Pdapl.c index 494de3e..b72fa58 100644 --- a/src/H5Pdapl.c +++ b/src/H5Pdapl.c @@ -110,13 +110,13 @@ static herr_t H5P__encode_chunk_cache_nbytes(const void *value, void **_pp, static herr_t H5P__decode_chunk_cache_nbytes(const void **_pp, void *_value); /* Property list callbacks */ -static herr_t H5P__dacc_vds_view_enc(const void *value, void **pp, size_t *size); +static herr_t H5P__dacc_vds_view_enc(const void *value, void **pp, size_t *size, void *udata); static herr_t H5P__dacc_vds_view_dec(const void **pp, void *value); /* Property list callbacks */ static herr_t H5P__dapl_efile_pref_set(hid_t prop_id, const char* name, size_t size, void* value); static herr_t H5P__dapl_efile_pref_get(hid_t prop_id, const char* name, size_t size, void* value); -static herr_t H5P__dapl_efile_pref_enc(const void *value, void **_pp, size_t *size); +static herr_t H5P__dapl_efile_pref_enc(const void *value, void **_pp, size_t *size, void *udata); static herr_t H5P__dapl_efile_pref_dec(const void **_pp, void *value); static herr_t H5P__dapl_efile_pref_del(hid_t prop_id, const char* name, size_t size, void* value); static herr_t H5P__dapl_efile_pref_copy(const char* name, size_t size, void* value); @@ -288,7 +288,7 @@ H5P__dapl_efile_pref_get(hid_t H5_ATTR_UNUSED prop_id, const char H5_ATTR_UNUSED *------------------------------------------------------------------------- */ static herr_t -H5P__dapl_efile_pref_enc(const void *value, void **_pp, size_t *size) +H5P__dapl_efile_pref_enc(const void *value, void **_pp, size_t *size, void H5_ATTR_UNUSED *udata) { const char *efile_pref = *(const char * const *)value; uint8_t **pp = (uint8_t **)_pp; @@ -883,7 +883,7 @@ done: *------------------------------------------------------------------------- */ static herr_t -H5P__dacc_vds_view_enc(const void *value, void **_pp, size_t *size) +H5P__dacc_vds_view_enc(const void *value, void **_pp, size_t *size, void H5_ATTR_UNUSED *udata) { const H5D_vds_view_t *view = (const H5D_vds_view_t *)value; /* Create local alias for values */ uint8_t **pp = (uint8_t **)_pp; diff --git a/src/H5Pdcpl.c b/src/H5Pdcpl.c index 3b4c159..a000351 100644 --- a/src/H5Pdcpl.c +++ b/src/H5Pdcpl.c @@ -146,7 +146,7 @@ static herr_t H5P__dcrt_reg_prop(H5P_genclass_t *pclass); /* Property callbacks */ static herr_t H5P__dcrt_layout_set(hid_t prop_id, const char *name, size_t size, void *value); static herr_t H5P__dcrt_layout_get(hid_t prop_id, const char *name, size_t size, void *value); -static herr_t H5P__dcrt_layout_enc(const void *value, void **pp, size_t *size); +static herr_t H5P__dcrt_layout_enc(const void *value, void **pp, size_t *size, void *udata); static herr_t H5P__dcrt_layout_dec(const void **pp, void *value); static herr_t H5P__dcrt_layout_del(hid_t prop_id, const char *name, size_t size, void *value); static herr_t H5P__dcrt_layout_copy(const char *name, size_t size, void *value); @@ -154,14 +154,14 @@ static int H5P__dcrt_layout_cmp(const void *value1, const void *value2, size_t s static herr_t H5P__dcrt_layout_close(const char *name, size_t size, void *value); static herr_t H5P__dcrt_fill_value_set(hid_t prop_id, const char *name, size_t size, void *value); static herr_t H5P__dcrt_fill_value_get(hid_t prop_id, const char *name, size_t size, void *value); -static herr_t H5P__dcrt_fill_value_enc(const void *value, void **pp, size_t *size); +static herr_t H5P__dcrt_fill_value_enc(const void *value, void **pp, size_t *size, void *udata); static herr_t H5P__dcrt_fill_value_dec(const void **pp, void *value); static herr_t H5P__dcrt_fill_value_del(hid_t prop_id, const char *name, size_t size, void *value); static herr_t H5P__dcrt_fill_value_copy(const char *name, size_t size, void *value); static herr_t H5P__dcrt_fill_value_close(const char *name, size_t size, void *value); static herr_t H5P__dcrt_ext_file_list_set(hid_t prop_id, const char *name, size_t size, void *value); static herr_t H5P__dcrt_ext_file_list_get(hid_t prop_id, const char *name, size_t size, void *value); -static herr_t H5P__dcrt_ext_file_list_enc(const void *value, void **pp, size_t *size); +static herr_t H5P__dcrt_ext_file_list_enc(const void *value, void **pp, size_t *size, void *udata); static herr_t H5P__dcrt_ext_file_list_dec(const void **pp, void *value); static herr_t H5P__dcrt_ext_file_list_del(hid_t prop_id, const char *name, size_t size, void *value); static herr_t H5P__dcrt_ext_file_list_copy(const char *name, size_t size, void *value); @@ -366,9 +366,10 @@ done: *------------------------------------------------------------------------- */ static herr_t -H5P__dcrt_layout_enc(const void *value, void **_pp, size_t *size) +H5P__dcrt_layout_enc(const void *value, void **_pp, size_t *size, void *_udata) { const H5O_layout_t *layout = (const H5O_layout_t *)value; /* Create local aliases for values */ + H5P_enc_cb_info_t *udata = (H5P_enc_cb_info_t *)_udata; /* User data for encode callback */ uint8_t **pp = (uint8_t **)_pp; uint8_t *tmp_p; size_t tmp_size; @@ -426,14 +427,14 @@ H5P__dcrt_layout_enc(const void *value, void **_pp, size_t *size) * list before we get here. */ tmp_size = (size_t)-1; tmp_p = *pp; - if(H5S_encode(layout->storage.u.virt.list[u].source_select, pp, &tmp_size) < 0) + if(H5S_encode(layout->storage.u.virt.list[u].source_select, pp, &tmp_size, udata->fapl_id) < 0) HGOTO_ERROR(H5E_PLIST, H5E_CANTENCODE, FAIL, "unable to serialize source selection") *size += (size_t)(*pp - tmp_p); /* Virtual dataset selection. Same notes as above apply. */ tmp_size = (size_t)-1; tmp_p = *pp; - if(H5S_encode(layout->storage.u.virt.list[u].source_dset.virtual_select, pp, &tmp_size) < 0) + if(H5S_encode(layout->storage.u.virt.list[u].source_dset.virtual_select, pp, &tmp_size, udata->fapl_id) < 0) HGOTO_ERROR(H5E_PLIST, H5E_CANTENCODE, FAIL, "unable to serialize virtual selection") *size += (size_t)(*pp - tmp_p); } /* end for */ @@ -466,14 +467,14 @@ H5P__dcrt_layout_enc(const void *value, void **_pp, size_t *size) /* Source selection */ tmp_size = (size_t)0; tmp_p = NULL; - if(H5S_encode(layout->storage.u.virt.list[u].source_select, &tmp_p, &tmp_size) < 0) + if(H5S_encode(layout->storage.u.virt.list[u].source_select, &tmp_p, &tmp_size, udata->fapl_id) < 0) HGOTO_ERROR(H5E_PLIST, H5E_CANTENCODE, FAIL, "unable to serialize source selection") *size += tmp_size; /* Virtual dataset selection */ tmp_size = (size_t)0; tmp_p = NULL; - if(H5S_encode(layout->storage.u.virt.list[u].source_dset.virtual_select, &tmp_p, &tmp_size) < 0) + if(H5S_encode(layout->storage.u.virt.list[u].source_dset.virtual_select, &tmp_p, &tmp_size, udata->fapl_id) < 0) HGOTO_ERROR(H5E_PLIST, H5E_CANTENCODE, FAIL, "unable to serialize virtual selection") *size += tmp_size; } /* end for */ @@ -979,7 +980,7 @@ done: *------------------------------------------------------------------------- */ static herr_t -H5P__dcrt_fill_value_enc(const void *value, void **_pp, size_t *size) +H5P__dcrt_fill_value_enc(const void *value, void **_pp, size_t *size, void H5_ATTR_UNUSED *udata) { const H5O_fill_t *fill = (const H5O_fill_t *)value; /* Create local aliases for values */ size_t dt_size = 0; /* Size of encoded datatype */ @@ -1382,7 +1383,7 @@ done: *------------------------------------------------------------------------- */ static herr_t -H5P__dcrt_ext_file_list_enc(const void *value, void **_pp, size_t *size) +H5P__dcrt_ext_file_list_enc(const void *value, void **_pp, size_t *size, void H5_ATTR_UNUSED *udata) { const H5O_efl_t *efl = (const H5O_efl_t *)value; /* Create local aliases for values */ size_t len = 0; /* String length of slot name */ diff --git a/src/H5Pdxpl.c b/src/H5Pdxpl.c index 3c53c15..c815542 100644 --- a/src/H5Pdxpl.c +++ b/src/H5Pdxpl.c @@ -212,21 +212,21 @@ static herr_t H5P__dxfr_reg_prop(H5P_genclass_t *pclass); /* Property list callbacks */ -static herr_t H5P__dxfr_bkgr_buf_type_enc(const void *value, void **pp, size_t *size); +static herr_t H5P__dxfr_bkgr_buf_type_enc(const void *value, void **pp, size_t *size, void *udata); static herr_t H5P__dxfr_bkgr_buf_type_dec(const void **pp, void *value); -static herr_t H5P__dxfr_btree_split_ratio_enc(const void *value, void **pp, size_t *size); +static herr_t H5P__dxfr_btree_split_ratio_enc(const void *value, void **pp, size_t *size, void *udata); static herr_t H5P__dxfr_btree_split_ratio_dec(const void **pp, void *value); -static herr_t H5P__dxfr_io_xfer_mode_enc(const void *value, void **pp, size_t *size); +static herr_t H5P__dxfr_io_xfer_mode_enc(const void *value, void **pp, size_t *size, void *udata); static herr_t H5P__dxfr_io_xfer_mode_dec(const void **pp, void *value); -static herr_t H5P__dxfr_mpio_collective_opt_enc(const void *value, void **pp, size_t *size); +static herr_t H5P__dxfr_mpio_collective_opt_enc(const void *value, void **pp, size_t *size, void *udata); static herr_t H5P__dxfr_mpio_collective_opt_dec(const void **pp, void *value); -static herr_t H5P__dxfr_mpio_chunk_opt_hard_enc(const void *value, void **pp, size_t *size); +static herr_t H5P__dxfr_mpio_chunk_opt_hard_enc(const void *value, void **pp, size_t *size, void *udata); static herr_t H5P__dxfr_mpio_chunk_opt_hard_dec(const void **pp, void *value); -static herr_t H5P__dxfr_edc_enc(const void *value, void **pp, size_t *size); +static herr_t H5P__dxfr_edc_enc(const void *value, void **pp, size_t *size, void *udata); static herr_t H5P__dxfr_edc_dec(const void **pp, void *value); static herr_t H5P__dxfr_xform_set(hid_t prop_id, const char* name, size_t size, void* value); static herr_t H5P__dxfr_xform_get(hid_t prop_id, const char* name, size_t size, void* value); -static herr_t H5P__dxfr_xform_enc(const void *value, void **pp, size_t *size); +static herr_t H5P__dxfr_xform_enc(const void *value, void **pp, size_t *size, void *udata); static herr_t H5P__dxfr_xform_dec(const void **pp, void *value); static herr_t H5P__dxfr_xform_del(hid_t prop_id, const char* name, size_t size, void* value); static herr_t H5P__dxfr_xform_copy(const char* name, size_t size, void* value); @@ -559,7 +559,7 @@ done: *------------------------------------------------------------------------- */ static herr_t -H5P__dxfr_bkgr_buf_type_enc(const void *value, void **_pp, size_t *size) +H5P__dxfr_bkgr_buf_type_enc(const void *value, void **_pp, size_t *size, void H5_ATTR_UNUSED *udata) { const H5T_bkg_t *bkgr_buf_type = (const H5T_bkg_t *)value; /* Create local alias for values */ uint8_t **pp = (uint8_t **)_pp; @@ -632,7 +632,7 @@ H5P__dxfr_bkgr_buf_type_dec(const void **_pp, void *_value) *------------------------------------------------------------------------- */ static herr_t -H5P__dxfr_btree_split_ratio_enc(const void *value, void **_pp, size_t *size) +H5P__dxfr_btree_split_ratio_enc(const void *value, void **_pp, size_t *size, void H5_ATTR_UNUSED *udata) { const double *btree_split_ratio = (const double *)value; /* Create local alias for values */ uint8_t **pp = (uint8_t **)_pp; @@ -793,7 +793,7 @@ done: *------------------------------------------------------------------------- */ static herr_t -H5P__dxfr_xform_enc(const void *value, void **_pp, size_t *size) +H5P__dxfr_xform_enc(const void *value, void **_pp, size_t *size, void H5_ATTR_UNUSED *udata) { const H5Z_data_xform_t *data_xform_prop = *(const H5Z_data_xform_t * const *)value; /* Create local alias for values */ const char *pexp = NULL; /* Pointer to transform expression */ @@ -1881,7 +1881,7 @@ done: *------------------------------------------------------------------------- */ static herr_t -H5P__dxfr_io_xfer_mode_enc(const void *value, void **_pp, size_t *size) +H5P__dxfr_io_xfer_mode_enc(const void *value, void **_pp, size_t *size, void H5_ATTR_UNUSED *udata) { const H5FD_mpio_xfer_t *xfer_mode = (const H5FD_mpio_xfer_t *)value; /* Create local alias for values */ uint8_t **pp = (uint8_t **)_pp; @@ -1954,7 +1954,7 @@ H5P__dxfr_io_xfer_mode_dec(const void **_pp, void *_value) *------------------------------------------------------------------------- */ static herr_t -H5P__dxfr_mpio_collective_opt_enc(const void *value, void **_pp, size_t *size) +H5P__dxfr_mpio_collective_opt_enc(const void *value, void **_pp, size_t *size, void H5_ATTR_UNUSED *udata) { const H5FD_mpio_collective_opt_t *coll_opt = (const H5FD_mpio_collective_opt_t *)value; /* Create local alias for values */ uint8_t **pp = (uint8_t **)_pp; @@ -2027,7 +2027,7 @@ H5P__dxfr_mpio_collective_opt_dec(const void **_pp, void *_value) *------------------------------------------------------------------------- */ static herr_t -H5P__dxfr_mpio_chunk_opt_hard_enc(const void *value, void **_pp, size_t *size) +H5P__dxfr_mpio_chunk_opt_hard_enc(const void *value, void **_pp, size_t *size, void H5_ATTR_UNUSED *udata) { const H5FD_mpio_chunk_opt_t *chunk_opt = (const H5FD_mpio_chunk_opt_t *)value; /* Create local alias for values */ uint8_t **pp = (uint8_t **)_pp; @@ -2212,7 +2212,7 @@ done: *------------------------------------------------------------------------- */ static herr_t -H5P__dxfr_edc_enc(const void *value, void **_pp, size_t *size) +H5P__dxfr_edc_enc(const void *value, void **_pp, size_t *size, void H5_ATTR_UNUSED *udata) { const H5Z_EDC_t *check = (const H5Z_EDC_t *)value; /* Create local alias for values */ uint8_t **pp = (uint8_t **)_pp; diff --git a/src/H5Pencdec.c b/src/H5Pencdec.c index 73c48d7..3332098 100644 --- a/src/H5Pencdec.c +++ b/src/H5Pencdec.c @@ -49,9 +49,10 @@ /* Typedef for iterator when encoding a property list */ typedef struct { - hbool_t encode; /* Whether the property list should be encoded */ - size_t *enc_size_ptr; /* Pointer to size of encoded buffer */ - void **pp; /* Pointer to encoding buffer pointer */ + hbool_t encode; /* Whether the property list should be encoded */ + size_t *enc_size_ptr; /* Pointer to size of encoded buffer */ + void **pp; /* Pointer to encoding buffer pointer */ + hid_t fapl_id; /* File access property list */ } H5P_enc_iter_ud_t; @@ -90,7 +91,7 @@ typedef struct { *------------------------------------------------------------------------- */ herr_t -H5P__encode_size_t(const void *value, void **_pp, size_t *size) +H5P__encode_size_t(const void *value, void **_pp, size_t *size, void H5_ATTR_UNUSED *udata) { uint64_t enc_value = (uint64_t)*(const size_t *)value; /* Property value to encode */ uint8_t **pp = (uint8_t **)_pp; @@ -132,7 +133,7 @@ H5P__encode_size_t(const void *value, void **_pp, size_t *size) *------------------------------------------------------------------------- */ herr_t -H5P__encode_hsize_t(const void *value, void **_pp, size_t *size) +H5P__encode_hsize_t(const void *value, void **_pp, size_t *size, void H5_ATTR_UNUSED *udata) { uint64_t enc_value = (uint64_t)*(const hsize_t *)value; /* Property value to encode */ unsigned enc_size = H5VM_limit_enc_size(enc_value); /* Size of encoded property */ @@ -173,7 +174,7 @@ H5P__encode_hsize_t(const void *value, void **_pp, size_t *size) *------------------------------------------------------------------------- */ herr_t -H5P__encode_unsigned(const void *value, void **_pp, size_t *size) +H5P__encode_unsigned(const void *value, void **_pp, size_t *size, void H5_ATTR_UNUSED *udata) { uint8_t **pp = (uint8_t **)_pp; @@ -212,7 +213,7 @@ H5P__encode_unsigned(const void *value, void **_pp, size_t *size) *------------------------------------------------------------------------- */ herr_t -H5P__encode_uint8_t(const void *value, void **_pp, size_t *size) +H5P__encode_uint8_t(const void *value, void **_pp, size_t *size, void H5_ATTR_UNUSED *udata) { uint8_t **pp = (uint8_t **)_pp; @@ -248,7 +249,7 @@ H5P__encode_uint8_t(const void *value, void **_pp, size_t *size) *------------------------------------------------------------------------- */ herr_t -H5P__encode_hbool_t(const void *value, void **_pp, size_t *size) +H5P__encode_hbool_t(const void *value, void **_pp, size_t *size, void H5_ATTR_UNUSED *udata) { uint8_t **pp = (uint8_t **)_pp; @@ -283,7 +284,7 @@ H5P__encode_hbool_t(const void *value, void **_pp, size_t *size) *------------------------------------------------------------------------- */ herr_t -H5P__encode_double(const void *value, void **_pp, size_t *size) +H5P__encode_double(const void *value, void **_pp, size_t *size, void H5_ATTR_UNUSED *udata) { uint8_t **pp = (uint8_t **)_pp; @@ -332,7 +333,8 @@ static int H5P__encode_cb(H5P_genprop_t *prop, void *_udata) { H5P_enc_iter_ud_t *udata = (H5P_enc_iter_ud_t *)_udata; /* Pointer to user data */ - int ret_value = H5_ITER_CONT; /* Return value */ + H5P_enc_cb_info_t cb_udata; /* User data for property iteration callback */ + int ret_value = H5_ITER_CONT; /* Return value */ FUNC_ENTER_STATIC @@ -355,7 +357,8 @@ H5P__encode_cb(H5P_genprop_t *prop, void *_udata) /* Encode (or not, if *(udata->pp) is NULL) the property value */ prop_value_len = 0; - if((prop->encode)(prop->value, udata->pp, &prop_value_len) < 0) + cb_udata.fapl_id = udata->fapl_id; + if((prop->encode)(prop->value, udata->pp, &prop_value_len, &cb_udata) < 0) HGOTO_ERROR(H5E_PLIST, H5E_CANTENCODE, H5_ITER_ERROR, "property encoding routine failed") *(udata->enc_size_ptr) += prop_value_len; } /* end if */ @@ -390,7 +393,7 @@ done: --------------------------------------------------------------------------*/ herr_t H5P__encode(const H5P_genplist_t *plist, hbool_t enc_all_prop, void *buf, - size_t *nalloc) + size_t *nalloc, hid_t fapl_id) { H5P_enc_iter_ud_t udata; /* User data for property iteration callback */ uint8_t *p = (uint8_t *)buf; /* Temporary pointer to encoding buffer */ @@ -425,6 +428,7 @@ H5P__encode(const H5P_genplist_t *plist, hbool_t enc_all_prop, void *buf, udata.encode = encode; udata.enc_size_ptr = &encode_size; udata.pp = (void **)&p; + udata.fapl_id = fapl_id; /* Iterate over all properties in property list, encoding them */ idx = 0; diff --git a/src/H5Pfapl.c b/src/H5Pfapl.c index 1b0a4b9..452adf4 100644 --- a/src/H5Pfapl.c +++ b/src/H5Pfapl.c @@ -283,16 +283,16 @@ static int H5P__facc_file_image_info_cmp(const void *value1, const void *value2, static herr_t H5P__facc_file_image_info_close(const char *name, size_t size, void *value); /* encode & decode callbacks */ -static herr_t H5P__facc_cache_config_enc(const void *value, void **_pp, size_t *size); +static herr_t H5P__facc_cache_config_enc(const void *value, void **_pp, size_t *size, void *udata); static herr_t H5P__facc_cache_config_dec(const void **_pp, void *value); static int H5P__facc_cache_config_cmp(const void *value1, const void *value2, size_t size); -static herr_t H5P__facc_fclose_degree_enc(const void *value, void **_pp, size_t *size); +static herr_t H5P__facc_fclose_degree_enc(const void *value, void **_pp, size_t *size, void *udata); static herr_t H5P__facc_fclose_degree_dec(const void **pp, void *value); -static herr_t H5P__facc_multi_type_enc(const void *value, void **_pp, size_t *size); +static herr_t H5P__facc_multi_type_enc(const void *value, void **_pp, size_t *size, void *udata); static herr_t H5P__facc_multi_type_dec(const void **_pp, void *value); /* Metadata cache log location property callbacks */ -static herr_t H5P_facc_mdc_log_location_enc(const void *value, void **_pp, size_t *size); +static herr_t H5P_facc_mdc_log_location_enc(const void *value, void **_pp, size_t *size, void *udata); static herr_t H5P_facc_mdc_log_location_dec(const void **_pp, void *value); static herr_t H5P_facc_mdc_log_location_del(hid_t prop_id, const char *name, size_t size, void *value); static herr_t H5P_facc_mdc_log_location_copy(const char *name, size_t size, void *value); @@ -301,7 +301,7 @@ static herr_t H5P_facc_mdc_log_location_close(const char *name, size_t size, voi /* Metadata cache image property callbacks */ static int H5P__facc_cache_image_config_cmp(const void *_config1, const void *_config2, size_t H5_ATTR_UNUSED size); -static herr_t H5P__facc_cache_image_config_enc(const void *value, void **_pp, size_t *size); +static herr_t H5P__facc_cache_image_config_enc(const void *value, void **_pp, size_t *size, void *udata); static herr_t H5P__facc_cache_image_config_dec(const void **_pp, void *_value); @@ -2958,7 +2958,7 @@ done: *------------------------------------------------------------------------- */ static herr_t -H5P__facc_cache_image_config_enc(const void *value, void **_pp, size_t *size) +H5P__facc_cache_image_config_enc(const void *value, void **_pp, size_t *size, void H5_ATTR_UNUSED *udata) { const H5AC_cache_image_config_t *config = (const H5AC_cache_image_config_t *)value; /* Create local aliases for value */ uint8_t **pp = (uint8_t **)_pp; @@ -3384,7 +3384,7 @@ done: *------------------------------------------------------------------------- */ static herr_t -H5P__facc_cache_config_enc(const void *value, void **_pp, size_t *size) +H5P__facc_cache_config_enc(const void *value, void **_pp, size_t *size, void H5_ATTR_UNUSED *udata) { const H5AC_cache_config_t *config = (const H5AC_cache_config_t *)value; /* Create local aliases for values */ uint8_t **pp = (uint8_t **)_pp; @@ -3664,7 +3664,7 @@ done: *------------------------------------------------------------------------- */ static herr_t -H5P__facc_fclose_degree_enc(const void *value, void **_pp, size_t *size) +H5P__facc_fclose_degree_enc(const void *value, void **_pp, size_t *size, void H5_ATTR_UNUSED *udata) { const H5F_close_degree_t *fclose_degree = (const H5F_close_degree_t *)value; /* Create local alias for values */ uint8_t **pp = (uint8_t **)_pp; @@ -3737,7 +3737,7 @@ H5P__facc_fclose_degree_dec(const void **_pp, void *_value) *------------------------------------------------------------------------- */ static herr_t -H5P__facc_multi_type_enc(const void *value, void **_pp, size_t *size) +H5P__facc_multi_type_enc(const void *value, void **_pp, size_t *size, void H5_ATTR_UNUSED *udata) { const H5FD_mem_t *type = (const H5FD_mem_t *)value; /* Create local alias for values */ uint8_t **pp = (uint8_t **)_pp; @@ -4166,7 +4166,7 @@ done: *------------------------------------------------------------------------- */ static herr_t -H5P_facc_mdc_log_location_enc(const void *value, void **_pp, size_t *size) +H5P_facc_mdc_log_location_enc(const void *value, void **_pp, size_t *size, void H5_ATTR_UNUSED *udata) { const char *log_location = *(const char * const *)value; uint8_t **pp = (uint8_t **)_pp; @@ -4466,7 +4466,7 @@ done: *------------------------------------------------------------------------- */ herr_t -H5P__encode_coll_md_read_flag_t(const void *value, void **_pp, size_t *size) +H5P__encode_coll_md_read_flag_t(const void *value, void **_pp, size_t *size, void H5_ATTR_UNUSED *udata) { const H5P_coll_md_read_flag_t *coll_md_read_flag = (const H5P_coll_md_read_flag_t *)value; uint8_t **pp = (uint8_t **)_pp; diff --git a/src/H5Pfcpl.c b/src/H5Pfcpl.c index 6b0d2c0..720c526 100644 --- a/src/H5Pfcpl.c +++ b/src/H5Pfcpl.c @@ -132,13 +132,13 @@ static herr_t H5P_fcrt_reg_prop(H5P_genclass_t *pclass); /* property callbacks */ -static herr_t H5P__fcrt_btree_rank_enc(const void *value, void **_pp, size_t *size); +static herr_t H5P__fcrt_btree_rank_enc(const void *value, void **_pp, size_t *size, void *udata); static herr_t H5P__fcrt_btree_rank_dec(const void **_pp, void *value); -static herr_t H5P__fcrt_shmsg_index_types_enc(const void *value, void **_pp, size_t *size); +static herr_t H5P__fcrt_shmsg_index_types_enc(const void *value, void **_pp, size_t *size, void *udata); static herr_t H5P__fcrt_shmsg_index_types_dec(const void **_pp, void *value); -static herr_t H5P__fcrt_shmsg_index_minsize_enc(const void *value, void **_pp, size_t *size); +static herr_t H5P__fcrt_shmsg_index_minsize_enc(const void *value, void **_pp, size_t *size, void *udata); static herr_t H5P__fcrt_shmsg_index_minsize_dec(const void **_pp, void *value); -static herr_t H5P__fcrt_fspace_strategy_enc(const void *value, void **_pp, size_t *size); +static herr_t H5P__fcrt_fspace_strategy_enc(const void *value, void **_pp, size_t *size, void *udata); static herr_t H5P__fcrt_fspace_strategy_dec(const void **_pp, void *_value); @@ -722,7 +722,7 @@ done: *------------------------------------------------------------------------- */ static herr_t -H5P__fcrt_btree_rank_enc(const void *value, void **_pp, size_t *size) +H5P__fcrt_btree_rank_enc(const void *value, void **_pp, size_t *size, void H5_ATTR_UNUSED *udata) { const unsigned *btree_k = (const unsigned *)value; /* Create local alias for values */ uint8_t **pp = (uint8_t **)_pp; @@ -1013,7 +1013,7 @@ done: *------------------------------------------------------------------------- */ static herr_t -H5P__fcrt_shmsg_index_types_enc(const void *value, void **_pp, size_t *size) +H5P__fcrt_shmsg_index_types_enc(const void *value, void **_pp, size_t *size, void H5_ATTR_UNUSED *udata) { const unsigned *type_flags = (const unsigned *)value; /* Create local alias for values */ uint8_t **pp = (uint8_t **)_pp; @@ -1106,7 +1106,7 @@ done: *------------------------------------------------------------------------- */ static herr_t -H5P__fcrt_shmsg_index_minsize_enc(const void *value, void **_pp, size_t *size) +H5P__fcrt_shmsg_index_minsize_enc(const void *value, void **_pp, size_t *size, void H5_ATTR_UNUSED *udata) { const unsigned *minsizes = (const unsigned *)value; /* Create local alias for values */ uint8_t **pp = (uint8_t **)_pp; @@ -1388,7 +1388,7 @@ done: *------------------------------------------------------------------------- */ static herr_t -H5P__fcrt_fspace_strategy_enc(const void *value, void **_pp, size_t *size) +H5P__fcrt_fspace_strategy_enc(const void *value, void **_pp, size_t *size, void H5_ATTR_UNUSED *udata) { const H5F_fspace_strategy_t *strategy = (const H5F_fspace_strategy_t *)value; /* Create local alias for values */ uint8_t **pp = (uint8_t **)_pp; diff --git a/src/H5Pgcpl.c b/src/H5Pgcpl.c index 6f1fab1..a719616 100644 --- a/src/H5Pgcpl.c +++ b/src/H5Pgcpl.c @@ -69,9 +69,9 @@ static herr_t H5P__gcrt_reg_prop(H5P_genclass_t *pclass); /* Property callbacks */ -static herr_t H5P__gcrt_group_info_enc(const void *value, void **_pp, size_t *size); +static herr_t H5P__gcrt_group_info_enc(const void *value, void **_pp, size_t *size, void *udata); static herr_t H5P__gcrt_group_info_dec(const void **_pp, void *value); -static herr_t H5P__gcrt_link_info_enc(const void *value, void **_pp, size_t *size); +static herr_t H5P__gcrt_link_info_enc(const void *value, void **_pp, size_t *size, void *udata); static herr_t H5P__gcrt_link_info_dec(const void **_pp, void *value); @@ -546,7 +546,7 @@ done: *------------------------------------------------------------------------- */ static herr_t -H5P__gcrt_group_info_enc(const void *value, void **_pp, size_t *size) +H5P__gcrt_group_info_enc(const void *value, void **_pp, size_t *size, void H5_ATTR_UNUSED *udata) { const H5O_ginfo_t *ginfo = (const H5O_ginfo_t *)value; /* Create local aliases for values */ uint8_t **pp = (uint8_t **)_pp; @@ -634,7 +634,7 @@ H5P__gcrt_group_info_dec(const void **_pp, void *_value) *------------------------------------------------------------------------- */ static herr_t -H5P__gcrt_link_info_enc(const void *value, void **_pp, size_t *size) +H5P__gcrt_link_info_enc(const void *value, void **_pp, size_t *size, void H5_ATTR_UNUSED *udata) { const H5O_linfo_t *linfo = (const H5O_linfo_t *)value; /* Create local aliases for values */ uint8_t **pp = (uint8_t **)_pp; diff --git a/src/H5Plapl.c b/src/H5Plapl.c index 18b81ac..4a95991 100644 --- a/src/H5Plapl.c +++ b/src/H5Plapl.c @@ -114,7 +114,7 @@ static herr_t H5P__lacc_reg_prop(H5P_genclass_t *pclass); /* Property list callbacks */ static herr_t H5P__lacc_elink_pref_set(hid_t prop_id, const char* name, size_t size, void* value); static herr_t H5P__lacc_elink_pref_get(hid_t prop_id, const char* name, size_t size, void* value); -static herr_t H5P__lacc_elink_pref_enc(const void *value, void **_pp, size_t *size); +static herr_t H5P__lacc_elink_pref_enc(const void *value, void **_pp, size_t *size, void *udata); static herr_t H5P__lacc_elink_pref_dec(const void **_pp, void *value); static herr_t H5P__lacc_elink_pref_del(hid_t prop_id, const char* name, size_t size, void* value); static herr_t H5P__lacc_elink_pref_copy(const char* name, size_t size, void* value); @@ -122,7 +122,7 @@ static int H5P__lacc_elink_pref_cmp(const void *value1, const void *value2, size static herr_t H5P__lacc_elink_pref_close(const char* name, size_t size, void* value); static herr_t H5P__lacc_elink_fapl_set(hid_t prop_id, const char* name, size_t size, void* value); static herr_t H5P__lacc_elink_fapl_get(hid_t prop_id, const char* name, size_t size, void* value); -static herr_t H5P__lacc_elink_fapl_enc(const void *value, void **_pp, size_t *size); +static herr_t H5P__lacc_elink_fapl_enc(const void *value, void **_pp, size_t *size, void *udata); static herr_t H5P__lacc_elink_fapl_dec(const void **_pp, void *value); static herr_t H5P__lacc_elink_fapl_del(hid_t prop_id, const char* name, size_t size, void* value); static herr_t H5P__lacc_elink_fapl_copy(const char* name, size_t size, void* value); @@ -338,13 +338,14 @@ done: *------------------------------------------------------------------------- */ static herr_t -H5P__lacc_elink_fapl_enc(const void *value, void **_pp, size_t *size) +H5P__lacc_elink_fapl_enc(const void *value, void **_pp, size_t *size, void *_udata) { - const hid_t *elink_fapl = (const hid_t *)value; /* Property to encode */ + const hid_t *elink_fapl = (const hid_t *)value; /* Property to encode */ uint8_t **pp = (uint8_t **)_pp; + H5P_enc_cb_info_t *udata = (H5P_enc_cb_info_t *)_udata; /* User data for encode callback */ H5P_genplist_t *fapl_plist; /* Pointer to property list */ hbool_t non_default_fapl = FALSE; /* Whether the FAPL is non-default */ - size_t fapl_size = 0; /* FAPL's encoded size */ + size_t fapl_size = 0; /* FAPL's encoded size */ herr_t ret_value = SUCCEED; /* Return value */ FUNC_ENTER_STATIC @@ -364,7 +365,7 @@ H5P__lacc_elink_fapl_enc(const void *value, void **_pp, size_t *size) /* Encode the property list, if non-default */ /* (if *pp == NULL, will only compute the size) */ if(non_default_fapl) { - if(H5P__encode(fapl_plist, TRUE, NULL, &fapl_size) < 0) + if(H5P__encode(fapl_plist, TRUE, NULL, &fapl_size, udata->fapl_id) < 0) HGOTO_ERROR(H5E_PLIST, H5E_CANTENCODE, FAIL, "can't encode property list") if(*pp) { @@ -379,7 +380,7 @@ H5P__lacc_elink_fapl_enc(const void *value, void **_pp, size_t *size) UINT64ENCODE_VAR(*pp, enc_value, enc_size); /* encode the plist */ - if(H5P__encode(fapl_plist, TRUE, *pp, &fapl_size) < 0) + if(H5P__encode(fapl_plist, TRUE, *pp, &fapl_size, udata->fapl_id) < 0) HGOTO_ERROR(H5E_PLIST, H5E_CANTENCODE, FAIL, "can't encode property list") *pp += fapl_size; @@ -688,7 +689,7 @@ H5P__lacc_elink_pref_get(hid_t H5_ATTR_UNUSED prop_id, const char H5_ATTR_UNUSED *------------------------------------------------------------------------- */ static herr_t -H5P__lacc_elink_pref_enc(const void *value, void **_pp, size_t *size) +H5P__lacc_elink_pref_enc(const void *value, void **_pp, size_t *size, void H5_ATTR_UNUSED *udata) { const char *elink_pref = *(const char * const *)value; uint8_t **pp = (uint8_t **)_pp; diff --git a/src/H5Pocpl.c b/src/H5Pocpl.c index be41e32..b3c472e 100644 --- a/src/H5Pocpl.c +++ b/src/H5Pocpl.c @@ -90,7 +90,7 @@ static herr_t H5P__ocrt_reg_prop(H5P_genclass_t *pclass); /* Property callbacks */ -static herr_t H5P__ocrt_pipeline_enc(const void *value, void **_pp, size_t *size); +static herr_t H5P__ocrt_pipeline_enc(const void *value, void **_pp, size_t *size, void *udata); static herr_t H5P__ocrt_pipeline_dec(const void **_pp, void *value); static herr_t H5P__ocrt_pipeline_set(hid_t prop_id, const char *name, size_t size, void *value); static herr_t H5P__ocrt_pipeline_get(hid_t prop_id, const char *name, size_t size, void *value); @@ -1459,7 +1459,7 @@ done: *------------------------------------------------------------------------- */ static herr_t -H5P__ocrt_pipeline_enc(const void *value, void **_pp, size_t *size) +H5P__ocrt_pipeline_enc(const void *value, void **_pp, size_t *size, void H5_ATTR_UNUSED *udata) { const H5O_pline_t *pline = (const H5O_pline_t *)value; uint8_t **pp = (uint8_t **)_pp; diff --git a/src/H5Ppkg.h b/src/H5Ppkg.h index 13463ae..2cf1342 100644 --- a/src/H5Ppkg.h +++ b/src/H5Ppkg.h @@ -176,21 +176,21 @@ H5_DLL hid_t H5P__new_plist_of_type(H5P_plist_type_t type); /* Encode/decode routines */ H5_DLL herr_t H5P__encode(const H5P_genplist_t *plist, hbool_t enc_all_prop, - void *buf, size_t *nalloc); + void *buf, size_t *nalloc, hid_t fapl_id); H5_DLL hid_t H5P__decode(const void *buf); -H5_DLL herr_t H5P__encode_hsize_t(const void *value, void **_pp, size_t *size); -H5_DLL herr_t H5P__encode_size_t(const void *value, void **_pp, size_t *size); -H5_DLL herr_t H5P__encode_unsigned(const void *value, void **_pp, size_t *size); -H5_DLL herr_t H5P__encode_uint8_t(const void *value, void **_pp, size_t *size); -H5_DLL herr_t H5P__encode_hbool_t(const void *value, void **_pp, size_t *size); -H5_DLL herr_t H5P__encode_double(const void *value, void **_pp, size_t *size); +H5_DLL herr_t H5P__encode_hsize_t(const void *value, void **_pp, size_t *size, void *udata); +H5_DLL herr_t H5P__encode_size_t(const void *value, void **_pp, size_t *size, void *udata); +H5_DLL herr_t H5P__encode_unsigned(const void *value, void **_pp, size_t *size, void *udata); +H5_DLL herr_t H5P__encode_uint8_t(const void *value, void **_pp, size_t *size, void *udata); +H5_DLL herr_t H5P__encode_hbool_t(const void *value, void **_pp, size_t *size, void *udata); +H5_DLL herr_t H5P__encode_double(const void *value, void **_pp, size_t *size, void *udat); H5_DLL herr_t H5P__decode_hsize_t(const void **_pp, void *value); H5_DLL herr_t H5P__decode_size_t(const void **_pp, void *value); H5_DLL herr_t H5P__decode_unsigned(const void **_pp, void *value); H5_DLL herr_t H5P__decode_uint8_t(const void **_pp, void *value); H5_DLL herr_t H5P__decode_hbool_t(const void **_pp, void *value); H5_DLL herr_t H5P__decode_double(const void **_pp, void *value); -H5_DLL herr_t H5P__encode_coll_md_read_flag_t(const void *value, void **_pp, size_t *size); +H5_DLL herr_t H5P__encode_coll_md_read_flag_t(const void *value, void **_pp, size_t *size, void *udata); H5_DLL herr_t H5P__decode_coll_md_read_flag_t(const void **_pp, void *value); /* Private OCPL routines */ diff --git a/src/H5Pprivate.h b/src/H5Pprivate.h index a468464..08e1738 100644 --- a/src/H5Pprivate.h +++ b/src/H5Pprivate.h @@ -86,6 +86,16 @@ typedef enum H5P_plist_type_t { /* Function pointer for library classes with properties to register */ typedef herr_t (*H5P_reg_prop_func_t)(H5P_genclass_t *pclass); +/* Move encode/decode callback typedefs from H5Ppublic.h: not exposed to user */ +/* Add a parameter to encode callback */ +typedef herr_t (*H5P_prp_encode_func_t)(const void *value, void **buf, size_t *size, void *udata); +typedef herr_t (*H5P_prp_decode_func_t)(const void **buf, void *value); + +/* User data passed to encode callback */ +typedef struct H5P_enc_cb_info_t { + hid_t fapl_id; /* File access property list */ +} H5P_enc_cb_info_t; + /* * Each library property list class has a variable of this type that contains * class variables and methods used to initialize the class. diff --git a/src/H5Ppublic.h b/src/H5Ppublic.h index 493a322..3de4343 100644 --- a/src/H5Ppublic.h +++ b/src/H5Ppublic.h @@ -116,8 +116,6 @@ typedef herr_t (*H5P_prp_cb2_t)(hid_t prop_id, const char *name, size_t size, vo 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 herr_t (*H5P_prp_encode_func_t)(const void *value, void **buf, size_t *size); -typedef herr_t (*H5P_prp_decode_func_t)(const void **buf, void *value); 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); diff --git a/src/H5Pstrcpl.c b/src/H5Pstrcpl.c index fb91356..b84d69b 100644 --- a/src/H5Pstrcpl.c +++ b/src/H5Pstrcpl.c @@ -69,7 +69,7 @@ static herr_t H5P__strcrt_reg_prop(H5P_genclass_t *pclass); /* encode & decode callbacks */ -static herr_t H5P__strcrt_char_encoding_enc(const void *value, void **_pp, size_t *size); +static herr_t H5P__strcrt_char_encoding_enc(const void *value, void **_pp, size_t *size, void *udata); static herr_t H5P__strcrt_char_encoding_dec(const void **_pp, void *value); @@ -227,7 +227,7 @@ done: *------------------------------------------------------------------------- */ static herr_t -H5P__strcrt_char_encoding_enc(const void *value, void **_pp, size_t *size) +H5P__strcrt_char_encoding_enc(const void *value, void **_pp, size_t *size, void H5_ATTR_UNUSED *udata) { const H5T_cset_t *encoding = (const H5T_cset_t *)value; /* Create local alias for values */ uint8_t **pp = (uint8_t **)_pp; diff --git a/src/H5R.c b/src/H5R.c index b000183..b965632 100644 --- a/src/H5R.c +++ b/src/H5R.c @@ -229,11 +229,11 @@ H5R_term_package(void) static herr_t H5R_create(void *_ref, H5G_loc_t *loc, const char *name, H5R_type_t ref_type, H5S_t *space, hid_t dxpl_id) { - H5G_loc_t obj_loc; /* Group hier. location of object */ - H5G_name_t path; /* Object group hier. path */ - H5O_loc_t oloc; /* Object object location */ + H5G_loc_t obj_loc; /* Group hier. location of object */ + H5G_name_t path; /* Object group hier. path */ + H5O_loc_t oloc; /* Object object location */ hbool_t obj_found = FALSE; /* Object location found */ - herr_t ret_value = SUCCEED; /* Return value */ + herr_t ret_value = SUCCEED; /* Return value */ FUNC_ENTER_NOAPI_NOINIT @@ -291,7 +291,7 @@ H5R_create(void *_ref, H5G_loc_t *loc, const char *name, H5R_type_t ref_type, H5 HDmemset(ref, 0, H5R_DSET_REG_REF_BUF_SIZE); /* Get the amount of space required to serialize the selection */ - if((buf_size = H5S_SELECT_SERIAL_SIZE(space)) < 0) + if((buf_size = H5S_SELECT_SERIAL_SIZE(space, loc->oloc->file)) < 0) HGOTO_ERROR(H5E_REFERENCE, H5E_CANTINIT, FAIL, "Invalid amount of space for serializing selection") /* Increase buffer size to allow for the dataset OID */ @@ -307,7 +307,7 @@ H5R_create(void *_ref, H5G_loc_t *loc, const char *name, H5R_type_t ref_type, H5 H5F_addr_encode(loc->oloc->file, &p, obj_loc.oloc->addr); /* Serialize the selection into heap buffer */ - if(H5S_SELECT_SERIALIZE(space, &p) < 0) + if(H5S_SELECT_SERIALIZE(space, &p, loc->oloc->file) < 0) HGOTO_ERROR(H5E_REFERENCE, H5E_CANTCOPY, FAIL, "Unable to serialize selection") /* Save the serialized buffer for later */ diff --git a/src/H5S.c b/src/H5S.c index 9ac40a7..90c2674 100644 --- a/src/H5S.c +++ b/src/H5S.c @@ -1547,7 +1547,7 @@ H5Sencode(hid_t obj_id, void *buf, size_t *nalloc) if (NULL == (dspace = (H5S_t *)H5I_object_verify(obj_id, H5I_DATASPACE))) HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a dataspace") - if(H5S_encode(dspace, (unsigned char **)&buf, nalloc)<0) + if(H5S_encode(dspace, (unsigned char **)&buf, nalloc, H5P_FILE_ACCESS_DEFAULT)<0) HGOTO_ERROR(H5E_DATASPACE, H5E_CANTENCODE, FAIL, "can't encode dataspace") done: @@ -1572,7 +1572,7 @@ done: *------------------------------------------------------------------------- */ herr_t -H5S_encode(H5S_t *obj, unsigned char **p, size_t *nalloc) +H5S_encode(H5S_t *obj, unsigned char **p, size_t *nalloc, hid_t fapl_id) { H5F_t *f = NULL; /* Fake file structure*/ size_t extent_size; /* Size of serialized dataspace extent */ @@ -1583,7 +1583,7 @@ H5S_encode(H5S_t *obj, unsigned char **p, size_t *nalloc) FUNC_ENTER_NOAPI_NOINIT /* Allocate "fake" file structure */ - if(NULL == (f = H5F_fake_alloc((uint8_t)0))) + if(NULL == (f = H5F_fake_alloc((uint8_t)0, fapl_id))) HGOTO_ERROR(H5E_DATASPACE, H5E_CANTALLOC, FAIL, "can't allocate fake file struct") /* Find out the size of buffer needed for extent */ @@ -1591,7 +1591,7 @@ H5S_encode(H5S_t *obj, unsigned char **p, size_t *nalloc) HGOTO_ERROR(H5E_DATASPACE, H5E_BADSIZE, FAIL, "can't find dataspace size") /* Find out the size of buffer needed for selection */ - if((sselect_size = H5S_SELECT_SERIAL_SIZE(obj)) < 0) + if((sselect_size = H5S_SELECT_SERIAL_SIZE(obj, f)) < 0) HGOTO_ERROR(H5E_DATASPACE, H5E_BADSIZE, FAIL, "can't find dataspace selection size") H5_CHECKED_ASSIGN(select_size, size_t, sselect_size, hssize_t); @@ -1621,7 +1621,7 @@ H5S_encode(H5S_t *obj, unsigned char **p, size_t *nalloc) /* Encode the selection part of dataspace. */ *p = pp; - if(H5S_SELECT_SERIALIZE(obj, p) < 0) + if(H5S_SELECT_SERIALIZE(obj, p, f) < 0) HGOTO_ERROR(H5E_DATASPACE, H5E_CANTENCODE, FAIL, "can't encode select space") } /* end else */ @@ -1715,8 +1715,8 @@ H5S_decode(const unsigned char **p) sizeof_size = *pp++; /* Allocate "fake" file structure */ - if(NULL == (f = H5F_fake_alloc(sizeof_size))) - HGOTO_ERROR(H5E_DATASPACE, H5E_CANTALLOC, NULL, "can't allocate fake file struct") + if(NULL == (f = H5F_fake_alloc(sizeof_size, H5P_FILE_ACCESS_DEFAULT))) + HGOTO_ERROR(H5E_DATASPACE, H5E_CANTALLOC, NULL, "can't allocate fake file struct") /* Decode size of extent information */ UINT32DECODE(pp, extent_size); diff --git a/src/H5Sall.c b/src/H5Sall.c index 710727b..98d7319 100644 --- a/src/H5Sall.c +++ b/src/H5Sall.c @@ -36,8 +36,8 @@ static herr_t H5S_all_get_seq_list(const H5S_t *space, unsigned flags, size_t *nseq, size_t *nbytes, hsize_t *off, size_t *len); static herr_t H5S_all_release(H5S_t *space); static htri_t H5S_all_is_valid(const H5S_t *space); -static hssize_t H5S_all_serial_size(const H5S_t *space); -static herr_t H5S_all_serialize(const H5S_t *space, uint8_t **p); +static hssize_t H5S_all_serial_size(const H5S_t *space, H5F_t *f); +static herr_t H5S_all_serialize(const H5S_t *space, uint8_t **p, H5F_t *f); static herr_t H5S_all_deserialize(H5S_t *space, uint32_t version, uint8_t flags, const uint8_t **p); static herr_t H5S_all_bounds(const H5S_t *space, hsize_t *start, hsize_t *end); @@ -56,7 +56,7 @@ static herr_t H5S_all_iter_coords(const H5S_sel_iter_t *iter, hsize_t *coords); static herr_t H5S_all_iter_block(const H5S_sel_iter_t *iter, hsize_t *start, hsize_t *end); static hsize_t H5S_all_iter_nelmts(const H5S_sel_iter_t *iter); static htri_t H5S_all_iter_has_next_block(const H5S_sel_iter_t *iter); -static herr_t H5S_all_iter_next(H5S_sel_iter_t *sel_iter, size_t nelem); +static herr_t H5S_all_iter_next(H5S_sel_iter_t *sel_iter, hsize_t nelem); static herr_t H5S_all_iter_next_block(H5S_sel_iter_t *sel_iter); static herr_t H5S_all_iter_release(H5S_sel_iter_t *sel_iter); @@ -276,7 +276,7 @@ H5S_all_iter_has_next_block (const H5S_sel_iter_t H5_ATTR_UNUSED *iter) USAGE herr_t H5S_all_iter_next(iter, nelem) H5S_sel_iter_t *iter; IN: Pointer to selection iterator - size_t nelem; IN: Number of elements to advance by + hsize_t nelem; IN: Number of elements to advance by RETURNS Non-negative on success/Negative on failure DESCRIPTION @@ -287,7 +287,7 @@ H5S_all_iter_has_next_block (const H5S_sel_iter_t H5_ATTR_UNUSED *iter) REVISION LOG --------------------------------------------------------------------------*/ static herr_t -H5S_all_iter_next(H5S_sel_iter_t *iter, size_t nelem) +H5S_all_iter_next(H5S_sel_iter_t *iter, hsize_t nelem) { FUNC_ENTER_NOAPI_NOINIT_NOERR @@ -465,8 +465,9 @@ H5S_all_is_valid (const H5S_t H5_ATTR_UNUSED *space) Determine the number of bytes needed to store the serialized "all" selection information. USAGE - hssize_t H5S_all_serial_size(space) + hssize_t H5S_all_serial_size(space, f) H5S_t *space; IN: Dataspace pointer to query + H5F_t *f; IN: File pointer RETURNS The number of bytes required on success, negative on an error. DESCRIPTION @@ -478,7 +479,7 @@ H5S_all_is_valid (const H5S_t H5_ATTR_UNUSED *space) REVISION LOG --------------------------------------------------------------------------*/ static hssize_t -H5S_all_serial_size (const H5S_t H5_ATTR_UNUSED *space) +H5S_all_serial_size (const H5S_t H5_ATTR_UNUSED *space, H5F_t H5_ATTR_UNUSED *f) { FUNC_ENTER_NOAPI_NOINIT_NOERR @@ -498,11 +499,12 @@ H5S_all_serial_size (const H5S_t H5_ATTR_UNUSED *space) PURPOSE Serialize the current selection into a user-provided buffer. USAGE - herr_t H5S_all_serialize(space, p) + herr_t H5S_all_serialize(space, p, f) const H5S_t *space; IN: Dataspace with selection to serialize uint8_t **p; OUT: Pointer to buffer to put serialized selection. Will be advanced to end of serialized selection. + H5F_t *f; IN: File pointer RETURNS Non-negative on success/Negative on failure DESCRIPTION @@ -514,7 +516,7 @@ H5S_all_serial_size (const H5S_t H5_ATTR_UNUSED *space) REVISION LOG --------------------------------------------------------------------------*/ static herr_t -H5S_all_serialize(const H5S_t *space, uint8_t **p) +H5S_all_serialize(const H5S_t *space, uint8_t **p, H5F_t H5_ATTR_UNUSED *f) { uint8_t *pp = (*p); /* Local pointer for decoding */ @@ -526,8 +528,8 @@ H5S_all_serialize(const H5S_t *space, uint8_t **p) HDassert(pp); /* Store the preamble information */ - UINT32ENCODE(pp, (uint32_t)H5S_GET_SELECT_TYPE(space)); /* Store the type of selection */ - UINT32ENCODE(pp, (uint32_t)1); /* Store the version number */ + UINT32ENCODE(pp, (uint32_t)H5S_GET_SELECT_TYPE(space)); /* Store the type of selection */ + UINT32ENCODE(pp, (uint32_t)H5S_ALL_VERSION_1); /* Store the version number */ UINT32ENCODE(pp, (uint32_t)0); /* Store the un-used padding */ UINT32ENCODE(pp, (uint32_t)0); /* Store the additional information length */ diff --git a/src/H5Shyper.c b/src/H5Shyper.c index 9263cd8..71bfa51 100644 --- a/src/H5Shyper.c +++ b/src/H5Shyper.c @@ -55,8 +55,8 @@ static herr_t H5S_hyper_get_seq_list(const H5S_t *space, unsigned flags, size_t *nseq, size_t *nbytes, hsize_t *off, size_t *len); static herr_t H5S_hyper_release(H5S_t *space); static htri_t H5S_hyper_is_valid(const H5S_t *space); -static hssize_t H5S_hyper_serial_size(const H5S_t *space); -static herr_t H5S_hyper_serialize(const H5S_t *space, uint8_t **p); +static hssize_t H5S_hyper_serial_size(const H5S_t *space, H5F_t *f); +static herr_t H5S_hyper_serialize(const H5S_t *space, uint8_t **p, H5F_t *f); static herr_t H5S_hyper_deserialize(H5S_t *space, uint32_t version, uint8_t flags, const uint8_t **p); static herr_t H5S_hyper_bounds(const H5S_t *space, hsize_t *start, hsize_t *end); @@ -77,7 +77,7 @@ static herr_t H5S_hyper_iter_coords(const H5S_sel_iter_t *iter, hsize_t *coords) static herr_t H5S_hyper_iter_block(const H5S_sel_iter_t *iter, hsize_t *start, hsize_t *end); static hsize_t H5S_hyper_iter_nelmts(const H5S_sel_iter_t *iter); static htri_t H5S_hyper_iter_has_next_block(const H5S_sel_iter_t *sel_iter); -static herr_t H5S_hyper_iter_next(H5S_sel_iter_t *sel_iter, size_t nelem); +static herr_t H5S_hyper_iter_next(H5S_sel_iter_t *sel_iter, hsize_t nelem); static herr_t H5S_hyper_iter_next_block(H5S_sel_iter_t *sel_iter); static herr_t H5S_hyper_iter_release(H5S_sel_iter_t *sel_iter); @@ -664,7 +664,7 @@ done: *------------------------------------------------------------------------- */ static herr_t -H5S_hyper_iter_next(H5S_sel_iter_t *iter, size_t nelem) +H5S_hyper_iter_next(H5S_sel_iter_t *iter, hsize_t nelem) { unsigned ndims; /* Number of dimensions of dataset */ int fast_dim; /* Rank of the fastest changing dimension for the dataspace */ @@ -714,14 +714,14 @@ H5S_hyper_iter_next(H5S_sel_iter_t *iter, size_t nelem) temp_dim=fast_dim; while(temp_dim>=0) { if(temp_dim==fast_dim) { - size_t actual_elem; /* Actual # of elements advanced on each iteration through loop */ + hsize_t actual_elem; /* Actual # of elements advanced on each iteration through loop */ hsize_t block_elem; /* Number of elements left in a block */ /* Compute the number of elements left in block */ block_elem=tdiminfo[temp_dim].block-iter_offset[temp_dim]; /* Compute the number of actual elements to advance */ - actual_elem=(size_t)MIN(nelem,block_elem); + actual_elem=MIN(nelem,block_elem); /* Move the iterator over as many elements as possible */ iter_offset[temp_dim]+=actual_elem; @@ -785,14 +785,14 @@ H5S_hyper_iter_next(H5S_sel_iter_t *iter, size_t nelem) /* Increment absolute position */ if(curr_dim==fast_dim) { - size_t actual_elem; /* Actual # of elements advanced on each iteration through loop */ + hsize_t actual_elem; /* Actual # of elements advanced on each iteration through loop */ hsize_t span_elem; /* Number of elements left in a span */ /* Compute the number of elements left in block */ span_elem=(curr_span->high-abs_arr[curr_dim])+1; /* Compute the number of actual elements to advance */ - actual_elem=(size_t)MIN(nelem,span_elem); + actual_elem=MIN(nelem,span_elem); /* Move the iterator over as many elements as possible */ abs_arr[curr_dim]+=actual_elem; @@ -1941,13 +1941,129 @@ done: /*-------------------------------------------------------------------------- NAME + H5S_hyper_set_offset_size + PURPOSE + Determine the offset size (4 or 8 bytes) to use for encoding hyperslab selection info + USAGE + hssize_t H5S_hyper_set_offset_size(space, block_count, bounds_end, version, offset_size) + const H5S_t *space: IN: The maximum size of the hyperslab selection info + hsize_t block_count: IN: The number of blocks in the selection + hsize_t bounds_end: IN: The selection high bounds + uint32_t version: IN: The version used for encoding + uint8_t *offset_size: OUT: The offset size + + RETURNS + The offset size + DESCRIPTION + Determine the offset size for encoding hyperslab selection info based on the + the input parameter "version". This is for release 1.10. + GLOBAL VARIABLES + COMMENTS, BUGS, ASSUMPTIONS + EXAMPLES + REVISION LOG +--------------------------------------------------------------------------*/ +static herr_t +H5S_hyper_set_offset_size(const H5S_t *space, hsize_t block_count, hsize_t bounds_end[], uint32_t version, uint8_t *offset_size) +{ + herr_t ret_value = SUCCEED; + + FUNC_ENTER_NOAPI_NOINIT + + switch(version) { + case H5S_HYPER_VERSION_1: + *offset_size = H5S_INFO_SIZE_4; + break; + + case H5S_HYPER_VERSION_2: + *offset_size = H5S_INFO_SIZE_8; + break; + + default: + HGOTO_ERROR(H5E_DATASPACE, H5E_CANTGET, FAIL, "can't determine hyper offset size") + break; + } + +done: + FUNC_LEAVE_NOAPI(ret_value) +} /* H5S_hyper_set_offset_size() */ + + +/*-------------------------------------------------------------------------- + NAME + H5S_hyper_set_version + PURPOSE + Determine the version to use for encoding hyperslab selection info + USAGE + hssize_t H5S_hyper_set_version(space, block_count, bounds_end, f, version) + const H5S_t *space: IN: The dataspace + hsize_t block_count: IN: The number of blocks in the selection + hsize_t bounds_end: IN: The selection high bounds + H5F_t *f: IN: The file pointer + uint32_t *version: OUT: The version to use for encoding + + RETURNS + The version to use + DESCRIPTION + Determine the version to use for encoding hyperslab selection info based + on whether the number of blocks or the selection high bounds exceeds (2^32 - 1). + GLOBAL VARIABLES + COMMENTS, BUGS, ASSUMPTIONS + EXAMPLES + REVISION LOG +--------------------------------------------------------------------------*/ +static herr_t +H5S_hyper_set_version(const H5S_t *space, hsize_t block_count, hsize_t bounds_end[], H5F_t *f, uint32_t *version) +{ + hbool_t count_up_version = FALSE; + hbool_t bound_up_version = FALSE; + unsigned u; + herr_t ret_value = SUCCEED; /* return value */ + + FUNC_ENTER_NOAPI_NOINIT + + /* Use version 2 for unlimited selection */ + if(space->select.sel_info.hslab->unlim_dim >= 0) { + *version = H5S_HYPER_VERSION_2; + HGOTO_DONE(SUCCEED) + } + + *version = H5S_HYPER_VERSION_1; + + /* Determine whether the number of blocks or the high bounds in the selection exceed (2^32 - 1) */ + if(block_count > H5S_UINT32_MAX) + count_up_version = TRUE; + else { + for(u = 0; u < space->extent.rank; u++) + if(bounds_end[u] > H5S_UINT32_MAX) + bound_up_version = TRUE; + } + + if(H5S_hyper_is_regular(space)) { + if((H5F_USE_LATEST_FLAGS(f, H5F_LATEST_DATASPACE_SELECTION) && block_count > 4) || + count_up_version || bound_up_version) + *version = H5S_HYPER_VERSION_2; + } else { /* Fail for irregular hyperslab if exceeds 32 bits */ + if(count_up_version) + HGOTO_ERROR(H5E_DATASPACE, H5E_BADVALUE, FAIL, "The number of blocks in hyperslab selection exceeds 2^32") + else if(bound_up_version) + HGOTO_ERROR(H5E_DATASPACE, H5E_BADVALUE, FAIL, "The end of bounding box in hyperslab selection exceeds 2^32") + } + +done: + FUNC_LEAVE_NOAPI(ret_value) +} /* H5S_hyper_set_version() */ + + +/*-------------------------------------------------------------------------- + NAME H5S_hyper_serial_size PURPOSE Determine the number of bytes needed to store the serialized hyperslab selection information. USAGE - hssize_t H5S_hyper_serial_size(space) + hssize_t H5S_hyper_serial_size(space, H5F_t *f) H5S_t *space; IN: Dataspace pointer to query + H5F_t *f; IN: File pointer RETURNS The number of bytes required on success, negative on an error. DESCRIPTION @@ -1959,52 +2075,72 @@ done: REVISION LOG --------------------------------------------------------------------------*/ static hssize_t -H5S_hyper_serial_size(const H5S_t *space) +H5S_hyper_serial_size(const H5S_t *space, H5F_t *f) { - hsize_t block_count; /* block counter for regular hyperslabs */ - unsigned u; /* Counter */ - hssize_t ret_value = -1; /* return value */ + hsize_t block_count = 0; /* block counter for regular hyperslabs */ + hsize_t bounds_start[H5S_MAX_RANK]; /* Selection bounds */ + hsize_t bounds_end[H5S_MAX_RANK]; /* Selection bounds */ + uint32_t version; /* Version number */ + uint8_t offset_size; /* Offset size */ + unsigned u; /* Local index variable */ + hssize_t ret_value = -1; /* return value */ - FUNC_ENTER_NOAPI_NOINIT_NOERR + FUNC_ENTER_NOAPI_NOINIT HDassert(space); - /* Check for version (right now, an unlimited dimension is the only thing - * that would bump the version) */ - if(space->select.sel_info.hslab->unlim_dim >= 0) + /* Get bounding box for the selection */ + HDmemset(bounds_end, 0, sizeof(bounds_end)); + if(space->select.sel_info.hslab->unlim_dim < 0) { /* ! H5S_UNLIMITED */ + /* Determine the number of blocks */ + if(H5S_hyper_is_regular(space)) { + /* Check each dimension */ + for(block_count = 1, u = 0; u < space->extent.rank; u++) + block_count *= space->select.sel_info.hslab->opt_diminfo[u].count; + } /* end if */ + else + /* Spin through hyperslab spans, adding 8 * rank bytes for each block */ + block_count = H5S_hyper_span_nblocks(space->select.sel_info.hslab->span_lst); + + /* Get bounding box for the selection */ + if(H5S_hyper_bounds(space, bounds_start, bounds_end) < 0) + HGOTO_ERROR(H5E_DATASPACE, H5E_CANTGET, FAIL, "can't get selection bounds") + } + + /* Determine the version */ + if(H5S_hyper_set_version(space, block_count, bounds_end, f, &version) < 0) + HGOTO_ERROR(H5E_DATASPACE, H5E_CANTGET, FAIL, "can't determine hyper version") + + /* Determine the offset size */ + if(H5S_hyper_set_offset_size(space, block_count, bounds_end, version, &offset_size) < 0) + HGOTO_ERROR(H5E_DATASPACE, H5E_CANTGET, FAIL, "can't determine hyper version") + + if(version == H5S_HYPER_VERSION_2) { /* Version 2 */ /* Size required is always: * + + + * + + - * (4 (start/stride/count/block) * * ) = - * 17 + (4 * rank * 8) bytes + * (4 (start/stride/count/block) * * ) = + * 17 + (4 * 8 * rank) bytes */ - ret_value = (hssize_t)17 + ((hssize_t)4 * (hssize_t)space->extent.rank - * (hssize_t)8); - else { + HDassert(offset_size == 8); + ret_value = (hssize_t)17 + ((hssize_t)4 * (hssize_t)8 * (hssize_t)space->extent.rank); + } else { + HDassert(version == H5S_HYPER_VERSION_1); + HDassert(offset_size == 4); /* Version 1 */ /* Basic number of bytes required to serialize hyperslab selection: * + + + - * + + <# of blocks (4 bytes)> - * = 24 bytes + * + + <# of blocks (4 bytes)> + + * (2 (starting/ending offset) * * * <# of blocks) = + * = 24 bytes + (2 * 4 * rank * block_count) */ ret_value = 24; - - /* Check for a "regular" hyperslab selection */ - if(space->select.sel_info.hslab->diminfo_valid) { - /* Check each dimension */ - for(block_count = 1, u = 0; u < space->extent.rank; u++) - block_count *= space->select.sel_info.hslab->opt_diminfo[u].count; - } /* end if */ - else - /* Spin through hyperslab spans, adding 8 * rank bytes for each - * block */ - block_count = H5S_hyper_span_nblocks(space->select.sel_info.hslab->span_lst); - H5_CHECK_OVERFLOW((8 * space->extent.rank * block_count), hsize_t, hssize_t); - ret_value += (hssize_t)(8 * block_count * space->extent.rank); + ret_value += (hssize_t)(8 * space->extent.rank * block_count); } /* end else */ +done: FUNC_LEAVE_NOAPI(ret_value) } /* end H5S_hyper_serial_size() */ @@ -2100,6 +2236,7 @@ H5S_hyper_serialize_helper(const H5S_hyper_span_info_t *spans, uint8_t **p; OUT: Pointer to buffer to put serialized selection. Will be advanced to end of serialized selection. + H5F_t *f; IN: File pointer RETURNS Non-negative on success/Negative on failure DESCRIPTION @@ -2111,15 +2248,15 @@ H5S_hyper_serialize_helper(const H5S_hyper_span_info_t *spans, REVISION LOG --------------------------------------------------------------------------*/ static herr_t -H5S_hyper_serialize(const H5S_t *space, uint8_t **p) +H5S_hyper_serialize(const H5S_t *space, uint8_t **p, H5F_t *f) { const H5S_hyper_dim_t *diminfo; /* Alias for dataspace's diminfo information */ uint8_t *pp = (*p); /* Local pointer for decoding */ hsize_t tmp_count[H5O_LAYOUT_NDIMS]; /* Temporary hyperslab counts */ - hsize_t offset[H5O_LAYOUT_NDIMS]; /* Offset of element in dataspace */ + hsize_t offset[H5O_LAYOUT_NDIMS]; /* Offset of element in dataspace */ hsize_t start[H5O_LAYOUT_NDIMS]; /* Location of start of hyperslab */ hsize_t end[H5O_LAYOUT_NDIMS]; /* Location of end of hyperslab */ - hsize_t temp_off; /* Offset in a given dimension */ + hsize_t temp_off; /* Offset in a given dimension */ uint8_t *lenp; /* pointer to length location for later storage */ uint32_t len = 0; /* number of bytes used */ uint32_t version; /* Version number */ @@ -2127,63 +2264,89 @@ H5S_hyper_serialize(const H5S_t *space, uint8_t **p) hsize_t block_count; /* block counter for regular hyperslabs */ unsigned fast_dim; /* Rank of the fastest changing dimension for the dataspace */ unsigned ndims; /* Rank of the dataspace */ + unsigned u; /* Local counting variable */ int done; /* Whether we are done with the iteration */ + uint8_t offset_size; + hsize_t bounds_start[H5S_MAX_RANK]; + hsize_t bounds_end[H5S_MAX_RANK]; + herr_t ret_value = SUCCEED; /* return value */ - FUNC_ENTER_NOAPI_NOINIT_NOERR + FUNC_ENTER_NOAPI_NOINIT HDassert(space); HDassert(p); HDassert(pp); - /* Calculate version */ - if(space->select.sel_info.hslab->unlim_dim >= 0) { - version = 2; - flags |= H5S_SELECT_FLAG_UNLIM; - } /* end if */ - else - version = 1; + /* Set some convienence values */ + ndims = space->extent.rank; + diminfo = space->select.sel_info.hslab->opt_diminfo; + + if(space->select.sel_info.hslab->unlim_dim < 0) { /* ! H5S_UNLIMITED */ + /* Calculate the # of blocks */ + if(H5S_hyper_is_regular(space)) { + /* Check each dimension */ + for(block_count = 1, u = 0; u < ndims; u++) + block_count *= diminfo[u].count; + } /* end if */ + else + /* Spin through hyperslab spans, adding 8 * rank bytes for each block */ + block_count = H5S_hyper_span_nblocks(space->select.sel_info.hslab->span_lst); + + /* Get bounding box */ + if(H5S_hyper_bounds(space, bounds_start, bounds_end) < 0) + HGOTO_ERROR(H5E_DATASPACE, H5E_CANTGET, FAIL, "can't get selection bounds") + } + + /* Determine the version to use */ + if(H5S_hyper_set_version(space, block_count, bounds_end, f, &version) < 0) + HGOTO_ERROR(H5E_DATASPACE, H5E_CANTGET, FAIL, "can't determine hyper version") + + /* Determine the size of offset info */ + if(H5S_hyper_set_offset_size(space, block_count, bounds_end, version, &offset_size) < 0) + HGOTO_ERROR(H5E_DATASPACE, H5E_CANTGET, FAIL, "can't determine hyper version") + + if(H5S_hyper_is_regular(space) && version == H5S_HYPER_VERSION_2) + flags |= H5S_HYPER_REGULAR; /* Store the preamble information */ UINT32ENCODE(pp, (uint32_t)H5S_GET_SELECT_TYPE(space)); /* Store the type of selection */ UINT32ENCODE(pp, version); /* Store the version number */ - if(version >= 2) - *(pp)++ = flags; /* Store the flags */ + + if(version == 2) + *(pp)++ = flags; /* Store the flags */ else UINT32ENCODE(pp, (uint32_t)0); /* Store the un-used padding */ - lenp = pp; /* keep the pointer to the length location for later */ - pp += 4; /* skip over space for length */ + lenp = pp; /* keep the pointer to the length location for later */ + pp += 4; /* skip over space for length */ + + len += 4; /* ndims */ /* Encode number of dimensions */ - UINT32ENCODE(pp, (uint32_t)space->extent.rank); - len += 4; + UINT32ENCODE(pp, (uint32_t)ndims); - /* If there is an unlimited dimension, only encode opt_unlim_diminfo */ - if(flags & H5S_SELECT_FLAG_UNLIM) { + /* If flags indicates a regular hyperslab or unlimited dimension, encode opt_diminfo */ + if(flags & H5S_HYPER_REGULAR) { unsigned i; HDassert(H5S_UNLIMITED == HSIZE_UNDEF); + HDassert(version == H5S_HYPER_VERSION_2); /* Iterate over dimensions */ + /* Encode start/stride/block/count */ for(i = 0; i < space->extent.rank; i++) { - /* Encode start/stride/block/count */ - UINT64ENCODE(pp, space->select.sel_info.hslab->opt_diminfo[i].start); - UINT64ENCODE(pp, space->select.sel_info.hslab->opt_diminfo[i].stride); - UINT64ENCODE(pp, space->select.sel_info.hslab->opt_diminfo[i].count); - UINT64ENCODE(pp, space->select.sel_info.hslab->opt_diminfo[i].block); + UINT64ENCODE(pp, diminfo[i].start); + UINT64ENCODE(pp, diminfo[i].stride); + UINT64ENCODE(pp, diminfo[i].count); + UINT64ENCODE(pp, diminfo[i].block); } /* end for */ + len += (4 * space->extent.rank * 8); } /* end if */ /* Check for a "regular" hyperslab selection */ - else if(space->select.sel_info.hslab->diminfo_valid) { - unsigned u; /* Local counting variable */ + else if(H5S_hyper_is_regular(space)) { + HDassert(version == H5S_HYPER_VERSION_1); /* Set some convienence values */ - ndims = space->extent.rank; fast_dim = ndims - 1; - diminfo=space->select.sel_info.hslab->opt_diminfo; - - /* Check each dimension */ - for(block_count = 1, u = 0; u < ndims; u++) - block_count *= diminfo[u].count; /* Encode number of hyperslabs */ H5_CHECK_OVERFLOW(block_count, hsize_t, uint32_t); @@ -2262,15 +2425,16 @@ H5S_hyper_serialize(const H5S_t *space, uint8_t **p) } /* end while */ } /* end if */ else { + HDassert(version == H5S_HYPER_VERSION_1); /* Encode number of hyperslabs */ - block_count = H5S_hyper_span_nblocks(space->select.sel_info.hslab->span_lst); H5_CHECK_OVERFLOW(block_count, hsize_t, uint32_t); UINT32ENCODE(pp, (uint32_t)block_count); - len+=4; + + len+=4; /* block_count */ /* Add 8 bytes times the rank for each hyperslab selected */ - H5_CHECK_OVERFLOW((8 * space->extent.rank * block_count), hsize_t, size_t); - len += (uint32_t)(8 * space->extent.rank * block_count); + H5_CHECK_OVERFLOW((8 * ndims * block_count), hsize_t, size_t); + len += (uint32_t)(8 * ndims * block_count); /* Encode each hyperslab in selection */ H5S_hyper_serialize_helper(space->select.sel_info.hslab->span_lst, start, end, (hsize_t)0, &pp); @@ -2282,7 +2446,8 @@ H5S_hyper_serialize(const H5S_t *space, uint8_t **p) /* Update encoding pointer */ *p = pp; - FUNC_LEAVE_NOAPI(SUCCEED) +done: + FUNC_LEAVE_NOAPI(ret_value) } /* H5S_hyper_serialize() */ @@ -2316,7 +2481,7 @@ H5S_hyper_deserialize(H5S_t *space, uint32_t H5_ATTR_UNUSED version, uint8_t fla { unsigned rank; /* rank of points */ const uint8_t *pp = (*p); /* Local pointer for decoding */ - size_t num_elem=0; /* number of elements in selection */ + hsize_t num_elem=0; /* number of elements in selection */ hsize_t start[H5O_LAYOUT_NDIMS]; /* hyperslab start information */ hsize_t end[H5O_LAYOUT_NDIMS]; /* hyperslab end information */ hsize_t stride[H5O_LAYOUT_NDIMS]; /* hyperslab stride information */ @@ -2341,14 +2506,13 @@ H5S_hyper_deserialize(H5S_t *space, uint32_t H5_ATTR_UNUSED version, uint8_t fla /* (The header and rank have already beed decoded) */ rank = space->extent.rank; /* Retrieve rank from space */ - /* If there is an unlimited dimension, only encode opt_unlim_diminfo */ - if(flags & H5S_SELECT_FLAG_UNLIM) { + if(flags & H5S_HYPER_REGULAR) { HDassert(H5S_UNLIMITED == HSIZE_UNDEF); HDassert(version >= 2); /* Iterate over dimensions */ + /* Decode start/stride/block/count */ for(i = 0; i < space->extent.rank; i++) { - /* Decode start/stride/block/count */ UINT64DECODE(pp, start[i]); UINT64DECODE(pp, stride[i]); UINT64DECODE(pp, count[i]); @@ -2360,7 +2524,7 @@ H5S_hyper_deserialize(H5S_t *space, uint32_t H5_ATTR_UNUSED version, uint8_t fla HGOTO_ERROR(H5E_DATASPACE, H5E_CANTDELETE, FAIL, "can't change selection") } /* end if */ else { - /* decode the number of points */ + /* decode the number of blocks */ UINT32DECODE(pp,num_elem); /* Set the count & stride for all blocks */ @@ -2371,11 +2535,10 @@ H5S_hyper_deserialize(H5S_t *space, uint32_t H5_ATTR_UNUSED version, uint8_t fla /* Retrieve the coordinates from the buffer */ for(i = 0; i < num_elem; i++) { - /* Decode the starting points */ + + /* Decode the starting and ending points */ for(tstart=start,j=0; jextent.rank; u++) + if(bounds_end[u] > H5S_UINT32_MAX) { + exceed = TRUE; + break; + } + + if(space->select.num_elem > H5S_UINT32_MAX) + HGOTO_ERROR(H5E_DATASPACE, H5E_BADVALUE, FAIL, "The number of points in point selection exceeds 2^32") + else if(exceed) + HGOTO_ERROR(H5E_DATASPACE, H5E_BADVALUE, FAIL, "The end of bounding box in point selection exceeds 2^32") + +done: + FUNC_LEAVE_NOAPI(ret_value) +} /* H5S_point_set_version() */ + + +/*-------------------------------------------------------------------------- + NAME + H5S_point_set_info_size + PURPOSE + Determine the size of point info to use for encoding selection info + USAGE + hssize_t H5S_point_set_info_size(space, bounds_end, version, point_size) + const H5S_t *space: IN: Dataspace ID of selection to query + hsize_t bounds_end[]: IN: The selection high bounds + uint32_t version: IN: The version used for encoding + uint8_t *point_size: OUT: The size of point info + RETURNS + The size of the points selection info + DESCRIPTION + Determine the size for encoding points selection info: + For 1.10, return 4 + + GLOBAL VARIABLES + COMMENTS, BUGS, ASSUMPTIONS + EXAMPLES + REVISION LOG +--------------------------------------------------------------------------*/ +static herr_t +H5S_point_set_info_size(const H5S_t *space, hsize_t H5_ATTR_UNUSED bounds_end[], uint32_t H5_ATTR_UNUSED version, uint8_t H5_ATTR_UNUSED *point_size) +{ + hsize_t max_size = 0; + unsigned u; + + FUNC_ENTER_NOAPI_NOINIT_NOERR + + HDassert(version == H5S_POINT_VERSION_1); + + *point_size = H5S_INFO_SIZE_4; + + FUNC_LEAVE_NOAPI(SUCCEED) +} /* H5S_point_set_info_size() */ + /*-------------------------------------------------------------------------- NAME @@ -760,8 +847,9 @@ done: Determine the number of bytes needed to store the serialized point selection information. USAGE - hssize_t H5S_point_serial_size(space) + hssize_t H5S_point_serial_size(space, f) H5S_t *space; IN: Dataspace pointer to query + H5F_t *f; IN: File pointer RETURNS The number of bytes required on success, negative on an error. DESCRIPTION @@ -773,29 +861,54 @@ done: REVISION LOG --------------------------------------------------------------------------*/ static hssize_t -H5S_point_serial_size (const H5S_t *space) +H5S_point_serial_size (const H5S_t *space, H5F_t *f) { H5S_pnt_node_t *curr; /* Point information nodes */ + hsize_t bounds_start[H5S_MAX_RANK]; + hsize_t bounds_end[H5S_MAX_RANK]; + uint32_t version; /* Version number */ + uint8_t point_size; /* Size of point info */ hssize_t ret_value = -1; /* Return value */ - FUNC_ENTER_NOAPI_NOINIT_NOERR + FUNC_ENTER_NOAPI_NOINIT HDassert(space); - /* Basic number of bytes required to serialize point selection: + /* Get bounding box for the selection */ + HDmemset(bounds_end, 0, sizeof(bounds_end)); + if(H5S_point_bounds(space, bounds_start, bounds_end) < 0) + HGOTO_ERROR(H5E_DATASPACE, H5E_CANTGET, FAIL, "can't get selection bounds") + + /* Determine the version */ + if(H5S_point_set_version(space, bounds_end, f, &version) < 0) + HGOTO_ERROR(H5E_DATASPACE, H5E_CANTGET, FAIL, "can't determine hyper version") + + /* Determine the size of point info */ + if(H5S_point_set_info_size(space, bounds_end, version, &point_size) < 0) + HGOTO_ERROR(H5E_DATASPACE, H5E_CANTGET, FAIL, "can't determine hyper version") + + HDassert(version == H5S_POINT_VERSION_1); + HDassert(point_size == H5S_INFO_SIZE_4); + + /* Basic number of bytes required to serialize point selection: */ + /* * + + + - * + + <# of points (4 bytes)> = 24 bytes + * + */ - ret_value=24; + ret_value=20; + + /* */ + ret_value += point_size; /* Count points in selection */ curr=space->select.sel_info.pnt_lst->head; while(curr!=NULL) { - /* Add 4 bytes times the rank for each element selected */ - ret_value+=4*space->extent.rank; - curr=curr->next; + /* Add bytes times the rank for each element selected */ + ret_value += point_size * space->extent.rank; + curr = curr->next; } /* end while */ +done: FUNC_LEAVE_NOAPI(ret_value) } /* end H5S_point_serial_size() */ @@ -806,11 +919,12 @@ H5S_point_serial_size (const H5S_t *space) PURPOSE Serialize the current selection into a user-provided buffer. USAGE - herr_t H5S_point_serialize(space, p) + herr_t H5S_point_serialize(space, p, f) const H5S_t *space; IN: Dataspace with selection to serialize uint8_t **p; OUT: Pointer to buffer to put serialized selection. Will be advanced to end of serialized selection. + H5F_t *f; IN: File pointer RETURNS Non-negative on success/Negative on failure DESCRIPTION @@ -822,41 +936,63 @@ H5S_point_serial_size (const H5S_t *space) REVISION LOG --------------------------------------------------------------------------*/ static herr_t -H5S_point_serialize (const H5S_t *space, uint8_t **p) +H5S_point_serialize (const H5S_t *space, uint8_t **p, H5F_t *f) { H5S_pnt_node_t *curr; /* Point information nodes */ uint8_t *pp = (*p); /* Local pointer for decoding */ uint8_t *lenp; /* pointer to length location for later storage */ uint32_t len=0; /* number of bytes used */ unsigned u; /* local counting variable */ + uint32_t version; /* Version number */ + uint8_t point_size; /* Size of point info */ + hsize_t bounds_start[H5S_MAX_RANK]; + hsize_t bounds_end[H5S_MAX_RANK]; + herr_t ret_value = SUCCEED; /* Return value */ - FUNC_ENTER_NOAPI_NOINIT_NOERR + FUNC_ENTER_NOAPI_NOINIT /* Check args */ HDassert(space); HDassert(p); HDassert(pp); + /* Get bounding box for the selection */ + HDmemset(bounds_end, 0, sizeof(bounds_end)); + if(H5S_point_bounds(space, bounds_start, bounds_end) < 0) + HGOTO_ERROR(H5E_DATASPACE, H5E_CANTGET, FAIL, "can't get selection bounds") + + /* Determine the version */ + if(H5S_point_set_version(space, bounds_end, f, &version) < 0) + HGOTO_ERROR(H5E_DATASPACE, H5E_CANTGET, FAIL, "can't determine hyper version") + + /* Determine the size of point info */ + if(H5S_point_set_info_size(space, bounds_end, version, &point_size) < 0) + HGOTO_ERROR(H5E_DATASPACE, H5E_CANTGET, FAIL, "can't determine hyper version") + + HDassert(point_size == H5S_INFO_SIZE_4); + HDassert(version == H5S_POINT_VERSION_1); + /* Store the preamble information */ UINT32ENCODE(pp, (uint32_t)H5S_GET_SELECT_TYPE(space)); /* Store the type of selection */ - UINT32ENCODE(pp, (uint32_t)1); /* Store the version number */ + UINT32ENCODE(pp, version); /* Store the version number */ + UINT32ENCODE(pp, (uint32_t)0); /* Store the un-used padding */ - lenp = pp; /* Keep the pointer to the length location for later */ - pp += 4; /* Skip over space for length */ + lenp = pp; /* Keep the pointer to the length location for later */ + pp += 4; /* Skip over space for length */ + len += 8; /* Add in advance # of bytes for num of dimensions and num elements */ /* Encode number of dimensions */ UINT32ENCODE(pp, (uint32_t)space->extent.rank); - len+=4; + /* Encode number of elements */ UINT32ENCODE(pp, (uint32_t)space->select.num_elem); - len+=4; /* Encode each point in selection */ curr=space->select.sel_info.pnt_lst->head; while(curr!=NULL) { /* Add 4 bytes times the rank for each element selected */ - len+=4*space->extent.rank; + len += 4 * space->extent.rank; /* Encode each point */ for(u=0; uextent.rank; u++) @@ -871,7 +1007,8 @@ H5S_point_serialize (const H5S_t *space, uint8_t **p) /* Update encoding pointer */ *p = pp; - FUNC_LEAVE_NOAPI(SUCCEED) +done: + FUNC_LEAVE_NOAPI(ret_value) } /* H5S_point_serialize() */ diff --git a/src/H5Sprivate.h b/src/H5Sprivate.h index 8934726..11fb7fe 100644 --- a/src/H5Sprivate.h +++ b/src/H5Sprivate.h @@ -147,8 +147,8 @@ typedef struct H5S_sel_iter_op_t { #define H5S_SELECT_GET_SEQ_LIST(S,FLAGS,ITER,MAXSEQ,MAXBYTES,NSEQ,NBYTES,OFF,LEN) ((*(S)->select.type->get_seq_list)(S,FLAGS,ITER,MAXSEQ,MAXBYTES,NSEQ,NBYTES,OFF,LEN)) #define H5S_SELECT_VALID(S) ((*(S)->select.type->is_valid)(S)) #define H5S_SELECT_RELEASE(S) ((*(S)->select.type->release)(S)) -#define H5S_SELECT_SERIAL_SIZE(S) ((*(S)->select.type->serial_size)(S)) -#define H5S_SELECT_SERIALIZE(S,BUF) ((*(S)->select.type->serialize)(S,BUF)) +#define H5S_SELECT_SERIAL_SIZE(S,F) ((*(S)->select.type->serial_size)(S,F)) +#define H5S_SELECT_SERIALIZE(S,BUF,F) ((*(S)->select.type->serialize)(S,BUF,F)) #define H5S_SELECT_BOUNDS(S,START,END) ((*(S)->select.type->bounds)(S,START,END)) #define H5S_SELECT_OFFSET(S, OFFSET) ((*(S)->select.type->offset)(S, OFFSET)) #define H5S_SELECT_IS_CONTIGUOUS(S) ((*(S)->select.type->is_contiguous)(S)) @@ -173,8 +173,8 @@ typedef struct H5S_sel_iter_op_t { #define H5S_SELECT_GET_SEQ_LIST(S,FLAGS,ITER,MAXSEQ,MAXBYTES,NSEQ,NBYTES,OFF,LEN) (H5S_select_get_seq_list(S,FLAGS,ITER,MAXSEQ,MAXBYTES,NSEQ,NBYTES,OFF,LEN)) #define H5S_SELECT_VALID(S) (H5S_select_valid(S)) #define H5S_SELECT_RELEASE(S) (H5S_select_release(S)) -#define H5S_SELECT_SERIAL_SIZE(S) (H5S_select_serial_size(S)) -#define H5S_SELECT_SERIALIZE(S,BUF) (H5S_select_serialize(S,BUF)) +#define H5S_SELECT_SERIAL_SIZE(S,F) (H5S_select_serial_size(S,F)) +#define H5S_SELECT_SERIALIZE(S,BUF,F) (H5S_select_serialize(S,BUF,F)) #define H5S_SELECT_BOUNDS(S,START,END) (H5S_get_select_bounds(S,START,END)) #define H5S_SELECT_OFFSET(S, OFFSET) (H5S_get_select_offset(S, OFFSET)) #define H5S_SELECT_IS_CONTIGUOUS(S) (H5S_select_is_contiguous(S)) @@ -218,7 +218,7 @@ H5_DLL H5S_t *H5S_create(H5S_class_t type); H5_DLL H5S_t *H5S_create_simple(unsigned rank, const hsize_t dims[/*rank*/], const hsize_t maxdims[/*rank*/]); H5_DLL herr_t H5S_set_latest_version(H5S_t *ds); -H5_DLL herr_t H5S_encode(H5S_t *obj, unsigned char **p, size_t *nalloc); +H5_DLL herr_t H5S_encode(H5S_t *obj, unsigned char **p, size_t *nalloc, hid_t fapl_id); H5_DLL H5S_t *H5S_decode(const unsigned char **p); H5_DLL herr_t H5S_debug(H5F_t *f, hid_t dxpl_id, const void *_mesg, FILE *stream, int indent, int fwidth); @@ -256,8 +256,8 @@ H5_DLL herr_t H5S_select_release(H5S_t *ds); H5_DLL herr_t H5S_select_get_seq_list(const H5S_t *space, unsigned flags, H5S_sel_iter_t *iter, size_t maxseq, size_t maxbytes, size_t *nseq, size_t *nbytes, hsize_t *off, size_t *len); -H5_DLL hssize_t H5S_select_serial_size(const H5S_t *space); -H5_DLL herr_t H5S_select_serialize(const H5S_t *space, uint8_t **p); +H5_DLL hssize_t H5S_select_serial_size(const H5S_t *space, H5F_t *f); +H5_DLL herr_t H5S_select_serialize(const H5S_t *space, uint8_t **p, H5F_t *f); H5_DLL htri_t H5S_select_is_contiguous(const H5S_t *space); H5_DLL htri_t H5S_select_is_single(const H5S_t *space); H5_DLL htri_t H5S_select_is_regular(const H5S_t *space); diff --git a/src/H5Sselect.c b/src/H5Sselect.c index c34e1cc..72bdfb7 100644 --- a/src/H5Sselect.c +++ b/src/H5Sselect.c @@ -225,7 +225,7 @@ H5S_select_get_seq_list(const H5S_t *space, unsigned flags, *------------------------------------------------------------------------- */ hssize_t -H5S_select_serial_size(const H5S_t *space) +H5S_select_serial_size(const H5S_t *space, H5F_t *f) { hssize_t ret_value = -1; /* Return value */ @@ -234,7 +234,7 @@ H5S_select_serial_size(const H5S_t *space) HDassert(space); /* Call the selection type's serial_size function */ - ret_value=(*space->select.type->serial_size)(space); + ret_value=(*space->select.type->serial_size)(space, f); FUNC_LEAVE_NOAPI(ret_value) } /* end H5S_select_serial_size() */ @@ -251,6 +251,7 @@ H5S_select_serial_size(const H5S_t *space) uint8_t **p; OUT: Pointer to buffer to put serialized selection. Will be advanced to end of serialized selection. + H5F_t *f; IN: File pointer RETURNS Non-negative on success/Negative on failure DESCRIPTION @@ -265,7 +266,7 @@ H5S_select_serial_size(const H5S_t *space) REVISION LOG --------------------------------------------------------------------------*/ herr_t -H5S_select_serialize(const H5S_t *space, uint8_t **p) +H5S_select_serialize(const H5S_t *space, uint8_t **p, H5F_t *f) { herr_t ret_value=SUCCEED; /* Return value */ @@ -275,7 +276,7 @@ H5S_select_serialize(const H5S_t *space, uint8_t **p) HDassert(p); /* Call the selection type's serialize function */ - ret_value=(*space->select.type->serialize)(space,p); + ret_value=(*space->select.type->serialize)(space,p,f); FUNC_LEAVE_NOAPI(ret_value) } /* end H5S_select_serialize() */ diff --git a/src/H5T.c b/src/H5T.c index a525cd5..7fba30a 100644 --- a/src/H5T.c +++ b/src/H5T.c @@ -2858,7 +2858,7 @@ H5T_encode(H5T_t *obj, unsigned char *buf, size_t *nalloc) FUNC_ENTER_NOAPI_NOINIT /* Allocate "fake" file structure */ - if(NULL == (f = H5F_fake_alloc((uint8_t)0))) + if(NULL == (f = H5F_fake_alloc((uint8_t)0, H5P_FILE_ACCESS_DEFAULT))) HGOTO_ERROR(H5E_DATATYPE, H5E_CANTALLOC, FAIL, "can't allocate fake file struct") /* Find out the size of buffer needed */ @@ -2913,7 +2913,7 @@ H5T_decode(const unsigned char *buf) FUNC_ENTER_NOAPI_NOINIT /* Allocate "fake" file structure */ - if(NULL == (f = H5F_fake_alloc((uint8_t)0))) + if(NULL == (f = H5F_fake_alloc((uint8_t)0, H5P_FILE_ACCESS_DEFAULT))) HGOTO_ERROR(H5E_DATATYPE, H5E_CANTALLOC, NULL, "can't allocate fake file struct") /* Decode the type of the information */ diff --git a/test/th5s.c b/test/th5s.c index c63320a..99e40d5 100644 --- a/test/th5s.c +++ b/test/th5s.c @@ -79,6 +79,10 @@ struct space4_struct { char c2; } space4_data={'v',987123,-3.14F,'g'}; /* Test data for 4th dataspace */ + +/* Used in test_h5s_encode_irregular_exceed32() and test_h5s_encode_points_exceed32() */ +#define POWER32 4294967296 /* 2^32 */ + /**************************************************************** ** ** test_h5s_basic(): Test basic H5S (dataspace) code. @@ -2366,6 +2370,188 @@ test_h5s_bug1(void) /**************************************************************** ** +** test_h5s_encode_regular_exceed32(): +** Test to verify HDFFV-9947 is fixed. +** Verify that selection encoding that exceeds (2^32 - 1) +** (32 bit integer limit) is correctly encoded. +** +** Note: See encoding changes for 1.10 in +** "RFC: H5Sencode/H5Sdecode Format Change". +** +****************************************************************/ +static void +test_h5s_encode_regular_exceed32(void) +{ + hid_t sid; /* Dataspace ID */ + hid_t decoded_sid; /* Dataspace ID from H5Sdecode */ + size_t sbuf_size=0; /* Buffer size for H5Sencode */ + unsigned char *sbuf=NULL; /* Buffer for H5Sencode */ + hssize_t num; /* Number of elements in the dataspace selection */ + hssize_t decoded_num; /* Number of elements in the dataspace selection from H5Sdeocde */ + hsize_t numparticles = 8388608; + unsigned num_dsets = 513; + hsize_t total_particles = numparticles * num_dsets; + hsize_t vdsdims[1] = {total_particles}; + hsize_t start, count, block; + herr_t ret; /* Generic return value */ + + MESSAGE(5, ("Testing Dataspace encoding regular hyperslabs that exceeds 32 bits\n")); + + /*------------------------------------------------------------------------- + * Test encoding and decoding of simple dataspace and hyperslab selection. + *------------------------------------------------------------------------- + */ + sid = H5Screate_simple(1, vdsdims, NULL); + CHECK(sid, FAIL, "H5Screate_simple"); + + start = 0; + block = total_particles; + count = 1; + + ret = H5Sselect_hyperslab(sid, H5S_SELECT_SET, &start, NULL, &count, &block); + CHECK(ret, FAIL, "H5Sselect_hyperslab"); + + /* Encode simple data space in a buffer */ + ret = H5Sencode(sid, NULL, &sbuf_size); + CHECK(ret, FAIL, "H5Sencode2"); + + if(sbuf_size > 0) { + sbuf = (unsigned char*)HDcalloc((size_t)1, sbuf_size); + CHECK(sbuf, NULL, "H5Sencode"); + } + + /* The version used for encoding should be 2 */ + ret = H5Sencode(sid, sbuf, &sbuf_size); + CHECK(ret, FAIL, "H5Sencode"); + VERIFY((uint32_t)sbuf[35], 2, "Version for regular hyperslab that exceeds 32 bits"); + + /* Decode from the dataspace buffer and return an object handle */ + decoded_sid = H5Sdecode(sbuf); + CHECK(decoded_sid, FAIL, "H5Sdecode"); + + /* Verify the decoded dataspace */ + decoded_num = H5Sget_select_npoints(decoded_sid); + CHECK(decoded_num, FAIL, "H5Sget_select_npoints"); + + num = H5Sget_select_npoints(sid); + CHECK(num, FAIL, "H5Sget_select_npoints"); + + VERIFY(num, decoded_num, "H5Sget_select_npoints"); + + ret = H5Sclose(decoded_sid); + CHECK(ret, FAIL, "H5Sclose"); + + if(sbuf) + HDfree(sbuf); + + ret = H5Sclose(sid); + CHECK(ret, FAIL, "H5Sclose"); + +} /* test_h5s_encode_regular_exceed32() */ + +/**************************************************************** +** +** test_h5s_encode_irregular_exceed32(): +** This test verifies that 1.10 H5Sencode() will fail for +** irregular hyperslab selection that exceeds 32 bits. +** +** Note: See encoding changes for 1.10 in +** "RFC: H5Sencode/H5Sdecode Format Change". +** +****************************************************************/ +static void +test_h5s_encode_irregular_exceed32(void) +{ + hid_t sid; /* Dataspace ID */ + hsize_t numparticles = 8388608; + unsigned num_dsets = 513; + hsize_t total_particles = numparticles * num_dsets; + hsize_t vdsdims[1] = {total_particles}; /* Dimension size */ + hsize_t start, stride, count, block; /* Selection info */ + size_t sbuf_size=0; /* Buffer size for H5Sencode */ + htri_t is_regular; /* Is this a regular hyperslab */ + herr_t ret; /* Generic return value */ + + /* Output message about test being performed */ + MESSAGE(5, ("Testing Dataspace encoding irregular hyperslab that exceeds 32 bits\n")); + + sid = H5Screate_simple(1, vdsdims, NULL); + CHECK(sid, FAIL, "H5Screate_simple"); + + start = 0; + block = total_particles; + count = 1; + + ret = H5Sselect_hyperslab(sid, H5S_SELECT_SET, &start, NULL, &count, &block); + CHECK(ret, FAIL, "H5Sselect_hyperslab"); + + start = 8; + count = 5; + block = 2; + stride = POWER32; + + ret = H5Sselect_hyperslab(sid, H5S_SELECT_OR, &start, &stride, &count, &block); + CHECK(ret, FAIL, "H5Sselect_hyperslab"); + + /* Should be irregular hyperslab */ + is_regular = H5Sis_regular_hyperslab(sid); + VERIFY(is_regular, FALSE, "H5Sis_regular_hyperslab"); + + /* Should fail because selection exceeds 32 bits */ + ret = H5Sencode(sid, NULL, &sbuf_size); + VERIFY(ret, FAIL, "H5Sencode"); + + ret = H5Sclose(sid); + CHECK(ret, FAIL, "H5Sclose"); + +} /* test_h5s_encode_irregular_exceed32() */ + +/**************************************************************** +** +** test_h5s_encode_points_exceed32(): +** This test verifies that 1.10 H5Sencode() will fail for +** point selection that exceeds 32 bits. +** +** Note: See encoding changes for 1.10 in +** "RFC: H5Sencode/H5Sdecode Format Change". +** +****************************************************************/ +static void +test_h5s_encode_points_exceed32(void) +{ + hid_t sid; /* Dataspace ID */ + hsize_t numparticles = 8388608; + unsigned num_dsets = 513; + hsize_t total_particles = numparticles * num_dsets; + hsize_t vdsdims[1] = {total_particles}; /* Dimension size */ + hsize_t coord[4]; /* The point coordinates */ + size_t sbuf_size=0; /* Buffer size for H5Sencode */ + herr_t ret; /* Generic return value */ + + /* Output message about test being performed */ + MESSAGE(5, ("Testing Dataspace encoding points selection that exceeds 32 bits\n")); + + sid = H5Screate_simple(1, vdsdims, NULL); + CHECK(sid, FAIL, "H5Screate_simple"); + + coord[0] = 5; + coord[1] = 15; + coord[2] = POWER32; + coord[3] = 19; + ret = H5Sselect_elements(sid, H5S_SELECT_SET, (size_t)4, coord); + CHECK(ret, FAIL, "H5Sselect_elements"); + + /* Should fail because selection exceeds 32 bits */ + ret = H5Sencode(sid, NULL, &sbuf_size); + VERIFY(ret, FAIL, "H5Sencode"); + + ret = H5Sclose(sid); + CHECK(ret, FAIL, "H5Sclose"); + +} /* test_h5s_encode_points_exceed32() */ + +/**************************************************************** +** ** test_h5s(): Main H5S (dataspace) testing routine. ** ****************************************************************/ @@ -2379,8 +2565,13 @@ test_h5s(void) test_h5s_null(); /* Test Null dataspace H5S code */ test_h5s_zero_dim(); /* Test dataspace with zero dimension size */ test_h5s_encode(); /* Test encoding and decoding */ + + test_h5s_encode_regular_exceed32(); /* Test encoding regular hyperslab selection that exceeds 32 bits */ + test_h5s_encode_irregular_exceed32(); /* Testing encoding irregular hyperslab selection that exceeds 32 bits */ + test_h5s_encode_points_exceed32(); /* Testing encoding point selection that exceeds 32 bits */ + test_h5s_scalar_write(); /* Test scalar H5S writing code */ - test_h5s_scalar_read(); /* Test scalar H5S reading code */ + test_h5s_scalar_read(); /* Test scalar H5S reading code */ test_h5s_compound_scalar_write(); /* Test compound datatype scalar H5S writing code */ test_h5s_compound_scalar_read(); /* Test compound datatype scalar H5S reading code */ diff --git a/test/trefer.c b/test/trefer.c index 05c0130..6ab649e 100644 --- a/test/trefer.c +++ b/test/trefer.c @@ -492,46 +492,70 @@ test_reference_obj(void) ** test_reference_region(): Test basic H5R (reference) object reference code. ** Tests references to various kinds of objects ** +** Add test to verify that dataspace selection exceeding +** 32 bits is correctly encoded and referenced. +** +** Note: The "new_format" parameter is added to create the file with +** either the old or latest format. This is done so that the +** 1.10 encoding of dataspace selection for H5R_DATASET_REGION +** in the internal library will be done according to the file +** format setting in fapl. +** See encoding changes for 1.10 in +** "RFC: H5Sencode/H5Sdecode Format Change". +** ****************************************************************/ static void -test_reference_region(void) +test_reference_region(hbool_t new_format) { - hid_t fid1; /* HDF5 File IDs */ - hid_t dset1, /* Dataset ID */ - dset2; /* Dereferenced dataset ID */ - hid_t sid1, /* Dataspace ID #1 */ - sid2; /* Dataspace ID #2 */ - hid_t dapl_id; /* Dataset access property list */ - hsize_t dims1[] = {SPACE1_DIM1}, - dims2[] = {SPACE2_DIM1, SPACE2_DIM2}; - hsize_t start[SPACE2_RANK]; /* Starting location of hyperslab */ - hsize_t stride[SPACE2_RANK]; /* Stride of hyperslab */ - hsize_t count[SPACE2_RANK]; /* Element count of hyperslab */ - hsize_t block[SPACE2_RANK]; /* Block size of hyperslab */ - hsize_t coord1[POINT1_NPOINTS][SPACE2_RANK]; /* Coordinates for point selection */ - hsize_t * coords; /* Coordinate buffer */ - hsize_t low[SPACE2_RANK]; /* Selection bounds */ - hsize_t high[SPACE2_RANK]; /* Selection bounds */ - hdset_reg_ref_t *wbuf, /* buffer to write to disk */ - *rbuf; /* buffer read from disk */ - hdset_reg_ref_t nvrbuf[3]={{0},{101},{255}}; /* buffer with non-valid refs */ - uint8_t *dwbuf, /* Buffer for writing numeric data to disk */ - *drbuf; /* Buffer for reading numeric data from disk */ - uint8_t *tu8; /* Temporary pointer to uint8 data */ - H5O_type_t obj_type; /* Type of object */ - int i, j; /* counting variables */ - 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 */ - 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 */ - hdset_reg_ref_t wdata_NA[1], /* Write buffer */ - rdata_NA[1]; /* Read buffer */ + hid_t fid1; /* HDF5 File IDs */ + hid_t fapl = -1; /* File access property list */ + hid_t dset1, /* Dataset ID */ + dset2, /* Dereferenced dataset ID */ + dset3; /* Dereferenced dataset ID */ + hid_t sid1, /* Dataspace ID #1 */ + sid2, /* Dataspace ID #2 */ + sid3; /* Dataspace ID #3 */ + hid_t dapl_id; /* Dataset access property list */ + hsize_t dims1[] = {SPACE1_DIM1}, + dims2[] = {SPACE2_DIM1, SPACE2_DIM2}; + hsize_t start[SPACE2_RANK]; /* Starting location of hyperslab */ + hsize_t stride[SPACE2_RANK]; /* Stride of hyperslab */ + hsize_t count[SPACE2_RANK]; /* Element count of hyperslab */ + hsize_t block[SPACE2_RANK]; /* Block size of hyperslab */ + hsize_t coord1[POINT1_NPOINTS][SPACE2_RANK]; /* Coordinates for point selection */ + hsize_t *coords; /* Coordinate buffer */ + hsize_t low[SPACE2_RANK]; /* Selection bounds */ + hsize_t high[SPACE2_RANK]; /* Selection bounds */ + hdset_reg_ref_t *wbuf, /* buffer to write to disk */ + *rbuf; /* buffer read from disk */ + hdset_reg_ref_t nvrbuf[3]={{0},{101},{255}}; /* buffer with non-valid refs */ + uint8_t *dwbuf, /* Buffer for writing numeric data to disk */ + *drbuf; /* Buffer for reading numeric data from disk */ + uint8_t *tu8; /* Temporary pointer to uint8 data */ + H5O_type_t obj_type; /* Type of object */ + int i, j; /* counting variables */ + 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 */ + 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 */ + hdset_reg_ref_t wdata_NA[1], /* Write buffer */ + rdata_NA[1]; /* Read buffer */ + hsize_t numparticles = 8388608; +hsize_t ret_particles; + unsigned num_dsets = 513; + hsize_t total_particles = numparticles * num_dsets; + hsize_t vdsdims[1] = {total_particles}; + hsize_t start3, count3, block3; /* Output message about test being performed */ - MESSAGE(5, ("Testing Dataset Region Reference Functions\n")); + if(new_format) { + MESSAGE(5, ("Testing Dataset Region Reference Functions for new format\n")); + } else { + MESSAGE(5, ("Testing Dataset Region Reference Functions for old format\n")); + } /* Allocate write & read buffers */ wbuf = (hdset_reg_ref_t *)HDcalloc(sizeof(hdset_reg_ref_t), (size_t)SPACE1_DIM1); @@ -539,8 +563,16 @@ test_reference_region(void) dwbuf = (uint8_t *)HDmalloc(sizeof(uint8_t) * SPACE2_DIM1 * SPACE2_DIM2); drbuf = (uint8_t *)HDcalloc(sizeof(uint8_t), (size_t)(SPACE2_DIM1 * SPACE2_DIM2)); + /* Set to use the latest file format */ + fapl = H5Pcreate(H5P_FILE_ACCESS); + CHECK(fapl, FAIL, "H5Pcreate"); + if(new_format) { + ret = H5Pset_libver_bounds(fapl, H5F_LIBVER_LATEST, H5F_LIBVER_LATEST); + CHECK(ret, FAIL, "H5Pset_libver_bounds"); + } + /* Create file */ - fid1 = H5Fcreate(FILE2, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT); + fid1 = H5Fcreate(FILE2, H5F_ACC_TRUNC, H5P_DEFAULT, fapl); CHECK(fid1, FAIL, "H5Fcreate"); /* Create dataspace for datasets */ @@ -566,11 +598,30 @@ test_reference_region(void) ret = H5Dclose(dset2); CHECK(ret, FAIL, "H5Dclose"); + /* Create dataspace with selection exceeding 32 bits */ + sid3 = H5Screate_simple(1, vdsdims, NULL); + CHECK(sid3, FAIL, "H5Screate_simple"); + + start3 = 0; + block3 = total_particles; + count3 = 1; + + ret = H5Sselect_hyperslab(sid3, H5S_SELECT_SET, &start3, NULL, &count3, &block3); + CHECK(ret, FAIL, "H5Sselect_hyperslab"); + + /* Create the dataset with dataspace exceeding 32 bits */ + dset3 = H5Dcreate2(fid1, "Dataset3", H5T_STD_U8LE, sid3, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); + CHECK(dset3, FAIL, "H5Dcreate2"); + + /* Close Dataset */ + ret = H5Dclose(dset3); + CHECK(ret, FAIL, "H5Dclose"); + /* Create dataspace for the reference dataset */ sid1 = H5Screate_simple(SPACE1_RANK, dims1, NULL); CHECK(sid1, FAIL, "H5Screate_simple"); - /* Create a dataset */ + /* Create the reference dataset */ dset1 = H5Dcreate2(fid1, "Dataset1", H5T_STD_REF_DSETREG, sid1, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); CHECK(ret, FAIL, "H5Dcreate2"); @@ -629,10 +680,18 @@ test_reference_region(void) /* Store third dataset region */ ret = H5Rcreate(&wbuf[2], fid1, "/Dataset2", H5R_DATASET_REGION, sid2); CHECK(ret, FAIL, "H5Rcreate"); - ret = H5Rget_obj_type2(dset1, H5R_DATASET_REGION, &wbuf[0], &obj_type); + ret = H5Rget_obj_type2(dset1, H5R_DATASET_REGION, &wbuf[2], &obj_type); CHECK(ret, FAIL, "H5Rget_obj_type2"); VERIFY(obj_type, H5O_TYPE_DATASET, "H5Rget_obj_type2"); + /* Store fourth dataset region */ + ret = H5Rcreate(&wbuf[3], fid1, "/Dataset3", H5R_DATASET_REGION, sid3); + CHECK(ret, FAIL, "H5Rcreate"); + ret = H5Rget_obj_type2(dset1, H5R_DATASET_REGION, &wbuf[3], &obj_type); + CHECK(ret, FAIL, "H5Rget_obj_type2"); + VERIFY(obj_type, H5O_TYPE_DATASET, "H5Rget_obj_type2"); + + /* Write selection to disk */ ret = H5Dwrite(dset1, H5T_STD_REF_DSETREG, H5S_ALL, H5S_ALL, H5P_DEFAULT, wbuf); CHECK(ret, FAIL, "H5Dwrite"); @@ -674,6 +733,9 @@ test_reference_region(void) ret = H5Sclose(sid2); CHECK(ret, FAIL, "H5Sclose"); + ret = H5Sclose(sid3); + CHECK(ret, FAIL, "H5Sclose"); + /* Close file */ ret = H5Fclose(fid1); CHECK(ret, FAIL, "H5Fclose"); @@ -729,6 +791,28 @@ test_reference_region(void) dset2 = H5Rdereference2(dset1, dapl_id, H5R_DATASET_REGION, &addr); VERIFY(dset2, FAIL, "H5Rdereference2 haddr_undef"); + + /* Try to open the referenced dataset with dataspace exceeding 32 bits */ + dset3 = H5Rdereference2(dset1, dapl_id, H5R_DATASET_REGION, &rbuf[3]); + CHECK(dset3, FAIL, "H5Rdereference2"); + + /* Check what H5Rget_obj_type2 function returns */ + ret = H5Rget_obj_type2(dset1, H5R_DATASET_REGION, &rbuf[3], &obj_type); + CHECK(ret, FAIL, "H5Rget_obj_type2"); + VERIFY(obj_type, H5O_TYPE_DATASET, "H5Rget_obj_type2"); + + /* Check information in the referenced dataset */ + sid3 = H5Dget_space(dset3); + CHECK(sid3, FAIL, "H5Dget_space"); + ret_particles = H5Sget_select_npoints(sid3); + VERIFY(ret_particles, total_particles, "H5Sget_select_npoints"); + + /* Close the dataspace and dataset */ + ret = H5Sclose(sid3); + CHECK(ret, FAIL, "H5Sclose"); + ret = H5Dclose(dset3); + CHECK(ret, FAIL, "H5Dclose"); + /* Try to open objects */ dset2 = H5Rdereference2(dset1, dapl_id, H5R_DATASET_REGION, &rbuf[0]); CHECK(dset2, FAIL, "H5Rdereference2"); @@ -891,32 +975,33 @@ test_reference_region(void) ** ****************************************************************/ static void -test_reference_region_1D(void) +test_reference_region_1D(hbool_t new_format) { - hid_t fid1; /* HDF5 File IDs */ - hid_t dset1, /* Dataset ID */ - dset3; /* Dereferenced dataset ID */ - hid_t sid1, /* Dataspace ID #1 */ - sid3; /* Dataspace ID #3 */ - hid_t dapl_id; /* Dataset access property list */ + hid_t fid1; /* HDF5 File IDs */ + hid_t fapl = -1; /* File acess property list */ + hid_t dset1, /* Dataset ID */ + dset3; /* Dereferenced dataset ID */ + hid_t sid1, /* Dataspace ID #1 */ + sid3; /* Dataspace ID #3 */ + hid_t dapl_id; /* Dataset access property list */ hsize_t dims1[] = {SPACE1_DIM1}, - dims3[] = {SPACE3_DIM1}; - hsize_t start[SPACE3_RANK]; /* Starting location of hyperslab */ - hsize_t stride[SPACE3_RANK]; /* Stride of hyperslab */ - hsize_t count[SPACE3_RANK]; /* Element count of hyperslab */ - hsize_t block[SPACE3_RANK]; /* Block size of hyperslab */ - hsize_t coord1[POINT1_NPOINTS][SPACE3_RANK]; /* Coordinates for point selection */ - hsize_t * coords; /* Coordinate buffer */ - hsize_t low[SPACE3_RANK]; /* Selection bounds */ - hsize_t high[SPACE3_RANK]; /* Selection bounds */ - hdset_reg_ref_t *wbuf, /* buffer to write to disk */ - *rbuf; /* buffer read from disk */ - uint8_t *dwbuf, /* Buffer for writing numeric data to disk */ - *drbuf; /* Buffer for reading numeric data from disk */ - uint8_t *tu8; /* Temporary pointer to uint8 data */ - H5O_type_t obj_type; /* Object type */ - int i; /* counting variables */ - herr_t ret; /* Generic return value */ + dims3[] = {SPACE3_DIM1}; + hsize_t start[SPACE3_RANK]; /* Starting location of hyperslab */ + hsize_t stride[SPACE3_RANK]; /* Stride of hyperslab */ + hsize_t count[SPACE3_RANK]; /* Element count of hyperslab */ + hsize_t block[SPACE3_RANK]; /* Block size of hyperslab */ + hsize_t coord1[POINT1_NPOINTS][SPACE3_RANK]; /* Coordinates for point selection */ + hsize_t *coords; /* Coordinate buffer */ + hsize_t low[SPACE3_RANK]; /* Selection bounds */ + hsize_t high[SPACE3_RANK]; /* Selection bounds */ + hdset_reg_ref_t *wbuf, /* buffer to write to disk */ + *rbuf; /* buffer read from disk */ + uint8_t *dwbuf, /* Buffer for writing numeric data to disk */ + *drbuf; /* Buffer for reading numeric data from disk */ + uint8_t *tu8; /* Temporary pointer to uint8 data */ + H5O_type_t obj_type; /* Object type */ + int i; /* counting variables */ + herr_t ret; /* Generic return value */ /* Output message about test being performed */ MESSAGE(5, ("Testing 1-D Dataset Region Reference Functions\n")); @@ -927,8 +1012,16 @@ test_reference_region_1D(void) dwbuf = (uint8_t *)HDmalloc(sizeof(uint8_t) * SPACE3_DIM1); drbuf = (uint8_t *)HDcalloc(sizeof(uint8_t), (size_t)SPACE3_DIM1); + /* Set to use the latest file format */ + fapl = H5Pcreate(H5P_FILE_ACCESS); + CHECK(fapl, FAIL, "H5Pcreate"); + if(new_format) { + ret = H5Pset_libver_bounds(fapl, H5F_LIBVER_LATEST, H5F_LIBVER_LATEST); + CHECK(ret, FAIL, "H5Pset_libver_bounds"); + } + /* Create file */ - fid1 = H5Fcreate(FILE2, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT); + fid1 = H5Fcreate(FILE2, H5F_ACC_TRUNC, H5P_DEFAULT, fapl); CHECK(fid1, FAIL, "H5Fcreate"); /* Create dataspace for datasets */ @@ -1738,14 +1831,16 @@ test_reference(void) /* Output message about test being performed */ MESSAGE(5, ("Testing References\n")); - test_reference_params(); /* Test for correct parameter checking */ - test_reference_obj(); /* Test basic H5R object reference code */ - test_reference_region(); /* Test basic H5R dataset region reference code */ - test_reference_region_1D(); /* Test H5R dataset region reference code for 1-D datasets */ - test_reference_obj_deleted(); /* Test H5R object reference code for deleted objects */ - test_reference_group(); /* Test operations on dereferenced groups */ + test_reference_params(); /* Test for correct parameter checking */ + test_reference_obj(); /* Test basic H5R object reference code */ + test_reference_region(FALSE); /* Test basic H5R dataset region reference code */ + test_reference_region(TRUE); /* Test basic H5R dataset region reference code */ + test_reference_region_1D(FALSE); /* Test H5R dataset region reference code for 1-D datasets */ + test_reference_region_1D(TRUE); /* Test H5R dataset region reference code for 1-D datasets */ + test_reference_obj_deleted(); /* Test H5R object reference code for deleted objects */ + test_reference_group(); /* Test operations on dereferenced groups */ #ifndef H5_NO_DEPRECATED_SYMBOLS - test_reference_compat(); /* Test operations with old API routines */ + test_reference_compat(); /* Test operations with old API routines */ #endif /* H5_NO_DEPRECATED_SYMBOLS */ } /* test_reference() */ diff --git a/test/vds.c b/test/vds.c index c9b7a1b..68ac397 100644 --- a/test/vds.c +++ b/test/vds.c @@ -634,7 +634,7 @@ test_api(test_api_config_t config, hid_t fapl) TEST_ERROR /* Get examination DCPL */ - if(test_api_get_ex_dcpl(config, fapl, dcpl, &ex_dcpl, vspace[0], filename, (hsize_t)213) < 0) + if(test_api_get_ex_dcpl(config, fapl, dcpl, &ex_dcpl, vspace[0], filename, (hsize_t)174) < 0) TEST_ERROR /* Test H5Pget_virtual_count */ -- cgit v0.12 From 2e11a4f5ae4aafeebaaa17455c567a41711efdc8 Mon Sep 17 00:00:00 2001 From: Richard Warren Date: Fri, 1 Dec 2017 08:38:10 -0500 Subject: Updated RELEASE.txt to include note on bug fix for HDFFV-10272, LBNL-ECP(10334) --- release_docs/RELEASE.txt | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/release_docs/RELEASE.txt b/release_docs/RELEASE.txt index e8a551f..12ae8fe 100644 --- a/release_docs/RELEASE.txt +++ b/release_docs/RELEASE.txt @@ -331,6 +331,17 @@ Bug Fixes since HDF5-1.10.1 release (DER - 2017/11/21, HDFFV-10330) + - Fix for collective metadata writes on file close + + It was discovered that metadata was being written twice as part of + the parallel file close behavior, once independently and once + collectively. + + A fix for this error was included as part of the parallel compression + feature but remained undocumented here. + + (RAW - 2017/12/01, HDFFV-10272) + Configuration ------------- - cmake -- cgit v0.12 From e0eb3d02966066761d1723752cc0d0c586ade707 Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Fri, 1 Dec 2017 13:37:08 -0600 Subject: H5detect and H5make_libsettings need include folder --- src/CMakeLists.txt | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index b163b8a..ab06ce8 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -849,6 +849,9 @@ endif () #----------------------------------------------------------------------------- add_executable (H5detect ${HDF5_SRC_DIR}/H5detect.c) TARGET_C_PROPERTIES (H5detect STATIC " " " ") +if (H5_HAVE_PARALLEL AND MPI_C_FOUND) + target_include_directories (H5detect PUBLIC ${MPI_C_INCLUDE_DIRS}) +endif () if (MSVC OR MINGW) target_link_libraries (H5detect "ws2_32.lib") endif () @@ -863,6 +866,9 @@ add_custom_command ( add_executable (H5make_libsettings ${HDF5_SRC_DIR}/H5make_libsettings.c) TARGET_C_PROPERTIES (H5make_libsettings STATIC " " " ") +if (H5_HAVE_PARALLEL AND MPI_C_FOUND) + target_include_directories (H5make_libsettings PUBLIC ${MPI_C_INCLUDE_DIRS}) +endif () if (MSVC OR MINGW) target_link_libraries (H5make_libsettings "ws2_32.lib") endif () -- cgit v0.12 From f09bfdb490ee31a29cb14f3692b66b8396d9ed80 Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Mon, 4 Dec 2017 13:07:01 -0600 Subject: Change reference from dl to CMake variable --- src/CMakeLists.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index ab06ce8..1d217c6 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -891,7 +891,7 @@ add_library (${HDF5_LIB_TARGET} STATIC ${common_SRCS} ${gen_SRCS} ${H5_PUBLIC_HE TARGET_C_PROPERTIES (${HDF5_LIB_TARGET} STATIC " " " ") target_link_libraries (${HDF5_LIB_TARGET} PRIVATE ${LINK_LIBS} ${LINK_COMP_LIBS}) if (NOT WIN32) - target_link_libraries (${HDF5_LIB_TARGET} PUBLIC dl) + target_link_libraries (${HDF5_LIB_TARGET} PUBLIC ${CMAKE_DL_LIBS}) endif () if (H5_HAVE_PARALLEL AND MPI_C_FOUND) target_include_directories (${HDF5_LIB_TARGET} PUBLIC ${MPI_C_INCLUDE_DIRS}) @@ -935,7 +935,7 @@ if (BUILD_SHARED_LIBS) TARGET_C_PROPERTIES (${HDF5_LIBSH_TARGET} SHARED " " " ") target_link_libraries (${HDF5_LIBSH_TARGET} PRIVATE ${LINK_LIBS} ${LINK_COMP_LIBS}) if (NOT WIN32) - target_link_libraries (${HDF5_LIBSH_TARGET} PUBLIC dl) + target_link_libraries (${HDF5_LIBSH_TARGET} PUBLIC ${CMAKE_DL_LIBS}) endif () if (H5_HAVE_PARALLEL AND MPI_C_FOUND) target_include_directories (${HDF5_LIBSH_TARGET} PUBLIC ${MPI_C_INCLUDE_DIRS}) -- cgit v0.12 From 02d6a8b3ab923b386fd56816a18c6bf5640c4feb Mon Sep 17 00:00:00 2001 From: Vailin Choi Date: Tue, 5 Dec 2017 00:30:42 -0600 Subject: Resolve conflicts from previous merge. --- src/H5Rint.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/H5Rint.c b/src/H5Rint.c index 716a573..d9669c5 100644 --- a/src/H5Rint.c +++ b/src/H5Rint.c @@ -289,7 +289,7 @@ H5R_create(void *_ref, H5G_loc_t *loc, const char *name, H5R_type_t ref_type, H5 HDmemset(ref, 0, H5R_DSET_REG_REF_BUF_SIZE); /* Get the amount of space required to serialize the selection */ - if ((buf_size = H5S_SELECT_SERIAL_SIZE(space)) < 0) + if ((buf_size = H5S_SELECT_SERIAL_SIZE(space, loc->oloc->file)) < 0) HGOTO_ERROR(H5E_REFERENCE, H5E_CANTINIT, FAIL, "Invalid amount of space for serializing selection") /* Increase buffer size to allow for the dataset OID */ @@ -305,7 +305,7 @@ H5R_create(void *_ref, H5G_loc_t *loc, const char *name, H5R_type_t ref_type, H5 H5F_addr_encode(loc->oloc->file, &p, obj_loc.oloc->addr); /* Serialize the selection into heap buffer */ - if (H5S_SELECT_SERIALIZE(space, &p) < 0) + if (H5S_SELECT_SERIALIZE(space, &p, loc->oloc->file) < 0) HGOTO_ERROR(H5E_REFERENCE, H5E_CANTCOPY, FAIL, "Unable to serialize selection") /* Save the serialized buffer for later */ -- cgit v0.12 From f3715a69d5016372e265ac2e21b2a65e0e756306 Mon Sep 17 00:00:00 2001 From: Vailin Choi Date: Thu, 7 Dec 2017 17:05:25 -0600 Subject: Fix for daily test failures. --- src/H5Dchunk.c | 4 ++-- src/H5Dint.c | 2 +- src/H5Spoint.c | 18 +++++++++--------- src/H5Sprivate.h | 4 ++-- src/H5Sselect.c | 4 ++-- 5 files changed, 16 insertions(+), 16 deletions(-) diff --git a/src/H5Dchunk.c b/src/H5Dchunk.c index be3b678..f96abdd 100644 --- a/src/H5Dchunk.c +++ b/src/H5Dchunk.c @@ -2008,7 +2008,7 @@ H5D__chunk_file_cb(void H5_ATTR_UNUSED *elem, const H5T_t H5_ATTR_UNUSED *type, coords_in_chunk[u] = coords[u] - (scaled[u] * fm->layout->u.chunk.dim[u]); /* Add point to file selection for chunk */ - if(H5S_select_elements(chunk_info->fspace, H5S_SELECT_APPEND, (size_t)1, coords_in_chunk) < 0) + if(H5S_select_elements(chunk_info->fspace, H5S_SELECT_APPEND, (hsize_t)1, coords_in_chunk) < 0) HGOTO_ERROR(H5E_DATASPACE, H5E_CANTSELECT, FAIL, "unable to select element") /* Increment the number of elemented selected in chunk */ @@ -2088,7 +2088,7 @@ H5D__chunk_mem_cb(void H5_ATTR_UNUSED *elem, const H5T_t H5_ATTR_UNUSED *type, u } /* end else */ /* Move memory selection iterator to next element in selection */ - if(H5S_SELECT_ITER_NEXT(&fm->mem_iter, (size_t)1) < 0) + if(H5S_SELECT_ITER_NEXT(&fm->mem_iter, (hsize_t)1) < 0) HGOTO_ERROR(H5E_DATASPACE, H5E_CANTNEXT, FAIL, "unable to move to next iterator location") done: diff --git a/src/H5Dint.c b/src/H5Dint.c index b6c0341..2bf7f6e 100644 --- a/src/H5Dint.c +++ b/src/H5Dint.c @@ -2544,7 +2544,7 @@ H5D__vlen_get_buf_size(void H5_ATTR_UNUSED *elem, hid_t type_id, unsigned H5_ATT HGOTO_ERROR(H5E_DATASET, H5E_NOSPACE, FAIL, "can't resize tbuf") /* Select point to read in */ - if(H5S_select_elements(vlen_bufsize->fspace, H5S_SELECT_SET, (size_t)1, point) < 0) + if(H5S_select_elements(vlen_bufsize->fspace, H5S_SELECT_SET, (hsize_t)1, point) < 0) HGOTO_ERROR(H5E_DATASET, H5E_CANTCREATE, FAIL, "can't select point") /* Read in the point (with the custom VL memory allocator) */ diff --git a/src/H5Spoint.c b/src/H5Spoint.c index fb0a01e..d13dd0a 100644 --- a/src/H5Spoint.c +++ b/src/H5Spoint.c @@ -58,7 +58,7 @@ static herr_t H5S_point_iter_coords(const H5S_sel_iter_t *iter, hsize_t *coords) static herr_t H5S_point_iter_block(const H5S_sel_iter_t *iter, hsize_t *start, hsize_t *end); static hsize_t H5S_point_iter_nelmts(const H5S_sel_iter_t *iter); static htri_t H5S_point_iter_has_next_block(const H5S_sel_iter_t *iter); -static herr_t H5S_point_iter_next(H5S_sel_iter_t *sel_iter, size_t nelem); +static herr_t H5S_point_iter_next(H5S_sel_iter_t *sel_iter, hsize_t nelem); static herr_t H5S_point_iter_next_block(H5S_sel_iter_t *sel_iter); static herr_t H5S_point_iter_release(H5S_sel_iter_t *sel_iter); @@ -278,7 +278,7 @@ done: USAGE herr_t H5S_point_iter_next(iter, nelem) H5S_sel_iter_t *iter; IN: Pointer to selection iterator - size_t nelem; IN: Number of elements to advance by + hsize_t nelem; IN: Number of elements to advance by RETURNS Non-negative on success/Negative on failure DESCRIPTION @@ -289,7 +289,7 @@ done: REVISION LOG --------------------------------------------------------------------------*/ static herr_t -H5S_point_iter_next(H5S_sel_iter_t *iter, size_t nelem) +H5S_point_iter_next(H5S_sel_iter_t *iter, hsize_t nelem) { FUNC_ENTER_NOAPI_NOINIT_NOERR @@ -376,7 +376,7 @@ H5S_point_iter_release (H5S_sel_iter_t H5_ATTR_UNUSED * iter) USAGE herr_t H5S_point_add(space, num_elem, coord) H5S_t *space; IN: Dataspace of selection to modify - size_t num_elem; IN: Number of elements in COORD array. + hsize_t num_elem; IN: Number of elements in COORD array. const hsize_t *coord[]; IN: The location of each element selected RETURNS Non-negative on success/Negative on failure @@ -388,7 +388,7 @@ H5S_point_iter_release (H5S_sel_iter_t H5_ATTR_UNUSED * iter) REVISION LOG --------------------------------------------------------------------------*/ static herr_t -H5S_point_add(H5S_t *space, H5S_seloper_t op, size_t num_elem, const hsize_t *coord) +H5S_point_add(H5S_t *space, H5S_seloper_t op, hsize_t num_elem, const hsize_t *coord) { H5S_pnt_node_t *top = NULL, *curr = NULL, *new_node = NULL; /* Point selection nodes */ unsigned u; /* Counter */ @@ -527,7 +527,7 @@ H5S_point_release (H5S_t *space) herr_t H5S_select_elements(dsid, op, num_elem, coord) hid_t dsid; IN: Dataspace ID of selection to modify H5S_seloper_t op; IN: Operation to perform on current selection - size_t num_elem; IN: Number of elements in COORD array. + hsize_t num_elem; IN: Number of elements in COORD array. const hsize_t *coord; IN: The location of each element selected RETURNS Non-negative on success/Negative on failure @@ -549,7 +549,7 @@ H5S_point_release (H5S_t *space) REVISION LOG --------------------------------------------------------------------------*/ herr_t -H5S_select_elements(H5S_t *space, H5S_seloper_t op, size_t num_elem, +H5S_select_elements(H5S_t *space, H5S_seloper_t op, hsize_t num_elem, const hsize_t *coord) { herr_t ret_value = SUCCEED; /* return value */ @@ -1043,7 +1043,7 @@ H5S_point_deserialize(H5S_t *space, uint32_t H5_ATTR_UNUSED version, uint8_t H5_ H5S_seloper_t op = H5S_SELECT_SET; /* Selection operation */ hsize_t *coord = NULL, *tcoord; /* Pointer to array of elements */ const uint8_t *pp = (*p); /* Local pointer for decoding */ - size_t num_elem = 0; /* Number of elements in selection */ + hsize_t num_elem = 0; /* Number of elements in selection */ unsigned rank; /* Rank of points */ unsigned i, j; /* local counting variables */ herr_t ret_value = SUCCEED; /* Return value */ @@ -1756,7 +1756,7 @@ H5Sselect_elements(hid_t spaceid, H5S_seloper_t op, size_t num_elem, HGOTO_ERROR(H5E_ARGS, H5E_UNSUPPORTED, FAIL, "unsupported operation attempted") /* Call the real element selection routine */ - if((ret_value = H5S_select_elements(space, op, num_elem, coord)) < 0) + if((ret_value = H5S_select_elements(space, op, (hsize_t)num_elem, coord)) < 0) HGOTO_ERROR(H5E_DATASPACE, H5E_CANTDELETE, FAIL, "can't select elements") done: diff --git a/src/H5Sprivate.h b/src/H5Sprivate.h index 068283a..009d877 100644 --- a/src/H5Sprivate.h +++ b/src/H5Sprivate.h @@ -279,7 +279,7 @@ H5_DLL herr_t H5S_select_none(H5S_t *space); /* Operations on point selections */ H5_DLL herr_t H5S_select_elements(H5S_t *space, H5S_seloper_t op, - size_t num_elem, const hsize_t *coord); + hsize_t num_elem, const hsize_t *coord); /* Operations on hyperslab selections */ H5_DLL herr_t H5S_select_hyperslab (H5S_t *space, H5S_seloper_t op, const hsize_t start[], @@ -309,7 +309,7 @@ H5_DLL hsize_t H5S_hyper_get_first_inc_block(const H5S_t *space, H5_DLL herr_t H5S_select_iter_init(H5S_sel_iter_t *iter, const H5S_t *space, size_t elmt_size); H5_DLL herr_t H5S_select_iter_coords(const H5S_sel_iter_t *sel_iter, hsize_t *coords); H5_DLL hsize_t H5S_select_iter_nelmts(const H5S_sel_iter_t *sel_iter); -H5_DLL herr_t H5S_select_iter_next(H5S_sel_iter_t *sel_iter, size_t nelem); +H5_DLL herr_t H5S_select_iter_next(H5S_sel_iter_t *sel_iter, hsize_t nelem); H5_DLL herr_t H5S_select_iter_release(H5S_sel_iter_t *sel_iter); #ifdef H5_HAVE_PARALLEL diff --git a/src/H5Sselect.c b/src/H5Sselect.c index 72bdfb7..dbbc927 100644 --- a/src/H5Sselect.c +++ b/src/H5Sselect.c @@ -1226,7 +1226,7 @@ H5S_select_iter_has_next_block(const H5S_sel_iter_t *iter) USAGE herr_t H5S_select_iter_next(iter, nelem) H5S_sel_iter_t *iter; IN/OUT: Selection iterator to change - size_t nelem; IN: Number of elements to advance by + hsize_t nelem; IN: Number of elements to advance by RETURNS Non-negative on success, negative on failure. DESCRIPTION @@ -1241,7 +1241,7 @@ H5S_select_iter_has_next_block(const H5S_sel_iter_t *iter) REVISION LOG --------------------------------------------------------------------------*/ herr_t -H5S_select_iter_next(H5S_sel_iter_t *iter, size_t nelem) +H5S_select_iter_next(H5S_sel_iter_t *iter, hsize_t nelem) { herr_t ret_value = FAIL; /* Return value */ -- cgit v0.12 From ad85e417cf5bd91d6a77623cb1e5035bb9f60192 Mon Sep 17 00:00:00 2001 From: hdftest Date: Mon, 11 Dec 2017 08:58:41 -0600 Subject: Snapshot version 1.10 release 2 (snap4) --- README.txt | 2 +- c++/src/cpp_doc_config | 2 +- config/cmake/scripts/HDF5config.cmake | 2 +- configure.ac | 2 +- release_docs/RELEASE.txt | 2 +- src/H5public.h | 4 ++-- 6 files changed, 7 insertions(+), 7 deletions(-) diff --git a/README.txt b/README.txt index c78dc20..b77c199 100644 --- a/README.txt +++ b/README.txt @@ -1,4 +1,4 @@ -HDF5 version 1.10.2-snap4 currently under development +HDF5 version 1.10.2-snap5 currently under development Please refer to the release_docs/INSTALL file for installation instructions. ------------------------------------------------------------------------------ diff --git a/c++/src/cpp_doc_config b/c++/src/cpp_doc_config index 8aa987f..d4cb220 100644 --- a/c++/src/cpp_doc_config +++ b/c++/src/cpp_doc_config @@ -38,7 +38,7 @@ PROJECT_NAME = "HDF5 C++ API" # could be handy for archiving the generated documentation or if some version # control system is used. -PROJECT_NUMBER = "1.10.2-snap4, currently under development" +PROJECT_NUMBER = "1.10.2-snap5, currently under development" # Using the PROJECT_BRIEF tag one can provide an optional one line description # for a project that appears at the top of each page and should give viewer a diff --git a/config/cmake/scripts/HDF5config.cmake b/config/cmake/scripts/HDF5config.cmake index c8b9df7..7c7b258 100755 --- a/config/cmake/scripts/HDF5config.cmake +++ b/config/cmake/scripts/HDF5config.cmake @@ -39,7 +39,7 @@ cmake_minimum_required (VERSION 3.2.2 FATAL_ERROR) ############################################################################## set (CTEST_SOURCE_VERSION "1.10.2") -set (CTEST_SOURCE_VERSEXT "-snap4") +set (CTEST_SOURCE_VERSEXT "-snap5") ############################################################################## # handle input parameters to script. diff --git a/configure.ac b/configure.ac index b50bacf..d6ea84b 100644 --- a/configure.ac +++ b/configure.ac @@ -24,7 +24,7 @@ AC_PREREQ([2.69]) ## NOTE: Do not forget to change the version number here when we do a ## release!!! ## -AC_INIT([HDF5], [1.10.2-snap4], [help@hdfgroup.org]) +AC_INIT([HDF5], [1.10.2-snap5], [help@hdfgroup.org]) AC_CONFIG_SRCDIR([src/H5.c]) AC_CONFIG_HEADERS([src/H5config.h]) diff --git a/release_docs/RELEASE.txt b/release_docs/RELEASE.txt index 12ae8fe..506008a 100644 --- a/release_docs/RELEASE.txt +++ b/release_docs/RELEASE.txt @@ -1,4 +1,4 @@ -HDF5 version 1.10.2-snap4 currently under development +HDF5 version 1.10.2-snap5 currently under development ================================================================================ diff --git a/src/H5public.h b/src/H5public.h index 518329f..de7972b 100644 --- a/src/H5public.h +++ b/src/H5public.h @@ -93,9 +93,9 @@ extern "C" { #define H5_VERS_MAJOR 1 /* For major interface/format changes */ #define H5_VERS_MINOR 10 /* For minor interface/format changes */ #define H5_VERS_RELEASE 2 /* For tweaks, bug-fixes, or development */ -#define H5_VERS_SUBRELEASE "snap4" /* For pre-releases like snap0 */ +#define H5_VERS_SUBRELEASE "snap5" /* For pre-releases like snap0 */ /* Empty string for real releases. */ -#define H5_VERS_INFO "HDF5 library version: 1.10.2-snap4" /* Full version string */ +#define H5_VERS_INFO "HDF5 library version: 1.10.2-snap5" /* Full version string */ #define H5check() H5check_version(H5_VERS_MAJOR,H5_VERS_MINOR, \ H5_VERS_RELEASE) -- cgit v0.12 From 36b9818ecce43f4078548fa10538ace33850739f Mon Sep 17 00:00:00 2001 From: hdftest Date: Sun, 17 Dec 2017 15:33:36 -0600 Subject: Snapshot version 1.10 release 2 (snap5) --- README.txt | 2 +- c++/src/cpp_doc_config | 2 +- config/cmake/scripts/HDF5config.cmake | 2 +- configure.ac | 2 +- release_docs/RELEASE.txt | 2 +- src/H5public.h | 4 ++-- 6 files changed, 7 insertions(+), 7 deletions(-) diff --git a/README.txt b/README.txt index b77c199..aa473fe 100644 --- a/README.txt +++ b/README.txt @@ -1,4 +1,4 @@ -HDF5 version 1.10.2-snap5 currently under development +HDF5 version 1.10.2-snap6 currently under development Please refer to the release_docs/INSTALL file for installation instructions. ------------------------------------------------------------------------------ diff --git a/c++/src/cpp_doc_config b/c++/src/cpp_doc_config index d4cb220..8122f39 100644 --- a/c++/src/cpp_doc_config +++ b/c++/src/cpp_doc_config @@ -38,7 +38,7 @@ PROJECT_NAME = "HDF5 C++ API" # could be handy for archiving the generated documentation or if some version # control system is used. -PROJECT_NUMBER = "1.10.2-snap5, currently under development" +PROJECT_NUMBER = "1.10.2-snap6, currently under development" # Using the PROJECT_BRIEF tag one can provide an optional one line description # for a project that appears at the top of each page and should give viewer a diff --git a/config/cmake/scripts/HDF5config.cmake b/config/cmake/scripts/HDF5config.cmake index 7c7b258..3b459cb 100755 --- a/config/cmake/scripts/HDF5config.cmake +++ b/config/cmake/scripts/HDF5config.cmake @@ -39,7 +39,7 @@ cmake_minimum_required (VERSION 3.2.2 FATAL_ERROR) ############################################################################## set (CTEST_SOURCE_VERSION "1.10.2") -set (CTEST_SOURCE_VERSEXT "-snap5") +set (CTEST_SOURCE_VERSEXT "-snap6") ############################################################################## # handle input parameters to script. diff --git a/configure.ac b/configure.ac index d6ea84b..023de00 100644 --- a/configure.ac +++ b/configure.ac @@ -24,7 +24,7 @@ AC_PREREQ([2.69]) ## NOTE: Do not forget to change the version number here when we do a ## release!!! ## -AC_INIT([HDF5], [1.10.2-snap5], [help@hdfgroup.org]) +AC_INIT([HDF5], [1.10.2-snap6], [help@hdfgroup.org]) AC_CONFIG_SRCDIR([src/H5.c]) AC_CONFIG_HEADERS([src/H5config.h]) diff --git a/release_docs/RELEASE.txt b/release_docs/RELEASE.txt index 506008a..39286fc 100644 --- a/release_docs/RELEASE.txt +++ b/release_docs/RELEASE.txt @@ -1,4 +1,4 @@ -HDF5 version 1.10.2-snap5 currently under development +HDF5 version 1.10.2-snap6 currently under development ================================================================================ diff --git a/src/H5public.h b/src/H5public.h index 0094d6e..0c8a2c6 100644 --- a/src/H5public.h +++ b/src/H5public.h @@ -94,9 +94,9 @@ extern "C" { #define H5_VERS_MAJOR 1 /* For major interface/format changes */ #define H5_VERS_MINOR 10 /* For minor interface/format changes */ #define H5_VERS_RELEASE 2 /* For tweaks, bug-fixes, or development */ -#define H5_VERS_SUBRELEASE "snap5" /* For pre-releases like snap0 */ +#define H5_VERS_SUBRELEASE "snap6" /* For pre-releases like snap0 */ /* Empty string for real releases. */ -#define H5_VERS_INFO "HDF5 library version: 1.10.2-snap5" /* Full version string */ +#define H5_VERS_INFO "HDF5 library version: 1.10.2-snap6" /* Full version string */ #define H5check() H5check_version(H5_VERS_MAJOR,H5_VERS_MINOR, \ H5_VERS_RELEASE) -- cgit v0.12 From cb01a66991bd10ce06a75899bd5503067cb25ace Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Mon, 18 Dec 2017 10:45:48 -0600 Subject: HDFFV-10307 Add toupper function --- src/H5system.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/H5system.c b/src/H5system.c index a8726c2..7b3a0eb 100644 --- a/src/H5system.c +++ b/src/H5system.c @@ -1043,7 +1043,7 @@ H5_build_extpath(const char *name, char **extpath /*out*/) * Unix: does not apply */ if(H5_CHECK_ABS_DRIVE(name)) { - drive = name[0] - 'A' + 1; + drive = toupper(name[0]) - 'A' + 1; retcwd = HDgetdcwd(drive, cwdpath, MAX_PATH_LEN); HDstrncpy(new_name, &name[2], name_len); } /* end if */ -- cgit v0.12 From 884d07535512a1ff4caf522b42352ad5f4072c94 Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Mon, 18 Dec 2017 10:54:02 -0600 Subject: HDFFV-10307 --- release_docs/RELEASE.txt | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/release_docs/RELEASE.txt b/release_docs/RELEASE.txt index 506008a..720ee33 100644 --- a/release_docs/RELEASE.txt +++ b/release_docs/RELEASE.txt @@ -231,6 +231,12 @@ Bug Fixes since HDF5-1.10.1 release Library ------- + - Utility function can not handle lowercase Windows drive letters + + Added call to toupper function for drive letter. + + (ADB - 2017/12/18, HDFFV-10307) + - filter plugin handling in H5PL.c and H5Z.c It was discovered that the dynamic loading process used by -- cgit v0.12 From c50cd597ad0acbc888a56335dc52a183b2c4c63a Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Wed, 20 Dec 2017 10:29:00 -0600 Subject: HDFFV-10307 Add HD prefix --- src/H5system.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/H5system.c b/src/H5system.c index 7b3a0eb..719b7e0 100644 --- a/src/H5system.c +++ b/src/H5system.c @@ -1043,7 +1043,7 @@ H5_build_extpath(const char *name, char **extpath /*out*/) * Unix: does not apply */ if(H5_CHECK_ABS_DRIVE(name)) { - drive = toupper(name[0]) - 'A' + 1; + drive = HDtoupper(name[0]) - 'A' + 1; retcwd = HDgetdcwd(drive, cwdpath, MAX_PATH_LEN); HDstrncpy(new_name, &name[2], name_len); } /* end if */ -- cgit v0.12 From 21aadab493b09fecae8d30e0c2d0a81913180daf Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Wed, 20 Dec 2017 12:29:35 -0600 Subject: Fix fortran includes --- fortran/src/CMakeLists.txt | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/fortran/src/CMakeLists.txt b/fortran/src/CMakeLists.txt index 0f576d4..a898130 100644 --- a/fortran/src/CMakeLists.txt +++ b/fortran/src/CMakeLists.txt @@ -85,6 +85,9 @@ add_executable (H5match_types ${HDF5_F90_BINARY_DIR}/H5fort_type_defines.h ${HDF5_F90_SRC_SOURCE_DIR}/H5match_types.c ) +if (H5_HAVE_PARALLEL AND MPI_C_FOUND) + target_include_directories (H5match_types PUBLIC ${MPI_C_INCLUDE_DIRS}) +endif () set (CMD $) add_custom_command ( OUTPUT ${HDF5_F90_BINARY_DIR}/H5f90i_gen.h @@ -95,6 +98,18 @@ add_custom_command ( ) set_source_files_properties (${HDF5_F90_BINARY_DIR}/H5f90i_gen.h PROPERTIES GENERATED TRUE) set_source_files_properties (${HDF5_F90_BINARY_DIR}/H5fortran_types.F90 PROPERTIES GENERATED TRUE) +if (BUILD_SHARED_LIBS) + set (CMDSH $) + add_custom_command ( + OUTPUT ${HDF5_F90_BINARY_DIR}/shared/H5f90i_gen.h + ${HDF5_F90_BINARY_DIR}/shared/H5fortran_types.F90 + COMMAND ${CMDSH} + WORKING_DIRECTORY ${HDF5_F90_BINARY_DIR}/shared + DEPENDS H5match_types + ) + 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) +endif () #----------------------------------------------------------------------------- # f90CStub lib @@ -223,7 +238,7 @@ set (f90_F_SOURCES if (BUILD_SHARED_LIBS) set (f90_F_SOURCES_SHARED # generated file - ${HDF5_F90_BINARY_DIR}/H5fortran_types.F90 + ${HDF5_F90_BINARY_DIR}/shared/H5fortran_types.F90 ${f90_F_BASE_SOURCES} @@ -243,6 +258,7 @@ set (SHARED_LINK_FLAGS " ") TARGET_FORTRAN_PROPERTIES (${HDF5_F90_LIB_TARGET} STATIC " " " ") target_link_libraries (${HDF5_F90_LIB_TARGET} PUBLIC ${HDF5_F90_C_LIB_TARGET}) target_link_libraries (${HDF5_F90_LIB_TARGET} PRIVATE ${LINK_Fortran_LIBS}) +target_include_directories (${HDF5_F90_LIB_TARGET} PUBLIC ${CMAKE_Fortran_MODULE_DIRECTORY}/static) if (H5_HAVE_PARALLEL AND MPI_Fortran_FOUND) target_include_directories (${HDF5_F90_LIB_TARGET} PUBLIC ${MPI_Fortran_INCLUDE_DIRS}) endif () @@ -271,6 +287,7 @@ if (BUILD_SHARED_LIBS) TARGET_FORTRAN_PROPERTIES (${HDF5_F90_LIBSH_TARGET} SHARED " " ${SHARED_LINK_FLAGS}) target_link_libraries (${HDF5_F90_LIBSH_TARGET} PUBLIC ${HDF5_F90_C_LIBSH_TARGET}) target_link_libraries (${HDF5_F90_LIBSH_TARGET} PRIVATE ${LINK_Fortran_LIBS}) + target_include_directories (${HDF5_F90_LIBSH_TARGET} PUBLIC ${CMAKE_Fortran_MODULE_DIRECTORY}/shared) if (H5_HAVE_PARALLEL AND MPI_Fortran_FOUND) target_include_directories (${HDF5_F90_LIBSH_TARGET} PUBLIC ${MPI_Fortran_INCLUDE_DIRS}) endif () -- cgit v0.12 From bbcf9f31c6af52f88657e5ea738d8821a9702c73 Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Wed, 20 Dec 2017 12:35:29 -0600 Subject: Update MPI commands --- config/cmake_ext_mod/FindMPI.cmake | 287 ++++++++++++++++++++++--------------- release_docs/RELEASE.txt | 11 +- 2 files changed, 180 insertions(+), 118 deletions(-) diff --git a/config/cmake_ext_mod/FindMPI.cmake b/config/cmake_ext_mod/FindMPI.cmake index 8084472..d01dd35 100644 --- a/config/cmake_ext_mod/FindMPI.cmake +++ b/config/cmake_ext_mod/FindMPI.cmake @@ -347,7 +347,7 @@ function (_MPI_check_compiler LANG QUERY_FLAG OUTPUT_VARIABLE RESULT_VARIABLE) # library that has invalid or missing version information there would be warning # messages emitted by ld.so in the compiler output. In either case, we'll treat # the output as invalid. - if("${WRAPPER_OUTPUT}" MATCHES "undefined reference|unrecognized|need to set|no version information available") + if("${WRAPPER_OUTPUT}" MATCHES "undefined reference|unrecognized|need to set|no version information available|command not found") set(WRAPPER_RETURN 255) endif() # Ensure that no error output might be passed upwards. @@ -615,6 +615,16 @@ function (_MPI_interrogate_compiler lang) endif() endif() + if(MPI_${LANG}_EXTRA_COMPILE_DEFINITIONS) + list(APPEND MPI_COMPILE_DEFINITIONS_WORK "${MPI_${LANG}_EXTRA_COMPILE_DEFINITIONS}") + endif() + if(MPI_${LANG}_EXTRA_COMPILE_OPTIONS) + list(APPEND MPI_COMPILE_OPTIONS_WORK "${MPI_${LANG}_EXTRA_COMPILE_OPTIONS}") + endif() + if(MPI_${LANG}_EXTRA_LIB_NAMES) + list(APPEND MPI_PLAIN_LIB_NAMES_WORK "${MPI_${LANG}_EXTRA_LIB_NAMES}") + endif() + # If we found MPI, set up all of the appropriate cache entries if(NOT MPI_${LANG}_COMPILE_OPTIONS) set(MPI_${LANG}_COMPILE_OPTIONS ${MPI_COMPILE_OPTIONS_WORK} CACHE STRING "MPI ${LANG} compilation options" FORCE) @@ -823,33 +833,43 @@ endfunction() macro(_MPI_assemble_libraries LANG) set(MPI_${LANG}_LIBRARIES "") - foreach(mpilib IN LISTS MPI_${LANG}_LIB_NAMES) - list(APPEND MPI_${LANG}_LIBRARIES ${MPI_${mpilib}_LIBRARY}) - endforeach() + # Only for libraries do we need to check whether the compiler's linking stage is separate. + if(NOT "${MPI_${LANG}_COMPILER}" STREQUAL "${CMAKE_${LANG}_COMPILER}" OR NOT MPI_${LANG}_WORKS_IMPLICIT) + foreach(mpilib IN LISTS MPI_${LANG}_LIB_NAMES) + list(APPEND MPI_${LANG}_LIBRARIES ${MPI_${mpilib}_LIBRARY}) + endforeach() + endif() endmacro() macro(_MPI_assemble_include_dirs LANG) - set(MPI_${LANG}_INCLUDE_DIRS "${MPI_${LANG}_ADDITIONAL_INCLUDE_DIRS}") - if("${LANG}" MATCHES "(C|CXX)") - if(MPI_${LANG}_HEADER_DIR) - list(APPEND MPI_${LANG}_INCLUDE_DIRS "${MPI_${LANG}_HEADER_DIR}") - endif() - else() # Fortran - if(MPI_${LANG}_F77_HEADER_DIR) - list(APPEND MPI_${LANG}_INCLUDE_DIRS "${MPI_${LANG}_F77_HEADER_DIR}") + if("${MPI_${LANG}_COMPILER}" STREQUAL "${CMAKE_${LANG}_COMPILER}") + set(MPI_${LANG}_INCLUDE_DIRS "") + else() + set(MPI_${LANG}_INCLUDE_DIRS "${MPI_${LANG}_ADDITIONAL_INCLUDE_DIRS}") + if("${LANG}" MATCHES "(C|CXX)") + if(MPI_${LANG}_HEADER_DIR) + list(APPEND MPI_${LANG}_INCLUDE_DIRS "${MPI_${LANG}_HEADER_DIR}") + endif() + else() # Fortran + if(MPI_${LANG}_F77_HEADER_DIR) + list(APPEND MPI_${LANG}_INCLUDE_DIRS "${MPI_${LANG}_F77_HEADER_DIR}") + endif() + if(MPI_${LANG}_MODULE_DIR AND NOT "${MPI_${LANG}_MODULE_DIR}" IN_LIST MPI_${LANG}_INCLUDE_DIRS) + list(APPEND MPI_${LANG}_INCLUDE_DIRS "${MPI_${LANG}_MODULE_DIR}") + endif() endif() - if(MPI_${LANG}_MODULE_DIR AND NOT "${MPI_${LANG}_MODULE_DIR}" IN_LIST MPI_${LANG}_INCLUDE_DIRS) - list(APPEND MPI_${LANG}_INCLUDE_DIRS "${MPI_${LANG}_MODULE_DIR}") + if(MPI_${LANG}_ADDITIONAL_INCLUDE_VARS) + foreach(MPI_ADDITIONAL_INC_DIR IN LISTS MPI_${LANG}_ADDITIONAL_INCLUDE_VARS) + list(APPEND MPI_${LANG}_INCLUDE_DIRS "${MPI_${MPI_ADDITIONAL_INC_DIR}_INCLUDE_DIR}") + endforeach() endif() endif() - if(MPI_${LANG}_ADDITIONAL_INCLUDE_VARS) - foreach(mpiadditionalinclude IN LISTS MPI_${LANG}_ADDITIONAL_INCLUDE_VARS) - list(APPEND MPI_${LANG}_INCLUDE_DIRS "${MPI_${mpiadditionalinclude}_INCLUDE_DIR}") - endforeach() - endif() endmacro() function(_MPI_split_include_dirs LANG) + if("${MPI_${LANG}_COMPILER}" STREQUAL "${CMAKE_${LANG}_COMPILER}") + return() + endif() # Backwards compatibility: Search INCLUDE_PATH if given. if(MPI_${LANG}_INCLUDE_PATH) list(APPEND MPI_${LANG}_ADDITIONAL_INCLUDE_DIRS "${MPI_${LANG}_INCLUDE_PATH}") @@ -885,6 +905,13 @@ function(_MPI_split_include_dirs LANG) endif() mark_as_advanced(MPI_${LANG}_F77_HEADER_DIR MPI_${LANG}_MODULE_DIR) endif() + # Remove duplicates and default system directories from the list. + if(MPI_${LANG}_ADDITIONAL_INCLUDE_DIRS) + list(REMOVE_DUPLICATES MPI_${LANG}_ADDITIONAL_INCLUDE_DIRS) + foreach(MPI_IMPLICIT_INC_DIR IN LISTS CMAKE_${LANG}_IMPLICIT_LINK_DIRECTORIES) + list(REMOVE_ITEM MPI_${LANG}_ADDITIONAL_INCLUDE_DIRS ${MPI_IMPLICIT_INC_DIR}) + endforeach() + endif() set(MPI_${LANG}_ADDITIONAL_INCLUDE_DIRS ${MPI_${LANG}_ADDITIONAL_INCLUDE_DIRS} CACHE STRING "MPI ${LANG} additional include directories" FORCE) endfunction() @@ -1014,7 +1041,7 @@ elseif("${CMAKE_HOST_SYSTEM_NAME}" STREQUAL "Windows") elseif("${CMAKE_HOST_SYSTEM_NAME}" STREQUAL "FreeBSD") # FreeBSD ships mpich under the normal system paths - but available openmpi implementations # will be found in /usr/local/mpi/ - MPI_search_mpi_prefix_folder("/usr/local/mpi/") + MPI_search_mpi_prefix_folder("/usr/local/mpi") endif() # Most MPI distributions have some form of mpiexec or mpirun which gives us something we can look for. @@ -1050,48 +1077,54 @@ mark_as_advanced(MPIEXEC_EXECUTABLE MPIEXEC_NUMPROC_FLAG MPIEXEC_PREFLAGS MPIEXE # # Once we find the new variables, we translate them back into their old # equivalents below. -foreach (LANG IN ITEMS C CXX) - # Old input variables. - set(_MPI_OLD_INPUT_VARS COMPILER COMPILE_FLAGS INCLUDE_PATH LINK_FLAGS) - - # Set new vars based on their old equivalents, if the new versions are not already set. - foreach (var ${_MPI_OLD_INPUT_VARS}) - if (NOT MPI_${LANG}_${var} AND MPI_${var}) - set(MPI_${LANG}_${var} "${MPI_${var}}") - endif() - endforeach() - - # Chop the old compile flags into options and definitions - if(MPI_${LANG}_COMPILE_FLAGS) - unset(MPI_${LANG}_COMPILE_OPTIONS) - unset(MPI_${LANG}_COMPILE_DEFINITIONS) - separate_arguments(MPI_SEPARATE_FLAGS NATIVE_COMMAND "${MPI_${LANG}_COMPILE_FLAGS}") - foreach(_MPI_FLAG IN LISTS MPI_SEPARATE_FLAGS) - if("${_MPI_FLAG}" MATCHES "^ *[-/D]([^ ]+)") - list(APPEND MPI_${LANG}_COMPILE_DEFINITIONS "${CMAKE_MATCH_1}") - else() - list(APPEND MPI_${LANG}_COMPILE_FLAGS "${_MPI_FLAG}") +if(NOT MPI_IGNORE_LEGACY_VARIABLES) + foreach (LANG IN ITEMS C CXX) + # Old input variables. + set(_MPI_OLD_INPUT_VARS COMPILER COMPILE_FLAGS INCLUDE_PATH LINK_FLAGS) + + # Set new vars based on their old equivalents, if the new versions are not already set. + foreach (var ${_MPI_OLD_INPUT_VARS}) + if (NOT MPI_${LANG}_${var} AND MPI_${var}) + set(MPI_${LANG}_${var} "${MPI_${var}}") endif() endforeach() - unset(MPI_SEPARATE_FLAGS) - endif() - # If a list of libraries was given, we'll split it into new-style cache variables - if(NOT MPI_${LANG}_LIB_NAMES) - foreach(_MPI_LIB IN LISTS MPI_${LANG}_LIBRARIES MPI_LIBRARY MPI_EXTRA_LIBRARY) - get_filename_component(_MPI_PLAIN_LIB_NAME "${_MPI_LIB}" NAME_WE) - get_filename_component(_MPI_LIB_NAME "${_MPI_LIB}" NAME) - get_filename_component(_MPI_LIB_DIR "${_MPI_LIB}" DIRECTORY) - list(APPEND MPI_PLAIN_LIB_NAMES_WORK "${_MPI_PLAIN_LIB_NAME}") - find_library(MPI_${_MPI_PLAIN_LIB_NAME}_LIBRARY - NAMES "${_MPI_LIB_NAME}" "lib${_MPI_LIB_NAME}" - HINTS ${_MPI_LIB_DIR} $ENV{MPI_LIB} - DOC "Location of the ${_MPI_PLAIN_LIB_NAME} library for MPI" - ) - mark_as_advanced(MPI_${_MPI_PLAIN_LIB_NAME}_LIBRARY) - endforeach() - endif() -endforeach() + # Chop the old compile flags into options and definitions + + unset(MPI_${LANG}_EXTRA_COMPILE_DEFINITIONS) + unset(MPI_${LANG}_EXTRA_COMPILE_OPTIONS) + if(MPI_${LANG}_COMPILE_FLAGS) + separate_arguments(MPI_SEPARATE_FLAGS NATIVE_COMMAND "${MPI_${LANG}_COMPILE_FLAGS}") + foreach(_MPI_FLAG IN LISTS MPI_SEPARATE_FLAGS) + if("${_MPI_FLAG}" MATCHES "^ *[-/D]([^ ]+)") + list(APPEND MPI_${LANG}_EXTRA_COMPILE_DEFINITIONS "${CMAKE_MATCH_1}") + else() + list(APPEND MPI_${LANG}_EXTRA_COMPILE_OPTIONS "${_MPI_FLAG}") + endif() + endforeach() + unset(MPI_SEPARATE_FLAGS) + endif() + + # If a list of libraries was given, we'll split it into new-style cache variables + unset(MPI_${LANG}_EXTRA_LIB_NAMES) + if(NOT MPI_${LANG}_LIB_NAMES) + foreach(_MPI_LIB IN LISTS MPI_${LANG}_LIBRARIES MPI_LIBRARY MPI_EXTRA_LIBRARY) + if(_MPI_LIB) + get_filename_component(_MPI_PLAIN_LIB_NAME "${_MPI_LIB}" NAME_WE) + get_filename_component(_MPI_LIB_NAME "${_MPI_LIB}" NAME) + get_filename_component(_MPI_LIB_DIR "${_MPI_LIB}" DIRECTORY) + list(APPEND MPI_${LANG}_EXTRA_LIB_NAMES "${_MPI_PLAIN_LIB_NAME}") + find_library(MPI_${_MPI_PLAIN_LIB_NAME}_LIBRARY + NAMES "${_MPI_LIB_NAME}" "lib${_MPI_LIB_NAME}" + HINTS ${_MPI_LIB_DIR} $ENV{MPI_LIB} + DOC "Location of the ${_MPI_PLAIN_LIB_NAME} library for MPI" + ) + mark_as_advanced(MPI_${_MPI_PLAIN_LIB_NAME}_LIBRARY) + endif() + endforeach() + endif() + endforeach() +endif() #============================================================================= unset(MPI_VERSION) @@ -1100,6 +1133,11 @@ unset(MPI_VERSION_MINOR) unset(_MPI_MIN_VERSION) +# If the user specified a library name we assume they prefer that library over a wrapper. If not, they can disable skipping manually. +if(NOT DEFINED MPI_SKIP_COMPILER_WRAPPER AND MPI_GUESS_LIBRARY_NAME) + set(MPI_SKIP_COMPILER_WRAPPER TRUE) +endif() + # This loop finds the compilers and sends them off for interrogation. foreach(LANG IN ITEMS C CXX Fortran) if(CMAKE_${LANG}_COMPILER_LOADED) @@ -1121,6 +1159,8 @@ foreach(LANG IN ITEMS C CXX Fortran) mark_as_advanced(MPI_CXX_SKIP_MPICXX) endif() if(NOT (MPI_${LANG}_LIB_NAMES AND (MPI_${LANG}_INCLUDE_PATH OR MPI_${LANG}_INCLUDE_DIRS OR MPI_${LANG}_ADDITIONAL_INCLUDE_DIRS))) + set(MPI_${LANG}_TRIED_IMPLICIT FALSE) + set(MPI_${LANG}_WORKS_IMPLICIT FALSE) if(NOT MPI_${LANG}_COMPILER AND NOT MPI_ASSUME_NO_BUILTIN_MPI) # Should the imported targets be empty, we effectively try whether the compiler supports MPI on its own, which is the case on e.g. # Cray PrgEnv. @@ -1130,80 +1170,90 @@ foreach(LANG IN ITEMS C CXX Fortran) # If the compiler can build MPI code on its own, it functions as an MPI compiler and we'll set the variable to point to it. if(MPI_${LANG}_WORKS) set(MPI_${LANG}_COMPILER "${CMAKE_${LANG}_COMPILER}" CACHE FILEPATH "MPI compiler for ${LANG}" FORCE) + set(MPI_${LANG}_WORKS_IMPLICIT TRUE) endif() + set(MPI_${LANG}_TRIED_IMPLICIT TRUE) endif() - # If the user specified a library name we assume they prefer that library over a wrapper. If not, they can disable skipping manually. - if(NOT DEFINED MPI_SKIP_COMPILER_WRAPPER AND MPI_GUESS_LIBRARY_NAME) - set(MPI_SKIP_COMPILER_WRAPPER TRUE) - endif() - if(NOT MPI_SKIP_COMPILER_WRAPPER) - if(MPI_${LANG}_COMPILER) - # If the user supplies a compiler *name* instead of an absolute path, assume that we need to find THAT compiler. - if (NOT IS_ABSOLUTE "${MPI_${LANG}_COMPILER}") - # Get rid of our default list of names and just search for the name the user wants. - set(_MPI_${LANG}_COMPILER_NAMES "${MPI_${LANG}_COMPILER}") - unset(MPI_${LANG}_COMPILER CACHE) + if(NOT "${MPI_${LANG}_COMPILER}" STREQUAL "${CMAKE_${LANG}_COMPILER}" OR NOT MPI_${LANG}_WORKS) + set(MPI_${LANG}_WRAPPER_FOUND FALSE) + set(MPI_PINNED_COMPILER FALSE) + + if(NOT MPI_SKIP_COMPILER_WRAPPER) + if(MPI_${LANG}_COMPILER) + # If the user supplies a compiler *name* instead of an absolute path, assume that we need to find THAT compiler. + if (NOT IS_ABSOLUTE "${MPI_${LANG}_COMPILER}") + # Get rid of our default list of names and just search for the name the user wants. + set(_MPI_${LANG}_COMPILER_NAMES "${MPI_${LANG}_COMPILER}") + unset(MPI_${LANG}_COMPILER CACHE) + endif() + # If the user specifies a compiler, we don't want to try to search libraries either. + set(MPI_PINNED_COMPILER TRUE) + endif() + + # If we have an MPI base directory, we'll try all compiler names in that one first. + # This should prevent mixing different MPI environments + if(_MPI_BASE_DIR) + find_program(MPI_${LANG}_COMPILER + NAMES ${_MPI_${LANG}_COMPILER_NAMES} + PATH_SUFFIXES bin sbin + HINTS ${_MPI_BASE_DIR} + NO_DEFAULT_PATH + DOC "MPI compiler for ${LANG}" + ) endif() - # If the user specifies a compiler, we don't want to try to search libraries either. - set(MPI_PINNED_COMPILER TRUE) - else() - set(MPI_PINNED_COMPILER FALSE) - endif() - # If we have an MPI base directory, we'll try all compiler names in that one first. - # This should prevent mixing different MPI environments - if(_MPI_BASE_DIR) + # If the base directory did not help (for example because the mpiexec isn't in the same directory as the compilers), + # we shall try searching in the default paths. find_program(MPI_${LANG}_COMPILER NAMES ${_MPI_${LANG}_COMPILER_NAMES} PATH_SUFFIXES bin sbin - HINTS ${_MPI_BASE_DIR} - NO_DEFAULT_PATH DOC "MPI compiler for ${LANG}" ) - endif() - # If the base directory did not help (for example because the mpiexec isn't in the same directory as the compilers), - # we shall try searching in the default paths. - find_program(MPI_${LANG}_COMPILER - NAMES ${_MPI_${LANG}_COMPILER_NAMES} - PATH_SUFFIXES bin sbin - DOC "MPI compiler for ${LANG}" - ) - - if(MPI_${LANG}_COMPILER STREQUAL CMAKE_${LANG}_COMPILER) - set(MPI_SKIP_GUESSING TRUE) - elseif(MPI_${LANG}_COMPILER) - _MPI_interrogate_compiler(${LANG}) - else() - set(MPI_${LANG}_WRAPPER_FOUND FALSE) + if("${MPI_${LANG}_COMPILER}" STREQUAL "${CMAKE_${LANG}_COMPILER}") + set(MPI_PINNED_COMPILER TRUE) + + # If we haven't made the implicit compiler test yet, perform it now. + if(NOT MPI_${LANG}_TRIED_IMPLICIT) + _MPI_create_imported_target(${LANG}) + _MPI_check_lang_works(${LANG}) + endif() + + # Should the MPI compiler not work implicitly for MPI, still interrogate it. + # Otherwise, MPI compilers for which CMake has separate linking stages, e.g. Intel MPI on Windows where link.exe is being used + # directly during linkage instead of CMAKE__COMPILER will not work. + if(NOT MPI_${LANG}_WORKS) + set(MPI_${LANG}_WORKS_IMPLICIT FALSE) + _MPI_interrogate_compiler(${LANG}) + else() + set(MPI_${LANG}_WORKS_IMPLICIT TRUE) + endif() + elseif(MPI_${LANG}_COMPILER) + _MPI_interrogate_compiler(${LANG}) + endif() endif() - else() - set(MPI_${LANG}_WRAPPER_FOUND FALSE) - set(MPI_PINNED_COMPILER FALSE) - endif() - if(NOT MPI_${LANG}_WRAPPER_FOUND AND NOT MPI_PINNED_COMPILER) - # For C++, we may use the settings for C. Should a given compiler wrapper for C++ not exist, but one for C does, we copy over the - # settings for C. An MPI distribution that is in this situation would be IBM Platform MPI. - if("${LANG}" STREQUAL "CXX" AND MPI_C_WRAPPER_FOUND) - set(MPI_${LANG}_COMPILE_OPTIONS ${MPI_C_COMPILE_OPTIONS} CACHE STRING "MPI ${LANG} compilation options" ) - set(MPI_${LANG}_COMPILE_DEFINITIONS ${MPI_C_COMPILE_DEFINITIONS} CACHE STRING "MPI ${LANG} compilation definitions" ) - set(MPI_${LANG}_ADDITIONAL_INCLUDE_DIRS ${MPI_C_INCLUDE_DIRS} CACHE STRING "MPI ${LANG} additional include directories") - set(MPI_${LANG}_LINK_FLAGS ${MPI_C_LINK_FLAGS} CACHE STRING "MPI ${LANG} linker flags" ) - set(MPI_${LANG}_LIB_NAMES ${MPI_C_LIB_NAMES} CACHE STRING "MPI ${LANG} libraries to link against" ) - set(MPI_${LANG}_WRAPPER_FOUND TRUE) - elseif(NOT MPI_SKIP_GUESSING) - _MPI_guess_settings(${LANG}) + if(NOT MPI_SKIP_GUESSING AND NOT MPI_${LANG}_WRAPPER_FOUND AND NOT MPI_PINNED_COMPILER) + # For C++, we may use the settings for C. Should a given compiler wrapper for C++ not exist, but one for C does, we copy over the + # settings for C. An MPI distribution that is in this situation would be IBM Platform MPI. + if("${LANG}" STREQUAL "CXX" AND MPI_C_WRAPPER_FOUND) + set(MPI_${LANG}_COMPILE_OPTIONS ${MPI_C_COMPILE_OPTIONS} CACHE STRING "MPI ${LANG} compilation options" ) + set(MPI_${LANG}_COMPILE_DEFINITIONS ${MPI_C_COMPILE_DEFINITIONS} CACHE STRING "MPI ${LANG} compilation definitions" ) + set(MPI_${LANG}_ADDITIONAL_INCLUDE_DIRS ${MPI_C_INCLUDE_DIRS} CACHE STRING "MPI ${LANG} additional include directories") + set(MPI_${LANG}_LINK_FLAGS ${MPI_C_LINK_FLAGS} CACHE STRING "MPI ${LANG} linker flags" ) + set(MPI_${LANG}_LIB_NAMES ${MPI_C_LIB_NAMES} CACHE STRING "MPI ${LANG} libraries to link against" ) + else() + _MPI_guess_settings(${LANG}) + endif() endif() endif() endif() _MPI_split_include_dirs(${LANG}) - if(NOT MPI_${LANG}_COMPILER STREQUAL CMAKE_${LANG}_COMPILER) - _MPI_assemble_include_dirs(${LANG}) - _MPI_assemble_libraries(${LANG}) - endif() + _MPI_assemble_include_dirs(${LANG}) + _MPI_assemble_libraries(${LANG}) + _MPI_adjust_compile_definitions(${LANG}) # We always create imported targets even if they're empty _MPI_create_imported_target(${LANG}) @@ -1217,7 +1267,9 @@ foreach(LANG IN ITEMS C CXX Fortran) set(MPI_${LANG}_COMPILE_DEFINITIONS "" CACHE STRING "MPI ${LANG} compilation definitions" ) set(MPI_${LANG}_ADDITIONAL_INCLUDE_DIRS "" CACHE STRING "MPI ${LANG} additional include directories") set(MPI_${LANG}_LINK_FLAGS "" CACHE STRING "MPI ${LANG} linker flags" ) - set(MPI_${LANG}_LIB_NAMES "" CACHE STRING "MPI ${LANG} libraries to link against" ) + if(NOT MPI_${LANG}_COMPILER STREQUAL CMAKE_${LANG}_COMPILER) + set(MPI_${LANG}_LIB_NAMES "" CACHE STRING "MPI ${LANG} libraries to link against" ) + endif() mark_as_advanced(MPI_${LANG}_COMPILE_OPTIONS MPI_${LANG}_COMPILE_DEFINITIONS MPI_${LANG}_LINK_FLAGS MPI_${LANG}_LIB_NAMES MPI_${LANG}_ADDITIONAL_INCLUDE_DIRS MPI_${LANG}_COMPILER) @@ -1337,7 +1389,7 @@ foreach(LANG IN ITEMS C CXX Fortran) set(MPI_${LANG}_FIND_VERSION_EXACT ${MPI_FIND_VERSION_EXACT}) unset(MPI_${LANG}_REQUIRED_VARS) - if (MPI_${LANG}_WRAPPER_FOUND OR MPI_${LANG}_GUESS_FOUND) + if (NOT "${MPI_${LANG}_COMPILER}" STREQUAL "${CMAKE_${LANG}_COMPILER}") foreach(mpilibname IN LISTS MPI_${LANG}_LIB_NAMES) list(APPEND MPI_${LANG}_REQUIRED_VARS "MPI_${mpilibname}_LIBRARY") endforeach() @@ -1448,6 +1500,7 @@ if (MPI_NUMLIBS GREATER 1) else() set(MPI_EXTRA_LIBRARY "MPI_EXTRA_LIBRARY-NOTFOUND") endif() +set(MPI_IGNORE_LEGACY_VARIABLES TRUE) #============================================================================= # unset these vars to cleanup namespace diff --git a/release_docs/RELEASE.txt b/release_docs/RELEASE.txt index 2227f92..427fc8b 100644 --- a/release_docs/RELEASE.txt +++ b/release_docs/RELEASE.txt @@ -352,6 +352,15 @@ Bug Fixes since HDF5-1.10.1 release ------------- - cmake + The hdf5 fortran utility H5match_types needs to include mpi.h when + parallel is enabled.. + + Added target_include_directories command to H5match_types executable.. + + (ADB - 2017/12/20) + + - cmake + The hdf5 library used shared szip and zlib, which needlessly required applications to link with the same szip and zlib libraries. @@ -367,7 +376,7 @@ Bug Fixes since HDF5-1.10.1 release CMake implementation for MPI was problematic and would create incorrect MPI library references in the hdf5 libraries. - Reworked the CMake MPI code to properly create CMake targets.Also merged + Reworked the CMake MPI code to properly create CMake targets. Also merged the latest CMake FindMPI.cmake changes to the local copy. This is necessary until HDF changes the CMake minimum to 3.9 or greater. -- cgit v0.12 From a17349a872f1c5b3457a8777e8f67a00587769e2 Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Wed, 20 Dec 2017 13:42:23 -0600 Subject: Reworked MPI includes to be used as default with parallel --- CMakeLists.txt | 1 + examples/CMakeLists.txt | 4 +-- fortran/src/CMakeLists.txt | 3 -- release_docs/RELEASE.txt | 9 ------ src/CMakeLists.txt | 12 -------- test/CMakeTests.cmake | 75 +++++++++++++++++++++++++++------------------- 6 files changed, 47 insertions(+), 57 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index e22ac2e..6165b35 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -631,6 +631,7 @@ if (HDF5_ENABLE_PARALLEL) # Used by Fortran + MPI CHECK_SYMBOL_EXISTS (MPI_Comm_c2f "${MPI_C_INCLUDE_DIRS}/mpi.h" H5_HAVE_MPI_MULTI_LANG_Comm) CHECK_SYMBOL_EXISTS (MPI_Info_c2f "${MPI_C_INCLUDE_DIRS}/mpi.h" H5_HAVE_MPI_MULTI_LANG_Info) + INCLUDE_DIRECTORIES (${MPI_C_INCLUDE_DIRS}) else () message (STATUS "Parallel libraries not found") endif () diff --git a/examples/CMakeLists.txt b/examples/CMakeLists.txt index d8eb1a2..04a99ce 100644 --- a/examples/CMakeLists.txt +++ b/examples/CMakeLists.txt @@ -63,13 +63,13 @@ if (H5_HAVE_PARALLEL) add_executable (ph5example ${HDF5_EXAMPLES_SOURCE_DIR}/ph5example.c) TARGET_NAMING (ph5example STATIC) TARGET_C_PROPERTIES (ph5example STATIC " " " ") - target_link_libraries (ph5example ${HDF5_LIB_TARGET}) + target_link_libraries (ph5example ${HDF5_LIB_TARGET} ${MPI_C_LIBRARIES}) set_target_properties (ph5example PROPERTIES FOLDER examples) if (BUILD_SHARED_LIBS) add_executable (ph5example-shared ${HDF5_EXAMPLES_SOURCE_DIR}/ph5example.c) TARGET_NAMING (ph5example-shared SHARED) TARGET_C_PROPERTIES (ph5example-shared SHARED " " " ") - target_link_libraries (ph5example-shared ${HDF5_LIBSH_TARGET}) + target_link_libraries (ph5example-shared ${HDF5_LIBSH_TARGET} ${MPI_C_LIBRARIES}) set_target_properties (ph5example-shared PROPERTIES FOLDER examples) endif () endif () diff --git a/fortran/src/CMakeLists.txt b/fortran/src/CMakeLists.txt index a898130..18d6d80 100644 --- a/fortran/src/CMakeLists.txt +++ b/fortran/src/CMakeLists.txt @@ -85,9 +85,6 @@ add_executable (H5match_types ${HDF5_F90_BINARY_DIR}/H5fort_type_defines.h ${HDF5_F90_SRC_SOURCE_DIR}/H5match_types.c ) -if (H5_HAVE_PARALLEL AND MPI_C_FOUND) - target_include_directories (H5match_types PUBLIC ${MPI_C_INCLUDE_DIRS}) -endif () set (CMD $) add_custom_command ( OUTPUT ${HDF5_F90_BINARY_DIR}/H5f90i_gen.h diff --git a/release_docs/RELEASE.txt b/release_docs/RELEASE.txt index 427fc8b..fb61a76 100644 --- a/release_docs/RELEASE.txt +++ b/release_docs/RELEASE.txt @@ -352,15 +352,6 @@ Bug Fixes since HDF5-1.10.1 release ------------- - cmake - The hdf5 fortran utility H5match_types needs to include mpi.h when - parallel is enabled.. - - Added target_include_directories command to H5match_types executable.. - - (ADB - 2017/12/20) - - - cmake - The hdf5 library used shared szip and zlib, which needlessly required applications to link with the same szip and zlib libraries. diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 1d217c6..0552244 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -849,9 +849,6 @@ endif () #----------------------------------------------------------------------------- add_executable (H5detect ${HDF5_SRC_DIR}/H5detect.c) TARGET_C_PROPERTIES (H5detect STATIC " " " ") -if (H5_HAVE_PARALLEL AND MPI_C_FOUND) - target_include_directories (H5detect PUBLIC ${MPI_C_INCLUDE_DIRS}) -endif () if (MSVC OR MINGW) target_link_libraries (H5detect "ws2_32.lib") endif () @@ -866,9 +863,6 @@ add_custom_command ( add_executable (H5make_libsettings ${HDF5_SRC_DIR}/H5make_libsettings.c) TARGET_C_PROPERTIES (H5make_libsettings STATIC " " " ") -if (H5_HAVE_PARALLEL AND MPI_C_FOUND) - target_include_directories (H5make_libsettings PUBLIC ${MPI_C_INCLUDE_DIRS}) -endif () if (MSVC OR MINGW) target_link_libraries (H5make_libsettings "ws2_32.lib") endif () @@ -893,9 +887,6 @@ target_link_libraries (${HDF5_LIB_TARGET} PRIVATE ${LINK_LIBS} ${LINK_COMP_LIBS} if (NOT WIN32) target_link_libraries (${HDF5_LIB_TARGET} PUBLIC ${CMAKE_DL_LIBS}) endif () -if (H5_HAVE_PARALLEL AND MPI_C_FOUND) - target_include_directories (${HDF5_LIB_TARGET} PUBLIC ${MPI_C_INCLUDE_DIRS}) -endif () set_global_variable (HDF5_LIBRARIES_TO_EXPORT ${HDF5_LIB_TARGET}) H5_SET_LIB_OPTIONS (${HDF5_LIB_TARGET} ${HDF5_LIB_NAME} STATIC) set_target_properties (${HDF5_LIB_TARGET} PROPERTIES @@ -937,9 +928,6 @@ if (BUILD_SHARED_LIBS) if (NOT WIN32) target_link_libraries (${HDF5_LIBSH_TARGET} PUBLIC ${CMAKE_DL_LIBS}) endif () - if (H5_HAVE_PARALLEL AND MPI_C_FOUND) - target_include_directories (${HDF5_LIBSH_TARGET} PUBLIC ${MPI_C_INCLUDE_DIRS}) - endif () set_global_variable (HDF5_LIBRARIES_TO_EXPORT "${HDF5_LIBRARIES_TO_EXPORT};${HDF5_LIBSH_TARGET}") H5_SET_LIB_OPTIONS (${HDF5_LIBSH_TARGET} ${HDF5_LIB_NAME} SHARED ${HDF5_PACKAGE_SOVERSION}) set_target_properties (${HDF5_LIBSH_TARGET} PROPERTIES diff --git a/test/CMakeTests.cmake b/test/CMakeTests.cmake index 973d389..ae99be1 100644 --- a/test/CMakeTests.cmake +++ b/test/CMakeTests.cmake @@ -452,7 +452,6 @@ set (test_CLEANFILES extlinks19B00026.h5 extlinks19B00027.h5 extlinks19B00028.h5 - tmp big.data big*.h5 stdio.h5 @@ -839,21 +838,28 @@ add_test (NAME H5TEST-clear-error_test-objects WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/H5TEST ) -add_test (NAME H5TEST-error_test COMMAND "${CMAKE_COMMAND}" - -D "TEST_PROGRAM=$" - -D "TEST_ARGS:STRING=" - -D "TEST_EXPECT=0" - -D "TEST_MASK_ERROR=true" - -D "TEST_OUTPUT=error_test.txt" - -D "TEST_REFERENCE=error_test_1" - -D "TEST_FOLDER=${PROJECT_BINARY_DIR}/H5TEST" - -P "${HDF_RESOURCES_EXT_DIR}/runTest.cmake" -) -set_tests_properties (H5TEST-error_test PROPERTIES - DEPENDS H5TEST-clear-error_test-objects - ENVIRONMENT "srcdir=${HDF5_TEST_BINARY_DIR}/H5TEST;HDF5_PLUGIN_PRELOAD=::" - WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/H5TEST -) +if (HDF5_USE_16_API_DEFAULT) + add_test ( + NAME H5TEST-error_test-SKIPPED + COMMAND ${CMAKE_COMMAND} -E echo "SKIP $" + ) +else () + add_test (NAME H5TEST-error_test COMMAND "${CMAKE_COMMAND}" + -D "TEST_PROGRAM=$" + -D "TEST_ARGS:STRING=" + -D "TEST_EXPECT=0" + -D "TEST_MASK_ERROR=true" + -D "TEST_OUTPUT=error_test.txt" + -D "TEST_REFERENCE=error_test_1" + -D "TEST_FOLDER=${PROJECT_BINARY_DIR}/H5TEST" + -P "${HDF_RESOURCES_EXT_DIR}/runTest.cmake" + ) + set_tests_properties (H5TEST-error_test PROPERTIES + DEPENDS H5TEST-clear-error_test-objects + ENVIRONMENT "srcdir=${HDF5_TEST_BINARY_DIR}/H5TEST;HDF5_PLUGIN_PRELOAD=::" + WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/H5TEST + ) +endif () #-- Adding test for links_env add_test (NAME H5TEST-clear-links_env-objects @@ -959,21 +965,28 @@ if (BUILD_SHARED_LIBS) WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/H5TEST-shared ) - add_test (NAME H5TEST-shared-error_test COMMAND "${CMAKE_COMMAND}" - -D "TEST_PROGRAM=$" - -D "TEST_ARGS:STRING=" - -D "TEST_EXPECT=0" - -D "TEST_MASK_ERROR=true" - -D "TEST_OUTPUT=error_test.txt" - -D "TEST_REFERENCE=error_test_1" - -D "TEST_FOLDER=${PROJECT_BINARY_DIR}/H5TEST-shared" - -P "${HDF_RESOURCES_EXT_DIR}/runTest.cmake" - ) - set_tests_properties (H5TEST-shared-error_test PROPERTIES - DEPENDS H5TEST-shared-clear-error_test-objects - ENVIRONMENT "srcdir=${HDF5_TEST_BINARY_DIR}/H5TEST-shared;HDF5_PLUGIN_PRELOAD=::" - WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/H5TEST-shared - ) + if (HDF5_USE_16_API_DEFAULT) + add_test ( + NAME H5TEST-shared-error_test-SKIPPED + COMMAND ${CMAKE_COMMAND} -E echo "SKIP $" + ) + else () + add_test (NAME H5TEST-shared-error_test COMMAND "${CMAKE_COMMAND}" + -D "TEST_PROGRAM=$" + -D "TEST_ARGS:STRING=" + -D "TEST_EXPECT=0" + -D "TEST_MASK_ERROR=true" + -D "TEST_OUTPUT=error_test.txt" + -D "TEST_REFERENCE=error_test_1" + -D "TEST_FOLDER=${PROJECT_BINARY_DIR}/H5TEST-shared" + -P "${HDF_RESOURCES_EXT_DIR}/runTest.cmake" + ) + set_tests_properties (H5TEST-shared-error_test PROPERTIES + DEPENDS H5TEST-shared-clear-error_test-objects + ENVIRONMENT "srcdir=${HDF5_TEST_BINARY_DIR}/H5TEST-shared;HDF5_PLUGIN_PRELOAD=::" + WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/H5TEST-shared + ) + endif () #-- Adding test for links_env add_test (NAME H5TEST-shared-clear-links_env-objects -- cgit v0.12 From 877d980ee45303385c60272607215365848fce47 Mon Sep 17 00:00:00 2001 From: Vailin Choi Date: Wed, 20 Dec 2017 17:17:10 -0600 Subject: Add description to RELEASE.txt for HDFFV-9947 H5Sencode fix for 1.10. --- release_docs/RELEASE.txt | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/release_docs/RELEASE.txt b/release_docs/RELEASE.txt index fb61a76..ca5af91 100644 --- a/release_docs/RELEASE.txt +++ b/release_docs/RELEASE.txt @@ -237,6 +237,13 @@ Bug Fixes since HDF5-1.10.1 release (ADB - 2017/12/18, HDFFV-10307) + - Fix H5Sencode bug when num points selected is >2^32 + + Selected and applied coding changes implemented for 1.12 + H5Sencode to 1.10. + + (HDFFV-9947, VC, 2017/11/28) + - filter plugin handling in H5PL.c and H5Z.c It was discovered that the dynamic loading process used by -- cgit v0.12 From 2d330e96b8998c4ae6139b671e1cd39fdb3e7fd2 Mon Sep 17 00:00:00 2001 From: Vailin Choi Date: Thu, 21 Dec 2017 12:57:10 -0600 Subject: Modify description in RELEASE.txt for HDFFV-9947 H5Sencode. --- release_docs/RELEASE.txt | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/release_docs/RELEASE.txt b/release_docs/RELEASE.txt index ca5af91..796a4a0 100644 --- a/release_docs/RELEASE.txt +++ b/release_docs/RELEASE.txt @@ -237,12 +237,21 @@ Bug Fixes since HDF5-1.10.1 release (ADB - 2017/12/18, HDFFV-10307) - - Fix H5Sencode bug when num points selected is >2^32 + - Fix H5Sencode() bug when the number of elements selected is > 2^32 - Selected and applied coding changes implemented for 1.12 - H5Sencode to 1.10. + H5Sencode() incorrectly encodes dataspace selection with number of + elements exceeding 2^32. When decoding such selection via H5Sdecode(), + the number of elements in the decoded dataspace is not the same as + what is encoded. This problem exists for H5S_SEL_HYPER and + H5S_SEL_POINTS encoding. - (HDFFV-9947, VC, 2017/11/28) + The cause of the problem is because the library uses 32 bits to + encode counts and block offsets for the selection. + The solution is to use the original 32 bit encodings if possible, + but use a different way to encode selection > 32 bits when needed. + See details in the RFC: H5Sencode/H5Secode Format Change. + + (VC - 2017/11/28, HDFFV-9947) - filter plugin handling in H5PL.c and H5Z.c -- cgit v0.12 From 1efe978ae0ea97272d1796e43b1cb1b0f4e58272 Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Thu, 21 Dec 2017 13:48:39 -0600 Subject: Fix library interface commands, add missing JNI --- CMakeLists.txt | 3 - c++/src/CMakeLists.txt | 4 +- hl/c++/src/CMakeLists.txt | 12 +- hl/fortran/src/CMakeLists.txt | 8 +- hl/src/CMakeLists.txt | 4 +- java/src/hdf/hdf5lib/H5.java | 135 +++- java/src/hdf/hdf5lib/HDF5Constants.java | 3 + java/src/hdf/overview.html | 6 +- java/src/jni/CMakeLists.txt | 2 +- java/src/jni/h5Constants.c | 2 + java/src/jni/h5pImp.c | 144 ++++ java/src/jni/h5pImp.h | 55 +- java/test/JUnit-interface.txt | 6 +- java/test/TestH5P.java | 53 +- java/test/TestH5Pfapl.java | 14 + release_docs/RELEASE.txt | 11 + test/CMakeLists.txt | 26 +- test/vds.c | 1086 ++++++++++++++----------------- testpar/CMakeLists.txt | 10 +- tools/lib/CMakeLists.txt | 10 +- 20 files changed, 930 insertions(+), 664 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 6165b35..d4e6300 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -640,7 +640,6 @@ endif () # Parallel IO usage requires MPI to be Linked and Included if (H5_HAVE_PARALLEL) set (LINK_LIBS ${LINK_LIBS} ${MPI_C_LIBRARIES}) - set (LINK_SHARED_LIBS ${LINK_SHARED_LIBS} ${MPI_C_LIBRARIES}) if (MPI_C_LINK_FLAGS) set (CMAKE_EXE_LINKER_FLAGS "${MPI_C_LINK_FLAGS} ${CMAKE_EXE_LINKER_FLAGS}") endif () @@ -865,7 +864,6 @@ if (EXISTS "${HDF5_SOURCE_DIR}/fortran" AND IS_DIRECTORY "${HDF5_SOURCE_DIR}/for include (${HDF_RESOURCES_DIR}/HDF5UseFortran.cmake) set (LINK_Fortran_LIBS ${LINK_LIBS}) - set (LINK_Fortran_SHARED_LIBS ${LINK_SHARED_LIBS}) if (HDF5_ENABLE_F2003) if (NOT FORTRAN_HAVE_ISO_C_BINDING) @@ -876,7 +874,6 @@ if (EXISTS "${HDF5_SOURCE_DIR}/fortran" AND IS_DIRECTORY "${HDF5_SOURCE_DIR}/for # Parallel IO usage requires MPI to be Linked and Included if (H5_HAVE_PARALLEL) set (LINK_Fortran_LIBS ${LINK_Fortran_LIBS} ${MPI_Fortran_LIBRARIES}) - set (LINK_Fortran_SHARED_LIBS ${LINK_Fortran_SHARED_LIBS} ${MPI_Fortran_LIBRARIES}) if (MPI_Fortran_LINK_FLAGS) set (CMAKE_Fortran_EXE_LINKER_FLAGS "${MPI_Fortran_LINK_FLAGS} ${CMAKE_EXE_LINKER_FLAGS}") endif () diff --git a/c++/src/CMakeLists.txt b/c++/src/CMakeLists.txt index b147cfa..3b9a0c3 100644 --- a/c++/src/CMakeLists.txt +++ b/c++/src/CMakeLists.txt @@ -82,7 +82,7 @@ set (CPP_HDRS add_library (${HDF5_CPP_LIB_TARGET} STATIC ${CPP_SOURCES} ${CPP_HDRS}) TARGET_C_PROPERTIES (${HDF5_CPP_LIB_TARGET} STATIC " " " ") -target_link_libraries (${HDF5_CPP_LIB_TARGET} ${HDF5_LIB_TARGET}) +target_link_libraries (${HDF5_CPP_LIB_TARGET} PUBLIC ${HDF5_LIB_TARGET}) set_global_variable (HDF5_LIBRARIES_TO_EXPORT "${HDF5_LIBRARIES_TO_EXPORT};${HDF5_CPP_LIB_TARGET}") H5_SET_LIB_OPTIONS (${HDF5_CPP_LIB_TARGET} ${HDF5_CPP_LIB_NAME} STATIC) set_target_properties (${HDF5_CPP_LIB_TARGET} PROPERTIES @@ -94,7 +94,7 @@ set (install_targets ${HDF5_CPP_LIB_TARGET}) if (BUILD_SHARED_LIBS) add_library (${HDF5_CPP_LIBSH_TARGET} SHARED ${CPP_SOURCES} ${CPP_HDRS}) TARGET_C_PROPERTIES (${HDF5_CPP_LIBSH_TARGET} SHARED " " " ") - target_link_libraries (${HDF5_CPP_LIBSH_TARGET} ${HDF5_LIBSH_TARGET}) + target_link_libraries (${HDF5_CPP_LIBSH_TARGET} PUBLIC ${HDF5_LIBSH_TARGET}) set_global_variable (HDF5_LIBRARIES_TO_EXPORT "${HDF5_LIBRARIES_TO_EXPORT};${HDF5_CPP_LIBSH_TARGET}") H5_SET_LIB_OPTIONS (${HDF5_CPP_LIBSH_TARGET} ${HDF5_CPP_LIB_NAME} SHARED ${HDF5_CXX_PACKAGE_SOVERSION}) set_target_properties (${HDF5_CPP_LIBSH_TARGET} PROPERTIES diff --git a/hl/c++/src/CMakeLists.txt b/hl/c++/src/CMakeLists.txt index 38604cd..70f0a79 100644 --- a/hl/c++/src/CMakeLists.txt +++ b/hl/c++/src/CMakeLists.txt @@ -12,11 +12,7 @@ set (HDF5_HL_CPP_HDRS ${HDF5_HL_CPP_SRC_SOURCE_DIR}/H5PacketTable.h) add_library (${HDF5_HL_CPP_LIB_TARGET} STATIC ${HDF5_HL_CPP_SOURCES}) TARGET_C_PROPERTIES (${HDF5_HL_CPP_LIB_TARGET} STATIC " " " ") -target_link_libraries ( - ${HDF5_HL_CPP_LIB_TARGET} - ${HDF5_HL_LIB_TARGET} - ${HDF5_LIB_TARGET} -) +target_link_libraries (${HDF5_HL_CPP_LIB_TARGET} PUBLIC ${HDF5_HL_LIB_TARGET} ${HDF5_LIB_TARGET}) set_global_variable (HDF5_LIBRARIES_TO_EXPORT "${HDF5_LIBRARIES_TO_EXPORT};${HDF5_HL_CPP_LIB_TARGET}") H5_SET_LIB_OPTIONS (${HDF5_HL_CPP_LIB_TARGET} ${HDF5_HL_CPP_LIB_NAME} STATIC) set_target_properties (${HDF5_HL_CPP_LIB_TARGET} PROPERTIES @@ -28,11 +24,7 @@ set (install_targets ${HDF5_HL_CPP_LIB_TARGET}) if (BUILD_SHARED_LIBS) add_library (${HDF5_HL_CPP_LIBSH_TARGET} SHARED ${HDF5_HL_CPP_SOURCES}) TARGET_C_PROPERTIES (${HDF5_HL_CPP_LIBSH_TARGET} SHARED " " " ") - target_link_libraries ( - ${HDF5_HL_CPP_LIBSH_TARGET} - ${HDF5_HL_LIBSH_TARGET} - ${HDF5_LIBSH_TARGET} - ) + target_link_libraries (${HDF5_HL_CPP_LIBSH_TARGET} PUBLIC ${HDF5_HL_LIBSH_TARGET} ${HDF5_LIBSH_TARGET}) set_global_variable (HDF5_LIBRARIES_TO_EXPORT "${HDF5_LIBRARIES_TO_EXPORT};${HDF5_HL_CPP_LIBSH_TARGET}") H5_SET_LIB_OPTIONS (${HDF5_HL_CPP_LIBSH_TARGET} ${HDF5_HL_CPP_LIB_NAME} SHARED ${HDF5_HL_CXX_PACKAGE_SOVERSION}) set_target_properties (${HDF5_HL_CPP_LIBSH_TARGET} PROPERTIES diff --git a/hl/fortran/src/CMakeLists.txt b/hl/fortran/src/CMakeLists.txt index c870aed..3fc66c4 100644 --- a/hl/fortran/src/CMakeLists.txt +++ b/hl/fortran/src/CMakeLists.txt @@ -77,7 +77,7 @@ set (HDF5_HL_F90_HEADERS ${HDF5_HL_F90_SRC_SOURCE_DIR}/H5LTf90proto.h) add_library (${HDF5_HL_F90_C_LIB_TARGET} STATIC ${HDF5_HL_F90_C_SOURCES} ${HDF5_HL_F90_HEADERS}) TARGET_C_PROPERTIES (${HDF5_HL_F90_C_LIB_TARGET} STATIC " " " ") -target_link_libraries (${HDF5_HL_F90_C_LIB_TARGET} ${HDF5_F90_C_LIB_TARGET} ${HDF5_HL_LIB_TARGET}) +target_link_libraries (${HDF5_HL_F90_C_LIB_TARGET} PUBLIC ${HDF5_F90_C_LIB_TARGET} ${HDF5_HL_LIB_TARGET}) set_global_variable (HDF5_LIBRARIES_TO_EXPORT "${HDF5_LIBRARIES_TO_EXPORT};${HDF5_HL_F90_C_LIB_TARGET}") H5_SET_LIB_OPTIONS (${HDF5_HL_F90_C_LIB_TARGET} ${HDF5_HL_F90_C_LIB_NAME} STATIC) set_target_properties (${HDF5_HL_F90_C_LIB_TARGET} PROPERTIES @@ -90,7 +90,7 @@ set (install_targets ${HDF5_HL_F90_C_LIB_TARGET}) if (BUILD_SHARED_LIBS) add_library (${HDF5_HL_F90_C_LIBSH_TARGET} SHARED ${HDF5_HL_F90_C_SOURCES} ${HDF5_HL_F90_HEADERS}) TARGET_C_PROPERTIES (${HDF5_HL_F90_C_LIBSH_TARGET} SHARED " " " ") - target_link_libraries (${HDF5_HL_F90_C_LIBSH_TARGET} ${HDF5_F90_C_LIBSH_TARGET} ${HDF5_HL_LIBSH_TARGET}) + target_link_libraries (${HDF5_HL_F90_C_LIBSH_TARGET} PUBLIC ${HDF5_F90_C_LIBSH_TARGET} ${HDF5_HL_LIBSH_TARGET}) set_global_variable (HDF5_LIBRARIES_TO_EXPORT "${HDF5_LIBRARIES_TO_EXPORT};${HDF5_HL_F90_C_LIBSH_TARGET}") H5_SET_LIB_OPTIONS (${HDF5_HL_F90_C_LIBSH_TARGET} ${HDF5_HL_F90_C_LIB_NAME} SHARED ${HDF5_HL_F_PACKAGE_SOVERSION}) set_target_properties (${HDF5_HL_F90_C_LIBSH_TARGET} PROPERTIES @@ -170,7 +170,7 @@ endif () add_library (${HDF5_HL_F90_LIB_TARGET} STATIC ${HDF5_HL_F90_F_SOURCES}) TARGET_FORTRAN_PROPERTIES (${HDF5_HL_F90_LIB_TARGET} STATIC " " " ") -target_link_libraries (${HDF5_HL_F90_LIB_TARGET} ${HDF5_HL_F90_C_LIB_TARGET} ${HDF5_F90_LIB_TARGET}) +target_link_libraries (${HDF5_HL_F90_LIB_TARGET} PUBLIC ${HDF5_HL_F90_C_LIB_TARGET} ${HDF5_F90_LIB_TARGET}) set_global_variable (HDF5_LIBRARIES_TO_EXPORT "${HDF5_LIBRARIES_TO_EXPORT};${HDF5_HL_F90_LIB_TARGET}") H5_SET_LIB_OPTIONS (${HDF5_HL_F90_LIB_TARGET} ${HDF5_HL_F90_LIB_NAME} STATIC) set_target_properties (${HDF5_HL_F90_LIB_TARGET} PROPERTIES @@ -194,7 +194,7 @@ if (BUILD_SHARED_LIBS) set (SHARED_LINK_FLAGS "/DLL /DEF:${HDF5_HL_F90_SRC_BINARY_DIR}/hdf5_hl_fortrandll.def") endif () TARGET_FORTRAN_PROPERTIES (${HDF5_HL_F90_LIBSH_TARGET} SHARED " " ${SHARED_LINK_FLAGS}) - target_link_libraries (${HDF5_HL_F90_LIBSH_TARGET} ${HDF5_HL_F90_C_LIBSH_TARGET} ${HDF5_F90_LIBSH_TARGET}) + target_link_libraries (${HDF5_HL_F90_LIBSH_TARGET} PUBLIC ${HDF5_HL_F90_C_LIBSH_TARGET} ${HDF5_F90_LIBSH_TARGET}) set_global_variable (HDF5_LIBRARIES_TO_EXPORT "${HDF5_LIBRARIES_TO_EXPORT};${HDF5_HL_F90_LIBSH_TARGET}") H5_SET_LIB_OPTIONS (${HDF5_HL_F90_LIBSH_TARGET} ${HDF5_HL_F90_LIB_NAME} SHARED ${HDF5_HL_F_PACKAGE_SOVERSION}) set_target_properties (${HDF5_HL_F90_LIBSH_TARGET} PROPERTIES diff --git a/hl/src/CMakeLists.txt b/hl/src/CMakeLists.txt index 86472fb..3dd6ce8 100644 --- a/hl/src/CMakeLists.txt +++ b/hl/src/CMakeLists.txt @@ -31,7 +31,7 @@ set (HL_HEADERS add_library (${HDF5_HL_LIB_TARGET} STATIC ${HL_SOURCES} ${HL_HEADERS}) TARGET_C_PROPERTIES (${HDF5_HL_LIB_TARGET} STATIC " " " ") -target_link_libraries (${HDF5_HL_LIB_TARGET} ${HDF5_LIB_TARGET}) +target_link_libraries (${HDF5_HL_LIB_TARGET} PUBLIC ${HDF5_LIB_TARGET}) H5_SET_LIB_OPTIONS (${HDF5_HL_LIB_TARGET} ${HDF5_HL_LIB_NAME} STATIC) set_target_properties (${HDF5_HL_LIB_TARGET} PROPERTIES FOLDER libraries/hl @@ -43,7 +43,7 @@ set (install_targets ${HDF5_HL_LIB_TARGET}) if (BUILD_SHARED_LIBS) add_library (${HDF5_HL_LIBSH_TARGET} SHARED ${HL_SOURCES} ${HL_HEADERS}) TARGET_C_PROPERTIES (${HDF5_HL_LIBSH_TARGET} SHARED " " " ") - target_link_libraries (${HDF5_HL_LIBSH_TARGET} ${HDF5_LIBSH_TARGET}) + target_link_libraries (${HDF5_HL_LIBSH_TARGET} PUBLIC ${HDF5_LIBSH_TARGET}) H5_SET_LIB_OPTIONS (${HDF5_HL_LIBSH_TARGET} ${HDF5_HL_LIB_NAME} SHARED ${HDF5_HL_PACKAGE_SOVERSION}) set_target_properties (${HDF5_HL_LIBSH_TARGET} PROPERTIES FOLDER libraries/hl diff --git a/java/src/hdf/hdf5lib/H5.java b/java/src/hdf/hdf5lib/H5.java index 35b61bd..17be736 100644 --- a/java/src/hdf/hdf5lib/H5.java +++ b/java/src/hdf/hdf5lib/H5.java @@ -4451,7 +4451,7 @@ public class H5 implements java.io.Serializable { // // // //////////////////////////////////////////////////////////// - // Generic property list routines + // /////// Generic property list routines /////// /** * H5Pget_class_name retrieves the name of a generic property list class @@ -4767,7 +4767,7 @@ public class H5 implements java.io.Serializable { public synchronized static native int H5Piterate(long plist, int[] idx, H5P_iterate_cb op, H5P_iterate_t op_data) throws HDF5LibraryException; - // Object creation property list (OCPL) routines + // /////// Object creation property list (OCPL) routines /////// /** * H5Pget_attr_phase_change retrieves attribute storage phase change thresholds. @@ -5071,7 +5071,7 @@ public class H5 implements java.io.Serializable { public synchronized static native int H5Pset_fletcher32(long plist) throws HDF5LibraryException, NullPointerException; - // File creation property list (FCPL) routines + // /////// File creation property list (FCPL) routines /////// /** * H5Pget_userblock retrieves the size of a user block in a file creation property list. @@ -5480,7 +5480,7 @@ public class H5 implements java.io.Serializable { throws HDF5LibraryException, IllegalArgumentException; - // File access property list (FAPL) routines + // /////// File access property list (FAPL) routines /////// /** * H5Pget_alignment retrieves the current settings for alignment properties from a file access property list. @@ -5860,6 +5860,37 @@ public class H5 implements java.io.Serializable { public synchronized static native void H5Pset_metadata_read_attempts(long plist_id, long attempts) throws HDF5LibraryException; + /** + * H5Pget_evict_on_close 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. + * + * @param fapl_id + * IN: File access property list identifier + * + * @return indication if the object will be evicted on close. + * + * @exception HDF5LibraryException + * - Error from the HDF-5 Library. + * + **/ + public synchronized static native boolean H5Pget_evict_on_close(long fapl_id) + throws HDF5LibraryException; + + /** + * H5Pset_evict_on_close controls the library's behavior of evicting metadata associated with a closed object. + * + * @param fapl_id + * IN: File access property list identifier + * @param evict_on_close + * IN: Whether the HDF5 object should be evicted on close. + * + * @exception HDF5LibraryException + * - Error from the HDF-5 Library. + * + **/ + public synchronized static native void H5Pset_evict_on_close(long fapl_id, boolean evict_on_close) + throws HDF5LibraryException; + // Dataset creation property list (DCPL) routines // /** @@ -6285,7 +6316,37 @@ public class H5 implements java.io.Serializable { public synchronized static native int H5Pset_fill_time(long plist_id, int fill_time) throws HDF5LibraryException, NullPointerException; - // Dataset access property list (DAPL) routines // + // /////// Dataset creation property list (DCPL) routines /////// + + /** + * H5Pset_chunk_opts Sets the edge chunk option in a dataset creation property list. + * + * @param dcpl_id + * IN: Dataset creation property list identifier + * @param opts + * IN: Edge chunk option flag. Valid values are: + * H5D_CHUNK_DONT_FILTER_PARTIAL_CHUNKS - filters are not applied to partial edge chunks. + * 0 - Disables option; partial edge chunks will be compressed. + * + * @exception HDF5LibraryException + * - Error from the HDF-5 Library + **/ + public synchronized static native void H5Pset_chunk_opts(long dcpl_id, int opts) throws HDF5LibraryException; + + /** + * H5Pget_chunk_opts retrieves the edge chunk option setting stored in the dataset creation property list . + * + * @param dcpl_id + * IN: Dataset creation property list + + * @return The edge chunk option setting. + * + * @exception HDF5LibraryException + * - Error from the HDF-5 Library + **/ + public synchronized static native int H5Pget_chunk_opts(long dcpl_id) throws HDF5LibraryException; + + // /////// Dataset access property list (DAPL) routines /////// /** * Retrieves the maximum possible number of elements in the meta data cache and the maximum possible number of bytes @@ -6388,12 +6449,44 @@ public class H5 implements java.io.Serializable { **/ public synchronized static native long H5Pget_virtual_printf_gap(long dapl_id) throws HDF5LibraryException; + /** + * H5Pget_efile_prefix Retrieves prefix applied to external file paths. + * + * @param dapl_id + * IN: Link access property list identifier + * + * @return the prefix to be applied to external file paths. + * + * @exception HDF5LibraryException + * - Error from the HDF-5 Library. + * + **/ + public synchronized static native String H5Pget_efile_prefix(long dapl_id) + throws HDF5LibraryException; + + /** + * H5Pset_efile_prefix Sets prefix to be applied to external file paths. + * + * @param dapl_id + * IN: Dataset access property list identifier + * @param prefix + * IN: Prefix to be applied to external file paths + * + * @exception HDF5LibraryException + * - Error from the HDF-5 Library. + * @exception NullPointerException + * - prefix is null. + * + **/ + public synchronized static native void H5Pset_efile_prefix(long dapl_id, String prefix) + throws HDF5LibraryException, NullPointerException; + // public synchronized static native void H5Pset_append_flush(long plist_id, int ndims, long[] boundary, H5D_append_cb func, H5D_append_t udata) throws HDF5LibraryException; // public synchronized static native void H5Pget_append_flush(long plist_id, int dims, long[] boundary, H5D_append_cb func, H5D_append_t udata) throws HDF5LibraryException; - // Dataset xfer property list (DXPL) routines // + // /////// Dataset xfer property list (DXPL) routines /////// /** * H5Pget_data_transform retrieves the data transform expression previously set in the dataset transfer property @@ -6544,7 +6637,7 @@ public class H5 implements java.io.Serializable { public synchronized static native int H5Pset_hyper_vector_size(long dxpl_id, long vector_size) throws HDF5LibraryException, NullPointerException; - // Link creation property list (LCPL) routines // + // /////// Link creation property list (LCPL) routines /////// /** * H5Pget_create_intermediate_group determines whether property is set to enable creating missing intermediate @@ -6579,7 +6672,7 @@ public class H5 implements java.io.Serializable { public synchronized static native int H5Pset_create_intermediate_group(long lcpl_id, boolean crt_intermed_group) throws HDF5LibraryException; - // Group creation property list (GCPL) routines // + // /////// Group creation property list (GCPL) routines /////// /** * H5Pget_local_heap_size_hint Retrieves the anticipated size of the local heap for original-style groups. @@ -6736,14 +6829,14 @@ public class H5 implements java.io.Serializable { public synchronized static native int H5Pset_link_creation_order(long gcpl_id, int crt_order_flags) throws HDF5LibraryException; - // String creation property list (STRCPL) routines // + // /////// String creation property list (STRCPL) routines /////// public synchronized static native int H5Pget_char_encoding(long plist_id) throws HDF5LibraryException; public synchronized static native void H5Pset_char_encoding(long plist_id, int encoding) throws HDF5LibraryException; - // Link access property list (LAPL) routines // + // /////// Link access property list (LAPL) routines /////// /** * H5Pget_nlinks retrieves the maximum number of soft or user-defined link traversals allowed, nlinks, before the @@ -6896,7 +6989,7 @@ public class H5 implements java.io.Serializable { public synchronized static native int H5Pset_elink_acc_flags(long lapl_id, int flags) throws HDF5LibraryException, IllegalArgumentException; - // Object copy property list (OCPYPL) routines // + // /////// Object copy property list (OCPYPL) routines /////// /** * H5Pget_copy_object retrieves the properties to be used when an object is copied. @@ -6927,7 +7020,7 @@ public class H5 implements java.io.Serializable { public synchronized static native void H5Pset_copy_object(long ocp_plist_id, int copy_options) throws HDF5LibraryException; - // Other/Older property list routines // + // /////// Other/Older property list routines /////// /** * H5Pget_version retrieves the version information of various objects for a file creation property list. @@ -6955,7 +7048,7 @@ public class H5 implements java.io.Serializable { public synchronized static native int H5Pget_version(long plist, int[] version_info) throws HDF5LibraryException, NullPointerException, IllegalArgumentException; - // file drivers property list routines // + // /////// file drivers property list routines /////// public synchronized static native void H5Pget_fapl_core(long fapl_id, long[] increment, boolean[] backing_store) throws HDF5LibraryException, NullPointerException; @@ -7102,20 +7195,28 @@ public class H5 implements java.io.Serializable { // File creation property list (FCPL) routines // // File access property list (FAPL) routines // - // herr_t H5Pset_driver( hid_t plist_id, hid_t new_driver_id, const void *new_driver_info ) - // const void *H5Pget_driver_info( hid_t plist_id ) - // herr_t H5Pget_multi_type ( hid_t fapl_id, H5FD_mem_t *type ) - // herr_t H5Pset_multi_type ( hid_t fapl_id, H5FD_mem_t type ) + // herr_t H5Pset_driver(hid_t plist_id, hid_t new_driver_id, const void *new_driver_info) + // const void *H5Pget_driver_info(hid_t plist_id) + // herr_t H5Pget_multi_type(hid_t fapl_id, H5FD_mem_t *type) + // herr_t H5Pset_multi_type(hid_t fapl_id, H5FD_mem_t type) // herr_t H5Pget_file_image(hid_t fapl_id, void **buf_ptr_ptr, size_t *buf_len_ptr); // herr_t H5Pset_file_image(hid_t fapl_id, void *buf_ptr, size_t buf_len); // herr_t H5Pget_file_image_callbacks(hid_t fapl_id, H5FD_file_image_callbacks_t *callbacks_ptr); // herr_t H5Pset_file_image_callbacks(hid_t fapl_id, H5FD_file_image_callbacks_t *callbacks_ptr); // herr_t H5Pset_core_write_tracking(hid_t fapl_id, hbool_t is_enabled, size_t page_size); // herr_t H5Pget_core_write_tracking(hid_t fapl_id, hbool_t *is_enabled, size_t *page_size); + // herr_t H5Pset_all_coll_metadata_ops(hid_t accpl_id, hbool_t is_collective); + // herr_t H5Pset_coll_metadata_write(hid_t fapl_id, hbool_t is_collective); + // herr_t H5Pget_coll_metadata_write(hid_t fapl_id, hbool_t *is_collective); + // herr_t H5Pget_page_buffer_size(hid_t fapl_id, size_t *buf_size, unsigned *min_meta_perc, unsigned *min_raw_perc); + // herr_t H5Pset_object_flush_cb (hid_t fapl_id, H5F_flush_cb_t func, void *user_data); + // herr_t H5Pget_object_flush_cb (hid_t fapl_id, H5F_flush_cb_t *func, void **user_data); // Dataset creation property list (DCPL) routines // // Dataset access property list (DAPL) routines // + // herr_t H5Pset_append_flush (hid_t dapl_id, int ndims, const hsize_t boundary[], H5D_append_cb_t func, void *user_data); + // herr_t H5Pget_append_flush(hid_t dapl_id, int ndims, hsize_t boundary[], H5D_append_cb_t *func, void **user_data) // Dataset xfer property list (DXPL) routines // // herr_t H5Pset_buffer(hid_t plist_id, size_t size, void *tconv, void *bkg); diff --git a/java/src/hdf/hdf5lib/HDF5Constants.java b/java/src/hdf/hdf5lib/HDF5Constants.java index 8a3d6c8..3e43ba2 100644 --- a/java/src/hdf/hdf5lib/HDF5Constants.java +++ b/java/src/hdf/hdf5lib/HDF5Constants.java @@ -88,6 +88,7 @@ public class HDF5Constants { public static final int H5D_VDS_ERROR = H5D_VDS_ERROR(); public static final int H5D_VDS_FIRST_MISSING = H5D_VDS_FIRST_MISSING(); public static final int H5D_VDS_LAST_AVAILABLE = H5D_VDS_LAST_AVAILABLE(); + public static final int H5D_CHUNK_DONT_FILTER_PARTIAL_CHUNKS = H5D_CHUNK_DONT_FILTER_PARTIAL_CHUNKS(); public static final int H5E_MAJOR = H5E_MAJOR(); public static final int H5E_MINOR = H5E_MINOR(); @@ -768,6 +769,8 @@ public class HDF5Constants { private static native final int H5D_VDS_LAST_AVAILABLE(); + private static native final int H5D_CHUNK_DONT_FILTER_PARTIAL_CHUNKS(); + private static native final long H5E_ALIGNMENT(); private static native final long H5E_ALREADYEXISTS(); diff --git a/java/src/hdf/overview.html b/java/src/hdf/overview.html index 39d75b7..9c19442 100644 --- a/java/src/hdf/overview.html +++ b/java/src/hdf/overview.html @@ -47,20 +47,20 @@ which has a method: The native method is implemented in C using the Java Native Method Interface (JNI). This is written something like the following: -
JNIEXPORT jint
+
JNIEXPORT jlong
 JNICALL Java_hdf_hdf5lib_H5_H5Fopen
 (
  JNIEnv *env,
  jclass class,
  jstring hdfFile,
  jint flags,
- jint access)
+ jlong access)
  {
 
  /* ...convert Java String to (char *) */
 
  /* call the HDF library */
- retVal = H5Fopen((char *)file, (unsigned)flags, (hid_t)access );
+ retVal = H5Fopen((char *)file, (unsigned)flags, (hid_t)access);
 
  /* ... */
 }
diff --git a/java/src/jni/CMakeLists.txt b/java/src/jni/CMakeLists.txt index 9e6c099..10d1b6d 100644 --- a/java/src/jni/CMakeLists.txt +++ b/java/src/jni/CMakeLists.txt @@ -51,7 +51,7 @@ set (CMAKE_INCLUDE_CURRENT_DIR_IN_INTERFACE ON) ########### JNI libraries always must be built shared ############### add_library (${HDF5_JAVA_JNI_LIB_TARGET} SHARED ${HDF5_JAVA_JNI_CSRCS} ${HDF5_JAVA_JNI_CHDRS}) TARGET_C_PROPERTIES (${HDF5_JAVA_JNI_LIB_TARGET} SHARED " " " ") -target_link_libraries (${HDF5_JAVA_JNI_LIB_TARGET} ${HDF5_LIB_TARGET}) +target_link_libraries (${HDF5_JAVA_JNI_LIB_TARGET} PUBLIC ${HDF5_LIB_TARGET}) set_target_properties (${HDF5_JAVA_JNI_LIB_TARGET} PROPERTIES FOLDER libraries/jni) SET_GLOBAL_VARIABLE (HDF5_LIBRARIES_TO_EXPORT "${HDF5_LIBRARIES_TO_EXPORT};${HDF5_JAVA_JNI_LIB_TARGET}") H5_SET_LIB_OPTIONS (${HDF5_JAVA_JNI_LIB_TARGET} ${HDF5_JAVA_JNI_LIB_NAME} SHARED ${HDF5_JAVA_PACKAGE_SOVERSION}) diff --git a/java/src/jni/h5Constants.c b/java/src/jni/h5Constants.c index f6f8bfa..5a4b53e 100644 --- a/java/src/jni/h5Constants.c +++ b/java/src/jni/h5Constants.c @@ -140,6 +140,8 @@ JNIEXPORT jint JNICALL Java_hdf_hdf5lib_HDF5Constants_H5D_1VDS_1FIRST_1MISSING(JNIEnv *env, jclass cls) { return H5D_VDS_FIRST_MISSING; } JNIEXPORT jint JNICALL Java_hdf_hdf5lib_HDF5Constants_H5D_1VDS_1LAST_1AVAILABLE(JNIEnv *env, jclass cls) { return H5D_VDS_LAST_AVAILABLE; } +JNIEXPORT jint JNICALL +Java_hdf_hdf5lib_HDF5Constants_H5D_1CHUNK_1DONT_1FILTER_1PARTIAL_1CHUNKS(JNIEnv *env, jclass cls) { return H5D_CHUNK_DONT_FILTER_PARTIAL_CHUNKS; } JNIEXPORT jlong JNICALL Java_hdf_hdf5lib_HDF5Constants_H5E_1ALIGNMENT(JNIEnv *env, jclass cls) { return H5E_ALIGNMENT; } diff --git a/java/src/jni/h5pImp.c b/java/src/jni/h5pImp.c index dcfcd82..2b73266 100644 --- a/java/src/jni/h5pImp.c +++ b/java/src/jni/h5pImp.c @@ -5733,6 +5733,150 @@ Java_hdf_hdf5lib_H5_H5Pset_1metadata_1read_1attempts } /* end else */ } /* end Java_hdf_hdf5lib_H5_H5Pset_1metadata_1read_1attempts */ +/* + * Class: hdf_hdf5lib_H5 + * Method: H5Pset_efile_prefix + * Signature: (JLjava/lang/String;)V + */ +JNIEXPORT void JNICALL +Java_hdf_hdf5lib_H5_H5Pset_1efile_1prefix + (JNIEnv *env, jclass clss, jlong dapl_id, jstring prefix) +{ + herr_t retVal = -1; + const char *aName; + + PIN_JAVA_STRING(prefix, aName); + if (aName != NULL) { + retVal = H5Pset_efile_prefix((hid_t)dapl_id, aName); + + UNPIN_JAVA_STRING(prefix, aName); + + if(retVal < 0) + h5libraryError(env); + } +} /* end Java_hdf_hdf5lib_H5_H5Pset_1efile_1prefix */ + +/* + * Class: hdf_hdf5lib_H5 + * Method: H5Pget_efile_prefix + * Signature: (J)Ljava/lang/String; + */ +JNIEXPORT jstring JNICALL +Java_hdf_hdf5lib_H5_H5Pget_1efile_1prefix + (JNIEnv *env, jclass clss, jlong dapl_id) +{ + size_t size = 0; + char *pre; + jlong prefix_size = -1; + jstring str = NULL; + + prefix_size = (jlong)H5Pget_efile_prefix((hid_t)dapl_id, (char*)NULL, size); + if(prefix_size < 0) { + h5libraryError(env); + } /* end if */ + else { + size = (size_t)prefix_size + 1;/* add extra space for the null terminator */ + pre = (char*)HDmalloc(sizeof(char)*size); + if (pre == NULL) { + h5outOfMemory(env, "H5Pget_efile_prefix: malloc failed "); + } /* end if */ + else { + prefix_size = (jlong)H5Pget_efile_prefix((hid_t)dapl_id, (char*)pre, size); + + if (prefix_size >= 0) { + str = ENVPTR->NewStringUTF(ENVPAR pre); + HDfree(pre); + if (str == NULL) + h5JNIFatalError( env, "H5Pget_efile_prefix: return string not allocated"); + } /* end if */ + else { + HDfree(pre); + h5libraryError(env); + } /* end else */ + } /* end else */ + } /* end else */ + + return (jstring)str; +} /* end Java_hdf_hdf5lib_H5_H5Pget_1efile_1prefix */ + +/* + * Class: hdf_hdf5lib_H5 + * Method: H5Pset_evict_on_close + * Signature: (JZ)V + */ +JNIEXPORT void JNICALL +Java_hdf_hdf5lib_H5_H5Pset_1evict_1on_1close + (JNIEnv *env, jclass clss, jlong fapl_id, jboolean evict_on_close) +{ + herr_t retVal = -1; + hbool_t evict_on_close_val; + + if (evict_on_close == JNI_TRUE) + evict_on_close_val = TRUE; + else + evict_on_close_val = FALSE; + + retVal = H5Pset_evict_on_close((hid_t)fapl_id, (hbool_t)evict_on_close_val); + if (retVal < 0) + h5libraryError(env); +} /* end Java_hdf_hdf5lib_H5_H5Pset_1evict_1on_1close */ + +/* + * Class: hdf_hdf5lib_H5 + * Method: H5Pget_evict_on_close + * Signature: (J)Z + */ +JNIEXPORT jboolean JNICALL +Java_hdf_hdf5lib_H5_H5Pget_1evict_1on_1close + (JNIEnv *env, jclass clss, jlong fapl_id) +{ + hbool_t evict_on_close_val = FALSE; + jboolean bval = JNI_FALSE; + + if (H5Pget_evict_on_close((hid_t)fapl_id, (hbool_t *)&evict_on_close_val) < 0) { + h5libraryError(env); + } /* end if */ + else { + if (evict_on_close_val == TRUE) + bval = JNI_TRUE; + } /* end else */ + + return bval; +} /* end Java_hdf_hdf5lib_H5_H5Pget_1evict_1on_1close */ + +/* + * Class: hdf_hdf5lib_H5 + * Method: H5Pset_chunk_opts + * Signature: (JI)V + */ +JNIEXPORT void JNICALL +Java_hdf_hdf5lib_H5_H5Pset_1chunk_1opts + (JNIEnv *env, jclass clss, jlong dcpl_id, jint opts) +{ + herr_t retVal = -1; + + retVal = H5Pset_chunk_opts((hid_t)dcpl_id, (unsigned)opts); + if (retVal < 0) + h5libraryError(env); +} /* end Java_hdf_hdf5lib_H5_H5Pset_1chunk_1opts */ + +/* + * Class: hdf_hdf5lib_H5 + * Method: H5Pget_chunk_opts + * Signature: (J)I + */ +JNIEXPORT jint JNICALL +Java_hdf_hdf5lib_H5_H5Pget_1chunk_1opts + (JNIEnv *env, jclass clss, jlong dcpl_id) +{ + unsigned opts = 0; + + if (H5Pget_chunk_opts((hid_t)dcpl_id, opts) < 0) + h5libraryError(env); + + return (jint)opts; +} /* end Java_hdf_hdf5lib_H5_H5Pget_1chunk_1opts */ + #ifdef __cplusplus } /* end extern "C" */ #endif /* __cplusplus */ diff --git a/java/src/jni/h5pImp.h b/java/src/jni/h5pImp.h index d413f69..f5dba6b 100644 --- a/java/src/jni/h5pImp.h +++ b/java/src/jni/h5pImp.h @@ -1533,7 +1533,6 @@ JNIEXPORT jlong JNICALL Java_hdf_hdf5lib_H5_H5Pget_1metadata_1read_1attempts (JNIEnv *, jclass, jlong); - /* * Class: hdf_hdf5lib_H5 * Method: H5Pset_metadata_read_attempts @@ -1543,6 +1542,60 @@ JNIEXPORT void JNICALL Java_hdf_hdf5lib_H5_H5Pset_1metadata_1read_1attempts (JNIEnv *, jclass, jlong, jlong); +/* + * Class: hdf_hdf5lib_H5 + * Method: H5Pset_efile_prefix + * Signature: (JLjava/lang/String;)V + */ +JNIEXPORT void JNICALL +Java_hdf_hdf5lib_H5_H5Pset_1efile_1prefix +(JNIEnv *, jclass, jlong, jstring); + +/* + * Class: hdf_hdf5lib_H5 + * Method: H5Pget_efile_prefix + * Signature: (J)Ljava/lang/String; + */ +JNIEXPORT jstring JNICALL +Java_hdf_hdf5lib_H5_H5Pget_1efile_1prefix +(JNIEnv *, jclass, jlong); + +/* + * Class: hdf_hdf5lib_H5 + * Method: H5Pset_evict_on_close + * Signature: (JZ)V + */ +JNIEXPORT void JNICALL +Java_hdf_hdf5lib_H5_H5Pset_1evict_1on_1close +(JNIEnv *, jclass, jlong, jboolean); + +/* + * Class: hdf_hdf5lib_H5 + * Method: H5Pget_evict_on_close + * Signature: (J)Z + */ +JNIEXPORT jboolean JNICALL +Java_hdf_hdf5lib_H5_H5Pget_1evict_1on_1close +(JNIEnv *, jclass, jlong); + +/* + * Class: hdf_hdf5lib_H5 + * Method: H5Pset_chunk_opts + * Signature: (JI)V + */ +JNIEXPORT void JNICALL +Java_hdf_hdf5lib_H5_H5Pset_1chunk_1opts +(JNIEnv *, jclass, jlong, jint); + +/* + * Class: hdf_hdf5lib_H5 + * Method: H5Pget_chunk_opts + * Signature: (J)I + */ +JNIEXPORT jint JNICALL +Java_hdf_hdf5lib_H5_H5Pget_1chunk_1opts +(JNIEnv *, jclass, jlong); + #ifdef __cplusplus } /* end extern "C" */ diff --git a/java/test/JUnit-interface.txt b/java/test/JUnit-interface.txt index ab2f3b1..6d2754f 100644 --- a/java/test/JUnit-interface.txt +++ b/java/test/JUnit-interface.txt @@ -415,6 +415,7 @@ JUnit version 4.11 .testH5PH5Pset_shared_mesg_phase_change_HighMaxlistValue .testH5P_layout .testH5Pget_link_creation_order +.testH5Pget_efile_prefix .testH5Pset_shared_mesg_nindexes_InvalidHIGHnindexes .testH5P_file_space_page_size .testH5Pget_shared_mesg_index_Invalid_indexnum @@ -444,6 +445,7 @@ JUnit version 4.11 .testH5Pset_est_link_info_InvalidValues .testH5Pset_local_heap_size_hint .testH5Pget_est_link_info +.testH5Pset_efile_prefix_null .testH5Pset_scaleoffset .testH5Pset_create_intermediate_group_invalidobject .testH5PH5Pset_shared_mesg_phase_change_HighMinbtreeValue @@ -466,6 +468,7 @@ JUnit version 4.11 .testH5Pget_sym_k_null .testH5Pset_nlinks .testH5P_obj_track_times +.testH5Pset_efile_prefix .testH5P_userblock .testH5Pget_local_heap_size_hint .testH5Pset_shared_mesg_index_Invalid_indexnum @@ -504,6 +507,7 @@ JUnit version 4.11 .testH5Pset_mdc_config .testH5P_small_data_block_size .testH5Pset_fapl_log +.testH5P_evict_on_close .testH5Pset_libver_bounds .testH5P_sieve_buf_size .testH5P_elink_file_cache_size @@ -640,7 +644,7 @@ JUnit version 4.11 Time: XXXX -OK (638 tests) +OK (642 tests) HDF5-DIAG: Error detected in HDF5 (version (number)) thread (IDs): #000: (file name) line (number) in H5Fopen(): can't set access and transfer property lists diff --git a/java/test/TestH5P.java b/java/test/TestH5P.java index 5aafb5b..9e45e4c 100644 --- a/java/test/TestH5P.java +++ b/java/test/TestH5P.java @@ -28,6 +28,7 @@ import hdf.hdf5lib.exceptions.HDF5LibraryException; 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; @@ -852,7 +853,7 @@ public class TestH5P { } catch (Throwable err) { err.printStackTrace(); - fail("H5Pset_est_link_info: " + err); + fail("H5Pset_elink_prefix: " + err); } assertTrue("H5Pset_elink_prefix", ret_val >= 0); } @@ -1232,4 +1233,54 @@ public class TestH5P { fail("testH5P_file_space_page_size: " + err); } } + + @Test + public void testH5Pset_efile_prefix() { + String prefix = "tmp"; + try { + H5.H5Pset_efile_prefix(lapl_id, prefix); + } + catch (Throwable err) { + err.printStackTrace(); + fail("H5Pset_efile_prefix: " + err); + } + } + + @Test(expected = NullPointerException.class) + public void testH5Pset_efile_prefix_null() throws Throwable{ + H5.H5Pset_efile_prefix(lapl_id, null); + } + + @Test + public void testH5Pget_efile_prefix() { + String prefix = "tmp"; + String pre = ""; + + try { + H5.H5Pset_efile_prefix(lapl_id, prefix); + pre = H5.H5Pget_efile_prefix(lapl_id); + } + catch (Throwable err) { + err.printStackTrace(); + fail("H5Pget_efile_prefix: " + err); + } + assertTrue("The prefix: ", prefix.equals(pre)); + } + + @Ignore + public void testH5P_chunk_opts() { + int chunk_opts = -1; + + try { + chunk_opts = H5.H5Pget_chunk_opts(ocpl_id); + assertTrue("chunk_opts: "+chunk_opts, chunk_opts == 0); + H5.H5Pset_chunk_opts(ocpl_id, HDF5Constants.H5D_CHUNK_DONT_FILTER_PARTIAL_CHUNKS); + chunk_opts = H5.H5Pget_chunk_opts(ocpl_id); + assertTrue("chunk_opts: "+chunk_opts, chunk_opts == HDF5Constants.H5D_CHUNK_DONT_FILTER_PARTIAL_CHUNKS); + } + catch (Throwable err) { + err.printStackTrace(); + fail("H5Pget_lchunk_opts: " + err); + } + } } diff --git a/java/test/TestH5Pfapl.java b/java/test/TestH5Pfapl.java index d4a2231..48a5986 100644 --- a/java/test/TestH5Pfapl.java +++ b/java/test/TestH5Pfapl.java @@ -1376,4 +1376,18 @@ public class TestH5Pfapl { deleteH5file(); _deleteLogFile(); } + + @Test + public void testH5P_evict_on_close() { + boolean ret_val_id = false; + try { + H5.H5Pset_evict_on_close(fapl_id, true); + ret_val_id = H5.H5Pget_evict_on_close(fapl_id); + assertTrue("H5P_evict_on_close", ret_val_id); + } + catch (Throwable err) { + err.printStackTrace(); + fail("H5P_evict_on_close: " + err); + } + } } diff --git a/release_docs/RELEASE.txt b/release_docs/RELEASE.txt index 796a4a0..d36eb42 100644 --- a/release_docs/RELEASE.txt +++ b/release_docs/RELEASE.txt @@ -180,6 +180,17 @@ New Features Java Library: ------------- + - Wrappers added for the following APIs: + H5Pset_evict_on_close + H5Pget_evict_on_close + H5Pset_chunk_opts + H5Pget_chunk_opts + H5Pset_efile_prefix + H5Pget_efile_prefix + H5Pset_virtual_prefix + H5Pget_virtual_prefix + + (ADB - 2017/12/20) - The H5I_REFERENCE value in the H5I_type_t enum (defined in H5Ipublic.h) has been marked as deprectated. diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index fca864b..713f2bd 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -32,12 +32,13 @@ set (TEST_LIB_HEADERS add_library (${HDF5_TEST_LIB_TARGET} STATIC ${TEST_LIB_SOURCES} ${TEST_LIB_HEADERS}) TARGET_C_PROPERTIES (${HDF5_TEST_LIB_TARGET} STATIC " " " ") if (MSVC) - target_link_libraries (${HDF5_TEST_LIB_TARGET} "ws2_32.lib") + target_link_libraries (${HDF5_TEST_LIB_TARGET} PRIVATE "ws2_32.lib") endif () if (MINGW) - target_link_libraries (${HDF5_TEST_LIB_TARGET} "wsock32.lib") + target_link_libraries (${HDF5_TEST_LIB_TARGET} PRIVATE "wsock32.lib") endif () -target_link_libraries (${HDF5_TEST_LIB_TARGET} ${HDF5_LIB_TARGET} ${LINK_LIBS}) +target_link_libraries (${HDF5_TEST_LIB_TARGET} PUBLIC ${LINK_LIBS}) +target_link_libraries (${HDF5_TEST_LIB_TARGET} PUBLIC ${HDF5_LIB_TARGET}) H5_SET_LIB_OPTIONS (${HDF5_TEST_LIB_TARGET} ${HDF5_TEST_LIB_NAME} STATIC) set_target_properties (${HDF5_TEST_LIB_TARGET} PROPERTIES FOLDER libraries/test @@ -48,12 +49,13 @@ if (BUILD_SHARED_LIBS) add_library (${HDF5_TEST_LIBSH_TARGET} SHARED ${TEST_LIB_SOURCES} ${TEST_LIB_HEADERS}) TARGET_C_PROPERTIES (${HDF5_TEST_LIBSH_TARGET} SHARED " " " ") if (MSVC) - target_link_libraries (${HDF5_TEST_LIBSH_TARGET} "ws2_32.lib") + target_link_libraries (${HDF5_TEST_LIBSH_TARGET} PRIVATE "ws2_32.lib") endif () if (MINGW) - target_link_libraries (${HDF5_TEST_LIBSH_TARGET} "wsock32.lib") + target_link_libraries (${HDF5_TEST_LIBSH_TARGET} PRIVATE "wsock32.lib") endif () - target_link_libraries (${HDF5_TEST_LIBSH_TARGET} ${HDF5_LIBSH_TARGET} ${LINK_LIBS}) + target_link_libraries (${HDF5_TEST_LIBSH_TARGET} PUBLIC ${LINK_LIBS}) + target_link_libraries (${HDF5_TEST_LIBSH_TARGET} PUBLIC ${HDF5_LIBSH_TARGET}) H5_SET_LIB_OPTIONS (${HDF5_TEST_LIBSH_TARGET} ${HDF5_TEST_LIB_NAME} SHARED ${HDF5_PACKAGE_SOVERSION}) set_target_properties (${HDF5_TEST_LIBSH_TARGET} PROPERTIES FOLDER libraries/test @@ -97,7 +99,7 @@ endif () add_library (${HDF5_TEST_PLUGIN_TARGET} SHARED ${HDF5_TEST_SOURCE_DIR}/${plugin_name}.c) TARGET_C_PROPERTIES (${HDF5_TEST_PLUGIN_TARGET} SHARED " " " ") - target_link_libraries (${HDF5_TEST_PLUGIN_TARGET} ${HDF5_TEST_LIB_TARGET}) + target_link_libraries (${HDF5_TEST_PLUGIN_TARGET} PUBLIC ${HDF5_TEST_LIB_TARGET}) H5_SET_LIB_OPTIONS (${HDF5_TEST_PLUGIN_TARGET} ${HDF5_TEST_PLUGIN_NAME} SHARED ${HDF5_PACKAGE_SOVERSION}) set_target_properties (${HDF5_TEST_PLUGIN_TARGET} PROPERTIES FOLDER libraries/TEST_PLUGIN) @@ -123,7 +125,7 @@ endif () add_library (${HDF5_TEST_PLUGIN_TARGET} SHARED ${HDF5_TEST_SOURCE_DIR}/${plugin_name}.c) TARGET_C_PROPERTIES (${HDF5_TEST_PLUGIN_TARGET} SHARED " " " ") - target_link_libraries (${HDF5_TEST_PLUGIN_TARGET} ${HDF5_TEST_LIB_TARGET}) + target_link_libraries (${HDF5_TEST_PLUGIN_TARGET} PUBLIC ${HDF5_TEST_LIB_TARGET}) H5_SET_LIB_OPTIONS (${HDF5_TEST_PLUGIN_TARGET} ${HDF5_TEST_PLUGIN_NAME} SHARED ${HDF5_PACKAGE_SOVERSION}) set_target_properties (${HDF5_TEST_PLUGIN_TARGET} PROPERTIES FOLDER libraries/TEST_PLUGIN) @@ -172,13 +174,13 @@ set (testhdf5_SOURCES add_executable (testhdf5 ${testhdf5_SOURCES}) TARGET_NAMING (testhdf5 STATIC) TARGET_C_PROPERTIES (testhdf5 STATIC " " " ") -target_link_libraries (testhdf5 ${HDF5_TEST_LIB_TARGET} ${HDF5_LIB_TARGET}) +target_link_libraries (testhdf5 ${HDF5_TEST_LIB_TARGET}) set_target_properties (testhdf5 PROPERTIES FOLDER test) if (BUILD_SHARED_LIBS) add_executable (testhdf5-shared ${testhdf5_SOURCES}) TARGET_NAMING (testhdf5-shared SHARED) TARGET_C_PROPERTIES (testhdf5-shared SHARED " " " ") - target_link_libraries (testhdf5-shared ${HDF5_TEST_LIBSH_TARGET} ${HDF5_LIBSH_TARGET}) + target_link_libraries (testhdf5-shared PUBLIC ${HDF5_TEST_LIBSH_TARGET}) set_target_properties (testhdf5-shared PROPERTIES FOLDER test) endif () @@ -186,13 +188,13 @@ MACRO (ADD_H5_EXE file) add_executable (${file} ${HDF5_TEST_SOURCE_DIR}/${file}.c) TARGET_NAMING (${file} STATIC) TARGET_C_PROPERTIES (${file} STATIC " " " ") - target_link_libraries (${file} ${HDF5_TEST_LIB_TARGET} ${HDF5_LIB_TARGET}) + target_link_libraries (${file} PUBLIC ${HDF5_TEST_LIB_TARGET}) set_target_properties (${file} PROPERTIES FOLDER test) if (BUILD_SHARED_LIBS) add_executable (${file}-shared ${HDF5_TEST_SOURCE_DIR}/${file}.c) TARGET_NAMING (${file}-shared SHARED) TARGET_C_PROPERTIES (${file}-shared SHARED " " " ") - target_link_libraries (${file}-shared ${HDF5_TEST_LIBSH_TARGET} ${HDF5_LIBSH_TARGET}) + target_link_libraries (${file}-shared PUBLIC ${HDF5_TEST_LIBSH_TARGET}) set_target_properties (${file}-shared PROPERTIES FOLDER test) endif () ENDMACRO () diff --git a/test/vds.c b/test/vds.c index 68ac397..10da0de 100644 --- a/test/vds.c +++ b/test/vds.c @@ -57,14 +57,7 @@ const char *FILENAME[] = { * provided dataspaces are the same. * * Return: Success: 0 - * * Failure: -1 - * - * Programmer: Neil Fortner - * Monday, March 2, 2015 - * - * Modifications: - * *------------------------------------------------------------------------- */ static htri_t @@ -130,7 +123,7 @@ vds_select_equal(hid_t space1, hid_t space2) if(buf1[i] != buf2[i]) { ret_value = FALSE; break; - } /* end if */ + } /* Free buffers */ HDfree(buf1); @@ -180,7 +173,7 @@ vds_select_equal(hid_t space1, hid_t space2) if(buf1[i] != buf2[i]) { ret_value = FALSE; break; - } /* end if */ + } /* Free buffers */ HDfree(buf1); @@ -217,14 +210,7 @@ error: * parameters. * * Return: Success: 0 - * * Failure: -1 - * - * Programmer: Neil Fortner - * Monday, March 2, 2015 - * - * Modifications: - * *------------------------------------------------------------------------- */ static int @@ -298,8 +284,7 @@ vds_check_mapping(hid_t dcpl, size_t i, hid_t vspace, hid_t srcspace, error: H5E_BEGIN_TRY { - if(space_out >= 0) - (void)H5Sclose(space_out); + H5Sclose(space_out); } H5E_END_TRY return -1; @@ -312,14 +297,7 @@ error: * Purpose: Tests API functions related to virtual datasets. * * Return: Success: 0 - * * Failure: number of errors - * - * Programmer: Neil Fortner - * Monday, February 16, 2015 - * - * Modifications: - * *------------------------------------------------------------------------- */ /* Helper function to get DCPL for examination depending on config */ @@ -370,12 +348,12 @@ test_api_get_ex_dcpl(test_api_config_t config, hid_t fapl, hid_t dcpl, file = -1; if((file = H5Fopen(filename, H5F_ACC_RDWR, fapl)) < 0) TEST_ERROR - } /* end if */ + } /* Open dataset */ if((dset = H5Dopen2(file, "vdset", H5P_DEFAULT)) < 0) TEST_ERROR - } /* end if */ + } /* Get DCPL from dataset */ if((*ex_dcpl = H5Dget_create_plist(dset)) < 0) @@ -394,8 +372,8 @@ test_api_get_ex_dcpl(test_api_config_t config, hid_t fapl, hid_t dcpl, if(oinfo.meta_size.obj.heap_size != exp_meta_size) { printf("VDS metadata size: %llu Expected: %llu\n", (long long unsigned)oinfo.meta_size.obj.heap_size, (long long unsigned)exp_meta_size); TEST_ERROR - } /* end if */ - } /* end if */ + } + } else if((oinfo.meta_size.obj.heap_size != exp_meta_size) && (oinfo.meta_size.obj.heap_size != (hsize_t)0)) @@ -424,12 +402,12 @@ test_api_get_ex_dcpl(test_api_config_t config, hid_t fapl, hid_t dcpl, if(H5Fclose(file) < 0) TEST_ERROR file = -1; - } /* end if */ + } else if(config == TEST_API_COPY_PLIST) { /* Copy property list */ if((*ex_dcpl = H5Pcopy(dcpl)) < 0) TEST_ERROR - } /* end if */ + } else if(config == TEST_API_ENCDEC_PLIST) { size_t plist_buf_size; @@ -448,14 +426,14 @@ test_api_get_ex_dcpl(test_api_config_t config, hid_t fapl, hid_t dcpl, /* Free plist_buf */ HDfree(plist_buf); plist_buf = NULL; - } /* end if */ + } else { /* Simply copy the id to ex_dcpl and increment the ref count so ex_dcpl * can be closed */ if(H5Iinc_ref(dcpl) < 0) TEST_ERROR *ex_dcpl = dcpl; - } /* end else */ + } /* Verify examination DCPL is equal to original DCPL. Do not compare the * plist to itself, and do not do the comparison if we reopened the file, @@ -466,16 +444,14 @@ test_api_get_ex_dcpl(test_api_config_t config, hid_t fapl, hid_t dcpl, TEST_ERROR if(!tri_ret) TEST_ERROR - } /* end if */ + } return 0; error: H5E_BEGIN_TRY { - if(file >= 0) - (void)H5Fclose(file); - if(dset >= 0) - (void)H5Dclose(dset); + H5Fclose(file); + H5Dclose(dset); } H5E_END_TRY; if(plist_buf) HDfree(plist_buf); @@ -532,7 +508,7 @@ test_api(test_api_config_t config, hid_t fapl) case TEST_API_NTESTS: default: TEST_ERROR - } /* end switch */ + } h5_fixname(FILENAME[0], fapl, filename, sizeof filename); @@ -818,7 +794,7 @@ test_api(test_api_config_t config, hid_t fapl) /* Create virtual dataspace */ if((vspace[i] = H5Screate_simple(2, dims, NULL)) < 0) TEST_ERROR - } /* end for */ + } /* Select all (should not be necessary, but just to be sure) */ if(H5Sselect_all(srcspace[0]) < 0) @@ -932,7 +908,7 @@ test_api(test_api_config_t config, hid_t fapl) if(H5Sclose(vspace[i]) < 0) TEST_ERROR vspace[i] = -1; - } /* end for */ + } if(H5Pclose(ex_dcpl) < 0) TEST_ERROR ex_dcpl = -1; @@ -1038,7 +1014,7 @@ test_api(test_api_config_t config, hid_t fapl) /* Add virtual layout mapping */ if(H5Pset_virtual(dcpl, vspace[i], tmp_filename, tmp_dsetname, srcspace[0]) < 0) TEST_ERROR - } /* end if */ + } /* Get examination DCPL */ if(test_api_get_ex_dcpl(config, fapl, dcpl, &ex_dcpl, vspace[0], filename, (hsize_t)697) < 0) @@ -1063,7 +1039,7 @@ test_api(test_api_config_t config, hid_t fapl) /* Check that the mapping in the DCPL is correct */ if(vds_check_mapping(ex_dcpl, (size_t)i, vspace[i], srcspace[0], tmp_filename, tmp_dsetname) < 0) TEST_ERROR - } /* end if */ + } /* Close */ if(H5Sclose(srcspace[0]) < 0) @@ -1073,7 +1049,7 @@ test_api(test_api_config_t config, hid_t fapl) if(H5Sclose(vspace[i]) < 0) TEST_ERROR vspace[i] = -1; - } /* end for */ + } if(H5Pclose(ex_dcpl) < 0) TEST_ERROR ex_dcpl = -1; @@ -1123,18 +1099,12 @@ test_api(test_api_config_t config, hid_t fapl) error: H5E_BEGIN_TRY { - for(i = 0; i < (sizeof(srcspace) / sizeof(srcspace[0])); i++) { - if(srcspace[i] >= 0) - (void)H5Sclose(srcspace[i]); - } /* end for */ - for(i = 0; i < (sizeof(vspace) / sizeof(vspace[0])); i++) { - if(vspace[i] >= 0) - (void)H5Sclose(vspace[i]); - } /* end for */ - if(dcpl >= 0) - (void)H5Pclose(dcpl); - if(ex_dcpl >= 0) - (void)H5Pclose(ex_dcpl); + for(i = 0; i < (sizeof(srcspace) / sizeof(srcspace[0])); i++) + H5Sclose(srcspace[i]); + for(i = 0; i < (sizeof(vspace) / sizeof(vspace[0])); i++) + H5Sclose(vspace[i]); + H5Pclose(dcpl); + H5Pclose(ex_dcpl); } H5E_END_TRY; return 1; @@ -1148,14 +1118,7 @@ error: * pattern-matching file/dataset strings * * Return: Success: 0 - * * Failure: number of errors - * - * Programmer: Neil Fortner - * Tuesday, March 3, 2015 - * - * Modifications: - * *------------------------------------------------------------------------- */ static int @@ -1238,12 +1201,12 @@ test_basic_io(unsigned config, hid_t fapl) if(config & TEST_IO_DIFFERENT_FILE) { if((srcfile[0] = H5Fcreate(srcfilename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0) TEST_ERROR - } /* end if */ + } else { srcfile[0] = vfile; if(H5Iinc_ref(srcfile[0]) < 0) TEST_ERROR - } /* end if */ + } /* Create source dataset */ if((srcdset[0] = H5Dcreate2(srcfile[0], "src_dset", H5T_NATIVE_INT, srcspace[0], H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) @@ -1272,8 +1235,8 @@ test_basic_io(unsigned config, hid_t fapl) if(H5Fclose(srcfile[0]) < 0) TEST_ERROR srcfile[0] = -1; - } /* end if */ - } /* end if */ + } + } /* Reopen virtual dataset and file if config option specified */ if(config & TEST_IO_REOPEN_VIRT) { @@ -1287,7 +1250,7 @@ test_basic_io(unsigned config, hid_t fapl) TEST_ERROR if((vdset = H5Dopen2(vfile, "v_dset", H5P_DEFAULT)) < 0) TEST_ERROR - } /* end if */ + } /* Read data through virtual dataset */ HDmemset(rbuf[0], 0, sizeof(rbuf)); @@ -1316,7 +1279,7 @@ test_basic_io(unsigned config, hid_t fapl) TEST_ERROR if((srcdset[0] = H5Dopen2(srcfile[0], "src_dset", H5P_DEFAULT)) < 0) TEST_ERROR - } /* end if */ + } /* Read data directly from source dataset */ HDmemset(rbuf[0], 0, sizeof(rbuf)); @@ -1400,12 +1363,12 @@ test_basic_io(unsigned config, hid_t fapl) if(config & TEST_IO_DIFFERENT_FILE) { if((srcfile[0] = H5Fcreate(srcfilename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0) TEST_ERROR - } /* end if */ + } else { srcfile[0] = vfile; if(H5Iinc_ref(srcfile[0]) < 0) TEST_ERROR - } /* end if */ + } /* Create source datasets */ if((srcdset[0] = H5Dcreate2(srcfile[0], "%src_dset1", H5T_NATIVE_INT, srcspace[0], H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) @@ -1441,8 +1404,8 @@ test_basic_io(unsigned config, hid_t fapl) if(H5Fclose(srcfile[0]) < 0) TEST_ERROR srcfile[0] = -1; - } /* end if */ - } /* end if */ + } + } /* Reopen virtual dataset and file if config option specified */ if(config & TEST_IO_REOPEN_VIRT) { @@ -1456,7 +1419,7 @@ test_basic_io(unsigned config, hid_t fapl) TEST_ERROR if((vdset = H5Dopen2(vfile, "v_dset", H5P_DEFAULT)) < 0) TEST_ERROR - } /* end if */ + } /* Read data through virtual dataset */ HDmemset(rbuf[0], 0, sizeof(rbuf)); @@ -1487,7 +1450,7 @@ test_basic_io(unsigned config, hid_t fapl) TEST_ERROR if((srcdset[1] = H5Dopen2(srcfile[0], "src_dset2%", H5P_DEFAULT)) < 0) TEST_ERROR - } /* end if */ + } /* Read data directly from source datasets */ HDmemset(rbuf[0], 0, sizeof(rbuf)); @@ -1536,8 +1499,8 @@ test_basic_io(unsigned config, hid_t fapl) if(H5Fclose(srcfile[0]) < 0) TEST_ERROR srcfile[0] = -1; - } /* end if */ - } /* end if */ + } + } /* Reopen virtual file if config option specified */ if(config & TEST_IO_REOPEN_VIRT) { @@ -1546,7 +1509,7 @@ test_basic_io(unsigned config, hid_t fapl) vfile = -1; if((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, fapl)) < 0) TEST_ERROR - } /* end if */ + } /* Open v_dset2 */ if((vdset = H5Dopen2(vfile, "v_dset2", H5P_DEFAULT)) < 0) @@ -1572,7 +1535,7 @@ test_basic_io(unsigned config, hid_t fapl) TEST_ERROR if((srcdset[1] = H5Dopen2(srcfile[0], "src_dset2%", H5P_DEFAULT)) < 0) TEST_ERROR - } /* end if */ + } /* Only copy to a different file if the source datasets are in a different * file */ @@ -1614,8 +1577,8 @@ test_basic_io(unsigned config, hid_t fapl) if(H5Fclose(srcfile[0]) < 0) TEST_ERROR srcfile[0] = -1; - } /* end if */ - } /* end if */ + } + } /* Reopen copied virtual file if config option specified */ if(config & TEST_IO_REOPEN_VIRT) { @@ -1624,7 +1587,7 @@ test_basic_io(unsigned config, hid_t fapl) vfile2 = -1; if((vfile2 = H5Fopen(vfilename2, H5F_ACC_RDWR, fapl)) < 0) TEST_ERROR - } /* end if */ + } /* Open v_dset3 */ if((vdset = H5Dopen2(vfile2, "v_dset3", H5P_DEFAULT)) < 0) @@ -1650,13 +1613,13 @@ test_basic_io(unsigned config, hid_t fapl) TEST_ERROR if((srcdset[1] = H5Dopen2(srcfile[0], "src_dset2%", H5P_DEFAULT)) < 0) TEST_ERROR - } /* end if */ + } /* Close copied virtual file */ if(H5Fclose(vfile2) < 0) TEST_ERROR vfile2 = -1; - } /* end if */ + } /* Close */ if(H5Dclose(srcdset[0]) < 0) @@ -1735,12 +1698,12 @@ test_basic_io(unsigned config, hid_t fapl) if(config & TEST_IO_DIFFERENT_FILE) { if((srcfile[0] = H5Fcreate(srcfilename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0) TEST_ERROR - } /* end if */ + } else { srcfile[0] = vfile; if(H5Iinc_ref(srcfile[0]) < 0) TEST_ERROR - } /* end if */ + } /* Create source datasets */ if((srcdset[0] = H5Dcreate2(srcfile[0], "%src_dset1", H5T_NATIVE_INT, srcspace[0], H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) @@ -1782,8 +1745,8 @@ test_basic_io(unsigned config, hid_t fapl) if(H5Fclose(srcfile[0]) < 0) TEST_ERROR srcfile[0] = -1; - } /* end if */ - } /* end if */ + } + } /* Reopen virtual dataset and file if config option specified */ if(config & TEST_IO_REOPEN_VIRT) { @@ -1797,7 +1760,7 @@ test_basic_io(unsigned config, hid_t fapl) TEST_ERROR if((vdset = H5Dopen2(vfile, "v_dset", H5P_DEFAULT)) < 0) TEST_ERROR - } /* end if */ + } /* Read data through virtual dataset */ HDmemset(rbuf[0], 0, sizeof(rbuf)); @@ -1828,7 +1791,7 @@ test_basic_io(unsigned config, hid_t fapl) TEST_ERROR if((srcdset[1] = H5Dopen2(srcfile[0], "src_dset2%", H5P_DEFAULT)) < 0) TEST_ERROR - } /* end if */ + } /* Read data directly from source datasets */ HDmemset(rbuf[0], 0, sizeof(rbuf)); @@ -1923,12 +1886,12 @@ test_basic_io(unsigned config, hid_t fapl) if(config & TEST_IO_DIFFERENT_FILE) { if((srcfile[0] = H5Fcreate(srcfilenamepct, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0) TEST_ERROR - } /* end if */ + } else { srcfile[0] = vfile; if(H5Iinc_ref(srcfile[0]) < 0) TEST_ERROR - } /* end if */ + } /* Create source datasets */ if((srcdset[0] = H5Dcreate2(srcfile[0], "src_dset1", H5T_NATIVE_INT, srcspace[0], H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) @@ -1964,8 +1927,8 @@ test_basic_io(unsigned config, hid_t fapl) if(H5Fclose(srcfile[0]) < 0) TEST_ERROR srcfile[0] = -1; - } /* end if */ - } /* end if */ + } + } /* Reopen virtual dataset and file if config option specified */ if(config & TEST_IO_REOPEN_VIRT) { @@ -1979,7 +1942,7 @@ test_basic_io(unsigned config, hid_t fapl) TEST_ERROR if((vdset = H5Dopen2(vfile, "v_dset", H5P_DEFAULT)) < 0) TEST_ERROR - } /* end if */ + } /* Read first source dataset through virtual dataset */ HDmemset(rbuf[0], 0, sizeof(rbuf)); @@ -2032,7 +1995,7 @@ test_basic_io(unsigned config, hid_t fapl) TEST_ERROR if((srcdset[1] = H5Dopen2(srcfile[0], "src_dset2", H5P_DEFAULT)) < 0) TEST_ERROR - } /* end if */ + } /* Read data directly from source datasets */ HDmemset(rbuf[0], 0, sizeof(rbuf)); @@ -2131,12 +2094,12 @@ test_basic_io(unsigned config, hid_t fapl) if(config & TEST_IO_DIFFERENT_FILE) { if((srcfile[0] = H5Fcreate(srcfilename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0) TEST_ERROR - } /* end if */ + } else { srcfile[0] = vfile; if(H5Iinc_ref(srcfile[0]) < 0) TEST_ERROR - } /* end if */ + } /* Create source datasets */ if((srcdset[0] = H5Dcreate2(srcfile[0], "src_dset1", H5T_NATIVE_INT, srcspace[0], H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) @@ -2164,7 +2127,7 @@ test_basic_io(unsigned config, hid_t fapl) evbuf[i][j] = buf[2 * i][j]; for(/* j = 13 */; j < 26; j++) evbuf[i][j] = buf[2 * i + 1][j - 13]; - } /* end for */ + } /* Adjust write buffer */ for(i = 0; i < (int)(sizeof(buf) / sizeof(buf[0])); i++) @@ -2181,7 +2144,7 @@ test_basic_io(unsigned config, hid_t fapl) evbuf[i + 5][j] = buf[2 * i][j + 13]; for(/* j = 13 */; j < 26; j++) evbuf[i + 5][j] = buf[2 * i + 1][j]; - } /* end for */ + } /* Close srcdsets and srcfile if config option specified */ if(config & TEST_IO_CLOSE_SRC) { @@ -2196,8 +2159,8 @@ test_basic_io(unsigned config, hid_t fapl) if(H5Fclose(srcfile[0]) < 0) TEST_ERROR srcfile[0] = -1; - } /* end if */ - } /* end if */ + } + } /* Reopen virtual dataset and file if config option specified */ if(config & TEST_IO_REOPEN_VIRT) { @@ -2211,7 +2174,7 @@ test_basic_io(unsigned config, hid_t fapl) TEST_ERROR if((vdset = H5Dopen2(vfile, "v_dset", H5P_DEFAULT)) < 0) TEST_ERROR - } /* end if */ + } /* Read data through virtual dataset by hyperslab */ /* Reset rbuf */ @@ -2227,7 +2190,7 @@ test_basic_io(unsigned config, hid_t fapl) erbuf[i][j] = evbuf[2 * i][j]; for(/* j = 13 */; j < 26; j++) erbuf[i][j] = evbuf[2 * i + 1][j - 13]; - } /* end for */ + } /* Read second slice */ if(H5Dread(vdset, H5T_NATIVE_INT, vspace[1], srcspace[1], H5P_DEFAULT, rbuf[0]) < 0) @@ -2239,7 +2202,7 @@ test_basic_io(unsigned config, hid_t fapl) erbuf[i + 5][j] = evbuf[2 * i][j + 13]; for(/* j = 13 */; j < 26; j++) erbuf[i + 5][j] = evbuf[2 * i + 1][j]; - } /* end for */ + } /* Verify read data */ for(i = 0; i < (int)(sizeof(buf) / sizeof(buf[0])); i++) @@ -2263,7 +2226,7 @@ test_basic_io(unsigned config, hid_t fapl) evbuf[2 * i][j] = buf[i][j]; for(/* j = 13 */; j < 26; j++) evbuf[2 * i + 1][j - 13] = buf[i][j]; - } /* end for */ + } /* Adjust write buffer */ for(i = 0; i < (int)(sizeof(buf) / sizeof(buf[0])); i++) @@ -2280,7 +2243,7 @@ test_basic_io(unsigned config, hid_t fapl) evbuf[2 * i][j + 13] = buf[i + 5][j]; for(/* j = 13 */; j < 26; j++) evbuf[2 * i + 1][j] = buf[i + 5][j]; - } /* end for */ + } /* Reopen srcdsets and srcfile if config option specified */ if(config & TEST_IO_CLOSE_SRC) { @@ -2291,7 +2254,7 @@ test_basic_io(unsigned config, hid_t fapl) TEST_ERROR if((srcdset[1] = H5Dopen2(srcfile[0], "src_dset2", H5P_DEFAULT)) < 0) TEST_ERROR - } /* end if */ + } /* Read data directly from source datasets */ /* Reset rbuf */ @@ -2307,7 +2270,7 @@ test_basic_io(unsigned config, hid_t fapl) erbuf[2 * i][j] = evbuf[i][j]; for(/* j = 13 */; j < 26; j++) erbuf[2 * i + 1][j - 13] = evbuf[i][j]; - } /* end for */ + } /* Read second dataset */ if(H5Dread(srcdset[1], H5T_NATIVE_INT, srcspace[1], srcspace[1], H5P_DEFAULT, rbuf[0]) < 0) @@ -2319,7 +2282,7 @@ test_basic_io(unsigned config, hid_t fapl) erbuf[2 * i][j + 13] = evbuf[i + 5][j]; for(/* j = 13 */; j < 26; j++) erbuf[2 * i + 1][j] = evbuf[i + 5][j]; - } /* end for */ + } /* Verify read data */ for(i = 0; i < (int)(sizeof(buf) / sizeof(buf[0])); i++) @@ -2439,12 +2402,12 @@ test_basic_io(unsigned config, hid_t fapl) if(config & TEST_IO_DIFFERENT_FILE) { if((srcfile[0] = H5Fcreate(srcfilename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0) TEST_ERROR - } /* end if */ + } else { srcfile[0] = vfile; if(H5Iinc_ref(srcfile[0]) < 0) TEST_ERROR - } /* end if */ + } /* Create source datasets */ if((srcdset[0] = H5Dcreate2(srcfile[0], "src_dset1", H5T_NATIVE_INT, srcspace[0], H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) @@ -2498,8 +2461,8 @@ test_basic_io(unsigned config, hid_t fapl) if(H5Fclose(srcfile[0]) < 0) TEST_ERROR srcfile[0] = -1; - } /* end if */ - } /* end if */ + } + } /* Reopen virtual dataset and file if config option specified */ if(config & TEST_IO_REOPEN_VIRT) { @@ -2513,7 +2476,7 @@ test_basic_io(unsigned config, hid_t fapl) TEST_ERROR if((vdset = H5Dopen2(vfile, "v_dset", H5P_DEFAULT)) < 0) TEST_ERROR - } /* end if */ + } /* Read data through virtual dataset by hyperslab */ /* Reset rbuf */ @@ -2538,7 +2501,7 @@ test_basic_io(unsigned config, hid_t fapl) for(j = 0; j < 26; j++) { erbuf[i][j] += (int)(sizeof(buf) / sizeof(buf[0][0])); erbuf[i + 1][j] -= (int)(sizeof(buf) / sizeof(buf[0][0])); - } /* end for */ + } /* Verify read data */ for(i = 0; i < (int)(sizeof(buf) / sizeof(buf[0])); i++) @@ -2584,7 +2547,7 @@ test_basic_io(unsigned config, hid_t fapl) TEST_ERROR if((srcdset[1] = H5Dopen2(srcfile[0], "src_dset2", H5P_DEFAULT)) < 0) TEST_ERROR - } /* end if */ + } /* Read data directly from source datasets */ /* Reset rbuf */ @@ -2605,7 +2568,7 @@ test_basic_io(unsigned config, hid_t fapl) for(j = 0; j < 26; j++) { erbuf[i][j] += (int)(sizeof(buf) / sizeof(buf[0][0])); erbuf[i + 1][j] -= (int)(sizeof(buf) / sizeof(buf[0][0])); - } /* end for */ + } /* Read second dataset */ if(H5Dread(srcdset[1], H5T_NATIVE_INT, memspace, srcspace[0], H5P_DEFAULT, rbuf[0]) < 0) @@ -2780,12 +2743,12 @@ test_basic_io(unsigned config, hid_t fapl) if(config & TEST_IO_DIFFERENT_FILE) { if((srcfile[0] = H5Fcreate(srcfilename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0) TEST_ERROR - } /* end if */ + } else { srcfile[0] = vfile; if(H5Iinc_ref(srcfile[0]) < 0) TEST_ERROR - } /* end if */ + } /* Create source dataset */ if((srcdset[0] = H5Dcreate2(srcfile[0], "src_dset1", H5T_NATIVE_INT, srcspace[0], H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) @@ -2822,8 +2785,8 @@ test_basic_io(unsigned config, hid_t fapl) if(H5Fclose(srcfile[0]) < 0) TEST_ERROR srcfile[0] = -1; - } /* end if */ - } /* end if */ + } + } /* Reopen virtual dataset and file if config option specified */ if(config & TEST_IO_REOPEN_VIRT) { @@ -2837,7 +2800,7 @@ test_basic_io(unsigned config, hid_t fapl) TEST_ERROR if((vdset = H5Dopen2(vfile, "v_dset", H5P_DEFAULT)) < 0) TEST_ERROR - } /* end if */ + } /* Read data through virtual dataset */ /* Reset rbuf */ @@ -2943,7 +2906,7 @@ test_basic_io(unsigned config, hid_t fapl) if((j >= 3) && (j < 6)) { if(rbuf[i][j] != erbuf[i][j]) TEST_ERROR - } /* end if */ + } else if(rbuf[i][j] != 0) TEST_ERROR @@ -2996,7 +2959,7 @@ test_basic_io(unsigned config, hid_t fapl) if((j >= 6) && (j < 9)) { if(rbuf[i][j] != erbuf[i][j]) TEST_ERROR - } /* end if */ + } else if(rbuf[i][j] != 0) TEST_ERROR @@ -3214,7 +3177,7 @@ test_basic_io(unsigned config, hid_t fapl) TEST_ERROR if((srcdset[0] = H5Dopen2(srcfile[0], "src_dset1", H5P_DEFAULT)) < 0) TEST_ERROR - } /* end if */ + } /* Read data directly from source dataset */ /* Select hyperslab in memory space */ @@ -3289,32 +3252,19 @@ test_basic_io(unsigned config, hid_t fapl) error: H5E_BEGIN_TRY { - for(i = 0; i < (int)(sizeof(srcdset) / sizeof(srcdset[0])); i++) { - if(srcdset[i] >= 0) - (void)H5Dclose(srcdset[i]); - } /* end for */ - if(vdset >= 0) - (void)H5Dclose(vdset); - for(i = 0; i < (int)(sizeof(srcfile) / sizeof(srcfile[0])); i++) { - if(srcfile[i] >= 0) - (void)H5Fclose(srcfile[i]); - } /* end for */ - if(vfile >= 0) - (void)H5Fclose(vfile); - if(vfile2 >= 0) - (void)H5Fclose(vfile2); - for(i = 0; i < (int)(sizeof(srcspace) / sizeof(srcspace[0])); i++) { - if(srcspace[i] >= 0) - (void)H5Sclose(srcspace[i]); - } /* end for */ - for(i = 0; i < (int)(sizeof(vspace) / sizeof(vspace[0])); i++) { - if(vspace[i] >= 0) - (void)H5Sclose(vspace[i]); - } /* end for */ - if(memspace >= 0) - (void)H5Sclose(memspace); - if(dcpl >= 0) - (void)H5Pclose(dcpl); + for(i = 0; i < (int)(sizeof(srcdset) / sizeof(srcdset[0])); i++) + H5Dclose(srcdset[i]); + H5Dclose(vdset); + for(i = 0; i < (int)(sizeof(srcfile) / sizeof(srcfile[0])); i++) + H5Fclose(srcfile[i]); + H5Fclose(vfile); + H5Fclose(vfile2); + for(i = 0; i < (int)(sizeof(srcspace) / sizeof(srcspace[0])); i++) + H5Sclose(srcspace[i]); + for(i = 0; i < (int)(sizeof(vspace) / sizeof(vspace[0])); i++) + H5Sclose(vspace[i]); + H5Sclose(memspace); + H5Pclose(dcpl); } H5E_END_TRY; return 1; @@ -3327,14 +3277,7 @@ error: * Purpose: Tests VDS with unlimited selections * * Return: Success: 0 - * * Failure: number of errors - * - * Programmer: Neil Fortner - * Thursday, April 30, 2015 - * - * Modifications: - * *------------------------------------------------------------------------- */ static int @@ -3447,12 +3390,12 @@ test_unlim(unsigned config, hid_t fapl) if(config & TEST_IO_DIFFERENT_FILE) { if((srcfile[0] = H5Fcreate(srcfilename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0) TEST_ERROR - } /* end if */ + } else { srcfile[0] = vfile; if(H5Iinc_ref(srcfile[0]) < 0) TEST_ERROR - } /* end if */ + } /* Create source datasets */ if((srcdset[0] = H5Dcreate2(srcfile[0], "src_dset1", H5T_NATIVE_INT, srcspace[0], H5P_DEFAULT, srcdcpl, H5P_DEFAULT)) < 0) @@ -3517,8 +3460,8 @@ test_unlim(unsigned config, hid_t fapl) if(H5Fclose(srcfile[0]) < 0) TEST_ERROR srcfile[0] = -1; - } /* end if */ - } /* end if */ + } + } /* Reopen virtual dataset and file if config option specified */ if(config & TEST_IO_REOPEN_VIRT) { @@ -3532,7 +3475,7 @@ test_unlim(unsigned config, hid_t fapl) TEST_ERROR if((vdset = H5Dopen2(vfile, "v_dset", dapl)) < 0) TEST_ERROR - } /* end if */ + } /* Get VDS space */ if((filespace = H5Dget_space(vdset)) < 0) @@ -3577,11 +3520,11 @@ test_unlim(unsigned config, hid_t fapl) if(j >= (int)dims[1]) { if(rbuf[i][j] != 0) TEST_ERROR - } /* end if */ + } else if(rbuf[i][j] != erbuf[i][j]) TEST_ERROR - } /* end for */ + } /* Test H5Pget_virtual_view() */ if(H5Pget_virtual_view(dapl, &virtual_view) < 0) @@ -3601,7 +3544,7 @@ test_unlim(unsigned config, hid_t fapl) vfile = -1; if((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, fapl)) < 0) TEST_ERROR - } /* end if */ + } if((vdset = H5Dopen2(vfile, "v_dset", dapl)) < 0) TEST_ERROR @@ -3649,11 +3592,11 @@ test_unlim(unsigned config, hid_t fapl) if(j >= (int)dims[1]) { if(rbuf[i][j] != 0) TEST_ERROR - } /* end if */ + } else if(rbuf[i][j] != erbuf[i][j]) TEST_ERROR - } /* end for */ + } /* Reopen srcdset[0] and srcfile if config option specified */ if(config & TEST_IO_CLOSE_SRC) { @@ -3662,7 +3605,7 @@ test_unlim(unsigned config, hid_t fapl) TEST_ERROR if((srcdset[0] = H5Dopen2(srcfile[0], "src_dset1", H5P_DEFAULT)) < 0) TEST_ERROR - } /* end if */ + } /* Extend srcdset[0] */ dims[0] = 5; @@ -3699,8 +3642,8 @@ test_unlim(unsigned config, hid_t fapl) if(H5Fclose(srcfile[0]) < 0) TEST_ERROR srcfile[0] = -1; - } /* end if */ - } /* end if */ + } + } /* Reopen virtual dataset and file if config option specified */ if(config & TEST_IO_REOPEN_VIRT) { @@ -3714,7 +3657,7 @@ test_unlim(unsigned config, hid_t fapl) TEST_ERROR if((vdset = H5Dopen2(vfile, "v_dset", dapl)) < 0) TEST_ERROR - } /* end if */ + } /* Get VDS space */ if((filespace = H5Dget_space(vdset)) < 0) @@ -3761,11 +3704,11 @@ test_unlim(unsigned config, hid_t fapl) if(j >= (int)dims[1]) { if(rbuf[i][j] != 0) TEST_ERROR - } /* end if */ + } else if(rbuf[i][j] != erbuf[i][j]) TEST_ERROR - } /* end for */ + } /* Close VDS and reopen with view set to H5D_VDS_LAST_AVAILABLE, reopen file * as well if config option specified */ @@ -3779,7 +3722,7 @@ test_unlim(unsigned config, hid_t fapl) vfile = -1; if((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, fapl)) < 0) TEST_ERROR - } /* end if */ + } if((vdset = H5Dopen2(vfile, "v_dset", dapl)) < 0) TEST_ERROR @@ -3832,11 +3775,11 @@ test_unlim(unsigned config, hid_t fapl) if(j >= (int)dims[1]) { if(rbuf[i][j] != 0) TEST_ERROR - } /* end if */ + } else if(rbuf[i][j] != erbuf[i][j]) TEST_ERROR - } /* end for */ + } /* Reopen srcdset[1] and srcfile if config option specified */ if(config & TEST_IO_CLOSE_SRC) { @@ -3845,7 +3788,7 @@ test_unlim(unsigned config, hid_t fapl) TEST_ERROR if((srcdset[1] = H5Dopen2(srcfile[0], "src_dset2", H5P_DEFAULT)) < 0) TEST_ERROR - } /* end if */ + } /* Extend srcdset[1] */ dims[0] = 5; @@ -3887,8 +3830,8 @@ test_unlim(unsigned config, hid_t fapl) if(H5Fclose(srcfile[0]) < 0) TEST_ERROR srcfile[0] = -1; - } /* end if */ - } /* end if */ + } + } /* Reopen virtual dataset and file if config option specified */ if(config & TEST_IO_REOPEN_VIRT) { @@ -3902,7 +3845,7 @@ test_unlim(unsigned config, hid_t fapl) TEST_ERROR if((vdset = H5Dopen2(vfile, "v_dset", dapl)) < 0) TEST_ERROR - } /* end if */ + } /* Get VDS space */ if((filespace = H5Dget_space(vdset)) < 0) @@ -3964,7 +3907,7 @@ test_unlim(unsigned config, hid_t fapl) if((i == 4) || (i == 5)) { if(rbuf[i][j] != erbuf[i][j]) TEST_ERROR - } /* end if */ + } else if(rbuf[i][j] != 0) TEST_ERROR @@ -4029,11 +3972,11 @@ test_unlim(unsigned config, hid_t fapl) if(j >= (int)dims[1]) { if(rbuf[i][j] != 0) TEST_ERROR - } /* end if */ + } else if(rbuf[i][j] != erbuf[i][j]) TEST_ERROR - } /* end for */ + } /* Shrink to 15 */ dims[1] = 15; @@ -4060,12 +4003,12 @@ test_unlim(unsigned config, hid_t fapl) if(j >= (int)dims[1]) { if(rbuf[i][j] != 0) TEST_ERROR - } /* end if */ + } else if(rbuf[i][j] != erbuf[i][j]) TEST_ERROR - } /* end for */ - } /* end if */ + } + } /* Close VDS and reopen with view set to H5D_VDS_FIRST_MISSING, reopen file * as well if config option specified */ @@ -4079,7 +4022,7 @@ test_unlim(unsigned config, hid_t fapl) vfile = -1; if((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, fapl)) < 0) TEST_ERROR - } /* end if */ + } if((vdset = H5Dopen2(vfile, "v_dset", dapl)) < 0) TEST_ERROR @@ -4127,11 +4070,11 @@ test_unlim(unsigned config, hid_t fapl) if(j >= (int)dims[1]) { if(rbuf[i][j] != 0) TEST_ERROR - } /* end if */ + } else if(rbuf[i][j] != erbuf[i][j]) TEST_ERROR - } /* end for */ + } /* Now test reopening virtual dataset without calling H5Dget_space, if * REOPEN_VIRT flag set */ @@ -4166,11 +4109,11 @@ test_unlim(unsigned config, hid_t fapl) if(j >= (int)dims[1]) { if(rbuf[i][j] != 0) TEST_ERROR - } /* end if */ + } else if(rbuf[i][j] != erbuf[i][j]) TEST_ERROR - } /* end for */ + } /* Now try setting extent manually */ /* Grow to 18 */ @@ -4198,11 +4141,11 @@ test_unlim(unsigned config, hid_t fapl) if(j >= (int)dims[1]) { if(rbuf[i][j] != 0) TEST_ERROR - } /* end if */ + } else if(rbuf[i][j] != erbuf[i][j]) TEST_ERROR - } /* end for */ + } /* Grow to 20 */ dims[1] = 20; @@ -4228,7 +4171,7 @@ test_unlim(unsigned config, hid_t fapl) for(j = 0; j < (int)mdims[1]; j++) if(rbuf[i][j] != erbuf[i][j]) TEST_ERROR - } /* end if */ + } /* Close */ if(!(config & TEST_IO_CLOSE_SRC)) { @@ -4241,12 +4184,12 @@ test_unlim(unsigned config, hid_t fapl) if(H5Fclose(srcfile[0]) < 0) TEST_ERROR srcfile[0] = -1; - } /* end if */ + } else if(!(config & TEST_IO_DIFFERENT_FILE)) { if(H5Fclose(srcfile[0]) < 0) TEST_ERROR srcfile[0] = -1; - } /* end if */ + } if(H5Dclose(vdset) < 0) TEST_ERROR vdset = -1; @@ -4322,12 +4265,12 @@ test_unlim(unsigned config, hid_t fapl) if(config & TEST_IO_DIFFERENT_FILE) { if((srcfile[0] = H5Fcreate(srcfilename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0) TEST_ERROR - } /* end if */ + } else { srcfile[0] = vfile; if(H5Iinc_ref(srcfile[0]) < 0) TEST_ERROR - } /* end if */ + } /* Create source datasets */ if((srcdset[0] = H5Dcreate2(srcfile[0], "src_dset1", H5T_NATIVE_INT, srcspace[0], H5P_DEFAULT, srcdcpl, H5P_DEFAULT)) < 0) @@ -4392,8 +4335,8 @@ test_unlim(unsigned config, hid_t fapl) if(H5Fclose(srcfile[0]) < 0) TEST_ERROR srcfile[0] = -1; - } /* end if */ - } /* end if */ + } + } /* Reopen virtual dataset and file if config option specified */ if(config & TEST_IO_REOPEN_VIRT) { @@ -4407,7 +4350,7 @@ test_unlim(unsigned config, hid_t fapl) TEST_ERROR if((vdset = H5Dopen2(vfile, "v_dset", dapl)) < 0) TEST_ERROR - } /* end if */ + } /* Get VDS space */ if((filespace = H5Dget_space(vdset)) < 0) @@ -4451,11 +4394,11 @@ test_unlim(unsigned config, hid_t fapl) if(j >= (int)dims[1]) { if(rbuf[i][j] != 0) TEST_ERROR - } /* end if */ + } else if(rbuf[i][j] != erbuf[i][j]) TEST_ERROR - } /* end for */ + } /* Close VDS and reopen with view set to H5D_VDS_FIRST_MISSING, reopen file * as well if config option specified */ @@ -4469,7 +4412,7 @@ test_unlim(unsigned config, hid_t fapl) vfile = -1; if((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, fapl)) < 0) TEST_ERROR - } /* end if */ + } if((vdset = H5Dopen2(vfile, "v_dset", dapl)) < 0) TEST_ERROR @@ -4511,11 +4454,11 @@ test_unlim(unsigned config, hid_t fapl) if(j >= (int)dims[1]) { if(rbuf[i][j] != 0) TEST_ERROR - } /* end if */ + } else if(rbuf[i][j] != erbuf[i][j]) TEST_ERROR - } /* end for */ + } /* Reopen srcdset[0] and srcfile if config option specified */ if(config & TEST_IO_CLOSE_SRC) { @@ -4524,7 +4467,7 @@ test_unlim(unsigned config, hid_t fapl) TEST_ERROR if((srcdset[0] = H5Dopen2(srcfile[0], "src_dset1", H5P_DEFAULT)) < 0) TEST_ERROR - } /* end if */ + } /* Extend srcdset[0] */ dims[1] = 7; @@ -4566,8 +4509,8 @@ test_unlim(unsigned config, hid_t fapl) if(H5Fclose(srcfile[0]) < 0) TEST_ERROR srcfile[0] = -1; - } /* end if */ - } /* end if */ + } + } /* Reopen virtual dataset and file if config option specified */ if(config & TEST_IO_REOPEN_VIRT) { @@ -4581,7 +4524,7 @@ test_unlim(unsigned config, hid_t fapl) TEST_ERROR if((vdset = H5Dopen2(vfile, "v_dset", dapl)) < 0) TEST_ERROR - } /* end if */ + } /* Get VDS space */ if((filespace = H5Dget_space(vdset)) < 0) @@ -4627,11 +4570,11 @@ test_unlim(unsigned config, hid_t fapl) if(j >= (int)dims[1]) { if(rbuf[i][j] != 0) TEST_ERROR - } /* end if */ + } else if(rbuf[i][j] != erbuf[i][j]) TEST_ERROR - } /* end for */ + } /* Close VDS and reopen with view set to H5D_VDS_LAST_AVAILABLE, reopen file * as well if config option specified */ @@ -4645,7 +4588,7 @@ test_unlim(unsigned config, hid_t fapl) vfile = -1; if((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, fapl)) < 0) TEST_ERROR - } /* end if */ + } if((vdset = H5Dopen2(vfile, "v_dset", dapl)) < 0) TEST_ERROR @@ -4696,11 +4639,11 @@ test_unlim(unsigned config, hid_t fapl) if(j >= (int)dims[1]) { if(rbuf[i][j] != 0) TEST_ERROR - } /* end if */ + } else if(rbuf[i][j] != erbuf[i][j]) TEST_ERROR - } /* end for */ + } /* Reopen srcdset[1] and srcfile if config option specified */ if(config & TEST_IO_CLOSE_SRC) { @@ -4709,7 +4652,7 @@ test_unlim(unsigned config, hid_t fapl) TEST_ERROR if((srcdset[1] = H5Dopen2(srcfile[0], "src_dset2", H5P_DEFAULT)) < 0) TEST_ERROR - } /* end if */ + } /* Extend srcdset[1] */ dims[1] = 10; @@ -4751,8 +4694,8 @@ test_unlim(unsigned config, hid_t fapl) if(H5Fclose(srcfile[0]) < 0) TEST_ERROR srcfile[0] = -1; - } /* end if */ - } /* end if */ + } + } /* Reopen virtual dataset and file if config option specified */ if(config & TEST_IO_REOPEN_VIRT) { @@ -4766,7 +4709,7 @@ test_unlim(unsigned config, hid_t fapl) TEST_ERROR if((vdset = H5Dopen2(vfile, "v_dset", dapl)) < 0) TEST_ERROR - } /* end if */ + } /* Get VDS space */ if((filespace = H5Dget_space(vdset)) < 0) @@ -4828,7 +4771,7 @@ test_unlim(unsigned config, hid_t fapl) if((i == 4) || (i == 5)) { if(rbuf[i][j] != erbuf[i][j]) TEST_ERROR - } /* end if */ + } else if(rbuf[i][j] != 0) TEST_ERROR @@ -4845,7 +4788,7 @@ test_unlim(unsigned config, hid_t fapl) vfile = -1; if((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, fapl)) < 0) TEST_ERROR - } /* end if */ + } if((vdset = H5Dopen2(vfile, "v_dset", dapl)) < 0) TEST_ERROR @@ -4897,11 +4840,11 @@ test_unlim(unsigned config, hid_t fapl) if(j >= (int)dims[1]) { if(rbuf[i][j] != 0) TEST_ERROR - } /* end if */ + } else if(rbuf[i][j] != erbuf[i][j]) TEST_ERROR - } /* end for */ + } /* Close */ if(!(config & TEST_IO_CLOSE_SRC)) { @@ -4914,12 +4857,12 @@ test_unlim(unsigned config, hid_t fapl) if(H5Fclose(srcfile[0]) < 0) TEST_ERROR srcfile[0] = -1; - } /* end if */ + } else if(!(config & TEST_IO_DIFFERENT_FILE)) { if(H5Fclose(srcfile[0]) < 0) TEST_ERROR srcfile[0] = -1; - } /* end if */ + } if(H5Dclose(vdset) < 0) TEST_ERROR vdset = -1; @@ -5014,12 +4957,12 @@ test_unlim(unsigned config, hid_t fapl) if(config & TEST_IO_DIFFERENT_FILE) { if((srcfile[0] = H5Fcreate(srcfilename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0) TEST_ERROR - } /* end if */ + } else { srcfile[0] = vfile; if(H5Iinc_ref(srcfile[0]) < 0) TEST_ERROR - } /* end if */ + } /* Create source datasets */ if((srcdset[0] = H5Dcreate2(srcfile[0], "src_dset1", H5T_NATIVE_INT, srcspace[0], H5P_DEFAULT, srcdcpl, H5P_DEFAULT)) < 0) @@ -5059,7 +5002,7 @@ test_unlim(unsigned config, hid_t fapl) for(j = 0; j < 2; j++) { erbuf[i][6 * j] = buf[i][2 * j]; erbuf[i][(6 * j) + 1] = buf[i][(2 * j) + 1]; - } /* end for */ + } /* Adjust write buffer */ for(i = 0; i < (int)mdims[0]; i++) @@ -5075,7 +5018,7 @@ test_unlim(unsigned config, hid_t fapl) for(j = 0; j < 2; j++) { erbuf[i][(6 * j) + 2] = buf[i][2 * j]; erbuf[i][(6 * j) + 3] = buf[i][(2 * j) + 1]; - } /* end for */ + } /* Adjust write buffer */ for(i = 0; i < (int)mdims[0]; i++) @@ -5096,7 +5039,7 @@ test_unlim(unsigned config, hid_t fapl) for(i = 0; i < 10; i++) { erbuf[i][4] = buf[i][0]; erbuf[i][5] = buf[i][1]; - } /* end for */ + } /* Close srcdsets and srcfile if config option specified */ if(config & TEST_IO_CLOSE_SRC) { @@ -5114,8 +5057,8 @@ test_unlim(unsigned config, hid_t fapl) if(H5Fclose(srcfile[0]) < 0) TEST_ERROR srcfile[0] = -1; - } /* end if */ - } /* end if */ + } + } /* Reopen virtual dataset and file if config option specified */ if(config & TEST_IO_REOPEN_VIRT) { @@ -5129,7 +5072,7 @@ test_unlim(unsigned config, hid_t fapl) TEST_ERROR if((vdset = H5Dopen2(vfile, "v_dset", dapl)) < 0) TEST_ERROR - } /* end if */ + } /* Get VDS space */ if((filespace = H5Dget_space(vdset)) < 0) @@ -5173,11 +5116,11 @@ test_unlim(unsigned config, hid_t fapl) if(j >= (int)dims[1]) { if(rbuf[i][j] != 0) TEST_ERROR - } /* end if */ + } else if(rbuf[i][j] != erbuf[i][j]) TEST_ERROR - } /* end for */ + } /* Close VDS and reopen with view set to H5D_VDS_FIRST_MISSING, reopen file * as well if config option specified */ @@ -5191,7 +5134,7 @@ test_unlim(unsigned config, hid_t fapl) vfile = -1; if((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, fapl)) < 0) TEST_ERROR - } /* end if */ + } if((vdset = H5Dopen2(vfile, "v_dset", dapl)) < 0) TEST_ERROR @@ -5233,11 +5176,11 @@ test_unlim(unsigned config, hid_t fapl) if(j >= (int)dims[1]) { if(rbuf[i][j] != 0) TEST_ERROR - } /* end if */ + } else if(rbuf[i][j] != erbuf[i][j]) TEST_ERROR - } /* end for */ + } /* Reopen srcdset[0] and srcfile if config option specified */ if(config & TEST_IO_CLOSE_SRC) { @@ -5246,7 +5189,7 @@ test_unlim(unsigned config, hid_t fapl) TEST_ERROR if((srcdset[0] = H5Dopen2(srcfile[0], "src_dset1", H5P_DEFAULT)) < 0) TEST_ERROR - } /* end if */ + } /* Extend srcdset[0] */ dims[1] = 7; @@ -5283,8 +5226,8 @@ test_unlim(unsigned config, hid_t fapl) if(H5Fclose(srcfile[0]) < 0) TEST_ERROR srcfile[0] = -1; - } /* end if */ - } /* end if */ + } + } /* Reopen virtual dataset and file if config option specified */ if(config & TEST_IO_REOPEN_VIRT) { @@ -5298,7 +5241,7 @@ test_unlim(unsigned config, hid_t fapl) TEST_ERROR if((vdset = H5Dopen2(vfile, "v_dset", dapl)) < 0) TEST_ERROR - } /* end if */ + } /* Get VDS space */ if((filespace = H5Dget_space(vdset)) < 0) @@ -5343,11 +5286,11 @@ test_unlim(unsigned config, hid_t fapl) if(j >= (int)dims[1]) { if(rbuf[i][j] != 0) TEST_ERROR - } /* end if */ + } else if(rbuf[i][j] != erbuf[i][j]) TEST_ERROR - } /* end for */ + } /* Close VDS and reopen with view set to H5D_VDS_LAST_AVAILABLE, reopen file * as well if config option specified */ @@ -5361,7 +5304,7 @@ test_unlim(unsigned config, hid_t fapl) vfile = -1; if((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, fapl)) < 0) TEST_ERROR - } /* end if */ + } if((vdset = H5Dopen2(vfile, "v_dset", dapl)) < 0) TEST_ERROR @@ -5371,7 +5314,7 @@ test_unlim(unsigned config, hid_t fapl) erbuf[i][12] = buf[i][0]; erbuf[i][13] = buf[i][1]; erbuf[i][18] = buf[i][2]; - } /* end for */ + } /* Get VDS space */ if((filespace = H5Dget_space(vdset)) < 0) @@ -5415,11 +5358,11 @@ test_unlim(unsigned config, hid_t fapl) if(j >= (int)dims[1]) { if(rbuf[i][j] != 0) TEST_ERROR - } /* end if */ + } else if(rbuf[i][j] != erbuf[i][j]) TEST_ERROR - } /* end for */ + } /* Reopen srcdset[2] and srcfile if config option specified */ if(config & TEST_IO_CLOSE_SRC) { @@ -5428,7 +5371,7 @@ test_unlim(unsigned config, hid_t fapl) TEST_ERROR if((srcdset[2] = H5Dopen2(srcfile[0], "src_dset3", H5P_DEFAULT)) < 0) TEST_ERROR - } /* end if */ + } /* Extend srcdset[2] */ dims[1] = 5; @@ -5460,7 +5403,7 @@ test_unlim(unsigned config, hid_t fapl) erbuf[i][10] = buf[i][0]; erbuf[i][11] = buf[i][1]; erbuf[i][16] = buf[i][2]; - } /* end for */ + } /* Close srcdset[2] and srcfile if config option specified */ if(config & TEST_IO_CLOSE_SRC) { @@ -5472,8 +5415,8 @@ test_unlim(unsigned config, hid_t fapl) if(H5Fclose(srcfile[0]) < 0) TEST_ERROR srcfile[0] = -1; - } /* end if */ - } /* end if */ + } + } /* Reopen virtual dataset and file if config option specified */ if(config & TEST_IO_REOPEN_VIRT) { @@ -5487,7 +5430,7 @@ test_unlim(unsigned config, hid_t fapl) TEST_ERROR if((vdset = H5Dopen2(vfile, "v_dset", dapl)) < 0) TEST_ERROR - } /* end if */ + } /* Get VDS space */ if((filespace = H5Dget_space(vdset)) < 0) @@ -5532,11 +5475,11 @@ test_unlim(unsigned config, hid_t fapl) if(j >= (int)dims[1]) { if(rbuf[i][j] != 0) TEST_ERROR - } /* end if */ + } else if(rbuf[i][j] != erbuf[i][j]) TEST_ERROR - } /* end for */ + } /* Close VDS and reopen with view set to H5D_VDS_FIRST_MISSING, reopen file * as well if config option specified */ @@ -5550,7 +5493,7 @@ test_unlim(unsigned config, hid_t fapl) vfile = -1; if((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, fapl)) < 0) TEST_ERROR - } /* end if */ + } if((vdset = H5Dopen2(vfile, "v_dset", dapl)) < 0) TEST_ERROR @@ -5596,11 +5539,11 @@ test_unlim(unsigned config, hid_t fapl) if(j >= (int)dims[1]) { if(rbuf[i][j] != 0) TEST_ERROR - } /* end if */ + } else if(rbuf[i][j] != erbuf[i][j]) TEST_ERROR - } /* end for */ + } /* Reopen srcdset[1] and srcfile if config option specified */ if(config & TEST_IO_CLOSE_SRC) { @@ -5609,7 +5552,7 @@ test_unlim(unsigned config, hid_t fapl) TEST_ERROR if((srcdset[1] = H5Dopen2(srcfile[0], "src_dset2", H5P_DEFAULT)) < 0) TEST_ERROR - } /* end if */ + } /* Extend srcdset[1] */ dims[1] = 6; @@ -5640,7 +5583,7 @@ test_unlim(unsigned config, hid_t fapl) for(i = 0; i < 10; i++) { erbuf[i][14] = buf[i][0]; erbuf[i][15] = buf[i][1]; - } /* end for */ + } /* Close srcdset[1] and srcfile if config option specified */ if(config & TEST_IO_CLOSE_SRC) { @@ -5652,8 +5595,8 @@ test_unlim(unsigned config, hid_t fapl) if(H5Fclose(srcfile[0]) < 0) TEST_ERROR srcfile[0] = -1; - } /* end if */ - } /* end if */ + } + } /* Reopen virtual dataset and file if config option specified */ if(config & TEST_IO_REOPEN_VIRT) { @@ -5667,7 +5610,7 @@ test_unlim(unsigned config, hid_t fapl) TEST_ERROR if((vdset = H5Dopen2(vfile, "v_dset", dapl)) < 0) TEST_ERROR - } /* end if */ + } /* Get VDS space */ if((filespace = H5Dget_space(vdset)) < 0) @@ -5711,11 +5654,11 @@ test_unlim(unsigned config, hid_t fapl) if(j >= (int)dims[1]) { if(rbuf[i][j] != 0) TEST_ERROR - } /* end if */ + } else if(rbuf[i][j] != erbuf[i][j]) TEST_ERROR - } /* end for */ + } /* Close VDS and reopen with view set to H5D_VDS_LAST_AVAILABLE, reopen file * as well if config option specified */ @@ -5729,7 +5672,7 @@ test_unlim(unsigned config, hid_t fapl) vfile = -1; if((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, fapl)) < 0) TEST_ERROR - } /* end if */ + } if((vdset = H5Dopen2(vfile, "v_dset", dapl)) < 0) TEST_ERROR @@ -5771,11 +5714,11 @@ test_unlim(unsigned config, hid_t fapl) if(j >= (int)dims[1]) { if(rbuf[i][j] != 0) TEST_ERROR - } /* end if */ + } else if(rbuf[i][j] != erbuf[i][j]) TEST_ERROR - } /* end for */ + } /* Now just read middle 2 rows */ HDmemset(rbuf[0], 0, sizeof(rbuf)); @@ -5801,11 +5744,11 @@ test_unlim(unsigned config, hid_t fapl) if(j >= (int)dims[1]) { if(rbuf[i][j] != 0) TEST_ERROR - } /* end if */ + } else if((i == 4) || (i == 5)) { if(rbuf[i][j] != erbuf[i][j]) TEST_ERROR - } /* end if */ + } else if(rbuf[i][j] != 0) TEST_ERROR @@ -5824,12 +5767,12 @@ test_unlim(unsigned config, hid_t fapl) if(H5Fclose(srcfile[0]) < 0) TEST_ERROR srcfile[0] = -1; - } /* end if */ + } else if(!(config & TEST_IO_DIFFERENT_FILE)) { if(H5Fclose(srcfile[0]) < 0) TEST_ERROR srcfile[0] = -1; - } /* end if */ + } if(H5Dclose(vdset) < 0) TEST_ERROR vdset = -1; @@ -5910,12 +5853,12 @@ test_unlim(unsigned config, hid_t fapl) if(config & TEST_IO_DIFFERENT_FILE) { if((srcfile[0] = H5Fcreate(srcfilename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0) TEST_ERROR - } /* end if */ + } else { srcfile[0] = vfile; if(H5Iinc_ref(srcfile[0]) < 0) TEST_ERROR - } /* end if */ + } /* Create source datasets */ if((srcdset[0] = H5Dcreate2(srcfile[0], "src_dset1", H5T_NATIVE_INT, srcspace[0], H5P_DEFAULT, srcdcpl, H5P_DEFAULT)) < 0) @@ -5968,8 +5911,8 @@ test_unlim(unsigned config, hid_t fapl) if(H5Fclose(srcfile[0]) < 0) TEST_ERROR srcfile[0] = -1; - } /* end if */ - } /* end if */ + } + } /* Reopen virtual dataset and file if config option specified */ if(config & TEST_IO_REOPEN_VIRT) { @@ -5983,7 +5926,7 @@ test_unlim(unsigned config, hid_t fapl) TEST_ERROR if((vdset = H5Dopen2(vfile, "v_dset", dapl)) < 0) TEST_ERROR - } /* end if */ + } /* Get VDS space */ if((filespace = H5Dget_space(vdset)) < 0) @@ -6029,11 +5972,11 @@ test_unlim(unsigned config, hid_t fapl) if(j >= (int)dims[1]) { if(rbuf[i][j] != 0) TEST_ERROR - } /* end if */ + } else if(rbuf[i][j] != erbuf[i][j]) TEST_ERROR - } /* end for */ + } /* Close VDS and reopen with view set to H5D_VDS_FIRST_MISSING, reopen file * as well if config option specified */ @@ -6047,7 +5990,7 @@ test_unlim(unsigned config, hid_t fapl) vfile = -1; if((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, fapl)) < 0) TEST_ERROR - } /* end if */ + } if((vdset = H5Dopen2(vfile, "v_dset", dapl)) < 0) TEST_ERROR @@ -6089,11 +6032,11 @@ test_unlim(unsigned config, hid_t fapl) if(j >= (int)dims[1]) { if(rbuf[i][j] != 0) TEST_ERROR - } /* end if */ + } else if(rbuf[i][j] != erbuf[i][j]) TEST_ERROR - } /* end for */ + } /* Reopen srcdset[0] and srcfile if config option specified */ if(config & TEST_IO_CLOSE_SRC) { @@ -6102,7 +6045,7 @@ test_unlim(unsigned config, hid_t fapl) TEST_ERROR if((srcdset[0] = H5Dopen2(srcfile[0], "src_dset1", H5P_DEFAULT)) < 0) TEST_ERROR - } /* end if */ + } /* Extend srcdset[0] */ dims[0] = 5; @@ -6140,8 +6083,8 @@ test_unlim(unsigned config, hid_t fapl) if(H5Fclose(srcfile[0]) < 0) TEST_ERROR srcfile[0] = -1; - } /* end if */ - } /* end if */ + } + } /* Reopen virtual dataset and file if config option specified */ if(config & TEST_IO_REOPEN_VIRT) { @@ -6155,7 +6098,7 @@ test_unlim(unsigned config, hid_t fapl) TEST_ERROR if((vdset = H5Dopen2(vfile, "v_dset", dapl)) < 0) TEST_ERROR - } /* end if */ + } /* Get VDS space */ if((filespace = H5Dget_space(vdset)) < 0) @@ -6201,11 +6144,11 @@ test_unlim(unsigned config, hid_t fapl) if(j >= (int)dims[1]) { if(rbuf[i][j] != 0) TEST_ERROR - } /* end if */ + } else if(rbuf[i][j] != erbuf[i][j]) TEST_ERROR - } /* end for */ + } /* Close VDS and reopen with view set to H5D_VDS_LAST_AVAILABLE, reopen file * as well if config option specified */ @@ -6219,7 +6162,7 @@ test_unlim(unsigned config, hid_t fapl) vfile = -1; if((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, fapl)) < 0) TEST_ERROR - } /* end if */ + } if((vdset = H5Dopen2(vfile, "v_dset", dapl)) < 0) TEST_ERROR @@ -6267,11 +6210,11 @@ test_unlim(unsigned config, hid_t fapl) if(j >= (int)dims[1]) { if(rbuf[i][j] != 0) TEST_ERROR - } /* end if */ + } else if(rbuf[i][j] != erbuf[i][j]) TEST_ERROR - } /* end for */ + } /* Close */ if(!(config & TEST_IO_CLOSE_SRC)) { @@ -6284,12 +6227,12 @@ test_unlim(unsigned config, hid_t fapl) if(H5Fclose(srcfile[0]) < 0) TEST_ERROR srcfile[0] = -1; - } /* end if */ + } else if(!(config & TEST_IO_DIFFERENT_FILE)) { if(H5Fclose(srcfile[0]) < 0) TEST_ERROR srcfile[0] = -1; - } /* end if */ + } if(H5Dclose(vdset) < 0) TEST_ERROR vdset = -1; @@ -6329,36 +6272,21 @@ test_unlim(unsigned config, hid_t fapl) error: H5E_BEGIN_TRY { - for(i = 0; i < (int)(sizeof(srcdset) / sizeof(srcdset[0])); i++) { - if(srcdset[i] >= 0) - (void)H5Dclose(srcdset[i]); - } /* end for */ - if(vdset >= 0) - (void)H5Dclose(vdset); - for(i = 0; i < (int)(sizeof(srcfile) / sizeof(srcfile[0])); i++) { - if(srcfile[i] >= 0) - (void)H5Fclose(srcfile[i]); - } /* end for */ - if(vfile >= 0) - (void)H5Fclose(vfile); - for(i = 0; i < (int)(sizeof(srcspace) / sizeof(srcspace[0])); i++) { - if(srcspace[i] >= 0) - (void)H5Sclose(srcspace[i]); - } /* end for */ - for(i = 0; i < (int)(sizeof(vspace) / sizeof(vspace[0])); i++) { - if(vspace[i] >= 0) - (void)H5Sclose(vspace[i]); - } /* end for */ - if(filespace >= 0) - (void)H5Sclose(filespace); - if(memspace >= 0) - (void)H5Sclose(memspace); - if(dcpl >= 0) - (void)H5Pclose(dcpl); - if(srcdcpl >= 0) - (void)H5Pclose(srcdcpl); - if(dapl >= 0) - (void)H5Pclose(dapl); + for(i = 0; i < (int)(sizeof(srcdset) / sizeof(srcdset[0])); i++) + H5Dclose(srcdset[i]); + H5Dclose(vdset); + for(i = 0; i < (int)(sizeof(srcfile) / sizeof(srcfile[0])); i++) + H5Fclose(srcfile[i]); + H5Fclose(vfile); + for(i = 0; i < (int)(sizeof(srcspace) / sizeof(srcspace[0])); i++) + H5Sclose(srcspace[i]); + for(i = 0; i < (int)(sizeof(vspace) / sizeof(vspace[0])); i++) + H5Sclose(vspace[i]); + H5Sclose(filespace); + H5Sclose(memspace); + H5Pclose(dcpl); + H5Pclose(srcdcpl); + H5Pclose(dapl); } H5E_END_TRY; return 1; @@ -6372,14 +6300,7 @@ error: * source dataset resolution * * Return: Success: 0 - * * Failure: number of errors - * - * Programmer: Neil Fortner - * Tuesday, May 26, 2015 - * - * Modifications: - * *------------------------------------------------------------------------- */ static int @@ -6485,12 +6406,12 @@ test_printf(unsigned config, hid_t fapl) if(config & TEST_IO_DIFFERENT_FILE) { if((srcfile[0] = H5Fcreate(srcfilename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0) TEST_ERROR - } /* end if */ + } else { srcfile[0] = vfile; if(H5Iinc_ref(srcfile[0]) < 0) TEST_ERROR - } /* end if */ + } /* Create virtual dataset */ if((vdset = H5Dcreate2(vfile, "v_dset", H5T_NATIVE_INT, vspace[0], H5P_DEFAULT, dcpl, dapl)) < 0) @@ -6502,7 +6423,7 @@ test_printf(unsigned config, hid_t fapl) if(H5Fclose(srcfile[0]) < 0) TEST_ERROR srcfile[0] = -1; - } /* end if */ + } /* Reopen virtual dataset and file if config option specified */ if(config & TEST_IO_REOPEN_VIRT) { @@ -6516,7 +6437,7 @@ test_printf(unsigned config, hid_t fapl) TEST_ERROR if((vdset = H5Dopen2(vfile, "v_dset", dapl)) < 0) TEST_ERROR - } /* end if */ + } /* Get VDS space */ if((filespace = H5Dget_space(vdset)) < 0) @@ -6602,8 +6523,8 @@ test_printf(unsigned config, hid_t fapl) if(H5Fclose(srcfile[0]) < 0) TEST_ERROR srcfile[0] = -1; - } /* end if */ - } /* end if */ + } + } /* Reopen virtual dataset and file if config option specified */ if(config & TEST_IO_REOPEN_VIRT) { @@ -6617,7 +6538,7 @@ test_printf(unsigned config, hid_t fapl) TEST_ERROR if((vdset = H5Dopen2(vfile, "v_dset", dapl)) < 0) TEST_ERROR - } /* end if */ + } /* Get VDS space */ if((filespace = H5Dget_space(vdset)) < 0) @@ -6661,11 +6582,11 @@ test_printf(unsigned config, hid_t fapl) if(j >= (int)dims[1]) { if(rbuf[i][j] != 0) TEST_ERROR - } /* end if */ + } else if(rbuf[i][j] != erbuf[i][j]) TEST_ERROR - } /* end for */ + } /* Reopen srcfile if config option specified */ if((config & TEST_IO_CLOSE_SRC) && (config & TEST_IO_DIFFERENT_FILE)) @@ -6702,8 +6623,8 @@ test_printf(unsigned config, hid_t fapl) if(H5Fclose(srcfile[0]) < 0) TEST_ERROR srcfile[0] = -1; - } /* end if */ - } /* end if */ + } + } /* Reopen virtual dataset and file if config option specified */ if(config & TEST_IO_REOPEN_VIRT) { @@ -6717,7 +6638,7 @@ test_printf(unsigned config, hid_t fapl) TEST_ERROR if((vdset = H5Dopen2(vfile, "v_dset", dapl)) < 0) TEST_ERROR - } /* end if */ + } /* Get VDS space */ if((filespace = H5Dget_space(vdset)) < 0) @@ -6757,11 +6678,11 @@ test_printf(unsigned config, hid_t fapl) if(j >= (int)dims[1]) { if(rbuf[i][j] != 0) TEST_ERROR - } /* end if */ + } else if(rbuf[i][j] != erbuf[i][j]) TEST_ERROR - } /* end for */ + } /* Now try with different selections */ count[0] = 10; @@ -6788,12 +6709,12 @@ test_printf(unsigned config, hid_t fapl) if((j < (int)start[1]) || (j >= (int)(start[1] + count[1]))) { if(rbuf[i][j] != 0) TEST_ERROR - } /* end if */ + } else if(rbuf[i][j] != erbuf[i][j]) TEST_ERROR - } /* end for */ - } /* end for */ + } + } start[1] = 0; /* Now try writing through VDS */ @@ -6829,7 +6750,7 @@ test_printf(unsigned config, hid_t fapl) TEST_ERROR if((srcdset[2] = H5Dopen2(srcfile[0], "src_dset2", H5P_DEFAULT)) < 0) TEST_ERROR - } /* end if */ + } /* Read srcdset[0] */ count[0] = 10; @@ -6931,12 +6852,12 @@ test_printf(unsigned config, hid_t fapl) if(config & TEST_IO_DIFFERENT_FILE) { if((srcfile[0] = H5Fcreate(srcfilenamepct, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0) TEST_ERROR - } /* end if */ + } else { srcfile[0] = vfile; if(H5Iinc_ref(srcfile[0]) < 0) TEST_ERROR - } /* end if */ + } /* Create virtual dataset */ if((vdset = H5Dcreate2(vfile, "v_dset", H5T_NATIVE_INT, vspace[0], H5P_DEFAULT, dcpl, dapl)) < 0) @@ -6948,7 +6869,7 @@ test_printf(unsigned config, hid_t fapl) if(H5Fclose(srcfile[0]) < 0) TEST_ERROR srcfile[0] = -1; - } /* end if */ + } /* Reopen virtual dataset and file if config option specified */ if(config & TEST_IO_REOPEN_VIRT) { @@ -6962,7 +6883,7 @@ test_printf(unsigned config, hid_t fapl) TEST_ERROR if((vdset = H5Dopen2(vfile, "v_dset", dapl)) < 0) TEST_ERROR - } /* end if */ + } /* Get VDS space */ if((filespace = H5Dget_space(vdset)) < 0) @@ -7100,14 +7021,14 @@ test_printf(unsigned config, hid_t fapl) if(H5Dclose(srcdset[i]) < 0) TEST_ERROR srcdset[i] = -1; - } /* end for */ + } if(config & TEST_IO_DIFFERENT_FILE) { if(H5Fclose(srcfile[0]) < 0) TEST_ERROR srcfile[0] = -1; - } /* end if */ - } /* end if */ + } + } /* Reopen virtual dataset and file if config option specified */ if(config & TEST_IO_REOPEN_VIRT) { @@ -7121,7 +7042,7 @@ test_printf(unsigned config, hid_t fapl) TEST_ERROR if((vdset = H5Dopen2(vfile, "v_dset", dapl)) < 0) TEST_ERROR - } /* end if */ + } /* Get VDS space */ if((filespace = H5Dget_space(vdset)) < 0) @@ -7165,11 +7086,11 @@ test_printf(unsigned config, hid_t fapl) if(j >= (int)dims[1]) { if(rbuf[i][j] != 0) TEST_ERROR - } /* end if */ + } else if(rbuf[i][j] != erbuf[i][j]) TEST_ERROR - } /* end for */ + } /* Test H5Pget_virtual_printf_gap() */ if(H5Pget_virtual_printf_gap(dapl, &gap_size) < 0) @@ -7189,7 +7110,7 @@ test_printf(unsigned config, hid_t fapl) vfile = -1; if((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, fapl)) < 0) TEST_ERROR - } /* end if */ + } if((vdset = H5Dopen2(vfile, "v_dset", dapl)) < 0) TEST_ERROR @@ -7241,11 +7162,11 @@ test_printf(unsigned config, hid_t fapl) if(j >= (int)dims[1]) { if(rbuf[i][j] != 0) TEST_ERROR - } /* end if */ + } else if(rbuf[i][j] != erbuf[i][j]) TEST_ERROR - } /* end for */ + } /* Close VDS and reopen with printf gap set to 2, reopen file as well if * config option specified */ @@ -7259,7 +7180,7 @@ test_printf(unsigned config, hid_t fapl) vfile = -1; if((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, fapl)) < 0) TEST_ERROR - } /* end if */ + } if((vdset = H5Dopen2(vfile, "v_dset", dapl)) < 0) TEST_ERROR @@ -7311,11 +7232,11 @@ test_printf(unsigned config, hid_t fapl) if(j >= (int)dims[1]) { if(rbuf[i][j] != 0) TEST_ERROR - } /* end if */ + } else if(rbuf[i][j] != erbuf[i][j]) TEST_ERROR - } /* end for */ + } /* Close VDS and reopen with printf gap set to 3, reopen file as well if * config option specified */ @@ -7329,7 +7250,7 @@ test_printf(unsigned config, hid_t fapl) vfile = -1; if((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, fapl)) < 0) TEST_ERROR - } /* end if */ + } if((vdset = H5Dopen2(vfile, "v_dset", dapl)) < 0) TEST_ERROR @@ -7381,11 +7302,11 @@ test_printf(unsigned config, hid_t fapl) if(j >= (int)dims[1]) { if(rbuf[i][j] != 0) TEST_ERROR - } /* end if */ + } else if(rbuf[i][j] != erbuf[i][j]) TEST_ERROR - } /* end for */ + } /* Close VDS and reopen with printf gap set to 4, reopen file as well if * config option specified */ @@ -7399,7 +7320,7 @@ test_printf(unsigned config, hid_t fapl) vfile = -1; if((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, fapl)) < 0) TEST_ERROR - } /* end if */ + } if((vdset = H5Dopen2(vfile, "v_dset", dapl)) < 0) TEST_ERROR @@ -7451,11 +7372,11 @@ test_printf(unsigned config, hid_t fapl) if(j >= (int)dims[1]) { if(rbuf[i][j] != 0) TEST_ERROR - } /* end if */ + } else if(rbuf[i][j] != erbuf[i][j]) TEST_ERROR - } /* end for */ + } /* Close VDS and reopen with view set to H5D_VDS_FIRST_MISSING, reopen file * as well if config option specified */ @@ -7469,7 +7390,7 @@ test_printf(unsigned config, hid_t fapl) vfile = -1; if((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, fapl)) < 0) TEST_ERROR - } /* end if */ + } if((vdset = H5Dopen2(vfile, "v_dset", dapl)) < 0) TEST_ERROR @@ -7515,11 +7436,11 @@ test_printf(unsigned config, hid_t fapl) if(j >= (int)dims[1]) { if(rbuf[i][j] != 0) TEST_ERROR - } /* end if */ + } else if(rbuf[i][j] != erbuf[i][j]) TEST_ERROR - } /* end for */ + } /* Reset dapl */ if(H5Pset_virtual_printf_gap(dapl, (hsize_t)0) < 0) @@ -7533,16 +7454,16 @@ test_printf(unsigned config, hid_t fapl) if(H5Dclose(srcdset[i]) < 0) TEST_ERROR srcdset[i] = -1; - } /* end for */ + } if(H5Fclose(srcfile[0]) < 0) TEST_ERROR srcfile[0] = -1; - } /* end if */ + } else if(!(config & TEST_IO_DIFFERENT_FILE)) { if(H5Fclose(srcfile[0]) < 0) TEST_ERROR srcfile[0] = -1; - } /* end if */ + } if(H5Dclose(vdset) < 0) TEST_ERROR vdset = -1; @@ -7615,7 +7536,7 @@ test_printf(unsigned config, hid_t fapl) TEST_ERROR if((vdset = H5Dopen2(vfile, "v_dset", dapl)) < 0) TEST_ERROR - } /* end if */ + } /* Get VDS space */ if((filespace = H5Dget_space(vdset)) < 0) @@ -7681,7 +7602,7 @@ test_printf(unsigned config, hid_t fapl) if(H5Fclose(srcfile[1]) < 0) TEST_ERROR srcfile[1] = -1; - } /* end if */ + } /* Reopen virtual dataset and file if config option specified */ if(config & TEST_IO_REOPEN_VIRT) { @@ -7695,7 +7616,7 @@ test_printf(unsigned config, hid_t fapl) TEST_ERROR if((vdset = H5Dopen2(vfile, "v_dset", dapl)) < 0) TEST_ERROR - } /* end if */ + } /* Get VDS space */ if((filespace = H5Dget_space(vdset)) < 0) @@ -7739,11 +7660,11 @@ test_printf(unsigned config, hid_t fapl) if(j >= (int)dims[1]) { if(rbuf[i][j] != 0) TEST_ERROR - } /* end if */ + } else if(rbuf[i][j] != erbuf[i][j]) TEST_ERROR - } /* end for */ + } /* Reopen srcfile[1] if config option specified */ if(config & TEST_IO_CLOSE_SRC) @@ -7778,7 +7699,7 @@ test_printf(unsigned config, hid_t fapl) if(H5Fclose(srcfile[1]) < 0) TEST_ERROR srcfile[1] = -1; - } /* end if */ + } /* Reopen virtual dataset and file if config option specified */ if(config & TEST_IO_REOPEN_VIRT) { @@ -7792,7 +7713,7 @@ test_printf(unsigned config, hid_t fapl) TEST_ERROR if((vdset = H5Dopen2(vfile, "v_dset", dapl)) < 0) TEST_ERROR - } /* end if */ + } /* Get VDS space */ if((filespace = H5Dget_space(vdset)) < 0) @@ -7836,11 +7757,11 @@ test_printf(unsigned config, hid_t fapl) if(j >= (int)dims[1]) { if(rbuf[i][j] != 0) TEST_ERROR - } /* end if */ + } else if(rbuf[i][j] != erbuf[i][j]) TEST_ERROR - } /* end for */ + } /* Close */ if(!(config & TEST_IO_CLOSE_SRC)) { @@ -7856,7 +7777,7 @@ test_printf(unsigned config, hid_t fapl) if(H5Fclose(srcfile[1]) < 0) TEST_ERROR srcfile[1] = -1; - } /* end if */ + } if(H5Dclose(vdset) < 0) TEST_ERROR vdset = -1; @@ -7926,7 +7847,7 @@ test_printf(unsigned config, hid_t fapl) TEST_ERROR if((vdset = H5Dopen2(vfile, "v_dset", dapl)) < 0) TEST_ERROR - } /* end if */ + } /* Get VDS space */ if((filespace = H5Dget_space(vdset)) < 0) @@ -7992,7 +7913,7 @@ test_printf(unsigned config, hid_t fapl) if(H5Fclose(srcfile[1]) < 0) TEST_ERROR srcfile[1] = -1; - } /* end if */ + } /* Reopen virtual dataset and file if config option specified */ if(config & TEST_IO_REOPEN_VIRT) { @@ -8006,7 +7927,7 @@ test_printf(unsigned config, hid_t fapl) TEST_ERROR if((vdset = H5Dopen2(vfile, "v_dset", dapl)) < 0) TEST_ERROR - } /* end if */ + } /* Get VDS space */ if((filespace = H5Dget_space(vdset)) < 0) @@ -8050,11 +7971,11 @@ test_printf(unsigned config, hid_t fapl) if(j >= (int)dims[1]) { if(rbuf[i][j] != 0) TEST_ERROR - } /* end if */ + } else if(rbuf[i][j] != erbuf[i][j]) TEST_ERROR - } /* end for */ + } /* Reopen srcfile[1] if config option specified */ if(config & TEST_IO_CLOSE_SRC) @@ -8089,7 +8010,7 @@ test_printf(unsigned config, hid_t fapl) if(H5Fclose(srcfile[1]) < 0) TEST_ERROR srcfile[1] = -1; - } /* end if */ + } /* Reopen virtual dataset and file if config option specified */ if(config & TEST_IO_REOPEN_VIRT) { @@ -8103,7 +8024,7 @@ test_printf(unsigned config, hid_t fapl) TEST_ERROR if((vdset = H5Dopen2(vfile, "v_dset", dapl)) < 0) TEST_ERROR - } /* end if */ + } /* Get VDS space */ if((filespace = H5Dget_space(vdset)) < 0) @@ -8147,11 +8068,11 @@ test_printf(unsigned config, hid_t fapl) if(j >= (int)dims[1]) { if(rbuf[i][j] != 0) TEST_ERROR - } /* end if */ + } else if(rbuf[i][j] != erbuf[i][j]) TEST_ERROR - } /* end for */ + } /* Close */ if(!(config & TEST_IO_CLOSE_SRC)) { @@ -8167,7 +8088,7 @@ test_printf(unsigned config, hid_t fapl) if(H5Fclose(srcfile[1]) < 0) TEST_ERROR srcfile[1] = -1; - } /* end if */ + } if(H5Dclose(vdset) < 0) TEST_ERROR vdset = -1; @@ -8180,7 +8101,7 @@ test_printf(unsigned config, hid_t fapl) if(H5Sclose(vspace[0]) < 0) TEST_ERROR vspace[0] = -1; - } /* end if */ + } /* @@ -8238,12 +8159,12 @@ test_printf(unsigned config, hid_t fapl) if(config & TEST_IO_DIFFERENT_FILE) { if((srcfile[0] = H5Fcreate(srcfilename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0) TEST_ERROR - } /* end if */ + } else { srcfile[0] = vfile; if(H5Iinc_ref(srcfile[0]) < 0) TEST_ERROR - } /* end if */ + } /* Create virtual dataset */ if((vdset = H5Dcreate2(vfile, "v_dset", H5T_NATIVE_INT, vspace[0], H5P_DEFAULT, dcpl, dapl)) < 0) @@ -8255,7 +8176,7 @@ test_printf(unsigned config, hid_t fapl) if(H5Fclose(srcfile[0]) < 0) TEST_ERROR srcfile[0] = -1; - } /* end if */ + } /* Reopen virtual dataset and file if config option specified */ if(config & TEST_IO_REOPEN_VIRT) { @@ -8269,7 +8190,7 @@ test_printf(unsigned config, hid_t fapl) TEST_ERROR if((vdset = H5Dopen2(vfile, "v_dset", dapl)) < 0) TEST_ERROR - } /* end if */ + } /* Get VDS space */ if((filespace = H5Dget_space(vdset)) < 0) @@ -8355,8 +8276,8 @@ test_printf(unsigned config, hid_t fapl) if(H5Fclose(srcfile[0]) < 0) TEST_ERROR srcfile[0] = -1; - } /* end if */ - } /* end if */ + } + } /* Reopen virtual dataset and file if config option specified */ if(config & TEST_IO_REOPEN_VIRT) { @@ -8370,7 +8291,7 @@ test_printf(unsigned config, hid_t fapl) TEST_ERROR if((vdset = H5Dopen2(vfile, "v_dset", dapl)) < 0) TEST_ERROR - } /* end if */ + } /* Get VDS space */ if((filespace = H5Dget_space(vdset)) < 0) @@ -8414,11 +8335,11 @@ test_printf(unsigned config, hid_t fapl) if(j >= (int)dims[1]) { if(rbuf[i][j] != 0) TEST_ERROR - } /* end if */ + } else if(rbuf[i][j] != erbuf[i][j]) TEST_ERROR - } /* end for */ + } /* Reopen srcfile if config option specified */ if((config & TEST_IO_CLOSE_SRC) && (config & TEST_IO_DIFFERENT_FILE)) @@ -8454,8 +8375,8 @@ test_printf(unsigned config, hid_t fapl) if(H5Fclose(srcfile[0]) < 0) TEST_ERROR srcfile[0] = -1; - } /* end if */ - } /* end if */ + } + } /* Reopen virtual dataset and file if config option specified */ if(config & TEST_IO_REOPEN_VIRT) { @@ -8469,7 +8390,7 @@ test_printf(unsigned config, hid_t fapl) TEST_ERROR if((vdset = H5Dopen2(vfile, "v_dset", dapl)) < 0) TEST_ERROR - } /* end if */ + } /* Get VDS space */ if((filespace = H5Dget_space(vdset)) < 0) @@ -8513,11 +8434,11 @@ test_printf(unsigned config, hid_t fapl) if(j >= (int)dims[1]) { if(rbuf[i][j] != 0) TEST_ERROR - } /* end if */ + } else if(rbuf[i][j] != erbuf[i][j]) TEST_ERROR - } /* end for */ + } /* Close VDS and reopen with view set to H5D_VDS_FIRST_MISSING, reopen file * as well if config option specified */ @@ -8531,7 +8452,7 @@ test_printf(unsigned config, hid_t fapl) vfile = -1; if((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, fapl)) < 0) TEST_ERROR - } /* end if */ + } if((vdset = H5Dopen2(vfile, "v_dset", dapl)) < 0) TEST_ERROR @@ -8578,11 +8499,11 @@ test_printf(unsigned config, hid_t fapl) if(j >= (int)dims[1]) { if(rbuf[i][j] != 0) TEST_ERROR - } /* end if */ + } else if(rbuf[i][j] != erbuf[i][j]) TEST_ERROR - } /* end for */ + } /* Reopen srcfile if config option specified */ if((config & TEST_IO_CLOSE_SRC) && (config & TEST_IO_DIFFERENT_FILE)) @@ -8618,8 +8539,8 @@ test_printf(unsigned config, hid_t fapl) if(H5Fclose(srcfile[0]) < 0) TEST_ERROR srcfile[0] = -1; - } /* end if */ - } /* end if */ + } + } /* Reopen virtual dataset and file if config option specified */ if(config & TEST_IO_REOPEN_VIRT) { @@ -8633,7 +8554,7 @@ test_printf(unsigned config, hid_t fapl) TEST_ERROR if((vdset = H5Dopen2(vfile, "v_dset", dapl)) < 0) TEST_ERROR - } /* end if */ + } /* Get VDS space */ if((filespace = H5Dget_space(vdset)) < 0) @@ -8677,11 +8598,11 @@ test_printf(unsigned config, hid_t fapl) if(j >= (int)dims[1]) { if(rbuf[i][j] != 0) TEST_ERROR - } /* end if */ + } else if(rbuf[i][j] != erbuf[i][j]) TEST_ERROR - } /* end for */ + } /* Close VDS and reopen with view set to H5D_VDS_LAST_AVAILABLE, reopen file * as well if config option specified */ @@ -8695,7 +8616,7 @@ test_printf(unsigned config, hid_t fapl) vfile = -1; if((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, fapl)) < 0) TEST_ERROR - } /* end if */ + } if((vdset = H5Dopen2(vfile, "v_dset", dapl)) < 0) TEST_ERROR @@ -8742,11 +8663,11 @@ test_printf(unsigned config, hid_t fapl) if(j >= (int)dims[1]) { if(rbuf[i][j] != 0) TEST_ERROR - } /* end if */ + } else if(rbuf[i][j] != erbuf[i][j]) TEST_ERROR - } /* end for */ + } /* Close VDS and reopen with printf_gap set to 1, reopen file as well if * config option specified */ @@ -8760,7 +8681,7 @@ test_printf(unsigned config, hid_t fapl) vfile = -1; if((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, fapl)) < 0) TEST_ERROR - } /* end if */ + } if((vdset = H5Dopen2(vfile, "v_dset", dapl)) < 0) TEST_ERROR @@ -8807,11 +8728,11 @@ test_printf(unsigned config, hid_t fapl) if(j >= (int)dims[1]) { if(rbuf[i][j] != 0) TEST_ERROR - } /* end if */ + } else if(rbuf[i][j] != erbuf[i][j]) TEST_ERROR - } /* end for */ + } /* Reset dapl */ if(H5Pset_virtual_printf_gap(dapl, (hsize_t)0) < 0) @@ -8825,16 +8746,16 @@ test_printf(unsigned config, hid_t fapl) if(H5Dclose(srcdset[i]) < 0) TEST_ERROR srcdset[i] = -1; - } /* end for */ + } if(H5Fclose(srcfile[0]) < 0) TEST_ERROR srcfile[0] = -1; - } /* end if */ + } else if(!(config & TEST_IO_DIFFERENT_FILE)) { if(H5Fclose(srcfile[0]) < 0) TEST_ERROR srcfile[0] = -1; - } /* end if */ + } if(H5Dclose(vdset) < 0) TEST_ERROR vdset = -1; @@ -8910,12 +8831,12 @@ test_printf(unsigned config, hid_t fapl) if(config & TEST_IO_DIFFERENT_FILE) { if((srcfile[0] = H5Fcreate(srcfilename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0) TEST_ERROR - } /* end if */ + } else { srcfile[0] = vfile; if(H5Iinc_ref(srcfile[0]) < 0) TEST_ERROR - } /* end if */ + } /* Create virtual dataset */ if((vdset = H5Dcreate2(vfile, "v_dset", H5T_NATIVE_INT, vspace[0], H5P_DEFAULT, dcpl, dapl)) < 0) @@ -8927,7 +8848,7 @@ test_printf(unsigned config, hid_t fapl) if(H5Fclose(srcfile[0]) < 0) TEST_ERROR srcfile[0] = -1; - } /* end if */ + } /* Reopen virtual dataset and file if config option specified */ if(config & TEST_IO_REOPEN_VIRT) { @@ -8941,7 +8862,7 @@ test_printf(unsigned config, hid_t fapl) TEST_ERROR if((vdset = H5Dopen2(vfile, "v_dset", dapl)) < 0) TEST_ERROR - } /* end if */ + } /* Get VDS space */ if((filespace = H5Dget_space(vdset)) < 0) @@ -9037,8 +8958,8 @@ test_printf(unsigned config, hid_t fapl) if(H5Fclose(srcfile[0]) < 0) TEST_ERROR srcfile[0] = -1; - } /* end if */ - } /* end if */ + } + } /* Reopen virtual dataset and file if config option specified */ if(config & TEST_IO_REOPEN_VIRT) { @@ -9052,7 +8973,7 @@ test_printf(unsigned config, hid_t fapl) TEST_ERROR if((vdset = H5Dopen2(vfile, "v_dset", dapl)) < 0) TEST_ERROR - } /* end if */ + } /* Get VDS space */ if((filespace = H5Dget_space(vdset)) < 0) @@ -9096,11 +9017,11 @@ test_printf(unsigned config, hid_t fapl) if(j >= (int)dims[1]) { if(rbuf[i][j] != 0) TEST_ERROR - } /* end if */ + } else if(rbuf[i][j] != erbuf[i][j]) TEST_ERROR - } /* end for */ + } /* Close VDS and reopen with view set to H5D_VDS_FIRST_MISSING, reopen file * as well if config option specified */ @@ -9114,7 +9035,7 @@ test_printf(unsigned config, hid_t fapl) vfile = -1; if((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, fapl)) < 0) TEST_ERROR - } /* end if */ + } if((vdset = H5Dopen2(vfile, "v_dset", dapl)) < 0) TEST_ERROR @@ -9161,11 +9082,11 @@ test_printf(unsigned config, hid_t fapl) if(j >= (int)dims[1]) { if(rbuf[i][j] != 0) TEST_ERROR - } /* end if */ + } else if(rbuf[i][j] != erbuf[i][j]) TEST_ERROR - } /* end for */ + } /* Reopen srcfile if config option specified */ if((config & TEST_IO_CLOSE_SRC) && (config & TEST_IO_DIFFERENT_FILE)) @@ -9205,8 +9126,8 @@ test_printf(unsigned config, hid_t fapl) if(H5Fclose(srcfile[0]) < 0) TEST_ERROR srcfile[0] = -1; - } /* end if */ - } /* end if */ + } + } /* Reopen virtual dataset and file if config option specified */ if(config & TEST_IO_REOPEN_VIRT) { @@ -9220,7 +9141,7 @@ test_printf(unsigned config, hid_t fapl) TEST_ERROR if((vdset = H5Dopen2(vfile, "v_dset", dapl)) < 0) TEST_ERROR - } /* end if */ + } /* Get VDS space */ if((filespace = H5Dget_space(vdset)) < 0) @@ -9264,11 +9185,11 @@ test_printf(unsigned config, hid_t fapl) if(j >= (int)dims[1]) { if(rbuf[i][j] != 0) TEST_ERROR - } /* end if */ + } else if(rbuf[i][j] != erbuf[i][j]) TEST_ERROR - } /* end for */ + } /* Close VDS and reopen with view set to H5D_VDS_LAST_AVAILABLE, reopen file * as well if config option specified */ @@ -9282,7 +9203,7 @@ test_printf(unsigned config, hid_t fapl) vfile = -1; if((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, fapl)) < 0) TEST_ERROR - } /* end if */ + } if((vdset = H5Dopen2(vfile, "v_dset", dapl)) < 0) TEST_ERROR @@ -9328,11 +9249,11 @@ test_printf(unsigned config, hid_t fapl) if(j >= (int)dims[1]) { if(rbuf[i][j] != 0) TEST_ERROR - } /* end if */ + } else if(rbuf[i][j] != erbuf[i][j]) TEST_ERROR - } /* end for */ + } /* Reopen srcfile if config option specified */ if((config & TEST_IO_CLOSE_SRC) && (config & TEST_IO_DIFFERENT_FILE)) @@ -9369,8 +9290,8 @@ test_printf(unsigned config, hid_t fapl) if(H5Fclose(srcfile[0]) < 0) TEST_ERROR srcfile[0] = -1; - } /* end if */ - } /* end if */ + } + } /* Reopen virtual dataset and file if config option specified */ if(config & TEST_IO_REOPEN_VIRT) { @@ -9384,7 +9305,7 @@ test_printf(unsigned config, hid_t fapl) TEST_ERROR if((vdset = H5Dopen2(vfile, "v_dset", dapl)) < 0) TEST_ERROR - } /* end if */ + } /* Get VDS space */ if((filespace = H5Dget_space(vdset)) < 0) @@ -9428,11 +9349,11 @@ test_printf(unsigned config, hid_t fapl) if(j >= (int)dims[1]) { if(rbuf[i][j] != 0) TEST_ERROR - } /* end if */ + } else if(rbuf[i][j] != erbuf[i][j]) TEST_ERROR - } /* end for */ + } /* Now test reopening virtual dataset without calling H5Dget_space, if * REOPEN_VIRT flag set */ @@ -9466,11 +9387,11 @@ test_printf(unsigned config, hid_t fapl) if(j >= (int)dims[1]) { if(rbuf[i][j] != 0) TEST_ERROR - } /* end if */ + } else if(rbuf[i][j] != erbuf[i][j]) TEST_ERROR - } /* end for */ + } /* Now try setting extent manually */ /* Shrink to 12 */ @@ -9496,11 +9417,11 @@ test_printf(unsigned config, hid_t fapl) if(j >= (int)dims[1]) { if(rbuf[i][j] != 0) TEST_ERROR - } /* end if */ + } else if(rbuf[i][j] != erbuf[i][j]) TEST_ERROR - } /* end for */ + } /* Shrink to 10 */ dims[1] = 12; @@ -9525,12 +9446,12 @@ test_printf(unsigned config, hid_t fapl) if(j >= (int)dims[1]) { if(rbuf[i][j] != 0) TEST_ERROR - } /* end if */ + } else if(rbuf[i][j] != erbuf[i][j]) TEST_ERROR - } /* end for */ - } /* end if */ + } + } /* Close VDS and reopen with view set to H5D_VDS_FIRST_MISSING, reopen file * as well if config option specified */ @@ -9544,7 +9465,7 @@ test_printf(unsigned config, hid_t fapl) vfile = -1; if((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, fapl)) < 0) TEST_ERROR - } /* end if */ + } if((vdset = H5Dopen2(vfile, "v_dset", dapl)) < 0) TEST_ERROR @@ -9590,11 +9511,11 @@ test_printf(unsigned config, hid_t fapl) if(j >= (int)dims[1]) { if(rbuf[i][j] != 0) TEST_ERROR - } /* end if */ + } else if(rbuf[i][j] != erbuf[i][j]) TEST_ERROR - } /* end for */ + } /* Now test reopening virtual dataset without calling H5Dget_space, if * REOPEN_VIRT flag set */ @@ -9628,11 +9549,11 @@ test_printf(unsigned config, hid_t fapl) if(j >= (int)dims[1]) { if(rbuf[i][j] != 0) TEST_ERROR - } /* end if */ + } else if(rbuf[i][j] != erbuf[i][j]) TEST_ERROR - } /* end for */ + } /* Now try setting extent manually */ /* Grow to 12 */ @@ -9658,11 +9579,11 @@ test_printf(unsigned config, hid_t fapl) if(j >= (int)dims[1]) { if(rbuf[i][j] != 0) TEST_ERROR - } /* end if */ + } else if(rbuf[i][j] != erbuf[i][j]) TEST_ERROR - } /* end for */ + } /* Grow to 15 */ dims[1] = 15; @@ -9687,12 +9608,12 @@ test_printf(unsigned config, hid_t fapl) if(j >= (int)dims[1]) { if(rbuf[i][j] != 0) TEST_ERROR - } /* end if */ + } else if(rbuf[i][j] != erbuf[i][j]) TEST_ERROR - } /* end for */ - } /* end if */ + } + } /* Reset dapl */ if(H5Pset_virtual_view(dapl, H5D_VDS_LAST_AVAILABLE) < 0) @@ -9704,16 +9625,16 @@ test_printf(unsigned config, hid_t fapl) if(H5Dclose(srcdset[i]) < 0) TEST_ERROR srcdset[i] = -1; - } /* end for */ + } if(H5Fclose(srcfile[0]) < 0) TEST_ERROR srcfile[0] = -1; - } /* end if */ + } else if(!(config & TEST_IO_DIFFERENT_FILE)) { if(H5Fclose(srcfile[0]) < 0) TEST_ERROR srcfile[0] = -1; - } /* end if */ + } if(H5Dclose(vdset) < 0) TEST_ERROR vdset = -1; @@ -9770,12 +9691,12 @@ test_printf(unsigned config, hid_t fapl) if(config & TEST_IO_DIFFERENT_FILE) { if((srcfile[0] = H5Fcreate(srcfilenamepct, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0) TEST_ERROR - } /* end if */ + } else { srcfile[0] = vfile; if(H5Iinc_ref(srcfile[0]) < 0) TEST_ERROR - } /* end if */ + } /* Create virtual dataset */ if((vdset = H5Dcreate2(vfile, "v_dset", H5T_NATIVE_INT, vspace[0], H5P_DEFAULT, dcpl, dapl)) < 0) @@ -9787,7 +9708,7 @@ test_printf(unsigned config, hid_t fapl) if(H5Fclose(srcfile[0]) < 0) TEST_ERROR srcfile[0] = -1; - } /* end if */ + } /* Reopen virtual dataset and file if config option specified */ if(config & TEST_IO_REOPEN_VIRT) { @@ -9801,7 +9722,7 @@ test_printf(unsigned config, hid_t fapl) TEST_ERROR if((vdset = H5Dopen2(vfile, "v_dset", dapl)) < 0) TEST_ERROR - } /* end if */ + } /* Get VDS space */ if((filespace = H5Dget_space(vdset)) < 0) @@ -9867,8 +9788,8 @@ test_printf(unsigned config, hid_t fapl) if(H5Fclose(srcfile[0]) < 0) TEST_ERROR srcfile[0] = -1; - } /* end if */ - } /* end if */ + } + } /* Reopen virtual dataset and file if config option specified */ if(config & TEST_IO_REOPEN_VIRT) { @@ -9882,7 +9803,7 @@ test_printf(unsigned config, hid_t fapl) TEST_ERROR if((vdset = H5Dopen2(vfile, "v_dset", dapl)) < 0) TEST_ERROR - } /* end if */ + } /* Get VDS space */ if((filespace = H5Dget_space(vdset)) < 0) @@ -9926,11 +9847,11 @@ test_printf(unsigned config, hid_t fapl) if(j >= (int)dims[1]) { if(rbuf[i][j] != 0) TEST_ERROR - } /* end if */ + } else if(rbuf[i][j] != erbuf[i][j]) TEST_ERROR - } /* end for */ + } /* Close VDS and reopen with printf gap set to 127, reopen file as well if * config option specified */ @@ -9944,7 +9865,7 @@ test_printf(unsigned config, hid_t fapl) vfile = -1; if((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, fapl)) < 0) TEST_ERROR - } /* end if */ + } if((vdset = H5Dopen2(vfile, "v_dset", dapl)) < 0) TEST_ERROR @@ -9990,11 +9911,11 @@ test_printf(unsigned config, hid_t fapl) if(j >= (int)dims[1]) { if(rbuf[i][j] != 0) TEST_ERROR - } /* end if */ + } else if(rbuf[i][j] != erbuf[i][j]) TEST_ERROR - } /* end for */ + } /* Reset dapl */ if(H5Pset_virtual_printf_gap(dapl, (hsize_t)0) < 0) @@ -10008,12 +9929,12 @@ test_printf(unsigned config, hid_t fapl) if(H5Fclose(srcfile[0]) < 0) TEST_ERROR srcfile[0] = -1; - } /* end if */ + } else if(!(config & TEST_IO_DIFFERENT_FILE)) { if(H5Fclose(srcfile[0]) < 0) TEST_ERROR srcfile[0] = -1; - } /* end if */ + } if(H5Dclose(vdset) < 0) TEST_ERROR vdset = -1; @@ -10044,32 +9965,19 @@ test_printf(unsigned config, hid_t fapl) error: H5E_BEGIN_TRY { - for(i = 0; i < (int)(sizeof(srcdset) / sizeof(srcdset[0])); i++) { - if(srcdset[i] >= 0) - (void)H5Dclose(srcdset[i]); - } /* end for */ - if(vdset >= 0) - (void)H5Dclose(vdset); - for(i = 0; i < (int)(sizeof(srcfile) / sizeof(srcfile[0])); i++) { - if(srcfile[i] >= 0) - (void)H5Fclose(srcfile[i]); - } /* end for */ - if(vfile >= 0) - (void)H5Fclose(vfile); - if(srcspace >= 0) - (void)H5Sclose(srcspace); - for(i = 0; i < (int)(sizeof(vspace) / sizeof(vspace[0])); i++) { - if(vspace[i] >= 0) - (void)H5Sclose(vspace[i]); - } /* end for */ - if(filespace >= 0) - (void)H5Sclose(filespace); - if(memspace >= 0) - (void)H5Sclose(memspace); - if(dcpl >= 0) - (void)H5Pclose(dcpl); - if(dapl >= 0) - (void)H5Pclose(dapl); + for(i = 0; i < (int)(sizeof(srcdset) / sizeof(srcdset[0])); i++) + H5Dclose(srcdset[i]); + H5Dclose(vdset); + for(i = 0; i < (int)(sizeof(srcfile) / sizeof(srcfile[0])); i++) + H5Fclose(srcfile[i]); + H5Fclose(vfile); + H5Sclose(srcspace); + for(i = 0; i < (int)(sizeof(vspace) / sizeof(vspace[0])); i++) + H5Sclose(vspace[i]); + H5Sclose(filespace); + H5Sclose(memspace); + H5Pclose(dcpl); + H5Pclose(dapl); } H5E_END_TRY; return 1; @@ -10083,14 +9991,7 @@ error: * VDS * * Return: Success: 0 - * * Failure: number of errors - * - * Programmer: Neil Fortner - * Friday, August 14, 2015 - * - * Modifications: - * *------------------------------------------------------------------------- */ static int @@ -10212,12 +10113,12 @@ test_all(unsigned config, hid_t fapl) if(config & TEST_IO_DIFFERENT_FILE) { if((srcfile = H5Fcreate(srcfilename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0) TEST_ERROR - } /* end if */ + } else { srcfile = vfile; if(H5Iinc_ref(srcfile) < 0) TEST_ERROR - } /* end if */ + } /* Create virtual dataset */ if((vdset = H5Dcreate2(vfile, "v_dset", H5T_NATIVE_INT, vspace[0], H5P_DEFAULT, dcpl, H5P_DEFAULT)) < 0) @@ -10229,7 +10130,7 @@ test_all(unsigned config, hid_t fapl) if(H5Fclose(srcfile) < 0) TEST_ERROR srcfile = -1; - } /* end if */ + } /* Reopen virtual dataset and file if config option specified */ if(config & TEST_IO_REOPEN_VIRT) { @@ -10243,7 +10144,7 @@ test_all(unsigned config, hid_t fapl) TEST_ERROR if((vdset = H5Dopen2(vfile, "v_dset", H5P_DEFAULT)) < 0) TEST_ERROR - } /* end if */ + } /* Get VDS space */ if((filespace = H5Dget_space(vdset)) < 0) @@ -10314,14 +10215,14 @@ test_all(unsigned config, hid_t fapl) if(H5Dclose(srcdset[i]) < 0) TEST_ERROR srcdset[i] = -1; - } /* end for */ + } if(config & TEST_IO_DIFFERENT_FILE) { if(H5Fclose(srcfile) < 0) TEST_ERROR srcfile = -1; - } /* end if */ - } /* end if */ + } + } /* Reopen virtual dataset and file if config option specified */ if(config & TEST_IO_REOPEN_VIRT) { @@ -10335,7 +10236,7 @@ test_all(unsigned config, hid_t fapl) TEST_ERROR if((vdset = H5Dopen2(vfile, "v_dset", H5P_DEFAULT)) < 0) TEST_ERROR - } /* end if */ + } /* Get VDS space */ if((filespace = H5Dget_space(vdset)) < 0) @@ -10381,11 +10282,11 @@ test_all(unsigned config, hid_t fapl) if((i >= (int)dims[0]) || (j >= (int)dims[1])) { if(rbuf[i][j] != 0) TEST_ERROR - } /* end if */ + } else if(rbuf[i][j] != erbuf[i][j]) TEST_ERROR - } /* end for */ + } /* Reopen srcdset[1] and srcfile if config option specified */ if(config & TEST_IO_CLOSE_SRC) { @@ -10394,7 +10295,7 @@ test_all(unsigned config, hid_t fapl) TEST_ERROR if((srcdset[1] = H5Dopen2(srcfile, "src_dset_unlim", H5P_DEFAULT)) < 0) TEST_ERROR - } /* end if */ + } /* Extend srcdset[1] */ dims[0] = 2; @@ -10429,8 +10330,8 @@ test_all(unsigned config, hid_t fapl) if(H5Fclose(srcfile) < 0) TEST_ERROR srcfile = -1; - } /* end if */ - } /* end if */ + } + } /* Reopen virtual dataset and file if config option specified */ if(config & TEST_IO_REOPEN_VIRT) { @@ -10444,7 +10345,7 @@ test_all(unsigned config, hid_t fapl) TEST_ERROR if((vdset = H5Dopen2(vfile, "v_dset", H5P_DEFAULT)) < 0) TEST_ERROR - } /* end if */ + } /* Get VDS space */ if((filespace = H5Dget_space(vdset)) < 0) @@ -10490,11 +10391,11 @@ test_all(unsigned config, hid_t fapl) if((i >= (int)dims[0]) || (j >= (int)dims[1])) { if(rbuf[i][j] != 0) TEST_ERROR - } /* end if */ + } else if(rbuf[i][j] != erbuf[i][j]) TEST_ERROR - } /* end for */ + } /* Reopen srcfile if config option specified */ if((config & TEST_IO_CLOSE_SRC) && (config & TEST_IO_DIFFERENT_FILE)) @@ -10534,8 +10435,8 @@ test_all(unsigned config, hid_t fapl) if(H5Fclose(srcfile) < 0) TEST_ERROR srcfile = -1; - } /* end if */ - } /* end if */ + } + } /* Reopen virtual dataset and file if config option specified */ if(config & TEST_IO_REOPEN_VIRT) { @@ -10549,7 +10450,7 @@ test_all(unsigned config, hid_t fapl) TEST_ERROR if((vdset = H5Dopen2(vfile, "v_dset", H5P_DEFAULT)) < 0) TEST_ERROR - } /* end if */ + } /* Get VDS space */ if((filespace = H5Dget_space(vdset)) < 0) @@ -10595,11 +10496,11 @@ test_all(unsigned config, hid_t fapl) if((i >= (int)dims[0]) || (j >= (int)dims[1])) { if(rbuf[i][j] != 0) TEST_ERROR - } /* end if */ + } else if(rbuf[i][j] != erbuf[i][j]) TEST_ERROR - } /* end for */ + } /* Reopen srcdset[1] and srcfile if config option specified */ if(config & TEST_IO_CLOSE_SRC) { @@ -10608,7 +10509,7 @@ test_all(unsigned config, hid_t fapl) TEST_ERROR if((srcdset[1] = H5Dopen2(srcfile, "src_dset_unlim", H5P_DEFAULT)) < 0) TEST_ERROR - } /* end if */ + } /* Extend srcdset[1] */ dims[0] = 3; @@ -10652,8 +10553,8 @@ test_all(unsigned config, hid_t fapl) if(H5Fclose(srcfile) < 0) TEST_ERROR srcfile = -1; - } /* end if */ - } /* end if */ + } + } /* Reopen virtual dataset and file if config option specified */ if(config & TEST_IO_REOPEN_VIRT) { @@ -10667,7 +10568,7 @@ test_all(unsigned config, hid_t fapl) TEST_ERROR if((vdset = H5Dopen2(vfile, "v_dset", H5P_DEFAULT)) < 0) TEST_ERROR - } /* end if */ + } /* Get VDS space */ if((filespace = H5Dget_space(vdset)) < 0) @@ -10713,11 +10614,11 @@ test_all(unsigned config, hid_t fapl) if((i >= (int)dims[0]) || (j >= (int)dims[1])) { if(rbuf[i][j] != 0) TEST_ERROR - } /* end if */ + } else if(rbuf[i][j] != erbuf[i][j]) TEST_ERROR - } /* end for */ + } /* Reopen srcfile if config option specified */ if((config & TEST_IO_CLOSE_SRC) && (config & TEST_IO_DIFFERENT_FILE)) @@ -10757,8 +10658,8 @@ test_all(unsigned config, hid_t fapl) if(H5Fclose(srcfile) < 0) TEST_ERROR srcfile = -1; - } /* end if */ - } /* end if */ + } + } /* Reopen virtual dataset and file if config option specified */ if(config & TEST_IO_REOPEN_VIRT) { @@ -10772,7 +10673,7 @@ test_all(unsigned config, hid_t fapl) TEST_ERROR if((vdset = H5Dopen2(vfile, "v_dset", H5P_DEFAULT)) < 0) TEST_ERROR - } /* end if */ + } /* Get VDS space */ if((filespace = H5Dget_space(vdset)) < 0) @@ -10818,11 +10719,11 @@ test_all(unsigned config, hid_t fapl) if((i >= (int)dims[0]) || (j >= (int)dims[1])) { if(rbuf[i][j] != 0) TEST_ERROR - } /* end if */ + } else if(rbuf[i][j] != erbuf[i][j]) TEST_ERROR - } /* end for */ + } /* Reopen srcdset[1] and srcfile if config option specified */ if(config & TEST_IO_CLOSE_SRC) { @@ -10831,7 +10732,7 @@ test_all(unsigned config, hid_t fapl) TEST_ERROR if((srcdset[1] = H5Dopen2(srcfile, "src_dset_unlim", H5P_DEFAULT)) < 0) TEST_ERROR - } /* end if */ + } /* Extend srcdset[1] */ dims[0] = 7; @@ -10876,8 +10777,8 @@ test_all(unsigned config, hid_t fapl) if(H5Fclose(srcfile) < 0) TEST_ERROR srcfile = -1; - } /* end if */ - } /* end if */ + } + } /* Reopen virtual dataset and file if config option specified */ if(config & TEST_IO_REOPEN_VIRT) { @@ -10891,7 +10792,7 @@ test_all(unsigned config, hid_t fapl) TEST_ERROR if((vdset = H5Dopen2(vfile, "v_dset", H5P_DEFAULT)) < 0) TEST_ERROR - } /* end if */ + } /* Get VDS space */ if((filespace = H5Dget_space(vdset)) < 0) @@ -10937,11 +10838,11 @@ test_all(unsigned config, hid_t fapl) if(j >= (int)dims[1]) { if(rbuf[i][j] != 0) TEST_ERROR - } /* end if */ + } else if(rbuf[i][j] != erbuf[i][j]) TEST_ERROR - } /* end for */ + } /* Reopen srcfile if config option specified */ if((config & TEST_IO_CLOSE_SRC) && (config & TEST_IO_DIFFERENT_FILE)) @@ -10981,8 +10882,8 @@ test_all(unsigned config, hid_t fapl) if(H5Fclose(srcfile) < 0) TEST_ERROR srcfile = -1; - } /* end if */ - } /* end if */ + } + } /* Reopen virtual dataset and file if config option specified */ if(config & TEST_IO_REOPEN_VIRT) { @@ -10996,7 +10897,7 @@ test_all(unsigned config, hid_t fapl) TEST_ERROR if((vdset = H5Dopen2(vfile, "v_dset", H5P_DEFAULT)) < 0) TEST_ERROR - } /* end if */ + } /* Get VDS space */ if((filespace = H5Dget_space(vdset)) < 0) @@ -11048,16 +10949,16 @@ test_all(unsigned config, hid_t fapl) if(H5Dclose(srcdset[i]) < 0) TEST_ERROR srcdset[i] = -1; - } /* end for */ + } if(H5Fclose(srcfile) < 0) TEST_ERROR srcfile = -1; - } /* end if */ + } else if(!(config & TEST_IO_DIFFERENT_FILE)) { if(H5Fclose(srcfile) < 0) TEST_ERROR srcfile = -1; - } /* end if */ + } if(H5Dclose(vdset) < 0) TEST_ERROR vdset = -1; @@ -11068,12 +10969,12 @@ test_all(unsigned config, hid_t fapl) if(H5Sclose(srcspace[i]) < 0) TEST_ERROR srcspace[i] = -1; - } /* end for */ + } for(i = 0; i < (int)(sizeof(vspace) / sizeof(vspace[0])); i++) { if(H5Sclose(vspace[i]) < 0) TEST_ERROR vspace[i] = -1; - } /* end for */ + } if(H5Pclose(dcpl) < 0) TEST_ERROR dcpl = -1; @@ -11089,32 +10990,19 @@ test_all(unsigned config, hid_t fapl) error: H5E_BEGIN_TRY { - for(i = 0; i < (int)(sizeof(srcdset) / sizeof(srcdset[0])); i++) { - if(srcdset[i] >= 0) - (void)H5Dclose(srcdset[i]); - } /* end for */ - if(vdset >= 0) - (void)H5Dclose(vdset); - if(srcfile >= 0) - (void)H5Fclose(srcfile); - if(vfile >= 0) - (void)H5Fclose(vfile); - for(i = 0; i < (int)(sizeof(srcspace) / sizeof(srcspace[0])); i++) { - if(srcspace[i] >= 0) - (void)H5Sclose(srcspace[i]); - } /* end for */ - for(i = 0; i < (int)(sizeof(vspace) / sizeof(vspace[0])); i++) { - if(vspace[i] >= 0) - (void)H5Sclose(vspace[i]); - } /* end for */ - if(filespace >= 0) - (void)H5Sclose(filespace); - if(memspace >= 0) - (void)H5Sclose(memspace); - if(dcpl >= 0) - (void)H5Pclose(dcpl); - if(srcdcpl >= 0) - (void)H5Pclose(srcdcpl); + for(i = 0; i < (int)(sizeof(srcdset) / sizeof(srcdset[0])); i++) + H5Dclose(srcdset[i]); + H5Dclose(vdset); + H5Fclose(srcfile); + H5Fclose(vfile); + for(i = 0; i < (int)(sizeof(srcspace) / sizeof(srcspace[0])); i++) + H5Sclose(srcspace[i]); + for(i = 0; i < (int)(sizeof(vspace) / sizeof(vspace[0])); i++) + H5Sclose(vspace[i]); + H5Sclose(filespace); + H5Sclose(memspace); + H5Pclose(dcpl); + H5Pclose(srcdcpl); } H5E_END_TRY; return 1; @@ -11128,10 +11016,6 @@ error: * * Return: Success: 0 * Failure: 1 - * - * Programmer: Dana Robinson - * March 2016 - * *------------------------------------------------------------------------- */ static int @@ -11273,10 +11157,6 @@ test_dapl_values(hid_t fapl_id) * Purpose: Tests datasets with virtual layout * * Return: EXIT_SUCCESS/EXIT_FAILURE - * - * Programmer: Neil Fortner - * Tuesday, February 17, 2015 - * *------------------------------------------------------------------------- */ int @@ -11302,7 +11182,7 @@ main(void) nerrors += test_unlim(bit_config, fapl); nerrors += test_printf(bit_config, fapl); nerrors += test_all(bit_config, fapl); - } /* end for */ + } nerrors += test_dapl_values(fapl); diff --git a/testpar/CMakeLists.txt b/testpar/CMakeLists.txt index b116d66..997d1a1 100644 --- a/testpar/CMakeLists.txt +++ b/testpar/CMakeLists.txt @@ -30,14 +30,20 @@ set (testphdf5_SOURCES add_executable (testphdf5 ${testphdf5_SOURCES}) TARGET_NAMING (testphdf5 STATIC) TARGET_C_PROPERTIES (testphdf5 STATIC " " " ") -target_link_libraries (testphdf5 ${HDF5_TEST_LIB_TARGET} ${HDF5_LIB_TARGET}) +target_link_libraries (testphdf5 ${HDF5_TEST_LIB_TARGET} PUBLIC ${HDF5_LIB_TARGET}) +if (HDF5_ENABLE_PARALLEL AND MPI_C_FOUND) + target_link_libraries (testphdf5 PRIVATE ${MPI_C_LIBRARIES}) +endif () set_target_properties (testphdf5 PROPERTIES FOLDER test/par) MACRO (ADD_H5P_EXE file) add_executable (${file} ${HDF5_TEST_PAR_SOURCE_DIR}/${file}.c) TARGET_NAMING (${file} STATIC) TARGET_C_PROPERTIES (${file} STATIC " " " ") - target_link_libraries (${file} ${HDF5_TEST_LIB_TARGET} ${HDF5_LIB_TARGET}) + target_link_libraries (${file} ${HDF5_TEST_LIB_TARGET} PUBLIC ${HDF5_LIB_TARGET}) + if (HDF5_ENABLE_PARALLEL AND MPI_C_FOUND) + target_link_libraries (${file} PRIVATE ${MPI_C_LIBRARIES}) + endif () set_target_properties (${file} PROPERTIES FOLDER test/par) ENDMACRO (ADD_H5P_EXE file) diff --git a/tools/lib/CMakeLists.txt b/tools/lib/CMakeLists.txt index ade7671..0fc1981 100644 --- a/tools/lib/CMakeLists.txt +++ b/tools/lib/CMakeLists.txt @@ -39,7 +39,10 @@ set (H5_TOOLS_LIB_HDRS add_library (${HDF5_TOOLS_LIB_TARGET} STATIC ${H5_TOOLS_LIB_SOURCES} ${H5_TOOLS_LIB_HDRS}) TARGET_C_PROPERTIES (${HDF5_TOOLS_LIB_TARGET} STATIC " " " ") -target_link_libraries (${HDF5_TOOLS_LIB_TARGET} ${HDF5_LIB_TARGET}) +target_link_libraries (${HDF5_TOOLS_LIB_TARGET} PUBLIC ${HDF5_LIB_TARGET}) +if (HDF5_ENABLE_PARALLEL AND MPI_C_FOUND) + target_link_libraries (${HDF5_TOOLS_LIB_TARGET} PRIVATE ${MPI_C_LIBRARIES}) +endif () set_global_variable (HDF5_LIBRARIES_TO_EXPORT "${HDF5_LIBRARIES_TO_EXPORT};${HDF5_TOOLS_LIB_TARGET}") H5_SET_LIB_OPTIONS (${HDF5_TOOLS_LIB_TARGET} ${HDF5_TOOLS_LIB_NAME} STATIC) set_target_properties (${HDF5_TOOLS_LIB_TARGET} PROPERTIES @@ -52,7 +55,10 @@ set (install_targets ${HDF5_TOOLS_LIB_TARGET}) if (BUILD_SHARED_LIBS) add_library (${HDF5_TOOLS_LIBSH_TARGET} SHARED ${H5_TOOLS_LIB_SOURCES} ${H5_TOOLS_LIB_HDRS}) TARGET_C_PROPERTIES (${HDF5_TOOLS_LIBSH_TARGET} SHARED " " " ") - target_link_libraries (${HDF5_TOOLS_LIBSH_TARGET} ${HDF5_LIBSH_TARGET}) + target_link_libraries (${HDF5_TOOLS_LIBSH_TARGET} PUBLIC ${HDF5_LIBSH_TARGET}) + if (HDF5_ENABLE_PARALLEL AND MPI_C_FOUND) + target_link_libraries (${HDF5_TOOLS_LIBSH_TARGET} PRIVATE ${MPI_C_LIBRARIES}) + endif () set_global_variable (HDF5_LIBRARIES_TO_EXPORT "${HDF5_LIBRARIES_TO_EXPORT};${HDF5_TOOLS_LIBSH_TARGET}") H5_SET_LIB_OPTIONS (${HDF5_TOOLS_LIBSH_TARGET} ${HDF5_TOOLS_LIB_NAME} SHARED ${HDF5_TOOLS_PACKAGE_SOVERSION}) set_target_properties (${HDF5_TOOLS_LIBSH_TARGET} PROPERTIES -- cgit v0.12 From 409dc6ab09abe70cd5e070b17fb473a9537e111a Mon Sep 17 00:00:00 2001 From: lrknox Date: Sat, 23 Dec 2017 21:17:16 -0600 Subject: Increase maximum number of retries for h5watch tests. --- hl/tools/h5watch/testh5watch.sh.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hl/tools/h5watch/testh5watch.sh.in b/hl/tools/h5watch/testh5watch.sh.in index 05e66bf..7514281 100644 --- a/hl/tools/h5watch/testh5watch.sh.in +++ b/hl/tools/h5watch/testh5watch.sh.in @@ -44,7 +44,7 @@ GEN_TEST=h5watchgentest # Generate HDF5 file with various datasets GEN_TEST_BIN=`pwd`/$GEN_TEST # Path of the binary GEN_TEST WATCHFILE=`pwd`/WATCH.h5 # The HDF5 file generated to test h5watch TESTFILE=TEST.h5 # The temporary file (a copy of WATCH.h5) used by tests -TRY_MAX=10 # Try running the test again +TRY_MAX=20 # Try running the test again # # These 3 defines should be the same as the defines in ./extend_dset.c WRITER_MESSAGE=writer_message # The message file created by the "extend" process -- cgit v0.12 From 98bf60f722554817ad8b625f1fc164b824bba87e Mon Sep 17 00:00:00 2001 From: hdftest Date: Sun, 24 Dec 2017 15:28:56 -0600 Subject: Snapshot version 1.10 release 2 (snap6) --- README.txt | 2 +- c++/src/cpp_doc_config | 2 +- config/cmake/scripts/HDF5config.cmake | 2 +- configure.ac | 2 +- release_docs/RELEASE.txt | 2 +- src/H5public.h | 4 ++-- 6 files changed, 7 insertions(+), 7 deletions(-) diff --git a/README.txt b/README.txt index aa473fe..8b893f2 100644 --- a/README.txt +++ b/README.txt @@ -1,4 +1,4 @@ -HDF5 version 1.10.2-snap6 currently under development +HDF5 version 1.10.2-snap7 currently under development Please refer to the release_docs/INSTALL file for installation instructions. ------------------------------------------------------------------------------ diff --git a/c++/src/cpp_doc_config b/c++/src/cpp_doc_config index 8122f39..2df9380 100644 --- a/c++/src/cpp_doc_config +++ b/c++/src/cpp_doc_config @@ -38,7 +38,7 @@ PROJECT_NAME = "HDF5 C++ API" # could be handy for archiving the generated documentation or if some version # control system is used. -PROJECT_NUMBER = "1.10.2-snap6, currently under development" +PROJECT_NUMBER = "1.10.2-snap7, currently under development" # Using the PROJECT_BRIEF tag one can provide an optional one line description # for a project that appears at the top of each page and should give viewer a diff --git a/config/cmake/scripts/HDF5config.cmake b/config/cmake/scripts/HDF5config.cmake index 3b459cb..fab4fde 100755 --- a/config/cmake/scripts/HDF5config.cmake +++ b/config/cmake/scripts/HDF5config.cmake @@ -39,7 +39,7 @@ cmake_minimum_required (VERSION 3.2.2 FATAL_ERROR) ############################################################################## set (CTEST_SOURCE_VERSION "1.10.2") -set (CTEST_SOURCE_VERSEXT "-snap6") +set (CTEST_SOURCE_VERSEXT "-snap7") ############################################################################## # handle input parameters to script. diff --git a/configure.ac b/configure.ac index 023de00..8de085c 100644 --- a/configure.ac +++ b/configure.ac @@ -24,7 +24,7 @@ AC_PREREQ([2.69]) ## NOTE: Do not forget to change the version number here when we do a ## release!!! ## -AC_INIT([HDF5], [1.10.2-snap6], [help@hdfgroup.org]) +AC_INIT([HDF5], [1.10.2-snap7], [help@hdfgroup.org]) AC_CONFIG_SRCDIR([src/H5.c]) AC_CONFIG_HEADERS([src/H5config.h]) diff --git a/release_docs/RELEASE.txt b/release_docs/RELEASE.txt index 796a4a0..5162017 100644 --- a/release_docs/RELEASE.txt +++ b/release_docs/RELEASE.txt @@ -1,4 +1,4 @@ -HDF5 version 1.10.2-snap6 currently under development +HDF5 version 1.10.2-snap7 currently under development ================================================================================ diff --git a/src/H5public.h b/src/H5public.h index 0c8a2c6..9a57c7d 100644 --- a/src/H5public.h +++ b/src/H5public.h @@ -94,9 +94,9 @@ extern "C" { #define H5_VERS_MAJOR 1 /* For major interface/format changes */ #define H5_VERS_MINOR 10 /* For minor interface/format changes */ #define H5_VERS_RELEASE 2 /* For tweaks, bug-fixes, or development */ -#define H5_VERS_SUBRELEASE "snap6" /* For pre-releases like snap0 */ +#define H5_VERS_SUBRELEASE "snap7" /* For pre-releases like snap0 */ /* Empty string for real releases. */ -#define H5_VERS_INFO "HDF5 library version: 1.10.2-snap6" /* Full version string */ +#define H5_VERS_INFO "HDF5 library version: 1.10.2-snap7" /* Full version string */ #define H5check() H5check_version(H5_VERS_MAJOR,H5_VERS_MINOR, \ H5_VERS_RELEASE) -- cgit v0.12 From 2f7e94c9c0adb957144f2310f9d4113902a31d34 Mon Sep 17 00:00:00 2001 From: hdftest Date: Sun, 31 Dec 2017 10:42:57 -0600 Subject: Snapshot version 1.10 release 2 (snap7) --- README.txt | 2 +- c++/src/cpp_doc_config | 2 +- config/cmake/scripts/HDF5config.cmake | 2 +- configure.ac | 2 +- release_docs/RELEASE.txt | 2 +- src/H5public.h | 4 ++-- 6 files changed, 7 insertions(+), 7 deletions(-) diff --git a/README.txt b/README.txt index 8b893f2..afa188d 100644 --- a/README.txt +++ b/README.txt @@ -1,4 +1,4 @@ -HDF5 version 1.10.2-snap7 currently under development +HDF5 version 1.10.2-snap8 currently under development Please refer to the release_docs/INSTALL file for installation instructions. ------------------------------------------------------------------------------ diff --git a/c++/src/cpp_doc_config b/c++/src/cpp_doc_config index 2df9380..279a4f8 100644 --- a/c++/src/cpp_doc_config +++ b/c++/src/cpp_doc_config @@ -38,7 +38,7 @@ PROJECT_NAME = "HDF5 C++ API" # could be handy for archiving the generated documentation or if some version # control system is used. -PROJECT_NUMBER = "1.10.2-snap7, currently under development" +PROJECT_NUMBER = "1.10.2-snap8, currently under development" # Using the PROJECT_BRIEF tag one can provide an optional one line description # for a project that appears at the top of each page and should give viewer a diff --git a/config/cmake/scripts/HDF5config.cmake b/config/cmake/scripts/HDF5config.cmake index fab4fde..5c93e20 100755 --- a/config/cmake/scripts/HDF5config.cmake +++ b/config/cmake/scripts/HDF5config.cmake @@ -39,7 +39,7 @@ cmake_minimum_required (VERSION 3.2.2 FATAL_ERROR) ############################################################################## set (CTEST_SOURCE_VERSION "1.10.2") -set (CTEST_SOURCE_VERSEXT "-snap7") +set (CTEST_SOURCE_VERSEXT "-snap8") ############################################################################## # handle input parameters to script. diff --git a/configure.ac b/configure.ac index 8de085c..b51b45e 100644 --- a/configure.ac +++ b/configure.ac @@ -24,7 +24,7 @@ AC_PREREQ([2.69]) ## NOTE: Do not forget to change the version number here when we do a ## release!!! ## -AC_INIT([HDF5], [1.10.2-snap7], [help@hdfgroup.org]) +AC_INIT([HDF5], [1.10.2-snap8], [help@hdfgroup.org]) AC_CONFIG_SRCDIR([src/H5.c]) AC_CONFIG_HEADERS([src/H5config.h]) diff --git a/release_docs/RELEASE.txt b/release_docs/RELEASE.txt index 5162017..85dc924 100644 --- a/release_docs/RELEASE.txt +++ b/release_docs/RELEASE.txt @@ -1,4 +1,4 @@ -HDF5 version 1.10.2-snap7 currently under development +HDF5 version 1.10.2-snap8 currently under development ================================================================================ diff --git a/src/H5public.h b/src/H5public.h index 9a57c7d..9c62738 100644 --- a/src/H5public.h +++ b/src/H5public.h @@ -94,9 +94,9 @@ extern "C" { #define H5_VERS_MAJOR 1 /* For major interface/format changes */ #define H5_VERS_MINOR 10 /* For minor interface/format changes */ #define H5_VERS_RELEASE 2 /* For tweaks, bug-fixes, or development */ -#define H5_VERS_SUBRELEASE "snap7" /* For pre-releases like snap0 */ +#define H5_VERS_SUBRELEASE "snap8" /* For pre-releases like snap0 */ /* Empty string for real releases. */ -#define H5_VERS_INFO "HDF5 library version: 1.10.2-snap7" /* Full version string */ +#define H5_VERS_INFO "HDF5 library version: 1.10.2-snap8" /* Full version string */ #define H5check() H5check_version(H5_VERS_MAJOR,H5_VERS_MINOR, \ H5_VERS_RELEASE) -- cgit v0.12 From c971c366a95361cfb53e61f58f02c4caa58cd1f8 Mon Sep 17 00:00:00 2001 From: "M. Scot Breitenfeld" Date: Fri, 5 Jan 2018 10:17:34 -0600 Subject: reverted changes from sync --- .../testfiles/h5repack_layout.h5-plugin_version_test.ddl | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/tools/test/h5repack/testfiles/h5repack_layout.h5-plugin_version_test.ddl b/tools/test/h5repack/testfiles/h5repack_layout.h5-plugin_version_test.ddl index 0821257..f79fa93 100644 --- a/tools/test/h5repack/testfiles/h5repack_layout.h5-plugin_version_test.ddl +++ b/tools/test/h5repack/testfiles/h5repack_layout.h5-plugin_version_test.ddl @@ -11,7 +11,7 @@ GROUP "/" { USER_DEFINED_FILTER { FILTER_ID 260 COMMENT dynlib4 - PARAMS { 9 1 11 1 } + PARAMS { 9 1 10 2 } } } FILLVALUE { @@ -33,7 +33,7 @@ GROUP "/" { USER_DEFINED_FILTER { FILTER_ID 260 COMMENT dynlib4 - PARAMS { 9 1 11 1 } + PARAMS { 9 1 10 2 } } } FILLVALUE { @@ -55,7 +55,7 @@ GROUP "/" { USER_DEFINED_FILTER { FILTER_ID 260 COMMENT dynlib4 - PARAMS { 9 1 11 1 } + PARAMS { 9 1 10 2 } } } FILLVALUE { @@ -77,7 +77,7 @@ GROUP "/" { USER_DEFINED_FILTER { FILTER_ID 260 COMMENT dynlib4 - PARAMS { 9 1 11 1 } + PARAMS { 9 1 10 2 } } } FILLVALUE { @@ -99,7 +99,7 @@ GROUP "/" { USER_DEFINED_FILTER { FILTER_ID 260 COMMENT dynlib4 - PARAMS { 9 1 11 1 } + PARAMS { 9 1 10 2 } } } FILLVALUE { @@ -121,7 +121,7 @@ GROUP "/" { USER_DEFINED_FILTER { FILTER_ID 260 COMMENT dynlib4 - PARAMS { 9 1 11 1 } + PARAMS { 9 1 10 2 } } } FILLVALUE { @@ -143,7 +143,7 @@ GROUP "/" { USER_DEFINED_FILTER { FILTER_ID 260 COMMENT dynlib4 - PARAMS { 9 1 11 1 } + PARAMS { 9 1 10 2 } } } FILLVALUE { -- cgit v0.12 From 6ff2efb37bf53623b18b1107dde37a36fa2f1f52 Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Thu, 4 Jan 2018 11:10:34 -0600 Subject: HDFFV-9724 Merge vds prefix from develop --- release_docs/RELEASE.txt | 37 ++++++++++++++++++------------------- src/H5Fquery.c | 12 ++++-------- test/vds.c | 2 +- 3 files changed, 23 insertions(+), 28 deletions(-) diff --git a/release_docs/RELEASE.txt b/release_docs/RELEASE.txt index 46e0c59..952c01f 100644 --- a/release_docs/RELEASE.txt +++ b/release_docs/RELEASE.txt @@ -85,6 +85,20 @@ New Features Library: -------- + - Add prefix option to VDS files. + + Currently, VDS source files must be in the active directory to be + found by the virtual file. Adding the option of a prefix to be set + on the virtual file, using a data access property list (DAPL), + allows the source files to located at an absolute or relative path + to the virtual file. + + New public APIs: + herr_t H5Pset_virtual_prefix(hid_t dapl_id, const char* prefix); + ssize_t H5Pget_virtual_prefix(hid_t dapl_id, char* prefix /*out*/, size_t size); + The prefix can also be set with an environment variable, HDF5_VDS_PREFIX. + + (ADB - 2017/12/12, HDFFV-9724) - H5FDdriver_query() API call added to the C library. @@ -120,21 +134,6 @@ New Features (HDFFV-10252, DER, 2017/04/05) - - Add prefix option to VDS files. - - Currently, VDS source files must be in the active directory to be - found by the virtual file. Adding the option of a prefix to be set - on the virtual file, using a data access property list (DAPL), - allows the source files to located at an absolute or relative path - to the virtual file. - - New public APIs: - herr_t H5Pset_virtual_prefix(hid_t dapl_id, const char* prefix); - ssize_t H5Pget_virtual_prefix(hid_t dapl_id, char* prefix /*out*/, size_t size); - The prefix can also be set with an environment variable, HDF5_VDS_PREFIX. - - (ADB - 2017/12/12, HDFFV-9724) - Parallel Library: ----------------- @@ -267,13 +266,13 @@ Bug Fixes since HDF5-1.10.1 release - Fix H5Sencode() bug when the number of elements selected is > 2^32 - H5Sencode() incorrectly encodes dataspace selection with number of - elements exceeding 2^32. When decoding such selection via H5Sdecode(), + H5Sencode() incorrectly encodes dataspace selection with number of + elements exceeding 2^32. When decoding such selection via H5Sdecode(), the number of elements in the decoded dataspace is not the same as - what is encoded. This problem exists for H5S_SEL_HYPER and + what is encoded. This problem exists for H5S_SEL_HYPER and H5S_SEL_POINTS encoding. - The cause of the problem is because the library uses 32 bits to + The cause of the problem is because the library uses 32 bits to encode counts and block offsets for the selection. The solution is to use the original 32 bit encodings if possible, but use a different way to encode selection > 32 bits when needed. diff --git a/src/H5Fquery.c b/src/H5Fquery.c index b7fa4f0..235a26d 100644 --- a/src/H5Fquery.c +++ b/src/H5Fquery.c @@ -686,16 +686,12 @@ H5F_gc_ref(const H5F_t *f) /*------------------------------------------------------------------------- - * Function: H5F_use_latest_flags + * Function: H5F_use_latest_flags * - * Purpose: Retrieve the requested 'latest version support' for the file. + * Purpose: Retrieve the requested 'latest version support' for the file. * - * Return: Success: Non-negative, the requested 'version support' - * Failure: (can't happen) - * - * Programmer: Quincey Koziol - * koziol@hdfgroup.org - * Mar 5 2007 + * Return: Success: Non-negative, the requested 'version support' + * Failure: (can't happen) *------------------------------------------------------------------------- */ unsigned diff --git a/test/vds.c b/test/vds.c index 7d55c37..a882698 100644 --- a/test/vds.c +++ b/test/vds.c @@ -618,7 +618,7 @@ test_api(test_api_config_t config, hid_t fapl) TEST_ERROR /* Get examination DCPL */ - if(test_api_get_ex_dcpl(config, fapl, dcpl, &ex_dcpl, vspace[0], filename, (hsize_t)174) < 0) + if(test_api_get_ex_dcpl(config, fapl, dcpl, &ex_dcpl, vspace[0], filename, (hsize_t)213) < 0) TEST_ERROR /* Test H5Pget_virtual_count */ -- cgit v0.12 From 6fecfbb51a99160f71a5a4ee01ea537ae0883abd Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Thu, 4 Jan 2018 12:33:11 -0600 Subject: HDFFV-9724 1_10 branch has a different number --- test/vds.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/test/vds.c b/test/vds.c index a882698..a5d0251 100644 --- a/test/vds.c +++ b/test/vds.c @@ -57,7 +57,7 @@ const char *FILENAME[] = { #define TMPDIR "tmp/" - + /*------------------------------------------------------------------------- * Function: vds_select_equal * @@ -209,7 +209,7 @@ error: return -1; } /* end vds_select_equal() */ - + /*------------------------------------------------------------------------- * Function: vds_check_mapping * @@ -298,7 +298,7 @@ error: return -1; } /* end vds_check_mapping() */ - + /*------------------------------------------------------------------------- * Function: test_api_get_ex_dcpl * @@ -618,7 +618,7 @@ test_api(test_api_config_t config, hid_t fapl) TEST_ERROR /* Get examination DCPL */ - if(test_api_get_ex_dcpl(config, fapl, dcpl, &ex_dcpl, vspace[0], filename, (hsize_t)213) < 0) + if(test_api_get_ex_dcpl(config, fapl, dcpl, &ex_dcpl, vspace[0], filename, (hsize_t)174) < 0) TEST_ERROR /* Test H5Pget_virtual_count */ @@ -1561,7 +1561,7 @@ test_vds_prefix(unsigned config, hid_t fapl) return 1; } /* end vds_link_prefix() */ - + /*------------------------------------------------------------------------- * Function: test_basic_io * @@ -3721,7 +3721,7 @@ error: return 1; } /* end test_basic_io() */ - + /*------------------------------------------------------------------------- * Function: test_unlim * @@ -6743,7 +6743,7 @@ error: return 1; } /* end test_unlim() */ - + /*------------------------------------------------------------------------- * Function: test_printf * @@ -10434,7 +10434,7 @@ error: return 1; } /* end test_printf() */ - + /*------------------------------------------------------------------------- * Function: test_all * @@ -11459,7 +11459,7 @@ error: return 1; } /* end test_all() */ - + /*------------------------------------------------------------------------- * Function: test_dapl_values * @@ -11601,7 +11601,7 @@ test_dapl_values(hid_t fapl_id) return 1; } /* end test_dapl_values() */ - + /*------------------------------------------------------------------------- * Function: main * -- cgit v0.12 From 988c8d9bcc80f36a7cba37994e8899df1f19c433 Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Fri, 5 Jan 2018 12:10:01 -0600 Subject: Merge fix --- test/vds.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/test/vds.c b/test/vds.c index a5d0251..7d55c37 100644 --- a/test/vds.c +++ b/test/vds.c @@ -57,7 +57,7 @@ const char *FILENAME[] = { #define TMPDIR "tmp/" - + /*------------------------------------------------------------------------- * Function: vds_select_equal * @@ -209,7 +209,7 @@ error: return -1; } /* end vds_select_equal() */ - + /*------------------------------------------------------------------------- * Function: vds_check_mapping * @@ -298,7 +298,7 @@ error: return -1; } /* end vds_check_mapping() */ - + /*------------------------------------------------------------------------- * Function: test_api_get_ex_dcpl * @@ -1561,7 +1561,7 @@ test_vds_prefix(unsigned config, hid_t fapl) return 1; } /* end vds_link_prefix() */ - + /*------------------------------------------------------------------------- * Function: test_basic_io * @@ -3721,7 +3721,7 @@ error: return 1; } /* end test_basic_io() */ - + /*------------------------------------------------------------------------- * Function: test_unlim * @@ -6743,7 +6743,7 @@ error: return 1; } /* end test_unlim() */ - + /*------------------------------------------------------------------------- * Function: test_printf * @@ -10434,7 +10434,7 @@ error: return 1; } /* end test_printf() */ - + /*------------------------------------------------------------------------- * Function: test_all * @@ -11459,7 +11459,7 @@ error: return 1; } /* end test_all() */ - + /*------------------------------------------------------------------------- * Function: test_dapl_values * @@ -11601,7 +11601,7 @@ test_dapl_values(hid_t fapl_id) return 1; } /* end test_dapl_values() */ - + /*------------------------------------------------------------------------- * Function: main * -- cgit v0.12 From 58a475d3fabba89a9fed2a22d3f0851c9933f650 Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Fri, 5 Jan 2018 14:30:11 -0600 Subject: Fix link_libs and static CRT fortran --- config/cmake_ext_mod/HDFUseFortran.cmake | 8 ++++++++ testpar/CMakeLists.txt | 4 ++-- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/config/cmake_ext_mod/HDFUseFortran.cmake b/config/cmake_ext_mod/HDFUseFortran.cmake index 7bf4d81..5be2c49 100644 --- a/config/cmake_ext_mod/HDFUseFortran.cmake +++ b/config/cmake_ext_mod/HDFUseFortran.cmake @@ -15,6 +15,14 @@ #------------------------------------------------------------------------------- ENABLE_LANGUAGE (Fortran) +#------------------------------------------------------------------------------- +# Fix Fortran flags if we are compiling staticly on Windows using +# Windows_MT.cmake from config/cmake/UserMacros +#------------------------------------------------------------------------------- +if (BUILD_STATIC_CRT_LIBS) + TARGET_STATIC_CRT_FLAGS () +endif () + #----------------------------------------------------------------------------- # Detect name mangling convention used between Fortran and C #----------------------------------------------------------------------------- diff --git a/testpar/CMakeLists.txt b/testpar/CMakeLists.txt index 997d1a1..db61d35 100644 --- a/testpar/CMakeLists.txt +++ b/testpar/CMakeLists.txt @@ -30,7 +30,7 @@ set (testphdf5_SOURCES add_executable (testphdf5 ${testphdf5_SOURCES}) TARGET_NAMING (testphdf5 STATIC) TARGET_C_PROPERTIES (testphdf5 STATIC " " " ") -target_link_libraries (testphdf5 ${HDF5_TEST_LIB_TARGET} PUBLIC ${HDF5_LIB_TARGET}) +target_link_libraries (testphdf5 PUBLIC ${HDF5_TEST_LIB_TARGET} ${HDF5_LIB_TARGET}) if (HDF5_ENABLE_PARALLEL AND MPI_C_FOUND) target_link_libraries (testphdf5 PRIVATE ${MPI_C_LIBRARIES}) endif () @@ -40,7 +40,7 @@ MACRO (ADD_H5P_EXE file) add_executable (${file} ${HDF5_TEST_PAR_SOURCE_DIR}/${file}.c) TARGET_NAMING (${file} STATIC) TARGET_C_PROPERTIES (${file} STATIC " " " ") - target_link_libraries (${file} ${HDF5_TEST_LIB_TARGET} PUBLIC ${HDF5_LIB_TARGET}) + target_link_libraries (${file} PUBLIC ${HDF5_TEST_LIB_TARGET} ${HDF5_LIB_TARGET}) if (HDF5_ENABLE_PARALLEL AND MPI_C_FOUND) target_link_libraries (${file} PRIVATE ${MPI_C_LIBRARIES}) endif () -- cgit v0.12 From 9b059d7b280662b7b62427ba772f1114aa8db438 Mon Sep 17 00:00:00 2001 From: hdftest Date: Sun, 7 Jan 2018 22:34:20 -0600 Subject: Snapshot version 1.10 release 2 (snap8) --- README.txt | 2 +- c++/src/cpp_doc_config | 2 +- config/cmake/scripts/HDF5config.cmake | 2 +- configure.ac | 2 +- release_docs/RELEASE.txt | 2 +- src/H5public.h | 4 ++-- 6 files changed, 7 insertions(+), 7 deletions(-) diff --git a/README.txt b/README.txt index afa188d..e18f882 100644 --- a/README.txt +++ b/README.txt @@ -1,4 +1,4 @@ -HDF5 version 1.10.2-snap8 currently under development +HDF5 version 1.10.2-snap9 currently under development Please refer to the release_docs/INSTALL file for installation instructions. ------------------------------------------------------------------------------ diff --git a/c++/src/cpp_doc_config b/c++/src/cpp_doc_config index 279a4f8..f3bd7c8 100644 --- a/c++/src/cpp_doc_config +++ b/c++/src/cpp_doc_config @@ -38,7 +38,7 @@ PROJECT_NAME = "HDF5 C++ API" # could be handy for archiving the generated documentation or if some version # control system is used. -PROJECT_NUMBER = "1.10.2-snap8, currently under development" +PROJECT_NUMBER = "1.10.2-snap9, currently under development" # Using the PROJECT_BRIEF tag one can provide an optional one line description # for a project that appears at the top of each page and should give viewer a diff --git a/config/cmake/scripts/HDF5config.cmake b/config/cmake/scripts/HDF5config.cmake index 5c93e20..e8f3d7e 100755 --- a/config/cmake/scripts/HDF5config.cmake +++ b/config/cmake/scripts/HDF5config.cmake @@ -39,7 +39,7 @@ cmake_minimum_required (VERSION 3.2.2 FATAL_ERROR) ############################################################################## set (CTEST_SOURCE_VERSION "1.10.2") -set (CTEST_SOURCE_VERSEXT "-snap8") +set (CTEST_SOURCE_VERSEXT "-snap9") ############################################################################## # handle input parameters to script. diff --git a/configure.ac b/configure.ac index b51b45e..5fbb4a9 100644 --- a/configure.ac +++ b/configure.ac @@ -24,7 +24,7 @@ AC_PREREQ([2.69]) ## NOTE: Do not forget to change the version number here when we do a ## release!!! ## -AC_INIT([HDF5], [1.10.2-snap8], [help@hdfgroup.org]) +AC_INIT([HDF5], [1.10.2-snap9], [help@hdfgroup.org]) AC_CONFIG_SRCDIR([src/H5.c]) AC_CONFIG_HEADERS([src/H5config.h]) diff --git a/release_docs/RELEASE.txt b/release_docs/RELEASE.txt index 65bdc72..adda8b4 100644 --- a/release_docs/RELEASE.txt +++ b/release_docs/RELEASE.txt @@ -1,4 +1,4 @@ -HDF5 version 1.10.2-snap8 currently under development +HDF5 version 1.10.2-snap9 currently under development ================================================================================ diff --git a/src/H5public.h b/src/H5public.h index 9c62738..76adcc7 100644 --- a/src/H5public.h +++ b/src/H5public.h @@ -94,9 +94,9 @@ extern "C" { #define H5_VERS_MAJOR 1 /* For major interface/format changes */ #define H5_VERS_MINOR 10 /* For minor interface/format changes */ #define H5_VERS_RELEASE 2 /* For tweaks, bug-fixes, or development */ -#define H5_VERS_SUBRELEASE "snap8" /* For pre-releases like snap0 */ +#define H5_VERS_SUBRELEASE "snap9" /* For pre-releases like snap0 */ /* Empty string for real releases. */ -#define H5_VERS_INFO "HDF5 library version: 1.10.2-snap8" /* Full version string */ +#define H5_VERS_INFO "HDF5 library version: 1.10.2-snap9" /* Full version string */ #define H5check() H5check_version(H5_VERS_MAJOR,H5_VERS_MINOR, \ H5_VERS_RELEASE) -- cgit v0.12 From 49479589d342324b564003738f2d259ae40b5aca Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Mon, 8 Jan 2018 16:04:46 -0600 Subject: HDFFV-10385 Refactor use of CMAKE_BUILD_TYPE --- CMakeLists.txt | 6 +++-- config/cmake/HDFCompilerFlags.cmake | 6 ++--- config/cmake/libhdf5.settings.cmake.in | 6 ++--- config/cmake_ext_mod/HDFMacros.cmake | 39 +++++++++++++++++++++++++++---- fortran/src/CMakeLists.txt | 14 ++++------- fortran/test/CMakeLists.txt | 14 ++++------- hl/fortran/src/CMakeLists.txt | 14 ++++------- java/examples/datasets/CMakeLists.txt | 2 +- java/examples/datatypes/CMakeLists.txt | 2 +- java/examples/groups/CMakeLists.txt | 2 +- java/examples/intro/CMakeLists.txt | 2 +- java/src/jni/CMakeLists.txt | 2 +- java/test/CMakeLists.txt | 2 +- release_docs/RELEASE.txt | 25 +++++++++++++++++--- test/CMakeTests.cmake | 2 +- tools/src/h5copy/CMakeLists.txt | 7 +++--- tools/src/h5diff/CMakeLists.txt | 7 +++--- tools/src/h5dump/CMakeLists.txt | 7 +++--- tools/src/h5format_convert/CMakeLists.txt | 6 +++-- tools/src/h5import/CMakeLists.txt | 6 +++-- tools/src/h5jam/CMakeLists.txt | 6 +++-- tools/src/h5ls/CMakeLists.txt | 7 +++--- tools/src/h5repack/CMakeLists.txt | 7 +++--- tools/src/h5stat/CMakeLists.txt | 7 +++--- tools/src/misc/CMakeLists.txt | 8 +++---- 25 files changed, 120 insertions(+), 86 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index d4e6300..5be2f03 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -409,6 +409,8 @@ include (${HDF_RESOURCES_EXT_DIR}/HDFMacros.cmake) include (${HDF_RESOURCES_EXT_DIR}/HDFLibMacros.cmake) include (${HDF_RESOURCES_DIR}/HDF5Macros.cmake) +SET_HDF5_BUILD_TYPE() + #----------------------------------------------------------------------------- # Setup output Directories #----------------------------------------------------------------------------- @@ -426,7 +428,7 @@ if (NOT HDF5_EXTERNALLY_CONFIGURED) ${PROJECT_BINARY_DIR}/bin CACHE PATH "Single Directory for all fortran modules." ) if (WIN32) - set (CMAKE_TEST_OUTPUT_DIRECTORY ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${CMAKE_BUILD_TYPE}) + set (CMAKE_TEST_OUTPUT_DIRECTORY ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${HDF5_BUILD_TYPE}) set (CMAKE_PDB_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/bin CACHE PATH "Single Directory for all pdb files." ) @@ -582,7 +584,7 @@ option (HDF5_BUILD_GENERATORS "Build Test Generators" OFF) #----------------------------------------------------------------------------- option (HDF5_ENABLE_TRACE "Enable API tracing capability" OFF) mark_as_advanced (HDF5_ENABLE_TRACE) -if (CMAKE_BUILD_TYPE MATCHES Debug) +if (HDF5_BUILD_TYPE MATCHES Debug) add_definitions (-DDEBUG) # Enable tracing of the API if (HDF5_ENABLE_TRACE) diff --git a/config/cmake/HDFCompilerFlags.cmake b/config/cmake/HDFCompilerFlags.cmake index 5f71f33..eeb4b97 100644 --- a/config/cmake/HDFCompilerFlags.cmake +++ b/config/cmake/HDFCompilerFlags.cmake @@ -13,12 +13,12 @@ # Compiler specific flags : Shouldn't there be compiler tests for these #----------------------------------------------------------------------------- if (CMAKE_COMPILER_IS_GNUCC) - if (CMAKE_BUILD_TYPE MATCHES Debug) + if (HDF5_BUILD_TYPE MATCHES Debug) set (CMAKE_C_FLAGS "${CMAKE_ANSI_CFLAGS} ${CMAKE_C_FLAGS} -std=c99") if (NOT CMAKE_C_COMPILER_VERSION VERSION_LESS 5.0) set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Og -ftrapv -fno-common") endif () - else (CMAKE_BUILD_TYPE MATCHES Debug) + else (HDF5_BUILD_TYPE MATCHES Debug) set (CMAKE_C_FLAGS "${CMAKE_ANSI_CFLAGS} ${CMAKE_C_FLAGS} -std=c99") if (NOT CMAKE_C_COMPILER_VERSION VERSION_LESS 5.0) set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fstdarg-opt") @@ -26,7 +26,7 @@ if (CMAKE_COMPILER_IS_GNUCC) endif () endif () if (CMAKE_COMPILER_IS_GNUCXX AND CMAKE_CXX_COMPILER_LOADED) - if (CMAKE_BUILD_TYPE MATCHES Debug) + if (HDF5_BUILD_TYPE MATCHES Debug) set (CMAKE_CXX_FLAGS "${CMAKE_ANSI_CFLAGS} ${CMAKE_CXX_FLAGS}") if (NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 5.0) set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Og -ftrapv -fno-common") diff --git a/config/cmake/libhdf5.settings.cmake.in b/config/cmake/libhdf5.settings.cmake.in index 8348af0..28fb876 100644 --- a/config/cmake/libhdf5.settings.cmake.in +++ b/config/cmake/libhdf5.settings.cmake.in @@ -1,5 +1,5 @@ - SUMMARY OF THE HDF5 CONFIGURATION - ================================= + SUMMARY OF THE HDF5 CONFIGURATION + ================================= General Information: ------------------- @@ -13,7 +13,7 @@ General Information: Compiling Options: ------------------ - Build Mode: @CMAKE_BUILD_TYPE@ + Build Mode: @HDF5_BUILD_TYPE@ Debugging Symbols: @SYMBOLS@ Asserts: @ASSERTS@ Profiling: @PROFILING@ diff --git a/config/cmake_ext_mod/HDFMacros.cmake b/config/cmake_ext_mod/HDFMacros.cmake index 192a5c8..dd7e262 100644 --- a/config/cmake_ext_mod/HDFMacros.cmake +++ b/config/cmake_ext_mod/HDFMacros.cmake @@ -9,6 +9,37 @@ # If you do not have access to either file, you may request a copy from # help@hdfgroup.org. # + +#------------------------------------------------------------------------------- +macro (SET_HDF5_BUILD_TYPE) + get_property(_isMultiConfig GLOBAL PROPERTY GENERATOR_IS_MULTI_CONFIG) + if(_isMultiConfig) + set(HDF5_BUILD_TYPE ${CMAKE_CFG_INTDIR}) + else() + if(CMAKE_BUILD_TYPE) + set(HDF5_BUILD_TYPE ${CMAKE_BUILD_TYPE}) + else() + set(HDF5_BUILD_TYPE) + endif() + endif() +endmacro () + +#------------------------------------------------------------------------------- +macro (CREATE_CONFIG_DIR path) + get_property(_isMultiConfig GLOBAL PROPERTY GENERATOR_IS_MULTI_CONFIG) + if(_isMultiConfig) + foreach(c ${CMAKE_CONFIGURATION_TYPES} ${CMAKE_BUILD_TYPE}) + file(MAKE_DIRECTORY "${path}/${c}") + endforeach() + else() + if(CMAKE_BUILD_TYPE) + file(MAKE_DIRECTORY "${path}/${CMAKE_BUILD_TYPE}") + else() + file(MAKE_DIRECTORY "${path}") + endif() + endif() +endmacro () + #------------------------------------------------------------------------------- macro (SET_GLOBAL_VARIABLE name value) set (${name} ${value} CACHE INTERNAL "Used to pass variables between directories" FORCE) @@ -145,7 +176,7 @@ macro (HDF_IMPORT_SET_LIB_OPTIONS libtarget libname libtype libversion) if (${importtype} MATCHES "IMPORT") set (importprefix "${CMAKE_STATIC_LIBRARY_PREFIX}") endif () - if (${CMAKE_BUILD_TYPE} MATCHES "Debug") + if (${HDF5_BUILD_TYPE} MATCHES "Debug") set (IMPORT_LIB_NAME ${LIB_DEBUG_NAME}) else () set (IMPORT_LIB_NAME ${LIB_RELEASE_NAME}) @@ -160,8 +191,8 @@ macro (HDF_IMPORT_SET_LIB_OPTIONS libtarget libname libtype libversion) ) else () set_target_properties (${libtarget} PROPERTIES - IMPORTED_IMPLIB "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/${CMAKE_BUILD_TYPE}/${CMAKE_IMPORT_LIBRARY_PREFIX}${IMPORT_LIB_NAME}${CMAKE_IMPORT_LIBRARY_SUFFIX}" - IMPORTED_LOCATION "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/${CMAKE_BUILD_TYPE}/${CMAKE_IMPORT_LIBRARY_PREFIX}${IMPORT_LIB_NAME}${CMAKE_SHARED_LIBRARY_SUFFIX}" + IMPORTED_IMPLIB "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/${HDF5_BUILD_TYPE}/${CMAKE_IMPORT_LIBRARY_PREFIX}${IMPORT_LIB_NAME}${CMAKE_IMPORT_LIBRARY_SUFFIX}" + IMPORTED_LOCATION "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/${HDF5_BUILD_TYPE}/${CMAKE_IMPORT_LIBRARY_PREFIX}${IMPORT_LIB_NAME}${CMAKE_SHARED_LIBRARY_SUFFIX}" ) endif () else () @@ -181,7 +212,7 @@ macro (HDF_IMPORT_SET_LIB_OPTIONS libtarget libname libtype libversion) else () if (WIN32 AND NOT MINGW) set_target_properties (${libtarget} PROPERTIES - IMPORTED_LOCATION "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/${CMAKE_BUILD_TYPE}/${IMPORT_LIB_NAME}${CMAKE_STATIC_LIBRARY_SUFFIX}" + IMPORTED_LOCATION "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/${HDF5_BUILD_TYPE}/${IMPORT_LIB_NAME}${CMAKE_STATIC_LIBRARY_SUFFIX}" IMPORTED_LINK_INTERFACE_LANGUAGES "C" ) else () diff --git a/fortran/src/CMakeLists.txt b/fortran/src/CMakeLists.txt index 18d6d80..692509b 100644 --- a/fortran/src/CMakeLists.txt +++ b/fortran/src/CMakeLists.txt @@ -66,17 +66,11 @@ set_target_properties (H5_buildiface PROPERTIES if (BUILD_SHARED_LIBS) file (MAKE_DIRECTORY "${HDF5_F90_BINARY_DIR}/shared") - if (WIN32) - set (MODSH_BUILD_DIR ${CMAKE_Fortran_MODULE_DIRECTORY}/shared/${CMAKE_BUILD_TYPE}) - else () - set (MODSH_BUILD_DIR ${CMAKE_Fortran_MODULE_DIRECTORY}/shared) - endif () -endif () -if (WIN32) - set (MOD_BUILD_DIR ${CMAKE_Fortran_MODULE_DIRECTORY}/static/${CMAKE_BUILD_TYPE}) -else () - set (MOD_BUILD_DIR ${CMAKE_Fortran_MODULE_DIRECTORY}/static) + CREATE_CONFIG_DIR(${CMAKE_Fortran_MODULE_DIRECTORY}/shared) + set (MODSH_BUILD_DIR ${CMAKE_Fortran_MODULE_DIRECTORY}/shared/${HDF5_BUILD_TYPE}) endif () +CREATE_CONFIG_DIR(${CMAKE_Fortran_MODULE_DIRECTORY}/static) +set (MOD_BUILD_DIR ${CMAKE_Fortran_MODULE_DIRECTORY}/static/${HDF5_BUILD_TYPE}) INCLUDE_DIRECTORIES (${HDF5_F90_BINARY_DIR} ${CMAKE_Fortran_MODULE_DIRECTORY}) diff --git a/fortran/test/CMakeLists.txt b/fortran/test/CMakeLists.txt index 3c3eb8f..f536bf2 100644 --- a/fortran/test/CMakeLists.txt +++ b/fortran/test/CMakeLists.txt @@ -34,17 +34,11 @@ set_target_properties (H5_test_buildiface PROPERTIES if (BUILD_SHARED_LIBS) file (MAKE_DIRECTORY "${HDF5_F90_BINARY_DIR}/shared") - if (WIN32) - set (MODSH_BUILD_DIR ${CMAKE_Fortran_MODULE_DIRECTORY}/shared/${CMAKE_BUILD_TYPE}) - else () - set (MODSH_BUILD_DIR ${CMAKE_Fortran_MODULE_DIRECTORY}/shared) - endif () -endif () -if (WIN32) - set (MOD_BUILD_DIR ${CMAKE_Fortran_MODULE_DIRECTORY}/static/${CMAKE_BUILD_TYPE}) -else () - set (MOD_BUILD_DIR ${CMAKE_Fortran_MODULE_DIRECTORY}/static) + CREATE_CONFIG_DIR(${CMAKE_Fortran_MODULE_DIRECTORY}/shared) + set (MODSH_BUILD_DIR ${CMAKE_Fortran_MODULE_DIRECTORY}/shared/${HDF5_BUILD_TYPE}) endif () +CREATE_CONFIG_DIR(${CMAKE_Fortran_MODULE_DIRECTORY}/static) +set (MOD_BUILD_DIR ${CMAKE_Fortran_MODULE_DIRECTORY}/static/${HDF5_BUILD_TYPE}) INCLUDE_DIRECTORIES (${CMAKE_Fortran_MODULE_DIRECTORY} ${MOD_BUILD_DIR}) diff --git a/hl/fortran/src/CMakeLists.txt b/hl/fortran/src/CMakeLists.txt index 3fc66c4..90ee19b 100644 --- a/hl/fortran/src/CMakeLists.txt +++ b/hl/fortran/src/CMakeLists.txt @@ -38,17 +38,11 @@ set_target_properties (H5HL_buildiface PROPERTIES if (BUILD_SHARED_LIBS) file (MAKE_DIRECTORY "${HDF5_HL_F90_SRC_BINARY_DIR}/shared") - if (WIN32) - set (MODSH_BUILD_DIR ${CMAKE_Fortran_MODULE_DIRECTORY}/shared/${CMAKE_BUILD_TYPE}) - else () - set (MODSH_BUILD_DIR ${CMAKE_Fortran_MODULE_DIRECTORY}/shared) - endif () -endif () -if (WIN32) - set (MOD_BUILD_DIR ${CMAKE_Fortran_MODULE_DIRECTORY}/static/${CMAKE_BUILD_TYPE}) -else () - set (MOD_BUILD_DIR ${CMAKE_Fortran_MODULE_DIRECTORY}/static) + CREATE_CONFIG_DIR(${CMAKE_Fortran_MODULE_DIRECTORY}/shared) + set (MODSH_BUILD_DIR ${CMAKE_Fortran_MODULE_DIRECTORY}/shared/${HDF5_BUILD_TYPE}) endif () +CREATE_CONFIG_DIR(${CMAKE_Fortran_MODULE_DIRECTORY}/static) +set (MOD_BUILD_DIR ${CMAKE_Fortran_MODULE_DIRECTORY}/static/${HDF5_BUILD_TYPE}) #----------------------------------------------------------------------------- # Setup include Directories diff --git a/java/examples/datasets/CMakeLists.txt b/java/examples/datasets/CMakeLists.txt index 3972ec8..dd007f5 100644 --- a/java/examples/datasets/CMakeLists.txt +++ b/java/examples/datasets/CMakeLists.txt @@ -62,7 +62,7 @@ foreach (HDFJAVA_JAR ${CMAKE_JAVA_INCLUDE_PATH}) endforeach () MACRO (ADD_H5_TEST resultfile resultcode) - if (CMAKE_BUILD_TYPE MATCHES Debug) + if (HDF5_BUILD_TYPE MATCHES Debug) if (WIN32) set (CMD_ARGS "-Dhdf.hdf5lib.H5.loadLibraryName=hdf5_java_D;") else () diff --git a/java/examples/datatypes/CMakeLists.txt b/java/examples/datatypes/CMakeLists.txt index 8569b8b..fac8158 100644 --- a/java/examples/datatypes/CMakeLists.txt +++ b/java/examples/datatypes/CMakeLists.txt @@ -62,7 +62,7 @@ foreach (HDFJAVA_JAR ${CMAKE_JAVA_INCLUDE_PATH}) endforeach () MACRO (ADD_H5_TEST resultfile resultcode) - if (CMAKE_BUILD_TYPE MATCHES Debug) + if (HDF5_BUILD_TYPE MATCHES Debug) if (WIN32) set (CMD_ARGS "-Dhdf.hdf5lib.H5.loadLibraryName=hdf5_java_D;") else () diff --git a/java/examples/groups/CMakeLists.txt b/java/examples/groups/CMakeLists.txt index b912208..7f2801a 100644 --- a/java/examples/groups/CMakeLists.txt +++ b/java/examples/groups/CMakeLists.txt @@ -61,7 +61,7 @@ endforeach () add_custom_target(H5Ex_G_Visit_files ALL COMMENT "Copying files needed by H5Ex_G_Visit tests" DEPENDS ${H5Ex_G_Visit_files_list}) MACRO (ADD_H5_TEST resultfile resultcode) - if (CMAKE_BUILD_TYPE MATCHES Debug) + if (HDF5_BUILD_TYPE MATCHES Debug) if (WIN32) set (CMD_ARGS "-Dhdf.hdf5lib.H5.loadLibraryName=hdf5_java_D;") else () diff --git a/java/examples/intro/CMakeLists.txt b/java/examples/intro/CMakeLists.txt index 9dc4dd7..a21d369 100644 --- a/java/examples/intro/CMakeLists.txt +++ b/java/examples/intro/CMakeLists.txt @@ -63,7 +63,7 @@ foreach (example ${HDF_JAVA_OBJECT_EXAMPLES}) endforeach () MACRO (ADD_H5_TEST resultfile resultcode) - if (CMAKE_BUILD_TYPE MATCHES Debug) + if (HDF5_BUILD_TYPE MATCHES Debug) if (WIN32) set (CMD_ARGS "-Dhdf.hdf5lib.H5.loadLibraryName=hdf5_java_D;") else () diff --git a/java/src/jni/CMakeLists.txt b/java/src/jni/CMakeLists.txt index 10d1b6d..90343b2 100644 --- a/java/src/jni/CMakeLists.txt +++ b/java/src/jni/CMakeLists.txt @@ -57,7 +57,7 @@ SET_GLOBAL_VARIABLE (HDF5_LIBRARIES_TO_EXPORT "${HDF5_LIBRARIES_TO_EXPORT};${HDF H5_SET_LIB_OPTIONS (${HDF5_JAVA_JNI_LIB_TARGET} ${HDF5_JAVA_JNI_LIB_NAME} SHARED ${HDF5_JAVA_PACKAGE_SOVERSION}) if (WIN32) get_filename_component (HDF5_JAVA_JNI_DLL_NAME ${HDF5_JAVA_JNI_LIB_TARGET} NAME_WE) - if (CMAKE_BUILD_TYPE MATCHES Debug) + if (HDF5_BUILD_TYPE MATCHES Debug) set (HDF5_JAVA_JNI_DLL_NAME "${HDF5_JAVA_JNI_DLL_NAME}_D") endif () # message (STATUS "HDF5_JAVA_JNI_DLL_NAME: ${HDF5_JAVA_JNI_DLL_NAME}") diff --git a/java/test/CMakeLists.txt b/java/test/CMakeLists.txt index 8912b3f..fadc1ea 100644 --- a/java/test/CMakeLists.txt +++ b/java/test/CMakeLists.txt @@ -88,7 +88,7 @@ endforeach () set (CMAKE_JAVA_CLASSPATH "${CMAKE_JAVA_CLASSPATH}${CMAKE_JAVA_INCLUDE_FLAG_SEP}${${HDF5_JAVA_TEST_LIB_TARGET}_JAR_FILE}") set (testfilter "OK (598 tests)") -if (CMAKE_BUILD_TYPE MATCHES Debug) +if (HDF5_BUILD_TYPE MATCHES Debug) if (WIN32) set (CMD_ARGS "-Dhdf.hdf5lib.H5.loadLibraryName=hdf5_java_D;") else () diff --git a/release_docs/RELEASE.txt b/release_docs/RELEASE.txt index adda8b4..38792cd 100644 --- a/release_docs/RELEASE.txt +++ b/release_docs/RELEASE.txt @@ -54,6 +54,16 @@ New Features Configuration: ------------- + - CMake + + Refactor use of CMAKE_BUILD_TYPE for new variable, which understands + the type of generator in use. + + Added new configuration macros to use new HDF5_BUILD_TYPE variable. This + variable is set correctly for the type of generator being used for the build. + + (ADB - 2018/01/08, HDFFV-10385, HDFFV-10296) + - Removed version-specific gcc/gfortran flags for version 4.0 (inclusive) and earlier. @@ -393,7 +403,16 @@ Bug Fixes since HDF5-1.10.1 release Configuration ------------- - - cmake + - CMake + + Add replacement of fortran flags if using static CRT. + + Added TARGET_STATIC_CRT_FLAGS call to HDFUseFortran.cmake file in + config/cmake_ext_mod folder. + + (ADB - 2018/01/08, HDFFV-10334) + + - CMake The hdf5 library used shared szip and zlib, which needlessly required applications to link with the same szip and zlib libraries. @@ -405,7 +424,7 @@ Bug Fixes since HDF5-1.10.1 release (ADB - 2017/11/14, HDFFV-10329) - - cmake MPI + - CMake MPI CMake implementation for MPI was problematic and would create incorrect MPI library references in the hdf5 libraries. @@ -442,7 +461,7 @@ Bug Fixes since HDF5-1.10.1 release (HDFFV-10248, DER, 2017/07/05) - - cmake + - CMake Too many commands for POST_BUILD step caused command line to be too big on windows. diff --git a/test/CMakeTests.cmake b/test/CMakeTests.cmake index fca2f27..a304485 100644 --- a/test/CMakeTests.cmake +++ b/test/CMakeTests.cmake @@ -1133,7 +1133,7 @@ if (HDF5_TEST_VFD) macro (CHECK_VFD_TEST vfdtest vfdname resultcode) if ("${vfdtest}" STREQUAL "flush1" OR "${vfdtest}" STREQUAL "flush2") if ("${vfdname}" STREQUAL "multi" OR "${vfdname}" STREQUAL "split") - if (NOT BUILD_SHARED_LIBS AND NOT CMAKE_BUILD_TYPE MATCHES Debug) + if (NOT BUILD_SHARED_LIBS AND NOT HDF5_BUILD_TYPE MATCHES Debug) add_test (NAME VFD-${vfdname}-${vfdtest} COMMAND "${CMAKE_COMMAND}" -D "TEST_PROGRAM=$" diff --git a/tools/src/h5copy/CMakeLists.txt b/tools/src/h5copy/CMakeLists.txt index d1f5f50..23c8fae 100644 --- a/tools/src/h5copy/CMakeLists.txt +++ b/tools/src/h5copy/CMakeLists.txt @@ -39,10 +39,9 @@ endif () # Rules for Installation of tools using make Install target #----------------------------------------------------------------------------- if (HDF5_EXPORTED_TARGETS) - if (BUILD_SHARED_LIBS) - INSTALL_PROGRAM_PDB (h5copy-shared ${HDF5_INSTALL_BIN_DIR} toolsapplications) - endif () - INSTALL_PROGRAM_PDB (h5copy ${HDF5_INSTALL_BIN_DIR} toolsapplications) + foreach (exec ${H5_DEP_EXECUTABLES}) + INSTALL_PROGRAM_PDB (${exec} ${HDF5_INSTALL_BIN_DIR} toolsapplications) + endforeach () install ( TARGETS diff --git a/tools/src/h5diff/CMakeLists.txt b/tools/src/h5diff/CMakeLists.txt index 00d93de..b0cf66e 100644 --- a/tools/src/h5diff/CMakeLists.txt +++ b/tools/src/h5diff/CMakeLists.txt @@ -57,10 +57,9 @@ endif () # Rules for Installation of tools using make Install target #----------------------------------------------------------------------------- if (HDF5_EXPORTED_TARGETS) - if (BUILD_SHARED_LIBS) - INSTALL_PROGRAM_PDB (h5diff-shared ${HDF5_INSTALL_BIN_DIR} toolsapplications) - endif () - INSTALL_PROGRAM_PDB (h5diff ${HDF5_INSTALL_BIN_DIR} toolsapplications) + foreach (exec ${H5_DEP_EXECUTABLES}) + INSTALL_PROGRAM_PDB (${exec} ${HDF5_INSTALL_BIN_DIR} toolsapplications) + endforeach () install ( TARGETS diff --git a/tools/src/h5dump/CMakeLists.txt b/tools/src/h5dump/CMakeLists.txt index 65a7cdd..c58b20c 100644 --- a/tools/src/h5dump/CMakeLists.txt +++ b/tools/src/h5dump/CMakeLists.txt @@ -47,10 +47,9 @@ endif () # Rules for Installation of tools using make Install target #----------------------------------------------------------------------------- if (HDF5_EXPORTED_TARGETS) - if (BUILD_SHARED_LIBS) - INSTALL_PROGRAM_PDB (h5dump-shared ${HDF5_INSTALL_BIN_DIR} toolsapplications) - endif () - INSTALL_PROGRAM_PDB (h5dump ${HDF5_INSTALL_BIN_DIR} toolsapplications) + foreach (exec ${H5_DEP_EXECUTABLES}) + INSTALL_PROGRAM_PDB (${exec} ${HDF5_INSTALL_BIN_DIR} toolsapplications) + endforeach () install ( TARGETS diff --git a/tools/src/h5format_convert/CMakeLists.txt b/tools/src/h5format_convert/CMakeLists.txt index fa3abc0..1e3e62f 100644 --- a/tools/src/h5format_convert/CMakeLists.txt +++ b/tools/src/h5format_convert/CMakeLists.txt @@ -28,11 +28,13 @@ set (H5_DEP_EXECUTABLES h5format_convert) # Rules for Installation of tools using make Install target #----------------------------------------------------------------------------- if (HDF5_EXPORTED_TARGETS) - INSTALL_PROGRAM_PDB (h5format_convert ${HDF5_INSTALL_BIN_DIR} toolsapplications) + foreach (exec ${H5_DEP_EXECUTABLES}) + INSTALL_PROGRAM_PDB (${exec} ${HDF5_INSTALL_BIN_DIR} toolsapplications) + endforeach () install ( TARGETS - h5format_convert + ${H5_DEP_EXECUTABLES} EXPORT ${HDF5_EXPORTED_TARGETS} RUNTIME DESTINATION ${HDF5_INSTALL_BIN_DIR} COMPONENT toolsapplications diff --git a/tools/src/h5import/CMakeLists.txt b/tools/src/h5import/CMakeLists.txt index 9a61beb..bebc6d8 100644 --- a/tools/src/h5import/CMakeLists.txt +++ b/tools/src/h5import/CMakeLists.txt @@ -29,11 +29,13 @@ set (H5_DEP_EXECUTABLES h5import) # Rules for Installation of tools using make Install target #----------------------------------------------------------------------------- if (HDF5_EXPORTED_TARGETS) - INSTALL_PROGRAM_PDB (h5import ${HDF5_INSTALL_BIN_DIR} toolsapplications) + foreach (exec ${H5_DEP_EXECUTABLES}) + INSTALL_PROGRAM_PDB (${exec} ${HDF5_INSTALL_BIN_DIR} toolsapplications) + endforeach () install ( TARGETS - h5import + ${H5_DEP_EXECUTABLES} EXPORT ${HDF5_EXPORTED_TARGETS} RUNTIME DESTINATION ${HDF5_INSTALL_BIN_DIR} COMPONENT toolsapplications diff --git a/tools/src/h5jam/CMakeLists.txt b/tools/src/h5jam/CMakeLists.txt index 3cca771..1075180 100644 --- a/tools/src/h5jam/CMakeLists.txt +++ b/tools/src/h5jam/CMakeLists.txt @@ -38,11 +38,13 @@ set (H5_DEP_EXECUTABLES # Rules for Installation of tools using make Install target #----------------------------------------------------------------------------- if (HDF5_EXPORTED_TARGETS) - INSTALL_PROGRAM_PDB (h5jam ${HDF5_INSTALL_BIN_DIR} toolsapplications) + foreach (exec ${H5_DEP_EXECUTABLES}) + INSTALL_PROGRAM_PDB (${exec} ${HDF5_INSTALL_BIN_DIR} toolsapplications) + endforeach () install ( TARGETS - h5jam h5unjam + ${H5_DEP_EXECUTABLES} EXPORT ${HDF5_EXPORTED_TARGETS} RUNTIME DESTINATION ${HDF5_INSTALL_BIN_DIR} COMPONENT toolsapplications diff --git a/tools/src/h5ls/CMakeLists.txt b/tools/src/h5ls/CMakeLists.txt index 2e23634..0e3d57f 100644 --- a/tools/src/h5ls/CMakeLists.txt +++ b/tools/src/h5ls/CMakeLists.txt @@ -39,10 +39,9 @@ endif () # Rules for Installation of tools using make Install target #----------------------------------------------------------------------------- if (HDF5_EXPORTED_TARGETS) - if (BUILD_SHARED_LIBS) - INSTALL_PROGRAM_PDB (h5ls-shared ${HDF5_INSTALL_BIN_DIR} toolsapplications) - endif () - INSTALL_PROGRAM_PDB (h5ls ${HDF5_INSTALL_BIN_DIR} toolsapplications) + foreach (exec ${H5_DEP_EXECUTABLES}) + INSTALL_PROGRAM_PDB (${exec} ${HDF5_INSTALL_BIN_DIR} toolsapplications) + endforeach () install ( TARGETS diff --git a/tools/src/h5repack/CMakeLists.txt b/tools/src/h5repack/CMakeLists.txt index 81e6275..abf4c24 100644 --- a/tools/src/h5repack/CMakeLists.txt +++ b/tools/src/h5repack/CMakeLists.txt @@ -50,10 +50,9 @@ endif () # Rules for Installation of tools using make Install target #----------------------------------------------------------------------------- if (HDF5_EXPORTED_TARGETS) - if (BUILD_SHARED_LIBS) - INSTALL_PROGRAM_PDB (h5repack-shared ${HDF5_INSTALL_BIN_DIR} toolsapplications) - endif () - INSTALL_PROGRAM_PDB (h5repack ${HDF5_INSTALL_BIN_DIR} toolsapplications) + foreach (exec ${H5_DEP_EXECUTABLES}) + INSTALL_PROGRAM_PDB (${exec} ${HDF5_INSTALL_BIN_DIR} toolsapplications) + endforeach () install ( TARGETS diff --git a/tools/src/h5stat/CMakeLists.txt b/tools/src/h5stat/CMakeLists.txt index 9762dbb..60d3f7c 100644 --- a/tools/src/h5stat/CMakeLists.txt +++ b/tools/src/h5stat/CMakeLists.txt @@ -39,10 +39,9 @@ endif () # Rules for Installation of tools using make Install target #----------------------------------------------------------------------------- if (HDF5_EXPORTED_TARGETS) - if (BUILD_SHARED_LIBS) - INSTALL_PROGRAM_PDB (h5stat-shared ${HDF5_INSTALL_BIN_DIR} toolsapplications) - endif () - INSTALL_PROGRAM_PDB (h5stat ${HDF5_INSTALL_BIN_DIR} toolsapplications) + foreach (exec ${H5_DEP_EXECUTABLES}) + INSTALL_PROGRAM_PDB (${exec} ${HDF5_INSTALL_BIN_DIR} toolsapplications) + endforeach () install ( TARGETS diff --git a/tools/src/misc/CMakeLists.txt b/tools/src/misc/CMakeLists.txt index 1292628..20c9171 100644 --- a/tools/src/misc/CMakeLists.txt +++ b/tools/src/misc/CMakeLists.txt @@ -62,13 +62,13 @@ set (H5_DEP_EXECUTABLES # Rules for Installation of tools using make Install target #----------------------------------------------------------------------------- if (HDF5_EXPORTED_TARGETS) - INSTALL_PROGRAM_PDB (h5debug ${HDF5_INSTALL_BIN_DIR} toolsapplications) - INSTALL_PROGRAM_PDB (h5repart ${HDF5_INSTALL_BIN_DIR} toolsapplications) - INSTALL_PROGRAM_PDB (h5mkgrp ${HDF5_INSTALL_BIN_DIR} toolsapplications) + foreach (exec ${H5_DEP_EXECUTABLES}) + INSTALL_PROGRAM_PDB (${exec} ${HDF5_INSTALL_BIN_DIR} toolsapplications) + endforeach () install ( TARGETS - h5debug h5repart h5mkgrp + ${H5_DEP_EXECUTABLES} EXPORT ${HDF5_EXPORTED_TARGETS} RUNTIME DESTINATION ${HDF5_INSTALL_BIN_DIR} COMPONENT toolsapplications -- cgit v0.12 From f548e878b06a70f67b13f47a5af5d6e9bba9a6a0 Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Tue, 9 Jan 2018 09:20:25 -0600 Subject: HDFFV-8745 merge from develop --- MANIFEST | 9 +- release_docs/RELEASE.txt | 15 + tools/lib/h5diff_attr.c | 20 - tools/lib/h5diff_dset.c | 50 +- tools/test/h5diff/CMakeTests.cmake | 23 +- tools/test/h5diff/h5diffgentest.c | 6776 +++++++++++++++------------ tools/test/h5diff/testfiles/h5diff_8625.txt | 10 + tools/test/h5diff/testfiles/h5diff_8639.txt | 72 + tools/test/h5diff/testfiles/h5diff_attr1.h5 | Bin 26000 -> 27480 bytes tools/test/h5diff/testfiles/h5diff_attr2.h5 | Bin 26000 -> 27480 bytes tools/test/h5diff/testfiles/h5diff_attr3.h5 | Bin 0 -> 27440 bytes tools/test/h5diff/testfiles/h5diff_tmp1.txt | 5 - tools/test/h5diff/testfiles/h5diff_tmp2.txt | 13 - tools/test/h5diff/testfiles/tmptest.he5 | Bin 4740424 -> 0 bytes tools/test/h5diff/testfiles/tmptest2.he5 | Bin 4734280 -> 0 bytes tools/test/h5diff/testh5diff.sh.in | 17 +- 16 files changed, 3820 insertions(+), 3190 deletions(-) create mode 100644 tools/test/h5diff/testfiles/h5diff_8625.txt create mode 100644 tools/test/h5diff/testfiles/h5diff_8639.txt create mode 100644 tools/test/h5diff/testfiles/h5diff_attr3.h5 delete mode 100644 tools/test/h5diff/testfiles/h5diff_tmp1.txt delete mode 100644 tools/test/h5diff/testfiles/h5diff_tmp2.txt delete mode 100644 tools/test/h5diff/testfiles/tmptest.he5 delete mode 100644 tools/test/h5diff/testfiles/tmptest2.he5 diff --git a/MANIFEST b/MANIFEST index c6c7b3c..2db6d6b 100644 --- a/MANIFEST +++ b/MANIFEST @@ -2382,6 +2382,7 @@ ./tools/test/h5diff/testfiles/h5diff_attr1.h5 ./tools/test/h5diff/testfiles/h5diff_attr2.h5 +./tools/test/h5diff/testfiles/h5diff_attr3.h5 ./tools/test/h5diff/testfiles/h5diff_attr_v_level1.h5 ./tools/test/h5diff/testfiles/h5diff_attr_v_level2.h5 ./tools/test/h5diff/testfiles/h5diff_basic1.h5 @@ -2423,12 +2424,8 @@ ./tools/test/h5diff/testfiles/compounds_array_vlen2.h5 ./tools/test/h5diff/testfiles/non_comparables1.h5 ./tools/test/h5diff/testfiles/non_comparables2.h5 -./tools/test/h5diff/testfiles/tmptest2.he5 -./tools/test/h5diff/testfiles/tmpSingleSiteBethe.reference.h5 -./tools/test/h5diff/testfiles/h5diff_tmp1.txt -./tools/test/h5diff/testfiles/tmptest.he5 -./tools/test/h5diff/testfiles/h5diff_tmp2.txt -./tools/test/h5diff/testfiles/tmpSingleSiteBethe.output.h5 +./tools/test/h5diff/testfiles/h5diff_8625.txt +./tools/test/h5diff/testfiles/h5diff_8639.txt ./tools/test/h5diff/testfiles/tudfilter.h5 ./tools/test/h5diff/testfiles/tudfilter2.h5 ./tools/test/h5diff/testfiles/h5diff_ud.txt diff --git a/release_docs/RELEASE.txt b/release_docs/RELEASE.txt index 38792cd..24b6196 100644 --- a/release_docs/RELEASE.txt +++ b/release_docs/RELEASE.txt @@ -493,6 +493,21 @@ Bug Fixes since HDF5-1.10.1 release Tools ----- + - h5diff + + h5diff seg faulted if comparing VL strings against fixed strings. + + Reworked solution for HDFFV-8625 and HDFFV-8639. Implemented the check + for string objects of same type in the diff_can_type function by + adding an if(tclass1 == H5T_STRING) block. This if block moves the + same check that was added for attributes to this function, which is + used by all object types. This function also handles complex type + structures. + Also added a new test file in h5diffgenttest for testing this issue + and removed the temporary files used in the test scripts. + + (ADB - 2018/01/04, HDFFV-8745) + - h5repack h5repack failed to copy a dataset with existing filter. diff --git a/tools/lib/h5diff_attr.c b/tools/lib/h5diff_attr.c index 6019738..4e4b40d 100644 --- a/tools/lib/h5diff_attr.c +++ b/tools/lib/h5diff_attr.c @@ -385,28 +385,8 @@ hsize_t diff_attr(hid_t loc1_id, /* get the datatypes */ if((ftype1_id = H5Aget_type(attr1_id)) < 0) HGOTO_ERROR(1, H5E_tools_min_id_g, "H5Aget_type first attribute failed"); - vstrtype1 = H5Tis_variable_str(ftype1_id); if((ftype2_id = H5Aget_type(attr2_id)) < 0) HGOTO_ERROR(1, H5E_tools_min_id_g, "H5Aget_type second attribute failed"); - vstrtype2 = H5Tis_variable_str(ftype2_id); - - /* no compare if either one but not both are variable string type */ - if (vstrtype1 != vstrtype2) { - if((opts->m_verbose || opts->m_list_not_cmp)) - parallel_print("Not comparable: one of attribute <%s/%s> or <%s/%s> is of variable length type\n", - path1, name1, path2, name2); - opts->not_cmp = 1; - if (H5Tclose(ftype1_id) < 0) - HGOTO_ERROR(1, H5E_tools_min_id_g, "H5Tclose first attribute ftype failed"); - if (H5Tclose(ftype2_id) < 0) - HGOTO_ERROR(1, H5E_tools_min_id_g, "H5Tclose second attribute ftype failed"); - if (H5Aclose(attr1_id) < 0) - HGOTO_ERROR(1, H5E_tools_min_id_g, "H5Aclose first attribute failed"); - if (H5Aclose(attr2_id) < 0) - HGOTO_ERROR(1, H5E_tools_min_id_g, "H5Aclose second attribute failed"); - - continue; - } if((mtype1_id = H5Tget_native_type(ftype1_id, H5T_DIR_DEFAULT)) < 0) HGOTO_ERROR(1, H5E_tools_min_id_g, "H5Tget_native_type first attribute ftype failed"); diff --git a/tools/lib/h5diff_dset.c b/tools/lib/h5diff_dset.c index ee42b99..86aa543 100644 --- a/tools/lib/h5diff_dset.c +++ b/tools/lib/h5diff_dset.c @@ -192,7 +192,8 @@ hsize_t diff_datasetid(hid_t did1, hid_t sm_space = -1; /*stripmine data space */ size_t need; /* bytes needed for malloc */ int i; - unsigned int vl_data = 0; /*contains VL datatypes */ + unsigned int vl_data1 = 0; /*contains VL datatypes */ + unsigned int vl_data2 = 0; /*contains VL datatypes */ h5difftrace("diff_datasetid start\n"); /* Get the dataspace handle */ @@ -320,7 +321,9 @@ hsize_t diff_datasetid(hid_t did1, * VLEN memory buffer later */ if(TRUE == h5tools_detect_vlen(m_tid1)) - vl_data = TRUE; + vl_data1 = TRUE; + if(TRUE == h5tools_detect_vlen(m_tid2)) + vl_data2 = TRUE; h5diffdebug2("h5tools_detect_vlen - errstat:%d\n", opts->err_stat); /*------------------------------------------------------------------------ @@ -411,11 +414,12 @@ hsize_t diff_datasetid(hid_t did1, h5diffdebug2("diff_array nfound:%d\n", nfound); /* reclaim any VL memory, if necessary */ - if(vl_data) { - h5difftrace("check vl_data\n"); + h5diffdebug2("check vl_data1:%d\n", vl_data1); + if(vl_data1) H5Dvlen_reclaim(m_tid1, sid1, H5P_DEFAULT, buf1); + h5diffdebug2("check vl_data2:%d\n", vl_data2); + if(vl_data2) H5Dvlen_reclaim(m_tid2, sid2, H5P_DEFAULT, buf2); - } /* end if */ if(buf1 != NULL) { HDfree(buf1); buf1 = NULL; @@ -505,10 +509,10 @@ hsize_t diff_datasetid(hid_t did1, dadims, opts, name1, name2, dam_tid, did1, did2); /* reclaim any VL memory, if necessary */ - if(vl_data) { + if(vl_data1) H5Dvlen_reclaim(m_tid1, sm_space, H5P_DEFAULT, sm_buf1); - H5Dvlen_reclaim(m_tid1, sm_space, H5P_DEFAULT, sm_buf2); - } /* end if */ + if(vl_data2) + H5Dvlen_reclaim(m_tid2, sm_space, H5P_DEFAULT, sm_buf2); /* calculate the next hyperslab offset */ for(i = rank1, carry = 1; i > 0 && carry; --i) { @@ -545,29 +549,29 @@ done: /* free */ if(buf1 != NULL) { /* reclaim any VL memory, if necessary */ - if(vl_data) + if(vl_data1) H5Dvlen_reclaim(m_tid1, sid1, H5P_DEFAULT, buf1); HDfree(buf1); buf1 = NULL; } if(buf2 != NULL) { /* reclaim any VL memory, if necessary */ - if(vl_data) + if(vl_data2) H5Dvlen_reclaim(m_tid2, sid2, H5P_DEFAULT, buf2); HDfree(buf2); buf2 = NULL; } if(sm_buf1 != NULL) { /* reclaim any VL memory, if necessary */ - if(vl_data) + if(vl_data1) H5Dvlen_reclaim(m_tid1, sm_space, H5P_DEFAULT, sm_buf1); HDfree(sm_buf1); sm_buf1 = NULL; } if(sm_buf2 != NULL) { /* reclaim any VL memory, if necessary */ - if(vl_data) - H5Dvlen_reclaim(m_tid1, sm_space, H5P_DEFAULT, sm_buf2); + if(vl_data2) + H5Dvlen_reclaim(m_tid2, sm_space, H5P_DEFAULT, sm_buf2); HDfree(sm_buf2); sm_buf2 = NULL; } @@ -576,6 +580,7 @@ done: H5E_BEGIN_TRY { H5Sclose(sid1); H5Sclose(sid2); + H5Sclose(sm_space); H5Tclose(f_tid1); H5Tclose(f_tid2); H5Tclose(m_tid1); @@ -767,12 +772,31 @@ int diff_can_type(hid_t f_tid1, /* file data type */ } } + if(tclass1 == H5T_STRING) { + hid_t vstrtype1 = -1; + hid_t vstrtype2 = -1; + h5difftrace("diff_can_type end - H5T_STRING\n"); + + vstrtype1 = H5Tis_variable_str(f_tid1); + vstrtype2 = H5Tis_variable_str(f_tid2); + + /* no compare if either one but not both are variable string type */ + if (vstrtype1 != vstrtype2) { + if((opts->m_verbose || opts->m_list_not_cmp)) + parallel_print("Not comparable: <%s> or <%s> is of mixed string type\n", + obj1_name, obj2_name); + opts->not_cmp = 1; + HGOTO_DONE(0); + } + } + if(tclass1 == H5T_COMPOUND) { int nmembs1; int nmembs2; int j; hid_t memb_type1 = -1; hid_t memb_type2 = -1; + h5difftrace("diff_can_type end - H5T_COMPOUND\n"); nmembs1 = H5Tget_nmembers(f_tid1); nmembs2 = H5Tget_nmembers(f_tid2); diff --git a/tools/test/h5diff/CMakeTests.cmake b/tools/test/h5diff/CMakeTests.cmake index bbc39d8..e06f069 100644 --- a/tools/test/h5diff/CMakeTests.cmake +++ b/tools/test/h5diff/CMakeTests.cmake @@ -26,6 +26,7 @@ ${HDF5_TOOLS_TEST_H5DIFF_SOURCE_DIR}/testfiles/h5diff_dtypes.h5 ${HDF5_TOOLS_TEST_H5DIFF_SOURCE_DIR}/testfiles/h5diff_attr1.h5 ${HDF5_TOOLS_TEST_H5DIFF_SOURCE_DIR}/testfiles/h5diff_attr2.h5 + ${HDF5_TOOLS_TEST_H5DIFF_SOURCE_DIR}/testfiles/h5diff_attr3.h5 ${HDF5_TOOLS_TEST_H5DIFF_SOURCE_DIR}/testfiles/h5diff_dset1.h5 ${HDF5_TOOLS_TEST_H5DIFF_SOURCE_DIR}/testfiles/h5diff_dset2.h5 ${HDF5_TOOLS_TEST_H5DIFF_SOURCE_DIR}/testfiles/h5diff_dset3.h5 @@ -63,10 +64,6 @@ ${HDF5_TOOLS_TEST_H5DIFF_SOURCE_DIR}/testfiles/compounds_array_vlen2.h5 ${HDF5_TOOLS_TEST_H5DIFF_SOURCE_DIR}/testfiles/non_comparables1.h5 ${HDF5_TOOLS_TEST_H5DIFF_SOURCE_DIR}/testfiles/non_comparables2.h5 - ${HDF5_TOOLS_TEST_H5DIFF_SOURCE_DIR}/testfiles/tmptest.he5 - ${HDF5_TOOLS_TEST_H5DIFF_SOURCE_DIR}/testfiles/tmptest2.he5 - ${HDF5_TOOLS_TEST_H5DIFF_SOURCE_DIR}/testfiles/tmpSingleSiteBethe.reference.h5 - ${HDF5_TOOLS_TEST_H5DIFF_SOURCE_DIR}/testfiles/tmpSingleSiteBethe.output.h5 ${HDF5_TOOLS_TEST_H5DIFF_SOURCE_DIR}/testfiles/tudfilter.h5 ${HDF5_TOOLS_TEST_H5DIFF_SOURCE_DIR}/testfiles/tudfilter2.h5 ${HDF5_TOOLS_TEST_H5DIFF_SOURCE_DIR}/testfiles/diff_strings1.h5 @@ -293,8 +290,8 @@ ${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_90.txt - ${HDF5_TOOLS_TEST_H5DIFF_SOURCE_DIR}/testfiles/h5diff_tmp1.txt - ${HDF5_TOOLS_TEST_H5DIFF_SOURCE_DIR}/testfiles/h5diff_tmp2.txt + ${HDF5_TOOLS_TEST_H5DIFF_SOURCE_DIR}/testfiles/h5diff_8625.txt + ${HDF5_TOOLS_TEST_H5DIFF_SOURCE_DIR}/testfiles/h5diff_8639.txt ${HDF5_TOOLS_TEST_H5DIFF_SOURCE_DIR}/testfiles/h5diff_ud.txt ${HDF5_TOOLS_TEST_H5DIFF_SOURCE_DIR}/testfiles/h5diff_udfail.txt ${HDF5_TOOLS_TEST_H5DIFF_SOURCE_DIR}/testfiles/h5diff_v1.txt @@ -1021,6 +1018,10 @@ h5diff_800.out.err h5diff_801.out h5diff_801.out.err + h5diff_8625.out + h5diff_8625.out.err + h5diff_8639.out + h5diff_8639.out.err h5diff_90.out h5diff_90.out.err h5diff_v1.out @@ -1281,10 +1282,6 @@ ADD_H5_TEST (h5diff_631 0 -v --use-system-epsilon ${FILE1} ${FILE1} g1/fp18 g1/f # 7. attributes # ############################################################################## ADD_H5_TEST (h5diff_70 1 -v ${FILE5} ${FILE6}) -# temporary test to verify HDF5-8625 -ADD_H5_TEST (h5diff_tmp1 0 tmptest2.he5 tmptest.he5) -# temporary test to verify HDF5-8639 -ADD_H5_TEST (h5diff_tmp2 1 tmpSingleSiteBethe.output.h5 tmpSingleSiteBethe.reference.h5) # ################################################## # attrs with verbose option level @@ -1613,7 +1610,11 @@ ADD_H5_TEST (h5diff_487 1 -v --exclude-path "/group1/dset" h5diff_exclude3-1.h5 # ############################################################################## # # diff various multiple vlen and fixed strings in a compound type dataset # ############################################################################## -ADD_H5_TEST (h5diff_530 0 -v ${COMP_VL_STRS_FILE} ${COMP_VL_STRS_FILE} /group /group_copy) +ADD_H5_TEST (h5diff_530 0 -v ${COMP_VL_STRS_FILE} ${COMP_VL_STRS_FILE} /group /group_copy) +# test to verify HDFFV-8625 +ADD_H5_TEST (h5diff_8625 0 -v --enable-error-stack ${COMP_VL_STRS_FILE} ${COMP_VL_STRS_FILE} /group/Compound_dset1 /group_copy/Compound_dset3) +# test to verify HDFFV-8639 +ADD_H5_TEST (h5diff_8639 0 -v h5diff_attr3.h5 h5diff_attr2.h5 /g1) ADD_H5_TEST (h5diff_vlstr 0 -v tvlstr.h5 tvlstr2.h5) # ############################################################################## diff --git a/tools/test/h5diff/h5diffgentest.c b/tools/test/h5diff/h5diffgentest.c index 459a37e..2e98436 100644 --- a/tools/test/h5diff/h5diffgentest.c +++ b/tools/test/h5diff/h5diffgentest.c @@ -1,15 +1,15 @@ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * -* 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 * + * Copyright by The HDF Group. * + * Copyright by the Board of Trustees of the University of Illinois. * + * All rights reserved. * + * * + * This file is part of HDF5. The full HDF5 copyright notice, including * + * terms governing use, modification, and redistribution, is contained in * * the COPYING file, which can be found at the root of the source code * * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * * If you do not have access to either file, you may request a copy from * * help@hdfgroup.org. * -* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #include #include @@ -29,16 +29,16 @@ size_t H5TOOLS_MALLOCSIZE = (128 * 1024 * 1024); /*------------------------------------------------------------------------- -* Program: h5diffgentest -* -* Purpose: generate files for h5diff testing -* -* Programmer: Pedro Vicente, pvn@ncsa.uiuc.edu -* -* Date: November 12, 2003 -* -*------------------------------------------------------------------------- -*/ + * Program: h5diffgentest + * + * Purpose: generate files for h5diff testing + * + * Programmer: Pedro Vicente, pvn@ncsa.uiuc.edu + * + * Date: November 12, 2003 + * + *------------------------------------------------------------------------- + */ #define FILE1 "h5diff_basic1.h5" #define FILE2 "h5diff_basic2.h5" @@ -46,6 +46,7 @@ size_t H5TOOLS_MALLOCSIZE = (128 * 1024 * 1024); #define FILE4 "h5diff_dtypes.h5" #define FILE5 "h5diff_attr1.h5" #define FILE6 "h5diff_attr2.h5" +#define FILE6a "h5diff_attr3.h5" #define FILE7 "h5diff_dset1.h5" #define FILE8 "h5diff_dset2.h5" #define FILE8A "h5diff_dset3.h5" @@ -110,37 +111,36 @@ size_t H5TOOLS_MALLOCSIZE = (128 * 1024 * 1024); #define SPACE1_DIM2 0 /* A UD link traversal function. Shouldn't actually be called. */ -static hid_t UD_traverse(H5_ATTR_UNUSED const char * link_name, H5_ATTR_UNUSED hid_t cur_group, - H5_ATTR_UNUSED const void * udata, H5_ATTR_UNUSED size_t udata_size, H5_ATTR_UNUSED hid_t lapl_id) -{ +static hid_t UD_traverse(H5_ATTR_UNUSED const char * link_name, + H5_ATTR_UNUSED hid_t cur_group, H5_ATTR_UNUSED const void * udata, + H5_ATTR_UNUSED size_t udata_size, H5_ATTR_UNUSED hid_t lapl_id) { return -1; } -const H5L_class_t UD_link_class[1] = {{ - H5L_LINK_CLASS_T_VERS, /* H5L_class_t version */ - (H5L_type_t)MY_LINKCLASS, /* Link type id number */ - "UD link class", /* name for debugging */ - NULL, /* Creation callback */ - NULL, /* Move/rename callback */ - NULL, /* Copy callback */ - UD_traverse, /* The actual traversal function */ - NULL, /* Deletion callback */ - NULL /* Query callback */ -}}; - +const H5L_class_t UD_link_class[1] = { { + H5L_LINK_CLASS_T_VERS, /* H5L_class_t version */ + (H5L_type_t) MY_LINKCLASS, /* Link type id number */ + "UD link class", /* name for debugging */ + NULL, /* Creation callback */ + NULL, /* Move/rename callback */ + NULL, /* Copy callback */ + UD_traverse, /* The actual traversal function */ + NULL, /* Deletion callback */ + NULL /* Query callback */ +} }; /*------------------------------------------------------------------------- -* prototypes -*------------------------------------------------------------------------- -*/ + * prototypes + *------------------------------------------------------------------------- + */ /* tests called in main() */ static int test_basic(const char *fname1, const char *fname2, const char *fname3); static int test_types(const char *fname); static int test_datatypes(const char *fname); -static int test_attributes(const char *fname,int make_diffs); -static int test_datasets(const char *fname,int make_diffs); -static int test_special_datasets(const char *fname,int make_diffs); -static int test_hyperslab(const char *fname,int make_diffs); +static int test_attributes(const char *fname, int make_diffs); +static int test_datasets(const char *fname, int make_diffs); +static int test_special_datasets(const char *fname, int make_diffs); +static int test_hyperslab(const char *fname, int make_diffs); static int test_link_name(const char *fname1); static int test_soft_links(const char *fname1); static int test_linked_softlinks(const char *fname1); @@ -155,54 +155,60 @@ static int test_exclude_obj3(const char *fname1, const char *fname2); static int test_comp_vlen_strings(const char *fname1, const char *grp_name, int is_file_new); static int test_attributes_verbose_level(const char *fname1, const char *fname2); static int test_enums(const char *fname); -static void test_comps_array (const char *fname, const char *dset, const char *attr,int diff, int is_file_new); -static void test_comps_vlen (const char *fname, const char *dset,const char *attr, int diff, int is_file_new); -static void test_comps_array_vlen (const char *fname, const char *dset, const char *attr, int diff, int is_file_new); -static void test_comps_vlen_arry (const char *fname, const char *dset,const char *attr, int diff, int is_file_new); -static void test_data_nocomparables (const char *fname, int diff); -static void test_objs_nocomparables (const char *fname1, const char *fname2); -static void test_objs_strings (const char *fname, const char *fname2); +static void test_comps_array(const char *fname, const char *dset, + const char *attr, int diff, int is_file_new); +static void test_comps_vlen(const char *fname, const char *dset, + const char *attr, int diff, int is_file_new); +static void test_comps_array_vlen(const char *fname, const char *dset, + const char *attr, int diff, int is_file_new); +static void test_comps_vlen_arry(const char *fname, const char *dset, + const char *attr, int diff, int is_file_new); +static void test_data_nocomparables(const char *fname, int diff); +static void test_objs_nocomparables(const char *fname1, const char *fname2); +static void test_objs_strings(const char *fname, const char *fname2); /* called by test_attributes() and test_datasets() */ -static void write_attr_in(hid_t loc_id,const char* dset_name,hid_t fid,int make_diffs); -static void write_dset_in(hid_t loc_id,const char* dset_name,hid_t fid,int make_diffs); -static void gen_datareg(hid_t fid,int make_diffs); +static void write_attr_strings(hid_t loc_id, const char* dset_name, hid_t fid, int make_diffs); +static void write_attr_in(hid_t loc_id, const char* dset_name, hid_t fid, int make_diffs); +static void write_dset_in(hid_t loc_id, const char* dset_name, hid_t fid, int make_diffs); +static void gen_datareg(hid_t fid, int make_diffs); /* utilities */ -static int write_attr(hid_t loc_id,int rank,hsize_t *dims,const char *name,hid_t tid,void *buf); -static int write_dset(hid_t loc_id,int rank,hsize_t *dims,const char *name,hid_t tid,void *buf); +static int write_attr(hid_t loc_id, int rank, hsize_t *dims, const char *name, hid_t tid, void *buf); +static int write_dset(hid_t loc_id, int rank, hsize_t *dims, const char *name, hid_t tid, void *buf); static int gen_dataset_idx(const char *file, int format); - /*------------------------------------------------------------------------- -* Function: main -* -* Purpose: main program -* -*------------------------------------------------------------------------- -*/ + * Function: main + * + * Purpose: main program + * + *------------------------------------------------------------------------- + */ int main(void) { test_basic(FILE1, FILE2, FILE11); - test_types (FILE3); + test_types(FILE3); test_datatypes(FILE4); /* generate 2 files, the second call creates a similar file with differences */ - test_attributes(FILE5,0); - test_attributes(FILE6,1); + test_attributes(FILE5, 0); + test_attributes(FILE6, 1); + /* generate file with string datatypes swapped */ + test_attributes(FILE6a, 2); /* test attributes with verbose level */ test_attributes_verbose_level(ATTR_VERBOSE_LEVEL_FILE1, ATTR_VERBOSE_LEVEL_FILE2); /* generate 2 files, the second call creates a similar file with differences */ - test_datasets(FILE7,0); - test_datasets(FILE8,1); - test_datasets(FILE8A,2); + test_datasets(FILE7, 0); + test_datasets(FILE8, 1); + test_datasets(FILE8A, 2); /* generate 2 files, the second call creates a similar file with differences */ - test_hyperslab(FILE9,0); - test_hyperslab(FILE10,1); + test_hyperslab(FILE9, 0); + test_hyperslab(FILE10, 1); test_link_name(FILE12); @@ -215,15 +221,15 @@ int main(void) test_ext2soft_links(FILE17, FILE18); /* generate 2 files, the second call creates a similar file with differences */ - test_special_datasets(FILE19,0); - test_special_datasets(FILE20,1); + test_special_datasets(FILE19, 0); + test_special_datasets(FILE20, 1); /* - * Generate 2 files: FILE21 with old format; FILE22 with new format - * Create 2 datasets in each file: - * One dataset: chunked layout, w/o filters, fixed dimension - * One dataset: chunked layout, w/ filters, fixed dimension - */ + * Generate 2 files: FILE21 with old format; FILE22 with new format + * Create 2 datasets in each file: + * One dataset: chunked layout, w/o filters, fixed dimension + * One dataset: chunked layout, w/ filters, fixed dimension + */ gen_dataset_idx(FILE21, 0); gen_dataset_idx(FILE22, 1); @@ -241,34 +247,34 @@ int main(void) test_comp_vlen_strings(COMP_VL_STRS_FILE, "group_copy", 0); /* diff when invalid enum values are present. - * This will probably grow to involve more extensive testing of - * enums so it has been given its own test file and test (apart - * from the basic type testing). - */ + * This will probably grow to involve more extensive testing of + * enums so it has been given its own test file and test (apart + * from the basic type testing). + */ test_enums(ENUM_INVALID_VALUES); /* ------------------------------------------------- - * Create test files with dataset and attribute with container types - * (array, vlen) with multiple nested compound types. - */ + * Create test files with dataset and attribute with container types + * (array, vlen) with multiple nested compound types. + */ /* file1 */ - test_comps_array(COMPS_COMPLEX1,"dset1", "attr1", 0, 1); - test_comps_vlen(COMPS_COMPLEX1,"dset2", "attr2", 0, 0); - test_comps_array_vlen(COMPS_COMPLEX1,"dset3", "attr3", 0, 0); - test_comps_vlen_arry(COMPS_COMPLEX1,"dset4", "attr4", 0, 0); + test_comps_array(COMPS_COMPLEX1, "dset1", "attr1", 0, 1); + test_comps_vlen(COMPS_COMPLEX1, "dset2", "attr2", 0, 0); + test_comps_array_vlen(COMPS_COMPLEX1, "dset3", "attr3", 0, 0); + test_comps_vlen_arry(COMPS_COMPLEX1, "dset4", "attr4", 0, 0); /* file2 */ - test_comps_array(COMPS_COMPLEX2,"dset1", "attr1", 5, 1); - test_comps_vlen(COMPS_COMPLEX2,"dset2", "attr2",5, 0); - test_comps_array_vlen(COMPS_COMPLEX2,"dset3", "attr3", 5, 0); - test_comps_vlen_arry(COMPS_COMPLEX2,"dset4", "attr4", 5, 0); + test_comps_array(COMPS_COMPLEX2, "dset1", "attr1", 5, 1); + test_comps_vlen(COMPS_COMPLEX2, "dset2", "attr2", 5, 0); + test_comps_array_vlen(COMPS_COMPLEX2, "dset3", "attr3", 5, 0); + test_comps_vlen_arry(COMPS_COMPLEX2, "dset4", "attr4", 5, 0); /*------------------------------------------------- - * Create test files with non-comparable dataset and attributes with - * comparable datasets and attributes. All the comparables should display - * differences. - */ - test_data_nocomparables(NON_COMPARBLES1,0); - test_data_nocomparables(NON_COMPARBLES2,5); + * Create test files with non-comparable dataset and attributes with + * comparable datasets and attributes. All the comparables should display + * differences. + */ + test_data_nocomparables(NON_COMPARBLES1, 0); + test_data_nocomparables(NON_COMPARBLES2, 5); /* common objects (same name) with different object types. HDFFV-7644 */ test_objs_nocomparables(NON_COMPARBLES1, NON_COMPARBLES2); @@ -280,28 +286,28 @@ int main(void) } /*------------------------------------------------------------------------- -* Function: test_basic -* -* Purpose: Create basic test files, first two contains different data, the -* third one is just an empty file. -* -*------------------------------------------------------------------------- -*/ + * Function: test_basic + * + * Purpose: Create basic test files, first two contains different data, the + * third one is just an empty file. + * + *------------------------------------------------------------------------- + */ static int test_basic(const char *fname1, const char *fname2, const char *fname3) { - hid_t fid1, fid2; - hid_t gid1, gid2, gid3; + hid_t fid1 = -1, fid2 = -1; + hid_t gid1 = -1, gid2 = -1, gid3 = -1; hsize_t dims1[1] = { 6 }; - hsize_t dims2[2] = { 3,2 }; + hsize_t dims2[2] = { 3, 2 }; /* create the empty file */ - if ((fid1=H5Fcreate(fname3, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0){ + if ((fid1 = H5Fcreate(fname3, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0) { fprintf(stderr, "empty file (%s) creation failed.\n", fname3); goto out; } - if (H5Fclose(fid1) < 0){ + if (H5Fclose(fid1) < 0) { fprintf(stderr, "empty file (%s) close failed.\n", fname3); goto out; } @@ -311,9 +317,9 @@ int test_basic(const char *fname1, const char *fname2, const char *fname3) *------------------------------------------------------------------------- */ - if (( fid1 = H5Fcreate (fname1, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0 ) + if ((fid1 = H5Fcreate(fname1, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0) goto out; - if (( fid2 = H5Fcreate (fname2, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0 ) + if ((fid2 = H5Fcreate(fname2, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0) goto out; /*------------------------------------------------------------------------- @@ -336,16 +342,20 @@ int test_basic(const char *fname1, const char *fname2, const char *fname3) */ { - double data1[3][2] = {{ 1.0F, 1.0F}, { 1.00F, 1.000F}, { 0.0F, 0.0F}}; - double data2[3][2] = {{ 0.0F, 1.1F}, { 1.01F, 1.001F}, { 0.0F, 1.0F}}; - double data3[3][2] = {{100.0F, 100.0F}, {100.00F, 100.000F}, {100.0F, 100.0F}}; - double data4[3][2] = {{105.0F, 120.0F}, {160.00F, 95.000F}, { 80.0F, 40.0F}}; + double data1[3][2] = + { { 1.0F, 1.0F }, { 1.00F, 1.000F }, { 0.0F, 0.0F } }; + double data2[3][2] = + { { 0.0F, 1.1F }, { 1.01F, 1.001F }, { 0.0F, 1.0F } }; + double data3[3][2] = { { 100.0F, 100.0F }, { 100.00F, 100.000F }, { + 100.0F, 100.0F } }; + double data4[3][2] = { { 105.0F, 120.0F }, { 160.00F, 95.000F }, { + 80.0F, 40.0F } }; - write_dset(gid1,2,dims2,"dset1",H5T_NATIVE_DOUBLE,data1); - write_dset(gid2,2,dims2,"dset2",H5T_NATIVE_DOUBLE,data2); - write_dset(gid1,2,dims2,"dset3",H5T_NATIVE_DOUBLE,data3); - write_dset(gid2,2,dims2,"dset4",H5T_NATIVE_DOUBLE,data4); - write_dset(gid2,2,dims2,"dset1",H5T_NATIVE_DOUBLE,data2); + write_dset(gid1, 2, dims2, "dset1", H5T_NATIVE_DOUBLE, data1); + write_dset(gid2, 2, dims2, "dset2", H5T_NATIVE_DOUBLE, data2); + write_dset(gid1, 2, dims2, "dset3", H5T_NATIVE_DOUBLE, data3); + write_dset(gid2, 2, dims2, "dset4", H5T_NATIVE_DOUBLE, data4); + write_dset(gid2, 2, dims2, "dset1", H5T_NATIVE_DOUBLE, data2); } /*------------------------------------------------------------------------- @@ -354,11 +364,11 @@ int test_basic(const char *fname1, const char *fname2, const char *fname3) *------------------------------------------------------------------------- */ { - int data5[3][2] = {{100,100},{100,0},{0,100}}; - int data6[3][2] = {{120,80}, {0,100},{0,50}}; + int data5[3][2] = { { 100, 100 }, { 100, 0 }, { 0, 100 } }; + int data6[3][2] = { { 120, 80 }, { 0, 100 }, { 0, 50 } }; - write_dset(gid1,2,dims2,"dset5",H5T_NATIVE_INT,data5); - write_dset(gid1,2,dims2,"dset6",H5T_NATIVE_INT,data6); + write_dset(gid1, 2, dims2, "dset5", H5T_NATIVE_INT, data5); + write_dset(gid1, 2, dims2, "dset6", H5T_NATIVE_INT, data6); } @@ -368,11 +378,12 @@ int test_basic(const char *fname1, const char *fname2, const char *fname3) *------------------------------------------------------------------------- */ { - unsigned long long data7[3][2] = {{100,100},{100,0},{0,100}}; - unsigned long long data8[3][2] = {{120,80}, {0,100},{0,50}}; + unsigned long long data7[3][2] = + { { 100, 100 }, { 100, 0 }, { 0, 100 } }; + unsigned long long data8[3][2] = { { 120, 80 }, { 0, 100 }, { 0, 50 } }; - write_dset(gid1,2,dims2,"dset7",H5T_NATIVE_ULLONG,data7); - write_dset(gid1,2,dims2,"dset8",H5T_NATIVE_ULLONG,data8); + write_dset(gid1, 2, dims2, "dset7", H5T_NATIVE_ULLONG, data7); + write_dset(gid1, 2, dims2, "dset8", H5T_NATIVE_ULLONG, data8); } @@ -390,45 +401,47 @@ int test_basic(const char *fname1, const char *fname2, const char *fname3) *------------------------------------------------------------------------- */ { - double data9[3][2] = {{100.0F, 100.0F}, {100.0F, 0.0F}, {0.0F, 100.0F}}; - double data10[3][2] ={{120.0F, 80.0F}, { 0.0F, 100.0F}, {0.0F, 50.0F}}; + double data9[3][2] = { { 100.0F, 100.0F }, { 100.0F, 0.0F }, { 0.0F, + 100.0F } }; + double data10[3][2] = { { 120.0F, 80.0F }, { 0.0F, 100.0F }, { 0.0F, + 50.0F } }; - write_dset(gid1,2,dims2,"dset9",H5T_NATIVE_DOUBLE,data9); - write_dset(gid1,2,dims2,"dset10",H5T_NATIVE_DOUBLE,data10); + write_dset(gid1, 2, dims2, "dset9", H5T_NATIVE_DOUBLE, data9); + write_dset(gid1, 2, dims2, "dset10", H5T_NATIVE_DOUBLE, data10); } - /*------------------------------------------------------------------------- * test floating point comparison *------------------------------------------------------------------------- */ { /* epsilon = 0.0000001 = 1e-7 - * system epsilon for float : FLT_EPSILON = 1.19209E-07 - */ - float data11[3][2] ={{0.000000f,0.0000001f},{0.0000001f, 0.00000022f},{0.0000001f,0.0000001f}}; - float data12[3][2] ={{0.000000f,0.0000002f},{0.0000003f,0.0000001f},{0.000000f,0.0000001f}}; + * system epsilon for float : FLT_EPSILON = 1.19209E-07 + */ + float data11[3][2] = { { 0.000000f, 0.0000001f }, { 0.0000001f, + 0.00000022f }, { 0.0000001f, 0.0000001f } }; + float data12[3][2] = { { 0.000000f, 0.0000002f }, { 0.0000003f, + 0.0000001f }, { 0.000000f, 0.0000001f } }; /* epsilon = 0.0000000000000001 = 1e-16 - * system epsilon for double : DBL_EPSILON = 2.22045E-16 - */ - double data13[3][2] ={ - {H5_DOUBLE(0.0000000000000000), H5_DOUBLE(0.0000000000000001)}, - {H5_DOUBLE(0.0000000000000001), H5_DOUBLE(0.0000000000000000)}, - {H5_DOUBLE(0.00000000000000033), H5_DOUBLE(0.0000000000000001)}}; - double data14[3][2] ={ - {H5_DOUBLE(0.0000000000000000), H5_DOUBLE(0.0000000000000004)}, - {H5_DOUBLE(0.0000000000000002), H5_DOUBLE(0.0000000000000001)}, - {H5_DOUBLE(0.0000000000000001), H5_DOUBLE(0.00000000000000000)}}; + * system epsilon for double : DBL_EPSILON = 2.22045E-16 + */ + double data13[3][2] = { { H5_DOUBLE(0.0000000000000000), H5_DOUBLE( + 0.0000000000000001) }, { H5_DOUBLE(0.0000000000000001), + H5_DOUBLE(0.0000000000000000) }, { H5_DOUBLE( + 0.00000000000000033), H5_DOUBLE(0.0000000000000001) } }; + double data14[3][2] = { { H5_DOUBLE(0.0000000000000000), H5_DOUBLE( + 0.0000000000000004) }, { H5_DOUBLE(0.0000000000000002), + H5_DOUBLE(0.0000000000000001) }, { H5_DOUBLE( + 0.0000000000000001), H5_DOUBLE(0.00000000000000000) } }; - write_dset(gid1,2,dims2,"fp1",H5T_NATIVE_FLOAT,data11); - write_dset(gid1,2,dims2,"fp2",H5T_NATIVE_FLOAT,data12); - write_dset(gid1,2,dims2,"d1",H5T_NATIVE_DOUBLE,data13); - write_dset(gid1,2,dims2,"d2",H5T_NATIVE_DOUBLE,data14); + write_dset(gid1, 2, dims2, "fp1", H5T_NATIVE_FLOAT, data11); + write_dset(gid1, 2, dims2, "fp2", H5T_NATIVE_FLOAT, data12); + write_dset(gid1, 2, dims2, "d1", H5T_NATIVE_DOUBLE, data13); + write_dset(gid1, 2, dims2, "d2", H5T_NATIVE_DOUBLE, data14); } - #if H5_SIZEOF_LONG_DOUBLE !=0 { @@ -437,15 +450,13 @@ int test_basic(const char *fname1, const char *fname2, const char *fname3) *------------------------------------------------------------------------- */ - long double data15[3][2] ={{1.0L,1.0L},{1.0L,1.0L},{1.0L,1.0L}}; + long double data15[3][2] = { {1.0L,1.0L}, {1.0L,1.0L}, {1.0L,1.0L}}; write_dset(gid1,2,dims2,"ld",H5T_NATIVE_LDOUBLE,data15); } #endif - - /*------------------------------------------------------------------------- * NaNs in H5T_NATIVE_FLOAT *------------------------------------------------------------------------- @@ -455,22 +466,22 @@ int test_basic(const char *fname1, const char *fname2, const char *fname3) float data15[6]; float data16[6]; - data15[0] = (float)HDsqrt(-1.0F); + data15[0] = (float) HDsqrt(-1.0F); data15[1] = 1.0F; - data15[2] = (float)HDsqrt(-1.0F); + data15[2] = (float) HDsqrt(-1.0F); data15[3] = 1.0F; data15[4] = 1.0F; data15[5] = 1.0F; - data16[0] = (float)HDsqrt(-1.0F); - data16[1] = (float)HDsqrt(-1.0F); + data16[0] = (float) HDsqrt(-1.0F); + data16[1] = (float) HDsqrt(-1.0F); data16[2] = 1.0F; data16[3] = 1.0F; data16[4] = 1.0F; data16[5] = 1.0F; - write_dset(gid1,1,dims1,"fp15",H5T_NATIVE_FLOAT,data15); - write_dset(gid1,1,dims1,"fp16",H5T_NATIVE_FLOAT,data16); + write_dset(gid1, 1, dims1, "fp15", H5T_NATIVE_FLOAT, data15); + write_dset(gid1, 1, dims1, "fp16", H5T_NATIVE_FLOAT, data16); } @@ -497,29 +508,29 @@ int test_basic(const char *fname1, const char *fname2, const char *fname3) data18[4] = 1.0F; data18[5] = 1.0F; - write_dset(gid1,1,dims1,"fp17",H5T_NATIVE_DOUBLE,data17); - write_dset(gid1,1,dims1,"fp18",H5T_NATIVE_DOUBLE,data18); - write_dset(gid1,1,dims1,"fp18_COPY",H5T_NATIVE_DOUBLE,data18); + write_dset(gid1, 1, dims1, "fp17", H5T_NATIVE_DOUBLE, data17); + write_dset(gid1, 1, dims1, "fp18", H5T_NATIVE_DOUBLE, data18); + write_dset(gid1, 1, dims1, "fp18_COPY", H5T_NATIVE_DOUBLE, data18); } /*------------------------------------------------------------------------ - * INFINITY values - *------------------------------------------------------------------------ - */ + * INFINITY values + *------------------------------------------------------------------------ + */ { - float data19[6]; + float data19[6]; double data20[6]; - data19[0] = data19[1] = data19[2] = (float)HDlog(0.0F); - data19[3] = data19[4] = data19[5] = (float)-HDlog(0.0F); + data19[0] = data19[1] = data19[2] = (float) HDlog(0.0F); + data19[3] = data19[4] = data19[5] = (float) -HDlog(0.0F); data20[0] = data20[1] = data20[2] = HDlog(0.0F); data20[3] = data20[4] = data20[5] = -HDlog(0.0F); - write_dset(gid1,1,dims1,"fp19",H5T_NATIVE_FLOAT,data19); - write_dset(gid1,1,dims1,"fp19_COPY",H5T_NATIVE_FLOAT,data19); - write_dset(gid1,1,dims1,"fp20",H5T_NATIVE_DOUBLE,data20); - write_dset(gid1,1,dims1,"fp20_COPY",H5T_NATIVE_DOUBLE,data20); + write_dset(gid1, 1, dims1, "fp19", H5T_NATIVE_FLOAT, data19); + write_dset(gid1, 1, dims1, "fp19_COPY", H5T_NATIVE_FLOAT, data19); + write_dset(gid1, 1, dims1, "fp20", H5T_NATIVE_DOUBLE, data20); + write_dset(gid1, 1, dims1, "fp20_COPY", H5T_NATIVE_DOUBLE, data20); } /*------------------------------------------------------------------------- @@ -527,105 +538,97 @@ int test_basic(const char *fname1, const char *fname2, const char *fname3) *------------------------------------------------------------------------- */ { - typedef struct cmp1_t - { + typedef struct cmp1_t { double d; - float f; + float f; } cmp1_t; - cmp1_t buf1[2]; - cmp1_t buf2[2]; - hsize_t dims[1] = {2}; - size_t type_size; - hid_t tid; + cmp1_t buf1[2]; + cmp1_t buf2[2]; + hsize_t dims[1] = { 2 }; + size_t type_size; + hid_t tid; buf1[0].d = HDsqrt(-1.0F); - buf1[0].f = (float)HDsqrt(-1.0F); + buf1[0].f = (float) HDsqrt(-1.0F); buf2[0].d = HDsqrt(-1.0F); - buf2[0].f = (float)HDsqrt(-1.0F); + buf2[0].f = (float) HDsqrt(-1.0F); buf1[1].d = HDsqrt(-1.0F); - buf1[1].f = (float)HDsqrt(-1.0F); + buf1[1].f = (float) HDsqrt(-1.0F); buf2[1].d = 0.0F; buf2[1].f = 0.0F; - type_size = sizeof( cmp1_t ); - tid = H5Tcreate (H5T_COMPOUND, type_size ); - H5Tinsert(tid, "d", HOFFSET( cmp1_t, d ), H5T_NATIVE_DOUBLE ); - H5Tinsert(tid, "f", HOFFSET( cmp1_t, f ), H5T_NATIVE_FLOAT ); - write_dset(gid1,1,dims,"dset11",tid,buf1); - write_dset(gid1,1,dims,"dset12",tid,buf2); + type_size = sizeof(cmp1_t); + tid = H5Tcreate(H5T_COMPOUND, type_size); + H5Tinsert(tid, "d", HOFFSET(cmp1_t, d), H5T_NATIVE_DOUBLE); + H5Tinsert(tid, "f", HOFFSET(cmp1_t, f), H5T_NATIVE_FLOAT); + write_dset(gid1, 1, dims, "dset11", tid, buf1); + write_dset(gid1, 1, dims, "dset12", tid, buf2); H5Tclose(tid); - } /* not comparable objects */ { - typedef struct cmp1_t - { + typedef struct cmp1_t { double d; - int i; + int i; } cmp1_t; - typedef struct cmp2_t - { - int i; + typedef struct cmp2_t { + int i; double d; } cmp2_t; - typedef struct cmp3_t - { + typedef struct cmp3_t { int i; } cmp3_t; - double data2[6] = {0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F}; - int data3[6] = {0,0,0,0,0,0}; - int data4[3][2] = {{0,0},{0,0},{0,0}}; - int data5[2][2] = {{0,0},{0,0}}; - unsigned int data6[3][2] = {{0,0},{0,0},{0,0}}; - cmp1_t data7[1] = {{1.0f, 2}}; - cmp2_t data8[1] = {{1, 2.0f}}; - hsize_t dims3[2] = {2, 2}; - hsize_t dims4[1] = {1}; - size_t type_size; - hid_t tid; - - - - write_dset(gid3,1,dims1,"dset1",H5T_NATIVE_DOUBLE,NULL); - write_dset(gid3,1,dims1,"dset2",H5T_NATIVE_DOUBLE,data2); - write_dset(gid3,1,dims1,"dset3",H5T_NATIVE_INT,data3); - write_dset(gid3,2,dims2,"dset4",H5T_NATIVE_INT,data4); - write_dset(gid3,2,dims3,"dset5",H5T_NATIVE_INT,data5); - write_dset(gid3,2,dims2,"dset6",H5T_NATIVE_UINT,data6); + double data2[6] = { 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F }; + int data3[6] = { 0, 0, 0, 0, 0, 0 }; + int data4[3][2] = { { 0, 0 }, { 0, 0 }, { 0, 0 } }; + int data5[2][2] = { { 0, 0 }, { 0, 0 } }; + unsigned int data6[3][2] = { { 0, 0 }, { 0, 0 }, { 0, 0 } }; + cmp1_t data7[1] = { { 1.0f, 2 } }; + cmp2_t data8[1] = { { 1, 2.0f } }; + hsize_t dims3[2] = { 2, 2 }; + hsize_t dims4[1] = { 1 }; + size_t type_size; + hid_t tid; + + write_dset(gid3, 1, dims1, "dset1", H5T_NATIVE_DOUBLE, NULL); + write_dset(gid3, 1, dims1, "dset2", H5T_NATIVE_DOUBLE, data2); + write_dset(gid3, 1, dims1, "dset3", H5T_NATIVE_INT, data3); + write_dset(gid3, 2, dims2, "dset4", H5T_NATIVE_INT, data4); + write_dset(gid3, 2, dims3, "dset5", H5T_NATIVE_INT, data5); + write_dset(gid3, 2, dims2, "dset6", H5T_NATIVE_UINT, data6); /* case of compound with different type members */ - type_size = sizeof( cmp1_t ); - tid = H5Tcreate (H5T_COMPOUND, type_size ); - H5Tinsert(tid, "d", HOFFSET( cmp1_t, d ), H5T_NATIVE_DOUBLE ); - H5Tinsert(tid, "i", HOFFSET( cmp1_t, i ), H5T_NATIVE_INT ); - write_dset(gid3,1,dims4,"dset7",tid,data7); + type_size = sizeof(cmp1_t); + tid = H5Tcreate(H5T_COMPOUND, type_size); + H5Tinsert(tid, "d", HOFFSET(cmp1_t, d), H5T_NATIVE_DOUBLE); + H5Tinsert(tid, "i", HOFFSET(cmp1_t, i), H5T_NATIVE_INT); + write_dset(gid3, 1, dims4, "dset7", tid, data7); H5Tclose(tid); - type_size = sizeof( cmp2_t ); - tid = H5Tcreate (H5T_COMPOUND, type_size ); - H5Tinsert(tid, "i", HOFFSET( cmp2_t, i ), H5T_NATIVE_INT ); - H5Tinsert(tid, "d", HOFFSET( cmp2_t, d ), H5T_NATIVE_DOUBLE ); - write_dset(gid3,1,dims4,"dset8",tid,data8); + type_size = sizeof(cmp2_t); + tid = H5Tcreate(H5T_COMPOUND, type_size); + H5Tinsert(tid, "i", HOFFSET(cmp2_t, i), H5T_NATIVE_INT); + H5Tinsert(tid, "d", HOFFSET(cmp2_t, d), H5T_NATIVE_DOUBLE); + write_dset(gid3, 1, dims4, "dset8", tid, data8); H5Tclose(tid); /* case of compound with different number of members */ - type_size = sizeof( cmp3_t ); - tid = H5Tcreate (H5T_COMPOUND, type_size ); - H5Tinsert(tid, "i", HOFFSET( cmp2_t, i ), H5T_NATIVE_INT ); - write_dset(gid3,1,dims4,"dset9",tid,NULL); + type_size = sizeof(cmp3_t); + tid = H5Tcreate(H5T_COMPOUND, type_size); + H5Tinsert(tid, "i", HOFFSET(cmp2_t, i), H5T_NATIVE_INT); + write_dset(gid3, 1, dims4, "dset9", tid, NULL); H5Tclose(tid); } - /*------------------------------------------------------------------------- * close *------------------------------------------------------------------------- @@ -642,46 +645,43 @@ out: return FAIL; } - /*------------------------------------------------------------------------- -* Function: test_types -* -* Purpose: Compare different HDF5 object & link types: -* H5G_DATASET, H5G_TYPE, H5G_GROUP, H5G_LINK, H5G_UDLINK -* -*------------------------------------------------------------------------- -*/ + * Function: test_types + * + * Purpose: Compare different HDF5 object & link types: + * H5G_DATASET, H5G_TYPE, H5G_GROUP, H5G_LINK, H5G_UDLINK + * + *------------------------------------------------------------------------- + */ static int test_types(const char *fname) { - hid_t fid1; - hid_t gid1; - hid_t gid2; - hid_t tid1; - hid_t tid2; - herr_t status; - hsize_t dims[1]={1}; - typedef struct s1_t - { - int a; - float b; + hid_t fid1 = -1; + hid_t gid1 = -1; + hid_t gid2 = -1; + hid_t tid1 = -1; + hid_t tid2 = -1; + herr_t status; + hsize_t dims[1] = { 1 }; + typedef struct s1_t { + int a; + float b; } s1_t; - typedef struct s2_t - { - int a; + typedef struct s2_t { + int a; } s2_t; /*------------------------------------------------------------------------- * Create one file *------------------------------------------------------------------------- */ - fid1 = H5Fcreate (fname, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT); + fid1 = H5Fcreate(fname, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT); /*------------------------------------------------------------------------- * H5G_DATASET *------------------------------------------------------------------------- */ - write_dset(fid1,1,dims,"dset",H5T_NATIVE_INT,0); + write_dset(fid1, 1, dims, "dset", H5T_NATIVE_INT, 0); /*------------------------------------------------------------------------- * H5G_GROUP @@ -723,7 +723,7 @@ int test_types(const char *fname) */ H5Lcreate_external("filename", "objname", fid1, "ext_link", H5P_DEFAULT, H5P_DEFAULT); H5Lregister(UD_link_class); - H5Lcreate_ud(fid1, "ud_link", (H5L_type_t)MY_LINKCLASS, NULL, (size_t)0, H5P_DEFAULT, H5P_DEFAULT); + H5Lcreate_ud(fid1, "ud_link", (H5L_type_t) MY_LINKCLASS, NULL, (size_t) 0, H5P_DEFAULT, H5P_DEFAULT); /*------------------------------------------------------------------------- * Close @@ -733,195 +733,192 @@ int test_types(const char *fname) return status; } - /* -# ############################################################################## -# # not comparable types -# ############################################################################## + # ############################################################################## + # # not comparable types + # ############################################################################## -# 2.0 -TOOLTEST h5diff_20.txt file3.h5 file3.h5 -v dset g1 + # 2.0 + TOOLTEST h5diff_20.txt file3.h5 file3.h5 -v dset g1 -# 2.1 -TOOLTEST h5diff_21.txt file3.h5 file3.h5 -v dset l1 + # 2.1 + TOOLTEST h5diff_21.txt file3.h5 file3.h5 -v dset l1 -# 2.2 -TOOLTEST h5diff_22.txt file3.h5 file3.h5 -v dset t1 + # 2.2 + TOOLTEST h5diff_22.txt file3.h5 file3.h5 -v dset t1 -# ############################################################################## -# # compare groups, types, links (no differences and differences) -# ############################################################################## + # ############################################################################## + # # compare groups, types, links (no differences and differences) + # ############################################################################## -# 2.3 -TOOLTEST h5diff_23.txt file3.h5 file3.h5 -v g1 g1 + # 2.3 + TOOLTEST h5diff_23.txt file3.h5 file3.h5 -v g1 g1 -# 2.4 -TOOLTEST h5diff_24.txt file3.h5 file3.h5 -v t1 t1 + # 2.4 + TOOLTEST h5diff_24.txt file3.h5 file3.h5 -v t1 t1 -# 2.5 -TOOLTEST h5diff_25.txt file3.h5 file3.h5 -v l1 l1 + # 2.5 + TOOLTEST h5diff_25.txt file3.h5 file3.h5 -v l1 l1 -# 2.6 -TOOLTEST h5diff_26.txt file3.h5 file3.h5 -v g1 g2 + # 2.6 + TOOLTEST h5diff_26.txt file3.h5 file3.h5 -v g1 g2 -# 2.7 -TOOLTEST h5diff_27.txt file3.h5 file3.h5 -v t1 t2 + # 2.7 + TOOLTEST h5diff_27.txt file3.h5 file3.h5 -v t1 t2 -# 2.8 -TOOLTEST h5diff_28.txt file3.h5 file3.h5 -v l1 l2 -*/ + # 2.8 + TOOLTEST h5diff_28.txt file3.h5 file3.h5 -v l1 l2 + */ /*------------------------------------------------------------------------- -* Function: test_datatypes -* -* Purpose: test dataset datatypes -* -*------------------------------------------------------------------------- -*/ + * Function: test_datatypes + * + * Purpose: test dataset datatypes + * + *------------------------------------------------------------------------- + */ static int test_datatypes(const char *fname) { - - hid_t fid1; - hid_t dset; - hsize_t dims[2]={3,2}; - herr_t status; - char buf1a[3][2] = {{1,1},{1,1},{1,1}}; - char buf1b[3][2] = {{1,1},{3,4},{5,6}}; - short buf2a[3][2] = {{1,1},{1,1},{1,1}}; - short buf2b[3][2] = {{1,1},{3,4},{5,6}}; - int buf3a[3][2] = {{1,1},{1,1},{1,1}}; - int buf3b[3][2] = {{1,1},{3,4},{5,6}}; - long buf4a[3][2] = {{1,1},{1,1},{1,1}}; - long buf4b[3][2] = {{1,1},{3,4},{5,6}}; - float buf5a[3][2] = {{1.0F, 1.0F}, {1.0F, 1.0F}, {1.0F, 1.0F}}; - float buf5b[3][2] = {{1.0F, 1.0F}, {3.0F, 4.0F}, {5.0F, 6.0F}}; - double buf6a[3][2] = {{1.0F, 1.0F}, {1.0F, 1.0F}, {1.0F, 1.0F}}; - double buf6b[3][2] = {{1.0F, 1.0F}, {3.0F, 4.0F}, {5.0F, 6.0F}}; + hid_t fid1 = -1; + hid_t dset = -1; + hsize_t dims[2] = { 3, 2 }; + herr_t status; + char buf1a[3][2] = { { 1, 1 }, { 1, 1 }, { 1, 1 } }; + char buf1b[3][2] = { { 1, 1 }, { 3, 4 }, { 5, 6 } }; + short buf2a[3][2] = { { 1, 1 }, { 1, 1 }, { 1, 1 } }; + short buf2b[3][2] = { { 1, 1 }, { 3, 4 }, { 5, 6 } }; + int buf3a[3][2] = { { 1, 1 }, { 1, 1 }, { 1, 1 } }; + int buf3b[3][2] = { { 1, 1 }, { 3, 4 }, { 5, 6 } }; + long buf4a[3][2] = { { 1, 1 }, { 1, 1 }, { 1, 1 } }; + long buf4b[3][2] = { { 1, 1 }, { 3, 4 }, { 5, 6 } }; + float buf5a[3][2] = { { 1.0F, 1.0F }, { 1.0F, 1.0F }, { 1.0F, 1.0F } }; + float buf5b[3][2] = { { 1.0F, 1.0F }, { 3.0F, 4.0F }, { 5.0F, 6.0F } }; + double buf6a[3][2] = { { 1.0F, 1.0F }, { 1.0F, 1.0F }, { 1.0F, 1.0F } }; + double buf6b[3][2] = { { 1.0F, 1.0F }, { 3.0F, 4.0F }, { 5.0F, 6.0F } }; /*unsigned/signed test signed char -128 to 127 unsigned char 0 to 255 */ - char buf7a[3][2] = {{-1,-128},{-1,-1},{-1,-1}}; - unsigned char buf7b[3][2] = {{1,128},{1,1},{1,1}}; + char buf7a[3][2] = { { -1, -128 }, { -1, -1 }, { -1, -1 } }; + unsigned char buf7b[3][2] = { { 1, 128 }, { 1, 1 }, { 1, 1 } }; /* long long test */ - long long buf8a[3][2] = {{1,1},{1,1},{1,1}}; - long long buf8b[3][2] = {{1,1},{3,4},{5,6}}; - unsigned long long buf9a[3][2] = {{1,1},{1,1},{1,1}}; - unsigned long long buf9b[3][2] = {{1,1},{3,4},{5,6}}; + long long buf8a[3][2] = { { 1, 1 }, { 1, 1 }, { 1, 1 } }; + long long buf8b[3][2] = { { 1, 1 }, { 3, 4 }, { 5, 6 } }; + unsigned long long buf9a[3][2] = { { 1, 1 }, { 1, 1 }, { 1, 1 } }; + unsigned long long buf9b[3][2] = { { 1, 1 }, { 3, 4 }, { 5, 6 } }; - unsigned int buf10a[3][2] = {{UIMAX,1},{1,1},{1,1}}; - unsigned int buf10b[3][2] = {{UIMAX-1,1},{3,4},{5,6}}; - - unsigned short buf11a[3][2] = {{204,205},{2,3},{1,1}}; - unsigned int buf11b[3][2] = {{204,205},{2,3},{1,1}}; + unsigned int buf10a[3][2] = { { UIMAX, 1 }, { 1, 1 }, { 1, 1 } }; + unsigned int buf10b[3][2] = { { UIMAX - 1, 1 }, { 3, 4 }, { 5, 6 } }; + unsigned short buf11a[3][2] = { { 204, 205 }, { 2, 3 }, { 1, 1 } }; + unsigned int buf11b[3][2] = { { 204, 205 }, { 2, 3 }, { 1, 1 } }; /*------------------------------------------------------------------------- * Create a file *------------------------------------------------------------------------- */ - fid1 = H5Fcreate (fname, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT); + fid1 = H5Fcreate(fname, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT); /*------------------------------------------------------------------------- * Check for different storage order. Give a warning if they are different *------------------------------------------------------------------------- */ - write_dset(fid1,2,dims,"dset0a",H5T_STD_I16LE,buf2a); - write_dset(fid1,2,dims,"dset0b",H5T_STD_I32LE,buf3b); + write_dset(fid1, 2, dims, "dset0a", H5T_STD_I16LE, buf2a); + write_dset(fid1, 2, dims, "dset0b", H5T_STD_I32LE, buf3b); /*------------------------------------------------------------------------- * H5T_NATIVE_CHAR *------------------------------------------------------------------------- */ - write_dset(fid1,2,dims,"dset1a",H5T_NATIVE_CHAR,buf1a); - write_dset(fid1,2,dims,"dset1b",H5T_NATIVE_CHAR,buf1b); + write_dset(fid1, 2, dims, "dset1a", H5T_NATIVE_CHAR, buf1a); + write_dset(fid1, 2, dims, "dset1b", H5T_NATIVE_CHAR, buf1b); /*------------------------------------------------------------------------- * H5T_NATIVE_SHORT *------------------------------------------------------------------------- */ - write_dset(fid1,2,dims,"dset2a",H5T_NATIVE_SHORT,buf2a); - write_dset(fid1,2,dims,"dset2b",H5T_NATIVE_SHORT,buf2b); + write_dset(fid1, 2, dims, "dset2a", H5T_NATIVE_SHORT, buf2a); + write_dset(fid1, 2, dims, "dset2b", H5T_NATIVE_SHORT, buf2b); /*------------------------------------------------------------------------- * H5T_NATIVE_INT *------------------------------------------------------------------------- */ - write_dset(fid1,2,dims,"dset3a",H5T_NATIVE_INT,buf3a); - write_dset(fid1,2,dims,"dset3b",H5T_NATIVE_INT,buf3b); + write_dset(fid1, 2, dims, "dset3a", H5T_NATIVE_INT, buf3a); + write_dset(fid1, 2, dims, "dset3b", H5T_NATIVE_INT, buf3b); /*------------------------------------------------------------------------- * H5T_NATIVE_LONG *------------------------------------------------------------------------- */ - write_dset(fid1,2,dims,"dset4a",H5T_NATIVE_LONG,buf4a); - write_dset(fid1,2,dims,"dset4b",H5T_NATIVE_LONG,buf4b); + write_dset(fid1, 2, dims, "dset4a", H5T_NATIVE_LONG, buf4a); + write_dset(fid1, 2, dims, "dset4b", H5T_NATIVE_LONG, buf4b); /*------------------------------------------------------------------------- * H5T_NATIVE_FLOAT *------------------------------------------------------------------------- */ - write_dset(fid1,2,dims,"dset5a",H5T_NATIVE_FLOAT,buf5a); - write_dset(fid1,2,dims,"dset5b",H5T_NATIVE_FLOAT,buf5b); + write_dset(fid1, 2, dims, "dset5a", H5T_NATIVE_FLOAT, buf5a); + write_dset(fid1, 2, dims, "dset5b", H5T_NATIVE_FLOAT, buf5b); /*------------------------------------------------------------------------- * H5T_NATIVE_DOUBLE *------------------------------------------------------------------------- */ - write_dset(fid1,2,dims,"dset6a",H5T_NATIVE_DOUBLE,buf6a); - write_dset(fid1,2,dims,"dset6b",H5T_NATIVE_DOUBLE,buf6b); + write_dset(fid1, 2, dims, "dset6a", H5T_NATIVE_DOUBLE, buf6a); + write_dset(fid1, 2, dims, "dset6b", H5T_NATIVE_DOUBLE, buf6b); /*------------------------------------------------------------------------- * H5T_NATIVE_CHAR and H5T_NATIVE_UCHAR *------------------------------------------------------------------------- */ - write_dset(fid1,2,dims,"dset7a",H5T_NATIVE_CHAR,buf7a); - write_dset(fid1,2,dims,"dset7b",H5T_NATIVE_UCHAR,buf7b); + write_dset(fid1, 2, dims, "dset7a", H5T_NATIVE_CHAR, buf7a); + write_dset(fid1, 2, dims, "dset7b", H5T_NATIVE_UCHAR, buf7b); /*------------------------------------------------------------------------- * H5T_NATIVE_LLONG *------------------------------------------------------------------------- */ - write_dset(fid1,2,dims,"dset8a",H5T_NATIVE_LLONG,buf8a); - write_dset(fid1,2,dims,"dset8b",H5T_NATIVE_LLONG,buf8b); + write_dset(fid1, 2, dims, "dset8a", H5T_NATIVE_LLONG, buf8a); + write_dset(fid1, 2, dims, "dset8b", H5T_NATIVE_LLONG, buf8b); /*------------------------------------------------------------------------- * H5T_NATIVE_ULLONG *------------------------------------------------------------------------- */ - write_dset(fid1,2,dims,"dset9a",H5T_NATIVE_ULLONG,buf9a); - write_dset(fid1,2,dims,"dset9b",H5T_NATIVE_ULLONG,buf9b); + write_dset(fid1, 2, dims, "dset9a", H5T_NATIVE_ULLONG, buf9a); + write_dset(fid1, 2, dims, "dset9b", H5T_NATIVE_ULLONG, buf9b); /*------------------------------------------------------------------------- * H5T_NATIVE_INT *------------------------------------------------------------------------- */ - write_dset(fid1,2,dims,"dset10a",H5T_NATIVE_UINT,buf10a); - write_dset(fid1,2,dims,"dset10b",H5T_NATIVE_UINT,buf10b); + write_dset(fid1, 2, dims, "dset10a", H5T_NATIVE_UINT, buf10a); + write_dset(fid1, 2, dims, "dset10b", H5T_NATIVE_UINT, buf10b); /*------------------------------------------------------------------------- * Same type class, different size *------------------------------------------------------------------------- */ - write_dset(fid1,2,dims,"dset11a",H5T_STD_U16LE,buf11a); - dset=H5Dopen2 (fid1, "dset11a", H5P_DEFAULT); - write_attr(dset,2,dims,"attr",H5T_STD_U16LE,buf11a); - H5Dclose (dset); + write_dset(fid1, 2, dims, "dset11a", H5T_STD_U16LE, buf11a); + dset = H5Dopen2(fid1, "dset11a", H5P_DEFAULT); + write_attr(dset, 2, dims, "attr", H5T_STD_U16LE, buf11a); + H5Dclose(dset); - write_dset(fid1,2,dims,"dset11b",H5T_STD_U32LE,buf11b); - dset=H5Dopen2 (fid1, "dset11b", H5P_DEFAULT); - write_attr(dset,2,dims,"attr",H5T_STD_U32LE,buf11b); - H5Dclose (dset); + write_dset(fid1, 2, dims, "dset11b", H5T_STD_U32LE, buf11b); + dset = H5Dopen2(fid1, "dset11b", H5P_DEFAULT); + write_attr(dset, 2, dims, "attr", H5T_STD_U32LE, buf11b); + H5Dclose(dset); /*------------------------------------------------------------------------- * Close @@ -932,59 +929,58 @@ int test_datatypes(const char *fname) } /* -# ############################################################################## -# # Dataset datatypes -# ############################################################################## + # ############################################################################## + # # Dataset datatypes + # ############################################################################## -# 5.0 -TOOLTEST h5diff_50.txt file4.h5 file4.h5 -v dset0a dset0b + # 5.0 + TOOLTEST h5diff_50.txt file4.h5 file4.h5 -v dset0a dset0b -# 5.1 -TOOLTEST h5diff_51.txt file4.h5 file4.h5 -v dset1a dset1b + # 5.1 + TOOLTEST h5diff_51.txt file4.h5 file4.h5 -v dset1a dset1b -# 5.2 -TOOLTEST h5diff_52.txt file4.h5 file4.h5 -v dset2a dset2b + # 5.2 + TOOLTEST h5diff_52.txt file4.h5 file4.h5 -v dset2a dset2b -# 5.3 -TOOLTEST h5diff_53.txt file4.h5 file4.h5 -v dset3a dset4b + # 5.3 + TOOLTEST h5diff_53.txt file4.h5 file4.h5 -v dset3a dset4b -# 5.4 -TOOLTEST h5diff_54.txt file4.h5 file4.h5 -v dset4a dset4b + # 5.4 + TOOLTEST h5diff_54.txt file4.h5 file4.h5 -v dset4a dset4b -# 5.5 -TOOLTEST h5diff_55.txt file4.h5 file4.h5 -v dset5a dset5b + # 5.5 + TOOLTEST h5diff_55.txt file4.h5 file4.h5 -v dset5a dset5b -# 5.6 -TOOLTEST h5diff_56.txt file4.h5 file4.h5 -v dset6a dset6b + # 5.6 + TOOLTEST h5diff_56.txt file4.h5 file4.h5 -v dset6a dset6b -# 5.7 -TOOLTEST h5diff_57.txt file4.h5 file4.h5 -v dset7a dset7b + # 5.7 + TOOLTEST h5diff_57.txt file4.h5 file4.h5 -v dset7a dset7b -# 5.8 (region reference) -TOOLTEST h5diff_58.txt file7.h5 file8.h5 -v refreg -*/ + # 5.8 (region reference) + TOOLTEST h5diff_58.txt file7.h5 file8.h5 -v refreg + */ /*------------------------------------------------------------------------- -* Function: test_attributes -* -* Purpose: test attributes -* -*------------------------------------------------------------------------- -*/ + * Function: test_attributes + * + * Purpose: test attributes + * + *------------------------------------------------------------------------- + */ static -int test_attributes(const char *file, - int make_diffs /* flag to modify data buffers */) +int test_attributes(const char *file, int make_diffs /* flag to modify data buffers */) { - hid_t fid; - hid_t did; - hid_t gid; - hid_t root_id; - hid_t sid; - hsize_t dims[1]={2}; - herr_t status; + hid_t fid = -1; + hid_t did = -1; + hid_t gid = -1; + hid_t root_id = -1; + hid_t sid = -1; + hsize_t dims[1] = { 2 }; + herr_t status; /* Create a file */ - if((fid = H5Fcreate(file, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0) + if ((fid = H5Fcreate(file, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0) return -1; /* Create a 1D dataset */ @@ -994,18 +990,23 @@ int test_attributes(const char *file, assert(status >= 0); /* Create groups */ - gid = H5Gcreate2(fid, "g1", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); - root_id = H5Gopen2(fid, "/", H5P_DEFAULT); + gid = H5Gcreate2(fid, "g1", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); + root_id = H5Gopen2(fid, "/", H5P_DEFAULT); /*------------------------------------------------------------------------- * write a series of attributes on the dataset, group, and root group *------------------------------------------------------------------------- */ - - write_attr_in(did,"dset",fid,make_diffs); - write_attr_in(gid,NULL,(hid_t)0,make_diffs); - write_attr_in(root_id,NULL,(hid_t)0,make_diffs); - + if (make_diffs > 1) { + write_attr_strings(did, "dset", fid, make_diffs); + write_attr_strings(gid, NULL, (hid_t) 0, make_diffs); + write_attr_strings(root_id, NULL, (hid_t) 0, make_diffs); + } + else { + write_attr_in(did, "dset", fid, make_diffs); + write_attr_in(gid, NULL, (hid_t) 0, make_diffs); + write_attr_in(root_id, NULL, (hid_t) 0, make_diffs); + } /* Close */ status = H5Dclose(did); @@ -1021,338 +1022,313 @@ int test_attributes(const char *file, return status; } - /*------------------------------------------------------------------------- -* Function: test_attributes_verbose_level -* -* Purpose: Cresting test files for testing attributes along with -* levels of verbos option -* -*------------------------------------------------------------------------- -*/ + * Function: test_attributes_verbose_level + * + * Purpose: Cresting test files for testing attributes along with + * levels of verbos option + * + *------------------------------------------------------------------------- + */ static int test_attributes_verbose_level(const char *fname1, const char *fname2) { - herr_t status = SUCCEED; - hid_t fid1 = -1, fid2 = -1; - hid_t f1_gid = -1, f2_gid = -1; - hid_t f1_gid2 = -1, f2_gid2 = -1; - hid_t f1_gid3 = -1, f2_gid3 = -1; - hid_t f1_gid4 = -1, f2_gid4 = -1; - hid_t f1_did = -1, f2_did = -1; - hid_t f1_sid = -1, f2_sid = -1; - hid_t f1_tid = -1, f2_tid = -1; + herr_t status = SUCCEED; + hid_t fid1 = -1, fid2 = -1; + hid_t f1_gid = -1, f2_gid = -1; + hid_t f1_gid2 = -1, f2_gid2 = -1; + hid_t f1_gid3 = -1, f2_gid3 = -1; + hid_t f1_gid4 = -1, f2_gid4 = -1; + hid_t f1_did = -1, f2_did = -1; + hid_t f1_sid = -1, f2_sid = -1; + hid_t f1_tid = -1, f2_tid = -1; /* dset */ - hsize_t dset_dims[1]={3}; - int dset_data[3] = {0,1,2}; + hsize_t dset_dims[1] = { 3 }; + int dset_data[3] = { 0, 1, 2 }; /* common attrs dim */ - hsize_t attr_dims[1]={2}; + hsize_t attr_dims[1] = { 2 }; /* file1 attr */ - int f1_attr_idata[2]= {1,2}; /* integer */ - float f1_attr_fdata[2]= {1.1F,2.2F}; /* float */ + int f1_attr_idata[2] = { 1, 2 }; /* integer */ + float f1_attr_fdata[2] = { 1.1F, 2.2F }; /* float */ /* file2 attr */ - int f2_attr_idata[2]= {2,3}; /* integer */ - float f2_attr_fdata[2]= {2.1F,3.2F}; /* float */ - + int f2_attr_idata[2] = { 2, 3 }; /* integer */ + float f2_attr_fdata[2] = { 2.1F, 3.2F }; /* float */ /*---------------------------------------------------------------------- * Create file1 *-----------------------------------------------------------------------*/ - if((fid1 = H5Fcreate(fname1, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0) - { + if ((fid1 = H5Fcreate(fname1, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0) { fprintf(stderr, "Error: %s> H5Fcreate failed.\n", fname1); status = FAIL; goto out; } - /*---------------------------------- + /*---------------------------------- * Groups */ f1_gid = H5Gcreate2(fid1, "g", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); - if (f1_gid < 0) - { + if (f1_gid < 0) { fprintf(stderr, "Error: %s> H5Gcreate2 failed.\n", fname1); status = FAIL; goto out; } f1_gid2 = H5Gcreate2(fid1, "g2", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); - if (f1_gid2 < 0) - { + if (f1_gid2 < 0) { fprintf(stderr, "Error: %s> H5Gcreate2 failed.\n", fname1); status = FAIL; goto out; } f1_gid3 = H5Gcreate2(fid1, "g3", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); - if (f1_gid3 < 0) - { + if (f1_gid3 < 0) { fprintf(stderr, "Error: %s> H5Gcreate2 failed.\n", fname1); status = FAIL; goto out; } f1_gid4 = H5Gcreate2(fid1, "g4", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); - if (f1_gid4 < 0) - { + if (f1_gid4 < 0) { fprintf(stderr, "Error: %s> H5Gcreate2 failed.\n", fname2); status = FAIL; goto out; } - /*---------------------------------- + /*---------------------------------- * Datasets */ f1_sid = H5Screate_simple(1, dset_dims, NULL); f1_did = H5Dcreate2(fid1, "dset", H5T_NATIVE_INT, f1_sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); - if (f1_did == FAIL) - { + if (f1_did == FAIL) { fprintf(stderr, "Error: %s> write_dset failed\n", fname1); status = FAIL; goto out; } status = H5Dwrite(f1_did, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, dset_data); - if (status < 0) - { + if (status < 0) { fprintf(stderr, "Error: %s> H5Dwrite failed.\n", fname1); status = FAIL; goto out; } - /*---------------------------------- + /*---------------------------------- * Named Datatype */ f1_tid = H5Tcopy(H5T_NATIVE_INT); status = H5Tcommit2(fid1, "ntype", f1_tid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); - if (status < 0) - { + if (status < 0) { fprintf(stderr, "Error: %s> H5Tcommit2 failed.\n", fname1); status = FAIL; goto out; } - - - /*---------------------------------------------------------------------- * Create file2 *-----------------------------------------------------------------------*/ - if((fid2 = H5Fcreate(fname2, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0) - { + if ((fid2 = H5Fcreate(fname2, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0) { fprintf(stderr, "Error: %s> H5Fcreate failed.\n", fname2); status = FAIL; goto out; } - /*---------------------------------- + /*---------------------------------- * Groups */ f2_gid = H5Gcreate2(fid2, "g", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); - if (f2_gid < 0) - { + if (f2_gid < 0) { fprintf(stderr, "Error: %s> H5Gcreate2 failed.\n", fname2); status = FAIL; goto out; } f2_gid2 = H5Gcreate2(fid2, "g2", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); - if (f2_gid2 < 0) - { + if (f2_gid2 < 0) { fprintf(stderr, "Error: %s> H5Gcreate2 failed.\n", fname2); status = FAIL; goto out; } f2_gid3 = H5Gcreate2(fid2, "g3", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); - if (f2_gid3 < 0) - { + if (f2_gid3 < 0) { fprintf(stderr, "Error: %s> H5Gcreate2 failed.\n", fname2); status = FAIL; goto out; } f2_gid4 = H5Gcreate2(fid2, "g4", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); - if (f2_gid4 < 0) - { + if (f2_gid4 < 0) { fprintf(stderr, "Error: %s> H5Gcreate2 failed.\n", fname2); status = FAIL; goto out; } - /*---------------------------------- + /*---------------------------------- * Datasets */ f2_sid = H5Screate_simple(1, dset_dims, NULL); f2_did = H5Dcreate2(fid2, "dset", H5T_NATIVE_INT, f2_sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); - if (f2_did == FAIL) - { + if (f2_did == FAIL) { fprintf(stderr, "Error: %s> write_dset failed\n", fname2); status = FAIL; goto out; } status = H5Dwrite(f2_did, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, dset_data); - if (status < 0) - { + if (status < 0) { fprintf(stderr, "Error: %s> H5Dwrite failed.\n", fname2); status = FAIL; goto out; } - /*---------------------------------- + /*---------------------------------- * Named Datatype */ f2_tid = H5Tcopy(H5T_NATIVE_INT); status = H5Tcommit2(fid2, "ntype", f2_tid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); - if (status < 0) - { + if (status < 0) { fprintf(stderr, "Error: %s> H5Tcommit2 failed.\n", fname2); status = FAIL; goto out; } - /*---------------------------------- + /*---------------------------------- * CASE1 - Same attr number, all Same attr name * add attr to group */ - write_attr(f1_gid,1,attr_dims,"integer1",H5T_NATIVE_INT,f1_attr_idata); - write_attr(f1_gid,1,attr_dims,"float1",H5T_NATIVE_FLOAT,f1_attr_fdata); + write_attr(f1_gid, 1, attr_dims, "integer1", H5T_NATIVE_INT, f1_attr_idata); + write_attr(f1_gid, 1, attr_dims, "float1", H5T_NATIVE_FLOAT, f1_attr_fdata); - write_attr(f2_gid,1,attr_dims,"integer1",H5T_NATIVE_INT,f2_attr_idata); - write_attr(f2_gid,1,attr_dims,"float1",H5T_NATIVE_FLOAT,f2_attr_fdata); + write_attr(f2_gid, 1, attr_dims, "integer1", H5T_NATIVE_INT, f2_attr_idata); + write_attr(f2_gid, 1, attr_dims, "float1", H5T_NATIVE_FLOAT, f2_attr_fdata); - /*---------------------------------- + /*---------------------------------- * CASE2 - Same attr number, some Same attr name * add attr to dset */ - write_attr(f1_did,1,attr_dims,"integer1",H5T_NATIVE_INT,f1_attr_idata); - write_attr(f1_did,1,attr_dims,"float2",H5T_NATIVE_FLOAT,f1_attr_fdata); + write_attr(f1_did, 1, attr_dims, "integer1", H5T_NATIVE_INT, f1_attr_idata); + write_attr(f1_did, 1, attr_dims, "float2", H5T_NATIVE_FLOAT, f1_attr_fdata); - write_attr(f2_did,1,attr_dims,"integer1",H5T_NATIVE_INT,f2_attr_idata); - write_attr(f2_did,1,attr_dims,"float3",H5T_NATIVE_FLOAT,f2_attr_fdata); + write_attr(f2_did, 1, attr_dims, "integer1", H5T_NATIVE_INT, f2_attr_idata); + write_attr(f2_did, 1, attr_dims, "float3", H5T_NATIVE_FLOAT, f2_attr_fdata); - /*---------------------------------- + /*---------------------------------- * CASE3 - Same attr number, all different attr name * add attr to ntype */ - write_attr(f1_tid,1,attr_dims,"integer1",H5T_NATIVE_INT,f1_attr_idata); - write_attr(f1_tid,1,attr_dims,"float2",H5T_NATIVE_FLOAT,f1_attr_fdata); - write_attr(f1_tid,1,attr_dims,"float3",H5T_NATIVE_FLOAT,f1_attr_fdata); + write_attr(f1_tid, 1, attr_dims, "integer1", H5T_NATIVE_INT, f1_attr_idata); + write_attr(f1_tid, 1, attr_dims, "float2", H5T_NATIVE_FLOAT, f1_attr_fdata); + write_attr(f1_tid, 1, attr_dims, "float3", H5T_NATIVE_FLOAT, f1_attr_fdata); - write_attr(f2_tid,1,attr_dims,"integer4",H5T_NATIVE_INT,f2_attr_idata); - write_attr(f2_tid,1,attr_dims,"float5",H5T_NATIVE_FLOAT,f2_attr_fdata); - write_attr(f2_tid,1,attr_dims,"float6",H5T_NATIVE_FLOAT,f2_attr_fdata); + write_attr(f2_tid, 1, attr_dims, "integer4", H5T_NATIVE_INT, f2_attr_idata); + write_attr(f2_tid, 1, attr_dims, "float5", H5T_NATIVE_FLOAT, f2_attr_fdata); + write_attr(f2_tid, 1, attr_dims, "float6", H5T_NATIVE_FLOAT, f2_attr_fdata); - /*---------------------------------- + /*---------------------------------- * CASE4 - Different attr number, some same attr name (vs file2-g2) * add attr to g2 */ - write_attr(f1_gid2,1,attr_dims,"integer1",H5T_NATIVE_INT,f1_attr_idata); - write_attr(f1_gid2,1,attr_dims,"float2",H5T_NATIVE_FLOAT,f1_attr_fdata); - write_attr(f1_gid2,1,attr_dims,"float3",H5T_NATIVE_FLOAT,f1_attr_fdata); - - write_attr(f2_gid2,1,attr_dims,"integer1",H5T_NATIVE_INT,f2_attr_idata); - write_attr(f2_gid2,1,attr_dims,"float2",H5T_NATIVE_FLOAT,f2_attr_fdata); + write_attr(f1_gid2, 1, attr_dims, "integer1", H5T_NATIVE_INT, f1_attr_idata); + write_attr(f1_gid2, 1, attr_dims, "float2", H5T_NATIVE_FLOAT, f1_attr_fdata); + write_attr(f1_gid2, 1, attr_dims, "float3", H5T_NATIVE_FLOAT, f1_attr_fdata); + write_attr(f2_gid2, 1, attr_dims, "integer1", H5T_NATIVE_INT, f2_attr_idata); + write_attr(f2_gid2, 1, attr_dims, "float2", H5T_NATIVE_FLOAT, f2_attr_fdata); - /*---------------------------------- + /*---------------------------------- * CASE5 - Different attr number, all different attr name * add attr to g3 */ - write_attr(f1_gid3,1,attr_dims,"integer10",H5T_NATIVE_INT,f1_attr_idata); - write_attr(f1_gid3,1,attr_dims,"float11",H5T_NATIVE_FLOAT,f1_attr_fdata); - write_attr(f1_gid3,1,attr_dims,"float12",H5T_NATIVE_FLOAT,f1_attr_fdata); - - write_attr(f2_gid3,1,attr_dims,"integer3",H5T_NATIVE_INT,f2_attr_idata); - write_attr(f2_gid3,1,attr_dims,"float4",H5T_NATIVE_FLOAT,f2_attr_fdata); + write_attr(f1_gid3, 1, attr_dims, "integer10", H5T_NATIVE_INT, f1_attr_idata); + write_attr(f1_gid3, 1, attr_dims, "float11", H5T_NATIVE_FLOAT, f1_attr_fdata); + write_attr(f1_gid3, 1, attr_dims, "float12", H5T_NATIVE_FLOAT, f1_attr_fdata); + write_attr(f2_gid3, 1, attr_dims, "integer3", H5T_NATIVE_INT, f2_attr_idata); + write_attr(f2_gid3, 1, attr_dims, "float4", H5T_NATIVE_FLOAT, f2_attr_fdata); out: /*----------------------------------------------------------------------- * Close *-----------------------------------------------------------------------*/ - if(fid1 > 0) + if (fid1 > 0) H5Fclose(fid1); - if(fid2 > 0) + if (fid2 > 0) H5Fclose(fid2); - if(f1_gid > 0) + if (f1_gid > 0) H5Gclose(f1_gid); - if(f2_gid > 0) + if (f2_gid > 0) H5Gclose(f2_gid); - if(f1_gid2 > 0) + if (f1_gid2 > 0) H5Gclose(f1_gid2); - if(f2_gid2 > 0) + if (f2_gid2 > 0) H5Gclose(f2_gid2); - if(f1_gid3 > 0) + if (f1_gid3 > 0) H5Gclose(f1_gid3); - if(f2_gid3 > 0) + if (f2_gid3 > 0) H5Gclose(f2_gid3); - if(f1_gid4 > 0) + if (f1_gid4 > 0) H5Gclose(f1_gid4); - if(f2_gid4 > 0) + if (f2_gid4 > 0) H5Gclose(f2_gid4); - if(f1_did > 0) + if (f1_did > 0) H5Dclose(f1_did); - if(f2_did > 0) + if (f2_did > 0) H5Dclose(f2_did); - if(f1_sid > 0) + if (f1_sid > 0) H5Sclose(f1_sid); - if(f2_sid > 0) + if (f2_sid > 0) H5Sclose(f2_sid); - if(f1_tid > 0) + if (f1_tid > 0) H5Tclose(f1_tid); - if(f2_tid > 0) + if (f2_tid > 0) H5Tclose(f2_tid); return status; } - /*------------------------------------------------------------------------- -* Function: test_datasets -* -* Purpose: Check all HDF5 classes -* H5T_INTEGER, H5T_FLOAT -* H5T_TIME, H5T_STRING, H5T_BITFIELD, H5T_OPAQUE, H5T_COMPOUND, H5T_REFERENCE, -* H5T_ENUM, H5T_VLEN, H5T_ARRAY -* -*------------------------------------------------------------------------- -*/ + * Function: test_datasets + * + * Purpose: Check all HDF5 classes + * H5T_INTEGER, H5T_FLOAT + * H5T_TIME, H5T_STRING, H5T_BITFIELD, H5T_OPAQUE, H5T_COMPOUND, H5T_REFERENCE, + * H5T_ENUM, H5T_VLEN, H5T_ARRAY + * + *------------------------------------------------------------------------- + */ static -int test_datasets(const char *file, - int make_diffs /* flag to modify data buffers */) +int test_datasets(const char *file, int make_diffs /* flag to modify data buffers */) { - hid_t fid; - hid_t did; - hid_t gid; - hid_t sid; - hsize_t dims[1]={2}; - herr_t status; - int buf[2]={1,2}; - - if(make_diffs > 0) + hid_t fid = -1; + hid_t did = -1; + hid_t gid = -1; + hid_t sid = -1; + hsize_t dims[1] = { 2 }; + herr_t status; + int buf[2] = { 1, 2 }; + + if (make_diffs > 0) memset(buf, 0, sizeof buf); /* Create a file */ - if((fid = H5Fcreate(file, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0) + if ((fid = H5Fcreate(file, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0) return -1; /* Create a 1D dataset */ sid = H5Screate_simple(1, dims, NULL); - did = H5Dcreate2(fid, "dset", H5T_NATIVE_INT, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); + did = H5Dcreate2(fid, "dset", H5T_NATIVE_INT, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); status = H5Dwrite(did, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf); status = H5Sclose(sid); assert(status >= 0); /* Create a group */ - gid = H5Gcreate2(fid, "g1", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); + gid = H5Gcreate2(fid, "g1", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); /*------------------------------------------------------------------------- * write a series of datasets on the group *------------------------------------------------------------------------- */ - write_dset_in(gid,"/dset",fid,make_diffs); + write_dset_in(gid, "/dset", fid, make_diffs); /* close */ status = H5Dclose(did); @@ -1367,29 +1343,29 @@ int test_datasets(const char *file, } /*------------------------------------------------------------------------- -* Function: test_special_datasets -* -* Purpose: Check datasets with datasapce of zero dimension size. -*------------------------------------------------------------------------- -*/ + * Function: test_special_datasets + * + * Purpose: Check datasets with datasapce of zero dimension size. + *------------------------------------------------------------------------- + */ static -int test_special_datasets(const char *file, - int make_diffs /* flag to modify data buffers */) +int test_special_datasets(const char *file, int make_diffs /* flag to modify data buffers */) { - hid_t fid; - hid_t did; - hid_t sid0, sid; - hsize_t dims0[SPACE1_RANK]={SPACE1_DIM1, SPACE1_DIM2}; - hsize_t dims[SPACE1_RANK]={SPACE1_DIM1, SPACE1_DIM2}; - herr_t status; + hid_t fid = -1; + hid_t did = -1; + hid_t sid0 = -1; + hid_t sid = -1; + hsize_t dims0[SPACE1_RANK] = { SPACE1_DIM1, SPACE1_DIM2 }; + hsize_t dims[SPACE1_RANK] = { SPACE1_DIM1, SPACE1_DIM2 }; + herr_t status; /* Create a file */ - if((fid = H5Fcreate(file, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0) + if ((fid = H5Fcreate(file, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0) return -1; /* Create a dataset with zero dimension size */ sid0 = H5Screate_simple(SPACE1_RANK, dims0, NULL); - did = H5Dcreate2(fid, "dset1", H5T_NATIVE_INT, sid0, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); + did = H5Dcreate2(fid, "dset1", H5T_NATIVE_INT, sid0, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); /* close dataset */ status = H5Dclose(did); @@ -1400,12 +1376,12 @@ int test_special_datasets(const char *file, assert(status >= 0); /* Create a dataset with zero dimension size in one file but the other one - * has a dataset with a non-zero dimension size */ - if(make_diffs) + * has a dataset with a non-zero dimension size */ + if (make_diffs) dims[1] = SPACE1_DIM2 + 4; sid = H5Screate_simple(SPACE1_RANK, dims, NULL); - did = H5Dcreate2(fid, "dset2", H5T_NATIVE_INT, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); + did = H5Dcreate2(fid, "dset2", H5T_NATIVE_INT, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); /* close dataspace */ status = H5Sclose(sid); @@ -1422,26 +1398,25 @@ int test_special_datasets(const char *file, } /*------------------------------------------------------------------------- -* -* Purpose: Create test files to compare links, one has longer name than -* the other and short name is subset of long name. -* -* Programmer: Jonathan Kim (Feb 17, 2010) -* -*-------------------------------------------------------------------------*/ + * + * Purpose: Create test files to compare links, one has longer name than + * the other and short name is subset of long name. + * + * Programmer: Jonathan Kim (Feb 17, 2010) + * + *-------------------------------------------------------------------------*/ static int test_link_name(const char *fname1) { - hid_t fid1=0; - hid_t gid1=0; - hid_t gid2=0; - herr_t status = SUCCEED; + hid_t fid1 = -1; + hid_t gid1 = -1; + hid_t gid2 = -1; + herr_t status = SUCCEED; /*----------------------------------------------------------------------- * Create file(s) *------------------------------------------------------------------------*/ - fid1 = H5Fcreate (fname1, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT); - if (fid1 < 0) - { + fid1 = H5Fcreate(fname1, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT); + if (fid1 < 0) { fprintf(stderr, "Error: %s> H5Fcreate failed.\n", fname1); status = FAIL; goto out; @@ -1451,16 +1426,15 @@ static int test_link_name(const char *fname1) * Groups *------------------------------------------------------------------------*/ gid1 = H5Gcreate2(fid1, "group", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); - if (gid1 < 0) - { + if (gid1 < 0) { fprintf(stderr, "Error: %s> H5Gcreate2 failed.\n", fname1); status = FAIL; goto out; } - gid2 = H5Gcreate2(fid1, "group_longname", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); + gid2 = H5Gcreate2(fid1, "group_longname", H5P_DEFAULT, H5P_DEFAULT, + H5P_DEFAULT); - if (gid2 < 0) - { + if (gid2 < 0) { fprintf(stderr, "Error: %s> H5Gcreate2 failed.\n", fname1); status = FAIL; goto out; @@ -1470,16 +1444,14 @@ static int test_link_name(const char *fname1) * Soft Links *------------------------------------------------------------------------*/ status = H5Lcreate_soft("group", fid1, "link_g1", H5P_DEFAULT, H5P_DEFAULT); - if (status < 0) - { + if (status < 0) { fprintf(stderr, "Error: %s> H5Lcreate_soft failed.\n", fname1); status = FAIL; goto out; } status = H5Lcreate_soft("group_longname", fid1, "link_g2", H5P_DEFAULT, H5P_DEFAULT); - if (status < 0) - { + if (status < 0) { fprintf(stderr, "Error: %s> H5Lcreate_soft failed.\n", fname1); status = FAIL; goto out; @@ -1489,38 +1461,37 @@ out: /*----------------------------------------------------------------------- * Close *------------------------------------------------------------------------*/ - if(fid1) + if (fid1) H5Fclose(fid1); - if(gid1) + if (gid1) H5Gclose(gid1); - if(gid2) + if (gid2) H5Gclose(gid2); return status; } /*------------------------------------------------------------------------- -* -* Purpose: Create test files to compare soft links in various way -* -* Programmer: Jonathan Kim (Feb 17, 2010) -* -*-------------------------------------------------------------------------*/ + * + * Purpose: Create test files to compare soft links in various way + * + * Programmer: Jonathan Kim (Feb 17, 2010) + * + *-------------------------------------------------------------------------*/ static int test_soft_links(const char *fname1) { - hid_t fid1=0; - hid_t gid1=0; - hsize_t dims2[2] = {2,4}; - int data1[4][2] = {{0,1},{2,3},{1,2},{3,4}}; - int data2[4][2] = {{0,0},{0,0},{0,0},{0,0}}; - herr_t status = SUCCEED; + hid_t fid1 = -1; + hid_t gid1 = -1; + hsize_t dims2[2] = { 2, 4 }; + int data1[4][2] = { { 0, 1 }, { 2, 3 }, { 1, 2 }, { 3, 4 } }; + int data2[4][2] = { { 0, 0 }, { 0, 0 }, { 0, 0 }, { 0, 0 } }; + herr_t status = SUCCEED; /*----------------------------------------------------------------------- * Create file(s) *------------------------------------------------------------------------*/ - fid1 = H5Fcreate (fname1, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT); - if (fid1 < 0) - { + fid1 = H5Fcreate(fname1, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT); + if (fid1 < 0) { fprintf(stderr, "Error: %s> H5Fcreate failed.\n", fname1); status = FAIL; goto out; @@ -1530,8 +1501,7 @@ static int test_soft_links(const char *fname1) * Groups *------------------------------------------------------------------------*/ gid1 = H5Gcreate2(fid1, "target_group", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); - if (gid1 < 0) - { + if (gid1 < 0) { fprintf(stderr, "Error: %s> H5Gcreate2 failed.\n", fname1); status = FAIL; goto out; @@ -1541,25 +1511,22 @@ static int test_soft_links(const char *fname1) * Datasets *------------------------------------------------------------------------*/ /* file1 */ - status = write_dset(fid1,2,dims2,"target_dset1",H5T_NATIVE_INT,data1); - if (status == FAIL) - { + status = write_dset(fid1, 2, dims2, "target_dset1", H5T_NATIVE_INT, data1); + if (status == FAIL) { fprintf(stderr, "Error: %s> write_dset failed\n", fname1); status = FAIL; goto out; } - status = write_dset(fid1,2,dims2,"target_dset2",H5T_NATIVE_INT,data2); - if (status == FAIL) - { + status = write_dset(fid1, 2, dims2, "target_dset2", H5T_NATIVE_INT, data2); + if (status == FAIL) { fprintf(stderr, "Error: %s> write_dset failed\n", fname1); status = FAIL; goto out; } - status = write_dset(gid1,2,dims2,"dset",H5T_NATIVE_INT,data1); - if (status == FAIL) - { + status = write_dset(gid1, 2, dims2, "dset", H5T_NATIVE_INT, data1); + if (status == FAIL) { fprintf(stderr, "Error: %s> write_dset failed\n", fname1); status = FAIL; goto out; @@ -1570,48 +1537,42 @@ static int test_soft_links(const char *fname1) *------------------------------------------------------------------------*/ /* file 1 */ status = H5Lcreate_soft("/target_dset1", fid1, "softlink_dset1_1", H5P_DEFAULT, H5P_DEFAULT); - if (status < 0) - { + if (status < 0) { fprintf(stderr, "Error: %s> H5Lcreate_soft failed.\n", fname1); status = FAIL; goto out; } status = H5Lcreate_soft("/target_dset1", fid1, "softlink_dset1_2", H5P_DEFAULT, H5P_DEFAULT); - if (status < 0) - { + if (status < 0) { fprintf(stderr, "Error: %s> H5Lcreate_soft failed.\n", fname1); status = FAIL; goto out; } status = H5Lcreate_soft("/target_dset2", fid1, "softlink_dset2", H5P_DEFAULT, H5P_DEFAULT); - if (status < 0) - { + if (status < 0) { fprintf(stderr, "Error: %s> H5Lcreate_soft failed.\n", fname1); status = FAIL; goto out; } status = H5Lcreate_soft("/target_group", fid1, "softlink_group1", H5P_DEFAULT, H5P_DEFAULT); - if (status < 0) - { + if (status < 0) { fprintf(stderr, "Error: %s> H5Lcreate_soft failed.\n", fname1); status = FAIL; goto out; } status = H5Lcreate_soft("/target_group", fid1, "softlink_group2", H5P_DEFAULT, H5P_DEFAULT); - if (status < 0) - { + if (status < 0) { fprintf(stderr, "Error: %s> H5Lcreate_soft failed.\n", fname1); status = FAIL; goto out; } status = H5Lcreate_soft("/no_obj", fid1, "softlink_noexist", H5P_DEFAULT, H5P_DEFAULT); - if (status < 0) - { + if (status < 0) { fprintf(stderr, "Error: %s> H5Lcreate_soft failed.\n", fname1); status = FAIL; goto out; @@ -1621,38 +1582,37 @@ out: /*----------------------------------------------------------------------- * Close *-----------------------------------------------------------------------*/ - if(fid1) + if (fid1) H5Fclose(fid1); - if(gid1) + if (gid1) H5Gclose(gid1); return status; } /*------------------------------------------------------------------------- -* -* Purpose: Create test files to compare linked soft links in various way -* -* Programmer: Jonathan Kim (Feb 17, 2010) -* -*-------------------------------------------------------------------------*/ + * + * Purpose: Create test files to compare linked soft links in various way + * + * Programmer: Jonathan Kim (Feb 17, 2010) + * + *-------------------------------------------------------------------------*/ static int test_linked_softlinks(const char *fname1) { - hid_t fid1=0; - hid_t gid1=0; - hid_t gid2=0; - hid_t gid3=0; - hsize_t dims2[2] = {2,4}; - int data1[4][2] = {{0,1},{2,3},{1,2},{3,4}}; - int data2[4][2] = {{0,0},{0,0},{0,0},{0,0}}; - herr_t status = SUCCEED; + hid_t fid1 = -1; + hid_t gid1 = -1; + hid_t gid2 = -1; + hid_t gid3 = -1; + hsize_t dims2[2] = { 2, 4 }; + int data1[4][2] = { { 0, 1 }, { 2, 3 }, { 1, 2 }, { 3, 4 } }; + int data2[4][2] = { { 0, 0 }, { 0, 0 }, { 0, 0 }, { 0, 0 } }; + herr_t status = SUCCEED; /*----------------------------------------------------------------------- * Create file(s) *------------------------------------------------------------------------*/ - fid1 = H5Fcreate (fname1, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT); - if (fid1 < 0) - { + fid1 = H5Fcreate(fname1, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT); + if (fid1 < 0) { fprintf(stderr, "Error: %s> H5Fcreate failed.\n", fname1); status = FAIL; goto out; @@ -1662,24 +1622,21 @@ static int test_linked_softlinks(const char *fname1) * Groups *------------------------------------------------------------------------*/ gid1 = H5Gcreate2(fid1, "target_group", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); - if (gid1 < 0) - { + if (gid1 < 0) { fprintf(stderr, "Error: %s> H5Gcreate2 failed.\n", fname1); status = FAIL; goto out; } gid2 = H5Gcreate2(fid1, "target_group1", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); - if (gid2 < 0) - { + if (gid2 < 0) { fprintf(stderr, "Error: %s> H5Gcreate2 failed.\n", fname1); status = FAIL; goto out; } gid3 = H5Gcreate2(fid1, "target_group2", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); - if (gid3 < 0) - { + if (gid3 < 0) { fprintf(stderr, "Error: %s> H5Gcreate2 failed.\n", fname1); status = FAIL; goto out; @@ -1689,24 +1646,21 @@ static int test_linked_softlinks(const char *fname1) * Datasets *------------------------------------------------------------------------*/ /* file1 */ - status = write_dset(fid1,2,dims2,"target_dset1",H5T_NATIVE_INT,data1); - if (status == FAIL) - { + status = write_dset(fid1, 2, dims2, "target_dset1", H5T_NATIVE_INT, data1); + if (status == FAIL) { fprintf(stderr, "Error: %s> write_dset failed\n", fname1); status = FAIL; goto out; } - status = write_dset(fid1,2,dims2,"target_dset2",H5T_NATIVE_INT,data2); - if (status == FAIL) - { + status = write_dset(fid1, 2, dims2, "target_dset2", H5T_NATIVE_INT, data2); + if (status == FAIL) { fprintf(stderr, "Error: %s> write_dset failed\n", fname1); status = FAIL; goto out; } - status = write_dset(gid1,2,dims2,"dset",H5T_NATIVE_INT,data1); - if (status == FAIL) - { + status = write_dset(gid1, 2, dims2, "dset", H5T_NATIVE_INT, data1); + if (status == FAIL) { fprintf(stderr, "Error: %s> write_dset failed\n", fname1); status = FAIL; goto out; @@ -1716,98 +1670,86 @@ static int test_linked_softlinks(const char *fname1) * Soft Links (Linked) *------------------------------------------------------------------------*/ /*--------- - * file 1 */ + * file 1 */ status = H5Lcreate_soft("/target_dset1", fid1, "softlink1_to_dset1", H5P_DEFAULT, H5P_DEFAULT); - if (status < 0) - { + if (status < 0) { fprintf(stderr, "Error: %s> H5Lcreate_soft failed.\n", fname1); status = FAIL; goto out; } status = H5Lcreate_soft("softlink1_to_dset1", fid1, "softlink1_to_slink1", H5P_DEFAULT, H5P_DEFAULT); - if (status < 0) - { + if (status < 0) { fprintf(stderr, "Error: %s> H5Lcreate_soft failed.\n", fname1); status = FAIL; goto out; } status = H5Lcreate_soft("softlink1_to_slink1", fid1, "softlink1_to_slink2", H5P_DEFAULT, H5P_DEFAULT); - if (status < 0) - { + if (status < 0) { fprintf(stderr, "Error: %s> H5Lcreate_soft failed.\n", fname1); status = FAIL; goto out; } status = H5Lcreate_soft("/target_dset2", fid1, "softlink2_to_dset2", H5P_DEFAULT, H5P_DEFAULT); - if (status < 0) - { + if (status < 0) { fprintf(stderr, "Error: %s> H5Lcreate_soft failed.\n", fname1); status = FAIL; goto out; } status = H5Lcreate_soft("softlink2_to_dset2", fid1, "softlink2_to_slink1", H5P_DEFAULT, H5P_DEFAULT); - if (status < 0) - { + if (status < 0) { fprintf(stderr, "Error: %s> H5Lcreate_soft failed.\n", fname1); status = FAIL; goto out; } status = H5Lcreate_soft("softlink2_to_slink1", fid1, "softlink2_to_slink2", H5P_DEFAULT, H5P_DEFAULT); - if (status < 0) - { + if (status < 0) { fprintf(stderr, "Error: %s> H5Lcreate_soft failed.\n", fname1); status = FAIL; goto out; } status = H5Lcreate_soft("target_group1", fid1, "softlink3_to_group1", H5P_DEFAULT, H5P_DEFAULT); - if (status < 0) - { + if (status < 0) { fprintf(stderr, "Error: %s> H5Lcreate_soft failed.\n", fname1); status = FAIL; goto out; } status = H5Lcreate_soft("softlink3_to_group1", fid1, "softlink3_to_slink1", H5P_DEFAULT, H5P_DEFAULT); - if (status < 0) - { + if (status < 0) { fprintf(stderr, "Error: %s> H5Lcreate_soft failed.\n", fname1); status = FAIL; goto out; } status = H5Lcreate_soft("softlink3_to_slink1", fid1, "softlink3_to_slink2", H5P_DEFAULT, H5P_DEFAULT); - if (status < 0) - { + if (status < 0) { fprintf(stderr, "Error: %s> H5Lcreate_soft failed.\n", fname1); status = FAIL; goto out; } status = H5Lcreate_soft("target_group2", fid1, "softlink4_to_group2", H5P_DEFAULT, H5P_DEFAULT); - if (status < 0) - { + if (status < 0) { fprintf(stderr, "Error: %s> H5Lcreate_soft failed.\n", fname1); status = FAIL; goto out; } status = H5Lcreate_soft("softlink4_to_group2", fid1, "softlink4_to_slink1", H5P_DEFAULT, H5P_DEFAULT); - if (status < 0) - { + if (status < 0) { fprintf(stderr, "Error: %s> H5Lcreate_soft failed.\n", fname1); status = FAIL; goto out; } status = H5Lcreate_soft("softlink4_to_slink1", fid1, "softlink4_to_slink2", H5P_DEFAULT, H5P_DEFAULT); - if (status < 0) - { + if (status < 0) { fprintf(stderr, "Error: %s> H5Lcreate_soft failed.\n", fname1); status = FAIL; goto out; @@ -1817,52 +1759,50 @@ out: /*----------------------------------------------------------------------- * Close *-----------------------------------------------------------------------*/ - if(fid1) + if (fid1) H5Fclose(fid1); - if(gid1) + if (gid1) H5Gclose(gid1); - if(gid2) + if (gid2) H5Gclose(gid2); - if(gid3) + if (gid3) H5Gclose(gid3); return status; } /*------------------------------------------------------------------------- -* -* Purpose: Create test files to compare external links in various way -* -* Programmer: Jonathan Kim (Feb 17, 2010) -* -*-------------------------------------------------------------------------*/ + * + * Purpose: Create test files to compare external links in various way + * + * Programmer: Jonathan Kim (Feb 17, 2010) + * + *-------------------------------------------------------------------------*/ static int test_external_links(const char *fname1, const char *fname2) { - hid_t fid1=0; - hid_t fid2=0; - hid_t gid1=0; - hid_t gid2=0; - hsize_t dims2[2] = {2,4}; - int data1[4][2] = {{0,1},{2,3},{1,2},{3,4}}; - int data2[4][2] = {{0,0},{0,0},{0,0},{0,0}}; - herr_t status = SUCCEED; + hid_t fid1 = -1; + hid_t fid2 = -1; + hid_t gid1 = -1; + hid_t gid2 = -1; + hsize_t dims2[2] = { 2, 4 }; + int data1[4][2] = { { 0, 1 }, { 2, 3 }, { 1, 2 }, { 3, 4 } }; + int data2[4][2] = { { 0, 0 }, { 0, 0 }, { 0, 0 }, { 0, 0 } }; + herr_t status = SUCCEED; /*----------------------------------------------------------------------- * Create file(s) *------------------------------------------------------------------------*/ /* source file */ - fid1 = H5Fcreate (fname1, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT); - if (fid1 < 0) - { + fid1 = H5Fcreate(fname1, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT); + if (fid1 < 0) { fprintf(stderr, "Error: %s> H5Fcreate failed.\n", fname1); status = FAIL; goto out; } /* target file */ - fid2 = H5Fcreate (fname2, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT); - if (fid2 < 0) - { + fid2 = H5Fcreate(fname2, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT); + if (fid2 < 0) { fprintf(stderr, "Error: %s> H5Fcreate failed.\n", fname2); status = FAIL; goto out; @@ -1872,18 +1812,16 @@ static int test_external_links(const char *fname1, const char *fname2) * Groups *------------------------------------------------------------------------*/ /*-------------- - * target file */ + * target file */ gid1 = H5Gcreate2(fid2, "target_group", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); - if (gid1 < 0) - { + if (gid1 < 0) { fprintf(stderr, "Error: %s> H5Gcreate2 failed.\n", fname2); status = FAIL; goto out; } gid2 = H5Gcreate2(fid2, "target_group2", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); - if (gid2 < 0) - { + if (gid2 < 0) { fprintf(stderr, "Error: %s> H5Gcreate2 failed.\n", fname2); status = FAIL; goto out; @@ -1892,26 +1830,23 @@ static int test_external_links(const char *fname1, const char *fname2) * Datasets *------------------------------------------------------------------------*/ /*-------------- - * target file */ - status = write_dset(fid2,2,dims2,"target_dset1",H5T_NATIVE_INT,data1); - if (status == FAIL) - { + * target file */ + status = write_dset(fid2, 2, dims2, "target_dset1", H5T_NATIVE_INT, data1); + if (status == FAIL) { fprintf(stderr, "Error: %s> write_dset failed\n", fname2); status = FAIL; goto out; } - status = write_dset(gid1,2,dims2,"x_dset",H5T_NATIVE_INT,data1); - if (status == FAIL) - { + status = write_dset(gid1, 2, dims2, "x_dset", H5T_NATIVE_INT, data1); + if (status == FAIL) { fprintf(stderr, "Error: %s> write_dset failed\n", fname2); status = FAIL; goto out; } - status = write_dset(gid2,2,dims2,"x_dset",H5T_NATIVE_INT,data2); - if (status == FAIL) - { + status = write_dset(gid2, 2, dims2, "x_dset", H5T_NATIVE_INT, data2); + if (status == FAIL) { fprintf(stderr, "Error: %s> write_dset failed\n", fname2); status = FAIL; goto out; @@ -1923,48 +1858,42 @@ static int test_external_links(const char *fname1, const char *fname2) /*--------------*/ /* source file */ status = H5Lcreate_external(fname2, "/target_group/x_dset", fid1, "ext_link_dset1", H5P_DEFAULT, H5P_DEFAULT); - if (status < 0) - { + if (status < 0) { fprintf(stderr, "Error: %s> H5Lcreate_external failed.\n", fname1); status = FAIL; goto out; } status = H5Lcreate_external(fname2, "/target_group2/x_dset", fid1, "ext_link_dset2", H5P_DEFAULT, H5P_DEFAULT); - if (status < 0) - { + if (status < 0) { fprintf(stderr, "Error: %s> H5Lcreate_external failed.\n", fname1); status = FAIL; goto out; } status = H5Lcreate_external(fname2, "/target_group", fid1, "/ext_link_grp1", H5P_DEFAULT, H5P_DEFAULT); - if (status < 0) - { + if (status < 0) { fprintf(stderr, "Error: %s> H5Lcreate_external failed.\n", fname1); status = FAIL; goto out; } status = H5Lcreate_external(fname2, "/target_group2", fid1, "/ext_link_grp2", H5P_DEFAULT, H5P_DEFAULT); - if (status < 0) - { + if (status < 0) { fprintf(stderr, "Error: %s> H5Lcreate_external failed.\n", fname1); status = FAIL; goto out; } status = H5Lcreate_external(fname2, "no_obj", fid1, "ext_link_noexist1", H5P_DEFAULT, H5P_DEFAULT); - if (status < 0) - { + if (status < 0) { fprintf(stderr, "Error: %s> H5Lcreate_external failed.\n", fname1); status = FAIL; goto out; } status = H5Lcreate_external("no_file.h5", "no_obj", fid1, "ext_link_noexist2", H5P_DEFAULT, H5P_DEFAULT); - if (status < 0) - { + if (status < 0) { fprintf(stderr, "Error: %s> H5Lcreate_external failed.\n", fname1); status = FAIL; goto out; @@ -1974,52 +1903,50 @@ out: /*----------------------------------------------------------------------- * Close *-----------------------------------------------------------------------*/ - if(fid1) + if (fid1) H5Fclose(fid1); - if(fid2) + if (fid2) H5Fclose(fid2); - if(gid1) + if (gid1) H5Gclose(gid1); - if(gid2) + if (gid2) H5Gclose(gid2); return status; } /*------------------------------------------------------------------------- -* -* Purpose: Create test files to compare external links which point to -* soft link in various way -* -* Programmer: Jonathan Kim (Feb 17, 2010) -* -*-------------------------------------------------------------------------*/ + * + * Purpose: Create test files to compare external links which point to + * soft link in various way + * + * Programmer: Jonathan Kim (Feb 17, 2010) + * + *-------------------------------------------------------------------------*/ static int test_ext2soft_links(const char *fname1, const char *fname2) { - hid_t fid1=0; - hid_t fid2=0; - hid_t gid2=0; - hsize_t dims2[2] = {2,4}; - int data1[4][2] = {{0,1},{2,3},{1,2},{3,4}}; - int data2[4][2] = {{0,0},{0,0},{0,0},{0,0}}; - herr_t status = SUCCEED; + hid_t fid1 = -1; + hid_t fid2 = -1; + hid_t gid2 = -1; + hsize_t dims2[2] = { 2, 4 }; + int data1[4][2] = { { 0, 1 }, { 2, 3 }, { 1, 2 }, { 3, 4 } }; + int data2[4][2] = { { 0, 0 }, { 0, 0 }, { 0, 0 }, { 0, 0 } }; + herr_t status = SUCCEED; /*----------------------------------------------------------------------- * Create file(s) *------------------------------------------------------------------------*/ /* source file */ - fid1 = H5Fcreate (fname1, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT); - if (fid1 < 0) - { + fid1 = H5Fcreate(fname1, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT); + if (fid1 < 0) { fprintf(stderr, "Error: %s> H5Fcreate failed.\n", fname1); status = FAIL; goto out; } /* target file */ - fid2 = H5Fcreate (fname2, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT); - if (fid2 < 0) - { + fid2 = H5Fcreate(fname2, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT); + if (fid2 < 0) { fprintf(stderr, "Error: %s> H5Fcreate failed.\n", fname2); status = FAIL; goto out; @@ -2030,8 +1957,7 @@ static int test_ext2soft_links(const char *fname1, const char *fname2) *------------------------------------------------------------------------*/ /* target file */ gid2 = H5Gcreate2(fid2, "target_group", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); - if (gid2 < 0) - { + if (gid2 < 0) { fprintf(stderr, "Error: %s> H5Gcreate2 failed.\n", fname2); status = FAIL; goto out; @@ -2041,18 +1967,16 @@ static int test_ext2soft_links(const char *fname1, const char *fname2) * Datasets *------------------------------------------------------------------------*/ /*-------------- - * target file */ - status = write_dset(fid2,2,dims2,"dset1",H5T_NATIVE_INT,data2); - if (status == FAIL) - { + * target file */ + status = write_dset(fid2, 2, dims2, "dset1", H5T_NATIVE_INT, data2); + if (status == FAIL) { fprintf(stderr, "Error: %s> write_dset failed\n", fname2); status = FAIL; goto out; } - status = write_dset(fid2,2,dims2,"dset2",H5T_NATIVE_INT,data1); - if (status == FAIL) - { + status = write_dset(fid2, 2, dims2, "dset2", H5T_NATIVE_INT, data1); + if (status == FAIL) { fprintf(stderr, "Error: %s> write_dset failed\n", fname2); status = FAIL; goto out; @@ -2062,18 +1986,16 @@ static int test_ext2soft_links(const char *fname1, const char *fname2) * Soft Links (Linked) *------------------------------------------------------------------------*/ /*--------------- - * target file */ + * target file */ status = H5Lcreate_soft("/dset1", fid2, "softlink_to_dset1", H5P_DEFAULT, H5P_DEFAULT); - if (status < 0) - { + if (status < 0) { fprintf(stderr, "Error: %s> H5Lcreate_soft failed.\n", fname2); status = FAIL; goto out; } status = H5Lcreate_soft("/dset2", fid2, "softlink_to_dset2", H5P_DEFAULT, H5P_DEFAULT); - if (status < 0) - { + if (status < 0) { fprintf(stderr, "Error: %s> H5Lcreate_soft failed.\n", fname2); status = FAIL; goto out; @@ -2083,26 +2005,23 @@ static int test_ext2soft_links(const char *fname1, const char *fname2) * External Links *------------------------------------------------------------------------*/ /*--------------- - * source file */ + * source file */ status = H5Lcreate_external(fname2, "/target_group", fid1, "ext_link", H5P_DEFAULT, H5P_DEFAULT); - if (status < 0) - { + if (status < 0) { fprintf(stderr, "Error: %s> H5Lcreate_external failed.\n", fname1); status = FAIL; goto out; } status = H5Lcreate_external(fname2, "/softlink_to_dset1", fid1, "ext_link_to_slink1", H5P_DEFAULT, H5P_DEFAULT); - if (status < 0) - { + if (status < 0) { fprintf(stderr, "Error: %s> H5Lcreate_external failed.\n", fname1); status = FAIL; goto out; } status = H5Lcreate_external(fname2, "/softlink_to_dset2", fid1, "ext_link_to_slink2", H5P_DEFAULT, H5P_DEFAULT); - if (status < 0) - { + if (status < 0) { fprintf(stderr, "Error: %s> H5Lcreate_external failed.\n", fname1); status = FAIL; goto out; @@ -2112,56 +2031,57 @@ out: /*----------------------------------------------------------------------- * Close *-----------------------------------------------------------------------*/ - if(fid1) + if (fid1) H5Fclose(fid1); - if(fid2) + if (fid2) H5Fclose(fid2); - if(gid2) + if (gid2) H5Gclose(gid2); return status; } /*------------------------------------------------------------------------- -* Function: gen_dataset_idx -* -* Purpose: Create a file with either the new or old format -* Create two datasets in the file: -* one dataset: fixed dimension, chunked layout, w/o filters -* one dataset: fixed dimension, chunked layout, w/ filters -* -*------------------------------------------------------------------------- -*/ + * Function: gen_dataset_idx + * + * Purpose: Create a file with either the new or old format + * Create two datasets in the file: + * one dataset: fixed dimension, chunked layout, w/o filters + * one dataset: fixed dimension, chunked layout, w/ filters + * + *------------------------------------------------------------------------- + */ static int gen_dataset_idx(const char *file, int format) { - hid_t fid; /* file id */ - hid_t did, did2; /* dataset id */ - hid_t sid; /* space id */ - hid_t fapl; /* file access property id */ - hid_t dcpl; /* dataset creation property id */ - hsize_t dims[1] = {10}; /* dataset dimension */ - hsize_t c_dims[1] = {2}; /* chunk dimension */ - herr_t status; /* return status */ - int buf[10]; /* data buffer */ - int i; /* local index variable */ + hid_t fid = -1; /* file id */ + hid_t did = -1; + hid_t did2 = -1; /* dataset id */ + hid_t sid = -1; /* space id */ + hid_t fapl = -1; /* file access property id */ + hid_t dcpl = -1; /* dataset creation property id */ + hsize_t dims[1] = { 10 }; /* dataset dimension */ + hsize_t c_dims[1] = { 2 }; /* chunk dimension */ + herr_t status; /* return status */ + int buf[10]; /* data buffer */ + int i; /* local index variable */ /* Get a copy of the file aaccess property */ fapl = H5Pcreate(H5P_FILE_ACCESS); /* Set the "use the latest format" bounds for creating objects in the file */ - if(format) { - status = H5Pset_libver_bounds(fapl, H5F_LIBVER_LATEST, H5F_LIBVER_LATEST); - assert(status >= 0); + if (format) { + status = H5Pset_libver_bounds(fapl, H5F_LIBVER_LATEST, H5F_LIBVER_LATEST); + assert(status >= 0); } /* Create a file */ - if((fid = H5Fcreate(file, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0) + if ((fid = H5Fcreate(file, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0) return -1; /* Create data */ - for(i = 0; i < 10; i++) - buf[i] = i; + for (i = 0; i < 10; i++) + buf[i] = i; /* Set chunk */ dcpl = H5Pcreate(H5P_DATASET_CREATE); @@ -2170,7 +2090,7 @@ int gen_dataset_idx(const char *file, int format) /* Create a 1D dataset */ sid = H5Screate_simple(1, dims, NULL); - did = H5Dcreate2(fid, "dset", H5T_NATIVE_INT, sid, H5P_DEFAULT, dcpl, H5P_DEFAULT); + did = H5Dcreate2(fid, "dset", H5T_NATIVE_INT, sid, H5P_DEFAULT, dcpl, H5P_DEFAULT); /* Write to the dataset */ status = H5Dwrite(did, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf); @@ -2182,7 +2102,7 @@ int gen_dataset_idx(const char *file, int format) assert(status >= 0); /* Create and write the dataset */ - did2 = H5Dcreate2(fid, "dset_filter", H5T_NATIVE_INT, sid, H5P_DEFAULT, dcpl, H5P_DEFAULT); + did2 = H5Dcreate2(fid, "dset_filter", H5T_NATIVE_INT, sid, H5P_DEFAULT, dcpl, H5P_DEFAULT); status = H5Dwrite(did2, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf); assert(status >= 0); @@ -2212,35 +2132,33 @@ int gen_dataset_idx(const char *file, int format) } /*------------------------------------------------------------------------- -* -* Purpose: Create test files to compare dangling links in various way -* -* Programmer: Jonathan Kim (Feb 17, 2010) -* -*-------------------------------------------------------------------------*/ + * + * Purpose: Create test files to compare dangling links in various way + * + * Programmer: Jonathan Kim (Feb 17, 2010) + * + *-------------------------------------------------------------------------*/ static int test_dangle_links(const char *fname1, const char *fname2) { - hid_t fid1=0; - hid_t fid2=0; - hsize_t dims2[2] = {2,4}; - int data1[4][2] = {{0,1},{2,3},{1,2},{3,4}}; - int data2[4][2] = {{0,0},{0,0},{0,0},{0,0}}; - herr_t status = SUCCEED; + hid_t fid1 = -1; + hid_t fid2 = -1; + hsize_t dims2[2] = { 2, 4 }; + int data1[4][2] = { { 0, 1 }, { 2, 3 }, { 1, 2 }, { 3, 4 } }; + int data2[4][2] = { { 0, 0 }, { 0, 0 }, { 0, 0 }, { 0, 0 } }; + herr_t status = SUCCEED; /*----------------------------------------------------------------------- * Create file(s) *------------------------------------------------------------------------*/ - fid1 = H5Fcreate (fname1, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT); - if (fid1 < 0) - { + fid1 = H5Fcreate(fname1, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT); + if (fid1 < 0) { fprintf(stderr, "Error: %s> H5Fcreate failed.\n", fname1); status = FAIL; goto out; } - fid2 = H5Fcreate (fname2, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT); - if (fid2 < 0) - { + fid2 = H5Fcreate(fname2, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT); + if (fid2 < 0) { fprintf(stderr, "Error: %s> H5Fcreate failed.\n", fname2); status = FAIL; goto out; @@ -2250,34 +2168,30 @@ static int test_dangle_links(const char *fname1, const char *fname2) * Datasets *------------------------------------------------------------------------*/ /* file1 */ - status = write_dset(fid1,2,dims2,"dset1",H5T_NATIVE_INT,data1); - if (status == FAIL) - { + status = write_dset(fid1, 2, dims2, "dset1", H5T_NATIVE_INT, data1); + if (status == FAIL) { fprintf(stderr, "Error: %s> write_dset failed\n", fname1); status = FAIL; goto out; } - status = write_dset(fid1,2,dims2,"dset2",H5T_NATIVE_INT,data2); - if (status == FAIL) - { + status = write_dset(fid1, 2, dims2, "dset2", H5T_NATIVE_INT, data2); + if (status == FAIL) { fprintf(stderr, "Error: %s> write_dset failed\n", fname1); status = FAIL; goto out; } /* file2 */ - status = write_dset(fid2,2,dims2,"dset1",H5T_NATIVE_INT,data1); - if (status == FAIL) - { + status = write_dset(fid2, 2, dims2, "dset1", H5T_NATIVE_INT, data1); + if (status == FAIL) { fprintf(stderr, "Error: %s> write_dset failed\n", fname2); status = FAIL; goto out; } - status = write_dset(fid2,2,dims2,"dset2",H5T_NATIVE_INT,data2); - if (status == FAIL) - { + status = write_dset(fid2, 2, dims2, "dset2", H5T_NATIVE_INT, data2); + if (status == FAIL) { fprintf(stderr, "Error: %s> write_dset failed\n", fname2); status = FAIL; goto out; @@ -2288,32 +2202,28 @@ static int test_dangle_links(const char *fname1, const char *fname2) *------------------------------------------------------------------------*/ /* file 1 */ status = H5Lcreate_soft("no_obj", fid1, "soft_link1", H5P_DEFAULT, H5P_DEFAULT); - if (status < 0) - { + if (status < 0) { fprintf(stderr, "Error: %s> H5Lcreate_soft failed.\n", fname1); status = FAIL; goto out; } status = H5Lcreate_soft("/dset1", fid1, "soft_link2", H5P_DEFAULT, H5P_DEFAULT); - if (status < 0) - { + if (status < 0) { fprintf(stderr, "Error: %s> H5Lcreate_soft failed.\n", fname1); status = FAIL; goto out; } status = H5Lcreate_soft("no_obj", fid1, "soft_link3", H5P_DEFAULT, H5P_DEFAULT); - if (status < 0) - { + if (status < 0) { fprintf(stderr, "Error: %s> H5Lcreate_soft failed.\n", fname1); status = FAIL; goto out; } status = H5Lcreate_soft("no_obj1", fid1, "soft_link4", H5P_DEFAULT, H5P_DEFAULT); - if (status < 0) - { + if (status < 0) { fprintf(stderr, "Error: %s> H5Lcreate_soft failed.\n", fname1); status = FAIL; goto out; @@ -2321,32 +2231,28 @@ static int test_dangle_links(const char *fname1, const char *fname2) /* file 2 */ status = H5Lcreate_soft("no_obj", fid2, "soft_link1", H5P_DEFAULT, H5P_DEFAULT); - if (status < 0) - { + if (status < 0) { fprintf(stderr, "Error: %s> H5Lcreate_soft failed.\n", fname2); status = FAIL; goto out; } status = H5Lcreate_soft("no_obj", fid2, "soft_link2", H5P_DEFAULT, H5P_DEFAULT); - if (status < 0) - { + if (status < 0) { fprintf(stderr, "Error: %s> H5Lcreate_soft failed.\n", fname2); status = FAIL; goto out; } status = H5Lcreate_soft("/dset2", fid2, "soft_link3", H5P_DEFAULT, H5P_DEFAULT); - if (status < 0) - { + if (status < 0) { fprintf(stderr, "Error: %s> H5Lcreate_soft failed.\n", fname2); status = FAIL; goto out; } status = H5Lcreate_soft("no_obj2", fid2, "soft_link4", H5P_DEFAULT, H5P_DEFAULT); - if (status < 0) - { + if (status < 0) { fprintf(stderr, "Error: %s> H5Lcreate_soft failed.\n", fname2); status = FAIL; goto out; @@ -2357,32 +2263,28 @@ static int test_dangle_links(const char *fname1, const char *fname2) *------------------------------------------------------------------------*/ /* file1 */ status = H5Lcreate_external(fname2, "no_obj", fid1, "ext_link1", H5P_DEFAULT, H5P_DEFAULT); - if (status < 0) - { + if (status < 0) { fprintf(stderr, "Error: %s> H5Lcreate_external failed.\n", fname1); status = FAIL; goto out; } status = H5Lcreate_external(fname2, "/dset1", fid1, "ext_link2", H5P_DEFAULT, H5P_DEFAULT); - if (status < 0) - { + if (status < 0) { fprintf(stderr, "Error: %s> H5Lcreate_external failed.\n", fname1); status = FAIL; goto out; } status = H5Lcreate_external(fname2, "no_obj", fid1, "ext_link3", H5P_DEFAULT, H5P_DEFAULT); - if (status < 0) - { + if (status < 0) { fprintf(stderr, "Error: %s> H5Lcreate_external failed.\n", fname1); status = FAIL; goto out; } status = H5Lcreate_external("no_file.h5", "no_obj", fid1, "ext_link4", H5P_DEFAULT, H5P_DEFAULT); - if (status < 0) - { + if (status < 0) { fprintf(stderr, "Error: %s> H5Lcreate_external failed.\n", fname1); status = FAIL; goto out; @@ -2390,32 +2292,28 @@ static int test_dangle_links(const char *fname1, const char *fname2) /* file2 */ status = H5Lcreate_external(fname1, "no_obj", fid2, "ext_link1", H5P_DEFAULT, H5P_DEFAULT); - if (status < 0) - { + if (status < 0) { fprintf(stderr, "Error: %s> H5Lcreate_external failed.\n", fname2); status = FAIL; goto out; } status = H5Lcreate_external(fname1, "no_obj", fid2, "ext_link2", H5P_DEFAULT, H5P_DEFAULT); - if (status < 0) - { + if (status < 0) { fprintf(stderr, "Error: %s> H5Lcreate_external failed.\n", fname2); status = FAIL; goto out; } status = H5Lcreate_external(fname1, "/dset2", fid2, "ext_link3", H5P_DEFAULT, H5P_DEFAULT); - if (status < 0) - { + if (status < 0) { fprintf(stderr, "Error: %s> H5Lcreate_external failed.\n", fname2); status = FAIL; goto out; } status = H5Lcreate_external("no_file.h5", "no_obj", fid2, "ext_link4", H5P_DEFAULT, H5P_DEFAULT); - if (status < 0) - { + if (status < 0) { fprintf(stderr, "Error: %s> H5Lcreate_external failed.\n", fname2); status = FAIL; goto out; @@ -2425,47 +2323,45 @@ out: /*----------------------------------------------------------------------- * Close *-----------------------------------------------------------------------*/ - if(fid1) + if (fid1) H5Fclose(fid1); - if(fid2) + if (fid2) H5Fclose(fid2); return status; } /*------------------------------------------------------------------------- -* -* Purpose: For testing comparing group member objects recursively -* -* Programmer: Jonathan Kim (Aug 19, 2010) -* -*-------------------------------------------------------------------------*/ + * + * Purpose: For testing comparing group member objects recursively + * + * Programmer: Jonathan Kim (Aug 19, 2010) + * + *-------------------------------------------------------------------------*/ static int test_group_recurse(const char *fname1, const char *fname2) { - hid_t fid1=0; - hid_t fid2=0; - hid_t gid1_f1=0, gid2_f1=0, gid3_f1=0, gid10_f1=0; - hid_t gid1_f2=0, gid2_f2=0, gid3_f2=0, gid11_f2=0; - hsize_t dims2[2] = {2,4}; - int data1[4][2] = {{0,1},{0,1},{1,0},{1,0}}; - int data2[4][2] = {{0,2},{0,2},{2,0},{2,0}}; - int data3[4][2] = {{0,3},{0,3},{3,0},{3,0}}; - herr_t status = SUCCEED; + hid_t fid1 = -1; + hid_t fid2 = -1; + hid_t gid1_f1 = -1, gid2_f1 = -1, gid3_f1 = -1, gid10_f1 = -1; + hid_t gid1_f2 = -1, gid2_f2 = -1, gid3_f2 = -1, gid11_f2 = -1; + hsize_t dims2[2] = { 2, 4 }; + int data1[4][2] = { { 0, 1 }, { 0, 1 }, { 1, 0 }, { 1, 0 } }; + int data2[4][2] = { { 0, 2 }, { 0, 2 }, { 2, 0 }, { 2, 0 } }; + int data3[4][2] = { { 0, 3 }, { 0, 3 }, { 3, 0 }, { 3, 0 } }; + herr_t status = SUCCEED; /*----------------------------------------------------------------------- * Create file(s) *------------------------------------------------------------------------*/ - fid1 = H5Fcreate (fname1, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT); - if (fid1 < 0) - { + fid1 = H5Fcreate(fname1, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT); + if (fid1 < 0) { fprintf(stderr, "Error: %s> H5Fcreate failed.\n", fname1); status = FAIL; goto out; } - fid2 = H5Fcreate (fname2, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT); - if (fid2 < 0) - { + fid2 = H5Fcreate(fname2, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT); + if (fid2 < 0) { fprintf(stderr, "Error: %s> H5Fcreate failed.\n", fname2); status = FAIL; goto out; @@ -2476,32 +2372,28 @@ static int test_group_recurse(const char *fname1, const char *fname2) *------------------------------------------------------------------------*/ /* file1 */ gid1_f1 = H5Gcreate2(fid1, "/grp1", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); - if (gid1_f1 < 0) - { + if (gid1_f1 < 0) { fprintf(stderr, "Error: %s> H5Gcreate2 failed.\n", fname1); status = FAIL; goto out; } gid2_f1 = H5Gcreate2(fid1, "/grp1/grp2", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); - if (gid2_f1 < 0) - { + if (gid2_f1 < 0) { fprintf(stderr, "Error: %s> H5Gcreate2 failed.\n", fname1); status = FAIL; goto out; } gid3_f1 = H5Gcreate2(fid1, "/grp1/grp2/grp3", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); - if (gid3_f1 < 0) - { + if (gid3_f1 < 0) { fprintf(stderr, "Error: %s> H5Gcreate2 failed.\n", fname1); status = FAIL; goto out; } gid10_f1 = H5Gcreate2(fid1, "/grp10", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); - if (gid10_f1 < 0) - { + if (gid10_f1 < 0) { fprintf(stderr, "Error: %s> H5Gcreate2 failed.\n", fname1); status = FAIL; goto out; @@ -2509,32 +2401,28 @@ static int test_group_recurse(const char *fname1, const char *fname2) /* file2 */ gid1_f2 = H5Gcreate2(fid2, "/grp1", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); - if (gid1_f2 < 0) - { + if (gid1_f2 < 0) { fprintf(stderr, "Error: %s> H5Gcreate2 failed.\n", fname2); status = FAIL; goto out; } gid2_f2 = H5Gcreate2(fid2, "/grp1/grp2", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); - if (gid2_f2 < 0) - { + if (gid2_f2 < 0) { fprintf(stderr, "Error: %s> H5Gcreate2 failed.\n", fname2); status = FAIL; goto out; } gid3_f2 = H5Gcreate2(fid2, "/grp1/grp2/grp3", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); - if (gid3_f2 < 0) - { + if (gid3_f2 < 0) { fprintf(stderr, "Error: %s> H5Gcreate2 failed.\n", fname2); status = FAIL; goto out; } gid11_f2 = H5Gcreate2(fid2, "/grp11", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); - if (gid11_f2 < 0) - { + if (gid11_f2 < 0) { fprintf(stderr, "Error: %s> H5Gcreate2 failed.\n", fname2); status = FAIL; goto out; @@ -2544,50 +2432,44 @@ static int test_group_recurse(const char *fname1, const char *fname2) * Datasets under root *------------------------------------------------------------------------*/ /* file1 */ - status = write_dset(fid1,2,dims2,"dset1",H5T_NATIVE_INT,data1); - if (status == FAIL) - { + status = write_dset(fid1, 2, dims2, "dset1", H5T_NATIVE_INT, data1); + if (status == FAIL) { fprintf(stderr, "Error: %s> write_dset failed\n", fname1); status = FAIL; goto out; } - status = write_dset(fid1,2,dims2,"dset2",H5T_NATIVE_INT,data2); - if (status == FAIL) - { + status = write_dset(fid1, 2, dims2, "dset2", H5T_NATIVE_INT, data2); + if (status == FAIL) { fprintf(stderr, "Error: %s> write_dset failed\n", fname1); status = FAIL; goto out; } - status = write_dset(fid1,2,dims2,"dset3",H5T_NATIVE_INT,data3); - if (status == FAIL) - { + status = write_dset(fid1, 2, dims2, "dset3", H5T_NATIVE_INT, data3); + if (status == FAIL) { fprintf(stderr, "Error: %s> write_dset failed\n", fname1); status = FAIL; goto out; } /* file2 */ - status = write_dset(fid2,2,dims2,"dset1",H5T_NATIVE_INT,data1); - if (status == FAIL) - { + status = write_dset(fid2, 2, dims2, "dset1", H5T_NATIVE_INT, data1); + if (status == FAIL) { fprintf(stderr, "Error: %s> write_dset failed\n", fname2); status = FAIL; goto out; } - status = write_dset(fid2,2,dims2,"dset2",H5T_NATIVE_INT,data2); - if (status == FAIL) - { + status = write_dset(fid2, 2, dims2, "dset2", H5T_NATIVE_INT, data2); + if (status == FAIL) { fprintf(stderr, "Error: %s> write_dset failed\n", fname2); status = FAIL; goto out; } - status = write_dset(fid2,2,dims2,"dset3",H5T_NATIVE_INT,data3); - if (status == FAIL) - { + status = write_dset(fid2, 2, dims2, "dset3", H5T_NATIVE_INT, data3); + if (status == FAIL) { fprintf(stderr, "Error: %s> write_dset failed\n", fname2); status = FAIL; goto out; @@ -2597,163 +2479,142 @@ static int test_group_recurse(const char *fname1, const char *fname2) * Datasets under group *------------------------------------------------------------------------*/ /* file1 */ - status = write_dset(gid1_f1,2,dims2,"dset1",H5T_NATIVE_INT,data1); - if (status == FAIL) - { + status = write_dset(gid1_f1, 2, dims2, "dset1", H5T_NATIVE_INT, data1); + if (status == FAIL) { fprintf(stderr, "Error: %s> write_dset failed\n", fname1); status = FAIL; goto out; } - status = write_dset(gid2_f1,2,dims2,"dset1",H5T_NATIVE_INT,data1); - if (status == FAIL) - { + status = write_dset(gid2_f1, 2, dims2, "dset1", H5T_NATIVE_INT, data1); + if (status == FAIL) { fprintf(stderr, "Error: %s> write_dset failed\n", fname1); status = FAIL; goto out; } - status = write_dset(gid2_f1,2,dims2,"dset2",H5T_NATIVE_INT,data2); - if (status == FAIL) - { + status = write_dset(gid2_f1, 2, dims2, "dset2", H5T_NATIVE_INT, data2); + if (status == FAIL) { fprintf(stderr, "Error: %s> write_dset failed\n", fname1); status = FAIL; goto out; } - status = write_dset(gid3_f1,2,dims2,"dset1",H5T_NATIVE_INT,data1); - if (status == FAIL) - { + status = write_dset(gid3_f1, 2, dims2, "dset1", H5T_NATIVE_INT, data1); + if (status == FAIL) { fprintf(stderr, "Error: %s> write_dset failed\n", fname1); status = FAIL; goto out; } - status = write_dset(gid3_f1,2,dims2,"dset2",H5T_NATIVE_INT,data2); - if (status == FAIL) - { + status = write_dset(gid3_f1, 2, dims2, "dset2", H5T_NATIVE_INT, data2); + if (status == FAIL) { fprintf(stderr, "Error: %s> write_dset failed\n", fname1); status = FAIL; goto out; } - status = write_dset(gid3_f1,2,dims2,"dset3",H5T_NATIVE_INT,data3); - if (status == FAIL) - { + status = write_dset(gid3_f1, 2, dims2, "dset3", H5T_NATIVE_INT, data3); + if (status == FAIL) { fprintf(stderr, "Error: %s> write_dset failed\n", fname1); status = FAIL; goto out; } - status = write_dset(gid10_f1,2,dims2,"dset4",H5T_NATIVE_INT,data1); - if (status == FAIL) - { + status = write_dset(gid10_f1, 2, dims2, "dset4", H5T_NATIVE_INT, data1); + if (status == FAIL) { fprintf(stderr, "Error: %s> write_dset failed\n", fname1); status = FAIL; goto out; } - status = write_dset(gid10_f1,2,dims2,"dset5",H5T_NATIVE_INT,data3); - if (status == FAIL) - { + status = write_dset(gid10_f1, 2, dims2, "dset5", H5T_NATIVE_INT, data3); + if (status == FAIL) { fprintf(stderr, "Error: %s> write_dset failed\n", fname1); status = FAIL; goto out; } /* file2 */ - status = write_dset(gid1_f2,2,dims2,"dset1",H5T_NATIVE_INT,data1); - if (status == FAIL) - { + status = write_dset(gid1_f2, 2, dims2, "dset1", H5T_NATIVE_INT, data1); + if (status == FAIL) { fprintf(stderr, "Error: %s> write_dset failed\n", fname2); status = FAIL; goto out; } - status = write_dset(gid2_f2,2,dims2,"dset1",H5T_NATIVE_INT,data1); - if (status == FAIL) - { + status = write_dset(gid2_f2, 2, dims2, "dset1", H5T_NATIVE_INT, data1); + if (status == FAIL) { fprintf(stderr, "Error: %s> write_dset failed\n", fname2); status = FAIL; goto out; } - status = write_dset(gid2_f2,2,dims2,"dset2",H5T_NATIVE_INT,data2); - if (status == FAIL) - { + status = write_dset(gid2_f2, 2, dims2, "dset2", H5T_NATIVE_INT, data2); + if (status == FAIL) { fprintf(stderr, "Error: %s> write_dset failed\n", fname2); status = FAIL; goto out; } - status = write_dset(gid3_f2,2,dims2,"dset1",H5T_NATIVE_INT,data1); - if (status == FAIL) - { + status = write_dset(gid3_f2, 2, dims2, "dset1", H5T_NATIVE_INT, data1); + if (status == FAIL) { fprintf(stderr, "Error: %s> write_dset failed\n", fname2); status = FAIL; goto out; } - status = write_dset(gid3_f2,2,dims2,"dset2",H5T_NATIVE_INT,data2); - if (status == FAIL) - { + status = write_dset(gid3_f2, 2, dims2, "dset2", H5T_NATIVE_INT, data2); + if (status == FAIL) { fprintf(stderr, "Error: %s> write_dset failed\n", fname2); status = FAIL; goto out; } - status = write_dset(gid3_f2,2,dims2,"dset3",H5T_NATIVE_INT,data3); - if (status == FAIL) - { + status = write_dset(gid3_f2, 2, dims2, "dset3", H5T_NATIVE_INT, data3); + if (status == FAIL) { fprintf(stderr, "Error: %s> write_dset failed\n", fname2); status = FAIL; goto out; } - status = write_dset(gid11_f2,2,dims2,"dset4",H5T_NATIVE_INT,data1); - if (status == FAIL) - { + status = write_dset(gid11_f2, 2, dims2, "dset4", H5T_NATIVE_INT, data1); + if (status == FAIL) { fprintf(stderr, "Error: %s> write_dset failed\n", fname2); status = FAIL; goto out; } - status = write_dset(gid11_f2,2,dims2,"dset5",H5T_NATIVE_INT,data2); - if (status == FAIL) - { + status = write_dset(gid11_f2, 2, dims2, "dset5", H5T_NATIVE_INT, data2); + if (status == FAIL) { fprintf(stderr, "Error: %s> write_dset failed\n", fname2); status = FAIL; goto out; } - /*----------------------------------------------------------------------- * Soft Links *------------------------------------------------------------------------*/ /* file 1 */ status = H5Lcreate_soft("/grp1", fid1, "slink_grp1", H5P_DEFAULT, H5P_DEFAULT); - if (status < 0) - { + if (status < 0) { fprintf(stderr, "Error: %s> H5Lcreate_soft failed.\n", fname1); status = FAIL; goto out; } status = H5Lcreate_soft("/grp1/grp2", fid1, "slink_grp2", H5P_DEFAULT, H5P_DEFAULT); - if (status < 0) - { + if (status < 0) { fprintf(stderr, "Error: %s> H5Lcreate_soft failed.\n", fname1); status = FAIL; goto out; } status = H5Lcreate_soft("/grp1/grp2/grp3", fid1, "slink_grp3", H5P_DEFAULT, H5P_DEFAULT); - if (status < 0) - { + if (status < 0) { fprintf(stderr, "Error: %s> H5Lcreate_soft failed.\n", fname1); status = FAIL; goto out; } status = H5Lcreate_soft("/grp10", fid1, "slink_grp10", H5P_DEFAULT, H5P_DEFAULT); - if (status < 0) - { + if (status < 0) { fprintf(stderr, "Error: %s> H5Lcreate_soft failed.\n", fname1); status = FAIL; goto out; @@ -2761,32 +2622,28 @@ static int test_group_recurse(const char *fname1, const char *fname2) /* file 2 */ status = H5Lcreate_soft("/grp1", fid2, "slink_grp1", H5P_DEFAULT, H5P_DEFAULT); - if (status < 0) - { + if (status < 0) { fprintf(stderr, "Error: %s> H5Lcreate_soft failed.\n", fname2); status = FAIL; goto out; } status = H5Lcreate_soft("/grp1/grp2", fid2, "slink_grp2", H5P_DEFAULT, H5P_DEFAULT); - if (status < 0) - { + if (status < 0) { fprintf(stderr, "Error: %s> H5Lcreate_soft failed.\n", fname2); status = FAIL; goto out; } status = H5Lcreate_soft("/grp1/grp2/grp3", fid2, "slink_grp3", H5P_DEFAULT, H5P_DEFAULT); - if (status < 0) - { + if (status < 0) { fprintf(stderr, "Error: %s> H5Lcreate_soft failed.\n", fname2); status = FAIL; goto out; } status = H5Lcreate_soft("/grp11", fid2, "slink_grp11", H5P_DEFAULT, H5P_DEFAULT); - if (status < 0) - { + if (status < 0) { fprintf(stderr, "Error: %s> H5Lcreate_soft failed.\n", fname2); status = FAIL; goto out; @@ -2797,24 +2654,21 @@ static int test_group_recurse(const char *fname1, const char *fname2) *------------------------------------------------------------------------*/ /* file1 */ status = H5Lcreate_external(fname2, "/grp1", fid1, "elink_grp1", H5P_DEFAULT, H5P_DEFAULT); - if (status < 0) - { + if (status < 0) { fprintf(stderr, "Error: %s> H5Lcreate_external failed.\n", fname1); status = FAIL; goto out; } status = H5Lcreate_external(fname2, "/grp1/grp2", fid1, "elink_grp2", H5P_DEFAULT, H5P_DEFAULT); - if (status < 0) - { + if (status < 0) { fprintf(stderr, "Error: %s> H5Lcreate_external failed.\n", fname1); status = FAIL; goto out; } status = H5Lcreate_external(fname2, "/grp1/grp2/grp3", fid1, "elink_grp3", H5P_DEFAULT, H5P_DEFAULT); - if (status < 0) - { + if (status < 0) { fprintf(stderr, "Error: %s> H5Lcreate_external failed.\n", fname1); status = FAIL; goto out; @@ -2822,225 +2676,210 @@ static int test_group_recurse(const char *fname1, const char *fname2) /* file2 */ status = H5Lcreate_external(fname1, "/grp1", fid2, "elink_grp1", H5P_DEFAULT, H5P_DEFAULT); - if (status < 0) - { + if (status < 0) { fprintf(stderr, "Error: %s> H5Lcreate_external failed.\n", fname2); status = FAIL; goto out; } status = H5Lcreate_external(fname1, "/grp1/grp2", fid2, "elink_grp2", H5P_DEFAULT, H5P_DEFAULT); - if (status < 0) - { + if (status < 0) { fprintf(stderr, "Error: %s> H5Lcreate_external failed.\n", fname2); status = FAIL; goto out; } status = H5Lcreate_external(fname1, "/grp1/grp2/grp3", fid2, "elink_grp3", H5P_DEFAULT, H5P_DEFAULT); - if (status < 0) - { + if (status < 0) { fprintf(stderr, "Error: %s> H5Lcreate_external failed.\n", fname2); status = FAIL; goto out; } /*------------------------------ - * external circle route test - * file1/grp11 <-> file2/grp10 via elink_grp_circle link - */ + * external circle route test + * file1/grp11 <-> file2/grp10 via elink_grp_circle link + */ /* file1 */ status = H5Lcreate_external(fname2, "/grp11", gid10_f1, "elink_grp_circle", H5P_DEFAULT, H5P_DEFAULT); - if (status < 0) - { + if (status < 0) { fprintf(stderr, "Error: %s> H5Lcreate_external failed.\n", fname1); status = FAIL; goto out; } /* file2 */ status = H5Lcreate_external(fname1, "/grp10", gid11_f2, "elink_grp_circle", H5P_DEFAULT, H5P_DEFAULT); - if (status < 0) - { + if (status < 0) { fprintf(stderr, "Error: %s> H5Lcreate_external failed.\n", fname2); status = FAIL; goto out; } - out: /*----------------------------------------------------------------------- * Close *-----------------------------------------------------------------------*/ - if(fid1) + if (fid1) H5Fclose(fid1); - if(fid2) + if (fid2) H5Fclose(fid2); - if(gid1_f1) + if (gid1_f1) H5Gclose(gid1_f1); - if(gid2_f1) + if (gid2_f1) H5Gclose(gid2_f1); - if(gid3_f1) + if (gid3_f1) H5Gclose(gid3_f1); - if(gid1_f2) + if (gid1_f2) H5Gclose(gid1_f2); - if(gid2_f2) + if (gid2_f2) H5Gclose(gid2_f2); - if(gid3_f2) + if (gid3_f2) H5Gclose(gid3_f2); return status; } /*------------------------------------------------------------------------- -* -* Purpose: -* For testing comparing group member objects recursively via multiple -* linked external links -* -* Programmer: Jonathan Kim (Sep 16, 2010) -* -*-------------------------------------------------------------------------*/ + * + * Purpose: + * For testing comparing group member objects recursively via multiple + * linked external links + * + * Programmer: Jonathan Kim (Sep 16, 2010) + * + *-------------------------------------------------------------------------*/ #define GRP_R_DSETNAME1 "dset1" #define GRP_R_DSETNAME2 "dset2" static int test_group_recurse2(void) { - hid_t fileid1 = -1; - hid_t grp1 = -1; - hid_t grp2 = -1; - hid_t grp3 = -1; - hid_t grp4 = -1; - hid_t dset1 = -1; - hid_t dset2 = -1; - hid_t datatype = -1; - hid_t dataspace = -1; - hid_t fileid2 = -1; - hid_t fileid3 = -1; - hid_t fileid4 = -1; - hsize_t dimsf[2]; /* dataset dimensions */ - herr_t status=0; - int data1[4][2] = {{0,0},{1,1},{2,2},{3,3}}; - int data2[4][2] = {{0,0},{0,1},{0,2},{3,3}}; - - /*----------------------------------------------------------------------- + hid_t fileid1 = -1; + hid_t grp1 = -1; + hid_t grp2 = -1; + hid_t grp3 = -1; + hid_t grp4 = -1; + hid_t dset1 = -1; + hid_t dset2 = -1; + hid_t datatype = -1; + hid_t dataspace = -1; + hid_t fileid2 = -1; + hid_t fileid3 = -1; + hid_t fileid4 = -1; + hsize_t dimsf[2]; /* dataset dimensions */ + herr_t status = 0; + int data1[4][2] = { { 0, 0 }, { 1, 1 }, { 2, 2 }, { 3, 3 } }; + int data2[4][2] = { { 0, 0 }, { 0, 1 }, { 0, 2 }, { 3, 3 } }; + + /*----------------------------------------------------------------------- * FILE 1 *------------------------------------------------------------------------*/ /* - * Create a new file using H5F_ACC_TRUNC access, - * default file creation properties, and default file - * access properties. - */ + * Create a new file using H5F_ACC_TRUNC access, + * default file creation properties, and default file + * access properties. + */ fileid1 = H5Fcreate(GRP_RECURSE1_EXT, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT); - /*----------------------------------------------------------------------- + /*----------------------------------------------------------------------- * Groups *------------------------------------------------------------------------*/ grp1 = H5Gcreate2(fileid1, "/g1", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); - if (grp1 < 0) - { + if (grp1 < 0) { fprintf(stderr, "Error: %s> H5Gcreate2 failed.\n", GRP_RECURSE1_EXT); status = FAIL; goto out; } grp2 = H5Gcreate2(grp1, "g2", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); - if (grp2 < 0) - { + if (grp2 < 0) { fprintf(stderr, "Error: %s> H5Gcreate2 failed.\n", GRP_RECURSE1_EXT); status = FAIL; goto out; } grp3 = H5Gcreate2(grp2, "g3", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); - if (grp3 < 0) - { + if (grp3 < 0) { fprintf(stderr, "Error: %s> H5Gcreate2 failed.\n", GRP_RECURSE1_EXT); status = FAIL; goto out; } grp4 = H5Gcreate2(grp3, "g4", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); - if (grp4 < 0) - { + if (grp4 < 0) { fprintf(stderr, "Error: %s> H5Gcreate2 failed.\n", GRP_RECURSE1_EXT); status = FAIL; goto out; } - - /*----------------------------------------------------------------------- + /*----------------------------------------------------------------------- * Datasets *------------------------------------------------------------------------*/ /* - * Describe the size of the array and create the data space for fixed - * size dataset. - */ + * Describe the size of the array and create the data space for fixed + * size dataset. + */ dimsf[0] = 4; dimsf[1] = 2; dataspace = H5Screate_simple(2, dimsf, NULL); /* - * Define datatype for the data in the file. - * We will store little endian INT numbers. - */ + * Define datatype for the data in the file. + * We will store little endian INT numbers. + */ datatype = H5Tcopy(H5T_NATIVE_INT); status = H5Tset_order(datatype, H5T_ORDER_LE); /*--------------- - * dset1 - */ + * dset1 + */ /* - * Create a new dataset within the file using defined dataspace and - * datatype and default dataset creation properties. - */ - dset1 = H5Dcreate2(fileid1, GRP_R_DSETNAME1, datatype, dataspace, - H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); + * Create a new dataset within the file using defined dataspace and + * datatype and default dataset creation properties. + */ + dset1 = H5Dcreate2(fileid1, GRP_R_DSETNAME1, datatype, dataspace, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); /* - * Write the data to the dataset using default transfer properties. - */ + * Write the data to the dataset using default transfer properties. + */ status = H5Dwrite(dset1, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, data1); H5Dclose(dset1); /*--------------- - * dset1 - */ + * dset1 + */ /* - * Create a new dataset within the file using defined dataspace and - * datatype and default dataset creation properties. - */ - dset1 = H5Dcreate2(grp3, GRP_R_DSETNAME1, datatype, dataspace, - H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); + * Create a new dataset within the file using defined dataspace and + * datatype and default dataset creation properties. + */ + dset1 = H5Dcreate2(grp3, GRP_R_DSETNAME1, datatype, dataspace, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); /* - * Write the data to the dataset using default transfer properties. - */ + * Write the data to the dataset using default transfer properties. + */ status = H5Dwrite(dset1, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, data1); /*--------------- - * dset2 - */ + * dset2 + */ /* - * Create a new dataset within the fileid1 using defined dataspace and - * datatype and default dataset creation properties. - */ - dset2 = H5Dcreate2(grp4, GRP_R_DSETNAME2, datatype, dataspace, - H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); + * Create a new dataset within the fileid1 using defined dataspace and + * datatype and default dataset creation properties. + */ + dset2 = H5Dcreate2(grp4, GRP_R_DSETNAME2, datatype, dataspace, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); /* - * Write the data to the dataset using default transfer properties. - */ + * Write the data to the dataset using default transfer properties. + */ status = H5Dwrite(dset2, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, data2); - /*----------------------------------------------------------------------- + /*----------------------------------------------------------------------- * Soft links *------------------------------------------------------------------------*/ /* - * under '/' root - */ + * under '/' root + */ /* link to dset1 */ status = H5Lcreate_soft(GRP_R_DSETNAME1, fileid1, "soft_dset1", H5P_DEFAULT, H5P_DEFAULT); - if (status < 0) - { + if (status < 0) { fprintf(stderr, "Error: %s> H5Lcreate_soft failed.\n", GRP_RECURSE1_EXT); status = FAIL; goto out; @@ -3053,90 +2892,83 @@ static int test_group_recurse2(void) H5Gclose(grp3); H5Gclose(grp4); - /*----------------------------------------------------------------------- + /*----------------------------------------------------------------------- * FILE 2-3 *------------------------------------------------------------------------*/ /* crate target file */ fileid4 = H5Fcreate(GRP_RECURSE2_EXT3, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT); - /*----------------------------------------------- + /*----------------------------------------------- * Groups */ grp4 = H5Gcreate2(fileid4, "/g4", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); - if (grp4 < 0) - { + if (grp4 < 0) { fprintf(stderr, "Error: %s> H5Gcreate2 failed.\n", GRP_RECURSE2_EXT3); status = FAIL; goto out; } /*--------------- - * dset2 - */ + * dset2 + */ /* - * Create a new dataset within the fileid1 using defined dataspace and - * datatype and default dataset creation properties. - */ - dset2 = H5Dcreate2(grp4, GRP_R_DSETNAME2, datatype, dataspace, - H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); + * Create a new dataset within the fileid1 using defined dataspace and + * datatype and default dataset creation properties. + */ + dset2 = H5Dcreate2(grp4, GRP_R_DSETNAME2, datatype, dataspace, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); /* - * Write the data to the dataset using default transfer properties. - */ + * Write the data to the dataset using default transfer properties. + */ status = H5Dwrite(dset2, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, data2); H5Gclose(grp4); H5Dclose(dset2); - - /*----------------------------------------------------------------------- + /*----------------------------------------------------------------------- * FILE 2-2 *------------------------------------------------------------------------*/ /* crate target file */ fileid3 = H5Fcreate(GRP_RECURSE2_EXT2, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT); - /*----------------------------------------------- + /*----------------------------------------------- * Groups */ grp2 = H5Gcreate2(fileid3, "g2", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); - if (grp2 < 0) - { + if (grp2 < 0) { fprintf(stderr, "Error: %s> H5Gcreate2 failed.\n", GRP_RECURSE2_EXT2); status = FAIL; goto out; } grp3 = H5Gcreate2(grp2, "g3", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); - if (grp3 < 0) - { + if (grp3 < 0) { fprintf(stderr, "Error: %s> H5Gcreate2 failed.\n", GRP_RECURSE2_EXT2); status = FAIL; goto out; } /*--------------- - * dset1 - */ + * dset1 + */ /* - * Create a new dataset within the fileid1 using defined dataspace and - * datatype and default dataset creation properties. - */ - dset1 = H5Dcreate2(grp3, GRP_R_DSETNAME1, datatype, dataspace, - H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); + * Create a new dataset within the fileid1 using defined dataspace and + * datatype and default dataset creation properties. + */ + dset1 = H5Dcreate2(grp3, GRP_R_DSETNAME1, datatype, dataspace, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); /* - * Write the data to the dataset using default transfer properties. - */ + * Write the data to the dataset using default transfer properties. + */ status = H5Dwrite(dset1, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, data1); - /*----------------------------------------------- + /*----------------------------------------------- * extlink to $GRP_RECURSE2_EXT3/g4 */ status = H5Lcreate_external(GRP_RECURSE2_EXT3, "/g4", fileid3, "/g2/g3/g4", H5P_DEFAULT, H5P_DEFAULT); - if (status < 0) - { + if (status < 0) { fprintf(stderr, "Error: %s> H5Lcreate_external failed.\n", GRP_RECURSE2_EXT2); status = FAIL; goto out; @@ -3146,56 +2978,52 @@ static int test_group_recurse2(void) H5Gclose(grp2); H5Gclose(grp3); - /*----------------------------------------------------------------------- + /*----------------------------------------------------------------------- * FILE 2-1 *------------------------------------------------------------------------*/ /* crate target file */ fileid2 = H5Fcreate(GRP_RECURSE2_EXT1, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT); - /*----------------------------------------------- + /*----------------------------------------------- * Groups */ grp1 = H5Gcreate2(fileid2, "g1", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); - if (grp1 < 0) - { + if (grp1 < 0) { fprintf(stderr, "Error: %s> H5Gcreate2 failed.\n", GRP_RECURSE1_EXT); status = FAIL; goto out; } /*--------------- - * dset1 - */ - dset1 = H5Dcreate2(fileid2, GRP_R_DSETNAME1, datatype, dataspace, - H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); + * dset1 + */ + dset1 = H5Dcreate2(fileid2, GRP_R_DSETNAME1, datatype, dataspace, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); /* - * Write the data to the dataset using default transfer properties. - */ + * Write the data to the dataset using default transfer properties. + */ status = H5Dwrite(dset1, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, data1); - /*----------------------------------------------------------------------- + /*----------------------------------------------------------------------- * Soft links *------------------------------------------------------------------------*/ /* - * under '/' root - */ + * under '/' root + */ /* link to dset1 */ status = H5Lcreate_soft(GRP_R_DSETNAME1, fileid2, "soft_dset1", H5P_DEFAULT, H5P_DEFAULT); - if (status < 0) - { + if (status < 0) { fprintf(stderr, "Error: %s> H5Lcreate_soft failed.\n", GRP_RECURSE2_EXT1); status = FAIL; goto out; } - /*----------------------------------------------- + /*----------------------------------------------- * extlink to $GRP_RECURSE2_EXT2/g2 */ status = H5Lcreate_external(GRP_RECURSE2_EXT2, "/g2", fileid2, "/g1/g2", H5P_DEFAULT, H5P_DEFAULT); - if (status < 0) - { + if (status < 0) { fprintf(stderr, "Error: %s> H5Lcreate_external failed.\n", GRP_RECURSE2_EXT1); status = FAIL; goto out; @@ -3206,72 +3034,67 @@ static int test_group_recurse2(void) out: /* - * Close/release resources. - */ - if(dataspace > 0) + * Close/release resources. + */ + if (dataspace > 0) H5Sclose(dataspace); - if(datatype > 0) + if (datatype > 0) H5Tclose(datatype); - if(fileid1 > 0) + if (fileid1 > 0) H5Fclose(fileid1); - if(fileid2 > 0) + if (fileid2 > 0) H5Fclose(fileid2); - if(fileid3 > 0) + if (fileid3 > 0) H5Fclose(fileid3); - if(fileid4 > 0) + if (fileid4 > 0) H5Fclose(fileid4); return status; } - /*------------------------------------------------------------------------- -* -* Purpose: Create test files for excluding obj. -* Same structure, same obj names -* Test : exclude obj with different value to verify the rest are same -* -* Programmer: Jonathan Kim (July, 21, 2010) -* -*-------------------------------------------------------------------------*/ + * + * Purpose: Create test files for excluding obj. + * Same structure, same obj names + * Test : exclude obj with different value to verify the rest are same + * + * Programmer: Jonathan Kim (July, 21, 2010) + * + *-------------------------------------------------------------------------*/ static int test_exclude_obj1(const char *fname1, const char *fname2) { - hid_t fid1=0; - hid_t fid2=0; - hid_t gid1=0; - hid_t gid2=0; - hsize_t dims2[2] = {2,4}; - int data1[4][2] = {{0,0},{0,0},{0,0},{0,0}}; - int data2[4][2] = {{0,1},{2,3},{1,2},{3,4}}; - herr_t status = SUCCEED; + hid_t fid1 = -1; + hid_t fid2 = -1; + hid_t gid1 = -1; + hid_t gid2 = -1; + hsize_t dims2[2] = { 2, 4 }; + int data1[4][2] = { { 0, 0 }, { 0, 0 }, { 0, 0 }, { 0, 0 } }; + int data2[4][2] = { { 0, 1 }, { 2, 3 }, { 1, 2 }, { 3, 4 } }; + herr_t status = SUCCEED; /*----------------------------------------------------------------------- * Create file(s) *------------------------------------------------------------------------*/ - fid1 = H5Fcreate (fname1, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT); - if (fid1 < 0) - { + fid1 = H5Fcreate(fname1, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT); + if (fid1 < 0) { fprintf(stderr, "Error: %s> H5Fcreate failed.\n", fname1); status = FAIL; goto out; } - fid2 = H5Fcreate (fname2, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT); - if (fid2 < 0) - { + fid2 = H5Fcreate(fname2, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT); + if (fid2 < 0) { fprintf(stderr, "Error: %s> H5Fcreate failed.\n", fname2); status = FAIL; goto out; } - - /*----------------------------------------------------------------------- + /*----------------------------------------------------------------------- * Group *------------------------------------------------------------------------*/ /* file1 */ gid1 = H5Gcreate2(fid1, "group1", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); - if (gid1 < 0) - { + if (gid1 < 0) { fprintf(stderr, "Error: %s> H5Gcreate2 failed.\n", fname1); status = FAIL; goto out; @@ -3280,133 +3103,119 @@ static int test_exclude_obj1(const char *fname1, const char *fname2) /* file2 */ gid2 = H5Gcreate2(fid2, "group1", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); - if (gid2 < 0) - { + if (gid2 < 0) { fprintf(stderr, "Error: %s> H5Gcreate2 failed.\n", fname2); status = FAIL; goto out; } - /*----------------------------------------------------------------------- * Datasets *------------------------------------------------------------------------*/ /* file1 */ - status = write_dset(fid1,2,dims2,"dset1",H5T_NATIVE_INT,data1); - if (status == FAIL) - { + status = write_dset(fid1, 2, dims2, "dset1", H5T_NATIVE_INT, data1); + if (status == FAIL) { fprintf(stderr, "Error: %s> write_dset failed\n", fname1); status = FAIL; goto out; } - status = write_dset(gid1,2,dims2,"dset2",H5T_NATIVE_INT,data1); - if (status == FAIL) - { + status = write_dset(gid1, 2, dims2, "dset2", H5T_NATIVE_INT, data1); + if (status == FAIL) { fprintf(stderr, "Error: %s> write_dset failed\n", fname1); status = FAIL; goto out; } - status = write_dset(gid1,2,dims2,"dset3",H5T_NATIVE_INT,data1); - if (status == FAIL) - { + status = write_dset(gid1, 2, dims2, "dset3", H5T_NATIVE_INT, data1); + if (status == FAIL) { fprintf(stderr, "Error: %s> write_dset failed\n", fname1); status = FAIL; goto out; } - /* file2 */ - status = write_dset(fid2,2,dims2,"dset1",H5T_NATIVE_INT,data1); - if (status == FAIL) - { + status = write_dset(fid2, 2, dims2, "dset1", H5T_NATIVE_INT, data1); + if (status == FAIL) { fprintf(stderr, "Error: %s> write_dset failed\n", fname2); status = FAIL; goto out; } - status = write_dset(gid2,2,dims2,"dset2",H5T_NATIVE_INT,data1); - if (status == FAIL) - { + status = write_dset(gid2, 2, dims2, "dset2", H5T_NATIVE_INT, data1); + if (status == FAIL) { fprintf(stderr, "Error: %s> write_dset failed\n", fname2); status = FAIL; goto out; } - status = write_dset(gid2,2,dims2,"dset3",H5T_NATIVE_INT,data2); - if (status == FAIL) - { + status = write_dset(gid2, 2, dims2, "dset3", H5T_NATIVE_INT, data2); + if (status == FAIL) { fprintf(stderr, "Error: %s> write_dset failed\n", fname2); status = FAIL; goto out; } - out: /*----------------------------------------------------------------------- * Close *-----------------------------------------------------------------------*/ - if(fid1) + if (fid1) H5Fclose(fid1); - if(fid2) + if (fid2) H5Fclose(fid2); - if(gid1) + if (gid1) H5Gclose(gid1); - if(gid2) + if (gid2) H5Gclose(gid2); return status; } /*------------------------------------------------------------------------- -* -* Purpose: Create test files for excluding obj. -* different structure and name -* Test : exclude different objs to verify the rest are same -* -* Programmer: Jonathan Kim (July, 21, 2010) -* -*-------------------------------------------------------------------------*/ + * + * Purpose: Create test files for excluding obj. + * different structure and name + * Test : exclude different objs to verify the rest are same + * + * Programmer: Jonathan Kim (July, 21, 2010) + * + *-------------------------------------------------------------------------*/ static int test_exclude_obj2(const char *fname1, const char *fname2) { - hid_t fid1=0; - hid_t fid2=0; - hid_t gid1=0; - hid_t gid2=0; - hid_t gid3=0; - hsize_t dims2[2] = {2,4}; - int data1[4][2] = {{0,0},{0,0},{0,0},{0,0}}; - int data2[4][2] = {{0,1},{2,3},{1,2},{3,4}}; - herr_t status = SUCCEED; + hid_t fid1 = -1; + hid_t fid2 = -1; + hid_t gid1 = -1; + hid_t gid2 = -1; + hid_t gid3 = -1; + hsize_t dims2[2] = { 2, 4 }; + int data1[4][2] = { { 0, 0 }, { 0, 0 }, { 0, 0 }, { 0, 0 } }; + int data2[4][2] = { { 0, 1 }, { 2, 3 }, { 1, 2 }, { 3, 4 } }; + herr_t status = SUCCEED; /*----------------------------------------------------------------------- * Create file(s) *------------------------------------------------------------------------*/ - fid1 = H5Fcreate (fname1, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT); - if (fid1 < 0) - { + fid1 = H5Fcreate(fname1, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT); + if (fid1 < 0) { fprintf(stderr, "Error: %s> H5Fcreate failed.\n", fname1); status = FAIL; goto out; } - fid2 = H5Fcreate (fname2, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT); - if (fid2 < 0) - { + fid2 = H5Fcreate(fname2, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT); + if (fid2 < 0) { fprintf(stderr, "Error: %s> H5Fcreate failed.\n", fname2); status = FAIL; goto out; } - - /*----------------------------------------------------------------------- + /*----------------------------------------------------------------------- * Group *------------------------------------------------------------------------*/ /* file1 */ gid1 = H5Gcreate2(fid1, "group10", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); - if (gid1 < 0) - { + if (gid1 < 0) { fprintf(stderr, "Error: %s> H5Gcreate2 failed.\n", fname1); status = FAIL; goto out; @@ -3414,9 +3223,7 @@ static int test_exclude_obj2(const char *fname1, const char *fname2) /* file2 */ gid2 = H5Gcreate2(fid2, "group10", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); - - if (gid2 < 0) - { + if (gid2 < 0) { fprintf(stderr, "Error: %s> H5Gcreate2 failed.\n", fname2); status = FAIL; goto out; @@ -3425,133 +3232,118 @@ static int test_exclude_obj2(const char *fname1, const char *fname2) /* subset name from group10 */ gid3 = H5Gcreate2(fid2, "group1", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); - if (gid3 < 0) - { + if (gid3 < 0) { fprintf(stderr, "Error: %s> H5Gcreate2 failed.\n", fname2); status = FAIL; goto out; } - /*----------------------------------------------------------------------- * Datasets *------------------------------------------------------------------------*/ /* file1 */ - status = write_dset(fid1,2,dims2,"dset10",H5T_NATIVE_INT,data1); - if (status == FAIL) - { + status = write_dset(fid1, 2, dims2, "dset10", H5T_NATIVE_INT, data1); + if (status == FAIL) { fprintf(stderr, "Error: %s> write_dset failed\n", fname1); status = FAIL; goto out; } - status = write_dset(fid1,2,dims2,"dset1",H5T_NATIVE_INT,data1); - if (status == FAIL) - { + status = write_dset(fid1, 2, dims2, "dset1", H5T_NATIVE_INT, data1); + if (status == FAIL) { fprintf(stderr, "Error: %s> write_dset failed\n", fname1); status = FAIL; goto out; } - status = write_dset(gid1,2,dims2,"dset2",H5T_NATIVE_INT,data1); - if (status == FAIL) - { + status = write_dset(gid1, 2, dims2, "dset2", H5T_NATIVE_INT, data1); + if (status == FAIL) { fprintf(stderr, "Error: %s> write_dset failed\n", fname1); status = FAIL; goto out; } - /* file2 */ - status = write_dset(fid2,2,dims2,"dset10",H5T_NATIVE_INT,data1); - if (status == FAIL) - { + status = write_dset(fid2, 2, dims2, "dset10", H5T_NATIVE_INT, data1); + if (status == FAIL) { fprintf(stderr, "Error: %s> write_dset failed\n", fname2); status = FAIL; goto out; } - status = write_dset(gid2,2,dims2,"dset2",H5T_NATIVE_INT,data1); - if (status == FAIL) - { + status = write_dset(gid2, 2, dims2, "dset2", H5T_NATIVE_INT, data1); + if (status == FAIL) { fprintf(stderr, "Error: %s> write_dset failed\n", fname2); status = FAIL; goto out; } - status = write_dset(gid3,2,dims2,"dset3",H5T_NATIVE_INT,data2); - if (status == FAIL) - { + status = write_dset(gid3, 2, dims2, "dset3", H5T_NATIVE_INT, data2); + if (status == FAIL) { fprintf(stderr, "Error: %s> write_dset failed\n", fname2); status = FAIL; goto out; } - out: /*----------------------------------------------------------------------- * Close *-----------------------------------------------------------------------*/ - if(fid1) + if (fid1) H5Fclose(fid1); - if(fid2) + if (fid2) H5Fclose(fid2); - if(gid1) + if (gid1) H5Gclose(gid1); - if(gid2) + if (gid2) H5Gclose(gid2); - if(gid3) + if (gid3) H5Gclose(gid3); return status; } /*------------------------------------------------------------------------- -* -* Purpose: Create test files for excluding obj. -* Only one file contains unique objs. Common objs are same. -* Test : exclude unique objs to verify the rest are same -* - HDFFV-7837 -* -* Programmer: Jonathan Kim (Mar, 19, 2012) -* -*-------------------------------------------------------------------------*/ + * + * Purpose: Create test files for excluding obj. + * Only one file contains unique objs. Common objs are same. + * Test : exclude unique objs to verify the rest are same - HDFFV-7837 + * + * Programmer: Jonathan Kim (Mar, 19, 2012) + * + *-------------------------------------------------------------------------*/ static int test_exclude_obj3(const char *fname1, const char *fname2) { - hid_t fid1=0; - hid_t fid2=0; - hid_t gid1=0; - hsize_t dims2[2] = {2,4}; - int data1[4][2] = {{0,0},{0,0},{0,0},{0,0}}; - herr_t status = SUCCEED; + hid_t fid1 = -1; + hid_t fid2 = -1; + hid_t gid1 = -1; + hsize_t dims2[2] = { 2, 4 }; + int data1[4][2] = { { 0, 0 }, { 0, 0 }, { 0, 0 }, { 0, 0 } }; + herr_t status = SUCCEED; /*----------------------------------------------------------------------- * Create file(s) *------------------------------------------------------------------------*/ - fid1 = H5Fcreate (fname1, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT); - if (fid1 < 0) - { + fid1 = H5Fcreate(fname1, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT); + if (fid1 < 0) { fprintf(stderr, "Error: %s> H5Fcreate failed.\n", fname1); status = FAIL; goto out; } - fid2 = H5Fcreate (fname2, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT); - if (fid2 < 0) - { + fid2 = H5Fcreate(fname2, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT); + if (fid2 < 0) { fprintf(stderr, "Error: %s> H5Fcreate failed.\n", fname2); status = FAIL; goto out; } - - /*----------------------------------------------------------------------- + /*----------------------------------------------------------------------- * Group *------------------------------------------------------------------------*/ /* file1 */ gid1 = H5Gcreate2(fid1, "group1", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); - if (gid1 < 0) - { + if (gid1 < 0) { fprintf(stderr, "Error: %s> H5Gcreate2 failed.\n", fname1); status = FAIL; goto out; @@ -3561,26 +3353,23 @@ static int test_exclude_obj3(const char *fname1, const char *fname2) * Datasets *------------------------------------------------------------------------*/ /* file1 */ - status = write_dset(fid1,2,dims2,"dset1",H5T_NATIVE_INT,data1); - if (status == FAIL) - { + status = write_dset(fid1, 2, dims2, "dset1", H5T_NATIVE_INT, data1); + if (status == FAIL) { fprintf(stderr, "Error: %s> write_dset failed\n", fname1); status = FAIL; goto out; } - status = write_dset(gid1,2,dims2,"dset",H5T_NATIVE_INT,data1); - if (status == FAIL) - { + status = write_dset(gid1, 2, dims2, "dset", H5T_NATIVE_INT, data1); + if (status == FAIL) { fprintf(stderr, "Error: %s> write_dset failed\n", fname1); status = FAIL; goto out; } /* file2 */ - status = write_dset(fid2,2,dims2,"dset1",H5T_NATIVE_INT,data1); - if (status == FAIL) - { + status = write_dset(fid2, 2, dims2, "dset1", H5T_NATIVE_INT, data1); + if (status == FAIL) { fprintf(stderr, "Error: %s> write_dset failed\n", fname2); status = FAIL; goto out; @@ -3590,25 +3379,25 @@ out: /*----------------------------------------------------------------------- * Close *-----------------------------------------------------------------------*/ - if(fid1) + if (fid1) H5Fclose(fid1); - if(fid2) + if (fid2) H5Fclose(fid2); - if(gid1) + if (gid1) H5Gclose(gid1); return status; } /*------------------------------------------------------------------------- -* -* Purpose: Create test files for multiple variable length string/string array -* along with fixed length string/string array types in -* a compound type dataset. -* -* Programmer: Jonathan Kim (Oct, 26, 2010) -* -*-------------------------------------------------------------------------*/ + * + * Purpose: Create test files for multiple variable length string/string array + * along with fixed length string/string array types in + * a compound type dataset. + * + * Programmer: Jonathan Kim (Oct, 26, 2010) + * + *-------------------------------------------------------------------------*/ #define STR_RANK 1 #define VLEN_STR_DIM 1 #define FIXLEN_STR_SIZE 21 @@ -3621,187 +3410,170 @@ out: static int test_comp_vlen_strings(const char *fname1, const char *grp_name, int is_file_new) { int i; - - hid_t fid1 = -1; /* file id */ - hid_t gid = -1; + hid_t fid1 = -1; /* file id */ + hid_t gid = -1; /* compound1 datatype */ - typedef struct comp1_t - { - char *str_vlen; /* vlen string */ - char *str_vlen_repeat; /* vlen string */ - char str_fixlen[FIXLEN_STR_SIZE]; /* fixed len string */ - char str_fixlen_repeat[FIXLEN_STR_SIZE]; /* fixed len string */ - const char *str_array_vlen[VLEN_STR_ARRY_DIM]; /* vlen string array */ - const char *str_vlen_array_again[VLEN_STR_ARRY_DIM]; /* vlen string array */ - char str_array_fixlen[FIXLEN_STR_ARRY_DIM][FIXLEN_STR_ARRY_SIZE]; /* fixed len string array */ - char str_fixlen_array_again[FIXLEN_STR_ARRY_DIM][FIXLEN_STR_ARRY_SIZE]; /* fixed len string array */ + typedef struct comp1_t { + char *str_vlen; /* vlen string */ + char *str_vlen_repeat; /* vlen string */ + char str_fixlen[FIXLEN_STR_SIZE]; /* fixed len string */ + char str_fixlen_repeat[FIXLEN_STR_SIZE]; /* fixed len string */ + const char *str_array_vlen[VLEN_STR_ARRY_DIM]; /* vlen string array */ + const char *str_vlen_array_again[VLEN_STR_ARRY_DIM]; /* vlen string array */ + char str_array_fixlen[FIXLEN_STR_ARRY_DIM][FIXLEN_STR_ARRY_SIZE]; /* fixed len string array */ + char str_fixlen_array_again[FIXLEN_STR_ARRY_DIM][FIXLEN_STR_ARRY_SIZE]; /* fixed len string array */ } comp1_t; /* compound2 datatype */ - typedef struct comp2_t - { - char *str_vlen; /* vlen string */ - char str_fixlen[FIXLEN_STR_SIZE]; /* fixed len string */ - char *str_vlen_repeat; /* vlen string */ - char str_fixlen_repeat[FIXLEN_STR_SIZE]; /* fixed len string */ - const char *str_array_vlen[VLEN_STR_ARRY_DIM]; /* vlen string array */ - char str_array_fixlen[FIXLEN_STR_ARRY_DIM][FIXLEN_STR_ARRY_SIZE]; /* fixed len string array */ - const char *str_vlen_array_again[VLEN_STR_ARRY_DIM]; /* vlen string array */ - char str_fixlen_array_again[FIXLEN_STR_ARRY_DIM][FIXLEN_STR_ARRY_SIZE]; /* fixed len string array */ + typedef struct comp2_t { + char *str_vlen; /* vlen string */ + char str_fixlen[FIXLEN_STR_SIZE]; /* fixed len string */ + char *str_vlen_repeat; /* vlen string */ + char str_fixlen_repeat[FIXLEN_STR_SIZE]; /* fixed len string */ + const char *str_array_vlen[VLEN_STR_ARRY_DIM]; /* vlen string array */ + char str_array_fixlen[FIXLEN_STR_ARRY_DIM][FIXLEN_STR_ARRY_SIZE]; /* fixed len string array */ + const char *str_vlen_array_again[VLEN_STR_ARRY_DIM]; /* vlen string array */ + char str_fixlen_array_again[FIXLEN_STR_ARRY_DIM][FIXLEN_STR_ARRY_SIZE]; /* fixed len string array */ } comp2_t; /* compound3 datatype */ - typedef struct comp3_t - { - char str_fixlen[FIXLEN_STR_SIZE]; /* fixed len string */ - char str_fixlen_repeat[FIXLEN_STR_SIZE]; /* fixed len string */ - char *str_vlen; /* vlen string */ - char *str_vlen_repeat; /* vlen string */ - char str_array_fixlen[FIXLEN_STR_ARRY_DIM][FIXLEN_STR_ARRY_SIZE]; /* fixed len string array */ - char str_fixlen_array_again[FIXLEN_STR_ARRY_DIM][FIXLEN_STR_ARRY_SIZE]; /* fixed len string array */ - const char *str_array_vlen[VLEN_STR_ARRY_DIM]; /* vlen string array */ - const char *str_vlen_array_again[VLEN_STR_ARRY_DIM]; /* vlen string array */ + typedef struct comp3_t { + char str_fixlen[FIXLEN_STR_SIZE]; /* fixed len string */ + char str_fixlen_repeat[FIXLEN_STR_SIZE]; /* fixed len string */ + char *str_vlen; /* vlen string */ + char *str_vlen_repeat; /* vlen string */ + char str_array_fixlen[FIXLEN_STR_ARRY_DIM][FIXLEN_STR_ARRY_SIZE]; /* fixed len string array */ + char str_fixlen_array_again[FIXLEN_STR_ARRY_DIM][FIXLEN_STR_ARRY_SIZE]; /* fixed len string array */ + const char *str_array_vlen[VLEN_STR_ARRY_DIM]; /* vlen string array */ + const char *str_vlen_array_again[VLEN_STR_ARRY_DIM]; /* vlen string array */ } comp3_t; /* compound4 datatype */ - typedef struct comp4_t - { - char str_fixlen[FIXLEN_STR_SIZE]; /* fixed len string */ - char *str_vlen; /* vlen string */ - char str_fixlen_repeat[FIXLEN_STR_SIZE]; /* fixed len string */ - char *str_vlen_repeat; /* vlen string */ - char str_array_fixlen[FIXLEN_STR_ARRY_DIM][FIXLEN_STR_ARRY_SIZE]; /* fixed len string array */ - const char *str_array_vlen[VLEN_STR_ARRY_DIM]; /* vlen string array */ - char str_fixlen_array_again[FIXLEN_STR_ARRY_DIM][FIXLEN_STR_ARRY_SIZE]; /* fixed len string array */ - const char *str_vlen_array_again[VLEN_STR_ARRY_DIM]; /* vlen string array */ + typedef struct comp4_t { + char str_fixlen[FIXLEN_STR_SIZE]; /* fixed len string */ + char *str_vlen; /* vlen string */ + char str_fixlen_repeat[FIXLEN_STR_SIZE]; /* fixed len string */ + char *str_vlen_repeat; /* vlen string */ + char str_array_fixlen[FIXLEN_STR_ARRY_DIM][FIXLEN_STR_ARRY_SIZE]; /* fixed len string array */ + const char *str_array_vlen[VLEN_STR_ARRY_DIM]; /* vlen string array */ + char str_fixlen_array_again[FIXLEN_STR_ARRY_DIM][FIXLEN_STR_ARRY_SIZE]; /* fixed len string array */ + const char *str_vlen_array_again[VLEN_STR_ARRY_DIM]; /* vlen string array */ } comp4_t; /* compound5 datatype */ - typedef struct comp5_t - { - const char *str_array_vlen[VLEN_STR_ARRY_DIM]; /* vlen string array */ - const char *str_vlen_array_again[VLEN_STR_ARRY_DIM]; /* vlen string array */ - char str_array_fixlen[FIXLEN_STR_ARRY_DIM][FIXLEN_STR_ARRY_SIZE]; /* fixed len string array */ - char str_fixlen_array_again[FIXLEN_STR_ARRY_DIM][FIXLEN_STR_ARRY_SIZE]; /* fixed len string array */ - char *str_vlen; /* vlen string */ - char *str_vlen_repeat; /* vlen string */ - char str_fixlen[FIXLEN_STR_SIZE]; /* fixed len string */ - char str_fixlen_repeat[FIXLEN_STR_SIZE]; /* fixed len string */ + typedef struct comp5_t { + const char *str_array_vlen[VLEN_STR_ARRY_DIM]; /* vlen string array */ + const char *str_vlen_array_again[VLEN_STR_ARRY_DIM]; /* vlen string array */ + char str_array_fixlen[FIXLEN_STR_ARRY_DIM][FIXLEN_STR_ARRY_SIZE]; /* fixed len string array */ + char str_fixlen_array_again[FIXLEN_STR_ARRY_DIM][FIXLEN_STR_ARRY_SIZE]; /* fixed len string array */ + char *str_vlen; /* vlen string */ + char *str_vlen_repeat; /* vlen string */ + char str_fixlen[FIXLEN_STR_SIZE]; /* fixed len string */ + char str_fixlen_repeat[FIXLEN_STR_SIZE]; /* fixed len string */ } comp5_t; /* compound6 datatype */ - typedef struct comp6_t - { - const char *str_array_vlen[VLEN_STR_ARRY_DIM]; /* vlen string array */ - char str_array_fixlen[FIXLEN_STR_ARRY_DIM][FIXLEN_STR_ARRY_SIZE]; /* fixed len string array */ - const char *str_vlen_array_again[VLEN_STR_ARRY_DIM]; /* vlen string array */ - char str_fixlen_array_again[FIXLEN_STR_ARRY_DIM][FIXLEN_STR_ARRY_SIZE]; /* fixed len string array */ - char *str_vlen; /* vlen string */ - char str_fixlen[FIXLEN_STR_SIZE]; /* fixed len string */ - char *str_vlen_repeat; /* vlen string */ - char str_fixlen_repeat[FIXLEN_STR_SIZE]; /* fixed len string */ + typedef struct comp6_t { + const char *str_array_vlen[VLEN_STR_ARRY_DIM]; /* vlen string array */ + char str_array_fixlen[FIXLEN_STR_ARRY_DIM][FIXLEN_STR_ARRY_SIZE]; /* fixed len string array */ + const char *str_vlen_array_again[VLEN_STR_ARRY_DIM]; /* vlen string array */ + char str_fixlen_array_again[FIXLEN_STR_ARRY_DIM][FIXLEN_STR_ARRY_SIZE]; /* fixed len string array */ + char *str_vlen; /* vlen string */ + char str_fixlen[FIXLEN_STR_SIZE]; /* fixed len string */ + char *str_vlen_repeat; /* vlen string */ + char str_fixlen_repeat[FIXLEN_STR_SIZE]; /* fixed len string */ } comp6_t; /* compound7 datatype */ - typedef struct comp7_t - { - char str_array_fixlen[FIXLEN_STR_ARRY_DIM][FIXLEN_STR_ARRY_SIZE]; /* fixed len string array */ - char str_fixlen_array_again[FIXLEN_STR_ARRY_DIM][FIXLEN_STR_ARRY_SIZE]; /* fixed len string array */ - const char *str_array_vlen[VLEN_STR_ARRY_DIM]; /* vlen string array */ - const char *str_vlen_array_again[VLEN_STR_ARRY_DIM]; /* vlen string array */ - char str_fixlen[FIXLEN_STR_SIZE]; /* fixed len string */ - char str_fixlen_repeat[FIXLEN_STR_SIZE]; /* fixed len string */ - char *str_vlen; /* vlen string */ - char *str_vlen_repeat; /* vlen string */ + typedef struct comp7_t { + char str_array_fixlen[FIXLEN_STR_ARRY_DIM][FIXLEN_STR_ARRY_SIZE]; /* fixed len string array */ + char str_fixlen_array_again[FIXLEN_STR_ARRY_DIM][FIXLEN_STR_ARRY_SIZE]; /* fixed len string array */ + const char *str_array_vlen[VLEN_STR_ARRY_DIM]; /* vlen string array */ + const char *str_vlen_array_again[VLEN_STR_ARRY_DIM]; /* vlen string array */ + char str_fixlen[FIXLEN_STR_SIZE]; /* fixed len string */ + char str_fixlen_repeat[FIXLEN_STR_SIZE]; /* fixed len string */ + char *str_vlen; /* vlen string */ + char *str_vlen_repeat; /* vlen string */ } comp7_t; /* compound8 datatype */ - typedef struct comp8_t - { - char str_array_fixlen[FIXLEN_STR_ARRY_DIM][FIXLEN_STR_ARRY_SIZE]; /* fixed len string array */ - const char *str_array_vlen[VLEN_STR_ARRY_DIM]; /* vlen string array */ - char str_fixlen_array_again[FIXLEN_STR_ARRY_DIM][FIXLEN_STR_ARRY_SIZE]; /* fixed len string array */ - const char *str_vlen_array_again[VLEN_STR_ARRY_DIM]; /* vlen string array */ - char str_fixlen[FIXLEN_STR_SIZE]; /* fixed len string */ - char *str_vlen; /* vlen string */ - char str_fixlen_repeat[FIXLEN_STR_SIZE]; /* fixed len string */ - char *str_vlen_repeat; /* vlen string */ + typedef struct comp8_t { + char str_array_fixlen[FIXLEN_STR_ARRY_DIM][FIXLEN_STR_ARRY_SIZE]; /* fixed len string array */ + const char *str_array_vlen[VLEN_STR_ARRY_DIM]; /* vlen string array */ + char str_fixlen_array_again[FIXLEN_STR_ARRY_DIM][FIXLEN_STR_ARRY_SIZE]; /* fixed len string array */ + const char *str_vlen_array_again[VLEN_STR_ARRY_DIM]; /* vlen string array */ + char str_fixlen[FIXLEN_STR_SIZE]; /* fixed len string */ + char *str_vlen; /* vlen string */ + char str_fixlen_repeat[FIXLEN_STR_SIZE]; /* fixed len string */ + char *str_vlen_repeat; /* vlen string */ } comp8_t; /* compound9 datatype */ - typedef struct comp9_t - { - char str_array_fixlen[FIXLEN_STR_ARRY_DIM][FIXLEN_STR_ARRY_SIZE]; /* fixed len string array */ - char str_fixlen_array_again[FIXLEN_STR_ARRY_DIM][FIXLEN_STR_ARRY_SIZE]; /* fixed len string array */ - const char *str_array_vlen[VLEN_STR_ARRY_DIM]; /* vlen string array */ - const char *str_vlen_array_again[VLEN_STR_ARRY_DIM]; /* vlen string array */ - char str_fixlen[FIXLEN_STR_SIZE]; /* fixed len string */ - int int_data1; - hobj_ref_t objref1; /* reference */ - char str_fixlen_repeat[FIXLEN_STR_SIZE]; /* fixed len string */ - hobj_ref_t objref2; /* reference */ - char *str_vlen; /* vlen string */ - int int_data2; - char *str_vlen_repeat; /* vlen string */ - hobj_ref_t objref3; /* reference */ - int int_data3; + typedef struct comp9_t { + char str_array_fixlen[FIXLEN_STR_ARRY_DIM][FIXLEN_STR_ARRY_SIZE]; /* fixed len string array */ + char str_fixlen_array_again[FIXLEN_STR_ARRY_DIM][FIXLEN_STR_ARRY_SIZE]; /* fixed len string array */ + const char *str_array_vlen[VLEN_STR_ARRY_DIM]; /* vlen string array */ + const char *str_vlen_array_again[VLEN_STR_ARRY_DIM]; /* vlen string array */ + char str_fixlen[FIXLEN_STR_SIZE]; /* fixed len string */ + int int_data1; + hobj_ref_t objref1; /* reference */ + char str_fixlen_repeat[FIXLEN_STR_SIZE]; /* fixed len string */ + hobj_ref_t objref2; /* reference */ + char *str_vlen; /* vlen string */ + int int_data2; + char *str_vlen_repeat; /* vlen string */ + hobj_ref_t objref3; /* reference */ + int int_data3; } comp9_t; /* vlen string */ - hid_t sid_vlen_str=0; /* dataspace ID */ - hid_t tid_vlen_str=0; /* datatype ID */ - char vlen_str_buf[]= { - "Variable length string" - }; - hsize_t dims_vlen_str[] = {VLEN_STR_DIM}; + hid_t sid_vlen_str = -1; /* dataspace ID */ + hid_t tid_vlen_str = -1; /* datatype ID */ + char vlen_str_buf[] = { "Variable length string" }; + hsize_t dims_vlen_str[] = { VLEN_STR_DIM }; /* fixlen string */ - hid_t sid_fixlen_str=0; /* dataspace ID */ - hid_t tid_fixlen_str=0; /* datatype ID */ - const char fixlen_str_buf[FIXLEN_STR_SIZE]= { - "Fixed length string" - }; - hsize_t dims_fixlen_str[] = {FIXLEN_STR_DIM}; + hid_t sid_fixlen_str = -1; /* dataspace ID */ + hid_t tid_fixlen_str = -1; /* datatype ID */ + const char fixlen_str_buf[FIXLEN_STR_SIZE] = { "Fixed length string" }; + hsize_t dims_fixlen_str[] = { FIXLEN_STR_DIM }; /* vlen string array */ - hid_t sid_vlen_str_array=0; /* dataspace ID */ - hid_t tid_vlen_str_array_pre=0; /* datatype ID */ - hid_t tid_vlen_str_array=0; /* datatype ID */ - const char *vlen_str_array_buf[VLEN_STR_ARRY_DIM]= { - "1 - Variable length string Array", - "2 - Testing variable length string array in compound type", - "3 - Four score and seven\n years ago our forefathers brought forth on this continent a new nation," - }; - hsize_t dims_vlen_str_array[] = {VLEN_STR_ARRY_DIM}; + hid_t sid_vlen_str_array = -1; /* dataspace ID */ + hid_t tid_vlen_str_array_pre = -1; /* datatype ID */ + hid_t tid_vlen_str_array = -1; /* datatype ID */ + const char *vlen_str_array_buf[VLEN_STR_ARRY_DIM] = + { "1 - Variable length string Array", + "2 - Testing variable length string array in compound type", + "3 - Four score and seven\n years ago our forefathers brought forth on this continent a new nation," }; + hsize_t dims_vlen_str_array[] = { VLEN_STR_ARRY_DIM }; /* fixlen string array */ - hid_t sid_fixlen_str_array=0; /* dataspace ID */ - hid_t tid_fixlen_str_array_pre=0; /* datatype ID */ - hid_t tid_fixlen_str_array=0; /* datatype ID */ - const char *fixlen_str_array_buf[FIXLEN_STR_ARRY_DIM]= { - "1 - Fixed length string Array", - "2 - Fixed length string Array", - "3 - Fixed length string Array" - }; - hsize_t dims_fixlen_str_array[] = {FIXLEN_STR_ARRY_DIM}; + hid_t sid_fixlen_str_array = -1; /* dataspace ID */ + hid_t tid_fixlen_str_array_pre = -1; /* datatype ID */ + hid_t tid_fixlen_str_array = -1; /* datatype ID */ + const char *fixlen_str_array_buf[FIXLEN_STR_ARRY_DIM] = { + "1 - Fixed length string Array", "2 - Fixed length string Array", + "3 - Fixed length string Array" }; + hsize_t dims_fixlen_str_array[] = { FIXLEN_STR_ARRY_DIM }; /*------------------------------------------ - * compound dataset - *------------------------------------------*/ - hid_t sid_comp=0; /* dataspace ID */ - hid_t tid1_comp=0; /* datatype ID */ - hid_t tid2_comp=0; /* datatype ID */ - hid_t tid3_comp=0; /* datatype ID */ - hid_t tid4_comp=0; /* datatype ID */ - hid_t tid5_comp=0; /* datatype ID */ - hid_t tid6_comp=0; /* datatype ID */ - hid_t tid7_comp=0; /* datatype ID */ - hid_t tid8_comp=0; /* datatype ID */ - hid_t tid9_comp=0; /* datatype ID */ - hid_t did_comp=0; /* dataset ID */ - hsize_t dims_comp[] = {COMP_DIM}; - herr_t status = SUCCEED; + * compound dataset + *------------------------------------------*/ + hid_t sid_comp = -1; /* dataspace ID */ + hid_t tid1_comp = -1; /* datatype ID */ + hid_t tid2_comp = -1; /* datatype ID */ + hid_t tid3_comp = -1; /* datatype ID */ + hid_t tid4_comp = -1; /* datatype ID */ + hid_t tid5_comp = -1; /* datatype ID */ + hid_t tid6_comp = -1; /* datatype ID */ + hid_t tid7_comp = -1; /* datatype ID */ + hid_t tid8_comp = -1; /* datatype ID */ + hid_t tid9_comp = -1; /* datatype ID */ + hid_t did_comp = -1; /* dataset ID */ + hsize_t dims_comp[] = { COMP_DIM }; + herr_t status = SUCCEED; /* make compound strings data */ comp1_t comp1_buf; @@ -3857,23 +3629,30 @@ static int test_comp_vlen_strings(const char *fname1, const char *grp_name, int HDstrcpy(comp9_buf.str_fixlen_repeat, fixlen_str_buf); /* copy vlen string array data to compound buffers */ - for (i=0; i < VLEN_STR_ARRY_DIM; i++) - { - comp1_buf.str_array_vlen[i] = comp1_buf.str_vlen_array_again[i] = vlen_str_array_buf[i]; - comp2_buf.str_array_vlen[i] = comp2_buf.str_vlen_array_again[i] = vlen_str_array_buf[i]; - comp3_buf.str_array_vlen[i] = comp3_buf.str_vlen_array_again[i] = vlen_str_array_buf[i]; - comp4_buf.str_array_vlen[i] = comp4_buf.str_vlen_array_again[i] = vlen_str_array_buf[i]; - comp5_buf.str_array_vlen[i] = comp5_buf.str_vlen_array_again[i] = vlen_str_array_buf[i]; - comp6_buf.str_array_vlen[i] = comp6_buf.str_vlen_array_again[i] = vlen_str_array_buf[i]; - comp7_buf.str_array_vlen[i] = comp7_buf.str_vlen_array_again[i] = vlen_str_array_buf[i]; - comp8_buf.str_array_vlen[i] = comp8_buf.str_vlen_array_again[i] = vlen_str_array_buf[i]; - comp9_buf.str_array_vlen[i] = comp9_buf.str_vlen_array_again[i] = vlen_str_array_buf[i]; + for (i = 0; i < VLEN_STR_ARRY_DIM; i++) { + comp1_buf.str_array_vlen[i] = comp1_buf.str_vlen_array_again[i] = + vlen_str_array_buf[i]; + comp2_buf.str_array_vlen[i] = comp2_buf.str_vlen_array_again[i] = + vlen_str_array_buf[i]; + comp3_buf.str_array_vlen[i] = comp3_buf.str_vlen_array_again[i] = + vlen_str_array_buf[i]; + comp4_buf.str_array_vlen[i] = comp4_buf.str_vlen_array_again[i] = + vlen_str_array_buf[i]; + comp5_buf.str_array_vlen[i] = comp5_buf.str_vlen_array_again[i] = + vlen_str_array_buf[i]; + comp6_buf.str_array_vlen[i] = comp6_buf.str_vlen_array_again[i] = + vlen_str_array_buf[i]; + comp7_buf.str_array_vlen[i] = comp7_buf.str_vlen_array_again[i] = + vlen_str_array_buf[i]; + comp8_buf.str_array_vlen[i] = comp8_buf.str_vlen_array_again[i] = + vlen_str_array_buf[i]; + comp9_buf.str_array_vlen[i] = comp9_buf.str_vlen_array_again[i] = + vlen_str_array_buf[i]; } /* copy fixlen string attay data to compound buffers */ - for (i=0; i < FIXLEN_STR_ARRY_DIM; i++) - { + for (i = 0; i < FIXLEN_STR_ARRY_DIM; i++) { HDstrcpy(comp1_buf.str_array_fixlen[i], fixlen_str_array_buf[i]); HDstrcpy(comp1_buf.str_fixlen_array_again[i], fixlen_str_array_buf[i]); @@ -3907,25 +3686,20 @@ static int test_comp_vlen_strings(const char *fname1, const char *grp_name, int comp9_buf.int_data2 = 20; comp9_buf.int_data3 = 30; - /*----------------------------------------------------------------------- * Create file(s) *------------------------------------------------------------------------*/ - if (is_file_new == 1) - { - fid1 = H5Fcreate (fname1, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT); - if (fid1 < 0) - { + if (is_file_new == 1) { + fid1 = H5Fcreate(fname1, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT); + if (fid1 < 0) { fprintf(stderr, "Error: %s> H5Fcreate failed.\n", fname1); status = FAIL; goto out; } } - else - { - fid1 = H5Fopen (fname1, H5F_ACC_RDWR, H5P_DEFAULT); - if (fid1 < 0) - { + else { + fid1 = H5Fopen(fname1, H5F_ACC_RDWR, H5P_DEFAULT); + if (fid1 < 0) { fprintf(stderr, "Error: %s> H5Fopen failed.\n", fname1); status = FAIL; goto out; @@ -3936,8 +3710,7 @@ static int test_comp_vlen_strings(const char *fname1, const char *grp_name, int * Create group *------------------------------------------------------------------------*/ gid = H5Gcreate2(fid1, grp_name, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); - if (gid < 0) - { + if (gid < 0) { fprintf(stderr, "Error: %s> H5Gcreate2 failed.\n", fname1); status = FAIL; goto out; @@ -3947,8 +3720,7 @@ static int test_comp_vlen_strings(const char *fname1, const char *grp_name, int * Variable length String1 - Create space and type *------------------------------------------------------------------------*/ sid_vlen_str = H5Screate_simple(STR_RANK, dims_vlen_str, NULL); - if (sid_vlen_str < 0) - { + if (sid_vlen_str < 0) { fprintf(stderr, "Error: %s> H5Screate_simple failed.\n", fname1); status = FAIL; goto out; @@ -3956,8 +3728,7 @@ static int test_comp_vlen_strings(const char *fname1, const char *grp_name, int tid_vlen_str = H5Tcopy(H5T_C_S1); status = H5Tset_size(tid_vlen_str, H5T_VARIABLE); - if (status < 0) - { + if (status < 0) { fprintf(stderr, "Error: %s> H5Tset_size failed.\n", fname1); status = FAIL; goto out; @@ -3967,8 +3738,7 @@ static int test_comp_vlen_strings(const char *fname1, const char *grp_name, int * Fixed length String2 - Create space and type *------------------------------------------------------------------------*/ sid_fixlen_str = H5Screate_simple(STR_RANK, dims_fixlen_str, NULL); - if (sid_fixlen_str < 0) - { + if (sid_fixlen_str < 0) { fprintf(stderr, "Error: %s> H5Screate_simple failed.\n", fname1); status = FAIL; goto out; @@ -3976,8 +3746,7 @@ static int test_comp_vlen_strings(const char *fname1, const char *grp_name, int tid_fixlen_str = H5Tcopy(H5T_C_S1); status = H5Tset_size(tid_fixlen_str, FIXLEN_STR_SIZE); - if (status < 0) - { + if (status < 0) { fprintf(stderr, "Error: %s> H5Tset_size failed.\n", fname1); status = FAIL; goto out; @@ -3987,8 +3756,7 @@ static int test_comp_vlen_strings(const char *fname1, const char *grp_name, int * Fixed length String3 array - Create space and type *------------------------------------------------------------------------*/ sid_vlen_str_array = H5Screate_simple(STR_RANK, dims_vlen_str_array, NULL); - if (sid_vlen_str_array < 0) - { + if (sid_vlen_str_array < 0) { fprintf(stderr, "Error: %s> H5Screate_simple failed.\n", fname1); status = FAIL; goto out; @@ -3996,17 +3764,15 @@ static int test_comp_vlen_strings(const char *fname1, const char *grp_name, int tid_vlen_str_array_pre = H5Tcopy(H5T_C_S1); status = H5Tset_size(tid_vlen_str_array_pre, H5T_VARIABLE); - if (status < 0) - { + if (status < 0) { fprintf(stderr, "Error: %s> H5Tset_size failed.\n", fname1); status = FAIL; goto out; } - /* Create the array data type for the string array */ + /* Create the array data type for the string array */ tid_vlen_str_array = H5Tarray_create2(tid_vlen_str_array_pre, COMP_RANK, dims_vlen_str_array); - if (tid_vlen_str_array < 0) - { + if (tid_vlen_str_array < 0) { fprintf(stderr, "Error: %s> H5Tarray_create2 failed.\n", fname1); status = FAIL; goto out; @@ -4016,8 +3782,7 @@ static int test_comp_vlen_strings(const char *fname1, const char *grp_name, int * Variable length String4 array - Create space and type *------------------------------------------------------------------------*/ sid_fixlen_str_array = H5Screate_simple(STR_RANK, dims_fixlen_str_array, NULL); - if (sid_fixlen_str_array < 0) - { + if (sid_fixlen_str_array < 0) { fprintf(stderr, "Error: %s> H5Screate_simple failed.\n", fname1); status = FAIL; goto out; @@ -4025,126 +3790,123 @@ static int test_comp_vlen_strings(const char *fname1, const char *grp_name, int tid_fixlen_str_array_pre = H5Tcopy(H5T_C_S1); status = H5Tset_size(tid_fixlen_str_array_pre, FIXLEN_STR_ARRY_SIZE); - if (status < 0) - { + if (status < 0) { fprintf(stderr, "Error: %s> H5Tset_size failed.\n", fname1); status = FAIL; goto out; } - /* Create the array data type for the string array */ + /* Create the array data type for the string array */ tid_fixlen_str_array = H5Tarray_create2(tid_fixlen_str_array_pre, COMP_RANK, dims_fixlen_str_array); - if (tid_fixlen_str_array < 0) - { + if (tid_fixlen_str_array < 0) { fprintf(stderr, "Error: %s> H5Tarray_create2 failed.\n", fname1); status = FAIL; goto out; } - /*------------------------------------------------------------------------- + /*------------------------------------------------------------------------- * Compound dataset *------------------------------------------------------------------------*/ sid_comp = H5Screate_simple(COMP_RANK, dims_comp, NULL); - if (sid_comp < 0) - { + if (sid_comp < 0) { fprintf(stderr, "Error: %s> H5Screate_simple failed.\n", fname1); status = FAIL; goto out; } - tid1_comp = H5Tcreate (H5T_COMPOUND, sizeof(comp1_t)); - tid2_comp = H5Tcreate (H5T_COMPOUND, sizeof(comp2_t)); - tid3_comp = H5Tcreate (H5T_COMPOUND, sizeof(comp3_t)); - tid4_comp = H5Tcreate (H5T_COMPOUND, sizeof(comp4_t)); - tid5_comp = H5Tcreate (H5T_COMPOUND, sizeof(comp5_t)); - tid6_comp = H5Tcreate (H5T_COMPOUND, sizeof(comp6_t)); - tid7_comp = H5Tcreate (H5T_COMPOUND, sizeof(comp7_t)); - tid8_comp = H5Tcreate (H5T_COMPOUND, sizeof(comp8_t)); - tid9_comp = H5Tcreate (H5T_COMPOUND, sizeof(comp9_t)); + tid1_comp = H5Tcreate(H5T_COMPOUND, sizeof(comp1_t)); + tid2_comp = H5Tcreate(H5T_COMPOUND, sizeof(comp2_t)); + tid3_comp = H5Tcreate(H5T_COMPOUND, sizeof(comp3_t)); + tid4_comp = H5Tcreate(H5T_COMPOUND, sizeof(comp4_t)); + tid5_comp = H5Tcreate(H5T_COMPOUND, sizeof(comp5_t)); + tid6_comp = H5Tcreate(H5T_COMPOUND, sizeof(comp6_t)); + tid7_comp = H5Tcreate(H5T_COMPOUND, sizeof(comp7_t)); + tid8_comp = H5Tcreate(H5T_COMPOUND, sizeof(comp8_t)); + tid9_comp = H5Tcreate(H5T_COMPOUND, sizeof(comp9_t)); /* compound 1 */ - H5Tinsert(tid1_comp, "VLEN_STR1", HOFFSET(comp1_t, str_vlen), tid_vlen_str ); - H5Tinsert(tid1_comp, "VLEN_STR2", HOFFSET(comp1_t, str_vlen_repeat), tid_vlen_str ); - H5Tinsert(tid1_comp, "FIXLEN_STR1", HOFFSET(comp1_t, str_fixlen), tid_fixlen_str ); - H5Tinsert(tid1_comp, "FIXLEN_STR2", HOFFSET(comp1_t, str_fixlen_repeat), tid_fixlen_str ); + H5Tinsert(tid1_comp, "VLEN_STR1", HOFFSET(comp1_t, str_vlen), tid_vlen_str); + H5Tinsert(tid1_comp, "VLEN_STR2", HOFFSET(comp1_t, str_vlen_repeat), tid_vlen_str); + H5Tinsert(tid1_comp, "FIXLEN_STR1", HOFFSET(comp1_t, str_fixlen), tid_fixlen_str); + H5Tinsert(tid1_comp, "FIXLEN_STR2", HOFFSET(comp1_t, str_fixlen_repeat), tid_fixlen_str); H5Tinsert(tid1_comp, "VLEN_STR_ARRAY1", HOFFSET(comp1_t, str_array_vlen), tid_vlen_str_array); H5Tinsert(tid1_comp, "VLEN_STR_ARRAY2", HOFFSET(comp1_t, str_vlen_array_again), tid_vlen_str_array); H5Tinsert(tid1_comp, "FIXLEN_STR_ARRAY1", HOFFSET(comp1_t, str_array_fixlen), tid_fixlen_str_array); H5Tinsert(tid1_comp, "FIXLEN_STR_ARRAY2", HOFFSET(comp1_t, str_fixlen_array_again), tid_fixlen_str_array); /* compound 2 */ - H5Tinsert(tid2_comp, "VLEN_STR1", HOFFSET(comp2_t, str_vlen), tid_vlen_str ); - H5Tinsert(tid2_comp, "VLEN_STR2", HOFFSET(comp2_t, str_vlen_repeat), tid_vlen_str ); - H5Tinsert(tid2_comp, "FIXLEN_STR1", HOFFSET(comp2_t, str_fixlen), tid_fixlen_str ); - H5Tinsert(tid2_comp, "FIXLEN_STR2", HOFFSET(comp2_t, str_fixlen_repeat), tid_fixlen_str ); + H5Tinsert(tid2_comp, "VLEN_STR1", HOFFSET(comp2_t, str_vlen), tid_vlen_str); + H5Tinsert(tid2_comp, "VLEN_STR2", HOFFSET(comp2_t, str_vlen_repeat), tid_vlen_str); + H5Tinsert(tid2_comp, "FIXLEN_STR1", HOFFSET(comp2_t, str_fixlen), tid_fixlen_str); + H5Tinsert(tid2_comp, "FIXLEN_STR2", HOFFSET(comp2_t, str_fixlen_repeat), tid_fixlen_str); H5Tinsert(tid2_comp, "VLEN_STR_ARRAY1", HOFFSET(comp2_t, str_array_vlen), tid_vlen_str_array); H5Tinsert(tid2_comp, "VLEN_STR_ARRAY2", HOFFSET(comp2_t, str_vlen_array_again), tid_vlen_str_array); H5Tinsert(tid2_comp, "FIXLEN_STR_ARRAY1", HOFFSET(comp2_t, str_array_fixlen), tid_fixlen_str_array); H5Tinsert(tid2_comp, "FIXLEN_STR_ARRAY2", HOFFSET(comp2_t, str_fixlen_array_again), tid_fixlen_str_array); /* compound 3 */ - H5Tinsert(tid3_comp, "VLEN_STR1", HOFFSET(comp3_t, str_vlen), tid_vlen_str ); - H5Tinsert(tid3_comp, "VLEN_STR2", HOFFSET(comp3_t, str_vlen_repeat), tid_vlen_str ); - H5Tinsert(tid3_comp, "FIXLEN_STR1", HOFFSET(comp3_t, str_fixlen), tid_fixlen_str ); - H5Tinsert(tid3_comp, "FIXLEN_STR2", HOFFSET(comp3_t, str_fixlen_repeat), tid_fixlen_str ); + H5Tinsert(tid3_comp, "VLEN_STR1", HOFFSET(comp3_t, str_vlen), tid_vlen_str); + H5Tinsert(tid3_comp, "VLEN_STR2", HOFFSET(comp3_t, str_vlen_repeat), tid_vlen_str); + H5Tinsert(tid3_comp, "FIXLEN_STR1", HOFFSET(comp3_t, str_fixlen), tid_fixlen_str); + H5Tinsert(tid3_comp, "FIXLEN_STR2", HOFFSET(comp3_t, str_fixlen_repeat), tid_fixlen_str); H5Tinsert(tid3_comp, "VLEN_STR_ARRAY1", HOFFSET(comp3_t, str_array_vlen), tid_vlen_str_array); H5Tinsert(tid3_comp, "VLEN_STR_ARRAY2", HOFFSET(comp3_t, str_vlen_array_again), tid_vlen_str_array); H5Tinsert(tid3_comp, "FIXLEN_STR_ARRAY1", HOFFSET(comp3_t, str_array_fixlen), tid_fixlen_str_array); H5Tinsert(tid3_comp, "FIXLEN_STR_ARRAY2", HOFFSET(comp3_t, str_fixlen_array_again), tid_fixlen_str_array); /* compound 4 */ - H5Tinsert(tid4_comp, "VLEN_STR1", HOFFSET(comp4_t, str_vlen), tid_vlen_str ); - H5Tinsert(tid4_comp, "VLEN_STR2", HOFFSET(comp4_t, str_vlen_repeat), tid_vlen_str ); - H5Tinsert(tid4_comp, "FIXLEN_STR1", HOFFSET(comp4_t, str_fixlen), tid_fixlen_str ); - H5Tinsert(tid4_comp, "FIXLEN_STR2", HOFFSET(comp4_t, str_fixlen_repeat), tid_fixlen_str ); + H5Tinsert(tid4_comp, "VLEN_STR1", HOFFSET(comp4_t, str_vlen), tid_vlen_str); + H5Tinsert(tid4_comp, "VLEN_STR2", HOFFSET(comp4_t, str_vlen_repeat), tid_vlen_str); + H5Tinsert(tid4_comp, "FIXLEN_STR1", HOFFSET(comp4_t, str_fixlen), tid_fixlen_str); + H5Tinsert(tid4_comp, "FIXLEN_STR2", HOFFSET(comp4_t, str_fixlen_repeat), tid_fixlen_str); H5Tinsert(tid4_comp, "VLEN_STR_ARRAY1", HOFFSET(comp4_t, str_array_vlen), tid_vlen_str_array); H5Tinsert(tid4_comp, "VLEN_STR_ARRAY2", HOFFSET(comp4_t, str_vlen_array_again), tid_vlen_str_array); H5Tinsert(tid4_comp, "FIXLEN_STR_ARRAY1", HOFFSET(comp4_t, str_array_fixlen), tid_fixlen_str_array); H5Tinsert(tid4_comp, "FIXLEN_STR_ARRAY2", HOFFSET(comp4_t, str_fixlen_array_again), tid_fixlen_str_array); /* compound 5 */ - H5Tinsert(tid5_comp, "VLEN_STR1", HOFFSET(comp5_t, str_vlen), tid_vlen_str ); - H5Tinsert(tid5_comp, "VLEN_STR2", HOFFSET(comp5_t, str_vlen_repeat), tid_vlen_str ); - H5Tinsert(tid5_comp, "FIXLEN_STR1", HOFFSET(comp5_t, str_fixlen), tid_fixlen_str ); - H5Tinsert(tid5_comp, "FIXLEN_STR2", HOFFSET(comp5_t, str_fixlen_repeat), tid_fixlen_str ); + H5Tinsert(tid5_comp, "VLEN_STR1", HOFFSET(comp5_t, str_vlen), tid_vlen_str); + H5Tinsert(tid5_comp, "VLEN_STR2", HOFFSET(comp5_t, str_vlen_repeat), tid_vlen_str); + H5Tinsert(tid5_comp, "FIXLEN_STR1", HOFFSET(comp5_t, str_fixlen), tid_fixlen_str); + H5Tinsert(tid5_comp, "FIXLEN_STR2", HOFFSET(comp5_t, str_fixlen_repeat), tid_fixlen_str); H5Tinsert(tid5_comp, "VLEN_STR_ARRAY1", HOFFSET(comp5_t, str_array_vlen), tid_vlen_str_array); - H5Tinsert(tid5_comp, "VLEN_STR_ARRAY2", HOFFSET(comp5_t, str_vlen_array_again), tid_vlen_str_array); + H5Tinsert(tid5_comp, "VLEN_STR_ARRAY2", HOFFSET(comp5_t, str_vlen_array_again), tid_vlen_str_array); H5Tinsert(tid5_comp, "FIXLEN_STR_ARRAY1", HOFFSET(comp5_t, str_array_fixlen), tid_fixlen_str_array); H5Tinsert(tid5_comp, "FIXLEN_STR_ARRAY2", HOFFSET(comp5_t, str_fixlen_array_again), tid_fixlen_str_array); /* compound 6 */ - H5Tinsert(tid6_comp, "VLEN_STR1", HOFFSET(comp6_t, str_vlen), tid_vlen_str ); - H5Tinsert(tid6_comp, "VLEN_STR2", HOFFSET(comp6_t, str_vlen_repeat), tid_vlen_str ); - H5Tinsert(tid6_comp, "FIXLEN_STR1", HOFFSET(comp6_t, str_fixlen), tid_fixlen_str ); - H5Tinsert(tid6_comp, "FIXLEN_STR2", HOFFSET(comp6_t, str_fixlen_repeat), tid_fixlen_str ); + H5Tinsert(tid6_comp, "VLEN_STR1", HOFFSET(comp6_t, str_vlen), tid_vlen_str); + H5Tinsert(tid6_comp, "VLEN_STR2", HOFFSET(comp6_t, str_vlen_repeat), tid_vlen_str); + H5Tinsert(tid6_comp, "FIXLEN_STR1", HOFFSET(comp6_t, str_fixlen), tid_fixlen_str); + H5Tinsert(tid6_comp, "FIXLEN_STR2", HOFFSET(comp6_t, str_fixlen_repeat), tid_fixlen_str); H5Tinsert(tid6_comp, "VLEN_STR_ARRAY1", HOFFSET(comp6_t, str_array_vlen), tid_vlen_str_array); H5Tinsert(tid6_comp, "VLEN_STR_ARRAY2", HOFFSET(comp6_t, str_vlen_array_again), tid_vlen_str_array); H5Tinsert(tid6_comp, "FIXLEN_STR_ARRAY1", HOFFSET(comp6_t, str_array_fixlen), tid_fixlen_str_array); H5Tinsert(tid6_comp, "FIXLEN_STR_ARRAY2", HOFFSET(comp6_t, str_fixlen_array_again), tid_fixlen_str_array); /* compound 7 */ - H5Tinsert(tid7_comp, "VLEN_STR1", HOFFSET(comp7_t, str_vlen), tid_vlen_str ); - H5Tinsert(tid7_comp, "VLEN_STR2", HOFFSET(comp7_t, str_vlen_repeat), tid_vlen_str ); - H5Tinsert(tid7_comp, "FIXLEN_STR1", HOFFSET(comp7_t, str_fixlen), tid_fixlen_str ); - H5Tinsert(tid7_comp, "FIXLEN_STR2", HOFFSET(comp7_t, str_fixlen_repeat), tid_fixlen_str ); + H5Tinsert(tid7_comp, "VLEN_STR1", HOFFSET(comp7_t, str_vlen), tid_vlen_str); + H5Tinsert(tid7_comp, "VLEN_STR2", HOFFSET(comp7_t, str_vlen_repeat), tid_vlen_str); + H5Tinsert(tid7_comp, "FIXLEN_STR1", HOFFSET(comp7_t, str_fixlen), tid_fixlen_str); + H5Tinsert(tid7_comp, "FIXLEN_STR2", HOFFSET(comp7_t, str_fixlen_repeat), tid_fixlen_str); H5Tinsert(tid7_comp, "VLEN_STR_ARRAY1", HOFFSET(comp7_t, str_array_vlen), tid_vlen_str_array); H5Tinsert(tid7_comp, "VLEN_STR_ARRAY2", HOFFSET(comp7_t, str_vlen_array_again), tid_vlen_str_array); H5Tinsert(tid7_comp, "FIXLEN_STR_ARRAY1", HOFFSET(comp7_t, str_array_fixlen), tid_fixlen_str_array); H5Tinsert(tid7_comp, "FIXLEN_STR_ARRAY2", HOFFSET(comp7_t, str_fixlen_array_again), tid_fixlen_str_array); /* compound 8 */ - H5Tinsert(tid8_comp, "VLEN_STR1", HOFFSET(comp8_t, str_vlen), tid_vlen_str ); - H5Tinsert(tid8_comp, "VLEN_STR2", HOFFSET(comp8_t, str_vlen_repeat), tid_vlen_str ); - H5Tinsert(tid8_comp, "FIXLEN_STR1", HOFFSET(comp8_t, str_fixlen), tid_fixlen_str ); - H5Tinsert(tid8_comp, "FIXLEN_STR2", HOFFSET(comp8_t, str_fixlen_repeat), tid_fixlen_str ); + H5Tinsert(tid8_comp, "VLEN_STR1", HOFFSET(comp8_t, str_vlen), tid_vlen_str); + H5Tinsert(tid8_comp, "VLEN_STR2", HOFFSET(comp8_t, str_vlen_repeat), tid_vlen_str); + H5Tinsert(tid8_comp, "FIXLEN_STR1", HOFFSET(comp8_t, str_fixlen), tid_fixlen_str); + H5Tinsert(tid8_comp, "FIXLEN_STR2", HOFFSET(comp8_t, str_fixlen_repeat), tid_fixlen_str); H5Tinsert(tid8_comp, "VLEN_STR_ARRAY1", HOFFSET(comp8_t, str_array_vlen), tid_vlen_str_array); H5Tinsert(tid8_comp, "VLEN_STR_ARRAY2", HOFFSET(comp8_t, str_vlen_array_again), tid_vlen_str_array); H5Tinsert(tid8_comp, "FIXLEN_STR_ARRAY1", HOFFSET(comp8_t, str_array_fixlen), tid_fixlen_str_array); H5Tinsert(tid8_comp, "FIXLEN_STR_ARRAY2", HOFFSET(comp8_t, str_fixlen_array_again), tid_fixlen_str_array); /* compound 9 */ - H5Tinsert(tid9_comp, "VLEN_STR1", HOFFSET(comp9_t, str_vlen), tid_vlen_str ); - H5Tinsert(tid9_comp, "VLEN_STR2", HOFFSET(comp9_t, str_vlen_repeat), tid_vlen_str ); - H5Tinsert(tid9_comp, "FIXLEN_STR1", HOFFSET(comp9_t, str_fixlen), tid_fixlen_str ); - H5Tinsert(tid9_comp, "FIXLEN_STR2", HOFFSET(comp9_t, str_fixlen_repeat), tid_fixlen_str ); + H5Tinsert(tid9_comp, "VLEN_STR1", HOFFSET(comp9_t, str_vlen), tid_vlen_str); + H5Tinsert(tid9_comp, "VLEN_STR2", HOFFSET(comp9_t, str_vlen_repeat), tid_vlen_str); + H5Tinsert(tid9_comp, "FIXLEN_STR1", HOFFSET(comp9_t, str_fixlen), tid_fixlen_str); + H5Tinsert(tid9_comp, "FIXLEN_STR2", HOFFSET(comp9_t, str_fixlen_repeat), tid_fixlen_str); H5Tinsert(tid9_comp, "VLEN_STR_ARRAY1", HOFFSET(comp9_t, str_array_vlen), tid_vlen_str_array); H5Tinsert(tid9_comp, "VLEN_STR_ARRAY2", HOFFSET(comp9_t, str_vlen_array_again), tid_vlen_str_array); H5Tinsert(tid9_comp, "FIXLEN_STR_ARRAY1", HOFFSET(comp9_t, str_array_fixlen), tid_fixlen_str_array); @@ -4156,12 +3918,10 @@ static int test_comp_vlen_strings(const char *fname1, const char *grp_name, int H5Tinsert(tid9_comp, "OBJREF2", HOFFSET(comp9_t, objref2), H5T_STD_REF_OBJ); H5Tinsert(tid9_comp, "OBJREF3", HOFFSET(comp9_t, objref3), H5T_STD_REF_OBJ); - /* Write data to compound 1 dataset buffer */ did_comp = H5Dcreate2(gid, "Compound_dset1", tid1_comp, sid_comp, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); status = H5Dwrite(did_comp, tid1_comp, H5S_ALL, H5S_ALL, H5P_DEFAULT, &comp1_buf); - if (status < 0) - { + if (status < 0) { fprintf(stderr, "Error: %s> H5Dwrite failed.\n", fname1); status = FAIL; goto out; @@ -4171,8 +3931,7 @@ static int test_comp_vlen_strings(const char *fname1, const char *grp_name, int /* Write data to compound 2 dataset buffer */ did_comp = H5Dcreate2(gid, "Compound_dset2", tid2_comp, sid_comp, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); status = H5Dwrite(did_comp, tid2_comp, H5S_ALL, H5S_ALL, H5P_DEFAULT, &comp2_buf); - if (status < 0) - { + if (status < 0) { fprintf(stderr, "Error: %s> H5Dwrite failed.\n", fname1); status = FAIL; goto out; @@ -4182,8 +3941,7 @@ static int test_comp_vlen_strings(const char *fname1, const char *grp_name, int /* Write data to compound 3 dataset buffer */ did_comp = H5Dcreate2(gid, "Compound_dset3", tid3_comp, sid_comp, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); status = H5Dwrite(did_comp, tid3_comp, H5S_ALL, H5S_ALL, H5P_DEFAULT, &comp3_buf); - if (status < 0) - { + if (status < 0) { fprintf(stderr, "Error: %s> H5Dwrite failed.\n", fname1); status = FAIL; goto out; @@ -4193,8 +3951,7 @@ static int test_comp_vlen_strings(const char *fname1, const char *grp_name, int /* Write data to compound 4 dataset buffer */ did_comp = H5Dcreate2(gid, "Compound_dset4", tid4_comp, sid_comp, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); status = H5Dwrite(did_comp, tid4_comp, H5S_ALL, H5S_ALL, H5P_DEFAULT, &comp4_buf); - if (status < 0) - { + if (status < 0) { fprintf(stderr, "Error: %s> H5Dwrite failed.\n", fname1); status = FAIL; goto out; @@ -4204,8 +3961,7 @@ static int test_comp_vlen_strings(const char *fname1, const char *grp_name, int /* Write data to compound 5 dataset buffer */ did_comp = H5Dcreate2(gid, "Compound_dset5", tid5_comp, sid_comp, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); status = H5Dwrite(did_comp, tid5_comp, H5S_ALL, H5S_ALL, H5P_DEFAULT, &comp5_buf); - if (status < 0) - { + if (status < 0) { fprintf(stderr, "Error: %s> H5Dwrite failed.\n", fname1); status = FAIL; goto out; @@ -4215,8 +3971,7 @@ static int test_comp_vlen_strings(const char *fname1, const char *grp_name, int /* Write data to compound 6 dataset buffer */ did_comp = H5Dcreate2(gid, "Compound_dset6", tid6_comp, sid_comp, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); status = H5Dwrite(did_comp, tid6_comp, H5S_ALL, H5S_ALL, H5P_DEFAULT, &comp6_buf); - if (status < 0) - { + if (status < 0) { fprintf(stderr, "Error: %s> H5Dwrite failed.\n", fname1); status = FAIL; goto out; @@ -4226,8 +3981,7 @@ static int test_comp_vlen_strings(const char *fname1, const char *grp_name, int /* Write data to compound 7 dataset buffer */ did_comp = H5Dcreate2(gid, "Compound_dset7", tid7_comp, sid_comp, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); status = H5Dwrite(did_comp, tid7_comp, H5S_ALL, H5S_ALL, H5P_DEFAULT, &comp7_buf); - if (status < 0) - { + if (status < 0) { fprintf(stderr, "Error: %s> H5Dwrite failed.\n", fname1); status = FAIL; goto out; @@ -4237,8 +3991,7 @@ static int test_comp_vlen_strings(const char *fname1, const char *grp_name, int /* Write data to compound 8 dataset buffer */ did_comp = H5Dcreate2(gid, "Compound_dset8", tid8_comp, sid_comp, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); status = H5Dwrite(did_comp, tid8_comp, H5S_ALL, H5S_ALL, H5P_DEFAULT, &comp8_buf); - if (status < 0) - { + if (status < 0) { fprintf(stderr, "Error: %s> H5Dwrite failed.\n", fname1); status = FAIL; goto out; @@ -4249,166 +4002,158 @@ static int test_comp_vlen_strings(const char *fname1, const char *grp_name, int did_comp = H5Dcreate2(gid, "Compound_dset9", tid9_comp, sid_comp, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); /* obj references */ - status=H5Rcreate(&(comp9_buf.objref1),gid,"Compound_dset2",H5R_OBJECT,(hid_t)-1); - status=H5Rcreate(&(comp9_buf.objref2),gid,"Compound_dset3",H5R_OBJECT,(hid_t)-1); - status=H5Rcreate(&(comp9_buf.objref3),gid,"Compound_dset4",H5R_OBJECT,(hid_t)-1); + status = H5Rcreate(&(comp9_buf.objref1), gid, "Compound_dset2", H5R_OBJECT, (hid_t) -1); + status = H5Rcreate(&(comp9_buf.objref2), gid, "Compound_dset3", H5R_OBJECT, (hid_t) -1); + status = H5Rcreate(&(comp9_buf.objref3), gid, "Compound_dset4", H5R_OBJECT, (hid_t) -1); status = H5Dwrite(did_comp, tid9_comp, H5S_ALL, H5S_ALL, H5P_DEFAULT, &comp9_buf); - if (status < 0) - { + if (status < 0) { fprintf(stderr, "Error: %s> H5Dwrite failed.\n", fname1); status = FAIL; goto out; } - H5Dclose(did_comp); + did_comp = -1; - did_comp=0; out: - /*----------------------------------------------------------------------- + /*----------------------------------------------------------------------- * Close *-----------------------------------------------------------------------*/ - if(fid1 > 0) + if (fid1 > 0) H5Fclose(fid1); - if(gid > 0) + if (gid > 0) H5Gclose(gid); /* vlen string */ - if(tid_vlen_str > 0) + if (tid_vlen_str > 0) H5Tclose(tid_vlen_str); - if(sid_vlen_str > 0) + if (sid_vlen_str > 0) H5Sclose(sid_vlen_str); /* fixed len string */ - if(tid_fixlen_str > 0) + if (tid_fixlen_str > 0) H5Tclose(tid_fixlen_str); - if(sid_fixlen_str > 0) + if (sid_fixlen_str > 0) H5Sclose(sid_fixlen_str); /* vlen string array */ - if(tid_vlen_str_array_pre > 0) + if (tid_vlen_str_array_pre > 0) H5Tclose(tid_vlen_str_array_pre); - if(tid_vlen_str_array > 0) + if (tid_vlen_str_array > 0) H5Tclose(tid_vlen_str_array); - if(sid_vlen_str_array > 0) + if (sid_vlen_str_array > 0) H5Sclose(sid_vlen_str_array); /* fixed len string array */ - if(tid_fixlen_str_array_pre > 0) + if (tid_fixlen_str_array_pre > 0) H5Tclose(tid_fixlen_str_array_pre); - if(tid_fixlen_str_array > 0) + if (tid_fixlen_str_array > 0) H5Tclose(tid_fixlen_str_array); - if(sid_fixlen_str_array > 0) + if (sid_fixlen_str_array > 0) H5Sclose(sid_fixlen_str_array); /* compound */ - if(tid1_comp > 0) + if (tid1_comp > 0) H5Tclose(tid1_comp); - if(tid2_comp > 0) + if (tid2_comp > 0) H5Tclose(tid2_comp); - if(tid3_comp > 0) + if (tid3_comp > 0) H5Tclose(tid3_comp); - if(tid4_comp > 0) + if (tid4_comp > 0) H5Tclose(tid4_comp); - if(tid5_comp > 0) + if (tid5_comp > 0) H5Tclose(tid5_comp); - if(tid6_comp > 0) + if (tid6_comp > 0) H5Tclose(tid6_comp); - if(tid7_comp > 0) + if (tid7_comp > 0) H5Tclose(tid7_comp); - if(tid8_comp > 0) + if (tid8_comp > 0) H5Tclose(tid8_comp); - if(tid9_comp > 0) + if (tid9_comp > 0) H5Tclose(tid9_comp); - if(did_comp > 0) + if (did_comp > 0) H5Dclose(did_comp); - if(sid_comp > 0) + if (sid_comp > 0) H5Sclose(sid_comp); return status; } /* end test_comp_vlen_strings() */ - /*------------------------------------------------------------------------- -* -* Purpose: Test diffs of enum values which may include invalid values. -* -* Programmer: Dana Robinson -* -*-------------------------------------------------------------------------*/ - -static int -test_enums(const char *fname) + * + * Purpose: Test diffs of enum values which may include invalid values. + * + * Programmer: Dana Robinson + * + *-------------------------------------------------------------------------*/ + +static int test_enums(const char *fname) { - hid_t fid = -1; + hid_t fid = -1; - hid_t tid = -1; - int enum_val = -1; + hid_t tid = -1; + int enum_val = -1; /* The data in the two arrays cover the following cases: - * - * V = valid enum value, I = invalid enum value - * - * 0: I-I (same value) - * 1: V-I - * 2: I-V - * 3: V-V (same value) - * 4: I-I (different values) SKIPPED FOR NOW - * 5: V-V (different values) - */ + * + * V = valid enum value, I = invalid enum value + * + * 0: I-I (same value) + * 1: V-I + * 2: I-V + * 3: V-V (same value) + * 4: I-I (different values) SKIPPED FOR NOW + * 5: V-V (different values) + */ /* *** NOTE *** - * - * There is a bug in H5Dread() where invalid enum values are always - * returned as -1 so two different invalid enum values cannot be - * properly compared. Test 4 has been adjusted to pass here - * while we fix the issue. - */ - int data1[6] = {9, 0, 9, 0, 9, 0}; + * + * There is a bug in H5Dread() where invalid enum values are always + * returned as -1 so two different invalid enum values cannot be + * properly compared. Test 4 has been adjusted to pass here + * while we fix the issue. + */ + int data1[6] = { 9, 0, 9, 0, 9, 0 }; /*int data1[6] = {9, 0, 9, 0, 8, 0}; */ - int data2[6] = {9, 9, 0, 0, 9, 1}; + int data2[6] = { 9, 9, 0, 0, 9, 1 }; - hsize_t dims = 6; + hsize_t dims = 6; - herr_t status = SUCCEED; + herr_t status = SUCCEED; /*----------------------------------------------------------------------- - * Create the file - *---------------------------------------------------------------------*/ + * Create the file + *---------------------------------------------------------------------*/ fid = H5Fcreate(fname, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT); /*----------------------------------------------------------------------- - * Create enum types - *---------------------------------------------------------------------*/ + * Create enum types + *---------------------------------------------------------------------*/ tid = H5Tenum_create(H5T_NATIVE_INT); enum_val = 0; status = H5Tenum_insert(tid, "YIN", &enum_val); - if (status < 0) - { + if (status < 0) { fprintf(stderr, "Error: %s> H5Tenum_insert failed.\n", fname); status = FAIL; goto out; } enum_val = 1; status = H5Tenum_insert(tid, "YANG", &enum_val); - if (status < 0) - { + if (status < 0) { fprintf(stderr, "Error: %s> H5Tenum_insert failed.\n", fname); status = FAIL; goto out; } /*----------------------------------------------------------------------- - * Create datasets containing enum data. - *---------------------------------------------------------------------*/ + * Create datasets containing enum data. + *---------------------------------------------------------------------*/ status = write_dset(fid, 1, &dims, "dset1", tid, data1); - if (status < 0) - { + if (status < 0) { fprintf(stderr, "Error: %s> write_dset failed.\n", fname); status = FAIL; goto out; } status = write_dset(fid, 1, &dims, "dset2", tid, data2); - if (status < 0) - { + if (status < 0) { fprintf(stderr, "Error: %s> write_dset failed.\n", fname); status = FAIL; goto out; @@ -4416,41 +4161,41 @@ test_enums(const char *fname) out: /*----------------------------------------------------------------------- - * Close - *---------------------------------------------------------------------*/ - if(fid) + * Close + *---------------------------------------------------------------------*/ + if (fid) H5Fclose(fid); - if(tid) + if (tid) H5Tclose(tid); return status; } /*------------------------------------------------------------------------- -* -* Purpose: -* Create test files with dataset and attribute with container types -* (array, vlen) with multiple nested compound types. -* -* Function: test_comps_array() -* - type: compound->array->compound -* -* Function: test_comps_vlen() -* - type: compound->vlen->compound -* -* Function: test_comps_array_vlen() -* - type: compound->array->compound->vlen->compound -* -* Function: test_comps_vlen_arry() -* - type: compound->vlen->compound->array->compound -* -* Programmer: Jonathan Kim (Sep, 1, 2011) -* -*-------------------------------------------------------------------------*/ + * + * Purpose: + * Create test files with dataset and attribute with container types + * (array, vlen) with multiple nested compound types. + * + * Function: test_comps_array() + * - type: compound->array->compound + * + * Function: test_comps_vlen() + * - type: compound->vlen->compound + * + * Function: test_comps_array_vlen() + * - type: compound->array->compound->vlen->compound + * + * Function: test_comps_vlen_arry() + * - type: compound->vlen->compound->array->compound + * + * Programmer: Jonathan Kim (Sep, 1, 2011) + * + *-------------------------------------------------------------------------*/ #define SDIM_DSET 2 #define SDIM_CMPD_ARRAY 2 -static void test_comps_array (const char *fname, const char *dset, const char *attr,int diff, int is_file_new) +static void test_comps_array(const char *fname, const char *dset, const char *attr, int diff, int is_file_new) { /* sub compound 2 */ typedef struct { @@ -4464,42 +4209,39 @@ static void test_comps_array (const char *fname, const char *dset, const char *a cmpd2_t cmpd2[SDIM_CMPD_ARRAY]; } cmpd1_t; - cmpd1_t wdata[SDIM_DSET]; /* dataset with compound1 */ + cmpd1_t wdata[SDIM_DSET]; /* dataset with compound1 */ - hid_t fid; /* HDF5 File IDs */ - hid_t did_dset; /* Dataset ID */ - hid_t sid_dset; /* Dataset space ID */ - hid_t tid_cmpd1; /* Compound1 type ID */ - hid_t tid_arry1; /* Array type ID in compound1 */ - hid_t tid_cmpd2; /* Compound2 type ID */ - hid_t tid_attr; - hsize_t sdims_dset[] = {SDIM_DSET}; - hsize_t sdims_cmpd_arry[] = {SDIM_CMPD_ARRAY}; - int i,j; - herr_t ret; /* Generic return value */ + hid_t fid = -1; /* HDF5 File IDs */ + hid_t did_dset = -1; /* Dataset ID */ + hid_t sid_dset = -1; /* Dataset space ID */ + hid_t tid_cmpd1 = -1; /* Compound1 type ID */ + hid_t tid_arry1 = -1; /* Array type ID in compound1 */ + hid_t tid_cmpd2 = -1; /* Compound2 type ID */ + hid_t tid_attr = -1; + hsize_t sdims_dset[] = { SDIM_DSET }; + hsize_t sdims_cmpd_arry[] = { SDIM_CMPD_ARRAY }; + int i, j; + herr_t ret; /* Generic return value */ /* Initialize array data to write */ - for(i=0; i < SDIM_DSET; i++) - { + for (i = 0; i < SDIM_DSET; i++) { wdata[i].i1 = i; - for(j=0; j < SDIM_CMPD_ARRAY; j++) - { + for (j = 0; j < SDIM_CMPD_ARRAY; j++) { wdata[i].cmpd2[j].i2 = i * 10 + diff; - wdata[i].cmpd2[j].f2 = (float)i * 10.5F + (float)diff; + wdata[i].cmpd2[j].f2 = (float) i * 10.5F + (float) diff; } /* end for */ } - /*----------------------------------------------------------------------- + /*----------------------------------------------------------------------- * Create file(s) *------------------------------------------------------------------------*/ if (is_file_new == 1) fid = H5Fcreate(fname, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT); else - fid = H5Fopen (fname, H5F_ACC_RDWR, H5P_DEFAULT); - + fid = H5Fopen(fname, H5F_ACC_RDWR, H5P_DEFAULT); /* ------------------------------- - * Create a sub compound2 datatype */ + * Create a sub compound2 datatype */ tid_cmpd2 = H5Tcreate(H5T_COMPOUND, sizeof(cmpd2_t)); /* Insert integer field */ @@ -4511,9 +4253,9 @@ static void test_comps_array (const char *fname, const char *dset, const char *a assert(ret >= 0); /*----------------------------------- - * Create a top compound1. - */ - tid_cmpd1 = H5Tcreate (H5T_COMPOUND, sizeof(cmpd1_t)); + * Create a top compound1. + */ + tid_cmpd1 = H5Tcreate(H5T_COMPOUND, sizeof(cmpd1_t)); ret = H5Tinsert(tid_cmpd1, "int1", HOFFSET(cmpd1_t, i1), H5T_NATIVE_INT); assert(ret >= 0); @@ -4524,10 +4266,9 @@ static void test_comps_array (const char *fname, const char *dset, const char *a ret = H5Tinsert(tid_cmpd1, "array_cmpd1", HOFFSET(cmpd1_t, cmpd2), tid_arry1); assert(ret >= 0); - /* ------------------- - * Create a dataset - */ + * Create a dataset + */ /* Create dataspace for datasets */ sid_dset = H5Screate_simple(1, sdims_dset, NULL); @@ -4538,15 +4279,15 @@ static void test_comps_array (const char *fname, const char *dset, const char *a assert(ret >= 0); /*----------------------------------- - * Create an attribute in root group - */ + * Create an attribute in root group + */ tid_attr = H5Acreate2(fid, attr, tid_cmpd1, sid_dset, H5P_DEFAULT, H5P_DEFAULT); assert(tid_attr > 0); ret = H5Awrite(tid_attr, tid_cmpd1, wdata); assert(ret >= 0); /* ---------------- - * Close Dataset */ + * Close Dataset */ ret = H5Aclose(tid_attr); assert(ret >= 0); ret = H5Tclose(tid_arry1); @@ -4563,9 +4304,7 @@ static void test_comps_array (const char *fname, const char *dset, const char *a assert(ret >= 0); } - - -static void test_comps_vlen (const char * fname, const char *dset, const char *attr, int diff, int is_file_new) +static void test_comps_vlen(const char * fname, const char *dset, const char *attr, int diff, int is_file_new) { /* sub compound 2 */ typedef struct { @@ -4576,44 +4315,46 @@ static void test_comps_vlen (const char * fname, const char *dset, const char *a /* top compound 1 */ typedef struct { int i1; - hvl_t vl; /* VL information for compound2 */ + hvl_t vl; /* VL information for compound2 */ } cmpd1_t; - cmpd1_t wdata[SDIM_DSET]; /* Dataset for compound1 */ + cmpd1_t wdata[SDIM_DSET]; /* Dataset for compound1 */ - hid_t fid; /* HDF5 File ID */ - hid_t did_dset; /* dataset ID */ - hid_t sid_dset; /* dataset space ID */ - hid_t tid_attr; - hid_t tid_cmpd2; /* compound2 type ID */ - hid_t tid_cmpd1; /* compound1 type ID */ - hid_t tid_cmpd1_vlen; - hsize_t sdims_dset[] = {SDIM_DSET}; + hid_t fid = -1; /* HDF5 File ID */ + hid_t did_dset = -1; /* dataset ID */ + hid_t sid_dset = -1; /* dataset space ID */ + hid_t tid_attr = -1; + hid_t tid_cmpd2 = -1; /* compound2 type ID */ + hid_t tid_cmpd1 = -1; /* compound1 type ID */ + hid_t tid_cmpd1_vlen = -1; + hsize_t sdims_dset[] = { SDIM_DSET }; - unsigned i,j; /* counting variables */ - herr_t ret; /* Generic return value */ + unsigned i, j; /* counting variables */ + herr_t ret; /* Generic return value */ /* Allocate and initialize VL data to write */ - for(i = 0; i < SDIM_DSET; i++) { - wdata[i].i1 = (int)i; + for (i = 0; i < SDIM_DSET; i++) { + wdata[i].i1 = (int) i; wdata[i].vl.p = HDmalloc((i + 1) * sizeof(cmpd2_t)); wdata[i].vl.len = i + 1; - for(j = 0; j < (i + 1); j++) { - ((cmpd2_t *)wdata[i].vl.p)[j].i2 = (int)(i * 10 + (unsigned)diff); - ((cmpd2_t *)wdata[i].vl.p)[j].f2 = (float)i * 10.5F + (float)diff; + for (j = 0; j < (i + 1); j++) { + ((cmpd2_t *) wdata[i].vl.p)[j].i2 = + (int) (i * 10 + (unsigned) diff); + ((cmpd2_t *) wdata[i].vl.p)[j].f2 = (float) i * 10.5F + + (float) diff; } /* end for */ } /* end for */ /*----------------------------------------------------------------------- - * Create file(s) - *------------------------------------------------------------------------*/ + * Create file(s) + *------------------------------------------------------------------------*/ if (is_file_new == 1) fid = H5Fcreate(fname, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT); else - fid = H5Fopen (fname, H5F_ACC_RDWR, H5P_DEFAULT); + fid = H5Fopen(fname, H5F_ACC_RDWR, H5P_DEFAULT); /* ----------------------------- - * Create sub compound2 type */ + * Create sub compound2 type */ tid_cmpd2 = H5Tcreate(H5T_COMPOUND, sizeof(cmpd2_t)); /* Insert fields */ @@ -4623,7 +4364,7 @@ static void test_comps_vlen (const char * fname, const char *dset, const char *a assert(ret >= 0); /* --------------------------- - * Create top compound1 type */ + * Create top compound1 type */ tid_cmpd1 = H5Tcreate(H5T_COMPOUND, sizeof(cmpd1_t)); /* Insert fields */ ret = H5Tinsert(tid_cmpd1, "int1", HOFFSET(cmpd1_t, i1), H5T_NATIVE_INT); @@ -4635,8 +4376,8 @@ static void test_comps_vlen (const char * fname, const char *dset, const char *a assert(ret >= 0); /* ------------------------------- - * Create dataset with compound1 - */ + * Create dataset with compound1 + */ /* Create dataspace for dataset */ sid_dset = H5Screate_simple(1, sdims_dset, NULL); @@ -4648,8 +4389,8 @@ static void test_comps_vlen (const char * fname, const char *dset, const char *a assert(ret >= 0); /*----------------------------------- - * Create an attribute in root group - */ + * Create an attribute in root group + */ tid_attr = H5Acreate2(fid, attr, tid_cmpd1, sid_dset, H5P_DEFAULT, H5P_DEFAULT); assert(tid_attr > 0); ret = H5Awrite(tid_attr, tid_cmpd1, wdata); @@ -4660,7 +4401,7 @@ static void test_comps_vlen (const char * fname, const char *dset, const char *a assert(ret >= 0); /* ---------------- - * Close IDs */ + * Close IDs */ ret = H5Aclose(tid_attr); assert(ret >= 0); ret = H5Dclose(did_dset); @@ -4677,17 +4418,16 @@ static void test_comps_vlen (const char * fname, const char *dset, const char *a assert(ret >= 0); } - -static void test_comps_array_vlen (const char * fname, const char *dset,const char *attr, int diff, int is_file_new) +static void test_comps_array_vlen(const char * fname, const char *dset, const char *attr, int diff, int is_file_new) { typedef struct { int i3; float f3; } cmpd3_t; - typedef struct { /* Typedef for compound datatype */ + typedef struct { /* Typedef for compound datatype */ int i2; - hvl_t vl; /* VL information to write */ + hvl_t vl; /* VL information to write */ } cmpd2_t; typedef struct { @@ -4695,53 +4435,53 @@ static void test_comps_array_vlen (const char * fname, const char *dset,const ch cmpd2_t cmpd2[SDIM_CMPD_ARRAY]; } cmpd1_t; - cmpd1_t wdata[SDIM_DSET]; /* Information to write */ - hid_t fid; /* HDF5 File IDs */ - hid_t did_dset; /* Dataset ID */ - hid_t sid_dset; /* Dataspace ID */ - hid_t tid_attr; - hid_t tid_cmpd1; /* Compound1 Datatype ID */ - hid_t tid_arry1; /* Array Datatype ID */ - hid_t tid_cmpd2; /* Compound2 Datatype ID */ - hid_t tid_cmpd2_vlen; - hid_t tid_cmpd3; /* Compound3 Datatype ID */ - hsize_t sdims_dset[] = {SDIM_DSET}; - hsize_t sdims_arry[] = {SDIM_CMPD_ARRAY}; - unsigned i, j, k; /* counting variables */ - herr_t ret; /* Generic return value */ - - + cmpd1_t wdata[SDIM_DSET]; /* Information to write */ + hid_t fid = -1; /* HDF5 File IDs */ + hid_t did_dset = -1; /* Dataset ID */ + hid_t sid_dset = -1; /* Dataspace ID */ + hid_t tid_attr = -1; + hid_t tid_cmpd1 = -1; /* Compound1 Datatype ID */ + hid_t tid_arry1 = -1; /* Array Datatype ID */ + hid_t tid_cmpd2 = -1; /* Compound2 Datatype ID */ + hid_t tid_cmpd2_vlen = -1; + hid_t tid_cmpd3 = -1; /* Compound3 Datatype ID */ + hsize_t sdims_dset[] = { SDIM_DSET }; + hsize_t sdims_arry[] = { SDIM_CMPD_ARRAY }; + unsigned i, j, k; /* counting variables */ + herr_t ret; /* Generic return value */ /* Initialize array data to write in compound1 */ - for(i = 0; i < SDIM_DSET; i++) { - wdata[i].i1 = (int)i; + for (i = 0; i < SDIM_DSET; i++) { + wdata[i].i1 = (int) i; /* Allocate and initialize VL data to write in compound2 */ - for(j = 0; j < SDIM_CMPD_ARRAY; j++) { - wdata[i].cmpd2[j].i2 = (int)(j * 10); + for (j = 0; j < SDIM_CMPD_ARRAY; j++) { + wdata[i].cmpd2[j].i2 = (int) (j * 10); wdata[i].cmpd2[j].vl.p = HDmalloc((j + 1) * sizeof(cmpd3_t)); wdata[i].cmpd2[j].vl.len = j + 1; - for(k = 0; k < (j + 1); k++) { + for (k = 0; k < (j + 1); k++) { /* Initialize data of compound3 */ - ((cmpd3_t *)wdata[i].cmpd2[j].vl.p)[k].i3 = (int)j * 10 + diff; - ((cmpd3_t *)wdata[i].cmpd2[j].vl.p)[k].f3 = (float)j * 10.5F + (float)diff; + ((cmpd3_t *) wdata[i].cmpd2[j].vl.p)[k].i3 = (int) j * 10 + + diff; + ((cmpd3_t *) wdata[i].cmpd2[j].vl.p)[k].f3 = (float) j * 10.5F + + (float) diff; } /* end for */ } /* end for */ } /*----------------------------------------------------------------------- - * Create file(s) - *------------------------------------------------------------------------*/ + * Create file(s) + *------------------------------------------------------------------------*/ if (is_file_new == 1) fid = H5Fcreate(fname, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT); else - fid = H5Fopen (fname, H5F_ACC_RDWR, H5P_DEFAULT); + fid = H5Fopen(fname, H5F_ACC_RDWR, H5P_DEFAULT); /* Create dataspace for datasets */ sid_dset = H5Screate_simple(1, sdims_dset, NULL); /*------------------------------------- - * Create a sub compound3 datatype */ + * Create a sub compound3 datatype */ tid_cmpd3 = H5Tcreate(H5T_COMPOUND, sizeof(cmpd3_t)); /* Insert integer field */ @@ -4752,9 +4492,8 @@ static void test_comps_array_vlen (const char * fname, const char *dset,const ch ret = H5Tinsert(tid_cmpd3, "float", HOFFSET(cmpd3_t, f3), H5T_NATIVE_FLOAT); assert(ret >= 0); - /*------------------------------------- - * Create a sub compound2 datatype */ + * Create a sub compound2 datatype */ tid_cmpd2 = H5Tcreate(H5T_COMPOUND, sizeof(cmpd2_t)); /* Insert integer field */ @@ -4765,20 +4504,18 @@ static void test_comps_array_vlen (const char * fname, const char *dset,const ch ret = H5Tinsert(tid_cmpd2, "vlen", HOFFSET(cmpd2_t, vl), tid_cmpd2_vlen); assert(ret >= 0); - /*----------------------------------- - * Create a top compound1 datatype for dataset. - */ - tid_cmpd1 = H5Tcreate (H5T_COMPOUND, sizeof(cmpd1_t)); + * Create a top compound1 datatype for dataset. + */ + tid_cmpd1 = H5Tcreate(H5T_COMPOUND, sizeof(cmpd1_t)); /* Create an array datatype */ tid_arry1 = H5Tarray_create2(tid_cmpd2, 1, sdims_arry); /* insert the array */ H5Tinsert(tid_cmpd1, "array_comp", HOFFSET(cmpd1_t, cmpd2), tid_arry1); - /* ---------------------- - * Create a dataset */ + * Create a dataset */ did_dset = H5Dcreate2(fid, dset, tid_cmpd1, sid_dset, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); /* Write dataset to disk */ @@ -4786,8 +4523,8 @@ static void test_comps_array_vlen (const char * fname, const char *dset,const ch assert(ret >= 0); /*----------------------------------- - * Create an attribute in root group - */ + * Create an attribute in root group + */ tid_attr = H5Acreate2(fid, attr, tid_cmpd1, sid_dset, H5P_DEFAULT, H5P_DEFAULT); assert(tid_attr > 0); ret = H5Awrite(tid_attr, tid_cmpd1, wdata); @@ -4798,7 +4535,7 @@ static void test_comps_array_vlen (const char * fname, const char *dset,const ch assert(ret >= 0); /*------------------- - * Close IDs */ + * Close IDs */ ret = H5Aclose(tid_attr); assert(ret >= 0); ret = H5Tclose(tid_arry1); @@ -4819,8 +4556,7 @@ static void test_comps_array_vlen (const char * fname, const char *dset,const ch assert(ret >= 0); } - -static void test_comps_vlen_arry (const char * fname, const char *dset, const char *attr, int diff, int is_file_new) +static void test_comps_vlen_arry(const char * fname, const char *dset, const char *attr, int diff, int is_file_new) { /* sub compound 3 */ typedef struct { @@ -4837,53 +4573,53 @@ static void test_comps_vlen_arry (const char * fname, const char *dset, const ch /* top compound 1 */ typedef struct { int i1; - hvl_t vl; /* VL information for compound2 */ + hvl_t vl; /* VL information for compound2 */ } cmpd1_t; - cmpd1_t wdata[SDIM_DSET]; /* Dataset for compound1 */ + cmpd1_t wdata[SDIM_DSET]; /* Dataset for compound1 */ - hid_t fid; /* HDF5 File ID */ - hid_t did_dset; /* dataset ID */ - hid_t sid_dset; /* dataset space ID */ - hid_t tid_attr; - hid_t tid_cmpd3; /* compound3 type ID */ - hid_t tid_cmpd2; /* compound2 type ID */ - hid_t tid_cmpd2_arry; - hid_t tid_cmpd1; /* compound1 type ID */ - hid_t tid_cmpd1_vlen; - hsize_t sdims_dset[] = {SDIM_DSET}; - hsize_t sdims_cmpd_arry[] = {SDIM_CMPD_ARRAY}; + hid_t fid = -1; /* HDF5 File ID */ + hid_t did_dset = -1; /* dataset ID */ + hid_t sid_dset = -1; /* dataset space ID */ + hid_t tid_attr = -1; + hid_t tid_cmpd3 = -1; /* compound3 type ID */ + hid_t tid_cmpd2 = -1; /* compound2 type ID */ + hid_t tid_cmpd2_arry = -1; + hid_t tid_cmpd1 = -1; /* compound1 type ID */ + hid_t tid_cmpd1_vlen = -1; + hsize_t sdims_dset[] = { SDIM_DSET }; + hsize_t sdims_cmpd_arry[] = { SDIM_CMPD_ARRAY }; - unsigned i,j,k; /* counting variables */ - herr_t ret; /* Generic return value */ + unsigned i, j, k; /* counting variables */ + herr_t ret; /* Generic return value */ /* Allocate and initialize VL data to write */ - for(i = 0; i < SDIM_DSET; i++) { + for (i = 0; i < SDIM_DSET; i++) { /* compound 1 data */ - wdata[i].i1 = (int)i; + wdata[i].i1 = (int) i; wdata[i].vl.p = HDmalloc((i + 1) * sizeof(cmpd2_t)); wdata[i].vl.len = i + 1; - for(j = 0; j < (i + 1); j++) { + for (j = 0; j < (i + 1); j++) { /* compound2 data */ - ((cmpd2_t *)wdata[i].vl.p)[j].i2 = (int)i * 10 + diff; - for(k = 0; k < SDIM_CMPD_ARRAY; k++) { + ((cmpd2_t *) wdata[i].vl.p)[j].i2 = (int) i * 10 + diff; + for (k = 0; k < SDIM_CMPD_ARRAY; k++) { /* compound 3 data */ - ((cmpd2_t *)(wdata[i].vl.p))[j].cmpd3[k].i3 = (int)((float)k * 10.5F) + diff; - ((cmpd2_t *)(wdata[i].vl.p))[j].cmpd3[k].f3 = (float)k * 10.5F + (float)diff; + ((cmpd2_t *) (wdata[i].vl.p))[j].cmpd3[k].i3 = (int) ((float) k * 10.5F) + diff; + ((cmpd2_t *) (wdata[i].vl.p))[j].cmpd3[k].f3 = (float) k * 10.5F + (float) diff; } /* end for */ } /* end for */ } /* end for */ /*----------------------------------------------------------------------- - * Create file(s) - *------------------------------------------------------------------------*/ + * Create file(s) + *------------------------------------------------------------------------*/ if (is_file_new == 1) fid = H5Fcreate(fname, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT); else - fid = H5Fopen (fname, H5F_ACC_RDWR, H5P_DEFAULT); + fid = H5Fopen(fname, H5F_ACC_RDWR, H5P_DEFAULT); /* ----------------------------- - * Create sub compound3 type */ + * Create sub compound3 type */ tid_cmpd3 = H5Tcreate(H5T_COMPOUND, sizeof(cmpd3_t)); /* Insert fields */ @@ -4893,7 +4629,7 @@ static void test_comps_vlen_arry (const char * fname, const char *dset, const ch assert(ret >= 0); /* ----------------------------- - * Create sub compound2 type */ + * Create sub compound2 type */ tid_cmpd2 = H5Tcreate(H5T_COMPOUND, sizeof(cmpd2_t)); ret = H5Tinsert(tid_cmpd2, "int2", HOFFSET(cmpd2_t, i2), H5T_NATIVE_INT); @@ -4904,8 +4640,8 @@ static void test_comps_vlen_arry (const char * fname, const char *dset, const ch assert(ret >= 0); /* --------------------------- - * Create top compound1 type - */ + * Create top compound1 type + */ /* Create a VL datatype */ tid_cmpd1 = H5Tcreate(H5T_COMPOUND, sizeof(cmpd1_t)); /* Insert fields */ @@ -4916,21 +4652,22 @@ static void test_comps_vlen_arry (const char * fname, const char *dset, const ch assert(ret >= 0); /* ------------------------------- - * Create dataset with compound1 - */ + * Create dataset with compound1 + */ /* Create dataspace for dataset */ sid_dset = H5Screate_simple(1, sdims_dset, NULL); /* Create a dataset */ - did_dset = H5Dcreate2(fid, dset, tid_cmpd1, sid_dset, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); + did_dset = H5Dcreate2(fid, dset, tid_cmpd1, sid_dset, H5P_DEFAULT, + H5P_DEFAULT, H5P_DEFAULT); /* Write dataset to disk */ ret = H5Dwrite(did_dset, tid_cmpd1, H5S_ALL, H5S_ALL, H5P_DEFAULT, wdata); assert(ret >= 0); /*----------------------------------- - * Create an attribute in root group - */ + * Create an attribute in root group + */ tid_attr = H5Acreate2(fid, attr, tid_cmpd1, sid_dset, H5P_DEFAULT, H5P_DEFAULT); assert(tid_attr > 0); ret = H5Awrite(tid_attr, tid_cmpd1, wdata); @@ -4941,7 +4678,7 @@ static void test_comps_vlen_arry (const char * fname, const char *dset, const ch assert(ret >= 0); /* ---------------- - * Close IDs */ + * Close IDs */ ret = H5Aclose(tid_attr); assert(ret >= 0); ret = H5Dclose(did_dset); @@ -4962,99 +4699,95 @@ static void test_comps_vlen_arry (const char * fname, const char *dset, const ch assert(ret >= 0); } - /*------------------------------------------------------------------------- -* Function: test_data_nocomparables -* -* Purpose: -* Create test files with non-comparable dataset and attributes with -* comparable datasets and attributes. All the comparables should display -* differences. -* -*-------------------------------------------------------------------------*/ + * Function: test_data_nocomparables + * + * Purpose: + * Create test files with non-comparable dataset and attributes with + * comparable datasets and attributes. All the comparables should display + * differences. + * + *-------------------------------------------------------------------------*/ #define DIM_ARRY 3 -static void test_data_nocomparables (const char * fname, int make_diffs) +static void test_data_nocomparables(const char * fname, int make_diffs) { - hid_t fid=0; - hid_t gid1=0; - hid_t gid2=0; - hid_t did1=0; - hid_t did2=0; - hid_t sid1=0; - hid_t tid_dset1=0; - hid_t tid_attr1=0; - hsize_t dims1_1[1] = {DIM_ARRY}; - hsize_t dims1_2[1] = {DIM_ARRY+1}; - hsize_t dims2[2] = {DIM_ARRY, 1}; - int data1[DIM_ARRY] = {0,0,0}; - int data2[DIM_ARRY] = {1,1,1}; - int data3[DIM_ARRY+1] = {1,1,1,1}; - int data1_dim2[DIM_ARRY][1] = {{0},{0},{0}}; + hid_t fid = -1; + hid_t gid1 = -1; + hid_t gid2 = -1; + hid_t did1 = -1; + hid_t did2 = -1; + hid_t sid1 = -1; + hid_t tid_dset1 = -1; + hid_t tid_attr1 = -1; + hsize_t dims1_1[1] = { DIM_ARRY }; + hsize_t dims1_2[1] = { DIM_ARRY + 1 }; + hsize_t dims2[2] = { DIM_ARRY, 1 }; + int data1[DIM_ARRY] = { 0, 0, 0 }; + int data2[DIM_ARRY] = { 1, 1, 1 }; + int data3[DIM_ARRY + 1] = { 1, 1, 1, 1 }; + int data1_dim2[DIM_ARRY][1] = { { 0 }, { 0 }, { 0 } }; int rank_attr; - char data1_str[DIM_ARRY][STR_SIZE]= {"ab","cd","ef"}; - herr_t status = SUCCEED; - void *dset_data_ptr1=NULL; - void *dset_data_ptr2=NULL; - void *dset_data_ptr3=NULL; - void *attr_data_ptr1=NULL; - void *attr_data_ptr2=NULL; - void *attr_data_ptr3=NULL; - void *attr_data_ptr4=NULL; - void *attr2_dim_ptr=NULL; - void *attr3_dim_ptr=NULL; + char data1_str[DIM_ARRY][STR_SIZE] = { "ab", "cd", "ef" }; + herr_t status = SUCCEED; + void *dset_data_ptr1 = NULL; + void *dset_data_ptr2 = NULL; + void *dset_data_ptr3 = NULL; + void *attr_data_ptr1 = NULL; + void *attr_data_ptr2 = NULL; + void *attr_data_ptr3 = NULL; + void *attr_data_ptr4 = NULL; + void *attr2_dim_ptr = NULL; + void *attr3_dim_ptr = NULL; /* init */ - tid_dset1=H5Tcopy(H5T_NATIVE_INT); - dset_data_ptr1=(int*)&data1; - dset_data_ptr2=(int*)&data1; - dset_data_ptr3=(int*)&data1; - tid_attr1=H5Tcopy(H5T_NATIVE_INT); - attr_data_ptr1=(int*)&data1; - attr_data_ptr3=(int*)&data1; - attr_data_ptr4=(int*)&data1; - attr2_dim_ptr=(hsize_t*)&dims1_1; - attr3_dim_ptr=(hsize_t*)&dims1_1; - rank_attr=1; - - if (make_diffs) - { + tid_dset1 = H5Tcopy(H5T_NATIVE_INT); + dset_data_ptr1 = (int*) &data1; + dset_data_ptr2 = (int*) &data1; + dset_data_ptr3 = (int*) &data1; + tid_attr1 = H5Tcopy(H5T_NATIVE_INT); + attr_data_ptr1 = (int*) &data1; + attr_data_ptr3 = (int*) &data1; + attr_data_ptr4 = (int*) &data1; + attr2_dim_ptr = (hsize_t*) &dims1_1; + attr3_dim_ptr = (hsize_t*) &dims1_1; + rank_attr = 1; + + if (make_diffs) { /* ------------ - * group1 */ - tid_dset1=H5Tcopy(H5T_C_S1); - H5Tset_size(tid_dset1, (size_t)STR_SIZE); - dset_data_ptr1=(char*)&data1_str; - dset_data_ptr2=(int*)&data2; - attr_data_ptr1=(int*)&data2; + * group1 */ + tid_dset1 = H5Tcopy(H5T_C_S1); + H5Tset_size(tid_dset1, (size_t) STR_SIZE); + dset_data_ptr1 = (char*) &data1_str; + dset_data_ptr2 = (int*) &data2; + attr_data_ptr1 = (int*) &data2; /* ----------- - * group2 - */ - dset_data_ptr3=(int*)&data2; + * group2 + */ + dset_data_ptr3 = (int*) &data2; /* dset1/attr1 */ - tid_attr1=H5Tcopy(H5T_C_S1); - H5Tset_size(tid_attr1, (size_t)STR_SIZE); - attr_data_ptr2=(char*)&data1_str; + tid_attr1 = H5Tcopy(H5T_C_S1); + H5Tset_size(tid_attr1, (size_t) STR_SIZE); + attr_data_ptr2 = (char*) &data1_str; /* dset1/attr2 */ - attr2_dim_ptr=(hsize_t*)&dims1_2; + attr2_dim_ptr = (hsize_t*) &dims1_2; /* dset1/attr3 */ - attr_data_ptr3=(int*)&data1_dim2; - attr3_dim_ptr=(hsize_t*)&dims2; - rank_attr=2; + attr_data_ptr3 = (int*) &data1_dim2; + attr3_dim_ptr = (hsize_t*) &dims2; + rank_attr = 2; /* dset1/attr4 */ - attr_data_ptr4=(int*)&data2; + attr_data_ptr4 = (int*) &data2; } - - /*----------------------------------------------------------------------- + /*----------------------------------------------------------------------- * Create file(s) *------------------------------------------------------------------------*/ - fid = H5Fcreate (fname, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT); - if (fid < 0) - { + fid = H5Fcreate(fname, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT); + if (fid < 0) { fprintf(stderr, "Error: %s> H5Fcreate failed.\n", fname); status = FAIL; goto out; @@ -5064,16 +4797,14 @@ static void test_data_nocomparables (const char * fname, int make_diffs) * Groups *------------------------------------------------------------------------*/ gid1 = H5Gcreate2(fid, "g1", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); - if (gid1 < 0) - { + if (gid1 < 0) { fprintf(stderr, "Error: %s> H5Gcreate2 failed.\n", fname); status = FAIL; goto out; } gid2 = H5Gcreate2(fid, "g2", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); - if (gid2 < 0) - { + if (gid2 < 0) { fprintf(stderr, "Error: %s> H5Gcreate2 failed.\n", fname); status = FAIL; goto out; @@ -5082,29 +4813,26 @@ static void test_data_nocomparables (const char * fname, int make_diffs) /*----------------------------------------------------------------------- * Datasets in /g1 *------------------------------------------------------------------------*/ - if((sid1 = H5Screate_simple(1, dims1_1, NULL)) < 0) - goto out; + if ((sid1 = H5Screate_simple(1, dims1_1, NULL)) < 0) + goto out; /* dset1 */ - if((did1 = H5Dcreate2(gid1, "dset1", tid_dset1, sid1, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) - { + if ((did1 = H5Dcreate2(gid1, "dset1", tid_dset1, sid1, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) { fprintf(stderr, "Error: %s> H5Dcreate2 failed.\n", "dset1"); status = FAIL; goto out; } - if(H5Dwrite(did1, tid_dset1, H5S_ALL, H5S_ALL, H5P_DEFAULT, dset_data_ptr1) < 0) - { + if (H5Dwrite(did1, tid_dset1, H5S_ALL, H5S_ALL, H5P_DEFAULT, dset_data_ptr1) < 0) { fprintf(stderr, "Error: %s> H5Dwrite failed.\n", "dset1"); status = FAIL; goto out; } - write_attr(did1,1,dims1_1,"attr", H5T_NATIVE_INT, attr_data_ptr1); + write_attr(did1, 1, dims1_1, "attr", H5T_NATIVE_INT, attr_data_ptr1); /* dset2 */ - status = write_dset(gid1, 1, dims1_1,"dset2", H5T_NATIVE_INT, dset_data_ptr2); - if (status == FAIL) - { + status = write_dset(gid1, 1, dims1_1, "dset2", H5T_NATIVE_INT, dset_data_ptr2); + if (status == FAIL) { fprintf(stderr, "Error: %s> write_dset failed\n", fname); goto out; } @@ -5113,108 +4841,100 @@ static void test_data_nocomparables (const char * fname, int make_diffs) * Datasets in /g2 *------------------------------------------------------------------------*/ /* --------- - * dset1 */ - if((did2 = H5Dcreate2(gid2, "dset1", H5T_NATIVE_INT, sid1, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) - { + * dset1 */ + if ((did2 = H5Dcreate2(gid2, "dset1", H5T_NATIVE_INT, sid1, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) { fprintf(stderr, "Error: %s> H5Dcreate2 failed.\n", "dset1"); status = FAIL; goto out; } - if(H5Dwrite(did2, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, dset_data_ptr3) < 0) - { + if (H5Dwrite(did2, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, dset_data_ptr3) < 0) { fprintf(stderr, "Error: %s> H5Dwrite failed.\n", "dset1"); status = FAIL; goto out; } /* attr1 - non-compatible : different type */ - write_attr(did2,1,dims1_1,"attr1", tid_attr1, attr_data_ptr2); - + write_attr(did2, 1, dims1_1, "attr1", tid_attr1, attr_data_ptr2); /* attr2 - non-compatible : same rank, different dimention */ - write_attr(did2,1,(hsize_t *)attr2_dim_ptr,"attr2", H5T_NATIVE_INT, data3); + write_attr(did2, 1, (hsize_t *) attr2_dim_ptr, "attr2", H5T_NATIVE_INT, data3); /* attr3 - non-compatible : different rank */ - write_attr(did2, rank_attr,(hsize_t *)attr3_dim_ptr,"attr3", H5T_NATIVE_INT, attr_data_ptr3); + write_attr(did2, rank_attr, (hsize_t *) attr3_dim_ptr, "attr3", H5T_NATIVE_INT, attr_data_ptr3); /* attr4 - compatible : different data values */ - write_attr(did2,1,dims1_1,"attr4", H5T_NATIVE_INT, attr_data_ptr4); + write_attr(did2, 1, dims1_1, "attr4", H5T_NATIVE_INT, attr_data_ptr4); /*---------- - * dset2 */ - status = write_dset(gid2, 1, dims1_1,"dset2", H5T_NATIVE_INT, dset_data_ptr3); - if (status == FAIL) - { + * dset2 */ + status = write_dset(gid2, 1, dims1_1, "dset2", H5T_NATIVE_INT, dset_data_ptr3); + if (status == FAIL) { fprintf(stderr, "Error: %s> write_dset failed\n", fname); goto out; } - - out: /*----------------------------------------------------------------------- * Close IDs *-----------------------------------------------------------------------*/ - if(fid) + if (fid) H5Fclose(fid); - if(gid1) + if (gid1) H5Gclose(gid1); - if(gid2) + if (gid2) H5Gclose(gid2); - if(did1) + if (did1) H5Dclose(did1); - if(did2) + if (did2) H5Dclose(did2); - if(sid1) + if (sid1) H5Sclose(sid1); - if(tid_dset1) + if (tid_dset1) H5Tclose(tid_dset1); - if(tid_attr1) + if (tid_attr1) H5Tclose(tid_attr1); } /*------------------------------------------------------------------------- -* Function: test_objs_nocomparables -* -* Purpose: -* Create test files with common objects (same name) but different object -* types. -* h5diff should show non-comparable output from these common objects. -*-------------------------------------------------------------------------*/ + * Function: test_objs_nocomparables + * + * Purpose: + * Create test files with common objects (same name) but different object + * types. + * h5diff should show non-comparable output from these common objects. + *-------------------------------------------------------------------------*/ static void test_objs_nocomparables(const char *fname1, const char *fname2) { - herr_t status = SUCCEED; - hid_t fid1=0; - hid_t fid2=0; - hid_t topgid1=0; - hid_t topgid2=0; - hid_t gid1=0; - hid_t did1=0; - hid_t tid1=0; - hid_t gid2=0; - hid_t did2=0; - hid_t tid2=0; - hsize_t dims[1] = {DIM_ARRY}; - int data1[DIM_ARRY] = {1,1,1}; - int data2[DIM_ARRY] = {2,2,2}; - - /*----------------------------------------------------------------------- + herr_t status = SUCCEED; + hid_t fid1 = -1; + hid_t fid2 = -1; + hid_t topgid1 = -1; + hid_t topgid2 = -1; + hid_t gid1 = -1; + hid_t did1 = -1; + hid_t tid1 = -1; + hid_t gid2 = -1; + hid_t did2 = -1; + hid_t tid2 = -1; + hsize_t dims[1] = { DIM_ARRY }; + int data1[DIM_ARRY] = { 1, 1, 1 }; + int data2[DIM_ARRY] = { 2, 2, 2 }; + + /*----------------------------------------------------------------------- * Open file(s) to add objects *------------------------------------------------------------------------*/ /* file1 */ - fid1 = H5Fopen (fname1, H5F_ACC_RDWR, H5P_DEFAULT); - if (fid1 < 0) - { + fid1 = H5Fopen(fname1, H5F_ACC_RDWR, H5P_DEFAULT); + if (fid1 < 0) { fprintf(stderr, "Error: %s> H5Fopen failed.\n", fname1); status = FAIL; goto out; } /* file2 */ - fid2 = H5Fopen (fname2, H5F_ACC_RDWR, H5P_DEFAULT); - if (fid2 < 0) - { + fid2 = H5Fopen(fname2, H5F_ACC_RDWR, H5P_DEFAULT); + if (fid2 < 0) { fprintf(stderr, "Error: %s> H5Fopen failed.\n", fname2); status = FAIL; goto out; @@ -5225,25 +4945,22 @@ static void test_objs_nocomparables(const char *fname1, const char *fname2) *------------------------------------------------------------------------*/ /* parent group */ topgid1 = H5Gcreate2(fid1, "diffobjtypes", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); - if (topgid1 < 0) - { + if (topgid1 < 0) { fprintf(stderr, "Error: %s> H5Gcreate2 failed.\n", fname1); status = FAIL; goto out; } /* dataset */ - status = write_dset(topgid1, 1, dims,"obj1", H5T_NATIVE_INT, data1); - if (status == FAIL) - { + status = write_dset(topgid1, 1, dims, "obj1", H5T_NATIVE_INT, data1); + if (status == FAIL) { fprintf(stderr, "Error: %s> write_dset failed\n", fname1); goto out; } /* group */ gid1 = H5Gcreate2(topgid1, "obj2", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); - if (gid1 < 0) - { + if (gid1 < 0) { fprintf(stderr, "Error: %s> H5Gcreate2 failed.\n", fname1); status = FAIL; goto out; @@ -5252,8 +4969,7 @@ static void test_objs_nocomparables(const char *fname1, const char *fname2) /* committed type */ tid1 = H5Tcopy(H5T_NATIVE_INT); status = H5Tcommit2(topgid1, "obj3", tid1, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); - if (status < 0) - { + if (status < 0) { fprintf(stderr, "Error: %s> H5Tcommit2 failed.\n", fname1); goto out; } @@ -5263,8 +4979,7 @@ static void test_objs_nocomparables(const char *fname1, const char *fname2) *------------------------------------------------------------------------*/ /* parent group */ topgid2 = H5Gcreate2(fid2, "diffobjtypes", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); - if (topgid2 < 0) - { + if (topgid2 < 0) { fprintf(stderr, "Error: %s> H5Gcreate2 failed.\n", fname2); status = FAIL; goto out; @@ -5272,8 +4987,7 @@ static void test_objs_nocomparables(const char *fname1, const char *fname2) /* group */ gid2 = H5Gcreate2(topgid2, "obj1", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); - if (gid2 < 0) - { + if (gid2 < 0) { fprintf(stderr, "Error: %s> H5Gcreate2 failed.\n", fname2); status = FAIL; goto out; @@ -5282,16 +4996,14 @@ static void test_objs_nocomparables(const char *fname1, const char *fname2) /* committed type */ tid2 = H5Tcopy(H5T_NATIVE_INT); status = H5Tcommit2(topgid2, "obj2", tid2, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); - if (status < 0) - { + if (status < 0) { fprintf(stderr, "Error: %s> H5Tcommit2 failed.\n", fname2); goto out; } /* dataset */ - status = write_dset(topgid2, 1, dims,"obj3", H5T_NATIVE_INT, data2); - if (status == FAIL) - { + status = write_dset(topgid2, 1, dims, "obj3", H5T_NATIVE_INT, data2); + if (status == FAIL) { fprintf(stderr, "Error: %s> write_dset failed\n", fname2); goto out; } @@ -5300,113 +5012,109 @@ out: /*----------------------------------------------------------------------- * Close IDs *-----------------------------------------------------------------------*/ - if(fid1) + if (fid1) H5Fclose(fid1); - if(fid2) + if (fid2) H5Fclose(fid2); - if(topgid1) + if (topgid1) H5Gclose(topgid1); - if(topgid2) + if (topgid2) H5Gclose(topgid2); - if(did1) + if (did1) H5Dclose(did1); - if(did2) + if (did2) H5Dclose(did2); - if(gid1) + if (gid1) H5Gclose(gid1); - if(gid2) + if (gid2) H5Gclose(gid2); - if(tid1) + if (tid1) H5Tclose(tid1); - if(tid2) + if (tid2) H5Tclose(tid2); } -static hid_t mkstr(int size, H5T_str_t pad) { +static hid_t mkstr(int size, H5T_str_t pad) +{ hid_t type; - if((type=H5Tcopy(H5T_C_S1)) < 0) return -1; - if(H5Tset_size(type, (size_t)size) < 0) return -1; - if(H5Tset_strpad(type, pad) < 0) return -1; + if ((type = H5Tcopy(H5T_C_S1)) < 0) + return -1; + if (H5Tset_size(type, (size_t) size) < 0) + return -1; + if (H5Tset_strpad(type, pad) < 0) + return -1; return type; } /*------------------------------------------------------------------------- -* Function: test_objs_strings -* -* Purpose: -* Create test files with common objects (same name) but different string -* types. -* h5diff should show differences output from these common objects. -*-------------------------------------------------------------------------*/ + * Function: test_objs_strings + * + * Purpose: + * Create test files with common objects (same name) but different string + * types. + * h5diff should show differences output from these common objects. + *-------------------------------------------------------------------------*/ static void test_objs_strings(const char *fname1, const char *fname2) { - hid_t fid1=0; - hid_t fid2=0; - hid_t dataset=0; - hid_t space=0; - hid_t f_type=0; - hid_t m_type=0; - hsize_t dims1[] = {3, 4}; - char string1A[12][3] = {"s1","s2","s3","s4","s5","s6","s","s","s9", - "s0","s1","s2"}; - char string1B[12][3] = {"s1","s2","s3","s4","s","s","s7","s8","s9", - "s0","s1","s2"}; - - hsize_t dims2[]={20}; - char string2A[20][10] = {"ab cd ef1", "ab cd ef2", "ab cd ef3", "ab cd ef4", - "ab cd ef5", "ab cd ef6", "ab cd ef7", "ab cd ef8", - "ab cd 9", "ab cd 0", "ab cd 1", "ab cd 2", - "ab cd ef3", "ab cd ef4", "ab cd ef5", "ab cd ef6", - "ab cd ef7", "ab cd ef8", "ab cd ef9", "ab cd ef0"}; - char string2B[20][10] = {"ab cd ef1", "ab cd ef2", "ab cd ef3", "ab cd ef4", - "ab cd ef5", "ab cd ef6", "ab cd ef7", "ab cd ef8", - "ab cd ef9", "ab cd ef0", "ab cd ef1", "ab cd ef2", - "ab cd 3", "ab cd 4", "ab cd 5", "ab cd 6", - "ab cd ef7", "ab cd ef8", "ab cd ef9", "ab cd ef0"}; - - hsize_t dims3[] = {27}; - char string3A[27][6] = {"abcd0", "abcd1", "abcd2", "abcd3", - "abcd4", "abcd5", "abcd6", "abcd7", - "abcd8", "abcd9", "abcd0", "abcd1", - "abd2", "abc3", "bcd4", "acd5", - "abcd6", "abcd7", "abcd8", "abcd9", - "abcd0", "abcd1", "abcd2", "abcd3", - "abc4", "abc5", "abc6"}; - char string3B[27][6] = {"abcd0", "abcd1", "abcd2", "abcd3", - "abcd4", "abcd5", "abcd6", "abcd7", - "abcd8", "abcd9", "abcd0", "abcd1", - "abcd2", "abcd3", "abcd4", "abcd5", - "abd6", "abc7", "bcd8", "acd9", - "abcd0", "abcd1", "abcd2", "abcd3", - "abd4", "abd5", "abd6"}; - - hsize_t dims4[] = {3}; + hid_t fid1 = -1; + hid_t fid2 = -1; + hid_t dataset = -1; + hid_t space = -1; + hid_t f_type = -1; + hid_t m_type = -1; + hsize_t dims1[] = { 3, 4 }; + char string1A[12][3] = { "s1", "s2", "s3", "s4", "s5", "s6", "s", "s", "s9", + "s0", "s1", "s2" }; + char string1B[12][3] = { "s1", "s2", "s3", "s4", "s", "s", "s7", "s8", "s9", + "s0", "s1", "s2" }; + + hsize_t dims2[] = { 20 }; + char string2A[20][10] = { "ab cd ef1", "ab cd ef2", "ab cd ef3", + "ab cd ef4", "ab cd ef5", "ab cd ef6", "ab cd ef7", "ab cd ef8", + "ab cd 9", "ab cd 0", "ab cd 1", "ab cd 2", "ab cd ef3", + "ab cd ef4", "ab cd ef5", "ab cd ef6", "ab cd ef7", "ab cd ef8", + "ab cd ef9", "ab cd ef0" }; + char string2B[20][10] = { "ab cd ef1", "ab cd ef2", "ab cd ef3", + "ab cd ef4", "ab cd ef5", "ab cd ef6", "ab cd ef7", "ab cd ef8", + "ab cd ef9", "ab cd ef0", "ab cd ef1", "ab cd ef2", "ab cd 3", + "ab cd 4", "ab cd 5", "ab cd 6", "ab cd ef7", "ab cd ef8", + "ab cd ef9", "ab cd ef0" }; + + hsize_t dims3[] = { 27 }; + char string3A[27][6] = { "abcd0", "abcd1", "abcd2", "abcd3", "abcd4", + "abcd5", "abcd6", "abcd7", "abcd8", "abcd9", "abcd0", "abcd1", + "abd2", "abc3", "bcd4", "acd5", "abcd6", "abcd7", "abcd8", "abcd9", + "abcd0", "abcd1", "abcd2", "abcd3", "abc4", "abc5", "abc6" }; + char string3B[27][6] = { "abcd0", "abcd1", "abcd2", "abcd3", "abcd4", + "abcd5", "abcd6", "abcd7", "abcd8", "abcd9", "abcd0", "abcd1", + "abcd2", "abcd3", "abcd4", "abcd5", "abd6", "abc7", "bcd8", "acd9", + "abcd0", "abcd1", "abcd2", "abcd3", "abd4", "abd5", "abd6" }; + + hsize_t dims4[] = { 3 }; char string4A[3][21] = { "s1234567890123456789", "s1234567890123456789", - "s12345678901234567"}; + "s12345678901234567" }; char string4B[3][21] = { "s1234567890123456789", "s12345678901234567", - "s1234567890123456789"}; + "s1234567890123456789" }; /*----------------------------------------------------------------------- - * Create file(s) - *------------------------------------------------------------------------*/ - /* file1 */ - fid1 = H5Fcreate (fname1, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT); - if (fid1 < 0) - { - fprintf(stderr, "Error: %s> H5Fcreate failed.\n", fname1); - goto out; - } - - /* file2 */ - fid2 = H5Fcreate (fname2, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT); - if (fid2 < 0) - { - fprintf(stderr, "Error: %s> H5Fcreate failed.\n", fname2); - goto out; - } + * Create file(s) + *------------------------------------------------------------------------*/ + /* file1 */ + fid1 = H5Fcreate(fname1, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT); + if (fid1 < 0) { + fprintf(stderr, "Error: %s> H5Fcreate failed.\n", fname1); + goto out; + } + + /* file2 */ + fid2 = H5Fcreate(fname2, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT); + if (fid2 < 0) { + fprintf(stderr, "Error: %s> H5Fcreate failed.\n", fname2); + goto out; + } /* string 1 : nullterm string */ space = H5Screate_simple(2, dims1, NULL); @@ -5496,88 +5204,82 @@ out: /*----------------------------------------------------------------------- * Close IDs *-----------------------------------------------------------------------*/ - if(fid1) + if (fid1) H5Fclose(fid1); - if(fid2) + if (fid2) H5Fclose(fid2); } /*------------------------------------------------------------------------- -* Function: write_attr_in -* -* Purpose: write attributes in LOC_ID (dataset, group, named datatype) -* -*------------------------------------------------------------------------- -*/ + * Function: write_attr_strings + * + * Purpose: write attributes in LOC_ID (dataset, group, named datatype) + * swap VL strings + * + *------------------------------------------------------------------------- + */ static -void write_attr_in(hid_t loc_id, - const char* dset_name, /* for saving reference to dataset*/ - hid_t fid, - int make_diffs /* flag to modify data buffers */) +void write_attr_strings(hid_t loc_id, const char* dset_name, hid_t fid, int make_diffs /* flag to modify data buffers */) { /* Compound datatype */ - typedef struct s_t - { - char a; + typedef struct s_t { + char a; double b; } s_t; - typedef enum - { - RED, - GREEN + typedef enum { + RED, GREEN } e_t; - hid_t aid; - hid_t sid; - hid_t tid; - herr_t status; - int val, i, j, k, l, n; - float f; + hid_t aid = -1; + hid_t sid = -1; + hid_t tid = -1; + herr_t status; + int val, i, j, k, l, n; + float f; /* create 1D attributes with dimension [2], 2 elements */ - hsize_t dims[1]={2}; - char buf1[2][STR_SIZE]= {"ab","de"}; /* string */ - char *buf1a[2]; /* VL string */ - char buf2[2]= {1,2}; /* bitfield, opaque */ - s_t buf3[2]= {{1,2.0F},{3,4.0F}}; /* compound */ - hobj_ref_t buf4[2]; /* reference */ - e_t buf45[2]= {RED,RED}; /* enum */ - hvl_t buf5[2]; /* vlen */ - hsize_t dimarray[1]={3}; /* array dimension */ - int buf6[2][3]= {{1,2,3},{4,5,6}}; /* array */ - int buf7[2]= {1,2}; /* integer */ - float buf8[2]= {1.0F, 2.0F}; /* float */ + hsize_t dims[1] = { 2 }; + char buf1[2][STR_SIZE] = { "ab", "de" }; /* string */ + char *buf1a[2]; /* VL string */ + char buf2[2] = { 1, 2 }; /* bitfield, opaque */ + s_t buf3[2] = { { 1, 2.0F }, { 3, 4.0F } }; /* compound */ + hobj_ref_t buf4[2]; /* reference */ + e_t buf45[2] = { RED, RED }; /* enum */ + hvl_t buf5[2]; /* vlen */ + hsize_t dimarray[1] = { 3 }; /* array dimension */ + int buf6[2][3] = { { 1, 2, 3 }, { 4, 5, 6 } }; /* array */ + int buf7[2] = { 1, 2 }; /* integer */ + float buf8[2] = { 1.0F, 2.0F }; /* float */ /* create 2D attributes with dimension [3][2], 6 elements */ - hsize_t dims2[2]={3,2}; - char buf12[3][2][STR_SIZE]= {{"ab","cd"},{"ef","gh"},{"ij","kl"}}; /* string */ - char *buf12a[3][2]; /* VL string */ - char buf22[3][2]= {{1,2},{3,4},{5,6}}; /* bitfield, opaque */ - s_t buf32[6]= {{1,2.0F},{3,4.0F},{5,6.0F},{7,8.0F},{9,10.0F},{11,12.0F}}; /* compound */ - hobj_ref_t buf42[3][2]; /* reference */ - e_t buf452[3][2]; /* enum */ - hvl_t buf52[3][2]; /* vlen */ - int buf62[6][3]= {{1,2,3},{4,5,6},{7,8,9},{10,11,12},{13,14,15},{16,17,18}}; /* array */ - int buf72[3][2]= {{1,2},{3,4},{5,6}}; /* integer */ - float buf82[3][2]= {{1.0F,2.0F},{3.0F,4.0F},{5.0F,6.0F}}; /* float */ + hsize_t dims2[2] = { 3, 2 }; + char buf12[3][2][STR_SIZE] = { { "ab", "cd" }, { "ef", "gh" }, { "ij", "kl" } }; /* string */ + char *buf12a[3][2]; /* VL string */ + char buf22[3][2] = { { 1, 2 }, { 3, 4 }, { 5, 6 } }; /* bitfield, opaque */ + s_t buf32[6] = { { 1, 2.0F }, { 3, 4.0F }, { 5, 6.0F }, { 7, 8.0F }, { 9, 10.0F }, { 11, 12.0F } }; /* compound */ + hobj_ref_t buf42[3][2]; /* reference */ + e_t buf452[3][2]; /* enum */ + hvl_t buf52[3][2]; /* vlen */ + int buf62[6][3] = { { 1, 2, 3 }, { 4, 5, 6 }, { 7, 8, 9 }, { 10, 11, 12 }, { 13, 14, 15 }, { 16, 17, 18 } }; /* array */ + int buf72[3][2] = { { 1, 2 }, { 3, 4 }, { 5, 6 } }; /* integer */ + float buf82[3][2] = { { 1.0F, 2.0F }, { 3.0F, 4.0F }, { 5.0F, 6.0F } }; /* float */ /* create 3D attributes with dimension [4][3][2], 24 elements */ - hsize_t dims3[3]={4,3,2}; - char buf13[4][3][2][STR_SIZE]= {{{"ab","cd"},{"ef","gh"},{"ij","kl"}}, - {{"mn","pq"},{"rs","tu"},{"vw","xz"}}, - {{"AB","CD"},{"EF","GH"},{"IJ","KL"}}, - {{"MN","PQ"},{"RS","TU"},{"VW","XZ"}}}; /* string */ - char *buf13a[4][3][2]; /* VL string */ - char buf23[4][3][2]; /* bitfield, opaque */ - s_t buf33[4][3][2]; /* compound */ - hobj_ref_t buf43[4][3][2]; /* reference */ - e_t buf453[4][3][2]; /* enum */ - hvl_t buf53[4][3][2]; /* vlen */ - int buf63[24][3]; /* array */ - int buf73[4][3][2]; /* integer */ - float buf83[4][3][2]; /* float */ - + hsize_t dims3[3] = { 4, 3, 2 }; + char buf13[4][3][2][STR_SIZE] = { { { "ab", "cd" }, { "ef", "gh" }, { "ij", "kl" } }, + { { "mn", "pq" }, { "rs", "tu" }, { "vw", "xz" } }, + { { "AB", "CD" }, { "EF", "GH" }, { "IJ", "KL" } }, + { { "MN", "PQ" }, { "RS", "TU" }, { "VW", "XZ" } } }; /* string */ + char *buf13a[4][3][2]; /* VL string */ + char buf23[4][3][2]; /* bitfield, opaque */ + s_t buf33[4][3][2]; /* compound */ + hobj_ref_t buf43[4][3][2]; /* reference */ + e_t buf453[4][3][2]; /* enum */ + hvl_t buf53[4][3][2]; /* vlen */ + int buf63[24][3]; /* array */ + int buf73[4][3][2]; /* integer */ + float buf83[4][3][2]; /* float */ /*------------------------------------------------------------------------- * 1D attributes @@ -5590,15 +5292,10 @@ void write_attr_in(hid_t loc_id, */ if (make_diffs) - { - for (i=0; i<2; i++) - { - for (j=0; j<2; j++) - { - buf1[i][j]='z'; - } - } - } + for (i = 0; i < 2; i++) + for (j = 0; j < 2; j++) + buf1[i][j] = 'z'; + /* buf1[2][2]= {"ab","de"}; $h5diff file7.h5 file6.h5 g1 g1 -v @@ -5611,16 +5308,17 @@ void write_attr_in(hid_t loc_id, [ 1 ] d z [ 1 ] e z */ + for (i = 0; i < 2; i++) + buf1a[i] = buf1[i]; + tid = H5Tcopy(H5T_C_S1); - status = H5Tset_size(tid, (size_t)STR_SIZE); - write_attr(loc_id,1,dims,"string",tid,buf1); + status = H5Tset_size(tid, H5T_VARIABLE); + write_attr(loc_id, 1, dims, "string", tid, buf1a); status = H5Tclose(tid); - for (i=0; i<2; i++) - buf1a[i]=buf1[i]; tid = H5Tcopy(H5T_C_S1); - status = H5Tset_size(tid, H5T_VARIABLE); - write_attr(loc_id,1,dims,"VLstring",tid,buf1a); + status = H5Tset_size(tid, (size_t)STR_SIZE); + write_attr(loc_id, 1, dims, "VLstring", tid, buf1); status = H5Tclose(tid); /*------------------------------------------------------------------------- @@ -5629,10 +5327,8 @@ void write_attr_in(hid_t loc_id, */ if (make_diffs) - { - for (i=0; i<2; i++) - buf2[i]=buf2[1]=0; - } + for (i = 0; i < 2; i++) + buf2[i] = buf2[1] = 0; /* buf2[2]= {1,2}; $h5diff file7.h5 file6.h5 g1 g1 -v @@ -5646,7 +5342,7 @@ void write_attr_in(hid_t loc_id, */ tid = H5Tcopy(H5T_STD_B8LE); - write_attr(loc_id,1,dims,"bitfield",tid,buf2); + write_attr(loc_id, 1, dims, "bitfield", tid, buf2); status = H5Tclose(tid); /*------------------------------------------------------------------------- @@ -5666,9 +5362,9 @@ void write_attr_in(hid_t loc_id, [ 1 ] 2 0 2 */ - tid = H5Tcreate(H5T_OPAQUE, (size_t)1); + tid = H5Tcreate(H5T_OPAQUE, (size_t) 1); status = H5Tset_tag(tid, "1-byte opaque type"); /* must set this */ - write_attr(loc_id,1,dims,"opaque",tid,buf2); + write_attr(loc_id, 1, dims, "opaque", tid, buf2); status = H5Tclose(tid); /*------------------------------------------------------------------------- @@ -5677,12 +5373,10 @@ void write_attr_in(hid_t loc_id, */ if (make_diffs) - { - for (i=0; i<2; i++) - { - buf3[i].a=0; buf3[i].b=0; + for (i = 0; i < 2; i++) { + buf3[i].a = 0; + buf3[i].b = 0; } - } /* buf3[2]= {{1,2},{3,4}}; @@ -5697,10 +5391,10 @@ void write_attr_in(hid_t loc_id, [ 1 ] 4 5 1 */ - tid = H5Tcreate (H5T_COMPOUND, sizeof(s_t)); + tid = H5Tcreate(H5T_COMPOUND, sizeof(s_t)); H5Tinsert(tid, "a", HOFFSET(s_t, a), H5T_NATIVE_CHAR); H5Tinsert(tid, "b", HOFFSET(s_t, b), H5T_NATIVE_DOUBLE); - write_attr(loc_id,1,dims,"compound",tid,buf3); + write_attr(loc_id, 1, dims, "compound", tid, buf3); status = H5Tclose(tid); /*------------------------------------------------------------------------- @@ -5708,70 +5402,64 @@ void write_attr_in(hid_t loc_id, *------------------------------------------------------------------------- */ /* Create references to dataset */ - if (dset_name) - { - status=H5Rcreate(&buf4[0],fid,dset_name,H5R_OBJECT,(hid_t)-1); - status=H5Rcreate(&buf4[1],fid,dset_name,H5R_OBJECT,(hid_t)-1); - write_attr(loc_id,1,dims,"reference",H5T_STD_REF_OBJ,buf4); + if (dset_name) { + status = H5Rcreate(&buf4[0], fid, dset_name, H5R_OBJECT, (hid_t) -1); + status = H5Rcreate(&buf4[1], fid, dset_name, H5R_OBJECT, (hid_t) -1); + write_attr(loc_id, 1, dims, "reference", H5T_STD_REF_OBJ, buf4); } /*------------------------------------------------------------------------- - * H5T_ENUM - *------------------------------------------------------------------------- - */ + * H5T_ENUM + *------------------------------------------------------------------------- + */ if (make_diffs) - { - for (i=0; i<2; i++) - { - buf45[i]=GREEN; - } - } + for (i = 0; i < 2; i++) + buf45[i] = GREEN; /* - buf45[2]= {RED,RED}; - $h5diff file7.h5 file6.h5 g1 g1 -v - Group: and - Attribute: and - position enum of enum of difference - ------------------------------------------------------------ - [ 0 ] RED GREEN - [ 1 ] RED GREEN - */ + buf45[2]= {RED,RED}; + $h5diff file7.h5 file6.h5 g1 g1 -v + Group: and + Attribute: and + position enum of enum of difference + ------------------------------------------------------------ + [ 0 ] RED GREEN + [ 1 ] RED GREEN + */ tid = H5Tcreate(H5T_ENUM, sizeof(e_t)); - H5Tenum_insert(tid, "RED", (val = 0, &val)); + H5Tenum_insert(tid, "RED", (val = 0, &val)); H5Tenum_insert(tid, "GREEN", (val = 1, &val)); - write_attr(loc_id,1,dims,"enum",tid,buf45); + write_attr(loc_id, 1, dims, "enum", tid, buf45); status = H5Tclose(tid); /*------------------------------------------------------------------------- - * H5T_VLEN - *------------------------------------------------------------------------- - */ + * H5T_VLEN + *------------------------------------------------------------------------- + */ /* Allocate and initialize VL dataset to write */ buf5[0].len = 1; - buf5[0].p = HDmalloc( 1 * sizeof(int)); - ((int *)buf5[0].p)[0]=1; + buf5[0].p = HDmalloc(1 * sizeof(int)); + ((int *) buf5[0].p)[0] = 1; buf5[1].len = 2; - buf5[1].p = HDmalloc( 2 * sizeof(int)); - ((int *)buf5[1].p)[0]=2; - ((int *)buf5[1].p)[1]=3; + buf5[1].p = HDmalloc(2 * sizeof(int)); + ((int *) buf5[1].p)[0] = 2; + ((int *) buf5[1].p)[1] = 3; - if (make_diffs) - { - ((int *)buf5[0].p)[0]=0; - ((int *)buf5[1].p)[0]=0; - ((int *)buf5[1].p)[1]=0; + if (make_diffs) { + ((int *) buf5[0].p)[0] = 0; + ((int *) buf5[1].p)[0] = 0; + ((int *) buf5[1].p)[1] = 0; } /* - $h5diff file7.h5 file6.h5 g1 g1 -v - Group: and - position vlen of vlen of difference - ------------------------------------------------------------ - [ 0 ] 1 0 1 - [ 1 ] 2 0 2 - [ 1 ] 3 0 3 - */ + $h5diff file7.h5 file6.h5 g1 g1 -v + Group: and + position vlen of vlen of difference + ------------------------------------------------------------ + [ 0 ] 1 0 1 + [ 1 ] 2 0 2 + [ 1 ] 3 0 3 + */ sid = H5Screate_simple(1, dims, NULL); tid = H5Tvlen_create(H5T_NATIVE_INT); @@ -5785,31 +5473,1016 @@ void write_attr_in(hid_t loc_id, status = H5Sclose(sid); /*------------------------------------------------------------------------- - * H5T_ARRAY - *------------------------------------------------------------------------- - */ + * H5T_ARRAY + *------------------------------------------------------------------------- + */ if (make_diffs) - { - for (i=0; i<2; i++) - for (j=0; j<3; j++) - { - buf6[i][j]=0; - } - } + for (i = 0; i < 2; i++) + for (j = 0; j < 3; j++) + buf6[i][j] = 0; /* - buf6[2][3]= {{1,2,3},{4,5,6}}; - $h5diff file7.h5 file6.h5 g1 g1 -v - Group: and - Attribute: and - position array of array of difference - ------------------------------------------------------------ - [ 0 ] 1 0 1 - [ 0 ] 2 0 2 - [ 0 ] 3 0 3 - [ 1 ] 4 0 4 - [ 1 ] 5 0 5 - [ 1 ] 6 0 6 + buf6[2][3]= {{1,2,3},{4,5,6}}; + $h5diff file7.h5 file6.h5 g1 g1 -v + Group: and + Attribute: and + position array of array of difference + ------------------------------------------------------------ + [ 0 ] 1 0 1 + [ 0 ] 2 0 2 + [ 0 ] 3 0 3 + [ 1 ] 4 0 4 + [ 1 ] 5 0 5 + [ 1 ] 6 0 6 + */ + tid = H5Tarray_create2(H5T_NATIVE_INT, 1, dimarray); + write_attr(loc_id, 1, dims, "array", tid, buf6); + status = H5Tclose(tid); + + /*------------------------------------------------------------------------- + * H5T_INTEGER and H5T_FLOAT + *------------------------------------------------------------------------- + */ + + if (make_diffs) + for (i = 0; i < 2; i++) { + buf7[i] = 0; + buf8[i] = 0; + } + /* + buf7[2]= {1,2}; + buf8[2]= {1,2}; + $h5diff file7.h5 file6.h5 g1 g1 -v + Group: and + position integer of integer of difference + ------------------------------------------------------------ + [ 0 ] 1 0 1 + [ 1 ] 2 0 2 + position float of float of difference + ------------------------------------------------------------ + [ 0 ] 1 0 1 + [ 1 ] 2 0 2 + */ + write_attr(loc_id, 1, dims, "integer", H5T_NATIVE_INT, buf7); + write_attr(loc_id, 1, dims, "float", H5T_NATIVE_FLOAT, buf8); + + /*------------------------------------------------------------------------- + * 2D attributes + *------------------------------------------------------------------------- + */ + + /*------------------------------------------------------------------------- + * H5T_STRING + *------------------------------------------------------------------------- + */ + if (make_diffs) + for (i = 0; i < 3; i++) + for (j = 0; j < 2; j++) + for (k = 0; k < 2; k++) + buf12[i][j][k] = 'z'; + + /* + buf12[6][2]= {"ab","cd","ef","gh","ij","kl"}; + $h5diff file7.h5 file6.h5 g1 g1 -v + Attribute: and + position string2D of string2D of difference + ------------------------------------------------------------ + [ 0 0 ] a z + [ 0 0 ] b z + [ 0 1 ] c z + [ 0 1 ] d z + [ 1 0 ] e z + [ 1 0 ] f z + [ 1 1 ] g z + [ 1 1 ] h z + [ 2 0 ] i z + [ 2 0 ] j z + [ 2 1 ] k z + [ 2 1 ] l z + */ + + for (i = 0; i < 3; i++) + for (j = 0; j < 2; j++) + buf12a[i][j] = buf12[i][j]; + + tid = H5Tcopy(H5T_C_S1); + status = H5Tset_size(tid, H5T_VARIABLE); + write_attr(loc_id, 2, dims2, "string2D", tid, buf12a); + status = H5Tclose(tid); + + tid = H5Tcopy(H5T_C_S1); + status = H5Tset_size(tid, (size_t) STR_SIZE); + write_attr(loc_id, 2, dims2, "VLstring2D", tid, buf12); + status = H5Tclose(tid); + + /*------------------------------------------------------------------------- + * H5T_BITFIELD + *------------------------------------------------------------------------- + */ + + if (make_diffs) + memset(buf22, 0, sizeof buf22); + /* + buf22[3][2]= {{1,2},{3,4},{5,6}}; + $h5diff file7.h5 file6.h5 g1 g1 -v + Attribute: and + position bitfield2D of bitfield2D of difference + ------------------------------------------------------------ + [ 0 0 ] 1 0 1 + [ 0 1 ] 2 0 2 + [ 1 0 ] 3 0 3 + [ 1 1 ] 4 0 4 + [ 2 0 ] 5 0 5 + [ 2 1 ] 6 0 6 + */ + + tid = H5Tcopy(H5T_STD_B8LE); + write_attr(loc_id, 2, dims2, "bitfield2D", tid, buf22); + status = H5Tclose(tid); + + /*------------------------------------------------------------------------- + * H5T_OPAQUE + *------------------------------------------------------------------------- + */ + + /* + buf22[3][2]= {{1,2},{3,4},{5,6}}; + $h5diff file7.h5 file6.h5 g1 g1 -v + Attribute: and + position opaque2D of opaque2D of difference + ------------------------------------------------------------ + [ 0 0 ] 1 0 1 + [ 0 1 ] 2 0 2 + [ 1 0 ] 3 0 3 + [ 1 1 ] 4 0 4 + [ 2 0 ] 5 0 5 + [ 2 1 ] 6 0 6 + */ + tid = H5Tcreate(H5T_OPAQUE, (size_t) 1); + status = H5Tset_tag(tid, "1-byte opaque type"); /* must set this */ + write_attr(loc_id, 2, dims2, "opaque2D", tid, buf22); + status = H5Tclose(tid); + + /*------------------------------------------------------------------------- + * H5T_COMPOUND + *------------------------------------------------------------------------- + */ + if (make_diffs) + memset(buf32, 0, sizeof buf32); + + /* + buf32[6]= {{1,2},{3,4},{5,6},{7,8},{9,10},{11,12}}; + $h5diff file7.h5 file6.h5 g1 g1 -v + Attribute: and + position opaque2D of opaque2D of difference + ------------------------------------------------------------ + [ 0 0 ] 1 0 1 + [ 0 1 ] 2 0 2 + [ 1 0 ] 3 0 3 + [ 1 1 ] 4 0 4 + [ 2 0 ] 5 0 5 + [ 2 1 ] 6 0 6 + */ + + tid = H5Tcreate(H5T_COMPOUND, sizeof(s_t)); + H5Tinsert(tid, "a", HOFFSET(s_t, a), H5T_NATIVE_CHAR); + H5Tinsert(tid, "b", HOFFSET(s_t, b), H5T_NATIVE_DOUBLE); + write_attr(loc_id, 2, dims2, "compound2D", tid, buf32); + status = H5Tclose(tid); + + /*------------------------------------------------------------------------- + * H5T_REFERENCE (H5R_OBJECT object reference) + *------------------------------------------------------------------------- + */ + /* Create references to dataset */ + if (dset_name) { + for (i = 0; i < 3; i++) + for (j = 0; j < 2; j++) + status = H5Rcreate(&buf42[i][j], fid, dset_name, H5R_OBJECT, + (hid_t) -1); + write_attr(loc_id, 2, dims2, "reference2D", H5T_STD_REF_OBJ, buf42); + } + + /*------------------------------------------------------------------------- + * H5T_ENUM + *------------------------------------------------------------------------- + */ + for (i = 0; i < 3; i++) + for (j = 0; j < 2; j++) + if (make_diffs) + buf452[i][j] = GREEN; + else + buf452[i][j] = RED; + + /* + Attribute: and + position enum2D of enum2D of difference + ------------------------------------------------------------ + [ 0 0 ] RED GREEN + [ 0 1 ] RED GREEN + [ 1 0 ] RED GREEN + [ 1 1 ] RED GREEN + [ 2 0 ] RED GREEN + [ 2 1 ] RED GREEN + */ + + tid = H5Tcreate(H5T_ENUM, sizeof(e_t)); + H5Tenum_insert(tid, "RED", (val = 0, &val)); + H5Tenum_insert(tid, "GREEN", (val = 1, &val)); + write_attr(loc_id, 2, dims2, "enum2D", tid, buf452); + status = H5Tclose(tid); + + /*------------------------------------------------------------------------- + * H5T_VLEN + *------------------------------------------------------------------------- + */ + + /* Allocate and initialize VL dataset to write */ + n = 0; + for (i = 0; i < 3; i++) { + for (j = 0; j < 2; j++) { + buf52[i][j].p = HDmalloc((size_t)(i + 1) * sizeof(int)); + buf52[i][j].len = (size_t)(i + 1); + for (l = 0; l < i + 1; l++) + if (make_diffs) + ((int *) buf52[i][j].p)[l] = 0; + else + ((int *) buf52[i][j].p)[l] = n++; + } + } + + /* + position vlen2D of vlen2D of difference + ------------------------------------------------------------ + [ 0 1 ] 1 0 1 + [ 1 0 ] 2 0 2 + [ 1 0 ] 3 0 3 + [ 1 1 ] 4 0 4 + [ 1 1 ] 5 0 5 + [ 2 0 ] 6 0 6 + [ 2 0 ] 7 0 7 + [ 2 0 ] 8 0 8 + [ 2 1 ] 9 0 9 + [ 2 1 ] 10 0 10 + [ 2 1 ] 11 0 11 + */ + + sid = H5Screate_simple(2, dims2, NULL); + tid = H5Tvlen_create(H5T_NATIVE_INT); + aid = H5Acreate2(loc_id, "vlen2D", tid, sid, H5P_DEFAULT, H5P_DEFAULT); + status = H5Awrite(aid, tid, buf52); + assert(status >= 0); + status = H5Dvlen_reclaim(tid, sid, H5P_DEFAULT, buf52); + assert(status >= 0); + status = H5Aclose(aid); + status = H5Tclose(tid); + status = H5Sclose(sid); + + /*------------------------------------------------------------------------- + * H5T_ARRAY + *------------------------------------------------------------------------- + */ + + if (make_diffs) + memset(buf62, 0, sizeof buf62); + /* + buf62[6][3]= {{1,2,3},{4,5,6},{7,8,9},{10,11,12},{13,14,15},{16,17,18}}; + $h5diff file7.h5 file6.h5 g1 g1 -v + Group: and + Attribute: and + position array2D of array2D of difference + ------------------------------------------------------------ + [ 0 0 ] 1 0 1 + [ 0 0 ] 2 0 2 + [ 0 0 ] 3 0 3 + [ 0 1 ] 4 0 4 + [ 0 1 ] 5 0 5 + [ 0 1 ] 6 0 6 + [ 1 0 ] 7 0 7 + [ 1 0 ] 8 0 8 + [ 1 0 ] 9 0 9 + [ 1 1 ] 10 0 10 + [ 1 1 ] 11 0 11 + [ 1 1 ] 12 0 12 + [ 2 0 ] 13 0 13 + [ 2 0 ] 14 0 14 + [ 2 0 ] 15 0 15 + [ 2 1 ] 16 0 16 + [ 2 1 ] 17 0 17 + [ 2 1 ] 18 0 18 + */ + tid = H5Tarray_create2(H5T_NATIVE_INT, 1, dimarray); + write_attr(loc_id, 2, dims2, "array2D", tid, buf62); + status = H5Tclose(tid); + + /*------------------------------------------------------------------------- + * H5T_INTEGER and H5T_FLOAT + *------------------------------------------------------------------------- + */ + + if (make_diffs) { + memset(buf72, 0, sizeof buf72); + memset(buf82, 0, sizeof buf82); + } + /* + Attribute: and + position integer2D of integer2D of difference + ------------------------------------------------------------ + [ 0 0 ] 1 0 1 + [ 0 1 ] 2 0 2 + [ 1 0 ] 3 0 3 + [ 1 1 ] 4 0 4 + [ 2 0 ] 5 0 5 + [ 2 1 ] 6 0 6 + 6 differences found + Attribute: and + position float2D of float2D of difference + ------------------------------------------------------------ + [ 0 0 ] 1 0 1 + [ 0 1 ] 2 0 2 + [ 1 0 ] 3 0 3 + [ 1 1 ] 4 0 4 + [ 2 0 ] 5 0 5 + [ 2 1 ] 6 0 6 + */ + + write_attr(loc_id, 2, dims2, "integer2D", H5T_NATIVE_INT, buf72); + write_attr(loc_id, 2, dims2, "float2D", H5T_NATIVE_FLOAT, buf82); + + /*------------------------------------------------------------------------- + * 3D attributes + *------------------------------------------------------------------------- + */ + + /*------------------------------------------------------------------------- + * H5T_STRING + *------------------------------------------------------------------------- + */ + + if (make_diffs) + for (i = 0; i < 4; i++) + for (j = 0; j < 3; j++) + for (k = 0; k < 2; k++) + for (l = 0; l < 2; l++) + buf13[i][j][k][l] = 'z'; + + /* + buf13[24][2]= {"ab","cd","ef","gh","ij","kl","mn","pq", + "rs","tu","vw","xz","AB","CD","EF","GH", + "IJ","KL","MN","PQ","RS","TU","VW","XZ"}; + + Attribute: and + position string3D of string3D of difference + ------------------------------------------------------------ + [ 0 0 0 ] a z + [ 0 0 0 ] b z + [ 0 0 1 ] c z + [ 0 0 1 ] d z + [ 0 1 0 ] e z + [ 0 1 0 ] f z + [ 0 1 1 ] g z + [ 0 1 1 ] h z + [ 0 2 0 ] i z + [ 0 2 0 ] j z + [ 0 2 1 ] k z + [ 0 2 1 ] l z + [ 1 0 0 ] m z + [ 1 0 0 ] n z + [ 1 0 1 ] p z + [ 1 0 1 ] q z + [ 1 1 0 ] r z + [ 1 1 0 ] s z + [ 1 1 1 ] t z + [ 1 1 1 ] u z + [ 1 2 0 ] v z + [ 1 2 0 ] w z + [ 1 2 1 ] x z + [ 2 0 0 ] A z + [ 2 0 0 ] B z + [ 2 0 1 ] C z + [ 2 0 1 ] D z + [ 2 1 0 ] E z + [ 2 1 0 ] F z + [ 2 1 1 ] G z + [ 2 1 1 ] H z + [ 2 2 0 ] I z + [ 2 2 0 ] J z + [ 2 2 1 ] K z + [ 2 2 1 ] L z + [ 3 0 0 ] M z + [ 3 0 0 ] N z + [ 3 0 1 ] P z + [ 3 0 1 ] Q z + [ 3 1 0 ] R z + [ 3 1 0 ] S z + [ 3 1 1 ] T z + [ 3 1 1 ] U z + [ 3 2 0 ] V z + [ 3 2 0 ] W z + [ 3 2 1 ] X z + [ 3 2 1 ] Z z + */ + + for (i = 0; i < 4; i++) + for (j = 0; j < 3; j++) + for (k = 0; k < 2; k++) + buf13a[i][j][k] = buf13[i][j][k]; + + tid = H5Tcopy(H5T_C_S1); + status = H5Tset_size(tid, H5T_VARIABLE); + write_attr(loc_id, 3, dims3, "string3D", tid, buf13a); + status = H5Tclose(tid); + + tid = H5Tcopy(H5T_C_S1); + status = H5Tset_size(tid, (size_t) STR_SIZE); + write_attr(loc_id, 3, dims3, "VLstring3D", tid, buf13); + status = H5Tclose(tid); + + /*------------------------------------------------------------------------- + * H5T_BITFIELD + *------------------------------------------------------------------------- + */ + + n = 1; + for (i = 0; i < 4; i++) + for (j = 0; j < 3; j++) + for (k = 0; k < 2; k++) + if (make_diffs) + buf23[i][j][k] = 0; + else + buf23[i][j][k] = (char) n++; + + /* + position bitfield3D of bitfield3D of difference + ------------------------------------------------------------ + [ 0 0 0 ] 1 0 1 + [ 0 0 1 ] 2 0 2 + [ 0 1 0 ] 3 0 3 + [ 0 1 1 ] 4 0 4 + [ 0 2 0 ] 5 0 5 + [ 0 2 1 ] 6 0 6 + [ 1 0 0 ] 7 0 7 + [ 1 0 1 ] 8 0 8 + [ 1 1 0 ] 9 0 9 + [ 1 1 1 ] 10 0 10 + [ 1 2 0 ] 11 0 11 + [ 1 2 1 ] 12 0 12 + [ 2 0 0 ] 13 0 13 + [ 2 0 1 ] 14 0 14 + [ 2 1 0 ] 15 0 15 + [ 2 1 1 ] 16 0 16 + [ 2 2 0 ] 17 0 17 + [ 2 2 1 ] 18 0 18 + [ 3 0 0 ] 19 0 19 + [ 3 0 1 ] 20 0 20 + [ 3 1 0 ] 21 0 21 + [ 3 1 1 ] 22 0 22 + [ 3 2 0 ] 23 0 23 + [ 3 2 1 ] 24 0 24 + */ + + tid = H5Tcopy(H5T_STD_B8LE); + write_attr(loc_id, 3, dims3, "bitfield3D", tid, buf23); + status = H5Tclose(tid); + + /*------------------------------------------------------------------------- + * H5T_OPAQUE + *------------------------------------------------------------------------- + */ + tid = H5Tcreate(H5T_OPAQUE, (size_t) 1); + status = H5Tset_tag(tid, "1-byte opaque type"); /* must set this */ + write_attr(loc_id, 3, dims3, "opaque3D", tid, buf23); + status = H5Tclose(tid); + + /*------------------------------------------------------------------------- + * H5T_COMPOUND + *------------------------------------------------------------------------- + */ + + n = 1; + for (i = 0; i < 4; i++) + for (j = 0; j < 3; j++) + for (k = 0; k < 2; k++) + if (make_diffs) { + buf33[i][j][k].a = 0; + buf33[i][j][k].b = 0.0F; + } else { + buf33[i][j][k].a = (char) n++; + buf33[i][j][k].b = n++; + } + /*position compound3D of compound3D of difference + ------------------------------------------------------------ + [ 0 0 0 ] 1 0 1 + [ 0 0 0 ] 2 0 2 + [ 0 0 1 ] 3 0 3 + [ 0 0 1 ] 4 0 4 + [ 0 1 0 ] 5 0 5 + [ 0 1 0 ] 6 0 6 + [ 0 1 1 ] 7 0 7 + [ 0 1 1 ] 8 0 8 + [ 0 2 0 ] 9 0 9 + [ 0 2 0 ] 10 0 10 + [ 0 2 1 ] 11 0 11 + [ 0 2 1 ] 12 0 12 + [ 1 0 0 ] 13 0 13 + [ 1 0 0 ] 14 0 14 + [ 1 0 1 ] 15 0 15 + [ 1 0 1 ] 16 0 16 + [ 1 1 0 ] 17 0 17 + [ 1 1 0 ] 18 0 18 + [ 1 1 1 ] 19 0 19 + [ 1 1 1 ] 20 0 20 + [ 1 2 0 ] 21 0 21 + [ 1 2 0 ] 22 0 22 + [ 1 2 1 ] 23 0 23 + [ 1 2 1 ] 24 0 24 + [ 2 0 0 ] 25 0 25 + [ 2 0 0 ] 26 0 26 + [ 2 0 1 ] 27 0 27 + [ 2 0 1 ] 28 0 28 + [ 2 1 0 ] 29 0 29 + [ 2 1 0 ] 30 0 30 + [ 2 1 1 ] 31 0 31 + [ 2 1 1 ] 32 0 32 + [ 2 2 0 ] 33 0 33 + [ 2 2 0 ] 34 0 34 + [ 2 2 1 ] 35 0 35 + [ 2 2 1 ] 36 0 36 + [ 3 0 0 ] 37 0 37 + [ 3 0 0 ] 38 0 38 + [ 3 0 1 ] 39 0 39 + [ 3 0 1 ] 40 0 40 + [ 3 1 0 ] 41 0 41 + [ 3 1 0 ] 42 0 42 + [ 3 1 1 ] 43 0 43 + [ 3 1 1 ] 44 0 44 + [ 3 2 0 ] 45 0 45 + [ 3 2 0 ] 46 0 46 + [ 3 2 1 ] 47 0 47 + [ 3 2 1 ] 48 0 48 + */ + + tid = H5Tcreate(H5T_COMPOUND, sizeof(s_t)); + H5Tinsert(tid, "a", HOFFSET(s_t, a), H5T_NATIVE_CHAR); + H5Tinsert(tid, "b", HOFFSET(s_t, b), H5T_NATIVE_DOUBLE); + write_attr(loc_id, 3, dims3, "compound3D", tid, buf33); + status = H5Tclose(tid); + + /*------------------------------------------------------------------------- + * H5T_REFERENCE (H5R_OBJECT object reference) + *------------------------------------------------------------------------- + */ + /* Create references to dataset */ + if (dset_name) { + for (i = 0; i < 4; i++) + for (j = 0; j < 3; j++) + for (k = 0; k < 2; k++) + status = H5Rcreate(&buf43[i][j][k], fid, dset_name, + H5R_OBJECT, (hid_t) -1); + write_attr(loc_id, 3, dims3, "reference3D", H5T_STD_REF_OBJ, buf43); + } + + /*------------------------------------------------------------------------- + * H5T_ENUM + *------------------------------------------------------------------------- + */ + + for (i = 0; i < 4; i++) + for (j = 0; j < 3; j++) + for (k = 0; k < 2; k++) + if (make_diffs) + buf453[i][j][k] = RED; + else + buf453[i][j][k] = GREEN; + + /* + position enum3D of enum3D of difference + ------------------------------------------------------------ + [ 0 0 0 ] GREEN RED + [ 0 0 1 ] GREEN RED + [ 0 1 0 ] GREEN RED + [ 0 1 1 ] GREEN RED + [ 0 2 0 ] GREEN RED + [ 0 2 1 ] GREEN RED + [ 1 0 0 ] GREEN RED + [ 1 0 1 ] GREEN RED + [ 1 1 0 ] GREEN RED + [ 1 1 1 ] GREEN RED + [ 1 2 0 ] GREEN RED + [ 1 2 1 ] GREEN RED + [ 2 0 0 ] GREEN RED + [ 2 0 1 ] GREEN RED + [ 2 1 0 ] GREEN RED + [ 2 1 1 ] GREEN RED + [ 2 2 0 ] GREEN RED + [ 2 2 1 ] GREEN RED + [ 3 0 0 ] GREEN RED + [ 3 0 1 ] GREEN RED + [ 3 1 0 ] GREEN RED + [ 3 1 1 ] GREEN RED + [ 3 2 0 ] GREEN RED + [ 3 2 1 ] GREEN RED + */ + + tid = H5Tcreate(H5T_ENUM, sizeof(e_t)); + H5Tenum_insert(tid, "RED", (val = 0, &val)); + H5Tenum_insert(tid, "GREEN", (val = 1, &val)); + write_attr(loc_id, 3, dims3, "enum3D", tid, buf453); + status = H5Tclose(tid); + + /*------------------------------------------------------------------------- + * H5T_VLEN + *------------------------------------------------------------------------- + */ + + /* Allocate and initialize VL dataset to write */ + n = 0; + for (i = 0; i < 4; i++) + for (j = 0; j < 3; j++) + for (k = 0; k < 2; k++) { + buf53[i][j][k].p = HDmalloc((size_t)(i + 1) * sizeof(int)); + buf53[i][j][k].len = (size_t)(i + 1); + for (l = 0; l < i + 1; l++) + if (make_diffs) + ((int *) buf53[i][j][k].p)[l] = 0; + else + ((int *) buf53[i][j][k].p)[l] = n++; + } + /* + position vlen3D of vlen3D of difference + ------------------------------------------------------------ + [ 0 0 1 ] 1 0 1 + [ 0 1 0 ] 2 0 2 + [ 0 1 1 ] 3 0 3 + [ 0 2 0 ] 4 0 4 + [ 0 2 1 ] 5 0 5 + [ 1 0 0 ] 6 0 6 + [ 1 0 0 ] 7 0 7 + [ 1 0 1 ] 8 0 8 + [ 1 0 1 ] 9 0 9 + [ 1 1 0 ] 10 0 10 + etc + */ + sid = H5Screate_simple(3, dims3, NULL); + tid = H5Tvlen_create(H5T_NATIVE_INT); + aid = H5Acreate2(loc_id, "vlen3D", tid, sid, H5P_DEFAULT, H5P_DEFAULT); + status = H5Awrite(aid, tid, buf53); + assert(status >= 0); + status = H5Dvlen_reclaim(tid, sid, H5P_DEFAULT, buf53); + assert(status >= 0); + status = H5Aclose(aid); + status = H5Tclose(tid); + status = H5Sclose(sid); + + /*------------------------------------------------------------------------- + * H5T_ARRAY + *------------------------------------------------------------------------- + */ + n = 1; + for (i = 0; i < 24; i++) { + for (j = 0; j < (int) dimarray[0]; j++) { + if (make_diffs) + buf63[i][j] = 0; + else + buf63[i][j] = n++; + } + } + /* + position array3D of array3D of 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 1 0 ] 7 0 7 + etc + */ + + tid = H5Tarray_create2(H5T_NATIVE_INT, 1, dimarray); + write_attr(loc_id, 3, dims3, "array3D", tid, buf63); + status = H5Tclose(tid); + + /*------------------------------------------------------------------------- + * H5T_INTEGER and H5T_FLOAT + *------------------------------------------------------------------------- + */ + n = 1; + f = 1; + for (i = 0; i < 4; i++) + for (j = 0; j < 3; j++) + for (k = 0; k < 2; k++) { + if (make_diffs) { + buf73[i][j][k] = 0; + buf83[i][j][k] = 0.0F; + } + else { + buf73[i][j][k] = n++; + buf83[i][j][k] = f++; + } + } + + /* + position integer3D of integer3D of difference + ------------------------------------------------------------ + [ 0 0 0 ] 1 0 1 + [ 0 0 1 ] 2 0 2 + [ 0 1 0 ] 3 0 3 + [ 0 1 1 ] 4 0 4 + [ 0 2 0 ] 5 0 5 + [ 0 2 1 ] 6 0 6 + [ 1 0 0 ] 7 0 7 + [ 1 0 1 ] 8 0 8 + [ 1 1 0 ] 9 0 9 + [ 1 1 1 ] 10 0 10 + etc + */ + write_attr(loc_id, 3, dims3, "integer3D", H5T_NATIVE_INT, buf73); + write_attr(loc_id, 3, dims3, "float3D", H5T_NATIVE_FLOAT, buf83); +} + +/*------------------------------------------------------------------------- + * Function: write_attr_in + * + * Purpose: write attributes in LOC_ID (dataset, group, named datatype) + * + *------------------------------------------------------------------------- + */ +static +void write_attr_in(hid_t loc_id, const char* dset_name, hid_t fid, int make_diffs /* flag to modify data buffers */) +{ + /* Compound datatype */ + typedef struct s_t { + char a; + double b; + } s_t; + + typedef enum { + RED, GREEN + } e_t; + + hid_t aid = -1; + hid_t sid = -1; + hid_t tid = -1; + herr_t status; + int val, i, j, k, l, n; + float f; + + /* create 1D attributes with dimension [2], 2 elements */ + hsize_t dims[1] = { 2 }; + char buf1[2][STR_SIZE] = { "ab", "de" }; /* string */ + char *buf1a[2]; /* VL string */ + char buf2[2] = { 1, 2 }; /* bitfield, opaque */ + s_t buf3[2] = { { 1, 2.0F }, { 3, 4.0F } }; /* compound */ + hobj_ref_t buf4[2]; /* reference */ + e_t buf45[2] = { RED, RED }; /* enum */ + hvl_t buf5[2]; /* vlen */ + hsize_t dimarray[1] = { 3 }; /* array dimension */ + int buf6[2][3] = { { 1, 2, 3 }, { 4, 5, 6 } }; /* array */ + int buf7[2] = { 1, 2 }; /* integer */ + float buf8[2] = { 1.0F, 2.0F }; /* float */ + + /* create 2D attributes with dimension [3][2], 6 elements */ + hsize_t dims2[2] = { 3, 2 }; + char buf12[3][2][STR_SIZE] = { { "ab", "cd" }, { "ef", "gh" }, { "ij", "kl" } }; /* string */ + char *buf12a[3][2]; /* VL string */ + char buf22[3][2] = { { 1, 2 }, { 3, 4 }, { 5, 6 } }; /* bitfield, opaque */ + s_t buf32[6] = { { 1, 2.0F }, { 3, 4.0F }, { 5, 6.0F }, { 7, 8.0F }, { 9, 10.0F }, { 11, 12.0F } }; /* compound */ + hobj_ref_t buf42[3][2]; /* reference */ + e_t buf452[3][2]; /* enum */ + hvl_t buf52[3][2]; /* vlen */ + int buf62[6][3] = { { 1, 2, 3 }, { 4, 5, 6 }, { 7, 8, 9 }, { 10, 11, 12 }, { 13, 14, 15 }, { 16, 17, 18 } }; /* array */ + int buf72[3][2] = { { 1, 2 }, { 3, 4 }, { 5, 6 } }; /* integer */ + float buf82[3][2] = { { 1.0F, 2.0F }, { 3.0F, 4.0F }, { 5.0F, 6.0F } }; /* float */ + + /* create 3D attributes with dimension [4][3][2], 24 elements */ + hsize_t dims3[3] = { 4, 3, 2 }; + char buf13[4][3][2][STR_SIZE] = { { { "ab", "cd" }, { "ef", "gh" }, { "ij", "kl" } }, + { { "mn", "pq" }, { "rs", "tu" }, { "vw", "xz" } }, + { { "AB", "CD" }, { "EF", "GH" }, { "IJ", "KL" } }, + { { "MN", "PQ" }, { "RS", "TU" }, { "VW", "XZ" } } }; /* string */ + char *buf13a[4][3][2]; /* VL string */ + char buf23[4][3][2]; /* bitfield, opaque */ + s_t buf33[4][3][2]; /* compound */ + hobj_ref_t buf43[4][3][2]; /* reference */ + e_t buf453[4][3][2]; /* enum */ + hvl_t buf53[4][3][2]; /* vlen */ + int buf63[24][3]; /* array */ + int buf73[4][3][2]; /* integer */ + float buf83[4][3][2]; /* float */ + + /*------------------------------------------------------------------------- + * 1D attributes + *------------------------------------------------------------------------- + */ + + /*------------------------------------------------------------------------- + * H5T_STRING + *------------------------------------------------------------------------- + */ + + if (make_diffs) + for (i = 0; i < 2; i++) + for (j = 0; j < 2; j++) + buf1[i][j] = 'z'; + /* + buf1[2][2]= {"ab","de"}; + $h5diff file7.h5 file6.h5 g1 g1 -v + Group: and + Attribute: and + position string of string of difference + ------------------------------------------------------------ + [ 0 ] a z + [ 0 ] b z + [ 1 ] d z + [ 1 ] e z + */ + tid = H5Tcopy(H5T_C_S1); + status = H5Tset_size(tid, (size_t) STR_SIZE); + write_attr(loc_id, 1, dims, "string", tid, buf1); + status = H5Tclose(tid); + + for (i = 0; i < 2; i++) + buf1a[i] = buf1[i]; + tid = H5Tcopy(H5T_C_S1); + status = H5Tset_size(tid, H5T_VARIABLE); + write_attr(loc_id, 1, dims, "VLstring", tid, buf1a); + status = H5Tclose(tid); + + /*------------------------------------------------------------------------- + * H5T_BITFIELD + *------------------------------------------------------------------------- + */ + + if (make_diffs) + for (i = 0; i < 2; i++) + buf2[i] = buf2[1] = 0; + /* + buf2[2]= {1,2}; + $h5diff file7.h5 file6.h5 g1 g1 -v + Group: and + Attribute: and + position bitfield of bitfield of difference + position opaque of opaque of difference + ------------------------------------------------------------ + [ 0 ] 1 0 1 + [ 1 ] 2 0 2 + */ + + tid = H5Tcopy(H5T_STD_B8LE); + write_attr(loc_id, 1, dims, "bitfield", tid, buf2); + status = H5Tclose(tid); + + /*------------------------------------------------------------------------- + * H5T_OPAQUE + *------------------------------------------------------------------------- + */ + + /* + buf2[2]= {1,2}; + $h5diff file7.h5 file6.h5 g1 g1 -v + Group: and + Attribute: and + position opaque of opaque of difference + position opaque of opaque of difference + ------------------------------------------------------------ + [ 0 ] 1 0 1 + [ 1 ] 2 0 2 + */ + + tid = H5Tcreate(H5T_OPAQUE, (size_t) 1); + status = H5Tset_tag(tid, "1-byte opaque type"); /* must set this */ + write_attr(loc_id, 1, dims, "opaque", tid, buf2); + status = H5Tclose(tid); + + /*------------------------------------------------------------------------- + * H5T_COMPOUND + *------------------------------------------------------------------------- + */ + + if (make_diffs) + for (i = 0; i < 2; i++) { + buf3[i].a = 0; + buf3[i].b = 0; + } + /* + buf3[2]= {{1,2},{3,4}}; + $h5diff file7.h5 file6.h5 g1 g1 -v + Group: and + Attribute: and + position compound of compound of difference + ------------------------------------------------------------ + [ 0 ] 1 5 4 + [ 0 ] 2 5 3 + [ 1 ] 3 5 2 + [ 1 ] 4 5 1 + */ + + tid = H5Tcreate(H5T_COMPOUND, sizeof(s_t)); + H5Tinsert(tid, "a", HOFFSET(s_t, a), H5T_NATIVE_CHAR); + H5Tinsert(tid, "b", HOFFSET(s_t, b), H5T_NATIVE_DOUBLE); + write_attr(loc_id, 1, dims, "compound", tid, buf3); + status = H5Tclose(tid); + + /*------------------------------------------------------------------------- + * H5T_REFERENCE (H5R_OBJECT object reference) + *------------------------------------------------------------------------- + */ + /* Create references to dataset */ + if (dset_name) { + status = H5Rcreate(&buf4[0], fid, dset_name, H5R_OBJECT, (hid_t) -1); + status = H5Rcreate(&buf4[1], fid, dset_name, H5R_OBJECT, (hid_t) -1); + write_attr(loc_id, 1, dims, "reference", H5T_STD_REF_OBJ, buf4); + } + + /*------------------------------------------------------------------------- + * H5T_ENUM + *------------------------------------------------------------------------- + */ + if (make_diffs) + for (i = 0; i < 2; i++) + buf45[i] = GREEN; + /* + buf45[2]= {RED,RED}; + $h5diff file7.h5 file6.h5 g1 g1 -v + Group: and + Attribute: and + position enum of enum of difference + ------------------------------------------------------------ + [ 0 ] RED GREEN + [ 1 ] RED GREEN + */ + tid = H5Tcreate(H5T_ENUM, sizeof(e_t)); + H5Tenum_insert(tid, "RED", (val = 0, &val)); + H5Tenum_insert(tid, "GREEN", (val = 1, &val)); + write_attr(loc_id, 1, dims, "enum", tid, buf45); + status = H5Tclose(tid); + + /*------------------------------------------------------------------------- + * H5T_VLEN + *------------------------------------------------------------------------- + */ + + /* Allocate and initialize VL dataset to write */ + + buf5[0].len = 1; + buf5[0].p = HDmalloc(1 * sizeof(int)); + ((int *) buf5[0].p)[0] = 1; + buf5[1].len = 2; + buf5[1].p = HDmalloc(2 * sizeof(int)); + ((int *) buf5[1].p)[0] = 2; + ((int *) buf5[1].p)[1] = 3; + + if (make_diffs) { + ((int *) buf5[0].p)[0] = 0; + ((int *) buf5[1].p)[0] = 0; + ((int *) buf5[1].p)[1] = 0; + } + /* + $h5diff file7.h5 file6.h5 g1 g1 -v + Group: and + position vlen of vlen of difference + ------------------------------------------------------------ + [ 0 ] 1 0 1 + [ 1 ] 2 0 2 + [ 1 ] 3 0 3 + */ + + sid = H5Screate_simple(1, dims, NULL); + tid = H5Tvlen_create(H5T_NATIVE_INT); + aid = H5Acreate2(loc_id, "vlen", tid, sid, H5P_DEFAULT, H5P_DEFAULT); + status = H5Awrite(aid, tid, buf5); + assert(status >= 0); + status = H5Dvlen_reclaim(tid, sid, H5P_DEFAULT, buf5); + assert(status >= 0); + status = H5Aclose(aid); + status = H5Tclose(tid); + status = H5Sclose(sid); + + /*------------------------------------------------------------------------- + * H5T_ARRAY + *------------------------------------------------------------------------- + */ + + if (make_diffs) { + for (i = 0; i < 2; i++) + for (j = 0; j < 3; j++) + buf6[i][j] = 0; + } + /* + buf6[2][3]= {{1,2,3},{4,5,6}}; + $h5diff file7.h5 file6.h5 g1 g1 -v + Group: and + Attribute: and + position array of array of difference + ------------------------------------------------------------ + [ 0 ] 1 0 1 + [ 0 ] 2 0 2 + [ 0 ] 3 0 3 + [ 1 ] 4 0 4 + [ 1 ] 5 0 5 + [ 1 ] 6 0 6 */ tid = H5Tarray_create2(H5T_NATIVE_INT, 1, dimarray); write_attr(loc_id, 1, dims, "array", tid, buf6); @@ -5820,31 +6493,28 @@ void write_attr_in(hid_t loc_id, *------------------------------------------------------------------------- */ - if (make_diffs) - { - for (i=0; i<2; i++) - { - buf7[i]=0; - buf8[i]=0; + if (make_diffs) { + for (i = 0; i < 2; i++) { + buf7[i] = 0; + buf8[i] = 0; } } /* - buf7[2]= {1,2}; - buf8[2]= {1,2}; - $h5diff file7.h5 file6.h5 g1 g1 -v - Group: and - position integer of integer of difference - ------------------------------------------------------------ - [ 0 ] 1 0 1 - [ 1 ] 2 0 2 - position float of float of difference - ------------------------------------------------------------ - [ 0 ] 1 0 1 - [ 1 ] 2 0 2 - */ - write_attr(loc_id,1,dims,"integer",H5T_NATIVE_INT,buf7); - write_attr(loc_id,1,dims,"float",H5T_NATIVE_FLOAT,buf8); - + buf7[2]= {1,2}; + buf8[2]= {1,2}; + $h5diff file7.h5 file6.h5 g1 g1 -v + Group: and + position integer of integer of difference + ------------------------------------------------------------ + [ 0 ] 1 0 1 + [ 1 ] 2 0 2 + position float of float of difference + ------------------------------------------------------------ + [ 0 ] 1 0 1 + [ 1 ] 2 0 2 + */ + write_attr(loc_id, 1, dims, "integer", H5T_NATIVE_INT, buf7); + write_attr(loc_id, 1, dims, "float", H5T_NATIVE_FLOAT, buf8); /*------------------------------------------------------------------------- * 2D attributes @@ -5855,50 +6525,45 @@ void write_attr_in(hid_t loc_id, * H5T_STRING *------------------------------------------------------------------------- */ - if (make_diffs) - { - for (i=0; i<3; i++) - for (j=0; j<2; j++) - for (k=0; k<2; k++) - buf12[i][j][k]='z'; + if (make_diffs) { + for (i = 0; i < 3; i++) + for (j = 0; j < 2; j++) + for (k = 0; k < 2; k++) + buf12[i][j][k] = 'z'; } /* - buf12[6][2]= {"ab","cd","ef","gh","ij","kl"}; - $h5diff file7.h5 file6.h5 g1 g1 -v - Attribute: and - position string2D of string2D of difference - ------------------------------------------------------------ - [ 0 0 ] a z - [ 0 0 ] b z - [ 0 1 ] c z - [ 0 1 ] d z - [ 1 0 ] e z - [ 1 0 ] f z - [ 1 1 ] g z - [ 1 1 ] h z - [ 2 0 ] i z - [ 2 0 ] j z - [ 2 1 ] k z - [ 2 1 ] l z + buf12[6][2]= {"ab","cd","ef","gh","ij","kl"}; + $h5diff file7.h5 file6.h5 g1 g1 -v + Attribute: and + position string2D of string2D of difference + ------------------------------------------------------------ + [ 0 0 ] a z + [ 0 0 ] b z + [ 0 1 ] c z + [ 0 1 ] d z + [ 1 0 ] e z + [ 1 0 ] f z + [ 1 1 ] g z + [ 1 1 ] h z + [ 2 0 ] i z + [ 2 0 ] j z + [ 2 1 ] k z + [ 2 1 ] l z */ tid = H5Tcopy(H5T_C_S1); - status = H5Tset_size(tid, (size_t)STR_SIZE); - write_attr(loc_id,2,dims2,"string2D",tid,buf12); + status = H5Tset_size(tid, (size_t) STR_SIZE); + write_attr(loc_id, 2, dims2, "string2D", tid, buf12); status = H5Tclose(tid); - for (i=0; i<3; i++) - { - for (j=0; j<2; j++) - { + for (i = 0; i < 3; i++) + for (j = 0; j < 2; j++) + buf12a[i][j] = buf12[i][j]; - buf12a[i][j]=buf12[i][j]; - } - } tid = H5Tcopy(H5T_C_S1); - status = H5Tset_size(tid, H5T_VARIABLE); - write_attr(loc_id,2,dims2,"VLstring2D",tid,buf12a); + status = H5Tset_size(tid, H5T_VARIABLE); + write_attr(loc_id, 2, dims2, "VLstring2D", tid, buf12a); status = H5Tclose(tid); /*------------------------------------------------------------------------- @@ -5907,27 +6572,23 @@ void write_attr_in(hid_t loc_id, */ if (make_diffs) - { - memset(buf22,0,sizeof buf22); - } - + memset(buf22, 0, sizeof buf22); /* - buf22[3][2]= {{1,2},{3,4},{5,6}}; - $h5diff file7.h5 file6.h5 g1 g1 -v - Attribute: and - position bitfield2D of bitfield2D of difference - ------------------------------------------------------------ - [ 0 0 ] 1 0 1 - [ 0 1 ] 2 0 2 - [ 1 0 ] 3 0 3 - [ 1 1 ] 4 0 4 - [ 2 0 ] 5 0 5 - [ 2 1 ] 6 0 6 + buf22[3][2]= {{1,2},{3,4},{5,6}}; + $h5diff file7.h5 file6.h5 g1 g1 -v + Attribute: and + position bitfield2D of bitfield2D of difference + ------------------------------------------------------------ + [ 0 0 ] 1 0 1 + [ 0 1 ] 2 0 2 + [ 1 0 ] 3 0 3 + [ 1 1 ] 4 0 4 + [ 2 0 ] 5 0 5 + [ 2 1 ] 6 0 6 */ - tid = H5Tcopy(H5T_STD_B8LE); - write_attr(loc_id,2,dims2,"bitfield2D",tid,buf22); + write_attr(loc_id, 2, dims2, "bitfield2D", tid, buf22); status = H5Tclose(tid); /*------------------------------------------------------------------------- @@ -5936,21 +6597,21 @@ void write_attr_in(hid_t loc_id, */ /* - buf22[3][2]= {{1,2},{3,4},{5,6}}; - $h5diff file7.h5 file6.h5 g1 g1 -v - Attribute: and - position opaque2D of opaque2D of difference - ------------------------------------------------------------ - [ 0 0 ] 1 0 1 - [ 0 1 ] 2 0 2 - [ 1 0 ] 3 0 3 - [ 1 1 ] 4 0 4 - [ 2 0 ] 5 0 5 - [ 2 1 ] 6 0 6 - */ - tid = H5Tcreate(H5T_OPAQUE, (size_t)1); + buf22[3][2]= {{1,2},{3,4},{5,6}}; + $h5diff file7.h5 file6.h5 g1 g1 -v + Attribute: and + position opaque2D of opaque2D of difference + ------------------------------------------------------------ + [ 0 0 ] 1 0 1 + [ 0 1 ] 2 0 2 + [ 1 0 ] 3 0 3 + [ 1 1 ] 4 0 4 + [ 2 0 ] 5 0 5 + [ 2 1 ] 6 0 6 + */ + tid = H5Tcreate(H5T_OPAQUE, (size_t) 1); status = H5Tset_tag(tid, "1-byte opaque type"); /* must set this */ - write_attr(loc_id,2,dims2,"opaque2D",tid,buf22); + write_attr(loc_id, 2, dims2, "opaque2D", tid, buf22); status = H5Tclose(tid); /*------------------------------------------------------------------------- @@ -5958,29 +6619,25 @@ void write_attr_in(hid_t loc_id, *------------------------------------------------------------------------- */ if (make_diffs) - { - memset(buf32,0,sizeof buf32); - } - + memset(buf32, 0, sizeof buf32); /* - buf32[6]= {{1,2},{3,4},{5,6},{7,8},{9,10},{11,12}}; - $h5diff file7.h5 file6.h5 g1 g1 -v - Attribute: and - position opaque2D of opaque2D of difference - ------------------------------------------------------------ - [ 0 0 ] 1 0 1 - [ 0 1 ] 2 0 2 - [ 1 0 ] 3 0 3 - [ 1 1 ] 4 0 4 - [ 2 0 ] 5 0 5 - [ 2 1 ] 6 0 6 - */ - - - tid = H5Tcreate (H5T_COMPOUND, sizeof(s_t)); + buf32[6]= {{1,2},{3,4},{5,6},{7,8},{9,10},{11,12}}; + $h5diff file7.h5 file6.h5 g1 g1 -v + Attribute: and + position opaque2D of opaque2D of difference + ------------------------------------------------------------ + [ 0 0 ] 1 0 1 + [ 0 1 ] 2 0 2 + [ 1 0 ] 3 0 3 + [ 1 1 ] 4 0 4 + [ 2 0 ] 5 0 5 + [ 2 1 ] 6 0 6 + */ + + tid = H5Tcreate(H5T_COMPOUND, sizeof(s_t)); H5Tinsert(tid, "a", HOFFSET(s_t, a), H5T_NATIVE_CHAR); H5Tinsert(tid, "b", HOFFSET(s_t, b), H5T_NATIVE_DOUBLE); - write_attr(loc_id,2,dims2,"compound2D",tid,buf32); + write_attr(loc_id, 2, dims2, "compound2D", tid, buf32); status = H5Tclose(tid); /*------------------------------------------------------------------------- @@ -5988,44 +6645,41 @@ void write_attr_in(hid_t loc_id, *------------------------------------------------------------------------- */ /* Create references to dataset */ - if (dset_name) - { - for (i = 0; i < 3; i++) { - for (j = 0; j < 2; j++) { - status=H5Rcreate(&buf42[i][j],fid,dset_name,H5R_OBJECT,(hid_t)-1); - } - } - write_attr(loc_id,2,dims2,"reference2D",H5T_STD_REF_OBJ,buf42); + if (dset_name) { + for (i = 0; i < 3; i++) + for (j = 0; j < 2; j++) + status = H5Rcreate(&buf42[i][j], fid, dset_name, H5R_OBJECT, (hid_t) -1); + write_attr(loc_id, 2, dims2, "reference2D", H5T_STD_REF_OBJ, buf42); } /*------------------------------------------------------------------------- * H5T_ENUM *------------------------------------------------------------------------- */ - for (i=0; i<3; i++) - { - for (j=0; j<2; j++) - { - if (make_diffs) buf452[i][j]=GREEN; else buf452[i][j]=RED; + for (i = 0; i < 3; i++) + for (j = 0; j < 2; j++) { + if (make_diffs) + buf452[i][j] = GREEN; + else + buf452[i][j] = RED; } - } /* - Attribute: and - position enum2D of enum2D of difference - ------------------------------------------------------------ - [ 0 0 ] RED GREEN - [ 0 1 ] RED GREEN - [ 1 0 ] RED GREEN - [ 1 1 ] RED GREEN - [ 2 0 ] RED GREEN - [ 2 1 ] RED GREEN + Attribute: and + position enum2D of enum2D of difference + ------------------------------------------------------------ + [ 0 0 ] RED GREEN + [ 0 1 ] RED GREEN + [ 1 0 ] RED GREEN + [ 1 1 ] RED GREEN + [ 2 0 ] RED GREEN + [ 2 1 ] RED GREEN */ tid = H5Tcreate(H5T_ENUM, sizeof(e_t)); - H5Tenum_insert(tid, "RED", (val = 0, &val)); + H5Tenum_insert(tid, "RED", (val = 0, &val)); H5Tenum_insert(tid, "GREEN", (val = 1, &val)); - write_attr(loc_id,2,dims2,"enum2D",tid,buf452); + write_attr(loc_id, 2, dims2, "enum2D", tid, buf452); status = H5Tclose(tid); /*------------------------------------------------------------------------- @@ -6034,33 +6688,33 @@ void write_attr_in(hid_t loc_id, */ /* Allocate and initialize VL dataset to write */ - n=0; - for(i = 0; i < 3; i++) { - for(j = 0; j < 2; j++) { + n = 0; + for (i = 0; i < 3; i++) { + for (j = 0; j < 2; j++) { buf52[i][j].p = HDmalloc((size_t)(i + 1) * sizeof(int)); buf52[i][j].len = (size_t)(i + 1); - for(l = 0; l < i + 1; l++) - if(make_diffs) - ((int *)buf52[i][j].p)[l] = 0; + for (l = 0; l < i + 1; l++) + if (make_diffs) + ((int *) buf52[i][j].p)[l] = 0; else - ((int *)buf52[i][j].p)[l] = n++; + ((int *) buf52[i][j].p)[l] = n++; } } /* - position vlen2D of vlen2D of difference - ------------------------------------------------------------ - [ 0 1 ] 1 0 1 - [ 1 0 ] 2 0 2 - [ 1 0 ] 3 0 3 - [ 1 1 ] 4 0 4 - [ 1 1 ] 5 0 5 - [ 2 0 ] 6 0 6 - [ 2 0 ] 7 0 7 - [ 2 0 ] 8 0 8 - [ 2 1 ] 9 0 9 - [ 2 1 ] 10 0 10 - [ 2 1 ] 11 0 11 + position vlen2D of vlen2D of difference + ------------------------------------------------------------ + [ 0 1 ] 1 0 1 + [ 1 0 ] 2 0 2 + [ 1 0 ] 3 0 3 + [ 1 1 ] 4 0 4 + [ 1 1 ] 5 0 5 + [ 2 0 ] 6 0 6 + [ 2 0 ] 7 0 7 + [ 2 0 ] 8 0 8 + [ 2 1 ] 9 0 9 + [ 2 1 ] 10 0 10 + [ 2 1 ] 11 0 11 */ sid = H5Screate_simple(2, dims2, NULL); @@ -6080,34 +6734,32 @@ void write_attr_in(hid_t loc_id, */ if (make_diffs) - { - memset(buf62,0,sizeof buf62); - } + memset(buf62, 0, sizeof buf62); /* - buf62[6][3]= {{1,2,3},{4,5,6},{7,8,9},{10,11,12},{13,14,15},{16,17,18}}; - $h5diff file7.h5 file6.h5 g1 g1 -v - Group: and - Attribute: and - position array2D of array2D of difference - ------------------------------------------------------------ - [ 0 0 ] 1 0 1 - [ 0 0 ] 2 0 2 - [ 0 0 ] 3 0 3 - [ 0 1 ] 4 0 4 - [ 0 1 ] 5 0 5 - [ 0 1 ] 6 0 6 - [ 1 0 ] 7 0 7 - [ 1 0 ] 8 0 8 - [ 1 0 ] 9 0 9 - [ 1 1 ] 10 0 10 - [ 1 1 ] 11 0 11 - [ 1 1 ] 12 0 12 - [ 2 0 ] 13 0 13 - [ 2 0 ] 14 0 14 - [ 2 0 ] 15 0 15 - [ 2 1 ] 16 0 16 - [ 2 1 ] 17 0 17 - [ 2 1 ] 18 0 18 + buf62[6][3]= {{1,2,3},{4,5,6},{7,8,9},{10,11,12},{13,14,15},{16,17,18}}; + $h5diff file7.h5 file6.h5 g1 g1 -v + Group: and + Attribute: and + position array2D of array2D of difference + ------------------------------------------------------------ + [ 0 0 ] 1 0 1 + [ 0 0 ] 2 0 2 + [ 0 0 ] 3 0 3 + [ 0 1 ] 4 0 4 + [ 0 1 ] 5 0 5 + [ 0 1 ] 6 0 6 + [ 1 0 ] 7 0 7 + [ 1 0 ] 8 0 8 + [ 1 0 ] 9 0 9 + [ 1 1 ] 10 0 10 + [ 1 1 ] 11 0 11 + [ 1 1 ] 12 0 12 + [ 2 0 ] 13 0 13 + [ 2 0 ] 14 0 14 + [ 2 0 ] 15 0 15 + [ 2 1 ] 16 0 16 + [ 2 1 ] 17 0 17 + [ 2 1 ] 18 0 18 */ tid = H5Tarray_create2(H5T_NATIVE_INT, 1, dimarray); write_attr(loc_id, 2, dims2, "array2D", tid, buf62); @@ -6118,36 +6770,34 @@ void write_attr_in(hid_t loc_id, *------------------------------------------------------------------------- */ - if (make_diffs) - { - memset(buf72,0,sizeof buf72); - memset(buf82,0,sizeof buf82); + if (make_diffs) { + memset(buf72, 0, sizeof buf72); + memset(buf82, 0, sizeof buf82); } /* - Attribute: and - position integer2D of integer2D of difference - ------------------------------------------------------------ - [ 0 0 ] 1 0 1 - [ 0 1 ] 2 0 2 - [ 1 0 ] 3 0 3 - [ 1 1 ] 4 0 4 - [ 2 0 ] 5 0 5 - [ 2 1 ] 6 0 6 - 6 differences found - Attribute: and - position float2D of float2D of difference - ------------------------------------------------------------ - [ 0 0 ] 1 0 1 - [ 0 1 ] 2 0 2 - [ 1 0 ] 3 0 3 - [ 1 1 ] 4 0 4 - [ 2 0 ] 5 0 5 - [ 2 1 ] 6 0 6 - */ - - write_attr(loc_id,2,dims2,"integer2D",H5T_NATIVE_INT,buf72); - write_attr(loc_id,2,dims2,"float2D",H5T_NATIVE_FLOAT,buf82); - + Attribute: and + position integer2D of integer2D of difference + ------------------------------------------------------------ + [ 0 0 ] 1 0 1 + [ 0 1 ] 2 0 2 + [ 1 0 ] 3 0 3 + [ 1 1 ] 4 0 4 + [ 2 0 ] 5 0 5 + [ 2 1 ] 6 0 6 + 6 differences found + Attribute: and + position float2D of float2D of difference + ------------------------------------------------------------ + [ 0 0 ] 1 0 1 + [ 0 1 ] 2 0 2 + [ 1 0 ] 3 0 3 + [ 1 1 ] 4 0 4 + [ 2 0 ] 5 0 5 + [ 2 1 ] 6 0 6 + */ + + write_attr(loc_id, 2, dims2, "integer2D", H5T_NATIVE_INT, buf72); + write_attr(loc_id, 2, dims2, "float2D", H5T_NATIVE_FLOAT, buf82); /*------------------------------------------------------------------------- * 3D attributes @@ -6159,90 +6809,83 @@ void write_attr_in(hid_t loc_id, *------------------------------------------------------------------------- */ - if (make_diffs) - { - for (i=0; i<4; i++) - for (j=0; j<3; j++) - for (k=0; k<2; k++) - for (l=0; l<2; l++) - buf13[i][j][k][l]='z'; + if (make_diffs) { + for (i = 0; i < 4; i++) + for (j = 0; j < 3; j++) + for (k = 0; k < 2; k++) + for (l = 0; l < 2; l++) + buf13[i][j][k][l] = 'z'; } /* - buf13[24][2]= {"ab","cd","ef","gh","ij","kl","mn","pq", - "rs","tu","vw","xz","AB","CD","EF","GH", - "IJ","KL","MN","PQ","RS","TU","VW","XZ"}; - - Attribute: and - position string3D of string3D of difference - ------------------------------------------------------------ - [ 0 0 0 ] a z - [ 0 0 0 ] b z - [ 0 0 1 ] c z - [ 0 0 1 ] d z - [ 0 1 0 ] e z - [ 0 1 0 ] f z - [ 0 1 1 ] g z - [ 0 1 1 ] h z - [ 0 2 0 ] i z - [ 0 2 0 ] j z - [ 0 2 1 ] k z - [ 0 2 1 ] l z - [ 1 0 0 ] m z - [ 1 0 0 ] n z - [ 1 0 1 ] p z - [ 1 0 1 ] q z - [ 1 1 0 ] r z - [ 1 1 0 ] s z - [ 1 1 1 ] t z - [ 1 1 1 ] u z - [ 1 2 0 ] v z - [ 1 2 0 ] w z - [ 1 2 1 ] x z - [ 2 0 0 ] A z - [ 2 0 0 ] B z - [ 2 0 1 ] C z - [ 2 0 1 ] D z - [ 2 1 0 ] E z - [ 2 1 0 ] F z - [ 2 1 1 ] G z - [ 2 1 1 ] H z - [ 2 2 0 ] I z - [ 2 2 0 ] J z - [ 2 2 1 ] K z - [ 2 2 1 ] L z - [ 3 0 0 ] M z - [ 3 0 0 ] N z - [ 3 0 1 ] P z - [ 3 0 1 ] Q z - [ 3 1 0 ] R z - [ 3 1 0 ] S z - [ 3 1 1 ] T z - [ 3 1 1 ] U z - [ 3 2 0 ] V z - [ 3 2 0 ] W z - [ 3 2 1 ] X z - [ 3 2 1 ] Z z + buf13[24][2]= {"ab","cd","ef","gh","ij","kl","mn","pq", + "rs","tu","vw","xz","AB","CD","EF","GH", + "IJ","KL","MN","PQ","RS","TU","VW","XZ"}; + + Attribute: and + position string3D of string3D of difference + ------------------------------------------------------------ + [ 0 0 0 ] a z + [ 0 0 0 ] b z + [ 0 0 1 ] c z + [ 0 0 1 ] d z + [ 0 1 0 ] e z + [ 0 1 0 ] f z + [ 0 1 1 ] g z + [ 0 1 1 ] h z + [ 0 2 0 ] i z + [ 0 2 0 ] j z + [ 0 2 1 ] k z + [ 0 2 1 ] l z + [ 1 0 0 ] m z + [ 1 0 0 ] n z + [ 1 0 1 ] p z + [ 1 0 1 ] q z + [ 1 1 0 ] r z + [ 1 1 0 ] s z + [ 1 1 1 ] t z + [ 1 1 1 ] u z + [ 1 2 0 ] v z + [ 1 2 0 ] w z + [ 1 2 1 ] x z + [ 2 0 0 ] A z + [ 2 0 0 ] B z + [ 2 0 1 ] C z + [ 2 0 1 ] D z + [ 2 1 0 ] E z + [ 2 1 0 ] F z + [ 2 1 1 ] G z + [ 2 1 1 ] H z + [ 2 2 0 ] I z + [ 2 2 0 ] J z + [ 2 2 1 ] K z + [ 2 2 1 ] L z + [ 3 0 0 ] M z + [ 3 0 0 ] N z + [ 3 0 1 ] P z + [ 3 0 1 ] Q z + [ 3 1 0 ] R z + [ 3 1 0 ] S z + [ 3 1 1 ] T z + [ 3 1 1 ] U z + [ 3 2 0 ] V z + [ 3 2 0 ] W z + [ 3 2 1 ] X z + [ 3 2 1 ] Z z */ tid = H5Tcopy(H5T_C_S1); - status = H5Tset_size(tid, (size_t)STR_SIZE); - write_attr(loc_id,3,dims3,"string3D",tid,buf13); + status = H5Tset_size(tid, (size_t) STR_SIZE); + write_attr(loc_id, 3, dims3, "string3D", tid, buf13); status = H5Tclose(tid); - for (i=0; i<4; i++) - { - for (j=0; j<3; j++) - { - for (k=0; k<2; k++) - { - buf13a[i][j][k]=buf13[i][j][k]; - } - } - } + for (i = 0; i < 4; i++) + for (j = 0; j < 3; j++) + for (k = 0; k < 2; k++) + buf13a[i][j][k] = buf13[i][j][k]; tid = H5Tcopy(H5T_C_S1); - status = H5Tset_size(tid, H5T_VARIABLE); - write_attr(loc_id,3,dims3,"VLstring3D",tid,buf13a); + status = H5Tset_size(tid, H5T_VARIABLE); + write_attr(loc_id, 3, dims3, "VLstring3D", tid, buf13a); status = H5Tclose(tid); /*------------------------------------------------------------------------- @@ -6250,58 +6893,55 @@ void write_attr_in(hid_t loc_id, *------------------------------------------------------------------------- */ - n=1; - for (i = 0; i < 4; i++) { - for (j = 0; j < 3; j++) { + n = 1; + for (i = 0; i < 4; i++) + for (j = 0; j < 3; j++) for (k = 0; k < 2; k++) { - if(make_diffs) + if (make_diffs) buf23[i][j][k] = 0; else - buf23[i][j][k] = (char)n++; + buf23[i][j][k] = (char) n++; } - } - } - /* - position bitfield3D of bitfield3D of difference - ------------------------------------------------------------ - [ 0 0 0 ] 1 0 1 - [ 0 0 1 ] 2 0 2 - [ 0 1 0 ] 3 0 3 - [ 0 1 1 ] 4 0 4 - [ 0 2 0 ] 5 0 5 - [ 0 2 1 ] 6 0 6 - [ 1 0 0 ] 7 0 7 - [ 1 0 1 ] 8 0 8 - [ 1 1 0 ] 9 0 9 - [ 1 1 1 ] 10 0 10 - [ 1 2 0 ] 11 0 11 - [ 1 2 1 ] 12 0 12 - [ 2 0 0 ] 13 0 13 - [ 2 0 1 ] 14 0 14 - [ 2 1 0 ] 15 0 15 - [ 2 1 1 ] 16 0 16 - [ 2 2 0 ] 17 0 17 - [ 2 2 1 ] 18 0 18 - [ 3 0 0 ] 19 0 19 - [ 3 0 1 ] 20 0 20 - [ 3 1 0 ] 21 0 21 - [ 3 1 1 ] 22 0 22 - [ 3 2 0 ] 23 0 23 - [ 3 2 1 ] 24 0 24 + position bitfield3D of bitfield3D of difference + ------------------------------------------------------------ + [ 0 0 0 ] 1 0 1 + [ 0 0 1 ] 2 0 2 + [ 0 1 0 ] 3 0 3 + [ 0 1 1 ] 4 0 4 + [ 0 2 0 ] 5 0 5 + [ 0 2 1 ] 6 0 6 + [ 1 0 0 ] 7 0 7 + [ 1 0 1 ] 8 0 8 + [ 1 1 0 ] 9 0 9 + [ 1 1 1 ] 10 0 10 + [ 1 2 0 ] 11 0 11 + [ 1 2 1 ] 12 0 12 + [ 2 0 0 ] 13 0 13 + [ 2 0 1 ] 14 0 14 + [ 2 1 0 ] 15 0 15 + [ 2 1 1 ] 16 0 16 + [ 2 2 0 ] 17 0 17 + [ 2 2 1 ] 18 0 18 + [ 3 0 0 ] 19 0 19 + [ 3 0 1 ] 20 0 20 + [ 3 1 0 ] 21 0 21 + [ 3 1 1 ] 22 0 22 + [ 3 2 0 ] 23 0 23 + [ 3 2 1 ] 24 0 24 */ tid = H5Tcopy(H5T_STD_B8LE); - write_attr(loc_id,3,dims3,"bitfield3D",tid,buf23); + write_attr(loc_id, 3, dims3, "bitfield3D", tid, buf23); status = H5Tclose(tid); /*------------------------------------------------------------------------- * H5T_OPAQUE *------------------------------------------------------------------------- */ - tid = H5Tcreate(H5T_OPAQUE, (size_t)1); + tid = H5Tcreate(H5T_OPAQUE, (size_t) 1); status = H5Tset_tag(tid, "1-byte opaque type"); /* must set this */ - write_attr(loc_id,3,dims3,"opaque3D",tid,buf23); + write_attr(loc_id, 3, dims3, "opaque3D", tid, buf23); status = H5Tclose(tid); /*------------------------------------------------------------------------- @@ -6309,77 +6949,75 @@ void write_attr_in(hid_t loc_id, *------------------------------------------------------------------------- */ - n=1; - for (i = 0; i < 4; i++) { - for (j = 0; j < 3; j++) { + n = 1; + for (i = 0; i < 4; i++) + for (j = 0; j < 3; j++) for (k = 0; k < 2; k++) { if (make_diffs) { buf33[i][j][k].a = 0; buf33[i][j][k].b = 0.0F; } else { - buf33[i][j][k].a = (char)n++; + buf33[i][j][k].a = (char) n++; buf33[i][j][k].b = n++; } } - } - } /*position compound3D of compound3D of difference - ------------------------------------------------------------ - [ 0 0 0 ] 1 0 1 - [ 0 0 0 ] 2 0 2 - [ 0 0 1 ] 3 0 3 - [ 0 0 1 ] 4 0 4 - [ 0 1 0 ] 5 0 5 - [ 0 1 0 ] 6 0 6 - [ 0 1 1 ] 7 0 7 - [ 0 1 1 ] 8 0 8 - [ 0 2 0 ] 9 0 9 - [ 0 2 0 ] 10 0 10 - [ 0 2 1 ] 11 0 11 - [ 0 2 1 ] 12 0 12 - [ 1 0 0 ] 13 0 13 - [ 1 0 0 ] 14 0 14 - [ 1 0 1 ] 15 0 15 - [ 1 0 1 ] 16 0 16 - [ 1 1 0 ] 17 0 17 - [ 1 1 0 ] 18 0 18 - [ 1 1 1 ] 19 0 19 - [ 1 1 1 ] 20 0 20 - [ 1 2 0 ] 21 0 21 - [ 1 2 0 ] 22 0 22 - [ 1 2 1 ] 23 0 23 - [ 1 2 1 ] 24 0 24 - [ 2 0 0 ] 25 0 25 - [ 2 0 0 ] 26 0 26 - [ 2 0 1 ] 27 0 27 - [ 2 0 1 ] 28 0 28 - [ 2 1 0 ] 29 0 29 - [ 2 1 0 ] 30 0 30 - [ 2 1 1 ] 31 0 31 - [ 2 1 1 ] 32 0 32 - [ 2 2 0 ] 33 0 33 - [ 2 2 0 ] 34 0 34 - [ 2 2 1 ] 35 0 35 - [ 2 2 1 ] 36 0 36 - [ 3 0 0 ] 37 0 37 - [ 3 0 0 ] 38 0 38 - [ 3 0 1 ] 39 0 39 - [ 3 0 1 ] 40 0 40 - [ 3 1 0 ] 41 0 41 - [ 3 1 0 ] 42 0 42 - [ 3 1 1 ] 43 0 43 - [ 3 1 1 ] 44 0 44 - [ 3 2 0 ] 45 0 45 - [ 3 2 0 ] 46 0 46 - [ 3 2 1 ] 47 0 47 - [ 3 2 1 ] 48 0 48 - */ - - tid = H5Tcreate (H5T_COMPOUND, sizeof(s_t)); + ------------------------------------------------------------ + [ 0 0 0 ] 1 0 1 + [ 0 0 0 ] 2 0 2 + [ 0 0 1 ] 3 0 3 + [ 0 0 1 ] 4 0 4 + [ 0 1 0 ] 5 0 5 + [ 0 1 0 ] 6 0 6 + [ 0 1 1 ] 7 0 7 + [ 0 1 1 ] 8 0 8 + [ 0 2 0 ] 9 0 9 + [ 0 2 0 ] 10 0 10 + [ 0 2 1 ] 11 0 11 + [ 0 2 1 ] 12 0 12 + [ 1 0 0 ] 13 0 13 + [ 1 0 0 ] 14 0 14 + [ 1 0 1 ] 15 0 15 + [ 1 0 1 ] 16 0 16 + [ 1 1 0 ] 17 0 17 + [ 1 1 0 ] 18 0 18 + [ 1 1 1 ] 19 0 19 + [ 1 1 1 ] 20 0 20 + [ 1 2 0 ] 21 0 21 + [ 1 2 0 ] 22 0 22 + [ 1 2 1 ] 23 0 23 + [ 1 2 1 ] 24 0 24 + [ 2 0 0 ] 25 0 25 + [ 2 0 0 ] 26 0 26 + [ 2 0 1 ] 27 0 27 + [ 2 0 1 ] 28 0 28 + [ 2 1 0 ] 29 0 29 + [ 2 1 0 ] 30 0 30 + [ 2 1 1 ] 31 0 31 + [ 2 1 1 ] 32 0 32 + [ 2 2 0 ] 33 0 33 + [ 2 2 0 ] 34 0 34 + [ 2 2 1 ] 35 0 35 + [ 2 2 1 ] 36 0 36 + [ 3 0 0 ] 37 0 37 + [ 3 0 0 ] 38 0 38 + [ 3 0 1 ] 39 0 39 + [ 3 0 1 ] 40 0 40 + [ 3 1 0 ] 41 0 41 + [ 3 1 0 ] 42 0 42 + [ 3 1 1 ] 43 0 43 + [ 3 1 1 ] 44 0 44 + [ 3 2 0 ] 45 0 45 + [ 3 2 0 ] 46 0 46 + [ 3 2 1 ] 47 0 47 + [ 3 2 1 ] 48 0 48 + */ + + tid = H5Tcreate(H5T_COMPOUND, sizeof(s_t)); H5Tinsert(tid, "a", HOFFSET(s_t, a), H5T_NATIVE_CHAR); H5Tinsert(tid, "b", HOFFSET(s_t, b), H5T_NATIVE_DOUBLE); - write_attr(loc_id,3,dims3,"compound3D",tid,buf33); + write_attr(loc_id, 3, dims3, "compound3D", tid, buf33); status = H5Tclose(tid); /*------------------------------------------------------------------------- @@ -6387,15 +7025,13 @@ void write_attr_in(hid_t loc_id, *------------------------------------------------------------------------- */ /* Create references to dataset */ - if (dset_name) - { - for (i = 0; i < 4; i++) { - for (j = 0; j < 3; j++) { + if (dset_name) { + for (i = 0; i < 4; i++) + for (j = 0; j < 3; j++) for (k = 0; k < 2; k++) - status=H5Rcreate(&buf43[i][j][k],fid,dset_name,H5R_OBJECT,(hid_t)-1); - } - } - write_attr(loc_id,3,dims3,"reference3D",H5T_STD_REF_OBJ,buf43); + status = H5Rcreate(&buf43[i][j][k], fid, dset_name, + H5R_OBJECT, (hid_t) -1); + write_attr(loc_id, 3, dims3, "reference3D", H5T_STD_REF_OBJ, buf43); } /*------------------------------------------------------------------------- @@ -6403,48 +7039,47 @@ void write_attr_in(hid_t loc_id, *------------------------------------------------------------------------- */ - for (i = 0; i < 4; i++) { - for (j = 0; j < 3; j++) { + for (i = 0; i < 4; i++) + for (j = 0; j < 3; j++) for (k = 0; k < 2; k++) { - if (make_diffs) buf453[i][j][k]=RED; else buf453[i][j][k]=GREEN; + if (make_diffs) + buf453[i][j][k] = RED; + else + buf453[i][j][k] = GREEN; } - } - } - /* - position enum3D of enum3D of difference - ------------------------------------------------------------ - [ 0 0 0 ] GREEN RED - [ 0 0 1 ] GREEN RED - [ 0 1 0 ] GREEN RED - [ 0 1 1 ] GREEN RED - [ 0 2 0 ] GREEN RED - [ 0 2 1 ] GREEN RED - [ 1 0 0 ] GREEN RED - [ 1 0 1 ] GREEN RED - [ 1 1 0 ] GREEN RED - [ 1 1 1 ] GREEN RED - [ 1 2 0 ] GREEN RED - [ 1 2 1 ] GREEN RED - [ 2 0 0 ] GREEN RED - [ 2 0 1 ] GREEN RED - [ 2 1 0 ] GREEN RED - [ 2 1 1 ] GREEN RED - [ 2 2 0 ] GREEN RED - [ 2 2 1 ] GREEN RED - [ 3 0 0 ] GREEN RED - [ 3 0 1 ] GREEN RED - [ 3 1 0 ] GREEN RED - [ 3 1 1 ] GREEN RED - [ 3 2 0 ] GREEN RED - [ 3 2 1 ] GREEN RED + position enum3D of enum3D of difference + ------------------------------------------------------------ + [ 0 0 0 ] GREEN RED + [ 0 0 1 ] GREEN RED + [ 0 1 0 ] GREEN RED + [ 0 1 1 ] GREEN RED + [ 0 2 0 ] GREEN RED + [ 0 2 1 ] GREEN RED + [ 1 0 0 ] GREEN RED + [ 1 0 1 ] GREEN RED + [ 1 1 0 ] GREEN RED + [ 1 1 1 ] GREEN RED + [ 1 2 0 ] GREEN RED + [ 1 2 1 ] GREEN RED + [ 2 0 0 ] GREEN RED + [ 2 0 1 ] GREEN RED + [ 2 1 0 ] GREEN RED + [ 2 1 1 ] GREEN RED + [ 2 2 0 ] GREEN RED + [ 2 2 1 ] GREEN RED + [ 3 0 0 ] GREEN RED + [ 3 0 1 ] GREEN RED + [ 3 1 0 ] GREEN RED + [ 3 1 1 ] GREEN RED + [ 3 2 0 ] GREEN RED + [ 3 2 1 ] GREEN RED */ - tid = H5Tcreate(H5T_ENUM, sizeof(e_t)); - H5Tenum_insert(tid, "RED", (val = 0, &val)); + H5Tenum_insert(tid, "RED", (val = 0, &val)); H5Tenum_insert(tid, "GREEN", (val = 1, &val)); - write_attr(loc_id,3,dims3,"enum3D",tid,buf453); + write_attr(loc_id, 3, dims3, "enum3D", tid, buf453); status = H5Tclose(tid); /*------------------------------------------------------------------------- @@ -6453,34 +7088,32 @@ void write_attr_in(hid_t loc_id, */ /* Allocate and initialize VL dataset to write */ - n=0; - for (i = 0; i < 4; i++) { - for (j = 0; j < 3; j++) { + n = 0; + for (i = 0; i < 4; i++) + for (j = 0; j < 3; j++) for (k = 0; k < 2; k++) { buf53[i][j][k].p = HDmalloc((size_t)(i + 1) * sizeof(int)); buf53[i][j][k].len = (size_t)(i + 1); for (l = 0; l < i + 1; l++) - if(make_diffs) - ((int *)buf53[i][j][k].p)[l] = 0; + if (make_diffs) + ((int *) buf53[i][j][k].p)[l] = 0; else - ((int *)buf53[i][j][k].p)[l] = n++; + ((int *) buf53[i][j][k].p)[l] = n++; } - } - } /* - position vlen3D of vlen3D of difference - ------------------------------------------------------------ - [ 0 0 1 ] 1 0 1 - [ 0 1 0 ] 2 0 2 - [ 0 1 1 ] 3 0 3 - [ 0 2 0 ] 4 0 4 - [ 0 2 1 ] 5 0 5 - [ 1 0 0 ] 6 0 6 - [ 1 0 0 ] 7 0 7 - [ 1 0 1 ] 8 0 8 - [ 1 0 1 ] 9 0 9 - [ 1 1 0 ] 10 0 10 - etc + position vlen3D of vlen3D of difference + ------------------------------------------------------------ + [ 0 0 1 ] 1 0 1 + [ 0 1 0 ] 2 0 2 + [ 0 1 1 ] 3 0 3 + [ 0 2 0 ] 4 0 4 + [ 0 2 1 ] 5 0 5 + [ 1 0 0 ] 6 0 6 + [ 1 0 0 ] 7 0 7 + [ 1 0 1 ] 8 0 8 + [ 1 0 1 ] 9 0 9 + [ 1 1 0 ] 10 0 10 + etc */ sid = H5Screate_simple(3, dims3, NULL); tid = H5Tvlen_create(H5T_NATIVE_INT); @@ -6497,24 +7130,25 @@ void write_attr_in(hid_t loc_id, * H5T_ARRAY *------------------------------------------------------------------------- */ - n=1; - for (i = 0; i < 24; i++) { - for (j = 0; j < (int)dimarray[0]; j++) { - if (make_diffs) buf63[i][j]=0; - else buf63[i][j]=n++; + n = 1; + for (i = 0; i < 24; i++) + for (j = 0; j < (int) dimarray[0]; j++) { + if (make_diffs) + buf63[i][j] = 0; + else + buf63[i][j] = n++; } - } /* - position array3D of array3D of 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 1 0 ] 7 0 7 - etc + position array3D of array3D of 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 1 0 ] 7 0 7 + etc */ tid = H5Tarray_create2(H5T_NATIVE_INT, 1, dimarray); @@ -6525,132 +7159,120 @@ void write_attr_in(hid_t loc_id, * H5T_INTEGER and H5T_FLOAT *------------------------------------------------------------------------- */ - n=1; f=1; - for (i = 0; i < 4; i++) { - for (j = 0; j < 3; j++) { + n = 1; + f = 1; + for (i = 0; i < 4; i++) + for (j = 0; j < 3; j++) for (k = 0; k < 2; k++) { if (make_diffs) { - buf73[i][j][k]=0; - buf83[i][j][k]=0.0F; + buf73[i][j][k] = 0; + buf83[i][j][k] = 0.0F; } else { - buf73[i][j][k]=n++; - buf83[i][j][k]=f++; + buf73[i][j][k] = n++; + buf83[i][j][k] = f++; } } - } - } /* - position integer3D of integer3D of difference - ------------------------------------------------------------ - [ 0 0 0 ] 1 0 1 - [ 0 0 1 ] 2 0 2 - [ 0 1 0 ] 3 0 3 - [ 0 1 1 ] 4 0 4 - [ 0 2 0 ] 5 0 5 - [ 0 2 1 ] 6 0 6 - [ 1 0 0 ] 7 0 7 - [ 1 0 1 ] 8 0 8 - [ 1 1 0 ] 9 0 9 - [ 1 1 1 ] 10 0 10 - etc - */ - write_attr(loc_id,3,dims3,"integer3D",H5T_NATIVE_INT,buf73); - write_attr(loc_id,3,dims3,"float3D",H5T_NATIVE_FLOAT,buf83); + position integer3D of integer3D of difference + ------------------------------------------------------------ + [ 0 0 0 ] 1 0 1 + [ 0 0 1 ] 2 0 2 + [ 0 1 0 ] 3 0 3 + [ 0 1 1 ] 4 0 4 + [ 0 2 0 ] 5 0 5 + [ 0 2 1 ] 6 0 6 + [ 1 0 0 ] 7 0 7 + [ 1 0 1 ] 8 0 8 + [ 1 1 0 ] 9 0 9 + [ 1 1 1 ] 10 0 10 + etc + */ + write_attr(loc_id, 3, dims3, "integer3D", H5T_NATIVE_INT, buf73); + write_attr(loc_id, 3, dims3, "float3D", H5T_NATIVE_FLOAT, buf83); } - - /*------------------------------------------------------------------------- -* Function: write_dset_in -* -* Purpose: write datasets in LOC_ID -* -*------------------------------------------------------------------------- -*/ + * Function: write_dset_in + * + * Purpose: write datasets in LOC_ID + * + *------------------------------------------------------------------------- + */ static -void write_dset_in(hid_t loc_id, - const char* dset_name, /* for saving reference to dataset*/ - hid_t fid, - int make_diffs /* flag to modify data buffers */) +void write_dset_in(hid_t loc_id, const char* dset_name, hid_t fid, int make_diffs /* flag to modify data buffers */) { /* Compound datatype */ - typedef struct s_t - { - char a; + typedef struct s_t { + char a; double b; } s_t; - typedef enum - { - RED, - GREEN + typedef enum { + RED, GREEN } e_t; - hid_t did; - hid_t sid; - hid_t tid; - hid_t dcpl; - herr_t status; - int val, i, j, k, l, n; - float f; - int fillvalue=2; - int scalar_data = 2; + hid_t did = -1; + hid_t sid = -1; + hid_t tid = -1; + hid_t dcpl = -1; + herr_t status; + int val, i, j, k, l, n; + float f; + int fillvalue = 2; + int scalar_data = 2; /* create 1D attributes with dimension [2], 2 elements */ - hsize_t dims[1]={2}; - char buf1[2][STR_SIZE]= {"ab","de"}; /* string */ - char *buf1a[2]; /* VL string */ - char buf2[2]= {1,2}; /* bitfield, opaque */ - s_t buf3[2]= {{1,2.0F},{3,4.0F}}; /* compound */ - hobj_ref_t buf4[2]; /* reference */ - e_t buf45[2]= {RED,GREEN}; /* enum */ - hvl_t buf5[2]; /* vlen */ - hsize_t dimarray[1]={3}; /* array dimension */ - int buf6[2][3]= {{1,2,3},{4,5,6}}; /* array */ - int buf7[2]= {1,2}; /* integer */ - float buf8[2]= {1.0F,2.0F}; /* float */ + hsize_t dims[1] = { 2 }; + char buf1[2][STR_SIZE] = { "ab", "de" }; /* string */ + char *buf1a[2]; /* VL string */ + char buf2[2] = { 1, 2 }; /* bitfield, opaque */ + s_t buf3[2] = { { 1, 2.0F }, { 3, 4.0F } }; /* compound */ + hobj_ref_t buf4[2]; /* reference */ + e_t buf45[2] = { RED, GREEN }; /* enum */ + hvl_t buf5[2]; /* vlen */ + hsize_t dimarray[1] = { 3 }; /* array dimension */ + int buf6[2][3] = { { 1, 2, 3 }, { 4, 5, 6 } }; /* array */ + int buf7[2] = { 1, 2 }; /* integer */ + float buf8[2] = { 1.0F, 2.0F }; /* float */ /* create 2D attributes with dimension [3][2], 6 elements */ - hsize_t dims2[2]={3,2}; - char buf12[3][2][STR_SIZE]= {{"ab","cd"},{"ef","gh"},{"ij","kl"}}; /* string */ - char *buf12a[3][2]; /* VL string */ - char buf22[3][2]= {{1,2},{3,4},{5,6}}; /* bitfield, opaque */ - s_t buf32[6]= {{1,2.0F},{3,4.0F},{5,6.0F},{7,8.0F},{9,10.0F},{11,12.0F}}; /* compound */ - hobj_ref_t buf42[3][2]; /* reference */ - hvl_t buf52[3][2]; /* vlen */ - int buf62[6][3]= {{1,2,3},{4,5,6},{7,8,9},{10,11,12},{13,14,15},{16,17,18}}; /* array */ - int buf72[3][2]= {{1,2},{3,4},{5,6}}; /* integer */ - float buf82[3][2]= {{1.0F,2.0F},{3.0F,4.0F},{5.0F,6.0F}}; /* float */ + hsize_t dims2[2] = { 3, 2 }; + char buf12[3][2][STR_SIZE] = { { "ab", "cd" }, { "ef", "gh" }, { "ij", "kl" } }; /* string */ + char *buf12a[3][2]; /* VL string */ + char buf22[3][2] = { { 1, 2 }, { 3, 4 }, { 5, 6 } }; /* bitfield, opaque */ + s_t buf32[6] = { { 1, 2.0F }, { 3, 4.0F }, { 5, 6.0F }, { 7, 8.0F }, { 9, 10.0F }, { 11, 12.0F } }; /* compound */ + hobj_ref_t buf42[3][2]; /* reference */ + hvl_t buf52[3][2]; /* vlen */ + int buf62[6][3] = { { 1, 2, 3 }, { 4, 5, 6 }, { 7, 8, 9 }, { 10, 11, 12 }, { 13, 14, 15 }, { 16, 17, 18 } }; /* array */ + int buf72[3][2] = { { 1, 2 }, { 3, 4 }, { 5, 6 } }; /* integer */ + float buf82[3][2] = { { 1.0F, 2.0F }, { 3.0F, 4.0F }, { 5.0F, 6.0F } }; /* float */ /* create 3D attributes with dimension [4][3][2], 24 elements */ - hsize_t dims3[3]={4,3,2}; - char buf13[4][3][2][STR_SIZE]= {{{"ab","cd"},{"ef","gh"},{"ij","kl"}}, - {{"mn","pq"},{"rs","tu"},{"vw","xz"}}, - {{"AB","CD"},{"EF","GH"},{"IJ","KL"}}, - {{"MN","PQ"},{"RS","TU"},{"VW","XZ"}}}; /* string */ - char *buf13a[4][3][2]; /* VL string */ - char buf23[4][3][2]; /* bitfield, opaque */ - s_t buf33[4][3][2]; /* compound */ - hobj_ref_t buf43[4][3][2]; /* reference */ - hvl_t buf53[4][3][2]; /* vlen */ - int buf63[24][3]; /* array */ - int buf73[4][3][2]; /* integer */ - float buf83[4][3][2]; /* float */ - - if(make_diffs == 2) { + hsize_t dims3[3] = { 4, 3, 2 }; + char buf13[4][3][2][STR_SIZE] = { { { "ab", "cd" }, { "ef", "gh" }, { "ij", "kl" } }, + { { "mn", "pq" }, { "rs", "tu" }, { "vw", "xz" } }, + { { "AB", "CD" }, { "EF", "GH" }, { "IJ", "KL" } }, + { { "MN", "PQ" }, { "RS", "TU" }, { "VW", "XZ" } } }; /* string */ + char *buf13a[4][3][2]; /* VL string */ + char buf23[4][3][2]; /* bitfield, opaque */ + s_t buf33[4][3][2]; /* compound */ + hobj_ref_t buf43[4][3][2]; /* reference */ + hvl_t buf53[4][3][2]; /* vlen */ + int buf63[24][3]; /* array */ + int buf73[4][3][2]; /* integer */ + float buf83[4][3][2]; /* float */ + + if (make_diffs == 2) dimarray[0] = 4; - } /*------------------------------------------------------------------------- * H5S_SCALAR *------------------------------------------------------------------------- */ - - - if(make_diffs) + if (make_diffs) scalar_data = 1; /* create a space */ @@ -6666,7 +7288,6 @@ void write_dset_in(hid_t loc_id, H5Dclose(did); H5Sclose(sid); - /*------------------------------------------------------------------------- * 1D *------------------------------------------------------------------------- @@ -6677,27 +7298,22 @@ void write_dset_in(hid_t loc_id, *------------------------------------------------------------------------- */ - if (make_diffs) - { - for (i=0; i<2; i++) - for (j=0; j<2; j++) - buf1[i][j]='z'; - } - + for (i = 0; i < 2; i++) + for (j = 0; j < 2; j++) + buf1[i][j] = 'z'; tid = H5Tcopy(H5T_C_S1); - status = H5Tset_size(tid,(size_t)STR_SIZE); - write_dset(loc_id,1,dims,"string",tid,buf1); + status = H5Tset_size(tid, (size_t) STR_SIZE); + write_dset(loc_id, 1, dims, "string", tid, buf1); status = H5Tclose(tid); - for (i=0; i<2; i++) - { - buf1a[i]=buf1[i]; - } + for (i = 0; i < 2; i++) + buf1a[i] = buf1[i]; + tid = H5Tcopy(H5T_C_S1); - status = H5Tset_size(tid, H5T_VARIABLE); - write_dset(loc_id,1,dims,"VLstring",tid,buf1a); + status = H5Tset_size(tid, H5T_VARIABLE); + write_dset(loc_id, 1, dims, "VLstring", tid, buf1a); status = H5Tclose(tid); /*------------------------------------------------------------------------- @@ -6706,13 +7322,11 @@ void write_dset_in(hid_t loc_id, */ if (make_diffs) - { - for (i=0; i<2; i++) - buf2[i]=buf2[1]=0; - } + for (i = 0; i < 2; i++) + buf2[i] = buf2[1] = 0; tid = H5Tcopy(H5T_STD_B8LE); - write_dset(loc_id,1,dims,"bitfield",tid,buf2); + write_dset(loc_id, 1, dims, "bitfield", tid, buf2); status = H5Tclose(tid); /*------------------------------------------------------------------------- @@ -6721,16 +7335,14 @@ void write_dset_in(hid_t loc_id, */ if (make_diffs) - { - for (i=0; i<2; i++) - { - buf3[i].a=0; buf3[i].b=0; + for (i = 0; i < 2; i++) { + buf3[i].a = 0; + buf3[i].b = 0; } - } - tid = H5Tcreate(H5T_OPAQUE, (size_t)1); + tid = H5Tcreate(H5T_OPAQUE, (size_t) 1); status = H5Tset_tag(tid, "1-byte opaque type"); /* must set this */ - write_dset(loc_id,1,dims,"opaque",tid,buf2); + write_dset(loc_id, 1, dims, "opaque", tid, buf2); status = H5Tclose(tid); /*------------------------------------------------------------------------- @@ -6738,19 +7350,14 @@ void write_dset_in(hid_t loc_id, *------------------------------------------------------------------------- */ - if (make_diffs) - { - for (i=0; i<2; i++) - { - buf45[i]=GREEN; - } - } + for (i = 0; i < 2; i++) + buf45[i] = GREEN; - tid = H5Tcreate (H5T_COMPOUND, sizeof(s_t)); + tid = H5Tcreate(H5T_COMPOUND, sizeof(s_t)); H5Tinsert(tid, "a", HOFFSET(s_t, a), H5T_NATIVE_CHAR); H5Tinsert(tid, "b", HOFFSET(s_t, b), H5T_NATIVE_DOUBLE); - write_dset(loc_id,1,dims,"compound",tid,buf3); + write_dset(loc_id, 1, dims, "compound", tid, buf3); status = H5Tclose(tid); /*------------------------------------------------------------------------- @@ -6758,11 +7365,10 @@ void write_dset_in(hid_t loc_id, *------------------------------------------------------------------------- */ /* Create references to dataset */ - if (dset_name) - { - status=H5Rcreate(&buf4[0],fid,dset_name,H5R_OBJECT,(hid_t)-1); - status=H5Rcreate(&buf4[1],fid,dset_name,H5R_OBJECT,(hid_t)-1); - write_dset(loc_id,1,dims,"reference",H5T_STD_REF_OBJ,buf4); + if (dset_name) { + status = H5Rcreate(&buf4[0], fid, dset_name, H5R_OBJECT, (hid_t) -1); + status = H5Rcreate(&buf4[1], fid, dset_name, H5R_OBJECT, (hid_t) -1); + write_dset(loc_id, 1, dims, "reference", H5T_STD_REF_OBJ, buf4); } /*------------------------------------------------------------------------- @@ -6770,16 +7376,16 @@ void write_dset_in(hid_t loc_id, *------------------------------------------------------------------------- */ - gen_datareg(fid,make_diffs); + gen_datareg(fid, make_diffs); /*------------------------------------------------------------------------- * H5T_ENUM *------------------------------------------------------------------------- */ tid = H5Tcreate(H5T_ENUM, sizeof(e_t)); - H5Tenum_insert(tid, "RED", (val = 0, &val)); + H5Tenum_insert(tid, "RED", (val = 0, &val)); H5Tenum_insert(tid, "GREEN", (val = 1, &val)); - write_dset(loc_id,1,dims,"enum",tid,buf45); + write_dset(loc_id, 1, dims, "enum", tid, buf45); status = H5Tclose(tid); /*------------------------------------------------------------------------- @@ -6790,22 +7396,23 @@ void write_dset_in(hid_t loc_id, /* Allocate and initialize VL dataset to write */ buf5[0].len = 1; - buf5[0].p = HDmalloc( 1 * sizeof(int)); - ((int *)buf5[0].p)[0]=1; + buf5[0].p = HDmalloc(1 * sizeof(int)); + ((int *) buf5[0].p)[0] = 1; buf5[1].len = 2; - buf5[1].p = HDmalloc( 2 * sizeof(int)); - ((int *)buf5[1].p)[0]=2; - ((int *)buf5[1].p)[1]=3; + buf5[1].p = HDmalloc(2 * sizeof(int)); + ((int *) buf5[1].p)[0] = 2; + ((int *) buf5[1].p)[1] = 3; - if(make_diffs) { - ((int *)buf5[0].p)[0] = 0; - ((int *)buf5[1].p)[0] = 0; - ((int *)buf5[1].p)[1]=0; + if (make_diffs) { + ((int *) buf5[0].p)[0] = 0; + ((int *) buf5[1].p)[0] = 0; + ((int *) buf5[1].p)[1] = 0; } sid = H5Screate_simple(1, dims, NULL); tid = H5Tvlen_create(H5T_NATIVE_INT); - did = H5Dcreate2(loc_id, "vlen", tid, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); + did = H5Dcreate2(loc_id, "vlen", tid, sid, H5P_DEFAULT, H5P_DEFAULT, + H5P_DEFAULT); status = H5Dwrite(did, tid, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf5); HDassert(status >= 0); status = H5Dvlen_reclaim(tid, sid, H5P_DEFAULT, buf5); @@ -6820,37 +7427,32 @@ void write_dset_in(hid_t loc_id, */ if (make_diffs) - { - for (i=0; i<2; i++) - for (j=0; j<3; j++) - { - buf6[i][j]=0; - } - } + for (i = 0; i < 2; i++) + for (j = 0; j < 3; j++) + buf6[i][j] = 0; tid = H5Tarray_create2(H5T_NATIVE_INT, 1, dimarray); write_dset(loc_id, 1, dims, "array", tid, buf6); status = H5Tclose(tid); { - double *dbuf; /* information to write */ - hid_t ldid; /* dataset ID */ - hid_t lsid; /* dataspace ID */ - hid_t ltid; /* datatype ID */ - size_t size; - hsize_t sdims[] = {1}; - hsize_t tdims[] = {H5TOOLS_MALLOCSIZE / sizeof(double) + 1}; - size_t jj; + double *dbuf; /* information to write */ + hid_t ldid = -1; /* dataset ID */ + hid_t lsid = -1; /* dataspace ID */ + hid_t ltid = -1; /* datatype ID */ + size_t size; + hsize_t sdims[] = { 1 }; + hsize_t tdims[] = { H5TOOLS_MALLOCSIZE / sizeof(double) + 1 }; + size_t jj; /* allocate and initialize array data to write */ - size = ( H5TOOLS_MALLOCSIZE / sizeof(double) + 1 ) * sizeof(double); - dbuf = (double *)HDmalloc(size); + size = (H5TOOLS_MALLOCSIZE / sizeof(double) + 1) * sizeof(double); + dbuf = (double *) HDmalloc(size); - for(jj = 0; jj < (H5TOOLS_MALLOCSIZE / sizeof(double) + 1); jj++) - dbuf[jj] = (double)jj; + for (jj = 0; jj < (H5TOOLS_MALLOCSIZE / sizeof(double) + 1); jj++) + dbuf[jj] = (double) jj; - if (make_diffs) - { + if (make_diffs) { dbuf[5] = 0; dbuf[6] = 0; } @@ -6877,17 +7479,13 @@ void write_dset_in(hid_t loc_id, */ if (make_diffs) - { - for (i=0; i<2; i++) - { - buf7[i]=0; - buf8[i]=0; + for (i = 0; i < 2; i++) { + buf7[i] = 0; + buf8[i] = 0; } - } - - write_dset(loc_id,1,dims,"integer",H5T_NATIVE_INT,buf7); - write_dset(loc_id,1,dims,"float",H5T_NATIVE_FLOAT,buf8); + write_dset(loc_id, 1, dims, "integer", H5T_NATIVE_INT, buf7); + write_dset(loc_id, 1, dims, "float", H5T_NATIVE_FLOAT, buf8); /*------------------------------------------------------------------------- * 2D @@ -6899,30 +7497,25 @@ void write_dset_in(hid_t loc_id, *------------------------------------------------------------------------- */ - if (make_diffs) - { - for (i=0; i<3; i++) - for (j=0; j<2; j++) - for (k=0; k<2; k++) - buf12[i][j][k]='z'; + if (make_diffs) { + for (i = 0; i < 3; i++) + for (j = 0; j < 2; j++) + for (k = 0; k < 2; k++) + buf12[i][j][k] = 'z'; } - tid = H5Tcopy(H5T_C_S1); - status = H5Tset_size(tid,(size_t)STR_SIZE); - write_dset(loc_id,2,dims2,"string2D",tid,buf12); + status = H5Tset_size(tid, (size_t) STR_SIZE); + write_dset(loc_id, 2, dims2, "string2D", tid, buf12); status = H5Tclose(tid); - for (i=0; i<3; i++) - { - for (j=0; j<2; j++) - { - buf12a[i][j]=buf12[i][j]; - } - } + for (i = 0; i < 3; i++) + for (j = 0; j < 2; j++) + buf12a[i][j] = buf12[i][j]; + tid = H5Tcopy(H5T_C_S1); - status = H5Tset_size(tid, H5T_VARIABLE); - write_dset(loc_id,2,dims2,"VLstring2D",tid,buf12a); + status = H5Tset_size(tid, H5T_VARIABLE); + write_dset(loc_id, 2, dims2, "VLstring2D", tid, buf12a); status = H5Tclose(tid); /*------------------------------------------------------------------------- @@ -6930,23 +7523,20 @@ void write_dset_in(hid_t loc_id, *------------------------------------------------------------------------- */ - if (make_diffs) - { - memset(buf22,0,sizeof buf22); - } + memset(buf22, 0, sizeof buf22); tid = H5Tcopy(H5T_STD_B8LE); - write_dset(loc_id,2,dims2,"bitfield2D",tid,buf22); + write_dset(loc_id, 2, dims2, "bitfield2D", tid, buf22); status = H5Tclose(tid); /*------------------------------------------------------------------------- * H5T_OPAQUE *------------------------------------------------------------------------- */ - tid = H5Tcreate(H5T_OPAQUE, (size_t)1); + tid = H5Tcreate(H5T_OPAQUE, (size_t) 1); status = H5Tset_tag(tid, "1-byte opaque type"); /* must set this */ - write_dset(loc_id,2,dims2,"opaque2D",tid,buf22); + write_dset(loc_id, 2, dims2, "opaque2D", tid, buf22); status = H5Tclose(tid); /*------------------------------------------------------------------------- @@ -6955,14 +7545,12 @@ void write_dset_in(hid_t loc_id, */ if (make_diffs) - { - memset(buf32,0,sizeof buf32); - } + memset(buf32, 0, sizeof buf32); - tid = H5Tcreate (H5T_COMPOUND, sizeof(s_t)); + tid = H5Tcreate(H5T_COMPOUND, sizeof(s_t)); H5Tinsert(tid, "a", HOFFSET(s_t, a), H5T_NATIVE_CHAR); H5Tinsert(tid, "b", HOFFSET(s_t, b), H5T_NATIVE_DOUBLE); - write_dset(loc_id,2,dims2,"compound2D",tid,buf32); + write_dset(loc_id, 2, dims2, "compound2D", tid, buf32); status = H5Tclose(tid); /*------------------------------------------------------------------------- @@ -6970,14 +7558,11 @@ void write_dset_in(hid_t loc_id, *------------------------------------------------------------------------- */ /* Create references to dataset */ - if (dset_name) - { - for (i = 0; i < 3; i++) { - for (j = 0; j < 2; j++) { - status=H5Rcreate(&buf42[i][j],fid,dset_name,H5R_OBJECT,(hid_t)-1); - } - } - write_dset(loc_id,2,dims2,"reference2D",H5T_STD_REF_OBJ,buf42); + if (dset_name) { + for (i = 0; i < 3; i++) + for (j = 0; j < 2; j++) + status = H5Rcreate(&buf42[i][j], fid, dset_name, H5R_OBJECT, (hid_t) -1); + write_dset(loc_id, 2, dims2, "reference2D", H5T_STD_REF_OBJ, buf42); } /*------------------------------------------------------------------------- @@ -6986,9 +7571,9 @@ void write_dset_in(hid_t loc_id, */ tid = H5Tcreate(H5T_ENUM, sizeof(e_t)); - H5Tenum_insert(tid, "RED", (val = 0, &val)); + H5Tenum_insert(tid, "RED", (val = 0, &val)); H5Tenum_insert(tid, "GREEN", (val = 1, &val)); - write_dset(loc_id,2,dims2,"enum2D",tid,0); + write_dset(loc_id, 2, dims2, "enum2D", tid, 0); status = H5Tclose(tid); /*------------------------------------------------------------------------- @@ -6998,18 +7583,17 @@ void write_dset_in(hid_t loc_id, /* Allocate and initialize VL dataset to write */ n = 0; - for(i = 0; i < 3; i++) { - for(j = 0; j < 2; j++) { + for (i = 0; i < 3; i++) + for (j = 0; j < 2; j++) { buf52[i][j].p = HDmalloc((size_t)(i + 1) * sizeof(int)); buf52[i][j].len = (size_t)(i + 1); - for(l = 0; l < i + 1; l++) { - if(make_diffs) - ((int *)buf52[i][j].p)[l] = 0; + for (l = 0; l < i + 1; l++) { + if (make_diffs) + ((int *) buf52[i][j].p)[l] = 0; else - ((int *)buf52[i][j].p)[l] = n++; + ((int *) buf52[i][j].p)[l] = n++; } } - } sid = H5Screate_simple(2, dims2, NULL); tid = H5Tvlen_create(H5T_NATIVE_INT); @@ -7028,10 +7612,7 @@ void write_dset_in(hid_t loc_id, */ if (make_diffs) - { - memset(buf62,0,sizeof buf62); - } - + memset(buf62, 0, sizeof buf62); tid = H5Tarray_create2(H5T_NATIVE_INT, 1, dimarray); write_dset(loc_id, 2, dims2, "array2D", tid, buf62); @@ -7042,14 +7623,11 @@ void write_dset_in(hid_t loc_id, *------------------------------------------------------------------------- */ - - if (make_diffs) - { + if (make_diffs) { memset(buf72, 0, sizeof buf72); memset(buf82, 0, sizeof buf82); } - dcpl = H5Pcreate(H5P_DATASET_CREATE); status = H5Pset_fill_value(dcpl, H5T_NATIVE_INT, &fillvalue); sid = H5Screate_simple(2, dims2, NULL); @@ -7064,8 +7642,7 @@ void write_dset_in(hid_t loc_id, *------------------------------------------------------------------------- */ - write_dset(loc_id,2,dims2,"float2D",H5T_NATIVE_FLOAT,buf82); - + write_dset(loc_id, 2, dims2, "float2D", H5T_NATIVE_FLOAT, buf82); /*------------------------------------------------------------------------- * 3D @@ -7077,33 +7654,27 @@ void write_dset_in(hid_t loc_id, *------------------------------------------------------------------------- */ - if (make_diffs) - { - for (i=0; i<4; i++) - for (j=0; j<3; j++) - for (k=0; k<2; k++) - for (l=0; l<2; l++) - buf13[i][j][k][l]='z'; + if (make_diffs) { + for (i = 0; i < 4; i++) + for (j = 0; j < 3; j++) + for (k = 0; k < 2; k++) + for (l = 0; l < 2; l++) + buf13[i][j][k][l] = 'z'; } tid = H5Tcopy(H5T_C_S1); - status = H5Tset_size(tid,(size_t)STR_SIZE); - write_dset(loc_id,3,dims3,"string3D",tid,buf13); + status = H5Tset_size(tid, (size_t) STR_SIZE); + write_dset(loc_id, 3, dims3, "string3D", tid, buf13); status = H5Tclose(tid); - for (i=0; i<4; i++) - { - for (j=0; j<3; j++) - { - for (k=0; k<2; k++) - { - buf13a[i][j][k]=buf13[i][j][k]; - } - } - } + for (i = 0; i < 4; i++) + for (j = 0; j < 3; j++) + for (k = 0; k < 2; k++) + buf13a[i][j][k] = buf13[i][j][k]; + tid = H5Tcopy(H5T_C_S1); - status = H5Tset_size(tid, H5T_VARIABLE); - write_dset(loc_id,3,dims3,"VLstring3D",tid,buf13a); + status = H5Tset_size(tid, H5T_VARIABLE); + write_dset(loc_id, 3, dims3, "VLstring3D", tid, buf13a); status = H5Tclose(tid); /*------------------------------------------------------------------------- @@ -7111,31 +7682,27 @@ void write_dset_in(hid_t loc_id, *------------------------------------------------------------------------- */ - - n=1; - for (i = 0; i < 4; i++) { - for (j = 0; j < 3; j++) { + n = 1; + for (i = 0; i < 4; i++) + for (j = 0; j < 3; j++) for (k = 0; k < 2; k++) { - if(make_diffs) + if (make_diffs) buf23[i][j][k] = 0; else - buf23[i][j][k] = (char)n++; + buf23[i][j][k] = (char) n++; } - } - } - tid = H5Tcopy(H5T_STD_B8LE); - write_dset(loc_id,3,dims3,"bitfield3D",tid,buf23); + write_dset(loc_id, 3, dims3, "bitfield3D", tid, buf23); status = H5Tclose(tid); /*------------------------------------------------------------------------- * H5T_OPAQUE *------------------------------------------------------------------------- */ - tid = H5Tcreate(H5T_OPAQUE, (size_t)1); + tid = H5Tcreate(H5T_OPAQUE, (size_t) 1); status = H5Tset_tag(tid, "1-byte opaque type"); /* must set this */ - write_dset(loc_id,3,dims3,"opaque3D",tid,buf23); + write_dset(loc_id, 3, dims3, "opaque3D", tid, buf23); status = H5Tclose(tid); /*------------------------------------------------------------------------- @@ -7143,27 +7710,24 @@ void write_dset_in(hid_t loc_id, *------------------------------------------------------------------------- */ - n=1; - for (i = 0; i < 4; i++) { - for (j = 0; j < 3; j++) { + n = 1; + for (i = 0; i < 4; i++) + for (j = 0; j < 3; j++) for (k = 0; k < 2; k++) { if (make_diffs) { buf33[i][j][k].a = 0; buf33[i][j][k].b = 0.0F; } else { - buf33[i][j][k].a = (char)n++; + buf33[i][j][k].a = (char) n++; buf33[i][j][k].b = n++; } } - } - } - - tid = H5Tcreate (H5T_COMPOUND, sizeof(s_t)); + tid = H5Tcreate(H5T_COMPOUND, sizeof(s_t)); H5Tinsert(tid, "a", HOFFSET(s_t, a), H5T_NATIVE_CHAR); H5Tinsert(tid, "b", HOFFSET(s_t, b), H5T_NATIVE_DOUBLE); - write_dset(loc_id,3,dims3,"compound3D",tid,buf33); + write_dset(loc_id, 3, dims3, "compound3D", tid, buf33); status = H5Tclose(tid); /*------------------------------------------------------------------------- @@ -7171,15 +7735,12 @@ void write_dset_in(hid_t loc_id, *------------------------------------------------------------------------- */ /* Create references to dataset */ - if (dset_name) - { - for (i = 0; i < 4; i++) { - for (j = 0; j < 3; j++) { + if (dset_name) { + for (i = 0; i < 4; i++) + for (j = 0; j < 3; j++) for (k = 0; k < 2; k++) - status=H5Rcreate(&buf43[i][j][k],fid,dset_name,H5R_OBJECT,(hid_t)-1); - } - } - write_dset(loc_id,3,dims3,"reference3D",H5T_STD_REF_OBJ,buf43); + status = H5Rcreate(&buf43[i][j][k], fid, dset_name, H5R_OBJECT, (hid_t) -1); + write_dset(loc_id, 3, dims3, "reference3D", H5T_STD_REF_OBJ, buf43); } /*------------------------------------------------------------------------- @@ -7188,9 +7749,9 @@ void write_dset_in(hid_t loc_id, */ tid = H5Tcreate(H5T_ENUM, sizeof(e_t)); - H5Tenum_insert(tid, "RED", (val = 0, &val)); + H5Tenum_insert(tid, "RED", (val = 0, &val)); H5Tenum_insert(tid, "GREEN", (val = 1, &val)); - write_dset(loc_id,3,dims3,"enum3D",tid,0); + write_dset(loc_id, 3, dims3, "enum3D", tid, 0); status = H5Tclose(tid); /*------------------------------------------------------------------------- @@ -7199,21 +7760,19 @@ void write_dset_in(hid_t loc_id, */ /* Allocate and initialize VL dataset to write */ - n=0; - for(i = 0; i < 4; i++) { - for(j = 0; j < 3; j++) { - for(k = 0; k < 2; k++) { + n = 0; + for (i = 0; i < 4; i++) + for (j = 0; j < 3; j++) + for (k = 0; k < 2; k++) { buf53[i][j][k].p = HDmalloc((size_t)(i + 1) * sizeof(int)); buf53[i][j][k].len = (size_t)(i + 1); - for(l = 0; l < i + 1; l++) { - if(make_diffs) - ((int *)buf53[i][j][k].p)[l] = 0; + for (l = 0; l < i + 1; l++) { + if (make_diffs) + ((int *) buf53[i][j][k].p)[l] = 0; else - ((int *)buf53[i][j][k].p)[l] = n++; + ((int *) buf53[i][j][k].p)[l] = n++; } } - } - } sid = H5Screate_simple(3, dims3, NULL); tid = H5Tvlen_create(H5T_NATIVE_INT); @@ -7231,14 +7790,14 @@ void write_dset_in(hid_t loc_id, *------------------------------------------------------------------------- */ - - n=1; - for (i = 0; i < 24; i++) { + n = 1; + for (i = 0; i < 24; i++) for (j = 0; j < 3; j++) { - if (make_diffs) buf63[i][j]=0; - else buf63[i][j]=n++; + if (make_diffs) + buf63[i][j] = 0; + else + buf63[i][j] = n++; } - } tid = H5Tarray_create2(H5T_NATIVE_INT, 1, dimarray); write_dset(loc_id, 3, dims3, "array3D", tid, buf63); @@ -7248,82 +7807,86 @@ void write_dset_in(hid_t loc_id, * H5T_INTEGER and H5T_FLOAT *------------------------------------------------------------------------- */ - n=1; f=1; - for (i = 0; i < 4; i++) { - for (j = 0; j < 3; j++) { + n = 1; + f = 1; + for (i = 0; i < 4; i++) + for (j = 0; j < 3; j++) for (k = 0; k < 2; k++) { if (make_diffs) { - buf73[i][j][k]=0; - buf83[i][j][k]=0.0F; + buf73[i][j][k] = 0; + buf83[i][j][k] = 0.0F; } else { - buf73[i][j][k]=n++; - buf83[i][j][k]=f++; + buf73[i][j][k] = n++; + buf83[i][j][k] = f++; } } - } - } - write_dset(loc_id,3,dims3,"integer3D",H5T_NATIVE_INT,buf73); - write_dset(loc_id,3,dims3,"float3D",H5T_NATIVE_FLOAT,buf83); + + write_dset(loc_id, 3, dims3, "integer3D", H5T_NATIVE_INT, buf73); + write_dset(loc_id, 3, dims3, "float3D", H5T_NATIVE_FLOAT, buf83); } /*------------------------------------------------------------------------- -* Function: gen_datareg -* -* Purpose: generate a dataset region and its reference -* -* Date: April 19, 2006 -* -*------------------------------------------------------------------------- -*/ + * Function: gen_datareg + * + * Purpose: generate a dataset region and its reference + * + * Date: April 19, 2006 + * + *------------------------------------------------------------------------- + */ static -void gen_datareg(hid_t fid, - int make_diffs /* flag to modify data buffers */) +void gen_datareg(hid_t fid, int make_diffs /* flag to modify data buffers */) { /* data dataset */ - hid_t did1; /* dataset ID */ - hid_t sid1; /* dataspace ID */ - hsize_t dims1[2] = {10,10};/* dimensions */ - int *buf; /* dataset buffer */ + hid_t did1 = -1; /* dataset ID */ + hid_t sid1 = -1; /* dataspace ID */ + hsize_t dims1[2] = { 10, 10 };/* dimensions */ + int *buf; /* dataset buffer */ /* reference dataset */ - hid_t did2; /* dataset ID */ - hid_t sid2; /* dataspace ID */ - hsize_t dims2[] = {2}; /* 2 references */ - hdset_reg_ref_t *rbuf; /* buffer for write the references */ - hsize_t start[10]; /* starting location of hyperslab */ - hsize_t count[10]; /* element count of hyperslab */ - hsize_t coord[5][2]; /* coordinates for point selection */ - herr_t status; - int i; + hid_t did2 = -1; /* dataset ID */ + hid_t sid2 = -1; /* dataspace ID */ + hsize_t dims2[] = { 2 }; /* 2 references */ + hdset_reg_ref_t *rbuf; /* buffer for write the references */ + hsize_t start[10]; /* starting location of hyperslab */ + hsize_t count[10]; /* element count of hyperslab */ + hsize_t coord[5][2]; /* coordinates for point selection */ + herr_t status; + int i; /* allocate the buffer for write the references */ - rbuf = (hdset_reg_ref_t *)HDcalloc((size_t)2, sizeof(hdset_reg_ref_t)); + rbuf = (hdset_reg_ref_t *) HDcalloc((size_t )2, sizeof(hdset_reg_ref_t)); /* allocate the buffer for write the data dataset */ - buf = (int *)HDmalloc(10 * 10 * sizeof(int)); + buf = (int *) HDmalloc(10 * 10 * sizeof(int)); - for(i = 0; i < 10 * 10; i++) + for (i = 0; i < 10 * 10; i++) buf[i] = i; /* create the data dataset */ - sid1 = H5Screate_simple(2, dims1, NULL); - did1 = H5Dcreate2(fid, "dsetref", H5T_NATIVE_INT, sid1, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); + sid1 = H5Screate_simple(2, dims1, NULL); + did1 = H5Dcreate2(fid, "dsetref", H5T_NATIVE_INT, sid1, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); status = H5Dwrite(did1, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf); HDassert(status >= 0); /* create the reference dataset */ - sid2 = H5Screate_simple(1, dims2, NULL); - did2 = H5Dcreate2(fid, "refreg", H5T_STD_REF_DSETREG, sid2, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); + sid2 = H5Screate_simple(1, dims2, NULL); + did2 = H5Dcreate2(fid, "refreg", H5T_STD_REF_DSETREG, sid2, H5P_DEFAULT, + H5P_DEFAULT, H5P_DEFAULT); /* create the references */ /* select hyperslab for first reference */ - start[0] = 2; start[1] = 2; - count[0] = 6; count[1] = 6; - if(make_diffs) { - start[0] = 0; start[1] = 0; - count[0] = 3; count[1] = 3; + start[0] = 2; + start[1] = 2; + count[0] = 6; + count[1] = 6; + if (make_diffs) { + start[0] = 0; + start[1] = 0; + count[0] = 3; + count[1] = 3; } status = H5Sselect_hyperslab(sid1, H5S_SELECT_SET, start, NULL, count, NULL); @@ -7335,25 +7898,32 @@ void gen_datareg(hid_t fid, HDassert(status >= 0); /* select sequence of five points for second reference */ - coord[0][0]=6; coord[0][1]=9; - coord[1][0]=2; coord[1][1]=2; - coord[2][0]=8; coord[2][1]=4; - coord[3][0]=1; coord[3][1]=6; - coord[4][0]=2; coord[4][1]=8; - if (make_diffs) - { - coord[1][0]=3; coord[1][1]=3; - coord[3][0]=2; coord[3][1]=5; - coord[4][0]=1; coord[4][1]=7; - } - H5Sselect_elements(sid1,H5S_SELECT_SET,(size_t)5,(const hsize_t *)coord); + coord[0][0] = 6; + coord[0][1] = 9; + coord[1][0] = 2; + coord[1][1] = 2; + coord[2][0] = 8; + coord[2][1] = 4; + coord[3][0] = 1; + coord[3][1] = 6; + coord[4][0] = 2; + coord[4][1] = 8; + if (make_diffs) { + coord[1][0] = 3; + coord[1][1] = 3; + coord[3][0] = 2; + coord[3][1] = 5; + coord[4][0] = 1; + coord[4][1] = 7; + } + H5Sselect_elements(sid1, H5S_SELECT_SET, (size_t) 5, (const hsize_t *) coord); H5Sget_select_npoints(sid1); /* store second dataset region */ - H5Rcreate(&rbuf[1],fid,"dsetref",H5R_DATASET_REGION,sid1); + H5Rcreate(&rbuf[1], fid, "dsetref", H5R_DATASET_REGION, sid1); /* write */ - status = H5Dwrite(did2,H5T_STD_REF_DSETREG,H5S_ALL,H5S_ALL,H5P_DEFAULT,rbuf); + status = H5Dwrite(did2, H5T_STD_REF_DSETREG, H5S_ALL, H5S_ALL, H5P_DEFAULT, rbuf); HDassert(status >= 0); /* close, free memory buffers */ @@ -7370,60 +7940,58 @@ void gen_datareg(hid_t fid, HDfree(buf); } - /*------------------------------------------------------------------------- -* Function: test_hyperslab -* -* Purpose: test diff by hyperslabs. create a dataset with 1GB dimensions -* by iterating trough 1KB hyperslabs -* -*------------------------------------------------------------------------- -*/ + * Function: test_hyperslab + * + * Purpose: test diff by hyperslabs. create a dataset with 1GB dimensions + * by iterating trough 1KB hyperslabs + * + *------------------------------------------------------------------------- + */ static -int test_hyperslab(const char *fname, - int make_diffs /* flag to modify data buffers */) +int test_hyperslab(const char *fname, int make_diffs /* flag to modify data buffers */) { - hid_t did=-1; - hid_t fid=-1; - hid_t f_sid=-1; - hid_t m_sid=-1; - hid_t tid=-1; - hid_t dcpl=-1; - hsize_t dims[1]={GBLL}; /* dataset dimensions */ - hsize_t hs_size[1]={GBLL/(1024*1024)}; /* hyperslab dimensions */ - hsize_t chunk_dims[1]={GBLL/1024}; /* chunk dimensions */ + hid_t did = -1; + hid_t fid = -1; + hid_t f_sid = -1; + hid_t m_sid = -1; + hid_t tid = -1; + hid_t dcpl = -1; + hsize_t dims[1] = { GBLL }; /* dataset dimensions */ + hsize_t hs_size[1] = { GBLL / (1024 * 1024) }; /* hyperslab dimensions */ + hsize_t chunk_dims[1] = { GBLL / 1024 }; /* chunk dimensions */ hsize_t hs_start[1]; - size_t size; - size_t nelmts=(size_t)GBLL/(1024*1024); /* elements in each hyperslab */ - char fillvalue=-1; - char *buf=NULL; - int i, j, s; - char c; + size_t size; + size_t nelmts = (size_t)GBLL / (1024 * 1024); /* elements in each hyperslab */ + char fillvalue = -1; + char *buf = NULL; + int i, j, s; + char c; /* create */ fid = H5Fcreate(fname, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT); - if((dcpl = H5Pcreate(H5P_DATASET_CREATE)) < 0) + if ((dcpl = H5Pcreate(H5P_DATASET_CREATE)) < 0) goto out; - if(H5Pset_fill_value(dcpl, H5T_NATIVE_CHAR, &fillvalue) < 0) + if (H5Pset_fill_value(dcpl, H5T_NATIVE_CHAR, &fillvalue) < 0) goto out; - if(H5Pset_chunk(dcpl, 1, chunk_dims) < 0) + if (H5Pset_chunk(dcpl, 1, chunk_dims) < 0) goto out; - if((f_sid = H5Screate_simple(1, dims, NULL)) < 0) + if ((f_sid = H5Screate_simple(1, dims, NULL)) < 0) goto out; - if((did = H5Dcreate2(fid, "big", H5T_NATIVE_CHAR, f_sid, H5P_DEFAULT, dcpl, H5P_DEFAULT)) < 0) + if ((did = H5Dcreate2(fid, "big", H5T_NATIVE_CHAR, f_sid, H5P_DEFAULT, dcpl, H5P_DEFAULT)) < 0) goto out; - if((m_sid = H5Screate_simple(1, hs_size, hs_size)) < 0) + if ((m_sid = H5Screate_simple(1, hs_size, hs_size)) < 0) goto out; - if((tid = H5Dget_type(did)) < 0) + if ((tid = H5Dget_type(did)) < 0) goto out; - if((size = H5Tget_size(tid)) <= 0) + if ((size = H5Tget_size(tid)) <= 0) goto out; /* create a evenly divided buffer from 0 to 127 */ - buf = (char *)HDmalloc((size_t)(nelmts * size)); + buf = (char *) HDmalloc((size_t)(nelmts * size)); s = 1024 * 1024 / 127; - for(i = 0, j = 0, c = 0; i < 1024 * 1024; j++, i++) { - if(j == s) { + for (i = 0, j = 0, c = 0; i < 1024 * 1024; j++, i++) { + if (j == s) { c++; j = 0; } @@ -7432,32 +8000,30 @@ int test_hyperslab(const char *fname, HDmemset(buf, c, nelmts); /* make a different hyperslab at this position */ - if(make_diffs && i == 512 * 512) + if (make_diffs && i == 512 * 512) HDmemset(buf, 0, nelmts); - hs_start[0] = (unsigned long long)i * GBLL / (1024 * 1024); - if (H5Sselect_hyperslab (f_sid,H5S_SELECT_SET,hs_start,NULL,hs_size, NULL) < 0) + hs_start[0] = (unsigned long long) i * GBLL / (1024 * 1024); + if (H5Sselect_hyperslab(f_sid, H5S_SELECT_SET, hs_start, NULL, hs_size, NULL) < 0) goto out; /* write only one hyperslab */ - if ( i==512*512) - { - if (H5Dwrite (did,H5T_NATIVE_CHAR,m_sid,f_sid,H5P_DEFAULT,buf) < 0) + if (i == 512 * 512) { + if (H5Dwrite(did, H5T_NATIVE_CHAR, m_sid, f_sid, H5P_DEFAULT, buf) < 0) goto out; } - } HDfree(buf); - buf=NULL; + buf = NULL; /* close */ - if(H5Sclose(f_sid) < 0) + if (H5Sclose(f_sid) < 0) goto out; - if(H5Sclose(m_sid) < 0) + if (H5Sclose(m_sid) < 0) goto out; - if(H5Pclose(dcpl) < 0) + if (H5Pclose(dcpl) < 0) goto out; - if(H5Dclose(did) < 0) + if (H5Dclose(did) < 0) goto out; H5Fclose(fid); @@ -7472,40 +8038,32 @@ out: H5Fclose(fid); } H5E_END_TRY; return -1; - } - /*------------------------------------------------------------------------- -* Function: write_attr -* -* Purpose: utility function to write an attribute in LOC_ID -* -*------------------------------------------------------------------------- -*/ + * Function: write_attr + * + * Purpose: utility function to write an attribute in LOC_ID + * + *------------------------------------------------------------------------- + */ static -int write_attr(hid_t loc_id, - int rank, - hsize_t *dims, - const char *name, - hid_t tid, - void *buf) +int write_attr(hid_t loc_id, int rank, hsize_t *dims, const char *name, hid_t tid, void *buf) { - hid_t aid=-1; - hid_t sid=-1; + hid_t aid = -1; + hid_t sid = -1; /* create a space */ - if((sid = H5Screate_simple(rank, dims, NULL)) < 0) + if ((sid = H5Screate_simple(rank, dims, NULL)) < 0) goto out; /* create the attribute */ - if((aid = H5Acreate2(loc_id, name, tid, sid, H5P_DEFAULT, H5P_DEFAULT)) < 0) + if ((aid = H5Acreate2(loc_id, name, tid, sid, H5P_DEFAULT, H5P_DEFAULT)) < 0) goto out; /* write */ - if(buf) - { - if(H5Awrite(aid, tid, buf) < 0) + if (buf) { + if (H5Awrite(aid, tid, buf) < 0) goto out; } @@ -7523,35 +8081,29 @@ out: } /*------------------------------------------------------------------------- -* Function: write_dset -* -* Purpose: utility function to create and write a dataset in LOC_ID -* -*------------------------------------------------------------------------- -*/ + * Function: write_dset + * + * Purpose: utility function to create and write a dataset in LOC_ID + * + *------------------------------------------------------------------------- + */ static -int write_dset( hid_t loc_id, - int rank, - hsize_t *dims, - const char *name, - hid_t tid, - void *buf ) +int write_dset(hid_t loc_id, int rank, hsize_t *dims, const char *name, hid_t tid, void *buf) { - hid_t did=-1; - hid_t sid=-1; + hid_t did = -1; + hid_t sid = -1; /* create a space */ - if((sid = H5Screate_simple(rank, dims, NULL)) < 0) + if ((sid = H5Screate_simple(rank, dims, NULL)) < 0) goto out; /* create the dataset */ - if((did = H5Dcreate2(loc_id, name, tid, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) + if ((did = H5Dcreate2(loc_id, name, tid, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) goto out; /* write */ - if(buf) - { - if(H5Dwrite(did, tid, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf) < 0) + if (buf) { + if (H5Dwrite(did, tid, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf) < 0) goto out; } diff --git a/tools/test/h5diff/testfiles/h5diff_8625.txt b/tools/test/h5diff/testfiles/h5diff_8625.txt new file mode 100644 index 0000000..a7ddb86 --- /dev/null +++ b/tools/test/h5diff/testfiles/h5diff_8625.txt @@ -0,0 +1,10 @@ +dataset: and +Warning: different storage datatype +Warning: different storage datatype +Not comparable: or is of mixed string type +0 differences found +-------------------------------- +Some objects are not comparable +-------------------------------- +Use -c for a list of objects without details of differences. +EXIT CODE: 0 diff --git a/tools/test/h5diff/testfiles/h5diff_8639.txt b/tools/test/h5diff/testfiles/h5diff_8639.txt new file mode 100644 index 0000000..4022e06 --- /dev/null +++ b/tools/test/h5diff/testfiles/h5diff_8639.txt @@ -0,0 +1,72 @@ + +group1 group2 +--------------------------------------- + x x + +group : and +0 differences found +Warning: different storage datatype +Not comparable: or is of mixed string type +Warning: different storage datatype +Not comparable: or is of mixed string type +Warning: different storage datatype +Not comparable: or is of mixed string type +attribute: > and > +0 differences found +attribute: > and > +0 differences found +attribute: > and > +0 differences found +attribute: > and > +0 differences found +attribute: > and > +0 differences found +attribute: > and > +0 differences found +attribute: > and > +0 differences found +attribute: > and > +0 differences found +attribute: > and > +0 differences found +attribute: > and > +0 differences found +attribute: > and > +0 differences found +attribute: > and > +0 differences found +attribute: > and > +0 differences found +attribute: > and > +0 differences found +attribute: > and > +0 differences found +attribute: > and > +0 differences found +attribute: > and > +0 differences found +attribute: > and > +0 differences found +attribute: > and > +0 differences found +attribute: > and > +0 differences found +attribute: > and > +0 differences found +Warning: different storage datatype +Not comparable: or is of mixed string type +Warning: different storage datatype +Not comparable: or is of mixed string type +Warning: different storage datatype +Not comparable: or is of mixed string type +attribute: > and > +0 differences found +attribute: > and > +0 differences found +attribute: > and > +0 differences found +-------------------------------- +Some objects are not comparable +-------------------------------- +Use -c for a list of objects without details of differences. +EXIT CODE: 0 diff --git a/tools/test/h5diff/testfiles/h5diff_attr1.h5 b/tools/test/h5diff/testfiles/h5diff_attr1.h5 index c44066b..4cea743 100644 Binary files a/tools/test/h5diff/testfiles/h5diff_attr1.h5 and b/tools/test/h5diff/testfiles/h5diff_attr1.h5 differ diff --git a/tools/test/h5diff/testfiles/h5diff_attr2.h5 b/tools/test/h5diff/testfiles/h5diff_attr2.h5 index 5de3303..3ea3302 100644 Binary files a/tools/test/h5diff/testfiles/h5diff_attr2.h5 and b/tools/test/h5diff/testfiles/h5diff_attr2.h5 differ diff --git a/tools/test/h5diff/testfiles/h5diff_attr3.h5 b/tools/test/h5diff/testfiles/h5diff_attr3.h5 new file mode 100644 index 0000000..631845d Binary files /dev/null and b/tools/test/h5diff/testfiles/h5diff_attr3.h5 differ diff --git a/tools/test/h5diff/testfiles/h5diff_tmp1.txt b/tools/test/h5diff/testfiles/h5diff_tmp1.txt deleted file mode 100644 index 40e3fb6..0000000 --- a/tools/test/h5diff/testfiles/h5diff_tmp1.txt +++ /dev/null @@ -1,5 +0,0 @@ --------------------------------- -Some objects are not comparable --------------------------------- -Use -c for a list of objects. -EXIT CODE: 0 diff --git a/tools/test/h5diff/testfiles/h5diff_tmp2.txt b/tools/test/h5diff/testfiles/h5diff_tmp2.txt deleted file mode 100644 index a2d6da6..0000000 --- a/tools/test/h5diff/testfiles/h5diff_tmp2.txt +++ /dev/null @@ -1,13 +0,0 @@ -dataset: and -1599 differences found -dataset: and -8 differences found -dataset: and -1845 differences found -dataset: and -10 differences found --------------------------------- -Some objects are not comparable --------------------------------- -Use -c for a list of objects. -EXIT CODE: 1 diff --git a/tools/test/h5diff/testfiles/tmptest.he5 b/tools/test/h5diff/testfiles/tmptest.he5 deleted file mode 100644 index edcfcd2..0000000 Binary files a/tools/test/h5diff/testfiles/tmptest.he5 and /dev/null differ diff --git a/tools/test/h5diff/testfiles/tmptest2.he5 b/tools/test/h5diff/testfiles/tmptest2.he5 deleted file mode 100644 index a6ab02b..0000000 Binary files a/tools/test/h5diff/testfiles/tmptest2.he5 and /dev/null differ diff --git a/tools/test/h5diff/testh5diff.sh.in b/tools/test/h5diff/testh5diff.sh.in index df472d4..c464f94 100644 --- a/tools/test/h5diff/testh5diff.sh.in +++ b/tools/test/h5diff/testh5diff.sh.in @@ -82,6 +82,7 @@ $SRC_H5DIFF_TESTFILES/h5diff_types.h5 $SRC_H5DIFF_TESTFILES/h5diff_dtypes.h5 $SRC_H5DIFF_TESTFILES/h5diff_attr1.h5 $SRC_H5DIFF_TESTFILES/h5diff_attr2.h5 +$SRC_H5DIFF_TESTFILES/h5diff_attr3.h5 $SRC_H5DIFF_TESTFILES/h5diff_dset1.h5 $SRC_H5DIFF_TESTFILES/h5diff_dset2.h5 $SRC_H5DIFF_TESTFILES/h5diff_hyper1.h5 @@ -118,10 +119,6 @@ $SRC_H5DIFF_TESTFILES/h5diff_attr_v_level2.h5 $SRC_H5DIFF_TESTFILES/h5diff_enum_invalid_values.h5 $SRC_H5DIFF_TESTFILES/non_comparables1.h5 $SRC_H5DIFF_TESTFILES/non_comparables2.h5 -$SRC_H5DIFF_TESTFILES/tmptest.he5 -$SRC_H5DIFF_TESTFILES/tmptest2.he5 -$SRC_H5DIFF_TESTFILES/tmpSingleSiteBethe.reference.h5 -$SRC_H5DIFF_TESTFILES/tmpSingleSiteBethe.output.h5 $SRC_H5DIFF_TESTFILES/diff_strings1.h5 $SRC_H5DIFF_TESTFILES/diff_strings2.h5 $SRC_TOOLS_TESTFILES/tvlstr.h5 @@ -337,8 +334,8 @@ $SRC_H5DIFF_TESTFILES/h5diff_709.txt $SRC_H5DIFF_TESTFILES/h5diff_710.txt $SRC_H5DIFF_TESTFILES/h5diff_80.txt $SRC_H5DIFF_TESTFILES/h5diff_90.txt -$SRC_H5DIFF_TESTFILES/h5diff_tmp1.txt -$SRC_H5DIFF_TESTFILES/h5diff_tmp2.txt +$SRC_H5DIFF_TESTFILES/h5diff_8625.txt +$SRC_H5DIFF_TESTFILES/h5diff_8639.txt $SRC_H5DIFF_TESTFILES/h5diff_v1.txt $SRC_H5DIFF_TESTFILES/h5diff_v2.txt $SRC_H5DIFF_TESTFILES/h5diff_v3.txt @@ -820,10 +817,6 @@ TOOLTEST h5diff_631.txt -v --use-system-epsilon h5diff_basic1.h5 h5diff_basic1.h # 7. attributes # ############################################################################## TOOLTEST h5diff_70.txt -v h5diff_attr1.h5 h5diff_attr2.h5 -# temporary test to verify HDF5-8625 -TOOLTEST h5diff_tmp1.txt tmptest2.he5 tmptest.he5 -# temporary test to verify HDF5-8639 -TOOLTEST h5diff_tmp2.txt tmpSingleSiteBethe.output.h5 tmpSingleSiteBethe.reference.h5 # ################################################## # attrs with verbose option level @@ -1145,6 +1138,10 @@ TOOLTEST h5diff_487.txt -v --exclude-path "/group1/dset" h5diff_exclude3-1.h5 h5 # # diff various multiple vlen and fixed strings in a compound type dataset # ############################################################################## TOOLTEST h5diff_530.txt -v h5diff_comp_vl_strs.h5 h5diff_comp_vl_strs.h5 /group /group_copy +# test to verify HDFFV-8625 +TOOLTEST h5diff_8625.txt -v --enable-error-stack h5diff_comp_vl_strs.h5 h5diff_comp_vl_strs.h5 /group/Compound_dset1 /group_copy/Compound_dset3 +# test to verify HDFFV-8639 +TOOLTEST h5diff_8639.txt -v h5diff_attr3.h5 h5diff_attr2.h5 /g1 TOOLTEST h5diff_vlstr.txt -v tvlstr.h5 tvlstr2.h5 # ############################################################################## -- cgit v0.12 From 969fe0373e12256994bc8a704846d0257835ff76 Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Tue, 9 Jan 2018 16:22:08 -0600 Subject: HDFFV-8745 fix minor defects --- tools/lib/h5diff_attr.c | 2 -- tools/lib/h5diff_dset.c | 6 +++--- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/tools/lib/h5diff_attr.c b/tools/lib/h5diff_attr.c index 4e4b40d..7f08cc7 100644 --- a/tools/lib/h5diff_attr.c +++ b/tools/lib/h5diff_attr.c @@ -325,8 +325,6 @@ hsize_t diff_attr(hid_t loc1_id, hid_t space2_id = -1; /* space ID */ hid_t ftype1_id = -1; /* file data type ID */ hid_t ftype2_id = -1; /* file data type ID */ - int vstrtype1 = 0; /* ftype1 is a variable string */ - int vstrtype2 = 0; /* ftype2 is a variable string */ hid_t mtype1_id = -1; /* memory data type ID */ hid_t mtype2_id = -1; /* memory data type ID */ size_t msize1; /* memory size of memory type */ diff --git a/tools/lib/h5diff_dset.c b/tools/lib/h5diff_dset.c index 86aa543..ff542db 100644 --- a/tools/lib/h5diff_dset.c +++ b/tools/lib/h5diff_dset.c @@ -773,8 +773,8 @@ int diff_can_type(hid_t f_tid1, /* file data type */ } if(tclass1 == H5T_STRING) { - hid_t vstrtype1 = -1; - hid_t vstrtype2 = -1; + htri_t vstrtype1 = -1; + htri_t vstrtype2 = -1; h5difftrace("diff_can_type end - H5T_STRING\n"); vstrtype1 = H5Tis_variable_str(f_tid1); @@ -782,7 +782,7 @@ int diff_can_type(hid_t f_tid1, /* file data type */ /* no compare if either one but not both are variable string type */ if (vstrtype1 != vstrtype2) { - if((opts->m_verbose || opts->m_list_not_cmp)) + if((opts->m_verbose || opts->m_list_not_cmp) && obj1_name && obj2_name) parallel_print("Not comparable: <%s> or <%s> is of mixed string type\n", obj1_name, obj2_name); opts->not_cmp = 1; -- cgit v0.12 From fa2e3b45547d2c0988f24668afba82516520530d Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Tue, 9 Jan 2018 16:38:54 -0600 Subject: HDFFV-10385 correct platform issues --- CMakeLists.txt | 6 ++--- config/cmake/hdf5-config.cmake.in | 6 ----- config/cmake_ext_mod/HDFMacros.cmake | 21 ++++-------------- fortran/src/CMakeLists.txt | 43 ++++++++++++++++++++---------------- fortran/test/CMakeLists.txt | 21 +++++++++--------- hl/fortran/src/CMakeLists.txt | 23 +++++++++---------- 6 files changed, 53 insertions(+), 67 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 5be2f03..2288be5 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -233,7 +233,7 @@ if (NOT HDF5_INSTALL_DATA_DIR) set (HDF5_INSTALL_FWRK_DIR ${CMAKE_INSTALL_FRAMEWORK_PREFIX}) endif () set (HDF5_INSTALL_DATA_DIR share) - set (HDF5_INSTALL_CMAKE_DIR share/cmake) + set (HDF5_INSTALL_CMAKE_DIR share/cmake/hdf5) else () set (HDF5_INSTALL_DATA_DIR ".") set (HDF5_INSTALL_CMAKE_DIR cmake) @@ -428,12 +428,12 @@ if (NOT HDF5_EXTERNALLY_CONFIGURED) ${PROJECT_BINARY_DIR}/bin CACHE PATH "Single Directory for all fortran modules." ) if (WIN32) - set (CMAKE_TEST_OUTPUT_DIRECTORY ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${HDF5_BUILD_TYPE}) + set (CMAKE_TEST_OUTPUT_DIRECTORY ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${CTEST_CONFIGURATION_TYPE}) set (CMAKE_PDB_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/bin CACHE PATH "Single Directory for all pdb files." ) else () - set (CMAKE_TEST_OUTPUT_DIRECTORY ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}) + set (CMAKE_TEST_OUTPUT_DIRECTORY ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${CTEST_CONFIGURATION_TYPE}) endif () else () # if we are externally configured, but the project uses old cmake scripts diff --git a/config/cmake/hdf5-config.cmake.in b/config/cmake/hdf5-config.cmake.in index 01c27df..421f693 100644 --- a/config/cmake/hdf5-config.cmake.in +++ b/config/cmake/hdf5-config.cmake.in @@ -105,12 +105,6 @@ set (HDF5_VERSION_MINOR @HDF5_VERSION_MINOR@) # project which has already built hdf5 as a subproject #----------------------------------------------------------------------------- if (NOT TARGET "@HDF5_PACKAGE@") - if (${HDF5_PACKAGE_NAME}_ENABLE_Z_LIB_SUPPORT AND ${HDF5_PACKAGE_NAME}_PACKAGE_EXTLIBS AND NOT TARGET "zlib") - include (@PACKAGE_SHARE_INSTALL_DIR@/@ZLIB_PACKAGE_NAME@@HDF_PACKAGE_EXT@-targets.cmake) - endif () - if (${HDF5_PACKAGE_NAME}_ENABLE_SZIP_SUPPORT AND ${HDF5_PACKAGE_NAME}_PACKAGE_EXTLIBS AND NOT TARGET "szip") - include (@PACKAGE_SHARE_INSTALL_DIR@/@SZIP_PACKAGE_NAME@@HDF_PACKAGE_EXT@-targets.cmake) - endif () include (@PACKAGE_SHARE_INSTALL_DIR@/@HDF5_PACKAGE@@HDF_PACKAGE_EXT@-targets.cmake) endif () diff --git a/config/cmake_ext_mod/HDFMacros.cmake b/config/cmake_ext_mod/HDFMacros.cmake index dd7e262..218c882 100644 --- a/config/cmake_ext_mod/HDFMacros.cmake +++ b/config/cmake_ext_mod/HDFMacros.cmake @@ -15,27 +15,14 @@ macro (SET_HDF5_BUILD_TYPE) get_property(_isMultiConfig GLOBAL PROPERTY GENERATOR_IS_MULTI_CONFIG) if(_isMultiConfig) set(HDF5_BUILD_TYPE ${CMAKE_CFG_INTDIR}) + set(HDF5_CFG_BUILD_TYPE \${CMAKE_INSTALL_CONFIG_NAME}) else() if(CMAKE_BUILD_TYPE) set(HDF5_BUILD_TYPE ${CMAKE_BUILD_TYPE}) + set(HDF5_CFG_BUILD_TYPE ${CMAKE_BUILD_TYPE}) else() - set(HDF5_BUILD_TYPE) - endif() - endif() -endmacro () - -#------------------------------------------------------------------------------- -macro (CREATE_CONFIG_DIR path) - get_property(_isMultiConfig GLOBAL PROPERTY GENERATOR_IS_MULTI_CONFIG) - if(_isMultiConfig) - foreach(c ${CMAKE_CONFIGURATION_TYPES} ${CMAKE_BUILD_TYPE}) - file(MAKE_DIRECTORY "${path}/${c}") - endforeach() - else() - if(CMAKE_BUILD_TYPE) - file(MAKE_DIRECTORY "${path}/${CMAKE_BUILD_TYPE}") - else() - file(MAKE_DIRECTORY "${path}") + set(HDF5_BUILD_TYPE "Release") + set(HDF5_CFG_BUILD_TYPE "Release") endif() endif() endmacro () diff --git a/fortran/src/CMakeLists.txt b/fortran/src/CMakeLists.txt index 692509b..c377d62 100644 --- a/fortran/src/CMakeLists.txt +++ b/fortran/src/CMakeLists.txt @@ -66,11 +66,10 @@ set_target_properties (H5_buildiface PROPERTIES if (BUILD_SHARED_LIBS) file (MAKE_DIRECTORY "${HDF5_F90_BINARY_DIR}/shared") - CREATE_CONFIG_DIR(${CMAKE_Fortran_MODULE_DIRECTORY}/shared) - set (MODSH_BUILD_DIR ${CMAKE_Fortran_MODULE_DIRECTORY}/shared/${HDF5_BUILD_TYPE}) + set (MODSH_BUILD_DIR ${CMAKE_Fortran_MODULE_DIRECTORY}/shared/${HDF5_CFG_BUILD_TYPE}) endif () -CREATE_CONFIG_DIR(${CMAKE_Fortran_MODULE_DIRECTORY}/static) -set (MOD_BUILD_DIR ${CMAKE_Fortran_MODULE_DIRECTORY}/static/${HDF5_BUILD_TYPE}) +file (MAKE_DIRECTORY "${HDF5_F90_BINARY_DIR}/static") +set (MOD_BUILD_DIR ${CMAKE_Fortran_MODULE_DIRECTORY}/static/${HDF5_CFG_BUILD_TYPE}) INCLUDE_DIRECTORIES (${HDF5_F90_BINARY_DIR} ${CMAKE_Fortran_MODULE_DIRECTORY}) @@ -81,14 +80,14 @@ add_executable (H5match_types ) set (CMD $) add_custom_command ( - OUTPUT ${HDF5_F90_BINARY_DIR}/H5f90i_gen.h - ${HDF5_F90_BINARY_DIR}/H5fortran_types.F90 + OUTPUT ${HDF5_F90_BINARY_DIR}/static/H5f90i_gen.h + ${HDF5_F90_BINARY_DIR}/static/H5fortran_types.F90 COMMAND ${CMD} - WORKING_DIRECTORY ${HDF5_F90_BINARY_DIR} + WORKING_DIRECTORY ${HDF5_F90_BINARY_DIR}/static DEPENDS H5match_types ) -set_source_files_properties (${HDF5_F90_BINARY_DIR}/H5f90i_gen.h PROPERTIES GENERATED TRUE) -set_source_files_properties (${HDF5_F90_BINARY_DIR}/H5fortran_types.F90 PROPERTIES GENERATED TRUE) +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) if (BUILD_SHARED_LIBS) set (CMDSH $) add_custom_command ( @@ -127,10 +126,15 @@ set_source_files_properties (${f90CStub_C_SOURCES} PROPERTIES LANGUAGE C) set (f90CStub_C_HDRS # generated files - ${HDF5_F90_BINARY_DIR}/H5f90i_gen.h + ${HDF5_F90_BINARY_DIR}/static/H5f90i_gen.h +) +set (f90CStub_C_SHHDRS + # generated files + ${HDF5_F90_BINARY_DIR}/shared/H5f90i_gen.h ) add_library (${HDF5_F90_C_LIB_TARGET} STATIC ${f90CStub_C_SOURCES} ${f90CStub_C_HDRS}) +target_include_directories(${HDF5_F90_C_LIB_TARGET} PRIVATE ${HDF5_F90_BINARY_DIR}/static) TARGET_C_PROPERTIES (${HDF5_F90_C_LIB_TARGET} STATIC " " " ") target_link_libraries (${HDF5_F90_C_LIB_TARGET} PUBLIC ${HDF5_LIB_TARGET}) set_global_variable (HDF5_LIBRARIES_TO_EXPORT "${HDF5_LIBRARIES_TO_EXPORT};${HDF5_F90_C_LIB_TARGET}") @@ -143,7 +147,8 @@ set_target_properties (${HDF5_F90_C_LIB_TARGET} PROPERTIES set (install_targets ${HDF5_F90_C_LIB_TARGET}) if (BUILD_SHARED_LIBS) - add_library (${HDF5_F90_C_LIBSH_TARGET} SHARED ${f90CStub_C_SOURCES} ${f90CStub_C_HDRS}) + add_library (${HDF5_F90_C_LIBSH_TARGET} SHARED ${f90CStub_C_SOURCES} ${f90CStub_C_SHHDRS}) + target_include_directories(${HDF5_F90_C_LIBSH_TARGET} PRIVATE ${HDF5_F90_BINARY_DIR}/shared) TARGET_C_PROPERTIES (${HDF5_F90_C_LIBSH_TARGET} SHARED " " " ") target_link_libraries (${HDF5_F90_C_LIBSH_TARGET} PUBLIC ${HDF5_LIBSH_TARGET}) set_global_variable (HDF5_LIBRARIES_TO_EXPORT "${HDF5_LIBRARIES_TO_EXPORT};${HDF5_F90_C_LIBSH_TARGET}") @@ -168,16 +173,16 @@ set (f90_F_GEN_SOURCES ) set (CMD $) add_custom_command ( - OUTPUT ${HDF5_F90_BINARY_DIR}/H5_gen.F90 + OUTPUT ${HDF5_F90_BINARY_DIR}/static/H5_gen.F90 COMMAND ${CMD} - WORKING_DIRECTORY ${HDF5_F90_BINARY_DIR} + WORKING_DIRECTORY ${HDF5_F90_BINARY_DIR}/static DEPENDS ${f90_F_GEN_SOURCES} COMMENT "Generating the H5_gen.F90 file" ) add_custom_target (H5gen ALL - DEPENDS ${HDF5_F90_BINARY_DIR}/H5_gen.F90 + DEPENDS ${HDF5_F90_BINARY_DIR}/static/H5_gen.F90 ) -set_source_files_properties (${HDF5_F90_BINARY_DIR}/H5_gen.F90 PROPERTIES GENERATED TRUE) +set_source_files_properties (${HDF5_F90_BINARY_DIR}/static/H5_gen.F90 PROPERTIES GENERATED TRUE) if (BUILD_SHARED_LIBS) set (CMDSH $) @@ -216,12 +221,12 @@ set (f90_F_BASE_SOURCES set (f90_F_SOURCES # generated file - ${HDF5_F90_BINARY_DIR}/H5fortran_types.F90 + ${HDF5_F90_BINARY_DIR}/static/H5fortran_types.F90 ${f90_F_BASE_SOURCES} # generated file - ${HDF5_F90_BINARY_DIR}/H5_gen.F90 + ${HDF5_F90_BINARY_DIR}/static/H5_gen.F90 # normal distribution ${HDF5_F90_SRC_SOURCE_DIR}/HDF5.F90 @@ -309,8 +314,8 @@ install ( ${HDF5_F90_SRC_SOURCE_DIR}/H5f90.h ${HDF5_F90_SRC_SOURCE_DIR}/H5f90i.h ${HDF5_F90_SRC_SOURCE_DIR}/H5f90proto.h - ${HDF5_F90_BINARY_DIR}/H5f90i_gen.h - ${HDF5_F90_BINARY_DIR}/H5fortran_types.F90 + ${HDF5_F90_BINARY_DIR}/static/H5f90i_gen.h + ${HDF5_F90_BINARY_DIR}/static/H5fortran_types.F90 DESTINATION ${HDF5_INSTALL_INCLUDE_DIR} COMPONENT diff --git a/fortran/test/CMakeLists.txt b/fortran/test/CMakeLists.txt index f536bf2..c47618e 100644 --- a/fortran/test/CMakeLists.txt +++ b/fortran/test/CMakeLists.txt @@ -33,12 +33,11 @@ set_target_properties (H5_test_buildiface PROPERTIES ) if (BUILD_SHARED_LIBS) - file (MAKE_DIRECTORY "${HDF5_F90_BINARY_DIR}/shared") - CREATE_CONFIG_DIR(${CMAKE_Fortran_MODULE_DIRECTORY}/shared) - set (MODSH_BUILD_DIR ${CMAKE_Fortran_MODULE_DIRECTORY}/shared/${HDF5_BUILD_TYPE}) + file (MAKE_DIRECTORY "${HDF5_HL_F90_SRC_BINARY_DIR}/shared") + set (MODSH_BUILD_DIR ${CMAKE_Fortran_MODULE_DIRECTORY}/shared/${HDF5_CFG_BUILD_TYPE}) endif () -CREATE_CONFIG_DIR(${CMAKE_Fortran_MODULE_DIRECTORY}/static) -set (MOD_BUILD_DIR ${CMAKE_Fortran_MODULE_DIRECTORY}/static/${HDF5_BUILD_TYPE}) +file (MAKE_DIRECTORY "${HDF5_HL_F90_SRC_BINARY_DIR}/static") +set (MOD_BUILD_DIR ${CMAKE_Fortran_MODULE_DIRECTORY}/static/${HDF5_CFG_BUILD_TYPE}) INCLUDE_DIRECTORIES (${CMAKE_Fortran_MODULE_DIRECTORY} ${MOD_BUILD_DIR}) @@ -47,6 +46,7 @@ INCLUDE_DIRECTORIES (${CMAKE_Fortran_MODULE_DIRECTORY} ${MOD_BUILD_DIR}) #----------------------------------------------------------------------------- add_library (${HDF5_F90_C_TEST_LIB_TARGET} STATIC t.c) set_source_files_properties (t.c PROPERTIES LANGUAGE C) +target_include_directories(${HDF5_F90_C_TEST_LIB_TARGET} PRIVATE ${HDF5_F90_BINARY_DIR}/static) TARGET_C_PROPERTIES (${HDF5_F90_C_TEST_LIB_TARGET} STATIC " " " ") target_link_libraries (${HDF5_F90_C_TEST_LIB_TARGET} ${HDF5_F90_C_LIB_TARGET} @@ -60,6 +60,7 @@ set_target_properties (${HDF5_F90_C_TEST_LIB_TARGET} PROPERTIES ) if (BUILD_SHARED_LIBS) add_library (${HDF5_F90_C_TEST_LIBSH_TARGET} SHARED t.c) +target_include_directories(${HDF5_F90_C_TEST_LIBSH_TARGET} PRIVATE ${HDF5_F90_BINARY_DIR}/shared) TARGET_C_PROPERTIES (${HDF5_F90_C_TEST_LIBSH_TARGET} SHARED " " " ") target_link_libraries (${HDF5_F90_C_TEST_LIBSH_TARGET} ${HDF5_F90_C_LIBSH_TARGET} @@ -77,16 +78,16 @@ endif () set (CMD $) add_custom_command ( - OUTPUT ${HDF5_F90_BINARY_DIR}/tf_gen.F90 + OUTPUT ${HDF5_F90_BINARY_DIR}/static/tf_gen.F90 COMMAND ${CMD} - WORKING_DIRECTORY ${HDF5_F90_BINARY_DIR} + WORKING_DIRECTORY ${HDF5_F90_BINARY_DIR}/static DEPENDS H5_test_buildiface COMMENT "Generating the tf_gen.F90 file" ) add_custom_target (H5testgen ALL - DEPENDS ${HDF5_F90_BINARY_DIR}/tf_gen.F90 + DEPENDS ${HDF5_F90_BINARY_DIR}/static/tf_gen.F90 ) -set_source_files_properties (${HDF5_F90_BINARY_DIR}/tf_gen.F90 PROPERTIES GENERATED TRUE) +set_source_files_properties (${HDF5_F90_BINARY_DIR}/static/tf_gen.F90 PROPERTIES GENERATED TRUE) if (BUILD_SHARED_LIBS) set (CMDSH $) @@ -105,7 +106,7 @@ endif () set (HDF5_F90_TF_SOURCES # generated files - ${HDF5_F90_BINARY_DIR}/tf_gen.F90 + ${HDF5_F90_BINARY_DIR}/static/tf_gen.F90 # normal distribution tf.F90 diff --git a/hl/fortran/src/CMakeLists.txt b/hl/fortran/src/CMakeLists.txt index 90ee19b..47e8236 100644 --- a/hl/fortran/src/CMakeLists.txt +++ b/hl/fortran/src/CMakeLists.txt @@ -37,12 +37,9 @@ set_target_properties (H5HL_buildiface PROPERTIES ) if (BUILD_SHARED_LIBS) - file (MAKE_DIRECTORY "${HDF5_HL_F90_SRC_BINARY_DIR}/shared") - CREATE_CONFIG_DIR(${CMAKE_Fortran_MODULE_DIRECTORY}/shared) - set (MODSH_BUILD_DIR ${CMAKE_Fortran_MODULE_DIRECTORY}/shared/${HDF5_BUILD_TYPE}) + set (MODSH_BUILD_DIR ${CMAKE_Fortran_MODULE_DIRECTORY}/shared/${HDF5_CFG_BUILD_TYPE}) endif () -CREATE_CONFIG_DIR(${CMAKE_Fortran_MODULE_DIRECTORY}/static) -set (MOD_BUILD_DIR ${CMAKE_Fortran_MODULE_DIRECTORY}/static/${HDF5_BUILD_TYPE}) +set (MOD_BUILD_DIR ${CMAKE_Fortran_MODULE_DIRECTORY}/static/${HDF5_CFG_BUILD_TYPE}) #----------------------------------------------------------------------------- # Setup include Directories @@ -70,6 +67,7 @@ set_source_files_properties (${HDF5_HL_F90_C_SOURCES} PROPERTIES LANGUAGE C) set (HDF5_HL_F90_HEADERS ${HDF5_HL_F90_SRC_SOURCE_DIR}/H5LTf90proto.h) add_library (${HDF5_HL_F90_C_LIB_TARGET} STATIC ${HDF5_HL_F90_C_SOURCES} ${HDF5_HL_F90_HEADERS}) +target_include_directories(${HDF5_HL_F90_C_LIB_TARGET} PRIVATE ${HDF5_F90_BINARY_DIR}/static) TARGET_C_PROPERTIES (${HDF5_HL_F90_C_LIB_TARGET} STATIC " " " ") target_link_libraries (${HDF5_HL_F90_C_LIB_TARGET} PUBLIC ${HDF5_F90_C_LIB_TARGET} ${HDF5_HL_LIB_TARGET}) set_global_variable (HDF5_LIBRARIES_TO_EXPORT "${HDF5_LIBRARIES_TO_EXPORT};${HDF5_HL_F90_C_LIB_TARGET}") @@ -83,6 +81,7 @@ set (install_targets ${HDF5_HL_F90_C_LIB_TARGET}) if (BUILD_SHARED_LIBS) add_library (${HDF5_HL_F90_C_LIBSH_TARGET} SHARED ${HDF5_HL_F90_C_SOURCES} ${HDF5_HL_F90_HEADERS}) + target_include_directories(${HDF5_HL_F90_C_LIBSH_TARGET} PRIVATE ${HDF5_F90_BINARY_DIR}/shared) TARGET_C_PROPERTIES (${HDF5_HL_F90_C_LIBSH_TARGET} SHARED " " " ") target_link_libraries (${HDF5_HL_F90_C_LIBSH_TARGET} PUBLIC ${HDF5_F90_C_LIBSH_TARGET} ${HDF5_HL_LIBSH_TARGET}) set_global_variable (HDF5_LIBRARIES_TO_EXPORT "${HDF5_LIBRARIES_TO_EXPORT};${HDF5_HL_F90_C_LIBSH_TARGET}") @@ -109,18 +108,18 @@ set (HDF5_HL_F90_F_BASE_SOURCES set (CMD $) add_custom_command ( - OUTPUT ${HDF5_HL_F90_SRC_BINARY_DIR}/H5LTff_gen.F90 ${HDF5_HL_F90_SRC_BINARY_DIR}/H5TBff_gen.F90 + OUTPUT ${HDF5_HL_F90_SRC_BINARY_DIR}/static/H5LTff_gen.F90 ${HDF5_HL_F90_SRC_BINARY_DIR}/H5TBff_gen.F90 COMMAND ${CMD} - WORKING_DIRECTORY ${HDF5_HL_F90_SRC_BINARY_DIR} + WORKING_DIRECTORY ${HDF5_HL_F90_SRC_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_SRC_BINARY_DIR}/H5LTff_gen.F90 ${HDF5_HL_F90_SRC_BINARY_DIR}/H5TBff_gen.F90 + DEPENDS ${HDF5_HL_F90_SRC_BINARY_DIR}/static/H5LTff_gen.F90 ${HDF5_HL_F90_SRC_BINARY_DIR}/H5TBff_gen.F90 ) set_source_files_properties ( - ${HDF5_HL_F90_SRC_BINARY_DIR}/H5LTff_gen.F90 - ${HDF5_HL_F90_SRC_BINARY_DIR}/H5TBff_gen.F90 + ${HDF5_HL_F90_SRC_BINARY_DIR}/static/H5LTff_gen.F90 + ${HDF5_HL_F90_SRC_BINARY_DIR}/static/H5TBff_gen.F90 PROPERTIES GENERATED TRUE ) if (BUILD_SHARED_LIBS) @@ -146,8 +145,8 @@ set (HDF5_HL_F90_F_SOURCES ${HDF5_HL_F90_F_BASE_SOURCES} # generated files - ${HDF5_HL_F90_SRC_BINARY_DIR}/H5LTff_gen.F90 - ${HDF5_HL_F90_SRC_BINARY_DIR}/H5TBff_gen.F90 + ${HDF5_HL_F90_SRC_BINARY_DIR}/static/H5LTff_gen.F90 + ${HDF5_HL_F90_SRC_BINARY_DIR}/static/H5TBff_gen.F90 ) set_source_files_properties (${HDF5_HL_F90_F_SOURCES} PROPERTIES LANGUAGE Fortran) -- cgit v0.12 From 87e8fa7d04bf0c6ef668c458f9d4791d2ce6a801 Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Tue, 9 Jan 2018 16:56:11 -0600 Subject: HDFFV-10385 correct folder typo --- fortran/test/CMakeLists.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fortran/test/CMakeLists.txt b/fortran/test/CMakeLists.txt index c47618e..0af4df9 100644 --- a/fortran/test/CMakeLists.txt +++ b/fortran/test/CMakeLists.txt @@ -33,10 +33,10 @@ set_target_properties (H5_test_buildiface PROPERTIES ) if (BUILD_SHARED_LIBS) - file (MAKE_DIRECTORY "${HDF5_HL_F90_SRC_BINARY_DIR}/shared") + file (MAKE_DIRECTORY "${HDF5_F90_BINARY_DIR}/shared") set (MODSH_BUILD_DIR ${CMAKE_Fortran_MODULE_DIRECTORY}/shared/${HDF5_CFG_BUILD_TYPE}) endif () -file (MAKE_DIRECTORY "${HDF5_HL_F90_SRC_BINARY_DIR}/static") +file (MAKE_DIRECTORY "${HDF5_F90_BINARY_DIR}/static") set (MOD_BUILD_DIR ${CMAKE_Fortran_MODULE_DIRECTORY}/static/${HDF5_CFG_BUILD_TYPE}) INCLUDE_DIRECTORIES (${CMAKE_Fortran_MODULE_DIRECTORY} ${MOD_BUILD_DIR}) -- cgit v0.12 From aec85438882353a643b3395e12106ddca2197caa Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Wed, 10 Jan 2018 08:41:28 -0600 Subject: HDFFV-10385 merge corrections from develop --- fortran/examples/h5_crtatt.f90 | 4 ++++ hl/fortran/src/CMakeLists.txt | 2 ++ release_docs/RELEASE.txt | 13 +++++++++++++ 3 files changed, 19 insertions(+) diff --git a/fortran/examples/h5_crtatt.f90 b/fortran/examples/h5_crtatt.f90 index 7e287c6..d3df380 100644 --- a/fortran/examples/h5_crtatt.f90 +++ b/fortran/examples/h5_crtatt.f90 @@ -84,6 +84,10 @@ PROGRAM H5_CRTATT ! CALL h5aclose_f(attr_id, error) ! + ! Close the attribute datatype. + ! + CALL h5tclose_f(atype_id, error) + ! ! Terminate access to the data space. ! CALL h5sclose_f(aspace_id, error) diff --git a/hl/fortran/src/CMakeLists.txt b/hl/fortran/src/CMakeLists.txt index 47e8236..dc2629a 100644 --- a/hl/fortran/src/CMakeLists.txt +++ b/hl/fortran/src/CMakeLists.txt @@ -37,8 +37,10 @@ set_target_properties (H5HL_buildiface PROPERTIES ) if (BUILD_SHARED_LIBS) + file (MAKE_DIRECTORY "${HDF5_HL_F90_SRC_BINARY_DIR}/shared") set (MODSH_BUILD_DIR ${CMAKE_Fortran_MODULE_DIRECTORY}/shared/${HDF5_CFG_BUILD_TYPE}) endif () +file (MAKE_DIRECTORY "${HDF5_HL_F90_SRC_BINARY_DIR}/static") set (MOD_BUILD_DIR ${CMAKE_Fortran_MODULE_DIRECTORY}/static/${HDF5_CFG_BUILD_TYPE}) #----------------------------------------------------------------------------- diff --git a/release_docs/RELEASE.txt b/release_docs/RELEASE.txt index 24b6196..b42724f 100644 --- a/release_docs/RELEASE.txt +++ b/release_docs/RELEASE.txt @@ -405,6 +405,19 @@ Bug Fixes since HDF5-1.10.1 release ------------- - CMake + Correct usuage of CMAKE_BUILD_TYPE variable. + + The use of the CMAKE_BUILD_TYPE is incorrect for multi-config + generators (Visual Studio and XCode) and is optional for single + config generators. Created a new macro to check + GLOBAL PROPERTY -> GENERATOR_IS_MULTI_CONFIG + Created two new HDF variable, HDF5_BUILD_TYPE and HDF5_CFG_BUILD_TYPE. + Defaults for these variables is "Release". + + (ADB - 2018/01/10, HDFFV-10385) + + - CMake + Add replacement of fortran flags if using static CRT. Added TARGET_STATIC_CRT_FLAGS call to HDFUseFortran.cmake file in -- cgit v0.12 From 3ca7b82e5aca859e04ebcfee5a4a9c7f0f50a9c0 Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Wed, 10 Jan 2018 08:51:13 -0600 Subject: HDFFV-8745 remove obolete files --- .../test/h5diff/testfiles/tmpSingleSiteBethe.output.h5 | Bin 124440 -> 0 bytes .../h5diff/testfiles/tmpSingleSiteBethe.reference.h5 | Bin 119464 -> 0 bytes 2 files changed, 0 insertions(+), 0 deletions(-) delete mode 100644 tools/test/h5diff/testfiles/tmpSingleSiteBethe.output.h5 delete mode 100644 tools/test/h5diff/testfiles/tmpSingleSiteBethe.reference.h5 diff --git a/tools/test/h5diff/testfiles/tmpSingleSiteBethe.output.h5 b/tools/test/h5diff/testfiles/tmpSingleSiteBethe.output.h5 deleted file mode 100644 index bbcfb63..0000000 Binary files a/tools/test/h5diff/testfiles/tmpSingleSiteBethe.output.h5 and /dev/null differ diff --git a/tools/test/h5diff/testfiles/tmpSingleSiteBethe.reference.h5 b/tools/test/h5diff/testfiles/tmpSingleSiteBethe.reference.h5 deleted file mode 100644 index 6b19ed7..0000000 Binary files a/tools/test/h5diff/testfiles/tmpSingleSiteBethe.reference.h5 and /dev/null differ -- cgit v0.12 From dc8a70bf282639ab912b992a6feab7883ebb2886 Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Wed, 10 Jan 2018 09:53:42 -0600 Subject: HDFFV-10385 includes cleanup --- fortran/test/CMakeLists.txt | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/fortran/test/CMakeLists.txt b/fortran/test/CMakeLists.txt index 0af4df9..9946aa0 100644 --- a/fortran/test/CMakeLists.txt +++ b/fortran/test/CMakeLists.txt @@ -4,7 +4,7 @@ PROJECT (HDF5_FORTRAN_TESTS C CXX Fortran) #----------------------------------------------------------------------------- # Setup include Directories #----------------------------------------------------------------------------- -INCLUDE_DIRECTORIES (${HDF5_F90_BINARY_DIR} ${HDF5_F90_SRC_DIR}/src) +INCLUDE_DIRECTORIES (${CMAKE_Fortran_MODULE_DIRECTORY} ${HDF5_F90_BINARY_DIR} ${HDF5_F90_SRC_DIR}/src) #----------------------------------------------------------------------------- # Setup the Fortran auto-detection utilities @@ -39,8 +39,6 @@ endif () file (MAKE_DIRECTORY "${HDF5_F90_BINARY_DIR}/static") set (MOD_BUILD_DIR ${CMAKE_Fortran_MODULE_DIRECTORY}/static/${HDF5_CFG_BUILD_TYPE}) -INCLUDE_DIRECTORIES (${CMAKE_Fortran_MODULE_DIRECTORY} ${MOD_BUILD_DIR}) - #----------------------------------------------------------------------------- # Add Test Lib #----------------------------------------------------------------------------- @@ -60,7 +58,7 @@ set_target_properties (${HDF5_F90_C_TEST_LIB_TARGET} PROPERTIES ) if (BUILD_SHARED_LIBS) add_library (${HDF5_F90_C_TEST_LIBSH_TARGET} SHARED t.c) -target_include_directories(${HDF5_F90_C_TEST_LIBSH_TARGET} PRIVATE ${HDF5_F90_BINARY_DIR}/shared) + target_include_directories(${HDF5_F90_C_TEST_LIBSH_TARGET} PRIVATE ${HDF5_F90_BINARY_DIR}/shared) TARGET_C_PROPERTIES (${HDF5_F90_C_TEST_LIBSH_TARGET} SHARED " " " ") target_link_libraries (${HDF5_F90_C_TEST_LIBSH_TARGET} ${HDF5_F90_C_LIBSH_TARGET} -- cgit v0.12 From 9b5bd45740320693be9749a4db0ae96af50c3374 Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Wed, 10 Jan 2018 14:39:48 -0600 Subject: HDFFV-10385 mult-config builders need a folder --- config/cmake/UseJava.cmake | 2 +- config/cmake_ext_mod/HDFMacros.cmake | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/config/cmake/UseJava.cmake b/config/cmake/UseJava.cmake index 52b37a9..c70f52e 100644 --- a/config/cmake/UseJava.cmake +++ b/config/cmake/UseJava.cmake @@ -285,7 +285,7 @@ # # Example: # create_javadoc(my_example_doc -# PACKAGES com.exmaple.foo com.example.bar +# PACKAGES com.example.foo com.example.bar # SOURCEPATH "${CMAKE_CURRENT_SOURCE_DIR}" # CLASSPATH ${CMAKE_JAVA_INCLUDE_PATH} # WINDOWTITLE "My example" diff --git a/config/cmake_ext_mod/HDFMacros.cmake b/config/cmake_ext_mod/HDFMacros.cmake index 218c882..76e0612 100644 --- a/config/cmake_ext_mod/HDFMacros.cmake +++ b/config/cmake_ext_mod/HDFMacros.cmake @@ -17,12 +17,11 @@ macro (SET_HDF5_BUILD_TYPE) set(HDF5_BUILD_TYPE ${CMAKE_CFG_INTDIR}) set(HDF5_CFG_BUILD_TYPE \${CMAKE_INSTALL_CONFIG_NAME}) else() + set(HDF5_CFG_BUILD_TYPE ".") if(CMAKE_BUILD_TYPE) set(HDF5_BUILD_TYPE ${CMAKE_BUILD_TYPE}) - set(HDF5_CFG_BUILD_TYPE ${CMAKE_BUILD_TYPE}) else() set(HDF5_BUILD_TYPE "Release") - set(HDF5_CFG_BUILD_TYPE "Release") endif() endif() endmacro () -- cgit v0.12 From 2fa4b8bc6772df3b0b89ef4af216d75726d854a6 Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Thu, 11 Jan 2018 09:11:45 -0600 Subject: HDFFV-9724 merge vds duplicate code --- src/H5Dvirtual.c | 261 +----------------------- src/H5Fint.c | 261 +++++++++++++++++++++++- src/H5Fprivate.h | 4 + src/H5Lexternal.c | 306 +++++----------------------- tools/test/h5dump/errfiles/tall-1.err | 5 +- tools/test/h5dump/errfiles/tall-2A.err | 5 +- tools/test/h5dump/errfiles/tall-2A0.err | 5 +- tools/test/h5dump/errfiles/tall-2B.err | 5 +- tools/test/h5dump/errfiles/textlink.err | 10 +- tools/test/h5dump/errfiles/torderlinks1.err | 5 +- tools/test/h5dump/errfiles/torderlinks2.err | 5 +- 11 files changed, 349 insertions(+), 523 deletions(-) diff --git a/src/H5Dvirtual.c b/src/H5Dvirtual.c index 306fe62..96344ad 100644 --- a/src/H5Dvirtual.c +++ b/src/H5Dvirtual.c @@ -733,255 +733,6 @@ done: } /* end H5D__virtual_delete */ -/*-------------------------------------------------------------------------- - * Function: H5D__virtual_build_name - * - * Purpose: Prepend PREFIX to FILE_NAME and store in FULL_NAME - * - * Return: Non-negative on success/Negative on failure - *--------------------------------------------------------------------------*/ -static herr_t -H5D__virtual_build_name(char *prefix, char *file_name, char **full_name/*out*/) -{ - size_t prefix_len; /* length of prefix */ - size_t fname_len; /* Length of external link file name */ - herr_t ret_value = SUCCEED; /* Return value */ - - FUNC_ENTER_NOAPI_NOINIT - - prefix_len = HDstrlen(prefix); - fname_len = HDstrlen(file_name); - - /* Allocate a buffer to hold the filename + prefix + possibly the delimiter + terminating null byte */ - if(NULL == (*full_name = (char *)H5MM_malloc(prefix_len + fname_len + 2))) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "unable to allocate filename buffer") - - /* Compose the full file name */ - HDsnprintf(*full_name, (prefix_len + fname_len + 2), "%s%s%s", prefix, - (H5_CHECK_DELIMITER(prefix[prefix_len - 1]) ? "" : H5_DIR_SEPS), file_name); - -done: - FUNC_LEAVE_NOAPI(ret_value) -} /* H5D__virtual_build_name() */ - - -/*-------------------------------------------------------------------------- - * Function: H5D_getenv_prefix_name -- - * - * Purpose: Get the first pathname in the list of pathnames stored in env_prefix, - * which is separated by the environment delimiter. - * env_prefix is modified to point to the remaining pathnames - * in the list. - * - * Return: A pointer to a pathname ---------------------------------------------------------------------------*/ -static char * -H5D_getenv_prefix_name(char **env_prefix/*in,out*/) -{ - char *retptr=NULL; - char *strret=NULL; - - FUNC_ENTER_NOAPI_NOINIT_NOERR - - strret = HDstrchr(*env_prefix, H5_COLON_SEPC); - if (strret == NULL) { - retptr = *env_prefix; - *env_prefix = strret; - } else { - retptr = *env_prefix; - *env_prefix = strret + 1; - *strret = '\0'; - } - - FUNC_LEAVE_NOAPI(retptr) -} /* end H5D_getenv_prefix_name() */ - -/*------------------------------------------------------------------------- - * Function: H5D__virtual_open_file - * - * Purpose: Attempts to open a source dataset file. - * - * Return: Non-negative on success/Negative on failure - *------------------------------------------------------------------------- - */ -static H5F_t * -H5D__virtual_open_file(hid_t plist_id, const H5F_t *vdset_file, - const char *file_name, - hid_t fapl_id, hid_t dxpl_id) -{ - H5F_t *src_file = NULL; /* Source file */ - H5F_t *ret_value = NULL; /* Actual return value */ - char *full_name = NULL; /* File name with prefix */ - char *my_prefix = NULL; /* Library's copy of the prefix */ - unsigned intent; /* File access permissions */ - char *actual_file_name = NULL; /* Virtual file's actual name */ - char *temp_file_name = NULL; /* Temporary pointer to file name */ - size_t temp_file_name_len; /* Length of temporary file name */ - - FUNC_ENTER_STATIC - - /* Simplify intent flags for open calls */ - intent = H5F_INTENT(vdset_file); - intent &= (H5F_ACC_RDWR | H5F_ACC_SWMR_WRITE | H5F_ACC_SWMR_READ); - - /* Copy the file name to use */ - if(NULL == (temp_file_name = H5MM_strdup(file_name))) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed") - temp_file_name_len = HDstrlen(temp_file_name); - - /* target file_name is an absolute pathname: see RM for detailed description */ - if(H5_CHECK_ABSOLUTE(file_name) || H5_CHECK_ABS_PATH(file_name)) { - /* Try opening file */ - if(NULL == (src_file = H5F_open(file_name, intent, H5P_FILE_CREATE_DEFAULT, fapl_id, dxpl_id))) { - char *ptr; - - H5E_clear_stack(NULL); - - /* get last component of file_name */ - H5_GET_LAST_DELIMITER(file_name, ptr) - HDassert(ptr); - - /* Increment past delimiter */ - ptr++; - - /* Copy into the temp. file name */ - HDstrncpy(temp_file_name, ptr, temp_file_name_len); - temp_file_name[temp_file_name_len - 1] = '\0'; - } /* end if */ - } /* end if */ - else if(H5_CHECK_ABS_DRIVE(file_name)) { - /* Try opening file */ - if(NULL == (src_file = H5F_open(file_name, intent, H5P_FILE_CREATE_DEFAULT, fapl_id, dxpl_id))) { - - H5E_clear_stack(NULL); - - /* strip ":" */ - HDstrncpy(temp_file_name, &file_name[2], temp_file_name_len); - temp_file_name[temp_file_name_len - 1] = '\0'; - } /* end if */ - } /* end if */ - - /* try searching from paths set in the environment variable */ - if(src_file == NULL) { - char *env_prefix; - - if(NULL != (env_prefix = HDgetenv("HDF5_VDS_PREFIX"))) { - char *tmp_env_prefix, *saved_env; - - if(NULL == (saved_env = tmp_env_prefix = H5MM_strdup(env_prefix))) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed") - - while((tmp_env_prefix) && (*tmp_env_prefix)) { - char *out_prefix_name; - - out_prefix_name = H5D_getenv_prefix_name(&tmp_env_prefix/*in,out*/); - if(out_prefix_name && (*out_prefix_name)) { - if(H5D__virtual_build_name(out_prefix_name, temp_file_name, &full_name/*out*/) < 0) { - saved_env = (char *)H5MM_xfree(saved_env); - HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, NULL, "can't prepend prefix to filename") - } /* end if */ - - src_file = H5F_open(full_name, intent, H5P_FILE_CREATE_DEFAULT, fapl_id, dxpl_id); - full_name = (char *)H5MM_xfree(full_name); - if(src_file != NULL) - break; - H5E_clear_stack(NULL); - } /* end if */ - } /* end while */ - saved_env = (char *)H5MM_xfree(saved_env); - } /* end if */ - } /* end if */ - - /* try searching from property list */ - if(src_file == NULL) { - size_t size = 0; - H5E_BEGIN_TRY { - size = H5Pget_virtual_prefix(plist_id, NULL, 0); - } H5E_END_TRY; - if(size <= 0) - my_prefix = NULL; - else { - /* Allocate a buffer to hold the filename + prefix + possibly the delimiter + terminating null byte */ - if(NULL == (my_prefix = (char *)H5MM_malloc(size + 1))) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "unable to allocate prefix buffer") - if(H5Pget_virtual_prefix(plist_id, my_prefix, size+1) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, NULL, "can't get vds prefix") - if(my_prefix) { - if(H5D__virtual_build_name(my_prefix, temp_file_name, &full_name/*out*/) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, NULL, "can't prepend prefix to filename") - my_prefix = (char *)H5MM_xfree(my_prefix); - if(NULL == (src_file = H5F_open(full_name, intent, H5P_FILE_CREATE_DEFAULT, fapl_id, dxpl_id))) - H5E_clear_stack(NULL); - full_name = (char *)H5MM_xfree(full_name); - } - } /* end if */ - } /* end if */ - - /* try searching from main file's "extpath": see description in H5F_open() & H5_build_extpath() */ - if(src_file == NULL) { - char *vdspath; - - if(NULL != (vdspath = H5F_EXTPATH(vdset_file))) { - if(H5D__virtual_build_name(vdspath, temp_file_name, &full_name/*out*/) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, NULL, "can't prepend prefix to filename") - if(NULL == (src_file = H5F_open(full_name, intent, H5P_FILE_CREATE_DEFAULT, fapl_id, dxpl_id))) - H5E_clear_stack(NULL); - full_name = (char *)H5MM_xfree(full_name); - } /* end if */ - } /* end if */ - - /* try the relative file_name stored in temp_file_name */ - if(src_file == NULL) { - if(NULL == (src_file = H5F_open(temp_file_name, intent, H5P_FILE_CREATE_DEFAULT, fapl_id, dxpl_id))) - H5E_clear_stack(NULL); - } /* end if */ - - /* try the 'resolved' name for the virtual file */ - if(src_file == NULL) { - char *ptr = NULL; - - /* Copy resolved file name */ - if(NULL == (actual_file_name = H5MM_strdup(H5F_ACTUAL_NAME(vdset_file)))) - HGOTO_ERROR(H5E_DATASET, H5E_CANTALLOC, NULL, "can't duplicate resolved file name string") - - /* get last component of file_name */ - H5_GET_LAST_DELIMITER(actual_file_name, ptr) - if(!ptr) - HGOTO_ERROR(H5E_DATASET, H5E_CANTOPENFILE, NULL, "unable to open vds file, vds file name = '%s', temp_file_name = '%s'", file_name, temp_file_name) - - /* Truncate filename portion from actual file name path */ - *ptr = '\0'; - - /* Build new file name for the external file */ - if(H5D__virtual_build_name(actual_file_name, temp_file_name, &full_name/*out*/) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, NULL, "can't prepend prefix to filename") - actual_file_name = (char *)H5MM_xfree(actual_file_name); - - /* Try opening with the resolved name */ - if(NULL == (src_file = H5F_open(full_name, intent, H5P_FILE_CREATE_DEFAULT, fapl_id, dxpl_id))) - HGOTO_ERROR(H5E_DATASET, H5E_CANTOPENFILE, NULL, "unable to open vds file, vds file name = '%s', temp_file_name = '%s'", file_name, temp_file_name) - full_name = (char *)H5MM_xfree(full_name); - } /* end if */ - - /* Success */ - ret_value = src_file; -done: - if((NULL == ret_value) && src_file) - if(H5F_try_close(src_file, NULL) < 0) - HDONE_ERROR(H5E_DATASET, H5E_CANTCLOSEFILE, NULL, "can't close source file") - if(my_prefix) - my_prefix = (char *)H5MM_xfree(my_prefix); - if(full_name) - full_name = (char *)H5MM_xfree(full_name); - if(temp_file_name) - temp_file_name = (char *)H5MM_xfree(temp_file_name); - if(actual_file_name) - actual_file_name = (char *)H5MM_xfree(actual_file_name); - - FUNC_LEAVE_NOAPI(ret_value) -} /* H5D__virtual_open_file() */ - - /*------------------------------------------------------------------------- * Function: H5D__virtual_open_source_dset * @@ -1000,13 +751,11 @@ H5D__virtual_open_source_dset(const H5D_t *vdset, H5O_storage_virtual_srcdset_t *source_dset, hid_t dxpl_id) { H5F_t *src_file = NULL; /* Source file */ - char *vds_prefix = NULL; /* Source file vds_prefix */ hbool_t src_file_open = FALSE; /* Whether we have opened and need to close src_file */ H5G_loc_t src_root_loc; /* Object location of source file root group */ herr_t ret_value = SUCCEED; /* Return value */ - char *full_name = NULL; /* File name with prefix */ - unsigned intent; /* File access permissions */ hid_t plist_id = -1; /* Property list pointer */ + unsigned intent; /* File access permissions */ FUNC_ENTER_STATIC @@ -1019,9 +768,11 @@ H5D__virtual_open_source_dset(const H5D_t *vdset, /* Check if we need to open the source file */ if(HDstrcmp(source_dset->file_name, ".")) { - if((plist_id = H5D_get_access_plist(vdset)) < 0) + if((plist_id = H5D_get_access_plist((H5D_t *)vdset)) < 0) HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "Can't get access plist") - if(NULL == (src_file = H5D__virtual_open_file(plist_id, vdset->oloc.file, source_dset->file_name, vdset->shared->layout.storage.u.virt.source_fapl, dxpl_id))) + intent = H5F_INTENT(vdset->oloc.file); + if(NULL == (src_file = H5F_prefix_open_file(plist_id, vdset->oloc.file, H5D_ACS_VDS_PREFIX_NAME, source_dset->file_name, intent, + vdset->shared->layout.storage.u.virt.source_fapl, dxpl_id))) H5E_clear_stack(NULL); /* Quick hack until proper support for H5Fopen with missing file is implemented */ else src_file_open = TRUE; @@ -1062,7 +813,7 @@ done: H5Pclose(plist_id); /* Close source file */ if(src_file_open) - if(H5F_try_close(src_file, NULL) < 0) + if(H5F_efc_close(vdset->oloc.file, src_file) < 0) HDONE_ERROR(H5E_DATASET, H5E_CANTCLOSEFILE, FAIL, "can't close source file") FUNC_LEAVE_NOAPI(ret_value) diff --git a/src/H5Fint.c b/src/H5Fint.c index 65b8afb..1bca748 100644 --- a/src/H5Fint.c +++ b/src/H5Fint.c @@ -30,6 +30,7 @@ #include "H5FDprivate.h" /* File drivers */ #include "H5Gprivate.h" /* Groups */ #include "H5Iprivate.h" /* IDs */ +#include "H5Lprivate.h" /* Links */ #include "H5MFprivate.h" /* File memory management */ #include "H5MMprivate.h" /* Memory management */ #include "H5Pprivate.h" /* Property lists */ @@ -479,7 +480,265 @@ done: FUNC_LEAVE_NOAPI(ret_value) } /* end H5F_get_objects_cb() */ - +/*-------------------------------------------------------------------------- + * Function: H5F__build_name + * + * Purpose: Prepend PREFIX to FILE_NAME and store in FULL_NAME + * + * Return: Non-negative on success/Negative on failure + *--------------------------------------------------------------------------*/ +static herr_t +H5F__build_name(char *prefix, char *file_name, char **full_name/*out*/) +{ + size_t prefix_len; /* length of prefix */ + size_t fname_len; /* Length of external link file name */ + herr_t ret_value = SUCCEED; /* Return value */ + + FUNC_ENTER_STATIC + + prefix_len = HDstrlen(prefix); + fname_len = HDstrlen(file_name); + + /* Allocate a buffer to hold the filename + prefix + possibly the delimiter + terminating null byte */ + if(NULL == (*full_name = (char *)H5MM_malloc(prefix_len + fname_len + 2))) + HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "unable to allocate filename buffer") + + /* Compose the full file name */ + HDsnprintf(*full_name, (prefix_len + fname_len + 2), "%s%s%s", prefix, + (H5_CHECK_DELIMITER(prefix[prefix_len - 1]) ? "" : H5_DIR_SEPS), file_name); + +done: + FUNC_LEAVE_NOAPI(ret_value) +} /* H5F__build_name() */ + + +/*-------------------------------------------------------------------------- + * Function: H5F__getenv_prefix_name -- + * + * Purpose: Get the first pathname in the list of pathnames stored in env_prefix, + * which is separated by the environment delimiter. + * env_prefix is modified to point to the remaining pathnames + * in the list. + * + * Return: A pointer to a pathname +--------------------------------------------------------------------------*/ +static char * +H5F__getenv_prefix_name(char **env_prefix/*in,out*/) +{ + char *retptr=NULL; + char *strret=NULL; + + FUNC_ENTER_STATIC + + strret = HDstrchr(*env_prefix, H5_COLON_SEPC); + if (strret == NULL) { + retptr = *env_prefix; + *env_prefix = strret; + } else { + retptr = *env_prefix; + *env_prefix = strret + 1; + *strret = '\0'; + } + + FUNC_LEAVE_NOAPI(retptr) +} /* end H5F__getenv_prefix_name() */ + +/*------------------------------------------------------------------------- + * Function: H5F_prefix_open_file + * + * Purpose: Attempts to open a dataset file. + * + * Return: Non-negative on success/Negative on failure + *------------------------------------------------------------------------- + */ +H5F_t * +H5F_prefix_open_file(hid_t plist_id, H5F_t *primary_file, const char *prefix_type, + const char *file_name, unsigned file_intent, hid_t fapl_id, hid_t dxpl_id) +{ + H5F_t *src_file = NULL; /* Source file */ + H5F_t *ret_value = NULL; /* Actual return value */ + char *full_name = NULL; /* File name with prefix */ + char *my_prefix = NULL; /* Library's copy of the prefix */ + char *actual_file_name = NULL; /* File's actual name */ + char *temp_file_name = NULL; /* Temporary pointer to file name */ + size_t temp_file_name_len; /* Length of temporary file name */ + + FUNC_ENTER_NOAPI_NOINIT + + /* Simplify intent flags for open calls */ + file_intent &= (H5F_ACC_RDWR | H5F_ACC_SWMR_WRITE | H5F_ACC_SWMR_READ); + + /* Copy the file name to use */ + if(NULL == (temp_file_name = H5MM_strdup(file_name))) + HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed") + temp_file_name_len = HDstrlen(temp_file_name); + + /* target file_name is an absolute pathname: see RM for detailed description */ + if(H5_CHECK_ABSOLUTE(file_name) || H5_CHECK_ABS_PATH(file_name)) { + /* Try opening file */ + if(NULL == (src_file = H5F_efc_open(primary_file, file_name, file_intent, H5P_FILE_CREATE_DEFAULT, fapl_id, dxpl_id))) { + char *ptr; + + H5E_clear_stack(NULL); + + /* get last component of file_name */ + H5_GET_LAST_DELIMITER(file_name, ptr) + HDassert(ptr); + + /* Increment past delimiter */ + ptr++; + + /* Copy into the temp. file name */ + HDstrncpy(temp_file_name, ptr, temp_file_name_len); + temp_file_name[temp_file_name_len - 1] = '\0'; + } /* end if */ + } /* end if */ + else if(H5_CHECK_ABS_DRIVE(file_name)) { + /* Try opening file */ + if(NULL == (src_file = H5F_efc_open(primary_file, file_name, file_intent, H5P_FILE_CREATE_DEFAULT, fapl_id, dxpl_id))) { + + H5E_clear_stack(NULL); + + /* strip ":" */ + HDstrncpy(temp_file_name, &file_name[2], temp_file_name_len); + temp_file_name[temp_file_name_len - 1] = '\0'; + } /* end if */ + } /* end if */ + + /* try searching from paths set in the environment variable */ + if(src_file == NULL) { + char *env_prefix; + + if (HDstrcmp(prefix_type, H5D_ACS_VDS_PREFIX_NAME) == 0) + env_prefix = HDgetenv("HDF5_VDS_PREFIX"); + else if (HDstrcmp(prefix_type, H5L_ACS_ELINK_PREFIX_NAME) == 0) + env_prefix = HDgetenv("HDF5_EXT_PREFIX"); + else + HGOTO_ERROR(H5E_PLIST, H5E_BADTYPE, NULL, "prefix name is not sensible") + if(NULL != env_prefix) { + char *tmp_env_prefix, *saved_env; + + if(NULL == (saved_env = tmp_env_prefix = H5MM_strdup(env_prefix))) + HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed") + + while((tmp_env_prefix) && (*tmp_env_prefix)) { + char *out_prefix_name; + + out_prefix_name = H5F__getenv_prefix_name(&tmp_env_prefix/*in,out*/); + if(out_prefix_name && (*out_prefix_name)) { + if(H5F__build_name(out_prefix_name, temp_file_name, &full_name/*out*/) < 0) { + saved_env = (char *)H5MM_xfree(saved_env); + HGOTO_ERROR(H5E_FILE, H5E_CANTGET, NULL, "can't prepend prefix to filename") + } /* end if */ + + src_file = H5F_efc_open(primary_file, full_name, file_intent, H5P_FILE_CREATE_DEFAULT, fapl_id, dxpl_id); + full_name = (char *)H5MM_xfree(full_name); + if(src_file != NULL) + break; + H5E_clear_stack(NULL); + } /* end if */ + } /* end while */ + saved_env = (char *)H5MM_xfree(saved_env); + } /* end if */ + } /* end if */ + + /* try searching from property list */ + if(src_file == NULL) { + ssize_t size = 0; + H5E_BEGIN_TRY { + if (HDstrcmp(prefix_type, H5D_ACS_VDS_PREFIX_NAME) == 0) + size = H5Pget_virtual_prefix(plist_id, NULL, 0); + else if (HDstrcmp(prefix_type, H5L_ACS_ELINK_PREFIX_NAME) == 0) + size = H5Pget_elink_prefix(plist_id, NULL, 0); + } H5E_END_TRY; + if(size <= 0) + my_prefix = NULL; + else { + /* Allocate a buffer to hold the filename + prefix + possibly the delimiter + terminating null byte */ + if(NULL == (my_prefix = (char *)H5MM_malloc((size_t)size + 1))) + HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "unable to allocate prefix buffer") + if (HDstrcmp(prefix_type, H5D_ACS_VDS_PREFIX_NAME) == 0) + size = H5Pget_virtual_prefix(plist_id, my_prefix, (size_t)size+1); + else if (HDstrcmp(prefix_type, H5L_ACS_ELINK_PREFIX_NAME) == 0) + size = H5Pget_elink_prefix(plist_id, my_prefix, (size_t)size+1); + if(size < 0) + HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, NULL, "can't get file prefix") + if(my_prefix) { + if(H5F__build_name(my_prefix, temp_file_name, &full_name/*out*/) < 0) + HGOTO_ERROR(H5E_FILE, H5E_CANTGET, NULL, "can't prepend prefix to filename") + my_prefix = (char *)H5MM_xfree(my_prefix); + if(NULL == (src_file = H5F_efc_open(primary_file, full_name, file_intent, H5P_FILE_CREATE_DEFAULT, fapl_id, dxpl_id))) + H5E_clear_stack(NULL); + full_name = (char *)H5MM_xfree(full_name); + } + } + } + + /* try searching from main file's "extpath": see description in H5F_open() & H5_build_extpath() */ + if(src_file == NULL) { + char *dspath; + + if(NULL != (dspath = H5F_EXTPATH(primary_file))) { + if(H5F__build_name(dspath, temp_file_name, &full_name/*out*/) < 0) + HGOTO_ERROR(H5E_FILE, H5E_CANTGET, NULL, "can't prepend prefix to filename") + if(NULL == (src_file = H5F_efc_open(primary_file, full_name, file_intent, H5P_FILE_CREATE_DEFAULT, fapl_id, dxpl_id))) + H5E_clear_stack(NULL); + full_name = (char *)H5MM_xfree(full_name); + } /* end if */ + } /* end if */ + + /* try the relative file_name stored in temp_file_name */ + if(src_file == NULL) { + if(NULL == (src_file = H5F_efc_open(primary_file, temp_file_name, file_intent, H5P_FILE_CREATE_DEFAULT, fapl_id, dxpl_id))) + H5E_clear_stack(NULL); + } /* end if */ + + /* try the 'resolved' name for the virtual file */ + if(src_file == NULL) { + char *ptr = NULL; + + /* Copy resolved file name */ + if(NULL == (actual_file_name = H5MM_strdup(H5F_ACTUAL_NAME(primary_file)))) + HGOTO_ERROR(H5E_FILE, H5E_CANTALLOC, NULL, "can't duplicate resolved file name string") + + /* get last component of file_name */ + H5_GET_LAST_DELIMITER(actual_file_name, ptr) + if(!ptr) + HGOTO_ERROR(H5E_FILE, H5E_CANTOPENFILE, NULL, "unable to open file, file name = '%s', temp_file_name = '%s'", file_name, temp_file_name) + + /* Truncate filename portion from actual file name path */ + *ptr = '\0'; + + /* Build new file name for the external file */ + if(H5F__build_name(actual_file_name, temp_file_name, &full_name/*out*/) < 0) + HGOTO_ERROR(H5E_FILE, H5E_CANTGET, NULL, "can't prepend prefix to filename") + actual_file_name = (char *)H5MM_xfree(actual_file_name); + + /* Try opening with the resolved name */ + if(NULL == (src_file = H5F_efc_open(primary_file, full_name, file_intent, H5P_FILE_CREATE_DEFAULT, fapl_id, dxpl_id))) + HGOTO_ERROR(H5E_FILE, H5E_CANTOPENFILE, NULL, "unable to open file, file name = '%s', temp_file_name = '%s'", file_name, temp_file_name) + full_name = (char *)H5MM_xfree(full_name); + } /* end if */ + + /* Success */ + ret_value = src_file; +done: + if((NULL == ret_value) && src_file) + if(H5F_efc_close(primary_file, src_file) < 0) + HDONE_ERROR(H5E_FILE, H5E_CANTCLOSEFILE, NULL, "can't close source file") + if(my_prefix) + my_prefix = (char *)H5MM_xfree(my_prefix); + if(full_name) + full_name = (char *)H5MM_xfree(full_name); + if(temp_file_name) + temp_file_name = (char *)H5MM_xfree(temp_file_name); + if(actual_file_name) + actual_file_name = (char *)H5MM_xfree(actual_file_name); + + FUNC_LEAVE_NOAPI(ret_value) +} /* H5F_prefix_open_file() */ + + /*------------------------------------------------------------------------- * Function: H5F__is_hdf5 * diff --git a/src/H5Fprivate.h b/src/H5Fprivate.h index 1bcadef..2410a83 100644 --- a/src/H5Fprivate.h +++ b/src/H5Fprivate.h @@ -866,6 +866,10 @@ H5_DLL H5F_t *H5F_efc_open(H5F_t *parent, const char *name, unsigned flags, hid_t fcpl_id, hid_t fapl_id, hid_t dxpl_id); H5_DLL herr_t H5F_efc_close(H5F_t *parent, H5F_t *file); +/* File prefix routines */ +H5_DLL H5F_t *H5F_prefix_open_file(hid_t plist_id, H5F_t *primary_file, const char *prefix_type, + const char *file_name, unsigned file_intent, hid_t fapl_id, hid_t dxpl_id); + /* Global heap CWFS routines */ H5_DLL herr_t H5F_cwfs_add(H5F_t *f, struct H5HG_heap_t *heap); H5_DLL herr_t H5F_cwfs_find_free_heap(H5F_t *f, hid_t dxpl_id, size_t need, haddr_t *addr); diff --git a/src/H5Lexternal.c b/src/H5Lexternal.c index b4a173f..bf0a044 100644 --- a/src/H5Lexternal.c +++ b/src/H5Lexternal.c @@ -15,7 +15,7 @@ /* Module Setup */ /****************/ -#define H5G_FRIEND /*suppress error about including H5Gpkg */ +#define H5G_FRIEND /*suppress error about including H5Gpkg */ #include "H5Lmodule.h" /* This source code file is part of the H5L module */ @@ -25,8 +25,9 @@ #include "H5private.h" /* Generic Functions */ #include "H5ACprivate.h" /* Metadata cache */ #include "H5Eprivate.h" /* Error handling */ +#include "H5Fprivate.h" /* Files */ #include "H5Gpkg.h" /* Groups */ -#include "H5Iprivate.h" /* IDs */ +#include "H5Iprivate.h" /* IDs */ #include "H5Lpkg.h" /* Links */ #include "H5MMprivate.h" /* Memory management */ #include "H5Opublic.h" /* File objects */ @@ -79,7 +80,7 @@ static ssize_t H5L_extern_query(const char H5_ATTR_UNUSED * link_name, const voi /* Default External Link link class */ static const H5L_class_t H5L_EXTERN_LINK_CLASS[1] = {{ H5L_LINK_CLASS_T_VERS, /* H5L_class_t version */ - H5L_TYPE_EXTERNAL, /* Link type id number */ + H5L_TYPE_EXTERNAL, /* Link type id number */ "external", /* Link name for debugging */ NULL, /* Creation callback */ NULL, /* Move callback */ @@ -89,82 +90,10 @@ static const H5L_class_t H5L_EXTERN_LINK_CLASS[1] = {{ H5L_extern_query /* Query callback */ }}; - - -/*-------------------------------------------------------------------------- - * Function: H5L_getenv_prefix_name -- - * - * Purpose: Get the first pathname in the list of pathnames stored in ENV_PREFIX, - * which is separated by the environment delimiter. - * ENV_PREFIX is modified to point to the remaining pathnames - * in the list. - * - * Return: A pointer to a pathname - * - * Programmer: Vailin Choi, April 2, 2008 - * ---------------------------------------------------------------------------*/ -static char * -H5L_getenv_prefix_name(char **env_prefix/*in,out*/) -{ - char *retptr=NULL; - char *strret=NULL; - - FUNC_ENTER_NOAPI_NOINIT_NOERR - - strret = HDstrchr(*env_prefix, H5_COLON_SEPC); - if (strret == NULL) { - retptr = *env_prefix; - *env_prefix = strret; - } else { - retptr = *env_prefix; - *env_prefix = strret + 1; - *strret = '\0'; - } - - FUNC_LEAVE_NOAPI(retptr) -} /* end H5L_getenv_prefix_name() */ - - -/*-------------------------------------------------------------------------- - * Function: H5L_build_name - * - * Purpose: Prepend PREFIX to FILE_NAME and store in FULL_NAME - * - * Return: Non-negative on success/Negative on failure - * - * Programmer: Vailin Choi, April 2, 2008 - * ---------------------------------------------------------------------------*/ -static herr_t -H5L_build_name(char *prefix, char *file_name, char **full_name/*out*/) -{ - size_t prefix_len; /* length of prefix */ - size_t fname_len; /* Length of external link file name */ - herr_t ret_value = SUCCEED; /* Return value */ - - FUNC_ENTER_NOAPI_NOINIT - - prefix_len = HDstrlen(prefix); - fname_len = HDstrlen(file_name); - - /* Allocate a buffer to hold the filename + prefix + possibly the delimiter + terminating null byte */ - if(NULL == (*full_name = (char *)H5MM_malloc(prefix_len + fname_len + 2))) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "unable to allocate filename buffer") - - /* Compose the full file name */ - HDsnprintf(*full_name, (prefix_len + fname_len + 2), "%s%s%s", prefix, - (H5_CHECK_DELIMITER(prefix[prefix_len - 1]) ? "" : H5_DIR_SEPS), file_name); - -done: - FUNC_LEAVE_NOAPI(ret_value) -} /* H5L_build_name() */ - - /*------------------------------------------------------------------------- - * Function: H5L_extern_traverse + * Function: H5L_extern_traverse * - * Purpose: Default traversal function for external links. This can + * Purpose: Default traversal function for external links. This can * be overridden using H5Lregister(). * * Given a filename and path packed into the link udata, @@ -173,25 +102,25 @@ done: * link access property list, appends that prefix to the * filename being opened. * - * Return: ID of the opened object on success/Negative on failure + * Return: ID of the opened object on success/Negative on failure * - * Programmer: James Laird + * Programmer: James Laird * Monday, July 10, 2006 * Modifications: - * Vailin Choi, April 2, 2008 - * Add handling to search for the target file - * See description in RM: H5Lcreate_external + * Vailin Choi, April 2, 2008 + * Add handling to search for the target file + * See description in RM: H5Lcreate_external * - * Vailin Choi; Sept. 12th, 2008; bug #1247 - * Retrieve the file access property list identifer that is set - * for link access property via H5Pget_elink_fapl(). - * If the return value is H5P_DEFAULT, the parent's file access - * property is used to H5F_open() the target file; - * Otherwise, the file access property retrieved from H5Pget_elink_fapl() - * is used to H5F_open() the target file. + * Vailin Choi; Sept. 12th, 2008; bug #1247 + * Retrieve the file access property list identifer that is set + * for link access property via H5Pget_elink_fapl(). + * If the return value is H5P_DEFAULT, the parent's file access + * property is used to H5F_open() the target file; + * Otherwise, the file access property retrieved from H5Pget_elink_fapl() + * is used to H5F_open() the target file. * - * Vailin Choi; Nov 2010 - * Free memory pointed to by tmp_env_prefix for HDF5_EXT_PREFIX case. + * Vailin Choi; Nov 2010 + * Free memory pointed to by tmp_env_prefix for HDF5_EXT_PREFIX case. * *------------------------------------------------------------------------- */ @@ -200,13 +129,11 @@ H5L_extern_traverse(const char H5_ATTR_UNUSED *link_name, hid_t cur_group, const void *_udata, size_t H5_ATTR_UNUSED udata_size, hid_t lapl_id) { H5P_genplist_t *plist; /* Property list pointer */ - char *my_prefix; /* Library's copy of the prefix */ H5G_loc_t root_loc; /* Location of root group in external file */ H5G_loc_t loc; /* Location of object */ - H5F_t *ext_file = NULL; /* File struct for external file */ + H5F_t *ext_file = NULL; /* File struct for external file */ const uint8_t *p = (const uint8_t *)_udata; /* Pointer into external link buffer */ const char *file_name; /* Name of file containing external link's object */ - char *full_name = NULL; /* File name with prefix */ const char *obj_name; /* Name external link's object */ size_t fname_len; /* Length of external link file name */ unsigned intent; /* File access permissions */ @@ -215,11 +142,8 @@ H5L_extern_traverse(const char H5_ATTR_UNUSED *link_name, hid_t cur_group, hid_t ext_obj = -1; /* ID for external link's object */ char *parent_group_name = NULL;/* Temporary pointer to group name */ char local_group_name[H5L_EXT_TRAVERSE_BUF_SIZE]; /* Local buffer to hold group name */ - char *temp_file_name = NULL; /* Temporary pointer to file name */ - size_t temp_file_name_len; /* Length of temporary file name */ - char *actual_file_name = NULL; /* Parent file's actual name */ H5P_genplist_t *fa_plist; /* File access property list pointer */ - H5F_close_degree_t fc_degree = H5F_CLOSE_WEAK; /* File close degree for target file */ + H5F_close_degree_t fc_degree = H5F_CLOSE_WEAK; /* File close degree for target file */ hid_t dxpl_id = H5AC_ind_read_dxpl_id; /* dxpl used by library */ hid_t ret_value = H5I_INVALID_HID; /* Return value */ @@ -266,7 +190,7 @@ H5L_extern_traverse(const char H5_ATTR_UNUSED *link_name, hid_t cur_group, intent = H5F_INTENT(loc.oloc->file); if((fapl_id == H5P_DEFAULT) && ((fapl_id = H5F_get_access_plist(loc.oloc->file, FALSE)) < 0)) - HGOTO_ERROR(H5E_LINK, H5E_CANTGET, FAIL, "can't get parent's file access property list") + HGOTO_ERROR(H5E_LINK, H5E_CANTGET, FAIL, "can't get parent's file access property list") /* Get callback_info */ if(H5P_get(plist, H5L_ACS_ELINK_CB_NAME, &cb_info) < 0) @@ -274,7 +198,7 @@ H5L_extern_traverse(const char H5_ATTR_UNUSED *link_name, hid_t cur_group, /* Get file access property list */ if(NULL == (fa_plist = H5P_object_verify(fapl_id, H5P_FILE_ACCESS))) - HGOTO_ERROR(H5E_ATOM, H5E_BADATOM, FAIL, "can't find object for ID") + HGOTO_ERROR(H5E_ATOM, H5E_BADATOM, FAIL, "can't find object for ID") /* Make callback if it exists */ if(cb_info.func) { @@ -314,143 +238,11 @@ H5L_extern_traverse(const char H5_ATTR_UNUSED *link_name, hid_t cur_group, /* Set file close degree for new file to "weak" */ if(H5P_set(fa_plist, H5F_ACS_CLOSE_DEGREE_NAME, &fc_degree) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "can't set file close degree") - - /* - * Start searching for the target file - */ - - /* Simplify intent flags for open calls */ - intent &= (H5F_ACC_RDWR | H5F_ACC_SWMR_WRITE | H5F_ACC_SWMR_READ); - - /* Copy the file name to use */ - if(NULL == (temp_file_name = H5MM_strdup(file_name))) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed") - temp_file_name_len = HDstrlen(temp_file_name); - - /* target file_name is an absolute pathname: see RM for detailed description */ - if(H5_CHECK_ABSOLUTE(file_name) || H5_CHECK_ABS_PATH(file_name)) { - /* Try opening file */ - if(NULL == (ext_file = H5F_efc_open(loc.oloc->file, file_name, intent, H5P_FILE_CREATE_DEFAULT, fapl_id, dxpl_id))) { - char *ptr; - - H5E_clear_stack(NULL); - - /* get last component of file_name */ - H5_GET_LAST_DELIMITER(file_name, ptr) - HDassert(ptr); - - /* Increment past delimiter */ - ptr++; - - /* Copy into the temp. file name */ - HDstrncpy(temp_file_name, ptr, temp_file_name_len); - temp_file_name[temp_file_name_len - 1] = '\0'; - } /* end if */ - } /* end if */ - else if(H5_CHECK_ABS_DRIVE(file_name)) { - /* Try opening file */ - if(NULL == (ext_file = H5F_efc_open(loc.oloc->file, file_name, intent, H5P_FILE_CREATE_DEFAULT, fapl_id, dxpl_id))) { - - H5E_clear_stack(NULL); - - /* strip ":" */ - HDstrncpy(temp_file_name, &file_name[2], temp_file_name_len); - temp_file_name[temp_file_name_len - 1] = '\0'; - } /* end if */ - } /* end if */ - - /* try searching from paths set in the environment variable */ - if(ext_file == NULL) { - char *env_prefix; - - if(NULL != (env_prefix = HDgetenv("HDF5_EXT_PREFIX"))) { - char *tmp_env_prefix, *saved_env; - - if(NULL == (saved_env = tmp_env_prefix = H5MM_strdup(env_prefix))) - HGOTO_ERROR(H5E_LINK, H5E_NOSPACE, FAIL, "memory allocation failed") - - while((tmp_env_prefix) && (*tmp_env_prefix)) { - char *out_prefix_name; - - out_prefix_name = H5L_getenv_prefix_name(&tmp_env_prefix/*in,out*/); - if(out_prefix_name && (*out_prefix_name)) { - if(H5L_build_name(out_prefix_name, temp_file_name, &full_name/*out*/) < 0) { - saved_env = (char *)H5MM_xfree(saved_env); - HGOTO_ERROR(H5E_LINK, H5E_CANTGET, FAIL, "can't prepend prefix to filename") - } /* end if */ - - ext_file = H5F_efc_open(loc.oloc->file, full_name, intent, H5P_FILE_CREATE_DEFAULT, fapl_id, dxpl_id); - full_name = (char *)H5MM_xfree(full_name); - if(ext_file != NULL) - break; - H5E_clear_stack(NULL); - } /* end if */ - } /* end while */ - saved_env = (char *)H5MM_xfree(saved_env); - } /* end if */ - } /* end if */ - - /* try searching from property list */ - if(ext_file == NULL) { - if(H5P_peek(plist, H5L_ACS_ELINK_PREFIX_NAME, &my_prefix) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get external link prefix") - if(my_prefix) { - if(H5L_build_name(my_prefix, temp_file_name, &full_name/*out*/) < 0) - HGOTO_ERROR(H5E_LINK, H5E_CANTGET, FAIL, "can't prepend prefix to filename") - if(NULL == (ext_file = H5F_efc_open(loc.oloc->file, full_name, intent, H5P_FILE_CREATE_DEFAULT, fapl_id, dxpl_id))) - H5E_clear_stack(NULL); - full_name = (char *)H5MM_xfree(full_name); - } /* end if */ - } /* end if */ - - /* try searching from main file's "extpath": see description in H5F_open() & H5_build_extpath() */ - if(ext_file == NULL) { - char *extpath; - - if(NULL != (extpath = H5F_EXTPATH(loc.oloc->file))) { - if(H5L_build_name(extpath, temp_file_name, &full_name/*out*/) < 0) - HGOTO_ERROR(H5E_LINK, H5E_CANTGET, FAIL, "can't prepend prefix to filename") - if(NULL == (ext_file = H5F_efc_open(loc.oloc->file, full_name, intent, H5P_FILE_CREATE_DEFAULT, fapl_id, dxpl_id))) - H5E_clear_stack(NULL); - full_name = (char *)H5MM_xfree(full_name); - } /* end if */ - } /* end if */ - - /* try the relative file_name stored in temp_file_name */ - if(ext_file == NULL) { - if(NULL == (ext_file = H5F_efc_open(loc.oloc->file, temp_file_name, intent, H5P_FILE_CREATE_DEFAULT, fapl_id, dxpl_id))) - H5E_clear_stack(NULL); - } /* end if */ - - /* try the 'resolved' name for the parent file (i.e. the name after symlinks - * were resolved) - */ - if(ext_file == NULL) { - char *ptr = NULL; - - /* Copy resolved file name */ - if(NULL == (actual_file_name = H5MM_strdup(H5F_ACTUAL_NAME(loc.oloc->file)))) - HGOTO_ERROR(H5E_LINK, H5E_CANTALLOC, FAIL, "can't duplicate resolved file name string") - - /* get last component of file_name */ - H5_GET_LAST_DELIMITER(actual_file_name, ptr) - if(!ptr) - HGOTO_ERROR(H5E_LINK, H5E_CANTOPENFILE, FAIL, "unable to open external file, external link file name = '%s', temp_file_name = '%s'", file_name, temp_file_name) - - /* Truncate filename portion from actual file name path */ - *ptr = '\0'; - - /* Build new file name for the external file */ - if(H5L_build_name(actual_file_name, temp_file_name, &full_name/*out*/) < 0) - HGOTO_ERROR(H5E_LINK, H5E_CANTGET, FAIL, "can't prepend prefix to filename") - - /* Try opening with the resolved name */ - if(NULL == (ext_file = H5F_efc_open(loc.oloc->file, full_name, intent, H5P_FILE_CREATE_DEFAULT, fapl_id, dxpl_id))) - HGOTO_ERROR(H5E_LINK, H5E_CANTOPENFILE, FAIL, "unable to open external file, external link file name = '%s', temp_file_name = '%s'", file_name, temp_file_name) - full_name = (char *)H5MM_xfree(full_name); - } /* end if */ + HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "can't set file close degree") + /* Search for the target file */ + if(NULL == (ext_file = H5F_prefix_open_file(lapl_id, loc.oloc->file, H5L_ACS_ELINK_PREFIX_NAME, file_name, intent, fapl_id, dxpl_id))) + HGOTO_ERROR(H5E_LINK, H5E_CANTOPENFILE, FAIL, "unable to open external file, external link file name = '%s'", file_name) /* Retrieve the "group location" for the file's root group */ if(H5G_root_loc(ext_file, &root_loc) < 0) @@ -471,10 +263,6 @@ done: HDONE_ERROR(H5E_LINK, H5E_CANTCLOSEFILE, FAIL, "problem closing external file") if(parent_group_name && parent_group_name != local_group_name) parent_group_name = (char *)H5MM_xfree(parent_group_name); - full_name = (char *)H5MM_xfree(full_name); - temp_file_name = (char *)H5MM_xfree(temp_file_name); - actual_file_name = (char *)H5MM_xfree(actual_file_name); - if(ret_value < 0) { /* Close object if it's open and something failed */ if(ext_obj >= 0 && H5I_dec_ref(ext_obj) < 0) @@ -484,20 +272,20 @@ done: FUNC_LEAVE_NOAPI(ret_value) } /* end H5L_extern_traverse() */ - + /*------------------------------------------------------------------------- - * Function: H5L_extern_query + * Function: H5L_extern_query * - * Purpose: Default query function for external links. This can + * Purpose: Default query function for external links. This can * be overridden using H5Lregister(). * * Returns the size of the link's user data. If a buffer of * is provided, copies at most buf_size bytes of the udata * into it. * - * Return: Size of buffer on success/Negative on failure + * Return: Size of buffer on success/Negative on failure * - * Programmer: James Laird + * Programmer: James Laird * Monday, July 10, 2006 * *------------------------------------------------------------------------- @@ -534,23 +322,23 @@ done: FUNC_LEAVE_NOAPI(ret_value) } /* end H5L_extern_query() */ - + /*------------------------------------------------------------------------- - * Function: H5Lcreate_external + * Function: H5Lcreate_external * - * Purpose: Creates an external link from LINK_NAME to OBJ_NAME. + * Purpose: Creates an external link from LINK_NAME to OBJ_NAME. * * External links are links to objects in other HDF5 files. They * are allowed to "dangle" like soft links internal to a file. * FILE_NAME is the name of the file that OBJ_NAME is is contained * within. If OBJ_NAME is given as a relative path name, the * path will be relative to the root group of FILE_NAME. - * LINK_NAME is interpreted relative to LINK_LOC_ID, which is + * LINK_NAME is interpreted relative to LINK_LOC_ID, which is * either a file ID or a group ID. * - * Return: Non-negative on success/Negative on failure + * Return: Non-negative on success/Negative on failure * - * Programmer: Quincey Koziol + * Programmer: Quincey Koziol * Wednesday, May 18, 2005 * *------------------------------------------------------------------------- @@ -559,14 +347,14 @@ 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) { - H5G_loc_t link_loc; /* Group location to create link */ - char *norm_obj_name = NULL; /* Pointer to normalized current name */ + H5G_loc_t link_loc; /* Group location to create link */ + char *norm_obj_name = NULL; /* Pointer to normalized current name */ void *ext_link_buf = NULL; /* Buffer to contain external link */ size_t buf_size; /* Size of buffer to hold external link */ size_t file_name_len; /* Length of file name string */ size_t norm_obj_name_len; /* Length of normalized object name string */ uint8_t *p; /* Pointer into external link buffer */ - hid_t dxpl_id = H5AC_ind_read_dxpl_id; /* dxpl used by library */ + hid_t dxpl_id = H5AC_ind_read_dxpl_id; /* dxpl used by library */ herr_t ret_value = SUCCEED; /* Return value */ FUNC_ENTER_API(FAIL) @@ -575,13 +363,13 @@ H5Lcreate_external(const char *file_name, const char *obj_name, /* Check arguments */ if(!file_name || !*file_name) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no file name specified") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no file name specified") if(!obj_name || !*obj_name) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no object name specified") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no object name specified") if(H5G_loc(link_loc_id, &link_loc) < 0) HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a location") if(!link_name || !*link_name) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no link name specified") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no link name specified") /* Get normalized copy of the link target */ if(NULL == (norm_obj_name = H5G_normalize(obj_name))) @@ -616,7 +404,7 @@ done: FUNC_LEAVE_API(ret_value) } /* end H5Lcreate_external() */ - + /*------------------------------------------------------------------------- * Function: H5L_register_external * @@ -645,7 +433,7 @@ done: FUNC_LEAVE_NOAPI(ret_value) } /* end H5L_register_external() */ - + /*------------------------------------------------------------------------- * Function: H5Lunpack_elink_val * diff --git a/tools/test/h5dump/errfiles/tall-1.err b/tools/test/h5dump/errfiles/tall-1.err index ab9dbe3..5bfb451 100644 --- a/tools/test/h5dump/errfiles/tall-1.err +++ b/tools/test/h5dump/errfiles/tall-1.err @@ -20,6 +20,9 @@ HDF5-DIAG: Error detected in HDF5 (version (number)) thread (IDs): #006: (file name) line (number) in H5G_traverse_ud(): traversal callback returned invalid ID major: Symbol table minor: Unable to find atom information (already closed?) - #007: (file name) line (number) in H5L_extern_traverse(): unable to open external file, external link file name = 'somefile', temp_file_name = 'somefile' + #007: (file name) line (number) in H5L_extern_traverse(): unable to open external file, external link file name = 'somefile' major: Links minor: Unable to open file + #008: (file name) line (number) in H5F_prefix_open_file(): unable to open file, file name = 'somefile', temp_file_name = 'somefile' + major: File accessibilty + minor: Unable to open file diff --git a/tools/test/h5dump/errfiles/tall-2A.err b/tools/test/h5dump/errfiles/tall-2A.err index ab9dbe3..5bfb451 100644 --- a/tools/test/h5dump/errfiles/tall-2A.err +++ b/tools/test/h5dump/errfiles/tall-2A.err @@ -20,6 +20,9 @@ HDF5-DIAG: Error detected in HDF5 (version (number)) thread (IDs): #006: (file name) line (number) in H5G_traverse_ud(): traversal callback returned invalid ID major: Symbol table minor: Unable to find atom information (already closed?) - #007: (file name) line (number) in H5L_extern_traverse(): unable to open external file, external link file name = 'somefile', temp_file_name = 'somefile' + #007: (file name) line (number) in H5L_extern_traverse(): unable to open external file, external link file name = 'somefile' major: Links minor: Unable to open file + #008: (file name) line (number) in H5F_prefix_open_file(): unable to open file, file name = 'somefile', temp_file_name = 'somefile' + major: File accessibilty + minor: Unable to open file diff --git a/tools/test/h5dump/errfiles/tall-2A0.err b/tools/test/h5dump/errfiles/tall-2A0.err index ab9dbe3..5bfb451 100644 --- a/tools/test/h5dump/errfiles/tall-2A0.err +++ b/tools/test/h5dump/errfiles/tall-2A0.err @@ -20,6 +20,9 @@ HDF5-DIAG: Error detected in HDF5 (version (number)) thread (IDs): #006: (file name) line (number) in H5G_traverse_ud(): traversal callback returned invalid ID major: Symbol table minor: Unable to find atom information (already closed?) - #007: (file name) line (number) in H5L_extern_traverse(): unable to open external file, external link file name = 'somefile', temp_file_name = 'somefile' + #007: (file name) line (number) in H5L_extern_traverse(): unable to open external file, external link file name = 'somefile' major: Links minor: Unable to open file + #008: (file name) line (number) in H5F_prefix_open_file(): unable to open file, file name = 'somefile', temp_file_name = 'somefile' + major: File accessibilty + minor: Unable to open file diff --git a/tools/test/h5dump/errfiles/tall-2B.err b/tools/test/h5dump/errfiles/tall-2B.err index ab9dbe3..5bfb451 100644 --- a/tools/test/h5dump/errfiles/tall-2B.err +++ b/tools/test/h5dump/errfiles/tall-2B.err @@ -20,6 +20,9 @@ HDF5-DIAG: Error detected in HDF5 (version (number)) thread (IDs): #006: (file name) line (number) in H5G_traverse_ud(): traversal callback returned invalid ID major: Symbol table minor: Unable to find atom information (already closed?) - #007: (file name) line (number) in H5L_extern_traverse(): unable to open external file, external link file name = 'somefile', temp_file_name = 'somefile' + #007: (file name) line (number) in H5L_extern_traverse(): unable to open external file, external link file name = 'somefile' major: Links minor: Unable to open file + #008: (file name) line (number) in H5F_prefix_open_file(): unable to open file, file name = 'somefile', temp_file_name = 'somefile' + major: File accessibilty + minor: Unable to open file diff --git a/tools/test/h5dump/errfiles/textlink.err b/tools/test/h5dump/errfiles/textlink.err index 95556db..fbbfb12 100644 --- a/tools/test/h5dump/errfiles/textlink.err +++ b/tools/test/h5dump/errfiles/textlink.err @@ -20,9 +20,12 @@ HDF5-DIAG: Error detected in HDF5 (version (number)) thread (IDs): #006: (file name) line (number) in H5G_traverse_ud(): traversal callback returned invalid ID major: Symbol table minor: Unable to find atom information (already closed?) - #007: (file name) line (number) in H5L_extern_traverse(): unable to open external file, external link file name = 'filename', temp_file_name = 'filename' + #007: (file name) line (number) in H5L_extern_traverse(): unable to open external file, external link file name = 'filename' major: Links minor: Unable to open file + #008: (file name) line (number) in H5F_prefix_open_file(): unable to open file, file name = 'filename', temp_file_name = 'filename' + major: File accessibilty + minor: Unable to open file HDF5-DIAG: Error detected in HDF5 (version (number)) thread (IDs): #000: (file name) line (number) in H5Oopen(): unable to open object major: Object header @@ -45,6 +48,9 @@ HDF5-DIAG: Error detected in HDF5 (version (number)) thread (IDs): #006: (file name) line (number) in H5G_traverse_ud(): traversal callback returned invalid ID major: Symbol table minor: Unable to find atom information (already closed?) - #007: (file name) line (number) in H5L_extern_traverse(): unable to open external file, external link file name = 'anotherfile', temp_file_name = 'anotherfile' + #007: (file name) line (number) in H5L_extern_traverse(): unable to open external file, external link file name = 'anotherfile' major: Links minor: Unable to open file + #008: (file name) line (number) in H5F_prefix_open_file(): unable to open file, file name = 'anotherfile', temp_file_name = 'anotherfile' + major: File accessibilty + minor: Unable to open file diff --git a/tools/test/h5dump/errfiles/torderlinks1.err b/tools/test/h5dump/errfiles/torderlinks1.err index e665f03..b72872d 100644 --- a/tools/test/h5dump/errfiles/torderlinks1.err +++ b/tools/test/h5dump/errfiles/torderlinks1.err @@ -20,6 +20,9 @@ HDF5-DIAG: Error detected in HDF5 (version (number)) thread (IDs): #006: (file name) line (number) in H5G_traverse_ud(): traversal callback returned invalid ID major: Symbol table minor: Unable to find atom information (already closed?) - #007: (file name) line (number) in H5L_extern_traverse(): unable to open external file, external link file name = 'fname', temp_file_name = 'fname' + #007: (file name) line (number) in H5L_extern_traverse(): unable to open external file, external link file name = 'fname' major: Links minor: Unable to open file + #008: (file name) line (number) in H5F_prefix_open_file(): unable to open file, file name = 'fname', temp_file_name = 'fname' + major: File accessibilty + minor: Unable to open file diff --git a/tools/test/h5dump/errfiles/torderlinks2.err b/tools/test/h5dump/errfiles/torderlinks2.err index e665f03..b72872d 100644 --- a/tools/test/h5dump/errfiles/torderlinks2.err +++ b/tools/test/h5dump/errfiles/torderlinks2.err @@ -20,6 +20,9 @@ HDF5-DIAG: Error detected in HDF5 (version (number)) thread (IDs): #006: (file name) line (number) in H5G_traverse_ud(): traversal callback returned invalid ID major: Symbol table minor: Unable to find atom information (already closed?) - #007: (file name) line (number) in H5L_extern_traverse(): unable to open external file, external link file name = 'fname', temp_file_name = 'fname' + #007: (file name) line (number) in H5L_extern_traverse(): unable to open external file, external link file name = 'fname' major: Links minor: Unable to open file + #008: (file name) line (number) in H5F_prefix_open_file(): unable to open file, file name = 'fname', temp_file_name = 'fname' + major: File accessibilty + minor: Unable to open file -- cgit v0.12 From 233afe3b6f77a487baed555569ee0524ca7a4d24 Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Mon, 22 Jan 2018 11:22:27 -0600 Subject: HDFFV-10385,10392,10393 merge from develop --- CMakeLists.txt | 12 +++--- c++/examples/CMakeLists.txt | 2 - c++/test/CMakeLists.txt | 1 - config/cmake/HDFCompilerFlags.cmake | 6 +-- config/cmake/libhdf5.settings.cmake.in | 2 +- config/cmake_ext_mod/HDFMacros.cmake | 66 ++++++++++++++++-------------- examples/CMakeLists.txt | 4 -- fortran/examples/CMakeLists.txt | 6 --- fortran/src/CMakeLists.txt | 10 ++--- fortran/test/CMakeLists.txt | 44 ++++++++------------ fortran/testpar/CMakeLists.txt | 1 - hl/c++/examples/CMakeLists.txt | 1 - hl/c++/test/CMakeLists.txt | 1 - hl/examples/CMakeLists.txt | 1 - hl/fortran/examples/CMakeLists.txt | 1 - hl/fortran/src/CMakeLists.txt | 9 ++-- hl/fortran/test/CMakeLists.txt | 8 ---- hl/test/CMakeLists.txt | 5 --- hl/tools/gif2h5/CMakeLists.txt | 3 -- hl/tools/h5watch/CMakeLists.txt | 4 -- java/examples/datasets/CMakeLists.txt | 8 +--- java/examples/datatypes/CMakeLists.txt | 8 +--- java/examples/groups/CMakeLists.txt | 8 +--- java/examples/intro/CMakeLists.txt | 8 +--- java/src/jni/CMakeLists.txt | 4 +- java/test/CMakeLists.txt | 9 +--- release_docs/RELEASE.txt | 34 +++++++++++++-- release_docs/USING_HDF5_CMake.txt | 9 ++-- test/CMakeLists.txt | 19 --------- test/CMakeTests.cmake | 3 +- testpar/CMakeLists.txt | 2 - tools/src/h5copy/CMakeLists.txt | 2 - tools/src/h5diff/CMakeLists.txt | 3 -- tools/src/h5dump/CMakeLists.txt | 2 - tools/src/h5format_convert/CMakeLists.txt | 1 - tools/src/h5import/CMakeLists.txt | 1 - tools/src/h5jam/CMakeLists.txt | 2 - tools/src/h5ls/CMakeLists.txt | 2 - tools/src/h5repack/CMakeLists.txt | 2 - tools/src/h5repack/h5repack_filters.c | 12 +++--- tools/src/h5repack/h5repack_parse.c | 10 ++--- tools/src/h5stat/CMakeLists.txt | 2 - tools/src/misc/CMakeLists.txt | 4 -- tools/test/h5copy/CMakeLists.txt | 1 - tools/test/h5diff/CMakeLists.txt | 1 - tools/test/h5dump/CMakeLists.txt | 1 - tools/test/h5format_convert/CMakeLists.txt | 2 - tools/test/h5import/CMakeLists.txt | 1 - tools/test/h5jam/CMakeLists.txt | 3 -- tools/test/h5repack/CMakeLists.txt | 2 - tools/test/h5stat/CMakeLists.txt | 1 - tools/test/misc/CMakeLists.txt | 4 -- tools/test/misc/vds/CMakeLists.txt | 1 - tools/test/perform/CMakeLists.txt | 9 ---- 54 files changed, 125 insertions(+), 243 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 2288be5..ce0aadf 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -409,7 +409,7 @@ include (${HDF_RESOURCES_EXT_DIR}/HDFMacros.cmake) include (${HDF_RESOURCES_EXT_DIR}/HDFLibMacros.cmake) include (${HDF_RESOURCES_DIR}/HDF5Macros.cmake) -SET_HDF5_BUILD_TYPE() +SET_HDF_BUILD_TYPE() #----------------------------------------------------------------------------- # Setup output Directories @@ -553,11 +553,9 @@ endif () set (EXE_EXT "") if (WIN32) set (EXE_EXT ".exe") - if (NOT CYGWIN) - add_definitions (-D_BIND_TO_CURRENT_VCLIBS_VERSION=1) - add_definitions (-D_CRT_SECURE_NO_WARNINGS) - add_definitions (-D_CONSOLE) - endif () + add_definitions (-D_BIND_TO_CURRENT_VCLIBS_VERSION=1) + add_definitions (-D_CRT_SECURE_NO_WARNINGS) + add_definitions (-D_CONSOLE) endif () if (MSVC) @@ -584,7 +582,7 @@ option (HDF5_BUILD_GENERATORS "Build Test Generators" OFF) #----------------------------------------------------------------------------- option (HDF5_ENABLE_TRACE "Enable API tracing capability" OFF) mark_as_advanced (HDF5_ENABLE_TRACE) -if (HDF5_BUILD_TYPE MATCHES Debug) +if (${HDF_CFG_NAME} MATCHES "Debug") add_definitions (-DDEBUG) # Enable tracing of the API if (HDF5_ENABLE_TRACE) diff --git a/c++/examples/CMakeLists.txt b/c++/examples/CMakeLists.txt index e5b0b4a..300f6bc 100644 --- a/c++/examples/CMakeLists.txt +++ b/c++/examples/CMakeLists.txt @@ -34,7 +34,6 @@ set (tutr_examples foreach (example ${examples}) add_executable (cpp_ex_${example} ${HDF5_CPP_EXAMPLES_SOURCE_DIR}/${example}.cpp) - TARGET_NAMING (cpp_ex_${example} STATIC) TARGET_C_PROPERTIES (cpp_ex_${example} STATIC " " " ") target_link_libraries (cpp_ex_${example} ${HDF5_CPP_LIB_TARGET} ${HDF5_LIB_TARGET}) set_target_properties (cpp_ex_${example} PROPERTIES FOLDER examples/cpp) @@ -42,7 +41,6 @@ endforeach () foreach (example ${tutr_examples}) add_executable (cpp_ex_${example} ${HDF5_CPP_EXAMPLES_SOURCE_DIR}/${example}.cpp) - TARGET_NAMING (cpp_ex_${example} STATIC) TARGET_C_PROPERTIES (cpp_ex_${example} STATIC " " " ") target_link_libraries (cpp_ex_${example} ${HDF5_CPP_LIB_TARGET} ${HDF5_LIB_TARGET}) set_target_properties (cpp_ex_${example} PROPERTIES FOLDER examples/cpp) diff --git a/c++/test/CMakeLists.txt b/c++/test/CMakeLists.txt index 65815f9..4930626 100644 --- a/c++/test/CMakeLists.txt +++ b/c++/test/CMakeLists.txt @@ -37,7 +37,6 @@ set (srcdir ${CMAKE_CURRENT_SOURCE_DIR}) configure_file (${HDF5_CPP_TEST_SOURCE_DIR}/H5srcdir_str.h.in H5srcdir_str.h @ONLY) add_executable (cpp_testhdf5 ${CPP_TEST_SOURCES} ) -TARGET_NAMING (cpp_testhdf5 STATIC) TARGET_C_PROPERTIES (cpp_testhdf5 STATIC " " " ") target_link_libraries (cpp_testhdf5 ${HDF5_CPP_LIB_TARGET} diff --git a/config/cmake/HDFCompilerFlags.cmake b/config/cmake/HDFCompilerFlags.cmake index eeb4b97..a414cea 100644 --- a/config/cmake/HDFCompilerFlags.cmake +++ b/config/cmake/HDFCompilerFlags.cmake @@ -13,12 +13,12 @@ # Compiler specific flags : Shouldn't there be compiler tests for these #----------------------------------------------------------------------------- if (CMAKE_COMPILER_IS_GNUCC) - if (HDF5_BUILD_TYPE MATCHES Debug) + if (${HDF_CFG_NAME} MATCHES "Debug") set (CMAKE_C_FLAGS "${CMAKE_ANSI_CFLAGS} ${CMAKE_C_FLAGS} -std=c99") if (NOT CMAKE_C_COMPILER_VERSION VERSION_LESS 5.0) set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Og -ftrapv -fno-common") endif () - else (HDF5_BUILD_TYPE MATCHES Debug) + else () set (CMAKE_C_FLAGS "${CMAKE_ANSI_CFLAGS} ${CMAKE_C_FLAGS} -std=c99") if (NOT CMAKE_C_COMPILER_VERSION VERSION_LESS 5.0) set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fstdarg-opt") @@ -26,7 +26,7 @@ if (CMAKE_COMPILER_IS_GNUCC) endif () endif () if (CMAKE_COMPILER_IS_GNUCXX AND CMAKE_CXX_COMPILER_LOADED) - if (HDF5_BUILD_TYPE MATCHES Debug) + if (${HDF_CFG_NAME} MATCHES "Debug") set (CMAKE_CXX_FLAGS "${CMAKE_ANSI_CFLAGS} ${CMAKE_CXX_FLAGS}") if (NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 5.0) set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Og -ftrapv -fno-common") diff --git a/config/cmake/libhdf5.settings.cmake.in b/config/cmake/libhdf5.settings.cmake.in index 28fb876..7bb426f 100644 --- a/config/cmake/libhdf5.settings.cmake.in +++ b/config/cmake/libhdf5.settings.cmake.in @@ -13,7 +13,7 @@ General Information: Compiling Options: ------------------ - Build Mode: @HDF5_BUILD_TYPE@ + Build Mode: @HDF_BUILD_TYPE@ Debugging Symbols: @SYMBOLS@ Asserts: @ASSERTS@ Profiling: @PROFILING@ diff --git a/config/cmake_ext_mod/HDFMacros.cmake b/config/cmake_ext_mod/HDFMacros.cmake index 76e0612..1326420 100644 --- a/config/cmake_ext_mod/HDFMacros.cmake +++ b/config/cmake_ext_mod/HDFMacros.cmake @@ -11,19 +11,25 @@ # #------------------------------------------------------------------------------- -macro (SET_HDF5_BUILD_TYPE) +macro (SET_HDF_BUILD_TYPE) get_property(_isMultiConfig GLOBAL PROPERTY GENERATOR_IS_MULTI_CONFIG) if(_isMultiConfig) - set(HDF5_BUILD_TYPE ${CMAKE_CFG_INTDIR}) - set(HDF5_CFG_BUILD_TYPE \${CMAKE_INSTALL_CONFIG_NAME}) + set(HDF_CFG_NAME ${CTEST_CONFIGURATION_TYPE}) + set(HDF_BUILD_TYPE ${CMAKE_CFG_INTDIR}) + set(HDF_CFG_BUILD_TYPE \${CMAKE_INSTALL_CONFIG_NAME}) else() - set(HDF5_CFG_BUILD_TYPE ".") + set(HDF_CFG_BUILD_TYPE ".") if(CMAKE_BUILD_TYPE) - set(HDF5_BUILD_TYPE ${CMAKE_BUILD_TYPE}) + set(HDF_CFG_NAME ${CMAKE_BUILD_TYPE}) + set(HDF_BUILD_TYPE ${CMAKE_BUILD_TYPE}) else() - set(HDF5_BUILD_TYPE "Release") + set(HDF_CFG_NAME "Release") + set(HDF_BUILD_TYPE "Release") endif() endif() + if(NOT CMAKE_BUILD_TYPE) + set(CMAKE_BUILD_TYPE "Release") + endif() endmacro () #------------------------------------------------------------------------------- @@ -62,13 +68,6 @@ macro (IDE_SOURCE_PROPERTIES SOURCE_PATH HEADERS SOURCES) endmacro () #------------------------------------------------------------------------------- -macro (TARGET_NAMING libtarget libtype) - if (${libtype} MATCHES "SHARED") - set_target_properties (${libtarget} PROPERTIES OUTPUT_NAME "${libtarget}${ARGN}") - endif () -endmacro () - -#------------------------------------------------------------------------------- macro (INSTALL_TARGET_PDB libtarget targetdestination targetcomponent) if (WIN32 AND MSVC) get_target_property (target_type ${libtarget} TYPE) @@ -105,31 +104,36 @@ endmacro () #------------------------------------------------------------------------------- macro (HDF_SET_LIB_OPTIONS libtarget libname libtype) + if (WIN32) + set (LIB_DEBUG_SUFFIX "_D") + else () + set (LIB_DEBUG_SUFFIX "_debug") + endif () if (${libtype} MATCHES "SHARED") - if (WIN32) - set (LIB_RELEASE_NAME "${libname}") - set (LIB_DEBUG_NAME "${libname}_D") - else () - set (LIB_RELEASE_NAME "${libname}") - set (LIB_DEBUG_NAME "${libname}_debug") - endif () + set (LIB_RELEASE_NAME "${libname}") + set (LIB_DEBUG_NAME "${libname}${LIB_DEBUG_SUFFIX}") else () if (WIN32) set (LIB_RELEASE_NAME "lib${libname}") - set (LIB_DEBUG_NAME "lib${libname}_D") + set (LIB_DEBUG_NAME "lib${libname}${LIB_DEBUG_SUFFIX}") else () set (LIB_RELEASE_NAME "${libname}") - set (LIB_DEBUG_NAME "${libname}_debug") + set (LIB_DEBUG_NAME "${libname}${LIB_DEBUG_SUFFIX}") endif () endif () set_target_properties (${libtarget} PROPERTIES - OUTPUT_NAME ${LIB_RELEASE_NAME} - OUTPUT_NAME_DEBUG ${LIB_DEBUG_NAME} - OUTPUT_NAME_RELEASE ${LIB_RELEASE_NAME} - OUTPUT_NAME_MINSIZEREL ${LIB_RELEASE_NAME} - OUTPUT_NAME_RELWITHDEBINFO ${LIB_RELEASE_NAME} + OUTPUT_NAME + ${LIB_RELEASE_NAME} + OUTPUT_NAME_DEBUG + ${LIB_DEBUG_NAME} + OUTPUT_NAME_RELEASE + ${LIB_RELEASE_NAME} + OUTPUT_NAME_MINSIZEREL + ${LIB_RELEASE_NAME} + OUTPUT_NAME_RELWITHDEBINFO + ${LIB_RELEASE_NAME} ) if (${libtype} MATCHES "STATIC") if (WIN32) @@ -162,7 +166,7 @@ macro (HDF_IMPORT_SET_LIB_OPTIONS libtarget libname libtype libversion) if (${importtype} MATCHES "IMPORT") set (importprefix "${CMAKE_STATIC_LIBRARY_PREFIX}") endif () - if (${HDF5_BUILD_TYPE} MATCHES "Debug") + if (${HDF_CFG_NAME} MATCHES "Debug") set (IMPORT_LIB_NAME ${LIB_DEBUG_NAME}) else () set (IMPORT_LIB_NAME ${LIB_RELEASE_NAME}) @@ -177,8 +181,8 @@ macro (HDF_IMPORT_SET_LIB_OPTIONS libtarget libname libtype libversion) ) else () set_target_properties (${libtarget} PROPERTIES - IMPORTED_IMPLIB "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/${HDF5_BUILD_TYPE}/${CMAKE_IMPORT_LIBRARY_PREFIX}${IMPORT_LIB_NAME}${CMAKE_IMPORT_LIBRARY_SUFFIX}" - IMPORTED_LOCATION "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/${HDF5_BUILD_TYPE}/${CMAKE_IMPORT_LIBRARY_PREFIX}${IMPORT_LIB_NAME}${CMAKE_SHARED_LIBRARY_SUFFIX}" + IMPORTED_IMPLIB "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/${HDF_BUILD_TYPE}/${CMAKE_IMPORT_LIBRARY_PREFIX}${IMPORT_LIB_NAME}${CMAKE_IMPORT_LIBRARY_SUFFIX}" + IMPORTED_LOCATION "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/${HDF_BUILD_TYPE}/${CMAKE_IMPORT_LIBRARY_PREFIX}${IMPORT_LIB_NAME}${CMAKE_SHARED_LIBRARY_SUFFIX}" ) endif () else () @@ -198,7 +202,7 @@ macro (HDF_IMPORT_SET_LIB_OPTIONS libtarget libname libtype libversion) else () if (WIN32 AND NOT MINGW) set_target_properties (${libtarget} PROPERTIES - IMPORTED_LOCATION "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/${HDF5_BUILD_TYPE}/${IMPORT_LIB_NAME}${CMAKE_STATIC_LIBRARY_SUFFIX}" + IMPORTED_LOCATION "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/${HDF_BUILD_TYPE}/${IMPORT_LIB_NAME}${CMAKE_STATIC_LIBRARY_SUFFIX}" IMPORTED_LINK_INTERFACE_LANGUAGES "C" ) else () diff --git a/examples/CMakeLists.txt b/examples/CMakeLists.txt index 04a99ce..43c6d63 100644 --- a/examples/CMakeLists.txt +++ b/examples/CMakeLists.txt @@ -46,13 +46,11 @@ set (examples foreach (example ${examples}) add_executable (${example} ${HDF5_EXAMPLES_SOURCE_DIR}/${example}.c) - TARGET_NAMING (${example} STATIC) TARGET_C_PROPERTIES (${example} STATIC " " " ") target_link_libraries (${example} ${HDF5_LIB_TARGET}) set_target_properties (${example} PROPERTIES FOLDER examples) if (BUILD_SHARED_LIBS) add_executable (${example}-shared ${HDF5_EXAMPLES_SOURCE_DIR}/${example}.c) - TARGET_NAMING (${example}-shared SHARED) TARGET_C_PROPERTIES (${example}-shared SHARED " " " ") target_link_libraries (${example}-shared ${HDF5_LIBSH_TARGET}) set_target_properties (${example}-shared PROPERTIES FOLDER examples) @@ -61,13 +59,11 @@ endforeach () if (H5_HAVE_PARALLEL) add_executable (ph5example ${HDF5_EXAMPLES_SOURCE_DIR}/ph5example.c) - TARGET_NAMING (ph5example STATIC) TARGET_C_PROPERTIES (ph5example STATIC " " " ") target_link_libraries (ph5example ${HDF5_LIB_TARGET} ${MPI_C_LIBRARIES}) set_target_properties (ph5example PROPERTIES FOLDER examples) if (BUILD_SHARED_LIBS) add_executable (ph5example-shared ${HDF5_EXAMPLES_SOURCE_DIR}/ph5example.c) - TARGET_NAMING (ph5example-shared SHARED) TARGET_C_PROPERTIES (ph5example-shared SHARED " " " ") target_link_libraries (ph5example-shared ${HDF5_LIBSH_TARGET} ${MPI_C_LIBRARIES}) set_target_properties (ph5example-shared PROPERTIES FOLDER examples) diff --git a/fortran/examples/CMakeLists.txt b/fortran/examples/CMakeLists.txt index a05f296..a48b3bd 100644 --- a/fortran/examples/CMakeLists.txt +++ b/fortran/examples/CMakeLists.txt @@ -40,7 +40,6 @@ set (F2003_examples foreach (example ${examples}) add_executable (f90_ex_${example} ${HDF5_F90_EXAMPLES_SOURCE_DIR}/${example}.f90) - TARGET_NAMING (f90_ex_${example} STATIC) TARGET_FORTRAN_PROPERTIES (f90_ex_${example} STATIC " " " ") target_link_libraries (f90_ex_${example} ${HDF5_F90_LIB_TARGET} @@ -54,7 +53,6 @@ foreach (example ${examples}) ) if (BUILD_SHARED_LIBS) add_executable (f90_ex_${example}-shared ${HDF5_F90_EXAMPLES_SOURCE_DIR}/${example}.f90) - TARGET_NAMING (f90_ex_${example}-shared SHARED) TARGET_FORTRAN_PROPERTIES (f90_ex_${example}-shared SHARED " " " ") target_link_libraries (f90_ex_${example}-shared ${HDF5_F90_LIBSH_TARGET} @@ -71,7 +69,6 @@ endforeach () foreach (example ${F2003_examples}) add_executable (f03_ex_${example} ${HDF5_F90_EXAMPLES_SOURCE_DIR}/${example}.f90) - TARGET_NAMING (f03_ex_${example} STATIC) TARGET_FORTRAN_PROPERTIES (f03_ex_${example} STATIC " " " ") target_link_libraries (f03_ex_${example} ${HDF5_F90_LIB_TARGET} @@ -85,7 +82,6 @@ foreach (example ${F2003_examples}) ) if (BUILD_SHARED_LIBS) add_executable (f03_ex_${example}-shared ${HDF5_F90_EXAMPLES_SOURCE_DIR}/${example}.f90) - TARGET_NAMING (f03_ex_${example}-shared SHARED) TARGET_FORTRAN_PROPERTIES (f03_ex_${example}-shared SHARED " " " ") target_link_libraries (f03_ex_${example}-shared ${HDF5_F90_LIBSH_TARGET} @@ -102,7 +98,6 @@ endforeach () if (H5_HAVE_PARALLEL AND MPI_Fortran_FOUND) add_executable (f90_ex_ph5example ${HDF5_F90_EXAMPLES_SOURCE_DIR}/ph5example.f90) - TARGET_NAMING (f90_ex_ph5example STATIC) TARGET_FORTRAN_PROPERTIES (f90_ex_ph5example STATIC " " " ") target_link_libraries (f90_ex_ph5example ${HDF5_F90_LIB_TARGET} @@ -116,7 +111,6 @@ if (H5_HAVE_PARALLEL AND MPI_Fortran_FOUND) ) if (BUILD_SHARED_LIBS) add_executable (f90_ex_ph5example-shared ${HDF5_F90_EXAMPLES_SOURCE_DIR}/ph5example.f90) - TARGET_NAMING (f90_ex_ph5example-shared SHARED) TARGET_FORTRAN_PROPERTIES (f90_ex_ph5example-shared SHARED " " " ") target_link_libraries (f90_ex_ph5example-shared ${HDF5_F90_LIBSH_TARGET} diff --git a/fortran/src/CMakeLists.txt b/fortran/src/CMakeLists.txt index c377d62..b664c50 100644 --- a/fortran/src/CMakeLists.txt +++ b/fortran/src/CMakeLists.txt @@ -66,12 +66,12 @@ set_target_properties (H5_buildiface PROPERTIES if (BUILD_SHARED_LIBS) file (MAKE_DIRECTORY "${HDF5_F90_BINARY_DIR}/shared") - set (MODSH_BUILD_DIR ${CMAKE_Fortran_MODULE_DIRECTORY}/shared/${HDF5_CFG_BUILD_TYPE}) + set (MODSH_BUILD_DIR ${CMAKE_Fortran_MODULE_DIRECTORY}/shared/${HDF_CFG_BUILD_TYPE}) endif () file (MAKE_DIRECTORY "${HDF5_F90_BINARY_DIR}/static") -set (MOD_BUILD_DIR ${CMAKE_Fortran_MODULE_DIRECTORY}/static/${HDF5_CFG_BUILD_TYPE}) +set (MOD_BUILD_DIR ${CMAKE_Fortran_MODULE_DIRECTORY}/static/${HDF_CFG_BUILD_TYPE}) -INCLUDE_DIRECTORIES (${HDF5_F90_BINARY_DIR} ${CMAKE_Fortran_MODULE_DIRECTORY}) +INCLUDE_DIRECTORIES (${HDF5_F90_SOURCE_DIR} ${HDF5_F90_BINARY_DIR} ${CMAKE_Fortran_MODULE_DIRECTORY}) #----------------------------------------------------------------------------- add_executable (H5match_types @@ -134,7 +134,7 @@ set (f90CStub_C_SHHDRS ) add_library (${HDF5_F90_C_LIB_TARGET} STATIC ${f90CStub_C_SOURCES} ${f90CStub_C_HDRS}) -target_include_directories(${HDF5_F90_C_LIB_TARGET} PRIVATE ${HDF5_F90_BINARY_DIR}/static) +target_include_directories(${HDF5_F90_C_LIB_TARGET} PUBLIC ${HDF5_F90_BINARY_DIR}/static) TARGET_C_PROPERTIES (${HDF5_F90_C_LIB_TARGET} STATIC " " " ") target_link_libraries (${HDF5_F90_C_LIB_TARGET} PUBLIC ${HDF5_LIB_TARGET}) set_global_variable (HDF5_LIBRARIES_TO_EXPORT "${HDF5_LIBRARIES_TO_EXPORT};${HDF5_F90_C_LIB_TARGET}") @@ -148,7 +148,7 @@ set (install_targets ${HDF5_F90_C_LIB_TARGET}) if (BUILD_SHARED_LIBS) add_library (${HDF5_F90_C_LIBSH_TARGET} SHARED ${f90CStub_C_SOURCES} ${f90CStub_C_SHHDRS}) - target_include_directories(${HDF5_F90_C_LIBSH_TARGET} PRIVATE ${HDF5_F90_BINARY_DIR}/shared) + target_include_directories(${HDF5_F90_C_LIBSH_TARGET} PUBLIC ${HDF5_F90_BINARY_DIR}/shared) TARGET_C_PROPERTIES (${HDF5_F90_C_LIBSH_TARGET} SHARED " " " ") target_link_libraries (${HDF5_F90_C_LIBSH_TARGET} PUBLIC ${HDF5_LIBSH_TARGET}) set_global_variable (HDF5_LIBRARIES_TO_EXPORT "${HDF5_LIBRARIES_TO_EXPORT};${HDF5_F90_C_LIBSH_TARGET}") diff --git a/fortran/test/CMakeLists.txt b/fortran/test/CMakeLists.txt index 9946aa0..2990bcc 100644 --- a/fortran/test/CMakeLists.txt +++ b/fortran/test/CMakeLists.txt @@ -4,7 +4,7 @@ PROJECT (HDF5_FORTRAN_TESTS C CXX Fortran) #----------------------------------------------------------------------------- # Setup include Directories #----------------------------------------------------------------------------- -INCLUDE_DIRECTORIES (${CMAKE_Fortran_MODULE_DIRECTORY} ${HDF5_F90_BINARY_DIR} ${HDF5_F90_SRC_DIR}/src) +INCLUDE_DIRECTORIES (${CMAKE_Fortran_MODULE_DIRECTORY} ${HDF5_FORTRAN_TESTS_SOURCE_DIR} ${HDF5_F90_BINARY_DIR} ${HDF5_F90_SRC_DIR}/src) #----------------------------------------------------------------------------- # Setup the Fortran auto-detection utilities @@ -33,18 +33,18 @@ set_target_properties (H5_test_buildiface PROPERTIES ) if (BUILD_SHARED_LIBS) - file (MAKE_DIRECTORY "${HDF5_F90_BINARY_DIR}/shared") - set (MODSH_BUILD_DIR ${CMAKE_Fortran_MODULE_DIRECTORY}/shared/${HDF5_CFG_BUILD_TYPE}) + file (MAKE_DIRECTORY "${HDF5_FORTRAN_TESTS_BINARY_DIR}/shared") + set (MODSH_BUILD_DIR ${CMAKE_Fortran_MODULE_DIRECTORY}/shared/${HDF_CFG_BUILD_TYPE}) endif () -file (MAKE_DIRECTORY "${HDF5_F90_BINARY_DIR}/static") -set (MOD_BUILD_DIR ${CMAKE_Fortran_MODULE_DIRECTORY}/static/${HDF5_CFG_BUILD_TYPE}) +file (MAKE_DIRECTORY "${HDF5_FORTRAN_TESTS_BINARY_DIR}/static") +set (MOD_BUILD_DIR ${CMAKE_Fortran_MODULE_DIRECTORY}/static/${HDF_CFG_BUILD_TYPE}) #----------------------------------------------------------------------------- # Add Test Lib #----------------------------------------------------------------------------- add_library (${HDF5_F90_C_TEST_LIB_TARGET} STATIC t.c) set_source_files_properties (t.c PROPERTIES LANGUAGE C) -target_include_directories(${HDF5_F90_C_TEST_LIB_TARGET} PRIVATE ${HDF5_F90_BINARY_DIR}/static) +target_include_directories(${HDF5_F90_C_TEST_LIB_TARGET} PUBLIC ${HDF5_F90_BINARY_DIR}/static) TARGET_C_PROPERTIES (${HDF5_F90_C_TEST_LIB_TARGET} STATIC " " " ") target_link_libraries (${HDF5_F90_C_TEST_LIB_TARGET} ${HDF5_F90_C_LIB_TARGET} @@ -58,7 +58,7 @@ set_target_properties (${HDF5_F90_C_TEST_LIB_TARGET} PROPERTIES ) if (BUILD_SHARED_LIBS) add_library (${HDF5_F90_C_TEST_LIBSH_TARGET} SHARED t.c) - target_include_directories(${HDF5_F90_C_TEST_LIBSH_TARGET} PRIVATE ${HDF5_F90_BINARY_DIR}/shared) + target_include_directories(${HDF5_F90_C_TEST_LIBSH_TARGET} PUBLIC ${HDF5_F90_BINARY_DIR}/shared) TARGET_C_PROPERTIES (${HDF5_F90_C_TEST_LIBSH_TARGET} SHARED " " " ") target_link_libraries (${HDF5_F90_C_TEST_LIBSH_TARGET} ${HDF5_F90_C_LIBSH_TARGET} @@ -76,35 +76,35 @@ endif () set (CMD $) add_custom_command ( - OUTPUT ${HDF5_F90_BINARY_DIR}/static/tf_gen.F90 + OUTPUT ${HDF5_FORTRAN_TESTS_BINARY_DIR}/static/tf_gen.F90 COMMAND ${CMD} - WORKING_DIRECTORY ${HDF5_F90_BINARY_DIR}/static + WORKING_DIRECTORY ${HDF5_FORTRAN_TESTS_BINARY_DIR}/static DEPENDS H5_test_buildiface COMMENT "Generating the tf_gen.F90 file" ) add_custom_target (H5testgen ALL - DEPENDS ${HDF5_F90_BINARY_DIR}/static/tf_gen.F90 + DEPENDS ${HDF5_FORTRAN_TESTS_BINARY_DIR}/static/tf_gen.F90 ) -set_source_files_properties (${HDF5_F90_BINARY_DIR}/static/tf_gen.F90 PROPERTIES GENERATED TRUE) +set_source_files_properties (${HDF5_FORTRAN_TESTS_BINARY_DIR}/static/tf_gen.F90 PROPERTIES GENERATED TRUE) if (BUILD_SHARED_LIBS) set (CMDSH $) add_custom_command ( - OUTPUT ${HDF5_F90_BINARY_DIR}/shared/tf_gen.F90 + OUTPUT ${HDF5_FORTRAN_TESTS_BINARY_DIR}/shared/tf_gen.F90 COMMAND ${CMDSH} - WORKING_DIRECTORY ${HDF5_F90_BINARY_DIR}/shared + 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_F90_BINARY_DIR}/shared/tf_gen.F90 + DEPENDS ${HDF5_FORTRAN_TESTS_BINARY_DIR}/shared/tf_gen.F90 ) - set_source_files_properties (${HDF5_F90_BINARY_DIR}/shared/tf_gen.F90 PROPERTIES GENERATED TRUE) + set_source_files_properties (${HDF5_FORTRAN_TESTS_BINARY_DIR}/shared/tf_gen.F90 PROPERTIES GENERATED TRUE) endif () set (HDF5_F90_TF_SOURCES # generated files - ${HDF5_F90_BINARY_DIR}/static/tf_gen.F90 + ${HDF5_FORTRAN_TESTS_BINARY_DIR}/static/tf_gen.F90 # normal distribution tf.F90 @@ -113,7 +113,7 @@ set_source_files_properties (${HDF5_F90_TF_SOURCES} PROPERTIES LANGUAGE Fortran) if (BUILD_SHARED_LIBS) set (HDF5_F90_TF_SOURCES_SHARED # generated file - ${HDF5_F90_BINARY_DIR}/shared/tf_gen.F90 + ${HDF5_FORTRAN_TESTS_BINARY_DIR}/shared/tf_gen.F90 # normal distribution tf.F90 @@ -195,7 +195,6 @@ add_executable (testhdf5_fortran tH5Z.F90 tHDF5.F90 ) -TARGET_NAMING (testhdf5_fortran STATIC) TARGET_FORTRAN_PROPERTIES (testhdf5_fortran STATIC " " " ") target_link_libraries (testhdf5_fortran ${HDF5_F90_TEST_LIB_TARGET} @@ -231,7 +230,6 @@ if (BUILD_SHARED_LIBS) tH5Z.F90 tHDF5.F90 ) - TARGET_NAMING (testhdf5_fortran-shared SHARED) TARGET_FORTRAN_PROPERTIES (testhdf5_fortran-shared SHARED " " " ") target_link_libraries (testhdf5_fortran-shared ${HDF5_F90_TEST_LIBSH_TARGET} @@ -259,7 +257,6 @@ add_executable (testhdf5_fortran_1_8 tH5MISC_1_8.F90 tHDF5_1_8.F90 ) -TARGET_NAMING (testhdf5_fortran_1_8 STATIC) TARGET_FORTRAN_PROPERTIES (testhdf5_fortran_1_8 STATIC " " " ") target_link_libraries (testhdf5_fortran_1_8 ${HDF5_F90_TEST_LIB_TARGET} @@ -286,7 +283,6 @@ if (BUILD_SHARED_LIBS) tH5MISC_1_8.F90 tHDF5_1_8.F90 ) - TARGET_NAMING (testhdf5_fortran_1_8-shared SHARED) TARGET_FORTRAN_PROPERTIES (testhdf5_fortran_1_8-shared SHARED " " " ") target_link_libraries (testhdf5_fortran_1_8-shared ${HDF5_F90_TEST_LIBSH_TARGET} @@ -316,7 +312,6 @@ add_executable (fortranlib_test_F03 tH5T_F03.F90 tHDF5_F03.F90 ) -TARGET_NAMING (fortranlib_test_F03 STATIC) TARGET_FORTRAN_PROPERTIES (fortranlib_test_F03 STATIC " " " ") target_link_libraries (fortranlib_test_F03 ${HDF5_F90_TEST_LIB_TARGET} @@ -345,7 +340,6 @@ if (BUILD_SHARED_LIBS) tH5T_F03.F90 tHDF5_F03.F90 ) - TARGET_NAMING (fortranlib_test_F03-shared SHARED) TARGET_FORTRAN_PROPERTIES (fortranlib_test_F03-shared SHARED " " " ") target_link_libraries (fortranlib_test_F03-shared ${HDF5_F90_TEST_LIBSH_TARGET} @@ -367,7 +361,6 @@ endif () #-- Adding test for fflush1 add_executable (fflush1 fflush1.F90) -TARGET_NAMING (fflush1 STATIC) TARGET_FORTRAN_PROPERTIES (fflush1 STATIC " " " ") target_link_libraries (fflush1 ${HDF5_F90_LIB_TARGET} @@ -387,7 +380,6 @@ add_dependencies (fflush1 ${HDF5_F90_TEST_LIB_TARGET}) if (BUILD_SHARED_LIBS) add_executable (fflush1-shared fflush1.F90) - TARGET_NAMING (fflush1-shared SHARED) TARGET_FORTRAN_PROPERTIES (fflush1-shared SHARED " " " ") target_link_libraries (fflush1-shared ${HDF5_F90_LIBSH_TARGET} @@ -408,7 +400,6 @@ endif () #-- Adding test for fflush2 add_executable (fflush2 fflush2.F90) -TARGET_NAMING (fflush2 STATIC) TARGET_FORTRAN_PROPERTIES (fflush2 STATIC " " " ") target_link_libraries (fflush2 ${HDF5_F90_TEST_LIB_TARGET} @@ -428,7 +419,6 @@ add_dependencies (fflush2 ${HDF5_F90_TEST_LIB_TARGET}) if (BUILD_SHARED_LIBS) add_executable (fflush2-shared fflush2.F90) - TARGET_NAMING (fflush2-shared SHARED) TARGET_FORTRAN_PROPERTIES (fflush2-shared SHARED " " " ") target_link_libraries (fflush2-shared ${HDF5_F90_TEST_LIBSH_TARGET} diff --git a/fortran/testpar/CMakeLists.txt b/fortran/testpar/CMakeLists.txt index 4aa7f43..ed9d28c 100644 --- a/fortran/testpar/CMakeLists.txt +++ b/fortran/testpar/CMakeLists.txt @@ -16,7 +16,6 @@ add_executable (parallel_test hyper.f90 mdset.f90 ) -TARGET_NAMING (parallel_test STATIC) TARGET_FORTRAN_PROPERTIES (parallel_test STATIC " " " ") target_link_libraries (parallel_test ${HDF5_F90_TEST_LIB_TARGET} diff --git a/hl/c++/examples/CMakeLists.txt b/hl/c++/examples/CMakeLists.txt index 33ad1e5..8c48795 100644 --- a/hl/c++/examples/CMakeLists.txt +++ b/hl/c++/examples/CMakeLists.txt @@ -11,7 +11,6 @@ INCLUDE_DIRECTORIES (${HDF5_HL_CPP_SRC_DIR}/src) # Add in the examples for the Packet Table codes # -------------------------------------------------------------------- add_executable (ptExampleFL ${HDF5_HL_CPP_EXAMPLES_SOURCE_DIR}/ptExampleFL.cpp) -TARGET_NAMING (ptExampleFL STATIC) TARGET_C_PROPERTIES (ptExampleFL STATIC " " " ") target_link_libraries ( ptExampleFL diff --git a/hl/c++/test/CMakeLists.txt b/hl/c++/test/CMakeLists.txt index a2f9429..54afd7c 100644 --- a/hl/c++/test/CMakeLists.txt +++ b/hl/c++/test/CMakeLists.txt @@ -17,7 +17,6 @@ INCLUDE_DIRECTORIES (${HDF5_CPP_SRC_DIR}/src) add_executable (hl_ptableTest ${HDF5_HL_CPP_TEST_SOURCE_DIR}/ptableTest.cpp) TARGET_C_PROPERTIES (hl_ptableTest STATIC " " " ") -TARGET_NAMING (hl_ptableTest STATIC) target_link_libraries ( hl_ptableTest ${HDF5_LIB_TARGET} diff --git a/hl/examples/CMakeLists.txt b/hl/examples/CMakeLists.txt index 1144e0f..68f0128 100644 --- a/hl/examples/CMakeLists.txt +++ b/hl/examples/CMakeLists.txt @@ -28,7 +28,6 @@ set (examples foreach (example ${examples}) add_executable (hl_ex_${example} ${HDF5_HL_EXAMPLES_SOURCE_DIR}/${example}.c) - TARGET_NAMING (hl_ex_${example} STATIC) TARGET_C_PROPERTIES (hl_ex_${example} STATIC " " " ") target_link_libraries (hl_ex_${example} ${HDF5_HL_LIB_TARGET} ${HDF5_LIB_TARGET}) set_target_properties (hl_ex_${example} PROPERTIES FOLDER examples/hl) diff --git a/hl/fortran/examples/CMakeLists.txt b/hl/fortran/examples/CMakeLists.txt index dfe6102..d920d64 100644 --- a/hl/fortran/examples/CMakeLists.txt +++ b/hl/fortran/examples/CMakeLists.txt @@ -16,7 +16,6 @@ set (examples foreach (example ${examples}) add_executable (hl_f90_ex_${example} ${HDF5_HL_F90_EXAMPLES_SOURCE_DIR}/${example}.f90) - TARGET_NAMING (hl_f90_ex_${example} STATIC) TARGET_FORTRAN_PROPERTIES (hl_f90_ex_${example} STATIC " " " ") target_link_libraries (hl_f90_ex_${example} ${HDF5_HL_F90_LIB_TARGET} diff --git a/hl/fortran/src/CMakeLists.txt b/hl/fortran/src/CMakeLists.txt index dc2629a..b1a639a 100644 --- a/hl/fortran/src/CMakeLists.txt +++ b/hl/fortran/src/CMakeLists.txt @@ -38,10 +38,10 @@ set_target_properties (H5HL_buildiface PROPERTIES if (BUILD_SHARED_LIBS) file (MAKE_DIRECTORY "${HDF5_HL_F90_SRC_BINARY_DIR}/shared") - set (MODSH_BUILD_DIR ${CMAKE_Fortran_MODULE_DIRECTORY}/shared/${HDF5_CFG_BUILD_TYPE}) + set (MODSH_BUILD_DIR ${CMAKE_Fortran_MODULE_DIRECTORY}/shared/${HDF_CFG_BUILD_TYPE}) endif () file (MAKE_DIRECTORY "${HDF5_HL_F90_SRC_BINARY_DIR}/static") -set (MOD_BUILD_DIR ${CMAKE_Fortran_MODULE_DIRECTORY}/static/${HDF5_CFG_BUILD_TYPE}) +set (MOD_BUILD_DIR ${CMAKE_Fortran_MODULE_DIRECTORY}/static/${HDF_CFG_BUILD_TYPE}) #----------------------------------------------------------------------------- # Setup include Directories @@ -49,6 +49,7 @@ set (MOD_BUILD_DIR ${CMAKE_Fortran_MODULE_DIRECTORY}/static/${HDF5_CFG_BUILD_TYP INCLUDE_DIRECTORIES ( ${HDF5_HL_SRC_DIR}/src ${HDF5_F90_SRC_DIR}/src + ${HDF5_HL_F90_SRC_SOURCE_DIR} ${HDF5_F90_BINARY_DIR} ${CMAKE_Fortran_MODULE_DIRECTORY} ${MOD_BUILD_DIR} @@ -69,7 +70,7 @@ set_source_files_properties (${HDF5_HL_F90_C_SOURCES} PROPERTIES LANGUAGE C) set (HDF5_HL_F90_HEADERS ${HDF5_HL_F90_SRC_SOURCE_DIR}/H5LTf90proto.h) add_library (${HDF5_HL_F90_C_LIB_TARGET} STATIC ${HDF5_HL_F90_C_SOURCES} ${HDF5_HL_F90_HEADERS}) -target_include_directories(${HDF5_HL_F90_C_LIB_TARGET} PRIVATE ${HDF5_F90_BINARY_DIR}/static) +target_include_directories(${HDF5_HL_F90_C_LIB_TARGET} PUBLIC ${HDF5_F90_BINARY_DIR}/static) TARGET_C_PROPERTIES (${HDF5_HL_F90_C_LIB_TARGET} STATIC " " " ") target_link_libraries (${HDF5_HL_F90_C_LIB_TARGET} PUBLIC ${HDF5_F90_C_LIB_TARGET} ${HDF5_HL_LIB_TARGET}) set_global_variable (HDF5_LIBRARIES_TO_EXPORT "${HDF5_LIBRARIES_TO_EXPORT};${HDF5_HL_F90_C_LIB_TARGET}") @@ -83,7 +84,7 @@ set (install_targets ${HDF5_HL_F90_C_LIB_TARGET}) if (BUILD_SHARED_LIBS) add_library (${HDF5_HL_F90_C_LIBSH_TARGET} SHARED ${HDF5_HL_F90_C_SOURCES} ${HDF5_HL_F90_HEADERS}) - target_include_directories(${HDF5_HL_F90_C_LIBSH_TARGET} PRIVATE ${HDF5_F90_BINARY_DIR}/shared) + target_include_directories(${HDF5_HL_F90_C_LIBSH_TARGET} PUBLIC ${HDF5_F90_BINARY_DIR}/shared) TARGET_C_PROPERTIES (${HDF5_HL_F90_C_LIBSH_TARGET} SHARED " " " ") target_link_libraries (${HDF5_HL_F90_C_LIBSH_TARGET} PUBLIC ${HDF5_F90_C_LIBSH_TARGET} ${HDF5_HL_LIBSH_TARGET}) set_global_variable (HDF5_LIBRARIES_TO_EXPORT "${HDF5_LIBRARIES_TO_EXPORT};${HDF5_HL_F90_C_LIBSH_TARGET}") diff --git a/hl/fortran/test/CMakeLists.txt b/hl/fortran/test/CMakeLists.txt index fbd31c5..b264d5f 100644 --- a/hl/fortran/test/CMakeLists.txt +++ b/hl/fortran/test/CMakeLists.txt @@ -8,7 +8,6 @@ INCLUDE_DIRECTORIES (${CMAKE_Fortran_MODULE_DIRECTORY} ${HDF5_F90_BINARY_DIR} ${ #-- Adding test for hl_f90_tstds add_executable (hl_f90_tstds tstds.F90) -TARGET_NAMING (hl_f90_tstds STATIC) TARGET_FORTRAN_PROPERTIES (hl_f90_tstds STATIC " " " ") target_link_libraries (hl_f90_tstds ${HDF5_HL_F90_LIB_TARGET} ${HDF5_F90_LIB_TARGET}) target_include_directories (hl_f90_tstds PRIVATE ${CMAKE_Fortran_MODULE_DIRECTORY}/static) @@ -16,7 +15,6 @@ set_target_properties (hl_f90_tstds PROPERTIES LINKER_LANGUAGE Fortran) set_target_properties (hl_f90_tstds PROPERTIES FOLDER test/hl/fortran) if (BUILD_SHARED_LIBS) add_executable (hl_f90_tstds-shared tstds.F90) - TARGET_NAMING (hl_f90_tstds-shared SHARED) TARGET_FORTRAN_PROPERTIES (hl_f90_tstds-shared SHARED " " " ") target_link_libraries (hl_f90_tstds-shared ${HDF5_HL_F90_LIBSH_TARGET} ${HDF5_F90_LIBSH_TARGET}) target_include_directories (hl_f90_tstds-shared PRIVATE ${CMAKE_Fortran_MODULE_DIRECTORY}/shared) @@ -29,7 +27,6 @@ endif () #-- Adding test for hl_f90_tstlite add_executable (hl_f90_tstlite tstlite.F90) -TARGET_NAMING (hl_f90_tstlite STATIC) TARGET_FORTRAN_PROPERTIES (hl_f90_tstlite STATIC " " " ") target_link_libraries (hl_f90_tstlite ${HDF5_HL_F90_LIB_TARGET} ${HDF5_F90_LIB_TARGET} ${HDF5_F90_TEST_LIB_TARGET}) target_include_directories (hl_f90_tstlite PRIVATE ${CMAKE_Fortran_MODULE_DIRECTORY}/static) @@ -37,7 +34,6 @@ set_target_properties (hl_f90_tstlite PROPERTIES LINKER_LANGUAGE Fortran) set_target_properties (hl_f90_tstlite PROPERTIES FOLDER test/hl/fortran) if (BUILD_SHARED_LIBS) add_executable (hl_f90_tstlite-shared tstlite.F90) - TARGET_NAMING (hl_f90_tstlite-shared SHARED) TARGET_FORTRAN_PROPERTIES (hl_f90_tstlite-shared SHARED " " " ") target_link_libraries (hl_f90_tstlite-shared ${HDF5_HL_F90_LIBSH_TARGET} ${HDF5_F90_LIBSH_TARGET} ${HDF5_F90_TEST_LIBSH_TARGET}) target_include_directories (hl_f90_tstlite-shared PRIVATE ${CMAKE_Fortran_MODULE_DIRECTORY}/shared) @@ -50,7 +46,6 @@ endif () #-- Adding test for hl_f90_tstimage add_executable (hl_f90_tstimage tstimage.F90) -TARGET_NAMING (hl_f90_tstimage STATIC) TARGET_FORTRAN_PROPERTIES (hl_f90_tstimage STATIC " " " ") target_link_libraries (hl_f90_tstimage ${HDF5_HL_F90_LIB_TARGET} ${HDF5_F90_LIB_TARGET}) target_include_directories (hl_f90_tstimage PRIVATE ${CMAKE_Fortran_MODULE_DIRECTORY}/static) @@ -58,7 +53,6 @@ set_target_properties (hl_f90_tstimage PROPERTIES LINKER_LANGUAGE Fortran) set_target_properties (hl_f90_tstimage PROPERTIES FOLDER test/hl/fortran) if (BUILD_SHARED_LIBS) add_executable (hl_f90_tstimage-shared tstimage.F90) - TARGET_NAMING (hl_f90_tstimage-shared SHARED) TARGET_FORTRAN_PROPERTIES (hl_f90_tstimage-shared SHARED " " " ") target_link_libraries (hl_f90_tstimage-shared ${HDF5_HL_F90_LIBSH_TARGET} ${HDF5_F90_LIBSH_TARGET}) target_include_directories (hl_f90_tstimage-shared PRIVATE ${CMAKE_Fortran_MODULE_DIRECTORY}/shared) @@ -71,7 +65,6 @@ endif () #-- Adding test for hl_f90_tsttable add_executable (hl_f90_tsttable tsttable.F90) -TARGET_NAMING (hl_f90_tsttable STATIC) TARGET_FORTRAN_PROPERTIES (hl_f90_tsttable STATIC " " " ") target_link_libraries (hl_f90_tsttable ${HDF5_HL_F90_LIB_TARGET} ${HDF5_F90_LIB_TARGET} ${HDF5_F90_TEST_LIB_TARGET}) target_include_directories (hl_f90_tsttable PRIVATE ${CMAKE_Fortran_MODULE_DIRECTORY}/static) @@ -79,7 +72,6 @@ set_target_properties (hl_f90_tsttable PROPERTIES LINKER_LANGUAGE Fortran) set_target_properties (hl_f90_tsttable PROPERTIES FOLDER test/hl/fortran) if (BUILD_SHARED_LIBS) add_executable (hl_f90_tsttable-shared tsttable.F90) - TARGET_NAMING (hl_f90_tsttable-shared SHARED) TARGET_FORTRAN_PROPERTIES (hl_f90_tsttable-shared SHARED " " " ") target_link_libraries (hl_f90_tsttable-shared ${HDF5_HL_F90_LIBSH_TARGET} ${HDF5_F90_LIBSH_TARGET} ${HDF5_F90_TEST_LIBSH_TARGET}) target_include_directories (hl_f90_tsttable-shared PRIVATE ${CMAKE_Fortran_MODULE_DIRECTORY}/shared) diff --git a/hl/test/CMakeLists.txt b/hl/test/CMakeLists.txt index 8845505..82a3c1b 100644 --- a/hl/test/CMakeLists.txt +++ b/hl/test/CMakeLists.txt @@ -22,7 +22,6 @@ include_directories (${HDF5_TEST_SRC_DIR}) # -------------------------------------------------------------------- MACRO (HL_ADD_EXE hl_name) add_executable (hl_${hl_name} ${hl_name}.c) - TARGET_NAMING (hl_${hl_name} STATIC) TARGET_C_PROPERTIES (hl_${hl_name} STATIC " " " ") target_link_libraries (hl_${hl_name} ${HDF5_HL_LIB_TARGET} @@ -34,7 +33,6 @@ ENDMACRO () MACRO (HL_ADD_SHEXE hl_name) add_executable (hl_${hl_name} ${hl_name}.c) - TARGET_NAMING (hl_${hl_name} SHARED) TARGET_C_PROPERTIES (hl_${hl_name} SHARED " " " ") target_link_libraries (hl_${hl_name} ${HDF5_HL_LIBSH_TARGET} @@ -55,7 +53,6 @@ HL_ADD_EXE (test_dset_append) # test_packet has two source files add_executable (hl_test_packet test_packet.c test_packet_vlen.c) -TARGET_NAMING (hl_test_packet STATIC) TARGET_C_PROPERTIES (hl_test_packet STATIC " " " ") target_link_libraries (hl_test_packet ${HDF5_HL_LIB_TARGET} @@ -70,7 +67,6 @@ set_target_properties (hl_test_packet PROPERTIES FOLDER test/hl) # -------------------------------------------------------------------- if (HDF5_BUILD_GENERATORS) add_executable (hl_gen_test_ds gen_test_ds.c) - TARGET_NAMING (hl_gen_test_ds STATIC) TARGET_C_PROPERTIES (hl_gen_test_ds STATIC " " " ") target_link_libraries (hl_gen_test_ds ${HDF5_HL_LIB_TARGET} @@ -80,7 +76,6 @@ if (HDF5_BUILD_GENERATORS) set_target_properties (hl_gen_test_ds PROPERTIES FOLDER test/hl/gen) add_executable (hl_gen_test_ld gen_test_ld.c) - TARGET_NAMING (hl_gen_test_ld STATIC) TARGET_C_PROPERTIES (hl_gen_test_ld STATIC " " " ") target_link_libraries (hl_gen_test_ld ${HDF5_HL_LIB_TARGET} diff --git a/hl/tools/gif2h5/CMakeLists.txt b/hl/tools/gif2h5/CMakeLists.txt index 9d7a406..34d7074 100644 --- a/hl/tools/gif2h5/CMakeLists.txt +++ b/hl/tools/gif2h5/CMakeLists.txt @@ -18,7 +18,6 @@ INCLUDE_DIRECTORIES (${HDF5_TOOLS_DIR}/lib) INCLUDE_DIRECTORIES (${HDF5_HL_TOOLS_GIF2H5_SOURCE_DIR}) add_executable (gif2h5 ${GIF2H5_SOURCES}) -TARGET_NAMING (gif2h5 STATIC) TARGET_C_PROPERTIES (gif2h5 STATIC " " " ") target_link_libraries (gif2h5 ${HDF5_HL_LIB_TARGET} ${HDF5_LIB_TARGET} ${HDF5_TOOLS_LIB_TARGET}) set_target_properties (gif2h5 PROPERTIES FOLDER tools/hl) @@ -30,7 +29,6 @@ set (hdf2gif_SOURCES ${HDF5_HL_TOOLS_GIF2H5_SOURCE_DIR}/hdfgifwr.c ) add_executable (h52gif ${hdf2gif_SOURCES}) -TARGET_NAMING (h52gif STATIC) TARGET_C_PROPERTIES (h52gif STATIC " " " ") target_link_libraries (h52gif ${HDF5_HL_LIB_TARGET} ${HDF5_LIB_TARGET} ${HDF5_TOOLS_LIB_TARGET}) set_target_properties (h52gif PROPERTIES FOLDER tools/hl) @@ -44,7 +42,6 @@ if (BUILD_TESTING) # -------------------------------------------------------------------- if (HDF5_BUILD_GENERATORS) add_executable (hl_h52gifgentest ${HDF5_HL_TOOLS_GIF2H5_SOURCE_DIR}/h52gifgentst.c) - TARGET_NAMING (hl_h52gifgentest STATIC) TARGET_C_PROPERTIES (hl_h52gifgentest STATIC " " " ") target_link_libraries (hl_h52gifgentest ${HDF5_HL_LIB_TARGET} ${HDF5_LIB_TARGET}) set_target_properties (hl_h52gifgentest PROPERTIES FOLDER generator/tools/hl) diff --git a/hl/tools/h5watch/CMakeLists.txt b/hl/tools/h5watch/CMakeLists.txt index 6b8d5f2..d0764c9 100644 --- a/hl/tools/h5watch/CMakeLists.txt +++ b/hl/tools/h5watch/CMakeLists.txt @@ -14,7 +14,6 @@ include_directories (${HDF5_HL_TOOLS_DIR}/src) include_directories (${HDF5_HL_TOOLS_H5WATCH_SOURCE_DIR}) add_executable (h5watch ${H5WATCH_SOURCES}) -TARGET_NAMING (h5watch STATIC) TARGET_C_PROPERTIES (h5watch STATIC " " " ") target_link_libraries (h5watch ${HDF5_HL_LIB_TARGET} ${HDF5_LIB_TARGET} ${HDF5_TOOLS_LIB_TARGET}) set_target_properties (h5watch PROPERTIES FOLDER tools/hl) @@ -27,7 +26,6 @@ if (BUILD_TESTING) ${HDF5_HL_TOOLS_H5WATCH_SOURCE_DIR}/swmr_check_compat_vfd.c ) add_executable (hl_swmr_check_compat_vfd ${hl_swmr_check_compat_vfd_SOURCES}) - TARGET_NAMING (hl_swmr_check_compat_vfd STATIC) TARGET_C_PROPERTIES (hl_swmr_check_compat_vfd STATIC " " " ") target_link_libraries (hl_swmr_check_compat_vfd ${HDF5_HL_LIB_TARGET} ${HDF5_LIB_TARGET} ${HDF5_TOOLS_LIB_TARGET}) set_target_properties (hl_swmr_check_compat_vfd PROPERTIES FOLDER tools/hl) @@ -37,13 +35,11 @@ if (BUILD_TESTING) ${HDF5_HL_TOOLS_H5WATCH_SOURCE_DIR}/extend_dset.c ) add_executable (extend_dset ${extend_dset_SOURCES}) - TARGET_NAMING (extend_dset STATIC) TARGET_C_PROPERTIES (extend_dset STATIC " " " ") target_link_libraries (extend_dset ${HDF5_HL_LIB_TARGET} ${HDF5_TEST_LIB_TARGET} ${HDF5_LIB_TARGET} ${HDF5_TOOLS_LIB_TARGET}) set_target_properties (extend_dset PROPERTIES FOLDER tools/hl) add_executable (h5watchgentest ${HDF5_HL_TOOLS_H5WATCH_SOURCE_DIR}/h5watchgentest.c) - TARGET_NAMING (h5watchgentest STATIC) TARGET_C_PROPERTIES (h5watchgentest STATIC " " " ") target_link_libraries (h5watchgentest ${HDF5_HL_LIB_TARGET} ${HDF5_LIB_TARGET}) set_target_properties (h5watchgentest PROPERTIES FOLDER generator/tools/hl) diff --git a/java/examples/datasets/CMakeLists.txt b/java/examples/datasets/CMakeLists.txt index dd007f5..3e8bc8b 100644 --- a/java/examples/datasets/CMakeLists.txt +++ b/java/examples/datasets/CMakeLists.txt @@ -62,13 +62,7 @@ foreach (HDFJAVA_JAR ${CMAKE_JAVA_INCLUDE_PATH}) endforeach () MACRO (ADD_H5_TEST resultfile resultcode) - if (HDF5_BUILD_TYPE MATCHES Debug) - if (WIN32) - set (CMD_ARGS "-Dhdf.hdf5lib.H5.loadLibraryName=hdf5_java_D;") - else () - set (CMD_ARGS "-Dhdf.hdf5lib.H5.loadLibraryName=hdf5_java_debug;") - endif () - endif () + set (CMD_ARGS "-Dhdf.hdf5lib.H5.loadLibraryName=$:_DEBUG>>;") add_test ( NAME JAVA_datasets-${resultfile} COMMAND "${CMAKE_COMMAND}" diff --git a/java/examples/datatypes/CMakeLists.txt b/java/examples/datatypes/CMakeLists.txt index fac8158..b79ba64 100644 --- a/java/examples/datatypes/CMakeLists.txt +++ b/java/examples/datatypes/CMakeLists.txt @@ -62,13 +62,7 @@ foreach (HDFJAVA_JAR ${CMAKE_JAVA_INCLUDE_PATH}) endforeach () MACRO (ADD_H5_TEST resultfile resultcode) - if (HDF5_BUILD_TYPE MATCHES Debug) - if (WIN32) - set (CMD_ARGS "-Dhdf.hdf5lib.H5.loadLibraryName=hdf5_java_D;") - else () - set (CMD_ARGS "-Dhdf.hdf5lib.H5.loadLibraryName=hdf5_java_debug;") - endif () - endif () + set (CMD_ARGS "-Dhdf.hdf5lib.H5.loadLibraryName=$:_DEBUG>>;") add_test ( NAME JAVA_datatypes-${resultfile} COMMAND "${CMAKE_COMMAND}" diff --git a/java/examples/groups/CMakeLists.txt b/java/examples/groups/CMakeLists.txt index 7f2801a..56c92fe 100644 --- a/java/examples/groups/CMakeLists.txt +++ b/java/examples/groups/CMakeLists.txt @@ -61,13 +61,7 @@ endforeach () add_custom_target(H5Ex_G_Visit_files ALL COMMENT "Copying files needed by H5Ex_G_Visit tests" DEPENDS ${H5Ex_G_Visit_files_list}) MACRO (ADD_H5_TEST resultfile resultcode) - if (HDF5_BUILD_TYPE MATCHES Debug) - if (WIN32) - set (CMD_ARGS "-Dhdf.hdf5lib.H5.loadLibraryName=hdf5_java_D;") - else () - set (CMD_ARGS "-Dhdf.hdf5lib.H5.loadLibraryName=hdf5_java_debug;") - endif () - endif () + set (CMD_ARGS "-Dhdf.hdf5lib.H5.loadLibraryName=$:_DEBUG>>;") add_test ( NAME JAVA_groups-${resultfile} COMMAND "${CMAKE_COMMAND}" diff --git a/java/examples/intro/CMakeLists.txt b/java/examples/intro/CMakeLists.txt index a21d369..495ec5e 100644 --- a/java/examples/intro/CMakeLists.txt +++ b/java/examples/intro/CMakeLists.txt @@ -63,13 +63,7 @@ foreach (example ${HDF_JAVA_OBJECT_EXAMPLES}) endforeach () MACRO (ADD_H5_TEST resultfile resultcode) - if (HDF5_BUILD_TYPE MATCHES Debug) - if (WIN32) - set (CMD_ARGS "-Dhdf.hdf5lib.H5.loadLibraryName=hdf5_java_D;") - else () - set (CMD_ARGS "-Dhdf.hdf5lib.H5.loadLibraryName=hdf5_java_debug;") - endif () - endif () + set (CMD_ARGS "-Dhdf.hdf5lib.H5.loadLibraryName=$:_DEBUG>>;") add_test ( NAME JAVA_intro-${resultfile} COMMAND "${CMAKE_COMMAND}" diff --git a/java/src/jni/CMakeLists.txt b/java/src/jni/CMakeLists.txt index 90343b2..ea9665b 100644 --- a/java/src/jni/CMakeLists.txt +++ b/java/src/jni/CMakeLists.txt @@ -57,9 +57,7 @@ SET_GLOBAL_VARIABLE (HDF5_LIBRARIES_TO_EXPORT "${HDF5_LIBRARIES_TO_EXPORT};${HDF H5_SET_LIB_OPTIONS (${HDF5_JAVA_JNI_LIB_TARGET} ${HDF5_JAVA_JNI_LIB_NAME} SHARED ${HDF5_JAVA_PACKAGE_SOVERSION}) if (WIN32) get_filename_component (HDF5_JAVA_JNI_DLL_NAME ${HDF5_JAVA_JNI_LIB_TARGET} NAME_WE) - if (HDF5_BUILD_TYPE MATCHES Debug) - set (HDF5_JAVA_JNI_DLL_NAME "${HDF5_JAVA_JNI_DLL_NAME}_D") - endif () + set (HDF5_JAVA_JNI_DLL_NAME "${HDF5_JAVA_JNI_DLL_NAME}$<$:_D>") # message (STATUS "HDF5_JAVA_JNI_DLL_NAME: ${HDF5_JAVA_JNI_DLL_NAME}") if (BUILD_TESTING) add_custom_target (HDF5_JAVA_JNI-Test-Copy ALL diff --git a/java/test/CMakeLists.txt b/java/test/CMakeLists.txt index fadc1ea..49cda32 100644 --- a/java/test/CMakeLists.txt +++ b/java/test/CMakeLists.txt @@ -88,14 +88,7 @@ endforeach () set (CMAKE_JAVA_CLASSPATH "${CMAKE_JAVA_CLASSPATH}${CMAKE_JAVA_INCLUDE_FLAG_SEP}${${HDF5_JAVA_TEST_LIB_TARGET}_JAR_FILE}") set (testfilter "OK (598 tests)") -if (HDF5_BUILD_TYPE MATCHES Debug) - if (WIN32) - set (CMD_ARGS "-Dhdf.hdf5lib.H5.loadLibraryName=hdf5_java_D;") - else () - set (CMD_ARGS "-Dhdf.hdf5lib.H5.loadLibraryName=hdf5_java_debug;") - endif () -endif () - + set (CMD_ARGS "-Dhdf.hdf5lib.H5.loadLibraryName=$:_DEBUG>>;") add_test ( NAME JUnit-interface-clearall-objects COMMAND ${CMAKE_COMMAND} diff --git a/release_docs/RELEASE.txt b/release_docs/RELEASE.txt index b42724f..264d315 100644 --- a/release_docs/RELEASE.txt +++ b/release_docs/RELEASE.txt @@ -59,7 +59,7 @@ New Features Refactor use of CMAKE_BUILD_TYPE for new variable, which understands the type of generator in use. - Added new configuration macros to use new HDF5_BUILD_TYPE variable. This + Added new configuration macros to use new HDF_BUILD_TYPE variable. This variable is set correctly for the type of generator being used for the build. (ADB - 2018/01/08, HDFFV-10385, HDFFV-10296) @@ -102,13 +102,15 @@ New Features on the virtual file, using a data access property list (DAPL), allows the source files to located at an absolute or relative path to the virtual file. + Private utility functions in H5D and H5L packages merged into single + function in H5F package. New public APIs: herr_t H5Pset_virtual_prefix(hid_t dapl_id, const char* prefix); ssize_t H5Pget_virtual_prefix(hid_t dapl_id, char* prefix /*out*/, size_t size); The prefix can also be set with an environment variable, HDF5_VDS_PREFIX. - (ADB - 2017/12/12, HDFFV-9724) + (ADB - 2017/12/12, HDFFV-9724, HDFFV-10361) - H5FDdriver_query() API call added to the C library. @@ -411,7 +413,7 @@ Bug Fixes since HDF5-1.10.1 release generators (Visual Studio and XCode) and is optional for single config generators. Created a new macro to check GLOBAL PROPERTY -> GENERATOR_IS_MULTI_CONFIG - Created two new HDF variable, HDF5_BUILD_TYPE and HDF5_CFG_BUILD_TYPE. + Created two new HDF variable, HDF_BUILD_TYPE and HDF_CFG_BUILD_TYPE. Defaults for these variables is "Release". (ADB - 2018/01/10, HDFFV-10385) @@ -506,6 +508,32 @@ Bug Fixes since HDF5-1.10.1 release Tools ----- + - h5repack + + h5repack incorrectly searched internal object table for name. + + h5repack would search the table of objects for a name, if the + name did not match it tried to determine if the name without a + leading slash would match. The logic was flawed! The table + stored names(paths) without a leading slash and did a strstr + of the table path to the name. + The assumption was that if there was a difference of one then + it was a match, however "pressure" would match "/pressure" as + well as "/pressure1", "/pressure2", etc. Changed logic to remove + any leading slash and then do a full compare of the name. + + (ADB - 2018/01/18, HDFFV-10393) + + - h5repack + + h5repack failed to handle more then 9 chars for int conversion. + + User defined filter parameter conversions would fail for integers + larger then 9 characters. Increased local variable array for storing + the current command line parameter to prevent buffer overflows. + + (ADB - 2018/01/17, HDFFV-10392) + - h5diff h5diff seg faulted if comparing VL strings against fixed strings. diff --git a/release_docs/USING_HDF5_CMake.txt b/release_docs/USING_HDF5_CMake.txt index ecf972d..5993a0f 100644 --- a/release_docs/USING_HDF5_CMake.txt +++ b/release_docs/USING_HDF5_CMake.txt @@ -37,7 +37,7 @@ I. Preconditions 1. We suggest you obtain the latest CMake for windows from the Kitware web site. The HDF5 1.10.x product requires a minimum CMake version - of 3.2.2. + of 3.10.1. 2. You have installed the HDF5 library built with CMake, by executing the HDF Install Utility (the *.msi file in the binary package for @@ -101,10 +101,10 @@ These steps are described in more detail below. * Unix Makefiles * Visual Studio 12 2013 * Visual Studio 12 2013 Win64 - * Visual Studio 11 2012 - * Visual Studio 11 2012 Win64 * Visual Studio 14 2015 * Visual Studio 14 2015 Win64 + * Visual Studio 15 2017 + * Visual Studio 15 2017 Win64 is: * BUILD_TESTING:BOOL=ON @@ -180,7 +180,7 @@ Given the preconditions in section I, create a CMakeLists.txt file at the source root. Include the following text in the file: ########################################################## -cmake_minimum_required (VERSION 3.2.2) +cmake_minimum_required (VERSION 3.10.1) project (HDF5MyApp C CXX) set (LIB_TYPE STATIC) # or SHARED @@ -194,7 +194,6 @@ set (LINK_LIBS ${LINK_LIBS} ${HDF5_C_${LIB_TYPE}_LIBRARY}) set (example hdf_example) add_executable (${example} ${PROJECT_SOURCE_DIR}/${example}.c) -TARGET_NAMING (${example} ${LIB_TYPE}) TARGET_C_PROPERTIES (${example} ${LIB_TYPE} " " " ") target_link_libraries (${example} ${LINK_LIBS}) diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index 713f2bd..5e0c990 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -172,13 +172,11 @@ set (testhdf5_SOURCES #-- Adding test for testhdf5 add_executable (testhdf5 ${testhdf5_SOURCES}) -TARGET_NAMING (testhdf5 STATIC) TARGET_C_PROPERTIES (testhdf5 STATIC " " " ") target_link_libraries (testhdf5 ${HDF5_TEST_LIB_TARGET}) set_target_properties (testhdf5 PROPERTIES FOLDER test) if (BUILD_SHARED_LIBS) add_executable (testhdf5-shared ${testhdf5_SOURCES}) - TARGET_NAMING (testhdf5-shared SHARED) TARGET_C_PROPERTIES (testhdf5-shared SHARED " " " ") target_link_libraries (testhdf5-shared PUBLIC ${HDF5_TEST_LIBSH_TARGET}) set_target_properties (testhdf5-shared PROPERTIES FOLDER test) @@ -186,13 +184,11 @@ endif () MACRO (ADD_H5_EXE file) add_executable (${file} ${HDF5_TEST_SOURCE_DIR}/${file}.c) - TARGET_NAMING (${file} STATIC) TARGET_C_PROPERTIES (${file} STATIC " " " ") target_link_libraries (${file} PUBLIC ${HDF5_TEST_LIB_TARGET}) set_target_properties (${file} PROPERTIES FOLDER test) if (BUILD_SHARED_LIBS) add_executable (${file}-shared ${HDF5_TEST_SOURCE_DIR}/${file}.c) - TARGET_NAMING (${file}-shared SHARED) TARGET_C_PROPERTIES (${file}-shared SHARED " " " ") target_link_libraries (${file}-shared PUBLIC ${HDF5_TEST_LIBSH_TARGET}) set_target_properties (${file}-shared PROPERTIES FOLDER test) @@ -299,7 +295,6 @@ add_executable (cache_image ${HDF5_TEST_SOURCE_DIR}/cache_image.c ${HDF5_TEST_SOURCE_DIR}/genall5.c ) -TARGET_NAMING (cache_image STATIC) TARGET_C_PROPERTIES (cache_image STATIC " " " ") target_link_libraries (cache_image ${HDF5_LIB_TARGET} ${HDF5_TEST_LIB_TARGET}) set_target_properties (cache_image PROPERTIES FOLDER test) @@ -308,7 +303,6 @@ if (BUILD_SHARED_LIBS) ${HDF5_TEST_SOURCE_DIR}/cache_image.c ${HDF5_TEST_SOURCE_DIR}/genall5.c ) - TARGET_NAMING (cache_image-shared SHARED) TARGET_C_PROPERTIES (cache_image-shared SHARED " " " ") target_link_libraries (cache_image-shared ${HDF5_TEST_LIBSH_TARGET} ${HDF5_LIBSH_TARGET}) set_target_properties (cache_image-shared PROPERTIES FOLDER test) @@ -316,13 +310,11 @@ endif () #-- Adding test for hyperslab add_executable (hyperslab ${HDF5_TEST_SOURCE_DIR}/hyperslab.c) -TARGET_NAMING (hyperslab STATIC) TARGET_C_PROPERTIES (hyperslab STATIC " " " ") target_link_libraries (hyperslab ${HDF5_LIB_TARGET} ${HDF5_TEST_LIB_TARGET}) set_target_properties (hyperslab PROPERTIES FOLDER test) if (BUILD_SHARED_LIBS) add_executable (hyperslab-shared ${HDF5_TEST_SOURCE_DIR}/hyperslab.c) - TARGET_NAMING (hyperslab-shared SHARED) TARGET_C_PROPERTIES (hyperslab-shared SHARED " " " ") target_link_libraries (hyperslab-shared ${HDF5_TEST_LIBSH_TARGET} ${HDF5_LIBSH_TARGET}) set_target_properties (hyperslab-shared PROPERTIES FOLDER test) @@ -342,7 +334,6 @@ add_executable (ttsafe ${HDF5_TEST_SOURCE_DIR}/ttsafe_cancel.c ${HDF5_TEST_SOURCE_DIR}/ttsafe_acreate.c ) -TARGET_NAMING (ttsafe STATIC) TARGET_C_PROPERTIES (ttsafe STATIC " " " ") target_link_libraries (ttsafe ${HDF5_LIB_TARGET} ${HDF5_TEST_LIB_TARGET}) set_target_properties (ttsafe PROPERTIES FOLDER test) @@ -354,7 +345,6 @@ if (BUILD_SHARED_LIBS) ${HDF5_TEST_SOURCE_DIR}/ttsafe_cancel.c ${HDF5_TEST_SOURCE_DIR}/ttsafe_acreate.c ) - TARGET_NAMING (ttsafe-shared SHARED) TARGET_C_PROPERTIES (ttsafe-shared SHARED " " " ") target_link_libraries (ttsafe-shared ${HDF5_TEST_LIBSH_TARGET} ${HDF5_LIBSH_TARGET}) set_target_properties (ttsafe-shared PROPERTIES FOLDER test) @@ -386,7 +376,6 @@ endforeach () # This has to be copied to the test directory for execve() to find it # and it can't be renamed (i.e., no -shared). add_executable (accum_swmr_reader ${HDF5_TEST_SOURCE_DIR}/accum_swmr_reader.c) -TARGET_NAMING (accum_swmr_reader STATIC) TARGET_C_PROPERTIES (accum_swmr_reader STATIC " " " ") target_link_libraries (accum_swmr_reader ${HDF5_LIB_TARGET} ${HDF5_TEST_LIB_TARGET}) set_target_properties (accum_swmr_reader PROPERTIES FOLDER test) @@ -414,13 +403,11 @@ endif () ############################################################################## if (BUILD_SHARED_LIBS) add_executable (filter_plugin ${HDF5_TEST_SOURCE_DIR}/filter_plugin.c) - TARGET_NAMING (filter_plugin SHARED) TARGET_C_PROPERTIES (filter_plugin SHARED " " " ") target_link_libraries (filter_plugin ${HDF5_TEST_LIB_TARGET}) set_target_properties (filter_plugin PROPERTIES FOLDER test) else () add_executable (filter_plugin ${HDF5_TEST_SOURCE_DIR}/filter_plugin.c) - TARGET_NAMING (filter_plugin STATIC) TARGET_C_PROPERTIES (filter_plugin STATIC " " " ") target_link_libraries (filter_plugin ${HDF5_TEST_LIB_TARGET}) set_target_properties (filter_plugin PROPERTIES FOLDER test) @@ -431,13 +418,11 @@ endif () ############################################################################## set (use_append_chunk_SOURCES ${HDF5_TEST_SOURCE_DIR}/use_append_chunk.c ${HDF5_TEST_SOURCE_DIR}/use_common.c) add_executable (use_append_chunk ${use_append_chunk_SOURCES}) -TARGET_NAMING (use_append_chunk STATIC) TARGET_C_PROPERTIES (use_append_chunk STATIC " " " ") target_link_libraries (use_append_chunk ${HDF5_LIB_TARGET} ${HDF5_TEST_LIB_TARGET}) set_target_properties (use_append_chunk PROPERTIES FOLDER test) if (BUILD_SHARED_LIBS) add_executable (use_append_chunk-shared ${use_append_chunk_SOURCES}) - TARGET_NAMING (use_append_chunk-shared SHARED) TARGET_C_PROPERTIES (use_append_chunk-shared SHARED " " " ") target_link_libraries (use_append_chunk-shared ${HDF5_TEST_LIBSH_TARGET} ${HDF5_LIBSH_TARGET}) set_target_properties (use_append_chunk-shared PROPERTIES FOLDER test) @@ -445,13 +430,11 @@ endif () set (use_append_mchunks_SOURCES ${HDF5_TEST_SOURCE_DIR}/use_append_mchunks.c ${HDF5_TEST_SOURCE_DIR}/use_common.c) add_executable (use_append_mchunks ${use_append_mchunks_SOURCES}) -TARGET_NAMING (use_append_mchunks STATIC) TARGET_C_PROPERTIES (use_append_mchunks STATIC " " " ") target_link_libraries (use_append_mchunks ${HDF5_LIB_TARGET} ${HDF5_TEST_LIB_TARGET}) set_target_properties (use_append_mchunks PROPERTIES FOLDER test) if (BUILD_SHARED_LIBS) add_executable (use_append_mchunks-shared ${use_append_mchunks_SOURCES}) - TARGET_NAMING (use_append_mchunks-shared SHARED) TARGET_C_PROPERTIES (use_append_mchunks-shared SHARED " " " ") target_link_libraries (use_append_mchunks-shared ${HDF5_TEST_LIBSH_TARGET} ${HDF5_LIBSH_TARGET}) set_target_properties (use_append_mchunks-shared PROPERTIES FOLDER test) @@ -459,13 +442,11 @@ endif () set (use_disable_mdc_flushes_SOURCES ${HDF5_TEST_SOURCE_DIR}/use_disable_mdc_flushes.c) add_executable (use_disable_mdc_flushes ${use_disable_mdc_flushes_SOURCES}) -TARGET_NAMING (use_disable_mdc_flushes STATIC) TARGET_C_PROPERTIES (use_disable_mdc_flushes STATIC " " " ") target_link_libraries (use_disable_mdc_flushes ${HDF5_LIB_TARGET} ${HDF5_TEST_LIB_TARGET}) set_target_properties (use_disable_mdc_flushes PROPERTIES FOLDER test) if (BUILD_SHARED_LIBS) add_executable (use_disable_mdc_flushes-shared ${use_disable_mdc_flushes_SOURCES}) - TARGET_NAMING (use_disable_mdc_flushes-shared SHARED) TARGET_C_PROPERTIES (use_disable_mdc_flushes-shared SHARED " " " ") target_link_libraries (use_disable_mdc_flushes-shared ${HDF5_TEST_LIBSH_TARGET} ${HDF5_LIBSH_TARGET}) set_target_properties (use_disable_mdc_flushes-shared PROPERTIES FOLDER test) diff --git a/test/CMakeTests.cmake b/test/CMakeTests.cmake index a304485..e6b364c 100644 --- a/test/CMakeTests.cmake +++ b/test/CMakeTests.cmake @@ -1133,7 +1133,7 @@ if (HDF5_TEST_VFD) macro (CHECK_VFD_TEST vfdtest vfdname resultcode) if ("${vfdtest}" STREQUAL "flush1" OR "${vfdtest}" STREQUAL "flush2") if ("${vfdname}" STREQUAL "multi" OR "${vfdname}" STREQUAL "split") - if (NOT BUILD_SHARED_LIBS AND NOT HDF5_BUILD_TYPE MATCHES Debug) + if (NOT BUILD_SHARED_LIBS AND NOT ${HDF_CFG_NAME} MATCHES "Debug") add_test (NAME VFD-${vfdname}-${vfdtest} COMMAND "${CMAKE_COMMAND}" -D "TEST_PROGRAM=$" @@ -1345,7 +1345,6 @@ endif () if (HDF5_BUILD_GENERATORS) macro (ADD_H5_GENERATOR genfile) add_executable (${genfile} ${HDF5_TEST_SOURCE_DIR}/${genfile}.c) - TARGET_NAMING (${genfile} STATIC) TARGET_C_PROPERTIES (${genfile} STATIC " " " ") target_link_libraries (${genfile} ${HDF5_TEST_LIB_TARGET} ${HDF5_LIB_TARGET}) set_target_properties (${genfile} PROPERTIES FOLDER generator/test) diff --git a/testpar/CMakeLists.txt b/testpar/CMakeLists.txt index db61d35..d0b74b0 100644 --- a/testpar/CMakeLists.txt +++ b/testpar/CMakeLists.txt @@ -28,7 +28,6 @@ set (testphdf5_SOURCES #-- Adding test for testhdf5 add_executable (testphdf5 ${testphdf5_SOURCES}) -TARGET_NAMING (testphdf5 STATIC) TARGET_C_PROPERTIES (testphdf5 STATIC " " " ") target_link_libraries (testphdf5 PUBLIC ${HDF5_TEST_LIB_TARGET} ${HDF5_LIB_TARGET}) if (HDF5_ENABLE_PARALLEL AND MPI_C_FOUND) @@ -38,7 +37,6 @@ set_target_properties (testphdf5 PROPERTIES FOLDER test/par) MACRO (ADD_H5P_EXE file) add_executable (${file} ${HDF5_TEST_PAR_SOURCE_DIR}/${file}.c) - TARGET_NAMING (${file} STATIC) TARGET_C_PROPERTIES (${file} STATIC " " " ") target_link_libraries (${file} PUBLIC ${HDF5_TEST_LIB_TARGET} ${HDF5_LIB_TARGET}) if (HDF5_ENABLE_PARALLEL AND MPI_C_FOUND) diff --git a/tools/src/h5copy/CMakeLists.txt b/tools/src/h5copy/CMakeLists.txt index 23c8fae..1d9c11e 100644 --- a/tools/src/h5copy/CMakeLists.txt +++ b/tools/src/h5copy/CMakeLists.txt @@ -10,7 +10,6 @@ INCLUDE_DIRECTORIES (${HDF5_TOOLS_DIR}/lib) # Add the h5copy and test executables # -------------------------------------------------------------------- add_executable (h5copy ${HDF5_TOOLS_SRC_H5COPY_SOURCE_DIR}/h5copy.c) -TARGET_NAMING (h5copy STATIC) TARGET_C_PROPERTIES (h5copy STATIC " " " ") target_link_libraries (h5copy ${HDF5_TOOLS_LIB_TARGET} ${HDF5_LIB_TARGET}) set_target_properties (h5copy PROPERTIES FOLDER tools) @@ -20,7 +19,6 @@ set (H5_DEP_EXECUTABLES h5copy) if (BUILD_SHARED_LIBS) add_executable (h5copy-shared ${HDF5_TOOLS_SRC_H5COPY_SOURCE_DIR}/h5copy.c) - TARGET_NAMING (h5copy-shared SHARED) TARGET_C_PROPERTIES (h5copy-shared SHARED " " " ") target_link_libraries (h5copy-shared ${HDF5_TOOLS_LIBSH_TARGET} ${HDF5_LIBSH_TARGET}) set_target_properties (h5copy-shared PROPERTIES FOLDER tools) diff --git a/tools/src/h5diff/CMakeLists.txt b/tools/src/h5diff/CMakeLists.txt index b0cf66e..a485de7 100644 --- a/tools/src/h5diff/CMakeLists.txt +++ b/tools/src/h5diff/CMakeLists.txt @@ -13,7 +13,6 @@ add_executable (h5diff ${HDF5_TOOLS_SRC_H5DIFF_SOURCE_DIR}/h5diff_common.c ${HDF5_TOOLS_SRC_H5DIFF_SOURCE_DIR}/h5diff_main.c ) -TARGET_NAMING (h5diff STATIC) TARGET_C_PROPERTIES (h5diff STATIC " " " ") target_link_libraries (h5diff ${HDF5_TOOLS_LIB_TARGET} ${HDF5_LIB_TARGET}) set_target_properties (h5diff PROPERTIES FOLDER tools) @@ -26,7 +25,6 @@ if (BUILD_SHARED_LIBS) ${HDF5_TOOLS_SRC_H5DIFF_SOURCE_DIR}/h5diff_common.c ${HDF5_TOOLS_SRC_H5DIFF_SOURCE_DIR}/h5diff_main.c ) - TARGET_NAMING (h5diff-shared SHARED) TARGET_C_PROPERTIES (h5diff-shared SHARED " " " ") target_link_libraries (h5diff-shared ${HDF5_TOOLS_LIBSH_TARGET} ${HDF5_LIBSH_TARGET}) set_target_properties (h5diff-shared PROPERTIES FOLDER tools) @@ -40,7 +38,6 @@ if (H5_HAVE_PARALLEL) ${HDF5_TOOLS_SRC_H5DIFF_SOURCE_DIR}/h5diff_common.c ${HDF5_TOOLS_SRC_H5DIFF_SOURCE_DIR}/ph5diff_main.c ) - TARGET_NAMING (ph5diff STATIC) TARGET_C_PROPERTIES (ph5diff STATIC " " " ") target_link_libraries (ph5diff ${HDF5_TOOLS_LIB_TARGET} ${HDF5_LIB_TARGET}) set_target_properties (ph5diff PROPERTIES FOLDER tools) diff --git a/tools/src/h5dump/CMakeLists.txt b/tools/src/h5dump/CMakeLists.txt index c58b20c..bcfa89c 100644 --- a/tools/src/h5dump/CMakeLists.txt +++ b/tools/src/h5dump/CMakeLists.txt @@ -14,7 +14,6 @@ add_executable (h5dump ${HDF5_TOOLS_SRC_H5DUMP_SOURCE_DIR}/h5dump_ddl.c ${HDF5_TOOLS_SRC_H5DUMP_SOURCE_DIR}/h5dump_xml.c ) -TARGET_NAMING (h5dump STATIC) TARGET_C_PROPERTIES (h5dump STATIC " " " ") target_link_libraries (h5dump ${HDF5_TOOLS_LIB_TARGET} ${HDF5_LIB_TARGET}) set_target_properties (h5dump PROPERTIES FOLDER tools) @@ -28,7 +27,6 @@ if (BUILD_SHARED_LIBS) ${HDF5_TOOLS_SRC_H5DUMP_SOURCE_DIR}/h5dump_ddl.c ${HDF5_TOOLS_SRC_H5DUMP_SOURCE_DIR}/h5dump_xml.c ) - TARGET_NAMING (h5dump-shared SHARED) TARGET_C_PROPERTIES (h5dump-shared SHARED " " " ") target_link_libraries (h5dump-shared ${HDF5_TOOLS_LIBSH_TARGET} ${HDF5_LIBSH_TARGET}) set_target_properties (h5dump-shared PROPERTIES FOLDER tools) diff --git a/tools/src/h5format_convert/CMakeLists.txt b/tools/src/h5format_convert/CMakeLists.txt index 1e3e62f..0f6d8d9 100644 --- a/tools/src/h5format_convert/CMakeLists.txt +++ b/tools/src/h5format_convert/CMakeLists.txt @@ -10,7 +10,6 @@ INCLUDE_DIRECTORIES (${HDF5_TOOLS_DIR}/lib) # Add the h5format_convert executables # -------------------------------------------------------------------- add_executable (h5format_convert ${HDF5_TOOLS_SRC_H5FC_SOURCE_DIR}/h5format_convert.c) -TARGET_NAMING (h5format_convert STATIC) TARGET_C_PROPERTIES (h5format_convert STATIC " " " ") target_link_libraries (h5format_convert ${HDF5_TOOLS_LIB_TARGET} ${HDF5_LIB_TARGET}) set_target_properties (h5format_convert PROPERTIES FOLDER tools) diff --git a/tools/src/h5import/CMakeLists.txt b/tools/src/h5import/CMakeLists.txt index bebc6d8..4aa8938 100644 --- a/tools/src/h5import/CMakeLists.txt +++ b/tools/src/h5import/CMakeLists.txt @@ -10,7 +10,6 @@ INCLUDE_DIRECTORIES (${HDF5_TOOLS_DIR}/lib) # Add the h5import executables # -------------------------------------------------------------------- add_executable (h5import ${HDF5_TOOLS_SRC_H5IMPORT_SOURCE_DIR}/h5import.c) -TARGET_NAMING (h5import STATIC) TARGET_C_PROPERTIES (h5import STATIC " " " ") target_link_libraries (h5import ${HDF5_TOOLS_LIB_TARGET} ${HDF5_LIB_TARGET}) #set_target_properties (h5import PROPERTIES COMPILE_DEFINITIONS H5DEBUGIMPORT) diff --git a/tools/src/h5jam/CMakeLists.txt b/tools/src/h5jam/CMakeLists.txt index 1075180..fbd4250 100644 --- a/tools/src/h5jam/CMakeLists.txt +++ b/tools/src/h5jam/CMakeLists.txt @@ -10,14 +10,12 @@ INCLUDE_DIRECTORIES (${HDF5_TOOLS_DIR}/lib) # Add the h5jam executables # -------------------------------------------------------------------- add_executable (h5jam ${HDF5_TOOLS_SRC_H5JAM_SOURCE_DIR}/h5jam.c) -TARGET_NAMING (h5jam STATIC) TARGET_C_PROPERTIES (h5jam STATIC " " " ") target_link_libraries (h5jam ${HDF5_TOOLS_LIB_TARGET} ${HDF5_LIB_TARGET}) set_target_properties (h5jam PROPERTIES FOLDER tools) set_global_variable (HDF5_UTILS_TO_EXPORT "${HDF5_UTILS_TO_EXPORT};h5jam") add_executable (h5unjam ${HDF5_TOOLS_SRC_H5JAM_SOURCE_DIR}/h5unjam.c) -TARGET_NAMING (h5unjam STATIC) TARGET_C_PROPERTIES (h5unjam STATIC " " " ") target_link_libraries (h5unjam ${HDF5_TOOLS_LIB_TARGET} ${HDF5_LIB_TARGET}) set_target_properties (h5unjam PROPERTIES FOLDER tools) diff --git a/tools/src/h5ls/CMakeLists.txt b/tools/src/h5ls/CMakeLists.txt index 0e3d57f..703e55e 100644 --- a/tools/src/h5ls/CMakeLists.txt +++ b/tools/src/h5ls/CMakeLists.txt @@ -10,7 +10,6 @@ INCLUDE_DIRECTORIES (${HDF5_TOOLS_DIR}/lib) # Add the h5ls executable #----------------------------------------------------------------------------- add_executable (h5ls ${HDF5_TOOLS_SRC_H5LS_SOURCE_DIR}/h5ls.c) -TARGET_NAMING (h5ls STATIC) TARGET_C_PROPERTIES (h5ls STATIC " " " ") target_link_libraries (h5ls ${HDF5_TOOLS_LIB_TARGET} ${HDF5_LIB_TARGET}) set_target_properties (h5ls PROPERTIES FOLDER tools) @@ -20,7 +19,6 @@ set (H5_DEP_EXECUTABLES h5ls) if (BUILD_SHARED_LIBS) add_executable (h5ls-shared ${HDF5_TOOLS_SRC_H5LS_SOURCE_DIR}/h5ls.c) - TARGET_NAMING (h5ls-shared SHARED) TARGET_C_PROPERTIES (h5ls-shared SHARED " " " ") target_link_libraries (h5ls-shared ${HDF5_TOOLS_LIBSH_TARGET} ${HDF5_LIBSH_TARGET}) set_target_properties (h5ls-shared PROPERTIES FOLDER tools) diff --git a/tools/src/h5repack/CMakeLists.txt b/tools/src/h5repack/CMakeLists.txt index abf4c24..a646819 100644 --- a/tools/src/h5repack/CMakeLists.txt +++ b/tools/src/h5repack/CMakeLists.txt @@ -21,7 +21,6 @@ set (REPACK_COMMON_SOURCES ) add_executable (h5repack ${REPACK_COMMON_SOURCES} ${HDF5_TOOLS_SRC_H5REPACK_SOURCE_DIR}/h5repack_main.c) -TARGET_NAMING (h5repack STATIC) TARGET_C_PROPERTIES (h5repack STATIC " " " ") target_link_libraries (h5repack ${HDF5_TOOLS_LIB_TARGET} ${HDF5_LIB_TARGET}) set_target_properties (h5repack PROPERTIES FOLDER tools) @@ -31,7 +30,6 @@ set (H5_DEP_EXECUTABLES h5repack) if (BUILD_SHARED_LIBS) add_executable (h5repack-shared ${REPACK_COMMON_SOURCES} ${HDF5_TOOLS_SRC_H5REPACK_SOURCE_DIR}/h5repack_main.c) - TARGET_NAMING (h5repack-shared SHARED) TARGET_C_PROPERTIES (h5repack-shared SHARED " " " ") target_link_libraries (h5repack-shared ${HDF5_TOOLS_LIBSH_TARGET} ${HDF5_LIBSH_TARGET}) set_target_properties (h5repack-shared PROPERTIES FOLDER tools) diff --git a/tools/src/h5repack/h5repack_filters.c b/tools/src/h5repack/h5repack_filters.c index 067ebad..ae0bfd5 100644 --- a/tools/src/h5repack/h5repack_filters.c +++ b/tools/src/h5repack/h5repack_filters.c @@ -84,7 +84,8 @@ static int aux_find_obj(const char* name, /* object name from traverse list */ pack_opt_t *options, /* repack options */ pack_info_t *obj /*OUT*/) /* info about object to filter */ { - char *pdest; + char *pdest = NULL; + char *pname = NULL; int result; unsigned int i; @@ -94,11 +95,12 @@ static int aux_find_obj(const char* name, /* object name from traverse list */ return (int) i; } - pdest = HDstrstr(name, options->op_tbl->objs[i].path); - result = (int) (pdest - name); + pdest = options->op_tbl->objs[i].path; + if (pdest[0] == '/') pdest++; + pname = name; + if (pname[0] == '/') pname++; - /* found at position 1, meaning without '/' */ - if (pdest != NULL && result == 1) { + if (HDstrcmp(pdest, pname) == 0) { *obj = options->op_tbl->objs[i]; return (int) i; } diff --git a/tools/src/h5repack/h5repack_parse.c b/tools/src/h5repack/h5repack_parse.c index 05af197..f646ee7 100644 --- a/tools/src/h5repack/h5repack_parse.c +++ b/tools/src/h5repack/h5repack_parse.c @@ -45,9 +45,9 @@ obj_list_t* parse_filter(const char *str, unsigned *n_objs, filter_info_t *filt, int f, k, l, p, q, end_obj = -1, no_param = 0; unsigned j, n; char sobj[MAX_NC_NAME]; - char scomp[10] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; - char stype[6] = {0, 0, 0, 0, 0, 0}; - char smask[3] = {0, 0, 0}; + char scomp[16] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; + char stype[16] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; + char smask[16] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; obj_list_t* obj_list = NULL; unsigned pixels_per_block; @@ -116,7 +116,6 @@ obj_list_t* parse_filter(const char *str, unsigned *n_objs, filter_info_t *filt, if (c == '=' || i == len - 1) { if (c == '=') { /*one more parameter */ scomp[k] = '\0'; /*cut space */ - /*------------------------------------------------------------------------- * H5Z_FILTER_SZIP * szip has the format SZIP= @@ -236,8 +235,9 @@ obj_list_t* parse_filter(const char *str, unsigned *n_objs, filter_info_t *filt, filt->cd_nelmts = HDstrtoull(stype, NULL, 0); p = 0; } - else + else { filt->cd_values[j++] = (unsigned)HDstrtoul(stype, NULL, 0); + } q = 0; u++; /* skip ',' */ } diff --git a/tools/src/h5stat/CMakeLists.txt b/tools/src/h5stat/CMakeLists.txt index 60d3f7c..cde81ee 100644 --- a/tools/src/h5stat/CMakeLists.txt +++ b/tools/src/h5stat/CMakeLists.txt @@ -10,7 +10,6 @@ INCLUDE_DIRECTORIES (${HDF5_TOOLS_DIR}/lib) # Add the h5stat executables # -------------------------------------------------------------------- add_executable (h5stat ${HDF5_TOOLS_SRC_H5STAT_SOURCE_DIR}/h5stat.c) -TARGET_NAMING (h5stat STATIC) TARGET_C_PROPERTIES (h5stat STATIC " " " ") target_link_libraries (h5stat ${HDF5_TOOLS_LIB_TARGET} ${HDF5_LIB_TARGET}) set_target_properties (h5stat PROPERTIES FOLDER tools) @@ -20,7 +19,6 @@ set (H5_DEP_EXECUTABLES h5stat) if (BUILD_SHARED_LIBS) add_executable (h5stat-shared ${HDF5_TOOLS_SRC_H5STAT_SOURCE_DIR}/h5stat.c) - TARGET_NAMING (h5stat-shared SHARED) TARGET_C_PROPERTIES (h5stat-shared SHARED " " " ") target_link_libraries (h5stat-shared ${HDF5_TOOLS_LIBSH_TARGET} ${HDF5_LIBSH_TARGET}) set_target_properties (h5stat-shared PROPERTIES FOLDER tools) diff --git a/tools/src/misc/CMakeLists.txt b/tools/src/misc/CMakeLists.txt index 20c9171..313760f 100644 --- a/tools/src/misc/CMakeLists.txt +++ b/tools/src/misc/CMakeLists.txt @@ -11,28 +11,24 @@ INCLUDE_DIRECTORIES (${HDF5_TOOLS_DIR}/lib) # -------------------------------------------------------------------- #-- Misc Executables add_executable (h5debug ${HDF5_TOOLS_SRC_MISC_SOURCE_DIR}/h5debug.c) -TARGET_NAMING (h5debug STATIC) TARGET_C_PROPERTIES (h5debug STATIC " " " ") target_link_libraries (h5debug ${HDF5_LIB_TARGET} ${HDF5_TOOLS_LIB_TARGET}) set_target_properties (h5debug PROPERTIES FOLDER tools) set_global_variable (HDF5_UTILS_TO_EXPORT "${HDF5_UTILS_TO_EXPORT};h5debug") add_executable (h5repart ${HDF5_TOOLS_SRC_MISC_SOURCE_DIR}/h5repart.c) -TARGET_NAMING (h5repart STATIC) TARGET_C_PROPERTIES (h5repart STATIC " " " ") target_link_libraries (h5repart ${HDF5_LIB_TARGET} ${HDF5_TOOLS_LIB_TARGET}) set_target_properties (h5repart PROPERTIES FOLDER tools) set_global_variable (HDF5_UTILS_TO_EXPORT "${HDF5_UTILS_TO_EXPORT};h5repart") add_executable (h5mkgrp ${HDF5_TOOLS_SRC_MISC_SOURCE_DIR}/h5mkgrp.c) -TARGET_NAMING (h5mkgrp STATIC) TARGET_C_PROPERTIES (h5mkgrp STATIC " " " ") target_link_libraries (h5mkgrp ${HDF5_TOOLS_LIB_TARGET} ${HDF5_LIB_TARGET}) set_target_properties (h5mkgrp PROPERTIES FOLDER tools) set_global_variable (HDF5_UTILS_TO_EXPORT "${HDF5_UTILS_TO_EXPORT};h5mkgrp") add_executable (h5clear ${HDF5_TOOLS_SRC_MISC_SOURCE_DIR}/h5clear.c) -TARGET_NAMING (h5clear STATIC) TARGET_C_PROPERTIES (h5clear STATIC " " " ") target_link_libraries (h5clear ${HDF5_TOOLS_LIB_TARGET} ${HDF5_LIB_TARGET}) set_target_properties (h5clear PROPERTIES FOLDER tools) diff --git a/tools/test/h5copy/CMakeLists.txt b/tools/test/h5copy/CMakeLists.txt index c57cd5e..35aee35 100644 --- a/tools/test/h5copy/CMakeLists.txt +++ b/tools/test/h5copy/CMakeLists.txt @@ -12,7 +12,6 @@ INCLUDE_DIRECTORIES (${HDF5_TOOLS_DIR}/lib) if (HDF5_BUILD_GENERATORS) add_executable (h5copygentest ${HDF5_TOOLS_TEST_H5COPY_SOURCE_DIR}/h5copygentest.c) - TARGET_NAMING (h5copygentest STATIC) TARGET_C_PROPERTIES (h5copygentest STATIC " " " ") target_link_libraries (h5copygentest ${HDF5_LIB_TARGET}) set_target_properties (h5copygentest PROPERTIES FOLDER generator/tools) diff --git a/tools/test/h5diff/CMakeLists.txt b/tools/test/h5diff/CMakeLists.txt index 9a41fb3..def2e6d 100644 --- a/tools/test/h5diff/CMakeLists.txt +++ b/tools/test/h5diff/CMakeLists.txt @@ -11,7 +11,6 @@ INCLUDE_DIRECTORIES (${HDF5_TOOLS_DIR}/lib) # -------------------------------------------------------------------- if (HDF5_BUILD_GENERATORS) add_executable (h5diffgentest ${HDF5_TOOLS_TEST_H5DIFF_SOURCE_DIR}/h5diffgentest.c) - TARGET_NAMING (h5diffgentest STATIC) TARGET_C_PROPERTIES (h5diffgentest STATIC " " " ") target_link_libraries (h5diffgentest ${HDF5_LIB_TARGET}) set_target_properties (h5diffgentest PROPERTIES FOLDER generator/tools) diff --git a/tools/test/h5dump/CMakeLists.txt b/tools/test/h5dump/CMakeLists.txt index 89c7534..c4f2b95 100644 --- a/tools/test/h5dump/CMakeLists.txt +++ b/tools/test/h5dump/CMakeLists.txt @@ -39,7 +39,6 @@ INCLUDE_DIRECTORIES (${HDF5_TOOLS_DIR}/lib) # -------------------------------------------------------------------- if (HDF5_BUILD_GENERATORS) add_executable (h5dumpgentest ${HDF5_TOOLS_TEST_H5DUMP_SOURCE_DIR}/h5dumpgentest.c) - TARGET_NAMING (h5dumpgentest STATIC) TARGET_C_PROPERTIES (h5dumpgentest STATIC " " " ") target_link_libraries (h5dumpgentest ${HDF5_LIB_TARGET} ${HDF5_TOOLS_LIB_TARGET}) set_target_properties (h5dumpgentest PROPERTIES FOLDER generator/tools) diff --git a/tools/test/h5format_convert/CMakeLists.txt b/tools/test/h5format_convert/CMakeLists.txt index 7e47b13..497f463 100644 --- a/tools/test/h5format_convert/CMakeLists.txt +++ b/tools/test/h5format_convert/CMakeLists.txt @@ -10,14 +10,12 @@ INCLUDE_DIRECTORIES (${HDF5_TOOLS_DIR}/lib) # Add the h5format_convert test executables # -------------------------------------------------------------------- add_executable (h5fc_chk_idx ${HDF5_TOOLS_TEST_H5FC_SOURCE_DIR}/h5fc_chk_idx.c) - TARGET_NAMING (h5fc_chk_idx STATIC) TARGET_C_PROPERTIES (h5fc_chk_idx STATIC " " " ") target_link_libraries (h5fc_chk_idx ${HDF5_LIB_TARGET} ${HDF5_TOOLS_LIB_TARGET}) set_target_properties (h5fc_chk_idx PROPERTIES FOLDER tools) if (HDF5_BUILD_GENERATORS) add_executable (h5fc_gentest ${HDF5_TOOLS_TEST_H5FC_SOURCE_DIR}/h5fc_gentest.c) - TARGET_NAMING (h5fc_gentest STATIC) TARGET_C_PROPERTIES (h5fc_gentest STATIC " " " ") target_link_libraries (h5fc_gentest ${HDF5_LIB_TARGET} ${HDF5_TOOLS_LIB_TARGET}) set_target_properties (h5fc_gentest PROPERTIES FOLDER generator/tools) diff --git a/tools/test/h5import/CMakeLists.txt b/tools/test/h5import/CMakeLists.txt index 0d23e5d..36bfbdc 100644 --- a/tools/test/h5import/CMakeLists.txt +++ b/tools/test/h5import/CMakeLists.txt @@ -10,7 +10,6 @@ INCLUDE_DIRECTORIES (${HDF5_TOOLS_DIR}/lib) # Add the h5import executables # -------------------------------------------------------------------- add_executable (h5importtest ${HDF5_TOOLS_TEST_H5IMPORT_SOURCE_DIR}/h5importtest.c) - TARGET_NAMING (h5importtest STATIC) TARGET_C_PROPERTIES (h5importtest STATIC " " " ") target_link_libraries (h5importtest ${HDF5_LIB_TARGET} ${HDF5_TOOLS_LIB_TARGET}) set_target_properties (h5importtest PROPERTIES FOLDER tools) diff --git a/tools/test/h5jam/CMakeLists.txt b/tools/test/h5jam/CMakeLists.txt index 562b4f3..dbac14b 100644 --- a/tools/test/h5jam/CMakeLists.txt +++ b/tools/test/h5jam/CMakeLists.txt @@ -11,7 +11,6 @@ INCLUDE_DIRECTORIES (${HDF5_TOOLS_DIR}/lib) # -------------------------------------------------------------------- if (HDF5_BUILD_GENERATORS) add_executable (h5jamgentest ${HDF5_TOOLS_TEST_H5JAM_SOURCE_DIR}/h5jamgentest.c) - TARGET_NAMING (h5jamgentest STATIC) TARGET_C_PROPERTIES (testhdf5 STATIC " " " ") target_link_libraries (h5jamgentest ${HDF5_LIB_TARGET}) set_target_properties (h5jamgentest PROPERTIES FOLDER generator/tools) @@ -20,13 +19,11 @@ INCLUDE_DIRECTORIES (${HDF5_TOOLS_DIR}/lib) endif () add_executable (getub ${HDF5_TOOLS_TEST_H5JAM_SOURCE_DIR}/getub.c) -TARGET_NAMING (getub STATIC) TARGET_C_PROPERTIES (getub STATIC " " " ") target_link_libraries (getub ${HDF5_TOOLS_LIB_TARGET} ${HDF5_LIB_TARGET}) set_target_properties (getub PROPERTIES FOLDER tools) add_executable (tellub ${HDF5_TOOLS_TEST_H5JAM_SOURCE_DIR}/tellub.c) -TARGET_NAMING (tellub STATIC) TARGET_C_PROPERTIES (tellub STATIC " " " ") target_link_libraries (tellub ${HDF5_TOOLS_LIB_TARGET} ${HDF5_LIB_TARGET}) set_target_properties (tellub PROPERTIES FOLDER tools) diff --git a/tools/test/h5repack/CMakeLists.txt b/tools/test/h5repack/CMakeLists.txt index 9d67ec3..5996fff 100644 --- a/tools/test/h5repack/CMakeLists.txt +++ b/tools/test/h5repack/CMakeLists.txt @@ -12,7 +12,6 @@ INCLUDE_DIRECTORIES (${HDF5_TEST_SRC_DIR}) # Add h5Repack test executables # -------------------------------------------------------------------- add_executable (testh5repack_detect_szip ${HDF5_TOOLS_TEST_H5REPACK_SOURCE_DIR}/testh5repack_detect_szip.c) -TARGET_NAMING (testh5repack_detect_szip STATIC) TARGET_C_PROPERTIES (testh5repack_detect_szip STATIC " " " ") target_link_libraries (testh5repack_detect_szip ${HDF5_LIB_TARGET} ${HDF5_TOOLS_LIB_TARGET} ${HDF5_TEST_LIB_TARGET}) set_target_properties (testh5repack_detect_szip PROPERTIES FOLDER tools) @@ -27,7 +26,6 @@ set (REPACK_COMMON_SOURCES ${HDF5_TOOLS_SRC_H5REPACK_SOURCE_DIR}/h5repack.c ) add_executable (h5repacktest ${REPACK_COMMON_SOURCES} ${HDF5_TOOLS_TEST_H5REPACK_SOURCE_DIR}/h5repacktst.c) -TARGET_NAMING (h5repacktest STATIC) TARGET_C_PROPERTIES (h5repacktest STATIC " " " ") target_link_libraries (h5repacktest ${HDF5_TOOLS_LIB_TARGET} ${HDF5_TEST_LIB_TARGET}) set_target_properties (h5repacktest PROPERTIES FOLDER tools) diff --git a/tools/test/h5stat/CMakeLists.txt b/tools/test/h5stat/CMakeLists.txt index 10ac5e0..d2a1de2 100644 --- a/tools/test/h5stat/CMakeLists.txt +++ b/tools/test/h5stat/CMakeLists.txt @@ -11,7 +11,6 @@ INCLUDE_DIRECTORIES (${HDF5_TOOLS_DIR}/lib) # -------------------------------------------------------------------- if (HDF5_BUILD_GENERATORS) add_executable (h5stat_gentest ${HDF5_TOOLS_TEST_H5STAT_SOURCE_DIR}/h5stat_gentest.c) - TARGET_NAMING (h5stat_gentest STATIC) TARGET_C_PROPERTIES (h5stat_gentest STATIC " " " ") target_link_libraries (h5stat_gentest ${HDF5_LIB_TARGET}) set_target_properties (h5stat_gentest PROPERTIES FOLDER generator/tools) diff --git a/tools/test/misc/CMakeLists.txt b/tools/test/misc/CMakeLists.txt index 5e3c0a2..48bc8ab 100644 --- a/tools/test/misc/CMakeLists.txt +++ b/tools/test/misc/CMakeLists.txt @@ -11,14 +11,12 @@ INCLUDE_DIRECTORIES (${HDF5_TOOLS_DIR}/lib) # -------------------------------------------------------------------- if (HDF5_BUILD_GENERATORS) add_executable (h5repart_gentest ${HDF5_TOOLS_TEST_MISC_SOURCE_DIR}/h5repart_gentest.c) - TARGET_NAMING (h5repart_gentest STATIC) TARGET_C_PROPERTIES (h5repart_gentest STATIC " " " ") target_link_libraries (h5repart_gentest ${HDF5_LIB_TARGET} ${HDF5_TOOLS_LIB_TARGET}) set_target_properties (h5repart_gentest PROPERTIES FOLDER generator/tools) #add_test (NAME h5repart_gentest COMMAND $) add_executable (h5clear_gentest ${HDF5_TOOLS_TEST_MISC_SOURCE_DIR}/h5clear_gentest.c) - TARGET_NAMING (h5clear_gentest STATIC) TARGET_C_PROPERTIES (h5clear_gentest STATIC " " " ") target_link_libraries (h5clear_gentest ${HDF5_LIB_TARGET} ${HDF5_TOOLS_LIB_TARGET}) set_target_properties (h5clear_gentest PROPERTIES FOLDER tools) @@ -29,13 +27,11 @@ INCLUDE_DIRECTORIES (${HDF5_TOOLS_DIR}/lib) endif () add_executable (h5repart_test ${HDF5_TOOLS_TEST_MISC_SOURCE_DIR}/repart_test.c) - TARGET_NAMING (h5repart_test STATIC) TARGET_C_PROPERTIES (h5repart_test STATIC " " " ") target_link_libraries (h5repart_test ${HDF5_LIB_TARGET} ${HDF5_TOOLS_LIB_TARGET}) set_target_properties (h5repart_test PROPERTIES FOLDER tools) add_executable (clear_open_chk ${HDF5_TOOLS_TEST_MISC_SOURCE_DIR}/clear_open_chk.c) - TARGET_NAMING (clear_open_chk STATIC) TARGET_C_PROPERTIES (clear_open_chk STATIC " " " ") target_link_libraries (clear_open_chk ${HDF5_LIB_TARGET} ${HDF5_TOOLS_LIB_TARGET}) set_target_properties (clear_open_chk PROPERTIES FOLDER tools) diff --git a/tools/test/misc/vds/CMakeLists.txt b/tools/test/misc/vds/CMakeLists.txt index ec672e5..9092079 100644 --- a/tools/test/misc/vds/CMakeLists.txt +++ b/tools/test/misc/vds/CMakeLists.txt @@ -8,7 +8,6 @@ INCLUDE_DIRECTORIES (${HDF5_TOOLS_DIR}/lib) MACRO (ADD_H5_GENERATOR genfile) add_executable (${genfile} ${HDF5_TOOLS_TEST_MISC_VDS_SOURCE_DIR}/${genfile}.c) - TARGET_NAMING (${genfile} STATIC) TARGET_C_PROPERTIES (${genfile} STATIC " " " ") target_link_libraries (${genfile} ${HDF5_LIB_TARGET} ${HDF5_TOOLS_LIB_TARGET}) set_target_properties (${genfile} PROPERTIES FOLDER generator/tools) diff --git a/tools/test/perform/CMakeLists.txt b/tools/test/perform/CMakeLists.txt index 20250c6..581a85e 100644 --- a/tools/test/perform/CMakeLists.txt +++ b/tools/test/perform/CMakeLists.txt @@ -21,7 +21,6 @@ set (h5perf_serial_SOURCES ${HDF5_TOOLS_TEST_PERFORM_SOURCE_DIR}/sio_engine.c ) add_executable (h5perf_serial ${h5perf_serial_SOURCES}) -TARGET_NAMING (h5perf_serial STATIC) TARGET_C_PROPERTIES (h5perf_serial STATIC " " " ") target_link_libraries (h5perf_serial ${HDF5_LIB_TARGET} ${HDF5_TOOLS_LIB_TARGET}) set_target_properties (h5perf_serial PROPERTIES FOLDER perform) @@ -33,7 +32,6 @@ if (HDF5_BUILD_PERFORM_STANDALONE) ${HDF5_TOOLS_TEST_PERFORM_SOURCE_DIR}/sio_engine.c ) add_executable (h5perf_serial_alone ${h5perf_serial_alone_SOURCES}) - TARGET_NAMING (h5perf_serial_alone STATIC) TARGET_C_PROPERTIES (h5perf_serial_alone STATIC " " " ") target_link_libraries (h5perf_serial_alone ${HDF5_LIB_TARGET} ${HDF5_TOOLS_LIB_TARGET}) set_target_properties (h5perf_serial_alone PROPERTIES FOLDER perform) @@ -47,7 +45,6 @@ set (chunk_SOURCES ${HDF5_TOOLS_TEST_PERFORM_SOURCE_DIR}/chunk.c ) ADD_EXECUTABLE(chunk ${chunk_SOURCES}) -TARGET_NAMING (chunk STATIC) TARGET_C_PROPERTIES (chunk STATIC " " " ") TARGET_LINK_LIBRARIES(chunk ${HDF5_LIB_TARGET} ${HDF5_TOOLS_LIB_TARGET}) set_target_properties (chunk PROPERTIES FOLDER perform) @@ -57,7 +54,6 @@ set (iopipe_SOURCES ${HDF5_TOOLS_TEST_PERFORM_SOURCE_DIR}/iopipe.c ) add_executable (iopipe ${iopipe_SOURCES}) -TARGET_NAMING (iopipe STATIC) TARGET_C_PROPERTIES (iopipe STATIC " " " ") target_link_libraries (iopipe ${HDF5_LIB_TARGET} ${HDF5_TOOLS_LIB_TARGET}) set_target_properties (iopipe PROPERTIES FOLDER perform) @@ -67,7 +63,6 @@ set (overhead_SOURCES ${HDF5_TOOLS_TEST_PERFORM_SOURCE_DIR}/overhead.c ) add_executable (overhead ${overhead_SOURCES}) -TARGET_NAMING (overhead STATIC) TARGET_C_PROPERTIES (overhead STATIC " " " ") target_link_libraries (overhead ${HDF5_LIB_TARGET} ${HDF5_TOOLS_LIB_TARGET}) set_target_properties (overhead PROPERTIES FOLDER perform) @@ -77,7 +72,6 @@ set_target_properties (overhead PROPERTIES FOLDER perform) ${HDF5_TOOLS_TEST_PERFORM_SOURCE_DIR}/perf_meta.c ) add_executable (perf_meta ${perf_meta_SOURCES}) - TARGET_NAMING (perf_meta STATIC) TARGET_C_PROPERTIES (perf_meta STATIC " " " ") target_link_libraries (perf_meta ${HDF5_LIB_TARGET} ${HDF5_TOOLS_LIB_TARGET} ${HDF5_TEST_LIB_TARGET}) set_target_properties (perf_meta PROPERTIES FOLDER perform) @@ -87,7 +81,6 @@ set (zip_perf_SOURCES ${HDF5_TOOLS_TEST_PERFORM_SOURCE_DIR}/zip_perf.c ) add_executable (zip_perf ${zip_perf_SOURCES}) -TARGET_NAMING (zip_perf STATIC) TARGET_C_PROPERTIES (zip_perf STATIC " " " ") target_link_libraries (zip_perf ${HDF5_TOOLS_LIB_TARGET} ${HDF5_LIB_TARGET}) set_target_properties (zip_perf PROPERTIES FOLDER perform) @@ -99,7 +92,6 @@ if (H5_HAVE_PARALLEL AND BUILD_TESTING) ${HDF5_TOOLS_TEST_PERFORM_SOURCE_DIR}/pio_engine.c ) add_executable (h5perf ${h5perf_SOURCES}) - TARGET_NAMING (h5perf STATIC) TARGET_C_PROPERTIES (h5perf STATIC " " " ") target_link_libraries (h5perf ${HDF5_LIB_TARGET} ${HDF5_TOOLS_LIB_TARGET} ${HDF5_TEST_LIB_TARGET}) set_target_properties (h5perf PROPERTIES FOLDER perform) @@ -111,7 +103,6 @@ if (H5_HAVE_PARALLEL AND BUILD_TESTING) ${HDF5_TOOLS_TEST_PERFORM_SOURCE_DIR}/pio_engine.c ) add_executable (h5perf_alone ${h5perf_alone_SOURCES}) - TARGET_NAMING (h5perf_alone STATIC) TARGET_C_PROPERTIES (h5perf_alone STATIC " " " ") target_link_libraries (h5perf_alone ${HDF5_LIB_TARGET} ${HDF5_TOOLS_LIB_TARGET} ${HDF5_TEST_LIB_TARGET}) set_target_properties (h5perf_alone PROPERTIES FOLDER perform) -- cgit v0.12 From c9309e0bdc33b97510c99774706d1dc90598bfd6 Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Thu, 25 Jan 2018 10:36:02 -0600 Subject: HDFFV-10396 Reduce use of h5tools_simple_prefix function --- release_docs/RELEASE.txt | 10 +++ tools/lib/h5tools_dump.c | 65 --------------- tools/src/h5dump/h5dump_ddl.c | 22 +---- tools/src/h5dump/h5dump_xml.c | 190 ------------------------------------------ 4 files changed, 13 insertions(+), 274 deletions(-) diff --git a/release_docs/RELEASE.txt b/release_docs/RELEASE.txt index 264d315..9caa46b 100644 --- a/release_docs/RELEASE.txt +++ b/release_docs/RELEASE.txt @@ -508,6 +508,16 @@ Bug Fixes since HDF5-1.10.1 release Tools ----- + - h5dump + + h5dump would output an indented blank line in the filters section. + + h5dump over used the h5tools_simple_prefix function, which is a + function intended to account for the data index (x,y,z) option. + Removed the function call for header information. + + (ADB - 2018/01/25, HDFFV-10396) + - h5repack h5repack incorrectly searched internal object table for name. diff --git a/tools/lib/h5tools_dump.c b/tools/lib/h5tools_dump.c index ed7d38a..38ace81 100644 --- a/tools/lib/h5tools_dump.c +++ b/tools/lib/h5tools_dump.c @@ -2080,7 +2080,6 @@ h5tools_print_datatype(FILE *stream, h5tools_str_t *buffer, const h5tool_format_ ctx->indent_level++; ctx->need_prefix = TRUE; - h5tools_simple_prefix(stream, info, ctx, (hsize_t)0, 0); h5tools_str_reset(buffer); @@ -2091,7 +2090,6 @@ h5tools_print_datatype(FILE *stream, h5tools_str_t *buffer, const h5tool_format_ h5tools_render_element(stream, info, ctx, buffer, &curr_pos, (size_t)ncols, (hsize_t)0, (hsize_t)0); ctx->need_prefix = TRUE; - h5tools_simple_prefix(stream, info, ctx, (hsize_t)0, 0); h5tools_str_reset(buffer); @@ -2131,7 +2129,6 @@ h5tools_print_datatype(FILE *stream, h5tools_str_t *buffer, const h5tool_format_ h5tools_render_element(stream, info, ctx, buffer, &curr_pos, (size_t)ncols, (hsize_t)0, (hsize_t)0); ctx->need_prefix = TRUE; - h5tools_simple_prefix(stream, info, ctx, (hsize_t)0, 0); h5tools_str_reset(buffer); @@ -2170,7 +2167,6 @@ h5tools_print_datatype(FILE *stream, h5tools_str_t *buffer, const h5tool_format_ h5tools_render_element(stream, info, ctx, buffer, &curr_pos, (size_t)ncols, (hsize_t)0, (hsize_t)0); ctx->need_prefix = TRUE; - h5tools_simple_prefix(stream, info, ctx, (hsize_t)0, 0); h5tools_str_reset(buffer); @@ -2245,7 +2241,6 @@ h5tools_print_datatype(FILE *stream, h5tools_str_t *buffer, const h5tool_format_ ctx->indent_level--; ctx->need_prefix = TRUE; - h5tools_simple_prefix(stream, info, ctx, (hsize_t)0, 0); h5tools_str_reset(buffer); if(H5Tclose(str_type) < 0) @@ -2288,7 +2283,6 @@ h5tools_print_datatype(FILE *stream, h5tools_str_t *buffer, const h5tool_format_ H5E_THROW(FAIL, H5E_tools_min_id_g, "H5Tget_tag failed"); ctx->need_prefix = TRUE; - h5tools_simple_prefix(stream, info, ctx, (hsize_t)0, 0); h5tools_str_reset(buffer); h5tools_str_append(buffer, "OPAQUE_TAG \"%s\";", ttag); @@ -2299,7 +2293,6 @@ h5tools_print_datatype(FILE *stream, h5tools_str_t *buffer, const h5tool_format_ ctx->indent_level--; ctx->need_prefix = TRUE; - h5tools_simple_prefix(stream, info, ctx, (hsize_t)0, 0); h5tools_str_reset(buffer); h5tools_str_append(buffer, "%s", h5tools_dump_header_format->structblockend); @@ -2318,7 +2311,6 @@ h5tools_print_datatype(FILE *stream, h5tools_str_t *buffer, const h5tool_format_ mname = H5Tget_member_name(type, i); if((mtype = H5Tget_member_type(type, i)) >= 0) { ctx->need_prefix = TRUE; - h5tools_simple_prefix(stream, info, ctx, (hsize_t)0, 0); h5tools_str_reset(buffer); h5tools_print_datatype(stream, buffer, info, ctx, mtype, TRUE); @@ -2335,7 +2327,6 @@ h5tools_print_datatype(FILE *stream, h5tools_str_t *buffer, const h5tool_format_ ctx->indent_level--; ctx->need_prefix = TRUE; - h5tools_simple_prefix(stream, info, ctx, (hsize_t)0, 0); h5tools_str_reset(buffer); h5tools_str_append(buffer, "%s", h5tools_dump_header_format->structblockend); @@ -2360,7 +2351,6 @@ h5tools_print_datatype(FILE *stream, h5tools_str_t *buffer, const h5tool_format_ ctx->indent_level++; ctx->need_prefix = TRUE; - h5tools_simple_prefix(stream, info, ctx, (hsize_t)0, 0); h5tools_str_reset(buffer); h5tools_print_datatype(stream, buffer, info, ctx, super, TRUE); @@ -2376,7 +2366,6 @@ h5tools_print_datatype(FILE *stream, h5tools_str_t *buffer, const h5tool_format_ ctx->indent_level--; ctx->need_prefix = TRUE; - h5tools_simple_prefix(stream, info, ctx, (hsize_t)0, 0); h5tools_str_reset(buffer); h5tools_str_append(buffer, "%s", h5tools_dump_header_format->enumblockend); @@ -2792,7 +2781,6 @@ h5tools_dump_oid(FILE *stream, const h5tool_format_t *info, ncols = info->line_ncols; ctx->need_prefix = TRUE; - h5tools_simple_prefix(stream, info, ctx, curr_pos, 0); h5tools_str_reset(&buffer); h5tools_str_append(&buffer, "%s %s %d %s", OBJID, BEGIN, oid, END); @@ -2820,7 +2808,6 @@ h5tools_print_virtual_selection(hid_t vspace, switch(H5Sget_select_type(vspace)) { case H5S_SEL_NONE: /* Nothing selected */ ctx->need_prefix = TRUE; - h5tools_simple_prefix(stream, info, ctx, *curr_pos, 0); h5tools_str_reset(buffer); h5tools_str_append(buffer, "%s", VDS_NONE); @@ -2833,7 +2820,6 @@ h5tools_print_virtual_selection(hid_t vspace, break; case H5S_SEL_HYPERSLABS: /* "New-style" hyperslab selection defined */ ctx->need_prefix = TRUE; - h5tools_simple_prefix(stream, info, ctx, *curr_pos, 0); h5tools_str_reset(buffer); if (H5Sis_regular_hyperslab(vspace)) { @@ -2856,14 +2842,12 @@ h5tools_print_virtual_selection(hid_t vspace, } h5tools_render_element(stream, info, ctx, buffer, curr_pos, (size_t) ncols, (hsize_t) 0, (hsize_t) 0); ctx->need_prefix = TRUE; - h5tools_simple_prefix(stream, info, ctx, *curr_pos, 0); h5tools_str_reset(buffer); h5tools_str_append(buffer, "%s", h5tools_dump_header_format->virtualselectionblockend); break; case H5S_SEL_ALL: /* Entire extent selected */ ctx->need_prefix = TRUE; - h5tools_simple_prefix(stream, info, ctx, *curr_pos, 0); h5tools_str_reset(buffer); h5tools_str_append(buffer, "%s", VDS_ALL); @@ -2956,7 +2940,6 @@ h5tools_dump_dcpl(FILE *stream, const h5tool_format_t *info, *------------------------------------------------------------------------- */ ctx->need_prefix = TRUE; - h5tools_simple_prefix(stream, info, ctx, curr_pos, 0); h5tools_str_reset(&buffer); h5tools_str_append(&buffer, "%s %s", STORAGE_LAYOUT, BEGIN); @@ -2967,7 +2950,6 @@ h5tools_dump_dcpl(FILE *stream, const h5tool_format_t *info, case H5D_CHUNKED: ctx->indent_level++; ctx->need_prefix = TRUE; - h5tools_simple_prefix(stream, info, ctx, curr_pos, 0); h5tools_str_reset(&buffer); h5tools_str_append(&buffer, "%s ", CHUNKED); @@ -2980,7 +2962,6 @@ h5tools_dump_dcpl(FILE *stream, const h5tool_format_t *info, h5tools_render_element(stream, info, ctx, &buffer, &curr_pos, (size_t) ncols, (hsize_t) 0, (hsize_t) 0); ctx->need_prefix = TRUE; - h5tools_simple_prefix(stream, info, ctx, curr_pos, 0); h5tools_str_reset(&buffer); @@ -3036,14 +3017,12 @@ h5tools_dump_dcpl(FILE *stream, const h5tool_format_t *info, case H5D_COMPACT: ctx->indent_level++; ctx->need_prefix = TRUE; - h5tools_simple_prefix(stream, info, ctx, curr_pos, 0); h5tools_str_reset(&buffer); h5tools_str_append(&buffer, "%s", COMPACT); h5tools_render_element(stream, info, ctx, &buffer, &curr_pos, (size_t) ncols, (hsize_t) 0, (hsize_t) 0); ctx->need_prefix = TRUE; - h5tools_simple_prefix(stream, info, ctx, curr_pos, 0); h5tools_str_reset(&buffer); h5tools_str_append(&buffer, "SIZE " HSIZE_T_FORMAT, storage_size); @@ -3063,14 +3042,12 @@ h5tools_dump_dcpl(FILE *stream, const h5tool_format_t *info, ctx->indent_level++; if (next) { ctx->need_prefix = TRUE; - h5tools_simple_prefix(stream, info, ctx, curr_pos, 0); h5tools_str_reset(&buffer); h5tools_str_append(&buffer, "%s", CONTIGUOUS); h5tools_render_element(stream, info, ctx, &buffer, &curr_pos, (size_t) ncols, (hsize_t) 0, (hsize_t) 0); ctx->need_prefix = TRUE; - h5tools_simple_prefix(stream, info, ctx, curr_pos, 0); h5tools_str_reset(&buffer); h5tools_str_append(&buffer, "%s %s", EXTERNAL, BEGIN); @@ -3081,7 +3058,6 @@ h5tools_dump_dcpl(FILE *stream, const h5tool_format_t *info, H5Pget_external(dcpl_id, j, sizeof(name), name, &offset, &size); ctx->need_prefix = TRUE; - h5tools_simple_prefix(stream, info, ctx, curr_pos, 0); h5tools_str_reset(&buffer); h5tools_str_append(&buffer, "FILENAME %s SIZE " HSIZE_T_FORMAT, name, size); @@ -3091,7 +3067,6 @@ h5tools_dump_dcpl(FILE *stream, const h5tool_format_t *info, ctx->indent_level--; ctx->need_prefix = TRUE; - h5tools_simple_prefix(stream, info, ctx, curr_pos, 0); h5tools_str_reset(&buffer); h5tools_str_append(&buffer, "%s", END); @@ -3101,21 +3076,18 @@ h5tools_dump_dcpl(FILE *stream, const h5tool_format_t *info, haddr_t ioffset; ctx->need_prefix = TRUE; - h5tools_simple_prefix(stream, info, ctx, curr_pos, 0); h5tools_str_reset(&buffer); h5tools_str_append(&buffer, "%s", CONTIGUOUS); h5tools_render_element(stream, info, ctx, &buffer, &curr_pos, (size_t) ncols, (hsize_t) 0, (hsize_t) 0); ctx->need_prefix = TRUE; - h5tools_simple_prefix(stream, info, ctx, curr_pos, 0); h5tools_str_reset(&buffer); h5tools_str_append(&buffer,"SIZE " HSIZE_T_FORMAT, storage_size); h5tools_render_element(stream, info, ctx, &buffer, &curr_pos, (size_t) ncols, (hsize_t) 0, (hsize_t) 0); ctx->need_prefix = TRUE; - h5tools_simple_prefix(stream, info, ctx, curr_pos, 0); h5tools_str_reset(&buffer); ioffset = H5Dget_offset(obj_id); @@ -3143,7 +3115,6 @@ h5tools_dump_dcpl(FILE *stream, const h5tool_format_t *info, hid_t virtual_srcspace = H5Pget_virtual_srcspace(dcpl_id, next); ctx->need_prefix = TRUE; - h5tools_simple_prefix(stream, info, ctx, curr_pos, 0); h5tools_str_reset(&buffer); h5tools_str_append(&buffer, "%s %ld %s ", VDS_MAPPING, next, BEGIN); @@ -3152,7 +3123,6 @@ h5tools_dump_dcpl(FILE *stream, const h5tool_format_t *info, ctx->indent_level++; ctx->need_prefix = TRUE; - h5tools_simple_prefix(stream, info, ctx, curr_pos, 0); h5tools_str_reset(&buffer); h5tools_str_append(&buffer, "%s %s", VDS_VIRTUAL, BEGIN); @@ -3165,14 +3135,12 @@ h5tools_dump_dcpl(FILE *stream, const h5tool_format_t *info, ctx->indent_level--; ctx->need_prefix = TRUE; - h5tools_simple_prefix(stream, info, ctx, curr_pos, 0); h5tools_str_reset(&buffer); h5tools_str_append(&buffer, "%s", END); h5tools_render_element(stream, info, ctx, &buffer, &curr_pos, (size_t) ncols, (hsize_t) 0, (hsize_t) 0); ctx->need_prefix = TRUE; - h5tools_simple_prefix(stream, info, ctx, curr_pos, 0); h5tools_str_reset(&buffer); h5tools_str_append(&buffer, "%s %s", VDS_SOURCE, BEGIN); @@ -3190,7 +3158,6 @@ h5tools_dump_dcpl(FILE *stream, const h5tool_format_t *info, H5Pget_virtual_dsetname(dcpl_id, next, dsetname, sizeof(dsetname)); ctx->need_prefix = TRUE; - h5tools_simple_prefix(stream, info, ctx, curr_pos, 0); h5tools_str_reset(&buffer); h5tools_str_append(&buffer, "%s %s", VDS_SRC_FILE, h5tools_dump_header_format->virtualfilenamebegin); @@ -3199,7 +3166,6 @@ h5tools_dump_dcpl(FILE *stream, const h5tool_format_t *info, h5tools_render_element(stream, info, ctx, &buffer, &curr_pos, (size_t) ncols, (hsize_t) 0, (hsize_t) 0); ctx->need_prefix = TRUE; - h5tools_simple_prefix(stream, info, ctx, curr_pos, 0); h5tools_str_reset(&buffer); h5tools_str_append(&buffer, "%s %s", VDS_SRC_DATASET, h5tools_dump_header_format->virtualdatasetnamebegin); @@ -3212,7 +3178,6 @@ h5tools_dump_dcpl(FILE *stream, const h5tool_format_t *info, ctx->indent_level--; ctx->need_prefix = TRUE; - h5tools_simple_prefix(stream, info, ctx, curr_pos, 0); h5tools_str_reset(&buffer); h5tools_str_append(&buffer, "%s", END); @@ -3221,7 +3186,6 @@ h5tools_dump_dcpl(FILE *stream, const h5tool_format_t *info, ctx->indent_level--; ctx->need_prefix = TRUE; - h5tools_simple_prefix(stream, info, ctx, curr_pos, 0); h5tools_str_reset(&buffer); h5tools_str_append(&buffer, "%s", END); @@ -3241,7 +3205,6 @@ h5tools_dump_dcpl(FILE *stream, const h5tool_format_t *info, }/*switch*/ ctx->need_prefix = TRUE; - h5tools_simple_prefix(stream, info, ctx, curr_pos, 0); h5tools_str_reset(&buffer); h5tools_str_append(&buffer, "%s", END); @@ -3253,7 +3216,6 @@ h5tools_dump_dcpl(FILE *stream, const h5tool_format_t *info, */ if (H5D_VIRTUAL != stl) { ctx->need_prefix = TRUE; - h5tools_simple_prefix(stream, info, ctx, curr_pos, 0); h5tools_str_reset(&buffer); h5tools_str_append(&buffer, "%s %s", FILTERS, BEGIN); @@ -3271,7 +3233,6 @@ h5tools_dump_dcpl(FILE *stream, const h5tool_format_t *info, continue; /* nothing to print for invalid filter */ ctx->need_prefix = TRUE; - h5tools_simple_prefix(stream, info, ctx, curr_pos, 0); h5tools_str_reset(&buffer); switch(filtn) { @@ -3297,14 +3258,12 @@ h5tools_dump_dcpl(FILE *stream, const h5tool_format_t *info, ctx->indent_level++; ctx->need_prefix = TRUE; - h5tools_simple_prefix(stream, info, ctx, curr_pos, 0); h5tools_str_reset(&buffer); h5tools_str_append(&buffer, "PIXELS_PER_BLOCK %d", szip_pixels_per_block); h5tools_render_element(stream, info, ctx, &buffer, &curr_pos, (size_t)ncols, (hsize_t)0, (hsize_t)0); ctx->need_prefix = TRUE; - h5tools_simple_prefix(stream, info, ctx, curr_pos, 0); h5tools_str_reset(&buffer); if(szip_options_mask & H5_SZIP_CHIP_OPTION_MASK) @@ -3314,7 +3273,6 @@ h5tools_dump_dcpl(FILE *stream, const h5tool_format_t *info, h5tools_render_element(stream, info, ctx, &buffer, &curr_pos, (size_t)ncols, (hsize_t)0, (hsize_t)0); ctx->need_prefix = TRUE; - h5tools_simple_prefix(stream, info, ctx, curr_pos, 0); h5tools_str_reset(&buffer); if(szip_options_mask & H5_SZIP_EC_OPTION_MASK) @@ -3324,7 +3282,6 @@ h5tools_dump_dcpl(FILE *stream, const h5tool_format_t *info, h5tools_render_element(stream, info, ctx, &buffer, &curr_pos, (size_t)ncols, (hsize_t)0, (hsize_t)0); ctx->need_prefix = TRUE; - h5tools_simple_prefix(stream, info, ctx, curr_pos, 0); h5tools_str_reset(&buffer); if(szip_options_mask & H5_SZIP_LSB_OPTION_MASK) @@ -3335,7 +3292,6 @@ h5tools_dump_dcpl(FILE *stream, const h5tool_format_t *info, if(szip_options_mask & H5_SZIP_RAW_OPTION_MASK) { ctx->need_prefix = TRUE; - h5tools_simple_prefix(stream, info, ctx, curr_pos, 0); h5tools_str_reset(&buffer); h5tools_str_append(&buffer, "HEADER %s", "RAW"); @@ -3345,7 +3301,6 @@ h5tools_dump_dcpl(FILE *stream, const h5tool_format_t *info, ctx->indent_level--; ctx->need_prefix = TRUE; - h5tools_simple_prefix(stream, info, ctx, curr_pos, 0); h5tools_str_reset(&buffer); h5tools_str_append(&buffer, "%s", END); @@ -3366,7 +3321,6 @@ h5tools_dump_dcpl(FILE *stream, const h5tool_format_t *info, ctx->indent_level++; ctx->need_prefix = TRUE; - h5tools_simple_prefix(stream, info, ctx, curr_pos, 0); h5tools_str_reset(&buffer); h5tools_str_append(&buffer, "FILTER_ID %d", filtn); @@ -3374,7 +3328,6 @@ h5tools_dump_dcpl(FILE *stream, const h5tool_format_t *info, if(f_name[0] != '\0') { ctx->need_prefix = TRUE; - h5tools_simple_prefix(stream, info, ctx, curr_pos, 0); h5tools_str_reset(&buffer); h5tools_str_append(&buffer, "COMMENT %s", f_name); @@ -3382,7 +3335,6 @@ h5tools_dump_dcpl(FILE *stream, const h5tool_format_t *info, } if (cd_nelmts) { ctx->need_prefix = TRUE; - h5tools_simple_prefix(stream, info, ctx, curr_pos, 0); h5tools_str_reset(&buffer); h5tools_str_append(&buffer, "%s %s ","PARAMS", BEGIN); @@ -3394,7 +3346,6 @@ h5tools_dump_dcpl(FILE *stream, const h5tool_format_t *info, ctx->indent_level--; ctx->need_prefix = TRUE; - h5tools_simple_prefix(stream, info, ctx, curr_pos, 0); h5tools_str_reset(&buffer); h5tools_str_append(&buffer, "%s",END); @@ -3406,7 +3357,6 @@ h5tools_dump_dcpl(FILE *stream, const h5tool_format_t *info, else { ctx->need_prefix = TRUE; - h5tools_simple_prefix(stream, info, ctx, curr_pos, 0); h5tools_str_reset(&buffer); h5tools_str_append(&buffer, "NONE"); @@ -3415,7 +3365,6 @@ h5tools_dump_dcpl(FILE *stream, const h5tool_format_t *info, ctx->indent_level--; ctx->need_prefix = TRUE; - h5tools_simple_prefix(stream, info, ctx, curr_pos, 0); h5tools_str_reset(&buffer); h5tools_str_append(&buffer, "%s",END); @@ -3427,7 +3376,6 @@ h5tools_dump_dcpl(FILE *stream, const h5tool_format_t *info, *------------------------------------------------------------------------- */ ctx->need_prefix = TRUE; - h5tools_simple_prefix(stream, info, ctx, curr_pos, 0); h5tools_str_reset(&buffer); h5tools_str_append(&buffer, "%s %s", FILLVALUE, BEGIN); @@ -3436,7 +3384,6 @@ h5tools_dump_dcpl(FILE *stream, const h5tool_format_t *info, ctx->indent_level++; ctx->need_prefix = TRUE; - h5tools_simple_prefix(stream, info, ctx, curr_pos, 0); h5tools_str_reset(&buffer); h5tools_str_append(&buffer, "FILL_TIME "); @@ -3460,7 +3407,6 @@ h5tools_dump_dcpl(FILE *stream, const h5tool_format_t *info, h5tools_render_element(stream, info, ctx, &buffer, &curr_pos, (size_t)ncols, (hsize_t)0, (hsize_t)0); ctx->need_prefix = TRUE; - h5tools_simple_prefix(stream, info, ctx, curr_pos, 0); h5tools_str_reset(&buffer); h5tools_str_append(&buffer, "%s ", "VALUE "); @@ -3486,7 +3432,6 @@ h5tools_dump_dcpl(FILE *stream, const h5tool_format_t *info, ctx->indent_level--; ctx->need_prefix = TRUE; - h5tools_simple_prefix(stream, info, ctx, curr_pos, 0); h5tools_str_reset(&buffer); h5tools_str_append(&buffer, "%s", END); @@ -3498,7 +3443,6 @@ h5tools_dump_dcpl(FILE *stream, const h5tool_format_t *info, */ if (H5D_VIRTUAL != stl) { ctx->need_prefix = TRUE; - h5tools_simple_prefix(stream, info, ctx, curr_pos, 0); h5tools_str_reset(&buffer); h5tools_str_append(&buffer, "ALLOCATION_TIME %s", BEGIN); @@ -3507,7 +3451,6 @@ h5tools_dump_dcpl(FILE *stream, const h5tool_format_t *info, ctx->indent_level++; ctx->need_prefix = TRUE; - h5tools_simple_prefix(stream, info, ctx, curr_pos, 0); h5tools_str_reset(&buffer); H5Pget_alloc_time(dcpl_id, &at); @@ -3532,7 +3475,6 @@ h5tools_dump_dcpl(FILE *stream, const h5tool_format_t *info, ctx->indent_level--; ctx->need_prefix = TRUE; - h5tools_simple_prefix(stream, info, ctx, curr_pos, 0); h5tools_str_reset(&buffer); h5tools_str_append(&buffer, "%s", END); @@ -3626,7 +3568,6 @@ h5tools_dump_attribute(FILE *stream, const h5tool_format_t *info, ncols = info->line_ncols; ctx->need_prefix = TRUE; - h5tools_simple_prefix(stream, info, ctx, curr_pos, 0); h5tools_str_reset(&buffer); h5tools_str_append(&buffer, "%s \"%s\" %s", @@ -3663,7 +3604,6 @@ h5tools_dump_attribute(FILE *stream, const h5tool_format_t *info, } ctx->need_prefix = TRUE; - h5tools_simple_prefix(stream, info, ctx, (hsize_t)0, 0); h5tools_str_reset(&buffer); @@ -3782,7 +3722,6 @@ h5tools_dump_subsetting_header(FILE *stream, const h5tool_format_t *info, ncols = info->line_ncols; ctx->need_prefix = TRUE; - h5tools_simple_prefix(stream, info, ctx, (hsize_t)0, 0); h5tools_str_reset(&buffer); h5tools_str_append(&buffer, "%s %s", h5tools_dump_header_format->subsettingbegin, h5tools_dump_header_format->subsettingblockbegin); @@ -3791,7 +3730,6 @@ h5tools_dump_subsetting_header(FILE *stream, const h5tool_format_t *info, ctx->indent_level++; ctx->need_prefix = TRUE; - h5tools_simple_prefix(stream, info, ctx, (hsize_t)0, 0); h5tools_str_reset(&buffer); h5tools_str_append(&buffer, "%s %s ", h5tools_dump_header_format->startbegin, h5tools_dump_header_format->startblockbegin); @@ -3800,7 +3738,6 @@ h5tools_dump_subsetting_header(FILE *stream, const h5tool_format_t *info, h5tools_render_element(stream, info, ctx, &buffer, &curr_pos, (size_t)ncols, (hsize_t)0, (hsize_t)0); ctx->need_prefix = TRUE; - h5tools_simple_prefix(stream, info, ctx, (hsize_t)0, 0); h5tools_str_reset(&buffer); h5tools_str_append(&buffer, "%s %s ", h5tools_dump_header_format->stridebegin, h5tools_dump_header_format->strideblockbegin); @@ -3809,7 +3746,6 @@ h5tools_dump_subsetting_header(FILE *stream, const h5tool_format_t *info, h5tools_render_element(stream, info, ctx, &buffer, &curr_pos, (size_t)ncols, (hsize_t)0, (hsize_t)0); ctx->need_prefix = TRUE; - h5tools_simple_prefix(stream, info, ctx, (hsize_t)0, 0); h5tools_str_reset(&buffer); h5tools_str_append(&buffer, "%s %s ", h5tools_dump_header_format->countbegin, h5tools_dump_header_format->countblockbegin); @@ -3823,7 +3759,6 @@ h5tools_dump_subsetting_header(FILE *stream, const h5tool_format_t *info, h5tools_render_element(stream, info, ctx, &buffer, &curr_pos, (size_t)ncols, (hsize_t)0, (hsize_t)0); ctx->need_prefix = TRUE; - h5tools_simple_prefix(stream, info, ctx, (hsize_t)0, 0); h5tools_str_reset(&buffer); h5tools_str_append(&buffer, "%s %s ", h5tools_dump_header_format->blockbegin, h5tools_dump_header_format->blockblockbegin); diff --git a/tools/src/h5dump/h5dump_ddl.c b/tools/src/h5dump/h5dump_ddl.c index eecd113..6646626 100644 --- a/tools/src/h5dump/h5dump_ddl.c +++ b/tools/src/h5dump/h5dump_ddl.c @@ -155,7 +155,7 @@ dump_attr_cb(hid_t oid, const char *attr_name, const H5A_info_t H5_ATTR_UNUSED * return ret; } - + /*------------------------------------------------------------------------- * Function: dump_all_cb * @@ -291,7 +291,6 @@ dump_all_cb(hid_t group, const char *name, const H5L_info_t *linfo, void H5_ATTR ctx.indent_level++; ctx.need_prefix = TRUE; - h5tools_simple_prefix(rawoutstream, outputformat, &ctx, (hsize_t)0, 0); /* Render the element */ h5tools_str_reset(&buffer); @@ -303,7 +302,6 @@ dump_all_cb(hid_t group, const char *name, const H5L_info_t *linfo, void H5_ATTR error_msg("internal error (file %s:line %d)\n", __FILE__, __LINE__); ctx.need_prefix = TRUE; - h5tools_simple_prefix(rawoutstream, outputformat, &ctx, (hsize_t)0, 0); /* Render the element */ h5tools_str_reset(&buffer); @@ -327,7 +325,6 @@ dump_all_cb(hid_t group, const char *name, const H5L_info_t *linfo, void H5_ATTR } else if(found_obj->displayed) { ctx.need_prefix = TRUE; - h5tools_simple_prefix(rawoutstream, outputformat, &ctx, (hsize_t)0, 0); /* Render the element */ h5tools_str_reset(&buffer); @@ -348,7 +345,6 @@ dump_all_cb(hid_t group, const char *name, const H5L_info_t *linfo, void H5_ATTR ctx.indent_level--; ctx.need_prefix = TRUE; - h5tools_simple_prefix(rawoutstream, outputformat, &ctx, (hsize_t)0, 0); /* Render the element */ h5tools_str_reset(&buffer); @@ -436,7 +432,6 @@ dump_all_cb(hid_t group, const char *name, const H5L_info_t *linfo, void H5_ATTR /* print the value of a soft link */ /* Standard DDL: no modification */ ctx.need_prefix = TRUE; - h5tools_simple_prefix(rawoutstream, outputformat, &ctx, (hsize_t)0, 0); /* Render the element */ h5tools_str_reset(&buffer); @@ -447,7 +442,6 @@ dump_all_cb(hid_t group, const char *name, const H5L_info_t *linfo, void H5_ATTR ctx.indent_level--; ctx.need_prefix = TRUE; - h5tools_simple_prefix(rawoutstream, outputformat, &ctx, (hsize_t)0, 0); /* Render the element */ h5tools_str_reset(&buffer); @@ -472,7 +466,6 @@ dump_all_cb(hid_t group, const char *name, const H5L_info_t *linfo, void H5_ATTR } else { ctx.need_prefix = TRUE; - h5tools_simple_prefix(rawoutstream, outputformat, &ctx, (hsize_t)0, 0); /* Render the element */ h5tools_str_reset(&buffer); @@ -501,7 +494,6 @@ dump_all_cb(hid_t group, const char *name, const H5L_info_t *linfo, void H5_ATTR ctx.indent_level++; ctx.need_prefix = TRUE; - h5tools_simple_prefix(rawoutstream, outputformat, &ctx, (hsize_t)0, 0); /* Render the element */ h5tools_str_reset(&buffer); @@ -509,7 +501,6 @@ dump_all_cb(hid_t group, const char *name, const H5L_info_t *linfo, void H5_ATTR h5tools_render_element(rawoutstream, outputformat, &ctx, &buffer, &curr_pos, (size_t)outputformat->line_ncols, (hsize_t)0, (hsize_t)0); ctx.need_prefix = TRUE; - h5tools_simple_prefix(rawoutstream, outputformat, &ctx, (hsize_t)0, 0); /* Render the element */ h5tools_str_reset(&buffer); @@ -522,7 +513,6 @@ dump_all_cb(hid_t group, const char *name, const H5L_info_t *linfo, void H5_ATTR } /* end else */ } /* end else */ ctx.need_prefix = TRUE; - h5tools_simple_prefix(rawoutstream, outputformat, &ctx, (hsize_t)0, 0); /* Render the element */ h5tools_str_reset(&buffer); @@ -544,7 +534,6 @@ dump_all_cb(hid_t group, const char *name, const H5L_info_t *linfo, void H5_ATTR case H5L_TYPE_HARD: default: ctx.need_prefix = TRUE; - h5tools_simple_prefix(rawoutstream, outputformat, &ctx, (hsize_t)0, 0); /* Render the element */ h5tools_str_reset(&buffer); @@ -556,7 +545,6 @@ dump_all_cb(hid_t group, const char *name, const H5L_info_t *linfo, void H5_ATTR ctx.indent_level++; ctx.need_prefix = TRUE; - h5tools_simple_prefix(rawoutstream, outputformat, &ctx, (hsize_t)0, 0); /* Render the element */ h5tools_str_reset(&buffer); h5tools_str_append(&buffer, "LINKCLASS %d", linfo->type); @@ -565,7 +553,6 @@ dump_all_cb(hid_t group, const char *name, const H5L_info_t *linfo, void H5_ATTR ctx.indent_level--; ctx.need_prefix = TRUE; - h5tools_simple_prefix(rawoutstream, outputformat, &ctx, (hsize_t)0, 0); /* Render the element */ h5tools_str_reset(&buffer); if(HDstrlen(h5tools_dump_header_format->udlinkblockend)) { @@ -926,7 +913,6 @@ dump_group(hid_t gid, const char *name) ctx.indent_level--; ctx.need_prefix = TRUE; - h5tools_simple_prefix(rawoutstream, outputformat, &ctx, (hsize_t)0, 0); /* Render the element */ h5tools_str_reset(&buffer); @@ -1169,7 +1155,7 @@ dump_data(hid_t obj_id, int obj_data, struct subset_t *sset, int display_index) h5tools_dump_data(rawoutstream, outputformat, &ctx, obj_id, print_dataset, sset, display_index, display_char); } - + /*------------------------------------------------------------------------- * Function: dump_fcpl * @@ -1614,7 +1600,6 @@ handle_attributes(hid_t fid, const char *attr, void H5_ATTR_UNUSED * data, int H HDmemset(&buffer, 0, sizeof(h5tools_str_t)); ctx.need_prefix = TRUE; - h5tools_simple_prefix(rawoutstream, outputformat, &ctx, (hsize_t)0, 0); /* Render the element */ h5tools_str_reset(&buffer); @@ -1626,7 +1611,6 @@ handle_attributes(hid_t fid, const char *attr, void H5_ATTR_UNUSED * data, int H error_msg("unable to open object \"%s\"\n", obj_name); ctx.need_prefix = TRUE; - h5tools_simple_prefix(rawoutstream, outputformat, &ctx, (hsize_t)0, 0); /* Render the element */ h5tools_str_reset(&buffer); if(HDstrlen(h5tools_dump_header_format->attributeblockend)) { @@ -2081,7 +2065,7 @@ handle_datatypes(hid_t fid, const char *type, void H5_ATTR_UNUSED * data, int pe } } - + /*------------------------------------------------------------------------- * Function: dump_extlink * diff --git a/tools/src/h5dump/h5dump_xml.c b/tools/src/h5dump/h5dump_xml.c index a83ec08..4e13df3 100644 --- a/tools/src/h5dump/h5dump_xml.c +++ b/tools/src/h5dump/h5dump_xml.c @@ -231,7 +231,6 @@ xml_dump_all_cb(hid_t group, const char *name, const H5L_info_t *linfo, void H5_ ctx.indent_level++; ctx.need_prefix = TRUE; - h5tools_simple_prefix(rawoutstream, outputformat, &ctx, (hsize_t)0, 0); /* Render the element */ h5tools_str_reset(&buffer); @@ -243,7 +242,6 @@ xml_dump_all_cb(hid_t group, const char *name, const H5L_info_t *linfo, void H5_ error_msg("internal error (file %s:line %d)\n", __FILE__, __LINE__); ctx.need_prefix = TRUE; - h5tools_simple_prefix(rawoutstream, outputformat, &ctx, (hsize_t)0, 0); /* Render the element */ h5tools_str_reset(&buffer); @@ -278,7 +276,6 @@ xml_dump_all_cb(hid_t group, const char *name, const H5L_info_t *linfo, void H5_ xml_name_to_XID(prefix, parentxid, (int)sizeof(parentxid), 1); ctx.need_prefix = TRUE; - h5tools_simple_prefix(rawoutstream, outputformat, &ctx, (hsize_t)0, 0); /* Render the element */ h5tools_str_reset(&buffer); @@ -298,7 +295,6 @@ xml_dump_all_cb(hid_t group, const char *name, const H5L_info_t *linfo, void H5_ ctx.indent_level++; ctx.need_prefix = TRUE; - h5tools_simple_prefix(rawoutstream, outputformat, &ctx, (hsize_t)0, 0); /* Render the element */ h5tools_str_reset(&buffer); @@ -310,7 +306,6 @@ xml_dump_all_cb(hid_t group, const char *name, const H5L_info_t *linfo, void H5_ ctx.indent_level--; ctx.need_prefix = TRUE; - h5tools_simple_prefix(rawoutstream, outputformat, &ctx, (hsize_t)0, 0); /* Render the element */ h5tools_str_reset(&buffer); @@ -405,7 +400,6 @@ xml_dump_all_cb(hid_t group, const char *name, const H5L_info_t *linfo, void H5_ if (res == 0) { /* target obj found */ ctx.need_prefix = TRUE; - h5tools_simple_prefix(rawoutstream, outputformat, &ctx, (hsize_t)0, 0); /* Render the element */ h5tools_str_reset(&buffer); @@ -427,7 +421,6 @@ xml_dump_all_cb(hid_t group, const char *name, const H5L_info_t *linfo, void H5_ else { /* dangling link -- omit from xml attributes */ ctx.need_prefix = TRUE; - h5tools_simple_prefix(rawoutstream, outputformat, &ctx, (hsize_t)0, 0); /* Render the element */ h5tools_str_reset(&buffer); @@ -492,7 +485,6 @@ xml_dump_all_cb(hid_t group, const char *name, const H5L_info_t *linfo, void H5_ xml_name_to_XID(prefix, parentxid, (int)sizeof(parentxid), 1); ctx.need_prefix = TRUE; - h5tools_simple_prefix(rawoutstream, outputformat, &ctx, (hsize_t)0, 0); /* Render the element */ h5tools_str_reset(&buffer); @@ -539,7 +531,6 @@ xml_dump_all_cb(hid_t group, const char *name, const H5L_info_t *linfo, void H5_ xml_name_to_XID(prefix, parentxid, (int)sizeof(parentxid), 1); ctx.need_prefix = TRUE; - h5tools_simple_prefix(rawoutstream, outputformat, &ctx, (hsize_t)0, 0); /* Render the element */ h5tools_str_reset(&buffer); @@ -905,7 +896,6 @@ xml_print_datatype(hid_t type, unsigned in_group) as it's name. */ ctx.need_prefix = TRUE; - h5tools_simple_prefix(rawoutstream, outputformat, &ctx, (hsize_t)0, 0); /* Render the element */ h5tools_str_reset(&buffer); @@ -918,7 +908,6 @@ xml_print_datatype(hid_t type, unsigned in_group) char *t_objname = xml_escape_the_name(found_obj->objname); ctx.need_prefix = TRUE; - h5tools_simple_prefix(rawoutstream, outputformat, &ctx, (hsize_t)0, 0); /* Render the element */ h5tools_str_reset(&buffer); @@ -931,7 +920,6 @@ xml_print_datatype(hid_t type, unsigned in_group) } else { ctx.need_prefix = TRUE; - h5tools_simple_prefix(rawoutstream, outputformat, &ctx, (hsize_t)0, 0); /* Render the element */ h5tools_str_reset(&buffer); @@ -944,7 +932,6 @@ xml_print_datatype(hid_t type, unsigned in_group) switch (H5Tget_class(type)) { case H5T_INTEGER: ctx.need_prefix = TRUE; - h5tools_simple_prefix(rawoutstream, outputformat, &ctx, (hsize_t)0, 0); /* Render the element */ h5tools_str_reset(&buffer); @@ -957,7 +944,6 @@ xml_print_datatype(hid_t type, unsigned in_group) sgn = H5Tget_sign(type); ctx.need_prefix = TRUE; - h5tools_simple_prefix(rawoutstream, outputformat, &ctx, (hsize_t)0, 0); /* Render the element */ h5tools_str_reset(&buffer); @@ -1002,7 +988,6 @@ xml_print_datatype(hid_t type, unsigned in_group) ctx.indent_level--; ctx.need_prefix = TRUE; - h5tools_simple_prefix(rawoutstream, outputformat, &ctx, (hsize_t)0, 0); /* Render the element */ h5tools_str_reset(&buffer); @@ -1018,7 +1003,6 @@ xml_print_datatype(hid_t type, unsigned in_group) ord = H5Tget_order(type); ctx.need_prefix = TRUE; - h5tools_simple_prefix(rawoutstream, outputformat, &ctx, (hsize_t)0, 0); /* Render the element */ h5tools_str_reset(&buffer); @@ -1027,7 +1011,6 @@ xml_print_datatype(hid_t type, unsigned in_group) ctx.indent_level++; ctx.need_prefix = TRUE; - h5tools_simple_prefix(rawoutstream, outputformat, &ctx, (hsize_t)0, 0); /* Render the element */ h5tools_str_reset(&buffer); @@ -1061,7 +1044,6 @@ xml_print_datatype(hid_t type, unsigned in_group) ctx.indent_level--; ctx.need_prefix = TRUE; - h5tools_simple_prefix(rawoutstream, outputformat, &ctx, (hsize_t)0, 0); /* Render the element */ h5tools_str_reset(&buffer); @@ -1071,7 +1053,6 @@ xml_print_datatype(hid_t type, unsigned in_group) case H5T_TIME: ctx.need_prefix = TRUE; - h5tools_simple_prefix(rawoutstream, outputformat, &ctx, (hsize_t)0, 0); /* Render the element */ h5tools_str_reset(&buffer); @@ -1080,7 +1061,6 @@ xml_print_datatype(hid_t type, unsigned in_group) ctx.indent_level++; ctx.need_prefix = TRUE; - h5tools_simple_prefix(rawoutstream, outputformat, &ctx, (hsize_t)0, 0); /* Render the element */ h5tools_str_reset(&buffer); @@ -1090,7 +1070,6 @@ xml_print_datatype(hid_t type, unsigned in_group) ctx.indent_level--; ctx.need_prefix = TRUE; - h5tools_simple_prefix(rawoutstream, outputformat, &ctx, (hsize_t)0, 0); /* Render the element */ h5tools_str_reset(&buffer); @@ -1106,7 +1085,6 @@ xml_print_datatype(hid_t type, unsigned in_group) is_vlstr = H5Tis_variable_str(type); ctx.need_prefix = TRUE; - h5tools_simple_prefix(rawoutstream, outputformat, &ctx, (hsize_t)0, 0); /* Render the element */ h5tools_str_reset(&buffer); @@ -1116,7 +1094,6 @@ xml_print_datatype(hid_t type, unsigned in_group) ctx.indent_level++; ctx.need_prefix = TRUE; - h5tools_simple_prefix(rawoutstream, outputformat, &ctx, (hsize_t)0, 0); /* Render the element */ h5tools_str_reset(&buffer); @@ -1144,7 +1121,6 @@ xml_print_datatype(hid_t type, unsigned in_group) ctx.indent_level--; ctx.need_prefix = TRUE; - h5tools_simple_prefix(rawoutstream, outputformat, &ctx, (hsize_t)0, 0); /* Render the element */ h5tools_str_reset(&buffer); @@ -1157,7 +1133,6 @@ xml_print_datatype(hid_t type, unsigned in_group) ord = H5Tget_order(type); ctx.need_prefix = TRUE; - h5tools_simple_prefix(rawoutstream, outputformat, &ctx, (hsize_t)0, 0); /* Render the element */ h5tools_str_reset(&buffer); @@ -1166,7 +1141,6 @@ xml_print_datatype(hid_t type, unsigned in_group) ctx.indent_level++; ctx.need_prefix = TRUE; - h5tools_simple_prefix(rawoutstream, outputformat, &ctx, (hsize_t)0, 0); /* Render the element */ h5tools_str_reset(&buffer); @@ -1193,7 +1167,6 @@ xml_print_datatype(hid_t type, unsigned in_group) ctx.indent_level--; ctx.need_prefix = TRUE; - h5tools_simple_prefix(rawoutstream, outputformat, &ctx, (hsize_t)0, 0); /* Render the element */ h5tools_str_reset(&buffer); @@ -1205,7 +1178,6 @@ xml_print_datatype(hid_t type, unsigned in_group) /* */ ctx.need_prefix = TRUE; - h5tools_simple_prefix(rawoutstream, outputformat, &ctx, (hsize_t)0, 0); /* Render the element */ h5tools_str_reset(&buffer); @@ -1215,7 +1187,6 @@ xml_print_datatype(hid_t type, unsigned in_group) mname = H5Tget_tag(type); ctx.need_prefix = TRUE; - h5tools_simple_prefix(rawoutstream, outputformat, &ctx, (hsize_t)0, 0); /* Render the element */ h5tools_str_reset(&buffer); @@ -1227,7 +1198,6 @@ xml_print_datatype(hid_t type, unsigned in_group) ctx.indent_level--; ctx.need_prefix = TRUE; - h5tools_simple_prefix(rawoutstream, outputformat, &ctx, (hsize_t)0, 0); /* Render the element */ h5tools_str_reset(&buffer); @@ -1242,7 +1212,6 @@ xml_print_datatype(hid_t type, unsigned in_group) nmembers = (unsigned)H5Tget_nmembers(type); ctx.need_prefix = TRUE; - h5tools_simple_prefix(rawoutstream, outputformat, &ctx, (hsize_t)0, 0); /* Render the element */ h5tools_str_reset(&buffer); @@ -1262,7 +1231,6 @@ xml_print_datatype(hid_t type, unsigned in_group) t_fname = xml_escape_the_name(mname); ctx.need_prefix = TRUE; - h5tools_simple_prefix(rawoutstream, outputformat, &ctx, (hsize_t)0, 0); /* Render the element */ h5tools_str_reset(&buffer); @@ -1275,7 +1243,6 @@ xml_print_datatype(hid_t type, unsigned in_group) ctx.indent_level++; ctx.need_prefix = TRUE; - h5tools_simple_prefix(rawoutstream, outputformat, &ctx, (hsize_t)0, 0); /* Render the element */ h5tools_str_reset(&buffer); @@ -1288,7 +1255,6 @@ xml_print_datatype(hid_t type, unsigned in_group) ctx.indent_level--; ctx.need_prefix = TRUE; - h5tools_simple_prefix(rawoutstream, outputformat, &ctx, (hsize_t)0, 0); /* Render the element */ h5tools_str_reset(&buffer); @@ -1298,7 +1264,6 @@ xml_print_datatype(hid_t type, unsigned in_group) ctx.indent_level--; ctx.need_prefix = TRUE; - h5tools_simple_prefix(rawoutstream, outputformat, &ctx, (hsize_t)0, 0); /* Render the element */ h5tools_str_reset(&buffer); @@ -1309,7 +1274,6 @@ xml_print_datatype(hid_t type, unsigned in_group) ctx.indent_level--; ctx.need_prefix = TRUE; - h5tools_simple_prefix(rawoutstream, outputformat, &ctx, (hsize_t)0, 0); /* Render the element */ h5tools_str_reset(&buffer); @@ -1319,7 +1283,6 @@ xml_print_datatype(hid_t type, unsigned in_group) case H5T_REFERENCE: ctx.need_prefix = TRUE; - h5tools_simple_prefix(rawoutstream, outputformat, &ctx, (hsize_t)0, 0); /* Render the element */ h5tools_str_reset(&buffer); @@ -1329,7 +1292,6 @@ xml_print_datatype(hid_t type, unsigned in_group) /* Only Object references supported at this time */ ctx.need_prefix = TRUE; - h5tools_simple_prefix(rawoutstream, outputformat, &ctx, (hsize_t)0, 0); /* Render the element */ h5tools_str_reset(&buffer); @@ -1338,7 +1300,6 @@ xml_print_datatype(hid_t type, unsigned in_group) ctx.indent_level++; ctx.need_prefix = TRUE; - h5tools_simple_prefix(rawoutstream, outputformat, &ctx, (hsize_t)0, 0); /* Render the element */ h5tools_str_reset(&buffer); @@ -1347,7 +1308,6 @@ xml_print_datatype(hid_t type, unsigned in_group) ctx.indent_level--; ctx.need_prefix = TRUE; - h5tools_simple_prefix(rawoutstream, outputformat, &ctx, (hsize_t)0, 0); /* Render the element */ h5tools_str_reset(&buffer); @@ -1356,7 +1316,6 @@ xml_print_datatype(hid_t type, unsigned in_group) ctx.indent_level--; ctx.need_prefix = TRUE; - h5tools_simple_prefix(rawoutstream, outputformat, &ctx, (hsize_t)0, 0); /* Render the element */ h5tools_str_reset(&buffer); @@ -1369,7 +1328,6 @@ xml_print_datatype(hid_t type, unsigned in_group) nmembs = H5Tget_nmembers(type); ctx.need_prefix = TRUE; - h5tools_simple_prefix(rawoutstream, outputformat, &ctx, (hsize_t)0, 0); /* Render the element */ h5tools_str_reset(&buffer); @@ -1379,7 +1337,6 @@ xml_print_datatype(hid_t type, unsigned in_group) ctx.indent_level++; ctx.need_prefix = TRUE; - h5tools_simple_prefix(rawoutstream, outputformat, &ctx, (hsize_t)0, 0); /* Render the element */ h5tools_str_reset(&buffer); @@ -1388,7 +1345,6 @@ xml_print_datatype(hid_t type, unsigned in_group) xml_print_enum(type); ctx.need_prefix = TRUE; - h5tools_simple_prefix(rawoutstream, outputformat, &ctx, (hsize_t)0, 0); /* Render the element */ h5tools_str_reset(&buffer); @@ -1398,7 +1354,6 @@ xml_print_datatype(hid_t type, unsigned in_group) ctx.indent_level--; ctx.need_prefix = TRUE; - h5tools_simple_prefix(rawoutstream, outputformat, &ctx, (hsize_t)0, 0); /* Render the element */ h5tools_str_reset(&buffer); @@ -1408,7 +1363,6 @@ xml_print_datatype(hid_t type, unsigned in_group) case H5T_VLEN: ctx.need_prefix = TRUE; - h5tools_simple_prefix(rawoutstream, outputformat, &ctx, (hsize_t)0, 0); /* Render the element */ h5tools_str_reset(&buffer); @@ -1419,7 +1373,6 @@ xml_print_datatype(hid_t type, unsigned in_group) ctx.indent_level++; ctx.need_prefix = TRUE; - h5tools_simple_prefix(rawoutstream, outputformat, &ctx, (hsize_t)0, 0); /* Render the element */ h5tools_str_reset(&buffer); @@ -1432,7 +1385,6 @@ xml_print_datatype(hid_t type, unsigned in_group) ctx.indent_level--; ctx.need_prefix = TRUE; - h5tools_simple_prefix(rawoutstream, outputformat, &ctx, (hsize_t)0, 0); /* Render the element */ h5tools_str_reset(&buffer); @@ -1442,7 +1394,6 @@ xml_print_datatype(hid_t type, unsigned in_group) ctx.indent_level--; ctx.need_prefix = TRUE; - h5tools_simple_prefix(rawoutstream, outputformat, &ctx, (hsize_t)0, 0); /* Render the element */ h5tools_str_reset(&buffer); @@ -1458,7 +1409,6 @@ xml_print_datatype(hid_t type, unsigned in_group) /* Print lead-in */ ctx.need_prefix = TRUE; - h5tools_simple_prefix(rawoutstream, outputformat, &ctx, (hsize_t)0, 0); /* Render the element */ h5tools_str_reset(&buffer); @@ -1474,7 +1424,6 @@ xml_print_datatype(hid_t type, unsigned in_group) ctx.indent_level++; for (i = 0; i < ndims; i++) { ctx.need_prefix = TRUE; - h5tools_simple_prefix(rawoutstream, outputformat, &ctx, (hsize_t)0, 0); /* Render the element */ h5tools_str_reset(&buffer); @@ -1487,7 +1436,6 @@ xml_print_datatype(hid_t type, unsigned in_group) ctx.indent_level++; ctx.need_prefix = TRUE; - h5tools_simple_prefix(rawoutstream, outputformat, &ctx, (hsize_t)0, 0); /* Render the element */ h5tools_str_reset(&buffer); @@ -1500,7 +1448,6 @@ xml_print_datatype(hid_t type, unsigned in_group) ctx.indent_level--; ctx.need_prefix = TRUE; - h5tools_simple_prefix(rawoutstream, outputformat, &ctx, (hsize_t)0, 0); /* Render the element */ h5tools_str_reset(&buffer); @@ -1510,7 +1457,6 @@ xml_print_datatype(hid_t type, unsigned in_group) ctx.indent_level--; ctx.need_prefix = TRUE; - h5tools_simple_prefix(rawoutstream, outputformat, &ctx, (hsize_t)0, 0); /* Render the element */ h5tools_str_reset(&buffer); @@ -1524,7 +1470,6 @@ xml_print_datatype(hid_t type, unsigned in_group) case H5T_NCLASSES: default: ctx.need_prefix = TRUE; - h5tools_simple_prefix(rawoutstream, outputformat, &ctx, (hsize_t)0, 0); /* Render the element */ h5tools_str_reset(&buffer); @@ -1606,7 +1551,6 @@ xml_dump_datatype(hid_t type) */ ctx.need_prefix = TRUE; - h5tools_simple_prefix(rawoutstream, outputformat, &ctx, (hsize_t)0, 0); /* Render the element */ h5tools_str_reset(&buffer); @@ -1619,7 +1563,6 @@ xml_dump_datatype(hid_t type) char *t_objname = xml_escape_the_name(found_obj->objname); ctx.need_prefix = TRUE; - h5tools_simple_prefix(rawoutstream, outputformat, &ctx, (hsize_t)0, 0); /* Render the element */ h5tools_str_reset(&buffer); @@ -1632,7 +1575,6 @@ xml_dump_datatype(hid_t type) } else { ctx.need_prefix = TRUE; - h5tools_simple_prefix(rawoutstream, outputformat, &ctx, (hsize_t)0, 0); /* Render the element */ h5tools_str_reset(&buffer); @@ -1642,7 +1584,6 @@ xml_dump_datatype(hid_t type) } else { ctx.need_prefix = TRUE; - h5tools_simple_prefix(rawoutstream, outputformat, &ctx, (hsize_t)0, 0); /* Render the element */ h5tools_str_reset(&buffer); @@ -1655,7 +1596,6 @@ xml_dump_datatype(hid_t type) dump_indent -= COL; ctx.need_prefix = TRUE; - h5tools_simple_prefix(rawoutstream, outputformat, &ctx, (hsize_t)0, 0); /* Render the element */ h5tools_str_reset(&buffer); @@ -1720,7 +1660,6 @@ xml_dump_dataspace(hid_t space) ctx.indent_level++; ctx.need_prefix = TRUE; - h5tools_simple_prefix(rawoutstream, outputformat, &ctx, (hsize_t)0, 0); /* Render the element */ h5tools_str_reset(&buffer); @@ -1733,7 +1672,6 @@ xml_dump_dataspace(hid_t space) /* scalar dataspace (just a tag, no XML attrs. defined */ ctx.need_prefix = TRUE; - h5tools_simple_prefix(rawoutstream, outputformat, &ctx, (hsize_t)0, 0); /* Render the element */ h5tools_str_reset(&buffer); @@ -1746,7 +1684,6 @@ xml_dump_dataspace(hid_t space) /* */ ctx.need_prefix = TRUE; - h5tools_simple_prefix(rawoutstream, outputformat, &ctx, (hsize_t)0, 0); /* Render the element */ h5tools_str_reset(&buffer); @@ -1758,7 +1695,6 @@ xml_dump_dataspace(hid_t space) for (i = 0; i < ndims; i++) { if (maxsize[i] == H5S_UNLIMITED) { ctx.need_prefix = TRUE; - h5tools_simple_prefix(rawoutstream, outputformat, &ctx, (hsize_t)0, 0); /* Render the element */ h5tools_str_reset(&buffer); @@ -1768,7 +1704,6 @@ xml_dump_dataspace(hid_t space) } else if (maxsize[i] == (hsize_t) 0) { ctx.need_prefix = TRUE; - h5tools_simple_prefix(rawoutstream, outputformat, &ctx, (hsize_t)0, 0); /* Render the element */ h5tools_str_reset(&buffer); @@ -1778,7 +1713,6 @@ xml_dump_dataspace(hid_t space) } else { ctx.need_prefix = TRUE; - h5tools_simple_prefix(rawoutstream, outputformat, &ctx, (hsize_t)0, 0); /* Render the element */ h5tools_str_reset(&buffer); @@ -1790,7 +1724,6 @@ xml_dump_dataspace(hid_t space) ctx.indent_level--; ctx.need_prefix = TRUE; - h5tools_simple_prefix(rawoutstream, outputformat, &ctx, (hsize_t)0, 0); /* Render the element */ h5tools_str_reset(&buffer); @@ -1805,7 +1738,6 @@ xml_dump_dataspace(hid_t space) ctx.need_prefix = TRUE; h5tools_simple_prefix(rawoutstream, outputformat, &ctx, (hsize_t)0, 0); - /* Render the element */ h5tools_str_reset(&buffer); h5tools_str_append(&buffer, "<%sNullDataspace />",xmlnsprefix); @@ -1817,7 +1749,6 @@ xml_dump_dataspace(hid_t space) case H5S_NO_CLASS: default: ctx.need_prefix = TRUE; - h5tools_simple_prefix(rawoutstream, outputformat, &ctx, (hsize_t)0, 0); /* Render the element */ h5tools_str_reset(&buffer); @@ -1828,7 +1759,6 @@ xml_dump_dataspace(hid_t space) ctx.indent_level--; ctx.need_prefix = TRUE; - h5tools_simple_prefix(rawoutstream, outputformat, &ctx, (hsize_t)0, 0); /* Render the element */ h5tools_str_reset(&buffer); @@ -1899,7 +1829,6 @@ xml_dump_data(hid_t obj_id, int obj_data, struct subset_t H5_ATTR_UNUSED * sset, outputformat = &string_dataformat; ctx.need_prefix = TRUE; - h5tools_simple_prefix(rawoutstream, outputformat, &ctx, (hsize_t)0, 0); /* Render the element */ h5tools_str_reset(&buffer); @@ -1909,7 +1838,6 @@ xml_dump_data(hid_t obj_id, int obj_data, struct subset_t H5_ATTR_UNUSED * sset, ctx.indent_level++; ctx.need_prefix = TRUE; - h5tools_simple_prefix(rawoutstream, outputformat, &ctx, (hsize_t)0, 0); /* Render the element */ h5tools_str_reset(&buffer); @@ -2005,7 +1933,6 @@ xml_dump_data(hid_t obj_id, int obj_data, struct subset_t H5_ATTR_UNUSED * sset, ctx.indent_level++; ctx.need_prefix = TRUE; - h5tools_simple_prefix(rawoutstream, outputformat, &ctx, (hsize_t)0, 0); /* Render the element */ h5tools_str_reset(&buffer); @@ -2031,7 +1958,6 @@ xml_dump_data(hid_t obj_id, int obj_data, struct subset_t H5_ATTR_UNUSED * sset, ctx.indent_level--; ctx.need_prefix = TRUE; - h5tools_simple_prefix(rawoutstream, outputformat, &ctx, (hsize_t)0, 0); /* Render the element */ h5tools_str_reset(&buffer); @@ -2092,7 +2018,6 @@ xml_dump_attr(hid_t attr, const char *attr_name, const H5A_info_t H5_ATTR_UNUSED outputformat = &string_dataformat; ctx.need_prefix = TRUE; - h5tools_simple_prefix(rawoutstream, outputformat, &ctx, (hsize_t)0, 0); /* Render the element */ h5tools_str_reset(&buffer); @@ -2128,7 +2053,6 @@ xml_dump_attr(hid_t attr, const char *attr_name, const H5A_info_t H5_ATTR_UNUSED dump_indent += COL; ctx.need_prefix = TRUE; - h5tools_simple_prefix(rawoutstream, outputformat, &ctx, (hsize_t)0, 0); /* Render the element */ h5tools_str_reset(&buffer); @@ -2136,7 +2060,6 @@ xml_dump_attr(hid_t attr, const char *attr_name, const H5A_info_t H5_ATTR_UNUSED h5tools_render_element(rawoutstream, outputformat, &ctx, &buffer, &curr_pos, (size_t)outputformat->line_ncols, (hsize_t)0, (hsize_t)0); ctx.need_prefix = TRUE; - h5tools_simple_prefix(rawoutstream, outputformat, &ctx, (hsize_t)0, 0); /* Render the element */ h5tools_str_reset(&buffer); @@ -2144,7 +2067,6 @@ xml_dump_attr(hid_t attr, const char *attr_name, const H5A_info_t H5_ATTR_UNUSED h5tools_render_element(rawoutstream, outputformat, &ctx, &buffer, &curr_pos, (size_t)outputformat->line_ncols, (hsize_t)0, (hsize_t)0); ctx.need_prefix = TRUE; - h5tools_simple_prefix(rawoutstream, outputformat, &ctx, (hsize_t)0, 0); /* Render the element */ h5tools_str_reset(&buffer); @@ -2152,7 +2074,6 @@ xml_dump_attr(hid_t attr, const char *attr_name, const H5A_info_t H5_ATTR_UNUSED h5tools_render_element(rawoutstream, outputformat, &ctx, &buffer, &curr_pos, (size_t)outputformat->line_ncols, (hsize_t)0, (hsize_t)0); ctx.need_prefix = TRUE; - h5tools_simple_prefix(rawoutstream, outputformat, &ctx, (hsize_t)0, 0); /* Render the element */ h5tools_str_reset(&buffer); @@ -2160,7 +2081,6 @@ xml_dump_attr(hid_t attr, const char *attr_name, const H5A_info_t H5_ATTR_UNUSED h5tools_render_element(rawoutstream, outputformat, &ctx, &buffer, &curr_pos, (size_t)outputformat->line_ncols, (hsize_t)0, (hsize_t)0); ctx.need_prefix = TRUE; - h5tools_simple_prefix(rawoutstream, outputformat, &ctx, (hsize_t)0, 0); /* Render the element */ h5tools_str_reset(&buffer); @@ -2173,7 +2093,6 @@ xml_dump_attr(hid_t attr, const char *attr_name, const H5A_info_t H5_ATTR_UNUSED case H5T_COMPOUND: ctx.need_prefix = TRUE; - h5tools_simple_prefix(rawoutstream, outputformat, &ctx, (hsize_t)0, 0); /* Render the element */ h5tools_str_reset(&buffer); @@ -2184,7 +2103,6 @@ xml_dump_attr(hid_t attr, const char *attr_name, const H5A_info_t H5_ATTR_UNUSED case H5T_REFERENCE: ctx.need_prefix = TRUE; - h5tools_simple_prefix(rawoutstream, outputformat, &ctx, (hsize_t)0, 0); /* Render the element */ h5tools_str_reset(&buffer); @@ -2192,7 +2110,6 @@ xml_dump_attr(hid_t attr, const char *attr_name, const H5A_info_t H5_ATTR_UNUSED h5tools_render_element(rawoutstream, outputformat, &ctx, &buffer, &curr_pos, (size_t)outputformat->line_ncols, (hsize_t)0, (hsize_t)0); if (!H5Tequal(type, H5T_STD_REF_OBJ)) { ctx.need_prefix = TRUE; - h5tools_simple_prefix(rawoutstream, outputformat, &ctx, (hsize_t)0, 0); /* Render the element */ h5tools_str_reset(&buffer); @@ -2200,7 +2117,6 @@ xml_dump_attr(hid_t attr, const char *attr_name, const H5A_info_t H5_ATTR_UNUSED h5tools_render_element(rawoutstream, outputformat, &ctx, &buffer, &curr_pos, (size_t)outputformat->line_ncols, (hsize_t)0, (hsize_t)0); ctx.need_prefix = TRUE; - h5tools_simple_prefix(rawoutstream, outputformat, &ctx, (hsize_t)0, 0); /* Render the element */ h5tools_str_reset(&buffer); @@ -2209,7 +2125,6 @@ xml_dump_attr(hid_t attr, const char *attr_name, const H5A_info_t H5_ATTR_UNUSED } else { ctx.need_prefix = TRUE; - h5tools_simple_prefix(rawoutstream, outputformat, &ctx, (hsize_t)0, 0); /* Render the element */ h5tools_str_reset(&buffer); @@ -2219,7 +2134,6 @@ xml_dump_attr(hid_t attr, const char *attr_name, const H5A_info_t H5_ATTR_UNUSED xml_print_refs(attr_id, ATTRIBUTE_DATA); ctx.need_prefix = TRUE; - h5tools_simple_prefix(rawoutstream, outputformat, &ctx, (hsize_t)0, 0); /* Render the element */ h5tools_str_reset(&buffer); @@ -2228,7 +2142,6 @@ xml_dump_attr(hid_t attr, const char *attr_name, const H5A_info_t H5_ATTR_UNUSED } ctx.need_prefix = TRUE; - h5tools_simple_prefix(rawoutstream, outputformat, &ctx, (hsize_t)0, 0); /* Render the element */ h5tools_str_reset(&buffer); @@ -2238,7 +2151,6 @@ xml_dump_attr(hid_t attr, const char *attr_name, const H5A_info_t H5_ATTR_UNUSED case H5T_VLEN: ctx.need_prefix = TRUE; - h5tools_simple_prefix(rawoutstream, outputformat, &ctx, (hsize_t)0, 0); /* Render the element */ h5tools_str_reset(&buffer); @@ -2251,7 +2163,6 @@ xml_dump_attr(hid_t attr, const char *attr_name, const H5A_info_t H5_ATTR_UNUSED case H5T_NCLASSES: default: ctx.need_prefix = TRUE; - h5tools_simple_prefix(rawoutstream, outputformat, &ctx, (hsize_t)0, 0); /* Render the element */ h5tools_str_reset(&buffer); @@ -2259,7 +2170,6 @@ xml_dump_attr(hid_t attr, const char *attr_name, const H5A_info_t H5_ATTR_UNUSED h5tools_render_element(rawoutstream, outputformat, &ctx, &buffer, &curr_pos, (size_t)outputformat->line_ncols, (hsize_t)0, (hsize_t)0); ctx.need_prefix = TRUE; - h5tools_simple_prefix(rawoutstream, outputformat, &ctx, (hsize_t)0, 0); /* Render the element */ h5tools_str_reset(&buffer); @@ -2267,7 +2177,6 @@ xml_dump_attr(hid_t attr, const char *attr_name, const H5A_info_t H5_ATTR_UNUSED h5tools_render_element(rawoutstream, outputformat, &ctx, &buffer, &curr_pos, (size_t)outputformat->line_ncols, (hsize_t)0, (hsize_t)0); ctx.need_prefix = TRUE; - h5tools_simple_prefix(rawoutstream, outputformat, &ctx, (hsize_t)0, 0); /* Render the element */ h5tools_str_reset(&buffer); @@ -2275,7 +2184,6 @@ xml_dump_attr(hid_t attr, const char *attr_name, const H5A_info_t H5_ATTR_UNUSED h5tools_render_element(rawoutstream, outputformat, &ctx, &buffer, &curr_pos, (size_t)outputformat->line_ncols, (hsize_t)0, (hsize_t)0); ctx.need_prefix = TRUE; - h5tools_simple_prefix(rawoutstream, outputformat, &ctx, (hsize_t)0, 0); /* Render the element */ h5tools_str_reset(&buffer); @@ -2288,7 +2196,6 @@ xml_dump_attr(hid_t attr, const char *attr_name, const H5A_info_t H5_ATTR_UNUSED /* The case of an attribute never yet written ?? * Or dataspace is H5S_NULL. */ ctx.need_prefix = TRUE; - h5tools_simple_prefix(rawoutstream, outputformat, &ctx, (hsize_t)0, 0); /* Render the element */ h5tools_str_reset(&buffer); @@ -2298,7 +2205,6 @@ xml_dump_attr(hid_t attr, const char *attr_name, const H5A_info_t H5_ATTR_UNUSED ctx.indent_level++; ctx.need_prefix = TRUE; - h5tools_simple_prefix(rawoutstream, outputformat, &ctx, (hsize_t)0, 0); /* Render the element */ h5tools_str_reset(&buffer); @@ -2308,7 +2214,6 @@ xml_dump_attr(hid_t attr, const char *attr_name, const H5A_info_t H5_ATTR_UNUSED ctx.indent_level--; ctx.need_prefix = TRUE; - h5tools_simple_prefix(rawoutstream, outputformat, &ctx, (hsize_t)0, 0); /* Render the element */ h5tools_str_reset(&buffer); @@ -2323,7 +2228,6 @@ xml_dump_attr(hid_t attr, const char *attr_name, const H5A_info_t H5_ATTR_UNUSED H5Aclose(attr_id); ctx.need_prefix = TRUE; - h5tools_simple_prefix(rawoutstream, outputformat, &ctx, (hsize_t)0, 0); /* Render the element */ h5tools_str_reset(&buffer); @@ -2338,7 +2242,6 @@ xml_dump_attr(hid_t attr, const char *attr_name, const H5A_info_t H5_ATTR_UNUSED ctx.indent_level++; ctx.need_prefix = TRUE; - h5tools_simple_prefix(rawoutstream, outputformat, &ctx, (hsize_t)0, 0); /* Render the element */ h5tools_str_reset(&buffer); @@ -2348,7 +2251,6 @@ xml_dump_attr(hid_t attr, const char *attr_name, const H5A_info_t H5_ATTR_UNUSED ctx.indent_level--; ctx.need_prefix = TRUE; - h5tools_simple_prefix(rawoutstream, outputformat, &ctx, (hsize_t)0, 0); /* Render the element */ h5tools_str_reset(&buffer); @@ -2435,7 +2337,6 @@ xml_dump_named_datatype(hid_t type, const char *name) */ ctx.need_prefix = TRUE; - h5tools_simple_prefix(rawoutstream, outputformat, &ctx, (hsize_t)0, 0); /* Render the element */ h5tools_str_reset(&buffer); @@ -2450,7 +2351,6 @@ xml_dump_named_datatype(hid_t type, const char *name) H5O_info_t oinfo; /* Object info */ ctx.need_prefix = TRUE; - h5tools_simple_prefix(rawoutstream, outputformat, &ctx, (hsize_t)0, 0); /* Render the element */ h5tools_str_reset(&buffer); @@ -2487,7 +2387,6 @@ xml_dump_named_datatype(hid_t type, const char *name) xml_name_to_XID(found_obj->objname, pointerxid, (int)sizeof(pointerxid), 1); ctx.need_prefix = TRUE; - h5tools_simple_prefix(rawoutstream, outputformat, &ctx, (hsize_t)0, 0); /* Render the element */ h5tools_str_reset(&buffer); @@ -2497,7 +2396,6 @@ xml_dump_named_datatype(hid_t type, const char *name) ctx.indent_level--; ctx.need_prefix = TRUE; - h5tools_simple_prefix(rawoutstream, outputformat, &ctx, (hsize_t)0, 0); /* Render the element */ h5tools_str_reset(&buffer); @@ -2515,7 +2413,6 @@ xml_dump_named_datatype(hid_t type, const char *name) dump_indent += COL; ctx.need_prefix = TRUE; - h5tools_simple_prefix(rawoutstream, outputformat, &ctx, (hsize_t)0, 0); /* Render the element */ h5tools_str_reset(&buffer); @@ -2529,7 +2426,6 @@ xml_dump_named_datatype(hid_t type, const char *name) dump_indent -= COL; ctx.need_prefix = TRUE; - h5tools_simple_prefix(rawoutstream, outputformat, &ctx, (hsize_t)0, 0); /* Render the element */ h5tools_str_reset(&buffer); @@ -2540,7 +2436,6 @@ xml_dump_named_datatype(hid_t type, const char *name) dump_indent -= COL; ctx.need_prefix = TRUE; - h5tools_simple_prefix(rawoutstream, outputformat, &ctx, (hsize_t)0, 0); /* Render the element */ h5tools_str_reset(&buffer); @@ -2680,7 +2575,6 @@ xml_dump_group(hid_t gid, const char *name) xml_name_to_XID("/", grpxid, 100, 1); ctx.need_prefix = TRUE; - h5tools_simple_prefix(rawoutstream, outputformat, &ctx, (hsize_t)0, 0); /* Render the element */ h5tools_str_reset(&buffer); @@ -2695,7 +2589,6 @@ xml_dump_group(hid_t gid, const char *name) xml_name_to_XID(par, parentxid, 100, 1); ctx.need_prefix = TRUE; - h5tools_simple_prefix(rawoutstream, outputformat, &ctx, (hsize_t)0, 0); /* Render the element */ h5tools_str_reset(&buffer); @@ -2715,7 +2608,6 @@ xml_dump_group(hid_t gid, const char *name) xml_name_to_XID(par, parentxid, 100, 1); ctx.need_prefix = TRUE; - h5tools_simple_prefix(rawoutstream, outputformat, &ctx, (hsize_t)0, 0); /* Render the element */ h5tools_str_reset(&buffer); @@ -2739,7 +2631,6 @@ xml_dump_group(hid_t gid, const char *name) xml_name_to_XID("/", grpxid, 100, 1); ctx.need_prefix = TRUE; - h5tools_simple_prefix(rawoutstream, outputformat, &ctx, (hsize_t)0, 0); /* Render the element */ h5tools_str_reset(&buffer); @@ -2755,7 +2646,6 @@ xml_dump_group(hid_t gid, const char *name) xml_name_to_XID(par, parentxid, 100, 1); ctx.need_prefix = TRUE; - h5tools_simple_prefix(rawoutstream, outputformat, &ctx, (hsize_t)0, 0); /* Render the element */ h5tools_str_reset(&buffer); @@ -2825,7 +2715,6 @@ xml_dump_group(hid_t gid, const char *name) char *parentxid = (char *)HDmalloc((size_t)100); ctx.need_prefix = TRUE; - h5tools_simple_prefix(rawoutstream, outputformat, &ctx, (hsize_t)0, 0); /* Render the element */ h5tools_str_reset(&buffer); @@ -2898,7 +2787,6 @@ xml_dump_group(hid_t gid, const char *name) } ctx.need_prefix = TRUE; - h5tools_simple_prefix(rawoutstream, outputformat, &ctx, (hsize_t)0, 0); /* Render the element */ h5tools_str_reset(&buffer); @@ -3025,7 +2913,6 @@ xml_print_refs(hid_t did, int source) if (!path) { ctx.need_prefix = TRUE; - h5tools_simple_prefix(rawoutstream, outputformat, &ctx, (hsize_t)0, 0); /* Render the element */ h5tools_str_reset(&buffer); @@ -3036,7 +2923,6 @@ xml_print_refs(hid_t did, int source) char *t_path = xml_escape_the_string(path, -1); ctx.need_prefix = TRUE; - h5tools_simple_prefix(rawoutstream, outputformat, &ctx, (hsize_t)0, 0); /* Render the element */ h5tools_str_reset(&buffer); @@ -3182,7 +3068,6 @@ xml_print_strs(hid_t did, int source) if (!onestring) { ctx.need_prefix = TRUE; - h5tools_simple_prefix(rawoutstream, outputformat, &ctx, (hsize_t)0, 0); /* Render the element */ h5tools_str_reset(&buffer); @@ -3290,7 +3175,6 @@ check_filters(hid_t dcpl) if (filter == H5Z_FILTER_DEFLATE) { ctx.indent_level++; ctx.need_prefix = TRUE; - h5tools_simple_prefix(rawoutstream, outputformat, &ctx, (hsize_t)0, 0); /* Render the element */ h5tools_str_reset(&buffer); @@ -3309,7 +3193,6 @@ check_filters(hid_t dcpl) else if (filter == H5Z_FILTER_FLETCHER32) { ctx.indent_level++; ctx.need_prefix = TRUE; - h5tools_simple_prefix(rawoutstream, outputformat, &ctx, (hsize_t)0, 0); /* Render the element */ h5tools_str_reset(&buffer); @@ -3320,7 +3203,6 @@ check_filters(hid_t dcpl) else if (filter == H5Z_FILTER_SHUFFLE) { ctx.indent_level++; ctx.need_prefix = TRUE; - h5tools_simple_prefix(rawoutstream, outputformat, &ctx, (hsize_t)0, 0); /* Render the element */ h5tools_str_reset(&buffer); @@ -3332,7 +3214,6 @@ check_filters(hid_t dcpl) ctx.indent_level++; ctx.need_prefix = TRUE; - h5tools_simple_prefix(rawoutstream, outputformat, &ctx, (hsize_t)0, 0); /* Render the element */ h5tools_str_reset(&buffer); @@ -3426,7 +3307,6 @@ xml_dump_fill_value(hid_t dcpl, hid_t type) dump_indent += COL; ctx.need_prefix = TRUE; - h5tools_simple_prefix(rawoutstream, outputformat, &ctx, (hsize_t)0, 0); /* Render the element */ h5tools_str_reset(&buffer); @@ -3444,7 +3324,6 @@ xml_dump_fill_value(hid_t dcpl, hid_t type) const char * path = lookup_ref_path(*(hobj_ref_t *) buf); ctx.need_prefix = TRUE; - h5tools_simple_prefix(rawoutstream, outputformat, &ctx, (hsize_t)0, 0); /* Render the element */ h5tools_str_reset(&buffer); @@ -3452,7 +3331,6 @@ xml_dump_fill_value(hid_t dcpl, hid_t type) h5tools_render_element(rawoutstream, outputformat, &ctx, &buffer, &curr_pos, (size_t)outputformat->line_ncols, (hsize_t)0, (hsize_t)0); if (!path) { ctx.need_prefix = TRUE; - h5tools_simple_prefix(rawoutstream, outputformat, &ctx, (hsize_t)0, 0); /* Render the element */ h5tools_str_reset(&buffer); @@ -3463,7 +3341,6 @@ xml_dump_fill_value(hid_t dcpl, hid_t type) char *t_path = xml_escape_the_string(path, -1); ctx.need_prefix = TRUE; - h5tools_simple_prefix(rawoutstream, outputformat, &ctx, (hsize_t)0, 0); /* Render the element */ h5tools_str_reset(&buffer); @@ -3473,7 +3350,6 @@ xml_dump_fill_value(hid_t dcpl, hid_t type) } ctx.need_prefix = TRUE; - h5tools_simple_prefix(rawoutstream, outputformat, &ctx, (hsize_t)0, 0); /* Render the element */ h5tools_str_reset(&buffer); @@ -3483,7 +3359,6 @@ xml_dump_fill_value(hid_t dcpl, hid_t type) else if (H5Tget_class(type) == H5T_STRING) { /* ????? */ ctx.need_prefix = TRUE; - h5tools_simple_prefix(rawoutstream, outputformat, &ctx, (hsize_t)0, 0); /* Render the element */ h5tools_str_reset(&buffer); @@ -3491,7 +3366,6 @@ xml_dump_fill_value(hid_t dcpl, hid_t type) h5tools_render_element(rawoutstream, outputformat, &ctx, &buffer, &curr_pos, (size_t)outputformat->line_ncols, (hsize_t)0, (hsize_t)0); ctx.need_prefix = TRUE; - h5tools_simple_prefix(rawoutstream, outputformat, &ctx, (hsize_t)0, 0); /* Render the element */ h5tools_str_reset(&buffer); @@ -3503,7 +3377,6 @@ xml_dump_fill_value(hid_t dcpl, hid_t type) switch (H5Tget_class(type)) { case H5T_INTEGER: ctx.need_prefix = TRUE; - h5tools_simple_prefix(rawoutstream, outputformat, &ctx, (hsize_t)0, 0); /* Render the element */ h5tools_str_reset(&buffer); @@ -3519,7 +3392,6 @@ xml_dump_fill_value(hid_t dcpl, hid_t type) h5tools_render_element(rawoutstream, outputformat, &ctx, &buffer, &curr_pos, (size_t)outputformat->line_ncols, (hsize_t)0, (hsize_t)0); ctx.need_prefix = TRUE; - h5tools_simple_prefix(rawoutstream, outputformat, &ctx, (hsize_t)0, 0); /* Render the element */ h5tools_str_reset(&buffer); @@ -3528,7 +3400,6 @@ xml_dump_fill_value(hid_t dcpl, hid_t type) break; case H5T_FLOAT: ctx.need_prefix = TRUE; - h5tools_simple_prefix(rawoutstream, outputformat, &ctx, (hsize_t)0, 0); /* Render the element */ h5tools_str_reset(&buffer); @@ -3544,7 +3415,6 @@ xml_dump_fill_value(hid_t dcpl, hid_t type) h5tools_render_element(rawoutstream, outputformat, &ctx, &buffer, &curr_pos, (size_t)outputformat->line_ncols, (hsize_t)0, (hsize_t)0); ctx.need_prefix = TRUE; - h5tools_simple_prefix(rawoutstream, outputformat, &ctx, (hsize_t)0, 0); /* Render the element */ h5tools_str_reset(&buffer); @@ -3554,7 +3424,6 @@ xml_dump_fill_value(hid_t dcpl, hid_t type) case H5T_BITFIELD: case H5T_OPAQUE: ctx.need_prefix = TRUE; - h5tools_simple_prefix(rawoutstream, outputformat, &ctx, (hsize_t)0, 0); /* Render the element */ h5tools_str_reset(&buffer); @@ -3576,7 +3445,6 @@ xml_dump_fill_value(hid_t dcpl, hid_t type) h5tools_render_element(rawoutstream, outputformat, &ctx, &buffer, &curr_pos, (size_t)outputformat->line_ncols, (hsize_t)0, (hsize_t)0); ctx.need_prefix = TRUE; - h5tools_simple_prefix(rawoutstream, outputformat, &ctx, (hsize_t)0, 0); /* Render the element */ h5tools_str_reset(&buffer); @@ -3585,7 +3453,6 @@ xml_dump_fill_value(hid_t dcpl, hid_t type) break; case H5T_ENUM: ctx.need_prefix = TRUE; - h5tools_simple_prefix(rawoutstream, outputformat, &ctx, (hsize_t)0, 0); /* Render the element */ h5tools_str_reset(&buffer); @@ -3603,7 +3470,6 @@ xml_dump_fill_value(hid_t dcpl, hid_t type) if(name) H5free_memory(name); ctx.need_prefix = TRUE; - h5tools_simple_prefix(rawoutstream, outputformat, &ctx, (hsize_t)0, 0); /* Render the element */ h5tools_str_reset(&buffer); @@ -3612,7 +3478,6 @@ xml_dump_fill_value(hid_t dcpl, hid_t type) break; case H5T_ARRAY: ctx.need_prefix = TRUE; - h5tools_simple_prefix(rawoutstream, outputformat, &ctx, (hsize_t)0, 0); /* Render the element */ h5tools_str_reset(&buffer); @@ -3620,7 +3485,6 @@ xml_dump_fill_value(hid_t dcpl, hid_t type) h5tools_render_element(rawoutstream, outputformat, &ctx, &buffer, &curr_pos, (size_t)outputformat->line_ncols, (hsize_t)0, (hsize_t)0); ctx.need_prefix = TRUE; - h5tools_simple_prefix(rawoutstream, outputformat, &ctx, (hsize_t)0, 0); /* Render the element */ h5tools_str_reset(&buffer); @@ -3629,7 +3493,6 @@ xml_dump_fill_value(hid_t dcpl, hid_t type) break; case H5T_TIME: ctx.need_prefix = TRUE; - h5tools_simple_prefix(rawoutstream, outputformat, &ctx, (hsize_t)0, 0); /* Render the element */ h5tools_str_reset(&buffer); @@ -3637,7 +3500,6 @@ xml_dump_fill_value(hid_t dcpl, hid_t type) h5tools_render_element(rawoutstream, outputformat, &ctx, &buffer, &curr_pos, (size_t)outputformat->line_ncols, (hsize_t)0, (hsize_t)0); ctx.need_prefix = TRUE; - h5tools_simple_prefix(rawoutstream, outputformat, &ctx, (hsize_t)0, 0); /* Render the element */ h5tools_str_reset(&buffer); @@ -3646,7 +3508,6 @@ xml_dump_fill_value(hid_t dcpl, hid_t type) break; case H5T_COMPOUND: ctx.need_prefix = TRUE; - h5tools_simple_prefix(rawoutstream, outputformat, &ctx, (hsize_t)0, 0); /* Render the element */ h5tools_str_reset(&buffer); @@ -3654,7 +3515,6 @@ xml_dump_fill_value(hid_t dcpl, hid_t type) h5tools_render_element(rawoutstream, outputformat, &ctx, &buffer, &curr_pos, (size_t)outputformat->line_ncols, (hsize_t)0, (hsize_t)0); ctx.need_prefix = TRUE; - h5tools_simple_prefix(rawoutstream, outputformat, &ctx, (hsize_t)0, 0); /* Render the element */ h5tools_str_reset(&buffer); @@ -3663,7 +3523,6 @@ xml_dump_fill_value(hid_t dcpl, hid_t type) break; case H5T_VLEN: ctx.need_prefix = TRUE; - h5tools_simple_prefix(rawoutstream, outputformat, &ctx, (hsize_t)0, 0); /* Render the element */ h5tools_str_reset(&buffer); @@ -3671,7 +3530,6 @@ xml_dump_fill_value(hid_t dcpl, hid_t type) h5tools_render_element(rawoutstream, outputformat, &ctx, &buffer, &curr_pos, (size_t)outputformat->line_ncols, (hsize_t)0, (hsize_t)0); ctx.need_prefix = TRUE; - h5tools_simple_prefix(rawoutstream, outputformat, &ctx, (hsize_t)0, 0); /* Render the element */ h5tools_str_reset(&buffer); @@ -3684,7 +3542,6 @@ xml_dump_fill_value(hid_t dcpl, hid_t type) case H5T_REFERENCE: default: ctx.need_prefix = TRUE; - h5tools_simple_prefix(rawoutstream, outputformat, &ctx, (hsize_t)0, 0); /* Render the element */ h5tools_str_reset(&buffer); @@ -3692,7 +3549,6 @@ xml_dump_fill_value(hid_t dcpl, hid_t type) h5tools_render_element(rawoutstream, outputformat, &ctx, &buffer, &curr_pos, (size_t)outputformat->line_ncols, (hsize_t)0, (hsize_t)0); ctx.need_prefix = TRUE; - h5tools_simple_prefix(rawoutstream, outputformat, &ctx, (hsize_t)0, 0); /* Render the element */ h5tools_str_reset(&buffer); @@ -3706,7 +3562,6 @@ xml_dump_fill_value(hid_t dcpl, hid_t type) dump_indent -= COL; ctx.need_prefix = TRUE; - h5tools_simple_prefix(rawoutstream, outputformat, &ctx, (hsize_t)0, 0); /* Render the element */ h5tools_str_reset(&buffer); @@ -3793,7 +3648,6 @@ xml_dump_dataset(hid_t did, const char *name, struct subset_t H5_ATTR_UNUSED * s xml_name_to_XID(prefix, pstr, 100, 1); ctx.need_prefix = TRUE; - h5tools_simple_prefix(rawoutstream, outputformat, &ctx, (hsize_t)0, 0); /* Render the element */ h5tools_str_reset(&buffer); @@ -3828,7 +3682,6 @@ xml_dump_dataset(hid_t did, const char *name, struct subset_t H5_ATTR_UNUSED * s dump_indent += COL; ctx.need_prefix = TRUE; - h5tools_simple_prefix(rawoutstream, outputformat, &ctx, (hsize_t)0, 0); /* Render the element */ h5tools_str_reset(&buffer); @@ -3838,7 +3691,6 @@ xml_dump_dataset(hid_t did, const char *name, struct subset_t H5_ATTR_UNUSED * s dump_indent += COL; ctx.need_prefix = TRUE; - h5tools_simple_prefix(rawoutstream, outputformat, &ctx, (hsize_t)0, 0); /* Render the element */ h5tools_str_reset(&buffer); @@ -3853,7 +3705,6 @@ xml_dump_dataset(hid_t did, const char *name, struct subset_t H5_ATTR_UNUSED * s for (i = 0; i < ndims; i++) { ctx.need_prefix = TRUE; - h5tools_simple_prefix(rawoutstream, outputformat, &ctx, (hsize_t)0, 0); /* Render the element */ h5tools_str_reset(&buffer); @@ -3862,7 +3713,6 @@ xml_dump_dataset(hid_t did, const char *name, struct subset_t H5_ATTR_UNUSED * s } ctx.need_prefix = TRUE; - h5tools_simple_prefix(rawoutstream, outputformat, &ctx, (hsize_t)0, 0); /* Render the element */ h5tools_str_reset(&buffer); @@ -3876,7 +3726,6 @@ xml_dump_dataset(hid_t did, const char *name, struct subset_t H5_ATTR_UNUSED * s dump_indent -= COL; ctx.need_prefix = TRUE; - h5tools_simple_prefix(rawoutstream, outputformat, &ctx, (hsize_t)0, 0); /* Render the element */ h5tools_str_reset(&buffer); @@ -3887,7 +3736,6 @@ xml_dump_dataset(hid_t did, const char *name, struct subset_t H5_ATTR_UNUSED * s dump_indent -= COL; ctx.need_prefix = TRUE; - h5tools_simple_prefix(rawoutstream, outputformat, &ctx, (hsize_t)0, 0); /* Render the element */ h5tools_str_reset(&buffer); @@ -3897,7 +3745,6 @@ xml_dump_dataset(hid_t did, const char *name, struct subset_t H5_ATTR_UNUSED * s dump_indent -= COL; ctx.need_prefix = TRUE; - h5tools_simple_prefix(rawoutstream, outputformat, &ctx, (hsize_t)0, 0); /* Render the element */ h5tools_str_reset(&buffer); @@ -3912,7 +3759,6 @@ xml_dump_dataset(hid_t did, const char *name, struct subset_t H5_ATTR_UNUSED * s ctx.indent_level++; ctx.need_prefix = TRUE; - h5tools_simple_prefix(rawoutstream, outputformat, &ctx, (hsize_t)0, 0); /* Render the element */ h5tools_str_reset(&buffer); @@ -3921,7 +3767,6 @@ xml_dump_dataset(hid_t did, const char *name, struct subset_t H5_ATTR_UNUSED * s ctx.indent_level++; ctx.need_prefix = TRUE; - h5tools_simple_prefix(rawoutstream, outputformat, &ctx, (hsize_t)0, 0); /* Render the element */ h5tools_str_reset(&buffer); @@ -3930,7 +3775,6 @@ xml_dump_dataset(hid_t did, const char *name, struct subset_t H5_ATTR_UNUSED * s ctx.indent_level--; ctx.need_prefix = TRUE; - h5tools_simple_prefix(rawoutstream, outputformat, &ctx, (hsize_t)0, 0); /* Render the element */ h5tools_str_reset(&buffer); @@ -3942,7 +3786,6 @@ xml_dump_dataset(hid_t did, const char *name, struct subset_t H5_ATTR_UNUSED * s ctx.indent_level++; ctx.need_prefix = TRUE; - h5tools_simple_prefix(rawoutstream, outputformat, &ctx, (hsize_t)0, 0); /* Render the element */ h5tools_str_reset(&buffer); @@ -3951,7 +3794,6 @@ xml_dump_dataset(hid_t did, const char *name, struct subset_t H5_ATTR_UNUSED * s ctx.indent_level++; ctx.need_prefix = TRUE; - h5tools_simple_prefix(rawoutstream, outputformat, &ctx, (hsize_t)0, 0); /* Render the element */ h5tools_str_reset(&buffer); @@ -3960,7 +3802,6 @@ xml_dump_dataset(hid_t did, const char *name, struct subset_t H5_ATTR_UNUSED * s ctx.indent_level--; ctx.need_prefix = TRUE; - h5tools_simple_prefix(rawoutstream, outputformat, &ctx, (hsize_t)0, 0); /* Render the element */ h5tools_str_reset(&buffer); @@ -3976,7 +3817,6 @@ xml_dump_dataset(hid_t did, const char *name, struct subset_t H5_ATTR_UNUSED * s dump_indent += COL; ctx.need_prefix = TRUE; - h5tools_simple_prefix(rawoutstream, outputformat, &ctx, (hsize_t)0, 0); /* Render the element */ h5tools_str_reset(&buffer); @@ -4025,7 +3865,6 @@ xml_dump_dataset(hid_t did, const char *name, struct subset_t H5_ATTR_UNUSED * s dump_indent += COL; ctx.need_prefix = TRUE; - h5tools_simple_prefix(rawoutstream, outputformat, &ctx, (hsize_t)0, 0); /* Render the element */ h5tools_str_reset(&buffer); @@ -4037,7 +3876,6 @@ xml_dump_dataset(hid_t did, const char *name, struct subset_t H5_ATTR_UNUSED * s ctx.indent_level++; ctx.need_prefix = TRUE; - h5tools_simple_prefix(rawoutstream, outputformat, &ctx, (hsize_t)0, 0); /* Render the element */ h5tools_str_reset(&buffer); @@ -4050,7 +3888,6 @@ xml_dump_dataset(hid_t did, const char *name, struct subset_t H5_ATTR_UNUSED * s } ctx.need_prefix = TRUE; - h5tools_simple_prefix(rawoutstream, outputformat, &ctx, (hsize_t)0, 0); /* Render the element */ h5tools_str_reset(&buffer); @@ -4061,7 +3898,6 @@ xml_dump_dataset(hid_t did, const char *name, struct subset_t H5_ATTR_UNUSED * s dump_indent -= COL; ctx.need_prefix = TRUE; - h5tools_simple_prefix(rawoutstream, outputformat, &ctx, (hsize_t)0, 0); /* Render the element */ h5tools_str_reset(&buffer); @@ -4114,7 +3950,6 @@ xml_dump_dataset(hid_t did, const char *name, struct subset_t H5_ATTR_UNUSED * s ctx.indent_level++; ctx.need_prefix = TRUE; - h5tools_simple_prefix(rawoutstream, outputformat, &ctx, (hsize_t)0, 0); /* Render the element */ h5tools_str_reset(&buffer); @@ -4122,7 +3957,6 @@ xml_dump_dataset(hid_t did, const char *name, struct subset_t H5_ATTR_UNUSED * s h5tools_render_element(rawoutstream, outputformat, &ctx, &buffer, &curr_pos, (size_t)outputformat->line_ncols, (hsize_t)0, (hsize_t)0); ctx.need_prefix = TRUE; - h5tools_simple_prefix(rawoutstream, outputformat, &ctx, (hsize_t)0, 0); /* Render the element */ h5tools_str_reset(&buffer); @@ -4130,7 +3964,6 @@ xml_dump_dataset(hid_t did, const char *name, struct subset_t H5_ATTR_UNUSED * s h5tools_render_element(rawoutstream, outputformat, &ctx, &buffer, &curr_pos, (size_t)outputformat->line_ncols, (hsize_t)0, (hsize_t)0); ctx.need_prefix = TRUE; - h5tools_simple_prefix(rawoutstream, outputformat, &ctx, (hsize_t)0, 0); /* Render the element */ h5tools_str_reset(&buffer); @@ -4138,7 +3971,6 @@ xml_dump_dataset(hid_t did, const char *name, struct subset_t H5_ATTR_UNUSED * s h5tools_render_element(rawoutstream, outputformat, &ctx, &buffer, &curr_pos, (size_t)outputformat->line_ncols, (hsize_t)0, (hsize_t)0); ctx.need_prefix = TRUE; - h5tools_simple_prefix(rawoutstream, outputformat, &ctx, (hsize_t)0, 0); /* Render the element */ h5tools_str_reset(&buffer); @@ -4150,7 +3982,6 @@ xml_dump_dataset(hid_t did, const char *name, struct subset_t H5_ATTR_UNUSED * s case H5T_COMPOUND: ctx.need_prefix = TRUE; - h5tools_simple_prefix(rawoutstream, outputformat, &ctx, (hsize_t)0, 0); /* Render the element */ h5tools_str_reset(&buffer); @@ -4166,7 +3997,6 @@ xml_dump_dataset(hid_t did, const char *name, struct subset_t H5_ATTR_UNUSED * s case H5T_REFERENCE: ctx.need_prefix = TRUE; - h5tools_simple_prefix(rawoutstream, outputformat, &ctx, (hsize_t)0, 0); /* Render the element */ h5tools_str_reset(&buffer); @@ -4174,7 +4004,6 @@ xml_dump_dataset(hid_t did, const char *name, struct subset_t H5_ATTR_UNUSED * s h5tools_render_element(rawoutstream, outputformat, &ctx, &buffer, &curr_pos, (size_t)outputformat->line_ncols, (hsize_t)0, (hsize_t)0); if (!H5Tequal(type, H5T_STD_REF_OBJ)) { ctx.need_prefix = TRUE; - h5tools_simple_prefix(rawoutstream, outputformat, &ctx, (hsize_t)0, 0); /* Render the element */ h5tools_str_reset(&buffer); @@ -4182,7 +4011,6 @@ xml_dump_dataset(hid_t did, const char *name, struct subset_t H5_ATTR_UNUSED * s h5tools_render_element(rawoutstream, outputformat, &ctx, &buffer, &curr_pos, (size_t)outputformat->line_ncols, (hsize_t)0, (hsize_t)0); ctx.need_prefix = TRUE; - h5tools_simple_prefix(rawoutstream, outputformat, &ctx, (hsize_t)0, 0); /* Render the element */ h5tools_str_reset(&buffer); @@ -4191,7 +4019,6 @@ xml_dump_dataset(hid_t did, const char *name, struct subset_t H5_ATTR_UNUSED * s } else { ctx.need_prefix = TRUE; - h5tools_simple_prefix(rawoutstream, outputformat, &ctx, (hsize_t)0, 0); /* Render the element */ h5tools_str_reset(&buffer); @@ -4201,7 +4028,6 @@ xml_dump_dataset(hid_t did, const char *name, struct subset_t H5_ATTR_UNUSED * s xml_print_refs(did, DATASET_DATA); ctx.need_prefix = TRUE; - h5tools_simple_prefix(rawoutstream, outputformat, &ctx, (hsize_t)0, 0); /* Render the element */ h5tools_str_reset(&buffer); @@ -4210,7 +4036,6 @@ xml_dump_dataset(hid_t did, const char *name, struct subset_t H5_ATTR_UNUSED * s } ctx.need_prefix = TRUE; - h5tools_simple_prefix(rawoutstream, outputformat, &ctx, (hsize_t)0, 0); /* Render the element */ h5tools_str_reset(&buffer); @@ -4222,7 +4047,6 @@ xml_dump_dataset(hid_t did, const char *name, struct subset_t H5_ATTR_UNUSED * s ctx.indent_level--; dump_indent -= COL; ctx.need_prefix = TRUE; - h5tools_simple_prefix(rawoutstream, outputformat, &ctx, (hsize_t)0, 0); /* Render the element */ h5tools_str_reset(&buffer); @@ -4241,7 +4065,6 @@ xml_dump_dataset(hid_t did, const char *name, struct subset_t H5_ATTR_UNUSED * s case H5T_NCLASSES: default: ctx.need_prefix = TRUE; - h5tools_simple_prefix(rawoutstream, outputformat, &ctx, (hsize_t)0, 0); /* Render the element */ h5tools_str_reset(&buffer); @@ -4249,7 +4072,6 @@ xml_dump_dataset(hid_t did, const char *name, struct subset_t H5_ATTR_UNUSED * s h5tools_render_element(rawoutstream, outputformat, &ctx, &buffer, &curr_pos, (size_t)outputformat->line_ncols, (hsize_t)0, (hsize_t)0); ctx.need_prefix = TRUE; - h5tools_simple_prefix(rawoutstream, outputformat, &ctx, (hsize_t)0, 0); /* Render the element */ h5tools_str_reset(&buffer); @@ -4257,7 +4079,6 @@ xml_dump_dataset(hid_t did, const char *name, struct subset_t H5_ATTR_UNUSED * s h5tools_render_element(rawoutstream, outputformat, &ctx, &buffer, &curr_pos, (size_t)outputformat->line_ncols, (hsize_t)0, (hsize_t)0); ctx.need_prefix = TRUE; - h5tools_simple_prefix(rawoutstream, outputformat, &ctx, (hsize_t)0, 0); /* Render the element */ h5tools_str_reset(&buffer); @@ -4265,7 +4086,6 @@ xml_dump_dataset(hid_t did, const char *name, struct subset_t H5_ATTR_UNUSED * s h5tools_render_element(rawoutstream, outputformat, &ctx, &buffer, &curr_pos, (size_t)outputformat->line_ncols, (hsize_t)0, (hsize_t)0); ctx.need_prefix = TRUE; - h5tools_simple_prefix(rawoutstream, outputformat, &ctx, (hsize_t)0, 0); /* Render the element */ h5tools_str_reset(&buffer); @@ -4279,7 +4099,6 @@ xml_dump_dataset(hid_t did, const char *name, struct subset_t H5_ATTR_UNUSED * s ctx.indent_level++; ctx.need_prefix = TRUE; - h5tools_simple_prefix(rawoutstream, outputformat, &ctx, (hsize_t)0, 0); /* Render the element */ h5tools_str_reset(&buffer); @@ -4288,7 +4107,6 @@ xml_dump_dataset(hid_t did, const char *name, struct subset_t H5_ATTR_UNUSED * s ctx.indent_level++; ctx.need_prefix = TRUE; - h5tools_simple_prefix(rawoutstream, outputformat, &ctx, (hsize_t)0, 0); /* Render the element */ h5tools_str_reset(&buffer); @@ -4297,7 +4115,6 @@ xml_dump_dataset(hid_t did, const char *name, struct subset_t H5_ATTR_UNUSED * s ctx.indent_level--; ctx.need_prefix = TRUE; - h5tools_simple_prefix(rawoutstream, outputformat, &ctx, (hsize_t)0, 0); /* Render the element */ h5tools_str_reset(&buffer); @@ -4311,7 +4128,6 @@ xml_dump_dataset(hid_t did, const char *name, struct subset_t H5_ATTR_UNUSED * s H5Pclose(dcpl); ctx.need_prefix = TRUE; - h5tools_simple_prefix(rawoutstream, outputformat, &ctx, (hsize_t)0, 0); /* Render the element */ h5tools_str_reset(&buffer); @@ -4377,7 +4193,6 @@ xml_print_enum(hid_t type) super = H5Tget_super(type); ctx.need_prefix = TRUE; - h5tools_simple_prefix(rawoutstream, outputformat, &ctx, (hsize_t)0, 0); /* Render the element */ h5tools_str_reset(&buffer); @@ -4387,7 +4202,6 @@ xml_print_enum(hid_t type) xml_print_datatype(super,0); ctx.need_prefix = TRUE; - h5tools_simple_prefix(rawoutstream, outputformat, &ctx, (hsize_t)0, 0); /* Render the element */ h5tools_str_reset(&buffer); @@ -4438,7 +4252,6 @@ xml_print_enum(hid_t type) char *t_name = xml_escape_the_name(name[i]); ctx.need_prefix = TRUE; - h5tools_simple_prefix(rawoutstream, outputformat, &ctx, (hsize_t)0, 0); /* Render the element */ h5tools_str_reset(&buffer); @@ -4456,7 +4269,6 @@ xml_print_enum(hid_t type) ctx.indent_level--; ctx.need_prefix = TRUE; - h5tools_simple_prefix(rawoutstream, outputformat, &ctx, (hsize_t)0, 0); /* Render the element */ h5tools_str_reset(&buffer); @@ -4464,7 +4276,6 @@ xml_print_enum(hid_t type) h5tools_render_element(rawoutstream, outputformat, &ctx, &buffer, &curr_pos, (size_t)outputformat->line_ncols, (hsize_t)0, (hsize_t)0); ctx.need_prefix = TRUE; - h5tools_simple_prefix(rawoutstream, outputformat, &ctx, (hsize_t)0, 0); /* Render the element */ h5tools_str_reset(&buffer); @@ -4494,7 +4305,6 @@ xml_print_enum(hid_t type) ctx.indent_level--; ctx.need_prefix = TRUE; - h5tools_simple_prefix(rawoutstream, outputformat, &ctx, (hsize_t)0, 0); /* Render the element */ h5tools_str_reset(&buffer); -- cgit v0.12 From 81adc76db6df60c9ebe8b5177fdc996d9039719e Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Thu, 25 Jan 2018 11:19:03 -0600 Subject: Fix typo --- release_docs/RELEASE.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/release_docs/RELEASE.txt b/release_docs/RELEASE.txt index 9caa46b..b098a16 100644 --- a/release_docs/RELEASE.txt +++ b/release_docs/RELEASE.txt @@ -512,7 +512,7 @@ Bug Fixes since HDF5-1.10.1 release h5dump would output an indented blank line in the filters section. - h5dump over used the h5tools_simple_prefix function, which is a + h5dump overused the h5tools_simple_prefix function, which is a function intended to account for the data index (x,y,z) option. Removed the function call for header information. -- cgit v0.12 From 79f2f733796429bd5b5bf691b2f469fe9318c4b6 Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Thu, 25 Jan 2018 16:58:36 -0600 Subject: Fix ext lib references --- CMakeInstallation.cmake | 10 +++++----- CMakeLists.txt | 2 +- config/cmake/hdf5-config.cmake.in | 8 +++++++- 3 files changed, 13 insertions(+), 7 deletions(-) diff --git a/CMakeInstallation.cmake b/CMakeInstallation.cmake index 8804964..0bfb2cc 100644 --- a/CMakeInstallation.cmake +++ b/CMakeInstallation.cmake @@ -41,7 +41,7 @@ if (NOT HDF5_EXTERNALLY_CONFIGURED) if (HDF5_EXPORTED_TARGETS) install ( EXPORT ${HDF5_EXPORTED_TARGETS} - DESTINATION ${HDF5_INSTALL_CMAKE_DIR} + DESTINATION ${HDF5_INSTALL_CMAKE_DIR}/hdf5 FILE ${HDF5_PACKAGE}${HDF_PACKAGE_EXT}-targets.cmake NAMESPACE ${HDF5_PACKAGE}:: COMPONENT configinstall @@ -84,7 +84,7 @@ set (CURRENT_BUILD_DIR "${CMAKE_CURRENT_BINARY_DIR}" ) configure_package_config_file ( ${HDF_RESOURCES_DIR}/hdf5-config.cmake.in "${HDF5_BINARY_DIR}/${HDF5_PACKAGE}${HDF_PACKAGE_EXT}-config.cmake" - INSTALL_DESTINATION "${HDF5_INSTALL_CMAKE_DIR}" + INSTALL_DESTINATION "${HDF5_INSTALL_CMAKE_DIR}/hdf5" PATH_VARS INCLUDE_INSTALL_DIR SHARE_INSTALL_DIR CURRENT_BUILD_DIR INSTALL_PREFIX "${CMAKE_CURRENT_BINARY_DIR}" ) @@ -98,14 +98,14 @@ set (CURRENT_BUILD_DIR "${CMAKE_INSTALL_PREFIX}" ) configure_package_config_file ( ${HDF_RESOURCES_DIR}/hdf5-config.cmake.in "${HDF5_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/${HDF5_PACKAGE}${HDF_PACKAGE_EXT}-config.cmake" - INSTALL_DESTINATION "${HDF5_INSTALL_CMAKE_DIR}" + INSTALL_DESTINATION "${HDF5_INSTALL_CMAKE_DIR}/hdf5" PATH_VARS INCLUDE_INSTALL_DIR SHARE_INSTALL_DIR CURRENT_BUILD_DIR ) if (NOT HDF5_EXTERNALLY_CONFIGURED) install ( FILES ${HDF5_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/${HDF5_PACKAGE}${HDF_PACKAGE_EXT}-config.cmake - DESTINATION ${HDF5_INSTALL_CMAKE_DIR} + DESTINATION ${HDF5_INSTALL_CMAKE_DIR}/hdf5 COMPONENT configinstall ) endif () @@ -120,7 +120,7 @@ if (NOT HDF5_EXTERNALLY_CONFIGURED) ) install ( FILES ${HDF5_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/${HDF5_PACKAGE}${HDF_PACKAGE_EXT}-config-version.cmake - DESTINATION ${HDF5_INSTALL_CMAKE_DIR} + DESTINATION ${HDF5_INSTALL_CMAKE_DIR}/hdf5 COMPONENT configinstall ) endif () diff --git a/CMakeLists.txt b/CMakeLists.txt index ce0aadf..922ada8 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -233,7 +233,7 @@ if (NOT HDF5_INSTALL_DATA_DIR) set (HDF5_INSTALL_FWRK_DIR ${CMAKE_INSTALL_FRAMEWORK_PREFIX}) endif () set (HDF5_INSTALL_DATA_DIR share) - set (HDF5_INSTALL_CMAKE_DIR share/cmake/hdf5) + set (HDF5_INSTALL_CMAKE_DIR share/cmake) else () set (HDF5_INSTALL_DATA_DIR ".") set (HDF5_INSTALL_CMAKE_DIR cmake) diff --git a/config/cmake/hdf5-config.cmake.in b/config/cmake/hdf5-config.cmake.in index 421f693..574f541 100644 --- a/config/cmake/hdf5-config.cmake.in +++ b/config/cmake/hdf5-config.cmake.in @@ -105,7 +105,13 @@ set (HDF5_VERSION_MINOR @HDF5_VERSION_MINOR@) # project which has already built hdf5 as a subproject #----------------------------------------------------------------------------- if (NOT TARGET "@HDF5_PACKAGE@") - include (@PACKAGE_SHARE_INSTALL_DIR@/@HDF5_PACKAGE@@HDF_PACKAGE_EXT@-targets.cmake) + if (${HDF5_PACKAGE_NAME}_ENABLE_Z_LIB_SUPPORT AND ${HDF5_PACKAGE_NAME}_PACKAGE_EXTLIBS AND NOT TARGET "zlib") + include (@PACKAGE_SHARE_INSTALL_DIR@/@ZLIB_PACKAGE_NAME@/@ZLIB_PACKAGE_NAME@@HDF_PACKAGE_EXT@-targets.cmake) + endif () + if (${HDF5_PACKAGE_NAME}_ENABLE_SZIP_SUPPORT AND ${HDF5_PACKAGE_NAME}_PACKAGE_EXTLIBS AND NOT TARGET "szip") + include (@PACKAGE_SHARE_INSTALL_DIR@/@SZIP_PACKAGE_NAME@/@SZIP_PACKAGE_NAME@@HDF_PACKAGE_EXT@-targets.cmake) + endif () + include (@PACKAGE_SHARE_INSTALL_DIR@/@HDF5_PACKAGE@/@HDF5_PACKAGE@@HDF_PACKAGE_EXT@-targets.cmake) endif () # Handle default component(static) : -- cgit v0.12 From 8b658fb747bd52a2e87b7acff93ebbafb11c5fbd Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Mon, 29 Jan 2018 10:31:12 -0600 Subject: Merge windows compile fix from develop --- CMakeLists.txt | 88 +++------------------------------- config/cmake/libhdf5.settings.cmake.in | 2 +- config/cmake_ext_mod/HDFMacros.cmake | 84 +++++++++++++++++++++++++++++++- 3 files changed, 90 insertions(+), 84 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 922ada8..3579f6c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -199,51 +199,6 @@ set (HDF5_JAVA_LOGGING_JAR ${HDF5_SOURCE_DIR}/java/lib/slf4j-api-1.7.5.j set (HDF5_JAVA_LOGGING_NOP_JAR ${HDF5_SOURCE_DIR}/java/lib/ext/slf4j-nop-1.7.5.jar) set (HDF5_JAVA_LOGGING_SIMPLE_JAR ${HDF5_SOURCE_DIR}/java/lib/ext/slf4j-simple-1.7.5.jar) -if (APPLE) - option (HDF5_BUILD_FRAMEWORKS "TRUE to build as frameworks libraries, FALSE to build according to BUILD_SHARED_LIBS" FALSE) -endif () - -if (NOT HDF5_INSTALL_BIN_DIR) - set (HDF5_INSTALL_BIN_DIR bin) -endif () -if (NOT HDF5_INSTALL_LIB_DIR) - if (APPLE) - if (HDF5_BUILD_FRAMEWORKS) - set (HDF5_INSTALL_JAR_DIR ../Java) - else () - set (HDF5_INSTALL_JAR_DIR lib) - endif () - set (HDF5_INSTALL_FMWK_DIR ${CMAKE_INSTALL_FRAMEWORK_PREFIX}) - else () - set (HDF5_INSTALL_JAR_DIR lib) - endif () - set (HDF5_INSTALL_LIB_DIR lib) -endif () -if (NOT HDF5_INSTALL_INCLUDE_DIR) - set (HDF5_INSTALL_INCLUDE_DIR include) -endif () -if (NOT HDF5_INSTALL_DATA_DIR) - if (NOT WIN32) - if (APPLE) - if (HDF5_BUILD_FRAMEWORKS) - set (HDF5_INSTALL_EXTRA_DIR ../SharedSupport) - else () - set (HDF5_INSTALL_EXTRA_DIR share) - endif () - set (HDF5_INSTALL_FWRK_DIR ${CMAKE_INSTALL_FRAMEWORK_PREFIX}) - endif () - set (HDF5_INSTALL_DATA_DIR share) - set (HDF5_INSTALL_CMAKE_DIR share/cmake) - else () - set (HDF5_INSTALL_DATA_DIR ".") - set (HDF5_INSTALL_CMAKE_DIR cmake) - endif () -endif () - -if (DEFINED ADDITIONAL_CMAKE_PREFIX_PATH AND EXISTS "${ADDITIONAL_CMAKE_PREFIX_PATH}") - set (CMAKE_PREFIX_PATH ${ADDITIONAL_CMAKE_PREFIX_PATH} ${CMAKE_PREFIX_PATH}) -endif () - #----------------------------------------------------------------------------- # parse the full version number from H5public.h and include in H5_VERS_INFO #----------------------------------------------------------------------------- @@ -406,46 +361,15 @@ set (HDF5_PACKAGE_BUGREPORT "help@hdfgroup.org") # Include some macros for reusable code #----------------------------------------------------------------------------- include (${HDF_RESOURCES_EXT_DIR}/HDFMacros.cmake) -include (${HDF_RESOURCES_EXT_DIR}/HDFLibMacros.cmake) -include (${HDF_RESOURCES_DIR}/HDF5Macros.cmake) -SET_HDF_BUILD_TYPE() +HDF_DIR_PATHS(${HDF5_PACKAGE_NAME}) -#----------------------------------------------------------------------------- -# Setup output Directories -#----------------------------------------------------------------------------- -if (NOT HDF5_EXTERNALLY_CONFIGURED) - set (CMAKE_RUNTIME_OUTPUT_DIRECTORY - ${PROJECT_BINARY_DIR}/bin CACHE PATH "Single Directory for all Executables." - ) - set (CMAKE_LIBRARY_OUTPUT_DIRECTORY - ${PROJECT_BINARY_DIR}/bin CACHE PATH "Single Directory for all Libraries" - ) - set (CMAKE_ARCHIVE_OUTPUT_DIRECTORY - ${PROJECT_BINARY_DIR}/bin CACHE PATH "Single Directory for all static libraries." - ) - set (CMAKE_Fortran_MODULE_DIRECTORY - ${PROJECT_BINARY_DIR}/bin CACHE PATH "Single Directory for all fortran modules." - ) - if (WIN32) - set (CMAKE_TEST_OUTPUT_DIRECTORY ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${CTEST_CONFIGURATION_TYPE}) - set (CMAKE_PDB_OUTPUT_DIRECTORY - ${PROJECT_BINARY_DIR}/bin CACHE PATH "Single Directory for all pdb files." - ) - else () - set (CMAKE_TEST_OUTPUT_DIRECTORY ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${CTEST_CONFIGURATION_TYPE}) - endif () -else () - # if we are externally configured, but the project uses old cmake scripts - # this may not be set and utilities like H5detect will fail - if (NOT CMAKE_RUNTIME_OUTPUT_DIRECTORY) - set (CMAKE_RUNTIME_OUTPUT_DIRECTORY ${EXECUTABLE_OUTPUT_PATH}) - endif () -endif () +include (${HDF_RESOURCES_EXT_DIR}/HDFLibMacros.cmake) +include (${HDF_RESOURCES_DIR}/HDF5Macros.cmake) #----------------------------------------------------------------------------- # Targets built within this project are exported at Install time for use -# by other projects using FindHDF5. +# by other projects. #----------------------------------------------------------------------------- if (NOT HDF5_EXPORTED_TARGETS) set (HDF5_EXPORTED_TARGETS "hdf5-targets") @@ -756,13 +680,13 @@ add_subdirectory (${HDF5_SOURCE_DIR}/src ${PROJECT_BINARY_DIR}/src) if (HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "GIT" OR HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "TGZ") if (ZLIB_FOUND AND ZLIB_USE_EXTERNAL) - ADD_DEPENDENCIES (${HDF5_LIB_TARGET} ZLIB) + add_dependencies (${HDF5_LIB_TARGET} ZLIB) if (BUILD_SHARED_LIBS) add_dependencies (${HDF5_LIBSH_TARGET} ZLIB) endif () endif () if (SZIP_FOUND AND SZIP_USE_EXTERNAL) - ADD_DEPENDENCIES (${HDF5_LIB_TARGET} SZIP) + add_dependencies (${HDF5_LIB_TARGET} SZIP) if (BUILD_SHARED_LIBS) add_dependencies (${HDF5_LIBSH_TARGET} SZIP) endif () diff --git a/config/cmake/libhdf5.settings.cmake.in b/config/cmake/libhdf5.settings.cmake.in index 7bb426f..891e3a7 100644 --- a/config/cmake/libhdf5.settings.cmake.in +++ b/config/cmake/libhdf5.settings.cmake.in @@ -13,7 +13,7 @@ General Information: Compiling Options: ------------------ - Build Mode: @HDF_BUILD_TYPE@ + Build Mode: @CMAKE_BUILD_TYPE@ Debugging Symbols: @SYMBOLS@ Asserts: @ASSERTS@ Profiling: @PROFILING@ diff --git a/config/cmake_ext_mod/HDFMacros.cmake b/config/cmake_ext_mod/HDFMacros.cmake index 1326420..4097ca9 100644 --- a/config/cmake_ext_mod/HDFMacros.cmake +++ b/config/cmake_ext_mod/HDFMacros.cmake @@ -166,7 +166,7 @@ macro (HDF_IMPORT_SET_LIB_OPTIONS libtarget libname libtype libversion) if (${importtype} MATCHES "IMPORT") set (importprefix "${CMAKE_STATIC_LIBRARY_PREFIX}") endif () - if (${HDF_CFG_NAME} MATCHES "Debug") + if (${CMAKE_BUILD_TYPE} MATCHES "Debug") set (IMPORT_LIB_NAME ${LIB_DEBUG_NAME}) else () set (IMPORT_LIB_NAME ${LIB_RELEASE_NAME}) @@ -331,3 +331,85 @@ macro (HDFTEST_COPY_FILE src dest target) ) list (APPEND ${target}_list "${dest}") endmacro () + +macro (HDF_DIR_PATHS package_prefix) + if (APPLE) + option (${package_prefix}_BUILD_FRAMEWORKS "TRUE to build as frameworks libraries, FALSE to build according to BUILD_SHARED_LIBS" FALSE) + endif () + + if (NOT ${package_prefix}_INSTALL_BIN_DIR) + set (${package_prefix}_INSTALL_BIN_DIR bin) + endif () + if (NOT ${package_prefix}_INSTALL_LIB_DIR) + if (APPLE) + if (${package_prefix}_BUILD_FRAMEWORKS) + set (${package_prefix}_INSTALL_JAR_DIR ../Java) + else () + set (${package_prefix}_INSTALL_JAR_DIR lib) + endif () + set (${package_prefix}_INSTALL_FMWK_DIR ${CMAKE_INSTALL_FRAMEWORK_PREFIX}) + else () + set (${package_prefix}_INSTALL_JAR_DIR lib) + endif () + set (${package_prefix}_INSTALL_LIB_DIR lib) + endif () + if (NOT ${package_prefix}_INSTALL_INCLUDE_DIR) + set (${package_prefix}_INSTALL_INCLUDE_DIR include) + endif () + if (NOT ${package_prefix}_INSTALL_DATA_DIR) + if (NOT WIN32) + if (APPLE) + if (${package_prefix}_BUILD_FRAMEWORKS) + set (${package_prefix}_INSTALL_EXTRA_DIR ../SharedSupport) + else () + set (${package_prefix}_INSTALL_EXTRA_DIR share) + endif () + set (${package_prefix}_INSTALL_FWRK_DIR ${CMAKE_INSTALL_FRAMEWORK_PREFIX}) + endif () + set (${package_prefix}_INSTALL_DATA_DIR share) + set (${package_prefix}_INSTALL_CMAKE_DIR share/cmake) + else () + set (${package_prefix}_INSTALL_DATA_DIR ".") + set (${package_prefix}_INSTALL_CMAKE_DIR cmake) + endif () + endif () + + if (DEFINED ADDITIONAL_CMAKE_PREFIX_PATH AND EXISTS "${ADDITIONAL_CMAKE_PREFIX_PATH}") + set (CMAKE_PREFIX_PATH ${ADDITIONAL_CMAKE_PREFIX_PATH} ${CMAKE_PREFIX_PATH}) + endif () + + SET_HDF_BUILD_TYPE() + +#----------------------------------------------------------------------------- +# Setup output Directories +#----------------------------------------------------------------------------- + if (NOT ${package_prefix}_EXTERNALLY_CONFIGURED) + set (CMAKE_RUNTIME_OUTPUT_DIRECTORY + ${PROJECT_BINARY_DIR}/bin CACHE PATH "Single Directory for all Executables." + ) + set (CMAKE_LIBRARY_OUTPUT_DIRECTORY + ${PROJECT_BINARY_DIR}/bin CACHE PATH "Single Directory for all Libraries" + ) + set (CMAKE_ARCHIVE_OUTPUT_DIRECTORY + ${PROJECT_BINARY_DIR}/bin CACHE PATH "Single Directory for all static libraries." + ) + set (CMAKE_Fortran_MODULE_DIRECTORY + ${PROJECT_BINARY_DIR}/bin CACHE PATH "Single Directory for all fortran modules." + ) + if (WIN32) + set (CMAKE_TEST_OUTPUT_DIRECTORY ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${CTEST_CONFIGURATION_TYPE}) + set (CMAKE_PDB_OUTPUT_DIRECTORY + ${PROJECT_BINARY_DIR}/bin CACHE PATH "Single Directory for all pdb files." + ) + else () + set (CMAKE_TEST_OUTPUT_DIRECTORY ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${CTEST_CONFIGURATION_TYPE}) + endif () + else () + # if we are externally configured, but the project uses old cmake scripts + # this may not be set and utilities like H5detect will fail + if (NOT CMAKE_RUNTIME_OUTPUT_DIRECTORY) + set (CMAKE_RUNTIME_OUTPUT_DIRECTORY ${EXECUTABLE_OUTPUT_PATH}) + endif () + endif () +endmacro () + -- cgit v0.12 From 2e387d1bf6f60db88b5bdb1eef482fedc11e11f9 Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Mon, 29 Jan 2018 12:43:54 -0600 Subject: Update refences to CMake usage --- config/cmake/CTestScript.cmake | 7 -- config/cmake/scripts/CTestScript.cmake | 7 -- config/cmake/scripts/HDF5config.cmake | 52 +------- config/cmake/scripts/HDF5options.cmake | 26 ++++ release_docs/INSTALL_CMake.txt | 8 -- release_docs/USING_HDF5_CMake.txt | 219 +++++++++++++++++++-------------- 6 files changed, 154 insertions(+), 165 deletions(-) diff --git a/config/cmake/CTestScript.cmake b/config/cmake/CTestScript.cmake index c59b10c..a8b7bbc 100755 --- a/config/cmake/CTestScript.cmake +++ b/config/cmake/CTestScript.cmake @@ -63,13 +63,6 @@ if (APPLE) set (ENV{CC} "${XCODE_CC}") set (ENV{CXX} "${XCODE_CXX}") - if (NOT NO_MAC_FORTRAN) - # Shared fortran is not supported, build static - set (BUILD_OPTIONS "${BUILD_OPTIONS} -DBUILD_SHARED_LIBS:BOOL=OFF -DCMAKE_ANSI_CFLAGS:STRING=-fPIC") - else () - set (BUILD_OPTIONS "${BUILD_OPTIONS} -DHDF5_BUILD_FORTRAN:BOOL=OFF") - endif () - set (BUILD_OPTIONS "${BUILD_OPTIONS} -DCTEST_USE_LAUNCHERS:BOOL=ON -DCMAKE_BUILD_WITH_INSTALL_RPATH:BOOL=OFF") endif () diff --git a/config/cmake/scripts/CTestScript.cmake b/config/cmake/scripts/CTestScript.cmake index 3cb9a5e..f826e31 100755 --- a/config/cmake/scripts/CTestScript.cmake +++ b/config/cmake/scripts/CTestScript.cmake @@ -64,13 +64,6 @@ if (APPLE) set (ENV{CC} "${XCODE_CC}") set (ENV{CXX} "${XCODE_CXX}") - if (NOT NO_MAC_FORTRAN) - # Shared fortran is not supported, build static - set (BUILD_OPTIONS "${BUILD_OPTIONS} -DBUILD_SHARED_LIBS:BOOL=OFF -DCMAKE_ANSI_CFLAGS:STRING=-fPIC") - else () - set (BUILD_OPTIONS "${BUILD_OPTIONS} -DHDF5_BUILD_FORTRAN:BOOL=OFF") - endif () - set (BUILD_OPTIONS "${BUILD_OPTIONS} -DCTEST_USE_LAUNCHERS:BOOL=ON -DCMAKE_BUILD_WITH_INSTALL_RPATH:BOOL=OFF") endif () diff --git a/config/cmake/scripts/HDF5config.cmake b/config/cmake/scripts/HDF5config.cmake index e8f3d7e..df89c2c 100755 --- a/config/cmake/scripts/HDF5config.cmake +++ b/config/cmake/scripts/HDF5config.cmake @@ -32,10 +32,6 @@ cmake_minimum_required (VERSION 3.2.2 FATAL_ERROR) # INSTALLDIR - root folder where hdf5 is installed # CTEST_CONFIGURATION_TYPE - Release, Debug, etc # CTEST_SOURCE_NAME - source folder -# STATIC_ONLY - Build/use static libraries -# FORTRAN_LIBRARIES - Build/use fortran libraries -# JAVA_LIBRARIES - Build/use java libraries -# NO_MAC_FORTRAN - Yes to be SHARED on a Mac ############################################################################## set (CTEST_SOURCE_VERSION "1.10.2") @@ -47,10 +43,6 @@ set (CTEST_SOURCE_VERSEXT "-snap9") #INSTALLDIR - HDF5-1.10.0 root folder #CTEST_CONFIGURATION_TYPE - Release, Debug, RelWithDebInfo #CTEST_SOURCE_NAME - name of source folder; HDF5-1.10.0 -#STATIC_ONLY - Default is YES -#FORTRAN_LIBRARIES - Default is NO -#JAVA_LIBRARIES - Default is NO -#NO_MAC_FORTRAN - set to TRUE to allow shared libs on a Mac if (DEFINED CTEST_SCRIPT_ARG) # transform ctest script arguments of the form # script.ctest,var1=value1,var2=value2 @@ -70,6 +62,7 @@ endif () ################################################################### ### Following Line is one of [Release, RelWithDebInfo, Debug] ##### +### (default use command line -C value) set (CTEST_CONFIGURATION_TYPE "$ENV{CMAKE_CONFIG_TYPE}") ################################################################### @@ -86,21 +79,6 @@ endif () if (NOT DEFINED CTEST_SOURCE_NAME) set (CTEST_SOURCE_NAME "hdf5-${CTEST_SOURCE_VERSION}${CTEST_SOURCE_VERSEXT}") endif () -if (NOT DEFINED STATIC_ONLY) - set (STATICONLYLIBRARIES "YES") -else () - set (STATICONLYLIBRARIES "NO") -endif () -if (NOT DEFINED FORTRAN_LIBRARIES) - set (FORTRANLIBRARIES "NO") -else () - set(FORTRANLIBRARIES "YES") -endif () -if (NOT DEFINED JAVA_LIBRARIES) - set (JAVALIBRARIES "NO") -else () - set (JAVALIBRARIES "YES") -endif () set (CTEST_BINARY_NAME "build") set (CTEST_DASHBOARD_ROOT "${CTEST_SCRIPT_DIRECTORY}") @@ -212,34 +190,6 @@ set (REPOSITORY_BRANCH "develop") #set(CTEST_USE_TAR_SOURCE "${CTEST_SOURCE_VERSION}") ################################################################### -################################################################### -if (${STATICONLYLIBRARIES}) - set (ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DBUILD_SHARED_LIBS:BOOL=OFF") - ######### Following describes computer ############ - ## following is optional to describe build ## - set (SITE_BUILDNAME_SUFFIX "STATIC") -endif () -################################################################### -#### fortran #### -if (${FORTRANLIBRARIES}) - set (ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF5_BUILD_FORTRAN:BOOL=ON") - ### enable Fortran 2003 depends on HDF5_BUILD_FORTRAN - set (ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF5_ENABLE_F2003:BOOL=ON") -else () - set (ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF5_BUILD_FORTRAN:BOOL=OFF") - ### enable Fortran 2003 depends on HDF5_BUILD_FORTRAN - set (ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF5_ENABLE_F2003:BOOL=OFF") -endif () -#### java #### -if (${JAVALIBRARIES}) - set (ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF5_BUILD_JAVA:BOOL=ON") -else () - set (ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF5_BUILD_JAVA:BOOL=OFF") -endif () - -### change install prefix -set (ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DCMAKE_INSTALL_PREFIX:PATH=${INSTALLDIR}") -set (ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DCTEST_CONFIGURATION_TYPE:STRING=$ENV{CMAKE_CONFIG_TYPE}") ################################################################### diff --git a/config/cmake/scripts/HDF5options.cmake b/config/cmake/scripts/HDF5options.cmake index b090434..82ab04a 100755 --- a/config/cmake/scripts/HDF5options.cmake +++ b/config/cmake/scripts/HDF5options.cmake @@ -21,6 +21,32 @@ #set(CMAKE_GENERATOR_TOOLSET "Intel C++ Compiler 17.0") ############################################################################################# +#### Only build static libraries #### +#set (ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DBUILD_SHARED_LIBS:BOOL=OFF") +#### Add PICC option on linux/mac #### +#set (ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DCMAKE_ANSI_CFLAGS:STRING=-fPIC") + +############################################################################################# +#### fortran enabled #### +#set (ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF5_BUILD_FORTRAN:BOOL=ON") + ### enable Fortran 2003 depends on HDF5_BUILD_FORTRAN +#set (ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF5_ENABLE_F2003:BOOL=ON") +#### fortran disabled #### +set (ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF5_BUILD_FORTRAN:BOOL=OFF") + ### enable Fortran 2003 depends on HDF5_BUILD_FORTRAN +set (ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF5_ENABLE_F2003:BOOL=OFF") + +############################################################################################# +#### java enabled #### +#set (ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF5_BUILD_JAVA:BOOL=ON") +#### java disabled #### +set (ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF5_BUILD_JAVA:BOOL=OFF") + +############################################################################################# +### change install prefix (default use INSTALLDIR value) +set (ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DCMAKE_INSTALL_PREFIX:PATH=${INSTALLDIR}") + +############################################################################################# #### ext libraries #### ### ext libs from tgz diff --git a/release_docs/INSTALL_CMake.txt b/release_docs/INSTALL_CMake.txt index c5e2c4c..5040cb7 100644 --- a/release_docs/INSTALL_CMake.txt +++ b/release_docs/INSTALL_CMake.txt @@ -664,10 +664,6 @@ cmake_minimum_required (VERSION 3.2.2 FATAL_ERROR) # INSTALLDIR - root folder where hdf5 is installed # CTEST_CONFIGURATION_TYPE - Release, Debug, etc # CTEST_SOURCE_NAME - source folder -# STATIC_ONLY - Build/use static libraries -# FORTRAN_LIBRARIES - Build/use fortran libraries -# JAVA_LIBRARIES - Build/use java libraries -# NO_MAC_FORTRAN - Yes to be SHARED on a Mac ############################################################################## set (CTEST_SOURCE_VERSION 1.10.2) @@ -679,10 +675,6 @@ set (CTEST_SOURCE_VERSEXT "") #INSTALLDIR - HDF5-1.10.0 root folder #CTEST_CONFIGURATION_TYPE - Release, Debug, RelWithDebInfo #CTEST_SOURCE_NAME - name of source folder; HDF5-1.10.0 -#STATIC_ONLY - Default is YES -#FORTRAN_LIBRARIES - Default is NO -#JAVA_LIBRARIES - Default is NO -#NO_MAC_FORTRAN - set to TRUE to allow shared libs on a Mac if (DEFINED CTEST_SCRIPT_ARG) # transform ctest script arguments of the form # script.ctest,var1=value1,var2=value2 diff --git a/release_docs/USING_HDF5_CMake.txt b/release_docs/USING_HDF5_CMake.txt index 5993a0f..e75ae81 100644 --- a/release_docs/USING_HDF5_CMake.txt +++ b/release_docs/USING_HDF5_CMake.txt @@ -219,68 +219,74 @@ NOTE: this file is available at the HDF web site: http://www.hdfgroup.org/HDF5/release/cmakebuild.html HDF5_Examples.cmake + HDF5_Examples_options.cmake Also available at the HDF web site is a CMake application framework template. You can quickly add files to the framework and execute the script to compile your application with an installed HDF5 binary. ======================================================================== -ctest +ctest use of HDF5_Examples.cmake and HDF5_Examples_options.cmake ======================================================================== cmake_minimum_required(VERSION 3.2.2 FATAL_ERROR) ############################################################################################################### # This script will build and run the examples from a folder # Execute from a command line: -# ctest -S HDF5_Examples.cmake,OPTION=VALUE -C Release -V -O test.log +# ctest -S HDF5_Examples.cmake,OPTION=VALUE -C Release -VV -O test.log ############################################################################################################### -set (CTEST_CMAKE_GENERATOR "@CMAKE_GENERATOR@") -set (CTEST_DASHBOARD_ROOT ${CTEST_SCRIPT_DIRECTORY}) +set(CTEST_CMAKE_GENERATOR "@CMAKE_GENERATOR@") +if("@CMAKE_GENERATOR_TOOLSET@") + set(CMAKE_GENERATOR_TOOLSET "@CMAKE_GENERATOR_TOOLSET@") +endif() +set(CTEST_DASHBOARD_ROOT ${CTEST_SCRIPT_DIRECTORY}) # handle input parameters to script. #INSTALLDIR - HDF5 root folder #CTEST_CONFIGURATION_TYPE - Release, Debug, RelWithDebInfo -#CTEST_SOURCE_NAME - name of source folder; HDF4Examples -#STATIC_ONLY - Default is YES -#FORTRAN_LIBRARIES - Default is NO -#JAVA_LIBRARIES - Default is NO -##NO_MAC_FORTRAN - set to TRUE to allow shared libs on a Mac) -if (DEFINED CTEST_SCRIPT_ARG) - # transform ctest script arguments of the form - # script.ctest,var1=value1,var2=value2 - # to variables with the respective names set to the respective values - string (REPLACE "," ";" script_args "${CTEST_SCRIPT_ARG}") - foreach (current_var ${script_args}) - if ("${current_var}" MATCHES "^([^=]+)=(.+)$") - set("${CMAKE_MATCH_1}" "${CMAKE_MATCH_2}") - endif () - endforeach () -endif () -if (NOT DEFINED INSTALLDIR) - set (INSTALLDIR "@CMAKE_INSTALL_PREFIX@") -endif () -if (NOT DEFINED CTEST_CONFIGURATION_TYPE) - set (CTEST_CONFIGURATION_TYPE "Release") -endif () -if (NOT DEFINED CTEST_SOURCE_NAME) - set (CTEST_SOURCE_NAME "HDF5Examples") -endif () -if (NOT DEFINED STATIC_ONLY) - set (STATICONLYLIBRARIES "YES") -else () - set (STATICONLYLIBRARIES "NO") -endif () -if (NOT DEFINED FORTRAN_LIBRARIES) - set (FORTRANLIBRARIES "NO") -else () - set (FORTRANLIBRARIES "YES") -endif () -if (NOT DEFINED JAVA_LIBRARIES) - set (JAVALIBRARIES "NO") -else () - set (JAVALIBRARIES "YES") -endif () +#CTEST_SOURCE_NAME - name of source folder; HDF5Examples +if(DEFINED CTEST_SCRIPT_ARG) + # transform ctest script arguments of the form + # script.ctest,var1=value1,var2=value2 + # to variables with the respective names set to the respective values + string(REPLACE "," ";" script_args "${CTEST_SCRIPT_ARG}") + foreach(current_var ${script_args}) + if("${current_var}" MATCHES "^([^=]+)=(.+)$") + set("${CMAKE_MATCH_1}" "${CMAKE_MATCH_2}") + endif() + endforeach() +endif() + +################################################################### +### Following Line is one of [Release, RelWithDebInfo, Debug] ##### +set(CTEST_CONFIGURATION_TYPE "$ENV{CMAKE_CONFIG_TYPE}") +if(NOT DEFINED CTEST_CONFIGURATION_TYPE) + set(CTEST_CONFIGURATION_TYPE "Release") +endif() +set(ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DCTEST_CONFIGURATION_TYPE:STRING=${CTEST_CONFIGURATION_TYPE}") +################################################################## + +if(NOT DEFINED INSTALLDIR) + set(INSTALLDIR "@CMAKE_INSTALL_PREFIX@") +endif() + +if(NOT DEFINED CTEST_SOURCE_NAME) + set(CTEST_SOURCE_NAME "HDF5Examples") +endif() + +if(NOT DEFINED HDF_LOCAL) + set(CDASH_LOCAL "NO") +else() + set(CDASH_LOCAL "YES") +endif() +if(NOT DEFINED CTEST_SITE) + set(CTEST_SITE "local") +endif() +if(NOT DEFINED CTEST_BUILD_NAME) + set(CTEST_BUILD_NAME "examples") +endif() +set(ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DSITE:STRING=${CTEST_SITE} -DBUILDNAME:STRING=${CTEST_BUILD_NAME}") #TAR_SOURCE - name of tarfile #if (NOT DEFINED TAR_SOURCE) @@ -288,60 +294,38 @@ endif () #endif () ############################################################################################################### -# Adjust the following SET Commands as needed -############################################################################################################### -if (WIN32) - if (${STATICONLYLIBRARIES}) - set (BUILD_OPTIONS "${BUILD_OPTIONS} -DBUILD_SHARED_LIBS:BOOL=OFF") - endif () - set (ENV{HDF5_DIR} "${INSTALLDIR}/cmake") - set (CTEST_BINARY_NAME ${CTEST_SOURCE_NAME}\\build) - set (CTEST_SOURCE_DIRECTORY "${CTEST_DASHBOARD_ROOT}\\${CTEST_SOURCE_NAME}") - set (CTEST_BINARY_DIRECTORY "${CTEST_DASHBOARD_ROOT}\\${CTEST_BINARY_NAME}") -else (WIN32) - if (${STATICONLYLIBRARIES}) - set (BUILD_OPTIONS "${BUILD_OPTIONS} -DBUILD_SHARED_LIBS:BOOL=OFF -DCMAKE_ANSI_CFLAGS:STRING=-fPIC") - endif () - set (ENV{HDF5_DIR} "${INSTALLDIR}/share/cmake") - set (ENV{LD_LIBRARY_PATH} "${INSTALLDIR}/lib") - set (CTEST_BINARY_NAME ${CTEST_SOURCE_NAME}/build) - set (CTEST_SOURCE_DIRECTORY "${CTEST_DASHBOARD_ROOT}/${CTEST_SOURCE_NAME}") - set (CTEST_BINARY_DIRECTORY "${CTEST_DASHBOARD_ROOT}/${CTEST_BINARY_NAME}") -endif(WIN32) -if (${FORTRANLIBRARIES}) - set (BUILD_OPTIONS "${BUILD_OPTIONS} -DHDF_BUILD_FORTRAN:BOOL=ON") -else () - set (BUILD_OPTIONS "${BUILD_OPTIONS} -DHDF_BUILD_FORTRAN:BOOL=OFF") -endif () -if (${JAVALIBRARIES}) - set (BUILD_OPTIONS "${BUILD_OPTIONS} -DHDF_BUILD_JAVA:BOOL=ON") -else () - set (BUILD_OPTIONS "${BUILD_OPTIONS} -DHDF_BUILD_JAVA:BOOL=OFF") -endif () -set (BUILD_OPTIONS "${BUILD_OPTIONS} -DHDF5_PACKAGE_NAME:STRING=@HDF5_PACKAGE@@HDF_PACKAGE_EXT@") +if(WIN32) + set(SITE_OS_NAME "Windows") + set(ENV{HDF5_DIR} "${INSTALLDIR}/cmake") + set(CTEST_BINARY_NAME ${CTEST_SOURCE_NAME}\\build) + set(CTEST_SOURCE_DIRECTORY "${CTEST_DASHBOARD_ROOT}\\${CTEST_SOURCE_NAME}") + set(CTEST_BINARY_DIRECTORY "${CTEST_DASHBOARD_ROOT}\\${CTEST_BINARY_NAME}") +else() + set(ENV{HDF5_DIR} "${INSTALLDIR}/share/cmake") + set(ENV{LD_LIBRARY_PATH} "${INSTALLDIR}/lib") + set(CTEST_BINARY_NAME ${CTEST_SOURCE_NAME}/build) + set(CTEST_SOURCE_DIRECTORY "${CTEST_DASHBOARD_ROOT}/${CTEST_SOURCE_NAME}") + set(CTEST_BINARY_DIRECTORY "${CTEST_DASHBOARD_ROOT}/${CTEST_BINARY_NAME}") +endif() +if(${CDASH_LOCAL}) + set(ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DCDASH_LOCAL:BOOL=ON") +endif() +set(ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF5_PACKAGE_NAME:STRING=@HDF5_PACKAGE@@HDF_PACKAGE_EXT@") ############################################################################################################### # For any comments please contact cdashhelp@hdfgroup.org # ############################################################################################################### -#----------------------------------------------------------------------------- -# MAC machines need special option -#----------------------------------------------------------------------------- -if (APPLE) - # Compiler choice - execute_process (COMMAND xcrun --find cc OUTPUT_VARIABLE XCODE_CC OUTPUT_STRIP_TRAILING_WHITESPACE) - execute_process (COMMAND xcrun --find c++ OUTPUT_VARIABLE XCODE_CXX OUTPUT_STRIP_TRAILING_WHITESPACE) - set (ENV{CC} "${XCODE_CC}") - set (ENV{CXX} "${XCODE_CXX}") - if (NOT NO_MAC_FORTRAN) - # Shared fortran is not supported, build static - set (BUILD_OPTIONS "${BUILD_OPTIONS} -DBUILD_SHARED_LIBS:BOOL=OFF -DCMAKE_ANSI_CFLAGS:STRING=-fPIC") - else () - set (BUILD_OPTIONS "${BUILD_OPTIONS} -DHDF_BUILD_FORTRAN:BOOL=OFF") - endif () - set (BUILD_OPTIONS "${BUILD_OPTIONS} -DCTEST_USE_LAUNCHERS:BOOL=ON -DCMAKE_BUILD_WITH_INSTALL_RPATH:BOOL=OFF") -endif () +############################################################################################# +#### Change default configuration of options in config/cmake/cacheinit.cmake file ### +#### format for file: set(ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DXXX:YY=ZZZZ") ### +############################################################################################# +if(WIN32) + include(${CTEST_SCRIPT_DIRECTORY}\\HDF5_Examples_options.cmake) +else() + include(${CTEST_SCRIPT_DIRECTORY}/HDF5_Examples_options.cmake) +endif() #----------------------------------------------------------------------------- set (CTEST_CMAKE_COMMAND "\"${CMAKE_COMMAND}\"") @@ -415,6 +399,57 @@ endif () #----------------------------------------------------------------------------- ############################################################################################################## +############################################################################################################## +#### HDF5_Examples_options.cmake ### +#### Change default configuration of options in config/cmake/cacheinit.cmake file ### +############################################################################################################## +############################################################################################# +#### Change default configuration of options in config/cmake/cacheinit.cmake file ### +#### format: set(ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DXXX:YY=ZZZZ") ### +#### DEFAULT: ### +#### BUILD_SHARED_LIBS:BOOL=OFF ### +#### HDF_BUILD_C:BOOL=ON ### +#### HDF_BUILD_CXX:BOOL=OFF ### +#### HDF_BUILD_FORTRAN:BOOL=OFF ### +#### HDF_BUILD_JAVA:BOOL=OFF ### +#### BUILD_TESTING:BOOL=OFF ### +#### HDF_ENABLE_PARALLEL:BOOL=OFF ### +#### HDF_ENABLE_THREADSAFE:BOOL=OFF ### +############################################################################################# + +### uncomment/comment and change the following lines for other configuration options +### build with shared libraries +#set(ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DBUILD_SHARED_LIBS:BOOL=ON") + +############################################################################################# +#### languages #### +### disable C builds +#set(ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF_BUILD_C:BOOL=OFF") + +### enable C++ builds +#set(ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF_BUILD_CXX:BOOL=ON") + +### enable Fortran builds +#set(ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF_BUILD_FORTRAN:BOOL=ON") + +### enable JAVA builds +#set(ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF_BUILD_JAVA:BOOL=ON") + +############################################################################################# +### enable parallel program builds +#set(ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF_ENABLE_PARALLEL:BOOL=ON") + +############################################################################################# +### enable threadsafe program builds +#set(ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF_ENABLE_THREADSAFE:BOOL=ON") + +############################################################################################# +### enable test program builds, requires reference files in testfiles subdirectory +#set(ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DBUILD_TESTING:BOOL=ON") +#set(ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DCOMPARE_TESTING:BOOL=ON") + +############################################################################################# + ======================================================================== -- cgit v0.12 From d40f2039e7d675ac8f1c48aa5bbd71d7d1332650 Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Mon, 29 Jan 2018 12:52:20 -0600 Subject: Update CMake usage --- config/cmake/HDF518_Examples.cmake.in | 6 +++--- config/cmake/scripts/HDF5config.cmake | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/config/cmake/HDF518_Examples.cmake.in b/config/cmake/HDF518_Examples.cmake.in index 6af0b09..6dc9727 100644 --- a/config/cmake/HDF518_Examples.cmake.in +++ b/config/cmake/HDF518_Examples.cmake.in @@ -66,7 +66,7 @@ endif() if(NOT DEFINED CTEST_BUILD_NAME) set(CTEST_BUILD_NAME "examples") endif() -set(BUILD_OPTIONS "${BUILD_OPTIONS} -DSITE:STRING=${CTEST_SITE} -DBUILDNAME:STRING=${CTEST_BUILD_NAME}") +set(ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DSITE:STRING=${CTEST_SITE} -DBUILDNAME:STRING=${CTEST_BUILD_NAME}") #TAR_SOURCE - name of tarfile #if(NOT DEFINED TAR_SOURCE) @@ -88,9 +88,9 @@ else() set(CTEST_BINARY_DIRECTORY "${CTEST_DASHBOARD_ROOT}/${CTEST_BINARY_NAME}") endif() if(${CDASH_LOCAL}) - set(BUILD_OPTIONS "${BUILD_OPTIONS} -DCDASH_LOCAL:BOOL=ON") + set(ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DCDASH_LOCAL:BOOL=ON") endif() -set(BUILD_OPTIONS "${BUILD_OPTIONS} -DHDF5_PACKAGE_NAME:STRING=@HDF5_PACKAGE@@HDF_PACKAGE_EXT@") +set(ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF5_PACKAGE_NAME:STRING=@HDF5_PACKAGE@@HDF_PACKAGE_EXT@") ############################################################################################################### # For any comments please contact cdashhelp@hdfgroup.org diff --git a/config/cmake/scripts/HDF5config.cmake b/config/cmake/scripts/HDF5config.cmake index df89c2c..eefc9a4 100755 --- a/config/cmake/scripts/HDF5config.cmake +++ b/config/cmake/scripts/HDF5config.cmake @@ -184,7 +184,7 @@ set (MODEL "Experimental") ##### Following controls source update ##### #set (LOCAL_UPDATE "TRUE") set (REPOSITORY_URL "https://git@bitbucket.hdfgroup.org/scm/hdffv/hdf5.git") -set (REPOSITORY_BRANCH "develop") +set (REPOSITORY_BRANCH "hdf5_1_10_2") #uncomment to use a compressed source file: *.tar on linux or mac *.zip on windows #set(CTEST_USE_TAR_SOURCE "${CTEST_SOURCE_VERSION}") -- cgit v0.12 From 26969c528105a89b3ff31b941b4f4d176e268187 Mon Sep 17 00:00:00 2001 From: lrknox Date: Tue, 30 Jan 2018 09:58:42 -0600 Subject: Increase maximum number of retries to 30 for h5watch tests. --- hl/tools/h5watch/testh5watch.sh.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hl/tools/h5watch/testh5watch.sh.in b/hl/tools/h5watch/testh5watch.sh.in index 7514281..3f8f5ae 100644 --- a/hl/tools/h5watch/testh5watch.sh.in +++ b/hl/tools/h5watch/testh5watch.sh.in @@ -44,7 +44,7 @@ GEN_TEST=h5watchgentest # Generate HDF5 file with various datasets GEN_TEST_BIN=`pwd`/$GEN_TEST # Path of the binary GEN_TEST WATCHFILE=`pwd`/WATCH.h5 # The HDF5 file generated to test h5watch TESTFILE=TEST.h5 # The temporary file (a copy of WATCH.h5) used by tests -TRY_MAX=20 # Try running the test again +TRY_MAX=30 # Try running the test again # # These 3 defines should be the same as the defines in ./extend_dset.c WRITER_MESSAGE=writer_message # The message file created by the "extend" process -- cgit v0.12 From 16e649fa0deddf415bbfd900e868092e384db8a0 Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Tue, 30 Jan 2018 16:30:17 -0600 Subject: HDFFV-10398 merge from develop improve CMake code --- CMakeLists.txt | 34 +++--- MANIFEST | 1 - c++/CMakeLists.txt | 6 +- config/cmake/ConfigureChecks.cmake | 17 +-- config/cmake/ConversionTests.c | 167 +++++++++++++++-------------- config/cmake/HDFCompilerFlags.cmake | 4 +- config/cmake_ext_mod/CheckTypeSize.cmake | 61 ----------- config/cmake_ext_mod/ConfigureChecks.cmake | 28 ++--- config/cmake_ext_mod/HDFTests.c | 14 +++ fortran/CMakeLists.txt | 8 +- fortran/src/CMakeLists.txt | 12 +-- fortran/test/CMakeLists.txt | 6 +- hl/CMakeLists.txt | 8 +- hl/c++/CMakeLists.txt | 6 +- hl/fortran/CMakeLists.txt | 6 +- hl/fortran/src/CMakeLists.txt | 6 +- hl/tools/CMakeLists.txt | 4 +- java/CMakeLists.txt | 6 +- java/examples/CMakeLists.txt | 8 +- java/src/CMakeLists.txt | 4 +- java/src/hdf/CMakeLists.txt | 2 +- src/CMakeLists.txt | 18 ++-- tools/CMakeLists.txt | 6 +- tools/src/CMakeLists.txt | 20 ++-- tools/test/CMakeLists.txt | 22 ++-- tools/test/misc/CMakeLists.txt | 2 +- 26 files changed, 211 insertions(+), 265 deletions(-) delete mode 100644 config/cmake_ext_mod/CheckTypeSize.cmake diff --git a/CMakeLists.txt b/CMakeLists.txt index 3579f6c..00ec70a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -528,9 +528,13 @@ endif () #----------------------------------------------------------------------------- # Option to embed library info into executables #----------------------------------------------------------------------------- -option (HDF5_ENABLE_EMBEDDED_LIBINFO "embed library info into executables" ON) -if (HDF5_ENABLE_EMBEDDED_LIBINFO) - set (H5_HAVE_EMBEDDED_LIBINFO 1) +if (CMAKE_SYSTEM_NAME STREQUAL "Emscripten") + set (H5_HAVE_EMBEDDED_LIBINFO 0) +else () + option (HDF5_ENABLE_EMBEDDED_LIBINFO "embed library info into executables" ON) + if (HDF5_ENABLE_EMBEDDED_LIBINFO) + set (H5_HAVE_EMBEDDED_LIBINFO 1) + endif () endif () include (${HDF_RESOURCES_DIR}/HDFCompilerFlags.cmake) @@ -676,7 +680,7 @@ endif () #----------------------------------------------------------------------------- # Add the HDF5 Library Target to the build #----------------------------------------------------------------------------- -add_subdirectory (${HDF5_SOURCE_DIR}/src ${PROJECT_BINARY_DIR}/src) +add_subdirectory (src) if (HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "GIT" OR HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "TGZ") if (ZLIB_FOUND AND ZLIB_USE_EXTERNAL) @@ -721,12 +725,12 @@ if (BUILD_TESTING) if (NOT HDF5_EXTERNALLY_CONFIGURED) if (EXISTS "${HDF5_SOURCE_DIR}/test" AND IS_DIRECTORY "${HDF5_SOURCE_DIR}/test") - add_subdirectory (${HDF5_SOURCE_DIR}/tools/lib ${PROJECT_BINARY_DIR}/tools/lib) - add_subdirectory (${HDF5_SOURCE_DIR}/test ${PROJECT_BINARY_DIR}/test) + add_subdirectory (tools/lib) + add_subdirectory (test) endif () if (H5_HAVE_PARALLEL) if (EXISTS "${HDF5_SOURCE_DIR}/testpar" AND IS_DIRECTORY "${HDF5_SOURCE_DIR}/testpar") - add_subdirectory (${HDF5_SOURCE_DIR}/testpar ${PROJECT_BINARY_DIR}/testpar) + add_subdirectory (testpar) endif () endif () endif () @@ -738,7 +742,7 @@ endif () if (EXISTS "${HDF5_SOURCE_DIR}/tools" AND IS_DIRECTORY "${HDF5_SOURCE_DIR}/tools") option (HDF5_BUILD_TOOLS "Build HDF5 Tools" ON) if (HDF5_BUILD_TOOLS) - add_subdirectory (${HDF5_SOURCE_DIR}/tools ${PROJECT_BINARY_DIR}/tools) + add_subdirectory (tools) endif () endif () @@ -748,7 +752,7 @@ endif () if (EXISTS "${HDF5_SOURCE_DIR}/examples" AND IS_DIRECTORY "${HDF5_SOURCE_DIR}/examples") option (HDF5_BUILD_EXAMPLES "Build HDF5 Library Examples" ON) if (HDF5_BUILD_EXAMPLES) - add_subdirectory (${HDF5_SOURCE_DIR}/examples ${PROJECT_BINARY_DIR}/examples) + add_subdirectory (examples) endif () endif () @@ -759,7 +763,7 @@ if (EXISTS "${HDF5_SOURCE_DIR}/hl" AND IS_DIRECTORY "${HDF5_SOURCE_DIR}/hl") option (HDF5_BUILD_HL_LIB "Build HIGH Level HDF5 Library" ON) if (HDF5_BUILD_HL_LIB) set (H5_INCLUDE_HL 1) - add_subdirectory (${HDF5_SOURCE_DIR}/hl ${PROJECT_BINARY_DIR}/hl) + add_subdirectory (hl) endif () endif () @@ -808,11 +812,11 @@ if (EXISTS "${HDF5_SOURCE_DIR}/fortran" AND IS_DIRECTORY "${HDF5_SOURCE_DIR}/for # # set (FCFLAGS "${Fortran_DEFINES}") - add_subdirectory (${HDF5_SOURCE_DIR}/fortran ${PROJECT_BINARY_DIR}/fortran) + add_subdirectory (fortran) if (HDF5_BUILD_HL_LIB) if (EXISTS "${HDF5_SOURCE_DIR}/hl/fortran" AND IS_DIRECTORY "${HDF5_SOURCE_DIR}/hl/fortran") #-- Build the High Level Fortran source codes - add_subdirectory (${HDF5_SOURCE_DIR}/hl/fortran ${PROJECT_BINARY_DIR}/hl/fortran) + add_subdirectory (hl/fortran) endif () endif () endif () @@ -835,11 +839,11 @@ if (EXISTS "${HDF5_SOURCE_DIR}/c++" AND IS_DIRECTORY "${HDF5_SOURCE_DIR}/c++") if (CMAKE_NO_STD_NAMESPACE) set (H5_NO_STD 1) endif () - add_subdirectory (${HDF5_SOURCE_DIR}/c++ ${PROJECT_BINARY_DIR}/c++) + add_subdirectory (c++) if (HDF5_BUILD_HL_LIB) if (EXISTS "${HDF5_SOURCE_DIR}/hl/c++" AND IS_DIRECTORY "${HDF5_SOURCE_DIR}/hl/c++") #-- Build the High Level Fortran source codes - add_subdirectory (${HDF5_SOURCE_DIR}/hl/c++ ${PROJECT_BINARY_DIR}/hl/c++) + add_subdirectory (hl/c++) endif () endif () endif () @@ -861,7 +865,7 @@ endif () if (EXISTS "${HDF5_SOURCE_DIR}/java" AND IS_DIRECTORY "${HDF5_SOURCE_DIR}/java") option (HDF5_BUILD_JAVA "Build Java HDF5 Library" OFF) if (HDF5_BUILD_JAVA) - add_subdirectory (${HDF5_SOURCE_DIR}/java ${PROJECT_BINARY_DIR}/java) + add_subdirectory (java) endif () endif () diff --git a/MANIFEST b/MANIFEST index 2db6d6b..a2a78c8 100644 --- a/MANIFEST +++ b/MANIFEST @@ -3093,7 +3093,6 @@ ./config/cmake/userblockTest.cmake ./config/cmake/vfdTest.cmake -./config/cmake_ext_mod/CheckTypeSize.cmake ./config/cmake_ext_mod/ConfigureChecks.cmake ./config/cmake_ext_mod/CTestCustom.cmake ./config/cmake_ext_mod/FindMPI.cmake diff --git a/c++/CMakeLists.txt b/c++/CMakeLists.txt index c9c4815..adbf1a4 100644 --- a/c++/CMakeLists.txt +++ b/c++/CMakeLists.txt @@ -27,18 +27,18 @@ if (H5_HAVE_PARALLEL) add_definitions ("-DMPICH_IGNORE_CXX_SEEK") endif () -add_subdirectory (${HDF5_CPP_SOURCE_DIR}/src ${HDF5_CPP_BINARY_DIR}/src) +add_subdirectory (src) #----------------------------------------------------------------------------- # Build the CPP Examples #----------------------------------------------------------------------------- if (HDF5_BUILD_EXAMPLES) - add_subdirectory (${HDF5_CPP_SOURCE_DIR}/examples ${HDF5_CPP_BINARY_DIR}/examples) + add_subdirectory (examples) endif () #----------------------------------------------------------------------------- # Build the CPP unit tests #----------------------------------------------------------------------------- if (BUILD_TESTING) - add_subdirectory (${HDF5_CPP_SOURCE_DIR}/test ${HDF5_CPP_BINARY_DIR}/test) + add_subdirectory (test) endif () diff --git a/config/cmake/ConfigureChecks.cmake b/config/cmake/ConfigureChecks.cmake index 0848e66..7d73c09 100644 --- a/config/cmake/ConfigureChecks.cmake +++ b/config/cmake/ConfigureChecks.cmake @@ -179,7 +179,7 @@ endif () # Macro to determine the various conversion capabilities #----------------------------------------------------------------------------- macro (H5ConversionTests TEST msg) - if ("${TEST}" MATCHES "^${TEST}$") + if (NOT DEFINED ${TEST}) # message (STATUS "===> ${TEST}") TRY_RUN (${TEST}_RUN ${TEST}_COMPILE ${CMAKE_BINARY_DIR} @@ -210,21 +210,6 @@ macro (H5ConversionTests TEST msg) endmacro () #----------------------------------------------------------------------------- -# Macro to make some of the conversion tests easier to write/read -#----------------------------------------------------------------------------- -macro (H5MiscConversionTest VAR TEST msg) - if ("${TEST}" MATCHES "^${TEST}$") - if (${VAR}) - set (${TEST} 1 CACHE INTERNAL ${msg}) - message (STATUS "${msg}... yes") - else () - set (${TEST} "" CACHE INTERNAL ${msg}) - message (STATUS "${msg}... no") - endif () - endif () -endmacro () - -#----------------------------------------------------------------------------- # Check various conversion capabilities #----------------------------------------------------------------------------- diff --git a/config/cmake/ConversionTests.c b/config/cmake/ConversionTests.c index 082dbd4..002bc88 100644 --- a/config/cmake/ConversionTests.c +++ b/config/cmake/ConversionTests.c @@ -9,12 +9,23 @@ * If you do not have access to either file, you may request a copy from * * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ ++ +#if defined(__has_attribute) +#if __has_attribute(no_sanitize) +#define HDF_NO_UBSAN __attribute__((no_sanitize("undefined"))) +#else +#define HDF_NO_UBSAN +#endif +#else +#define HDF_NO_UBSAN +#endif + #ifdef H5_LDOUBLE_TO_LONG_SPECIAL_TEST #include #include -int main(void) +int main(void) HDF_NO_UBSAN { long double ld = 20041683600089727.779961L; long ll; @@ -24,44 +35,44 @@ int main(void) int ret = 1; if(sizeof(long double) == 16 && sizeof(long) == 8) { - /*make sure the long double type has 16 bytes in size and - * 11 bits of exponent. If it is, - *the bit sequence should be like below. It's not - *a decent way to check but this info isn't available. */ - memcpy(s, &ld, 16); - if(s[0]==0x43 && s[1]==0x51 && s[2]==0xcc && s[3]==0xf3 && - s[4]==0x85 && s[5]==0xeb && s[6]==0xc8 && s[7]==0xa0 && - s[8]==0xbf && s[9]==0xcc && s[10]==0x2a && s[11]==0x3c) { - - /* Assign the hexadecimal value of long double type. */ - s[0]=0x43; s[1]=0x51; s[2]=0xcc; s[3]=0xf3; - s[4]=0x85; s[5]=0xeb; s[6]=0xc8; s[7]=0xa0; - s[8]=0xbf; s[9]=0xcc; s[10]=0x2a; s[11]=0x3c; - s[12]=0x3d; s[13]=0x85; s[14]=0x56; s[15]=0x20; - - memcpy(&ld, s, 16); - - ll = (long)ld; - memcpy(s2, &ll, 8); - - /* The library's algorithm converts it to 0x 00 47 33 ce 17 af 22 82 - * and gets wrong value 20041683600089730 on the IBM Power6 Linux. - * But the IBM Power6 Linux converts it to 0x00 47 33 ce 17 af 22 7f - * and gets the correct value 20041683600089727. It uses some special - * algorithm. We're going to define the macro and skip the test until - * we can figure out how they do it. */ - if(s2[0]==0x00 && s2[1]==0x47 && s2[2]==0x33 && s2[3]==0xce && - s2[4]==0x17 && s2[5]==0xaf && s2[6]==0x22 && s2[7]==0x7f) - ret = 0; - - ull = (unsigned long)ld; - memcpy(s2, &ull, 8); - - /* The unsigned long is the same as signed long. */ - if(s2[0]==0x00 && s2[1]==0x47 && s2[2]==0x33 && s2[3]==0xce && - s2[4]==0x17 && s2[5]==0xaf && s2[6]==0x22 && s2[7]==0x7f) - ret = 0; - } + /*make sure the long double type has 16 bytes in size and + * 11 bits of exponent. If it is, + *the bit sequence should be like below. It's not + *a decent way to check but this info isn't available. */ + memcpy(s, &ld, 16); + if(s[0]==0x43 && s[1]==0x51 && s[2]==0xcc && s[3]==0xf3 && + s[4]==0x85 && s[5]==0xeb && s[6]==0xc8 && s[7]==0xa0 && + s[8]==0xbf && s[9]==0xcc && s[10]==0x2a && s[11]==0x3c) { + + /* Assign the hexadecimal value of long double type. */ + s[0]=0x43; s[1]=0x51; s[2]=0xcc; s[3]=0xf3; + s[4]=0x85; s[5]=0xeb; s[6]=0xc8; s[7]=0xa0; + s[8]=0xbf; s[9]=0xcc; s[10]=0x2a; s[11]=0x3c; + s[12]=0x3d; s[13]=0x85; s[14]=0x56; s[15]=0x20; + + memcpy(&ld, s, 16); + + ll = (long)ld; + memcpy(s2, &ll, 8); + + /* The library's algorithm converts it to 0x 00 47 33 ce 17 af 22 82 + * and gets wrong value 20041683600089730 on the IBM Power6 Linux. + * But the IBM Power6 Linux converts it to 0x00 47 33 ce 17 af 22 7f + * and gets the correct value 20041683600089727. It uses some special + * algorithm. We're going to define the macro and skip the test until + * we can figure out how they do it. */ + if(s2[0]==0x00 && s2[1]==0x47 && s2[2]==0x33 && s2[3]==0xce && + s2[4]==0x17 && s2[5]==0xaf && s2[6]==0x22 && s2[7]==0x7f) + ret = 0; + + ull = (unsigned long)ld; + memcpy(s2, &ull, 8); + + /* The unsigned long is the same as signed long. */ + if(s2[0]==0x00 && s2[1]==0x47 && s2[2]==0x33 && s2[3]==0xce && + s2[4]==0x17 && s2[5]==0xaf && s2[6]==0x22 && s2[7]==0x7f) + ret = 0; + } } done: @@ -75,7 +86,7 @@ done: #include #include -int main(void) +int main(void) HDF_NO_UBSAN { long double ld; long ll; @@ -86,46 +97,46 @@ int main(void) /*Determine if long double has 16 byte in size, 11 bit exponent, and *the bias is 0x3ff */ if(sizeof(long double) == 16) { - ld = 1.0L; - memcpy(s, &ld, 16); - if(s[0]==0x3f && s[1]==0xf0 && s[2]==0x00 && s[3]==0x00 && - s[4]==0x00 && s[5]==0x00 && s[6]==0x00 && s[7]==0x00) - flag = 1; + ld = 1.0L; + memcpy(s, &ld, 16); + if(s[0]==0x3f && s[1]==0xf0 && s[2]==0x00 && s[3]==0x00 && + s[4]==0x00 && s[5]==0x00 && s[6]==0x00 && s[7]==0x00) + flag = 1; } if(flag==1 && sizeof(long)==8) { - ll = 0x003fffffffffffffL; - ld = (long double)ll; - memcpy(s, &ld, 16); - /* The library converts the value to 0x434fffffffffffff8000000000000000. - * In decimal it is 18014398509481982.000000, one value short of the original. - * The IBM Power6 Linux converts it to 0x4350000000000000bff0000000000000. - * The value is correct in decimal. It uses some special - * algorithm. We're going to define the macro and skip the test until - * we can figure out how they do it. */ - if(s[0]==0x43 && s[1]==0x50 && s[2]==0x00 && s[3]==0x00 && - s[4]==0x00 && s[5]==0x00 && s[6]==0x00 && s[7]==0x00 && - s[8]==0xbf && s[9]==0xf0 && s[10]==0x00 && s[11]==0x00 && - s[12]==0x00 && s[13]==0x00 && s[14]==0x00 && s[15]==0x00) - ret = 0; + ll = 0x003fffffffffffffL; + ld = (long double)ll; + memcpy(s, &ld, 16); + /* The library converts the value to 0x434fffffffffffff8000000000000000. + * In decimal it is 18014398509481982.000000, one value short of the original. + * The IBM Power6 Linux converts it to 0x4350000000000000bff0000000000000. + * The value is correct in decimal. It uses some special + * algorithm. We're going to define the macro and skip the test until + * we can figure out how they do it. */ + if(s[0]==0x43 && s[1]==0x50 && s[2]==0x00 && s[3]==0x00 && + s[4]==0x00 && s[5]==0x00 && s[6]==0x00 && s[7]==0x00 && + s[8]==0xbf && s[9]==0xf0 && s[10]==0x00 && s[11]==0x00 && + s[12]==0x00 && s[13]==0x00 && s[14]==0x00 && s[15]==0x00) + ret = 0; } if(flag==1 && sizeof(unsigned long)==8) { - ull = 0xffffffffffffffffUL; - ld = (long double)ull; - memcpy(s, &ld, 16); - /* Use a different value from signed long to test. The problem is the same - * for both long and unsigned long. The value is 18446744073709551615. - * The library converts the value to 0x43effffffffffffffe000000000000000. - * In decimal it's 18446744073709548544.000000, very different from the original. - * The IBM Power6 Linux converts it to 0x43f0000000000000bff0000000000000. - * The value is correct in decimal. It uses some special - * algorithm. We're going to define the macro and skip the test until - * we can figure out how they do it. */ - if(s[0]==0x43 && s[1]==0xf0 && s[2]==0x00 && s[3]==0x00 && - s[4]==0x00 && s[5]==0x00 && s[6]==0x00 && s[7]==0x00 && - s[8]==0xbf && s[9]==0xf0 && s[10]==0x00 && s[11]==0x00 && - s[12]==0x00 && s[13]==0x00 && s[14]==0x00 && s[15]==0x00) - ret = 0; + ull = 0xffffffffffffffffUL; + ld = (long double)ull; + memcpy(s, &ld, 16); + /* Use a different value from signed long to test. The problem is the same + * for both long and unsigned long. The value is 18446744073709551615. + * The library converts the value to 0x43effffffffffffffe000000000000000. + * In decimal it's 18446744073709548544.000000, very different from the original. + * The IBM Power6 Linux converts it to 0x43f0000000000000bff0000000000000. + * The value is correct in decimal. It uses some special + * algorithm. We're going to define the macro and skip the test until + * we can figure out how they do it. */ + if(s[0]==0x43 && s[1]==0xf0 && s[2]==0x00 && s[3]==0x00 && + s[4]==0x00 && s[5]==0x00 && s[6]==0x00 && s[7]==0x00 && + s[8]==0xbf && s[9]==0xf0 && s[10]==0x00 && s[11]==0x00 && + s[12]==0x00 && s[13]==0x00 && s[14]==0x00 && s[15]==0x00) + ret = 0; } done: exit(ret); @@ -138,7 +149,7 @@ done: #include #include -int main(void) +int main(void) HDF_NO_UBSAN { long double ld = 20041683600089727.779961L; long long ll; @@ -181,7 +192,7 @@ done: #include #include -int main(void) +int main(void) HDF_NO_UBSAN { long double ld; long long ll; @@ -243,7 +254,7 @@ int FC_DUMMY_MAIN() #endif #endif int -main () +main () HDF_NO_UBSAN { char *chp = "beefs"; diff --git a/config/cmake/HDFCompilerFlags.cmake b/config/cmake/HDFCompilerFlags.cmake index a414cea..56277fa 100644 --- a/config/cmake/HDFCompilerFlags.cmake +++ b/config/cmake/HDFCompilerFlags.cmake @@ -49,9 +49,9 @@ if (HDF5_DISABLE_COMPILER_WARNINGS) if (MSVC) set (HDF5_WARNINGS_BLOCKED 1) string (REGEX REPLACE "(^| )([/-])W[0-9]( |$)" " " CMAKE_C_FLAGS "${CMAKE_C_FLAGS}") - set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /w") + set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /W0") string (REGEX REPLACE "(^| )([/-])W[0-9]( |$)" " " CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}") - set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /w") + set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /W0") endif () if (WIN32) add_definitions (-D_CRT_SECURE_NO_WARNINGS) diff --git a/config/cmake_ext_mod/CheckTypeSize.cmake b/config/cmake_ext_mod/CheckTypeSize.cmake deleted file mode 100644 index c14c2f2..0000000 --- a/config/cmake_ext_mod/CheckTypeSize.cmake +++ /dev/null @@ -1,61 +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://support.hdfgroup.org/ftp/HDF5/releases. -# If you do not have access to either file, you may request a copy from -# help@hdfgroup.org. -# -# -# Check if the type exists and determine size of type. if the type -# exists, the size will be stored to the variable. -# -# CHECK_TYPE_SIZE - macro which checks the size of type -# VARIABLE - variable to store size if the type exists. -# HAVE_${VARIABLE} - does the variable exists or not -# - -macro (HDF_CHECK_TYPE_SIZE TYPE VARIABLE) - set (CMAKE_ALLOW_UNKNOWN_VARIABLE_READ_ACCESS 1) - if ("HAVE_${VARIABLE}" MATCHES "^HAVE_${VARIABLE}$") - set (MACRO_CHECK_TYPE_SIZE_FLAGS - "-DCHECK_TYPE_SIZE_TYPE=\"${TYPE}\" ${CMAKE_REQUIRED_FLAGS}" - ) - foreach (def HAVE_SYS_TYPES_H HAVE_STDINT_H HAVE_STDDEF_H HAVE_INTTYPES_H) - if ("${def}") - set (MACRO_CHECK_TYPE_SIZE_FLAGS "${MACRO_CHECK_TYPE_SIZE_FLAGS} -D${def}") - endif () - endforeach () - - message (STATUS "Check size of ${TYPE}") - if (CMAKE_REQUIRED_LIBRARIES) - set (CHECK_TYPE_SIZE_ADD_LIBRARIES - "-DLINK_LIBRARIES:STRING=${CMAKE_REQUIRED_LIBRARIES}" - ) - endif () - try_run (${VARIABLE} HAVE_${VARIABLE} - ${CMAKE_BINARY_DIR} - ${HDF_RESOURCES_EXT_DIR}/CheckTypeSize.c - CMAKE_FLAGS -DCOMPILE_DEFINITIONS:STRING=${MACRO_CHECK_TYPE_SIZE_FLAGS} - "${CHECK_TYPE_SIZE_ADD_LIBRARIES}" - OUTPUT_VARIABLE OUTPUT - ) - if (HAVE_${VARIABLE}) - message (STATUS "Check size of ${TYPE} - done") - file (APPEND - ${CMAKE_BINARY_DIR}/CMakeFiles/CMakeOutput.log - "Determining size of ${TYPE} passed with the following output:\n${OUTPUT}\n\n" - ) - else () - message (STATUS "Check size of ${TYPE} - failed") - file (APPEND - ${CMAKE_BINARY_DIR}/CMakeFiles/CMakeError.log - "Determining size of ${TYPE} failed with the following output:\n${OUTPUT}\n\n" - ) - endif () - endif () - set (CMAKE_ALLOW_UNKNOWN_VARIABLE_READ_ACCESS) -endmacro () diff --git a/config/cmake_ext_mod/ConfigureChecks.cmake b/config/cmake_ext_mod/ConfigureChecks.cmake index 56d45f9..3797768 100644 --- a/config/cmake_ext_mod/ConfigureChecks.cmake +++ b/config/cmake_ext_mod/ConfigureChecks.cmake @@ -12,18 +12,18 @@ #----------------------------------------------------------------------------- # Include all the necessary files for macros #----------------------------------------------------------------------------- -include (${CMAKE_ROOT}/Modules/CheckFunctionExists.cmake) -include (${CMAKE_ROOT}/Modules/CheckIncludeFile.cmake) -include (${CMAKE_ROOT}/Modules/CheckIncludeFileCXX.cmake) -include (${CMAKE_ROOT}/Modules/CheckIncludeFiles.cmake) -include (${CMAKE_ROOT}/Modules/CheckLibraryExists.cmake) -include (${CMAKE_ROOT}/Modules/CheckSymbolExists.cmake) -include (${CMAKE_ROOT}/Modules/CheckTypeSize.cmake) -include (${CMAKE_ROOT}/Modules/CheckVariableExists.cmake) -include (${CMAKE_ROOT}/Modules/CheckFortranFunctionExists.cmake) -include (${CMAKE_ROOT}/Modules/TestBigEndian.cmake) +include (CheckFunctionExists) +include (CheckIncludeFile) +include (CheckIncludeFileCXX) +include (CheckIncludeFiles) +include (CheckLibraryExists) +include (CheckSymbolExists) +include (CheckTypeSize) +include (CheckVariableExists) +include (CheckFortranFunctionExists) +include (TestBigEndian) if (CMAKE_CXX_COMPILER AND CMAKE_CXX_COMPILER_LOADED) - include (${CMAKE_ROOT}/Modules/TestForSTDNamespace.cmake) + include (TestForSTDNamespace) endif () #----------------------------------------------------------------------------- @@ -145,7 +145,7 @@ endif () # For other specific tests, use this MACRO. macro (HDF_FUNCTION_TEST OTHER_TEST) - if ("${HDF_PREFIX}_${OTHER_TEST}" MATCHES "^${HDF_PREFIX}_${OTHER_TEST}$") + if (NOT DEFINED ${HDF_PREFIX}_${OTHER_TEST}) set (MACRO_CHECK_FUNCTION_DEFINITIONS "-D${OTHER_TEST} ${CMAKE_REQUIRED_FLAGS}") set (OTHER_TEST_ADD_LIBRARIES) if (CMAKE_REQUIRED_LIBRARIES) @@ -587,7 +587,7 @@ endif () # For other CXX specific tests, use this MACRO. macro (HDF_CXX_FUNCTION_TEST OTHER_TEST) - if ("${OTHER_TEST}" MATCHES "^${OTHER_TEST}$") + if (NOT DEFINED ${OTHER_TEST}) set (MACRO_CHECK_FUNCTION_DEFINITIONS "-D${OTHER_TEST} ${CMAKE_REQUIRED_FLAGS}") set (OTHER_TEST_ADD_LIBRARIES) if (CMAKE_REQUIRED_LIBRARIES) @@ -656,7 +656,7 @@ endif () if (WINDOWS) if (NOT HDF_NO_IOEO_TEST) message (STATUS "Checking for InitOnceExecuteOnce:") - if ("${${HDF_PREFIX}_HAVE_IOEO}" MATCHES "^${${HDF_PREFIX}_HAVE_IOEO}$") + if (NOT DEFINED ${${HDF_PREFIX}_HAVE_IOEO}) if (LARGEFILE) set (CMAKE_REQUIRED_DEFINITIONS "${CURRENT_TEST_DEFINITIONS} -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE" diff --git a/config/cmake_ext_mod/HDFTests.c b/config/cmake_ext_mod/HDFTests.c index 60ac744..320fd5b 100644 --- a/config/cmake_ext_mod/HDFTests.c +++ b/config/cmake_ext_mod/HDFTests.c @@ -222,12 +222,26 @@ SIMPLE_TEST(struct stat sb; sb.st_blocks=0); #include #include +#if defined(_MSC_VER) && defined(_DEBUG) +# include +int DebugReport(int reportType, char* message, int* returnValue) +{ + (void)reportType; + (void)message; + (void)returnValue; + return 1; /* no further handling required */ +} +#endif + int main(void) { char *llwidthArgs[] = { "I64", "l64", "l", "L", "q", "ll", NULL }; char *s = malloc(128); char **currentArg = NULL; LL_TYPE x = (LL_TYPE)1048576 * (LL_TYPE)1048576; + #if defined(_MSC_VER) && defined(_DEBUG) + _CrtSetReportHook(DebugReport); + #endif for (currentArg = llwidthArgs; *currentArg != NULL; currentArg++) { char formatString[64]; diff --git a/fortran/CMakeLists.txt b/fortran/CMakeLists.txt index 075e1da..a0f92d3 100644 --- a/fortran/CMakeLists.txt +++ b/fortran/CMakeLists.txt @@ -10,21 +10,21 @@ endif () #----------------------------------------------------------------------------- # Traverse source subdirectory #----------------------------------------------------------------------------- -add_subdirectory (${HDF5_F90_SOURCE_DIR}/src ${HDF5_F90_BINARY_DIR}/src) +add_subdirectory (src) #----------------------------------------------------------------------------- # Build the Fortran Examples #----------------------------------------------------------------------------- if (HDF5_BUILD_EXAMPLES) - add_subdirectory (${HDF5_F90_SOURCE_DIR}/examples ${HDF5_F90_BINARY_DIR}/examples) + add_subdirectory (examples) endif () #----------------------------------------------------------------------------- # Testing #----------------------------------------------------------------------------- if (BUILD_TESTING) - add_subdirectory (${HDF5_F90_SOURCE_DIR}/test ${HDF5_F90_BINARY_DIR}/test) + add_subdirectory (test) if (MPI_Fortran_FOUND) - add_subdirectory (${HDF5_F90_SOURCE_DIR}/testpar ${HDF5_F90_BINARY_DIR}/testpar) + add_subdirectory (testpar) endif () endif () diff --git a/fortran/src/CMakeLists.txt b/fortran/src/CMakeLists.txt index b664c50..5446616 100644 --- a/fortran/src/CMakeLists.txt +++ b/fortran/src/CMakeLists.txt @@ -78,22 +78,20 @@ add_executable (H5match_types ${HDF5_F90_BINARY_DIR}/H5fort_type_defines.h ${HDF5_F90_SRC_SOURCE_DIR}/H5match_types.c ) -set (CMD $) add_custom_command ( OUTPUT ${HDF5_F90_BINARY_DIR}/static/H5f90i_gen.h ${HDF5_F90_BINARY_DIR}/static/H5fortran_types.F90 - COMMAND ${CMD} + COMMAND $ WORKING_DIRECTORY ${HDF5_F90_BINARY_DIR}/static DEPENDS H5match_types ) 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) if (BUILD_SHARED_LIBS) - set (CMDSH $) add_custom_command ( OUTPUT ${HDF5_F90_BINARY_DIR}/shared/H5f90i_gen.h ${HDF5_F90_BINARY_DIR}/shared/H5fortran_types.F90 - COMMAND ${CMDSH} + COMMAND $ WORKING_DIRECTORY ${HDF5_F90_BINARY_DIR}/shared DEPENDS H5match_types ) @@ -171,10 +169,9 @@ set (f90_F_GEN_SOURCES ${HDF5_F90_SRC_SOURCE_DIR}/H5Dff.F90 ${HDF5_F90_SRC_SOURCE_DIR}/H5Pff.F90 ) -set (CMD $) add_custom_command ( OUTPUT ${HDF5_F90_BINARY_DIR}/static/H5_gen.F90 - COMMAND ${CMD} + COMMAND $ WORKING_DIRECTORY ${HDF5_F90_BINARY_DIR}/static DEPENDS ${f90_F_GEN_SOURCES} COMMENT "Generating the H5_gen.F90 file" @@ -185,10 +182,9 @@ add_custom_target (H5gen ALL set_source_files_properties (${HDF5_F90_BINARY_DIR}/static/H5_gen.F90 PROPERTIES GENERATED TRUE) if (BUILD_SHARED_LIBS) - set (CMDSH $) add_custom_command ( OUTPUT ${HDF5_F90_BINARY_DIR}/shared/H5_gen.F90 - COMMAND ${CMDSH} + COMMAND $ WORKING_DIRECTORY ${HDF5_F90_BINARY_DIR}/shared DEPENDS ${f90_F_GEN_SOURCES} COMMENT "Generating the H5_gen.F90 shared file" diff --git a/fortran/test/CMakeLists.txt b/fortran/test/CMakeLists.txt index 2990bcc..86f7a12 100644 --- a/fortran/test/CMakeLists.txt +++ b/fortran/test/CMakeLists.txt @@ -74,10 +74,9 @@ if (BUILD_SHARED_LIBS) ) endif () -set (CMD $) add_custom_command ( OUTPUT ${HDF5_FORTRAN_TESTS_BINARY_DIR}/static/tf_gen.F90 - COMMAND ${CMD} + COMMAND $ WORKING_DIRECTORY ${HDF5_FORTRAN_TESTS_BINARY_DIR}/static DEPENDS H5_test_buildiface COMMENT "Generating the tf_gen.F90 file" @@ -88,10 +87,9 @@ add_custom_target (H5testgen ALL set_source_files_properties (${HDF5_FORTRAN_TESTS_BINARY_DIR}/static/tf_gen.F90 PROPERTIES GENERATED TRUE) if (BUILD_SHARED_LIBS) - set (CMDSH $) add_custom_command ( OUTPUT ${HDF5_FORTRAN_TESTS_BINARY_DIR}/shared/tf_gen.F90 - COMMAND ${CMDSH} + COMMAND $ WORKING_DIRECTORY ${HDF5_FORTRAN_TESTS_BINARY_DIR}/shared DEPENDS H5_test_buildiface COMMENT "Generating the tf_gen.F90 shared file" diff --git a/hl/CMakeLists.txt b/hl/CMakeLists.txt index a47e023..d80b4f9 100644 --- a/hl/CMakeLists.txt +++ b/hl/CMakeLists.txt @@ -12,21 +12,21 @@ add_definitions (${HDF_EXTRA_C_FLAGS}) #----------------------------------------------------------------------------- INCLUDE_DIRECTORIES (${HDF5_HL_SOURCE_DIR}/src ) -add_subdirectory (${HDF5_HL_SOURCE_DIR}/src ${HDF5_HL_BINARY_DIR}/src) +add_subdirectory (src) #-- Build the High level Tools if (HDF5_BUILD_TOOLS) - add_subdirectory (${HDF5_HL_SOURCE_DIR}/tools ${HDF5_HL_BINARY_DIR}/tools) + add_subdirectory (tools) endif () #-- Add High Level Examples if (HDF5_BUILD_EXAMPLES) - add_subdirectory (${HDF5_HL_SOURCE_DIR}/examples ${HDF5_HL_BINARY_DIR}/examples) + add_subdirectory (examples) endif () #-- Build the Unit testing if requested if (NOT HDF5_EXTERNALLY_CONFIGURED) if (BUILD_TESTING) - add_subdirectory (${HDF5_HL_SOURCE_DIR}/test ${HDF5_HL_BINARY_DIR}/test) + add_subdirectory (test) endif () endif () diff --git a/hl/c++/CMakeLists.txt b/hl/c++/CMakeLists.txt index 91bfa14..9a1d059 100644 --- a/hl/c++/CMakeLists.txt +++ b/hl/c++/CMakeLists.txt @@ -4,13 +4,13 @@ PROJECT (HDF5_HL_CPP) #----------------------------------------------------------------------------- # Main HL lib is in /src #----------------------------------------------------------------------------- -add_subdirectory (${HDF5_HL_CPP_SOURCE_DIR}/src ${HDF5_HL_CPP_BINARY_DIR}/src) +add_subdirectory (src) # -------------------------------------------------------------------- # Add in the examples for the Packet Table codes # -------------------------------------------------------------------- if (HDF5_BUILD_EXAMPLES) - add_subdirectory (${HDF5_HL_CPP_SOURCE_DIR}/examples ${HDF5_HL_CPP_BINARY_DIR}/examples) + add_subdirectory (examples) endif () # -------------------------------------------------------------------- @@ -18,5 +18,5 @@ endif () # -------------------------------------------------------------------- if (BUILD_TESTING) - add_subdirectory (${HDF5_HL_CPP_SOURCE_DIR}/test ${HDF5_HL_CPP_BINARY_DIR}/test) + add_subdirectory (test) endif () diff --git a/hl/fortran/CMakeLists.txt b/hl/fortran/CMakeLists.txt index c651ce9..00d7517 100644 --- a/hl/fortran/CMakeLists.txt +++ b/hl/fortran/CMakeLists.txt @@ -4,18 +4,18 @@ PROJECT (HDF5_HL_F90 C CXX Fortran) #----------------------------------------------------------------------------- # List Source files #----------------------------------------------------------------------------- -add_subdirectory (${HDF5_HL_F90_SOURCE_DIR}/src ${HDF5_HL_F90_BINARY_DIR}/src) +add_subdirectory (src) #----------------------------------------------------------------------------- # Build the HL Fortran Examples #----------------------------------------------------------------------------- if (HDF5_BUILD_EXAMPLES) - add_subdirectory (${HDF5_HL_F90_SOURCE_DIR}/examples ${HDF5_HL_F90_BINARY_DIR}/examples) + add_subdirectory (examples) endif () #----------------------------------------------------------------------------- # Testing #----------------------------------------------------------------------------- if (BUILD_TESTING) - add_subdirectory (${HDF5_HL_F90_SOURCE_DIR}/test ${HDF5_HL_F90_BINARY_DIR}/test) + add_subdirectory (test) endif () diff --git a/hl/fortran/src/CMakeLists.txt b/hl/fortran/src/CMakeLists.txt index b1a639a..5ad441c 100644 --- a/hl/fortran/src/CMakeLists.txt +++ b/hl/fortran/src/CMakeLists.txt @@ -109,10 +109,9 @@ set (HDF5_HL_F90_F_BASE_SOURCES ${HDF5_HL_F90_SRC_SOURCE_DIR}/H5IMff.F90 ) -set (CMD $) add_custom_command ( OUTPUT ${HDF5_HL_F90_SRC_BINARY_DIR}/static/H5LTff_gen.F90 ${HDF5_HL_F90_SRC_BINARY_DIR}/H5TBff_gen.F90 - COMMAND ${CMD} + COMMAND $ WORKING_DIRECTORY ${HDF5_HL_F90_SRC_BINARY_DIR}/static DEPENDS ${HDF5_HL_F90_F_BASE_SOURCES} COMMENT "Generating the H5LTff_gen.F90, H5TBff_gen.F90 files" @@ -126,10 +125,9 @@ set_source_files_properties ( PROPERTIES GENERATED TRUE ) if (BUILD_SHARED_LIBS) - set (CMDSH $) add_custom_command ( OUTPUT ${HDF5_HL_F90_SRC_BINARY_DIR}/shared/H5LTff_gen.F90 ${HDF5_HL_F90_SRC_BINARY_DIR}/shared/H5TBff_gen.F90 - COMMAND ${CMD} + COMMAND $ WORKING_DIRECTORY ${HDF5_HL_F90_SRC_BINARY_DIR}/shared DEPENDS ${HDF5_HL_F90_F_BASE_SOURCES} COMMENT "Generating the H5LTff_gen.F90, H5TBff_gen.F90 shared files" diff --git a/hl/tools/CMakeLists.txt b/hl/tools/CMakeLists.txt index 9536517..43229e8 100644 --- a/hl/tools/CMakeLists.txt +++ b/hl/tools/CMakeLists.txt @@ -1,6 +1,6 @@ cmake_minimum_required (VERSION 3.2.2) PROJECT (HDF5_HL_TOOLS C CXX) -add_subdirectory (${HDF5_HL_TOOLS_SOURCE_DIR}/gif2h5 ${HDF5_HL_TOOLS_BINARY_DIR}/gif2h5) +add_subdirectory (gif2h5) -add_subdirectory (${HDF5_HL_TOOLS_SOURCE_DIR}/h5watch ${HDF5_HL_TOOLS_BINARY_DIR}/h5watch) +add_subdirectory (h5watch) diff --git a/java/CMakeLists.txt b/java/CMakeLists.txt index 68860be..9a5692f 100644 --- a/java/CMakeLists.txt +++ b/java/CMakeLists.txt @@ -36,20 +36,20 @@ set (CMAKE_JAVA_INCLUDE_PATH "") #----------------------------------------------------------------------------- # Traverse source subdirectory #----------------------------------------------------------------------------- -add_subdirectory (${HDF5_JAVA_SOURCE_DIR}/src ${HDF5_JAVA_BINARY_DIR}/src) +add_subdirectory (src) #----------------------------------------------------------------------------- # Build the Java Examples #----------------------------------------------------------------------------- if (HDF5_BUILD_EXAMPLES) - add_subdirectory (${HDF5_JAVA_SOURCE_DIR}/examples ${HDF5_JAVA_BINARY_DIR}/examples) + add_subdirectory (examples) endif () #----------------------------------------------------------------------------- # Testing #----------------------------------------------------------------------------- if (BUILD_TESTING) - add_subdirectory (${HDF5_JAVA_SOURCE_DIR}/test ${HDF5_JAVA_BINARY_DIR}/test) + add_subdirectory (test) endif () #----------------------------------------------------------------------------- diff --git a/java/examples/CMakeLists.txt b/java/examples/CMakeLists.txt index a1a7483..3073918 100644 --- a/java/examples/CMakeLists.txt +++ b/java/examples/CMakeLists.txt @@ -1,7 +1,7 @@ cmake_minimum_required (VERSION 3.2.2) PROJECT (HDFJAVA_EXAMPLES) -add_subdirectory (${HDFJAVA_EXAMPLES_SOURCE_DIR}/datasets datasets) -add_subdirectory (${HDFJAVA_EXAMPLES_SOURCE_DIR}/datatypes datatypes) -add_subdirectory (${HDFJAVA_EXAMPLES_SOURCE_DIR}/groups groups) -add_subdirectory (${HDFJAVA_EXAMPLES_SOURCE_DIR}/intro intro) +add_subdirectory (datasets) +add_subdirectory (datatypes) +add_subdirectory (groups) +add_subdirectory (intro) diff --git a/java/src/CMakeLists.txt b/java/src/CMakeLists.txt index 3f93f39..9bdab4b 100644 --- a/java/src/CMakeLists.txt +++ b/java/src/CMakeLists.txt @@ -4,5 +4,5 @@ PROJECT ( HDF5_JAVA_SRC C Java ) #----------------------------------------------------------------------------- # Traverse source subdirectory #----------------------------------------------------------------------------- -add_subdirectory (${HDF5_JAVA_SRC_SOURCE_DIR}/jni ${HDF5_JAVA_SRC_BINARY_DIR}/jni) -add_subdirectory (${HDF5_JAVA_SRC_SOURCE_DIR}/hdf ${HDF5_JAVA_SRC_BINARY_DIR}/hdf) +add_subdirectory (jni) +add_subdirectory (hdf) diff --git a/java/src/hdf/CMakeLists.txt b/java/src/hdf/CMakeLists.txt index 84bda53..649f7d0 100644 --- a/java/src/hdf/CMakeLists.txt +++ b/java/src/hdf/CMakeLists.txt @@ -1,4 +1,4 @@ cmake_minimum_required (VERSION 3.2.2) PROJECT (HDF5_JAVA_HDF) -add_subdirectory (${HDF5_JAVA_HDF_SOURCE_DIR}/hdf5lib hdf5lib) +add_subdirectory (hdf5lib) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 0552244..aaedfda 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -852,11 +852,13 @@ TARGET_C_PROPERTIES (H5detect STATIC " " " ") if (MSVC OR MINGW) target_link_libraries (H5detect "ws2_32.lib") endif () +if (CMAKE_SYSTEM_NAME STREQUAL "Emscripten") + set_property(TARGET H5detect PROPERTY LINK_FLAGS "-O0") +endif () -set (CMD $) add_custom_command ( OUTPUT ${HDF5_BINARY_DIR}/H5Tinit.c - COMMAND ${CMD} + COMMAND $ ARGS > ${HDF5_BINARY_DIR}/H5Tinit.c DEPENDS H5detect ) @@ -866,11 +868,13 @@ TARGET_C_PROPERTIES (H5make_libsettings STATIC " " " ") if (MSVC OR MINGW) target_link_libraries (H5make_libsettings "ws2_32.lib") endif () +if (CMAKE_SYSTEM_NAME STREQUAL "Emscripten") + set_property(TARGET H5make_libsettings PROPERTY LINK_FLAGS "-O0") +endif () -set (CMD $) add_custom_command ( OUTPUT ${HDF5_BINARY_DIR}/H5lib_settings.c - COMMAND ${CMD} + COMMAND $ ARGS > ${HDF5_BINARY_DIR}/H5lib_settings.c DEPENDS H5make_libsettings WORKING_DIRECTORY ${HDF5_BINARY_DIR} @@ -905,18 +909,16 @@ set (install_targets ${HDF5_LIB_TARGET}) if (BUILD_SHARED_LIBS) file (MAKE_DIRECTORY "${HDF5_BINARY_DIR}/shared") - set (CMD $) add_custom_command ( OUTPUT ${HDF5_BINARY_DIR}/shared/H5Tinit.c - COMMAND ${CMD} + COMMAND $ ARGS > ${HDF5_BINARY_DIR}/shared/H5Tinit.c DEPENDS H5detect WORKING_DIRECTORY ${HDF5_BINARY_DIR}/shared ) - set (CMD $) add_custom_command ( OUTPUT ${HDF5_BINARY_DIR}/shared/H5lib_settings.c - COMMAND ${CMD} + COMMAND $ ARGS > ${HDF5_BINARY_DIR}/shared/H5lib_settings.c DEPENDS H5make_libsettings WORKING_DIRECTORY ${HDF5_BINARY_DIR} diff --git a/tools/CMakeLists.txt b/tools/CMakeLists.txt index 4b3b3d5..8d442e0 100644 --- a/tools/CMakeLists.txt +++ b/tools/CMakeLists.txt @@ -10,7 +10,7 @@ add_definitions (${HDF_EXTRA_C_FLAGS}) # If testing was NOT enabled, then we need to build the tools library # -------------------------------------------------------------------- if (NOT BUILD_TESTING) - add_subdirectory (${HDF5_TOOLS_SOURCE_DIR}/lib) + add_subdirectory (lib) endif () #----------------------------------------------------------------------------- @@ -19,9 +19,9 @@ endif () INCLUDE_DIRECTORIES (${HDF5_TOOLS_SOURCE_DIR}/lib) #-- Add the test sources -add_subdirectory (${HDF5_TOOLS_SOURCE_DIR}/src) +add_subdirectory (src) #-- Add the tests if (BUILD_TESTING) - add_subdirectory (${HDF5_TOOLS_SOURCE_DIR}/test) + add_subdirectory (test) endif () diff --git a/tools/src/CMakeLists.txt b/tools/src/CMakeLists.txt index 37680dd..24e682a 100644 --- a/tools/src/CMakeLists.txt +++ b/tools/src/CMakeLists.txt @@ -7,31 +7,31 @@ PROJECT (HDF5_TOOLS_SRC) add_definitions (${HDF_EXTRA_C_FLAGS}) #-- Add the h5diff and test executables -add_subdirectory (${HDF5_TOOLS_SRC_SOURCE_DIR}/h5diff) +add_subdirectory (h5diff) #-- Add the h5ls executable -add_subdirectory (${HDF5_TOOLS_SRC_SOURCE_DIR}/h5ls) +add_subdirectory (h5ls) #-- Misc Executables -add_subdirectory (${HDF5_TOOLS_SRC_SOURCE_DIR}/misc) +add_subdirectory (misc) #-- Add the h5import and test executables -add_subdirectory (${HDF5_TOOLS_SRC_SOURCE_DIR}/h5import) +add_subdirectory (h5import) #-- h5Repack executables -add_subdirectory (${HDF5_TOOLS_SRC_SOURCE_DIR}/h5repack) +add_subdirectory (h5repack) #-- Add the h5dump and test executables -add_subdirectory (${HDF5_TOOLS_SRC_SOURCE_DIR}/h5jam) +add_subdirectory (h5jam) #-- Add the h5copy and test executables -add_subdirectory (${HDF5_TOOLS_SRC_SOURCE_DIR}/h5copy) +add_subdirectory (h5copy) #-- Add the h5stat and test executables -add_subdirectory (${HDF5_TOOLS_SRC_SOURCE_DIR}/h5stat) +add_subdirectory (h5stat) #-- Add the h5dump and test executables -add_subdirectory (${HDF5_TOOLS_SRC_SOURCE_DIR}/h5dump) +add_subdirectory (h5dump) #-- Add the h5format_convert and test executables -add_subdirectory (${HDF5_TOOLS_SRC_SOURCE_DIR}/h5format_convert) +add_subdirectory (h5format_convert) diff --git a/tools/test/CMakeLists.txt b/tools/test/CMakeLists.txt index a7dd11f..6877bfc 100644 --- a/tools/test/CMakeLists.txt +++ b/tools/test/CMakeLists.txt @@ -7,34 +7,34 @@ PROJECT (HDF5_TOOLS_TEST) add_definitions (${HDF_EXTRA_C_FLAGS}) #-- Add the h5diff tests -add_subdirectory (${HDF5_TOOLS_TEST_SOURCE_DIR}/h5diff) +add_subdirectory (h5diff) #-- Add the h5ls tests -add_subdirectory (${HDF5_TOOLS_TEST_SOURCE_DIR}/h5ls) +add_subdirectory (h5ls) #-- Misc tests -add_subdirectory (${HDF5_TOOLS_TEST_SOURCE_DIR}/misc) +add_subdirectory (misc) #-- Add the h5import tests -add_subdirectory (${HDF5_TOOLS_TEST_SOURCE_DIR}/h5import) +add_subdirectory (h5import) #-- h5Repack tests -add_subdirectory (${HDF5_TOOLS_TEST_SOURCE_DIR}/h5repack) +add_subdirectory (h5repack) #-- Add the h5jam tests -add_subdirectory (${HDF5_TOOLS_TEST_SOURCE_DIR}/h5jam) +add_subdirectory (h5jam) #-- Add the h5copy tests -add_subdirectory (${HDF5_TOOLS_TEST_SOURCE_DIR}/h5copy) +add_subdirectory (h5copy) #-- Add the h5stat tests -add_subdirectory (${HDF5_TOOLS_TEST_SOURCE_DIR}/h5stat) +add_subdirectory (h5stat) #-- Add the h5dump tests -add_subdirectory (${HDF5_TOOLS_TEST_SOURCE_DIR}/h5dump) +add_subdirectory (h5dump) #-- Add the h5format_convert and test executables -add_subdirectory (${HDF5_TOOLS_TEST_SOURCE_DIR}/h5format_convert) +add_subdirectory (h5format_convert) #-- Add the perform tests -add_subdirectory (${HDF5_TOOLS_TEST_SOURCE_DIR}/perform) +add_subdirectory (perform) diff --git a/tools/test/misc/CMakeLists.txt b/tools/test/misc/CMakeLists.txt index 48bc8ab..c014fad 100644 --- a/tools/test/misc/CMakeLists.txt +++ b/tools/test/misc/CMakeLists.txt @@ -22,7 +22,7 @@ INCLUDE_DIRECTORIES (${HDF5_TOOLS_DIR}/lib) set_target_properties (h5clear_gentest PROPERTIES FOLDER tools) #add_test (NAME H5CLEAR-h5clear_gentest COMMAND $) - add_subdirectory (${HDF5_TOOLS_TEST_MISC_SOURCE_DIR}/vds) + add_subdirectory (vds) endif () -- cgit v0.12 From 99c4d23c6c37a05c51100202ace50451fc13f1a8 Mon Sep 17 00:00:00 2001 From: "M. Scot Breitenfeld" Date: Wed, 31 Jan 2018 14:12:26 -0600 Subject: fixed develop to 1.10 issues --- configure.ac | 2 +- release_docs/RELEASE.txt | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/configure.ac b/configure.ac index 968bdc2..5fbb4a9 100644 --- a/configure.ac +++ b/configure.ac @@ -48,7 +48,7 @@ m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])]) # use silent rules where a ## ## By default, it is enabled. Users can configure with ## --disable-maintainer-mode to prevent running the autotools. -AM_MAINTAINER_MODE([disable]) +AM_MAINTAINER_MODE([enable]) ## ---------------------------------------------------------------------- ## Set prefix default (install directory) to a directory in the build area. diff --git a/release_docs/RELEASE.txt b/release_docs/RELEASE.txt index 67ad238..b098a16 100644 --- a/release_docs/RELEASE.txt +++ b/release_docs/RELEASE.txt @@ -476,7 +476,6 @@ Bug Fixes since HDF5-1.10.1 release (HDFFV-10248, DER, 2017/07/05) - - CMake Too many commands for POST_BUILD step caused command line to be -- cgit v0.12 From ad89b8325555ffd7ea27baef61c506a81dc80a96 Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Thu, 1 Feb 2018 09:42:35 -0600 Subject: Add note for HDFFV-10398 --- release_docs/RELEASE.txt | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/release_docs/RELEASE.txt b/release_docs/RELEASE.txt index b098a16..1e83a8e 100644 --- a/release_docs/RELEASE.txt +++ b/release_docs/RELEASE.txt @@ -407,7 +407,17 @@ Bug Fixes since HDF5-1.10.1 release ------------- - CMake - Correct usuage of CMAKE_BUILD_TYPE variable. + Update CMake commands configuration. + + A number of improvements were made to the CMake commands. Most + changes simplify usage or eliminate unused constructs. Also, + some changes support better cross-platform support. + + (ADB - 2018/02/01, HDFFV-10398) + + - CMake + + Correct usage of CMAKE_BUILD_TYPE variable. The use of the CMAKE_BUILD_TYPE is incorrect for multi-config generators (Visual Studio and XCode) and is optional for single -- cgit v0.12 From 36ddc717352be169183c75821d81bdf14e0a5743 Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Mon, 5 Feb 2018 08:51:46 -0600 Subject: HDFFV-10398 add sanitize attribute --- src/H5detect.c | 1038 ++++++++++++++++++++++++++++---------------------------- 1 file changed, 527 insertions(+), 511 deletions(-) diff --git a/src/H5detect.c b/src/H5detect.c index 75a1dba..2cc8366 100644 --- a/src/H5detect.c +++ b/src/H5detect.c @@ -27,23 +27,23 @@ static const char *FileHeader = "\n\ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *"; /* * - * Created: H5detect.c - * 10 Aug 1997 - * Robb Matzke + * Created: H5detect.c + * 10 Aug 1997 + * Robb Matzke * - * Purpose: This code was borrowed heavily from the `detect.c' - * program in the AIO distribution from Lawrence - * Livermore National Laboratory. + * Purpose: This code was borrowed heavily from the `detect.c' + * program in the AIO distribution from Lawrence + * Livermore National Laboratory. * - * Detects machine byte order and floating point - * format and generates a C source file (H5Tinit.c) - * to describe those paramters. + * Detects machine byte order and floating point + * format and generates a C source file (H5Tinit.c) + * to describe those paramters. * * Assumptions: We have an ANSI compiler. We're on a Unix like - * system or configure has detected those Unix - * features which aren't available. We're not - * running on a Vax or other machine with mixed - * endianess. + * system or configure has detected those Unix + * features which aren't available. We're not + * running on a Vax or other machine with mixed + * endianess. * * Modifications: * @@ -54,9 +54,19 @@ static const char *FileHeader = "\n\ #include "H5Tpublic.h" #include "H5Rpublic.h" +#if defined(__has_attribute) +#if __has_attribute(no_sanitize) +#define HDF_NO_UBSAN __attribute__((no_sanitize("undefined"))) +#else +#define HDF_NO_UBSAN +#endif +#else +#define HDF_NO_UBSAN +#endif + #define MAXDETECT 64 -/* The ALIGNMENT test code may generate the SIGBUS, SIGSEGV, or SIGILL signals. +/* The ALIGNMENT test code may generate the SIGBUS, SIGSEGV, or SIGILL signals. * We use setjmp/longjmp in the signal handlers for recovery. But setjmp/longjmp * do not necessary restore the signal blocking status while sigsetjmp/siglongjmp * do. If sigsetjmp/siglongjmp are not supported, need to use sigprocmask to @@ -66,19 +76,19 @@ static const char *FileHeader = "\n\ /* supported. */ #if defined(H5_HAVE_SIGSETJMP) && defined(H5_HAVE_SIGLONGJMP) /* Always save blocked signals to be restore by siglongjmp. */ -#define H5JMP_BUF sigjmp_buf -#define H5SETJMP(buf) HDsigsetjmp(buf, 1) -#define H5LONGJMP(buf, val) HDsiglongjmp(buf, val) -#define H5HAVE_SIGJMP /* sigsetjmp/siglongjmp are supported. */ +#define H5JMP_BUF sigjmp_buf +#define H5SETJMP(buf) HDsigsetjmp(buf, 1) +#define H5LONGJMP(buf, val) HDsiglongjmp(buf, val) +#define H5HAVE_SIGJMP /* sigsetjmp/siglongjmp are supported. */ #elif defined(H5_HAVE_LONGJMP) -#define H5JMP_BUF jmp_buf -#define H5SETJMP(buf) HDsetjmp(buf) -#define H5LONGJMP(buf, val) HDlongjmp(buf, val) +#define H5JMP_BUF jmp_buf +#define H5SETJMP(buf) HDsetjmp(buf) +#define H5LONGJMP(buf, val) HDlongjmp(buf, val) #endif /* ALIGNMENT and signal-handling status codes */ -#define STA_NoALIGNMENT 0x0001 /* No ALIGNMENT Test */ -#define STA_NoHandlerVerify 0x0002 /* No signal handler Tests */ +#define STA_NoALIGNMENT 0x0001 /* No ALIGNMENT Test */ +#define STA_NoHandlerVerify 0x0002 /* No signal handler Tests */ /* @@ -133,11 +143,11 @@ static void detect_C99_integers32(void); static void detect_C99_integers64(void); static void detect_alignments(void); static unsigned int align_g[] = {1, 2, 4, 8, 16}; -static int align_status_g = 0; /* ALIGNMENT Signal Status */ -static int sigbus_handler_called_g = 0; /* how many times called */ +static int align_status_g = 0; /* ALIGNMENT Signal Status */ +static int sigbus_handler_called_g = 0; /* how many times called */ static int sigsegv_handler_called_g = 0;/* how many times called */ -static int sigill_handler_called_g = 0; /* how many times called */ -static int signal_handler_tested_g = 0; /* how many times tested */ +static int sigill_handler_called_g = 0; /* how many times called */ +static int signal_handler_tested_g = 0; /* how many times tested */ #if defined(H5SETJMP) && defined(H5_HAVE_SIGNAL) static int verify_signal_handlers(int signum, void (*handler)(int)); #endif @@ -145,16 +155,16 @@ static int verify_signal_handlers(int signum, void (*handler)(int)); static H5JMP_BUF jbuf_g; #endif - + /*------------------------------------------------------------------------- - * Function: precision + * Function: precision * - * Purpose: Determine the precision and offset. + * Purpose: Determine the precision and offset. * - * Return: void + * Return: void * - * Programmer: Robb Matzke - * Thursday, June 18, 1998 + * Programmer: Robb Matzke + * Thursday, June 18, 1998 * * Modifications: * @@ -167,7 +177,7 @@ precision (detected_t *d) if (0 == d->msize) { /* - * An integer. The permutation can have negative values at the + * An integer. The permutation can have negative values at the * beginning or end which represent padding of bytes. We must adjust * the precision and offset accordingly. */ @@ -201,36 +211,36 @@ precision (detected_t *d) } } - + /*------------------------------------------------------------------------- - * Function: DETECT_I/DETECT_BYTE + * Function: DETECT_I/DETECT_BYTE * - * Purpose: These macro takes a type like `int' and a base name like - * `nati' and detects the byte order. The VAR is used to - * construct the names of the C variables defined. + * Purpose: These macro takes a type like `int' and a base name like + * `nati' and detects the byte order. The VAR is used to + * construct the names of the C variables defined. * * DETECT_I is used for types that are larger than one byte, * DETECT_BYTE is used for types that are exactly one byte. * - * Return: void + * Return: void * - * Programmer: Robb Matzke - * matzke@llnl.gov - * Jun 12 1996 + * Programmer: Robb Matzke + * matzke@llnl.gov + * Jun 12 1996 * * Modifications: * - * Robb Matzke, 4 Nov 1996 - * The INFO.perm now contains `-1' for bytes that aren't used and - * are always zero. This happens on the Cray for `short' where - * sizeof(short) is 8, but only the low-order 4 bytes are ever used. + * Robb Matzke, 4 Nov 1996 + * The INFO.perm now contains `-1' for bytes that aren't used and + * are always zero. This happens on the Cray for `short' where + * sizeof(short) is 8, but only the low-order 4 bytes are ever used. * - * Robb Matzke, 4 Nov 1996 - * Added a `padding' field to indicate how many zero bytes appear to - * the left (N) or right (-N) of the value. + * Robb Matzke, 4 Nov 1996 + * Added a `padding' field to indicate how many zero bytes appear to + * the left (N) or right (-N) of the value. * - * Robb Matzke, 5 Nov 1996 - * Removed HFILE and CFILE arguments. + * Robb Matzke, 5 Nov 1996 + * Removed HFILE and CFILE arguments. * * Neil Fortner, 6 Sep 2013 * Split macro into DETECT_I and DETECT_BYTE macros, extracted @@ -273,27 +283,27 @@ precision (detected_t *d) DETECT_I_BYTE_CORE(TYPE,VAR,INFO,int) \ } -#define DETECT_I(TYPE,VAR,INFO) { \ +#define DETECT_I(TYPE,VAR,INFO) { \ HDcompile_assert(sizeof(TYPE) > 1); \ \ DETECT_I_BYTE_CORE(TYPE,VAR,INFO,TYPE) \ } - + /*------------------------------------------------------------------------- - * Function: DETECT_F + * Function: DETECT_F * - * Purpose: This macro takes a floating point type like `double' and - * a base name like `natd' and detects byte order, mantissa - * location, exponent location, sign bit location, presence or - * absence of implicit mantissa bit, and exponent bias and - * initializes a detected_t structure with those properties. + * Purpose: This macro takes a floating point type like `double' and + * a base name like `natd' and detects byte order, mantissa + * location, exponent location, sign bit location, presence or + * absence of implicit mantissa bit, and exponent bias and + * initializes a detected_t structure with those properties. * - * Return: void + * Return: void * - * Programmer: Robb Matzke - * matzke@llnl.gov - * Jun 12 1996 + * Programmer: Robb Matzke + * matzke@llnl.gov + * Jun 12 1996 * *------------------------------------------------------------------------- */ @@ -383,31 +393,31 @@ precision (detected_t *d) } \ } - + /*------------------------------------------------------------------------- - * Function: DETECT_M + * Function: DETECT_M * - * Purpose: This macro takes only miscellaneous structures or pointer + * Purpose: This macro takes only miscellaneous structures or pointer * (pointer, hvl_t, hobj_ref_t, hdset_reg_ref_t). It - * constructs the names and decides the alignment in structure. + * constructs the names and decides the alignment in structure. * - * Return: void + * Return: void * - * Programmer: Raymond Lu - * slu@ncsa.uiuc.edu - * Dec 9, 2002 + * Programmer: Raymond Lu + * slu@ncsa.uiuc.edu + * Dec 9, 2002 * * Modifications: * *------------------------------------------------------------------------- */ -#define DETECT_M(TYPE,VAR,INFO) { \ - INFO.name = #VAR; \ - COMP_ALIGNMENT(TYPE, INFO.comp_align); \ +#define DETECT_M(TYPE,VAR,INFO) { \ + INFO.name = #VAR; \ + COMP_ALIGNMENT(TYPE, INFO.comp_align); \ } /* Detect alignment for C structure */ -#define COMP_ALIGNMENT(TYPE,COMP_ALIGN) { \ +#define COMP_ALIGNMENT(TYPE,COMP_ALIGN) { \ struct { \ char c; \ TYPE x; \ @@ -417,67 +427,67 @@ precision (detected_t *d) } #if defined(H5SETJMP) && defined(H5_HAVE_SIGNAL) -#define ALIGNMENT(TYPE,INFO) { \ - char *volatile _buf = NULL; \ - TYPE _val = 1, _val2; \ - volatile size_t _ano = 0; \ - void (*_handler)(int) = HDsignal(SIGBUS, sigbus_handler); \ - void (*_handler2)(int) = HDsignal(SIGSEGV, sigsegv_handler);\ - void (*_handler3)(int) = HDsignal(SIGILL, sigill_handler); \ - \ - _buf = (char*)HDmalloc(sizeof(TYPE) + align_g[NELMTS(align_g) - 1]); \ - if(H5SETJMP(jbuf_g)) _ano++; \ - if(_ano < NELMTS(align_g)) { \ - *((TYPE*)(_buf+align_g[_ano])) = _val; /*possible SIGBUS or SEGSEGV*/ \ - _val2 = *((TYPE*)(_buf+align_g[_ano])); /*possible SIGBUS or SEGSEGV*/\ - /* Cray Check: This section helps detect alignment on Cray's */ \ +#define ALIGNMENT(TYPE,INFO) { \ + char *volatile _buf = NULL; \ + TYPE _val = 1, _val2; \ + volatile size_t _ano = 0; \ + void (*_handler)(int) = HDsignal(SIGBUS, sigbus_handler); \ + void (*_handler2)(int) = HDsignal(SIGSEGV, sigsegv_handler);\ + void (*_handler3)(int) = HDsignal(SIGILL, sigill_handler); \ + \ + _buf = (char*)HDmalloc(sizeof(TYPE) + align_g[NELMTS(align_g) - 1]); \ + if(H5SETJMP(jbuf_g)) _ano++; \ + if(_ano < NELMTS(align_g)) { \ + *((TYPE*)(_buf+align_g[_ano])) = _val; /*possible SIGBUS or SEGSEGV*/ \ + _val2 = *((TYPE*)(_buf+align_g[_ano])); /*possible SIGBUS or SEGSEGV*/\ + /* Cray Check: This section helps detect alignment on Cray's */ \ /* vector machines (like the SV1) which mask off */ \ - /* pointer values when pointing to non-word aligned */ \ - /* locations with pointers that are supposed to be */ \ - /* word aligned. -QAK */ \ - HDmemset(_buf, 0xff, sizeof(TYPE)+align_g[NELMTS(align_g)-1]); \ + /* pointer values when pointing to non-word aligned */ \ + /* locations with pointers that are supposed to be */ \ + /* word aligned. -QAK */ \ + HDmemset(_buf, 0xff, sizeof(TYPE)+align_g[NELMTS(align_g)-1]); \ /*How to handle VAX types?*/ \ - if(INFO.perm[0]) /* Big-Endian */ \ - HDmemcpy(_buf+align_g[_ano]+(INFO.size-((INFO.offset+INFO.precision)/8)),((char *)&_val)+(INFO.size-((INFO.offset+INFO.precision)/8)),(size_t)(INFO.precision/8)); \ - else /* Little-Endian */ \ - HDmemcpy(_buf+align_g[_ano]+(INFO.offset/8),((char *)&_val)+(INFO.offset/8),(size_t)(INFO.precision/8)); \ - _val2 = *((TYPE*)(_buf+align_g[_ano])); \ - H5_GCC_DIAG_OFF(float-equal) \ - if(_val!=_val2) \ - H5LONGJMP(jbuf_g, 1); \ - H5_GCC_DIAG_ON(float-equal) \ - /* End Cray Check */ \ - (INFO.align)=align_g[_ano]; \ - } else { \ - (INFO.align)=0; \ - fprintf(stderr, "unable to calculate alignment for %s\n", #TYPE); \ - } \ - HDfree(_buf); \ - HDsignal(SIGBUS, _handler); /*restore original handler*/ \ - HDsignal(SIGSEGV, _handler2); /*restore original handler*/ \ - HDsignal(SIGILL, _handler3); /*restore original handler*/ \ + if(INFO.perm[0]) /* Big-Endian */ \ + HDmemcpy(_buf+align_g[_ano]+(INFO.size-((INFO.offset+INFO.precision)/8)),((char *)&_val)+(INFO.size-((INFO.offset+INFO.precision)/8)),(size_t)(INFO.precision/8)); \ + else /* Little-Endian */ \ + HDmemcpy(_buf+align_g[_ano]+(INFO.offset/8),((char *)&_val)+(INFO.offset/8),(size_t)(INFO.precision/8)); \ + _val2 = *((TYPE*)(_buf+align_g[_ano])); \ + H5_GCC_DIAG_OFF(float-equal) \ + if(_val!=_val2) \ + H5LONGJMP(jbuf_g, 1); \ + H5_GCC_DIAG_ON(float-equal) \ + /* End Cray Check */ \ + (INFO.align)=align_g[_ano]; \ + } else { \ + (INFO.align)=0; \ + fprintf(stderr, "unable to calculate alignment for %s\n", #TYPE); \ + } \ + HDfree(_buf); \ + HDsignal(SIGBUS, _handler); /*restore original handler*/ \ + HDsignal(SIGSEGV, _handler2); /*restore original handler*/ \ + HDsignal(SIGILL, _handler3); /*restore original handler*/ \ } #else -#define ALIGNMENT(TYPE,INFO) { \ - align_status_g |= STA_NoALIGNMENT; \ - (INFO.align)=0; \ +#define ALIGNMENT(TYPE,INFO) { \ + align_status_g |= STA_NoALIGNMENT; \ + (INFO.align)=0; \ } #endif - + #if defined(H5LONGJMP) && defined(H5_HAVE_SIGNAL) /*------------------------------------------------------------------------- - * Function: sigsegv_handler + * Function: sigsegv_handler * - * Purpose: Handler for SIGSEGV. We use signal() instead of sigaction() - * because it's more portable to non-Posix systems. Although - * it's not nearly as nice to work with, it does the job for - * this simple stuff. + * Purpose: Handler for SIGSEGV. We use signal() instead of sigaction() + * because it's more portable to non-Posix systems. Although + * it's not nearly as nice to work with, it does the job for + * this simple stuff. * - * Return: Returns via H5LONGJMP to jbuf_g. + * Return: Returns via H5LONGJMP to jbuf_g. * - * Programmer: Robb Matzke - * Thursday, March 18, 1999 + * Programmer: Robb Matzke + * Thursday, March 18, 1999 * * Modifications: * @@ -502,20 +512,20 @@ sigsegv_handler(int H5_ATTR_UNUSED signo) } #endif - + #if defined(H5LONGJMP) && defined(H5_HAVE_SIGNAL) /*------------------------------------------------------------------------- - * Function: sigbus_handler + * Function: sigbus_handler * - * Purpose: Handler for SIGBUS. We use signal() instead of sigaction() - * because it's more portable to non-Posix systems. Although - * it's not nearly as nice to work with, it does the job for - * this simple stuff. + * Purpose: Handler for SIGBUS. We use signal() instead of sigaction() + * because it's more portable to non-Posix systems. Although + * it's not nearly as nice to work with, it does the job for + * this simple stuff. * - * Return: Returns via H5LONGJMP to jbuf_g. + * Return: Returns via H5LONGJMP to jbuf_g. * - * Programmer: Robb Matzke - * Thursday, March 18, 1999 + * Programmer: Robb Matzke + * Thursday, March 18, 1999 * * Modifications: * @@ -540,20 +550,20 @@ sigbus_handler(int H5_ATTR_UNUSED signo) } #endif - + #if defined(H5LONGJMP) && defined(H5_HAVE_SIGNAL) /*------------------------------------------------------------------------- - * Function: sigill_handler + * Function: sigill_handler * - * Purpose: Handler for SIGILL. We use signal() instead of sigaction() - * because it's more portable to non-Posix systems. Although - * it's not nearly as nice to work with, it does the job for - * this simple stuff. + * Purpose: Handler for SIGILL. We use signal() instead of sigaction() + * because it's more portable to non-Posix systems. Although + * it's not nearly as nice to work with, it does the job for + * this simple stuff. * - * Return: Returns via H5LONGJMP to jbuf_g. + * Return: Returns via H5LONGJMP to jbuf_g. * - * Programmer: Raymond Lu - * 28 October 2013 + * Programmer: Raymond Lu + * 28 October 2013 * *------------------------------------------------------------------------- */ @@ -576,17 +586,17 @@ sigill_handler(int H5_ATTR_UNUSED signo) } #endif - + /*------------------------------------------------------------------------- - * Function: print_results + * Function: print_results * - * Purpose: Prints information about the detected data types. + * Purpose: Prints information about the detected data types. * - * Return: void + * Return: void * - * Programmer: Robb Matzke - * matzke@llnl.gov - * Jun 14, 1996 + * Programmer: Robb Matzke + * matzke@llnl.gov + * Jun 14, 1996 * * Modifications: * @@ -596,7 +606,7 @@ static void print_results(int nd, detected_t *d, int na, malign_t *misc_align) { int byte_order=0; /*byte order of data types*/ - int i, j; + int i, j; /* Include files */ printf("\ @@ -610,11 +620,11 @@ print_results(int nd, detected_t *d, int na, malign_t *misc_align) /***********/\n\ /* Headers */\n\ /***********/\n\ -#include \"H5private.h\" /* Generic Functions */\n\ -#include \"H5Eprivate.h\" /* Error handling */\n\ -#include \"H5FLprivate.h\" /* Free Lists */\n\ -#include \"H5Iprivate.h\" /* IDs */\n\ -#include \"H5Tpkg.h\" /* Datatypes */\n\ +#include \"H5private.h\" /* Generic Functions */\n\ +#include \"H5Eprivate.h\" /* Error handling */\n\ +#include \"H5FLprivate.h\" /* Free Lists */\n\ +#include \"H5Iprivate.h\" /* IDs */\n\ +#include \"H5Tpkg.h\" /* Datatypes */\n\ \n\ \n\ /****************/\n\ @@ -663,15 +673,15 @@ print_results(int nd, detected_t *d, int na, malign_t *misc_align) printf("\n\ \n\ /*-------------------------------------------------------------------------\n\ - * Function: H5T__init_native\n\ + * Function: H5T__init_native\n\ *\n\ - * Purpose: Initialize pre-defined native datatypes from code generated\n\ + * Purpose: Initialize pre-defined native datatypes from code generated\n\ * during the library configuration by H5detect.\n\ *\n\ - * Return: Success: non-negative\n\ - * Failure: negative\n\ + * Return: Success: non-negative\n\ + * Failure: negative\n\ *\n\ - * Programmer: Robb Matzke\n\ + * Programmer: Robb Matzke\n\ * Wednesday, December 16, 1998\n\ *\n\ *-------------------------------------------------------------------------\n\ @@ -679,8 +689,8 @@ print_results(int nd, detected_t *d, int na, malign_t *misc_align) herr_t\n\ H5T__init_native(void)\n\ {\n\ - H5T_t *dt = NULL;\n\ - herr_t ret_value = SUCCEED;\n\ + H5T_t *dt = NULL;\n\ + herr_t ret_value = SUCCEED;\n\ \n\ FUNC_ENTER_PACKAGE\n"); @@ -702,20 +712,20 @@ H5T__init_native(void)\n\ } } - /* Print a comment to describe this section of definitions. */ - printf("\n /*\n"); - iprint(d+i); - printf(" */\n"); + /* Print a comment to describe this section of definitions. */ + printf("\n /*\n"); + iprint(d+i); + printf(" */\n"); - /* The part common to fixed and floating types */ - printf("\ + /* The part common to fixed and floating types */ + printf("\ if(NULL == (dt = H5T__alloc()))\n\ HGOTO_ERROR(H5E_DATATYPE, H5E_NOSPACE, FAIL, \"datatype allocation failed\")\n\ dt->shared->state = H5T_STATE_IMMUTABLE;\n\ dt->shared->type = H5T_%s;\n\ dt->shared->size = %d;\n", - d[i].msize ? "FLOAT" : "INTEGER",/*class */ - d[i].size); /*size */ + d[i].msize ? "FLOAT" : "INTEGER",/*class */ + d[i].size); /*size */ if(byte_order==-1) printf("\ @@ -732,18 +742,18 @@ H5T__init_native(void)\n\ dt->shared->u.atomic.prec = %d;\n\ dt->shared->u.atomic.lsb_pad = H5T_PAD_ZERO;\n\ dt->shared->u.atomic.msb_pad = H5T_PAD_ZERO;\n", - d[i].offset, /*offset */ - d[i].precision); /*precision */ + d[i].offset, /*offset */ + d[i].precision); /*precision */ /*HDassert((d[i].perm[0]>0)==(byte_order>0));*/ /* Double-check that byte-order doesn't change */ - if (0 == d[i].msize) { - /* The part unique to fixed point types */ - printf("\ + if (0 == d[i].msize) { + /* The part unique to fixed point types */ + printf("\ dt->shared->u.atomic.u.i.sign = H5T_SGN_%s;\n", - d[i].sign ? "2" : "NONE"); - } else { - /* The part unique to floating point types */ - printf("\ + d[i].sign ? "2" : "NONE"); + } else { + /* The part unique to floating point types */ + printf("\ dt->shared->u.atomic.u.f.sign = %d;\n\ dt->shared->u.atomic.u.f.epos = %d;\n\ dt->shared->u.atomic.u.f.esize = %d;\n\ @@ -752,22 +762,22 @@ H5T__init_native(void)\n\ dt->shared->u.atomic.u.f.msize = %d;\n\ dt->shared->u.atomic.u.f.norm = H5T_NORM_%s;\n\ dt->shared->u.atomic.u.f.pad = H5T_PAD_ZERO;\n", - d[i].sign, /*sign location */ - d[i].epos, /*exponent loc */ - d[i].esize, /*exponent size */ - (unsigned long)(d[i].bias), /*exponent bias */ - d[i].mpos, /*mantissa loc */ - d[i].msize, /*mantissa size */ - d[i].imp ? "IMPLIED" : "NONE"); /*normalization */ - } - - /* Atomize the type */ - printf("\ + d[i].sign, /*sign location */ + d[i].epos, /*exponent loc */ + d[i].esize, /*exponent size */ + (unsigned long)(d[i].bias), /*exponent bias */ + d[i].mpos, /*mantissa loc */ + d[i].msize, /*mantissa size */ + d[i].imp ? "IMPLIED" : "NONE"); /*normalization */ + } + + /* Atomize the type */ + printf("\ if((H5T_NATIVE_%s_g = H5I_register(H5I_DATATYPE, dt, FALSE)) < 0)\n\ HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, \"can't register ID for built-in datatype\")\n", - d[i].varname); - printf(" H5T_NATIVE_%s_ALIGN_g = %lu;\n", - d[i].varname, (unsigned long)(d[i].align)); + d[i].varname); + printf(" H5T_NATIVE_%s_ALIGN_g = %lu;\n", + d[i].varname, (unsigned long)(d[i].align)); /* Variables for alignment of compound datatype */ if(!HDstrcmp(d[i].varname, "SCHAR") || !HDstrcmp(d[i].varname, "SHORT") || @@ -809,69 +819,69 @@ done:\n\ /* Print the ALIGNMENT and signal-handling status as comments */ printf("\n" - "/****************************************/\n" - "/* ALIGNMENT and signal-handling status */\n" - "/****************************************/\n"); + "/****************************************/\n" + "/* ALIGNMENT and signal-handling status */\n" + "/****************************************/\n"); if (align_status_g & STA_NoALIGNMENT) - printf("/* ALIGNAMENT test is not available */\n"); + printf("/* ALIGNAMENT test is not available */\n"); if (align_status_g & STA_NoHandlerVerify) - printf("/* Signal handlers verify test is not available */\n"); + printf("/* Signal handlers verify test is not available */\n"); /* The following is available in H5pubconf.h. Printing them here for */ /* convenience. */ #ifdef H5_HAVE_SIGNAL - printf("/* Signal() support: yes */\n"); + printf("/* Signal() support: yes */\n"); #else - printf("/* Signal() support: no */\n"); + printf("/* Signal() support: no */\n"); #endif #ifdef H5_HAVE_SETJMP - printf("/* setjmp() support: yes */\n"); + printf("/* setjmp() support: yes */\n"); #else - printf("/* setjmp() support: no */\n"); + printf("/* setjmp() support: no */\n"); #endif #ifdef H5_HAVE_LONGJMP - printf("/* longjmp() support: yes */\n"); + printf("/* longjmp() support: yes */\n"); #else - printf("/* longjmp() support: no */\n"); + printf("/* longjmp() support: no */\n"); #endif #ifdef H5_HAVE_SIGSETJMP - printf("/* sigsetjmp() support: yes */\n"); + printf("/* sigsetjmp() support: yes */\n"); #else - printf("/* sigsetjmp() support: no */\n"); + printf("/* sigsetjmp() support: no */\n"); #endif #ifdef H5_HAVE_SIGLONGJMP - printf("/* siglongjmp() support: yes */\n"); + printf("/* siglongjmp() support: yes */\n"); #else - printf("/* siglongjmp() support: no */\n"); + printf("/* siglongjmp() support: no */\n"); #endif #ifdef H5_HAVE_SIGPROCMASK - printf("/* sigprocmask() support: yes */\n"); + printf("/* sigprocmask() support: yes */\n"); #else - printf("/* sigprocmask() support: no */\n"); + printf("/* sigprocmask() support: no */\n"); #endif /* Print the statics of signal handlers called for debugging */ printf("\n" - "/******************************/\n" - "/* signal handlers statistics */\n" - "/******************************/\n"); + "/******************************/\n" + "/* signal handlers statistics */\n" + "/******************************/\n"); printf("/* signal_handlers tested: %d times */\n", signal_handler_tested_g); printf("/* sigbus_handler called: %d times */\n", sigbus_handler_called_g); printf("/* sigsegv_handler called: %d times */\n", sigsegv_handler_called_g); printf("/* sigill_handler called: %d times */\n", sigill_handler_called_g); } /* end print_results() */ - + /*------------------------------------------------------------------------- - * Function: iprint + * Function: iprint * - * Purpose: Prints information about the fields of a floating point - * format. + * Purpose: Prints information about the fields of a floating point + * format. * - * Return: void + * Return: void * - * Programmer: Robb Matzke - * matzke@llnl.gov - * Jun 13, 1996 + * Programmer: Robb Matzke + * matzke@llnl.gov + * Jun 13, 1996 * * Modifications: * @@ -945,22 +955,22 @@ iprint(detected_t *d) } - + /*------------------------------------------------------------------------- - * Function: byte_cmp + * Function: byte_cmp * - * Purpose: Compares two chunks of memory A and B and returns the - * byte index into those arrays of the first byte that - * differs between A and B. Ignores differences where the + * Purpose: Compares two chunks of memory A and B and returns the + * byte index into those arrays of the first byte that + * differs between A and B. Ignores differences where the * corresponding bit in pad_mask is set to 0. * - * Return: Success: Index of differing byte. + * Return: Success: Index of differing byte. * - * Failure: -1 if all bytes are the same. + * Failure: -1 if all bytes are the same. * - * Programmer: Robb Matzke - * matzke@llnl.gov - * Jun 12, 1996 + * Programmer: Robb Matzke + * matzke@llnl.gov + * Jun 12, 1996 * * Modifications: * @@ -980,17 +990,17 @@ byte_cmp(int n, const void *_a, const void *_b, const unsigned char *pad_mask) return -1; } - + /*------------------------------------------------------------------------- - * Function: bit_cmp + * Function: bit_cmp * - * Purpose: Compares two bit vectors and returns the index for the - * first bit that differs between the two vectors. The - * size of the vector is NBYTES. PERM is a mapping from - * actual order to little endian. Ignores differences where + * Purpose: Compares two bit vectors and returns the index for the + * first bit that differs between the two vectors. The + * size of the vector is NBYTES. PERM is a mapping from + * actual order to little endian. Ignores differences where * the corresponding bit in pad_mask is set to 0. * - * Return: Index of first differing bit. + * Return: Index of first differing bit. * *------------------------------------------------------------------------- */ @@ -1021,23 +1031,23 @@ bit_cmp(unsigned int nbytes, int *perm, void *_a, void *_b, return 0; } - + /*------------------------------------------------------------------------- - * Function: fix_order + * Function: fix_order * - * Purpose: Given an array PERM with elements FIRST through LAST - * initialized with zero origin byte numbers, this function - * creates a permutation vector that maps the actual order - * of a floating point number to little-endian. + * Purpose: Given an array PERM with elements FIRST through LAST + * initialized with zero origin byte numbers, this function + * creates a permutation vector that maps the actual order + * of a floating point number to little-endian. * - * This function assumes that the mantissa byte ordering - * implies the total ordering. + * This function assumes that the mantissa byte ordering + * implies the total ordering. * - * Return: void + * Return: void * - * Programmer: Robb Matzke - * matzke@llnl.gov - * Jun 13, 1996 + * Programmer: Robb Matzke + * matzke@llnl.gov + * Jun 13, 1996 * * Modifications: * @@ -1046,81 +1056,81 @@ bit_cmp(unsigned int nbytes, int *perm, void *_a, void *_b, static void fix_order(int n, int last, int *perm, const char **mesg) { - int i; + int i; if (last > 1) { - /* - * We have at least three points to consider. - */ - if (perm[last] < perm[last - 1] && perm[last - 1] < perm[last - 2]) { - /* - * Little endian. - */ - if (mesg) *mesg = "Little-endian"; - for (i = 0; i < n; i++) perm[i] = i; - - } else if (perm[last] > perm[last-1] && perm[last-1] > perm[last-2]) { - /* - * Big endian. - */ - if (mesg) *mesg = "Big-endian"; - for (i = 0; i < n; i++) perm[i] = (n - 1) - i; - - } else { - /* - * Bi-endian machines like VAX. + /* + * We have at least three points to consider. + */ + if (perm[last] < perm[last - 1] && perm[last - 1] < perm[last - 2]) { + /* + * Little endian. + */ + if (mesg) *mesg = "Little-endian"; + for (i = 0; i < n; i++) perm[i] = i; + + } else if (perm[last] > perm[last-1] && perm[last-1] > perm[last-2]) { + /* + * Big endian. + */ + if (mesg) *mesg = "Big-endian"; + for (i = 0; i < n; i++) perm[i] = (n - 1) - i; + + } else { + /* + * Bi-endian machines like VAX. * (NOTE: This is not an actual determination of the VAX-endianess. * It could have some other endianess and fall into this * case - JKM & QAK) - */ - HDassert(0 == n % 2); - if (mesg) *mesg = "VAX"; - for (i = 0; i < n; i += 2) { - perm[i] = (n - 2) - i; - perm[i + 1] = (n - 1) - i; - } - } + */ + HDassert(0 == n % 2); + if (mesg) *mesg = "VAX"; + for (i = 0; i < n; i += 2) { + perm[i] = (n - 2) - i; + perm[i + 1] = (n - 1) - i; + } + } } else { - fprintf(stderr, - "Failed to detect byte order of %d-byte floating point.\n", n); - HDexit(1); + fprintf(stderr, + "Failed to detect byte order of %d-byte floating point.\n", n); + HDexit(1); } } - + /*------------------------------------------------------------------------- - * Function: imp_bit + * Function: imp_bit * - * Purpose: Looks for an implicit bit in the mantissa. The value - * of _A should be 1.0 and the value of _B should be 0.5. - * Some floating-point formats discard the most significant - * bit of the mantissa after normalizing since it will always - * be a one (except for 0.0). If this is true for the native - * floating point values stored in _A and _B then the function - * returns non-zero. + * Purpose: Looks for an implicit bit in the mantissa. The value + * of _A should be 1.0 and the value of _B should be 0.5. + * Some floating-point formats discard the most significant + * bit of the mantissa after normalizing since it will always + * be a one (except for 0.0). If this is true for the native + * floating point values stored in _A and _B then the function + * returns non-zero. * - * This function assumes that the exponent occupies higher - * order bits than the mantissa and that the most significant - * bit of the mantissa is next to the least signficant bit - * of the exponent. + * This function assumes that the exponent occupies higher + * order bits than the mantissa and that the most significant + * bit of the mantissa is next to the least signficant bit + * of the exponent. * * - * Return: Success: Non-zero if the most significant bit - * of the mantissa is discarded (ie, the - * mantissa has an implicit `one' as the - * most significant bit). Otherwise, - * returns zero. + * Return: Success: Non-zero if the most significant bit + * of the mantissa is discarded (ie, the + * mantissa has an implicit `one' as the + * most significant bit). Otherwise, + * returns zero. * - * Failure: exit(1) + * Failure: exit(1) * - * Programmer: Robb Matzke - * matzke@llnl.gov - * Jun 13, 1996 + * Programmer: Robb Matzke + * matzke@llnl.gov + * Jun 13, 1996 * * Modifications: * - * Robb Matzke, 6 Nov 1996 - * Fixed a bug that occurs with non-implicit architectures. + * Robb Matzke, 6 Nov 1996 + * Fixed a bug that occurs with non-implicit architectures. * *------------------------------------------------------------------------- */ @@ -1150,26 +1160,26 @@ imp_bit(unsigned int n, int *perm, void *_a, void *_b, const unsigned char *pad_ return (a[perm[major]] >> minor) & 0x01 ? 0 : 1; } - + /*------------------------------------------------------------------------- - * Function: find_bias + * Function: find_bias * - * Purpose: Determines the bias of the exponent. This function should - * be called with _A having a value of `1'. + * Purpose: Determines the bias of the exponent. This function should + * be called with _A having a value of `1'. * - * Return: Success: The exponent bias. + * Return: Success: The exponent bias. * - * Failure: + * Failure: * - * Programmer: Robb Matzke - * matzke@llnl.gov - * Jun 13, 1996 + * Programmer: Robb Matzke + * matzke@llnl.gov + * Jun 13, 1996 * * Modifications: * - * Robb Matzke, 6 Nov 1996 - * Fixed a bug with non-implicit architectures returning the - * wrong exponent bias. + * Robb Matzke, 6 Nov 1996 + * Fixed a bug with non-implicit architectures returning the + * wrong exponent bias. * *------------------------------------------------------------------------- */ @@ -1193,17 +1203,17 @@ find_bias(unsigned int epos, unsigned int esize, int *perm, void *_a) return bias; } - + /*------------------------------------------------------------------------- - * Function: print_header + * Function: print_header * - * Purpose: Prints the C file header for the generated file. + * Purpose: Prints the C file header for the generated file. * - * Return: void + * Return: void * - * Programmer: Robb Matzke - * matzke@llnl.gov - * Mar 12 1997 + * Programmer: Robb Matzke + * matzke@llnl.gov + * Mar 12 1997 * * Modifications: * @@ -1213,22 +1223,22 @@ static void print_header(void) { - time_t now = HDtime(NULL); - struct tm *tm = HDlocaltime(&now); - char real_name[30]; - char host_name[256]; - int i; - const char *s; + time_t now = HDtime(NULL); + struct tm *tm = HDlocaltime(&now); + char real_name[30]; + char host_name[256]; + int i; + const char *s; #ifdef H5_HAVE_GETPWUID - struct passwd *pwd = NULL; + struct passwd *pwd = NULL; #else - int pwd = 1; + int pwd = 1; #endif - static const char *month_name[] = + static const char *month_name[] = { - "Jan", "Feb", "Mar", "Apr", "May", "Jun", - "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"}; - static const char *purpose = "\ + "Jan", "Feb", "Mar", "Apr", "May", "Jun", + "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"}; + static const char *purpose = "\ This machine-generated source code contains\n\ information about the various integer and\n\ floating point numeric formats found on this\n\ @@ -1240,7 +1250,7 @@ Each of the numeric formats listed below are\n\ printed from most significant bit to least\n\ significant bit even though the actual bytes\n\ might be stored in a different order in\n\ -memory. The integers above each binary byte\n\ +memory. The integers above each binary byte\n\ indicate the relative order of the bytes in\n\ memory; little-endian machines have\n\ decreasing numbers while big-endian machines\n\ @@ -1251,8 +1261,8 @@ letters with `S' for the mantissa sign bit,\n\ `M' for the mantissa magnitude, and `E' for\n\ the exponent. The exponent has an associated\n\ bias which can be subtracted to find the\n\ -true exponent. The radix point is assumed\n\ -to be before the first `M' bit. Any bit\n\ +true exponent. The radix point is assumed\n\ +to be before the first `M' bit. Any bit\n\ of a floating-point value not falling into one\n\ of these categories is printed as a question\n\ mark. Bits of integer types are printed as\n\ @@ -1271,20 +1281,20 @@ bit.\n"; */ #ifdef H5_HAVE_GETPWUID { - size_t n; - char *comma; - if ((pwd = HDgetpwuid(HDgetuid()))) { - if ((comma = HDstrchr(pwd->pw_gecos, ','))) { - n = MIN(sizeof(real_name)-1, (unsigned)(comma-pwd->pw_gecos)); - HDstrncpy(real_name, pwd->pw_gecos, n); - real_name[n] = '\0'; - } else { - HDstrncpy(real_name, pwd->pw_gecos, sizeof(real_name)); - real_name[sizeof(real_name) - 1] = '\0'; - } - } else { - real_name[0] = '\0'; - } + size_t n; + char *comma; + if ((pwd = HDgetpwuid(HDgetuid()))) { + if ((comma = HDstrchr(pwd->pw_gecos, ','))) { + n = MIN(sizeof(real_name)-1, (unsigned)(comma-pwd->pw_gecos)); + HDstrncpy(real_name, pwd->pw_gecos, n); + real_name[n] = '\0'; + } else { + HDstrncpy(real_name, pwd->pw_gecos, sizeof(real_name)); + real_name[sizeof(real_name) - 1] = '\0'; + } + } else { + real_name[0] = '\0'; + } } #else real_name[0] = '\0'; @@ -1295,7 +1305,7 @@ bit.\n"; */ #ifdef H5_HAVE_GETHOSTNAME if (HDgethostname(host_name, sizeof(host_name)) < 0) { - host_name[0] = '\0'; + host_name[0] = '\0'; } #else host_name[0] = '\0'; @@ -1305,24 +1315,24 @@ bit.\n"; * The file header: warning, copyright notice, build information. */ printf("/* Generated automatically by H5detect -- do not edit */\n\n\n"); - HDputs(FileHeader); /*the copyright notice--see top of this file */ + HDputs(FileHeader); /*the copyright notice--see top of this file */ printf(" *\n * Created:\t\t%s %2d, %4d\n", - month_name[tm->tm_mon], tm->tm_mday, 1900 + tm->tm_year); + month_name[tm->tm_mon], tm->tm_mday, 1900 + tm->tm_year); if (pwd || real_name[0] || host_name[0]) { - printf(" *\t\t\t"); - if (real_name[0]) printf("%s <", real_name); + printf(" *\t\t\t"); + if (real_name[0]) printf("%s <", real_name); #ifdef H5_HAVE_GETPWUID - if (pwd) HDfputs(pwd->pw_name, stdout); + if (pwd) HDfputs(pwd->pw_name, stdout); #endif - if (host_name[0]) printf("@%s", host_name); - if (real_name[0]) printf(">"); - HDputchar('\n'); + if (host_name[0]) printf("@%s", host_name); + if (real_name[0]) printf(">"); + HDputchar('\n'); } printf(" *\n * Purpose:\t\t"); for (s = purpose; *s; s++) { - HDputchar(*s); - if ('\n' == *s && s[1]) printf(" *\t\t\t"); + HDputchar(*s); + if ('\n' == *s && s[1]) printf(" *\t\t\t"); } printf(" *\n * Modifications:\n *\n"); @@ -1335,84 +1345,84 @@ bit.\n"; } - + /*------------------------------------------------------------------------- - * Function: detect_C89_integers + * Function: detect_C89_integers * - * Purpose: Detect C89 integer types + * Purpose: Detect C89 integer types * - * Return: void + * Return: void * - * Programmer: Albert Cheng - * 2004/05/20 + * Programmer: Albert Cheng + * 2004/05/20 * * Modifications: * *------------------------------------------------------------------------- */ static void -detect_C89_integers(void) +detect_C89_integers(void) HDF_NO_UBSAN { - DETECT_BYTE(signed char, SCHAR, d_g[nd_g]); nd_g++; - DETECT_BYTE(unsigned char, UCHAR, d_g[nd_g]); nd_g++; - DETECT_I(short, SHORT, d_g[nd_g]); nd_g++; - DETECT_I(unsigned short, USHORT, d_g[nd_g]); nd_g++; - DETECT_I(int, INT, d_g[nd_g]); nd_g++; - DETECT_I(unsigned int, UINT, d_g[nd_g]); nd_g++; - DETECT_I(long, LONG, d_g[nd_g]); nd_g++; - DETECT_I(unsigned long, ULONG, d_g[nd_g]); nd_g++; + DETECT_BYTE(signed char, SCHAR, d_g[nd_g]); nd_g++; + DETECT_BYTE(unsigned char, UCHAR, d_g[nd_g]); nd_g++; + DETECT_I(short, SHORT, d_g[nd_g]); nd_g++; + DETECT_I(unsigned short, USHORT, d_g[nd_g]); nd_g++; + DETECT_I(int, INT, d_g[nd_g]); nd_g++; + DETECT_I(unsigned int, UINT, d_g[nd_g]); nd_g++; + DETECT_I(long, LONG, d_g[nd_g]); nd_g++; + DETECT_I(unsigned long, ULONG, d_g[nd_g]); nd_g++; } - + /*------------------------------------------------------------------------- - * Function: detect_C89_floats + * Function: detect_C89_floats * - * Purpose: Detect C89 floating point types + * Purpose: Detect C89 floating point types * - * Return: void + * Return: void * - * Programmer: Albert Cheng - * 2004/05/20 + * Programmer: Albert Cheng + * 2004/05/20 * * Modifications: * *------------------------------------------------------------------------- */ static void -detect_C89_floats(void) +detect_C89_floats(void) HDF_NO_UBSAN { DETECT_F(float, FLOAT, d_g[nd_g]); nd_g++; DETECT_F(double, DOUBLE, d_g[nd_g]); nd_g++; } - + /*------------------------------------------------------------------------- - * Function: detect_C99_integers8 + * Function: detect_C99_integers8 * - * Purpose: Detect C99 8 bit integer types + * Purpose: Detect C99 8 bit integer types * - * Return: void + * Return: void * - * Programmer: Albert Cheng - * 2004/05/20 + * Programmer: Albert Cheng + * 2004/05/20 * * Modifications: * *------------------------------------------------------------------------- */ static void -detect_C99_integers8(void) +detect_C99_integers8(void) HDF_NO_UBSAN { #if H5_SIZEOF_INT8_T>0 #if H5_SIZEOF_INT8_T==1 DETECT_BYTE(int8_t, INT8, d_g[nd_g]); nd_g++; #else - DETECT_I(int8_t, INT8, d_g[nd_g]); nd_g++; + DETECT_I(int8_t, INT8, d_g[nd_g]); nd_g++; #endif #endif #if H5_SIZEOF_UINT8_T>0 #if H5_SIZEOF_UINT8_T==1 - DETECT_BYTE(uint8_t, UINT8, d_g[nd_g]); nd_g++; + DETECT_BYTE(uint8_t, UINT8, d_g[nd_g]); nd_g++; #else DETECT_I(uint8_t, UINT8, d_g[nd_g]); nd_g++; #endif @@ -1421,147 +1431,147 @@ detect_C99_integers8(void) #if H5_SIZEOF_INT_LEAST8_T==1 DETECT_BYTE(int_least8_t, INT_LEAST8, d_g[nd_g]); nd_g++; #else - DETECT_I(int_least8_t, INT_LEAST8, d_g[nd_g]); nd_g++; + DETECT_I(int_least8_t, INT_LEAST8, d_g[nd_g]); nd_g++; #endif #endif #if H5_SIZEOF_UINT_LEAST8_T>0 #if H5_SIZEOF_UINT_LEAST8_T==1 DETECT_BYTE(uint_least8_t, UINT_LEAST8, d_g[nd_g]); nd_g++; #else - DETECT_I(uint_least8_t, UINT_LEAST8, d_g[nd_g]); nd_g++; + DETECT_I(uint_least8_t, UINT_LEAST8, d_g[nd_g]); nd_g++; #endif #endif #if H5_SIZEOF_INT_FAST8_T>0 #if H5_SIZEOF_INT_FAST8_T==1 DETECT_BYTE(int_fast8_t, INT_FAST8, d_g[nd_g]); nd_g++; #else - DETECT_I(int_fast8_t, INT_FAST8, d_g[nd_g]); nd_g++; + DETECT_I(int_fast8_t, INT_FAST8, d_g[nd_g]); nd_g++; #endif #endif #if H5_SIZEOF_UINT_FAST8_T>0 #if H5_SIZEOF_UINT_FAST8_T==1 - DETECT_BYTE(uint_fast8_t, UINT_FAST8, d_g[nd_g]); nd_g++; + DETECT_BYTE(uint_fast8_t, UINT_FAST8, d_g[nd_g]); nd_g++; #else DETECT_I(uint_fast8_t, UINT_FAST8, d_g[nd_g]); nd_g++; #endif #endif } - + /*------------------------------------------------------------------------- - * Function: detect_C99_integers16 + * Function: detect_C99_integers16 * - * Purpose: Detect C99 16 bit integer types + * Purpose: Detect C99 16 bit integer types * - * Return: void + * Return: void * - * Programmer: Albert Cheng - * 2004/05/20 + * Programmer: Albert Cheng + * 2004/05/20 * * Modifications: * *------------------------------------------------------------------------- */ static void -detect_C99_integers16(void) +detect_C99_integers16(void) HDF_NO_UBSAN { #if H5_SIZEOF_INT16_T>0 - DETECT_I(int16_t, INT16, d_g[nd_g]); nd_g++; + DETECT_I(int16_t, INT16, d_g[nd_g]); nd_g++; #endif #if H5_SIZEOF_UINT16_T>0 - DETECT_I(uint16_t, UINT16, d_g[nd_g]); nd_g++; + DETECT_I(uint16_t, UINT16, d_g[nd_g]); nd_g++; #endif #if H5_SIZEOF_INT_LEAST16_T>0 - DETECT_I(int_least16_t, INT_LEAST16, d_g[nd_g]); nd_g++; + DETECT_I(int_least16_t, INT_LEAST16, d_g[nd_g]); nd_g++; #endif #if H5_SIZEOF_UINT_LEAST16_T>0 - DETECT_I(uint_least16_t, UINT_LEAST16, d_g[nd_g]); nd_g++; + DETECT_I(uint_least16_t, UINT_LEAST16, d_g[nd_g]); nd_g++; #endif #if H5_SIZEOF_INT_FAST16_T>0 - DETECT_I(int_fast16_t, INT_FAST16, d_g[nd_g]); nd_g++; + DETECT_I(int_fast16_t, INT_FAST16, d_g[nd_g]); nd_g++; #endif #if H5_SIZEOF_UINT_FAST16_T>0 - DETECT_I(uint_fast16_t, UINT_FAST16, d_g[nd_g]); nd_g++; + DETECT_I(uint_fast16_t, UINT_FAST16, d_g[nd_g]); nd_g++; #endif } - + /*------------------------------------------------------------------------- - * Function: detect_C99_integers32 + * Function: detect_C99_integers32 * - * Purpose: Detect C99 32 bit integer types + * Purpose: Detect C99 32 bit integer types * - * Return: void + * Return: void * - * Programmer: Albert Cheng - * 2004/05/20 + * Programmer: Albert Cheng + * 2004/05/20 * * Modifications: * *------------------------------------------------------------------------- */ static void -detect_C99_integers32(void) +detect_C99_integers32(void) HDF_NO_UBSAN { #if H5_SIZEOF_INT32_T>0 - DETECT_I(int32_t, INT32, d_g[nd_g]); nd_g++; + DETECT_I(int32_t, INT32, d_g[nd_g]); nd_g++; #endif #if H5_SIZEOF_UINT32_T>0 - DETECT_I(uint32_t, UINT32, d_g[nd_g]); nd_g++; + DETECT_I(uint32_t, UINT32, d_g[nd_g]); nd_g++; #endif #if H5_SIZEOF_INT_LEAST32_T>0 - DETECT_I(int_least32_t, INT_LEAST32, d_g[nd_g]); nd_g++; + DETECT_I(int_least32_t, INT_LEAST32, d_g[nd_g]); nd_g++; #endif #if H5_SIZEOF_UINT_LEAST32_T>0 - DETECT_I(uint_least32_t, UINT_LEAST32, d_g[nd_g]); nd_g++; + DETECT_I(uint_least32_t, UINT_LEAST32, d_g[nd_g]); nd_g++; #endif #if H5_SIZEOF_INT_FAST32_T>0 - DETECT_I(int_fast32_t, INT_FAST32, d_g[nd_g]); nd_g++; + DETECT_I(int_fast32_t, INT_FAST32, d_g[nd_g]); nd_g++; #endif #if H5_SIZEOF_UINT_FAST32_T>0 - DETECT_I(uint_fast32_t, UINT_FAST32, d_g[nd_g]); nd_g++; + DETECT_I(uint_fast32_t, UINT_FAST32, d_g[nd_g]); nd_g++; #endif } - + /*------------------------------------------------------------------------- - * Function: detect_C99_integers64 + * Function: detect_C99_integers64 * - * Purpose: Detect C99 64 bit integer types + * Purpose: Detect C99 64 bit integer types * - * Return: void + * Return: void * - * Programmer: Albert Cheng - * 2004/05/20 + * Programmer: Albert Cheng + * 2004/05/20 * * Modifications: * *------------------------------------------------------------------------- */ static void -detect_C99_integers64(void) +detect_C99_integers64(void) HDF_NO_UBSAN { #if H5_SIZEOF_INT64_T>0 - DETECT_I(int64_t, INT64, d_g[nd_g]); nd_g++; + DETECT_I(int64_t, INT64, d_g[nd_g]); nd_g++; #endif #if H5_SIZEOF_UINT64_T>0 - DETECT_I(uint64_t, UINT64, d_g[nd_g]); nd_g++; + DETECT_I(uint64_t, UINT64, d_g[nd_g]); nd_g++; #endif #if H5_SIZEOF_INT_LEAST64_T>0 - DETECT_I(int_least64_t, INT_LEAST64, d_g[nd_g]); nd_g++; + DETECT_I(int_least64_t, INT_LEAST64, d_g[nd_g]); nd_g++; #endif #if H5_SIZEOF_UINT_LEAST64_T>0 - DETECT_I(uint_least64_t, UINT_LEAST64, d_g[nd_g]); nd_g++; + DETECT_I(uint_least64_t, UINT_LEAST64, d_g[nd_g]); nd_g++; #endif #if H5_SIZEOF_INT_FAST64_T>0 - DETECT_I(int_fast64_t, INT_FAST64, d_g[nd_g]); nd_g++; + DETECT_I(int_fast64_t, INT_FAST64, d_g[nd_g]); nd_g++; #endif #if H5_SIZEOF_UINT_FAST64_T>0 - DETECT_I(uint_fast64_t, UINT_FAST64, d_g[nd_g]); nd_g++; + DETECT_I(uint_fast64_t, UINT_FAST64, d_g[nd_g]); nd_g++; #endif #if H5_SIZEOF_LONG_LONG>0 - DETECT_I(long long, LLONG, d_g[nd_g]); nd_g++; + DETECT_I(long long, LLONG, d_g[nd_g]); nd_g++; DETECT_I(unsigned long long, ULLONG, d_g[nd_g]); nd_g++; #else /* @@ -1569,28 +1579,28 @@ detect_C99_integers64(void) * so we'll just make H5T_NATIVE_LLONG the same as H5T_NATIVE_LONG since * `long long' is probably equivalent to `long' here anyway. */ - DETECT_I(long, LLONG, d_g[nd_g]); nd_g++; - DETECT_I(unsigned long, ULLONG, d_g[nd_g]); nd_g++; + DETECT_I(long, LLONG, d_g[nd_g]); nd_g++; + DETECT_I(unsigned long, ULLONG, d_g[nd_g]); nd_g++; #endif } - + /*------------------------------------------------------------------------- - * Function: detect_C99_integers + * Function: detect_C99_integers * - * Purpose: Detect C99 integer types + * Purpose: Detect C99 integer types * - * Return: void + * Return: void * - * Programmer: Albert Cheng - * 2004/05/20 + * Programmer: Albert Cheng + * 2004/05/20 * * Modifications: * *------------------------------------------------------------------------- */ static void -detect_C99_integers(void) +detect_C99_integers(void) HDF_NO_UBSAN { /* break it down to more subroutines so that each module subroutine */ /* is smaller and takes less time to compile with optimization on. */ @@ -1600,23 +1610,23 @@ detect_C99_integers(void) detect_C99_integers64(); } - + /*------------------------------------------------------------------------- - * Function: detect_C99_floats + * Function: detect_C99_floats * - * Purpose: Detect C99 floating point types + * Purpose: Detect C99 floating point types * - * Return: void + * Return: void * - * Programmer: Albert Cheng - * 2004/05/20 + * Programmer: Albert Cheng + * 2004/05/20 * * Modifications: * *------------------------------------------------------------------------- */ static void -detect_C99_floats(void) +detect_C99_floats(void) HDF_NO_UBSAN { #if H5_SIZEOF_DOUBLE == H5_SIZEOF_LONG_DOUBLE /* @@ -1625,29 +1635,29 @@ detect_C99_floats(void) * some systems and `long double' is probably the same as `double' here * anyway. */ - DETECT_F(double, LDOUBLE, d_g[nd_g]); nd_g++; + DETECT_F(double, LDOUBLE, d_g[nd_g]); nd_g++; #elif H5_SIZEOF_LONG_DOUBLE !=0 - DETECT_F(long double, LDOUBLE, d_g[nd_g]); nd_g++; + DETECT_F(long double, LDOUBLE, d_g[nd_g]); nd_g++; #endif } - + /*------------------------------------------------------------------------- - * Function: detect_alignments + * Function: detect_alignments * - * Purpose: Detect structure alignments + * Purpose: Detect structure alignments * - * Return: void + * Return: void * - * Programmer: Albert Cheng - * 2004/05/20 + * Programmer: Albert Cheng + * 2004/05/20 * * Modifications: * *------------------------------------------------------------------------- */ static void -detect_alignments(void) +detect_alignments(void) HDF_NO_UBSAN { /* Detect structure alignment for pointers, hvl_t, hobj_ref_t, hdset_reg_ref_t */ DETECT_M(void *, POINTER, m_g[na_g]); na_g++; @@ -1656,7 +1666,7 @@ detect_alignments(void) DETECT_M(hdset_reg_ref_t, HDSETREGREF, m_g[na_g]); na_g++; } - + #if defined(H5SETJMP) && defined(H5_HAVE_SIGNAL) /* Verify the signal handler for signal signum works correctly multiple times. * One possible cause of failure is that the signal handling is blocked or @@ -1664,64 +1674,70 @@ detect_alignments(void) * Return 0 for success, -1 for failure. */ static int verify_signal_handlers(int signum, void (*handler)(int)) -{ - void (*save_handler)(int) = HDsignal(signum, handler); +{ +#if defined(__has_feature) +#if __has_feature(address_sanitizer) || __has_feature(thread_sanitizer) + /* Under the address and thread sanitizers, don't raise any signals. */ + return 0; +#endif +#endif + void (*save_handler)(int) = HDsignal(signum, handler); volatile int i, val; int ntries=5; volatile int nfailures=0; volatile int nsuccesses=0; - - for (i=0;i0 || nsuccesses != ntries){ - fprintf(stderr, "verify_signal_handlers for signal %d did %d tries. " - "Found %d failures and %d successes\n", - signum, ntries, nfailures, nsuccesses); - return(-1); + fprintf(stderr, "verify_signal_handlers for signal %d did %d tries. " + "Found %d failures and %d successes\n", + signum, ntries, nfailures, nsuccesses); + return(-1); }else{ - /* all succeeded */ - return(0); + /* all succeeded */ + return(0); } -} +} #endif - + /*------------------------------------------------------------------------- - * Function: main + * Function: main * - * Purpose: Main entry point. + * Purpose: Main entry point. * - * Return: Success: exit(0) + * Return: Success: exit(0) * - * Failure: exit(1) + * Failure: exit(1) * - * Programmer: Robb Matzke - * matzke@llnl.gov - * Jun 12, 1996 + * Programmer: Robb Matzke + * matzke@llnl.gov + * Jun 12, 1996 * * Modifications: - * Albert Cheng, 2004/05/20 - * Some compilers, e.g., Intel C v7.0, took a long time to compile + * Albert Cheng, 2004/05/20 + * Some compilers, e.g., Intel C v7.0, took a long time to compile * with optimization when a module routine contains many code lines. * Divide up all those types detections macros into subroutines, both * to avoid the compiler optimization error and cleaner codes. @@ -1729,7 +1745,7 @@ static int verify_signal_handlers(int signum, void (*handler)(int)) *------------------------------------------------------------------------- */ int -main(void) +main(void) HDF_NO_UBSAN { #if defined(H5_HAVE_SETSYSINFO) && defined(SSI_NVPAIRS) @@ -1738,12 +1754,12 @@ main(void) * Make sure unaligned access generates SIGBUS and doesn't print warning * messages so that we can detect alignment constraints on the DEC Alpha. */ - int nvpairs[2]; + int nvpairs[2]; nvpairs[0] = SSIN_UACPROC; nvpairs[1] = UAC_NOPRINT | UAC_SIGBUS; if (setsysinfo(SSI_NVPAIRS, nvpairs, 1, 0, 0)<0) { - fprintf(stderr, "H5detect: unable to turn off UAC handling: %s\n", - HDstrerror(errno)); + fprintf(stderr, "H5detect: unable to turn off UAC handling: %s\n", + HDstrerror(errno)); } #endif #endif -- cgit v0.12 From 20ee50c5b92e61169f83738740508605246a522f Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Mon, 5 Feb 2018 12:48:01 -0600 Subject: HDFFV-10345 splelling and whitespace corrections --- fortran/src/H5Df.c | 10 ++-- fortran/src/H5Gf.c | 42 +++++++------- fortran/src/H5Pf.c | 10 ++-- fortran/src/H5Pff.F90 | 2 +- fortran/src/H5Rff.F90 | 66 +++++++++++----------- hl/fortran/src/H5LTf90proto.h | 4 +- hl/fortran/src/H5TBfc.c | 6 +- hl/test/test_ds.c | 8 +-- src/H5Zscaleoffset.c | 112 +++++++++++++++++++------------------- src/H5detect.c | 4 +- tools/src/h5import/h5import.c | 4 +- tools/test/h5copy/h5copygentest.c | 2 +- 12 files changed, 135 insertions(+), 135 deletions(-) diff --git a/fortran/src/H5Df.c b/fortran/src/H5Df.c index 588ea9f..14fac6b 100644 --- a/fortran/src/H5Df.c +++ b/fortran/src/H5Df.c @@ -567,7 +567,7 @@ DONE: * dims - one-demnsional array of size 2 * dims[0] = MAXLENGTH * dims[1] = number of elements of VL type - * len - array element lenghts + * len - array element lengths * RETURNS * 0 on success, -1 on failure * AUTHOR @@ -641,7 +641,7 @@ DONE: * dims[1] = number of elements of VL type * OUTPUTS * buf - data buffer - * len - array element lenghts + * len - array element lengths * RETURNS * 0 on success, -1 on failure * AUTHOR @@ -882,7 +882,7 @@ h5dread_vl_string_c( hid_t_f *dset_id , hid_t_f *mem_type_id, hid_t_f *mem_spac * dims - one-demnsional array of size 2 * dims[0] = MAXLENGTH * dims[1] = number of elements of VL type - * len - array element lenghts + * len - array element lengths * RETURNS * 0 on success, -1 on failure * AUTHOR @@ -956,7 +956,7 @@ DONE: * dims[1] = number of elements of VL type * OUTPUTS * buf - data buffer - * len - array element lenghts + * len - array element lengths * RETURNS * 0 on success, -1 on failure * AUTHOR @@ -1209,7 +1209,7 @@ h5dwrite_f_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, * dims[1] = number of elements of VL type * OUTPUTS * buf - data buffer - * len - array element lenghts + * len - array element lengths * RETURNS * 0 on success, -1 on failure * AUTHOR diff --git a/fortran/src/H5Gf.c b/fortran/src/H5Gf.c index 720bd49..b829b20 100644 --- a/fortran/src/H5Gf.c +++ b/fortran/src/H5Gf.c @@ -47,7 +47,7 @@ */ int_f h5gcreate_c(hid_t_f *loc_id, _fcd name, int_f *namelen, size_t_f *size_hint, - hid_t_f *grp_id, hid_t_f *lcpl_id, hid_t_f *gcpl_id, hid_t_f *gapl_id ) + hid_t_f *grp_id, hid_t_f *lcpl_id, hid_t_f *gcpl_id, hid_t_f *gapl_id ) /******/ { hid_t c_gcpl_id = -1; /* Group creation property list */ @@ -69,11 +69,11 @@ h5gcreate_c(hid_t_f *loc_id, _fcd name, int_f *namelen, size_t_f *size_hint, else { /* Create the group creation property list */ if((c_gcpl_id = H5Pcreate(H5P_GROUP_CREATE)) < 0) - goto DONE; + goto DONE; /* Set the local heap size hint */ if(H5Pset_local_heap_size_hint(c_gcpl_id, (size_t)*size_hint) < 0) - goto DONE; + goto DONE; /* Create the group */ c_grp_id = H5Gcreate2((hid_t)*loc_id, c_name, H5P_DEFAULT, c_gcpl_id, H5P_DEFAULT); @@ -308,9 +308,9 @@ h5gclose_c(hid_t_f *grp_id) * link_type - link type * current_name - name of the existing object for hard link, * anything for the soft link - * current_namelen - current name lenghth + * current_namelen - current name length * new_name - new name for the object - * new_namelen - new_name lenghth + * new_namelen - new_name length * RETURNS * 0 on success, -1 on failure * AUTHOR @@ -365,7 +365,7 @@ h5glink_c(hid_t_f *loc_id, int_f *link_type, _fcd current_name, goto DONE; break; /* End of the warnings fix */ - + default: /* Unknown/unhandled link type */ goto DONE; } /* end switch */ @@ -390,12 +390,12 @@ DONE: * cur_name - name of the existing object for hard link releative * to cur_loc_id location, * anything for the soft link - * current_namelen - current name lenghth + * current_namelen - current name length * link_type - link type * new_loc_id - location identifier * new_name - new name for the object releative to the new_loc_id * location - * new_namelen - new_name lenghth + * new_namelen - new_name length * RETURNS * 0 on success, -1 on failure * AUTHOR @@ -515,9 +515,9 @@ DONE: * INPUTS * loc_id - identifier of file or group * src_name - name of the original object - * src_namelen - original name lenghth + * src_namelen - original name length * dst_name - new name for the object - * dst_namelen - new name lenghth + * dst_namelen - new name length * RETURNS * 0 on success, -1 on failure * AUTHOR @@ -565,10 +565,10 @@ DONE: * INPUTS * src_loc_id - identifier of file or group * src_name - name of the original object relative to src_loc_id - * src_namelen - original name lenghth + * src_namelen - original name length * dst_loc_id - new location identifier * dst_name - new name for the object relative to dst_loc_id - * dst_namelen - new name lenghth + * dst_namelen - new name length * RETURNS * 0 on success, -1 on failure * AUTHOR @@ -617,8 +617,8 @@ DONE: * INPUTS * loc_id - identifier of file or group * name - name of the object that symbolic link points to - * namelen - the name lenghth - * size - lenghth of retrurned value + * namelen - the name length + * size - length of retrurned value * OUTPUTS * value - name to be returned * RETURNS @@ -681,9 +681,9 @@ DONE: * INPUTS * loc_id - identifier of file or group * name - name of object whose comment is to be set or reset - * namelen - the name lenghth + * namelen - the name length * comment - the new comment - * commentlen - new comment lenghth + * commentlen - new comment length * RETURNS * 0 on success, -1 on failure * AUTHOR @@ -732,7 +732,7 @@ DONE: * INPUTS * loc_id - identifier of file or group * name - name of object whose comment is to be set or reset - * namelen - the name lenghth + * namelen - the name length * bufsize - at most bufsize characters * comment - the new comment * RETURNS @@ -948,8 +948,8 @@ done: */ int_f h5gget_info_by_idx_c(hid_t_f *loc_id, _fcd group_name, size_t_f *group_namelen, - int_f *index_type, int_f *order, hsize_t_f *n, hid_t_f *lapl_id, - int_f *storage_type, int_f *nlinks, int_f *max_corder, int_f *mounted ) + int_f *index_type, int_f *order, hsize_t_f *n, hid_t_f *lapl_id, + int_f *storage_type, int_f *nlinks, int_f *max_corder, int_f *mounted ) /******/ { char *c_group_name = NULL; /* Buffer to hold group name C string */ @@ -965,7 +965,7 @@ h5gget_info_by_idx_c(hid_t_f *loc_id, _fcd group_name, size_t_f *group_namelen, * Call H5Gget_info_by_idx function. */ if(H5Gget_info_by_idx((hid_t)*loc_id,c_group_name, (H5_index_t)*index_type,(H5_iter_order_t)*order,(hsize_t)*n, - &ginfo, (hid_t)*lapl_id) < 0) + &ginfo, (hid_t)*lapl_id) < 0) HGOTO_DONE(FAIL); /* Unpack the structure */ @@ -1018,7 +1018,7 @@ h5gget_info_by_idx_c(hid_t_f *loc_id, _fcd group_name, size_t_f *group_namelen, */ int_f h5gget_info_by_name_c(hid_t_f *loc_id, _fcd group_name, size_t_f *group_namelen, hid_t_f *lapl_id, - int_f *storage_type, int_f *nlinks, int_f *max_corder, int_f *mounted) + int_f *storage_type, int_f *nlinks, int_f *max_corder, int_f *mounted) /******/ { char *c_group_name = NULL; /* Buffer to hold group name C string */ diff --git a/fortran/src/H5Pf.c b/fortran/src/H5Pf.c index a114e8b..9fdd19b 100644 --- a/fortran/src/H5Pf.c +++ b/fortran/src/H5Pf.c @@ -2638,7 +2638,7 @@ h5pget_hyper_vector_size_c ( hid_t_f *prp_id , size_t_f *size) * INPUTS * parent - property list class identifier * name - name of the new class - * name_len - lenght of the "name" buffer + * name_len - length of the "name" buffer * OUTPUTS * class - new class identifier * RETURNS @@ -3415,8 +3415,8 @@ h5pset_family_offset_c ( hid_t_f *prp_id , hsize_t_f *offset) * mem_map - memory mapping array * memb_fapl - property list for each memory usage type * memb_name - array with members names - * len - array with the lenght of each name - * lenmax - lenght of the name a sdeclared in Fortran + * len - array with the length of each name + * lenmax - length of the name a sdeclared in Fortran * flag - flag allowing partila access when one of the files is missing * RETURNS * 0 on success, -1 on failure @@ -3537,12 +3537,12 @@ h5pset_fapl_multi_sc ( hid_t_f *prp_id , int_f *flag) * Call H5Pget_fapl_multi to set multi file dirver * INPUTS * prp_id - file_creation property list identifier - * lenmax - lenght of the name a sdeclared in Fortran + * lenmax - length of the name a sdeclared in Fortran * OUTPUTS * memb_map - memory mapping array * memb_fapl - property list for each memory usage type * memb_name - array with members names - * len - array with the lenght of each name + * len - array with the length of each name * flag - flag allowing partila access when one of the files is missing * RETURNS * 0 on success, -1 on failure diff --git a/fortran/src/H5Pff.F90 b/fortran/src/H5Pff.F90 index b69d4d0..178aa80 100644 --- a/fortran/src/H5Pff.F90 +++ b/fortran/src/H5Pff.F90 @@ -5313,7 +5313,7 @@ CONTAINS ! ! expression - buffer to hold transform expression ! hdferr - Error code -! Success: Actual lenght of the expression +! Success: Actual length of the expression ! If provided buffer "expression" is ! smaller, than expression will be ! truncated to fit into diff --git a/fortran/src/H5Rff.F90 b/fortran/src/H5Rff.F90 index 6d6371b..f5a9c6e 100644 --- a/fortran/src/H5Rff.F90 +++ b/fortran/src/H5Rff.F90 @@ -38,7 +38,7 @@ ! !***** -MODULE H5R +MODULE H5R USE, INTRINSIC :: ISO_C_BINDING, ONLY : C_PTR, C_CHAR, C_SIGNED_CHAR USE H5GLOBAL @@ -62,7 +62,7 @@ MODULE H5R END INTERFACE - TYPE :: hdset_reg_ref_t_f03 + TYPE :: hdset_reg_ref_t_f03 INTEGER(C_SIGNED_CHAR), DIMENSION(1:H5R_DSET_REG_REF_BUF_SIZE_F) :: ref END TYPE hdset_reg_ref_t_f03 @@ -165,16 +165,16 @@ CONTAINS ! Retrieves the type of object that an object reference points to. ! ! INPUTS -! dset_id - identifier of the dataset containing +! dset_id - identifier of the dataset containing ! reference to the objects -! ref - reference to open +! ref - reference to open ! OUTPUTS -! obj_type - object_type, possible values: +! obj_type - object_type, possible values: ! H5G_UNKNOWN_F -! H5G_GROUP_F +! H5G_GROUP_F ! H5G_DATASET_F ! H5G_TYPE_F -! hdferr - Returns 0 if successful and -1 if fails +! hdferr - Returns 0 if successful and -1 if fails ! ! AUTHOR ! Elena Pourmal @@ -227,17 +227,17 @@ CONTAINS ! Retrieves a dataspace with the specified region selected ! ! INPUTS -! dset_id - identifier of the dataset containing +! dset_id - identifier of the dataset containing ! reference to the regions -! ref - reference to open +! ref - reference to open ! OUTPUTS -! space_id - dataspace identifier -! hdferr - Returns 0 if successful and -1 if fails +! space_id - dataspace identifier +! hdferr - Returns 0 if successful and -1 if fails ! AUTHOR ! Elena Pourmal ! August 12, 1999 ! -! HISTORY +! HISTORY ! Explicit Fortran interfaces were added for ! called C functions (it is needed for Windows ! port). February 28, 2001 @@ -276,16 +276,16 @@ CONTAINS ! h5rget_region_ptr_f ! ! PURPOSE -! Retrieves a dataspace with the specified region +! Retrieves a dataspace with the specified region ! selected using pointer ! ! INPUTS -! dset_id - identifier of the dataset containing +! dset_id - identifier of the dataset containing ! reference to the regions -! ref - reference to open +! ref - reference to open ! OUTPUTS -! space_id - dataspace identifier -! hdferr - Returns 0 if successful and -1 if fails +! space_id - dataspace identifier +! hdferr - Returns 0 if successful and -1 if fails ! AUTHOR ! M. Scot Breitenfeld ! August 4, 2012 @@ -319,7 +319,7 @@ CONTAINS ! loc_id - location identifier ! name - name of the object at the specified location ! Outputs: -! ref - reference to the specified object +! ref - reference to the specified object ! hdferr - returns 0 if successful and -1 if fails ! AUTHOR ! Elena Pourmal @@ -363,11 +363,11 @@ CONTAINS ! Creates reference to the dataset region ! ! INPUTS -! loc_id - location identifier -! name - name of the dataset at the specified location -! space_id - dataspace identifier that describes selected region +! loc_id - location identifier +! name - name of the dataset at the specified location +! space_id - dataspace identifier that describes selected region ! OUTPUTS -! ref - reference to the dataset region +! ref - reference to the dataset region ! hdferr - returns 0 if successful and -1 if fails ! AUTHOR ! Elena Pourmal @@ -424,12 +424,12 @@ CONTAINS ! ! Inputs: ! loc_id - location identifier -! name - name of the dataset at the specified location +! name - name of the dataset at the specified location ! ref_type - type of reference: ! H5R_OBJECT ! H5T_STD_REF_DSETREG ! Outputs: -! ref - reference created by the function call. +! ref - reference created by the function call. ! hdferr - returns 0 if successful and -1 if fails. ! OPTIONAL ! space_id - dataspace identifier that describes selected region @@ -474,7 +474,7 @@ CONTAINS ! Inputs: ! dset_id - identifier of the dataset containing ! reference -! ref - reference to open +! ref - reference to open ! Outputs: ! obj_id - object_identifier ! hdferr - returns 0 if successful and -1 if fails @@ -515,8 +515,8 @@ CONTAINS ! ! Inputs: ! dset_id - identifier of the dataset containing -! reference to teh regions -! ref - reference to open +! reference to the regions +! ref - reference to open ! Outputs: ! obj_id - dataspace identifier ! hdferr - returns 0 if successful and -1 if fails @@ -585,7 +585,7 @@ CONTAINS INTEGER(HID_T), INTENT(OUT) :: ref_obj_id ! Identifier of referenced object INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** +!***** hdferr = h5rdereference_ptr_c(obj_id, ref_type, ref, ref_obj_id) END SUBROUTINE h5rdereference_ptr_f @@ -600,14 +600,14 @@ CONTAINS ! ! Inputs: ! loc_id - Identifier for the file containing the reference or for any object in that file. -! ref - An object or dataset region reference. +! ref - An object or dataset region reference. ! ! Outputs: ! name - A name associated with the referenced object or dataset region. ! hdferr - Returns 0 if successful and -1 if fails. ! ! Optional parameters: -! size - The size of the name buffer, returning 0 (zero) if no name is associated +! size - The size of the name buffer, returning 0 (zero) if no name is associated ! with the identifier. ! ! AUTHOR @@ -648,7 +648,7 @@ CONTAINS ! ! Inputs: ! loc_id - Identifier for the file containing the reference or for any object in that file. -! ref - An object or dataset region reference. +! ref - An object or dataset region reference. ! ! Outputs: ! name - A name associated with the referenced object or dataset region. @@ -747,12 +747,12 @@ CONTAINS ! ref - Reference to query. ! ! Outputs: - ! obj_type - Type of referenced object. + ! obj_type - Type of referenced object. ! H5G_UNKNOWN_F ! H5G_GROUP_F ! H5G_DATASET_F ! H5G_TYPE_F - ! + ! ! hdferr - Returns 0 if successful and -1 if fails. ! ! AUTHOR diff --git a/hl/fortran/src/H5LTf90proto.h b/hl/fortran/src/H5LTf90proto.h index 35b08a1..031db2c 100644 --- a/hl/fortran/src/H5LTf90proto.h +++ b/hl/fortran/src/H5LTf90proto.h @@ -303,7 +303,7 @@ h5tbmake_table_c(size_t_f *namelen1, hid_t_f *field_types, hsize_t_f *chunk_size, int_f *compress, - size_t_f *char_len_field_names, /* field_names lenghts */ + size_t_f *char_len_field_names, /* field_names lengths */ size_t_f *max_char_size_field_names, /* char len of fields */ _fcd buf); /* field_names */ @@ -334,7 +334,7 @@ h5tbmake_table_ptr_c(size_t_f *namelen1, hsize_t_f *chunk_size, void *fill_data, int_f *compress, - size_t_f *char_len_field_names, /* field_names lenghts */ + size_t_f *char_len_field_names, /* field_names lengths */ size_t_f *max_char_size_field_names, /* char len of fields */ char *field_names, /* field_names */ void *data); diff --git a/hl/fortran/src/H5TBfc.c b/hl/fortran/src/H5TBfc.c index c0d053f..331f0bc 100644 --- a/hl/fortran/src/H5TBfc.c +++ b/hl/fortran/src/H5TBfc.c @@ -38,7 +38,7 @@ int_f h5tbmake_table_c(size_t_f *namelen1, _fcd name1, hid_t_f *loc_id, size_t_f *namelen, _fcd name, hsize_t_f *nfields, hsize_t_f *nrecords, size_t_f *type_size, size_t_f *field_offset, hid_t_f *field_types, hsize_t_f *chunk_size, int_f *compress, - size_t_f *char_len_field_names, /* field_names lenghts */ + size_t_f *char_len_field_names, /* field_names lengths */ size_t_f *max_char_size_field_names, /* char len of fields */ char *field_names) /* field_names */ { @@ -143,7 +143,7 @@ h5tbmake_table_ptr_c(size_t_f *namelen1, _fcd name1, hid_t_f *loc_id, size_t_f * _fcd name, hsize_t_f *nfields, hsize_t_f *nrecords, size_t_f *type_size, size_t_f *field_offset, hid_t_f *field_types, hsize_t_f *chunk_size, void *fill_data, int_f *compress, - size_t_f *char_len_field_names, /* field_names lenghts */ + size_t_f *char_len_field_names, /* field_names lengths */ size_t_f *max_char_size_field_names, /* char len of fields */ char *field_names, void *data) /* field_names */ @@ -638,7 +638,7 @@ done: int_f h5tbget_field_info_c(hid_t_f *loc_id, size_t_f *namelen, _fcd name, hsize_t_f *nfields, size_t_f *field_sizes, size_t_f *field_offsets, size_t_f *type_size, - size_t_f *namelen2, /* field_names lenghts */ + size_t_f *namelen2, /* field_names lengths */ size_t_f *lenmax, /* character len max */ _fcd field_names, /* field_names */ size_t_f *maxlen_out) diff --git a/hl/test/test_ds.c b/hl/test/test_ds.c index 91f1505..49dc72f 100644 --- a/hl/test/test_ds.c +++ b/hl/test/test_ds.c @@ -3080,7 +3080,7 @@ static int test_simple(void) /*------------------------------------------------------------------------- - * get the label using a static buffer smaller than the string lenght + * get the label using a static buffer smaller than the string length *------------------------------------------------------------------------- */ @@ -3118,7 +3118,7 @@ static int test_simple(void) *------------------------------------------------------------------------- */ - /* get the lenght of the scale name (pass NULL in name) */ + /* get the length of the scale name (pass NULL in name) */ if((name_len=H5DSget_scale_name(dsid,NULL,(size_t)0)) < 0) goto out; @@ -3151,7 +3151,7 @@ static int test_simple(void) goto out; /*------------------------------------------------------------------------- - * get the scale name using a static buffer smaller than the string lenght + * get the scale name using a static buffer smaller than the string length *------------------------------------------------------------------------- */ @@ -4925,7 +4925,7 @@ static int test_errors2(void) hsize_t dimd[2] = {3,3}; /* size of data dataset */ hsize_t dims[1] = {3}; /* size of scale dataset */ char lbuf[255]; /* label buffer */ - ssize_t label_len; /* label lenght */ + ssize_t label_len; /* label length */ int scale_idx; /* scale index */ int nscales; /* number of scales in DIM */ int count; /* visitor data */ diff --git a/src/H5Zscaleoffset.c b/src/H5Zscaleoffset.c index b86d785..58bcf8b 100644 --- a/src/H5Zscaleoffset.c +++ b/src/H5Zscaleoffset.c @@ -13,16 +13,16 @@ #include "H5Zmodule.h" /* This source code file is part of the H5Z module */ -#include "H5private.h" /* Generic Functions */ -#include "H5ACprivate.h" /* Metadata cache */ -#include "H5Eprivate.h" /* Error handling */ -#include "H5Iprivate.h" /* IDs */ -#include "H5MMprivate.h" /* Memory management */ +#include "H5private.h" /* Generic Functions */ +#include "H5ACprivate.h" /* Metadata cache */ +#include "H5Eprivate.h" /* Error handling */ +#include "H5Iprivate.h" /* IDs */ +#include "H5MMprivate.h" /* Memory management */ #include "H5Pprivate.h" /* Property lists */ #include "H5Oprivate.h" /* Object headers */ -#include "H5Sprivate.h" /* Dataspaces */ -#include "H5Tprivate.h" /* Datatypes */ -#include "H5Zpkg.h" /* Data filters */ +#include "H5Sprivate.h" /* Dataspaces */ +#include "H5Tprivate.h" /* Datatypes */ +#include "H5Zpkg.h" /* Data filters */ /* Struct of parameters needed for compressing/decompressing one atomic datatype */ typedef struct { @@ -78,13 +78,13 @@ static void H5Z_scaleoffset_compress(unsigned char *data, unsigned d_nelmts, uns /* This message derives from H5Z */ H5Z_class2_t H5Z_SCALEOFFSET[1] = {{ H5Z_CLASS_T_VERS, /* H5Z_class_t version */ - H5Z_FILTER_SCALEOFFSET, /* Filter id number */ + H5Z_FILTER_SCALEOFFSET, /* Filter id number */ 1, /* Assume encoder present: check before registering */ 1, /* decoder_present flag (set to true) */ - "scaleoffset", /* Filter name for debugging */ - H5Z_can_apply_scaleoffset, /* The "can apply" callback */ + "scaleoffset", /* Filter name for debugging */ + H5Z_can_apply_scaleoffset, /* The "can apply" callback */ H5Z_set_local_scaleoffset, /* The "set local" callback */ - H5Z_filter_scaleoffset, /* The actual filter function */ + H5Z_filter_scaleoffset, /* The actual filter function */ }}; /* Local macros */ @@ -665,15 +665,15 @@ H5Z_class2_t H5Z_SCALEOFFSET[1] = {{ H5Z_scaleoffset_modify_4(i, type, pow_fun, buf, d_nelmts, min, D_val) \ } - + /*------------------------------------------------------------------------- - * Function: H5Z_can_apply_scaleoffset + * Function: H5Z_can_apply_scaleoffset * - * Purpose: Check the parameters for scaleoffset compression for + * Purpose: Check the parameters for scaleoffset compression for * validity and whether they fit a particular dataset. * - * Return: Success: Non-negative - * Failure: Negative + * Return: Success: Non-negative + * Failure: Negative * * Programmer: Xiaowen Wu * Friday, February 4, 2005 @@ -685,7 +685,7 @@ H5Z_class2_t H5Z_SCALEOFFSET[1] = {{ static htri_t H5Z_can_apply_scaleoffset(hid_t H5_ATTR_UNUSED dcpl_id, hid_t type_id, hid_t H5_ATTR_UNUSED space_id) { - const H5T_t *type; /* Datatype */ + const H5T_t *type; /* Datatype */ H5T_class_t dtype_class; /* Datatype's class */ H5T_order_t dtype_order; /* Datatype's endianness order */ htri_t ret_value = TRUE; /* Return value */ @@ -694,20 +694,20 @@ H5Z_can_apply_scaleoffset(hid_t H5_ATTR_UNUSED dcpl_id, hid_t type_id, hid_t H5_ /* Get datatype */ if(NULL == (type = (H5T_t *)H5I_object_verify(type_id, H5I_DATATYPE))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a datatype") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a datatype") /* Get datatype's class, for checking the "datatype class" */ if((dtype_class = H5T_get_class(type, TRUE)) == H5T_NO_CLASS) - HGOTO_ERROR(H5E_PLINE, H5E_BADTYPE, FAIL, "bad datatype class") + HGOTO_ERROR(H5E_PLINE, H5E_BADTYPE, FAIL, "bad datatype class") /* Get datatype's size, for checking the "datatype size" */ if(H5T_get_size(type) == 0) - HGOTO_ERROR(H5E_PLINE, H5E_BADTYPE, FAIL, "bad datatype size") + HGOTO_ERROR(H5E_PLINE, H5E_BADTYPE, FAIL, "bad datatype size") if(dtype_class == H5T_INTEGER || dtype_class == H5T_FLOAT) { /* Get datatype's endianness order */ if((dtype_order = H5T_get_order(type)) == H5T_ORDER_ERROR) - HGOTO_ERROR(H5E_PLINE, H5E_BADTYPE, FAIL, "can't retrieve datatype endianness order") + HGOTO_ERROR(H5E_PLINE, H5E_BADTYPE, FAIL, "can't retrieve datatype endianness order") /* Range check datatype's endianness order */ if(dtype_order != H5T_ORDER_LE && dtype_order != H5T_ORDER_BE) @@ -719,17 +719,17 @@ done: FUNC_LEAVE_NOAPI(ret_value) } /* end H5Z_can_apply_scaleoffset() */ - + /*------------------------------------------------------------------------- - * Function: H5Z_scaleoffset_get_type + * Function: H5Z_scaleoffset_get_type * - * Purpose: Get the specific integer type based on datatype size and sign + * Purpose: Get the specific integer type based on datatype size and sign * or floating-point type based on size * - * Return: Success: id number of integer type - * Failure: 0 + * Return: Success: id number of integer type + * Failure: 0 * - * Programmer: Xiaowen Wu + * Programmer: Xiaowen Wu * Wednesday, April 13, 2005 * * Modifications: @@ -784,14 +784,14 @@ done: FUNC_LEAVE_NOAPI(ret_value) } - + /*------------------------------------------------------------------------- - * Function: H5Z_scaleoffset_set_parms_fillval + * Function: H5Z_scaleoffset_set_parms_fillval * - * Purpose: Get the fill value of the dataset and store in cd_values[] + * Purpose: Get the fill value of the dataset and store in cd_values[] * - * Return: Success: Non-negative - * Failure: Negative + * Return: Success: Non-negative + * Failure: Negative * * Programmer: Xiaowen Wu * Monday, March 7, 2005 @@ -836,17 +836,17 @@ done: FUNC_LEAVE_NOAPI(ret_value) } /* end H5Z_scaleoffset_set_parms_fillval() */ - + /*------------------------------------------------------------------------- - * Function: H5Z_set_local_scaleoffset + * Function: H5Z_set_local_scaleoffset * - * Purpose: Set the "local" dataset parameters for scaleoffset + * Purpose: Set the "local" dataset parameters for scaleoffset * compression. * - * Return: Success: Non-negative - * Failure: Negative + * Return: Success: Non-negative + * Failure: Negative * - * Programmer: Xiaowen Wu + * Programmer: Xiaowen Wu * Friday, February 4, 2005 * * Modifications: @@ -857,8 +857,8 @@ static herr_t H5Z_set_local_scaleoffset(hid_t dcpl_id, hid_t type_id, hid_t space_id) { H5P_genplist_t *dcpl_plist; /* Property list pointer */ - H5T_t *type; /* Datatype */ - const H5S_t *ds; /* Dataspace */ + H5T_t *type; /* Datatype */ + const H5S_t *ds; /* Dataspace */ unsigned flags; /* Filter flags */ size_t cd_nelmts = H5Z_SCALEOFFSET_USER_NPARMS; /* Number of filter parameters */ unsigned cd_values[H5Z_SCALEOFFSET_TOTAL_NPARMS]; /* Filter parameters */ @@ -879,14 +879,14 @@ H5Z_set_local_scaleoffset(hid_t dcpl_id, hid_t type_id, hid_t space_id) /* Get datatype */ if(NULL == (type = (H5T_t *)H5I_object_verify(type_id, H5I_DATATYPE))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a datatype") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a datatype") /* Initialize the parameters to a known state */ HDmemset(cd_values, 0, sizeof(cd_values)); /* Get the filter's current parameters */ if(H5P_get_filter_by_id(dcpl_plist, H5Z_FILTER_SCALEOFFSET, &flags, &cd_nelmts, cd_values, (size_t)0, NULL, NULL) < 0) - HGOTO_ERROR(H5E_PLINE, H5E_CANTGET, FAIL, "can't get scaleoffset parameters") + HGOTO_ERROR(H5E_PLINE, H5E_CANTGET, FAIL, "can't get scaleoffset parameters") /* Get dataspace */ if(NULL == (ds = (H5S_t *)H5I_object_verify(space_id, H5I_DATASPACE))) @@ -930,7 +930,7 @@ H5Z_set_local_scaleoffset(hid_t dcpl_id, hid_t type_id, hid_t space_id) /* Get datatype's size */ if((dtype_size = H5T_get_size(type)) == 0) - HGOTO_ERROR(H5E_PLINE, H5E_BADTYPE, FAIL, "bad datatype size") + HGOTO_ERROR(H5E_PLINE, H5E_BADTYPE, FAIL, "bad datatype size") /* Set "local" parameter for datatype size */ H5_CHECK_OVERFLOW(dtype_size, size_t, unsigned); @@ -1008,23 +1008,23 @@ H5Z_set_local_scaleoffset(hid_t dcpl_id, hid_t type_id, hid_t space_id) /* Modify the filter's parameters for this dataset */ if(H5P_modify_filter(dcpl_plist, H5Z_FILTER_SCALEOFFSET, flags, (size_t)H5Z_SCALEOFFSET_TOTAL_NPARMS, cd_values) < 0) - HGOTO_ERROR(H5E_PLINE, H5E_CANTSET, FAIL, "can't set local scaleoffset parameters") + HGOTO_ERROR(H5E_PLINE, H5E_CANTSET, FAIL, "can't set local scaleoffset parameters") done: FUNC_LEAVE_NOAPI(ret_value) } /* end H5Z_set_local_scaleoffset() */ - + /*------------------------------------------------------------------------- - * Function: H5Z_filter_scaleoffset + * Function: H5Z_filter_scaleoffset * - * Purpose: Implement an I/O filter for storing packed integer + * Purpose: Implement an I/O filter for storing packed integer * data using scale and offset method. * - * Return: Success: Size of buffer filtered - * Failure: 0 + * Return: Success: Size of buffer filtered + * Failure: 0 * - * Programmer: Xiaowen Wu + * Programmer: Xiaowen Wu * Monday, February 7, 2005 * * Modifications: @@ -1051,13 +1051,13 @@ H5Z_filter_scaleoffset(unsigned flags, size_t cd_nelmts, const unsigned cd_value unsigned char *outbuf = NULL; /* pointer to new output buffer */ unsigned buf_offset = 21; /* buffer offset because of parameters stored in file */ unsigned i; /* index */ - parms_atomic p; /* paramters needed for compress/decompress functions */ + parms_atomic p; /* parameters needed for compress/decompress functions */ FUNC_ENTER_NOAPI_NOINIT /* check arguments */ if(cd_nelmts != H5Z_SCALEOFFSET_TOTAL_NPARMS) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, 0, "invalid scaleoffset number of paramters") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, 0, "invalid scaleoffset number of parameters") /* Check if memory byte order matches dataset datatype byte order */ switch(H5T_native_order_g) { @@ -1107,7 +1107,7 @@ H5Z_filter_scaleoffset(unsigned flags, size_t cd_nelmts, const unsigned cd_value /* if scale_factor is less than 0 for integer, library will reset it to 0 * in this case, library will calculate the minimum-bits */ - if(scale_factor < 0) scale_factor = 0; + if(scale_factor < 0) scale_factor = 0; } /* fixed-minimum-bits method is not implemented and is forbidden */ @@ -1128,7 +1128,7 @@ H5Z_filter_scaleoffset(unsigned flags, size_t cd_nelmts, const unsigned cd_value minbits = (uint32_t)scale_factor; } - /* prepare paramters to pass to compress/decompress functions */ + /* prepare parameters to pass to compress/decompress functions */ p.size = cd_values[H5Z_SCALEOFFSET_PARM_SIZE]; p.mem_order = H5T_native_order_g; @@ -1310,7 +1310,7 @@ done: * atomic datatype is treated on byte basis */ - + /* change byte order of input buffer either from little-endian to big-endian * or from big-endian to little-endian 2/21/2005 */ diff --git a/src/H5detect.c b/src/H5detect.c index 2cc8366..ff163cf 100644 --- a/src/H5detect.c +++ b/src/H5detect.c @@ -37,7 +37,7 @@ static const char *FileHeader = "\n\ * * Detects machine byte order and floating point * format and generates a C source file (H5Tinit.c) - * to describe those paramters. + * to describe those parameters. * * Assumptions: We have an ANSI compiler. We're on a Unix like * system or configure has detected those Unix @@ -75,7 +75,7 @@ static const char *FileHeader = "\n\ /* Define H5SETJMP/H5LONGJMP depending on if sigsetjmp/siglongjmp are */ /* supported. */ #if defined(H5_HAVE_SIGSETJMP) && defined(H5_HAVE_SIGLONGJMP) -/* Always save blocked signals to be restore by siglongjmp. */ +/* Always save blocked signals to be restored by siglongjmp. */ #define H5JMP_BUF sigjmp_buf #define H5SETJMP(buf) HDsigsetjmp(buf, 1) #define H5LONGJMP(buf, val) HDsiglongjmp(buf, val) diff --git a/tools/src/h5import/h5import.c b/tools/src/h5import/h5import.c index 36a8c21..76e78af 100644 --- a/tools/src/h5import/h5import.c +++ b/tools/src/h5import/h5import.c @@ -1405,7 +1405,7 @@ static int processConfigurationFile(char *infile, struct Input *in) const char *err14a = "COMPRESSION-PARAM keyword appears twice in %s.\n"; const char *err14b = "Error in retrieving the compression parameter from %s.\n"; const char *err15a = "EXTERNAL-STORAGE keyword appears twice in %s.\n"; - const char *err15b = "Error in retrieving the external storage paramters from %s.\n"; + const char *err15b = "Error in retrieving the external storage parameters from %s.\n"; const char *err16a = "MAXIMUM-DIMENSIONS keyword appears twice in %s.\n"; const char *err16b = "MAXIMUM-DIMENSIONS cannot appear before DIMENSION-SIZES are provided.\n"; const char *err16c = "Error in retrieving the maximum dimension sizes from %s.\n"; @@ -3690,7 +3690,7 @@ static int getCompressionParameter(struct Input *in, FILE *strm) { /* currently supports only GZIP */ /* can be extended by adding more values to COMPRESSION-TYPE and */ - /* handling the paramters here by adding more cases */ + /* handling the parameters here by adding more cases */ int ival; const char *err1 = "Unable to get integer value.\n"; diff --git a/tools/test/h5copy/h5copygentest.c b/tools/test/h5copy/h5copygentest.c index 35f9132..9f5d916 100644 --- a/tools/test/h5copy/h5copygentest.c +++ b/tools/test/h5copy/h5copygentest.c @@ -225,7 +225,7 @@ static void gent_compressed(hid_t loc_id) /*------------------------------------------------------------------------- * Function: gent_named_vl * - * Purpose: Generate a variable lenght named datatype for a dataset in + * Purpose: Generate a variable length named datatype for a dataset in LOC_ID * *------------------------------------------------------------------------- -- cgit v0.12 From f1cffac626e3e1ecbee0f55d7a970643b9c6b397 Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Mon, 5 Feb 2018 16:14:52 -0600 Subject: Remove old dependency construct --- CMakeLists.txt | 1 - tools/CMakeLists.txt | 4 +--- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 00ec70a..3c7bb38 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -725,7 +725,6 @@ if (BUILD_TESTING) if (NOT HDF5_EXTERNALLY_CONFIGURED) if (EXISTS "${HDF5_SOURCE_DIR}/test" AND IS_DIRECTORY "${HDF5_SOURCE_DIR}/test") - add_subdirectory (tools/lib) add_subdirectory (test) endif () if (H5_HAVE_PARALLEL) diff --git a/tools/CMakeLists.txt b/tools/CMakeLists.txt index 8d442e0..41a9fdc 100644 --- a/tools/CMakeLists.txt +++ b/tools/CMakeLists.txt @@ -9,9 +9,7 @@ add_definitions (${HDF_EXTRA_C_FLAGS}) # -------------------------------------------------------------------- # If testing was NOT enabled, then we need to build the tools library # -------------------------------------------------------------------- -if (NOT BUILD_TESTING) - add_subdirectory (lib) -endif () +add_subdirectory (lib) #----------------------------------------------------------------------------- # Setup include Directories -- cgit v0.12 From 5b4c5b92d893760acc9b038ca441dcac5e03a816 Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Thu, 8 Feb 2018 15:50:38 -0600 Subject: HDFFV-10403 fix soname --- config/cmake/HDF5Macros.cmake | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/config/cmake/HDF5Macros.cmake b/config/cmake/HDF5Macros.cmake index f08349e..c3dea9a 100644 --- a/config/cmake/HDF5Macros.cmake +++ b/config/cmake/HDF5Macros.cmake @@ -17,12 +17,12 @@ macro (H5_SET_LIB_OPTIONS libtarget libname libtype) if (ARGN) set (PACKAGE_SOVERSION ${ARGN}) else () - set (PACKAGE_SOVERSION ${HDF5_PACKAGE_SOVERSION}) + set (PACKAGE_SOVERSION ${H5_SOVERS_MAJOR}) endif () if (WIN32) set (LIBHDF_VERSION ${HDF5_PACKAGE_VERSION_MAJOR}) else () - set (LIBHDF_VERSION ${HDF5_PACKAGE_VERSION}) + set (LIBHDF_VERSION ${HDF5_PACKAGE_SOVERSION}) endif () set_target_properties (${libtarget} PROPERTIES VERSION ${LIBHDF_VERSION}) if (WIN32) -- cgit v0.12 From fa3a845d49fed1a73fc7e8462d9b81d487124dc8 Mon Sep 17 00:00:00 2001 From: hdftest Date: Sun, 11 Feb 2018 15:54:22 -0600 Subject: Snapshot version 1.10 release 2 (snap9) --- README.txt | 2 +- c++/src/cpp_doc_config | 2 +- config/cmake/scripts/HDF5config.cmake | 2 +- configure.ac | 2 +- release_docs/RELEASE.txt | 2 +- src/H5public.h | 4 ++-- 6 files changed, 7 insertions(+), 7 deletions(-) diff --git a/README.txt b/README.txt index e18f882..ddc905f 100644 --- a/README.txt +++ b/README.txt @@ -1,4 +1,4 @@ -HDF5 version 1.10.2-snap9 currently under development +HDF5 version 1.10.2-snap10 currently under development Please refer to the release_docs/INSTALL file for installation instructions. ------------------------------------------------------------------------------ diff --git a/c++/src/cpp_doc_config b/c++/src/cpp_doc_config index f3bd7c8..be77db7 100644 --- a/c++/src/cpp_doc_config +++ b/c++/src/cpp_doc_config @@ -38,7 +38,7 @@ PROJECT_NAME = "HDF5 C++ API" # could be handy for archiving the generated documentation or if some version # control system is used. -PROJECT_NUMBER = "1.10.2-snap9, currently under development" +PROJECT_NUMBER = "1.10.2-snap10, currently under development" # Using the PROJECT_BRIEF tag one can provide an optional one line description # for a project that appears at the top of each page and should give viewer a diff --git a/config/cmake/scripts/HDF5config.cmake b/config/cmake/scripts/HDF5config.cmake index eefc9a4..15c78bf 100755 --- a/config/cmake/scripts/HDF5config.cmake +++ b/config/cmake/scripts/HDF5config.cmake @@ -35,7 +35,7 @@ cmake_minimum_required (VERSION 3.2.2 FATAL_ERROR) ############################################################################## set (CTEST_SOURCE_VERSION "1.10.2") -set (CTEST_SOURCE_VERSEXT "-snap9") +set (CTEST_SOURCE_VERSEXT "-snap10") ############################################################################## # handle input parameters to script. diff --git a/configure.ac b/configure.ac index 5fbb4a9..c60db0d 100644 --- a/configure.ac +++ b/configure.ac @@ -24,7 +24,7 @@ AC_PREREQ([2.69]) ## NOTE: Do not forget to change the version number here when we do a ## release!!! ## -AC_INIT([HDF5], [1.10.2-snap9], [help@hdfgroup.org]) +AC_INIT([HDF5], [1.10.2-snap10], [help@hdfgroup.org]) AC_CONFIG_SRCDIR([src/H5.c]) AC_CONFIG_HEADERS([src/H5config.h]) diff --git a/release_docs/RELEASE.txt b/release_docs/RELEASE.txt index 1e83a8e..4a0be05 100644 --- a/release_docs/RELEASE.txt +++ b/release_docs/RELEASE.txt @@ -1,4 +1,4 @@ -HDF5 version 1.10.2-snap9 currently under development +HDF5 version 1.10.2-snap10 currently under development ================================================================================ diff --git a/src/H5public.h b/src/H5public.h index 76adcc7..29c5ec1 100644 --- a/src/H5public.h +++ b/src/H5public.h @@ -94,9 +94,9 @@ extern "C" { #define H5_VERS_MAJOR 1 /* For major interface/format changes */ #define H5_VERS_MINOR 10 /* For minor interface/format changes */ #define H5_VERS_RELEASE 2 /* For tweaks, bug-fixes, or development */ -#define H5_VERS_SUBRELEASE "snap9" /* For pre-releases like snap0 */ +#define H5_VERS_SUBRELEASE "snap10" /* For pre-releases like snap0 */ /* Empty string for real releases. */ -#define H5_VERS_INFO "HDF5 library version: 1.10.2-snap9" /* Full version string */ +#define H5_VERS_INFO "HDF5 library version: 1.10.2-snap10" /* Full version string */ #define H5check() H5check_version(H5_VERS_MAJOR,H5_VERS_MINOR, \ H5_VERS_RELEASE) -- cgit v0.12 From fc875eb5b76542f1765cee0ba8450c6e7b84ed04 Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Fri, 16 Feb 2018 09:25:51 -0600 Subject: HDFFV-10384 and includes cleanup merged from devlop --- release_docs/RELEASE.txt | 12 ++++++++ test/chunk_info.c | 1 - test/dangle.c | 3 +- test/gen_cross.c | 1 - test/gheap.c | 2 -- test/h5test.h | 5 ++++ test/hyperslab.c | 2 -- test/istore.c | 4 +-- test/swmr.c | 1 - test/tarray.c | 2 -- test/tattr.c | 2 -- test/tconfig.c | 1 - test/testhdf5.h | 27 +++++++----------- test/tfile.c | 1 - test/tgenprop.c | 2 +- test/th5s.c | 1 - test/tid.c | 1 - test/titerate.c | 2 -- test/tmisc.c | 1 - test/trefer.c | 2 -- test/ttime.c | 2 -- test/ttsafe.h | 3 -- test/tvlstr.c | 2 -- test/tvltypes.c | 1 - testpar/t_bigio.c | 2 +- testpar/t_cache.c | 1 - testpar/t_cache_image.c | 3 +- testpar/t_pflush1.c | 1 - testpar/t_pread.c | 1 - testpar/t_shapesame.c | 2 -- testpar/t_span_tree.c | 2 -- tools/lib/h5tools.c | 22 +++++++++++---- tools/lib/h5tools.h | 2 +- tools/src/h5copy/h5copy.c | 4 +-- tools/src/h5diff/h5diff_common.c | 2 +- tools/src/h5diff/h5diff_main.c | 2 +- tools/src/h5dump/h5dump.c | 33 ++++++++++++---------- tools/src/h5repack/h5repack_main.c | 4 +-- tools/test/perform/pio_perf.h | 25 ++++++++-------- tools/test/perform/sio_perf.h | 1 - tools/testfiles/h5dump-help.txt | 4 +-- .../pbits/tnofilename-with-packed-bits.ddl | 4 +-- tools/testfiles/pbits/tpbitsIncomplete.ddl | 4 +-- tools/testfiles/pbits/tpbitsLengthExceeded.ddl | 4 +-- tools/testfiles/pbits/tpbitsLengthPositive.ddl | 4 +-- tools/testfiles/pbits/tpbitsMaxExceeded.ddl | 4 +-- tools/testfiles/pbits/tpbitsOffsetExceeded.ddl | 4 +-- tools/testfiles/pbits/tpbitsOffsetNegative.ddl | 4 +-- 48 files changed, 102 insertions(+), 118 deletions(-) diff --git a/release_docs/RELEASE.txt b/release_docs/RELEASE.txt index 4a0be05..0f32cbe 100644 --- a/release_docs/RELEASE.txt +++ b/release_docs/RELEASE.txt @@ -520,6 +520,18 @@ Bug Fixes since HDF5-1.10.1 release ----- - h5dump + the tools library will hide the error stack during file open. + + While this is preferable almost always, there are reasons to enable + display of the error stack when a tool will not open a file. Adding an + optional argument to the --enable-error-stack will provide this use case. + As an optional argument it will not affect the operation of the + --enable-error-stack. h5dump is the only tool to implement this change. + + (ADB - 2018/02/15, HDFFV-10384) + + - h5dump + h5dump would output an indented blank line in the filters section. h5dump overused the h5tools_simple_prefix function, which is a diff --git a/test/chunk_info.c b/test/chunk_info.c index 1f19963..e3006cc 100644 --- a/test/chunk_info.c +++ b/test/chunk_info.c @@ -21,7 +21,6 @@ */ -#include "hdf5.h" #include "h5test.h" #define PRINT_DATA diff --git a/test/dangle.c b/test/dangle.c index 1717d12..62b1d1b 100644 --- a/test/dangle.c +++ b/test/dangle.c @@ -15,10 +15,9 @@ * Programmer: Quincey Koziol * Tuesday, May 13, 2003 * - * Purpose: Test dangling IDs + * Purpose: Test dangling IDs */ #include "h5test.h" -#include "H5private.h" const char *FILENAME[] = { "dangle", diff --git a/test/gen_cross.c b/test/gen_cross.c index cf3fc35..60ae319 100644 --- a/test/gen_cross.c +++ b/test/gen_cross.c @@ -26,7 +26,6 @@ * worth keeping around for now. */ -#include #include "h5test.h" #define H5FILE_NAME "data.h5" diff --git a/test/gheap.c b/test/gheap.c index 7564afa..c354366 100644 --- a/test/gheap.c +++ b/test/gheap.c @@ -20,9 +20,7 @@ * another by anything that appears in the file format. */ #include "h5test.h" -#include "H5private.h" #include "H5ACprivate.h" -#include "H5Eprivate.h" #include "H5Fprivate.h" #include "H5Gprivate.h" #include "H5HGprivate.h" diff --git a/test/h5test.h b/test/h5test.h index ce5c64d..8e87192 100644 --- a/test/h5test.h +++ b/test/h5test.h @@ -20,8 +20,13 @@ #ifndef _H5TEST_H #define _H5TEST_H +/* + * Include required headers. This file tests internal library functions, + * so we include the private headers here. + */ #include "hdf5.h" #include "H5private.h" +#include "H5Eprivate.h" /* * Predefined test verbosity levels. diff --git a/test/hyperslab.c b/test/hyperslab.c index c28d872..6c754db 100644 --- a/test/hyperslab.c +++ b/test/hyperslab.c @@ -21,8 +21,6 @@ * rewrite much of the hyperslab stuff. */ #include "h5test.h" -#include "H5private.h" -#include "H5Eprivate.h" #include "H5VMprivate.h" #define TEST_SMALL 0x0001 diff --git a/test/istore.c b/test/istore.c index c401e87..90dbcfe 100644 --- a/test/istore.c +++ b/test/istore.c @@ -20,15 +20,13 @@ #define H5F_FRIEND /*suppress error about including H5Fpkg */ #include "h5test.h" -#include "H5private.h" + #include "H5Dprivate.h" -#include "H5Eprivate.h" #include "H5Iprivate.h" #include "H5Pprivate.h" #include "H5Fpkg.h" #include "H5Gprivate.h" #include "H5Oprivate.h" -#include "H5Pprivate.h" #include "H5VMprivate.h" const char *FILENAME[] = { diff --git a/test/swmr.c b/test/swmr.c index 3b1bd09..0b352e2 100644 --- a/test/swmr.c +++ b/test/swmr.c @@ -24,7 +24,6 @@ * *************************************************************/ -#include "hdf5.h" #include "h5test.h" #include "H5Iprivate.h" diff --git a/test/tarray.c b/test/tarray.c index b2e0ee7..3ce0f6a 100644 --- a/test/tarray.c +++ b/test/tarray.c @@ -22,8 +22,6 @@ #include "testhdf5.h" #include "H5srcdir.h" -#include "hdf5.h" - #define FILENAME "tarray1.h5" #define TESTFILE "tarrold.h5" diff --git a/test/tattr.c b/test/tattr.c index 2d333e9..57b0e64 100644 --- a/test/tattr.c +++ b/test/tattr.c @@ -20,8 +20,6 @@ *************************************************************/ #include "testhdf5.h" -#include "h5test.h" -#include "hdf5.h" /* * This file needs to access private information from the H5O package. diff --git a/test/tconfig.c b/test/tconfig.c index a9f3378..7fbdf36 100644 --- a/test/tconfig.c +++ b/test/tconfig.c @@ -19,7 +19,6 @@ * *************************************************************/ -#include "hdf5.h" #include "testhdf5.h" /* macros definitions */ diff --git a/test/testhdf5.h b/test/testhdf5.h index 127c687..1f3f6a0 100644 --- a/test/testhdf5.h +++ b/test/testhdf5.h @@ -18,13 +18,6 @@ #ifndef TESTHDF5_H #define TESTHDF5_H -/* - * Include required headers. This file tests internal library functions, - * so we include the private headers here. - */ -#include "H5private.h" -#include "H5Eprivate.h" - /* Include generic testing header also */ #include "h5test.h" @@ -204,12 +197,12 @@ void test_vlstrings(void); void test_iterate(void); void test_array(void); void test_genprop(void); -void test_configure(void); -void test_misc(void); -void test_ids(void); -void test_skiplist(void); -void test_sohm(void); -void test_unicode(void); +void test_configure(void); +void test_misc(void); +void test_ids(void); +void test_skiplist(void); +void test_sohm(void); +void test_unicode(void); /* Prototypes for the cleanup routines */ void cleanup_metadata(void); @@ -227,10 +220,10 @@ void cleanup_vlstrings(void); void cleanup_iterate(void); void cleanup_array(void); void cleanup_genprop(void); -void cleanup_configure(void); -void cleanup_sohm(void); -void cleanup_misc(void); -void cleanup_unicode(void); +void cleanup_configure(void); +void cleanup_sohm(void); +void cleanup_misc(void); +void cleanup_unicode(void); #ifdef __cplusplus } diff --git a/test/tfile.c b/test/tfile.c index 80ba4da..9391458 100644 --- a/test/tfile.c +++ b/test/tfile.c @@ -19,7 +19,6 @@ * *************************************************************/ -#include "hdf5.h" #include "testhdf5.h" #include "H5srcdir.h" diff --git a/test/tgenprop.c b/test/tgenprop.c index 0e6b5c9..582b36e 100644 --- a/test/tgenprop.c +++ b/test/tgenprop.c @@ -25,7 +25,7 @@ #define H5P_TESTING #include "testhdf5.h" -#include "hdf5.h" + #include "H5Dprivate.h" /* For Dataset creation property list names */ #include "H5Ppkg.h" /* Generic Properties */ diff --git a/test/th5s.c b/test/th5s.c index 99e40d5..9712bf1 100644 --- a/test/th5s.c +++ b/test/th5s.c @@ -22,7 +22,6 @@ #include "testhdf5.h" #include "H5srcdir.h" -#include "H5private.h" #include "H5Bprivate.h" #include "H5Sprivate.h" #include "H5Pprivate.h" diff --git a/test/tid.c b/test/tid.c index 7d6757f..7545e16 100644 --- a/test/tid.c +++ b/test/tid.c @@ -14,7 +14,6 @@ /* Test user-created identifiers (hid_t's) and identifier types. */ #include "testhdf5.h" -#include "hdf5.h" /* Include H5Ipkg.h to calculate max number of groups */ #define H5I_FRIEND /*suppress error about including H5Ipkg */ diff --git a/test/titerate.c b/test/titerate.c index 231bd2e..98588f9 100644 --- a/test/titerate.c +++ b/test/titerate.c @@ -21,8 +21,6 @@ #include "testhdf5.h" -#include "hdf5.h" - #define DATAFILE "titerate.h5" /* Number of datasets for group iteration test */ diff --git a/test/tmisc.c b/test/tmisc.c index f0e595b..5825656 100644 --- a/test/tmisc.c +++ b/test/tmisc.c @@ -26,7 +26,6 @@ /* Define this macro to indicate that the testing APIs should be available */ #define H5D_TESTING -#include "hdf5.h" #include "testhdf5.h" #include "H5srcdir.h" #include "H5Dpkg.h" /* Datasets */ diff --git a/test/trefer.c b/test/trefer.c index 6ab649e..ec9428f 100644 --- a/test/trefer.c +++ b/test/trefer.c @@ -21,8 +21,6 @@ #include "testhdf5.h" -#include "hdf5.h" - #define FILE1 "trefer1.h5" #define FILE2 "trefer2.h5" #define FILE3 "trefer3.h5" diff --git a/test/ttime.c b/test/ttime.c index 2eb2117..0df7422 100644 --- a/test/ttime.c +++ b/test/ttime.c @@ -21,8 +21,6 @@ #include "testhdf5.h" -#include "hdf5.h" - #define DATAFILE "ttime.h5" #ifdef NOT_YET #define DATASETNAME "Dataset" diff --git a/test/ttsafe.h b/test/ttsafe.h index 6cf449f..c29fadc 100644 --- a/test/ttsafe.h +++ b/test/ttsafe.h @@ -22,9 +22,6 @@ * Include required headers. This file tests internal library functions, * so we include the private headers here. */ -#include "hdf5.h" -#include "H5private.h" -#include "H5Eprivate.h" #include "testhdf5.h" diff --git a/test/tvlstr.c b/test/tvlstr.c index 7b520f2..e7593fa 100644 --- a/test/tvlstr.c +++ b/test/tvlstr.c @@ -21,8 +21,6 @@ #include "testhdf5.h" -#include "hdf5.h" - #define DATAFILE "tvlstr.h5" #define DATAFILE2 "tvlstr2.h5" diff --git a/test/tvltypes.c b/test/tvltypes.c index 0c4cb9d..ef154a2 100644 --- a/test/tvltypes.c +++ b/test/tvltypes.c @@ -21,7 +21,6 @@ #include "testhdf5.h" -#include "hdf5.h" #include "H5Dprivate.h" #define FILENAME "tvltypes.h5" diff --git a/testpar/t_bigio.c b/testpar/t_bigio.c index 3245865..fdd3488 100644 --- a/testpar/t_bigio.c +++ b/testpar/t_bigio.c @@ -1,5 +1,5 @@ -#include "testpar.h" +#include "hdf5.h" #include "testphdf5.h" #include "H5Dprivate.h" /* For Chunk tests */ diff --git a/testpar/t_cache.c b/testpar/t_cache.c index 700e993..0447720 100644 --- a/testpar/t_cache.c +++ b/testpar/t_cache.c @@ -16,7 +16,6 @@ * */ -#include "h5test.h" #include "testpar.h" #define H5AC_FRIEND /*suppress error about including H5ACpkg */ diff --git a/testpar/t_cache_image.c b/testpar/t_cache_image.c index 524a63f..12479c7 100644 --- a/testpar/t_cache_image.c +++ b/testpar/t_cache_image.c @@ -17,9 +17,8 @@ * This file contains tests specific to the cache image * feature implemented in H5C.c */ -#include "h5test.h" #include "testphdf5.h" -#include "testpar.h" + #include "cache_common.h" #include "genall5.h" diff --git a/testpar/t_pflush1.c b/testpar/t_pflush1.c index 0782f3d..abb9818 100644 --- a/testpar/t_pflush1.c +++ b/testpar/t_pflush1.c @@ -21,7 +21,6 @@ * calling _exit(0) since this doesn't flush HDF5 caches but * still exits with success. */ -#include #include "h5test.h" const char *FILENAME[] = { diff --git a/testpar/t_pread.c b/testpar/t_pread.c index a527503..537e55b 100644 --- a/testpar/t_pread.c +++ b/testpar/t_pread.c @@ -16,7 +16,6 @@ * */ -#include "h5test.h" #include "testpar.h" /* The collection of files is included below to aid diff --git a/testpar/t_shapesame.c b/testpar/t_shapesame.c index 1052a69..9e8f16b 100644 --- a/testpar/t_shapesame.c +++ b/testpar/t_shapesame.c @@ -22,8 +22,6 @@ #define H5S_TESTING -#include "hdf5.h" -#include "H5private.h" #include "testphdf5.h" #include "H5Spkg.h" /* Dataspaces */ diff --git a/testpar/t_span_tree.c b/testpar/t_span_tree.c index a42df95..811598e 100644 --- a/testpar/t_span_tree.c +++ b/testpar/t_span_tree.c @@ -32,8 +32,6 @@ */ -#include "hdf5.h" -#include "H5private.h" #include "testphdf5.h" diff --git a/tools/lib/h5tools.c b/tools/lib/h5tools.c index 89cb524..11888bc 100644 --- a/tools/lib/h5tools.c +++ b/tools/lib/h5tools.c @@ -43,7 +43,7 @@ unsigned packed_bits_num; /* number of packed bits to display */ unsigned packed_data_offset; /* offset of packed bits to display */ unsigned packed_data_length; /* length of packed bits to display */ unsigned long long packed_data_mask; /* mask in which packed bits to display */ -int enable_error_stack= FALSE; /* re-enable error stack */ +int enable_error_stack = 0; /* re-enable error stack; disable=0 enable=1 */ /* sort parameters */ H5_index_t sort_by = H5_INDEX_NAME; /*sort_by [creation_order | name] */ @@ -548,9 +548,15 @@ h5tools_fopen(const char *fname, unsigned flags, hid_t fapl, const char *driver, if ((my_fapl = h5tools_get_fapl(fapl, driver, &drivernum)) < 0) goto done; - H5E_BEGIN_TRY { + /* allow error stack display if enable-error-stack has optional arg number */ + if (enable_error_stack > 1) { fid = H5Fopen(fname, flags, my_fapl); - } H5E_END_TRY; + } + else { + H5E_BEGIN_TRY { + fid = H5Fopen(fname, flags, my_fapl); + } H5E_END_TRY; + } if (fid == FAIL) goto done; @@ -563,9 +569,15 @@ h5tools_fopen(const char *fname, unsigned flags, hid_t fapl, const char *driver, if((my_fapl = h5tools_get_fapl(fapl, drivernames[drivernum], NULL)) < 0) goto done; - H5E_BEGIN_TRY { + /* allow error stack display if enable-error-stack has optional arg number */ + if (enable_error_stack > 1) { fid = H5Fopen(fname, flags, my_fapl); - } H5E_END_TRY; + } + else { + H5E_BEGIN_TRY { + fid = H5Fopen(fname, flags, my_fapl); + } H5E_END_TRY; + } if (fid != FAIL) break; diff --git a/tools/lib/h5tools.h b/tools/lib/h5tools.h index 6383df5..c360230 100644 --- a/tools/lib/h5tools.h +++ b/tools/lib/h5tools.h @@ -573,7 +573,7 @@ H5TOOLS_DLLVAR H5_index_t sort_by; /*sort_by [creation_order | name] * H5TOOLS_DLLVAR H5_iter_order_t sort_order; /*sort_order [ascending | descending] */ /* things to display or which are set via command line parameters */ -H5TOOLS_DLLVAR int enable_error_stack; /* re-enable error stack */ +H5TOOLS_DLLVAR int enable_error_stack; /* re-enable error stack; disable=0 enable=1 */ /* Strings for output */ #define H5_TOOLS_GROUP "GROUP" diff --git a/tools/src/h5copy/h5copy.c b/tools/src/h5copy/h5copy.c index 1d15d12..1800810 100644 --- a/tools/src/h5copy/h5copy.c +++ b/tools/src/h5copy/h5copy.c @@ -293,7 +293,7 @@ main (int argc, const char *argv[]) break; case 'E': - enable_error_stack = TRUE; + enable_error_stack = 1; break; default: @@ -330,7 +330,7 @@ main (int argc, const char *argv[]) leave(EXIT_FAILURE); } - if (enable_error_stack) { + if (enable_error_stack > 0) { H5Eset_auto2(H5E_DEFAULT, func, edata); H5Eset_auto2(H5tools_ERR_STACK_g, tools_func, tools_edata); } diff --git a/tools/src/h5diff/h5diff_common.c b/tools/src/h5diff/h5diff_common.c index ce5df78..8f09c81 100644 --- a/tools/src/h5diff/h5diff_common.c +++ b/tools/src/h5diff/h5diff_common.c @@ -178,7 +178,7 @@ void parse_command_line(int argc, break; case 'S': - enable_error_stack = TRUE; + enable_error_stack = 1; break; case 'E': diff --git a/tools/src/h5diff/h5diff_main.c b/tools/src/h5diff/h5diff_main.c index ad488a4..c5a0cbf 100644 --- a/tools/src/h5diff/h5diff_main.c +++ b/tools/src/h5diff/h5diff_main.c @@ -100,7 +100,7 @@ int main(int argc, const char *argv[]) */ parse_command_line(argc, argv, &fname1, &fname2, &objname1, &objname2, &opts); - if (enable_error_stack) { + if (enable_error_stack > 0) { H5Eset_auto2(H5E_DEFAULT, func, edata); H5Eset_auto2(H5tools_ERR_STACK_g, tools_func, tools_edata); } diff --git a/tools/src/h5dump/h5dump.c b/tools/src/h5dump/h5dump.c index b90d60f..787f1bb 100644 --- a/tools/src/h5dump/h5dump.c +++ b/tools/src/h5dump/h5dump.c @@ -67,7 +67,7 @@ struct handler_t { */ /* The following initialization makes use of C language cancatenating */ /* "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:RECM:O*N:vG:"; +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' }, @@ -181,7 +181,7 @@ static struct long_options l_opts[] = { { "sort_order", require_arg, 'z' }, { "format", require_arg, 'm' }, { "region", no_arg, 'R' }, - { "enable-error-stack", no_arg, 'E' }, + { "enable-error-stack", optional_arg, 'E' }, { "packed-bits", require_arg, 'M' }, { "no-compact-subset", no_arg, 'C' }, { "ddl", optional_arg, 'O' }, @@ -273,8 +273,8 @@ usage(const char *prog) PRINTVALSTREAM(rawoutstream, " -m T, --format=T Set the floating point output format\n"); PRINTVALSTREAM(rawoutstream, " -q Q, --sort_by=Q Sort groups and attributes by index Q\n"); PRINTVALSTREAM(rawoutstream, " -z Z, --sort_order=Z Sort groups and attributes by order Z\n"); - PRINTVALSTREAM(rawoutstream, " --enable-error-stack Prints messages from the HDF5 error stack as they\n"); - PRINTVALSTREAM(rawoutstream, " occur.\n"); + PRINTVALSTREAM(rawoutstream, " --enable-error-stack Prints messages from the HDF5 error stack as they occur.\n"); + PRINTVALSTREAM(rawoutstream, " Optional value 2 also prints file open errors.\n"); PRINTVALSTREAM(rawoutstream, " --no-compact-subset Disable compact form of subsetting and allow the use\n"); PRINTVALSTREAM(rawoutstream, " of \"[\" in dataset names.\n"); PRINTVALSTREAM(rawoutstream, " -w N, --width=N Set the number of columns of output. A value of 0 (zero)\n"); @@ -920,9 +920,8 @@ parse_start: case 'n': display_fi = TRUE; last_was_dset = FALSE; - if ( opt_arg != NULL) { + if (opt_arg != NULL) h5trav_set_verbose(HDatoi(opt_arg)); - } break; case 'p': display_dcpl = TRUE; @@ -939,8 +938,9 @@ parse_start: last_was_dset = FALSE; break; case 'A': - if ( opt_arg != NULL) { - if(0 == HDatoi(opt_arg)) include_attrs = FALSE; + if (opt_arg != NULL) { + if(0 == HDatoi(opt_arg)) + include_attrs = FALSE; } else { display_data = FALSE; @@ -1059,7 +1059,7 @@ parse_start: break; case 'o': - if ( bin_output ) { + if (bin_output) { if (h5tools_set_data_output_file(opt_arg, 1) < 0) { usage(h5tools_getprogname()); goto error; @@ -1086,8 +1086,8 @@ parse_start: break; case 'b': - if ( opt_arg != NULL) { - if ( ( bin_form = set_binary_form(opt_arg)) < 0) { + if (opt_arg != NULL) { + if ((bin_form = set_binary_form(opt_arg)) < 0) { /* failed to set binary form */ usage(h5tools_getprogname()); goto error; @@ -1106,7 +1106,7 @@ parse_start: break; case 'q': - if ( ( sort_by = set_sort_by(opt_arg)) < 0) { + if ((sort_by = set_sort_by(opt_arg)) < 0) { /* failed to set "sort by" form */ usage(h5tools_getprogname()); goto error; @@ -1114,7 +1114,7 @@ parse_start: break; case 'z': - if ( ( sort_order = set_sort_order(opt_arg)) < 0) { + if ((sort_order = set_sort_order(opt_arg)) < 0) { /* failed to set "sort order" form */ usage(h5tools_getprogname()); goto error; @@ -1268,7 +1268,10 @@ end_collect: /** end subsetting parameters **/ case 'E': - enable_error_stack = TRUE; + if (opt_arg != NULL) + enable_error_stack = HDatoi(opt_arg); + else + enable_error_stack = 1; break; case 'C': disable_compact_subset = TRUE; @@ -1388,7 +1391,7 @@ main(int argc, const char *argv[]) goto done; } - if (enable_error_stack) { + if (enable_error_stack > 0) { H5Eset_auto2(H5E_DEFAULT, func, edata); H5Eset_auto2(H5tools_ERR_STACK_g, tools_func, tools_edata); } diff --git a/tools/src/h5repack/h5repack_main.c b/tools/src/h5repack/h5repack_main.c index d34c394..c4260dd 100644 --- a/tools/src/h5repack/h5repack_main.c +++ b/tools/src/h5repack/h5repack_main.c @@ -634,7 +634,7 @@ int parse_command_line(int argc, const char **argv, pack_opt_t* options) break; case 'E': - enable_error_stack = TRUE; + enable_error_stack = 1; break; default: @@ -727,7 +727,7 @@ int main(int argc, const char **argv) } } - if (enable_error_stack) { + if (enable_error_stack > 0) { H5Eset_auto2(H5E_DEFAULT, func, edata); H5Eset_auto2(H5tools_ERR_STACK_g, tools_func, tools_edata); } diff --git a/tools/test/perform/pio_perf.h b/tools/test/perform/pio_perf.h index b595c90..7605f20 100644 --- a/tools/test/perform/pio_perf.h +++ b/tools/test/perform/pio_perf.h @@ -15,7 +15,6 @@ #include "io_timer.h" #ifndef STANDALONE -#include "H5private.h" #include "h5test.h" #include "h5tools.h" #include "h5tools_utils.h" @@ -36,22 +35,22 @@ typedef enum iotype_ { } iotype; typedef struct parameters_ { - iotype io_type; /* The type of IO test to perform */ - int num_procs; /* Maximum number of processes to use */ - long num_files; /* Number of files to create */ - long num_dsets; /* Number of datasets to create */ - off_t num_bytes; /* Number of bytes in each dset */ + iotype io_type; /* The type of IO test to perform */ + int num_procs; /* Maximum number of processes to use */ + long num_files; /* Number of files to create */ + long num_dsets; /* Number of datasets to create */ + off_t num_bytes; /* Number of bytes in each dset */ int num_iters; /* Number of times to loop doing the IO */ - size_t buf_size; /* Buffer size */ - size_t blk_size; /* Block size */ + size_t buf_size; /* Buffer size */ + size_t blk_size; /* Block size */ unsigned interleaved; /* Interleaved vs. contiguous blocks */ unsigned collective; /* Collective vs. independent I/O */ unsigned dim2d; /* 1D vs. 2D */ - hsize_t h5_align; /* HDF5 object alignment */ - hsize_t h5_thresh; /* HDF5 object alignment threshold */ - int h5_use_chunks; /* Make HDF5 dataset chunked */ - int h5_write_only; /* Perform the write tests only */ - int verify; /* Verify data correctness */ + hsize_t h5_align; /* HDF5 object alignment */ + hsize_t h5_thresh; /* HDF5 object alignment threshold */ + int h5_use_chunks; /* Make HDF5 dataset chunked */ + int h5_write_only; /* Perform the write tests only */ + int verify; /* Verify data correctness */ } parameters; typedef struct results_ { diff --git a/tools/test/perform/sio_perf.h b/tools/test/perform/sio_perf.h index 366b791..83caf54 100644 --- a/tools/test/perform/sio_perf.h +++ b/tools/test/perform/sio_perf.h @@ -15,7 +15,6 @@ #include "io_timer.h" #ifndef STANDALONE -#include "H5private.h" #include "h5test.h" #include "h5tools.h" #include "h5tools_utils.h" diff --git a/tools/testfiles/h5dump-help.txt b/tools/testfiles/h5dump-help.txt index fe22a1b..19de76f 100644 --- a/tools/testfiles/h5dump-help.txt +++ b/tools/testfiles/h5dump-help.txt @@ -44,8 +44,8 @@ usage: h5dump [OPTIONS] files -m T, --format=T Set the floating point output format -q Q, --sort_by=Q Sort groups and attributes by index Q -z Z, --sort_order=Z Sort groups and attributes by order Z - --enable-error-stack Prints messages from the HDF5 error stack as they - occur. + --enable-error-stack Prints messages from the HDF5 error stack as they occur. + Optional value 2 also prints file open errors. --no-compact-subset Disable compact form of subsetting and allow the use of "[" in dataset names. -w N, --width=N Set the number of columns of output. A value of 0 (zero) diff --git a/tools/testfiles/pbits/tnofilename-with-packed-bits.ddl b/tools/testfiles/pbits/tnofilename-with-packed-bits.ddl index 767cbbf..0a3beb0 100644 --- a/tools/testfiles/pbits/tnofilename-with-packed-bits.ddl +++ b/tools/testfiles/pbits/tnofilename-with-packed-bits.ddl @@ -44,8 +44,8 @@ usage: h5dump [OPTIONS] files -m T, --format=T Set the floating point output format -q Q, --sort_by=Q Sort groups and attributes by index Q -z Z, --sort_order=Z Sort groups and attributes by order Z - --enable-error-stack Prints messages from the HDF5 error stack as they - occur. + --enable-error-stack Prints messages from the HDF5 error stack as they occur. + Optional value 2 also prints file open errors. --no-compact-subset Disable compact form of subsetting and allow the use of "[" in dataset names. -w N, --width=N Set the number of columns of output. A value of 0 (zero) diff --git a/tools/testfiles/pbits/tpbitsIncomplete.ddl b/tools/testfiles/pbits/tpbitsIncomplete.ddl index d791b41..b353065 100644 --- a/tools/testfiles/pbits/tpbitsIncomplete.ddl +++ b/tools/testfiles/pbits/tpbitsIncomplete.ddl @@ -44,8 +44,8 @@ usage: h5dump [OPTIONS] files -m T, --format=T Set the floating point output format -q Q, --sort_by=Q Sort groups and attributes by index Q -z Z, --sort_order=Z Sort groups and attributes by order Z - --enable-error-stack Prints messages from the HDF5 error stack as they - occur. + --enable-error-stack Prints messages from the HDF5 error stack as they occur. + Optional value 2 also prints file open errors. --no-compact-subset Disable compact form of subsetting and allow the use of "[" in dataset names. -w N, --width=N Set the number of columns of output. A value of 0 (zero) diff --git a/tools/testfiles/pbits/tpbitsLengthExceeded.ddl b/tools/testfiles/pbits/tpbitsLengthExceeded.ddl index 5235aa7..ffe0da9 100644 --- a/tools/testfiles/pbits/tpbitsLengthExceeded.ddl +++ b/tools/testfiles/pbits/tpbitsLengthExceeded.ddl @@ -44,8 +44,8 @@ usage: h5dump [OPTIONS] files -m T, --format=T Set the floating point output format -q Q, --sort_by=Q Sort groups and attributes by index Q -z Z, --sort_order=Z Sort groups and attributes by order Z - --enable-error-stack Prints messages from the HDF5 error stack as they - occur. + --enable-error-stack Prints messages from the HDF5 error stack as they occur. + Optional value 2 also prints file open errors. --no-compact-subset Disable compact form of subsetting and allow the use of "[" in dataset names. -w N, --width=N Set the number of columns of output. A value of 0 (zero) diff --git a/tools/testfiles/pbits/tpbitsLengthPositive.ddl b/tools/testfiles/pbits/tpbitsLengthPositive.ddl index 697bff8..4502143 100644 --- a/tools/testfiles/pbits/tpbitsLengthPositive.ddl +++ b/tools/testfiles/pbits/tpbitsLengthPositive.ddl @@ -44,8 +44,8 @@ usage: h5dump [OPTIONS] files -m T, --format=T Set the floating point output format -q Q, --sort_by=Q Sort groups and attributes by index Q -z Z, --sort_order=Z Sort groups and attributes by order Z - --enable-error-stack Prints messages from the HDF5 error stack as they - occur. + --enable-error-stack Prints messages from the HDF5 error stack as they occur. + Optional value 2 also prints file open errors. --no-compact-subset Disable compact form of subsetting and allow the use of "[" in dataset names. -w N, --width=N Set the number of columns of output. A value of 0 (zero) diff --git a/tools/testfiles/pbits/tpbitsMaxExceeded.ddl b/tools/testfiles/pbits/tpbitsMaxExceeded.ddl index 900c0b5..011f6c9 100644 --- a/tools/testfiles/pbits/tpbitsMaxExceeded.ddl +++ b/tools/testfiles/pbits/tpbitsMaxExceeded.ddl @@ -44,8 +44,8 @@ usage: h5dump [OPTIONS] files -m T, --format=T Set the floating point output format -q Q, --sort_by=Q Sort groups and attributes by index Q -z Z, --sort_order=Z Sort groups and attributes by order Z - --enable-error-stack Prints messages from the HDF5 error stack as they - occur. + --enable-error-stack Prints messages from the HDF5 error stack as they occur. + Optional value 2 also prints file open errors. --no-compact-subset Disable compact form of subsetting and allow the use of "[" in dataset names. -w N, --width=N Set the number of columns of output. A value of 0 (zero) diff --git a/tools/testfiles/pbits/tpbitsOffsetExceeded.ddl b/tools/testfiles/pbits/tpbitsOffsetExceeded.ddl index 65123d0..857fe62 100644 --- a/tools/testfiles/pbits/tpbitsOffsetExceeded.ddl +++ b/tools/testfiles/pbits/tpbitsOffsetExceeded.ddl @@ -44,8 +44,8 @@ usage: h5dump [OPTIONS] files -m T, --format=T Set the floating point output format -q Q, --sort_by=Q Sort groups and attributes by index Q -z Z, --sort_order=Z Sort groups and attributes by order Z - --enable-error-stack Prints messages from the HDF5 error stack as they - occur. + --enable-error-stack Prints messages from the HDF5 error stack as they occur. + Optional value 2 also prints file open errors. --no-compact-subset Disable compact form of subsetting and allow the use of "[" in dataset names. -w N, --width=N Set the number of columns of output. A value of 0 (zero) diff --git a/tools/testfiles/pbits/tpbitsOffsetNegative.ddl b/tools/testfiles/pbits/tpbitsOffsetNegative.ddl index d352e34..9ac1160 100644 --- a/tools/testfiles/pbits/tpbitsOffsetNegative.ddl +++ b/tools/testfiles/pbits/tpbitsOffsetNegative.ddl @@ -44,8 +44,8 @@ usage: h5dump [OPTIONS] files -m T, --format=T Set the floating point output format -q Q, --sort_by=Q Sort groups and attributes by index Q -z Z, --sort_order=Z Sort groups and attributes by order Z - --enable-error-stack Prints messages from the HDF5 error stack as they - occur. + --enable-error-stack Prints messages from the HDF5 error stack as they occur. + Optional value 2 also prints file open errors. --no-compact-subset Disable compact form of subsetting and allow the use of "[" in dataset names. -w N, --width=N Set the number of columns of output. A value of 0 (zero) -- cgit v0.12 From de2ca6cf2d3d8361c70a6cefa30d28103d69cd4a Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Mon, 19 Feb 2018 08:33:54 -0600 Subject: Fix indentation --- tools/src/h5repack/h5repack_main.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/src/h5repack/h5repack_main.c b/tools/src/h5repack/h5repack_main.c index c4260dd..1587da4 100644 --- a/tools/src/h5repack/h5repack_main.c +++ b/tools/src/h5repack/h5repack_main.c @@ -634,8 +634,8 @@ int parse_command_line(int argc, const char **argv, pack_opt_t* options) break; case 'E': - enable_error_stack = 1; - break; + enable_error_stack = 1; + break; default: break; -- cgit v0.12 From b7809bade035bb075ab94b314aeb7c1ba7908c88 Mon Sep 17 00:00:00 2001 From: Richard Warren Date: Tue, 20 Feb 2018 11:04:56 -0500 Subject: Fixed t_pread.c with a local implementation of the posix function dirname(). Fixes HDFFV=8839 --- testpar/t_pread.c | 59 ++++++++++++++++++++++++++++++++++++++++++++----------- 1 file changed, 47 insertions(+), 12 deletions(-) diff --git a/testpar/t_pread.c b/testpar/t_pread.c index a527503..132fada 100644 --- a/testpar/t_pread.c +++ b/testpar/t_pread.c @@ -18,6 +18,7 @@ #include "h5test.h" #include "testpar.h" +#include /* The collection of files is included below to aid * an external "cleanup" process if required. @@ -56,8 +57,26 @@ static int generate_test_file(MPI_Comm comm, int mpi_rank, int group); static int test_parallel_read(MPI_Comm comm, int mpi_rank, int group); static char *test_argv0 = NULL; +#if defined(_WIN32) || defined(_WIN64) +#include + +static char *dirname(char *path) +{ + char drive[_MAX_DRIVE]; + char dir[_MAX_DIR]; + char directory[_MAX_PATH]; + + assert(path != NULL); + _fullpath(directory, path, _MAX_FNAME); + _splitpath_s(directory, drive, _MAX_DRIVE, dir, _MAX_DIR, NULL, 0, NULL, 0); + sprintf_s(directory, _MAX_PATH, "%s%s", drive, dir); + return _strdup(directory); +} +#else extern char *dirname(char *path); /* Avoids additional includes */ +#endif + /*------------------------------------------------------------------------- * Function: generate_test_file @@ -394,9 +413,14 @@ generate_test_file( MPI_Comm comm, int mpi_rank, int group_id ) } if ( pass ) { - char cmd[256]; + char execmd[256]; + char syscmd[256]; char exe_path[256]; - char *relative_path = "../tools/src/h5jam"; +#if defined(_WIN32) || defined(_WIN64) + char *relative_path = "..\\tools\\src\\h5jam\\h5jam.exe"; +#else + char *relative_path = "../tools/src/h5jam/h5jam"; +#endif char *exe_dirname = relative_path; /* We're checking for the existance of the h5jam utility @@ -407,19 +431,30 @@ generate_test_file( MPI_Comm comm, int mpi_rank, int group_id ) * put things into directories, hence the relative path. */ if (test_argv0 != NULL) { - HDstrncpy(exe_path, test_argv0, sizeof(exe_path)); + HDstrcpy(exe_path, test_argv0); if ( (exe_dirname = (char *)dirname(exe_path)) != NULL) { - HDsprintf(cmd, "%s/h5jam", exe_dirname); - if ( HDaccess(cmd, F_OK) != 0) - exe_dirname = relative_path; +#if defined(_WIN32) || defined(_WIN64) + /* The dirname substitute (above) returns the + * directory name with a trailing slash so + * don't add another path seperator. + * The posix library version doesn't have + * the trailing slash, so we add it between + * the directory name and the excutable. + */ + HDsprintf(execmd, "%sh5jam.exe", exe_dirname); +#else + HDsprintf(execmd, "%s/h5jam", exe_dirname); +#endif + if (HDaccess(execmd, F_OK) != 0) + HDstrcpy(execmd, relative_path); } } - HDsprintf(cmd, "%s/h5jam -i %s -u %s -o %s", - exe_dirname, + HDsprintf(syscmd, "%s -i %s -u %s -o %s", + execmd, data_filename, prolog_filename, reloc_data_filename); - if ( system(cmd) != 0 ) { + if ( system(syscmd) != 0 ) { pass = FALSE; failure_mssg = "invocation of h5jam failed.\n"; } @@ -782,7 +817,7 @@ main( int argc, char **argv) int mpi_rank; int mpi_size; int split_size; - MPI_Comm group_comm = MPI_COMM_WORLD; + MPI_Comm group_comm = MPI_COMM_NULL; /* I don't believe that argv[0] can ever be NULL. * It should thus be safe to dup and save as a check @@ -822,7 +857,7 @@ main( int argc, char **argv) if ( mpi_size < 3 ) { if ( mpi_rank == 0 ) { - + nerrs--; HDprintf(" Need at least 3 processes. Exiting.\n"); } goto finish; @@ -927,7 +962,7 @@ finish: } /* close HDF5 library */ - if (H5close() != SUCCEED) { + if ((nerrs >= 0) && H5close() != SUCCEED) { HDfprintf(stdout, "H5close() failed. (Ignoring)\n"); } -- cgit v0.12 From bb27f1441f40456213af7b86704182737812c314 Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Thu, 22 Feb 2018 11:36:41 -0600 Subject: HDFFV-10412 merge from develop --- release_docs/RELEASE.txt | 12 +++++++ tools/src/h5repack/h5repack_filters.c | 38 +++++++++++----------- .../testfiles/deflate_limit.h5repack_layout.h5.ddl | 4 +-- .../testfiles/h5repack_layout.h5-plugin_test.ddl | 2 +- .../h5repack_layout.h5-plugin_version_test.ddl | 2 +- 5 files changed, 35 insertions(+), 23 deletions(-) diff --git a/release_docs/RELEASE.txt b/release_docs/RELEASE.txt index 0f32cbe..3110f8c 100644 --- a/release_docs/RELEASE.txt +++ b/release_docs/RELEASE.txt @@ -518,6 +518,18 @@ Bug Fixes since HDF5-1.10.1 release Tools ----- + - h5repack + + h5repack changes the chunk parameters when a change of layout is not + specified and a filter is applied. + + HDFFV-10297, HDFFV-10319 reworked code for h5repack and h5diff code + in the tools library. The check for an existing layout was incorrectly + placed into an if block and not executed. The check was moved into + the normal path of the function. + + (ADB - 2018/02/21, HDFFV-10412) + - h5dump the tools library will hide the error stack during file open. diff --git a/tools/src/h5repack/h5repack_filters.c b/tools/src/h5repack/h5repack_filters.c index ae0bfd5..0092abc 100644 --- a/tools/src/h5repack/h5repack_filters.c +++ b/tools/src/h5repack/h5repack_filters.c @@ -280,25 +280,6 @@ int apply_filters(const char* name, /* object name from traverse list */ *has_filter = 1; if (H5Premove_filter(dcpl_id, H5Z_FILTER_ALL) < 0) HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Premove_filter failed"); - - /*------------------------------------------------------------------------- - * check if there is an existent chunk - * read it only if there is not a requested layout - *------------------------------------------------------------------------- - */ - if (obj.layout == -1) { - if ((layout = H5Pget_layout(dcpl_id)) < 0) - HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Pget_layout failed"); - - if (layout == H5D_CHUNKED) { - if ((rank = H5Pget_chunk(dcpl_id, NELMTS(chsize), chsize/*out*/)) < 0) - HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Pget_chunk failed"); - obj.layout = H5D_CHUNKED; - obj.chunk.rank = rank; - for (i = 0; i < rank; i++) - obj.chunk.chunk_lengths[i] = chsize[i]; - } - } } else if(nfilters) { *has_filter = 1; @@ -307,6 +288,25 @@ int apply_filters(const char* name, /* object name from traverse list */ } /*------------------------------------------------------------------------- + * check if there is an existent chunk + * read it only if there is not a requested layout + *------------------------------------------------------------------------- + */ + if (obj.layout == -1) { + if ((layout = H5Pget_layout(dcpl_id)) < 0) + HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Pget_layout failed"); + + if (layout == H5D_CHUNKED) { + if ((rank = H5Pget_chunk(dcpl_id, NELMTS(chsize), chsize/*out*/)) < 0) + HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Pget_chunk failed"); + obj.layout = H5D_CHUNKED; + obj.chunk.rank = rank; + for (i = 0; i < rank; i++) + obj.chunk.chunk_lengths[i] = chsize[i]; + } + } + + /*------------------------------------------------------------------------- * the type of filter and additional parameter * type can be one of the filters * H5Z_FILTER_NONE 0 , uncompress if compressed diff --git a/tools/test/h5repack/testfiles/deflate_limit.h5repack_layout.h5.ddl b/tools/test/h5repack/testfiles/deflate_limit.h5repack_layout.h5.ddl index 1dcc742..75f54fa 100644 --- a/tools/test/h5repack/testfiles/deflate_limit.h5repack_layout.h5.ddl +++ b/tools/test/h5repack/testfiles/deflate_limit.h5repack_layout.h5.ddl @@ -76,8 +76,8 @@ GROUP "/" { DATATYPE H5T_STD_I32LE DATASPACE SIMPLE { ( 40, 20 ) / ( 40, 20 ) } STORAGE_LAYOUT { - CHUNKED ( 40, 20 ) - SIZE 1150 (2.783:1 COMPRESSION) + CHUNKED ( 20, 10 ) + SIZE 1283 (2.494:1 COMPRESSION) } FILTERS { COMPRESSION DEFLATE { LEVEL 1 } diff --git a/tools/test/h5repack/testfiles/h5repack_layout.h5-plugin_test.ddl b/tools/test/h5repack/testfiles/h5repack_layout.h5-plugin_test.ddl index 4856f84..a8b4562 100644 --- a/tools/test/h5repack/testfiles/h5repack_layout.h5-plugin_test.ddl +++ b/tools/test/h5repack/testfiles/h5repack_layout.h5-plugin_test.ddl @@ -92,7 +92,7 @@ GROUP "/" { DATATYPE H5T_STD_I32LE DATASPACE SIMPLE { ( 40, 20 ) / ( 40, 20 ) } STORAGE_LAYOUT { - CHUNKED ( 40, 20 ) + CHUNKED ( 20, 10 ) SIZE 3200 (1.000:1 COMPRESSION) } FILTERS { diff --git a/tools/test/h5repack/testfiles/h5repack_layout.h5-plugin_version_test.ddl b/tools/test/h5repack/testfiles/h5repack_layout.h5-plugin_version_test.ddl index f79fa93..561ab14 100644 --- a/tools/test/h5repack/testfiles/h5repack_layout.h5-plugin_version_test.ddl +++ b/tools/test/h5repack/testfiles/h5repack_layout.h5-plugin_version_test.ddl @@ -92,7 +92,7 @@ GROUP "/" { DATATYPE H5T_STD_I32LE DATASPACE SIMPLE { ( 40, 20 ) / ( 40, 20 ) } STORAGE_LAYOUT { - CHUNKED ( 40, 20 ) + CHUNKED ( 20, 10 ) SIZE 3200 (1.000:1 COMPRESSION) } FILTERS { -- cgit v0.12 From d4e7beb9eef3d84c415cb530d75914fd9d126f6e Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Tue, 27 Feb 2018 16:39:10 -0600 Subject: Incr CMake min, add missing test, rework test CMake script --- CMakeLists.txt | 2 +- MANIFEST | 1 + c++/CMakeLists.txt | 2 +- c++/examples/CMakeLists.txt | 2 +- c++/examples/CMakeTests.cmake | 4 +- c++/src/CMakeLists.txt | 2 +- c++/test/CMakeLists.txt | 2 +- config/cmake/CTestScript.cmake | 2 +- config/cmake/HDF518_Examples.cmake.in | 8 +- config/cmake/HDF5_Examples.cmake.in | 2 +- config/cmake/scripts/CTestScript.cmake | 2 +- config/cmake/scripts/HDF5config.cmake | 2 +- examples/CMakeLists.txt | 2 +- fortran/CMakeLists.txt | 2 +- fortran/examples/CMakeLists.txt | 2 +- fortran/src/CMakeLists.txt | 2 +- fortran/test/CMakeLists.txt | 2 +- fortran/testpar/CMakeLists.txt | 2 +- hl/CMakeLists.txt | 2 +- hl/c++/CMakeLists.txt | 2 +- hl/c++/examples/CMakeLists.txt | 2 +- hl/c++/src/CMakeLists.txt | 2 +- hl/c++/test/CMakeLists.txt | 2 +- hl/examples/CMakeLists.txt | 2 +- hl/fortran/CMakeLists.txt | 2 +- hl/fortran/examples/CMakeLists.txt | 2 +- hl/fortran/src/CMakeLists.txt | 2 +- hl/fortran/test/CMakeLists.txt | 2 +- hl/src/CMakeLists.txt | 2 +- hl/test/CMakeLists.txt | 2 +- hl/tools/CMakeLists.txt | 2 +- hl/tools/gif2h5/CMakeLists.txt | 2 +- hl/tools/h5watch/CMakeLists.txt | 2 +- java/CMakeLists.txt | 2 +- java/examples/CMakeLists.txt | 2 +- java/examples/datasets/CMakeLists.txt | 2 +- java/examples/datatypes/CMakeLists.txt | 2 +- java/examples/groups/CMakeLists.txt | 2 +- java/examples/intro/CMakeLists.txt | 2 +- java/src/CMakeLists.txt | 2 +- java/src/hdf/CMakeLists.txt | 2 +- java/src/hdf/hdf5lib/CMakeLists.txt | 2 +- java/src/jni/CMakeLists.txt | 2 +- java/test/CMakeLists.txt | 2 +- release_docs/INSTALL_CMake.txt | 7 +- release_docs/USING_HDF5_CMake.txt | 2 +- src/CMakeLists.txt | 2 +- test/CMakeLists.txt | 225 ++++++----- test/CMakeTests.cmake | 584 ++++++----------------------- test/CMakeVFDTests.cmake | 303 +++++++++++++++ testpar/CMakeLists.txt | 3 +- tools/CMakeLists.txt | 2 +- tools/lib/CMakeLists.txt | 2 +- tools/src/CMakeLists.txt | 2 +- tools/src/h5copy/CMakeLists.txt | 2 +- tools/src/h5diff/CMakeLists.txt | 2 +- tools/src/h5dump/CMakeLists.txt | 2 +- tools/src/h5format_convert/CMakeLists.txt | 2 +- tools/src/h5import/CMakeLists.txt | 2 +- tools/src/h5jam/CMakeLists.txt | 2 +- tools/src/h5ls/CMakeLists.txt | 2 +- tools/src/h5repack/CMakeLists.txt | 2 +- tools/src/h5stat/CMakeLists.txt | 2 +- tools/src/misc/CMakeLists.txt | 2 +- tools/test/CMakeLists.txt | 2 +- tools/test/h5copy/CMakeLists.txt | 2 +- tools/test/h5diff/CMakeLists.txt | 2 +- tools/test/h5dump/CMakeLists.txt | 2 +- tools/test/h5format_convert/CMakeLists.txt | 2 +- tools/test/h5import/CMakeLists.txt | 2 +- tools/test/h5jam/CMakeLists.txt | 2 +- tools/test/h5ls/CMakeLists.txt | 2 +- tools/test/h5repack/CMakeLists.txt | 2 +- tools/test/h5stat/CMakeLists.txt | 2 +- tools/test/misc/CMakeLists.txt | 2 +- tools/test/misc/vds/CMakeLists.txt | 2 +- tools/test/perform/CMakeLists.txt | 2 +- 77 files changed, 621 insertions(+), 652 deletions(-) create mode 100644 test/CMakeVFDTests.cmake diff --git a/CMakeLists.txt b/CMakeLists.txt index 3c7bb38..e7dda17 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required (VERSION 3.2.2) +cmake_minimum_required (VERSION 3.3.2) PROJECT (HDF5 C CXX) #----------------------------------------------------------------------------- diff --git a/MANIFEST b/MANIFEST index a2a78c8..5fcb002 100644 --- a/MANIFEST +++ b/MANIFEST @@ -3175,6 +3175,7 @@ ./src/CMakeLists.txt ./test/CMakeLists.txt ./test/CMakeTests.cmake +./test/CMakeVFDTests.cmake ./testpar/CMakeLists.txt ./testpar/CMakeTests.cmake ./tools/CMakeLists.txt diff --git a/c++/CMakeLists.txt b/c++/CMakeLists.txt index adbf1a4..2d3ab0f 100644 --- a/c++/CMakeLists.txt +++ b/c++/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required (VERSION 3.2.2) +cmake_minimum_required (VERSION 3.3.2) PROJECT (HDF5_CPP) #----------------------------------------------------------------------------- diff --git a/c++/examples/CMakeLists.txt b/c++/examples/CMakeLists.txt index 300f6bc..397c300 100644 --- a/c++/examples/CMakeLists.txt +++ b/c++/examples/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required (VERSION 3.2.2) +cmake_minimum_required (VERSION 3.3.2) PROJECT (HDF5_CPP_EXAMPLES) # -------------------------------------------------------------------- diff --git a/c++/examples/CMakeTests.cmake b/c++/examples/CMakeTests.cmake index 264a7e7..bd1f95b 100644 --- a/c++/examples/CMakeTests.cmake +++ b/c++/examples/CMakeTests.cmake @@ -51,7 +51,7 @@ endif () set (last_test "CPP_ex_${example}") endforeach () -#the following dependicies are handled by the order of the files +#the following dependencies are handled by the order of the files # SET_TESTS_PROPERTIES(CPP_ex_readdata PROPERTIES DEPENDS CPP_ex_create) # SET_TESTS_PROPERTIES(CPP_ex_chunks PROPERTIES DEPENDS CPP_ex_extend_ds) @@ -91,7 +91,7 @@ endif () set (last_test "CPP_ex_${example}") endforeach () -#the following dependicies are handled by the order of the files +#the following dependencies are handled by the order of the files # SET_TESTS_PROPERTIES(CPP_ex_h5tutr_crtatt PROPERTIES DEPENDS CPP_ex_h5tutr_crtdat) # SET_TESTS_PROPERTIES(CPP_ex_h5tutr_rdwt PROPERTIES DEPENDS CPP_ex_h5tutr_crtdat) # SET_TESTS_PROPERTIES(CPP_ex_h5tutr_crtgrpd PROPERTIES DEPENDS CPP_ex_h5tutr_crtgrpar) diff --git a/c++/src/CMakeLists.txt b/c++/src/CMakeLists.txt index 3b9a0c3..921497f 100644 --- a/c++/src/CMakeLists.txt +++ b/c++/src/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required (VERSION 3.2.2) +cmake_minimum_required (VERSION 3.3.2) PROJECT (HDF5_CPP_SRC) #----------------------------------------------------------------------------- diff --git a/c++/test/CMakeLists.txt b/c++/test/CMakeLists.txt index 4930626..5194865 100644 --- a/c++/test/CMakeLists.txt +++ b/c++/test/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required (VERSION 3.2.2) +cmake_minimum_required (VERSION 3.3.2) PROJECT (HDF5_CPP_TEST) # -------------------------------------------------------------------- # Notes: When creating unit test executables they should be prefixed diff --git a/config/cmake/CTestScript.cmake b/config/cmake/CTestScript.cmake index a8b7bbc..27ae3a0 100755 --- a/config/cmake/CTestScript.cmake +++ b/config/cmake/CTestScript.cmake @@ -9,7 +9,7 @@ # If you do not have access to either file, you may request a copy from # help@hdfgroup.org. # -cmake_minimum_required (VERSION 3.2.2 FATAL_ERROR) +cmake_minimum_required (VERSION 3.3.2 FATAL_ERROR) ######################################################## # For any comments please contact cdashhelp@hdfgroup.org # diff --git a/config/cmake/HDF518_Examples.cmake.in b/config/cmake/HDF518_Examples.cmake.in index 6dc9727..0e81217 100644 --- a/config/cmake/HDF518_Examples.cmake.in +++ b/config/cmake/HDF518_Examples.cmake.in @@ -9,7 +9,7 @@ # If you do not have access to either file, you may request a copy from # help@hdfgroup.org. # -cmake_minimum_required(VERSION 3.2.2 FATAL_ERROR) +cmake_minimum_required (VERSION 3.3.2 FATAL_ERROR) ############################################################################################################### # This script will build and run the examples from a folder # Execute from a command line: @@ -66,7 +66,7 @@ endif() if(NOT DEFINED CTEST_BUILD_NAME) set(CTEST_BUILD_NAME "examples") endif() -set(ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DSITE:STRING=${CTEST_SITE} -DBUILDNAME:STRING=${CTEST_BUILD_NAME}") +set(BUILD_OPTIONS "${BUILD_OPTIONS} -DSITE:STRING=${CTEST_SITE} -DBUILDNAME:STRING=${CTEST_BUILD_NAME}") #TAR_SOURCE - name of tarfile #if(NOT DEFINED TAR_SOURCE) @@ -88,9 +88,9 @@ else() set(CTEST_BINARY_DIRECTORY "${CTEST_DASHBOARD_ROOT}/${CTEST_BINARY_NAME}") endif() if(${CDASH_LOCAL}) - set(ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DCDASH_LOCAL:BOOL=ON") + set(BUILD_OPTIONS "${BUILD_OPTIONS} -DCDASH_LOCAL:BOOL=ON") endif() -set(ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF5_PACKAGE_NAME:STRING=@HDF5_PACKAGE@@HDF_PACKAGE_EXT@") +set(BUILD_OPTIONS "${BUILD_OPTIONS} -DHDF5_PACKAGE_NAME:STRING=@HDF5_PACKAGE@@HDF_PACKAGE_EXT@") ############################################################################################################### # For any comments please contact cdashhelp@hdfgroup.org diff --git a/config/cmake/HDF5_Examples.cmake.in b/config/cmake/HDF5_Examples.cmake.in index bede701..6453b16 100644 --- a/config/cmake/HDF5_Examples.cmake.in +++ b/config/cmake/HDF5_Examples.cmake.in @@ -9,7 +9,7 @@ # If you do not have access to either file, you may request a copy from # help@hdfgroup.org. # -cmake_minimum_required(VERSION 3.2.2 FATAL_ERROR) +cmake_minimum_required (VERSION 3.3.2 FATAL_ERROR) ############################################################################################################### # This script will build and run the examples from a folder # Execute from a command line: diff --git a/config/cmake/scripts/CTestScript.cmake b/config/cmake/scripts/CTestScript.cmake index f826e31..cfad6f1 100755 --- a/config/cmake/scripts/CTestScript.cmake +++ b/config/cmake/scripts/CTestScript.cmake @@ -9,7 +9,7 @@ # If you do not have access to either file, you may request a copy from # help@hdfgroup.org. # -cmake_minimum_required (VERSION 3.2.2 FATAL_ERROR) +cmake_minimum_required (VERSION 3.3.2 FATAL_ERROR) ######################################################## # This dashboard is maintained by The HDF Group # For any comments please contact cdashhelp@hdfgroup.org diff --git a/config/cmake/scripts/HDF5config.cmake b/config/cmake/scripts/HDF5config.cmake index 15c78bf..8f219f3 100755 --- a/config/cmake/scripts/HDF5config.cmake +++ b/config/cmake/scripts/HDF5config.cmake @@ -15,7 +15,7 @@ ### ctest -S HDF5config.cmake,BUILD_GENERATOR=VS201764 -C Release -VV -O hdf5.log ### ############################################################################################# -cmake_minimum_required (VERSION 3.2.2 FATAL_ERROR) +cmake_minimum_required (VERSION 3.3.2 FATAL_ERROR) ############################################################################ # Usage: # ctest -S HDF5config.cmake,OPTION=VALUE -C Release -VV -O test.log diff --git a/examples/CMakeLists.txt b/examples/CMakeLists.txt index 43c6d63..e9430d9 100644 --- a/examples/CMakeLists.txt +++ b/examples/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required (VERSION 3.2.2) +cmake_minimum_required (VERSION 3.3.2) PROJECT (HDF5_EXAMPLES) #----------------------------------------------------------------------------- diff --git a/fortran/CMakeLists.txt b/fortran/CMakeLists.txt index a0f92d3..7864f2d 100644 --- a/fortran/CMakeLists.txt +++ b/fortran/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required (VERSION 3.2.2) +cmake_minimum_required (VERSION 3.3.2) PROJECT (HDF5_F90 C CXX Fortran) if (H5_HAVE_PARALLEL) diff --git a/fortran/examples/CMakeLists.txt b/fortran/examples/CMakeLists.txt index a48b3bd..9adf8bd 100644 --- a/fortran/examples/CMakeLists.txt +++ b/fortran/examples/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required (VERSION 3.2.2) +cmake_minimum_required (VERSION 3.3.2) PROJECT (HDF5_F90_EXAMPLES C CXX Fortran) # -------------------------------------------------------------------- # Notes: When creating examples they should be prefixed diff --git a/fortran/src/CMakeLists.txt b/fortran/src/CMakeLists.txt index 5446616..9bf1719 100644 --- a/fortran/src/CMakeLists.txt +++ b/fortran/src/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required (VERSION 3.2.2) +cmake_minimum_required (VERSION 3.3.2) PROJECT (HDF5_F90_SRC C CXX Fortran) #----------------------------------------------------------------------------- diff --git a/fortran/test/CMakeLists.txt b/fortran/test/CMakeLists.txt index 86f7a12..67d377f 100644 --- a/fortran/test/CMakeLists.txt +++ b/fortran/test/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required (VERSION 3.2.2) +cmake_minimum_required (VERSION 3.3.2) PROJECT (HDF5_FORTRAN_TESTS C CXX Fortran) #----------------------------------------------------------------------------- diff --git a/fortran/testpar/CMakeLists.txt b/fortran/testpar/CMakeLists.txt index ed9d28c..b1cf9d2 100644 --- a/fortran/testpar/CMakeLists.txt +++ b/fortran/testpar/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required (VERSION 3.2.2) +cmake_minimum_required (VERSION 3.3.2) PROJECT (HDF5_FORTRAN_TESTPAR C CXX Fortran) #----------------------------------------------------------------------------- diff --git a/hl/CMakeLists.txt b/hl/CMakeLists.txt index d80b4f9..eac6df0 100644 --- a/hl/CMakeLists.txt +++ b/hl/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required (VERSION 3.2.2) +cmake_minimum_required (VERSION 3.3.2) PROJECT (HDF5_HL C CXX) #----------------------------------------------------------------------------- diff --git a/hl/c++/CMakeLists.txt b/hl/c++/CMakeLists.txt index 9a1d059..c5b4a72 100644 --- a/hl/c++/CMakeLists.txt +++ b/hl/c++/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required (VERSION 3.2.2) +cmake_minimum_required (VERSION 3.3.2) PROJECT (HDF5_HL_CPP) #----------------------------------------------------------------------------- diff --git a/hl/c++/examples/CMakeLists.txt b/hl/c++/examples/CMakeLists.txt index 8c48795..bf96fba 100644 --- a/hl/c++/examples/CMakeLists.txt +++ b/hl/c++/examples/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required (VERSION 3.2.2) +cmake_minimum_required (VERSION 3.3.2) PROJECT (HDF5_HL_CPP_EXAMPLES) #----------------------------------------------------------------------------- diff --git a/hl/c++/src/CMakeLists.txt b/hl/c++/src/CMakeLists.txt index 70f0a79..0f187c5 100644 --- a/hl/c++/src/CMakeLists.txt +++ b/hl/c++/src/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required (VERSION 3.2.2) +cmake_minimum_required (VERSION 3.3.2) PROJECT (HDF5_HL_CPP_SRC) #----------------------------------------------------------------------------- diff --git a/hl/c++/test/CMakeLists.txt b/hl/c++/test/CMakeLists.txt index 54afd7c..28b5eb8 100644 --- a/hl/c++/test/CMakeLists.txt +++ b/hl/c++/test/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required (VERSION 3.2.2) +cmake_minimum_required (VERSION 3.3.2) PROJECT (HDF5_HL_CPP_TEST) #----------------------------------------------------------------------------- diff --git a/hl/examples/CMakeLists.txt b/hl/examples/CMakeLists.txt index 68f0128..dd94da0 100644 --- a/hl/examples/CMakeLists.txt +++ b/hl/examples/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required (VERSION 3.2.2) +cmake_minimum_required (VERSION 3.3.2) PROJECT (HDF5_HL_EXAMPLES ) #----------------------------------------------------------------------------- diff --git a/hl/fortran/CMakeLists.txt b/hl/fortran/CMakeLists.txt index 00d7517..37c5cc9 100644 --- a/hl/fortran/CMakeLists.txt +++ b/hl/fortran/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required (VERSION 3.2.2) +cmake_minimum_required (VERSION 3.3.2) PROJECT (HDF5_HL_F90 C CXX Fortran) #----------------------------------------------------------------------------- diff --git a/hl/fortran/examples/CMakeLists.txt b/hl/fortran/examples/CMakeLists.txt index d920d64..ff0403a 100644 --- a/hl/fortran/examples/CMakeLists.txt +++ b/hl/fortran/examples/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required (VERSION 3.2.2) +cmake_minimum_required (VERSION 3.3.2) PROJECT (HDF5_HL_F90_EXAMPLES C CXX Fortran) #----------------------------------------------------------------------------- diff --git a/hl/fortran/src/CMakeLists.txt b/hl/fortran/src/CMakeLists.txt index 5ad441c..7a2eff1 100644 --- a/hl/fortran/src/CMakeLists.txt +++ b/hl/fortran/src/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required (VERSION 3.2.2) +cmake_minimum_required (VERSION 3.3.2) PROJECT(HDF5_HL_F90_SRC C CXX Fortran) #----------------------------------------------------------------------------- diff --git a/hl/fortran/test/CMakeLists.txt b/hl/fortran/test/CMakeLists.txt index b264d5f..1ec4b93 100644 --- a/hl/fortran/test/CMakeLists.txt +++ b/hl/fortran/test/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required (VERSION 3.2.2) +cmake_minimum_required (VERSION 3.3.2) PROJECT (HDF5_HL_FORTRAN_TESTS C CXX Fortran) #----------------------------------------------------------------------------- diff --git a/hl/src/CMakeLists.txt b/hl/src/CMakeLists.txt index 3dd6ce8..d21a3ea 100644 --- a/hl/src/CMakeLists.txt +++ b/hl/src/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required (VERSION 3.2.2) +cmake_minimum_required (VERSION 3.3.2) PROJECT (HDF5_HL_SRC) #----------------------------------------------------------------------------- diff --git a/hl/test/CMakeLists.txt b/hl/test/CMakeLists.txt index 82a3c1b..1f2ea17 100644 --- a/hl/test/CMakeLists.txt +++ b/hl/test/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required (VERSION 3.2.2) +cmake_minimum_required (VERSION 3.3.2) PROJECT (HDF5_HL_TEST) # -------------------------------------------------------------------- # Notes: When creating unit test executables they should be prefixed diff --git a/hl/tools/CMakeLists.txt b/hl/tools/CMakeLists.txt index 43229e8..ab71a7e 100644 --- a/hl/tools/CMakeLists.txt +++ b/hl/tools/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required (VERSION 3.2.2) +cmake_minimum_required (VERSION 3.3.2) PROJECT (HDF5_HL_TOOLS C CXX) add_subdirectory (gif2h5) diff --git a/hl/tools/gif2h5/CMakeLists.txt b/hl/tools/gif2h5/CMakeLists.txt index 34d7074..b50bbf7 100644 --- a/hl/tools/gif2h5/CMakeLists.txt +++ b/hl/tools/gif2h5/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required (VERSION 3.2.2) +cmake_minimum_required (VERSION 3.3.2) PROJECT (HDF5_HL_TOOLS_GIF2H5) #----------------------------------------------------------------------------- diff --git a/hl/tools/h5watch/CMakeLists.txt b/hl/tools/h5watch/CMakeLists.txt index d0764c9..a1697cd 100644 --- a/hl/tools/h5watch/CMakeLists.txt +++ b/hl/tools/h5watch/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required (VERSION 3.2.2) +cmake_minimum_required (VERSION 3.3.2) PROJECT (HDF5_HL_TOOLS_H5WATCH) #----------------------------------------------------------------------------- diff --git a/java/CMakeLists.txt b/java/CMakeLists.txt index 9a5692f..d8cd358 100644 --- a/java/CMakeLists.txt +++ b/java/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.2.2) +cmake_minimum_required (VERSION 3.3.2) PROJECT ( HDF5_JAVA C Java ) set (CMAKE_MODULE_PATH "${HDF_RESOURCES_DIR};${HDF_RESOURCES_EXT_DIR}") diff --git a/java/examples/CMakeLists.txt b/java/examples/CMakeLists.txt index 3073918..d43b49f 100644 --- a/java/examples/CMakeLists.txt +++ b/java/examples/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required (VERSION 3.2.2) +cmake_minimum_required (VERSION 3.3.2) PROJECT (HDFJAVA_EXAMPLES) add_subdirectory (datasets) diff --git a/java/examples/datasets/CMakeLists.txt b/java/examples/datasets/CMakeLists.txt index 3e8bc8b..ed4559c 100644 --- a/java/examples/datasets/CMakeLists.txt +++ b/java/examples/datasets/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required (VERSION 3.2.2) +cmake_minimum_required (VERSION 3.3.2) PROJECT (HDFJAVA_EXAMPLES_DATASETS Java) set (CMAKE_VERBOSE_MAKEFILE 1) diff --git a/java/examples/datatypes/CMakeLists.txt b/java/examples/datatypes/CMakeLists.txt index b79ba64..71cf83e 100644 --- a/java/examples/datatypes/CMakeLists.txt +++ b/java/examples/datatypes/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required (VERSION 3.2.2) +cmake_minimum_required (VERSION 3.3.2) PROJECT (HDFJAVA_EXAMPLES_DATATYPES Java) set (CMAKE_VERBOSE_MAKEFILE 1) diff --git a/java/examples/groups/CMakeLists.txt b/java/examples/groups/CMakeLists.txt index 56c92fe..dc5d834 100644 --- a/java/examples/groups/CMakeLists.txt +++ b/java/examples/groups/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required (VERSION 3.2.2) +cmake_minimum_required (VERSION 3.3.2) PROJECT (HDFJAVA_EXAMPLES_GROUPS Java) set (CMAKE_VERBOSE_MAKEFILE 1) diff --git a/java/examples/intro/CMakeLists.txt b/java/examples/intro/CMakeLists.txt index 495ec5e..59fe48b 100644 --- a/java/examples/intro/CMakeLists.txt +++ b/java/examples/intro/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required (VERSION 3.2.2) +cmake_minimum_required (VERSION 3.3.2) PROJECT (HDFJAVA_EXAMPLES_INTRO Java) set (CMAKE_VERBOSE_MAKEFILE 1) diff --git a/java/src/CMakeLists.txt b/java/src/CMakeLists.txt index 9bdab4b..7075d32 100644 --- a/java/src/CMakeLists.txt +++ b/java/src/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.2.2) +cmake_minimum_required (VERSION 3.3.2) PROJECT ( HDF5_JAVA_SRC C Java ) #----------------------------------------------------------------------------- diff --git a/java/src/hdf/CMakeLists.txt b/java/src/hdf/CMakeLists.txt index 649f7d0..35b436d 100644 --- a/java/src/hdf/CMakeLists.txt +++ b/java/src/hdf/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required (VERSION 3.2.2) +cmake_minimum_required (VERSION 3.3.2) PROJECT (HDF5_JAVA_HDF) add_subdirectory (hdf5lib) diff --git a/java/src/hdf/hdf5lib/CMakeLists.txt b/java/src/hdf/hdf5lib/CMakeLists.txt index c856c04..1f2587e 100644 --- a/java/src/hdf/hdf5lib/CMakeLists.txt +++ b/java/src/hdf/hdf5lib/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required (VERSION 3.2.2) +cmake_minimum_required (VERSION 3.3.2) PROJECT (HDF5_JAVA_HDF_HDF5 Java) set (CMAKE_VERBOSE_MAKEFILE 1) diff --git a/java/src/jni/CMakeLists.txt b/java/src/jni/CMakeLists.txt index ea9665b..8ab275e 100644 --- a/java/src/jni/CMakeLists.txt +++ b/java/src/jni/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required (VERSION 3.2.2) +cmake_minimum_required (VERSION 3.3.2) PROJECT (HDF5_JAVA_JNI C CXX) set (HDF5_JAVA_JNI_CSRCS diff --git a/java/test/CMakeLists.txt b/java/test/CMakeLists.txt index 49cda32..329c602 100644 --- a/java/test/CMakeLists.txt +++ b/java/test/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required (VERSION 3.2.2) +cmake_minimum_required (VERSION 3.3.2) PROJECT (HDF5_JAVA_TEST Java) set (CMAKE_VERBOSE_MAKEFILE 1) diff --git a/release_docs/INSTALL_CMake.txt b/release_docs/INSTALL_CMake.txt index 5040cb7..a01ec49 100644 --- a/release_docs/INSTALL_CMake.txt +++ b/release_docs/INSTALL_CMake.txt @@ -564,7 +564,6 @@ HDF5_BUILD_TOOLS "Build HDF5 Tools" ON ALLOW_UNSUPPORTED "Allow unsupported combinations of configure options" OFF HDF5_DISABLE_COMPILER_WARNINGS "Disable compiler warnings" OFF HDF5_ENABLE_ALL_WARNINGS "Enable all warnings" OFF -HDF5_ENABLE_INSTRUMENT "Instrument The library" OFF HDF5_ENABLE_CODESTACK "Enable the function stack tracing (for developer debugging)." OFF HDF5_ENABLE_COVERAGE "Enable code coverage for Libraries and Programs" OFF HDF5_ENABLE_DEBUG_APIS "Turn on extra debug output in all packages" OFF @@ -584,6 +583,8 @@ HDF5_METADATA_TRACE_FILE "Enable metadata trace file collection" HDF5_NO_PACKAGES "Do not include CPack Packaging" OFF HDF5_PACK_EXAMPLES "Package the HDF5 Library Examples Compressed File" OFF HDF5_PACK_MACOSX_FRAMEWORK "Package the HDF5 Library in a Frameworks" OFF +HDF5_BUILD_FRAMEWORKS "TRUE to build as frameworks libraries, + FALSE to build according to BUILD_SHARED_LIBS" FALSE HDF5_PACKAGE_EXTLIBS "CPACK - include external libraries" OFF HDF5_STRICT_FORMAT_CHECKS "Whether to perform strict file format checks" OFF HDF_TEST_EXPRESS "Control testing framework (0-3)" "0" @@ -597,7 +598,7 @@ HDF5_ENABLE_THREADSAFE "Enable Threadsafety" if (APPLE) HDF5_BUILD_WITH_INSTALL_NAME "Build with library install_name set to the installation path" OFF if (CMAKE_BUILD_TYPE MATCHES Debug) - HDF5_ENABLE_TRACE "Enable API tracing capability" ON + HDF5_ENABLE_INSTRUMENT "Instrument The library" OFF if (HDF5_TEST_VFD) HDF5_TEST_FHEAP_VFD "Execute fheap test with different VFDs" ON @@ -647,7 +648,7 @@ adding an option (${CTEST_SCRIPT_ARG}) to the platform configuration script. ### ctest -S HDF5config.cmake,BUILD_GENERATOR=VS201764 -C Release -VV -O hdf5.log ### ############################################################################################# -cmake_minimum_required (VERSION 3.2.2 FATAL_ERROR) +cmake_minimum_required (VERSION 3.3.2 FATAL_ERROR) ############################################################################ # Usage: # ctest -S HDF5config.cmake,OPTION=VALUE -C Release -VV -O test.log diff --git a/release_docs/USING_HDF5_CMake.txt b/release_docs/USING_HDF5_CMake.txt index fc62b75..8dd47c2 100644 --- a/release_docs/USING_HDF5_CMake.txt +++ b/release_docs/USING_HDF5_CMake.txt @@ -229,7 +229,7 @@ your application with an installed HDF5 binary. ctest use of HDF5_Examples.cmake and HDF5_Examples_options.cmake ======================================================================== -cmake_minimum_required(VERSION 3.2.2 FATAL_ERROR) +cmake_minimum_required (VERSION 3.3.2 FATAL_ERROR) ############################################################################################################### # This script will build and run the examples from a folder # Execute from a command line: diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index aaedfda..bf7fb07 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required (VERSION 3.2.2) +cmake_minimum_required (VERSION 3.3.2) PROJECT (HDF5_SRC C CXX) #----------------------------------------------------------------------------- diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index 5e0c990..fd88b5f 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required (VERSION 3.2.2) +cmake_minimum_required (VERSION 3.3.2) PROJECT (HDF5_TEST) #----------------------------------------------------------------------------- @@ -13,9 +13,9 @@ set (srcdir ${CMAKE_CURRENT_SOURCE_DIR}) configure_file (${HDF5_TEST_SOURCE_DIR}/H5srcdir_str.h.in H5srcdir_str.h @ONLY) INCLUDE_DIRECTORIES (${CMAKE_CURRENT_BINARY_DIR}) -#----------------------------------------------------------------------------- +################################################################################# # Define Test Library Sources -#----------------------------------------------------------------------------- +################################################################################# set (TEST_LIB_SOURCES ${HDF5_TEST_SOURCE_DIR}/h5test.c ${HDF5_TEST_SOURCE_DIR}/testframe.c @@ -71,9 +71,9 @@ if (BUILD_SHARED_LIBS) endif () endif () -#----------------------------------------------------------------------------- +################################################################################# # If filter plugin tests can be tested -#----------------------------------------------------------------------------- +################################################################################# # make plugins dir file (MAKE_DIRECTORY "${CMAKE_BINARY_DIR}/filter_plugin_dir1") file (MAKE_DIRECTORY "${CMAKE_BINARY_DIR}/filter_plugin_dir2") @@ -116,7 +116,7 @@ endif () ) endforeach () - foreach ( plugin_name ${FILTER_PLUGINS_FOR_DIR2}) + foreach (plugin_name ${FILTER_PLUGINS_FOR_DIR2}) set (HDF5_TEST_PLUGIN_CORENAME "${plugin_name}") set (HDF5_TEST_PLUGIN_NAME "${HDF5_EXTERNAL_LIB_PREFIX}${HDF5_TEST_PLUGIN_CORENAME}") set (HDF5_TEST_PLUGIN_TARGET ${HDF5_TEST_PLUGIN_CORENAME}) @@ -142,6 +142,10 @@ endif () ) endforeach () +################################################################################# +# Test program sources +################################################################################# + set (testhdf5_SOURCES ${HDF5_TEST_SOURCE_DIR}/testhdf5.c ${HDF5_TEST_SOURCE_DIR}/tarray.c @@ -170,34 +174,24 @@ set (testhdf5_SOURCES ${HDF5_TEST_SOURCE_DIR}/tvlstr.c ) -#-- Adding test for testhdf5 -add_executable (testhdf5 ${testhdf5_SOURCES}) -TARGET_C_PROPERTIES (testhdf5 STATIC " " " ") -target_link_libraries (testhdf5 ${HDF5_TEST_LIB_TARGET}) -set_target_properties (testhdf5 PROPERTIES FOLDER test) -if (BUILD_SHARED_LIBS) - add_executable (testhdf5-shared ${testhdf5_SOURCES}) - TARGET_C_PROPERTIES (testhdf5-shared SHARED " " " ") - target_link_libraries (testhdf5-shared PUBLIC ${HDF5_TEST_LIBSH_TARGET}) - set_target_properties (testhdf5-shared PROPERTIES FOLDER test) -endif () +set (cache_image_SOURCES + ${HDF5_TEST_SOURCE_DIR}/cache_image.c + ${HDF5_TEST_SOURCE_DIR}/genall5.c +) -MACRO (ADD_H5_EXE file) - add_executable (${file} ${HDF5_TEST_SOURCE_DIR}/${file}.c) - TARGET_C_PROPERTIES (${file} STATIC " " " ") - target_link_libraries (${file} PUBLIC ${HDF5_TEST_LIB_TARGET}) - set_target_properties (${file} PROPERTIES FOLDER test) - if (BUILD_SHARED_LIBS) - add_executable (${file}-shared ${HDF5_TEST_SOURCE_DIR}/${file}.c) - TARGET_C_PROPERTIES (${file}-shared SHARED " " " ") - target_link_libraries (${file}-shared PUBLIC ${HDF5_TEST_LIBSH_TARGET}) - set_target_properties (${file}-shared PROPERTIES FOLDER test) - endif () -ENDMACRO () +set (ttsafe_SOURCES + ${HDF5_TEST_SOURCE_DIR}/ttsafe.c + ${HDF5_TEST_SOURCE_DIR}/ttsafe_dcreate.c + ${HDF5_TEST_SOURCE_DIR}/ttsafe_error.c + ${HDF5_TEST_SOURCE_DIR}/ttsafe_cancel.c + ${HDF5_TEST_SOURCE_DIR}/ttsafe_acreate.c +) set (H5_TESTS + testhdf5 # multiple source cache cache_api + cache_image # multiple source cache_tagging lheap ohdr @@ -210,9 +204,11 @@ set (H5_TESTS fheap pool accum + hyperslab istore bittests dt_arith + page_buffer dtypes dsets cmpd_dset @@ -233,6 +229,7 @@ set (H5_TESTS app_ref enum set_extent + ttsafe # multiple source enc_dec_plist enc_dec_plist_cross_platform getname @@ -244,7 +241,6 @@ set (H5_TESTS cross_read freespace mf - page_buffer vds file_image unregister @@ -253,98 +249,66 @@ set (H5_TESTS swmr ) -foreach (test ${H5_TESTS}) - ADD_H5_EXE(${test}) -endforeach () - -set (H5_SWMR_TESTS - swmr_addrem_writer - swmr_check_compat_vfd - swmr_generator - swmr_reader - swmr_remove_reader - swmr_remove_writer - swmr_sparse_reader - swmr_sparse_writer - swmr_start_write - swmr_writer -) - -foreach (test ${H5_SWMR_TESTS}) - ADD_H5_EXE(${test}) -endforeach () +macro (ADD_H5_EXE file) + add_executable (${file} ${HDF5_TEST_SOURCE_DIR}/${file}.c) + TARGET_C_PROPERTIES (${file} STATIC " " " ") + target_link_libraries (${file} PUBLIC ${HDF5_TEST_LIB_TARGET}) + set_target_properties (${file} PROPERTIES FOLDER test) + if (BUILD_SHARED_LIBS) + add_executable (${file}-shared ${HDF5_TEST_SOURCE_DIR}/${file}.c) + TARGET_C_PROPERTIES (${file}-shared SHARED " " " ") + target_link_libraries (${file}-shared PUBLIC ${HDF5_TEST_LIBSH_TARGET}) + set_target_properties (${file}-shared PROPERTIES FOLDER test) + endif () +endmacro () -set (H5_VDS_SWMR_TESTS - vds_swmr_gen - vds_swmr_reader - vds_swmr_writer +set (H5_TESTS_MULTIPLE + testhdf5 + cache_image + ttsafe ) - -foreach (test ${H5_VDS_SWMR_TESTS}) - ADD_H5_EXE(${test}) +# Only build single source tests here +foreach (test ${H5_TESTS}) + if (NOT ${test} IN_LIST H5_TESTS_MULTIPLE) + ADD_H5_EXE(${test}) + endif () endforeach () ############################################################################## +### M U L T I P L E S O U R C E T E S T S ### ############################################################################## -### A D D I T I O N A L T E S T S ### -############################################################################## -############################################################################## + +#-- Adding test for testhdf5 +add_executable (testhdf5 ${testhdf5_SOURCES}) +TARGET_C_PROPERTIES (testhdf5 STATIC " " " ") +target_link_libraries (testhdf5 ${HDF5_TEST_LIB_TARGET}) +set_target_properties (testhdf5 PROPERTIES FOLDER test) +if (BUILD_SHARED_LIBS) + add_executable (testhdf5-shared ${testhdf5_SOURCES}) + TARGET_C_PROPERTIES (testhdf5-shared SHARED " " " ") + target_link_libraries (testhdf5-shared PUBLIC ${HDF5_TEST_LIBSH_TARGET}) + set_target_properties (testhdf5-shared PROPERTIES FOLDER test) +endif () #-- Adding test for cache_image -add_executable (cache_image - ${HDF5_TEST_SOURCE_DIR}/cache_image.c - ${HDF5_TEST_SOURCE_DIR}/genall5.c -) +add_executable (cache_image ${cache_image_SOURCES}) TARGET_C_PROPERTIES (cache_image STATIC " " " ") target_link_libraries (cache_image ${HDF5_LIB_TARGET} ${HDF5_TEST_LIB_TARGET}) set_target_properties (cache_image PROPERTIES FOLDER test) if (BUILD_SHARED_LIBS) - add_executable (cache_image-shared - ${HDF5_TEST_SOURCE_DIR}/cache_image.c - ${HDF5_TEST_SOURCE_DIR}/genall5.c - ) + add_executable (cache_image-shared ${cache_image_SOURCES}) TARGET_C_PROPERTIES (cache_image-shared SHARED " " " ") target_link_libraries (cache_image-shared ${HDF5_TEST_LIBSH_TARGET} ${HDF5_LIBSH_TARGET}) set_target_properties (cache_image-shared PROPERTIES FOLDER test) endif () -#-- Adding test for hyperslab -add_executable (hyperslab ${HDF5_TEST_SOURCE_DIR}/hyperslab.c) -TARGET_C_PROPERTIES (hyperslab STATIC " " " ") -target_link_libraries (hyperslab ${HDF5_LIB_TARGET} ${HDF5_TEST_LIB_TARGET}) -set_target_properties (hyperslab PROPERTIES FOLDER test) -if (BUILD_SHARED_LIBS) - add_executable (hyperslab-shared ${HDF5_TEST_SOURCE_DIR}/hyperslab.c) - TARGET_C_PROPERTIES (hyperslab-shared SHARED " " " ") - target_link_libraries (hyperslab-shared ${HDF5_TEST_LIBSH_TARGET} ${HDF5_LIBSH_TARGET}) - set_target_properties (hyperslab-shared PROPERTIES FOLDER test) - if (HDF5_ENABLE_THREADSAFE) - set_property (TARGET hyperslab-shared - APPEND PROPERTY COMPILE_DEFINITIONS - "H5_HAVE_THREADSAFE" - ) - endif () -endif () - #-- Adding test for ttsafe -add_executable (ttsafe - ${HDF5_TEST_SOURCE_DIR}/ttsafe.c - ${HDF5_TEST_SOURCE_DIR}/ttsafe_dcreate.c - ${HDF5_TEST_SOURCE_DIR}/ttsafe_error.c - ${HDF5_TEST_SOURCE_DIR}/ttsafe_cancel.c - ${HDF5_TEST_SOURCE_DIR}/ttsafe_acreate.c -) +add_executable (ttsafe ${ttsafe_SOURCES}) TARGET_C_PROPERTIES (ttsafe STATIC " " " ") target_link_libraries (ttsafe ${HDF5_LIB_TARGET} ${HDF5_TEST_LIB_TARGET}) set_target_properties (ttsafe PROPERTIES FOLDER test) if (BUILD_SHARED_LIBS) - add_executable (ttsafe-shared - ${HDF5_TEST_SOURCE_DIR}/ttsafe.c - ${HDF5_TEST_SOURCE_DIR}/ttsafe_dcreate.c - ${HDF5_TEST_SOURCE_DIR}/ttsafe_error.c - ${HDF5_TEST_SOURCE_DIR}/ttsafe_cancel.c - ${HDF5_TEST_SOURCE_DIR}/ttsafe_acreate.c - ) + add_executable (ttsafe-shared ${ttsafe_SOURCES}) TARGET_C_PROPERTIES (ttsafe-shared SHARED " " " ") target_link_libraries (ttsafe-shared ${HDF5_TEST_LIBSH_TARGET} ${HDF5_LIBSH_TARGET}) set_target_properties (ttsafe-shared PROPERTIES FOLDER test) @@ -356,6 +320,10 @@ if (BUILD_SHARED_LIBS) endif () endif () +############################################################################## +### A D D I T I O N A L T E S T S ### +############################################################################## + set (H5_CHECK_TESTS error_test err_compat @@ -364,14 +332,57 @@ set (H5_CHECK_TESTS atomic_writer atomic_reader links_env - flushrefresh filenotclosed + flushrefresh ) foreach (test ${H5_CHECK_TESTS}) ADD_H5_EXE(${test}) endforeach () +#-- Adding test for libinfo +set (GREP_RUNNER ${PROJECT_BINARY_DIR}/GrepRunner.cmake) +file (WRITE ${GREP_RUNNER} + "file (STRINGS \${TEST_PROGRAM} TEST_RESULT REGEX \"SUMMARY OF THE HDF5 CONFIGURATION\") +if (\${TEST_RESULT} STREQUAL \"0\") + message (FATAL_ERROR \"Failed: The output: \${TEST_RESULT} of \${TEST_PROGRAM} did not contain SUMMARY OF THE HDF5 CONFIGURATION\") +else () + message (STATUS \"COMMAND Result: \${TEST_RESULT}\") +endif () +" +) + +############################################################################## +### S W I M M E R T E S T S ### +############################################################################## + +set (H5_SWMR_TESTS + swmr_addrem_writer + swmr_check_compat_vfd + swmr_generator + swmr_reader + swmr_remove_reader + swmr_remove_writer + swmr_sparse_reader + swmr_sparse_writer + swmr_start_write + swmr_writer +) + +foreach (test ${H5_SWMR_TESTS}) + ADD_H5_EXE(${test}) +endforeach () + +set (H5_VDS_SWMR_TESTS + vds_swmr_gen + vds_swmr_reader + vds_swmr_writer +) + +foreach (test ${H5_VDS_SWMR_TESTS}) + ADD_H5_EXE(${test}) +endforeach () + #-- Adding test for accum_swmr_reader # This has to be copied to the test directory for execve() to find it # and it can't be renamed (i.e., no -shared). @@ -386,18 +397,6 @@ if (BUILD_SHARED_LIBS) set_target_properties (accum-shared PROPERTIES DEPENDS accum_swmr_reader) endif () -#-- Adding test for libinfo -set (GREP_RUNNER ${PROJECT_BINARY_DIR}/GrepRunner.cmake) -file (WRITE ${GREP_RUNNER} - "file (STRINGS \${TEST_PROGRAM} TEST_RESULT REGEX \"SUMMARY OF THE HDF5 CONFIGURATION\") -if (\${TEST_RESULT} STREQUAL \"0\") - message (FATAL_ERROR \"Failed: The output: \${TEST_RESULT} of \${TEST_PROGRAM} did not contain SUMMARY OF THE HDF5 CONFIGURATION\") -else () - message (STATUS \"COMMAND Result: \${TEST_RESULT}\") -endif () -" -) - ############################################################################## ### P L U G I N T E S T S ############################################################################## diff --git a/test/CMakeTests.cmake b/test/CMakeTests.cmake index e6b364c..221b857 100644 --- a/test/CMakeTests.cmake +++ b/test/CMakeTests.cmake @@ -26,27 +26,6 @@ if (BUILD_SHARED_LIBS) file (MAKE_DIRECTORY "${PROJECT_BINARY_DIR}/H5TEST-shared/testfiles/plist_files") endif () -if (HDF5_TEST_VFD) - set (VFD_LIST - sec2 - stdio - core - core_paged - split - multi - family - ) - if (DIRECT_VFD) - set (VFD_LIST ${VFD_LIST} direct) - endif () - foreach (vfdtest ${VFD_LIST}) - file (MAKE_DIRECTORY "${PROJECT_BINARY_DIR}/${vfdtest}") - #if (BUILD_SHARED_LIBS) - # file (MAKE_DIRECTORY "${PROJECT_BINARY_DIR}/${vfdtest}-shared") - #endif () - endforeach () -endif () - # -------------------------------------------------------------------- # Copy all the HDF5 files from the source directory into the test directory # -------------------------------------------------------------------- @@ -75,16 +54,6 @@ foreach (h5_tfile ${HDF5_TEST_FILES}) HDFTEST_COPY_FILE("${HDF5_TOOLS_DIR}/testfiles/${h5_tfile}" "${PROJECT_BINARY_DIR}/H5TEST-shared/${h5_tfile}" "HDF5_TEST_LIBSH_files") endif () endforeach () -if (HDF5_TEST_VFD) - foreach (vfdtest ${VFD_LIST}) - foreach (h5_tfile ${HDF5_TEST_FILES}) - HDFTEST_COPY_FILE("${HDF5_TOOLS_DIR}/testfiles/${h5_tfile}" "${PROJECT_BINARY_DIR}/${vfdtest}/${h5_tfile}" "HDF5_TEST_LIB_files") - if (BUILD_SHARED_LIBS) - HDFTEST_COPY_FILE("${HDF5_TOOLS_DIR}/testfiles/${h5_tfile}" "${PROJECT_BINARY_DIR}/${vfdtest}-shared/${h5_tfile}" "HDF5_TEST_LIBSH_files") - endif () - endforeach () - endforeach () -endif () # -------------------------------------------------------------------- # Copy all the HDF5 files from the test directory into the source directory @@ -103,16 +72,6 @@ foreach (ref_file ${HDF5_REFERENCE_FILES}) HDFTEST_COPY_FILE("${HDF5_TEST_SOURCE_DIR}/testfiles/${ref_file}" "${PROJECT_BINARY_DIR}/H5TEST-shared/${ref_file}" "HDF5_TEST_LIBSH_files") endif () endforeach () -if (HDF5_TEST_VFD) - foreach (vfdtest ${VFD_LIST}) - foreach (ref_file ${HDF5_REFERENCE_FILES}) - HDFTEST_COPY_FILE("${HDF5_TEST_SOURCE_DIR}/testfiles/${ref_file}" "${PROJECT_BINARY_DIR}/${vfdtest}/${ref_file}" "HDF5_TEST_LIB_files") - if (BUILD_SHARED_LIBS) - HDFTEST_COPY_FILE("${HDF5_TEST_SOURCE_DIR}/testfiles/${ref_file}" "${PROJECT_BINARY_DIR}/${vfdtest}-shared/${ref_file}" "HDF5_TEST_LIBSH_files") - endif () - endforeach () - endforeach () -endif () # -------------------------------------------------------------------- # Copy test files from test/testfiles/plist_files dir to test dir @@ -238,16 +197,7 @@ foreach (h5_file ${HDF5_REFERENCE_TEST_FILES}) HDFTEST_COPY_FILE("${HDF5_TEST_SOURCE_DIR}/${h5_file}" "${HDF5_TEST_BINARY_DIR}/H5TEST-shared/${h5_file}" "HDF5_TEST_LIBSH_files") endif () endforeach () -if (HDF5_TEST_VFD) - foreach (vfdtest ${VFD_LIST}) - foreach (h5_file ${HDF5_REFERENCE_TEST_FILES}) - HDFTEST_COPY_FILE("${HDF5_TEST_SOURCE_DIR}/${h5_file}" "${HDF5_TEST_BINARY_DIR}/${vfdtest}/${h5_file}" "HDF5_TEST_LIB_files") - if (BUILD_SHARED_LIBS) - HDFTEST_COPY_FILE("${HDF5_TEST_SOURCE_DIR}/${h5_file}" "${HDF5_TEST_BINARY_DIR}/${vfdtest}-shared/${h5_file}" "HDF5_TEST_LIBSH_files") - endif () - endforeach () - endforeach () -endif () + add_custom_target(HDF5_TEST_LIB_files ALL COMMENT "Copying files needed by HDF5_TEST_LIB tests" DEPENDS ${HDF5_TEST_LIB_files_list}) if (BUILD_SHARED_LIBS) add_custom_target(HDF5_TEST_LIBSH_files ALL COMMENT "Copying files needed by HDF5_TEST_LIBSH tests" DEPENDS ${HDF5_TEST_LIBSH_files_list}) @@ -593,97 +543,43 @@ add_test (NAME H5TEST-clear-objects ${HDF5_TEST_BINARY_DIR}/H5TEST ) -set (H5TEST_TESTS - #testhdf5 - #cache - cache_api - cache_tagging - lheap - ohdr - stab - gheap - evict_on_close - farray - earray - btree2 - fheap - pool - accum - #hyperslab - istore - bittests - dt_arith - dtypes - dsets - cmpd_dset - filter_fail - extend - external - efc - objcopy - links - unlink - twriteorder - big - mtime - fillval - mount - flush1 - flush2 - app_ref - enum - set_extent - ttsafe - enc_dec_plist - enc_dec_plist_cross_platform - getname - vfd - ntypes - dangle - dtransform - reserved - cross_read - freespace - mf - page_buffer - vds - file_image - unregister - cache_logging - cork - swmr +set (H5TEST_SEPARATE_TESTS + testhdf5 + cache + cache_image ) - -foreach (test ${H5TEST_TESTS}) - if (HDF5_ENABLE_USING_MEMCHECKER) - add_test (NAME H5TEST-${test} COMMAND $) - set_tests_properties (H5TEST-${test} PROPERTIES - DEPENDS H5TEST-clear-objects - ENVIRONMENT "srcdir=${HDF5_TEST_BINARY_DIR}/H5TEST" - WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/H5TEST - ) - else () - if ("${test}" STREQUAL "big" AND CYGWIN) - add_test (NAME H5TEST-${test} - COMMAND ${CMAKE_COMMAND} -E echo "SKIP ${test}" +foreach (test ${H5_TESTS}) + if (NOT ${test} IN_LIST H5TEST_SEPARATE_TESTS) + if (HDF5_ENABLE_USING_MEMCHECKER) + add_test (NAME H5TEST-${test} COMMAND $) + set_tests_properties (H5TEST-${test} PROPERTIES + DEPENDS H5TEST-clear-objects + ENVIRONMENT "srcdir=${HDF5_TEST_BINARY_DIR}/H5TEST" + WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/H5TEST ) else () - add_test (NAME H5TEST-${test} COMMAND "${CMAKE_COMMAND}" - -D "TEST_PROGRAM=$" - -D "TEST_ARGS:STRING=" - -D "TEST_EXPECT=0" - -D "TEST_SKIP_COMPARE=TRUE" - -D "TEST_OUTPUT=${test}.txt" - #-D "TEST_REFERENCE=${test}.out" - -D "TEST_FOLDER=${HDF5_TEST_BINARY_DIR}/H5TEST" - -P "${HDF_RESOURCES_EXT_DIR}/runTest.cmake" + if ("${test}" STREQUAL "big" AND CYGWIN) + add_test (NAME H5TEST-${test} + COMMAND ${CMAKE_COMMAND} -E echo "SKIP ${test}" + ) + else () + add_test (NAME H5TEST-${test} COMMAND "${CMAKE_COMMAND}" + -D "TEST_PROGRAM=$" + -D "TEST_ARGS:STRING=" + -D "TEST_EXPECT=0" + -D "TEST_SKIP_COMPARE=TRUE" + -D "TEST_OUTPUT=${test}.txt" + #-D "TEST_REFERENCE=${test}.out" + -D "TEST_FOLDER=${HDF5_TEST_BINARY_DIR}/H5TEST" + -P "${HDF_RESOURCES_EXT_DIR}/runTest.cmake" + ) + endif () + set_tests_properties (H5TEST-${test} PROPERTIES + DEPENDS H5TEST-clear-objects + ENVIRONMENT "srcdir=${HDF5_TEST_BINARY_DIR}/H5TEST" + WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/H5TEST ) endif () - set_tests_properties (H5TEST-${test} PROPERTIES - DEPENDS H5TEST-clear-objects - ENVIRONMENT "srcdir=${HDF5_TEST_BINARY_DIR}/H5TEST" - WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/H5TEST - ) endif () endforeach () @@ -703,28 +599,30 @@ if (BUILD_SHARED_LIBS) ${HDF5_TEST_BINARY_DIR}/H5TEST-shared ) - foreach (test ${H5TEST_TESTS}) - if ("${test}" STREQUAL "big" AND CYGWIN) - add_test (NAME H5TEST-shared-${test} - COMMAND ${CMAKE_COMMAND} -E echo "SKIP ${test}-shared" - ) - else () - add_test (NAME H5TEST-shared-${test} COMMAND "${CMAKE_COMMAND}" - -D "TEST_PROGRAM=$" - -D "TEST_ARGS:STRING=" - -D "TEST_EXPECT=0" - -D "TEST_SKIP_COMPARE=TRUE" - -D "TEST_OUTPUT=${test}.txt" - #-D "TEST_REFERENCE=${test}.out" - -D "TEST_FOLDER=${HDF5_TEST_BINARY_DIR}/H5TEST-shared" - -P "${HDF_RESOURCES_EXT_DIR}/runTest.cmake" + foreach (test ${H5_TESTS}) + if (NOT ${test} IN_LIST H5TEST_SEPARATE_TESTS) + if ("${test}" STREQUAL "big" AND CYGWIN) + add_test (NAME H5TEST-shared-${test} + COMMAND ${CMAKE_COMMAND} -E echo "SKIP ${test}-shared" + ) + else () + add_test (NAME H5TEST-shared-${test} COMMAND "${CMAKE_COMMAND}" + -D "TEST_PROGRAM=$" + -D "TEST_ARGS:STRING=" + -D "TEST_EXPECT=0" + -D "TEST_SKIP_COMPARE=TRUE" + -D "TEST_OUTPUT=${test}.txt" + #-D "TEST_REFERENCE=${test}.out" + -D "TEST_FOLDER=${HDF5_TEST_BINARY_DIR}/H5TEST-shared" + -P "${HDF_RESOURCES_EXT_DIR}/runTest.cmake" + ) + endif () + set_tests_properties (H5TEST-shared-${test} PROPERTIES + DEPENDS H5TEST-shared-clear-objects + ENVIRONMENT "srcdir=${HDF5_TEST_BINARY_DIR}/H5TEST-shared" + WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/H5TEST-shared ) endif () - set_tests_properties (H5TEST-shared-${test} PROPERTIES - DEPENDS H5TEST-shared-clear-objects - ENVIRONMENT "srcdir=${HDF5_TEST_BINARY_DIR}/H5TEST-shared" - WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/H5TEST-shared - ) endforeach () set_tests_properties (H5TEST-shared-flush2 PROPERTIES DEPENDS H5TEST-shared-flush1) @@ -734,12 +632,6 @@ if (BUILD_SHARED_LIBS) set_tests_properties (H5TEST-shared-objcopy PROPERTIES TIMEOUT 1800) endif () -############################################################################## -############################################################################## -### A D D I T I O N A L T E S T S ### -############################################################################## -############################################################################## - #-- Adding test for cache if (NOT CYGWIN) add_test (NAME H5TEST-clear-cache-objects @@ -787,6 +679,73 @@ set_tests_properties (H5TEST-cache_image PROPERTIES WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/H5TEST ) +if (BUILD_SHARED_LIBS) + #-- Adding test for cache + if (NOT CYGWIN AND NOT WIN32) + add_test (NAME H5TEST-shared-clear-cache-objects + COMMAND ${CMAKE_COMMAND} + -E remove + cache_test.h5 + WORKING_DIRECTORY + ${HDF5_TEST_BINARY_DIR}/H5TEST-shared + ) + if (HDF5_ENABLE_USING_MEMCHECKER) + add_test (NAME H5TEST-shared-cache COMMAND $) + else () + add_test (NAME H5TEST-shared-cache COMMAND "${CMAKE_COMMAND}" + -D "TEST_PROGRAM=$" + -D "TEST_ARGS:STRING=" + -D "TEST_EXPECT=0" + -D "TEST_SKIP_COMPARE=TRUE" + -D "TEST_OUTPUT=cache-shared.txt" + #-D "TEST_REFERENCE=cache-shared.out" + -D "TEST_FOLDER=${HDF5_TEST_BINARY_DIR}/H5TEST-shared" + -P "${HDF_RESOURCES_EXT_DIR}/runTest.cmake" + ) + endif () + set_tests_properties (H5TEST-shared-cache PROPERTIES + DEPENDS H5TEST-shared-clear-cache-objects + ENVIRONMENT "srcdir=${HDF5_TEST_BINARY_DIR}/H5TEST-shared;HDF5TestExpress=${HDF_TEST_EXPRESS}" + WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/H5TEST-shared + ) + set_tests_properties (H5TEST-shared-cache PROPERTIES TIMEOUT 1800) + endif () +endif () + + +############################################################################## +############################################################################## +### A D D I T I O N A L T E S T S ### +############################################################################## +############################################################################## +# H5_CHECK_TESTS +#--------------- +# error_test +# err_compat +# tcheck_version +# testmeta +# atomic_writer +# atomic_reader +# links_env +# filenotclosed +# flushrefresh +############################################################################## +# autotools script tests +# error_test and err_compat are built at the same time as the other tests, but executed by testerror.sh. +# NOT CONVERTED tcheck_version is used by testcheck_version.sh. +# NOT CONVERTED accum_swmr_reader is used by accum.c. +# NOT CONVERTED atomic_writer and atomic_reader are standalone programs. +# links_env is used by testlinks_env.sh +# filenotclosed is used by test_filenotclosed.sh +# NOT CONVERTED flushrefresh is used by testflushrefresh.sh. +# NOT CONVERTED use_append_chunk, use_append_mchunks and use_disable_mdc_flushes are used by test_usecases.sh +# NOT CONVERTED swmr_* files (besides swmr.c) are used by testswmr.sh. +# NOT CONVERTED vds_swmr_* files are used by testvdsswmr.sh +# NOT CONVERTED 'make check' doesn't run them directly, so they are not included in TEST_PROG. +# NOT CONVERTED Also build testmeta, which is used for timings test. It builds quickly, +# NOT CONVERTED and this lets automake keep all its test programs in one place. +############################################################################## + #-- Adding test for filenotclosed add_test ( NAME H5TEST-clear-filenotclosed-objects @@ -899,37 +858,6 @@ add_test (NAME H5TEST-testlibinfo ) if (BUILD_SHARED_LIBS) - #-- Adding test for cache - if (NOT CYGWIN AND NOT WIN32) - add_test (NAME H5TEST-shared-clear-cache-objects - COMMAND ${CMAKE_COMMAND} - -E remove - cache_test.h5 - WORKING_DIRECTORY - ${HDF5_TEST_BINARY_DIR}/H5TEST-shared - ) - if (HDF5_ENABLE_USING_MEMCHECKER) - add_test (NAME H5TEST-shared-cache COMMAND $) - else () - add_test (NAME H5TEST-shared-cache COMMAND "${CMAKE_COMMAND}" - -D "TEST_PROGRAM=$" - -D "TEST_ARGS:STRING=" - -D "TEST_EXPECT=0" - -D "TEST_SKIP_COMPARE=TRUE" - -D "TEST_OUTPUT=cache-shared.txt" - #-D "TEST_REFERENCE=cache-shared.out" - -D "TEST_FOLDER=${HDF5_TEST_BINARY_DIR}/H5TEST-shared" - -P "${HDF_RESOURCES_EXT_DIR}/runTest.cmake" - ) - endif () - set_tests_properties (H5TEST-shared-cache PROPERTIES - DEPENDS H5TEST-shared-clear-cache-objects - ENVIRONMENT "srcdir=${HDF5_TEST_BINARY_DIR}/H5TEST-shared;HDF5TestExpress=${HDF_TEST_EXPRESS}" - WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/H5TEST-shared - ) - set_tests_properties (H5TEST-shared-cache PROPERTIES TIMEOUT 1800) - endif () - #-- Adding test for err_compat if (HDF5_ENABLE_DEPRECATED_SYMBOLS) add_test (NAME H5TEST-shared-clear-err_compat-objects @@ -1068,272 +996,7 @@ set_tests_properties (H5PLUGIN-filter_plugin PROPERTIES ############################################################################## if (HDF5_TEST_VFD) - - set (H5_VFD_TESTS - testhdf5 -# cache - cache_api - cache_tagging - lheap - ohdr - stab - gheap - evict_on_close - pool -# accum - farray - earray - btree2 -# fheap - hyperslab - istore - bittests - dt_arith - dtypes - dsets - cmpd_dset - filter_fail - extend - external - efc - objcopy - links - unlink -# big - mtime - fillval - mount - flush1 - flush2 - app_ref - enum - set_extent - ttsafe - getname -# vfd - ntypes - dangle - dtransform - reserved - cross_read - freespace - mf -# error_test -# err_compat - #tcheck_version -# testmeta -# links_env - unregister - ) - if (NOT CYGWIN) - set (H5_VFD_TESTS ${H5_VFD_TESTS} big cache) - endif () - - # Windows only macro - macro (CHECK_VFD_TEST vfdtest vfdname resultcode) - if ("${vfdtest}" STREQUAL "flush1" OR "${vfdtest}" STREQUAL "flush2") - if ("${vfdname}" STREQUAL "multi" OR "${vfdname}" STREQUAL "split") - if (NOT BUILD_SHARED_LIBS AND NOT ${HDF_CFG_NAME} MATCHES "Debug") - add_test (NAME VFD-${vfdname}-${vfdtest} - COMMAND "${CMAKE_COMMAND}" - -D "TEST_PROGRAM=$" - -D "TEST_ARGS:STRING=" - -D "TEST_VFD:STRING=${vfdname}" - -D "TEST_EXPECT=${resultcode}" - -D "TEST_OUTPUT=${vfdname}-${vfdtest}" - -D "TEST_FOLDER=${PROJECT_BINARY_DIR}/${vfdname}" - -P "${HDF_RESOURCES_DIR}/vfdTest.cmake" - ) - set_tests_properties (VFD-${vfdname}-${vfdtest} PROPERTIES - ENVIRONMENT "srcdir=${HDF5_TEST_BINARY_DIR}/${vfdname}" - WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/${vfdname} - ) - if (BUILD_SHARED_LIBS) - add_test (NAME VFD-${vfdname}-${test}-shared - COMMAND "${CMAKE_COMMAND}" - -D "TEST_PROGRAM=$" - -D "TEST_ARGS:STRING=" - -D "TEST_VFD:STRING=${vfdname}" - -D "TEST_EXPECT=${resultcode}" - -D "TEST_OUTPUT=${vfdname}-${vfdtest}-shared" - -D "TEST_FOLDER=${PROJECT_BINARY_DIR}/${vfdname}-shared" - -P "${HDF_RESOURCES_DIR}/vfdTest.cmake" - ) - set_tests_properties (VFD-${vfdname}-${vfdtest}-shared PROPERTIES - ENVIRONMENT "srcdir=${HDF5_TEST_BINARY_DIR}/${vfdname}-shared" - WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/${vfdname}-shared - ) - endif () - else () - add_test (NAME VFD-${vfdname}-${vfdtest} - COMMAND ${CMAKE_COMMAND} -E echo "SKIP VFD-${vfdname}-${vfdtest}" - ) - if (BUILD_SHARED_LIBS) - add_test (NAME VFD-${vfdname}-${test}-shared - COMMAND ${CMAKE_COMMAND} -E echo "SKIP VFD-${vfdname}-${vfdtest}-shared" - ) - endif () - endif () - else () - add_test (NAME VFD-${vfdname}-${vfdtest} - COMMAND "${CMAKE_COMMAND}" - -D "TEST_PROGRAM=$" - -D "TEST_ARGS:STRING=" - -D "TEST_VFD:STRING=${vfdname}" - -D "TEST_EXPECT=${resultcode}" - -D "TEST_OUTPUT=${vfdname}-${vfdtest}" - -D "TEST_FOLDER=${PROJECT_BINARY_DIR}/${vfdname}" - -P "${HDF_RESOURCES_DIR}/vfdTest.cmake" - ) - set_tests_properties (VFD-${vfdname}-${vfdtest} PROPERTIES - ENVIRONMENT "srcdir=${HDF5_TEST_BINARY_DIR}/${vfdname}" - WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/${vfdname} - ) - if (BUILD_SHARED_LIBS) - add_test (NAME VFD-${vfdname}-${test}-shared - COMMAND "${CMAKE_COMMAND}" - -D "TEST_PROGRAM=$" - -D "TEST_ARGS:STRING=" - -D "TEST_VFD:STRING=${vfdname}" - -D "TEST_EXPECT=${resultcode}" - -D "TEST_OUTPUT=${vfdname}-${vfdtest}-shared" - -D "TEST_FOLDER=${PROJECT_BINARY_DIR}/${vfdname}-shared" - -P "${HDF_RESOURCES_DIR}/vfdTest.cmake" - ) - set_tests_properties (VFD-${vfdname}-${vfdtest}-shared PROPERTIES - ENVIRONMENT "srcdir=${HDF5_TEST_BINARY_DIR}/${vfdname}-shared" - WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/${vfdname}-shared - ) - endif () - endif () - else () - add_test (NAME VFD-${vfdname}-${vfdtest} - COMMAND "${CMAKE_COMMAND}" - -D "TEST_PROGRAM=$" - -D "TEST_ARGS:STRING=" - -D "TEST_VFD:STRING=${vfdname}" - -D "TEST_EXPECT=${resultcode}" - -D "TEST_OUTPUT=${vfdname}-${vfdtest}" - -D "TEST_FOLDER=${PROJECT_BINARY_DIR}/${vfdname}" - -P "${HDF_RESOURCES_DIR}/vfdTest.cmake" - ) - set_tests_properties (VFD-${vfdname}-${vfdtest} PROPERTIES - ENVIRONMENT "srcdir=${HDF5_TEST_BINARY_DIR}/${vfdname};HDF5TestExpress=${HDF_TEST_EXPRESS}" - WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/${vfdname} - ) - if (BUILD_SHARED_LIBS AND NOT "${vfdtest}" STREQUAL "cache") - add_test (NAME VFD-${vfdname}-${vfdtest}-shared - COMMAND "${CMAKE_COMMAND}" - -D "TEST_PROGRAM=$" - -D "TEST_ARGS:STRING=" - -D "TEST_VFD:STRING=${vfdname}" - -D "TEST_EXPECT=${resultcode}" - -D "TEST_OUTPUT=${vfdname}-${vfdtest}-shared" - -D "TEST_FOLDER=${PROJECT_BINARY_DIR}/${vfdname}-shared" - -P "${HDF_RESOURCES_DIR}/vfdTest.cmake" - ) - set_tests_properties (VFD-${vfdname}-${vfdtest}-shared PROPERTIES - ENVIRONMENT "srcdir=${HDF5_TEST_BINARY_DIR}/${vfdname}-shared;HDF5TestExpress=${HDF_TEST_EXPRESS}" - WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/${vfdname}-shared - ) - endif () - endif () - endmacro () - - macro (ADD_VFD_TEST vfdname resultcode) - foreach (test ${H5_VFD_TESTS}) - if (WIN32) - CHECK_VFD_TEST (${test} ${vfdname} ${resultcode}) - else () - add_test (NAME VFD-${vfdname}-${test} - COMMAND "${CMAKE_COMMAND}" - -D "TEST_PROGRAM=$" - -D "TEST_ARGS:STRING=" - -D "TEST_VFD:STRING=${vfdname}" - -D "TEST_EXPECT=${resultcode}" - -D "TEST_OUTPUT=${vfdname}-${test}" - -D "TEST_FOLDER=${PROJECT_BINARY_DIR}/${vfdname}" - -P "${HDF_RESOURCES_DIR}/vfdTest.cmake" - ) - set_tests_properties (VFD-${vfdname}-${test} PROPERTIES - ENVIRONMENT "srcdir=${HDF5_TEST_BINARY_DIR}/${vfdname}" - WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/${vfdname} - ) - if (BUILD_SHARED_LIBS) - add_test (NAME VFD-${vfdname}-${test}-shared - COMMAND "${CMAKE_COMMAND}" - -D "TEST_PROGRAM=$" - -D "TEST_ARGS:STRING=" - -D "TEST_VFD:STRING=${vfdname}" - -D "TEST_EXPECT=${resultcode}" - -D "TEST_OUTPUT=${vfdname}-${test}-shared" - -D "TEST_FOLDER=${PROJECT_BINARY_DIR}/${vfdname}-shared" - -P "${HDF_RESOURCES_DIR}/vfdTest.cmake" - ) - set_tests_properties (VFD-${vfdname}-${test}-shared PROPERTIES - ENVIRONMENT "srcdir=${HDF5_TEST_BINARY_DIR}/${vfdname}-shared" - WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/${vfdname}-shared - ) - endif () - endif () - endforeach () - set_tests_properties (VFD-${vfdname}-flush2 PROPERTIES DEPENDS VFD-${vfdname}-flush1) - set_tests_properties (VFD-${vfdname}-flush1 PROPERTIES TIMEOUT 10) - set_tests_properties (VFD-${vfdname}-flush2 PROPERTIES TIMEOUT 10) - set_tests_properties (VFD-${vfdname}-istore PROPERTIES TIMEOUT 1800) - if (NOT CYGWIN) - set_tests_properties (VFD-${vfdname}-cache PROPERTIES TIMEOUT 1800) - endif () - if (BUILD_SHARED_LIBS) - set_tests_properties (VFD-${vfdname}-flush2-shared PROPERTIES DEPENDS VFD-${vfdname}-flush1-shared) - set_tests_properties (VFD-${vfdname}-flush1-shared PROPERTIES TIMEOUT 10) - set_tests_properties (VFD-${vfdname}-flush2-shared PROPERTIES TIMEOUT 10) - set_tests_properties (VFD-${vfdname}-istore-shared PROPERTIES TIMEOUT 1800) - if (NOT CYGWIN AND NOT WIN32) - set_tests_properties (VFD-${vfdname}-cache-shared PROPERTIES TIMEOUT 1800) - endif () - endif () - if (HDF5_TEST_FHEAP_VFD) - add_test (NAME VFD-${vfdname}-fheap - COMMAND "${CMAKE_COMMAND}" - -D "TEST_PROGRAM=$" - -D "TEST_ARGS:STRING=" - -D "TEST_VFD:STRING=${vfdname}" - -D "TEST_EXPECT=${resultcode}" - -D "TEST_OUTPUT=${vfdname}-fheap" - -D "TEST_FOLDER=${PROJECT_BINARY_DIR}/${vfdname}" - -P "${HDF_RESOURCES_DIR}/vfdTest.cmake" - ) - set_tests_properties (VFD-${vfdname}-fheap PROPERTIES - TIMEOUT 1800 - ENVIRONMENT "srcdir=${HDF5_TEST_BINARY_DIR}/${vfdname};HDF5TestExpress=${HDF_TEST_EXPRESS}" - WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/${vfdname} - ) - if (BUILD_SHARED_LIBS) - add_test (NAME VFD-${vfdname}-fheap-shared - COMMAND "${CMAKE_COMMAND}" - -D "TEST_PROGRAM=$" - -D "TEST_ARGS:STRING=" - -D "TEST_VFD:STRING=${vfdname}" - -D "TEST_EXPECT=${resultcode}" - -D "TEST_OUTPUT=${vfdname}-fheap-shared" - -D "TEST_FOLDER=${PROJECT_BINARY_DIR}/${vfdname}-shared" - -P "${HDF_RESOURCES_DIR}/vfdTest.cmake" - ) - set_tests_properties (VFD-${vfdname}-fheap-shared PROPERTIES - TIMEOUT 1800 - ENVIRONMENT "srcdir=${HDF5_TEST_BINARY_DIR}/${vfdname}-shared;HDF5TestExpress=${HDF_TEST_EXPRESS}" - WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/${vfdname}-shared - ) - endif () - endif () - endmacro () - - # Run test with different Virtual File Driver - foreach (vfd ${VFD_LIST}) - ADD_VFD_TEST (${vfd} 0) - endforeach () - + include (CMakeVFDTests.cmake) endif () ############################################################################## @@ -1355,6 +1018,7 @@ if (HDF5_BUILD_GENERATORS) gen_bad_offset gen_bad_ohdr gen_bogus + gen_bounds gen_cross gen_deflate gen_filters diff --git a/test/CMakeVFDTests.cmake b/test/CMakeVFDTests.cmake new file mode 100644 index 0000000..944b163 --- /dev/null +++ b/test/CMakeVFDTests.cmake @@ -0,0 +1,303 @@ + +# Copyright by The HDF Group. +# All rights reserved. +# +# This file is part of HDF5. The full HDF5 copyright notice, including +# terms governing use, modification, and redistribution, is contained in +# the COPYING file, which can be found at the root of the source code +# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. +# If you do not have access to either file, you may request a copy from +# help@hdfgroup.org. +# + +############################################################################## +############################################################################## +### T E S T I N G ### +############################################################################## +############################################################################## +# included from CMakeTEsts.cmake + +set (VFD_LIST + sec2 + stdio + core + core_paged + split + multi + family +) +if (DIRECT_VFD) + set (VFD_LIST ${VFD_LIST} direct) +endif () + +foreach (vfdtest ${VFD_LIST}) + file (MAKE_DIRECTORY "${PROJECT_BINARY_DIR}/${vfdtest}") + if (BUILD_SHARED_LIBS) + file (MAKE_DIRECTORY "${PROJECT_BINARY_DIR}/${vfdtest}-shared") + endif () +endforeach () + +foreach (vfdtest ${VFD_LIST}) + foreach (h5_tfile ${HDF5_TEST_FILES}) + HDFTEST_COPY_FILE("${HDF5_TOOLS_DIR}/testfiles/${h5_tfile}" "${PROJECT_BINARY_DIR}/${vfdtest}/${h5_tfile}" "HDF5_VFDTEST_LIB_files") + if (BUILD_SHARED_LIBS) + HDFTEST_COPY_FILE("${HDF5_TOOLS_DIR}/testfiles/${h5_tfile}" "${PROJECT_BINARY_DIR}/${vfdtest}-shared/${h5_tfile}" "HDF5_VFDTEST_LIBSH_files") + endif () + endforeach () +endforeach () + +foreach (vfdtest ${VFD_LIST}) + foreach (ref_file ${HDF5_REFERENCE_FILES}) + HDFTEST_COPY_FILE("${HDF5_TEST_SOURCE_DIR}/testfiles/${ref_file}" "${PROJECT_BINARY_DIR}/${vfdtest}/${ref_file}" "HDF5_VFDTEST_LIB_files") + if (BUILD_SHARED_LIBS) + HDFTEST_COPY_FILE("${HDF5_TEST_SOURCE_DIR}/testfiles/${ref_file}" "${PROJECT_BINARY_DIR}/${vfdtest}-shared/${ref_file}" "HDF5_VFDTEST_LIBSH_files") + endif () + endforeach () +endforeach () + +foreach (vfdtest ${VFD_LIST}) + foreach (h5_file ${HDF5_REFERENCE_TEST_FILES}) + HDFTEST_COPY_FILE("${HDF5_TEST_SOURCE_DIR}/${h5_file}" "${HDF5_TEST_BINARY_DIR}/${vfdtest}/${h5_file}" "HDF5_VFDTEST_LIB_files") + if (BUILD_SHARED_LIBS) + HDFTEST_COPY_FILE("${HDF5_TEST_SOURCE_DIR}/${h5_file}" "${HDF5_TEST_BINARY_DIR}/${vfdtest}-shared/${h5_file}" "HDF5_VFDTEST_LIBSH_files") + endif () + endforeach () +endforeach () + +add_custom_target(HDF5_VFDTEST_LIB_files ALL COMMENT "Copying files needed by HDF5_VFDTEST_LIB tests" DEPENDS ${HDF5_VFDTEST_LIB_files_list}) +if (BUILD_SHARED_LIBS) + add_custom_target(HDF5_VFDTEST_LIBSH_files ALL COMMENT "Copying files needed by HDF5_VFDTEST_LIBSH tests" DEPENDS ${HDF5_VFDTEST_LIBSH_files_list}) +endif () + +############################################################################## +############################################################################## +### V F D T E S T S ### +############################################################################## +############################################################################## + + set (H5_VFD_SKIP_TESTS + cache + accum + fheap + big + vfd + error_test + err_compat + tcheck_version + testmeta + links_env + ) + if (NOT CYGWIN) + list(REMOVE_ITEM ${H5_VFD_SKIP_TESTS} big cache) + endif () + + # Windows only macro + macro (CHECK_VFD_TEST vfdtest vfdname resultcode) + if ("${vfdtest}" STREQUAL "flush1" OR "${vfdtest}" STREQUAL "flush2") + if ("${vfdname}" STREQUAL "multi" OR "${vfdname}" STREQUAL "split") + if (NOT BUILD_SHARED_LIBS AND NOT ${HDF_CFG_NAME} MATCHES "Debug") + add_test (NAME VFD-${vfdname}-${vfdtest} + COMMAND "${CMAKE_COMMAND}" + -D "TEST_PROGRAM=$" + -D "TEST_ARGS:STRING=" + -D "TEST_VFD:STRING=${vfdname}" + -D "TEST_EXPECT=${resultcode}" + -D "TEST_OUTPUT=${vfdname}-${vfdtest}" + -D "TEST_FOLDER=${PROJECT_BINARY_DIR}/${vfdname}" + -P "${HDF_RESOURCES_DIR}/vfdTest.cmake" + ) + set_tests_properties (VFD-${vfdname}-${vfdtest} PROPERTIES + ENVIRONMENT "srcdir=${HDF5_TEST_BINARY_DIR}/${vfdname}" + WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/${vfdname} + ) + if (BUILD_SHARED_LIBS) + add_test (NAME VFD-${vfdname}-${test}-shared + COMMAND "${CMAKE_COMMAND}" + -D "TEST_PROGRAM=$" + -D "TEST_ARGS:STRING=" + -D "TEST_VFD:STRING=${vfdname}" + -D "TEST_EXPECT=${resultcode}" + -D "TEST_OUTPUT=${vfdname}-${vfdtest}-shared" + -D "TEST_FOLDER=${PROJECT_BINARY_DIR}/${vfdname}-shared" + -P "${HDF_RESOURCES_DIR}/vfdTest.cmake" + ) + set_tests_properties (VFD-${vfdname}-${vfdtest}-shared PROPERTIES + ENVIRONMENT "srcdir=${HDF5_TEST_BINARY_DIR}/${vfdname}-shared" + WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/${vfdname}-shared + ) + endif () + else () + add_test (NAME VFD-${vfdname}-${vfdtest} + COMMAND ${CMAKE_COMMAND} -E echo "SKIP VFD-${vfdname}-${vfdtest}" + ) + if (BUILD_SHARED_LIBS) + add_test (NAME VFD-${vfdname}-${test}-shared + COMMAND ${CMAKE_COMMAND} -E echo "SKIP VFD-${vfdname}-${vfdtest}-shared" + ) + endif () + endif () + else () + add_test (NAME VFD-${vfdname}-${vfdtest} + COMMAND "${CMAKE_COMMAND}" + -D "TEST_PROGRAM=$" + -D "TEST_ARGS:STRING=" + -D "TEST_VFD:STRING=${vfdname}" + -D "TEST_EXPECT=${resultcode}" + -D "TEST_OUTPUT=${vfdname}-${vfdtest}" + -D "TEST_FOLDER=${PROJECT_BINARY_DIR}/${vfdname}" + -P "${HDF_RESOURCES_DIR}/vfdTest.cmake" + ) + set_tests_properties (VFD-${vfdname}-${vfdtest} PROPERTIES + ENVIRONMENT "srcdir=${HDF5_TEST_BINARY_DIR}/${vfdname}" + WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/${vfdname} + ) + if (BUILD_SHARED_LIBS) + add_test (NAME VFD-${vfdname}-${test}-shared + COMMAND "${CMAKE_COMMAND}" + -D "TEST_PROGRAM=$" + -D "TEST_ARGS:STRING=" + -D "TEST_VFD:STRING=${vfdname}" + -D "TEST_EXPECT=${resultcode}" + -D "TEST_OUTPUT=${vfdname}-${vfdtest}-shared" + -D "TEST_FOLDER=${PROJECT_BINARY_DIR}/${vfdname}-shared" + -P "${HDF_RESOURCES_DIR}/vfdTest.cmake" + ) + set_tests_properties (VFD-${vfdname}-${vfdtest}-shared PROPERTIES + ENVIRONMENT "srcdir=${HDF5_TEST_BINARY_DIR}/${vfdname}-shared" + WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/${vfdname}-shared + ) + endif () + endif () + else () + add_test (NAME VFD-${vfdname}-${vfdtest} + COMMAND "${CMAKE_COMMAND}" + -D "TEST_PROGRAM=$" + -D "TEST_ARGS:STRING=" + -D "TEST_VFD:STRING=${vfdname}" + -D "TEST_EXPECT=${resultcode}" + -D "TEST_OUTPUT=${vfdname}-${vfdtest}" + -D "TEST_FOLDER=${PROJECT_BINARY_DIR}/${vfdname}" + -P "${HDF_RESOURCES_DIR}/vfdTest.cmake" + ) + set_tests_properties (VFD-${vfdname}-${vfdtest} PROPERTIES + ENVIRONMENT "srcdir=${HDF5_TEST_BINARY_DIR}/${vfdname};HDF5TestExpress=${HDF_TEST_EXPRESS}" + WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/${vfdname} + ) + if (BUILD_SHARED_LIBS AND NOT "${vfdtest}" STREQUAL "cache") + add_test (NAME VFD-${vfdname}-${vfdtest}-shared + COMMAND "${CMAKE_COMMAND}" + -D "TEST_PROGRAM=$" + -D "TEST_ARGS:STRING=" + -D "TEST_VFD:STRING=${vfdname}" + -D "TEST_EXPECT=${resultcode}" + -D "TEST_OUTPUT=${vfdname}-${vfdtest}-shared" + -D "TEST_FOLDER=${PROJECT_BINARY_DIR}/${vfdname}-shared" + -P "${HDF_RESOURCES_DIR}/vfdTest.cmake" + ) + set_tests_properties (VFD-${vfdname}-${vfdtest}-shared PROPERTIES + ENVIRONMENT "srcdir=${HDF5_TEST_BINARY_DIR}/${vfdname}-shared;HDF5TestExpress=${HDF_TEST_EXPRESS}" + WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/${vfdname}-shared + ) + endif () + endif () + endmacro () + + macro (DO_VFD_TEST vfdtest vfdname resultcode) + add_test (NAME VFD-${vfdname}-${vfdtest} + COMMAND "${CMAKE_COMMAND}" + -D "TEST_PROGRAM=$" + -D "TEST_ARGS:STRING=" + -D "TEST_VFD:STRING=${vfdname}" + -D "TEST_EXPECT=${resultcode}" + -D "TEST_OUTPUT=${vfdname}-${vfdtest}" + -D "TEST_FOLDER=${PROJECT_BINARY_DIR}/${vfdname}" + -P "${HDF_RESOURCES_DIR}/vfdTest.cmake" + ) + set_tests_properties (VFD-${vfdname}-${vfdtest} PROPERTIES + ENVIRONMENT "srcdir=${HDF5_TEST_BINARY_DIR}/${vfdname}" + WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/${vfdname} + ) + if (BUILD_SHARED_LIBS) + add_test (NAME VFD-${vfdname}-${vfdtest}-shared + COMMAND "${CMAKE_COMMAND}" + -D "TEST_PROGRAM=$" + -D "TEST_ARGS:STRING=" + -D "TEST_VFD:STRING=${vfdname}" + -D "TEST_EXPECT=${resultcode}" + -D "TEST_OUTPUT=${vfdname}-${vfdtest}-shared" + -D "TEST_FOLDER=${PROJECT_BINARY_DIR}/${vfdname}-shared" + -P "${HDF_RESOURCES_DIR}/vfdTest.cmake" + ) + set_tests_properties (VFD-${vfdname}-${vfdtest}-shared PROPERTIES + ENVIRONMENT "srcdir=${HDF5_TEST_BINARY_DIR}/${vfdname}-shared" + WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/${vfdname}-shared + ) + endif () + endmacro () + + macro (ADD_VFD_TEST vfdname resultcode) + foreach (test ${H5_TESTS}) + if (NOT ${test} IN_LIST H5_VFD_SKIP_TESTS) + if (WIN32) + CHECK_VFD_TEST (${test} ${vfdname} ${resultcode}) + else () + DO_VFD_TEST (${test} ${vfdname} ${resultcode}) + endif () + endforeach () + set_tests_properties (VFD-${vfdname}-flush2 PROPERTIES DEPENDS VFD-${vfdname}-flush1) + set_tests_properties (VFD-${vfdname}-flush1 PROPERTIES TIMEOUT 10) + set_tests_properties (VFD-${vfdname}-flush2 PROPERTIES TIMEOUT 10) + set_tests_properties (VFD-${vfdname}-istore PROPERTIES TIMEOUT 1800) + if (NOT CYGWIN) + set_tests_properties (VFD-${vfdname}-cache PROPERTIES TIMEOUT 1800) + endif () + if (BUILD_SHARED_LIBS) + set_tests_properties (VFD-${vfdname}-flush2-shared PROPERTIES DEPENDS VFD-${vfdname}-flush1-shared) + set_tests_properties (VFD-${vfdname}-flush1-shared PROPERTIES TIMEOUT 10) + set_tests_properties (VFD-${vfdname}-flush2-shared PROPERTIES TIMEOUT 10) + set_tests_properties (VFD-${vfdname}-istore-shared PROPERTIES TIMEOUT 1800) + if (NOT CYGWIN AND NOT WIN32) + set_tests_properties (VFD-${vfdname}-cache-shared PROPERTIES TIMEOUT 1800) + endif () + endif () + if (HDF5_TEST_FHEAP_VFD) + add_test (NAME VFD-${vfdname}-fheap + COMMAND "${CMAKE_COMMAND}" + -D "TEST_PROGRAM=$" + -D "TEST_ARGS:STRING=" + -D "TEST_VFD:STRING=${vfdname}" + -D "TEST_EXPECT=${resultcode}" + -D "TEST_OUTPUT=${vfdname}-fheap" + -D "TEST_FOLDER=${PROJECT_BINARY_DIR}/${vfdname}" + -P "${HDF_RESOURCES_DIR}/vfdTest.cmake" + ) + set_tests_properties (VFD-${vfdname}-fheap PROPERTIES + TIMEOUT 1800 + ENVIRONMENT "srcdir=${HDF5_TEST_BINARY_DIR}/${vfdname};HDF5TestExpress=${HDF_TEST_EXPRESS}" + WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/${vfdname} + ) + if (BUILD_SHARED_LIBS) + add_test (NAME VFD-${vfdname}-fheap-shared + COMMAND "${CMAKE_COMMAND}" + -D "TEST_PROGRAM=$" + -D "TEST_ARGS:STRING=" + -D "TEST_VFD:STRING=${vfdname}" + -D "TEST_EXPECT=${resultcode}" + -D "TEST_OUTPUT=${vfdname}-fheap-shared" + -D "TEST_FOLDER=${PROJECT_BINARY_DIR}/${vfdname}-shared" + -P "${HDF_RESOURCES_DIR}/vfdTest.cmake" + ) + set_tests_properties (VFD-${vfdname}-fheap-shared PROPERTIES + TIMEOUT 1800 + ENVIRONMENT "srcdir=${HDF5_TEST_BINARY_DIR}/${vfdname}-shared;HDF5TestExpress=${HDF_TEST_EXPRESS}" + WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/${vfdname}-shared + ) + endif () + endif () + endif () + endmacro () + + # Run test with different Virtual File Driver + foreach (vfd ${VFD_LIST}) + ADD_VFD_TEST (${vfd} 0) + endforeach () diff --git a/testpar/CMakeLists.txt b/testpar/CMakeLists.txt index d0b74b0..3cee808 100644 --- a/testpar/CMakeLists.txt +++ b/testpar/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required (VERSION 3.2.2) +cmake_minimum_required (VERSION 3.3.2) PROJECT (HDF5_TEST_PAR) #----------------------------------------------------------------------------- @@ -49,6 +49,7 @@ set (H5P_TESTS t_mpi t_bigio t_cache + t_cache_image t_pflush1 t_pflush2 t_pread diff --git a/tools/CMakeLists.txt b/tools/CMakeLists.txt index 41a9fdc..e02d3eb 100644 --- a/tools/CMakeLists.txt +++ b/tools/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required (VERSION 3.2.2) +cmake_minimum_required (VERSION 3.3.2) PROJECT (HDF5_TOOLS) #----------------------------------------------------------------------------- diff --git a/tools/lib/CMakeLists.txt b/tools/lib/CMakeLists.txt index 0fc1981..addaf2e 100644 --- a/tools/lib/CMakeLists.txt +++ b/tools/lib/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required (VERSION 3.2.2) +cmake_minimum_required (VERSION 3.3.2) PROJECT (HDF5_TOOLS_LIB) #----------------------------------------------------------------------------- diff --git a/tools/src/CMakeLists.txt b/tools/src/CMakeLists.txt index 24e682a..5a25f76 100644 --- a/tools/src/CMakeLists.txt +++ b/tools/src/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required (VERSION 3.2.2) +cmake_minimum_required (VERSION 3.3.2) PROJECT (HDF5_TOOLS_SRC) #----------------------------------------------------------------------------- diff --git a/tools/src/h5copy/CMakeLists.txt b/tools/src/h5copy/CMakeLists.txt index 1d9c11e..606516f 100644 --- a/tools/src/h5copy/CMakeLists.txt +++ b/tools/src/h5copy/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required (VERSION 3.2.2) +cmake_minimum_required (VERSION 3.3.2) PROJECT (HDF5_TOOLS_SRC_H5COPY) #----------------------------------------------------------------------------- diff --git a/tools/src/h5diff/CMakeLists.txt b/tools/src/h5diff/CMakeLists.txt index a485de7..2ff5817 100644 --- a/tools/src/h5diff/CMakeLists.txt +++ b/tools/src/h5diff/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required (VERSION 3.2.2) +cmake_minimum_required (VERSION 3.3.2) PROJECT (HDF5_TOOLS_SRC_H5DIFF) #----------------------------------------------------------------------------- diff --git a/tools/src/h5dump/CMakeLists.txt b/tools/src/h5dump/CMakeLists.txt index bcfa89c..491ec4b 100644 --- a/tools/src/h5dump/CMakeLists.txt +++ b/tools/src/h5dump/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required (VERSION 3.2.2) +cmake_minimum_required (VERSION 3.3.2) PROJECT (HDF5_TOOLS_SRC_H5DUMP) #----------------------------------------------------------------------------- diff --git a/tools/src/h5format_convert/CMakeLists.txt b/tools/src/h5format_convert/CMakeLists.txt index 0f6d8d9..712dd87 100644 --- a/tools/src/h5format_convert/CMakeLists.txt +++ b/tools/src/h5format_convert/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required (VERSION 3.2.2) +cmake_minimum_required (VERSION 3.3.2) PROJECT (HDF5_TOOLS_SRC_H5FC) #----------------------------------------------------------------------------- diff --git a/tools/src/h5import/CMakeLists.txt b/tools/src/h5import/CMakeLists.txt index 4aa8938..efb0ad2 100644 --- a/tools/src/h5import/CMakeLists.txt +++ b/tools/src/h5import/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required (VERSION 3.2.2) +cmake_minimum_required (VERSION 3.3.2) PROJECT (HDF5_TOOLS_SRC_H5IMPORT) #----------------------------------------------------------------------------- diff --git a/tools/src/h5jam/CMakeLists.txt b/tools/src/h5jam/CMakeLists.txt index fbd4250..9035ed9 100644 --- a/tools/src/h5jam/CMakeLists.txt +++ b/tools/src/h5jam/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required (VERSION 3.2.2) +cmake_minimum_required (VERSION 3.3.2) PROJECT (HDF5_TOOLS_SRC_H5JAM) #----------------------------------------------------------------------------- diff --git a/tools/src/h5ls/CMakeLists.txt b/tools/src/h5ls/CMakeLists.txt index 703e55e..71b3d1d 100644 --- a/tools/src/h5ls/CMakeLists.txt +++ b/tools/src/h5ls/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required (VERSION 3.2.2) +cmake_minimum_required (VERSION 3.3.2) PROJECT (HDF5_TOOLS_SRC_H5LS) #----------------------------------------------------------------------------- diff --git a/tools/src/h5repack/CMakeLists.txt b/tools/src/h5repack/CMakeLists.txt index a646819..3fefd24 100644 --- a/tools/src/h5repack/CMakeLists.txt +++ b/tools/src/h5repack/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required (VERSION 3.2.2) +cmake_minimum_required (VERSION 3.3.2) PROJECT (HDF5_TOOLS_SRC_H5REPACK) #----------------------------------------------------------------------------- diff --git a/tools/src/h5stat/CMakeLists.txt b/tools/src/h5stat/CMakeLists.txt index cde81ee..cc8bee2 100644 --- a/tools/src/h5stat/CMakeLists.txt +++ b/tools/src/h5stat/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required (VERSION 3.2.2) +cmake_minimum_required (VERSION 3.3.2) PROJECT (HDF5_TOOLS_SRC_H5STAT) #----------------------------------------------------------------------------- diff --git a/tools/src/misc/CMakeLists.txt b/tools/src/misc/CMakeLists.txt index 313760f..78ba238 100644 --- a/tools/src/misc/CMakeLists.txt +++ b/tools/src/misc/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required (VERSION 3.2.2) +cmake_minimum_required (VERSION 3.3.2) PROJECT (HDF5_TOOLS_SRC_MISC) #----------------------------------------------------------------------------- diff --git a/tools/test/CMakeLists.txt b/tools/test/CMakeLists.txt index 6877bfc..54dd5a2 100644 --- a/tools/test/CMakeLists.txt +++ b/tools/test/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required (VERSION 3.2.2) +cmake_minimum_required (VERSION 3.3.2) PROJECT (HDF5_TOOLS_TEST) #----------------------------------------------------------------------------- diff --git a/tools/test/h5copy/CMakeLists.txt b/tools/test/h5copy/CMakeLists.txt index 35aee35..2f5f314 100644 --- a/tools/test/h5copy/CMakeLists.txt +++ b/tools/test/h5copy/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required (VERSION 3.2.2) +cmake_minimum_required (VERSION 3.3.2) PROJECT (HDF5_TOOLS_TEST_H5COPY) #----------------------------------------------------------------------------- diff --git a/tools/test/h5diff/CMakeLists.txt b/tools/test/h5diff/CMakeLists.txt index def2e6d..cedc932 100644 --- a/tools/test/h5diff/CMakeLists.txt +++ b/tools/test/h5diff/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required (VERSION 3.2.2) +cmake_minimum_required (VERSION 3.3.2) PROJECT (HDF5_TOOLS_TEST_H5DIFF) #----------------------------------------------------------------------------- diff --git a/tools/test/h5dump/CMakeLists.txt b/tools/test/h5dump/CMakeLists.txt index c4f2b95..1941764 100644 --- a/tools/test/h5dump/CMakeLists.txt +++ b/tools/test/h5dump/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required (VERSION 3.2.2) +cmake_minimum_required (VERSION 3.3.2) PROJECT (HDF5_TOOLS_TEST_H5DUMP) #----------------------------------------------------------------------------- diff --git a/tools/test/h5format_convert/CMakeLists.txt b/tools/test/h5format_convert/CMakeLists.txt index 497f463..5287ae0 100644 --- a/tools/test/h5format_convert/CMakeLists.txt +++ b/tools/test/h5format_convert/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required (VERSION 3.2.2) +cmake_minimum_required (VERSION 3.3.2) PROJECT (HDF5_TOOLS_TEST_H5FC) #----------------------------------------------------------------------------- diff --git a/tools/test/h5import/CMakeLists.txt b/tools/test/h5import/CMakeLists.txt index 36bfbdc..5492363 100644 --- a/tools/test/h5import/CMakeLists.txt +++ b/tools/test/h5import/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required (VERSION 3.2.2) +cmake_minimum_required (VERSION 3.3.2) PROJECT (HDF5_TOOLS_TEST_H5IMPORT) #----------------------------------------------------------------------------- diff --git a/tools/test/h5jam/CMakeLists.txt b/tools/test/h5jam/CMakeLists.txt index dbac14b..17dda3c 100644 --- a/tools/test/h5jam/CMakeLists.txt +++ b/tools/test/h5jam/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required (VERSION 3.2.2) +cmake_minimum_required (VERSION 3.3.2) PROJECT (HDF5_TOOLS_TEST_H5JAM) #----------------------------------------------------------------------------- diff --git a/tools/test/h5ls/CMakeLists.txt b/tools/test/h5ls/CMakeLists.txt index c21ca92..e92533f 100644 --- a/tools/test/h5ls/CMakeLists.txt +++ b/tools/test/h5ls/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required (VERSION 3.2.2) +cmake_minimum_required (VERSION 3.3.2) PROJECT (HDF5_TOOLS_TEST_H5LS) #----------------------------------------------------------------------------- diff --git a/tools/test/h5repack/CMakeLists.txt b/tools/test/h5repack/CMakeLists.txt index 5996fff..a606ac6 100644 --- a/tools/test/h5repack/CMakeLists.txt +++ b/tools/test/h5repack/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required (VERSION 3.2.2) +cmake_minimum_required (VERSION 3.3.2) PROJECT (HDF5_TOOLS_TEST_H5REPACK) #----------------------------------------------------------------------------- diff --git a/tools/test/h5stat/CMakeLists.txt b/tools/test/h5stat/CMakeLists.txt index d2a1de2..0d07753 100644 --- a/tools/test/h5stat/CMakeLists.txt +++ b/tools/test/h5stat/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required (VERSION 3.2.2) +cmake_minimum_required (VERSION 3.3.2) PROJECT (HDF5_TOOLS_TEST_H5STAT) #----------------------------------------------------------------------------- diff --git a/tools/test/misc/CMakeLists.txt b/tools/test/misc/CMakeLists.txt index c014fad..178767a 100644 --- a/tools/test/misc/CMakeLists.txt +++ b/tools/test/misc/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required (VERSION 3.2.2) +cmake_minimum_required (VERSION 3.3.2) PROJECT (HDF5_TOOLS_TEST_MISC) #----------------------------------------------------------------------------- diff --git a/tools/test/misc/vds/CMakeLists.txt b/tools/test/misc/vds/CMakeLists.txt index 9092079..5b34c43 100644 --- a/tools/test/misc/vds/CMakeLists.txt +++ b/tools/test/misc/vds/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required (VERSION 3.2.2) +cmake_minimum_required (VERSION 3.3.2) PROJECT (HDF5_TOOLS_TEST_MISC_VDS) #----------------------------------------------------------------------------- diff --git a/tools/test/perform/CMakeLists.txt b/tools/test/perform/CMakeLists.txt index 581a85e..b7452e0 100644 --- a/tools/test/perform/CMakeLists.txt +++ b/tools/test/perform/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required (VERSION 3.2.2) +cmake_minimum_required (VERSION 3.3.2) PROJECT (HDF5_TOOLS_TEST_PERFORM ) #----------------------------------------------------------------------------- -- cgit v0.12 From 3b518415f421968492290f3afa214d85e287a983 Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Wed, 28 Feb 2018 08:24:52 -0600 Subject: Remove uncomitted test --- test/CMakeTests.cmake | 1 - 1 file changed, 1 deletion(-) diff --git a/test/CMakeTests.cmake b/test/CMakeTests.cmake index 221b857..f97e304 100644 --- a/test/CMakeTests.cmake +++ b/test/CMakeTests.cmake @@ -1018,7 +1018,6 @@ if (HDF5_BUILD_GENERATORS) gen_bad_offset gen_bad_ohdr gen_bogus - gen_bounds gen_cross gen_deflate gen_filters -- cgit v0.12 From e0f872c13e5a21790533c46ad57699bd8f03e2ff Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Wed, 28 Feb 2018 09:02:44 -0600 Subject: Correct use of list var --- test/CMakeVFDTests.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/CMakeVFDTests.cmake b/test/CMakeVFDTests.cmake index 944b163..a17efbb 100644 --- a/test/CMakeVFDTests.cmake +++ b/test/CMakeVFDTests.cmake @@ -88,7 +88,7 @@ endif () links_env ) if (NOT CYGWIN) - list(REMOVE_ITEM ${H5_VFD_SKIP_TESTS} big cache) + list (REMOVE_ITEM H5_VFD_SKIP_TESTS big cache) endif () # Windows only macro -- cgit v0.12 From bfa3bf01f357dfe4321ceba79cba36b777e0c4e8 Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Wed, 28 Feb 2018 10:45:37 -0600 Subject: Remove t_cache_image test --- testpar/CMakeTests.cmake | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/testpar/CMakeTests.cmake b/testpar/CMakeTests.cmake index 87470f3..cd9acda 100644 --- a/testpar/CMakeTests.cmake +++ b/testpar/CMakeTests.cmake @@ -18,6 +18,10 @@ add_test (NAME TEST_PAR_testphdf5 COMMAND ${MPIEXEC_EXECUTABLE} ${MPIEXEC_NUMPROC_FLAG} ${MPIEXEC_MAX_NUMPROCS} ${MPIEXEC_PREFLAGS} $ ${MPIEXEC_POSTFLAGS}) +if (WIN32) + # t_cache_imagee uses fork() and execve(), will not run on Windows + list (REMOVE_ITEM H5P_TESTS t_cache_image) +endif () foreach (testp ${H5P_TESTS}) add_test (NAME TEST_PAR_${testp} COMMAND ${MPIEXEC_EXECUTABLE} ${MPIEXEC_NUMPROC_FLAG} ${MPIEXEC_MAX_NUMPROCS} ${MPIEXEC_PREFLAGS} $ ${MPIEXEC_POSTFLAGS}) endforeach () -- cgit v0.12 From 1599e835c626ec306ac9bb3941c4e851a92bdb17 Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Thu, 1 Mar 2018 08:33:45 -0600 Subject: Fix test loop --- test/CMakeVFDTests.cmake | 80 ++++++++++++++++++++++++------------------------ 1 file changed, 40 insertions(+), 40 deletions(-) diff --git a/test/CMakeVFDTests.cmake b/test/CMakeVFDTests.cmake index a17efbb..995f4e0 100644 --- a/test/CMakeVFDTests.cmake +++ b/test/CMakeVFDTests.cmake @@ -243,56 +243,56 @@ endif () else () DO_VFD_TEST (${test} ${vfdname} ${resultcode}) endif () - endforeach () - set_tests_properties (VFD-${vfdname}-flush2 PROPERTIES DEPENDS VFD-${vfdname}-flush1) - set_tests_properties (VFD-${vfdname}-flush1 PROPERTIES TIMEOUT 10) - set_tests_properties (VFD-${vfdname}-flush2 PROPERTIES TIMEOUT 10) - set_tests_properties (VFD-${vfdname}-istore PROPERTIES TIMEOUT 1800) - if (NOT CYGWIN) - set_tests_properties (VFD-${vfdname}-cache PROPERTIES TIMEOUT 1800) endif () - if (BUILD_SHARED_LIBS) - set_tests_properties (VFD-${vfdname}-flush2-shared PROPERTIES DEPENDS VFD-${vfdname}-flush1-shared) - set_tests_properties (VFD-${vfdname}-flush1-shared PROPERTIES TIMEOUT 10) - set_tests_properties (VFD-${vfdname}-flush2-shared PROPERTIES TIMEOUT 10) - set_tests_properties (VFD-${vfdname}-istore-shared PROPERTIES TIMEOUT 1800) - if (NOT CYGWIN AND NOT WIN32) - set_tests_properties (VFD-${vfdname}-cache-shared PROPERTIES TIMEOUT 1800) - endif () + endforeach () + set_tests_properties (VFD-${vfdname}-flush2 PROPERTIES DEPENDS VFD-${vfdname}-flush1) + set_tests_properties (VFD-${vfdname}-flush1 PROPERTIES TIMEOUT 10) + set_tests_properties (VFD-${vfdname}-flush2 PROPERTIES TIMEOUT 10) + set_tests_properties (VFD-${vfdname}-istore PROPERTIES TIMEOUT 1800) + if (NOT CYGWIN) + set_tests_properties (VFD-${vfdname}-cache PROPERTIES TIMEOUT 1800) + endif () + if (BUILD_SHARED_LIBS) + set_tests_properties (VFD-${vfdname}-flush2-shared PROPERTIES DEPENDS VFD-${vfdname}-flush1-shared) + set_tests_properties (VFD-${vfdname}-flush1-shared PROPERTIES TIMEOUT 10) + set_tests_properties (VFD-${vfdname}-flush2-shared PROPERTIES TIMEOUT 10) + set_tests_properties (VFD-${vfdname}-istore-shared PROPERTIES TIMEOUT 1800) + if (NOT CYGWIN AND NOT WIN32) + set_tests_properties (VFD-${vfdname}-cache-shared PROPERTIES TIMEOUT 1800) endif () - if (HDF5_TEST_FHEAP_VFD) - add_test (NAME VFD-${vfdname}-fheap + endif () + if (HDF5_TEST_FHEAP_VFD) + add_test (NAME VFD-${vfdname}-fheap + COMMAND "${CMAKE_COMMAND}" + -D "TEST_PROGRAM=$" + -D "TEST_ARGS:STRING=" + -D "TEST_VFD:STRING=${vfdname}" + -D "TEST_EXPECT=${resultcode}" + -D "TEST_OUTPUT=${vfdname}-fheap" + -D "TEST_FOLDER=${PROJECT_BINARY_DIR}/${vfdname}" + -P "${HDF_RESOURCES_DIR}/vfdTest.cmake" + ) + set_tests_properties (VFD-${vfdname}-fheap PROPERTIES + TIMEOUT 1800 + ENVIRONMENT "srcdir=${HDF5_TEST_BINARY_DIR}/${vfdname};HDF5TestExpress=${HDF_TEST_EXPRESS}" + WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/${vfdname} + ) + if (BUILD_SHARED_LIBS) + add_test (NAME VFD-${vfdname}-fheap-shared COMMAND "${CMAKE_COMMAND}" - -D "TEST_PROGRAM=$" + -D "TEST_PROGRAM=$" -D "TEST_ARGS:STRING=" -D "TEST_VFD:STRING=${vfdname}" -D "TEST_EXPECT=${resultcode}" - -D "TEST_OUTPUT=${vfdname}-fheap" - -D "TEST_FOLDER=${PROJECT_BINARY_DIR}/${vfdname}" + -D "TEST_OUTPUT=${vfdname}-fheap-shared" + -D "TEST_FOLDER=${PROJECT_BINARY_DIR}/${vfdname}-shared" -P "${HDF_RESOURCES_DIR}/vfdTest.cmake" ) - set_tests_properties (VFD-${vfdname}-fheap PROPERTIES + set_tests_properties (VFD-${vfdname}-fheap-shared PROPERTIES TIMEOUT 1800 - ENVIRONMENT "srcdir=${HDF5_TEST_BINARY_DIR}/${vfdname};HDF5TestExpress=${HDF_TEST_EXPRESS}" - WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/${vfdname} + ENVIRONMENT "srcdir=${HDF5_TEST_BINARY_DIR}/${vfdname}-shared;HDF5TestExpress=${HDF_TEST_EXPRESS}" + WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/${vfdname}-shared ) - if (BUILD_SHARED_LIBS) - add_test (NAME VFD-${vfdname}-fheap-shared - COMMAND "${CMAKE_COMMAND}" - -D "TEST_PROGRAM=$" - -D "TEST_ARGS:STRING=" - -D "TEST_VFD:STRING=${vfdname}" - -D "TEST_EXPECT=${resultcode}" - -D "TEST_OUTPUT=${vfdname}-fheap-shared" - -D "TEST_FOLDER=${PROJECT_BINARY_DIR}/${vfdname}-shared" - -P "${HDF_RESOURCES_DIR}/vfdTest.cmake" - ) - set_tests_properties (VFD-${vfdname}-fheap-shared PROPERTIES - TIMEOUT 1800 - ENVIRONMENT "srcdir=${HDF5_TEST_BINARY_DIR}/${vfdname}-shared;HDF5TestExpress=${HDF_TEST_EXPRESS}" - WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/${vfdname}-shared - ) - endif () endif () endif () endmacro () -- cgit v0.12 From ede609806c71e6dfd7581aaef31bb711911eb60e Mon Sep 17 00:00:00 2001 From: Richard Warren Date: Thu, 1 Mar 2018 13:04:49 -0500 Subject: Removal of missing posix function for Windows. See HDFFV-8839 --- testpar/t_pread.c | 194 ++++++++++++++---------------------------------------- 1 file changed, 51 insertions(+), 143 deletions(-) diff --git a/testpar/t_pread.c b/testpar/t_pread.c index 90129d4..610d95f 100644 --- a/testpar/t_pread.c +++ b/testpar/t_pread.c @@ -17,7 +17,6 @@ */ #include "testpar.h" -#include /* The collection of files is included below to aid * an external "cleanup" process if required. @@ -26,16 +25,10 @@ * since each set of three is used by the tests either to construct * or to read and validate. */ -#define NFILENAME 9 -const char *FILENAMES[NFILENAME + 1]={"t_pread_data_file", - "reloc_t_pread_data_file", - "prefix_file", - "t_pread_group_0_file", +#define NFILENAME 3 +const char *FILENAMES[NFILENAME + 1]={"reloc_t_pread_data_file", "reloc_t_pread_group_0_file", - "prefix_file_0", - "t_pread_group_1_file", "reloc_t_pread_group_1_file", - "prefix_file_1", NULL}; #define FILENAME_BUF_SIZE 1024 @@ -56,36 +49,14 @@ static int generate_test_file(MPI_Comm comm, int mpi_rank, int group); static int test_parallel_read(MPI_Comm comm, int mpi_rank, int group); static char *test_argv0 = NULL; -#if defined(_WIN32) || defined(_WIN64) -#include - -static char *dirname(char *path) -{ - char drive[_MAX_DRIVE]; - char dir[_MAX_DIR]; - char directory[_MAX_PATH]; - - assert(path != NULL); - _fullpath(directory, path, _MAX_FNAME); - _splitpath_s(directory, drive, _MAX_DRIVE, dir, _MAX_DIR, NULL, 0, NULL, 0); - sprintf_s(directory, _MAX_PATH, "%s%s", drive, dir); - return _strdup(directory); -} -#else -extern char *dirname(char *path); /* Avoids additional includes */ - -#endif +// extern char *dirname(char *path); /* Avoids additional includes */ /*------------------------------------------------------------------------- * Function: generate_test_file * * Purpose: This function is called to produce an HDF5 data file - * whose superblock is relocated to a non-zero offset by - * utilizing the 'h5jam' utility to write random text - * at the start of the file. Unlike simple concatenation - * of files, h5jam is used to place the superblock on a - * power-of-2 boundary. + * whose superblock is relocated to a power-of-2 boundary. * * Since data will be read back and validated, we generate * data in a predictable manner rather than randomly. @@ -117,13 +88,13 @@ extern char *dirname(char *path); /* Avoids additional includes */ static int generate_test_file( MPI_Comm comm, int mpi_rank, int group_id ) { - FILE *header = NULL; + int header = -1; const char *fcn_name = "generate_test_file()"; const char *failure_mssg = NULL; char *group_filename = NULL; char data_filename[FILENAME_BUF_SIZE]; - char reloc_data_filename[FILENAME_BUF_SIZE]; - char prolog_filename[FILENAME_BUF_SIZE]; + // char reloc_data_filename[FILENAME_BUF_SIZE]; + // char prolog_filename[FILENAME_BUF_SIZE]; int file_index = 0; int group_size; int group_rank; @@ -135,7 +106,8 @@ generate_test_file( MPI_Comm comm, int mpi_rank, int group_id ) hsize_t dims[1] = {0}; hid_t file_id = -1; hid_t memspace = -1; - hid_t filespace = -1; + hid_t filespace = -1; + hid_t fctmpl = -1; hid_t fapl_id = -1; hid_t dxpl_id = -1; hid_t dset_id = -1; @@ -173,10 +145,10 @@ generate_test_file( MPI_Comm comm, int mpi_rank, int group_id ) file_index = 0; } else if ( group_id == 0 ) { /* Test 2 group 0 */ - file_index = 3; + file_index = 1; } else { /* Test 2 group 1 */ - file_index = 6; + file_index = 2; } /* The 'group_filename' is just a temp variable and @@ -194,32 +166,6 @@ generate_test_file( MPI_Comm comm, int mpi_rank, int group_id ) } } - if ( pass ) { - - group_filename = FILENAMES[file_index+1]; - HDassert( group_filename ); - - /* Assign the 'reloc_data_filename' */ - if ( h5_fixname(group_filename, H5P_DEFAULT, reloc_data_filename, - sizeof(reloc_data_filename)) == NULL ) { - - pass = FALSE; - failure_mssg = "h5_fixname(1) failed.\n"; - } - } - - if ( pass ) { - group_filename = FILENAMES[file_index+2]; - HDassert( group_filename ); - - /* Assign the 'prolog_filename' */ - if ( h5_fixname(group_filename, H5P_DEFAULT, prolog_filename, - sizeof(prolog_filename)) == NULL ) { - pass = FALSE; - failure_mssg = "h5_fixname(2) failed.\n"; - } - } - /* setup data to write */ if ( pass ) { if ( (data_slice = (float *)HDmalloc(COUNT * sizeof(float))) == NULL ) { @@ -237,6 +183,17 @@ generate_test_file( MPI_Comm comm, int mpi_rank, int group_id ) } } + /* Initialize a file creation template */ + if (pass) { + if ((fctmpl = H5Pcreate(H5P_FILE_CREATE)) < 0) { + pass = FALSE; + failure_mssg = "H5Pcreate(H5P_FILE_CREATE) failed.\n"; + } + else if (H5Pset_userblock(fctmpl, 512) != SUCCEED) { + pass = FALSE; + failure_mssg = "H5Pset_userblock(,size) failed.\n"; + } + } /* setup FAPL */ if ( pass ) { if ( (fapl_id = H5Pcreate(H5P_FILE_ACCESS)) < 0 ) { @@ -255,7 +212,7 @@ generate_test_file( MPI_Comm comm, int mpi_rank, int group_id ) /* create the data file */ if ( pass ) { if ( (file_id = H5Fcreate(data_filename, H5F_ACC_TRUNC, - H5P_DEFAULT, fapl_id)) < 0 ) { + fctmpl, fapl_id)) < 0 ) { pass = FALSE; failure_mssg = "H5Fcreate() failed.\n"; } @@ -361,6 +318,13 @@ generate_test_file( MPI_Comm comm, int mpi_rank, int group_id ) } } + if (pass || (fctmpl != -1)) { + if (H5Pclose(fctmpl) < 0) { + pass = false; + failure_mssg = "H5Pclose(fctmpl) failed.\n"; + } + } + /* Add a userblock to the head of the datafile. * We will use this to for a functional test of the * file open optimization. This is superblock @@ -373,94 +337,39 @@ generate_test_file( MPI_Comm comm, int mpi_rank, int group_id ) * group_rank(0) processes. Each parallel group * will create a unique file with different text * headers and different data. - * - * We also delete files that are no longer needed. */ - if ( group_rank == 0 ) { - + if (group_rank == 0) { const char *text_to_write; - size_t bytes_to_write; + size_t bytes_to_write; - if (group_id == 0) - text_to_write = random_hdf5_text; + if (group_id == 0) + text_to_write = random_hdf5_text; else text_to_write = hitchhiker_quote; - bytes_to_write = strlen(text_to_write); - - if ( pass ) { - if ( (header = HDfopen(prolog_filename, "w+")) == NULL ) { - pass = FALSE; - failure_mssg = "HDfopen(prolog_filename, \"w+\") failed.\n"; - } - } - - if ( pass ) { + bytes_to_write = HDstrlen(text_to_write); - if ( HDfwrite(text_to_write, 1, bytes_to_write, header) != - bytes_to_write ) { + if (pass) { + if ((header = HDopen(data_filename, O_WRONLY)) < 0) { pass = FALSE; - failure_mssg = "Unable to write header file.\n"; + failure_mssg = "HDopen(data_filename, O_WRONLY) failed.\n"; } } - if ( pass || (header != NULL) ) { - if ( HDfclose(header) != 0 ) { + if (pass) { + HDlseek(header, 0, SEEK_SET); + if (HDwrite(header, text_to_write, bytes_to_write) < 0) { pass = FALSE; - failure_mssg = "HDfclose() failed.\n"; - } + failure_mssg = "Unable to write user text into file.\n"; + } } - if ( pass ) { - char execmd[256]; - char syscmd[256]; - char exe_path[256]; -#if defined(_WIN32) || defined(_WIN64) - char *relative_path = "..\\tools\\src\\h5jam\\h5jam.exe"; -#else - char *relative_path = "../tools/src/h5jam/h5jam"; -#endif - char *exe_dirname = relative_path; - - /* We're checking for the existance of the h5jam utility - * With Cmake testing, all binaries are in the same directory - * e.g. the same location where this executable is found. - * We've copied the argv[0] argument and check to see - * if h5jam is co-located here. Otherwise, the autotools - * put things into directories, hence the relative path. - */ - if (test_argv0 != NULL) { - HDstrcpy(exe_path, test_argv0); - if ( (exe_dirname = (char *)dirname(exe_path)) != NULL) { -#if defined(_WIN32) || defined(_WIN64) - /* The dirname substitute (above) returns the - * directory name with a trailing slash so - * don't add another path seperator. - * The posix library version doesn't have - * the trailing slash, so we add it between - * the directory name and the excutable. - */ - HDsprintf(execmd, "%sh5jam.exe", exe_dirname); -#else - HDsprintf(execmd, "%s/h5jam", exe_dirname); -#endif - if (HDaccess(execmd, F_OK) != 0) - HDstrcpy(execmd, relative_path); - } - } - HDsprintf(syscmd, "%s -i %s -u %s -o %s", - execmd, - data_filename, - prolog_filename, reloc_data_filename); - - if ( system(syscmd) != 0 ) { + if (pass || (header > 0)) { + if (HDclose(header) < 0) { pass = FALSE; - failure_mssg = "invocation of h5jam failed.\n"; + failure_mssg = "HDclose() failed.\n"; } } - - HDremove(prolog_filename); - HDremove(data_filename); } /* collect results from other processes. @@ -599,11 +508,11 @@ test_parallel_read(MPI_Comm comm, int mpi_rank, int group_id) if ( pass ) { if ( comm == MPI_COMM_WORLD ) /* test 1 */ - group_filename = FILENAMES[1]; + group_filename = FILENAMES[0]; else if ( group_id == 0 ) /* test 2 group 0 */ - group_filename = FILENAMES[4]; + group_filename = FILENAMES[1]; else /* test 2 group 1 */ - group_filename = FILENAMES[7]; + group_filename = FILENAMES[2]; HDassert(group_filename); if ( h5_fixname(group_filename, H5P_DEFAULT, reloc_data_filename, @@ -856,7 +765,7 @@ main( int argc, char **argv) if ( mpi_size < 3 ) { if ( mpi_rank == 0 ) { - nerrs--; + HDprintf(" Need at least 3 processes. Exiting.\n"); } goto finish; @@ -940,7 +849,6 @@ finish: HDfprintf(stderr, "MPI_Comm_free failed!\n"); } - /* make sure all processes are finished before final report, cleanup * and exit. */ @@ -961,7 +869,7 @@ finish: } /* close HDF5 library */ - if ((nerrs >= 0) && H5close() != SUCCEED) { + if (H5close() != SUCCEED) { HDfprintf(stdout, "H5close() failed. (Ignoring)\n"); } -- cgit v0.12 From a6e81cf18719bf8f18e226e229ec0e2c40d46871 Mon Sep 17 00:00:00 2001 From: Richard Warren Date: Thu, 1 Mar 2018 15:38:03 -0500 Subject: Remove unused variables that were commented out in t_pread.c --- testpar/t_pread.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/testpar/t_pread.c b/testpar/t_pread.c index 610d95f..3d150af 100644 --- a/testpar/t_pread.c +++ b/testpar/t_pread.c @@ -49,7 +49,6 @@ static int generate_test_file(MPI_Comm comm, int mpi_rank, int group); static int test_parallel_read(MPI_Comm comm, int mpi_rank, int group); static char *test_argv0 = NULL; -// extern char *dirname(char *path); /* Avoids additional includes */ /*------------------------------------------------------------------------- @@ -93,8 +92,6 @@ generate_test_file( MPI_Comm comm, int mpi_rank, int group_id ) const char *failure_mssg = NULL; char *group_filename = NULL; char data_filename[FILENAME_BUF_SIZE]; - // char reloc_data_filename[FILENAME_BUF_SIZE]; - // char prolog_filename[FILENAME_BUF_SIZE]; int file_index = 0; int group_size; int group_rank; -- cgit v0.12 From f4ac515fed56ded7b1c2ca9d6dedbfebd68501fb Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Tue, 6 Mar 2018 10:03:09 -0600 Subject: Merge 10414, 10292, VFD fix from develop --- java/src/jni/h5dImp.c | 2 +- java/test/TestH5Pfapl.java | 8 ++++++++ release_docs/INSTALL_CMake.txt | 4 ++-- src/H5Pfapl.c | 2 +- test/CMakeVFDTests.cmake | 15 +++++++++++++++ 5 files changed, 27 insertions(+), 4 deletions(-) diff --git a/java/src/jni/h5dImp.c b/java/src/jni/h5dImp.c index 66efed0..9784055 100644 --- a/java/src/jni/h5dImp.c +++ b/java/src/jni/h5dImp.c @@ -1019,7 +1019,7 @@ Java_hdf_hdf5lib_H5_H5DreadVL } /* end else */ return (jint)status; -} /* end Java_hdf_hdf5lib_H5_H5Dread_1VLStrings */ +} /* end Java_hdf_hdf5lib_H5_H5Dread_1VL */ herr_t H5DreadVL_asstr diff --git a/java/test/TestH5Pfapl.java b/java/test/TestH5Pfapl.java index 48a5986..0651502 100644 --- a/java/test/TestH5Pfapl.java +++ b/java/test/TestH5Pfapl.java @@ -26,6 +26,7 @@ import hdf.hdf5lib.H5; import hdf.hdf5lib.HDF5Constants; import hdf.hdf5lib.exceptions.HDF5Exception; import hdf.hdf5lib.exceptions.HDF5LibraryException; +import hdf.hdf5lib.exceptions.HDF5PropertyListInterfaceException; import hdf.hdf5lib.structs.H5AC_cache_config_t; import org.junit.After; @@ -1385,6 +1386,13 @@ public class TestH5Pfapl { ret_val_id = H5.H5Pget_evict_on_close(fapl_id); assertTrue("H5P_evict_on_close", ret_val_id); } + catch (HDF5PropertyListInterfaceException err) { + // parallel is not supported + if (err.getMinorErrorNumber() != HDF5Constants.H5E_UNSUPPORTED) { + err.printStackTrace(); + fail("H5P_evict_on_close: " + err); + } + } catch (Throwable err) { err.printStackTrace(); fail("H5P_evict_on_close: " + err); diff --git a/release_docs/INSTALL_CMake.txt b/release_docs/INSTALL_CMake.txt index a01ec49..87d7886 100644 --- a/release_docs/INSTALL_CMake.txt +++ b/release_docs/INSTALL_CMake.txt @@ -165,8 +165,9 @@ To build HDF5 with the SZIP and ZLIB external libraries you will need to: III. Quick Step Building HDF5 C Static Libraries and Tools with CMake ======================================================================== Notes: This short set of instructions is written for users who want to - quickly build the just the HDF5 C static library and tools from + quickly build just the HDF5 C static library and tools from the HDF5 source code package using the CMake command line tools. + Avoid the use of drive letters in paths on Windows. Go through these steps: @@ -571,7 +572,6 @@ HDF5_ENABLE_DEPRECATED_SYMBOLS "Enable deprecated public API symbols" HDF5_ENABLE_DIRECT_VFD "Build the Direct I/O Virtual File Driver" OFF HDF5_ENABLE_EMBEDDED_LIBINFO "embed library info into executables" ON HDF5_ENABLE_HSIZET "Enable datasets larger than memory" ON -HDF5_ENABLE_LARGE_FILE "Enable support for large (64-bit) files on Linux." ON HDF5_ENABLE_PARALLEL "Enable parallel build (requires MPI)" OFF HDF5_ENABLE_TRACE "Enable API tracing capability" OFF HDF5_ENABLE_USING_MEMCHECKER "Indicate that a memory checker is used" OFF diff --git a/src/H5Pfapl.c b/src/H5Pfapl.c index a1a7049..038429c 100644 --- a/src/H5Pfapl.c +++ b/src/H5Pfapl.c @@ -4396,7 +4396,7 @@ H5Pset_evict_on_close(hid_t fapl_id, hbool_t evict_on_close) #ifndef H5_HAVE_PARALLEL /* Set value */ if(H5P_set(plist, H5F_ACS_EVICT_ON_CLOSE_FLAG_NAME, &evict_on_close) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "can't set evict on close property") + HGOTO_ERROR(H5E_PLIST, H5E_UNSUPPORTED, FAIL, "can't set evict on close property") #else HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "evict on close is currently not supported in parallel HDF5") #endif /* H5_HAVE_PARALLEL */ diff --git a/test/CMakeVFDTests.cmake b/test/CMakeVFDTests.cmake index 995f4e0..be02110 100644 --- a/test/CMakeVFDTests.cmake +++ b/test/CMakeVFDTests.cmake @@ -32,8 +32,12 @@ endif () foreach (vfdtest ${VFD_LIST}) file (MAKE_DIRECTORY "${PROJECT_BINARY_DIR}/${vfdtest}") + file (MAKE_DIRECTORY "${PROJECT_BINARY_DIR}/${vfdtest}/testfiles") + file (MAKE_DIRECTORY "${PROJECT_BINARY_DIR}/${vfdtest}/testfiles/plist_files") if (BUILD_SHARED_LIBS) file (MAKE_DIRECTORY "${PROJECT_BINARY_DIR}/${vfdtest}-shared") + file (MAKE_DIRECTORY "${PROJECT_BINARY_DIR}/${vfdtest}-shared/testfiles") + file (MAKE_DIRECTORY "${PROJECT_BINARY_DIR}/${vfdtest}-shared/testfiles/plist_files") endif () endforeach () @@ -64,6 +68,17 @@ foreach (vfdtest ${VFD_LIST}) endforeach () endforeach () +foreach (vfdtest ${VFD_LIST}) + foreach (plistfile ${HDF5_REFERENCE_PLIST_FILES}) + HDFTEST_COPY_FILE("${HDF5_TEST_SOURCE_DIR}/testfiles/plist_files/${plistfile}" "${PROJECT_BINARY_DIR}/${vfdtest}/testfiles/plist_files/${plistfile}" "HDF5_VFDTEST_LIB_files") + HDFTEST_COPY_FILE("${HDF5_TEST_SOURCE_DIR}/testfiles/plist_files/def_${plistfile}" "${PROJECT_BINARY_DIR}/${vfdtest}/testfiles/plist_files/def_${plistfile}" "HDF5_VFDTEST_LIB_files") + if (BUILD_SHARED_LIBS) + HDFTEST_COPY_FILE("${HDF5_TEST_SOURCE_DIR}/testfiles/plist_files/${plistfile}" "${PROJECT_BINARY_DIR}/${vfdtest}-shared/testfiles/plist_files/${plistfile}" "HDF5_VFDTEST_LIBSH_files") + HDFTEST_COPY_FILE("${HDF5_TEST_SOURCE_DIR}/testfiles/plist_files/def_${plistfile}" "${PROJECT_BINARY_DIR}/${vfdtest}-shared/testfiles/plist_files/def_${plistfile}" "HDF5_VFDTEST_LIBSH_files") + endif () + endforeach () +endforeach () + add_custom_target(HDF5_VFDTEST_LIB_files ALL COMMENT "Copying files needed by HDF5_VFDTEST_LIB tests" DEPENDS ${HDF5_VFDTEST_LIB_files_list}) if (BUILD_SHARED_LIBS) add_custom_target(HDF5_VFDTEST_LIBSH_files ALL COMMENT "Copying files needed by HDF5_VFDTEST_LIBSH tests" DEPENDS ${HDF5_VFDTEST_LIBSH_files_list}) -- cgit v0.12 From 28566611daa48e761abb688ec673b546cde244d7 Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Wed, 7 Mar 2018 11:43:10 -0600 Subject: Merge changes from develop --- config/cmake_ext_mod/HDFMacros.cmake | 8 +- release_docs/RELEASE.txt | 6 + src/H5Pfapl.c | 4 +- testpar/CMakeTests.cmake | 4 - testpar/t_cache_image.c | 714 ++++++++++++++++++----------------- testpar/t_pread.c | 2 +- 6 files changed, 391 insertions(+), 347 deletions(-) diff --git a/config/cmake_ext_mod/HDFMacros.cmake b/config/cmake_ext_mod/HDFMacros.cmake index 4097ca9..bdc52b9 100644 --- a/config/cmake_ext_mod/HDFMacros.cmake +++ b/config/cmake_ext_mod/HDFMacros.cmake @@ -27,8 +27,12 @@ macro (SET_HDF_BUILD_TYPE) set(HDF_BUILD_TYPE "Release") endif() endif() - if(NOT CMAKE_BUILD_TYPE) - set(CMAKE_BUILD_TYPE "Release") + if(NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES) + message(STATUS "Setting build type to 'RelWithDebInfo' as none was specified.") + 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" + "MinSizeRel" "RelWithDebInfo") endif() endmacro () diff --git a/release_docs/RELEASE.txt b/release_docs/RELEASE.txt index 3110f8c..c62e8d9 100644 --- a/release_docs/RELEASE.txt +++ b/release_docs/RELEASE.txt @@ -270,6 +270,12 @@ Bug Fixes since HDF5-1.10.1 release Library ------- + - H5Pset_evict_on_close in H5Pfapl.c + + Changed the minor error number from H5E_CANTSET to H5E_UNSUPPORTED for + parallel library. + (ADB - 2018/03/6, HDFFV-10414) + - Utility function can not handle lowercase Windows drive letters Added call to toupper function for drive letter. diff --git a/src/H5Pfapl.c b/src/H5Pfapl.c index 038429c..b85b82a 100644 --- a/src/H5Pfapl.c +++ b/src/H5Pfapl.c @@ -4396,9 +4396,9 @@ H5Pset_evict_on_close(hid_t fapl_id, hbool_t evict_on_close) #ifndef H5_HAVE_PARALLEL /* Set value */ if(H5P_set(plist, H5F_ACS_EVICT_ON_CLOSE_FLAG_NAME, &evict_on_close) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_UNSUPPORTED, FAIL, "can't set evict on close property") + HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "can't set evict on close property") #else - HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "evict on close is currently not supported in parallel HDF5") + HGOTO_ERROR(H5E_PLIST, H5E_UNSUPPORTED, FAIL, "evict on close is currently not supported in parallel HDF5") #endif /* H5_HAVE_PARALLEL */ done: diff --git a/testpar/CMakeTests.cmake b/testpar/CMakeTests.cmake index cd9acda..87470f3 100644 --- a/testpar/CMakeTests.cmake +++ b/testpar/CMakeTests.cmake @@ -18,10 +18,6 @@ add_test (NAME TEST_PAR_testphdf5 COMMAND ${MPIEXEC_EXECUTABLE} ${MPIEXEC_NUMPROC_FLAG} ${MPIEXEC_MAX_NUMPROCS} ${MPIEXEC_PREFLAGS} $ ${MPIEXEC_POSTFLAGS}) -if (WIN32) - # t_cache_imagee uses fork() and execve(), will not run on Windows - list (REMOVE_ITEM H5P_TESTS t_cache_image) -endif () foreach (testp ${H5P_TESTS}) add_test (NAME TEST_PAR_${testp} COMMAND ${MPIEXEC_EXECUTABLE} ${MPIEXEC_NUMPROC_FLAG} ${MPIEXEC_MAX_NUMPROCS} ${MPIEXEC_PREFLAGS} $ ${MPIEXEC_POSTFLAGS}) endforeach () diff --git a/testpar/t_cache_image.c b/testpar/t_cache_image.c index 12479c7..fc88c61 100644 --- a/testpar/t_cache_image.c +++ b/testpar/t_cache_image.c @@ -14,8 +14,8 @@ /* Programmer: John Mainzer * 7/13/15 * - * This file contains tests specific to the cache image - * feature implemented in H5C.c + * This file contains tests specific to the cache image + * feature implemented in H5C.c */ #include "testphdf5.h" @@ -27,7 +27,7 @@ #define DSET_SIZE (40 * CHUNK_SIZE) #define MAX_NUM_DSETS 256 #define PAR_NUM_DSETS 32 -#define PAGE_SIZE (4 * 1024) +#define PAGE_SIZE (4 * 1024) #define PB_SIZE (64 * PAGE_SIZE) /* global variable declarations: */ @@ -58,8 +58,8 @@ static void open_hdf5_file(const hbool_t create_file, hid_t * file_id_ptr, H5F_t ** file_ptr_ptr, H5C_t ** cache_ptr_ptr, - MPI_Comm comm, - MPI_Info info, + MPI_Comm comm, + MPI_Info info, int l_facc_type, const hbool_t all_coll_metadata_ops, const hbool_t coll_metadata_write, @@ -69,11 +69,11 @@ static void verify_data_sets(hid_t file_id, int min_dset, int max_dset); /* local test function declarations */ -static hbool_t parse_flags(int argc, char * argv[], hbool_t * setup_ptr, +static hbool_t parse_flags(int argc, char * argv[], hbool_t * setup_ptr, hbool_t * ici_ptr, int * file_idx_ptr, int * mpi_size_ptr, hbool_t display); static void usage(void); static unsigned construct_test_file(int test_file_index); -static void par_create_dataset(int dset_num, hid_t file_id, int mpi_rank, +static void par_create_dataset(int dset_num, hid_t file_id, int mpi_rank, int mpi_size); static void par_delete_dataset(int dset_num, hid_t file_id, int mpi_rank); static void par_verify_dataset(int dset_num, hid_t file_id, int mpi_rank); @@ -82,15 +82,15 @@ static hbool_t serial_insert_cache_image(int file_name_idx, int mpi_size); static void serial_verify_dataset(int dset_num, hid_t file_id, int mpi_size); /* top level test function declarations */ -static unsigned verify_cache_image_RO(int file_name_id, +static unsigned verify_cache_image_RO(int file_name_id, int md_write_strat, int mpi_rank); -static unsigned verify_cache_image_RW(int file_name_id, +static unsigned verify_cache_image_RW(int file_name_id, int md_write_strat, int mpi_rank); -static hbool_t smoke_check_1(MPI_Comm mpi_comm, MPI_Info mpi_info, +static hbool_t smoke_check_1(MPI_Comm mpi_comm, MPI_Info mpi_info, int mpi_rank, int mpi_size); - + /****************************************************************************/ /***************************** Utility Functions ****************************/ /****************************************************************************/ @@ -98,52 +98,52 @@ static hbool_t smoke_check_1(MPI_Comm mpi_comm, MPI_Info mpi_info, /*------------------------------------------------------------------------- * Function: construct_test_file() * - * Purpose: This function attempts to mimic the typical "poor man's - * parallel use case in which the file is passed between - * processes, each of which open the file, write some data, - * close the file, and then pass control on to the next - * process. + * Purpose: This function attempts to mimic the typical "poor man's + * parallel use case in which the file is passed between + * processes, each of which open the file, write some data, + * close the file, and then pass control on to the next + * process. * - * In this case, we create one group for each process, and - * populate it with a "zoo" of HDF5 objects selected to - * (ideally) exercise all HDF5 on disk data structures. + * In this case, we create one group for each process, and + * populate it with a "zoo" of HDF5 objects selected to + * (ideally) exercise all HDF5 on disk data structures. * - * The end result is a test file used verify that PHDF5 - * can open a file with a cache image. + * The end result is a test file used verify that PHDF5 + * can open a file with a cache image. * - * Cycle of operation + * Cycle of operation * - * 1) Create a HDF5 file with the cache image FAPL entry. + * 1) Create a HDF5 file with the cache image FAPL entry. * - * Verify that the cache is informed of the cache image - * FAPL entry. + * Verify that the cache is informed of the cache image + * FAPL entry. * - * Set all cache image flags, forcing full functionality. + * Set all cache image flags, forcing full functionality. * - * 2) Create a data set in the file. + * 2) Create a data set in the file. * - * 3) Close the file. + * 3) Close the file. * - * 4) Open the file. + * 4) Open the file. * - * Verify that the metadata cache is instructed to load + * Verify that the metadata cache is instructed to load * the metadata cache image. * - * 5) Create a data set in the file. + * 5) Create a data set in the file. * - * 6) Close the file. If enough datasets have been created + * 6) Close the file. If enough datasets have been created * goto 7. Otherwise return to 4. * - * 7) Open the file R/O. + * 7) Open the file R/O. * * Verify that the file contains a metadata cache image * superblock extension message. - * - * 8) Verify all data sets. * - * Verify that the cache image has been loaded. + * 8) Verify all data sets. + * + * Verify that the cache image has been loaded. * - * 9) close the file. + * 9) close the file. * * Return: void * @@ -152,7 +152,7 @@ static hbool_t smoke_check_1(MPI_Comm mpi_comm, MPI_Info mpi_info, * * Modifications: * - * None. + * None. * *------------------------------------------------------------------------- */ @@ -174,7 +174,7 @@ construct_test_file(int test_file_index) pass = TRUE; - if ( show_progress ) + if ( show_progress ) HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); @@ -183,7 +183,7 @@ construct_test_file(int test_file_index) HDassert(FILENAMES[test_file_index]); - if ( h5_fixname(FILENAMES[test_file_index], H5P_DEFAULT, + if ( h5_fixname(FILENAMES[test_file_index], H5P_DEFAULT, filename, sizeof(filename)) == NULL ) { @@ -192,13 +192,13 @@ construct_test_file(int test_file_index) } } - if ( show_progress ) + if ( show_progress ) HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); - /* 1) Create a HDF5 file with the cache image FAPL entry. + /* 1) Create a HDF5 file with the cache image FAPL entry. * - * Verify that the cache is informed of the cache image FAPL entry. + * Verify that the cache is informed of the cache image FAPL entry. * * Set flags forcing full function of the cache image feature. */ @@ -209,7 +209,7 @@ construct_test_file(int test_file_index) /* mdci_sbem_expected */ FALSE, /* read_only */ FALSE, /* set_mdci_fapl */ TRUE, - /* config_fsm */ TRUE, + /* config_fsm */ TRUE, /* enable_page_buffer */ FALSE, /* hdf_file_name */ filename, /* cache_image_flags */ H5C_CI__ALL_FLAGS, @@ -224,7 +224,7 @@ construct_test_file(int test_file_index) /* md_write_strat */ 0); } - if ( show_progress ) + if ( show_progress ) HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); @@ -246,7 +246,7 @@ construct_test_file(int test_file_index) } #endif /* H5C_COLLECT_CACHE_STATS */ - if ( show_progress ) + if ( show_progress ) HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); @@ -262,7 +262,7 @@ construct_test_file(int test_file_index) } } - if ( show_progress ) + if ( show_progress ) HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); @@ -281,7 +281,7 @@ construct_test_file(int test_file_index) /* mdci_sbem_expected */ TRUE, /* read_only */ FALSE, /* set_mdci_fapl */ TRUE, - /* config_fsm */ FALSE, + /* config_fsm */ FALSE, /* enable_page_buffer */ FALSE, /* hdf_file_name */ filename, /* cache_image_flags */ H5C_CI__ALL_FLAGS, @@ -355,7 +355,7 @@ construct_test_file(int test_file_index) /* mdci_sbem_expected */ TRUE, /* read_only */ TRUE, /* set_mdci_fapl */ FALSE, - /* config_fsm */ FALSE, + /* config_fsm */ FALSE, /* enable_page_buffer */ FALSE, /* hdf_file_name */ filename, /* cache_image_flags */ H5C_CI__ALL_FLAGS, @@ -374,7 +374,7 @@ construct_test_file(int test_file_index) HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); - /* 8) Open and close all data sets. + /* 8) Open and close all data sets. * * Verify that the cache image has been loaded. */ @@ -413,15 +413,15 @@ construct_test_file(int test_file_index) } /* construct_test_file() */ - + /*------------------------------------------------------------------------- * Function: create_data_sets() * * Purpose: If pass is TRUE on entry, create the specified data sets - * in the indicated file. + * in the indicated file. * - * Data sets and their contents must be well know, as we - * will verify that they contain the expected data later. + * Data sets and their contents must be well know, as we + * will verify that they contain the expected data later. * * On failure, set pass to FALSE, and set failure_mssg * to point to an appropriate failure message. @@ -435,15 +435,15 @@ construct_test_file(int test_file_index) * * Modifications: * - * Added min_dset and max_dset parameters and supporting - * code. This allows the caller to specify a range of - * datasets to create. - * JRM -- 8/20/15 + * Added min_dset and max_dset parameters and supporting + * code. This allows the caller to specify a range of + * datasets to create. + * JRM -- 8/20/15 * *------------------------------------------------------------------------- */ -static void +static void create_data_sets(hid_t file_id, int min_dset, int max_dset) { const char * fcn_name = "create_data_sets()"; @@ -665,8 +665,8 @@ create_data_sets(hid_t file_id, int min_dset, int max_dset) /* read the chunk from file */ if ( pass ) { - status = H5Dread(dataset_ids[m], H5T_NATIVE_INT, - memspace_id, filespace_ids[m], + status = H5Dread(dataset_ids[m], H5T_NATIVE_INT, + memspace_id, filespace_ids[m], H5P_DEFAULT, data_chunk); if ( status < 0 ) { @@ -691,7 +691,7 @@ create_data_sets(hid_t file_id, int min_dset, int max_dset) valid_chunk = FALSE; - if ( verbose ) { + if ( verbose ) { HDfprintf(stdout, "data_chunk[%0d][%0d] = %0d, expect %0d.\n", @@ -701,7 +701,7 @@ create_data_sets(hid_t file_id, int min_dset, int max_dset) HDfprintf(stdout, "m = %d, i = %d, j = %d, k = %d, l = %d\n", m, i, j, k, l); - } + } } } } @@ -711,12 +711,12 @@ create_data_sets(hid_t file_id, int min_dset, int max_dset) pass = FALSE; failure_mssg = "slab validation failed."; - if ( verbose ) { + if ( verbose ) { - fprintf(stdout, + fprintf(stdout, "Chunk (%0d, %0d) in /dset%03d is invalid.\n", i, j, m); - } + } } } m++; @@ -767,16 +767,16 @@ create_data_sets(hid_t file_id, int min_dset, int max_dset) } /* create_data_sets() */ - + /*------------------------------------------------------------------------- * Function: delete_data_sets() * - * Purpose: If pass is TRUE on entry, verify and then delete the - * dataset(s) indicated by min_dset and max_dset in the - * indicated file. + * Purpose: If pass is TRUE on entry, verify and then delete the + * dataset(s) indicated by min_dset and max_dset in the + * indicated file. * - * Data sets and their contents must be well know, as we - * will verify that they contain the expected data later. + * Data sets and their contents must be well know, as we + * will verify that they contain the expected data later. * * On failure, set pass to FALSE, and set failure_mssg * to point to an appropriate failure message. @@ -791,17 +791,17 @@ create_data_sets(hid_t file_id, int min_dset, int max_dset) * Modifications: * * None. - * JRM -- 8/20/15 + * JRM -- 8/20/15 * *------------------------------------------------------------------------- */ -#if 0 +#if 0 /* this code will be needed to test full support of cache image * in parallel -- keep it around against that day. * * -- JRM */ -static void +static void delete_data_sets(hid_t file_id, int min_dset, int max_dset) { const char * fcn_name = "delete_data_sets()"; @@ -832,11 +832,11 @@ delete_data_sets(hid_t file_id, int min_dset, int max_dset) { sprintf(dset_name, "/dset%03d", i); - if ( H5Ldelete(file_id, dset_name, H5P_DEFAULT) < 0) { + if ( H5Ldelete(file_id, dset_name, H5P_DEFAULT) < 0) { pass = FALSE; failure_mssg = "H5Ldelete() failed."; - } + } i++; } @@ -849,32 +849,32 @@ delete_data_sets(hid_t file_id, int min_dset, int max_dset) } /* delete_data_sets() */ #endif - + /*------------------------------------------------------------------------- * Function: open_hdf5_file() * - * Purpose: If pass is true on entry, create or open the specified HDF5 - * and test to see if it has a metadata cache image superblock - * extension message. + * Purpose: If pass is true on entry, create or open the specified HDF5 + * and test to see if it has a metadata cache image superblock + * extension message. * - * Set pass to FALSE and issue a suitable failure - * message if either the file contains a metadata cache image - * superblock extension and mdci_sbem_expected is TRUE, or - * vise versa. + * Set pass to FALSE and issue a suitable failure + * message if either the file contains a metadata cache image + * superblock extension and mdci_sbem_expected is TRUE, or + * vise versa. * - * If mdci_sbem_expected is TRUE, also verify that the metadata - * cache has been advised of this. + * If mdci_sbem_expected is TRUE, also verify that the metadata + * cache has been advised of this. * - * If read_only is TRUE, open the file read only. Otherwise - * open the file read/write. + * If read_only is TRUE, open the file read only. Otherwise + * open the file read/write. * - * If set_mdci_fapl is TRUE, set the metadata cache image - * FAPL entry when opening the file, and verify that the - * metadata cache is notified. + * If set_mdci_fapl is TRUE, set the metadata cache image + * FAPL entry when opening the file, and verify that the + * metadata cache is notified. * - * If config_fsm is TRUE, setup the persistant free space - * manager. Note that this flag may only be set if - * create_file is also TRUE. + * If config_fsm is TRUE, setup the persistant free space + * manager. Note that this flag may only be set if + * create_file is also TRUE. * * Return pointers to the cache data structure and file data * structures. @@ -892,10 +892,10 @@ delete_data_sets(hid_t file_id, int min_dset, int max_dset) * Modifications: * * Modified function to handle parallel file creates / opens. - * + * * JRM -- 2/1/17 * - * Modified function to handle + * Modified function to handle * *------------------------------------------------------------------------- */ @@ -903,17 +903,17 @@ delete_data_sets(hid_t file_id, int min_dset, int max_dset) static void open_hdf5_file(const hbool_t create_file, const hbool_t mdci_sbem_expected, - const hbool_t read_only, - const hbool_t set_mdci_fapl, - const hbool_t config_fsm, + const hbool_t read_only, + const hbool_t set_mdci_fapl, + const hbool_t config_fsm, const hbool_t enable_page_buffer, - const char * hdf_file_name, + const char * hdf_file_name, const unsigned cache_image_flags, hid_t * file_id_ptr, H5F_t ** file_ptr_ptr, H5C_t ** cache_ptr_ptr, - MPI_Comm comm, - MPI_Info info, + MPI_Comm comm, + MPI_Info info, int l_facc_type, const hbool_t all_coll_metadata_ops, const hbool_t coll_metadata_write, @@ -940,8 +940,8 @@ open_hdf5_file(const hbool_t create_file, if ( pass ) { - /* opening the file both read only and with a cache image - * requested is a contradiction. We resolve it by ignoring + /* opening the file both read only and with a cache image + * requested is a contradiction. We resolve it by ignoring * the cache image request silently. */ if ( ( create_file && mdci_sbem_expected ) || @@ -968,7 +968,7 @@ open_hdf5_file(const hbool_t create_file, } } - if ( show_progress ) + if ( show_progress ) HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); /* create a file access propertly list. */ @@ -983,13 +983,13 @@ open_hdf5_file(const hbool_t create_file, } } - if ( show_progress ) + if ( show_progress ) HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); /* call H5Pset_libver_bounds() on the fapl_id */ if ( pass ) { - if ( H5Pset_libver_bounds(fapl_id, H5F_LIBVER_LATEST, H5F_LIBVER_LATEST) + if ( H5Pset_libver_bounds(fapl_id, H5F_LIBVER_LATEST, H5F_LIBVER_LATEST) < 0 ) { pass = FALSE; @@ -997,7 +997,7 @@ open_hdf5_file(const hbool_t create_file, } } - if ( show_progress ) + if ( show_progress ) HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); /* get metadata cache image config -- verify that it is the default */ @@ -1015,7 +1015,7 @@ open_hdf5_file(const hbool_t create_file, H5AC__CURR_CACHE_IMAGE_CONFIG_VERSION ) || ( cache_image_config.generate_image != FALSE ) || ( cache_image_config.save_resize_status != FALSE ) || - ( cache_image_config.entry_ageout != + ( cache_image_config.entry_ageout != H5AC__CACHE_IMAGE__ENTRY_AGEOUT__NONE ) ) { pass = FALSE; @@ -1023,7 +1023,7 @@ open_hdf5_file(const hbool_t create_file, } } - if ( show_progress ) + if ( show_progress ) HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); /* set metadata cache image fapl entry if indicated */ @@ -1043,24 +1043,24 @@ open_hdf5_file(const hbool_t create_file, } } - if ( show_progress ) + if ( show_progress ) HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); /* setup the persistant free space manager if indicated */ if ( ( pass ) && ( config_fsm ) ) { - fcpl_id = H5Pcreate(H5P_FILE_CREATE); + fcpl_id = H5Pcreate(H5P_FILE_CREATE); - if ( fcpl_id <= 0 ) { + if ( fcpl_id <= 0 ) { - pass = FALSE; - failure_mssg = "H5Pcreate(H5P_FILE_CREATE) failed."; - } + pass = FALSE; + failure_mssg = "H5Pcreate(H5P_FILE_CREATE) failed."; + } } if ( ( pass ) && ( config_fsm ) ) { - if ( H5Pset_file_space_strategy(fcpl_id, H5F_FSPACE_STRATEGY_PAGE, + if ( H5Pset_file_space_strategy(fcpl_id, H5F_FSPACE_STRATEGY_PAGE, TRUE, (hsize_t)1) == FAIL ) { pass = FALSE; failure_mssg = "H5Pset_file_space_strategy() failed.\n"; @@ -1076,7 +1076,7 @@ open_hdf5_file(const hbool_t create_file, } } - if ( show_progress ) + if ( show_progress ) HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); /* setup the page buffer if indicated */ @@ -1086,10 +1086,10 @@ open_hdf5_file(const hbool_t create_file, pass = FALSE; failure_mssg = "H5Pset_page_buffer_size() failed.\n"; - } + } } - if ( show_progress ) + if ( show_progress ) HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); @@ -1097,13 +1097,13 @@ open_hdf5_file(const hbool_t create_file, /* set Parallel access with communicator */ if ( H5Pset_fapl_mpio(fapl_id, comm, info) < 0 ) { - + pass = FALSE; failure_mssg = "H5Pset_fapl_mpio() failed.\n"; } } - if ( show_progress ) + if ( show_progress ) HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); if ( ( pass ) && ( l_facc_type == FACC_MPIO ) ) { @@ -1115,7 +1115,7 @@ open_hdf5_file(const hbool_t create_file, } } - if ( show_progress ) + if ( show_progress ) HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); if ( ( pass ) && ( l_facc_type == FACC_MPIO ) ) { @@ -1127,7 +1127,7 @@ open_hdf5_file(const hbool_t create_file, } } - if ( show_progress ) + if ( show_progress ) HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); if ( ( pass ) && ( l_facc_type == FACC_MPIO ) ) { @@ -1136,7 +1136,7 @@ open_hdf5_file(const hbool_t create_file, H5AC_cache_config_t mdc_config; mdc_config.version = H5C__CURR_AUTO_SIZE_CTL_VER; - + if ( H5Pget_mdc_config(fapl_id, &mdc_config) < 0 ) { pass = FALSE; @@ -1152,7 +1152,7 @@ open_hdf5_file(const hbool_t create_file, } } - if ( show_progress ) + if ( show_progress ) HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); /* open the file */ @@ -1160,13 +1160,13 @@ open_hdf5_file(const hbool_t create_file, if ( create_file ) { - if ( fcpl_id != -1 ) + if ( fcpl_id != -1 ) - file_id = H5Fcreate(hdf_file_name, H5F_ACC_TRUNC, - fcpl_id, fapl_id); - else + file_id = H5Fcreate(hdf_file_name, H5F_ACC_TRUNC, + fcpl_id, fapl_id); + else - file_id = H5Fcreate(hdf_file_name, H5F_ACC_TRUNC, + file_id = H5Fcreate(hdf_file_name, H5F_ACC_TRUNC, H5P_DEFAULT, fapl_id); } else { @@ -1201,7 +1201,7 @@ open_hdf5_file(const hbool_t create_file, } } - if ( show_progress ) + if ( show_progress ) HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); /* get a pointer to the files internal data structure and then @@ -1220,12 +1220,12 @@ open_hdf5_file(const hbool_t create_file, } } - if ( show_progress ) + if ( show_progress ) HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); - /* verify expected page buffer status. At present, page buffering - * must be disabled in parallel -- hopefully this will change in the + /* verify expected page buffer status. At present, page buffering + * must be disabled in parallel -- hopefully this will change in the * future. */ if ( pass ) { @@ -1244,7 +1244,7 @@ open_hdf5_file(const hbool_t create_file, } } - if ( show_progress ) + if ( show_progress ) HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); @@ -1264,7 +1264,7 @@ open_hdf5_file(const hbool_t create_file, } } - if ( show_progress ) + if ( show_progress ) HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); @@ -1272,26 +1272,26 @@ open_hdf5_file(const hbool_t create_file, if ( set_mdci_fapl ) { - if ( read_only ) { + if ( read_only ) { - if ( ( image_ctl.version != + if ( ( image_ctl.version != H5AC__CURR_CACHE_IMAGE_CONFIG_VERSION ) || ( image_ctl.generate_image != FALSE ) || ( image_ctl.save_resize_status != FALSE ) || - ( image_ctl.entry_ageout != + ( image_ctl.entry_ageout != H5AC__CACHE_IMAGE__ENTRY_AGEOUT__NONE ) || ( image_ctl.flags != H5C_CI__ALL_FLAGS ) ) { pass = FALSE; failure_mssg = "Unexpected image_ctl values(1).\n"; } - } else { + } else { - if ( ( image_ctl.version != + if ( ( image_ctl.version != H5AC__CURR_CACHE_IMAGE_CONFIG_VERSION ) || - ( image_ctl.generate_image != TRUE ) || + ( image_ctl.generate_image != TRUE ) || ( image_ctl.save_resize_status != FALSE ) || - ( image_ctl.entry_ageout != + ( image_ctl.entry_ageout != H5AC__CACHE_IMAGE__ENTRY_AGEOUT__NONE ) || ( image_ctl.flags != H5C_CI__ALL_FLAGS ) ) { @@ -1301,11 +1301,11 @@ open_hdf5_file(const hbool_t create_file, } } else { - if ( ( image_ctl.version != + if ( ( image_ctl.version != H5AC__CURR_CACHE_IMAGE_CONFIG_VERSION ) || ( image_ctl.generate_image != FALSE ) || ( image_ctl.save_resize_status != FALSE ) || - ( image_ctl.entry_ageout != + ( image_ctl.entry_ageout != H5AC__CACHE_IMAGE__ENTRY_AGEOUT__NONE ) || ( image_ctl.flags != H5C_CI__ALL_FLAGS ) ) { @@ -1315,7 +1315,7 @@ open_hdf5_file(const hbool_t create_file, } } - if ( show_progress ) + if ( show_progress ) HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); if ( ( pass ) && ( set_mdci_fapl ) ) { @@ -1329,7 +1329,7 @@ open_hdf5_file(const hbool_t create_file, } } - if ( show_progress ) + if ( show_progress ) HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); if ( pass ) { @@ -1358,19 +1358,19 @@ open_hdf5_file(const hbool_t create_file, pass = FALSE; failure_mssg = "mdci sb extension message not present?\n"; } - } + } } else { - if ( ( cache_ptr->load_image == TRUE ) || + if ( ( cache_ptr->load_image == TRUE ) || ( cache_ptr->delete_image == TRUE ) ) { pass = FALSE; failure_mssg = "mdci sb extension message present?\n"; - } + } } } - if ( show_progress ) + if ( show_progress ) HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); if ( pass ) { @@ -1381,11 +1381,11 @@ open_hdf5_file(const hbool_t create_file, } if ( show_progress ) { - HDfprintf(stdout, "%s: cp = %d, pass = %d -- exiting.\n", + HDfprintf(stdout, "%s: cp = %d, pass = %d -- exiting.\n", fcn_name, cp++, pass); if ( ! pass ) - HDfprintf(stdout, "%s: failure_mssg = %s\n", + HDfprintf(stdout, "%s: failure_mssg = %s\n", fcn_name, failure_mssg); } @@ -1393,11 +1393,11 @@ open_hdf5_file(const hbool_t create_file, } /* open_hdf5_file() */ - + /*------------------------------------------------------------------------- * Function: par_create_dataset() * - * Purpose: Collectively create a chunked dataset, and fill it with + * Purpose: Collectively create a chunked dataset, and fill it with * known values. * * On failure, set pass to FALSE, and set failure_mssg @@ -1468,7 +1468,7 @@ par_create_dataset(int dset_num, } } - if ( show_progress ) + if ( show_progress ) HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); /* set the dataset creation plist to specify that the raw data is @@ -1486,7 +1486,7 @@ par_create_dataset(int dset_num, } } - if ( show_progress ) + if ( show_progress ) HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); if ( pass ) { @@ -1502,7 +1502,7 @@ par_create_dataset(int dset_num, } } - if ( show_progress ) + if ( show_progress ) HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); /* create the dataset */ @@ -1519,7 +1519,7 @@ par_create_dataset(int dset_num, } } - if ( show_progress ) + if ( show_progress ) HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); /* get the file space ID */ @@ -1534,7 +1534,7 @@ par_create_dataset(int dset_num, } } - if ( show_progress ) + if ( show_progress ) HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); /* create the mem space to be used to read and write chunks */ @@ -1552,7 +1552,7 @@ par_create_dataset(int dset_num, } } - if ( show_progress ) + if ( show_progress ) HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); /* select in memory hyperslab */ @@ -1574,7 +1574,7 @@ par_create_dataset(int dset_num, } } - if ( show_progress ) + if ( show_progress ) HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); /* setup the DXPL for collective I/O */ @@ -1589,7 +1589,7 @@ par_create_dataset(int dset_num, } } - if ( show_progress ) + if ( show_progress ) HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); if ( pass ) { @@ -1601,7 +1601,7 @@ par_create_dataset(int dset_num, } } - if ( show_progress ) + if ( show_progress ) HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); /* initialize the dataset with collective writes */ @@ -1612,8 +1612,8 @@ par_create_dataset(int dset_num, while ( ( pass ) && ( j < DSET_SIZE ) ) { - if ( show_progress ) - HDfprintf(stdout, "%s: cp = %d.0, pass = %d.\n", + if ( show_progress ) + HDfprintf(stdout, "%s: cp = %d.0, pass = %d.\n", fcn_name, cp, pass); /* initialize the slab */ @@ -1627,8 +1627,8 @@ par_create_dataset(int dset_num, } } - if ( show_progress ) - HDfprintf(stdout, "%s: cp = %d.1, pass = %d.\n", + if ( show_progress ) + HDfprintf(stdout, "%s: cp = %d.1, pass = %d.\n", fcn_name, cp, pass); /* select on disk hyperslab */ @@ -1636,7 +1636,7 @@ par_create_dataset(int dset_num, offset[1] = (hsize_t)i; offset[2] = (hsize_t)j; a_size[0] = (hsize_t)1; /* size of hyperslab */ - a_size[1] = CHUNK_SIZE; + a_size[1] = CHUNK_SIZE; a_size[2] = CHUNK_SIZE; status = H5Sselect_hyperslab(filespace_id, H5S_SELECT_SET, offset, NULL, a_size, NULL); @@ -1647,8 +1647,8 @@ par_create_dataset(int dset_num, failure_mssg = "disk H5Sselect_hyperslab() failed."; } - if ( show_progress ) - HDfprintf(stdout, "%s: cp = %d.2, pass = %d.\n", + if ( show_progress ) + HDfprintf(stdout, "%s: cp = %d.2, pass = %d.\n", fcn_name, cp, pass); /* write the chunk to file */ @@ -1661,8 +1661,8 @@ par_create_dataset(int dset_num, failure_mssg = "H5Dwrite() failed."; } - if ( show_progress ) - HDfprintf(stdout, "%s: cp = %d.3, pass = %d.\n", + if ( show_progress ) + HDfprintf(stdout, "%s: cp = %d.3, pass = %d.\n", fcn_name, cp, pass); j += CHUNK_SIZE; @@ -1672,7 +1672,7 @@ par_create_dataset(int dset_num, } cp++; - if ( show_progress ) + if ( show_progress ) HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); /* read data from data sets and validate it */ @@ -1761,7 +1761,7 @@ par_create_dataset(int dset_num, i += CHUNK_SIZE; } - if ( show_progress ) + if ( show_progress ) HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); /* close the data space */ @@ -1806,14 +1806,14 @@ par_create_dataset(int dset_num, failure_mssg = "H5Pclose(dxpl) failed."; } - if ( show_progress ) + if ( show_progress ) HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); return; } /* par_create_dataset() */ - + /*------------------------------------------------------------------------- * Function: par_delete_dataset() * @@ -1861,7 +1861,7 @@ par_delete_dataset(int dset_num, par_verify_dataset(dset_num, file_id, mpi_rank); } - if ( show_progress ) + if ( show_progress ) HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); /* delete the target dataset */ @@ -1874,21 +1874,29 @@ par_delete_dataset(int dset_num, } } - if ( show_progress ) + if ( show_progress ) HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); return; } /* par_delete_dataset() */ - + +/* This test uses many POSIX things that are not available on + * Windows. We're using a check for fork(2) here as a proxy for + * all POSIX/Unix/Linux things until this test can be made + * more platform-independent. + */ +#ifdef H5_HAVE_FORK + + /*------------------------------------------------------------------------- * Function: par_insert_cache_image() * * Purpose: Insert a cache image in the supplied file. * - * At present, cache image is not enabled in the parallel - * so we have to insert the cache image with a serial + * At present, cache image is not enabled in the parallel + * so we have to insert the cache image with a serial * process. Do this via a fork and an execv from process 0. * All processes wait until the child process completes, and * then return. @@ -1907,6 +1915,10 @@ par_delete_dataset(int dset_num, * * None. * + *-------------------------------------- + return; + +} /* par_insert_cache_image() */ *------------------------------------------------------------------------- */ @@ -1934,22 +1946,22 @@ par_insert_cache_image(int file_name_idx, int mpi_rank, int mpi_size ) /* fun and games to shutup the compiler */ char param0[32] = "t_cache_image"; char param1[32] = "ici"; - char * child_argv[] = {param0, - param1, - file_name_idx_str, - mpi_size_str, + char * child_argv[] = {param0, + param1, + file_name_idx_str, + mpi_size_str, NULL}; /* we may need to play with the path here */ if ( execv("t_cache_image", child_argv) == -1 ) { - HDfprintf(stdout, + HDfprintf(stdout, "execl() of ici process failed. errno = %d(%s)\n", errno, strerror(errno)); exit(1); } - } else if ( child_pid != -1 ) { + } else if ( child_pid != -1 ) { /* this is the parent process -- wait until child is done */ if ( -1 == waitpid(child_pid, &child_status, WUNTRACED)) { @@ -1972,7 +1984,7 @@ par_insert_cache_image(int file_name_idx, int mpi_rank, int mpi_size ) } } else { /* fork failed */ - HDfprintf(stdout, + HDfprintf(stdout, "can't create process to insert cache image.\n"); pass = FALSE; } @@ -1981,8 +1993,8 @@ par_insert_cache_image(int file_name_idx, int mpi_rank, int mpi_size ) if ( pass ) { - /* make sure insertion of the cache image is complete - * before proceeding + /* make sure insertion of the cache image is complete + * before proceeding */ MPI_Barrier(MPI_COMM_WORLD); } @@ -1990,8 +2002,17 @@ par_insert_cache_image(int file_name_idx, int mpi_rank, int mpi_size ) return; } /* par_insert_cache_image() */ +#else /* H5_HAVE_FORK */ + +static void +par_insert_cache_image(int file_name_idx, int mpi_rank, int mpi_size ) +{ + return; +} /* par_insert_cache_image() */ + +#endif /* H5_HAVE_FORK */ + - /*------------------------------------------------------------------------- * Function: par_verify_dataset() * @@ -2071,7 +2092,7 @@ par_verify_dataset(int dset_num, } } - if ( show_progress ) + if ( show_progress ) HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); /* create the mem space to be used to read */ @@ -2089,7 +2110,7 @@ par_verify_dataset(int dset_num, } } - if ( show_progress ) + if ( show_progress ) HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); /* select in memory hyperslab */ @@ -2111,7 +2132,7 @@ par_verify_dataset(int dset_num, } } - if ( show_progress ) + if ( show_progress ) HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); /* setup the DXPL for collective I/O */ @@ -2126,7 +2147,7 @@ par_verify_dataset(int dset_num, } } - if ( show_progress ) + if ( show_progress ) HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); if ( pass ) { @@ -2138,7 +2159,7 @@ par_verify_dataset(int dset_num, } } - if ( show_progress ) + if ( show_progress ) HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); /* read data from data sets and validate it */ @@ -2227,7 +2248,7 @@ par_verify_dataset(int dset_num, i += CHUNK_SIZE; } - if ( show_progress ) + if ( show_progress ) HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); /* close the file space */ @@ -2258,23 +2279,23 @@ par_verify_dataset(int dset_num, failure_mssg = "H5Pclose(dxpl) failed."; } - if ( show_progress ) + if ( show_progress ) HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); return; } /* par_verify_dataset() */ - + /*------------------------------------------------------------------------- * Function: serial_insert_cache_image() * * Purpose: Insert a cache image in the supplied file. * - * To populate the cache image, validate the contents - * of the file before closing. + * To populate the cache image, validate the contents + * of the file before closing. * - * On failure, print an appropriate error message and + * On failure, print an appropriate error message and * return FALSE. * * Return: TRUE if succussful, FALSE otherwise. @@ -2328,7 +2349,7 @@ serial_insert_cache_image(int file_name_idx, int mpi_size ) HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); - /* 2) Open the PHDF5 file with the cache image FAPL entry. + /* 2) Open the PHDF5 file with the cache image FAPL entry. */ if ( pass ) { @@ -2387,7 +2408,7 @@ serial_insert_cache_image(int file_name_idx, int mpi_size ) } /* serial_insert_cache_image() */ - + /*------------------------------------------------------------------------- * Function: serial_verify_dataset() * @@ -2463,7 +2484,7 @@ serial_verify_dataset(int dset_num, } } - if ( show_progress ) + if ( show_progress ) HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); /* create the mem space to be used to read */ @@ -2481,7 +2502,7 @@ serial_verify_dataset(int dset_num, } } - if ( show_progress ) + if ( show_progress ) HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); /* select in memory hyperslab */ @@ -2503,7 +2524,7 @@ serial_verify_dataset(int dset_num, } } - if ( show_progress ) + if ( show_progress ) HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); @@ -2600,7 +2621,7 @@ serial_verify_dataset(int dset_num, } - if ( show_progress ) + if ( show_progress ) HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); /* close the file space */ @@ -2624,18 +2645,18 @@ serial_verify_dataset(int dset_num, failure_mssg = "H5Sclose(memspace_id) failed."; } - if ( show_progress ) + if ( show_progress ) HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); return; } /* serial_verify_dataset() */ - + /*------------------------------------------------------------------------- * Function: parse_flags * - * Purpose: Parse the flags passed to this program, and load the + * Purpose: Parse the flags passed to this program, and load the * values into the supplied field. * * Return: Success: 1 @@ -2647,7 +2668,7 @@ serial_verify_dataset(int dset_num, *------------------------------------------------------------------------- */ static hbool_t -parse_flags(int argc, char * argv[], hbool_t * setup_ptr, +parse_flags(int argc, char * argv[], hbool_t * setup_ptr, hbool_t * ici_ptr, int * file_idx_ptr, int * mpi_size_ptr, hbool_t display) { const char * fcn_name = "parse_flags()"; @@ -2668,7 +2689,7 @@ parse_flags(int argc, char * argv[], hbool_t * setup_ptr, } - if ( ( success ) && + if ( ( success ) && ( ( argc != 1 ) && ( argc != 2 ) && ( argc != 4 ) ) ) { success = FALSE; @@ -2715,7 +2736,7 @@ parse_flags(int argc, char * argv[], hbool_t * setup_ptr, else if ( *ici_ptr ) - HDfprintf(stdout, "t_cache_image ici %d %d\n", + HDfprintf(stdout, "t_cache_image ici %d %d\n", *file_idx_ptr, *mpi_size_ptr); else @@ -2727,7 +2748,7 @@ parse_flags(int argc, char * argv[], hbool_t * setup_ptr, } /* parse_flags() */ - + /*------------------------------------------------------------------------- * Function: usage * @@ -2737,7 +2758,7 @@ parse_flags(int argc, char * argv[], hbool_t * setup_ptr, * Return: void * * Programmer: John Mainzer - * 4/28/11 + * 4/28/11 * * Modifications: * @@ -2791,17 +2812,17 @@ usage(void) return; } /* usage() */ - + /*------------------------------------------------------------------------- * Function: verify_data_sets() * - * Purpose: If pass is TRUE on entry, verify that the data sets in the - * file exist and contain the expected data. + * Purpose: If pass is TRUE on entry, verify that the data sets in the + * file exist and contain the expected data. * - * Note that these data sets were created by - * create_data_sets() above. Thus any changes in that - * function must be reflected in this function, and - * vise-versa. + * Note that these data sets were created by + * create_data_sets() above. Thus any changes in that + * function must be reflected in this function, and + * vise-versa. * * On failure, set pass to FALSE, and set failure_mssg * to point to an appropriate failure message. @@ -2815,15 +2836,15 @@ usage(void) * * Modifications: * - * Added min_dset and max_dset parameters and supporting - * code. This allows the caller to specify a range of - * datasets to verify. - * JRM -- 8/20/15 + * Added min_dset and max_dset parameters and supporting + * code. This allows the caller to specify a range of + * datasets to verify. + * JRM -- 8/20/15 * *------------------------------------------------------------------------- */ -static void +static void verify_data_sets(hid_t file_id, int min_dset, int max_dset) { const char * fcn_name = "verify_data_sets()"; @@ -2951,8 +2972,8 @@ verify_data_sets(hid_t file_id, int min_dset, int max_dset) /* read the chunk from file */ if ( pass ) { - status = H5Dread(dataset_ids[m], H5T_NATIVE_INT, - memspace_id, filespace_ids[m], + status = H5Dread(dataset_ids[m], H5T_NATIVE_INT, + memspace_id, filespace_ids[m], H5P_DEFAULT, data_chunk); if ( status < 0 ) { @@ -2977,8 +2998,8 @@ verify_data_sets(hid_t file_id, int min_dset, int max_dset) valid_chunk = FALSE; - if ( verbose ) { - + if ( verbose ) { + HDfprintf(stdout, "data_chunk[%0d][%0d] = %0d, expect %0d.\n", k, l, data_chunk[k][l], @@ -2987,7 +3008,7 @@ verify_data_sets(hid_t file_id, int min_dset, int max_dset) HDfprintf(stdout, "m = %d, i = %d, j = %d, k = %d, l = %d\n", m, i, j, k, l); - } + } } } } @@ -2997,12 +3018,12 @@ verify_data_sets(hid_t file_id, int min_dset, int max_dset) pass = FALSE; failure_mssg = "slab validation failed."; - if ( verbose ) { + if ( verbose ) { - fprintf(stdout, + fprintf(stdout, "Chunk (%0d, %0d) in /dset%03d is invalid.\n", i, j, m); - } + } } } m++; @@ -3053,7 +3074,7 @@ verify_data_sets(hid_t file_id, int min_dset, int max_dset) } /* verify_data_sets() */ - + /****************************************************************************/ /******************************* Test Functions *****************************/ /****************************************************************************/ @@ -3061,21 +3082,21 @@ verify_data_sets(hid_t file_id, int min_dset, int max_dset) /*------------------------------------------------------------------------- * Function: verify_cache_image_RO() * - * Purpose: Verify that a HDF5 file containing a cache image is - * opened R/O and read correctly by PHDF5 with the specified + * Purpose: Verify that a HDF5 file containing a cache image is + * opened R/O and read correctly by PHDF5 with the specified * metadata write strategy. - * + * * Basic cycle of operation is as follows: * - * 1) Open the test file created at the beginning of this - * test read only. + * 1) Open the test file created at the beginning of this + * test read only. * - * Verify that the file contains a cache image. + * Verify that the file contains a cache image. * - * Verify that only process 0 reads the cache image. + * Verify that only process 0 reads the cache image. * - * Verify that all other processes receive the cache - * image block from process 0. + * Verify that all other processes receive the cache + * image block from process 0. * * 2) Verify that the file contains the expected data. * @@ -3095,7 +3116,7 @@ verify_data_sets(hid_t file_id, int min_dset, int max_dset) * * Modifications: * - * None. + * None. * *------------------------------------------------------------------------- */ @@ -3134,14 +3155,14 @@ verify_cache_image_RO(int file_name_id, int md_write_strat, int mpi_rank) show_progress = ( ( show_progress ) && ( mpi_rank == 0 ) ); - if ( show_progress ) + if ( show_progress ) HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); /* setup the file name */ if ( pass ) { - if ( h5_fixname(FILENAMES[file_name_id], H5P_DEFAULT, + if ( h5_fixname(FILENAMES[file_name_id], H5P_DEFAULT, filename, sizeof(filename)) == NULL ) { pass = FALSE; @@ -3149,7 +3170,7 @@ verify_cache_image_RO(int file_name_id, int md_write_strat, int mpi_rank) } } - if ( show_progress ) + if ( show_progress ) HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); @@ -3164,7 +3185,7 @@ verify_cache_image_RO(int file_name_id, int md_write_strat, int mpi_rank) /* mdci_sbem_expected */ TRUE, /* read_only */ TRUE, /* set_mdci_fapl */ FALSE, - /* config_fsm */ FALSE, + /* config_fsm */ FALSE, /* enable_page_buffer */ FALSE, /* hdf_file_name */ filename, /* cache_image_flags */ H5C_CI__ALL_FLAGS, @@ -3179,15 +3200,15 @@ verify_cache_image_RO(int file_name_id, int md_write_strat, int mpi_rank) /* md_write_strat */ md_write_strat); } - if ( show_progress ) + if ( show_progress ) HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); - /* 2) Verify that the file contains the expected data. + /* 2) Verify that the file contains the expected data. * * Verify that only process 0 reads the cache image. * - * Verify that all other processes receive the cache + * Verify that all other processes receive the cache * image block from process 0. */ @@ -3209,14 +3230,14 @@ verify_cache_image_RO(int file_name_id, int md_write_strat, int mpi_rank) } #endif /* H5C_COLLECT_CACHE_STATS */ - if ( show_progress ) + if ( show_progress ) HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); - /* Verify that all other processes receive the cache image block + /* Verify that all other processes receive the cache image block * from process 0. - * - * Since we have alread verified that only process 0 has read the - * image, it is sufficient to verify that the image was loaded on + * + * Since we have alread verified that only process 0 has read the + * image, it is sufficient to verify that the image was loaded on * all processes. */ #if H5C_COLLECT_CACHE_STATS @@ -3230,12 +3251,12 @@ verify_cache_image_RO(int file_name_id, int md_write_strat, int mpi_rank) } #endif /* H5C_COLLECT_CACHE_STATS */ - if ( show_progress ) + if ( show_progress ) HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); /* 3) Close the file. */ - + if ( pass ) { if ( H5Fclose(file_id) < 0 ) { @@ -3246,7 +3267,7 @@ verify_cache_image_RO(int file_name_id, int md_write_strat, int mpi_rank) } } - if ( show_progress ) + if ( show_progress ) HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); @@ -3258,7 +3279,7 @@ verify_cache_image_RO(int file_name_id, int md_write_strat, int mpi_rank) /* mdci_sbem_expected */ TRUE, /* read_only */ TRUE, /* set_mdci_fapl */ FALSE, - /* config_fsm */ FALSE, + /* config_fsm */ FALSE, /* enable_page_buffer */ FALSE, /* hdf_file_name */ filename, /* cache_image_flags */ H5C_CI__ALL_FLAGS, @@ -3273,12 +3294,12 @@ verify_cache_image_RO(int file_name_id, int md_write_strat, int mpi_rank) /* md_write_strat */ md_write_strat); } - if ( show_progress ) + if ( show_progress ) HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); /* 5) Verify that the file contains the expected data. */ - + if ( pass ) { verify_data_sets(file_id, 0, MAX_NUM_DSETS - 1); @@ -3297,7 +3318,7 @@ verify_cache_image_RO(int file_name_id, int md_write_strat, int mpi_rank) /* 6) Close the file. */ - + if ( pass ) { if ( H5Fclose(file_id) < 0 ) { @@ -3308,7 +3329,7 @@ verify_cache_image_RO(int file_name_id, int md_write_strat, int mpi_rank) } } - if ( show_progress ) + if ( show_progress ) HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); @@ -3323,7 +3344,7 @@ verify_cache_image_RO(int file_name_id, int md_write_strat, int mpi_rank) H5_FAILED(); - if ( show_progress ) + if ( show_progress ) HDfprintf(stdout, "%s: failure_mssg = \"%s\"\n", failure_mssg); } } @@ -3333,32 +3354,32 @@ verify_cache_image_RO(int file_name_id, int md_write_strat, int mpi_rank) } /* verify_cache_image_RO() */ - + /*------------------------------------------------------------------------- * Function: verify_cache_image_RW() * - * Purpose: Verify that a HDF5 file containing a cache image is - * opened and read correctly by PHDF5 with the specified + * Purpose: Verify that a HDF5 file containing a cache image is + * opened and read correctly by PHDF5 with the specified * metadata write strategy. - * + * * Basic cycle of operation is as follows: * - * 1) Open the test file created at the beginning of this - * test. + * 1) Open the test file created at the beginning of this + * test. * - * Verify that the file contains a cache image. + * Verify that the file contains a cache image. * * 2) Verify that the file contains the expected data. * - * Verify that only process 0 reads the cache image. + * Verify that only process 0 reads the cache image. * - * Verify that all other processes receive the cache - * image block from process 0. + * Verify that all other processes receive the cache + * image block from process 0. * * * 3) Close the file. * - * 4) Open the file, and verify that it doesn't contain + * 4) Open the file, and verify that it doesn't contain * a cache image. * * 5) Verify that the file contains the expected data. @@ -3374,7 +3395,7 @@ verify_cache_image_RO(int file_name_id, int md_write_strat, int mpi_rank) * * Modifications: * - * None. + * None. * *------------------------------------------------------------------------- */ @@ -3413,14 +3434,14 @@ verify_cache_image_RW(int file_name_id, int md_write_strat, int mpi_rank) show_progress = ( ( show_progress ) && ( mpi_rank == 0 ) ); - if ( show_progress ) + if ( show_progress ) HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); /* setup the file name */ if ( pass ) { - if ( h5_fixname(FILENAMES[file_name_id], H5P_DEFAULT, + if ( h5_fixname(FILENAMES[file_name_id], H5P_DEFAULT, filename, sizeof(filename)) == NULL ) { pass = FALSE; @@ -3428,7 +3449,7 @@ verify_cache_image_RW(int file_name_id, int md_write_strat, int mpi_rank) } } - if ( show_progress ) + if ( show_progress ) HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); @@ -3438,7 +3459,7 @@ verify_cache_image_RW(int file_name_id, int md_write_strat, int mpi_rank) * * Verify that only process 0 reads the cache image. * - * Verify that all other processes receive the cache + * Verify that all other processes receive the cache * image block from process 0. */ @@ -3448,7 +3469,7 @@ verify_cache_image_RW(int file_name_id, int md_write_strat, int mpi_rank) /* mdci_sbem_expected */ TRUE, /* read_only */ FALSE, /* set_mdci_fapl */ FALSE, - /* config_fsm */ FALSE, + /* config_fsm */ FALSE, /* enable_page_buffer */ FALSE, /* hdf_file_name */ filename, /* cache_image_flags */ H5C_CI__ALL_FLAGS, @@ -3463,7 +3484,7 @@ verify_cache_image_RW(int file_name_id, int md_write_strat, int mpi_rank) /* md_write_strat */ md_write_strat); } - if ( show_progress ) + if ( show_progress ) HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); @@ -3471,7 +3492,7 @@ verify_cache_image_RW(int file_name_id, int md_write_strat, int mpi_rank) * * Verify that only process 0 reads the cache image. * - * Verify that all other processes receive the cache + * Verify that all other processes receive the cache * image block from process 0. */ if ( pass ) { @@ -3492,14 +3513,14 @@ verify_cache_image_RW(int file_name_id, int md_write_strat, int mpi_rank) } #endif /* H5C_COLLECT_CACHE_STATS */ - if ( show_progress ) + if ( show_progress ) HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); - /* Verify that all other processes receive the cache image block + /* Verify that all other processes receive the cache image block * from process 0. - * - * Since we have alread verified that only process 0 has read the - * image, it is sufficient to verify that the image was loaded on + * + * Since we have alread verified that only process 0 has read the + * image, it is sufficient to verify that the image was loaded on * all processes. */ #if H5C_COLLECT_CACHE_STATS @@ -3513,12 +3534,12 @@ verify_cache_image_RW(int file_name_id, int md_write_strat, int mpi_rank) } #endif /* H5C_COLLECT_CACHE_STATS */ - if ( show_progress ) + if ( show_progress ) HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); /* 3) Close the file. */ - + if ( pass ) { if ( H5Fclose(file_id) < 0 ) { @@ -3529,7 +3550,7 @@ verify_cache_image_RW(int file_name_id, int md_write_strat, int mpi_rank) } } - if ( show_progress ) + if ( show_progress ) HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); @@ -3541,7 +3562,7 @@ verify_cache_image_RW(int file_name_id, int md_write_strat, int mpi_rank) /* mdci_sbem_expected */ FALSE, /* read_only */ FALSE, /* set_mdci_fapl */ FALSE, - /* config_fsm */ FALSE, + /* config_fsm */ FALSE, /* enable_page_buffer */ FALSE, /* hdf_file_name */ filename, /* cache_image_flags */ H5C_CI__ALL_FLAGS, @@ -3556,12 +3577,12 @@ verify_cache_image_RW(int file_name_id, int md_write_strat, int mpi_rank) /* md_write_strat */ md_write_strat); } - if ( show_progress ) + if ( show_progress ) HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); /* 5) Verify that the file contains the expected data. */ - + if ( pass ) { verify_data_sets(file_id, 0, MAX_NUM_DSETS - 1); @@ -3580,7 +3601,7 @@ verify_cache_image_RW(int file_name_id, int md_write_strat, int mpi_rank) /* 6) Close the file. */ - + if ( pass ) { if ( H5Fclose(file_id) < 0 ) { @@ -3591,7 +3612,7 @@ verify_cache_image_RW(int file_name_id, int md_write_strat, int mpi_rank) } } - if ( show_progress ) + if ( show_progress ) HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); @@ -3621,7 +3642,7 @@ verify_cache_image_RW(int file_name_id, int md_write_strat, int mpi_rank) H5_FAILED(); - if ( show_progress ) + if ( show_progress ) HDfprintf(stdout, "%s: failure_mssg = \"%s\"\n", failure_mssg); } } @@ -3631,20 +3652,20 @@ verify_cache_image_RW(int file_name_id, int md_write_strat, int mpi_rank) } /* verify_cache_imageRW() */ - + /***************************************************************************** * * Function: smoke_check_1() * - * Purpose: Initial smoke check to verify correct behaviour of cache + * Purpose: Initial smoke check to verify correct behaviour of cache * image in combination with parallel. - * + * * As cache image is currently disabled in the parallel case, * we construct a test file in parallel, verify it in serial * and generate a cache image in passing, and then verify * it again in parallel. * - * In passing, also verify that page buffering is silently + * In passing, also verify that page buffering is silently * disabled in the parallel case. Needless to say, this part * of the test will have to be re-worked when and if page * buffering is supported in parallel. @@ -3699,7 +3720,7 @@ smoke_check_1(MPI_Comm mpi_comm, MPI_Info mpi_info, int mpi_rank, int mpi_size) HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); - /* 1) Create a PHDF5 file without the cache image FAPL entry. + /* 1) Create a PHDF5 file without the cache image FAPL entry. * * Verify that a cache image is not requested */ @@ -3806,11 +3827,11 @@ smoke_check_1(MPI_Comm mpi_comm, MPI_Info mpi_info, int mpi_rank, int mpi_size) HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); - /* 7) Verify the datasets in the file backwards + /* 7) Verify the datasets in the file backwards * * Verify that only process 0 reads the cache image. * - * Verify that all other processes receive the cache + * Verify that all other processes receive the cache * image block from process 0. */ @@ -3840,11 +3861,11 @@ smoke_check_1(MPI_Comm mpi_comm, MPI_Info mpi_info, int mpi_rank, int mpi_size) if ( ( mpi_rank == 0 ) && ( show_progress ) ) HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); - /* Verify that all other processes receive the cache image block + /* Verify that all other processes receive the cache image block * from process 0. - * - * Since we have alread verified that only process 0 has read the - * image, it is sufficient to verify that the image was loaded on + * + * Since we have alread verified that only process 0 has read the + * image, it is sufficient to verify that the image was loaded on * all processes. */ #if H5C_COLLECT_CACHE_STATS @@ -3905,11 +3926,11 @@ smoke_check_1(MPI_Comm mpi_comm, MPI_Info mpi_info, int mpi_rank, int mpi_size) HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); - /* 10) Verify the datasets in the file + /* 10) Verify the datasets in the file * * Verify that only process 0 reads the cache image. * - * Verify that all other processes receive the cache + * Verify that all other processes receive the cache * image block from process 0. */ @@ -3939,11 +3960,11 @@ smoke_check_1(MPI_Comm mpi_comm, MPI_Info mpi_info, int mpi_rank, int mpi_size) if ( ( mpi_rank == 0 ) && ( show_progress ) ) HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); - /* Verify that all other processes receive the cache image block + /* Verify that all other processes receive the cache image block * from process 0. - * - * Since we have alread verified that only process 0 has read the - * image, it is sufficient to verify that the image was loaded on + * + * Since we have alread verified that only process 0 has read the + * image, it is sufficient to verify that the image was loaded on * all processes. */ #if H5C_COLLECT_CACHE_STATS @@ -4046,28 +4067,35 @@ smoke_check_1(MPI_Comm mpi_comm, MPI_Info mpi_info, int mpi_rank, int mpi_size) H5_FAILED(); - HDfprintf(stdout, "%s: failure_mssg = \"%s\"\n", + HDfprintf(stdout, "%s: failure_mssg = \"%s\"\n", fcn_name, failure_mssg); } } return !pass; - + } /* smoke_check_1() */ - + +/* This test uses many POSIX things that are not available on + * Windows. We're using a check for fork(2) here as a proxy for + * all POSIX/Unix/Linux things until this test can be made + * more platform-independent. + */ +#ifdef H5_HAVE_FORK + /*------------------------------------------------------------------------- * Function: main * * Purpose: Run parallel tests on the cache image feature. - * - * At present, cache image is disabled in parallel, and - * thus these tests are restructed to verifying that a + * + * At present, cache image is disabled in parallel, and + * thus these tests are restructed to verifying that a * file with a cache image can be opened in the parallel - * case, and verifying that instructions to create a + * case, and verifying that instructions to create a * cache image are ignored in the parallel case. * - * WARNING: This test uses fork() and execve(), and + * WARNING: This test uses fork() and execve(), and * therefore will not run on Windows. * * Return: Success: 0 @@ -4105,14 +4133,14 @@ main(int argc, char **argv) HDfflush(stdout); i = 0; - while ( ( FILENAMES[i] != NULL ) && ( i < TEST_FILES_TO_CONSTRUCT ) ) { + while ( ( FILENAMES[i] != NULL ) && ( i < TEST_FILES_TO_CONSTRUCT ) ) { HDfprintf(stdout, " writing %s ... ", FILENAMES[i]); HDfflush(stdout); construct_test_file(i); if ( pass ) { - + printf("done.\n"); HDfflush(stdout); @@ -4193,13 +4221,13 @@ main(int argc, char **argv) /* we may need to play with the path here */ if ( execv("t_cache_image", child_argv) == -1 ) { - HDfprintf(stdout, + HDfprintf(stdout, "execl() of setup process failed. errno = %d(%s)\n", errno, strerror(errno)); exit(1); } - } else if ( child_pid != -1 ) { + } else if ( child_pid != -1 ) { /* this is the parent process -- wait until child is done */ if ( -1 == waitpid(child_pid, &child_status, WUNTRACED)) { @@ -4215,7 +4243,7 @@ main(int argc, char **argv) } else { - HDfprintf(stdout, + HDfprintf(stdout, "testfile construction complete -- proceeding with tests.\n"); } } else { /* fork failed */ @@ -4228,14 +4256,14 @@ main(int argc, char **argv) MPI_Barrier(MPI_COMM_WORLD); - nerrs += verify_cache_image_RO(0, + nerrs += verify_cache_image_RO(0, H5AC_METADATA_WRITE_STRATEGY__PROCESS_0_ONLY, mpi_rank); #if 1 - nerrs += verify_cache_image_RO(1, + nerrs += verify_cache_image_RO(1, H5AC_METADATA_WRITE_STRATEGY__DISTRIBUTED, mpi_rank); - nerrs += verify_cache_image_RW(0, + nerrs += verify_cache_image_RW(0, H5AC_METADATA_WRITE_STRATEGY__PROCESS_0_ONLY, mpi_rank); - nerrs += verify_cache_image_RW(1, + nerrs += verify_cache_image_RW(1, H5AC_METADATA_WRITE_STRATEGY__DISTRIBUTED, mpi_rank); nerrs += smoke_check_1(comm, info, mpi_rank, mpi_size); #endif @@ -4271,4 +4299,14 @@ finish: return(nerrs > 0); } /* main() */ +#else /* H5_HAVE_FORK */ + +int +main(void) +{ + HDfprintf(stderr, "Non-POSIX platform. Skipping.\n"); + return EXIT_SUCCESS; +} /* end main() */ + +#endif /* H5_HAVE_FORK */ diff --git a/testpar/t_pread.c b/testpar/t_pread.c index 3d150af..28b962b 100644 --- a/testpar/t_pread.c +++ b/testpar/t_pread.c @@ -370,7 +370,7 @@ generate_test_file( MPI_Comm comm, int mpi_rank, int group_id ) } /* collect results from other processes. - * Only overwrite the failure message if no preveious error + * Only overwrite the failure message if no previous error * has been detected */ local_failure = ( pass ? 0 : 1 ); -- cgit v0.12 From f0a45a145b5a85cc65bafaa29da25a5550108f10 Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Wed, 7 Mar 2018 12:23:46 -0600 Subject: Correct cutnpaste --- testpar/t_cache_image.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/testpar/t_cache_image.c b/testpar/t_cache_image.c index fc88c61..5b512d6 100644 --- a/testpar/t_cache_image.c +++ b/testpar/t_cache_image.c @@ -1915,10 +1915,6 @@ par_delete_dataset(int dset_num, * * None. * - *-------------------------------------- - return; - -} /* par_insert_cache_image() */ *------------------------------------------------------------------------- */ -- cgit v0.12 From 496af1be89de67fee06f23e4e6354a0d18c3be92 Mon Sep 17 00:00:00 2001 From: "M. Scot Breitenfeld" Date: Wed, 7 Mar 2018 15:49:14 -0600 Subject: Needs to sync with lib version and Sencode. --- MANIFEST | 1 + config/cmake_ext_mod/HDFMacros.cmake | 8 +- java/src/jni/h5dImp.c | 2 +- java/test/TestH5Pfapl.java | 8 + release_docs/INSTALL | 44 +- release_docs/INSTALL_CMake.txt | 4 +- release_docs/RELEASE.txt | 63 + src/H5Abtree2.c | 4 +- src/H5Adense.c | 4 +- src/H5Aint.c | 55 +- src/H5Cimage.c | 5 +- src/H5Dint.c | 85 +- src/H5Dlayout.c | 43 +- src/H5Dpkg.h | 3 + src/H5F.c | 30 +- src/H5Fdeprec.c | 62 + src/H5Ffake.c | 21 +- src/H5Fint.c | 78 +- src/H5Fpkg.h | 3 +- src/H5Fprivate.h | 39 +- src/H5Fpublic.h | 14 +- src/H5Fquery.c | 109 +- src/H5Fsuper.c | 101 +- src/H5Gbtree2.c | 4 +- src/H5Gdense.c | 20 +- src/H5Gobj.c | 21 +- src/H5HFcache.c | 2 +- src/H5HFhdr.c | 8 +- src/H5O.c | 1 - src/H5Oainfo.c | 5 +- src/H5Oattr.c | 24 +- src/H5Obogus.c | 5 +- src/H5Obtreek.c | 5 +- src/H5Ocache.c | 4 +- src/H5Ocache_image.c | 4 +- src/H5Ocont.c | 5 +- src/H5Ocopy.c | 30 +- src/H5Odrvinfo.c | 5 +- src/H5Odtype.c | 33 +- src/H5Oefl.c | 5 +- src/H5Ofill.c | 262 ++- src/H5Ofsinfo.c | 6 +- src/H5Oginfo.c | 5 +- src/H5Oint.c | 62 +- src/H5Olinfo.c | 5 +- src/H5Olink.c | 5 +- src/H5Omessage.c | 4 +- src/H5Omtime.c | 10 +- src/H5Oname.c | 5 +- src/H5Opkg.h | 19 +- src/H5Opline.c | 144 +- src/H5Oprivate.h | 13 +- src/H5Orefcount.c | 5 +- src/H5Osdspace.c | 14 +- src/H5Oshared.c | 2 +- src/H5Oshared.h | 8 +- src/H5Oshmesg.c | 5 +- src/H5Ostab.c | 5 +- src/H5Pdcpl.c | 2 +- src/H5Pfapl.c | 355 ++- src/H5S.c | 45 +- src/H5SM.c | 16 +- src/H5Spkg.h | 3 + src/H5Sprivate.h | 2 +- src/H5T.c | 55 +- src/H5Tcommit.c | 29 +- src/H5Tpkg.h | 3 + src/H5Tprivate.h | 4 +- src/H5trace.c | 1045 ++++----- test/CMakeTests.cmake | 1 + test/CMakeVFDTests.cmake | 15 + test/Makefile.am | 2 +- test/dangle.c | 100 +- test/dsets.c | 566 +++-- test/fheap.c | 27 + test/gen_bounds.c | 606 +++++ test/gen_cross.c | 44 +- test/genall5.c | 127 +- test/gheap.c | 394 ++-- test/hyperslab.c | 410 ++-- test/istore.c | 496 ++-- test/mf.c | 8 +- test/objcopy.c | 1802 ++++++++------- test/ohdr.c | 97 +- test/set_extent.c | 40 +- test/tarray.c | 38 +- test/tattr.c | 94 +- test/tconfig.c | 56 +- test/testfiles/plist_files/dapl_32be | Bin 186 -> 199 bytes test/testfiles/plist_files/dapl_32le | Bin 186 -> 199 bytes test/testfiles/plist_files/dapl_64be | Bin 186 -> 199 bytes test/testfiles/plist_files/dapl_64le | Bin 186 -> 199 bytes test/testfiles/plist_files/def_dapl_32be | Bin 181 -> 194 bytes test/testfiles/plist_files/def_dapl_32le | Bin 181 -> 194 bytes test/testfiles/plist_files/def_dapl_64be | Bin 181 -> 194 bytes test/testfiles/plist_files/def_dapl_64le | Bin 181 -> 194 bytes test/testfiles/plist_files/def_fapl_32be | Bin 1520 -> 1711 bytes test/testfiles/plist_files/def_fapl_32le | Bin 1520 -> 1711 bytes test/testfiles/plist_files/def_fapl_64be | Bin 1520 -> 1711 bytes test/testfiles/plist_files/def_fapl_64le | Bin 1520 -> 1711 bytes test/testfiles/plist_files/fapl_32be | Bin 1522 -> 1713 bytes test/testfiles/plist_files/fapl_32le | Bin 1522 -> 1713 bytes test/testfiles/plist_files/fapl_64be | Bin 1522 -> 1713 bytes test/testfiles/plist_files/fapl_64le | Bin 1522 -> 1713 bytes test/testfiles/plist_files/lapl_32be | Bin 1625 -> 1816 bytes test/testfiles/plist_files/lapl_32le | Bin 1625 -> 1816 bytes test/testfiles/plist_files/lapl_64be | Bin 1625 -> 1816 bytes test/testfiles/plist_files/lapl_64le | Bin 1625 -> 1816 bytes test/tfile.c | 2766 +++++++++++++++++++---- test/tgenprop.c | 152 +- test/th5o.c | 191 +- test/th5s.c | 402 ++-- test/tid.c | 272 +-- test/titerate.c | 42 +- test/tmisc.c | 102 +- test/trefer.c | 175 +- test/ttime.c | 12 +- test/tvlstr.c | 56 +- test/tvltypes.c | 136 +- testpar/t_cache.c | 2744 +++++++++++----------- testpar/t_cache_image.c | 714 +++--- testpar/t_pflush1.c | 112 +- testpar/t_pread.c | 69 +- testpar/t_shapesame.c | 1704 +++++++------- testpar/t_span_tree.c | 702 +++--- tools/src/h5dump/h5dump.c | 20 +- tools/src/h5repack/h5repack.c | 2 + tools/src/h5repack/h5repack.h | 30 +- tools/src/h5repack/h5repack_copy.c | 20 +- tools/src/h5repack/h5repack_main.c | 39 +- tools/test/h5repack/testfiles/h5repack-help.txt | 19 +- 131 files changed, 11253 insertions(+), 7256 deletions(-) create mode 100644 test/gen_bounds.c diff --git a/MANIFEST b/MANIFEST index 5fcb002..f365884 100644 --- a/MANIFEST +++ b/MANIFEST @@ -981,6 +981,7 @@ ./test/gen_bad_ohdr.c ./test/gen_bad_compound.c ./test/gen_bogus.c +./test/gen_bounds.c ./test/gen_cross.c ./test/gen_deflate.c ./test/gen_file_image.c diff --git a/config/cmake_ext_mod/HDFMacros.cmake b/config/cmake_ext_mod/HDFMacros.cmake index 4097ca9..bdc52b9 100644 --- a/config/cmake_ext_mod/HDFMacros.cmake +++ b/config/cmake_ext_mod/HDFMacros.cmake @@ -27,8 +27,12 @@ macro (SET_HDF_BUILD_TYPE) set(HDF_BUILD_TYPE "Release") endif() endif() - if(NOT CMAKE_BUILD_TYPE) - set(CMAKE_BUILD_TYPE "Release") + if(NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES) + message(STATUS "Setting build type to 'RelWithDebInfo' as none was specified.") + 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" + "MinSizeRel" "RelWithDebInfo") endif() endmacro () diff --git a/java/src/jni/h5dImp.c b/java/src/jni/h5dImp.c index 66efed0..9784055 100644 --- a/java/src/jni/h5dImp.c +++ b/java/src/jni/h5dImp.c @@ -1019,7 +1019,7 @@ Java_hdf_hdf5lib_H5_H5DreadVL } /* end else */ return (jint)status; -} /* end Java_hdf_hdf5lib_H5_H5Dread_1VLStrings */ +} /* end Java_hdf_hdf5lib_H5_H5Dread_1VL */ herr_t H5DreadVL_asstr diff --git a/java/test/TestH5Pfapl.java b/java/test/TestH5Pfapl.java index 48a5986..0651502 100644 --- a/java/test/TestH5Pfapl.java +++ b/java/test/TestH5Pfapl.java @@ -26,6 +26,7 @@ import hdf.hdf5lib.H5; import hdf.hdf5lib.HDF5Constants; import hdf.hdf5lib.exceptions.HDF5Exception; import hdf.hdf5lib.exceptions.HDF5LibraryException; +import hdf.hdf5lib.exceptions.HDF5PropertyListInterfaceException; import hdf.hdf5lib.structs.H5AC_cache_config_t; import org.junit.After; @@ -1385,6 +1386,13 @@ public class TestH5Pfapl { ret_val_id = H5.H5Pget_evict_on_close(fapl_id); assertTrue("H5P_evict_on_close", ret_val_id); } + catch (HDF5PropertyListInterfaceException err) { + // parallel is not supported + if (err.getMinorErrorNumber() != HDF5Constants.H5E_UNSUPPORTED) { + err.printStackTrace(); + fail("H5P_evict_on_close: " + err); + } + } catch (Throwable err) { err.printStackTrace(); fail("H5P_evict_on_close: " + err); diff --git a/release_docs/INSTALL b/release_docs/INSTALL index 2dcb9be..3709a58 100644 --- a/release_docs/INSTALL +++ b/release_docs/INSTALL @@ -305,7 +305,7 @@ CONTENTS to enable symbolic debugging of a production version of HDF5, one might say: - $ CFLAGS=-g ./configure --enable-production + $ CFLAGS=-g ./configure --enable-build-mode=production 4.3.5. Compiling HDF5 wrapper libraries One can optionally build the Fortran and/or C++ interfaces to the @@ -414,35 +414,35 @@ CONTENTS The library can be compiled to provide symbolic debugging support so it can be debugged with gdb, dbx, ddd, etc., or it can be compiled with various optimizations. To compile for symbolic - debugging (the default for snapshots), say `--disable-production'; - to compile with optimizations (the default for supported public - releases), say `--enable-production'. On some systems the library - can also be compiled for profiling with gprof by saying + debugging (the default for snapshots), say + `--enable-build-mode=production'; to compile with optimizations + (the default for supported public releases), + say `--enable-build-mode=production'. On some systems the + library can also be compiled for profiling with gprof by saying `--enable-production=profile'. - $ ./configure --disable-production #symbolic debugging - $ ./configure --enable-production #optimized code - $ ./configure --enable-production=profile #for use with gprof + $ ./configure --enable-build-mode=debug #symbolic debugging + $ ./configure --enable-build-mode=production #optimized code + $ ./configure --enable-production=profile #for use with gprof Regardless of whether support for symbolic debugging is enabled, the library can also perform runtime debugging of certain packages (such as type conversion execution times and extensive invariant - condition checking). To enable this debugging, supply a - comma-separated list of package names to to the `--enable-debug' - switch. See "Debugging HDF5 Applications" for a list of package - names: + condition checking). To enable this debugging, supply a + comma-separated list of package names to the `--enable-internal-debug' + switch. See "Debugging HDF5 Applications" for a list of package names: http://www.hdfgroup.org/HDF5/doc/H5.user/Debugging.html - Debugging can be disabled by saying `--disable-debug'. + Debugging can be disabled by saying `--disable-internal-debug'. The default debugging level for snapshots is a subset of the available packages; the default for supported releases is no debugging (debugging can incur a significant runtime penalty). - $ ./configure --enable-debug=s,t #debug only H5S and H5T - $ ./configure --enable-debug #debug normal packages - $ ./configure --enable-debug=all #debug all packages - $ ./configure --disable-debug #no debugging + $ ./configure --enable-internal-debug=s,t #debug only H5S and H5T + $ ./configure --enable-internal-debug #debug normal packages + $ ./configure --enable-internal-debug=all #debug all packages + $ ./configure --disable-internal-debug #no debugging HDF5 can also print a trace of all API function calls, their arguments, and the return values. To enable or disable the @@ -466,15 +466,17 @@ CONTENTS http://www.hdfgroup.org/HDF5/doc/TechNotes/ThreadSafeLibrary.html 4.3.12. Backward compatibility - The 1.8 version of the HDF5 Library can be configured to operate - identically to the v1.6 library with the + The 1.10 version of the HDF5 Library can be configured to operate + identically to the v1.8 library with the + --with-default-api-version=v18 + configure flag, or identically to the v1.6 library with the --with-default-api-version=v16 configure flag. This allows existing code to be compiled with the - v1.8 library without requiring immediate changes to the application + v1.10 library without requiring immediate changes to the application source code. For addtional configuration options and other details, see "API Compatibility Macros in HDF5": - http://www.hdfgroup.org/HDF5/doc/RM/APICompatMacros.html + https://support.hdfgroup.org/HDF5/doc/RM/APICompatMacros.html 4.4. Building The library, confidence tests, and programs can be built by diff --git a/release_docs/INSTALL_CMake.txt b/release_docs/INSTALL_CMake.txt index a01ec49..87d7886 100644 --- a/release_docs/INSTALL_CMake.txt +++ b/release_docs/INSTALL_CMake.txt @@ -165,8 +165,9 @@ To build HDF5 with the SZIP and ZLIB external libraries you will need to: III. Quick Step Building HDF5 C Static Libraries and Tools with CMake ======================================================================== Notes: This short set of instructions is written for users who want to - quickly build the just the HDF5 C static library and tools from + quickly build just the HDF5 C static library and tools from the HDF5 source code package using the CMake command line tools. + Avoid the use of drive letters in paths on Windows. Go through these steps: @@ -571,7 +572,6 @@ HDF5_ENABLE_DEPRECATED_SYMBOLS "Enable deprecated public API symbols" HDF5_ENABLE_DIRECT_VFD "Build the Direct I/O Virtual File Driver" OFF HDF5_ENABLE_EMBEDDED_LIBINFO "embed library info into executables" ON HDF5_ENABLE_HSIZET "Enable datasets larger than memory" ON -HDF5_ENABLE_LARGE_FILE "Enable support for large (64-bit) files on Linux." ON HDF5_ENABLE_PARALLEL "Enable parallel build (requires MPI)" OFF HDF5_ENABLE_TRACE "Enable API tracing capability" OFF HDF5_ENABLE_USING_MEMCHECKER "Indicate that a memory checker is used" OFF diff --git a/release_docs/RELEASE.txt b/release_docs/RELEASE.txt index 3110f8c..4644bcb 100644 --- a/release_docs/RELEASE.txt +++ b/release_docs/RELEASE.txt @@ -292,6 +292,12 @@ Bug Fixes since HDF5-1.10.1 release (VC - 2017/11/28, HDFFV-9947) + - H5Pset_evict_on_close in H5Pfapl.c + + Changed the minor error number from H5E_CANTSET to H5E_UNSUPPORTED for + parallel library. + (ADB - 2018/03/6, HDFFV-10414) + - filter plugin handling in H5PL.c and H5Z.c It was discovered that the dynamic loading process used by @@ -403,6 +409,63 @@ Bug Fixes since HDF5-1.10.1 release (RAW - 2017/12/01, HDFFV-10272) + - If an HDF5 file contains a filter pipeline message with a 'number of + filters' field that exceeds the maximum number of allowed filters, + the error handling code will attempt to dereference a NULL pointer. + + This issue was reported to The HDF Group as issue #CVE-2017-17505. + + NOTE: The HDF5 C library cannot produce such a file. This condition + should only occur in a corrupt (or deliberately altered) file + or a file created by third-party software. + + This problem arose because the error handling code assumed that + the 'number of filters' field implied that a dynamic array of that + size had already been created and that the cleanup code should + iterate over that array and clean up each element's resources. If + an error occurred before the array has been allocated, this will + not be true. + + This has been changed so that the number of filters is set to + zero on errors. Additionally, the filter array traversal in the + error handling code now requires that the filter array not be NULL. + + (DER - 2018/02/06, HDFFV-10354) + + - If an HDF5 file contains a filter pipeline message which contains + a 'number of filters' field that exceeds the actual number of + filters in the message, the HDF5 C library will read off the end of + the read buffer. + + This issue was reported to The HDF Group as issue #CVE-2017-17506. + + NOTE: The HDF5 C library cannot produce such a file. This condition + should only occur in a corrupt (or deliberately altered) file + or a file created by third-party software. + + The problem was fixed by passing the buffer size with the buffer + and ensuring that the pointer cannot be incremented off the end + of the buffer. A mismatch between the number of filters declared + and the actual number of filters will now invoke normal HDF5 + error handling. + + (DER - 2018/02/26, HDFFV-10355) + + - If an HDF5 file contains a malformed compound type which contains + a member of size zero, a division by zero error will occur while + processing the type. + + This issue was reported to The HDF Group as issue #CVE-2017-17508. + + NOTE: The HDF5 C library cannot produce such a file. This condition + should only occur in a corrupt (or deliberately altered) file + or a file created by third-party software. + + Checking for zero before dividing fixes the problem. Instead of the + division by zero, the normal HDF5 error handling is invoked. + + (DER - 2018/02/26, HDFFV-10357) + Configuration ------------- - CMake diff --git a/src/H5Abtree2.c b/src/H5Abtree2.c index ed67e0f..8b79aa5 100644 --- a/src/H5Abtree2.c +++ b/src/H5Abtree2.c @@ -158,7 +158,7 @@ const H5B2_class_t H5A_BT2_CORDER[1]={{ /* B-tree class information */ *------------------------------------------------------------------------- */ static herr_t -H5A__dense_fh_name_cmp(const void *obj, size_t H5_ATTR_UNUSED obj_len, void *_udata) +H5A__dense_fh_name_cmp(const void *obj, size_t obj_len, void *_udata) { H5A_fh_ud_cmp_t *udata = (H5A_fh_ud_cmp_t *)_udata; /* User data for 'op' callback */ H5A_t *attr = NULL; /* Pointer to attribute created from heap object */ @@ -168,7 +168,7 @@ H5A__dense_fh_name_cmp(const void *obj, size_t H5_ATTR_UNUSED obj_len, void *_ud FUNC_ENTER_STATIC /* Decode attribute information */ - if(NULL == (attr = (H5A_t *)H5O_msg_decode(udata->f, udata->dxpl_id, NULL, H5O_ATTR_ID, (const unsigned char *)obj))) + if(NULL == (attr = (H5A_t *)H5O_msg_decode(udata->f, udata->dxpl_id, NULL, H5O_ATTR_ID, obj_len, (const unsigned char *)obj))) HGOTO_ERROR(H5E_OHDR, H5E_CANTDECODE, FAIL, "can't decode attribute") /* Compare the string values */ diff --git a/src/H5Adense.c b/src/H5Adense.c index b1903a4..ba0578e 100644 --- a/src/H5Adense.c +++ b/src/H5Adense.c @@ -843,7 +843,7 @@ done: *------------------------------------------------------------------------- */ static herr_t -H5A__dense_copy_fh_cb(const void *obj, size_t H5_ATTR_UNUSED obj_len, void *_udata) +H5A__dense_copy_fh_cb(const void *obj, size_t obj_len, void *_udata) { H5A_fh_ud_cp_t *udata = (H5A_fh_ud_cp_t *)_udata; /* User data for fractal heap 'op' callback */ herr_t ret_value = SUCCEED; /* Return value */ @@ -857,7 +857,7 @@ H5A__dense_copy_fh_cb(const void *obj, size_t H5_ATTR_UNUSED obj_len, void *_uda * HDF5 routine, it could attempt to re-protect that direct block for the * heap, causing the HDF5 routine called to fail) */ - if(NULL == (udata->attr = (H5A_t *)H5O_msg_decode(udata->f, udata->dxpl_id, NULL, H5O_ATTR_ID, (const unsigned char *)obj))) + if(NULL == (udata->attr = (H5A_t *)H5O_msg_decode(udata->f, udata->dxpl_id, NULL, H5O_ATTR_ID, obj_len, (const unsigned char *)obj))) HGOTO_ERROR(H5E_ATTR, H5E_CANTDECODE, FAIL, "can't decode attribute") /* Set the creation order index for the attribute */ diff --git a/src/H5Aint.c b/src/H5Aint.c index f1dd41e..55c46f6 100644 --- a/src/H5Aint.c +++ b/src/H5Aint.c @@ -102,6 +102,12 @@ static herr_t H5A__attr_sort_table(H5A_attr_table_t *atable, H5_index_t idx_type /* Package Variables */ /*********************/ +/* Format version bounds for attribute */ +const unsigned H5O_attr_ver_bounds[] = { + H5O_ATTR_VERSION_1, /* H5F_LIBVER_EARLIEST */ + H5O_ATTR_VERSION_3, /* H5F_LIBVER_V18 */ + H5O_ATTR_VERSION_LATEST /* H5F_LIBVER_LATEST */ +}; /*****************************/ /* Library Private Variables */ @@ -209,18 +215,16 @@ H5A_create(const H5G_loc_t *loc, const char *name, const H5T_t *type, if(H5T_set_loc(attr->shared->dt, loc->oloc->file, H5T_LOC_DISK) < 0) HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, NULL, "invalid datatype location") - /* Set the latest format for datatype, if requested */ - if(H5F_USE_LATEST_FLAGS(loc->oloc->file, H5F_LATEST_DATATYPE)) - if(H5T_set_latest_version(attr->shared->dt) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTSET, NULL, "can't set latest version of datatype") + /* Set the version for datatype */ + if(H5T_set_version(loc->oloc->file, attr->shared->dt) < 0) + HGOTO_ERROR(H5E_DATASET, H5E_CANTSET, NULL, "can't set version of datatype") /* Copy the dataspace for the attribute */ attr->shared->ds = H5S_copy(space, FALSE, TRUE); - /* Set the latest format for dataspace, if requested */ - if(H5F_USE_LATEST_FLAGS(loc->oloc->file, H5F_LATEST_DATASPACE)) - if(H5S_set_latest_version(attr->shared->ds) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTSET, NULL, "can't set latest version of dataspace") + /* Set the version for dataspace */ + if(H5S_set_version(loc->oloc->file, attr->shared->ds) < 0) + HGOTO_ERROR(H5E_DATASET, H5E_CANTSET, NULL, "can't set version of dataspace") /* Copy the object header information */ if(H5O_loc_copy(&(attr->oloc), loc->oloc, H5_COPY_DEEP) < 0) @@ -1843,11 +1847,11 @@ done: * Function: H5A_set_version * * Purpose: Sets the correct version to encode attribute with. - * Chooses the oldest version possible, unless the "use the - * latest format" flag is set. + * Chooses the oldest version possible, unless the + * file's low bound indicates otherwise. * - * Return: Success: Non-negative - * Failure: Negative + * Return: Success: Non-negative + * Failure: Negative * * Programmer: Quincey Koziol * koziol@hdfgroup.org @@ -1859,8 +1863,8 @@ herr_t H5A_set_version(const H5F_t *f, H5A_t *attr) { hbool_t type_shared, space_shared; /* Flags to indicate that shared messages are used for this attribute */ - hbool_t use_latest_format; /* Flag indicating the latest attribute version support is enabled */ - herr_t ret_value = SUCCEED; /* Return value */ + uint8_t version; /* Message version */ + herr_t ret_value = SUCCEED; /* Return value */ FUNC_ENTER_NOAPI(FAIL) @@ -1868,9 +1872,6 @@ H5A_set_version(const H5F_t *f, H5A_t *attr) HDassert(f); HDassert(attr); - /* Get the file's 'use the latest attribute version support' flag */ - use_latest_format = H5F_USE_LATEST_FLAGS(f, H5F_LATEST_ATTRIBUTE); - /* Check whether datatype and dataspace are shared */ if(H5O_msg_is_shared(H5O_DTYPE_ID, attr->shared->dt) > 0) type_shared = TRUE; @@ -1883,14 +1884,22 @@ H5A_set_version(const H5F_t *f, H5A_t *attr) space_shared = FALSE; /* Check which version to encode attribute with */ - if(use_latest_format) - attr->shared->version = H5O_ATTR_VERSION_LATEST; /* Write out latest attribute version */ - else if(attr->shared->encoding != H5T_CSET_ASCII) - attr->shared->version = H5O_ATTR_VERSION_3; /* Write version which includes the character encoding */ + if(attr->shared->encoding != H5T_CSET_ASCII) + version = H5O_ATTR_VERSION_3; /* Write version which includes the character encoding */ else if(type_shared || space_shared) - attr->shared->version = H5O_ATTR_VERSION_2; /* Write out version with flag for indicating shared datatype or dataspace */ + version = H5O_ATTR_VERSION_2; /* Write out version with flag for indicating shared datatype or dataspace */ else - attr->shared->version = H5O_ATTR_VERSION_1; /* Write out basic version */ + version = H5O_ATTR_VERSION_1; /* Write out basic version */ + + /* Upgrade to the version indicated by the file's low bound if higher */ + version = MAX(version, (uint8_t)H5O_attr_ver_bounds[H5F_LOW_BOUND(f)]); + + /* Version bounds check */ + if(version > H5O_attr_ver_bounds[H5F_HIGH_BOUND(f)]) + HGOTO_ERROR(H5E_ATTR, H5E_BADRANGE, FAIL, "attribute version out of bounds") + + /* Set the message version */ + attr->shared->version = version; done: FUNC_LEAVE_NOAPI(ret_value) diff --git a/src/H5Cimage.c b/src/H5Cimage.c index 53d1712..be2560f 100644 --- a/src/H5Cimage.c +++ b/src/H5Cimage.c @@ -1382,9 +1382,12 @@ H5C__prep_image_for_file_close(H5F_t *f, hid_t dxpl_id, hbool_t *image_generated * Note that under some error conditions, the superblock will be * undefined in this case as well -- if so, assume that the * superblock does not support superblock extension messages. + * Also verify that the file's high_bound is at least release + * 1.10.x, otherwise cancel the request for a cache image */ if((NULL == f->shared->sblock) || - (f->shared->sblock->super_vers < HDF5_SUPERBLOCK_VERSION_2)) { + (f->shared->sblock->super_vers < HDF5_SUPERBLOCK_VERSION_2) || + (f->shared->high_bound < H5F_LIBVER_V110)) { H5C_cache_image_ctl_t default_image_ctl = H5C__DEFAULT_CACHE_IMAGE_CTL; cache_ptr->image_ctl = default_image_ctl; diff --git a/src/H5Dint.c b/src/H5Dint.c index e45b04d..17b989e 100644 --- a/src/H5Dint.c +++ b/src/H5Dint.c @@ -623,10 +623,10 @@ done: static herr_t H5D__init_type(H5F_t *file, const H5D_t *dset, hid_t type_id, const H5T_t *type) { - htri_t relocatable; /* Flag whether the type is relocatable */ - htri_t immutable; /* Flag whether the type is immutable */ - hbool_t use_latest_format; /* Flag indicating the 'latest datatype version support' is enabled */ - herr_t ret_value = SUCCEED; /* Return value */ + htri_t relocatable; /* Flag whether the type is relocatable */ + htri_t immutable; /* Flag whether the type is immutable */ + hbool_t use_at_least_v18; /* Flag indicating to use at least v18 format versions */ + herr_t ret_value = SUCCEED; /* Return value */ FUNC_ENTER_STATIC @@ -643,17 +643,17 @@ H5D__init_type(H5F_t *file, const H5D_t *dset, hid_t type_id, const H5T_t *type) if((immutable = H5T_is_immutable(type)) < 0) HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "can't check datatype?") - /* Get the file's 'use the latest datatype version support' flag */ - use_latest_format = H5F_USE_LATEST_FLAGS(file, H5F_LATEST_DATATYPE); + /* To use at least v18 format versions or not */ + use_at_least_v18 = (H5F_LOW_BOUND(file) >= H5F_LIBVER_V18); /* Copy the datatype if it's a custom datatype or if it'll change when it's location is changed */ - if(!immutable || relocatable || use_latest_format) { + if(!immutable || relocatable || use_at_least_v18) { /* Copy datatype for dataset */ if((dset->shared->type = H5T_copy(type, H5T_COPY_ALL)) == NULL) HGOTO_ERROR(H5E_DATASET, H5E_CANTCOPY, FAIL, "can't copy datatype") - /* Convert a datatype (if committed) to a transient type if the committed datatype's file - location is different from the file location where the dataset will be created */ + /* Convert a datatype (if committed) to a transient type if the committed datatype's file + location is different from the file location where the dataset will be created */ if(H5T_convert_committed_datatype(dset->shared->type, file) < 0) HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "can't get shared datatype info") @@ -661,14 +661,13 @@ H5D__init_type(H5F_t *file, const H5D_t *dset, hid_t type_id, const H5T_t *type) if(H5T_set_loc(dset->shared->type, file, H5T_LOC_DISK) < 0) HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "can't set datatype location") - /* Set the latest format, if requested */ - if(use_latest_format) - if(H5T_set_latest_version(dset->shared->type) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTSET, FAIL, "can't set latest version of datatype") + /* Set the version for datatype */ + if(H5T_set_version(file, dset->shared->type) < 0) + HGOTO_ERROR(H5E_DATASET, H5E_CANTSET, FAIL, "can't set version of datatype") /* Get a datatype ID for the dataset's datatype */ - if((dset->shared->type_id = H5I_register(H5I_DATATYPE, dset->shared->type, FALSE)) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTREGISTER, FAIL, "unable to register type") + if((dset->shared->type_id = H5I_register(H5I_DATATYPE, dset->shared->type, FALSE)) < 0) + HGOTO_ERROR(H5E_DATASET, H5E_CANTREGISTER, FAIL, "unable to register type") } /* end if */ /* Not a custom datatype, just use it directly */ else { @@ -738,7 +737,6 @@ done: static herr_t H5D__init_space(H5F_t *file, const H5D_t *dset, const H5S_t *space) { - hbool_t use_latest_format; /* Flag indicating the 'latest dataspace version support' is enabled */ herr_t ret_value = SUCCEED; /* Return value */ FUNC_ENTER_STATIC @@ -748,9 +746,6 @@ H5D__init_space(H5F_t *file, const H5D_t *dset, const H5S_t *space) HDassert(dset); HDassert(space); - /* Get the file's 'use the latest dataspace version support' flag */ - use_latest_format = H5F_USE_LATEST_FLAGS(file, H5F_LATEST_DATASPACE); - /* Copy dataspace for dataset */ if(NULL == (dset->shared->space = H5S_copy(space, FALSE, TRUE))) HGOTO_ERROR(H5E_DATASET, H5E_CANTCOPY, FAIL, "can't copy dataspace") @@ -759,10 +754,9 @@ H5D__init_space(H5F_t *file, const H5D_t *dset, const H5S_t *space) if(H5D__cache_dataspace_info(dset) < 0) HGOTO_ERROR(H5E_DATASET, H5E_CANTCOPY, FAIL, "can't cache dataspace info") - /* Set the latest format, if requested */ - if(use_latest_format) - if(H5S_set_latest_version(dset->shared->space) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTSET, FAIL, "can't set latest version of datatype") + /* Set the version for dataspace */ + if(H5S_set_version(file, dset->shared->space) < 0) + HGOTO_ERROR(H5E_DATASET, H5E_CANTSET, FAIL, "can't set latest version of datatype") /* Set the dataset's dataspace to 'all' selection */ if(H5S_select_all(dset->shared->space, TRUE) < 0) @@ -794,6 +788,7 @@ H5D__update_oh_info(H5F_t *file, hid_t dxpl_id, H5D_t *dset, hid_t dapl_id) H5D_fill_value_t fill_status; /* Fill value status */ hbool_t fill_changed = FALSE; /* Flag indicating the fill value was changed */ hbool_t layout_init = FALSE; /* Flag to indicate that chunk information was initialized */ + hbool_t use_at_least_v18; /* Flag indicating to use at least v18 format versions */ herr_t ret_value = SUCCEED; /* Return value */ FUNC_ENTER_STATIC @@ -808,6 +803,9 @@ H5D__update_oh_info(H5F_t *file, hid_t dxpl_id, H5D_t *dset, hid_t dapl_id) type = dset->shared->type; fill_prop = &dset->shared->dcpl_cache.fill; + /* To use at least v18 format versions or not */ + use_at_least_v18 = (H5F_LOW_BOUND(file) >= H5F_LIBVER_V18); + /* Retrieve "defined" status of fill value */ if(H5P_is_fill_value_defined(fill_prop, &fill_status) < 0) HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't tell if fill value defined") @@ -886,8 +884,8 @@ H5D__update_oh_info(H5F_t *file, hid_t dxpl_id, H5D_t *dset, hid_t dapl_id) HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to update new fill value header message") /* If there is valid information for the old fill value struct, add it */ - /* (only if we aren't trying to write the 'latest fill message version support') */ - if(fill_prop->buf && !(H5F_USE_LATEST_FLAGS(file, H5F_LATEST_FILL_MSG))) { + /* (only if we aren't using v18 format versions and above */ + if(fill_prop->buf && !use_at_least_v18) { H5O_fill_t old_fill_prop; /* Copy of fill value property, for writing as "old" fill value */ /* Shallow copy the fill value property */ @@ -922,27 +920,27 @@ H5D__update_oh_info(H5F_t *file, hid_t dxpl_id, H5D_t *dset, hid_t dapl_id) (H5P_exist_plist(dc_plist, H5O_BOGUS_MSG_ID_NAME) > 0) ) { uint8_t bogus_flags = 0; /* Flags for creating "bogus" message */ - unsigned bogus_id; /* "bogus" ID */ + unsigned bogus_id; /* "bogus" ID */ - /* Retrieve "bogus" message ID */ + /* Retrieve "bogus" message ID */ if(H5P_get(dc_plist, H5O_BOGUS_MSG_ID_NAME, &bogus_id) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't get bogus ID options") + HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't get bogus ID options") /* Retrieve "bogus" message flags */ if(H5P_get(dc_plist, H5O_BOGUS_MSG_FLAGS_NAME, &bogus_flags) < 0) HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't get bogus message options") /* Add a "bogus" message (for error testing). */ - if(H5O_bogus_oh(file, dxpl_id, oh, bogus_id, (unsigned)bogus_flags) < 0) + if(H5O_bogus_oh(file, dxpl_id, oh, bogus_id, (unsigned)bogus_flags) < 0) HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to create 'bogus' message") } /* end if */ } #endif /* H5O_ENABLE_BOGUS */ /* Add a modification time message, if using older format. */ - /* (If using the latest 'no modification time message' version support, the modification time is part of the object + /* (If using v18 format versions and above, the the modification time is part of the object * header and doesn't use a separate message -QAK) */ - if(!(H5F_USE_LATEST_FLAGS(file, H5F_LATEST_NO_MOD_TIME_MSG))) + if(!use_at_least_v18) if(H5O_touch_oh(file, dxpl_id, oh, TRUE) < 0) HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to update modification time message") @@ -1174,27 +1172,20 @@ H5D__create(H5F_t *file, hid_t type_id, const H5S_t *space, hid_t dcpl_id, HGOTO_ERROR(H5E_DATASET, H5E_BADVALUE, NULL, "compact dataset must have early space allocation") } /* end if */ - /* Set the latest version of the layout, pline & fill messages, if requested */ - if(H5F_USE_LATEST_FLAGS(file, H5F_LATEST_DSET_MSG_FLAGS)) { - /* Set the latest version for the I/O pipeline message */ - if(H5F_USE_LATEST_FLAGS(file, H5F_LATEST_PLINE_MSG)) - if(H5O_pline_set_latest_version(&new_dset->shared->dcpl_cache.pline) < 0) + /* Set the version for the I/O pipeline message */ + if(H5O_pline_set_version(file, &new_dset->shared->dcpl_cache.pline) < 0) HGOTO_ERROR(H5E_DATASET, H5E_CANTSET, NULL, "can't set latest version of I/O filter pipeline") - /* Set the latest version for the fill message */ - if(H5F_USE_LATEST_FLAGS(file, H5F_LATEST_FILL_MSG)) - /* Set the latest version for the fill value message */ - if(H5O_fill_set_latest_version(&new_dset->shared->dcpl_cache.fill) < 0) + /* Set the version for the fill message */ + if(H5O_fill_set_version(file, &new_dset->shared->dcpl_cache.fill) < 0) HGOTO_ERROR(H5E_DATASET, H5E_CANTSET, NULL, "can't set latest version of fill value") - /* Set the latest version for the layout message */ - if(H5F_USE_LATEST_FLAGS(file, H5F_LATEST_LAYOUT_MSG)) - /* Set the latest version for the layout message */ - if(H5D__layout_set_latest_version(&new_dset->shared->layout, new_dset->shared->space, &new_dset->shared->dcpl_cache) < 0) + /* Set the latest version for the layout message */ + if(H5D__layout_set_version(file, &new_dset->shared->layout) < 0) HGOTO_ERROR(H5E_DATASET, H5E_CANTSET, NULL, "can't set latest version of layout") - } /* end if */ - else if(new_dset->shared->layout.version >= H5O_LAYOUT_VERSION_4) { - /* Use latest indexing type for layout message version >= 4 */ + + if(new_dset->shared->layout.version >= H5O_LAYOUT_VERSION_4) { + /* Use latest indexing type for layout message version >= 4 */ if(H5D__layout_set_latest_indexing(&new_dset->shared->layout, new_dset->shared->space, &new_dset->shared->dcpl_cache) < 0) HGOTO_ERROR(H5E_DATASET, H5E_CANTSET, NULL, "can't set latest indexing") } /* end if */ diff --git a/src/H5Dlayout.c b/src/H5Dlayout.c index ec18e86..980b810 100644 --- a/src/H5Dlayout.c +++ b/src/H5Dlayout.c @@ -46,6 +46,12 @@ /* Package Variables */ /*********************/ +/* Format version bounds for layout */ +const unsigned H5O_layout_ver_bounds[] = { + H5O_LAYOUT_VERSION_1, /* H5F_LIBVER_EARLIEST */ + H5O_LAYOUT_VERSION_3, /* H5F_LIBVER_V18 */ /* H5O_LAYOUT_VERSION_DEFAULT */ + H5O_LAYOUT_VERSION_LATEST /* H5F_LIBVER_LATEST */ +}; /*****************************/ /* Library Private Variables */ @@ -57,6 +63,7 @@ /*******************/ + /*------------------------------------------------------------------------- * Function: H5D__layout_set_io_ops @@ -277,49 +284,47 @@ done: /*------------------------------------------------------------------------- - * Function: H5D__layout_set_latest_version + * Function: H5D__layout_set_version * - * Purpose: Set the encoding for a layout to the latest version. - * Part of the coding in this routine is moved to - * H5D__layout_set_latest_indexing(). + * Purpose: Set the version to encode a layout with. * * Return: Non-negative on success/Negative on failure * - * Programmer: Quincey Koziol - * Thursday, January 15, 2009 + * Programmer: Vailin Choi; December 2017 * *------------------------------------------------------------------------- */ herr_t -H5D__layout_set_latest_version(H5O_layout_t *layout, const H5S_t *space, - const H5D_dcpl_cache_t *dcpl_cache) +H5D__layout_set_version(H5F_t *f, H5O_layout_t *layout) { - herr_t ret_value = SUCCEED; /* Return value */ + unsigned version; /* Message version */ + herr_t ret_value = SUCCEED; /* Return value */ - FUNC_ENTER_PACKAGE + FUNC_ENTER_NOAPI(FAIL) /* Sanity check */ HDassert(layout); - HDassert(space); - HDassert(dcpl_cache); + HDassert(f); + + /* Upgrade to the version indicated by the file's low bound if higher */ + version = MAX(layout->version, H5O_layout_ver_bounds[H5F_LOW_BOUND(f)]); - /* Set encoding of layout to latest version */ - layout->version = H5O_LAYOUT_VERSION_LATEST; + /* Version bounds check */ + if(version > H5O_layout_ver_bounds[H5F_HIGH_BOUND(f)]) + HGOTO_ERROR(H5E_DATASET, H5E_BADRANGE, FAIL, "layout version out of bounds") - /* Set the latest indexing type for the layout message */ - if(H5D__layout_set_latest_indexing(layout, space, dcpl_cache) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTSET, FAIL, "can't set latest indexing type") + /* Set the message version */ + layout->version = version; done: FUNC_LEAVE_NOAPI(ret_value) -} /* end H5D__layout_set_latest_version() */ +} /* end H5D__layout_set_version() */ /*------------------------------------------------------------------------- * Function: H5D__layout_set_latest_indexing * * Purpose: Set the latest indexing type for a layout message - * This is moved from H5D_layout_set_latest_version(). * * Return: Non-negative on success/Negative on failure * diff --git a/src/H5Dpkg.h b/src/H5Dpkg.h index 45f2d3a..78705c7 100644 --- a/src/H5Dpkg.h +++ b/src/H5Dpkg.h @@ -562,6 +562,9 @@ H5_DLLVAR const H5D_chunk_ops_t H5D_COPS_BT2[1]; H5_DLLVAR const H5B2_class_t H5D_BT2[1]; H5_DLLVAR const H5B2_class_t H5D_BT2_FILT[1]; +/* Array of versions for Layout */ +H5_DLLVAR const unsigned H5O_layout_ver_bounds[H5F_LIBVER_NBOUNDS]; + /******************************/ /* Package Private Prototypes */ diff --git a/src/H5F.c b/src/H5F.c index f435502..8e5f65a 100644 --- a/src/H5F.c +++ b/src/H5F.c @@ -1477,7 +1477,8 @@ H5Fstart_swmr_write(hid_t file_id) if(file->shared->sblock->super_vers < HDF5_SUPERBLOCK_VERSION_3) HGOTO_ERROR(H5E_FILE, H5E_BADVALUE, FAIL, "file superblock version should be at least 3") - HDassert((file->shared->latest_flags | H5F_LATEST_LAYOUT_MSG) > 0); + + HDassert((file->shared->low_bound == H5F_LIBVER_V110) && (file->shared->high_bound == H5F_LIBVER_V110)); /* Should not be marked for SWMR writing mode already */ if(file->shared->sblock->status_flags & H5F_SUPER_SWMR_WRITE_ACCESS) @@ -1740,41 +1741,36 @@ done: /*------------------------------------------------------------------------- - * Function: H5Fset_latest_format + * Function: H5Fset_libver_bounds * - * Purpose: Enable switching the "latest format" flag while a file is open. + * Purpose: Set to a different low and high bounds while a file is open. + * This public routine is introduced in place of + * H5Fset_latest_format() starting release 1.10.2. + * See explanation for H5Fset_latest_format() in H5Fdeprec.c. * * Return: Non-negative on success/Negative on failure *------------------------------------------------------------------------- */ herr_t -H5Fset_latest_format(hid_t file_id, hbool_t latest_format) +H5Fset_libver_bounds(hid_t file_id, H5F_libver_t low, H5F_libver_t high) { H5F_t *f; /* File */ - unsigned latest_flags; /* Latest format flags for file */ herr_t ret_value = SUCCEED; /* Return value */ FUNC_ENTER_API(FAIL) - H5TRACE2("e", "ib", file_id, latest_format); + H5TRACE3("e", "iFvFv", file_id, low, high); /* Check args */ if(NULL == (f = (H5F_t *)H5I_object_verify(file_id, H5I_FILE))) HGOTO_ERROR(H5E_FILE, H5E_BADVALUE, FAIL, "not a file ID") - /* Check if the value is changing */ - latest_flags = H5F_USE_LATEST_FLAGS(f, H5F_LATEST_ALL_FLAGS); - if(latest_format != (H5F_LATEST_ALL_FLAGS == latest_flags)) { - /* Call the flush routine, for this file */ - if(H5F__flush(f, H5AC_ind_read_dxpl_id, H5AC_rawdata_dxpl_id, FALSE) < 0) - HGOTO_ERROR(H5E_FILE, H5E_CANTFLUSH, FAIL, "unable to flush file's cached information") - - /* Toggle the 'latest format' flag */ - H5F_SET_LATEST_FLAGS(f, latest_format ? H5F_LATEST_ALL_FLAGS : 0); - } /* end if */ + /* Call private set_libver_bounds function */ + if(H5F_set_libver_bounds(f, low, high) < 0) + HGOTO_ERROR(H5E_FILE, H5E_CANTSET, FAIL, "cannot set low/high bounds") done: FUNC_LEAVE_API(ret_value) -} /* end H5Fset_latest_format() */ +} /* end H5Fset_libver_bounds() */ /*------------------------------------------------------------------------- diff --git a/src/H5Fdeprec.c b/src/H5Fdeprec.c index 03f5df8..a9ffa43 100644 --- a/src/H5Fdeprec.c +++ b/src/H5Fdeprec.c @@ -143,5 +143,67 @@ done: FUNC_LEAVE_API(ret_value) } /* end H5Fget_info1() */ + +/*------------------------------------------------------------------------- + * Function: H5Fset_latest_format + * + * Purpose: Enable switching between latest or non-latest format while + * a file is open. + * This is deprecated starting release 1.10.2 and is modified + * to call the private H5F_set_libver_bounds() to set the + * bounds. + * + * Before release 1.10.2, the library supports only two + * combinations of low/high bounds: + * (earliest, latest) + * (latest, latest) + * Thus, this public routine does the job in switching + * between the two combinations listed above. + * + * Starting release 1.10.2, we add v18 to the enumerated + * define H5F_libver_t and the library supports five combinations + * as below: + * (earliest, v18) + * (earliest, v10) + * (v18, v18) + * (v18, v10) + * (v10, v10) + * So we introduce the new public routine H5Fset_libver_bounds() + * in place of H5Fset_latest_format(). + * See also RFC: Setting Bounds for Object Creation in HDF5 1.10.0. + * + * Return: Non-negative on success/Negative on failure + * + * Programmer: Vailin Choi; December 2017 + * + *------------------------------------------------------------------------- + */ +herr_t +H5Fset_latest_format(hid_t file_id, hbool_t latest_format) +{ + H5F_t *f; /* File */ + H5F_libver_t low = H5F_LIBVER_LATEST; /* Low bound */ + H5F_libver_t high = H5F_LIBVER_LATEST; /* High bound */ + herr_t ret_value = SUCCEED; /* Return value */ + + FUNC_ENTER_API(FAIL) + H5TRACE2("e", "ib", file_id, latest_format); + + /* Check args */ + if(NULL == (f = (H5F_t *)H5I_object_verify(file_id, H5I_FILE))) + HGOTO_ERROR(H5E_FILE, H5E_BADVALUE, FAIL, "not a file ID") + + /* 'low' and 'high' are both initialized to LATEST. + If latest format is not expected, set 'low' to EARLIEST */ + if(!latest_format) + low = H5F_LIBVER_EARLIEST; + + /* Call private set_libver_bounds function to set the bounds */ + if(H5F_set_libver_bounds(f, low, high) < 0) + HGOTO_ERROR(H5E_FILE, H5E_CANTSET, FAIL, "cannot set low/high bounds") + +done: + FUNC_LEAVE_API(ret_value) +} /* end H5Fset_latest_format() */ #endif /* H5_NO_DEPRECATED_SYMBOLS */ diff --git a/src/H5Ffake.c b/src/H5Ffake.c index 86c4a3d..6072f2e 100644 --- a/src/H5Ffake.c +++ b/src/H5Ffake.c @@ -15,10 +15,9 @@ /* Packages needed by this file... */ -#include "H5private.h" /* Generic Functions */ -#include "H5Eprivate.h" /* Error handling */ -#include "H5Iprivate.h" /* IDs */ -#include "H5Fpkg.h" /* File access */ +#include "H5private.h" /* Generic Functions */ +#include "H5Eprivate.h" /* Error handling */ +#include "H5Fpkg.h" /* File access */ /* PRIVATE PROTOTYPES */ @@ -41,11 +40,9 @@ *------------------------------------------------------------------------- */ H5F_t * -H5F_fake_alloc(uint8_t sizeof_size, hid_t fapl_id) +H5F_fake_alloc(uint8_t sizeof_size) { H5F_t *f = NULL; /* Pointer to fake file struct */ - H5P_genplist_t *plist; /* Property list */ - hbool_t latest; H5F_t *ret_value = NULL; /* Return value */ FUNC_ENTER_NOAPI(NULL) @@ -62,16 +59,6 @@ H5F_fake_alloc(uint8_t sizeof_size, hid_t fapl_id) else f->shared->sizeof_size = sizeof_size; - /* Activate latest version support according to the setting in fapl_id */ - /* See H5F_new() in H5Fint.c */ - if(NULL == (plist = (H5P_genplist_t *)H5I_object(fapl_id))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "not file access property list") - - if(H5P_get(plist, H5F_ACS_LATEST_FORMAT_NAME, &latest) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, NULL, "can't get 'latest format' flag") - if(latest) - f->shared->latest_flags |= H5F_LATEST_ALL_FLAGS; - /* Set return value */ ret_value = f; diff --git a/src/H5Fint.c b/src/H5Fint.c index 4ef8e85..c41453a 100644 --- a/src/H5Fint.c +++ b/src/H5Fint.c @@ -161,10 +161,10 @@ H5F_get_access_plist(H5F_t *f, hbool_t app_ref) HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "can't sieve buffer size") if(H5P_set(new_plist, H5F_ACS_SDATA_BLOCK_SIZE_NAME, &(f->shared->sdata_aggr.alloc_size)) < 0) HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "can't set 'small data' cache size") - if(f->shared->latest_flags > 0) - latest_format = TRUE; - if(H5P_set(new_plist, H5F_ACS_LATEST_FORMAT_NAME, &latest_format) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "can't set 'latest format' flag") + if(H5P_set(new_plist, H5F_ACS_LIBVER_LOW_BOUND_NAME, &f->shared->low_bound) < 0) + HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "can't set 'low' bound for library format versions") + if(H5P_set(new_plist, H5F_ACS_LIBVER_HIGH_BOUND_NAME, &f->shared->high_bound) < 0) + HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "can't set 'high' bound for library format versions") if(H5P_set(new_plist, H5F_ACS_METADATA_READ_ATTEMPTS_NAME, &(f->shared->read_attempts)) < 0) HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "can't set 'read attempts ' flag") if(H5P_set(new_plist, H5F_ACS_OBJECT_FLUSH_CB_NAME, &(f->shared->object_flush)) < 0) @@ -902,13 +902,10 @@ H5F_new(H5F_file_t *shared, unsigned flags, hid_t fcpl_id, hid_t fapl_id, H5FD_t HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, NULL, "can't get garbage collect reference") if(H5P_get(plist, H5F_ACS_SIEVE_BUF_SIZE_NAME, &(f->shared->sieve_buf_size)) < 0) HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, NULL, "can't get sieve buffer size") - if(H5P_get(plist, H5F_ACS_LATEST_FORMAT_NAME, &latest_format) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, NULL, "can't get 'latest format' flag") - /* For latest format or SWMR_WRITE, activate all latest version support */ - if(latest_format) - f->shared->latest_flags |= H5F_LATEST_ALL_FLAGS; - else if(H5F_INTENT(f) & H5F_ACC_SWMR_WRITE) - f->shared->latest_flags |= H5F_LATEST_LAYOUT_MSG; + if(H5P_get(plist, H5F_ACS_LIBVER_LOW_BOUND_NAME, &(f->shared->low_bound)) < 0) + HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, NULL, "can't get 'low' bound for library format versions") + if(H5P_get(plist, H5F_ACS_LIBVER_HIGH_BOUND_NAME, &(f->shared->high_bound)) < 0) + HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, NULL, "can't get 'high' bound for library format versions") if(H5P_get(plist, H5F_ACS_USE_MDC_LOGGING_NAME, &(f->shared->use_mdc_logging)) < 0) HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, NULL, "can't get 'use mdc logging' flag") if(H5P_get(plist, H5F_ACS_START_MDC_LOG_ON_ACCESS_NAME, &(f->shared->start_mdc_log_on_access)) < 0) @@ -2571,7 +2568,39 @@ H5F_set_store_msg_crt_idx(H5F_t *f, hbool_t flag) FUNC_LEAVE_NOAPI(SUCCEED) } /* H5F_set_store_msg_crt_idx() */ +/*------------------------------------------------------------------------- + * Function: H5F_set_libver_bounds() + * + * Purpose: Set the file's low and high bound to the input parameters + * 'low' and 'high' respectively. + * This is done only if the existing setting is different + * from the inputs. + * + * Return: SUCCEED on success, and FAIL on failure. + * + * Programmer: Vailin Choi; December 2017 + * + *------------------------------------------------------------------------- + */ +herr_t +H5F_set_libver_bounds(H5F_t * f, H5F_libver_t low, H5F_libver_t high) +{ + FUNC_ENTER_NOAPI_NOINIT_NOERR + /* Sanity checks */ + HDassert(f); + HDassert(f->shared); + + /* Set the bounds only if the existing setting is different from the inputs */ + if(f->shared->low_bound != low || f->shared->high_bound != high) { + f->shared->low_bound = low; + f->shared->high_bound = high; + } + + FUNC_LEAVE_NOAPI(SUCCEED) +} /* H5F_set_libver_bounds() */ + + /*------------------------------------------------------------------------- * Function: H5F_get_file_image * @@ -2908,30 +2937,3 @@ H5F_set_coll_md_read(H5F_t *f, H5P_coll_md_read_flag_t cmr) FUNC_LEAVE_NOAPI_VOID } /* H5F_set_coll_md_read() */ #endif /* H5_HAVE_PARALLEL */ - - -/*------------------------------------------------------------------------- - * Function: H5F_set_latest_flags - * - * Purpose: Set the latest_flags field with a new value. - * - * Return: Success: SUCCEED - * Failure: FAIL - *------------------------------------------------------------------------- - */ -herr_t -H5F_set_latest_flags(H5F_t *f, unsigned flags) -{ - /* Use FUNC_ENTER_NOAPI_NOINIT_NOERR here to avoid performance issues */ - FUNC_ENTER_NOAPI_NOINIT_NOERR - - /* Sanity check */ - HDassert(f); - HDassert(f->shared); - HDassert(0 == ((flags) & ~H5F_LATEST_ALL_FLAGS)); - - f->shared->latest_flags = flags; - - FUNC_LEAVE_NOAPI(SUCCEED) -} /* H5F_set_latest_flags() */ - diff --git a/src/H5Fpkg.h b/src/H5Fpkg.h index b50b4e5..c9aba56 100644 --- a/src/H5Fpkg.h +++ b/src/H5Fpkg.h @@ -300,7 +300,8 @@ struct H5F_file_t { hsize_t threshold; /* Threshold for alignment */ hsize_t alignment; /* Alignment */ unsigned gc_ref; /* Garbage-collect references? */ - unsigned latest_flags; /* The latest version support */ + H5F_libver_t low_bound; /* The 'low' bound of library format versions */ + H5F_libver_t high_bound; /* The 'high' bound of library format versions */ hbool_t store_msg_crt_idx; /* Store creation index for object header messages? */ unsigned ncwfs; /* Num entries on cwfs list */ struct H5HG_heap_t **cwfs; /* Global heap cache */ diff --git a/src/H5Fprivate.h b/src/H5Fprivate.h index 2410a83..856e618 100644 --- a/src/H5Fprivate.h +++ b/src/H5Fprivate.h @@ -275,6 +275,8 @@ typedef struct H5F_t H5F_t; /* If the module using this macro is allowed access to the private variables, access them directly */ #ifdef H5F_MODULE +#define H5F_LOW_BOUND(F) ((F)->shared->low_bound) +#define H5F_HIGH_BOUND(F) ((F)->shared->high_bound) #define H5F_INTENT(F) ((F)->shared->flags) #define H5F_OPEN_NAME(F) ((F)->open_name) #define H5F_ACTUAL_NAME(F) ((F)->actual_name) @@ -311,15 +313,12 @@ typedef struct H5F_t H5F_t; #define H5F_RDCC_W0(F) ((F)->shared->rdcc_w0) #define H5F_SIEVE_BUF_SIZE(F) ((F)->shared->sieve_buf_size) #define H5F_GC_REF(F) ((F)->shared->gc_ref) -#define H5F_USE_LATEST_FLAGS(F,FL) ((F)->shared->latest_flags & (FL)) -#define H5F_GET_LATEST_FLAGS(F) ((F)->shared->latest_flags) #define H5F_STORE_MSG_CRT_IDX(F) ((F)->shared->store_msg_crt_idx) #define H5F_SET_STORE_MSG_CRT_IDX(F, FL) ((F)->shared->store_msg_crt_idx = (FL)) #define H5F_GRP_BTREE_SHARED(F) ((F)->shared->grp_btree_shared) #define H5F_SET_GRP_BTREE_SHARED(F, RC) (((F)->shared->grp_btree_shared = (RC)) ? SUCCEED : FAIL) #define H5F_USE_TMP_SPACE(F) ((F)->shared->fs.use_tmp_space) #define H5F_IS_TMP_ADDR(F, ADDR) (H5F_addr_le((F)->shared->fs.tmp_addr, (ADDR))) -#define H5F_SET_LATEST_FLAGS(F, FL) ((F)->shared->latest_flags = (FL)) #ifdef H5_HAVE_PARALLEL #define H5F_COLL_MD_READ(F) ((F)->coll_md_read) #endif /* H5_HAVE_PARALLEL */ @@ -333,6 +332,8 @@ typedef struct H5F_t H5F_t; #define H5F_FIRST_ALLOC_DEALLOC(F) ((F)->shared->first_alloc_dealloc) #define H5F_EOA_PRE_FSM_FSALLOC(F) ((F)->shared->eoa_pre_fsm_fsalloc) #else /* H5F_MODULE */ +#define H5F_LOW_BOUND(F) (H5F_get_low_bound(F)) +#define H5F_HIGH_BOUND(F) (H5F_get_high_bound(F)) #define H5F_INTENT(F) (H5F_get_intent(F)) #define H5F_OPEN_NAME(F) (H5F_get_open_name(F)) #define H5F_ACTUAL_NAME(F) (H5F_get_actual_name(F)) @@ -369,15 +370,12 @@ typedef struct H5F_t H5F_t; #define H5F_RDCC_W0(F) (H5F_rdcc_w0(F)) #define H5F_SIEVE_BUF_SIZE(F) (H5F_sieve_buf_size(F)) #define H5F_GC_REF(F) (H5F_gc_ref(F)) -#define H5F_USE_LATEST_FLAGS(F,FL) (H5F_use_latest_flags(F,FL)) -#define H5F_GET_LATEST_FLAGS(F) (H5F_get_latest_flags(F)) #define H5F_STORE_MSG_CRT_IDX(F) (H5F_store_msg_crt_idx(F)) #define H5F_SET_STORE_MSG_CRT_IDX(F, FL) (H5F_set_store_msg_crt_idx((F), (FL))) #define H5F_GRP_BTREE_SHARED(F) (H5F_grp_btree_shared(F)) #define H5F_SET_GRP_BTREE_SHARED(F, RC) (H5F_set_grp_btree_shared((F), (RC))) #define H5F_USE_TMP_SPACE(F) (H5F_use_tmp_space(F)) #define H5F_IS_TMP_ADDR(F, ADDR) (H5F_is_tmp_addr((F), (ADDR))) -#define H5F_SET_LATEST_FLAGS(F, FL) (H5F_set_latest_flags((F), (FL))) #ifdef H5_HAVE_PARALLEL #define H5F_COLL_MD_READ(F) (H5F_coll_md_read(F)) #endif /* H5_HAVE_PARALLEL */ @@ -486,7 +484,8 @@ typedef struct H5F_t H5F_t; #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_SEC2_NAME "family_to_sec2" /* Whether to convert family to sec2 driver. (private property only used by h5repart) */ #define H5F_ACS_MULTI_TYPE_NAME "multi_type" /* Data type in multi file driver */ -#define H5F_ACS_LATEST_FORMAT_NAME "latest_format" /* 'Use latest format version' flag */ +#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 */ @@ -631,24 +630,6 @@ typedef struct H5F_t H5F_t; #define H5SM_TABLE_MAGIC "SMTB" /* Shared Message Table */ #define H5SM_LIST_MAGIC "SMLI" /* Shared Message List */ - -/* Latest format will activate the following latest version support */ -/* "latest_flags" in H5F_file_t */ -#define H5F_LATEST_DATATYPE 0x0001 -#define H5F_LATEST_DATASPACE 0x0002 -#define H5F_LATEST_ATTRIBUTE 0x0004 -#define H5F_LATEST_FILL_MSG 0x0008 -#define H5F_LATEST_PLINE_MSG 0x0010 -#define H5F_LATEST_LAYOUT_MSG 0x0020 -#define H5F_LATEST_NO_MOD_TIME_MSG 0x0040 -#define H5F_LATEST_STYLE_GROUP 0x0080 -#define H5F_LATEST_OBJ_HEADER 0x0100 -#define H5F_LATEST_SUPERBLOCK 0x0200 -#define H5F_LATEST_DATASPACE_SELECTION 0x0400 -#define H5F_LATEST_ALL_FLAGS (H5F_LATEST_DATATYPE | H5F_LATEST_DATASPACE | H5F_LATEST_ATTRIBUTE | H5F_LATEST_FILL_MSG | H5F_LATEST_PLINE_MSG | H5F_LATEST_LAYOUT_MSG | H5F_LATEST_NO_MOD_TIME_MSG | H5F_LATEST_STYLE_GROUP | H5F_LATEST_OBJ_HEADER | H5F_LATEST_SUPERBLOCK | H5F_LATEST_DATASPACE_SELECTION) - -#define H5F_LATEST_DSET_MSG_FLAGS (H5F_LATEST_FILL_MSG | H5F_LATEST_PLINE_MSG | H5F_LATEST_LAYOUT_MSG) - /****************************/ /* Library Private Typedefs */ /****************************/ @@ -739,7 +720,9 @@ H5_DLL H5F_t *H5F_open(const char *name, unsigned flags, hid_t fcpl_id, hid_t fapl_id, hid_t dxpl_id); H5_DLL herr_t H5F_try_close(H5F_t *f, hbool_t *was_closed/*out*/); -/* Functions than retrieve values from the file struct */ +/* Functions that retrieve values from the file struct */ +H5_DLL H5F_libver_t H5F_get_low_bound(const H5F_t *f); +H5_DLL H5F_libver_t H5F_get_high_bound(const H5F_t *f); H5_DLL unsigned H5F_get_intent(const H5F_t *f); H5_DLL char *H5F_get_open_name(const H5F_t *f); H5_DLL char *H5F_get_actual_name(const H5F_t *f); @@ -786,11 +769,11 @@ H5_DLL unsigned H5F_gc_ref(const H5F_t *f); H5_DLL unsigned H5F_use_latest_flags(const H5F_t *f, unsigned fl); H5_DLL hbool_t H5F_store_msg_crt_idx(const H5F_t *f); H5_DLL herr_t H5F_set_store_msg_crt_idx(H5F_t *f, hbool_t flag); +H5_DLL herr_t H5F_set_libver_bounds(H5F_t * f, H5F_libver_t low, H5F_libver_t high); H5_DLL struct H5UC_t *H5F_grp_btree_shared(const H5F_t *f); H5_DLL herr_t H5F_set_grp_btree_shared(H5F_t *f, struct H5UC_t *rc); H5_DLL hbool_t H5F_use_tmp_space(const H5F_t *f); H5_DLL hbool_t H5F_is_tmp_addr(const H5F_t *f, haddr_t addr); -H5_DLL herr_t H5F_set_latest_flags(H5F_t *f, unsigned flags); H5_DLL hsize_t H5F_get_alignment(const H5F_t *f); H5_DLL hsize_t H5F_get_threshold(const H5F_t *f); #ifdef H5_HAVE_PARALLEL @@ -844,7 +827,7 @@ H5_DLL void H5F_addr_decode_len(size_t addr_len, const uint8_t **pp, haddr_t *ad H5_DLL void H5F_sfile_assert_num(unsigned n); /* Routines for creating & destroying "fake" file structures */ -H5_DLL H5F_t *H5F_fake_alloc(uint8_t sizeof_size, hid_t fapl_id); +H5_DLL H5F_t *H5F_fake_alloc(uint8_t sizeof_size); H5_DLL herr_t H5F_fake_free(H5F_t *f); /* Superblock related routines */ diff --git a/src/H5Fpublic.h b/src/H5Fpublic.h index 1594cb2..d333fa7 100644 --- a/src/H5Fpublic.h +++ b/src/H5Fpublic.h @@ -173,12 +173,17 @@ typedef struct H5F_sect_info_t { hsize_t size; /* Size of free space section */ } H5F_sect_info_t; -/* Library's file format versions */ +/* Library's format versions */ typedef enum H5F_libver_t { - H5F_LIBVER_EARLIEST, /* Use the earliest possible format for storing objects */ - H5F_LIBVER_LATEST /* Use the latest possible format available for storing objects*/ + 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_NBOUNDS } H5F_libver_t; +#define H5F_LIBVER_LATEST H5F_LIBVER_V110 + /* 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 */ @@ -255,7 +260,7 @@ 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_latest_format(hid_t file_id, hbool_t latest_format); +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, @@ -295,6 +300,7 @@ typedef struct H5F_info1_t { /* Function prototypes */ H5_DLL herr_t H5Fget_info1(hid_t obj_id, H5F_info1_t *finfo); +H5_DLL herr_t H5Fset_latest_format(hid_t file_id, hbool_t latest_format); #endif /* H5_NO_DEPRECATED_SYMBOLS */ diff --git a/src/H5Fquery.c b/src/H5Fquery.c index 235a26d..6f4febc 100644 --- a/src/H5Fquery.c +++ b/src/H5Fquery.c @@ -97,6 +97,56 @@ H5F_get_intent(const H5F_t *f) /*------------------------------------------------------------------------- + * Function: H5F_get_low_bound + * + * Purpose: Quick and dirty routine to retrieve the file's low_bound. + * (Mainly added to stop non-file routines from poking about in the + * H5F_t data structure) + * + * Return: low_bound on success/abort on failure (shouldn't fail) + * + * Programmer: Vailin Choi; June 2016 + * + *------------------------------------------------------------------------- + */ +H5F_libver_t +H5F_get_low_bound(const H5F_t *f) +{ + /* Use FUNC_ENTER_NOAPI_NOINIT_NOERR here to avoid performance issues */ + FUNC_ENTER_NOAPI_NOINIT_NOERR + + HDassert(f); + + FUNC_LEAVE_NOAPI(f->shared->low_bound) +} /* end H5F_get_low_bound() */ + + +/*------------------------------------------------------------------------- + * Function: H5F_get_high_bound + * + * Purpose: Quick and dirty routine to retrieve the file's high_bound. + * (Mainly added to stop non-file routines from poking about in the + * H5F_t data structure) + * + * Return: high_bound on success/abort on failure (shouldn't fail) + * + * Programmer: Vailin Choi; June 2016 + * + *------------------------------------------------------------------------- + */ +H5F_libver_t +H5F_get_high_bound(const H5F_t *f) +{ + /* Use FUNC_ENTER_NOAPI_NOINIT_NOERR here to avoid performance issues */ + FUNC_ENTER_NOAPI_NOINIT_NOERR + + HDassert(f); + + FUNC_LEAVE_NOAPI(f->shared->high_bound) +} /* end H5F_get_high_bound() */ + + +/*------------------------------------------------------------------------- * Function: H5F_get_open_name * * Purpose: Retrieve the name used to open a file. @@ -667,9 +717,13 @@ H5F_sieve_buf_size(const H5F_t *f) * references flag" now that the generic properties are being used * to store the values. * - * Return: Success: The "garbage collect references flag" - * is returned. - * Failure: (should not happen) + * Return: Success: The "garbage collect references flag" is returned. + * Failure: (should not happen) + * + * Programmer: Quincey Koziol + * koziol@ncsa.uiuc.edu + * Jul 8 2005 + * *------------------------------------------------------------------------- */ unsigned @@ -686,55 +740,6 @@ H5F_gc_ref(const H5F_t *f) /*------------------------------------------------------------------------- - * Function: H5F_use_latest_flags - * - * Purpose: Retrieve the requested 'latest version support' for the file. - * - * Return: Success: Non-negative, the requested 'version support' - * Failure: (can't happen) - *------------------------------------------------------------------------- - */ -unsigned -H5F_use_latest_flags(const H5F_t *f, unsigned fl) -{ - /* Use FUNC_ENTER_NOAPI_NOINIT_NOERR here to avoid performance issues */ - FUNC_ENTER_NOAPI_NOINIT_NOERR - - HDassert(f); - HDassert(f->shared); - - FUNC_LEAVE_NOAPI(f->shared->latest_flags & (fl)) -} /* end H5F_use_latest_flags() */ - - -/*------------------------------------------------------------------------- - * Function: H5F_get_latest_flags - * - * Purpose: Retrieve the 'latest version support' setting for the file. - * - * Return: Success: Non-negative - * Failure: (can't happen) - * - * Programmer: Quincey Koziol - * koziol@hdfgroup.org - * Mar 5 2007 - * - *------------------------------------------------------------------------- - */ -unsigned -H5F_get_latest_flags(const H5F_t *f) -{ - /* Use FUNC_ENTER_NOAPI_NOINIT_NOERR here to avoid performance issues */ - FUNC_ENTER_NOAPI_NOINIT_NOERR - - HDassert(f); - HDassert(f->shared); - - FUNC_LEAVE_NOAPI(f->shared->latest_flags) -} /* end H5F_get_latest_flags() */ - - -/*------------------------------------------------------------------------- * Function: H5F_get_fc_degree * * Purpose: Retrieve the 'file close degree' for the file. diff --git a/src/H5Fsuper.c b/src/H5Fsuper.c index 0c6f9cd..4250ff0 100644 --- a/src/H5Fsuper.c +++ b/src/H5Fsuper.c @@ -59,7 +59,6 @@ static herr_t H5F__update_super_ext_driver_msg(H5F_t *f, hid_t dxpl_id); /* Package Variables */ /*********************/ - /*****************************/ /* Library Private Variables */ /*****************************/ @@ -72,6 +71,12 @@ H5FL_DEFINE(H5F_super_t); /* Local Variables */ /*******************/ +/* Format version bounds for superblock */ +static const unsigned HDF5_superblock_ver_bounds[] = { + HDF5_SUPERBLOCK_VERSION_DEF, /* H5F_LIBVER_EARLIEST */ + HDF5_SUPERBLOCK_VERSION_2, /* H5F_LIBVER_V18 */ + HDF5_SUPERBLOCK_VERSION_LATEST /* H5F_LIBVER_LATEST */ +}; /*------------------------------------------------------------------------- @@ -452,13 +457,46 @@ H5F__super_read(H5F_t *f, hid_t meta_dxpl_id, hid_t raw_dxpl_id, hbool_t initial if(NULL == (sblock = (H5F_super_t *)H5AC_protect(f, meta_dxpl_id, H5AC_SUPERBLOCK, (haddr_t)0, &udata, rw_flags))) HGOTO_ERROR(H5E_FILE, H5E_CANTPROTECT, FAIL, "unable to load superblock") - if(H5F_INTENT(f) & H5F_ACC_SWMR_WRITE) - if(sblock->super_vers < HDF5_SUPERBLOCK_VERSION_3) - HGOTO_ERROR(H5E_FILE, H5E_CANTPROTECT, FAIL, "invalid superblock version for SWMR_WRITE") + /* + * When opening a file with SWMR-write access, the library will first + * check to ensure that superblock version 3 is used. Otherwise fail + * file open. + * + * Then the library will upgrade the file's low_bound depending on + * superblock version as follows: + * --version 0 or 1: no change to low_bound + * --version 2: upgrade low_bound to at least V18 + * --version 3: upgrade low_bound to at least V110 + * + * Upgrading low_bound will give the best format versions available for + * that superblock version. Due to the possible upgrade, the fapl returned + * from H5Fget_access_plist() might indicate a low_bound higher than what + * the user originally set. + * + * After upgrading low_bound, the library will check to ensure that the + * superblock version does not exceed the version allowed by high_bound. + * Otherise fail file open. + * + * For details, please see RFC:Setting Bounds for Object Creation in HDF5 1.10.0. + */ + + /* Check to ensure that superblock version 3 is used for SWMR-write access */ + if(H5F_INTENT(f) & H5F_ACC_SWMR_WRITE) { + if(sblock->super_vers < HDF5_SUPERBLOCK_VERSION_3) + HGOTO_ERROR(H5E_FILE, H5E_BADVALUE, FAIL, "superblock version for SWMR is less than 3") + } - /* Enable all latest version support when file has v3 superblock */ + /* Upgrade low_bound to at least V18 when encountering version 2 superblock */ + if(sblock->super_vers == HDF5_SUPERBLOCK_VERSION_2) + f->shared->low_bound = MAX(H5F_LIBVER_V18, f->shared->low_bound); + + /* Upgrade low_bound to at least V110 when encountering version 3 superblock */ if(sblock->super_vers >= HDF5_SUPERBLOCK_VERSION_3) - f->shared->latest_flags |= H5F_LATEST_ALL_FLAGS; + f->shared->low_bound = MAX(H5F_LIBVER_V110, f->shared->low_bound); + + /* Version bounds check */ + if(sblock->super_vers > HDF5_superblock_ver_bounds[f->shared->high_bound]) + HGOTO_ERROR(H5E_FILE, H5E_BADVALUE, FAIL, "superblock version exceeds high bound") /* Pin the superblock in the cache */ if(H5AC_pin_protected_entry(sblock) < 0) @@ -1018,14 +1056,42 @@ H5F__super_init(H5F_t *f, hid_t dxpl_id) f->shared->fs_page_size == H5F_FILE_SPACE_PAGE_SIZE_DEF)) non_default_fs_settings = TRUE; - /* Bump superblock version if latest superblock version support is enabled */ - if(H5F_USE_LATEST_FLAGS(f, H5F_LATEST_SUPERBLOCK)) - super_vers = HDF5_SUPERBLOCK_VERSION_LATEST; - /* Bump superblock version to use version 3 superblock for SWMR writing */ - else if((H5F_INTENT(f) & H5F_ACC_SWMR_WRITE)) + /* + * When creating a file with write access, the library will: + * -- set superblock version to 0, 1 or 2 based on feature enabled + * -- no change to low_bound + * When creating a file with SWMR-write access, the library will: + * (See explanation (#) below.) + * -- set superblock version to 3 + * -- upgrade low_bound to at least V110 + * + * Then the library will finalize superblock version to that allowed by + * low_bound if that is higher. + * Lastly, the library will check to ensure the superblock version does not + * exceed the version allowed by high_bound. Otherwise fail file open. + * + * For details, please see RFC:Setting Bounds for Object Creation in HDF5 1.10.0. + * + * (#) + * Version 3 superblock is introduced in 1.10 for SWMR due to the problem of + * the status_flags field in the superblock. The problem is discussed in + * jira issue SWMR-79 and also in the RFC: File Format Changes in HDF5 1.10.0. + * The file's low_bound is upgraded for SWMR so that the library will + * use the best format versions available in 1.10. + * Due to the possible upgrade, the fapl returned from H5Fget_access_plist() + * might indicate a low_bound higher than what the user originally set. + */ + + /* + * Creating a file with SWMR-write access will + * upgrade superblock version and low_bound + */ + if(H5F_INTENT(f) & H5F_ACC_SWMR_WRITE) { super_vers = HDF5_SUPERBLOCK_VERSION_3; + f->shared->low_bound = MAX(H5F_LIBVER_V110, f->shared->low_bound); + /* Bump superblock version to create superblock extension for SOHM info */ - else if(f->shared->sohm_nindexes > 0) + } else if(f->shared->sohm_nindexes > 0) super_vers = HDF5_SUPERBLOCK_VERSION_2; /* * Bump superblock version to create superblock extension for: @@ -1043,6 +1109,13 @@ H5F__super_init(H5F_t *f, hid_t dxpl_id) else if(sblock->btree_k[H5B_CHUNK_ID] != HDF5_BTREE_CHUNK_IK_DEF) super_vers = HDF5_SUPERBLOCK_VERSION_1; + /* Finalize superblock version to that allowed by the file's low bound if higher */ + super_vers = MAX(super_vers, HDF5_superblock_ver_bounds[f->shared->low_bound]); + + /* Version bounds check */ + if(super_vers > HDF5_superblock_ver_bounds[f->shared->high_bound]) + HGOTO_ERROR(H5E_FILE, H5E_BADVALUE, FAIL, "superblock version out of bounds") + /* If a newer superblock version is required, set it here */ if(super_vers != HDF5_SUPERBLOCK_VERSION_DEF) { H5P_genplist_t *c_plist; /* Property list */ @@ -1067,8 +1140,8 @@ H5F__super_init(H5F_t *f, hid_t dxpl_id) /* Sanity check the userblock size vs. the file's allocation alignment */ if(userblock_size > 0) { - /* Set up the alignment to use for page or aggr fs */ - hsize_t alignment = H5F_PAGED_AGGR(f) ? f->shared->fs_page_size : f->shared->alignment; + /* Set up the alignment to use for page or aggr fs */ + hsize_t alignment = H5F_PAGED_AGGR(f) ? f->shared->fs_page_size : f->shared->alignment; if(userblock_size < alignment) HGOTO_ERROR(H5E_FILE, H5E_BADVALUE, FAIL, "userblock size must be > file object alignment") diff --git a/src/H5Gbtree2.c b/src/H5Gbtree2.c index 71d15e5..4702c46 100644 --- a/src/H5Gbtree2.c +++ b/src/H5Gbtree2.c @@ -155,7 +155,7 @@ const H5B2_class_t H5G_BT2_CORDER[1]={{ /* B-tree class information */ *------------------------------------------------------------------------- */ static herr_t -H5G_dense_fh_name_cmp(const void *obj, size_t H5_ATTR_UNUSED obj_len, void *_udata) +H5G_dense_fh_name_cmp(const void *obj, size_t obj_len, void *_udata) { H5G_fh_ud_cmp_t *udata = (H5G_fh_ud_cmp_t *)_udata; /* User data for 'op' callback */ H5O_link_t *lnk; /* Pointer to link created from heap object */ @@ -164,7 +164,7 @@ H5G_dense_fh_name_cmp(const void *obj, size_t H5_ATTR_UNUSED obj_len, void *_uda FUNC_ENTER_NOAPI_NOINIT /* Decode link information */ - if(NULL == (lnk = (H5O_link_t *)H5O_msg_decode(udata->f, udata->dxpl_id, NULL, H5O_LINK_ID, (const unsigned char *)obj))) + if(NULL == (lnk = (H5O_link_t *)H5O_msg_decode(udata->f, udata->dxpl_id, NULL, H5O_LINK_ID, obj_len, (const unsigned char *)obj))) HGOTO_ERROR(H5E_SYM, H5E_CANTDECODE, FAIL, "can't decode link") /* Compare the string values */ diff --git a/src/H5Gdense.c b/src/H5Gdense.c index 4ae6800..de11541 100644 --- a/src/H5Gdense.c +++ b/src/H5Gdense.c @@ -599,7 +599,7 @@ done: *------------------------------------------------------------------------- */ static herr_t -H5G_dense_lookup_by_idx_fh_cb(const void *obj, size_t H5_ATTR_UNUSED obj_len, void *_udata) +H5G_dense_lookup_by_idx_fh_cb(const void *obj, size_t obj_len, void *_udata) { H5G_fh_ud_lbi_t *udata = (H5G_fh_ud_lbi_t *)_udata; /* User data for fractal heap 'op' callback */ H5O_link_t *tmp_lnk = NULL; /* Temporary pointer to link */ @@ -608,7 +608,7 @@ H5G_dense_lookup_by_idx_fh_cb(const void *obj, size_t H5_ATTR_UNUSED obj_len, vo FUNC_ENTER_NOAPI_NOINIT /* Decode link information & keep a copy */ - if(NULL == (tmp_lnk = (H5O_link_t *)H5O_msg_decode(udata->f, udata->dxpl_id, NULL, H5O_LINK_ID, (const unsigned char *)obj))) + if(NULL == (tmp_lnk = (H5O_link_t *)H5O_msg_decode(udata->f, udata->dxpl_id, NULL, H5O_LINK_ID, obj_len, (const unsigned char *)obj))) HGOTO_ERROR(H5E_SYM, H5E_CANTDECODE, FAIL, "can't decode link") /* Copy link information */ @@ -889,7 +889,7 @@ done: *------------------------------------------------------------------------- */ static herr_t -H5G_dense_iterate_fh_cb(const void *obj, size_t H5_ATTR_UNUSED obj_len, void *_udata) +H5G_dense_iterate_fh_cb(const void *obj, size_t obj_len, void *_udata) { H5G_fh_ud_it_t *udata = (H5G_fh_ud_it_t *)_udata; /* User data for fractal heap 'op' callback */ herr_t ret_value = SUCCEED; /* Return value */ @@ -903,7 +903,7 @@ H5G_dense_iterate_fh_cb(const void *obj, size_t H5_ATTR_UNUSED obj_len, void *_u * HDF5 routine, it could attempt to re-protect that direct block for the * heap, causing the HDF5 routine called to fail - QAK) */ - if(NULL == (udata->lnk = (H5O_link_t *)H5O_msg_decode(udata->f, udata->dxpl_id, NULL, H5O_LINK_ID, (const unsigned char *)obj))) + if(NULL == (udata->lnk = (H5O_link_t *)H5O_msg_decode(udata->f, udata->dxpl_id, NULL, H5O_LINK_ID, obj_len, (const unsigned char *)obj))) HGOTO_ERROR(H5E_SYM, H5E_CANTDECODE, FAIL, "can't decode link") done: @@ -1101,7 +1101,7 @@ done: *------------------------------------------------------------------------- */ static herr_t -H5G_dense_get_name_by_idx_fh_cb(const void *obj, size_t H5_ATTR_UNUSED obj_len, void *_udata) +H5G_dense_get_name_by_idx_fh_cb(const void *obj, size_t obj_len, void *_udata) { H5G_fh_ud_gnbi_t *udata = (H5G_fh_ud_gnbi_t *)_udata; /* User data for fractal heap 'op' callback */ H5O_link_t *lnk; /* Pointer to link created from heap object */ @@ -1110,7 +1110,7 @@ H5G_dense_get_name_by_idx_fh_cb(const void *obj, size_t H5_ATTR_UNUSED obj_len, FUNC_ENTER_NOAPI_NOINIT /* Decode link information */ - if(NULL == (lnk = (H5O_link_t *)H5O_msg_decode(udata->f, udata->dxpl_id, NULL, H5O_LINK_ID, (const unsigned char *)obj))) + if(NULL == (lnk = (H5O_link_t *)H5O_msg_decode(udata->f, udata->dxpl_id, NULL, H5O_LINK_ID, obj_len, (const unsigned char *)obj))) HGOTO_ERROR(H5E_SYM, H5E_CANTDECODE, FAIL, "can't decode link") /* Get the length of the name */ @@ -1308,7 +1308,7 @@ done: *------------------------------------------------------------------------- */ static herr_t -H5G_dense_remove_fh_cb(const void *obj, size_t H5_ATTR_UNUSED obj_len, void *_udata) +H5G_dense_remove_fh_cb(const void *obj, size_t obj_len, void *_udata) { H5G_fh_ud_rm_t *udata = (H5G_fh_ud_rm_t *)_udata; /* User data for fractal heap 'op' callback */ H5O_link_t *lnk = NULL; /* Pointer to link created from heap object */ @@ -1318,7 +1318,7 @@ H5G_dense_remove_fh_cb(const void *obj, size_t H5_ATTR_UNUSED obj_len, void *_ud FUNC_ENTER_NOAPI_NOINIT /* Decode link information */ - if(NULL == (lnk = (H5O_link_t *)H5O_msg_decode(udata->f, udata->dxpl_id, NULL, H5O_LINK_ID, (const unsigned char *)obj))) + if(NULL == (lnk = (H5O_link_t *)H5O_msg_decode(udata->f, udata->dxpl_id, NULL, H5O_LINK_ID, obj_len, (const unsigned char *)obj))) HGOTO_ERROR(H5E_SYM, H5E_CANTDECODE, FAIL, "can't decode link") /* Check for removing the link from the creation order index */ @@ -1485,7 +1485,7 @@ done: *------------------------------------------------------------------------- */ static herr_t -H5G_dense_remove_by_idx_fh_cb(const void *obj, size_t H5_ATTR_UNUSED obj_len, void *_udata) +H5G_dense_remove_by_idx_fh_cb(const void *obj, size_t obj_len, void *_udata) { H5G_fh_ud_rmbi_t *udata = (H5G_fh_ud_rmbi_t *)_udata; /* User data for fractal heap 'op' callback */ herr_t ret_value = SUCCEED; /* Return value */ @@ -1493,7 +1493,7 @@ H5G_dense_remove_by_idx_fh_cb(const void *obj, size_t H5_ATTR_UNUSED obj_len, vo FUNC_ENTER_NOAPI_NOINIT /* Decode link information */ - if(NULL == (udata->lnk = (H5O_link_t *)H5O_msg_decode(udata->f, udata->dxpl_id, NULL, H5O_LINK_ID, (const unsigned char *)obj))) + if(NULL == (udata->lnk = (H5O_link_t *)H5O_msg_decode(udata->f, udata->dxpl_id, NULL, H5O_LINK_ID, obj_len, (const unsigned char *)obj))) HGOTO_ERROR(H5E_SYM, H5E_CANTDECODE, H5_ITER_ERROR, "can't decode link") /* Can't operate on link here because the fractal heap block is locked */ diff --git a/src/H5Gobj.c b/src/H5Gobj.c index d2dc83b..5f9bdc8 100644 --- a/src/H5Gobj.c +++ b/src/H5Gobj.c @@ -185,7 +185,7 @@ H5G__obj_create_real(H5F_t *f, hid_t dxpl_id, const H5O_ginfo_t *ginfo, H5G_obj_create_t *gcrt_info, H5O_loc_t *oloc/*out*/) { size_t hdr_size; /* Size of object header to request */ - hbool_t use_latest_format; /* Flag indicating the new group format should be used */ + hbool_t use_at_least_v18; /* Flag indicating the new group format should be used */ hid_t gcpl_id = gcrt_info->gcpl_id; /* Group creation property list ID */ herr_t ret_value = SUCCEED; /* Return value */ @@ -202,24 +202,23 @@ H5G__obj_create_real(H5F_t *f, hid_t dxpl_id, const H5O_ginfo_t *ginfo, /* Check for invalid access request */ if(0 == (H5F_INTENT(f) & H5F_ACC_RDWR)) - HGOTO_ERROR(H5E_CACHE, H5E_BADVALUE, FAIL, "no write intent on file") + HGOTO_ERROR(H5E_CACHE, H5E_BADVALUE, FAIL, "no write intent on file") - /* Check for using the latest version of the group format */ + /* Check for using the latest version of the group format which is introduced in v18 */ /* (add more checks for creating "new format" groups when needed) */ - if(H5F_USE_LATEST_FLAGS(f, H5F_LATEST_STYLE_GROUP) || linfo->track_corder - || (pline && pline->nused)) - use_latest_format = TRUE; + if((H5F_LOW_BOUND(f) >= H5F_LIBVER_V18) || linfo->track_corder || (pline && pline->nused)) + use_at_least_v18 = TRUE; else - use_latest_format = FALSE; + use_at_least_v18 = FALSE; /* Make certain that the creation order is being tracked if an index is * going to be built on it. */ if(linfo->index_corder && !linfo->track_corder) - HGOTO_ERROR(H5E_SYM, H5E_BADVALUE, FAIL, "must track creation order to create index for it") + HGOTO_ERROR(H5E_SYM, H5E_BADVALUE, FAIL, "must track creation order to create index for it") /* Check if we should be using the latest version of the group format */ - if(use_latest_format) { + if(use_at_least_v18) { H5O_link_t lnk; /* Temporary link message info for computing message size */ char null_char = '\0'; /* Character for creating null string */ size_t ginfo_size; /* Size of the group info message */ @@ -262,10 +261,10 @@ H5G__obj_create_real(H5F_t *f, hid_t dxpl_id, const H5O_ginfo_t *ginfo, * incremented if the object is added to the group directed graph. */ if(H5O_create(f, dxpl_id, hdr_size, (size_t)1, gcpl_id, oloc/*out*/) < 0) - HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "can't create header") + HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "can't create header") /* Check for format of group to create */ - if(use_latest_format) { + if(use_at_least_v18) { /* Insert link info message */ /* (Casting away const OK - QAK) */ if(H5O_msg_create(oloc, H5O_LINFO_ID, 0, H5O_UPDATE_TIME, (void *)linfo, dxpl_id) < 0) diff --git a/src/H5HFcache.c b/src/H5HFcache.c index 069bf17..c940161 100644 --- a/src/H5HFcache.c +++ b/src/H5HFcache.c @@ -572,7 +572,7 @@ H5HF__cache_hdr_deserialize(const void *_image, size_t len, void *_udata, UINT32DECODE(image, hdr->pline_root_direct_filter_mask); /* Decode I/O filter information */ - if(NULL == (pline = (H5O_pline_t *)H5O_msg_decode(hdr->f, udata->dxpl_id, NULL, H5O_PLINE_ID, image))) + if(NULL == (pline = (H5O_pline_t *)H5O_msg_decode(hdr->f, udata->dxpl_id, NULL, H5O_PLINE_ID, len, image))) HGOTO_ERROR(H5E_HEAP, H5E_CANTDECODE, NULL, "can't decode I/O pipeline filters") /* Advance past filter info to checksum */ diff --git a/src/H5HFhdr.c b/src/H5HFhdr.c index 2f01ce6..89b3b47 100644 --- a/src/H5HFhdr.c +++ b/src/H5HFhdr.c @@ -424,11 +424,9 @@ H5HF_hdr_create(H5F_t *f, hid_t dxpl_id, const H5HF_create_t *cparam) if(NULL == H5O_msg_copy(H5O_PLINE_ID, &(cparam->pline), &(hdr->pline))) HGOTO_ERROR(H5E_HEAP, H5E_CANTCOPY, HADDR_UNDEF, "can't copy I/O filter pipeline") - /* Pay attention to the latest version flag for the file */ - if(H5F_USE_LATEST_FLAGS(hdr->f, H5F_LATEST_PLINE_MSG)) - /* Set the latest version for the I/O pipeline message */ - if(H5O_pline_set_latest_version(&(hdr->pline)) < 0) - HGOTO_ERROR(H5E_HEAP, H5E_CANTSET, HADDR_UNDEF, "can't set latest version of I/O filter pipeline") + /* Set the version for the I/O pipeline message */ + if(H5O_pline_set_version(hdr->f, &(hdr->pline)) < 0) + HGOTO_ERROR(H5E_HEAP, H5E_CANTSET, HADDR_UNDEF, "can't set version of I/O filter pipeline") /* Compute the I/O filters' encoded size */ if(0 == (hdr->filter_len = (unsigned)H5O_msg_raw_size(hdr->f, H5O_PLINE_ID, FALSE, &(hdr->pline)))) diff --git a/src/H5O.c b/src/H5O.c index cf84b47..109bf99 100644 --- a/src/H5O.c +++ b/src/H5O.c @@ -72,7 +72,6 @@ /* Local Variables */ /*******************/ - /*------------------------------------------------------------------------- * Function: H5Oopen diff --git a/src/H5Oainfo.c b/src/H5Oainfo.c index d8298a4..b85337a 100644 --- a/src/H5Oainfo.c +++ b/src/H5Oainfo.c @@ -35,7 +35,7 @@ /* PRIVATE PROTOTYPES */ static void *H5O_ainfo_decode(H5F_t *f, hid_t dxpl_id, H5O_t *open_oh, - unsigned mesg_flags, unsigned *ioflags, const uint8_t *p); + unsigned mesg_flags, unsigned *ioflags, size_t p_size, const uint8_t *p); static herr_t H5O_ainfo_encode(H5F_t *f, hbool_t disable_shared, uint8_t *p, const void *_mesg); static void *H5O_ainfo_copy(const void *_mesg, void *_dest); static size_t H5O_ainfo_size(const H5F_t *f, hbool_t disable_shared, const void *_mesg); @@ -105,7 +105,8 @@ H5FL_DEFINE_STATIC(H5O_ainfo_t); */ static void * H5O_ainfo_decode(H5F_t *f, hid_t H5_ATTR_UNUSED dxpl_id, H5O_t H5_ATTR_UNUSED *open_oh, - unsigned H5_ATTR_UNUSED mesg_flags, unsigned H5_ATTR_UNUSED *ioflags, const uint8_t *p) + unsigned H5_ATTR_UNUSED mesg_flags, unsigned H5_ATTR_UNUSED *ioflags, + size_t H5_ATTR_UNUSED p_size, const uint8_t *p) { H5O_ainfo_t *ainfo = NULL; /* Attribute info */ unsigned char flags; /* Flags for encoding attribute info */ diff --git a/src/H5Oattr.c b/src/H5Oattr.c index cb802ea..79a0a52 100644 --- a/src/H5Oattr.c +++ b/src/H5Oattr.c @@ -26,7 +26,7 @@ /* PRIVATE PROTOTYPES */ static herr_t H5O_attr_encode(H5F_t *f, uint8_t *p, const void *mesg); static void *H5O_attr_decode(H5F_t *f, hid_t dxpl_id, H5O_t *open_oh, - unsigned mesg_flags, unsigned *ioflags, const uint8_t *p); + unsigned mesg_flags, unsigned *ioflags, size_t p_size, const uint8_t *p); static void *H5O_attr_copy(const void *_mesg, void *_dest); static size_t H5O_attr_size(const H5F_t *f, const void *_mesg); static herr_t H5O_attr_free(void *mesg); @@ -121,7 +121,7 @@ H5FL_EXTERN(H5S_extent_t); --------------------------------------------------------------------------*/ static void * H5O_attr_decode(H5F_t *f, hid_t dxpl_id, H5O_t *open_oh, unsigned H5_ATTR_UNUSED mesg_flags, - unsigned *ioflags, const uint8_t *p) + unsigned *ioflags, size_t H5_ATTR_UNUSED p_size, const uint8_t *p) { H5A_t *attr = NULL; H5S_extent_t *extent; /*extent dimensionality information */ @@ -185,7 +185,7 @@ H5O_attr_decode(H5F_t *f, hid_t dxpl_id, H5O_t *open_oh, unsigned H5_ATTR_UNUSED /* Decode the attribute's datatype */ if(NULL == (attr->shared->dt = (H5T_t *)(H5O_MSG_DTYPE->decode)(f, dxpl_id, open_oh, - ((flags & H5O_ATTR_FLAG_TYPE_SHARED) ? H5O_MSG_FLAG_SHARED : 0), ioflags, p))) + ((flags & H5O_ATTR_FLAG_TYPE_SHARED) ? H5O_MSG_FLAG_SHARED : 0), ioflags, attr->shared->dt_size, p))) HGOTO_ERROR(H5E_ATTR, H5E_CANTDECODE, NULL, "can't decode attribute datatype") if(attr->shared->version < H5O_ATTR_VERSION_2) p += H5O_ALIGN_OLD(attr->shared->dt_size); @@ -200,7 +200,7 @@ H5O_attr_decode(H5F_t *f, hid_t dxpl_id, H5O_t *open_oh, unsigned H5_ATTR_UNUSED /* Decode attribute's dataspace extent */ if((extent = (H5S_extent_t *)(H5O_MSG_SDSPACE->decode)(f, dxpl_id, open_oh, - ((flags & H5O_ATTR_FLAG_SPACE_SHARED) ? H5O_MSG_FLAG_SHARED : 0), ioflags, p)) == NULL) + ((flags & H5O_ATTR_FLAG_SPACE_SHARED) ? H5O_MSG_FLAG_SHARED : 0), ioflags, attr->shared->ds_size, p)) == NULL) HGOTO_ERROR(H5E_ATTR, H5E_CANTDECODE, NULL, "can't decode attribute dataspace") /* Copy the extent information to the dataspace */ @@ -622,14 +622,23 @@ done: *------------------------------------------------------------------------- */ static herr_t -H5O_attr_pre_copy_file(H5F_t H5_ATTR_UNUSED *file_src, const void H5_ATTR_UNUSED *native_src, +H5O_attr_pre_copy_file(H5F_t H5_ATTR_UNUSED *file_src, const void *native_src, hbool_t *deleted, const H5O_copy_t *cpy_info, void H5_ATTR_UNUSED *udata) { - FUNC_ENTER_NOAPI_NOINIT_NOERR + const H5A_t *attr_src = (const H5A_t *)native_src; /* Source attribute */ + herr_t ret_value = SUCCEED; /* Return value */ + + FUNC_ENTER_NOAPI_NOINIT /* check args */ HDassert(deleted); HDassert(cpy_info); + HDassert(cpy_info->file_dst); + + /* Check to ensure that the version of the message to be copied does not exceed + the message version allowed by the destination file's high bound */ + if(attr_src->shared->version > H5O_attr_ver_bounds[H5F_HIGH_BOUND(cpy_info->file_dst)]) + HGOTO_ERROR(H5E_OHDR, H5E_BADRANGE, FAIL, "attribute message version out of bounds") /* If we are not copying attributes into the destination file, indicate * that this message should be deleted. @@ -637,7 +646,8 @@ H5O_attr_pre_copy_file(H5F_t H5_ATTR_UNUSED *file_src, const void H5_ATTR_UNUSED if(cpy_info->copy_without_attr) *deleted = TRUE; - FUNC_LEAVE_NOAPI(SUCCEED) +done: + FUNC_LEAVE_NOAPI(ret_value) } /* end H5O_attr_pre_copy_file() */ diff --git a/src/H5Obogus.c b/src/H5Obogus.c index a3531ed..02e0e6a 100644 --- a/src/H5Obogus.c +++ b/src/H5Obogus.c @@ -38,7 +38,7 @@ /* PRIVATE PROTOTYPES */ static void *H5O_bogus_decode(H5F_t *f, hid_t dxpl_id, H5O_t *open_oh, - unsigned mesg_flags, unsigned *ioflags, const uint8_t *p); + unsigned mesg_flags, unsigned *ioflags, size_t p_size, const uint8_t *p); static herr_t H5O_bogus_encode(H5F_t *f, hbool_t disable_shared, uint8_t *p, const void *_mesg); static size_t H5O_bogus_size(const H5F_t *f, hbool_t disable_shared, const void *_mesg); static herr_t H5O_bogus_debug(H5F_t *f, hid_t dxpl_id, const void *_mesg, FILE * stream, @@ -111,7 +111,8 @@ const H5O_msg_class_t H5O_MSG_BOGUS_INVALID[1] = {{ */ static void * H5O_bogus_decode(H5F_t *f, hid_t H5_ATTR_UNUSED dxpl_id, H5O_t H5_ATTR_UNUSED *open_oh, - unsigned H5_ATTR_UNUSED mesg_flags, unsigned H5_ATTR_UNUSED *ioflags, const uint8_t *p) + unsigned H5_ATTR_UNUSED mesg_flags, unsigned H5_ATTR_UNUSED *ioflags, + size_t H5_ATTR_UNUSED p_size, const uint8_t *p) { H5O_bogus_t *mesg = NULL; void *ret_value; /* Return value */ diff --git a/src/H5Obtreek.c b/src/H5Obtreek.c index 4fd0577..1d2b607 100644 --- a/src/H5Obtreek.c +++ b/src/H5Obtreek.c @@ -28,7 +28,7 @@ #include "H5MMprivate.h" /* Memory management */ static void *H5O_btreek_decode(H5F_t *f, hid_t dxpl_id, H5O_t *open_oh, - unsigned mesg_flags, unsigned *ioflags, const uint8_t *p); + unsigned mesg_flags, unsigned *ioflags, size_t p_size, const uint8_t *p); static herr_t H5O_btreek_encode(H5F_t *f, hbool_t disable_shared, uint8_t *p, const void *_mesg); static void *H5O_btreek_copy(const void *_mesg, void *_dest); static size_t H5O_btreek_size(const H5F_t *f, hbool_t disable_shared, const void *_mesg); @@ -79,7 +79,8 @@ const H5O_msg_class_t H5O_MSG_BTREEK[1] = {{ */ static void * H5O_btreek_decode(H5F_t H5_ATTR_UNUSED *f, hid_t H5_ATTR_UNUSED dxpl_id, H5O_t H5_ATTR_UNUSED *open_oh, - unsigned H5_ATTR_UNUSED mesg_flags, unsigned H5_ATTR_UNUSED *ioflags, const uint8_t *p) + unsigned H5_ATTR_UNUSED mesg_flags, unsigned H5_ATTR_UNUSED *ioflags, + size_t H5_ATTR_UNUSED p_size, const uint8_t *p) { H5O_btreek_t *mesg; /* Native message */ void *ret_value = NULL; /* Return value */ diff --git a/src/H5Ocache.c b/src/H5Ocache.c index 8f4c155..94049ef 100644 --- a/src/H5Ocache.c +++ b/src/H5Ocache.c @@ -1515,7 +1515,7 @@ H5O__chunk_deserialize(H5O_t *oh, haddr_t addr, size_t len, const uint8_t *image H5O_cont_t *cont; /* Decode continuation message */ - cont = (H5O_cont_t *)(H5O_MSG_CONT->decode)(udata->f, udata->dxpl_id, NULL, 0, &ioflags, mesg->raw); + cont = (H5O_cont_t *)(H5O_MSG_CONT->decode)(udata->f, udata->dxpl_id, NULL, 0, &ioflags, mesg->raw_size, mesg->raw); H5_CHECKED_ASSIGN(cont->chunkno, unsigned, udata->cont_msg_info->nmsgs + 1, size_t); /* the next continuation message/chunk */ /* Save 'native' form of continuation message */ @@ -1531,7 +1531,7 @@ H5O__chunk_deserialize(H5O_t *oh, haddr_t addr, size_t len, const uint8_t *image /* Decode ref. count message */ HDassert(oh->version > H5O_VERSION_1); - refcount = (H5O_refcount_t *)(H5O_MSG_REFCOUNT->decode)(udata->f, udata->dxpl_id, NULL, 0, &ioflags, mesg->raw); + refcount = (H5O_refcount_t *)(H5O_MSG_REFCOUNT->decode)(udata->f, udata->dxpl_id, NULL, 0, &ioflags, mesg->raw_size, mesg->raw); /* Save 'native' form of ref. count message */ mesg->native = refcount; diff --git a/src/H5Ocache_image.c b/src/H5Ocache_image.c index a427b49..d2b65bb 100644 --- a/src/H5Ocache_image.c +++ b/src/H5Ocache_image.c @@ -38,7 +38,7 @@ /* Callbacks for message class */ static void *H5O__mdci_decode(H5F_t *f, hid_t dxpl_id, H5O_t *open_oh, - unsigned mesg_flags, unsigned *ioflags, const uint8_t *p); + unsigned mesg_flags, unsigned *ioflags, size_t p_size, const uint8_t *p); static herr_t H5O__mdci_encode(H5F_t *f, hbool_t disable_shared, uint8_t *p, const void *_mesg); static void *H5O__mdci_copy(const void *_mesg, void *_dest); @@ -99,7 +99,7 @@ H5FL_DEFINE(H5O_mdci_t); static void * H5O__mdci_decode(H5F_t *f, hid_t H5_ATTR_UNUSED dxpl_id, H5O_t H5_ATTR_UNUSED *open_oh, unsigned H5_ATTR_UNUSED mesg_flags, - unsigned H5_ATTR_UNUSED *ioflags, const uint8_t *p) + unsigned H5_ATTR_UNUSED *ioflags, size_t H5_ATTR_UNUSED p_size, const uint8_t *p) { H5O_mdci_t *mesg; /* Native message */ void *ret_value = NULL; /* Return value */ diff --git a/src/H5Ocont.c b/src/H5Ocont.c index b002a32..f9a9768 100644 --- a/src/H5Ocont.c +++ b/src/H5Ocont.c @@ -37,7 +37,7 @@ /* PRIVATE PROTOTYPES */ static void *H5O_cont_decode(H5F_t *f, hid_t dxpl_id, H5O_t *open_oh, - unsigned mesg_flags, unsigned *ioflags, const uint8_t *p); + unsigned mesg_flags, unsigned *ioflags, size_t p_size, const uint8_t *p); static herr_t H5O_cont_encode(H5F_t *f, hbool_t disable_shared, uint8_t *p, const void *_mesg); static size_t H5O_cont_size(const H5F_t *f, hbool_t disable_shared, const void *_mesg); static herr_t H5O_cont_free(void *mesg); @@ -90,7 +90,8 @@ H5FL_DEFINE(H5O_cont_t); */ static void * H5O_cont_decode(H5F_t *f, hid_t H5_ATTR_UNUSED dxpl_id, H5O_t H5_ATTR_UNUSED *open_oh, - unsigned H5_ATTR_UNUSED mesg_flags, unsigned H5_ATTR_UNUSED *ioflags, const uint8_t *p) + unsigned H5_ATTR_UNUSED mesg_flags, unsigned H5_ATTR_UNUSED *ioflags, + size_t H5_ATTR_UNUSED p_size, const uint8_t *p) { H5O_cont_t *cont = NULL; void *ret_value = NULL; /* Return value */ diff --git a/src/H5Ocopy.c b/src/H5Ocopy.c index aa2a9e0..74c02f4 100644 --- a/src/H5Ocopy.c +++ b/src/H5Ocopy.c @@ -415,6 +415,11 @@ H5O_copy_header_real(const H5O_loc_t *oloc_src, H5O_loc_t *oloc_dst /*out*/, /* Initialize header information */ oh_dst->version = oh_src->version; + + /* Version bounds check for destination object header */ + if(oh_dst->version > H5O_obj_ver_bounds[H5F_HIGH_BOUND(oloc_dst->file)]) + HGOTO_ERROR(H5E_OHDR, H5E_BADRANGE, FAIL, "destination object header version out of bounds") + oh_dst->flags = oh_src->flags; oh_dst->link_msgs_seen = oh_src->link_msgs_seen; oh_dst->attr_msgs_seen = oh_src->attr_msgs_seen; @@ -490,6 +495,12 @@ H5O_copy_header_real(const H5O_loc_t *oloc_src, H5O_loc_t *oloc_dst /*out*/, /* Decode the message if necessary. */ H5O_LOAD_NATIVE(oloc_src->file, dxpl_id, 0, oh_src, mesg_src, FAIL) + /* Save destination file pointer in cpy_info so that it can be used + in the pre_copy_file callback to obtain the destination file's + high bound. The high bound is used to index into the corresponding + message's array of versions for doing version bounds check. */ + cpy_info->file_dst = oloc_dst->file; + /* Perform "pre copy" operation on message */ if((copy_type->pre_copy_file)(oloc_src->file, mesg_src->native, &(deleted[mesgno]), cpy_info, cpy_udata) < 0) @@ -871,12 +882,19 @@ done: HDONE_ERROR(H5E_OHDR, H5E_CANTUNPROTECT, FAIL, "unable to release object header") /* Free destination object header on failure */ - if(ret_value < 0 && oh_dst && !inserted) { - if(H5O__free(oh_dst) < 0) - HDONE_ERROR(H5E_OHDR, H5E_CANTFREE, FAIL, "unable to destroy object header data") - if(H5O_loc_reset(oloc_dst) < 0) - HDONE_ERROR(H5E_OHDR, H5E_CANTFREE, FAIL, "unable to destroy object header data") - } /* end if */ + if(ret_value < 0) { + if(oh_dst && !inserted) { + if(H5O__free(oh_dst) < 0) + HDONE_ERROR(H5E_OHDR, H5E_CANTFREE, FAIL, "unable to destroy object header data") + if(H5O_loc_reset(oloc_dst) < 0) + HDONE_ERROR(H5E_OHDR, H5E_CANTFREE, FAIL, "unable to destroy object header data") + } /* end if */ + + if(addr_map == NULL && cpy_udata) { + if(obj_class && obj_class->free_copy_file_udata) + obj_class->free_copy_file_udata(cpy_udata); + } /* end if */ + } FUNC_LEAVE_NOAPI_TAG(ret_value, FAIL) } /* end H5O_copy_header_real() */ diff --git a/src/H5Odrvinfo.c b/src/H5Odrvinfo.c index b9dea26..5921be3 100644 --- a/src/H5Odrvinfo.c +++ b/src/H5Odrvinfo.c @@ -28,7 +28,7 @@ #include "H5MMprivate.h" /* Memory management */ static void *H5O_drvinfo_decode(H5F_t *f, hid_t dxpl_id, H5O_t *open_oh, - unsigned mesg_flags, unsigned *ioflags, const uint8_t *p); + unsigned mesg_flags, unsigned *ioflags, size_t p_size, const uint8_t *p); static herr_t H5O_drvinfo_encode(H5F_t *f, hbool_t disable_shared, uint8_t *p, const void *_mesg); static void *H5O_drvinfo_copy(const void *_mesg, void *_dest); static size_t H5O_drvinfo_size(const H5F_t *f, hbool_t disable_shared, const void *_mesg); @@ -80,7 +80,8 @@ const H5O_msg_class_t H5O_MSG_DRVINFO[1] = {{ */ static void * H5O_drvinfo_decode(H5F_t H5_ATTR_UNUSED *f, hid_t H5_ATTR_UNUSED dxpl_id, H5O_t H5_ATTR_UNUSED *open_oh, - unsigned H5_ATTR_UNUSED mesg_flags, unsigned H5_ATTR_UNUSED *ioflags, const uint8_t *p) + unsigned H5_ATTR_UNUSED mesg_flags, unsigned H5_ATTR_UNUSED *ioflags, + size_t H5_ATTR_UNUSED p_size, const uint8_t *p) { H5O_drvinfo_t *mesg; /* Native message */ void *ret_value = NULL; /* Return value */ diff --git a/src/H5Odtype.c b/src/H5Odtype.c index a1c24b6..c557b5c 100644 --- a/src/H5Odtype.c +++ b/src/H5Odtype.c @@ -15,22 +15,22 @@ #define H5T_FRIEND /*prevent warning from including H5Tpkg */ -#include "H5private.h" /* Generic Functions */ -#include "H5Dprivate.h" /* Datasets */ -#include "H5Eprivate.h" /* Error handling */ -#include "H5Fprivate.h" /* Files */ -#include "H5FLprivate.h" /* Free Lists */ -#include "H5Gprivate.h" /* Groups */ -#include "H5MMprivate.h" /* Memory management */ -#include "H5Opkg.h" /* Object headers */ -#include "H5Tpkg.h" /* Datatypes */ -#include "H5VMprivate.h" /* Vectors and arrays */ +#include "H5private.h" /* Generic Functions */ +#include "H5Dprivate.h" /* Datasets */ +#include "H5Eprivate.h" /* Error handling */ +#include "H5Fprivate.h" /* Files */ +#include "H5FLprivate.h" /* Free Lists */ +#include "H5Gprivate.h" /* Groups */ +#include "H5MMprivate.h" /* Memory management */ +#include "H5Opkg.h" /* Object headers */ +#include "H5Tpkg.h" /* Datatypes */ +#include "H5VMprivate.h" /* Vectors and arrays */ /* PRIVATE PROTOTYPES */ static herr_t H5O_dtype_encode(H5F_t *f, uint8_t *p, const void *mesg); static void *H5O_dtype_decode(H5F_t *f, hid_t dxpl_id, H5O_t *open_oh, - unsigned mesg_flags, unsigned *ioflags, const uint8_t *p); + unsigned mesg_flags, unsigned *ioflags, size_t p_size, const uint8_t *p); static void *H5O_dtype_copy(const void *_mesg, void *_dest); static size_t H5O_dtype_size(const H5F_t *f, const void *_mesg); static herr_t H5O_dtype_reset(void *_mesg); @@ -1094,7 +1094,7 @@ done: --------------------------------------------------------------------------*/ static void * H5O_dtype_decode(H5F_t *f, hid_t H5_ATTR_UNUSED dxpl_id, H5O_t H5_ATTR_UNUSED *open_oh, unsigned H5_ATTR_UNUSED mesg_flags, - unsigned *ioflags/*in,out*/, const uint8_t *p) + unsigned *ioflags/*in,out*/, size_t H5_ATTR_UNUSED p_size, const uint8_t *p) { H5T_t *dt = NULL; void *ret_value = NULL; /* Return value */ @@ -1516,7 +1516,7 @@ done: */ static herr_t H5O_dtype_pre_copy_file(H5F_t *file_src, const void *mesg_src, - hbool_t H5_ATTR_UNUSED *deleted, const H5O_copy_t H5_ATTR_UNUSED *cpy_info, + hbool_t H5_ATTR_UNUSED *deleted, const H5O_copy_t *cpy_info, void *_udata) { const H5T_t *dt_src = (const H5T_t *)mesg_src; /* Source datatype */ @@ -1528,6 +1528,13 @@ H5O_dtype_pre_copy_file(H5F_t *file_src, const void *mesg_src, /* check args */ HDassert(file_src); HDassert(dt_src); + HDassert(cpy_info); + HDassert(cpy_info->file_dst); + + /* Check to ensure that the version of the message to be copied does not exceed + the message version as indicated by the destination file's high bound */ + if(dt_src->shared->version > H5O_dtype_ver_bounds[H5F_HIGH_BOUND(cpy_info->file_dst)]) + HGOTO_ERROR(H5E_OHDR, H5E_BADRANGE, FAIL, "datatype message version out of bounds") /* If the user data is non-NULL, assume we are copying a dataset * and check if we need to make a copy of the datatype for later in diff --git a/src/H5Oefl.c b/src/H5Oefl.c index ba7a6ee..f066964 100644 --- a/src/H5Oefl.c +++ b/src/H5Oefl.c @@ -28,7 +28,7 @@ /* PRIVATE PROTOTYPES */ static void *H5O_efl_decode(H5F_t *f, hid_t dxpl_id, H5O_t *open_oh, - unsigned mesg_flags, unsigned *ioflags, const uint8_t *p); + unsigned mesg_flags, unsigned *ioflags, size_t p_size, const uint8_t *p); static herr_t H5O_efl_encode(H5F_t *f, hbool_t disable_shared, uint8_t *p, const void *_mesg); static void *H5O_efl_copy(const void *_mesg, void *_dest); static size_t H5O_efl_size(const H5F_t *f, hbool_t disable_shared, const void *_mesg); @@ -88,7 +88,8 @@ const H5O_msg_class_t H5O_MSG_EFL[1] = {{ */ static void * H5O_efl_decode(H5F_t *f, hid_t dxpl_id, H5O_t H5_ATTR_UNUSED *open_oh, - unsigned H5_ATTR_UNUSED mesg_flags, unsigned H5_ATTR_UNUSED *ioflags, const uint8_t *p) + unsigned H5_ATTR_UNUSED mesg_flags, unsigned H5_ATTR_UNUSED *ioflags, + size_t H5_ATTR_UNUSED p_size, const uint8_t *p) { H5O_efl_t *mesg = NULL; int version; diff --git a/src/H5Ofill.c b/src/H5Ofill.c index 5419762..849435c 100644 --- a/src/H5Ofill.c +++ b/src/H5Ofill.c @@ -21,28 +21,30 @@ #include "H5Omodule.h" /* This source code file is part of the H5O module */ -#include "H5private.h" /* Generic Functions */ -#include "H5Dprivate.h" /* Datasets */ -#include "H5Eprivate.h" /* Error handling */ -#include "H5FLprivate.h" /* Free Lists */ -#include "H5Iprivate.h" /* IDs */ -#include "H5MMprivate.h" /* Memory management */ -#include "H5Opkg.h" /* Object headers */ -#include "H5Pprivate.h" /* Property lists */ -#include "H5Sprivate.h" /* Dataspaces */ +#include "H5private.h" /* Generic Functions */ +#include "H5Dprivate.h" /* Datasets */ +#include "H5Eprivate.h" /* Error handling */ +#include "H5FLprivate.h" /* Free Lists */ +#include "H5Iprivate.h" /* IDs */ +#include "H5MMprivate.h" /* Memory management */ +#include "H5Opkg.h" /* Object headers */ +#include "H5Pprivate.h" /* Property lists */ +#include "H5Sprivate.h" /* Dataspaces */ static void *H5O_fill_old_decode(H5F_t *f, hid_t dxpl_id, H5O_t *open_oh, - unsigned mesg_flags, unsigned *ioflags, const uint8_t *p); + unsigned mesg_flags, unsigned *ioflags, size_t p_size, const uint8_t *p); static herr_t H5O_fill_old_encode(H5F_t *f, uint8_t *p, const void *_mesg); static size_t H5O_fill_old_size(const H5F_t *f, const void *_mesg); static void *H5O_fill_new_decode(H5F_t *f, hid_t dxpl_id, H5O_t *open_oh, - unsigned mesg_flags, unsigned *ioflags, const uint8_t *p); + unsigned mesg_flags, unsigned *ioflags, size_t p_size, const uint8_t *p); static herr_t H5O_fill_new_encode(H5F_t *f, uint8_t *p, const void *_mesg); static size_t H5O_fill_new_size(const H5F_t *f, const void *_mesg); static void *H5O_fill_copy(const void *_mesg, void *_dest); static herr_t H5O_fill_reset(void *_mesg); static herr_t H5O_fill_free(void *_mesg); +static herr_t H5O_fill_pre_copy_file(H5F_t *file_src, const void *mesg_src, + hbool_t *deleted, const H5O_copy_t *cpy_info, void *udata); static herr_t H5O_fill_debug(H5F_t *f, hid_t dxpl_id, const void *_mesg, FILE *stream, int indent, int fwidth); @@ -105,52 +107,59 @@ static herr_t H5O_fill_debug(H5F_t *f, hid_t dxpl_id, const void *_mesg, FILE *s /* This message derives from H5O message class, for old fill value before version 1.5 */ const H5O_msg_class_t H5O_MSG_FILL[1] = {{ - H5O_FILL_ID, /*message id number */ - "fill", /*message name for debugging */ - sizeof(H5O_fill_t), /*native message size */ - H5O_SHARE_IS_SHARABLE|H5O_SHARE_IN_OHDR, /* messages are sharable? */ - H5O_fill_shared_decode, /*decode message */ - H5O_fill_shared_encode, /*encode message */ - H5O_fill_copy, /*copy the native value */ - H5O_fill_shared_size, /*raw message size */ - H5O_fill_reset, /*free internal memory */ - H5O_fill_free, /* free method */ - H5O_fill_shared_delete, /* file delete method */ - H5O_fill_shared_link, /* link method */ - NULL, /* set share method */ - NULL, /*can share method */ - NULL, /* pre copy native value to file */ - H5O_fill_shared_copy_file, /* copy native value to file */ - H5O_fill_shared_post_copy_file, /* post copy native value to file */ - NULL, /* get creation index */ - NULL, /* set creation index */ - H5O_fill_shared_debug /*debug the message */ + H5O_FILL_ID, /*message id number */ + "fill", /*message name for debugging */ + sizeof(H5O_fill_t), /*native message size */ + H5O_SHARE_IS_SHARABLE|H5O_SHARE_IN_OHDR, /* messages are sharable? */ + H5O_fill_shared_decode, /*decode message */ + H5O_fill_shared_encode, /*encode message */ + H5O_fill_copy, /*copy the native value */ + H5O_fill_shared_size, /*raw message size */ + H5O_fill_reset, /*free internal memory */ + H5O_fill_free, /* free method */ + H5O_fill_shared_delete, /* file delete method */ + H5O_fill_shared_link, /* link method */ + NULL, /* set share method */ + NULL, /*can share method */ + H5O_fill_pre_copy_file, /* pre copy native value to file */ + H5O_fill_shared_copy_file, /* copy native value to file */ + H5O_fill_shared_post_copy_file, /* post copy native value to file */ + NULL, /* get creation index */ + NULL, /* set creation index */ + H5O_fill_shared_debug /*debug the message */ }}; /* This message derives from H5O message class, for new fill value after version 1.4 */ const H5O_msg_class_t H5O_MSG_FILL_NEW[1] = {{ - H5O_FILL_NEW_ID, /*message id number */ - "fill_new", /*message name for debugging */ - sizeof(H5O_fill_t), /*native message size */ - H5O_SHARE_IS_SHARABLE|H5O_SHARE_IN_OHDR, /* messages are sharable? */ - H5O_fill_new_shared_decode, /*decode message */ - H5O_fill_new_shared_encode, /*encode message */ - H5O_fill_copy, /*copy the native value */ - H5O_fill_new_shared_size, /*raw message size */ - H5O_fill_reset, /*free internal memory */ - H5O_fill_free, /* free method */ - H5O_fill_new_shared_delete, /* file delete method */ - H5O_fill_new_shared_link, /* link method */ - NULL, /* set share method */ - NULL, /*can share method */ - NULL, /* pre copy native value to file */ - H5O_fill_new_shared_copy_file, /* copy native value to file */ - H5O_fill_new_shared_post_copy_file, /* post copy native value to file */ - NULL, /* get creation index */ - NULL, /* set creation index */ - H5O_fill_new_shared_debug /*debug the message */ + H5O_FILL_NEW_ID, /*message id number */ + "fill_new", /*message name for debugging */ + sizeof(H5O_fill_t), /*native message size */ + H5O_SHARE_IS_SHARABLE|H5O_SHARE_IN_OHDR, /* messages are sharable? */ + H5O_fill_new_shared_decode, /*decode message */ + H5O_fill_new_shared_encode, /*encode message */ + H5O_fill_copy, /*copy the native value */ + H5O_fill_new_shared_size, /*raw message size */ + H5O_fill_reset, /*free internal memory */ + H5O_fill_free, /* free method */ + H5O_fill_new_shared_delete, /* file delete method */ + H5O_fill_new_shared_link, /* link method */ + NULL, /* set share method */ + NULL, /*can share method */ + H5O_fill_pre_copy_file, /* pre copy native value to file */ + H5O_fill_new_shared_copy_file, /* copy native value to file */ + H5O_fill_new_shared_post_copy_file, /* post copy native value to file */ + NULL, /* get creation index */ + NULL, /* set creation index */ + H5O_fill_new_shared_debug /*debug the message */ }}; +/* Format version bounds for fill value */ +const unsigned H5O_fill_ver_bounds[] = { + H5O_FILL_VERSION_1, /* H5F_LIBVER_EARLIEST */ + H5O_FILL_VERSION_2, /* H5F_LIBVER_V18 */ + H5O_FILL_VERSION_LATEST /* H5F_LIBVER_LATEST */ +}; + /* Masks, shift values & flags for fill value message */ #define H5O_FILL_MASK_ALLOC_TIME 0x03 #define H5O_FILL_SHIFT_ALLOC_TIME 0 @@ -171,11 +180,11 @@ H5FL_BLK_EXTERN(type_conv); * Function: H5O_fill_new_decode * * Purpose: Decode a new fill value message. The new fill value - * message is fill value plus space allocation time and - * fill value writing time and whether fill value is defined. + * message is fill value plus space allocation time and + * fill value writing time and whether fill value is defined. * - * Return: Success: Ptr to new message in native struct. - * Failure: NULL + * Return: Success: Ptr to new message in native struct. + * Failure: NULL * * Programmer: Raymond Lu * Feb 26, 2002 @@ -184,7 +193,8 @@ H5FL_BLK_EXTERN(type_conv); */ static void * H5O_fill_new_decode(H5F_t H5_ATTR_UNUSED *f, hid_t H5_ATTR_UNUSED dxpl_id, H5O_t H5_ATTR_UNUSED *open_oh, - unsigned H5_ATTR_UNUSED mesg_flags, unsigned H5_ATTR_UNUSED *ioflags, const uint8_t *p) + unsigned H5_ATTR_UNUSED mesg_flags, unsigned H5_ATTR_UNUSED *ioflags, + size_t H5_ATTR_UNUSED p_size, const uint8_t *p) { H5O_fill_t *fill = NULL; void *ret_value = NULL; /* Return value */ @@ -195,7 +205,7 @@ H5O_fill_new_decode(H5F_t H5_ATTR_UNUSED *f, hid_t H5_ATTR_UNUSED dxpl_id, H5O_t HDassert(p); if(NULL == (fill = H5FL_CALLOC(H5O_fill_t))) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed for fill value message") + HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed for fill value message") /* Version */ fill->version = *p++; @@ -276,7 +286,7 @@ done: if(!ret_value && fill) { if(fill->buf) H5MM_xfree(fill->buf); - fill = H5FL_FREE(H5O_fill_t, fill); + fill = H5FL_FREE(H5O_fill_t, fill); } /* end if */ FUNC_LEAVE_NOAPI(ret_value) @@ -298,7 +308,8 @@ done: */ static void * H5O_fill_old_decode(H5F_t H5_ATTR_UNUSED *f, hid_t H5_ATTR_UNUSED dxpl_id, H5O_t H5_ATTR_UNUSED *open_oh, - unsigned H5_ATTR_UNUSED mesg_flags, unsigned H5_ATTR_UNUSED *ioflags, const uint8_t *p) + unsigned H5_ATTR_UNUSED mesg_flags, unsigned H5_ATTR_UNUSED *ioflags, + size_t H5_ATTR_UNUSED p_size, const uint8_t *p) { H5O_fill_t *fill = NULL; /* Decoded fill value message */ void *ret_value = NULL; /* Return value */ @@ -336,7 +347,7 @@ done: if(!ret_value && fill) { if(fill->buf) H5MM_xfree(fill->buf); - fill = H5FL_FREE(H5O_fill_t, fill); + fill = H5FL_FREE(H5O_fill_t, fill); } /* end if */ FUNC_LEAVE_NOAPI(ret_value) @@ -347,8 +358,8 @@ done: * Function: H5O_fill_new_encode * * Purpose: Encode a new fill value message. The new fill value - * message is fill value plus space allocation time and - * fill value writing time and whether fill value is defined. + * message is fill value plus space allocation time and + * fill value writing time and whether fill value is defined. * * Return: Non-negative on success/Negative on failure * @@ -481,7 +492,7 @@ H5O_fill_old_encode(H5F_t H5_ATTR_UNUSED *f, uint8_t *p, const void *_fill) * whether fill value is defined. * * Return: Success: Ptr to _DEST - * Failure: NULL + * Failure: NULL * * Programmer: Raymond Lu * Feb 26, 2002 @@ -491,16 +502,16 @@ H5O_fill_old_encode(H5F_t H5_ATTR_UNUSED *f, uint8_t *p, const void *_fill) static void * H5O_fill_copy(const void *_src, void *_dst) { - const H5O_fill_t *src = (const H5O_fill_t *)_src; - H5O_fill_t *dst = (H5O_fill_t *)_dst; - void *ret_value = NULL; /* Return value */ + const H5O_fill_t *src = (const H5O_fill_t *)_src; + H5O_fill_t *dst = (H5O_fill_t *)_dst; + void *ret_value = NULL; /* Return value */ FUNC_ENTER_NOAPI_NOINIT HDassert(src); if(!dst && NULL == (dst = H5FL_MALLOC(H5O_fill_t))) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed for fill message") + HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed for fill message") /* Shallow copy basic fields */ *dst = *src; @@ -516,9 +527,9 @@ H5O_fill_copy(const void *_src, void *_dst) /* Copy fill value and its size */ if(src->buf) { H5_CHECK_OVERFLOW(src->size, ssize_t, size_t); - if(NULL == (dst->buf = H5MM_malloc((size_t)src->size))) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed for fill value") - HDmemcpy(dst->buf, src->buf, (size_t)src->size); + if(NULL == (dst->buf = H5MM_malloc((size_t)src->size))) + HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed for fill value") + HDmemcpy(dst->buf, src->buf, (size_t)src->size); /* Check for needing to convert/copy fill value */ if(src->type) { @@ -579,9 +590,9 @@ done: if(!ret_value && dst) { if(dst->buf) H5MM_xfree(dst->buf); - if(dst->type) + if(dst->type) H5T_close(dst->type); - if(!_dst) + if(!_dst) dst = H5FL_FREE(H5O_fill_t, dst); } /* end if */ @@ -593,13 +604,13 @@ done: * Function: H5O_fill_new_size * * Purpose: Returns the size of the raw message in bytes not counting the - * message type or size fields, but only the data fields. This - * function doesn't take into account alignment. The new fill - * value message is fill value plus space allocation time and - * fill value writing time and whether fill value is defined. + * message type or size fields, but only the data fields. This + * function doesn't take into account alignment. The new fill + * value message is fill value plus space allocation time and + * fill value writing time and whether fill value is defined. * * Return: Success: Message data size in bytes w/o alignment. - * Failure: 0 + * Failure: 0 * * Programmer: Raymond Lu * Feb 26, 2002 @@ -609,8 +620,8 @@ done: static size_t H5O_fill_new_size(const H5F_t H5_ATTR_UNUSED *f, const void *_fill) { - const H5O_fill_t *fill = (const H5O_fill_t *)_fill; - size_t ret_value = 0; /* Return value */ + const H5O_fill_t *fill = (const H5O_fill_t *)_fill; + size_t ret_value = 0; /* Return value */ FUNC_ENTER_NOAPI_NOINIT_NOERR @@ -721,8 +732,8 @@ H5O_fill_reset_dyn(H5O_fill_t *fill) } /* end if */ fill->size = 0; if(fill->type) { - H5T_close(fill->type); - fill->type = NULL; + H5T_close(fill->type); + fill->type = NULL; } /* end if */ done: @@ -792,6 +803,42 @@ H5O_fill_free(void *fill) /*------------------------------------------------------------------------- + * Function: H5O_fill_pre_copy_file + * + * Purpose: Perform any necessary actions before copying message between + * files. + * + * Return: Success: Non-negative + * Failure: Negative + * + * Programmer: Vailin Choi; Dec 2017 + * + *------------------------------------------------------------------------- + */ +static herr_t +H5O_fill_pre_copy_file(H5F_t H5_ATTR_UNUSED *file_src, const void *mesg_src, + hbool_t H5_ATTR_UNUSED *deleted, const H5O_copy_t *cpy_info, void H5_ATTR_UNUSED *udata) +{ + const H5O_fill_t *fill_src = (const H5O_fill_t *)mesg_src; /* Source fill value */ + herr_t ret_value = SUCCEED; /* Return value */ + + FUNC_ENTER_NOAPI_NOINIT + + /* check args */ + HDassert(cpy_info); + HDassert(cpy_info->file_dst); + + /* Check to ensure that the version of the message to be copied does not exceed + the message version allowed by the destination file's high bound */ + if(fill_src->version > H5O_fill_ver_bounds[H5F_HIGH_BOUND(cpy_info->file_dst)]) + HGOTO_ERROR(H5E_OHDR, H5E_BADRANGE, FAIL, "fill value message version out of bounds") + +done: + FUNC_LEAVE_NOAPI(ret_value) +} /* end H5O_fill_pre_copy_file() */ + + +/*------------------------------------------------------------------------- * Function: H5O_fill_debug * * Purpose: Prints debugging info for the message. @@ -883,11 +930,11 @@ H5O_fill_debug(H5F_t H5_ATTR_UNUSED *f, hid_t H5_ATTR_UNUSED dxpl_id, const void "Size:", fill->size); HDfprintf(stream, "%*s%-*s ", indent, "", fwidth, "Data type:"); if(fill->type) { - H5T_debug(fill->type, stream); - fprintf(stream, "\n"); + H5T_debug(fill->type, stream); + HDfprintf(stream, "\n"); } /* end if */ else - fprintf(stream, "\n"); + HDfprintf(stream, "\n"); FUNC_LEAVE_NOAPI(SUCCEED) } /* end H5O_fill_debug() */ @@ -897,9 +944,9 @@ H5O_fill_debug(H5F_t H5_ATTR_UNUSED *f, hid_t H5_ATTR_UNUSED dxpl_id, const void * Function: H5O_fill_convert * * Purpose: Convert a fill value from whatever data type it currently has - * to the specified dataset type. The `type' field of the fill - * value struct will be set to NULL to indicate that it has the - * same type as the dataset. + * to the specified dataset type. The `type' field of the fill + * value struct will be set to NULL to indicate that it has the + * same type as the dataset. * * Return: Non-negative on success/Negative on failure * @@ -925,21 +972,21 @@ H5O_fill_convert(H5O_fill_t *fill, H5T_t *dset_type, hbool_t *fill_changed, hid_ /* No-op cases */ if(!fill->buf || !fill->type || 0 == H5T_cmp(fill->type, dset_type, FALSE)) { /* Don't need datatype for fill value */ - if(fill->type) + if(fill->type) H5T_close(fill->type); - fill->type = NULL; + fill->type = NULL; /* Note that the fill value info has changed */ *fill_changed = TRUE; - HGOTO_DONE(SUCCEED); + HGOTO_DONE(SUCCEED); } /* end if */ /* * Can we convert between source and destination data types? */ if(NULL == (tpath = H5T_path_find(fill->type, dset_type, NULL, NULL, dxpl_id, FALSE))) - HGOTO_ERROR(H5E_OHDR, H5E_CANTINIT, FAIL, "unable to convert between src and dst datatypes") + HGOTO_ERROR(H5E_OHDR, H5E_CANTINIT, FAIL, "unable to convert between src and dst datatypes") /* Don't bother doing anything if there will be no actual conversion */ if(!H5T_path_noop(tpath)) { @@ -997,28 +1044,39 @@ done: /*------------------------------------------------------------------------- - * Function: H5O_fill_set_latest_version + * Function: H5O_fill_set_version * - * Purpose: Set the encoding for a fill value to the latest version. + * Purpose: Set the version to encode a fill value with. * - * Return: Non-negative on success/Negative on failure + * Return: Non-negative on success/Negative on failure * - * Programmer: Quincey Koziol - * Tuesday, July 24, 2007 + * Programmer: Vailin Choi; December 2017 * *------------------------------------------------------------------------- */ herr_t -H5O_fill_set_latest_version(H5O_fill_t *fill) +H5O_fill_set_version(H5F_t *f, H5O_fill_t *fill) { - FUNC_ENTER_NOAPI_NOINIT_NOERR + unsigned version; /* Message version */ + herr_t ret_value = SUCCEED; /* Return value */ + + FUNC_ENTER_NOAPI(FAIL) /* Sanity check */ + HDassert(f); HDassert(fill); - /* Set encoding of fill value to latest version */ - fill->version = H5O_FILL_VERSION_LATEST; + /* Upgrade to the version indicated by the file's low bound if higher */ + version = MAX(fill->version, H5O_fill_ver_bounds[H5F_LOW_BOUND(f)]); - FUNC_LEAVE_NOAPI(SUCCEED) -} /* end H5O_fill_set_latest_version() */ + /* Version bounds check */ + if(version > H5O_fill_ver_bounds[H5F_HIGH_BOUND(f)]) + HGOTO_ERROR(H5E_OHDR, H5E_BADRANGE, FAIL, "Filter pipeline version out of bounds") + + /* Set the message version */ + fill->version = version; + +done: + FUNC_LEAVE_NOAPI(ret_value) +} /* end H5O_fill_set_version() */ diff --git a/src/H5Ofsinfo.c b/src/H5Ofsinfo.c index 4d62f49..8369ae1 100644 --- a/src/H5Ofsinfo.c +++ b/src/H5Ofsinfo.c @@ -32,7 +32,8 @@ #include "H5Opkg.h" /* Object headers */ /* PRIVATE PROTOTYPES */ -static void *H5O_fsinfo_decode(H5F_t *f, hid_t dxpl_id, H5O_t *open_oh, unsigned mesg_flags, unsigned *ioflags, const uint8_t *p); +static void *H5O_fsinfo_decode(H5F_t *f, hid_t dxpl_id, H5O_t *open_oh, unsigned mesg_flags, + unsigned *ioflags, size_t p_size, const uint8_t *p); static herr_t H5O_fsinfo_encode(H5F_t *f, hbool_t disable_shared, uint8_t *p, const void *_mesg); static void *H5O_fsinfo_copy(const void *_mesg, void *_dest); static size_t H5O_fsinfo_size(const H5F_t *f, hbool_t disable_shared, const void *_mesg); @@ -86,7 +87,8 @@ H5FL_DEFINE_STATIC(H5O_fsinfo_t); */ static void * H5O_fsinfo_decode(H5F_t *f, hid_t H5_ATTR_UNUSED dxpl_id, H5O_t H5_ATTR_UNUSED *open_oh, - unsigned H5_ATTR_UNUSED mesg_flags, unsigned H5_ATTR_UNUSED *ioflags, const uint8_t *p) + unsigned H5_ATTR_UNUSED mesg_flags, unsigned H5_ATTR_UNUSED *ioflags, + size_t H5_ATTR_UNUSED p_size, const uint8_t *p) { H5O_fsinfo_t *fsinfo = NULL; /* File space info message */ H5F_mem_page_t ptype; /* Memory type for iteration */ diff --git a/src/H5Oginfo.c b/src/H5Oginfo.c index 468e07a..e551f28 100644 --- a/src/H5Oginfo.c +++ b/src/H5Oginfo.c @@ -33,7 +33,7 @@ /* PRIVATE PROTOTYPES */ static void *H5O_ginfo_decode(H5F_t *f, hid_t dxpl_id, H5O_t *open_oh, - unsigned mesg_flags, unsigned *ioflags, const uint8_t *p); + unsigned mesg_flags, unsigned *ioflags, size_t p_size, const uint8_t *p); static herr_t H5O_ginfo_encode(H5F_t *f, hbool_t disable_shared, uint8_t *p, const void *_mesg); static void *H5O_ginfo_copy(const void *_mesg, void *_dest); static size_t H5O_ginfo_size(const H5F_t *f, hbool_t disable_shared, const void *_mesg); @@ -95,7 +95,8 @@ H5FL_DEFINE_STATIC(H5O_ginfo_t); */ static void * H5O_ginfo_decode(H5F_t H5_ATTR_UNUSED *f, hid_t H5_ATTR_UNUSED dxpl_id, H5O_t H5_ATTR_UNUSED *open_oh, - unsigned H5_ATTR_UNUSED mesg_flags, unsigned H5_ATTR_UNUSED *ioflags, const uint8_t *p) + unsigned H5_ATTR_UNUSED mesg_flags, unsigned H5_ATTR_UNUSED *ioflags, + size_t H5_ATTR_UNUSED p_size, const uint8_t *p) { H5O_ginfo_t *ginfo = NULL; /* Pointer to group information message */ unsigned char flags; /* Flags for encoding group info */ diff --git a/src/H5Oint.c b/src/H5Oint.c index 6ab5393..08eb28d 100644 --- a/src/H5Oint.c +++ b/src/H5Oint.c @@ -131,6 +131,13 @@ const H5O_msg_class_t *const H5O_msg_class_g[] = { #endif /* H5O_ENABLE_BOGUS */ }; +/* Format version bounds for object header */ +const unsigned H5O_obj_ver_bounds[] = { + H5O_VERSION_1, /* H5F_LIBVER_EARLIEST */ + H5O_VERSION_2, /* H5F_LIBVER_V18 */ + H5O_VERSION_LATEST /* H5F_LIBVER_LATEST */ +}; + /* Declare a free list to manage the H5O_t struct */ H5FL_DEFINE(H5O_t); @@ -203,6 +210,53 @@ H5O__init_package(void) /*------------------------------------------------------------------------- + * Function: H5O_set_version + * + * Purpose: Sets the correct version to encode the object header. + * Chooses the oldest version possible, unless the file's + * low bound indicates otherwise. + * + * Return: Success: Non-negative + * Failure: Negative + * + * Programmer: Vailin Choi; December 2017 + * + *------------------------------------------------------------------------- + */ +static herr_t +H5O_set_version(H5F_t *f, H5O_t *oh, uint8_t oh_flags, hbool_t store_msg_crt_idx) +{ + uint8_t version; /* Message version */ + herr_t ret_value = SUCCEED; /* Return value */ + + FUNC_ENTER_NOAPI(FAIL) + + /* check arguments */ + HDassert(f); + HDassert(oh); + + /* Set the correct version to encode object header with */ + if(store_msg_crt_idx || (oh_flags & H5O_HDR_ATTR_CRT_ORDER_TRACKED)) + version = H5O_VERSION_LATEST; + else + version = H5O_VERSION_1; + + /* Upgrade to the version indicated by the file's low bound if higher */ + version = MAX(version, (uint8_t)H5O_obj_ver_bounds[H5F_LOW_BOUND(f)]); + + /* Version bounds check */ + if(version > H5O_obj_ver_bounds[H5F_HIGH_BOUND(f)]) + HGOTO_ERROR(H5E_OHDR, H5E_BADRANGE, FAIL, "object header version out of bounds") + + /* Set the message version */ + oh->version = version; + +done: + FUNC_LEAVE_NOAPI(ret_value) +} /* end H5O_set_version() */ + + +/*------------------------------------------------------------------------- * Function: H5O_create * * Purpose: Creates a new object header. Allocates space for it and @@ -263,10 +317,10 @@ H5O_create(H5F_t *f, hid_t dxpl_id, size_t size_hint, size_t initial_rc, /* Initialize file-specific information for object header */ store_msg_crt_idx = H5F_STORE_MSG_CRT_IDX(f); - if(H5F_USE_LATEST_FLAGS(f, H5F_LATEST_OBJ_HEADER) || store_msg_crt_idx || (oh_flags & H5O_HDR_ATTR_CRT_ORDER_TRACKED)) - oh->version = H5O_VERSION_LATEST; - else - oh->version = H5O_VERSION_1; + + if(H5O_set_version(f, oh, oh_flags, store_msg_crt_idx) < 0) + HGOTO_ERROR(H5E_OHDR, H5E_CANTSET, FAIL, "can't set version of objecdt header") + oh->sizeof_size = H5F_SIZEOF_SIZE(f); oh->sizeof_addr = H5F_SIZEOF_ADDR(f); oh->swmr_write = !!(H5F_INTENT(f) & H5F_ACC_SWMR_WRITE); diff --git a/src/H5Olinfo.c b/src/H5Olinfo.c index cac4ed1..9917927 100644 --- a/src/H5Olinfo.c +++ b/src/H5Olinfo.c @@ -37,7 +37,7 @@ /* PRIVATE PROTOTYPES */ static void *H5O_linfo_decode(H5F_t *f, hid_t dxpl_id, H5O_t *open_oh, - unsigned mesg_flags, unsigned *ioflags, const uint8_t *p); + unsigned mesg_flags, unsigned *ioflags, size_t p_size, const uint8_t *p); static herr_t H5O_linfo_encode(H5F_t *f, hbool_t disable_shared, uint8_t *p, const void *_mesg); static void *H5O_linfo_copy(const void *_mesg, void *_dest); static size_t H5O_linfo_size(const H5F_t *f, hbool_t disable_shared, const void *_mesg); @@ -114,7 +114,8 @@ H5FL_DEFINE_STATIC(H5O_linfo_t); */ static void * H5O_linfo_decode(H5F_t *f, hid_t H5_ATTR_UNUSED dxpl_id, H5O_t H5_ATTR_UNUSED *open_oh, - unsigned H5_ATTR_UNUSED mesg_flags, unsigned H5_ATTR_UNUSED *ioflags, const uint8_t *p) + unsigned H5_ATTR_UNUSED mesg_flags, unsigned H5_ATTR_UNUSED *ioflags, + size_t H5_ATTR_UNUSED p_size, const uint8_t *p) { H5O_linfo_t *linfo = NULL; /* Link info */ unsigned char index_flags; /* Flags for encoding link index info */ diff --git a/src/H5Olink.c b/src/H5Olink.c index 77872ad..7e7885c 100644 --- a/src/H5Olink.c +++ b/src/H5Olink.c @@ -39,7 +39,7 @@ /* PRIVATE PROTOTYPES */ static void *H5O_link_decode(H5F_t *f, hid_t dxpl_id, H5O_t *open_oh, - unsigned mesg_flags, unsigned *ioflags, const uint8_t *p); + unsigned mesg_flags, unsigned *ioflags, size_t p_size, const uint8_t *p); static herr_t H5O_link_encode(H5F_t *f, hbool_t disable_shared, uint8_t *p, const void *_mesg); static void *H5O_link_copy(const void *_mesg, void *_dest); static size_t H5O_link_size(const H5F_t *f, hbool_t disable_shared, const void *_mesg); @@ -118,7 +118,8 @@ H5FL_DEFINE_STATIC(H5O_link_t); */ static void * H5O_link_decode(H5F_t *f, hid_t H5_ATTR_UNUSED dxpl_id, H5O_t H5_ATTR_UNUSED *open_oh, - unsigned H5_ATTR_UNUSED mesg_flags, unsigned H5_ATTR_UNUSED *ioflags, const uint8_t *p) + unsigned H5_ATTR_UNUSED mesg_flags, unsigned H5_ATTR_UNUSED *ioflags, + size_t H5_ATTR_UNUSED p_size, const uint8_t *p) { H5O_link_t *lnk = NULL; /* Pointer to link message */ size_t len = 0; /* Length of a string in the message */ diff --git a/src/H5Omessage.c b/src/H5Omessage.c index 158701b..809c6e9 100644 --- a/src/H5Omessage.c +++ b/src/H5Omessage.c @@ -1811,7 +1811,7 @@ done: */ void * H5O_msg_decode(H5F_t *f, hid_t dxpl_id, H5O_t *open_oh, unsigned type_id, - const unsigned char *buf) + size_t buf_size, const unsigned char *buf) { const H5O_msg_class_t *type; /* Actual H5O class type for the ID */ unsigned ioflags = 0; /* Flags for decode routine */ @@ -1826,7 +1826,7 @@ H5O_msg_decode(H5F_t *f, hid_t dxpl_id, H5O_t *open_oh, unsigned type_id, HDassert(type); /* decode */ - if((ret_value = (type->decode)(f, dxpl_id, open_oh, 0, &ioflags, buf)) == NULL) + if((ret_value = (type->decode)(f, dxpl_id, open_oh, 0, &ioflags, buf_size, buf)) == NULL) HGOTO_ERROR(H5E_OHDR, H5E_CANTDECODE, NULL, "unable to decode message") done: diff --git a/src/H5Omtime.c b/src/H5Omtime.c index 7e7baea..47bc0b1 100644 --- a/src/H5Omtime.c +++ b/src/H5Omtime.c @@ -28,12 +28,12 @@ static void *H5O_mtime_new_decode(H5F_t *f, hid_t dxpl_id, H5O_t *open_oh, - unsigned mesg_flags, unsigned *ioflags, const uint8_t *p); + unsigned mesg_flags, unsigned *ioflags, size_t p_size, const uint8_t *p); static herr_t H5O_mtime_new_encode(H5F_t *f, hbool_t disable_shared, uint8_t *p, const void *_mesg); static size_t H5O_mtime_new_size(const H5F_t *f, hbool_t disable_shared, const void *_mesg); static void *H5O_mtime_decode(H5F_t *f, hid_t dxpl_id, H5O_t *open_oh, - unsigned mesg_flags, unsigned *ioflags, const uint8_t *p); + unsigned mesg_flags, unsigned *ioflags, size_t p_size, const uint8_t *p); static herr_t H5O_mtime_encode(H5F_t *f, hbool_t disable_shared, uint8_t *p, const void *_mesg); static void *H5O_mtime_copy(const void *_mesg, void *_dest); static size_t H5O_mtime_size(const H5F_t *f, hbool_t disable_shared, const void *_mesg); @@ -119,7 +119,8 @@ H5FL_DEFINE(time_t); */ static void * H5O_mtime_new_decode(H5F_t H5_ATTR_UNUSED *f, hid_t H5_ATTR_UNUSED dxpl_id, H5O_t H5_ATTR_UNUSED *open_oh, - unsigned H5_ATTR_UNUSED mesg_flags, unsigned H5_ATTR_UNUSED *ioflags, const uint8_t *p) + unsigned H5_ATTR_UNUSED mesg_flags, unsigned H5_ATTR_UNUSED *ioflags, + size_t H5_ATTR_UNUSED p_size, const uint8_t *p) { time_t *mesg; uint32_t tmp_time; /* Temporary copy of the time */ @@ -175,7 +176,8 @@ done: */ static void * H5O_mtime_decode(H5F_t H5_ATTR_UNUSED *f, hid_t H5_ATTR_UNUSED dxpl_id, H5O_t H5_ATTR_UNUSED *open_oh, - unsigned H5_ATTR_UNUSED mesg_flags, unsigned H5_ATTR_UNUSED *ioflags, const uint8_t *p) + unsigned H5_ATTR_UNUSED mesg_flags, unsigned H5_ATTR_UNUSED *ioflags, + size_t H5_ATTR_UNUSED p_size, const uint8_t *p) { time_t *mesg, the_time; struct tm tm; diff --git a/src/H5Oname.c b/src/H5Oname.c index 6292883..627a0f5 100644 --- a/src/H5Oname.c +++ b/src/H5Oname.c @@ -33,7 +33,7 @@ /* PRIVATE PROTOTYPES */ static void *H5O_name_decode(H5F_t *f, hid_t dxpl_id, H5O_t *open_oh, - unsigned mesg_flags, unsigned *ioflags, const uint8_t *p); + unsigned mesg_flags, unsigned *ioflags, size_t p_size, const uint8_t *p); static herr_t H5O_name_encode(H5F_t *f, hbool_t disable_shared, uint8_t *p, const void *_mesg); static void *H5O_name_copy(const void *_mesg, void *_dest); static size_t H5O_name_size(const H5F_t *f, hbool_t disable_shared, const void *_mesg); @@ -84,7 +84,8 @@ const H5O_msg_class_t H5O_MSG_NAME[1] = {{ */ static void * H5O_name_decode(H5F_t H5_ATTR_UNUSED *f, hid_t H5_ATTR_UNUSED dxpl_id, H5O_t H5_ATTR_UNUSED *open_oh, - unsigned H5_ATTR_UNUSED mesg_flags, unsigned H5_ATTR_UNUSED *ioflags, const uint8_t *p) + unsigned H5_ATTR_UNUSED mesg_flags, unsigned H5_ATTR_UNUSED *ioflags, + size_t H5_ATTR_UNUSED p_size, const uint8_t *p) { H5O_name_t *mesg; void *ret_value = NULL; /* Return value */ diff --git a/src/H5Opkg.h b/src/H5Opkg.h index 109d273..e970406 100644 --- a/src/H5Opkg.h +++ b/src/H5Opkg.h @@ -63,8 +63,8 @@ ) #define H5O_ALIGN_OH(O, X) \ H5O_ALIGN_VERS((O)->version, X) -#define H5O_ALIGN_F(F, X) \ - H5O_ALIGN_VERS((H5F_USE_LATEST_FLAGS(F, H5F_LATEST_OBJ_HEADER) ? H5O_VERSION_LATEST : H5O_VERSION_1), X) +#define H5O_ALIGN_F(F, X) \ + H5O_ALIGN_VERS(MAX(H5O_VERSION_1, (uint8_t)H5O_obj_ver_bounds[H5F_LOW_BOUND(F)]), X) /* Size of checksum (on disk) */ #define H5O_SIZEOF_CHKSUM 4 @@ -136,7 +136,7 @@ #define H5O_SIZEOF_MSGHDR_OH(O) \ H5O_SIZEOF_MSGHDR_VERS((O)->version, (O)->flags & H5O_HDR_ATTR_CRT_ORDER_TRACKED) #define H5O_SIZEOF_MSGHDR_F(F, C) \ - H5O_SIZEOF_MSGHDR_VERS((H5F_USE_LATEST_FLAGS(F, H5F_LATEST_OBJ_HEADER) || H5F_STORE_MSG_CRT_IDX(F)) ? H5O_VERSION_LATEST : H5O_VERSION_1, (C)) + H5O_SIZEOF_MSGHDR_VERS(MAX((H5F_STORE_MSG_CRT_IDX(F) ? H5O_VERSION_LATEST : H5O_VERSION_1), (uint8_t)H5O_obj_ver_bounds[H5F_LOW_BOUND(F)]), (C)) /* * Size of chunk "header" for each chunk @@ -186,7 +186,7 @@ \ /* Decode the message */ \ HDassert(msg_type->decode); \ - if(NULL == ((MSG)->native = (msg_type->decode)((F), (DXPL), (OH), (MSG)->flags, &ioflags, (MSG)->raw))) \ + if(NULL == ((MSG)->native = (msg_type->decode)((F), (DXPL), (OH), (MSG)->flags, &ioflags, (MSG)->raw_size, (MSG)->raw))) \ HGOTO_ERROR(H5E_OHDR, H5E_CANTDECODE, ERR, "unable to decode message") \ \ /* Mark the message dirty if it was changed by decoding */ \ @@ -228,7 +228,7 @@ struct H5O_msg_class_t { const char *name; /*for debugging */ size_t native_size; /*size of native message */ unsigned share_flags; /* Message sharing settings */ - void *(*decode)(H5F_t *, hid_t, H5O_t *, unsigned, unsigned *, const uint8_t *); + void *(*decode)(H5F_t *, hid_t, H5O_t *, unsigned, unsigned *, size_t, const uint8_t *); herr_t (*encode)(H5F_t *, hbool_t, uint8_t *, const void *); void *(*copy)(const void *, void *); /*copy native value */ size_t (*raw_size)(const H5F_t *, hbool_t, const void *);/*sizeof encoded message */ @@ -556,7 +556,6 @@ H5_DLLVAR const H5O_obj_class_t H5O_OBJ_DATASET[1]; /* Datatype Object. (H5O_TYPE_NAMED_DATATYPE - 2) */ H5_DLLVAR const H5O_obj_class_t H5O_OBJ_DATATYPE[1]; - /* Package-local function prototypes */ H5_DLL herr_t H5O_msg_flush(H5F_t *f, H5O_t *oh, H5O_mesg_t *mesg); H5_DLL herr_t H5O_flush_msgs(H5F_t *f, H5O_t *oh); @@ -642,6 +641,14 @@ H5_DLL herr_t H5O_attr_link(H5F_t *f, hid_t dxpl_id, H5O_t *open_oh, void *_mesg H5_DLL herr_t H5O_attr_count_real(H5F_t *f, hid_t dxpl_id, H5O_t *oh, hsize_t *nattrs); +/* Arrays of versions for: + Object header, Attribute/Fill value/Filter pipeline messages */ +/* Layout/Datatype/Dataspace arrays of versions are in H5Dpkg.h, H5Tpkg.h and H5Spkg.h */ +H5_DLLVAR const unsigned H5O_obj_ver_bounds[H5F_LIBVER_NBOUNDS]; +H5_DLLVAR const unsigned H5O_attr_ver_bounds[H5F_LIBVER_NBOUNDS]; +H5_DLLVAR const unsigned H5O_fill_ver_bounds[H5F_LIBVER_NBOUNDS]; +H5_DLLVAR const unsigned H5O_pline_ver_bounds[H5F_LIBVER_NBOUNDS]; + /* Testing functions */ #ifdef H5O_TESTING H5_DLL htri_t H5O_is_attr_empty_test(hid_t oid); diff --git a/src/H5Opline.c b/src/H5Opline.c index 2e52dbb..e59e192 100644 --- a/src/H5Opline.c +++ b/src/H5Opline.c @@ -34,7 +34,7 @@ /* PRIVATE PROTOTYPES */ static herr_t H5O_pline_encode(H5F_t *f, uint8_t *p, const void *mesg); static void *H5O_pline_decode(H5F_t *f, hid_t dxpl_id, H5O_t *open_oh, - unsigned mesg_flags, unsigned *ioflags, const uint8_t *p); + unsigned mesg_flags, unsigned *ioflags, size_t p_size, const uint8_t *p); static void *H5O_pline_copy(const void *_mesg, void *_dest); static size_t H5O_pline_size(const H5F_t *f, const void *_mesg); static herr_t H5O_pline_reset(void *_mesg); @@ -89,6 +89,12 @@ const H5O_msg_class_t H5O_MSG_PLINE[1] = {{ H5O_pline_shared_debug /* debug the message */ }}; +/* Format version bounds for filter pipleline */ +const unsigned H5O_pline_ver_bounds[] = { + H5O_PLINE_VERSION_1, /* H5F_LIBVER_EARLIEST */ + H5O_PLINE_VERSION_2, /* H5F_LIBVER_V18 */ + H5O_PLINE_VERSION_LATEST /* H5F_LIBVER_LATEST */ +}; /* Declare a free list to manage the H5O_pline_t struct */ H5FL_DEFINE(H5O_pline_t); @@ -109,12 +115,14 @@ H5FL_DEFINE(H5O_pline_t); */ static void * H5O_pline_decode(H5F_t H5_ATTR_UNUSED *f, hid_t H5_ATTR_UNUSED dxpl_id, H5O_t H5_ATTR_UNUSED *open_oh, - unsigned H5_ATTR_UNUSED mesg_flags, unsigned H5_ATTR_UNUSED *ioflags, const uint8_t *p) + unsigned H5_ATTR_UNUSED mesg_flags, unsigned H5_ATTR_UNUSED *ioflags, + size_t p_size, const uint8_t *p) { H5O_pline_t *pline = NULL; /* Pipeline message */ H5Z_filter_info_t *filter; /* Filter to decode */ size_t name_length; /* Length of filter name */ size_t i; /* Local index variable */ + const uint8_t *p_end = p + p_size - 1; /* End of the p buffer */ void *ret_value = NULL; /* Return value */ FUNC_ENTER_NOAPI_NOINIT @@ -124,17 +132,24 @@ H5O_pline_decode(H5F_t H5_ATTR_UNUSED *f, hid_t H5_ATTR_UNUSED dxpl_id, H5O_t H5 /* Allocate space for I/O pipeline message */ if(NULL == (pline = H5FL_CALLOC(H5O_pline_t))) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed") + HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed") /* Version */ pline->version = *p++; if(pline->version < H5O_PLINE_VERSION_1 || pline->version > H5O_PLINE_VERSION_LATEST) - HGOTO_ERROR(H5E_PLINE, H5E_CANTLOAD, NULL, "bad version number for filter pipeline message") + HGOTO_ERROR(H5E_PLINE, H5E_CANTLOAD, NULL, "bad version number for filter pipeline message") /* Number of filters */ pline->nused = *p++; - if(pline->nused > H5Z_MAX_NFILTERS) - HGOTO_ERROR(H5E_PLINE, H5E_CANTLOAD, NULL, "filter pipeline message has too many filters") + if(pline->nused > H5Z_MAX_NFILTERS) { + + /* Reset the number of filters used to avoid array traversal in error + * handling code. + */ + pline->nused = 0; + + HGOTO_ERROR(H5E_PLINE, H5E_CANTLOAD, NULL, "filter pipeline message has too many filters") + } /* Reserved */ if(pline->version == H5O_PLINE_VERSION_1) @@ -143,12 +158,12 @@ H5O_pline_decode(H5F_t H5_ATTR_UNUSED *f, hid_t H5_ATTR_UNUSED dxpl_id, H5O_t H5 /* Allocate array for filters */ pline->nalloc = pline->nused; if(NULL == (pline->filter = (H5Z_filter_info_t *)H5MM_calloc(pline->nalloc * sizeof(pline->filter[0])))) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed") + HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed") /* Decode filters */ for(i = 0, filter = &pline->filter[0]; i < pline->nused; i++, filter++) { /* Filter ID */ - UINT16DECODE(p, filter->id); + UINT16DECODE(p, filter->id); /* Length of filter name */ if(pline->version > H5O_PLINE_VERSION_1 && filter->id < H5Z_FILTER_RESERVED) @@ -160,18 +175,18 @@ H5O_pline_decode(H5F_t H5_ATTR_UNUSED *f, hid_t H5_ATTR_UNUSED dxpl_id, H5O_t H5 } /* end if */ /* Filter flags */ - UINT16DECODE(p, filter->flags); + UINT16DECODE(p, filter->flags); /* Number of filter parameters ("client data elements") */ - UINT16DECODE(p, filter->cd_nelmts); + UINT16DECODE(p, filter->cd_nelmts); /* Filter name, if there is one */ - if(name_length) { + if(name_length) { size_t actual_name_length; /* Actual length of name */ /* Determine actual name length (without padding, but with null terminator) */ - actual_name_length = HDstrlen((const char *)p) + 1; - HDassert(actual_name_length <= name_length); + actual_name_length = HDstrlen((const char *)p) + 1; + HDassert(actual_name_length <= name_length); /* Allocate space for the filter name, or use the internal buffer */ if(actual_name_length > H5Z_COMMON_NAME_LEN) { @@ -182,12 +197,12 @@ H5O_pline_decode(H5F_t H5_ATTR_UNUSED *f, hid_t H5_ATTR_UNUSED dxpl_id, H5O_t H5 else filter->name = filter->_name; - HDstrncpy(filter->name, (const char *)p, actual_name_length); - p += name_length; - } /* end if */ + HDstrncpy(filter->name, (const char *)p, actual_name_length); + p += name_length; + } /* end if */ /* Filter parameters */ - if(filter->cd_nelmts) { + if(filter->cd_nelmts) { size_t j; /* Local index variable */ /* Allocate space for the client data elements, or use the internal buffer */ @@ -199,15 +214,20 @@ H5O_pline_decode(H5F_t H5_ATTR_UNUSED *f, hid_t H5_ATTR_UNUSED dxpl_id, H5O_t H5 else filter->cd_values = filter->_cd_values; - /* - * Read the client data values and the padding - */ - for(j = 0; j < filter->cd_nelmts; j++) - UINT32DECODE(p, filter->cd_values[j]); + /* + * Read the client data values and the padding + */ + for (j = 0; j < filter->cd_nelmts; j++) { + if (p + 4 - 1 <= p_end) + UINT32DECODE(p, filter->cd_values[j]) + else + HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "ran off the end of the buffer: current p = %p, p_size = %zu, p_end = %p", p, p_size, p_end) + } + if(pline->version == H5O_PLINE_VERSION_1) if(filter->cd_nelmts % 2) p += 4; /*padding*/ - } /* end if */ + } /* end if */ } /* end for */ /* Set return value */ @@ -496,23 +516,30 @@ H5O_pline_reset(void *mesg) FUNC_ENTER_NOAPI_NOINIT_NOERR + /* NOTE: This function can be called during error processing from + * other API calls so DO NOT ASSUME THAT ANY VALUES ARE SANE. + */ + HDassert(pline); - /* Free information for each filter */ - for(i = 0; i < pline->nused; i++) { - if(pline->filter[i].name && pline->filter[i].name != pline->filter[i]._name) - HDassert((HDstrlen(pline->filter[i].name) + 1) > H5Z_COMMON_NAME_LEN); - if(pline->filter[i].name != pline->filter[i]._name) - pline->filter[i].name = (char *)H5MM_xfree(pline->filter[i].name); - if(pline->filter[i].cd_values && pline->filter[i].cd_values != pline->filter[i]._cd_values) - HDassert(pline->filter[i].cd_nelmts > H5Z_COMMON_CD_VALUES); - if(pline->filter[i].cd_values != pline->filter[i]._cd_values) - pline->filter[i].cd_values = (unsigned *)H5MM_xfree(pline->filter[i].cd_values); - } /* end for */ + /* Free the filter information and array */ + if (pline->filter) { + + /* Free information for each filter */ + for(i = 0; i < pline->nused; i++) { + if(pline->filter[i].name && pline->filter[i].name != pline->filter[i]._name) + HDassert((HDstrlen(pline->filter[i].name) + 1) > H5Z_COMMON_NAME_LEN); + if(pline->filter[i].name != pline->filter[i]._name) + pline->filter[i].name = (char *)H5MM_xfree(pline->filter[i].name); + if(pline->filter[i].cd_values && pline->filter[i].cd_values != pline->filter[i]._cd_values) + HDassert(pline->filter[i].cd_nelmts > H5Z_COMMON_CD_VALUES); + if(pline->filter[i].cd_values != pline->filter[i]._cd_values) + pline->filter[i].cd_values = (unsigned *)H5MM_xfree(pline->filter[i].cd_values); + } /* end for */ - /* Free filter array */ - if(pline->filter) + /* Free filter array */ pline->filter = (H5Z_filter_info_t *)H5MM_xfree(pline->filter); + } /* Reset # of filters */ pline->nused = pline->nalloc = 0; @@ -566,16 +593,23 @@ H5O_pline_free(void *mesg) */ static herr_t H5O_pline_pre_copy_file(H5F_t H5_ATTR_UNUSED *file_src, const void *mesg_src, - hbool_t H5_ATTR_UNUSED *deleted, const H5O_copy_t H5_ATTR_UNUSED *cpy_info, void *_udata) + hbool_t H5_ATTR_UNUSED *deleted, const H5O_copy_t *cpy_info, void *_udata) { - const H5O_pline_t *pline_src = (const H5O_pline_t *)mesg_src; /* Source datatype */ + const H5O_pline_t *pline_src = (const H5O_pline_t *)mesg_src; /* Source pline */ H5O_copy_file_ud_common_t *udata = (H5O_copy_file_ud_common_t *)_udata; /* Object copying user data */ - herr_t ret_value = SUCCEED; /* Return value */ + herr_t ret_value = SUCCEED; /* Return value */ FUNC_ENTER_NOAPI_NOINIT /* check args */ HDassert(pline_src); + HDassert(cpy_info); + HDassert(cpy_info->file_dst); + + /* Check to ensure that the version of the message to be copied does not exceed + the message version allowed by the destination file's high bound */ + if(pline_src->version > H5O_pline_ver_bounds[H5F_HIGH_BOUND(cpy_info->file_dst)]) + HGOTO_ERROR(H5E_OHDR, H5E_BADRANGE, FAIL, "pline message version out of bounds") /* If the user data is non-NULL, assume we are copying a dataset or group * and make a copy of the filter pipeline for later in @@ -664,28 +698,38 @@ H5O_pline_debug(H5F_t H5_ATTR_UNUSED *f, hid_t H5_ATTR_UNUSED dxpl_id, const voi /*------------------------------------------------------------------------- - * Function: H5O_pline_set_latest_version + * Function: H5O_pline_set_version * - * Purpose: Set the encoding for a I/O filter pipeline to the latest version. + * Purpose: Set the version to encode an I/O filter pipeline with. * - * Return: Non-negative on success/Negative on failure + * Return: Non-negative on success/Negative on failure * - * Programmer: Quincey Koziol - * Tuesday, July 24, 2007 + * Programmer: Vailin Choi; December 2017 * *------------------------------------------------------------------------- */ herr_t -H5O_pline_set_latest_version(H5O_pline_t *pline) +H5O_pline_set_version(H5F_t *f, H5O_pline_t *pline) { - FUNC_ENTER_NOAPI_NOINIT_NOERR + unsigned version; /* Message version */ + herr_t ret_value = SUCCEED; /* Return value */ + + FUNC_ENTER_NOAPI(FAIL) /* Sanity check */ + HDassert(f); HDassert(pline); - /* Set encoding of I/O pipeline to latest version */ - pline->version = H5O_PLINE_VERSION_LATEST; + /* Upgrade to the version indicated by the file's low bound if higher */ + version = MAX(pline->version, H5O_pline_ver_bounds[H5F_LOW_BOUND(f)]); - FUNC_LEAVE_NOAPI(SUCCEED) -} /* end H5O_pline_set_latest_version() */ + /* Version bounds check */ + if(version > H5O_pline_ver_bounds[H5F_HIGH_BOUND(f)]) + HGOTO_ERROR(H5E_PLINE, H5E_BADRANGE, FAIL, "Filter pipeline version out of bounds") + /* Set the message version */ + pline->version = version; + +done: + FUNC_LEAVE_NOAPI(ret_value) +} /* end H5O_pline_set_version() */ diff --git a/src/H5Oprivate.h b/src/H5Oprivate.h index 4b74d8f..9f01a9a 100644 --- a/src/H5Oprivate.h +++ b/src/H5Oprivate.h @@ -177,7 +177,12 @@ typedef struct H5O_copy_t { H5SL_t *dst_dt_list; /* Skip list to hold committed datatypes in dest file */ hbool_t dst_dt_list_complete; /* Whether the destination datatype list is complete (i.e. not only populated with "suggestions" from H5Padd_merge_committed_dtype_path) */ H5O_t *oh_dst; /* The destination object header */ - void *shared_fo; /* The shared pointer for the object */ + H5F_t *file_dst; /* The destination file pointer */ + /* This is used in the pre_copy_file callback to obtain + the destination file's high bound. The high bound + is used to index into the corresponding message's + array of versions for doing version bounds check. */ + void *shared_fo; /* The shared pointer for the src object */ H5O_mcdt_search_cb_t mcdt_cb; /* The callback to invoke before searching the global list of committed datatypes at destination */ void *mcdt_ud; /* User data passed to callback */ } H5O_copy_t; @@ -930,7 +935,7 @@ H5_DLL herr_t H5O_msg_get_crt_index(unsigned type_id, const void *mesg, H5_DLL herr_t H5O_msg_encode(H5F_t *f, unsigned type_id, hbool_t disable_shared, unsigned char *buf, const void *obj); H5_DLL void* H5O_msg_decode(H5F_t *f, hid_t dxpl_id, H5O_t *open_oh, - unsigned type_id, const unsigned char *buf); + unsigned type_id, size_t buf_size, const unsigned char *buf); H5_DLL herr_t H5O_msg_delete(H5F_t *f, hid_t dxpl_id, H5O_t *open_oh, unsigned type_id, void *mesg); H5_DLL herr_t H5O_msg_get_flags(const H5O_loc_t *loc, unsigned type_id, hid_t dxpl_id, uint8_t *flags); @@ -967,14 +972,14 @@ H5_DLL hsize_t H5O_efl_total_size(H5O_efl_t *efl); /* Fill value operators */ H5_DLL herr_t H5O_fill_reset_dyn(H5O_fill_t *fill); H5_DLL herr_t H5O_fill_convert(H5O_fill_t *fill, H5T_t *type, hbool_t *fill_changed, hid_t dxpl_id); -H5_DLL herr_t H5O_fill_set_latest_version(H5O_fill_t *fill); +H5_DLL herr_t H5O_fill_set_version(H5F_t * f, H5O_fill_t *fill); /* Link operators */ H5_DLL herr_t H5O_link_delete(H5F_t *f, hid_t dxpl_id, H5O_t *open_oh, void *_mesg); /* Filter pipeline operators */ -H5_DLL herr_t H5O_pline_set_latest_version(H5O_pline_t *pline); +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); diff --git a/src/H5Orefcount.c b/src/H5Orefcount.c index af68417..6f052ce 100644 --- a/src/H5Orefcount.c +++ b/src/H5Orefcount.c @@ -33,7 +33,7 @@ /* PRIVATE PROTOTYPES */ static void *H5O_refcount_decode(H5F_t *f, hid_t dxpl_id, H5O_t *open_oh, - unsigned mesg_flags, unsigned *ioflags, const uint8_t *p); + unsigned mesg_flags, unsigned *ioflags, size_t p_size, const uint8_t *p); static herr_t H5O_refcount_encode(H5F_t *f, hbool_t disable_shared, uint8_t *p, const void *_mesg); static void *H5O_refcount_copy(const void *_mesg, void *_dest); static size_t H5O_refcount_size(const H5F_t *f, hbool_t disable_shared, const void *_mesg); @@ -90,7 +90,8 @@ H5FL_DEFINE_STATIC(H5O_refcount_t); */ static void * H5O_refcount_decode(H5F_t H5_ATTR_UNUSED *f, hid_t H5_ATTR_UNUSED dxpl_id, H5O_t H5_ATTR_UNUSED *open_oh, - unsigned H5_ATTR_UNUSED mesg_flags, unsigned H5_ATTR_UNUSED *ioflags, const uint8_t *p) + unsigned H5_ATTR_UNUSED mesg_flags, unsigned H5_ATTR_UNUSED *ioflags, + size_t H5_ATTR_UNUSED p_size, const uint8_t *p) { H5O_refcount_t *refcount = NULL; /* Reference count */ void *ret_value = NULL; /* Return value */ diff --git a/src/H5Osdspace.c b/src/H5Osdspace.c index 3fe5652..f5d3c61 100644 --- a/src/H5Osdspace.c +++ b/src/H5Osdspace.c @@ -26,7 +26,7 @@ /* PRIVATE PROTOTYPES */ static void *H5O_sdspace_decode(H5F_t *f, hid_t dxpl_id, H5O_t *open_oh, - unsigned mesg_flags, unsigned *ioflags, const uint8_t *p); + unsigned mesg_flags, unsigned *ioflags, size_t p_size, const uint8_t *p); static herr_t H5O_sdspace_encode(H5F_t *f, uint8_t *p, const void *_mesg); static void *H5O_sdspace_copy(const void *_mesg, void *_dest); static size_t H5O_sdspace_size(const H5F_t *f, const void *_mesg); @@ -110,7 +110,8 @@ H5FL_ARR_EXTERN(hsize_t); --------------------------------------------------------------------------*/ static void * H5O_sdspace_decode(H5F_t *f, hid_t H5_ATTR_UNUSED dxpl_id, H5O_t H5_ATTR_UNUSED *open_oh, - unsigned H5_ATTR_UNUSED mesg_flags, unsigned H5_ATTR_UNUSED *ioflags, const uint8_t *p) + unsigned H5_ATTR_UNUSED mesg_flags, unsigned H5_ATTR_UNUSED *ioflags, + size_t H5_ATTR_UNUSED p_size, const uint8_t *p) { H5S_extent_t *sdim = NULL;/* New extent dimensionality structure */ unsigned flags, version; @@ -441,7 +442,7 @@ H5O_sdspace_free(void *mesg) */ static herr_t H5O_sdspace_pre_copy_file(H5F_t H5_ATTR_UNUSED *file_src, const void *mesg_src, - hbool_t H5_ATTR_UNUSED *deleted, const H5O_copy_t H5_ATTR_UNUSED *cpy_info, void *_udata) + hbool_t H5_ATTR_UNUSED *deleted, const H5O_copy_t *cpy_info, void *_udata) { const H5S_extent_t *src_space_extent = (const H5S_extent_t *)mesg_src; /* Source dataspace extent */ H5D_copy_file_ud_t *udata = (H5D_copy_file_ud_t *)_udata; /* Dataset copying user data */ @@ -452,6 +453,13 @@ H5O_sdspace_pre_copy_file(H5F_t H5_ATTR_UNUSED *file_src, const void *mesg_src, /* check args */ HDassert(file_src); HDassert(src_space_extent); + HDassert(cpy_info); + HDassert(cpy_info->file_dst); + + /* Check to ensure that the version of the message to be copied does not exceed + the message version allowed by the destination file's high bound */ + if(src_space_extent->version > H5O_sdspace_ver_bounds[H5F_HIGH_BOUND(cpy_info->file_dst)]) + HGOTO_ERROR(H5E_OHDR, H5E_BADRANGE, FAIL, "dataspace message version out of bounds") /* If the user data is non-NULL, assume we are copying a dataset * and make a copy of the dataspace extent for later in the object copying diff --git a/src/H5Oshared.c b/src/H5Oshared.c index db2d0cc..9217d3d 100644 --- a/src/H5Oshared.c +++ b/src/H5Oshared.c @@ -156,7 +156,7 @@ H5O_shared_read(H5F_t *f, hid_t dxpl_id, H5O_t *open_oh, unsigned *ioflags, HGOTO_ERROR(H5E_OHDR, H5E_CANTLOAD, NULL, "can't read message from fractal heap.") /* Decode the message */ - if(NULL == (ret_value = (type->decode)(f, dxpl_id, open_oh, 0, ioflags, mesg_ptr))) + if(NULL == (ret_value = (type->decode)(f, dxpl_id, open_oh, 0, ioflags, mesg_size, mesg_ptr))) HGOTO_ERROR(H5E_OHDR, H5E_CANTDECODE, NULL, "can't decode shared message.") } /* end if */ else { diff --git a/src/H5Oshared.h b/src/H5Oshared.h index 2465e65..93cc11f 100644 --- a/src/H5Oshared.h +++ b/src/H5Oshared.h @@ -47,7 +47,7 @@ */ static H5_INLINE void * H5O_SHARED_DECODE(H5F_t *f, hid_t dxpl_id, H5O_t *open_oh, unsigned mesg_flags, - unsigned *ioflags, const uint8_t *p) + unsigned *ioflags, size_t p_size, const uint8_t *p) { void *ret_value = NULL; /* Return value */ @@ -67,7 +67,7 @@ H5O_SHARED_DECODE(H5F_t *f, hid_t dxpl_id, H5O_t *open_oh, unsigned mesg_flags, if(mesg_flags & H5O_MSG_FLAG_SHARED) { /* Retrieve native message info indirectly through shared message */ if(NULL == (ret_value = H5O_shared_decode(f, dxpl_id, open_oh, ioflags, p, H5O_SHARED_TYPE))) - HGOTO_ERROR(H5E_OHDR, H5E_CANTDECODE, NULL, "unable to decode shared message") + HGOTO_ERROR(H5E_OHDR, H5E_CANTDECODE, NULL, "unable to decode shared message") /* We currently do not support automatically fixing shared messages */ #ifdef H5_STRICT_FORMAT_CHECKS @@ -79,8 +79,8 @@ H5O_SHARED_DECODE(H5F_t *f, hid_t dxpl_id, H5O_t *open_oh, unsigned mesg_flags, } /* end if */ else { /* Decode native message directly */ - if(NULL == (ret_value = H5O_SHARED_DECODE_REAL(f, dxpl_id, open_oh, mesg_flags, ioflags, p))) - HGOTO_ERROR(H5E_OHDR, H5E_CANTDECODE, NULL, "unable to decode native message") + if(NULL == (ret_value = H5O_SHARED_DECODE_REAL(f, dxpl_id, open_oh, mesg_flags, ioflags, p_size, p))) + HGOTO_ERROR(H5E_OHDR, H5E_CANTDECODE, NULL, "unable to decode native message") } /* end else */ done: diff --git a/src/H5Oshmesg.c b/src/H5Oshmesg.c index 1cbfb05..f3fe9d1 100644 --- a/src/H5Oshmesg.c +++ b/src/H5Oshmesg.c @@ -28,7 +28,7 @@ #include "H5MMprivate.h" /* Memory management */ static void *H5O_shmesg_decode(H5F_t *f, hid_t dxpl_id, H5O_t *open_oh, - unsigned mesg_flags, unsigned *ioflags, const uint8_t *p); + unsigned mesg_flags, unsigned *ioflags, size_t p_size, const uint8_t *p); static herr_t H5O_shmesg_encode(H5F_t *f, hbool_t disable_shared, uint8_t *p, const void *_mesg); static void *H5O_shmesg_copy(const void *_mesg, void *_dest); static size_t H5O_shmesg_size(const H5F_t *f, hbool_t disable_shared, const void *_mesg); @@ -76,7 +76,8 @@ const H5O_msg_class_t H5O_MSG_SHMESG[1] = {{ */ static void * H5O_shmesg_decode(H5F_t *f, hid_t H5_ATTR_UNUSED dxpl_id, H5O_t H5_ATTR_UNUSED *open_oh, - unsigned H5_ATTR_UNUSED mesg_flags, unsigned H5_ATTR_UNUSED *ioflags, const uint8_t *p) + unsigned H5_ATTR_UNUSED mesg_flags, unsigned H5_ATTR_UNUSED *ioflags, + size_t H5_ATTR_UNUSED p_size, const uint8_t *p) { H5O_shmesg_table_t *mesg; /* Native message */ void *ret_value = NULL; /* Return value */ diff --git a/src/H5Ostab.c b/src/H5Ostab.c index 5c840a6..6f02d72 100644 --- a/src/H5Ostab.c +++ b/src/H5Ostab.c @@ -36,7 +36,7 @@ /* PRIVATE PROTOTYPES */ static void *H5O_stab_decode(H5F_t *f, hid_t dxpl_id, H5O_t *open_oh, - unsigned mesg_flags, unsigned *ioflags, const uint8_t *p); + unsigned mesg_flags, unsigned *ioflags, size_t p_size, const uint8_t *p); static herr_t H5O_stab_encode(H5F_t *f, hbool_t disable_shared, uint8_t *p, const void *_mesg); static void *H5O_stab_copy(const void *_mesg, void *_dest); static size_t H5O_stab_size(const H5F_t *f, hbool_t disable_shared, const void *_mesg); @@ -97,7 +97,8 @@ H5FL_DEFINE_STATIC(H5O_stab_t); */ static void * H5O_stab_decode(H5F_t *f, hid_t H5_ATTR_UNUSED dxpl_id, H5O_t H5_ATTR_UNUSED *open_oh, - unsigned H5_ATTR_UNUSED mesg_flags, unsigned H5_ATTR_UNUSED *ioflags, const uint8_t *p) + unsigned H5_ATTR_UNUSED mesg_flags, unsigned H5_ATTR_UNUSED *ioflags, + size_t H5_ATTR_UNUSED p_size, const uint8_t *p) { H5O_stab_t *stab = NULL; void *ret_value = NULL; /* Return value */ diff --git a/src/H5Pdcpl.c b/src/H5Pdcpl.c index a000351..19ec00f 100644 --- a/src/H5Pdcpl.c +++ b/src/H5Pdcpl.c @@ -1116,7 +1116,7 @@ H5P__dcrt_fill_value_dec(const void **_pp, void *_value) dt_size = (size_t)enc_value; /* Decode type */ - if(NULL == (fill->type = H5T_decode(*pp))) + if(NULL == (fill->type = H5T_decode(dt_size, *pp))) HGOTO_ERROR(H5E_PLIST, H5E_CANTDECODE, FAIL, "can't decode fill value datatype") *pp += dt_size; } /* end if */ diff --git a/src/H5Pfapl.c b/src/H5Pfapl.c index a1a7049..13409d2 100644 --- a/src/H5Pfapl.c +++ b/src/H5Pfapl.c @@ -140,11 +140,19 @@ #define H5F_ACS_MULTI_TYPE_DEF H5FD_MEM_DEFAULT #define H5F_ACS_MULTI_TYPE_ENC H5P__facc_multi_type_enc #define H5F_ACS_MULTI_TYPE_DEC H5P__facc_multi_type_dec -/* Definition for 'use latest format version' flag */ -#define H5F_ACS_LATEST_FORMAT_SIZE sizeof(hbool_t) -#define H5F_ACS_LATEST_FORMAT_DEF FALSE -#define H5F_ACS_LATEST_FORMAT_ENC H5P__encode_hbool_t -#define H5F_ACS_LATEST_FORMAT_DEC H5P__decode_hbool_t + +/* Definition for "low" bound of library format versions */ +#define H5F_ACS_LIBVER_LOW_BOUND_SIZE sizeof(H5F_libver_t) +#define H5F_ACS_LIBVER_LOW_BOUND_DEF H5F_LIBVER_EARLIEST +#define H5F_ACS_LIBVER_LOW_BOUND_ENC H5P__facc_libver_type_enc +#define H5F_ACS_LIBVER_LOW_BOUND_DEC H5P__facc_libver_type_dec + +/* Definition for "high" bound of library format versions */ +#define H5F_ACS_LIBVER_HIGH_BOUND_SIZE sizeof(H5F_libver_t) +#define H5F_ACS_LIBVER_HIGH_BOUND_DEF H5F_LIBVER_LATEST +#define H5F_ACS_LIBVER_HIGH_BOUND_ENC H5P__facc_libver_type_enc +#define H5F_ACS_LIBVER_HIGH_BOUND_DEC H5P__facc_libver_type_dec + /* Definition for whether to query the file descriptor from the core VFD * instead of the memory address. (Private to library) */ @@ -288,6 +296,8 @@ static herr_t H5P__facc_fclose_degree_enc(const void *value, void **_pp, size_t static herr_t H5P__facc_fclose_degree_dec(const void **pp, void *value); static herr_t H5P__facc_multi_type_enc(const void *value, void **_pp, size_t *size, void *udata); static herr_t H5P__facc_multi_type_dec(const void **_pp, void *value); +static herr_t H5P__facc_libver_type_enc(const void *value, void **_pp, size_t *size); +static herr_t H5P__facc_libver_type_dec(const void **_pp, void *value); /* Metadata cache log location property callbacks */ static herr_t H5P_facc_mdc_log_location_enc(const void *value, void **_pp, size_t *size, void *udata); @@ -352,7 +362,10 @@ static const hsize_t H5F_def_family_offset_g = H5F_ACS_FAMILY_OFFSET_DEF; static const hsize_t H5F_def_family_newsize_g = H5F_ACS_FAMILY_NEWSIZE_DEF; /* Default size of new files for family VFD */ static const hbool_t H5F_def_family_to_sec2_g = H5F_ACS_FAMILY_TO_SEC2_DEF; /* Default ?? for family VFD */ static const H5FD_mem_t H5F_def_mem_type_g = H5F_ACS_MULTI_TYPE_DEF; /* Default file space type for multi VFD */ -static const hbool_t H5F_def_latest_format_g = H5F_ACS_LATEST_FORMAT_DEF; /* Default setting for "use the latest version of the format" flag */ + +static const H5F_libver_t H5F_def_libver_low_bound_g = H5F_ACS_LIBVER_LOW_BOUND_DEF; /* Default setting for "low" bound of format version */ +static const H5F_libver_t H5F_def_libver_high_bound_g = H5F_ACS_LIBVER_HIGH_BOUND_DEF; /* Default setting for "high" bound of format version */ + static const hbool_t H5F_def_want_posix_fd_g = H5F_ACS_WANT_POSIX_FD_DEF; /* Default setting for retrieving 'handle' from core VFD */ static const unsigned H5F_def_efc_size_g = H5F_ACS_EFC_SIZE_DEF; /* Default external file cache size */ static const H5FD_file_image_info_t H5F_def_file_image_info_g = H5F_ACS_FILE_IMAGE_INFO_DEF; /* Default file image info and callbacks */ @@ -374,7 +387,7 @@ static const size_t H5F_def_page_buf_size_g = H5F_ACS_PAGE_BUFFER_SIZE_DEF; static const unsigned H5F_def_page_buf_min_meta_perc_g = H5F_ACS_PAGE_BUFFER_MIN_META_PERC_DEF; /* Default page buffer minimum metadata size */ static const unsigned H5F_def_page_buf_min_raw_perc_g = H5F_ACS_PAGE_BUFFER_MIN_RAW_PERC_DEF; /* Default page buffer minumum raw data size */ - + /*------------------------------------------------------------------------- * Function: H5P__facc_reg_prop * @@ -491,9 +504,15 @@ H5P__facc_reg_prop(H5P_genclass_t *pclass) NULL, NULL, NULL, NULL) < 0) HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL, "can't insert property into class") - /* Register the 'use the latest version of the format' flag */ - if(H5P_register_real(pclass, H5F_ACS_LATEST_FORMAT_NAME, H5F_ACS_LATEST_FORMAT_SIZE, &H5F_def_latest_format_g, - NULL, NULL, NULL, H5F_ACS_LATEST_FORMAT_ENC, H5F_ACS_LATEST_FORMAT_DEC, + /* Register the 'low' bound of library format versions */ + if(H5P_register_real(pclass, H5F_ACS_LIBVER_LOW_BOUND_NAME, H5F_ACS_LIBVER_LOW_BOUND_SIZE, &H5F_def_libver_low_bound_g, + NULL, NULL, NULL, H5F_ACS_LIBVER_LOW_BOUND_ENC, H5F_ACS_LIBVER_LOW_BOUND_DEC, + NULL, NULL, NULL, NULL) < 0) + HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL, "can't insert property into class") + + /* Register the 'high' bound of library format versions */ + if(H5P_register_real(pclass, H5F_ACS_LIBVER_HIGH_BOUND_NAME, H5F_ACS_LIBVER_HIGH_BOUND_SIZE, &H5F_def_libver_high_bound_g, + NULL, NULL, NULL, H5F_ACS_LIBVER_HIGH_BOUND_ENC, H5F_ACS_LIBVER_HIGH_BOUND_DEC, NULL, NULL, NULL, NULL) < 0) HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL, "can't insert property into class") @@ -608,7 +627,7 @@ done: FUNC_LEAVE_NOAPI(ret_value) } /* end H5P__facc_reg_prop() */ - + /*------------------------------------------------------------------------- * Function: H5Pset_alignment * @@ -666,7 +685,7 @@ done: FUNC_LEAVE_API(ret_value) } - + /*------------------------------------------------------------------------- * Function: H5Pget_alignment * @@ -707,7 +726,7 @@ done: FUNC_LEAVE_API(ret_value) } /* end H5Pget_alignment() */ - + /*------------------------------------------------------------------------- * Function: H5P_set_driver * @@ -755,7 +774,7 @@ done: FUNC_LEAVE_NOAPI(ret_value) } /* end H5P_set_driver() */ - + /*------------------------------------------------------------------------- * Function: H5Pset_driver * @@ -798,7 +817,7 @@ done: FUNC_LEAVE_API(ret_value) } /* end H5Pset_driver() */ - + /*------------------------------------------------------------------------- * Function: H5P_peek_driver * @@ -842,7 +861,7 @@ done: FUNC_LEAVE_NOAPI(ret_value) } /* end H5P_peek_driver() */ - + /*------------------------------------------------------------------------- * Function: H5Pget_driver * @@ -883,7 +902,7 @@ done: FUNC_LEAVE_API(ret_value) } /* end H5Pget_driver() */ - + /*------------------------------------------------------------------------- * Function: H5P_peek_driver_info * @@ -925,7 +944,7 @@ done: FUNC_LEAVE_NOAPI(ret_value) } /* end H5P_peek_driver_info() */ - + /*------------------------------------------------------------------------- * Function: H5Pget_driver_info * @@ -965,7 +984,7 @@ done: FUNC_LEAVE_API(ret_value) } /* end H5Pget_driver_info() */ - + /*------------------------------------------------------------------------- * Function: H5P__file_driver_copy * @@ -1031,7 +1050,7 @@ done: FUNC_LEAVE_NOAPI(ret_value) } /* end H5P__file_driver_copy() */ - + /*------------------------------------------------------------------------- * Function: H5P__file_driver_free * @@ -1083,7 +1102,7 @@ done: FUNC_LEAVE_NOAPI(ret_value) } /* end H5P__file_driver_free() */ - + /*------------------------------------------------------------------------- * Function: H5P__facc_file_driver_create * @@ -1112,7 +1131,7 @@ done: FUNC_LEAVE_NOAPI(ret_value) } /* end H5P__facc_file_driver_create() */ - + /*------------------------------------------------------------------------- * Function: H5P__facc_file_driver_set * @@ -1145,7 +1164,7 @@ done: FUNC_LEAVE_NOAPI(ret_value) } /* end H5P__facc_file_driver_set() */ - + /*------------------------------------------------------------------------- * Function: H5P__facc_file_driver_get * @@ -1178,7 +1197,7 @@ done: FUNC_LEAVE_NOAPI(ret_value) } /* end H5P__facc_file_driver_get() */ - + /*------------------------------------------------------------------------- * Function: H5P__facc_file_driver_del * @@ -1207,7 +1226,7 @@ done: FUNC_LEAVE_NOAPI(ret_value) } /* end H5P__facc_file_driver_del() */ - + /*------------------------------------------------------------------------- * Function: H5P__facc_file_driver_copy * @@ -1236,7 +1255,7 @@ done: FUNC_LEAVE_NOAPI(ret_value) } /* end H5P__facc_file_driver_copy() */ - + /*------------------------------------------------------------------------- * Function: H5P__facc_file_driver_cmp * @@ -1295,7 +1314,7 @@ done: FUNC_LEAVE_NOAPI(ret_value) } /* end H5P__facc_file_driver_cmp() */ - + /*------------------------------------------------------------------------- * Function: H5P__facc_file_driver_close * @@ -1324,7 +1343,7 @@ done: FUNC_LEAVE_NOAPI(ret_value) } /* end H5P__facc_file_driver_close() */ - + /*------------------------------------------------------------------------- * Function: H5Pset_family_offset * @@ -1363,7 +1382,7 @@ done: FUNC_LEAVE_API(ret_value) } /* end H5Pset_family_offset() */ - + /*------------------------------------------------------------------------- * Function: H5Pget_family_offset * @@ -1404,7 +1423,7 @@ done: FUNC_LEAVE_API(ret_value) } /* end H5Pget_family_offset() */ - + /*------------------------------------------------------------------------- * Function: H5Pset_multi_type * @@ -1443,7 +1462,7 @@ done: FUNC_LEAVE_API(ret_value) } /* end H5Pset_multi_type() */ - + /*------------------------------------------------------------------------- * Function: H5Pget_multi_type * @@ -1484,7 +1503,7 @@ done: FUNC_LEAVE_API(ret_value) } /* end H5Pget_multi_type() */ - + /*------------------------------------------------------------------------- * Function: H5Pset_cache * @@ -1538,7 +1557,7 @@ done: FUNC_LEAVE_API(ret_value) } /* end H5Pset_cache() */ - + /*------------------------------------------------------------------------- * Function: H5Pget_cache * @@ -1590,7 +1609,7 @@ done: FUNC_LEAVE_API(ret_value) } /* end H5Pget_cache() */ - + /*------------------------------------------------------------------------- * Function: H5Pset_mdc_image_config * @@ -1634,7 +1653,7 @@ done: FUNC_LEAVE_API(ret_value) } /* H5Pset_mdc_image_config() */ - + /*------------------------------------------------------------------------- * Function: H5Pget_mdc_image_config * @@ -1685,7 +1704,7 @@ done: FUNC_LEAVE_API(ret_value) } /* H5Pget_mdc_image_config() */ - + /*------------------------------------------------------------------------- * Function: H5Pset_mdc_config * @@ -1729,7 +1748,7 @@ done: FUNC_LEAVE_API(ret_value) } /* H5Pset_mdc_config() */ - + /*------------------------------------------------------------------------- * Function: H5Pget_mdc_config * @@ -1780,7 +1799,7 @@ done: FUNC_LEAVE_API(ret_value) } /* H5Pget_mdc_config() */ - + /*------------------------------------------------------------------------- * Function: H5Pset_gc_references * @@ -1833,7 +1852,7 @@ done: FUNC_LEAVE_API(ret_value) } - + /*------------------------------------------------------------------------- * Function: H5Pget_gc_references * @@ -1876,7 +1895,7 @@ done: FUNC_LEAVE_API(ret_value) } - + /*------------------------------------------------------------------------- * Function: H5Pset_fclose_degree * @@ -1912,7 +1931,7 @@ done: FUNC_LEAVE_API(ret_value) } /* end H5Pset_fclose_degree() */ - + /*------------------------------------------------------------------------- * Function: H5Pget_fclose_degree * @@ -1947,7 +1966,7 @@ done: FUNC_LEAVE_API(ret_value) } /* end H5Pget_fclose_degree() */ - + /*------------------------------------------------------------------------- * Function: H5Pset_meta_block_size * @@ -1998,7 +2017,7 @@ done: FUNC_LEAVE_API(ret_value) } - + /*------------------------------------------------------------------------- * Function: H5Pget_meta_block_size * @@ -2042,7 +2061,7 @@ done: FUNC_LEAVE_API(ret_value) } - + /*------------------------------------------------------------------------- * Function: H5Pset_sieve_buf_size * @@ -2093,7 +2112,7 @@ done: FUNC_LEAVE_API(ret_value) } /* end H5Pset_sieve_buf_size() */ - + /*------------------------------------------------------------------------- * Function: H5Pget_sieve_buf_size * @@ -2136,7 +2155,7 @@ done: FUNC_LEAVE_API(ret_value) } /* end H5Pget_sieve_buf_size() */ - + /*------------------------------------------------------------------------- * Function: H5Pset_small_data_block_size * @@ -2182,7 +2201,7 @@ done: FUNC_LEAVE_API(ret_value) } /* end H5Pset_small_data_block_size() */ - + /*------------------------------------------------------------------------- * Function: H5Pget_small_data_block_size * @@ -2221,7 +2240,7 @@ done: FUNC_LEAVE_API(ret_value) } /* end H5Pget_small_data_block_size() */ - + /*------------------------------------------------------------------------- * Function: H5Pset_libver_bounds * @@ -2301,6 +2320,24 @@ done: * releases and then map down to the previous actual library release which * had a format change. * + * Note #3: The enumerated define for H5F_libver_t in 1.10 is: + * typedef enum H5F_libver_t { + * H5F_LIBVER_ERROR = -1, + * H5F_LIBVER_EARLIEST = 0, + * H5F_LIBVER_V18 = 1, + * H5F_LIBVER_V110 = 2, + * H5F_LIBVER_NBOUNDS + * } H5F_libver_t; + * #define H5F_LIBVER_LATEST H5F_LIBVER_V110 + * + * The library supports five pairs of (low, high) combinations via H5Pset_libver_bounds(): + * 1) H5F_LIBVER_EARLIEST, H5F_LIBVER_V18 + * 2) H5F_LIBVER_EARLIEST, H5F_LIBVER_LATEST + * 4) H5F_LIBVER_V18, H5F_LIBVER_V18 + * 4) H5F_LIBVER_V18, H5F_LIBVER_LATEST + * 5) H5F_LIBVER_LATEST, H5F_LIBVER_LATEST + * See detailed description in the RFC: Setting Bounds for Object Creation in HDF5 1.10.0. + * * Return: Non-negative on success/Negative on failure * * Programmer: Quincey Koziol @@ -2309,42 +2346,48 @@ done: *------------------------------------------------------------------------- */ herr_t -H5Pset_libver_bounds(hid_t plist_id, H5F_libver_t low, - H5F_libver_t high) +H5Pset_libver_bounds(hid_t plist_id, H5F_libver_t low, H5F_libver_t high) { H5P_genplist_t *plist; /* Property list pointer */ - hbool_t latest; /* Whether to use the latest version or not */ herr_t ret_value = SUCCEED; /* return value */ FUNC_ENTER_API(FAIL) H5TRACE3("e", "iFvFv", plist_id, low, high); /* Check args */ - /* (Note that this is _really_ restricted right now, we'll want to loosen - * this up more as we add features - QAK) - */ - if(high != H5F_LIBVER_LATEST) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid high library version bound") + if(low < 0 || low > H5F_LIBVER_LATEST) + HGOTO_ERROR(H5E_ARGS, H5E_BADRANGE, FAIL, "low bound is not valid") + + if(high < 0 || high > H5F_LIBVER_LATEST) + HGOTO_ERROR(H5E_ARGS, H5E_BADRANGE, FAIL, "high bound is not valid") + + /* (earliest, earliest), (latest, earliest), (v18, earliest) are not valid combinations */ + if(high == H5F_LIBVER_EARLIEST) + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "Invalid (low,high) combination of library version bound") + + /* (latest, v18) is not valid combination */ + if(high < low) + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "Invalid (low,high) combination of library version bound") /* Get the plist structure */ if(NULL == (plist = H5P_object_verify(plist_id, H5P_FILE_ACCESS))) HGOTO_ERROR(H5E_ATOM, H5E_BADATOM, FAIL, "can't find object for ID") /* Set values */ - latest = (hbool_t)((low == H5F_LIBVER_LATEST) ? TRUE : FALSE); - if(H5P_set(plist, H5F_ACS_LATEST_FORMAT_NAME, &latest) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "can't set library version bounds") - + if(H5P_set(plist, H5F_ACS_LIBVER_LOW_BOUND_NAME, &low) < 0) + HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "can't set low bound for library format versions") + if(H5P_set(plist, H5F_ACS_LIBVER_HIGH_BOUND_NAME, &high) < 0) + HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "can't set high bound for library format versions") done: FUNC_LEAVE_API(ret_value) } /* end H5Pset_libver_bounds() */ - + /*------------------------------------------------------------------------- * Function: H5Pget_libver_bounds * * Purpose: Returns the current settings for the library version format bounds - * from a file access property list. + * from a file access property list. * * Return: Non-negative on success/Negative on failure * @@ -2358,7 +2401,6 @@ H5Pget_libver_bounds(hid_t plist_id, H5F_libver_t *low/*out*/, H5F_libver_t *high/*out*/) { H5P_genplist_t *plist; /* Property list pointer */ - hbool_t latest; /* Whether to use the latest version or not */ herr_t ret_value = SUCCEED; /* return value */ FUNC_ENTER_API(FAIL) @@ -2368,22 +2410,22 @@ H5Pget_libver_bounds(hid_t plist_id, H5F_libver_t *low/*out*/, if(NULL == (plist = H5P_object_verify(plist_id, H5P_FILE_ACCESS))) HGOTO_ERROR(H5E_ATOM, H5E_BADATOM, FAIL, "can't find object for ID") - /* Get value */ - if(H5P_get(plist, H5F_ACS_LATEST_FORMAT_NAME, &latest) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get library version bounds") + /* Get values */ + if(low) { + if(H5P_get(plist, H5F_ACS_LIBVER_LOW_BOUND_NAME, low) < 0) + HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get low bound for library format versions") + } - /* Check for setting values to return */ - /* (Again, this is restricted now, we'll need to open it up later -QAK) */ - if(low) - *low = latest ? H5F_LIBVER_LATEST : H5F_LIBVER_EARLIEST; - if(high) - *high = H5F_LIBVER_LATEST; + if(high) { + if(H5P_get(plist, H5F_ACS_LIBVER_HIGH_BOUND_NAME, high) < 0) + HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get high bound for library format versions") + } done: FUNC_LEAVE_API(ret_value) } /* end H5Pget_libver_bounds() */ - + /*------------------------------------------------------------------------- * Function: H5Pset_elink_file_cache_size * @@ -2421,7 +2463,7 @@ done: FUNC_LEAVE_API(ret_value) } /* end H5Pset_elink_file_cache_size() */ - + /*------------------------------------------------------------------------- * Function: H5Pget_elink_file_cache_size * @@ -2460,7 +2502,7 @@ done: FUNC_LEAVE_API(ret_value) } /* end H5Pget_elink_file_cache_size() */ - + /*------------------------------------------------------------------------- * Function: H5Pset_file_image * @@ -2541,7 +2583,7 @@ done: FUNC_LEAVE_API(ret_value) } /* end H5Pset_file_image() */ - + /*------------------------------------------------------------------------- * Function: H5Pget_file_image * @@ -2630,7 +2672,7 @@ done: FUNC_LEAVE_API(ret_value) } /* end H5Pget_file_image */ - + /*------------------------------------------------------------------------- * Function: H5Pset_file_image_callbacks * @@ -2707,7 +2749,7 @@ done: FUNC_LEAVE_API(ret_value) } /* end H5Pset_file_image_callbacks() */ - + /*------------------------------------------------------------------------- * Function: H5Pget_file_image_callbacks * @@ -2763,7 +2805,7 @@ done: FUNC_LEAVE_API(ret_value) } /* end H5Pget_file_image_callbacks() */ - + /*------------------------------------------------------------------------- * Function: H5P__file_image_info_copy * @@ -2841,7 +2883,7 @@ done: FUNC_LEAVE_NOAPI(ret_value) } /* end H5P__file_image_info_copy() */ - + /*------------------------------------------------------------------------- * Function: H5P__file_image_info_free * @@ -2896,7 +2938,7 @@ done: FUNC_LEAVE_NOAPI(ret_value) } /* end H5P__file_image_info_free() */ - + /*------------------------------------------------------------------------- * Function: H5P__facc_cache_image_config_cmp * @@ -2939,7 +2981,7 @@ done: FUNC_LEAVE_NOAPI(ret_value) } /* end H5P__facc_cache_image_config_cmp() */ - + /*------------------------------------------------------------------------- * Function: H5P__facc_cache_image_config_enc * @@ -2985,7 +3027,7 @@ H5P__facc_cache_image_config_enc(const void *value, void **_pp, size_t *size, vo FUNC_LEAVE_NOAPI(SUCCEED) } /* end H5P__facc_cache_image_config_enc() */ - + /*------------------------------------------------------------------------- * Function: H5P__facc_cache_image_config_dec * @@ -3037,7 +3079,7 @@ done: FUNC_LEAVE_NOAPI(ret_value) } /* end H5P__facc_cache_image_config_dec() */ - + /*------------------------------------------------------------------------- * Function: H5P__facc_file_image_info_set * @@ -3070,7 +3112,7 @@ done: FUNC_LEAVE_NOAPI(ret_value) } /* end H5P__facc_file_image_info_set() */ - + /*------------------------------------------------------------------------- * Function: H5P__facc_file_image_info_get * @@ -3103,7 +3145,7 @@ done: FUNC_LEAVE_NOAPI(ret_value) } /* end H5P__facc_file_image_info_get() */ - + /*------------------------------------------------------------------------- * Function: H5P__facc_file_image_info_del * @@ -3134,7 +3176,7 @@ done: FUNC_LEAVE_NOAPI(ret_value) } /* end H5P__facc_file_image_info_del() */ - + /*------------------------------------------------------------------------- * Function: H5P__facc_file_image_info_copy * @@ -3164,7 +3206,7 @@ done: FUNC_LEAVE_NOAPI(ret_value) } /* end H5P__facc_file_image_info_copy() */ - + /*------------------------------------------------------------------------- * Function: H5P__facc_file_image_info_cmp * @@ -3223,7 +3265,7 @@ done: FUNC_LEAVE_NOAPI(ret_value) } /* end H5P__facc_file_image_info_cmp() */ - + /*------------------------------------------------------------------------- * Function: H5P__facc_file_image_info_close * @@ -3253,7 +3295,7 @@ done: FUNC_LEAVE_NOAPI(ret_value) } /* end H5P__facc_file_image_info_close() */ - + /*------------------------------------------------------------------------- * Function: H5P__facc_cache_config_cmp * @@ -3365,7 +3407,7 @@ done: FUNC_LEAVE_NOAPI(ret_value) } /* end H5P__facc_cache_config_cmp() */ - + /*------------------------------------------------------------------------- * Function: H5P__facc_cache_config_enc * @@ -3510,7 +3552,7 @@ H5P__facc_cache_config_enc(const void *value, void **_pp, size_t *size, void H5_ FUNC_LEAVE_NOAPI(SUCCEED) } /* end H5P__facc_cache_config_enc() */ - + /*------------------------------------------------------------------------- * Function: H5P__facc_cache_config_dec * @@ -3645,7 +3687,7 @@ done: FUNC_LEAVE_NOAPI(ret_value) } /* end H5P__facc_cache_config_dec() */ - + /*------------------------------------------------------------------------- * Function: H5P__facc_fclose_degree_enc * @@ -3683,7 +3725,7 @@ H5P__facc_fclose_degree_enc(const void *value, void **_pp, size_t *size, void H5 FUNC_LEAVE_NOAPI(SUCCEED) } /* end H5P__facc_fclose_degree_enc() */ - + /*------------------------------------------------------------------------- * Function: H5P__facc_fclose_degree_dec * @@ -3718,7 +3760,7 @@ H5P__facc_fclose_degree_dec(const void **_pp, void *_value) FUNC_LEAVE_NOAPI(SUCCEED) } /* end H5P__facc_fclose_degree_dec() */ - + /*------------------------------------------------------------------------- * Function: H5P__facc_multi_type_enc * @@ -3756,7 +3798,7 @@ H5P__facc_multi_type_enc(const void *value, void **_pp, size_t *size, void H5_AT FUNC_LEAVE_NOAPI(SUCCEED) } /* end H5P__facc_multi_type_enc() */ - + /*------------------------------------------------------------------------- * Function: H5P__facc_multi_type_dec * @@ -3791,7 +3833,78 @@ H5P__facc_multi_type_dec(const void **_pp, void *_value) FUNC_LEAVE_NOAPI(SUCCEED) } /* end H5P__facc_multi_type_dec() */ - + +/*------------------------------------------------------------------------- + * Function: H5P__facc_libver_type_enc + * + * Purpose: Callback routine which is called whenever the 'low' or + * 'high' bound of library format versions property in the + * file access property list is encoded. + * + * Return: Success: Non-negative + * Failure: Negative + * + * Programmer + * + *------------------------------------------------------------------------- + */ +static herr_t +H5P__facc_libver_type_enc(const void *value, void **_pp, size_t *size) +{ + const H5F_libver_t *type = (const H5F_libver_t *)value; /* Create local alias for values */ + uint8_t **pp = (uint8_t **)_pp; + + FUNC_ENTER_STATIC_NOERR + + /* Sanity check */ + HDassert(type); + HDassert(size); + + /* Encode */ + if(NULL != *pp) + *(*pp)++ = (uint8_t)*type; + + /* Size */ + (*size)++; + + FUNC_LEAVE_NOAPI(SUCCEED) +} /* end H5P__facc_libver_type_enc() */ + + +/*------------------------------------------------------------------------- + * Function: H5P__facc_libver_type_dec + * + * Purpose: Callback routine which is called whenever the 'low' or + * 'high' bound of library format versions property in the + * file access property list is decoded. + * + * Return: Success: Non-negative + * Failure: Negative + * + * Programmer: + * + *------------------------------------------------------------------------- + */ +static herr_t +H5P__facc_libver_type_dec(const void **_pp, void *_value) +{ + H5F_libver_t *type = (H5F_libver_t *)_value; + const uint8_t **pp = (const uint8_t **)_pp; + + FUNC_ENTER_STATIC_NOERR + + /* Sanity checks */ + HDassert(pp); + HDassert(*pp); + HDassert(type); + + /* Decode */ + *type = (H5F_libver_t)*(*pp)++; + + FUNC_LEAVE_NOAPI(SUCCEED) +} /* end H5P__facc_libver_type_dec() */ + + /*------------------------------------------------------------------------- * Function: H5Pset_core_write_tracking * @@ -3832,7 +3945,7 @@ done: FUNC_LEAVE_API(ret_value) } /* end H5Pset_core_write_tracking() */ - + /*------------------------------------------------------------------------- * Function: H5Pget_core_write_tracking * @@ -3874,7 +3987,7 @@ done: FUNC_LEAVE_API(ret_value) } /* end H5Pget_core_write_tracking() */ - + /*------------------------------------------------------------------------- * Function: H5Pset_metadata_read_attempts * @@ -3917,7 +4030,7 @@ done: FUNC_LEAVE_API(ret_value) } /* H5Pset_metadata_read_attempts() */ - + /*------------------------------------------------------------------------- * Function: H5Pget_metadata_read_attempts * @@ -3958,7 +4071,7 @@ done: FUNC_LEAVE_API(ret_value) } /* end H5Pget_metadata_read_attempts() */ - + /*------------------------------------------------------------------------- * Function: H5Pset_obj_flush_cb * @@ -4002,7 +4115,7 @@ done: FUNC_LEAVE_API(ret_value) } /* H5Pset_obj_flush_cb() */ - + /*------------------------------------------------------------------------- * Function: H5Pget_obj_flush_cb * @@ -4043,7 +4156,7 @@ done: FUNC_LEAVE_API(ret_value) } /* H5Pget_obj_flush_cb() */ - + /*------------------------------------------------------------------------- * Function: H5Pset_mdc_log_options * @@ -4095,7 +4208,7 @@ done: FUNC_LEAVE_API(ret_value) } /* end H5Pset_mdc_log_options() */ - + /*------------------------------------------------------------------------- * Function: H5Pget_mdc_log_options * @@ -4150,7 +4263,7 @@ done: FUNC_LEAVE_API(ret_value) } /* end H5Pget_mdc_log_options() */ - + /*------------------------------------------------------------------------- * Function: H5P_facc_mdc_log_location_enc * @@ -4203,7 +4316,7 @@ H5P_facc_mdc_log_location_enc(const void *value, void **_pp, size_t *size, void FUNC_LEAVE_NOAPI(SUCCEED) } /* end H5P_facc_mdc_log_location_enc() */ - + /*------------------------------------------------------------------------- * Function: H5P_facc_mdc_log_location_dec * @@ -4257,7 +4370,7 @@ done: FUNC_LEAVE_NOAPI(ret_value) } /* end H5P_facc_mdc_log_location_dec() */ - + /*------------------------------------------------------------------------- * Function: H5P_facc_mdc_log_location_del * @@ -4280,7 +4393,7 @@ H5P_facc_mdc_log_location_del(hid_t H5_ATTR_UNUSED prop_id, const char H5_ATTR_U FUNC_LEAVE_NOAPI(SUCCEED) } /* end H5P_facc_mdc_log_location_del() */ - + /*------------------------------------------------------------------------- * Function: H5P_facc_mdc_log_location_copy * @@ -4302,7 +4415,7 @@ H5P_facc_mdc_log_location_copy(const char H5_ATTR_UNUSED *name, size_t H5_ATTR_U FUNC_LEAVE_NOAPI(SUCCEED) } /* end H5P_facc_mdc_log_location_copy() */ - + /*------------------------------------------------------------------------- * Function: H5P_facc_mdc_log_location_cmp * @@ -4334,7 +4447,7 @@ done: FUNC_LEAVE_NOAPI(ret_value) } /* end H5P_facc_mdc_log_location_cmp() */ - + /*------------------------------------------------------------------------- * Function: H5P_facc_mdc_log_location_close * @@ -4357,7 +4470,7 @@ H5P_facc_mdc_log_location_close(const char H5_ATTR_UNUSED *name, size_t H5_ATTR_ FUNC_LEAVE_NOAPI(SUCCEED) } /* end H5P_facc_mdc_log_location_close() */ - + /*------------------------------------------------------------------------- * Function: H5Pset_evict_on_close * @@ -4398,14 +4511,14 @@ H5Pset_evict_on_close(hid_t fapl_id, hbool_t evict_on_close) if(H5P_set(plist, H5F_ACS_EVICT_ON_CLOSE_FLAG_NAME, &evict_on_close) < 0) HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "can't set evict on close property") #else - HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "evict on close is currently not supported in parallel HDF5") + HGOTO_ERROR(H5E_PLIST, H5E_UNSUPPORTED, FAIL, "evict on close is currently not supported in parallel HDF5") #endif /* H5_HAVE_PARALLEL */ done: FUNC_LEAVE_API(ret_value) } /* end H5Pset_evict_on_close() */ - + /*------------------------------------------------------------------------- * Function: H5Pget_evict_on_close * @@ -4449,7 +4562,7 @@ done: } /* end H5Pget_evict_on_close() */ #ifdef H5_HAVE_PARALLEL - + /*------------------------------------------------------------------------- * Function: H5P__encode_coll_md_read_flag_t * @@ -4487,7 +4600,7 @@ H5P__encode_coll_md_read_flag_t(const void *value, void **_pp, size_t *size, voi FUNC_LEAVE_NOAPI(SUCCEED) } /* end H5P__encode_coll_md_read_flag_t() */ - + /*------------------------------------------------------------------------- * Function: H5P__decode_coll_md_read_flag_t * @@ -4521,7 +4634,7 @@ H5P__decode_coll_md_read_flag_t(const void **_pp, void *_value) FUNC_LEAVE_NOAPI(SUCCEED) } /* end H5P__decode_coll_md_read_flag_t() */ - + /*------------------------------------------------------------------------- * Function: H5Pset_all_coll_metadata_ops * @@ -4580,7 +4693,7 @@ done: FUNC_LEAVE_API(ret_value) } /* end H5Pset_all_coll_metadata_ops() */ - + /*------------------------------------------------------------------------- * Function: H5Pget_all_coll_metadata_ops * @@ -4638,7 +4751,7 @@ done: FUNC_LEAVE_API(ret_value) } /* H5Pget_all_coll_metadata_ops */ - + /*------------------------------------------------------------------------- * Function: H5Pset_coll_metadata_write * @@ -4677,7 +4790,7 @@ done: FUNC_LEAVE_API(ret_value) } /* end H5Pset_coll_metadata_write() */ - + /*------------------------------------------------------------------------- * Function: H5Pget_coll_metadata_write * @@ -4715,7 +4828,7 @@ done: } /* end H5Pget_coll_metadata_write() */ #endif /* H5_HAVE_PARALLEL */ - + /*------------------------------------------------------------------------- * Function: H5Pset_page_buffer_size * @@ -4763,7 +4876,7 @@ done: FUNC_LEAVE_API(ret_value) } /* end H5Pset_page_buffer_size() */ - + /*------------------------------------------------------------------------- * Function: H5Pget_page_buffer_size * diff --git a/src/H5S.c b/src/H5S.c index 90c2674..1375695 100644 --- a/src/H5S.c +++ b/src/H5S.c @@ -57,6 +57,12 @@ static htri_t H5S_is_simple(const H5S_t *sdim); /* Package initialization variable */ hbool_t H5_PKG_INIT_VAR = FALSE; +/* Format version bounds for dataspace */ +const unsigned H5O_sdspace_ver_bounds[] = { + H5O_SDSPACE_VERSION_1, /* H5F_LIBVER_EARLIEST */ + H5O_SDSPACE_VERSION_2, /* H5F_LIBVER_V18 */ + H5O_SDSPACE_VERSION_LATEST /* H5F_LIBVER_LATEST */ +}; /*****************************/ /* Library Private Variables */ @@ -84,6 +90,7 @@ static const H5I_class_t H5I_DATASPACE_CLS[1] = {{ (H5I_free_t)H5S_close /* Callback routine for closing objects of this class */ }}; + /* Flag indicating "top" of interface has been initialized */ static hbool_t H5S_top_package_initialize_s = FALSE; @@ -1723,8 +1730,8 @@ H5S_decode(const unsigned char **p) /* Decode the extent part of dataspace */ /* (pass mostly bogus file pointer and bogus DXPL) */ - if((extent = (H5S_extent_t *)H5O_msg_decode(f, H5P_DEFAULT, NULL, H5O_SDSPACE_ID, pp))==NULL) - HGOTO_ERROR(H5E_DATASPACE, H5E_CANTDECODE, NULL, "can't decode object") + if((extent = (H5S_extent_t *)H5O_msg_decode(f, H5P_DEFAULT, NULL, H5O_SDSPACE_ID, extent_size, pp)) == NULL) + HGOTO_ERROR(H5E_DATASPACE, H5E_CANTDECODE, NULL, "can't decode object") pp += extent_size; /* Copy the extent into dataspace structure */ @@ -2167,30 +2174,42 @@ H5S_extent_nelem(const H5S_extent_t *ext) /*------------------------------------------------------------------------- - * Function: H5S_set_latest_version + * Function: H5S_set_version * - * Purpose: Set the encoding for a dataspace to the latest version. + * Purpose: Set the version to encode a dataspace with. * - * Return: Non-negative on success/Negative on failure + * Return: Non-negative on success/Negative on failure * - * Programmer: Quincey Koziol - * Tuesday, July 24, 2007 + * Programmer: Vailin Choi; December 2017 * *------------------------------------------------------------------------- */ herr_t -H5S_set_latest_version(H5S_t *ds) +H5S_set_version(H5F_t *f, H5S_t *ds) { - FUNC_ENTER_NOAPI_NOINIT_NOERR + unsigned version; /* Message version */ + herr_t ret_value = SUCCEED; /* Return value */ + + FUNC_ENTER_NOAPI(FAIL) /* Sanity check */ + HDassert(f); HDassert(ds); - /* Set encoding of extent to latest version */ - ds->extent.version = H5O_SDSPACE_VERSION_LATEST; + /* Upgrade to the version indicated by the file's low bound if higher */ + version = MAX(ds->extent.version, H5O_sdspace_ver_bounds[H5F_LOW_BOUND(f)]); + + /* Version bounds check */ + if(version > H5O_sdspace_ver_bounds[H5F_HIGH_BOUND(f)]) + HGOTO_ERROR(H5E_DATASET, H5E_BADRANGE, FAIL, "Dataspace version out of bounds") + + /* Set the message version */ + ds->extent.version = version; + +done: + FUNC_LEAVE_NOAPI(ret_value) - FUNC_LEAVE_NOAPI(SUCCEED) -} /* end H5S_set_latest_version() */ +} /* end H5S_set_version() */ #ifndef H5_NO_DEPRECATED_SYMBOLS diff --git a/src/H5SM.c b/src/H5SM.c index d5ede7e..8e28529 100644 --- a/src/H5SM.c +++ b/src/H5SM.c @@ -70,7 +70,7 @@ static herr_t H5SM_write_mesg(H5F_t *f, hid_t dxpl_id, H5O_t *open_oh, static herr_t H5SM_decr_ref(void *record, void *op_data, hbool_t *changed); static herr_t H5SM_delete_from_index(H5F_t *f, hid_t dxpl_id, H5O_t *open_oh, H5SM_index_header_t *header, const H5O_shared_t * mesg, - unsigned *cache_flags, void ** /*out*/ encoded_mesg); + unsigned *cache_flags, size_t * /*out*/ mesg_size, void ** /*out*/ encoded_mesg); static herr_t H5SM_type_to_flag(unsigned type_id, unsigned *type_flag); static herr_t H5SM_read_iter_op(H5O_t *oh, H5O_mesg_t *mesg, unsigned sequence, unsigned *oh_modified, void *_udata); @@ -1549,6 +1549,7 @@ H5SM_delete(H5F_t *f, hid_t dxpl_id, H5O_t *open_oh, H5O_shared_t *sh_mesg) unsigned cache_flags = H5AC__NO_FLAGS_SET; H5SM_table_cache_ud_t cache_udata; /* User-data for callback */ ssize_t index_num; + size_t mesg_size = 0; void *mesg_buf = NULL; void *native_mesg = NULL; unsigned type_id; /* Message type ID to operate on */ @@ -1578,8 +1579,8 @@ H5SM_delete(H5F_t *f, hid_t dxpl_id, H5O_t *open_oh, H5O_shared_t *sh_mesg) * zero and any file space it uses needs to be freed. mesg_buf holds the * serialized form of the message. */ - if(H5SM_delete_from_index(f, dxpl_id, open_oh, &(table->indexes[index_num]), sh_mesg, &cache_flags, &mesg_buf) < 0) - HGOTO_ERROR(H5E_SOHM, H5E_CANTDELETE, FAIL, "unable to delete mesage from SOHM index") + if(H5SM_delete_from_index(f, dxpl_id, open_oh, &(table->indexes[index_num]), sh_mesg, &cache_flags, &mesg_size, &mesg_buf) < 0) + HGOTO_ERROR(H5E_SOHM, H5E_CANTDELETE, FAIL, "unable to delete mesage from SOHM index") /* Release the master SOHM table */ if(H5AC_unprotect(f, dxpl_id, H5AC_SOHM_TABLE, H5F_SOHM_ADDR(f), table, cache_flags) < 0) @@ -1591,7 +1592,7 @@ H5SM_delete(H5F_t *f, hid_t dxpl_id, H5O_t *open_oh, H5O_shared_t *sh_mesg) * master table needs to be unprotected when we do this. */ if(mesg_buf) { - if(NULL == (native_mesg = H5O_msg_decode(f, dxpl_id, open_oh, type_id, (const unsigned char *)mesg_buf))) + if(NULL == (native_mesg = H5O_msg_decode(f, dxpl_id, open_oh, type_id, mesg_size, (const unsigned char *)mesg_buf))) HGOTO_ERROR(H5E_SOHM, H5E_CANTDECODE, FAIL, "can't decode shared message.") if(H5O_msg_delete(f, dxpl_id, open_oh, type_id, native_mesg) < 0) @@ -1778,7 +1779,7 @@ H5SM_decr_ref(void *record, void *op_data, hbool_t *changed) static herr_t H5SM_delete_from_index(H5F_t *f, hid_t dxpl_id, H5O_t *open_oh, H5SM_index_header_t *header, const H5O_shared_t *mesg, - unsigned *cache_flags, void ** /*out*/ encoded_mesg) + unsigned *cache_flags, size_t * /*out*/ mesg_size, void ** /*out*/ encoded_mesg) { H5SM_list_t *list = NULL; H5SM_mesg_key_t key; @@ -1910,6 +1911,7 @@ H5SM_delete_from_index(H5F_t *f, hid_t dxpl_id, H5O_t *open_oh, /* Return the message's encoding so anything it references can be freed */ *encoded_mesg = encoding_buf; + *mesg_size = buf_size; /* If there are no messages left in the index, delete it */ if(header->num_messages == 0) { @@ -1951,8 +1953,10 @@ done: /* Free the message encoding, if we're not returning it in encoded_mesg * or if there's been an error. */ - if(encoding_buf && (NULL == *encoded_mesg || ret_value < 0)) + if(encoding_buf && (NULL == *encoded_mesg || ret_value < 0)) { encoding_buf = H5MM_xfree(encoding_buf); + *mesg_size = 0; + } FUNC_LEAVE_NOAPI_TAG(ret_value, FAIL) } /* end H5SM_delete_from_index() */ diff --git a/src/H5Spkg.h b/src/H5Spkg.h index eb52c3d..984f56f 100644 --- a/src/H5Spkg.h +++ b/src/H5Spkg.h @@ -282,6 +282,9 @@ H5_DLLVAR const H5S_select_class_t H5S_sel_none[1]; */ H5_DLLVAR const H5S_select_class_t H5S_sel_point[1]; +/* Array of versions for Dataspace */ +H5_DLLVAR const unsigned H5O_sdspace_ver_bounds[H5F_LIBVER_NBOUNDS]; + /* Extent functions */ H5_DLL herr_t H5S_extent_release(H5S_extent_t *extent); H5_DLL herr_t H5S_extent_copy_real(H5S_extent_t *dst, const H5S_extent_t *src, diff --git a/src/H5Sprivate.h b/src/H5Sprivate.h index 009d877..e8a42e8 100644 --- a/src/H5Sprivate.h +++ b/src/H5Sprivate.h @@ -219,7 +219,7 @@ H5_DLL herr_t H5S_set_extent_simple(H5S_t *space, unsigned rank, H5_DLL H5S_t *H5S_create(H5S_class_t type); H5_DLL H5S_t *H5S_create_simple(unsigned rank, const hsize_t dims[/*rank*/], const hsize_t maxdims[/*rank*/]); -H5_DLL herr_t H5S_set_latest_version(H5S_t *ds); +H5_DLL herr_t H5S_set_version(H5F_t *f, H5S_t *ds); H5_DLL herr_t H5S_encode(H5S_t *obj, unsigned char **p, size_t *nalloc, hid_t fapl_id); H5_DLL H5S_t *H5S_decode(const unsigned char **p); H5_DLL herr_t H5S_debug(H5F_t *f, hid_t dxpl_id, const void *_mesg, FILE *stream, diff --git a/src/H5T.c b/src/H5T.c index 7fba30a..d85d20f 100644 --- a/src/H5T.c +++ b/src/H5T.c @@ -510,6 +510,12 @@ double H5T_NATIVE_DOUBLE_NEG_INF_g = (double)0.0f; H5FL_DEFINE(H5T_t); H5FL_DEFINE(H5T_shared_t); +/* Format version bounds for datatype */ +const unsigned H5O_dtype_ver_bounds[] = { + H5O_DTYPE_VERSION_1, /* H5F_LIBVER_EARLIEST */ + H5O_DTYPE_VERSION_3, /* H5F_LIBVER_V18 */ + H5O_DTYPE_VERSION_LATEST /* H5F_LIBVER_LATEST */ +}; /*******************/ /* Local Variables */ @@ -539,6 +545,7 @@ static const H5I_class_t H5I_DATATYPE_CLS[1] = {{ (H5I_free_t)H5T_close /* Callback routine for closing objects of this class */ }}; + /* Flag indicating "top" of interface has been initialized */ static hbool_t H5T_top_package_initialize_s = FALSE; @@ -2815,8 +2822,13 @@ H5Tdecode(const void *buf) if(buf == NULL) HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "empty buffer") - /* Create datatype by decoding buffer */ - if(NULL == (dt = H5T_decode((const unsigned char *)buf))) + /* Create datatype by decoding buffer + * There is no way to get the size of the buffer, so we pass in + * SIZE_MAX and assume the caller knows what they are doing. + * Really fixing this will require an H5Tdecode2() call that + * takes a size parameter. + */ + if(NULL == (dt = H5T_decode(SIZE_MAX, (const unsigned char *)buf))) HGOTO_ERROR(H5E_DATATYPE, H5E_CANTDECODE, FAIL, "can't decode object") /* Register the type and return the ID */ @@ -2905,7 +2917,7 @@ done: *------------------------------------------------------------------------- */ H5T_t * -H5T_decode(const unsigned char *buf) +H5T_decode(size_t buf_size, const unsigned char *buf) { H5F_t *f = NULL; /* Fake file structure*/ H5T_t *ret_value = NULL; /* Return value */ @@ -2925,7 +2937,7 @@ H5T_decode(const unsigned char *buf) HGOTO_ERROR(H5E_DATATYPE, H5E_VERSION, NULL, "unknown version of encoded datatype") /* Decode the serialized datatype message */ - if(NULL == (ret_value = (H5T_t *)H5O_msg_decode(f, H5AC_noio_dxpl_id, NULL, H5O_DTYPE_ID, buf))) + if(NULL == (ret_value = (H5T_t *)H5O_msg_decode(f, H5AC_noio_dxpl_id, NULL, H5O_DTYPE_ID, buf_size, buf))) HGOTO_ERROR(H5E_DATATYPE, H5E_CANTDECODE, NULL, "can't decode object") /* Mark datatype as being in memory now */ @@ -5204,6 +5216,11 @@ H5T_set_loc(H5T_t *dt, H5F_t *f, H5T_loc_t loc) /* Check if the field changed size */ if(old_size != memb_type->shared->size) { + + /* Fail if the old_size is zero */ + if (0 == old_size) + HGOTO_ERROR(H5E_DATATYPE, H5E_BADVALUE, FAIL, "old_size of zero would cause division by zero"); + /* Adjust the size of the member */ dt->shared->u.compnd.memb[i].size = (dt->shared->u.compnd.memb[i].size*memb_type->shared->size)/old_size; @@ -5403,34 +5420,44 @@ done: /*------------------------------------------------------------------------- - * Function: H5T_set_latest_version + * Function: H5T_set_version * - * Purpose: Set the encoding for a datatype to the latest version. + * Purpose: Set the encoding for a datatype to the version indicated by + * the file's low bound if that is higher than the datatype's + * version. * * Return: Non-negative on success/Negative on failure * - * Programmer: Quincey Koziol - * Thursday, July 19, 2007 + * Programmer: Vailin Choi; December 2017 * *------------------------------------------------------------------------- */ herr_t -H5T_set_latest_version(H5T_t *dt) +H5T_set_version(H5F_t *f, H5T_t *dt) { - herr_t ret_value = SUCCEED; /* Return value */ + unsigned vers; /* The version */ + herr_t ret_value = SUCCEED; /* Return value */ FUNC_ENTER_NOAPI(FAIL) /* Sanity check */ + HDassert(f); HDassert(dt); - /* Upgrade the format version for the datatype to the latest */ - if(H5T__upgrade_version(dt, H5O_DTYPE_VERSION_LATEST) < 0) - HGOTO_ERROR(H5E_DATATYPE, H5E_CANTSET, FAIL, "can't upgrade datatype encoding") + vers = H5O_dtype_ver_bounds[H5F_LOW_BOUND(f)]; + if(vers > dt->shared->version) { + /* Upgrade the format version for the datatype */ + if(H5T__upgrade_version(dt, vers) < 0) + HGOTO_ERROR(H5E_DATATYPE, H5E_CANTSET, FAIL, "can't upgrade datatype encoding") + } + + /* Version bounds check */ + if(dt->shared->version > H5O_dtype_ver_bounds[H5F_HIGH_BOUND(f)]) + HGOTO_ERROR(H5E_DATATYPE, H5E_BADRANGE, FAIL, "Datatype version out of bounds") done: FUNC_LEAVE_NOAPI(ret_value) -} /* end H5T_set_latest_version() */ +} /* end H5T_set_version() */ /*------------------------------------------------------------------------- diff --git a/src/H5Tcommit.c b/src/H5Tcommit.c index 30fbeeb..cd0597c 100644 --- a/src/H5Tcommit.c +++ b/src/H5Tcommit.c @@ -328,9 +328,9 @@ H5T__commit(H5F_t *file, H5T_t *type, hid_t tcpl_id, hid_t dxpl_id) * a named type should always succeed. */ if(H5T_STATE_NAMED == type->shared->state || H5T_STATE_OPEN == type->shared->state) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "datatype is already committed") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "datatype is already committed") if(H5T_STATE_IMMUTABLE == type->shared->state) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "datatype is immutable") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "datatype is immutable") /* Check for a "sensible" datatype to store on disk */ if(H5T_is_sensible(type) <= 0) @@ -344,15 +344,14 @@ H5T__commit(H5F_t *file, H5T_t *type, hid_t tcpl_id, hid_t dxpl_id) /* Reset datatype location and path */ if(H5O_loc_reset(&temp_oloc) < 0) - HGOTO_ERROR(H5E_SYM, H5E_CANTRESET, FAIL, "unable to initialize location") + HGOTO_ERROR(H5E_SYM, H5E_CANTRESET, FAIL, "unable to initialize location") if(H5G_name_reset(&temp_path) < 0) - HGOTO_ERROR(H5E_SYM, H5E_CANTRESET, FAIL, "unable to initialize path") + HGOTO_ERROR(H5E_SYM, H5E_CANTRESET, FAIL, "unable to initialize path") loc_init = TRUE; - /* Set the latest format, if requested */ - if(H5F_USE_LATEST_FLAGS(file, H5F_LATEST_DATATYPE)) - if(H5T_set_latest_version(type) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTSET, FAIL, "can't set latest version of datatype") + /* Set the version for datatype */ + if(H5T_set_version(file, type) < 0) + HGOTO_ERROR(H5E_DATASET, H5E_CANTSET, FAIL, "can't set version of datatype") /* Calculate message size infomation, for creating object header */ dtype_size = H5O_msg_size_f(file, tcpl_id, H5O_DTYPE_ID, type, (size_t)0); @@ -363,15 +362,15 @@ H5T__commit(H5F_t *file, H5T_t *type, hid_t tcpl_id, hid_t dxpl_id) * type message and then give the object header a name. */ if(H5O_create(file, dxpl_id, dtype_size, (size_t)1, tcpl_id, &temp_oloc) < 0) - HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "unable to create datatype object header") + HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "unable to create datatype object header") if(H5O_msg_create(&temp_oloc, H5O_DTYPE_ID, H5O_MSG_FLAG_CONSTANT | H5O_MSG_FLAG_DONTSHARE, H5O_UPDATE_TIME, type, dxpl_id) < 0) - HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "unable to update type header message") + HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "unable to update type header message") /* Copy the new object header's location into the datatype, taking ownership of it */ if(H5O_loc_copy(&(type->oloc), &temp_oloc, H5_COPY_SHALLOW) < 0) - HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "unable to copy datatype location") + HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "unable to copy datatype location") if(H5G_name_copy(&(type->path), &temp_path, H5_COPY_SHALLOW) < 0) - HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "unable to copy datatype location") + HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "unable to copy datatype location") loc_init = FALSE; /* Set the shared info fields */ @@ -400,12 +399,12 @@ done: if((type->shared->state == H5T_STATE_TRANSIENT || type->shared->state == H5T_STATE_RDONLY) && (type->sh_loc.type == H5O_SHARE_TYPE_COMMITTED)) { if(H5O_dec_rc_by_loc(&(type->oloc), dxpl_id) < 0) HDONE_ERROR(H5E_DATATYPE, H5E_CANTDEC, FAIL, "unable to decrement refcount on newly created object") - if(H5O_close(&(type->oloc), NULL) < 0) + if(H5O_close(&(type->oloc), NULL) < 0) HDONE_ERROR(H5E_DATATYPE, H5E_CLOSEERROR, FAIL, "unable to release object header") if(H5O_delete(file, dxpl_id, type->sh_loc.u.loc.oh_addr) < 0) HDONE_ERROR(H5E_DATATYPE, H5E_CANTDELETE, FAIL, "unable to delete object header") - type->sh_loc.type = H5O_SHARE_TYPE_UNSHARED; - } /* end if */ + type->sh_loc.type = H5O_SHARE_TYPE_UNSHARED; + } /* end if */ } /* end if */ FUNC_LEAVE_NOAPI(ret_value) diff --git a/src/H5Tpkg.h b/src/H5Tpkg.h index d075127..f05c021 100644 --- a/src/H5Tpkg.h +++ b/src/H5Tpkg.h @@ -332,6 +332,9 @@ typedef struct { /* Typedef for datatype iteration operations */ typedef herr_t (*H5T_operator_t)(H5T_t *dt, void *op_data/*in,out*/); +/* Array of versions for Datatype */ +H5_DLLVAR const unsigned H5O_dtype_ver_bounds[H5F_LIBVER_NBOUNDS]; + /* * Alignment information for native types. A value of N indicates that the * data must be aligned on an address ADDR such that 0 == ADDR mod N. When diff --git a/src/H5Tprivate.h b/src/H5Tprivate.h index 9171e1e..61e7c79 100644 --- a/src/H5Tprivate.h +++ b/src/H5Tprivate.h @@ -114,7 +114,7 @@ H5_DLL htri_t H5T_detect_class(const H5T_t *dt, H5T_class_t cls, hbool_t from_ap H5_DLL size_t H5T_get_size(const H5T_t *dt); H5_DLL int H5T_cmp(const H5T_t *dt1, const H5T_t *dt2, hbool_t superset); H5_DLL herr_t H5T_encode(H5T_t *obj, unsigned char *buf, size_t *nalloc); -H5_DLL H5T_t *H5T_decode(const unsigned char *buf); +H5_DLL H5T_t *H5T_decode(size_t buf_size, const unsigned char *buf); H5_DLL herr_t H5T_debug(const H5T_t *dt, FILE * stream); H5_DLL struct H5O_loc_t *H5T_oloc(H5T_t *dt); H5_DLL H5G_name_t *H5T_nameof(H5T_t *dt); @@ -136,7 +136,7 @@ H5_DLL herr_t H5T_vlen_get_alloc_info(hid_t dxpl_id, H5T_vlen_alloc_info_t **vl_ H5_DLL htri_t H5T_set_loc(H5T_t *dt, H5F_t *f, H5T_loc_t loc); H5_DLL htri_t H5T_is_sensible(const H5T_t *dt); H5_DLL uint32_t H5T_hash(H5F_t * file, const H5T_t *dt); -H5_DLL herr_t H5T_set_latest_version(H5T_t *dt); +H5_DLL herr_t H5T_set_version(H5F_t *f, H5T_t *dt); H5_DLL herr_t H5T_patch_file(H5T_t *dt, H5F_t *f); H5_DLL herr_t H5T_patch_vlen_file(H5T_t *dt, H5F_t *f); H5_DLL htri_t H5T_is_variable_str(const H5T_t *dt); diff --git a/src/H5trace.c b/src/H5trace.c index 7bc2724..32e05a7 100644 --- a/src/H5trace.c +++ b/src/H5trace.c @@ -174,26 +174,26 @@ H5_trace(const double *returning, const char *func, const char *type, ...) if(H5_debug_g.ttimes) { char tmp[128]; - sprintf(tmp, "%.6f", event_time.etime-first_time.etime); - fprintf(out, " %*s ", (int)HDstrlen(tmp), ""); + HDsprintf(tmp, "%.6f", event_time.etime-first_time.etime); + HDfprintf(out, " %*s ", (int)HDstrlen(tmp), ""); } /* end if */ for(i = 0; i < current_depth; i++) HDfputc('+', out); - fprintf(out, "%*s%s = ", 2*current_depth, "", func); + HDfprintf(out, "%*s%s = ", 2*current_depth, "", func); } /* end if */ else { /* Continue current line with return value */ - fprintf(out, " = "); + HDfprintf(out, " = "); } /* end else */ } /* end if */ else { if(current_depth>last_call_depth) HDfputs(" = \n", out); if(H5_debug_g.ttimes) - fprintf(out, "@%.6f ", event_time.etime - first_time.etime); + HDfprintf(out, "@%.6f ", event_time.etime - first_time.etime); for(i = 0; i < current_depth; i++) HDfputc('+', out); - fprintf(out, "%*s%s(", 2*current_depth, "", func); + HDfprintf(out, "%*s%s(", 2*current_depth, "", func); } /* end else */ /* Clear array sizes */ @@ -235,7 +235,7 @@ H5_trace(const double *returning, const char *func, const char *type, ...) buf[MIN((int)sizeof(buf) - 1, n)] = '\0'; argname = buf; } /* end if */ - fprintf(out, "%s%s=", argno?", ":"", argname); + HDfprintf(out, "%s%s=", argno?", ":"", argname); } /* end if */ else argname = ""; @@ -247,9 +247,9 @@ H5_trace(const double *returning, const char *func, const char *type, ...) case 'a': if(ptr) { if(vp) - fprintf(out, "0x%lx", (unsigned long)vp); + HDfprintf(out, "0x%lx", (unsigned long)vp); else - fprintf(out, "NULL"); + HDfprintf(out, "NULL"); } /* end if */ else { haddr_t addr = va_arg(ap, haddr_t); @@ -261,33 +261,33 @@ H5_trace(const double *returning, const char *func, const char *type, ...) case 'b': if(ptr) { if(vp) - fprintf(out, "0x%lx", (unsigned long)vp); + HDfprintf(out, "0x%lx", (unsigned long)vp); else - fprintf(out, "NULL"); + HDfprintf(out, "NULL"); } /* end if */ else { /* Can't pass hbool_t to va_arg() */ hbool_t bool_var = (hbool_t)va_arg(ap, int); if(TRUE == bool_var) - fprintf(out, "TRUE"); + HDfprintf(out, "TRUE"); else if(!bool_var) - fprintf(out, "FALSE"); + HDfprintf(out, "FALSE"); else - fprintf(out, "TRUE(%u)", (unsigned)bool_var); + HDfprintf(out, "TRUE(%u)", (unsigned)bool_var); } break; case 'd': if(ptr) { if(vp) - fprintf(out, "0x%lx", (unsigned long)vp); + HDfprintf(out, "0x%lx", (unsigned long)vp); else - fprintf(out, "NULL"); + HDfprintf(out, "NULL"); } /* end if */ else { double dbl = va_arg(ap, double); - fprintf(out, "%g", dbl); + HDfprintf(out, "%g", dbl); } /* end else */ break; @@ -296,36 +296,36 @@ H5_trace(const double *returning, const char *func, const char *type, ...) case 'a': if(ptr) { if(vp) - fprintf (out, "0x%lx", (unsigned long)vp); + HDfprintf (out, "0x%lx", (unsigned long)vp); else - fprintf(out, "NULL"); + HDfprintf(out, "NULL"); } /* end if */ else { H5D_alloc_time_t alloc_time = (H5D_alloc_time_t)va_arg(ap, int); switch(alloc_time) { case H5D_ALLOC_TIME_ERROR: - fprintf(out, "H5D_ALLOC_TIME_ERROR"); + HDfprintf(out, "H5D_ALLOC_TIME_ERROR"); break; case H5D_ALLOC_TIME_DEFAULT: - fprintf(out, "H5D_ALLOC_TIME_DEFAULT"); + HDfprintf(out, "H5D_ALLOC_TIME_DEFAULT"); break; case H5D_ALLOC_TIME_EARLY: - fprintf(out, "H5D_ALLOC_TIME_EARLY"); + HDfprintf(out, "H5D_ALLOC_TIME_EARLY"); break; case H5D_ALLOC_TIME_LATE: - fprintf(out, "H5D_ALLOC_TIME_LATE"); + HDfprintf(out, "H5D_ALLOC_TIME_LATE"); break; case H5D_ALLOC_TIME_INCR: - fprintf(out, "H5D_ALLOC_TIME_INCR"); + HDfprintf(out, "H5D_ALLOC_TIME_INCR"); break; default: - fprintf(out, "%ld", (long)alloc_time); + HDfprintf(out, "%ld", (long)alloc_time); break; } /* end switch */ } /* end else */ @@ -334,24 +334,24 @@ H5_trace(const double *returning, const char *func, const char *type, ...) case 'c': if(ptr) { if(vp) - fprintf(out, "0x%lx", (unsigned long)vp); + HDfprintf(out, "0x%lx", (unsigned long)vp); else - fprintf(out, "NULL"); + HDfprintf(out, "NULL"); } /* end if */ else { H5FD_mpio_collective_opt_t opt = (H5FD_mpio_collective_opt_t)va_arg(ap, int); switch(opt) { case H5FD_MPIO_COLLECTIVE_IO: - fprintf(out, "H5FD_MPIO_COLLECTIVE_IO"); + HDfprintf(out, "H5FD_MPIO_COLLECTIVE_IO"); break; case H5FD_MPIO_INDIVIDUAL_IO: - fprintf(out, "H5FD_MPIO_INDIVIDUAL_IO"); + HDfprintf(out, "H5FD_MPIO_INDIVIDUAL_IO"); break; default: - fprintf(out, "%ld", (long)opt); + HDfprintf(out, "%ld", (long)opt); break; } /* end switch */ } /* end else */ @@ -360,32 +360,32 @@ H5_trace(const double *returning, const char *func, const char *type, ...) case 'f': if(ptr) { if(vp) - fprintf(out, "0x%lx", (unsigned long)vp); + HDfprintf(out, "0x%lx", (unsigned long)vp); else - fprintf(out, "NULL"); + HDfprintf(out, "NULL"); } /* end if */ else { H5D_fill_time_t fill_time = (H5D_fill_time_t)va_arg(ap, int); switch(fill_time) { case H5D_FILL_TIME_ERROR: - fprintf(out, "H5D_FILL_TIME_ERROR"); + HDfprintf(out, "H5D_FILL_TIME_ERROR"); break; case H5D_FILL_TIME_ALLOC: - fprintf(out, "H5D_FILL_TIME_ALLOC"); + HDfprintf(out, "H5D_FILL_TIME_ALLOC"); break; case H5D_FILL_TIME_NEVER: - fprintf(out, "H5D_FILL_TIME_NEVER"); + HDfprintf(out, "H5D_FILL_TIME_NEVER"); break; case H5D_FILL_TIME_IFSET: - fprintf(out, "H5D_FILL_TIME_IFSET"); + HDfprintf(out, "H5D_FILL_TIME_IFSET"); break; default: - fprintf(out, "%ld", (long)fill_time); + HDfprintf(out, "%ld", (long)fill_time); break; } /* end switch */ } /* end else */ @@ -394,32 +394,32 @@ H5_trace(const double *returning, const char *func, const char *type, ...) case 'F': if(ptr) { if(vp) - fprintf(out, "0x%lx", (unsigned long)vp); + HDfprintf(out, "0x%lx", (unsigned long)vp); else - fprintf(out, "NULL"); + HDfprintf(out, "NULL"); } /* end if */ else { H5D_fill_value_t fill_value = (H5D_fill_value_t)va_arg(ap, int); switch(fill_value) { case H5D_FILL_VALUE_ERROR: - fprintf(out, "H5D_FILL_VALUE_ERROR"); + HDfprintf(out, "H5D_FILL_VALUE_ERROR"); break; case H5D_FILL_VALUE_UNDEFINED: - fprintf(out, "H5D_FILL_VALUE_UNDEFINED"); + HDfprintf(out, "H5D_FILL_VALUE_UNDEFINED"); break; case H5D_FILL_VALUE_DEFAULT: - fprintf(out, "H5D_FILL_VALUE_DEFAULT"); + HDfprintf(out, "H5D_FILL_VALUE_DEFAULT"); break; case H5D_FILL_VALUE_USER_DEFINED: - fprintf(out, "H5D_FILL_VALUE_USER_DEFINED"); + HDfprintf(out, "H5D_FILL_VALUE_USER_DEFINED"); break; default: - fprintf(out, "%ld", (long)fill_value); + HDfprintf(out, "%ld", (long)fill_value); break; } /* end switch */ } /* end else */ @@ -428,28 +428,28 @@ H5_trace(const double *returning, const char *func, const char *type, ...) case 'h': if(ptr) { if(vp) - fprintf(out, "0x%lx", (unsigned long)vp); + HDfprintf(out, "0x%lx", (unsigned long)vp); else - fprintf(out, "NULL"); + HDfprintf(out, "NULL"); } /* end if */ else { H5FD_mpio_chunk_opt_t opt = (H5FD_mpio_chunk_opt_t)va_arg(ap, int); switch(opt) { case H5FD_MPIO_CHUNK_DEFAULT: - fprintf(out, "H5FD_MPIO_CHUNK_DEFAULT"); + HDfprintf(out, "H5FD_MPIO_CHUNK_DEFAULT"); break; case H5FD_MPIO_CHUNK_ONE_IO: - fprintf(out, "H5FD_MPIO_CHUNK_ONE_IO"); + HDfprintf(out, "H5FD_MPIO_CHUNK_ONE_IO"); break; case H5FD_MPIO_CHUNK_MULTI_IO: - fprintf(out, "H5FD_MPIO_CHUNK_MULTI_IO"); + HDfprintf(out, "H5FD_MPIO_CHUNK_MULTI_IO"); break; default: - fprintf(out, "%ld", (long)opt); + HDfprintf(out, "%ld", (long)opt); break; } /* end switch */ } /* end else */ @@ -458,36 +458,36 @@ H5_trace(const double *returning, const char *func, const char *type, ...) case 'i': if(ptr) { if(vp) - fprintf(out, "0x%lx", (unsigned long)vp); + HDfprintf(out, "0x%lx", (unsigned long)vp); else - fprintf(out, "NULL"); + HDfprintf(out, "NULL"); } /* end if */ else { H5D_mpio_actual_io_mode_t actual_io_mode = (H5D_mpio_actual_io_mode_t)va_arg(ap, int); switch(actual_io_mode) { case H5D_MPIO_NO_COLLECTIVE: - fprintf(out, "H5D_MPIO_NO_COLLECTIVE"); + HDfprintf(out, "H5D_MPIO_NO_COLLECTIVE"); break; case H5D_MPIO_CHUNK_INDEPENDENT: - fprintf(out, "H5D_MPIO_CHUNK_INDEPENDENT"); + HDfprintf(out, "H5D_MPIO_CHUNK_INDEPENDENT"); break; case H5D_MPIO_CHUNK_COLLECTIVE: - fprintf(out, "H5D_MPIO_CHUNK_COLLECTIVE"); + HDfprintf(out, "H5D_MPIO_CHUNK_COLLECTIVE"); break; case H5D_MPIO_CHUNK_MIXED: - fprintf(out, "H5D_MPIO_CHUNK_MIXED"); + HDfprintf(out, "H5D_MPIO_CHUNK_MIXED"); break; case H5D_MPIO_CONTIGUOUS_COLLECTIVE: - fprintf(out, "H5D_MPIO_CONTIGUOUS_COLLECTIVE"); + HDfprintf(out, "H5D_MPIO_CONTIGUOUS_COLLECTIVE"); break; default: - fprintf(out, "%ld", (long)actual_io_mode); + HDfprintf(out, "%ld", (long)actual_io_mode); break; } /* end switch */ } /* end else */ @@ -496,44 +496,44 @@ H5_trace(const double *returning, const char *func, const char *type, ...) case 'k': if(ptr) { if(vp) - fprintf(out, "0x%lx", (unsigned long)vp); + HDfprintf(out, "0x%lx", (unsigned long)vp); else - fprintf(out, "NULL"); + HDfprintf(out, "NULL"); } /* end if */ else { H5D_chunk_index_t idx = (H5D_chunk_index_t)va_arg(ap, int); switch(idx) { case H5D_CHUNK_IDX_BTREE: - fprintf(out, "H5D_CHUNK_IDX_BTREE"); + HDfprintf(out, "H5D_CHUNK_IDX_BTREE"); break; case H5D_CHUNK_IDX_NONE: - fprintf(out, "H5D_CHUNK_IDX_NONE"); + HDfprintf(out, "H5D_CHUNK_IDX_NONE"); break; case H5D_CHUNK_IDX_FARRAY: - fprintf(out, "H5D_CHUNK_IDX_FARRAY"); + HDfprintf(out, "H5D_CHUNK_IDX_FARRAY"); break; case H5D_CHUNK_IDX_EARRAY: - fprintf(out, "H5D_CHUNK_IDX_EARRAY"); + HDfprintf(out, "H5D_CHUNK_IDX_EARRAY"); break; case H5D_CHUNK_IDX_BT2: - fprintf(out, "H5D_CHUNK_IDX_BT2"); + HDfprintf(out, "H5D_CHUNK_IDX_BT2"); break; case H5D_CHUNK_IDX_SINGLE: - fprintf(out, "H5D_CHUNK_IDX_SINGLE"); + HDfprintf(out, "H5D_CHUNK_IDX_SINGLE"); break; case H5D_CHUNK_IDX_NTYPES: - fprintf(out, "ERROR: H5D_CHUNK_IDX_NTYPES (invalid value)"); + HDfprintf(out, "ERROR: H5D_CHUNK_IDX_NTYPES (invalid value)"); break; default: - fprintf(out, "UNKNOWN VALUE: %ld", (long)idx); + HDfprintf(out, "UNKNOWN VALUE: %ld", (long)idx); break; } /* end switch */ } /* end else */ @@ -542,40 +542,40 @@ H5_trace(const double *returning, const char *func, const char *type, ...) case 'l': if(ptr) { if(vp) - fprintf(out, "0x%lx", (unsigned long)vp); + HDfprintf(out, "0x%lx", (unsigned long)vp); else - fprintf(out, "NULL"); + HDfprintf(out, "NULL"); } /* end if */ else { H5D_layout_t layout = (H5D_layout_t)va_arg(ap, int); switch(layout) { case H5D_LAYOUT_ERROR: - fprintf(out, "H5D_LAYOUT_ERROR"); + HDfprintf(out, "H5D_LAYOUT_ERROR"); break; case H5D_COMPACT: - fprintf(out, "H5D_COMPACT"); + HDfprintf(out, "H5D_COMPACT"); break; case H5D_CONTIGUOUS: - fprintf(out, "H5D_CONTIGUOUS"); + HDfprintf(out, "H5D_CONTIGUOUS"); break; case H5D_CHUNKED: - fprintf(out, "H5D_CHUNKED"); + HDfprintf(out, "H5D_CHUNKED"); break; case H5D_VIRTUAL: - fprintf(out, "H5D_VIRTUAL"); + HDfprintf(out, "H5D_VIRTUAL"); break; case H5D_NLAYOUTS: - fprintf(out, "H5D_NLAYOUTS"); + HDfprintf(out, "H5D_NLAYOUTS"); break; default: - fprintf(out, "%ld", (long)layout); + HDfprintf(out, "%ld", (long)layout); break; } /* end switch */ } /* end else */ @@ -584,9 +584,9 @@ H5_trace(const double *returning, const char *func, const char *type, ...) case 'n': if(ptr) { if(vp) - fprintf(out, "0x%lx", (unsigned long)vp); + HDfprintf(out, "0x%lx", (unsigned long)vp); else - fprintf(out, "NULL"); + HDfprintf(out, "NULL"); } /* end if */ else { H5D_mpio_no_collective_cause_t nocol_cause_mode = (H5D_mpio_no_collective_cause_t)va_arg(ap, int); @@ -594,65 +594,65 @@ H5_trace(const double *returning, const char *func, const char *type, ...) /* Check for all bit-flags which might be set */ if(nocol_cause_mode & H5D_MPIO_COLLECTIVE) { - fprintf(out, "H5D_MPIO_COLLECTIVE"); + HDfprintf(out, "H5D_MPIO_COLLECTIVE"); flag_already_displayed = TRUE; } /* end if */ if(nocol_cause_mode & H5D_MPIO_SET_INDEPENDENT) { - fprintf(out, "%sH5D_MPIO_SET_INDEPENDENT", flag_already_displayed ? " | " : ""); + HDfprintf(out, "%sH5D_MPIO_SET_INDEPENDENT", flag_already_displayed ? " | " : ""); flag_already_displayed = TRUE; } /* end if */ if(nocol_cause_mode & H5D_MPIO_DATATYPE_CONVERSION) { - fprintf(out, "%sH5D_MPIO_DATATYPE_CONVERSION", flag_already_displayed ? " | " : ""); + HDfprintf(out, "%sH5D_MPIO_DATATYPE_CONVERSION", flag_already_displayed ? " | " : ""); flag_already_displayed = TRUE; } /* end if */ if(nocol_cause_mode & H5D_MPIO_DATA_TRANSFORMS) { - fprintf(out, "%sH5D_MPIO_DATA_TRANSFORMS", flag_already_displayed ? " | " : ""); + HDfprintf(out, "%sH5D_MPIO_DATA_TRANSFORMS", flag_already_displayed ? " | " : ""); flag_already_displayed = TRUE; } /* end if */ if(nocol_cause_mode & H5D_MPIO_MPI_OPT_TYPES_ENV_VAR_DISABLED) { - fprintf(out, "%sH5D_MPIO_MPI_OPT_TYPES_ENV_VAR_DISABLED", flag_already_displayed ? " | " : ""); + HDfprintf(out, "%sH5D_MPIO_MPI_OPT_TYPES_ENV_VAR_DISABLED", flag_already_displayed ? " | " : ""); flag_already_displayed = TRUE; } /* end if */ if(nocol_cause_mode & H5D_MPIO_NOT_SIMPLE_OR_SCALAR_DATASPACES) { - fprintf(out, "%sH5D_MPIO_NOT_SIMPLE_OR_SCALAR_DATASPACES", flag_already_displayed ? " | " : ""); + HDfprintf(out, "%sH5D_MPIO_NOT_SIMPLE_OR_SCALAR_DATASPACES", flag_already_displayed ? " | " : ""); flag_already_displayed = TRUE; } /* end if */ if(nocol_cause_mode & H5D_MPIO_NOT_CONTIGUOUS_OR_CHUNKED_DATASET) { - fprintf(out, "%sH5D_MPIO_NOT_CONTIGUOUS_OR_CHUNKED_DATASET", flag_already_displayed ? " | " : ""); + HDfprintf(out, "%sH5D_MPIO_NOT_CONTIGUOUS_OR_CHUNKED_DATASET", flag_already_displayed ? " | " : ""); flag_already_displayed = TRUE; } /* end if */ /* Display '' if there's no flags set */ if(!flag_already_displayed) - fprintf(out, ""); + HDfprintf(out, ""); } /* end else */ break; case 'o': if(ptr) { if(vp) - fprintf(out, "0x%lx", (unsigned long)vp); + HDfprintf(out, "0x%lx", (unsigned long)vp); else - fprintf(out, "NULL"); + HDfprintf(out, "NULL"); } /* end if */ else { H5D_mpio_actual_chunk_opt_mode_t chunk_opt_mode = (H5D_mpio_actual_chunk_opt_mode_t)va_arg(ap, int); switch(chunk_opt_mode) { case H5D_MPIO_NO_CHUNK_OPTIMIZATION: - fprintf(out, "H5D_MPIO_NO_CHUNK_OPTIMIZATION"); + HDfprintf(out, "H5D_MPIO_NO_CHUNK_OPTIMIZATION"); break; case H5D_MPIO_LINK_CHUNK: - fprintf(out, "H5D_MPIO_LINK_CHUNK"); + HDfprintf(out, "H5D_MPIO_LINK_CHUNK"); break; case H5D_MPIO_MULTI_CHUNK: - fprintf(out, "H5D_MPIO_MULTI_CHUNK"); + HDfprintf(out, "H5D_MPIO_MULTI_CHUNK"); break; default: - fprintf(out, "%ld", (long)chunk_opt_mode); + HDfprintf(out, "%ld", (long)chunk_opt_mode); break; } /* end switch */ } /* end else */ @@ -661,32 +661,32 @@ H5_trace(const double *returning, const char *func, const char *type, ...) case 's': if(ptr) { if(vp) - fprintf(out, "0x%lx", (unsigned long)vp); + HDfprintf(out, "0x%lx", (unsigned long)vp); else - fprintf(out, "NULL"); + HDfprintf(out, "NULL"); } /* end if */ else { H5D_space_status_t space_status = (H5D_space_status_t)va_arg(ap, int); switch(space_status) { case H5D_SPACE_STATUS_NOT_ALLOCATED: - fprintf(out, "H5D_SPACE_STATUS_NOT_ALLOCATED"); + HDfprintf(out, "H5D_SPACE_STATUS_NOT_ALLOCATED"); break; case H5D_SPACE_STATUS_PART_ALLOCATED: - fprintf(out, "H5D_SPACE_STATUS_PART_ALLOCATED"); + HDfprintf(out, "H5D_SPACE_STATUS_PART_ALLOCATED"); break; case H5D_SPACE_STATUS_ALLOCATED: - fprintf(out, "H5D_SPACE_STATUS_ALLOCATED"); + HDfprintf(out, "H5D_SPACE_STATUS_ALLOCATED"); break; case H5D_SPACE_STATUS_ERROR: - fprintf(out, "H5D_SPACE_STATUS_ERROR"); + HDfprintf(out, "H5D_SPACE_STATUS_ERROR"); break; default: - fprintf(out, "%ld", (long)space_status); + HDfprintf(out, "%ld", (long)space_status); break; } /* end switch */ } /* end else */ @@ -695,24 +695,24 @@ H5_trace(const double *returning, const char *func, const char *type, ...) case 't': if(ptr) { if(vp) - fprintf(out, "0x%lx", (unsigned long)vp); + HDfprintf(out, "0x%lx", (unsigned long)vp); else - fprintf(out, "NULL"); + HDfprintf(out, "NULL"); } /* end if */ else { H5FD_mpio_xfer_t transfer = (H5FD_mpio_xfer_t)va_arg(ap, int); switch(transfer) { case H5FD_MPIO_INDEPENDENT: - fprintf(out, "H5FD_MPIO_INDEPENDENT"); + HDfprintf(out, "H5FD_MPIO_INDEPENDENT"); break; case H5FD_MPIO_COLLECTIVE: - fprintf(out, "H5FD_MPIO_COLLECTIVE"); + HDfprintf(out, "H5FD_MPIO_COLLECTIVE"); break; default: - fprintf(out, "%ld", (long)transfer); + HDfprintf(out, "%ld", (long)transfer); break; } /* end switch */ } /* end else */ @@ -721,35 +721,35 @@ H5_trace(const double *returning, const char *func, const char *type, ...) case 'v': if(ptr) { if(vp) - fprintf(out, "0x%lx", (unsigned long)vp); + HDfprintf(out, "0x%lx", (unsigned long)vp); else - fprintf(out, "NULL"); + HDfprintf(out, "NULL"); } /* end if */ else { H5D_vds_view_t view = (H5D_vds_view_t)va_arg(ap, int); switch(view) { case H5D_VDS_ERROR: - fprintf(out, "H5D_VDS_ERROR"); + HDfprintf(out, "H5D_VDS_ERROR"); break; case H5D_VDS_FIRST_MISSING: - fprintf(out, "H5D_VDS_FIRST_MISSING"); + HDfprintf(out, "H5D_VDS_FIRST_MISSING"); break; case H5D_VDS_LAST_AVAILABLE: - fprintf(out, "H5D_VDS_LAST_AVAILABLE"); + HDfprintf(out, "H5D_VDS_LAST_AVAILABLE"); break; default: - fprintf(out, "%ld", (long)view); + HDfprintf(out, "%ld", (long)view); break; } /* end switch */ } /* end else */ break; default: - fprintf (out, "BADTYPE(D%c)", type[1]); + HDfprintf (out, "BADTYPE(D%c)", type[1]); goto error; } /* end switch */ break; @@ -757,17 +757,17 @@ H5_trace(const double *returning, const char *func, const char *type, ...) case 'e': if(ptr) { if(vp) - fprintf(out, "0x%lx", (unsigned long)vp); + HDfprintf(out, "0x%lx", (unsigned long)vp); else - fprintf(out, "NULL"); + HDfprintf(out, "NULL"); } /* end if */ else { herr_t status = va_arg(ap, herr_t); if(status >= 0) - fprintf(out, "SUCCEED"); + HDfprintf(out, "SUCCEED"); else - fprintf(out, "FAIL"); + HDfprintf(out, "FAIL"); } /* end else */ break; @@ -776,24 +776,24 @@ H5_trace(const double *returning, const char *func, const char *type, ...) case 'd': if(ptr) { if(vp) - fprintf(out, "0x%lx", (unsigned long)vp); + HDfprintf(out, "0x%lx", (unsigned long)vp); else - fprintf(out, "NULL"); + HDfprintf(out, "NULL"); } /* end if */ else { H5E_direction_t direction = (H5E_direction_t)va_arg(ap, int); switch(direction) { case H5E_WALK_UPWARD: - fprintf(out, "H5E_WALK_UPWARD"); + HDfprintf(out, "H5E_WALK_UPWARD"); break; case H5E_WALK_DOWNWARD: - fprintf(out, "H5E_WALK_DOWNWARD"); + HDfprintf(out, "H5E_WALK_DOWNWARD"); break; default: - fprintf(out, "%ld", (long)direction); + HDfprintf(out, "%ld", (long)direction); break; } /* end switch */ } /* end else */ @@ -802,45 +802,45 @@ H5_trace(const double *returning, const char *func, const char *type, ...) case 'e': if(ptr) { if(vp) - fprintf(out, "0x%lx", (unsigned long)vp); + HDfprintf(out, "0x%lx", (unsigned long)vp); else - fprintf(out, "NULL"); + HDfprintf(out, "NULL"); } /* end if */ else { H5E_error2_t *error = va_arg(ap, H5E_error2_t *); - fprintf(out, "0x%lx", (unsigned long)error); + HDfprintf(out, "0x%lx", (unsigned long)error); } /* end else */ break; case 't': if(ptr) { if(vp) - fprintf(out, "0x%lx", (unsigned long)vp); + HDfprintf(out, "0x%lx", (unsigned long)vp); else - fprintf(out, "NULL"); + HDfprintf(out, "NULL"); } /* end if */ else { H5E_type_t etype = (H5E_type_t)va_arg(ap, int); switch(etype) { case H5E_MAJOR: - fprintf(out, "H5E_MAJOR"); + HDfprintf(out, "H5E_MAJOR"); break; case H5E_MINOR: - fprintf(out, "H5E_MINOR"); + HDfprintf(out, "H5E_MINOR"); break; default: - fprintf(out, "%ld", (long)etype); + HDfprintf(out, "%ld", (long)etype); break; } /* end switch */ } /* end else */ break; default: - fprintf(out, "BADTYPE(E%c)", type[1]); + HDfprintf(out, "BADTYPE(E%c)", type[1]); goto error; } /* end switch */ break; @@ -850,32 +850,32 @@ H5_trace(const double *returning, const char *func, const char *type, ...) case 'd': if(ptr) { if(vp) - fprintf(out, "0x%lx", (unsigned long)vp); + HDfprintf(out, "0x%lx", (unsigned long)vp); else - fprintf(out, "NULL"); + HDfprintf(out, "NULL"); } /* end if */ else { H5F_close_degree_t degree = (H5F_close_degree_t)va_arg(ap, int); switch(degree) { case H5F_CLOSE_DEFAULT: - fprintf(out, "H5F_CLOSE_DEFAULT"); + HDfprintf(out, "H5F_CLOSE_DEFAULT"); break; case H5F_CLOSE_WEAK: - fprintf(out, "H5F_CLOSE_WEAK"); + HDfprintf(out, "H5F_CLOSE_WEAK"); break; case H5F_CLOSE_SEMI: - fprintf(out, "H5F_CLOSE_SEMI"); + HDfprintf(out, "H5F_CLOSE_SEMI"); break; case H5F_CLOSE_STRONG: - fprintf(out, "H5F_CLOSE_STRONG"); + HDfprintf(out, "H5F_CLOSE_STRONG"); break; default: - fprintf(out, "%ld", (long)degree); + HDfprintf(out, "%ld", (long)degree); break; } /* end switch */ } /* end else */ @@ -884,33 +884,33 @@ H5_trace(const double *returning, const char *func, const char *type, ...) case 'f': if(ptr) { if(vp) - fprintf(out, "0x%lx", (unsigned long)vp); + HDfprintf(out, "0x%lx", (unsigned long)vp); else - fprintf(out, "NULL"); + HDfprintf(out, "NULL"); } /* end if */ else { H5F_fspace_strategy_t fs_strategy = (H5F_fspace_strategy_t)va_arg(ap, int); switch(fs_strategy) { case H5F_FSPACE_STRATEGY_FSM_AGGR: - fprintf(out, "H5F_FSPACE_STRATEGY_FSM_AGGR"); + HDfprintf(out, "H5F_FSPACE_STRATEGY_FSM_AGGR"); break; case H5F_FSPACE_STRATEGY_PAGE: - fprintf(out, "H5F_FSPACE_STRATEGY_PAGE"); + HDfprintf(out, "H5F_FSPACE_STRATEGY_PAGE"); break; case H5F_FSPACE_STRATEGY_AGGR: - fprintf(out, "H5F_FSPACE_STRATEGY_AGGR"); + HDfprintf(out, "H5F_FSPACE_STRATEGY_AGGR"); break; case H5F_FSPACE_STRATEGY_NONE: - fprintf(out, "H5F_FSPACE_STRATEGY_NONE"); + HDfprintf(out, "H5F_FSPACE_STRATEGY_NONE"); break; case H5F_FSPACE_STRATEGY_NTYPES: default: - fprintf(out, "%ld", (long)fs_strategy); + HDfprintf(out, "%ld", (long)fs_strategy); break; } /* end switch */ } /* end else */ @@ -919,49 +919,49 @@ H5_trace(const double *returning, const char *func, const char *type, ...) case 'm': if(ptr) { if(vp) - fprintf(out, "0x%lx", (unsigned long)vp); + HDfprintf(out, "0x%lx", (unsigned long)vp); else - fprintf(out, "NULL"); + HDfprintf(out, "NULL"); } /* end if */ else { H5F_mem_t mem_type = (H5F_mem_t)va_arg(ap, int); switch(mem_type) { case H5FD_MEM_NOLIST: - fprintf(out, "H5FD_MEM_NOLIST"); + HDfprintf(out, "H5FD_MEM_NOLIST"); break; case H5FD_MEM_DEFAULT: - fprintf(out, "H5FD_MEM_DEFAULT"); + HDfprintf(out, "H5FD_MEM_DEFAULT"); break; case H5FD_MEM_SUPER: - fprintf(out, "H5FD_MEM_SUPER"); + HDfprintf(out, "H5FD_MEM_SUPER"); break; case H5FD_MEM_BTREE: - fprintf(out, "H5FD_MEM_BTREE"); + HDfprintf(out, "H5FD_MEM_BTREE"); break; case H5FD_MEM_DRAW: - fprintf(out, "H5FD_MEM_DRAW"); + HDfprintf(out, "H5FD_MEM_DRAW"); break; case H5FD_MEM_GHEAP: - fprintf(out, "H5FD_MEM_GHEAP"); + HDfprintf(out, "H5FD_MEM_GHEAP"); break; case H5FD_MEM_LHEAP: - fprintf(out, "H5FD_MEM_LHEAP"); + HDfprintf(out, "H5FD_MEM_LHEAP"); break; case H5FD_MEM_OHDR: - fprintf(out, "H5FD_MEM_OHDR"); + HDfprintf(out, "H5FD_MEM_OHDR"); break; case H5FD_MEM_NTYPES: default: - fprintf(out, "%ld", (long)mem_type); + HDfprintf(out, "%ld", (long)mem_type); break; } /* end switch */ } /* end else */ @@ -970,24 +970,24 @@ H5_trace(const double *returning, const char *func, const char *type, ...) case 's': if(ptr) { if(vp) - fprintf(out, "0x%lx", (unsigned long)vp); + HDfprintf(out, "0x%lx", (unsigned long)vp); else - fprintf(out, "NULL"); + HDfprintf(out, "NULL"); } /* end if */ else { H5F_scope_t scope = (H5F_scope_t)va_arg(ap, int); switch(scope) { case H5F_SCOPE_LOCAL: - fprintf(out, "H5F_SCOPE_LOCAL"); + HDfprintf(out, "H5F_SCOPE_LOCAL"); break; case H5F_SCOPE_GLOBAL: - fprintf(out, "H5F_SCOPE_GLOBAL"); + HDfprintf(out, "H5F_SCOPE_GLOBAL"); break; default: - fprintf(out, "%ld", (long)scope); + HDfprintf(out, "%ld", (long)scope); break; } /* end switch */ } /* end else */ @@ -996,40 +996,47 @@ H5_trace(const double *returning, const char *func, const char *type, ...) case 't': if(ptr) { if(vp) - fprintf(out, "0x%lx", (unsigned long)vp); + HDfprintf(out, "0x%lx", (unsigned long)vp); else - fprintf(out, "NULL"); + HDfprintf(out, "NULL"); } /* end if */ break; case 'v': if(ptr) { if(vp) - fprintf(out, "0x%lx", (unsigned long)vp); + HDfprintf(out, "0x%lx", (unsigned long)vp); else - fprintf(out, "NULL"); + HDfprintf(out, "NULL"); } /* end if */ else { H5F_libver_t libver_vers = (H5F_libver_t)va_arg(ap, int); switch(libver_vers) { case H5F_LIBVER_EARLIEST: - fprintf(out, "H5F_LIBVER_EARLIEST"); + HDfprintf(out, "H5F_LIBVER_EARLIEST"); break; - case H5F_LIBVER_LATEST: - fprintf(out, "H5F_LIBVER_LATEST"); + case H5F_LIBVER_V18: + HDfprintf(out, "H5F_LIBVER_V18"); break; + case H5F_LIBVER_V110: + HDcompile_assert(H5F_LIBVER_LATEST == H5F_LIBVER_V110); + HDfprintf(out, "H5F_LIBVER_LATEST"); + break; + + case H5F_LIBVER_ERROR: + case H5F_LIBVER_NBOUNDS: default: - fprintf(out, "%ld", (long)libver_vers); + HDfprintf(out, "%ld", (long)libver_vers); break; } /* end switch */ } /* end else */ break; default: - fprintf(out, "BADTYPE(F%c)", type[1]); + HDfprintf(out, "BADTYPE(F%c)", type[1]); goto error; } /* end switch */ break; @@ -1040,46 +1047,46 @@ H5_trace(const double *returning, const char *func, const char *type, ...) case 'o': if(ptr) { if(vp) - fprintf(out, "0x%lx", (unsigned long)vp); + HDfprintf(out, "0x%lx", (unsigned long)vp); else - fprintf(out, "NULL"); + HDfprintf(out, "NULL"); } /* end if */ else { H5G_obj_t obj_type = (H5G_obj_t)va_arg(ap, int); switch(obj_type) { case H5G_UNKNOWN: - fprintf(out, "H5G_UNKNOWN"); + HDfprintf(out, "H5G_UNKNOWN"); break; case H5G_GROUP: - fprintf(out, "H5G_GROUP"); + HDfprintf(out, "H5G_GROUP"); break; case H5G_DATASET: - fprintf(out, "H5G_DATASET"); + HDfprintf(out, "H5G_DATASET"); break; case H5G_TYPE: - fprintf(out, "H5G_TYPE"); + HDfprintf(out, "H5G_TYPE"); break; case H5G_LINK: - fprintf(out, "H5G_LINK"); + HDfprintf(out, "H5G_LINK"); break; case H5G_UDLINK: - fprintf(out, "H5G_UDLINK"); + HDfprintf(out, "H5G_UDLINK"); break; case H5G_RESERVED_5: case H5G_RESERVED_6: case H5G_RESERVED_7: - fprintf(out, "H5G_RESERVED(%ld)", (long)obj_type); + HDfprintf(out, "H5G_RESERVED(%ld)", (long)obj_type); break; default: - fprintf(out, "%ld", (long)obj_type); + HDfprintf(out, "%ld", (long)obj_type); break; } /* end switch */ } /* end else */ @@ -1088,20 +1095,20 @@ H5_trace(const double *returning, const char *func, const char *type, ...) case 's': if(ptr) { if(vp) - fprintf (out, "0x%lx", (unsigned long)vp); + HDfprintf (out, "0x%lx", (unsigned long)vp); else - fprintf(out, "NULL"); + HDfprintf(out, "NULL"); } /* end if */ else { H5G_stat_t *statbuf = va_arg(ap, H5G_stat_t*); - fprintf(out, "0x%lx", (unsigned long)statbuf); + HDfprintf(out, "0x%lx", (unsigned long)statbuf); } break; #endif /* H5_NO_DEPRECATED_SYMBOLS */ default: - fprintf(out, "BADTYPE(G%c)", type[1]); + HDfprintf(out, "BADTYPE(G%c)", type[1]); goto error; } break; @@ -1109,22 +1116,22 @@ H5_trace(const double *returning, const char *func, const char *type, ...) case 'h': if(ptr) { if(vp) { - fprintf(out, "0x%lx", (unsigned long)vp); + HDfprintf(out, "0x%lx", (unsigned long)vp); if(asize_idx >= 0 && asize[asize_idx] >= 0) { hsize_t *p = (hsize_t *)vp; - fprintf(out, " {"); + HDfprintf(out, " {"); for(i = 0; i < asize[asize_idx]; i++) { if(H5S_UNLIMITED == p[i]) HDfprintf(out, "%sH5S_UNLIMITED", (i ? ", " : "")); else HDfprintf(out, "%s%Hu", (i ? ", " : ""), p[i]); } /* end for */ - fprintf(out, "}"); + HDfprintf(out, "}"); } /* end if */ } /* end if */ else - fprintf(out, "NULL"); + HDfprintf(out, "NULL"); } /* end if */ else { hsize_t hsize = va_arg(ap, hsize_t); @@ -1143,18 +1150,18 @@ H5_trace(const double *returning, const char *func, const char *type, ...) case 's': if(ptr) { if(vp) { - fprintf(out, "0x%lx", (unsigned long)vp); + HDfprintf(out, "0x%lx", (unsigned long)vp); if(asize_idx >= 0 && asize[asize_idx] >= 0) { hssize_t *p = (hssize_t *)vp; - fprintf(out, " {"); + HDfprintf(out, " {"); for(i = 0; i < asize[asize_idx]; i++) HDfprintf(out, "%s%Hd", (i ? ", " : ""), p[i]); - fprintf(out, "}"); + HDfprintf(out, "}"); } /* end if */ } /* end if */ else - fprintf(out, "NULL"); + HDfprintf(out, "NULL"); } /* end if */ else { hssize_t hssize = va_arg(ap, hssize_t); @@ -1165,7 +1172,7 @@ H5_trace(const double *returning, const char *func, const char *type, ...) break; default: - fprintf (out, "BADTYPE(H%c)", type[1]); + HDfprintf (out, "BADTYPE(H%c)", type[1]); goto error; } /* end switch */ break; @@ -1173,130 +1180,130 @@ H5_trace(const double *returning, const char *func, const char *type, ...) case 'i': if(ptr) { if(vp) - fprintf(out, "0x%lx", (unsigned long)vp); + HDfprintf(out, "0x%lx", (unsigned long)vp); else - fprintf(out, "NULL"); + HDfprintf(out, "NULL"); } /* end if */ else { hid_t obj = va_arg(ap, hid_t); if(H5P_DEFAULT == obj) - fprintf(out, "H5P_DEFAULT"); + HDfprintf(out, "H5P_DEFAULT"); else if(obj < 0) - fprintf(out, "FAIL"); + HDfprintf(out, "FAIL"); else { switch(H5I_TYPE(obj)) { /* Use internal H5I macro instead of function call */ case H5I_UNINIT: - fprintf(out, "%ld (uninit - error)", (long)obj); + HDfprintf(out, "%ld (uninit - error)", (long)obj); break; case H5I_BADID: - fprintf(out, "%ld (error)", (long)obj); + HDfprintf(out, "%ld (error)", (long)obj); break; case H5I_FILE: - fprintf(out, "%ld (file)", (long)obj); + HDfprintf(out, "%ld (file)", (long)obj); break; case H5I_GROUP: - fprintf(out, "%ld (group)", (long)obj); + HDfprintf(out, "%ld (group)", (long)obj); break; case H5I_DATATYPE: if(obj == H5T_NATIVE_SCHAR_g) - fprintf(out, "H5T_NATIVE_SCHAR"); + HDfprintf(out, "H5T_NATIVE_SCHAR"); else if(obj == H5T_NATIVE_UCHAR_g) - fprintf(out, "H5T_NATIVE_UCHAR"); + HDfprintf(out, "H5T_NATIVE_UCHAR"); else if(obj == H5T_NATIVE_SHORT_g) - fprintf(out, "H5T_NATIVE_SHORT"); + HDfprintf(out, "H5T_NATIVE_SHORT"); else if(obj == H5T_NATIVE_USHORT_g) - fprintf(out, "H5T_NATIVE_USHORT"); + HDfprintf(out, "H5T_NATIVE_USHORT"); else if(obj == H5T_NATIVE_INT_g) - fprintf(out, "H5T_NATIVE_INT"); + HDfprintf(out, "H5T_NATIVE_INT"); else if(obj == H5T_NATIVE_UINT_g) - fprintf(out, "H5T_NATIVE_UINT"); + HDfprintf(out, "H5T_NATIVE_UINT"); else if(obj == H5T_NATIVE_LONG_g) - fprintf(out, "H5T_NATIVE_LONG"); + HDfprintf(out, "H5T_NATIVE_LONG"); else if(obj == H5T_NATIVE_ULONG_g) - fprintf(out, "H5T_NATIVE_ULONG"); + HDfprintf(out, "H5T_NATIVE_ULONG"); else if(obj == H5T_NATIVE_LLONG_g) - fprintf(out, "H5T_NATIVE_LLONG"); + HDfprintf(out, "H5T_NATIVE_LLONG"); else if(obj == H5T_NATIVE_ULLONG_g) - fprintf(out, "H5T_NATIVE_ULLONG"); + HDfprintf(out, "H5T_NATIVE_ULLONG"); else if(obj == H5T_NATIVE_FLOAT_g) - fprintf(out, "H5T_NATIVE_FLOAT"); + HDfprintf(out, "H5T_NATIVE_FLOAT"); else if(obj == H5T_NATIVE_DOUBLE_g) - fprintf(out, "H5T_NATIVE_DOUBLE"); + HDfprintf(out, "H5T_NATIVE_DOUBLE"); #if H5_SIZEOF_LONG_DOUBLE !=0 else if(obj == H5T_NATIVE_LDOUBLE_g) - fprintf(out, "H5T_NATIVE_LDOUBLE"); + HDfprintf(out, "H5T_NATIVE_LDOUBLE"); #endif else if(obj == H5T_IEEE_F32BE_g) - fprintf(out, "H5T_IEEE_F32BE"); + HDfprintf(out, "H5T_IEEE_F32BE"); else if(obj == H5T_IEEE_F32LE_g) - fprintf(out, "H5T_IEEE_F32LE"); + HDfprintf(out, "H5T_IEEE_F32LE"); else if(obj == H5T_IEEE_F64BE_g) - fprintf(out, "H5T_IEEE_F64BE"); + HDfprintf(out, "H5T_IEEE_F64BE"); else if(obj == H5T_IEEE_F64LE_g) - fprintf(out, "H5T_IEEE_F64LE"); + HDfprintf(out, "H5T_IEEE_F64LE"); else if(obj == H5T_STD_I8BE_g) - fprintf(out, "H5T_STD_I8BE"); + HDfprintf(out, "H5T_STD_I8BE"); else if(obj == H5T_STD_I8LE_g) - fprintf(out, "H5T_STD_I8LE"); + HDfprintf(out, "H5T_STD_I8LE"); else if(obj == H5T_STD_I16BE_g) - fprintf(out, "H5T_STD_I16BE"); + HDfprintf(out, "H5T_STD_I16BE"); else if(obj == H5T_STD_I16LE_g) - fprintf(out, "H5T_STD_I16LE"); + HDfprintf(out, "H5T_STD_I16LE"); else if(obj == H5T_STD_I32BE_g) - fprintf(out, "H5T_STD_I32BE"); + HDfprintf(out, "H5T_STD_I32BE"); else if(obj == H5T_STD_I32LE_g) - fprintf(out, "H5T_STD_I32LE"); + HDfprintf(out, "H5T_STD_I32LE"); else if(obj == H5T_STD_I64BE_g) - fprintf(out, "H5T_STD_I64BE"); + HDfprintf(out, "H5T_STD_I64BE"); else if(obj == H5T_STD_I64LE_g) - fprintf(out, "H5T_STD_I64LE"); + HDfprintf(out, "H5T_STD_I64LE"); else if(obj == H5T_STD_U8BE_g) - fprintf(out, "H5T_STD_U8BE"); + HDfprintf(out, "H5T_STD_U8BE"); else if(obj == H5T_STD_U8LE_g) - fprintf(out, "H5T_STD_U8LE"); + HDfprintf(out, "H5T_STD_U8LE"); else if(obj == H5T_STD_U16BE_g) - fprintf(out, "H5T_STD_U16BE"); + HDfprintf(out, "H5T_STD_U16BE"); else if(obj == H5T_STD_U16LE_g) - fprintf(out, "H5T_STD_U16LE"); + HDfprintf(out, "H5T_STD_U16LE"); else if(obj == H5T_STD_U32BE_g) - fprintf(out, "H5T_STD_U32BE"); + HDfprintf(out, "H5T_STD_U32BE"); else if(obj == H5T_STD_U32LE_g) - fprintf(out, "H5T_STD_U32LE"); + HDfprintf(out, "H5T_STD_U32LE"); else if(obj == H5T_STD_U64BE_g) - fprintf(out, "H5T_STD_U64BE"); + HDfprintf(out, "H5T_STD_U64BE"); else if(obj == H5T_STD_U64LE_g) - fprintf(out, "H5T_STD_U64LE"); + HDfprintf(out, "H5T_STD_U64LE"); else if(obj == H5T_STD_B8BE_g) - fprintf(out, "H5T_STD_B8BE"); + HDfprintf(out, "H5T_STD_B8BE"); else if(obj == H5T_STD_B8LE_g) - fprintf(out, "H5T_STD_B8LE"); + HDfprintf(out, "H5T_STD_B8LE"); else if(obj == H5T_STD_B16BE_g) - fprintf(out, "H5T_STD_B16BE"); + HDfprintf(out, "H5T_STD_B16BE"); else if(obj == H5T_STD_B16LE_g) - fprintf(out, "H5T_STD_B16LE"); + HDfprintf(out, "H5T_STD_B16LE"); else if(obj == H5T_STD_B32BE_g) - fprintf(out, "H5T_STD_B32BE"); + HDfprintf(out, "H5T_STD_B32BE"); else if(obj == H5T_STD_B32LE_g) - fprintf(out, "H5T_STD_B32LE"); + HDfprintf(out, "H5T_STD_B32LE"); else if(obj == H5T_STD_B64BE_g) - fprintf(out, "H5T_STD_B64BE"); + HDfprintf(out, "H5T_STD_B64BE"); else if(obj == H5T_STD_B64LE_g) - fprintf(out, "H5T_STD_B64LE"); + HDfprintf(out, "H5T_STD_B64LE"); else if(obj == H5T_C_S1_g) - fprintf(out, "H5T_C_S1"); + HDfprintf(out, "H5T_C_S1"); else if(obj == H5T_FORTRAN_S1_g) - fprintf(out, "H5T_FORTRAN_S1"); + HDfprintf(out, "H5T_FORTRAN_S1"); else - fprintf(out, "%ld (dtype)", (long)obj); + HDfprintf(out, "%ld (dtype)", (long)obj); break; case H5I_DATASPACE: - fprintf(out, "%ld (dspace)", (long)obj); + HDfprintf(out, "%ld (dspace)", (long)obj); /* Save the rank of simple data spaces for arrays */ /* This may generate recursive call to the library... -QAK */ { @@ -1309,47 +1316,47 @@ H5_trace(const double *returning, const char *func, const char *type, ...) break; case H5I_DATASET: - fprintf(out, "%ld (dset)", (long)obj); + HDfprintf(out, "%ld (dset)", (long)obj); break; case H5I_ATTR: - fprintf(out, "%ld (attr)", (long)obj); + HDfprintf(out, "%ld (attr)", (long)obj); break; case H5I_REFERENCE: - fprintf(out, "%ld (reference)", (long)obj); + HDfprintf(out, "%ld (reference)", (long)obj); break; case H5I_VFL: - fprintf(out, "%ld (file driver)", (long)obj); + HDfprintf(out, "%ld (file driver)", (long)obj); break; case H5I_GENPROP_CLS: - fprintf(out, "%ld (genprop class)", (long)obj); + HDfprintf(out, "%ld (genprop class)", (long)obj); break; case H5I_GENPROP_LST: - fprintf(out, "%ld (genprop list)", (long)obj); + HDfprintf(out, "%ld (genprop list)", (long)obj); break; case H5I_ERROR_CLASS: - fprintf(out, "%ld (err class)", (long)obj); + HDfprintf(out, "%ld (err class)", (long)obj); break; case H5I_ERROR_MSG: - fprintf(out, "%ld (err msg)", (long)obj); + HDfprintf(out, "%ld (err msg)", (long)obj); break; case H5I_ERROR_STACK: - fprintf(out, "%ld (err stack)", (long)obj); + HDfprintf(out, "%ld (err stack)", (long)obj); break; case H5I_NTYPES: - fprintf (out, "%ld (ntypes - error)", (long)obj); + HDfprintf (out, "%ld (ntypes - error)", (long)obj); break; default: - fprintf(out, "%ld (unknown class)", (long)obj); + HDfprintf(out, "%ld (unknown class)", (long)obj); break; } /* end switch */ } /* end else */ @@ -1361,32 +1368,32 @@ H5_trace(const double *returning, const char *func, const char *type, ...) case 'i': if(ptr) { if(vp) - fprintf(out, "0x%lx", (unsigned long)vp); + HDfprintf(out, "0x%lx", (unsigned long)vp); else - fprintf(out, "NULL"); + HDfprintf(out, "NULL"); } /* end if */ else { H5_index_t idx_type = (H5_index_t)va_arg(ap, int); switch(idx_type) { case H5_INDEX_UNKNOWN: - fprintf(out, "H5_INDEX_UNKNOWN"); + HDfprintf(out, "H5_INDEX_UNKNOWN"); break; case H5_INDEX_NAME: - fprintf(out, "H5_INDEX_NAME"); + HDfprintf(out, "H5_INDEX_NAME"); break; case H5_INDEX_CRT_ORDER: - fprintf(out, "H5_INDEX_CRT_ORDER"); + HDfprintf(out, "H5_INDEX_CRT_ORDER"); break; case H5_INDEX_N: - fprintf(out, "H5_INDEX_N"); + HDfprintf(out, "H5_INDEX_N"); break; default: - fprintf(out, "%ld", (long)idx_type); + HDfprintf(out, "%ld", (long)idx_type); break; } /* end switch */ } /* end else */ @@ -1395,36 +1402,36 @@ H5_trace(const double *returning, const char *func, const char *type, ...) case 'o': if(ptr) { if(vp) - fprintf(out, "0x%lx", (unsigned long)vp); + HDfprintf(out, "0x%lx", (unsigned long)vp); else - fprintf(out, "NULL"); + HDfprintf(out, "NULL"); } /* end if */ else { H5_iter_order_t order = (H5_iter_order_t)va_arg(ap, int); switch(order) { case H5_ITER_UNKNOWN: - fprintf(out, "H5_ITER_UNKNOWN"); + HDfprintf(out, "H5_ITER_UNKNOWN"); break; case H5_ITER_INC: - fprintf(out, "H5_ITER_INC"); + HDfprintf(out, "H5_ITER_INC"); break; case H5_ITER_DEC: - fprintf(out, "H5_ITER_DEC"); + HDfprintf(out, "H5_ITER_DEC"); break; case H5_ITER_NATIVE: - fprintf(out, "H5_ITER_NATIVE"); + HDfprintf(out, "H5_ITER_NATIVE"); break; case H5_ITER_N: - fprintf(out, "H5_ITER_N"); + HDfprintf(out, "H5_ITER_N"); break; default: - fprintf(out, "%ld", (long)order); + HDfprintf(out, "%ld", (long)order); break; } /* end switch */ } /* end else */ @@ -1433,23 +1440,23 @@ H5_trace(const double *returning, const char *func, const char *type, ...) case 's': if(ptr) { if(vp) { - fprintf(out, "0x%lx", (unsigned long)vp); + HDfprintf(out, "0x%lx", (unsigned long)vp); if(asize_idx >= 0 && asize[asize_idx] >= 0) { int *p = (int*)vp; - fprintf(out, " {"); + HDfprintf(out, " {"); for(i = 0; i < asize[asize_idx]; i++) - fprintf(out, "%s%d", (i ? ", " : ""), p[i]); - fprintf(out, "}"); + HDfprintf(out, "%s%d", (i ? ", " : ""), p[i]); + HDfprintf(out, "}"); } /* end if */ } /* end if */ else - fprintf(out, "NULL"); + HDfprintf(out, "NULL"); } /* end if */ else { int is = va_arg(ap, int); - fprintf (out, "%d", is); + HDfprintf (out, "%d", is); asize[argno] = is; } /* end else */ break; @@ -1457,80 +1464,80 @@ H5_trace(const double *returning, const char *func, const char *type, ...) case 't': if(ptr) { if(vp) - fprintf(out, "0x%lx", (unsigned long)vp); + HDfprintf(out, "0x%lx", (unsigned long)vp); else - fprintf(out, "NULL"); + HDfprintf(out, "NULL"); } /* end if */ else { H5I_type_t id_type = (H5I_type_t)va_arg(ap, int); switch (id_type) { case H5I_UNINIT: - fprintf(out, "H5I_UNINIT"); + HDfprintf(out, "H5I_UNINIT"); break; case H5I_BADID: - fprintf(out, "H5I_BADID"); + HDfprintf(out, "H5I_BADID"); break; case H5I_FILE: - fprintf(out, "H5I_FILE"); + HDfprintf(out, "H5I_FILE"); break; case H5I_GROUP: - fprintf(out, "H5I_GROUP"); + HDfprintf(out, "H5I_GROUP"); break; case H5I_DATATYPE: - fprintf(out, "H5I_DATATYPE"); + HDfprintf(out, "H5I_DATATYPE"); break; case H5I_DATASPACE: - fprintf(out, "H5I_DATASPACE"); + HDfprintf(out, "H5I_DATASPACE"); break; case H5I_DATASET: - fprintf(out, "H5I_DATASET"); + HDfprintf(out, "H5I_DATASET"); break; case H5I_ATTR: - fprintf(out, "H5I_ATTR"); + HDfprintf(out, "H5I_ATTR"); break; case H5I_REFERENCE: - fprintf(out, "H5I_REFERENCE"); + HDfprintf(out, "H5I_REFERENCE"); break; case H5I_VFL: - fprintf(out, "H5I_VFL"); + HDfprintf(out, "H5I_VFL"); break; case H5I_GENPROP_CLS: - fprintf(out, "H5I_GENPROP_CLS"); + HDfprintf(out, "H5I_GENPROP_CLS"); break; case H5I_GENPROP_LST: - fprintf(out, "H5I_GENPROP_LST"); + HDfprintf(out, "H5I_GENPROP_LST"); break; case H5I_ERROR_CLASS: - fprintf(out, "H5I_ERROR_CLASS"); + HDfprintf(out, "H5I_ERROR_CLASS"); break; case H5I_ERROR_MSG: - fprintf(out, "H5I_ERROR_MSG"); + HDfprintf(out, "H5I_ERROR_MSG"); break; case H5I_ERROR_STACK: - fprintf(out, "H5I_ERROR_STACK"); + HDfprintf(out, "H5I_ERROR_STACK"); break; case H5I_NTYPES: - fprintf(out, "H5I_NTYPES"); + HDfprintf(out, "H5I_NTYPES"); break; default: - fprintf(out, "%ld", (long)id_type); + HDfprintf(out, "%ld", (long)id_type); break; } /* end switch */ } /* end else */ @@ -1539,29 +1546,29 @@ H5_trace(const double *returning, const char *func, const char *type, ...) case 'u': if(ptr) { if(vp) { - fprintf(out, "0x%lx", (unsigned long)vp); + HDfprintf(out, "0x%lx", (unsigned long)vp); if(asize_idx >= 0 && asize[asize_idx] >= 0) { unsigned *p = (unsigned*)vp; - fprintf(out, " {"); + HDfprintf(out, " {"); for(i = 0; i < asize[asize_idx]; i++) HDfprintf(out, "%s%u", i?", ":"", p[i]); - fprintf(out, "}"); + HDfprintf(out, "}"); } /* end if */ } /* end if */ else - fprintf(out, "NULL"); + HDfprintf(out, "NULL"); } /* end if */ else { unsigned iu = va_arg(ap, unsigned); - fprintf(out, "%u", iu); + HDfprintf(out, "%u", iu); asize[argno] = iu; } /* end else */ break; default: - fprintf (out, "BADTYPE(I%c)", type[1]); + HDfprintf (out, "BADTYPE(I%c)", type[1]); goto error; } /* end switch */ break; @@ -1571,43 +1578,43 @@ H5_trace(const double *returning, const char *func, const char *type, ...) case 'l': if(ptr) { if(vp) - fprintf (out, "0x%lx", (unsigned long)vp); + HDfprintf (out, "0x%lx", (unsigned long)vp); else - fprintf(out, "NULL"); + HDfprintf(out, "NULL"); } /* end if */ else { H5L_type_t link_type = (H5L_type_t)va_arg(ap, int); switch(link_type) { case H5L_TYPE_ERROR: - fprintf(out, "H5L_TYPE_ERROR"); + HDfprintf(out, "H5L_TYPE_ERROR"); break; case H5L_TYPE_HARD: - fprintf(out, "H5L_TYPE_HARD"); + HDfprintf(out, "H5L_TYPE_HARD"); break; case H5L_TYPE_SOFT: - fprintf(out, "H5L_TYPE_SOFT"); + HDfprintf(out, "H5L_TYPE_SOFT"); break; case H5L_TYPE_EXTERNAL: - fprintf(out, "H5L_TYPE_EXTERNAL"); + HDfprintf(out, "H5L_TYPE_EXTERNAL"); break; case H5L_TYPE_MAX: - fprintf(out, "H5L_TYPE_MAX"); + HDfprintf(out, "H5L_TYPE_MAX"); break; default: - fprintf(out, "%ld", (long)link_type); + HDfprintf(out, "%ld", (long)link_type); break; } /* end switch */ } /* end else */ break; default: - fprintf(out, "BADTYPE(G%c)", type[1]); + HDfprintf(out, "BADTYPE(G%c)", type[1]); goto error; } /* end switch */ break; @@ -1617,15 +1624,15 @@ H5_trace(const double *returning, const char *func, const char *type, ...) case 'c': if(ptr) { if(vp) - fprintf(out, "0x%lx", (unsigned long)vp); + HDfprintf(out, "0x%lx", (unsigned long)vp); else - fprintf(out, "NULL"); + HDfprintf(out, "NULL"); } /* end if */ #ifdef H5_HAVE_PARALLEL else { MPI_Comm comm = va_arg(ap, MPI_Comm); - fprintf(out, "%ld", (long)comm); + HDfprintf(out, "%ld", (long)comm); } /* end else */ #endif /* H5_HAVE_PARALLEL */ break; @@ -1633,15 +1640,15 @@ H5_trace(const double *returning, const char *func, const char *type, ...) case 'i': if(ptr) { if(vp) - fprintf(out, "0x%lx", (unsigned long)vp); + HDfprintf(out, "0x%lx", (unsigned long)vp); else - fprintf(out, "NULL"); + HDfprintf(out, "NULL"); } /* end if */ #ifdef H5_HAVE_PARALLEL else { MPI_Info info = va_arg(ap, MPI_Info); - fprintf(out, "%ld", (long)info); + HDfprintf(out, "%ld", (long)info); } /* end else */ #endif /* H5_HAVE_PARALLEL */ break; @@ -1649,52 +1656,52 @@ H5_trace(const double *returning, const char *func, const char *type, ...) case 't': if(ptr) { if(vp) - fprintf(out, "0x%lx", (unsigned long)vp); + HDfprintf(out, "0x%lx", (unsigned long)vp); else - fprintf(out, "NULL"); + HDfprintf(out, "NULL"); } /* end if */ else { H5FD_mem_t mt = (H5FD_mem_t)va_arg(ap, int); switch(mt) { case H5FD_MEM_NOLIST: - fprintf(out, "H5FD_MEM_NOLIST"); + HDfprintf(out, "H5FD_MEM_NOLIST"); break; case H5FD_MEM_DEFAULT: - fprintf(out, "H5FD_MEM_DEFAULT"); + HDfprintf(out, "H5FD_MEM_DEFAULT"); break; case H5FD_MEM_SUPER: - fprintf(out, "H5FD_MEM_SUPER"); + HDfprintf(out, "H5FD_MEM_SUPER"); break; case H5FD_MEM_BTREE: - fprintf(out, "H5FD_MEM_BTREE"); + HDfprintf(out, "H5FD_MEM_BTREE"); break; case H5FD_MEM_DRAW: - fprintf(out, "H5FD_MEM_DRAW"); + HDfprintf(out, "H5FD_MEM_DRAW"); break; case H5FD_MEM_GHEAP: - fprintf(out, "H5FD_MEM_GHEAP"); + HDfprintf(out, "H5FD_MEM_GHEAP"); break; case H5FD_MEM_LHEAP: - fprintf(out, "H5FD_MEM_LHEAP"); + HDfprintf(out, "H5FD_MEM_LHEAP"); break; case H5FD_MEM_OHDR: - fprintf(out, "H5FD_MEM_OHDR"); + HDfprintf(out, "H5FD_MEM_OHDR"); break; case H5FD_MEM_NTYPES: - fprintf(out, "H5FD_MEM_NTYPES"); + HDfprintf(out, "H5FD_MEM_NTYPES"); break; default: - fprintf(out, "%ld", (long)mt); + HDfprintf(out, "%ld", (long)mt); break; } /* end switch */ } /* end else */ @@ -1708,14 +1715,14 @@ H5_trace(const double *returning, const char *func, const char *type, ...) case 'o': if(ptr) { if(vp) - fprintf(out, "0x%lx", (unsigned long)vp); + HDfprintf(out, "0x%lx", (unsigned long)vp); else - fprintf(out, "NULL"); + HDfprintf(out, "NULL"); } /* end if */ else { off_t offset = va_arg(ap, off_t); - fprintf (out, "%ld", (long)offset); + HDfprintf (out, "%ld", (long)offset); } /* end else */ break; @@ -1724,43 +1731,43 @@ H5_trace(const double *returning, const char *func, const char *type, ...) case 't': if(ptr) { if(vp) - fprintf(out, "0x%lx", (unsigned long)vp); + HDfprintf(out, "0x%lx", (unsigned long)vp); else - fprintf(out, "NULL"); + HDfprintf(out, "NULL"); } /* end if */ else { H5O_type_t objtype = (H5O_type_t)va_arg(ap, int); switch(objtype) { case H5O_TYPE_UNKNOWN: - fprintf(out, "H5O_TYPE_UNKNOWN"); + HDfprintf(out, "H5O_TYPE_UNKNOWN"); break; case H5O_TYPE_GROUP: - fprintf(out, "H5O_TYPE_GROUP"); + HDfprintf(out, "H5O_TYPE_GROUP"); break; case H5O_TYPE_DATASET: - fprintf(out, "H5O_TYPE_DATASET"); + HDfprintf(out, "H5O_TYPE_DATASET"); break; case H5O_TYPE_NAMED_DATATYPE: - fprintf(out, "H5O_TYPE_NAMED_DATATYPE"); + HDfprintf(out, "H5O_TYPE_NAMED_DATATYPE"); break; case H5O_TYPE_NTYPES: - fprintf(out, "H5O_TYPE_TYPES"); + HDfprintf(out, "H5O_TYPE_TYPES"); break; default: - fprintf(out, "BADTYPE(%ld)", (long)objtype); + HDfprintf(out, "BADTYPE(%ld)", (long)objtype); break; } /* end switch */ } /* end else */ break; default: - fprintf(out, "BADTYPE(S%c)", type[1]); + HDfprintf(out, "BADTYPE(S%c)", type[1]); goto error; } /* end switch */ break; @@ -1768,9 +1775,9 @@ H5_trace(const double *returning, const char *func, const char *type, ...) case 'p': if(ptr) { if(vp) - fprintf(out, "0x%lx", (unsigned long)vp); + HDfprintf(out, "0x%lx", (unsigned long)vp); else - fprintf(out, "NULL"); + HDfprintf(out, "NULL"); } /* end if */ else { hid_t pclass_id = va_arg(ap, hid_t); @@ -1781,20 +1788,20 @@ H5_trace(const double *returning, const char *func, const char *type, ...) /* (This may generate recursive call to the library... -QAK) */ if(NULL != (pclass = (H5P_genclass_t *)H5I_object(pclass_id)) && NULL != (class_name = H5P_get_class_name(pclass))) { - fprintf(out, "%s", class_name); + HDfprintf(out, "%s", class_name); H5MM_xfree(class_name); } /* end if */ else - fprintf(out, "%ld", (long)pclass_id); + HDfprintf(out, "%ld", (long)pclass_id); } /* end else */ break; case 'r': if(ptr) { if(vp) - fprintf(out, "0x%lx", (unsigned long)vp); + HDfprintf(out, "0x%lx", (unsigned long)vp); else - fprintf(out, "NULL"); + HDfprintf(out, "NULL"); } /* end if */ else { hobj_ref_t ref = va_arg(ap, hobj_ref_t); @@ -1808,39 +1815,39 @@ H5_trace(const double *returning, const char *func, const char *type, ...) case 't': if(ptr) { if(vp) - fprintf(out, "0x%lx", (unsigned long)vp); + HDfprintf(out, "0x%lx", (unsigned long)vp); else - fprintf(out, "NULL"); + HDfprintf(out, "NULL"); } /* end if */ else { H5R_type_t reftype = (H5R_type_t)va_arg(ap, int); switch(reftype) { case H5R_BADTYPE: - fprintf(out, "H5R_BADTYPE"); + HDfprintf(out, "H5R_BADTYPE"); break; case H5R_OBJECT: - fprintf(out, "H5R_OBJECT"); + HDfprintf(out, "H5R_OBJECT"); break; case H5R_DATASET_REGION: - fprintf(out, "H5R_DATASET_REGION"); + HDfprintf(out, "H5R_DATASET_REGION"); break; case H5R_MAXTYPE: - fprintf(out, "H5R_MAXTYPE"); + HDfprintf(out, "H5R_MAXTYPE"); break; default: - fprintf(out, "BADTYPE(%ld)", (long)reftype); + HDfprintf(out, "BADTYPE(%ld)", (long)reftype); break; } /* end switch */ } /* end else */ break; default: - fprintf(out, "BADTYPE(S%c)", type[1]); + HDfprintf(out, "BADTYPE(S%c)", type[1]); goto error; } break; @@ -1850,32 +1857,32 @@ H5_trace(const double *returning, const char *func, const char *type, ...) case 'c': if(ptr) { if(vp) - fprintf(out, "0x%lx", (unsigned long)vp); + HDfprintf(out, "0x%lx", (unsigned long)vp); else - fprintf(out, "NULL"); + HDfprintf(out, "NULL"); } /* end if */ else { H5S_class_t cls = (H5S_class_t)va_arg(ap, int); switch(cls) { case H5S_NO_CLASS: - fprintf(out, "H5S_NO_CLASS"); + HDfprintf(out, "H5S_NO_CLASS"); break; case H5S_SCALAR: - fprintf(out, "H5S_SCALAR"); + HDfprintf(out, "H5S_SCALAR"); break; case H5S_SIMPLE: - fprintf(out, "H5S_SIMPLE"); + HDfprintf(out, "H5S_SIMPLE"); break; case H5S_NULL: - fprintf(out, "H5S_NULL"); + HDfprintf(out, "H5S_NULL"); break; default: - fprintf(out, "%ld", (long)cls); + HDfprintf(out, "%ld", (long)cls); break; } /* end switch */ } /* end else */ @@ -1884,56 +1891,56 @@ H5_trace(const double *returning, const char *func, const char *type, ...) case 's': if(ptr) { if(vp) - fprintf(out, "0x%lx", (unsigned long)vp); + HDfprintf(out, "0x%lx", (unsigned long)vp); else - fprintf(out, "NULL"); + HDfprintf(out, "NULL"); } /* end if */ else { H5S_seloper_t so = (H5S_seloper_t)va_arg(ap, int); switch(so) { case H5S_SELECT_NOOP: - fprintf(out, "H5S_NOOP"); + HDfprintf(out, "H5S_NOOP"); break; case H5S_SELECT_SET: - fprintf(out, "H5S_SELECT_SET"); + HDfprintf(out, "H5S_SELECT_SET"); break; case H5S_SELECT_OR: - fprintf(out, "H5S_SELECT_OR"); + HDfprintf(out, "H5S_SELECT_OR"); break; case H5S_SELECT_AND: - fprintf(out, "H5S_SELECT_AND"); + HDfprintf(out, "H5S_SELECT_AND"); break; case H5S_SELECT_XOR: - fprintf(out, "H5S_SELECT_XOR"); + HDfprintf(out, "H5S_SELECT_XOR"); break; case H5S_SELECT_NOTB: - fprintf(out, "H5S_SELECT_NOTB"); + HDfprintf(out, "H5S_SELECT_NOTB"); break; case H5S_SELECT_NOTA: - fprintf(out, "H5S_SELECT_NOTA"); + HDfprintf(out, "H5S_SELECT_NOTA"); break; case H5S_SELECT_APPEND: - fprintf(out, "H5S_SELECT_APPEND"); + HDfprintf(out, "H5S_SELECT_APPEND"); break; case H5S_SELECT_PREPEND: - fprintf(out, "H5S_SELECT_PREPEND"); + HDfprintf(out, "H5S_SELECT_PREPEND"); break; case H5S_SELECT_INVALID: - fprintf(out, "H5S_SELECT_INVALID"); + HDfprintf(out, "H5S_SELECT_INVALID"); break; default: - fprintf(out, "%ld", (long)so); + HDfprintf(out, "%ld", (long)so); break; } /* end switch */ } /* end else */ @@ -1942,47 +1949,47 @@ H5_trace(const double *returning, const char *func, const char *type, ...) case 't': if(ptr) { if(vp) - fprintf(out, "0x%lx", (unsigned long)vp); + HDfprintf(out, "0x%lx", (unsigned long)vp); else - fprintf(out, "NULL"); + HDfprintf(out, "NULL"); } /* end if */ else { H5S_sel_type st = (H5S_sel_type)va_arg(ap, int); switch(st) { case H5S_SEL_ERROR: - fprintf(out, "H5S_SEL_ERROR"); + HDfprintf(out, "H5S_SEL_ERROR"); break; case H5S_SEL_NONE: - fprintf(out, "H5S_SEL_NONE"); + HDfprintf(out, "H5S_SEL_NONE"); break; case H5S_SEL_POINTS: - fprintf(out, "H5S_SEL_POINTS"); + HDfprintf(out, "H5S_SEL_POINTS"); break; case H5S_SEL_HYPERSLABS: - fprintf(out, "H5S_SEL_HYPERSLABS"); + HDfprintf(out, "H5S_SEL_HYPERSLABS"); break; case H5S_SEL_ALL: - fprintf(out, "H5S_SEL_ALL"); + HDfprintf(out, "H5S_SEL_ALL"); break; case H5S_SEL_N: - fprintf(out, "H5S_SEL_N"); + HDfprintf(out, "H5S_SEL_N"); break; default: - fprintf(out, "%ld", (long)st); + HDfprintf(out, "%ld", (long)st); break; } /* end switch */ } /* end else */ break; default: - fprintf(out, "BADTYPE(S%c)", type[1]); + HDfprintf(out, "BADTYPE(S%c)", type[1]); goto error; } /* end switch */ break; @@ -1990,14 +1997,14 @@ H5_trace(const double *returning, const char *func, const char *type, ...) case 's': if(ptr) { if(vp) - fprintf(out, "0x%lx", (unsigned long)vp); + HDfprintf(out, "0x%lx", (unsigned long)vp); else - fprintf(out, "NULL"); + HDfprintf(out, "NULL"); } /* end if */ else { const char *str = va_arg(ap, const char *); - fprintf(out, "\"%s\"", str); + HDfprintf(out, "\"%s\"", str); } /* end else */ break; @@ -2006,24 +2013,24 @@ H5_trace(const double *returning, const char *func, const char *type, ...) case 'c': if(ptr) { if(vp) - fprintf(out, "0x%lx", (unsigned long)vp); + HDfprintf(out, "0x%lx", (unsigned long)vp); else - fprintf(out, "NULL"); + HDfprintf(out, "NULL"); } /* end if */ else { H5T_cset_t cset = (H5T_cset_t)va_arg(ap, int); switch(cset) { case H5T_CSET_ERROR: - fprintf(out, "H5T_CSET_ERROR"); + HDfprintf(out, "H5T_CSET_ERROR"); break; case H5T_CSET_ASCII: - fprintf(out, "H5T_CSET_ASCII"); + HDfprintf(out, "H5T_CSET_ASCII"); break; case H5T_CSET_UTF8: - fprintf(out, "H5T_CSET_UTF8"); + HDfprintf(out, "H5T_CSET_UTF8"); break; case H5T_CSET_RESERVED_2: @@ -2040,11 +2047,11 @@ H5_trace(const double *returning, const char *func, const char *type, ...) case H5T_CSET_RESERVED_13: case H5T_CSET_RESERVED_14: case H5T_CSET_RESERVED_15: - fprintf(out, "H5T_CSET_RESERVED_%ld", (long)cset); + HDfprintf(out, "H5T_CSET_RESERVED_%ld", (long)cset); break; default: - fprintf(out, "%ld", (long)cset); + HDfprintf(out, "%ld", (long)cset); break; } /* end switch */ } /* end else */ @@ -2053,28 +2060,28 @@ H5_trace(const double *returning, const char *func, const char *type, ...) case 'd': if(ptr) { if(vp) - fprintf(out, "0x%lx", (unsigned long)vp); + HDfprintf(out, "0x%lx", (unsigned long)vp); else - fprintf(out, "NULL"); + HDfprintf(out, "NULL"); } /* end if */ else { H5T_direction_t direct = (H5T_direction_t)va_arg(ap, int); switch(direct) { case H5T_DIR_DEFAULT: - fprintf(out, "H5T_DIR_DEFAULT"); + HDfprintf(out, "H5T_DIR_DEFAULT"); break; case H5T_DIR_ASCEND: - fprintf(out, "H5T_DIR_ASCEND"); + HDfprintf(out, "H5T_DIR_ASCEND"); break; case H5T_DIR_DESCEND: - fprintf(out, "H5T_DIR_DESCEND"); + HDfprintf(out, "H5T_DIR_DESCEND"); break; default: - fprintf(out, "%ld", (long)direct); + HDfprintf(out, "%ld", (long)direct); break; } /* end switch */ } /* end else */ @@ -2083,28 +2090,28 @@ H5_trace(const double *returning, const char *func, const char *type, ...) case 'e': if(ptr) { if(vp) - fprintf(out, "0x%lx", (unsigned long)vp); + HDfprintf(out, "0x%lx", (unsigned long)vp); else - fprintf(out, "NULL"); + HDfprintf(out, "NULL"); } /* end if */ else { H5T_pers_t pers = (H5T_pers_t)va_arg(ap, int); switch(pers) { case H5T_PERS_DONTCARE: - fprintf(out, "H5T_PERS_DONTCARE"); + HDfprintf(out, "H5T_PERS_DONTCARE"); break; case H5T_PERS_SOFT: - fprintf(out, "H5T_PERS_SOFT"); + HDfprintf(out, "H5T_PERS_SOFT"); break; case H5T_PERS_HARD: - fprintf(out, "H5T_PERS_HARD"); + HDfprintf(out, "H5T_PERS_HARD"); break; default: - fprintf(out, "%ld", (long)pers); + HDfprintf(out, "%ld", (long)pers); break; } /* end switch */ } /* end else */ @@ -2113,32 +2120,32 @@ H5_trace(const double *returning, const char *func, const char *type, ...) case 'n': if(ptr) { if(vp) - fprintf(out, "0x%lx", (unsigned long)vp); + HDfprintf(out, "0x%lx", (unsigned long)vp); else - fprintf(out, "NULL"); + HDfprintf(out, "NULL"); } /* end if */ else { H5T_norm_t norm = (H5T_norm_t)va_arg(ap, int); switch(norm) { case H5T_NORM_ERROR: - fprintf(out, "H5T_NORM_ERROR"); + HDfprintf(out, "H5T_NORM_ERROR"); break; case H5T_NORM_IMPLIED: - fprintf(out, "H5T_NORM_IMPLIED"); + HDfprintf(out, "H5T_NORM_IMPLIED"); break; case H5T_NORM_MSBSET: - fprintf(out, "H5T_NORM_MSBSET"); + HDfprintf(out, "H5T_NORM_MSBSET"); break; case H5T_NORM_NONE: - fprintf(out, "H5T_NORM_NONE"); + HDfprintf(out, "H5T_NORM_NONE"); break; default: - fprintf(out, "%ld", (long)norm); + HDfprintf(out, "%ld", (long)norm); break; } /* end switch */ } /* end else */ @@ -2147,40 +2154,40 @@ H5_trace(const double *returning, const char *func, const char *type, ...) case 'o': if(ptr) { if(vp) - fprintf(out, "0x%lx", (unsigned long)vp); + HDfprintf(out, "0x%lx", (unsigned long)vp); else - fprintf(out, "NULL"); + HDfprintf(out, "NULL"); } /* end if */ else { H5T_order_t order = (H5T_order_t)va_arg(ap, int); switch(order) { case H5T_ORDER_ERROR: - fprintf(out, "H5T_ORDER_ERROR"); + HDfprintf(out, "H5T_ORDER_ERROR"); break; case H5T_ORDER_LE: - fprintf(out, "H5T_ORDER_LE"); + HDfprintf(out, "H5T_ORDER_LE"); break; case H5T_ORDER_BE: - fprintf(out, "H5T_ORDER_BE"); + HDfprintf(out, "H5T_ORDER_BE"); break; case H5T_ORDER_VAX: - fprintf(out, "H5T_ORDER_VAX"); + HDfprintf(out, "H5T_ORDER_VAX"); break; case H5T_ORDER_MIXED: - fprintf(out, "H5T_ORDER_MIXED"); + HDfprintf(out, "H5T_ORDER_MIXED"); break; case H5T_ORDER_NONE: - fprintf(out, "H5T_ORDER_NONE"); + HDfprintf(out, "H5T_ORDER_NONE"); break; default: - fprintf(out, "%ld", (long)order); + HDfprintf(out, "%ld", (long)order); break; } /* end switch */ } /* end else */ @@ -2189,36 +2196,36 @@ H5_trace(const double *returning, const char *func, const char *type, ...) case 'p': if(ptr) { if(vp) - fprintf(out, "0x%lx", (unsigned long)vp); + HDfprintf(out, "0x%lx", (unsigned long)vp); else - fprintf(out, "NULL"); + HDfprintf(out, "NULL"); } /* end if */ else { H5T_pad_t pad = (H5T_pad_t)va_arg(ap, int); switch(pad) { case H5T_PAD_ERROR: - fprintf(out, "H5T_PAD_ERROR"); + HDfprintf(out, "H5T_PAD_ERROR"); break; case H5T_PAD_ZERO: - fprintf(out, "H5T_PAD_ZERO"); + HDfprintf(out, "H5T_PAD_ZERO"); break; case H5T_PAD_ONE: - fprintf(out, "H5T_PAD_ONE"); + HDfprintf(out, "H5T_PAD_ONE"); break; case H5T_PAD_BACKGROUND: - fprintf(out, "H5T_PAD_BACKGROUND"); + HDfprintf(out, "H5T_PAD_BACKGROUND"); break; case H5T_NPAD: - fprintf(out, "H5T_NPAD"); + HDfprintf(out, "H5T_NPAD"); break; default: - fprintf(out, "%ld", (long)pad); + HDfprintf(out, "%ld", (long)pad); break; } /* end switch */ } /* end else */ @@ -2227,32 +2234,32 @@ H5_trace(const double *returning, const char *func, const char *type, ...) case 's': if(ptr) { if(vp) - fprintf(out, "0x%lx", (unsigned long)vp); + HDfprintf(out, "0x%lx", (unsigned long)vp); else - fprintf(out, "NULL"); + HDfprintf(out, "NULL"); } /* end if */ else { H5T_sign_t sign = (H5T_sign_t)va_arg(ap, int); switch(sign) { case H5T_SGN_ERROR: - fprintf(out, "H5T_SGN_ERROR"); + HDfprintf(out, "H5T_SGN_ERROR"); break; case H5T_SGN_NONE: - fprintf(out, "H5T_SGN_NONE"); + HDfprintf(out, "H5T_SGN_NONE"); break; case H5T_SGN_2: - fprintf(out, "H5T_SGN_2"); + HDfprintf(out, "H5T_SGN_2"); break; case H5T_NSGN: - fprintf(out, "H5T_NSGN"); + HDfprintf(out, "H5T_NSGN"); break; default: - fprintf(out, "%ld", (long)sign); + HDfprintf(out, "%ld", (long)sign); break; } /* end switch */ } /* end else */ @@ -2261,68 +2268,68 @@ H5_trace(const double *returning, const char *func, const char *type, ...) case 't': if(ptr) { if(vp) - fprintf(out, "0x%lx", (unsigned long)vp); + HDfprintf(out, "0x%lx", (unsigned long)vp); else - fprintf(out, "NULL"); + HDfprintf(out, "NULL"); } /* end if */ else { H5T_class_t type_class = (H5T_class_t)va_arg(ap, int); switch(type_class) { case H5T_NO_CLASS: - fprintf(out, "H5T_NO_CLASS"); + HDfprintf(out, "H5T_NO_CLASS"); break; case H5T_INTEGER: - fprintf(out, "H5T_INTEGER"); + HDfprintf(out, "H5T_INTEGER"); break; case H5T_FLOAT: - fprintf(out, "H5T_FLOAT"); + HDfprintf(out, "H5T_FLOAT"); break; case H5T_TIME: - fprintf(out, "H5T_TIME"); + HDfprintf(out, "H5T_TIME"); break; case H5T_STRING: - fprintf(out, "H5T_STRING"); + HDfprintf(out, "H5T_STRING"); break; case H5T_BITFIELD: - fprintf(out, "H5T_BITFIELD"); + HDfprintf(out, "H5T_BITFIELD"); break; case H5T_OPAQUE: - fprintf(out, "H5T_OPAQUE"); + HDfprintf(out, "H5T_OPAQUE"); break; case H5T_COMPOUND: - fprintf(out, "H5T_COMPOUND"); + HDfprintf(out, "H5T_COMPOUND"); break; case H5T_REFERENCE: - fprintf(out, "H5T_REFERENCE"); + HDfprintf(out, "H5T_REFERENCE"); break; case H5T_ENUM: - fprintf(out, "H5T_ENUM"); + HDfprintf(out, "H5T_ENUM"); break; case H5T_VLEN: - fprintf(out, "H5T_VLEN"); + HDfprintf(out, "H5T_VLEN"); break; case H5T_ARRAY: - fprintf(out, "H5T_ARRAY"); + HDfprintf(out, "H5T_ARRAY"); break; case H5T_NCLASSES: - fprintf(out, "H5T_NCLASSES"); + HDfprintf(out, "H5T_NCLASSES"); break; default: - fprintf(out, "%ld", (long)type_class); + HDfprintf(out, "%ld", (long)type_class); break; } /* end switch */ } /* end else */ @@ -2331,28 +2338,28 @@ H5_trace(const double *returning, const char *func, const char *type, ...) case 'z': if(ptr) { if(vp) - fprintf(out, "0x%lx", (unsigned long)vp); + HDfprintf(out, "0x%lx", (unsigned long)vp); else - fprintf(out, "NULL"); + HDfprintf(out, "NULL"); } /* end if */ else { H5T_str_t str = (H5T_str_t)va_arg(ap, int); switch(str) { case H5T_STR_ERROR: - fprintf(out, "H5T_STR_ERROR"); + HDfprintf(out, "H5T_STR_ERROR"); break; case H5T_STR_NULLTERM: - fprintf(out, "H5T_STR_NULLTERM"); + HDfprintf(out, "H5T_STR_NULLTERM"); break; case H5T_STR_NULLPAD: - fprintf(out, "H5T_STR_NULLPAD"); + HDfprintf(out, "H5T_STR_NULLPAD"); break; case H5T_STR_SPACEPAD: - fprintf(out, "H5T_STR_SPACEPAD"); + HDfprintf(out, "H5T_STR_SPACEPAD"); break; case H5T_STR_RESERVED_3: @@ -2368,18 +2375,18 @@ H5_trace(const double *returning, const char *func, const char *type, ...) case H5T_STR_RESERVED_13: case H5T_STR_RESERVED_14: case H5T_STR_RESERVED_15: - fprintf(out, "H5T_STR_RESERVED(%ld)",(long)str); + HDfprintf(out, "H5T_STR_RESERVED(%ld)",(long)str); break; default: - fprintf(out, "%ld", (long)str); + HDfprintf(out, "%ld", (long)str); break; } /* end switch */ } /* end else */ break; default: - fprintf (out, "BADTYPE(T%c)", type[1]); + HDfprintf (out, "BADTYPE(T%c)", type[1]); goto error; } /* end switch */ break; @@ -2387,19 +2394,19 @@ H5_trace(const double *returning, const char *func, const char *type, ...) case 't': if(ptr) { if(vp) - fprintf(out, "0x%lx", (unsigned long)vp); + HDfprintf(out, "0x%lx", (unsigned long)vp); else - fprintf(out, "NULL"); + HDfprintf(out, "NULL"); } /* end if */ else { htri_t tri_var = va_arg (ap, htri_t); if(tri_var>0) - fprintf (out, "TRUE"); + HDfprintf (out, "TRUE"); else if(!tri_var) - fprintf (out, "FALSE"); + HDfprintf (out, "FALSE"); else - fprintf(out, "FAIL(%d)", (int)tri_var); + HDfprintf(out, "FAIL(%d)", (int)tri_var); } /* end else */ break; @@ -2408,23 +2415,23 @@ H5_trace(const double *returning, const char *func, const char *type, ...) case 'l': if(ptr) { if(vp) { - fprintf(out, "0x%lx", (unsigned long)vp); + HDfprintf(out, "0x%lx", (unsigned long)vp); if(asize_idx >= 0 && asize[asize_idx] >= 0) { unsigned long *p = (unsigned long *)vp; - fprintf(out, " {"); + HDfprintf(out, " {"); for(i = 0; i < asize[asize_idx]; i++) HDfprintf(out, "%s%lu", i?", ":"", p[i]); - fprintf(out, "}"); + HDfprintf(out, "}"); } /* end if */ } /* end if */ else - fprintf(out, "NULL"); + HDfprintf(out, "NULL"); } /* end if */ else { unsigned long iul = va_arg(ap, unsigned long); - fprintf(out, "%lu", iul); + HDfprintf(out, "%lu", iul); asize[argno] = (hssize_t)iul; } /* end else */ break; @@ -2432,29 +2439,29 @@ H5_trace(const double *returning, const char *func, const char *type, ...) case 'L': if(ptr) { if(vp) { - fprintf(out, "0x%lx", (unsigned long)vp); + HDfprintf(out, "0x%lx", (unsigned long)vp); if(asize_idx >= 0 && asize[asize_idx] >= 0) { unsigned long long *p = (unsigned long long *)vp; - fprintf(out, " {"); + HDfprintf(out, " {"); for(i = 0; i < asize[asize_idx]; i++) HDfprintf(out, "%s%llu", i?", ":"", p[i]); - fprintf(out, "}"); + HDfprintf(out, "}"); } /* end if */ } /* end if */ else - fprintf(out, "NULL"); + HDfprintf(out, "NULL"); } /* end if */ else { unsigned long long iull = va_arg(ap, unsigned long long); - fprintf(out, "%llu", iull); + HDfprintf(out, "%llu", iull); asize[argno] = (hssize_t)iull; } /* end else */ break; default: - fprintf (out, "BADTYPE(U%c)", type[1]); + HDfprintf (out, "BADTYPE(U%c)", type[1]); goto error; } /* end switch */ break; @@ -2462,48 +2469,48 @@ H5_trace(const double *returning, const char *func, const char *type, ...) case 'x': if(ptr) { if(vp) { - fprintf(out, "0x%lx", (unsigned long)vp); + HDfprintf(out, "0x%lx", (unsigned long)vp); if(asize_idx >= 0 && asize[asize_idx] >= 0) { void **p = (void**)vp; - fprintf(out, " {"); + HDfprintf(out, " {"); for(i = 0; i < asize[asize_idx]; i++) { if(p[i]) - fprintf(out, "%s0x%lx", (i ? ", " : ""), (unsigned long)(p[i])); + HDfprintf(out, "%s0x%lx", (i ? ", " : ""), (unsigned long)(p[i])); else - fprintf(out, "%sNULL", (i ? ", " : "")); + HDfprintf(out, "%sNULL", (i ? ", " : "")); } /* end for */ - fprintf(out, "}"); + HDfprintf(out, "}"); } /* end if */ } /* end if */ else - fprintf(out, "NULL"); + HDfprintf(out, "NULL"); } /* end if */ else { vp = va_arg (ap, void *); if(vp) - fprintf(out, "0x%lx", (unsigned long)vp); + HDfprintf(out, "0x%lx", (unsigned long)vp); else - fprintf(out, "NULL"); + HDfprintf(out, "NULL"); } /* end else */ break; case 'z': if(ptr) { if(vp) { - fprintf(out, "0x%lx", (unsigned long)vp); + HDfprintf(out, "0x%lx", (unsigned long)vp); if(asize_idx >= 0 && asize[asize_idx] >= 0) { size_t *p = (size_t *)vp; - fprintf(out, " {"); + HDfprintf(out, " {"); for(i = 0; i < asize[asize_idx]; i++) HDfprintf(out, "%s%Zu", (i ? ", " : ""), p[i]); - fprintf(out, "}"); + HDfprintf(out, "}"); } /* end if */ } /* end if */ else - fprintf(out, "NULL"); + HDfprintf(out, "NULL"); } /* end if */ else { size_t size = va_arg(ap, size_t); @@ -2518,28 +2525,28 @@ H5_trace(const double *returning, const char *func, const char *type, ...) case 'a': if(ptr) { if(vp) - fprintf(out, "0x%lx", (unsigned long)vp); + HDfprintf(out, "0x%lx", (unsigned long)vp); else - fprintf(out, "NULL"); + HDfprintf(out, "NULL"); } /* end if */ else { H5Z_SO_scale_type_t scale_type = (H5Z_SO_scale_type_t)va_arg(ap, int); switch(scale_type) { case H5Z_SO_FLOAT_DSCALE: - fprintf(out, "H5Z_SO_FLOAT_DSCALE"); + HDfprintf(out, "H5Z_SO_FLOAT_DSCALE"); break; case H5Z_SO_FLOAT_ESCALE: - fprintf(out, "H5Z_SO_FLOAT_ESCALE"); + HDfprintf(out, "H5Z_SO_FLOAT_ESCALE"); break; case H5Z_SO_INT: - fprintf(out, "H5Z_SO_INT"); + HDfprintf(out, "H5Z_SO_INT"); break; default: - fprintf(out, "%ld", (long)scale_type); + HDfprintf(out, "%ld", (long)scale_type); break; } /* end switch */ } /* end else */ @@ -2548,68 +2555,68 @@ H5_trace(const double *returning, const char *func, const char *type, ...) case 'c': if(ptr) { if(vp) - fprintf(out, "0x%lx", (unsigned long)vp); + HDfprintf(out, "0x%lx", (unsigned long)vp); else - fprintf(out, "NULL"); + HDfprintf(out, "NULL"); } /* end if */ else { H5Z_class2_t *filter = va_arg(ap, H5Z_class2_t*); - fprintf(out, "0x%lx", (unsigned long)filter); + HDfprintf(out, "0x%lx", (unsigned long)filter); } /* end else */ break; case 'e': if(ptr) { if(vp) - fprintf(out, "0x%lx", (unsigned long)vp); + HDfprintf(out, "0x%lx", (unsigned long)vp); else - fprintf(out, "NULL"); + HDfprintf(out, "NULL"); } /* end if */ else { H5Z_EDC_t edc = (H5Z_EDC_t)va_arg(ap, int); if(H5Z_DISABLE_EDC == edc) - fprintf(out, "H5Z_DISABLE_EDC"); + HDfprintf(out, "H5Z_DISABLE_EDC"); else if (H5Z_ENABLE_EDC == edc) - fprintf(out, "H5Z_ENABLE_EDC"); + HDfprintf(out, "H5Z_ENABLE_EDC"); else - fprintf(out, "%ld", (long)edc); + HDfprintf(out, "%ld", (long)edc); } /* end else */ break; case 'f': if(ptr) { if(vp) - fprintf(out, "0x%lx", (unsigned long)vp); + HDfprintf(out, "0x%lx", (unsigned long)vp); else - fprintf(out, "NULL"); + HDfprintf(out, "NULL"); } /* end if */ else { H5Z_filter_t id = va_arg(ap, H5Z_filter_t); if(H5Z_FILTER_DEFLATE == id) - fprintf(out, "H5Z_FILTER_DEFLATE"); + HDfprintf(out, "H5Z_FILTER_DEFLATE"); else - fprintf(out, "%ld", (long)id); + HDfprintf(out, "%ld", (long)id); } /* end else */ break; case 's': if(ptr) { if(vp) { - fprintf(out, "0x%lx", (unsigned long)vp); + HDfprintf(out, "0x%lx", (unsigned long)vp); if(asize_idx >= 0 && asize[asize_idx] >= 0) { ssize_t *p = (ssize_t *)vp; - fprintf(out, " {"); + HDfprintf(out, " {"); for(i = 0; i < asize[asize_idx]; i++) HDfprintf(out, "%s%Zd", (i ? ", " : ""), p[i]); - fprintf(out, "}"); + HDfprintf(out, "}"); } /* end if */ } /* end if */ else - fprintf(out, "NULL"); + HDfprintf(out, "NULL"); } /* end if */ else { ssize_t ssize = va_arg(ap, ssize_t); @@ -2620,32 +2627,32 @@ H5_trace(const double *returning, const char *func, const char *type, ...) break; default: - fprintf(out, "BADTYPE(Z%c)", type[1]); + HDfprintf(out, "BADTYPE(Z%c)", type[1]); goto error; } /* end switch */ break; default: if(HDisupper(type[0])) - fprintf(out, "BADTYPE(%c%c)", type[0], type[1]); + HDfprintf(out, "BADTYPE(%c%c)", type[0], type[1]); else - fprintf(out, "BADTYPE(%c)", type[0]); + HDfprintf(out, "BADTYPE(%c)", type[0]); goto error; } /* end switch */ } /* end for */ /* Display event time for return */ if(returning && H5_debug_g.ttimes) - fprintf(out, " @%.6f [dt=%.6f]", (event_time.etime - first_time.etime), + HDfprintf(out, " @%.6f [dt=%.6f]", (event_time.etime - first_time.etime), (event_time.etime - *returning)); error: va_end(ap); if(returning) - fprintf(out, ";\n"); + HDfprintf(out, ";\n"); else { last_call_depth = current_depth++; - fprintf (out, ")"); + HDfprintf (out, ")"); } /* end else */ HDfflush(out); diff --git a/test/CMakeTests.cmake b/test/CMakeTests.cmake index f97e304..221b857 100644 --- a/test/CMakeTests.cmake +++ b/test/CMakeTests.cmake @@ -1018,6 +1018,7 @@ if (HDF5_BUILD_GENERATORS) gen_bad_offset gen_bad_ohdr gen_bogus + gen_bounds gen_cross gen_deflate gen_filters diff --git a/test/CMakeVFDTests.cmake b/test/CMakeVFDTests.cmake index 995f4e0..be02110 100644 --- a/test/CMakeVFDTests.cmake +++ b/test/CMakeVFDTests.cmake @@ -32,8 +32,12 @@ endif () foreach (vfdtest ${VFD_LIST}) file (MAKE_DIRECTORY "${PROJECT_BINARY_DIR}/${vfdtest}") + file (MAKE_DIRECTORY "${PROJECT_BINARY_DIR}/${vfdtest}/testfiles") + file (MAKE_DIRECTORY "${PROJECT_BINARY_DIR}/${vfdtest}/testfiles/plist_files") if (BUILD_SHARED_LIBS) file (MAKE_DIRECTORY "${PROJECT_BINARY_DIR}/${vfdtest}-shared") + file (MAKE_DIRECTORY "${PROJECT_BINARY_DIR}/${vfdtest}-shared/testfiles") + file (MAKE_DIRECTORY "${PROJECT_BINARY_DIR}/${vfdtest}-shared/testfiles/plist_files") endif () endforeach () @@ -64,6 +68,17 @@ foreach (vfdtest ${VFD_LIST}) endforeach () endforeach () +foreach (vfdtest ${VFD_LIST}) + foreach (plistfile ${HDF5_REFERENCE_PLIST_FILES}) + HDFTEST_COPY_FILE("${HDF5_TEST_SOURCE_DIR}/testfiles/plist_files/${plistfile}" "${PROJECT_BINARY_DIR}/${vfdtest}/testfiles/plist_files/${plistfile}" "HDF5_VFDTEST_LIB_files") + HDFTEST_COPY_FILE("${HDF5_TEST_SOURCE_DIR}/testfiles/plist_files/def_${plistfile}" "${PROJECT_BINARY_DIR}/${vfdtest}/testfiles/plist_files/def_${plistfile}" "HDF5_VFDTEST_LIB_files") + if (BUILD_SHARED_LIBS) + HDFTEST_COPY_FILE("${HDF5_TEST_SOURCE_DIR}/testfiles/plist_files/${plistfile}" "${PROJECT_BINARY_DIR}/${vfdtest}-shared/testfiles/plist_files/${plistfile}" "HDF5_VFDTEST_LIBSH_files") + HDFTEST_COPY_FILE("${HDF5_TEST_SOURCE_DIR}/testfiles/plist_files/def_${plistfile}" "${PROJECT_BINARY_DIR}/${vfdtest}-shared/testfiles/plist_files/def_${plistfile}" "HDF5_VFDTEST_LIBSH_files") + endif () + endforeach () +endforeach () + add_custom_target(HDF5_VFDTEST_LIB_files ALL COMMENT "Copying files needed by HDF5_VFDTEST_LIB tests" DEPENDS ${HDF5_VFDTEST_LIB_files_list}) if (BUILD_SHARED_LIBS) add_custom_target(HDF5_VFDTEST_LIBSH_files ALL COMMENT "Copying files needed by HDF5_VFDTEST_LIBSH tests" DEPENDS ${HDF5_VFDTEST_LIBSH_files_list}) diff --git a/test/Makefile.am b/test/Makefile.am index efdc1ca..ab81f50 100644 --- a/test/Makefile.am +++ b/test/Makefile.am @@ -95,7 +95,7 @@ endif BUILD_ALL_PROGS=gen_bad_ohdr gen_bogus gen_cross gen_deflate gen_filters gen_new_array \ gen_new_fill gen_new_group gen_new_mtime gen_new_super gen_noencoder \ gen_nullspace gen_udlinks space_overflow gen_filespace gen_specmetaread \ - gen_sizes_lheap gen_file_image gen_plist gen_bad_offset + gen_sizes_lheap gen_file_image gen_plist gen_bad_offset gen_bounds if BUILD_ALL_CONDITIONAL noinst_PROGRAMS=$(BUILD_ALL_PROGS) diff --git a/test/dangle.c b/test/dangle.c index 62b1d1b..75e9c84 100644 --- a/test/dangle.c +++ b/test/dangle.c @@ -31,17 +31,17 @@ const char *FILENAME[] = { #define TYPENAME "Type" #define ATTRNAME "Attribute" - + /*------------------------------------------------------------------------- - * Function: test_dangle_dataset + * Function: test_dangle_dataset * - * Purpose: Check for dangling dataset IDs causing problems on library + * Purpose: Check for dangling dataset IDs causing problems on library * shutdown * - * Return: Success: zero - * Failure: non-zero + * Return: Success: zero + * Failure: non-zero * - * Programmer: Quincey Koziol + * Programmer: Quincey Koziol * Tuesday, May 13, 2003 * * Modifications: @@ -51,7 +51,7 @@ const char *FILENAME[] = { static int test_dangle_dataset(H5F_close_degree_t degree) { - char filename[1024]; + char filename[1024]; hid_t fid; /* File ID */ hid_t fapl; /* File access property list */ hid_t dsid; /* Dataset ID */ @@ -127,17 +127,17 @@ error: return 1; } - + /*------------------------------------------------------------------------- - * Function: test_dangle_group + * Function: test_dangle_group * - * Purpose: Check for dangling group IDs causing problems on library + * Purpose: Check for dangling group IDs causing problems on library * shutdown * - * Return: Success: zero - * Failure: non-zero + * Return: Success: zero + * Failure: non-zero * - * Programmer: Quincey Koziol + * Programmer: Quincey Koziol * Tuesday, May 13, 2003 * * Modifications: @@ -147,7 +147,7 @@ error: static int test_dangle_group(H5F_close_degree_t degree) { - char filename[1024]; + char filename[1024]; hid_t fid; /* File ID */ hid_t fapl; /* File access property list */ hid_t gid; /* Group ID */ @@ -218,17 +218,17 @@ error: return 1; } - + /*------------------------------------------------------------------------- - * Function: test_dangle_datatype1 + * Function: test_dangle_datatype1 * - * Purpose: Check for dangling datatype IDs causing problems on library + * Purpose: Check for dangling datatype IDs causing problems on library * shutdown * - * Return: Success: zero - * Failure: non-zero + * Return: Success: zero + * Failure: non-zero * - * Programmer: Quincey Koziol + * Programmer: Quincey Koziol * Tuesday, May 13, 2003 * * Modifications: @@ -238,7 +238,7 @@ error: static int test_dangle_datatype1(H5F_close_degree_t degree) { - char filename[1024]; + char filename[1024]; hid_t fid; /* File ID */ hid_t fapl; /* File access property list */ hid_t tid; /* Datatype ID */ @@ -314,17 +314,17 @@ error: return 1; } - + /*------------------------------------------------------------------------- - * Function: test_dangle_datatype2 + * Function: test_dangle_datatype2 * - * Purpose: Check for dangling datatype IDs causing problems on library + * Purpose: Check for dangling datatype IDs causing problems on library * shutdown * - * Return: Success: zero - * Failure: non-zero + * Return: Success: zero + * Failure: non-zero * - * Programmer: Quincey Koziol + * Programmer: Quincey Koziol * Thursday, August 25, 2005 * * Modifications: @@ -334,7 +334,7 @@ error: static int test_dangle_datatype2(H5F_close_degree_t degree) { - char filename[1024]; + char filename[1024]; hid_t fid; /* File ID */ hid_t fapl; /* File access property list */ hid_t did; /* Dataset ID */ @@ -401,17 +401,17 @@ error: return 1; } - + /*------------------------------------------------------------------------- - * Function: test_dangle_attribute + * Function: test_dangle_attribute * - * Purpose: Check for dangling attribute IDs causing problems on library + * Purpose: Check for dangling attribute IDs causing problems on library * shutdown * - * Return: Success: zero - * Failure: non-zero + * Return: Success: zero + * Failure: non-zero * - * Programmer: Quincey Koziol + * Programmer: Quincey Koziol * Wednesday, June 18, 2003 * * Modifications: @@ -421,7 +421,7 @@ error: static int test_dangle_attribute(H5F_close_degree_t degree) { - char filename[1024]; + char filename[1024]; hid_t fid; /* File ID */ hid_t fapl; /* File access property list */ hid_t dsid; /* Dataset ID */ @@ -508,17 +508,17 @@ error: return 1; } - + /*------------------------------------------------------------------------- - * Function: test_dangle_force + * Function: test_dangle_force * - * Purpose: Shut down all danging IDs with generic file & ID routines, + * Purpose: Shut down all danging IDs with generic file & ID routines, * instead of letting library shut then down. * - * Return: Success: zero - * Failure: non-zero + * Return: Success: zero + * Failure: non-zero * - * Programmer: Quincey Koziol + * Programmer: Quincey Koziol * Friday, October 29, 2010 * *------------------------------------------------------------------------- @@ -526,7 +526,7 @@ error: static int test_dangle_force(void) { - char filename[1024]; + char filename[1024]; hid_t fid; /* File ID */ hid_t gid, gid2; /* Group IDs */ hid_t dsid, dsid2; /* Dataset IDs */ @@ -624,7 +624,7 @@ test_dangle_force(void) /* Release object ID array */ HDfree(objs); - + PASSED(); return 0; @@ -634,16 +634,16 @@ error: return 1; } - + /*------------------------------------------------------------------------- - * Function: main + * Function: main * - * Purpose: Executes dangling ID tests + * Purpose: Executes dangling ID tests * - * Return: Success: zero - * Failure: non-zero + * Return: Success: zero + * Failure: non-zero * - * Programmer: Quincey Koziol + * Programmer: Quincey Koziol * Tuesday, May 13, 2003 * * Modifications: @@ -653,7 +653,7 @@ error: int main(void) { - int nerrors=0; + int nerrors=0; /* Run tests w/weak file close */ puts("Testing dangling objects with weak file close:"); diff --git a/test/dsets.c b/test/dsets.c index 0fff2d1..17cf23c 100644 --- a/test/dsets.c +++ b/test/dsets.c @@ -24,8 +24,30 @@ #define H5Z_FRIEND /*suppress error about including H5Zpkg */ -#include "h5test.h" +#include "testhdf5.h" #include "H5srcdir.h" + +#include "H5Bprivate.h" +#include "H5Iprivate.h" +#include "H5Pprivate.h" + +#define H5F_FRIEND /*suppress error about including H5Fpkg */ +#define H5F_TESTING +#include "H5Fpkg.h" /* File access */ + +#define H5S_FRIEND /*suppress error about including H5Spkg */ +#include "H5Spkg.h" /* Dataspace */ + +#define H5T_FRIEND /*suppress error about including H5Tpkg */ +#include "H5Tpkg.h" /* Datatype */ + +#define H5A_FRIEND /*suppress error about including H5Apkg */ +#include "H5Apkg.h" /* Attributes */ + +/* Use in version bound test */ +#define H5O_FRIEND /*suppress error about including H5Opkg */ +#include "H5Opkg.h" /* Object headers */ + #include "H5Dpkg.h" #include "H5FDpkg.h" #include "H5VMprivate.h" @@ -60,8 +82,10 @@ const char *FILENAME[] = { "storage_size", /* 22 */ "dls_01_strings", /* 23 */ "power2up", /* 24 */ + "version_bounds", /* 25 */ NULL }; + #define FILENAME_BUF_SIZE 1024 #define KB 1024 @@ -291,7 +315,7 @@ const H5Z_class2_t H5Z_COUNT[1] = {{ filter_count, /* The actual filter function */ }}; - + /*------------------------------------------------------------------------- * Function: filter_count * @@ -316,7 +340,7 @@ filter_count(unsigned int flags, size_t H5_ATTR_UNUSED cd_nelmts, return nbytes; } - + /*------------------------------------------------------------------------- * Function: test_create * @@ -463,7 +487,7 @@ test_create(hid_t file) return -1; } - + /*------------------------------------------------------------------------- * Function: test_simple_io * @@ -599,7 +623,7 @@ error: return -1; } - + /*------------------------------------------------------------------------- * Function: test_userblock_offset * @@ -705,7 +729,7 @@ error: return -1; } - + /*------------------------------------------------------------------------- * Function: test_compact_io * @@ -722,10 +746,15 @@ static herr_t test_compact_io(hid_t fapl) { hid_t file, dataset, space, plist; + hid_t verfile = -1, new_fapl = -1; hsize_t dims[2]; int wbuf[16][8], rbuf[16][8]; char filename[FILENAME_BUF_SIZE]; + H5F_libver_t low, high; /* File format bounds */ + H5F_t *fp; /* Internal file pointer */ + H5D_t *dsetp; /* Internal dataset pointer */ int i, j, n; + herr_t ret; /* Generic return value */ TESTING("compact dataset I/O"); @@ -764,8 +793,6 @@ test_compact_io(hid_t fapl) if(H5Dget_offset(dataset)!=HADDR_UNDEF) TEST_ERROR /* Close file */ - if(H5Sclose(space) < 0) TEST_ERROR - if(H5Pclose(plist) < 0) TEST_ERROR if(H5Dclose(dataset) < 0) TEST_ERROR if(H5Fclose(file) < 0) TEST_ERROR @@ -789,19 +816,113 @@ test_compact_io(hid_t fapl) printf(" wbuf[%d][%d]=%d\n", i, j, wbuf[i][j]); printf(" rbuf[%d][%d]=%d\n", i, j, rbuf[i][j]); goto error; - } /* end if */ + } /* end */ if(H5Dclose(dataset) < 0) TEST_ERROR if(H5Fclose(file) < 0) TEST_ERROR - PASSED(); - return 0; + /************************************** + * Additional test for version bounds * + **************************************/ + + /* Create a copy of file access property list */ + if((new_fapl = H5Pcreate(H5P_FILE_ACCESS)) < 0) TEST_ERROR + + /* Loop through all the combinations of low/high library format bounds, + skipping invalid combinations. + - Create a file, create and write a compact dataset, and verify its data + - Verify the dataset's layout and fill message versions */ + for(low = H5F_LIBVER_EARLIEST; low < H5F_LIBVER_NBOUNDS; low++) { + for(high = H5F_LIBVER_EARLIEST; high < H5F_LIBVER_NBOUNDS; high++) { + + /* Set version bounds */ + H5E_BEGIN_TRY { + ret = H5Pset_libver_bounds(new_fapl, low, high); + } H5E_END_TRY; + + if (ret < 0) /* Invalid low/high combinations */ + continue; + + /* Create a file */ + h5_fixname(FILENAME[25], new_fapl, filename, sizeof filename); + if((verfile = H5Fcreate(filename, H5F_ACC_TRUNC, H5P_DEFAULT, new_fapl)) < 0) + TEST_ERROR + + /* Create the compact dataset */ + dataset = H5Dcreate2(verfile, DSET_DEFAULT_NAME, H5T_NATIVE_INT, space, H5P_DEFAULT, plist, H5P_DEFAULT); + if(dataset < 0) TEST_ERROR + + /* Write the same data as of DSET_COMPACT_IO_NAME */ + if(H5Dwrite(dataset, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, wbuf) < 0) + TEST_ERROR + + /* Close DSET_DEFAULT_NAME, then reopen it to read and verify + the data */ + if(H5Dclose(dataset) < 0) TEST_ERROR + if((dataset = H5Dopen2(verfile, DSET_DEFAULT_NAME, H5P_DEFAULT)) < 0) + TEST_ERROR + if(H5Dread(dataset, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, rbuf) < 0) + TEST_ERROR + + /* Check that the values read are the same as the values written */ + for(i = 0; i < 16; i++) + for(j = 0; j < 8; j++) + if(rbuf[i][j] != wbuf[i][j]) { + H5_FAILED(); + printf(" Read different values than written.\n"); + printf(" At index %d,%d\n", i, j); + printf(" wbuf[%d][%d]=%d\n", i, j, wbuf[i][j]); + printf(" rbuf[%d][%d]=%d\n", i, j, rbuf[i][j]); + goto error; + } /* end */ + + /* Get the internal file pointer */ + if((fp = (H5F_t *)H5I_object(verfile)) == NULL) TEST_ERROR + + /* Get the internal dataset pointer */ + if((dsetp = (H5D_t *)H5I_object(dataset)) == NULL) TEST_ERROR + + /* Verify the dataset's layout and fill message versions */ + if(fp->shared->low_bound == H5F_LIBVER_EARLIEST) { + VERIFY(dsetp->shared->layout.version, H5O_LAYOUT_VERSION_DEFAULT, "layout_ver_bounds"); + VERIFY(dsetp->shared->dcpl_cache.fill.version, H5O_FILL_VERSION_2, "fill_ver_bounds"); + } else { + VERIFY(dsetp->shared->layout.version, H5O_layout_ver_bounds[fp->shared->low_bound], "layout_ver_bounds"); + VERIFY(dsetp->shared->dcpl_cache.fill.version, H5O_fill_ver_bounds[fp->shared->low_bound], "fill_ver_bounds"); + } + + /* Close the dataset and delete from the file */ + if(H5Dclose(dataset) < 0) TEST_ERROR + if(H5Ldelete(verfile, DSET_DEFAULT_NAME, H5P_DEFAULT) < 0) + TEST_ERROR + + /* Close the file */ + if(H5Fclose(verfile) < 0) TEST_ERROR + + } /* end for high */ + } /* end for low */ + + if(H5Pclose(new_fapl) < 0) TEST_ERROR + if(H5Sclose(space) < 0) TEST_ERROR + if(H5Pclose(plist) < 0) TEST_ERROR + + PASSED(); + return 0; error: - return -1; + H5E_BEGIN_TRY { + H5Sclose(space); + H5Pclose(plist); + H5Pclose(new_fapl); + H5Dclose(dataset); + H5Fclose(file); + H5Fclose(verfile); + } H5E_END_TRY; + + return -1; } - + /*------------------------------------------------------------------------- * Function: test_max_compact * @@ -954,7 +1075,7 @@ error: return -1; } /* end test_max_compact() */ - + /*------------------------------------------------------------------------- * Function: test_layout_extend * @@ -1077,7 +1198,7 @@ error: return -1; } /* end test_layout_extend() */ - + /*------------------------------------------------------------------------- * Function: test_conv_buffer * @@ -1216,7 +1337,7 @@ error: return -1; } - + /*------------------------------------------------------------------------- * Function: test_tconv * @@ -1311,7 +1432,7 @@ const H5Z_class2_t H5Z_BOGUS[1] = {{ filter_bogus, /* The actual filter function */ }}; - + /*------------------------------------------------------------------------- * Function: can_apply_bogus * @@ -1333,7 +1454,7 @@ can_apply_bogus(hid_t H5_ATTR_UNUSED dcpl_id, hid_t type_id, hid_t H5_ATTR_UNUSE return -1; } - + /*------------------------------------------------------------------------- * Function: filter_bogus * @@ -1351,7 +1472,7 @@ filter_bogus(unsigned int H5_ATTR_UNUSED flags, size_t H5_ATTR_UNUSED cd_nelmts, return nbytes; } - + /*------------------------------------------------------------------------- * Function: set_local_bogus2 * @@ -1397,7 +1518,7 @@ set_local_bogus2(hid_t dcpl_id, hid_t type_id, hid_t H5_ATTR_UNUSED space_id) return(SUCCEED); } /* end set_local_bogus2() */ - + /*------------------------------------------------------------------------- * Function: filter_bogus2 * @@ -1451,7 +1572,7 @@ filter_bogus2(unsigned int flags, size_t cd_nelmts, return(nbytes); } - + /*------------------------------------------------------------------------- * Function: filter_bogus3 * @@ -1480,7 +1601,7 @@ const H5Z_class2_t H5Z_CORRUPT[1] = {{ filter_corrupt, /* The actual filter function */ }}; - + /*------------------------------------------------------------------------- * Function: filter_corrupt * @@ -1539,7 +1660,7 @@ error: return ret_value; } /* end filter_corrupt() */ - + /*------------------------------------------------------------------------- * Function: filter_cb_cont * @@ -1558,7 +1679,7 @@ filter_cb_cont(H5Z_filter_t filter, void H5_ATTR_UNUSED *buf, size_t H5_ATTR_UNU return H5Z_CB_FAIL; } - + /*------------------------------------------------------------------------- * Function: filter_cb_fail * @@ -1577,7 +1698,7 @@ filter_cb_fail(H5Z_filter_t filter, void H5_ATTR_UNUSED *buf, size_t H5_ATTR_UNU return H5Z_CB_CONT; } - + /*------------------------------------------------------------------------- * Function: test_filter_internal * @@ -2388,7 +2509,7 @@ error: return -1; } - + /*------------------------------------------------------------------------- * Function: test_missing_filter * @@ -2716,7 +2837,7 @@ error: return -1; } - + /*------------------------------------------------------------------------- * Function: test_nbit_int * @@ -2834,7 +2955,7 @@ error: return -1; } - + /*------------------------------------------------------------------------- * Function: test_nbit_float * @@ -2952,7 +3073,7 @@ error: return -1; } - + /*------------------------------------------------------------------------- * Function: test_nbit_double * @@ -3084,7 +3205,7 @@ error: return -1; } - + /*------------------------------------------------------------------------- * Function: test_nbit_array * @@ -3211,7 +3332,7 @@ error: return -1; } - + /*------------------------------------------------------------------------- * Function: test_nbit_compound * @@ -3428,7 +3549,7 @@ error: return -1; } - + /*------------------------------------------------------------------------- * Function: test_nbit_compound_2 * @@ -3773,7 +3894,7 @@ error: return -1; } - + /*------------------------------------------------------------------------- * Function: test_nbit_compound_3 * @@ -3953,7 +4074,7 @@ error: return -1; } - + /*------------------------------------------------------------------------- * Function: test_nbit_int_size * @@ -4120,7 +4241,7 @@ error: return -1; } - + /*------------------------------------------------------------------------- * Function: test_nbit_flt_size * @@ -4316,7 +4437,7 @@ test_nbit_flt_size(hid_t file) error: return -1; } - + /*------------------------------------------------------------------------- * Function: test_scaleoffset_int * @@ -4428,7 +4549,7 @@ error: return -1; } - + /*------------------------------------------------------------------------- * Function: test_scaleoffset_int_2 * @@ -4556,7 +4677,7 @@ error: return -1; } - + /*------------------------------------------------------------------------- * Function: test_scaleoffset_float * @@ -4669,7 +4790,7 @@ error: return -1; } - + /*------------------------------------------------------------------------- * Function: test_scaleoffset_float_2 * @@ -4798,7 +4919,7 @@ error: return -1; } - + /*------------------------------------------------------------------------- * Function: test_scaleoffset_double * @@ -4911,7 +5032,7 @@ error: return -1; } - + /*------------------------------------------------------------------------- * Function: test_scaleoffset_double_2 * @@ -5041,20 +5162,20 @@ error: return -1; } - + /*------------------------------------------------------------------------- * Function: test_multiopen * - * Purpose: Tests that a bug no longer exists. If a dataset is opened - * twice and one of the handles is used to extend the dataset, - * then the other handle should return the new size when - * queried. + * Purpose: Tests that a bug no longer exists. If a dataset is opened + * twice and one of the handles is used to extend the dataset, + * then the other handle should return the new size when + * queried. * - * Return: Success: 0 + * Return: Success: 0 * - * Failure: -1 + * Failure: -1 * - * Programmer: Robb Matzke + * Programmer: Robb Matzke * Tuesday, June 9, 1998 * *------------------------------------------------------------------------- @@ -5062,10 +5183,10 @@ error: static herr_t test_multiopen (hid_t file) { - hid_t dcpl = -1, space = -1, dset1 = -1, dset2 = -1; - hsize_t cur_size[1] = {10}; - static hsize_t max_size[1] = {H5S_UNLIMITED}; - hsize_t tmp_size[1]; + hid_t dcpl = -1, space = -1, dset1 = -1, dset2 = -1; + hsize_t cur_size[1] = {10}; + hsize_t tmp_size[1]; + static hsize_t max_size[1] = {H5S_UNLIMITED}; TESTING("multi-open with extending"); @@ -5085,9 +5206,9 @@ test_multiopen (hid_t file) if((space = H5Dget_space(dset2)) < 0) goto error; if(H5Sget_simple_extent_dims(space, tmp_size, NULL) < 0) goto error; if(cur_size[0] != tmp_size[0]) { - H5_FAILED(); - printf(" Got %d instead of %d!\n", (int)tmp_size[0], (int)cur_size[0]); - goto error; + H5_FAILED(); + printf(" Got %d instead of %d!\n", (int)tmp_size[0], (int)cur_size[0]); + goto error; } /* end if */ if(H5Dclose(dset1) < 0) goto error; @@ -5108,7 +5229,7 @@ test_multiopen (hid_t file) return -1; } - + /*------------------------------------------------------------------------- * Function: test_types * @@ -5215,7 +5336,7 @@ const H5Z_class2_t H5Z_CAN_APPLY_TEST[1] = {{ filter_bogus, /* The actual filter function */ }}; - + /*------------------------------------------------------------------------- * Function: test_can_apply * @@ -5396,7 +5517,7 @@ const H5Z_class2_t H5Z_CAN_APPLY_TEST2[1] = {{ filter_bogus3, /* The actual filter function */ }}; - + /*------------------------------------------------------------------------- * Function: test_can_apply2 * @@ -5545,7 +5666,7 @@ error: } /* end test_can_apply2() */ - + /*------------------------------------------------------------------------- * Function: test_can_apply_szip * @@ -5750,7 +5871,7 @@ const H5Z_class2_t H5Z_SET_LOCAL_TEST[1] = {{ filter_bogus2, /* The actual filter function */ }}; - + /*------------------------------------------------------------------------- * Function: test_set_local * @@ -6015,7 +6136,7 @@ error: return -1; } /* end test_set_local() */ - + /*------------------------------------------------------------------------- * Function: test_compare_dcpl * @@ -6100,7 +6221,7 @@ error: return -1; } /* end test_compare_dcpl() */ - + /*------------------------------------------------------------------------- * Function: test_copy_dcpl * @@ -6232,7 +6353,7 @@ error: return -1; } /* end test_copy_dcpl() */ - + /*------------------------------------------------------------------------- * Function: test_filter_delete * @@ -6359,7 +6480,7 @@ error: } /* end test_filter_delete() */ - + /*------------------------------------------------------------------------- * Function: auxread_fdata * @@ -6443,7 +6564,7 @@ error: return -1; } - + /*------------------------------------------------------------------------- * Function: test_filters_endianess * @@ -6513,7 +6634,7 @@ error: return -1; } /* end test_filters_endianess() */ - + /*------------------------------------------------------------------------- * Function: test_zero_dims * @@ -6677,7 +6798,7 @@ error: return -1; } /* end test_zero_dims() */ - + /*------------------------------------------------------------------------- * Function: test_missing_chunk * @@ -6869,7 +6990,7 @@ error: return -1; } /* end test_missing_chunk() */ - + /*------------------------------------------------------------------------- * Function: test_random_chunks_real * @@ -7237,7 +7358,7 @@ error: return -1; } /* end test_random_chunks_real() */ - + /*------------------------------------------------------------------------- * Function: test_random_chunks * @@ -7297,7 +7418,7 @@ const H5Z_class1_t H5Z_DEPREC[1] = {{ filter_bogus, /* The actual filter function */ }}; - + /*------------------------------------------------------------------------- * Function: test_deprec * @@ -7488,7 +7609,7 @@ test_deprec(hid_t file) } /* end test_deprec() */ #endif /* H5_NO_DEPRECATED_SYMBOLS */ - + /*------------------------------------------------------------------------- * Function: test_huge_chunks * @@ -7600,7 +7721,7 @@ error: return -1; } /* end test_huge_chunks() */ - + /*------------------------------------------------------------------------- * Function: test_chunk_cache * @@ -7808,7 +7929,7 @@ error: return -1; } /* end test_chunk_cache() */ - + /*------------------------------------------------------------------------- * Function: test_big_chunks_bypass_cache * @@ -8101,7 +8222,7 @@ error: return -1; } /* end test_big_chunks_bypass_cache() */ - + /*------------------------------------------------------------------------- * Function: test_chunk_fast * @@ -8448,7 +8569,7 @@ error: return -1; } /* end test_chunk_fast() */ - + /*------------------------------------------------------------------------- * Function: test_reopen_chunk_fast * @@ -8571,7 +8692,7 @@ error: return -1; } /* end test_reopen_chunk_fast() */ - + /*------------------------------------------------------------------------- * Function: test_chunk_fast_bug1 * @@ -8693,7 +8814,7 @@ const H5Z_class2_t H5Z_EXPAND[1] = {{ /* Global "expansion factor" for filter_expand() routine */ static size_t filter_expand_factor_g = 0; - + /*------------------------------------------------------------------------- * Function: filter_expand * @@ -8742,7 +8863,7 @@ filter_expand(unsigned int flags, size_t H5_ATTR_UNUSED cd_nelmts, return ret_value; } /* end filter_expand() */ - + /*------------------------------------------------------------------------- * Function: test_chunk_expand * @@ -9138,7 +9259,7 @@ error: return -1; } /* end test_chunk_expand() */ - + /*------------------------------------------------------------------------- * Function: test_fixed_array * @@ -9557,7 +9678,7 @@ error: return -1; } /* end test_fixed_array() */ - + /*------------------------------------------------------------------------- * Function: test_single_chunk * @@ -9790,6 +9911,7 @@ test_single_chunk(hid_t fapl) } /* end for */ #endif /* H5_HAVE_FILTER_DEFLATE */ + /* Release buffers */ HDfree(wbuf); HDfree(rbuf); @@ -9820,7 +9942,7 @@ error: return -1; } /* end test_single_chunk() */ - + /*------------------------------------------------------------------------- * * test_idx_compatible(): @@ -10033,7 +10155,7 @@ error: return -1; } /* test_unfiltered_edge_chunks */ - + /*------------------------------------------------------------------------- * Function: test_large_chunk_shrink * @@ -10148,11 +10270,11 @@ error: return -1; } /* end test_large_chunk_shrink() */ - + /*------------------------------------------------------------------------- * Function: test_zero_dim_dset * - * Purpose: Tests support for reading a 1D chunled dataset with + * Purpose: Tests support for reading a 1D chunked dataset with * dimension size = 0. * * Return: Success: 0 @@ -10173,40 +10295,59 @@ test_zero_dim_dset(hid_t fapl) hid_t dsid = -1; /* Dataset ID */ hsize_t dim, chunk_dim; /* Dataset and chunk dimensions */ int data[1]; + H5F_libver_t low, high; /* File format bounds */ + herr_t ret; /* Generic return value */ - TESTING("shrinking large chunk"); + TESTING("chunked dataset with zero dimension"); - h5_fixname(FILENAME[16], fapl, filename, sizeof filename); + /* Loop through all the combinations of low/high library format bounds, + skipping invalid combination, and verify support for reading a 1D + chunked dataset with dimension size = 0 */ + for(low = H5F_LIBVER_EARLIEST; low < H5F_LIBVER_NBOUNDS; low++) { + for(high = H5F_LIBVER_EARLIEST; high < H5F_LIBVER_NBOUNDS; high++) { - /* Create file */ - if((fid = H5Fcreate(filename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0) FAIL_STACK_ERROR + /* Set version bounds before opening the file */ + H5E_BEGIN_TRY { + ret = H5Pset_libver_bounds(fapl, low, high); + } H5E_END_TRY; - /* Create dataset creation property list */ - if((dcpl = H5Pcreate(H5P_DATASET_CREATE)) < 0) FAIL_STACK_ERROR + if (ret < 0) /* Invalid low/high combinations */ + continue; - /* Set 1 chunk size */ - chunk_dim = 1; - if(H5Pset_chunk(dcpl, 1, &chunk_dim) < 0) FAIL_STACK_ERROR + h5_fixname(FILENAME[16], fapl, filename, sizeof filename); - /* Create 1D dataspace with 0 dim size */ - dim = 0; - if((sid = H5Screate_simple(1, &dim, NULL)) < 0) FAIL_STACK_ERROR + /* Create file */ + if((fid = H5Fcreate(filename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0) FAIL_STACK_ERROR - /* Create chunked dataset */ - if((dsid = H5Dcreate2(fid, "dset", H5T_NATIVE_INT, sid, H5P_DEFAULT, dcpl, H5P_DEFAULT)) < 0) - FAIL_STACK_ERROR + /* Create dataset creation property list */ + if((dcpl = H5Pcreate(H5P_DATASET_CREATE)) < 0) FAIL_STACK_ERROR - /* write 0 elements from dataset */ - if(H5Dwrite(dsid, H5T_NATIVE_INT, sid, sid, H5P_DEFAULT, data) < 0) FAIL_STACK_ERROR + /* Set 1 chunk size */ + chunk_dim = 1; + if(H5Pset_chunk(dcpl, 1, &chunk_dim) < 0) FAIL_STACK_ERROR - /* Read 0 elements from dataset */ - if(H5Dread(dsid, H5T_NATIVE_INT, sid, sid, H5P_DEFAULT, data) < 0) FAIL_STACK_ERROR + /* Create 1D dataspace with 0 dim size */ + dim = 0; + if((sid = H5Screate_simple(1, &dim, NULL)) < 0) FAIL_STACK_ERROR - /* Close everything */ - if(H5Sclose(sid) < 0) FAIL_STACK_ERROR - if(H5Dclose(dsid) < 0) FAIL_STACK_ERROR - if(H5Pclose(dcpl) < 0) FAIL_STACK_ERROR - if(H5Fclose(fid) < 0) FAIL_STACK_ERROR + /* Create chunked dataset */ + if((dsid = H5Dcreate2(fid, "dset", H5T_NATIVE_INT, sid, H5P_DEFAULT, dcpl, H5P_DEFAULT)) < 0) + FAIL_STACK_ERROR + + /* write 0 elements from dataset */ + if(H5Dwrite(dsid, H5T_NATIVE_INT, sid, sid, H5P_DEFAULT, data) < 0) FAIL_STACK_ERROR + + /* Read 0 elements from dataset */ + if(H5Dread(dsid, H5T_NATIVE_INT, sid, sid, H5P_DEFAULT, data) < 0) FAIL_STACK_ERROR + + /* Close everything */ + if(H5Sclose(sid) < 0) FAIL_STACK_ERROR + if(H5Dclose(dsid) < 0) FAIL_STACK_ERROR + if(H5Pclose(dcpl) < 0) FAIL_STACK_ERROR + if(H5Fclose(fid) < 0) FAIL_STACK_ERROR + + } /* end for high */ + } /* end for low */ PASSED(); @@ -10222,7 +10363,7 @@ error: return -1; } /* end test_zero_dim_dset() */ - + /*------------------------------------------------------------------------- * Function: test_swmr_non_latest * @@ -10471,7 +10612,7 @@ error: return -1; } /* test_swmr_non_latest() */ - + /*------------------------------------------------------------------------- * Function: test_earray_hdr_fd * @@ -10591,7 +10732,7 @@ error: return -1; } /* test_earray_hdr_fd() */ - + /*------------------------------------------------------------------------- * Function: test_farray_hdr_fd * @@ -10711,7 +10852,7 @@ error: return -1; } /* test_farray_hdr_fd() */ - + /*------------------------------------------------------------------------- * Function: test_bt2_hdr_fd * @@ -10831,7 +10972,7 @@ error: return -1; } /* test_bt2_hdr_fd() */ - + /*------------------------------------------------------------------------- * Function: test_storage_size * @@ -11225,7 +11366,7 @@ error: return -1; } /* end test_storage_size() */ - + /*------------------------------------------------------------------------- * Function: test_power2up * @@ -11316,7 +11457,7 @@ error: return -1; } /* end test_power2up() */ - + /*------------------------------------------------------------------------- * Function: test_scatter * @@ -11634,7 +11775,7 @@ error: return -1; } /* end test_scatter() */ - + /*------------------------------------------------------------------------- * Function: test_gather * @@ -11996,7 +12137,7 @@ error: return -1; } /* end test_gather() */ - + /*------------------------------------------------------------------------- * Function: test_scatter_error * @@ -12199,7 +12340,7 @@ error: return -1; } /* end test_scatter_error() */ - + /*------------------------------------------------------------------------- * Function: test_gather_error * @@ -12726,36 +12867,188 @@ error: return -1; } /* test_compact_open_close_dirty() */ - + /*------------------------------------------------------------------------- - * Function: main + * Function: test_versionbounds * - * Purpose: Tests the dataset interface (H5D) + * Purpose: Tests various format versions. + * (Currently, only virtual dataset feature) * - * Return: Success: exit(EXIT_SUCCESS) + * Return: Success: 0 + * Failure: -1 + * Description: + * This function attempts to create a virtual dataset in all + * valid combinations of low/high library format bounds. Creation + * of virtual dataset should only succeed in H5F_LIBVER_V110. + * -BMR, January 2018 * - * Failure: exit(EXIT_FAILURE) + *------------------------------------------------------------------------- + */ +#define VDS_FNAME1 "virtual_file1" +#define VDS_FNAME2 "virtual_file2" +#define SRC_FNAME "source_file" +#define SRC_DSET "src_dset" +#define V_DSET "v_dset" +static herr_t +test_versionbounds() +{ + hid_t fapl = -1; + hid_t srcfile = -1; /* Files with source dsets */ + hid_t vfile = -1; /* File with virtual dset */ + hid_t dcpl = -1; /* Dataset creation property list */ + hid_t srcspace = -1; /* Source dataspaces */ + hid_t vspace = -1; /* Virtual dset dataspaces */ + hid_t srcdset = -1; /* Source datset */ + hid_t vdset = -1; /* Virtual dataset */ + hid_t null_dspace = -1; /* Data space of H5S_NULL */ + hsize_t dims[1] = {3}; /* Data space current size */ + char srcfilename[FILENAME_BUF_SIZE]; + char vfilename1[FILENAME_BUF_SIZE]; + char vfilename2[FILENAME_BUF_SIZE]; + H5F_libver_t low, high; /* File format bounds */ + herr_t ret; /* Generic return value */ + + TESTING("version bounds of datasets"); + + /* Create a copy of file access property list */ + if((fapl = H5Pcreate(H5P_FILE_ACCESS)) < 0) TEST_ERROR + + h5_fixname(VDS_FNAME1, fapl, vfilename1, sizeof vfilename1); + h5_fixname(VDS_FNAME2, fapl, vfilename2, sizeof vfilename2); + h5_fixname(SRC_FNAME, fapl, srcfilename, sizeof srcfilename); + + /* Create DCPL */ + if((dcpl = H5Pcreate(H5P_DATASET_CREATE)) < 0) + TEST_ERROR + + /* Clear virtual layout in DCPL */ + if(H5Pset_layout(dcpl, H5D_VIRTUAL) < 0) + TEST_ERROR + + /* Create source dataspace */ + if((srcspace = H5Screate_simple(1, dims, NULL)) < 0) + TEST_ERROR + + /* Create virtual dataspace */ + if((vspace = H5Screate_simple(1, dims, NULL)) < 0) + TEST_ERROR + + /* Add virtual layout mapping */ + if(H5Pset_virtual(dcpl, vspace, srcfilename, SRC_DSET, srcspace) < 0) + TEST_ERROR + + /* Loop through all the combinations of low/high library format bounds */ + /* Create a source file and a dataset in it. Create a virtual file and + virtual dataset. Creation of virtual dataset should only succeed in + H5F_LIBVER_V110 */ + for(low = H5F_LIBVER_EARLIEST; low < H5F_LIBVER_NBOUNDS; low++) { + for(high = H5F_LIBVER_EARLIEST; high < H5F_LIBVER_NBOUNDS; high++) { + + /* Set version bounds, skip for invalid low/high combination */ + H5E_BEGIN_TRY { + ret = H5Pset_libver_bounds(fapl, low, high); + } H5E_END_TRY; + + if (ret < 0) /* Invalid low/high combinations */ + continue; + + /* Create a source file and dataset */ + if((srcfile = H5Fcreate(srcfilename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0) + TEST_ERROR + if((srcdset = H5Dcreate2(srcfile, SRC_DSET, H5T_NATIVE_INT, srcspace, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) + TEST_ERROR + + /* Create a virtual file */ + if((vfile = H5Fcreate(vfilename1, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0) + TEST_ERROR + + /* Create the virtual dataset */ + H5E_BEGIN_TRY { + vdset = H5Dcreate2(vfile, V_DSET, H5T_NATIVE_INT, vspace, H5P_DEFAULT, dcpl, H5P_DEFAULT); + } H5E_END_TRY; + + if (vdset > 0) /* dataset created successfully */ + { + /* Virtual dataset is only available starting in V110 */ + VERIFY(high, H5F_LIBVER_V110, "virtual dataset"); + + if(H5Dclose(vdset) < 0) TEST_ERROR + vdset = -1; + } + + /* Close virtual file */ + if(H5Fclose(vfile) < 0) TEST_ERROR + vfile = -1; + + /* Close srcdset and srcfile */ + if(H5Dclose(srcdset) < 0) TEST_ERROR + srcdset = -1; + + if(H5Fclose(srcfile) < 0) TEST_ERROR + srcfile = -1; + + } /* for high */ + } /* for low */ + + /* Close dataspaces and properties */ + if(H5Sclose(srcspace) < 0) + TEST_ERROR + srcspace = -1; + if(H5Sclose(vspace) < 0) + TEST_ERROR + vspace = -1; + if(H5Pclose(fapl) < 0) + TEST_ERROR + fapl = -1; + if(H5Pclose(dcpl) < 0) + TEST_ERROR + dcpl = -1; + PASSED(); + return 0; + + error: + H5E_BEGIN_TRY { + H5Sclose(srcspace); + H5Sclose(vspace); + H5Pclose(dcpl); + H5Pclose(fapl); + H5Dclose(srcdset); + H5Dclose(vdset); + H5Fclose(srcfile); + H5Fclose(vfile); + } H5E_END_TRY; + return -1; +} /* test_versionbounds() */ + + +/*------------------------------------------------------------------------- + * Function: main * - * Programmer: Robb Matzke - * Tuesday, December 9, 1997 + * Purpose: Tests the dataset interface (H5D) + * + * Return: Success: exit(EXIT_SUCCESS) + * Failure: exit(EXIT_FAILURE) + * + * Programmer: Robb Matzke + * Tuesday, December 9, 1997 * *------------------------------------------------------------------------- */ int main(void) { - char filename[FILENAME_BUF_SIZE]; - hid_t file, grp, fapl, fapl2; - hid_t fcpl = -1, fcpl2 = -1; + char filename[FILENAME_BUF_SIZE]; + hid_t file, grp, fapl, fapl2; + hid_t fcpl = -1, fcpl2 = -1; unsigned new_format; unsigned paged; - int mdc_nelmts; - size_t rdcc_nelmts; - size_t rdcc_nbytes; - double rdcc_w0; - int nerrors = 0; + int mdc_nelmts; + size_t rdcc_nelmts; + size_t rdcc_nbytes; + double rdcc_w0; + int nerrors = 0; const char *envval; - hbool_t contig_addr_vfd; /* Whether VFD used has a contigous address space */ + hbool_t contig_addr_vfd; /* Whether VFD used has a contigous address space */ /* Don't run this test using certain file drivers */ envval = HDgetenv("HDF5_DRIVER"); @@ -12924,6 +13217,9 @@ main(void) nerrors += (test_scatter_error() < 0 ? 1 : 0); nerrors += (test_gather_error() < 0 ? 1 : 0); + /* Tests version bounds using its own file */ + nerrors += (test_versionbounds() < 0 ? 1 : 0); + /* Run misc tests */ nerrors += dls_01_main(); diff --git a/test/fheap.c b/test/fheap.c index 6c3a8ac..1be952f 100644 --- a/test/fheap.c +++ b/test/fheap.c @@ -16458,6 +16458,33 @@ main(void) if(H5Pset_file_space_strategy(fcpl, H5F_FSPACE_STRATEGY_FSM_AGGR, TRUE, (hsize_t)1) < 0) TEST_ERROR fapl = def_fapl; + /* This is a fix for the daily test failure from the checkin for libver bounds. */ + /* + * Many tests failed the file size check when comparing (a) and (b) as below: + * --Create a file and close the file. Got the initial file size (a). + * --Reopen the file, perform fractal heap operations, and close the file. + * Got the file size (b). + * The cause for the file size differences: + * When the file is initially created with persisting free-space and with + * (earliest, latest) libver bounds, the file will have version 2 superblock + * due to non-default free-space handling. As the low bound is earliest, + * the library uses version 1 object header when creating the superblock + * extension message. + * When the file is reopened with the same libver bounds, the file's low + * bound is upgraded to v18 because the file has version 2 superblock. + * When the library creates the superblock extension message on file close, + * the library uses version 2 object header for the superblock extension + * message since the low bound is v18. + * This leads to the discrepancy in file sizes as the file is persisting + * free-space and there is object header version differences. + * The fix: + * Set libver bounds in fapl to (v18, latest) so that the file created in the + * test routines will have low bound set to v18. This will cause the + * library to use version 2 object header for the superblock extension + * message. + */ + if(H5Pset_libver_bounds(fapl, H5F_LIBVER_V18, H5F_LIBVER_LATEST) < 0) + TEST_ERROR break; case 2: if(H5Pset_file_space_strategy(fcpl, H5F_FSPACE_STRATEGY_PAGE, FALSE, (hsize_t)1) < 0) diff --git a/test/gen_bounds.c b/test/gen_bounds.c new file mode 100644 index 0000000..9702176 --- /dev/null +++ b/test/gen_bounds.c @@ -0,0 +1,606 @@ +/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + * Copyright by The HDF Group. * + * Copyright by the Board of Trustees of the University of Illinois. * + * All rights reserved. * + * * + * This file is part of HDF5. The full HDF5 copyright notice, including * + * terms governing use, modification, and redistribution, is contained in * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ + +/* + * Purpose: This program is to generate HDF5 data files used to test + * version bounds. + * + * Description + * =========== + * gen_bounds.c will generate the following files: + * - bounds_earliest_latest.h5 + * - bounds_earliest_v18.h5 + * - bounds_latest_latest.h5 + * - bounds_v18_latest.h5 + * - bounds_v18_v18.h5 + * These files are copied to 1.6 and 1.8 libraries for verifying + * that they can or cannot read particular file format. + */ + +#include "h5test.h" + +/*********************************************************************** + * gen_earliest_latest() creates file "bounds_earliest_latest.h5" + * + * File contents: + * - Version 0 superblock (default) + * - A chunked dataset with layout version 3, "DS_chunked_layout_3". (default) + * - A chunked dataset with layout version 4, "DS_chunked_layout_4". (H5Pset_chunk_opts) + * + * Return: SUCCEED/FAIL + * + ***********************************************************************/ + +/* File names for different file format */ +#define FILENAME_E_L "bounds_earliest_latest.h5" +#define FILENAME_E_18 "bounds_earliest_v18.h5" +#define FILENAME_L_L "bounds_latest_latest.h5" +#define FILENAME_18_L "bounds_v18_latest.h5" +#define FILENAME_18_18 "bounds_v18_v18.h5" + +/* 2-D dataset with fixed dimensions */ +#define RANK 2 +#define DIM1 100 +#define DIM2 200 +#define CHK_DIM1 50 +#define CHK_DIM2 50 + +static herr_t gen_earliest_latest(void) +{ + hid_t fid = -1; /* File ID */ + hid_t fapl = -1; /* File access property list ID */ + hid_t fcpl = -1; /* File creation property list ID */ + hid_t dcpl = -1; /* Dataset creation property list ID */ + hid_t space = -1; /* Dataspace ID */ + hid_t dset = -1; /* Dataset ID */ + float *buf = NULL; /* Buffer for writing data */ + float *bufp = NULL; /* Pointer to data buffer */ + hsize_t dims[RANK] = {DIM1, DIM2}; /* Dimensions */ + hsize_t chunk_dims[RANK] = {CHK_DIM1, CHK_DIM2}; /* Dimensions of chunk */ + int i, j; + herr_t ret = SUCCEED; /* Generic return value */ + + /* Create file creation property list */ + if((fcpl = H5Pcreate(H5P_FILE_CREATE)) < 0) TEST_ERROR; + + /* Create file access property list */ + if((fapl = H5Pcreate(H5P_FILE_ACCESS)) < 0) TEST_ERROR; + + /* Set the "use the earliest/latest version of the format" bounds + for creating objects in the file */ + if(H5Pset_libver_bounds(fapl, H5F_LIBVER_EARLIEST, H5F_LIBVER_LATEST) < 0) + TEST_ERROR; + + /* Create file */ + if((fid = H5Fcreate(FILENAME_E_L, H5F_ACC_TRUNC, fcpl, fapl)) <0) + TEST_ERROR; + + /* Close file property lists */ + if(H5Pclose(fapl) < 0) TEST_ERROR; + if(H5Pclose(fcpl) < 0) TEST_ERROR; + + /* + * Add a chunked dataset with layout version 3 (default) + */ + buf = (float *)HDmalloc((size_t)DIM1 * (size_t)DIM2 * sizeof(float)); + if (buf == NULL) TEST_ERROR; + + /* Fill sample data */ + bufp = buf; + for (i = 0; i < DIM1; i++) + for (j = 0; j < DIM2; j++) + *bufp = 100.0F; + + /* Create the dataspace */ + if((space = H5Screate_simple(RANK, dims, NULL)) < 0) TEST_ERROR; + + /* Create the dataset creation property list */ + if((dcpl = H5Pcreate(H5P_DATASET_CREATE)) < 0) TEST_ERROR; + + /* Set up for chunked data */ + if(H5Pset_chunk(dcpl, 2, chunk_dims) < 0) TEST_ERROR; + + /* Create and write the dataset */ + dset = H5Dcreate2(fid, "DS_chunked_layout_3", H5T_NATIVE_FLOAT, space, H5P_DEFAULT, dcpl, H5P_DEFAULT); + if (dset < 0) TEST_ERROR; + + ret = H5Dwrite(dset, H5T_NATIVE_FLOAT, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf); + if (ret < 0) TEST_ERROR; + + /* Close property list and dataset, will reuse dataspace */ + if(H5Pclose(dcpl) < 0) TEST_ERROR; + if(H5Dclose(dset) < 0) TEST_ERROR; + + /* + * Add a chunked dataset with layout version 4 (H5Pset_chunk_opts) + */ + + /* Create the dataset creation property list */ + if((dcpl = H5Pcreate(H5P_DATASET_CREATE)) < 0) TEST_ERROR; + + /* Set up for chunked data */ + if(H5Pset_chunk(dcpl, 2, chunk_dims) < 0) TEST_ERROR; + + /* Disable partial chunk filters, triggers layout version 4 */ + if(H5Pset_chunk_opts(dcpl, H5D_CHUNK_DONT_FILTER_PARTIAL_CHUNKS) < 0) + TEST_ERROR; + + /* Create and write the dataset */ + dset = H5Dcreate2(fid, "DS_chunked_layout_4", H5T_NATIVE_FLOAT, space, H5P_DEFAULT, dcpl, H5P_DEFAULT); + if (dset < 0) TEST_ERROR; + ret = H5Dwrite(dset, H5T_NATIVE_FLOAT, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf); + if (ret < 0) TEST_ERROR; + + /* Release allocated buffer */ + HDfree(buf); + bufp = buf = NULL; + + /* Close everything */ + if(H5Pclose(dcpl) < 0) TEST_ERROR; + if(H5Dclose(dset) < 0) TEST_ERROR; + if(H5Sclose(space) < 0) TEST_ERROR; + if(H5Fclose(fid) < 0) TEST_ERROR; + + return SUCCEED; + +error: + H5E_BEGIN_TRY { + H5Dclose(dset); + H5Sclose(space); + H5Pclose(dcpl); + H5Pclose(fcpl); + H5Pclose(fapl); + H5Fclose(fid); + HDfree(buf); + } H5E_END_TRY; + return FAIL; +} /* gen_earliest_latest */ + +/*********************************************************************** + * gen_earliest_v18() creates file "bounds_earliest_v18.h5" + * + * File contents: + * - Version 0 superblock (default) + * - A chunked dataset with layout version 3, "DS_chunked_layout_3". (default) + * + * Return: SUCCEED/FAIL + * + ***********************************************************************/ +static herr_t gen_earliest_v18(void) +{ + hid_t fid = -1; /* File ID */ + hid_t fapl = -1; /* File access property list ID */ + hid_t fcpl = -1; /* File creation property list ID */ + hid_t dcpl = -1; /* Dataset creation property list ID */ + hid_t space = -1; /* Dataspace ID */ + hid_t dset = -1; /* Dataset ID */ + float *buf = NULL; /* Buffer for writing data */ + float *bufp = NULL; /* Pointer to data buffer */ + hsize_t dims[RANK] = {DIM1, DIM2}; /* Dimensions */ + hsize_t chunk_dims[RANK] = {CHK_DIM1, CHK_DIM2}; /* Dimensions of chunk */ + int i, j; + herr_t ret = SUCCEED; /* Generic return value */ + + /* Create file creation property list */ + if((fcpl = H5Pcreate(H5P_FILE_CREATE)) < 0) TEST_ERROR; + + /* Create file access property list */ + if((fapl = H5Pcreate(H5P_FILE_ACCESS)) < 0) TEST_ERROR; + + /* Set the "use the earliest/v18 version of the format" bounds + for creating objects in the file */ + if(H5Pset_libver_bounds(fapl, H5F_LIBVER_EARLIEST, H5F_LIBVER_V18) < 0) + TEST_ERROR; + + /* Create file */ + if((fid = H5Fcreate(FILENAME_E_18, H5F_ACC_TRUNC, fcpl, fapl)) <0) + TEST_ERROR; + + /* Close file property lists */ + if(H5Pclose(fapl) < 0) TEST_ERROR; + if(H5Pclose(fcpl) < 0) TEST_ERROR; + + /* + * Add a chunked dataset with layout version 3 (default) + */ + + buf = (float *)HDmalloc((size_t)DIM1 * (size_t)DIM2 * sizeof(float)); + if (buf == NULL) TEST_ERROR; + + /* Fill sample data */ + bufp = buf; + for (i = 0; i < DIM1; i++) + for (j = 0; j < DIM2; j++) + *bufp = 100.0F; + + /* Create the dataspace */ + if((space = H5Screate_simple(RANK, dims, NULL)) < 0) TEST_ERROR; + + /* Create the dataset creation property list */ + if((dcpl = H5Pcreate(H5P_DATASET_CREATE)) < 0) TEST_ERROR; + + /* Set up for chunked data */ + if(H5Pset_chunk(dcpl, 2, chunk_dims) < 0) TEST_ERROR; + + /* Create and write the dataset */ + dset = H5Dcreate2(fid, "DS_chunked_layout_3", H5T_NATIVE_FLOAT, space, H5P_DEFAULT, dcpl, H5P_DEFAULT); + if (dset < 0) TEST_ERROR; + + ret = H5Dwrite(dset, H5T_NATIVE_FLOAT, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf); + if (ret < 0) TEST_ERROR; + + /* Release allocated buffer */ + HDfree(buf); + bufp = buf = NULL; + + /* Close everything */ + if(H5Pclose(dcpl) < 0) TEST_ERROR; + if(H5Dclose(dset) < 0) TEST_ERROR; + if(H5Sclose(space) < 0) TEST_ERROR; + if(H5Fclose(fid) < 0) TEST_ERROR; + + return SUCCEED; + +error: + H5E_BEGIN_TRY { + H5Dclose(dset); + H5Sclose(space); + H5Pclose(dcpl); + H5Pclose(fcpl); + H5Pclose(fapl); + H5Fclose(fid); + HDfree(buf); + } H5E_END_TRY; + return FAIL; +} /* gen_earliest_v18 */ + +/*********************************************************************** + * gen_latest_latest() creates file "bounds_latest_latest.h5" + * + * File contents: + * - Version 3 superblock (triggered by H5Fcreate with H5F_ACC_SWMR_WRITE) + * - A chunked dataset with layout version 4, "DS_chunked_layout_4". (H5Pset_chunk_opts) + * + * NOTE: As of Feb 2018, latest is 1.10. + * + * Return: SUCCEED/FAIL + * + ***********************************************************************/ +static herr_t gen_latest_latest(void) +{ + hid_t fid = -1; /* File ID */ + hid_t dcpl = -1; /* Dataset creation property list ID */ + hid_t space = -1; /* Dataspace ID */ + hid_t dset = -1; /* Dataset ID */ + float *buf = NULL; /* Buffer for writing data */ + float *bufp = NULL; /* Pointer to data buffer */ + hsize_t dims[RANK] = {DIM1, DIM2}; /* Dimensions */ + hsize_t chunk_dims[RANK] = {CHK_DIM1, CHK_DIM2}; /* Dimensions of chunk */ + int i, j; + herr_t ret = SUCCEED; /* Generic return value */ + + /* Create file with H5F_ACC_SWMR_WRITE, triggers version 3 superblock */ + fid = H5Fcreate(FILENAME_L_L, H5F_ACC_SWMR_WRITE, H5P_DEFAULT, H5P_DEFAULT); + if (fid < 0) TEST_ERROR; + + /* + * Add a chunked dataset with layout version 4 (H5Pset_chunk_opts) + */ + + buf = (float *)HDmalloc((size_t)DIM1 * (size_t)DIM2 * sizeof(float)); + if (buf == NULL) TEST_ERROR; + + /* Fill sample data */ + bufp = buf; + for (i = 0; i < DIM1; i++) + for (j = 0; j < DIM2; j++) + *bufp = 100.0F; + + /* Create the dataspace */ + if((space = H5Screate_simple(RANK, dims, NULL)) < 0) TEST_ERROR; + + /* Create the dataset creation property list */ + if((dcpl = H5Pcreate(H5P_DATASET_CREATE)) < 0) TEST_ERROR; + + /* Set up for chunked data */ + if(H5Pset_chunk(dcpl, 2, chunk_dims) < 0) TEST_ERROR; + + /* Disable partial chunk filters, triggers layout version 4 */ + if(H5Pset_chunk_opts(dcpl, H5D_CHUNK_DONT_FILTER_PARTIAL_CHUNKS) < 0) + TEST_ERROR; + + /* Create and write the dataset */ + dset = H5Dcreate2(fid, "DS_chunked_layout_4", H5T_NATIVE_FLOAT, space, H5P_DEFAULT, dcpl, H5P_DEFAULT); + if (dset < 0) TEST_ERROR; + ret = H5Dwrite(dset, H5T_NATIVE_FLOAT, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf); + if (ret < 0) TEST_ERROR; + + /* Release allocated buffer */ + HDfree(buf); + bufp = buf = NULL; + + /* Close everything */ + if(H5Pclose(dcpl) < 0) TEST_ERROR; + if(H5Dclose(dset) < 0) TEST_ERROR; + if(H5Sclose(space) < 0) TEST_ERROR; + if(H5Fclose(fid) < 0) TEST_ERROR; + + return SUCCEED; + +error: + H5E_BEGIN_TRY { + H5Dclose(dset); + H5Sclose(space); + H5Pclose(dcpl); + H5Fclose(fid); + HDfree(buf); + } H5E_END_TRY; + return FAIL; +} /* gen_latest_latest */ + +/*********************************************************************** + * gen_v18_latest() creates file "bounds_v18_latest.h5" + * + * File contents: + * - Version 2 superblock + * - A chunked dataset with layout version 3, "DS_chunked_layout_3". (default) + * + * Return: SUCCEED/FAIL + * + ***********************************************************************/ +static herr_t gen_v18_latest(void) +{ + hid_t fid = -1; /* File ID */ + hid_t fapl = -1; /* File access property list ID */ + hid_t fcpl = -1; /* File creation property list ID */ + hid_t dcpl = -1; /* Dataset creation property list ID */ + hid_t space = -1; /* Dataspace ID */ + hid_t dset = -1; /* Dataset ID */ + float *buf = NULL; /* Buffer for writing data */ + float *bufp = NULL; /* Pointer to data buffer */ + hsize_t dims[RANK] = {DIM1, DIM2}; /* Dimensions */ + hsize_t chunk_dims[RANK] = {CHK_DIM1, CHK_DIM2}; /* Dimensions of chunk */ + int i, j; + herr_t ret = SUCCEED; /* Generic return value */ + + /* Create file creation property list */ + if((fcpl = H5Pcreate(H5P_FILE_CREATE)) < 0) TEST_ERROR; + + /* Create file access property list */ + if((fapl = H5Pcreate(H5P_FILE_ACCESS)) < 0) TEST_ERROR; + + /* Set the "use the v18/latest version of the format" bounds + for creating objects in the file, also trigger version 2 superblock */ + if(H5Pset_libver_bounds(fapl, H5F_LIBVER_V18, H5F_LIBVER_LATEST) < 0) + TEST_ERROR; + + /* Create file */ + if((fid = H5Fcreate(FILENAME_18_L, H5F_ACC_TRUNC, fcpl, fapl)) <0) + TEST_ERROR; + + /* Close file property lists */ + if(H5Pclose(fapl) < 0) TEST_ERROR; + if(H5Pclose(fcpl) < 0) TEST_ERROR; + + /* + * Add a chunked dataset with layout version 3 (default) + */ + + buf = (float *)HDmalloc((size_t)DIM1 * (size_t)DIM2 * sizeof(float)); + if (buf == NULL) TEST_ERROR; + + /* Fill sample data */ + bufp = buf; + for (i = 0; i < DIM1; i++) + for (j = 0; j < DIM2; j++) + *bufp = 100.0F; + + /* Create the dataspace */ + if((space = H5Screate_simple(RANK, dims, NULL)) < 0) TEST_ERROR; + + /* Create the dataset creation property list */ + if((dcpl = H5Pcreate(H5P_DATASET_CREATE)) < 0) TEST_ERROR; + + /* Set up for chunked data */ + if(H5Pset_chunk(dcpl, 2, chunk_dims) < 0) TEST_ERROR; + + /* Create and write the dataset */ + dset = H5Dcreate2(fid, "DS_chunked_layout_3", H5T_NATIVE_FLOAT, space, H5P_DEFAULT, dcpl, H5P_DEFAULT); + if (dset < 0) TEST_ERROR; + ret = H5Dwrite(dset, H5T_NATIVE_FLOAT, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf); + if (ret < 0) TEST_ERROR; + + /* Release allocated buffer */ + HDfree(buf); + bufp = buf = NULL; + + /* Close property list and dataset, will reuse dataspace */ + if(H5Pclose(dcpl) < 0) TEST_ERROR; + if(H5Dclose(dset) < 0) TEST_ERROR; + if(H5Sclose(space) < 0) TEST_ERROR; + if(H5Fclose(fid) < 0) TEST_ERROR; + + return SUCCEED; + +error: + H5E_BEGIN_TRY { + H5Dclose(dset); + H5Sclose(space); + H5Pclose(dcpl); + H5Pclose(fcpl); + H5Pclose(fapl); + H5Fclose(fid); + HDfree(buf); + } H5E_END_TRY; + return FAIL; +} /* gen_v18_latest */ + +/*********************************************************************** + * gen_v18_v18() creates file "bounds_v18_v18.h5" + * + * File contents: + * - Version 2 superblock (H5Pset_libver_bounds(v18, v18) + * - A chunked dataset with layout version 3, "DS_chunked_layout_3". (default) + * - A chunked dataset with layout version 4, "DS_chunked_layout_4". (H5Pset_chunk_opts) + * + * Return: SUCCEED/FAIL + * + ***********************************************************************/ +static herr_t gen_v18_v18(void) +{ + hid_t fid = -1; /* File ID */ + hid_t fapl = -1; /* File access property list ID */ + hid_t fcpl = -1; /* File creation property list ID */ + hid_t dcpl = -1; /* Dataset creation property list ID */ + hid_t space = -1; /* Dataspace ID */ + hid_t dset = -1; /* Dataset ID */ + float *buf = NULL; /* Buffer for writing data */ + float *bufp = NULL; /* Pointer to data buffer */ + hsize_t dims[RANK] = {DIM1, DIM2}; /* Dimensions */ + hsize_t chunk_dims[RANK] = {CHK_DIM1, CHK_DIM2}; /* Dimensions of chunk */ + int i, j; + herr_t ret = SUCCEED; /* Generic return value */ + + /* Create file creation property list */ + if((fcpl = H5Pcreate(H5P_FILE_CREATE)) < 0) TEST_ERROR; + + /* Create file access property list */ + if((fapl = H5Pcreate(H5P_FILE_ACCESS)) < 0) TEST_ERROR; + + /* Set the "use the v18 version of the format" bounds + for creating objects in the file */ + if(H5Pset_libver_bounds(fapl, H5F_LIBVER_V18, H5F_LIBVER_V18) < 0) + TEST_ERROR; + + /* Create file */ + if((fid = H5Fcreate(FILENAME_18_18, H5F_ACC_TRUNC, fcpl, fapl)) <0) + TEST_ERROR; + + /* Close file property lists */ + if(H5Pclose(fapl) < 0) TEST_ERROR; + if(H5Pclose(fcpl) < 0) TEST_ERROR; + + /* + * Add a chunked dataset with layout version 3 (default) + */ + + buf = (float *)HDmalloc((size_t)DIM1 * (size_t)DIM2 * sizeof(float)); + if (buf == NULL) TEST_ERROR; + + /* Fill sample data */ + bufp = buf; + for (i = 0; i < DIM1; i++) + for (j = 0; j < DIM2; j++) + *bufp = 100.0F; + + /* Create the dataspace */ + if((space = H5Screate_simple(RANK, dims, NULL)) < 0) TEST_ERROR; + + /* Create the dataset creation property list */ + if((dcpl = H5Pcreate(H5P_DATASET_CREATE)) < 0) TEST_ERROR; + + /* Set up for chunked data */ + if(H5Pset_chunk(dcpl, 2, chunk_dims) < 0) TEST_ERROR; + + /* Create and write the dataset */ + dset = H5Dcreate2(fid, "DS_chunked_layout_3", H5T_NATIVE_FLOAT, space, H5P_DEFAULT, dcpl, H5P_DEFAULT); + if (dset < 0) TEST_ERROR; + ret = H5Dwrite(dset, H5T_NATIVE_FLOAT, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf); + if (ret < 0) TEST_ERROR; + + /* Close property list and dataset, will reuse dataspace */ + if(H5Pclose(dcpl) < 0) TEST_ERROR; + if(H5Dclose(dset) < 0) TEST_ERROR; + + /* Close the file, then reopen it with the latest version */ + if(H5Fclose(fid) < 0) TEST_ERROR; + + /* Create file access property list */ + if((fapl = H5Pcreate(H5P_FILE_ACCESS)) < 0) TEST_ERROR; + + /* Set the "use the v18/latest version of the format" bounds + for creating a layout version 4 object in the file */ + if(H5Pset_libver_bounds(fapl, H5F_LIBVER_V18, H5F_LIBVER_LATEST) < 0) + TEST_ERROR; + + if((fid = H5Fopen(FILENAME_18_18, H5F_ACC_RDWR, fapl)) < 0) + TEST_ERROR; + + /* + * Add a chunked dataset with layout version 4 (H5Pset_chunk_opts) + */ + + /* Create the dataset creation property list */ + if((dcpl = H5Pcreate(H5P_DATASET_CREATE)) < 0) TEST_ERROR; + + /* Set up for chunked data */ + if(H5Pset_chunk(dcpl, 2, chunk_dims) < 0) TEST_ERROR; + + /* Disable partial chunk filters */ + if(H5Pset_chunk_opts(dcpl, H5D_CHUNK_DONT_FILTER_PARTIAL_CHUNKS) < 0) + TEST_ERROR; + + /* Create and write the dataset */ + dset = H5Dcreate2(fid, "DS_chunked_layout_4", H5T_NATIVE_FLOAT, space, H5P_DEFAULT, dcpl, H5P_DEFAULT); + if (dset < 0) TEST_ERROR; + ret = H5Dwrite(dset, H5T_NATIVE_FLOAT, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf); + if (ret < 0) TEST_ERROR; + + /* Release allocated buffer */ + HDfree(buf); + bufp = buf = NULL; + + /* Close everything */ + if(H5Pclose(dcpl) < 0) TEST_ERROR; + if(H5Pclose(fapl) < 0) TEST_ERROR; + if(H5Dclose(dset) < 0) TEST_ERROR; + if(H5Sclose(space) < 0) TEST_ERROR; + if(H5Fclose(fid) < 0) TEST_ERROR; + return SUCCEED; + +error: + H5E_BEGIN_TRY { + H5Dclose(dset); + H5Sclose(space); + H5Pclose(dcpl); + H5Pclose(fcpl); + H5Pclose(fapl); + H5Fclose(fid); + HDfree(buf); + } H5E_END_TRY; + return FAIL; +} /* gen_v18_v18 */ + +int main(void) +{ + /* Generate file bounds_earliest_latest.h5 */ + if (gen_earliest_latest() < 0) TEST_ERROR; + + /* Generate file bounds_earliest_v18.h5 */ + if (gen_earliest_v18() < 0) TEST_ERROR; + + /* Generate file bounds_latest_latest.h5 */ + if (gen_latest_latest() < 0) TEST_ERROR; + + /* Generate file bounds_v18_latest.h5 */ + if (gen_v18_latest() < 0) TEST_ERROR; + + /* Generate file bounds_v18_v18.h5 */ + if (gen_v18_v18() < 0) TEST_ERROR; + + return EXIT_SUCCESS; + +error: + return EXIT_FAILURE; +} + diff --git a/test/gen_cross.c b/test/gen_cross.c index 60ae319..f7a1938 100644 --- a/test/gen_cross.c +++ b/test/gen_cross.c @@ -78,7 +78,7 @@ int create_szip_dsets_float(hid_t fid, hid_t fsid, hid_t msid); int create_shuffle_dsets_float(hid_t fid, hid_t fsid, hid_t msid); int create_nbit_dsets_float(hid_t fid, hid_t fsid, hid_t msid); - + /*------------------------------------------------------------------------- * Function: create_normal_dset * @@ -107,8 +107,8 @@ create_normal_dset(hid_t fid, hid_t fsid, hid_t msid) * Data and output buffer initialization. */ for (j = 0; j < NX; j++) { - for (i = 0; i < NY; i++) - data[j][i] = ((float)(i + j + 1)) / 3; + for (i = 0; i < NY; i++) + data[j][i] = ((float)(i + j + 1)) / 3; } /* * 1/3 2/3 3/3 4/3 5/3 6/3 @@ -142,7 +142,7 @@ create_normal_dset(hid_t fid, hid_t fsid, hid_t msid) if(H5Dwrite(dataset, H5T_NATIVE_FLOAT, msid, fsid, H5P_DEFAULT, data) < 0) TEST_ERROR - /* + /* * Close dataset */ if(H5Dclose(dataset) < 0) @@ -162,7 +162,7 @@ create_normal_dset(hid_t fid, hid_t fsid, hid_t msid) if(H5Dwrite(dataset, H5T_NATIVE_FLOAT, msid, fsid, H5P_DEFAULT, data) < 0) TEST_ERROR - /* + /* * Close dataset */ if(H5Dclose(dataset) < 0) @@ -185,7 +185,7 @@ error: return -1; } - + /*------------------------------------------------------------------------- * Function: create_scale_offset_dsets_float * @@ -276,7 +276,7 @@ error: return -1; } - + /*------------------------------------------------------------------------- * Function: create_scale_offset_dsets_double * @@ -306,8 +306,8 @@ create_scale_offset_dsets_double(hid_t fid, hid_t fsid, hid_t msid) * Data and output buffer initialization. */ for (j = 0; j < NX; j++) { - for (i = 0; i < NY; i++) - data[j][i] = ((double)(i + j + 1))/3; + for (i = 0; i < NY; i++) + data[j][i] = ((double)(i + j + 1))/3; } /* @@ -367,7 +367,7 @@ error: return -1; } - + /*------------------------------------------------------------------------- * Function: create_scale_offset_dset_char * @@ -466,7 +466,7 @@ error: return -1; } - + /*------------------------------------------------------------------------- * Function: create_scale_offset_dset_short * @@ -565,7 +565,7 @@ error: return -1; } - + /*------------------------------------------------------------------------- * Function: create_scale_offset_dset_int * @@ -595,8 +595,8 @@ create_scale_offset_dsets_int(hid_t fid, hid_t fsid, hid_t msid) * Data and output buffer initialization. */ for (j = 0; j < NX; j++) { - for (i = 0; i < NY; i++) - data[j][i] = i + j; + for (i = 0; i < NY; i++) + data[j][i] = i + j; } /* * 0 1 2 3 4 5 @@ -664,7 +664,7 @@ error: return -1; } - + /*------------------------------------------------------------------------- * Function: create_scale_offset_dset_long_long * @@ -764,7 +764,7 @@ error: return -1; } - + /*------------------------------------------------------------------------- * Function: create_fletcher_dsets_float * @@ -855,7 +855,7 @@ error: return -1; } - + /*------------------------------------------------------------------------- * Function: create_deflate_dsets_float * @@ -956,7 +956,7 @@ error: } #ifdef H5_HAVE_FILTER_SZIP - + /*------------------------------------------------------------------------- * Function: create_szip_dsets_float * @@ -1048,7 +1048,7 @@ error: } #endif /* H5_HAVE_FILTER_SZIP */ - + /*------------------------------------------------------------------------- * Function: create_shuffle_dsets_float * @@ -1139,7 +1139,7 @@ error: return -1; } - + /*------------------------------------------------------------------------- * Function: create_nbit_dsets_float * @@ -1224,7 +1224,7 @@ create_nbit_dsets_float(hid_t fid, hid_t fsid, hid_t msid) TEST_ERROR /* Now create a dataset with a big-endian type */ - if(H5Tset_order(datatype, H5T_ORDER_BE) < 0) + if(H5Tset_order(datatype, H5T_ORDER_BE) < 0) TEST_ERROR if((dataset = H5Dcreate2(fid, DATASETNAME23, datatype, fsid, H5P_DEFAULT, dcpl, H5P_DEFAULT)) < 0) @@ -1251,7 +1251,7 @@ error: return -1; } - + /*------------------------------------------------------------------------- * Function: main * diff --git a/test/genall5.c b/test/genall5.c index a48f14b..e3a9c96 100644 --- a/test/genall5.c +++ b/test/genall5.c @@ -1248,29 +1248,55 @@ void os_grp_0(hid_t fid, const char *group_name) { hid_t gid = -1; + hid_t fapl = -1; + H5F_libver_t low, high; + herr_t ret; - if ( pass ) { /* turn file format latest off */ + if ( pass ) { /* get the file's file access property list */ - ret = H5Fset_latest_format(fid, FALSE); + fapl = H5Fget_access_plist(fid); + if ( fapl <= 0 ) { - if ( ret < 0 ) { + pass = FALSE; + failure_mssg = "os_grp_0: H5Fget_access_plist() failed."; + } + HDassert(fapl > 0); + } + + if ( pass ) { /* get low and high bounds from fapl */ - pass = FALSE; - failure_mssg = "os_grp_0: H5Fset_latest_format() failed(1)."; - } + ret = H5Pget_libver_bounds(fapl, &low, &high); + if ( ret < 0 ) { + + pass = FALSE; + failure_mssg = "os_grp_0: H5Pget_libver_bounds() failed(1)."; + } HDassert(ret >= 0); } + if ( pass ) { /* turn file format latest off */ + + if(low >= H5F_LIBVER_V18) { + ret = H5Fset_libver_bounds(fid, H5F_LIBVER_EARLIEST, high); + if ( ret < 0 ) { + + pass = FALSE; + failure_mssg = "os_grp_0: H5Fset_libver_bounds() failed(1)."; + } + HDassert(ret >= 0); + } + } + if ( pass ) { gid = H5Gcreate2(fid, group_name, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); if ( gid <= 0 ) { - pass = FALSE; - failure_mssg = "os_grp_0: H5Gcreate2() failed."; - } + pass = FALSE; + failure_mssg = "os_grp_0: H5Gcreate2() failed."; + } HDassert(gid > 0); } @@ -1278,24 +1304,25 @@ os_grp_0(hid_t fid, const char *group_name) ret = H5Gclose(gid); - if ( ret < 0 ) { + if ( ret < 0 ) { - pass = FALSE; - failure_mssg = "os_grp_0: H5Gclose() failed."; - } + pass = FALSE; + failure_mssg = "os_grp_0: H5Gclose() failed."; + } HDassert(ret >= 0); } - if ( pass ) { /* turn file format latest on */ + if ( pass ) { /* restore low and high bounds */ - ret = H5Fset_latest_format(fid, TRUE); - - if ( ret < 0 ) { + if(low >= H5F_LIBVER_V18) { + ret = H5Fset_libver_bounds(fid, low, high); + if ( ret < 0 ) { - pass = FALSE; - failure_mssg = "os_grp_0: H5Fset_latest_format() failed(2)."; - } - HDassert(ret >= 0); + pass = FALSE; + failure_mssg = "os_grp_0: H5Fset_libver_bounds() failed(1)."; + } + HDassert(ret >= 0); + } } return; @@ -1462,28 +1489,53 @@ os_grp_n(hid_t fid, const char *group_name, int proc_num, unsigned nlinks) { hid_t gid = -1; unsigned u; + hid_t fapl = -1; + H5F_libver_t low, high; herr_t ret; - if ( pass ) { /* turn file format latest off */ + if ( pass ) { /* get the file's file access property list */ - ret = H5Fset_latest_format(fid, FALSE); + fapl = H5Fget_access_plist(fid); + if ( fapl <= 0 ) { - if ( ret < 0 ) { + pass = FALSE; + failure_mssg = "os_grp_n: H5Fget_access_plist() failed."; + } + HDassert(fapl > 0); + } - pass = FALSE; - failure_mssg = "os_grp_n: H5Fset_latest_format() failed(1)."; - } + if ( pass ) { /* get low and high bounds from fapl */ + + ret = H5Pget_libver_bounds(fapl, &low, &high); + if ( ret < 0 ) { + + pass = FALSE; + failure_mssg = "os_grp_0: H5Pget_libver_bounds() failed(1)."; + } HDassert(ret >= 0); } + if ( pass ) { /* turn file format latest off */ + + if(low >= H5F_LIBVER_V18) { + ret = H5Fset_libver_bounds(fid, H5F_LIBVER_EARLIEST, high); + if ( ret < 0 ) { + + pass = FALSE; + failure_mssg = "os_grp_0: H5Fset_libver_bounds() failed(1)."; + } + HDassert(ret >= 0); + } + } + if ( pass ) { gid = H5Gcreate2(fid, group_name, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); if ( gid <= 0 ) { - pass = FALSE; - failure_mssg = "os_grp_n: H5Gcreate2() failed."; + pass = FALSE; + failure_mssg = "os_grp_n: H5Gcreate2() failed."; } HDassert(gid > 0); } @@ -1538,16 +1590,17 @@ os_grp_n(hid_t fid, const char *group_name, int proc_num, unsigned nlinks) assert(ret >= 0); } - if ( pass ) { /* turn file format latest on */ - - ret = H5Fset_latest_format(fid, TRUE); + if ( pass ) { /* restore low and high bounds */ - if ( ret < 0 ) { + if(low >= H5F_LIBVER_V18) { + ret = H5Fset_libver_bounds(fid, low, high); + if ( ret < 0 ) { - pass = FALSE; - failure_mssg = "os_grp_n: H5Fset_latest_format() failed(2)."; - } - HDassert(ret >= 0); + pass = FALSE; + failure_mssg = "os_grp_n: H5Fset_libver_bounds() failed(2)."; + } + HDassert(ret >= 0); + } } return; diff --git a/test/gheap.c b/test/gheap.c index c354366..110255b 100644 --- a/test/gheap.c +++ b/test/gheap.c @@ -15,9 +15,9 @@ * Programmer: Robb Matzke * Tuesday, March 31, 1998 * - * Purpose: Tests the global heap. The global heap is the set of all - * collections but the collections are not related to one - * another by anything that appears in the file format. + * Purpose: Tests the global heap. The global heap is the set of all + * collections but the collections are not related to one + * another by anything that appears in the file format. */ #include "h5test.h" #include "H5ACprivate.h" @@ -54,18 +54,18 @@ const char *FILENAME[] = { NULL }; - + /*------------------------------------------------------------------------- - * Function: test_1 + * Function: test_1 * - * Purpose: Writes a sequence of objects to the global heap where each - * object is larger than the one before. + * Purpose: Writes a sequence of objects to the global heap where each + * object is larger than the one before. * - * Return: Success: 0 + * Return: Success: 0 * - * Failure: number of errors + * Failure: number of errors * - * Programmer: Robb Matzke + * Programmer: Robb Matzke * Tuesday, March 31, 1998 * * Modifications: @@ -75,16 +75,16 @@ const char *FILENAME[] = { static int test_1 (hid_t fapl) { - hid_t file = -1; - H5F_t *f = NULL; - H5HG_t *obj = NULL; - uint8_t out[GHEAP_TEST_NOBJS]; - uint8_t in[GHEAP_TEST_NOBJS]; - size_t u; - size_t size; - herr_t status; - int nerrors = 0; - char filename[1024]; + hid_t file = -1; + H5F_t *f = NULL; + H5HG_t *obj = NULL; + uint8_t out[GHEAP_TEST_NOBJS]; + uint8_t in[GHEAP_TEST_NOBJS]; + size_t u; + size_t size; + herr_t status; + int nerrors = 0; + char filename[1024]; TESTING("monotonically increasing lengths"); @@ -95,11 +95,11 @@ test_1 (hid_t fapl) /* Open a clean file */ h5_fixname(FILENAME[0], fapl, filename, sizeof filename); if((file = H5Fcreate(filename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0) - goto error; + goto error; if(NULL == (f = (H5F_t *)H5I_object(file))) { - H5_FAILED(); - puts(" Unable to create file"); - goto error; + H5_FAILED(); + puts(" Unable to create file"); + goto error; } /* @@ -108,37 +108,37 @@ test_1 (hid_t fapl) * be monotonically increasing. */ for(u = 0; u < GHEAP_TEST_NOBJS; u++) { - size = u + 1; - HDmemset(out, (int)('A' + u % 26), size); - H5Eclear2(H5E_DEFAULT); - status = H5HG_insert(f, H5AC_ind_read_dxpl_id, size, out, obj + u); - if(status < 0) { - H5_FAILED(); - puts(" Unable to insert object into global heap"); - nerrors++; - } else if(u && H5F_addr_gt(obj[u - 1].addr, obj[u].addr)) { - H5_FAILED(); - puts(" Collection addresses are not monotonically increasing"); - nerrors++; - } + size = u + 1; + HDmemset(out, (int)('A' + u % 26), size); + H5Eclear2(H5E_DEFAULT); + status = H5HG_insert(f, H5AC_ind_read_dxpl_id, size, out, obj + u); + if(status < 0) { + H5_FAILED(); + puts(" Unable to insert object into global heap"); + nerrors++; + } else if(u && H5F_addr_gt(obj[u - 1].addr, obj[u].addr)) { + H5_FAILED(); + puts(" Collection addresses are not monotonically increasing"); + nerrors++; + } } /* * Now try to read each object back. */ for(u = 0; u < GHEAP_TEST_NOBJS; u++) { - size = u + 1; - HDmemset(out, (int)('A' + u % 26), size); - H5Eclear2(H5E_DEFAULT); - if(NULL == H5HG_read(f, H5AC_ind_read_dxpl_id, obj + u, in, NULL)) { - H5_FAILED(); - puts(" Unable to read object"); - nerrors++; - } else if(HDmemcmp(in, out, size)) { - H5_FAILED(); - puts(" Value read doesn't match value written"); - nerrors++; - } + size = u + 1; + HDmemset(out, (int)('A' + u % 26), size); + H5Eclear2(H5E_DEFAULT); + if(NULL == H5HG_read(f, H5AC_ind_read_dxpl_id, obj + u, in, NULL)) { + H5_FAILED(); + puts(" Unable to read object"); + nerrors++; + } else if(HDmemcmp(in, out, size)) { + H5_FAILED(); + puts(" Value read doesn't match value written"); + nerrors++; + } } /* Release buffer */ @@ -153,25 +153,25 @@ test_1 (hid_t fapl) error: H5E_BEGIN_TRY { - H5Fclose(file); + H5Fclose(file); } H5E_END_TRY; if(obj) HDfree(obj); return MAX(1, nerrors); } - + /*------------------------------------------------------------------------- - * Function: test_2 + * Function: test_2 * - * Purpose: Writes a sequence of objects to the global heap where each - * object is smaller than the one before. + * Purpose: Writes a sequence of objects to the global heap where each + * object is smaller than the one before. * - * Return: Success: 0 + * Return: Success: 0 * - * Failure: number of errors + * Failure: number of errors * - * Programmer: Robb Matzke + * Programmer: Robb Matzke * Tuesday, March 31, 1998 * * Modifications: @@ -181,15 +181,15 @@ error: static int test_2 (hid_t fapl) { - hid_t file = -1; - H5F_t *f = NULL; - H5HG_t *obj = NULL; - uint8_t out[GHEAP_TEST_NOBJS]; - uint8_t in[GHEAP_TEST_NOBJS]; - size_t u; - size_t size; - int nerrors = 0; - char filename[1024]; + hid_t file = -1; + H5F_t *f = NULL; + H5HG_t *obj = NULL; + uint8_t out[GHEAP_TEST_NOBJS]; + uint8_t in[GHEAP_TEST_NOBJS]; + size_t u; + size_t size; + int nerrors = 0; + char filename[1024]; TESTING("monotonically decreasing lengths"); @@ -200,43 +200,43 @@ test_2 (hid_t fapl) /* Open a clean file */ h5_fixname(FILENAME[1], fapl, filename, sizeof filename); if((file = H5Fcreate(filename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0) - goto error; + goto error; if(NULL == (f = (H5F_t *)H5I_object(file))) { - H5_FAILED(); - puts(" Unable to create file"); - goto error; + H5_FAILED(); + puts(" Unable to create file"); + goto error; } /* * Write the objects, monotonically decreasing in length. */ for(u = 0; u < GHEAP_TEST_NOBJS; u++) { - size = GHEAP_TEST_NOBJS - u; - HDmemset(out, (int)('A' + u % 26), size); - H5Eclear2(H5E_DEFAULT); - if (H5HG_insert (f, H5AC_ind_read_dxpl_id, size, out, obj + u) < 0) { - H5_FAILED(); - puts(" Unable to insert object into global heap"); - nerrors++; - } + size = GHEAP_TEST_NOBJS - u; + HDmemset(out, (int)('A' + u % 26), size); + H5Eclear2(H5E_DEFAULT); + if (H5HG_insert (f, H5AC_ind_read_dxpl_id, size, out, obj + u) < 0) { + H5_FAILED(); + puts(" Unable to insert object into global heap"); + nerrors++; + } } /* * Now try to read each object back. */ for(u = 0; u < GHEAP_TEST_NOBJS; u++) { - size = GHEAP_TEST_NOBJS - u; - HDmemset(out, (int)('A' + u % 26), size); - H5Eclear2(H5E_DEFAULT); - if (NULL==H5HG_read (f, H5AC_ind_read_dxpl_id, obj + u, in, NULL)) { - H5_FAILED(); - puts(" Unable to read object"); - nerrors++; - } else if (memcmp (in, out, size)) { - H5_FAILED(); - puts(" Value read doesn't match value written"); - nerrors++; - } + size = GHEAP_TEST_NOBJS - u; + HDmemset(out, (int)('A' + u % 26), size); + H5Eclear2(H5E_DEFAULT); + if (NULL==H5HG_read (f, H5AC_ind_read_dxpl_id, obj + u, in, NULL)) { + H5_FAILED(); + puts(" Unable to read object"); + nerrors++; + } else if (memcmp (in, out, size)) { + H5_FAILED(); + puts(" Value read doesn't match value written"); + nerrors++; + } } /* Release buffer */ @@ -251,25 +251,25 @@ test_2 (hid_t fapl) error: H5E_BEGIN_TRY { - H5Fclose(file); + H5Fclose(file); } H5E_END_TRY; if(obj) HDfree(obj); return MAX(1, nerrors); } - + /*------------------------------------------------------------------------- - * Function: test_3 + * Function: test_3 * - * Purpose: Creates a few global heap objects and then removes them all. - * The collection should also be removed. + * Purpose: Creates a few global heap objects and then removes them all. + * The collection should also be removed. * - * Return: Success: 0 + * Return: Success: 0 * - * Failure: number of errors + * Failure: number of errors * - * Programmer: Robb Matzke + * Programmer: Robb Matzke * Tuesday, March 31, 1998 * * Modifications: @@ -279,15 +279,15 @@ test_2 (hid_t fapl) static int test_3 (hid_t fapl) { - hid_t file = -1; - H5F_t *f = NULL; - H5HG_t *obj = NULL; - uint8_t out[GHEAP_TEST_NOBJS]; - size_t u; - size_t size; - herr_t status; - int nerrors = 0; - char filename[1024]; + hid_t file = -1; + H5F_t *f = NULL; + H5HG_t *obj = NULL; + uint8_t out[GHEAP_TEST_NOBJS]; + size_t u; + size_t size; + herr_t status; + int nerrors = 0; + char filename[1024]; TESTING("complete object removal"); @@ -298,34 +298,34 @@ test_3 (hid_t fapl) /* Open a clean file */ h5_fixname(FILENAME[2], fapl, filename, sizeof filename); if((file = H5Fcreate(filename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0) - goto error; + goto error; if(NULL == (f = (H5F_t *)H5I_object(file))) { - H5_FAILED(); - puts(" Unable to create file"); - goto error; + H5_FAILED(); + puts(" Unable to create file"); + goto error; } /* Create some stuff */ for(u = 0; u < GHEAP_TEST_NOBJS; u++) { - size = u % 30 + 100; - HDmemset(out, (int)('A' + u % 26), size); - H5Eclear2(H5E_DEFAULT); - status = H5HG_insert (f, H5AC_ind_read_dxpl_id, size, out, obj + u); - if (status<0) { - H5_FAILED(); - puts(" Unable to insert object into global heap"); - nerrors++; - } + size = u % 30 + 100; + HDmemset(out, (int)('A' + u % 26), size); + H5Eclear2(H5E_DEFAULT); + status = H5HG_insert (f, H5AC_ind_read_dxpl_id, size, out, obj + u); + if (status<0) { + H5_FAILED(); + puts(" Unable to insert object into global heap"); + nerrors++; + } } /* Remove everything */ for(u = 0; u < GHEAP_TEST_NOBJS; u++) { - status = H5HG_remove (f, H5AC_ind_read_dxpl_id, obj + u); - if (status<0) { - H5_FAILED(); - puts(" Unable to remove object"); - nerrors++; - } + status = H5HG_remove (f, H5AC_ind_read_dxpl_id, obj + u); + if (status<0) { + H5_FAILED(); + puts(" Unable to remove object"); + nerrors++; + } } /* Release buffer */ @@ -340,26 +340,26 @@ test_3 (hid_t fapl) error: H5E_BEGIN_TRY { - H5Fclose(file); + H5Fclose(file); } H5E_END_TRY; if(obj) HDfree(obj); return MAX(1, nerrors); } - + /*------------------------------------------------------------------------- - * Function: test_4 + * Function: test_4 * - * Purpose: Tests the H5HG_remove() feature by writing lots of objects - * and occassionally removing some. When we're done they're all - * removed. + * Purpose: Tests the H5HG_remove() feature by writing lots of objects + * and occassionally removing some. When we're done they're all + * removed. * - * Return: Success: 0 + * Return: Success: 0 * - * Failure: number of errors + * Failure: number of errors * - * Programmer: Robb Matzke + * Programmer: Robb Matzke * Tuesday, March 31, 1998 * * Modifications: @@ -369,15 +369,15 @@ test_3 (hid_t fapl) static int test_4 (hid_t fapl) { - hid_t file = -1; - H5F_t *f = NULL; - H5HG_t *obj = NULL; - uint8_t out[GHEAP_TEST_NOBJS]; - size_t u; - size_t size; - herr_t status; - int nerrors = 0; - char filename[1024]; + hid_t file = -1; + H5F_t *f = NULL; + H5HG_t *obj = NULL; + uint8_t out[GHEAP_TEST_NOBJS]; + size_t u; + size_t size; + herr_t status; + int nerrors = 0; + char filename[1024]; TESTING("partial object removal"); @@ -388,40 +388,40 @@ test_4 (hid_t fapl) /* Open a clean file */ h5_fixname(FILENAME[3], fapl, filename, sizeof filename); if((file = H5Fcreate(filename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0) - goto error; + goto error; if(NULL == (f = (H5F_t *)H5I_object(file))) { - H5_FAILED(); - puts(" Unable to create file"); - goto error; + H5_FAILED(); + puts(" Unable to create file"); + goto error; } for(u = 0; u < GHEAP_TEST_NOBJS; u++) { - /* Insert */ - size = u % 30 + 100; - HDmemset(out, (int)('A' + u % 26), size); - H5Eclear2(H5E_DEFAULT); - status = H5HG_insert (f, H5AC_ind_read_dxpl_id, size, out, obj + u); - if (status<0) { - H5_FAILED(); - puts(" Unable to insert object into global heap"); - nerrors++; - } - - /* - * Remove every third one beginning with the second, but after the - * next one has already been inserted. That is, insert A, B, C; - * remove B, insert D, E, F; remove E; etc. - */ - if(1 == (u % 3)) { - H5Eclear2(H5E_DEFAULT); - status = H5HG_remove (f, H5AC_ind_read_dxpl_id, obj + u - 1); - if (status<0) { - H5_FAILED(); - puts(" Unable to remove object"); - nerrors++; - } - HDmemset(obj + u - 1, 0, sizeof *obj); - } + /* Insert */ + size = u % 30 + 100; + HDmemset(out, (int)('A' + u % 26), size); + H5Eclear2(H5E_DEFAULT); + status = H5HG_insert (f, H5AC_ind_read_dxpl_id, size, out, obj + u); + if (status<0) { + H5_FAILED(); + puts(" Unable to insert object into global heap"); + nerrors++; + } + + /* + * Remove every third one beginning with the second, but after the + * next one has already been inserted. That is, insert A, B, C; + * remove B, insert D, E, F; remove E; etc. + */ + if(1 == (u % 3)) { + H5Eclear2(H5E_DEFAULT); + status = H5HG_remove (f, H5AC_ind_read_dxpl_id, obj + u - 1); + if (status<0) { + H5_FAILED(); + puts(" Unable to remove object"); + nerrors++; + } + HDmemset(obj + u - 1, 0, sizeof *obj); + } } /* Release buffer */ @@ -436,27 +436,27 @@ test_4 (hid_t fapl) error: H5E_BEGIN_TRY { - H5Fclose(file); + H5Fclose(file); } H5E_END_TRY; if(obj) HDfree(obj); return MAX(1, nerrors); } - + /*------------------------------------------------------------------------- - * Function: test_ooo_indices + * Function: test_ooo_indices * - * Purpose: Tests that indices can be stored out of order. This can + * Purpose: Tests that indices can be stored out of order. This can * happen when the indices "wrap around" due to many * insertions and deletions (for example, from rewriting a * VL dataset). * - * Return: Success: 0 + * Return: Success: 0 * - * Failure: number of errors + * Failure: number of errors * - * Programmer: Neil Fortner + * Programmer: Neil Fortner * Monday, October 26, 2009 * * Modifications: @@ -466,13 +466,13 @@ test_4 (hid_t fapl) static int test_ooo_indices(hid_t fapl) { - hid_t file = -1; - H5F_t *f = NULL; - unsigned i, j; - H5HG_t *obj = NULL; - herr_t status; - int nerrors=0; - char filename[1024]; + hid_t file = -1; + H5F_t *f = NULL; + unsigned i, j; + H5HG_t *obj = NULL; + herr_t status; + int nerrors=0; + char filename[1024]; TESTING("out of order indices"); @@ -550,24 +550,24 @@ test_ooo_indices(hid_t fapl) error: H5E_BEGIN_TRY { - H5Fclose(file); + H5Fclose(file); } H5E_END_TRY; if(obj) HDfree(obj); return MAX(1, nerrors); } /* end test_ooo_indices */ - + /*------------------------------------------------------------------------- - * Function: main + * Function: main * - * Purpose: Tests global heap. + * Purpose: Tests global heap. * - * Return: Success: zero + * Return: Success: zero * - * Failure: non-zero + * Failure: non-zero * - * Programmer: Robb Matzke + * Programmer: Robb Matzke * Tuesday, March 31, 1998 * * Modifications: @@ -577,8 +577,8 @@ test_ooo_indices(hid_t fapl) int main (void) { - int nerrors=0; - hid_t fapl; + int nerrors=0; + hid_t fapl; h5_reset(); fapl = h5_fileaccess(); diff --git a/test/hyperslab.c b/test/hyperslab.c index 6c754db..feb96bd 100644 --- a/test/hyperslab.c +++ b/test/hyperslab.c @@ -11,108 +11,108 @@ * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ -/* Programmer: Robb Matzke - * Friday, October 10, 1997 +/* Programmer: Robb Matzke + * Friday, October 10, 1997 * - * Purpose: Hyperslab operations are rather complex, so this file - * attempts to test them extensively so we can be relatively - * sure they really work. We only test 1d, 2d, and 3d cases - * because testing general dimensionalities would require us to - * rewrite much of the hyperslab stuff. + * Purpose: Hyperslab operations are rather complex, so this file + * attempts to test them extensively so we can be relatively + * sure they really work. We only test 1d, 2d, and 3d cases + * because testing general dimensionalities would require us to + * rewrite much of the hyperslab stuff. */ #include "h5test.h" #include "H5VMprivate.h" -#define TEST_SMALL 0x0001 -#define TEST_MEDIUM 0x0002 +#define TEST_SMALL 0x0001 +#define TEST_MEDIUM 0x0002 -#define VARIABLE_SRC 0 -#define VARIABLE_DST 1 -#define VARIABLE_BOTH 2 +#define VARIABLE_SRC 0 +#define VARIABLE_DST 1 +#define VARIABLE_BOTH 2 #define ARRAY_FILL_SIZE 4 #define ARRAY_OFFSET_NDIMS 3 - + /*------------------------------------------------------------------------- - * Function: init_full + * Function: init_full * - * Purpose: Initialize full array. + * Purpose: Initialize full array. * - * Return: void + * Return: void * - * Programmer: Robb Matzke - * Friday, October 10, 1997 + * Programmer: Robb Matzke + * Friday, October 10, 1997 * *------------------------------------------------------------------------- */ static unsigned init_full(uint8_t *array, size_t nx, size_t ny, size_t nz) { - uint8_t acc = 128; - unsigned total = 0; - size_t i, j, k; + uint8_t acc = 128; + unsigned total = 0; + size_t i, j, k; for(i = 0; i < nx; i++) - for(j = 0; j < ny; j++) - for(k = 0; k < nz; k++) { - total += acc; - *array = acc; - acc++; - array++; - } /* end for */ + for(j = 0; j < ny; j++) + for(k = 0; k < nz; k++) { + total += acc; + *array = acc; + acc++; + array++; + } /* end for */ return total; } /* end init_full() */ - + /*------------------------------------------------------------------------- - * Function: print_array + * Function: print_array * - * Purpose: Prints the values in an array + * Purpose: Prints the values in an array * - * Return: void + * Return: void * - * Programmer: Robb Matzke - * Friday, October 10, 1997 + * Programmer: Robb Matzke + * Friday, October 10, 1997 * *------------------------------------------------------------------------- */ static void print_array(uint8_t *array, size_t nx, size_t ny, size_t nz) { - size_t i, j, k; + size_t i, j, k; for(i = 0; i < nx; i++) { - if(nz > 1) - printf("i=%lu:\n", (unsigned long)i); - else - printf("%03lu:", (unsigned long)i); - - for(j = 0; j < ny; j++) { - if(nz > 1) - printf("%03lu:", (unsigned long)j); - for(k = 0; k < nz; k++) - printf(" %3d", *array++); - if(nz > 1) - printf("\n"); - } /* end for */ - printf("\n"); + if(nz > 1) + printf("i=%lu:\n", (unsigned long)i); + else + printf("%03lu:", (unsigned long)i); + + for(j = 0; j < ny; j++) { + if(nz > 1) + printf("%03lu:", (unsigned long)j); + for(k = 0; k < nz; k++) + printf(" %3d", *array++); + if(nz > 1) + printf("\n"); + } /* end for */ + printf("\n"); } /* end for */ } /* end print_array() */ - + /*------------------------------------------------------------------------- - * Function: print_ref + * Function: print_ref * - * Purpose: Prints the reference value + * Purpose: Prints the reference value * - * Return: Success: 0 + * Return: Success: 0 * - * Failure: + * Failure: * - * Programmer: Robb Matzke - * Friday, October 10, 1997 + * Programmer: Robb Matzke + * Friday, October 10, 1997 * *------------------------------------------------------------------------- */ @@ -129,37 +129,37 @@ print_ref(size_t nx, size_t ny, size_t nz) } /* end if */ } /* end print_ref() */ - + /*------------------------------------------------------------------------- - * Function: test_fill + * Function: test_fill * - * Purpose: Tests the H5VM_hyper_fill() function. + * Purpose: Tests the H5VM_hyper_fill() function. * - * Return: Success: SUCCEED + * Return: Success: SUCCEED * - * Failure: FAIL + * Failure: FAIL * - * Programmer: Robb Matzke - * Saturday, October 11, 1997 + * Programmer: Robb Matzke + * Saturday, October 11, 1997 * *------------------------------------------------------------------------- */ static herr_t test_fill(size_t nx, size_t ny, size_t nz, - size_t di, size_t dj, size_t dk, - size_t ddx, size_t ddy, size_t ddz) + size_t di, size_t dj, size_t dk, + size_t ddx, size_t ddy, size_t ddz) { - uint8_t *dst = NULL; /*destination array */ - hsize_t hs_size[3]; /*hyperslab size */ - hsize_t dst_size[3]; /*destination total size */ + uint8_t *dst = NULL; /*destination array */ + hsize_t hs_size[3]; /*hyperslab size */ + hsize_t dst_size[3]; /*destination total size */ hsize_t dst_offset[3]; /*offset of hyperslab in dest */ - unsigned ref_value; /*reference value */ - unsigned acc; /*accumulator */ - size_t i, j, k, dx, dy, dz; /*counters */ + unsigned ref_value; /*reference value */ + unsigned acc; /*accumulator */ + size_t i, j, k, dx, dy, dz; /*counters */ size_t u, v, w; - unsigned ndims; /*hyperslab dimensionality */ - char dim[64], s[256]; /*temp string */ - unsigned fill_value; /*fill value */ + unsigned ndims; /*hyperslab dimensionality */ + char dim[64], s[256]; /*temp string */ + unsigned fill_value; /*fill value */ /* * Dimensionality. @@ -188,7 +188,7 @@ test_fill(size_t nx, size_t ny, size_t nz, /* Allocate array */ if(NULL == (dst = (uint8_t *)HDcalloc((size_t)1, nx * ny * nz))) TEST_ERROR - + init_full(dst, nx, ny, nz); for(i = 0; i < nx; i += di) { @@ -277,52 +277,52 @@ error: return FAIL; } /* end test_fill() */ - + /*------------------------------------------------------------------------- - * Function: test_copy + * Function: test_copy * - * Purpose: Tests H5VM_hyper_copy(). + * Purpose: Tests H5VM_hyper_copy(). * - * The NX, NY, and NZ arguments are the size for the source and - * destination arrays. You may pass zero for NZ or for NY and - * NZ to test the 2-d and 1-d cases respectively. + * The NX, NY, and NZ arguments are the size for the source and + * destination arrays. You may pass zero for NZ or for NY and + * NZ to test the 2-d and 1-d cases respectively. * - * A hyperslab is copied from/to (depending on MODE) various - * places in SRC and DST beginning at 0,0,0 and increasing - * location by DI,DJ,DK in the x, y, and z directions. + * A hyperslab is copied from/to (depending on MODE) various + * places in SRC and DST beginning at 0,0,0 and increasing + * location by DI,DJ,DK in the x, y, and z directions. * - * For each hyperslab location, various sizes of hyperslabs are - * tried beginning with 1x1x1 and increasing the size in each - * dimension by DDX,DDY,DDZ. + * For each hyperslab location, various sizes of hyperslabs are + * tried beginning with 1x1x1 and increasing the size in each + * dimension by DDX,DDY,DDZ. * - * Return: Success: SUCCEED + * Return: Success: SUCCEED * - * Failure: FAIL + * Failure: FAIL * - * Programmer: Robb Matzke - * Friday, October 10, 1997 + * Programmer: Robb Matzke + * Friday, October 10, 1997 * *------------------------------------------------------------------------- */ static herr_t test_copy(int mode, - size_t nx, size_t ny, size_t nz, - size_t di, size_t dj, size_t dk, - size_t ddx, size_t ddy, size_t ddz) + size_t nx, size_t ny, size_t nz, + size_t di, size_t dj, size_t dk, + size_t ddx, size_t ddy, size_t ddz) { - uint8_t *src = NULL; /*source array */ - uint8_t *dst = NULL; /*destination array */ - hsize_t hs_size[3]; /*hyperslab size */ - hsize_t dst_size[3]; /*destination total size */ - hsize_t src_size[3]; /*source total size */ - hsize_t dst_offset[3]; /*offset of hyperslab in dest */ + uint8_t *src = NULL; /*source array */ + uint8_t *dst = NULL; /*destination array */ + hsize_t hs_size[3]; /*hyperslab size */ + hsize_t dst_size[3]; /*destination total size */ + hsize_t src_size[3]; /*source total size */ + hsize_t dst_offset[3]; /*offset of hyperslab in dest */ hsize_t src_offset[3]; /*offset of hyperslab in source */ - unsigned ref_value; /*reference value */ - unsigned acc; /*accumulator */ - hsize_t i, j, k, dx, dy, dz; /*counters */ + unsigned ref_value; /*reference value */ + unsigned acc; /*accumulator */ + hsize_t i, j, k, dx, dy, dz; /*counters */ hsize_t u, v, w; - unsigned ndims; /*hyperslab dimensionality */ - char dim[64], s[256]; /*temp string */ + unsigned ndims; /*hyperslab dimensionality */ + char dim[64], s[256]; /*temp string */ const char *sub; /* @@ -491,7 +491,7 @@ test_copy(int mode, (unsigned long)dy, (unsigned long)dz); print_ref(nx, ny, nz); - printf("\n Destination array is:\n"); + printf("\n Destination array is:\n"); print_array(dst, nx, ny, nz); } /* end if */ goto error; @@ -533,7 +533,7 @@ test_copy(int mode, (unsigned long)dy, (unsigned long)dz); print_ref(nx, ny, nz); - printf("\n Destination array is:\n"); + printf("\n Destination array is:\n"); print_array(dst, nx, ny, nz); } /* end if */ goto error; @@ -561,38 +561,38 @@ error: return FAIL; } /* end test_copy() */ - + /*------------------------------------------------------------------------- - * Function: test_multifill + * Function: test_multifill * - * Purpose: Tests the H5VM_stride_copy() function by using it to fill a - * hyperslab by replicating a multi-byte sequence. This might - * be useful to initialize an array of structs with a default - * struct value, or to initialize an array of floating-point - * values with a default bit-pattern. + * Purpose: Tests the H5VM_stride_copy() function by using it to fill a + * hyperslab by replicating a multi-byte sequence. This might + * be useful to initialize an array of structs with a default + * struct value, or to initialize an array of floating-point + * values with a default bit-pattern. * - * Return: Success: SUCCEED + * Return: Success: SUCCEED * - * Failure: FAIL + * Failure: FAIL * - * Programmer: Robb Matzke - * Saturday, October 11, 1997 + * Programmer: Robb Matzke + * Saturday, October 11, 1997 * *------------------------------------------------------------------------- */ static herr_t test_multifill(size_t nx) { - hsize_t size; - hsize_t src_stride; - hsize_t dst_stride; - char s[64]; + hsize_t size; + hsize_t src_stride; + hsize_t dst_stride; + char s[64]; struct a_struct { int left; double mid; int right; } fill, *src = NULL, *dst = NULL; - hsize_t i, j; + hsize_t i, j; printf("%-70s", "Testing multi-byte fill value"); fflush(stdout); @@ -613,7 +613,7 @@ test_multifill(size_t nx) } /* end for */ /* - * Describe the fill value. The zero stride says to read the same thing + * Describe the fill value. The zero stride says to read the same thing * over and over again. */ fill.left = 55555555; @@ -682,32 +682,32 @@ error: return FAIL; } /* end test_multifill() */ - + /*------------------------------------------------------------------------- - * Function: test_endian + * Function: test_endian * - * Purpose: Tests the H5VM_stride_copy() function by using it to copy an - * array of integers and swap the byte ordering from little - * endian to big endian or vice versa depending on the hardware. + * Purpose: Tests the H5VM_stride_copy() function by using it to copy an + * array of integers and swap the byte ordering from little + * endian to big endian or vice versa depending on the hardware. * - * Return: Success: SUCCEED + * Return: Success: SUCCEED * - * Failure: FAIL + * Failure: FAIL * - * Programmer: Robb Matzke - * Saturday, October 11, 1997 + * Programmer: Robb Matzke + * Saturday, October 11, 1997 * *------------------------------------------------------------------------- */ static herr_t test_endian(size_t nx) { - uint8_t *src = NULL; /*source array */ - uint8_t *dst = NULL; /*destination array */ - hssize_t src_stride[2]; /*source strides */ - hssize_t dst_stride[2]; /*destination strides */ - hsize_t size[2]; /*size vector */ - hsize_t i, j; + uint8_t *src = NULL; /*source array */ + uint8_t *dst = NULL; /*destination array */ + hssize_t src_stride[2]; /*source strides */ + hssize_t dst_stride[2]; /*destination strides */ + hsize_t size[2]; /*size vector */ + hsize_t i, j; printf("%-70s", "Testing endian conversion by stride"); fflush(stdout); @@ -745,7 +745,7 @@ test_endian(size_t nx) printf(" i=%lu, j=%lu\n", (unsigned long)i, (unsigned long)j); printf(" Source array is:\n"); print_array(src, nx, (size_t)4, (size_t)1); - printf("\n Result is:\n"); + printf("\n Result is:\n"); print_array(dst, nx, (size_t)4, (size_t)1); } /* end if */ goto error; @@ -769,31 +769,31 @@ error: return FAIL; } /* end test_endian() */ - + /*------------------------------------------------------------------------- - * Function: test_transpose + * Function: test_transpose * - * Purpose: Copy a 2d array from here to there and transpose the elements - * as it's copied. + * Purpose: Copy a 2d array from here to there and transpose the elements + * as it's copied. * - * Return: Success: SUCCEED + * Return: Success: SUCCEED * - * Failure: FAIL + * Failure: FAIL * - * Programmer: Robb Matzke - * Saturday, October 11, 1997 + * Programmer: Robb Matzke + * Saturday, October 11, 1997 * *------------------------------------------------------------------------- */ static herr_t test_transpose(size_t nx, size_t ny) { - int *src = NULL; - int *dst = NULL; - hsize_t src_stride[2], dst_stride[2]; - hsize_t size[2]; - char s[256]; - hsize_t i, j; + int *src = NULL; + int *dst = NULL; + hsize_t src_stride[2], dst_stride[2]; + hsize_t size[2]; + char s[256]; + hsize_t i, j; sprintf(s, "Testing 2d transpose by stride %4lux%-lud", (unsigned long)nx, (unsigned long)ny); @@ -841,7 +841,7 @@ test_transpose(size_t nx, size_t ny) printf(" %6d", src[i * ny + j]); printf("\n"); } /* end for */ - printf("\n Destination is:\n"); + printf("\n Destination is:\n"); for (i = 0; i < ny; i++) { printf("%3lu:", (unsigned long)i); for(j = 0; j < nx; j++) @@ -870,35 +870,35 @@ error: return FAIL; } /* end test_transpose() */ - + /*------------------------------------------------------------------------- - * Function: test_sub_super + * Function: test_sub_super * - * Purpose: Tests H5VM_stride_copy() to reduce the resolution of an image - * by copying half the pixels in the X and Y directions. Then - * we use the small image and duplicate every pixel to result in - * a 2x2 square. + * Purpose: Tests H5VM_stride_copy() to reduce the resolution of an image + * by copying half the pixels in the X and Y directions. Then + * we use the small image and duplicate every pixel to result in + * a 2x2 square. * - * Return: Success: SUCCEED + * Return: Success: SUCCEED * - * Failure: FAIL + * Failure: FAIL * - * Programmer: Robb Matzke - * Monday, October 13, 1997 + * Programmer: Robb Matzke + * Monday, October 13, 1997 * *------------------------------------------------------------------------- */ static herr_t test_sub_super(size_t nx, size_t ny) { - uint8_t *full = NULL; /*original image */ - uint8_t *half = NULL; /*image at 1/2 resolution */ - uint8_t *twice = NULL; /*2x2 pixels */ - hsize_t src_stride[4]; /*source stride info */ - hsize_t dst_stride[4]; /*destination stride info */ - hsize_t size[4]; /*number of sample points */ - hsize_t i, j; - char s[256]; + uint8_t *full = NULL; /*original image */ + uint8_t *half = NULL; /*image at 1/2 resolution */ + uint8_t *twice = NULL; /*2x2 pixels */ + hsize_t src_stride[4]; /*source stride info */ + hsize_t dst_stride[4]; /*destination stride info */ + hsize_t size[4]; /*number of sample points */ + hsize_t i, j; + char s[256]; sprintf(s, "Testing image sampling %4lux%-4lu to %4lux%-4lu ", (unsigned long)(2 * nx), (unsigned long)(2 * ny), @@ -940,7 +940,7 @@ test_sub_super(size_t nx, size_t ny) (unsigned long)i, (unsigned long)j); printf(" full is:\n"); print_array(full, 2 * nx, 2 * ny, (size_t)1); - printf("\n half is:\n"); + printf("\n half is:\n"); print_array(half, nx, ny, (size_t)1); } /* end if */ goto error; @@ -1003,7 +1003,7 @@ test_sub_super(size_t nx, size_t ny) AT(); printf(" %s\n Half is:\n", s); print_array(half, nx, ny, (size_t)1); - printf("\n Twice is:\n"); + printf("\n Twice is:\n"); print_array(twice, 2 * nx, 2 * ny, (size_t)1); } /* end if */ goto error; @@ -1030,20 +1030,20 @@ error: return FAIL; } /* test_sub_super() */ - + /*------------------------------------------------------------------------- - * Function: test_array_fill + * Function: test_array_fill * - * Purpose: Tests H5VM_array_fill routine by copying a multibyte value + * Purpose: Tests H5VM_array_fill routine by copying a multibyte value * (an array of ints, in our case) into all the elements of an * array. * - * Return: Success: SUCCEED + * Return: Success: SUCCEED * - * Failure: FAIL + * Failure: FAIL * - * Programmer: Quincey Koziol - * Monday, April 21, 2003 + * Programmer: Quincey Koziol + * Monday, April 21, 2003 * *------------------------------------------------------------------------- */ @@ -1052,8 +1052,8 @@ test_array_fill(size_t lo, size_t hi) { int *dst = NULL; /* Destination */ int src[ARRAY_FILL_SIZE]; /* Source to duplicate */ - size_t u, v, w; /* Local index variables */ - char s[256]; + size_t u, v, w; /* Local index variables */ + char s[256]; sprintf(s, "array filling %4lu-%-4lu elements", (unsigned long)lo,(unsigned long)hi); TESTING(s); @@ -1091,20 +1091,20 @@ error: return FAIL; } /* end test_array_fill() */ - + /*------------------------------------------------------------------------- - * Function: test_array_offset_n_calc + * Function: test_array_offset_n_calc * - * Purpose: Tests H5VM_array_offset and H5VM_array_calc routines by comparing + * Purpose: Tests H5VM_array_offset and H5VM_array_calc routines by comparing * computed array offsets against calculated ones and then going * back to the coordinates from the offset and checking those. * - * Return: Success: SUCCEED + * Return: Success: SUCCEED * - * Failure: FAIL + * Failure: FAIL * - * Programmer: Quincey Koziol - * Monday, April 21, 2003 + * Programmer: Quincey Koziol + * Monday, April 21, 2003 * *------------------------------------------------------------------------- */ @@ -1114,11 +1114,11 @@ test_array_offset_n_calc(size_t n, size_t x, size_t y, size_t z) hsize_t *a = NULL; hsize_t *temp_a; /* Array for stored calculated offsets */ hsize_t off; /* Offset in array */ - size_t u, v, w; /* Local index variables */ + size_t u, v, w; /* Local index variables */ hsize_t dims[ARRAY_OFFSET_NDIMS]; /* X, Y & X coordinates of array to check */ hsize_t coords[ARRAY_OFFSET_NDIMS]; /* X, Y & X coordinates to check offset of */ hsize_t new_coords[ARRAY_OFFSET_NDIMS]; /* X, Y & X coordinates of offset */ - char s[256]; + char s[256]; sprintf(s, "array offset %4lux%4lux%4lu elements", (unsigned long)z,(unsigned long)y,(unsigned long)x); TESTING(s); @@ -1176,29 +1176,29 @@ error: return FAIL; } /* end test_array_offset_n_calc() */ - + /*------------------------------------------------------------------------- - * Function: main + * Function: main * - * Purpose: Test various hyperslab operations. Give the words - * `small' and/or `medium' on the command line or only `small' - * is assumed. + * Purpose: Test various hyperslab operations. Give the words + * `small' and/or `medium' on the command line or only `small' + * is assumed. * - * Return: Success: exit(EXIT_SUCCESS) + * Return: Success: exit(EXIT_SUCCESS) * - * Failure: exit(EXIT_FAILURE) + * Failure: exit(EXIT_FAILURE) * - * Programmer: Robb Matzke - * Friday, October 10, 1997 + * Programmer: Robb Matzke + * Friday, October 10, 1997 * *------------------------------------------------------------------------- */ int main(int argc, char *argv[]) { - herr_t status; - int nerrors = 0; - unsigned size_of_test; + herr_t status; + int nerrors = 0; + unsigned size_of_test; /* Parse arguments or assume `small' & `medium' */ if(1 == argc) diff --git a/test/istore.c b/test/istore.c index 90dbcfe..f100fe4 100644 --- a/test/istore.c +++ b/test/istore.c @@ -11,13 +11,13 @@ * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ -/* Programmer: Robb Matzke - * Wednesday, October 15, 1997 +/* Programmer: Robb Matzke + * Wednesday, October 15, 1997 * - * Purpose: Tests various aspects of indexed raw data storage. + * Purpose: Tests various aspects of indexed raw data storage. */ -#define H5F_FRIEND /*suppress error about including H5Fpkg */ +#define H5F_FRIEND /*suppress error about including H5Fpkg */ #include "h5test.h" @@ -35,9 +35,9 @@ const char *FILENAME[] = { }; -#define TEST_SMALL 0x0001 -#define TEST_MEDIUM 0x0002 -#define TEST_LARGE 0x0004 +#define TEST_SMALL 0x0001 +#define TEST_MEDIUM 0x0002 +#define TEST_LARGE 0x0004 /* The datatype of the dataset operated on by this test */ #define TEST_DATATYPE H5T_NATIVE_UCHAR @@ -48,19 +48,19 @@ const char *FILENAME[] = { hsize_t chunk_dims[H5O_LAYOUT_NDIMS]; hsize_t zero[H5O_LAYOUT_NDIMS]; - + /*------------------------------------------------------------------------- - * Function: is_sparse + * Function: is_sparse * - * Purpose: Determines if the file system of the current working - * directory supports holes. + * Purpose: Determines if the file system of the current working + * directory supports holes. * - * Return: Success: Non-zero if holes are supported; zero - * otherwise. + * Return: Success: Non-zero if holes are supported; zero + * otherwise. * - * Failure: zero + * Failure: zero * - * Programmer: Robb Matzke + * Programmer: Robb Matzke * Wednesday, July 15, 1998 * *------------------------------------------------------------------------- @@ -68,8 +68,8 @@ hsize_t zero[H5O_LAYOUT_NDIMS]; static int is_sparse(void) { - int fd; - h5_stat_t sb; + int fd; + h5_stat_t sb; if ((fd = HDopen("x.h5", O_RDWR|O_TRUNC|O_CREAT, H5_POSIX_CREATE_MODE_RW)) < 0) return 0; if (HDlseek(fd, (off_t)(1024*1024), SEEK_SET)!=1024*1024) return 0; @@ -84,16 +84,16 @@ is_sparse(void) #endif } - + /*------------------------------------------------------------------------- - * Function: print_array + * Function: print_array * - * Purpose: Prints the values in an array + * Purpose: Prints the values in an array * - * Return: void + * Return: void * - * Programmer: Robb Matzke - * Friday, October 10, 1997 + * Programmer: Robb Matzke + * Friday, October 10, 1997 * * Modifications: * @@ -102,41 +102,41 @@ is_sparse(void) static void print_array(uint8_t *array, size_t nx, size_t ny, size_t nz) { - size_t i, j, k; + size_t i, j, k; for (i = 0; i < nx; i++) { - if (nz > 1) { - fprintf(stderr,"i=%lu:\n", (unsigned long)i); - } else { - fprintf(stderr,"%03lu:", (unsigned long)i); - } - - for (j = 0; j < ny; j++) { - if (nz > 1) - fprintf(stderr,"%03lu:", (unsigned long)j); - for (k = 0; k < nz; k++) { - fprintf(stderr," %3d", *array++); - } - if (nz > 1) - fprintf(stderr,"\n"); - } - fprintf(stderr,"\n"); + if (nz > 1) { + fprintf(stderr,"i=%lu:\n", (unsigned long)i); + } else { + fprintf(stderr,"%03lu:", (unsigned long)i); + } + + for (j = 0; j < ny; j++) { + if (nz > 1) + fprintf(stderr,"%03lu:", (unsigned long)j); + for (k = 0; k < nz; k++) { + fprintf(stderr," %3d", *array++); + } + if (nz > 1) + fprintf(stderr,"\n"); + } + fprintf(stderr,"\n"); } } - + /*------------------------------------------------------------------------- - * Function: new_object + * Function: new_object * - * Purpose: Creates a new object that refers to a indexed storage of raw - * data. No raw data is stored. + * Purpose: Creates a new object that refers to a indexed storage of raw + * data. No raw data is stored. * - * Return: Success: ID of dataset + * Return: Success: ID of dataset * - * Failure: -1 + * Failure: -1 * - * Programmer: Robb Matzke - * Wednesday, October 15, 1997 + * Programmer: Robb Matzke + * Wednesday, October 15, 1997 * * Modifications: * Converted to use datasets instead of directly messing with @@ -180,19 +180,19 @@ error: return -1; } - + /*------------------------------------------------------------------------- - * Function: test_create + * Function: test_create * - * Purpose: Creates a named object that refers to indexed storage of raw - * data. No raw data is stored. + * Purpose: Creates a named object that refers to indexed storage of raw + * data. No raw data is stored. * - * Return: Success: SUCCEED + * Return: Success: SUCCEED * - * Failure: FAIL + * Failure: FAIL * - * Programmer: Robb Matzke - * Wednesday, October 15, 1997 + * Programmer: Robb Matzke + * Wednesday, October 15, 1997 * * Modifications: * @@ -215,9 +215,9 @@ test_create(hid_t f, const char *prefix) dims[u] = my_chunk_dims[u] = 2; /* Create chunked dataset of this dimensionality */ - HDsnprintf(name, sizeof name, "%s_%02u", prefix, u); - if ((dataset=new_object(f, name, (int)u, dims, my_chunk_dims)) < 0) - return FAIL; + HDsnprintf(name, sizeof name, "%s_%02u", prefix, u); + if ((dataset=new_object(f, name, (int)u, dims, my_chunk_dims)) < 0) + return FAIL; /* Close dataset created */ if(H5Dclose(dataset) < 0) @@ -228,20 +228,20 @@ test_create(hid_t f, const char *prefix) return SUCCEED; } - + /*------------------------------------------------------------------------- - * Function: test_extend + * Function: test_extend * - * Purpose: Creates an empty object and then writes to it in such a way - * as to always extend the object's domain without creating - * holes and without causing the object to become concave. + * Purpose: Creates an empty object and then writes to it in such a way + * as to always extend the object's domain without creating + * holes and without causing the object to become concave. * - * Return: Success: SUCCEED + * Return: Success: SUCCEED * - * Failure: FAIL + * Failure: FAIL * - * Programmer: Robb Matzke - * Wednesday, October 15, 1997 + * Programmer: Robb Matzke + * Wednesday, October 15, 1997 * * Modifications: * @@ -249,35 +249,35 @@ test_create(hid_t f, const char *prefix) */ static herr_t test_extend(hid_t f, const char *prefix, - size_t nx, size_t ny, size_t nz) + size_t nx, size_t ny, size_t nz) { hid_t dataset; /* Dataset ID */ hid_t fspace; /* Dataset's file dataspace */ hid_t mspace; /* Dataset's memory dataspace */ - size_t i, j, k, ctr; - int ndims; - uint8_t *buf = NULL, *check = NULL, *whole = NULL; - char dims[64], s[256], name[256]; - hsize_t offset[3]; - hsize_t max_corner[3]; - hsize_t size[3]; - hsize_t whole_size[3]; - hsize_t nelmts; + size_t i, j, k, ctr; + int ndims; + uint8_t *buf = NULL, *check = NULL, *whole = NULL; + char dims[64], s[256], name[256]; + hsize_t offset[3]; + hsize_t max_corner[3]; + hsize_t size[3]; + hsize_t whole_size[3]; + hsize_t nelmts; if (!nz) { - if (!ny) { - ndims = 1; - ny = nz = 1; - sprintf(dims, "%lu", (unsigned long) nx); - } else { - ndims = 2; - nz = 1; - sprintf(dims, "%lux%lu", (unsigned long) nx, (unsigned long) ny); - } + if (!ny) { + ndims = 1; + ny = nz = 1; + sprintf(dims, "%lu", (unsigned long) nx); + } else { + ndims = 2; + nz = 1; + sprintf(dims, "%lux%lu", (unsigned long) nx, (unsigned long) ny); + } } else { - ndims = 3; - sprintf(dims, "%lux%lux%lu", - (unsigned long) nx, (unsigned long) ny, (unsigned long) nz); + ndims = 3; + sprintf(dims, "%lux%lux%lu", + (unsigned long) nx, (unsigned long) ny, (unsigned long) nz); } sprintf(s, "istore extend: %s", dims); @@ -296,57 +296,57 @@ test_extend(hid_t f, const char *prefix, /* Build the new empty object */ sprintf(name, "%s_%s", prefix, dims); if ((dataset=new_object(f, name, ndims, whole_size, whole_size)) < 0) { - fprintf(stderr," Cannot create %u-d object `%s'\n", ndims, name); - goto error; + fprintf(stderr," Cannot create %u-d object `%s'\n", ndims, name); + goto error; } /* Get dataset's dataspace */ if((fspace=H5Dget_space(dataset)) < 0) TEST_ERROR; for (ctr = 0; - H5VM_vector_lt_u((unsigned)ndims, max_corner, whole_size); - ctr++) { - - /* Size and location */ - if (0 == ctr) { - offset[0] = offset[1] = offset[2] = 0; - size[0] = size[1] = size[2] = 1; - nelmts = 1; - } else { - for (i=0, nelmts=1; i<(size_t)ndims; i++) { - if (ctr % (size_t)ndims == i) { - offset[i] = max_corner[i]; - size[i] = MIN(1, whole_size[i] - offset[i]); - } else { - offset[i] = 0; - size[i] = max_corner[i]; - } - nelmts *= size[i]; - } - } + H5VM_vector_lt_u((unsigned)ndims, max_corner, whole_size); + ctr++) { + + /* Size and location */ + if (0 == ctr) { + offset[0] = offset[1] = offset[2] = 0; + size[0] = size[1] = size[2] = 1; + nelmts = 1; + } else { + for (i=0, nelmts=1; i<(size_t)ndims; i++) { + if (ctr % (size_t)ndims == i) { + offset[i] = max_corner[i]; + size[i] = MIN(1, whole_size[i] - offset[i]); + } else { + offset[i] = 0; + size[i] = max_corner[i]; + } + nelmts *= size[i]; + } + } #if 0 - if (0 == ctr) - fprintf(stderr,"\n"); - fprintf(stderr," Insert: ctr=%lu, corner=(%ld", (unsigned long)ctr, (long)offset[0]); - if (ndims > 1) - fprintf(stderr,",%ld", (long)offset[1]); - if (ndims > 2) - fprintf(stderr,",%ld", (long)offset[2]); - fprintf(stderr,"), size=(%lu", (unsigned long)size[0]); - if (ndims > 1) - fprintf(stderr,",%lu", (unsigned long)size[1]); - if (ndims > 2) - fprintf(stderr,",%lu", (unsigned long)size[2]); - fprintf(stderr,"), %lu element%s", (unsigned long)nelmts, 1 == nelmts ? "" : "s"); - if (0 == nelmts) - fprintf(stderr," *SKIPPED*"); - fprintf(stderr,"\n"); + if (0 == ctr) + fprintf(stderr,"\n"); + fprintf(stderr," Insert: ctr=%lu, corner=(%ld", (unsigned long)ctr, (long)offset[0]); + if (ndims > 1) + fprintf(stderr,",%ld", (long)offset[1]); + if (ndims > 2) + fprintf(stderr,",%ld", (long)offset[2]); + fprintf(stderr,"), size=(%lu", (unsigned long)size[0]); + if (ndims > 1) + fprintf(stderr,",%lu", (unsigned long)size[1]); + if (ndims > 2) + fprintf(stderr,",%lu", (unsigned long)size[2]); + fprintf(stderr,"), %lu element%s", (unsigned long)nelmts, 1 == nelmts ? "" : "s"); + if (0 == nelmts) + fprintf(stderr," *SKIPPED*"); + fprintf(stderr,"\n"); #endif - /* Fill the source array */ - if (0 == nelmts) continue; - HDmemset(buf, (signed)(128+ctr), (size_t)nelmts); + /* Fill the source array */ + if (0 == nelmts) continue; + HDmemset(buf, (signed)(128+ctr), (size_t)nelmts); /* Create dataspace for selection in memory */ if((mspace=H5Screate_simple(1,&nelmts,NULL)) < 0) TEST_ERROR; @@ -354,72 +354,72 @@ test_extend(hid_t f, const char *prefix, /* Select region in file dataspace */ if(H5Sselect_hyperslab(fspace,H5S_SELECT_SET,offset,NULL,size,NULL) < 0) TEST_ERROR; - /* Write to disk */ - if (H5Dwrite(dataset, TEST_DATATYPE, mspace, fspace, H5P_DEFAULT, buf) < 0) { - H5_FAILED(); - fprintf(stderr," Write failed: ctr=%lu\n", (unsigned long)ctr); - goto error; - } - - /* Read from disk */ - HDmemset(check, 0xff, (size_t)nelmts); - if (H5Dread(dataset, TEST_DATATYPE, mspace, fspace, H5P_DEFAULT, check) < 0) { - H5_FAILED(); - fprintf(stderr," Read failed: ctr=%lu\n", (unsigned long)ctr); - goto error; - } - if (HDmemcmp(buf, check, (size_t)nelmts)) { - H5_FAILED(); - fprintf(stderr," Read check failed: ctr=%lu\n", (unsigned long)ctr); - fprintf(stderr," Wrote:\n"); - print_array(buf, (size_t)size[0], (size_t)size[1], - (size_t)size[2]); - fprintf(stderr," Read:\n"); - print_array(check, (size_t)size[0], (size_t)size[1], - (size_t)size[2]); - goto error; - } + /* Write to disk */ + if (H5Dwrite(dataset, TEST_DATATYPE, mspace, fspace, H5P_DEFAULT, buf) < 0) { + H5_FAILED(); + fprintf(stderr," Write failed: ctr=%lu\n", (unsigned long)ctr); + goto error; + } + + /* Read from disk */ + HDmemset(check, 0xff, (size_t)nelmts); + if (H5Dread(dataset, TEST_DATATYPE, mspace, fspace, H5P_DEFAULT, check) < 0) { + H5_FAILED(); + fprintf(stderr," Read failed: ctr=%lu\n", (unsigned long)ctr); + goto error; + } + if (HDmemcmp(buf, check, (size_t)nelmts)) { + H5_FAILED(); + fprintf(stderr," Read check failed: ctr=%lu\n", (unsigned long)ctr); + fprintf(stderr," Wrote:\n"); + print_array(buf, (size_t)size[0], (size_t)size[1], + (size_t)size[2]); + fprintf(stderr," Read:\n"); + print_array(check, (size_t)size[0], (size_t)size[1], + (size_t)size[2]); + goto error; + } /* Close memory dataspace */ if(H5Sclose(mspace) < 0) TEST_ERROR; - /* Write to `whole' buffer for later checking */ - H5VM_hyper_copy((unsigned)ndims, size, - whole_size, offset, whole, /*dst*/ - size, H5VM_ZERO, buf); /*src*/ + /* Write to `whole' buffer for later checking */ + H5VM_hyper_copy((unsigned)ndims, size, + whole_size, offset, whole, /*dst*/ + size, H5VM_ZERO, buf); /*src*/ - /* Update max corner */ - for (i=0; i<(size_t)ndims; i++) - max_corner[i] = MAX(max_corner[i], offset[i]+size[i]); + /* Update max corner */ + for (i=0; i<(size_t)ndims; i++) + max_corner[i] = MAX(max_corner[i], offset[i]+size[i]); } /* Now read the entire array back out and check it */ HDmemset(buf, 0xff, nx * ny * nz); if (H5Dread(dataset, TEST_DATATYPE, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf) < 0) { - H5_FAILED(); - fprintf(stderr," Read failed for whole array.\n"); - goto error; + H5_FAILED(); + fprintf(stderr," Read failed for whole array.\n"); + goto error; } for (i=0; i 1) { - fprintf(stderr,", j=%lu", (unsigned long)j); - } - if (ndims > 2) { - fprintf(stderr,", k=%lu", (unsigned long)k); - } - fprintf(stderr,"\n Check array is:\n"); - print_array(whole, nx, ny, nz); - fprintf(stderr," Value read is:\n"); - print_array(buf, nx, ny, nz); - goto error; - } - } - } + for (j=0; j 1) { + fprintf(stderr,", j=%lu", (unsigned long)j); + } + if (ndims > 2) { + fprintf(stderr,", k=%lu", (unsigned long)k); + } + fprintf(stderr,"\n Check array is:\n"); + print_array(whole, nx, ny, nz); + fprintf(stderr," Value read is:\n"); + print_array(buf, nx, ny, nz); + goto error; + } + } + } } /* Close dataset's dataspace */ @@ -443,19 +443,19 @@ error: return FAIL; } - + /*------------------------------------------------------------------------- - * Function: test_sparse + * Function: test_sparse * - * Purpose: Creates a sparse matrix consisting of NBLOCKS randomly placed - * blocks each of size NX,NY,NZ. + * Purpose: Creates a sparse matrix consisting of NBLOCKS randomly placed + * blocks each of size NX,NY,NZ. * - * Return: Success: SUCCEED + * Return: Success: SUCCEED * - * Failure: FAIL + * Failure: FAIL * - * Programmer: Robb Matzke - * Wednesday, October 22, 1997 + * Programmer: Robb Matzke + * Wednesday, October 22, 1997 * * Modifications: * @@ -463,34 +463,34 @@ error: */ static herr_t test_sparse(hid_t f, const char *prefix, size_t nblocks, - size_t nx, size_t ny, size_t nz, int skip_test) + size_t nx, size_t ny, size_t nz, int skip_test) { hid_t dataset; /* Dataset ID */ hid_t fspace; /* Dataset's file dataspace */ hid_t mspace; /* Dataset's memory dataspace */ - int ndims; - hsize_t ctr; - char dims[64], s[256], name[256]; - hsize_t offset[3]; - hsize_t size[3], total = 0; - uint8_t *buf = NULL; - hsize_t whole_size[3]; /* Size of dataset's dataspace */ + int ndims; + hsize_t ctr; + char dims[64], s[256], name[256]; + hsize_t offset[3]; + hsize_t size[3], total = 0; + uint8_t *buf = NULL; + hsize_t whole_size[3]; /* Size of dataset's dataspace */ size_t u; /* Local index variable */ if (!nz) { - if (!ny) { - ndims = 1; - ny = nz = 1; - sprintf(dims, "%lu", (unsigned long) nx); - } else { - ndims = 2; - nz = 1; - sprintf(dims, "%lux%lu", (unsigned long) nx, (unsigned long) ny); - } + if (!ny) { + ndims = 1; + ny = nz = 1; + sprintf(dims, "%lu", (unsigned long) nx); } else { - ndims = 3; - sprintf(dims, "%lux%lux%lu", - (unsigned long) nx, (unsigned long) ny, (unsigned long) nz); + ndims = 2; + nz = 1; + sprintf(dims, "%lux%lu", (unsigned long) nx, (unsigned long) ny); + } + } else { + ndims = 3; + sprintf(dims, "%lux%lux%lu", + (unsigned long) nx, (unsigned long) ny, (unsigned long) nz); } sprintf(s, "istore sparse: %s", dims); @@ -514,8 +514,8 @@ test_sparse(hid_t f, const char *prefix, size_t nblocks, /* Build the new empty object */ sprintf(name, "%s_%s", prefix, dims); if ((dataset=new_object(f, name, ndims, whole_size, chunk_dims)) < 0) { - printf(" Cannot create %u-d object `%s'\n", ndims, name); - goto error; + printf(" Cannot create %u-d object `%s'\n", ndims, name); + goto error; } /* Get dataset's dataspace */ @@ -532,29 +532,29 @@ test_sparse(hid_t f, const char *prefix, size_t nblocks, /* Select region in file dataspace */ if(H5Sselect_hyperslab(fspace,H5S_SELECT_SET,offset,NULL,size,NULL) < 0) TEST_ERROR; - /* write to disk */ - if (H5Dwrite(dataset, TEST_DATATYPE, mspace, fspace, H5P_DEFAULT, buf) < 0) { - H5_FAILED(); - printf(" Write failed: ctr=%lu\n", (unsigned long)ctr); - printf(" offset=(%lu", (unsigned long) (offset[0])); - if (ndims > 1) - printf(",%lu", (unsigned long) (offset[1])); - if (ndims > 2) - printf(",%lu", (unsigned long) (offset[2])); - printf("), size=(%lu", (unsigned long) (size[0])); - if (ndims > 1) - printf(",%lu", (unsigned long) (size[1])); - if (ndims > 2) - printf(",%lu", (unsigned long) (size[2])); - printf(")\n"); - goto error; - } - total += nx * ny * nz; + /* write to disk */ + if (H5Dwrite(dataset, TEST_DATATYPE, mspace, fspace, H5P_DEFAULT, buf) < 0) { + H5_FAILED(); + printf(" Write failed: ctr=%lu\n", (unsigned long)ctr); + printf(" offset=(%lu", (unsigned long) (offset[0])); + if (ndims > 1) + printf(",%lu", (unsigned long) (offset[1])); + if (ndims > 2) + printf(",%lu", (unsigned long) (offset[2])); + printf("), size=(%lu", (unsigned long) (size[0])); + if (ndims > 1) + printf(",%lu", (unsigned long) (size[1])); + if (ndims > 2) + printf(",%lu", (unsigned long) (size[2])); + printf(")\n"); + goto error; + } + total += nx * ny * nz; #if 0 - HDfprintf(stderr,"ctr: ctr=%Zu, total=%Zu\n", ctr, total); + HDfprintf(stderr,"ctr: ctr=%Zu, total=%Zu\n", ctr, total); #endif - /* We don't test reading yet.... */ + /* We don't test reading yet.... */ } /* Close memory dataspace */ @@ -575,18 +575,18 @@ error: return FAIL; } - + /*------------------------------------------------------------------------- - * Function: main + * Function: main * - * Purpose: Tests indexed storage stuff. + * Purpose: Tests indexed storage stuff. * - * Return: Success: exit(EXIT_SUCCESS) + * Return: Success: exit(EXIT_SUCCESS) * - * Failure: exit(EXIT_FAILURE) + * Failure: exit(EXIT_FAILURE) * - * Programmer: Robb Matzke - * Wednesday, October 15, 1997 + * Programmer: Robb Matzke + * Wednesday, October 15, 1997 * * Modifications: * @@ -595,12 +595,12 @@ error: int main(int argc, char *argv[]) { - hid_t fapl=-1, file=-1, fcpl=-1; - herr_t status; - int nerrors = 0; - unsigned size_of_test; + hid_t fapl=-1, file=-1, fcpl=-1; + herr_t status; + int nerrors = 0; + unsigned size_of_test; unsigned u; /* Local index variable */ - char filename[1024]; + char filename[1024]; int skip_test = 0; int has_sparse_support = 0; @@ -608,7 +608,7 @@ main(int argc, char *argv[]) if (1 == argc) { size_of_test = TEST_SMALL | TEST_MEDIUM | TEST_LARGE; } else { - int i; + int i; for (i = 1, size_of_test = 0; i < argc; i++) { if (!strcmp(argv[i], "small")) { size_of_test |= TEST_SMALL; diff --git a/test/mf.c b/test/mf.c index fea5ee2..35dfab3 100644 --- a/test/mf.c +++ b/test/mf.c @@ -6920,6 +6920,7 @@ test_mf_fs_gone(const char *env_h5_drvr, hid_t fapl, hbool_t new_format) H5FD_mem_t type; /* File allocation type */ H5FS_stat_t fs_stat; /* Information for free-space manager */ haddr_t addr1, addr2, addr3, addr4; /* File address for H5FD_MEM_SUPER */ + haddr_t addrx; H5FD_mem_t fs_type; hbool_t contig_addr_vfd; hbool_t ran_H5MF_tidy_self_referential_fsm_hack = FALSE; @@ -7054,6 +7055,12 @@ test_mf_fs_gone(const char *env_h5_drvr, hid_t fapl, hbool_t new_format) if(H5MF_xfree(f, type, H5AC_ind_read_dxpl_id, addr4, (hsize_t)TBLOCK_SIZE4) < 0) FAIL_STACK_ERROR + if(!new_format) { + /* Need to take up this space so that the free-space manager will go away */ + if(HADDR_UNDEF == (addrx = H5MF_alloc(f, type, H5AC_ind_read_dxpl_id, (hsize_t)103))) + FAIL_STACK_ERROR + } + /* The H5FD_MEM_SUPER free-space manager will go away at H5MF_close() */ if(H5Fclose(file) < 0) FAIL_STACK_ERROR @@ -7065,7 +7072,6 @@ test_mf_fs_gone(const char *env_h5_drvr, hid_t fapl, hbool_t new_format) /* Get a pointer to the internal file object */ if(NULL == (f = (H5F_t *)H5I_object(file))) FAIL_STACK_ERROR - /* Verify that the H5FD_MEM_SUPER free-space manager is not there */ if(H5F_addr_defined(f->shared->fs_addr[fs_type])) TEST_ERROR diff --git a/test/objcopy.c b/test/objcopy.c index 216d111..5d9d426 100644 --- a/test/objcopy.c +++ b/test/objcopy.c @@ -12,38 +12,54 @@ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* - * Programmer: Peter X. Cao - * May 01, 2005 + * Programmer: Peter X. Cao + * May 01, 2005 * - * Purpose: Test H5Ocopy(). + * Purpose: Test H5Ocopy(). */ #include "testhdf5.h" #include "H5srcdir.h" +#include "H5Bprivate.h" +#include "H5Iprivate.h" +#include "H5Pprivate.h" + +#define H5F_FRIEND /*suppress error about including H5Fpkg */ +#define H5F_TESTING +#include "H5Fpkg.h" /* File access */ + /* * This file needs to access private information from the H5S package. * This file also needs to access the dataspace testing code. */ -#define H5S_FRIEND /*suppress error about including H5Spkg */ +#define H5S_FRIEND /*suppress error about including H5Spkg */ #define H5S_TESTING -#include "H5Spkg.h" /* Dataspaces */ +#include "H5Spkg.h" /* Dataspaces */ /* * This file needs to access private information from the H5P package. * This file also needs to access the property list testing code. */ -#define H5P_FRIEND /*suppress error about including H5Ppkg */ +#define H5P_FRIEND /*suppress error about including H5Ppkg */ #define H5P_TESTING -#include "H5Ppkg.h" /* Property Lists */ +#include "H5Ppkg.h" /* Property Lists */ /* * This file needs to access private information from the H5D package. * This file also needs to access the dataset testing code. */ -#define H5D_FRIEND /*suppress error about including H5Dpkg */ +#define H5D_FRIEND /*suppress error about including H5Dpkg */ #define H5D_TESTING -#include "H5Dpkg.h" /* Datasets */ +#include "H5Dpkg.h" /* Datasets */ + +/* + * This file needs to access private information from the H5O package. + * This file also needs to access the dataspace testing code. + */ +#define H5O_FRIEND /*suppress error about including H5Opkg */ +#define H5O_TESTING +#include "H5Opkg.h" /* Object header */ const char *FILENAME[] = { @@ -51,6 +67,8 @@ const char *FILENAME[] = { "objcopy_dst", "objcopy_ext", "objcopy_src2", + "verbound_src", + "verbound_dst", NULL }; @@ -64,76 +82,77 @@ const char *FILENAME[] = { #define CONFIG_DENSE 16 #define MAX_CONFIGURATION 31 -#define FILE_EXT "objcopy_ext.dat" +#define FILE_EXT "objcopy_ext.dat" /* The fill_old.h5 is generated from gen_old_fill.c in HDF5 'test' directory * for version 1.4(after 1.4.3). To get this data file, simply compile * gen_old_fill.c with HDF5 library (before v1.5) and run it. */ #define FILE_OLD_LAYOUT "fill_old.h5" -#define NAME_DATATYPE_SIMPLE "H5T_NATIVE_INT" -#define NAME_DATATYPE_SIMPLE2 "H5T_NATIVE_INT-2" -#define NAME_DATATYPE_VL "vlen of int" -#define NAME_DATATYPE_VL_VL "vlen of vlen of int" -#define NAME_DATASET_SIMPLE "dataset_simple" +#define NAME_DATATYPE_SIMPLE "H5T_NATIVE_INT" +#define NAME_DATATYPE_SIMPLE2 "H5T_NATIVE_INT-2" +#define NAME_DATATYPE_VL "vlen of int" +#define NAME_DATATYPE_VL_VL "vlen of vlen of int" +#define NAME_DATASET_SIMPLE "dataset_simple" #define NAME_DATASET_SIMPLE2 "dataset_simple_copy" #define NAME_DATASET_SIMPLE3 "dataset_simple_another_copy" -#define NAME_DATASET_COMPOUND "dataset_compound" -#define NAME_DATASET_CHUNKED "dataset_chunked" -#define NAME_DATASET_CHUNKED_SINGLE "dataset_chunked_single" -#define NAME_DATASET_CHUNKED2 "dataset_chunked2" -#define NAME_DATASET_CHUNKED2_SINGLE "dataset_chunked2_single" -#define NAME_DATASET_CHUNKED3 "dataset_chunked3" -#define NAME_DATASET_CHUNKED3_SINGLE "dataset_chunked3_single" -#define NAME_DATASET_CHUNKED4 "dataset_chunked4" -#define NAME_DATASET_CHUNKED4_SINGLE "dataset_chunked4_single" -#define NAME_DATASET_COMPACT "dataset_compact" -#define NAME_DATASET_EXTERNAL "dataset_ext" -#define NAME_DATASET_NAMED_DTYPE "dataset_named_dtype" -#define NAME_DATASET_NAMED_DTYPE2 "dataset_named_dtype2" -#define NAME_DATASET_MULTI_OHDR "dataset_multi_ohdr" -#define NAME_DATASET_MULTI_OHDR2 "dataset_multi_ohdr2" -#define NAME_DATASET_VL "dataset_vl" -#define NAME_DATASET_VL2 "dataset_vl2" -#define NAME_DATASET_VL_VL "dataset_vl_vl" -#define NAME_DATASET_VL_VL2 "dataset_vl_vl2" -#define NAME_DATASET_CMPD_VL "dataset_cmpd_vl" -#define NAME_DATASET_SUB_SUB "/g0/g00/g000/dataset_simple" -#define NAME_GROUP_UNCOPIED "/uncopied" -#define NAME_GROUP_EMPTY "/empty" -#define NAME_GROUP_TOP "/g0" +#define NAME_DATASET_COMPOUND "dataset_compound" +#define NAME_DATASET_CHUNKED "dataset_chunked" +#define NAME_DATASET_CHUNKED_SINGLE "dataset_chunked_single" +#define NAME_DATASET_CHUNKED2 "dataset_chunked2" +#define NAME_DATASET_CHUNKED2_SINGLE "dataset_chunked2_single" +#define NAME_DATASET_CHUNKED3 "dataset_chunked3" +#define NAME_DATASET_CHUNKED3_SINGLE "dataset_chunked3_single" +#define NAME_DATASET_CHUNKED4 "dataset_chunked4" +#define NAME_DATASET_CHUNKED4_SINGLE "dataset_chunked4_single" +#define NAME_DATASET_COMPACT "dataset_compact" +#define NAME_DATASET_EXTERNAL "dataset_ext" +#define NAME_DATASET_NAMED_DTYPE "dataset_named_dtype" +#define NAME_DATASET_NAMED_DTYPE2 "dataset_named_dtype2" +#define NAME_DATASET_MULTI_OHDR "dataset_multi_ohdr" +#define NAME_DATASET_MULTI_OHDR2 "dataset_multi_ohdr2" +#define NAME_DATASET_VL "dataset_vl" +#define NAME_DATASET_VL2 "dataset_vl2" +#define NAME_DATASET_VL_VL "dataset_vl_vl" +#define NAME_DATASET_VL_VL2 "dataset_vl_vl2" +#define NAME_DATASET_CMPD_VL "dataset_cmpd_vl" +#define NAME_DATASET_SUB_SUB "/g0/g00/g000/dataset_simple" +#define NAME_GROUP_UNCOPIED "/uncopied" +#define NAME_GROUP_EMPTY "/empty" +#define NAME_GROUP_TOP "/g0" #define NAME_GROUP_TOP2 "/g1" #define NAME_GROUP_TOP3 "/g2" #define NAME_GROUP_TOP4 "/g3" -#define NAME_GROUP_SUB "/g0/g00" -#define NAME_GROUP_SUB_2 "/g0/g01" -#define NAME_GROUP_SUB_SUB "/g0/g00/g000" -#define NAME_GROUP_SUB_SUB2 "g000" -#define NAME_GROUP_DATASET "/g0/dataset_simple" -#define NAME_GROUP_LINK "/g_links" -#define NAME_GROUP_LINK2 "/g_links2" -#define NAME_GROUP_LOOP "g_loop" -#define NAME_GROUP_LOOP2 "g_loop2" -#define NAME_GROUP_LOOP3 "g_loop3" -#define NAME_GROUP_REF "ref_grp" -#define NAME_LINK_DATASET "/g_links/dataset_simple" -#define NAME_LINK_HARD "/g_links/hard_link_to_dataset_simple" -#define NAME_LINK_SOFT "/g_links/soft_link_to_dataset_simple" -#define NAME_LINK_SOFT2 "/g_links2/soft_link_to_dataset_simple" -#define NAME_LINK_EXTERN "/g_links/external_link_to_dataset_simple" +#define NAME_GROUP_SUB "/g0/g00" +#define NAME_GROUP_SUB_2 "/g0/g01" +#define NAME_GROUP_SUB_SUB "/g0/g00/g000" +#define NAME_GROUP_SUB_SUB2 "g000" +#define NAME_GROUP_DATASET "/g0/dataset_simple" +#define NAME_GROUP_LINK "/g_links" +#define NAME_GROUP_LINK2 "/g_links2" +#define NAME_GROUP_LOOP "g_loop" +#define NAME_GROUP_LOOP2 "g_loop2" +#define NAME_GROUP_LOOP3 "g_loop3" +#define NAME_GROUP_REF "ref_grp" +#define NAME_LINK_DATASET "/g_links/dataset_simple" +#define NAME_LINK_HARD "/g_links/hard_link_to_dataset_simple" +#define NAME_LINK_SOFT "/g_links/soft_link_to_dataset_simple" +#define NAME_LINK_SOFT2 "/g_links2/soft_link_to_dataset_simple" +#define NAME_LINK_EXTERN "/g_links/external_link_to_dataset_simple" #define NAME_LINK_EXTERN2 "/g_links2/external_link_to_dataset_simple" -#define NAME_LINK_SOFT_DANGLE "/g_links/soft_link_to_nowhere" -#define NAME_LINK_SOFT_DANGLE2 "/g_links2/soft_link_to_nowhere" +#define NAME_LINK_SOFT_DANGLE "/g_links/soft_link_to_nowhere" +#define NAME_LINK_SOFT_DANGLE2 "/g_links2/soft_link_to_nowhere" #define NAME_LINK_EXTERN_DANGLE "/g_links/external_link_to_nowhere" #define NAME_LINK_EXTERN_DANGLE2 "/g_links2/external_link_to_nowhere" -#define NAME_OLD_FORMAT "/dset1" +#define NAME_OLD_FORMAT "/dset1" +#define NAME_DSET_NULL "DSET_NULL" #define NAME_BUF_SIZE 1024 #define ATTR_NAME_LEN 80 #define DIM_SIZE_1 12 #define DIM_SIZE_2 6 -#define MAX_DIM_SIZE_1 100 -#define MAX_DIM_SIZE_2 80 +#define MAX_DIM_SIZE_1 100 +#define MAX_DIM_SIZE_2 80 #define CHUNK_SIZE_1 5 /* Not an even fraction of dimension sizes, so we test copying partial chunks */ #define CHUNK_SIZE_2 5 #define NUM_SUB_GROUPS 20 @@ -160,7 +179,7 @@ static int compare_datasets(hid_t did, hid_t did2, hid_t pid, const void *wbuf); static int compare_groups(hid_t gid, hid_t gid2, hid_t pid, int depth, unsigned copy_flags); -static int +static int compare_idx_type(hid_t fapl, hid_t did, H5D_chunk_index_t new_type, H5D_chunk_index_t old_type); static int @@ -170,7 +189,7 @@ attach_attribute_compound_vlstr(hid_t loc_id); static int compare_attribute_compound_vlstr(hid_t loc, hid_t loc2); - + /*------------------------------------------------------------------------- * Function: addr_insert * @@ -204,7 +223,7 @@ addr_insert(H5O_info_t *oi) idtab_g.obj[n] = oi->addr; } /* end addr_insert() */ - + /*------------------------------------------------------------------------- * Function: addr_lookup * @@ -233,7 +252,7 @@ addr_lookup(H5O_info_t *oi) return FALSE; } /* end addr_lookup() */ - + /*------------------------------------------------------------------------- * Function: addr_reset * @@ -255,7 +274,7 @@ addr_reset(void) idtab_g.nalloc = idtab_g.nobjs = 0; } /* end addr_reset() */ - + /*------------------------------------------------------------------------- * Function: attach_ref_attr * @@ -316,7 +335,7 @@ error: return(-1); } - + /*------------------------------------------------------------------------- * Function: attach_reg_ref_attr * @@ -393,7 +412,7 @@ error: return(-1); } - + /*------------------------------------------------------------------------- * Function: create_reg_ref_dataset * @@ -488,7 +507,7 @@ error: return(-1); } - + /*------------------------------------------------------------------------- * Function: attach_attribute_vl * @@ -550,13 +569,13 @@ done: } /* end of attach_attribute_vl */ - + /*------------------------------------------------------------------------- * Function: test_copy_attach_attributes * * Purpose: Attach NUM_ATTRIBUTES attributes to the object to be copied * - * Return: Non-negative on success/Negative on failure + * Return: Non-negative on success/Negative on failure * * Programmer: Peter Cao * Friday, September 30, 2005 @@ -624,13 +643,13 @@ done: return ret_value; } - + /*------------------------------------------------------------------------- * Function: test_copy_attach_paired_attributes * * Purpose: Attach NUM_ATTRIBUTES attributes to a pair of objects to be copied * - * Return: Non-negative on success/Negative on failure + * Return: Non-negative on success/Negative on failure * * Programmer: Quincey Koziol * Tuesday, November 1, 2005 @@ -693,7 +712,7 @@ done: return -1; } /* end test_copy_attach_paired_attributes() */ - + /*------------------------------------------------------------------------- * Function: compare_attribute * @@ -824,18 +843,18 @@ error: return FALSE; } /* end compare_attribute() */ - + /*------------------------------------------------------------------------- * Function: compare_std_attributes * * Purpose: Compare "standard" attributes on two objects to check that they are equal * - * Return: TRUE if objects have same attributes/FALSE if they are different + * Return: TRUE if objects have same attributes/FALSE if they are different * * Programmer: Quincey Koziol * Monday, October 31, 2005 * - * Note: This isn't very general, the attributes are assumed to be + * Note: This isn't very general, the attributes are assumed to be * those written in test_copy_attach_attributes(). * * Modifier: Peter Cao @@ -896,19 +915,19 @@ compare_std_attributes(hid_t oid, hid_t oid2, hid_t pid) error: H5E_BEGIN_TRY { - H5Aclose(aid2); - H5Aclose(aid); + H5Aclose(aid2); + H5Aclose(aid); } H5E_END_TRY; return FALSE; } /* end compare_std_attributes() */ - + /*------------------------------------------------------------------------- * Function: compare_data * * Purpose: Compare two buffers of data to check that they are equal * - * Return: TRUE if buffer are equal/FALSE if they are different + * Return: TRUE if buffer are equal/FALSE if they are different * * Programmer: Quincey Koziol * Monday, November 21, 2005 @@ -1169,13 +1188,13 @@ error: return FALSE; } /* end compare_data() */ - + /*------------------------------------------------------------------------- * Function: compare_datasets * * Purpose: Compare two datasets to check that they are equal * - * Return: TRUE if datasets are equal/FALSE if they are different + * Return: TRUE if datasets are equal/FALSE if they are different * * Programmer: Quincey Koziol * Tuesday, October 25, 2005 @@ -1332,23 +1351,23 @@ error: HDfree(rbuf); if(rbuf2) HDfree(rbuf2); - H5Pclose(dcpl2); - H5Pclose(dcpl); - H5Sclose(sid2); - H5Sclose(sid); - H5Tclose(tid2); - H5Tclose(tid); + H5Pclose(dcpl2); + H5Pclose(dcpl); + H5Sclose(sid2); + H5Sclose(sid); + H5Tclose(tid2); + H5Tclose(tid); } H5E_END_TRY; return FALSE; } /* end compare_datasets() */ - + /*------------------------------------------------------------------------- * Function: compare_groups * * Purpose: Compare two groups to check that they are "equal" * - * Return: TRUE if group are equal/FALSE if they are different + * Return: TRUE if group are equal/FALSE if they are different * * Programmer: Quincey Koziol * Monday, October 31, 2005 @@ -1498,48 +1517,48 @@ error: return FALSE; } /* end compare_groups() */ - + /*------------------------------------------------------------------------- * Function: compare_idx_type * * Purpose: If using new format, the index array type should be NEW_TYPE - * If not, the index array type should be OLD_TYPE + * If not, the index array type should be OLD_TYPE * - * Return: TRUE if the index type retrieved for the dataset DID is - * as expected - * FALSE if not + * Return: TRUE if the index type retrieved for the dataset DID is + * as expected + * FALSE if not * * Programmer: Vailin Choi; August 2009 * *------------------------------------------------------------------------- */ -static int +static int compare_idx_type(hid_t fapl, hid_t did, H5D_chunk_index_t new_type, H5D_chunk_index_t old_type) { H5D_chunk_index_t idx_type; /* Dataset chunk index type */ H5F_libver_t low; /* File format low bound */ /* Get the chunk index type */ - if(H5D__layout_idx_type_test(did, &idx_type) < 0) - FAIL_STACK_ERROR + if(H5D__layout_idx_type_test(did, &idx_type) < 0) + FAIL_STACK_ERROR /* Check if we are using the latest version of the format */ - if(H5Pget_libver_bounds(fapl, &low, NULL) < 0) - FAIL_STACK_ERROR + if(H5Pget_libver_bounds(fapl, &low, NULL) < 0) + FAIL_STACK_ERROR /* Verify index type */ if(low == H5F_LIBVER_LATEST) { - if(idx_type != new_type) - TEST_ERROR - } else if(idx_type != old_type) - TEST_ERROR + if(idx_type != new_type) + TEST_ERROR + } else if(idx_type != old_type) + TEST_ERROR return TRUE; error: return FALSE; } /* compare_idx_type() */ - + /*------------------------------------------------------------------------- * Function: test_copy_named_datatype * @@ -1560,8 +1579,8 @@ test_copy_named_datatype(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t d { hid_t fid_src = -1, fid_dst = -1; /* File IDs */ hid_t tid = -1, tid2 = -1; /* Datatype IDs */ - char src_filename[NAME_BUF_SIZE]; - char dst_filename[NAME_BUF_SIZE]; + char src_filename[NAME_BUF_SIZE]; + char dst_filename[NAME_BUF_SIZE]; TESTING("H5Ocopy(): named datatype"); @@ -1626,15 +1645,15 @@ test_copy_named_datatype(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t d error: H5E_BEGIN_TRY { - H5Tclose(tid2); - H5Tclose(tid); - H5Fclose(fid_dst); - H5Fclose(fid_src); + H5Tclose(tid2); + H5Tclose(tid); + H5Fclose(fid_dst); + H5Fclose(fid_src); } H5E_END_TRY; return 1; } /* end test_copy_named_datatype */ - + /*------------------------------------------------------------------------- * Function: test_copy_named_datatype_vl * @@ -1653,8 +1672,8 @@ test_copy_named_datatype_vl(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_ { hid_t fid_src = -1, fid_dst = -1; /* File IDs */ hid_t tid = -1, tid2 = -1; /* Datatype IDs */ - char src_filename[NAME_BUF_SIZE]; - char dst_filename[NAME_BUF_SIZE]; + char src_filename[NAME_BUF_SIZE]; + char dst_filename[NAME_BUF_SIZE]; TESTING("H5Ocopy(): named vlen datatype"); @@ -1719,15 +1738,15 @@ test_copy_named_datatype_vl(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_ error: H5E_BEGIN_TRY { - H5Tclose(tid2); - H5Tclose(tid); - H5Fclose(fid_dst); - H5Fclose(fid_src); + H5Tclose(tid2); + H5Tclose(tid); + H5Fclose(fid_dst); + H5Fclose(fid_src); } H5E_END_TRY; return 1; } /* end test_copy_named_datatype_vl */ - + /*------------------------------------------------------------------------- * Function: test_copy_named_datatype_vl_vl * @@ -1746,8 +1765,8 @@ test_copy_named_datatype_vl_vl(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, h { hid_t fid_src = -1, fid_dst = -1; /* File IDs */ hid_t tid = -1, tid2 = -1; /* Datatype IDs */ - char src_filename[NAME_BUF_SIZE]; - char dst_filename[NAME_BUF_SIZE]; + char src_filename[NAME_BUF_SIZE]; + char dst_filename[NAME_BUF_SIZE]; TESTING("H5Ocopy(): named nested vlen datatype"); @@ -1818,15 +1837,15 @@ test_copy_named_datatype_vl_vl(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, h error: H5E_BEGIN_TRY { - H5Tclose(tid2); - H5Tclose(tid); - H5Fclose(fid_dst); - H5Fclose(fid_src); + H5Tclose(tid2); + H5Tclose(tid); + H5Fclose(fid_dst); + H5Fclose(fid_src); } H5E_END_TRY; return 1; } /* end test_copy_named_datatype_vl_vl */ - + /*------------------------------------------------------------------------- * Function: test_copy_named_datatype_attr_self * @@ -1969,7 +1988,7 @@ error: return 1; } /* end test_copy_named_datatype_attr_self */ - + /*------------------------------------------------------------------------- * Function: test_copy_dataset_simple * @@ -2078,16 +2097,194 @@ test_copy_dataset_simple(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t d error: H5E_BEGIN_TRY { - H5Dclose(did2); - H5Dclose(did); - H5Sclose(sid); - H5Fclose(fid_dst); - H5Fclose(fid_src); + H5Dclose(did2); + H5Dclose(did); + H5Sclose(sid); + H5Fclose(fid_dst); + H5Fclose(fid_src); } H5E_END_TRY; return 1; } /* end test_copy_dataset_simple */ - + +/*------------------------------------------------------------------------- + * Function: test_copy_dataset_versionbounds + * + * Purpose: Verify copying dataset works as expected in various version + * bound combination. + * + * Description: + * Create a simple dataset in SRC file using default versions. + * For each valid version bound combination, create a DST file, + * and attempt to copy the SRC dataset to the DST file. + * When copying fails, verify that the failure is a result of + * the invalid bounds, that is, DST has lower bounds than SRC. + * + * Return: Success: 0 + * Failure: 1 + * + *------------------------------------------------------------------------- + */ +static int +test_copy_dataset_versionbounds(hid_t fcpl_src, hid_t fapl_src) +{ + hid_t fid_src = -1, fid_dst = -1; /* Source and destination file IDs */ + hid_t fapl_dst = -1; /* File access plist for dest file */ + hid_t sid = -1; /* Dataspace ID */ + hid_t did_src = -1, did_dst = -1; /* Source and destination dataset IDs */ + int buf[DIM_SIZE_1][DIM_SIZE_2]; /* Buffer for writing data */ + hsize_t dim2d[2]; /* Dataset dimensions */ + char src_fname[NAME_BUF_SIZE]; /* Name of source file */ + char dst_fname[NAME_BUF_SIZE]; /* Name of destination file */ + H5F_libver_t low, high; /* File format bounds */ + H5F_libver_t low_src, high_src; /* Source file format bounds */ + unsigned srcdset_fillversion; /* Fill version of source dataset */ + hbool_t valid_high = FALSE; /* TRUE if high bound is valid */ + int i, j; /* Local index variables */ + H5D_t *dsetp = NULL; /* Pointer to internal dset structure */ + herr_t ret; /* Generic return value */ + + TESTING("H5Ocopy(): simple dataset with version bounds"); + + /* Initialize write buffer */ + for (i=0; ishared->dcpl_cache.fill.version; + + /* Close dataspace */ + if(H5Sclose(sid) < 0) TEST_ERROR + + /* Close the dataset */ + if(H5Dclose(did_src) < 0) TEST_ERROR + + /* Close the SRC file */ + if(H5Fclose(fid_src) < 0) TEST_ERROR + + /* Open the source file with read-only */ + fid_src = H5Fopen(src_fname, H5F_ACC_RDONLY, fapl_src); + if (fid_src < 0) TEST_ERROR + + /* Loop through all the combinations of low/high library format bounds, + skipping invalid combinations. Create a destination file and copy the + source dataset to it, then verify */ + for(low = H5F_LIBVER_EARLIEST; low < H5F_LIBVER_NBOUNDS; low++) { + for(high = H5F_LIBVER_EARLIEST; high < H5F_LIBVER_NBOUNDS; high++) { + + /* Set version bounds */ + H5E_BEGIN_TRY { + ret = H5Pset_libver_bounds(fapl_dst, low, high); + } H5E_END_TRY; + + if (ret < 0) /* Invalid low/high combinations */ + continue; + + /* Create destination file */ + fid_dst = H5Fcreate(dst_fname, H5F_ACC_TRUNC, H5P_DEFAULT, fapl_dst); + if (fid_dst < 0) TEST_ERROR + + /* Create an uncopied object in destination file so that addresses + in source and destination files aren't the same */ + if(H5Gclose(H5Gcreate2(fid_dst, NAME_GROUP_UNCOPIED, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) TEST_ERROR + + /* Try to copy the dataset */ + H5E_BEGIN_TRY { + ret = H5Ocopy(fid_src, NAME_DATASET_SIMPLE, fid_dst, NAME_DATASET_SIMPLE, H5P_DEFAULT, H5P_DEFAULT); + } H5E_END_TRY; + + /* If copy failed, check if the failure is expected */ + if (ret < 0) + { + /* Failure is valid if fill version of source dataset is + greater than destination */ + if (srcdset_fillversion <= H5O_fill_ver_bounds[high]) + TEST_ERROR + + /* Close the DST file before continue */ + if(H5Fclose(fid_dst) < 0) TEST_ERROR + continue; + } + + /* Close the DST file */ + if(H5Fclose(fid_dst) < 0) TEST_ERROR + + /* Open destination file */ + fid_dst = H5Fopen(dst_fname, H5F_ACC_RDWR, fapl_dst); + if (fid_dst < 0) TEST_ERROR + + /* Open the datasets to compare */ + did_src = H5Dopen2(fid_src, NAME_DATASET_SIMPLE, H5P_DEFAULT); + if (did_src < 0) TEST_ERROR + did_dst = H5Dopen2(fid_dst, NAME_DATASET_SIMPLE, H5P_DEFAULT); + if (did_dst < 0) TEST_ERROR + + /* Check if the datasets are equal */ + if (compare_datasets(did_src, did_dst, H5P_DEFAULT, buf) != TRUE) + TEST_ERROR + + /* Close the datasets */ + if(H5Dclose(did_dst) < 0) TEST_ERROR + if(H5Dclose(did_src) < 0) TEST_ERROR + + /* Close the DST file */ + if(H5Fclose(fid_dst) < 0) TEST_ERROR + + } /* for high */ + } /* for low */ + + /* Close property list and source file */ + if (H5Pclose(fapl_dst) < 0) TEST_ERROR + if (H5Fclose(fid_src) < 0) TEST_ERROR + + PASSED(); + return 0; + +error: + H5E_BEGIN_TRY { + H5Dclose(did_dst); + H5Dclose(did_src); + H5Sclose(sid); + H5Pclose(fapl_dst); + H5Fclose(fid_dst); + H5Fclose(fid_src); + } H5E_END_TRY; + + return 1; +} /* end test_copy_dataset_versionbounds */ + + /*------------------------------------------------------------------------- * Function: test_copy_dataset_simple_samefile * @@ -2185,22 +2382,22 @@ test_copy_dataset_simple_samefile(hid_t fcpl, hid_t fapl) error: H5E_BEGIN_TRY { - H5Dclose(did2); - H5Dclose(did); - H5Sclose(sid); - H5Fclose(fid); + H5Dclose(did2); + H5Dclose(did); + H5Sclose(sid); + H5Fclose(fid); } H5E_END_TRY; return 1; } /* end test_copy_dataset_simple_samefile */ - + /*------------------------------------------------------------------------- * Function: test_copy_dataset_simple_empty * * Purpose: Create a simple dataset in SRC file and copy it to DST file * (Note: dataset has no data) * - * Note: The parameter "test_open" is added to test for H5Ocopy when + * Note: The parameter "test_open" is added to test for H5Ocopy when * the dataset is open in the file (HDFFV-7853). * * Return: Success: 0 @@ -2303,16 +2500,16 @@ test_copy_dataset_simple_empty(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, h error: H5E_BEGIN_TRY { - H5Dclose(did2); - H5Dclose(did); - H5Sclose(sid); - H5Fclose(fid_dst); - H5Fclose(fid_src); + H5Dclose(did2); + H5Dclose(did); + H5Sclose(sid); + H5Fclose(fid_dst); + H5Fclose(fid_src); } H5E_END_TRY; return 1; } /* end test_copy_dataset_simple_empty */ - + /*------------------------------------------------------------------------- * Function: test_copy_dataset_compound * @@ -2434,17 +2631,17 @@ test_copy_dataset_compound(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t error: H5E_BEGIN_TRY { - H5Dclose(did2); - H5Dclose(did); - H5Tclose(tid); - H5Sclose(sid); - H5Fclose(fid_dst); - H5Fclose(fid_src); + H5Dclose(did2); + H5Dclose(did); + H5Tclose(tid); + H5Sclose(sid); + H5Fclose(fid_dst); + H5Fclose(fid_src); } H5E_END_TRY; return 1; } /* end test_copy_dataset_compound */ - + /*------------------------------------------------------------------------- * Function: test_copy_dataset_chunked * @@ -2526,10 +2723,10 @@ test_copy_dataset_chunked(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t /* close the dataset */ if(H5Dclose(did) < 0) TEST_ERROR - /* + /* * Create 1-D dataset: chunked, non-filterd, with data - * dims=max dims=chunk dims - * H5D_ALLOC_TIME_INC (default) + * dims=max dims=chunk dims + * H5D_ALLOC_TIME_INC (default) */ /* create 1-D dataspace */ if((sid = H5Screate_simple(1, dim1d, dim1d)) < 0) TEST_ERROR @@ -2601,9 +2798,9 @@ test_copy_dataset_chunked(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t /* close the dataset */ if(H5Dclose(did) < 0) TEST_ERROR - /* + /* * Create 2-D dataset: chunked, non-filterd, with data, dims=chunk dims, - * H5D_ALLOC_TIME_INC (default) + * H5D_ALLOC_TIME_INC (default) */ /* create 2-D dataspace */ @@ -2625,9 +2822,9 @@ test_copy_dataset_chunked(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t /* close the dataset */ if(H5Dclose(did) < 0) TEST_ERROR - /* + /* * Create 2-D dataset: chunked, non-filterd, with data, dims=chunk dims, - * H5D_ALLOC_TIME_EARLY + * H5D_ALLOC_TIME_EARLY */ if(H5Pset_alloc_time(pid, H5D_ALLOC_TIME_EARLY) < 0) TEST_ERROR @@ -2649,9 +2846,9 @@ test_copy_dataset_chunked(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t /* close chunk plist */ if(H5Pclose(pid) < 0) TEST_ERROR - /* + /* * Create 2-D dataset: chunked, non-filterd, with data, dims=max dims=chunk dims, - * H5D_ALLOC_TIME_LATE + * H5D_ALLOC_TIME_LATE */ /* create 2-D dataspace */ if((sid = H5Screate_simple(2, dim2d, dim2d)) < 0) TEST_ERROR @@ -2710,7 +2907,7 @@ test_copy_dataset_chunked(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t /* Check if the array index type is correct */ if(compare_idx_type(src_fapl, did2, H5D_CHUNK_IDX_EARRAY, H5D_CHUNK_IDX_BTREE) != TRUE) - TEST_ERROR + TEST_ERROR /* Check if the datasets are equal */ if(compare_datasets(did, did2, H5P_DEFAULT, buf1d) != TRUE) TEST_ERROR @@ -2730,7 +2927,7 @@ test_copy_dataset_chunked(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t /* Check if the array index type is correct */ if(compare_idx_type(src_fapl, did2, H5D_CHUNK_IDX_SINGLE, H5D_CHUNK_IDX_BTREE) != TRUE) - TEST_ERROR + TEST_ERROR /* Check if the datasets are equal */ if(compare_datasets(did, did2, H5P_DEFAULT, buf1d) != TRUE) TEST_ERROR @@ -2749,7 +2946,7 @@ test_copy_dataset_chunked(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t /* Check if the array index type is correct */ if(compare_idx_type(src_fapl, did2, H5D_CHUNK_IDX_FARRAY, H5D_CHUNK_IDX_BTREE) != TRUE) - TEST_ERROR + TEST_ERROR /* Check if the datasets are equal */ if(compare_datasets(did, did2, H5P_DEFAULT, buf2d) != TRUE) TEST_ERROR @@ -2769,7 +2966,7 @@ test_copy_dataset_chunked(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t /* Check if the array index type is correct */ if(compare_idx_type(src_fapl, did2, H5D_CHUNK_IDX_NONE, H5D_CHUNK_IDX_BTREE) != TRUE) - TEST_ERROR + TEST_ERROR /* Check if the datasets are equal */ if(compare_datasets(did, did2, H5P_DEFAULT, buf2d) != TRUE) TEST_ERROR @@ -2788,7 +2985,7 @@ test_copy_dataset_chunked(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t /* Check if the array index type is correct */ if(compare_idx_type(src_fapl, did2, H5D_CHUNK_IDX_SINGLE, H5D_CHUNK_IDX_BTREE) != TRUE) - TEST_ERROR + TEST_ERROR /* Check if the datasets are equal */ if(compare_datasets(did, did2, H5P_DEFAULT, buf2d) != TRUE) TEST_ERROR @@ -2807,7 +3004,7 @@ test_copy_dataset_chunked(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t /* Check if the array index type is correct */ if(compare_idx_type(src_fapl, did2, H5D_CHUNK_IDX_SINGLE, H5D_CHUNK_IDX_BTREE) != TRUE) - TEST_ERROR + TEST_ERROR /* Check if the datasets are equal */ if(compare_datasets(did, did2, H5P_DEFAULT, buf2d) != TRUE) TEST_ERROR @@ -2826,7 +3023,7 @@ test_copy_dataset_chunked(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t /* Check if the array index type is correct */ if(compare_idx_type(src_fapl, did2, H5D_CHUNK_IDX_SINGLE, H5D_CHUNK_IDX_BTREE) != TRUE) - TEST_ERROR + TEST_ERROR /* Check if the datasets are equal */ if(compare_datasets(did, did2, H5P_DEFAULT, buf2d) != TRUE) TEST_ERROR @@ -2848,17 +3045,17 @@ test_copy_dataset_chunked(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t error: H5E_BEGIN_TRY { - H5Dclose(did2); - H5Dclose(did); - H5Pclose(pid); - H5Sclose(sid); - H5Fclose(fid_dst); - H5Fclose(fid_src); + H5Dclose(did2); + H5Dclose(did); + H5Pclose(pid); + H5Sclose(sid); + H5Fclose(fid_dst); + H5Fclose(fid_src); } H5E_END_TRY; return 1; } /* end test_copy_dataset_chunked */ - + /*------------------------------------------------------------------------- * Function: test_copy_dataset_chunked_empty * @@ -2926,9 +3123,9 @@ test_copy_dataset_chunked_empty(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, /* close the dataset */ if(H5Dclose(did) < 0) TEST_ERROR - /* + /* * create 1-D dataset: chunked, empty, non-filtered, - * dims=max dims=chunk dims, H5D_ALLOC_TIME_INC(default) + * dims=max dims=chunk dims, H5D_ALLOC_TIME_INC(default) */ /* Set 1-D dataspace dimensions */ @@ -2996,9 +3193,9 @@ test_copy_dataset_chunked_empty(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, if(H5Dclose(did) < 0) TEST_ERROR - /* + /* * create 2-D dataset: chunked, empty, non-filtered, - * dims=chunk dims, H5D_ALLOC_TIME_INC (default) + * dims=chunk dims, H5D_ALLOC_TIME_INC (default) */ /* Set 2-D dataspace dimensions */ @@ -3021,9 +3218,9 @@ test_copy_dataset_chunked_empty(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, /* close the dataset */ if(H5Dclose(did) < 0) TEST_ERROR - /* + /* * create 2-D dataset: chunked, empty, non-filtered, dims=chunk dims - * H5D_ALLOC_TIME_EARLY + * H5D_ALLOC_TIME_EARLY */ /* Set allocation time to early */ if(H5Pset_alloc_time(pid, H5D_ALLOC_TIME_EARLY) < 0) TEST_ERROR @@ -3043,9 +3240,9 @@ test_copy_dataset_chunked_empty(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, /* close the dataset */ if(H5Dclose(did) < 0) TEST_ERROR - /* - * create 2-D dataset: chunked, empty, non-filtered, - * dims=max dims=chunk dims, H5D_ALLOC_TIME_LATE + /* + * create 2-D dataset: chunked, empty, non-filtered, + * dims=max dims=chunk dims, H5D_ALLOC_TIME_LATE */ /* Set 2-D dataspace dimensions */ @@ -3107,7 +3304,7 @@ test_copy_dataset_chunked_empty(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, /* Check if the array index type is correct */ if(compare_idx_type(src_fapl, did2, H5D_CHUNK_IDX_EARRAY, H5D_CHUNK_IDX_BTREE) != TRUE) - TEST_ERROR + TEST_ERROR /* Check if the datasets are equal */ if(compare_datasets(did, did2, H5P_DEFAULT, NULL) != TRUE) TEST_ERROR @@ -3126,7 +3323,7 @@ test_copy_dataset_chunked_empty(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, /* Check if the array index type is correct */ if(compare_idx_type(src_fapl, did2, H5D_CHUNK_IDX_SINGLE, H5D_CHUNK_IDX_BTREE) != TRUE) - TEST_ERROR + TEST_ERROR /* Check if the datasets are equal */ if(compare_datasets(did, did2, H5P_DEFAULT, NULL) != TRUE) TEST_ERROR @@ -3145,7 +3342,7 @@ test_copy_dataset_chunked_empty(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, /* Check if the array index type is correct */ if(compare_idx_type(src_fapl, did2, H5D_CHUNK_IDX_FARRAY, H5D_CHUNK_IDX_BTREE) != TRUE) - TEST_ERROR + TEST_ERROR /* Check if the datasets are equal */ if(compare_datasets(did, did2, H5P_DEFAULT, NULL) != TRUE) TEST_ERROR @@ -3164,7 +3361,7 @@ test_copy_dataset_chunked_empty(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, /* Check if the array index type is correct */ if(compare_idx_type(src_fapl, did2, H5D_CHUNK_IDX_SINGLE, H5D_CHUNK_IDX_BTREE) != TRUE) - TEST_ERROR + TEST_ERROR /* Check if the datasets are equal */ if(compare_datasets(did, did2, H5P_DEFAULT, NULL) != TRUE) TEST_ERROR @@ -3184,7 +3381,7 @@ test_copy_dataset_chunked_empty(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, /* Check if the array index type is correct */ if(compare_idx_type(src_fapl, did2, H5D_CHUNK_IDX_NONE, H5D_CHUNK_IDX_BTREE) != TRUE) - TEST_ERROR + TEST_ERROR /* Check if the datasets are equal */ if(compare_datasets(did, did2, H5P_DEFAULT, NULL) != TRUE) TEST_ERROR @@ -3204,7 +3401,7 @@ test_copy_dataset_chunked_empty(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, /* Check if the array index type is correct */ if(compare_idx_type(src_fapl, did2, H5D_CHUNK_IDX_SINGLE, H5D_CHUNK_IDX_BTREE) != TRUE) - TEST_ERROR + TEST_ERROR /* Check if the datasets are equal */ if(compare_datasets(did, did2, H5P_DEFAULT, NULL) != TRUE) TEST_ERROR @@ -3223,7 +3420,7 @@ test_copy_dataset_chunked_empty(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, /* Check if the array index type is correct */ if(compare_idx_type(src_fapl, did2, H5D_CHUNK_IDX_SINGLE, H5D_CHUNK_IDX_BTREE) != TRUE) - TEST_ERROR + TEST_ERROR /* Check if the datasets are equal */ if(compare_datasets(did, did2, H5P_DEFAULT, NULL) != TRUE) TEST_ERROR @@ -3245,17 +3442,17 @@ test_copy_dataset_chunked_empty(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, error: H5E_BEGIN_TRY { - H5Dclose(did2); - H5Dclose(did); - H5Pclose(pid); - H5Sclose(sid); - H5Fclose(fid_dst); - H5Fclose(fid_src); + H5Dclose(did2); + H5Dclose(did); + H5Pclose(pid); + H5Sclose(sid); + H5Fclose(fid_dst); + H5Fclose(fid_src); } H5E_END_TRY; return 1; } /* end test_copy_dataset_chunked_empty */ - + /*------------------------------------------------------------------------- * Function: test_copy_dataset_chunked_sparse * @@ -3479,7 +3676,7 @@ test_copy_dataset_chunked_sparse(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, /* Check if the array index type is correct */ if(compare_idx_type(src_fapl, did2, H5D_CHUNK_IDX_EARRAY, H5D_CHUNK_IDX_BTREE) != TRUE) - TEST_ERROR + TEST_ERROR /* Check if the datasets are equal */ if(compare_datasets(did, did2, H5P_DEFAULT, NULL) != TRUE) TEST_ERROR @@ -3499,7 +3696,7 @@ test_copy_dataset_chunked_sparse(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, /* Check if the array index type is correct */ if(compare_idx_type(src_fapl, did2, H5D_CHUNK_IDX_BT2, H5D_CHUNK_IDX_BTREE) != TRUE) - TEST_ERROR + TEST_ERROR /* Check if the datasets are equal */ if(compare_datasets(did, did2, H5P_DEFAULT, NULL) != TRUE) TEST_ERROR @@ -3519,7 +3716,7 @@ test_copy_dataset_chunked_sparse(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, /* Check if the array index type is correct */ if(compare_idx_type(src_fapl, did2, H5D_CHUNK_IDX_NONE, H5D_CHUNK_IDX_BTREE) != TRUE) - TEST_ERROR + TEST_ERROR /* Check if the datasets are equal */ if(compare_datasets(did, did2, H5P_DEFAULT, NULL) != TRUE) TEST_ERROR @@ -3539,7 +3736,7 @@ test_copy_dataset_chunked_sparse(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, /* Check if the array index type is correct */ if(compare_idx_type(src_fapl, did2, H5D_CHUNK_IDX_NONE, H5D_CHUNK_IDX_BTREE) != TRUE) - TEST_ERROR + TEST_ERROR /* Check if the datasets are equal */ if(compare_datasets(did, did2, H5P_DEFAULT, NULL) != TRUE) TEST_ERROR @@ -3562,17 +3759,17 @@ test_copy_dataset_chunked_sparse(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, error: H5E_BEGIN_TRY { - H5Dclose(did2); - H5Dclose(did); - H5Pclose(pid); - H5Sclose(sid); - H5Fclose(fid_dst); - H5Fclose(fid_src); + H5Dclose(did2); + H5Dclose(did); + H5Pclose(pid); + H5Sclose(sid); + H5Fclose(fid_dst); + H5Fclose(fid_src); } H5E_END_TRY; return 1; } /* end test_copy_dataset_chunked_sparse */ - + /*------------------------------------------------------------------------- * Function: test_copy_dataset_compressed * @@ -3669,9 +3866,9 @@ test_copy_dataset_compressed(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid /* close the dataset */ if(H5Dclose(did) < 0) TEST_ERROR - /* + /* * create 2-D dataset: chunked, filtered, with data - * dims=max dims=chunk dims, H5D_ALLOC_TIME_INC(default) + * dims=max dims=chunk dims, H5D_ALLOC_TIME_INC(default) */ /* create dataspace */ if((sid = H5Screate_simple(2, dim2d, dim2d)) < 0) TEST_ERROR @@ -3693,9 +3890,9 @@ test_copy_dataset_compressed(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid /* close the dataset */ if(H5Dclose(did) < 0) TEST_ERROR - /* + /* * create 2-D dataset: chunked, filtered, with data - * dims=chunk dims, H5D_ALLOC_TIME_EARLY + * dims=chunk dims, H5D_ALLOC_TIME_EARLY */ /* create dataspace */ if((sid = H5Screate_simple(2, dim2d, NULL)) < 0) TEST_ERROR @@ -3721,9 +3918,9 @@ test_copy_dataset_compressed(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid /* close the dataset */ if(H5Dclose(did) < 0) TEST_ERROR - /* + /* * create 2-D dataset: chunked, filtered, with data - * dims=chunk dims, H5D_ALLOC_TIME_LATE + * dims=chunk dims, H5D_ALLOC_TIME_LATE */ /* create dataspace */ if((sid = H5Screate_simple(2, dim2d, NULL)) < 0) TEST_ERROR @@ -3788,7 +3985,7 @@ test_copy_dataset_compressed(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid if((did2 = H5Dopen2(fid_dst, NAME_DATASET_CHUNKED, H5P_DEFAULT)) < 0) TEST_ERROR if(compare_idx_type(src_fapl, did2, H5D_CHUNK_IDX_FARRAY, H5D_CHUNK_IDX_BTREE) != TRUE) - TEST_ERROR + TEST_ERROR /* Check if the datasets are equal */ if(compare_datasets(did, did2, H5P_DEFAULT, NULL) != TRUE) TEST_ERROR @@ -3807,7 +4004,7 @@ test_copy_dataset_compressed(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid if((did2 = H5Dopen2(fid_dst, NAME_DATASET_CHUNKED2, H5P_DEFAULT)) < 0) TEST_ERROR if(compare_idx_type(src_fapl, did2, H5D_CHUNK_IDX_FARRAY, H5D_CHUNK_IDX_BTREE) != TRUE) - TEST_ERROR + TEST_ERROR /* Check if the datasets are equal */ if(compare_datasets(did, did2, H5P_DEFAULT, NULL) != TRUE) TEST_ERROR @@ -3825,7 +4022,7 @@ test_copy_dataset_compressed(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid if((did2 = H5Dopen2(fid_dst, NAME_DATASET_CHUNKED2_SINGLE, H5P_DEFAULT)) < 0) TEST_ERROR if(compare_idx_type(src_fapl, did2, H5D_CHUNK_IDX_SINGLE, H5D_CHUNK_IDX_BTREE) != TRUE) - TEST_ERROR + TEST_ERROR /* Check if the datasets are equal */ if(compare_datasets(did, did2, H5P_DEFAULT, NULL) != TRUE) TEST_ERROR @@ -3843,7 +4040,7 @@ test_copy_dataset_compressed(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid if((did2 = H5Dopen2(fid_dst, NAME_DATASET_CHUNKED3_SINGLE, H5P_DEFAULT)) < 0) TEST_ERROR if(compare_idx_type(src_fapl, did2, H5D_CHUNK_IDX_SINGLE, H5D_CHUNK_IDX_BTREE) != TRUE) - TEST_ERROR + TEST_ERROR /* Check if the datasets are equal */ if(compare_datasets(did, did2, H5P_DEFAULT, NULL) != TRUE) TEST_ERROR @@ -3861,7 +4058,7 @@ test_copy_dataset_compressed(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid if((did2 = H5Dopen2(fid_dst, NAME_DATASET_CHUNKED4_SINGLE, H5P_DEFAULT)) < 0) TEST_ERROR if(compare_idx_type(src_fapl, did2, H5D_CHUNK_IDX_SINGLE, H5D_CHUNK_IDX_BTREE) != TRUE) - TEST_ERROR + TEST_ERROR /* Check if the datasets are equal */ if(compare_datasets(did, did2, H5P_DEFAULT, NULL) != TRUE) TEST_ERROR @@ -3885,24 +4082,24 @@ test_copy_dataset_compressed(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid #ifdef H5_HAVE_FILTER_DEFLATE error: H5E_BEGIN_TRY { - H5Dclose(did2); - H5Dclose(did); - H5Pclose(pid); - H5Sclose(sid); - H5Fclose(fid_dst); - H5Fclose(fid_src); + H5Dclose(did2); + H5Dclose(did); + H5Pclose(pid); + H5Sclose(sid); + H5Fclose(fid_dst); + H5Fclose(fid_src); } H5E_END_TRY; return 1; #endif /* H5_HAVE_FILTER_DEFLATE */ } /* end test_copy_dataset_compressed */ - + /*------------------------------------------------------------------------- * Function: test_copy_dataset_no_edge_filt * * Purpose: Create a compressed, chunked dataset in SRC file and copy it to DST file * - * Note: The parameter "test_open" is added to test for H5Ocopy when + * Note: The parameter "test_open" is added to test for H5Ocopy when * the dataset is open in the file (HDFFV-7853). * * Return: Success: 0 @@ -4053,13 +4250,13 @@ error: #endif /* H5_HAVE_FILTER_DEFLATE */ } /* end test_copy_dataset_no_edge_filt */ - + /*------------------------------------------------------------------------- * Function: test_copy_dataset_compact * * Purpose: Create a compact dataset in SRC file and copy it to DST file * - * Note: The parameter "test_open" is added to test for H5Ocopy when + * Note: The parameter "test_open" is added to test for H5Ocopy when * the dataset is open in the file (HDFFV-7853). * * Return: Success: 0 @@ -4179,17 +4376,17 @@ test_copy_dataset_compact(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t error: H5E_BEGIN_TRY { - H5Dclose(did2); - H5Dclose(did); - H5Pclose(pid); - H5Sclose(sid); - H5Fclose(fid_dst); - H5Fclose(fid_src); + H5Dclose(did2); + H5Dclose(did); + H5Pclose(pid); + H5Sclose(sid); + H5Fclose(fid_dst); + H5Fclose(fid_src); } H5E_END_TRY; return 1; } /* end test_copy_dataset_compact */ - + /*------------------------------------------------------------------------- * Function: test_copy_dataset_external * @@ -4306,17 +4503,17 @@ test_copy_dataset_external(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t error: H5E_BEGIN_TRY { - H5Dclose(did2); - H5Dclose(did); - H5Pclose(pid); - H5Sclose(sid); - H5Fclose(fid_dst); - H5Fclose(fid_src); + H5Dclose(did2); + H5Dclose(did); + H5Pclose(pid); + H5Sclose(sid); + H5Fclose(fid_dst); + H5Fclose(fid_src); } H5E_END_TRY; return 1; } /* end test_copy_dataset_external */ - + /*------------------------------------------------------------------------- * Function: test_copy_dataset_named_dtype * @@ -4427,17 +4624,17 @@ test_copy_dataset_named_dtype(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hi error: H5E_BEGIN_TRY { - H5Dclose(did2); - H5Dclose(did); - H5Tclose(tid); - H5Sclose(sid); - H5Fclose(fid_dst); - H5Fclose(fid_src); + H5Dclose(did2); + H5Dclose(did); + H5Tclose(tid); + H5Sclose(sid); + H5Fclose(fid_dst); + H5Fclose(fid_src); } H5E_END_TRY; return 1; } /* end test_copy_dataset_named_dtype */ - + /*------------------------------------------------------------------------- * Function: test_copy_dataset_named_dtype_hier * @@ -4564,18 +4761,18 @@ test_copy_dataset_named_dtype_hier(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fap error: H5E_BEGIN_TRY { - H5Dclose(did); - H5Tclose(tid); - H5Sclose(sid); - H5Gclose(gid2); - H5Gclose(gid); - H5Fclose(fid_dst); - H5Fclose(fid_src); + H5Dclose(did); + H5Tclose(tid); + H5Sclose(sid); + H5Gclose(gid2); + H5Gclose(gid); + H5Fclose(fid_dst); + H5Fclose(fid_src); } H5E_END_TRY; return 1; } /* end test_copy_dataset_named_dtype_hier */ - + /*------------------------------------------------------------------------- * Function: test_copy_dataset_named_dtype_hier_outside * @@ -4703,18 +4900,18 @@ test_copy_dataset_named_dtype_hier_outside(hid_t fcpl_src, hid_t fcpl_dst, hid_t error: H5E_BEGIN_TRY { - H5Dclose(did); - H5Tclose(tid); - H5Sclose(sid); - H5Gclose(gid2); - H5Gclose(gid); - H5Fclose(fid_dst); - H5Fclose(fid_src); + H5Dclose(did); + H5Tclose(tid); + H5Sclose(sid); + H5Gclose(gid2); + H5Gclose(gid); + H5Fclose(fid_dst); + H5Fclose(fid_src); } H5E_END_TRY; return 1; } /* end test_copy_dataset_named_dtype_hier_outside */ - + /*------------------------------------------------------------------------- * Function: test_copy_dataset_multi_ohdr_chunks * @@ -4825,7 +5022,7 @@ test_copy_dataset_multi_ohdr_chunks(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fa /* close the second dataset */ if(H5Dclose(did2) < 0) TEST_ERROR - } else + } else /* open the group for copy */ if((gid = H5Gopen2(fid_src, NAME_GROUP_TOP, H5P_DEFAULT)) < 0) FAIL_STACK_ERROR @@ -4852,18 +5049,18 @@ test_copy_dataset_multi_ohdr_chunks(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fa error: H5E_BEGIN_TRY { - H5Dclose(did2); - H5Dclose(did); - H5Sclose(sid); - H5Gclose(gid2); - H5Gclose(gid); - H5Fclose(fid_dst); - H5Fclose(fid_src); + H5Dclose(did2); + H5Dclose(did); + H5Sclose(sid); + H5Gclose(gid2); + H5Gclose(gid); + H5Fclose(fid_dst); + H5Fclose(fid_src); } H5E_END_TRY; return 1; } /* end test_copy_dataset_multi_ohdr_chunks */ - + /*------------------------------------------------------------------------- * Function: test_copy_dataset_attr_named_dtype * @@ -4993,19 +5190,19 @@ test_copy_dataset_attr_named_dtype(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fap error: H5E_BEGIN_TRY { - H5Dclose(did2); - H5Dclose(did); - H5Tclose(tid); - H5Sclose(sid); - H5Gclose(gid2); - H5Gclose(gid); - H5Fclose(fid_dst); - H5Fclose(fid_src); + H5Dclose(did2); + H5Dclose(did); + H5Tclose(tid); + H5Sclose(sid); + H5Gclose(gid2); + H5Gclose(gid); + H5Fclose(fid_dst); + H5Fclose(fid_src); } H5E_END_TRY; return 1; } /* end test_copy_dataset_attr_named_dtype */ - + /*------------------------------------------------------------------------- * Function: test_copy_dataset_contig_vl * @@ -5129,19 +5326,19 @@ test_copy_dataset_contig_vl(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_ error: H5E_BEGIN_TRY { - H5Dclose(did2); - H5Dclose(did); + H5Dclose(did2); + H5Dclose(did); H5Dvlen_reclaim(tid, sid, H5P_DEFAULT, buf); - H5Pclose(dxpl_id); - H5Tclose(tid); - H5Sclose(sid); - H5Fclose(fid_dst); - H5Fclose(fid_src); + H5Pclose(dxpl_id); + H5Tclose(tid); + H5Sclose(sid); + H5Fclose(fid_dst); + H5Fclose(fid_src); } H5E_END_TRY; return 1; } /* end test_copy_dataset_contig_vl */ - + /*------------------------------------------------------------------------- * Function: test_copy_dataset_chunked_vl * @@ -5312,20 +5509,20 @@ test_copy_dataset_chunked_vl(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid error: H5E_BEGIN_TRY { - H5Dclose(did2); - H5Dclose(did); + H5Dclose(did2); + H5Dclose(did); H5Dvlen_reclaim(tid, sid, H5P_DEFAULT, buf); - H5Pclose(dxpl_id); - H5Pclose(pid); - H5Tclose(tid); - H5Sclose(sid); - H5Fclose(fid_dst); - H5Fclose(fid_src); + H5Pclose(dxpl_id); + H5Pclose(pid); + H5Tclose(tid); + H5Sclose(sid); + H5Fclose(fid_dst); + H5Fclose(fid_src); } H5E_END_TRY; return 1; } /* end test_copy_dataset_chunked_vl */ - + /*------------------------------------------------------------------------- * Function: test_copy_dataset_compact_vl * @@ -5457,19 +5654,19 @@ test_copy_dataset_compact_vl(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid error: H5E_BEGIN_TRY { - H5Dclose(did2); - H5Dclose(did); + H5Dclose(did2); + H5Dclose(did); H5Dvlen_reclaim(tid, sid, H5P_DEFAULT, buf); - H5Pclose(dxpl_id); - H5Tclose(tid); - H5Sclose(sid); - H5Fclose(fid_dst); - H5Fclose(fid_src); + H5Pclose(dxpl_id); + H5Tclose(tid); + H5Sclose(sid); + H5Fclose(fid_dst); + H5Fclose(fid_src); } H5E_END_TRY; return 1; } /* end test_copy_dataset_compact_vl */ - + /*------------------------------------------------------------------------- * Function: test_copy_attribute_vl * @@ -5575,11 +5772,11 @@ error: H5E_BEGIN_TRY { H5Aclose(aid2); H5Aclose(aid); - H5Dclose(did2); - H5Dclose(did); - H5Sclose(sid); - H5Fclose(fid_dst); - H5Fclose(fid_src); + H5Dclose(did2); + H5Dclose(did); + H5Sclose(sid); + H5Fclose(fid_dst); + H5Fclose(fid_src); } H5E_END_TRY; return 1; } /* end test_copy_dataset_simple_empty */ @@ -5598,18 +5795,18 @@ error: static int attach_attribute_compound_vlstr(hid_t loc_id) { - hid_t aid = -1; /* Attribute ID */ - hid_t sid = -1; /* Dataspace ID */ - hid_t tid = -1; /* Datatype ID */ - hid_t vl_str_tid = -1; /* Variable length string datatype ID */ - hid_t cmpd_tid = -1; /* Compound datatype ID */ - hsize_t dim1 = 1; /* Dimension size */ - typedef struct { /* Compound structure for the attribute */ + hid_t aid = -1; /* Attribute ID */ + hid_t sid = -1; /* Dataspace ID */ + hid_t tid = -1; /* Datatype ID */ + hid_t vl_str_tid = -1; /* Variable length string datatype ID */ + hid_t cmpd_tid = -1; /* Compound datatype ID */ + hsize_t dim1 = 1; /* Dimension size */ + typedef struct { /* Compound structure for the attribute */ int i; char *v; } s1; s1 buf; /* Buffer */ - int ret_value = -1; /* Return value */ + int ret_value = -1; /* Return value */ /* Create dataspace */ if((sid = H5Screate_simple(1, &dim1, NULL)) < 0 ) @@ -5663,7 +5860,7 @@ done: * Function: compare_attribute_compound_vlstr * * Purpose: Compare data of the attributes attached to the two objects. - * The attribute is a compound datatype with a variable length string. + * The attribute is a compound datatype with a variable length string. * * Return: Non-negative on success/Negative on failure * @@ -5674,46 +5871,46 @@ done: static int compare_attribute_compound_vlstr(hid_t loc, hid_t loc2) { - hid_t aid = -1, aid2 = -1; /* Attribute IDs */ - hid_t tid = -1, tid2 = -1; /* Datatype IDs */ - typedef struct { /* Compound structure for the attribute */ - int i; - char *v; + hid_t aid = -1, aid2 = -1; /* Attribute IDs */ + hid_t tid = -1, tid2 = -1; /* Datatype IDs */ + typedef struct { /* Compound structure for the attribute */ + int i; + char *v; } s1; - s1 rbuf; /* Buffer for data read */ - s1 rbuf2; /* Buffer for data read */ - + s1 rbuf; /* Buffer for data read */ + s1 rbuf2; /* Buffer for data read */ + /* Open the attributes attached to the objects */ if((aid = H5Aopen_by_idx(loc, ".", H5_INDEX_CRT_ORDER, H5_ITER_INC, (hsize_t)0, H5P_DEFAULT, H5P_DEFAULT)) < 0) - FAIL_STACK_ERROR + FAIL_STACK_ERROR if((aid2 = H5Aopen_by_idx(loc2, ".", H5_INDEX_CRT_ORDER, H5_ITER_INC, (hsize_t)0, H5P_DEFAULT, H5P_DEFAULT)) < 0) - FAIL_STACK_ERROR + FAIL_STACK_ERROR /* Get the attributes' datatypes */ - if((tid = H5Aget_type(aid)) < 0) - FAIL_STACK_ERROR + if((tid = H5Aget_type(aid)) < 0) + FAIL_STACK_ERROR if((tid2 = H5Aget_type(aid2)) < 0) - FAIL_STACK_ERROR + FAIL_STACK_ERROR /* Read the attributes */ if(H5Aread(aid, tid, &rbuf) < 0) - FAIL_STACK_ERROR + FAIL_STACK_ERROR if(H5Aread(aid2, tid2, &rbuf2) < 0) - FAIL_STACK_ERROR + FAIL_STACK_ERROR /* Compare the attributes' data */ if(rbuf.i != rbuf2.i) - FAIL_STACK_ERROR - if(HDstrlen(rbuf.v) != HDstrlen(rbuf2.v)) - FAIL_STACK_ERROR - if(HDmemcmp(rbuf.v, rbuf2.v, HDstrlen(rbuf.v))) - FAIL_STACK_ERROR + FAIL_STACK_ERROR + if(HDstrlen(rbuf.v) != HDstrlen(rbuf2.v)) + FAIL_STACK_ERROR + if(HDmemcmp(rbuf.v, rbuf2.v, HDstrlen(rbuf.v))) + FAIL_STACK_ERROR /* Close the attributes */ if(H5Aclose(aid) < 0) - FAIL_STACK_ERROR + FAIL_STACK_ERROR if(H5Aclose(aid2) < 0) - FAIL_STACK_ERROR + FAIL_STACK_ERROR return TRUE; error: @@ -5731,15 +5928,15 @@ error: * Function: test_copy_attribute_compound_vlstr * * Purpose: Create a simple dataset and a group in SRC file. - * Both has an attribute with a compound datatype consisting + * Both has an attribute with a compound datatype consisting * of a variable length string * Copy the dataset and the group to DST file - * This is for HDFFV-7991 + * This is for HDFFV-7991 * * Return: Success: 0 * Failure: number of errors * - * Programmer: + * Programmer: * *------------------------------------------------------------------------- */ @@ -5750,10 +5947,10 @@ test_copy_attribute_compound_vlstr(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fap hid_t sid = -1; /* Dataspace ID */ hid_t did = -1, did2 = -1; /* Dataset IDs */ hid_t aid = -1, aid2 = -1; /* Attribute IDs */ - hid_t gid = -1, gid2 = -1; /* Group IDs */ + hid_t gid = -1, gid2 = -1; /* Group IDs */ hsize_t dim2d[2]; /* Dataset dimensions */ - char src_filename[NAME_BUF_SIZE]; /* Source file name */ - char dst_filename[NAME_BUF_SIZE]; /* Destination file name */ + char src_filename[NAME_BUF_SIZE]; /* Source file name */ + char dst_filename[NAME_BUF_SIZE]; /* Destination file name */ TESTING("H5Ocopy(): attribute with compound datatype consisting of variable length string"); @@ -5766,7 +5963,7 @@ test_copy_attribute_compound_vlstr(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fap /* create source file */ if((fid_src = H5Fcreate(src_filename, H5F_ACC_TRUNC, fcpl_src, src_fapl)) < 0) - FAIL_STACK_ERROR + FAIL_STACK_ERROR /* set dataspace dimensions */ dim2d[0] = DIM_SIZE_1; @@ -5774,103 +5971,103 @@ test_copy_attribute_compound_vlstr(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fap /* create 2D dataspace */ if((sid = H5Screate_simple(2, dim2d, NULL)) < 0) - FAIL_STACK_ERROR + FAIL_STACK_ERROR /* create 2D int dataset at SRC file */ if((did = H5Dcreate2(fid_src, NAME_DATASET_SIMPLE, H5T_NATIVE_INT, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) - FAIL_STACK_ERROR + FAIL_STACK_ERROR /* close dataspace */ if(H5Sclose(sid) < 0) - FAIL_STACK_ERROR + FAIL_STACK_ERROR /* attach an attribute to the dataset */ if(attach_attribute_compound_vlstr(did) < 0) - FAIL_STACK_ERROR + FAIL_STACK_ERROR /* close the dataset */ if(H5Dclose(did) < 0) - FAIL_STACK_ERROR + FAIL_STACK_ERROR /* create a group */ if((gid = H5Gcreate2(fid_src, NAME_GROUP_EMPTY, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) - FAIL_STACK_ERROR + FAIL_STACK_ERROR /* attach attribute to the group */ if(attach_attribute_compound_vlstr(gid) < 0) - FAIL_STACK_ERROR + FAIL_STACK_ERROR /* close the group */ if(H5Gclose(gid) < 0) - FAIL_STACK_ERROR + FAIL_STACK_ERROR /* close the SRC file */ if(H5Fclose(fid_src) < 0) - FAIL_STACK_ERROR + FAIL_STACK_ERROR /* open the source file with read-only */ if((fid_src = H5Fopen(src_filename, H5F_ACC_RDONLY, src_fapl)) < 0) - FAIL_STACK_ERROR + FAIL_STACK_ERROR /* create destination file */ if((fid_dst = H5Fcreate(dst_filename, H5F_ACC_TRUNC, fcpl_dst, dst_fapl)) < 0) - FAIL_STACK_ERROR + FAIL_STACK_ERROR /* Create an uncopied object in destination file so that addresses in source and destination files aren't the same */ if(H5Gclose(H5Gcreate2(fid_dst, NAME_GROUP_UNCOPIED, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) - FAIL_STACK_ERROR + FAIL_STACK_ERROR /* copy the dataset from SRC to DST */ if(H5Ocopy(fid_src, NAME_DATASET_SIMPLE, fid_dst, NAME_DATASET_SIMPLE, H5P_DEFAULT, H5P_DEFAULT) < 0) - FAIL_STACK_ERROR + FAIL_STACK_ERROR /* open the src dataset */ if((did = H5Dopen2(fid_src, NAME_DATASET_SIMPLE, H5P_DEFAULT)) < 0) - FAIL_STACK_ERROR + FAIL_STACK_ERROR /* open the destination dataset */ if((did2 = H5Dopen2(fid_dst, NAME_DATASET_SIMPLE, H5P_DEFAULT)) < 0) - FAIL_STACK_ERROR + FAIL_STACK_ERROR /* compare the data of the attributes attached to the two datasets */ if(compare_attribute_compound_vlstr(did, did2) < 0) - FAIL_STACK_ERROR + FAIL_STACK_ERROR /* close the datasets */ if(H5Dclose(did2) < 0) - FAIL_STACK_ERROR + FAIL_STACK_ERROR if(H5Dclose(did) < 0) - FAIL_STACK_ERROR + FAIL_STACK_ERROR /* Copy the group */ if(H5Ocopy(fid_src, NAME_GROUP_EMPTY, fid_dst, NAME_GROUP_EMPTY, H5P_DEFAULT, H5P_DEFAULT) < 0) - FAIL_STACK_ERROR + FAIL_STACK_ERROR /* Open the src group */ if((gid = H5Gopen2(fid_src, NAME_GROUP_EMPTY, H5P_DEFAULT)) < 0) - FAIL_STACK_ERROR + FAIL_STACK_ERROR /* Open the destination group */ if((gid2 = H5Gopen2(fid_dst, NAME_GROUP_EMPTY, H5P_DEFAULT)) < 0) - FAIL_STACK_ERROR + FAIL_STACK_ERROR /* compare the data of the attributes attached to the two groups */ if(compare_attribute_compound_vlstr(gid, gid2) < 0) - FAIL_STACK_ERROR + FAIL_STACK_ERROR /* close the groups */ - if(H5Gclose(gid) < 0) - FAIL_STACK_ERROR - if(H5Gclose(gid2) < 0) - FAIL_STACK_ERROR + if(H5Gclose(gid) < 0) + FAIL_STACK_ERROR + if(H5Gclose(gid2) < 0) + FAIL_STACK_ERROR /* close the SRC file */ if(H5Fclose(fid_src) < 0) - FAIL_STACK_ERROR + FAIL_STACK_ERROR /* close the DST file */ if(H5Fclose(fid_dst) < 0) - FAIL_STACK_ERROR + FAIL_STACK_ERROR PASSED(); return 0; @@ -5879,18 +6076,18 @@ error: H5E_BEGIN_TRY { H5Aclose(aid2); H5Aclose(aid); - H5Dclose(did2); - H5Dclose(did); - H5Gclose(gid); - H5Gclose(gid2); - H5Sclose(sid); - H5Fclose(fid_dst); - H5Fclose(fid_src); + H5Dclose(did2); + H5Dclose(did); + H5Gclose(gid); + H5Gclose(gid2); + H5Sclose(sid); + H5Fclose(fid_dst); + H5Fclose(fid_src); } H5E_END_TRY; return 1; } /* end test_copy_attribute_compound_vlstr() */ - + /*------------------------------------------------------------------------- * Function: test_copy_dataset_compressed_vl * @@ -6034,21 +6231,21 @@ test_copy_dataset_compressed_vl(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, #ifdef H5_HAVE_FILTER_DEFLATE error: H5E_BEGIN_TRY { - H5Dclose(did2); - H5Dclose(did); - H5Pclose(pid); + H5Dclose(did2); + H5Dclose(did); + H5Pclose(pid); H5Dvlen_reclaim(tid, sid, H5P_DEFAULT, buf); - H5Pclose(dxpl_id); - H5Tclose(tid); - H5Sclose(sid); - H5Fclose(fid_dst); - H5Fclose(fid_src); + H5Pclose(dxpl_id); + H5Tclose(tid); + H5Sclose(sid); + H5Fclose(fid_dst); + H5Fclose(fid_src); } H5E_END_TRY; return 1; #endif /* H5_HAVE_FILTER_DEFLATE */ } /* end test_copy_dataset_compressed_vl */ - + /*------------------------------------------------------------------------- * Function: test_copy_group_empty * @@ -6135,15 +6332,15 @@ test_copy_group_empty(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t dst_ error: H5E_BEGIN_TRY { - H5Gclose(gid2); - H5Gclose(gid); - H5Fclose(fid_dst); - H5Fclose(fid_src); + H5Gclose(gid2); + H5Gclose(gid); + H5Fclose(fid_dst); + H5Fclose(fid_src); } H5E_END_TRY; return 1; } /* end test_copy_group_empty */ - + /*------------------------------------------------------------------------- * Function: test_copy_root_group * @@ -6276,7 +6473,7 @@ error: return 1; } /* end test_copy_root_group */ - + /*------------------------------------------------------------------------- * Function: test_copy_group * @@ -6399,18 +6596,18 @@ test_copy_group(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t dst_fapl) error: H5E_BEGIN_TRY { - H5Sclose(sid); - H5Dclose(did); - H5Gclose(gid_sub); - H5Gclose(gid2); - H5Gclose(gid); - H5Fclose(fid_dst); - H5Fclose(fid_src); + H5Sclose(sid); + H5Dclose(did); + H5Gclose(gid_sub); + H5Gclose(gid2); + H5Gclose(gid); + H5Fclose(fid_dst); + H5Fclose(fid_src); } H5E_END_TRY; return 1; } /* end test_copy_group */ - + /*------------------------------------------------------------------------- * Function: test_copy_group_deep * @@ -6541,18 +6738,18 @@ test_copy_group_deep(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t dst_f error: H5E_BEGIN_TRY { - H5Sclose(sid); - H5Dclose(did); - H5Gclose(gid_sub); - H5Gclose(gid2); - H5Gclose(gid); - H5Fclose(fid_dst); - H5Fclose(fid_src); + H5Sclose(sid); + H5Dclose(did); + H5Gclose(gid_sub); + H5Gclose(gid2); + H5Gclose(gid); + H5Fclose(fid_dst); + H5Fclose(fid_src); } H5E_END_TRY; return 1; } /* end test_copy_group_deep */ - + /*------------------------------------------------------------------------- * Function: test_copy_group_loop * @@ -6652,17 +6849,17 @@ test_copy_group_loop(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t dst_f error: H5E_BEGIN_TRY { - H5Gclose(gid_sub2); - H5Gclose(gid_sub); - H5Gclose(gid2); - H5Gclose(gid); - H5Fclose(fid_dst); - H5Fclose(fid_src); + H5Gclose(gid_sub2); + H5Gclose(gid_sub); + H5Gclose(gid2); + H5Gclose(gid); + H5Fclose(fid_dst); + H5Fclose(fid_src); } H5E_END_TRY; return 1; } /* end test_copy_group_loop */ - + /*------------------------------------------------------------------------- * Function: test_copy_group_wide_loop * @@ -6781,17 +6978,17 @@ test_copy_group_wide_loop(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t error: H5E_BEGIN_TRY { - H5Gclose(gid_sub2); - H5Gclose(gid_sub); - H5Gclose(gid2); - H5Gclose(gid); - H5Fclose(fid_dst); - H5Fclose(fid_src); + H5Gclose(gid_sub2); + H5Gclose(gid_sub); + H5Gclose(gid2); + H5Gclose(gid); + H5Fclose(fid_dst); + H5Fclose(fid_src); } H5E_END_TRY; return 1; } /* end test_copy_group_wide_loop */ - + /*------------------------------------------------------------------------- * Function: test_copy_group_links * @@ -7039,20 +7236,20 @@ test_copy_group_links(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t dst_ error: H5E_BEGIN_TRY { - H5Sclose(sid); - H5Dclose(did2); - H5Dclose(did); - H5Gclose(gid2); - H5Gclose(gid); - H5Fclose(fid_ext); - H5Fclose(fid_dst); - H5Fclose(fid_src); - H5Pclose(plid); + H5Sclose(sid); + H5Dclose(did2); + H5Dclose(did); + H5Gclose(gid2); + H5Gclose(gid); + H5Fclose(fid_ext); + H5Fclose(fid_dst); + H5Fclose(fid_src); + H5Pclose(plid); } H5E_END_TRY; return 1; } /* end test_copy_group_links */ - + /*------------------------------------------------------------------------- * Function: test_copy_soft_link * @@ -7178,17 +7375,17 @@ test_copy_soft_link(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t dst_fa error: H5E_BEGIN_TRY { - H5Sclose(sid); - H5Dclose(did2); - H5Dclose(did); - H5Gclose(gid); - H5Fclose(fid_dst); - H5Fclose(fid_src); + H5Sclose(sid); + H5Dclose(did2); + H5Dclose(did); + H5Gclose(gid); + H5Fclose(fid_dst); + H5Fclose(fid_src); } H5E_END_TRY; return 1; } /* end test_copy_soft_link */ - + /*------------------------------------------------------------------------- * Function: test_copy_ext_link * @@ -7312,17 +7509,17 @@ test_copy_ext_link(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t dst_fap error: H5E_BEGIN_TRY { - H5Sclose(sid); - H5Dclose(did2); - H5Dclose(did); - H5Gclose(gid); - H5Fclose(fid_dst); - H5Fclose(fid_src); + H5Sclose(sid); + H5Dclose(did2); + H5Dclose(did); + H5Gclose(gid); + H5Fclose(fid_dst); + H5Fclose(fid_src); } H5E_END_TRY; return 1; } /* end test_copy_ext_link */ - + /*------------------------------------------------------------------------- * Function: test_copy_exist * @@ -7422,15 +7619,15 @@ test_copy_exist(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t dst_fapl) error: H5E_BEGIN_TRY { - H5Dclose(did); - H5Sclose(sid); - H5Fclose(fid_dst); - H5Fclose(fid_src); + H5Dclose(did); + H5Sclose(sid); + H5Fclose(fid_dst); + H5Fclose(fid_src); } H5E_END_TRY; return 1; } /* end test_copy_exist */ - + /*------------------------------------------------------------------------- * Function: test_copy_path * @@ -7556,17 +7753,17 @@ test_copy_path(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t dst_fapl) error: H5E_BEGIN_TRY { - H5Dclose(did2); - H5Dclose(did); - H5Sclose(sid); - H5Gclose(gid); - H5Fclose(fid_dst); - H5Fclose(fid_src); + H5Dclose(did2); + H5Dclose(did); + H5Sclose(sid); + H5Gclose(gid); + H5Fclose(fid_dst); + H5Fclose(fid_src); } H5E_END_TRY; return 1; } /* end test_copy_path */ - + /*------------------------------------------------------------------------- * Function: test_copy_same_file_named_datatype * @@ -7628,21 +7825,21 @@ test_copy_same_file_named_datatype(hid_t fcpl_src, hid_t fapl) error: H5E_BEGIN_TRY { - H5Tclose(tid2); - H5Tclose(tid); - H5Fclose(fid); + H5Tclose(tid2); + H5Tclose(tid); + H5Fclose(fid); } H5E_END_TRY; return 1; } /* end test_copy_same_file_named_datatype */ - + /*------------------------------------------------------------------------- * Function: test_copy_old_layout * * Purpose: Copy dataset that uses the "old" layout version (pre version 3) * format. * - * Note: This test uses the "fill_old.h5" file for convenience, since it + * Note: This test uses the "fill_old.h5" file for convenience, since it * has a dataset with the old layout format. * * Return: Success: 0 @@ -7718,15 +7915,15 @@ test_copy_old_layout(hid_t fcpl_dst, hid_t fapl, hbool_t test_open) error: H5E_BEGIN_TRY { - H5Dclose(did2); - H5Dclose(did); - H5Fclose(fid_dst); - H5Fclose(fid_src); + H5Dclose(did2); + H5Dclose(did); + H5Fclose(fid_dst); + H5Fclose(fid_src); } H5E_END_TRY; return 1; } /* end test_copy_old_layout */ - + /*------------------------------------------------------------------------- * Function: test_copy_dataset_compact_named_vl * @@ -7867,21 +8064,21 @@ test_copy_dataset_compact_named_vl(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fap error: H5E_BEGIN_TRY { - H5Pclose(pid); - H5Dclose(did2); - H5Dclose(did); + H5Pclose(pid); + H5Dclose(did2); + H5Dclose(did); H5Dvlen_reclaim(tid_copy, sid, H5P_DEFAULT, buf); - H5Pclose(dxpl_id); - H5Tclose(tid); - H5Tclose(tid_copy); - H5Sclose(sid); - H5Fclose(fid_dst); - H5Fclose(fid_src); + H5Pclose(dxpl_id); + H5Tclose(tid); + H5Tclose(tid_copy); + H5Sclose(sid); + H5Fclose(fid_dst); + H5Fclose(fid_src); } H5E_END_TRY; return 1; } /* end test_copy_dataset_compact_named_vl */ - + /*------------------------------------------------------------------------- * Function: test_copy_dataset_contig_named_vl * @@ -8014,27 +8211,27 @@ test_copy_dataset_contig_named_vl(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl error: H5E_BEGIN_TRY { - H5Dclose(did2); - H5Dclose(did); + H5Dclose(did2); + H5Dclose(did); H5Dvlen_reclaim(tid_copy, sid, H5P_DEFAULT, buf); - H5Pclose(dxpl_id); - H5Tclose(tid); - H5Tclose(tid_copy); - H5Sclose(sid); - H5Fclose(fid_dst); - H5Fclose(fid_src); + H5Pclose(dxpl_id); + H5Tclose(tid); + H5Tclose(tid_copy); + H5Sclose(sid); + H5Fclose(fid_dst); + H5Fclose(fid_src); } H5E_END_TRY; return 1; } /* end test_copy_dataset_contig_named_vl */ - + /*------------------------------------------------------------------------- * Function: test_copy_dataset_chunked_named_vl * * Purpose: Create a dataset that uses a named variable length datatype * in SRC file and copy it to DST file * - * Note: The parameter "test_open" is added to test for H5Ocopy when + * Note: The parameter "test_open" is added to test for H5Ocopy when * the dataset is open in the file (HDFFV-7853). * * Return: Success: 0 @@ -8181,21 +8378,21 @@ test_copy_dataset_chunked_named_vl(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fap error: H5E_BEGIN_TRY { - H5Pclose(pid); - H5Dclose(did2); - H5Dclose(did); + H5Pclose(pid); + H5Dclose(did2); + H5Dclose(did); H5Dvlen_reclaim(tid_copy, sid, H5P_DEFAULT, buf); - H5Pclose(dxpl_id); - H5Tclose(tid); - H5Tclose(tid_copy); - H5Sclose(sid); - H5Fclose(fid_dst); - H5Fclose(fid_src); + H5Pclose(dxpl_id); + H5Tclose(tid); + H5Tclose(tid_copy); + H5Sclose(sid); + H5Fclose(fid_dst); + H5Fclose(fid_src); } H5E_END_TRY; return 1; } /* end test_copy_dataset_chunked_named_vl */ - + /*------------------------------------------------------------------------- * Function: test_copy_dataset_compressed_named_vl * @@ -8338,21 +8535,21 @@ test_copy_dataset_compressed_named_vl(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_ error: H5E_BEGIN_TRY { - H5Pclose(pid); - H5Dclose(did2); - H5Dclose(did); + H5Pclose(pid); + H5Dclose(did2); + H5Dclose(did); H5Dvlen_reclaim(tid_copy, sid, H5P_DEFAULT, buf); - H5Pclose(dxpl_id); - H5Tclose(tid); - H5Tclose(tid_copy); - H5Sclose(sid); - H5Fclose(fid_dst); - H5Fclose(fid_src); + H5Pclose(dxpl_id); + H5Tclose(tid); + H5Tclose(tid_copy); + H5Sclose(sid); + H5Fclose(fid_dst); + H5Fclose(fid_src); } H5E_END_TRY; return 1; } /* end test_copy_dataset_compressed_named_vl */ - + /*------------------------------------------------------------------------- * Function: test_copy_dataset_compact_vl_vl * @@ -8501,28 +8698,28 @@ test_copy_dataset_compact_vl_vl(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, error: H5E_BEGIN_TRY { - H5Dclose(did2); - H5Dclose(did); + H5Dclose(did2); + H5Dclose(did); H5Dvlen_reclaim(tid2, sid, H5P_DEFAULT, buf); - H5Pclose(dxpl_id); - H5Pclose(pid); - H5Tclose(tid); - H5Tclose(tid2); - H5Sclose(sid); - H5Fclose(fid_dst); - H5Fclose(fid_src); + H5Pclose(dxpl_id); + H5Pclose(pid); + H5Tclose(tid); + H5Tclose(tid2); + H5Sclose(sid); + H5Fclose(fid_dst); + H5Fclose(fid_src); } H5E_END_TRY; return 1; } /* end test_copy_dataset_compact_vl_vl */ - + /*------------------------------------------------------------------------- * Function: test_copy_dataset_contig_vl_vl * * Purpose: Create a compact dataset w/nested VLEN datatype * in SRC file and copy it to DST file * - * Note: The parameter "test_open" is added to test for H5Ocopy when + * Note: The parameter "test_open" is added to test for H5Ocopy when * the dataset is open in the file (HDFFV-7853). * * Return: Success: 0 @@ -8674,21 +8871,21 @@ test_copy_dataset_contig_vl_vl(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, h error: H5E_BEGIN_TRY { - H5Dclose(did2); - H5Dclose(did); + H5Dclose(did2); + H5Dclose(did); H5Dvlen_reclaim(tid2, sid, H5P_DEFAULT, buf); - H5Pclose(dxpl_id); - H5Pclose(pid); - H5Tclose(tid); - H5Tclose(tid2); - H5Sclose(sid); - H5Fclose(fid_dst); - H5Fclose(fid_src); + H5Pclose(dxpl_id); + H5Pclose(pid); + H5Tclose(tid); + H5Tclose(tid2); + H5Sclose(sid); + H5Fclose(fid_dst); + H5Fclose(fid_src); } H5E_END_TRY; return 1; } /* end test_copy_dataset_contig_vl_vl */ - + /*------------------------------------------------------------------------- * Function: test_copy_dataset_chunked_vl_vl * @@ -8707,7 +8904,7 @@ static int test_copy_dataset_chunked_vl_vl(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t dst_fapl) { hid_t fid_src = -1, fid_dst = -1; /* File IDs */ - hid_t tid = -1, tid2=-1; /* Datatype ID */ + hid_t tid = -1, tid2=-1; /* Datatype ID */ hid_t sid = -1; /* Dataspace ID */ hid_t pid = -1; /* Dataset creation property list ID */ hid_t did = -1, did2 = -1; /* Dataset IDs */ @@ -8875,28 +9072,28 @@ test_copy_dataset_chunked_vl_vl(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, error: H5E_BEGIN_TRY { - H5Pclose(pid); - H5Dclose(did2); - H5Dclose(did); + H5Pclose(pid); + H5Dclose(did2); + H5Dclose(did); H5Dvlen_reclaim(tid2, sid, H5P_DEFAULT, buf); - H5Pclose(dxpl_id); - H5Tclose(tid); - H5Tclose(tid2); - H5Sclose(sid); - H5Fclose(fid_dst); - H5Fclose(fid_src); + H5Pclose(dxpl_id); + H5Tclose(tid); + H5Tclose(tid2); + H5Sclose(sid); + H5Fclose(fid_dst); + H5Fclose(fid_src); } H5E_END_TRY; return 1; } /* end test_copy_dataset_chunked_vl_vl */ - + /*------------------------------------------------------------------------- * Function: test_copy_dataset_compressed_vl_vl * * Purpose: Create a dataset that uses a named variable length datatype * in SRC file and copy it to DST file * - * Note: The parameter "test_open" is added to test for H5Ocopy when + * Note: The parameter "test_open" is added to test for H5Ocopy when * the dataset is open in the file (HDFFV-7853). * * Return: Success: 0 @@ -8998,7 +9195,7 @@ test_copy_dataset_compressed_vl_vl(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fap /* open the source file with read-only */ if((fid_src = H5Fopen(src_filename, H5F_ACC_RDONLY, src_fapl)) < 0) TEST_ERROR } - + /* create destination file */ if((fid_dst = H5Fcreate(dst_filename, H5F_ACC_TRUNC, fcpl_dst, dst_fapl)) < 0) TEST_ERROR @@ -9051,16 +9248,16 @@ test_copy_dataset_compressed_vl_vl(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fap error: H5E_BEGIN_TRY { - H5Pclose(pid); - H5Dclose(did2); - H5Dclose(did); + H5Pclose(pid); + H5Dclose(did2); + H5Dclose(did); H5Dvlen_reclaim(tid2, sid, H5P_DEFAULT, buf); - H5Pclose(dxpl_id); - H5Tclose(tid); - H5Tclose(tid2); - H5Sclose(sid); - H5Fclose(fid_dst); - H5Fclose(fid_src); + H5Pclose(dxpl_id); + H5Tclose(tid); + H5Tclose(tid2); + H5Sclose(sid); + H5Fclose(fid_dst); + H5Fclose(fid_src); } H5E_END_TRY; return 1; } /* end test_copy_dataset_compressed_vl_vl */ @@ -9074,7 +9271,7 @@ typedef struct cmpd_vl_t { double c; } cmpd_vl_t; - + /*------------------------------------------------------------------------- * Function: test_copy_dataset_contig_cmpd_vl * @@ -9207,20 +9404,20 @@ test_copy_dataset_contig_cmpd_vl(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, error: H5E_BEGIN_TRY { - H5Dclose(did2); - H5Dclose(did); + H5Dclose(did2); + H5Dclose(did); H5Dvlen_reclaim(tid, sid, H5P_DEFAULT, buf); H5Pclose(dxpl_id); H5Tclose(tid2); - H5Tclose(tid); - H5Sclose(sid); - H5Fclose(fid_dst); - H5Fclose(fid_src); + H5Tclose(tid); + H5Sclose(sid); + H5Fclose(fid_dst); + H5Fclose(fid_src); } H5E_END_TRY; return 1; } /* end test_copy_dataset_contig_cmpd_vl */ - + /*------------------------------------------------------------------------- * Function: test_copy_dataset_chunked_cmpd_vl * @@ -9360,21 +9557,21 @@ test_copy_dataset_chunked_cmpd_vl(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl error: H5E_BEGIN_TRY { - H5Dclose(did2); - H5Dclose(did); + H5Dclose(did2); + H5Dclose(did); H5Dvlen_reclaim(tid, sid, H5P_DEFAULT, buf); H5Pclose(dxpl_id); H5Pclose(pid); H5Tclose(tid2); - H5Tclose(tid); - H5Sclose(sid); - H5Fclose(fid_dst); - H5Fclose(fid_src); + H5Tclose(tid); + H5Sclose(sid); + H5Fclose(fid_dst); + H5Fclose(fid_src); } H5E_END_TRY; return 1; } /* end test_copy_dataset_chunked_cmpd_vl */ - + /*------------------------------------------------------------------------- * Function: test_copy_dataset_compact_cmpd_vl * @@ -9513,21 +9710,21 @@ test_copy_dataset_compact_cmpd_vl(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl error: H5E_BEGIN_TRY { - H5Dclose(did2); - H5Dclose(did); + H5Dclose(did2); + H5Dclose(did); H5Dvlen_reclaim(tid, sid, H5P_DEFAULT, buf); - H5Pclose(dxpl_id); - H5Pclose(pid); + H5Pclose(dxpl_id); + H5Pclose(pid); H5Tclose(tid2); - H5Tclose(tid); - H5Sclose(sid); - H5Fclose(fid_dst); - H5Fclose(fid_src); + H5Tclose(tid); + H5Sclose(sid); + H5Fclose(fid_dst); + H5Fclose(fid_src); } H5E_END_TRY; return 1; } /* end test_copy_dataset_compact_cmpd_vl */ - + /*------------------------------------------------------------------------- * Function: test_copy_null_ref * @@ -9689,7 +9886,7 @@ error: return 1; } /* end test_copy_null_ref */ - + /*------------------------------------------------------------------------- * Function: test_copy_null_ref_open * @@ -9872,7 +10069,7 @@ error: return 1; } /* end test_copy_null_ref_open */ - + /*------------------------------------------------------------------------- * Function: test_copy_attr_crt_order * @@ -9994,7 +10191,7 @@ error: return 1; } /* end test_copy_attr_crt_order */ - + /*------------------------------------------------------------------------- * Function: test_copy_committed_datatype_merge * @@ -10231,7 +10428,7 @@ error: return 1; } /* end test_copy_committed_datatype_merge */ - + /*------------------------------------------------------------------------- * Function: test_copy_committed_datatype_merge_same_file * @@ -10503,7 +10700,7 @@ error: } /* end test_copy_committed_datatype_merge_same_file */ - + /*------------------------------------------------------------------------- * Function: test_copy_committed_dt_merge_sugg * @@ -10732,7 +10929,7 @@ error: return 1; } /* end test_copy_committed_dt_merge_sugg */ - + /*------------------------------------------------------------------------- * Function: test_copy_committed_dt_merge_attr * @@ -10925,27 +11122,27 @@ error: #define ROOT_NDT_INT "root_ndt_int" #define GROUP_NDT_SHORT "group_ndt_short" -#define SRC_GRP "src_grp" -#define DST_GRP "dst_grp" -#define DST_GRP2 "dst_grp2" +#define SRC_GRP "src_grp" +#define DST_GRP "dst_grp" +#define DST_GRP2 "dst_grp2" -#define SRC_NDT_SHORT "src_ndt_short" -#define SRC_NDT_INT "src_ndt_int" -#define SRC_NDT_INT2 "src_ndt_int2" -#define SRC_NDT_FLOAT "src_ndt_float" -#define SRC_NDT_DOUBLE "src_ndt_double" +#define SRC_NDT_SHORT "src_ndt_short" +#define SRC_NDT_INT "src_ndt_int" +#define SRC_NDT_INT2 "src_ndt_int2" +#define SRC_NDT_FLOAT "src_ndt_float" +#define SRC_NDT_DOUBLE "src_ndt_double" -#define DST_NDT_SHORT "dst_ndt_short" -#define DST_NDT_INT "dst_ndt_int" -#define DST_NDT_FLOAT "dst_ndt_float" -#define DST_NDT_DOUBLE "dst_ndt_double" +#define DST_NDT_SHORT "dst_ndt_short" +#define DST_NDT_INT "dst_ndt_int" +#define DST_NDT_FLOAT "dst_ndt_float" +#define DST_NDT_DOUBLE "dst_ndt_double" -#define SRC_NDT_DSET "src_ndt_dset" -#define SRC_NDT_DSET2 "src_ndt_dset2" -#define SRC_NDT_DSET3 "src_ndt_dset3" +#define SRC_NDT_DSET "src_ndt_dset" +#define SRC_NDT_DSET2 "src_ndt_dset2" +#define SRC_NDT_DSET3 "src_ndt_dset3" -#define SRC_DSET "src_dset" -#define SRC_DSET1 "src_dset1" +#define SRC_DSET "src_dset" +#define SRC_DSET1 "src_dset1" #define SRC_ATTR "src_attr" @@ -10954,21 +11151,21 @@ error: #define DST_ATTR "dst_attr" #define DST_ATTR2 "dst_attr2" - + /*------------------------------------------------------------------------- * Function: test_copy_cdt_hier_merge * * Purpose: Tests the "merge committed datatypes" feature of H5Ocopy: - * SRC file: - * Create committed datatypes at / and /g0 - * Create datasets with native type and committed datatypes at /g0 - * DST file: - * Create attributes with anonymous committed datatypes at /uncopied + * SRC file: + * Create committed datatypes at / and /g0 + * Create datasets with native type and committed datatypes at /g0 + * DST file: + * Create attributes with anonymous committed datatypes at /uncopied * - * Copy / at SRC to DST - * Copy /g0 at SRC to DST - * Copy the datasets in /g0 at SRC to DST /uncopied - * Verify that committed datatypes are copied and merged correctly + * Copy / at SRC to DST + * Copy /g0 at SRC to DST + * Copy the datasets in /g0 at SRC to DST /uncopied + * Verify that committed datatypes are copied and merged correctly * * Return: Success: 0 * Failure: number of errors @@ -10984,19 +11181,19 @@ test_copy_cdt_hier_merge(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t d hid_t tid = -1; /* Datatype ID */ hid_t sid = -1; /* Dataspace ID */ hid_t did = -1; /* Dataset ID */ - hid_t gid = -1; /* Group IDs */ - hid_t f_tid = -1; /* Datatype ID for root group */ - hid_t g_tid = -1; /* Datatype ID for group */ - hid_t anon_tid = -1; /* Anonymous datatype */ - hid_t aid = -1; /* Attribute ID */ + hid_t gid = -1; /* Group IDs */ + hid_t f_tid = -1; /* Datatype ID for root group */ + hid_t g_tid = -1; /* Datatype ID for group */ + hid_t anon_tid = -1; /* Anonymous datatype */ + hid_t aid = -1; /* Attribute ID */ hid_t ocpypl_id = -1; /* Object copy plist ID */ - int i; /* Local index variable */ - hsize_t dim1d[1]; /* dimension sizes */ - int buf[DIM_SIZE_1]; /* Buffer for data */ - haddr_t exp_addr_int, exp_addr_short; /* Expected object addresses */ + int i; /* Local index variable */ + hsize_t dim1d[1]; /* dimension sizes */ + int buf[DIM_SIZE_1]; /* Buffer for data */ + haddr_t exp_addr_int, exp_addr_short; /* Expected object addresses */ H5O_info_t oinfo; /* Object info */ - char src_filename[NAME_BUF_SIZE]; /* Source file name */ - char dst_filename[NAME_BUF_SIZE]; /* Destination file name */ + char src_filename[NAME_BUF_SIZE]; /* Source file name */ + char dst_filename[NAME_BUF_SIZE]; /* Destination file name */ if(reopen) TESTING("H5Ocopy(): hier. of committed datatypes and merging with reopen") @@ -11014,8 +11211,8 @@ test_copy_cdt_hier_merge(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t d /* Reset file address checking info */ addr_reset(); - /* - * Populate source file + /* + * Populate source file */ if((fid_src = H5Fcreate(src_filename, H5F_ACC_TRUNC, fcpl_src, src_fapl)) < 0) TEST_ERROR @@ -11073,8 +11270,8 @@ test_copy_cdt_hier_merge(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t d /* close the SRC file */ if(H5Fclose(fid_src) < 0) TEST_ERROR - /* - * Populate destination file + /* + * Populate destination file */ if((fid_dst = H5Fcreate(dst_filename, H5F_ACC_TRUNC, fcpl_dst, dst_fapl)) < 0) TEST_ERROR @@ -11087,7 +11284,7 @@ test_copy_cdt_hier_merge(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t d /* create attribute of anon ndt (short) in /uncopied */ if((aid = H5Acreate2(gid, DST_ATTR_ANON_SHORT, anon_tid, sid, H5P_DEFAULT, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR /* close the attribute */ if(H5Aclose(aid) < 0) TEST_ERROR @@ -11101,7 +11298,7 @@ test_copy_cdt_hier_merge(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t d /* create attribute of anon ndt (int) in /uncopied */ if((aid = H5Acreate2(gid, DST_ATTR_ANON_INT, anon_tid, sid, H5P_DEFAULT, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR /* close the attribute */ if(H5Aclose(aid) < 0) TEST_ERROR @@ -11262,17 +11459,17 @@ test_copy_cdt_hier_merge(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t d error: H5E_BEGIN_TRY { - H5Tclose(tid); - H5Tclose(f_tid); - H5Tclose(g_tid); - H5Tclose(anon_tid); - H5Pclose(ocpypl_id); - H5Aclose(aid); - H5Dclose(did); - H5Sclose(sid); - H5Gclose(gid); - H5Fclose(fid_dst); - H5Fclose(fid_src); + H5Tclose(tid); + H5Tclose(f_tid); + H5Tclose(g_tid); + H5Tclose(anon_tid); + H5Pclose(ocpypl_id); + H5Aclose(aid); + H5Dclose(did); + H5Sclose(sid); + H5Gclose(gid); + H5Fclose(fid_dst); + H5Fclose(fid_src); } H5E_END_TRY; return 1; } /* end test_copy_cdt_hier_merge */ @@ -11282,22 +11479,22 @@ error: * Function: test_copy_cdt_merge_cdt * * Purpose: Tests the "merge committed datatypes" feature of H5Ocopy: - * SRC file: - * Create committed datatype (short) - * Create committed datatype (float) - * Create committed datatype (int), with attribute of ndt int - * Create committed datatype (double), with attribute of anon ndt short - * DST file: - * Create committed datatype (int) - * Create committed datatype (float), with attribute of native int - * Create committed datatype (double), with attribute of anon ndt short - * - * Copy / at SRC to DST - * Verify that committed datatypes are copied and merged correctly - * - * NOTE: - * Comparison of attributes are not implemented yet. - * Further tests will be added in the future. + * SRC file: + * Create committed datatype (short) + * Create committed datatype (float) + * Create committed datatype (int), with attribute of ndt int + * Create committed datatype (double), with attribute of anon ndt short + * DST file: + * Create committed datatype (int) + * Create committed datatype (float), with attribute of native int + * Create committed datatype (double), with attribute of anon ndt short + * + * Copy / at SRC to DST + * Verify that committed datatypes are copied and merged correctly + * + * NOTE: + * Comparison of attributes are not implemented yet. + * Further tests will be added in the future. * * Return: Success: 0 * Failure: number of errors @@ -11312,15 +11509,15 @@ test_copy_cdt_merge_cdt(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t ds hid_t fid_src = -1, fid_dst = -1; /* File IDs */ hid_t tid1 = -1, tid2 = -1; /* Datatype IDs */ hid_t tid3 = -1, tid4 = -1; /* Datatype IDs */ - hid_t tid5 = -1, tid = -1; /* Datatype IDs */ + hid_t tid5 = -1, tid = -1; /* Datatype IDs */ hid_t sid = -1; /* Dataspace ID */ - hid_t aid = -1; /* Attribute ID */ + hid_t aid = -1; /* Attribute ID */ hid_t ocpypl_id = -1; /* Object copy plist ID */ - hsize_t dim1d[1]; /* dimension sizes */ + hsize_t dim1d[1]; /* dimension sizes */ H5O_info_t oinfo; /* Object info */ - haddr_t exp_addr; /* Expected object addresses */ - char src_filename[NAME_BUF_SIZE]; /* Source file name */ - char dst_filename[NAME_BUF_SIZE]; /* Destination file name */ + haddr_t exp_addr; /* Expected object addresses */ + char src_filename[NAME_BUF_SIZE]; /* Source file name */ + char dst_filename[NAME_BUF_SIZE]; /* Destination file name */ if(reopen) TESTING("H5Ocopy(): merging various committed datatypes with reopen") @@ -11334,8 +11531,8 @@ test_copy_cdt_merge_cdt(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t ds /* Reset file address checking info */ addr_reset(); - /* - * Populate source file + /* + * Populate source file */ if((fid_src = H5Fcreate(src_filename, H5F_ACC_TRUNC, fcpl_src, src_fapl)) < 0) TEST_ERROR @@ -11385,8 +11582,8 @@ test_copy_cdt_merge_cdt(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t ds /* close the SRC file */ if(H5Fclose(fid_src) < 0) TEST_ERROR - /* - * Populate destination file + /* + * Populate destination file */ if((fid_dst = H5Fcreate(dst_filename, H5F_ACC_TRUNC, fcpl_dst, dst_fapl)) < 0) TEST_ERROR @@ -11441,8 +11638,8 @@ test_copy_cdt_merge_cdt(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t ds /* copy everything in SRC to DST */ if(H5Ocopy(fid_src, "/", fid_dst, SRC_ROOT_GROUP, ocpypl_id, H5P_DEFAULT) < 0) TEST_ERROR - /* - * Verification + /* + * Verification */ /* get address of committed datatype: /src_root/src_ndt_double */ if((tid = H5Topen2(fid_dst, "/" SRC_ROOT_GROUP "/" SRC_NDT_DOUBLE, H5P_DEFAULT)) < 0) TEST_ERROR @@ -11506,29 +11703,29 @@ test_copy_cdt_merge_cdt(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t ds error: H5E_BEGIN_TRY { - H5Pclose(ocpypl_id); - H5Tclose(tid); - H5Tclose(tid1); - H5Tclose(tid2); - H5Tclose(tid3); - H5Tclose(tid4); - H5Tclose(tid5); - H5Aclose(aid); - H5Sclose(sid); - H5Fclose(fid_dst); - H5Fclose(fid_src); + H5Pclose(ocpypl_id); + H5Tclose(tid); + H5Tclose(tid1); + H5Tclose(tid2); + H5Tclose(tid3); + H5Tclose(tid4); + H5Tclose(tid5); + H5Aclose(aid); + H5Sclose(sid); + H5Fclose(fid_dst); + H5Fclose(fid_src); } H5E_END_TRY; return 1; } /* end test_copy_cdt_merge_cdt */ - + /*------------------------------------------------------------------------- * Function: test_copy_cdt_merge_suggs * * Purpose: Tests the suggested searching paths feature (H5Padd_merge_committed_dtype_path) - * is correctly applied in merging the committed datatypes. - * + * is correctly applied in merging the committed datatypes. + * * Return: Success: 0 * Failure: number of errors * @@ -11597,7 +11794,7 @@ test_copy_cdt_merge_suggs(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, if(H5Fclose(fid_dst) < 0) TEST_ERROR /* - * Test 1 + * Test 1 */ /* open the source file with read-only */ if((fid_src = H5Fopen(src_filename, H5F_ACC_RDONLY, src_fapl)) < 0) TEST_ERROR @@ -11633,8 +11830,8 @@ test_copy_cdt_merge_suggs(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, /* close the DST file */ if(H5Fclose(fid_dst) < 0) TEST_ERROR - /* - * Test 2 + /* + * Test 2 */ /* open destination file */ if((fid_dst = H5Fopen(dst_filename, H5F_ACC_RDWR, dst_fapl)) < 0) TEST_ERROR @@ -11666,14 +11863,14 @@ test_copy_cdt_merge_suggs(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, /* close the DST file */ if(H5Fclose(fid_dst) < 0) TEST_ERROR - /* - * Test 3 + /* + * Test 3 */ /* open destination file */ if((fid_dst = H5Fopen(dst_filename, H5F_ACC_RDWR, dst_fapl)) < 0) TEST_ERROR /* remove "/uncopied/src_ndt_int" from DST file */ - if(H5Ldelete(fid_dst, NAME_GROUP_UNCOPIED "/" SRC_NDT_INT, H5P_DEFAULT) < 0) TEST_ERROR + if(H5Ldelete(fid_dst, NAME_GROUP_UNCOPIED "/" SRC_NDT_INT, H5P_DEFAULT) < 0) TEST_ERROR /* copy "/src_ndt_int" from SRC file to "/uncopied/src_ndt_int" at DST file */ /* use default ocpypl_id -- without merging and suggestion */ @@ -11682,7 +11879,7 @@ test_copy_cdt_merge_suggs(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, /* copy "/src_ndt_int" from SRC file to "/src_ndt_int2" at DST file */ /* copy with merging and search suggestion: "/uncopied/src_ndt_int" */ if(H5Ocopy(fid_src, SRC_NDT_INT, fid_dst, SRC_NDT_INT2, ocpypl_id, H5P_DEFAULT) < 0) TEST_ERROR - + if(reopen) { /* Reopen file */ if(H5Fclose(fid_dst) < 0) TEST_ERROR @@ -11704,8 +11901,8 @@ test_copy_cdt_merge_suggs(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, /* close the DST file */ if(H5Fclose(fid_dst) < 0) TEST_ERROR - /* - * Test 4 + /* + * Test 4 */ /* open destination file */ if((fid_dst = H5Fopen(dst_filename, H5F_ACC_RDWR, dst_fapl)) < 0) TEST_ERROR @@ -11757,13 +11954,13 @@ error: return 1; } /* end test_copy_cdt_merge_suggs */ - + /*------------------------------------------------------------------------- * Function: test_copy_cdt_merge_dset_suggs * * Purpose: Tests the suggested searching paths feature (H5Padd_merge_committed_dtype_path) - * is correctly applied in merging the committed datatypes of datasets. - * + * is correctly applied in merging the committed datatypes of datasets. + * * Return: Success: 0 * Failure: number of errors * @@ -11858,7 +12055,7 @@ test_copy_cdt_merge_dset_suggs(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, if(H5Sclose(sid) < 0) TEST_ERROR /* - * Test 1 + * Test 1 */ /* open the source file with read-only */ if((fid_src = H5Fopen(src_filename, H5F_ACC_RDONLY, src_fapl)) < 0) TEST_ERROR @@ -11896,8 +12093,8 @@ test_copy_cdt_merge_dset_suggs(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, /* close the DST file */ if(H5Fclose(fid_dst) < 0) TEST_ERROR - /* - * Test 2 + /* + * Test 2 */ /* open destination file */ if((fid_dst = H5Fopen(dst_filename, H5F_ACC_RDWR, dst_fapl)) < 0) TEST_ERROR @@ -11933,14 +12130,14 @@ test_copy_cdt_merge_dset_suggs(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, /* close the DST file */ if(H5Fclose(fid_dst) < 0) TEST_ERROR - /* - * Test 3 + /* + * Test 3 */ /* open destination file */ if((fid_dst = H5Fopen(dst_filename, H5F_ACC_RDWR, dst_fapl)) < 0) TEST_ERROR /* remove "/uncopied/src_ndt_dset" */ - if(H5Ldelete(fid_dst, NAME_GROUP_UNCOPIED "/" SRC_NDT_DSET, H5P_DEFAULT) < 0) TEST_ERROR + if(H5Ldelete(fid_dst, NAME_GROUP_UNCOPIED "/" SRC_NDT_DSET, H5P_DEFAULT) < 0) TEST_ERROR /* copy "src_ndt_dset" from SRC file to "/uncopied/src_ndt_dset" at DST file */ /* use default ocpypl_id -- without merging and suggestion */ @@ -11949,7 +12146,7 @@ test_copy_cdt_merge_dset_suggs(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, /* copy "src_ndt_dset" from SRC file to "/src_ndt_dset2" at DST file */ /* use merging and suggested searching path: "/uncopied/src_ndt_dset" */ if(H5Ocopy(fid_src, SRC_NDT_DSET, fid_dst, SRC_NDT_DSET2, ocpypl_id, H5P_DEFAULT) < 0) TEST_ERROR - + if(reopen) { /* Reopen file */ if(H5Fclose(fid_dst) < 0) TEST_ERROR @@ -11975,8 +12172,8 @@ test_copy_cdt_merge_dset_suggs(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, /* close the DST file */ if(H5Fclose(fid_dst) < 0) TEST_ERROR - /* - * Test 4 + /* + * Test 4 */ /* open destination file */ if((fid_dst = H5Fopen(dst_filename, H5F_ACC_RDWR, dst_fapl)) < 0) TEST_ERROR @@ -12034,12 +12231,12 @@ error: return 1; } /* end test_copy_cdt_merge_dset_suggs */ - + /*------------------------------------------------------------------------- * Function: test_copy_cdt_merge_all_suggs * * Purpose: Tests the merging committed datatype + search suggestion feature. - * + * * Return: Success: 0 * Failure: number of errors * @@ -12058,8 +12255,8 @@ test_copy_cdt_merge_all_suggs(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t aid = -1; /* Attribute ID */ hid_t did = -1; /* Dataset ID */ hid_t exp_did = -1; /* Dataset ID */ - hid_t tid_short = -1; /* Datatype ID */ - hid_t exp_tid = -1; /* Expected datatype ID */ + hid_t tid_short = -1; /* Datatype ID */ + hid_t exp_tid = -1; /* Expected datatype ID */ hid_t ocpypl_id = -1; /* Object copy plist ID */ hsize_t dim1d[1]; /* Dataset dimensions */ char src_filename[NAME_BUF_SIZE]; @@ -12115,7 +12312,7 @@ test_copy_cdt_merge_all_suggs(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, /* create third dataset in group */ if((did = H5Dcreate2(gid, SRC_DSET, H5T_NATIVE_INT, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) TEST_ERROR - + /* get datatype */ if((tid_short = H5Topen2(fid_src, "/" SRC_GRP "/" SRC_NDT_SHORT, H5P_DEFAULT)) < 0) TEST_ERROR @@ -12244,7 +12441,7 @@ test_copy_cdt_merge_all_suggs(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, /* close the DST file */ if(H5Fclose(fid_dst) < 0) TEST_ERROR - /* + /* * Test 1 */ /* open the source file with read-only */ @@ -12285,7 +12482,7 @@ test_copy_cdt_merge_all_suggs(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, if(H5Fclose(fid_dst) < 0) TEST_ERROR - /* + /* * Test 2 */ if((fid_dst = H5Fopen(dst_filename, H5F_ACC_RDWR, dst_fapl)) < 0) TEST_ERROR @@ -12322,7 +12519,7 @@ test_copy_cdt_merge_all_suggs(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, /* close the DST file */ if(H5Fclose(fid_dst) < 0) TEST_ERROR - /* + /* * Test 3 */ if((fid_dst = H5Fopen(dst_filename, H5F_ACC_RDWR, dst_fapl)) < 0) TEST_ERROR @@ -12357,7 +12554,7 @@ test_copy_cdt_merge_all_suggs(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, /* close the DST file */ if(H5Fclose(fid_dst) < 0) TEST_ERROR - /* + /* * Test 4 */ if((fid_dst = H5Fopen(dst_filename, H5F_ACC_RDWR, dst_fapl)) < 0) TEST_ERROR @@ -12410,7 +12607,7 @@ test_copy_cdt_merge_all_suggs(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, /* close the DST file */ if(H5Fclose(fid_dst) < 0) TEST_ERROR - /* + /* * Test 5 */ /* open destination file */ @@ -12448,7 +12645,7 @@ test_copy_cdt_merge_all_suggs(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, /* close the DST file */ if(H5Fclose(fid_dst) < 0) TEST_ERROR - /* + /* * Test 6 */ /* open destination file */ @@ -12509,7 +12706,7 @@ error: return 1; } /* end test_copy_cdt_merge_all_suggs */ - + /*------------------------------------------------------------------------- * Function: test_copy_set_mcdt_search_cb * @@ -12694,7 +12891,7 @@ test_copy_set_mcdt_search_cb(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, /* Continue the global search */ if(H5Pset_mcdt_search_cb(ocpypl_id, mcdt_search_cb, &cb_udata) < 0) - TEST_ERROR + TEST_ERROR /* open destination file */ if((fid_dst = H5Fopen(dst_filename, H5F_ACC_RDWR, dst_fapl)) < 0) TEST_ERROR @@ -12729,7 +12926,7 @@ test_copy_set_mcdt_search_cb(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, if(H5Fclose(fid_dst) < 0) TEST_ERROR - /* + /* * Stop the search, default action is to create an anonymous committed datatype */ cb_udata.search_action = H5O_MCDT_SEARCH_STOP; @@ -12865,7 +13062,7 @@ error: return 1; } /* end test_copy_set_mcdt_search_cb */ - + /*------------------------------------------------------------------------- * Function: test_copy_set_get_mcdt_cb * @@ -12911,10 +13108,10 @@ test_copy_set_get_mcdt_search_cb(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, int buf[DIM_SIZE_1]; /* Buffer for writing data */ char src_filename[NAME_BUF_SIZE]; char dst_filename[NAME_BUF_SIZE]; - H5O_mcdt_search_cb_t mcdt_cb = NULL; /* The callback function */ - H5O_mcdt_search_ret_t mcdt_udataA; /* User data for callback */ - H5O_mcdt_search_ret_t mcdt_udataB; /* User data for callback */ - H5O_mcdt_search_ret_t *mcdt_udata_p = NULL; /* Pointer to user data for callback */ + H5O_mcdt_search_cb_t mcdt_cb = NULL; /* The callback function */ + H5O_mcdt_search_ret_t mcdt_udataA; /* User data for callback */ + H5O_mcdt_search_ret_t mcdt_udataB; /* User data for callback */ + H5O_mcdt_search_ret_t *mcdt_udata_p = NULL; /* Pointer to user data for callback */ if(reopen) TESTING("H5Ocopy(): H5Pset/get_mcdt_search_cb and reopen") @@ -13044,7 +13241,7 @@ test_copy_set_get_mcdt_search_cb(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, /* Continue the global search */ if(H5Pset_mcdt_search_cb(ocpypl_id, mcdt_search_cbA, &mcdt_udataA) < 0) - TEST_ERROR + TEST_ERROR /* open the destination file */ if((fid_dst = H5Fopen(dst_filename, H5F_ACC_RDWR, dst_fapl)) < 0) TEST_ERROR @@ -13077,7 +13274,7 @@ test_copy_set_get_mcdt_search_cb(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, mcdt_udataB = H5O_MCDT_SEARCH_STOP; if(H5Pset_mcdt_search_cb(ocpypl_id, mcdt_search_cbA, &mcdt_udataB) < 0) - TEST_ERROR + TEST_ERROR /* open destination file */ if((fid_dst = H5Fopen(dst_filename, H5F_ACC_RDWR, dst_fapl)) < 0) TEST_ERROR @@ -13107,7 +13304,7 @@ test_copy_set_get_mcdt_search_cb(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, if(H5Pfree_merge_committed_dtype_paths(ocpypl_id) < 0) TEST_ERROR if(H5Pset_mcdt_search_cb(ocpypl_id, mcdt_search_cbB, &mcdt_udataB) < 0) - TEST_ERROR + TEST_ERROR /* open destination file */ if((fid_dst = H5Fopen(dst_filename, H5F_ACC_RDWR, dst_fapl)) < 0) TEST_ERROR @@ -13160,7 +13357,7 @@ error: return 1; } /* end test_copy_set_get_mcdt_search_cb */ - + /*------------------------------------------------------------------------- * Function: test_copy_iterate * @@ -13258,7 +13455,7 @@ error: return 1; } /* end test_copy_iterate */ - + /*------------------------------------------------------------------------- * Function: test_copy_option * @@ -13283,7 +13480,7 @@ test_copy_option(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t dst_fapl, hid_t did = -1; /* Dataset ID */ hid_t gid=-1, gid2=-1, gid_ref=-1; /* Group IDs */ hid_t gid_sub=-1, gid_sub_sub=-1; /* Sub-group ID */ - hid_t pid=-1, lcpl_id=-1; /* Property IDs */ + hid_t pid=-1, lcpl_id=-1; /* Property IDs */ unsigned cpy_flags; /* Object copy flags */ int depth = -1; /* Copy depth */ hsize_t dim2d[2]; @@ -13536,51 +13733,51 @@ error: H5E_BEGIN_TRY { H5Pclose(lcpl_id); H5Pclose(pid); - H5Sclose(sid); - H5Dclose(did); - H5Gclose(gid_ref); - H5Gclose(gid_sub); - H5Gclose(gid2); - H5Gclose(gid); - H5Fclose(fid_dst); - H5Fclose(fid_src); - H5Fclose(fid_ext); + H5Sclose(sid); + H5Dclose(did); + H5Gclose(gid_ref); + H5Gclose(gid_sub); + H5Gclose(gid2); + H5Gclose(gid); + H5Fclose(fid_dst); + H5Fclose(fid_src); + H5Fclose(fid_ext); } H5E_END_TRY; return 1; } /* end test_copy_option */ - + /*------------------------------------------------------------------------- * Function: test_copy_dataset_open * * Purpose: To ensure that H5Ocopy() copies data of opened dataset correctly. - * This is for bug fix HDFFV-7853. - * - * Test Case 1: - * Create a dataset with attributes in SRC file - * Copy the opened dataset to another location in the same file - * Copy the opened dataset to DST file - * Close the dataset - * - * Test Case 2: - * Reopen the dataset, write new data to the dataset - * Copy the opened dataset to another location in the same file - * Copy the opened dataset to to DST file - * Close the dataset - * - * Test Case 3: - * Create a committed datatype - * Create a dataset with the committed datatype in SRC file - * Open the committed datatype - * Copy the opened dataset (with the opened committed datatype) to another location in the same file - * Copy the opened dataset (with the opened committed datatype) to DST file - * Close the dataset and the committed datatype - * - * Test Case 4: - * Create a group with attributes, create a dataset in the group - * Copy the opened group (together with the opened dataset) to another location in the same file - * Copy the opened group (together with the opened dataset) to DST file - * Close the group and the dataset + * This is for bug fix HDFFV-7853. + * + * Test Case 1: + * Create a dataset with attributes in SRC file + * Copy the opened dataset to another location in the same file + * Copy the opened dataset to DST file + * Close the dataset + * + * Test Case 2: + * Reopen the dataset, write new data to the dataset + * Copy the opened dataset to another location in the same file + * Copy the opened dataset to to DST file + * Close the dataset + * + * Test Case 3: + * Create a committed datatype + * Create a dataset with the committed datatype in SRC file + * Open the committed datatype + * Copy the opened dataset (with the opened committed datatype) to another location in the same file + * Copy the opened dataset (with the opened committed datatype) to DST file + * Close the dataset and the committed datatype + * + * Test Case 4: + * Create a group with attributes, create a dataset in the group + * Copy the opened group (together with the opened dataset) to another location in the same file + * Copy the opened group (together with the opened dataset) to DST file + * Close the group and the dataset * * Return: Success: 0 * Failure: number of errors @@ -13658,16 +13855,16 @@ test_copy_dataset_open(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t dst /* write data to the dataset */ if(H5Dwrite(did, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf) < 0) TEST_ERROR if(H5Dwrite(did2, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf) < 0) TEST_ERROR - + /* attach attributes to the dataset */ if(test_copy_attach_attributes(did, H5T_NATIVE_INT) < 0) TEST_ERROR if(test_copy_attach_attributes(did2, H5T_NATIVE_INT) < 0) TEST_ERROR - /* - * Test case 1 + /* + * Test case 1 */ - /* + /* * Copy within the same file */ /* copy the opened dataset to another location in SRC file */ @@ -13686,7 +13883,7 @@ test_copy_dataset_open(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t dst if(H5Dclose(did3) < 0) TEST_ERROR if(H5Dclose(did4) < 0) TEST_ERROR - /* + /* * Copy to another file */ /* copy the opened dataset from SRC to DST */ @@ -13709,8 +13906,8 @@ test_copy_dataset_open(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t dst if(H5Dclose(did) < 0) TEST_ERROR if(H5Dclose(did2) < 0) TEST_ERROR - /* - * Test case 2 + /* + * Test case 2 */ /* reopen the dataset in SRC file */ if((did = H5Dopen2(fid_src, NAME_DATASET_SIMPLE, H5P_DEFAULT)) < 0) TEST_ERROR @@ -13720,7 +13917,7 @@ test_copy_dataset_open(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t dst if(H5Dwrite(did, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, newbuf) < 0) TEST_ERROR if(H5Dwrite(did2, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, newbuf) < 0) TEST_ERROR - /* + /* * Copy within the same file */ /* copy the opened dataset to another location in SRC file */ @@ -13738,7 +13935,7 @@ test_copy_dataset_open(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t dst /* close the copied dataset in SRC file */ if(H5Dclose(did3) < 0) TEST_ERROR if(H5Dclose(did4) < 0) TEST_ERROR - /* + /* * Copy to another file */ /* copy the opened dataset from SRC to DST */ @@ -13761,8 +13958,8 @@ test_copy_dataset_open(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t dst if(H5Dclose(did) < 0) TEST_ERROR if(H5Dclose(did2) < 0) TEST_ERROR - /* - * Test case 3 + /* + * Test case 3 */ /* make a copy of the datatype */ @@ -13783,7 +13980,7 @@ test_copy_dataset_open(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t dst /* write data to the dataset */ if(H5Dwrite(did, tid, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf) < 0) TEST_ERROR - /* + /* * Copy within the same file */ /* copy the opened dataset (with the opened committed datatype) to another location in SRC file */ @@ -13798,7 +13995,7 @@ test_copy_dataset_open(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t dst /* close the copied dataset in SRC file */ if(H5Dclose(did2) < 0) TEST_ERROR - /* + /* * Copy to another file */ /* copy the opened dataset (with the opened committed datatype) from SRC to DST */ @@ -13819,8 +14016,8 @@ test_copy_dataset_open(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t dst /* close the committed datatype at SRC file */ if(H5Tclose(tid) < 0) TEST_ERROR - /* - * Test case 4 + /* + * Test case 4 */ /* create a group in SRC file */ if((gid = H5Gcreate2(fid_src, NAME_GROUP_TOP, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) TEST_ERROR @@ -13833,7 +14030,7 @@ test_copy_dataset_open(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t dst /* write data to the dataset */ if(H5Dwrite(did, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf) < 0) TEST_ERROR - /* + /* * Copy within the same file */ /* copy the opened group (together with opened dataset) to another location in SRC file */ @@ -13848,7 +14045,7 @@ test_copy_dataset_open(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t dst /* close the DST dataset */ if(H5Gclose(gid2) < 0) TEST_ERROR - /* + /* * Copy to another file */ /* copy the opened group (together with opened dataset) to DST file */ @@ -13883,20 +14080,20 @@ test_copy_dataset_open(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t dst error: H5E_BEGIN_TRY { - H5Dclose(did); - H5Dclose(did2); - H5Sclose(sid); - H5Gclose(gid); - H5Gclose(gid2); - H5Fclose(fid_dst); - H5Fclose(fid_src); + H5Dclose(did); + H5Dclose(did2); + H5Sclose(sid); + H5Gclose(gid); + H5Gclose(gid2); + H5Fclose(fid_dst); + H5Fclose(fid_src); } H5E_END_TRY; return 1; } /* end test_copy_dataset_open */ - + /*------------------------------------------------------------------------- - * Function: main + * Function: main * * Purpose: Test H5Ocopy() * @@ -13917,11 +14114,11 @@ int main(void) { int nerrors = 0; - hid_t fapl, fapl2; + hid_t fapl, fapl2; hid_t fcpl_shared, ocpl; unsigned max_compact, min_dense; int configuration; /* Configuration of tests. */ - int ExpressMode; + int ExpressMode; hbool_t same_file; /* Whether to run tests that only use one file */ /* Setup */ @@ -13999,7 +14196,7 @@ main(void) } } /* end if */ else { - puts("Testing with oldest file format for source file:"); + puts("Testing with oldest file format for source file:"); src_fapl = fapl; num_attributes_g = 4; } /* end else */ @@ -14017,6 +14214,7 @@ main(void) /* The tests... */ nerrors += test_copy_dataset_simple(fcpl_src, fcpl_dst, src_fapl, dst_fapl); + nerrors += test_copy_dataset_versionbounds(fcpl_src, src_fapl); nerrors += test_copy_dataset_simple_samefile(fcpl_src, src_fapl); /* Test with dataset opened in the file or not */ diff --git a/test/ohdr.c b/test/ohdr.c index 3915b38..e886bf9 100644 --- a/test/ohdr.c +++ b/test/ohdr.c @@ -738,49 +738,100 @@ error: return FAIL; } /* test_unknown() */ +#define STR_EARLIEST "earliest" +#define STR_V18 "v18" +#define STR_LATEST "latest" +char *version_string(H5F_libver_t libver) +{ + char *str = NULL; + + str = (char *) HDmalloc(20); + if (str == NULL) + { + fprintf(stderr, "Allocation failed\n"); + exit(1); + } + + switch(libver) { + case H5F_LIBVER_EARLIEST: + strcpy(str, STR_EARLIEST); + break; + + case H5F_LIBVER_V18: + strcpy(str, STR_V18); + break; + + case H5F_LIBVER_V110: + HDassert(H5F_LIBVER_LATEST == H5F_LIBVER_V110); + strcpy(str, STR_LATEST); + break; + + case H5F_LIBVER_ERROR: + case H5F_LIBVER_NBOUNDS: + default: + sprintf(str, "%ld", (long)libver); + break; + } /* end switch */ + + /* Return the formed version bound string */ + return(str); +} /* end of version_string */ + /*------------------------------------------------------------------------- * Function: main * * Purpose: Exercise private object header behavior and routines * - * Return: Success: 0 - * Failure: 1 + * Return: Success: 0 + * Failure: 1 * * Programmer: Robb Matzke * Tuesday, November 24, 1998 * + * Modification: + * - Added loop of combinations of low/high library format bounds + * (BMR, Feb 2018) + * *------------------------------------------------------------------------- */ int main(void) { - hid_t fapl = -1, file = -1; - H5F_t *f = NULL; - char filename[1024]; - H5O_hdr_info_t hdr_info; /* Object info */ - H5O_loc_t oh_loc; /* Object header locations */ - time_t time_new, ro; - int i; /* Local index variable */ - unsigned b; /* Index for "new format" loop */ - herr_t ret; /* Generic return value */ + hid_t fapl = -1; + hid_t file = -1; + H5F_t *f = NULL; + char filename[1024]; + H5O_hdr_info_t hdr_info; /* Object info */ + H5O_loc_t oh_loc; /* Object header locations */ + H5F_libver_t low, high; /* File format bounds */ + time_t time_new, ro; + unsigned b; /* Index for "new format" loop */ + char msg[80]; /* Message for file format version */ + int i; /* Local index variable */ + herr_t ret; /* Generic return value */ /* Reset library */ h5_reset(); fapl = h5_fileaccess(); h5_fixname(FILENAME[0], fapl, filename, sizeof filename); - /* Loop over old & new formats */ - for(b = FALSE; b <= TRUE; b++) { - /* Display info about testing */ - if(b) - HDputs("Using new file format:"); - else - HDputs("Using default file format:"); + /* Loop through all the combinations of low/high library format bounds */ + for(low = H5F_LIBVER_EARLIEST; low < H5F_LIBVER_NBOUNDS; low++) { + for(high = H5F_LIBVER_EARLIEST; high < H5F_LIBVER_NBOUNDS; high++) { - /* Set the format to use for the file */ - if(H5Pset_libver_bounds(fapl, (b ? H5F_LIBVER_LATEST : H5F_LIBVER_EARLIEST), H5F_LIBVER_LATEST) < 0) - FAIL_STACK_ERROR + /* Set version bounds before opening the file */ + H5E_BEGIN_TRY { + ret = H5Pset_libver_bounds(fapl, low, high); + } H5E_END_TRY; + + if (ret < 0) /* Invalid low/high combinations */ + continue; + + /* Display info about testing */ + sprintf(msg, "Using file format version: (%s, %s)", version_string(low), + version_string(high)); + HDputs(msg); /* test on object continuation block */ if(test_cont(filename, fapl) < 0) @@ -977,7 +1028,9 @@ main(void) /* Test object header creation metadata cache issues */ if(test_ohdr_cache(filename, fapl) < 0) TEST_ERROR - } /* end for */ + + } /* high */ + } /* low */ /* Verify symbol table messages are cached */ if(h5_verify_cached_stabs(FILENAME, fapl) < 0) TEST_ERROR diff --git a/test/set_extent.c b/test/set_extent.c index b9536e5..5d11819 100644 --- a/test/set_extent.c +++ b/test/set_extent.c @@ -427,20 +427,50 @@ error: */ static int do_layouts( hid_t fapl ) { + hid_t new_fapl = -1; + H5F_libver_t low, high; /* Low and high bounds */ + herr_t ret; /* Generic return value */ - TESTING("storage layout use"); + TESTING("storage layout use - tested with all low/high library format bounds"); + /* Loop through all the combinations of low/high library format bounds */ + for(low = H5F_LIBVER_EARLIEST; low < H5F_LIBVER_NBOUNDS; low++) { + for(high = H5F_LIBVER_EARLIEST; high < H5F_LIBVER_NBOUNDS; high++) { - if (test_layouts( H5D_COMPACT, fapl ) < 0) - goto error; + /* Copy plist to use locally to avoid modifying the original */ + new_fapl = H5Pcopy(fapl); - if (test_layouts( H5D_CONTIGUOUS, fapl ) < 0) - goto error; + /* Set version bounds */ + H5E_BEGIN_TRY { + ret = H5Pset_libver_bounds(new_fapl, low, high); + } H5E_END_TRY; + + if (ret < 0) /* Invalid low/high combinations */ + { + if (H5Pclose(new_fapl) < 0) + goto error; + continue; + } + + if (test_layouts( H5D_COMPACT, new_fapl ) < 0) + goto error; + + if (test_layouts( H5D_CONTIGUOUS, new_fapl ) < 0) + goto error; + + if (H5Pclose(new_fapl) < 0) + goto error; + } /* end for high */ + } /* end for low */ PASSED(); return 0; error: + H5E_BEGIN_TRY + { + H5Pclose(new_fapl); + } H5E_END_TRY; return -1; } diff --git a/test/tarray.c b/test/tarray.c index 3ce0f6a..99f7bf8 100644 --- a/test/tarray.c +++ b/test/tarray.c @@ -13,7 +13,7 @@ /*********************************************************** * -* Test program: tarray +* Test program: tarray * * Test the Array Datatype functionality * @@ -26,7 +26,7 @@ #define TESTFILE "tarrold.h5" /* 1-D array datatype */ -#define ARRAY1_RANK 1 +#define ARRAY1_RANK 1 #define ARRAY1_DIM1 4 /* 3-D array datatype */ @@ -65,7 +65,7 @@ typedef struct void *test_array_alloc_custom(size_t size, void *info); void test_array_free_custom(void *mem, void *info); - + /*------------------------------------------------------------------------- * Function: test_array_atomic_1d * @@ -189,7 +189,7 @@ test_array_atomic_1d(void) CHECK(ret, FAIL, "H5Fclose"); } /* end test_array_atomic_1d() */ - + /*------------------------------------------------------------------------- * Function: test_array_funcs * @@ -252,7 +252,7 @@ test_array_funcs(void) CHECK(ret, FAIL, "H5Tclose"); } /* end test_array_funcs() */ - + /*------------------------------------------------------------------------- * Function: test_array_atomic_3d * @@ -381,7 +381,7 @@ test_array_atomic_3d(void) } /* end test_array_atomic_3d() */ - + /*------------------------------------------------------------------------- * Function: test_array_array_atomic * @@ -540,7 +540,7 @@ test_array_array_atomic(void) CHECK(ret, FAIL, "H5Fclose"); } /* end test_array_array_atomic() */ - + /*------------------------------------------------------------------------- * Function: test_array_compound_atomic * @@ -747,7 +747,7 @@ test_array_compound_atomic(void) CHECK(ret, FAIL, "H5Fclose"); } /* end test_array_compound_atomic() */ - + /*------------------------------------------------------------------------- * Function: test_array_compound_array * @@ -1006,7 +1006,7 @@ test_array_compound_array(void) ** allocated. ** ****************************************************************/ - + /*------------------------------------------------------------------------- * Function: test_array_alloc_custom * @@ -1045,7 +1045,7 @@ test_array_alloc_custom(size_t size, void *info) return ret_value; } /* end test_array_alloc_custom() */ - + /*------------------------------------------------------------------------- * Function: test_array_free_custom * @@ -1081,7 +1081,7 @@ test_array_free_custom(void *_mem, void *info) return; } /* end test_array_free_custom() */ - + /*------------------------------------------------------------------------- * Function: test_array_vlen_atomic * @@ -1296,7 +1296,7 @@ test_array_vlen_atomic(void) } /* end test_array_vlen_atomic() */ - + /*------------------------------------------------------------------------- * Function: test_array_vlen_array * @@ -1551,7 +1551,7 @@ test_array_vlen_array(void) } /* end test_array_vlen_array() */ - + /*------------------------------------------------------------------------- * Function: test_array_bkg * @@ -1580,9 +1580,9 @@ test_array_bkg(void) unsigned ndims[3] = {1,1,1}; typedef struct { - int a[ALEN]; - float b[ALEN]; - double c[ALEN]; + int a[ALEN]; + float b[ALEN]; + double c[ALEN]; } CmpField; CmpField cf[LENGTH]; @@ -1855,7 +1855,7 @@ test_array_bkg(void) HDfree(dtsinfo); } /* end test_array_bkg() */ - + /*------------------------------------------------------------------------- * Function: test_compat * @@ -2150,7 +2150,7 @@ test_compat(void) } /* end test_compat() */ - + /*------------------------------------------------------------------------- * Function: test_array * @@ -2183,7 +2183,7 @@ test_array(void) } /* end test_array() */ - + /*------------------------------------------------------------------------- * Function: cleanup_array * diff --git a/test/tattr.c b/test/tattr.c index 57b0e64..525898d 100644 --- a/test/tattr.c +++ b/test/tattr.c @@ -151,7 +151,7 @@ static herr_t attr_op1(hid_t loc_id, const char *name, const H5A_info_t *ainfo, void *op_data); - + /**************************************************************** ** ** test_attr_basic_write(): Test basic H5A (attribute) code. @@ -391,7 +391,7 @@ test_attr_basic_write(hid_t fapl) CHECK(ret, FAIL, "H5Fclose"); } /* test_attr_basic_write() */ - + /**************************************************************** ** ** test_attr_basic_read(): Test basic H5A (attribute) code. @@ -482,7 +482,7 @@ test_attr_basic_read(hid_t fapl) CHECK(ret, FAIL, "H5Fclose"); } /* test_attr_basic_read() */ - + /**************************************************************** ** ** test_attr_flush(): Test H5A (attribute) code for performing @@ -549,7 +549,7 @@ test_attr_flush(hid_t fapl) CHECK(ret, FAIL, "H5Fclose"); } /* test_attr_flush() */ - + /**************************************************************** ** ** test_attr_plist(): Test Attribute Creation Property Lists @@ -662,7 +662,7 @@ test_attr_plist(hid_t fapl) CHECK(ret, FAIL, "H5Fclose"); } /* test_attr_plist() */ - + /**************************************************************** ** ** test_attr_compound_write(): Test H5A (attribute) code. @@ -751,7 +751,7 @@ test_attr_compound_write(hid_t fapl) CHECK(ret, FAIL, "H5Fclose"); } /* test_attr_compound_write() */ - + /**************************************************************** ** ** test_attr_compound_read(): Test basic H5A (attribute) code. @@ -901,7 +901,7 @@ test_attr_compound_read(hid_t fapl) CHECK(ret, FAIL, "H5Fclose"); } /* test_attr_compound_read() */ - + /**************************************************************** ** ** test_attr_scalar_write(): Test scalar H5A (attribute) writing code. @@ -967,7 +967,7 @@ test_attr_scalar_write(hid_t fapl) CHECK(ret, FAIL, "H5Fclose"); } /* test_attr_scalar_write() */ - + /**************************************************************** ** ** test_attr_scalar_read(): Test scalar H5A (attribute) reading code. @@ -1038,7 +1038,7 @@ test_attr_scalar_read(hid_t fapl) CHECK(ret, FAIL, "H5Fclose"); } /* test_attr_scalar_read() */ - + /**************************************************************** ** ** test_attr_mult_write(): Test basic H5A (attribute) code. @@ -1159,7 +1159,7 @@ test_attr_mult_write(hid_t fapl) CHECK(ret, FAIL, "H5Fclose"); } /* test_attr_mult_write() */ - + /**************************************************************** ** ** test_attr_mult_read(): Test basic H5A (attribute) code. @@ -1381,7 +1381,7 @@ test_attr_mult_read(hid_t fapl) CHECK(ret, FAIL, "H5Fclose"); } /* test_attr_mult_read() */ - + /**************************************************************** ** ** attr_op1(): Attribute operator @@ -1421,7 +1421,7 @@ attr_op1(hid_t H5_ATTR_UNUSED loc_id, const char *name, const H5A_info_t H5_ATTR return(ret); } /* end attr_op1() */ - + /**************************************************************** ** ** test_attr_iterate(): Test H5A (attribute) iterator code. @@ -1493,7 +1493,7 @@ test_attr_iterate(hid_t fapl) CHECK(ret, FAIL, "H5Fclose"); } /* test_attr_iterate() */ - + /**************************************************************** ** ** test_attr_delete(): Test H5A (attribute) code for deleting objects. @@ -1613,7 +1613,7 @@ test_attr_delete(hid_t fapl) CHECK(ret, FAIL, "H5Fclose"); } /* test_attr_delete() */ - + /**************************************************************** ** ** test_attr_dtype_shared(): Test H5A (attribute) code for using @@ -1790,7 +1790,7 @@ test_attr_dtype_shared(hid_t fapl) VERIFY(filesize, empty_filesize, "h5_get_file_size"); } /* test_attr_dtype_shared() */ - + /**************************************************************** ** ** test_attr_duplicate_ids(): Test operations with more than @@ -2035,7 +2035,7 @@ test_attr_duplicate_ids(hid_t fapl) CHECK(ret, FAIL, "H5Fclose"); } /* test_attr_duplicate_ids() */ - + /**************************************************************** ** ** test_attr_dense_verify(): Test basic H5A (attribute) code. @@ -2105,7 +2105,7 @@ test_attr_dense_verify(hid_t loc_id, unsigned max_attr) return(-1); } /* test_attr_dense_verify() */ - + /**************************************************************** ** ** test_attr_dense_create(): Test basic H5A (attribute) code. @@ -2236,7 +2236,7 @@ test_attr_dense_create(hid_t fcpl, hid_t fapl) VERIFY(filesize, empty_filesize, "h5_get_file_size"); } /* test_attr_dense_create() */ - + /**************************************************************** ** ** test_attr_dense_open(): Test basic H5A (attribute) code. @@ -2375,7 +2375,7 @@ test_attr_dense_open(hid_t fcpl, hid_t fapl) VERIFY(filesize, empty_filesize, "h5_get_file_size"); } /* test_attr_dense_open() */ - + /**************************************************************** ** ** test_attr_dense_delete(): Test basic H5A (attribute) code. @@ -2553,7 +2553,7 @@ test_attr_dense_delete(hid_t fcpl, hid_t fapl) VERIFY(filesize, empty_filesize, "h5_get_file_size"); } /* test_attr_dense_delete() */ - + /**************************************************************** ** ** test_attr_dense_rename(): Test basic H5A (attribute) code. @@ -2712,7 +2712,7 @@ test_attr_dense_rename(hid_t fcpl, hid_t fapl) VERIFY(filesize, empty_filesize, "h5_get_file_size"); } /* test_attr_dense_rename() */ - + /**************************************************************** ** ** test_attr_dense_unlink(): Test basic H5A (attribute) code. @@ -2842,7 +2842,7 @@ test_attr_dense_unlink(hid_t fcpl, hid_t fapl) VERIFY(filesize, empty_filesize, "h5_get_file_size"); } /* test_attr_dense_unlink() */ - + /**************************************************************** ** ** test_attr_dense_limits(): Test basic H5A (attribute) code. @@ -3007,7 +3007,7 @@ test_attr_dense_limits(hid_t fcpl, hid_t fapl) VERIFY(filesize, empty_filesize, "h5_get_file_size"); } /* test_attr_dense_limits() */ - + /**************************************************************** ** ** test_attr_dense_dup_ids(): Test operations with multiple ID @@ -3530,7 +3530,7 @@ test_attr_dense_dup_ids(hid_t fcpl, hid_t fapl) CHECK(ret, FAIL, "H5Fclose"); } /* test_attr_dense_dup_ids() */ - + /**************************************************************** ** ** test_attr_big(): Test basic H5A (attribute) code. @@ -3800,7 +3800,7 @@ test_attr_big(hid_t fcpl, hid_t fapl) VERIFY(filesize, empty_filesize, "h5_get_file_size"); } /* test_attr_big() */ - + /**************************************************************** ** ** test_attr_null_space(): Test basic H5A (attribute) code. @@ -4018,7 +4018,7 @@ test_attr_null_space(hid_t fcpl, hid_t fapl) VERIFY(filesize, empty_filesize, "h5_get_file_size"); } /* test_attr_null_space() */ - + /**************************************************************** ** ** test_attr_deprec(): Test basic H5A (attribute) code. @@ -4127,7 +4127,7 @@ test_attr_deprec(hid_t fcpl, hid_t fapl) #endif /* H5_NO_DEPRECATED_SYMBOLS */ } /* test_attr_deprec() */ - + /**************************************************************** ** ** test_attr_many(): Test basic H5A (attribute) code. @@ -4256,7 +4256,7 @@ test_attr_many(hbool_t new_format, hid_t fcpl, hid_t fapl) CHECK(ret, FAIL, "H5Sclose"); } /* test_attr_many() */ - + /**************************************************************** ** ** test_attr_corder_create_empty(): Test basic H5A (attribute) code. @@ -4372,7 +4372,7 @@ test_attr_corder_create_basic(hid_t fcpl, hid_t fapl) CHECK(ret, FAIL, "H5Fclose"); } /* test_attr_corder_create_basic() */ - + /**************************************************************** ** ** test_attr_corder_create_compact(): Test basic H5A (attribute) code. @@ -4570,7 +4570,7 @@ test_attr_corder_create_compact(hid_t fcpl, hid_t fapl) CHECK(ret, FAIL, "H5Fclose"); } /* test_attr_corder_create_compact() */ - + /**************************************************************** ** ** test_attr_corder_create_dense(): Test basic H5A (attribute) code. @@ -4797,7 +4797,7 @@ test_attr_corder_create_dense(hid_t fcpl, hid_t fapl) CHECK(ret, FAIL, "H5Fclose"); } /* test_attr_corder_create_dense() */ - + /**************************************************************** ** ** test_attr_corder_create_reopen(): Test basic H5A (attribute) code. @@ -4905,7 +4905,7 @@ test_attr_corder_create_reopen(hid_t fcpl, hid_t fapl) CHECK(ret, FAIL, "H5Sclose"); } /* test_attr_corder_create_reopen() */ - + /**************************************************************** ** ** test_attr_corder_transition(): Test basic H5A (attribute) code. @@ -5311,7 +5311,7 @@ test_attr_corder_transition(hid_t fcpl, hid_t fapl) CHECK(ret, FAIL, "H5Sclose"); } /* test_attr_corder_transition() */ - + /**************************************************************** ** ** test_attr_corder_delete(): Test basic H5A (attribute) code. @@ -5512,7 +5512,7 @@ test_attr_corder_delete(hid_t fcpl, hid_t fapl) CHECK(ret, FAIL, "H5Sclose"); } /* test_attr_corder_delete() */ - + /*------------------------------------------------------------------------- * Function: attr_info_by_idx_check * @@ -5659,7 +5659,7 @@ attr_info_by_idx_check(hid_t obj_id, const char *attrname, hsize_t n, return(-1); } /* end attr_info_by_idx_check() */ - + /**************************************************************** ** ** test_attr_info_by_idx(): Test basic H5A (attribute) code. @@ -5869,7 +5869,7 @@ test_attr_info_by_idx(hbool_t new_format, hid_t fcpl, hid_t fapl) CHECK(ret, FAIL, "H5Sclose"); } /* test_attr_info_by_idx() */ - + /**************************************************************** ** ** test_attr_delete_by_idx(): Test basic H5A (attribute) code. @@ -6401,7 +6401,7 @@ test_attr_delete_by_idx(hbool_t new_format, hid_t fcpl, hid_t fapl) CHECK(ret, FAIL, "H5Sclose"); } /* test_attr_delete_by_idx() */ - + /**************************************************************** ** ** attr_iterate2_cb(): Revised attribute operator @@ -6475,7 +6475,7 @@ HDfprintf(stderr, "op_data->curr = %Hd\n", op_data->curr); } /* end attr_iterate2_cb() */ #ifndef H5_NO_DEPRECATED_SYMBOLS - + /**************************************************************** ** ** attr_iterate1_cb(): Attribute operator @@ -6488,7 +6488,7 @@ attr_iterate1_cb(hid_t loc_id, const char *attr_name, void *_op_data) } /* end attr_iterate1_cb() */ #endif /* H5_NO_DEPRECATED_SYMBOLS */ - + /*------------------------------------------------------------------------- * Function: attr_iterate2_fail_cb * @@ -6510,7 +6510,7 @@ attr_iterate2_fail_cb(hid_t H5_ATTR_UNUSED group_id, const char H5_ATTR_UNUSED * return(H5_ITER_ERROR); } /* end attr_iterate2_fail_cb() */ - + /*------------------------------------------------------------------------- * Function: attr_iterate_check * @@ -6810,7 +6810,7 @@ attr_iterate_check(hid_t fid, const char *dsetname, hid_t obj_id, return(-1); } /* end attr_iterate_check() */ - + /**************************************************************** ** ** test_attr_iterate2(): Test basic H5A (attribute) code. @@ -7114,7 +7114,7 @@ test_attr_iterate2(hbool_t new_format, hid_t fcpl, hid_t fapl) HDfree(visited); } /* test_attr_iterate2() */ - + /*------------------------------------------------------------------------- * Function: attr_open_by_idx_check * @@ -7174,7 +7174,7 @@ attr_open_by_idx_check(hid_t obj_id, H5_index_t idx_type, H5_iter_order_t order, return(-1); } /* end attr_open_by_idx_check() */ - + /**************************************************************** ** ** test_attr_open_by_idx(): Test basic H5A (attribute) code. @@ -7436,7 +7436,7 @@ test_attr_open_by_idx(hbool_t new_format, hid_t fcpl, hid_t fapl) CHECK(ret, FAIL, "H5Sclose"); } /* test_attr_open_by_idx() */ - + /*------------------------------------------------------------------------- * Function: attr_open_check * @@ -7522,7 +7522,7 @@ attr_open_check(hid_t fid, const char *dsetname, hid_t obj_id, return(-1); } /* end attr_open_check() */ - + /**************************************************************** ** ** test_attr_open_by_name(): Test basic H5A (attribute) code. @@ -7777,7 +7777,7 @@ test_attr_open_by_name(hbool_t new_format, hid_t fcpl, hid_t fapl) CHECK(ret, FAIL, "H5Sclose"); } /* test_attr_open_by_name() */ - + /**************************************************************** ** ** test_attr_create_by_name(): Test basic H5A (attribute) code. @@ -10864,7 +10864,7 @@ test_attr(void) CHECK(ret, FAIL, "H5Pclose"); } /* test_attr() */ - + /*------------------------------------------------------------------------- * Function: cleanup_attr * diff --git a/test/tconfig.c b/test/tconfig.c index 7fbdf36..b652ca4 100644 --- a/test/tconfig.c +++ b/test/tconfig.c @@ -39,22 +39,22 @@ /* Needs this extra step so that we can print the macro name. */ #define vrfy_macrosize(type, macro, macroname) \ if (sizeof(type) != macro) \ - TestErrPrintf("Error: sizeof(%s) is %zu but %s is %d\n", \ - #type, sizeof(type), macroname, (int)macro); + TestErrPrintf("Error: sizeof(%s) is %zu but %s is %d\n", \ + #type, sizeof(type), macroname, (int)macro); /* local routine prototypes */ void test_config_ctypes(void); void test_exit_definitions(void); - + /*------------------------------------------------------------------------- - * Function: test_configure + * Function: test_configure * - * Purpose: Main configure definitions testing routine + * Purpose: Main configure definitions testing routine * - * Return: none (error is fed back via global variable num_errs) + * Return: none (error is fed back via global variable num_errs) * - * Programmer: Albert Cheng + * Programmer: Albert Cheng * September 25, 2001 * *------------------------------------------------------------------------- @@ -68,15 +68,15 @@ test_configure(void) test_exit_definitions(); } - + /*------------------------------------------------------------------------- - * Function: cleanup_configure + * Function: cleanup_configure * - * Purpose: Cleanup temporary test files + * Purpose: Cleanup temporary test files * - * Return: none + * Return: none * - * Programmer: Albert Cheng + * Programmer: Albert Cheng * September 25, 2001 * * Modifications: @@ -89,20 +89,20 @@ cleanup_configure(void) /* no file to clean */ } - + /*------------------------------------------------------------------------- - * Function: test_config_ctypes + * Function: test_config_ctypes * - * Purpose: test C language data type sizes + * Purpose: test C language data type sizes * - * Return: none (error is fed back via global variable num_errs) + * Return: none (error is fed back via global variable num_errs) * - * Programmer: Albert Cheng + * Programmer: Albert Cheng * September 25, 2001 * * Modifications: - * Albert Cheng, 2004/10/14 - * Verified both signed and unsigned int types. + * Albert Cheng, 2004/10/14 + * Verified both signed and unsigned int types. * *------------------------------------------------------------------------- */ @@ -200,15 +200,15 @@ test_config_ctypes(void) } - + /*------------------------------------------------------------------------- - * Function: test_exit_definitions + * Function: test_exit_definitions * - * Purpose: test the exit macros values + * Purpose: test the exit macros values * - * Return: none (error is fed back via global variable num_errs) + * Return: none (error is fed back via global variable num_errs) * - * Programmer: Albert Cheng + * Programmer: Albert Cheng * October 12, 2009 * * Modifications: @@ -221,9 +221,9 @@ test_exit_definitions(void) /* Verify the EXIT_SUCCESS and EXIT_FAILURE are 0 and 1 respectively. */ /* This should be true for POSIX compliant systems. */ if (EXIT_SUCCESS != 0) \ - TestErrPrintf("Error: EXIT_SUCCESS is %d, should be %d\n", \ - EXIT_SUCCESS, 0); + TestErrPrintf("Error: EXIT_SUCCESS is %d, should be %d\n", \ + EXIT_SUCCESS, 0); if (EXIT_FAILURE != 1) \ - TestErrPrintf("Error: EXIT_FAILURE is %d, should be %d\n", \ - EXIT_FAILURE, 1); + TestErrPrintf("Error: EXIT_FAILURE is %d, should be %d\n", \ + EXIT_FAILURE, 1); } diff --git a/test/testfiles/plist_files/dapl_32be b/test/testfiles/plist_files/dapl_32be index 4dedda2..8dcf239 100644 Binary files a/test/testfiles/plist_files/dapl_32be and b/test/testfiles/plist_files/dapl_32be differ diff --git a/test/testfiles/plist_files/dapl_32le b/test/testfiles/plist_files/dapl_32le index 4dedda2..8dcf239 100644 Binary files a/test/testfiles/plist_files/dapl_32le and b/test/testfiles/plist_files/dapl_32le differ diff --git a/test/testfiles/plist_files/dapl_64be b/test/testfiles/plist_files/dapl_64be index 4dedda2..8dcf239 100644 Binary files a/test/testfiles/plist_files/dapl_64be and b/test/testfiles/plist_files/dapl_64be differ diff --git a/test/testfiles/plist_files/dapl_64le b/test/testfiles/plist_files/dapl_64le index 4dedda2..8dcf239 100644 Binary files a/test/testfiles/plist_files/dapl_64le and b/test/testfiles/plist_files/dapl_64le differ diff --git a/test/testfiles/plist_files/def_dapl_32be b/test/testfiles/plist_files/def_dapl_32be index 3df7289..880eae5 100644 Binary files a/test/testfiles/plist_files/def_dapl_32be and b/test/testfiles/plist_files/def_dapl_32be differ diff --git a/test/testfiles/plist_files/def_dapl_32le b/test/testfiles/plist_files/def_dapl_32le index 3df7289..880eae5 100644 Binary files a/test/testfiles/plist_files/def_dapl_32le and b/test/testfiles/plist_files/def_dapl_32le differ diff --git a/test/testfiles/plist_files/def_dapl_64be b/test/testfiles/plist_files/def_dapl_64be index 3df7289..880eae5 100644 Binary files a/test/testfiles/plist_files/def_dapl_64be and b/test/testfiles/plist_files/def_dapl_64be differ diff --git a/test/testfiles/plist_files/def_dapl_64le b/test/testfiles/plist_files/def_dapl_64le index 3df7289..880eae5 100644 Binary files a/test/testfiles/plist_files/def_dapl_64le and b/test/testfiles/plist_files/def_dapl_64le differ diff --git a/test/testfiles/plist_files/def_fapl_32be b/test/testfiles/plist_files/def_fapl_32be index 3b35501..6e94011 100644 Binary files a/test/testfiles/plist_files/def_fapl_32be and b/test/testfiles/plist_files/def_fapl_32be differ diff --git a/test/testfiles/plist_files/def_fapl_32le b/test/testfiles/plist_files/def_fapl_32le index 3b35501..6e94011 100644 Binary files a/test/testfiles/plist_files/def_fapl_32le and b/test/testfiles/plist_files/def_fapl_32le differ diff --git a/test/testfiles/plist_files/def_fapl_64be b/test/testfiles/plist_files/def_fapl_64be index 3b35501..6e94011 100644 Binary files a/test/testfiles/plist_files/def_fapl_64be and b/test/testfiles/plist_files/def_fapl_64be differ diff --git a/test/testfiles/plist_files/def_fapl_64le b/test/testfiles/plist_files/def_fapl_64le index 3b35501..6e94011 100644 Binary files a/test/testfiles/plist_files/def_fapl_64le and b/test/testfiles/plist_files/def_fapl_64le differ diff --git a/test/testfiles/plist_files/fapl_32be b/test/testfiles/plist_files/fapl_32be index 43e5e67..237b291 100644 Binary files a/test/testfiles/plist_files/fapl_32be and b/test/testfiles/plist_files/fapl_32be differ diff --git a/test/testfiles/plist_files/fapl_32le b/test/testfiles/plist_files/fapl_32le index 43e5e67..237b291 100644 Binary files a/test/testfiles/plist_files/fapl_32le and b/test/testfiles/plist_files/fapl_32le differ diff --git a/test/testfiles/plist_files/fapl_64be b/test/testfiles/plist_files/fapl_64be index 43e5e67..237b291 100644 Binary files a/test/testfiles/plist_files/fapl_64be and b/test/testfiles/plist_files/fapl_64be differ diff --git a/test/testfiles/plist_files/fapl_64le b/test/testfiles/plist_files/fapl_64le index 43e5e67..237b291 100644 Binary files a/test/testfiles/plist_files/fapl_64le and b/test/testfiles/plist_files/fapl_64le differ diff --git a/test/testfiles/plist_files/lapl_32be b/test/testfiles/plist_files/lapl_32be index f3e9865..9d81759 100644 Binary files a/test/testfiles/plist_files/lapl_32be and b/test/testfiles/plist_files/lapl_32be differ diff --git a/test/testfiles/plist_files/lapl_32le b/test/testfiles/plist_files/lapl_32le index f3e9865..9d81759 100644 Binary files a/test/testfiles/plist_files/lapl_32le and b/test/testfiles/plist_files/lapl_32le differ diff --git a/test/testfiles/plist_files/lapl_64be b/test/testfiles/plist_files/lapl_64be index f3e9865..9d81759 100644 Binary files a/test/testfiles/plist_files/lapl_64be and b/test/testfiles/plist_files/lapl_64be differ diff --git a/test/testfiles/plist_files/lapl_64le b/test/testfiles/plist_files/lapl_64le index f3e9865..9d81759 100644 Binary files a/test/testfiles/plist_files/lapl_64le and b/test/testfiles/plist_files/lapl_64le differ diff --git a/test/tfile.c b/test/tfile.c index 9391458..de1f362 100644 --- a/test/tfile.c +++ b/test/tfile.c @@ -13,7 +13,7 @@ /*********************************************************** * -* Test program: tfile +* Test program: tfile * * Test the low-level file I/O features. * @@ -23,15 +23,31 @@ #include "H5srcdir.h" #include "H5Bprivate.h" +#include "H5Iprivate.h" #include "H5Pprivate.h" /* * This file needs to access private information from the H5F package. * This file also needs to access the file testing code. */ -#define H5F_FRIEND /*suppress error about including H5Fpkg */ +#define H5F_FRIEND /*suppress error about including H5Fpkg */ #define H5F_TESTING -#include "H5Fpkg.h" /* File access */ +#include "H5Fpkg.h" /* File access */ + +#define H5D_FRIEND /*suppress error about including H5Dpkg */ +#include "H5Dpkg.h" /* Dataset access */ + +#define H5S_FRIEND /*suppress error about including H5Spkg */ +#include "H5Spkg.h" /* Dataspace */ + +#define H5T_FRIEND /*suppress error about including H5Tpkg */ +#include "H5Tpkg.h" /* Datatype */ + +#define H5A_FRIEND /*suppress error about including H5Apkg */ +#include "H5Apkg.h" /* Attributes */ + +#define H5O_FRIEND /*suppress error about including H5Opkg */ +#include "H5Opkg.h" /* Object headers */ #define BAD_USERBLOCK_SIZE1 (hsize_t)1 #define BAD_USERBLOCK_SIZE2 (hsize_t)2 @@ -42,46 +58,46 @@ #define BAD_USERBLOCK_SIZE7 (hsize_t)6144 #define F1_USERBLOCK_SIZE (hsize_t)0 -#define F1_OFFSET_SIZE sizeof(haddr_t) -#define F1_LENGTH_SIZE sizeof(hsize_t) -#define F1_SYM_LEAF_K 4 -#define F1_SYM_INTERN_K 16 -#define FILE1 "tfile1.h5" -#define SFILE1 "sys_file1" +#define F1_OFFSET_SIZE sizeof(haddr_t) +#define F1_LENGTH_SIZE sizeof(hsize_t) +#define F1_SYM_LEAF_K 4 +#define F1_SYM_INTERN_K 16 +#define FILE1 "tfile1.h5" +#define SFILE1 "sys_file1" #define REOPEN_FILE "tfile_reopen.h5" #define REOPEN_DSET "dset" #define F2_USERBLOCK_SIZE (hsize_t)512 -#define F2_OFFSET_SIZE 8 -#define F2_LENGTH_SIZE 8 -#define F2_SYM_LEAF_K 8 -#define F2_SYM_INTERN_K 32 +#define F2_OFFSET_SIZE 8 +#define F2_LENGTH_SIZE 8 +#define F2_SYM_LEAF_K 8 +#define F2_SYM_INTERN_K 32 #define F2_RANK 2 #define F2_DIM0 4 #define F2_DIM1 6 #define F2_DSET "dset" -#define FILE2 "tfile2.h5" +#define FILE2 "tfile2.h5" #define F3_USERBLOCK_SIZE (hsize_t)0 -#define F3_OFFSET_SIZE F2_OFFSET_SIZE -#define F3_LENGTH_SIZE F2_LENGTH_SIZE -#define F3_SYM_LEAF_K F2_SYM_LEAF_K -#define F3_SYM_INTERN_K F2_SYM_INTERN_K -#define FILE3 "tfile3.h5" +#define F3_OFFSET_SIZE F2_OFFSET_SIZE +#define F3_LENGTH_SIZE F2_LENGTH_SIZE +#define F3_SYM_LEAF_K F2_SYM_LEAF_K +#define F3_SYM_INTERN_K F2_SYM_INTERN_K +#define FILE3 "tfile3.h5" #define GRP_NAME "/group" #define DSET_NAME "dataset" #define ATTR_NAME "attr" #define TYPE_NAME "type" -#define FILE4 "tfile4.h5" +#define FILE4 "tfile4.h5" #define OBJ_ID_COUNT_0 0 #define OBJ_ID_COUNT_1 1 #define OBJ_ID_COUNT_2 2 #define OBJ_ID_COUNT_3 3 #define OBJ_ID_COUNT_4 4 -#define OBJ_ID_COUNT_6 6 +#define OBJ_ID_COUNT_6 6 #define OBJ_ID_COUNT_8 8 #define GROUP1 "Group1" @@ -111,22 +127,22 @@ #define FSP_SIZE1G 1024*1024*1024 /* File space page size */ /* Declaration for test_libver_macros2() */ -#define FILE6 "tfile6.h5" /* Test file */ +#define FILE6 "tfile6.h5" /* Test file */ /* Declaration for test_get_obj_ids() */ -#define FILE7 "tfile7.h5" /* Test file */ -#define NGROUPS 2 -#define NDSETS 4 +#define FILE7 "tfile7.h5" /* Test file */ +#define NGROUPS 2 +#define NDSETS 4 /* Files created under 1.6 branch and 1.8 branch--used in test_filespace_compatible() */ -const char *OLD_FILENAME[] = { - "filespace_1_6.h5", /* 1.6 HDF5 file */ - "filespace_1_8.h5" /* 1.8 HDF5 file */ +const char *OLD_FILENAME[] = { + "filespace_1_6.h5", /* 1.6 HDF5 file */ + "filespace_1_8.h5" /* 1.8 HDF5 file */ }; /* Files created in 1.10.0 release --used in test_filespace_1.10.0_compatible() */ /* These files are copied from release 1.10.0 tools/h5format_convert/testfiles */ -const char *OLD_1_10_0_FILENAME[] = { +const char *OLD_1_10_0_FILENAME[] = { "h5fc_ext1_i.h5", /* 0 */ "h5fc_ext1_f.h5", /* 1 */ "h5fc_ext2_if.h5", /* 2 */ @@ -150,6 +166,25 @@ const char *FILESPACE_NAME[] = { NULL }; +/* Local test function declarations for version bounds */ +static void test_libver_bounds_low_high(void); +static void test_libver_bounds_super(hid_t fapl); +static void test_libver_bounds_super_create(hid_t fapl, hid_t fcpl, htri_t is_swmr); +static void test_libver_bounds_super_open(hid_t fapl, hid_t fcpl, htri_t is_swmr); +static void test_libver_bounds_obj(hid_t fapl); +static void test_libver_bounds_dataset(hid_t fapl); +static void test_libver_bounds_dataspace(hid_t fapl); +static void test_libver_bounds_datatype(hid_t fapl); +static void test_libver_bounds_datatype_check(hid_t fapl, hid_t tid); +static void test_libver_bounds_attributes(hid_t fapl); + +#define FILE8 "tfile8.h5" /* Test file */ + +#define DSET_NULL "DSET_NULL" +#define DSET "DSET" +#define DSETA "DSETA" +#define DSETB "DSETB" +#define DSETC "DSETC" static void create_objects(hid_t, hid_t, hid_t *, hid_t *, hid_t *, hid_t *); @@ -171,14 +206,14 @@ static void test_rw_noupdate(void); static void test_file_create(void) { - hid_t fid1, fid2, fid3; /* HDF5 File IDs */ - hid_t tmpl1, tmpl2; /*file creation templates */ - hsize_t ublock; /*sizeof userblock */ - size_t parm; /*file-creation parameters */ - size_t parm2; /*file-creation parameters */ - unsigned iparm; - unsigned iparm2; - herr_t ret; /*generic return value */ + hid_t fid1, fid2, fid3; /* HDF5 File IDs */ + hid_t tmpl1, tmpl2; /*file creation templates */ + hsize_t ublock; /*sizeof userblock */ + size_t parm; /*file-creation parameters */ + size_t parm2; /*file-creation parameters */ + unsigned iparm; + unsigned iparm2; + herr_t ret; /*generic return value */ /* Output message about test being performed */ MESSAGE(5, ("Testing Low-Level File Creation I/O\n")); @@ -430,7 +465,7 @@ test_file_create(void) /* Close third file */ ret = H5Fclose(fid3); CHECK(ret, FAIL, "H5Fclose"); -} /* test_file_create() */ +} /* test_file_create() */ /**************************************************************** ** @@ -440,17 +475,17 @@ test_file_create(void) static void test_file_open(void) { - hid_t fid1, fid2; /*HDF5 File IDs */ + hid_t fid1, fid2; /*HDF5 File IDs */ hid_t did; /*dataset ID */ hid_t fapl_id; /*file access property list ID */ - hid_t tmpl1; /*file creation templates */ - hsize_t ublock; /*sizeof user block */ - size_t parm; /*file-creation parameters */ - size_t parm2; /*file-creation parameters */ - unsigned iparm; - unsigned iparm2; - unsigned intent; - herr_t ret; /*generic return value */ + hid_t tmpl1; /*file creation templates */ + hsize_t ublock; /*sizeof user block */ + size_t parm; /*file-creation parameters */ + size_t parm2; /*file-creation parameters */ + unsigned iparm; + unsigned iparm2; + unsigned intent; + herr_t ret; /*generic return value */ /* * Test single file open @@ -614,7 +649,7 @@ test_file_close(void) { hid_t fid1, fid2; hid_t fapl_id, access_id; - hid_t dataset_id, group_id1, group_id2, group_id3; + hid_t dataset_id, group_id1, group_id2, group_id3; H5F_close_degree_t fc_degree; herr_t ret; @@ -804,7 +839,7 @@ test_file_close(void) /* Create more new files and test object count and ID list functions */ test_obj_count_and_id(fid1, fid2, dataset_id, group_id1, - group_id2, group_id3); + group_id2, group_id3); /* Close first open */ ret = H5Fclose(fid1); @@ -860,22 +895,22 @@ test_file_close(void) CHECK(ret, FAIL, "H5Pget_fclose_degree"); switch(fc_degree) { - case H5F_CLOSE_STRONG: - /* Close first open */ - ret = H5Fclose(fid1); - CHECK(ret, FAIL, "H5Fclose"); - /* Close second open */ - ret = H5Fclose(fid2); - CHECK(ret, FAIL, "H5Fclose"); - break; - case H5F_CLOSE_SEMI: + case H5F_CLOSE_STRONG: + /* Close first open */ + ret = H5Fclose(fid1); + CHECK(ret, FAIL, "H5Fclose"); + /* Close second open */ + ret = H5Fclose(fid2); + CHECK(ret, FAIL, "H5Fclose"); + break; + case H5F_CLOSE_SEMI: /* Close first open */ ret = H5Fclose(fid1); CHECK(ret, FAIL, "H5Fclose"); - ret = H5Dclose(dataset_id); + ret = H5Dclose(dataset_id); CHECK(ret, FAIL, "H5Dclose"); ret = H5Gclose(group_id1); - CHECK(ret, FAIL, "H5Gclose"); + CHECK(ret, FAIL, "H5Gclose"); ret = H5Gclose(group_id2); CHECK(ret, FAIL, "H5Gclose"); ret = H5Gclose(group_id3); @@ -883,8 +918,8 @@ test_file_close(void) /* Close second open */ ret = H5Fclose(fid2); CHECK(ret, FAIL, "H5Fclose"); - break; - case H5F_CLOSE_WEAK: + break; + case H5F_CLOSE_WEAK: /* Close first open */ ret = H5Fclose(fid1); CHECK(ret, FAIL, "H5Fclose"); @@ -899,7 +934,7 @@ test_file_close(void) CHECK(ret, FAIL, "H5Gclose"); ret = H5Gclose(group_id3); CHECK(ret, FAIL, "H5Gclose"); - break; + break; case H5F_CLOSE_DEFAULT: default: CHECK(fc_degree, H5F_CLOSE_DEFAULT, "H5Pget_fclose_degree"); @@ -921,10 +956,10 @@ test_file_close(void) ****************************************************************/ static void create_objects(hid_t fid1, hid_t fid2, hid_t *ret_did, hid_t *ret_gid1, - hid_t *ret_gid2, hid_t *ret_gid3) + hid_t *ret_gid2, hid_t *ret_gid3) { - ssize_t oid_count; - herr_t ret; + ssize_t oid_count; + herr_t ret; /* Check reference counts of file IDs and opened object IDs. * The verification is hard-coded. If in any case, this testing @@ -1026,7 +1061,7 @@ create_objects(hid_t fid1, hid_t fid2, hid_t *ret_did, hid_t *ret_gid1, /**************************************************************** ** ** test_get_obj_ids(): Test the bug and the fix for Jira 8528. -** H5Fget_obj_ids overfilled the list of +** H5Fget_obj_ids overfilled the list of ** object IDs by one. This is an enhancement ** for test_obj_count_and_id(). ** @@ -1073,14 +1108,14 @@ test_get_obj_ids(void) oid_list = (hid_t *)HDcalloc((size_t)oid_list_size, sizeof(hid_t)); CHECK_PTR(oid_list, "HDcalloc"); - /* Call the public function H5F_get_obj_ids to use H5F_get_objects. User reported having problem here. - * that the returned size (ret_count) from H5Fget_obj_ids is one greater than the size passed in + /* Call the public function H5F_get_obj_ids to use H5F_get_objects. User reported having problem here. + * that the returned size (ret_count) from H5Fget_obj_ids is one greater than the size passed in * (oid_list_size) */ ret_count = H5Fget_obj_ids(fid, H5F_OBJ_ALL, (size_t)oid_list_size, oid_list); CHECK(ret_count, FAIL, "H5Fget_obj_ids"); VERIFY(ret_count, oid_list_size, "H5Fget_obj_count"); - /* Close all object IDs on the list except the file ID. The first ID is supposed to be file ID according + /* Close all object IDs on the list except the file ID. The first ID is supposed to be file ID according * to the library design */ for(i = 0; i< ret_count; i++) { if(fid != oid_list[i]) { @@ -1095,7 +1130,7 @@ test_get_obj_ids(void) CHECK(oid_count, FAIL, "H5Fget_obj_count"); VERIFY(oid_count, NGROUPS + 2, "H5Fget_obj_count"); - /* Get the IDs of the left opend objects */ + /* Get the IDs of the left opend objects */ ret_count = H5Fget_obj_ids(fid, H5F_OBJ_ALL, (size_t)oid_list_size, oid_list); CHECK(ret_count, FAIL, "H5Fget_obj_ids"); VERIFY(ret_count, oid_list_size, "H5Fget_obj_count"); @@ -1107,14 +1142,14 @@ test_get_obj_ids(void) CHECK(ret, FAIL, "H5Oclose"); } } - + H5Sclose(filespace); H5Fclose(fid); HDfree(oid_list); - /* Reopen the file to check whether H5Fget_obj_count and H5Fget_obj_ids still works - * when the file is closed first */ + /* Reopen the file to check whether H5Fget_obj_count and H5Fget_obj_ids still works + * when the file is closed first */ fid = H5Fopen(FILE7, H5F_ACC_RDONLY, H5P_DEFAULT); CHECK(fid, FAIL, "H5Fopen"); @@ -1157,7 +1192,7 @@ static void test_get_file_id(void) { hid_t fid, fid2, fid3; - hid_t datatype_id, dataset_id, dataspace_id, group_id, attr_id; + hid_t datatype_id, dataset_id, dataspace_id, group_id, attr_id; hid_t plist; hsize_t dims[F2_RANK]; unsigned intent; @@ -1315,7 +1350,7 @@ check_file_id(hid_t fid, hid_t object_id) ****************************************************************/ static void test_obj_count_and_id(hid_t fid1, hid_t fid2, hid_t did, hid_t gid1, - hid_t gid2, hid_t gid3) + hid_t gid2, hid_t gid3) { hid_t fid3, fid4; ssize_t oid_count, ret_count; @@ -1356,7 +1391,7 @@ test_obj_count_and_id(hid_t fid1, hid_t fid2, hid_t did, hid_t gid1, oid_count = H5Fget_obj_count((hid_t)H5F_OBJ_ALL, H5F_OBJ_ALL); CHECK(oid_count, FAIL, "H5Fget_obj_count"); VERIFY(oid_count, OBJ_ID_COUNT_8, "H5Fget_obj_count"); - + if(oid_count > 0) { hid_t *oid_list; @@ -1364,8 +1399,8 @@ test_obj_count_and_id(hid_t fid1, hid_t fid2, hid_t did, hid_t gid1, if(oid_list != NULL) { int i; - ret_count = H5Fget_obj_ids((hid_t)H5F_OBJ_ALL, H5F_OBJ_ALL, (size_t)oid_count, oid_list); - CHECK(ret_count, FAIL, "H5Fget_obj_ids"); + ret_count = H5Fget_obj_ids((hid_t)H5F_OBJ_ALL, H5F_OBJ_ALL, (size_t)oid_count, oid_list); + CHECK(ret_count, FAIL, "H5Fget_obj_ids"); for(i = 0; i < oid_count; i++) { H5I_type_t id_type; @@ -1479,11 +1514,11 @@ test_file_perm(void) /**************************************************************** ** ** test_file_perm2(): low-level file test routine. -** This test verifies that no object can be created in a +** This test verifies that no object can be created in a ** file that is opened for read-only. ** *****************************************************************/ -static void +static void test_file_perm2(void) { hid_t file; /* File opened with read-write permission */ @@ -1493,7 +1528,7 @@ test_file_perm2(void) hid_t dset; /* Dataset ID */ hid_t type; /* Datatype ID */ hid_t attr; /* Attribute ID */ - herr_t ret; + herr_t ret; /* Output message about test being performed */ MESSAGE(5, ("Testing Low-Level File Permissions again\n")); @@ -2085,35 +2120,35 @@ test_file_double_dataset_open(void) /**************************************************************** ** ** test_file_double_file_dataset_open(): -** This test checks multi-opens of files & datasets: -** It simulates the multi-thread test program from DLS -** which exposes the file pointer segmentation fault failure. -** NOTE: The order on when the files and datasets are open/close -** is important. +** This test checks multi-opens of files & datasets: +** It simulates the multi-thread test program from DLS +** which exposes the file pointer segmentation fault failure. +** NOTE: The order on when the files and datasets are open/close +** is important. ** *****************************************************************/ static void test_file_double_file_dataset_open(hbool_t new_format) { - hid_t fapl = -1; /* File access property list */ - hid_t dcpl = -1; /* Dataset creation property list */ - hid_t fid1 = -1, fid2 = -1; /* File IDs */ - hid_t did1 = -1, did2 = -1; /* Dataset IDs */ - hid_t sid1 = -1, sid2 = -1; /* Dataspace IDs */ - hid_t tid1 = -1, tid2 = -1; /* Datatype IDs */ - hsize_t dims[1] = {5}, dims2[2] = {1, 4}; /* Dimension sizes */ - hsize_t e_ext_dims[1] = {7}; /* Expanded dimension sizes */ - hsize_t s_ext_dims[1] = {3}; /* Shrunk dimension sizes */ - hsize_t max_dims0[1] = {8}; /* Maximum dimension sizes */ - hsize_t max_dims1[1] = {H5S_UNLIMITED}; /* Maximum dimesion sizes for extensible array index */ - hsize_t max_dims2[2] = {H5S_UNLIMITED, H5S_UNLIMITED}; /* Maximum dimension sizes for v2 B-tree index */ - hsize_t chunks[1] = {2}, chunks2[2] = {4, 5}; /* Chunk dimension sizes */ + hid_t fapl = -1; /* File access property list */ + hid_t dcpl = -1; /* Dataset creation property list */ + hid_t fid1 = -1, fid2 = -1; /* File IDs */ + hid_t did1 = -1, did2 = -1; /* Dataset IDs */ + hid_t sid1 = -1, sid2 = -1; /* Dataspace IDs */ + hid_t tid1 = -1, tid2 = -1; /* Datatype IDs */ + hsize_t dims[1] = {5}, dims2[2] = {1, 4}; /* Dimension sizes */ + hsize_t e_ext_dims[1] = {7}; /* Expanded dimension sizes */ + hsize_t s_ext_dims[1] = {3}; /* Shrunk dimension sizes */ + hsize_t max_dims0[1] = {8}; /* Maximum dimension sizes */ + hsize_t max_dims1[1] = {H5S_UNLIMITED}; /* Maximum dimesion sizes for extensible array index */ + hsize_t max_dims2[2] = {H5S_UNLIMITED, H5S_UNLIMITED}; /* Maximum dimension sizes for v2 B-tree index */ + hsize_t chunks[1] = {2}, chunks2[2] = {4, 5}; /* Chunk dimension sizes */ hsize_t size; /* File size */ - const char* data[] = {"String 1", "String 2", "String 3", "String 4", "String 5"}; /* Input Data */ - const char* e_data[] = {"String 1", "String 2", "String 3", "String 4", "String 5", "String 6", "String 7"}; /* Input Data */ - char* buffer[5]; /* Output buffer */ - int wbuf[4] = {1, 2, 3, 4}; /* Input data */ - herr_t ret; /* Generic return value */ + const char* data[] = {"String 1", "String 2", "String 3", "String 4", "String 5"}; /* Input Data */ + const char* e_data[] = {"String 1", "String 2", "String 3", "String 4", "String 5", "String 6", "String 7"}; /* Input Data */ + char* buffer[5]; /* Output buffer */ + int wbuf[4] = {1, 2, 3, 4}; /* Input data */ + herr_t ret; /* Generic return value */ /* Output message about test being performed */ MESSAGE(5, ("Testing double file and dataset open/close\n")); @@ -2134,7 +2169,7 @@ test_file_double_file_dataset_open(hbool_t new_format) /* Create a chunked dataset with fixed array indexing */ sid1 = H5Screate_simple(1, dims, max_dims0); - CHECK(sid1, FAIL, "H5Screate"); + CHECK(sid1, FAIL, "H5Screate_simple"); tid1 = H5Tcopy(H5T_C_S1); CHECK(tid1, FAIL, "H5Tcopy"); ret = H5Tset_size(tid1, H5T_VARIABLE); @@ -2160,7 +2195,7 @@ test_file_double_file_dataset_open(hbool_t new_format) /* Create a chunked dataset with extensible array indexing */ sid1 = H5Screate_simple(1, dims, max_dims1); - CHECK(sid1, FAIL, "H5Screate"); + CHECK(sid1, FAIL, "H5Screate_simple"); tid1 = H5Tcopy(H5T_C_S1); CHECK(tid1, FAIL, "H5Tcopy"); ret = H5Tset_size(tid1, H5T_VARIABLE); @@ -2189,7 +2224,7 @@ test_file_double_file_dataset_open(hbool_t new_format) /* Create a chunked dataset with v2 btree indexing */ sid2 = H5Screate_simple(2, dims2, max_dims2); - CHECK(sid2, FAIL, "H5Screate"); + CHECK(sid2, FAIL, "H5Screate_simple"); dcpl = H5Pcreate(H5P_DATASET_CREATE); CHECK(dcpl, FAIL, "H5Pcreate"); @@ -2216,8 +2251,8 @@ test_file_double_file_dataset_open(hbool_t new_format) ret = H5Fclose(fid1); CHECK(ret, FAIL, "H5Fclose"); - /* - * Scenario 1 + /* + * Scenario 1 */ /* First file open */ @@ -2272,8 +2307,8 @@ test_file_double_file_dataset_open(hbool_t new_format) ret = H5Tclose(tid2); CHECK(ret, FAIL, "H5Tclose"); - /* - * Scenario 2 + /* + * Scenario 2 */ /* First file open */ @@ -2337,7 +2372,7 @@ test_file_double_file_dataset_open(hbool_t new_format) ret = H5Tclose(tid2); CHECK(ret, FAIL, "H5Tclose"); - /* + /* * Scenario 3 */ @@ -2381,10 +2416,10 @@ test_file_double_file_dataset_open(hbool_t new_format) ret = H5Fclose(fid2); CHECK(ret, FAIL, "H5Fclose"); - /* + /* * Scenario 4 * --trigger H5AC_protect: Assertion `f->shared' failed - * from second call to H5Dset_extent->...H5D__earray_idx_remove->H5EA_get...H5EA__iblock_protect...H5AC_protect + * from second call to H5Dset_extent->...H5D__earray_idx_remove->H5EA_get...H5EA__iblock_protect...H5AC_protect */ /* First file open */ fid1 = H5Fopen(FILE1, H5F_ACC_RDWR, H5P_DEFAULT); @@ -2693,9 +2728,9 @@ cal_chksum(const char *file, uint32_t *chksum) ** This test checks to ensure that opening and closing a file ** with read/write permissions does not write anything to the ** file if the file does not change. -** Due to the implementation of file locking (status_flags in -** the superblock is used), this test is changed to use checksum -** instead of timestamp to verify the file is not changed. +** Due to the implementation of file locking (status_flags in +** the superblock is used), this test is changed to use checksum +** instead of timestamp to verify the file is not changed. ** ** Programmer: Vailin Choi; July 2013 ** @@ -2704,8 +2739,8 @@ static void test_rw_noupdate(void) { herr_t ret; /* Generic return value */ - hid_t fid; /* File ID */ - uint32_t chksum1, chksum2; /* Checksum value */ + hid_t fid; /* File ID */ + uint32_t chksum1, chksum2; /* Checksum value */ /* Output message about test being performed */ MESSAGE(5, ("Testing to verify that nothing is written if nothing is changed.\n")); @@ -3094,8 +3129,8 @@ test_userblock_alignment(void) ** test_userblock_alignment_paged(): low-level file test routine. ** This test checks to ensure that files with both a userblock and ** alignment interact properly: -** -- alignment via H5Pset_alignment -** -- alignment via paged aggregation +** -- alignment via H5Pset_alignment +** -- alignment via paged aggregation ** ** Programmer: Vailin Choi; March 2013 ** @@ -3111,14 +3146,14 @@ test_userblock_alignment_paged(void) /* Output message about test being performed */ MESSAGE(5, ("Testing interaction between userblock and alignment (via paged aggregation and H5Pset_alignment)\n")); - /* + /* * Case 1: * Userblock size = 0 * Alignment in use = 4096 * Strategy = H5F_FILE_SPACE_PAGE; fsp_size = alignment = 4096 * Outcome: - * Should succeed: - * userblock is 0 and alignment != 0 + * Should succeed: + * userblock is 0 and alignment != 0 */ /* Create file creation property list with user block */ fcpl = H5Pcreate(H5P_FILE_CREATE); @@ -3149,14 +3184,14 @@ test_userblock_alignment_paged(void) ret = H5Pclose(fapl); CHECK(ret, FAIL, "H5Pclose"); - /* + /* * Case 2a: * Userblock size = 1024 * Alignment in use = 512 - * Strategy = H5F_FILE_SPACE_PAGE; fsp_size = alignment = 512 + * Strategy = H5F_FILE_SPACE_PAGE; fsp_size = alignment = 512 * H5Pset_alignment() is 3 * Outcome: - * Should succeed: + * Should succeed: * userblock (1024) is integral mult. of alignment (512) */ /* Create file creation property list with user block */ @@ -3185,16 +3220,16 @@ test_userblock_alignment_paged(void) ret = H5Pclose(fapl); CHECK(ret, FAIL, "H5Pclose"); - /* + /* * Case 2b: * Userblock size = 1024 * Alignment in use = 3 - * Strategy = H5F_FILE_SPACE_AGGR; fsp_size = 512 - * (via default file creation property) + * Strategy = H5F_FILE_SPACE_AGGR; fsp_size = 512 + * (via default file creation property) * H5Pset_alignment() is 3 * Outcome: - * Should fail at file creation: - * userblock (1024) is non-integral mult. of alignment (3) + * Should fail at file creation: + * userblock (1024) is non-integral mult. of alignment (3) */ /* Create file creation property list with user block */ fcpl = H5Pcreate(H5P_FILE_CREATE); @@ -3221,15 +3256,15 @@ test_userblock_alignment_paged(void) ret = H5Pclose(fapl); CHECK(ret, FAIL, "H5Pclose"); - /* + /* * Case 3a: * Userblock size = 512 * Alignment in use = 512 - * Strategy is H5F_FILE_SPACE_PAGE; fsp_size = alignment = 512 + * Strategy is H5F_FILE_SPACE_PAGE; fsp_size = alignment = 512 * H5Pset_alignment() is 3 * Outcome: - * Should succeed: - * userblock (512) is equal to alignment (512) + * Should succeed: + * userblock (512) is equal to alignment (512) */ /* Create file creation property list with user block */ fcpl = H5Pcreate(H5P_FILE_CREATE); @@ -3259,15 +3294,15 @@ test_userblock_alignment_paged(void) ret = H5Pclose(fapl); CHECK(ret, FAIL, "H5Pclose"); - /* + /* * Case 3b: * Userblock size = 512 * Alignment in use = 3 - * Strategy is H5F_FILE_SPACE_NONE; fsp_size = 512 + * Strategy is H5F_FILE_SPACE_NONE; fsp_size = 512 * H5Pset_alignment() is 3 * Outcome: - * Should fail at file creation: - * userblock (512) is non-integral mult. of alignment (3) + * Should fail at file creation: + * userblock (512) is non-integral mult. of alignment (3) */ /* Create file creation property list with user block */ fcpl = H5Pcreate(H5P_FILE_CREATE); @@ -3297,15 +3332,15 @@ test_userblock_alignment_paged(void) ret = H5Pclose(fapl); CHECK(ret, FAIL, "H5Pclose"); - /* + /* * Case 4a: * Userblock size = 1024 * Alignment in use = 1023 * Strategy is H5F_FILE_SPACE_PAGE; fsp_size = alignment = 1023 * H5Pset_alignment() is 16 * Outcome: - * Should fail at file creation: - * userblock (1024) is non-integral multiple of alignment (1023) + * Should fail at file creation: + * userblock (1024) is non-integral multiple of alignment (1023) */ /* Create file creation property list with user block */ fcpl = H5Pcreate(H5P_FILE_CREATE); @@ -3335,15 +3370,15 @@ test_userblock_alignment_paged(void) ret = H5Pclose(fapl); CHECK(ret, FAIL, "H5Pclose"); - /* + /* * Case 4b: * Userblock size = 1024 * Alignment in use = 16 * Strategy is H5F_FILE_SPACE_FSM_AGGR; fsp_size = 1023 * H5Pset_alignment() is 16 * Outcome: - * Should succeed: - * userblock (512) is integral multiple of alignment (16) + * Should succeed: + * userblock (512) is integral multiple of alignment (16) */ /* Create file creation property list with user block */ fcpl = H5Pcreate(H5P_FILE_CREATE); @@ -3373,15 +3408,15 @@ test_userblock_alignment_paged(void) ret = H5Pclose(fapl); CHECK(ret, FAIL, "H5Pclose"); - /* + /* * Case 5a: * Userblock size = 512 * Alignment in use = 1024 * Strategy is H5F_FILE_SPACE_PAGE; fsp_size = alignment = 1024 * H5Pset_alignment() is 16 * Outcome: - * Should fail at file creation: - * userblock (512) is less than alignment (1024) + * Should fail at file creation: + * userblock (512) is less than alignment (1024) */ /* Create file creation property list with user block */ fcpl = H5Pcreate(H5P_FILE_CREATE); @@ -3411,7 +3446,7 @@ test_userblock_alignment_paged(void) ret = H5Pclose(fapl); CHECK(ret, FAIL, "H5Pclose"); - /* + /* * Case 5b: * Userblock size = 512 * Alignment in use = 16 @@ -3419,7 +3454,7 @@ test_userblock_alignment_paged(void) * H5Pset_alignment() is 16 * Outcome: * Should succed: - * userblock (512) is integral multiple of alignment (16) + * userblock (512) is integral multiple of alignment (16) */ /* Create file creation property list with user block */ fcpl = H5Pcreate(H5P_FILE_CREATE); @@ -3449,16 +3484,16 @@ test_userblock_alignment_paged(void) ret = H5Pclose(fapl); CHECK(ret, FAIL, "H5Pclose"); - /* + /* * Case 6: * Userblock size = 512 * Alignment in use = 512 * Strategy is H5F_FILE_SPACE_PAGE; fsp_size = alignment = 512 * H5Pset_alignment() is 3 - * Reopen the file; H5Pset_alignment() is 1024 + * Reopen the file; H5Pset_alignment() is 1024 * Outcome: * Should succed: - * Userblock (512) is the same as alignment (512); + * Userblock (512) is the same as alignment (512); * The H5Pset_alignment() calls have no effect */ /* Create file creation property list with user block */ @@ -3502,19 +3537,19 @@ test_userblock_alignment_paged(void) /**************************************************************** ** ** test_filespace_info(): -** Verify the following public routines retrieve and set file space -** information correctly: -** (1) H5Pget/set_file_space_strategy(): -** Retrieve and set file space strategy, persisting free-space, -** and free-space section threshold as specified -** (2) H5Pget/set_file_space_page_size(): -** Retrieve and set the page size for paged aggregation +** Verify the following public routines retrieve and set file space +** information correctly: +** (1) H5Pget/set_file_space_strategy(): +** Retrieve and set file space strategy, persisting free-space, +** and free-space section threshold as specified +** (2) H5Pget/set_file_space_page_size(): +** Retrieve and set the page size for paged aggregation ** ****************************************************************/ static void test_filespace_info(const char *env_h5_drvr) { - hid_t fid; /* File IDs */ + hid_t fid; /* File IDs */ hid_t fapl, new_fapl; /* File access property lists */ hid_t fcpl, fcpl1, fcpl2; /* File creation property lists */ H5F_fspace_strategy_t strategy; /* File space strategy */ @@ -3527,7 +3562,7 @@ test_filespace_info(const char *env_h5_drvr) hsize_t fsp_size; /* File space page size */ char filename[FILENAME_LEN]; /* Filename to use */ hbool_t contig_addr_vfd; /* Whether VFD used has a contigous address space */ - herr_t ret; /* Return value */ + herr_t ret; /* Return value */ /* Output message about test being performed */ MESSAGE(5, ("Testing file creation public routines: H5Pget/set_file_space_strategy & H5Pget/set_file_space_page_size\n")); @@ -3545,14 +3580,14 @@ test_filespace_info(const char *env_h5_drvr) ret = H5Pset_libver_bounds(new_fapl, H5F_LIBVER_LATEST, H5F_LIBVER_LATEST); CHECK(ret, FAIL, "H5Pset_libver_bounds"); - /* + /* * Case (1) * Check file space information from a default file creation property list. * Values expected: - * strategy--H5F_FILE_SPACE_AGGR - * persist--FALSE - * threshold--1 - * file space page size--4096 + * strategy--H5F_FILE_SPACE_AGGR + * persist--FALSE + * threshold--1 + * file space page size--4096 */ /* Create file creation property list template */ fcpl = H5Pcreate(H5P_FILE_CREATE); @@ -3575,7 +3610,7 @@ test_filespace_info(const char *env_h5_drvr) /* Close property list */ H5Pclose(fcpl); - /* + /* * Case (2) * File space page size has a minimum size of 512. * Setting value less than 512 will return an error; @@ -3624,14 +3659,14 @@ test_filespace_info(const char *env_h5_drvr) /* Close property list */ H5Pclose(fcpl); - /* + /* * Case (3) * Check file space information when creating a file with default properties. * Values expected: - * strategy--H5F_FILE_SPACE_AGGR - * persist--FALSE - * threshold--1 - * file space page size--4096 + * strategy--H5F_FILE_SPACE_AGGR + * persist--FALSE + * threshold--1 + * file space page size--4096 */ /* Create a file with default file creation and access property lists */ fid = H5Fcreate(filename, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT); @@ -3661,15 +3696,15 @@ test_filespace_info(const char *env_h5_drvr) ret = H5Pclose(fcpl1); CHECK(ret, FAIL, "H5Pclose"); - /* + /* * Case (4) * Check file space information when creating a file with the * latest library format and default properties. * Values expected: - * strategy--H5F_FILE_SPACE_AGGR - * persist--FALSE - * threshold--1 - * file space page size--4096 + * strategy--H5F_FILE_SPACE_AGGR + * persist--FALSE + * threshold--1 + * file space page size--4096 */ /* Create a file with the latest library format */ fid = H5Fcreate(filename, H5F_ACC_TRUNC, H5P_DEFAULT, new_fapl); @@ -3699,21 +3734,21 @@ test_filespace_info(const char *env_h5_drvr) ret = H5Pclose(fcpl1); CHECK(ret, FAIL, "H5Pclose"); - /* + /* * Case (5) * Check file space information with the following combinations: - * Create file with -- - * New or old format - * Persist or not persist free-space - * Different sizes for free-space section threshold (0 to 10) - * The four file space strategies: - * H5F_FSPACE_STRATEGY_FSM_AGGR, H5F_FSPACE_STRATEGY_PAGE, + * Create file with -- + * New or old format + * Persist or not persist free-space + * Different sizes for free-space section threshold (0 to 10) + * The four file space strategies: + * H5F_FSPACE_STRATEGY_FSM_AGGR, H5F_FSPACE_STRATEGY_PAGE, * H5F_FSPACE_STRATEGY_AGGR, H5F_FSPACE_STRATEGY_NONE - * File space page size: set to 512 - * + * File space page size: set to 512 + * */ for(new_format = FALSE; new_format <= TRUE; new_format++) { - hid_t my_fapl; + hid_t my_fapl; /* Set the FAPL for the type of format */ if(new_format) { @@ -3747,7 +3782,7 @@ test_filespace_info(const char *env_h5_drvr) ret = H5Pset_file_space_page_size(fcpl, FSP_SIZE512); CHECK(ret, FAIL, "H5Pset_file_space_strategy"); - + /* Retrieve file space information */ ret = H5Pget_file_space_strategy(fcpl, &strategy, &persist, &threshold); CHECK(ret, FAIL, "H5Pget_file_space_strategy"); @@ -3906,13 +3941,13 @@ error: ** returned by the public routine H5Fget_freespace(). ** ** Modifications: -** Vailin Choi; July 2012 -** Remove datasets in reverse order so that all file spaces are shrunk. -** (A change due to H5FD_FLMAP_DICHOTOMY.) +** Vailin Choi; July 2012 +** Remove datasets in reverse order so that all file spaces are shrunk. +** (A change due to H5FD_FLMAP_DICHOTOMY.) ** -** Vailin Choi; Dec 2012 -** Add changes due to paged aggregation via new format: -** the amount of freespace is different. +** Vailin Choi; Dec 2012 +** Add changes due to paged aggregation via new format: +** the amount of freespace is different. ** *****************************************************************/ static void @@ -4052,9 +4087,9 @@ test_file_freespace(const char *env_h5_drvr) /* Check that there is the right amount of free space in the file */ free_space = H5Fget_freespace(file); CHECK(free_space, FAIL, "H5Fget_freespace"); - if(new_format) + if(new_format) VERIFY(free_space, expected_fs_del, "H5Fget_freespace"); - else + else VERIFY(free_space, expected_fs_del, "H5Fget_freespace"); /* Close file */ @@ -4078,7 +4113,7 @@ test_file_freespace(const char *env_h5_drvr) ** ** test_sects_freespace(): ** This routine checks free-space section information for the -** file as returned by the public routine H5Fget_free_sections(). +** file as returned by the public routine H5Fget_free_sections(). ** *****************************************************************/ static void @@ -4100,9 +4135,9 @@ test_sects_freespace(const char *env_h5_drvr, hbool_t new_format) H5F_sect_info_t all_sect_info[15]; /* Array to hold free-space information for all types of data */ H5F_sect_info_t meta_sect_info[15]; /* Array to hold free-space information for metadata */ H5F_sect_info_t raw_sect_info[15]; /* Array to hold free-space information for raw data */ - hsize_t total = 0; /* sum of the free-space section sizes */ + hsize_t total = 0; /* sum of the free-space section sizes */ hsize_t tmp_tot = 0; /* Sum of the free-space section sizes */ - hsize_t last_size; /* Size of last free-space section */ + hsize_t last_size; /* Size of last free-space section */ hsize_t dims[1]; /* Dimension sizes */ unsigned u; /* Local index variable */ H5FD_mem_t type; @@ -4141,7 +4176,7 @@ test_sects_freespace(const char *env_h5_drvr, hbool_t new_format) } else { ret = H5Pset_file_space_strategy(fcpl, H5F_FSPACE_STRATEGY_FSM_AGGR, TRUE, (hsize_t)1); CHECK(ret, FAIL, "H5Pget_file_space_strategy"); - } + } /* Create the file */ file = H5Fcreate(filename, H5F_ACC_TRUNC, fcpl, fapl); @@ -4265,7 +4300,7 @@ test_sects_freespace(const char *env_h5_drvr, hbool_t new_format) HDmemset(meta_sect_info, 0, sizeof(meta_sect_info)); if(multi_vfd) { - hssize_t ntmp; + hssize_t ntmp; for(type = H5FD_MEM_SUPER; type < H5FD_MEM_NTYPES; H5_INC_ENUM(H5FD_mem_t, type)) { if(type == H5FD_MEM_DRAW || type == H5FD_MEM_GHEAP) @@ -4317,7 +4352,7 @@ test_sects_freespace(const char *env_h5_drvr, hbool_t new_format) CHECK(fcpl, FAIL, "H5Pclose"); h5_clean_files(FILESPACE_NAME, fapl); - } + } } /* end test_sects_freespace() */ @@ -4325,29 +4360,29 @@ test_sects_freespace(const char *env_h5_drvr, hbool_t new_format) /**************************************************************** ** ** test_filespace_compatible(): -** Verify that the trunk with the latest file space management -** can open, read and modify 1.6 HDF5 file and 1.8 HDF5 file. -** Also verify the correct file space handling information -** and the amount of free space. +** Verify that the trunk with the latest file space management +** can open, read and modify 1.6 HDF5 file and 1.8 HDF5 file. +** Also verify the correct file space handling information +** and the amount of free space. ** ****************************************************************/ static void test_filespace_compatible(void) { int fd_old = (-1), fd_new = (-1); /* File descriptors for copying data */ - hid_t fid = -1; /* File id */ - hid_t did = -1; /* Dataset id */ - hid_t fcpl; /* File creation property list template */ - int check[100]; /* Temporary buffer for verifying dataset data */ - int rdbuf[100]; /* Temporary buffer for reading in dataset data */ - uint8_t buf[READ_OLD_BUFSIZE]; /* temporary buffer for reading */ - ssize_t nread; /* Number of bytes read in */ - unsigned i, j; /* Local index variable */ - hssize_t free_space; /* Amount of free-space in the file */ - hbool_t persist; /* Persist free-space or not */ - hsize_t threshold; /* Free-space section threshold */ - H5F_fspace_strategy_t strategy; /* File space handling strategy */ - herr_t ret; /* Return value */ + hid_t fid = -1; /* File id */ + hid_t did = -1; /* Dataset id */ + hid_t fcpl; /* File creation property list template */ + int check[100]; /* Temporary buffer for verifying dataset data */ + int rdbuf[100]; /* Temporary buffer for reading in dataset data */ + uint8_t buf[READ_OLD_BUFSIZE]; /* temporary buffer for reading */ + ssize_t nread; /* Number of bytes read in */ + unsigned i, j; /* Local index variable */ + hssize_t free_space; /* Amount of free-space in the file */ + hbool_t persist; /* Persist free-space or not */ + hsize_t threshold; /* Free-space section threshold */ + H5F_fspace_strategy_t strategy; /* File space handling strategy */ + herr_t ret; /* Return value */ /* Output message about test being performed */ MESSAGE(5, ("File space compatibility testing for 1.6 and 1.8 files\n")); @@ -4356,31 +4391,31 @@ test_filespace_compatible(void) const char *filename = H5_get_srcdir_filename(OLD_FILENAME[j]); /* Corrected test file name */ /* Open and copy the test file into a temporary file */ - fd_old = HDopen(filename, O_RDONLY); - CHECK(fd_old, FAIL, "HDopen"); - fd_new = HDopen(FILE5, O_RDWR|O_CREAT|O_TRUNC, H5_POSIX_CREATE_MODE_RW); - CHECK(fd_new, FAIL, "HDopen"); + fd_old = HDopen(filename, O_RDONLY); + CHECK(fd_old, FAIL, "HDopen"); + fd_new = HDopen(FILE5, O_RDWR|O_CREAT|O_TRUNC, H5_POSIX_CREATE_MODE_RW); + CHECK(fd_new, FAIL, "HDopen"); - /* Copy data */ + /* Copy data */ while((nread = HDread(fd_old, buf, (size_t)READ_OLD_BUFSIZE)) > 0) { ssize_t write_err = HDwrite(fd_new, buf, (size_t)nread); CHECK(write_err, -1, "HDwrite"); } /* end while */ - /* Close the files */ - ret = HDclose(fd_old); - CHECK(ret, FAIL, "HDclose"); - ret = HDclose(fd_new); - CHECK(ret, FAIL, "HDclose"); + /* Close the files */ + ret = HDclose(fd_old); + CHECK(ret, FAIL, "HDclose"); + ret = HDclose(fd_new); + CHECK(ret, FAIL, "HDclose"); /* Open the temporary test file */ - fid = H5Fopen(FILE5, H5F_ACC_RDWR, H5P_DEFAULT); - CHECK(fid, FAIL, "H5Fopen"); + fid = H5Fopen(FILE5, H5F_ACC_RDWR, H5P_DEFAULT); + CHECK(fid, FAIL, "H5Fopen"); - /* There should not be any free space in the file */ - free_space = H5Fget_freespace(fid); - CHECK(free_space, FAIL, "H5Fget_freespace"); - VERIFY(free_space, (hssize_t)0, "H5Fget_freespace"); + /* There should not be any free space in the file */ + free_space = H5Fget_freespace(fid); + CHECK(free_space, FAIL, "H5Fget_freespace"); + VERIFY(free_space, (hssize_t)0, "H5Fget_freespace"); /* Get the file's file creation property list */ fcpl = H5Fget_create_plist(fid); @@ -4397,27 +4432,27 @@ test_filespace_compatible(void) VERIFY(persist, FALSE, "H5Pget_file_space_strategy"); VERIFY(threshold, 1, "H5Pget_file_space_strategy"); - /* Generate raw data */ - for(i = 0; i < 100; i++) - check[i] = (int)i; + /* Generate raw data */ + for(i = 0; i < 100; i++) + check[i] = (int)i; - /* Open and read the dataset */ - did = H5Dopen2(fid, DSETNAME, H5P_DEFAULT); - CHECK(did, FAIL, "H5Dopen"); - ret = H5Dread(did, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, &rdbuf); - CHECK(ret, FAIL, "H5Dread"); + /* Open and read the dataset */ + did = H5Dopen2(fid, DSETNAME, H5P_DEFAULT); + CHECK(did, FAIL, "H5Dopen"); + ret = H5Dread(did, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, &rdbuf); + CHECK(ret, FAIL, "H5Dread"); - /* Verify the data read is correct */ - for(i = 0; i < 100; i++) - VERIFY(rdbuf[i], check[i], "test_compatible"); + /* Verify the data read is correct */ + for(i = 0; i < 100; i++) + VERIFY(rdbuf[i], check[i], "test_compatible"); - /* Close the dataset */ - ret = H5Dclose(did); - CHECK(ret, FAIL, "H5Dclose"); + /* Close the dataset */ + ret = H5Dclose(did); + CHECK(ret, FAIL, "H5Dclose"); - /* Remove the dataset */ - ret = H5Ldelete(fid, DSETNAME, H5P_DEFAULT); - CHECK(ret, FAIL, "H5Ldelete"); + /* Remove the dataset */ + ret = H5Ldelete(fid, DSETNAME, H5P_DEFAULT); + CHECK(ret, FAIL, "H5Ldelete"); /* Close the plist */ ret = H5Pclose(fcpl); @@ -4427,30 +4462,30 @@ test_filespace_compatible(void) ret = H5Fclose(fid); CHECK(ret, FAIL, "H5Fclose"); - /* Re-Open the file */ - fid = H5Fopen(FILE5, H5F_ACC_RDONLY, H5P_DEFAULT); - CHECK(fid, FAIL, "H5Fopen"); + /* Re-Open the file */ + fid = H5Fopen(FILE5, H5F_ACC_RDONLY, H5P_DEFAULT); + CHECK(fid, FAIL, "H5Fopen"); - /* The dataset should not be there */ - did = H5Dopen2(fid, DSETNAME, H5P_DEFAULT); - VERIFY(did, FAIL, "H5Dopen"); + /* The dataset should not be there */ + did = H5Dopen2(fid, DSETNAME, H5P_DEFAULT); + VERIFY(did, FAIL, "H5Dopen"); - /* There should not be any free space in the file */ - free_space = H5Fget_freespace(fid); - CHECK(free_space, FAIL, "H5Fget_freespace"); - VERIFY(free_space, (hssize_t)0, "H5Fget_freespace"); + /* There should not be any free space in the file */ + free_space = H5Fget_freespace(fid); + CHECK(free_space, FAIL, "H5Fget_freespace"); + VERIFY(free_space, (hssize_t)0, "H5Fget_freespace"); - /* Close the file */ - ret = H5Fclose(fid); - CHECK(ret, FAIL, "H5Fclose"); + /* Close the file */ + ret = H5Fclose(fid); + CHECK(ret, FAIL, "H5Fclose"); } /* end for */ } /* test_filespace_compatible */ /**************************************************************** ** ** test_filespace_1.10.0_compatible(): -** Verify that the latest file space management can open, read and -** modify 1.10.0 HDF5 files : +** Verify that the latest file space management can open, read and +** modify 1.10.0 HDF5 files : ** h5fc_ext1_i.h5: H5F_FILE_SPACE_ALL, default threshold; has superblock extension but no fsinfo message ** h5fc_ext1_f.h5: H5F_FILE_SPACE_ALL_PERSIST, default threshold; has superblock extension with fsinfo message ** h5fc_ext2_if.h5: H5F_FILE_SPACE_ALL, non-default threshold; has superblock extension with fsinfo message @@ -4464,16 +4499,16 @@ static void test_filespace_1_10_0_compatible(void) { hid_t fid = -1; /* File id */ - hid_t did = -1; /* Dataset id */ + hid_t did = -1; /* Dataset id */ hid_t fcpl; /* File creation property list */ - hbool_t persist; /* Persist free-space or not */ - hsize_t threshold; /* Free-space section threshold */ + hbool_t persist; /* Persist free-space or not */ + hsize_t threshold; /* Free-space section threshold */ H5F_fspace_strategy_t strategy; /* File space handling strategy */ - int wbuf[24]; /* Buffer for dataset data */ - int rdbuf[24]; /* Buffer for dataset data */ + int wbuf[24]; /* Buffer for dataset data */ + int rdbuf[24]; /* Buffer for dataset data */ int status; /* Status from copying the existing file */ unsigned i, j; /* Local index variable */ - herr_t ret; /* Return value */ + herr_t ret; /* Return value */ /* Output message about test being performed */ MESSAGE(5, ("File space compatibility testing for 1.10.0 files\n")); @@ -4481,7 +4516,7 @@ test_filespace_1_10_0_compatible(void) for(j = 0; j < NELMTS(OLD_1_10_0_FILENAME); j++) { /* Make a copy of the test file */ status = h5_make_local_copy(OLD_1_10_0_FILENAME[j], FILE5); - CHECK(status, FAIL, "h5_make_local_copy"); + CHECK(status, FAIL, "h5_make_local_copy"); /* Open the temporary test file */ fid = H5Fopen(FILE5, H5F_ACC_RDWR, H5P_DEFAULT); @@ -4515,7 +4550,7 @@ test_filespace_1_10_0_compatible(void) /* Close the dataset */ ret = H5Dclose(did); CHECK(ret, FAIL, "H5Dclose"); - break; + break; case 1: VERIFY(strategy, H5F_FSPACE_STRATEGY_FSM_AGGR, "H5Pget_file_space_strategy"); @@ -4536,7 +4571,7 @@ test_filespace_1_10_0_compatible(void) /* Close the dataset */ ret = H5Dclose(did); CHECK(ret, FAIL, "H5Dclose"); - break; + break; case 2: VERIFY(strategy, H5F_FSPACE_STRATEGY_FSM_AGGR, "H5Pget_file_space_strategy"); @@ -4557,7 +4592,7 @@ test_filespace_1_10_0_compatible(void) /* Close the dataset */ ret = H5Dclose(did); CHECK(ret, FAIL, "H5Dclose"); - break; + break; case 3: VERIFY(strategy, H5F_FSPACE_STRATEGY_NONE, "H5Pget_file_space_strategy"); @@ -4578,7 +4613,7 @@ test_filespace_1_10_0_compatible(void) /* Close the dataset */ ret = H5Dclose(did); CHECK(ret, FAIL, "H5Dclose"); - break; + break; case 4: VERIFY(strategy, H5F_FSPACE_STRATEGY_AGGR, "H5Pget_file_space_strategy"); @@ -4599,7 +4634,7 @@ test_filespace_1_10_0_compatible(void) /* Close the dataset */ ret = H5Dclose(did); CHECK(ret, FAIL, "H5Dclose"); - break; + break; case 5: VERIFY(strategy, H5F_FSPACE_STRATEGY_FSM_AGGR, "H5Pget_file_space_strategy"); VERIFY(persist, H5F_FREE_SPACE_PERSIST_DEF, "H5Pget_file_space_strategy"); @@ -4619,10 +4654,10 @@ test_filespace_1_10_0_compatible(void) /* Close the dataset */ ret = H5Dclose(did); CHECK(ret, FAIL, "H5Dclose"); - break; + break; default: - break; + break; } /* Close the plist */ @@ -4653,7 +4688,7 @@ test_filespace_1_10_0_compatible(void) /* Close the dataset */ ret = H5Dclose(did); CHECK(ret, FAIL, "H5Dclose"); - break; + break; case 1: /* Open and read the dataset */ @@ -4670,7 +4705,7 @@ test_filespace_1_10_0_compatible(void) /* Close the dataset */ ret = H5Dclose(did); CHECK(ret, FAIL, "H5Dclose"); - break; + break; case 2: /* Open and read the dataset */ @@ -4687,7 +4722,7 @@ test_filespace_1_10_0_compatible(void) /* Close the dataset */ ret = H5Dclose(did); CHECK(ret, FAIL, "H5Dclose"); - break; + break; case 3: /* Open and read the dataset */ @@ -4704,7 +4739,7 @@ test_filespace_1_10_0_compatible(void) /* Close the dataset */ ret = H5Dclose(did); CHECK(ret, FAIL, "H5Dclose"); - break; + break; case 4: @@ -4722,7 +4757,7 @@ test_filespace_1_10_0_compatible(void) /* Close the dataset */ ret = H5Dclose(did); CHECK(ret, FAIL, "H5Dclose"); - break; + break; case 5: @@ -4740,10 +4775,10 @@ test_filespace_1_10_0_compatible(void) /* Close the dataset */ ret = H5Dclose(did); CHECK(ret, FAIL, "H5Dclose"); - break; + break; default: - break; + break; } /* Close the file */ @@ -4756,36 +4791,36 @@ test_filespace_1_10_0_compatible(void) /**************************************************************** ** ** test_filespace_round_compatible(): -** Verify that the trunk can open, read and modify these files-- -** 1) They are initially created (via gen_filespace.c) in the trunk -** with combinations of file space strategies, default/non-default -** threshold, and file spacing paging enabled/disbled. -** The library creates the file space info message with -** "mark if unknown" in these files. -** 2) They are copied to the 1.8 branch, and are opened/read/modified -** there via test_filespace_compatible() in test/tfile.c. -** The 1.8 library marks the file space info message as "unknown" -** in these files. -** 3) They are then copied back from the 1.8 branch to the trunk for -** compatibility testing via this routine. -** 4) Upon encountering the file space info message which is marked -** as "unknown", the library will use the default file space management -** from then on: non-persistent free-space managers, default threshold, -** and non-paging file space. +** Verify that the trunk can open, read and modify these files-- +** 1) They are initially created (via gen_filespace.c) in the trunk +** with combinations of file space strategies, default/non-default +** threshold, and file spacing paging enabled/disbled. +** The library creates the file space info message with +** "mark if unknown" in these files. +** 2) They are copied to the 1.8 branch, and are opened/read/modified +** there via test_filespace_compatible() in test/tfile.c. +** The 1.8 library marks the file space info message as "unknown" +** in these files. +** 3) They are then copied back from the 1.8 branch to the trunk for +** compatibility testing via this routine. +** 4) Upon encountering the file space info message which is marked +** as "unknown", the library will use the default file space management +** from then on: non-persistent free-space managers, default threshold, +** and non-paging file space. ** ****************************************************************/ static void test_filespace_round_compatible(void) { - hid_t fid = -1; /* File id */ - hid_t fcpl = -1; /* File creation property list ID */ - unsigned j; /* Local index variable */ - H5F_fspace_strategy_t strategy; /* File space strategy */ - hbool_t persist; /* Persist free-space or not */ - hsize_t threshold; /* Free-space section threshold */ - hssize_t free_space; /* Amount of free space in the file */ + hid_t fid = -1; /* File id */ + hid_t fcpl = -1; /* File creation property list ID */ + unsigned j; /* Local index variable */ + H5F_fspace_strategy_t strategy; /* File space strategy */ + hbool_t persist; /* Persist free-space or not */ + hsize_t threshold; /* Free-space section threshold */ + hssize_t free_space; /* Amount of free space in the file */ int status; /* Status from copying the existing file */ - herr_t ret; /* Return value */ + herr_t ret; /* Return value */ /* Output message about test being performed */ MESSAGE(5, ("File space compatibility testing for files from trunk to 1_8 to trunk\n")); @@ -4793,31 +4828,31 @@ test_filespace_round_compatible(void) for(j = 0; j < NELMTS(FSPACE_FILENAMES); j++) { /* Make a copy of the test file */ status = h5_make_local_copy(FSPACE_FILENAMES[j], FILE5); - CHECK(status, FAIL, "h5_make_local_copy"); - - /* Open the temporary test file */ - fid = H5Fopen(FILE5, H5F_ACC_RDWR, H5P_DEFAULT); - CHECK(fid, FAIL, "H5Fopen"); - - /* Get the file's creation property list */ - fcpl = H5Fget_create_plist(fid); - CHECK(fcpl, FAIL, "H5Fget_create_plist"); - - ret = H5Pget_file_space_strategy(fcpl, &strategy, &persist, &threshold); - CHECK(ret, FAIL, "H5Pget_file_space_strategy"); - VERIFY(strategy, H5F_FSPACE_STRATEGY_FSM_AGGR, "H5Pget_file_space_strategy"); - VERIFY(persist, FALSE, "H5Pget_file_space_strategy"); - VERIFY(threshold, 1, "H5Pget_file_space_strategy"); - - /* There should not be any free space in the file */ - free_space = H5Fget_freespace(fid); - CHECK(free_space, FAIL, "H5Fget_freespace"); - VERIFY(free_space, (hssize_t)0, "H5Fget_freespace"); - - /* Closing */ - ret = H5Fclose(fid); - ret = H5Pclose(fcpl); - CHECK(ret, FAIL, "H5Fclose"); + CHECK(status, FAIL, "h5_make_local_copy"); + + /* Open the temporary test file */ + fid = H5Fopen(FILE5, H5F_ACC_RDWR, H5P_DEFAULT); + CHECK(fid, FAIL, "H5Fopen"); + + /* Get the file's creation property list */ + fcpl = H5Fget_create_plist(fid); + CHECK(fcpl, FAIL, "H5Fget_create_plist"); + + ret = H5Pget_file_space_strategy(fcpl, &strategy, &persist, &threshold); + CHECK(ret, FAIL, "H5Pget_file_space_strategy"); + VERIFY(strategy, H5F_FSPACE_STRATEGY_FSM_AGGR, "H5Pget_file_space_strategy"); + VERIFY(persist, FALSE, "H5Pget_file_space_strategy"); + VERIFY(threshold, 1, "H5Pget_file_space_strategy"); + + /* There should not be any free space in the file */ + free_space = H5Fget_freespace(fid); + CHECK(free_space, FAIL, "H5Fget_freespace"); + VERIFY(free_space, (hssize_t)0, "H5Fget_freespace"); + + /* Closing */ + ret = H5Fclose(fid); + ret = H5Pclose(fcpl); + CHECK(ret, FAIL, "H5Fclose"); } /* end for */ } /* test_filespace_round_compatible */ @@ -4883,8 +4918,8 @@ test_libver_bounds_real(H5F_libver_t libver_create, unsigned oh_vers_create, CHECK(group, FAIL, "H5Gcreate"); ret = H5Oget_info(group, &oinfo); - CHECK(ret, FAIL, "H5Oget_info_by_name"); - VERIFY(oinfo.hdr.version, oh_vers_mod, "H5Oget_info_by_name"); + CHECK(ret, FAIL, "H5Oget_info"); + VERIFY(oinfo.hdr.version, oh_vers_mod, "H5Oget_info"); ret = H5Gclose(group); CHECK(ret, FAIL, "H5Gclose"); @@ -4917,6 +4952,134 @@ test_libver_bounds_real(H5F_libver_t libver_create, unsigned oh_vers_create, CHECK(ret, FAIL, "H5Pclose"); } /* end test_libver_bounds_real() */ + +/*------------------------------------------------------------------------- + * Function: test_libver_bounds_open + * + * Purpose: Tests opening latest file with various low/high bounds. + * + * Return: Success: 0 + * Failure: number of errors + * + *------------------------------------------------------------------------- + */ +#define VERBFNAME "tverbounds_dspace.h5" +#define VERBDSNAME "dataset 1" +#define SPACE1_DIM1 3 +static int +test_libver_bounds_open(void) +{ + hid_t file = -1; /* File ID */ + hid_t space = -1; /* Dataspace ID */ + hid_t dset = -1; /* Dataset ID */ + hid_t fapl = -1; /* File access property list ID */ + hid_t new_fapl = -1;/* File access property list ID for reopened file */ + hid_t dcpl = -1; /* Dataset creation property list ID */ + hsize_t dim[1] = {SPACE1_DIM1}; /* Dataset dimensions */ + H5F_libver_t low, high; /* File format bounds */ + hsize_t chunk_dim[1] = {SPACE1_DIM1}; /* Chunk dimensions */ + herr_t ret; /* Generic return value */ + + /* Output message about test being performed */ + MESSAGE(5, ("Testing Opening File in Various Version Bounds\n")); + + /* Create a file access property list */ + fapl = H5Pcreate(H5P_FILE_ACCESS); + CHECK(fapl, FAIL, "H5Pcreate"); + + /* Create dataspace */ + space = H5Screate_simple(1, dim, NULL); + CHECK(space, FAIL, "H5Screate_simple"); + + /* Create a dataset creation property list */ + dcpl = H5Pcreate(H5P_DATASET_CREATE); + CHECK(dcpl, FAIL, "H5Pcreate"); + + /* Create and set chunk plist */ + ret = H5Pset_chunk(dcpl, 1, chunk_dim); + CHECK(ret, FAIL, "H5Pset_chunk"); + ret = H5Pset_deflate(dcpl, 9); + CHECK(ret, FAIL, "H5Pset_deflate"); + ret = H5Pset_chunk_opts(dcpl, H5D_CHUNK_DONT_FILTER_PARTIAL_CHUNKS); + CHECK(ret, FAIL, "H5Pset_chunk_opts"); + + /* Create a file with (LATEST, LATEST) bounds, create a layout version 4 + dataset, then close the file */ + + /* Set version bounds to (LATEST, LATEST) */ + low = H5F_LIBVER_LATEST; + high = H5F_LIBVER_LATEST; + ret = H5Pset_libver_bounds(fapl, low, high); + CHECK(ret, FAIL, "H5Pset_libver_bounds"); + + /* Create the file */ + file = H5Fcreate(VERBFNAME, H5F_ACC_TRUNC, H5P_DEFAULT, fapl); + CHECK(file, FAIL, "H5Fcreate"); + + /* Create dataset */ + dset = H5Dcreate2(file, VERBDSNAME, H5T_NATIVE_INT, space, H5P_DEFAULT, dcpl, H5P_DEFAULT); + CHECK(dset, FAIL, "H5Dcreate2"); + + /* Close dataset and file */ + ret = H5Dclose(dset); + CHECK(ret, FAIL, "H5Dclose"); + ret = H5Fclose(file); + CHECK(ret, FAIL, "H5Fclose"); + + /* Attempt to open latest file with (earliest, v18), should fail */ + ret = H5Pset_libver_bounds(fapl, H5F_LIBVER_EARLIEST, H5F_LIBVER_V18); + H5E_BEGIN_TRY { + file = H5Fopen(VERBFNAME, H5F_ACC_RDONLY, fapl); + } H5E_END_TRY; + VERIFY(file, FAIL, "Attempted to open latest file with earliest version"); + + /* Attempt to open latest file with (v18, v18), should fail */ + ret = H5Pset_libver_bounds(fapl, H5F_LIBVER_V18, H5F_LIBVER_V18); + H5E_BEGIN_TRY { + file = H5Fopen(VERBFNAME, H5F_ACC_RDONLY, fapl); + } H5E_END_TRY; + VERIFY(file, FAIL, "Attempted to open latest file with v18 bounds"); + + /* Opening VERBFNAME in these combination should succeed. + For each low bound, verify that it is upgraded properly */ + high = H5F_LIBVER_LATEST; + for (low = H5F_LIBVER_EARLIEST; low < H5F_LIBVER_NBOUNDS; low++) + { + H5F_libver_t new_low = H5F_LIBVER_EARLIEST; + + /* Set version bounds for opening file */ + ret = H5Pset_libver_bounds(fapl, low, high); + CHECK(ret, FAIL, "H5Pset_libver_bounds"); + + /* Open the file */ + file = H5Fopen(VERBFNAME, H5F_ACC_RDONLY, fapl); + CHECK(file, FAIL, "H5Fopen"); + + /* Get the new file access property */ + new_fapl = H5Fget_access_plist(file); + CHECK(new_fapl, FAIL, "H5Fget_access_plist"); + + /* Get new low bound and verify that it has been upgraded properly */ + ret = H5Pget_libver_bounds(new_fapl, &new_low, NULL); + CHECK(ret, FAIL, "H5Pget_libver_bounds"); + VERIFY(new_low, H5F_LIBVER_LATEST, "Low bound should be upgraded to H5F_LIBVER_LATEST"); + + ret = H5Pclose(new_fapl); + CHECK(ret, FAIL, "H5Pclose"); + ret = H5Fclose(file); + CHECK(ret, FAIL, "H5Fclose"); + } /* for low */ + + /* Close dataspace and property lists */ + ret = H5Sclose(space); + CHECK(ret, FAIL, "H5Sclose"); + ret = H5Pclose(dcpl); + CHECK(ret, FAIL, "H5Pclose"); + ret = H5Pclose(fapl); + CHECK(ret, FAIL, "H5Pclose"); +} /* end test_libver_bounds_open() */ + + /**************************************************************** ** ** test_libver_bounds(): @@ -4934,131 +5097,1843 @@ test_libver_bounds(void) /* Run the tests */ test_libver_bounds_real(H5F_LIBVER_EARLIEST, 1, H5F_LIBVER_LATEST, 2); test_libver_bounds_real(H5F_LIBVER_LATEST, 2, H5F_LIBVER_EARLIEST, 2); + test_libver_bounds_open(); } /* end test_libver_bounds() */ -/**************************************************************** +/************************************************************************************** ** -** test_libver_macros(): -** Verify that H5_VERSION_GE and H5_VERSION_LE work correactly. +** test_libver_bounds_low_high(): +** Tests to verify that format versions are correct with the following five +** pairs of low/high version bounds set in fapl via H5Pset_libver_bounds(): +** (1) (earliest, v18) +** (2) (earliest, v110) +** (3) (v18, v18) +** (4) (v18, v110) +** (5) (v110, v110) ** -****************************************************************/ +** For each pair of setting in fapl, verify format versions with the following +** six tests: +** (1) test_libver_bounds_super(fapl): superblock versions +** (2) test_libver_bounds_obj(fapl): object header versions +** (3) test_libver_bounds_dataset(fapl): message versions associated with dataset +** (4) test_libver_bounds_dataspace(fapl): dataspace message versions +** (5) test_libver_bounds_datatype(fapl): datatype message versions +** (6) test_libver_bounds_attributes(fapl): attribute message versions +** +**************************************************************************************/ static void -test_libver_macros(void) +test_libver_bounds_low_high(void) { - int major = H5_VERS_MAJOR; - int minor = H5_VERS_MINOR; - int release = H5_VERS_RELEASE; + hid_t fapl = -1; /* File access property list */ + H5F_libver_t low, high; /* Low and high bounds */ + herr_t ret; /* The return value */ /* Output message about test being performed */ - MESSAGE(5, ("Testing macros for library version comparison\n")); + MESSAGE(5, ("Testing setting (low, high) format version bounds\n")); - VERIFY(H5_VERSION_GE(major,minor,release), TRUE, "H5_VERSION_GE"); - VERIFY(H5_VERSION_GE(major-1,minor,release), TRUE, "H5_VERSION_GE"); - VERIFY(H5_VERSION_GE(major-1,minor+1,release), TRUE, "H5_VERSION_GE"); - VERIFY(H5_VERSION_GE(major-1,minor,release+1), TRUE, "H5_VERSION_GE"); - VERIFY(H5_VERSION_GE(major,minor-1,release), TRUE, "H5_VERSION_GE"); - VERIFY(H5_VERSION_GE(major,minor-1,release+1), TRUE, "H5_VERSION_GE"); - if(H5_VERS_RELEASE > 0) - VERIFY(H5_VERSION_GE(major,minor,release-1), TRUE, "H5_VERSION_GE"); + /* Create a file access property list */ + fapl = H5Pcreate(H5P_FILE_ACCESS); + CHECK(fapl, FAIL, "H5Pcreate"); - VERIFY(H5_VERSION_GE(major+1,minor,release), FALSE, "H5_VERSION_GE"); - VERIFY(H5_VERSION_GE(major+1,minor-1,release), FALSE, "H5_VERSION_GE"); - VERIFY(H5_VERSION_GE(major+1,minor-1,release-1), FALSE, "H5_VERSION_GE"); - VERIFY(H5_VERSION_GE(major,minor+1,release), FALSE, "H5_VERSION_GE"); - VERIFY(H5_VERSION_GE(major,minor+1,release-1), FALSE, "H5_VERSION_GE"); - VERIFY(H5_VERSION_GE(major,minor,release+1), FALSE, "H5_VERSION_GE"); + /* Loop through all the combinations of low/high version bounds */ + for(low = H5F_LIBVER_EARLIEST; low < H5F_LIBVER_NBOUNDS; low++) + for(high = H5F_LIBVER_EARLIEST; high < H5F_LIBVER_NBOUNDS; high++) { - VERIFY(H5_VERSION_LE(major,minor,release), TRUE, "H5_VERSION_LE"); - VERIFY(H5_VERSION_LE(major+1,minor,release), TRUE, "H5_VERSION_LE"); - VERIFY(H5_VERSION_LE(major+1,minor-1,release), TRUE, "H5_VERSION_LE"); - VERIFY(H5_VERSION_LE(major+1,minor-1,release-1), TRUE, "H5_VERSION_LE"); - VERIFY(H5_VERSION_LE(major,minor+1,release), TRUE, "H5_VERSION_LE"); - VERIFY(H5_VERSION_LE(major,minor+1,release-1), TRUE, "H5_VERSION_LE"); - VERIFY(H5_VERSION_LE(major,minor,release+1), TRUE, "H5_VERSION_LE"); + H5E_BEGIN_TRY { + /* Set the low/high version bounds */ + ret = H5Pset_libver_bounds(fapl, low, high); + } H5E_END_TRY; - VERIFY(H5_VERSION_LE(major-1,minor,release), FALSE, "H5_VERSION_LE"); - VERIFY(H5_VERSION_LE(major-1,minor+1,release), FALSE, "H5_VERSION_LE"); - VERIFY(H5_VERSION_LE(major-1,minor+1,release+1), FALSE, "H5_VERSION_LE"); - VERIFY(H5_VERSION_LE(major,minor-1,release), FALSE, "H5_VERSION_LE"); - VERIFY(H5_VERSION_LE(major,minor-1,release+1), FALSE, "H5_VERSION_LE"); - if(H5_VERS_RELEASE > 0) - VERIFY(H5_VERSION_LE(major,minor,release-1), FALSE, "H5_VERSION_LE"); -} /* test_libver_macros() */ + /* Should fail: invalid combinations */ + if(high == H5F_LIBVER_EARLIEST) { + VERIFY(ret, FAIL, "H5Pset_libver_bounds"); + continue; + } -/**************************************************************** + /* Should fail: invalid combinations */ + if(high < low) { + VERIFY(ret, FAIL, "H5Pset_libver_bounds"); + continue; + } + + /* All other combinations are valid and should succeed */ + VERIFY(ret, SUCCEED, "H5Pset_libver_bounds"); + + /* Tests to verify version bounds */ + test_libver_bounds_super(fapl); + test_libver_bounds_obj(fapl); + test_libver_bounds_dataset(fapl); + test_libver_bounds_dataspace(fapl); + test_libver_bounds_datatype(fapl); + test_libver_bounds_attributes(fapl); + } + + ret = H5Pclose(fapl); + CHECK(ret, FAIL, "H5Pclose"); + +} /* end test_libver_bounds_low_high() */ + + +/*********************************************************************** ** -** test_libver_macros2(): -** Verify that H5_VERSION_GE works correactly and show how -** to use it. +** test_libver_bounds_super(): +** Verify superblock version with the following two tests: +** (1) test_libver_bounds_super_create(): +** --when creating a file with the input fapl and the fcpl +** that has the following feature enabled: +** (A) default fcpl +** (B) fcpl with v1-btee K value enabled +** (C) fcpl with shared messages enabled +** (D) fcpl with persistent free-space manager enabled ** -****************************************************************/ +** (2) test_libver_bounds_super_open(): +** --when opening a file which is created with the input fapl +** and the fcpl setting as #A to #D above. +** +** These two tests are run with or without SWMR file access. +** +*************************************************************************/ static void -test_libver_macros2(void) +test_libver_bounds_super(hid_t fapl) { - hid_t file; - hid_t grp; - htri_t status; - herr_t ret; /* Return value */ + hid_t fcpl = -1; /* File creation property list */ + herr_t ret; /* The return value */ - /* Output message about test being performed */ - MESSAGE(5, ("Testing macros for library version comparison with a file\n")); + /* Create a default fcpl: #A */ + /* This will result in superblock version 0 */ + fcpl = H5Pcreate(H5P_FILE_CREATE); + CHECK(fcpl, FAIL, "H5Pcreate"); - /* - * Create a file. - */ - file = H5Fcreate(FILE6, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT); - CHECK(file, FAIL, "H5Fcreate"); + /* Verify superblock version when creating a file with input fapl, + fcpl #A and with/without SWMR access */ + test_libver_bounds_super_create(fapl, fcpl, TRUE); + test_libver_bounds_super_create(fapl, fcpl, FALSE); - /* - * Create a group in the file. - */ - grp = H5Gcreate2(file, "Group", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); - CHECK(file, FAIL, "H5Gcreate"); + /* Verify superblock version when opening a file which is created + with input fapl, fcpl #A and with/without SWMR access */ + test_libver_bounds_super_open(fapl, fcpl, TRUE); + test_libver_bounds_super_open(fapl, fcpl, FALSE); - /* - * Close the group - */ - ret = H5Gclose(grp); - CHECK(ret, FAIL, "H5Gclose"); + /* Close the fcpl */ + ret = H5Pclose(fcpl); + CHECK(ret, FAIL, "H5Pclose"); - /* - * Delete the group using different function based on the library version. - * And verify the action. - */ -#if H5_VERSION_GE(1,8,0) - ret = H5Ldelete(file, "Group", H5P_DEFAULT); - CHECK(ret, FAIL, "H5Lunlink"); + /* Create a fcpl with v1-btree K value enabled: #B */ + /* This will result in superblock version 1 */ + fcpl = H5Pcreate(H5P_FILE_CREATE); + CHECK(fcpl, FAIL, "H5Pcreate"); + ret = H5Pset_istore_k(fcpl, 64); + CHECK(ret, FAIL, "H5Pset_istore_k"); - status = H5Lexists(file, "Group", H5P_DEFAULT); - VERIFY(status, FALSE, "H5Lexists"); -#else - ret = H5Gunlink(file, "Group"); - CHECK(ret, FAIL, "H5Gunlink"); + /* Verify superblock version when creating a file with input fapl, + fcpl #B and with/without SWMR access */ + test_libver_bounds_super_create(fapl, fcpl, TRUE); + test_libver_bounds_super_create(fapl, fcpl, FALSE); - H5E_BEGIN_TRY { - grp = H5Gopen(file, "Group"); - } H5E_END_TRY; - VERIFY(grp, FAIL, "H5Gopen"); -#endif + /* Verify superblock version when opening a file which is created + with input fapl, fcpl #B and with/without SWMR access */ + test_libver_bounds_super_open(fapl, fcpl, TRUE); + test_libver_bounds_super_open(fapl, fcpl, FALSE); - /* - * Close the file. - */ - ret = H5Fclose(file); - CHECK(ret, FAIL, "H5Fclose"); + /* Close the fcpl */ + ret = H5Pclose(fcpl); + CHECK(ret, FAIL, "H5Pclose"); -} /* test_libver_macros2() */ + /* Create a fcpl with shared messages enabled: #C */ + /* This will result in superblock version 2 */ + fcpl = H5Pcreate(H5P_FILE_CREATE); + CHECK(fcpl, FAIL, "H5Pcreate"); + ret = H5Pset_shared_mesg_nindexes(fcpl, 1); + CHECK(ret, FAIL, "H5Pset_shared_mesg_nindexes"); + ret = H5Pset_shared_mesg_index(fcpl, 0, H5O_SHMESG_ATTR_FLAG, 2); + CHECK(ret, FAIL, "H5Pset_shared_mesg_index"); + + /* Verify superblock version when creating a file with input fapl, + fcpl #C and with/without SWMR access */ + test_libver_bounds_super_create(fapl, fcpl, TRUE); + test_libver_bounds_super_create(fapl, fcpl, FALSE); + + /* Verify superblock version when opening a file which is created + with input fapl, fcpl #C and with/without SWMR access */ + test_libver_bounds_super_open(fapl, fcpl, TRUE); + test_libver_bounds_super_open(fapl, fcpl, FALSE); + + /* Close the fcpl */ + ret = H5Pclose(fcpl); + CHECK(ret, FAIL, "H5Pclose"); -/**************************************************************** + /* Create a fcpl with persistent free-space manager enabled: #D */ + /* This will result in superblock version 2 */ + fcpl = H5Pcreate(H5P_FILE_CREATE); + CHECK(fcpl, FAIL, "H5Pcreate"); + ret = H5Pset_file_space_strategy(fcpl, H5F_FSPACE_STRATEGY_FSM_AGGR, 1, (hsize_t)1); + CHECK(ret, FAIL, "H5Pset_file_space"); + + /* Verify superblock version when creating a file with input fapl, + fcpl #D and with/without SWMR access */ + test_libver_bounds_super_create(fapl, fcpl, TRUE); + test_libver_bounds_super_create(fapl, fcpl, FALSE); + + /* Verify superblock version when opening a file which is created + with input fapl, fcpl #D and with/without SWMR access */ + test_libver_bounds_super_open(fapl, fcpl, TRUE); + test_libver_bounds_super_open(fapl, fcpl, FALSE); + + /* Close the fcpl */ + ret = H5Pclose(fcpl); + CHECK(ret, FAIL, "H5Pclose"); + +} /* end test_libver_bounds_super() */ + + +/************************************************************************************************** ** -** test_deprec(): -** Test deprecated functionality. +** test_libver_bounds_super_create(): +** Verify the following when the file is created with the input fapl, fcpl, and +** with/without SWMR access: +** (a) the superblock version # +** (b) the file's low bound setting +** (c) fail or succeed in creating the file ** -****************************************************************/ -#ifndef H5_NO_DEPRECATED_SYMBOLS -static void -test_deprec(void) -{ +** For file creation, the bounds setting in fapl, the feature enabled in fcpl, +** and with/without SWMR file access will determine the results for #a to #c. +** +** The first row for the following two tables is the 5 pairs of low/high bounds setting +** in the input fapl. The next three rows list the expected results for #a to #c. +** "-->" indicates "upgrade to" +** +** Creating a file with write access +** -------------------------------------------------------------------------------- +** | (earliest, v18) | (earliest, v110) | (v18, v18) | (v18, v110) | (v110, v110) | +** |______________________________________________________________________________| +** Superblock version | vers 0, 1, 2 | vers 0, 1, 2 | vers 2 | vers 2 | vers 3 | +** |------------------------------------------------------------------------------| +** File's low bound | no change | +** |------------------------------------------------------------------------------| +** File creation | succeed | +** |______________________________________________________________________________| +** +** Creating a file with SWMR-write access +** -------------------------------------------------------------------------------- +** | (earliest, v18) | (earliest, v110) | (v18, v18) | (v18, v110) | (v110, v110) | +** |______________________________________________________________________________| +** Superblock version | -- | vers 3 | -- | vers 3 | vers 3 | +** |------------------------------------------------------------------------------| +** File's low bound | -- | ->v110 | -- | ->v110 | no change | +** |------------------------------------------------------------------------------| +** File creation | fail | succeed | fail | succeed | succed | +** |______________________________________________________________________________| +** +******************************************************************************************************/ +static void +test_libver_bounds_super_create(hid_t fapl, hid_t fcpl, htri_t is_swmr) +{ + hid_t fid = -1; /* File ID */ + H5F_t *f = NULL; /* Internal file pointer */ + H5F_libver_t low, high; /* Low and high bounds */ + hbool_t ok; /* The result is ok or not */ + herr_t ret; /* The return value */ + + /* Try to create the file */ + H5E_BEGIN_TRY { + fid = H5Fcreate(FILE8, H5F_ACC_TRUNC | (is_swmr ? H5F_ACC_SWMR_WRITE : 0), fcpl, fapl); + } H5E_END_TRY; + + /* Get the internal file pointer if the create succeeds */ + if((ok = fid >= 0)) { + f = (H5F_t *)H5I_object(fid); + CHECK(f, NULL, "H5I_object"); + } + + /* Retrieve the low/high bounds */ + ret = H5Pget_libver_bounds(fapl, &low, &high); + CHECK(ret, FAIL, "H5Pget_libver_bounds"); + + if(is_swmr) { /* SWMR is enabled */ + + if(high == H5F_LIBVER_LATEST) { /* Should succeed */ + VERIFY(ok, TRUE, "H5Fcreate"); + VERIFY(HDF5_SUPERBLOCK_VERSION_3, f->shared->sblock->super_vers, "HDF5_superblock_ver_bounds"); + VERIFY(H5F_LIBVER_V110, f->shared->low_bound, "HDF5_superblock_ver_bounds"); + + } else /* Should fail */ + VERIFY(ok, FALSE, "H5Fcreate"); + + } else { /* Should succeed */ + VERIFY(ok, TRUE, "H5Fcreate"); + VERIFY(low, f->shared->low_bound, "HDF5_superblock_ver_bounds"); + + switch(low) { + case H5F_LIBVER_EARLIEST: + ok = (f->shared->sblock->super_vers == 0 || + f->shared->sblock->super_vers == 1 || + f->shared->sblock->super_vers == 2); + VERIFY(ok, TRUE, "HDF5_superblock_ver_bounds"); + break; + + case H5F_LIBVER_V18: + ok = (f->shared->sblock->super_vers == 2); + VERIFY(ok, TRUE, "HDF5_superblock_ver_bounds"); + break; + + case H5F_LIBVER_V110: + ok = (f->shared->sblock->super_vers == 3); + VERIFY(ok, TRUE, "HDF5_superblock_ver_bounds"); + break; + + case H5F_LIBVER_ERROR: + case H5F_LIBVER_NBOUNDS: + default: + ERROR("H5Pget_libver_bounds"); + + } /* end switch */ + } + + if(ok) { /* Close the file */ + ret = H5Fclose(fid); + CHECK(ret, FAIL, "H5Fclose"); + } + +} /* end test_libver_bounds_super_create() */ + +/************************************************************************************************** +** +** test_libver_bounds_super_open(): +** Verify the following when opening a file which is created with the input fapl, fcpl, +** and with/without SWMR access: +** (a) the file's low bound setting +** (b) fail or succeed in opening the file +** +** (1) Create a file with the input fapl, fcpl and with/without SWMR access +** (2) Close the file +** (3) Reopen the file with a new fapl that is set to the 5 pairs of low/high bounds +** in a for loop. For each pair of setting in the new fapl: +** --Verify the expected results for #a and #b above. +** --Close the file. +** +** For file open, the file's superblock version, the low/high bounds setting in fapl, +** and with/without SWMR file access will determine the results for #a and #b. +** +** The first row for the following tables is the 5 pairs of low/high bounds setting +** in the input fapl. The next two rows list the expected results for #a and #b. +** "-->" indicates "upgrade to" +** +** Opening a file with write access +** +** Superblock version 0, 1 +** -------------------------------------------------------------------------------- +** | (earliest, v18) | (earliest, v110) | (v18, v18) | (v18, v110) | (v110, v110) | +** |______________________________________________________________________________| +** File's low bound | no change | +** |------------------------------------------------------------------------------| +** File open | succeed | +** |______________________________________________________________________________| +** +** +** Superblock version 2 +** -------------------------------------------------------------------------------- +** | (earliest, v18) | (earliest, v110) | (v18, v18) | (v18, v110) | (v110, v110) | +** |______________________________________________________________________________| +** File's low bound | -->v18 | no change | +** |------------------------------------------------------------------------------| +** File open | succeed | +** |______________________________________________________________________________| +** +** Superblock version 3 +** -------------------------------------------------------------------------------- +** | (earliest, v18) | (earliest, v110) | (v18, v18) | (v18, v110) | (v110, v110) | +** |______________________________________________________________________________| +** File's low bound | -- | -->v110 | -- | -->v110 | no change | +** |------------------------------------------------------------------------------| +** File open | fail | succeed | fail | succeed | succeed | +** |______________________________________________________________________________| +** +** +** +** Opening a file with SWMR-write access +** +** Superblock version 0, 1, 2 +** ------------------------------------------------------------------------------- +** | (earliest, v18) | (earliest, v10) | (v18, v18) | (v18, v110) | (v110, v110) | +** |_____________________________________________________________________________| +** File's low bound | ---- +** |-----------------------------------------------------------------------------| +** File open | fail +** |_____________________________________________________________________________| +** +** +** Superblock version 3 +** ------------------------------------------------------------------------------- +** | (earliest, v18) | (earliest, v10) | (v18, v18) | (v18, v110) | (v110, v110) | +** |_____________________________________________________________________________| +** File's low bound | -- | -->v110 | -- | -->v110 | no change | +** |-----------------------------------------------------------------------------| +** File open | fail | succeed | fail | succeed | succeed | +** |_____________________________________________________________________________| +** +** +******************************************************************************************************/ +static void +test_libver_bounds_super_open(hid_t fapl, hid_t fcpl, htri_t is_swmr) +{ + hid_t fid = -1; /* File ID */ + H5F_t *f = NULL; /* Internal file pointer */ + hid_t new_fapl = -1; /* File access property list */ + unsigned super_vers; /* Superblock version */ + H5F_libver_t low, high; /* Low and high bounds */ + hbool_t ok; /* The result is ok or not */ + herr_t ret; /* Return value */ + + /* Create the file with the input fcpl and fapl */ + fid = H5Fcreate(FILE8, H5F_ACC_TRUNC, fcpl, fapl); + CHECK(fid, FAIL, "H5Fcreate"); + + /* Get the internal file pointer */ + f = (H5F_t *)H5I_object(fid); + CHECK(f, NULL, "H5I_object"); + + /* The file's superblock version */ + super_vers = f->shared->sblock->super_vers; + + /* Close the file */ + ret = H5Fclose(fid); + CHECK(ret, FAIL, "H5Fclose"); + + /* Create a default file access property list */ + new_fapl = H5Pcreate(H5P_FILE_ACCESS); + CHECK(new_fapl, FAIL, "H5Pcreate"); + + /* Loop through all the combinations of low/high bounds in new_fapl */ + for(low = H5F_LIBVER_EARLIEST; low < H5F_LIBVER_NBOUNDS; low++) { + for(high = H5F_LIBVER_EARLIEST; high < H5F_LIBVER_NBOUNDS; high++) { + H5E_BEGIN_TRY { + ret = H5Pset_libver_bounds(new_fapl, low, high); + } H5E_END_TRY; + + /* Invalid combinations */ + if (ret < 0) + continue; + + /* Open the file with or without SWMR access */ + H5E_BEGIN_TRY { + fid = H5Fopen(FILE8, H5F_ACC_RDWR | (is_swmr ? H5F_ACC_SWMR_WRITE : 0), new_fapl); + } H5E_END_TRY; + + /* Get the internal file pointer if the open succeeds */ + if((ok = fid >= 0)) { + f = (H5F_t *)H5I_object(fid); + CHECK(f, NULL, "H5I_object"); + } + + /* Verify the file open succeeds or fails */ + switch(super_vers) { + case 3: + if(high == H5F_LIBVER_LATEST) { + /* Should succeed */ + VERIFY(ok, TRUE, "H5Fopen"); + VERIFY(H5F_LIBVER_V110, f->shared->low_bound, "HDF5_superblock_ver_bounds"); + + /* Close the file */ + ret = H5Fclose(fid); + CHECK(ret, FAIL, "H5Fclose"); + } else /* Should fail */ + VERIFY(ok, FALSE, "H5Fopen"); + break; + + case 2: + if(is_swmr) /* Should fail */ + VERIFY(ok, FALSE, "H5Fopen"); + else { /* Should succeed */ + VERIFY(ok, TRUE, "H5Fopen"); + + ok = f->shared->low_bound >= H5F_LIBVER_V18; + VERIFY(ok, TRUE, "HDF5_superblock_ver_bounds"); + + /* Close the file */ + ret = H5Fclose(fid); + CHECK(ret, FAIL, "H5Fclose"); + } + break; + + case 1: + case 0: + if(is_swmr) /* Should fail */ + VERIFY(ok, FALSE, "H5Fopen"); + else { /* Should succeed */ + VERIFY(ok, TRUE, "H5Fopen"); + VERIFY(low, f->shared->low_bound, "HDF5_superblock_ver_bounds"); + + ret = H5Fclose(fid); + CHECK(ret, FAIL, "H5Fclose"); + } + break; + + default: + break; + } /* end switch */ + } /* end for */ + } /* end for */ + + /* Close the file access property list */ + ret = H5Pclose(new_fapl); + CHECK(ret, FAIL, "H5Pclose"); + +} /* end test_libver_bounds_super_open() */ + +/**************************************************************** +** +** test_libver_bounds_obj(): +** Verify object header versions: +** +** (a) Create a file with: +** --the input fapl +** --a fcpl that has shared message enabled +** Verify the root group's object header version. +** Close the file. +** +** (b) Create another file with: +** --the input fapl +** --a default fcpl +** Verify the root group's object header version. +** Close the file. +** +** (c) Reopen the same file in (b) with a new fapl. +** The new fapl is set to the 5 pairs of low/high +** bounds in a "for" loop. For each setting in fapl: +** --Create a group in the file +** --Verify the group's object header version +** --Close and delete the group +** --Close the file +** +****************************************************************/ +static void +test_libver_bounds_obj(hid_t fapl) +{ + hid_t fid = -1; /* File ID */ + hid_t gid = -1; /* Group ID */ + hid_t fcpl = -1; /* File creation property list */ + hid_t new_fapl = -1; /* File access property list */ + H5F_t *f = NULL; /* Internal file pointer */ + H5F_libver_t low, high; /* Low and high bounds */ + H5O_info_t oinfo; /* Object info */ + H5G_info_t ginfo; /* Group info */ + herr_t ret; /* Return value */ + + /* Retrieve the low/high bounds from the input fapl */ + ret = H5Pget_libver_bounds(fapl, &low, &high); + CHECK(ret, FAIL, "H5Pget_libver_bounds"); + + /* Create a default file creation property list */ + fcpl = H5Pcreate(H5P_FILE_CREATE); + CHECK(fcpl, FAIL, "H5Pcreate"); + + /* Enable shared message in the fcpl */ + /* This will result in a version 2 object header */ + ret = H5Pset_shared_mesg_nindexes(fcpl, 1); + CHECK(ret, FAIL, "H5Pset_shared_mesg_nindexes"); + ret = H5Pset_shared_mesg_index(fcpl, 0, H5O_SHMESG_ATTR_FLAG, 2); + CHECK(ret, FAIL, "H5Pset_shared_mesg_index"); + + /* Create the file with the fcpl and the input fapl */ + fid = H5Fcreate(FILE8, H5F_ACC_TRUNC, fcpl, fapl); + CHECK(fid, FAIL, "H5Fcreate"); + + /* Get root group's object info */ + ret = H5Oget_info_by_name(fid, "/", &oinfo, H5P_DEFAULT); + CHECK(ret, FAIL, "H5Oget_info_by_name"); + + /* Verify object header version is 2 because shared message is enabled */ + VERIFY(oinfo.hdr.version, H5O_VERSION_2, "H5O_obj_ver_bounds"); + + /* Close the file */ + ret = H5Fclose(fid); + CHECK(ret, FAIL, "H5Fclose"); + + /* Close the file creation property list */ + ret = H5Pclose(fcpl); + CHECK(ret, FAIL, "H5Pclose"); + + /* Create a file with the default fcpl and input fapl */ + fid = H5Fcreate(FILE8, H5F_ACC_TRUNC, H5P_DEFAULT, fapl); + CHECK(fid, FAIL, "H5Fcreate"); + + /* Get root group's object info */ + ret = H5Oget_info_by_name(fid, "/", &oinfo, H5P_DEFAULT); + CHECK(ret, FAIL, "H5Oget_info_by_name"); + + /* Verify object header version is as indicated by low_bound */ + VERIFY(oinfo.hdr.version, H5O_obj_ver_bounds[low], "H5O_obj_ver_bounds"); + + /* Close the file */ + ret = H5Fclose(fid); + CHECK(ret, FAIL, "H5Fclose"); + + /* Create a new default file access property list which + is used to open the file in the "for" loop */ + new_fapl = H5Pcreate(H5P_FILE_ACCESS); + CHECK(new_fapl, FAIL, "H5Pcreate"); + + /* Loop through all the combinations of low/high bounds in new_fapl */ + /* Open the file with the fapl; create a group and verify the + object header version, then delete the group and close the file.*/ + for(low = H5F_LIBVER_EARLIEST; low < H5F_LIBVER_NBOUNDS; low++) { + for(high = H5F_LIBVER_EARLIEST; high < H5F_LIBVER_NBOUNDS; high++) { + H5E_BEGIN_TRY { + ret = H5Pset_libver_bounds(new_fapl, low, high); + } H5E_END_TRY; + + if (ret < 0) /* Invalid combinations */ + continue; + + /* Open the file */ + H5E_BEGIN_TRY { + fid = H5Fopen(FILE8, H5F_ACC_RDWR, new_fapl); + } H5E_END_TRY; + + if(fid >=0 ) { /* The file open succeeds */ + + /* Get the internal file pointer */ + f = (H5F_t *)H5I_object(fid); + CHECK(f, NULL, "H5I_object"); + + /* Create a group in the file */ + gid = H5Gcreate2(fid, GRP_NAME, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); + CHECK(gid, FAIL, "H5Gcreate2"); + + /* Get group information */ + ret = H5Gget_info(gid, &ginfo); + CHECK(ret, FAIL, "H5Gget_info"); + + /* Verify group storage type */ + if(f->shared->low_bound >= H5F_LIBVER_V18) + /* Links in group are stored in object header */ + VERIFY(ginfo.storage_type, H5G_STORAGE_TYPE_COMPACT, "H5Gget_info"); + else + /* Links in group are stored with a "symbol table" */ + VERIFY(ginfo.storage_type, H5G_STORAGE_TYPE_SYMBOL_TABLE, "H5Gget_info"); + + /* Get object header information */ + ret = H5Oget_info_by_name(gid, GRP_NAME, &oinfo, H5P_DEFAULT); + CHECK(ret, FAIL, "H5Oget_info_by_name"); + + /* Verify object header version as indicated by low_bound */ + VERIFY(oinfo.hdr.version, H5O_obj_ver_bounds[f->shared->low_bound], "H5O_obj_ver_bounds"); + + /* Close the group */ + ret = H5Gclose(gid); + CHECK(ret, FAIL, "H5Gclose"); + + /* Delete the group */ + ret = H5Ldelete(fid, GRP_NAME, H5P_DEFAULT); + CHECK(ret, FAIL, "H5Ldelete"); + + /* Close the file */ + ret = H5Fclose(fid); + CHECK(ret, FAIL, "H5Fclose"); + + } /* end if */ + } /* end for */ + } /* end for */ + + /* Close the file access property list */ + ret = H5Pclose(new_fapl); + CHECK(ret, FAIL, "H5Pclose"); + +} /* end test_libver_bounds_obj() */ + +/**************************************************************** +** +** test_libver_bounds_dataset(): +** Verify message versions associated with datasets: +** +** (a) Create a file with default fcpl and the input fapl. +** Create the following two datasets: +** --A contiguous dataset +** --A chunked dataset with "no filter edge chunks" +** For both datasets, verify the versions for the layout, +** fill value and filter pipeline messages. +** Close the file. +** +** (b) Create a new fapl that is set to the 5 pairs of low/high +** bounds in a "for" loop. For each pair of setting in the +** new fapl: +** --Open the same file in (a) with the fapl +** --Create a chunked dataset with 2 unlimited +** dimensions +** --Verify the versions for the layout, fill value +** and filter pipeline messages +** --Close and delete the dataset +** --Close the file +** +****************************************************************/ +static void +test_libver_bounds_dataset(hid_t fapl) +{ + hid_t fid = -1; /* File ID */ + hid_t new_fapl = -1; /* File access property list */ + hid_t did = -1; /* Dataset ID */ + hid_t sid = -1; /* Dataspace ID */ + hid_t dcpl = -1; /* Dataset creation property list */ + H5D_t *dset = NULL; /* Internal dataset pointer */ + H5F_t *f = NULL; /* Internal file pointer */ + H5F_libver_t low, high; /* Low and high bounds */ + herr_t ret; /* Return value */ + hsize_t fix_dims2[2] = {10, 4}; /* Dimension sizes */ + hsize_t fix_chunks2[2] = {4, 3}; /* Chunk dimension sizes */ + hsize_t dims2[2] = {1, 4}; /* Dimension sizes */ + hsize_t max_dims2[2] = {H5S_UNLIMITED, H5S_UNLIMITED}; /* Maximum dimension sizes */ + hsize_t chunks2[2] = {4, 5}; /* Chunk dimension sizes */ + + /* Retrieve the low/high bounds from the input fapl */ + ret = H5Pget_libver_bounds(fapl, &low, &high); + CHECK(ret, FAIL, "H5Pget_libver_bounds"); + + /* Create the file with the input fapl */ + fid = H5Fcreate(FILE8, H5F_ACC_TRUNC, H5P_DEFAULT, fapl); + CHECK(fid, FAIL, "H5Fcreate"); + + /* Create the dataspace */ + sid = H5Screate(H5S_SCALAR); + CHECK(sid, FAIL, "H5Screate"); + + /* Create a contiguous dataset */ + did = H5Dcreate2(fid, DSETA, H5T_NATIVE_INT, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); + CHECK(did, FAIL, "H5Dcreate"); + + /* Get the internal dataset pointer */ + dset = (H5D_t *)H5I_object(did); + CHECK(dset, NULL, "H5I_object"); + + /* Verify version for layout and fill value messages */ + if(low == H5F_LIBVER_EARLIEST) { + /* For layout message: the earliest version the library will set is 3 */ + /* For fill value message: the earliest version the library will set is 2 */ + VERIFY(dset->shared->layout.version, H5O_LAYOUT_VERSION_DEFAULT, "H5O_layout_ver_bounds"); + VERIFY(dset->shared->dcpl_cache.fill.version, H5O_FILL_VERSION_2, "H5O_fill_ver_bounds"); + } else { + VERIFY(dset->shared->layout.version, H5O_layout_ver_bounds[low], "H5O_layout_ver_bounds"); + VERIFY(dset->shared->dcpl_cache.fill.version, H5O_fill_ver_bounds[low], "H5O_fill_ver_bounds"); + } + + /* Verify filter pipleline message version */ + VERIFY(dset->shared->dcpl_cache.pline.version, H5O_pline_ver_bounds[low], "H5O_pline_ver_bounds"); + + /* Close the dataset */ + ret = H5Dclose(did); + CHECK(ret, FAIL, "H5Dclose"); + + /* Close the dataspace */ + ret = H5Sclose(sid); + CHECK(ret, FAIL, "H5Sclose"); + + /* Set up dataspace and dcpl for creating a chunked dataset + with "no filter edge chunks" enabled. + This will result in a version 4 layout message */ + sid = H5Screate_simple(2, fix_dims2, NULL); + CHECK(sid, FAIL, "H5Screate_simple"); + dcpl = H5Pcreate(H5P_DATASET_CREATE); + CHECK(dcpl, FAIL, "H5Pcreate"); + ret = H5Pset_chunk(dcpl, 2, fix_chunks2); + CHECK(ret, FAIL, "H5Pset_chunk"); + ret = H5Pset_chunk_opts(dcpl, H5D_CHUNK_DONT_FILTER_PARTIAL_CHUNKS); + CHECK(ret, FAIL, "H5Pset_chunk_opts"); + + /* Create the chunked dataset */ + H5E_BEGIN_TRY { + did = H5Dcreate2(fid, DSETB, H5T_NATIVE_INT, sid, H5P_DEFAULT, dcpl, H5P_DEFAULT); + } H5E_END_TRY; + + if(did >= 0) { + + /* Get the internal dataset pointer */ + dset = (H5D_t *)H5I_object(did); + CHECK(dset, NULL, "H5I_object"); + + /* Verify layout message version and chunk indexing type */ + VERIFY(dset->shared->layout.version, H5O_LAYOUT_VERSION_4, "H5O_layout_ver_bounds"); + VERIFY(dset->shared->layout.u.chunk.idx_type, H5D_CHUNK_IDX_FARRAY, "chunk_index_type"); + + /* Close the dataset */ + ret = H5Dclose(did); + CHECK(ret, FAIL, "H5Dclose"); + } + + /* Close the file */ + ret = H5Fclose(fid); + CHECK(ret, FAIL, "H5Fclose"); + + /* Close the dataspace */ + ret = H5Sclose(sid); + CHECK(ret, FAIL, "H5Sclose"); + + /* Close the datset creation property list */ + ret = H5Pclose(dcpl); + CHECK(ret, FAIL, "H5Pclose"); + + /* Create a default file access property list which is used + to open the file in the 'for' loop */ + new_fapl = H5Pcreate(H5P_FILE_ACCESS); + CHECK(new_fapl, FAIL, "H5Pcreate"); + + /* Set up dataspace and dcpl for creating a chunked dataset with + 2 unlimited dimensions in the 'for' loop */ + sid = H5Screate_simple(2, dims2, max_dims2); + CHECK(sid, FAIL, "H5Screate_simple"); + dcpl = H5Pcreate(H5P_DATASET_CREATE); + CHECK(dcpl, FAIL, "H5Pcreate"); + ret = H5Pset_chunk(dcpl, 2, chunks2); + CHECK(ret, FAIL, "H5Pset_chunk"); + + /* Loop through all the combinations of low/high bounds in new_fapl */ + /* Open the file with the fapl and create the chunked dataset */ + /* Verify the dataset's layout, fill value and filter pipleline message versions */ + for(low = H5F_LIBVER_EARLIEST; low < H5F_LIBVER_NBOUNDS; low++) { + for(high = H5F_LIBVER_EARLIEST; high < H5F_LIBVER_NBOUNDS; high++) { + H5E_BEGIN_TRY { + ret = H5Pset_libver_bounds(new_fapl, low, high); + } H5E_END_TRY; + + if (ret < 0) /* Invalid low/high combinations */ + continue; + + /* Open the file */ + H5E_BEGIN_TRY { + fid = H5Fopen(FILE8, H5F_ACC_RDWR, new_fapl); + } H5E_END_TRY; + + if(fid >=0 ) { /* The file open succeeds */ + + /* Get the internal file pointer */ + f = (H5F_t *)H5I_object(fid); + CHECK(f, NULL, "H5I_object"); + + /* Create the chunked dataset */ + did = H5Dcreate2(fid, DSETC, H5T_NATIVE_INT, sid, H5P_DEFAULT, dcpl, H5P_DEFAULT); + CHECK(did, FAIL, "H5Dcreate2"); + + /* Get the internal file pointer */ + dset = (H5D_t *)H5I_object(did); + CHECK(dset, NULL, "H5I_object"); + + /* Verify the dataset's layout, fill value and filter pipeline message versions */ + /* Also verify the chunk indexing type */ + if(f->shared->low_bound == H5F_LIBVER_EARLIEST) { + /* For layout message: the earliest version the library will set is 3 */ + /* For fill value message: the earliest version the library will set is 2 */ + VERIFY(dset->shared->layout.version, H5O_LAYOUT_VERSION_DEFAULT, "H5O_layout_ver_bounds"); + VERIFY(dset->shared->dcpl_cache.fill.version, H5O_FILL_VERSION_2, "H5O_fill_ver_bounds"); + } else { + VERIFY(dset->shared->layout.version, H5O_layout_ver_bounds[f->shared->low_bound], "H5O_layout_ver_bounds"); + VERIFY(dset->shared->dcpl_cache.fill.version, H5O_fill_ver_bounds[f->shared->low_bound], "H5O_fill_ver_bounds"); + } + + /* Verify the filter pipeline message version */ + VERIFY(dset->shared->dcpl_cache.pline.version, H5O_pline_ver_bounds[f->shared->low_bound], "H5O_pline_ver_bounds"); + + /* Verify the dataset's chunk indexing type */ + if(dset->shared->layout.version == H5O_LAYOUT_VERSION_LATEST) + VERIFY(dset->shared->layout.u.chunk.idx_type, H5D_CHUNK_IDX_BT2, "chunk_index_type"); + else + VERIFY(dset->shared->layout.u.chunk.idx_type, H5D_CHUNK_IDX_BTREE, "chunk_index_type"); + + /* Close the dataset */ + ret = H5Dclose(did); + CHECK(ret, FAIL, "H5Dclose"); + + /* Delete the dataset */ + ret = H5Ldelete(fid, DSETC, H5P_DEFAULT); + CHECK(ret, FAIL, "H5Ldelete"); + + /* Close the file */ + ret = H5Fclose(fid); + CHECK(ret, FAIL, "H5Fclose"); + + } /* end if */ + } /* end for */ + } /* end for */ + + /* Close the file access property list */ + ret = H5Pclose(new_fapl); + CHECK(ret, FAIL, "H5Pclose"); + + /* Close the dataspace */ + ret = H5Sclose(sid); + CHECK(ret, FAIL, "H5Sclose"); + + /* Close the dataset creation property list */ + ret = H5Pclose(dcpl); + CHECK(ret, FAIL, "H5Pclose"); + +} /* end test_libver_bounds_dataset() */ + +/**************************************************************** +** +** test_libver_bounds_dataspace(): +** Verify dataspace message versions: +** +** (a) Create a file with default fcpl and the input fapl. +** Create the following two datasets: +** --A dataset with scalar dataspace +** --A dataset with null dataspace +** For both datasets, verify the dataspace message versions. +** Close the file. +** +** (b) Create a new fapl that is set to the 5 pairs of low/high +** bounds in a "for" loop. For each pair of setting in the +** new fapl: +** --Open the same file in (a) with the fapl +** --Create a chunked dataset, a compact dataset and +** a contigous dataset +** --Verify the dataspace message version for these +** three datasets +** --Delete the three datasets and the dataspaces +** --Close the file +** +****************************************************************/ +static void +test_libver_bounds_dataspace(hid_t fapl) +{ + hid_t fid = -1; /* File ID */ + hid_t new_fapl = -1; /* File access property list */ + hid_t did = -1, did_null = -1; /* Dataset IDs */ + hid_t did_compact = -1, did_contig = -1; /* Dataset IDs */ + hid_t sid = -1, sid_null = -1; /* Dataspace IDs */ + hid_t sid_compact = -1, sid_contig = -1; /* Dataspace IDs */ + hid_t dcpl = -1; /* Dataset creation property list */ + hid_t dcpl_compact = -1, dcpl_contig = -1; /* Dataset creation property lists */ + H5S_t *space = NULL, *space_null = NULL; /* Internal dataspace pointers */ + H5F_t *f = NULL; /* Internal file pointer */ + H5F_libver_t low, high; /* Low and high bounds */ + hsize_t dims[1] = {1}; /* Dimension sizes */ + hsize_t dims2[2] = {5, 4}; /* Dimension sizes */ + hsize_t max_dims[1] = {H5S_UNLIMITED}; /* Maximum dimension sizes */ + hsize_t chunks[1] = {4}; /* Chunk dimension sizes */ + herr_t ret; /* Return value */ + + /* Retrieve the low/high bounds from the input fapl */ + ret = H5Pget_libver_bounds(fapl, &low, &high); + CHECK(ret, FAIL, "H5Pget_libver_bounds"); + + /* Create the file with the input fapl */ + fid = H5Fcreate(FILE8, H5F_ACC_TRUNC, H5P_DEFAULT, fapl); + CHECK(fid, FAIL, "H5Fcreate"); + + /* Create scalar dataspace */ + sid = H5Screate(H5S_SCALAR); + CHECK(sid, FAIL, "H5Screate"); + + /* Create a dataset with the scalar dataspace */ + did = H5Dcreate2(fid, DSET, H5T_NATIVE_INT, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); + CHECK(did, FAIL, "H5Dcreate"); + + /* Get the internal dataspace pointer */ + sid = H5Dget_space(did); + CHECK(sid, FAIL, "H5Dget_space"); + space = (H5S_t *)H5I_object(sid); + CHECK(space, NULL, "H5I_object"); + + /* Verify the dataspace version */ + VERIFY(space->extent.version, H5O_sdspace_ver_bounds[low], "H5O_sdspace_ver_bounds"); + + /* Create null dataspace */ + sid_null = H5Screate(H5S_NULL); + CHECK(sid_null, FAIL, "H5Screate"); + + /* Create a dataset with the null dataspace */ + did_null = H5Dcreate2(fid, DSET_NULL, H5T_NATIVE_INT, sid_null, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); + CHECK(did_null, FAIL, "H5Dcreate"); + + /* Get the internal dataspace pointer */ + sid_null = H5Dget_space(did_null); + CHECK(sid_null, FAIL, "H5Dget_space"); + space_null = (H5S_t *)H5I_object(sid_null); + CHECK(space_null, NULL, "H5I_object"); + + /* Verify the dataspace version */ + VERIFY(space_null->extent.version, H5O_SDSPACE_VERSION_2, "H5O_sdspace_ver_bounds"); + + /* Close the datasets */ + ret = H5Dclose(did); + CHECK(ret, FAIL, "H5Dclose"); + ret = H5Dclose(did_null); + CHECK(ret, FAIL, "H5Dclose"); + + /* Close the dataspaces */ + ret = H5Sclose(sid); + CHECK(ret, FAIL, "H5Sclose"); + ret = H5Sclose(sid_null); + CHECK(ret, FAIL, "H5Sclose"); + + /* Close the file */ + ret = H5Fclose(fid); + CHECK(ret, FAIL, "H5Fclose"); + + /* Create a default file access property list which is used + to open the file in the 'for' loop */ + new_fapl = H5Pcreate(H5P_FILE_ACCESS); + CHECK(new_fapl, FAIL, "H5Pcreate"); + + /* Set up dataspace and dcpl for creating a chunked dataset */ + sid = H5Screate_simple(1, dims, max_dims); + CHECK(sid, FAIL, "H5Screate_simple"); + dcpl = H5Pcreate(H5P_DATASET_CREATE); + CHECK(dcpl, FAIL, "H5Pcreate"); + ret = H5Pset_chunk(dcpl, 1, chunks); + CHECK(ret, FAIL, "H5Pset_chunk"); + + /* Set up dataspace and dcpl for creating a compact dataset */ + sid_compact = H5Screate_simple(1, dims, NULL); + CHECK(sid_compact, FAIL, "H5Screate_simple"); + dcpl_compact = H5Pcreate(H5P_DATASET_CREATE); + CHECK(dcpl_compact, FAIL, "H5Pcreate"); + ret = H5Pset_layout(dcpl_compact, H5D_COMPACT); + CHECK(ret, FAIL, "H5Pset_layout"); + + /* Set up dataspace and dcpl for creating a contiguous dataset */ + sid_contig = H5Screate_simple(2, dims2, NULL); + CHECK(sid_contig, FAIL, "H5Screate_simple"); + dcpl_contig = H5Pcreate(H5P_DATASET_CREATE); + CHECK(dcpl_contig, FAIL, "H5Pcreate"); + ret = H5Pset_layout(dcpl_contig, H5D_CONTIGUOUS); + CHECK(ret, FAIL, "H5Pset_layout"); + + /* Loop through all the combinations of low/high bounds in new_fapl */ + /* Open the file and create the chunked/compact/contiguous datasets */ + /* Verify the dataspace message version for the three datasets */ + for(low = H5F_LIBVER_EARLIEST; low < H5F_LIBVER_NBOUNDS; low++) { + for(high = H5F_LIBVER_EARLIEST; high < H5F_LIBVER_NBOUNDS; high++) { + hid_t tmp_sid, tmp_sid_compact, tmp_sid_contig; /* Dataspace IDs */ + H5S_t *tmp_space, *tmp_space_compact, *tmp_space_contig; /* Internal dataspace pointers */ + + H5E_BEGIN_TRY { + ret = H5Pset_libver_bounds(new_fapl, low, high); + } H5E_END_TRY; + + if (ret < 0) /* Invalid low/high combinations */ + continue; + + /* Open the file */ + H5E_BEGIN_TRY { + fid = H5Fopen(FILE8, H5F_ACC_RDWR, new_fapl); + } H5E_END_TRY; + + if(fid >=0 ) { /* The file open succeeds */ + + /* Get the internal file pointer */ + f = (H5F_t *)H5I_object(fid); + CHECK(f, NULL, "H5I_object"); + + /* Create the chunked dataset */ + did = H5Dcreate2(fid, DSETA, H5T_NATIVE_INT, sid, H5P_DEFAULT, dcpl, H5P_DEFAULT); + CHECK(did, FAIL, "H5Dcreate2"); + + /* Get the internal dataspace pointer for the chunked dataset */ + tmp_sid = H5Dget_space(did); + CHECK(tmp_sid, FAIL, "H5Dget_space"); + tmp_space = (H5S_t *)H5I_object(tmp_sid); + CHECK(tmp_space, NULL, "H5I_object"); + + /* Create the compact dataset */ + did_compact = H5Dcreate2(fid, DSETB, H5T_NATIVE_INT, sid_compact, H5P_DEFAULT, dcpl_compact, H5P_DEFAULT); + CHECK(did_compact, FAIL, "H5Dcreate2"); + + /* Get the internal dataspace pointer for the compact dataset */ + tmp_sid_compact = H5Dget_space(did_compact); + CHECK(tmp_sid_compact, FAIL, "H5Dget_space"); + tmp_space_compact = (H5S_t *)H5I_object(tmp_sid_compact); + CHECK(tmp_space_compact, NULL, "H5I_object"); + + /* Create the contiguous dataset */ + did_contig = H5Dcreate2(fid, DSETC, H5T_NATIVE_INT, sid_contig, H5P_DEFAULT, dcpl_contig, H5P_DEFAULT); + CHECK(did_contig, FAIL, "H5Dcreate2"); + + /* Get the internal dataspace pointer for the contiguous dataset */ + tmp_sid_contig = H5Dget_space(did_contig); + CHECK(tmp_sid_contig, FAIL, "H5Dget_space"); + tmp_space_contig = (H5S_t *)H5I_object(tmp_sid_contig); + CHECK(tmp_space_contig, NULL, "H5I_object"); + + /* Verify versions for the three dataspaces */ + VERIFY(tmp_space->extent.version, H5O_sdspace_ver_bounds[f->shared->low_bound], "H5O_sdspace_ver_bounds"); + VERIFY(tmp_space_compact->extent.version, H5O_sdspace_ver_bounds[f->shared->low_bound], "H5O_sdspace_ver_bounds"); + VERIFY(tmp_space_contig->extent.version, H5O_sdspace_ver_bounds[f->shared->low_bound], "H5O_sdspace_ver_bounds"); + + /* Close the three datasets */ + ret = H5Dclose(did); + CHECK(ret, FAIL, "H5Dclose"); + ret = H5Dclose(did_compact); + CHECK(ret, FAIL, "H5Dclose"); + ret = H5Dclose(did_contig); + CHECK(ret, FAIL, "H5Dclose"); + + /* Close the three dataspaces */ + ret = H5Sclose(tmp_sid); + CHECK(ret, FAIL, "H5Sclose"); + ret = H5Sclose(tmp_sid_compact); + CHECK(ret, FAIL, "H5Sclose"); + ret = H5Sclose(tmp_sid_contig); + CHECK(ret, FAIL, "H5Sclose"); + + /* Delete the three datasets */ + ret = H5Ldelete(fid, DSETA, H5P_DEFAULT); + CHECK(ret, FAIL, "H5Ldelete"); + ret = H5Ldelete(fid, DSETB, H5P_DEFAULT); + CHECK(ret, FAIL, "H5Ldelete"); + ret = H5Ldelete(fid, DSETC, H5P_DEFAULT); + CHECK(ret, FAIL, "H5Ldelete"); + + /* Close the file */ + ret = H5Fclose(fid); + CHECK(ret, FAIL, "H5Fclose"); + + } /* end if */ + } /* end for */ + } /* end for */ + + /* Close the file access property list */ + ret = H5Pclose(new_fapl); + CHECK(ret, FAIL, "H5Pclose"); + + /* Close the three dataspaces */ + ret = H5Sclose(sid); + CHECK(ret, FAIL, "H5Sclose"); + ret = H5Sclose(sid_compact); + CHECK(ret, FAIL, "H5Sclose"); + ret = H5Sclose(sid_contig); + CHECK(ret, FAIL, "H5Sclose"); + + /* Close the three dataset creation property lists */ + ret = H5Pclose(dcpl); + CHECK(ret, FAIL, "H5Pclose"); + ret = H5Pclose(dcpl_compact); + CHECK(ret, FAIL, "H5Pclose"); + ret = H5Pclose(dcpl_contig); + CHECK(ret, FAIL, "H5Pclose"); + +} /* end test_libver_bounds_dataspace() */ + + +/**************************************************************** +** +** test_libver_bounds_datatype(): +** Verify the datatype message version: +** +** (a) Create the following datatypes: +** 1) integer +** 2) enum +** 3) array +** 4) compound +** 5) vlen +** (b) Call test_libver_bounds_datatype_check() for each +** datatype in (a) to verify the datatype message version. +** +****************************************************************/ +static void +test_libver_bounds_datatype(hid_t fapl) +{ + hid_t tid = -1, tid_enum = -1, tid_array = -1; /* Datatype IDs */ + hid_t tid_compound = -1, tid_vlen = -1; /* Datatype IDs */ + int enum_value; /* Value for enum datatype */ + typedef struct s1 { /* Data structure for compound datatype */ + char c; + int i; + } s1; + hsize_t dims[1] = {1}; /* Dimension sizes */ + herr_t ret; /* Return value */ + + /* Create integer datatype */ + tid = H5Tcopy(H5T_NATIVE_INT); + + /* Verify datatype message version */ + test_libver_bounds_datatype_check(fapl, tid); + + /* Create enum datatype */ + tid_enum = H5Tenum_create(tid); + enum_value = 0; + H5Tenum_insert(tid_enum, "val1", &enum_value); + enum_value = 1; + H5Tenum_insert(tid_enum, "val2", &enum_value); + + /* Verify datatype message version */ + test_libver_bounds_datatype_check(fapl, tid_enum); + + /* Create array datatype */ + tid_array = H5Tarray_create2(tid, 1, dims); + + /* Verify datatype message version */ + test_libver_bounds_datatype_check(fapl, tid_array); + + /* Create compound datatype */ + tid_compound = H5Tcreate(H5T_COMPOUND, sizeof(s1)); + H5Tinsert(tid_compound, "c", HOFFSET(s1, c), H5T_STD_U8LE); + H5Tinsert(tid_compound, "i", HOFFSET(s1, i), H5T_NATIVE_INT); + + /* Verify datatype message version */ + test_libver_bounds_datatype_check(fapl, tid_compound); + + /* Create vlen datatype */ + tid_vlen = H5Tvlen_create(tid); + + /* Verify datatype message version */ + test_libver_bounds_datatype_check(fapl, tid_vlen); + + /* Close the datatypes */ + ret = H5Tclose(tid); + CHECK(ret, FAIL, "H5Tclose"); + + ret = H5Tclose(tid_enum); + CHECK(ret, FAIL, "H5Tclose"); + + ret = H5Tclose(tid_array); + CHECK(ret, FAIL, "H5Tclose"); + + ret = H5Tclose(tid_compound); + CHECK(ret, FAIL, "H5Tclose"); + + ret = H5Tclose(tid_vlen); + CHECK(ret, FAIL, "H5Tclose"); + +} /* end test_libver_bounds_datatype() */ + +/**************************************************************** +** +** test_libver_bounds_datatype_check(): +** Helper routine called by test_libver_bounds_datatype() +** to verify the datatype message version for the input tid: +** +** (a) Create a file with default fcpl and the input fapl. +** Create a contiguous dataset with the input tid. +** Verify the datatype message version. +** Create a committed datatype of string to be +** used later. +** Close the file. +** +** (b) Create a new fapl that is set to the 5 pairs of low/high +** bounds in a "for" loop. For each pair of setting in +** the new fapl: +** --Open the same file in (a) with the fapl +** --Verify the message version for the committed +** datatype created earlier +** --Create a chunked dataset with the input tid +** --Verify the datatype message version +** --Close and delete the dataset +** --Close the file +** +****************************************************************/ +static void +test_libver_bounds_datatype_check(hid_t fapl, hid_t tid) +{ + hid_t fid = -1; /* File ID */ + hid_t new_fapl = -1; /* File acess property list */ + hid_t dcpl = -1; /* Dataset creation property list */ + hid_t dtid = -1; /* Datatype ID for the dataset */ + hid_t str_tid = -1; /* String datatype ID */ + hid_t did = -1; /* Dataset ID */ + hid_t sid = -1; /* Dataspace ID */ + hsize_t dims[1] = {1}; /* Dimension sizes */ + hsize_t dims2[2] = {5, 4}; /* Dimension sizes */ + hsize_t max_dims2[2] = {H5S_UNLIMITED, H5S_UNLIMITED}; /* Maximum dimension sizes */ + hsize_t chunks[2] = {2, 3}; /* Chunk dimension sizes */ + H5T_t *dtype = NULL; /* Internal datatype pointer */ + H5T_t *str_dtype = NULL; /* Internal datatype pointer for the string datatype */ + H5F_t *f = NULL; /* Internal file pointer */ + H5F_libver_t low, high; /* Low and high bounds */ + herr_t ret; /* Return value */ + + /* Retrieve the low/high version bounds from the input fapl */ + ret = H5Pget_libver_bounds(fapl, &low, &high); + CHECK(ret, FAIL, "H5Pget_libver_bounds"); + + /* Create the file with the input fapl */ + fid = H5Fcreate(FILE8, H5F_ACC_TRUNC, H5P_DEFAULT, fapl); + CHECK(fid, FAIL, "H5Fcreate"); + + /* Create a committed datatype of string which will be used + later inside the 'for' loop */ + str_tid = H5Tcopy(H5T_C_S1); + CHECK(str_tid, FAIL, "H5Tcopy"); + ret = H5Tset_size(str_tid, (size_t)10); + CHECK(ret, FAIL, "H5Tset_size"); + ret = H5Tcommit2(fid, "datatype", str_tid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); + CHECK(ret, FAIL, "H5Tcommit2"); + ret = H5Tclose(str_tid); + CHECK(ret, FAIL, "H5Tclose"); + + /* Create dataspace */ + sid = H5Screate_simple(1, dims, NULL); + CHECK(sid, FAIL, "H5Screate_simple"); + + /* Create a dataset with the input tid */ + did = H5Dcreate2(fid, DSET1, tid, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); + CHECK(did, FAIL, "H5Dcreate2"); + + /* Get the dataset's datatype */ + dtid = H5Dget_type(did); + CHECK(dtid, FAIL, "H5Dget_type"); + + /* Get the internal datatype pointer */ + dtype = (H5T_t *)H5I_object(dtid); + CHECK(dtype, NULL, "H5I_object"); + + /* Verify the datatype message version */ + /* H5T_COMPOUND, H5T_ENUM, H5T_ARRAY: + * --the library will set version according to low_bound + * --H5T_ARRAY: the earliest version the library will set is 2 + * H5T_INTEGER, H5T_FLOAT, H5T_TIME, H5T_STRING, H5T_BITFIELD, H5T_OPAQUE, H5T_REFERENCE: + * --the library will only use basic version + */ + + if(dtype->shared->type == H5T_COMPOUND || + dtype->shared->type == H5T_ENUM || + dtype->shared->type == H5T_ARRAY) { + if(dtype->shared->type == H5T_ARRAY && low == H5F_LIBVER_EARLIEST) + VERIFY(dtype->shared->version, H5O_DTYPE_VERSION_2, "H5O_dtype_ver_bounds"); + else + VERIFY(dtype->shared->version, H5O_dtype_ver_bounds[low], "H5O_dtype_ver_bounds"); + } else + VERIFY(dtype->shared->version, H5O_dtype_ver_bounds[H5F_LIBVER_EARLIEST], "H5O_dtype_ver_bounds"); + + /* Close the dataset */ + ret = H5Dclose(did); + CHECK(ret, FAIL, "H5Dclose"); + + /* Close the dataspace */ + ret = H5Sclose(sid); + CHECK(ret, FAIL, "H5Dclose"); + + /* Close the datatype */ + ret = H5Tclose(dtid); + CHECK(ret, FAIL, "H5Fclose"); + + /* Close the file */ + ret = H5Fclose(fid); + CHECK(ret, FAIL, "H5Fclose"); + + /* Create a default file access property list */ + new_fapl = H5Pcreate(H5P_FILE_ACCESS); + CHECK(new_fapl, FAIL, "H5Pcreate"); + + /* Set up dataspace and dcpl for creating a chunked dataset */ + sid = H5Screate_simple(2, dims2, max_dims2); + CHECK(sid, FAIL, "H5Screate_simple"); + dcpl = H5Pcreate(H5P_DATASET_CREATE); + CHECK(dcpl, FAIL, "H5Pcreate"); + ret = H5Pset_chunk(dcpl, 2, chunks); + CHECK(ret, FAIL, "H5Pset_chunk"); + + /* Loop through all the combinations of low/high bounds */ + /* Open the file and create the chunked dataset with the input tid */ + /* Verify the dataset's datatype message version */ + /* Also verify the committed atatype message version */ + for(low = H5F_LIBVER_EARLIEST; low < H5F_LIBVER_NBOUNDS; low++) { + for(high = H5F_LIBVER_EARLIEST; high < H5F_LIBVER_NBOUNDS; high++) { + H5E_BEGIN_TRY { + ret = H5Pset_libver_bounds(new_fapl, low, high); + } H5E_END_TRY; + + if (ret < 0) /* Invalid low/high combinations */ + continue; + + /* Open the file */ + H5E_BEGIN_TRY { + fid = H5Fopen(FILE8, H5F_ACC_RDWR, new_fapl); + } H5E_END_TRY; + + if(fid >= 0 ) { /* The file open succeeds */ + + /* Get the internal file pointer */ + f = (H5F_t *)H5I_object(fid); + CHECK(f, NULL, "H5I_object"); + + /* Open the committed datatype */ + str_tid = H5Topen2(fid, "datatype", H5P_DEFAULT); + CHECK(str_tid, FAIL, "H5Topen2"); + str_dtype = (H5T_t *)H5I_object(str_tid); + CHECK(str_dtype, NULL, "H5I_object"); + + /* Verify the committed datatype message version */ + VERIFY(str_dtype->shared->version, H5O_dtype_ver_bounds[H5F_LIBVER_EARLIEST], "H5O_dtype_ver_bounds"); + + /* Close the committed datatype */ + ret = H5Tclose(str_tid); + CHECK(ret, FAIL, "H5Tclose"); + + + /* Create the chunked dataset */ + did = H5Dcreate2(fid, DSETNAME, tid, sid, H5P_DEFAULT, dcpl, H5P_DEFAULT); + CHECK(did, FAIL, "H5Dcreate2"); + + /* Get the dataset's datatype */ + dtid = H5Dget_type(did); + CHECK(dtid, FAIL, "H5Dget_type"); + + /* Get the internal datatype pointer */ + dtype = (H5T_t *)H5I_object(dtid); + CHECK(dtype, NULL, "H5I_object"); + + /* Verify the dataset's datatype message version */ + /* H5T_COMPOUND, H5T_ENUM, H5T_ARRAY: + * --the library will set version according to low_bound + * --H5T_ARRAY: the earliest version the library will set is 2 + * H5T_INTEGER, H5T_FLOAT, H5T_TIME, H5T_STRING, H5T_BITFIELD, H5T_OPAQUE, H5T_REFERENCE: + * --the library will only use basic version + */ + if(dtype->shared->type == H5T_COMPOUND || + dtype->shared->type == H5T_ENUM || + dtype->shared->type == H5T_ARRAY) { + if(dtype->shared->type == H5T_ARRAY && + f->shared->low_bound == H5F_LIBVER_EARLIEST) + VERIFY(dtype->shared->version, H5O_DTYPE_VERSION_2, "H5O_dtype_ver_bounds"); + else + VERIFY(dtype->shared->version, H5O_dtype_ver_bounds[f->shared->low_bound], "H5O_dtype_ver_bounds"); + } else + VERIFY(dtype->shared->version, H5O_dtype_ver_bounds[H5F_LIBVER_EARLIEST], "H5O_dtype_ver_bounds"); + + /* Close the dataset */ + ret = H5Dclose(did); + CHECK(ret, FAIL, "H5Dclose"); + + /* Close the dataset's datatype */ + ret = H5Tclose(dtid); + CHECK(ret, FAIL, "H5Tclose"); + + /* Delete the dataset */ + ret = H5Ldelete(fid, DSETNAME, H5P_DEFAULT); + CHECK(ret, FAIL, "H5Ldelete"); + + /* Close the file */ + ret = H5Fclose(fid); + CHECK(ret, FAIL, "H5Fclose"); + + } /* end if */ + } /* end for */ + } /* end for */ + + /* Close the file access property list */ + ret = H5Pclose(new_fapl); + CHECK(ret, FAIL, "H5Pclose"); + + /* Close the dataspace */ + ret = H5Sclose(sid); + CHECK(ret, FAIL, "H5Sclose"); + + /* Close the dataset creation property list */ + ret = H5Pclose(dcpl); + CHECK(ret, FAIL, "H5Pclose"); + +} /* end test_libver_bounds_datatype_check() */ + +/**************************************************************** +** +** test_libver_bounds_attributes(): +** Verify the attribute message versions: +** +** (a) Create a file with default fcpl and the input fapl. +** Create a group and attach the following three attributes +** to the group: +** (1) Attribute with a committed datatype +** (2) Attribute with integer type +** (3) Attribute with character encoding set +** Verify the three attributes' message versions. +** Close the file. +** +** (b) Create a fcpl that has shared datatype message enabled. +** Create a file with the fcpl and the input fapl. +** Create a group and attach an attribute with shared +** integer type to the group. +** Verify the attribute message version. +** Close the file +** +** (b) Create a new fapl that is set to the 5 pairs of low/high +** bounds in a "for" loop. For each pair of setting in +** the new fapl: +** --Open the same file in (b) with the fapl +** --Open the group and attach an attribute with integer +** type to the group +** --Verify the attribute message version +** --Delete the attribute +** --Close the group and the file +** +****************************************************************/ +static void +test_libver_bounds_attributes(hid_t fapl) +{ + hid_t fid = -1; /* File ID */ + hid_t fcpl = -1; /* File creation property list */ + hid_t new_fapl = -1; /* File access property list */ + hid_t tid = -1; /* Datatype ID */ + hid_t gid = -1; /* Group ID */ + hid_t sid = -1; /* Dataspace ID */ + hid_t aid = -1; /* Attribute ID */ + hid_t attr_cpl = -1; /* Attribute creation property list */ + H5A_t *attr = NULL; /* Internal attribute pointer */ + H5F_t *f = NULL; /* Internal file pointer */ + H5F_libver_t low, high; /* Low and high bounds */ + herr_t ret; /* Return value */ + + /* Retrieve the low/high bounds from the input fapl */ + ret = H5Pget_libver_bounds(fapl, &low, &high); + CHECK(ret, FAIL, "H5Pget_libver_bounds"); + + /* Create the file */ + fid = H5Fcreate(FILE8, H5F_ACC_TRUNC, H5P_DEFAULT, fapl); + CHECK(fid, FAIL, "H5Fcreate"); + + /* Integer datatpye */ + tid = H5Tcopy(H5T_NATIVE_INT); + CHECK(tid, FAIL, "H5Tcopy"); + + /* Create a committed datatype */ + ret = H5Tcommit2(fid, "datatype", tid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); + CHECK(ret, FAIL, "H5Tcommit2"); + + /* Create dataspace */ + sid = H5Screate(H5S_SCALAR); + CHECK(sid, FAIL, "H5Screate"); + + /* Create a group */ + gid = H5Gcreate2(fid, GRP_NAME, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); + CHECK(gid, FAIL, "H5Gcreate2"); + + /* Attach an attribute to the group with the committed datatype */ + aid = H5Acreate2(gid, "attr1", tid, sid, H5P_DEFAULT, H5P_DEFAULT); + CHECK(aid, FAIL, "H5Acreate2"); + + /* Get the internal attribute pointer */ + attr = (H5A_t *)H5I_object(aid); + CHECK(attr, NULL, "H5I_object"); + + /* Verify the attribute version */ + if(low == H5F_LIBVER_EARLIEST) + /* The earliest version the library can set for an attribute with committed datatype is 2 */ + VERIFY(attr->shared->version, H5O_ATTR_VERSION_2, "H5O_attr_ver_bounds"); + else + VERIFY(attr->shared->version, H5O_attr_ver_bounds[low], "H5O_attr_ver_bounds"); + + /* Close the attribute */ + ret = H5Aclose(aid); + CHECK(ret, FAIL, "H5Aclose"); + + /* Create an attribute to the group with integer type */ + aid = H5Acreate2(gid, "attr2", H5T_NATIVE_INT, sid, H5P_DEFAULT, H5P_DEFAULT); + CHECK(aid, FAIL, "H5Acreate2"); + + /* Get the internal attribute pointer */ + attr = (H5A_t *)H5I_object(aid); + CHECK(attr, NULL, "H5I_object"); + + /* Verify attribute version */ + VERIFY(attr->shared->version, H5O_attr_ver_bounds[low], "H5O_attr_ver_bounds"); + + /* Close the attribute */ + ret = H5Aclose(aid); + CHECK(ret, FAIL, "H5Aclose"); + + /* Enable character encoding in attribute creation property list */ + attr_cpl = H5Pcreate(H5P_ATTRIBUTE_CREATE); + CHECK(attr_cpl, FAIL, "H5Pcreate"); + ret = H5Pset_char_encoding(attr_cpl, H5T_CSET_UTF8); + CHECK(ret, FAIL, "H5Pset_char_encoding"); + + /* Attach an attribute to the group with character encoding set */ + aid = H5Acreate2(gid, "attr3", H5T_NATIVE_INT, sid, attr_cpl, H5P_DEFAULT); + CHECK(aid, FAIL, "H5Acreate2"); + + /* Get internal attribute pointer */ + attr = (H5A_t *)H5I_object(aid); + CHECK(attr, NULL, "H5I_object"); + + /* Verify attribute version */ + if(low == H5F_LIBVER_EARLIEST) + /* The earliest version the library can set for an attribute with character encoding is 3 */ + VERIFY(attr->shared->version, H5O_ATTR_VERSION_3, "H5O_attr_ver_bounds"); + else + VERIFY(attr->shared->version, H5O_attr_ver_bounds[low], "H5O_attr_ver_bounds"); + + /* Close the attribute */ + ret = H5Aclose(aid); + CHECK(ret, FAIL, "H5Aclose"); + + /* Close the attribute creation property list */ + ret = H5Pclose(attr_cpl); + CHECK(ret, FAIL, "H5Pclose"); + + /* Close the group */ + ret = H5Gclose(gid); + CHECK(ret, FAIL, "H5Gclose"); + + /* Close the dataspace */ + ret = H5Sclose(sid); + CHECK(ret, FAIL, "H5Sclose"); + + /* Close the datatype */ + ret = H5Tclose(tid); + CHECK(ret, FAIL, "H5Tclose"); + + /* Close the file */ + ret = H5Fclose(fid); + CHECK(ret, FAIL, "H5Fclose"); + + /* Create a copy of the file creation property list */ + fcpl = H5Pcreate(H5P_FILE_CREATE); + CHECK(fcpl, FAIL, "H5Pcreate"); + + /* Enable shared datatype message */ + ret = H5Pset_shared_mesg_nindexes(fcpl, 1); + CHECK(ret, FAIL, "H5Pset_shared_mesg_nindexes"); + ret = H5Pset_shared_mesg_index(fcpl, 0, H5O_SHMESG_DTYPE_FLAG, 2); + CHECK(ret, FAIL, "H5Pset_shared_mesg_index"); + + /* Create the file with shared datatype message enabled */ + fid = H5Fcreate(FILE8, H5F_ACC_TRUNC, fcpl, fapl); + CHECK(fid, FAIL, "H5Fcreate"); + + /* Create an integer datatye */ + tid = H5Tcopy(H5T_NATIVE_INT); + CHECK(tid, FAIL, "H5Tcopy"); + + /* Create dataspace */ + sid = H5Screate(H5S_SCALAR); + CHECK(sid, FAIL, "H5Screate"); + + /* Create a group */ + gid = H5Gcreate2(fid, GRP_NAME, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); + CHECK(gid, FAIL, "H5Gcreate2"); + + /* Attach an attribute to the group with shared integer datatype */ + aid = H5Acreate2(gid, ATTR_NAME, tid, sid, H5P_DEFAULT, H5P_DEFAULT); + CHECK(aid, FAIL, "H5Acreate2"); + + /* Get the internal attribute pointer */ + attr = (H5A_t *)H5I_object(aid); + CHECK(attr, NULL, "H5I_object"); + + /* Verify the attribute version */ + if(low == H5F_LIBVER_EARLIEST) + /* The earliest version the library can set for an attribute with shared datatype is 2 */ + VERIFY(attr->shared->version, H5O_ATTR_VERSION_2, "H5O_attr_ver_bounds"); + else + VERIFY(attr->shared->version, H5O_attr_ver_bounds[low], "H5O_attr_ver_bounds"); + + /* Close the attribute */ + ret = H5Aclose(aid); + CHECK(ret, FAIL, "H5Aclose"); + + /* Close the group */ + ret = H5Gclose(gid); + CHECK(ret, FAIL, "H5Gclose"); + + /* Close the dataspace */ + ret = H5Sclose(sid); + CHECK(ret, FAIL, "H5Sclose"); + + /* Close the datatype */ + ret = H5Tclose(tid); + CHECK(ret, FAIL, "H5Tclose"); + + /* Close the file */ + ret = H5Fclose(fid); + CHECK(ret, FAIL, "H5Fclose"); + + /* Create a default file access property list */ + new_fapl = H5Pcreate(H5P_FILE_ACCESS); + CHECK(new_fapl, FAIL, "H5Pcreate"); + + /* Create a scalar dataspace to be used later for the attribute */ + sid = H5Screate(H5S_SCALAR); + CHECK(sid, FAIL, "H5Screate"); + + /* Loop through all the combinations of low/high bounds */ + /* Open the file and group and attach an attribute to the group */ + /* Verify the attribute version */ + for(low = H5F_LIBVER_EARLIEST; low < H5F_LIBVER_NBOUNDS; low++) { + for(high = H5F_LIBVER_EARLIEST; high < H5F_LIBVER_NBOUNDS; high++) { + H5E_BEGIN_TRY { + ret = H5Pset_libver_bounds(new_fapl, low, high); + } H5E_END_TRY; + + if(ret < 0) /* Invalid low/high combinations */ + continue; + + /* Open the file */ + H5E_BEGIN_TRY { + fid = H5Fopen(FILE8, H5F_ACC_RDWR, new_fapl); + } H5E_END_TRY; + + if(fid >=0 ) { /* The file open succeeds */ + + /* Get the internal file pointer */ + f = (H5F_t *)H5I_object(fid); + CHECK(f, NULL, "H5I_object"); + + /* Open the group */ + gid = H5Gopen2(fid, GRP_NAME, H5P_DEFAULT); + CHECK(gid, FAIL, "H5Gopen2"); + + /* Attach an attribute to the group */ + aid = H5Acreate2(gid, "attr1", H5T_NATIVE_INT, sid, H5P_DEFAULT, H5P_DEFAULT); + CHECK(aid, FAIL, "H5Acreate2"); + + /* Get the internal attribute pointer */ + attr = (H5A_t *)H5I_object(aid); + CHECK(attr, NULL, "H5I_object"); + + /* Verify the attribute message version */ + VERIFY(attr->shared->version, H5O_attr_ver_bounds[f->shared->low_bound], "H5O_attr_ver_bounds"); + + /* Close the attribute */ + ret = H5Aclose(aid); + CHECK(ret, FAIL, "H5Aclose"); + + /* Delete the attribute */ + ret = H5Adelete(gid, "attr1"); + CHECK(ret, FAIL, "H5Adelete"); + + /* Close the group */ + ret = H5Gclose(gid); + CHECK(ret, FAIL, "H5Gclose"); + + /* Close the file */ + ret = H5Fclose(fid); + CHECK(ret, FAIL, "H5Fclose"); + + } /* end if */ + } /* end for */ + } /* end for */ + + /* Close the file access property list */ + ret = H5Pclose(new_fapl); + CHECK(ret, FAIL, "H5Pclose"); + + /* Close the dataspace */ + ret = H5Sclose(sid); + CHECK(ret, FAIL, "H5Sclose"); + +} /* end test_libver_bounds_attributes() */ + +/**************************************************************** +** +** test_libver_macros(): +** Verify that H5_VERSION_GE and H5_VERSION_LE work correactly. +** +****************************************************************/ +static void +test_libver_macros(void) +{ + int major = H5_VERS_MAJOR; + int minor = H5_VERS_MINOR; + int release = H5_VERS_RELEASE; + + /* Output message about test being performed */ + MESSAGE(5, ("Testing macros for library version comparison\n")); + + VERIFY(H5_VERSION_GE(major,minor,release), TRUE, "H5_VERSION_GE"); + VERIFY(H5_VERSION_GE(major-1,minor,release), TRUE, "H5_VERSION_GE"); + VERIFY(H5_VERSION_GE(major-1,minor+1,release), TRUE, "H5_VERSION_GE"); + VERIFY(H5_VERSION_GE(major-1,minor,release+1), TRUE, "H5_VERSION_GE"); + VERIFY(H5_VERSION_GE(major,minor-1,release), TRUE, "H5_VERSION_GE"); + VERIFY(H5_VERSION_GE(major,minor-1,release+1), TRUE, "H5_VERSION_GE"); + if(H5_VERS_RELEASE > 0) + VERIFY(H5_VERSION_GE(major,minor,release-1), TRUE, "H5_VERSION_GE"); + + VERIFY(H5_VERSION_GE(major+1,minor,release), FALSE, "H5_VERSION_GE"); + VERIFY(H5_VERSION_GE(major+1,minor-1,release), FALSE, "H5_VERSION_GE"); + VERIFY(H5_VERSION_GE(major+1,minor-1,release-1), FALSE, "H5_VERSION_GE"); + VERIFY(H5_VERSION_GE(major,minor+1,release), FALSE, "H5_VERSION_GE"); + VERIFY(H5_VERSION_GE(major,minor+1,release-1), FALSE, "H5_VERSION_GE"); + VERIFY(H5_VERSION_GE(major,minor,release+1), FALSE, "H5_VERSION_GE"); + + VERIFY(H5_VERSION_LE(major,minor,release), TRUE, "H5_VERSION_LE"); + VERIFY(H5_VERSION_LE(major+1,minor,release), TRUE, "H5_VERSION_LE"); + VERIFY(H5_VERSION_LE(major+1,minor-1,release), TRUE, "H5_VERSION_LE"); + VERIFY(H5_VERSION_LE(major+1,minor-1,release-1), TRUE, "H5_VERSION_LE"); + VERIFY(H5_VERSION_LE(major,minor+1,release), TRUE, "H5_VERSION_LE"); + VERIFY(H5_VERSION_LE(major,minor+1,release-1), TRUE, "H5_VERSION_LE"); + VERIFY(H5_VERSION_LE(major,minor,release+1), TRUE, "H5_VERSION_LE"); + + VERIFY(H5_VERSION_LE(major-1,minor,release), FALSE, "H5_VERSION_LE"); + VERIFY(H5_VERSION_LE(major-1,minor+1,release), FALSE, "H5_VERSION_LE"); + VERIFY(H5_VERSION_LE(major-1,minor+1,release+1), FALSE, "H5_VERSION_LE"); + VERIFY(H5_VERSION_LE(major,minor-1,release), FALSE, "H5_VERSION_LE"); + VERIFY(H5_VERSION_LE(major,minor-1,release+1), FALSE, "H5_VERSION_LE"); + if(H5_VERS_RELEASE > 0) + VERIFY(H5_VERSION_LE(major,minor,release-1), FALSE, "H5_VERSION_LE"); +} /* test_libver_macros() */ + +/**************************************************************** +** +** test_libver_macros2(): +** Verify that H5_VERSION_GE works correactly and show how +** to use it. +** +****************************************************************/ +static void +test_libver_macros2(void) +{ + hid_t file; + hid_t grp; + htri_t status; + herr_t ret; /* Return value */ + + /* Output message about test being performed */ + MESSAGE(5, ("Testing macros for library version comparison with a file\n")); + + /* + * Create a file. + */ + file = H5Fcreate(FILE6, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT); + CHECK(file, FAIL, "H5Fcreate"); + + /* + * Create a group in the file. + */ + grp = H5Gcreate2(file, "Group", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); + CHECK(file, FAIL, "H5Gcreate"); + + /* + * Close the group + */ + ret = H5Gclose(grp); + CHECK(ret, FAIL, "H5Gclose"); + + /* + * Delete the group using different function based on the library version. + * And verify the action. + */ +#if H5_VERSION_GE(1,8,0) + ret = H5Ldelete(file, "Group", H5P_DEFAULT); + CHECK(ret, FAIL, "H5Lunlink"); + + status = H5Lexists(file, "Group", H5P_DEFAULT); + VERIFY(status, FALSE, "H5Lexists"); +#else + ret = H5Gunlink(file, "Group"); + CHECK(ret, FAIL, "H5Gunlink"); + + H5E_BEGIN_TRY { + grp = H5Gopen(file, "Group"); + } H5E_END_TRY; + VERIFY(grp, FAIL, "H5Gopen"); +#endif + + /* + * Close the file. + */ + ret = H5Fclose(file); + CHECK(ret, FAIL, "H5Fclose"); + +} /* test_libver_macros2() */ + +/**************************************************************** +** +** test_deprec(): +** Test deprecated functionality. +** +****************************************************************/ +#ifndef H5_NO_DEPRECATED_SYMBOLS +static void +test_deprec(void) +{ hid_t file; /* File IDs for old & new files */ hid_t fcpl; /* File creation property list */ hid_t fapl; /* File creation property list */ @@ -5068,7 +6943,7 @@ test_deprec(void) unsigned freelist; /* Free list version # */ unsigned stab; /* Symbol table entry version # */ unsigned shhdr; /* Shared object header version # */ - H5F_info1_t finfo; /* global information about file */ + H5F_info1_t finfo; /* global information about file */ herr_t ret; /* Generic return value */ /* Output message about test being performed */ @@ -5284,7 +7159,7 @@ test_deprec(void) void test_file(void) { - const char *env_h5_drvr; /* File Driver value from environment */ + const char *env_h5_drvr; /* File Driver value from environment */ /* Output message about test being performed */ MESSAGE(5, ("Testing Low-Level File I/O\n")); @@ -5332,6 +7207,7 @@ test_file(void) test_filespace_round_compatible(); /* Testing file space compatibility for files from trunk to 1_8 to trunk */ test_filespace_1_10_0_compatible(); /* Testing file space compatibility for files from release 1.10.0 */ test_libver_bounds(); /* Test compatibility for file space management */ + test_libver_bounds_low_high(); test_libver_macros(); /* Test the macros for library version comparison */ test_libver_macros2(); /* Test the macros for library version comparison */ #ifndef H5_NO_DEPRECATED_SYMBOLS @@ -5339,15 +7215,15 @@ test_file(void) #endif /* H5_NO_DEPRECATED_SYMBOLS */ } /* test_file() */ - + /*------------------------------------------------------------------------- - * Function: cleanup_file + * Function: cleanup_file * - * Purpose: Cleanup temporary test files + * Purpose: Cleanup temporary test files * - * Return: none + * Return: none * - * Programmer: Albert Cheng + * Programmer: Albert Cheng * July 2, 1998 * * Modifications: diff --git a/test/tgenprop.c b/test/tgenprop.c index 582b36e..5031846 100644 --- a/test/tgenprop.c +++ b/test/tgenprop.c @@ -13,13 +13,13 @@ /*********************************************************** * -* Test program: tgenprop +* Test program: tgenprop * * Test the Generic Property functionality * *************************************************************/ -#define H5P_FRIEND /*suppress error about including H5Ppkg */ +#define H5P_FRIEND /*suppress error about including H5Ppkg */ /* Define this macro to indicate that the testing APIs should be available */ #define H5P_TESTING @@ -27,7 +27,7 @@ #include "testhdf5.h" #include "H5Dprivate.h" /* For Dataset creation property list names */ -#include "H5Ppkg.h" /* Generic Properties */ +#include "H5Ppkg.h" /* Generic Properties */ #define FILENAME "tgenprop.h5" @@ -80,11 +80,11 @@ typedef struct count_data_t { static void test_genprop_basic_class(void) { - hid_t cid1; /* Generic Property class ID */ - hid_t cid2; /* Generic Property class ID */ - hid_t cid3; /* Generic Property class ID */ + hid_t cid1; /* Generic Property class ID */ + hid_t cid2; /* Generic Property class ID */ + hid_t cid3; /* Generic Property class ID */ char *name; /* Name of class */ - herr_t ret; /* Generic return value */ + herr_t ret; /* Generic return value */ /* Output message about test being performed */ MESSAGE(5, ("Testing Basic Generic Property List Class Creation Functionality\n")); @@ -169,10 +169,10 @@ test_genprop_basic_class(void) static void test_genprop_basic_class_prop(void) { - hid_t cid1; /* Generic Property class ID */ - size_t size; /* Size of property */ - size_t nprops; /* Number of properties in class */ - herr_t ret; /* Generic return value */ + hid_t cid1; /* Generic Property class ID */ + size_t size; /* Size of property */ + size_t nprops; /* Number of properties in class */ + herr_t ret; /* Generic return value */ /* Output message about test being performed */ MESSAGE(5, ("Testing Basic Generic Property List Class Properties Functionality\n")); @@ -311,8 +311,8 @@ test_genprop_iter1(hid_t H5_ATTR_UNUSED id, const char *name, static void test_genprop_class_iter(void) { - hid_t cid1; /* Generic Property class ID */ - size_t nprops; /* Number of properties in class */ + hid_t cid1; /* Generic Property class ID */ + size_t nprops; /* Number of properties in class */ int idx; /* Index to start iteration at */ struct { /* Struct for iterations */ int iter_count; @@ -323,7 +323,7 @@ test_genprop_class_iter(void) PROP2_NAME, PROP3_NAME, PROP4_NAME}; - herr_t ret; /* Generic return value */ + herr_t ret; /* Generic return value */ /* Output message about test being performed */ MESSAGE(5, ("Testing Basic Generic Property List Class Property Iteration Functionality\n")); @@ -417,17 +417,17 @@ test_genprop_cls_cls_cb1(hid_t list_id, void *create_data) static void test_genprop_class_callback(void) { - hid_t cid1; /* Generic Property class ID */ - hid_t cid2; /* Generic Property class ID */ - hid_t lid1; /* Generic Property list ID */ - hid_t lid2; /* Generic Property list ID */ - hid_t lid3; /* Generic Property list ID */ - size_t nprops; /* Number of properties in class */ + hid_t cid1; /* Generic Property class ID */ + hid_t cid2; /* Generic Property class ID */ + hid_t lid1; /* Generic Property list ID */ + hid_t lid2; /* Generic Property list ID */ + hid_t lid3; /* Generic Property list ID */ + size_t nprops; /* Number of properties in class */ struct { /* Struct for callbacks */ int count; hid_t id; } crt_cb_struct, cpy_cb_struct, cls_cb_struct; - herr_t ret; /* Generic return value */ + herr_t ret; /* Generic return value */ /* Output message about test being performed */ MESSAGE(5, ("Testing Basic Generic Property List Class Callback Functionality\n")); @@ -596,14 +596,14 @@ test_genprop_class_callback(void) static void test_genprop_basic_list(void) { - hid_t cid1; /* Generic Property class ID */ - hid_t cid2; /* Generic Property class ID */ - hid_t lid1; /* Generic Property list ID */ - size_t nprops; /* Number of properties */ - size_t size; /* Size of property */ + hid_t cid1; /* Generic Property class ID */ + hid_t cid2; /* Generic Property class ID */ + hid_t lid1; /* Generic Property list ID */ + size_t nprops; /* Number of properties */ + size_t size; /* Size of property */ int prop1_value; /* Value for property #1 */ float prop2_value; /* Value for property #2 */ - herr_t ret; /* Generic return value */ + herr_t ret; /* Generic return value */ /* Output message about test being performed */ MESSAGE(5, ("Testing Basic Generic Property List Creation Functionality\n")); @@ -678,8 +678,8 @@ test_genprop_basic_list(void) CHECK_I(ret, "H5Pget"); /* Verify the floating-poing value in this way to avoid compiler warning. */ if(!H5_FLT_ABS_EQUAL(prop2_value,*PROP2_DEF_VALUE)) - printf("*** UNEXPECTED VALUE from %s should be %f, but is %f at line %4d in %s\n", - "H5Pget", (double)*PROP2_DEF_VALUE, (double)prop2_value, (int)__LINE__, __FILE__); + printf("*** UNEXPECTED VALUE from %s should be %f, but is %f at line %4d in %s\n", + "H5Pget", (double)*PROP2_DEF_VALUE, (double)prop2_value, (int)__LINE__, __FILE__); /* Close list */ @@ -702,14 +702,14 @@ test_genprop_basic_list(void) static void test_genprop_basic_list_prop(void) { - hid_t cid1; /* Generic Property class ID */ - hid_t lid1; /* Generic Property list ID */ - size_t nprops; /* Number of properties */ + hid_t cid1; /* Generic Property class ID */ + hid_t lid1; /* Generic Property list ID */ + size_t nprops; /* Number of properties */ int prop1_value; /* Value for property #1 */ float prop2_value; /* Value for property #2 */ char prop3_value[10];/* Property #3 value */ double prop4_value; /* Property #4 value */ - herr_t ret; /* Generic return value */ + herr_t ret; /* Generic return value */ /* Output message about test being performed */ MESSAGE(5, ("Testing Basic Generic Property List Property Functionality\n")); @@ -770,8 +770,8 @@ test_genprop_basic_list_prop(void) CHECK_I(ret, "H5Pget"); /* Verify the floating-poing value in this way to avoid compiler warning. */ if(!H5_FLT_ABS_EQUAL(prop2_value,*PROP2_DEF_VALUE)) - printf("*** UNEXPECTED VALUE from %s should be %f, but is %f at line %4d in %s\n", - "H5Pget", (double)*PROP2_DEF_VALUE, (double)prop2_value, (int)__LINE__, __FILE__); + printf("*** UNEXPECTED VALUE from %s should be %f, but is %f at line %4d in %s\n", + "H5Pget", (double)*PROP2_DEF_VALUE, (double)prop2_value, (int)__LINE__, __FILE__); /* Check values of temporary properties (set with regular values) */ @@ -783,8 +783,8 @@ test_genprop_basic_list_prop(void) CHECK_I(ret, "H5Pget"); /* Verify the floating-poing value in this way to avoid compiler warning. */ if(!H5_DBL_ABS_EQUAL(prop4_value, *PROP4_DEF_VALUE)) - printf("*** UNEXPECTED VALUE from %s should be %f, but is %f at line %4d in %s\n", - "H5Pget", *PROP4_DEF_VALUE, prop4_value, (int)__LINE__, __FILE__); + printf("*** UNEXPECTED VALUE from %s should be %f, but is %f at line %4d in %s\n", + "H5Pget", *PROP4_DEF_VALUE, prop4_value, (int)__LINE__, __FILE__); /* Delete permanent property */ ret = H5Premove(lid1, PROP2_NAME); @@ -820,8 +820,8 @@ test_genprop_basic_list_prop(void) CHECK_I(ret, "H5Pget"); /* Verify the floating-poing value in this way to avoid compiler warning. */ if(!H5_DBL_ABS_EQUAL(prop4_value, *PROP4_DEF_VALUE)) - printf("*** UNEXPECTED VALUE from %s should be %f, but is %f at line %4d in %s\n", - "H5Pget", *PROP4_DEF_VALUE, prop4_value, (int)__LINE__, __FILE__); + printf("*** UNEXPECTED VALUE from %s should be %f, but is %f at line %4d in %s\n", + "H5Pget", *PROP4_DEF_VALUE, prop4_value, (int)__LINE__, __FILE__); /* Close list */ ret = H5Pclose(lid1); @@ -856,9 +856,9 @@ test_genprop_iter2(hid_t H5_ATTR_UNUSED id, const char *name, static void test_genprop_list_iter(void) { - hid_t cid1; /* Generic Property class ID */ - hid_t lid1; /* Generic Property list ID */ - size_t nprops; /* Number of properties */ + hid_t cid1; /* Generic Property class ID */ + hid_t lid1; /* Generic Property list ID */ + size_t nprops; /* Number of properties */ int idx; /* Index to start iteration at */ struct { /* Struct for iterations */ int iter_count; @@ -870,7 +870,7 @@ test_genprop_list_iter(void) PROP1_NAME, PROP2_NAME }; - herr_t ret; /* Generic return value */ + herr_t ret; /* Generic return value */ /* Output message about test being performed */ MESSAGE(5, ("Testing Generic Property List Iteration Functionality\n")); @@ -1144,10 +1144,10 @@ test_genprop_prop_del_cb2(hid_t plist_id, const char *name, size_t size, void *v static void test_genprop_list_callback(void) { - hid_t cid1; /* Generic Property class ID */ - hid_t lid1; /* Generic Property list ID */ - hid_t lid2; /* 2nd Generic Property list ID */ - size_t nprops; /* Number of properties in class */ + hid_t cid1; /* Generic Property class ID */ + hid_t lid1; /* Generic Property list ID */ + hid_t lid2; /* 2nd Generic Property list ID */ + size_t nprops; /* Number of properties in class */ int prop1_value; /* Value for property #1 */ int prop1_new_value=20; /* Property #1 new value */ float prop2_value; /* Value for property #2 */ @@ -1158,7 +1158,7 @@ test_genprop_list_callback(void) int count; hid_t id; } cop_cb_struct; - herr_t ret; /* Generic return value */ + herr_t ret; /* Generic return value */ /* Output message about test being performed */ MESSAGE(5, ("Testing Basic Generic Property List Property Callback Functionality\n")); @@ -1225,8 +1225,8 @@ test_genprop_list_callback(void) CHECK_I(ret, "H5Pget"); /* Verify the floating-poing value in this way to avoid compiler warning. */ if(!H5_FLT_ABS_EQUAL(prop2_value,*PROP2_DEF_VALUE)) - printf("*** UNEXPECTED VALUE from %s should be %f, but is %f at line %4d in %s\n", - "H5Pget", (double)*PROP2_DEF_VALUE, (double)prop2_value, (int)__LINE__, __FILE__); + printf("*** UNEXPECTED VALUE from %s should be %f, but is %f at line %4d in %s\n", + "H5Pget", (double)*PROP2_DEF_VALUE, (double)prop2_value, (int)__LINE__, __FILE__); /* Check values of temporary properties (set with regular values) */ ret = H5Pget(lid1, PROP3_NAME,&prop3_value); @@ -1240,8 +1240,8 @@ test_genprop_list_callback(void) CHECK_I(ret, "H5Pget"); /* Verify the floating-poing value in this way to avoid compiler warning. */ if(!H5_DBL_ABS_EQUAL(prop4_value, *PROP4_DEF_VALUE)) - printf("*** UNEXPECTED VALUE from %s should be %f, but is %f at line %4d in %s\n", - "H5Pget", *PROP4_DEF_VALUE, prop4_value, (int)__LINE__, __FILE__); + printf("*** UNEXPECTED VALUE from %s should be %f, but is %f at line %4d in %s\n", + "H5Pget", *PROP4_DEF_VALUE, prop4_value, (int)__LINE__, __FILE__); /* Verify get callback information for properties tracked */ VERIFY(prop1_cb_info.get_count, 1, "H5Pget"); @@ -1373,7 +1373,7 @@ test_genprop_list_addprop(void) hid_t sid; /* Dataspace ID */ hid_t pid; /* Property List ID */ int prop1_value; /* Value for property #1 */ - herr_t ret; /* Generic return value */ + herr_t ret; /* Generic return value */ /* Create file */ fid = H5Fcreate(FILENAME, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT); @@ -1448,7 +1448,7 @@ test_genprop_class_addprop(void) hid_t cid; /* Property Class ID */ hid_t pid; /* Property List ID */ int prop1_value; /* Value for property #1 */ - herr_t ret; /* Generic return value */ + herr_t ret; /* Generic return value */ /* Create file */ fid = H5Fcreate(FILENAME, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT); @@ -1570,7 +1570,7 @@ static void test_genprop_list_add_remove_prop(void) { hid_t pid; /* Property List ID */ - herr_t ret; /* Generic return value */ + herr_t ret; /* Generic return value */ /* Create a dataset creation property list */ pid = H5Pcreate(H5P_DATASET_CREATE); @@ -1607,11 +1607,11 @@ test_genprop_list_add_remove_prop(void) static void test_genprop_equal(void) { - hid_t cid1; /* Generic Property class ID */ - hid_t lid1; /* Generic Property list ID */ - hid_t lid2; /* Generic Property list ID */ + hid_t cid1; /* Generic Property class ID */ + hid_t lid1; /* Generic Property list ID */ + hid_t lid2; /* Generic Property list ID */ int prop1_new_value = 20; /* Property #1 new value */ - herr_t ret; /* Generic return value */ + herr_t ret; /* Generic return value */ /* Output message about test being performed */ MESSAGE(5, ("Testing Basic Generic Property List Equal Functionality\n")); @@ -1756,11 +1756,11 @@ test_genprop_equal(void) static void test_genprop_path(void) { - hid_t cid1; /* Generic Property class ID */ - hid_t cid2; /* Generic Property class ID */ - hid_t cid3; /* Generic Property class ID */ + hid_t cid1; /* Generic Property class ID */ + hid_t cid2; /* Generic Property class ID */ + hid_t cid3; /* Generic Property class ID */ char *path; /* Class path */ - herr_t ret; /* Generic return value */ + herr_t ret; /* Generic return value */ /* Output message about test being performed */ MESSAGE(5, ("Testing Generic Property List Class Path Functionality\n")); @@ -1828,10 +1828,10 @@ test_genprop_path(void) static void test_genprop_refcount(void) { - hid_t cid1; /* Generic Property class ID */ - hid_t lid1; /* Generic Property class ID */ + hid_t cid1; /* Generic Property class ID */ + hid_t lid1; /* Generic Property class ID */ char *name; /* Name of class */ - herr_t ret; /* Generic return value */ + herr_t ret; /* Generic return value */ /* Output message about test being performed */ MESSAGE(5, ("Testing Generic Property List Reference Count Functionality\n")); @@ -1901,10 +1901,10 @@ test_genprop_refcount(void) static void test_genprop_deprec_class(void) { - hid_t cid1; /* Generic Property class ID */ - size_t size; /* Size of property */ - size_t nprops; /* Number of properties in class */ - herr_t ret; /* Generic return value */ + hid_t cid1; /* Generic Property class ID */ + size_t size; /* Size of property */ + size_t nprops; /* Number of properties in class */ + herr_t ret; /* Generic return value */ /* Output message about test being performed */ MESSAGE(5, ("Testing Deprecated Generic Property List Functions\n")); @@ -2034,7 +2034,7 @@ test_genprop_deprec_list(void) hid_t sid; /* Dataspace ID */ hid_t pid; /* Property List ID */ int prop1_value; /* Value for property #1 */ - herr_t ret; /* Generic return value */ + herr_t ret; /* Generic return value */ /* Create file */ fid = H5Fcreate(FILENAME, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT); @@ -2130,15 +2130,15 @@ test_genprop(void) } /* test_genprop() */ - + /*------------------------------------------------------------------------- - * Function: cleanup_genprop + * Function: cleanup_genprop * - * Purpose: Cleanup temporary test files + * Purpose: Cleanup temporary test files * - * Return: none + * Return: none * - * Programmer: Quincey Koziol + * Programmer: Quincey Koziol * June 8, 1999 * * Modifications: diff --git a/test/th5o.c b/test/th5o.c index 144ea4c..00d706c 100644 --- a/test/th5o.c +++ b/test/th5o.c @@ -774,7 +774,7 @@ test_h5o_link(void) hid_t lcpl_id=-1; hsize_t dims[2] = {TEST6_DIM1, TEST6_DIM2}; htri_t committed; /* Whether the named datatype is committed */ - unsigned new_format; /* Whether to use the new format or not */ + H5F_libver_t low, high; /* File format bounds */ int *wdata; int *rdata; int i, n; @@ -801,98 +801,103 @@ test_h5o_link(void) ret = H5Pset_create_intermediate_group(lcpl_id, TRUE); CHECK(ret, FAIL, "H5Pset_create_intermediate_group"); - /* Loop over using new group format */ - for(new_format = FALSE; new_format <= TRUE; new_format++) { - - /* Make a FAPL that uses the "use the latest version of the format" bounds */ - fapl_id = H5Pcreate(H5P_FILE_ACCESS); - CHECK(fapl_id, FAIL, "H5Pcreate"); - - /* Set the "use the latest version of the format" bounds for creating objects in the file */ - ret = H5Pset_libver_bounds(fapl_id, (new_format ? H5F_LIBVER_LATEST : H5F_LIBVER_EARLIEST), H5F_LIBVER_LATEST); - CHECK(ret, FAIL, "H5Pset_libver_bounds"); - - /* Create a new HDF5 file */ - file_id = H5Fcreate(TEST_FILENAME, H5F_ACC_TRUNC, H5P_DEFAULT, fapl_id); - CHECK(file_id, FAIL, "H5Fcreate"); - - /* Close the FAPL */ - ret = H5Pclose(fapl_id); - CHECK(ret, FAIL, "H5Pclose"); - - - /* Create and commit a datatype with no name */ - type_id = H5Tcopy(H5T_NATIVE_INT); - CHECK(type_id, FAIL, "H5Fcreate"); - ret = H5Tcommit_anon(file_id, type_id, H5P_DEFAULT, H5P_DEFAULT); - CHECK(ret, FAIL, "H5Tcommit_anon"); - committed = H5Tcommitted(type_id); - VERIFY(committed, TRUE, "H5Tcommitted"); - - /* Create a dataset with no name using the committed datatype*/ - dset_id = H5Dcreate_anon(file_id, type_id, space_id, H5P_DEFAULT, H5P_DEFAULT); - CHECK(dset_id, FAIL, "H5Dcreate_anon"); - - /* Verify that we can write to and read from the dataset */ - - /* Write the data to the dataset */ - ret = H5Dwrite(dset_id, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, wdata); - CHECK(ret, FAIL, "H5Dwrite"); - - /* Read the data back */ - ret = H5Dread(dset_id, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, rdata); - CHECK(ret, FAIL, "H5Dread"); - - /* Verify the data */ - for(i = 0; i < (TEST6_DIM1 * TEST6_DIM2); i++) - VERIFY(wdata[i], rdata[i], "H5Dread"); - - /* Create a group with no name*/ - group_id = H5Gcreate_anon(file_id, H5P_DEFAULT, H5P_DEFAULT); - CHECK(group_id, FAIL, "H5Gcreate_anon"); - - /* Link nameless datatype into nameless group */ - ret = H5Olink(type_id, group_id, "datatype", H5P_DEFAULT, H5P_DEFAULT); - CHECK(ret, FAIL, "H5Olink"); - - /* Link nameless dataset into nameless group with intermediate group */ - ret = H5Olink(dset_id, group_id, "inter_group/dataset", lcpl_id, H5P_DEFAULT); - CHECK(ret, FAIL, "H5Olink"); - - /* Close IDs for dataset and datatype */ - ret = H5Dclose(dset_id); - CHECK(ret, FAIL, "H5Dclose"); - ret = H5Tclose(type_id); - CHECK(ret, FAIL, "H5Tclose"); - - /* Re-open datatype using new link */ - type_id = H5Topen2(group_id, "datatype", H5P_DEFAULT); - CHECK(type_id, FAIL, "H5Topen2"); - - /* Link nameless group to root group and close the group ID*/ - ret = H5Olink(group_id, file_id, "/group", H5P_DEFAULT, H5P_DEFAULT); - CHECK(ret, FAIL, "H5Olink"); - ret = H5Gclose(group_id); - CHECK(ret, FAIL, "H5Gclose"); - - /* Open dataset through root group and verify its data */ - dset_id = H5Dopen2(file_id, "/group/inter_group/dataset", H5P_DEFAULT); - CHECK(dset_id, FAIL, "H5Dopen2"); - - /* Read data from dataset */ - ret = H5Dread(dset_id, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, rdata); - CHECK(ret, FAIL, "H5Dread"); - for(i = 0; i < (TEST6_DIM1 * TEST6_DIM2); i++) - VERIFY(wdata[i], rdata[i], "H5Dread"); - - /* Close open IDs */ - ret = H5Dclose(dset_id); - CHECK(ret, FAIL, "H5Dclose"); - ret = H5Tclose(type_id); - CHECK(ret, FAIL, "H5Tclose"); - ret = H5Fclose(file_id); - CHECK(ret, FAIL, "H5Fclose"); - } /* end for */ + /* Create a file access property list */ + fapl_id = H5Pcreate(H5P_FILE_ACCESS); + CHECK(fapl_id, FAIL, "H5Pcreate"); + + /* Loop through all the combinations of low/high library format bounds */ + for(low = H5F_LIBVER_EARLIEST; low < H5F_LIBVER_NBOUNDS; low++) { + for(high = H5F_LIBVER_EARLIEST; high < H5F_LIBVER_NBOUNDS; high++) { + + /* Set version bounds */ + H5E_BEGIN_TRY { + ret = H5Pset_libver_bounds(fapl_id, low, high); + } H5E_END_TRY; + + if (ret < 0) /* Invalid low/high combinations */ + continue; + + /* Create a new HDF5 file */ + file_id = H5Fcreate(TEST_FILENAME, H5F_ACC_TRUNC, H5P_DEFAULT, fapl_id); + CHECK(file_id, FAIL, "H5Fcreate"); + + /* Close the FAPL */ + ret = H5Pclose(fapl_id); + CHECK(ret, FAIL, "H5Pclose"); + + /* Create and commit a datatype with no name */ + type_id = H5Tcopy(H5T_NATIVE_INT); + CHECK(type_id, FAIL, "H5Fcreate"); + ret = H5Tcommit_anon(file_id, type_id, H5P_DEFAULT, H5P_DEFAULT); + CHECK(ret, FAIL, "H5Tcommit_anon"); + committed = H5Tcommitted(type_id); + VERIFY(committed, TRUE, "H5Tcommitted"); + + /* Create a dataset with no name using the committed datatype*/ + dset_id = H5Dcreate_anon(file_id, type_id, space_id, H5P_DEFAULT, H5P_DEFAULT); + CHECK(dset_id, FAIL, "H5Dcreate_anon"); + + /* Verify that we can write to and read from the dataset */ + + /* Write the data to the dataset */ + ret = H5Dwrite(dset_id, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, wdata); + CHECK(ret, FAIL, "H5Dwrite"); + + /* Read the data back */ + ret = H5Dread(dset_id, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, rdata); + CHECK(ret, FAIL, "H5Dread"); + + /* Verify the data */ + for(i = 0; i < (TEST6_DIM1 * TEST6_DIM2); i++) + VERIFY(wdata[i], rdata[i], "H5Dread"); + + /* Create a group with no name*/ + group_id = H5Gcreate_anon(file_id, H5P_DEFAULT, H5P_DEFAULT); + CHECK(group_id, FAIL, "H5Gcreate_anon"); + + /* Link nameless datatype into nameless group */ + ret = H5Olink(type_id, group_id, "datatype", H5P_DEFAULT, H5P_DEFAULT); + CHECK(ret, FAIL, "H5Olink"); + + /* Link nameless dataset into nameless group with intermediate group */ + ret = H5Olink(dset_id, group_id, "inter_group/dataset", lcpl_id, H5P_DEFAULT); + CHECK(ret, FAIL, "H5Olink"); + + /* Close IDs for dataset and datatype */ + ret = H5Dclose(dset_id); + CHECK(ret, FAIL, "H5Dclose"); + ret = H5Tclose(type_id); + CHECK(ret, FAIL, "H5Tclose"); + + /* Re-open datatype using new link */ + type_id = H5Topen2(group_id, "datatype", H5P_DEFAULT); + CHECK(type_id, FAIL, "H5Topen2"); + + /* Link nameless group to root group and close the group ID*/ + ret = H5Olink(group_id, file_id, "/group", H5P_DEFAULT, H5P_DEFAULT); + CHECK(ret, FAIL, "H5Olink"); + ret = H5Gclose(group_id); + CHECK(ret, FAIL, "H5Gclose"); + + /* Open dataset through root group and verify its data */ + dset_id = H5Dopen2(file_id, "/group/inter_group/dataset", H5P_DEFAULT); + CHECK(dset_id, FAIL, "H5Dopen2"); + + /* Read data from dataset */ + ret = H5Dread(dset_id, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, rdata); + CHECK(ret, FAIL, "H5Dread"); + for(i = 0; i < (TEST6_DIM1 * TEST6_DIM2); i++) + VERIFY(wdata[i], rdata[i], "H5Dread"); + + /* Close open IDs */ + ret = H5Dclose(dset_id); + CHECK(ret, FAIL, "H5Dclose"); + ret = H5Tclose(type_id); + CHECK(ret, FAIL, "H5Tclose"); + ret = H5Fclose(file_id); + CHECK(ret, FAIL, "H5Fclose"); + } /* for high */ + } /* for low */ /* Close remaining IDs */ ret = H5Sclose(space_id); diff --git a/test/th5s.c b/test/th5s.c index 9712bf1..cd855e9 100644 --- a/test/th5s.c +++ b/test/th5s.c @@ -13,7 +13,7 @@ /*********************************************************** * -* Test program: th5s +* Test program: th5s * * Test the dataspace functionality * @@ -23,6 +23,25 @@ #include "H5srcdir.h" #include "H5Bprivate.h" +#include "H5Iprivate.h" +#include "H5Pprivate.h" + +/* + * This file needs to access private information from the H5S package. + * This file also needs to access the dataspace testing code. + */ +#define H5S_FRIEND /*suppress error about including H5Spkg */ +#include "H5Spkg.h" /* Dataspaces */ + +/* + * This file needs to access private information from the H5O package. + * This file also needs to access the dataspace testing code. + */ +#define H5O_FRIEND /*suppress error about including H5Opkg */ +#define H5O_TESTING +#include "H5Opkg.h" /* Object header */ + +#include "H5Bprivate.h" #include "H5Sprivate.h" #include "H5Pprivate.h" @@ -42,31 +61,31 @@ #define EXTFILE_NAME "ext_file" /* 3-D dataset with fixed dimensions */ -#define SPACE1_RANK 3 -#define SPACE1_DIM1 3 -#define SPACE1_DIM2 15 -#define SPACE1_DIM3 13 +#define SPACE1_RANK 3 +#define SPACE1_DIM1 3 +#define SPACE1_DIM2 15 +#define SPACE1_DIM3 13 /* 4-D dataset with one unlimited dimension */ -#define SPACE2_RANK 4 -#define SPACE2_DIM1 0 -#define SPACE2_DIM2 15 -#define SPACE2_DIM3 13 -#define SPACE2_DIM4 23 -#define SPACE2_MAX1 H5S_UNLIMITED -#define SPACE2_MAX2 15 -#define SPACE2_MAX3 13 -#define SPACE2_MAX4 23 +#define SPACE2_RANK 4 +#define SPACE2_DIM1 0 +#define SPACE2_DIM2 15 +#define SPACE2_DIM3 13 +#define SPACE2_DIM4 23 +#define SPACE2_MAX1 H5S_UNLIMITED +#define SPACE2_MAX2 15 +#define SPACE2_MAX3 13 +#define SPACE2_MAX4 23 /* Scalar dataset with simple datatype */ -#define SPACE3_RANK 0 +#define SPACE3_RANK 0 unsigned space3_data=65; /* Scalar dataset with compound datatype */ -#define SPACE4_FIELDNAME1 "c1" -#define SPACE4_FIELDNAME2 "u" -#define SPACE4_FIELDNAME3 "f" -#define SPACE4_FIELDNAME4 "c2" +#define SPACE4_FIELDNAME1 "c1" +#define SPACE4_FIELDNAME2 "u" +#define SPACE4_FIELDNAME3 "f" +#define SPACE4_FIELDNAME4 "c2" size_t space4_field1_off=0; size_t space4_field2_off=0; size_t space4_field3_off=0; @@ -90,21 +109,21 @@ struct space4_struct { static void test_h5s_basic(void) { - hid_t fid1; /* HDF5 File IDs */ - hid_t sid1, sid2; /* Dataspace ID */ - hid_t dset1; /* Dataset ID */ + hid_t fid1; /* HDF5 File IDs */ + hid_t sid1, sid2; /* Dataspace ID */ + hid_t dset1; /* Dataset ID */ hid_t aid1; /* Attribute ID */ - int rank; /* Logical rank of dataspace */ - hsize_t dims1[] = {SPACE1_DIM1, SPACE1_DIM2, SPACE1_DIM3}; - hsize_t dims2[] = {SPACE2_DIM1, SPACE2_DIM2, SPACE2_DIM3, - SPACE2_DIM4}; - hsize_t dims3[H5S_MAX_RANK+1]; - hsize_t max2[] = {SPACE2_MAX1, SPACE2_MAX2, SPACE2_MAX3, - SPACE2_MAX4}; - hsize_t tdims[4]; /* Dimension array to test with */ - hsize_t tmax[4]; - hssize_t n; /* Number of dataspace elements */ - herr_t ret; /* Generic return value */ + int rank; /* Logical rank of dataspace */ + hsize_t dims1[] = {SPACE1_DIM1, SPACE1_DIM2, SPACE1_DIM3}; + hsize_t dims2[] = {SPACE2_DIM1, SPACE2_DIM2, SPACE2_DIM3, + SPACE2_DIM4}; + hsize_t dims3[H5S_MAX_RANK+1]; + hsize_t max2[] = {SPACE2_MAX1, SPACE2_MAX2, SPACE2_MAX3, + SPACE2_MAX4}; + hsize_t tdims[4]; /* Dimension array to test with */ + hsize_t tmax[4]; + hssize_t n; /* Number of dataspace elements */ + herr_t ret; /* Generic return value */ /* Output message about test being performed */ MESSAGE(5, ("Testing Dataspace Manipulation\n")); @@ -115,7 +134,7 @@ test_h5s_basic(void) n = H5Sget_simple_extent_npoints(sid1); CHECK(n, FAIL, "H5Sget_simple_extent_npoints"); VERIFY(n, SPACE1_DIM1 * SPACE1_DIM2 * SPACE1_DIM3, - "H5Sget_simple_extent_npoints"); + "H5Sget_simple_extent_npoints"); rank = H5Sget_simple_extent_ndims(sid1); CHECK(rank, FAIL, "H5Sget_simple_extent_ndims"); @@ -124,7 +143,7 @@ test_h5s_basic(void) rank = H5Sget_simple_extent_dims(sid1, tdims, NULL); CHECK(rank, FAIL, "H5Sget_simple_extent_dims"); VERIFY(HDmemcmp(tdims, dims1, SPACE1_RANK * sizeof(hsize_t)), 0, - "H5Sget_simple_extent_dims"); + "H5Sget_simple_extent_dims"); sid2 = H5Screate_simple(SPACE2_RANK, dims2, max2); CHECK(sid2, FAIL, "H5Screate_simple"); @@ -132,7 +151,7 @@ test_h5s_basic(void) n = H5Sget_simple_extent_npoints(sid2); CHECK(n, FAIL, "H5Sget_simple_extent_npoints"); VERIFY(n, SPACE2_DIM1 * SPACE2_DIM2 * SPACE2_DIM3 * SPACE2_DIM4, - "H5Sget_simple_extent_npoints"); + "H5Sget_simple_extent_npoints"); rank = H5Sget_simple_extent_ndims(sid2); CHECK(rank, FAIL, "H5Sget_simple_extent_ndims"); @@ -141,9 +160,9 @@ test_h5s_basic(void) rank = H5Sget_simple_extent_dims(sid2, tdims, tmax); CHECK(rank, FAIL, "H5Sget_simple_extent_dims"); VERIFY(HDmemcmp(tdims, dims2, SPACE2_RANK * sizeof(hsize_t)), 0, - "H5Sget_simple_extent_dims"); + "H5Sget_simple_extent_dims"); VERIFY(HDmemcmp(tmax, max2, SPACE2_RANK * sizeof(hsize_t)), 0, - "H5Sget_simple_extent_dims"); + "H5Sget_simple_extent_dims"); /* Change max dims to be equal to the dimensions */ ret = H5Sset_extent_simple(sid1, SPACE1_RANK, dims1, NULL); @@ -151,9 +170,9 @@ test_h5s_basic(void) rank = H5Sget_simple_extent_dims(sid1, tdims, tmax); CHECK(rank, FAIL, "H5Sget_simple_extent_dims"); VERIFY(HDmemcmp(tdims, dims1, SPACE1_RANK * sizeof(hsize_t)), 0, - "H5Sget_simple_extent_dims"); + "H5Sget_simple_extent_dims"); VERIFY(HDmemcmp(tmax, dims1, SPACE1_RANK * sizeof(hsize_t)), 0, - "H5Sget_simple_extent_dims"); + "H5Sget_simple_extent_dims"); ret = H5Sclose(sid1); CHECK(ret, FAIL, "H5Sclose"); @@ -166,7 +185,7 @@ test_h5s_basic(void) * dimensions. */ H5E_BEGIN_TRY { - sid1 = H5Screate_simple(H5S_MAX_RANK+1, dims3, NULL); + sid1 = H5Screate_simple(H5S_MAX_RANK+1, dims3, NULL); } H5E_END_TRY; VERIFY(sid1, FAIL, "H5Screate_simple"); @@ -289,7 +308,7 @@ test_h5s_basic(void) CHECK(ret, FAIL, "H5Sclose"); ret = H5Fclose(fid1); CHECK(ret, FAIL, "H5Fclose"); -} /* test_h5s_basic() */ +} /* test_h5s_basic() */ /**************************************************************** ** @@ -349,16 +368,16 @@ test_h5s_null(void) hsize_t start[1]={0}; hsize_t count[1]={0}; - ret = H5Sselect_hyperslab(sid, H5S_SELECT_SET, start, NULL, count, NULL); + ret = H5Sselect_hyperslab(sid, H5S_SELECT_SET, start, NULL, count, NULL); } H5E_END_TRY; VERIFY(ret, FAIL, "H5Sselect_hyperslab"); /* Check to be sure we can't set a point selection on a null dataspace */ H5E_BEGIN_TRY { - hsize_t coord[1][1]; /* Coordinates for point selection */ + hsize_t coord[1][1]; /* Coordinates for point selection */ coord[0][0]=0; - ret = H5Sselect_elements(sid, H5S_SELECT_SET, (size_t)1, (const hsize_t *)coord); + ret = H5Sselect_elements(sid, H5S_SELECT_SET, (size_t)1, (const hsize_t *)coord); } H5E_END_TRY; VERIFY(ret, FAIL, "H5Sselect_elements"); @@ -519,18 +538,18 @@ test_h5s_null(void) static void test_h5s_zero_dim(void) { - hid_t fid1; /* HDF5 File IDs */ - hid_t sid1, attr_sid; /* Dataspace ID */ - hid_t sid_chunk; /* Dataspace ID for chunked dataset */ - hid_t dset1; /* Dataset ID */ + hid_t fid1; /* HDF5 File IDs */ + hid_t sid1, attr_sid; /* Dataspace ID */ + hid_t sid_chunk; /* Dataspace ID for chunked dataset */ + hid_t dset1; /* Dataset ID */ hid_t plist_id; /* Dataset creation property list */ hid_t attr; /* Attribute ID */ - int rank; /* Logical rank of dataspace */ - hsize_t dims1[] = {0, SPACE1_DIM2, SPACE1_DIM3}; - hsize_t max_dims[] = {SPACE1_DIM1+1, SPACE1_DIM2, SPACE1_DIM3}; - hsize_t extend_dims[] = {SPACE1_DIM1, SPACE1_DIM2, SPACE1_DIM3}; + int rank; /* Logical rank of dataspace */ + hsize_t dims1[] = {0, SPACE1_DIM2, SPACE1_DIM3}; + hsize_t max_dims[] = {SPACE1_DIM1+1, SPACE1_DIM2, SPACE1_DIM3}; + hsize_t extend_dims[] = {SPACE1_DIM1, SPACE1_DIM2, SPACE1_DIM3}; hsize_t chunk_dims[] = {SPACE1_DIM1, SPACE1_DIM2/3, SPACE1_DIM3}; - hsize_t tdims[SPACE1_RANK]; /* Dimension array to test with */ + hsize_t tdims[SPACE1_RANK]; /* Dimension array to test with */ int wdata[SPACE1_DIM2][SPACE1_DIM3]; int rdata[SPACE1_DIM2][SPACE1_DIM3]; short wdata_short[SPACE1_DIM2][SPACE1_DIM3]; @@ -540,12 +559,12 @@ test_h5s_zero_dim(void) int val = 3; hsize_t start[] = {0, 0, 0}; hsize_t count[] = {3, 15, 13}; - hsize_t coord[1][3]; /* Coordinates for point selection */ + hsize_t coord[1][3]; /* Coordinates for point selection */ hssize_t nelem; /* Number of elements */ H5S_sel_type sel_type; /* Type of selection currently */ H5S_class_t stype; /* dataspace type */ H5D_alloc_time_t alloc_time; /* Space allocation time */ - herr_t ret; /* Generic return value */ + herr_t ret; /* Generic return value */ unsigned int i, j, k; /* Output message about test being performed */ @@ -621,8 +640,8 @@ test_h5s_zero_dim(void) CHECK(sid_chunk, FAIL, "H5Screate_simple"); /*============================================ - * Make sure we can use 0-dimension to create - * contiguous, chunked, compact, and external + * Make sure we can use 0-dimension to create + * contiguous, chunked, compact, and external * datasets, and also attribute. *============================================ */ @@ -686,7 +705,7 @@ test_h5s_zero_dim(void) } } - /* Select a hyperslab beyond its current dimension sizes, then try to write + /* Select a hyperslab beyond its current dimension sizes, then try to write * the data. It should fail. */ ret = H5Sselect_hyperslab(sid1, H5S_SELECT_SET, start, NULL, count, NULL); CHECK(ret, FAIL, "H5Sselect_hyperslab"); @@ -700,7 +719,7 @@ test_h5s_zero_dim(void) ret = H5Sselect_none(sid1); CHECK(ret, FAIL, "H5Sselect_none"); - /* Select a point beyond the dimension size, then try to write the data. + /* Select a point beyond the dimension size, then try to write the data. * It should fail. */ coord[0][0]=2; coord[0][1]=5; coord[0][2]=3; ret = H5Sselect_elements(sid1, H5S_SELECT_SET, (size_t)1, (const hsize_t *)coord); @@ -752,8 +771,8 @@ test_h5s_zero_dim(void) } } - /* Now extend the dataset to SPACE1_DIM1*SPACE1_DIM2*SPACE1_DIM3 and make sure - * we can write data to it */ + /* Now extend the dataset to SPACE1_DIM1*SPACE1_DIM2*SPACE1_DIM3 and make sure + * we can write data to it */ extend_dims[0] = SPACE1_DIM1; ret = H5Dset_extent(dset1, extend_dims); CHECK(ret, FAIL, "H5Dset_extent"); @@ -953,10 +972,10 @@ test_h5s_zero_dim(void) CHECK(ret, FAIL, "H5Aclose"); /*=============================================================== - * Extend the dimension to make it a normal dataspace (3x15x13). - * Verify that data can be written to and read from the chunked - * dataset now. - *=============================================================== + * Extend the dimension to make it a normal dataspace (3x15x13). + * Verify that data can be written to and read from the chunked + * dataset now. + *=============================================================== */ dims1[0]=SPACE1_DIM1; ret = H5Sset_extent_simple(sid_chunk,SPACE1_RANK,dims1,max_dims); @@ -1157,14 +1176,14 @@ test_h5s_zero_dim(void) static void test_h5s_encode(void) { - hid_t sid1, sid2, sid3; /* Dataspace ID */ + hid_t sid1, sid2, sid3; /* Dataspace ID */ hid_t decoded_sid1, decoded_sid2, decoded_sid3; - int rank; /* Logical rank of dataspace */ - hsize_t dims1[] = {SPACE1_DIM1, SPACE1_DIM2, SPACE1_DIM3}; + int rank; /* Logical rank of dataspace */ + hsize_t dims1[] = {SPACE1_DIM1, SPACE1_DIM2, SPACE1_DIM3}; size_t sbuf_size=0, null_size=0, scalar_size=0; unsigned char *sbuf=NULL, *null_sbuf=NULL, *scalar_buf=NULL; - hsize_t tdims[4]; /* Dimension array to test with */ - hssize_t n; /* Number of dataspace elements */ + hsize_t tdims[4]; /* Dimension array to test with */ + hssize_t n; /* Number of dataspace elements */ hsize_t start[] = {0, 0, 0}; hsize_t stride[] = {2, 5, 3}; hsize_t count[] = {2, 2, 2}; @@ -1172,8 +1191,8 @@ test_h5s_encode(void) H5S_sel_type sel_type; H5S_class_t space_type; hssize_t nblocks; - hid_t ret_id; /* Generic hid_t return value */ - herr_t ret; /* Generic return value */ + hid_t ret_id; /* Generic hid_t return value */ + herr_t ret; /* Generic return value */ /* Output message about test being performed */ MESSAGE(5, ("Testing Dataspace Encoding and Decoding\n")); @@ -1197,7 +1216,7 @@ test_h5s_encode(void) /* Try decoding bogus buffer */ H5E_BEGIN_TRY { - ret_id = H5Sdecode(sbuf); + ret_id = H5Sdecode(sbuf); } H5E_END_TRY; VERIFY(ret_id, FAIL, "H5Sdecode"); @@ -1212,7 +1231,7 @@ test_h5s_encode(void) n = H5Sget_simple_extent_npoints(decoded_sid1); CHECK(n, FAIL, "H5Sget_simple_extent_npoints"); VERIFY(n, SPACE1_DIM1 * SPACE1_DIM2 * SPACE1_DIM3, - "H5Sget_simple_extent_npoints"); + "H5Sget_simple_extent_npoints"); rank = H5Sget_simple_extent_ndims(decoded_sid1); CHECK(rank, FAIL, "H5Sget_simple_extent_ndims"); @@ -1221,7 +1240,7 @@ test_h5s_encode(void) rank = H5Sget_simple_extent_dims(decoded_sid1, tdims, NULL); CHECK(rank, FAIL, "H5Sget_simple_extent_dims"); VERIFY(HDmemcmp(tdims, dims1, SPACE1_RANK * sizeof(hsize_t)), 0, - "H5Sget_simple_extent_dims"); + "H5Sget_simple_extent_dims"); /* Verify hyperslabe selection */ sel_type = H5Sget_select_type(decoded_sid1); @@ -1311,7 +1330,7 @@ test_h5s_encode(void) HDfree(sbuf); HDfree(null_sbuf); HDfree(scalar_buf); -} /* test_h5s_encode() */ +} /* test_h5s_encode() */ /**************************************************************** ** @@ -1321,14 +1340,14 @@ test_h5s_encode(void) static void test_h5s_scalar_write(void) { - hid_t fid1; /* HDF5 File IDs */ - hid_t dataset; /* Dataset ID */ - hid_t sid1; /* Dataspace ID */ - int rank; /* Logical rank of dataspace */ - hsize_t tdims[4]; /* Dimension array to test with */ - hssize_t n; /* Number of dataspace elements */ + hid_t fid1; /* HDF5 File IDs */ + hid_t dataset; /* Dataset ID */ + hid_t sid1; /* Dataspace ID */ + int rank; /* Logical rank of dataspace */ + hsize_t tdims[4]; /* Dimension array to test with */ + hssize_t n; /* Number of dataspace elements */ H5S_class_t ext_type; /* Extent type */ - herr_t ret; /* Generic return value */ + herr_t ret; /* Generic return value */ /* Output message about test being performed */ MESSAGE(5, ("Testing Scalar Dataspace Manipulation during Writing\n")); @@ -1380,7 +1399,7 @@ test_h5s_scalar_write(void) /* Close file */ ret = H5Fclose(fid1); CHECK(ret, FAIL, "H5Fclose"); -} /* test_h5s_scalar_write() */ +} /* test_h5s_scalar_write() */ /**************************************************************** ** @@ -1390,14 +1409,14 @@ test_h5s_scalar_write(void) static void test_h5s_scalar_read(void) { - hid_t fid1; /* HDF5 File IDs */ - hid_t dataset; /* Dataset ID */ - hid_t sid1; /* Dataspace ID */ - int rank; /* Logical rank of dataspace */ - hsize_t tdims[4]; /* Dimension array to test with */ - hssize_t n; /* Number of dataspace elements */ - unsigned rdata; /* Scalar data read in */ - herr_t ret; /* Generic return value */ + hid_t fid1; /* HDF5 File IDs */ + hid_t dataset; /* Dataset ID */ + hid_t sid1; /* Dataspace ID */ + int rank; /* Logical rank of dataspace */ + hsize_t tdims[4]; /* Dimension array to test with */ + hssize_t n; /* Number of dataspace elements */ + unsigned rdata; /* Scalar data read in */ + herr_t ret; /* Generic return value */ H5S_class_t ext_type; /* Extent type */ /* Output message about test being performed */ @@ -1444,7 +1463,7 @@ test_h5s_scalar_read(void) /* Close file */ ret = H5Fclose(fid1); CHECK(ret, FAIL, "H5Fclose"); -} /* test_h5s_scalar_read() */ +} /* test_h5s_scalar_read() */ /**************************************************************** ** @@ -1455,14 +1474,14 @@ test_h5s_scalar_read(void) static void test_h5s_compound_scalar_write(void) { - hid_t fid1; /* HDF5 File IDs */ - hid_t dataset; /* Dataset ID */ - hid_t tid1; /* Attribute datatype ID */ - hid_t sid1; /* Dataspace ID */ - int rank; /* Logical rank of dataspace */ - hsize_t tdims[4]; /* Dimension array to test with */ - hssize_t n; /* Number of dataspace elements */ - herr_t ret; /* Generic return value */ + hid_t fid1; /* HDF5 File IDs */ + hid_t dataset; /* Dataset ID */ + hid_t tid1; /* Attribute datatype ID */ + hid_t sid1; /* Dataspace ID */ + int rank; /* Logical rank of dataspace */ + hsize_t tdims[4]; /* Dimension array to test with */ + hssize_t n; /* Number of dataspace elements */ + herr_t ret; /* Generic return value */ /* Output message about test being performed */ MESSAGE(5, ("Testing Scalar Dataspace Manipulation for Writing Compound Datatypes\n")); @@ -1476,19 +1495,19 @@ test_h5s_compound_scalar_write(void) CHECK(tid1, FAIL, "H5Tcreate"); space4_field1_off=HOFFSET(struct space4_struct, c1); ret = H5Tinsert(tid1, SPACE4_FIELDNAME1, space4_field1_off, - H5T_NATIVE_SCHAR); + H5T_NATIVE_SCHAR); CHECK(ret, FAIL, "H5Tinsert"); space4_field2_off=HOFFSET(struct space4_struct, u); ret = H5Tinsert(tid1, SPACE4_FIELDNAME2, space4_field2_off, - H5T_NATIVE_UINT); + H5T_NATIVE_UINT); CHECK(ret, FAIL, "H5Tinsert"); space4_field3_off=HOFFSET(struct space4_struct, f); ret = H5Tinsert(tid1, SPACE4_FIELDNAME3, space4_field3_off, - H5T_NATIVE_FLOAT); + H5T_NATIVE_FLOAT); CHECK(ret, FAIL, "H5Tinsert"); space4_field4_off=HOFFSET(struct space4_struct, c2); ret = H5Tinsert(tid1, SPACE4_FIELDNAME4, space4_field4_off, - H5T_NATIVE_SCHAR); + H5T_NATIVE_SCHAR); CHECK(ret, FAIL, "H5Tinsert"); /* Create scalar dataspace */ @@ -1528,7 +1547,7 @@ test_h5s_compound_scalar_write(void) /* Close file */ ret = H5Fclose(fid1); CHECK(ret, FAIL, "H5Fclose"); -} /* test_h5s_compound_scalar_write() */ +} /* test_h5s_compound_scalar_write() */ /**************************************************************** ** @@ -1539,15 +1558,15 @@ test_h5s_compound_scalar_write(void) static void test_h5s_compound_scalar_read(void) { - hid_t fid1; /* HDF5 File IDs */ - hid_t dataset; /* Dataset ID */ - hid_t sid1; /* Dataspace ID */ - hid_t type; /* Datatype */ - int rank; /* Logical rank of dataspace */ - hsize_t tdims[4]; /* Dimension array to test with */ - hssize_t n; /* Number of dataspace elements */ - struct space4_struct rdata; /* Scalar data read in */ - herr_t ret; /* Generic return value */ + hid_t fid1; /* HDF5 File IDs */ + hid_t dataset; /* Dataset ID */ + hid_t sid1; /* Dataspace ID */ + hid_t type; /* Datatype */ + int rank; /* Logical rank of dataspace */ + hsize_t tdims[4]; /* Dimension array to test with */ + hssize_t n; /* Number of dataspace elements */ + struct space4_struct rdata; /* Scalar data read in */ + herr_t ret; /* Generic return value */ /* Output message about test being performed */ MESSAGE(5, ("Testing Scalar Dataspace Manipulation for Reading Compound Datatypes\n")); @@ -1601,7 +1620,7 @@ test_h5s_compound_scalar_read(void) /* Close file */ ret = H5Fclose(fid1); CHECK(ret, FAIL, "H5Fclose"); -} /* test_h5s_compound_scalar_read() */ +} /* test_h5s_compound_scalar_read() */ /* Data arrays for chunk test */ double chunk_data_dbl[50000][3]; @@ -2367,6 +2386,130 @@ test_h5s_bug1(void) CHECK(ret, FAIL, "H5Sclose"); } /* test_h5s_bug1() */ + +/*------------------------------------------------------------------------- + * Function: test_versionbounds + * + * Purpose: Tests version bounds with dataspace. + * + * Description: + * This function creates a file with lower bounds then later + * reopens it with higher bounds to show that the dataspace + * version is upgraded appropriately. + * + * Return: Success: 0 + * Failure: number of errors + * + *------------------------------------------------------------------------- + */ +#define VERBFNAME "tverbounds_dspace.h5" +#define BASIC_DSET "Basic Dataset" +#define LATEST_DSET "Latest Dataset" +static void +test_versionbounds(void) +{ + hid_t file = -1; /* File ID */ + hid_t space = -1; /* Dataspace ID */ + hid_t dset = -1; /* Dataset ID */ + hid_t fapl = -1; /* File access property list ID */ + hid_t dset_space = -1; /* Retrieved dataset's dataspace ID */ + hsize_t dim[1]; /* Dataset dimensions */ + H5F_libver_t low, high; /* File format bounds */ + H5S_t *spacep = NULL; /* Pointer to internal dataspace */ + herr_t ret = 0; /* Generic return value */ + + /* Output message about test being performed */ + MESSAGE(5, ("Testing Version Bounds\n")); + + /* Create a file access property list */ + fapl = H5Pcreate(H5P_FILE_ACCESS); + CHECK(fapl, FAIL, "H5Pcreate"); + + /* Create dataspace */ + dim[0] = 10; + space = H5Screate_simple(1, dim, NULL); + CHECK(space, FAIL, "H5Screate"); + + /* Its version should be H5O_SDSPACE_VERSION_1 */ + spacep = (H5S_t *)H5I_object(space); + CHECK(spacep, NULL, "H5I_object"); + VERIFY(spacep->extent.version, H5O_SDSPACE_VERSION_1, "basic dataspace version bound"); + + /* Set high bound to V18 */ + low = H5F_LIBVER_EARLIEST; + high = H5F_LIBVER_V18; + ret = H5Pset_libver_bounds(fapl, low, high); + CHECK(ret, FAIL, "H5Pset_libver_bounds"); + + /* Create the file */ + file = H5Fcreate(VERBFNAME, H5F_ACC_TRUNC, H5P_DEFAULT, fapl); + CHECK(file, FAIL, "H5Fcreate"); + + /* Create a basic dataset */ + dset = H5Dcreate2(file, BASIC_DSET, H5T_NATIVE_INT, space, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); + if (dset > 0) /* dataset created successfully */ + { + /* Get the internal dataspace pointer */ + dset_space = H5Dget_space(dset); + CHECK(dset_space, FAIL, "H5Dget_space"); + spacep = (H5S_t *)H5I_object(dset_space); + CHECK(spacep, NULL, "H5I_object"); + + /* Dataspace version should remain as H5O_SDSPACE_VERSION_1 */ + VERIFY(spacep->extent.version, H5O_SDSPACE_VERSION_1, "basic dataspace version bound"); + + /* Close dataspace */ + ret = H5Sclose(dset_space); + CHECK(ret, FAIL, "H5Sclose"); + } + + /* Close basic dataset and the file */ + ret = H5Dclose(dset); + CHECK(ret, FAIL, "H5Dclose"); + ret = H5Fclose(file); + CHECK(ret, FAIL, "H5Fclose"); + + /* Set low and high bounds to latest to trigger the increment of the + dataspace version */ + low = H5F_LIBVER_LATEST; + high = H5F_LIBVER_LATEST; + ret = H5Pset_libver_bounds(fapl, low, high); + CHECK(ret, FAIL, "H5Pset_libver_bounds"); + + /* Reopen the file with new version bounds, LATEST/LATEST */ + file = H5Fopen(VERBFNAME, H5F_ACC_RDWR, fapl); + + /* Create another dataset using the same dspace as the previous dataset */ + dset = H5Dcreate2(file, LATEST_DSET, H5T_NATIVE_INT, space, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); + CHECK(dset, FAIL, "H5Dcreate2"); + + /* Dataset created successfully. Verify that dataspace version has been + upgraded per the low bound */ + + /* Get the internal dataspace pointer */ + dset_space = H5Dget_space(dset); + CHECK(dset_space, FAIL, "H5Dget_space"); + spacep = (H5S_t *)H5I_object(dset_space); + CHECK(spacep, NULL, "H5I_object"); + + /* Verify the dataspace version */ + VERIFY(spacep->extent.version, H5O_sdspace_ver_bounds[low], "upgraded dataspace version"); + + /* Close everything */ + ret = H5Sclose(dset_space); + CHECK(ret, FAIL, "H5Sclose"); + ret = H5Dclose(dset); + CHECK(ret, FAIL, "H5Dclose"); + + ret = H5Sclose(space); + CHECK(ret, FAIL, "H5Sclose"); + ret = H5Pclose(fapl); + CHECK(ret, FAIL, "H5Pclose"); + ret = H5Fclose(file); + CHECK(ret, FAIL, "H5Fclose"); +} /* end test_versionbounds() */ + + /**************************************************************** ** ** test_h5s_encode_regular_exceed32(): @@ -2560,11 +2703,10 @@ test_h5s(void) /* Output message about test being performed */ MESSAGE(5, ("Testing Dataspaces\n")); - test_h5s_basic(); /* Test basic H5S code */ - test_h5s_null(); /* Test Null dataspace H5S code */ + test_h5s_basic(); /* Test basic H5S code */ + test_h5s_null(); /* Test Null dataspace H5S code */ test_h5s_zero_dim(); /* Test dataspace with zero dimension size */ test_h5s_encode(); /* Test encoding and decoding */ - test_h5s_encode_regular_exceed32(); /* Test encoding regular hyperslab selection that exceeds 32 bits */ test_h5s_encode_irregular_exceed32(); /* Testing encoding irregular hyperslab selection that exceeds 32 bits */ test_h5s_encode_points_exceed32(); /* Testing encoding point selection that exceeds 32 bits */ @@ -2572,26 +2714,27 @@ test_h5s(void) test_h5s_scalar_write(); /* Test scalar H5S writing code */ test_h5s_scalar_read(); /* Test scalar H5S reading code */ - test_h5s_compound_scalar_write(); /* Test compound datatype scalar H5S writing code */ - test_h5s_compound_scalar_read(); /* Test compound datatype scalar H5S reading code */ + test_h5s_compound_scalar_write(); /* Test compound datatype scalar H5S writing code */ + test_h5s_compound_scalar_read(); /* Test compound datatype scalar H5S reading code */ /* This test was added later to exercise a bug in chunked I/O */ - test_h5s_chunk(); /* Exercise bug fix for chunked I/O */ + test_h5s_chunk(); /* Exercise bug fix for chunked I/O */ - test_h5s_extent_equal(); /* Test extent comparison code */ + test_h5s_extent_equal(); /* Test extent comparison code */ test_h5s_extent_copy(); /* Test extent copy code */ test_h5s_bug1(); /* Test bug in offset initialization */ + test_versionbounds(); /* Test version bounds with dataspace */ } /* test_h5s() */ - + /*------------------------------------------------------------------------- - * Function: cleanup_h5s + * Function: cleanup_h5s * - * Purpose: Cleanup temporary test files + * Purpose: Cleanup temporary test files * - * Return: none + * Return: none * - * Programmer: Albert Cheng + * Programmer: Albert Cheng * July 2, 1998 * * Modifications: @@ -2605,4 +2748,5 @@ cleanup_h5s(void) remove(NULLFILE); remove(BASICFILE); remove(ZEROFILE); + remove(VERBFNAME); } diff --git a/test/tid.c b/test/tid.c index 7545e16..ba8af03 100644 --- a/test/tid.c +++ b/test/tid.c @@ -16,7 +16,7 @@ #include "testhdf5.h" /* Include H5Ipkg.h to calculate max number of groups */ -#define H5I_FRIEND /*suppress error about including H5Ipkg */ +#define H5I_FRIEND /*suppress error about including H5Ipkg */ #include "H5Ipkg.h" /* Test basic functionality of registering and deleting types and IDs */ @@ -237,97 +237,97 @@ out: } - /* A dummy search function for the next test */ + /* A dummy search function for the next test */ static int test_search_func(void H5_ATTR_UNUSED * ptr1, void H5_ATTR_UNUSED * ptr2) { return 0; } - /* Ensure that public functions cannot access "predefined" ID types */ + /* Ensure that public functions cannot access "predefined" ID types */ static int id_predefined_test(void ) { - void * testObj; - hid_t testID; - hid_t typeID = H5I_INVALID_HID; - void * testPtr; - herr_t testErr; + void * testObj; + hid_t testID; + hid_t typeID = H5I_INVALID_HID; + void * testPtr; + herr_t testErr; - testObj = HDmalloc(sizeof(int)); + testObj = HDmalloc(sizeof(int)); - /* Try to perform illegal functions on various predefined types */ - H5E_BEGIN_TRY - testID = H5Iregister(H5I_FILE, testObj); - H5E_END_TRY + /* Try to perform illegal functions on various predefined types */ + H5E_BEGIN_TRY + testID = H5Iregister(H5I_FILE, testObj); + H5E_END_TRY - VERIFY(testID, H5I_INVALID_HID, "H5Iregister"); - if(testID != H5I_INVALID_HID) - goto out; + VERIFY(testID, H5I_INVALID_HID, "H5Iregister"); + if(testID != H5I_INVALID_HID) + goto out; - H5E_BEGIN_TRY - testPtr = H5Isearch(H5I_GENPROP_LST, (H5I_search_func_t) test_search_func, testObj); - H5E_END_TRY + H5E_BEGIN_TRY + testPtr = H5Isearch(H5I_GENPROP_LST, (H5I_search_func_t) test_search_func, testObj); + H5E_END_TRY - CHECK_PTR_NULL(testPtr, "H5Isearch"); - if(testPtr != NULL) - goto out; + CHECK_PTR_NULL(testPtr, "H5Isearch"); + if(testPtr != NULL) + goto out; - H5E_BEGIN_TRY - testErr = H5Inmembers(H5I_ERROR_STACK, NULL); - H5E_END_TRY + H5E_BEGIN_TRY + testErr = H5Inmembers(H5I_ERROR_STACK, NULL); + H5E_END_TRY - VERIFY(testErr, -1, "H5Inmembers"); - if(testErr != -1) - goto out; + VERIFY(testErr, -1, "H5Inmembers"); + if(testErr != -1) + goto out; - H5E_BEGIN_TRY - testErr = H5Iclear_type(H5I_FILE, 0); - H5E_END_TRY + H5E_BEGIN_TRY + testErr = H5Iclear_type(H5I_FILE, 0); + H5E_END_TRY - VERIFY((testErr >= 0), 0, "H5Iclear_type"); - if(testErr >= 0) - goto out; + VERIFY((testErr >= 0), 0, "H5Iclear_type"); + if(testErr >= 0) + goto out; - H5E_BEGIN_TRY - testErr = H5Idestroy_type(H5I_DATASET); - H5E_END_TRY + H5E_BEGIN_TRY + testErr = H5Idestroy_type(H5I_DATASET); + H5E_END_TRY - VERIFY((testErr >= 0), 0, "H5Idestroy_type"); - if(testErr >= 0) - goto out; + VERIFY((testErr >= 0), 0, "H5Idestroy_type"); + if(testErr >= 0) + goto out; - /* Create a datatype ID and try to perform illegal functions on it */ - typeID = H5Tcreate(H5T_OPAQUE, (size_t)42); - CHECK(typeID, H5I_INVALID_HID, "H5Tcreate"); - if(typeID == H5I_INVALID_HID) - goto out; + /* Create a datatype ID and try to perform illegal functions on it */ + typeID = H5Tcreate(H5T_OPAQUE, (size_t)42); + CHECK(typeID, H5I_INVALID_HID, "H5Tcreate"); + if(typeID == H5I_INVALID_HID) + goto out; - H5E_BEGIN_TRY - testPtr = H5Iremove_verify(typeID, H5I_DATATYPE); - H5E_END_TRY + H5E_BEGIN_TRY + testPtr = H5Iremove_verify(typeID, H5I_DATATYPE); + H5E_END_TRY - CHECK_PTR_NULL(testPtr, "H5Iremove_verify"); - if(testPtr != NULL) - goto out; + CHECK_PTR_NULL(testPtr, "H5Iremove_verify"); + if(testPtr != NULL) + goto out; - H5E_BEGIN_TRY - testPtr = H5Iobject_verify(typeID, H5I_DATATYPE); - H5E_END_TRY + H5E_BEGIN_TRY + testPtr = H5Iobject_verify(typeID, H5I_DATATYPE); + H5E_END_TRY - CHECK_PTR_NULL(testPtr, "H5Iobject_verify"); - if(testPtr != NULL) - goto out; + CHECK_PTR_NULL(testPtr, "H5Iobject_verify"); + if(testPtr != NULL) + goto out; - H5Tclose(typeID); + H5Tclose(typeID); - /* testObj was never registered as an atom, so it will not be + /* testObj was never registered as an atom, so it will not be * automatically freed. */ - HDfree(testObj); - return 0; + HDfree(testObj); + return 0; out: - if(typeID != H5I_INVALID_HID) - H5Tclose(typeID); + if(typeID != H5I_INVALID_HID) + H5Tclose(typeID); if(testObj != NULL) - HDfree(testObj); + HDfree(testObj); - return -1; + return -1; } @@ -443,12 +443,12 @@ static int test_get_type(void) out: if(dtype != H5I_INVALID_HID) - H5Tclose(dtype); + H5Tclose(dtype); return -1; } - /* Test boundary cases with lots of types */ + /* Test boundary cases with lots of types */ /* Type IDs range from H5I_NTYPES to H5I_MAX_NUM_TYPES. The system will assign */ /* IDs in sequential order until H5I_MAX_NUM_TYPES IDs have been given out, at which */ @@ -458,78 +458,78 @@ out: /* to low values successfully, ensure that an error is thrown when all possible */ /* type IDs are taken, then ensure that deleting types frees up their IDs. */ /* Note that this test depends on the implementation of IDs, so may break */ -/* if the implementation changes. */ +/* if the implementation changes. */ /* Also note that if someone else registered a user-defined type and forgot to */ /* destroy it, this test will mysteriously fail (because it will expect there to */ /* be one more "free" type ID than there is). */ /* H5I_NTYPES is defined in h5public.h, H5I_MAX_NUM_TYPES is defined in h5pkg.h */ static int test_id_type_list(void) { - H5I_type_t startType; /* The first type ID we were assigned in this test */ - H5I_type_t currentType; - H5I_type_t testType; - int i; /* Just a counter variable */ - - startType = H5Iregister_type((size_t)8, 0, (H5I_free_t) free ); - CHECK(startType, H5I_BADID, "H5Iregister_type"); - if(startType == H5I_BADID) - goto out; - - /* Sanity check */ - if(startType >= H5I_MAX_NUM_TYPES || startType < H5I_NTYPES) - { - /* Error condition, throw an error */ - CHECK(1, 1, "H5Iregister_type"); - goto out; - } - /* Create types up to H5I_MAX_NUM_TYPES */ - for(i = startType + 1; i < H5I_MAX_NUM_TYPES; i++) - { - currentType = H5Iregister_type((size_t)8, 0, (H5I_free_t) free ); - CHECK(currentType, H5I_BADID, "H5Iregister_type"); - if(currentType == H5I_BADID) - goto out; - } - - /* Wrap around to low type ID numbers */ - for(i = H5I_NTYPES; i < startType; i++) - { - currentType = H5Iregister_type((size_t)8, 0, (H5I_free_t) free ); - CHECK(currentType, H5I_BADID, "H5Iregister_type"); - if(currentType == H5I_BADID) - goto out; - } - - /* There should be no room at the inn for a new ID type*/ - H5E_BEGIN_TRY - testType = H5Iregister_type((size_t)8, 0, (H5I_free_t) free ); - H5E_END_TRY - - VERIFY(testType, H5I_BADID, "H5Iregister_type"); - if(testType != H5I_BADID) - goto out; - - /* Now delete a type and try to insert again */ - H5Idestroy_type(H5I_NTYPES); - testType = H5Iregister_type((size_t)8, 0, (H5I_free_t) free ); - - VERIFY(testType, H5I_NTYPES, "H5Iregister_type"); - if(testType != H5I_NTYPES) - goto out; - - /* Cleanup. Destroy all types. */ - for(i = H5I_NTYPES; i < H5I_MAX_NUM_TYPES; i++) - H5Idestroy_type((H5I_type_t) i); - - return 0; + H5I_type_t startType; /* The first type ID we were assigned in this test */ + H5I_type_t currentType; + H5I_type_t testType; + int i; /* Just a counter variable */ + + startType = H5Iregister_type((size_t)8, 0, (H5I_free_t) free ); + CHECK(startType, H5I_BADID, "H5Iregister_type"); + if(startType == H5I_BADID) + goto out; + + /* Sanity check */ + if(startType >= H5I_MAX_NUM_TYPES || startType < H5I_NTYPES) + { + /* Error condition, throw an error */ + CHECK(1, 1, "H5Iregister_type"); + goto out; + } + /* Create types up to H5I_MAX_NUM_TYPES */ + for(i = startType + 1; i < H5I_MAX_NUM_TYPES; i++) + { + currentType = H5Iregister_type((size_t)8, 0, (H5I_free_t) free ); + CHECK(currentType, H5I_BADID, "H5Iregister_type"); + if(currentType == H5I_BADID) + goto out; + } + + /* Wrap around to low type ID numbers */ + for(i = H5I_NTYPES; i < startType; i++) + { + currentType = H5Iregister_type((size_t)8, 0, (H5I_free_t) free ); + CHECK(currentType, H5I_BADID, "H5Iregister_type"); + if(currentType == H5I_BADID) + goto out; + } + + /* There should be no room at the inn for a new ID type*/ + H5E_BEGIN_TRY + testType = H5Iregister_type((size_t)8, 0, (H5I_free_t) free ); + H5E_END_TRY + + VERIFY(testType, H5I_BADID, "H5Iregister_type"); + if(testType != H5I_BADID) + goto out; + + /* Now delete a type and try to insert again */ + H5Idestroy_type(H5I_NTYPES); + testType = H5Iregister_type((size_t)8, 0, (H5I_free_t) free ); + + VERIFY(testType, H5I_NTYPES, "H5Iregister_type"); + if(testType != H5I_NTYPES) + goto out; + + /* Cleanup. Destroy all types. */ + for(i = H5I_NTYPES; i < H5I_MAX_NUM_TYPES; i++) + H5Idestroy_type((H5I_type_t) i); + + return 0; out: /* Cleanup. For simplicity, just destroy all types and ignore errors. */ - H5E_BEGIN_TRY - for(i = H5I_NTYPES; i < H5I_MAX_NUM_TYPES; i++) - H5Idestroy_type((H5I_type_t) i); - H5E_END_TRY - return -1; + H5E_BEGIN_TRY + for(i = H5I_NTYPES; i < H5I_MAX_NUM_TYPES; i++) + H5Idestroy_type((H5I_type_t) i); + H5E_END_TRY + return -1; } /* Test removing ids in callback for H5Iclear_type */ @@ -732,11 +732,11 @@ void test_ids(void) /* Set the random # seed */ HDsrandom((unsigned)HDtime(NULL)); - if (basic_id_test() < 0) TestErrPrintf("Basic ID test failed\n"); - if (id_predefined_test() < 0) TestErrPrintf("Predefined ID type test failed\n"); - if (test_is_valid() < 0) TestErrPrintf("H5Iis_valid test failed\n"); - if (test_get_type() < 0) TestErrPrintf("H5Iget_type test failed\n"); - if (test_id_type_list() < 0) TestErrPrintf("ID type list test failed\n"); - if (test_remove_clear_type() < 0) TestErrPrintf("ID remove during H5Iclear_type test failed\n"); + if (basic_id_test() < 0) TestErrPrintf("Basic ID test failed\n"); + if (id_predefined_test() < 0) TestErrPrintf("Predefined ID type test failed\n"); + if (test_is_valid() < 0) TestErrPrintf("H5Iis_valid test failed\n"); + if (test_get_type() < 0) TestErrPrintf("H5Iget_type test failed\n"); + if (test_id_type_list() < 0) TestErrPrintf("ID type list test failed\n"); + if (test_remove_clear_type() < 0) TestErrPrintf("ID remove during H5Iclear_type test failed\n"); } diff --git a/test/titerate.c b/test/titerate.c index 98588f9..82c26eb 100644 --- a/test/titerate.c +++ b/test/titerate.c @@ -13,7 +13,7 @@ /*********************************************************** * -* Test program: titerate +* Test program: titerate * * Test the Group & Attribute functionality * @@ -36,8 +36,8 @@ #define NAMELEN 80 /* 1-D dataset with fixed dimensions */ -#define SPACE1_RANK 1 -#define SPACE1_DIM1 4 +#define SPACE1_RANK 1 +#define SPACE1_DIM1 4 typedef enum { RET_ZERO, @@ -129,7 +129,7 @@ test_iter_group(hid_t fapl, hbool_t new_format) char dataset_name[NAMELEN]; /* dataset name */ iter_info info; /* Custom iteration information */ H5G_info_t ginfo; /* Buffer for querying object's info */ - herr_t ret; /* Generic return value */ + herr_t ret; /* Generic return value */ /* Output message about test being performed */ MESSAGE(5, ("Testing Group Iteration Functionality\n")); @@ -388,7 +388,7 @@ static void test_iter_attr(hid_t fapl, hbool_t new_format) char name[NAMELEN]; /* temporary name buffer */ char *anames[NATTR]; /* Names of the attributes created */ iter_info info; /* Custom iteration information */ - herr_t ret; /* Generic return value */ + herr_t ret; /* Generic return value */ /* Output message about test being performed */ MESSAGE(5, ("Testing Attribute Iteration Functionality\n")); @@ -543,7 +543,7 @@ liter_cb2(hid_t loc_id, const char *name, const H5L_info_t H5_ATTR_UNUSED *link_ { const iter_info *test_info = (const iter_info *)opdata; H5O_info_t oinfo; - herr_t ret; /* Generic return value */ + herr_t ret; /* Generic return value */ if(HDstrcmp(name, test_info->name)) { TestErrPrintf("name = '%s', test_info = '%s'\n", name, test_info->name); @@ -573,13 +573,13 @@ liter_cb2(hid_t loc_id, const char *name, const H5L_info_t H5_ATTR_UNUSED *link_ static void test_iter_group_large(hid_t fapl) { - hid_t file; /* HDF5 File IDs */ - hid_t dataset; /* Dataset ID */ - hid_t group; /* Group ID */ - hid_t sid; /* Dataspace ID */ - hid_t tid; /* Datatype ID */ - hsize_t dims[] = {SPACE1_DIM1}; - herr_t ret; /* Generic return value */ + hid_t file; /* HDF5 File IDs */ + hid_t dataset; /* Dataset ID */ + hid_t group; /* Group ID */ + hid_t sid; /* Dataspace ID */ + hid_t tid; /* Datatype ID */ + hsize_t dims[] = {SPACE1_DIM1}; + herr_t ret; /* Generic return value */ char gname[20]; /* Temporary group name */ iter_info *names; /* Names of objects in the root group */ iter_info *curr_name; /* Pointer to the current name in the root group */ @@ -709,7 +709,7 @@ static void test_grp_memb_funcs(hid_t fapl) char dataset_name[NAMELEN]; /* dataset name */ ssize_t name_len; /* Length of object's name */ H5G_info_t ginfo; /* Buffer for querying object's info */ - herr_t ret = SUCCEED; /* Generic return value */ + herr_t ret = SUCCEED; /* Generic return value */ /* Output message about test being performed */ MESSAGE(5, ("Testing Group Member Information Functionality\n")); @@ -849,7 +849,7 @@ static void test_links(hid_t fapl) hid_t gid, gid1; H5G_info_t ginfo; /* Buffer for querying object's info */ hsize_t i; - herr_t ret; /* Generic return value */ + herr_t ret; /* Generic return value */ /* Output message about test being performed */ MESSAGE(5, ("Testing Soft and Hard Link Iteration Functionality\n")); @@ -925,7 +925,7 @@ test_iterate(void) { hid_t fapl, fapl2; /* File access property lists */ unsigned new_format; /* Whether to use the new format or not */ - herr_t ret; /* Generic return value */ + herr_t ret; /* Generic return value */ /* Output message about test being performed */ MESSAGE(5, ("Testing Iteration Operations\n")); @@ -958,15 +958,15 @@ test_iterate(void) CHECK(ret, FAIL, "H5Pclose"); } /* test_iterate() */ - + /*------------------------------------------------------------------------- - * Function: cleanup_iterate + * Function: cleanup_iterate * - * Purpose: Cleanup temporary test files + * Purpose: Cleanup temporary test files * - * Return: none + * Return: none * - * Programmer: Quincey Koziol + * Programmer: Quincey Koziol * April 5, 2000 * * Modifications: diff --git a/test/tmisc.c b/test/tmisc.c index 5825656..4a77b51 100644 --- a/test/tmisc.c +++ b/test/tmisc.c @@ -21,7 +21,7 @@ * *************************************************************/ -#define H5D_FRIEND /*suppress error about including H5Dpkg */ +#define H5D_FRIEND /*suppress error about including H5Dpkg */ /* Define this macro to indicate that the testing APIs should be available */ #define H5D_TESTING @@ -1815,11 +1815,11 @@ test_misc11(void) unsigned sym_ik; /* Symbol table B-tree initial 'K' value */ unsigned istore_ik; /* Indexed storage B-tree initial 'K' value */ unsigned sym_lk; /* Symbol table B-tree leaf 'K' value */ - unsigned nindexes; /* Shared message number of indexes */ + unsigned nindexes; /* Shared message number of indexes */ H5F_info2_t finfo; /* global information about file */ H5F_fspace_strategy_t strategy; /* File space strategy */ - hsize_t threshold; /* Free-space section threshold */ - hbool_t persist; /* To persist free-space or not */ + hsize_t threshold; /* Free-space section threshold */ + hbool_t persist; /* To persist free-space or not */ herr_t ret; /* Generic return value */ /* Output message about test being performed */ @@ -1858,7 +1858,7 @@ test_misc11(void) /* This should fail as (32770*2) will exceed ^16 - 2 bytes for storing btree entries */ H5E_BEGIN_TRY { - ret=H5Pset_sym_k(fcpl, 32770, 0); + ret=H5Pset_sym_k(fcpl, 32770, 0); } H5E_END_TRY; VERIFY(ret, FAIL, "H5Pset_sym_k"); @@ -1867,7 +1867,7 @@ test_misc11(void) /* This should fail as (32770*2) will exceed ^16 - 2 bytes for storing btree entries */ H5E_BEGIN_TRY { - ret=H5Pset_istore_k(fcpl, 32770); + ret=H5Pset_istore_k(fcpl, 32770); } H5E_END_TRY; VERIFY(ret, FAIL, "H5Pset_istore_k"); @@ -1979,19 +1979,19 @@ test_misc12(void) "las palabras del que murio en la cruz." }; char *rdata [MISC12_SPACE1_DIM1+MISC12_APPEND_SIZE]; /* Information read in */ - hid_t fid1; - hid_t dataset; - hid_t sid1, space, memspace; - hid_t tid1, cparms; - hsize_t dims1[] = {MISC12_SPACE1_DIM1}; - hsize_t dimsn[] = {MISC12_APPEND_SIZE}; - hsize_t maxdims1[1] = {H5S_UNLIMITED}; - hsize_t chkdims1[1] = {MISC12_CHUNK_SIZE}; + hid_t fid1; + hid_t dataset; + hid_t sid1, space, memspace; + hid_t tid1, cparms; + hsize_t dims1[] = {MISC12_SPACE1_DIM1}; + hsize_t dimsn[] = {MISC12_APPEND_SIZE}; + hsize_t maxdims1[1] = {H5S_UNLIMITED}; + hsize_t chkdims1[1] = {MISC12_CHUNK_SIZE}; hsize_t newsize[1] = {MISC12_SPACE1_DIM1+MISC12_APPEND_SIZE}; - hsize_t offset[1] = {MISC12_SPACE1_DIM1}; + hsize_t offset[1] = {MISC12_SPACE1_DIM1}; hsize_t count[1] = {MISC12_APPEND_SIZE}; int i; /* counting variable */ - herr_t ret; /* Generic return value */ + herr_t ret; /* Generic return value */ /* Output message about test being performed */ MESSAGE(5, ("Testing VL-type in chunked dataset\n")); @@ -2745,10 +2745,10 @@ test_misc16(void) herr_t ret; /* Generic return value */ char wdata[MISC16_SPACE_DIM][MISC16_STR_SIZE]; char rdata[MISC16_SPACE_DIM][MISC16_STR_SIZE]; /* Information read in */ - hid_t dataset; /* Dataset ID */ - hid_t sid; /* Dataspace ID */ - hid_t tid; /* Datatype ID */ - hsize_t dims[] = {MISC16_SPACE_DIM}; + hid_t dataset; /* Dataset ID */ + hid_t sid; /* Dataspace ID */ + hid_t tid; /* Datatype ID */ + hsize_t dims[] = {MISC16_SPACE_DIM}; int i; /* Initialize the data */ @@ -2830,10 +2830,10 @@ test_misc17(void) herr_t ret; /* Generic return value */ char wdata[MISC17_SPACE_DIM1][MISC17_SPACE_DIM2]; char rdata[MISC17_SPACE_DIM1][MISC17_SPACE_DIM2]; /* Information read in */ - hid_t dataset; /* Dataset ID */ - hid_t sid; /* Dataspace ID */ - hid_t tid; /* Datatype ID */ - hsize_t dims[] = {MISC17_SPACE_DIM1, MISC17_SPACE_DIM2}; + hid_t dataset; /* Dataset ID */ + hid_t sid; /* Dataspace ID */ + hid_t tid; /* Datatype ID */ + hsize_t dims[] = {MISC17_SPACE_DIM1, MISC17_SPACE_DIM2}; int i; /* Initialize the data */ @@ -3797,13 +3797,13 @@ test_misc22(void) /* compute the correct PPB that should be set by SZIP */ if(offsets[k] == 0) - correct = prec[j]; + correct = prec[j]; else correct = H5Tget_size(idts[i]) * 8; if(correct > 24) { - if(correct <= 32) + if(correct <= 32) correct = 32; - else if(correct <= 64) + else if(correct <= 64) correct = 64; } /* end if */ @@ -4756,7 +4756,7 @@ test_misc25b(void) CHECK(ret, FAIL, "H5Fclose"); } /* end test_misc25b() */ - + /**************************************************************** ** ** test_misc25c(): Exercise another null object header message merge bug. @@ -4890,7 +4890,7 @@ test_misc25c(void) CHECK(ret, FAIL, "H5Fclose"); } /* end test_misc25c() */ - + /**************************************************************** ** ** test_misc26(): Regression test: ensure that copying filter @@ -4976,7 +4976,7 @@ test_misc26(void) CHECK_I(ret, "H5Pclose"); } - + /**************************************************************** ** ** test_misc27(): Ensure that objects with incorrect # of object @@ -5021,7 +5021,7 @@ test_misc27(void) CHECK(ret, FAIL, "H5Fclose"); } /* end test_misc27() */ - + /**************************************************************** ** ** test_misc28(): Ensure that the dataset chunk cache will hold @@ -5198,7 +5198,7 @@ test_misc28(void) CHECK_I(ret, "H5Pclose"); } /* end test_misc28() */ - + /**************************************************************** ** ** test_misc29(): Ensure that speculative metadata reads don't @@ -5238,7 +5238,7 @@ test_misc30_get_info_cb(hid_t loc_id, const char *name, const H5L_info_t H5_ATTR { H5O_info_t object_info; - return H5Oget_info_by_name(loc_id, name, &object_info, H5P_DEFAULT); + return H5Oget_info_by_name(loc_id, name, &object_info, H5P_DEFAULT); } static int @@ -5247,7 +5247,7 @@ test_misc30_get_info(hid_t loc_id) return H5Literate(loc_id, H5_INDEX_NAME, H5_ITER_INC, NULL, test_misc30_get_info_cb, NULL); } - + /**************************************************************** ** ** test_misc30(): Exercise local heap code that loads prefix @@ -5279,15 +5279,15 @@ test_misc30(void) CHECK(ret, FAIL, "H5Gclose"); ret = H5Fclose(fid); CHECK(ret, FAIL, "H5Fclose"); - + for(i = 0; i < 20; i++) { char gname[32]; fid = H5Fopen(MISC30_FILE, H5F_ACC_RDWR, H5P_DEFAULT); CHECK(fid, FAIL, "H5Fopen"); - + if(get_info) { - ret = test_misc30_get_info(fid); + ret = test_misc30_get_info(fid); CHECK(ret, FAIL, "test_misc30_get_info"); } @@ -5299,20 +5299,20 @@ test_misc30(void) CHECK(ret, FAIL, "H5Gclose"); ret = H5Fclose(fid); CHECK(ret, FAIL, "H5Fclose"); - } - + } + fid = H5Fopen(MISC30_FILE, H5F_ACC_RDONLY, H5P_DEFAULT); CHECK(fid, FAIL, "H5Fopen"); ret = H5Fget_filesize(fid, &file_size[get_info]); CHECK(fid, FAIL, "H5Fget_filesize"); ret = H5Fclose(fid); CHECK(ret, FAIL, "H5Fclose"); - } - + } + VERIFY(file_size[0], file_size[1], "test_misc30"); } /* end test_misc30() */ - + /**************************************************************** ** ** test_misc31(): Test reentering library through deprecated @@ -5403,14 +5403,14 @@ test_misc31(void) CHECK(ret, FAIL, "H5Fclose"); ret = H5Tclose(dtype_id); CHECK(ret, FAIL, "H5Tclose"); - + #else /* H5_NO_DEPRECATED_SYMBOLS */ /* Output message about test being skipped */ MESSAGE(5, (" ...Skipped")); #endif /* H5_NO_DEPRECATED_SYMBOLS */ } /* end test_misc31() */ - + /**************************************************************** * * test_misc32(): Simple test of filter memory allocation @@ -5474,7 +5474,7 @@ test_misc32(void) resized = H5resize_memory(NULL, 0); CHECK_PTR_NULL(resized, "H5resize_memory"); /*BAD*/ #endif /* NDEBUG */ - + } /* end test_misc32() */ /**************************************************************** @@ -5584,7 +5584,7 @@ test_misc34(void) } /* end test_misc34() */ - + /**************************************************************** ** ** test_misc(): Main misc. test routine. @@ -5637,15 +5637,15 @@ test_misc(void) } /* test_misc() */ - + /*------------------------------------------------------------------------- - * Function: cleanup_misc + * Function: cleanup_misc * - * Purpose: Cleanup temporary test files + * Purpose: Cleanup temporary test files * - * Return: none + * Return: none * - * Programmer: Albert Cheng + * Programmer: Albert Cheng * July 2, 1998 * * Modifications: diff --git a/test/trefer.c b/test/trefer.c index ec9428f..55172c0 100644 --- a/test/trefer.c +++ b/test/trefer.c @@ -13,7 +13,7 @@ /*********************************************************** * -* Test program: trefer +* Test program: trefer * * Test the Reference functionality * @@ -22,21 +22,21 @@ #include "testhdf5.h" #define FILE1 "trefer1.h5" -#define FILE2 "trefer2.h5" -#define FILE3 "trefer3.h5" +#define FILE2 "trefer2.h5" +#define FILE3 "trefer3.h5" /* 1-D dataset with fixed dimensions */ -#define SPACE1_RANK 1 -#define SPACE1_DIM1 4 +#define SPACE1_RANK 1 +#define SPACE1_DIM1 4 /* 2-D dataset with fixed dimensions */ -#define SPACE2_RANK 2 -#define SPACE2_DIM1 10 -#define SPACE2_DIM2 10 +#define SPACE2_RANK 2 +#define SPACE2_DIM1 10 +#define SPACE2_DIM2 10 /* Larger 1-D dataset with fixed dimensions */ -#define SPACE3_RANK 1 -#define SPACE3_DIM1 100 +#define SPACE3_RANK 1 +#define SPACE3_DIM1 100 /* Element selection information */ #define POINT1_NPOINTS 10 @@ -79,7 +79,7 @@ test_reference_params(void) unsigned *tu32; /* Temporary pointer to uint32 data */ int i; /* counting variables */ const char *write_comment = "Foo!"; /* Comments for group */ - hid_t ret_id; /* Generic hid_t return value */ + hid_t ret_id; /* Generic hid_t return value */ ssize_t name_size; /* Size of reference name */ herr_t ret; /* Generic return value */ @@ -102,7 +102,7 @@ test_reference_params(void) /* Create dataset access property list */ dapl_id = H5Pcreate(H5P_DATASET_ACCESS); CHECK(dapl_id, FAIL, "H5Pcreate"); - + /* Create a group */ group = H5Gcreate2(fid1, "Group1", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); CHECK(group, FAIL, "H5Gcreate2"); @@ -245,13 +245,13 @@ test_reference_params(void) static void test_reference_obj(void) { - hid_t fid1; /* HDF5 File IDs */ - hid_t dataset, /* Dataset ID */ + hid_t fid1; /* HDF5 File IDs */ + hid_t dataset, /* Dataset ID */ dset2; /* Dereferenced dataset ID */ - hid_t group; /* Group ID */ - hid_t sid1; /* Dataspace ID */ - hid_t tid1; /* Datatype ID */ - hsize_t dims1[] = {SPACE1_DIM1}; + hid_t group; /* Group ID */ + hid_t sid1; /* Dataspace ID */ + hid_t tid1; /* Datatype ID */ + hsize_t dims1[] = {SPACE1_DIM1}; hid_t dapl_id; /* Dataset access property list */ hobj_ref_t *wbuf, /* buffer to write to disk */ *rbuf, /* buffer read from disk */ @@ -263,7 +263,7 @@ test_reference_obj(void) char read_comment[10]; H5O_type_t obj_type; /* Object type */ ssize_t size; /* Comment length */ - herr_t ret; /* Generic return value */ + herr_t ret; /* Generic return value */ /* Output message about test being performed */ MESSAGE(5, ("Testing Object Reference Functions\n")); @@ -284,7 +284,7 @@ test_reference_obj(void) /* Create dataset access property list */ dapl_id = H5Pcreate(H5P_DATASET_ACCESS); CHECK(dapl_id, FAIL, "H5Pcreate"); - + /* Create a group */ group = H5Gcreate2(fid1, "Group1", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); CHECK(group, FAIL, "H5Gcreate2"); @@ -542,7 +542,7 @@ test_reference_region(hbool_t new_format) hdset_reg_ref_t wdata_NA[1], /* Write buffer */ rdata_NA[1]; /* Read buffer */ hsize_t numparticles = 8388608; -hsize_t ret_particles; + hsize_t ret_particles; unsigned num_dsets = 513; hsize_t total_particles = numparticles * num_dsets; hsize_t vdsdims[1] = {total_particles}; @@ -580,7 +580,7 @@ hsize_t ret_particles; /* Create dataset access property list */ dapl_id = H5Pcreate(H5P_DATASET_ACCESS); CHECK(dapl_id, FAIL, "H5Pcreate"); - + /* Create a dataset */ dset2 = H5Dcreate2(fid1, "Dataset2", H5T_STD_U8LE, sid2, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); CHECK(dset2, FAIL, "H5Dcreate2"); @@ -716,7 +716,7 @@ hsize_t ret_particles; /* Close and release resources for undefined region reference tests */ ret = H5Dclose(dset_NA); CHECK(ret, FAIL, "H5Dclose"); - ret = H5Sclose(space_NA); + ret = H5Sclose(space_NA); CHECK(ret, FAIL, "H5Sclose"); /* Close disk dataspace */ @@ -742,10 +742,10 @@ hsize_t ret_particles; fid1 = H5Fopen(FILE2, H5F_ACC_RDWR, H5P_DEFAULT); CHECK(fid1, FAIL, "H5Fopen"); - /* - * Start the test of an undefined reference + /* + * Start the test of an undefined reference */ - + /* Open the dataset of the undefined references */ dset_NA = H5Dopen2(fid1, "DS_NA", H5P_DEFAULT); CHECK(dset_NA, FAIL, "H5Dopen2"); @@ -753,28 +753,28 @@ hsize_t ret_particles; /* Read the data */ ret = H5Dread(dset_NA, H5T_STD_REF_DSETREG, H5S_ALL, H5S_ALL, H5P_DEFAULT, rdata_NA); CHECK(ret, FAIL, "H5Dread"); - + /* * Dereference an undefined reference (should fail) */ H5E_BEGIN_TRY { dset2 = H5Rdereference2(dset_NA, H5P_DEFAULT, H5R_DATASET_REGION, &rdata_NA[0]); - } H5E_END_TRY; - VERIFY(dset2, FAIL, "H5Rdereference2"); + } H5E_END_TRY; + VERIFY(dset2, FAIL, "H5Rdereference2"); /* Close and release resources. */ ret = H5Dclose(dset_NA); CHECK(ret, FAIL, "H5Dclose"); - /* This close should fail since H5Rdereference2 never created + /* This close should fail since H5Rdereference2 never created * the id of the referenced object. */ H5E_BEGIN_TRY { ret = H5Dclose(dset2); - } H5E_END_TRY; - VERIFY(ret, FAIL, "H5Dclose"); + } H5E_END_TRY; + VERIFY(ret, FAIL, "H5Dclose"); - /* - * End the test of an undefined reference + /* + * End the test of an undefined reference */ /* Open the dataset */ @@ -975,31 +975,30 @@ hsize_t ret_particles; static void test_reference_region_1D(hbool_t new_format) { - hid_t fid1; /* HDF5 File IDs */ - hid_t fapl = -1; /* File acess property list */ - hid_t dset1, /* Dataset ID */ - dset3; /* Dereferenced dataset ID */ - hid_t sid1, /* Dataspace ID #1 */ - sid3; /* Dataspace ID #3 */ - hid_t dapl_id; /* Dataset access property list */ - hsize_t dims1[] = {SPACE1_DIM1}, - dims3[] = {SPACE3_DIM1}; - hsize_t start[SPACE3_RANK]; /* Starting location of hyperslab */ - hsize_t stride[SPACE3_RANK]; /* Stride of hyperslab */ - hsize_t count[SPACE3_RANK]; /* Element count of hyperslab */ - hsize_t block[SPACE3_RANK]; /* Block size of hyperslab */ - hsize_t coord1[POINT1_NPOINTS][SPACE3_RANK]; /* Coordinates for point selection */ - hsize_t *coords; /* Coordinate buffer */ - hsize_t low[SPACE3_RANK]; /* Selection bounds */ - hsize_t high[SPACE3_RANK]; /* Selection bounds */ - hdset_reg_ref_t *wbuf, /* buffer to write to disk */ - *rbuf; /* buffer read from disk */ - uint8_t *dwbuf, /* Buffer for writing numeric data to disk */ - *drbuf; /* Buffer for reading numeric data from disk */ - uint8_t *tu8; /* Temporary pointer to uint8 data */ - H5O_type_t obj_type; /* Object type */ - int i; /* counting variables */ - herr_t ret; /* Generic return value */ + hid_t fid1; /* HDF5 File IDs */ + hid_t dset1, /* Dataset ID */ + dset3; /* Dereferenced dataset ID */ + hid_t sid1, /* Dataspace ID #1 */ + sid3; /* Dataspace ID #3 */ + hid_t dapl_id; /* Dataset access property list */ + hsize_t dims1[] = {SPACE1_DIM1}, + dims3[] = {SPACE3_DIM1}; + hsize_t start[SPACE3_RANK]; /* Starting location of hyperslab */ + hsize_t stride[SPACE3_RANK]; /* Stride of hyperslab */ + hsize_t count[SPACE3_RANK]; /* Element count of hyperslab */ + hsize_t block[SPACE3_RANK]; /* Block size of hyperslab */ + hsize_t coord1[POINT1_NPOINTS][SPACE3_RANK]; /* Coordinates for point selection */ + hsize_t * coords; /* Coordinate buffer */ + hsize_t low[SPACE3_RANK]; /* Selection bounds */ + hsize_t high[SPACE3_RANK]; /* Selection bounds */ + hdset_reg_ref_t *wbuf, /* buffer to write to disk */ + *rbuf; /* buffer read from disk */ + uint8_t *dwbuf, /* Buffer for writing numeric data to disk */ + *drbuf; /* Buffer for reading numeric data from disk */ + uint8_t *tu8; /* Temporary pointer to uint8 data */ + H5O_type_t obj_type; /* Object type */ + int i; /* counting variables */ + herr_t ret; /* Generic return value */ /* Output message about test being performed */ MESSAGE(5, ("Testing 1-D Dataset Region Reference Functions\n")); @@ -1010,16 +1009,8 @@ test_reference_region_1D(hbool_t new_format) dwbuf = (uint8_t *)HDmalloc(sizeof(uint8_t) * SPACE3_DIM1); drbuf = (uint8_t *)HDcalloc(sizeof(uint8_t), (size_t)SPACE3_DIM1); - /* Set to use the latest file format */ - fapl = H5Pcreate(H5P_FILE_ACCESS); - CHECK(fapl, FAIL, "H5Pcreate"); - if(new_format) { - ret = H5Pset_libver_bounds(fapl, H5F_LIBVER_LATEST, H5F_LIBVER_LATEST); - CHECK(ret, FAIL, "H5Pset_libver_bounds"); - } - /* Create file */ - fid1 = H5Fcreate(FILE2, H5F_ACC_TRUNC, H5P_DEFAULT, fapl); + fid1 = H5Fcreate(FILE2, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT); CHECK(fid1, FAIL, "H5Fcreate"); /* Create dataspace for datasets */ @@ -1029,7 +1020,7 @@ test_reference_region_1D(hbool_t new_format) /* Create dataset access property list */ dapl_id = H5Pcreate(H5P_DATASET_ACCESS); CHECK(dapl_id, FAIL, "H5Pcreate"); - + /* Create a dataset */ dset3 = H5Dcreate2(fid1, "Dataset2", H5T_STD_U8LE, sid3, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); CHECK(dset3, FAIL, "H5Dcreate2"); @@ -1269,14 +1260,14 @@ test_reference_region_1D(hbool_t new_format) static void test_reference_obj_deleted(void) { - hid_t fid1; /* HDF5 File IDs */ - hid_t dataset, /* Dataset ID */ + hid_t fid1; /* HDF5 File IDs */ + hid_t dataset, /* Dataset ID */ dset2; /* Dereferenced dataset ID */ - hid_t sid1; /* Dataspace 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 */ + haddr_t addr = HADDR_UNDEF; /* test for undefined reference */ + herr_t ret; /* Generic return value */ /* Create file */ fid1 = H5Fcreate(FILE3, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT); @@ -1535,25 +1526,25 @@ test_reference_group(void) static void test_reference_compat(void) { - hid_t fid1; /* HDF5 File IDs */ - hid_t dataset, dset2; /* Dataset ID */ - hid_t group, group2; /* Group ID */ - hid_t sid1, /* Dataspace IDs */ + hid_t fid1; /* HDF5 File IDs */ + hid_t dataset, dset2; /* Dataset ID */ + hid_t group, group2; /* Group ID */ + hid_t sid1, /* Dataspace IDs */ sid2; - hid_t tid1, tid2; /* Datatype ID */ - hsize_t dims1[] = {SPACE1_DIM1}, - dims2[] = {SPACE2_DIM1, SPACE2_DIM2}; - hsize_t start[SPACE2_RANK]; /* Starting location of hyperslab */ - hsize_t stride[SPACE2_RANK]; /* Stride of hyperslab */ - hsize_t count[SPACE2_RANK]; /* Element count of hyperslab */ - hsize_t block[SPACE2_RANK]; /* Block size of hyperslab */ - hsize_t coord1[POINT1_NPOINTS][SPACE2_RANK]; /* Coordinates for point selection */ + hid_t tid1, tid2; /* Datatype ID */ + hsize_t dims1[] = {SPACE1_DIM1}, + dims2[] = {SPACE2_DIM1, SPACE2_DIM2}; + hsize_t start[SPACE2_RANK]; /* Starting location of hyperslab */ + hsize_t stride[SPACE2_RANK]; /* Stride of hyperslab */ + hsize_t count[SPACE2_RANK]; /* Element count of hyperslab */ + hsize_t block[SPACE2_RANK]; /* Block size of hyperslab */ + hsize_t coord1[POINT1_NPOINTS][SPACE2_RANK]; /* Coordinates for point selection */ hobj_ref_t *wbuf_obj, /* Buffer to write to disk */ *rbuf_obj; /* Buffer read from disk */ hdset_reg_ref_t *wbuf_reg, /* Buffer to write to disk */ *rbuf_reg; /* Buffer read from disk */ H5G_obj_t obj_type; /* Object type */ - herr_t ret; /* Generic return value */ + herr_t ret; /* Generic return value */ /* Output message about test being performed */ MESSAGE(5, ("Testing Deprecated Object Reference Functions\n")); @@ -1843,15 +1834,15 @@ test_reference(void) } /* test_reference() */ - + /*------------------------------------------------------------------------- - * Function: cleanup_reference + * Function: cleanup_reference * - * Purpose: Cleanup temporary test files + * Purpose: Cleanup temporary test files * - * Return: none + * Return: none * - * Programmer: Quincey Koziol + * Programmer: Quincey Koziol * September 8, 1998 * * Modifications: diff --git a/test/ttime.c b/test/ttime.c index 0df7422..48c9ba8 100644 --- a/test/ttime.c +++ b/test/ttime.c @@ -13,7 +13,7 @@ /*********************************************************** * -* Test program: ttime +* Test program: ttime * * Test the Time Datatype functionality * @@ -213,15 +213,15 @@ test_time(void) } /* test_time() */ - + /*------------------------------------------------------------------------- - * Function: cleanup_time + * Function: cleanup_time * - * Purpose: Cleanup temporary test files + * Purpose: Cleanup temporary test files * - * Return: none + * Return: none * - * Programmer: Quincey Koziol + * Programmer: Quincey Koziol * October 19, 2000 * * Modifications: diff --git a/test/tvlstr.c b/test/tvlstr.c index e7593fa..3315d68 100644 --- a/test/tvlstr.c +++ b/test/tvlstr.c @@ -13,7 +13,7 @@ /*********************************************************** * -* Test program: tvlstr +* Test program: tvlstr * * Test the Variable-Length String functionality * @@ -25,8 +25,8 @@ #define DATAFILE2 "tvlstr2.h5" /* 1-D dataset with fixed dimensions */ -#define SPACE1_RANK 1 -#define SPACE1_DIM1 4 +#define SPACE1_RANK 1 +#define SPACE1_DIM1 4 #define VLSTR_TYPE "vl_string_type" @@ -113,17 +113,17 @@ test_vlstrings_basic(void) char *rdata[SPACE1_DIM1]; /* Information read in */ char *wdata2; hid_t dataspace, dataset2; - hid_t fid1; /* HDF5 File IDs */ - hid_t dataset; /* Dataset ID */ - hid_t sid1; /* Dataspace ID */ - hid_t tid1; /* Datatype ID */ + hid_t fid1; /* HDF5 File IDs */ + hid_t dataset; /* Dataset ID */ + hid_t sid1; /* Dataspace ID */ + hid_t tid1; /* Datatype ID */ hid_t xfer_pid; /* Dataset transfer property list ID */ - hsize_t dims1[] = {SPACE1_DIM1}; + hsize_t dims1[] = {SPACE1_DIM1}; hsize_t size; /* Number of bytes which will be used */ unsigned i; /* counting variable */ size_t str_used; /* String data in memory */ size_t mem_used=0; /* Memory used during allocation */ - herr_t ret; /* Generic return value */ + herr_t ret; /* Generic return value */ /* Output message about test being performed */ MESSAGE(5, ("Testing Basic VL String Functionality\n")); @@ -245,14 +245,14 @@ test_vlstrings_special(void) const char *wdata2[SPACE1_DIM1] = {NULL, NULL, NULL, NULL}; char *rdata[SPACE1_DIM1]; /* Information read in */ char *fill; /* Fill value */ - hid_t fid1; /* HDF5 File IDs */ - hid_t dataset; /* Dataset ID */ - hid_t sid1; /* Dataspace ID */ - hid_t tid1; /* Datatype ID */ - hid_t dcpl; /* Dataset creation property list ID */ - hsize_t dims1[] = {SPACE1_DIM1}; + hid_t fid1; /* HDF5 File IDs */ + hid_t dataset; /* Dataset ID */ + hid_t sid1; /* Dataspace ID */ + hid_t tid1; /* Datatype ID */ + hid_t dcpl; /* Dataset creation property list ID */ + hsize_t dims1[] = {SPACE1_DIM1}; unsigned i; /* counting variable */ - herr_t ret; /* Generic return value */ + herr_t ret; /* Generic return value */ /* Output message about test being performed */ MESSAGE(5, ("Testing Special VL Strings\n")); @@ -475,14 +475,14 @@ test_compact_vlstring(void) { const char *wdata[SPACE1_DIM1] = {"one", "two", "three", "four"}; char *rdata[SPACE1_DIM1]; /* Information read in */ - hid_t fid1; /* HDF5 File IDs */ - hid_t dataset; /* Dataset ID */ - hid_t sid1; /* Dataspace ID */ - hid_t tid1; /* Datatype ID */ - hid_t plist; /* Dataset creation property list */ - hsize_t dims1[] = {SPACE1_DIM1}; + hid_t fid1; /* HDF5 File IDs */ + hid_t dataset; /* Dataset ID */ + hid_t sid1; /* Dataspace ID */ + hid_t tid1; /* Datatype ID */ + hid_t plist; /* Dataset creation property list */ + hsize_t dims1[] = {SPACE1_DIM1}; unsigned i; /* counting variable */ - herr_t ret; /* Generic return value */ + herr_t ret; /* Generic return value */ /* Output message about test being performed */ MESSAGE(5, ("Testing VL Strings in compact dataset\n")); @@ -871,15 +871,15 @@ test_vlstrings(void) test_vl_rewrite(); } /* test_vlstrings() */ - + /*------------------------------------------------------------------------- - * Function: cleanup_vlstrings + * Function: cleanup_vlstrings * - * Purpose: Cleanup temporary test files + * Purpose: Cleanup temporary test files * - * Return: none + * Return: none * - * Programmer: Quincey Koziol + * Programmer: Quincey Koziol * September 10, 1999 * * Modifications: diff --git a/test/tvltypes.c b/test/tvltypes.c index ef154a2..e5a3d34 100644 --- a/test/tvltypes.c +++ b/test/tvltypes.c @@ -13,7 +13,7 @@ /*********************************************************** * -* Test program: tvltypes +* Test program: tvltypes * * Test the Variable-Length Datatype functionality * @@ -26,18 +26,18 @@ #define FILENAME "tvltypes.h5" /* 1-D dataset with fixed dimensions */ -#define SPACE1_RANK 1 +#define SPACE1_RANK 1 #define SPACE1_DIM1 4 /* 1-D dataset with fixed dimensions */ -#define SPACE3_RANK 1 +#define SPACE3_RANK 1 #define SPACE3_DIM1 128 #define L1_INCM 16 #define L2_INCM 8 #define L3_INCM 3 /* 1-D dataset with fixed dimensions */ -#define SPACE4_RANK 1 +#define SPACE4_RANK 1 #define SPACE4_DIM_SMALL 128 #define SPACE4_DIM_LARGE (H5D_TEMP_BUF_SIZE / 64) @@ -103,7 +103,7 @@ static void test_vltypes_dataset_create(void) { hid_t fid1; /* HDF5 File IDs */ - hid_t dcpl; /* Dataset Property list */ + hid_t dcpl; /* Dataset Property list */ hid_t dataset; /* Dataset ID */ hsize_t dims1[] = {SPACE1_DIM1}; hid_t sid1; /* Dataspace ID */ @@ -135,7 +135,7 @@ test_vltypes_dataset_create(void) /* Create a dataset, supposed to fail */ H5E_BEGIN_TRY { - dataset = H5Dcreate2(fid1, "Dataset1", tid1, sid1, H5P_DEFAULT, dcpl, H5P_DEFAULT); + dataset = H5Dcreate2(fid1, "Dataset1", tid1, sid1, H5P_DEFAULT, dcpl, H5P_DEFAULT); } H5E_END_TRY; VERIFY(dataset, FAIL, "H5Dcreate2"); @@ -229,18 +229,18 @@ test_vltypes_vlen_atomic(void) hvl_t wdata2[SPACE1_DIM1]; /* Information to write */ hvl_t rdata[SPACE1_DIM1]; /* Information read in */ hvl_t fill; /* Fill value */ - hid_t fid1; /* HDF5 File IDs */ - hid_t dataset; /* Dataset ID */ - hid_t sid1; /* Dataspace ID */ + hid_t fid1; /* HDF5 File IDs */ + hid_t dataset; /* Dataset ID */ + hid_t sid1; /* Dataspace ID */ hid_t sid2; /* ID of bad dataspace (no extent set) */ - hid_t tid1; /* Datatype ID */ + hid_t tid1; /* Datatype ID */ hid_t dcpl_pid; /* Dataset creation property list ID */ hid_t xfer_pid; /* Dataset transfer property list ID */ hsize_t dims1[] = {SPACE1_DIM1}; hsize_t size; /* Number of bytes which will be used */ unsigned i,j; /* counting variables */ size_t mem_used=0; /* Memory used during allocation */ - herr_t ret; /* Generic return value */ + herr_t ret; /* Generic return value */ /* Output message about test being performed */ MESSAGE(5, ("Testing Basic Atomic VL Datatype Functionality\n")); @@ -555,7 +555,7 @@ rewrite_vltypes_vlen_atomic(void) hsize_t size; /* Number of bytes which will be used */ unsigned i,j; /* counting variables */ size_t mem_used=0; /* Memory used during allocation */ - unsigned increment=4; + unsigned increment=4; herr_t ret; /* Generic return value */ /* Output message about test being performed */ @@ -708,16 +708,16 @@ test_vltypes_vlen_compound(void) } s1; hvl_t wdata[SPACE1_DIM1]; /* Information to write */ hvl_t rdata[SPACE1_DIM1]; /* Information read in */ - hid_t fid1; /* HDF5 File IDs */ - hid_t dataset; /* Dataset ID */ - hid_t sid1; /* Dataspace ID */ - hid_t tid1, tid2; /* Datatype IDs */ + hid_t fid1; /* HDF5 File IDs */ + hid_t dataset; /* Dataset ID */ + hid_t sid1; /* Dataspace ID */ + hid_t tid1, tid2; /* Datatype IDs */ hid_t xfer_pid; /* Dataset transfer property list ID */ - hsize_t dims1[] = {SPACE1_DIM1}; + hsize_t dims1[] = {SPACE1_DIM1}; hsize_t size; /* Number of bytes which will be used */ unsigned i,j; /* counting variables */ size_t mem_used=0; /* Memory used during allocation */ - herr_t ret; /* Generic return value */ + herr_t ret; /* Generic return value */ /* Output message about test being performed */ MESSAGE(5, ("Testing Basic Compound VL Datatype Functionality\n")); @@ -862,7 +862,7 @@ rewrite_vltypes_vlen_compound(void) hsize_t size; /* Number of bytes which will be used */ unsigned i,j; /* counting variables */ size_t mem_used=0; /* Memory used during allocation */ - unsigned increment=4; + unsigned increment=4; herr_t ret; /* Generic return value */ /* Output message about test being performed */ @@ -1000,14 +1000,14 @@ test_vltypes_compound_vlen_vlen(void) } s1; s1 *wdata; /* data to write */ s1 *rdata; /* data to read */ - hid_t fid1; /* HDF5 File IDs */ - hid_t dataset; /* Dataset ID */ - hid_t sid1; /* Dataspace ID */ - hid_t tid1, tid2, tid3; /* Datatype IDs */ - hsize_t dims1[] = {SPACE3_DIM1}; + hid_t fid1; /* HDF5 File IDs */ + hid_t dataset; /* Dataset ID */ + hid_t sid1; /* Dataspace ID */ + hid_t tid1, tid2, tid3; /* Datatype IDs */ + hsize_t dims1[] = {SPACE3_DIM1}; unsigned i,j,k; /* counting variables */ hvl_t *t1, *t2; /* Temporary pointer to VL information */ - herr_t ret; /* Generic return value */ + herr_t ret; /* Generic return value */ /* Output message about test being performed */ MESSAGE(5, ("Testing Compound Datatypes with VL Atomic Datatype Component Functionality\n")); @@ -1181,21 +1181,21 @@ test_vltypes_compound_vlstr(void) s1 wdata2[SPACE1_DIM1]; /* data to write */ s1 rdata[SPACE1_DIM1]; /* data to read */ s1 rdata2[SPACE1_DIM1]; /* data to read */ - char str[64] = "a\0"; - hid_t fid1; /* HDF5 File IDs */ - hid_t dataset, dset2; /* Dataset ID */ - hid_t sid1, sid2, filespace, filespace2; /* Dataspace ID */ - hid_t tid1, tid2, tid3, tid4, tid5; /* Datatype IDs */ - hid_t cparms; - hsize_t dims1[] = {SPACE1_DIM1}; - hsize_t chunk_dims[] = {SPACE1_DIM1/2}; - hsize_t maxdims[] = {H5S_UNLIMITED}; - hsize_t size[] = {SPACE1_DIM1}; - hsize_t offset[] = {0}; + char str[64] = "a\0"; + hid_t fid1; /* HDF5 File IDs */ + hid_t dataset, dset2; /* Dataset ID */ + hid_t sid1, sid2, filespace, filespace2; /* Dataspace ID */ + hid_t tid1, tid2, tid3, tid4, tid5; /* Datatype IDs */ + hid_t cparms; + hsize_t dims1[] = {SPACE1_DIM1}; + hsize_t chunk_dims[] = {SPACE1_DIM1/2}; + hsize_t maxdims[] = {H5S_UNLIMITED}; + hsize_t size[] = {SPACE1_DIM1}; + hsize_t offset[] = {0}; unsigned i,j; /* counting variables */ s2 *t1, *t2; /* Temporary pointer to VL information */ - int val; - herr_t ret; /* Generic return value */ + int val; + herr_t ret; /* Generic return value */ /* Output message about test being performed */ MESSAGE(5, ("Testing VL Datatype of Compound Datatype with VL String Functionality\n")); @@ -1373,10 +1373,10 @@ test_vltypes_compound_vlstr(void) wdata2[i].v.p=(s2*)HDmalloc((i+1)*sizeof(s2)); wdata2[i].v.len=i+1; for(t1=(s2*)(wdata2[i].v).p, j=0; jstring = (char*)HDmalloc(strlen(str)*sizeof(char)+1); + strcat(str, "pp"); + t1->string = (char*)HDmalloc(strlen(str)*sizeof(char)+1); strcpy(t1->string, str); - t1->color = green; + t1->color = green; } } /* end for */ @@ -1466,17 +1466,17 @@ test_vltypes_compound_vlen_atomic(void) s1 wdata[SPACE1_DIM1]; /* Information to write */ s1 rdata[SPACE1_DIM1]; /* Information read in */ s1 fill; /* Fill value */ - hid_t fid1; /* HDF5 File IDs */ - hid_t dataset; /* Dataset ID */ - hid_t sid1; /* Dataspace ID */ - hid_t tid1, tid2; /* Datatype IDs */ + hid_t fid1; /* HDF5 File IDs */ + hid_t dataset; /* Dataset ID */ + hid_t sid1; /* Dataspace ID */ + hid_t tid1, tid2; /* Datatype IDs */ hid_t xfer_pid; /* Dataset transfer property list ID */ hid_t dcpl_pid; /* Dataset creation property list ID */ - hsize_t dims1[] = {SPACE1_DIM1}; + hsize_t dims1[] = {SPACE1_DIM1}; hsize_t size; /* Number of bytes which will be used */ unsigned i,j; /* counting variables */ size_t mem_used=0; /* Memory used during allocation */ - herr_t ret; /* Generic return value */ + herr_t ret; /* Generic return value */ /* Output message about test being performed */ MESSAGE(5, ("Testing Compound Datatypes with VL Atomic Datatype Component Functionality\n")); @@ -1670,9 +1670,9 @@ test_vltypes_compound_vlen_atomic(void) /**************************************************************** ** ** rewrite_vltypes_compound_vlen_atomic(): Check memory leak for -** basic VL datatype code. +** basic VL datatype code. ** Check memory leak for compound datatypes with VL datatypes -** of atomic datatypes. +** of atomic datatypes. ** ****************************************************************/ static void @@ -1693,7 +1693,7 @@ rewrite_vltypes_compound_vlen_atomic(void) hsize_t size; /* Number of bytes which will be used */ unsigned i,j; /* counting variables */ size_t mem_used=0; /* Memory used during allocation */ - unsigned increment=4; + unsigned increment=4; herr_t ret; /* Generic return value */ /* Output message about test being performed */ @@ -1854,16 +1854,16 @@ test_vltypes_vlen_vlen_atomic(void) hvl_t wdata[SPACE1_DIM1]; /* Information to write */ hvl_t rdata[SPACE1_DIM1]; /* Information read in */ hvl_t *t1, *t2; /* Temporary pointer to VL information */ - hid_t fid1; /* HDF5 File IDs */ - hid_t dataset; /* Dataset ID */ - hid_t sid1; /* Dataspace ID */ - hid_t tid1, tid2; /* Datatype IDs */ + hid_t fid1; /* HDF5 File IDs */ + hid_t dataset; /* Dataset ID */ + hid_t sid1; /* Dataspace ID */ + hid_t tid1, tid2; /* Datatype IDs */ hid_t xfer_pid; /* Dataset transfer property list ID */ - hsize_t dims1[] = {SPACE1_DIM1}; + hsize_t dims1[] = {SPACE1_DIM1}; hsize_t size; /* Number of bytes which will be used */ unsigned i,j,k; /* counting variables */ size_t mem_used=0; /* Memory used during allocation */ - herr_t ret; /* Generic return value */ + herr_t ret; /* Generic return value */ /* Output message about test being performed */ MESSAGE(5, ("Testing VL Datatypes with VL Atomic Datatype Component Functionality\n")); @@ -2048,12 +2048,12 @@ rewrite_longer_vltypes_vlen_vlen_atomic(void) hid_t fid1; /* HDF5 File IDs */ hid_t dataset; /* Dataset ID */ hid_t sid1; /* Dataspace ID */ - hid_t tid2; /* Datatype IDs */ + hid_t tid2; /* Datatype IDs */ hid_t xfer_pid; /* Dataset transfer property list ID */ hsize_t size; /* Number of bytes which will be used */ unsigned i,j,k; /* counting variables */ size_t mem_used=0; /* Memory used during allocation */ - unsigned increment=1; + unsigned increment=1; herr_t ret; /* Generic return value */ /* Output message about test being performed */ @@ -3170,15 +3170,15 @@ test_vltypes(void) /* These next tests use the same file */ test_vltypes_dataset_create(); /* Check dataset of VL when fill value - * won't be rewritten to it.*/ + * won't be rewritten to it.*/ test_vltypes_funcs(); /* Test functions with VL types */ test_vltypes_vlen_atomic(); /* Test VL atomic datatypes */ - rewrite_vltypes_vlen_atomic(); /* Check VL memory leak */ + rewrite_vltypes_vlen_atomic(); /* Check VL memory leak */ test_vltypes_vlen_compound(); /* Test VL compound datatypes */ - rewrite_vltypes_vlen_compound(); /* Check VL memory leak */ + rewrite_vltypes_vlen_compound(); /* Check VL memory leak */ test_vltypes_compound_vlen_atomic(); /* Test compound datatypes with VL atomic components */ - rewrite_vltypes_compound_vlen_atomic();/* Check VL memory leak */ - test_vltypes_vlen_vlen_atomic(); /* Test VL datatype with VL atomic components */ + rewrite_vltypes_compound_vlen_atomic();/* Check VL memory leak */ + test_vltypes_vlen_vlen_atomic(); /* Test VL datatype with VL atomic components */ rewrite_longer_vltypes_vlen_vlen_atomic(); /*overwrite with VL data of longer sequence*/ rewrite_shorter_vltypes_vlen_vlen_atomic(); /*overwrite with VL data of shorted sequence*/ test_vltypes_compound_vlen_vlen();/* Test compound datatypes with VL atomic components */ @@ -3186,15 +3186,15 @@ test_vltypes(void) test_vltypes_fill_value(); /* Test fill value for VL data */ } /* test_vltypes() */ - + /*------------------------------------------------------------------------- - * Function: cleanup_vltypes + * Function: cleanup_vltypes * - * Purpose: Cleanup temporary test files + * Purpose: Cleanup temporary test files * - * Return: none + * Return: none * - * Programmer: Quincey Koziol + * Programmer: Quincey Koziol * June 8, 1999 * * Modifications: diff --git a/testpar/t_cache.c b/testpar/t_cache.c index 0447720..5768e35 100644 --- a/testpar/t_cache.c +++ b/testpar/t_cache.c @@ -18,9 +18,9 @@ #include "testpar.h" -#define H5AC_FRIEND /*suppress error about including H5ACpkg */ -#define H5C_FRIEND /*suppress error about including H5Cpkg */ -#define H5F_FRIEND /*suppress error about including H5Fpkg */ +#define H5AC_FRIEND /*suppress error about including H5ACpkg */ +#define H5C_FRIEND /*suppress error about including H5Cpkg */ +#define H5F_FRIEND /*suppress error about including H5Fpkg */ #include "H5ACpkg.h" #include "H5Cpkg.h" @@ -32,9 +32,9 @@ #define BASE_ADDR (haddr_t)1024 -int nerrors = 0; -int failures = 0; -hbool_t verbose = TRUE; /* used to control error messages */ +int nerrors = 0; +int failures = 0; +hbool_t verbose = TRUE; /* used to control error messages */ #define NFILENAME 2 #define PARATESTFILE filenames[0] @@ -44,23 +44,23 @@ const char *FILENAME[NFILENAME]={"CacheTestDummy", NULL}; #endif /* !PATH_MAX */ char filenames[NFILENAME][PATH_MAX]; hid_t fapl; /* file access property list */ -haddr_t max_addr = 0; /* used to store the end of - * the address space used by - * the data array (see below). - */ -hbool_t callbacks_verbose = FALSE; /* flag used to control whether - * the callback functions are in - * verbose mode. - */ +haddr_t max_addr = 0; /* used to store the end of + * the address space used by + * the data array (see below). + */ +hbool_t callbacks_verbose = FALSE; /* flag used to control whether + * the callback functions are in + * verbose mode. + */ -int world_mpi_size = -1; -int world_mpi_rank = -1; -int world_server_mpi_rank = -1; -MPI_Comm world_mpi_comm = MPI_COMM_NULL; -int file_mpi_size = -1; -int file_mpi_rank = -1; -MPI_Comm file_mpi_comm = MPI_COMM_NULL; +int world_mpi_size = -1; +int world_mpi_rank = -1; +int world_server_mpi_rank = -1; +MPI_Comm world_mpi_comm = MPI_COMM_NULL; +int file_mpi_size = -1; +int file_mpi_rank = -1; +MPI_Comm file_mpi_comm = MPI_COMM_NULL; /* the following globals are used to maintain rudementary statistics @@ -73,67 +73,67 @@ long datum_destroys = 0; long datum_flushes = 0; long datum_pinned_flushes = 0; long datum_loads = 0; -long global_pins = 0; -long global_dirty_pins = 0; -long local_pins = 0; +long global_pins = 0; +long global_dirty_pins = 0; +long local_pins = 0; /* the following fields are used by the server process only */ -int total_reads = 0; +int total_reads = 0; int total_writes = 0; /***************************************************************************** * struct datum * - * Instances of struct datum are used to store information on entries - * that may be loaded into the cache. The individual fields are - * discussed below: + * Instances of struct datum are used to store information on entries + * that may be loaded into the cache. The individual fields are + * discussed below: * - * header: Instance of H5C_cache_entry_t used by the for its data. - * This field is only used on the file processes, not on the - * server process. + * header: Instance of H5C_cache_entry_t used by the for its data. + * This field is only used on the file processes, not on the + * server process. * - * This field MUST be the first entry in this structure. + * This field MUST be the first entry in this structure. * - * base_addr: Base address of the entry. + * base_addr: Base address of the entry. * - * len: Length of the entry. + * len: Length of the entry. * - * local_len: Length of the entry according to the cache. This - * value must be positive, and may not be larger than len. + * local_len: Length of the entry according to the cache. This + * value must be positive, and may not be larger than len. * - * The field exists to allow us change the sizes of entries - * in the cache without upsetting the server. This value - * is only used locally, and is never sent to the server. + * The field exists to allow us change the sizes of entries + * in the cache without upsetting the server. This value + * is only used locally, and is never sent to the server. * - * ver: Version number of the entry. This number is initialize - * to zero, and incremented each time the entry is modified. + * ver: Version number of the entry. This number is initialize + * to zero, and incremented each time the entry is modified. * - * dirty: Boolean flag indicating whether the entry is dirty. + * dirty: Boolean flag indicating whether the entry is dirty. * - * For current purposes, an entry is clean until it is - * modified, and dirty until written to the server (cache - * on process 0) or until it is marked clean (all other - * caches). + * For current purposes, an entry is clean until it is + * modified, and dirty until written to the server (cache + * on process 0) or until it is marked clean (all other + * caches). * - * valid: Boolean flag indicating whether the entry contains - * valid data. Attempts to read an entry whose valid - * flag is not set should trigger an error. + * valid: Boolean flag indicating whether the entry contains + * valid data. Attempts to read an entry whose valid + * flag is not set should trigger an error. * - * locked: Boolean flag that is set to true iff the entry is in - * the cache and locked. + * locked: Boolean flag that is set to true iff the entry is in + * the cache and locked. * - * global_pinned: Boolean flag that is set to true iff the entry has - * been pinned collectively in all caches. Since writes must - * be collective across all processes, only entries pinned - * in this fashion may be marked dirty. + * global_pinned: Boolean flag that is set to true iff the entry has + * been pinned collectively in all caches. Since writes must + * be collective across all processes, only entries pinned + * in this fashion may be marked dirty. * - * local_pinned: Boolean flag that is set to true iff the entry - * has been pinned in the local cache, but probably not all - * caches. Such pins will typically not be consistant across - * processes, and thus cannot be marked as dirty unless they - * happen to overlap some collective operation. + * local_pinned: Boolean flag that is set to true iff the entry + * has been pinned in the local cache, but probably not all + * caches. Such pins will typically not be consistant across + * processes, and thus cannot be marked as dirty unless they + * happen to overlap some collective operation. * * cleared: Boolean flag that is set to true whenever the entry is * dirty, and is cleared via a call to datum_notify with the @@ -142,61 +142,61 @@ int total_writes = 0; * flushed: Boolean flag that is set to true whenever the entry is * dirty, and is flushed by the metadata cache. * - * reads: Integer field used to maintain a count of the number of - * times this entry has been read from the server since - * the last time the read and write counts were reset. + * reads: Integer field used to maintain a count of the number of + * times this entry has been read from the server since + * the last time the read and write counts were reset. * - * writes: Integer field used to maintain a count of the number of - * times this entry has been written to the server since - * the last time the read and write counts were reset. + * writes: Integer field used to maintain a count of the number of + * times this entry has been written to the server since + * the last time the read and write counts were reset. * - * index: Index of this instance of datum in the data_index[] array - * discussed below. + * index: Index of this instance of datum in the data_index[] array + * discussed below. * - * aux_ptr: Pointer to the instance of H5AC_aux_t associated with the - * instance of the metadata cache within which this entry - * resides. This field was added to allow us to pass this - * value to the notify callback from the serialize callback. - * It should be NULL when not in use. + * aux_ptr: Pointer to the instance of H5AC_aux_t associated with the + * instance of the metadata cache within which this entry + * resides. This field was added to allow us to pass this + * value to the notify callback from the serialize callback. + * It should be NULL when not in use. * *****************************************************************************/ struct datum { - H5C_cache_entry_t header; - haddr_t base_addr; - size_t len; - size_t local_len; - int ver; - hbool_t dirty; - hbool_t valid; - hbool_t locked; - hbool_t global_pinned; - hbool_t local_pinned; - hbool_t cleared; + H5C_cache_entry_t header; + haddr_t base_addr; + size_t len; + size_t local_len; + int ver; + hbool_t dirty; + hbool_t valid; + hbool_t locked; + hbool_t global_pinned; + hbool_t local_pinned; + hbool_t cleared; hbool_t flushed; - int reads; - int writes; - int index; + int reads; + int writes; + int index; struct H5AC_aux_t * aux_ptr; }; /***************************************************************************** * data array * - * The data array is an array of instances of datum of size - * NUM_DATA_ENTRIES that is used to track the particulars of all - * the entries that may be loaded into the cache. + * The data array is an array of instances of datum of size + * NUM_DATA_ENTRIES that is used to track the particulars of all + * the entries that may be loaded into the cache. * - * It exists on all processes, although the master copy is maintained - * by the server process. If the cache is performing correctly, all - * versions should be effectively identical. By that I mean that - * the data received from the server should always match that in - * the local version of the data array. + * It exists on all processes, although the master copy is maintained + * by the server process. If the cache is performing correctly, all + * versions should be effectively identical. By that I mean that + * the data received from the server should always match that in + * the local version of the data array. * *****************************************************************************/ -#define NUM_DATA_ENTRIES 100000 +#define NUM_DATA_ENTRIES 100000 struct datum data[NUM_DATA_ENTRIES]; @@ -215,10 +215,10 @@ struct datum data[NUM_DATA_ENTRIES]; * Further, this value must be consistant across all processes. */ -#define STD_VIRT_NUM_DATA_ENTRIES NUM_DATA_ENTRIES -#define EXPRESS_VIRT_NUM_DATA_ENTRIES (NUM_DATA_ENTRIES / 10) +#define STD_VIRT_NUM_DATA_ENTRIES NUM_DATA_ENTRIES +#define EXPRESS_VIRT_NUM_DATA_ENTRIES (NUM_DATA_ENTRIES / 10) /* Use a smaller test size to avoid creating huge MPE logfiles. */ -#define MPE_VIRT_NUM_DATA_ENTIES (NUM_DATA_ENTRIES / 100) +#define MPE_VIRT_NUM_DATA_ENTIES (NUM_DATA_ENTRIES / 100) int virt_num_data_entries = NUM_DATA_ENTRIES; @@ -226,14 +226,14 @@ int virt_num_data_entries = NUM_DATA_ENTRIES; /***************************************************************************** * data_index array * - * The data_index array is an array of integer used to maintain a list - * of instances of datum in the data array in increasing base_addr order. + * The data_index array is an array of integer used to maintain a list + * of instances of datum in the data array in increasing base_addr order. * - * This array is necessary, as move operations can swap the values - * of the base_addr fields of two instances of datum. Without this - * array, we would no longer be able to use a binary search on a sorted - * list to find the indexes of instances of datum given the values of - * their base_addr fields. + * This array is necessary, as move operations can swap the values + * of the base_addr fields of two instances of datum. Without this + * array, we would no longer be able to use a binary search on a sorted + * list to find the indexes of instances of datum given the values of + * their base_addr fields. * *****************************************************************************/ @@ -242,99 +242,99 @@ int data_index[NUM_DATA_ENTRIES]; /***************************************************************************** * The following two #defines are used to control code that is in turn used - * to force "POSIX" semantics on the server process used to simulate metadata - * reads and writes. Without some such mechanism, the test code contains + * to force "POSIX" semantics on the server process used to simulate metadata + * reads and writes. Without some such mechanism, the test code contains * race conditions that will frequently cause spurious failures. * * When set to TRUE, DO_WRITE_REQ_ACK forces the server to send an ack after - * each write request, and the client to wait until the ack is received + * each write request, and the client to wait until the ack is received * before proceeding. This was my first solution to the problem, and at * first glance, it would seem to have a lot of unnecessary overhead. * * In an attempt to reduce the overhead, I implemented a second solution - * in which no acks are sent after writes. Instead, the metadata cache is - * provided with a callback function to call after each sequence of writes. - * This callback simply causes the client to send the server process a + * in which no acks are sent after writes. Instead, the metadata cache is + * provided with a callback function to call after each sequence of writes. + * This callback simply causes the client to send the server process a * "sync" message and and await an ack in reply. * - * Strangely, at least on Phoenix, the first solution runs faster by a - * rather large margin. However, I can imagine this changing with + * Strangely, at least on Phoenix, the first solution runs faster by a + * rather large margin. However, I can imagine this changing with * different OS's and MPI implementatins. * - * Thus I have left code supporting the second solution in place. + * Thus I have left code supporting the second solution in place. * - * Note that while one of these two #defines must be set to TRUE, there - * should never be any need to set both of them to TRUE (although the + * Note that while one of these two #defines must be set to TRUE, there + * should never be any need to set both of them to TRUE (although the * tests will still function with this setting). *****************************************************************************/ -#define DO_WRITE_REQ_ACK TRUE -#define DO_SYNC_AFTER_WRITE FALSE +#define DO_WRITE_REQ_ACK TRUE +#define DO_SYNC_AFTER_WRITE FALSE /***************************************************************************** * struct mssg * - * The mssg structure is used as a generic container for messages to - * and from the server. Not all fields are used in all cases. + * The mssg structure is used as a generic container for messages to + * and from the server. Not all fields are used in all cases. * - * req: Integer field containing the type of the message. + * req: Integer field containing the type of the message. * - * src: World communicator MPI rank of the sending process. + * src: World communicator MPI rank of the sending process. * - * dest: World communicator MPI rank of the destination process. + * dest: World communicator MPI rank of the destination process. * - * mssg_num: Serial number assigned to the message by the sender. + * mssg_num: Serial number assigned to the message by the sender. * - * base_addr: Base address of a datum. Not used in all mssgs. + * base_addr: Base address of a datum. Not used in all mssgs. * - * len: Length of a datum (in bytes). Not used in all mssgs. + * len: Length of a datum (in bytes). Not used in all mssgs. * - * ver: Version number of a datum. Not used in all mssgs. + * ver: Version number of a datum. Not used in all mssgs. * - * count: Reported number of total/entry reads/writes. Not used - * in all mssgs. + * count: Reported number of total/entry reads/writes. Not used + * in all mssgs. * - * magic: Magic number for error detection. Must be set to - * MSSG_MAGIC. + * magic: Magic number for error detection. Must be set to + * MSSG_MAGIC. * *****************************************************************************/ -#define WRITE_REQ_CODE 0 -#define WRITE_REQ_ACK_CODE 1 -#define READ_REQ_CODE 2 -#define READ_REQ_REPLY_CODE 3 -#define SYNC_REQ_CODE 4 -#define SYNC_ACK_CODE 5 -#define REQ_TTL_WRITES_CODE 6 -#define REQ_TTL_WRITES_RPLY_CODE 7 -#define REQ_TTL_READS_CODE 8 -#define REQ_TTL_READS_RPLY_CODE 9 -#define REQ_ENTRY_WRITES_CODE 10 -#define REQ_ENTRY_WRITES_RPLY_CODE 11 -#define REQ_ENTRY_READS_CODE 12 -#define REQ_ENTRY_READS_RPLY_CODE 13 -#define REQ_RW_COUNT_RESET_CODE 14 -#define REQ_RW_COUNT_RESET_RPLY_CODE 15 -#define DONE_REQ_CODE 16 -#define MAX_REQ_CODE 16 - -#define MSSG_MAGIC 0x1248 +#define WRITE_REQ_CODE 0 +#define WRITE_REQ_ACK_CODE 1 +#define READ_REQ_CODE 2 +#define READ_REQ_REPLY_CODE 3 +#define SYNC_REQ_CODE 4 +#define SYNC_ACK_CODE 5 +#define REQ_TTL_WRITES_CODE 6 +#define REQ_TTL_WRITES_RPLY_CODE 7 +#define REQ_TTL_READS_CODE 8 +#define REQ_TTL_READS_RPLY_CODE 9 +#define REQ_ENTRY_WRITES_CODE 10 +#define REQ_ENTRY_WRITES_RPLY_CODE 11 +#define REQ_ENTRY_READS_CODE 12 +#define REQ_ENTRY_READS_RPLY_CODE 13 +#define REQ_RW_COUNT_RESET_CODE 14 +#define REQ_RW_COUNT_RESET_RPLY_CODE 15 +#define DONE_REQ_CODE 16 +#define MAX_REQ_CODE 16 + +#define MSSG_MAGIC 0x1248 struct mssg_t { - int req; - int src; - int dest; - long int mssg_num; - haddr_t base_addr; - unsigned len; - int ver; - unsigned count; - unsigned magic; + int req; + int src; + int dest; + long int mssg_num; + haddr_t base_addr; + unsigned len; + int ver; + unsigned count; + unsigned magic; }; -MPI_Datatype mpi_mssg_t; /* for MPI derived type created from mssg */ +MPI_Datatype mpi_mssg_t; /* for MPI derived type created from mssg */ /*****************************************************************************/ @@ -408,24 +408,24 @@ static herr_t datum_notify(H5C_notify_action_t action, void *thing); static herr_t datum_free_icr(void * thing); /* Masquerade as object header entries to the cache */ -#define DATUM_ENTRY_TYPE H5AC_OHDR_ID +#define DATUM_ENTRY_TYPE H5AC_OHDR_ID -#define NUMBER_OF_ENTRY_TYPES 1 +#define NUMBER_OF_ENTRY_TYPES 1 /* Note the use of the H5AC__CLASS_SKIP_READS and H5AC__CLASS_SKIP_WRITES * flags. As a result of these flags, the metadata cache does no file I/O * on metadata of the datum type. * - * Instead, this test uses a server process to keep track of who has + * Instead, this test uses a server process to keep track of who has * written and read what, and to verify that there are no messages from * the past / future. * - * In the callbacks for the version 2 cache, this activity was hidden in + * In the callbacks for the version 2 cache, this activity was hidden in * the load and flush callbacks. However, now we handle this function in * notify callbacks for the after load and after flush events. * - * JRM -- 1/13/15 + * JRM -- 1/13/15 */ const H5C_class_t types[NUMBER_OF_ENTRY_TYPES] = { @@ -473,9 +473,9 @@ static void pin_protected_entry(int32_t idx, hbool_t global); static void move_entry(H5F_t * file_ptr, int32_t old_idx, int32_t new_idx); static hbool_t reset_server_counts(void); static void resize_entry(int32_t idx, size_t new_size); -static hbool_t setup_cache_for_test(hid_t * fid_ptr, +static hbool_t setup_cache_for_test(hid_t * fid_ptr, H5F_t ** file_ptr_ptr, - H5C_t ** cache_ptr_ptr, + H5C_t ** cache_ptr_ptr, int metadata_write_strategy); static void setup_rand(void); static hbool_t take_down_cache(hid_t fid, H5C_t * cache_ptr); @@ -549,17 +549,17 @@ print_stats(void) /***************************************************************************** * - * Function: reset_stats() + * Function: reset_stats() * - * Purpose: Reset the rudementary stats maintained by t_cache. + * Purpose: Reset the rudementary stats maintained by t_cache. * - * Return: void + * Return: void * - * Programmer: JRM -- 4/17/06 + * Programmer: JRM -- 4/17/06 * * Modifications: * - * None. + * None. * *****************************************************************************/ @@ -572,9 +572,9 @@ reset_stats(void) datum_flushes = 0; datum_pinned_flushes = 0; datum_loads = 0; - global_pins = 0; - global_dirty_pins = 0; - local_pins = 0; + global_pins = 0; + global_dirty_pins = 0; + local_pins = 0; return; @@ -587,20 +587,20 @@ reset_stats(void) /***************************************************************************** * - * Function: set_up_file_communicator() + * Function: set_up_file_communicator() * - * Purpose: Create the MPI communicator used to open a HDF5 file with. - * In passing, also initialize the file_mpi... globals. + * Purpose: Create the MPI communicator used to open a HDF5 file with. + * In passing, also initialize the file_mpi... globals. * - * Return: Success: TRUE + * Return: Success: TRUE * - * Failure: FALSE + * Failure: FALSE * - * Programmer: JRM -- 11/16/05 + * Programmer: JRM -- 11/16/05 * * Modifications: * - * None. + * None. * *****************************************************************************/ @@ -622,7 +622,7 @@ set_up_file_communicator(void) nerrors++; success = FALSE; - if ( verbose ) { + if ( verbose ) { fprintf(stdout, "%d:%s: MPI_Comm_group() failed with error %d.\n", world_mpi_rank, FUNC, mpi_result); @@ -739,16 +739,16 @@ set_up_file_communicator(void) /***************************************************************************** * - * Function: addr_to_datum_index() + * Function: addr_to_datum_index() * - * Purpose: Given the base address of a datum, find and return its index - * in the data array. + * Purpose: Given the base address of a datum, find and return its index + * in the data array. * - * Return: Success: index of target datum. + * Return: Success: index of target datum. * - * Failure: -1. + * Failure: -1. * - * Programmer: JRM -- 12/20/05 + * Programmer: JRM -- 12/20/05 * *****************************************************************************/ static int @@ -786,16 +786,16 @@ addr_to_datum_index(haddr_t base_addr) /***************************************************************************** * - * Function: init_data() + * Function: init_data() * - * Purpose: Initialize the data array, from which cache entries are - * loaded. + * Purpose: Initialize the data array, from which cache entries are + * loaded. * - * Return: Success: TRUE + * Return: Success: TRUE * - * Failure: FALSE + * Failure: FALSE * - * Programmer: JRM -- 12/20/05 + * Programmer: JRM -- 12/20/05 * *****************************************************************************/ static void @@ -830,14 +830,14 @@ init_data(void) data[i].dirty = FALSE; data[i].valid = FALSE; data[i].locked = FALSE; - data[i].global_pinned = FALSE; - data[i].local_pinned = FALSE; - data[i].cleared = FALSE; + data[i].global_pinned = FALSE; + data[i].local_pinned = FALSE; + data[i].cleared = FALSE; data[i].flushed = FALSE; data[i].reads = 0; data[i].writes = 0; - data[i].index = i; - data[i].aux_ptr = NULL; + data[i].index = i; + data[i].aux_ptr = NULL; data_index[i] = i; @@ -861,22 +861,22 @@ init_data(void) /***************************************************************************** * - * Function: do_express_test() + * Function: do_express_test() * - * Purpose: Do an MPI_Allreduce to obtain the maximum value returned - * by GetTestExpress() across all processes. Return this - * value. + * Purpose: Do an MPI_Allreduce to obtain the maximum value returned + * by GetTestExpress() across all processes. Return this + * value. * - * Envirmoment variables can be different across different - * processes. This function ensures that all processes agree - * on whether to do an express test. + * Envirmoment variables can be different across different + * processes. This function ensures that all processes agree + * on whether to do an express test. * - * Return: Success: Maximum of the values returned by - * GetTestExpress() across all processes. + * Return: Success: Maximum of the values returned by + * GetTestExpress() across all processes. * - * Failure: -1 + * Failure: -1 * - * Programmer: JRM -- 4/25/06 + * Programmer: JRM -- 4/25/06 * *****************************************************************************/ static int @@ -912,19 +912,19 @@ do_express_test(void) /***************************************************************************** * - * Function: do_sync() + * Function: do_sync() * - * Purpose: Ensure that all messages sent by this process have been - * processed before proceeding. + * Purpose: Ensure that all messages sent by this process have been + * processed before proceeding. * - * Do this by exchanging sync req / sync ack messages with - * the server. + * Do this by exchanging sync req / sync ack messages with + * the server. * - * Do nothing if nerrors is greater than zero. + * Do nothing if nerrors is greater than zero. * - * Return: void + * Return: void * - * Programmer: JRM -- 5/10/06 + * Programmer: JRM -- 5/10/06 * *****************************************************************************/ static void @@ -936,7 +936,7 @@ do_sync(void) if ( nerrors <= 0 ) { /* compose the message */ - mssg.req = SYNC_REQ_CODE; + mssg.req = SYNC_REQ_CODE; mssg.src = world_mpi_rank; mssg.dest = world_server_mpi_rank; mssg.mssg_num = -1; /* set by send function */ @@ -946,10 +946,10 @@ do_sync(void) mssg.count = 0; mssg.magic = MSSG_MAGIC; - if ( ! send_mssg(&mssg, FALSE) ) { + if ( ! send_mssg(&mssg, FALSE) ) { - nerrors++; - if ( verbose ) { + nerrors++; + if ( verbose ) { HDfprintf(stdout, "%d:%s: send_mssg() failed.\n", world_mpi_rank, FUNC); } @@ -958,24 +958,24 @@ do_sync(void) if ( nerrors <= 0 ) { - if ( ! recv_mssg(&mssg, SYNC_ACK_CODE) ) { + if ( ! recv_mssg(&mssg, SYNC_ACK_CODE) ) { nerrors++; if ( verbose ) { HDfprintf(stdout, "%d:%s: recv_mssg() failed.\n", world_mpi_rank, FUNC); } - } else if ( ( mssg.req != SYNC_ACK_CODE ) || + } else if ( ( mssg.req != SYNC_ACK_CODE ) || ( mssg.src != world_server_mpi_rank ) || ( mssg.dest != world_mpi_rank ) || - ( mssg.magic != MSSG_MAGIC ) ) { + ( mssg.magic != MSSG_MAGIC ) ) { nerrors++; - if ( verbose ) { + if ( verbose ) { HDfprintf(stdout, "%d:%s: Bad data in sync ack.\n", world_mpi_rank, FUNC); } - } + } } return; @@ -985,17 +985,17 @@ do_sync(void) /***************************************************************************** * - * Function: get_max_nerrors() + * Function: get_max_nerrors() * - * Purpose: Do an MPI_Allreduce to obtain the maximum value of nerrors - * across all processes. Return this value. + * Purpose: Do an MPI_Allreduce to obtain the maximum value of nerrors + * across all processes. Return this value. * - * Return: Success: Maximum of the nerrors global variables across - * all processes. + * Return: Success: Maximum of the nerrors global variables across + * all processes. * - * Failure: -1 + * Failure: -1 * - * Programmer: JRM -- 1/3/06 + * Programmer: JRM -- 1/3/06 * *****************************************************************************/ static int @@ -1032,29 +1032,29 @@ get_max_nerrors(void) /***************************************************************************** * - * Function: recv_mssg() + * Function: recv_mssg() * - * Purpose: Receive a message from any process in the provided instance - * of struct mssg. + * Purpose: Receive a message from any process in the provided instance + * of struct mssg. * - * Return: Success: TRUE + * Return: Success: TRUE * - * Failure: FALSE + * Failure: FALSE * - * Programmer: JRM -- 12/22/05 + * Programmer: JRM -- 12/22/05 * * Modifications: * - * JRM -- 5/10/06 - * Added mssg_tag_offset parameter and supporting code. + * JRM -- 5/10/06 + * Added mssg_tag_offset parameter and supporting code. * *****************************************************************************/ -#define CACHE_TEST_TAG 99 /* different from any used by the library */ +#define CACHE_TEST_TAG 99 /* different from any used by the library */ static hbool_t recv_mssg(struct mssg_t *mssg_ptr, - int mssg_tag_offset) + int mssg_tag_offset) { hbool_t success = TRUE; int mssg_tag = CACHE_TEST_TAG; @@ -1116,28 +1116,28 @@ recv_mssg(struct mssg_t *mssg_ptr, /***************************************************************************** * - * Function: send_mssg() + * Function: send_mssg() * - * Purpose: Send the provided instance of mssg to the indicated target. + * Purpose: Send the provided instance of mssg to the indicated target. * - * Note that all source and destination ranks are in the - * global communicator. + * Note that all source and destination ranks are in the + * global communicator. * - * Return: Success: TRUE + * Return: Success: TRUE * - * Failure: FALSE + * Failure: FALSE * - * Programmer: JRM -- 12/22/05 + * Programmer: JRM -- 12/22/05 * * Modifications: * - * JRM -- 5/10/06 - * Added the add_req_to_tag parameter and supporting code. + * JRM -- 5/10/06 + * Added the add_req_to_tag parameter and supporting code. * *****************************************************************************/ static hbool_t send_mssg(struct mssg_t *mssg_ptr, - hbool_t add_req_to_tag) + hbool_t add_req_to_tag) { hbool_t success = TRUE; int mssg_tag = CACHE_TEST_TAG; @@ -1165,10 +1165,10 @@ send_mssg(struct mssg_t *mssg_ptr, mssg_ptr->mssg_num = mssg_num++; - if ( add_req_to_tag ) { + if ( add_req_to_tag ) { - mssg_tag += mssg_ptr->req; - } + mssg_tag += mssg_ptr->req; + } result = MPI_Send((void *)mssg_ptr, 1, mpi_mssg_t, mssg_ptr->dest, mssg_tag, world_mpi_comm); @@ -1188,19 +1188,19 @@ send_mssg(struct mssg_t *mssg_ptr, } /* send_mssg() */ - + /***************************************************************************** * - * Function: setup_derived_types() + * Function: setup_derived_types() * - * Purpose: Set up the derived types used by the test bed. At present, - * only the mpi_mssg derived type is needed. + * Purpose: Set up the derived types used by the test bed. At present, + * only the mpi_mssg derived type is needed. * - * Return: Success: TRUE + * Return: Success: TRUE * - * Failure: FALSE + * Failure: FALSE * - * Programmer: JRM -- 12/22/05 + * Programmer: JRM -- 12/22/05 * *****************************************************************************/ static hbool_t @@ -1277,19 +1277,19 @@ setup_derived_types(void) } /* setup_derived_types */ - + /***************************************************************************** * - * Function: takedown_derived_types() + * Function: takedown_derived_types() * - * Purpose: take down the derived types used by the test bed. At present, - * only the mpi_mssg derived type is needed. + * Purpose: take down the derived types used by the test bed. At present, + * only the mpi_mssg derived type is needed. * - * Return: Success: TRUE + * Return: Success: TRUE * - * Failure: FALSE + * Failure: FALSE * - * Programmer: JRM -- 12/22/05 + * Programmer: JRM -- 12/22/05 * *****************************************************************************/ static hbool_t @@ -1321,16 +1321,16 @@ takedown_derived_types(void) /***************************************************************************** * - * Function: reset_server_counters() + * Function: reset_server_counters() * - * Purpose: Reset the counters maintained by the server, doing a - * sanity check in passing. + * Purpose: Reset the counters maintained by the server, doing a + * sanity check in passing. * - * Return: Success: TRUE + * Return: Success: TRUE * - * Failure: FALSE + * Failure: FALSE * - * Programmer: JRM -- 5/5/10 + * Programmer: JRM -- 5/5/10 * *****************************************************************************/ static hbool_t @@ -1362,7 +1362,7 @@ reset_server_counters(void) nerrors++; if ( verbose ) { HDfprintf(stdout, "%d:%s: actual/total reads mismatch (%ld/%ld).\n", - world_mpi_rank, FUNC, + world_mpi_rank, FUNC, actual_total_reads, total_reads); } } @@ -1373,7 +1373,7 @@ reset_server_counters(void) nerrors++; if ( verbose ) { HDfprintf(stdout, "%d:%s: actual/total writes mismatch (%ld/%ld).\n", - world_mpi_rank, FUNC, + world_mpi_rank, FUNC, actual_total_writes, total_writes); } } @@ -1388,25 +1388,25 @@ reset_server_counters(void) /***************************************************************************** * - * Function: server_main() + * Function: server_main() * - * Purpose: Main function for the server process. This process exists - * to provide an independant view of the data array. + * Purpose: Main function for the server process. This process exists + * to provide an independant view of the data array. * - * The function handles request from the other processes in - * the test until the count of done messages received equals - * the number of client processes. + * The function handles request from the other processes in + * the test until the count of done messages received equals + * the number of client processes. * - * Return: Success: TRUE + * Return: Success: TRUE * - * Failure: FALSE + * Failure: FALSE * - * Programmer: JRM -- 12/22/05 + * Programmer: JRM -- 12/22/05 * * Modifications: * - * JRM -- 5/10/06 - * Updated for sync message. + * JRM -- 5/10/06 + * Updated for sync message. * *****************************************************************************/ static hbool_t @@ -1436,98 +1436,98 @@ server_main(void) switch ( mssg.req ) { - case WRITE_REQ_CODE: - success = serve_write_request(&mssg); - break; + case WRITE_REQ_CODE: + success = serve_write_request(&mssg); + break; - case WRITE_REQ_ACK_CODE: + case WRITE_REQ_ACK_CODE: success = FALSE; if(verbose) HDfprintf(stdout, "%s: Received write ack?!?.\n", FUNC); - break; + break; - case READ_REQ_CODE: + case READ_REQ_CODE: success = serve_read_request(&mssg); - break; + break; - case READ_REQ_REPLY_CODE: + case READ_REQ_REPLY_CODE: success = FALSE; if(verbose) HDfprintf(stdout, "%s: Received read req reply?!?.\n", FUNC); - break; + break; - case SYNC_REQ_CODE: + case SYNC_REQ_CODE: success = serve_sync_request(&mssg); - break; + break; - case SYNC_ACK_CODE: + case SYNC_ACK_CODE: success = FALSE; if(verbose) HDfprintf(stdout, "%s: Received sync ack?!?.\n", FUNC); - break; + break; - case REQ_TTL_WRITES_CODE: - success = serve_total_writes_request(&mssg); - break; + case REQ_TTL_WRITES_CODE: + success = serve_total_writes_request(&mssg); + break; - case REQ_TTL_WRITES_RPLY_CODE: + case REQ_TTL_WRITES_RPLY_CODE: success = FALSE; if(verbose) HDfprintf(stdout, "%s: Received total writes reply?!?.\n", FUNC); - break; + break; - case REQ_TTL_READS_CODE: - success = serve_total_reads_request(&mssg); - break; + case REQ_TTL_READS_CODE: + success = serve_total_reads_request(&mssg); + break; - case REQ_TTL_READS_RPLY_CODE: + case REQ_TTL_READS_RPLY_CODE: success = FALSE; if(verbose) HDfprintf(stdout, "%s: Received total reads reply?!?.\n", FUNC); - break; + break; - case REQ_ENTRY_WRITES_CODE: - success = serve_entry_writes_request(&mssg); - break; + case REQ_ENTRY_WRITES_CODE: + success = serve_entry_writes_request(&mssg); + break; - case REQ_ENTRY_WRITES_RPLY_CODE: + case REQ_ENTRY_WRITES_RPLY_CODE: success = FALSE; if(verbose) HDfprintf(stdout, "%s: Received entry writes reply?!?.\n", FUNC); - break; + break; - case REQ_ENTRY_READS_CODE: - success = serve_entry_reads_request(&mssg); - break; + case REQ_ENTRY_READS_CODE: + success = serve_entry_reads_request(&mssg); + break; - case REQ_ENTRY_READS_RPLY_CODE: + case REQ_ENTRY_READS_RPLY_CODE: success = FALSE; if(verbose) HDfprintf(stdout, "%s: Received entry reads reply?!?.\n", FUNC); - break; + break; - case REQ_RW_COUNT_RESET_CODE: - success = serve_rw_count_reset_request(&mssg); - break; + case REQ_RW_COUNT_RESET_CODE: + success = serve_rw_count_reset_request(&mssg); + break; - case REQ_RW_COUNT_RESET_RPLY_CODE: + case REQ_RW_COUNT_RESET_RPLY_CODE: success = FALSE; if(verbose) HDfprintf(stdout, "%s: Received RW count reset reply?!?.\n", FUNC); - break; + break; - case DONE_REQ_CODE: - done_count++; - if(done_count >= file_mpi_size) - done = TRUE; - break; + case DONE_REQ_CODE: + done_count++; + if(done_count >= file_mpi_size) + done = TRUE; + break; - default: + default: nerrors++; success = FALSE; if(verbose) - HDfprintf(stdout, "%d:%s: Unknown request code.\n", world_mpi_rank, FUNC); - break; + HDfprintf(stdout, "%d:%s: Unknown request code.\n", world_mpi_rank, FUNC); + break; } } } @@ -1536,23 +1536,23 @@ server_main(void) } /* server_main() */ - + /***************************************************************************** * - * Function: serve_read_request() + * Function: serve_read_request() * - * Purpose: Serve a read request. + * Purpose: Serve a read request. * - * The function accepts a pointer to an instance of struct - * mssg_t as input. If all sanity checks pass, it sends - * a copy of the indicated datum from the data array to - * the requesting process. + * The function accepts a pointer to an instance of struct + * mssg_t as input. If all sanity checks pass, it sends + * a copy of the indicated datum from the data array to + * the requesting process. * - * Return: Success: TRUE + * Return: Success: TRUE * - * Failure: FALSE + * Failure: FALSE * - * Programmer: JRM -- 12/22/05 + * Programmer: JRM -- 12/22/05 * *****************************************************************************/ static hbool_t @@ -1608,8 +1608,8 @@ serve_read_request(struct mssg_t * mssg_ptr) "%d:%s: proc %d read invalid entry. idx/base_addr = %d/%a.\n", world_mpi_rank, FUNC, mssg_ptr->src, - target_index, - data[target_index].base_addr); + target_index, + data[target_index].base_addr); } } else { @@ -1621,11 +1621,11 @@ serve_read_request(struct mssg_t * mssg_ptr) reply.base_addr = data[target_index].base_addr; reply.len = data[target_index].len; reply.ver = data[target_index].ver; - reply.count = 0; + reply.count = 0; reply.magic = MSSG_MAGIC; - /* and update the counters */ - total_reads++; + /* and update the counters */ + total_reads++; (data[target_index].reads)++; } } @@ -1640,7 +1640,7 @@ serve_read_request(struct mssg_t * mssg_ptr) if ( success ) { HDfprintf(stdout, "%d read 0x%llx. len = %d. ver = %d.\n", - (int)(mssg_ptr->src), + (int)(mssg_ptr->src), (long long)(data[target_index].base_addr), (int)(data[target_index].len), (int)(data[target_index].ver)); @@ -1648,38 +1648,38 @@ serve_read_request(struct mssg_t * mssg_ptr) } else { HDfprintf(stdout, "%d read 0x%llx FAILED. len = %d. ver = %d.\n", - (int)(mssg_ptr->src), + (int)(mssg_ptr->src), (long long)(data[target_index].base_addr), (int)(data[target_index].len), (int)(data[target_index].ver)); } - } + } return(success); } /* serve_read_request() */ - + /***************************************************************************** * - * Function: serve_sync_request() + * Function: serve_sync_request() * - * Purpose: Serve a sync request. + * Purpose: Serve a sync request. * - * The function accepts a pointer to an instance of struct - * mssg_t as input. If all sanity checks pass, it sends a - * sync ack to the requesting process. + * The function accepts a pointer to an instance of struct + * mssg_t as input. If all sanity checks pass, it sends a + * sync ack to the requesting process. * - * This service exist to allow the sending process to ensure - * that all previous messages have been processed before - * proceeding. + * This service exist to allow the sending process to ensure + * that all previous messages have been processed before + * proceeding. * - * Return: Success: TRUE + * Return: Success: TRUE * - * Failure: FALSE + * Failure: FALSE * - * Programmer: JRM -- 5/10/06 + * Programmer: JRM -- 5/10/06 * *****************************************************************************/ static hbool_t @@ -1711,7 +1711,7 @@ serve_sync_request(struct mssg_t * mssg_ptr) reply.base_addr = 0; reply.len = 0; reply.ver = 0; - reply.count = 0; + reply.count = 0; reply.magic = MSSG_MAGIC; } @@ -1731,29 +1731,29 @@ serve_sync_request(struct mssg_t * mssg_ptr) HDfprintf(stdout, "%d sync FAILED.\n", (int)(mssg_ptr->src)); } - } + } return(success); } /* serve_sync_request() */ - + /***************************************************************************** * - * Function: serve_write_request() + * Function: serve_write_request() * - * Purpose: Serve a write request. + * Purpose: Serve a write request. * - * The function accepts a pointer to an instance of struct - * mssg_t as input. If all sanity checks pass, it updates - * the version number of the target data array entry as - * specified in the message. + * The function accepts a pointer to an instance of struct + * mssg_t as input. If all sanity checks pass, it updates + * the version number of the target data array entry as + * specified in the message. * - * Return: Success: TRUE + * Return: Success: TRUE * - * Failure: FALSE + * Failure: FALSE * - * Programmer: JRM -- 12/21/05 + * Programmer: JRM -- 12/21/05 * *****************************************************************************/ static hbool_t @@ -1811,7 +1811,7 @@ serve_write_request(struct mssg_t * mssg_ptr) new_ver_num = mssg_ptr->ver; /* this check should catch duplicate writes */ - if ( new_ver_num <= data[target_index].ver ) { + if ( new_ver_num <= data[target_index].ver ) { nerrors++; success = FALSE; @@ -1825,12 +1825,12 @@ serve_write_request(struct mssg_t * mssg_ptr) if ( success ) { - /* process the write */ + /* process the write */ data[target_index].ver = new_ver_num; data[target_index].valid = TRUE; /* and update the counters */ - total_writes++; + total_writes++; (data[target_index].writes)++; #if DO_WRITE_REQ_ACK @@ -1846,7 +1846,7 @@ serve_write_request(struct mssg_t * mssg_ptr) reply.count = 0; reply.magic = MSSG_MAGIC; - /* and send it */ + /* and send it */ success = send_mssg(&reply, TRUE); #endif /* DO_WRITE_REQ_ACK */ @@ -1858,7 +1858,7 @@ serve_write_request(struct mssg_t * mssg_ptr) if ( success ) { HDfprintf(stdout, "%d write 0x%llx. len = %d. ver = %d.\n", - (int)(mssg_ptr->src), + (int)(mssg_ptr->src), (long long)(data[target_index].base_addr), (int)(data[target_index].len), (int)(data[target_index].ver)); @@ -1866,36 +1866,36 @@ serve_write_request(struct mssg_t * mssg_ptr) } else { HDfprintf(stdout, "%d write 0x%llx FAILED. len = %d. ver = %d.\n", - (int)(mssg_ptr->src), + (int)(mssg_ptr->src), (long long)(data[target_index].base_addr), (int)(data[target_index].len), (int)(data[target_index].ver)); } - } + } return(success); } /* serve_write_request() */ - + /***************************************************************************** * - * Function: serve_total_writes_request() + * Function: serve_total_writes_request() * - * Purpose: Serve a request for the total number of writes recorded since - * the last reset. + * Purpose: Serve a request for the total number of writes recorded since + * the last reset. * - * The function accepts a pointer to an instance of struct - * mssg_t as input. If all sanity checks pass, it sends - * the current value of the total_writes global variable to - * the requesting process. + * The function accepts a pointer to an instance of struct + * mssg_t as input. If all sanity checks pass, it sends + * the current value of the total_writes global variable to + * the requesting process. * - * Return: Success: TRUE + * Return: Success: TRUE * - * Failure: FALSE + * Failure: FALSE * - * Programmer: JRM -- 5/5/10 + * Programmer: JRM -- 5/5/10 * *****************************************************************************/ static hbool_t @@ -1941,40 +1941,40 @@ serve_total_writes_request(struct mssg_t * mssg_ptr) if ( success ) { HDfprintf(stdout, "%d request total writes %ld.\n", - (int)(mssg_ptr->src), + (int)(mssg_ptr->src), total_writes); } else { HDfprintf(stdout, "%d request total writes %ld -- FAILED.\n", - (int)(mssg_ptr->src), + (int)(mssg_ptr->src), total_writes); } - } + } return(success); } /* serve_total_writes_request() */ - + /***************************************************************************** * - * Function: serve_total_reads_request() + * Function: serve_total_reads_request() * - * Purpose: Serve a request for the total number of reads recorded since - * the last reset. + * Purpose: Serve a request for the total number of reads recorded since + * the last reset. * - * The function accepts a pointer to an instance of struct - * mssg_t as input. If all sanity checks pass, it sends - * the current value of the total_reads global variable to - * the requesting process. + * The function accepts a pointer to an instance of struct + * mssg_t as input. If all sanity checks pass, it sends + * the current value of the total_reads global variable to + * the requesting process. * - * Return: Success: TRUE + * Return: Success: TRUE * - * Failure: FALSE + * Failure: FALSE * - * Programmer: JRM -- 5/5/10 + * Programmer: JRM -- 5/5/10 * *****************************************************************************/ static hbool_t @@ -2020,40 +2020,40 @@ serve_total_reads_request(struct mssg_t * mssg_ptr) if ( success ) { HDfprintf(stdout, "%d request total reads %ld.\n", - (int)(mssg_ptr->src), + (int)(mssg_ptr->src), total_reads); } else { HDfprintf(stdout, "%d request total reads %ld -- FAILED.\n", - (int)(mssg_ptr->src), + (int)(mssg_ptr->src), total_reads); } - } + } return(success); } /* serve_total_reads_request() */ - + /***************************************************************************** * - * Function: serve_entry_writes_request() + * Function: serve_entry_writes_request() * - * Purpose: Serve an entry writes request. + * Purpose: Serve an entry writes request. * - * The function accepts a pointer to an instance of struct - * mssg_t as input. If all sanity checks pass, it sends - * the number of times that the indicated datum has been - * written since the last counter reset to the requesting - * process. + * The function accepts a pointer to an instance of struct + * mssg_t as input. If all sanity checks pass, it sends + * the number of times that the indicated datum has been + * written since the last counter reset to the requesting + * process. * - * Return: Success: TRUE + * Return: Success: TRUE * - * Failure: FALSE + * Failure: FALSE * - * Programmer: JRM -- 5/5/10 + * Programmer: JRM -- 5/5/10 * *****************************************************************************/ static hbool_t @@ -2100,7 +2100,7 @@ serve_entry_writes_request(struct mssg_t * mssg_ptr) reply.base_addr = target_addr; reply.len = 0; reply.ver = 0; - reply.count = data[target_index].writes; + reply.count = data[target_index].writes; reply.magic = MSSG_MAGIC; } } @@ -2115,42 +2115,42 @@ serve_entry_writes_request(struct mssg_t * mssg_ptr) if ( success ) { HDfprintf(stdout, "%d request entry 0x%llx writes = %ld.\n", - (int)(mssg_ptr->src), + (int)(mssg_ptr->src), (long long)(data[target_index].base_addr), (long)(data[target_index].writes)); } else { HDfprintf(stdout, "%d request entry 0x%llx writes = %ld FAILED.\n", - (int)(mssg_ptr->src), + (int)(mssg_ptr->src), (long long)(data[target_index].base_addr), (long)(data[target_index].writes)); } - } + } return(success); } /* serve_entry_writes_request() */ - + /***************************************************************************** * - * Function: serve_entry_reads_request() + * Function: serve_entry_reads_request() * - * Purpose: Serve an entry reads request. + * Purpose: Serve an entry reads request. * - * The function accepts a pointer to an instance of struct - * mssg_t as input. If all sanity checks pass, it sends - * the number of times that the indicated datum has been - * read since the last counter reset to the requesting - * process. + * The function accepts a pointer to an instance of struct + * mssg_t as input. If all sanity checks pass, it sends + * the number of times that the indicated datum has been + * read since the last counter reset to the requesting + * process. * - * Return: Success: TRUE + * Return: Success: TRUE * - * Failure: FALSE + * Failure: FALSE * - * Programmer: JRM -- 5/5/10 + * Programmer: JRM -- 5/5/10 * *****************************************************************************/ static hbool_t @@ -2197,7 +2197,7 @@ serve_entry_reads_request(struct mssg_t * mssg_ptr) reply.base_addr = target_addr; reply.len = 0; reply.ver = 0; - reply.count = (long)(data[target_index].reads); + reply.count = (long)(data[target_index].reads); reply.magic = MSSG_MAGIC; } } @@ -2212,41 +2212,41 @@ serve_entry_reads_request(struct mssg_t * mssg_ptr) if ( success ) { HDfprintf(stdout, "%d request entry 0x%llx reads = %ld.\n", - (int)(mssg_ptr->src), + (int)(mssg_ptr->src), (long long)(data[target_index].base_addr), (long)(data[target_index].reads)); } else { HDfprintf(stdout, "%d request entry 0x%llx reads = %ld FAILED.\n", - (int)(mssg_ptr->src), + (int)(mssg_ptr->src), (long long)(data[target_index].base_addr), (long)(data[target_index].reads)); } - } + } return(success); } /* serve_entry_reads_request() */ - + /***************************************************************************** * - * Function: serve_rw_count_reset_request() + * Function: serve_rw_count_reset_request() * - * Purpose: Serve read/write count reset request. + * Purpose: Serve read/write count reset request. * - * The function accepts a pointer to an instance of struct - * mssg_t as input. If all sanity checks pass, it resets the - * read/write counters, and sends a confirmation message to - * the calling process. + * The function accepts a pointer to an instance of struct + * mssg_t as input. If all sanity checks pass, it resets the + * read/write counters, and sends a confirmation message to + * the calling process. * - * Return: Success: TRUE + * Return: Success: TRUE * - * Failure: FALSE + * Failure: FALSE * - * Programmer: JRM -- 5/5/10 + * Programmer: JRM -- 5/5/10 * *****************************************************************************/ static hbool_t @@ -2271,7 +2271,7 @@ serve_rw_count_reset_request(struct mssg_t * mssg_ptr) if ( success ) { success = reset_server_counters(); - } + } if ( success ) { @@ -2305,7 +2305,7 @@ serve_rw_count_reset_request(struct mssg_t * mssg_ptr) (int)(mssg_ptr->src)); } - } + } return(success); @@ -2316,15 +2316,15 @@ serve_rw_count_reset_request(struct mssg_t * mssg_ptr) /**************************** Call back functions ****************************/ /*****************************************************************************/ - + /*------------------------------------------------------------------------- - * Function: datum_get_initial_load_size + * Function: datum_get_initial_load_size * - * Purpose: Query the image size for an entry before deserializing it + * Purpose: Query the image size for an entry before deserializing it * - * Return: SUCCEED + * Return: SUCCEED * - * Programmer: Quincey Koziol + * Programmer: Quincey Koziol * 5/18/10 * *------------------------------------------------------------------------- @@ -2354,9 +2354,9 @@ datum_get_initial_load_size(void *udata_ptr, size_t *image_len_ptr) if ( callbacks_verbose ) { HDfprintf(stdout, - "%d: get_initial_load_size() idx = %d, addr = %ld, len = %d.\n", + "%d: get_initial_load_size() idx = %d, addr = %ld, len = %d.\n", world_mpi_rank, idx, (long)addr, (int)entry_ptr->local_len); - fflush(stdout); + fflush(stdout); } /* Set image length size */ @@ -2365,15 +2365,15 @@ datum_get_initial_load_size(void *udata_ptr, size_t *image_len_ptr) return(SUCCEED); } /* get_initial_load_size() */ - + /*------------------------------------------------------------------------- - * Function: datum_deserialize + * Function: datum_deserialize * - * Purpose: deserialize the entry. + * Purpose: deserialize the entry. * - * Return: void * (pointer to the in core representation of the entry) + * Return: void * (pointer to the in core representation of the entry) * - * Programmer: John Mainzer + * Programmer: John Mainzer * 9/20/07 * *------------------------------------------------------------------------- @@ -2408,10 +2408,10 @@ datum_deserialize(const void * image_ptr, if ( callbacks_verbose ) { HDfprintf(stdout, - "%d: deserialize() idx = %d, addr = %ld, len = %d, is_dirty = %d.\n", - world_mpi_rank, idx, (long)addr, (int)len, - (int)(entry_ptr->header.is_dirty)); - fflush(stdout); + "%d: deserialize() idx = %d, addr = %ld, len = %d, is_dirty = %d.\n", + world_mpi_rank, idx, (long)addr, (int)len, + (int)(entry_ptr->header.is_dirty)); + fflush(stdout); } *dirty_ptr = FALSE; @@ -2426,18 +2426,18 @@ datum_deserialize(const void * image_ptr, } /* deserialize() */ - + /*------------------------------------------------------------------------- - * Function: datum_image_len + * Function: datum_image_len * - * Purpose: Return the real (and possibly reduced) length of the image. - * The helper functions verify that the correct version of - * deserialize is being called, and then call deserialize - * proper. + * Purpose: Return the real (and possibly reduced) length of the image. + * The helper functions verify that the correct version of + * deserialize is being called, and then call deserialize + * proper. * - * Return: SUCCEED + * Return: SUCCEED * - * Programmer: John Mainzer + * Programmer: John Mainzer * 9/19/07 * *------------------------------------------------------------------------- @@ -2464,10 +2464,10 @@ datum_image_len(const void *thing, size_t *image_len) if(callbacks_verbose) { HDfprintf(stdout, - "%d: image_len() idx = %d, addr = %ld, len = %d.\n", - world_mpi_rank, idx, (long)(entry_ptr->base_addr), - (int)(entry_ptr->local_len)); - fflush(stdout); + "%d: image_len() idx = %d, addr = %ld, len = %d.\n", + world_mpi_rank, idx, (long)(entry_ptr->base_addr), + (int)(entry_ptr->local_len)); + fflush(stdout); } HDassert( entry_ptr->header.addr == entry_ptr->base_addr ); @@ -2477,15 +2477,15 @@ datum_image_len(const void *thing, size_t *image_len) return(SUCCEED); } /* datum_image_len() */ - + /*------------------------------------------------------------------------- - * Function: datum_serialize + * Function: datum_serialize * - * Purpose: Serialize the supplied entry. + * Purpose: Serialize the supplied entry. * - * Return: SUCCEED if successful, FAIL otherwise. + * Return: SUCCEED if successful, FAIL otherwise. * - * Programmer: John Mainzer + * Programmer: John Mainzer * 10/30/07 * *------------------------------------------------------------------------- @@ -2510,11 +2510,11 @@ datum_serialize(const H5F_t *f, HDassert( f ); HDassert( f->shared ); HDassert( f->shared->cache ); - + cache_ptr = f->shared->cache; HDassert( cache_ptr->magic == H5C__H5C_T_MAGIC ); - HDassert( cache_ptr->aux_ptr ); + HDassert( cache_ptr->aux_ptr ); aux_ptr = (H5AC_aux_t *)(f->shared->cache->aux_ptr); @@ -2533,9 +2533,9 @@ datum_serialize(const H5F_t *f, if ( callbacks_verbose ) { HDfprintf(stdout, - "%d: serialize() idx = %d, addr = %ld, len = %d.\n", - world_mpi_rank, idx, (long)entry_ptr->header.addr, (int)len); - fflush(stdout); + "%d: serialize() idx = %d, addr = %ld, len = %d.\n", + world_mpi_rank, idx, (long)entry_ptr->header.addr, (int)len); + fflush(stdout); } HDassert( entry_ptr->header.addr == entry_ptr->base_addr ); @@ -2556,16 +2556,16 @@ datum_serialize(const H5F_t *f, } /* datum_serialize() */ - + /*------------------------------------------------------------------------- - * Function: datum_notify + * Function: datum_notify * - * Purpose: Do the communication with the server we used to do in the - * flush and load callbacks in the version 2 cache. + * Purpose: Do the communication with the server we used to do in the + * flush and load callbacks in the version 2 cache. * - * Return: SUCCEED + * Return: SUCCEED * - * Programmer: John Mainzer + * Programmer: John Mainzer * 1/12/15 * *------------------------------------------------------------------------- @@ -2595,7 +2595,7 @@ datum_notify(H5C_notify_action_t action, void *thing) HDfprintf(stdout, "%d: notify() action = %d, idx = %d, addr = %ld.\n", - world_mpi_rank, (int) action, idx, + world_mpi_rank, (int) action, idx, (long)entry_ptr->header.addr); fflush(stdout); } @@ -2684,62 +2684,62 @@ datum_notify(H5C_notify_action_t action, void *thing) } #if 0 /* This has been useful debugging code -- keep it for now. */ - if ( mssg.req != READ_REQ_REPLY_CODE ) { + if ( mssg.req != READ_REQ_REPLY_CODE ) { - HDfprintf(stdout, + HDfprintf(stdout, "%d:%s: mssg.req != READ_REQ_REPLY_CODE.\n", - world_mpi_rank, FUNC); - HDfprintf(stdout, "%d:%s: mssg.req = %d.\n", - world_mpi_rank, FUNC, (int)(mssg.req)); - } + world_mpi_rank, FUNC); + HDfprintf(stdout, "%d:%s: mssg.req = %d.\n", + world_mpi_rank, FUNC, (int)(mssg.req)); + } - if ( mssg.src != world_server_mpi_rank ) { + if ( mssg.src != world_server_mpi_rank ) { - HDfprintf(stdout, + HDfprintf(stdout, "%d:%s: mssg.src != world_server_mpi_rank.\n", - world_mpi_rank, FUNC); - } + world_mpi_rank, FUNC); + } - if ( mssg.dest != world_mpi_rank ) { + if ( mssg.dest != world_mpi_rank ) { - HDfprintf(stdout, + HDfprintf(stdout, "%d:%s: mssg.dest != world_mpi_rank.\n", - world_mpi_rank, FUNC); + world_mpi_rank, FUNC); } - if ( mssg.base_addr != entry_ptr->base_addr ) { + if ( mssg.base_addr != entry_ptr->base_addr ) { - 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", - world_mpi_rank, FUNC, mssg.base_addr); - HDfprintf(stdout, + 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", + world_mpi_rank, FUNC, mssg.base_addr); + HDfprintf(stdout, "%d:%s: entry_ptr->base_addr = %a.\n", - world_mpi_rank, FUNC, + world_mpi_rank, FUNC, entry_ptr->base_addr); } - if ( mssg.len != entry_ptr->len ) { + if ( mssg.len != entry_ptr->len ) { - HDfprintf(stdout, + HDfprintf(stdout, "%d:%s: mssg.len != entry_ptr->len.\n", - world_mpi_rank, FUNC); - HDfprintf(stdout, "%d:%s: mssg.len = %a.\n", - world_mpi_rank, FUNC, mssg.len); + world_mpi_rank, FUNC); + HDfprintf(stdout, "%d:%s: mssg.len = %a.\n", + world_mpi_rank, FUNC, mssg.len); } - if ( mssg.ver < entry_ptr->ver ) { + if ( mssg.ver < entry_ptr->ver ) { - HDfprintf(stdout, + HDfprintf(stdout, "%d:%s: mssg.ver < entry_ptr->ver.\n", - world_mpi_rank, FUNC); + world_mpi_rank, FUNC); } - if ( mssg.magic != MSSG_MAGIC ) { + if ( mssg.magic != MSSG_MAGIC ) { - HDfprintf(stdout, "%d:%s: mssg.magic != MSSG_MAGIC.\n", - world_mpi_rank, FUNC); + HDfprintf(stdout, "%d:%s: mssg.magic != MSSG_MAGIC.\n", + world_mpi_rank, FUNC); } #endif /* JRM */ @@ -2752,7 +2752,7 @@ datum_notify(H5C_notify_action_t action, void *thing) } break; - case H5C_NOTIFY_ACTION_AFTER_FLUSH: + case H5C_NOTIFY_ACTION_AFTER_FLUSH: if ( callbacks_verbose ) { HDfprintf(stdout, @@ -2766,11 +2766,11 @@ datum_notify(H5C_notify_action_t action, void *thing) aux_ptr = entry_ptr->aux_ptr; entry_ptr->aux_ptr = NULL; - HDassert(entry_ptr->header.is_dirty); /* JRM */ + HDassert(entry_ptr->header.is_dirty); /* JRM */ - if ( ( file_mpi_rank != 0 ) && + if ( ( file_mpi_rank != 0 ) && ( entry_ptr->dirty ) && - ( aux_ptr->metadata_write_strategy == + ( aux_ptr->metadata_write_strategy == H5AC_METADATA_WRITE_STRATEGY__PROCESS_0_ONLY ) ) { ret_value = FAIL; @@ -2783,8 +2783,8 @@ datum_notify(H5C_notify_action_t action, void *thing) if ( entry_ptr->header.is_dirty ) { - was_dirty = TRUE; /* so we will receive the ack - * if requested + was_dirty = TRUE; /* so we will receive the ack + * if requested */ /* compose the message */ @@ -2810,7 +2810,7 @@ datum_notify(H5C_notify_action_t action, void *thing) else { entry_ptr->dirty = FALSE; - entry_ptr->flushed = TRUE; + entry_ptr->flushed = TRUE; } } } @@ -2838,7 +2838,7 @@ datum_notify(H5C_notify_action_t action, void *thing) nerrors++; ret_value = FAIL; if ( verbose ) { - HDfprintf(stdout, + HDfprintf(stdout, "%d:%s: Bad data in write req ack.\n", world_mpi_rank, FUNC); } @@ -2854,7 +2854,7 @@ datum_notify(H5C_notify_action_t action, void *thing) datum_pinned_flushes++; HDassert(entry_ptr->global_pinned || entry_ptr->local_pinned); } - break; + break; case H5AC_NOTIFY_ACTION_BEFORE_EVICT: if ( callbacks_verbose ) { @@ -2949,33 +2949,33 @@ datum_notify(H5C_notify_action_t action, void *thing) /* do nothing */ break; - default: + default: nerrors++; ret_value = FAIL; if ( verbose ) { HDfprintf(stdout, "%d:%s: Unknown notify action.\n", world_mpi_rank, FUNC); } - break; + break; } return(ret_value); } /* datum_notify() */ - + /*------------------------------------------------------------------------- - * Function: datum_free_icr + * Function: datum_free_icr * - * Purpose: Nominally, this callback is supposed to free the - * in core representation of the entry. + * Purpose: Nominally, this callback is supposed to free the + * in core representation of the entry. * - * In the context of this test bed, we use it to do - * do all the processing we used to do on a destroy. + * In the context of this test bed, we use it to do + * do all the processing we used to do on a destroy. * - * Return: SUCCEED + * Return: SUCCEED * - * Programmer: John Mainzer + * Programmer: John Mainzer * 9/19/07 * *------------------------------------------------------------------------- @@ -3000,9 +3000,9 @@ datum_free_icr(void * thing) if ( callbacks_verbose ) { HDfprintf(stdout, - "%d: free_icr() idx = %d, dirty = %d.\n", - world_mpi_rank, idx, (int)(entry_ptr->dirty)); - fflush(stdout); + "%d: free_icr() idx = %d, dirty = %d.\n", + world_mpi_rank, idx, (int)(entry_ptr->dirty)); + fflush(stdout); } HDassert( entry_ptr->header.addr == entry_ptr->base_addr ); @@ -3019,7 +3019,7 @@ datum_free_icr(void * thing) return(SUCCEED); } /* datum_free_icr() */ - + /*****************************************************************************/ /************************** test utility functions ***************************/ /*****************************************************************************/ @@ -3028,9 +3028,9 @@ datum_free_icr(void * thing) * Function: expunge_entry() * * Purpose: Expunge the entry indicated by the type and index, mark it - * as clean, and don't increment its version number. + * as clean, and don't increment its version number. * - * Do nothing if nerrors is non-zero on entry. + * Do nothing if nerrors is non-zero on entry. * * Return: void * @@ -3061,36 +3061,36 @@ expunge_entry(H5F_t * file_ptr, if ( nerrors == 0 ) { result = H5AC_expunge_entry(file_ptr, (hid_t)-1, &(types[0]), - entry_ptr->header.addr, H5AC__NO_FLAGS_SET); + entry_ptr->header.addr, H5AC__NO_FLAGS_SET); if ( result < 0 ) { nerrors++; if ( verbose ) { - HDfprintf(stdout, "%d:%s: Error in H5AC_expunge_entry().\n", - world_mpi_rank, FUNC); + HDfprintf(stdout, "%d:%s: Error in H5AC_expunge_entry().\n", + world_mpi_rank, FUNC); } } HDassert( ((entry_ptr->header).type)->id == DATUM_ENTRY_TYPE ); - HDassert( ! ((entry_ptr->header).is_dirty) ); + HDassert( ! ((entry_ptr->header).is_dirty) ); - result = H5C_get_entry_status(file_ptr, entry_ptr->base_addr, - NULL, &in_cache, NULL, NULL, NULL, NULL, NULL, NULL, NULL); + result = H5C_get_entry_status(file_ptr, entry_ptr->base_addr, + NULL, &in_cache, NULL, NULL, NULL, NULL, NULL, NULL, NULL); - if ( result < 0 ) { + if ( result < 0 ) { nerrors++; if ( verbose ) { - HDfprintf(stdout, "%d:%s: Error in H5C_get_entry_status().\n", - world_mpi_rank, FUNC); + HDfprintf(stdout, "%d:%s: Error in H5C_get_entry_status().\n", + world_mpi_rank, FUNC); } } else if ( in_cache ) { nerrors++; if ( verbose ) { - HDfprintf(stdout, "%d:%s: Expunged entry still in cache?!?\n", - world_mpi_rank, FUNC); + HDfprintf(stdout, "%d:%s: Expunged entry still in cache?!?\n", + world_mpi_rank, FUNC); } } } @@ -3099,14 +3099,14 @@ expunge_entry(H5F_t * file_ptr, } /* expunge_entry() */ - + /***************************************************************************** * Function: insert_entry() * * Purpose: Insert the entry indicated by the type and index, mark it - * as dirty, and increment its version number. + * as dirty, and increment its version number. * - * Do nothing if nerrors is non-zero on entry. + * Do nothing if nerrors is non-zero on entry. * * Return: void * @@ -3157,33 +3157,33 @@ insert_entry(H5C_t * cache_ptr, nerrors++; if ( verbose ) { - HDfprintf(stdout, "%d:%s: Error in H5AC_insert_entry().\n", - world_mpi_rank, FUNC); + HDfprintf(stdout, "%d:%s: Error in H5AC_insert_entry().\n", + world_mpi_rank, FUNC); } } if ( ! (entry_ptr->header.is_dirty) ) { - /* it is possible that we just exceeded the dirty bytes - * threshold, triggering a write of the newly inserted - * entry. Test for this, and only flag an error if this - * is not the case. - */ + /* it is possible that we just exceeded the dirty bytes + * threshold, triggering a write of the newly inserted + * entry. Test for this, and only flag an error if this + * is not the case. + */ - struct H5AC_aux_t * aux_ptr; + struct H5AC_aux_t * aux_ptr; - aux_ptr = ((H5AC_aux_t *)(cache_ptr->aux_ptr)); + aux_ptr = ((H5AC_aux_t *)(cache_ptr->aux_ptr)); - if ( ! ( ( aux_ptr != NULL ) && - ( aux_ptr->magic == H5AC__H5AC_AUX_T_MAGIC ) && - ( aux_ptr->dirty_bytes == 0 ) ) ) { + if ( ! ( ( aux_ptr != NULL ) && + ( aux_ptr->magic == H5AC__H5AC_AUX_T_MAGIC ) && + ( aux_ptr->dirty_bytes == 0 ) ) ) { nerrors++; if ( verbose ) { - HDfprintf(stdout, "%d:%s: data[%d].header.is_dirty = %d.\n", - world_mpi_rank, FUNC, idx, + HDfprintf(stdout, "%d:%s: data[%d].header.is_dirty = %d.\n", + world_mpi_rank, FUNC, idx, (int)(data[idx].header.is_dirty)); - } + } } } @@ -3191,7 +3191,7 @@ insert_entry(H5C_t * cache_ptr, HDassert( entry_ptr->header.is_pinned ); entry_ptr->global_pinned = TRUE; - global_pins++; + global_pins++; } else { @@ -3208,7 +3208,7 @@ insert_entry(H5C_t * cache_ptr, } /* insert_entry() */ - + /***************************************************************************** * Function: local_pin_and_unpin_random_entries() * @@ -3227,8 +3227,8 @@ static void local_pin_and_unpin_random_entries(H5F_t * file_ptr, int min_idx, int max_idx, - int min_count, - int max_count) + int min_count, + int max_count) { if ( nerrors == 0 ) { @@ -3243,40 +3243,40 @@ local_pin_and_unpin_random_entries(H5F_t * file_ptr, HDassert( min_idx < max_idx ); HDassert( max_idx < NUM_DATA_ENTRIES ); HDassert( max_idx < virt_num_data_entries ); - HDassert( 0 <= min_count ); - HDassert( min_count < max_count ); + HDassert( 0 <= min_count ); + HDassert( min_count < max_count ); - count = (HDrand() % (max_count - min_count)) + min_count; + count = (HDrand() % (max_count - min_count)) + min_count; - HDassert( min_count <= count ); - HDassert( count <= max_count ); + HDassert( min_count <= count ); + HDassert( count <= max_count ); - for ( i = 0; i < count; i++ ) - { + for ( i = 0; i < count; i++ ) + { local_pin_random_entry(file_ptr, min_idx, max_idx); - } + } - count = (HDrand() % (max_count - min_count)) + min_count; + count = (HDrand() % (max_count - min_count)) + min_count; - HDassert( min_count <= count ); - HDassert( count <= max_count ); + HDassert( min_count <= count ); + HDassert( count <= max_count ); i = 0; - idx = 0; + idx = 0; - while ( ( i < count ) && ( idx >= 0 ) ) - { - via_unprotect = ( (((unsigned)i) & 0x0001) == 0 ); - idx = local_unpin_next_pinned_entry(file_ptr, idx, via_unprotect); - i++; - } + while ( ( i < count ) && ( idx >= 0 ) ) + { + via_unprotect = ( (((unsigned)i) & 0x0001) == 0 ); + idx = local_unpin_next_pinned_entry(file_ptr, idx, via_unprotect); + i++; + } } return; } /* local_pin_and_unpin_random_entries() */ - + /***************************************************************************** * Function: local_pin_random_entry() * @@ -3308,13 +3308,13 @@ local_pin_random_entry(H5F_t * file_ptr, HDassert( max_idx < NUM_DATA_ENTRIES ); HDassert( max_idx < virt_num_data_entries ); - do - { - idx = (HDrand() % (max_idx - min_idx)) + min_idx; + do + { + idx = (HDrand() % (max_idx - min_idx)) + min_idx; HDassert( min_idx <= idx ); HDassert( idx <= max_idx ); - } - while ( data[idx].global_pinned || data[idx].local_pinned ); + } + while ( data[idx].global_pinned || data[idx].local_pinned ); pin_entry(file_ptr, idx, FALSE, FALSE); } @@ -3323,7 +3323,7 @@ local_pin_random_entry(H5F_t * file_ptr, } /* local_pin_random_entry() */ - + /***************************************************************************** * Function: local_unpin_all_entries() * @@ -3339,7 +3339,7 @@ local_pin_random_entry(H5F_t * file_ptr, *****************************************************************************/ static void local_unpin_all_entries(H5F_t * file_ptr, - hbool_t via_unprotect) + hbool_t via_unprotect) { if ( nerrors == 0 ) { @@ -3348,25 +3348,25 @@ local_unpin_all_entries(H5F_t * file_ptr, HDassert( file_ptr ); - idx = 0; + idx = 0; - while ( idx >= 0 ) - { - idx = local_unpin_next_pinned_entry(file_ptr, - idx, via_unprotect); - } + while ( idx >= 0 ) + { + idx = local_unpin_next_pinned_entry(file_ptr, + idx, via_unprotect); + } } return; } /* local_unpin_all_entries() */ - + /***************************************************************************** * Function: local_unpin_next_pinned_entry() * * Purpose: Find the next locally pinned entry after the specified - * starting point, and unpin it. + * starting point, and unpin it. * * Do nothing if nerrors is non-zero on entry. * @@ -3381,7 +3381,7 @@ local_unpin_all_entries(H5F_t * file_ptr, static int local_unpin_next_pinned_entry(H5F_t * file_ptr, int start_idx, - hbool_t via_unprotect) + hbool_t via_unprotect) { int i = 0; int idx = -1; @@ -3393,39 +3393,39 @@ local_unpin_next_pinned_entry(H5F_t * file_ptr, HDassert( start_idx < NUM_DATA_ENTRIES ); HDassert( start_idx < virt_num_data_entries ); - idx = start_idx; + idx = start_idx; - while ( ( i < virt_num_data_entries ) && - ( ! ( data[idx].local_pinned ) ) ) - { - i++; - idx++; - if ( idx >= virt_num_data_entries ) { - idx = 0; - } - } + while ( ( i < virt_num_data_entries ) && + ( ! ( data[idx].local_pinned ) ) ) + { + i++; + idx++; + if ( idx >= virt_num_data_entries ) { + idx = 0; + } + } - if ( data[idx].local_pinned ) { + if ( data[idx].local_pinned ) { - unpin_entry(file_ptr, idx, FALSE, FALSE, via_unprotect); + unpin_entry(file_ptr, idx, FALSE, FALSE, via_unprotect); - } else { + } else { - idx = -1; - } + idx = -1; + } } return(idx); } /* local_unpin_next_pinned_entry() */ - + /***************************************************************************** * Function: lock_and_unlock_random_entries() * * Purpose: Obtain a random number in the closed interval [min_count, - * max_count]. Then protect and unprotect that number of - * random entries. + * max_count]. Then protect and unprotect that number of + * random entries. * * Do nothing if nerrors is non-zero on entry. * @@ -3466,12 +3466,12 @@ lock_and_unlock_random_entries(H5F_t * file_ptr, } /* lock_and_unlock_random_entries() */ - + /***************************************************************************** * Function: lock_and_unlock_random_entry() * * Purpose: Protect and then unprotect a random entry with index in - * the data[] array in the close interval [min_idx, max_idx]. + * the data[] array in the close interval [min_idx, max_idx]. * * Do nothing if nerrors is non-zero on entry. * @@ -3501,15 +3501,15 @@ lock_and_unlock_random_entry(H5F_t * file_ptr, HDassert( min_idx <= idx ); HDassert( idx <= max_idx ); - lock_entry(file_ptr, idx); - unlock_entry(file_ptr, idx, H5AC__NO_FLAGS_SET); + lock_entry(file_ptr, idx); + unlock_entry(file_ptr, idx, H5AC__NO_FLAGS_SET); } return; } /* lock_and_unlock_random_entry() */ - + /***************************************************************************** * Function: lock_entry() * @@ -3524,9 +3524,9 @@ lock_and_unlock_random_entry(H5F_t * file_ptr, * * Modifications: * - * JRM -- 7/11/06 - * Modified asserts to handle the new local_len field in - * datum. + * JRM -- 7/11/06 + * Modified asserts to handle the new local_len field in + * datum. * *****************************************************************************/ static void @@ -3543,30 +3543,30 @@ lock_entry(H5F_t * file_ptr, entry_ptr = &(data[idx]); - HDassert( ! (entry_ptr->locked) ); + HDassert( ! (entry_ptr->locked) ); - cache_entry_ptr = (H5C_cache_entry_t *)H5AC_protect(file_ptr, + cache_entry_ptr = (H5C_cache_entry_t *)H5AC_protect(file_ptr, H5AC_ind_read_dxpl_id, &(types[0]), entry_ptr->base_addr, - &entry_ptr->base_addr, + &entry_ptr->base_addr, H5AC__NO_FLAGS_SET); if ( ( cache_entry_ptr != (void *)(&(entry_ptr->header)) ) || ( entry_ptr->header.type != &(types[0]) ) || ( ( entry_ptr->len != entry_ptr->header.size ) && - ( entry_ptr->local_len != entry_ptr->header.size ) ) || + ( entry_ptr->local_len != entry_ptr->header.size ) ) || ( entry_ptr->base_addr != entry_ptr->header.addr ) ) { nerrors++; if ( verbose ) { - HDfprintf(stdout, "%d:%s: error in H5AC_protect().\n", - world_mpi_rank, FUNC); + HDfprintf(stdout, "%d:%s: error in H5AC_protect().\n", + world_mpi_rank, FUNC); } } else { - entry_ptr->locked = TRUE; + entry_ptr->locked = TRUE; - } + } HDassert( ((entry_ptr->header).type)->id == DATUM_ENTRY_TYPE ); } @@ -3603,33 +3603,33 @@ mark_entry_dirty(int32_t idx) entry_ptr = &(data[idx]); HDassert ( entry_ptr->locked || entry_ptr->global_pinned ); - HDassert ( ! (entry_ptr->local_pinned) ); + HDassert ( ! (entry_ptr->local_pinned) ); (entry_ptr->ver)++; entry_ptr->dirty = TRUE; - result = H5AC_mark_entry_dirty( (void *)entry_ptr); + result = H5AC_mark_entry_dirty( (void *)entry_ptr); if ( result < 0 ) { nerrors++; if ( verbose ) { - HDfprintf(stdout, + HDfprintf(stdout, "%d:%s: error in H5AC_mark_entry_dirty().\n", world_mpi_rank, FUNC); } } - else if ( ! ( entry_ptr->locked ) ) - { - global_dirty_pins++; - } + else if ( ! ( entry_ptr->locked ) ) + { + global_dirty_pins++; + } } return; } /* mark_entry_dirty() */ - + /***************************************************************************** * Function: pin_entry() * @@ -3646,8 +3646,8 @@ mark_entry_dirty(int32_t idx) static void pin_entry(H5F_t * file_ptr, int32_t idx, - hbool_t global, - hbool_t dirty) + hbool_t global, + hbool_t dirty) { unsigned int flags = H5AC__PIN_ENTRY_FLAG; struct datum * entry_ptr; @@ -3660,35 +3660,35 @@ pin_entry(H5F_t * file_ptr, entry_ptr = &(data[idx]); - HDassert ( ! (entry_ptr->global_pinned) ); - HDassert ( ! (entry_ptr->local_pinned) ); - HDassert ( ! ( dirty && ( ! global ) ) ); + HDassert ( ! (entry_ptr->global_pinned) ); + HDassert ( ! (entry_ptr->local_pinned) ); + HDassert ( ! ( dirty && ( ! global ) ) ); - lock_entry(file_ptr, idx); + lock_entry(file_ptr, idx); - if ( dirty ) { + if ( dirty ) { - flags |= H5AC__DIRTIED_FLAG; - } + flags |= H5AC__DIRTIED_FLAG; + } - unlock_entry(file_ptr, idx, flags); + unlock_entry(file_ptr, idx, flags); HDassert( (entry_ptr->header).is_pinned ); - HDassert( ( ! dirty ) || ( (entry_ptr->header).is_dirty ) ); + HDassert( ( ! dirty ) || ( (entry_ptr->header).is_dirty ) ); - if ( global ) { + if ( global ) { - entry_ptr->global_pinned = TRUE; + entry_ptr->global_pinned = TRUE; - global_pins++; + global_pins++; - } else { + } else { - entry_ptr->local_pinned = TRUE; + entry_ptr->local_pinned = TRUE; - local_pins++; + local_pins++; - } + } } return; @@ -3696,14 +3696,14 @@ pin_entry(H5F_t * file_ptr, } /* pin_entry() */ #ifdef H5_METADATA_TRACE_FILE - + /***************************************************************************** * Function: pin_protected_entry() * * Purpose: Insert the entry indicated by the type and index, mark it - * as dirty, and increment its version number. + * as dirty, and increment its version number. * - * Do nothing if nerrors is non-zero on entry. + * Do nothing if nerrors is non-zero on entry. * * Return: void * @@ -3713,7 +3713,7 @@ pin_entry(H5F_t * file_ptr, *****************************************************************************/ static void pin_protected_entry(int32_t idx, - hbool_t global) + hbool_t global) { herr_t result; struct datum * entry_ptr; @@ -3727,36 +3727,36 @@ pin_protected_entry(int32_t idx, if ( nerrors == 0 ) { - result = H5AC_pin_protected_entry((void *)entry_ptr); + result = H5AC_pin_protected_entry((void *)entry_ptr); if ( ( result < 0 ) || ( entry_ptr->header.type != &(types[0]) ) || ( ( entry_ptr->len != entry_ptr->header.size ) && - ( entry_ptr->local_len != entry_ptr->header.size ) )|| + ( entry_ptr->local_len != entry_ptr->header.size ) )|| ( entry_ptr->base_addr != entry_ptr->header.addr ) || - ( ! ( (entry_ptr->header).is_pinned ) ) ) { + ( ! ( (entry_ptr->header).is_pinned ) ) ) { nerrors++; if ( verbose ) { - HDfprintf(stdout, - "%d:%s: Error in H5AC_pin_protected entry().\n", - world_mpi_rank, FUNC); + HDfprintf(stdout, + "%d:%s: Error in H5AC_pin_protected entry().\n", + world_mpi_rank, FUNC); } } if ( global ) { - entry_ptr->global_pinned = TRUE; + entry_ptr->global_pinned = TRUE; - global_pins++; + global_pins++; - } else { + } else { - entry_ptr->local_pinned = TRUE; + entry_ptr->local_pinned = TRUE; - local_pins++; + local_pins++; - } + } HDassert( ((entry_ptr->header).type)->id == DATUM_ENTRY_TYPE ); } @@ -3766,16 +3766,16 @@ pin_protected_entry(int32_t idx, } /* pin_protected_entry() */ #endif /* H5_METADATA_TRACE_FILE */ - + /***************************************************************************** * Function: move_entry() * * Purpose: Move the entry indicated old_idx to the entry indicated - * by new_idex. Touch up the data array so that flush will - * not choke. + * by new_idex. Touch up the data array so that flush will + * not choke. * - * Do nothing if nerrors isn't zero, or if old_idx equals - * new_idx. + * Do nothing if nerrors isn't zero, or if old_idx equals + * new_idx. * * Return: void * @@ -3789,8 +3789,8 @@ move_entry(H5F_t * file_ptr, int32_t new_idx) { herr_t result; - int tmp; - size_t tmp_len; + int tmp; + size_t tmp_len; haddr_t old_addr = HADDR_UNDEF; haddr_t new_addr = HADDR_UNDEF; struct datum * old_entry_ptr; @@ -3818,12 +3818,12 @@ move_entry(H5F_t * file_ptr, /* Moving will mark the entry dirty if it is not already */ old_entry_ptr->dirty = TRUE; - /* touch up versions, base_addrs, and data_index. Do this - * now as it is possible that the rename will trigger a + /* touch up versions, base_addrs, and data_index. Do this + * now as it is possible that the rename will trigger a * sync point. */ if(old_entry_ptr->ver < new_entry_ptr->ver) - old_entry_ptr->ver = new_entry_ptr->ver; + old_entry_ptr->ver = new_entry_ptr->ver; else (old_entry_ptr->ver)++; @@ -3837,11 +3837,11 @@ move_entry(H5F_t * file_ptr, old_entry_ptr->index = new_entry_ptr->index; new_entry_ptr->index = tmp; - if(old_entry_ptr->local_len != new_entry_ptr->local_len) { - tmp_len = old_entry_ptr->local_len; - old_entry_ptr->local_len = new_entry_ptr->local_len; - new_entry_ptr->local_len = tmp_len; - } /* end if */ + if(old_entry_ptr->local_len != new_entry_ptr->local_len) { + tmp_len = old_entry_ptr->local_len; + old_entry_ptr->local_len = new_entry_ptr->local_len; + new_entry_ptr->local_len = tmp_len; + } /* end if */ result = H5AC_move_entry(file_ptr, &(types[0]), old_addr, new_addr, H5AC_ind_read_dxpl_id); @@ -3849,8 +3849,8 @@ move_entry(H5F_t * file_ptr, nerrors++; if ( verbose ) { - HDfprintf(stdout, "%d:%s: H5AC_move_entry() failed.\n", - world_mpi_rank, FUNC); + HDfprintf(stdout, "%d:%s: H5AC_move_entry() failed.\n", + world_mpi_rank, FUNC); } } else { @@ -3859,27 +3859,27 @@ move_entry(H5F_t * file_ptr, if ( ! (old_entry_ptr->header.is_dirty) ) { - /* it is possible that we just exceeded the dirty bytes - * threshold, triggering a write of the newly inserted - * entry. Test for this, and only flag an error if this - * is not the case. - */ + /* it is possible that we just exceeded the dirty bytes + * threshold, triggering a write of the newly inserted + * entry. Test for this, and only flag an error if this + * is not the case. + */ - struct H5AC_aux_t * aux_ptr; + struct H5AC_aux_t * aux_ptr; - aux_ptr = ((H5AC_aux_t *)(file_ptr->shared->cache->aux_ptr)); + aux_ptr = ((H5AC_aux_t *)(file_ptr->shared->cache->aux_ptr)); - if ( ! ( ( aux_ptr != NULL ) && - ( aux_ptr->magic == H5AC__H5AC_AUX_T_MAGIC ) && - ( aux_ptr->dirty_bytes == 0 ) ) ) { + if ( ! ( ( aux_ptr != NULL ) && + ( aux_ptr->magic == H5AC__H5AC_AUX_T_MAGIC ) && + ( aux_ptr->dirty_bytes == 0 ) ) ) { nerrors++; if ( verbose ) { - HDfprintf(stdout, + HDfprintf(stdout, "%d:%s: data[%d].header.is_dirty = %d.\n", - world_mpi_rank, FUNC, new_idx, + world_mpi_rank, FUNC, new_idx, (int)(data[new_idx].header.is_dirty)); - } + } } } else { @@ -3890,19 +3890,19 @@ move_entry(H5F_t * file_ptr, } /* move_entry() */ - + /***************************************************************************** * - * Function: reset_server_counts() + * Function: reset_server_counts() * - * Purpose: Send a message to the server process requesting it to reset - * its counters. Await confirmation message. + * Purpose: Send a message to the server process requesting it to reset + * its counters. Await confirmation message. * - * Return: Success: TRUE + * Return: Success: TRUE * - * Failure: FALSE + * Failure: FALSE * - * Programmer: JRM -- 5/6/10 + * Programmer: JRM -- 5/6/10 * *****************************************************************************/ static hbool_t @@ -3957,7 +3957,7 @@ reset_server_counts(void) nerrors++; success = FALSE; if ( verbose ) { - HDfprintf(stdout, + HDfprintf(stdout, "%d:%s: Bad data in req r/w counter reset reply.\n", world_mpi_rank, FUNC); } @@ -3968,15 +3968,15 @@ reset_server_counts(void) } /* reset_server_counts() */ - + /***************************************************************************** * Function: resize_entry() * * Purpose: Resize the pinned entry indicated by idx to the new_size. - * Note that new_size must be greater than 0, and must be - * less than or equal to the original size of the entry. + * Note that new_size must be greater than 0, and must be + * less than or equal to the original size of the entry. * - * Do nothing if nerrors isn't zero. + * Do nothing if nerrors isn't zero. * * Return: void * @@ -3986,7 +3986,7 @@ reset_server_counts(void) *****************************************************************************/ static void resize_entry(int32_t idx, - size_t new_size) + size_t new_size) { herr_t result; struct datum * entry_ptr; @@ -4000,21 +4000,21 @@ resize_entry(int32_t idx, HDassert( ((entry_ptr->header).type)->id == DATUM_ENTRY_TYPE ); HDassert( !(entry_ptr->locked) ); - HDassert( ( entry_ptr->global_pinned ) && - ( ! entry_ptr->local_pinned ) ); - HDassert( ( entry_ptr->header.size == entry_ptr->len ) || - ( entry_ptr->header.size == entry_ptr->local_len ) ); - HDassert( new_size > 0 ); - HDassert( new_size <= entry_ptr->len ); + HDassert( ( entry_ptr->global_pinned ) && + ( ! entry_ptr->local_pinned ) ); + HDassert( ( entry_ptr->header.size == entry_ptr->len ) || + ( entry_ptr->header.size == entry_ptr->local_len ) ); + HDassert( new_size > 0 ); + HDassert( new_size <= entry_ptr->len ); - result = H5AC_resize_entry((void *)entry_ptr, new_size); + result = H5AC_resize_entry((void *)entry_ptr, new_size); if ( result < 0 ) { nerrors++; if ( verbose ) { - HDfprintf(stdout, "%d:%s: H5AC_resize_entry() failed.\n", - world_mpi_rank, FUNC); + HDfprintf(stdout, "%d:%s: H5AC_resize_entry() failed.\n", + world_mpi_rank, FUNC); } } else { @@ -4024,7 +4024,7 @@ resize_entry(int32_t idx, HDassert( entry_ptr->header.size == new_size ); entry_ptr->dirty = TRUE; - entry_ptr->local_len = new_size; + entry_ptr->local_len = new_size; /* touch up version. */ @@ -4036,24 +4036,24 @@ resize_entry(int32_t idx, } /* resize_entry() */ - + /***************************************************************************** * - * Function: setup_cache_for_test() + * Function: setup_cache_for_test() * - * Purpose: Setup the parallel cache for a test, and return the file id - * and a pointer to the cache's internal data structures. + * Purpose: Setup the parallel cache for a test, and return the file id + * and a pointer to the cache's internal data structures. * - * To do this, we must create a file, flush it (so that we - * don't have to worry about entries in the metadata cache), - * look up the address of the metadata cache, and then instruct - * the cache to omit sanity checks on dxpl IDs. + * To do this, we must create a file, flush it (so that we + * don't have to worry about entries in the metadata cache), + * look up the address of the metadata cache, and then instruct + * the cache to omit sanity checks on dxpl IDs. * - * Return: Success: TRUE + * Return: Success: TRUE * - * Failure: FALSE + * Failure: FALSE * - * Programmer: JRM -- 1/4/06 + * Programmer: JRM -- 1/4/06 * *****************************************************************************/ static hbool_t @@ -4080,13 +4080,13 @@ setup_cache_for_test(hid_t * fid_ptr, if ( fid < 0 ) { nerrors++; if ( verbose ) { - HDfprintf(stdout, "%d:%s: H5Fcreate() failed.\n", + HDfprintf(stdout, "%d:%s: H5Fcreate() failed.\n", world_mpi_rank, FUNC); } } else if ( H5Fflush(fid, H5F_SCOPE_GLOBAL) < 0 ) { nerrors++; if ( verbose ) { - HDfprintf(stdout, "%d:%s: H5Fflush() failed.\n", + HDfprintf(stdout, "%d:%s: H5Fflush() failed.\n", world_mpi_rank, FUNC); } } else { @@ -4096,7 +4096,7 @@ setup_cache_for_test(hid_t * fid_ptr, if ( file_ptr == NULL ) { nerrors++; if ( verbose ) { - HDfprintf(stdout, "%d:%s: Can't get file_ptr.\n", + HDfprintf(stdout, "%d:%s: Can't get file_ptr.\n", world_mpi_rank, FUNC); } } else { @@ -4106,13 +4106,13 @@ setup_cache_for_test(hid_t * fid_ptr, if ( cache_ptr == NULL ) { nerrors++; if ( verbose ) { - HDfprintf(stdout, "%d:%s: Can't get cache_ptr.\n", + HDfprintf(stdout, "%d:%s: Can't get cache_ptr.\n", world_mpi_rank, FUNC); } } else if ( cache_ptr->magic != H5C__H5C_T_MAGIC ) { nerrors++; if ( verbose ) { - HDfprintf(stdout, "%d:%s: Bad cache_ptr magic.\n", + HDfprintf(stdout, "%d:%s: Bad cache_ptr magic.\n", world_mpi_rank, FUNC); } } else { @@ -4131,7 +4131,7 @@ setup_cache_for_test(hid_t * fid_ptr, if ( H5AC_get_cache_auto_resize_config(cache_ptr, &config) != SUCCEED ) { - HDfprintf(stdout, + HDfprintf(stdout, "%d:%s: H5AC_get_cache_auto_resize_config(1) failed.\n", world_mpi_rank, FUNC); @@ -4141,9 +4141,9 @@ setup_cache_for_test(hid_t * fid_ptr, config.metadata_write_strategy = metadata_write_strategy; if ( H5AC_set_cache_auto_resize_config(cache_ptr, &config) - != SUCCEED ) { + != SUCCEED ) { - HDfprintf(stdout, + HDfprintf(stdout, "%d:%s: H5AC_set_cache_auto_resize_config() failed.\n", world_mpi_rank, FUNC); @@ -4166,15 +4166,15 @@ setup_cache_for_test(hid_t * fid_ptr, nerrors++; if ( verbose ) { - HDfprintf(stdout, "%d:%s: cache_ptr->aux_ptr == NULL.\n", + HDfprintf(stdout, "%d:%s: cache_ptr->aux_ptr == NULL.\n", world_mpi_rank, FUNC); } - } else if ( ((H5AC_aux_t *)(cache_ptr->aux_ptr))->magic != + } else if ( ((H5AC_aux_t *)(cache_ptr->aux_ptr))->magic != H5AC__H5AC_AUX_T_MAGIC ) { nerrors++; if ( verbose ) { - HDfprintf(stdout, + HDfprintf(stdout, "%d:%s: cache_ptr->aux_ptr->magic != H5AC__H5AC_AUX_T_MAGIC.\n", world_mpi_rank, FUNC); } @@ -4183,14 +4183,14 @@ setup_cache_for_test(hid_t * fid_ptr, nerrors++; if ( verbose ) { - HDfprintf(stdout, + HDfprintf(stdout, "%d:%s: bad cache_ptr->aux_ptr->metadata_write_strategy\n", world_mpi_rank, FUNC); } } } - /* also verify that the expected metadata write strategy is reported + /* also verify that the expected metadata write strategy is reported * when we get the current configuration. */ @@ -4201,25 +4201,25 @@ setup_cache_for_test(hid_t * fid_ptr, if ( H5AC_get_cache_auto_resize_config(cache_ptr, &test_config) != SUCCEED ) { - HDfprintf(stdout, + HDfprintf(stdout, "%d:%s: H5AC_get_cache_auto_resize_config(2) failed.\n", world_mpi_rank, FUNC); - } else if ( test_config.metadata_write_strategy != + } else if ( test_config.metadata_write_strategy != metadata_write_strategy ) { nerrors++; if ( verbose ) { - HDfprintf(stdout, + HDfprintf(stdout, "%d:%s: unexpected metadata_write_strategy.\n", world_mpi_rank, FUNC); } } } - /* allocate space for test entries -- do this before we set the + /* allocate space for test entries -- do this before we set the * sync point done callback as it will dirty the superblock, requiring * another flush. If the sync point done callback is set, this will * cause a spurious failure. @@ -4232,10 +4232,10 @@ setup_cache_for_test(hid_t * fid_ptr, if ( actual_base_addr == HADDR_UNDEF ) { success = FALSE; - nerrors++; + nerrors++; if ( verbose ) { - HDfprintf(stdout, "%d:%s: H5MF_alloc() failed.\n", + HDfprintf(stdout, "%d:%s: H5MF_alloc() failed.\n", world_mpi_rank, FUNC); } @@ -4246,10 +4246,10 @@ setup_cache_for_test(hid_t * fid_ptr, * if the size of the superblock is increase. */ success = FALSE; - nerrors++; + nerrors++; if ( verbose ) { - HDfprintf(stdout, "%d:%s: actual_base_addr > BASE_ADDR.\n", + HDfprintf(stdout, "%d:%s: actual_base_addr > BASE_ADDR.\n", world_mpi_rank, FUNC); } } @@ -4262,7 +4262,7 @@ setup_cache_for_test(hid_t * fid_ptr, if ( H5Fflush(fid, H5F_SCOPE_GLOBAL) < 0 ) { nerrors++; if ( verbose ) { - HDfprintf(stdout, "%d:%s: second H5Fflush() failed.\n", + HDfprintf(stdout, "%d:%s: second H5Fflush() failed.\n", world_mpi_rank, FUNC); } } @@ -4272,62 +4272,62 @@ setup_cache_for_test(hid_t * fid_ptr, if ( success ) { - if ( H5AC__set_write_done_callback(cache_ptr, do_sync) != SUCCEED ) { + if ( H5AC__set_write_done_callback(cache_ptr, do_sync) != SUCCEED ) { nerrors++; if ( verbose ) { - HDfprintf(stdout, - "%d:%s: H5C_set_write_done_callback failed.\n", + HDfprintf(stdout, + "%d:%s: H5C_set_write_done_callback failed.\n", world_mpi_rank, FUNC); } - } + } } #endif /* DO_SYNC_AFTER_WRITE */ if ( success ) { - if ( H5AC__set_sync_point_done_callback(cache_ptr, verify_writes) != SUCCEED ) { + if ( H5AC__set_sync_point_done_callback(cache_ptr, verify_writes) != SUCCEED ) { nerrors++; if ( verbose ) { - HDfprintf(stdout, - "%d:%s: H5AC__set_sync_point_done_callback failed.\n", + HDfprintf(stdout, + "%d:%s: H5AC__set_sync_point_done_callback failed.\n", world_mpi_rank, FUNC); } - } + } } return(success); } /* setup_cache_for_test() */ - + /***************************************************************************** * - * Function: verify_writes() + * Function: verify_writes() * - * Purpose: Verify that the indicated entries have been written exactly - * once each, and that the indicated total number of writes - * has been processed by the server process. Flag an error if - * discrepency is noted. Finally reset the counters maintained - * by the server process. + * Purpose: Verify that the indicated entries have been written exactly + * once each, and that the indicated total number of writes + * has been processed by the server process. Flag an error if + * discrepency is noted. Finally reset the counters maintained + * by the server process. * - * This function should only be called by the metadata cache - * as the "sync point done" function, as it must do some - * synchronization to avoid false positives. + * This function should only be called by the metadata cache + * as the "sync point done" function, as it must do some + * synchronization to avoid false positives. * - * Note that at present, this function does not allow for the - * case in which one or more of the indicated entries should - * have been written more than once since the last time the - * server process's counters were reset. That is fine for now, - * as with the current metadata write strategies, no entry - * should be written more than once per sync point. If this - * changes this limitation will have to be revisited. + * Note that at present, this function does not allow for the + * case in which one or more of the indicated entries should + * have been written more than once since the last time the + * server process's counters were reset. That is fine for now, + * as with the current metadata write strategies, no entry + * should be written more than once per sync point. If this + * changes this limitation will have to be revisited. * - * Return: void. + * Return: void. * - * Programmer: JRM -- 5/9/10 + * Programmer: JRM -- 5/9/10 * *****************************************************************************/ static void @@ -4403,7 +4403,7 @@ verify_writes(unsigned num_writes, haddr_t *written_entries_tbl) } /* final barrier to ensure that all processes think that the server - * counters have been reset before we leave the sync point. This + * counters have been reset before we leave the sync point. This * barrier is probaby not necessary at this point in time (5/9/10), * but I can think of at least one likely change to the metadata write * strategies that will require it -- hence its insertion now. @@ -4425,24 +4425,24 @@ verify_writes(unsigned num_writes, haddr_t *written_entries_tbl) } /* verify_writes() */ - + /***************************************************************************** * - * Function: setup_rand() + * Function: setup_rand() * - * Purpose: Use gettimeofday() to obtain a seed for rand(), print the - * seed to stdout, and then pass it to srand(). + * Purpose: Use gettimeofday() to obtain a seed for rand(), print the + * seed to stdout, and then pass it to srand(). * - * Increment nerrors if any errors are detected. + * Increment nerrors if any errors are detected. * - * Return: void. + * Return: void. * - * Programmer: JRM -- 1/12/06 + * Programmer: JRM -- 1/12/06 * * Modifications: * - * JRM -- 5/9/06 - * Modified function to facilitate setting predefined seeds. + * JRM -- 5/9/06 + * Modified function to facilitate setting predefined seeds. * *****************************************************************************/ static void @@ -4457,13 +4457,13 @@ setup_rand(void) if ( ( use_predefined_seeds ) && ( world_mpi_size == num_predefined_seeds ) ) { - HDassert( world_mpi_rank >= 0 ); - HDassert( world_mpi_rank < world_mpi_size ); + HDassert( world_mpi_rank >= 0 ); + HDassert( world_mpi_rank < world_mpi_size ); seed = predefined_seeds[world_mpi_rank]; - HDfprintf(stdout, "%d:%s: predefined_seed = %d.\n", + HDfprintf(stdout, "%d:%s: predefined_seed = %d.\n", world_mpi_rank, FUNC, seed); - fflush(stdout); + fflush(stdout); HDsrand(seed); } else { @@ -4472,7 +4472,7 @@ setup_rand(void) nerrors++; if ( verbose ) { - HDfprintf(stdout, "%d:%s: gettimeofday() failed.\n", + HDfprintf(stdout, "%d:%s: gettimeofday() failed.\n", world_mpi_rank, FUNC); } } else { @@ -4490,21 +4490,21 @@ setup_rand(void) } /* setup_rand() */ - + /***************************************************************************** * - * Function: take_down_cache() + * Function: take_down_cache() * - * Purpose: Take down the parallel cache after a test. + * Purpose: Take down the parallel cache after a test. * - * To do this, we must close the file, and delete if if - * possible. + * To do this, we must close the file, and delete if if + * possible. * - * Return: Success: TRUE + * Return: Success: TRUE * - * Failure: FALSE + * Failure: FALSE * - * Programmer: JRM -- 1/4/06 + * Programmer: JRM -- 1/4/06 * *****************************************************************************/ static hbool_t @@ -4512,7 +4512,7 @@ take_down_cache(hid_t fid, H5C_t * cache_ptr) { hbool_t success = TRUE; /* will set to FALSE if appropriate. */ - /* flush the file -- this should write out any remaining test + /* flush the file -- this should write out any remaining test * entries in the cache. */ if ( ( success ) && ( H5Fflush(fid, H5F_SCOPE_GLOBAL) < 0 ) ) { @@ -4525,7 +4525,7 @@ take_down_cache(hid_t fid, H5C_t * cache_ptr) } } - /* Now reset the sync point done callback. Must do this as with + /* Now reset the sync point done callback. Must do this as with * the SWMR mods, the cache will do additional I/O on file close * un-related to the test entries, and thereby corrupt our counts * of entry writes. @@ -4556,7 +4556,7 @@ take_down_cache(hid_t fid, H5C_t * cache_ptr) world_mpi_rank, FUNC); } - } + } if ( success ) { @@ -4573,11 +4573,11 @@ take_down_cache(hid_t fid, H5C_t * cache_ptr) } } else { - /* verify that there have been no further writes of test + /* verify that there have been no further writes of test * entries during the close */ success = verify_total_writes(0); - + } } @@ -4585,19 +4585,19 @@ take_down_cache(hid_t fid, H5C_t * cache_ptr) } /* take_down_cache() */ - + /***************************************************************************** * Function: verify_entry_reads * - * Purpose: Query the server to determine the number of times the - * indicated entry has been read since the last time the - * server counters were reset. + * Purpose: Query the server to determine the number of times the + * indicated entry has been read since the last time the + * server counters were reset. * - * Return TRUE if successful, and if the supplied expected - * number of reads matches the number of reads reported by - * the server process. + * Return TRUE if successful, and if the supplied expected + * number of reads matches the number of reads reported by + * the server process. * - * Return FALSE and flag an error otherwise. + * Return FALSE and flag an error otherwise. * * Return: TRUE if successful, FALSE otherwise. * @@ -4680,31 +4680,31 @@ verify_entry_reads(haddr_t addr, nerrors++; success = FALSE; if ( verbose ) { - HDfprintf(stdout, + 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); } - } + } } return(success); } /* verify_entry_reads() */ - + /***************************************************************************** * Function: verify_entry_writes * - * Purpose: Query the server to determine the number of times the - * indicated entry has been written since the last time the - * server counters were reset. + * Purpose: Query the server to determine the number of times the + * indicated entry has been written since the last time the + * server counters were reset. * - * Return TRUE if successful, and if the supplied expected - * number of reads matches the number of reads reported by - * the server process. + * Return TRUE if successful, and if the supplied expected + * number of reads matches the number of reads reported by + * the server process. * - * Return FALSE and flag an error otherwise. + * Return FALSE and flag an error otherwise. * * Return: TRUE if successful, FALSE otherwise. * @@ -4787,36 +4787,36 @@ verify_entry_writes(haddr_t addr, nerrors++; success = FALSE; if ( verbose ) { - HDfprintf(stdout, + HDfprintf(stdout, "%d:%s: rep/exp entry 0x%llx writes mismatch (%ld/%ld).\n", world_mpi_rank, FUNC, (long long)addr, reported_entry_writes, expected_entry_writes); } - } + } } return(success); } /* verify_entry_writes() */ - + /***************************************************************************** * - * Function: verify_total_reads() + * Function: verify_total_reads() * - * Purpose: Query the server to obtain the total reads since the last - * server counter reset, and compare this value with the supplied - * expected value. + * Purpose: Query the server to obtain the total reads since the last + * server counter reset, and compare this value with the supplied + * expected value. * - * If the values match, return TRUE. + * If the values match, return TRUE. * - * If the values don't match, flag an error and return FALSE. + * If the values don't match, flag an error and return FALSE. * - * Return: Success: TRUE + * Return: Success: TRUE * - * Failure: FALSE + * Failure: FALSE * - * Programmer: JRM -- 5/6/10 + * Programmer: JRM -- 5/6/10 * *****************************************************************************/ static hbool_t @@ -4887,9 +4887,9 @@ verify_total_reads(int expected_total_reads) nerrors++; success = FALSE; if ( verbose ) { - HDfprintf(stdout, + HDfprintf(stdout, "%d:%s: reported/expected total reads mismatch (%ld/%ld).\n", - world_mpi_rank, FUNC, + world_mpi_rank, FUNC, reported_total_reads, expected_total_reads); } @@ -4900,24 +4900,24 @@ verify_total_reads(int expected_total_reads) } /* verify_total_reads() */ - + /***************************************************************************** * - * Function: verify_total_writes() + * Function: verify_total_writes() * - * Purpose: Query the server to obtain the total writes since the last - * server counter reset, and compare this value with the supplied - * expected value. + * Purpose: Query the server to obtain the total writes since the last + * server counter reset, and compare this value with the supplied + * expected value. * - * If the values match, return TRUE. + * If the values match, return TRUE. * - * If the values don't match, flag an error and return FALSE. + * If the values don't match, flag an error and return FALSE. * - * Return: Success: TRUE + * Return: Success: TRUE * - * Failure: FALSE + * Failure: FALSE * - * Programmer: JRM -- 5/6/10 + * Programmer: JRM -- 5/6/10 * *****************************************************************************/ static hbool_t @@ -4988,9 +4988,9 @@ verify_total_writes(unsigned expected_total_writes) nerrors++; success = FALSE; if ( verbose ) { - HDfprintf(stdout, + HDfprintf(stdout, "%d:%s: reported/expected total writes mismatch (%u/%u).\n", - world_mpi_rank, FUNC, + world_mpi_rank, FUNC, reported_total_writes, expected_total_writes); } } @@ -5000,7 +5000,7 @@ verify_total_writes(unsigned expected_total_writes) } /* verify_total_writes() */ - + /***************************************************************************** * Function: unlock_entry() * @@ -5015,8 +5015,8 @@ verify_total_writes(unsigned expected_total_writes) * * Modifications: * - * 7/11/06 - * Updated for the new local_len field in datum. + * 7/11/06 + * Updated for the new local_len field in datum. * *****************************************************************************/ static void @@ -5036,7 +5036,7 @@ unlock_entry(H5F_t * file_ptr, entry_ptr = &(data[idx]); - HDassert( entry_ptr->locked ); + HDassert( entry_ptr->locked ); dirtied = ((flags & H5AC__DIRTIED_FLAG) == H5AC__DIRTIED_FLAG ); @@ -5052,7 +5052,7 @@ unlock_entry(H5F_t * file_ptr, if ( ( result < 0 ) || ( entry_ptr->header.type != &(types[0]) ) || ( ( entry_ptr->len != entry_ptr->header.size ) && - ( entry_ptr->local_len != entry_ptr->header.size ) ) || + ( entry_ptr->local_len != entry_ptr->header.size ) ) || ( entry_ptr->base_addr != entry_ptr->header.addr ) ) { nerrors++; @@ -5064,7 +5064,7 @@ unlock_entry(H5F_t * file_ptr, entry_ptr->locked = FALSE; - } + } HDassert( ((entry_ptr->header).type)->id == DATUM_ENTRY_TYPE ); @@ -5085,7 +5085,7 @@ unlock_entry(H5F_t * file_ptr, } /* unlock_entry() */ - + /***************************************************************************** * Function: unpin_entry() * @@ -5100,8 +5100,8 @@ unlock_entry(H5F_t * file_ptr, * * Modifications: * - * JRM -- 8/15/06 - * Added assertion that entry is pinned on entry. + * JRM -- 8/15/06 + * Added assertion that entry is pinned on entry. * *****************************************************************************/ static void @@ -5123,54 +5123,54 @@ unpin_entry(H5F_t * file_ptr, entry_ptr = &(data[idx]); - HDassert( (entry_ptr->header).is_pinned ); - HDassert ( ! ( entry_ptr->global_pinned && entry_ptr->local_pinned) ); - HDassert ( ( global && entry_ptr->global_pinned ) || - ( ! global && entry_ptr->local_pinned ) ); - HDassert ( ! ( dirty && ( ! global ) ) ); + HDassert( (entry_ptr->header).is_pinned ); + HDassert ( ! ( entry_ptr->global_pinned && entry_ptr->local_pinned) ); + HDassert ( ( global && entry_ptr->global_pinned ) || + ( ! global && entry_ptr->local_pinned ) ); + HDassert ( ! ( dirty && ( ! global ) ) ); - if ( via_unprotect ) { + if ( via_unprotect ) { - lock_entry(file_ptr, idx); + lock_entry(file_ptr, idx); - if ( dirty ) { + if ( dirty ) { - flags |= H5AC__DIRTIED_FLAG; - } + flags |= H5AC__DIRTIED_FLAG; + } - unlock_entry(file_ptr, idx, flags); + unlock_entry(file_ptr, idx, flags); - } else { + } else { - if ( dirty ) { + if ( dirty ) { - mark_entry_dirty(idx); + mark_entry_dirty(idx); - } + } - result = H5AC_unpin_entry(entry_ptr); + result = H5AC_unpin_entry(entry_ptr); - if ( result < 0 ) { + if ( result < 0 ) { nerrors++; if ( verbose ) { HDfprintf(stdout, "%d:%s: error in H5AC_unpin_entry().\n", - world_mpi_rank, FUNC); + world_mpi_rank, FUNC); } - } - } + } + } HDassert( ! ((entry_ptr->header).is_pinned) ); - if ( global ) { + if ( global ) { - entry_ptr->global_pinned = FALSE; + entry_ptr->global_pinned = FALSE; - } else { + } else { - entry_ptr->local_pinned = FALSE; + entry_ptr->local_pinned = FALSE; - } + } } return; @@ -5182,18 +5182,18 @@ unpin_entry(H5F_t * file_ptr, /****************************** test functions *******************************/ /*****************************************************************************/ - + /***************************************************************************** * - * Function: server_smoke_check() + * Function: server_smoke_check() * - * Purpose: Quick smoke check for the server process. + * Purpose: Quick smoke check for the server process. * - * Return: Success: TRUE + * Return: Success: TRUE * - * Failure: FALSE + * Failure: FALSE * - * Programmer: JRM -- 12/21/05 + * Programmer: JRM -- 12/21/05 * *****************************************************************************/ static hbool_t @@ -5214,12 +5214,12 @@ server_smoke_check(void) if ( world_mpi_rank == world_server_mpi_rank ) { - if ( ! server_main() ) { + if ( ! server_main() ) { /* some error occured in the server -- report failure */ nerrors++; if ( verbose ) { - HDfprintf(stdout, "%d:%s: server_main() failed.\n", + HDfprintf(stdout, "%d:%s: server_main() failed.\n", world_mpi_rank, FUNC); } } @@ -5285,9 +5285,9 @@ server_smoke_check(void) #endif /* DO_WRITE_REQ_ACK */ - do_sync(); + do_sync(); - /* barrier to allow all writes to complete */ + /* barrier to allow all writes to complete */ if ( MPI_SUCCESS != MPI_Barrier(file_mpi_comm) ) { success = FALSE; @@ -5302,12 +5302,12 @@ server_smoke_check(void) if ( success ) { success = verify_entry_writes(data[world_mpi_rank].base_addr, 1); - } + } if ( success ) { success = verify_entry_reads(data[world_mpi_rank].base_addr, 0); - } + } if ( success ) { @@ -5319,7 +5319,7 @@ server_smoke_check(void) success = verify_total_reads(0); } - /* barrier to allow all writes to complete */ + /* barrier to allow all writes to complete */ if ( MPI_SUCCESS != MPI_Barrier(file_mpi_comm) ) { success = FALSE; @@ -5391,7 +5391,7 @@ server_smoke_check(void) } } - /* barrier to allow all writes to complete */ + /* barrier to allow all writes to complete */ if ( MPI_SUCCESS != MPI_Barrier(file_mpi_comm) ) { success = FALSE; @@ -5406,12 +5406,12 @@ server_smoke_check(void) if ( success ) { success = verify_entry_writes(data[world_mpi_rank].base_addr, 1); - } + } if ( success ) { success = verify_entry_reads(data[world_mpi_rank].base_addr, 1); - } + } if ( success ) { @@ -5455,12 +5455,12 @@ server_smoke_check(void) if ( success ) { success = verify_entry_writes(data[world_mpi_rank].base_addr, 0); - } + } if ( success ) { success = verify_entry_reads(data[world_mpi_rank].base_addr, 0); - } + } if ( success ) { @@ -5513,9 +5513,9 @@ server_smoke_check(void) if ( world_mpi_rank == 0 ) { - if ( max_nerrors == 0 ) { + if ( max_nerrors == 0 ) { - PASSED(); + PASSED(); } else { @@ -5530,18 +5530,18 @@ server_smoke_check(void) } /* server_smoke_check() */ - + /***************************************************************************** * - * Function: smoke_check_1() + * Function: smoke_check_1() * - * Purpose: First smoke check for the parallel cache. + * Purpose: First smoke check for the parallel cache. * - * Return: Success: TRUE + * Return: Success: TRUE * - * Failure: FALSE + * Failure: FALSE * - * Programmer: JRM -- 1/4/06 + * Programmer: JRM -- 1/4/06 * *****************************************************************************/ static hbool_t @@ -5557,23 +5557,23 @@ smoke_check_1(int metadata_write_strategy) switch ( metadata_write_strategy ) { - case H5AC_METADATA_WRITE_STRATEGY__PROCESS_0_ONLY: + case H5AC_METADATA_WRITE_STRATEGY__PROCESS_0_ONLY: if ( world_mpi_rank == 0 ) { - TESTING("smoke check #1 -- process 0 only md write strategy"); + TESTING("smoke check #1 -- process 0 only md write strategy"); } - break; + break; - case H5AC_METADATA_WRITE_STRATEGY__DISTRIBUTED: + case H5AC_METADATA_WRITE_STRATEGY__DISTRIBUTED: if ( world_mpi_rank == 0 ) { - TESTING("smoke check #1 -- distributed md write strategy"); + TESTING("smoke check #1 -- distributed md write strategy"); } - break; + break; default: if ( world_mpi_rank == 0 ) { - TESTING("smoke check #1 -- unknown md write strategy"); + TESTING("smoke check #1 -- unknown md write strategy"); } - break; + break; } nerrors = 0; @@ -5582,12 +5582,12 @@ smoke_check_1(int metadata_write_strategy) if ( world_mpi_rank == world_server_mpi_rank ) { - if ( ! server_main() ) { + if ( ! server_main() ) { /* some error occured in the server -- report failure */ nerrors++; if ( verbose ) { - HDfprintf(stdout, "%d:%s: server_main() failed.\n", + HDfprintf(stdout, "%d:%s: server_main() failed.\n", world_mpi_rank, FUNC); } } @@ -5601,7 +5601,7 @@ smoke_check_1(int metadata_write_strategy) fid = -1; cache_ptr = NULL; if ( verbose ) { - HDfprintf(stdout, "%d:%s: setup_cache_for_test() failed.\n", + HDfprintf(stdout, "%d:%s: setup_cache_for_test() failed.\n", world_mpi_rank, FUNC); } } @@ -5613,24 +5613,24 @@ smoke_check_1(int metadata_write_strategy) for ( i = (virt_num_data_entries / 2) - 1; i >= 0; i-- ) { - lock_entry(file_ptr, i); - unlock_entry(file_ptr, i, H5AC__NO_FLAGS_SET); + lock_entry(file_ptr, i); + unlock_entry(file_ptr, i, H5AC__NO_FLAGS_SET); } /* Move the first half of the entries... */ for ( i = 0; i < (virt_num_data_entries / 2); i++ ) { - lock_entry(file_ptr, i); - unlock_entry(file_ptr, i, H5AC__NO_FLAGS_SET); - move_entry(file_ptr, i, (i + (virt_num_data_entries / 2))); + lock_entry(file_ptr, i); + unlock_entry(file_ptr, i, H5AC__NO_FLAGS_SET); + move_entry(file_ptr, i, (i + (virt_num_data_entries / 2))); } /* ...and then move them back. */ for ( i = (virt_num_data_entries / 2) - 1; i >= 0; i-- ) { - lock_entry(file_ptr, i); - unlock_entry(file_ptr, i, H5AC__NO_FLAGS_SET); - move_entry(file_ptr, i, (i + (virt_num_data_entries / 2))); + lock_entry(file_ptr, i); + unlock_entry(file_ptr, i, H5AC__NO_FLAGS_SET); + move_entry(file_ptr, i, (i + (virt_num_data_entries / 2))); } if ( fid >= 0 ) { @@ -5639,7 +5639,7 @@ smoke_check_1(int metadata_write_strategy) nerrors++; if ( verbose ) { - HDfprintf(stdout, "%d:%s: take_down_cache() failed.\n", + HDfprintf(stdout, "%d:%s: take_down_cache() failed.\n", world_mpi_rank, FUNC); } } @@ -5685,9 +5685,9 @@ smoke_check_1(int metadata_write_strategy) if ( world_mpi_rank == 0 ) { - if ( max_nerrors == 0 ) { + if ( max_nerrors == 0 ) { - PASSED(); + PASSED(); } else { @@ -5702,21 +5702,21 @@ smoke_check_1(int metadata_write_strategy) } /* smoke_check_1() */ - + /***************************************************************************** * - * Function: smoke_check_2() + * Function: smoke_check_2() * - * Purpose: Second smoke check for the parallel cache. + * Purpose: Second smoke check for the parallel cache. * - * Introduce random reads, but keep all processes with roughly - * the same work load. + * Introduce random reads, but keep all processes with roughly + * the same work load. * - * Return: Success: TRUE + * Return: Success: TRUE * - * Failure: FALSE + * Failure: FALSE * - * Programmer: JRM -- 1/12/06 + * Programmer: JRM -- 1/12/06 * *****************************************************************************/ static hbool_t @@ -5732,23 +5732,23 @@ smoke_check_2(int metadata_write_strategy) switch ( metadata_write_strategy ) { - case H5AC_METADATA_WRITE_STRATEGY__PROCESS_0_ONLY: + case H5AC_METADATA_WRITE_STRATEGY__PROCESS_0_ONLY: if ( world_mpi_rank == 0 ) { - TESTING("smoke check #2 -- process 0 only md write strategy"); + TESTING("smoke check #2 -- process 0 only md write strategy"); } - break; + break; - case H5AC_METADATA_WRITE_STRATEGY__DISTRIBUTED: + case H5AC_METADATA_WRITE_STRATEGY__DISTRIBUTED: if ( world_mpi_rank == 0 ) { - TESTING("smoke check #2 -- distributed md write strategy"); + TESTING("smoke check #2 -- distributed md write strategy"); } - break; + break; default: if ( world_mpi_rank == 0 ) { - TESTING("smoke check #2 -- unknown md write strategy"); + TESTING("smoke check #2 -- unknown md write strategy"); } - break; + break; } nerrors = 0; @@ -5757,12 +5757,12 @@ smoke_check_2(int metadata_write_strategy) if ( world_mpi_rank == world_server_mpi_rank ) { - if ( ! server_main() ) { + if ( ! server_main() ) { /* some error occured in the server -- report failure */ nerrors++; if ( verbose ) { - HDfprintf(stdout, "%d:%s: server_main() failed.\n", + HDfprintf(stdout, "%d:%s: server_main() failed.\n", world_mpi_rank, FUNC); } } @@ -5776,7 +5776,7 @@ smoke_check_2(int metadata_write_strategy) fid = -1; cache_ptr = NULL; if ( verbose ) { - HDfprintf(stdout, "%d:%s: setup_cache_for_test() failed.\n", + HDfprintf(stdout, "%d:%s: setup_cache_for_test() failed.\n", world_mpi_rank, FUNC); } } @@ -5787,73 +5787,73 @@ smoke_check_2(int metadata_write_strategy) if ( i > 100 ) { - lock_and_unlock_random_entries(file_ptr, (i - 100), i, 0, 10); + lock_and_unlock_random_entries(file_ptr, (i - 100), i, 0, 10); } } - for ( i = 0; i < (virt_num_data_entries / 2); i+=61 ) - { - /* Make sure we don't step on any locally pinned entries */ - if ( data[i].local_pinned ) { - unpin_entry(file_ptr, i, FALSE, FALSE, FALSE); - } + for ( i = 0; i < (virt_num_data_entries / 2); i+=61 ) + { + /* Make sure we don't step on any locally pinned entries */ + if ( data[i].local_pinned ) { + unpin_entry(file_ptr, i, FALSE, FALSE, FALSE); + } - pin_entry(file_ptr, i, TRUE, FALSE); - } + pin_entry(file_ptr, i, TRUE, FALSE); + } for ( i = (virt_num_data_entries / 2) - 1; i >= 0; i-=2 ) { - lock_entry(file_ptr, i); - unlock_entry(file_ptr, i, H5AC__NO_FLAGS_SET); - lock_and_unlock_random_entries(file_ptr, 0, - (virt_num_data_entries / 20), - 0, 100); - local_pin_and_unpin_random_entries(file_ptr, 0, - (virt_num_data_entries / 4), - 0, 3); + lock_entry(file_ptr, i); + unlock_entry(file_ptr, i, H5AC__NO_FLAGS_SET); + lock_and_unlock_random_entries(file_ptr, 0, + (virt_num_data_entries / 20), + 0, 100); + local_pin_and_unpin_random_entries(file_ptr, 0, + (virt_num_data_entries / 4), + 0, 3); } for ( i = 0; i < (virt_num_data_entries / 2); i+=2 ) { - lock_entry(file_ptr, i); - unlock_entry(file_ptr, i, H5AC__DIRTIED_FLAG); - lock_and_unlock_random_entries(file_ptr, 0, - (virt_num_data_entries / 10), - 0, 100); + lock_entry(file_ptr, i); + unlock_entry(file_ptr, i, H5AC__DIRTIED_FLAG); + lock_and_unlock_random_entries(file_ptr, 0, + (virt_num_data_entries / 10), + 0, 100); } - /* we can't move pinned entries, so release any local pins now. */ - local_unpin_all_entries(file_ptr, FALSE); + /* we can't move pinned entries, so release any local pins now. */ + local_unpin_all_entries(file_ptr, FALSE); /* Move the first half of the entries... */ for ( i = 0; i < (virt_num_data_entries / 2); i++ ) { - lock_entry(file_ptr, i); - unlock_entry(file_ptr, i, H5AC__NO_FLAGS_SET); - move_entry(file_ptr, i, (i + (virt_num_data_entries / 2))); - lock_and_unlock_random_entries(file_ptr, 0, - ((virt_num_data_entries / 50) - 1), + lock_entry(file_ptr, i); + unlock_entry(file_ptr, i, H5AC__NO_FLAGS_SET); + move_entry(file_ptr, i, (i + (virt_num_data_entries / 2))); + lock_and_unlock_random_entries(file_ptr, 0, + ((virt_num_data_entries / 50) - 1), 0, 100); } /* ...and then move them back. */ for ( i = (virt_num_data_entries / 2) - 1; i >= 0; i-- ) { - lock_entry(file_ptr, i); - unlock_entry(file_ptr, i, H5AC__DIRTIED_FLAG); - move_entry(file_ptr, i, (i + (virt_num_data_entries / 2))); - lock_and_unlock_random_entries(file_ptr, 0, - (virt_num_data_entries / 100), - 0, 100); + lock_entry(file_ptr, i); + unlock_entry(file_ptr, i, H5AC__DIRTIED_FLAG); + move_entry(file_ptr, i, (i + (virt_num_data_entries / 2))); + lock_and_unlock_random_entries(file_ptr, 0, + (virt_num_data_entries / 100), + 0, 100); } - for ( i = 0; i < (virt_num_data_entries / 2); i+=61 ) - { - hbool_t via_unprotect = ( (((unsigned)i) & 0x01) == 0 ); - hbool_t dirty = ( (((unsigned)i) & 0x02) == 0 ); + for ( i = 0; i < (virt_num_data_entries / 2); i+=61 ) + { + hbool_t via_unprotect = ( (((unsigned)i) & 0x01) == 0 ); + hbool_t dirty = ( (((unsigned)i) & 0x02) == 0 ); - unpin_entry(file_ptr, i, TRUE, dirty, via_unprotect); - } + unpin_entry(file_ptr, i, TRUE, dirty, via_unprotect); + } if ( fid >= 0 ) { @@ -5861,7 +5861,7 @@ smoke_check_2(int metadata_write_strategy) nerrors++; if ( verbose ) { - HDfprintf(stdout, "%d:%s: take_down_cache() failed.\n", + HDfprintf(stdout, "%d:%s: take_down_cache() failed.\n", world_mpi_rank, FUNC); } } @@ -5907,9 +5907,9 @@ smoke_check_2(int metadata_write_strategy) if ( world_mpi_rank == 0 ) { - if ( max_nerrors == 0 ) { + if ( max_nerrors == 0 ) { - PASSED(); + PASSED(); } else { @@ -5924,24 +5924,24 @@ smoke_check_2(int metadata_write_strategy) } /* smoke_check_2() */ - + /***************************************************************************** * - * Function: smoke_check_3() + * Function: smoke_check_3() * - * Purpose: Third smoke check for the parallel cache. + * Purpose: Third smoke check for the parallel cache. * - * Use random reads to vary the loads on the diffferent - * processors. Also force different cache size adjustments. + * Use random reads to vary the loads on the diffferent + * processors. Also force different cache size adjustments. * - * In this test, load process 0 heavily, and the other - * processes lightly. + * In this test, load process 0 heavily, and the other + * processes lightly. * - * Return: Success: TRUE + * Return: Success: TRUE * - * Failure: FALSE + * Failure: FALSE * - * Programmer: JRM -- 1/13/06 + * Programmer: JRM -- 1/13/06 * *****************************************************************************/ static hbool_t @@ -5961,23 +5961,23 @@ smoke_check_3(int metadata_write_strategy) switch ( metadata_write_strategy ) { - case H5AC_METADATA_WRITE_STRATEGY__PROCESS_0_ONLY: + case H5AC_METADATA_WRITE_STRATEGY__PROCESS_0_ONLY: if ( world_mpi_rank == 0 ) { - TESTING("smoke check #3 -- process 0 only md write strategy"); + TESTING("smoke check #3 -- process 0 only md write strategy"); } - break; + break; - case H5AC_METADATA_WRITE_STRATEGY__DISTRIBUTED: + case H5AC_METADATA_WRITE_STRATEGY__DISTRIBUTED: if ( world_mpi_rank == 0 ) { - TESTING("smoke check #3 -- distributed md write strategy"); + TESTING("smoke check #3 -- distributed md write strategy"); } - break; + break; default: if ( world_mpi_rank == 0 ) { - TESTING("smoke check #3 -- unknown md write strategy"); + TESTING("smoke check #3 -- unknown md write strategy"); } - break; + break; } nerrors = 0; @@ -5986,12 +5986,12 @@ smoke_check_3(int metadata_write_strategy) if ( world_mpi_rank == world_server_mpi_rank ) { - if ( ! server_main() ) { + if ( ! server_main() ) { /* some error occured in the server -- report failure */ nerrors++; if ( verbose ) { - HDfprintf(stdout, "%d:%s: server_main() failed.\n", + HDfprintf(stdout, "%d:%s: server_main() failed.\n", world_mpi_rank, FUNC); } } @@ -6005,7 +6005,7 @@ smoke_check_3(int metadata_write_strategy) fid = -1; cache_ptr = NULL; if ( verbose ) { - HDfprintf(stdout, "%d:%s: setup_cache_for_test() failed.\n", + HDfprintf(stdout, "%d:%s: setup_cache_for_test() failed.\n", world_mpi_rank, FUNC); } } @@ -6019,7 +6019,7 @@ smoke_check_3(int metadata_write_strategy) if ( i > 100 ) { - lock_and_unlock_random_entries(file_ptr, (i - 100), i, + lock_and_unlock_random_entries(file_ptr, (i - 100), i, min_count, max_count); } } @@ -6029,48 +6029,48 @@ smoke_check_3(int metadata_write_strategy) max_count = min_count + 50; for ( i = (virt_num_data_entries / 4); - i < (virt_num_data_entries / 2); - i++ ) + i < (virt_num_data_entries / 2); + i++ ) { insert_entry(cache_ptr, file_ptr, i, H5AC__NO_FLAGS_SET); - if ( i % 59 == 0 ) { + if ( i % 59 == 0 ) { - hbool_t dirty = ( (i % 2) == 0); + hbool_t dirty = ( (i % 2) == 0); - if ( data[i].local_pinned ) { - unpin_entry(file_ptr, i, FALSE, FALSE, FALSE); - } + if ( data[i].local_pinned ) { + unpin_entry(file_ptr, i, FALSE, FALSE, FALSE); + } - pin_entry(file_ptr, i, TRUE, dirty); + pin_entry(file_ptr, i, TRUE, dirty); - HDassert( !dirty || data[i].header.is_dirty ); - HDassert( data[i].header.is_pinned ); - HDassert( data[i].global_pinned ); - HDassert( ! data[i].local_pinned ); - } + HDassert( !dirty || data[i].header.is_dirty ); + HDassert( data[i].header.is_pinned ); + HDassert( data[i].global_pinned ); + HDassert( ! data[i].local_pinned ); + } if ( i > 100 ) { - lock_and_unlock_random_entries(file_ptr, (i - 100), i, + lock_and_unlock_random_entries(file_ptr, (i - 100), i, min_count, max_count); } - local_pin_and_unpin_random_entries(file_ptr, 0, + local_pin_and_unpin_random_entries(file_ptr, 0, virt_num_data_entries / 4, - 0, (file_mpi_rank + 2)); + 0, (file_mpi_rank + 2)); - } + } - /* flush the file to be sure that we have no problems flushing - * pinned entries - */ + /* flush the file to be sure that we have no problems flushing + * pinned entries + */ if ( H5Fflush(fid, H5F_SCOPE_GLOBAL) < 0 ) { nerrors++; if ( verbose ) { - HDfprintf(stdout, "%d:%s: H5Fflush() failed.\n", + HDfprintf(stdout, "%d:%s: H5Fflush() failed.\n", world_mpi_rank, FUNC); } } @@ -6086,27 +6086,27 @@ smoke_check_3(int metadata_write_strategy) for ( i = (virt_num_data_entries / 2) - 1; i >= 0; i-- ) { - if ( ( i >= (virt_num_data_entries / 4) ) && ( i % 59 == 0 ) ) { + if ( ( i >= (virt_num_data_entries / 4) ) && ( i % 59 == 0 ) ) { hbool_t via_unprotect = ( (((unsigned)i) & 0x02) == 0 ); - hbool_t dirty = ( (((unsigned)i) & 0x04) == 0 ); - - HDassert( data[i].global_pinned ); - HDassert( ! data[i].local_pinned ); - - unpin_entry(file_ptr, i, TRUE, dirty, - via_unprotect); - } - if ( i % 2 == 0 ) { - - lock_entry(file_ptr, i); - unlock_entry(file_ptr, i, H5AC__NO_FLAGS_SET); - local_pin_and_unpin_random_entries(file_ptr, 0, - virt_num_data_entries / 2, - 0, 2); - lock_and_unlock_random_entries(file_ptr, + hbool_t dirty = ( (((unsigned)i) & 0x04) == 0 ); + + HDassert( data[i].global_pinned ); + HDassert( ! data[i].local_pinned ); + + unpin_entry(file_ptr, i, TRUE, dirty, + via_unprotect); + } + if ( i % 2 == 0 ) { + + lock_entry(file_ptr, i); + unlock_entry(file_ptr, i, H5AC__NO_FLAGS_SET); + local_pin_and_unpin_random_entries(file_ptr, 0, + virt_num_data_entries / 2, + 0, 2); + lock_and_unlock_random_entries(file_ptr, min_idx, max_idx, 0, 100); - } + } } min_idx = 0; @@ -6119,9 +6119,9 @@ smoke_check_3(int metadata_write_strategy) for ( i = 0; i < (virt_num_data_entries / 2); i+=2 ) { - lock_entry(file_ptr, i); - unlock_entry(file_ptr, i, H5AC__DIRTIED_FLAG); - lock_and_unlock_random_entries(file_ptr, + lock_entry(file_ptr, i); + unlock_entry(file_ptr, i, H5AC__DIRTIED_FLAG); + lock_and_unlock_random_entries(file_ptr, min_idx, max_idx, 0, 100); } @@ -6134,22 +6134,22 @@ smoke_check_3(int metadata_write_strategy) /* move the first half of the entries... */ for ( i = 0; i < (virt_num_data_entries / 2); i++ ) { - lock_entry(file_ptr, i); - unlock_entry(file_ptr, i, H5AC__NO_FLAGS_SET); - move_entry(file_ptr, i, (i + (virt_num_data_entries / 2))); - lock_and_unlock_random_entries(file_ptr, 0, - (virt_num_data_entries / 20), + lock_entry(file_ptr, i); + unlock_entry(file_ptr, i, H5AC__NO_FLAGS_SET); + move_entry(file_ptr, i, (i + (virt_num_data_entries / 2))); + lock_and_unlock_random_entries(file_ptr, 0, + (virt_num_data_entries / 20), min_count, max_count); } /* ...and then move them back. */ for ( i = (virt_num_data_entries / 2) - 1; i >= 0; i-- ) { - lock_entry(file_ptr, i); - unlock_entry(file_ptr, i, H5AC__DIRTIED_FLAG); - move_entry(file_ptr, i, (i + (virt_num_data_entries / 2))); - lock_and_unlock_random_entries(file_ptr, 0, - (virt_num_data_entries / 40), + lock_entry(file_ptr, i); + unlock_entry(file_ptr, i, H5AC__DIRTIED_FLAG); + move_entry(file_ptr, i, (i + (virt_num_data_entries / 2))); + lock_and_unlock_random_entries(file_ptr, 0, + (virt_num_data_entries / 40), min_count, max_count); } @@ -6161,16 +6161,16 @@ smoke_check_3(int metadata_write_strategy) for ( i = 0; i < (virt_num_data_entries / 2); i+=2 ) { - local_pin_and_unpin_random_entries(file_ptr, 0, - (virt_num_data_entries / 2), - 0, 5); + local_pin_and_unpin_random_entries(file_ptr, 0, + (virt_num_data_entries / 2), + 0, 5); - lock_entry(file_ptr, i); - unlock_entry(file_ptr, i, H5AC__DIRTIED_FLAG); + lock_entry(file_ptr, i); + unlock_entry(file_ptr, i, H5AC__DIRTIED_FLAG); if ( i > 100 ) { - lock_and_unlock_random_entries(file_ptr, (i - 100), i, + lock_and_unlock_random_entries(file_ptr, (i - 100), i, min_count, max_count); } } @@ -6184,7 +6184,7 @@ smoke_check_3(int metadata_write_strategy) nerrors++; if ( verbose ) { - HDfprintf(stdout, "%d:%s: take_down_cache() failed.\n", + HDfprintf(stdout, "%d:%s: take_down_cache() failed.\n", world_mpi_rank, FUNC); } } @@ -6231,9 +6231,9 @@ smoke_check_3(int metadata_write_strategy) if ( world_mpi_rank == 0 ) { - if ( max_nerrors == 0 ) { + if ( max_nerrors == 0 ) { - PASSED(); + PASSED(); } else { @@ -6248,24 +6248,24 @@ smoke_check_3(int metadata_write_strategy) } /* smoke_check_3() */ - + /***************************************************************************** * - * Function: smoke_check_4() + * Function: smoke_check_4() * - * Purpose: Fourth smoke check for the parallel cache. + * Purpose: Fourth smoke check for the parallel cache. * - * Use random reads to vary the loads on the diffferent - * processors. Also force different cache size adjustments. + * Use random reads to vary the loads on the diffferent + * processors. Also force different cache size adjustments. * - * In this test, load process 0 lightly, and the other - * processes heavily. + * In this test, load process 0 lightly, and the other + * processes heavily. * - * Return: Success: TRUE + * Return: Success: TRUE * - * Failure: FALSE + * Failure: FALSE * - * Programmer: JRM -- 1/13/06 + * Programmer: JRM -- 1/13/06 * *****************************************************************************/ static hbool_t @@ -6285,23 +6285,23 @@ smoke_check_4(int metadata_write_strategy) switch ( metadata_write_strategy ) { - case H5AC_METADATA_WRITE_STRATEGY__PROCESS_0_ONLY: + case H5AC_METADATA_WRITE_STRATEGY__PROCESS_0_ONLY: if ( world_mpi_rank == 0 ) { - TESTING("smoke check #4 -- process 0 only md write strategy"); + TESTING("smoke check #4 -- process 0 only md write strategy"); } - break; + break; - case H5AC_METADATA_WRITE_STRATEGY__DISTRIBUTED: + case H5AC_METADATA_WRITE_STRATEGY__DISTRIBUTED: if ( world_mpi_rank == 0 ) { - TESTING("smoke check #4 -- distributed md write strategy"); + TESTING("smoke check #4 -- distributed md write strategy"); } - break; + break; default: if ( world_mpi_rank == 0 ) { - TESTING("smoke check #4 -- unknown md write strategy"); + TESTING("smoke check #4 -- unknown md write strategy"); } - break; + break; } nerrors = 0; @@ -6310,12 +6310,12 @@ smoke_check_4(int metadata_write_strategy) if ( world_mpi_rank == world_server_mpi_rank ) { - if ( ! server_main() ) { + if ( ! server_main() ) { /* some error occured in the server -- report failure */ nerrors++; if ( verbose ) { - HDfprintf(stdout, "%d:%s: server_main() failed.\n", + HDfprintf(stdout, "%d:%s: server_main() failed.\n", world_mpi_rank, FUNC); } } @@ -6329,7 +6329,7 @@ smoke_check_4(int metadata_write_strategy) fid = -1; cache_ptr = NULL; if ( verbose ) { - HDfprintf(stdout, "%d:%s: setup_cache_for_test() failed.\n", + HDfprintf(stdout, "%d:%s: setup_cache_for_test() failed.\n", world_mpi_rank, FUNC); } } @@ -6344,7 +6344,7 @@ smoke_check_4(int metadata_write_strategy) if ( i > 100 ) { - lock_and_unlock_random_entries(file_ptr, (i - 100), i, + lock_and_unlock_random_entries(file_ptr, (i - 100), i, min_count, max_count); } } @@ -6353,23 +6353,23 @@ smoke_check_4(int metadata_write_strategy) max_count = min_count + 100; for ( i = (virt_num_data_entries / 4); - i < (virt_num_data_entries / 2); - i++ ) + i < (virt_num_data_entries / 2); + i++ ) { - if ( i % 2 == 0 ) { + if ( i % 2 == 0 ) { insert_entry(cache_ptr, file_ptr, i, H5AC__NO_FLAGS_SET); - } else { + } else { - /* Insert some entries pinned, and then unpin them - * immediately. We have tested pinned entries elsewhere, - * so it should be sufficient to verify that the - * entries are in fact pinned (which unpin_entry() should do). - */ + /* Insert some entries pinned, and then unpin them + * immediately. We have tested pinned entries elsewhere, + * so it should be sufficient to verify that the + * entries are in fact pinned (which unpin_entry() should do). + */ insert_entry(cache_ptr, file_ptr, i, H5C__PIN_ENTRY_FLAG); unpin_entry(file_ptr, i, TRUE, FALSE, FALSE); - } + } if ( i % 59 == 0 ) { @@ -6389,19 +6389,19 @@ smoke_check_4(int metadata_write_strategy) if ( i > 100 ) { - lock_and_unlock_random_entries(file_ptr, (i - 100), i, + lock_and_unlock_random_entries(file_ptr, (i - 100), i, min_count, max_count); } local_pin_and_unpin_random_entries(file_ptr, 0, - (virt_num_data_entries / 4), + (virt_num_data_entries / 4), 0, (file_mpi_rank + 2)); } /* flush the file to be sure that we have no problems flushing - * pinned entries - */ + * pinned entries + */ if ( H5Fflush(fid, H5F_SCOPE_GLOBAL) < 0 ) { nerrors++; if ( verbose ) { @@ -6428,13 +6428,13 @@ smoke_check_4(int metadata_write_strategy) unpin_entry(file_ptr, i, TRUE, dirty, via_unprotect); } - if ( i % 2 == 0 ) { + if ( i % 2 == 0 ) { - lock_entry(file_ptr, i); - unlock_entry(file_ptr, i, H5AC__NO_FLAGS_SET); - lock_and_unlock_random_entries(file_ptr, + lock_entry(file_ptr, i); + unlock_entry(file_ptr, i, H5AC__NO_FLAGS_SET); + lock_and_unlock_random_entries(file_ptr, min_idx, max_idx, 0, 100); - } + } } min_idx = 0; @@ -6443,14 +6443,14 @@ smoke_check_4(int metadata_write_strategy) for ( i = 0; i < (virt_num_data_entries / 2); i+=2 ) { - lock_entry(file_ptr, i); - unlock_entry(file_ptr, i, H5AC__DIRTIED_FLAG); - lock_and_unlock_random_entries(file_ptr, + lock_entry(file_ptr, i); + unlock_entry(file_ptr, i, H5AC__DIRTIED_FLAG); + lock_and_unlock_random_entries(file_ptr, min_idx, max_idx, 0, 100); } - /* we can't move pinned entries, so release any local pins now. */ - local_unpin_all_entries(file_ptr, FALSE); + /* we can't move pinned entries, so release any local pins now. */ + local_unpin_all_entries(file_ptr, FALSE); min_count = 10 * (file_mpi_rank % 4); max_count = min_count + 100; @@ -6458,22 +6458,22 @@ smoke_check_4(int metadata_write_strategy) /* move the first half of the entries... */ for ( i = 0; i < (virt_num_data_entries / 2); i++ ) { - lock_entry(file_ptr, i); - unlock_entry(file_ptr, i, H5AC__NO_FLAGS_SET); - move_entry(file_ptr, i, (i + (virt_num_data_entries / 2))); - lock_and_unlock_random_entries(file_ptr, 0, - (virt_num_data_entries / 20), + lock_entry(file_ptr, i); + unlock_entry(file_ptr, i, H5AC__NO_FLAGS_SET); + move_entry(file_ptr, i, (i + (virt_num_data_entries / 2))); + lock_and_unlock_random_entries(file_ptr, 0, + (virt_num_data_entries / 20), min_count, max_count); } /* ...and then move them back. */ for ( i = (virt_num_data_entries / 2) - 1; i >= 0; i-- ) { - lock_entry(file_ptr, i); - unlock_entry(file_ptr, i, H5AC__DIRTIED_FLAG); - move_entry(file_ptr, i, (i + (virt_num_data_entries / 2))); - lock_and_unlock_random_entries(file_ptr, 0, - (virt_num_data_entries / 40), + lock_entry(file_ptr, i); + unlock_entry(file_ptr, i, H5AC__DIRTIED_FLAG); + move_entry(file_ptr, i, (i + (virt_num_data_entries / 2))); + lock_and_unlock_random_entries(file_ptr, 0, + (virt_num_data_entries / 40), min_count, max_count); } @@ -6485,12 +6485,12 @@ smoke_check_4(int metadata_write_strategy) for ( i = 0; i < (virt_num_data_entries / 2); i+=2 ) { - lock_entry(file_ptr, i); - unlock_entry(file_ptr, i, H5AC__DIRTIED_FLAG); + lock_entry(file_ptr, i); + unlock_entry(file_ptr, i, H5AC__DIRTIED_FLAG); if ( i > 100 ) { - lock_and_unlock_random_entries(file_ptr, (i - 100), i, + lock_and_unlock_random_entries(file_ptr, (i - 100), i, min_count, max_count); } } @@ -6501,7 +6501,7 @@ smoke_check_4(int metadata_write_strategy) nerrors++; if ( verbose ) { - HDfprintf(stdout, "%d:%s: take_down_cache() failed.\n", + HDfprintf(stdout, "%d:%s: take_down_cache() failed.\n", world_mpi_rank, FUNC); } } @@ -6548,9 +6548,9 @@ smoke_check_4(int metadata_write_strategy) if ( world_mpi_rank == 0 ) { - if ( max_nerrors == 0 ) { + if ( max_nerrors == 0 ) { - PASSED(); + PASSED(); } else { @@ -6565,19 +6565,19 @@ smoke_check_4(int metadata_write_strategy) } /* smoke_check_4() */ - + /***************************************************************************** * - * Function: smoke_check_5() + * Function: smoke_check_5() * - * Purpose: Similar to smoke check 1, but modified to verify that - * H5AC_mark_entry_dirty() works in the parallel case. + * Purpose: Similar to smoke check 1, but modified to verify that + * H5AC_mark_entry_dirty() works in the parallel case. * - * Return: Success: TRUE + * Return: Success: TRUE * - * Failure: FALSE + * Failure: FALSE * - * Programmer: JRM -- 5/18/06 + * Programmer: JRM -- 5/18/06 * *****************************************************************************/ static hbool_t @@ -6593,23 +6593,23 @@ smoke_check_5(int metadata_write_strategy) switch ( metadata_write_strategy ) { - case H5AC_METADATA_WRITE_STRATEGY__PROCESS_0_ONLY: + case H5AC_METADATA_WRITE_STRATEGY__PROCESS_0_ONLY: if ( world_mpi_rank == 0 ) { - TESTING("smoke check #5 -- process 0 only md write strategy"); + TESTING("smoke check #5 -- process 0 only md write strategy"); } - break; + break; - case H5AC_METADATA_WRITE_STRATEGY__DISTRIBUTED: + case H5AC_METADATA_WRITE_STRATEGY__DISTRIBUTED: if ( world_mpi_rank == 0 ) { - TESTING("smoke check #5 -- distributed md write strategy"); + TESTING("smoke check #5 -- distributed md write strategy"); } - break; + break; default: if ( world_mpi_rank == 0 ) { - TESTING("smoke check #5 -- unknown md write strategy"); + TESTING("smoke check #5 -- unknown md write strategy"); } - break; + break; } @@ -6619,12 +6619,12 @@ smoke_check_5(int metadata_write_strategy) if ( world_mpi_rank == world_server_mpi_rank ) { - if ( ! server_main() ) { + if ( ! server_main() ) { /* some error occured in the server -- report failure */ nerrors++; if ( verbose ) { - HDfprintf(stdout, "%d:%s: server_main() failed.\n", + HDfprintf(stdout, "%d:%s: server_main() failed.\n", world_mpi_rank, FUNC); } } @@ -6639,7 +6639,7 @@ smoke_check_5(int metadata_write_strategy) fid = -1; cache_ptr = NULL; if ( verbose ) { - HDfprintf(stdout, "%d:%s: setup_cache_for_test() failed.\n", + HDfprintf(stdout, "%d:%s: setup_cache_for_test() failed.\n", world_mpi_rank, FUNC); } } @@ -6649,60 +6649,60 @@ smoke_check_5(int metadata_write_strategy) insert_entry(cache_ptr, file_ptr, i, H5AC__NO_FLAGS_SET); } - /* flush the file so we can lock known clean entries. */ + /* flush the file so we can lock known clean entries. */ if ( H5Fflush(fid, H5F_SCOPE_GLOBAL) < 0 ) { nerrors++; if ( verbose ) { - HDfprintf(stdout, "%d:%s: H5Fflush() failed.\n", + HDfprintf(stdout, "%d:%s: H5Fflush() failed.\n", world_mpi_rank, FUNC); } } for ( i = 0; i < (virt_num_data_entries / 4); i++ ) { - lock_entry(file_ptr, i); + lock_entry(file_ptr, i); - if ( i % 2 == 0 ) - { - mark_entry_dirty(i); - } + if ( i % 2 == 0 ) + { + mark_entry_dirty(i); + } - unlock_entry(file_ptr, i, H5AC__NO_FLAGS_SET); + unlock_entry(file_ptr, i, H5AC__NO_FLAGS_SET); - if ( i % 2 == 1 ) - { - if ( i % 4 == 1 ) { + if ( i % 2 == 1 ) + { + if ( i % 4 == 1 ) { - lock_entry(file_ptr, i); - unlock_entry(file_ptr, i, H5AC__DIRTIED_FLAG); - } + lock_entry(file_ptr, i); + unlock_entry(file_ptr, i, H5AC__DIRTIED_FLAG); + } - expunge_entry(file_ptr, i); - } + expunge_entry(file_ptr, i); + } } for ( i = (virt_num_data_entries / 2) - 1; i >= (virt_num_data_entries / 4); - i-- ) + i-- ) { - pin_entry(file_ptr, i, TRUE, FALSE); + pin_entry(file_ptr, i, TRUE, FALSE); - if ( i % 2 == 0 ) - { - if ( i % 8 <= 4 ) { + if ( i % 2 == 0 ) + { + if ( i % 8 <= 4 ) { - resize_entry(i, data[i].len / 2); - } + resize_entry(i, data[i].len / 2); + } mark_entry_dirty(i); - if ( i % 8 <= 4 ) { + if ( i % 8 <= 4 ) { - resize_entry(i, data[i].len); - } - } + resize_entry(i, data[i].len); + } + } - unpin_entry(file_ptr, i, TRUE, FALSE, FALSE); + unpin_entry(file_ptr, i, TRUE, FALSE, FALSE); } if ( fid >= 0 ) { @@ -6711,7 +6711,7 @@ smoke_check_5(int metadata_write_strategy) nerrors++; if ( verbose ) { - HDfprintf(stdout, "%d:%s: take_down_cache() failed.\n", + HDfprintf(stdout, "%d:%s: take_down_cache() failed.\n", world_mpi_rank, FUNC); } } @@ -6757,9 +6757,9 @@ smoke_check_5(int metadata_write_strategy) if ( world_mpi_rank == 0 ) { - if ( max_nerrors == 0 ) { + if ( max_nerrors == 0 ) { - PASSED(); + PASSED(); } else { @@ -6774,10 +6774,10 @@ smoke_check_5(int metadata_write_strategy) } /* smoke_check_5() */ - + /***************************************************************************** * - * Function: trace_file_check() + * Function: trace_file_check() * * Purpose: A basic test of the trace file capability. In essence, * we invoke all operations that generate trace file output, @@ -6807,11 +6807,11 @@ smoke_check_5(int metadata_write_strategy) * * This test is skipped if H5_METADATA_TRACE_FILE is undefined. * - * Return: Success: TRUE + * Return: Success: TRUE * - * Failure: FALSE + * Failure: FALSE * - * Programmer: JRM -- 6/13/06 + * Programmer: JRM -- 6/13/06 * *****************************************************************************/ static hbool_t @@ -6896,25 +6896,25 @@ trace_file_check(int metadata_write_strategy) switch ( metadata_write_strategy ) { - case H5AC_METADATA_WRITE_STRATEGY__PROCESS_0_ONLY: + case H5AC_METADATA_WRITE_STRATEGY__PROCESS_0_ONLY: #ifdef H5_METADATA_TRACE_FILE expected_output = &expected_output_0; #endif /* H5_METADATA_TRACE_FILE */ if ( world_mpi_rank == 0 ) { - TESTING( - "trace file collection -- process 0 only md write strategy"); + TESTING( + "trace file collection -- process 0 only md write strategy"); } - break; + break; - case H5AC_METADATA_WRITE_STRATEGY__DISTRIBUTED: + case H5AC_METADATA_WRITE_STRATEGY__DISTRIBUTED: #ifdef H5_METADATA_TRACE_FILE expected_output = &expected_output_1; #endif /* H5_METADATA_TRACE_FILE */ if ( world_mpi_rank == 0 ) { - TESTING( - "trace file collection -- distributed md write strategy"); + TESTING( + "trace file collection -- distributed md write strategy"); } - break; + break; default: #ifdef H5_METADATA_TRACE_FILE @@ -6924,9 +6924,9 @@ trace_file_check(int metadata_write_strategy) expected_output = &expected_output_0; #endif /* H5_METADATA_TRACE_FILE */ if ( world_mpi_rank == 0 ) { - TESTING("trace file collection -- unknown md write strategy"); + TESTING("trace file collection -- unknown md write strategy"); } - break; + break; } #ifdef H5_METADATA_TRACE_FILE @@ -6937,12 +6937,12 @@ trace_file_check(int metadata_write_strategy) if ( world_mpi_rank == world_server_mpi_rank ) { - if ( ! server_main() ) { + if ( ! server_main() ) { /* some error occured in the server -- report failure */ nerrors++; if ( verbose ) { - HDfprintf(stdout, "%d:%s: server_main() failed.\n", + HDfprintf(stdout, "%d:%s: server_main() failed.\n", world_mpi_rank, FUNC); } } @@ -6957,7 +6957,7 @@ trace_file_check(int metadata_write_strategy) fid = -1; cache_ptr = NULL; if ( verbose ) { - HDfprintf(stdout, "%d:%s: setup_cache_for_test() failed.\n", + HDfprintf(stdout, "%d:%s: setup_cache_for_test() failed.\n", world_mpi_rank, FUNC); } } @@ -6969,58 +6969,58 @@ trace_file_check(int metadata_write_strategy) if ( H5AC_get_cache_auto_resize_config(cache_ptr, &config) != SUCCEED ) { - nerrors++; - HDfprintf(stdout, + nerrors++; + HDfprintf(stdout, "%d:%s: H5AC_get_cache_auto_resize_config() failed.\n", world_mpi_rank, FUNC); } else { config.open_trace_file = TRUE; - strcpy(config.trace_file_name, "t_cache_trace.txt"); + strcpy(config.trace_file_name, "t_cache_trace.txt"); if ( H5AC_set_cache_auto_resize_config(cache_ptr, &config) - != SUCCEED ) { + != SUCCEED ) { - nerrors++; - HDfprintf(stdout, + nerrors++; + HDfprintf(stdout, "%d:%s: H5AC_set_cache_auto_resize_config() failed.\n", world_mpi_rank, FUNC); } } } - insert_entry(cache_ptr, file_ptr, 0, H5AC__NO_FLAGS_SET); - insert_entry(cache_ptr, file_ptr, 1, H5AC__NO_FLAGS_SET); - insert_entry(cache_ptr, file_ptr, 2, H5AC__NO_FLAGS_SET); - insert_entry(cache_ptr, file_ptr, 3, H5AC__NO_FLAGS_SET); + insert_entry(cache_ptr, file_ptr, 0, H5AC__NO_FLAGS_SET); + insert_entry(cache_ptr, file_ptr, 1, H5AC__NO_FLAGS_SET); + insert_entry(cache_ptr, file_ptr, 2, H5AC__NO_FLAGS_SET); + insert_entry(cache_ptr, file_ptr, 3, H5AC__NO_FLAGS_SET); - lock_entry(file_ptr, 0); - mark_entry_dirty(0); - unlock_entry(file_ptr, 0, H5AC__NO_FLAGS_SET); + lock_entry(file_ptr, 0); + mark_entry_dirty(0); + unlock_entry(file_ptr, 0, H5AC__NO_FLAGS_SET); - lock_entry(file_ptr, 1); + lock_entry(file_ptr, 1); pin_protected_entry(1, TRUE); - unlock_entry(file_ptr, 1, H5AC__NO_FLAGS_SET); + unlock_entry(file_ptr, 1, H5AC__NO_FLAGS_SET); unpin_entry(file_ptr, 1, TRUE, FALSE, FALSE); expunge_entry(file_ptr, 1); - lock_entry(file_ptr, 2); + lock_entry(file_ptr, 2); pin_protected_entry(2, TRUE); - unlock_entry(file_ptr, 2, H5AC__NO_FLAGS_SET); - mark_entry_dirty(2); + unlock_entry(file_ptr, 2, H5AC__NO_FLAGS_SET); + mark_entry_dirty(2); resize_entry(2, data[2].len / 2); resize_entry(2, data[2].len); unpin_entry(file_ptr, 2, TRUE, FALSE, FALSE); - move_entry(file_ptr, 0, 20); - move_entry(file_ptr, 0, 20); + move_entry(file_ptr, 0, 20); + move_entry(file_ptr, 0, 20); if ( H5Fflush(fid, H5F_SCOPE_GLOBAL) < 0 ) { nerrors++; if ( verbose ) { - HDfprintf(stdout, "%d:%s: H5Fflush() failed.\n", + HDfprintf(stdout, "%d:%s: H5Fflush() failed.\n", world_mpi_rank, FUNC); } } @@ -7032,8 +7032,8 @@ trace_file_check(int metadata_write_strategy) if ( H5AC_get_cache_auto_resize_config(cache_ptr, &config) != SUCCEED ) { - nerrors++; - HDfprintf(stdout, + nerrors++; + HDfprintf(stdout, "%d:%s: H5AC_get_cache_auto_resize_config() failed.\n", world_mpi_rank, FUNC); @@ -7041,13 +7041,13 @@ trace_file_check(int metadata_write_strategy) config.open_trace_file = FALSE; config.close_trace_file = TRUE; - config.trace_file_name[0] = '\0'; + config.trace_file_name[0] = '\0'; if ( H5AC_set_cache_auto_resize_config(cache_ptr, &config) - != SUCCEED ) { + != SUCCEED ) { - nerrors++; - HDfprintf(stdout, + nerrors++; + HDfprintf(stdout, "%d:%s: H5AC_set_cache_auto_resize_config() failed.\n", world_mpi_rank, FUNC); } @@ -7060,7 +7060,7 @@ trace_file_check(int metadata_write_strategy) nerrors++; if ( verbose ) { - HDfprintf(stdout, "%d:%s: take_down_cache() failed.\n", + HDfprintf(stdout, "%d:%s: take_down_cache() failed.\n", world_mpi_rank, FUNC); } } @@ -7103,10 +7103,10 @@ trace_file_check(int metadata_write_strategy) if ( nerrors == 0 ) { - sprintf(trace_file_name, "t_cache_trace.txt.%d", - (int)file_mpi_rank); + sprintf(trace_file_name, "t_cache_trace.txt.%d", + (int)file_mpi_rank); - if ( (trace_file_ptr = HDfopen(trace_file_name, "r")) == NULL ) { + if ( (trace_file_ptr = HDfopen(trace_file_name, "r")) == NULL ) { nerrors++; if ( verbose ) { @@ -7114,59 +7114,59 @@ trace_file_check(int metadata_write_strategy) world_mpi_rank, FUNC); } } - } + } - i = 0; - while ( ( nerrors == 0 ) && ( ! done ) ) - { - if ( (*expected_output)[i] == NULL ) { + i = 0; + while ( ( nerrors == 0 ) && ( ! done ) ) + { + if ( (*expected_output)[i] == NULL ) { - expected_line_len = 0; + expected_line_len = 0; - } else { + } else { - expected_line_len = HDstrlen((*expected_output)[i]); - } + expected_line_len = HDstrlen((*expected_output)[i]); + } - if ( HDfgets(buffer, 255, trace_file_ptr) != NULL ) { + if ( HDfgets(buffer, 255, trace_file_ptr) != NULL ) { - actual_line_len = strlen(buffer); + actual_line_len = strlen(buffer); - } else { + } else { - actual_line_len = 0; - } + actual_line_len = 0; + } - if ( ( actual_line_len == 0 ) && ( expected_line_len == 0 ) ) { + if ( ( actual_line_len == 0 ) && ( expected_line_len == 0 ) ) { - done = TRUE; + done = TRUE; - } else if ( ( actual_line_len != expected_line_len ) || - ( HDstrcmp(buffer, (*expected_output)[i]) != 0 ) ) { + } else if ( ( actual_line_len != expected_line_len ) || + ( HDstrcmp(buffer, (*expected_output)[i]) != 0 ) ) { - nerrors++; + nerrors++; if ( verbose ) { HDfprintf(stdout, - "%d:%s: Unexpected data in trace file line %d.\n", + "%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, (*expected_output)[i], - expected_line_len); - HDfprintf(stdout, "%d:%s: actual = \"%s\" %d\n", - world_mpi_rank, FUNC, buffer, - actual_line_len); + HDfprintf(stdout, "%d:%s: expected = \"%s\" %d\n", + world_mpi_rank, FUNC, (*expected_output)[i], + expected_line_len); + HDfprintf(stdout, "%d:%s: actual = \"%s\" %d\n", + world_mpi_rank, FUNC, buffer, + actual_line_len); } - } else { - i++; - } - } + } else { + i++; + } + } - if ( trace_file_ptr != NULL ) { + if ( trace_file_ptr != NULL ) { - HDfclose(trace_file_ptr); - trace_file_ptr = NULL; + HDfclose(trace_file_ptr); + trace_file_ptr = NULL; #if 1 - HDremove(trace_file_name); + HDremove(trace_file_name); #endif } } @@ -7175,9 +7175,9 @@ trace_file_check(int metadata_write_strategy) if ( world_mpi_rank == 0 ) { - if ( max_nerrors == 0 ) { + if ( max_nerrors == 0 ) { - PASSED(); + PASSED(); } else { @@ -7203,18 +7203,18 @@ trace_file_check(int metadata_write_strategy) } /* trace_file_check() */ - + /***************************************************************************** * - * Function: smoke_check_6() + * Function: smoke_check_6() * - * Purpose: Sixth smoke check for the parallel cache. + * Purpose: Sixth smoke check for the parallel cache. * - * Return: Success: TRUE + * Return: Success: TRUE * - * Failure: FALSE + * Failure: FALSE * - * Programmer: JRM -- 1/13/06 + * Programmer: JRM -- 1/13/06 * *****************************************************************************/ static hbool_t @@ -7230,23 +7230,23 @@ smoke_check_6(int metadata_write_strategy) switch ( metadata_write_strategy ) { - case H5AC_METADATA_WRITE_STRATEGY__PROCESS_0_ONLY: + case H5AC_METADATA_WRITE_STRATEGY__PROCESS_0_ONLY: if ( world_mpi_rank == 0 ) { - TESTING("smoke check #6 -- process 0 only md write strategy"); + TESTING("smoke check #6 -- process 0 only md write strategy"); } - break; + break; - case H5AC_METADATA_WRITE_STRATEGY__DISTRIBUTED: + case H5AC_METADATA_WRITE_STRATEGY__DISTRIBUTED: if ( world_mpi_rank == 0 ) { - TESTING("smoke check #6 -- distributed md write strategy"); + TESTING("smoke check #6 -- distributed md write strategy"); } - break; + break; default: if ( world_mpi_rank == 0 ) { - TESTING("smoke check #6 -- unknown md write strategy"); + TESTING("smoke check #6 -- unknown md write strategy"); } - break; + break; } nerrors = 0; @@ -7255,12 +7255,12 @@ smoke_check_6(int metadata_write_strategy) if ( world_mpi_rank == world_server_mpi_rank ) { - if ( ! server_main() ) { + if ( ! server_main() ) { /* some error occured in the server -- report failure */ nerrors++; if ( verbose ) { - HDfprintf(stdout, "%d:%s: server_main() failed.\n", + HDfprintf(stdout, "%d:%s: server_main() failed.\n", world_mpi_rank, FUNC); } } @@ -7276,7 +7276,7 @@ smoke_check_6(int metadata_write_strategy) fid = -1; cache_ptr = NULL; if ( verbose ) { - HDfprintf(stdout, "%d:%s: setup_cache_for_test() failed.\n", + HDfprintf(stdout, "%d:%s: setup_cache_for_test() failed.\n", world_mpi_rank, FUNC); } } @@ -7326,11 +7326,11 @@ smoke_check_6(int metadata_write_strategy) HDassert(cache_ptr->max_cache_size*0.8 > cache_ptr->coll_list_size); } - /* flush the file */ + /* flush the file */ if ( H5Fflush(fid, H5F_SCOPE_GLOBAL) < 0 ) { nerrors++; if ( verbose ) { - HDfprintf(stdout, "%d:%s: H5Fflush() failed.\n", + HDfprintf(stdout, "%d:%s: H5Fflush() failed.\n", world_mpi_rank, FUNC); } } @@ -7342,7 +7342,7 @@ smoke_check_6(int metadata_write_strategy) struct datum * entry_ptr; entry_ptr = &(data[i]); - lock_entry(file_ptr, i); + lock_entry(file_ptr, i); if(TRUE != entry_ptr->header.coll_access) { nerrors++; @@ -7363,7 +7363,7 @@ smoke_check_6(int metadata_write_strategy) struct datum * entry_ptr; entry_ptr = &(data[i]); - lock_entry(file_ptr, i); + lock_entry(file_ptr, i); if(FALSE != entry_ptr->header.coll_access) { nerrors++; @@ -7388,7 +7388,7 @@ smoke_check_6(int metadata_write_strategy) nerrors++; if ( verbose ) { - HDfprintf(stdout, "%d:%s: take_down_cache() failed.\n", + HDfprintf(stdout, "%d:%s: take_down_cache() failed.\n", world_mpi_rank, FUNC); } } @@ -7436,9 +7436,9 @@ smoke_check_6(int metadata_write_strategy) if ( world_mpi_rank == 0 ) { - if ( max_nerrors == 0 ) { + if ( max_nerrors == 0 ) { - PASSED(); + PASSED(); } else { @@ -7453,18 +7453,18 @@ smoke_check_6(int metadata_write_strategy) } /* smoke_check_6() */ - + /***************************************************************************** * - * Function: main() + * Function: main() * - * Purpose: Main function for the parallel cache test. + * Purpose: Main function for the parallel cache test. * - * Return: Success: 0 + * Return: Success: 0 * - * Failure: 1 + * Failure: 1 * - * Programmer: JRM -- 12/23/05 + * Programmer: JRM -- 12/23/05 * *****************************************************************************/ int @@ -7491,7 +7491,7 @@ main(int argc, char **argv) * calls. By then, MPI calls may not work. */ if (H5dont_atexit() < 0){ - printf("%d:Failed to turn off atexit processing. Continue.\n", + printf("%d:Failed to turn off atexit processing. Continue.\n", mpi_rank); }; H5open(); @@ -7502,32 +7502,32 @@ main(int argc, char **argv) #endif /* JRM */ if ( express_test ) { - virt_num_data_entries = EXPRESS_VIRT_NUM_DATA_ENTRIES; + virt_num_data_entries = EXPRESS_VIRT_NUM_DATA_ENTRIES; } else { - virt_num_data_entries = STD_VIRT_NUM_DATA_ENTRIES; + virt_num_data_entries = STD_VIRT_NUM_DATA_ENTRIES; } #ifdef H5_HAVE_MPE - if ( MAINPROCESS ) { printf(" Tests compiled for MPE.\n"); } + if ( MAINPROCESS ) { printf(" Tests compiled for MPE.\n"); } virt_num_data_entries = MPE_VIRT_NUM_DATA_ENTIES; #endif /* H5_HAVE_MPE */ if (MAINPROCESS){ - printf("===================================\n"); - printf("Parallel metadata cache tests\n"); - printf(" mpi_size = %d\n", mpi_size); - printf(" express_test = %d\n", express_test); - printf("===================================\n"); + printf("===================================\n"); + printf("Parallel metadata cache tests\n"); + printf(" mpi_size = %d\n", mpi_size); + printf(" express_test = %d\n", express_test); + printf("===================================\n"); } if ( mpi_size < 3 ) { if ( MAINPROCESS ) { - printf(" Need at least 3 processes. Exiting.\n"); + printf(" Need at least 3 processes. Exiting.\n"); } goto finish; } @@ -7546,8 +7546,8 @@ main(int argc, char **argv) /* setup file access property list with the world communicator */ if ( FAIL == (fapl = H5Pcreate(H5P_FILE_ACCESS)) ) { nerrors++; - if ( verbose ) { - HDfprintf(stdout, "%d:%s: H5Pcreate() failed 1.\n", + if ( verbose ) { + HDfprintf(stdout, "%d:%s: H5Pcreate() failed 1.\n", world_mpi_rank, FUNC); } } @@ -7579,8 +7579,8 @@ main(int argc, char **argv) /* close the fapl before we set it up again */ if ( H5Pclose(fapl) < 0 ) { nerrors++; - if ( verbose ) { - HDfprintf(stdout, "%d:%s: H5Pclose() failed.\n", + if ( verbose ) { + HDfprintf(stdout, "%d:%s: H5Pclose() failed.\n", world_mpi_rank, FUNC); } } @@ -7590,9 +7590,9 @@ main(int argc, char **argv) /* setup file access property list */ if ( FAIL == (fapl = H5Pcreate(H5P_FILE_ACCESS)) ) { - nerrors++; - if ( verbose ) { - HDfprintf(stdout, "%d:%s: H5Pcreate() failed 2.\n", + nerrors++; + if ( verbose ) { + HDfprintf(stdout, "%d:%s: H5Pcreate() failed 2.\n", world_mpi_rank, FUNC); } } @@ -7600,8 +7600,8 @@ main(int argc, char **argv) if ( H5Pset_fapl_mpio(fapl, file_mpi_comm, MPI_INFO_NULL) < 0 ) { nerrors++; - if ( verbose ) { - HDfprintf(stdout, "%d:%s: H5Pset_fapl_mpio() failed 2.\n", + if ( verbose ) { + HDfprintf(stdout, "%d:%s: H5Pset_fapl_mpio() failed 2.\n", world_mpi_rank, FUNC); } } @@ -7619,7 +7619,7 @@ main(int argc, char **argv) HDfprintf(stdout, "Errors in test initialization. Exiting.\n"); } - goto finish; + goto finish; } /* run the tests */ @@ -7672,16 +7672,16 @@ finish: * and exit. */ MPI_Barrier(MPI_COMM_WORLD); - if (MAINPROCESS){ /* only process 0 reports */ - printf("===================================\n"); - if (failures){ - printf("***metadata cache tests detected %d failures***\n", + if (MAINPROCESS){ /* only process 0 reports */ + printf("===================================\n"); + if (failures){ + printf("***metadata cache tests detected %d failures***\n", failures); - } - else{ - printf("metadata cache tests finished with no failures\n"); - } - printf("===================================\n"); + } + else{ + printf("metadata cache tests finished with no failures\n"); + } + printf("===================================\n"); } takedown_derived_types(); diff --git a/testpar/t_cache_image.c b/testpar/t_cache_image.c index 12479c7..fc88c61 100644 --- a/testpar/t_cache_image.c +++ b/testpar/t_cache_image.c @@ -14,8 +14,8 @@ /* Programmer: John Mainzer * 7/13/15 * - * This file contains tests specific to the cache image - * feature implemented in H5C.c + * This file contains tests specific to the cache image + * feature implemented in H5C.c */ #include "testphdf5.h" @@ -27,7 +27,7 @@ #define DSET_SIZE (40 * CHUNK_SIZE) #define MAX_NUM_DSETS 256 #define PAR_NUM_DSETS 32 -#define PAGE_SIZE (4 * 1024) +#define PAGE_SIZE (4 * 1024) #define PB_SIZE (64 * PAGE_SIZE) /* global variable declarations: */ @@ -58,8 +58,8 @@ static void open_hdf5_file(const hbool_t create_file, hid_t * file_id_ptr, H5F_t ** file_ptr_ptr, H5C_t ** cache_ptr_ptr, - MPI_Comm comm, - MPI_Info info, + MPI_Comm comm, + MPI_Info info, int l_facc_type, const hbool_t all_coll_metadata_ops, const hbool_t coll_metadata_write, @@ -69,11 +69,11 @@ static void verify_data_sets(hid_t file_id, int min_dset, int max_dset); /* local test function declarations */ -static hbool_t parse_flags(int argc, char * argv[], hbool_t * setup_ptr, +static hbool_t parse_flags(int argc, char * argv[], hbool_t * setup_ptr, hbool_t * ici_ptr, int * file_idx_ptr, int * mpi_size_ptr, hbool_t display); static void usage(void); static unsigned construct_test_file(int test_file_index); -static void par_create_dataset(int dset_num, hid_t file_id, int mpi_rank, +static void par_create_dataset(int dset_num, hid_t file_id, int mpi_rank, int mpi_size); static void par_delete_dataset(int dset_num, hid_t file_id, int mpi_rank); static void par_verify_dataset(int dset_num, hid_t file_id, int mpi_rank); @@ -82,15 +82,15 @@ static hbool_t serial_insert_cache_image(int file_name_idx, int mpi_size); static void serial_verify_dataset(int dset_num, hid_t file_id, int mpi_size); /* top level test function declarations */ -static unsigned verify_cache_image_RO(int file_name_id, +static unsigned verify_cache_image_RO(int file_name_id, int md_write_strat, int mpi_rank); -static unsigned verify_cache_image_RW(int file_name_id, +static unsigned verify_cache_image_RW(int file_name_id, int md_write_strat, int mpi_rank); -static hbool_t smoke_check_1(MPI_Comm mpi_comm, MPI_Info mpi_info, +static hbool_t smoke_check_1(MPI_Comm mpi_comm, MPI_Info mpi_info, int mpi_rank, int mpi_size); - + /****************************************************************************/ /***************************** Utility Functions ****************************/ /****************************************************************************/ @@ -98,52 +98,52 @@ static hbool_t smoke_check_1(MPI_Comm mpi_comm, MPI_Info mpi_info, /*------------------------------------------------------------------------- * Function: construct_test_file() * - * Purpose: This function attempts to mimic the typical "poor man's - * parallel use case in which the file is passed between - * processes, each of which open the file, write some data, - * close the file, and then pass control on to the next - * process. + * Purpose: This function attempts to mimic the typical "poor man's + * parallel use case in which the file is passed between + * processes, each of which open the file, write some data, + * close the file, and then pass control on to the next + * process. * - * In this case, we create one group for each process, and - * populate it with a "zoo" of HDF5 objects selected to - * (ideally) exercise all HDF5 on disk data structures. + * In this case, we create one group for each process, and + * populate it with a "zoo" of HDF5 objects selected to + * (ideally) exercise all HDF5 on disk data structures. * - * The end result is a test file used verify that PHDF5 - * can open a file with a cache image. + * The end result is a test file used verify that PHDF5 + * can open a file with a cache image. * - * Cycle of operation + * Cycle of operation * - * 1) Create a HDF5 file with the cache image FAPL entry. + * 1) Create a HDF5 file with the cache image FAPL entry. * - * Verify that the cache is informed of the cache image - * FAPL entry. + * Verify that the cache is informed of the cache image + * FAPL entry. * - * Set all cache image flags, forcing full functionality. + * Set all cache image flags, forcing full functionality. * - * 2) Create a data set in the file. + * 2) Create a data set in the file. * - * 3) Close the file. + * 3) Close the file. * - * 4) Open the file. + * 4) Open the file. * - * Verify that the metadata cache is instructed to load + * Verify that the metadata cache is instructed to load * the metadata cache image. * - * 5) Create a data set in the file. + * 5) Create a data set in the file. * - * 6) Close the file. If enough datasets have been created + * 6) Close the file. If enough datasets have been created * goto 7. Otherwise return to 4. * - * 7) Open the file R/O. + * 7) Open the file R/O. * * Verify that the file contains a metadata cache image * superblock extension message. - * - * 8) Verify all data sets. * - * Verify that the cache image has been loaded. + * 8) Verify all data sets. + * + * Verify that the cache image has been loaded. * - * 9) close the file. + * 9) close the file. * * Return: void * @@ -152,7 +152,7 @@ static hbool_t smoke_check_1(MPI_Comm mpi_comm, MPI_Info mpi_info, * * Modifications: * - * None. + * None. * *------------------------------------------------------------------------- */ @@ -174,7 +174,7 @@ construct_test_file(int test_file_index) pass = TRUE; - if ( show_progress ) + if ( show_progress ) HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); @@ -183,7 +183,7 @@ construct_test_file(int test_file_index) HDassert(FILENAMES[test_file_index]); - if ( h5_fixname(FILENAMES[test_file_index], H5P_DEFAULT, + if ( h5_fixname(FILENAMES[test_file_index], H5P_DEFAULT, filename, sizeof(filename)) == NULL ) { @@ -192,13 +192,13 @@ construct_test_file(int test_file_index) } } - if ( show_progress ) + if ( show_progress ) HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); - /* 1) Create a HDF5 file with the cache image FAPL entry. + /* 1) Create a HDF5 file with the cache image FAPL entry. * - * Verify that the cache is informed of the cache image FAPL entry. + * Verify that the cache is informed of the cache image FAPL entry. * * Set flags forcing full function of the cache image feature. */ @@ -209,7 +209,7 @@ construct_test_file(int test_file_index) /* mdci_sbem_expected */ FALSE, /* read_only */ FALSE, /* set_mdci_fapl */ TRUE, - /* config_fsm */ TRUE, + /* config_fsm */ TRUE, /* enable_page_buffer */ FALSE, /* hdf_file_name */ filename, /* cache_image_flags */ H5C_CI__ALL_FLAGS, @@ -224,7 +224,7 @@ construct_test_file(int test_file_index) /* md_write_strat */ 0); } - if ( show_progress ) + if ( show_progress ) HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); @@ -246,7 +246,7 @@ construct_test_file(int test_file_index) } #endif /* H5C_COLLECT_CACHE_STATS */ - if ( show_progress ) + if ( show_progress ) HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); @@ -262,7 +262,7 @@ construct_test_file(int test_file_index) } } - if ( show_progress ) + if ( show_progress ) HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); @@ -281,7 +281,7 @@ construct_test_file(int test_file_index) /* mdci_sbem_expected */ TRUE, /* read_only */ FALSE, /* set_mdci_fapl */ TRUE, - /* config_fsm */ FALSE, + /* config_fsm */ FALSE, /* enable_page_buffer */ FALSE, /* hdf_file_name */ filename, /* cache_image_flags */ H5C_CI__ALL_FLAGS, @@ -355,7 +355,7 @@ construct_test_file(int test_file_index) /* mdci_sbem_expected */ TRUE, /* read_only */ TRUE, /* set_mdci_fapl */ FALSE, - /* config_fsm */ FALSE, + /* config_fsm */ FALSE, /* enable_page_buffer */ FALSE, /* hdf_file_name */ filename, /* cache_image_flags */ H5C_CI__ALL_FLAGS, @@ -374,7 +374,7 @@ construct_test_file(int test_file_index) HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); - /* 8) Open and close all data sets. + /* 8) Open and close all data sets. * * Verify that the cache image has been loaded. */ @@ -413,15 +413,15 @@ construct_test_file(int test_file_index) } /* construct_test_file() */ - + /*------------------------------------------------------------------------- * Function: create_data_sets() * * Purpose: If pass is TRUE on entry, create the specified data sets - * in the indicated file. + * in the indicated file. * - * Data sets and their contents must be well know, as we - * will verify that they contain the expected data later. + * Data sets and their contents must be well know, as we + * will verify that they contain the expected data later. * * On failure, set pass to FALSE, and set failure_mssg * to point to an appropriate failure message. @@ -435,15 +435,15 @@ construct_test_file(int test_file_index) * * Modifications: * - * Added min_dset and max_dset parameters and supporting - * code. This allows the caller to specify a range of - * datasets to create. - * JRM -- 8/20/15 + * Added min_dset and max_dset parameters and supporting + * code. This allows the caller to specify a range of + * datasets to create. + * JRM -- 8/20/15 * *------------------------------------------------------------------------- */ -static void +static void create_data_sets(hid_t file_id, int min_dset, int max_dset) { const char * fcn_name = "create_data_sets()"; @@ -665,8 +665,8 @@ create_data_sets(hid_t file_id, int min_dset, int max_dset) /* read the chunk from file */ if ( pass ) { - status = H5Dread(dataset_ids[m], H5T_NATIVE_INT, - memspace_id, filespace_ids[m], + status = H5Dread(dataset_ids[m], H5T_NATIVE_INT, + memspace_id, filespace_ids[m], H5P_DEFAULT, data_chunk); if ( status < 0 ) { @@ -691,7 +691,7 @@ create_data_sets(hid_t file_id, int min_dset, int max_dset) valid_chunk = FALSE; - if ( verbose ) { + if ( verbose ) { HDfprintf(stdout, "data_chunk[%0d][%0d] = %0d, expect %0d.\n", @@ -701,7 +701,7 @@ create_data_sets(hid_t file_id, int min_dset, int max_dset) HDfprintf(stdout, "m = %d, i = %d, j = %d, k = %d, l = %d\n", m, i, j, k, l); - } + } } } } @@ -711,12 +711,12 @@ create_data_sets(hid_t file_id, int min_dset, int max_dset) pass = FALSE; failure_mssg = "slab validation failed."; - if ( verbose ) { + if ( verbose ) { - fprintf(stdout, + fprintf(stdout, "Chunk (%0d, %0d) in /dset%03d is invalid.\n", i, j, m); - } + } } } m++; @@ -767,16 +767,16 @@ create_data_sets(hid_t file_id, int min_dset, int max_dset) } /* create_data_sets() */ - + /*------------------------------------------------------------------------- * Function: delete_data_sets() * - * Purpose: If pass is TRUE on entry, verify and then delete the - * dataset(s) indicated by min_dset and max_dset in the - * indicated file. + * Purpose: If pass is TRUE on entry, verify and then delete the + * dataset(s) indicated by min_dset and max_dset in the + * indicated file. * - * Data sets and their contents must be well know, as we - * will verify that they contain the expected data later. + * Data sets and their contents must be well know, as we + * will verify that they contain the expected data later. * * On failure, set pass to FALSE, and set failure_mssg * to point to an appropriate failure message. @@ -791,17 +791,17 @@ create_data_sets(hid_t file_id, int min_dset, int max_dset) * Modifications: * * None. - * JRM -- 8/20/15 + * JRM -- 8/20/15 * *------------------------------------------------------------------------- */ -#if 0 +#if 0 /* this code will be needed to test full support of cache image * in parallel -- keep it around against that day. * * -- JRM */ -static void +static void delete_data_sets(hid_t file_id, int min_dset, int max_dset) { const char * fcn_name = "delete_data_sets()"; @@ -832,11 +832,11 @@ delete_data_sets(hid_t file_id, int min_dset, int max_dset) { sprintf(dset_name, "/dset%03d", i); - if ( H5Ldelete(file_id, dset_name, H5P_DEFAULT) < 0) { + if ( H5Ldelete(file_id, dset_name, H5P_DEFAULT) < 0) { pass = FALSE; failure_mssg = "H5Ldelete() failed."; - } + } i++; } @@ -849,32 +849,32 @@ delete_data_sets(hid_t file_id, int min_dset, int max_dset) } /* delete_data_sets() */ #endif - + /*------------------------------------------------------------------------- * Function: open_hdf5_file() * - * Purpose: If pass is true on entry, create or open the specified HDF5 - * and test to see if it has a metadata cache image superblock - * extension message. + * Purpose: If pass is true on entry, create or open the specified HDF5 + * and test to see if it has a metadata cache image superblock + * extension message. * - * Set pass to FALSE and issue a suitable failure - * message if either the file contains a metadata cache image - * superblock extension and mdci_sbem_expected is TRUE, or - * vise versa. + * Set pass to FALSE and issue a suitable failure + * message if either the file contains a metadata cache image + * superblock extension and mdci_sbem_expected is TRUE, or + * vise versa. * - * If mdci_sbem_expected is TRUE, also verify that the metadata - * cache has been advised of this. + * If mdci_sbem_expected is TRUE, also verify that the metadata + * cache has been advised of this. * - * If read_only is TRUE, open the file read only. Otherwise - * open the file read/write. + * If read_only is TRUE, open the file read only. Otherwise + * open the file read/write. * - * If set_mdci_fapl is TRUE, set the metadata cache image - * FAPL entry when opening the file, and verify that the - * metadata cache is notified. + * If set_mdci_fapl is TRUE, set the metadata cache image + * FAPL entry when opening the file, and verify that the + * metadata cache is notified. * - * If config_fsm is TRUE, setup the persistant free space - * manager. Note that this flag may only be set if - * create_file is also TRUE. + * If config_fsm is TRUE, setup the persistant free space + * manager. Note that this flag may only be set if + * create_file is also TRUE. * * Return pointers to the cache data structure and file data * structures. @@ -892,10 +892,10 @@ delete_data_sets(hid_t file_id, int min_dset, int max_dset) * Modifications: * * Modified function to handle parallel file creates / opens. - * + * * JRM -- 2/1/17 * - * Modified function to handle + * Modified function to handle * *------------------------------------------------------------------------- */ @@ -903,17 +903,17 @@ delete_data_sets(hid_t file_id, int min_dset, int max_dset) static void open_hdf5_file(const hbool_t create_file, const hbool_t mdci_sbem_expected, - const hbool_t read_only, - const hbool_t set_mdci_fapl, - const hbool_t config_fsm, + const hbool_t read_only, + const hbool_t set_mdci_fapl, + const hbool_t config_fsm, const hbool_t enable_page_buffer, - const char * hdf_file_name, + const char * hdf_file_name, const unsigned cache_image_flags, hid_t * file_id_ptr, H5F_t ** file_ptr_ptr, H5C_t ** cache_ptr_ptr, - MPI_Comm comm, - MPI_Info info, + MPI_Comm comm, + MPI_Info info, int l_facc_type, const hbool_t all_coll_metadata_ops, const hbool_t coll_metadata_write, @@ -940,8 +940,8 @@ open_hdf5_file(const hbool_t create_file, if ( pass ) { - /* opening the file both read only and with a cache image - * requested is a contradiction. We resolve it by ignoring + /* opening the file both read only and with a cache image + * requested is a contradiction. We resolve it by ignoring * the cache image request silently. */ if ( ( create_file && mdci_sbem_expected ) || @@ -968,7 +968,7 @@ open_hdf5_file(const hbool_t create_file, } } - if ( show_progress ) + if ( show_progress ) HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); /* create a file access propertly list. */ @@ -983,13 +983,13 @@ open_hdf5_file(const hbool_t create_file, } } - if ( show_progress ) + if ( show_progress ) HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); /* call H5Pset_libver_bounds() on the fapl_id */ if ( pass ) { - if ( H5Pset_libver_bounds(fapl_id, H5F_LIBVER_LATEST, H5F_LIBVER_LATEST) + if ( H5Pset_libver_bounds(fapl_id, H5F_LIBVER_LATEST, H5F_LIBVER_LATEST) < 0 ) { pass = FALSE; @@ -997,7 +997,7 @@ open_hdf5_file(const hbool_t create_file, } } - if ( show_progress ) + if ( show_progress ) HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); /* get metadata cache image config -- verify that it is the default */ @@ -1015,7 +1015,7 @@ open_hdf5_file(const hbool_t create_file, H5AC__CURR_CACHE_IMAGE_CONFIG_VERSION ) || ( cache_image_config.generate_image != FALSE ) || ( cache_image_config.save_resize_status != FALSE ) || - ( cache_image_config.entry_ageout != + ( cache_image_config.entry_ageout != H5AC__CACHE_IMAGE__ENTRY_AGEOUT__NONE ) ) { pass = FALSE; @@ -1023,7 +1023,7 @@ open_hdf5_file(const hbool_t create_file, } } - if ( show_progress ) + if ( show_progress ) HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); /* set metadata cache image fapl entry if indicated */ @@ -1043,24 +1043,24 @@ open_hdf5_file(const hbool_t create_file, } } - if ( show_progress ) + if ( show_progress ) HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); /* setup the persistant free space manager if indicated */ if ( ( pass ) && ( config_fsm ) ) { - fcpl_id = H5Pcreate(H5P_FILE_CREATE); + fcpl_id = H5Pcreate(H5P_FILE_CREATE); - if ( fcpl_id <= 0 ) { + if ( fcpl_id <= 0 ) { - pass = FALSE; - failure_mssg = "H5Pcreate(H5P_FILE_CREATE) failed."; - } + pass = FALSE; + failure_mssg = "H5Pcreate(H5P_FILE_CREATE) failed."; + } } if ( ( pass ) && ( config_fsm ) ) { - if ( H5Pset_file_space_strategy(fcpl_id, H5F_FSPACE_STRATEGY_PAGE, + if ( H5Pset_file_space_strategy(fcpl_id, H5F_FSPACE_STRATEGY_PAGE, TRUE, (hsize_t)1) == FAIL ) { pass = FALSE; failure_mssg = "H5Pset_file_space_strategy() failed.\n"; @@ -1076,7 +1076,7 @@ open_hdf5_file(const hbool_t create_file, } } - if ( show_progress ) + if ( show_progress ) HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); /* setup the page buffer if indicated */ @@ -1086,10 +1086,10 @@ open_hdf5_file(const hbool_t create_file, pass = FALSE; failure_mssg = "H5Pset_page_buffer_size() failed.\n"; - } + } } - if ( show_progress ) + if ( show_progress ) HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); @@ -1097,13 +1097,13 @@ open_hdf5_file(const hbool_t create_file, /* set Parallel access with communicator */ if ( H5Pset_fapl_mpio(fapl_id, comm, info) < 0 ) { - + pass = FALSE; failure_mssg = "H5Pset_fapl_mpio() failed.\n"; } } - if ( show_progress ) + if ( show_progress ) HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); if ( ( pass ) && ( l_facc_type == FACC_MPIO ) ) { @@ -1115,7 +1115,7 @@ open_hdf5_file(const hbool_t create_file, } } - if ( show_progress ) + if ( show_progress ) HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); if ( ( pass ) && ( l_facc_type == FACC_MPIO ) ) { @@ -1127,7 +1127,7 @@ open_hdf5_file(const hbool_t create_file, } } - if ( show_progress ) + if ( show_progress ) HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); if ( ( pass ) && ( l_facc_type == FACC_MPIO ) ) { @@ -1136,7 +1136,7 @@ open_hdf5_file(const hbool_t create_file, H5AC_cache_config_t mdc_config; mdc_config.version = H5C__CURR_AUTO_SIZE_CTL_VER; - + if ( H5Pget_mdc_config(fapl_id, &mdc_config) < 0 ) { pass = FALSE; @@ -1152,7 +1152,7 @@ open_hdf5_file(const hbool_t create_file, } } - if ( show_progress ) + if ( show_progress ) HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); /* open the file */ @@ -1160,13 +1160,13 @@ open_hdf5_file(const hbool_t create_file, if ( create_file ) { - if ( fcpl_id != -1 ) + if ( fcpl_id != -1 ) - file_id = H5Fcreate(hdf_file_name, H5F_ACC_TRUNC, - fcpl_id, fapl_id); - else + file_id = H5Fcreate(hdf_file_name, H5F_ACC_TRUNC, + fcpl_id, fapl_id); + else - file_id = H5Fcreate(hdf_file_name, H5F_ACC_TRUNC, + file_id = H5Fcreate(hdf_file_name, H5F_ACC_TRUNC, H5P_DEFAULT, fapl_id); } else { @@ -1201,7 +1201,7 @@ open_hdf5_file(const hbool_t create_file, } } - if ( show_progress ) + if ( show_progress ) HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); /* get a pointer to the files internal data structure and then @@ -1220,12 +1220,12 @@ open_hdf5_file(const hbool_t create_file, } } - if ( show_progress ) + if ( show_progress ) HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); - /* verify expected page buffer status. At present, page buffering - * must be disabled in parallel -- hopefully this will change in the + /* verify expected page buffer status. At present, page buffering + * must be disabled in parallel -- hopefully this will change in the * future. */ if ( pass ) { @@ -1244,7 +1244,7 @@ open_hdf5_file(const hbool_t create_file, } } - if ( show_progress ) + if ( show_progress ) HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); @@ -1264,7 +1264,7 @@ open_hdf5_file(const hbool_t create_file, } } - if ( show_progress ) + if ( show_progress ) HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); @@ -1272,26 +1272,26 @@ open_hdf5_file(const hbool_t create_file, if ( set_mdci_fapl ) { - if ( read_only ) { + if ( read_only ) { - if ( ( image_ctl.version != + if ( ( image_ctl.version != H5AC__CURR_CACHE_IMAGE_CONFIG_VERSION ) || ( image_ctl.generate_image != FALSE ) || ( image_ctl.save_resize_status != FALSE ) || - ( image_ctl.entry_ageout != + ( image_ctl.entry_ageout != H5AC__CACHE_IMAGE__ENTRY_AGEOUT__NONE ) || ( image_ctl.flags != H5C_CI__ALL_FLAGS ) ) { pass = FALSE; failure_mssg = "Unexpected image_ctl values(1).\n"; } - } else { + } else { - if ( ( image_ctl.version != + if ( ( image_ctl.version != H5AC__CURR_CACHE_IMAGE_CONFIG_VERSION ) || - ( image_ctl.generate_image != TRUE ) || + ( image_ctl.generate_image != TRUE ) || ( image_ctl.save_resize_status != FALSE ) || - ( image_ctl.entry_ageout != + ( image_ctl.entry_ageout != H5AC__CACHE_IMAGE__ENTRY_AGEOUT__NONE ) || ( image_ctl.flags != H5C_CI__ALL_FLAGS ) ) { @@ -1301,11 +1301,11 @@ open_hdf5_file(const hbool_t create_file, } } else { - if ( ( image_ctl.version != + if ( ( image_ctl.version != H5AC__CURR_CACHE_IMAGE_CONFIG_VERSION ) || ( image_ctl.generate_image != FALSE ) || ( image_ctl.save_resize_status != FALSE ) || - ( image_ctl.entry_ageout != + ( image_ctl.entry_ageout != H5AC__CACHE_IMAGE__ENTRY_AGEOUT__NONE ) || ( image_ctl.flags != H5C_CI__ALL_FLAGS ) ) { @@ -1315,7 +1315,7 @@ open_hdf5_file(const hbool_t create_file, } } - if ( show_progress ) + if ( show_progress ) HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); if ( ( pass ) && ( set_mdci_fapl ) ) { @@ -1329,7 +1329,7 @@ open_hdf5_file(const hbool_t create_file, } } - if ( show_progress ) + if ( show_progress ) HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); if ( pass ) { @@ -1358,19 +1358,19 @@ open_hdf5_file(const hbool_t create_file, pass = FALSE; failure_mssg = "mdci sb extension message not present?\n"; } - } + } } else { - if ( ( cache_ptr->load_image == TRUE ) || + if ( ( cache_ptr->load_image == TRUE ) || ( cache_ptr->delete_image == TRUE ) ) { pass = FALSE; failure_mssg = "mdci sb extension message present?\n"; - } + } } } - if ( show_progress ) + if ( show_progress ) HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); if ( pass ) { @@ -1381,11 +1381,11 @@ open_hdf5_file(const hbool_t create_file, } if ( show_progress ) { - HDfprintf(stdout, "%s: cp = %d, pass = %d -- exiting.\n", + HDfprintf(stdout, "%s: cp = %d, pass = %d -- exiting.\n", fcn_name, cp++, pass); if ( ! pass ) - HDfprintf(stdout, "%s: failure_mssg = %s\n", + HDfprintf(stdout, "%s: failure_mssg = %s\n", fcn_name, failure_mssg); } @@ -1393,11 +1393,11 @@ open_hdf5_file(const hbool_t create_file, } /* open_hdf5_file() */ - + /*------------------------------------------------------------------------- * Function: par_create_dataset() * - * Purpose: Collectively create a chunked dataset, and fill it with + * Purpose: Collectively create a chunked dataset, and fill it with * known values. * * On failure, set pass to FALSE, and set failure_mssg @@ -1468,7 +1468,7 @@ par_create_dataset(int dset_num, } } - if ( show_progress ) + if ( show_progress ) HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); /* set the dataset creation plist to specify that the raw data is @@ -1486,7 +1486,7 @@ par_create_dataset(int dset_num, } } - if ( show_progress ) + if ( show_progress ) HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); if ( pass ) { @@ -1502,7 +1502,7 @@ par_create_dataset(int dset_num, } } - if ( show_progress ) + if ( show_progress ) HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); /* create the dataset */ @@ -1519,7 +1519,7 @@ par_create_dataset(int dset_num, } } - if ( show_progress ) + if ( show_progress ) HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); /* get the file space ID */ @@ -1534,7 +1534,7 @@ par_create_dataset(int dset_num, } } - if ( show_progress ) + if ( show_progress ) HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); /* create the mem space to be used to read and write chunks */ @@ -1552,7 +1552,7 @@ par_create_dataset(int dset_num, } } - if ( show_progress ) + if ( show_progress ) HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); /* select in memory hyperslab */ @@ -1574,7 +1574,7 @@ par_create_dataset(int dset_num, } } - if ( show_progress ) + if ( show_progress ) HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); /* setup the DXPL for collective I/O */ @@ -1589,7 +1589,7 @@ par_create_dataset(int dset_num, } } - if ( show_progress ) + if ( show_progress ) HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); if ( pass ) { @@ -1601,7 +1601,7 @@ par_create_dataset(int dset_num, } } - if ( show_progress ) + if ( show_progress ) HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); /* initialize the dataset with collective writes */ @@ -1612,8 +1612,8 @@ par_create_dataset(int dset_num, while ( ( pass ) && ( j < DSET_SIZE ) ) { - if ( show_progress ) - HDfprintf(stdout, "%s: cp = %d.0, pass = %d.\n", + if ( show_progress ) + HDfprintf(stdout, "%s: cp = %d.0, pass = %d.\n", fcn_name, cp, pass); /* initialize the slab */ @@ -1627,8 +1627,8 @@ par_create_dataset(int dset_num, } } - if ( show_progress ) - HDfprintf(stdout, "%s: cp = %d.1, pass = %d.\n", + if ( show_progress ) + HDfprintf(stdout, "%s: cp = %d.1, pass = %d.\n", fcn_name, cp, pass); /* select on disk hyperslab */ @@ -1636,7 +1636,7 @@ par_create_dataset(int dset_num, offset[1] = (hsize_t)i; offset[2] = (hsize_t)j; a_size[0] = (hsize_t)1; /* size of hyperslab */ - a_size[1] = CHUNK_SIZE; + a_size[1] = CHUNK_SIZE; a_size[2] = CHUNK_SIZE; status = H5Sselect_hyperslab(filespace_id, H5S_SELECT_SET, offset, NULL, a_size, NULL); @@ -1647,8 +1647,8 @@ par_create_dataset(int dset_num, failure_mssg = "disk H5Sselect_hyperslab() failed."; } - if ( show_progress ) - HDfprintf(stdout, "%s: cp = %d.2, pass = %d.\n", + if ( show_progress ) + HDfprintf(stdout, "%s: cp = %d.2, pass = %d.\n", fcn_name, cp, pass); /* write the chunk to file */ @@ -1661,8 +1661,8 @@ par_create_dataset(int dset_num, failure_mssg = "H5Dwrite() failed."; } - if ( show_progress ) - HDfprintf(stdout, "%s: cp = %d.3, pass = %d.\n", + if ( show_progress ) + HDfprintf(stdout, "%s: cp = %d.3, pass = %d.\n", fcn_name, cp, pass); j += CHUNK_SIZE; @@ -1672,7 +1672,7 @@ par_create_dataset(int dset_num, } cp++; - if ( show_progress ) + if ( show_progress ) HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); /* read data from data sets and validate it */ @@ -1761,7 +1761,7 @@ par_create_dataset(int dset_num, i += CHUNK_SIZE; } - if ( show_progress ) + if ( show_progress ) HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); /* close the data space */ @@ -1806,14 +1806,14 @@ par_create_dataset(int dset_num, failure_mssg = "H5Pclose(dxpl) failed."; } - if ( show_progress ) + if ( show_progress ) HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); return; } /* par_create_dataset() */ - + /*------------------------------------------------------------------------- * Function: par_delete_dataset() * @@ -1861,7 +1861,7 @@ par_delete_dataset(int dset_num, par_verify_dataset(dset_num, file_id, mpi_rank); } - if ( show_progress ) + if ( show_progress ) HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); /* delete the target dataset */ @@ -1874,21 +1874,29 @@ par_delete_dataset(int dset_num, } } - if ( show_progress ) + if ( show_progress ) HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); return; } /* par_delete_dataset() */ - + +/* This test uses many POSIX things that are not available on + * Windows. We're using a check for fork(2) here as a proxy for + * all POSIX/Unix/Linux things until this test can be made + * more platform-independent. + */ +#ifdef H5_HAVE_FORK + + /*------------------------------------------------------------------------- * Function: par_insert_cache_image() * * Purpose: Insert a cache image in the supplied file. * - * At present, cache image is not enabled in the parallel - * so we have to insert the cache image with a serial + * At present, cache image is not enabled in the parallel + * so we have to insert the cache image with a serial * process. Do this via a fork and an execv from process 0. * All processes wait until the child process completes, and * then return. @@ -1907,6 +1915,10 @@ par_delete_dataset(int dset_num, * * None. * + *-------------------------------------- + return; + +} /* par_insert_cache_image() */ *------------------------------------------------------------------------- */ @@ -1934,22 +1946,22 @@ par_insert_cache_image(int file_name_idx, int mpi_rank, int mpi_size ) /* fun and games to shutup the compiler */ char param0[32] = "t_cache_image"; char param1[32] = "ici"; - char * child_argv[] = {param0, - param1, - file_name_idx_str, - mpi_size_str, + char * child_argv[] = {param0, + param1, + file_name_idx_str, + mpi_size_str, NULL}; /* we may need to play with the path here */ if ( execv("t_cache_image", child_argv) == -1 ) { - HDfprintf(stdout, + HDfprintf(stdout, "execl() of ici process failed. errno = %d(%s)\n", errno, strerror(errno)); exit(1); } - } else if ( child_pid != -1 ) { + } else if ( child_pid != -1 ) { /* this is the parent process -- wait until child is done */ if ( -1 == waitpid(child_pid, &child_status, WUNTRACED)) { @@ -1972,7 +1984,7 @@ par_insert_cache_image(int file_name_idx, int mpi_rank, int mpi_size ) } } else { /* fork failed */ - HDfprintf(stdout, + HDfprintf(stdout, "can't create process to insert cache image.\n"); pass = FALSE; } @@ -1981,8 +1993,8 @@ par_insert_cache_image(int file_name_idx, int mpi_rank, int mpi_size ) if ( pass ) { - /* make sure insertion of the cache image is complete - * before proceeding + /* make sure insertion of the cache image is complete + * before proceeding */ MPI_Barrier(MPI_COMM_WORLD); } @@ -1990,8 +2002,17 @@ par_insert_cache_image(int file_name_idx, int mpi_rank, int mpi_size ) return; } /* par_insert_cache_image() */ +#else /* H5_HAVE_FORK */ + +static void +par_insert_cache_image(int file_name_idx, int mpi_rank, int mpi_size ) +{ + return; +} /* par_insert_cache_image() */ + +#endif /* H5_HAVE_FORK */ + - /*------------------------------------------------------------------------- * Function: par_verify_dataset() * @@ -2071,7 +2092,7 @@ par_verify_dataset(int dset_num, } } - if ( show_progress ) + if ( show_progress ) HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); /* create the mem space to be used to read */ @@ -2089,7 +2110,7 @@ par_verify_dataset(int dset_num, } } - if ( show_progress ) + if ( show_progress ) HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); /* select in memory hyperslab */ @@ -2111,7 +2132,7 @@ par_verify_dataset(int dset_num, } } - if ( show_progress ) + if ( show_progress ) HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); /* setup the DXPL for collective I/O */ @@ -2126,7 +2147,7 @@ par_verify_dataset(int dset_num, } } - if ( show_progress ) + if ( show_progress ) HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); if ( pass ) { @@ -2138,7 +2159,7 @@ par_verify_dataset(int dset_num, } } - if ( show_progress ) + if ( show_progress ) HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); /* read data from data sets and validate it */ @@ -2227,7 +2248,7 @@ par_verify_dataset(int dset_num, i += CHUNK_SIZE; } - if ( show_progress ) + if ( show_progress ) HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); /* close the file space */ @@ -2258,23 +2279,23 @@ par_verify_dataset(int dset_num, failure_mssg = "H5Pclose(dxpl) failed."; } - if ( show_progress ) + if ( show_progress ) HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); return; } /* par_verify_dataset() */ - + /*------------------------------------------------------------------------- * Function: serial_insert_cache_image() * * Purpose: Insert a cache image in the supplied file. * - * To populate the cache image, validate the contents - * of the file before closing. + * To populate the cache image, validate the contents + * of the file before closing. * - * On failure, print an appropriate error message and + * On failure, print an appropriate error message and * return FALSE. * * Return: TRUE if succussful, FALSE otherwise. @@ -2328,7 +2349,7 @@ serial_insert_cache_image(int file_name_idx, int mpi_size ) HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); - /* 2) Open the PHDF5 file with the cache image FAPL entry. + /* 2) Open the PHDF5 file with the cache image FAPL entry. */ if ( pass ) { @@ -2387,7 +2408,7 @@ serial_insert_cache_image(int file_name_idx, int mpi_size ) } /* serial_insert_cache_image() */ - + /*------------------------------------------------------------------------- * Function: serial_verify_dataset() * @@ -2463,7 +2484,7 @@ serial_verify_dataset(int dset_num, } } - if ( show_progress ) + if ( show_progress ) HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); /* create the mem space to be used to read */ @@ -2481,7 +2502,7 @@ serial_verify_dataset(int dset_num, } } - if ( show_progress ) + if ( show_progress ) HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); /* select in memory hyperslab */ @@ -2503,7 +2524,7 @@ serial_verify_dataset(int dset_num, } } - if ( show_progress ) + if ( show_progress ) HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); @@ -2600,7 +2621,7 @@ serial_verify_dataset(int dset_num, } - if ( show_progress ) + if ( show_progress ) HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); /* close the file space */ @@ -2624,18 +2645,18 @@ serial_verify_dataset(int dset_num, failure_mssg = "H5Sclose(memspace_id) failed."; } - if ( show_progress ) + if ( show_progress ) HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); return; } /* serial_verify_dataset() */ - + /*------------------------------------------------------------------------- * Function: parse_flags * - * Purpose: Parse the flags passed to this program, and load the + * Purpose: Parse the flags passed to this program, and load the * values into the supplied field. * * Return: Success: 1 @@ -2647,7 +2668,7 @@ serial_verify_dataset(int dset_num, *------------------------------------------------------------------------- */ static hbool_t -parse_flags(int argc, char * argv[], hbool_t * setup_ptr, +parse_flags(int argc, char * argv[], hbool_t * setup_ptr, hbool_t * ici_ptr, int * file_idx_ptr, int * mpi_size_ptr, hbool_t display) { const char * fcn_name = "parse_flags()"; @@ -2668,7 +2689,7 @@ parse_flags(int argc, char * argv[], hbool_t * setup_ptr, } - if ( ( success ) && + if ( ( success ) && ( ( argc != 1 ) && ( argc != 2 ) && ( argc != 4 ) ) ) { success = FALSE; @@ -2715,7 +2736,7 @@ parse_flags(int argc, char * argv[], hbool_t * setup_ptr, else if ( *ici_ptr ) - HDfprintf(stdout, "t_cache_image ici %d %d\n", + HDfprintf(stdout, "t_cache_image ici %d %d\n", *file_idx_ptr, *mpi_size_ptr); else @@ -2727,7 +2748,7 @@ parse_flags(int argc, char * argv[], hbool_t * setup_ptr, } /* parse_flags() */ - + /*------------------------------------------------------------------------- * Function: usage * @@ -2737,7 +2758,7 @@ parse_flags(int argc, char * argv[], hbool_t * setup_ptr, * Return: void * * Programmer: John Mainzer - * 4/28/11 + * 4/28/11 * * Modifications: * @@ -2791,17 +2812,17 @@ usage(void) return; } /* usage() */ - + /*------------------------------------------------------------------------- * Function: verify_data_sets() * - * Purpose: If pass is TRUE on entry, verify that the data sets in the - * file exist and contain the expected data. + * Purpose: If pass is TRUE on entry, verify that the data sets in the + * file exist and contain the expected data. * - * Note that these data sets were created by - * create_data_sets() above. Thus any changes in that - * function must be reflected in this function, and - * vise-versa. + * Note that these data sets were created by + * create_data_sets() above. Thus any changes in that + * function must be reflected in this function, and + * vise-versa. * * On failure, set pass to FALSE, and set failure_mssg * to point to an appropriate failure message. @@ -2815,15 +2836,15 @@ usage(void) * * Modifications: * - * Added min_dset and max_dset parameters and supporting - * code. This allows the caller to specify a range of - * datasets to verify. - * JRM -- 8/20/15 + * Added min_dset and max_dset parameters and supporting + * code. This allows the caller to specify a range of + * datasets to verify. + * JRM -- 8/20/15 * *------------------------------------------------------------------------- */ -static void +static void verify_data_sets(hid_t file_id, int min_dset, int max_dset) { const char * fcn_name = "verify_data_sets()"; @@ -2951,8 +2972,8 @@ verify_data_sets(hid_t file_id, int min_dset, int max_dset) /* read the chunk from file */ if ( pass ) { - status = H5Dread(dataset_ids[m], H5T_NATIVE_INT, - memspace_id, filespace_ids[m], + status = H5Dread(dataset_ids[m], H5T_NATIVE_INT, + memspace_id, filespace_ids[m], H5P_DEFAULT, data_chunk); if ( status < 0 ) { @@ -2977,8 +2998,8 @@ verify_data_sets(hid_t file_id, int min_dset, int max_dset) valid_chunk = FALSE; - if ( verbose ) { - + if ( verbose ) { + HDfprintf(stdout, "data_chunk[%0d][%0d] = %0d, expect %0d.\n", k, l, data_chunk[k][l], @@ -2987,7 +3008,7 @@ verify_data_sets(hid_t file_id, int min_dset, int max_dset) HDfprintf(stdout, "m = %d, i = %d, j = %d, k = %d, l = %d\n", m, i, j, k, l); - } + } } } } @@ -2997,12 +3018,12 @@ verify_data_sets(hid_t file_id, int min_dset, int max_dset) pass = FALSE; failure_mssg = "slab validation failed."; - if ( verbose ) { + if ( verbose ) { - fprintf(stdout, + fprintf(stdout, "Chunk (%0d, %0d) in /dset%03d is invalid.\n", i, j, m); - } + } } } m++; @@ -3053,7 +3074,7 @@ verify_data_sets(hid_t file_id, int min_dset, int max_dset) } /* verify_data_sets() */ - + /****************************************************************************/ /******************************* Test Functions *****************************/ /****************************************************************************/ @@ -3061,21 +3082,21 @@ verify_data_sets(hid_t file_id, int min_dset, int max_dset) /*------------------------------------------------------------------------- * Function: verify_cache_image_RO() * - * Purpose: Verify that a HDF5 file containing a cache image is - * opened R/O and read correctly by PHDF5 with the specified + * Purpose: Verify that a HDF5 file containing a cache image is + * opened R/O and read correctly by PHDF5 with the specified * metadata write strategy. - * + * * Basic cycle of operation is as follows: * - * 1) Open the test file created at the beginning of this - * test read only. + * 1) Open the test file created at the beginning of this + * test read only. * - * Verify that the file contains a cache image. + * Verify that the file contains a cache image. * - * Verify that only process 0 reads the cache image. + * Verify that only process 0 reads the cache image. * - * Verify that all other processes receive the cache - * image block from process 0. + * Verify that all other processes receive the cache + * image block from process 0. * * 2) Verify that the file contains the expected data. * @@ -3095,7 +3116,7 @@ verify_data_sets(hid_t file_id, int min_dset, int max_dset) * * Modifications: * - * None. + * None. * *------------------------------------------------------------------------- */ @@ -3134,14 +3155,14 @@ verify_cache_image_RO(int file_name_id, int md_write_strat, int mpi_rank) show_progress = ( ( show_progress ) && ( mpi_rank == 0 ) ); - if ( show_progress ) + if ( show_progress ) HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); /* setup the file name */ if ( pass ) { - if ( h5_fixname(FILENAMES[file_name_id], H5P_DEFAULT, + if ( h5_fixname(FILENAMES[file_name_id], H5P_DEFAULT, filename, sizeof(filename)) == NULL ) { pass = FALSE; @@ -3149,7 +3170,7 @@ verify_cache_image_RO(int file_name_id, int md_write_strat, int mpi_rank) } } - if ( show_progress ) + if ( show_progress ) HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); @@ -3164,7 +3185,7 @@ verify_cache_image_RO(int file_name_id, int md_write_strat, int mpi_rank) /* mdci_sbem_expected */ TRUE, /* read_only */ TRUE, /* set_mdci_fapl */ FALSE, - /* config_fsm */ FALSE, + /* config_fsm */ FALSE, /* enable_page_buffer */ FALSE, /* hdf_file_name */ filename, /* cache_image_flags */ H5C_CI__ALL_FLAGS, @@ -3179,15 +3200,15 @@ verify_cache_image_RO(int file_name_id, int md_write_strat, int mpi_rank) /* md_write_strat */ md_write_strat); } - if ( show_progress ) + if ( show_progress ) HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); - /* 2) Verify that the file contains the expected data. + /* 2) Verify that the file contains the expected data. * * Verify that only process 0 reads the cache image. * - * Verify that all other processes receive the cache + * Verify that all other processes receive the cache * image block from process 0. */ @@ -3209,14 +3230,14 @@ verify_cache_image_RO(int file_name_id, int md_write_strat, int mpi_rank) } #endif /* H5C_COLLECT_CACHE_STATS */ - if ( show_progress ) + if ( show_progress ) HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); - /* Verify that all other processes receive the cache image block + /* Verify that all other processes receive the cache image block * from process 0. - * - * Since we have alread verified that only process 0 has read the - * image, it is sufficient to verify that the image was loaded on + * + * Since we have alread verified that only process 0 has read the + * image, it is sufficient to verify that the image was loaded on * all processes. */ #if H5C_COLLECT_CACHE_STATS @@ -3230,12 +3251,12 @@ verify_cache_image_RO(int file_name_id, int md_write_strat, int mpi_rank) } #endif /* H5C_COLLECT_CACHE_STATS */ - if ( show_progress ) + if ( show_progress ) HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); /* 3) Close the file. */ - + if ( pass ) { if ( H5Fclose(file_id) < 0 ) { @@ -3246,7 +3267,7 @@ verify_cache_image_RO(int file_name_id, int md_write_strat, int mpi_rank) } } - if ( show_progress ) + if ( show_progress ) HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); @@ -3258,7 +3279,7 @@ verify_cache_image_RO(int file_name_id, int md_write_strat, int mpi_rank) /* mdci_sbem_expected */ TRUE, /* read_only */ TRUE, /* set_mdci_fapl */ FALSE, - /* config_fsm */ FALSE, + /* config_fsm */ FALSE, /* enable_page_buffer */ FALSE, /* hdf_file_name */ filename, /* cache_image_flags */ H5C_CI__ALL_FLAGS, @@ -3273,12 +3294,12 @@ verify_cache_image_RO(int file_name_id, int md_write_strat, int mpi_rank) /* md_write_strat */ md_write_strat); } - if ( show_progress ) + if ( show_progress ) HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); /* 5) Verify that the file contains the expected data. */ - + if ( pass ) { verify_data_sets(file_id, 0, MAX_NUM_DSETS - 1); @@ -3297,7 +3318,7 @@ verify_cache_image_RO(int file_name_id, int md_write_strat, int mpi_rank) /* 6) Close the file. */ - + if ( pass ) { if ( H5Fclose(file_id) < 0 ) { @@ -3308,7 +3329,7 @@ verify_cache_image_RO(int file_name_id, int md_write_strat, int mpi_rank) } } - if ( show_progress ) + if ( show_progress ) HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); @@ -3323,7 +3344,7 @@ verify_cache_image_RO(int file_name_id, int md_write_strat, int mpi_rank) H5_FAILED(); - if ( show_progress ) + if ( show_progress ) HDfprintf(stdout, "%s: failure_mssg = \"%s\"\n", failure_mssg); } } @@ -3333,32 +3354,32 @@ verify_cache_image_RO(int file_name_id, int md_write_strat, int mpi_rank) } /* verify_cache_image_RO() */ - + /*------------------------------------------------------------------------- * Function: verify_cache_image_RW() * - * Purpose: Verify that a HDF5 file containing a cache image is - * opened and read correctly by PHDF5 with the specified + * Purpose: Verify that a HDF5 file containing a cache image is + * opened and read correctly by PHDF5 with the specified * metadata write strategy. - * + * * Basic cycle of operation is as follows: * - * 1) Open the test file created at the beginning of this - * test. + * 1) Open the test file created at the beginning of this + * test. * - * Verify that the file contains a cache image. + * Verify that the file contains a cache image. * * 2) Verify that the file contains the expected data. * - * Verify that only process 0 reads the cache image. + * Verify that only process 0 reads the cache image. * - * Verify that all other processes receive the cache - * image block from process 0. + * Verify that all other processes receive the cache + * image block from process 0. * * * 3) Close the file. * - * 4) Open the file, and verify that it doesn't contain + * 4) Open the file, and verify that it doesn't contain * a cache image. * * 5) Verify that the file contains the expected data. @@ -3374,7 +3395,7 @@ verify_cache_image_RO(int file_name_id, int md_write_strat, int mpi_rank) * * Modifications: * - * None. + * None. * *------------------------------------------------------------------------- */ @@ -3413,14 +3434,14 @@ verify_cache_image_RW(int file_name_id, int md_write_strat, int mpi_rank) show_progress = ( ( show_progress ) && ( mpi_rank == 0 ) ); - if ( show_progress ) + if ( show_progress ) HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); /* setup the file name */ if ( pass ) { - if ( h5_fixname(FILENAMES[file_name_id], H5P_DEFAULT, + if ( h5_fixname(FILENAMES[file_name_id], H5P_DEFAULT, filename, sizeof(filename)) == NULL ) { pass = FALSE; @@ -3428,7 +3449,7 @@ verify_cache_image_RW(int file_name_id, int md_write_strat, int mpi_rank) } } - if ( show_progress ) + if ( show_progress ) HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); @@ -3438,7 +3459,7 @@ verify_cache_image_RW(int file_name_id, int md_write_strat, int mpi_rank) * * Verify that only process 0 reads the cache image. * - * Verify that all other processes receive the cache + * Verify that all other processes receive the cache * image block from process 0. */ @@ -3448,7 +3469,7 @@ verify_cache_image_RW(int file_name_id, int md_write_strat, int mpi_rank) /* mdci_sbem_expected */ TRUE, /* read_only */ FALSE, /* set_mdci_fapl */ FALSE, - /* config_fsm */ FALSE, + /* config_fsm */ FALSE, /* enable_page_buffer */ FALSE, /* hdf_file_name */ filename, /* cache_image_flags */ H5C_CI__ALL_FLAGS, @@ -3463,7 +3484,7 @@ verify_cache_image_RW(int file_name_id, int md_write_strat, int mpi_rank) /* md_write_strat */ md_write_strat); } - if ( show_progress ) + if ( show_progress ) HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); @@ -3471,7 +3492,7 @@ verify_cache_image_RW(int file_name_id, int md_write_strat, int mpi_rank) * * Verify that only process 0 reads the cache image. * - * Verify that all other processes receive the cache + * Verify that all other processes receive the cache * image block from process 0. */ if ( pass ) { @@ -3492,14 +3513,14 @@ verify_cache_image_RW(int file_name_id, int md_write_strat, int mpi_rank) } #endif /* H5C_COLLECT_CACHE_STATS */ - if ( show_progress ) + if ( show_progress ) HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); - /* Verify that all other processes receive the cache image block + /* Verify that all other processes receive the cache image block * from process 0. - * - * Since we have alread verified that only process 0 has read the - * image, it is sufficient to verify that the image was loaded on + * + * Since we have alread verified that only process 0 has read the + * image, it is sufficient to verify that the image was loaded on * all processes. */ #if H5C_COLLECT_CACHE_STATS @@ -3513,12 +3534,12 @@ verify_cache_image_RW(int file_name_id, int md_write_strat, int mpi_rank) } #endif /* H5C_COLLECT_CACHE_STATS */ - if ( show_progress ) + if ( show_progress ) HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); /* 3) Close the file. */ - + if ( pass ) { if ( H5Fclose(file_id) < 0 ) { @@ -3529,7 +3550,7 @@ verify_cache_image_RW(int file_name_id, int md_write_strat, int mpi_rank) } } - if ( show_progress ) + if ( show_progress ) HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); @@ -3541,7 +3562,7 @@ verify_cache_image_RW(int file_name_id, int md_write_strat, int mpi_rank) /* mdci_sbem_expected */ FALSE, /* read_only */ FALSE, /* set_mdci_fapl */ FALSE, - /* config_fsm */ FALSE, + /* config_fsm */ FALSE, /* enable_page_buffer */ FALSE, /* hdf_file_name */ filename, /* cache_image_flags */ H5C_CI__ALL_FLAGS, @@ -3556,12 +3577,12 @@ verify_cache_image_RW(int file_name_id, int md_write_strat, int mpi_rank) /* md_write_strat */ md_write_strat); } - if ( show_progress ) + if ( show_progress ) HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); /* 5) Verify that the file contains the expected data. */ - + if ( pass ) { verify_data_sets(file_id, 0, MAX_NUM_DSETS - 1); @@ -3580,7 +3601,7 @@ verify_cache_image_RW(int file_name_id, int md_write_strat, int mpi_rank) /* 6) Close the file. */ - + if ( pass ) { if ( H5Fclose(file_id) < 0 ) { @@ -3591,7 +3612,7 @@ verify_cache_image_RW(int file_name_id, int md_write_strat, int mpi_rank) } } - if ( show_progress ) + if ( show_progress ) HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); @@ -3621,7 +3642,7 @@ verify_cache_image_RW(int file_name_id, int md_write_strat, int mpi_rank) H5_FAILED(); - if ( show_progress ) + if ( show_progress ) HDfprintf(stdout, "%s: failure_mssg = \"%s\"\n", failure_mssg); } } @@ -3631,20 +3652,20 @@ verify_cache_image_RW(int file_name_id, int md_write_strat, int mpi_rank) } /* verify_cache_imageRW() */ - + /***************************************************************************** * * Function: smoke_check_1() * - * Purpose: Initial smoke check to verify correct behaviour of cache + * Purpose: Initial smoke check to verify correct behaviour of cache * image in combination with parallel. - * + * * As cache image is currently disabled in the parallel case, * we construct a test file in parallel, verify it in serial * and generate a cache image in passing, and then verify * it again in parallel. * - * In passing, also verify that page buffering is silently + * In passing, also verify that page buffering is silently * disabled in the parallel case. Needless to say, this part * of the test will have to be re-worked when and if page * buffering is supported in parallel. @@ -3699,7 +3720,7 @@ smoke_check_1(MPI_Comm mpi_comm, MPI_Info mpi_info, int mpi_rank, int mpi_size) HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); - /* 1) Create a PHDF5 file without the cache image FAPL entry. + /* 1) Create a PHDF5 file without the cache image FAPL entry. * * Verify that a cache image is not requested */ @@ -3806,11 +3827,11 @@ smoke_check_1(MPI_Comm mpi_comm, MPI_Info mpi_info, int mpi_rank, int mpi_size) HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); - /* 7) Verify the datasets in the file backwards + /* 7) Verify the datasets in the file backwards * * Verify that only process 0 reads the cache image. * - * Verify that all other processes receive the cache + * Verify that all other processes receive the cache * image block from process 0. */ @@ -3840,11 +3861,11 @@ smoke_check_1(MPI_Comm mpi_comm, MPI_Info mpi_info, int mpi_rank, int mpi_size) if ( ( mpi_rank == 0 ) && ( show_progress ) ) HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); - /* Verify that all other processes receive the cache image block + /* Verify that all other processes receive the cache image block * from process 0. - * - * Since we have alread verified that only process 0 has read the - * image, it is sufficient to verify that the image was loaded on + * + * Since we have alread verified that only process 0 has read the + * image, it is sufficient to verify that the image was loaded on * all processes. */ #if H5C_COLLECT_CACHE_STATS @@ -3905,11 +3926,11 @@ smoke_check_1(MPI_Comm mpi_comm, MPI_Info mpi_info, int mpi_rank, int mpi_size) HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); - /* 10) Verify the datasets in the file + /* 10) Verify the datasets in the file * * Verify that only process 0 reads the cache image. * - * Verify that all other processes receive the cache + * Verify that all other processes receive the cache * image block from process 0. */ @@ -3939,11 +3960,11 @@ smoke_check_1(MPI_Comm mpi_comm, MPI_Info mpi_info, int mpi_rank, int mpi_size) if ( ( mpi_rank == 0 ) && ( show_progress ) ) HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); - /* Verify that all other processes receive the cache image block + /* Verify that all other processes receive the cache image block * from process 0. - * - * Since we have alread verified that only process 0 has read the - * image, it is sufficient to verify that the image was loaded on + * + * Since we have alread verified that only process 0 has read the + * image, it is sufficient to verify that the image was loaded on * all processes. */ #if H5C_COLLECT_CACHE_STATS @@ -4046,28 +4067,35 @@ smoke_check_1(MPI_Comm mpi_comm, MPI_Info mpi_info, int mpi_rank, int mpi_size) H5_FAILED(); - HDfprintf(stdout, "%s: failure_mssg = \"%s\"\n", + HDfprintf(stdout, "%s: failure_mssg = \"%s\"\n", fcn_name, failure_mssg); } } return !pass; - + } /* smoke_check_1() */ - + +/* This test uses many POSIX things that are not available on + * Windows. We're using a check for fork(2) here as a proxy for + * all POSIX/Unix/Linux things until this test can be made + * more platform-independent. + */ +#ifdef H5_HAVE_FORK + /*------------------------------------------------------------------------- * Function: main * * Purpose: Run parallel tests on the cache image feature. - * - * At present, cache image is disabled in parallel, and - * thus these tests are restructed to verifying that a + * + * At present, cache image is disabled in parallel, and + * thus these tests are restructed to verifying that a * file with a cache image can be opened in the parallel - * case, and verifying that instructions to create a + * case, and verifying that instructions to create a * cache image are ignored in the parallel case. * - * WARNING: This test uses fork() and execve(), and + * WARNING: This test uses fork() and execve(), and * therefore will not run on Windows. * * Return: Success: 0 @@ -4105,14 +4133,14 @@ main(int argc, char **argv) HDfflush(stdout); i = 0; - while ( ( FILENAMES[i] != NULL ) && ( i < TEST_FILES_TO_CONSTRUCT ) ) { + while ( ( FILENAMES[i] != NULL ) && ( i < TEST_FILES_TO_CONSTRUCT ) ) { HDfprintf(stdout, " writing %s ... ", FILENAMES[i]); HDfflush(stdout); construct_test_file(i); if ( pass ) { - + printf("done.\n"); HDfflush(stdout); @@ -4193,13 +4221,13 @@ main(int argc, char **argv) /* we may need to play with the path here */ if ( execv("t_cache_image", child_argv) == -1 ) { - HDfprintf(stdout, + HDfprintf(stdout, "execl() of setup process failed. errno = %d(%s)\n", errno, strerror(errno)); exit(1); } - } else if ( child_pid != -1 ) { + } else if ( child_pid != -1 ) { /* this is the parent process -- wait until child is done */ if ( -1 == waitpid(child_pid, &child_status, WUNTRACED)) { @@ -4215,7 +4243,7 @@ main(int argc, char **argv) } else { - HDfprintf(stdout, + HDfprintf(stdout, "testfile construction complete -- proceeding with tests.\n"); } } else { /* fork failed */ @@ -4228,14 +4256,14 @@ main(int argc, char **argv) MPI_Barrier(MPI_COMM_WORLD); - nerrs += verify_cache_image_RO(0, + nerrs += verify_cache_image_RO(0, H5AC_METADATA_WRITE_STRATEGY__PROCESS_0_ONLY, mpi_rank); #if 1 - nerrs += verify_cache_image_RO(1, + nerrs += verify_cache_image_RO(1, H5AC_METADATA_WRITE_STRATEGY__DISTRIBUTED, mpi_rank); - nerrs += verify_cache_image_RW(0, + nerrs += verify_cache_image_RW(0, H5AC_METADATA_WRITE_STRATEGY__PROCESS_0_ONLY, mpi_rank); - nerrs += verify_cache_image_RW(1, + nerrs += verify_cache_image_RW(1, H5AC_METADATA_WRITE_STRATEGY__DISTRIBUTED, mpi_rank); nerrs += smoke_check_1(comm, info, mpi_rank, mpi_size); #endif @@ -4271,4 +4299,14 @@ finish: return(nerrs > 0); } /* main() */ +#else /* H5_HAVE_FORK */ + +int +main(void) +{ + HDfprintf(stderr, "Non-POSIX platform. Skipping.\n"); + return EXIT_SUCCESS; +} /* end main() */ + +#endif /* H5_HAVE_FORK */ diff --git a/testpar/t_pflush1.c b/testpar/t_pflush1.c index abb9818..4677bfe 100644 --- a/testpar/t_pflush1.c +++ b/testpar/t_pflush1.c @@ -15,11 +15,11 @@ * Programmer: Leon Arber * Sept. 28, 2006. * - * Purpose: This is the first half of a two-part test that makes sure - * that a file can be read after a parallel application crashes as long - * as the file was flushed first. We simulate a crash by - * calling _exit(0) since this doesn't flush HDF5 caches but - * still exits with success. + * Purpose: This is the first half of a two-part test that makes sure + * that a file can be read after a parallel application crashes as long + * as the file was flushed first. We simulate a crash by + * calling _exit(0) since this doesn't flush HDF5 caches but + * still exits with success. */ #include "h5test.h" @@ -29,18 +29,18 @@ const char *FILENAME[] = { NULL }; -static double the_data[100][100]; +static double the_data[100][100]; /*------------------------------------------------------------------------- - * Function: create_file + * Function: create_file * - * Purpose: Creates file used in part 1 of the test + * Purpose: Creates file used in part 1 of the test * - * Return: Success: 0 + * Return: Success: 0 * - * Failure: 1 + * Failure: 1 * - * Programmer: Leon Arber + * Programmer: Leon Arber * Sept. 26, 2006 * * Modifications: @@ -50,10 +50,10 @@ static double the_data[100][100]; static hid_t create_file(char* name, hid_t fapl) { - hid_t file, dcpl, space, dset, groups, grp, plist; - hsize_t ds_size[2] = {100, 100}; - hsize_t ch_size[2] = {5, 5}; - hsize_t i, j; + hid_t file, dcpl, space, dset, groups, grp, plist; + hsize_t ds_size[2] = {100, 100}; + hsize_t ch_size[2] = {5, 5}; + hsize_t i, j; @@ -64,7 +64,7 @@ create_file(char* name, hid_t fapl) if(H5Pset_chunk(dcpl, 2, ch_size) < 0) goto error; if((space = H5Screate_simple(2, ds_size, NULL)) < 0) goto error; if((dset = H5Dcreate2(file, "dset", H5T_NATIVE_FLOAT, space, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) - goto error; + goto error; plist = H5Pcreate(H5P_DATASET_XFER); H5Pset_dxpl_mpio(plist, H5FD_MPIO_COLLECTIVE); @@ -72,22 +72,22 @@ create_file(char* name, hid_t fapl) /* Write some data */ for(i = 0; i < ds_size[0]; i++) { - /* - * The extra cast in the following statement is a bug workaround - * for the Win32 version 5.0 compiler. - * 1998-11-06 ptl - */ - for(j = 0; j < ds_size[1]; j++) - the_data[i][j] = (double)(hssize_t)i/(hssize_t)(j+1); + /* + * The extra cast in the following statement is a bug workaround + * for the Win32 version 5.0 compiler. + * 1998-11-06 ptl + */ + for(j = 0; j < ds_size[1]; j++) + the_data[i][j] = (double)(hssize_t)i/(hssize_t)(j+1); } if(H5Dwrite(dset, H5T_NATIVE_DOUBLE, space, space, plist, the_data) < 0) goto error; /* Create some groups */ if((groups = H5Gcreate2(file, "some_groups", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) goto error; for(i = 0; i < 100; i++) { - sprintf(name, "grp%02u", (unsigned)i); - if((grp = H5Gcreate2(groups, name, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) goto error; - if(H5Gclose(grp) < 0) goto error; + sprintf(name, "grp%02u", (unsigned)i); + if((grp = H5Gcreate2(groups, name, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) goto error; + if(H5Gclose(grp) < 0) goto error; } return file; @@ -97,20 +97,20 @@ error: } /*------------------------------------------------------------------------- - * Function: main + * Function: main * - * Purpose: Part 1 of a two-part H5Fflush() test. + * Purpose: Part 1 of a two-part H5Fflush() test. * - * Return: Success: 0 + * Return: Success: 0 * - * Failure: 1 + * Failure: 1 * - * Programmer: Robb Matzke + * Programmer: Robb Matzke * Friday, October 23, 1998 * * Modifications: - * Leon Arber - * Sept. 26, 2006, expand test to check for failure if H5Fflush is not called. + * Leon Arber + * Sept. 26, 2006, expand test to check for failure if H5Fflush is not called. * * *------------------------------------------------------------------------- @@ -119,8 +119,8 @@ int main(int argc, char* argv[]) { hid_t file1, file2, fapl; - MPI_File *mpifh_p = NULL; - char name[1024]; + MPI_File *mpifh_p = NULL; + char name[1024]; const char *envval = NULL; int mpi_size, mpi_rank; MPI_Comm comm = MPI_COMM_WORLD; @@ -134,26 +134,26 @@ main(int argc, char* argv[]) H5Pset_fapl_mpio(fapl, comm, info); if(mpi_rank == 0) - TESTING("H5Fflush (part1)"); + TESTING("H5Fflush (part1)"); envval = HDgetenv("HDF5_DRIVER"); if(envval == NULL) envval = "nomatch"; if(HDstrcmp(envval, "split")) { - /* Create the file */ - h5_fixname(FILENAME[0], fapl, name, sizeof name); - file1 = create_file(name, fapl); - /* Flush and exit without closing the library */ - if(H5Fflush(file1, H5F_SCOPE_GLOBAL) < 0) goto error; + /* Create the file */ + h5_fixname(FILENAME[0], fapl, name, sizeof name); + file1 = create_file(name, fapl); + /* Flush and exit without closing the library */ + if(H5Fflush(file1, H5F_SCOPE_GLOBAL) < 0) goto error; - /* Create the other file which will not be flushed */ - h5_fixname(FILENAME[1], fapl, name, sizeof name); - file2 = create_file(name, fapl); + /* Create the other file which will not be flushed */ + h5_fixname(FILENAME[1], fapl, name, sizeof name); + file2 = create_file(name, fapl); - if(mpi_rank == 0) - PASSED(); - fflush(stdout); - fflush(stderr); + if(mpi_rank == 0) + PASSED(); + fflush(stdout); + fflush(stderr); } /* end if */ else { SKIPPED(); @@ -170,21 +170,21 @@ main(int argc, char* argv[]) /* close file1 */ if(H5Fget_vfd_handle(file1, fapl, (void **)&mpifh_p) < 0) { - printf("H5Fget_vfd_handle for file1 failed\n"); - goto error; + printf("H5Fget_vfd_handle for file1 failed\n"); + goto error; } /* end if */ if(MPI_File_close(mpifh_p) != MPI_SUCCESS) { - printf("MPI_File_close for file1 failed\n"); - goto error; + printf("MPI_File_close for file1 failed\n"); + goto error; } /* end if */ /* close file2 */ if(H5Fget_vfd_handle(file2, fapl, (void **)&mpifh_p) < 0) { - printf("H5Fget_vfd_handle for file2 failed\n"); - goto error; + printf("H5Fget_vfd_handle for file2 failed\n"); + goto error; } /* end if */ if(MPI_File_close(mpifh_p) != MPI_SUCCESS) { - printf("MPI_File_close for file2 failed\n"); - goto error; + printf("MPI_File_close for file2 failed\n"); + goto error; } /* end if */ fflush(stdout); diff --git a/testpar/t_pread.c b/testpar/t_pread.c index 3d150af..2f441d8 100644 --- a/testpar/t_pread.c +++ b/testpar/t_pread.c @@ -35,7 +35,7 @@ const char *FILENAMES[NFILENAME + 1]={"reloc_t_pread_data_file", #define COUNT 1000 hbool_t pass = true; -static const char *random_hdf5_text = +static const char *random_hdf5_text = "Now is the time for all first-time-users of HDF5 to read their \ manual or go thru the tutorials!\n\ While you\'re at it, now is also the time to read up on MPI-IO."; @@ -67,7 +67,7 @@ static char *test_argv0 = NULL; * In the overall scheme of running the test, we'll call * this function twice: first as a collection of all MPI * processes and then a second time with the processes split - * more or less in half. Each sub group will operate + * more or less in half. Each sub group will operate * collectively on their assigned file. This split into * subgroups validates that parallel groups can successfully * open and read data independantly from the other parallel @@ -81,7 +81,7 @@ static char *test_argv0 = NULL; * 10/1/17 * * Modifications: - * + * *------------------------------------------------------------------------- */ static int @@ -96,13 +96,13 @@ generate_test_file( MPI_Comm comm, int mpi_rank, int group_id ) int group_size; int group_rank; int local_failure = 0; - int global_failures = 0; + int global_failures = 0; hsize_t count = COUNT; hsize_t i; hsize_t offset; hsize_t dims[1] = {0}; hid_t file_id = -1; - hid_t memspace = -1; + hid_t memspace = -1; hid_t filespace = -1; hid_t fctmpl = -1; hid_t fapl_id = -1; @@ -140,7 +140,7 @@ generate_test_file( MPI_Comm comm, int mpi_rank, int group_id ) if ( pass ) { if ( comm == MPI_COMM_WORLD ) { /* Test 1 */ file_index = 0; - } + } else if ( group_id == 0 ) { /* Test 2 group 0 */ file_index = 1; } @@ -148,8 +148,8 @@ generate_test_file( MPI_Comm comm, int mpi_rank, int group_id ) file_index = 2; } - /* The 'group_filename' is just a temp variable and - * is used to call into the h5_fixname function. No + /* The 'group_filename' is just a temp variable and + * is used to call into the h5_fixname function. No * need to worry that we reassign it for each file! */ group_filename = FILENAMES[file_index]; @@ -206,9 +206,9 @@ generate_test_file( MPI_Comm comm, int mpi_rank, int group_id ) } } - /* create the data file */ + /* create the data file */ if ( pass ) { - if ( (file_id = H5Fcreate(data_filename, H5F_ACC_TRUNC, + if ( (file_id = H5Fcreate(data_filename, H5F_ACC_TRUNC, fctmpl, fapl_id)) < 0 ) { pass = FALSE; failure_mssg = "H5Fcreate() failed.\n"; @@ -248,7 +248,7 @@ generate_test_file( MPI_Comm comm, int mpi_rank, int group_id ) if ( pass ) { offset = (hsize_t)group_rank * (hsize_t)COUNT; - if ( (H5Sselect_hyperslab(filespace, H5S_SELECT_SET, &offset, + if ( (H5Sselect_hyperslab(filespace, H5S_SELECT_SET, &offset, NULL, &count, NULL)) < 0 ) { pass = FALSE; failure_mssg = "H5Sselect_hyperslab() failed.\n"; @@ -256,8 +256,8 @@ generate_test_file( MPI_Comm comm, int mpi_rank, int group_id ) } if ( pass ) { - if ( (dset_id = H5Dcreate2(file_id, "dataset0", H5T_NATIVE_FLOAT, - filespace, H5P_DEFAULT, H5P_DEFAULT, + if ( (dset_id = H5Dcreate2(file_id, "dataset0", H5T_NATIVE_FLOAT, + filespace, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0 ) { pass = false; failure_mssg = "H5Dcreate2() failed.\n"; @@ -265,7 +265,7 @@ generate_test_file( MPI_Comm comm, int mpi_rank, int group_id ) } if ( pass ) { - if ( (H5Dwrite(dset_id, H5T_NATIVE_FLOAT, memspace, + if ( (H5Dwrite(dset_id, H5T_NATIVE_FLOAT, memspace, filespace, dxpl_id, data_slice)) < 0 ) { pass = false; failure_mssg = "H5Dwrite() failed.\n"; @@ -316,35 +316,35 @@ generate_test_file( MPI_Comm comm, int mpi_rank, int group_id ) } if (pass || (fctmpl != -1)) { - if (H5Pclose(fctmpl) < 0) { - pass = false; - failure_mssg = "H5Pclose(fctmpl) failed.\n"; + if (H5Pclose(fctmpl) < 0) { + pass = false; + failure_mssg = "H5Pclose(fctmpl) failed.\n"; } } /* Add a userblock to the head of the datafile. - * We will use this to for a functional test of the + * We will use this to for a functional test of the * file open optimization. This is superblock * relocation is done by the rank 0 process associated * with the communicator being used. For test 1, we * utilize MPI_COMM_WORLD, so group_rank 0 is the * same as mpi_rank 0. For test 2 which utilizes * two groups resulting from an MPI_Comm_split, we - * will have parallel groups and hence two - * group_rank(0) processes. Each parallel group + * will have parallel groups and hence two + * group_rank(0) processes. Each parallel group * will create a unique file with different text * headers and different data. */ if (group_rank == 0) { const char *text_to_write; - size_t bytes_to_write; + size_t bytes_to_write; if (group_id == 0) text_to_write = random_hdf5_text; else text_to_write = hitchhiker_quote; - bytes_to_write = HDstrlen(text_to_write); + bytes_to_write = HDstrlen(text_to_write); if (pass) { if ((header = HDopen(data_filename, O_WRONLY)) < 0) { @@ -370,13 +370,13 @@ generate_test_file( MPI_Comm comm, int mpi_rank, int group_id ) } /* collect results from other processes. - * Only overwrite the failure message if no preveious error + * Only overwrite the failure message if no previous error * has been detected */ local_failure = ( pass ? 0 : 1 ); /* This is a global all reduce (NOT group specific) */ - if ( MPI_Allreduce(&local_failure, &global_failures, 1, + if ( MPI_Allreduce(&local_failure, &global_failures, 1, MPI_INT, MPI_SUM, MPI_COMM_WORLD) != MPI_SUCCESS ) { if ( pass ) { pass = FALSE; @@ -451,7 +451,7 @@ test_parallel_read(MPI_Comm comm, int mpi_rank, int group_id) const char *group_filename = NULL; char reloc_data_filename[FILENAME_BUF_SIZE]; int local_failure = 0; - int global_failures = 0; + int global_failures = 0; int group_size; int group_rank; hid_t fapl_id = -1; @@ -537,7 +537,7 @@ test_parallel_read(MPI_Comm comm, int mpi_rank, int group_id) /* open the file -- should have user block, exercising the optimization */ if ( pass ) { - if ( (file_id = H5Fopen(reloc_data_filename, + if ( (file_id = H5Fopen(reloc_data_filename, H5F_ACC_RDONLY, fapl_id)) < 0 ) { pass = FALSE; failure_mssg = "H5Fopen() failed\n"; @@ -571,7 +571,7 @@ test_parallel_read(MPI_Comm comm, int mpi_rank, int group_id) if ( pass ) { offset = (hsize_t)group_rank * count; - if ( (H5Sselect_hyperslab(filespace, H5S_SELECT_SET, + if ( (H5Sselect_hyperslab(filespace, H5S_SELECT_SET, &offset, NULL, &count, NULL)) < 0 ) { pass = FALSE; failure_mssg = "H5Sselect_hyperslab() failed\n"; @@ -580,14 +580,14 @@ test_parallel_read(MPI_Comm comm, int mpi_rank, int group_id) /* read this processes section of the data */ if ( pass ) { - if ( (H5Dread(dset_id, H5T_NATIVE_FLOAT, memspace, + if ( (H5Dread(dset_id, H5T_NATIVE_FLOAT, memspace, filespace, H5P_DEFAULT, data_slice)) < 0 ) { pass = FALSE; failure_mssg = "H5Dread() failed\n"; } } - - /* verify the data */ + + /* verify the data */ if ( pass ) { nextValue = (float)((hsize_t)mpi_rank * count); i = 0; @@ -648,7 +648,7 @@ test_parallel_read(MPI_Comm comm, int mpi_rank, int group_id) */ local_failure = ( pass ? 0 : 1 ); - if ( MPI_Allreduce( &local_failure, &global_failures, 1, + if ( MPI_Allreduce( &local_failure, &global_failures, 1, MPI_INT, MPI_SUM, MPI_COMM_WORLD) != MPI_SUCCESS ) { if ( pass ) { pass = FALSE; @@ -679,7 +679,7 @@ test_parallel_read(MPI_Comm comm, int mpi_rank, int group_id) } - return( ! pass ); + return( ! pass ); } /* test_parallel_read() */ @@ -770,7 +770,7 @@ main( int argc, char **argv) /* ------ Create two (2) MPI groups ------ * - * We split MPI_COMM_WORLD into 2 more or less equal sized + * We split MPI_COMM_WORLD into 2 more or less equal sized * groups. The resulting communicators will be used to generate * two HDF files which in turn will be opened in parallel and the * contents verified in the second read test below. @@ -798,7 +798,7 @@ main( int argc, char **argv) } goto finish; } - + /* We generate the file used for test 2 */ nerrs += generate_test_file( group_comm, mpi_rank, which_group ); @@ -856,7 +856,6 @@ finish: HDfprintf(stdout, "===================================\n"); if ( nerrs > 0 ) { - HDfprintf(stdout, "***%s detected %d failures***\n", header, nerrs); } else { diff --git a/testpar/t_shapesame.c b/testpar/t_shapesame.c index 9e8f16b..e695bfc 100644 --- a/testpar/t_shapesame.c +++ b/testpar/t_shapesame.c @@ -12,7 +12,7 @@ /* This program will test independant and collective reads and writes between - selections of different rank that non-the-less are deemed as having the + selections of different rank that non-the-less are deemed as having the same shape by H5Sselect_shape_same(). */ @@ -29,24 +29,24 @@ /* On Lustre (and perhaps other parallel file systems?), we have severe * slow downs if two or more processes attempt to access the same file system * block. To minimize this problem, we set alignment in the shape same tests - * to the default Lustre block size -- which greatly reduces contention in + * to the default Lustre block size -- which greatly reduces contention in * the chunked dataset case. */ -#define SHAPE_SAME_TEST_ALIGNMENT ((hsize_t)(4 * 1024 * 1024)) +#define SHAPE_SAME_TEST_ALIGNMENT ((hsize_t)(4 * 1024 * 1024)) -#define PAR_SS_DR_MAX_RANK 5 /* must update code if this changes */ +#define PAR_SS_DR_MAX_RANK 5 /* must update code if this changes */ struct hs_dr_pio_test_vars_t { - int mpi_size; + int mpi_size; int mpi_rank; MPI_Comm mpi_comm; - MPI_Info mpi_info; + MPI_Info mpi_info; int test_num; int edge_size; - int checker_edge_size; + int checker_edge_size; int chunk_edge_size; int small_rank; int large_rank; @@ -62,13 +62,13 @@ struct hs_dr_pio_test_vars_t int small_ds_offset; int large_ds_offset; hid_t fid; /* HDF5 file ID */ - hid_t xfer_plist; + hid_t xfer_plist; hid_t full_mem_small_ds_sid; hid_t full_file_small_ds_sid; hid_t mem_small_ds_sid; hid_t file_small_ds_sid_0; hid_t file_small_ds_sid_1; - hid_t small_ds_slice_sid; + hid_t small_ds_slice_sid; hid_t full_mem_large_ds_sid; hid_t full_file_large_ds_sid; hid_t mem_large_ds_sid; @@ -76,7 +76,7 @@ struct hs_dr_pio_test_vars_t hid_t file_large_ds_sid_1; hid_t file_large_ds_process_slice_sid; hid_t mem_large_ds_process_slice_sid; - hid_t large_ds_slice_sid; + hid_t large_ds_slice_sid; hid_t small_dataset; /* Dataset ID */ hid_t large_dataset; /* Dataset ID */ size_t small_ds_size; @@ -94,25 +94,25 @@ struct hs_dr_pio_test_vars_t hsize_t * count_ptr; hsize_t * block_ptr; int skips; - int max_skips; - int64_t total_tests; - int64_t tests_run; - int64_t tests_skipped; + int max_skips; + int64_t total_tests; + int64_t tests_run; + int64_t tests_skipped; }; /*------------------------------------------------------------------------- - * Function: hs_dr_pio_test__setup() + * Function: hs_dr_pio_test__setup() * - * Purpose: Do setup for tests of I/O to/from hyperslab selections of - * different rank in the parallel case. + * Purpose: Do setup for tests of I/O to/from hyperslab selections of + * different rank in the parallel case. * - * Return: void + * Return: void * - * Programmer: JRM -- 8/9/11 + * Programmer: JRM -- 8/9/11 * * Modifications: * - * None. + * None. * *------------------------------------------------------------------------- */ @@ -131,21 +131,21 @@ hs_dr_pio_test__setup(const int test_num, const int express_test, struct hs_dr_pio_test_vars_t * tv_ptr) { -#if CONTIG_HS_DR_PIO_TEST__SETUP__DEBUG +#if CONTIG_HS_DR_PIO_TEST__SETUP__DEBUG const char *fcnName = "hs_dr_pio_test__setup()"; #endif /* CONTIG_HS_DR_PIO_TEST__SETUP__DEBUG */ const char *filename; - hbool_t mis_match = FALSE; - int i; + hbool_t mis_match = FALSE; + int i; int mrc; - int mpi_rank; /* needed by the VRFY macro */ - uint32_t expected_value; + int mpi_rank; /* needed by the VRFY macro */ + uint32_t expected_value; uint32_t * ptr_0; uint32_t * ptr_1; - hid_t acc_tpl; /* File access templates */ + hid_t acc_tpl; /* File access templates */ hid_t small_ds_dcpl_id = H5P_DEFAULT; hid_t large_ds_dcpl_id = H5P_DEFAULT; - herr_t ret; /* Generic return value */ + herr_t ret; /* Generic return value */ HDassert( edge_size >= 6 ); HDassert( edge_size >= chunk_edge_size ); @@ -217,7 +217,7 @@ hs_dr_pio_test__setup(const int test_num, tv_ptr->small_ds_buf_2 = (uint32_t *)HDmalloc(sizeof(uint32_t) * tv_ptr->small_ds_size); VRFY((tv_ptr->small_ds_buf_2 != NULL), "malloc of small_ds_buf_2 succeeded"); - tv_ptr->small_ds_slice_buf = + tv_ptr->small_ds_slice_buf = (uint32_t *)HDmalloc(sizeof(uint32_t) * tv_ptr->small_ds_slice_size); VRFY((tv_ptr->small_ds_slice_buf != NULL), "malloc of small_ds_slice_buf succeeded"); @@ -230,7 +230,7 @@ hs_dr_pio_test__setup(const int test_num, tv_ptr->large_ds_buf_2 = (uint32_t *)HDmalloc(sizeof(uint32_t) * tv_ptr->large_ds_size); VRFY((tv_ptr->large_ds_buf_2 != NULL), "malloc of large_ds_buf_2 succeeded"); - tv_ptr->large_ds_slice_buf = + tv_ptr->large_ds_slice_buf = (uint32_t *)HDmalloc(sizeof(uint32_t) * tv_ptr->large_ds_slice_size); VRFY((tv_ptr->large_ds_slice_buf != NULL), "malloc of large_ds_slice_buf succeeded"); @@ -254,21 +254,21 @@ hs_dr_pio_test__setup(const int test_num, filename = (const char *)GetTestParameters(); HDassert( filename != NULL ); -#if CONTIG_HS_DR_PIO_TEST__SETUP__DEBUG +#if CONTIG_HS_DR_PIO_TEST__SETUP__DEBUG if ( MAINPROCESS ) { HDfprintf(stdout, "%d: test num = %d.\n", tv_ptr->mpi_rank, tv_ptr->test_num); HDfprintf(stdout, "%d: mpi_size = %d.\n", tv_ptr->mpi_rank, tv_ptr->mpi_size); - HDfprintf(stdout, + HDfprintf(stdout, "%d: small/large rank = %d/%d, use_collective_io = %d.\n", - tv_ptr->mpi_rank, tv_ptr->small_rank, tv_ptr->large_rank, + tv_ptr->mpi_rank, tv_ptr->small_rank, tv_ptr->large_rank, (int)use_collective_io); HDfprintf(stdout, "%d: edge_size = %d, chunk_edge_size = %d.\n", tv_ptr->mpi_rank, tv_ptr->edge_size, tv_ptr->chunk_edge_size); HDfprintf(stdout, "%d: checker_edge_size = %d.\n", tv_ptr->mpi_rank, tv_ptr->checker_edge_size); HDfprintf(stdout, "%d: small_ds_size = %d, large_ds_size = %d.\n", - tv_ptr->mpi_rank, (int)(tv_ptr->small_ds_size), + tv_ptr->mpi_rank, (int)(tv_ptr->small_ds_size), (int)(tv_ptr->large_ds_size)); HDfprintf(stdout, "%d: filename = %s.\n", tv_ptr->mpi_rank, filename); } @@ -303,78 +303,78 @@ hs_dr_pio_test__setup(const int test_num, /* setup dims: */ tv_ptr->dims[0] = (hsize_t)(tv_ptr->mpi_size + 1); - tv_ptr->dims[1] = tv_ptr->dims[2] = + tv_ptr->dims[1] = tv_ptr->dims[2] = tv_ptr->dims[3] = tv_ptr->dims[4] = (hsize_t)(tv_ptr->edge_size); /* Create small ds dataspaces */ - tv_ptr->full_mem_small_ds_sid = + tv_ptr->full_mem_small_ds_sid = H5Screate_simple(tv_ptr->small_rank, tv_ptr->dims, NULL); - VRFY((tv_ptr->full_mem_small_ds_sid != 0), + VRFY((tv_ptr->full_mem_small_ds_sid != 0), "H5Screate_simple() full_mem_small_ds_sid succeeded"); - tv_ptr->full_file_small_ds_sid = + tv_ptr->full_file_small_ds_sid = H5Screate_simple(tv_ptr->small_rank, tv_ptr->dims, NULL); - VRFY((tv_ptr->full_file_small_ds_sid != 0), + VRFY((tv_ptr->full_file_small_ds_sid != 0), "H5Screate_simple() full_file_small_ds_sid succeeded"); tv_ptr->mem_small_ds_sid = H5Screate_simple(tv_ptr->small_rank, tv_ptr->dims, NULL); - VRFY((tv_ptr->mem_small_ds_sid != 0), + VRFY((tv_ptr->mem_small_ds_sid != 0), "H5Screate_simple() mem_small_ds_sid succeeded"); tv_ptr->file_small_ds_sid_0 = H5Screate_simple(tv_ptr->small_rank, tv_ptr->dims, NULL); - VRFY((tv_ptr->file_small_ds_sid_0 != 0), + VRFY((tv_ptr->file_small_ds_sid_0 != 0), "H5Screate_simple() file_small_ds_sid_0 succeeded"); /* used by checker board tests only */ tv_ptr->file_small_ds_sid_1 = H5Screate_simple(tv_ptr->small_rank, tv_ptr->dims, NULL); - VRFY((tv_ptr->file_small_ds_sid_1 != 0), + VRFY((tv_ptr->file_small_ds_sid_1 != 0), "H5Screate_simple() file_small_ds_sid_1 succeeded"); - tv_ptr->small_ds_slice_sid = + tv_ptr->small_ds_slice_sid = H5Screate_simple(tv_ptr->small_rank - 1, &(tv_ptr->dims[1]), NULL); - VRFY((tv_ptr->small_ds_slice_sid != 0), + VRFY((tv_ptr->small_ds_slice_sid != 0), "H5Screate_simple() small_ds_slice_sid succeeded"); /* Create large ds dataspaces */ - tv_ptr->full_mem_large_ds_sid = + tv_ptr->full_mem_large_ds_sid = H5Screate_simple(tv_ptr->large_rank, tv_ptr->dims, NULL); - VRFY((tv_ptr->full_mem_large_ds_sid != 0), + VRFY((tv_ptr->full_mem_large_ds_sid != 0), "H5Screate_simple() full_mem_large_ds_sid succeeded"); - tv_ptr->full_file_large_ds_sid = + tv_ptr->full_file_large_ds_sid = H5Screate_simple(tv_ptr->large_rank, tv_ptr->dims, NULL); - VRFY((tv_ptr->full_file_large_ds_sid != FAIL), + VRFY((tv_ptr->full_file_large_ds_sid != FAIL), "H5Screate_simple() full_file_large_ds_sid succeeded"); tv_ptr->mem_large_ds_sid = H5Screate_simple(tv_ptr->large_rank, tv_ptr->dims, NULL); - VRFY((tv_ptr->mem_large_ds_sid != FAIL), + VRFY((tv_ptr->mem_large_ds_sid != FAIL), "H5Screate_simple() mem_large_ds_sid succeeded"); tv_ptr->file_large_ds_sid_0 = H5Screate_simple(tv_ptr->large_rank, tv_ptr->dims, NULL); - VRFY((tv_ptr->file_large_ds_sid_0 != FAIL), + VRFY((tv_ptr->file_large_ds_sid_0 != FAIL), "H5Screate_simple() file_large_ds_sid_0 succeeded"); /* used by checker board tests only */ tv_ptr->file_large_ds_sid_1 = H5Screate_simple(tv_ptr->large_rank, tv_ptr->dims, NULL); - VRFY((tv_ptr->file_large_ds_sid_1 != FAIL), + VRFY((tv_ptr->file_large_ds_sid_1 != FAIL), "H5Screate_simple() file_large_ds_sid_1 succeeded"); - tv_ptr->mem_large_ds_process_slice_sid = + tv_ptr->mem_large_ds_process_slice_sid = H5Screate_simple(tv_ptr->large_rank, tv_ptr->dims, NULL); - VRFY((tv_ptr->mem_large_ds_process_slice_sid != FAIL), + VRFY((tv_ptr->mem_large_ds_process_slice_sid != FAIL), "H5Screate_simple() mem_large_ds_process_slice_sid succeeded"); - tv_ptr->file_large_ds_process_slice_sid = + tv_ptr->file_large_ds_process_slice_sid = H5Screate_simple(tv_ptr->large_rank, tv_ptr->dims, NULL); - VRFY((tv_ptr->file_large_ds_process_slice_sid != FAIL), + VRFY((tv_ptr->file_large_ds_process_slice_sid != FAIL), "H5Screate_simple() file_large_ds_process_slice_sid succeeded"); - tv_ptr->large_ds_slice_sid = + tv_ptr->large_ds_slice_sid = H5Screate_simple(tv_ptr->large_rank - 1, &(tv_ptr->dims[1]), NULL); - VRFY((tv_ptr->large_ds_slice_sid != 0), + VRFY((tv_ptr->large_ds_slice_sid != 0), "H5Screate_simple() large_ds_slice_sid succeeded"); @@ -384,18 +384,18 @@ hs_dr_pio_test__setup(const int test_num, */ if ( tv_ptr->chunk_edge_size > 0 ) { - /* Under Lustre (and perhaps other parallel file systems?) we get - * locking delays when two or more processes attempt to access the + /* Under Lustre (and perhaps other parallel file systems?) we get + * locking delays when two or more processes attempt to access the * same file system block. * - * To minimize this problem, I have changed chunk_dims[0] + * To minimize this problem, I have changed chunk_dims[0] * from (mpi_size + 1) to just when any sort of express test is - * selected. Given the structure of the test, and assuming we - * set the alignment large enough, this avoids the contention - * issue by seeing to it that each chunk is only accessed by one + * selected. Given the structure of the test, and assuming we + * set the alignment large enough, this avoids the contention + * issue by seeing to it that each chunk is only accessed by one * process. * - * One can argue as to whether this is a good thing to do in our + * One can argue as to whether this is a good thing to do in our * tests, but for now it is necessary if we want the test to complete * in a reasonable amount of time. * @@ -409,8 +409,8 @@ hs_dr_pio_test__setup(const int test_num, tv_ptr->chunk_dims[0] = 1; } - tv_ptr->chunk_dims[1] = tv_ptr->chunk_dims[2] = - tv_ptr->chunk_dims[3] = + tv_ptr->chunk_dims[1] = tv_ptr->chunk_dims[2] = + tv_ptr->chunk_dims[3] = tv_ptr->chunk_dims[4] = (hsize_t)(tv_ptr->chunk_edge_size); small_ds_dcpl_id = H5Pcreate(H5P_DATASET_CREATE); @@ -509,7 +509,7 @@ hs_dr_pio_test__setup(const int test_num, /* write the initial value of the small data set to file */ - ret = H5Dwrite(tv_ptr->small_dataset, tv_ptr->dset_type, tv_ptr->mem_small_ds_sid, + ret = H5Dwrite(tv_ptr->small_dataset, tv_ptr->dset_type, tv_ptr->mem_small_ds_sid, tv_ptr->file_small_ds_sid_0, tv_ptr->xfer_plist, tv_ptr->small_ds_buf_0); VRFY((ret >= 0), "H5Dwrite() small_dataset initial write succeeded"); @@ -522,8 +522,8 @@ hs_dr_pio_test__setup(const int test_num, VRFY((mrc==MPI_SUCCESS), "Sync after small dataset writes"); } - /* read the small data set back to verify that it contains the - * expected data. Note that each process reads in the entire + /* read the small data set back to verify that it contains the + * expected data. Note that each process reads in the entire * data set and verifies it. */ ret = H5Dread(tv_ptr->small_dataset, @@ -572,7 +572,7 @@ hs_dr_pio_test__setup(const int test_num, tv_ptr->count, tv_ptr->block); VRFY((ret >= 0), "H5Sselect_hyperslab(file_large_ds_sid_0, set) suceeded"); - + /* In passing, setup the process slice data spaces as well */ ret = H5Sselect_hyperslab(tv_ptr->mem_large_ds_process_slice_sid, @@ -581,7 +581,7 @@ hs_dr_pio_test__setup(const int test_num, tv_ptr->stride, tv_ptr->count, tv_ptr->block); - VRFY((ret >= 0), + VRFY((ret >= 0), "H5Sselect_hyperslab(mem_large_ds_process_slice_sid, set) suceeded"); ret = H5Sselect_hyperslab(tv_ptr->file_large_ds_process_slice_sid, @@ -590,7 +590,7 @@ hs_dr_pio_test__setup(const int test_num, tv_ptr->stride, tv_ptr->count, tv_ptr->block); - VRFY((ret >= 0), + VRFY((ret >= 0), "H5Sselect_hyperslab(file_large_ds_process_slice_sid, set) suceeded"); if ( MAINPROCESS ) { /* add an additional slice to the selections */ @@ -616,8 +616,8 @@ hs_dr_pio_test__setup(const int test_num, /* write the initial value of the large data set to file */ - ret = H5Dwrite(tv_ptr->large_dataset, tv_ptr->dset_type, - tv_ptr->mem_large_ds_sid, tv_ptr->file_large_ds_sid_0, + ret = H5Dwrite(tv_ptr->large_dataset, tv_ptr->dset_type, + tv_ptr->mem_large_ds_sid, tv_ptr->file_large_ds_sid_0, tv_ptr->xfer_plist, tv_ptr->large_ds_buf_0); if ( ret < 0 ) H5Eprint2(H5E_DEFAULT, stderr); VRFY((ret >= 0), "H5Dwrite() large_dataset initial write succeeded"); @@ -631,8 +631,8 @@ hs_dr_pio_test__setup(const int test_num, } - /* read the large data set back to verify that it contains the - * expected data. Note that each process reads in the entire + /* read the large data set back to verify that it contains the + * expected data. Note that each process reads in the entire * data set. */ ret = H5Dread(tv_ptr->large_dataset, @@ -676,18 +676,18 @@ hs_dr_pio_test__setup(const int test_num, /*------------------------------------------------------------------------- - * Function: hs_dr_pio_test__takedown() + * Function: hs_dr_pio_test__takedown() * - * Purpose: Do takedown after tests of I/O to/from hyperslab selections - * of different rank in the parallel case. + * Purpose: Do takedown after tests of I/O to/from hyperslab selections + * of different rank in the parallel case. * - * Return: void + * Return: void * - * Programmer: JRM -- 9/18/09 + * Programmer: JRM -- 9/18/09 * * Modifications: * - * None. + * None. * *------------------------------------------------------------------------- */ @@ -697,11 +697,11 @@ hs_dr_pio_test__setup(const int test_num, static void hs_dr_pio_test__takedown( struct hs_dr_pio_test_vars_t * tv_ptr) { -#if HS_DR_PIO_TEST__TAKEDOWN__DEBUG +#if HS_DR_PIO_TEST__TAKEDOWN__DEBUG const char *fcnName = "hs_dr_pio_test__takedown()"; #endif /* HS_DR_PIO_TEST__TAKEDOWN__DEBUG */ - int mpi_rank; /* needed by the VRFY macro */ - herr_t ret; /* Generic return value */ + int mpi_rank; /* needed by the VRFY macro */ + herr_t ret; /* Generic return value */ /* initialize the local copy of mpi_rank */ mpi_rank = tv_ptr->mpi_rank; @@ -785,27 +785,27 @@ hs_dr_pio_test__takedown( struct hs_dr_pio_test_vars_t * tv_ptr) /*------------------------------------------------------------------------- - * Function: contig_hs_dr_pio_test__d2m_l2s() + * Function: contig_hs_dr_pio_test__d2m_l2s() * - * Purpose: Part one of a series of tests of I/O to/from hyperslab - * selections of different rank in the parallel. + * Purpose: Part one of a series of tests of I/O to/from hyperslab + * selections of different rank in the parallel. * - * Verify that we can read from disk correctly using - * selections of different rank that H5S_select_shape_same() - * views as being of the same shape. + * Verify that we can read from disk correctly using + * selections of different rank that H5S_select_shape_same() + * views as being of the same shape. * - * In this function, we test this by reading small_rank - 1 - * slices from the on disk large cube, and verifying that the - * data read is correct. Verify that H5S_select_shape_same() - * returns true on the memory and file selections. + * In this function, we test this by reading small_rank - 1 + * slices from the on disk large cube, and verifying that the + * data read is correct. Verify that H5S_select_shape_same() + * returns true on the memory and file selections. * - * Return: void + * Return: void * - * Programmer: JRM -- 9/10/11 + * Programmer: JRM -- 9/10/11 * * Modifications: * - * None. + * None. * *------------------------------------------------------------------------- */ @@ -815,24 +815,24 @@ hs_dr_pio_test__takedown( struct hs_dr_pio_test_vars_t * tv_ptr) static void contig_hs_dr_pio_test__d2m_l2s(struct hs_dr_pio_test_vars_t * tv_ptr) { -#if CONTIG_HS_DR_PIO_TEST__D2M_L2S__DEBUG +#if CONTIG_HS_DR_PIO_TEST__D2M_L2S__DEBUG const char *fcnName = "contig_hs_dr_pio_test__run_test()"; #endif /* CONTIG_HS_DR_PIO_TEST__D2M_L2S__DEBUG */ - hbool_t mis_match = FALSE; - int i, j, k, l; - size_t n; - int mpi_rank; /* needed by the VRFY macro */ - uint32_t expected_value; + hbool_t mis_match = FALSE; + int i, j, k, l; + size_t n; + int mpi_rank; /* needed by the VRFY macro */ + uint32_t expected_value; uint32_t * ptr_1; htri_t check; /* Shape comparison return value */ - herr_t ret; /* Generic return value */ + herr_t ret; /* Generic return value */ /* initialize the local copy of mpi_rank */ mpi_rank = tv_ptr->mpi_rank; - /* We have already done a H5Sselect_all() on the data space - * small_ds_slice_sid in the initialization phase, so no need to + /* We have already done a H5Sselect_all() on the data space + * small_ds_slice_sid in the initialization phase, so no need to * call H5Sselect_all() again. */ @@ -857,16 +857,16 @@ contig_hs_dr_pio_test__d2m_l2s(struct hs_dr_pio_test_vars_t * tv_ptr) /* zero out the buffer we will be reading into */ HDmemset(tv_ptr->small_ds_slice_buf, 0, sizeof(uint32_t) * tv_ptr->small_ds_slice_size); -#if CONTIG_HS_DR_PIO_TEST__D2M_L2S__DEBUG - HDfprintf(stdout, +#if CONTIG_HS_DR_PIO_TEST__D2M_L2S__DEBUG + HDfprintf(stdout, "%s reading slices from big cube on disk into small cube slice.\n", fcnName); #endif /* CONTIG_HS_DR_PIO_TEST__D2M_L2S__DEBUG */ /* in serial versions of this test, we loop through all the dimensions - * of the large data set. However, in the parallel version, each + * of the large data set. However, in the parallel version, each * process only works with that slice of the large cube indicated - * by its rank -- hence we set the most slowly changing index to + * by its rank -- hence we set the most slowly changing index to * mpi_rank, and don't itterate over it. */ @@ -879,9 +879,9 @@ contig_hs_dr_pio_test__d2m_l2s(struct hs_dr_pio_test_vars_t * tv_ptr) i = 0; } - /* since large_rank is at most PAR_SS_DR_MAX_RANK, no need to + /* since large_rank is at most PAR_SS_DR_MAX_RANK, no need to * loop over it -- either we are setting i to mpi_rank, or - * we are setting it to zero. It will not change during the + * we are setting it to zero. It will not change during the * test. */ @@ -905,7 +905,7 @@ contig_hs_dr_pio_test__d2m_l2s(struct hs_dr_pio_test_vars_t * tv_ptr) } do { - /* since small rank >= 2 and large_rank > small_rank, we + /* since small rank >= 2 and large_rank > small_rank, we * have large_rank >= 3. Since PAR_SS_DR_MAX_RANK == 5 * (baring major re-orgaization), this gives us: * @@ -919,14 +919,14 @@ contig_hs_dr_pio_test__d2m_l2s(struct hs_dr_pio_test_vars_t * tv_ptr) do { if ( (tv_ptr->skips)++ < tv_ptr->max_skips ) { /* skip the test */ - (tv_ptr->tests_skipped)++; + (tv_ptr->tests_skipped)++; } else { /* run the test */ tv_ptr->skips = 0; /* reset the skips counter */ - /* we know that small_rank - 1 >= 1 and that - * large_rank > small_rank by the assertions at the head + /* we know that small_rank - 1 >= 1 and that + * large_rank > small_rank by the assertions at the head * of this function. Thus no need for another inner loop. */ tv_ptr->start[0] = (hsize_t)i; @@ -941,7 +941,7 @@ contig_hs_dr_pio_test__d2m_l2s(struct hs_dr_pio_test_vars_t * tv_ptr) tv_ptr->stride_ptr, tv_ptr->count_ptr, tv_ptr->block_ptr); - VRFY((ret != FAIL), + VRFY((ret != FAIL), "H5Sselect_hyperslab(file_large_cube_sid) succeeded"); @@ -954,11 +954,11 @@ contig_hs_dr_pio_test__d2m_l2s(struct hs_dr_pio_test_vars_t * tv_ptr) /* Read selection from disk */ -#if CONTIG_HS_DR_PIO_TEST__D2M_L2S__DEBUG - HDfprintf(stdout, "%s:%d: start = %d %d %d %d %d.\n", - fcnName, (int)(tv_ptr->mpi_rank), - (int)(tv_ptr->start[0]), (int)(tv_ptr->start[1]), - (int)(tv_ptr->start[2]), (int)(tv_ptr->start[3]), +#if CONTIG_HS_DR_PIO_TEST__D2M_L2S__DEBUG + HDfprintf(stdout, "%s:%d: start = %d %d %d %d %d.\n", + fcnName, (int)(tv_ptr->mpi_rank), + (int)(tv_ptr->start[0]), (int)(tv_ptr->start[1]), + (int)(tv_ptr->start[2]), (int)(tv_ptr->start[3]), (int)(tv_ptr->start[4])); HDfprintf(stdout, "%s slice/file extent dims = %d/%d.\n", fcnName, @@ -979,7 +979,7 @@ contig_hs_dr_pio_test__d2m_l2s(struct hs_dr_pio_test_vars_t * tv_ptr) mis_match = FALSE; ptr_1 = tv_ptr->small_ds_slice_buf; expected_value = (uint32_t)( - (i * tv_ptr->edge_size * tv_ptr->edge_size * + (i * tv_ptr->edge_size * tv_ptr->edge_size * tv_ptr->edge_size * tv_ptr->edge_size) + (j * tv_ptr->edge_size * tv_ptr->edge_size * tv_ptr->edge_size) + (k * tv_ptr->edge_size * tv_ptr->edge_size) + @@ -998,10 +998,10 @@ contig_hs_dr_pio_test__d2m_l2s(struct hs_dr_pio_test_vars_t * tv_ptr) expected_value++; } - VRFY((mis_match == FALSE), + VRFY((mis_match == FALSE), "small slice read from large ds data good."); - (tv_ptr->tests_run)++; + (tv_ptr->tests_run)++; } l++; @@ -1026,27 +1026,27 @@ contig_hs_dr_pio_test__d2m_l2s(struct hs_dr_pio_test_vars_t * tv_ptr) /*------------------------------------------------------------------------- - * Function: contig_hs_dr_pio_test__d2m_s2l() + * Function: contig_hs_dr_pio_test__d2m_s2l() * - * Purpose: Part two of a series of tests of I/O to/from hyperslab - * selections of different rank in the parallel. + * Purpose: Part two of a series of tests of I/O to/from hyperslab + * selections of different rank in the parallel. * - * Verify that we can read from disk correctly using - * selections of different rank that H5S_select_shape_same() - * views as being of the same shape. + * Verify that we can read from disk correctly using + * selections of different rank that H5S_select_shape_same() + * views as being of the same shape. * - * In this function, we test this by reading slices of the - * on disk small data set into slices through the in memory - * large data set, and verify that the correct data (and - * only the correct data) is read. + * In this function, we test this by reading slices of the + * on disk small data set into slices through the in memory + * large data set, and verify that the correct data (and + * only the correct data) is read. * - * Return: void + * Return: void * - * Programmer: JRM -- 8/10/11 + * Programmer: JRM -- 8/10/11 * * Modifications: * - * None. + * None. * *------------------------------------------------------------------------- */ @@ -1056,25 +1056,25 @@ contig_hs_dr_pio_test__d2m_l2s(struct hs_dr_pio_test_vars_t * tv_ptr) static void contig_hs_dr_pio_test__d2m_s2l(struct hs_dr_pio_test_vars_t * tv_ptr) { -#if CONTIG_HS_DR_PIO_TEST__D2M_S2L__DEBUG +#if CONTIG_HS_DR_PIO_TEST__D2M_S2L__DEBUG const char *fcnName = "contig_hs_dr_pio_test__d2m_s2l()"; #endif /* CONTIG_HS_DR_PIO_TEST__D2M_S2L__DEBUG */ - hbool_t mis_match = FALSE; - int i, j, k, l; - size_t n; - int mpi_rank; /* needed by the VRFY macro */ + hbool_t mis_match = FALSE; + int i, j, k, l; + size_t n; + int mpi_rank; /* needed by the VRFY macro */ size_t start_index; size_t stop_index; - uint32_t expected_value; + uint32_t expected_value; uint32_t * ptr_1; htri_t check; /* Shape comparison return value */ - herr_t ret; /* Generic return value */ + herr_t ret; /* Generic return value */ /* initialize the local copy of mpi_rank */ mpi_rank = tv_ptr->mpi_rank; - /* Read slices of the on disk small data set into slices - * through the in memory large data set, and verify that the correct + /* Read slices of the on disk small data set into slices + * through the in memory large data set, and verify that the correct * data (and only the correct data) is read. */ @@ -1100,8 +1100,8 @@ contig_hs_dr_pio_test__d2m_s2l(struct hs_dr_pio_test_vars_t * tv_ptr) VRFY((ret >= 0), "H5Sselect_hyperslab(file_small_ds_sid_0, set) suceeded"); -#if CONTIG_HS_DR_PIO_TEST__D2M_S2L__DEBUG - HDfprintf(stdout, +#if CONTIG_HS_DR_PIO_TEST__D2M_S2L__DEBUG + HDfprintf(stdout, "%s reading slices of on disk small data set into slices of big data set.\n", fcnName); #endif /* CONTIG_HS_DR_PIO_TEST__D2M_S2L__DEBUG */ @@ -1129,11 +1129,11 @@ contig_hs_dr_pio_test__d2m_s2l(struct hs_dr_pio_test_vars_t * tv_ptr) /* in serial versions of this test, we loop through all the dimensions - * of the large data set that don't appear in the small data set. + * of the large data set that don't appear in the small data set. * - * However, in the parallel version, each process only works with that - * slice of the large (and small) data set indicated by its rank -- hence - * we set the most slowly changing index to mpi_rank, and don't itterate + * However, in the parallel version, each process only works with that + * slice of the large (and small) data set indicated by its rank -- hence + * we set the most slowly changing index to mpi_rank, and don't itterate * over it. */ @@ -1147,9 +1147,9 @@ contig_hs_dr_pio_test__d2m_s2l(struct hs_dr_pio_test_vars_t * tv_ptr) i = 0; } - /* since large_rank is at most PAR_SS_DR_MAX_RANK, no need to + /* since large_rank is at most PAR_SS_DR_MAX_RANK, no need to * loop over it -- either we are setting i to mpi_rank, or - * we are setting it to zero. It will not change during the + * we are setting it to zero. It will not change during the * test. */ @@ -1173,7 +1173,7 @@ contig_hs_dr_pio_test__d2m_s2l(struct hs_dr_pio_test_vars_t * tv_ptr) } do { - /* since small rank >= 2 and large_rank > small_rank, we + /* since small rank >= 2 and large_rank > small_rank, we * have large_rank >= 3. Since PAR_SS_DR_MAX_RANK == 5 * (baring major re-orgaization), this gives us: * @@ -1209,7 +1209,7 @@ contig_hs_dr_pio_test__d2m_s2l(struct hs_dr_pio_test_vars_t * tv_ptr) tv_ptr->stride_ptr, tv_ptr->count_ptr, tv_ptr->block_ptr); - VRFY((ret != FAIL), + VRFY((ret != FAIL), "H5Sselect_hyperslab(mem_large_ds_sid) succeeded"); @@ -1222,11 +1222,11 @@ contig_hs_dr_pio_test__d2m_s2l(struct hs_dr_pio_test_vars_t * tv_ptr) /* Read selection from disk */ -#if CONTIG_HS_DR_PIO_TEST__D2M_S2L__DEBUG - HDfprintf(stdout, "%s:%d: start = %d %d %d %d %d.\n", - fcnName, (int)(tv_ptr->mpi_rank), - (int)(tv_ptr->start[0]), (int)(tv_ptr->start[1]), - (int)(tv_ptr->start[2]), (int)(tv_ptr->start[3]), +#if CONTIG_HS_DR_PIO_TEST__D2M_S2L__DEBUG + HDfprintf(stdout, "%s:%d: start = %d %d %d %d %d.\n", + fcnName, (int)(tv_ptr->mpi_rank), + (int)(tv_ptr->start[0]), (int)(tv_ptr->start[1]), + (int)(tv_ptr->start[2]), (int)(tv_ptr->start[3]), (int)(tv_ptr->start[4])); HDfprintf(stdout, "%s:%d: mem/file extent dims = %d/%d.\n", fcnName, tv_ptr->mpi_rank, @@ -1248,7 +1248,7 @@ contig_hs_dr_pio_test__d2m_s2l(struct hs_dr_pio_test_vars_t * tv_ptr) expected_value = (uint32_t) ((size_t)(tv_ptr->mpi_rank) * tv_ptr->small_ds_slice_size); start_index = (size_t)( - (i * tv_ptr->edge_size * tv_ptr->edge_size * + (i * tv_ptr->edge_size * tv_ptr->edge_size * tv_ptr->edge_size * tv_ptr->edge_size) + (j * tv_ptr->edge_size * tv_ptr->edge_size * tv_ptr->edge_size) + (k * tv_ptr->edge_size * tv_ptr->edge_size) + @@ -1281,7 +1281,7 @@ contig_hs_dr_pio_test__d2m_s2l(struct hs_dr_pio_test_vars_t * tv_ptr) ptr_1++; } - VRFY((mis_match == FALSE), + VRFY((mis_match == FALSE), "small slice read from large ds data good."); (tv_ptr->tests_run)++; @@ -1309,29 +1309,29 @@ contig_hs_dr_pio_test__d2m_s2l(struct hs_dr_pio_test_vars_t * tv_ptr) /*------------------------------------------------------------------------- - * Function: contig_hs_dr_pio_test__m2d_l2s() + * Function: contig_hs_dr_pio_test__m2d_l2s() * - * Purpose: Part three of a series of tests of I/O to/from hyperslab - * selections of different rank in the parallel. + * Purpose: Part three of a series of tests of I/O to/from hyperslab + * selections of different rank in the parallel. * - * Verify that we can write from memory to file using - * selections of different rank that H5S_select_shape_same() - * views as being of the same shape. + * Verify that we can write from memory to file using + * selections of different rank that H5S_select_shape_same() + * views as being of the same shape. * - * Do this by writing small_rank - 1 dimensional slices from - * the in memory large data set to the on disk small cube - * dataset. After each write, read the slice of the small - * dataset back from disk, and verify that it contains - * the expected data. Verify that H5S_select_shape_same() - * returns true on the memory and file selections. + * Do this by writing small_rank - 1 dimensional slices from + * the in memory large data set to the on disk small cube + * dataset. After each write, read the slice of the small + * dataset back from disk, and verify that it contains + * the expected data. Verify that H5S_select_shape_same() + * returns true on the memory and file selections. * - * Return: void + * Return: void * - * Programmer: JRM -- 8/10/11 + * Programmer: JRM -- 8/10/11 * * Modifications: * - * None. + * None. * *------------------------------------------------------------------------- */ @@ -1341,19 +1341,19 @@ contig_hs_dr_pio_test__d2m_s2l(struct hs_dr_pio_test_vars_t * tv_ptr) static void contig_hs_dr_pio_test__m2d_l2s(struct hs_dr_pio_test_vars_t * tv_ptr) { -#if CONTIG_HS_DR_PIO_TEST__M2D_L2S__DEBUG +#if CONTIG_HS_DR_PIO_TEST__M2D_L2S__DEBUG const char *fcnName = "contig_hs_dr_pio_test__m2d_l2s()"; #endif /* CONTIG_HS_DR_PIO_TEST__M2D_L2S__DEBUG */ - hbool_t mis_match = FALSE; - int i, j, k, l; - size_t n; - int mpi_rank; /* needed by the VRFY macro */ + hbool_t mis_match = FALSE; + int i, j, k, l; + size_t n; + int mpi_rank; /* needed by the VRFY macro */ size_t start_index; size_t stop_index; - uint32_t expected_value; + uint32_t expected_value; uint32_t * ptr_1; htri_t check; /* Shape comparison return value */ - herr_t ret; /* Generic return value */ + herr_t ret; /* Generic return value */ /* initialize the local copy of mpi_rank */ mpi_rank = tv_ptr->mpi_rank; @@ -1363,10 +1363,10 @@ contig_hs_dr_pio_test__m2d_l2s(struct hs_dr_pio_test_vars_t * tv_ptr) * from memory to file using selections of different rank that * H5S_select_shape_same() views as being of the same shape. * - * Start by writing small_rank - 1 dimensional slices from the in memory large - * data set to the on disk small cube dataset. After each write, read the - * slice of the small dataset back from disk, and verify that it contains - * the expected data. Verify that H5S_select_shape_same() returns true on + * Start by writing small_rank - 1 dimensional slices from the in memory large + * data set to the on disk small cube dataset. After each write, read the + * slice of the small dataset back from disk, and verify that it contains + * the expected data. Verify that H5S_select_shape_same() returns true on * the memory and file selections. */ @@ -1422,18 +1422,18 @@ contig_hs_dr_pio_test__m2d_l2s(struct hs_dr_pio_test_vars_t * tv_ptr) HDmemset(tv_ptr->small_ds_buf_1, 0, sizeof(uint32_t) * tv_ptr->small_ds_size); -#if CONTIG_HS_DR_PIO_TEST__M2D_L2S__DEBUG - HDfprintf(stdout, +#if CONTIG_HS_DR_PIO_TEST__M2D_L2S__DEBUG + HDfprintf(stdout, "%s writing slices from big ds to slices of small ds on disk.\n", fcnName); #endif /* CONTIG_HS_DR_PIO_TEST__M2D_L2S__DEBUG */ /* in serial versions of this test, we loop through all the dimensions - * of the large data set that don't appear in the small data set. + * of the large data set that don't appear in the small data set. * - * However, in the parallel version, each process only works with that - * slice of the large (and small) data set indicated by its rank -- hence - * we set the most slowly changing index to mpi_rank, and don't itterate + * However, in the parallel version, each process only works with that + * slice of the large (and small) data set indicated by its rank -- hence + * we set the most slowly changing index to mpi_rank, and don't itterate * over it. */ @@ -1447,9 +1447,9 @@ contig_hs_dr_pio_test__m2d_l2s(struct hs_dr_pio_test_vars_t * tv_ptr) i = 0; } - /* since large_rank is at most PAR_SS_DR_MAX_RANK, no need to + /* since large_rank is at most PAR_SS_DR_MAX_RANK, no need to * loop over it -- either we are setting i to mpi_rank, or - * we are setting it to zero. It will not change during the + * we are setting it to zero. It will not change during the * test. */ @@ -1474,7 +1474,7 @@ contig_hs_dr_pio_test__m2d_l2s(struct hs_dr_pio_test_vars_t * tv_ptr) } do { - /* since small rank >= 2 and large_rank > small_rank, we + /* since small rank >= 2 and large_rank > small_rank, we * have large_rank >= 3. Since PAR_SS_DR_MAX_RANK == 5 * (baring major re-orgaization), this gives us: * @@ -1523,7 +1523,7 @@ contig_hs_dr_pio_test__m2d_l2s(struct hs_dr_pio_test_vars_t * tv_ptr) tv_ptr->stride_ptr, tv_ptr->count_ptr, tv_ptr->block_ptr); - VRFY((ret >= 0), + VRFY((ret >= 0), "H5Sselect_hyperslab() mem_large_ds_sid succeeded."); @@ -1536,13 +1536,13 @@ contig_hs_dr_pio_test__m2d_l2s(struct hs_dr_pio_test_vars_t * tv_ptr) VRFY((check == TRUE), "H5S_select_shape_same_test passed."); - /* write the slice from the in memory large data set to the + /* write the slice from the in memory large data set to the * slice of the on disk small dataset. */ -#if CONTIG_HS_DR_PIO_TEST__M2D_L2S__DEBUG - HDfprintf(stdout, "%s:%d: start = %d %d %d %d %d.\n", +#if CONTIG_HS_DR_PIO_TEST__M2D_L2S__DEBUG + HDfprintf(stdout, "%s:%d: start = %d %d %d %d %d.\n", fcnName, (int)(tv_ptr->mpi_rank), - (int)(tv_ptr->start[0]), (int)(tv_ptr->start[1]), - (int)(tv_ptr->start[2]), (int)(tv_ptr->start[3]), + (int)(tv_ptr->start[0]), (int)(tv_ptr->start[1]), + (int)(tv_ptr->start[2]), (int)(tv_ptr->start[3]), (int)(tv_ptr->start[4])); HDfprintf(stdout, "%s:%d: mem/file extent dims = %d/%d.\n", fcnName, tv_ptr->mpi_rank, @@ -1574,7 +1574,7 @@ contig_hs_dr_pio_test__m2d_l2s(struct hs_dr_pio_test_vars_t * tv_ptr) ptr_1 = tv_ptr->small_ds_buf_1; expected_value = (uint32_t)( - (i * tv_ptr->edge_size * tv_ptr->edge_size * + (i * tv_ptr->edge_size * tv_ptr->edge_size * tv_ptr->edge_size * tv_ptr->edge_size) + (j * tv_ptr->edge_size * tv_ptr->edge_size * tv_ptr->edge_size) + (k * tv_ptr->edge_size * tv_ptr->edge_size) + @@ -1609,7 +1609,7 @@ contig_hs_dr_pio_test__m2d_l2s(struct hs_dr_pio_test_vars_t * tv_ptr) ptr_1++; } - VRFY((mis_match == FALSE), + VRFY((mis_match == FALSE), "small slice write from large ds data good."); (tv_ptr->tests_run)++; @@ -1637,31 +1637,31 @@ contig_hs_dr_pio_test__m2d_l2s(struct hs_dr_pio_test_vars_t * tv_ptr) /*------------------------------------------------------------------------- - * Function: contig_hs_dr_pio_test__m2d_s2l() + * Function: contig_hs_dr_pio_test__m2d_s2l() * - * Purpose: Part four of a series of tests of I/O to/from hyperslab - * selections of different rank in the parallel. + * Purpose: Part four of a series of tests of I/O to/from hyperslab + * selections of different rank in the parallel. * - * Verify that we can write from memory to file using - * selections of different rank that H5S_select_shape_same() - * views as being of the same shape. + * Verify that we can write from memory to file using + * selections of different rank that H5S_select_shape_same() + * views as being of the same shape. * - * Do this by writing the contents of the process's slice of - * the in memory small data set to slices of the on disk - * large data set. After each write, read the process's - * slice of the large data set back into memory, and verify - * that it contains the expected data. + * Do this by writing the contents of the process's slice of + * the in memory small data set to slices of the on disk + * large data set. After each write, read the process's + * slice of the large data set back into memory, and verify + * that it contains the expected data. * - * Verify that H5S_select_shape_same() returns true on the - * memory and file selections. + * Verify that H5S_select_shape_same() returns true on the + * memory and file selections. * - * Return: void + * Return: void * - * Programmer: JRM -- 8/10/11 + * Programmer: JRM -- 8/10/11 * * Modifications: * - * None + * None * *------------------------------------------------------------------------- */ @@ -1671,32 +1671,32 @@ contig_hs_dr_pio_test__m2d_l2s(struct hs_dr_pio_test_vars_t * tv_ptr) static void contig_hs_dr_pio_test__m2d_s2l(struct hs_dr_pio_test_vars_t * tv_ptr) { -#if CONTIG_HS_DR_PIO_TEST__M2D_S2L__DEBUG +#if CONTIG_HS_DR_PIO_TEST__M2D_S2L__DEBUG const char *fcnName = "contig_hs_dr_pio_test__m2d_s2l()"; #endif /* CONTIG_HS_DR_PIO_TEST__M2D_S2L__DEBUG */ - hbool_t mis_match = FALSE; - int i, j, k, l; - size_t n; - int mpi_rank; /* needed by the VRFY macro */ + hbool_t mis_match = FALSE; + int i, j, k, l; + size_t n; + int mpi_rank; /* needed by the VRFY macro */ size_t start_index; size_t stop_index; - uint32_t expected_value; + uint32_t expected_value; uint32_t * ptr_1; htri_t check; /* Shape comparison return value */ - herr_t ret; /* Generic return value */ + herr_t ret; /* Generic return value */ /* initialize the local copy of mpi_rank */ mpi_rank = tv_ptr->mpi_rank; - /* Now write the contents of the process's slice of the in memory - * small data set to slices of the on disk large data set. After + /* Now write the contents of the process's slice of the in memory + * small data set to slices of the on disk large data set. After * each write, read the process's slice of the large data set back - * into memory, and verify that it contains the expected data. - * Verify that H5S_select_shape_same() returns true on the memory + * into memory, and verify that it contains the expected data. + * Verify that H5S_select_shape_same() returns true on the memory * and file selections. */ - /* select the slice of the in memory small data set associated with + /* select the slice of the in memory small data set associated with * the process's mpi rank. */ tv_ptr->start[0] = (hsize_t)(tv_ptr->mpi_rank); @@ -1743,8 +1743,8 @@ contig_hs_dr_pio_test__m2d_s2l(struct hs_dr_pio_test_vars_t * tv_ptr) /* zero out the in memory large ds */ HDmemset(tv_ptr->large_ds_buf_1, 0, sizeof(uint32_t) * tv_ptr->large_ds_size); -#if CONTIG_HS_DR_PIO_TEST__M2D_S2L__DEBUG - HDfprintf(stdout, +#if CONTIG_HS_DR_PIO_TEST__M2D_S2L__DEBUG + HDfprintf(stdout, "%s writing process slices of small ds to slices of large ds on disk.\n", fcnName); #endif /* CONTIG_HS_DR_PIO_TEST__M2D_S2L__DEBUG */ @@ -1758,9 +1758,9 @@ contig_hs_dr_pio_test__m2d_s2l(struct hs_dr_pio_test_vars_t * tv_ptr) i = 0; } - /* since large_rank is at most PAR_SS_DR_MAX_RANK, no need to + /* since large_rank is at most PAR_SS_DR_MAX_RANK, no need to * loop over it -- either we are setting i to mpi_rank, or - * we are setting it to zero. It will not change during the + * we are setting it to zero. It will not change during the * test. */ @@ -1784,7 +1784,7 @@ contig_hs_dr_pio_test__m2d_s2l(struct hs_dr_pio_test_vars_t * tv_ptr) } do { - /* since small rank >= 2 and large_rank > small_rank, we + /* since small rank >= 2 and large_rank > small_rank, we * have large_rank >= 3. Since PAR_SS_DR_MAX_RANK == 5 * (baring major re-orgaization), this gives us: * @@ -1800,18 +1800,18 @@ contig_hs_dr_pio_test__m2d_s2l(struct hs_dr_pio_test_vars_t * tv_ptr) (tv_ptr->tests_skipped)++; -#if CONTIG_HS_DR_PIO_TEST__M2D_S2L__DEBUG +#if CONTIG_HS_DR_PIO_TEST__M2D_S2L__DEBUG tv_ptr->start[0] = (hsize_t)i; tv_ptr->start[1] = (hsize_t)j; tv_ptr->start[2] = (hsize_t)k; tv_ptr->start[3] = (hsize_t)l; tv_ptr->start[4] = 0; - HDfprintf(stdout, - "%s:%d: skipping test with start = %d %d %d %d %d.\n", + HDfprintf(stdout, + "%s:%d: skipping test with start = %d %d %d %d %d.\n", fcnName, (int)(tv_ptr->mpi_rank), - (int)(tv_ptr->start[0]), (int)(tv_ptr->start[1]), - (int)(tv_ptr->start[2]), (int)(tv_ptr->start[3]), + (int)(tv_ptr->start[0]), (int)(tv_ptr->start[1]), + (int)(tv_ptr->start[2]), (int)(tv_ptr->start[3]), (int)(tv_ptr->start[4])); HDfprintf(stdout, "%s:%d: mem/file extent dims = %d/%d.\n", fcnName, tv_ptr->mpi_rank, @@ -1855,7 +1855,7 @@ contig_hs_dr_pio_test__m2d_s2l(struct hs_dr_pio_test_vars_t * tv_ptr) tv_ptr->stride_ptr, tv_ptr->count_ptr, tv_ptr->block_ptr); - VRFY((ret != FAIL), + VRFY((ret != FAIL), "H5Sselect_hyperslab() target large ds slice succeeded"); @@ -1869,14 +1869,14 @@ contig_hs_dr_pio_test__m2d_s2l(struct hs_dr_pio_test_vars_t * tv_ptr) VRFY((check == TRUE), "H5S_select_shape_same_test passed"); - /* write the small data set slice from memory to the - * target slice of the disk data set + /* write the small data set slice from memory to the + * target slice of the disk data set */ -#if CONTIG_HS_DR_PIO_TEST__M2D_S2L__DEBUG - HDfprintf(stdout, "%s:%d: start = %d %d %d %d %d.\n", +#if CONTIG_HS_DR_PIO_TEST__M2D_S2L__DEBUG + HDfprintf(stdout, "%s:%d: start = %d %d %d %d %d.\n", fcnName, (int)(tv_ptr->mpi_rank), - (int)(tv_ptr->start[0]), (int)(tv_ptr->start[1]), - (int)(tv_ptr->start[2]), (int)(tv_ptr->start[3]), + (int)(tv_ptr->start[0]), (int)(tv_ptr->start[1]), + (int)(tv_ptr->start[2]), (int)(tv_ptr->start[3]), (int)(tv_ptr->start[4])); HDfprintf(stdout, "%s:%d: mem/file extent dims = %d/%d.\n", fcnName, tv_ptr->mpi_rank, @@ -1889,11 +1889,11 @@ contig_hs_dr_pio_test__m2d_s2l(struct hs_dr_pio_test_vars_t * tv_ptr) tv_ptr->file_large_ds_sid_0, tv_ptr->xfer_plist, tv_ptr->small_ds_buf_0); - VRFY((ret != FAIL), + VRFY((ret != FAIL), "H5Dwrite of small ds slice to large ds succeeded"); - /* read this processes slice on the on disk large + /* read this processes slice on the on disk large * data set into memory. */ @@ -1903,7 +1903,7 @@ contig_hs_dr_pio_test__m2d_s2l(struct hs_dr_pio_test_vars_t * tv_ptr) tv_ptr->file_large_ds_process_slice_sid, tv_ptr->xfer_plist, tv_ptr->large_ds_buf_1); - VRFY((ret != FAIL), + VRFY((ret != FAIL), "H5Dread() of process slice of large ds succeeded"); @@ -1912,12 +1912,12 @@ contig_hs_dr_pio_test__m2d_s2l(struct hs_dr_pio_test_vars_t * tv_ptr) */ ptr_1 = tv_ptr->large_ds_buf_1; expected_value = (uint32_t) - ((size_t)(tv_ptr->mpi_rank) * tv_ptr->small_ds_slice_size); + ((size_t)(tv_ptr->mpi_rank) * tv_ptr->small_ds_slice_size); start_index = (size_t) - ((i * tv_ptr->edge_size * tv_ptr->edge_size * + ((i * tv_ptr->edge_size * tv_ptr->edge_size * tv_ptr->edge_size * tv_ptr->edge_size) + - (j * tv_ptr->edge_size * tv_ptr->edge_size * + (j * tv_ptr->edge_size * tv_ptr->edge_size * tv_ptr->edge_size) + (k * tv_ptr->edge_size * tv_ptr->edge_size) + (l * tv_ptr->edge_size)); @@ -1949,7 +1949,7 @@ contig_hs_dr_pio_test__m2d_s2l(struct hs_dr_pio_test_vars_t * tv_ptr) ptr_1++; } - VRFY((mis_match == FALSE), + VRFY((mis_match == FALSE), "small ds slice write to large ds slice data good."); (tv_ptr->tests_run)++; @@ -1977,29 +1977,29 @@ contig_hs_dr_pio_test__m2d_s2l(struct hs_dr_pio_test_vars_t * tv_ptr) /*------------------------------------------------------------------------- - * Function: contig_hs_dr_pio_test__run_test() + * Function: contig_hs_dr_pio_test__run_test() * - * Purpose: Test I/O to/from hyperslab selections of different rank in - * the parallel. + * Purpose: Test I/O to/from hyperslab selections of different rank in + * the parallel. * - * Return: void + * Return: void * - * Programmer: JRM -- 9/18/09 + * 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 -- 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. + * 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. * *------------------------------------------------------------------------- */ @@ -2021,13 +2021,13 @@ contig_hs_dr_pio_test__run_test(const int test_num, int64_t * tests_run_ptr, int64_t * tests_skipped_ptr) { -#if CONTIG_HS_DR_PIO_TEST__RUN_TEST__DEBUG +#if CONTIG_HS_DR_PIO_TEST__RUN_TEST__DEBUG const char *fcnName = "contig_hs_dr_pio_test__run_test()"; #endif /* CONTIG_HS_DR_PIO_TEST__RUN_TEST__DEBUG */ - int mpi_rank; - struct hs_dr_pio_test_vars_t test_vars = + int mpi_rank; + struct hs_dr_pio_test_vars_t test_vars = { - /* int mpi_size = */ -1, + /* int mpi_size = */ -1, /* int mpi_rank = */ -1, /* MPI_Comm mpi_comm = */ MPI_COMM_NULL, /* MPI_Inf mpi_info = */ MPI_INFO_NULL, @@ -2043,7 +2043,7 @@ contig_hs_dr_pio_test__run_test(const int test_num, /* uint32_t * small_ds_buf_2 = */ NULL, /* uint32_t * small_ds_slice_buf = */ NULL, /* uint32_t * large_ds_buf_0 = */ NULL, - /* uint32_t * large_ds_buf_1 = */ NULL, + /* uint32_t * large_ds_buf_1 = */ NULL, /* uint32_t * large_ds_buf_2 = */ NULL, /* uint32_t * large_ds_slice_buf = */ NULL, /* int small_ds_offset = */ -1, @@ -2080,8 +2080,8 @@ contig_hs_dr_pio_test__run_test(const int test_num, /* hsize_t * stride_ptr = */ NULL, /* hsize_t * count_ptr = */ NULL, /* hsize_t * block_ptr = */ NULL, - /* int skips = */ 0, - /* int max_skips = */ 0, + /* int skips = */ 0, + /* int max_skips = */ 0, /* int64_t total_tests = */ 0, /* int64_t tests_run = */ 0, /* int64_t tests_skipped = */ 0 @@ -2099,7 +2099,7 @@ contig_hs_dr_pio_test__run_test(const int test_num, tv_ptr->skips = *skips_ptr; tv_ptr->max_skips = max_skips; -#if CONTIG_HS_DR_PIO_TEST__RUN_TEST__DEBUG +#if CONTIG_HS_DR_PIO_TEST__RUN_TEST__DEBUG if ( MAINPROCESS ) { HDfprintf(stdout, "test %d: small rank = %d, large rank = %d.\n", test_num, small_rank, large_rank); @@ -2111,12 +2111,12 @@ contig_hs_dr_pio_test__run_test(const int test_num, * of different rank that H5S_select_shape_same() views as being of the * same shape. * - * Start by reading small_rank - 1 dimensional slice from the on disk - * large cube, and verifying that the data read is correct. Verify that + * Start by reading small_rank - 1 dimensional slice from the on disk + * large cube, and verifying that the data read is correct. Verify that * H5S_select_shape_same() returns true on the memory and file selections. */ -#if CONTIG_HS_DR_PIO_TEST__RUN_TEST__DEBUG +#if CONTIG_HS_DR_PIO_TEST__RUN_TEST__DEBUG if ( MAINPROCESS ) { HDfprintf(stdout, "test %d: running contig_hs_dr_pio_test__d2m_l2s.\n", test_num); } @@ -2124,12 +2124,12 @@ contig_hs_dr_pio_test__run_test(const int test_num, contig_hs_dr_pio_test__d2m_l2s(tv_ptr); - /* Second, read slices of the on disk small data set into slices - * through the in memory large data set, and verify that the correct + /* Second, read slices of the on disk small data set into slices + * through the in memory large data set, and verify that the correct * data (and only the correct data) is read. */ -#if CONTIG_HS_DR_PIO_TEST__RUN_TEST__DEBUG +#if CONTIG_HS_DR_PIO_TEST__RUN_TEST__DEBUG if ( MAINPROCESS ) { HDfprintf(stdout, "test %d: running contig_hs_dr_pio_test__d2m_s2l.\n", test_num); } @@ -2142,13 +2142,13 @@ contig_hs_dr_pio_test__run_test(const int test_num, * H5S_select_shape_same() views as being of the same shape. * * Start by writing small_rank - 1 D slices from the in memory large data - * set to the on disk small cube dataset. After each write, read the - * slice of the small dataset back from disk, and verify that it contains - * the expected data. Verify that H5S_select_shape_same() returns true on + * set to the on disk small cube dataset. After each write, read the + * slice of the small dataset back from disk, and verify that it contains + * the expected data. Verify that H5S_select_shape_same() returns true on * the memory and file selections. */ -#if CONTIG_HS_DR_PIO_TEST__RUN_TEST__DEBUG +#if CONTIG_HS_DR_PIO_TEST__RUN_TEST__DEBUG if ( MAINPROCESS ) { HDfprintf(stdout, "test %d: running contig_hs_dr_pio_test__m2d_l2s.\n", test_num); } @@ -2156,25 +2156,25 @@ contig_hs_dr_pio_test__run_test(const int test_num, contig_hs_dr_pio_test__m2d_l2s(tv_ptr); - /* Now write the contents of the process's slice of the in memory - * small data set to slices of the on disk large data set. After + /* Now write the contents of the process's slice of the in memory + * small data set to slices of the on disk large data set. After * each write, read the process's slice of the large data set back - * into memory, and verify that it contains the expected data. - * Verify that H5S_select_shape_same() returns true on the memory + * into memory, and verify that it contains the expected data. + * Verify that H5S_select_shape_same() returns true on the memory * and file selections. */ -#if CONTIG_HS_DR_PIO_TEST__RUN_TEST__DEBUG +#if CONTIG_HS_DR_PIO_TEST__RUN_TEST__DEBUG if ( MAINPROCESS ) { HDfprintf(stdout, "test %d: running contig_hs_dr_pio_test__m2d_s2l.\n", test_num); } #endif /* CONTIG_HS_DR_PIO_TEST__RUN_TEST__DEBUG */ contig_hs_dr_pio_test__m2d_s2l(tv_ptr); -#if CONTIG_HS_DR_PIO_TEST__RUN_TEST__DEBUG +#if CONTIG_HS_DR_PIO_TEST__RUN_TEST__DEBUG if ( MAINPROCESS ) { - HDfprintf(stdout, - "test %d: Subtests complete -- tests run/skipped/total = %lld/%lld/%lld.\n", + HDfprintf(stdout, + "test %d: Subtests complete -- tests run/skipped/total = %lld/%lld/%lld.\n", test_num, (long long)(tv_ptr->tests_run), (long long)(tv_ptr->tests_skipped), (long long)(tv_ptr->total_tests)); } @@ -2182,7 +2182,7 @@ contig_hs_dr_pio_test__run_test(const int test_num, hs_dr_pio_test__takedown(tv_ptr); -#if CONTIG_HS_DR_PIO_TEST__RUN_TEST__DEBUG +#if CONTIG_HS_DR_PIO_TEST__RUN_TEST__DEBUG if ( MAINPROCESS ) { HDfprintf(stdout, "test %d: Takedown complete.\n", test_num); } @@ -2199,28 +2199,28 @@ contig_hs_dr_pio_test__run_test(const int test_num, /*------------------------------------------------------------------------- - * Function: contig_hs_dr_pio_test(ShapeSameTestMethods sstest_type) + * Function: contig_hs_dr_pio_test(ShapeSameTestMethods sstest_type) * - * Purpose: Test I/O to/from hyperslab selections of different rank in - * the parallel case. + * Purpose: Test I/O to/from hyperslab selections of different rank in + * the parallel case. * - * Return: void + * Return: void * - * Programmer: JRM -- 9/18/09 + * 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. + * 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 + * 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 + * AKC -- 2010/01/14 * *------------------------------------------------------------------------- */ @@ -2234,23 +2234,23 @@ contig_hs_dr_pio_test(ShapeSameTestMethods sstest_type) int local_express_test; int mpi_rank = -1; int mpi_size; - int test_num = 0; - int edge_size; - int chunk_edge_size = 0; - int small_rank; - int large_rank; - int mpi_result; - int skips = 0; - int max_skips = 0; - /* The following table list the number of sub-tests skipped between - * each test that is actually executed as a function of the express + int test_num = 0; + int edge_size; + int chunk_edge_size = 0; + int small_rank; + int large_rank; + int mpi_result; + int skips = 0; + int max_skips = 0; + /* The following table list the number of sub-tests skipped between + * each test that is actually executed as a function of the express * test level. Note that any value in excess of 4880 will cause all * sub tests to be skipped. */ int max_skips_tbl[4] = {0, 4, 64, 1024}; - hid_t dset_type = H5T_NATIVE_UINT; - int64_t total_tests = 0; - int64_t tests_run = 0; + hid_t dset_type = H5T_NATIVE_UINT; + int64_t total_tests = 0; + int64_t tests_run = 0; int64_t tests_skipped = 0; HDcompile_assert(sizeof(uint32_t) == sizeof(unsigned)); @@ -2293,7 +2293,7 @@ contig_hs_dr_pio_test(ShapeSameTestMethods sstest_type) chunk_edge_size, small_rank, large_rank, - FALSE, + FALSE, dset_type, express_test, &skips, @@ -2314,7 +2314,7 @@ contig_hs_dr_pio_test(ShapeSameTestMethods sstest_type) chunk_edge_size, small_rank, large_rank, - TRUE, + TRUE, dset_type, express_test, &skips, @@ -2335,7 +2335,7 @@ contig_hs_dr_pio_test(ShapeSameTestMethods sstest_type) chunk_edge_size, small_rank, large_rank, - FALSE, + FALSE, dset_type, express_test, &skips, @@ -2356,7 +2356,7 @@ contig_hs_dr_pio_test(ShapeSameTestMethods sstest_type) chunk_edge_size, small_rank, large_rank, - TRUE, + TRUE, dset_type, express_test, &skips, @@ -2375,7 +2375,7 @@ contig_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", + HDfprintf(stdout, " run/skipped/total = %lld/%lld/%lld.\n", tests_run, tests_skipped, total_tests); } #endif /* CONTIG_HS_DR_PIO_TEST__DEBUG */ @@ -2383,7 +2383,7 @@ contig_hs_dr_pio_test(ShapeSameTestMethods sstest_type) } if ( ( MAINPROCESS ) && ( tests_skipped > 0 ) ) { - HDfprintf(stdout, " %lld of %lld subtests skipped to expedite testing.\n", + HDfprintf(stdout, " %lld of %lld subtests skipped to expedite testing.\n", tests_skipped, total_tests); } @@ -2394,24 +2394,24 @@ contig_hs_dr_pio_test(ShapeSameTestMethods sstest_type) /**************************************************************** ** -** ckrbrd_hs_dr_pio_test__slct_ckrbrd(): -** Given a data space of tgt_rank, and dimensions: +** ckrbrd_hs_dr_pio_test__slct_ckrbrd(): +** Given a data space of tgt_rank, and dimensions: ** -** (mpi_size + 1), edge_size, ... , edge_size +** (mpi_size + 1), edge_size, ... , edge_size ** -** edge_size, and a checker_edge_size, select a checker -** board selection of a sel_rank (sel_rank < tgt_rank) -** dimensional slice through the data space parallel to the +** edge_size, and a checker_edge_size, select a checker +** board selection of a sel_rank (sel_rank < tgt_rank) +** dimensional slice through the data space parallel to the ** sel_rank fastest changing indicies, with origin (in the -** higher indicies) as indicated by the start array. +** higher indicies) as indicated by the start array. ** -** Note that this function, like all its relatives, is -** hard coded to presume a maximum data space rank of 5. -** While this maximum is declared as a constant, increasing -** it will require extensive coding in addition to changing +** Note that this function, like all its relatives, is +** hard coded to presume a maximum data space rank of 5. +** While this maximum is declared as a constant, increasing +** it will require extensive coding in addition to changing ** the value of the constant. ** -** JRM -- 10/8/09 +** JRM -- 10/8/09 ** ****************************************************************/ @@ -2426,22 +2426,22 @@ ckrbrd_hs_dr_pio_test__slct_ckrbrd(const int mpi_rank, const int sel_rank, hsize_t sel_start[]) { -#if CKRBRD_HS_DR_PIO_TEST__SELECT_CHECKER_BOARD__DEBUG - const char * fcnName = "ckrbrd_hs_dr_pio_test__slct_ckrbrd():"; -#endif - hbool_t first_selection = TRUE; +#if CKRBRD_HS_DR_PIO_TEST__SELECT_CHECKER_BOARD__DEBUG + const char * fcnName = "ckrbrd_hs_dr_pio_test__slct_ckrbrd():"; +#endif + hbool_t first_selection = TRUE; int i, j, k, l, m; - int n_cube_offset; - int sel_offset; - const int test_max_rank = PAR_SS_DR_MAX_RANK; /* must update code if */ + int n_cube_offset; + int sel_offset; + const int test_max_rank = PAR_SS_DR_MAX_RANK; /* must update code if */ /* this changes */ - hsize_t base_count; + hsize_t base_count; hsize_t offset_count; - hsize_t start[PAR_SS_DR_MAX_RANK]; - hsize_t stride[PAR_SS_DR_MAX_RANK]; - hsize_t count[PAR_SS_DR_MAX_RANK]; - hsize_t block[PAR_SS_DR_MAX_RANK]; - herr_t ret; /* Generic return value */ + hsize_t start[PAR_SS_DR_MAX_RANK]; + hsize_t stride[PAR_SS_DR_MAX_RANK]; + hsize_t count[PAR_SS_DR_MAX_RANK]; + hsize_t block[PAR_SS_DR_MAX_RANK]; + herr_t ret; /* Generic return value */ HDassert( edge_size >= 6 ); HDassert( 0 < checker_edge_size ); @@ -2458,14 +2458,14 @@ ckrbrd_hs_dr_pio_test__slct_ckrbrd(const int mpi_rank, HDassert( n_cube_offset >= 0 ); HDassert( n_cube_offset <= sel_offset ); -#if CKRBRD_HS_DR_PIO_TEST__SELECT_CHECKER_BOARD__DEBUG +#if CKRBRD_HS_DR_PIO_TEST__SELECT_CHECKER_BOARD__DEBUG HDfprintf(stdout, "%s:%d: edge_size/checker_edge_size = %d/%d\n", fcnName, mpi_rank, edge_size, checker_edge_size); - HDfprintf(stdout, "%s:%d: sel_rank/sel_offset = %d/%d.\n", + HDfprintf(stdout, "%s:%d: sel_rank/sel_offset = %d/%d.\n", fcnName, mpi_rank, sel_rank, sel_offset); - HDfprintf(stdout, "%s:%d: tgt_rank/n_cube_offset = %d/%d.\n", + HDfprintf(stdout, "%s:%d: tgt_rank/n_cube_offset = %d/%d.\n", fcnName, mpi_rank, tgt_rank, n_cube_offset); -#endif /* CKRBRD_HS_DR_PIO_TEST__SELECT_CHECKER_BOARD__DEBUG */ +#endif /* CKRBRD_HS_DR_PIO_TEST__SELECT_CHECKER_BOARD__DEBUG */ /* First, compute the base count (which assumes start == 0 * for the associated offset) and offset_count (which @@ -2495,7 +2495,7 @@ ckrbrd_hs_dr_pio_test__slct_ckrbrd(const int mpi_rank, } /* Now set up the stride and block arrays, and portions of the start - * and count arrays that will not be altered during the selection of + * and count arrays that will not be altered during the selection of * the checker board. */ i = 0; @@ -2527,7 +2527,7 @@ ckrbrd_hs_dr_pio_test__slct_ckrbrd(const int mpi_rank, i++; } - + i = 0; do { if ( 0 >= sel_offset ) { @@ -2546,7 +2546,7 @@ ckrbrd_hs_dr_pio_test__slct_ckrbrd(const int mpi_rank, } j = 0; - do { + do { if ( 1 >= sel_offset ) { if ( j == 0 ) { @@ -2615,62 +2615,62 @@ ckrbrd_hs_dr_pio_test__slct_ckrbrd(const int mpi_rank, if ( ((i + j + k + l + m) % 2) == 0 ) { -#if CKRBRD_HS_DR_PIO_TEST__SELECT_CHECKER_BOARD__DEBUG - HDfprintf(stdout, "%s%d: *** first_selection = %d ***\n", +#if CKRBRD_HS_DR_PIO_TEST__SELECT_CHECKER_BOARD__DEBUG + HDfprintf(stdout, "%s%d: *** first_selection = %d ***\n", fcnName, mpi_rank, (int)first_selection); HDfprintf(stdout, "%s:%d: i/j/k/l/m = %d/%d/%d/%d/%d\n", fcnName, mpi_rank, i, j, k, l, m); - HDfprintf(stdout, - "%s:%d: start = %d %d %d %d %d.\n", - fcnName, mpi_rank, (int)start[0], (int)start[1], + HDfprintf(stdout, + "%s:%d: start = %d %d %d %d %d.\n", + fcnName, mpi_rank, (int)start[0], (int)start[1], (int)start[2], (int)start[3], (int)start[4]); - HDfprintf(stdout, - "%s:%d: stride = %d %d %d %d %d.\n", - fcnName, mpi_rank, (int)stride[0], (int)stride[1], + HDfprintf(stdout, + "%s:%d: stride = %d %d %d %d %d.\n", + fcnName, mpi_rank, (int)stride[0], (int)stride[1], (int)stride[2], (int)stride[3], (int)stride[4]); - HDfprintf(stdout, - "%s:%d: count = %d %d %d %d %d.\n", - fcnName, mpi_rank, (int)count[0], (int)count[1], + HDfprintf(stdout, + "%s:%d: count = %d %d %d %d %d.\n", + fcnName, mpi_rank, (int)count[0], (int)count[1], (int)count[2], (int)count[3], (int)count[4]); - HDfprintf(stdout, - "%s:%d: block = %d %d %d %d %d.\n", - fcnName, mpi_rank, (int)block[0], (int)block[1], + HDfprintf(stdout, + "%s:%d: block = %d %d %d %d %d.\n", + fcnName, mpi_rank, (int)block[0], (int)block[1], (int)block[2], (int)block[3], (int)block[4]); - HDfprintf(stdout, "%s:%d: n-cube extent dims = %d.\n", + HDfprintf(stdout, "%s:%d: n-cube extent dims = %d.\n", fcnName, mpi_rank, H5Sget_simple_extent_ndims(tgt_sid)); - HDfprintf(stdout, "%s:%d: selection rank = %d.\n", + HDfprintf(stdout, "%s:%d: selection rank = %d.\n", fcnName, mpi_rank, sel_rank); #endif if ( first_selection ) { - first_selection = FALSE; + first_selection = FALSE; ret = H5Sselect_hyperslab ( - tgt_sid, + tgt_sid, H5S_SELECT_SET, - &(start[n_cube_offset]), - &(stride[n_cube_offset]), - &(count[n_cube_offset]), + &(start[n_cube_offset]), + &(stride[n_cube_offset]), + &(count[n_cube_offset]), &(block[n_cube_offset]) ); - + VRFY((ret != FAIL), "H5Sselect_hyperslab(SET) succeeded"); } else { ret = H5Sselect_hyperslab ( - tgt_sid, + tgt_sid, H5S_SELECT_OR, - &(start[n_cube_offset]), - &(stride[n_cube_offset]), - &(count[n_cube_offset]), + &(start[n_cube_offset]), + &(stride[n_cube_offset]), + &(count[n_cube_offset]), &(block[n_cube_offset]) ); - + VRFY((ret != FAIL), "H5Sselect_hyperslab(OR) succeeded"); } @@ -2702,7 +2702,7 @@ ckrbrd_hs_dr_pio_test__slct_ckrbrd(const int mpi_rank, } while ( ( i <= 1 ) && ( 0 >= sel_offset ) ); -#if CKRBRD_HS_DR_PIO_TEST__SELECT_CHECKER_BOARD__DEBUG +#if CKRBRD_HS_DR_PIO_TEST__SELECT_CHECKER_BOARD__DEBUG HDfprintf(stdout, "%s%d: H5Sget_select_npoints(tgt_sid) = %d.\n", fcnName, mpi_rank, (int)H5Sget_select_npoints(tgt_sid)); #endif /* CKRBRD_HS_DR_PIO_TEST__SELECT_CHECKER_BOARD__DEBUG */ @@ -2722,7 +2722,7 @@ ckrbrd_hs_dr_pio_test__slct_ckrbrd(const int mpi_rank, VRFY((ret != FAIL), "H5Sselect_hyperslab(AND) succeeded"); -#if CKRBRD_HS_DR_PIO_TEST__SELECT_CHECKER_BOARD__DEBUG +#if CKRBRD_HS_DR_PIO_TEST__SELECT_CHECKER_BOARD__DEBUG HDfprintf(stdout, "%s%d: H5Sget_select_npoints(tgt_sid) = %d.\n", fcnName, mpi_rank, (int)H5Sget_select_npoints(tgt_sid)); HDfprintf(stdout, "%s%d: done.\n", fcnName, mpi_rank); @@ -2735,57 +2735,57 @@ ckrbrd_hs_dr_pio_test__slct_ckrbrd(const int mpi_rank, /**************************************************************** ** -** ckrbrd_hs_dr_pio_test__verify_data(): +** ckrbrd_hs_dr_pio_test__verify_data(): ** -** Examine the supplied buffer to see if it contains the -** expected data. Return TRUE if it does, and FALSE +** Examine the supplied buffer to see if it contains the +** expected data. Return TRUE if it does, and FALSE ** otherwise. ** -** The supplied buffer is presumed to this process's slice -** of the target data set. Each such slice will be an -** n-cube of rank (rank -1) and the supplied edge_size with -** origin (mpi_rank, 0, ... , 0) in the target data set. +** The supplied buffer is presumed to this process's slice +** of the target data set. Each such slice will be an +** n-cube of rank (rank -1) and the supplied edge_size with +** origin (mpi_rank, 0, ... , 0) in the target data set. ** -** Further, the buffer is presumed to be the result of reading -** or writing a checker board selection of an m (1 <= m < +** Further, the buffer is presumed to be the result of reading +** or writing a checker board selection of an m (1 <= m < ** rank) dimensional slice through this processes slice -** of the target data set. Also, this slice must be parallel -** to the fastest changing indicies. +** of the target data set. Also, this slice must be parallel +** to the fastest changing indicies. ** -** It is further presumed that the buffer was zeroed before -** the read/write, and that the full target data set (i.e. -** the buffer/data set for all processes) was initialized -** with the natural numbers listed in order from the origin -** along the fastest changing axis. +** It is further presumed that the buffer was zeroed before +** the read/write, and that the full target data set (i.e. +** the buffer/data set for all processes) was initialized +** with the natural numbers listed in order from the origin +** along the fastest changing axis. ** ** Thus for a 20x10x10 dataset, the value stored in location -** (x, y, z) (assuming that z is the fastest changing index -** and x the slowest) is assumed to be: +** (x, y, z) (assuming that z is the fastest changing index +** and x the slowest) is assumed to be: ** -** (10 * 10 * x) + (10 * y) + z +** (10 * 10 * x) + (10 * y) + z ** -** Further, supposing that this is process 10, this process's -** slice of the dataset would be a 10 x 10 2-cube with origin -** (10, 0, 0) in the data set, and would be initialize (prior -** to the checkerboard selection) as follows: +** Further, supposing that this is process 10, this process's +** slice of the dataset would be a 10 x 10 2-cube with origin +** (10, 0, 0) in the data set, and would be initialize (prior +** to the checkerboard selection) as follows: ** -** 1000, 1001, 1002, ... 1008, 1009 -** 1010, 1011, 1012, ... 1018, 1019 -** . . . . . -** . . . . . -** . . . . . -** 1090, 1091, 1092, ... 1098, 1099 +** 1000, 1001, 1002, ... 1008, 1009 +** 1010, 1011, 1012, ... 1018, 1019 +** . . . . . +** . . . . . +** . . . . . +** 1090, 1091, 1092, ... 1098, 1099 ** -** In the case of a read from the processors slice of another -** data set of different rank, the values expected will have -** to be adjusted accordingly. This is done via the -** first_expected_val parameter. +** In the case of a read from the processors slice of another +** data set of different rank, the values expected will have +** to be adjusted accordingly. This is done via the +** first_expected_val parameter. ** -** Finally, the function presumes that the first element -** of the buffer resides either at the origin of either -** a selected or an unselected checker. (Translation: -** if partial checkers appear in the buffer, they will -** intersect the edges of the n-cube oposite the origin.) +** Finally, the function presumes that the first element +** of the buffer resides either at the origin of either +** a selected or an unselected checker. (Translation: +** if partial checkers appear in the buffer, they will +** intersect the edges of the n-cube oposite the origin.) ** ****************************************************************/ @@ -2800,7 +2800,7 @@ ckrbrd_hs_dr_pio_test__verify_data(uint32_t * buf_ptr, hbool_t buf_starts_in_checker) { #if CKRBRD_HS_DR_PIO_TEST__VERIFY_DATA__DEBUG - const char * fcnName = "ckrbrd_hs_dr_pio_test__verify_data():"; + const char * fcnName = "ckrbrd_hs_dr_pio_test__verify_data():"; #endif hbool_t good_data = TRUE; hbool_t in_checker; @@ -2819,9 +2819,9 @@ ckrbrd_hs_dr_pio_test__verify_data(uint32_t * buf_ptr, HDassert( checker_edge_size <= edge_size ); HDassert( test_max_rank <= PAR_SS_DR_MAX_RANK ); -#if CKRBRD_HS_DR_PIO_TEST__VERIFY_DATA__DEBUG +#if CKRBRD_HS_DR_PIO_TEST__VERIFY_DATA__DEBUG - int mpi_rank; + int mpi_rank; MPI_Comm_rank(MPI_COMM_WORLD, &mpi_rank); HDfprintf(stdout, "%s mpi_rank = %d.\n", fcnName, mpi_rank); @@ -2873,7 +2873,7 @@ ckrbrd_hs_dr_pio_test__verify_data(uint32_t * buf_ptr, y = 0; start_in_checker[3] = start_in_checker[2]; do - { + { if ( y >= checker_edge_size ) { start_in_checker[3] = ! start_in_checker[3]; @@ -2882,13 +2882,13 @@ ckrbrd_hs_dr_pio_test__verify_data(uint32_t * buf_ptr, m = 0; z = 0; -#if CKRBRD_HS_DR_PIO_TEST__VERIFY_DATA__DEBUG +#if CKRBRD_HS_DR_PIO_TEST__VERIFY_DATA__DEBUG HDfprintf(stdout, "%d, %d, %d, %d, %d:", i, j, k, l, m); #endif in_checker = start_in_checker[3]; do { -#if CKRBRD_HS_DR_PIO_TEST__VERIFY_DATA__DEBUG +#if CKRBRD_HS_DR_PIO_TEST__VERIFY_DATA__DEBUG HDfprintf(stdout, " %d", (int)(*val_ptr)); #endif if ( z >= checker_edge_size ) { @@ -2896,21 +2896,21 @@ ckrbrd_hs_dr_pio_test__verify_data(uint32_t * buf_ptr, in_checker = ! in_checker; z = 0; } - + if ( in_checker ) { - + if ( *val_ptr != expected_value ) { good_data = FALSE; } - + /* zero out buffer for re-use */ *val_ptr = 0; } else if ( *val_ptr != 0 ) { good_data = FALSE; - + /* zero out buffer for re-use */ *val_ptr = 0; @@ -2920,10 +2920,10 @@ ckrbrd_hs_dr_pio_test__verify_data(uint32_t * buf_ptr, expected_value++; m++; z++; - + } while ( ( rank >= (test_max_rank - 4) ) && ( m < edge_size ) ); -#if CKRBRD_HS_DR_PIO_TEST__VERIFY_DATA__DEBUG +#if CKRBRD_HS_DR_PIO_TEST__VERIFY_DATA__DEBUG HDfprintf(stdout, "\n"); #endif l++; @@ -2949,28 +2949,28 @@ ckrbrd_hs_dr_pio_test__verify_data(uint32_t * buf_ptr, /*------------------------------------------------------------------------- - * Function: ckrbrd_hs_dr_pio_test__d2m_l2s() + * Function: ckrbrd_hs_dr_pio_test__d2m_l2s() * - * Purpose: Part one of a series of tests of I/O to/from hyperslab - * selections of different rank in the parallel. + * Purpose: Part one of a series of tests of I/O to/from hyperslab + * selections of different rank in the parallel. * - * Verify that we can read from disk correctly using checker - * board selections of different rank that + * Verify that we can read from disk correctly using checker + * board selections of different rank that * H5S_select_shape_same() views as being of the same shape. * - * In this function, we test this by reading small_rank - 1 - * checker board slices from the on disk large cube, and - * verifying that the data read is correct. Verify that - * H5S_select_shape_same() returns true on the memory and - * file selections. + * In this function, we test this by reading small_rank - 1 + * checker board slices from the on disk large cube, and + * verifying that the data read is correct. Verify that + * H5S_select_shape_same() returns true on the memory and + * file selections. * - * Return: void + * Return: void * - * Programmer: JRM -- 9/15/11 + * Programmer: JRM -- 9/15/11 * * Modifications: * - * None. + * None. * *------------------------------------------------------------------------- */ @@ -2980,17 +2980,17 @@ ckrbrd_hs_dr_pio_test__verify_data(uint32_t * buf_ptr, static void ckrbrd_hs_dr_pio_test__d2m_l2s(struct hs_dr_pio_test_vars_t * tv_ptr) { -#if CHECKER_BOARD_HS_DR_PIO_TEST__D2M_L2S__DEBUG +#if CHECKER_BOARD_HS_DR_PIO_TEST__D2M_L2S__DEBUG const char *fcnName = "ckrbrd_hs_dr_pio_test__d2m_l2s()"; uint32_t * ptr_0; #endif /* CHECKER_BOARD_HS_DR_PIO_TEST__D2M_L2S__DEBUG */ - hbool_t data_ok = FALSE; - int i, j, k, l; - uint32_t expected_value; - int mpi_rank; /* needed by VRFY */ + hbool_t data_ok = FALSE; + int i, j, k, l; + uint32_t expected_value; + int mpi_rank; /* needed by VRFY */ hsize_t sel_start[PAR_SS_DR_MAX_RANK]; htri_t check; /* Shape comparison return value */ - herr_t ret; /* Generic return value */ + herr_t ret; /* Generic return value */ /* initialize the local copy of mpi_rank */ mpi_rank = tv_ptr->mpi_rank; @@ -3000,9 +3000,9 @@ ckrbrd_hs_dr_pio_test__d2m_l2s(struct hs_dr_pio_test_vars_t * tv_ptr) * of different rank that H5S_select_shape_same() views as being of the * same shape. * - * Start by reading a (small_rank - 1)-D checker board slice from this - * processes slice of the on disk large data set, and verifying that the - * data read is correct. Verify that H5S_select_shape_same() returns + * Start by reading a (small_rank - 1)-D checker board slice from this + * processes slice of the on disk large data set, and verifying that the + * data read is correct. Verify that H5S_select_shape_same() returns * true on the memory and file selections. * * The first step is to set up the needed checker board selection in the @@ -3023,7 +3023,7 @@ ckrbrd_hs_dr_pio_test__d2m_l2s(struct hs_dr_pio_test_vars_t * tv_ptr) /* zero out the buffer we will be reading into */ HDmemset(tv_ptr->small_ds_slice_buf, 0, sizeof(uint32_t) * tv_ptr->small_ds_slice_size); -#if CHECKER_BOARD_HS_DR_PIO_TEST__D2M_L2S__DEBUG +#if CHECKER_BOARD_HS_DR_PIO_TEST__D2M_L2S__DEBUG HDfprintf(stdout, "%s:%d: initial small_ds_slice_buf = ", fcnName, tv_ptr->mpi_rank); ptr_0 = tv_ptr->small_ds_slice_buf; @@ -3032,7 +3032,7 @@ ckrbrd_hs_dr_pio_test__d2m_l2s(struct hs_dr_pio_test_vars_t * tv_ptr) ptr_0++; } HDfprintf(stdout, "\n"); -#endif /* CHECKER_BOARD_HS_DR_PIO_TEST__D2M_L2S__DEBUG */ +#endif /* CHECKER_BOARD_HS_DR_PIO_TEST__D2M_L2S__DEBUG */ /* set up start, stride, count, and block -- note that we will * change start[] so as to read slices of the large cube. @@ -3052,15 +3052,15 @@ ckrbrd_hs_dr_pio_test__d2m_l2s(struct hs_dr_pio_test_vars_t * tv_ptr) } } -#if CHECKER_BOARD_HS_DR_PIO_TEST__D2M_L2S__DEBUG - HDfprintf(stdout, +#if CHECKER_BOARD_HS_DR_PIO_TEST__D2M_L2S__DEBUG + HDfprintf(stdout, "%s:%d: reading slice from big ds on disk into small ds slice.\n", fcnName, tv_ptr->mpi_rank); -#endif /* CHECKER_BOARD_HS_DR_PIO_TEST__D2M_L2S__DEBUG */ +#endif /* CHECKER_BOARD_HS_DR_PIO_TEST__D2M_L2S__DEBUG */ /* in serial versions of this test, we loop through all the dimensions - * of the large data set. However, in the parallel version, each + * of the large data set. However, in the parallel version, each * process only works with that slice of the large cube indicated - * by its rank -- hence we set the most slowly changing index to + * by its rank -- hence we set the most slowly changing index to * mpi_rank, and don't itterate over it. */ @@ -3073,9 +3073,9 @@ ckrbrd_hs_dr_pio_test__d2m_l2s(struct hs_dr_pio_test_vars_t * tv_ptr) i = 0; } - /* since large_rank is at most PAR_SS_DR_MAX_RANK, no need to + /* since large_rank is at most PAR_SS_DR_MAX_RANK, no need to * loop over it -- either we are setting i to mpi_rank, or - * we are setting it to zero. It will not change during the + * we are setting it to zero. It will not change during the * test. */ @@ -3099,7 +3099,7 @@ ckrbrd_hs_dr_pio_test__d2m_l2s(struct hs_dr_pio_test_vars_t * tv_ptr) } do { - /* since small rank >= 2 and large_rank > small_rank, we + /* since small rank >= 2 and large_rank > small_rank, we * have large_rank >= 3. Since PAR_SS_DR_MAX_RANK == 5 * (baring major re-orgaization), this gives us: * @@ -3119,8 +3119,8 @@ ckrbrd_hs_dr_pio_test__d2m_l2s(struct hs_dr_pio_test_vars_t * tv_ptr) tv_ptr->skips = 0; /* reset the skips counter */ - /* we know that small_rank - 1 >= 1 and that - * large_rank > small_rank by the assertions at the head + /* we know that small_rank - 1 >= 1 and that + * large_rank > small_rank by the assertions at the head * of this function. Thus no need for another inner loop. */ tv_ptr->start[0] = (hsize_t)i; @@ -3155,15 +3155,15 @@ ckrbrd_hs_dr_pio_test__d2m_l2s(struct hs_dr_pio_test_vars_t * tv_ptr) /* Read selection from disk */ -#if CHECKER_BOARD_HS_DR_PIO_TEST__D2M_L2S__DEBUG +#if CHECKER_BOARD_HS_DR_PIO_TEST__D2M_L2S__DEBUG HDfprintf(stdout, "%s:%d: start = %d %d %d %d %d.\n", fcnName, - tv_ptr->mpi_rank, tv_ptr->start[0], tv_ptr->start[1], + tv_ptr->mpi_rank, tv_ptr->start[0], tv_ptr->start[1], tv_ptr->start[2], tv_ptr->start[3], tv_ptr->start[4]); HDfprintf(stdout, "%s slice/file extent dims = %d/%d.\n", fcnName, H5Sget_simple_extent_ndims(tv_ptr->small_ds_slice_sid), H5Sget_simple_extent_ndims(tv_ptr->file_large_ds_sid_0)); -#endif /* CHECKER_BOARD_HS_DR_PIO_TEST__D2M_L2S__DEBUG */ +#endif /* CHECKER_BOARD_HS_DR_PIO_TEST__D2M_L2S__DEBUG */ ret = H5Dread(tv_ptr->large_dataset, H5T_NATIVE_UINT32, @@ -3173,15 +3173,15 @@ ckrbrd_hs_dr_pio_test__d2m_l2s(struct hs_dr_pio_test_vars_t * tv_ptr) tv_ptr->small_ds_slice_buf); VRFY((ret >= 0), "H5Dread() slice from large ds succeeded."); -#if CHECKER_BOARD_HS_DR_PIO_TEST__D2M_L2S__DEBUG - HDfprintf(stdout, "%s:%d: H5Dread() returns.\n", +#if CHECKER_BOARD_HS_DR_PIO_TEST__D2M_L2S__DEBUG + HDfprintf(stdout, "%s:%d: H5Dread() returns.\n", fcnName, tv_ptr->mpi_rank); #endif /* CHECKER_BOARD_HS_DR_PIO_TEST__D2M_L2S__DEBUG */ /* verify that expected data is retrieved */ expected_value = (uint32_t) - ((i * tv_ptr->edge_size * tv_ptr->edge_size * + ((i * tv_ptr->edge_size * tv_ptr->edge_size * tv_ptr->edge_size * tv_ptr->edge_size) + (j * tv_ptr->edge_size * tv_ptr->edge_size * tv_ptr->edge_size) + (k * tv_ptr->edge_size * tv_ptr->edge_size) + @@ -3197,7 +3197,7 @@ ckrbrd_hs_dr_pio_test__d2m_l2s(struct hs_dr_pio_test_vars_t * tv_ptr) (hbool_t)TRUE ); - VRFY((data_ok == TRUE), + VRFY((data_ok == TRUE), "small slice read from large ds data good."); (tv_ptr->tests_run)++; @@ -3225,27 +3225,27 @@ ckrbrd_hs_dr_pio_test__d2m_l2s(struct hs_dr_pio_test_vars_t * tv_ptr) /*------------------------------------------------------------------------- - * Function: ckrbrd_hs_dr_pio_test__d2m_s2l() + * Function: ckrbrd_hs_dr_pio_test__d2m_s2l() * - * Purpose: Part two of a series of tests of I/O to/from hyperslab - * selections of different rank in the parallel. + * Purpose: Part two of a series of tests of I/O to/from hyperslab + * selections of different rank in the parallel. * - * Verify that we can read from disk correctly using - * selections of different rank that H5S_select_shape_same() - * views as being of the same shape. + * Verify that we can read from disk correctly using + * selections of different rank that H5S_select_shape_same() + * views as being of the same shape. * - * In this function, we test this by reading checker board - * slices of the on disk small data set into slices through - * the in memory large data set, and verify that the correct - * data (and only the correct data) is read. + * In this function, we test this by reading checker board + * slices of the on disk small data set into slices through + * the in memory large data set, and verify that the correct + * data (and only the correct data) is read. * - * Return: void + * Return: void * - * Programmer: JRM -- 8/15/11 + * Programmer: JRM -- 8/15/11 * * Modifications: * - * None. + * None. * *------------------------------------------------------------------------- */ @@ -3255,27 +3255,27 @@ ckrbrd_hs_dr_pio_test__d2m_l2s(struct hs_dr_pio_test_vars_t * tv_ptr) static void ckrbrd_hs_dr_pio_test__d2m_s2l(struct hs_dr_pio_test_vars_t * tv_ptr) { -#if CHECKER_BOARD_HS_DR_PIO_TEST__D2M_S2L__DEBUG +#if CHECKER_BOARD_HS_DR_PIO_TEST__D2M_S2L__DEBUG const char *fcnName = "ckrbrd_hs_dr_pio_test__d2m_s2l()"; #endif /* CHECKER_BOARD_HS_DR_PIO_TEST__D2M_S2L__DEBUG */ - hbool_t data_ok = FALSE; - int i, j, k, l; + hbool_t data_ok = FALSE; + int i, j, k, l; size_t u; size_t start_index; size_t stop_index; - uint32_t expected_value; + uint32_t expected_value; uint32_t * ptr_1; - int mpi_rank; /* needed by VRFY */ + int mpi_rank; /* needed by VRFY */ hsize_t sel_start[PAR_SS_DR_MAX_RANK]; htri_t check; /* Shape comparison return value */ - herr_t ret; /* Generic return value */ + herr_t ret; /* Generic return value */ /* initialize the local copy of mpi_rank */ mpi_rank = tv_ptr->mpi_rank; - /* similarly, read slices of the on disk small data set into slices - * through the in memory large data set, and verify that the correct + /* similarly, read slices of the on disk small data set into slices + * through the in memory large data set, and verify that the correct * data (and only the correct data) is read. */ @@ -3290,8 +3290,8 @@ ckrbrd_hs_dr_pio_test__d2m_s2l(struct hs_dr_pio_test_vars_t * tv_ptr) tv_ptr->small_rank - 1, sel_start); -#if CHECKER_BOARD_HS_DR_PIO_TEST__D2M_S2L__DEBUG - HDfprintf(stdout, +#if CHECKER_BOARD_HS_DR_PIO_TEST__D2M_S2L__DEBUG + HDfprintf(stdout, "%s reading slices of on disk small data set into slices of big data set.\n", fcnName); #endif /* CHECKER_BOARD_HS_DR_PIO_TEST__D2M_S2L__DEBUG */ @@ -3301,7 +3301,7 @@ ckrbrd_hs_dr_pio_test__d2m_s2l(struct hs_dr_pio_test_vars_t * tv_ptr) /* set up start, stride, count, and block -- note that we will * change start[] so as to read the slice of the small data set - * into different slices of the process slice of the large data + * into different slices of the process slice of the large data * set. */ for ( i = 0; i < PAR_SS_DR_MAX_RANK; i++ ) { @@ -3320,11 +3320,11 @@ ckrbrd_hs_dr_pio_test__d2m_s2l(struct hs_dr_pio_test_vars_t * tv_ptr) } /* in serial versions of this test, we loop through all the dimensions - * of the large data set that don't appear in the small data set. + * of the large data set that don't appear in the small data set. * - * However, in the parallel version, each process only works with that - * slice of the large (and small) data set indicated by its rank -- hence - * we set the most slowly changing index to mpi_rank, and don't itterate + * However, in the parallel version, each process only works with that + * slice of the large (and small) data set indicated by its rank -- hence + * we set the most slowly changing index to mpi_rank, and don't itterate * over it. */ @@ -3338,9 +3338,9 @@ ckrbrd_hs_dr_pio_test__d2m_s2l(struct hs_dr_pio_test_vars_t * tv_ptr) i = 0; } - /* since large_rank is at most PAR_SS_DR_MAX_RANK, no need to + /* since large_rank is at most PAR_SS_DR_MAX_RANK, no need to * loop over it -- either we are setting i to mpi_rank, or - * we are setting it to zero. It will not change during the + * we are setting it to zero. It will not change during the * test. */ @@ -3364,7 +3364,7 @@ ckrbrd_hs_dr_pio_test__d2m_s2l(struct hs_dr_pio_test_vars_t * tv_ptr) } do { - /* since small rank >= 2 and large_rank > small_rank, we + /* since small rank >= 2 and large_rank > small_rank, we * have large_rank >= 3. Since PAR_SS_DR_MAX_RANK == 5 * (baring major re-orgaization), this gives us: * @@ -3421,11 +3421,11 @@ ckrbrd_hs_dr_pio_test__d2m_s2l(struct hs_dr_pio_test_vars_t * tv_ptr) /* Read selection from disk */ -#if CHECKER_BOARD_HS_DR_PIO_TEST__D2M_S2L__DEBUG - HDfprintf(stdout, "%s:%d: start = %d %d %d %d %d.\n", - fcnName, tv_ptr->mpi_rank, - tv_ptr->start[0], tv_ptr->start[1], tv_ptr->start[2], - tv_ptr->start[3], tv_ptr->start[4]); +#if CHECKER_BOARD_HS_DR_PIO_TEST__D2M_S2L__DEBUG + HDfprintf(stdout, "%s:%d: start = %d %d %d %d %d.\n", + fcnName, tv_ptr->mpi_rank, + tv_ptr->start[0], tv_ptr->start[1], tv_ptr->start[2], + tv_ptr->start[3], tv_ptr->start[4]); HDfprintf(stdout, "%s:%d: mem/file extent dims = %d/%d.\n", fcnName, tv_ptr->mpi_rank, H5Sget_simple_extent_ndims(tv_ptr->large_ds_slice_sid), @@ -3444,21 +3444,21 @@ ckrbrd_hs_dr_pio_test__d2m_s2l(struct hs_dr_pio_test_vars_t * tv_ptr) */ data_ok = TRUE; ptr_1 = tv_ptr->large_ds_buf_1; - expected_value = + expected_value = (uint32_t)((size_t)(tv_ptr->mpi_rank) * tv_ptr->small_ds_slice_size); start_index = (size_t)( - (i * tv_ptr->edge_size * tv_ptr->edge_size * + (i * tv_ptr->edge_size * tv_ptr->edge_size * tv_ptr->edge_size * tv_ptr->edge_size) + (j * tv_ptr->edge_size * tv_ptr->edge_size * tv_ptr->edge_size) + (k * tv_ptr->edge_size * tv_ptr->edge_size) + (l * tv_ptr->edge_size)); stop_index = start_index + tv_ptr->small_ds_slice_size - 1; -#if CHECKER_BOARD_HS_DR_PIO_TEST__D2M_S2L__DEBUG +#if CHECKER_BOARD_HS_DR_PIO_TEST__D2M_S2L__DEBUG { int m, n; - HDfprintf(stdout, "%s:%d: expected_value = %d.\n", + HDfprintf(stdout, "%s:%d: expected_value = %d.\n", fcnName, tv_ptr->mpi_rank, expected_value); HDfprintf(stdout, "%s:%d: start/stop index = %d/%d.\n", fcnName, tv_ptr->mpi_rank, start_index, stop_index); @@ -3493,7 +3493,7 @@ ckrbrd_hs_dr_pio_test__d2m_s2l(struct hs_dr_pio_test_vars_t * tv_ptr) ptr_1++; } - VRFY((data_ok == TRUE), + VRFY((data_ok == TRUE), "slice read from small to large ds data good(1)."); data_ok = ckrbrd_hs_dr_pio_test__verify_data @@ -3506,7 +3506,7 @@ ckrbrd_hs_dr_pio_test__d2m_s2l(struct hs_dr_pio_test_vars_t * tv_ptr) (hbool_t)TRUE ); - VRFY((data_ok == TRUE), + VRFY((data_ok == TRUE), "slice read from small to large ds data good(2)."); @@ -3525,7 +3525,7 @@ ckrbrd_hs_dr_pio_test__d2m_s2l(struct hs_dr_pio_test_vars_t * tv_ptr) ptr_1++; } - VRFY((data_ok == TRUE), + VRFY((data_ok == TRUE), "slice read from small to large ds data good(3)."); (tv_ptr->tests_run)++; @@ -3553,31 +3553,31 @@ ckrbrd_hs_dr_pio_test__d2m_s2l(struct hs_dr_pio_test_vars_t * tv_ptr) /*------------------------------------------------------------------------- - * Function: ckrbrd_hs_dr_pio_test__m2d_l2s() + * Function: ckrbrd_hs_dr_pio_test__m2d_l2s() * - * Purpose: Part three of a series of tests of I/O to/from checker - * board hyperslab selections of different rank in the - * parallel. + * Purpose: Part three of a series of tests of I/O to/from checker + * board hyperslab selections of different rank in the + * parallel. * - * Verify that we can write from memory to file using checker - * board selections of different rank that - * H5S_select_shape_same() views as being of the same shape. + * Verify that we can write from memory to file using checker + * board selections of different rank that + * H5S_select_shape_same() views as being of the same shape. * - * Do this by writing small_rank - 1 dimensional checker - * board slices from the in memory large data set to the on - * disk small cube dataset. After each write, read the - * slice of the small dataset back from disk, and verify - * that it contains the expected data. Verify that - * H5S_select_shape_same() returns true on the memory and - * file selections. + * Do this by writing small_rank - 1 dimensional checker + * board slices from the in memory large data set to the on + * disk small cube dataset. After each write, read the + * slice of the small dataset back from disk, and verify + * that it contains the expected data. Verify that + * H5S_select_shape_same() returns true on the memory and + * file selections. * - * Return: void + * Return: void * - * Programmer: JRM -- 8/15/11 + * Programmer: JRM -- 8/15/11 * * Modifications: * - * None. + * None. * *------------------------------------------------------------------------- */ @@ -3587,21 +3587,21 @@ ckrbrd_hs_dr_pio_test__d2m_s2l(struct hs_dr_pio_test_vars_t * tv_ptr) static void ckrbrd_hs_dr_pio_test__m2d_l2s(struct hs_dr_pio_test_vars_t * tv_ptr) { -#if CHECKER_BOARD_HS_DR_PIO_TEST__M2D_L2S__DEBUG +#if CHECKER_BOARD_HS_DR_PIO_TEST__M2D_L2S__DEBUG const char *fcnName = "ckrbrd_hs_dr_pio_test__m2d_l2s()"; #endif /* CHECKER_BOARD_HS_DR_PIO_TEST__M2D_L2S__DEBUG */ - hbool_t data_ok = FALSE; - hbool_t mis_match = FALSE; - int i, j, k, l; + hbool_t data_ok = FALSE; + hbool_t mis_match = FALSE; + int i, j, k, l; size_t u; size_t start_index; size_t stop_index; - uint32_t expected_value; + uint32_t expected_value; uint32_t * ptr_1; - int mpi_rank; /* needed by VRFY */ + int mpi_rank; /* needed by VRFY */ hsize_t sel_start[PAR_SS_DR_MAX_RANK]; htri_t check; /* Shape comparison return value */ - herr_t ret; /* Generic return value */ + herr_t ret; /* Generic return value */ /* initialize the local copy of mpi_rank */ mpi_rank = tv_ptr->mpi_rank; @@ -3612,9 +3612,9 @@ ckrbrd_hs_dr_pio_test__m2d_l2s(struct hs_dr_pio_test_vars_t * tv_ptr) * H5S_select_shape_same() views as being of the same shape. * * Start by writing small_rank - 1 D slices from the in memory large data - * set to the on disk small dataset. After each write, read the slice of - * the small dataset back from disk, and verify that it contains the - * expected data. Verify that H5S_select_shape_same() returns true on + * set to the on disk small dataset. After each write, read the slice of + * the small dataset back from disk, and verify that it contains the + * expected data. Verify that H5S_select_shape_same() returns true on * the memory and file selections. */ @@ -3682,18 +3682,18 @@ ckrbrd_hs_dr_pio_test__m2d_l2s(struct hs_dr_pio_test_vars_t * tv_ptr) HDmemset(tv_ptr->small_ds_buf_1, 0, sizeof(uint32_t) * tv_ptr->small_ds_size); -#if CHECKER_BOARD_HS_DR_PIO_TEST__M2D_L2S__DEBUG - HDfprintf(stdout, +#if CHECKER_BOARD_HS_DR_PIO_TEST__M2D_L2S__DEBUG + HDfprintf(stdout, "%s writing checker boards selections of slices from big ds to slices of small ds on disk.\n", fcnName); #endif /* CHECKER_BOARD_HS_DR_PIO_TEST__M2D_L2S__DEBUG */ /* in serial versions of this test, we loop through all the dimensions - * of the large data set that don't appear in the small data set. + * of the large data set that don't appear in the small data set. * - * However, in the parallel version, each process only works with that - * slice of the large (and small) data set indicated by its rank -- hence - * we set the most slowly changing index to mpi_rank, and don't itterate + * However, in the parallel version, each process only works with that + * slice of the large (and small) data set indicated by its rank -- hence + * we set the most slowly changing index to mpi_rank, and don't itterate * over it. */ @@ -3707,9 +3707,9 @@ ckrbrd_hs_dr_pio_test__m2d_l2s(struct hs_dr_pio_test_vars_t * tv_ptr) i = 0; } - /* since large_rank is at most PAR_SS_DR_MAX_RANK, no need to + /* since large_rank is at most PAR_SS_DR_MAX_RANK, no need to * loop over it -- either we are setting i to mpi_rank, or - * we are setting it to zero. It will not change during the + * we are setting it to zero. It will not change during the * test. */ @@ -3734,7 +3734,7 @@ ckrbrd_hs_dr_pio_test__m2d_l2s(struct hs_dr_pio_test_vars_t * tv_ptr) } do { - /* since small rank >= 2 and large_rank > small_rank, we + /* since small rank >= 2 and large_rank > small_rank, we * have large_rank >= 3. Since PAR_SS_DR_MAX_RANK == 5 * (baring major re-orgaization), this gives us: * @@ -3758,7 +3758,7 @@ ckrbrd_hs_dr_pio_test__m2d_l2s(struct hs_dr_pio_test_vars_t * tv_ptr) * by the assertions at the head of this function. Thus no * need for another inner loop. */ - + /* zero out this rank's slice of the on disk small data set */ ret = H5Dwrite(tv_ptr->small_dataset, H5T_NATIVE_UINT32, @@ -3767,7 +3767,7 @@ ckrbrd_hs_dr_pio_test__m2d_l2s(struct hs_dr_pio_test_vars_t * tv_ptr) tv_ptr->xfer_plist, tv_ptr->small_ds_buf_2); VRFY((ret >= 0), "H5Dwrite() zero slice to small ds succeeded."); - + /* select the portion of the in memory large cube from which we * are going to write data. */ @@ -3776,13 +3776,13 @@ ckrbrd_hs_dr_pio_test__m2d_l2s(struct hs_dr_pio_test_vars_t * tv_ptr) tv_ptr->start[2] = (hsize_t)k; tv_ptr->start[3] = (hsize_t)l; tv_ptr->start[4] = 0; - + HDassert((tv_ptr->start[0] == 0)||(0 < tv_ptr->small_ds_offset + 1)); HDassert((tv_ptr->start[1] == 0)||(1 < tv_ptr->small_ds_offset + 1)); HDassert((tv_ptr->start[2] == 0)||(2 < tv_ptr->small_ds_offset + 1)); HDassert((tv_ptr->start[3] == 0)||(3 < tv_ptr->small_ds_offset + 1)); HDassert((tv_ptr->start[4] == 0)||(4 < tv_ptr->small_ds_offset + 1)); - + ckrbrd_hs_dr_pio_test__slct_ckrbrd ( tv_ptr->mpi_rank, @@ -3793,26 +3793,26 @@ ckrbrd_hs_dr_pio_test__m2d_l2s(struct hs_dr_pio_test_vars_t * tv_ptr) tv_ptr->small_rank - 1, tv_ptr->start ); - - + + /* verify that H5S_select_shape_same() reports the in - * memory checkerboard selection of the slice through the + * memory checkerboard selection of the slice through the * large dataset and the checkerboard selection of the process * slice of the small data set as having the same shape. */ check = H5S_select_shape_same_test(tv_ptr->file_small_ds_sid_1, tv_ptr->mem_large_ds_sid); VRFY((check == TRUE), "H5S_select_shape_same_test passed."); - - - /* write the checker board selection of the slice from the in - * memory large data set to the slice of the on disk small - * dataset. + + + /* write the checker board selection of the slice from the in + * memory large data set to the slice of the on disk small + * dataset. */ -#if CHECKER_BOARD_HS_DR_PIO_TEST__M2D_L2S__DEBUG - HDfprintf(stdout, "%s:%d: start = %d %d %d %d %d.\n", +#if CHECKER_BOARD_HS_DR_PIO_TEST__M2D_L2S__DEBUG + HDfprintf(stdout, "%s:%d: start = %d %d %d %d %d.\n", fcnName, tv_ptr->mpi_rank, - tv_ptr->start[0], tv_ptr->start[1], tv_ptr->start[2], + tv_ptr->start[0], tv_ptr->start[1], tv_ptr->start[2], tv_ptr->start[3], tv_ptr->start[4]); HDfprintf(stdout, "%s:%d: mem/file extent dims = %d/%d.\n", fcnName, tv_ptr->mpi_rank, @@ -3826,8 +3826,8 @@ ckrbrd_hs_dr_pio_test__m2d_l2s(struct hs_dr_pio_test_vars_t * tv_ptr) tv_ptr->xfer_plist, tv_ptr->large_ds_buf_0); VRFY((ret >= 0), "H5Dwrite() slice to large ds succeeded."); - - + + /* read the on disk process slice of the small dataset into memory */ ret = H5Dread(tv_ptr->small_dataset, H5T_NATIVE_UINT32, @@ -3836,30 +3836,30 @@ ckrbrd_hs_dr_pio_test__m2d_l2s(struct hs_dr_pio_test_vars_t * tv_ptr) tv_ptr->xfer_plist, tv_ptr->small_ds_buf_1); VRFY((ret >= 0), "H5Dread() slice from small ds succeeded."); - - + + /* verify that expected data is retrieved */ - + mis_match = FALSE; - + expected_value = (uint32_t)( - (i * tv_ptr->edge_size * tv_ptr->edge_size * + (i * tv_ptr->edge_size * tv_ptr->edge_size * tv_ptr->edge_size * tv_ptr->edge_size) + (j * tv_ptr->edge_size * tv_ptr->edge_size * tv_ptr->edge_size) + (k * tv_ptr->edge_size * tv_ptr->edge_size) + (l * tv_ptr->edge_size)); - + start_index = (size_t)(tv_ptr->mpi_rank) * tv_ptr->small_ds_slice_size; stop_index = start_index + tv_ptr->small_ds_slice_size - 1; - + HDassert( start_index < stop_index ); HDassert( stop_index <= tv_ptr->small_ds_size ); - + data_ok = TRUE; - + ptr_1 = tv_ptr->small_ds_buf_1; for ( u = 0; u < start_index; u++, ptr_1++ ) { - + if ( *ptr_1 != 0 ) { data_ok = FALSE; @@ -3888,7 +3888,7 @@ ckrbrd_hs_dr_pio_test__m2d_l2s(struct hs_dr_pio_test_vars_t * tv_ptr) } } - VRFY((data_ok == TRUE), + VRFY((data_ok == TRUE), "large slice write slice to small slice data good."); (tv_ptr->tests_run)++; @@ -3916,31 +3916,31 @@ ckrbrd_hs_dr_pio_test__m2d_l2s(struct hs_dr_pio_test_vars_t * tv_ptr) /*------------------------------------------------------------------------- - * Function: ckrbrd_hs_dr_pio_test__m2d_s2l() + * Function: ckrbrd_hs_dr_pio_test__m2d_s2l() * - * Purpose: Part four of a series of tests of I/O to/from checker - * board hyperslab selections of different rank in the parallel. + * Purpose: Part four of a series of tests of I/O to/from checker + * board hyperslab selections of different rank in the parallel. * - * Verify that we can write from memory to file using - * selections of different rank that H5S_select_shape_same() - * views as being of the same shape. + * Verify that we can write from memory to file using + * selections of different rank that H5S_select_shape_same() + * views as being of the same shape. * - * Do this by writing checker board selections of the contents - * of the process's slice of the in memory small data set to - * slices of the on disk large data set. After each write, - * read the process's slice of the large data set back into - * memory, and verify that it contains the expected data. + * Do this by writing checker board selections of the contents + * of the process's slice of the in memory small data set to + * slices of the on disk large data set. After each write, + * read the process's slice of the large data set back into + * memory, and verify that it contains the expected data. * - * Verify that H5S_select_shape_same() returns true on the - * memory and file selections. + * Verify that H5S_select_shape_same() returns true on the + * memory and file selections. * - * Return: void + * Return: void * - * Programmer: JRM -- 8/15/11 + * Programmer: JRM -- 8/15/11 * * Modifications: * - * None + * None * *------------------------------------------------------------------------- */ @@ -3950,31 +3950,31 @@ ckrbrd_hs_dr_pio_test__m2d_l2s(struct hs_dr_pio_test_vars_t * tv_ptr) static void ckrbrd_hs_dr_pio_test__m2d_s2l(struct hs_dr_pio_test_vars_t * tv_ptr) { -#if CHECKER_BOARD_HS_DR_PIO_TEST__M2D_S2L__DEBUG +#if CHECKER_BOARD_HS_DR_PIO_TEST__M2D_S2L__DEBUG const char *fcnName = "ckrbrd_hs_dr_pio_test__m2d_s2l()"; #endif /* CONTIG_HS_DR_PIO_TEST__M2D_S2L__DEBUG */ - hbool_t data_ok = FALSE; - hbool_t mis_match = FALSE; - int i, j, k, l; + hbool_t data_ok = FALSE; + hbool_t mis_match = FALSE; + int i, j, k, l; size_t u; size_t start_index; size_t stop_index; - uint32_t expected_value; + uint32_t expected_value; uint32_t * ptr_1; - int mpi_rank; /* needed by VRFY */ + int mpi_rank; /* needed by VRFY */ hsize_t sel_start[PAR_SS_DR_MAX_RANK]; htri_t check; /* Shape comparison return value */ - herr_t ret; /* Generic return value */ + herr_t ret; /* Generic return value */ /* initialize the local copy of mpi_rank */ mpi_rank = tv_ptr->mpi_rank; - /* Now write the contents of the process's slice of the in memory - * small data set to slices of the on disk large data set. After + /* Now write the contents of the process's slice of the in memory + * small data set to slices of the on disk large data set. After * each write, read the process's slice of the large data set back - * into memory, and verify that it contains the expected data. - * Verify that H5S_select_shape_same() returns true on the memory + * into memory, and verify that it contains the expected data. + * Verify that H5S_select_shape_same() returns true on the memory * and file selections. */ @@ -4007,7 +4007,7 @@ ckrbrd_hs_dr_pio_test__m2d_s2l(struct hs_dr_pio_test_vars_t * tv_ptr) tv_ptr->block); VRFY((ret >= 0), "H5Sselect_hyperslab(tv_ptr->mem_large_ds_sid, set) suceeded"); - /* setup a checkerboard selection of the slice of the in memory small + /* setup a checkerboard selection of the slice of the in memory small * data set associated with the process's mpi rank. */ @@ -4023,7 +4023,7 @@ ckrbrd_hs_dr_pio_test__m2d_s2l(struct hs_dr_pio_test_vars_t * tv_ptr) sel_start); /* set up start, stride, count, and block -- note that we will - * change start[] so as to write checkerboard selections of slices + * change start[] so as to write checkerboard selections of slices * of the small data set to slices of the large data set. */ for ( i = 0; i < PAR_SS_DR_MAX_RANK; i++ ) { @@ -4045,7 +4045,7 @@ ckrbrd_hs_dr_pio_test__m2d_s2l(struct hs_dr_pio_test_vars_t * tv_ptr) HDmemset(tv_ptr->large_ds_buf_1, 0, sizeof(uint32_t) * tv_ptr->large_ds_size); #if CHECKER_BOARD_HS_DR_PIO_TEST__M2D_S2L__DEBUG - HDfprintf(stdout, + HDfprintf(stdout, "%s writing process checkerboard selections of slices of small ds to process slices of large ds on disk.\n", fcnName); #endif /* CHECKER_BOARD_HS_DR_PIO_TEST__M2D_S2L__DEBUG */ @@ -4059,9 +4059,9 @@ ckrbrd_hs_dr_pio_test__m2d_s2l(struct hs_dr_pio_test_vars_t * tv_ptr) i = 0; } - /* since large_rank is at most PAR_SS_DR_MAX_RANK, no need to + /* since large_rank is at most PAR_SS_DR_MAX_RANK, no need to * loop over it -- either we are setting i to mpi_rank, or - * we are setting it to zero. It will not change during the + * we are setting it to zero. It will not change during the * test. */ @@ -4085,7 +4085,7 @@ ckrbrd_hs_dr_pio_test__m2d_s2l(struct hs_dr_pio_test_vars_t * tv_ptr) } do { - /* since small rank >= 2 and large_rank > small_rank, we + /* since small rank >= 2 and large_rank > small_rank, we * have large_rank >= 3. Since PAR_SS_DR_MAX_RANK == 5 * (baring major re-orgaization), this gives us: * @@ -4160,13 +4160,13 @@ ckrbrd_hs_dr_pio_test__m2d_s2l(struct hs_dr_pio_test_vars_t * tv_ptr) VRFY((check == TRUE), "H5S_select_shape_same_test passed"); - /* write the small data set slice from memory to the - * target slice of the disk data set + /* write the small data set slice from memory to the + * target slice of the disk data set */ -#if CHECKER_BOARD_HS_DR_PIO_TEST__M2D_S2L__DEBUG - HDfprintf(stdout, "%s:%d: start = %d %d %d %d %d.\n", +#if CHECKER_BOARD_HS_DR_PIO_TEST__M2D_S2L__DEBUG + HDfprintf(stdout, "%s:%d: start = %d %d %d %d %d.\n", fcnName, tv_ptr->mpi_rank, - tv_ptr->start[0], tv_ptr->start[1], tv_ptr->start[2], + tv_ptr->start[0], tv_ptr->start[1], tv_ptr->start[2], tv_ptr->start[3], tv_ptr->start[4]); HDfprintf(stdout, "%s:%d: mem/file extent dims = %d/%d.\n", fcnName, tv_ptr->mpi_rank, @@ -4179,11 +4179,11 @@ ckrbrd_hs_dr_pio_test__m2d_s2l(struct hs_dr_pio_test_vars_t * tv_ptr) tv_ptr->file_large_ds_sid_1, tv_ptr->xfer_plist, tv_ptr->small_ds_buf_0); - VRFY((ret != FAIL), + VRFY((ret != FAIL), "H5Dwrite of small ds slice to large ds succeeded"); - /* read this processes slice on the on disk large + /* read this processes slice on the on disk large * data set into memory. */ @@ -4193,18 +4193,18 @@ ckrbrd_hs_dr_pio_test__m2d_s2l(struct hs_dr_pio_test_vars_t * tv_ptr) tv_ptr->file_large_ds_sid_0, tv_ptr->xfer_plist, tv_ptr->large_ds_buf_1); - VRFY((ret != FAIL), + VRFY((ret != FAIL), "H5Dread() of process slice of large ds succeeded"); /* verify that the expected data and only the * expected data was read. */ - expected_value = + expected_value = (uint32_t)((size_t)(tv_ptr->mpi_rank) * tv_ptr->small_ds_slice_size); start_index = (size_t) - ((i * tv_ptr->edge_size * tv_ptr->edge_size * + ((i * tv_ptr->edge_size * tv_ptr->edge_size * tv_ptr->edge_size * tv_ptr->edge_size) + (j * tv_ptr->edge_size * tv_ptr->edge_size * tv_ptr->edge_size) + (k * tv_ptr->edge_size * tv_ptr->edge_size) + @@ -4250,7 +4250,7 @@ ckrbrd_hs_dr_pio_test__m2d_s2l(struct hs_dr_pio_test_vars_t * tv_ptr) } } - VRFY((data_ok == TRUE), + VRFY((data_ok == TRUE), "small ds cb slice write to large ds slice data good."); (tv_ptr->tests_run)++; @@ -4278,22 +4278,22 @@ ckrbrd_hs_dr_pio_test__m2d_s2l(struct hs_dr_pio_test_vars_t * tv_ptr) /*------------------------------------------------------------------------- - * Function: ckrbrd_hs_dr_pio_test__run_test() + * Function: ckrbrd_hs_dr_pio_test__run_test() * - * Purpose: Test I/O to/from checkerboard selections of hyperslabs of - * different rank in the parallel. + * Purpose: Test I/O to/from checkerboard selections of hyperslabs of + * different rank in the parallel. * - * Return: void + * Return: void * - * Programmer: JRM -- 10/10/09 + * 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. + * 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. * *------------------------------------------------------------------------- */ @@ -4320,10 +4320,10 @@ ckrbrd_hs_dr_pio_test__run_test(const int test_num, #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 */ - int mpi_rank; /* needed by VRFY */ - struct hs_dr_pio_test_vars_t test_vars = + int mpi_rank; /* needed by VRFY */ + struct hs_dr_pio_test_vars_t test_vars = { - /* int mpi_size = */ -1, + /* int mpi_size = */ -1, /* int mpi_rank = */ -1, /* MPI_Comm mpi_comm = */ MPI_COMM_NULL, /* MPI_Inf mpi_info = */ MPI_INFO_NULL, @@ -4339,7 +4339,7 @@ ckrbrd_hs_dr_pio_test__run_test(const int test_num, /* uint32_t * small_ds_buf_2 = */ NULL, /* uint32_t * small_ds_slice_buf = */ NULL, /* uint32_t * large_ds_buf_0 = */ NULL, - /* uint32_t * large_ds_buf_1 = */ NULL, + /* uint32_t * large_ds_buf_1 = */ NULL, /* uint32_t * large_ds_buf_2 = */ NULL, /* uint32_t * large_ds_slice_buf = */ NULL, /* int small_ds_offset = */ -1, @@ -4376,17 +4376,17 @@ ckrbrd_hs_dr_pio_test__run_test(const int test_num, /* hsize_t * stride_ptr = */ NULL, /* hsize_t * count_ptr = */ NULL, /* hsize_t * block_ptr = */ NULL, - /* int skips = */ 0, - /* int max_skips = */ 0, + /* int skips = */ 0, + /* int max_skips = */ 0, /* int64_t total_tests = */ 0, /* int64_t tests_run = */ 0, /* int64_t tests_skipped = */ 0 }; struct hs_dr_pio_test_vars_t * tv_ptr = &test_vars; - hs_dr_pio_test__setup(test_num, edge_size, checker_edge_size, - chunk_edge_size, small_rank, large_rank, - use_collective_io, dset_type, express_test, + hs_dr_pio_test__setup(test_num, edge_size, checker_edge_size, + chunk_edge_size, small_rank, large_rank, + use_collective_io, dset_type, express_test, tv_ptr); @@ -4412,9 +4412,9 @@ ckrbrd_hs_dr_pio_test__run_test(const int test_num, * of different rank that H5S_select_shape_same() views as being of the * same shape. * - * Start by reading a (small_rank - 1)-D slice from this processes slice - * of the on disk large data set, and verifying that the data read is - * correct. Verify that H5S_select_shape_same() returns true on the + * Start by reading a (small_rank - 1)-D slice from this processes slice + * of the on disk large data set, and verifying that the data read is + * correct. Verify that H5S_select_shape_same() returns true on the * memory and file selections. * * The first step is to set up the needed checker board selection in the @@ -4424,8 +4424,8 @@ ckrbrd_hs_dr_pio_test__run_test(const int test_num, ckrbrd_hs_dr_pio_test__d2m_l2s(tv_ptr); - /* similarly, read slices of the on disk small data set into slices - * through the in memory large data set, and verify that the correct + /* similarly, read slices of the on disk small data set into slices + * through the in memory large data set, and verify that the correct * data (and only the correct data) is read. */ @@ -4437,20 +4437,20 @@ ckrbrd_hs_dr_pio_test__run_test(const int test_num, * H5S_select_shape_same() views as being of the same shape. * * Start by writing small_rank - 1 D slices from the in memory large data - * set to the on disk small dataset. After each write, read the slice of - * the small dataset back from disk, and verify that it contains the - * expected data. Verify that H5S_select_shape_same() returns true on + * set to the on disk small dataset. After each write, read the slice of + * the small dataset back from disk, and verify that it contains the + * expected data. Verify that H5S_select_shape_same() returns true on * the memory and file selections. */ ckrbrd_hs_dr_pio_test__m2d_l2s(tv_ptr); - /* Now write the contents of the process's slice of the in memory - * small data set to slices of the on disk large data set. After + /* Now write the contents of the process's slice of the in memory + * small data set to slices of the on disk large data set. After * each write, read the process's slice of the large data set back - * into memory, and verify that it contains the expected data. - * Verify that H5S_select_shape_same() returns true on the memory + * into memory, and verify that it contains the expected data. + * Verify that H5S_select_shape_same() returns true on the memory * and file selections. */ @@ -4459,8 +4459,8 @@ ckrbrd_hs_dr_pio_test__run_test(const int test_num, #if CKRBRD_HS_DR_PIO_TEST__RUN_TEST__DEBUG if ( MAINPROCESS ) { - HDfprintf(stdout, - "test %d: Subtests complete -- tests run/skipped/total = %lld/%lld/%lld.\n", + HDfprintf(stdout, + "test %d: Subtests complete -- tests run/skipped/total = %lld/%lld/%lld.\n", test_num, (long long)(tv_ptr->tests_run), (long long)(tv_ptr->tests_skipped), (long long)(tv_ptr->total_tests)); } @@ -4485,28 +4485,28 @@ ckrbrd_hs_dr_pio_test__run_test(const int test_num, /*------------------------------------------------------------------------- - * Function: ckrbrd_hs_dr_pio_test() + * Function: ckrbrd_hs_dr_pio_test() * - * Purpose: Test I/O to/from hyperslab selections of different rank in - * the parallel case. + * Purpose: Test I/O to/from hyperslab selections of different rank in + * the parallel case. * - * Return: void + * Return: void * - * Programmer: JRM -- 9/18/09 + * 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. + * 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 + * 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 * *------------------------------------------------------------------------- */ @@ -4516,16 +4516,16 @@ ckrbrd_hs_dr_pio_test(ShapeSameTestMethods sstest_type) { int express_test; int local_express_test; - int mpi_size = -1; + int mpi_size = -1; int mpi_rank = -1; - int test_num = 0; - int edge_size; + int test_num = 0; + int edge_size; int checker_edge_size = 3; - int chunk_edge_size = 0; - int small_rank = 3; - int large_rank = 4; - int mpi_result; - hid_t dset_type = H5T_NATIVE_UINT; + int chunk_edge_size = 0; + int small_rank = 3; + int large_rank = 4; + int mpi_result; + hid_t dset_type = H5T_NATIVE_UINT; int skips = 0; int max_skips = 0; /* The following table list the number of sub-tests skipped between @@ -4564,13 +4564,13 @@ ckrbrd_hs_dr_pio_test(ShapeSameTestMethods sstest_type) max_skips = max_skips_tbl[local_express_test]; } -#if 0 +#if 0 { int DebugWait = 1; - + while (DebugWait) ; } -#endif +#endif for ( large_rank = 3; large_rank <= PAR_SS_DR_MAX_RANK; large_rank++ ) { @@ -4700,15 +4700,15 @@ int dim0; int dim1; int chunkdim0; int chunkdim1; -int nerrors = 0; /* errors count */ -int ndatasets = 300; /* number of datasets to create*/ +int nerrors = 0; /* errors count */ +int ndatasets = 300; /* number of datasets to create*/ int ngroups = 512; /* number of groups to create in root * group. */ -int facc_type = FACC_MPIO; /*Test file access type */ +int facc_type = FACC_MPIO; /*Test file access type */ int dxfer_coll_type = DXFER_COLLECTIVE_IO; -H5E_auto2_t old_func; /* previous error handler */ -void *old_client_data; /* previous error handler arg.*/ +H5E_auto2_t old_func; /* previous error handler */ +void *old_client_data; /* previous error handler arg.*/ /* other option flags */ @@ -4720,10 +4720,10 @@ void *old_client_data; /* previous error handler arg.*/ #define NFILENAME 2 #define PARATESTFILE filenames[0] const char *FILENAME[NFILENAME]={ - "ShapeSameTest", - NULL}; -char filenames[NFILENAME][PATH_MAX]; -hid_t fapl; /* file access property list */ + "ShapeSameTest", + NULL}; +char filenames[NFILENAME][PATH_MAX]; +hid_t fapl; /* file access property list */ #ifdef USE_PAUSE /* pause the process for a moment to allow debugger to attach if desired. */ @@ -4736,7 +4736,7 @@ void pause_proc(void) { int pid; - h5_stat_t statbuf; + h5_stat_t statbuf; char greenlight[] = "go"; int maxloop = 10; int loops = 0; @@ -4753,15 +4753,15 @@ void pause_proc(void) MPI_Get_processor_name(mpi_name, &mpi_namelen); if (MAINPROCESS) - while ((HDstat(greenlight, &statbuf) == -1) && loops < maxloop){ - if (!loops++){ - printf("Proc %d (%*s, %d): to debug, attach %d\n", - mpi_rank, mpi_namelen, mpi_name, pid, pid); - } - printf("waiting(%ds) for file %s ...\n", time_int, greenlight); - fflush(stdout); + while ((HDstat(greenlight, &statbuf) == -1) && loops < maxloop){ + if (!loops++){ + printf("Proc %d (%*s, %d): to debug, attach %d\n", + mpi_rank, mpi_namelen, mpi_name, pid, pid); + } + printf("waiting(%ds) for file %s ...\n", time_int, greenlight); + fflush(stdout); HDsleep(time_int); - } + } MPI_Barrier(MPI_COMM_WORLD); } @@ -4773,7 +4773,7 @@ int MPI_Init(int *argc, char ***argv) pause_proc(); return (ret_code); } -#endif /* USE_PAUSE */ +#endif /* USE_PAUSE */ /* @@ -4783,15 +4783,15 @@ static void usage(void) { printf(" [-r] [-w] [-m] [-n] " - "[-o] [-f ] [-d ]\n"); + "[-o] [-f ] [-d ]\n"); printf("\t-m" - "\tset number of datasets for the multiple dataset test\n"); + "\tset number of datasets for the multiple dataset test\n"); printf("\t-n" "\tset number of groups for the multiple group test\n"); printf("\t-f \tfilename prefix\n"); printf("\t-2\t\tuse Split-file together with MPIO\n"); printf("\t-d \tdataset dimensions factors. Defaults (%d,%d)\n", - ROW_FACTOR, COL_FACTOR); + ROW_FACTOR, COL_FACTOR); printf("\t-c \tdataset chunk dimensions. Defaults (dim0/10,dim1/10)\n"); printf("\n"); } @@ -4803,7 +4803,7 @@ usage(void) static int parse_options(int argc, char **argv) { - int mpi_size, mpi_rank; /* mpi variables */ + int mpi_size, mpi_rank; /* mpi variables */ MPI_Comm_size(MPI_COMM_WORLD, &mpi_size); MPI_Comm_rank(MPI_COMM_WORLD, &mpi_rank); @@ -4814,107 +4814,107 @@ parse_options(int argc, char **argv) chunkdim1 = (dim1+9)/10; while (--argc){ - if (**(++argv) != '-'){ - break; - }else{ - switch(*(*argv+1)){ - case 'm': ndatasets = atoi((*argv+1)+1); - if (ndatasets < 0){ - nerrors++; - return(1); - } - break; - case 'n': ngroups = atoi((*argv+1)+1); - if (ngroups < 0){ + if (**(++argv) != '-'){ + break; + }else{ + switch(*(*argv+1)){ + case 'm': ndatasets = atoi((*argv+1)+1); + if (ndatasets < 0){ + nerrors++; + return(1); + } + break; + case 'n': ngroups = atoi((*argv+1)+1); + if (ngroups < 0){ nerrors++; return(1); - } + } break; - case 'f': if (--argc < 1) { - nerrors++; - return(1); - } - if (**(++argv) == '-') { - nerrors++; - return(1); - } - paraprefix = *argv; - break; - case 'i': /* Collective MPI-IO access with independent IO */ - dxfer_coll_type = DXFER_INDEPENDENT_IO; - break; - case '2': /* Use the split-file driver with MPIO access */ - /* Can use $HDF5_METAPREFIX to define the */ - /* meta-file-prefix. */ - facc_type = FACC_MPIO | FACC_SPLIT; - break; - case 'd': /* dimensizes */ - if (--argc < 2){ - nerrors++; - return(1); - } - dim0 = atoi(*(++argv))*mpi_size; - argc--; - dim1 = atoi(*(++argv))*mpi_size; - /* set default chunkdim sizes too */ - chunkdim0 = (dim0+9)/10; - chunkdim1 = (dim1+9)/10; - break; - case 'c': /* chunk dimensions */ - if (--argc < 2){ - nerrors++; - return(1); - } - chunkdim0 = atoi(*(++argv)); - argc--; - chunkdim1 = atoi(*(++argv)); - break; - case 'h': /* print help message--return with nerrors set */ - return(1); - default: printf("Illegal option(%s)\n", *argv); - nerrors++; - return(1); - } - } + case 'f': if (--argc < 1) { + nerrors++; + return(1); + } + if (**(++argv) == '-') { + nerrors++; + return(1); + } + paraprefix = *argv; + break; + case 'i': /* Collective MPI-IO access with independent IO */ + dxfer_coll_type = DXFER_INDEPENDENT_IO; + break; + case '2': /* Use the split-file driver with MPIO access */ + /* Can use $HDF5_METAPREFIX to define the */ + /* meta-file-prefix. */ + facc_type = FACC_MPIO | FACC_SPLIT; + break; + case 'd': /* dimensizes */ + if (--argc < 2){ + nerrors++; + return(1); + } + dim0 = atoi(*(++argv))*mpi_size; + argc--; + dim1 = atoi(*(++argv))*mpi_size; + /* set default chunkdim sizes too */ + chunkdim0 = (dim0+9)/10; + chunkdim1 = (dim1+9)/10; + break; + case 'c': /* chunk dimensions */ + if (--argc < 2){ + nerrors++; + return(1); + } + chunkdim0 = atoi(*(++argv)); + argc--; + chunkdim1 = atoi(*(++argv)); + break; + case 'h': /* print help message--return with nerrors set */ + return(1); + default: printf("Illegal option(%s)\n", *argv); + nerrors++; + return(1); + } + } } /*while*/ /* check validity of dimension and chunk sizes */ if (dim0 <= 0 || dim1 <= 0){ - printf("Illegal dim sizes (%d, %d)\n", dim0, dim1); - nerrors++; - return(1); + printf("Illegal dim sizes (%d, %d)\n", dim0, dim1); + nerrors++; + return(1); } if (chunkdim0 <= 0 || chunkdim1 <= 0){ - printf("Illegal chunkdim sizes (%d, %d)\n", chunkdim0, chunkdim1); - nerrors++; - return(1); + printf("Illegal chunkdim sizes (%d, %d)\n", chunkdim0, chunkdim1); + nerrors++; + return(1); } /* Make sure datasets can be divided into equal portions by the processes */ if ((dim0 % mpi_size) || (dim1 % mpi_size)){ - if (MAINPROCESS) - printf("dim0(%d) and dim1(%d) must be multiples of processes(%d)\n", - dim0, dim1, mpi_size); - nerrors++; - return(1); + if (MAINPROCESS) + printf("dim0(%d) and dim1(%d) must be multiples of processes(%d)\n", + dim0, dim1, mpi_size); + nerrors++; + return(1); } /* compose the test filenames */ { - int i, n; - - n = sizeof(FILENAME)/sizeof(FILENAME[0]) - 1; /* exclude the NULL */ - - for (i=0; i < n; i++) - if (h5_fixname(FILENAME[i],fapl,filenames[i],sizeof(filenames[i])) - == NULL){ - printf("h5_fixname failed\n"); - nerrors++; - return(1); - } - printf("Test filenames are:\n"); - for (i=0; i < n; i++) - printf(" %s\n", filenames[i]); + int i, n; + + n = sizeof(FILENAME)/sizeof(FILENAME[0]) - 1; /* exclude the NULL */ + + for (i=0; i < n; i++) + if (h5_fixname(FILENAME[i],fapl,filenames[i],sizeof(filenames[i])) + == NULL){ + printf("h5_fixname failed\n"); + nerrors++; + return(1); + } + printf("Test filenames are:\n"); + for (i=0; i < n; i++) + printf(" %s\n", filenames[i]); } return(0); @@ -4929,7 +4929,7 @@ create_faccess_plist(MPI_Comm comm, MPI_Info info, int l_facc_type) { hid_t ret_pl = -1; herr_t ret; /* generic return value */ - int mpi_rank; /* mpi variables */ + int mpi_rank; /* mpi variables */ /* need the rank for error checking macros */ MPI_Comm_rank(MPI_COMM_WORLD, &mpi_rank); @@ -4938,36 +4938,36 @@ create_faccess_plist(MPI_Comm comm, MPI_Info info, int l_facc_type) VRFY((ret_pl >= 0), "H5P_FILE_ACCESS"); if (l_facc_type == FACC_DEFAULT) - return (ret_pl); + return (ret_pl); if (l_facc_type == FACC_MPIO){ - /* set Parallel access with communicator */ - ret = H5Pset_fapl_mpio(ret_pl, comm, info); - VRFY((ret >= 0), ""); + /* set Parallel access with communicator */ + ret = H5Pset_fapl_mpio(ret_pl, comm, info); + VRFY((ret >= 0), ""); ret = H5Pset_all_coll_metadata_ops(ret_pl, TRUE); - VRFY((ret >= 0), ""); + VRFY((ret >= 0), ""); ret = H5Pset_coll_metadata_write(ret_pl, TRUE); - VRFY((ret >= 0), ""); - return(ret_pl); + VRFY((ret >= 0), ""); + return(ret_pl); } if (l_facc_type == (FACC_MPIO | FACC_SPLIT)){ - hid_t mpio_pl; - - mpio_pl = H5Pcreate (H5P_FILE_ACCESS); - VRFY((mpio_pl >= 0), ""); - /* set Parallel access with communicator */ - ret = H5Pset_fapl_mpio(mpio_pl, comm, info); - VRFY((ret >= 0), ""); - - /* setup file access template */ - ret_pl = H5Pcreate (H5P_FILE_ACCESS); - VRFY((ret_pl >= 0), ""); - /* set Parallel access with communicator */ - ret = H5Pset_fapl_split(ret_pl, ".meta", mpio_pl, ".raw", mpio_pl); - VRFY((ret >= 0), "H5Pset_fapl_split succeeded"); - H5Pclose(mpio_pl); - return(ret_pl); + hid_t mpio_pl; + + mpio_pl = H5Pcreate (H5P_FILE_ACCESS); + VRFY((mpio_pl >= 0), ""); + /* set Parallel access with communicator */ + ret = H5Pset_fapl_mpio(mpio_pl, comm, info); + VRFY((ret >= 0), ""); + + /* setup file access template */ + ret_pl = H5Pcreate (H5P_FILE_ACCESS); + VRFY((ret_pl >= 0), ""); + /* set Parallel access with communicator */ + ret = H5Pset_fapl_split(ret_pl, ".meta", mpio_pl, ".raw", mpio_pl); + VRFY((ret >= 0), "H5Pset_fapl_split succeeded"); + H5Pclose(mpio_pl); + return(ret_pl); } /* unknown file access types */ @@ -5035,7 +5035,7 @@ sschecker4(void) int main(int argc, char **argv) { - int mpi_size, mpi_rank; /* mpi variables */ + int mpi_size, mpi_rank; /* mpi variables */ #ifndef H5_HAVE_WIN32_API /* Un-buffer the stdout and stderr */ @@ -5051,10 +5051,10 @@ int main(int argc, char **argv) dim1 = COL_FACTOR*mpi_size; if (MAINPROCESS){ - printf("===================================\n"); - printf("Shape Same Tests Start\n"); - printf(" express_test = %d.\n", GetTestExpress()); - printf("===================================\n"); + printf("===================================\n"); + printf("Shape Same Tests Start\n"); + printf(" express_test = %d.\n", GetTestExpress()); + printf("===================================\n"); } /* Attempt to turn off atexit post processing so that in case errors @@ -5063,7 +5063,7 @@ int main(int argc, char **argv) * calls. By then, MPI calls may not work. */ if (H5dont_atexit() < 0){ - printf("%d: Failed to turn off atexit processing. Continue.\n", mpi_rank); + printf("%d: Failed to turn off atexit processing. Continue.\n", mpi_rank); }; H5open(); h5_show_hostname(); @@ -5073,23 +5073,23 @@ int main(int argc, char **argv) /* Shape Same tests using contigous hyperslab */ AddTest("sscontig1", sscontig1, NULL, - "Cntg hslab, ind IO, cntg dsets", PARATESTFILE); + "Cntg hslab, ind IO, cntg dsets", PARATESTFILE); AddTest("sscontig2", sscontig2, NULL, - "Cntg hslab, col IO, cntg dsets", PARATESTFILE); + "Cntg hslab, col IO, cntg dsets", PARATESTFILE); AddTest("sscontig3", sscontig3, NULL, - "Cntg hslab, ind IO, chnk dsets", PARATESTFILE); + "Cntg hslab, ind IO, chnk dsets", PARATESTFILE); AddTest("sscontig4", sscontig4, NULL, - "Cntg hslab, col IO, chnk dsets", PARATESTFILE); + "Cntg hslab, col IO, chnk dsets", PARATESTFILE); /* Shape Same tests using checker board hyperslab */ AddTest("sschecker1", sschecker1, NULL, - "Check hslab, ind IO, cntg dsets", PARATESTFILE); + "Check hslab, ind IO, cntg dsets", PARATESTFILE); AddTest("sschecker2", sschecker2, NULL, - "Check hslab, col IO, cntg dsets", PARATESTFILE); + "Check hslab, col IO, cntg dsets", PARATESTFILE); AddTest("sschecker3", sschecker3, NULL, - "Check hslab, ind IO, chnk dsets", PARATESTFILE); + "Check hslab, ind IO, chnk dsets", PARATESTFILE); AddTest("sschecker4", sschecker4, NULL, - "Check hslab, col IO, chnk dsets", PARATESTFILE); + "Check hslab, col IO, chnk dsets", PARATESTFILE); /* Display testing information */ TestInfo(argv[0]); @@ -5102,9 +5102,9 @@ int main(int argc, char **argv) TestParseCmdLine(argc, argv); if (dxfer_coll_type == DXFER_INDEPENDENT_IO && MAINPROCESS){ - printf("===================================\n" - " Using Independent I/O with file set view to replace collective I/O \n" - "===================================\n"); + printf("===================================\n" + " Using Independent I/O with file set view to replace collective I/O \n" + "===================================\n"); } @@ -5129,16 +5129,16 @@ int main(int argc, char **argv) { int temp; MPI_Allreduce(&nerrors, &temp, 1, MPI_INT, MPI_MAX, MPI_COMM_WORLD); - nerrors=temp; + nerrors=temp; } - if (MAINPROCESS){ /* only process 0 reports */ - printf("===================================\n"); - if (nerrors) - printf("***Shape Same tests detected %d errors***\n", nerrors); - else - printf("Shape Same tests finished with no errors\n"); - printf("===================================\n"); + if (MAINPROCESS){ /* only process 0 reports */ + printf("===================================\n"); + if (nerrors) + printf("***Shape Same tests detected %d errors***\n", nerrors); + else + printf("Shape Same tests finished with no errors\n"); + printf("===================================\n"); } /* close HDF5 library */ diff --git a/testpar/t_span_tree.c b/testpar/t_span_tree.c index 811598e..20bc4ac 100644 --- a/testpar/t_span_tree.c +++ b/testpar/t_span_tree.c @@ -23,12 +23,12 @@ 2) We will read two datasets with the same hyperslab selection settings, 1. independent read to read independent output, independent read to read collecive output, - Compare the result, - If the result is the same, then collective write succeeds. + Compare the result, + If the result is the same, then collective write succeeds. 2. collective read to read independent output, independent read to read independent output, - Compare the result, - If the result is the same, then collective read succeeds. + Compare the result, + If the result is the same, then collective read succeeds. */ @@ -40,17 +40,17 @@ static void coll_read_test(int chunk_factor); /*------------------------------------------------------------------------- - * Function: coll_irregular_cont_write + * Function: coll_irregular_cont_write * - * Purpose: Wrapper to test the collectively irregular hyperslab write in + * Purpose: Wrapper to test the collectively irregular hyperslab write in contiguous storage * - * Return: Success: 0 + * Return: Success: 0 * - * Failure: -1 + * Failure: -1 * - * Programmer: Unknown - * Dec 2nd, 2004 + * Programmer: Unknown + * Dec 2nd, 2004 * * Modifications: * @@ -67,17 +67,17 @@ coll_irregular_cont_write(void) /*------------------------------------------------------------------------- - * Function: coll_irregular_cont_read + * Function: coll_irregular_cont_read * - * Purpose: Wrapper to test the collectively irregular hyperslab read in + * Purpose: Wrapper to test the collectively irregular hyperslab read in contiguous storage * - * Return: Success: 0 + * Return: Success: 0 * - * Failure: -1 + * Failure: -1 * - * Programmer: Unknown - * Dec 2nd, 2004 + * Programmer: Unknown + * Dec 2nd, 2004 * * Modifications: * @@ -93,17 +93,17 @@ coll_irregular_cont_read(void) /*------------------------------------------------------------------------- - * Function: coll_irregular_simple_chunk_write + * Function: coll_irregular_simple_chunk_write * - * Purpose: Wrapper to test the collectively irregular hyperslab write in + * Purpose: Wrapper to test the collectively irregular hyperslab write in chunk storage(1 chunk) * - * Return: Success: 0 + * Return: Success: 0 * - * Failure: -1 + * Failure: -1 * - * Programmer: Unknown - * Dec 2nd, 2004 + * Programmer: Unknown + * Dec 2nd, 2004 * * Modifications: * @@ -120,17 +120,17 @@ coll_irregular_simple_chunk_write(void) /*------------------------------------------------------------------------- - * Function: coll_irregular_simple_chunk_read + * Function: coll_irregular_simple_chunk_read * - * Purpose: Wrapper to test the collectively irregular hyperslab read in chunk + * Purpose: Wrapper to test the collectively irregular hyperslab read in chunk storage(1 chunk) * - * Return: Success: 0 + * Return: Success: 0 * - * Failure: -1 + * Failure: -1 * - * Programmer: Unknown - * Dec 2nd, 2004 + * Programmer: Unknown + * Dec 2nd, 2004 * * Modifications: * @@ -145,17 +145,17 @@ coll_irregular_simple_chunk_read(void) } /*------------------------------------------------------------------------- - * Function: coll_irregular_complex_chunk_write + * Function: coll_irregular_complex_chunk_write * - * Purpose: Wrapper to test the collectively irregular hyperslab write in chunk + * Purpose: Wrapper to test the collectively irregular hyperslab write in chunk storage(4 chunks) * - * Return: Success: 0 + * Return: Success: 0 * - * Failure: -1 + * Failure: -1 * - * Programmer: Unknown - * Dec 2nd, 2004 + * Programmer: Unknown + * Dec 2nd, 2004 * * Modifications: * @@ -172,17 +172,17 @@ coll_irregular_complex_chunk_write(void) /*------------------------------------------------------------------------- - * Function: coll_irregular_complex_chunk_read + * Function: coll_irregular_complex_chunk_read * - * Purpose: Wrapper to test the collectively irregular hyperslab read in chunk + * Purpose: Wrapper to test the collectively irregular hyperslab read in chunk storage(1 chunk) * - * Return: Success: 0 + * Return: Success: 0 * - * Failure: -1 + * Failure: -1 * - * Programmer: Unknown - * Dec 2nd, 2004 + * Programmer: Unknown + * Dec 2nd, 2004 * * Modifications: * @@ -198,18 +198,18 @@ coll_irregular_complex_chunk_read(void) /*------------------------------------------------------------------------- - * Function: coll_write_test + * Function: coll_write_test * - * Purpose: To test the collectively irregular hyperslab write in chunk + * Purpose: To test the collectively irregular hyperslab write in chunk storage * Input: number of chunks on each dimension if number is equal to 0, contiguous storage - * Return: Success: 0 + * Return: Success: 0 * - * Failure: -1 + * Failure: -1 * - * Programmer: Unknown - * Dec 2nd, 2004 + * Programmer: Unknown + * Dec 2nd, 2004 * * Modifications: Oct 18th, 2005 * @@ -227,14 +227,14 @@ void coll_write_test(int chunk_factor) #if 0 hsize_t mdim1[] = {MSPACE1_DIM}; /* Dimension size of the first dataset - (in memory) */ + (in memory) */ hsize_t fsdim[] = {FSPACE_DIM1, FSPACE_DIM2}; /* Dimension sizes of the dataset (on disk) */ hsize_t mdim[] = {MSPACE_DIM1, MSPACE_DIM2}; /* Dimension sizes of the - dataset in memory when we - read selection from the - dataset on the disk */ + dataset in memory when we + read selection from the + dataset on the disk */ #endif hsize_t start[2]; /* Start of hyperslab */ @@ -250,7 +250,7 @@ void coll_write_test(int chunk_factor) #if 0 int matrix_out[MSPACE_DIM1][MSPACE_DIM2]; int matrix_out1[MSPACE_DIM1][MSPACE_DIM2]; /* Buffer to read from the - dataset */ + dataset */ int vector[MSPACE1_DIM]; #endif @@ -614,12 +614,12 @@ void coll_write_test(int chunk_factor) */ ret = H5Dread(datasetc, H5T_NATIVE_INT, mspaceid, fspaceid, - H5P_DEFAULT, matrix_out); + H5P_DEFAULT, matrix_out); VRFY((ret >= 0),"H5D independent read succeed"); ret = H5Dread(dataseti, H5T_NATIVE_INT, mspaceid, fspaceid, - H5P_DEFAULT, matrix_out1); + H5P_DEFAULT, matrix_out1); VRFY((ret >= 0),"H5D independent read succeed"); ret = 0; @@ -666,18 +666,18 @@ void coll_write_test(int chunk_factor) } /*------------------------------------------------------------------------- - * Function: coll_read_test + * Function: coll_read_test * - * Purpose: To test the collectively irregular hyperslab read in chunk + * Purpose: To test the collectively irregular hyperslab read in chunk storage * Input: number of chunks on each dimension if number is equal to 0, contiguous storage - * Return: Success: 0 + * Return: Success: 0 * - * Failure: -1 + * Failure: -1 * - * Programmer: Unknown - * Dec 2nd, 2004 + * Programmer: Unknown + * Dec 2nd, 2004 * * Modifications: Oct 18th, 2005 * Note: This test must be used with the correpsonding @@ -697,9 +697,9 @@ coll_read_test(int chunk_factor) /* Dimension sizes of the dataset (on disk) */ #if 0 hsize_t mdim[] = {MSPACE_DIM1, MSPACE_DIM2}; /* Dimension sizes of the - dataset in memory when we - read selection from the - dataset on the disk */ + dataset in memory when we + read selection from the + dataset on the disk */ #endif hsize_t mdim[2]; @@ -716,7 +716,7 @@ coll_read_test(int chunk_factor) #if 0 int matrix_out[MSPACE_DIM1][MSPACE_DIM2]; int matrix_out1[MSPACE_DIM1][MSPACE_DIM2]; /* Buffer to read from the - dataset */ + dataset */ #endif int mpi_size,mpi_rank; @@ -880,7 +880,7 @@ coll_read_test(int chunk_factor) /* Collective read */ ret = H5Dread(dataseti, H5T_NATIVE_INT, mspaceid, fspaceid1, - dxfer_plist, matrix_out); + dxfer_plist, matrix_out); VRFY((ret >= 0),"H5D collecive read succeed"); ret = H5Pclose(dxfer_plist); @@ -888,7 +888,7 @@ coll_read_test(int chunk_factor) /* Independent read */ ret = H5Dread(dataseti, H5T_NATIVE_INT, mspaceid, fspaceid1, - H5P_DEFAULT, matrix_out1); + H5P_DEFAULT, matrix_out1); VRFY((ret >= 0),"H5D independent read succeed"); ret = 0; @@ -931,30 +931,30 @@ coll_read_test(int chunk_factor) /**************************************************************** ** -** lower_dim_size_comp_test__select_checker_board(): +** lower_dim_size_comp_test__select_checker_board(): ** -** Given a data space of tgt_rank, and dimensions: +** Given a data space of tgt_rank, and dimensions: ** -** (mpi_size + 1), edge_size, ... , edge_size +** (mpi_size + 1), edge_size, ... , edge_size ** -** edge_size, and a checker_edge_size, select a checker -** board selection of a sel_rank (sel_rank < tgt_rank) -** dimensional slice through the data space parallel to the +** edge_size, and a checker_edge_size, select a checker +** board selection of a sel_rank (sel_rank < tgt_rank) +** dimensional slice through the data space parallel to the ** sel_rank fastest changing indicies, with origin (in the -** higher indicies) as indicated by the start array. +** higher indicies) as indicated by the start array. ** -** Note that this function, is hard coded to presume a -** maximum data space rank of 5. +** Note that this function, is hard coded to presume a +** maximum data space rank of 5. ** -** While this maximum is declared as a constant, increasing -** it will require extensive coding in addition to changing +** While this maximum is declared as a constant, increasing +** it will require extensive coding in addition to changing ** the value of the constant. ** -** JRM -- 11/11/09 +** JRM -- 11/11/09 ** ****************************************************************/ -#define LDSCT_DS_RANK 5 +#define LDSCT_DS_RANK 5 #define LOWER_DIM_SIZE_COMP_TEST_DEBUG_TARGET_RANK 0 #define LOWER_DIM_SIZE_COMP_TEST__SELECT_CHECKER_BOARD__DEBUG 0 @@ -969,32 +969,32 @@ lower_dim_size_comp_test__select_checker_board( const int sel_rank, hsize_t sel_start[]) { -#if LOWER_DIM_SIZE_COMP_TEST__SELECT_CHECKER_BOARD__DEBUG - const char * fcnName = - "lower_dim_size_comp_test__select_checker_board():"; -#endif - hbool_t first_selection = TRUE; +#if LOWER_DIM_SIZE_COMP_TEST__SELECT_CHECKER_BOARD__DEBUG + const char * fcnName = + "lower_dim_size_comp_test__select_checker_board():"; +#endif + hbool_t first_selection = TRUE; int i, j, k, l, m; - int ds_offset; - int sel_offset; - const int test_max_rank = LDSCT_DS_RANK; /* must update code if */ + int ds_offset; + int sel_offset; + const int test_max_rank = LDSCT_DS_RANK; /* must update code if */ /* this changes */ - hsize_t base_count; + hsize_t base_count; hsize_t offset_count; - hsize_t start[LDSCT_DS_RANK]; - hsize_t stride[LDSCT_DS_RANK]; - hsize_t count[LDSCT_DS_RANK]; - hsize_t block[LDSCT_DS_RANK]; - herr_t ret; /* Generic return value */ + hsize_t start[LDSCT_DS_RANK]; + hsize_t stride[LDSCT_DS_RANK]; + hsize_t count[LDSCT_DS_RANK]; + hsize_t block[LDSCT_DS_RANK]; + herr_t ret; /* Generic return value */ -#if LOWER_DIM_SIZE_COMP_TEST__SELECT_CHECKER_BOARD__DEBUG +#if LOWER_DIM_SIZE_COMP_TEST__SELECT_CHECKER_BOARD__DEBUG if ( mpi_rank == LOWER_DIM_SIZE_COMP_TEST_DEBUG_TARGET_RANK ) { - HDfprintf(stdout, + HDfprintf(stdout, "%s:%d: dims/checker_edge_size = %d %d %d %d %d / %d\n", fcnName, mpi_rank, (int)dims[0], (int)dims[1], (int)dims[2], (int)dims[3], (int)dims[4], checker_edge_size); } -#endif /* LOWER_DIM_SIZE_COMP_TEST__SELECT_CHECKER_BOARD__DEBUG */ +#endif /* LOWER_DIM_SIZE_COMP_TEST__SELECT_CHECKER_BOARD__DEBUG */ HDassert( 0 < checker_edge_size ); HDassert( 0 < sel_rank ); @@ -1012,14 +1012,14 @@ lower_dim_size_comp_test__select_checker_board( HDassert( (hsize_t)checker_edge_size <= dims[sel_offset] ); HDassert( dims[sel_offset] == 10 ); -#if LOWER_DIM_SIZE_COMP_TEST__SELECT_CHECKER_BOARD__DEBUG +#if LOWER_DIM_SIZE_COMP_TEST__SELECT_CHECKER_BOARD__DEBUG if ( mpi_rank == LOWER_DIM_SIZE_COMP_TEST_DEBUG_TARGET_RANK ) { - HDfprintf(stdout, "%s:%d: sel_rank/sel_offset = %d/%d.\n", + HDfprintf(stdout, "%s:%d: sel_rank/sel_offset = %d/%d.\n", fcnName, mpi_rank, sel_rank, sel_offset); - HDfprintf(stdout, "%s:%d: tgt_rank/ds_offset = %d/%d.\n", + HDfprintf(stdout, "%s:%d: tgt_rank/ds_offset = %d/%d.\n", fcnName, mpi_rank, tgt_rank, ds_offset); } -#endif /* LOWER_DIM_SIZE_COMP_TEST__SELECT_CHECKER_BOARD__DEBUG */ +#endif /* LOWER_DIM_SIZE_COMP_TEST__SELECT_CHECKER_BOARD__DEBUG */ /* First, compute the base count (which assumes start == 0 * for the associated offset) and offset_count (which @@ -1041,25 +1041,25 @@ lower_dim_size_comp_test__select_checker_board( base_count++; } - offset_count = - (hsize_t)((dims[sel_offset] - (hsize_t)checker_edge_size) / + offset_count = + (hsize_t)((dims[sel_offset] - (hsize_t)checker_edge_size) / ((hsize_t)(checker_edge_size * 2))); - if ( ((dims[sel_rank] - (hsize_t)checker_edge_size) % + if ( ((dims[sel_rank] - (hsize_t)checker_edge_size) % ((hsize_t)(checker_edge_size * 2))) > 0 ) { offset_count++; } -#if LOWER_DIM_SIZE_COMP_TEST__SELECT_CHECKER_BOARD__DEBUG +#if LOWER_DIM_SIZE_COMP_TEST__SELECT_CHECKER_BOARD__DEBUG if ( mpi_rank == LOWER_DIM_SIZE_COMP_TEST_DEBUG_TARGET_RANK ) { - HDfprintf(stdout, "%s:%d: base_count/offset_count = %d/%d.\n", + HDfprintf(stdout, "%s:%d: base_count/offset_count = %d/%d.\n", fcnName, mpi_rank, base_count, offset_count); } -#endif /* LOWER_DIM_SIZE_COMP_TEST__SELECT_CHECKER_BOARD__DEBUG */ +#endif /* LOWER_DIM_SIZE_COMP_TEST__SELECT_CHECKER_BOARD__DEBUG */ /* Now set up the stride and block arrays, and portions of the start - * and count arrays that will not be altered during the selection of + * and count arrays that will not be altered during the selection of * the checker board. */ i = 0; @@ -1091,7 +1091,7 @@ lower_dim_size_comp_test__select_checker_board( i++; } - + i = 0; do { if ( 0 >= sel_offset ) { @@ -1110,7 +1110,7 @@ lower_dim_size_comp_test__select_checker_board( } j = 0; - do { + do { if ( 1 >= sel_offset ) { if ( j == 0 ) { @@ -1179,78 +1179,78 @@ lower_dim_size_comp_test__select_checker_board( if ( ((i + j + k + l + m) % 2) == 0 ) { -#if LOWER_DIM_SIZE_COMP_TEST__SELECT_CHECKER_BOARD__DEBUG - if ( mpi_rank == +#if LOWER_DIM_SIZE_COMP_TEST__SELECT_CHECKER_BOARD__DEBUG + if ( mpi_rank == LOWER_DIM_SIZE_COMP_TEST_DEBUG_TARGET_RANK ) { - HDfprintf(stdout, - "%s%d: *** first_selection = %d ***\n", + HDfprintf(stdout, + "%s%d: *** first_selection = %d ***\n", fcnName, mpi_rank, (int)first_selection); - HDfprintf(stdout, + HDfprintf(stdout, "%s:%d: i/j/k/l/m = %d/%d/%d/%d/%d\n", fcnName, mpi_rank, i, j, k, l, m); - HDfprintf(stdout, - "%s:%d: start = %d %d %d %d %d.\n", - fcnName, mpi_rank, - (int)start[0], (int)start[1], - (int)start[2], (int)start[3], + HDfprintf(stdout, + "%s:%d: start = %d %d %d %d %d.\n", + fcnName, mpi_rank, + (int)start[0], (int)start[1], + (int)start[2], (int)start[3], (int)start[4]); - HDfprintf(stdout, - "%s:%d: stride = %d %d %d %d %d.\n", - fcnName, mpi_rank, - (int)stride[0], (int)stride[1], - (int)stride[2], (int)stride[3], + HDfprintf(stdout, + "%s:%d: stride = %d %d %d %d %d.\n", + fcnName, mpi_rank, + (int)stride[0], (int)stride[1], + (int)stride[2], (int)stride[3], (int)stride[4]); - HDfprintf(stdout, - "%s:%d: count = %d %d %d %d %d.\n", - fcnName, mpi_rank, - (int)count[0], (int)count[1], - (int)count[2], (int)count[3], + HDfprintf(stdout, + "%s:%d: count = %d %d %d %d %d.\n", + fcnName, mpi_rank, + (int)count[0], (int)count[1], + (int)count[2], (int)count[3], (int)count[4]); - HDfprintf(stdout, - "%s:%d: block = %d %d %d %d %d.\n", - fcnName, mpi_rank, - (int)block[0], (int)block[1], - (int)block[2], (int)block[3], + HDfprintf(stdout, + "%s:%d: block = %d %d %d %d %d.\n", + fcnName, mpi_rank, + (int)block[0], (int)block[1], + (int)block[2], (int)block[3], (int)block[4]); - HDfprintf(stdout, - "%s:%d: n-cube extent dims = %d.\n", + HDfprintf(stdout, + "%s:%d: n-cube extent dims = %d.\n", fcnName, mpi_rank, H5Sget_simple_extent_ndims(tgt_sid)); - HDfprintf(stdout, - "%s:%d: selection rank = %d.\n", + HDfprintf(stdout, + "%s:%d: selection rank = %d.\n", fcnName, mpi_rank, sel_rank); } #endif if ( first_selection ) { - first_selection = FALSE; + first_selection = FALSE; ret = H5Sselect_hyperslab ( - tgt_sid, + tgt_sid, H5S_SELECT_SET, - &(start[ds_offset]), - &(stride[ds_offset]), - &(count[ds_offset]), + &(start[ds_offset]), + &(stride[ds_offset]), + &(count[ds_offset]), &(block[ds_offset]) ); - + VRFY((ret != FAIL), "H5Sselect_hyperslab(SET) succeeded"); } else { ret = H5Sselect_hyperslab ( - tgt_sid, + tgt_sid, H5S_SELECT_OR, - &(start[ds_offset]), - &(stride[ds_offset]), - &(count[ds_offset]), + &(start[ds_offset]), + &(stride[ds_offset]), + &(count[ds_offset]), &(block[ds_offset]) ); - + VRFY((ret != FAIL), "H5Sselect_hyperslab(OR) succeeded"); } @@ -1282,7 +1282,7 @@ lower_dim_size_comp_test__select_checker_board( } while ( ( i <= 1 ) && ( 0 >= sel_offset ) ); -#if LOWER_DIM_SIZE_COMP_TEST__SELECT_CHECKER_BOARD__DEBUG +#if LOWER_DIM_SIZE_COMP_TEST__SELECT_CHECKER_BOARD__DEBUG if ( mpi_rank == LOWER_DIM_SIZE_COMP_TEST_DEBUG_TARGET_RANK ) { HDfprintf(stdout, "%s%d: H5Sget_select_npoints(tgt_sid) = %d.\n", fcnName, mpi_rank, (int)H5Sget_select_npoints(tgt_sid)); @@ -1304,7 +1304,7 @@ lower_dim_size_comp_test__select_checker_board( VRFY((ret != FAIL), "H5Sselect_hyperslab(AND) succeeded"); -#if LOWER_DIM_SIZE_COMP_TEST__SELECT_CHECKER_BOARD__DEBUG +#if LOWER_DIM_SIZE_COMP_TEST__SELECT_CHECKER_BOARD__DEBUG if ( mpi_rank == LOWER_DIM_SIZE_COMP_TEST_DEBUG_TARGET_RANK ) { HDfprintf(stdout, "%s%d: H5Sget_select_npoints(tgt_sid) = %d.\n", fcnName, mpi_rank, (int)H5Sget_select_npoints(tgt_sid)); @@ -1319,57 +1319,57 @@ lower_dim_size_comp_test__select_checker_board( /**************************************************************** ** -** lower_dim_size_comp_test__verify_data(): +** lower_dim_size_comp_test__verify_data(): ** -** Examine the supplied buffer to see if it contains the -** expected data. Return TRUE if it does, and FALSE +** Examine the supplied buffer to see if it contains the +** expected data. Return TRUE if it does, and FALSE ** otherwise. ** -** The supplied buffer is presumed to this process's slice -** of the target data set. Each such slice will be an -** n-cube of rank (rank -1) and the supplied edge_size with -** origin (mpi_rank, 0, ... , 0) in the target data set. +** The supplied buffer is presumed to this process's slice +** of the target data set. Each such slice will be an +** n-cube of rank (rank -1) and the supplied edge_size with +** origin (mpi_rank, 0, ... , 0) in the target data set. ** -** Further, the buffer is presumed to be the result of reading -** or writing a checker board selection of an m (1 <= m < +** Further, the buffer is presumed to be the result of reading +** or writing a checker board selection of an m (1 <= m < ** rank) dimensional slice through this processes slice -** of the target data set. Also, this slice must be parallel -** to the fastest changing indicies. +** of the target data set. Also, this slice must be parallel +** to the fastest changing indicies. ** -** It is further presumed that the buffer was zeroed before -** the read/write, and that the full target data set (i.e. -** the buffer/data set for all processes) was initialized -** with the natural numbers listed in order from the origin -** along the fastest changing axis. +** It is further presumed that the buffer was zeroed before +** the read/write, and that the full target data set (i.e. +** the buffer/data set for all processes) was initialized +** with the natural numbers listed in order from the origin +** along the fastest changing axis. ** ** Thus for a 20x10x10 dataset, the value stored in location -** (x, y, z) (assuming that z is the fastest changing index -** and x the slowest) is assumed to be: +** (x, y, z) (assuming that z is the fastest changing index +** and x the slowest) is assumed to be: ** -** (10 * 10 * x) + (10 * y) + z +** (10 * 10 * x) + (10 * y) + z ** -** Further, supposing that this is process 10, this process's -** slice of the dataset would be a 10 x 10 2-cube with origin -** (10, 0, 0) in the data set, and would be initialize (prior -** to the checkerboard selection) as follows: +** Further, supposing that this is process 10, this process's +** slice of the dataset would be a 10 x 10 2-cube with origin +** (10, 0, 0) in the data set, and would be initialize (prior +** to the checkerboard selection) as follows: ** -** 1000, 1001, 1002, ... 1008, 1009 -** 1010, 1011, 1012, ... 1018, 1019 -** . . . . . -** . . . . . -** . . . . . -** 1090, 1091, 1092, ... 1098, 1099 +** 1000, 1001, 1002, ... 1008, 1009 +** 1010, 1011, 1012, ... 1018, 1019 +** . . . . . +** . . . . . +** . . . . . +** 1090, 1091, 1092, ... 1098, 1099 ** -** In the case of a read from the processors slice of another -** data set of different rank, the values expected will have -** to be adjusted accordingly. This is done via the -** first_expected_val parameter. +** In the case of a read from the processors slice of another +** data set of different rank, the values expected will have +** to be adjusted accordingly. This is done via the +** first_expected_val parameter. ** -** Finally, the function presumes that the first element -** of the buffer resides either at the origin of either -** a selected or an unselected checker. (Translation: -** if partial checkers appear in the buffer, they will -** intersect the edges of the n-cube oposite the origin.) +** Finally, the function presumes that the first element +** of the buffer resides either at the origin of either +** a selected or an unselected checker. (Translation: +** if partial checkers appear in the buffer, they will +** intersect the edges of the n-cube oposite the origin.) ** ****************************************************************/ @@ -1377,7 +1377,7 @@ lower_dim_size_comp_test__select_checker_board( static hbool_t lower_dim_size_comp_test__verify_data(uint32_t * buf_ptr, -#if LOWER_DIM_SIZE_COMP_TEST__VERIFY_DATA__DEBUG +#if LOWER_DIM_SIZE_COMP_TEST__VERIFY_DATA__DEBUG const int mpi_rank, #endif /* LOWER_DIM_SIZE_COMP_TEST__VERIFY_DATA__DEBUG */ const int rank, @@ -1387,8 +1387,8 @@ lower_dim_size_comp_test__verify_data(uint32_t * buf_ptr, hbool_t buf_starts_in_checker) { #if LOWER_DIM_SIZE_COMP_TEST__VERIFY_DATA__DEBUG - const char * fcnName = - "lower_dim_size_comp_test__verify_data():"; + const char * fcnName = + "lower_dim_size_comp_test__verify_data():"; #endif hbool_t good_data = TRUE; hbool_t in_checker; @@ -1407,16 +1407,16 @@ lower_dim_size_comp_test__verify_data(uint32_t * buf_ptr, HDassert( checker_edge_size <= edge_size ); HDassert( test_max_rank <= LDSCT_DS_RANK ); -#if LOWER_DIM_SIZE_COMP_TEST__VERIFY_DATA__DEBUG +#if LOWER_DIM_SIZE_COMP_TEST__VERIFY_DATA__DEBUG if ( mpi_rank == LOWER_DIM_SIZE_COMP_TEST_DEBUG_TARGET_RANK ) { HDfprintf(stdout, "%s mpi_rank = %d.\n", fcnName, mpi_rank); HDfprintf(stdout, "%s rank = %d.\n", fcnName, rank); HDfprintf(stdout, "%s edge_size = %d.\n", fcnName, edge_size); - HDfprintf(stdout, "%s checker_edge_size = %d.\n", + HDfprintf(stdout, "%s checker_edge_size = %d.\n", fcnName, checker_edge_size); - HDfprintf(stdout, "%s first_expected_val = %d.\n", + HDfprintf(stdout, "%s first_expected_val = %d.\n", fcnName, (int)first_expected_val); - HDfprintf(stdout, "%s starts_in_checker = %d.\n", + HDfprintf(stdout, "%s starts_in_checker = %d.\n", fcnName, (int)buf_starts_in_checker); } #endif @@ -1461,7 +1461,7 @@ lower_dim_size_comp_test__verify_data(uint32_t * buf_ptr, y = 0; start_in_checker[3] = start_in_checker[2]; do - { + { if ( y >= checker_edge_size ) { start_in_checker[3] = ! start_in_checker[3]; @@ -1470,8 +1470,8 @@ lower_dim_size_comp_test__verify_data(uint32_t * buf_ptr, m = 0; z = 0; -#if LOWER_DIM_SIZE_COMP_TEST__VERIFY_DATA__DEBUG - if ( mpi_rank == +#if LOWER_DIM_SIZE_COMP_TEST__VERIFY_DATA__DEBUG + if ( mpi_rank == LOWER_DIM_SIZE_COMP_TEST_DEBUG_TARGET_RANK ) { HDfprintf(stdout, "%d, %d, %d, %d, %d:", i, j, k, l, m); } @@ -1479,8 +1479,8 @@ lower_dim_size_comp_test__verify_data(uint32_t * buf_ptr, in_checker = start_in_checker[3]; do { -#if LOWER_DIM_SIZE_COMP_TEST__VERIFY_DATA__DEBUG - if ( mpi_rank == +#if LOWER_DIM_SIZE_COMP_TEST__VERIFY_DATA__DEBUG + if ( mpi_rank == LOWER_DIM_SIZE_COMP_TEST_DEBUG_TARGET_RANK ) { HDfprintf(stdout, " %d", (int)(*val_ptr)); } @@ -1490,21 +1490,21 @@ lower_dim_size_comp_test__verify_data(uint32_t * buf_ptr, in_checker = ! in_checker; z = 0; } - + if ( in_checker ) { - + if ( *val_ptr != expected_value ) { good_data = FALSE; } - + /* zero out buffer for re-use */ *val_ptr = 0; } else if ( *val_ptr != 0 ) { good_data = FALSE; - + /* zero out buffer for re-use */ *val_ptr = 0; @@ -1514,11 +1514,11 @@ lower_dim_size_comp_test__verify_data(uint32_t * buf_ptr, expected_value++; m++; z++; - + } while ( ( rank >= (test_max_rank - 4) ) && ( m < edge_size ) ); -#if LOWER_DIM_SIZE_COMP_TEST__VERIFY_DATA__DEBUG - if ( mpi_rank == +#if LOWER_DIM_SIZE_COMP_TEST__VERIFY_DATA__DEBUG + if ( mpi_rank == LOWER_DIM_SIZE_COMP_TEST_DEBUG_TARGET_RANK ) { HDfprintf(stdout, "\n"); } @@ -1546,22 +1546,22 @@ lower_dim_size_comp_test__verify_data(uint32_t * buf_ptr, /*------------------------------------------------------------------------- - * Function: lower_dim_size_comp_test__run_test() + * Function: lower_dim_size_comp_test__run_test() * - * Purpose: Verify that a bug in the computation of the size of the - * lower dimensions of a data space in H5S_obtain_datatype() - * has been corrected. + * Purpose: Verify that a bug in the computation of the size of the + * lower dimensions of a data space in H5S_obtain_datatype() + * has been corrected. * - * Return: void + * Return: void * - * Programmer: JRM -- 11/11/09 + * Programmer: JRM -- 11/11/09 * * Modifications: * *------------------------------------------------------------------------- */ -#define LDSCT_DS_RANK 5 +#define LDSCT_DS_RANK 5 #define LOWER_DIM_SIZE_COMP_TEST__RUN_TEST__DEBUG 0 static void @@ -1569,21 +1569,21 @@ lower_dim_size_comp_test__run_test(const int chunk_edge_size, const hbool_t use_collective_io, const hid_t dset_type) { -#if LOWER_DIM_SIZE_COMP_TEST__RUN_TEST__DEBUG +#if LOWER_DIM_SIZE_COMP_TEST__RUN_TEST__DEBUG const char *fcnName = "lower_dim_size_comp_test__run_test()"; - int rank; - hsize_t dims[32]; - hsize_t max_dims[32]; + int rank; + hsize_t dims[32]; + hsize_t max_dims[32]; #endif /* LOWER_DIM_SIZE_COMP_TEST__RUN_TEST__DEBUG */ const char *filename; - hbool_t data_ok = FALSE; - hbool_t mis_match = FALSE; + hbool_t data_ok = FALSE; + hbool_t mis_match = FALSE; int i; int start_index; int stop_index; - int mrc; - int mpi_rank; - int mpi_size; + int mrc; + int mpi_rank; + int mpi_size; MPI_Comm mpi_comm = MPI_COMM_NULL; MPI_Info mpi_info = MPI_INFO_NULL; hid_t fid; /* HDF5 file ID */ @@ -1633,7 +1633,7 @@ lower_dim_size_comp_test__run_test(const int chunk_edge_size, mpi_comm = MPI_COMM_WORLD; mpi_info = MPI_INFO_NULL; -#if LOWER_DIM_SIZE_COMP_TEST__RUN_TEST__DEBUG +#if LOWER_DIM_SIZE_COMP_TEST__RUN_TEST__DEBUG if ( mpi_rank == LOWER_DIM_SIZE_COMP_TEST_DEBUG_TARGET_RANK ) { HDfprintf(stdout, "%s:%d: chunk_edge_size = %d.\n", fcnName, mpi_rank, (int)chunk_edge_size); @@ -1648,13 +1648,13 @@ lower_dim_size_comp_test__run_test(const int chunk_edge_size, large_ds_size = (size_t)((mpi_size + 1) * 10 * 10 * 10 * 10); large_ds_slice_size = (size_t) (10 * 10 * 10 * 10); -#if LOWER_DIM_SIZE_COMP_TEST__RUN_TEST__DEBUG +#if LOWER_DIM_SIZE_COMP_TEST__RUN_TEST__DEBUG if ( mpi_rank == LOWER_DIM_SIZE_COMP_TEST_DEBUG_TARGET_RANK ) { HDfprintf(stdout, "%s:%d: small ds size / slice size = %d / %d.\n", - fcnName, mpi_rank, + fcnName, mpi_rank, (int)small_ds_size, (int)small_ds_slice_size); HDfprintf(stdout, "%s:%d: large ds size / slice size = %d / %d.\n", - fcnName, mpi_rank, + fcnName, mpi_rank, (int)large_ds_size, (int)large_ds_slice_size); } #endif /* LOWER_DIM_SIZE_COMP_TEST__RUN_TEST__DEBUG */ @@ -1737,7 +1737,7 @@ lower_dim_size_comp_test__run_test(const int chunk_edge_size, large_dims[3] = 10; large_dims[4] = 10; -#if LOWER_DIM_SIZE_COMP_TEST__RUN_TEST__DEBUG +#if LOWER_DIM_SIZE_COMP_TEST__RUN_TEST__DEBUG if ( mpi_rank == LOWER_DIM_SIZE_COMP_TEST_DEBUG_TARGET_RANK ) { HDfprintf(stdout, "%s:%d: small_dims[] = %d %d %d %d %d\n", fcnName, mpi_rank, (int)small_dims[0], (int)small_dims[1], @@ -1746,41 +1746,41 @@ lower_dim_size_comp_test__run_test(const int chunk_edge_size, fcnName, mpi_rank, (int)large_dims[0], (int)large_dims[1], (int)large_dims[2], (int)large_dims[3], (int)large_dims[4]); } -#endif +#endif /* create data spaces */ full_mem_small_ds_sid = H5Screate_simple(5, small_dims, NULL); - VRFY((full_mem_small_ds_sid != 0), + VRFY((full_mem_small_ds_sid != 0), "H5Screate_simple() full_mem_small_ds_sid succeeded"); full_file_small_ds_sid = H5Screate_simple(5, small_dims, NULL); - VRFY((full_file_small_ds_sid != 0), + VRFY((full_file_small_ds_sid != 0), "H5Screate_simple() full_file_small_ds_sid succeeded"); mem_small_ds_sid = H5Screate_simple(5, small_dims, NULL); - VRFY((mem_small_ds_sid != 0), + VRFY((mem_small_ds_sid != 0), "H5Screate_simple() mem_small_ds_sid succeeded"); file_small_ds_sid = H5Screate_simple(5, small_dims, NULL); - VRFY((file_small_ds_sid != 0), + VRFY((file_small_ds_sid != 0), "H5Screate_simple() file_small_ds_sid succeeded"); full_mem_large_ds_sid = H5Screate_simple(5, large_dims, NULL); - VRFY((full_mem_large_ds_sid != 0), + VRFY((full_mem_large_ds_sid != 0), "H5Screate_simple() full_mem_large_ds_sid succeeded"); full_file_large_ds_sid = H5Screate_simple(5, large_dims, NULL); - VRFY((full_file_large_ds_sid != 0), + VRFY((full_file_large_ds_sid != 0), "H5Screate_simple() full_file_large_ds_sid succeeded"); mem_large_ds_sid = H5Screate_simple(5, large_dims, NULL); - VRFY((mem_large_ds_sid != 0), + VRFY((mem_large_ds_sid != 0), "H5Screate_simple() mem_large_ds_sid succeeded"); file_large_ds_sid = H5Screate_simple(5, large_dims, NULL); - VRFY((file_large_ds_sid != 0), + VRFY((file_large_ds_sid != 0), "H5Screate_simple() file_large_ds_sid succeeded"); @@ -1810,14 +1810,14 @@ lower_dim_size_comp_test__run_test(const int chunk_edge_size, small_chunk_dims[1] = small_chunk_dims[2] = (hsize_t)1; small_chunk_dims[3] = small_chunk_dims[4] = (hsize_t)chunk_edge_size; -#if LOWER_DIM_SIZE_COMP_TEST__RUN_TEST__DEBUG +#if LOWER_DIM_SIZE_COMP_TEST__RUN_TEST__DEBUG if ( mpi_rank == LOWER_DIM_SIZE_COMP_TEST_DEBUG_TARGET_RANK ) { HDfprintf(stdout, "%s:%d: small chunk dims[] = %d %d %d %d %d\n", - fcnName, mpi_rank, (int)small_chunk_dims[0], - (int)small_chunk_dims[1], (int)small_chunk_dims[2], + fcnName, mpi_rank, (int)small_chunk_dims[0], + (int)small_chunk_dims[1], (int)small_chunk_dims[2], (int)small_chunk_dims[3], (int)small_chunk_dims[4]); } -#endif +#endif small_ds_dcpl_id = H5Pcreate(H5P_DATASET_CREATE); VRFY((ret != FAIL), "H5Pcreate() small_ds_dcpl_id succeeded"); @@ -1829,18 +1829,18 @@ lower_dim_size_comp_test__run_test(const int chunk_edge_size, VRFY((ret != FAIL), "H5Pset_chunk() small_ds_dcpl_id succeeded"); large_chunk_dims[0] = (hsize_t)(1); - large_chunk_dims[1] = large_chunk_dims[2] = - large_chunk_dims[3] = large_chunk_dims[4] = (hsize_t)chunk_edge_size; + large_chunk_dims[1] = large_chunk_dims[2] = + large_chunk_dims[3] = large_chunk_dims[4] = (hsize_t)chunk_edge_size; -#if LOWER_DIM_SIZE_COMP_TEST__RUN_TEST__DEBUG +#if LOWER_DIM_SIZE_COMP_TEST__RUN_TEST__DEBUG if ( mpi_rank == LOWER_DIM_SIZE_COMP_TEST_DEBUG_TARGET_RANK ) { HDfprintf(stdout, "%s:%d: large chunk dims[] = %d %d %d %d %d\n", - fcnName, mpi_rank, (int)large_chunk_dims[0], - (int)large_chunk_dims[1], (int)large_chunk_dims[2], + fcnName, mpi_rank, (int)large_chunk_dims[0], + (int)large_chunk_dims[1], (int)large_chunk_dims[2], (int)large_chunk_dims[3], (int)large_chunk_dims[4]); } -#endif +#endif large_ds_dcpl_id = H5Pcreate(H5P_DATASET_CREATE); VRFY((ret != FAIL), "H5Pcreate() large_ds_dcpl_id succeeded"); @@ -1866,11 +1866,11 @@ lower_dim_size_comp_test__run_test(const int chunk_edge_size, large_ds_dcpl_id, H5P_DEFAULT); VRFY((ret >= 0), "H5Dcreate2() large_dataset succeeded"); -#if LOWER_DIM_SIZE_COMP_TEST__RUN_TEST__DEBUG +#if LOWER_DIM_SIZE_COMP_TEST__RUN_TEST__DEBUG if ( mpi_rank == LOWER_DIM_SIZE_COMP_TEST_DEBUG_TARGET_RANK ) { - HDfprintf(stdout, - "%s:%d: small/large ds id = %d / %d.\n", - fcnName, mpi_rank, (int)small_dataset, + HDfprintf(stdout, + "%s:%d: small/large ds id = %d / %d.\n", + fcnName, mpi_rank, (int)small_dataset, (int)large_dataset); } #endif /* LOWER_DIM_SIZE_COMP_TEST__RUN_TEST__DEBUG */ @@ -1904,10 +1904,10 @@ lower_dim_size_comp_test__run_test(const int chunk_edge_size, block[0] = block[1] = block[2] = 1; block[3] = block[4] = 10; -#if LOWER_DIM_SIZE_COMP_TEST__RUN_TEST__DEBUG +#if LOWER_DIM_SIZE_COMP_TEST__RUN_TEST__DEBUG if ( mpi_rank == LOWER_DIM_SIZE_COMP_TEST_DEBUG_TARGET_RANK ) { - HDfprintf(stdout, - "%s:%d: settings for small data set initialization.\n", + HDfprintf(stdout, + "%s:%d: settings for small data set initialization.\n", fcnName, mpi_rank); HDfprintf(stdout, "%s:%d: start[] = %d %d %d %d %d\n", fcnName, mpi_rank, (int)start[0], (int)start[1], @@ -1945,10 +1945,10 @@ lower_dim_size_comp_test__run_test(const int chunk_edge_size, start[0] = 0; -#if LOWER_DIM_SIZE_COMP_TEST__RUN_TEST__DEBUG +#if LOWER_DIM_SIZE_COMP_TEST__RUN_TEST__DEBUG if ( mpi_rank == LOWER_DIM_SIZE_COMP_TEST_DEBUG_TARGET_RANK ) { - HDfprintf(stdout, - "%s:%d: added settings for main process.\n", + HDfprintf(stdout, + "%s:%d: added settings for main process.\n", fcnName, mpi_rank); HDfprintf(stdout, "%s:%d: start[] = %d %d %d %d %d\n", fcnName, mpi_rank, (int)start[0], (int)start[1], @@ -1990,23 +1990,23 @@ lower_dim_size_comp_test__run_test(const int chunk_edge_size, /* write the initial value of the small data set to file */ -#if LOWER_DIM_SIZE_COMP_TEST__RUN_TEST__DEBUG +#if LOWER_DIM_SIZE_COMP_TEST__RUN_TEST__DEBUG if ( mpi_rank == LOWER_DIM_SIZE_COMP_TEST_DEBUG_TARGET_RANK ) { HDfprintf(stdout, "%s:%d: writing init value of small ds to file.\n", fcnName, mpi_rank); } #endif /* LOWER_DIM_SIZE_COMP_TEST__RUN_TEST__DEBUG */ - ret = H5Dwrite(small_dataset, - dset_type, - mem_small_ds_sid, + ret = H5Dwrite(small_dataset, + dset_type, + mem_small_ds_sid, file_small_ds_sid, - xfer_plist, + xfer_plist, small_ds_buf_0); VRFY((ret >= 0), "H5Dwrite() small_dataset initial write succeeded"); - /* read the small data set back to verify that it contains the - * expected data. Note that each process reads in the entire + /* read the small data set back to verify that it contains the + * expected data. Note that each process reads in the entire * data set and verifies it. */ ret = H5Dread(small_dataset, @@ -2059,10 +2059,10 @@ lower_dim_size_comp_test__run_test(const int chunk_edge_size, block[0] = (hsize_t)1; block[1] = block[2] = block[3] = block[4] = (hsize_t)10; -#if LOWER_DIM_SIZE_COMP_TEST__RUN_TEST__DEBUG +#if LOWER_DIM_SIZE_COMP_TEST__RUN_TEST__DEBUG if ( mpi_rank == LOWER_DIM_SIZE_COMP_TEST_DEBUG_TARGET_RANK ) { - HDfprintf(stdout, - "%s:%d: settings for large data set initialization.\n", + HDfprintf(stdout, + "%s:%d: settings for large data set initialization.\n", fcnName, mpi_rank); HDfprintf(stdout, "%s:%d: start[] = %d %d %d %d %d\n", fcnName, mpi_rank, (int)start[0], (int)start[1], @@ -2095,15 +2095,15 @@ lower_dim_size_comp_test__run_test(const int chunk_edge_size, block); VRFY((ret >= 0), "H5Sselect_hyperslab(file_large_ds_sid, set) suceeded"); -#if LOWER_DIM_SIZE_COMP_TEST__RUN_TEST__DEBUG +#if LOWER_DIM_SIZE_COMP_TEST__RUN_TEST__DEBUG if ( mpi_rank == LOWER_DIM_SIZE_COMP_TEST_DEBUG_TARGET_RANK ) { - HDfprintf(stdout, + HDfprintf(stdout, "%s%d: H5Sget_select_npoints(mem_large_ds_sid) = %d.\n", - fcnName, mpi_rank, + fcnName, mpi_rank, (int)H5Sget_select_npoints(mem_large_ds_sid)); - HDfprintf(stdout, + HDfprintf(stdout, "%s%d: H5Sget_select_npoints(file_large_ds_sid) = %d.\n", - fcnName, mpi_rank, + fcnName, mpi_rank, (int)H5Sget_select_npoints(file_large_ds_sid)); } #endif /* LOWER_DIM_SIZE_COMP_TEST__RUN_TEST__DEBUG */ @@ -2112,10 +2112,10 @@ lower_dim_size_comp_test__run_test(const int chunk_edge_size, start[0] = (hsize_t)0; -#if LOWER_DIM_SIZE_COMP_TEST__RUN_TEST__DEBUG +#if LOWER_DIM_SIZE_COMP_TEST__RUN_TEST__DEBUG if ( mpi_rank == LOWER_DIM_SIZE_COMP_TEST_DEBUG_TARGET_RANK ) { - HDfprintf(stdout, - "%s:%d: added settings for main process.\n", + HDfprintf(stdout, + "%s:%d: added settings for main process.\n", fcnName, mpi_rank); HDfprintf(stdout, "%s:%d: start[] = %d %d %d %d %d\n", fcnName, mpi_rank, (int)start[0], (int)start[1], @@ -2148,15 +2148,15 @@ lower_dim_size_comp_test__run_test(const int chunk_edge_size, block); VRFY((ret>= 0), "H5Sselect_hyperslab(file_large_ds_sid, or) suceeded"); -#if LOWER_DIM_SIZE_COMP_TEST__RUN_TEST__DEBUG +#if LOWER_DIM_SIZE_COMP_TEST__RUN_TEST__DEBUG if ( mpi_rank == LOWER_DIM_SIZE_COMP_TEST_DEBUG_TARGET_RANK ) { - HDfprintf(stdout, + HDfprintf(stdout, "%s%d: H5Sget_select_npoints(mem_large_ds_sid) = %d.\n", - fcnName, mpi_rank, + fcnName, mpi_rank, (int)H5Sget_select_npoints(mem_large_ds_sid)); - HDfprintf(stdout, + HDfprintf(stdout, "%s%d: H5Sget_select_npoints(file_large_ds_sid) = %d.\n", - fcnName, mpi_rank, + fcnName, mpi_rank, (int)H5Sget_select_npoints(file_large_ds_sid)); } #endif /* LOWER_DIM_SIZE_COMP_TEST__RUN_TEST__DEBUG */ @@ -2181,19 +2181,19 @@ lower_dim_size_comp_test__run_test(const int chunk_edge_size, start, stride, count, block); VRFY((ret != FAIL),"H5Sselect_hyperslab(file_large_ds_sid, and) succeeded"); -#if LOWER_DIM_SIZE_COMP_TEST__RUN_TEST__DEBUG - if ( mpi_rank == LOWER_DIM_SIZE_COMP_TEST_DEBUG_TARGET_RANK ) { +#if LOWER_DIM_SIZE_COMP_TEST__RUN_TEST__DEBUG + if ( mpi_rank == LOWER_DIM_SIZE_COMP_TEST_DEBUG_TARGET_RANK ) { rank = H5Sget_simple_extent_dims(mem_large_ds_sid, dims, max_dims); - HDfprintf(stdout, + HDfprintf(stdout, "%s:%d: mem_large_ds_sid dims[%d] = %d %d %d %d %d\n", - fcnName, mpi_rank, rank, (int)dims[0], (int)dims[1], + fcnName, mpi_rank, rank, (int)dims[0], (int)dims[1], (int)dims[2], (int)dims[3], (int)dims[4]); rank = H5Sget_simple_extent_dims(file_large_ds_sid, dims, max_dims); - HDfprintf(stdout, + HDfprintf(stdout, "%s:%d: file_large_ds_sid dims[%d] = %d %d %d %d %d\n", - fcnName, mpi_rank, rank, (int)dims[0], (int)dims[1], + fcnName, mpi_rank, rank, (int)dims[0], (int)dims[1], (int)dims[2], (int)dims[3], (int)dims[4]); } #endif /* LOWER_DIM_SIZE_COMP_TEST__RUN_TEST__DEBUG */ @@ -2206,26 +2206,26 @@ lower_dim_size_comp_test__run_test(const int chunk_edge_size, /* write the initial value of the large data set to file */ -#if LOWER_DIM_SIZE_COMP_TEST__RUN_TEST__DEBUG - if ( mpi_rank == LOWER_DIM_SIZE_COMP_TEST_DEBUG_TARGET_RANK ) { +#if LOWER_DIM_SIZE_COMP_TEST__RUN_TEST__DEBUG + if ( mpi_rank == LOWER_DIM_SIZE_COMP_TEST_DEBUG_TARGET_RANK ) { HDfprintf(stdout, "%s:%d: writing init value of large ds to file.\n", fcnName, mpi_rank); - HDfprintf(stdout, + HDfprintf(stdout, "%s:%d: large_dataset = %d.\n", - fcnName, mpi_rank, + fcnName, mpi_rank, (int)large_dataset); - HDfprintf(stdout, + HDfprintf(stdout, "%s:%d: mem_large_ds_sid = %d, file_large_ds_sid = %d.\n", - fcnName, mpi_rank, + fcnName, mpi_rank, (int)mem_large_ds_sid, (int)file_large_ds_sid); } #endif /* LOWER_DIM_SIZE_COMP_TEST__RUN_TEST__DEBUG */ - ret = H5Dwrite(large_dataset, - dset_type, - mem_large_ds_sid, + ret = H5Dwrite(large_dataset, + dset_type, + mem_large_ds_sid, file_large_ds_sid, - xfer_plist, + xfer_plist, large_ds_buf_0); if ( ret < 0 ) H5Eprint2(H5E_DEFAULT, stderr); @@ -2236,8 +2236,8 @@ lower_dim_size_comp_test__run_test(const int chunk_edge_size, mrc = MPI_Barrier(MPI_COMM_WORLD); VRFY((mrc==MPI_SUCCESS), "Sync after large dataset writes"); - /* read the large data set back to verify that it contains the - * expected data. Note that each process reads in the entire + /* read the large data set back to verify that it contains the + * expected data. Note that each process reads in the entire * data set. */ ret = H5Dread(large_dataset, @@ -2276,13 +2276,13 @@ lower_dim_size_comp_test__run_test(const int chunk_edge_size, /***********************************/ - /* read a checkerboard selection of the process slice of the - * small on disk data set into the process slice of the large + /* read a checkerboard selection of the process slice of the + * small on disk data set into the process slice of the large * in memory data set, and verify the data read. */ small_sel_start[0] = (hsize_t)(mpi_rank + 1); - small_sel_start[1] = small_sel_start[2] = + small_sel_start[1] = small_sel_start[2] = small_sel_start[3] = small_sel_start[4] = 0; lower_dim_size_comp_test__select_checker_board(mpi_rank, @@ -2294,9 +2294,9 @@ lower_dim_size_comp_test__run_test(const int chunk_edge_size, small_sel_start); expected_value = (uint32_t) - ((small_sel_start[0] * small_dims[1] * small_dims[2] * + ((small_sel_start[0] * small_dims[1] * small_dims[2] * small_dims[3] * small_dims[4]) + - (small_sel_start[1] * small_dims[2] * small_dims[3] * + (small_sel_start[1] * small_dims[2] * small_dims[3] * small_dims[4]) + (small_sel_start[2] * small_dims[3] * small_dims[4]) + (small_sel_start[3] * small_dims[4]) + @@ -2333,7 +2333,7 @@ lower_dim_size_comp_test__run_test(const int chunk_edge_size, VRFY((ret >= 0), "H5Sread() slice from small ds succeeded."); -#if LOWER_DIM_SIZE_COMP_TEST__RUN_TEST__DEBUG +#if LOWER_DIM_SIZE_COMP_TEST__RUN_TEST__DEBUG if ( mpi_rank == LOWER_DIM_SIZE_COMP_TEST_DEBUG_TARGET_RANK ) { HDfprintf(stdout, "%s:%d: H5Dread() returns.\n", fcnName, mpi_rank); } @@ -2343,9 +2343,9 @@ lower_dim_size_comp_test__run_test(const int chunk_edge_size, data_ok = TRUE; - start_index = (int)((large_sel_start[0] * large_dims[1] * large_dims[2] * + start_index = (int)((large_sel_start[0] * large_dims[1] * large_dims[2] * large_dims[3] * large_dims[4]) + - (large_sel_start[1] * large_dims[2] * large_dims[3] * + (large_sel_start[1] * large_dims[2] * large_dims[3] * large_dims[4]) + (large_sel_start[2] * large_dims[3] * large_dims[4]) + (large_sel_start[3] * large_dims[4]) + @@ -2407,13 +2407,13 @@ lower_dim_size_comp_test__run_test(const int chunk_edge_size, - /* read a checkerboard selection of a slice of the process slice of - * the large on disk data set into the process slice of the small + /* read a checkerboard selection of a slice of the process slice of + * the large on disk data set into the process slice of the small * in memory data set, and verify the data read. */ small_sel_start[0] = (hsize_t)(mpi_rank + 1); - small_sel_start[1] = small_sel_start[2] = + small_sel_start[1] = small_sel_start[2] = small_sel_start[3] = small_sel_start[4] = 0; lower_dim_size_comp_test__select_checker_board(mpi_rank, @@ -2454,7 +2454,7 @@ lower_dim_size_comp_test__run_test(const int chunk_edge_size, VRFY((ret >= 0), "H5Sread() slice from large ds succeeded."); -#if LOWER_DIM_SIZE_COMP_TEST__RUN_TEST__DEBUG +#if LOWER_DIM_SIZE_COMP_TEST__RUN_TEST__DEBUG if ( mpi_rank == LOWER_DIM_SIZE_COMP_TEST_DEBUG_TARGET_RANK ) { HDfprintf(stdout, "%s:%d: H5Dread() returns.\n", fcnName, mpi_rank); } @@ -2465,9 +2465,9 @@ lower_dim_size_comp_test__run_test(const int chunk_edge_size, data_ok = TRUE; expected_value = (uint32_t) - ((large_sel_start[0] * large_dims[1] * large_dims[2] * + ((large_sel_start[0] * large_dims[1] * large_dims[2] * large_dims[3] * large_dims[4]) + - (large_sel_start[1] * large_dims[2] * large_dims[3] * + (large_sel_start[1] * large_dims[2] * large_dims[3] * large_dims[4]) + (large_sel_start[2] * large_dims[3] * large_dims[4]) + (large_sel_start[3] * large_dims[4]) + @@ -2520,7 +2520,7 @@ lower_dim_size_comp_test__run_test(const int chunk_edge_size, #if LOWER_DIM_SIZE_COMP_TEST__VERIFY_DATA__DEBUG if ( mpi_rank == LOWER_DIM_SIZE_COMP_TEST_DEBUG_TARGET_RANK ) { - HDfprintf(stdout, "%s:%d: unexpected value at index %d: %d.\n", + HDfprintf(stdout, "%s:%d: unexpected value at index %d: %d.\n", fcnName, mpi_rank, (int)i, (int)(*ptr_1)); } #endif /* LOWER_DIM_SIZE_COMP_TEST__VERIFY_DATA__DEBUG */ @@ -2588,15 +2588,15 @@ lower_dim_size_comp_test__run_test(const int chunk_edge_size, /*------------------------------------------------------------------------- - * Function: lower_dim_size_comp_test() + * Function: lower_dim_size_comp_test() * - * Purpose: Test to see if an error in the computation of the size - * of the lower dimensions in H5S_obtain_datatype() has - * been corrected. + * Purpose: Test to see if an error in the computation of the size + * of the lower dimensions in H5S_obtain_datatype() has + * been corrected. * - * Return: void + * Return: void * - * Programmer: JRM -- 11/11/09 + * Programmer: JRM -- 11/11/09 * * Modifications: * @@ -2607,15 +2607,15 @@ void lower_dim_size_comp_test(void) { /* const char *fcnName = "lower_dim_size_comp_test()"; */ - int chunk_edge_size = 0; - int use_collective_io = 1; - hid_t dset_type = H5T_NATIVE_UINT; + int chunk_edge_size = 0; + int use_collective_io = 1; + hid_t dset_type = H5T_NATIVE_UINT; #if 0 HDsleep(60); #endif HDcompile_assert(sizeof(uint32_t) == sizeof(unsigned)); - for ( use_collective_io = (hbool_t)0; - (int)use_collective_io <= 1; + for ( use_collective_io = (hbool_t)0; + (int)use_collective_io <= 1; (hbool_t)(use_collective_io++) ) { chunk_edge_size = 0; @@ -2636,37 +2636,37 @@ lower_dim_size_comp_test(void) /*------------------------------------------------------------------------- - * Function: link_chunk_collective_io_test() + * Function: link_chunk_collective_io_test() * - * Purpose: Test to verify that an error in MPI type management in - * H5D_link_chunk_collective_io() has been corrected. - * In this bug, we used to free MPI types regardless of - * whether they were basic or derived. + * Purpose: Test to verify that an error in MPI type management in + * H5D_link_chunk_collective_io() has been corrected. + * In this bug, we used to free MPI types regardless of + * whether they were basic or derived. * - * This test is based on a bug report kindly provided by - * Rob Latham of the MPICH team and ANL. + * This test is based on a bug report kindly provided by + * Rob Latham of the MPICH team and ANL. * - * The basic thrust of the test is to cause a process - * to participate in a collective I/O in which it: + * The basic thrust of the test is to cause a process + * to participate in a collective I/O in which it: * - * 1) Reads or writes exactly one chunk, + * 1) Reads or writes exactly one chunk, * - * 2) Has no in memory buffer for any other chunk. + * 2) Has no in memory buffer for any other chunk. * - * The test differers from Rob Latham's bug report in - * that is runs with an arbitrary number of proceeses, - * and uses a 1 dimensional dataset. + * The test differers from Rob Latham's bug report in + * that is runs with an arbitrary number of proceeses, + * and uses a 1 dimensional dataset. * - * Return: void + * Return: void * - * Programmer: JRM -- 12/16/09 + * Programmer: JRM -- 12/16/09 * * Modifications: * *------------------------------------------------------------------------- */ -#define LINK_CHUNK_COLLECTIVE_IO_TEST_CHUNK_SIZE 16 +#define LINK_CHUNK_COLLECTIVE_IO_TEST_CHUNK_SIZE 16 void link_chunk_collective_io_test(void) @@ -2674,8 +2674,8 @@ link_chunk_collective_io_test(void) /* const char *fcnName = "link_chunk_collective_io_test()"; */ const char *filename; hbool_t mis_match = FALSE; - int i; - int mrc; + int i; + int mrc; int mpi_rank; int mpi_size; MPI_Comm mpi_comm = MPI_COMM_WORLD; @@ -2765,8 +2765,8 @@ link_chunk_collective_io_test(void) for ( i = 0; i < LINK_CHUNK_COLLECTIVE_IO_TEST_CHUNK_SIZE; i++ ) { local_data_written[i] = expected_value; - local_data_read[i] = 0.0; - expected_value += 1.0; + local_data_read[i] = 0.0; + expected_value += 1.0; } /* select the file and mem spaces */ @@ -2792,15 +2792,15 @@ link_chunk_collective_io_test(void) VRFY((ret >= 0), "H5Pset_dxpl_mpio succeeded"); /* write the data set */ - ret = H5Dwrite(dset_id, - H5T_NATIVE_DOUBLE, - write_mem_ds_sid, + ret = H5Dwrite(dset_id, + H5T_NATIVE_DOUBLE, + write_mem_ds_sid, file_ds_sid, - xfer_plist, + xfer_plist, local_data_written); VRFY((ret >= 0), "H5Dwrite() dataset initial write succeeded"); - + /* sync with the other processes before checking data */ mrc = MPI_Barrier(MPI_COMM_WORLD); VRFY((mrc==MPI_SUCCESS), "Sync after dataset write"); @@ -2828,7 +2828,7 @@ link_chunk_collective_io_test(void) if ( diff >= 0.001 ) { mis_match = TRUE; - } + } } VRFY( (mis_match == FALSE), "dataset data good."); diff --git a/tools/src/h5dump/h5dump.c b/tools/src/h5dump/h5dump.c index 787f1bb..25e4858 100644 --- a/tools/src/h5dump/h5dump.c +++ b/tools/src/h5dump/h5dump.c @@ -191,7 +191,7 @@ static struct long_options l_opts[] = { { NULL, 0, '\0' } }; - + /*------------------------------------------------------------------------- * Function: leave * @@ -214,7 +214,7 @@ leave(int ret) HDexit(ret); } - + /*------------------------------------------------------------------------- * Function: usage * @@ -366,7 +366,7 @@ usage(const char *prog) PRINTVALSTREAM(rawoutstream, "\n"); } - + /*------------------------------------------------------------------------- * Function: table_list_add * @@ -419,7 +419,7 @@ table_list_add(hid_t oid, unsigned long file_no) return((ssize_t) idx); } /* end table_list_add() */ - + /*------------------------------------------------------------------------- * Function: table_list_visited * @@ -449,7 +449,7 @@ table_list_visited(unsigned long file_no) return(-1); } /* end table_list_visited() */ - + /*------------------------------------------------------------------------- * Function: table_list_free * @@ -817,7 +817,7 @@ parse_mask_list(const char *h_list) } } - + /*------------------------------------------------------------------------- * Function: free_handler * @@ -865,7 +865,7 @@ free_handler(struct handler_t *hand, int len) } } - + /*------------------------------------------------------------------------- * Function: parse_command_line * @@ -1309,7 +1309,7 @@ error: return hand; } - + /*------------------------------------------------------------------------- * Function: main * @@ -1767,7 +1767,7 @@ h5_fileaccess(void) return fapl; } - + /*------------------------------------------------------------------------- * Function: init_prefix * @@ -1788,7 +1788,7 @@ init_prefix(char **prfx, size_t prfx_len) error_msg("unable to allocate prefix buffer\n"); } - + /*------------------------------------------------------------------------- * Function: add_prefix * diff --git a/tools/src/h5repack/h5repack.c b/tools/src/h5repack/h5repack.c index c98575c..e7f4aae 100644 --- a/tools/src/h5repack/h5repack.c +++ b/tools/src/h5repack/h5repack.c @@ -75,6 +75,8 @@ h5repack_init(pack_opt_t *options, int verbose, hbool_t latest) options->verbose = verbose; options->latest = latest; options->layout_g = H5D_LAYOUT_ERROR; + options->low_bound = H5F_LIBVER_EARLIEST; + options->high_bound = H5F_LIBVER_LATEST; for (n = 0; n < H5_REPACK_MAX_NFILTERS; n++) { options->filter_g[n].filtn = -1; diff --git a/tools/src/h5repack/h5repack.h b/tools/src/h5repack/h5repack.h index 0252768..a0e0387 100644 --- a/tools/src/h5repack/h5repack.h +++ b/tools/src/h5repack/h5repack.h @@ -101,21 +101,23 @@ typedef struct { /* all the above, ready to go to the hrepack call */ typedef struct { - pack_opttbl_t *op_tbl; /*table with all -c and -f options */ - int all_layout; /*apply the layout to all objects */ - int all_filter; /*apply the filter to all objects */ + pack_opttbl_t *op_tbl; /*table with all -c and -f options */ + int all_layout; /*apply the layout to all objects */ + int all_filter; /*apply the filter to all objects */ filter_info_t filter_g[H5_REPACK_MAX_NFILTERS]; /*global filter array for the ALL case */ - int n_filter_g; /*number of global filters */ - chunk_info_t chunk_g; /*global chunk INFO for the ALL case */ - H5D_layout_t layout_g; /*global layout information for the ALL case */ - int verbose; /*verbose mode */ - hsize_t min_comp; /*minimum size to compress, in bytes */ - int use_native; /*use a native type in write */ - hbool_t latest; /*pack file with the latest file format */ - int grp_compact; /* Set the maximum number of links to store as header messages in the group */ - int grp_indexed; /* Set the minimum number of links to store in the indexed format */ - int msg_size[8]; /* Minimum size of shared messages: dataspace, - datatype, fill value, filter pipleline, attribute */ + int n_filter_g; /*number of global filters */ + chunk_info_t chunk_g; /*global chunk INFO for the ALL case */ + H5D_layout_t layout_g; /*global layout information for the ALL case */ + int verbose; /*verbose mode */ + hsize_t min_comp; /*minimum size to compress, in bytes */ + int use_native; /*use a native type in write */ + hbool_t latest; /*pack file with the latest file format */ + H5F_libver_t low_bound; /* The file's low bound as in H5Fset_libver_bounds() */ + H5F_libver_t high_bound; /* The file's high bound as in H5Fset_libver_bounds() */ + int grp_compact; /* Set the maximum number of links to store as header messages in the group */ + int grp_indexed; /* Set the minimum number of links to store in the indexed format */ + int msg_size[8]; /* Minimum size of shared messages: dataspace, + datatype, fill value, filter pipleline, attribute */ const char *ublock_filename; /* user block file name */ hsize_t ublock_size; /* user block size */ hsize_t meta_block_size; /* metadata aggregation block size (for H5Pset_meta_block_size) */ diff --git a/tools/src/h5repack/h5repack_copy.c b/tools/src/h5repack/h5repack_copy.c index e205fba..b279cf9 100644 --- a/tools/src/h5repack/h5repack_copy.c +++ b/tools/src/h5repack/h5repack_copy.c @@ -142,8 +142,18 @@ int copy_objects(const char* fnamein, const char* fnameout, pack_opt_t *options) HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Pclose failed to close property list"); } + if(options->latest) + options->low_bound = options->high_bound = H5F_LIBVER_LATEST; + /* Create file access property list */ + if((fapl = H5Pcreate(H5P_FILE_ACCESS)) < 0) + HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Pcreate failed to create file access property list"); + + /* It can be default, latest or other settings by users */ + if(H5Pset_libver_bounds(fapl, options->low_bound, options->high_bound) < 0) + HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Pset_libver_bounds failed to set format version bounds"); + /* Check if we need to create a non-default file creation property list */ - if (options->latest || ub_size > 0) { + if (options->low_bound >= H5F_LIBVER_V18 || ub_size > 0) { /* Create file creation property list */ if ((fcpl = H5Pcreate(H5P_FILE_CREATE)) < 0) HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Pcreate failed to create a file creation property list"); @@ -152,7 +162,7 @@ int copy_objects(const char* fnamein, const char* fnameout, pack_opt_t *options) if (H5Pset_userblock(fcpl, ub_size) < 0) HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Pset_userblock failed to set non-default userblock size"); - if (options->latest) { + if (options->low_bound >= H5F_LIBVER_V18) { unsigned i = 0, nindex = 0, mesg_type_flags[5], min_mesg_sizes[5]; /* Adjust group creation parameters for root group */ @@ -203,12 +213,6 @@ int copy_objects(const char* fnamein, const char* fnameout, pack_opt_t *options) HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Pset_shared_mesg_index failed to configure the specified shared object header message index"); } /* if (nindex>0) */ - /* Create file access property list */ - if ((fapl = H5Pcreate(H5P_FILE_ACCESS)) < 0) - HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Pcreate failed to create file access property list"); - - if (H5Pset_libver_bounds(fapl, H5F_LIBVER_LATEST, H5F_LIBVER_LATEST) < 0) - HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Pset_libver_bounds failed to set property for using latest version of the format"); } /* end if */ } /* end if */ #if defined (H5REPACK_DEBUG_USER_BLOCK) diff --git a/tools/src/h5repack/h5repack_main.c b/tools/src/h5repack/h5repack_main.c index 1587da4..8f0178f 100644 --- a/tools/src/h5repack/h5repack_main.c +++ b/tools/src/h5repack/h5repack_main.c @@ -31,7 +31,7 @@ const char *outfile = NULL; * Command-line options: The user can specify short or long-named * parameters. */ -static const char *s_opts = "hVvf:l:m:e:nLc:d:s:u:b:M:t:a:i:o:S:P:T:G:q:z:E"; +static const char *s_opts = "hVvf:l:m:e:nLj:k:c:d:s:u:b:M:t:a:i:o:S:P:T:G:q:z:E"; static struct long_options l_opts[] = { { "help", no_arg, 'h' }, { "version", no_arg, 'V' }, @@ -42,6 +42,8 @@ static struct long_options l_opts[] = { { "file", require_arg, 'e' }, { "native", no_arg, 'n' }, { "latest", no_arg, 'L' }, + { "low", require_arg, 'j' }, + { "high", require_arg, 'k' }, { "compact", require_arg, 'c' }, { "indexed", require_arg, 'd' }, { "ssize", require_arg, 's' }, @@ -81,7 +83,13 @@ static void usage(const char *prog) { PRINTVALSTREAM(rawoutstream, " -v, --verbose Verbose mode, print object information\n"); PRINTVALSTREAM(rawoutstream, " -V, --version Print version number and exit\n"); PRINTVALSTREAM(rawoutstream, " -n, --native Use a native HDF5 type when repacking\n"); + PRINTVALSTREAM(rawoutstream, " --enable-error-stack Prints messages from the HDF5 error stack as they occur\n"); PRINTVALSTREAM(rawoutstream, " -L, --latest Use latest version of file format\n"); + PRINTVALSTREAM(rawoutstream, " This option will take precedence over the -j and -k options\n"); + PRINTVALSTREAM(rawoutstream, " --low=BOUND The low bound for library release versions to use when creating\n"); + PRINTVALSTREAM(rawoutstream, " objects in the file (default is H5F_LIBVER_EARLIEST)\n"); + PRINTVALSTREAM(rawoutstream, " --high=BOUND The high bound for library release versions to use when creating\n"); + PRINTVALSTREAM(rawoutstream, " objects in the file (default is H5F_LIBVER_LATEST)\n"); PRINTVALSTREAM(rawoutstream, " -c L1, --compact=L1 Maximum number of links in header messages\n"); PRINTVALSTREAM(rawoutstream, " -d L2, --indexed=L2 Minimum number of links in the indexed format\n"); PRINTVALSTREAM(rawoutstream, " -s S[:F], --ssize=S[:F] Shared object header message minimum size\n"); @@ -114,8 +122,12 @@ static void usage(const char *prog) { PRINTVALSTREAM(rawoutstream, " F - is the shared object header message type, any of . If F is not specified, S applies to all messages\n"); PRINTVALSTREAM(rawoutstream, "\n"); - PRINTVALSTREAM(rawoutstream, " --enable-error-stack Prints messages from the HDF5 error stack as they\n"); - PRINTVALSTREAM(rawoutstream, " occur.\n"); + PRINTVALSTREAM(rawoutstream, " BOUND is an integer indicating the library release versions to use when creating\n"); + PRINTVALSTREAM(rawoutstream, " objects in the file (see H5Pset_libver_bounds()):\n"); + PRINTVALSTREAM(rawoutstream, " 0: This is H5F_LIBVER_EARLIEST in H5F_libver_t struct\n"); + PRINTVALSTREAM(rawoutstream, " 1: This is H5F_LIBVER_V18 in H5F_libver_t struct\n"); + PRINTVALSTREAM(rawoutstream, " 2: This is H5F_LIBVER_V110 in H5F_libver_t struct\n"); + PRINTVALSTREAM(rawoutstream, " (H5F_LIBVER_LATEST is aliased to H5F_LIBVER_V110 for this release\n"); PRINTVALSTREAM(rawoutstream, "\n"); PRINTVALSTREAM(rawoutstream, " FS_STRATEGY is a string indicating the file space strategy used:\n"); PRINTVALSTREAM(rawoutstream, " FSM_AGGR:\n"); @@ -205,6 +217,11 @@ static void usage(const char *prog) { PRINTVALSTREAM(rawoutstream, " Using latest file format with maximum compact group size of 10 and\n"); PRINTVALSTREAM(rawoutstream, " and minimum shared datatype size of 20\n"); PRINTVALSTREAM(rawoutstream, "\n"); + PRINTVALSTREAM(rawoutstream, "5) h5repack --low=0 --high=1 file1 file2\n"); + PRINTVALSTREAM(rawoutstream, "\n"); + PRINTVALSTREAM(rawoutstream, " Set low=H5F_LIBVER_EARLIEST and high=H5F_LIBVER_V18 via H5Pset_libver_bounds() when\n"); + PRINTVALSTREAM(rawoutstream, " creating the repacked file: file2\n"); + PRINTVALSTREAM(rawoutstream, "\n"); PRINTVALSTREAM(rawoutstream, "5) h5repack -f SHUF -f GZIP=1 file1 file2\n"); PRINTVALSTREAM(rawoutstream, "\n"); PRINTVALSTREAM(rawoutstream, " Add both filters SHUF and GZIP in this order to all datasets\n"); @@ -500,6 +517,22 @@ int parse_command_line(int argc, const char **argv, pack_opt_t* options) options->latest = TRUE; break; + case 'j': + options->low_bound = (H5F_libver_t)HDatoi(opt_arg); + if(options->low_bound < H5F_LIBVER_EARLIEST || options->low_bound > H5F_LIBVER_LATEST) { + error_msg("in parsing low bound\n"); + goto done; + } + break; + + case 'k': + options->high_bound = (H5F_libver_t)HDatoi(opt_arg); + if(options->high_bound < H5F_LIBVER_EARLIEST || options->high_bound > H5F_LIBVER_LATEST) { + error_msg("in parsing high bound\n"); + goto done; + } + break; + case 'c': options->grp_compact = HDatoi( opt_arg ); if (options->grp_compact > 0) diff --git a/tools/test/h5repack/testfiles/h5repack-help.txt b/tools/test/h5repack/testfiles/h5repack-help.txt index 1ff5b73..0eef0f5 100644 --- a/tools/test/h5repack/testfiles/h5repack-help.txt +++ b/tools/test/h5repack/testfiles/h5repack-help.txt @@ -6,7 +6,13 @@ usage: h5repack [OPTIONS] file1 file2 -v, --verbose Verbose mode, print object information -V, --version Print version number and exit -n, --native Use a native HDF5 type when repacking + --enable-error-stack Prints messages from the HDF5 error stack as they occur -L, --latest Use latest version of file format + This option will take precedence over the -j and -k options + --low=BOUND The low bound for library release versions to use when creating + objects in the file (default is H5F_LIBVER_EARLIEST) + --high=BOUND The high bound for library release versions to use when creating + objects in the file (default is H5F_LIBVER_LATEST) -c L1, --compact=L1 Maximum number of links in header messages -d L2, --indexed=L2 Minimum number of links in the indexed format -s S[:F], --ssize=S[:F] Shared object header message minimum size @@ -39,8 +45,12 @@ usage: h5repack [OPTIONS] file1 file2 F - is the shared object header message type, any of . If F is not specified, S applies to all messages - --enable-error-stack Prints messages from the HDF5 error stack as they - occur. + BOUND is an integer indicating the library release versions to use when creating + objects in the file (see H5Pset_libver_bounds()): + 0: This is H5F_LIBVER_EARLIEST in H5F_libver_t struct + 1: This is H5F_LIBVER_V18 in H5F_libver_t struct + 2: This is H5F_LIBVER_V110 in H5F_libver_t struct + (H5F_LIBVER_LATEST is aliased to H5F_LIBVER_V110 for this release FS_STRATEGY is a string indicating the file space strategy used: FSM_AGGR: @@ -130,6 +140,11 @@ Examples of use: Using latest file format with maximum compact group size of 10 and and minimum shared datatype size of 20 +5) h5repack --low=0 --high=1 file1 file2 + + Set low=H5F_LIBVER_EARLIEST and high=H5F_LIBVER_V18 via H5Pset_libver_bounds() when + creating the repacked file: file2 + 5) h5repack -f SHUF -f GZIP=1 file1 file2 Add both filters SHUF and GZIP in this order to all datasets -- cgit v0.12 From 6b99b7b02edfbeba9c12f608839c91ba0a0d87b0 Mon Sep 17 00:00:00 2001 From: Vailin Choi Date: Fri, 9 Mar 2018 16:11:07 -0600 Subject: Resolve compilation errors. --- src/H5Ffake.c | 11 ++++++++++- src/H5Fprivate.h | 2 +- src/H5Olayout.c | 22 ++++++++++++++-------- src/H5P.c | 9 ++++++--- src/H5Shyper.c | 2 +- testpar/t_cache_image.c | 4 ---- 6 files changed, 32 insertions(+), 18 deletions(-) diff --git a/src/H5Ffake.c b/src/H5Ffake.c index 6072f2e..6720dd2 100644 --- a/src/H5Ffake.c +++ b/src/H5Ffake.c @@ -40,9 +40,10 @@ *------------------------------------------------------------------------- */ H5F_t * -H5F_fake_alloc(uint8_t sizeof_size) +H5F_fake_alloc(uint8_t sizeof_size, hid_t fapl_id) { H5F_t *f = NULL; /* Pointer to fake file struct */ + H5P_genplist_t *plist; /* Property list */ H5F_t *ret_value = NULL; /* Return value */ FUNC_ENTER_NOAPI(NULL) @@ -59,6 +60,14 @@ H5F_fake_alloc(uint8_t sizeof_size) else f->shared->sizeof_size = sizeof_size; + /* Set low/high bounds according to the setting in fapl_id */ + /* See H5F_new() in H5Fint.c */ + if(NULL == (plist = (H5P_genplist_t *)H5I_object(fapl_id))) + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "not file access property list") + + f->shared->low_bound = H5F_LOW_BOUND(f); + f->shared->high_bound = H5F_HIGH_BOUND(f); + /* Set return value */ ret_value = f; diff --git a/src/H5Fprivate.h b/src/H5Fprivate.h index 856e618..dadbbac 100644 --- a/src/H5Fprivate.h +++ b/src/H5Fprivate.h @@ -827,7 +827,7 @@ H5_DLL void H5F_addr_decode_len(size_t addr_len, const uint8_t **pp, haddr_t *ad H5_DLL void H5F_sfile_assert_num(unsigned n); /* Routines for creating & destroying "fake" file structures */ -H5_DLL H5F_t *H5F_fake_alloc(uint8_t sizeof_size); +H5_DLL H5F_t *H5F_fake_alloc(uint8_t sizeof_size, hid_t fapl_id); H5_DLL herr_t H5F_fake_free(H5F_t *f); /* Superblock related routines */ diff --git a/src/H5Olayout.c b/src/H5Olayout.c index 1a21926..0994ef8 100644 --- a/src/H5Olayout.c +++ b/src/H5Olayout.c @@ -39,7 +39,7 @@ /* PRIVATE PROTOTYPES */ static void *H5O__layout_decode(H5F_t *f, hid_t dxpl_id, H5O_t *open_oh, - unsigned mesg_flags, unsigned *ioflags, const uint8_t *p); + unsigned mesg_flags, unsigned *ioflags, size_t p_size, const uint8_t *p); static herr_t H5O__layout_encode(H5F_t *f, hbool_t disable_shared, uint8_t *p, const void *_mesg); static void *H5O__layout_copy(const void *_mesg, void *_dest); static size_t H5O__layout_size(const H5F_t *f, hbool_t disable_shared, const void *_mesg); @@ -99,7 +99,8 @@ H5FL_DEFINE(H5O_layout_t); */ static void * H5O__layout_decode(H5F_t *f, hid_t H5_ATTR_UNUSED dxpl_id, H5O_t H5_ATTR_UNUSED *open_oh, - unsigned H5_ATTR_UNUSED mesg_flags, unsigned H5_ATTR_UNUSED *ioflags, const uint8_t *p) + unsigned H5_ATTR_UNUSED mesg_flags, unsigned H5_ATTR_UNUSED *ioflags, + size_t H5_ATTR_UNUSED p_size, const uint8_t *p) { H5O_layout_t *mesg = NULL; uint8_t *heap_block = NULL; @@ -549,11 +550,11 @@ done: static herr_t H5O__layout_encode(H5F_t *f, hbool_t H5_ATTR_UNUSED disable_shared, uint8_t *p, const void *_mesg) { - const H5O_layout_t *mesg = (const H5O_layout_t *) _mesg; - uint8_t *heap_block = NULL; + const H5O_layout_t *mesg = (const H5O_layout_t *) _mesg; + uint8_t *heap_block = NULL; size_t *str_size = NULL; - unsigned u; - unsigned saved_latest_flags = H5F_GET_LATEST_FLAGS(f); + unsigned u; + H5F_libver_t saved_low, saved_high; herr_t ret_value = SUCCEED; /* Return value */ FUNC_ENTER_STATIC @@ -570,6 +571,9 @@ H5O__layout_encode(H5F_t *f, hbool_t H5_ATTR_UNUSED disable_shared, uint8_t *p, /* Layout class */ *p++ = mesg->type; + saved_low = H5F_LOW_BOUND(f); + saved_high = H5F_HIGH_BOUND(f); + /* Write out layout class specific information */ switch(mesg->type) { case H5D_COMPACT: @@ -691,7 +695,8 @@ H5O__layout_encode(H5F_t *f, hbool_t H5_ATTR_UNUSED disable_shared, uint8_t *p, uint32_t chksum; size_t i; - H5F_SET_LATEST_FLAGS(f, H5F_LATEST_ALL_FLAGS); + if(H5F_set_libver_bounds(f, H5F_LIBVER_V110, H5F_LIBVER_V110) < 0) + HGOTO_ERROR(H5E_OHDR, H5E_CANTSET, FAIL, "cannot set low/high bounds") /* Allocate array for caching results of strlen */ if(NULL == (str_size = (size_t *)H5MM_malloc(2 * mesg->storage.u.virt.list_nused *sizeof(size_t)))) @@ -789,7 +794,8 @@ H5O__layout_encode(H5F_t *f, hbool_t H5_ATTR_UNUSED disable_shared, uint8_t *p, } /* end switch */ done: - H5F_SET_LATEST_FLAGS(f, saved_latest_flags); + if(H5F_set_libver_bounds(f, saved_low, saved_high) < 0) + HDONE_ERROR(H5E_OHDR, H5E_CANTSET, FAIL, "cannot reset low/high bounds") heap_block = (uint8_t *)H5MM_xfree(heap_block); str_size = (size_t *)H5MM_xfree(str_size); diff --git a/src/H5P.c b/src/H5P.c index 25608aa..4dcd305 100644 --- a/src/H5P.c +++ b/src/H5P.c @@ -842,7 +842,8 @@ H5Pencode(hid_t plist_id, void *buf, size_t *nalloc) H5P_genplist_t *plist; /* Property list to query */ H5P_genplist_t *fapl_plist; hid_t new_fapl_id; - hbool_t latest_format = TRUE; + H5F_libver_t low_bound = H5F_LIBVER_V110; + H5F_libver_t high_bound = H5F_LIBVER_V110; herr_t ret_value = SUCCEED; /* return value */ FUNC_ENTER_API(FAIL) @@ -860,8 +861,10 @@ H5Pencode(hid_t plist_id, void *buf, size_t *nalloc) /* Set latest format in fapl_plist */ /* This will eventually be used by VDS to encode datasets via H5P__dcrt_layout_enc() */ - if(H5P_set(fapl_plist, H5F_ACS_LATEST_FORMAT_NAME, &latest_format) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "can't set 'latest format' flag") + if(H5P_set(fapl_plist, H5F_ACS_LIBVER_LOW_BOUND_NAME, &low_bound) < 0) + HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "can't set 'low' bound for library format versions") + if(H5P_set(fapl_plist, H5F_ACS_LIBVER_HIGH_BOUND_NAME, &high_bound) < 0) + HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "can't set 'high' bound for library format versions") /* Call the internal encode routine */ if((ret_value = H5P__encode(plist, TRUE, buf, nalloc, new_fapl_id)) < 0) diff --git a/src/H5Shyper.c b/src/H5Shyper.c index 71bfa51..6f778fe 100644 --- a/src/H5Shyper.c +++ b/src/H5Shyper.c @@ -2039,7 +2039,7 @@ H5S_hyper_set_version(const H5S_t *space, hsize_t block_count, hsize_t bounds_en } if(H5S_hyper_is_regular(space)) { - if((H5F_USE_LATEST_FLAGS(f, H5F_LATEST_DATASPACE_SELECTION) && block_count > 4) || + if(((H5F_LOW_BOUND(f) >= H5F_LIBVER_V110) && block_count > 4) || count_up_version || bound_up_version) *version = H5S_HYPER_VERSION_2; } else { /* Fail for irregular hyperslab if exceeds 32 bits */ diff --git a/testpar/t_cache_image.c b/testpar/t_cache_image.c index fc88c61..5b512d6 100644 --- a/testpar/t_cache_image.c +++ b/testpar/t_cache_image.c @@ -1915,10 +1915,6 @@ par_delete_dataset(int dset_num, * * None. * - *-------------------------------------- - return; - -} /* par_insert_cache_image() */ *------------------------------------------------------------------------- */ -- cgit v0.12 From 83de2a580b1b6a67e604ae8336eb078741b4d7db Mon Sep 17 00:00:00 2001 From: Vailin Choi Date: Sun, 11 Mar 2018 23:12:30 -0500 Subject: Re-factor coding for H5P/Sencode with libver bounds. --- src/H5Ffake.c | 8 ++++++-- src/H5P.c | 15 +-------------- src/H5Pdcpl.c | 28 ++++++++++++++++++++++++---- src/H5Shyper.c | 52 +++++++++++++++++++++++++++++++++++----------------- src/H5Spkg.h | 3 ++- 5 files changed, 68 insertions(+), 38 deletions(-) diff --git a/src/H5Ffake.c b/src/H5Ffake.c index 6720dd2..d199cf0 100644 --- a/src/H5Ffake.c +++ b/src/H5Ffake.c @@ -18,6 +18,8 @@ #include "H5private.h" /* Generic Functions */ #include "H5Eprivate.h" /* Error handling */ #include "H5Fpkg.h" /* File access */ +#include "H5Iprivate.h" /* IDs */ +#include "H5Pprivate.h" /* Property lists */ /* PRIVATE PROTOTYPES */ @@ -65,8 +67,10 @@ H5F_fake_alloc(uint8_t sizeof_size, hid_t fapl_id) if(NULL == (plist = (H5P_genplist_t *)H5I_object(fapl_id))) HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "not file access property list") - f->shared->low_bound = H5F_LOW_BOUND(f); - f->shared->high_bound = H5F_HIGH_BOUND(f); + if(H5P_get(plist, H5F_ACS_LIBVER_LOW_BOUND_NAME, &(f->shared->low_bound)) < 0) + HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, NULL, "can't get 'low' bound for library format versions") + if(H5P_get(plist, H5F_ACS_LIBVER_HIGH_BOUND_NAME, &(f->shared->high_bound)) < 0) + HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, NULL, "can't get 'high' bound for library format versions") /* Set return value */ ret_value = f; diff --git a/src/H5P.c b/src/H5P.c index 4dcd305..fe9a70a 100644 --- a/src/H5P.c +++ b/src/H5P.c @@ -853,21 +853,8 @@ H5Pencode(hid_t plist_id, void *buf, size_t *nalloc) if(NULL == (plist = (H5P_genplist_t *)H5I_object_verify(plist_id, H5I_GENPROP_LST))) HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a property list"); - /* Make a copy of the default file access property list */ - if(NULL == (fapl_plist = (H5P_genplist_t *)H5I_object(H5P_LST_FILE_ACCESS_ID_g))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a property list") - if((new_fapl_id = H5P_copy_plist(fapl_plist, FALSE)) < 0) - HGOTO_ERROR(H5E_INTERNAL, H5E_CANTINIT, FAIL, "can't copy file access property list") - - /* Set latest format in fapl_plist */ - /* This will eventually be used by VDS to encode datasets via H5P__dcrt_layout_enc() */ - if(H5P_set(fapl_plist, H5F_ACS_LIBVER_LOW_BOUND_NAME, &low_bound) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "can't set 'low' bound for library format versions") - if(H5P_set(fapl_plist, H5F_ACS_LIBVER_HIGH_BOUND_NAME, &high_bound) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "can't set 'high' bound for library format versions") - /* Call the internal encode routine */ - if((ret_value = H5P__encode(plist, TRUE, buf, nalloc, new_fapl_id)) < 0) + if((ret_value = H5P__encode(plist, TRUE, buf, nalloc, H5P_FILE_ACCESS_DEFAULT)) < 0) HGOTO_ERROR(H5E_PLIST, H5E_CANTENCODE, FAIL, "unable to encode property list"); done: diff --git a/src/H5Pdcpl.c b/src/H5Pdcpl.c index 19ec00f..76a2658 100644 --- a/src/H5Pdcpl.c +++ b/src/H5Pdcpl.c @@ -374,14 +374,33 @@ H5P__dcrt_layout_enc(const void *value, void **_pp, size_t *size, void *_udata) uint8_t *tmp_p; size_t tmp_size; size_t u; /* Local index variable */ + H5P_genplist_t *fapl_plist; /* The file access property list */ + hid_t new_fapl_id; /* The file access property list ID */ + H5F_libver_t low_bound = H5F_LIBVER_V110; /* Set the low bound in fapl to latest */ + H5F_libver_t high_bound = H5F_LIBVER_V110; /* Set the high bound in fapl to latest */ herr_t ret_value = SUCCEED; /* Return value */ + FUNC_ENTER_STATIC /* Sanity check */ HDassert(layout); HDassert(size); + /* Make a copy of the default file access property list */ + if(NULL == (fapl_plist = (H5P_genplist_t *)H5I_object(H5P_LST_FILE_ACCESS_ID_g))) + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a property list") + + /* Set latest format in fapl_plist */ + /* This will eventually be used by VDS to encode datasets via H5S_encode() */ + if(H5P_set(fapl_plist, H5F_ACS_LIBVER_LOW_BOUND_NAME, &low_bound) < 0) + HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "can't set 'low' bound for library format versions") + if(H5P_set(fapl_plist, H5F_ACS_LIBVER_HIGH_BOUND_NAME, &high_bound) < 0) + HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "can't set 'high' bound for library format versions") + + if((new_fapl_id = H5P_copy_plist(fapl_plist, FALSE)) < 0) + HGOTO_ERROR(H5E_INTERNAL, H5E_CANTINIT, FAIL, "can't copy file access property list") + if(NULL != *pp) { /* Encode layout type */ *(*pp)++ = (uint8_t)layout->type; @@ -427,14 +446,15 @@ H5P__dcrt_layout_enc(const void *value, void **_pp, size_t *size, void *_udata) * list before we get here. */ tmp_size = (size_t)-1; tmp_p = *pp; - if(H5S_encode(layout->storage.u.virt.list[u].source_select, pp, &tmp_size, udata->fapl_id) < 0) + + if(H5S_encode(layout->storage.u.virt.list[u].source_select, pp, &tmp_size, new_fapl_id) < 0) HGOTO_ERROR(H5E_PLIST, H5E_CANTENCODE, FAIL, "unable to serialize source selection") *size += (size_t)(*pp - tmp_p); /* Virtual dataset selection. Same notes as above apply. */ tmp_size = (size_t)-1; tmp_p = *pp; - if(H5S_encode(layout->storage.u.virt.list[u].source_dset.virtual_select, pp, &tmp_size, udata->fapl_id) < 0) + if(H5S_encode(layout->storage.u.virt.list[u].source_dset.virtual_select, pp, &tmp_size, new_fapl_id) < 0) HGOTO_ERROR(H5E_PLIST, H5E_CANTENCODE, FAIL, "unable to serialize virtual selection") *size += (size_t)(*pp - tmp_p); } /* end for */ @@ -467,14 +487,14 @@ H5P__dcrt_layout_enc(const void *value, void **_pp, size_t *size, void *_udata) /* Source selection */ tmp_size = (size_t)0; tmp_p = NULL; - if(H5S_encode(layout->storage.u.virt.list[u].source_select, &tmp_p, &tmp_size, udata->fapl_id) < 0) + if(H5S_encode(layout->storage.u.virt.list[u].source_select, &tmp_p, &tmp_size, new_fapl_id) < 0) HGOTO_ERROR(H5E_PLIST, H5E_CANTENCODE, FAIL, "unable to serialize source selection") *size += tmp_size; /* Virtual dataset selection */ tmp_size = (size_t)0; tmp_p = NULL; - if(H5S_encode(layout->storage.u.virt.list[u].source_dset.virtual_select, &tmp_p, &tmp_size, udata->fapl_id) < 0) + if(H5S_encode(layout->storage.u.virt.list[u].source_dset.virtual_select, &tmp_p, &tmp_size, new_fapl_id) < 0) HGOTO_ERROR(H5E_PLIST, H5E_CANTENCODE, FAIL, "unable to serialize virtual selection") *size += tmp_size; } /* end for */ diff --git a/src/H5Shyper.c b/src/H5Shyper.c index 6f778fe..94b600d 100644 --- a/src/H5Shyper.c +++ b/src/H5Shyper.c @@ -28,6 +28,13 @@ #include "H5Spkg.h" /* Dataspace functions */ #include "H5VMprivate.h" /* Vector functions */ +/* Format version bounds for dataspace hyperslab selection */ +const unsigned H5O_sds_hyper_ver_bounds[] = { + H5S_HYPER_VERSION_1, /* H5F_LIBVER_EARLIEST */ + H5S_HYPER_VERSION_1, /* H5F_LIBVER_V18 */ + H5S_HYPER_VERSION_2 /* H5F_LIBVER_LATEST */ +}; + /* Local datatypes */ /* Static function prototypes */ @@ -1993,6 +2000,7 @@ done: H5S_hyper_set_version PURPOSE Determine the version to use for encoding hyperslab selection info + See tables 2 & 3 in the RFC: H5Sencode/H5Sdecode Format Change USAGE hssize_t H5S_hyper_set_version(space, block_count, bounds_end, f, version) const H5S_t *space: IN: The dataspace @@ -2014,21 +2022,14 @@ done: static herr_t H5S_hyper_set_version(const H5S_t *space, hsize_t block_count, hsize_t bounds_end[], H5F_t *f, uint32_t *version) { - hbool_t count_up_version = FALSE; - hbool_t bound_up_version = FALSE; - unsigned u; - herr_t ret_value = SUCCEED; /* return value */ + hbool_t count_up_version = FALSE; /* Whether number of blocks exceed (2^32 - 1) */ + hbool_t bound_up_version = FALSE; /* Whether high bounds exceed (2^32 - 1) */ + unsigned u; /* Local index veriable */ + uint32_t tmp_version; /* Temporay version */ + herr_t ret_value = SUCCEED; /* return value */ FUNC_ENTER_NOAPI_NOINIT - /* Use version 2 for unlimited selection */ - if(space->select.sel_info.hslab->unlim_dim >= 0) { - *version = H5S_HYPER_VERSION_2; - HGOTO_DONE(SUCCEED) - } - - *version = H5S_HYPER_VERSION_1; - /* Determine whether the number of blocks or the high bounds in the selection exceed (2^32 - 1) */ if(block_count > H5S_UINT32_MAX) count_up_version = TRUE; @@ -2038,17 +2039,34 @@ H5S_hyper_set_version(const H5S_t *space, hsize_t block_count, hsize_t bounds_en bound_up_version = TRUE; } - if(H5S_hyper_is_regular(space)) { - if(((H5F_LOW_BOUND(f) >= H5F_LIBVER_V110) && block_count > 4) || - count_up_version || bound_up_version) - *version = H5S_HYPER_VERSION_2; - } else { /* Fail for irregular hyperslab if exceeds 32 bits */ + /* Use version 2 for unlimited selection */ + if(space->select.sel_info.hslab->unlim_dim >= 0) + tmp_version = H5S_HYPER_VERSION_2; + else if(H5S_hyper_is_regular(space)) { + + /* If exceed (2^32 -1) */ + if(count_up_version || bound_up_version) + tmp_version = H5S_HYPER_VERSION_2; + else + /* block_count < 4: version 1 */ + /* block_count >= 4: determined by low bound */ + tmp_version = (block_count < 4) ? H5S_HYPER_VERSION_1 : H5O_sds_hyper_ver_bounds[H5F_LOW_BOUND(f)]; + + } else { + /* Fail for irregular hyperslab if exceeds 32 bits */ if(count_up_version) HGOTO_ERROR(H5E_DATASPACE, H5E_BADVALUE, FAIL, "The number of blocks in hyperslab selection exceeds 2^32") else if(bound_up_version) HGOTO_ERROR(H5E_DATASPACE, H5E_BADVALUE, FAIL, "The end of bounding box in hyperslab selection exceeds 2^32") + tmp_version = H5S_HYPER_VERSION_1; } + /* Version bounds check */ + if(tmp_version > H5O_sds_hyper_ver_bounds[H5F_HIGH_BOUND(f)]) + HGOTO_ERROR(H5E_DATASPACE, H5E_BADRANGE, FAIL, "Dataspace hyperslab selection version out of bounds") + + *version = tmp_version; + done: FUNC_LEAVE_NOAPI(ret_value) } /* H5S_hyper_set_version() */ diff --git a/src/H5Spkg.h b/src/H5Spkg.h index 984f56f..75c5e77 100644 --- a/src/H5Spkg.h +++ b/src/H5Spkg.h @@ -282,8 +282,9 @@ H5_DLLVAR const H5S_select_class_t H5S_sel_none[1]; */ H5_DLLVAR const H5S_select_class_t H5S_sel_point[1]; -/* Array of versions for Dataspace */ +/* Array of versions for Dataspace and hyperslab selections */ H5_DLLVAR const unsigned H5O_sdspace_ver_bounds[H5F_LIBVER_NBOUNDS]; +H5_DLLVAR const unsigned H5O_sds_hyper_ver_bounds[H5F_LIBVER_NBOUNDS]; /* Extent functions */ H5_DLL herr_t H5S_extent_release(H5S_extent_t *extent); -- cgit v0.12 From 4460e41dfaa72d7399ed1a16be1c61c7a934cdfe Mon Sep 17 00:00:00 2001 From: "M. Scot Breitenfeld" Date: Mon, 12 Mar 2018 09:14:56 -0500 Subject: removed duplicate code --- test/th5s.c | 19 ------------------- 1 file changed, 19 deletions(-) diff --git a/test/th5s.c b/test/th5s.c index d23e0ea..9d5273f 100644 --- a/test/th5s.c +++ b/test/th5s.c @@ -41,25 +41,6 @@ #define H5O_TESTING #include "H5Opkg.h" /* Object header */ -#include "H5Bprivate.h" -#include "H5Iprivate.h" -#include "H5Pprivate.h" - -/* - * This file needs to access private information from the H5S package. - * This file also needs to access the dataspace testing code. - */ -#define H5S_FRIEND /*suppress error about including H5Spkg */ -#include "H5Spkg.h" /* Dataspaces */ - -/* - * This file needs to access private information from the H5O package. - * This file also needs to access the dataspace testing code. - */ -#define H5O_FRIEND /*suppress error about including H5Opkg */ -#define H5O_TESTING -#include "H5Opkg.h" /* Object header */ - #define TESTFILE "th5s.h5" #define DATAFILE "th5s1.h5" #define NULLFILE "th5s2.h5" -- cgit v0.12 From 657f51aaa5720b3c88d0d2aabbaf28d26f17ed7a Mon Sep 17 00:00:00 2001 From: "M. Scot Breitenfeld" Date: Mon, 12 Mar 2018 09:22:36 -0500 Subject: merged from develop --- src/H5R.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/H5R.c b/src/H5R.c index 0409f33..8b42b35 100644 --- a/src/H5R.c +++ b/src/H5R.c @@ -59,6 +59,7 @@ /* Local Variables */ /*******************/ + /*-------------------------------------------------------------------------- NAME H5Rcreate -- cgit v0.12 From 0c3fc6836345e2b4f63a8f59ec7c3b13d7bf920b Mon Sep 17 00:00:00 2001 From: "M. Scot Breitenfeld" Date: Mon, 12 Mar 2018 09:28:11 -0500 Subject: merged from develop --- testpar/t_pread.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/testpar/t_pread.c b/testpar/t_pread.c index 2f441d8..53701b9 100644 --- a/testpar/t_pread.c +++ b/testpar/t_pread.c @@ -339,8 +339,8 @@ generate_test_file( MPI_Comm comm, int mpi_rank, int group_id ) const char *text_to_write; size_t bytes_to_write; - if (group_id == 0) - text_to_write = random_hdf5_text; + if (group_id == 0) + text_to_write = random_hdf5_text; else text_to_write = hitchhiker_quote; -- cgit v0.12 From 880d14d4c545c795d525285985287829d43c3f42 Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Tue, 13 Mar 2018 17:36:08 -0500 Subject: HDFFV-10412 add complemnt to java error_off --- java/src/hdf/hdf5lib/H5.java | 8 +++++++- java/src/jni/exceptionImp.c | 17 +++++++++++++++++ java/src/jni/exceptionImp.h | 10 ++++++++++ java/src/jni/h5util.c | 3 +++ 4 files changed, 37 insertions(+), 1 deletion(-) diff --git a/java/src/hdf/hdf5lib/H5.java b/java/src/hdf/hdf5lib/H5.java index 732cdfc..7c1ff5b 100644 --- a/java/src/hdf/hdf5lib/H5.java +++ b/java/src/hdf/hdf5lib/H5.java @@ -424,7 +424,7 @@ public class H5 implements java.io.Serializable { private synchronized static native int H5dont_atexit() throws HDF5LibraryException; /** - * Turn off error handling By default, the C library prints the error stack of the HDF-5 C library on stdout. This + * Turn off error handling. By default, the C library prints the error stack of the HDF-5 C library on stdout. This * behavior may be disabled by calling H5error_off(). * * @return a non-negative value if successful @@ -432,6 +432,12 @@ public class H5 implements java.io.Serializable { public synchronized static native int H5error_off(); /** + * Turn on error handling. By default, the C library prints the error stack of the HDF-5 C library on stdout. This + * behavior may be reenabled by calling H5error_on(). + */ + public synchronized static native void H5error_on(); + + /** * H5garbage_collect collects on all free-lists of all types. * * @return a non-negative value if successful diff --git a/java/src/jni/exceptionImp.c b/java/src/jni/exceptionImp.c index 05c193f..afad5d5 100644 --- a/java/src/jni/exceptionImp.c +++ b/java/src/jni/exceptionImp.c @@ -33,6 +33,9 @@ extern "C" { #include "h5jni.h" #include "exceptionImp.h" +extern H5E_auto2_t efunc; +extern void *edata; + /*******************/ /* Local Variables */ @@ -122,10 +125,24 @@ JNIEXPORT jint JNICALL Java_hdf_hdf5lib_H5_H5error_1off (JNIEnv *env, jclass clss) { + H5Eget_auto2(H5E_DEFAULT, &efunc, &edata); H5Eset_auto2(H5E_DEFAULT, NULL, NULL); return 0; } /* end Java_hdf_hdf5lib_H5_H5error_1off() */ +/* + * Class: hdf_hdf5lib_exceptions_HDF5Library + * Method: H5error_on + * Signature: ()V + * + */ +JNIEXPORT void JNICALL +Java_hdf_hdf5lib_H5_H5error_1on + (JNIEnv *env, jclass clss) +{ + H5Eset_auto2(H5E_DEFAULT, efunc, edata); +} /* end Java_hdf_hdf5lib_H5_H5error_1on() */ + /* * Class: hdf_hdf5lib_exceptions_HDFLibraryException diff --git a/java/src/jni/exceptionImp.h b/java/src/jni/exceptionImp.h index cb74602..423e537 100644 --- a/java/src/jni/exceptionImp.h +++ b/java/src/jni/exceptionImp.h @@ -31,6 +31,16 @@ JNIEXPORT jint JNICALL Java_hdf_hdf5lib_H5_H5error_1off (JNIEnv *env, jclass clss ); +/* + * Class: hdf_hdf5lib_exceptions_HDF5Library + * Method: H5error_on + * Signature: ()V + * + */ +JNIEXPORT void JNICALL +Java_hdf_hdf5lib_H5_H5error_1on + (JNIEnv *env, jclass clss ); + /* * Class: hdf_hdf5lib_exceptions_HDFLibraryException diff --git a/java/src/jni/h5util.c b/java/src/jni/h5util.c index bd9fc0f..fdabd76 100644 --- a/java/src/jni/h5util.c +++ b/java/src/jni/h5util.c @@ -41,6 +41,9 @@ jobject get_callback; jobject set_callback; jobject delete_callback; +H5E_auto2_t efunc; +void *edata; + /********************/ /* Local Prototypes */ /********************/ -- cgit v0.12 From ab0e9cac87b14ddf780827995d2480dc0ea09f32 Mon Sep 17 00:00:00 2001 From: lrknox Date: Wed, 14 Mar 2018 14:03:39 -0500 Subject: Resolve merge conlicts in RELEASE.txt. --- release_docs/RELEASE.txt | 44 ++++++++++++++++++++++++++++++++++++++------ 1 file changed, 38 insertions(+), 6 deletions(-) diff --git a/release_docs/RELEASE.txt b/release_docs/RELEASE.txt index 72afd84..73c9614 100644 --- a/release_docs/RELEASE.txt +++ b/release_docs/RELEASE.txt @@ -115,6 +115,19 @@ New Features Library: -------- + - Add an enumerated value to H5F_libver_t for H5Pset_libver_bounds(). + + Currently, the library defines two values for H5F_libver_t and supports + only two pairs of (low, high) combinations as derived from these values. + Thus the bounds setting via H5Pset_libver_bounds() is rather restricted. + + Add an enumerated value (H5F_LIBVER_V18) to H5F_libver_t and + H5Pset_libver_bounds() now supports five pairs of (low, high) combinations + as derived from these values. This addition provides the user more + flexibility in setting bounds for object creation. + + (VC - 2018/03/14) + - Add prefix option to VDS files. Currently, VDS source files must be in the active directory to be @@ -346,12 +359,6 @@ Bug Fixes since HDF5-1.10.1 release Library ------- - - Utility function can not handle lowercase Windows drive letters - - Added call to toupper function for drive letter. - - (ADB - 2017/12/18, HDFFV-10307) - - Fix H5Sencode() bug when the number of elements selected is > 2^32 H5Sencode() incorrectly encodes dataspace selection with number of @@ -368,6 +375,17 @@ Bug Fixes since HDF5-1.10.1 release (VC - 2017/11/28, HDFFV-9947) + - Freeing of object header in H5Ocache.c + + It was discovered that the object header was not released properly + when the checksum verification failed and a re-load of the object + header was needed. + + Free the object header that failed the chksum verification only + after the new object header is reloaded, deserialized and set up. + + (VC - 2018/03/14, HDFFV-10209) + - H5Pset_evict_on_close in H5Pfapl.c Changed the minor error number from H5E_CANTSET to H5E_UNSUPPORTED for @@ -700,6 +718,20 @@ Bug Fixes since HDF5-1.10.1 release Tools ----- + - h5clear + + An enhancement to the tool in setting a file's stored EOA. + + It was discovered that a crashed file's stored EOA in the superblock + was smaller than the actual file's EOF. When the file was reopened + and closed, the library truncated the file to the stored EOA. + + Add an option to the tool in setting the file's stored EOA in the + superblock to the maximum of (EOA, EOF) + increment. + Another option is also added to print the file's EOA and EOF. + + (VC - 2018/03/14, HDFFV-10360) + - h5repack h5repack changes the chunk parameters when a change of layout is not -- cgit v0.12 From 970857cc91cb82573110fe989053a334bcfb4c89 Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Wed, 14 Mar 2018 15:11:38 -0500 Subject: Remove duplication --- release_docs/RELEASE.txt | 16 ++-------------- 1 file changed, 2 insertions(+), 14 deletions(-) diff --git a/release_docs/RELEASE.txt b/release_docs/RELEASE.txt index 970b4c7..0100f8e 100644 --- a/release_docs/RELEASE.txt +++ b/release_docs/RELEASE.txt @@ -374,18 +374,6 @@ Bug Fixes since HDF5-1.10.1 release (VC - 2017/11/28, HDFFV-9947) - - H5Pset_evict_on_close in H5Pfapl.c - - Changed the minor error number from H5E_CANTSET to H5E_UNSUPPORTED for - parallel library. - (ADB - 2018/03/6, HDFFV-10414) - - - Utility function can not handle lowercase Windows drive letters - - Added call to toupper function for drive letter. - - (ADB - 2017/12/18, HDFFV-10307) - - filter plugin handling in H5PL.c and H5Z.c It was discovered that the dynamic loading process used by @@ -910,8 +898,8 @@ Bug Fixes since HDF5-1.10.1 release Testing ------- - - Memory for three variables in testphdf5's coll_write_test was malloced - but not freed, leaking memory when running the test. The variables' + - Memory for three variables in testphdf5's coll_write_test was malloced + but not freed, leaking memory when running the test. The variables' memory is now freed. (LRK - 2018/03/12, HDFFV-10397) -- cgit v0.12 From d75948e15e94a0d33cb68b81856f4b44734bae2a Mon Sep 17 00:00:00 2001 From: lrknox Date: Wed, 14 Mar 2018 15:29:30 -0500 Subject: Revised RELEASE.txt. --- release_docs/RELEASE.txt | 40 +++++++++++++++++++++------------------- 1 file changed, 21 insertions(+), 19 deletions(-) diff --git a/release_docs/RELEASE.txt b/release_docs/RELEASE.txt index 73c9614..172e36b 100644 --- a/release_docs/RELEASE.txt +++ b/release_docs/RELEASE.txt @@ -359,22 +359,6 @@ Bug Fixes since HDF5-1.10.1 release Library ------- - - Fix H5Sencode() bug when the number of elements selected is > 2^32 - - H5Sencode() incorrectly encodes dataspace selection with number of - elements exceeding 2^32. When decoding such selection via H5Sdecode(), - the number of elements in the decoded dataspace is not the same as - what is encoded. This problem exists for H5S_SEL_HYPER and - H5S_SEL_POINTS encoding. - - The cause of the problem is because the library uses 32 bits to - encode counts and block offsets for the selection. - The solution is to use the original 32 bit encodings if possible, - but use a different way to encode selection > 32 bits when needed. - See details in the RFC: H5Sencode/H5Secode Format Change. - - (VC - 2017/11/28, HDFFV-9947) - - Freeing of object header in H5Ocache.c It was discovered that the object header was not released properly @@ -390,7 +374,8 @@ Bug Fixes since HDF5-1.10.1 release Changed the minor error number from H5E_CANTSET to H5E_UNSUPPORTED for parallel library. - (ADB - 2018/03/6, HDFFV-10414) + + (ADB - 2018/03/06, HDFFV-10414) - Utility function can not handle lowercase Windows drive letters @@ -398,7 +383,23 @@ Bug Fixes since HDF5-1.10.1 release (ADB - 2017/12/18, HDFFV-10307) - - filter plugin handling in H5PL.c and H5Z.c + - Fix H5Sencode() bug when the number of elements selected is > 2^32 + + H5Sencode() incorrectly encodes dataspace selection with number of + elements exceeding 2^32. When decoding such selection via H5Sdecode(), + the number of elements in the decoded dataspace is not the same as + what is encoded. This problem exists for H5S_SEL_HYPER and + H5S_SEL_POINTS encoding. + + The cause of the problem is because the library uses 32 bits to + encode counts and block offsets for the selection. + The solution is to use the original 32 bit encodings if possible, + but use a different way to encode selection > 32 bits when needed. + See details in the RFC: H5Sencode/H5Secode Format Change. + + (VC - 2017/11/28, HDFFV-9947) + + - Filter plugin handling in H5PL.c and H5Z.c It was discovered that the dynamic loading process used by filter plugins had issues with library dependencies. @@ -407,7 +408,8 @@ Bug Fixes since HDF5-1.10.1 release allowed HDF5 C library to make dependent libraries private. The filter plugin libraries no longer require dependent libraries (such as szip or zlib) to be available. - (ADB - 2017/11/16, HDFFV-10328) + + (ADB - 2017/11/16, HDFFV-10328) - Fix rare object header corruption bug -- cgit v0.12 From aa199c893fe5db9ef25c5ee026821333620c4c51 Mon Sep 17 00:00:00 2001 From: lrknox Date: Wed, 14 Mar 2018 16:19:26 -0500 Subject: Updated version to 1.10.3-snap0 --- README.txt | 2 +- c++/src/cpp_doc_config | 2 +- config/cmake/scripts/HDF5config.cmake | 4 ++-- configure.ac | 2 +- java/src/hdf/hdf5lib/H5.java | 4 ++-- java/test/TestH5.java | 4 ++-- release_docs/RELEASE.txt | 2 +- src/H5public.h | 6 +++--- .../testfiles/h5repack_layout.h5-plugin_version_test.ddl | 14 +++++++------- 9 files changed, 20 insertions(+), 20 deletions(-) diff --git a/README.txt b/README.txt index ddc905f..29c667b 100644 --- a/README.txt +++ b/README.txt @@ -1,4 +1,4 @@ -HDF5 version 1.10.2-snap10 currently under development +HDF5 version 1.10.3-snap0 currently under development Please refer to the release_docs/INSTALL file for installation instructions. ------------------------------------------------------------------------------ diff --git a/c++/src/cpp_doc_config b/c++/src/cpp_doc_config index 3654e28..68929f4 100644 --- a/c++/src/cpp_doc_config +++ b/c++/src/cpp_doc_config @@ -38,7 +38,7 @@ PROJECT_NAME = # could be handy for archiving the generated documentation or if some version # control system is used. -PROJECT_NUMBER = "1.10.2-snap10, currently under development" +PROJECT_NUMBER = "1.10.3-snap0, currently under development" # Using the PROJECT_BRIEF tag one can provide an optional one line description # for a project that appears at the top of each page and should give viewer a diff --git a/config/cmake/scripts/HDF5config.cmake b/config/cmake/scripts/HDF5config.cmake index 3dddbca..1264882 100755 --- a/config/cmake/scripts/HDF5config.cmake +++ b/config/cmake/scripts/HDF5config.cmake @@ -34,8 +34,8 @@ cmake_minimum_required (VERSION 3.10) # CTEST_SOURCE_NAME - source folder ############################################################################## -set (CTEST_SOURCE_VERSION "1.10.2") -set (CTEST_SOURCE_VERSEXT "-snap10") +set (CTEST_SOURCE_VERSION "1.10.3") +set (CTEST_SOURCE_VERSEXT "-snap0") ############################################################################## # handle input parameters to script. diff --git a/configure.ac b/configure.ac index c60db0d..9bdc292 100644 --- a/configure.ac +++ b/configure.ac @@ -24,7 +24,7 @@ AC_PREREQ([2.69]) ## NOTE: Do not forget to change the version number here when we do a ## release!!! ## -AC_INIT([HDF5], [1.10.2-snap10], [help@hdfgroup.org]) +AC_INIT([HDF5], [1.10.3-snap0], [help@hdfgroup.org]) AC_CONFIG_SRCDIR([src/H5.c]) AC_CONFIG_HEADERS([src/H5config.h]) diff --git a/java/src/hdf/hdf5lib/H5.java b/java/src/hdf/hdf5lib/H5.java index 7c1ff5b..5c4fc40 100644 --- a/java/src/hdf/hdf5lib/H5.java +++ b/java/src/hdf/hdf5lib/H5.java @@ -214,7 +214,7 @@ import hdf.hdf5lib.structs.H5O_info_t; * exception handlers to print out the HDF-5 error stack. *
* - * @version HDF5 1.10.2
+ * @version HDF5 1.10.3
* See also: hdf.hdf5lib.HDFArray
* hdf.hdf5lib.HDF5Constants
* hdf.hdf5lib.HDF5CDataTypes
@@ -237,7 +237,7 @@ public class H5 implements java.io.Serializable { * * Make sure to update the versions number when a different library is used. */ - public final static int LIB_VERSION[] = { 1, 10, 2 }; + public final static int LIB_VERSION[] = { 1, 10, 3 }; public final static String H5PATH_PROPERTY_KEY = "hdf.hdf5lib.H5.hdf5lib"; diff --git a/java/test/TestH5.java b/java/test/TestH5.java index 9c3d8dc..154390d 100644 --- a/java/test/TestH5.java +++ b/java/test/TestH5.java @@ -162,7 +162,7 @@ public class TestH5 { */ @Test public void testH5get_libversion() { - int libversion[] = { 1, 10, 2 }; + int libversion[] = { 1, 10, 3 }; try { H5.H5get_libversion(libversion); @@ -184,7 +184,7 @@ public class TestH5 { */ @Test public void testH5check_version() { - int majnum = 1, minnum = 10, relnum = 2; + int majnum = 1, minnum = 10, relnum = 3; try { H5.H5check_version(majnum, minnum, relnum); diff --git a/release_docs/RELEASE.txt b/release_docs/RELEASE.txt index 34a734e..2dccdbd 100644 --- a/release_docs/RELEASE.txt +++ b/release_docs/RELEASE.txt @@ -1,4 +1,4 @@ -HDF5 version 1.10.2-snap10 currently under development +HDF5 version 1.10.3-snap0 currently under development ================================================================================ diff --git a/src/H5public.h b/src/H5public.h index 29c5ec1..c30d4ba 100644 --- a/src/H5public.h +++ b/src/H5public.h @@ -93,10 +93,10 @@ extern "C" { /* 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 2 /* For tweaks, bug-fixes, or development */ -#define H5_VERS_SUBRELEASE "snap10" /* For pre-releases like snap0 */ +#define H5_VERS_RELEASE 3 /* For tweaks, bug-fixes, or development */ +#define H5_VERS_SUBRELEASE "snap0" /* For pre-releases like snap0 */ /* Empty string for real releases. */ -#define H5_VERS_INFO "HDF5 library version: 1.10.2-snap10" /* Full version string */ +#define H5_VERS_INFO "HDF5 library version: 1.10.3-snap0" /* Full version string */ #define H5check() H5check_version(H5_VERS_MAJOR,H5_VERS_MINOR, \ H5_VERS_RELEASE) diff --git a/tools/test/h5repack/testfiles/h5repack_layout.h5-plugin_version_test.ddl b/tools/test/h5repack/testfiles/h5repack_layout.h5-plugin_version_test.ddl index 561ab14..0a68791 100644 --- a/tools/test/h5repack/testfiles/h5repack_layout.h5-plugin_version_test.ddl +++ b/tools/test/h5repack/testfiles/h5repack_layout.h5-plugin_version_test.ddl @@ -11,7 +11,7 @@ GROUP "/" { USER_DEFINED_FILTER { FILTER_ID 260 COMMENT dynlib4 - PARAMS { 9 1 10 2 } + PARAMS { 9 1 10 3 } } } FILLVALUE { @@ -33,7 +33,7 @@ GROUP "/" { USER_DEFINED_FILTER { FILTER_ID 260 COMMENT dynlib4 - PARAMS { 9 1 10 2 } + PARAMS { 9 1 10 3 } } } FILLVALUE { @@ -55,7 +55,7 @@ GROUP "/" { USER_DEFINED_FILTER { FILTER_ID 260 COMMENT dynlib4 - PARAMS { 9 1 10 2 } + PARAMS { 9 1 10 3 } } } FILLVALUE { @@ -77,7 +77,7 @@ GROUP "/" { USER_DEFINED_FILTER { FILTER_ID 260 COMMENT dynlib4 - PARAMS { 9 1 10 2 } + PARAMS { 9 1 10 3 } } } FILLVALUE { @@ -99,7 +99,7 @@ GROUP "/" { USER_DEFINED_FILTER { FILTER_ID 260 COMMENT dynlib4 - PARAMS { 9 1 10 2 } + PARAMS { 9 1 10 3 } } } FILLVALUE { @@ -121,7 +121,7 @@ GROUP "/" { USER_DEFINED_FILTER { FILTER_ID 260 COMMENT dynlib4 - PARAMS { 9 1 10 2 } + PARAMS { 9 1 10 3 } } } FILLVALUE { @@ -143,7 +143,7 @@ GROUP "/" { USER_DEFINED_FILTER { FILTER_ID 260 COMMENT dynlib4 - PARAMS { 9 1 10 2 } + PARAMS { 9 1 10 3 } } } FILLVALUE { -- cgit v0.12 From 5c3598db816979fc6bd930cfec842570bbdae665 Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Thu, 15 Mar 2018 09:17:39 -0500 Subject: HDFFV-10412 - Add note for new Java wrapper --- release_docs/RELEASE.txt | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/release_docs/RELEASE.txt b/release_docs/RELEASE.txt index 2dccdbd..35eaea4 100644 --- a/release_docs/RELEASE.txt +++ b/release_docs/RELEASE.txt @@ -297,6 +297,14 @@ New Features Java Library: ---------------- + - Wrapper added for enabling the error stack. + + H5error_off would disable the error stack reporting. In order + to re-enable the reporting, the error stack info needs to be + saved so that H5error_on can revert state. + + (ADB - 2018/03/13, HDFFV-10412) + - Wrappers added for the following APIs: H5Pset_evict_on_close H5Pget_evict_on_close -- cgit v0.12 From cc089dbb15d9562ff226f091cc3481013af2481e Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Thu, 15 Mar 2018 14:39:40 -0500 Subject: Merge from develop --- java/src/hdf/hdf5lib/HDF5Constants.java | 12 ++++++++++++ java/src/jni/h5Constants.c | 8 ++++++++ java/src/jni/h5pImp.c | 14 +++----------- java/test/TestH5P.java | 6 +++--- 4 files changed, 26 insertions(+), 14 deletions(-) diff --git a/java/src/hdf/hdf5lib/HDF5Constants.java b/java/src/hdf/hdf5lib/HDF5Constants.java index 3e43ba2..eb4055d 100644 --- a/java/src/hdf/hdf5lib/HDF5Constants.java +++ b/java/src/hdf/hdf5lib/HDF5Constants.java @@ -206,7 +206,11 @@ public class HDF5Constants { public static final int H5F_CLOSE_SEMI = H5F_CLOSE_SEMI(); public static final int H5F_CLOSE_STRONG = H5F_CLOSE_STRONG(); public static final int H5F_CLOSE_WEAK = H5F_CLOSE_WEAK(); + public static final int H5F_LIBVER_ERROR = H5F_LIBVER_ERROR(); public static final int H5F_LIBVER_EARLIEST = H5F_LIBVER_EARLIEST(); + public static final int H5F_LIBVER_V18 = H5F_LIBVER_V18(); + public static final int H5F_LIBVER_V110 = H5F_LIBVER_V110(); + public static final int H5F_LIBVER_NBOUNDS = H5F_LIBVER_NBOUNDS(); public static final int H5F_LIBVER_LATEST = H5F_LIBVER_LATEST(); public static final int H5F_OBJ_ALL = H5F_OBJ_ALL(); public static final int H5F_OBJ_ATTR = H5F_OBJ_ATTR(); @@ -999,8 +1003,16 @@ public class HDF5Constants { private static native final int H5F_CLOSE_WEAK(); + private static native final int H5F_LIBVER_ERROR(); + private static native final int H5F_LIBVER_EARLIEST(); + private static native final int H5F_LIBVER_V18(); + + private static native final int H5F_LIBVER_V110(); + + private static native final int H5F_LIBVER_NBOUNDS(); + private static native final int H5F_LIBVER_LATEST(); private static native final int H5F_OBJ_ALL(); diff --git a/java/src/jni/h5Constants.c b/java/src/jni/h5Constants.c index 5a4b53e..900316e 100644 --- a/java/src/jni/h5Constants.c +++ b/java/src/jni/h5Constants.c @@ -380,8 +380,16 @@ Java_hdf_hdf5lib_HDF5Constants_H5F_1CLOSE_1STRONG(JNIEnv *env, jclass cls) { ret JNIEXPORT jint JNICALL Java_hdf_hdf5lib_HDF5Constants_H5F_1CLOSE_1WEAK(JNIEnv *env, jclass cls) { return H5F_CLOSE_WEAK; } JNIEXPORT jint JNICALL +Java_hdf_hdf5lib_HDF5Constants_H5F_1LIBVER_1ERROR(JNIEnv *env, jclass cls){return H5F_LIBVER_ERROR;} +JNIEXPORT jint JNICALL Java_hdf_hdf5lib_HDF5Constants_H5F_1LIBVER_1EARLIEST(JNIEnv *env, jclass cls){return H5F_LIBVER_EARLIEST;} JNIEXPORT jint JNICALL +Java_hdf_hdf5lib_HDF5Constants_H5F_1LIBVER_1V18(JNIEnv *env, jclass cls){return H5F_LIBVER_V18;} +JNIEXPORT jint JNICALL +Java_hdf_hdf5lib_HDF5Constants_H5F_1LIBVER_1V110(JNIEnv *env, jclass cls){return H5F_LIBVER_V110;} +JNIEXPORT jint JNICALL +Java_hdf_hdf5lib_HDF5Constants_H5F_1LIBVER_1NBOUNDS(JNIEnv *env, jclass cls){return H5F_LIBVER_NBOUNDS;} +JNIEXPORT jint JNICALL Java_hdf_hdf5lib_HDF5Constants_H5F_1LIBVER_1LATEST(JNIEnv *env, jclass cls){return H5F_LIBVER_LATEST;} JNIEXPORT jint JNICALL Java_hdf_hdf5lib_HDF5Constants_H5F_1OBJ_1ALL(JNIEnv *env, jclass cls) { return H5F_OBJ_ALL; } diff --git a/java/src/jni/h5pImp.c b/java/src/jni/h5pImp.c index cf27341..49cfeb9 100644 --- a/java/src/jni/h5pImp.c +++ b/java/src/jni/h5pImp.c @@ -2794,17 +2794,9 @@ Java_hdf_hdf5lib_H5_H5Pset_1libver_1bounds { herr_t retVal = -1; - if ((H5F_libver_t)high != H5F_LIBVER_LATEST) { - h5badArgument(env, "H5Pset_libver_bounds: invalid high library version bound"); - } /* end if */ - else if(((H5F_libver_t)low !=H5F_LIBVER_EARLIEST) && ((H5F_libver_t)low != H5F_LIBVER_LATEST)) { - h5badArgument(env, "H5Pset_libver_bounds: invalid low library version bound"); - } /* end else if */ - else { - retVal = H5Pset_libver_bounds((hid_t)fapl_id, (H5F_libver_t)low, (H5F_libver_t)high); - if(retVal < 0) - h5libraryError(env); - } /* end else */ + retVal = H5Pset_libver_bounds((hid_t)fapl_id, (H5F_libver_t)low, (H5F_libver_t)high); + if(retVal < 0) + h5libraryError(env); return (jint)retVal; } /* end Java_hdf_hdf5lib_H5_H5Pset_1libver_1bounds */ diff --git a/java/test/TestH5P.java b/java/test/TestH5P.java index 9e45e4c..521a53c 100644 --- a/java/test/TestH5P.java +++ b/java/test/TestH5P.java @@ -206,14 +206,14 @@ public class TestH5P { assertEquals(nlinks, 20L); } - @Test(expected = IllegalArgumentException.class) + @Test(expected = HDF5FunctionArgumentException.class) public void testH5Pset_libver_bounds_invalidlow() throws Throwable { H5.H5Pset_libver_bounds(fapl_id, 5, HDF5Constants.H5F_LIBVER_LATEST); } - @Test(expected = IllegalArgumentException.class) + @Test(expected = HDF5FunctionArgumentException.class) public void testH5Pset_libver_bounds_invalidhigh() throws Throwable { - H5.H5Pset_libver_bounds(fapl_id, HDF5Constants.H5F_LIBVER_LATEST, 5); + H5.H5Pset_libver_bounds(fapl_id, HDF5Constants.H5F_LIBVER_V110, HDF5Constants.H5F_LIBVER_V110+1); } @Test -- cgit v0.12 From e158ec4d1f50dbba16d3154ebec33472d482707c Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Tue, 20 Mar 2018 09:17:33 -0500 Subject: Merge mem leak fix from develop --- test/ohdr.c | 112 ++++++++++++++++++++++++++++++++---------------------------- 1 file changed, 59 insertions(+), 53 deletions(-) diff --git a/test/ohdr.c b/test/ohdr.c index e886bf9..ab50a5f5 100644 --- a/test/ohdr.c +++ b/test/ohdr.c @@ -21,14 +21,14 @@ * This file needs to access private datatypes from the H5O package. * This file also needs to access the object header testing code. */ -#define H5O_FRIEND /*suppress error about including H5Opkg */ +#define H5O_FRIEND /*suppress error about including H5Opkg */ #define H5O_TESTING #include "H5Opkg.h" /* * This file needs to access private datatypes from the H5G package. */ -#define H5G_FRIEND /*suppress error about including H5Gpkg */ +#define H5G_FRIEND /*suppress error about including H5Gpkg */ #include "H5Gpkg.h" const char *FILENAME[] = { @@ -49,24 +49,24 @@ const char *FILENAME[] = { /* * Verify that messages are moved forward into a "continuation message": - * Create an object header with several continuation chunks - * Remove a message in the last chunk - * The remaining message(s) in the last chunk should be moved forward into the continuation message - * The process will repeat when the continuation message is big enough to hold all the - * messages in the last chunk. - * Result: the number of chunks should be reduced + * Create an object header with several continuation chunks + * Remove a message in the last chunk + * The remaining message(s) in the last chunk should be moved forward into the continuation message + * The process will repeat when the continuation message is big enough to hold all the + * messages in the last chunk. + * Result: the number of chunks should be reduced */ static herr_t test_cont(char *filename, hid_t fapl) { - hid_t file=-1; - H5F_t *f = NULL; + hid_t file=-1; + H5F_t *f = NULL; H5O_hdr_info_t hdr_info; - H5O_loc_t oh_locA, oh_locB; - time_t time_new; - const char *short_name = "T"; - const char *long_name = "This is the message"; - size_t nchunks; + H5O_loc_t oh_locA, oh_locB; + time_t time_new; + const char *short_name = "T"; + const char *long_name = "This is the message"; + size_t nchunks; TESTING("object header continuation block"); @@ -167,15 +167,15 @@ error: static herr_t test_ohdr_cache(char *filename, hid_t fapl) { - hid_t file = -1; /* File ID */ + hid_t file = -1; /* File ID */ hid_t my_fapl; /* FAPL ID */ hid_t my_dxpl; /* DXPL ID */ H5AC_cache_config_t mdc_config; /* Metadata cache configuration info */ - H5F_t *f = NULL; /* File handle */ + H5F_t *f = NULL; /* File handle */ H5HL_t *lheap, *lheap2, *lheap3; /* Pointer to local heaps */ haddr_t lheap_addr, lheap_addr2, lheap_addr3; /* Local heap addresses */ - H5O_loc_t oh_loc; /* Object header location */ - time_t time_new; /* Time value for modification time message */ + H5O_loc_t oh_loc; /* Object header location */ + time_t time_new; /* Time value for modification time message */ unsigned rc; /* Refcount for object */ TESTING("object header creation in cache"); @@ -309,17 +309,17 @@ error: static herr_t test_ohdr_swmr(hbool_t new_format) { - hid_t fid = -1; /* File ID */ - hid_t fapl = -1; /* File access property list */ - hid_t did = -1; /* Dataset ID */ + hid_t fid = -1; /* File ID */ + hid_t fapl = -1; /* File access property list */ + hid_t did = -1; /* Dataset ID */ hid_t sid = -1; /* Dataspace ID */ - hid_t plist = -1; /* Dataset creation property list */ - size_t compact_size = 1024; /* The size of compact dataset */ - int *wbuf = NULL; /* Buffer for writing */ - hsize_t dims[1]; /* Dimension sizes */ - size_t u; /* Iterator */ + hid_t plist = -1; /* Dataset creation property list */ + size_t compact_size = 1024; /* The size of compact dataset */ + int *wbuf = NULL; /* Buffer for writing */ + hsize_t dims[1]; /* Dimension sizes */ + size_t u; /* Iterator */ int n; /* Data variable */ - H5O_info_t obj_info; /* Information for the object */ + H5O_info_t obj_info; /* Information for the object */ if(new_format) { TESTING("exercise the coding for the re-read of the object header for SWMR access: latest-format"); @@ -355,7 +355,7 @@ test_ohdr_swmr(hbool_t new_format) dims[0] = (hsize_t)compact_size; if((sid = H5Screate_simple(1, dims, NULL)) < 0) FAIL_STACK_ERROR - + /* Create property list for compact dataset creation */ if((plist = H5Pcreate(H5P_DATASET_CREATE)) < 0) FAIL_STACK_ERROR @@ -448,10 +448,10 @@ error: /* * To test objects with unknown messages in a file with: - * a) H5O_BOGUS_VALID_ID: - * --the bogus_id is within the range of H5O_msg_class_g[] - * b) H5O_BOGUS_INVALID_ID: - * --the bogus_id is outside the range of H5O_msg_class_g[] + * a) H5O_BOGUS_VALID_ID: + * --the bogus_id is within the range of H5O_msg_class_g[] + * b) H5O_BOGUS_INVALID_ID: + * --the bogus_id is outside the range of H5O_msg_class_g[] * * The test file is FILE_BOGUS: "tbogus.h5" generated with gen_bogus.c * --objects that have unknown header messages with H5O_BOGUS_VALID_ID in "/" @@ -462,15 +462,15 @@ error: static herr_t test_unknown(unsigned bogus_id, char *filename, hid_t fapl) { - hid_t fid = -1; /* file ID */ - hid_t gid = -1; /* group ID */ - hid_t did = -1; /* Dataset ID */ + hid_t fid = -1; /* file ID */ + hid_t gid = -1; /* group ID */ + hid_t did = -1; /* Dataset ID */ hid_t sid = -1; /* Dataspace ID */ hid_t aid = -1; /* Attribute ID */ - hid_t loc = -1; /* location: file or group ID */ - hid_t fid_bogus = -1; /* bogus file ID */ - hid_t gid_bogus = -1; /* bogus group ID */ - hid_t loc_bogus = -1; /* location: bogus file or group ID */ + hid_t loc = -1; /* location: file or group ID */ + hid_t fid_bogus = -1; /* bogus file ID */ + hid_t gid_bogus = -1; /* bogus group ID */ + hid_t loc_bogus = -1; /* location: bogus file or group ID */ char testfile[256]; /* create a different name for a local copy of the data file to be @@ -497,7 +497,7 @@ test_unknown(unsigned bogus_id, char *filename, hid_t fapl) /* Set up location ID depending on bogus_id */ if(bogus_id == H5O_BOGUS_INVALID_ID) { /* Open "group" in FILE_BOGUS */ - if((gid_bogus = H5Gopen2(fid_bogus, "group", H5P_DEFAULT)) < 0) + if((gid_bogus = H5Gopen2(fid_bogus, "group", H5P_DEFAULT)) < 0) FAIL_STACK_ERROR loc_bogus = gid_bogus; @@ -562,7 +562,7 @@ test_unknown(unsigned bogus_id, char *filename, hid_t fapl) /* Set up location ID depending on bogus_id */ if(bogus_id == H5O_BOGUS_INVALID_ID) { /* Open "group" in filename */ - if((gid = H5Gopen2(fid, "group", H5P_DEFAULT)) < 0) + if((gid = H5Gopen2(fid, "group", H5P_DEFAULT)) < 0) FAIL_STACK_ERROR loc = gid; } else @@ -596,7 +596,7 @@ test_unknown(unsigned bogus_id, char *filename, hid_t fapl) /* Set up location ID depending on bogus_id */ if(bogus_id == H5O_BOGUS_INVALID_ID) { /* Open "group" in filename */ - if((gid = H5Gopen2(fid, "group", H5P_DEFAULT)) < 0) + if((gid = H5Gopen2(fid, "group", H5P_DEFAULT)) < 0) FAIL_STACK_ERROR loc = gid; } else @@ -642,7 +642,7 @@ test_unknown(unsigned bogus_id, char *filename, hid_t fapl) /* Set up location ID depending on bogus_id */ if(bogus_id == H5O_BOGUS_INVALID_ID) { /* Open "group" in filename */ - if((gid = H5Gopen2(fid, "group", H5P_DEFAULT)) < 0) + if((gid = H5Gopen2(fid, "group", H5P_DEFAULT)) < 0) FAIL_STACK_ERROR loc = gid; } else @@ -660,7 +660,7 @@ test_unknown(unsigned bogus_id, char *filename, hid_t fapl) if(H5Dclose(did) < 0) FAIL_STACK_ERROR - /* Closing: filename */ + /* Closing: filename */ if(bogus_id == H5O_BOGUS_INVALID_ID) if(H5Gclose(gid) < 0) FAIL_STACK_ERROR @@ -685,7 +685,7 @@ test_unknown(unsigned bogus_id, char *filename, hid_t fapl) /* Set up location ID */ if(bogus_id == H5O_BOGUS_INVALID_ID) { /* Open "group" in FILE_BOGUS */ - if((gid_bogus = H5Gopen2(fid_bogus, "group", H5P_DEFAULT)) < 0) + if((gid_bogus = H5Gopen2(fid_bogus, "group", H5P_DEFAULT)) < 0) FAIL_STACK_ERROR loc_bogus = gid_bogus; } else @@ -716,7 +716,7 @@ test_unknown(unsigned bogus_id, char *filename, hid_t fapl) /* Closing: FILE_BOGUS */ if(bogus_id == H5O_BOGUS_INVALID_ID) if(H5Gclose(gid_bogus) < 0) - FAIL_STACK_ERROR + FAIL_STACK_ERROR if(H5Fclose(fid_bogus) < 0) FAIL_STACK_ERROR @@ -772,21 +772,21 @@ char *version_string(H5F_libver_t libver) sprintf(str, "%ld", (long)libver); break; } /* end switch */ - + /* Return the formed version bound string */ return(str); } /* end of version_string */ - + /*------------------------------------------------------------------------- - * Function: main + * Function: main * * Purpose: Exercise private object header behavior and routines * * Return: Success: 0 * Failure: 1 * - * Programmer: Robb Matzke + * Programmer: Robb Matzke * Tuesday, November 24, 1998 * * Modification: @@ -819,6 +819,8 @@ main(void) /* Loop through all the combinations of low/high library format bounds */ for(low = H5F_LIBVER_EARLIEST; low < H5F_LIBVER_NBOUNDS; low++) { for(high = H5F_LIBVER_EARLIEST; high < H5F_LIBVER_NBOUNDS; high++) { + char *low_string = NULL; + char *high_string = NULL; /* Set version bounds before opening the file */ H5E_BEGIN_TRY { @@ -829,9 +831,13 @@ main(void) continue; /* Display info about testing */ - sprintf(msg, "Using file format version: (%s, %s)", version_string(low), - version_string(high)); + low_string = version_string(low); + high_string = version_string(high); + sprintf(msg, "Using file format version: (%s, %s)", low_string, + high_string); HDputs(msg); + HDfree(high_string); + HDfree(low_string); /* test on object continuation block */ if(test_cont(filename, fapl) < 0) -- cgit v0.12 From 73e27485470a0e83b6fc03393e1783c9602c0d38 Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Thu, 22 Mar 2018 13:09:24 -0500 Subject: Correct Readme VS version merge from develop --- config/cmake_ext_mod/HDFMacros.cmake | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/config/cmake_ext_mod/HDFMacros.cmake b/config/cmake_ext_mod/HDFMacros.cmake index bdc52b9..04d60e1 100644 --- a/config/cmake_ext_mod/HDFMacros.cmake +++ b/config/cmake_ext_mod/HDFMacros.cmake @@ -291,9 +291,11 @@ macro (HDF_README_PROPERTIES target_fortran) elseif (${CMAKE_C_COMPILER_VERSION} MATCHES "^18.*") set (BINARY_PLATFORM "${BINARY_PLATFORM}, using VISUAL STUDIO 2013") elseif (${CMAKE_C_COMPILER_VERSION} MATCHES "^19.*") - set (BINARY_PLATFORM "${BINARY_PLATFORM}, using VISUAL STUDIO 2015") - elseif (${CMAKE_C_COMPILER_VERSION} MATCHES "^20.*") - set (BINARY_PLATFORM "${BINARY_PLATFORM}, using VISUAL STUDIO 2017") + if (${CMAKE_C_COMPILER_VERSION} MATCHES "^19.0.*") + set (BINARY_PLATFORM "${BINARY_PLATFORM}, using VISUAL STUDIO 2015") + else () + set (BINARY_PLATFORM "${BINARY_PLATFORM}, using VISUAL STUDIO 2017") + endif () else () set (BINARY_PLATFORM "${BINARY_PLATFORM}, using VISUAL STUDIO ${CMAKE_C_COMPILER_VERSION}") endif () -- cgit v0.12 From 9707dbb03cf0a8477055eef01311b8789f88c1c7 Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Tue, 27 Mar 2018 08:42:42 -0500 Subject: Remove incorrect line --- release_docs/INSTALL_CMake.txt | 1 - 1 file changed, 1 deletion(-) diff --git a/release_docs/INSTALL_CMake.txt b/release_docs/INSTALL_CMake.txt index 1861d92..1cccccd 100644 --- a/release_docs/INSTALL_CMake.txt +++ b/release_docs/INSTALL_CMake.txt @@ -398,7 +398,6 @@ These five steps are described in detail below. ######################## set (CMAKE_INSTALL_FRAMEWORK_PREFIX "Library/Frameworks" CACHE STRING "Frameworks installation directory" FORCE) set (HDF_PACKAGE_EXT "" CACHE STRING "Name of HDF package extension" FORCE) - set (HDF5_GENERATE_HEADERS ON CACHE BOOL "Rebuild Generated Files" FORCE) set (HDF5_BUILD_FORTRAN ON CACHE BOOL "Build FORTRAN support" FORCE) set (HDF5_ENABLE_Z_LIB_SUPPORT ON CACHE BOOL "Enable Zlib Filters" FORCE) set (HDF5_ENABLE_SZIP_SUPPORT ON CACHE BOOL "Use SZip Filter" FORCE) -- cgit v0.12 From 7fdad7f3b831e6899566bfa2573b5480bb170134 Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Wed, 28 Mar 2018 12:27:23 -0500 Subject: Correct name of hl compile script --- hl/src/CMakeLists.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hl/src/CMakeLists.txt b/hl/src/CMakeLists.txt index 0daa86e..8ee775b 100644 --- a/hl/src/CMakeLists.txt +++ b/hl/src/CMakeLists.txt @@ -124,11 +124,11 @@ if (NOT WIN32) set (_PKG_CONFIG_COMPILER ${CMAKE_C_COMPILER}) configure_file ( ${HDF_RESOURCES_DIR}/libh5cc.in - ${HDF5_BINARY_DIR}/CMakeFiles/h5chl + ${HDF5_BINARY_DIR}/CMakeFiles/h5hlcc @ONLY ) install ( - FILES ${HDF5_BINARY_DIR}/CMakeFiles/h5chl + FILES ${HDF5_BINARY_DIR}/CMakeFiles/h5hlcc DESTINATION ${HDF5_INSTALL_BIN_DIR} PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE COMPONENT hllibraries -- cgit v0.12 From 43f27973c94d0e70854bf966472132292110c6d6 Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Thu, 29 Mar 2018 12:24:22 -0500 Subject: Update URLs --- release_docs/INSTALL_CMake.txt | 82 ++++++++++++++++++++++++--------------- release_docs/USING_HDF5_CMake.txt | 4 +- release_docs/USING_HDF5_VS.txt | 4 +- 3 files changed, 55 insertions(+), 35 deletions(-) diff --git a/release_docs/INSTALL_CMake.txt b/release_docs/INSTALL_CMake.txt index 1cccccd..a2d209a 100644 --- a/release_docs/INSTALL_CMake.txt +++ b/release_docs/INSTALL_CMake.txt @@ -24,13 +24,13 @@ Obtaining HDF5 source code 1. Create a directory for your development; for example, "myhdfstuff". 2. Obtain compressed (*.tar or *.zip) HDF5 source from - http://www.hdfgroup.org/ftp/HDF5/current/src/ + https://portal.hdfgroup.org/display/support/Building+HDF5+with+CMake and put it in "myhdfstuff". Uncompress the file. There should be a hdf5-1.10."X" folder. CMake version 1. We suggest you obtain the latest CMake from the Kitware web site. - The HDF5 1.10."X" product requires a minimum CMake version 3.2.2, + The HDF5 1.10."X" product requires a minimum CMake version 3.10, where "X" is the current HDF5 release version. Note: @@ -48,12 +48,12 @@ the config/cmake/cacheinit.cmake file. HDF Group recommends using the ctest script mode to build HDF5. The following files referenced below are available at the HDF web site: - http://www.hdfgroup.org/HDF5/release/cmakebuild.html + https://portal.hdfgroup.org/display/support/Building+HDF5+with+CMake Single compressed file with all the files needed, including source: - hdf5-1.10.X-CMake.zip or hdf5-1.10.X-CMake.tar.gz + CMake-hdf5-1.10.X.zip or CMake-hdf5-1.10.X.tar.gz -Individual files +Individual files included in the above mentioned compressed files ----------------------------------------------- CMake build script: CTestScript.cmake @@ -62,37 +62,44 @@ External compression szip and zlib libraries: SZip.tar.gz ZLib.tar.gz -Platform configuration files: - HDF518config.cmake +Examples Source package: + HDF5Examples-1.10.x-Source.tar.gz + +Configuration files: + HDF5config.cmake + HDF5options.cmake + +Build scripts for windows or linux ----------------------------------------------- To build HDF5 with the SZIP and ZLIB external libraries you will need to: 1. Change to the development directory "myhdfstuff". - 2. Download the SZip.tar.gz and ZLib.tar.gz to "myhdfstuff". - Do not uncompress the files. + 2. Download the CMake-hdf5-1.10.X.zip(.tar.gz) file to "myhdfstuff". + Uncompress the file. - 3. Download the CTestScript.cmake file to "myhdfstuff". + 3. Change to the source directory "hdf5-1.10.x". CTestScript.cmake file should not be modified. - 4. Download the platform configuration file, HDF518config.cmake, - to "myhdfstuff". Do not modify the file unless you want to change - default build environment. (See http://www.hdfgroup.org/HDF5/release/chgcmkbuild.html) + 4. Edit the platform configuration file, HDF5options.cmake, if you want to change + the default build environment. + (See https://portal.hdfgroup.org/display/support/How+to+Change+HDF5+CMake+Build+Options) 5. From the "myhdfstuff" directory execute the CTest Script with the following options: - On 32-bit Windows with Visual Studio 2012, execute: - ctest -S HDF5config.cmake,BUILD_GENERATOR=VS2012 -C Release -VV -O hdf5.log - On 64-bit Windows with Visual Studio 2012, execute: - ctest -S HDF5config.cmake,BUILD_GENERATOR=VS201264 -C Release -VV -O hdf5.log + On 32-bit Windows with Visual Studio 2015, execute: + ctest -S HDF5config.cmake,BUILD_GENERATOR=VS2015 -C Release -VV -O hdf5.log + On 64-bit Windows with Visual Studio 2015, execute: + ctest -S HDF5config.cmake,BUILD_GENERATOR=VS201564 -C Release -VV -O hdf5.log On 32-bit Windows with Visual Studio 2013, execute: ctest -S HDF5config.cmake,BUILD_GENERATOR=VS2013 -C Release -VV -O hdf5.log On 64-bit Windows with Visual Studio 2013, execute: ctest -S HDF5config.cmake,BUILD_GENERATOR=VS201364 -C Release -VV -O hdf5.log On Linux and Mac, execute: ctest -S HDF5config.cmake,BUILD_GENERATOR=Unix -C Release -VV -O hdf5.log + The supplied build scripts are versions of the above. The command above will configure, build, test, and create an install package in the myhdfstuff folder. It will have the format: @@ -103,19 +110,20 @@ To build HDF5 with the SZIP and ZLIB external libraries you will need to: installer on your system, you will also see a similar file that ends in either .exe (NSIS) or .msi (WiX). - The -S option uses the script version of ctest. + Notes on the command line options. + The -S option uses the script version of ctest. - The value for the -C option (as shown above, "-C Release") must - match the setting for CTEST_CONFIGURATION_TYPE in the platform - configuration file. + The value for the -C option (as shown above, "-C Release") must + match the setting for CTEST_CONFIGURATION_TYPE in the platform + configuration file. - The -VV option is for most verbose; use -V for less verbose. + The -VV option is for most verbose; use -V for less verbose. - The "-O hdf5.log" option saves the output to a log file hdf5.log. + The "-O hdf5.log" option saves the output to a log file hdf5.log. 6. To install, "X" is the current release version - On Windows, execute: + On Windows (with WiX installed), execute: HDF5-1.10."X"-win32.msi or HDF5-1.10."X"-win64.msi By default this program will install the hdf5 library into the "C:\Program Files" directory and will create the following @@ -202,7 +210,7 @@ Notes: This short set of instructions is written for users who want to cpack -C Release CPackConfig.cmake 9. To install - On Windows, execute: + On Windows (with WiX installed), execute: HDF5-1.10."X"-win32.msi or HDF5-1.10."X"-win64.msi By default this program will install the hdf5 library into the "C:\Program Files" directory and will create the following @@ -250,7 +258,7 @@ IV. Further considerations ======================================================================== 1. We suggest you obtain the latest CMake for windows from the Kitware - web site. The HDF5 1.10."X" product requires a minimum CMake version 3.2.2. + web site. The HDF5 1.10."X" product requires a minimum CMake version 3.10. 2. If you plan to use Zlib or Szip: A. Download the binary packages and install them in a central location. @@ -315,9 +323,21 @@ Notes: CMake and HDF5 how CMake support can be improved on any system. Visit the KitWare site for more information about CMake. - 3. Build and test results can be submitted to our CDash server, - please read the HDF and CDash document at: - www.hdfgroup.org/CDash/HowToSubmit. + 3. Build and test results can be submitted to our CDash server: + The CDash server for community submissions of hdf5 is at + https://cdash.hdfgroup.org. + + Submitters are requested to register their name and contact info and + maintain their test sites. After your first submission, login and go + to your "My CDash" link and claim your site. + + We ask that all submissions include the configuration information and + contact information in the CTest Notes Files upload step. See the + current reports on CDash for examples. + + Please follow the convention that "NIGHTLY" submissions maintain the same + configuration every time. "EXPERIMENTAL" submissions can be expected to + be different for each submission. 4. See the appendix at the bottom of this file for examples of using a ctest script for building and testing. Using a ctest script is @@ -416,7 +436,7 @@ These five steps are described in detail below. 2.1 Visual CMake users, click the Configure button. If this is the first time you are running cmake-gui in this directory, you will be prompted for the - generator you wish to use (for example on Windows, Visual Studio 11). + generator you wish to use (for example on Windows, Visual Studio 12). CMake will read in the CMakeLists.txt files from the source directory and display options for the HDF5 project. After the first configure you can adjust the cache settings and/or specify the locations of other programs. @@ -666,7 +686,7 @@ cmake_minimum_required (VERSION 3.10) # CTEST_SOURCE_NAME - source folder ############################################################################## -set (CTEST_SOURCE_VERSION 1.10.2) +set (CTEST_SOURCE_VERSION "1.11.0") set (CTEST_SOURCE_VERSEXT "") ############################################################################## diff --git a/release_docs/USING_HDF5_CMake.txt b/release_docs/USING_HDF5_CMake.txt index b516056..29c28a8 100644 --- a/release_docs/USING_HDF5_CMake.txt +++ b/release_docs/USING_HDF5_CMake.txt @@ -216,7 +216,7 @@ adjust the forward slash to double backslashes, except for the HDF_DIR environment variable. NOTE: this file is available at the HDF web site: - http://www.hdfgroup.org/HDF5/release/cmakebuild.html + https://portal.hdfgroup.org/display/support/Building+HDF5+with+CMake HDF5_Examples.cmake HDF5_Examples_options.cmake @@ -290,7 +290,7 @@ set(ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DSITE:STRING=${CTEST_SITE} -DBUILDN #TAR_SOURCE - name of tarfile #if(NOT DEFINED TAR_SOURCE) -# set(CTEST_USE_TAR_SOURCE "HDF5Examples-1.10.5-Source") +# set(CTEST_USE_TAR_SOURCE "HDF5Examples-1.10.7-Source") #endif() ############################################################################################################### diff --git a/release_docs/USING_HDF5_VS.txt b/release_docs/USING_HDF5_VS.txt index 3aaa56d..3019631 100644 --- a/release_docs/USING_HDF5_VS.txt +++ b/release_docs/USING_HDF5_VS.txt @@ -81,11 +81,11 @@ Using Visual Studio 2008 with HDF5 Libraries built with Visual Studio 2008 Many other common questions and hints are located online and being updated in the HDF5 FAQ. For Windows-specific questions, please see: - http://www.hdfgroup.org/HDF5/faq/windows.html + https://support.hdfgroup.org/HDF5/faq/windows.html For all other general questions, you can look in the general FAQ: - http://hdfgroup.org/HDF5-FAQ.html + https://support.hdfgroup.org/HDF5/HDF5-FAQ.html ************************************************************************ Please send email to help@hdfgroup.org for further assistance. -- cgit v0.12 From 55f1d2945df1bb0b3e0e421dac63079db8b629cd Mon Sep 17 00:00:00 2001 From: L Kurz Date: Thu, 29 Mar 2018 12:52:58 -0500 Subject: Update email address --- release_docs/USING_HDF5_CMake.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/release_docs/USING_HDF5_CMake.txt b/release_docs/USING_HDF5_CMake.txt index b516056..34ab1b4 100644 --- a/release_docs/USING_HDF5_CMake.txt +++ b/release_docs/USING_HDF5_CMake.txt @@ -313,7 +313,7 @@ endif() set(ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF5_PACKAGE_NAME:STRING=@HDF5_PACKAGE@@HDF_PACKAGE_EXT@") ############################################################################################################### -# For any comments please contact cdashhelp@hdfgroup.org +# For any comments please contact help@hdfgroup.org # ############################################################################################################### -- cgit v0.12 From 94ffe8cc53e77f2761926b135c3aa2d027a417ba Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Thu, 29 Mar 2018 13:22:51 -0500 Subject: Correct public CDash location --- CTestConfig.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CTestConfig.cmake b/CTestConfig.cmake index ae78f95..4a59b0d 100644 --- a/CTestConfig.cmake +++ b/CTestConfig.cmake @@ -24,7 +24,7 @@ if (CDASH_LOCAL) set (CTEST_DROP_LOCATION "/submit.php?project=HDF5110") else () set (CTEST_DROP_SITE "cdash.hdfgroup.org") - set (CTEST_DROP_LOCATION "/submit.php?project=HDF5110") + set (CTEST_DROP_LOCATION "/submit.php?project=HDF5") endif () set (CTEST_DROP_SITE_CDASH TRUE) -- cgit v0.12 From 725d6cbbf0c96e5b402613989fd7046e760fce21 Mon Sep 17 00:00:00 2001 From: lrknox Date: Tue, 3 Apr 2018 11:54:18 -0500 Subject: Clear RELEASE.txt after HDF5 1.10.2 release Bring README.txt and INSTALL* updates from hdf5_1_10_2 branch to hdf5_1_10 branch. Bring bin/release changes to hdff5_1_10 branch. --- README.txt | 90 ++- bin/release | 22 +- release_docs/HISTORY-1_10.txt | 1257 +++++++++++++++++++++++++++++++++++++++++ release_docs/INSTALL | 335 +++-------- release_docs/INSTALL_parallel | 16 +- release_docs/RELEASE.txt | 927 ++---------------------------- 6 files changed, 1461 insertions(+), 1186 deletions(-) diff --git a/README.txt b/README.txt index 29c667b..ac9138e 100644 --- a/README.txt +++ b/README.txt @@ -1,38 +1,80 @@ HDF5 version 1.10.3-snap0 currently under development + +------------------------------------------------------------------------------ Please refer to the release_docs/INSTALL file for installation instructions. ------------------------------------------------------------------------------ +THE HDF GROUP +--------------- + +The HDF Group is the developer of HDF5®, a high-performance software library and +data format that has been adopted across multiple industries and has become a +de facto standard in scientific and research communities. + +More information about The HDF Group, the HDF5 Community and the HDF5 software +project, tools and services can be found at the Group's website. + + https://www.hdfgroup.org/ + + +DOCUMENTATION +------------- This release is fully functional for the API described in the documentation. -See the RELEASE.txt file in the release_docs/ directory for information -specific to this release of the library. Several INSTALL* files can also be -found in the release_docs/ directory: INSTALL contains instructions for -compiling and installing the library; INSTALL_parallel contains instructions -for installing the parallel version of the library; similarly-named files -contain instructions for several environments on MS Windows systems. + https://portal.hdfgroup.org/display/HDF5/The+HDF5+API + +Full Documentation and Programming Resources for this release can be found at + https://portal.hdfgroup.org/display/HDF5 + +See the RELEASE.txt file in the release_docs/ directory for information specific +to the features and updates included in this release of the library. + +Several more files are located within the release_docs/ directory with specific +details for several common platforms and configurations. + + INSTALL - Start Here. General instructions for compiling and installing the library + INSTALL_CMAKE - instructions for building with CMake (Kitware.com) + INSTALL_parallel - instructions for building and configuring Parallel HDF5 + INSTALL_Windows and INSTALL_Cygwin - MS Windows installations. + + + +HELP AND SUPPORT +---------------- +Information regarding Help Desk and Support services is available at + + https://portal.hdfgroup.org/display/support/The+HDF+Help+Desk + + -Documentation for this release can be found at the following URL: - http://www.hdfgroup.org/HDF5/doc/. +FORUM and NEWS +-------------- +The following public forums are provided for public announcements and discussions +of interest to the general HDF5 Community. -The following mailing lists are currently set up for HDF5 Library users: + Homepage of the Forum + https://forum.hdfgroup.org - news - For announcements of HDF5 related developments, - not a discussion list. + News and Announcement + https://forum.hdfgroup.org/c/news-and-announcements-from-the-hdf-group - hdf-forum - For general discussion of the HDF5 library with - other users. + HDF5 and HDF4 Topics + https://forum.hdfgroup.org/c/hdf5 + +These forums are provided as an open and public service for searching and reading. +Posting requires completing a simple registration and allows one to join in the +conversation. Please read the following instructions pertaining to the Forum's +use and configuration + https://forum.hdfgroup.org/t/quickstart-guide-welcome-to-the-new-hdf-forum -To subscribe to a list, send mail to "-subscribe@lists.hdfgroup.org". -where is the name of the list. For example, send a request -to subscribe to the 'news' mail list to the following address: - news-subscribe@lists.hdfgroup.org -Messages sent to the list should be addressed to "@lists.hdfgroup.org". +SNAPSHOTS, PREVIOUS RELEASES AND SOURCE CODE +-------------------------------------------- +Periodically development code snapshots are provided at the following URL: + https://gamma.hdfgroup.org/ftp/pub/outgoing/hdf5/snapshots/ -Periodic code snapshots are provided at the following URL: - ftp://ftp.hdfgroup.uiuc.edu/pub/outgoing/hdf5/snapshots -Please read the README.txt file in that directory before working with a -library snapshot. +Source packages for current and previous releases are located at: + https://portal.hdfgroup.org/display/support/Downloads -The HDF5 website is located at http://hdfgroup.org/HDF5/ +Development code is available at our BitBucket Server: + https://bitbucket.hdfgroup.org/projects/HDFFV/repos/hdf5/browse -Bugs should be reported to help@hdfgroup.org. diff --git a/bin/release b/bin/release index 040711a..3f75a00 100755 --- a/bin/release +++ b/bin/release @@ -213,17 +213,18 @@ tar2cmakezip() return 1 fi - # step 2: add batch file for building CMake on window - cp /mnt/scr1/pre-release/hdf5/CMake/build-VS2013-32.bat $cmziptmpdir - cp /mnt/scr1/pre-release/hdf5/CMake/build-VS2013-64.bat $cmziptmpdir - cp /mnt/scr1/pre-release/hdf5/CMake/build-VS2015-32.bat $cmziptmpdir - cp /mnt/scr1/pre-release/hdf5/CMake/build-VS2015-64.bat $cmziptmpdir - cp /mnt/scr1/pre-release/hdf5/CMake/build-VS2017-32.bat $cmziptmpdir - cp /mnt/scr1/pre-release/hdf5/CMake/build-VS2017-64.bat $cmziptmpdir + # step 2: add batch files for building CMake on windows + cp /mnt/scr1/pre-release/hdf5/CMake/HDF5_1_10/build-VS2013-32.bat $cmziptmpdir + cp /mnt/scr1/pre-release/hdf5/CMake/HDF5_1_10/build-VS2013-64.bat $cmziptmpdir + cp /mnt/scr1/pre-release/hdf5/CMake/HDF5_1_10/build-VS2015-32.bat $cmziptmpdir + cp /mnt/scr1/pre-release/hdf5/CMake/HDF5_1_10/build-VS2015-64.bat $cmziptmpdir + cp /mnt/scr1/pre-release/hdf5/CMake/HDF5_1_10/build-VS2017-32.bat $cmziptmpdir + cp /mnt/scr1/pre-release/hdf5/CMake/HDF5_1_10/build-VS2017-64.bat $cmziptmpdir # step 3: add SZIP.tar.gz, ZLib.tar.gz and cmake files cp /mnt/scr1/pre-release/hdf5/CMake/SZip.tar.gz $cmziptmpdir cp /mnt/scr1/pre-release/hdf5/CMake/ZLib.tar.gz $cmziptmpdir + cp /mnt/scr1/pre-release/hdf5/CMake/HDF5Examples-1.10.7-Source.tar.gz $cmziptmpdir cp $cmziptmpdir/$version/config/cmake/scripts/CTestScript.cmake $cmziptmpdir cp $cmziptmpdir/$version/config/cmake/scripts/HDF5config.cmake $cmziptmpdir cp $cmziptmpdir/$version/config/cmake/scripts/HDF5options.cmake $cmziptmpdir @@ -240,6 +241,10 @@ tar2cmakezip() unix2dos -q -k $inf; \ fi\ done + + + mkdir $cmziptmpdir/CMake-$HDF5_VERS + mv $cmziptmpdir/* $cmziptmpdir/CMake-$HDF5_VERS # step 3: make zipball # -9 maximum compression # -y Store symbolic links as such in the zip archive @@ -316,9 +321,12 @@ tar2cmaketgz() # step 3: add SZIP.tar.gz, ZLib.tar.gz and cmake files cp /mnt/scr1/pre-release/hdf5/CMake/SZip.tar.gz $cmgztmpdir cp /mnt/scr1/pre-release/hdf5/CMake/ZLib.tar.gz $cmgztmpdir + cp /mnt/scr1/pre-release/hdf5/CMake/HDF5Examples-1.10.7-Source.tar.gz $cmgztmpdir cp $cmgztmpdir/$version/config/cmake/scripts/CTestScript.cmake $cmgztmpdir cp $cmgztmpdir/$version/config/cmake/scripts/HDF5config.cmake $cmgztmpdir cp $cmgztmpdir/$version/config/cmake/scripts/HDF5options.cmake $cmgztmpdir + mkdir $cmgztmpdir/CMake-$HDF5_VERS + mv $cmgztmpdir/* $cmgztmpdir/CMake-$HDF5_VERS tar czf $DEST/CMake-$HDF5_VERS.tar.gz -C $cmgztmpdir . || exit 1 # cleanup diff --git a/release_docs/HISTORY-1_10.txt b/release_docs/HISTORY-1_10.txt index 52eb273..62e3f08 100644 --- a/release_docs/HISTORY-1_10.txt +++ b/release_docs/HISTORY-1_10.txt @@ -3,12 +3,1269 @@ HDF5 History This file contains development history of the HDF5 1.10 branch +04. Release Information for hdf5-1.10.2 03. Release Information for hdf5-1.10.1 02. Release Information for hdf5-1.10.0-patch1 01. Release Information for hdf5-1.10.0 [Search on the string '%%%%' for section breaks of each release.] +%%%%1.10.2%%%% + +HDF5 version 1.10.2 released on 2018-03-29 +================================================================================ + + +INTRODUCTION + +This document describes the differences between this release and the previous +HDF5 release. It contains information on the platforms tested and known +problems in this release. For more details check the HISTORY*.txt files in the +HDF5 source. + +Note that documentation in the links below will be updated at the time of each +final release. + +Links to HDF5 documentation can be found on The HDF5 web page: + + https://portal.hdfgroup.org/display/HDF5/HDF5 + +The official HDF5 releases can be obtained from: + + https://www.hdfgroup.org/downloads/hdf5/ + +Changes from Release to Release and New Features in the HDF5-1.10.x release series +can be found at: + + https://portal.hdfgroup.org/display/HDF5/HDF5+Application+Developer%27s+Guide + +If you have any questions or comments, please send them to the HDF Help Desk: + + help@hdfgroup.org + + +CONTENTS + +- New Features +- Support for new platforms and languages +- Bug Fixes since HDF5-1.10.1 +- Supported Platforms +- Tested Configuration Features Summary +- More Tested Platforms +- Known Problems + + +New Features +============ + + Configuration and Build Systems: + -------------------------------- + - CMake builds + -------------- + + - Changed minimum CMake required version to 3.10. + + This change removed the need to support a copy of the FindMPI.cmake module, + which has been removed, along with its subfolder in the config/cmake_ext_mod + location. + + (ADB - 2018/03/09) + + - Added pkg-config file generation + + Added pkg-config file generation for the C, C++, HL, and HL C++ libraries. + In addition, builds on Linux will create h5cc, h5c++, h5hlcc, and h5hlc++ scripts in the bin + directory that use the pkg-config files. The scripts can be used to build HDF5 C and C++ + applications (i.e, similar to the compiler scripts produced by the Autotools builds). + + (ADB - 2018/03/08, HDFFV-4359) + + - Refactored use of CMAKE_BUILD_TYPE for new variable, which understands + the type of generator in use. + + Added new configuration macros to use new HDF_BUILD_TYPE variable. This + variable is set correctly for the type of generator being used for the build. + + (ADB - 2018/01/08, HDFFV-10385, HDFFV-10296) + + - Autotools builds + ------------------ + + - Removed version-specific gcc/gfortran flags for version 4.0 (inclusive) + and earlier. + + The config/gnu-flags file, which is sourced as a part of the configure + process, adds version-specific flags for use when building HDF5. Most of + these flags control warnings and do not affect the final product. + + Flags for older versions of the compiler were consolidated into the + common flags section. Moving these flags simplifies maintenance of + the file. + + The upshot of this is that building with ancient versions of gcc + (<= 4.0) will possibly no longer work without hand-hacking the file + to remove the flags not understood by that version of the compiler. + Nothing should change when building with gcc >= 4.1. + + (DER - 2017/05/31, HDFFV-9937) + + - -fno-omit-frame-pointer was added when building with debugging symbols + enabled. + + Debugging symbols can be enabled independently of the overall build + mode in both the autotools and CMake. This allows (limited) debugging + of optimized code. Since many debuggers rely on the frame pointer, + we've disabled this optimization when debugging symbols are requested + (e.g.: via building with --enable-symbols). + + (DER - 2017/05/31, HDFFV-10226) + + + Library: + -------- + - Added an enumerated value to H5F_libver_t for H5Pset_libver_bounds(). + + Currently, the library defines two values for H5F_libver_t and supports + only two pairs of (low, high) combinations as derived from these values. + Thus the bounds setting via H5Pset_libver_bounds() is rather restricted. + + Added an enumerated value (H5F_LIBVER_V18) to H5F_libver_t and + H5Pset_libver_bounds() now supports five pairs of (low, high) combinations + as derived from these values. This addition provides the user more + flexibility in setting bounds for object creation. + + (VC - 2018/03/14) + + - Added prefix option to VDS files. + + Currently, VDS source files must be in the active directory to be + found by the virtual file. Adding the option of a prefix to be set + on the virtual file, using a data access property list (DAPL), + allows the source files to locate at an absolute or relative path + to the virtual file. + Private utility functions in H5D and H5L packages merged into single + function in H5F package. + + New public APIs: + herr_t H5Pset_virtual_prefix(hid_t dapl_id, const char* prefix); + ssize_t H5Pget_virtual_prefix(hid_t dapl_id, char* prefix /*out*/, size_t size); + The prefix can also be set with an environment variable, HDF5_VDS_PREFIX. + + (ADB - 2017/12/12, HDFFV-9724, HDFFV-10361) + + - H5FDdriver_query() API call added to the C library. + + This new library call allows the user to query a virtual file driver + (VFD) for the feature flags it supports (listed in H5FDpublic.h). + This can be useful to determine if a VFD supports SWMR, for example. + + Note that some VFDs have feature flags that may only be present + after a file has been created or opened (e.g.: the core VFD will + have the H5FD_FEAT_POSIX_COMPAT_HANDLE flag set if the backing + store is switched on). Since the new API call queries a generic VFD + unassociated with a file, these flags will never be returned. + + (DER - 2017/05/31, HDFFV-10215) + + - H5FD_FEAT_DEFAULT_VFD_COMPATIBLE VFD feature flag added to the C library. + + This new feature flag indicates that the VFD is compatible with the + default VFD. VFDs that set this flag create single files that follow + the canonical HDF5 file format. + + (DER - 2017/05/31, HDFFV-10214) + + - The H5I_REFERENCE value in the H5I_type_t enum (defined in H5Ipublic.h) + has been marked as deprectated. + + This ID type value is not used in the C library. i.e.: There are no + hid_t values that are of ID type H5I_REFERENCE. + + This enum value will be removed in a future major version of the library. + The code will remain unchanged in the HDF5 1.10.x releases and branches. + + (DER - 2017/04/05, HDFFV-10252) + + + Parallel Library: + ----------------- + - Enabled compression for parallel applications. + + With this release parallel applications can create and write compressed + datasets (or the datasets with the filters such as Fletcher32 applied). + + (EIP - 2018/03/29) + + - Addressed slow file close on some Lustre file systems. + + Slow file close has been reported on some Lustre file systems. + While the ultimate cause is not understood fully, the proximate + cause appears to be long delays in MPI_File_set_size() calls at + file close and flush. + + To minimize this problem pending a definitive diagnosis and fix, + PHDF5 has been modified to avoid MPI_File_set_size() calls when + possible. This is done by comparing the library's EOA (End of + Allocation) with the file systems EOF, and skipping the + MPI_File_set_size() call if the two match. + + (JRM - 2018/03/29) + + - Optimized parallel open/location of the HDF5 super-block. + + Previous releases of PHDF5 required all parallel ranks to + search for the HDF5 superblock signature when opening the + file. As this is accomplished more or less as a synchronous + operation, a large number of processes can experience a + slowdown in the file open due to filesystem contention. + + As a first step in improving the startup/file-open performance, + we allow MPI rank 0 of the associated MPI communicator to locate + the base offset of the super-block and then broadcast that result + to the remaining ranks in the parallel group. Note that this + approach is utilized ONLY during file opens which employ the MPIO + file driver in HDF5 by previously having called H5Pset_fapl_mpio(). + + HDF5 parallel file operations which do not employ multiple ranks + e.g. specifiying MPI_COMM_SELF (whose MPI_Comm_size == 1) + as opposed to MPI_COMM_WORLD, will not be affected by this + optimization. Conversely, parallel file operations on subgroups + of MPI_COMM_WORLD are allowed to be run in parallel with each + subgroup operating as an independant collection of processes. + + (RAW - 2017/10/10, HDFFV-10294) + + - Added large (>2GB) MPI-IO transfers. + + Previous releases of PHDF5 would fail when attempting to + read or write greater than 2GB of data in a single IO operation. + This issue stems principally from an MPI API whose definitions + utilize 32 bit integers to describe the number of data elements + and datatype that MPI should use to effect a data transfer. + Historically, HDF5 has invoked MPI-IO with the number of + elements in a contiguous buffer represented as the length + of that buffer in bytes. + + Resolving the issue and thus enabling larger MPI-IO transfers + is accomplished first, by detecting when a user IO request would + exceed the 2GB limit as described above. Once a transfer request + is identified as requiring special handling, PHDF5 now creates a + derived datatype consisting of a vector of fixed sized blocks + which is in turn wrapped within a single MPI_Type_struct to + contain the vector and any remaining data. The newly created + datatype is then used in place of MPI_BYTE and can be used to + fulfill the original user request without encountering API + errors. + + (RAW - 2017/09/10, HDFFV-8839) + + + C++ Library: + ------------ + - The following C++ API wrappers have been added to the C++ Library: + + H5Lcreate_soft: + // Creates a soft link from link_name to target_name. + void link(const char *target_name, const char *link_name,...) + void link(const H5std_string& target_name,...) + + + H5Lcreate_hard: + // Creates a hard link from new_name to curr_name. + void link(const char *curr_name, const Group& new_loc,...) + void link(const H5std_string& curr_name, const Group& new_loc,...) + + // Creates a hard link from new_name to curr_name in same location. + void link(const char *curr_name, const hid_t same_loc,...) + void link(const H5std_string& curr_name, const hid_t same_loc,...) + + Note: previous version of H5Location::link will be deprecated. + + + H5Lcopy: + // Copy an object from a group of file to another. + void copyLink(const char *src_name, const Group& dst,...) + void copyLink(const H5std_string& src_name, const Group& dst,...) + + // Copy an object from a group of file to the same location. + void copyLink(const char *src_name, const char *dst_name,...) + void copyLink(const H5std_string& src_name,...) + + + H5Lmove: + // Rename an object in a group or file to a new location. + void moveLink(const char* src_name, const Group& dst,...) + void moveLink(const H5std_string& src_name, const Group& dst,...) + + // Rename an object in a group or file to the same location. + void moveLink(const char* src_name, const char* dst_name,...) + void moveLink(const H5std_string& src_name,...) + + Note: previous version H5Location::move will be deprecated. + + + H5Ldelete: + // Removes the specified link from this location. + void unlink(const char *link_name, + const LinkAccPropList& lapl = LinkAccPropList::DEFAULT) + void unlink(const H5std_string& link_name, + const LinkAccPropList& lapl = LinkAccPropList::DEFAULT) + + Note: additional parameter is added to previous H5Location::unlink. + + + H5Tencode and H5Tdecode: + // Creates a binary object description of this datatype. + void DataType::encode() - C API H5Tencode() + + // Returns the decoded type from the binary object description. + DataType::decode() - C API H5Tdecode() + ArrayType::decode() - C API H5Tdecode() + CompType::decode() - C API H5Tdecode() + DataType::decode() - C API H5Tdecode() + EnumType::decode() - C API H5Tdecode() + FloatType::decode() - C API H5Tdecode() + IntType::decode() - C API H5Tdecode() + StrType::decode() - C API H5Tdecode() + VarLenType::decode() - C API H5Tdecode() + + + H5Lget_info: + // Returns the information of the named link. + H5L_info_t getLinkInfo(const H5std_string& link_name,...) + + (BMR - 2018/03/11, HDFFV-10149) + + - Added class LinkCreatPropList for link create property list. + + (BMR - 2018/03/11, HDFFV-10149) + + - Added overloaded functions H5Location::createGroup to take a link + creation property list. + Group createGroup(const char* name, const LinkCreatPropList& lcpl) + Group createGroup(const H5std_string& name, const LinkCreatPropList& lcpl) + + (BMR - 2018/03/11, HDFFV-10149) + + - A document is added to the HDF5 C++ API Reference Manual to show the + mapping from a C API to C++ wrappers. It can be found from the main + page of the C++ API Reference Manual. + + (BMR - 2017/10/17, HDFFV-10151) + + + Java Library: + ---------------- + - Wrapper added for enabling the error stack. + + H5error_off would disable the error stack reporting. In order + to re-enable the reporting, the error stack info needs to be + saved so that H5error_on can revert state. + + (ADB - 2018/03/13, HDFFV-10412) + + - Wrappers were added for the following C APIs: + H5Pset_evict_on_close + H5Pget_evict_on_close + H5Pset_chunk_opts + H5Pget_chunk_opts + H5Pset_efile_prefix + H5Pget_efile_prefix + H5Pset_virtual_prefix + H5Pget_virtual_prefix + + (ADB - 2017/12/20) + + - The H5I_REFERENCE value in the H5I_type_t enum (defined in H5Ipublic.h) + has been marked as deprectated. + + JNI code which refers to this value will be removed in a future + major version of the library. The code will remain unchanged in the + 1.10.x releases and branches. + + See the C library section, above, for further information. + + (HDFFV-10252, DER, 2017/04/05) + + + Tools: + ------ + - h5diff has a new option to display error stack. + + Updated h5diff with the --enable-error-stack argument, which + enables the display of the hdf5 error stack. This completes the + improvement to the main tools: h5copy, h5diff, h5dump, h5ls and + h5repack. + + (ADB - 2017/08/30, HDFFV-9774) + + +Support for new platforms, languages and compilers. +======================================= + - None + +Bug Fixes since HDF5-1.10.1 release +================================== + + Library + ------- + - The data read after a direct chunk write to a chunked dataset with + one chunk was incorrect. + + The problem was due to the passing of a null dataset pointer to + the insert callback for the chunk index in the routine + H5D__chunk_direct_write() in H5Dchunk.c + The dataset was a single-chunked dataset which will use the + single chunk index when latest format was enabled on file creation. + The single chunk index was the only index that used this pointer + in the insert callback. + + Passed the dataset pointer to the insert callback for the chunk + index in H5D__chunk_direct_write(). + + (VC - 2018/03/20, HDFFV-10425) + + - Added public routine H5DOread_chunk to the high-level C library. + + The patch for H5DOwrite_chunk() to write an entire chunk to the file + directly was contributed by GE Healthcare and integrated by The HDF Group + developers. + + (VC - 2017/05/19, HDFFV-9934) + + - Freeing of object header after failed checksum verification. + + It was discovered that the object header (in H5Ocache.c) was not released properly + when the checksum verification failed and a re-load of the object + header was needed. + + Freed the object header that failed the chksum verification only + after the new object header is reloaded, deserialized and set up. + + (VC - 2018/03/14, HDFFV-10209) + + - Updated H5Pset_evict_on_close in H5Pfapl.c + + Changed the minor error number from H5E_CANTSET to H5E_UNSUPPORTED for + parallel library. + + (ADB - 2018/03/06, HDFFV-10414) + + - Fixed the problems with the utility function that could not handle lowercase + Windows drive letters. + + Added call to upper function for drive letter. + + (ADB - 2017/12/18, HDFFV-10307) + + - Fixed H5Sencode() bug when the number of elements selected was > 2^32. + + H5Sencode() incorrectly encodes dataspace selection with number of + elements exceeding 2^32. When decoding such selection via H5Sdecode(), + the number of elements in the decoded dataspace is not the same as + what is encoded. This problem exists for H5S_SEL_HYPER and + H5S_SEL_POINTS encoding. + + The cause of the problem is due to the fact that the library uses 32 bits to + encode counts and block offsets for the selection. + The solution is to use the original 32 bit encodings if possible, + but use a different way to encode selection if more that 32 bits is needed. + See details in the RFC: H5Sencode/H5Sdecode Format Change i + https://bitbucket.hdfgroup.org/projects/HDFFV/repos/hdf5doc/browse/RFCs/HDF5_Library/H5SencodeFormatChange. + + (VC - 2017/11/28, HDFFV-9947) + + - Fixed filter plugin handling in H5PL.c and H5Z.c to not require i availability of + dependent libraries (e.g., szip or zlib). + + It was discovered that the dynamic loading process used by + filter plugins had issues with library dependencies. + + CMake build process changed to use LINK INTERFACE keywords, which + allowed HDF5 C library to make dependent libraries private. The + filter plugin libraries no longer require dependent libraries + (such as szip or zlib) to be available. + + (ADB - 2017/11/16, HDFFV-10328) + + - Fixed rare object header corruption bug. + + In certain cases, such as when converting large attributes to dense + storage, an error could occur which would either fail an assertion or + cause file corruption. Fixed and added test. + + (NAF - 2017/11/14, HDFFV-10274) + + - Updated H5Zfilter_avail in H5Z.c. + + The public function checked for plugins, while the private + function did not. + + Modified H5Zfilter_avail and private function, H5Z_filter_avail. + Moved check for plugin from public to private function. Updated + H5P__set_filter due to change in H5Z_filter_avail. Updated tests. + + (ADB - 2017/10/10, HDFFV-10297, HDFFV-10319) + + - h5dump produced SEGFAULT when dumping corrypted file. + + The behavior was due to the error in the internal function H5HL_offset_into(). + + (1) Fixed H5HL_offset_into() to return error when offset exceeds heap data + block size. + (2) Fixed other places in the library that call this routine to detect + error routine. + + (VC - 2017/08/30, HDFFV-10216) + + - Fixes for paged aggregation feature. + + Skip test in test/fheap.c when: + (1) multi/split drivers and + (2) persisting free-space or using paged aggregation strategy + + (VC, 2017/07/10) + + Changes made based on RFC review comments: + (1) Added maximum value for file space page size + (2) Dropped check for page end metadata threshold + (3) Removed "can_shrink" and "shrink" callbacks for small section class + + (VC - 2017/06/09) + + - Fixed for infinite loop in H5VM_power2up(). + + The function H5VM_power2up() returns the next power of 2 + for n. When n exceeds 2^63, it overflows and becomes 0 causing + the infinite looping. + + The fix ensures that the function checks for n >= 2^63 + and returns 0. + + (VC - 2017/07/10, HDFFV-10217) + + - Fixed for H5Ocopy doesn't work with open identifiers. + + Changes made so that raw data for dataset objects are copied from + cached info when possible instead of flushing objects to file and + read them back in again. + + (VC - 2017/07/05, HDFFV-7853) + + - An uninitialized struct could cause a memory access error when using + variable-length or reference types in a compressed, chunked dataset. + + A struct containing a callback function pointer and a pointer to some + associated data was used before initialization. This could cause a + memory access error and system crash. This could only occur under + unusual conditions when using variable-lenth and reference types in + a compressed, chunked dataset. + + On recent versions of Visual Studio, when built in debug mode, the + debug heap will complain and cause a crash if the code in question + is executed (this will cause the objcopy test to fail). + + (DER - 2017/11/21, HDFFV-10330) + + - Fixed collective metadata writes on file close. + + It was discovered that metadata was being written twice as part of + the parallel file close behavior, once independently and once + collectively. + + A fix for this error was included as part of the parallel compression + feature but remained undocumented here. + + (RAW - 2017/12/01, HDFFV-10272) + + - If an HDF5 file contains a filter pipeline message with a 'number of + filters' field that exceeds the maximum number of allowed filters, + the error handling code will attempt to dereference a NULL pointer. + + This issue was reported to The HDF Group as issue #CVE-2017-17505. + https://security-tracker.debian.org/tracker/CVE-2017-17505 + https://cve.mitre.org/cgi-bin/cvename.cgi?name=3DCVE-2017-17505 + + NOTE: The HDF5 C library cannot produce such a file. This condition + should only occur in a corrupt (or deliberately altered) file + or a file created by third-party software. + + This problem arose because the error handling code assumed that + the 'number of filters' field implied that a dynamic array of that + size had already been created and that the cleanup code should + iterate over that array and clean up each element's resources. If + an error occurred before the array has been allocated, this will + not be true. + + This has been changed so that the number of filters is set to + zero on errors. Additionally, the filter array traversal in the + error handling code now requires that the filter array not be NULL. + + (DER - 2018/02/06, HDFFV-10354) + + - If an HDF5 file contains a filter pipeline message which contains + a 'number of filters' field that exceeds the actual number of + filters in the message, the HDF5 C library will read off the end of + the read buffer. + + This issue was reported to The HDF Group as issue #CVE-2017-17506. + https://security-tracker.debian.org/tracker/CVE-2017-17506 + https://cve.mitre.org/cgi-bin/cvename.cgi?name=3DCVE-2017-17506 + + NOTE: The HDF5 C library cannot produce such a file. This condition + should only occur in a corrupt (or deliberately altered) file + or a file created by third-party software. + + The problem was fixed by passing the buffer size with the buffer + and ensuring that the pointer cannot be incremented off the end + of the buffer. A mismatch between the number of filters declared + and the actual number of filters will now invoke normal HDF5 + error handling. + + (DER - 2018/02/26, HDFFV-10355) + + - If an HDF5 file contains a malformed compound datatype with a + suitably large offset, the type conversion code can run off + the end of the type conversion buffer, causing a segmentation + fault. + + This issue was reported to The HDF Group as issue #CVE-2017-17507. + https://security-tracker.debian.org/tracker/CVE-2017-17506 + https://cve.mitre.org/cgi-bin/cvename.cgi?name=3DCVE-2017-17506 + + NOTE: The HDF5 C library cannot produce such a file. This condition + should only occur in a corrupt (or deliberately altered) file + or a file created by third-party software. + + THE HDF GROUP WILL NOT FIX THIS BUG AT THIS TIME + + Fixing this problem would involve updating the publicly visible + H5T_conv_t function pointer typedef and versioning the API calls + which use it. We normally only modify the public API during + major releases, so this bug will not be fixed at this time. + + (DER - 2018/02/26, HDFFV-10356) + + - If an HDF5 file contains a malformed compound type which contains + a member of size zero, a division by zero error will occur while + processing the type. + + This issue was reported to The HDF Group as issue #CVE-2017-17508. + https://security-tracker.debian.org/tracker/CVE-2017-17508 + https://cve.mitre.org/cgi-bin/cvename.cgi?name=3DCVE-2017-17508 + + NOTE: The HDF5 C library cannot produce such a file. This condition + should only occur in a corrupt (or deliberately altered) file + or a file created by third-party software. + + Checking for zero before dividing fixes the problem. Instead of the + division by zero, the normal HDF5 error handling is invoked. + + (DER - 2018/02/26, HDFFV-10357) + + - If an HDF5 file contains a malformed symbol table node that declares + it contains more symbols than it actually contains, the library + can run off the end of the metadata cache buffer while processing + the symbol table node. + + This issue was reported to The HDF Group as issue #CVE-2017-17509. + https://security-tracker.debian.org/tracker/CVE-2017-17509 + https://cve.mitre.org/cgi-bin/cvename.cgi?name=3DCVE-2017-17509 + + NOTE: The HDF5 C library cannot produce such a file. This condition + should only occur in a corrupt (or deliberately altered) file + or a file created by third-party software. + + Performing bounds checks on the buffer while processing fixes the + problem. Instead of the segmentation fault, the normal HDF5 error + handling is invoked. + + (DER - 2018/03/12, HDFFV-10358) + + - Fixed permissions passed to open(2) on file create. + + On Windows, the POSIX permissions passed to open(2) when creating files + were only incidentally correct. They are now set to the correct value of + (_S_IREAD | _S_IWRITE). + + On other platforms, the permissions were set to a mix of 666, 644, and + 000. They are now set uniformly to 666. + + (DER - 2017/04/28, HDFFV-9877) + + - The H5FD_FEAT_POSIX_COMPAT_HANDLE flag is no longer used to determine + if a virtual file driver (VFD) is compatible with SWMR. + + Use of this VFD feature flag was not in line with the documentation in + the public H5FDpublic.h file. In particular, it was being used as a + proxy for determining if SWMR I/O is allowed. This is unecessary as we + already have a feature flag for this (H5FD_SUPPORTS_SWMR_IO). + + (DER - 2017/05/31, HDFFV-10214) + + + Configuration + ------------- + - CMake changes + + - Updated CMake commands configuration. + + A number of improvements were made to the CMake commands. Most + changes simplify usage or eliminate unused constructs. Also, + some changes support better cross-platform support. + + (ADB - 2018/02/01, HDFFV-10398) + + - Corrected usage of CMAKE_BUILD_TYPE variable. + + The use of the CMAKE_BUILD_TYPE is incorrect for multi-config + generators (Visual Studio and XCode) and is optional for single + config generators. Created a new macro to check + GLOBAL PROPERTY -> GENERATOR_IS_MULTI_CONFIG + Created two new HDF variable, HDF_BUILD_TYPE and HDF_CFG_BUILD_TYPE. + Defaults for these variables is "Release". + + (ADB - 2018/01/10, HDFFV-10385) + + - Added replacement of fortran flags if using static CRT. + + Added TARGET_STATIC_CRT_FLAGS call to HDFUseFortran.cmake file in + config/cmake_ext_mod folder. + + (ADB - 2018/01/08, HDFFV-10334) + + + - The hdf5 library used shared szip and zlib, which needlessly required + applications to link with the same szip and zlib libraries. + + Changed the target_link_libraries commands to use the static libs. + Removed improper link duplication of szip and zlib. + Adjusted the link dependencies and the link interface values of + the target_link_libraries commands. + + (ADB - 2017/11/14, HDFFV-10329) + + - CMake MPI + + CMake implementation for MPI was problematic and would create incorrect + MPI library references in the hdf5 libraries. + + Reworked the CMake MPI code to properly create CMake targets. Also merged + the latest CMake FindMPI.cmake changes to the local copy. This is necessary + until HDF changes the CMake minimum to 3.9 or greater. + + (ADB - 2017/11/02, HDFFV-10321) + + - Corrected FORTRAN_HAVE_C_LONG_DOUBLE processing in the autotools. + + A bug in the autotools Fortran processing code always set the + FORTRAN_HAVE_C_LONG_DOUBLE variable to be true regardless of + whether or not a C long double type was present. + + This would cause compilation failures on platforms where a C + long double type was not available and the Fortran wrappers + were being built. + + (DER - 2017/07/05, HDFFV-10247) + + - The deprecated --enable-production and --enable-debug configure options + failed to emit errors when passed an empty string + (e.g.: --enable-debug=""). + + Due to the way we checked for these options being set, it was possible + to avoid the error message and continue configuration if an empty string + was passed to the option. + + Any use of --enable-production or --enable-debug will now halt the + configuration step and emit a helpful error message + (use --enable-build-mode=debug|production instead). + + (DER - 2017/07/05, HDFFV-10248) + + - CMake + + Too many commands for POST_BUILD step caused command line to be + too big on windows. + + Changed foreach of copy command to use a custom command with the + use of the HDFTEST_COPY_FILE macro. + + (ADB - 2017/07/12, HDFFV-10254) + + - CMake test execution environment + + The parallel HDF5 test: 't_pread' assumed the use of autotools + and the directory structure associated with that testing approach. + Modified the test code to check whether the 'h5jam' utility can be + found in the same directory as the test executable (which is + preferred directory structure utilized by cmake) and if found + will invoke the tool directly rather than utilizing a relative path. + + (RAW - 2017/11/03, HDFFV-10318) + + - Fortran compilation fails for xlf and CMake builds. + + Fixed CMake shared library build for H5match_types and modules + + (MSB - 2017/12/19, HDFFV-10363) + + - Shared libraries fail test on OSX with Fortran enabled with CMake. + + Fixed by removing the F77 use of EQUIVALENCE and COMMON, replaced + using MODULES. Updated CMake. + + (MSB - 2017/12/07, HDFFV-10223) + + - The bin/trace script now emits an error code on problems and autogen.sh + will fail if bin/trace fails. + + The bin/trace script adds tracing functionality to public HDF5 API calls. + It is only of interest to developers who modify the HDF5 source code. + Previously, bin/trace just wrote an error message to stdout when it + encountered problems, so autogen.sh processing did not halt and a broken + version of the library could be built. The script will now return an + error code when it encounters problems, and autogen.sh will fail. + + This only affects users who run autogen.sh to rebuild the Autotools files, + which is not necessary to build HDF5 from source in official releases of the + library. CMake users are unaffected as bin/trace is not run via CMake + at this time. + + (DER - 2017/04/25, HDFFV-10178) + + - FC_BASENAME was changed from gfortran40 to gfortran in a few places. + + In the autotools, FC_BASENAME was set to gfortran40 in a few locations + (config/gnu-fflags and config/freebsd). This was probably a historical + artifact and did not seem to affect many users. + + The value is now correctly set to gfortran. + + (DER - 2017/05/26, HDFFV-10249) + + - The ar flags were changed to -cr (was: -cru) + + The autotools set the flags for ar to -cru by default. The -u flag, + which allows selective replacement of only the members which have + changed, raises warnings on some platforms, so the flags are now set to + -cr via AR_FLAGS in configure.ac. This causes the static library to + always be completely recreated from the object files on each build. + + (DER - 2017/11/15, HDFFV-10428) + + + Fortran + -------- + - Fixed compilation errors when using Intel 18 Fortran compilers + (MSB - 2017/11/3, HDFFV-10322) + + Tools + ----- + - h5clear + + An enhancement to the tool in setting a file's stored EOA. + + It was discovered that a crashed file's stored EOA in the superblock + was smaller than the actual file's EOF. When the file was reopened + and closed, the library truncated the file to the stored EOA. + + Added an option to the tool in setting the file's stored EOA in the + superblock to the maximum of (EOA, EOF) + increment. + An option was also added to print the file's EOA and EOF. + + (VC - 2018/03/14, HDFFV-10360) + + - h5repack + + h5repack changes the chunk parameters when a change of layout is not + specified and a filter is applied. + + HDFFV-10297, HDFFV-10319 reworked code for h5repack and h5diff code + in the tools library. The check for an existing layout was incorrectly + placed into an if block and not executed. The check was moved into + the normal path of the function. + + (ADB - 2018/02/21, HDFFV-10412) + + - h5dump + + The tools library will hide the error stack during file open. + + While this is preferable almost always, there are reasons to enable + display of the error stack when a tool will not open a file. Adding an + optional argument to the --enable-error-stack will provide this use case. + As an optional argument it will not affect the operation of the + --enable-error-stack. h5dump is the only tool to implement this change. + + (ADB - 2018/02/15, HDFFV-10384) + + - h5dump + + h5dump would output an indented blank line in the filters section. + + h5dump overused the h5tools_simple_prefix function, which is a + function intended to account for the data index (x,y,z) option. + Removed the function call for header information. + + (ADB - 2018/01/25, HDFFV-10396) + + - h5repack + + h5repack incorrectly searched internal object table for name. + + h5repack would search the table of objects for a name, if the + name did not match it tried to determine if the name without a + leading slash would match. The logic was flawed! The table + stored names(paths) without a leading slash and did a strstr + of the table path to the name. + The assumption was that if there was a difference of one then + it was a match, however "pressure" would match "/pressure" as + well as "/pressure1", "/pressure2", etc. Changed logic to remove + any leading slash and then do a full compare of the name. + + (ADB - 2018/01/18, HDFFV-10393) + + - h5repack + + h5repack failed to handle command line parameters for customer filters. + + User defined filter parameter conversions would fail when integers were + represented on the command line with character string + larger then 9 characters. Increased local variable array for storing + the current command line parameter to prevent buffer overflows. + + (ADB - 2018/01/17, HDFFV-10392) + + - h5diff + + h5diff seg faulted if comparing VL strings against fixed strings. + + Reworked solution for HDFFV-8625 and HDFFV-8639. Implemented the check + for string objects of same type in the diff_can_type function by + adding an if(tclass1 == H5T_STRING) block. This "if block" moves the + same check that was added for attributes to this function, which is + used by all object types. This function handles complex type structures. + Also added a new test file in h5diffgenttest for testing this issue + and removed the temporary files used in the test scripts. + + (ADB - 2018/01/04, HDFFV-8745) + + - h5repack + + h5repack failed to copy a dataset with existing filter. + + Reworked code for h5repack and h5diff code in the tools library. Added + improved error handling, cleanup of resources and checks of calls. + Modified H5Zfilter_avail and private function, H5Z_filter_avail. + Moved check for plugin from public to private function. Updated + H5P__set_filter due to change in H5Z_filter_avail. Updated tests. + Note, h5repack output display has changed to clarify the individual + steps of the repack process. The output indicates if an operation + applies to all objects. Lines with notation and no information + have been removed. + + (ADB - 2017/10/10, HDFFV-10297, HDFFV-10319) + + - h5repack + + h5repack always set the User Defined filter flag to H5Z_FLAG_MANDATORY. + + Added another parameter to the 'UD=' option to set the flag by default + to '0' or H5Z_FLAG_MANDATORY, the other choice is '1' or H5Z_FLAG_OPTIONAL. + + (ADB - 2017/08/31, HDFFV-10269) + + - h5ls + + h5ls generated error on stack when it encountered a H5S_NULL + dataspace. + + Adding checks for H5S_NULL before calling H5Sis_simple (located + in the h5tools_dump_mem function) fixed the issue. + + (ADB - 2017/08/17, HDFFV-10188) + + - h5repack + + Added tests to h5repack.sh.in to verify options added for paged + aggregation work as expected. + + (VC - 2017/08/03) + + - h5dump + + h5dump segfaulted on output of XML file. + + Function that escape'd strings used the full buffer length + instead of just the length of the replacement string in a + strncpy call. Using the correct length fixed the issue. + + (ADB - 2017/08/01, HDFFV-10256) + + - h5diff + + h5diff segfaulted on compare of a NULL variable length string. + + Improved h5diff compare of strings by adding a check for + NULL strings and setting the lengths to zero. + + (ADB - 2017/07/25, HDFFV-10246) + + - h5import + + h5import crashed trying to import data from a subset of a dataset. + + Improved h5import by adding the SUBSET keyword. h5import understands + to use the Count times the Block as the size of the dimensions. + Added INPUT_B_ORDER keyword to old-style configuration files. + The import from h5dump function expects the binary files to use native + types (FILE '-b' option) in the binary file. + + (ADB - 2017/06/15, HDFFV-10219) + + - h5repack + + h5repack did not maintain the creation order flag of the root + group. + + Improved h5repack by reading the creation order and applying the + flag to the new root group. Also added arguments to set the + order and index direction, which applies to the traversing of the + original file, on the command line. + + (ADB - 2017/05/26, HDFFV-8611) + + - h5diff + + h5diff failed to account for strpad type and null terminators + of char strings. Also, h5diff failed to account for string length + differences and would give a different result depending on file + order in the command line. + + Improved h5diff compare of strings and arrays by adding a check for + string lengths and if the strpad was null filled. + + (ADB - 2017/05/18, HDFFV-9055, HDFFV-10128) + + High-Level APIs: + ------ + - H5DOwrite_chunk() problems when overwriting an existing chunk with + no filters enabled. + + When overwriting chunks and no filters were being used, the library would + fail (when asserts are enabled, e.g. debug builds) or incorrectly + insert additional chunks instead of overwriting (when asserts are not + enabled, e.g. production builds). + + This has been fixed and a test was added to the hl/test_dset_opt test. + + (DER - 2017/05/11, HDFFV-10187) + + C++ APIs + -------- + - Removal of memory leaks. + + A private function was inadvertently called, causing memory leaks. This + is now fixed. + + (BMR - 2018/03/12 - User's reported in email) + + Testing + ------- + - Memory for three variables in testphdf5's coll_write_test was malloced + but not freed, leaking memory when running the test. + + The variables' memory is now freed. + + (LRK - 2018/03/12, HDFFV-10397) + + - Refactored the testpar/t_bigio.c test to include ALARM macros + + Changed the test to include the ALARM_ON and ALARM_OFF macros which + are intended to prevent nightly test hangs that have been observed + with this particular parallel test example. The code was also modified to + simplify status reporting (only from MPI rank 0) and additional + status checking added. + + (RAW - 2017/11/08, HDFFV-10301) + + +Supported Platforms +=================== + + Linux 2.6.32-696.16.1.el6.ppc64 gcc (GCC) 4.4.7 20120313 (Red Hat 4.4.7-18) + #1 SMP ppc64 GNU/Linux g++ (GCC) 4.4.7 20120313 (Red Hat 4.4.7-18) + (ostrich) GNU Fortran (GCC) 4.4.7 20120313 (Red Hat 4.4.7-18) + IBM XL C/C++ V13.1 + IBM XL Fortran V15.1 + + Linux 3.10.0-327.10.1.el7 GNU C (gcc), Fortran (gfortran), C++ (g++) + #1 SMP x86_64 GNU/Linux compilers: + (kituo/moohan) Version 4.8.5 20150623 (Red Hat 4.8.5-4) + Version 4.9.3, Version 5.2.0, + Intel(R) C (icc), C++ (icpc), Fortran (icc) + compilers: + Version 17.0.0.098 Build 20160721 + MPICH 3.1.4 compiled with GCC 4.9.3 + + SunOS 5.11 32- and 64-bit Sun C 5.12 SunOS_sparc + (emu) Sun Fortran 95 8.6 SunOS_sparc + Sun C++ 5.12 SunOS_sparc + + Windows 7 Visual Studio 2012 w/ Intel Fortran 15 (cmake) + Visual Studio 2013 w/ Intel Fortran 15 (cmake) + Visual Studio 2015 w/ Intel Fortran 16 (cmake) + + Windows 7 x64 Visual Studio 2012 w/ Intel Fortran 15 (cmake) + Visual Studio 2013 w/ Intel Fortran 15 (cmake) + Visual Studio 2015 w/ Intel Fortran 16 (cmake) + Visual Studio 2015 w/ Intel C, Fortran 2017 (cmake) + Visual Studio 2015 w/ MSMPI 8 (cmake) + Cygwin(CYGWIN_NT-6.1 2.8.0(0.309/5/3) + gcc and gfortran compilers (GCC 5.4.0) + (cmake and autotools) + + Windows 10 Visual Studio 2015 w/ Intel Fortran 16 (cmake) + Cygwin(CYGWIN_NT-6.1 2.8.0(0.309/5/3) + gcc and gfortran compilers (GCC 5.4.0) + (cmake and autotools) + + Windows 10 x64 Visual Studio 2015 w/ Intel Fortran 16 (cmake) + + Mac OS X Yosemite 10.10.5 Apple clang/clang++ version 6.1 from Xcode 7.0 + 64-bit gfortran GNU Fortran (GCC) 4.9.2 + (osx1010dev/osx1010test) Intel icc/icpc/ifort version 15.0.3 + + Mac OS X El Capitan 10.11.6 Apple clang/clang++ version 7.3.0 from Xcode 7.3 + 64-bit gfortran GNU Fortran (GCC) 5.2.0 + (osx1011dev/osx1011test) Intel icc/icpc/ifort version 16.0.2 + + Mac OS Sierra 10.12.6 Apple LLVM version 8.1.0 (clang/clang++-802.0.42) + 64-bit gfortran GNU Fortran (GCC) 7.1.0 + (swallow/kite) Intel icc/icpc/ifort version 17.0.2 + + +Tested Configuration Features Summary +===================================== + + In the tables below + y = tested + n = not tested in this release + C = Cluster + W = Workstation + x = not working in this release + dna = does not apply + ( ) = footnote appears below second table + = testing incomplete on this feature or platform + +Platform C F90/ F90 C++ zlib SZIP + parallel F2003 parallel +Solaris2.11 32-bit n y/y n y y y +Solaris2.11 64-bit n y/n n y y y +Windows 7 y y/y n y y y +Windows 7 x64 y y/y y y y y +Windows 7 Cygwin n y/n n y y y +Windows 7 x64 Cygwin n y/n n y y y +Windows 10 y y/y n y y y +Windows 10 x64 y y/y n y y y +Mac OS X Mountain Lion 10.8.5 64-bit n y/y n y y y +Mac OS X Mavericks 10.9.5 64-bit n y/y n y y y +Mac OS X Yosemite 10.10.5 64-bit n y/y n y y y +Mac OS X El Capitan 10.11.6 64-bit n y/y n y y y +CentOS 7.2 Linux 2.6.32 x86_64 PGI n y/y n y y y +CentOS 7.2 Linux 2.6.32 x86_64 GNU y y/y y y y y +CentOS 7.2 Linux 2.6.32 x86_64 Intel n y/y n y y y +Linux 2.6.32-573.18.1.el6.ppc64 n y/y n y y y + + +Platform Shared Shared Shared Thread- + C libs F90 libs C++ libs safe +Solaris2.11 32-bit y y y y +Solaris2.11 64-bit y y y y +Windows 7 y y y y +Windows 7 x64 y y y y +Windows 7 Cygwin n n n y +Windows 7 x64 Cygwin n n n y +Windows 10 y y y y +Windows 10 x64 y y y y +Mac OS X Mountain Lion 10.8.5 64-bit y n y y +Mac OS X Mavericks 10.9.5 64-bit y n y y +Mac OS X Yosemite 10.10.5 64-bit y n y y +Mac OS X El Capitan 10.11.6 64-bit y n y y +CentOS 7.2 Linux 2.6.32 x86_64 PGI y y y n +CentOS 7.2 Linux 2.6.32 x86_64 GNU y y y y +CentOS 7.2 Linux 2.6.32 x86_64 Intel y y y n +Linux 2.6.32-573.18.1.el6.ppc64 y y y n + +Compiler versions for each platform are listed in the preceding +"Supported Platforms" table. + + +More Tested Platforms +===================== +The following platforms are not supported but have been tested for this release. + + Linux 2.6.32-573.22.1.el6 GNU C (gcc), Fortran (gfortran), C++ (g++) + #1 SMP x86_64 GNU/Linux compilers: + (mayll/platypus) Version 4.4.7 20120313 + Version 4.9.3, 5.3.0, 6.2.0 + PGI C, Fortran, C++ for 64-bit target on + x86-64; + Version 17.10-0 + Intel(R) C (icc), C++ (icpc), Fortran (icc) + compilers: + Version 17.0.4.196 Build 20170411 + MPICH 3.1.4 compiled with GCC 4.9.3 + + Linux 3.10.0-327.18.2.el7 GNU C (gcc) and C++ (g++) compilers + #1 SMP x86_64 GNU/Linux Version 4.8.5 20150623 (Red Hat 4.8.5-4) + (jelly) with NAG Fortran Compiler Release 6.1(Tozai) + GCC Version 7.1.0 + OpenMPI 3.0.0-GCC-7.2.0-2.29 + Intel(R) C (icc) and C++ (icpc) compilers + Version 17.0.0.098 Build 20160721 + with NAG Fortran Compiler Release 6.1(Tozai) + + Linux 3.10.0-327.10.1.el7 MPICH 3.2 compiled with GCC 5.3.0 + #1 SMP x86_64 GNU/Linux + (moohan) + + Linux 2.6.32-573.18.1.el6.ppc64 MPICH mpich 3.1.4 compiled with + #1 SMP ppc64 GNU/Linux IBM XL C/C++ for Linux, V13.1 + (ostrich) and IBM XL Fortran for Linux, V15.1 + + Debian 8.4 3.16.0-4-amd64 #1 SMP Debian 3.16.36-1 x86_64 GNU/Linux + gcc, g++ (Debian 4.9.2-10) 4.9.2 + GNU Fortran (Debian 4.9.2-10) 4.9.2 + (cmake and autotools) + + Fedora 24 4.7.2-201.fc24.x86_64 #1 SMP x86_64 x86_64 x86_64 GNU/Linux + gcc, g++ (GCC) 6.1.1 20160621 + (Red Hat 6.1.1-3) + GNU Fortran (GCC) 6.1.1 20160621 + (Red Hat 6.1.1-3) + (cmake and autotools) + + Ubuntu 16.04.1 4.4.0-38-generic #57-Ubuntu SMP x86_64 GNU/Linux + gcc, g++ (Ubuntu 5.4.0-6ubuntu1~16.04.2) + 5.4.0 20160609 + GNU Fortran (Ubuntu 5.4.0-6ubuntu1~16.04.2) + 5.4.0 20160609 + (cmake and autotools) + + +Known Problems +============== + + At present, metadata cache images may not be generated by parallel + applications. Parallel applications can read files with metadata cache + images, but since this is a collective operation, a deadlock is possible + if one or more processes do not participate. + + Three tests fail with OpenMPI 3.0.0/GCC-7.2.0-2.29: + testphdf5 (ecdsetw, selnone, cchunk1, cchunk3, cchunk4, and actualio) + t_shapesame (sscontig2) + t_pflush1/fails on exit + The first two tests fail attempting collective writes. + + 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. + + %%%%1.10.1%%%% HDF5 version 1.10.1 released on 2017-04-27 diff --git a/release_docs/INSTALL b/release_docs/INSTALL index 3709a58..baad559 100644 --- a/release_docs/INSTALL +++ b/release_docs/INSTALL @@ -3,10 +3,11 @@ Instructions for the Installation of HDF5 Software ================================================== This file provides instructions for installing the HDF5 software. -If you have any problems with the installation, please see The HDF Group's -support page at the following location: - http://www.hdfgroup.org/services/support.html +For help with installing, questions can be posted to the HDF Forum or sent to the HDF Helpdesk: + + HDF Forum: https://forum.hdfgroup.org/ + HDF Helpdesk: https://portal.hdfgroup.org/display/support/The+HDF+Help+Desk CONTENTS -------- @@ -31,59 +32,34 @@ CONTENTS 4.3. Configuring 4.3.1. Specifying the installation directories 4.3.2. Using an alternate C compiler - 4.3.3. Configuring for 64-bit support - 4.3.4. Additional compilation flags - 4.3.5. Compiling HDF5 wrapper libraries - 4.3.6. Specifying other programs - 4.3.7. Specifying other libraries and headers - 4.3.8. Static versus shared linking - 4.3.9. Optimization versus symbolic debugging - 4.3.10. Parallel versus serial library - 4.3.11. Threadsafe capability - 4.3.12. Backward compatibility + 4.3.3. Additional compilation flags + 4.3.4. Compiling HDF5 wrapper libraries + 4.3.5. Specifying other programs + 4.3.6. Specifying other libraries and headers + 4.3.7. Static versus shared linking + 4.3.8. Optimization versus symbolic debugging + 4.3.9. Parallel versus serial library + 4.3.10. Threadsafe capability + 4.3.11. Backward compatibility 4.4. Building 4.5. Testing 4.6. Installing HDF5 5. Using the Library - 6. Support - - A. Warnings about compilers - A.1. GNU (Intel platforms) - A.2. DEC - A.3. SGI (Irix64 6.2) - A.4. Windows/NT - - B. Large (>2GB) versus small (<2GB) file capability - - C. Building and testing with other compilers - C.1. Building and testing with Intel compilers - C.2. Building and testing with PGI compilers ***************************************************************************** 1. Obtaining HDF5 The latest supported public release of HDF5 is available from - ftp://ftp.hdfgroup.org/HDF5/current/src. For Unix and UNIX-like + https://www.hdfgroup.org/downloads/hdf5/. For Unix and UNIX-like platforms, it is available in tar format compressed with gzip. For Microsoft Windows, it is in ZIP format. - The HDF team also makes snapshots of the source code available on - a regular basis. These snapshots are unsupported (that is, the - HDF team will not release a bug-fix on a particular snapshot; - rather any bug fixes will be rolled into the next snapshot). - Furthermore, the snapshots have only been tested on a few - machines and may not test correctly for parallel applications. - Snapshots, in a limited number of formats, can be found on THG's - development FTP server: - - ftp://ftp.hdfgroup.uiuc.edu/pub/outgoing/hdf5/snapshots - 2. Quick installation For those who don't like to read ;-) the following steps can be used - to configure, build, test, and install the HDF5 Library, header files, + to configure, build, test, and install the HDF5 library, header files, and support programs. For example, to install HDF5 version X.Y.Z at location /usr/local/hdf5, use the following steps. @@ -125,28 +101,30 @@ CONTENTS 3. HDF5 dependencies 3.1. Zlib - The HDF5 Library includes a predefined compression filter that + The HDF5 library includes a predefined compression filter that uses the "deflate" method for chunked datasets. If zlib-1.1.2 or later is found, HDF5 will use it. Otherwise, HDF5's predefined compression method will degenerate to a no-op; the compression filter will succeed but the data will not be compressed. 3.2. Szip (optional) - The HDF5 Library includes a predefined compression filter that + The HDF5 library includes a predefined compression filter that uses the extended-Rice lossless compression algorithm for chunked - datasets. For more information about Szip compression and license - terms, see http://hdfgroup.org/doc_resource/SZIP/. + datasets. For information on Szip compression, license terms, + and obtaining the Szip source code, see: + + https://portal.hdfgroup.org/display/HDF5/Szip+Compression+in+HDF+Products - The Szip source code can be obtained from the HDF5 Download page - http://www.hdfgroup.org/HDF5/release/obtain5.html#extlibs. Building - instructions are available with the Szip source code. + Building instructions are available with the Szip source code. The HDF Group does not distribute separate Szip precompiled libraries, - but the HDF5 binaries available from - http://www.hdfgroup.org/HDF5/release/obtain5.html include - the Szip encoder enabled binary for the corresponding platform. + but the HDF5 pre-built binaries provided on The HDF Group download page + include the Szip library with the encoder enabled. These can be found + here: - To configure the HDF5 Library with the Szip compression filter, use + https://www.hdfgroup.org/downloads/hdf5/ + + To configure the HDF5 library with the Szip compression filter, use the '--with-szlib=/PATH_TO_SZIP' flag. For more information, see section 4.3.7, "Specifying other libraries and headers." @@ -204,20 +182,6 @@ CONTENTS $ cd build-fortran $ ../hdf5-X.Y.Z/configure --enable-fortran ... - Unfortunately, this does not work on recent Irix platforms (6.5? - and later) because that `make' does not understand the VPATH variable. - However, HDF5 also supports Irix `pmake' which has a .PATH target - which serves a similar purpose. Here's what the Irix man pages say - about VPATH, the facility used by HDF5 makefiles for this feature: - - The VPATH facility is a derivation of the undocumented - VPATH feature in the System V Release 3 version of make. - System V Release 4 has a new VPATH implementation, much - like the pmake(1) .PATH feature. This new feature is also - undocumented in the standard System V Release 4 manual - pages. For this reason it is not available in the IRIX - version of make. The VPATH facility should not be used - with the new parallel make option. 4.3. Configuring HDF5 uses the GNU autoconf system for configuration, which @@ -243,7 +207,7 @@ CONTENTS 4.3.1. Specifying the installation directories The default installation location is the HDF5 directory created in the build directory. Typing `make install' will install the HDF5 - Library, header files, examples, and support programs in hdf5/lib, + library, header files, examples, and support programs in hdf5/lib, hdf5/include, hdf5/doc/hdf5/examples, and hdf5/bin. To use a path other than hdf5, specify the path with the `--prefix=PATH' switch: @@ -275,45 +239,24 @@ CONTENTS $ CC=/usr/local/mpi/bin/mpicc ./configure -4.3.3. Configuring for 64-bit support - Several machine architectures support 32-bit or 64-bit binaries. - The options below describe how to enable support for different options. - - On Irix64, the default compiler is `cc'. To use an alternate compiler, - specify it with the CC variable: - - $ CC='cc -n32' ./configure - - Similarly, users compiling on a Solaris machine and desiring to - build the distribution with 64-bit support should specify the - correct flags with the CC variable: - - $ CC='cc -m64' ./configure - - To configure AIX 64-bit support including the Fortran and C++ APIs, - (Note: need to set $AR to 'ar -X 64'.) - Serial: - $ CFLAGS=-q64 FCFLAGS=-q64 CXXFLAGS=-q64 AR='ar -X 64'\ - ./configure --enable-fortran - Parallel: (C++ not supported with parallel) - $ CFLAGS=-q64 FCFLAGS=-q64 AR='ar -X 64'\ - ./configure --enable-fortran -4.3.4. Additional compilation flags - If addtional flags must be passed to the compilation commands, +4.3.3. Additional compilation flags + If additional flags must be passed to the compilation commands, specify those flags with the CFLAGS variable. For instance, to enable symbolic debugging of a production version of HDF5, one might say: $ CFLAGS=-g ./configure --enable-build-mode=production -4.3.5. Compiling HDF5 wrapper libraries - One can optionally build the Fortran and/or C++ interfaces to the - HDF5 C library. By default, both options are disabled. To build - them, specify `--enable-fortran' and `--enable-cxx', respectively. +4.3.4. Compiling HDF5 wrapper libraries + One can optionally build the Fortran, C++, and Java interfaces to + the HDF5 C library. By default, these options are disabled. To build + them, specify '--enable-fortran', '--enable-cxx', or '--enable-java', + respectively. $ ./configure --enable-fortran $ ./configure --enable-cxx + $ ./configure --enable-java Configuration will halt if a working Fortran 90 or 95 compiler or C++ compiler is not found. Currently, the Fortran configure tests @@ -322,15 +265,8 @@ CONTENTS $ FC=/usr/local/bin/g95 ./configure --enable-fortran - Note: The Fortran and C++ interfaces are not supported on all the - platforms the main HDF5 Library supports. Also, the Fortran - interface supports parallel HDF5 while the C++ interface does - not. - Note: See sections 4.7 and 4.8 for building the Fortran library with - Intel or PGI compilers. - -4.3.6. Specifying other programs +4.3.5. Specifying other programs The build system has been tuned for use with GNU make but also works with other versions of make. If the `make' command runs a non-GNU version but a GNU version is available under a different @@ -346,7 +282,7 @@ CONTENTS the `ar' and `ranlib' (or `:') commands to override values detected by configure. - The HDF5 Library, include files, and utilities are installed + The HDF5 library, include files, and utilities are installed during `make install' (described below) with a BSD-compatible install program detected automatically by configure. If none is found, the shell script bin/install-sh is used. Configure does not @@ -364,7 +300,7 @@ CONTENTS because the HDF5 makefiles also use the install program to change file ownership and/or access permissions. -4.3.7. Specifying other libraries and headers +4.3.6. Specifying other libraries and headers Configure searches the standard places (those places known by the systems compiler) for include files and header files. However, additional directories can be specified by using the CPPFLAGS @@ -389,12 +325,12 @@ CONTENTS ./configure HDF5 includes Szip as a predefined compression method (see 3.2). - To enable Szip compression, the HDF5 Library must be configured - and built using the Szip Library: + To enable Szip compression, the HDF5 library must be configured + and built using the Szip library: $ ./configure --with-szlib=/Szip_Install_Directory -4.3.8. Static versus shared linking +4.3.7. Static versus shared linking The build process will create static libraries on all systems and shared libraries on systems that support dynamic linking to a sufficient degree. Either form of the library may be suppressed by @@ -410,7 +346,7 @@ CONTENTS $ ./configure --enable-static-exec -4.3.9. Optimization versus symbolic debugging +4.3.8. Optimization versus symbolic debugging The library can be compiled to provide symbolic debugging support so it can be debugged with gdb, dbx, ddd, etc., or it can be compiled with various optimizations. To compile for symbolic @@ -430,9 +366,7 @@ CONTENTS (such as type conversion execution times and extensive invariant condition checking). To enable this debugging, supply a comma-separated list of package names to the `--enable-internal-debug' - switch. See "Debugging HDF5 Applications" for a list of package names: - - http://www.hdfgroup.org/HDF5/doc/H5.user/Debugging.html + switch. Debugging can be disabled by saying `--disable-internal-debug'. The default debugging level for snapshots is a subset of the @@ -448,39 +382,39 @@ CONTENTS arguments, and the return values. To enable or disable the ability to trace the API say `--enable-trace' (the default for snapthots) or `--disable-trace' (the default for public releases). - The tracing must also be enabled at runtime to see any output - (see "Debugging HDF5 Applications," reference above). + The tracing must also be enabled at runtime to see any output. -4.3.10. Parallel versus serial library - The HDF5 Library can be configured to use MPI and MPI-IO for +4.3.9. Parallel versus serial library + The HDF5 library can be configured to use MPI and MPI-IO for parallelism on a distributed multi-processor system. Read the - file INSTALL_parallel for detailed explanations. + file INSTALL_parallel for detailed information. -4.3.11. Threadsafe capability - The HDF5 Library can be configured to be thread-safe (on a very +4.3.10. Threadsafe capability + The HDF5 library can be configured to be thread-safe (on a very large scale) with the `--enable-threadsafe' flag to the configure script. Some platforms may also require the '-with-pthread=INC,LIB' (or '--with-pthread=DIR') flag to the configure script. - For further details, see "HDF5 Thread Safe Library": + For further information, see: + + https://portal.hdfgroup.org/display/knowledge/Questions+about+thread-safety+and+concurrent+access - http://www.hdfgroup.org/HDF5/doc/TechNotes/ThreadSafeLibrary.html -4.3.12. Backward compatibility - The 1.10 version of the HDF5 Library can be configured to operate +4.3.11. Backward compatibility + The 1.10 version of the HDF5 library can be configured to operate identically to the v1.8 library with the --with-default-api-version=v18 configure flag, or identically to the v1.6 library with the --with-default-api-version=v16 configure flag. This allows existing code to be compiled with the v1.10 library without requiring immediate changes to the application - source code. For addtional configuration options and other details, - see "API Compatibility Macros in HDF5": + source code. For additional configuration options and other details, + see "API Compatibility Macros": - https://support.hdfgroup.org/HDF5/doc/RM/APICompatMacros.html + https://portal.hdfgroup.org/display/HDF5/API+Compatibility+Macros 4.4. Building The library, confidence tests, and programs can be built by - saying just: + specifying: $ make @@ -497,7 +431,7 @@ CONTENTS 4.5. Testing HDF5 comes with various test suites, all of which can be run by - saying + specifying: $ make check @@ -526,13 +460,13 @@ CONTENTS longer test, set HDF5TestExpress to 0. 1 is the default. 4.6. Installing HDF5 - The HDF5 Library, include files, and support programs can be - installed in a (semi-)public place by saying `make install'. The - files are installed under the directory specified with - `--prefix=DIR' (default is 'hdf5') in directories named `lib', - `include', and `bin'. The directories, if not existing, will be - created automatically, provided the mkdir command supports the -p - option. + The HDF5 library, include files, and support programs can be + installed by specifying `make install'. The files are installed under the + directory specified with `--prefix=DIR' (or if not specified, in 'hdf5' + in the top directory of the HDF5 source code). They will be + placed in directories named `lib', `include', and `bin'. The directories, + if not existing, will be created automatically, provided the mkdir command + supports the -p option. If `make install' fails because the install command at your site somehow fails, you may use the install-sh that comes with the @@ -589,134 +523,15 @@ CONTENTS 5. Using the Library - Please see the "HDF5 User's Guide" and the "HDF5 Reference Manual": - - http://www.hdfgroup.org/HDF5/doc/ - - Most programs will include and link with -lhdf5. - Additional libraries may also be necessary depending on whether - support for compression, etc., was compiled into the HDF5 Library. - - A summary of the HDF5 installation can be found in the - libhdf5.settings file in the same directory as the static and/or - shared HDF5 Libraries. - - -6. Support - Support is described in the README file. - - -***************************************************************************** - APPENDIX -***************************************************************************** - -A. Warnings about compilers - Output from the following compilers should be extremely suspected - when used to compile the HDF5 Library, especially if optimizations are - enabled. In all cases, HDF5 attempts to work around the compiler bugs. - -A.1. GNU (Intel platforms) - Versions before 2.8.1 have serious problems allocating registers - when functions contain operations on `long long' datatypes. - -A.2. COMPAQ/DEC - The V5.2-038 compiler (and possibly others) occasionally - generates incorrect code for memcpy() calls when optimizations - are enabled, resulting in unaligned access faults. HDF5 works - around the problem by casting the second argument to `char *'. - The Fortran module (5.4.1a) fails in compiling some Fortran - programs. Use 5.5.0 or higher. - -A.3. SGI (Irix64 6.2) - The Mongoose 7.00 compiler has serious optimization bugs and - should be upgraded to MIPSpro 7.2.1.2m. Patches are available - from SGI. - -A.4. Windows/NT - The Microsoft Win32 5.0 compiler is unable to cast unsigned long - long values to doubles. HDF5 works around this bug by first - casting to signed long long and then to double. - - A link warning: defaultlib "LIBC" conflicts with use of other libs - appears for debug version of VC++ 6.0. This warning will not affect - building and testing HDF5 Libraries. - - -B. Large (>2GB) versus small (<2GB) file capability - In order to read or write files that could potentially be larger - than 2GB, it is necessary to use the non-ANSI `long long' data - type on some platforms. However, some compilers (e.g., GNU gcc - versions before 2.8.1 on Intel platforms) are unable to produce - correct machine code for this datatype. - - -C. Building and testing with other compilers -C.1. Building and testing with Intel compilers - When Intel compilers are used (icc or ecc), you will need to modify - the generated "libtool" program after configuration is finished. - On or around line 104 of the libtool file, there are lines which - look like: - - # How to pass a linker flag through the compiler. - wl="" - - Change these lines to this: - - # How to pass a linker flag through the compiler. - wl="-Wl," - - UPDATE: This is now done automatically by the configure script. - However, if you still experience a problem, you may want to check this - line in the libtool file and make sure that it has the correct value. - - * To build the Fortran library using Intel compiler on Linux 2.4, - one has to perform the following steps: - x Use the -fpp -DDEC$=DEC_ -DMS$=MS_ compiler flags to disable - DEC and MS compiler directives in source files in the fortran/src, - fortran/test, and fortran/examples directories. - E.g., setenv F9X 'ifc -fpp -DDEC$=DEC_ -DMS$=MS_' - Do not use double quotes since $ is interpreted in them. - - x If Version 6.0 of Fortran compiler is used, the build fails in - the fortran/test directory and then in the fortran/examples - directory. To proceed, edit the work.pcl files in those - directories to contain two lines: - - work.pc - ../src/work.pc - - x Do the same in the fortran/examples directory. - - x A problem with work.pc files was resolved for the newest version - of the compiler (7.0). - - * To build the Fortran library on IA32, follow the steps described - above, except that the DEC and MS compiler directives should be - removed manually or use a patch from HDF FTP server: - - ftp://ftp.hdfgroup.org/HDF5/current/ - - -C.2. Building and testing with PGI compilers - When PGI C and C++ compilers are used (pgcc or pgCC), you will need to - modify the generated "libtool" program after configuration is finished. - On or around line 104 of the libtool file, there are lines which - look like this: - - # How to pass a linker flag through the compiler. - wl="" + + For information on using HDF5 see the documentation, tutorials and examples + found here: - Change these lines to this: + https://portal.hdfgroup.org/display/HDF5/HDF5 - # How to pass a linker flag through the compiler. - wl="-Wl," + A summary of the features included in the built HDF5 installation can be found + in the libhdf5.settings file in the same directory as the static and/or + shared HDF5 libraries. - UPDATE: This is now done automatically by the configure script. However, - if you still experience a problem, you may want to check this line in - the libtool file and make sure that it has the correct value. - To build the HDF5 C++ Library with pgCC (version 4.0 and later), set - the environment variable CXX to "pgCC -tlocal" - setenv CXX "pgCC -tlocal" - before running the configure script. diff --git a/release_docs/INSTALL_parallel b/release_docs/INSTALL_parallel index 5a8b603..f32fffc 100644 --- a/release_docs/INSTALL_parallel +++ b/release_docs/INSTALL_parallel @@ -40,9 +40,11 @@ and the parallel file system. 1.2. Further Help ----------------- -If you still have difficulties installing PHDF5 in your system, please send -mail to - help@hdfgroup.org + +For help with installing, questions can be posted to the HDF Forum or sent to the HDF Helpdesk: + + HDF Forum: https://forum.hdfgroup.org/ + HDF Helpdesk: https://portal.hdfgroup.org/display/support/The+HDF+Help+Desk In your mail, please include the output of "uname -a". If you have run the "configure" command, attach the output of the command and the content of @@ -87,12 +89,8 @@ The following steps are for building HDF5 for the Hopper compute nodes. They would probably work for other Cray systems but have not been verified. -Obtain a copy from the HDF ftp server: -http://www.hdfgroup.org/ftp/HDF5/current/src/ -(link might change, so always double check the HDF group website). - -$ wget http://www.hdfgroup.org/ftp/HDF5/current/src/hdf5-x.x.x.tar.gz -unpack the tarball +Obtain the HDF5 source code: + https://portal.hdfgroup.org/display/support/Downloads The entire build process should be done on a MOM node in an interactive allocation and on a file system accessible by all compute nodes. Request an interactive allocation with qsub: diff --git a/release_docs/RELEASE.txt b/release_docs/RELEASE.txt index 10c2978..ea8abb2 100644 --- a/release_docs/RELEASE.txt +++ b/release_docs/RELEASE.txt @@ -42,7 +42,7 @@ CONTENTS - New Features - Support for new platforms and languages -- Bug Fixes since HDF5-1.10.1 +- Bug Fixes since HDF5-1.10.2 - Supported Platforms - Tested Configuration Features Summary - More Tested Platforms @@ -54,320 +54,36 @@ New Features Configuration: ------------- - - CMake - - Change minimum version to 3.10. - - This change removes the need to support a copy of the FindMPI.cmake module, - which has been removed, along with its subfolder in the config/cmake_ext_mod - location. - - (ADB - 2018/03/09) - - - CMake - - Add pkg-config file generation - - Added pkg-config file generation for the C, C++, HL, and HL C++ libraries. - In addition, builds on linux will create h5cXXX scripts that use the pkg-config - files. This is a limited implementation of a script like autotools h5cc. - - (ADB - 2018/03/08, HDFFV-4359) - - - CMake - - Refactor use of CMAKE_BUILD_TYPE for new variable, which understands - the type of generator in use. - - Added new configuration macros to use new HDF_BUILD_TYPE variable. This - variable is set correctly for the type of generator being used for the build. - - (ADB - 2018/01/08, HDFFV-10385, HDFFV-10296) - - - Removed version-specific gcc/gfortran flags for version 4.0 (inclusive) - and earlier. - - The config/gnu-flags file, which is sourced as a part of the configure - process, adds version-specific flags for use when building HDF5. Most of - these flags control warnings and do not affect the final product. - - Flags for older versions of the compiler were consolidated into the - common flags section. Moving these flags simplifies maintenance of - the file. - - The upshot of this is that building with ancient versions of gcc - (<= 4.0) will possibly no longer work without hand-hacking the file - to remove the flags not understood by that version of the compiler. - Nothing should change when building with gcc >= 4.1. - - (HDFFV-9937, DER, 2017/05/31) - - - -fno-omit-frame-pointer was added when building with debugging symbols - enabled. - - Debugging symbols can be enabled independently of the overall build - mode in both the autotools and CMake. This allows (limited) debugging - of optimized code. Since many debuggers rely on the frame pointer, - we've disabled this optimization when debugging symbols are requested - (e.g.: via building with --enable-symbols). + - - (HDFFV-10226, DER, 2017/05/31) Library: -------- - - Add an enumerated value to H5F_libver_t for H5Pset_libver_bounds(). - - Currently, the library defines two values for H5F_libver_t and supports - only two pairs of (low, high) combinations as derived from these values. - Thus the bounds setting via H5Pset_libver_bounds() is rather restricted. - - Add an enumerated value (H5F_LIBVER_V18) to H5F_libver_t and - H5Pset_libver_bounds() now supports five pairs of (low, high) combinations - as derived from these values. This addition provides the user more - flexibility in setting bounds for object creation. - - (VC - 2018/03/14) - - - Add prefix option to VDS files. - - Currently, VDS source files must be in the active directory to be - found by the virtual file. Adding the option of a prefix to be set - on the virtual file, using a data access property list (DAPL), - allows the source files to located at an absolute or relative path - to the virtual file. - Private utility functions in H5D and H5L packages merged into single - function in H5F package. - - New public APIs: - herr_t H5Pset_virtual_prefix(hid_t dapl_id, const char* prefix); - ssize_t H5Pget_virtual_prefix(hid_t dapl_id, char* prefix /*out*/, size_t size); - The prefix can also be set with an environment variable, HDF5_VDS_PREFIX. - - (ADB - 2017/12/12, HDFFV-9724, HDFFV-10361) - - - H5FDdriver_query() API call added to the C library. - - This new library call allows the user to query a virtual file driver - (VFD) for the feature flags it supports (listed in H5FDpublic.h). - This can be useful to determine if a VFD supports SWMR, for example. - - Note that some VFDs have feature flags that may only be present - after a file has been created or opened (e.g.: the core VFD will - have the H5FD_FEAT_POSIX_COMPAT_HANDLE flag set if the backing - store is switched on). Since the new API call queries a generic VFD - unassociated with a file, these flags will never be returned. - - (HDFFV-10215, DER, 2017/05/31) - - - - H5FD_FEAT_DEFAULT_VFD_COMPATIBLE VFD feature flag added to the C library. - - This new feature flag indicates that the VFD is compatible with the - default VFD. VFDs that set this flag create single files that follow - the canonical HDF5 file format. - - (HDFFV-10214, DER, 2017/05/31) - - - The H5I_REFERENCE value in the H5I_type_t enum (defined in H5Ipublic.h) - has been marked as deprectated. - - This ID type value is not used in the C library. i.e.: There are no - hid_t values that are of ID type H5I_REFERENCE. - - This enum value will be removed in a future major version of the library. - The code will remain unchanged in the HDF5 1.10.x branches. - - (HDFFV-10252, DER, 2017/04/05) + - Parallel Library: ----------------- - - Optimize parallel open/location of the HDF5 super-block - - Previous releases of PHDF5 required all parallel ranks to - search for the HDF5 superblock signature when opening the - file. As this is accomplished more or less as a synchronous - operation, a large number of processes can experience a - slowdown in the file open due to filesystem contention. - - As a first step in improving the startup/file-open performance, - we allow MPI rank 0 of the associated MPI communicator to locate - the base offset of the super-block and then broadcast that result - to the remaining ranks in the parallel group. Note that this - approach is utilized ONLY during file opens which employ the MPIO - file driver in HDF5 by previously having called H5Pset_fapl_mpio(). - - HDF5 parallel file operations which do not employ multiple ranks - e.g. specifiying MPI_COMM_SELF (whose MPI_Comm_size == 1) - as opposed to MPI_COMM_WORLD, will not be affected by this - optimization. Conversely, parallel file operations on subgroups - of MPI_COMM_WORLD are allowed to be run in parallel with each - subgroup operating as an independant collection of processes. - - (RAW - 2017/10/10, HDFFV-10294) - - - - Large MPI-IO transfers - - Previous releases of PHDF5 would fail when attempting to - read or write greater than 2GB of data in a single IO operation. - This issue stems principally from an MPI API whose definitions - utilize 32 bit integers to describe the number of data elements - and datatype that MPI should use to effect a data transfer. - Historically, HDF5 has invoked MPI-IO with the number of - elements in a contiguous buffer represented as the length - of that buffer in bytes. - - Resolving the issue and thus enabling larger MPI-IO transfers - is accomplished first, by detecting when a user IO request would - exceed the 2GB limit as described above. Once a transfer request - is identified as requiring special handling, PHDF5 now creates a - derived datatype consisting of a vector of fixed sized blocks - which is in turn wrapped within a single MPI_Type_struct to - contain the vector and any remaining data. The newly created - datatype is then used in place of MPI_BYTE and can be used to - fulfill the original user request without encountering API - errors. - - (RAW - 2017/09/10, HDFFV-8839) + - + Fortran Library: ---------------- - + C++ Library: ------------ - - The following C++ API wrappers have been added to the C++ Library: - + H5Lcreate_soft: - // Creates a soft link from link_name to target_name. - void link(const char *target_name, const char *link_name,...) - void link(const H5std_string& target_name,...) - - + H5Lcreate_hard: - // Creates a hard link from new_name to curr_name. - void link(const char *curr_name, const Group& new_loc,...) - void link(const H5std_string& curr_name, const Group& new_loc,...) - - // Creates a hard link from new_name to curr_name in same location. - void link(const char *curr_name, const hid_t same_loc,...) - void link(const H5std_string& curr_name, const hid_t same_loc,...) - - Note: previous version of H5Location::link will be deprecated. - - + H5Lcopy: - // Copy an object from a group of file to another. - void copyLink(const char *src_name, const Group& dst,...) - void copyLink(const H5std_string& src_name, const Group& dst,...) - - // Copy an object from a group of file to the same location. - void copyLink(const char *src_name, const char *dst_name,...) - void copyLink(const H5std_string& src_name,...) - - + H5Lmove: - // Rename an object in a group or file to a new location. - void moveLink(const char* src_name, const Group& dst,...) - void moveLink(const H5std_string& src_name, const Group& dst,...) - - // Rename an object in a group or file to the same location. - void moveLink(const char* src_name, const char* dst_name,...) - void moveLink(const H5std_string& src_name,...) - - Note: previous version H5Location::move will be deprecated. - - + H5Ldelete: - // Removes the specified link from this location. - void unlink(const char *link_name, - const LinkAccPropList& lapl = LinkAccPropList::DEFAULT) - void unlink(const H5std_string& link_name, - const LinkAccPropList& lapl = LinkAccPropList::DEFAULT) - - Note: additional parameter is added to previous H5Location::unlink. - - + H5Tencode and H5Tdecode: - // Creates a binary object description of this datatype. - void DataType::encode() - C API H5Tencode() - - // Returns the decoded type from the binary object description. - DataType::decode() - C API H5Tdecode() - ArrayType::decode() - C API H5Tdecode() - CompType::decode() - C API H5Tdecode() - DataType::decode() - C API H5Tdecode() - EnumType::decode() - C API H5Tdecode() - FloatType::decode() - C API H5Tdecode() - IntType::decode() - C API H5Tdecode() - StrType::decode() - C API H5Tdecode() - VarLenType::decode() - C API H5Tdecode() - - + H5Lget_info: - // Returns the information of the named link. - H5L_info_t getLinkInfo(const H5std_string& link_name,...) - - (BMR - 2018/03/11, HDFFV-10149) - - - Added class LinkCreatPropList for link create property list. - - (BMR - 2018/03/11, HDFFV-10149) - - - Added overloaded functions H5Location::createGroup to take a link - creation property list - Group createGroup(const char* name, const LinkCreatPropList& lcpl) - Group createGroup(const H5std_string& name, const LinkCreatPropList& lcpl) - - (BMR - 2018/03/11, HDFFV-10149) - - - A document is added to the HDF5 C++ API Reference Manual to show the - mapping from a C API to C++ wrappers. It can be found from the main - page of the C++ API Reference Manual. - - (BMR - 2017/10/17, HDFFV-10151) + - Java Library: ---------------- - - Wrapper added for enabling the error stack. - - H5error_off would disable the error stack reporting. In order - to re-enable the reporting, the error stack info needs to be - saved so that H5error_on can revert state. - - (ADB - 2018/03/13, HDFFV-10412) - - - Wrappers added for the following APIs: - H5Pset_evict_on_close - H5Pget_evict_on_close - H5Pset_chunk_opts - H5Pget_chunk_opts - H5Pset_efile_prefix - H5Pget_efile_prefix - H5Pset_virtual_prefix - H5Pget_virtual_prefix - - (ADB - 2017/12/20) - - - The H5I_REFERENCE value in the H5I_type_t enum (defined in H5Ipublic.h) - has been marked as deprectated. - - JNI code which refers to this value will be removed in a future - major version of the library. The code will remain unchanged in the - 1.10.x branches. - - See the C library section, above, for further information. - - (HDFFV-10252, DER, 2017/04/05) - + - Tools: ------ - - h5diff - - h5diff has new option enable-error-stack. - - Updated h5diff with the --enable-error-stack argument, which - enables the display of the hdf5 error stack. This completes the - improvement to the main tools; h5copy, h5diff, h5dump, h5ls and - h5repack. - - (ADB - 2017/08/30, HDFFV-9774) + - High-Level APIs: --------------- @@ -394,381 +110,11 @@ Bug Fixes since HDF5-1.10.1 release Library ------- - - The data read after a direct chunk write to a chunked dataset - was incorrect. - - The problem was due to the passing of a null dataset pointer to - the insert callback for the chunk index in the routine - H5D__chunk_direct_write() in H5Dchunk.c - The dataset was a single-chunked dataset which will use the - single chunk index when latest format was enabled on file creation. - The single chunk index was the only index that used this pointer - in the insert callback. - - Pass the dataset pointer to the insert callback for the chunk - index in H5D__chunk_direct_write(). - - (VC - 2018/03/20, HDFFV-10425) - - - Add public routine H5DOread_chunk to the high-level C library - - As we have H5DOwrite_chunk() to write an entire chunk to the file - directly, the customer requested to add this public routine to - read an entire chunk from the file directly. - - This public routine was added based on a patch from GE Healthcare. - - (VC - 2017/05/19, HDFFV-9934) - - - Freeing of object header in H5Ocache.c - - It was discovered that the object header was not released properly - when the checksum verification failed and a re-load of the object - header was needed. - - Free the object header that failed the chksum verification only - after the new object header is reloaded, deserialized and set up. - - (VC - 2018/03/14, HDFFV-10209) - - - H5Pset_evict_on_close in H5Pfapl.c - - Changed the minor error number from H5E_CANTSET to H5E_UNSUPPORTED for - parallel library. - - (ADB - 2018/03/06, HDFFV-10414) - - - Utility function can not handle lowercase Windows drive letters - - Added call to toupper function for drive letter. - - (ADB - 2017/12/18, HDFFV-10307) - - - Fix H5Sencode() bug when the number of elements selected is > 2^32 - - H5Sencode() incorrectly encodes dataspace selection with number of - elements exceeding 2^32. When decoding such selection via H5Sdecode(), - the number of elements in the decoded dataspace is not the same as - what is encoded. This problem exists for H5S_SEL_HYPER and - H5S_SEL_POINTS encoding. - - The cause of the problem is because the library uses 32 bits to - encode counts and block offsets for the selection. - The solution is to use the original 32 bit encodings if possible, - but use a different way to encode selection > 32 bits when needed. - See details in the RFC: H5Sencode/H5Secode Format Change. - - (VC - 2017/11/28, HDFFV-9947) - - - Filter plugin handling in H5PL.c and H5Z.c - - It was discovered that the dynamic loading process used by - filter plugins had issues with library dependencies. - - CMake build process changed to use LINK INTERFACE keywords, which - allowed HDF5 C library to make dependent libraries private. The - filter plugin libraries no longer require dependent libraries - (such as szip or zlib) to be available. - - (ADB - 2017/11/16, HDFFV-10328) - - - Fix rare object header corruption bug - - In certain cases, such as when converting large attributes to dense - storage, an error could occur which would either fail an assertion or - cause file corruption. Fixed and added test. - - (NAF - 2017/11/14, HDFFV-10274) - - - H5Zfilter_avail in H5Z.c - - The public function checked for plugins, while the private - function did not. - - Modified H5Zfilter_avail and private function, H5Z_filter_avail. - Moved check for plugin from public to private function. Updated - H5P__set_filter due to change in H5Z_filter_avail. Updated tests. - - (ADB - 2017/10/10, HDFFV-10297, HDFFV-10319) - - - Fix H5HL_offset_into() - - (1) Fix H5HL_offset_into() to return error when offset exceeds heap data - block size. - (2) Fix other places in the library that call this routine to detect - error routine. - - (HDFFV-10216, VC, 2017/08/30) - - - Fixes for paged aggregation - - Skip test in test/fheap.c when: - (1) multi/split drivers and - (2) persisting free-space or using paged aggregation strategy - - (VC, 2017/07/10) - - - Fixes for paged aggregation - - Changes made based on RFC review comments: - (1) Add maximum value for file space page size - (2) Drop check for page end metadata threshold - (3) Remove "can_shrink" and "shrink" callbacks for small section class - - (VC, 2017/06/09) - - - Fix for infinite loop in H5VM_power2up(). - - The function H5VM_power2up() returns the next power of 2 - for n. When n exceeds 2^63, it overflows and becomes 0 causing - the infinite looping. - - The fix ensures that the function checks for n >= 2^63 - and returns 0. - - (HDFFV-10217, VC, 2017/07/10) - - - Fix for H5Ocopy doesn't work with open identifiers - - Changes made so that raw data for dataset objects are copied from - cached info when possible instead of flushing objects to file and - read them back in again. - - (HDFFV-7853, VC, 2017/07/05) - - - Refactored the testpar/t_bigio.c test to include ALARM macros - - Changed the test to include the ALARM_ON and ALARM_OFF macros which - are intended to prevent nightly test hangs that have been observed - with this particular parallel test example. The code was also modified to - simplify status reporting (only from MPI rank 0) and additional - status checking added. - - (RAW - 2017/11/08, HDFFV-10301) - - - An uninitialized struct could cause a memory access error when using - variable-length or reference types in a compressed, chunked dataset. - - A struct containing a callback function pointer and a pointer to some - associated data was used before initialization. This could cause a - memory access error and system crash. This could only occur under - unusual conditions when using variable-lenth and reference types in - a compressed, chunked dataset. - - On recent versions of Visual Studio, when built in debug mode, the - debug heap will complain and cause a crash if the code in question - is executed (this will cause the objcopy test to fail). - - (DER - 2017/11/21, HDFFV-10330) - - - Fix for collective metadata writes on file close - - It was discovered that metadata was being written twice as part of - the parallel file close behavior, once independently and once - collectively. - - A fix for this error was included as part of the parallel compression - feature but remained undocumented here. - - (RAW - 2017/12/01, HDFFV-10272) - - - If an HDF5 file contains a filter pipeline message with a 'number of - filters' field that exceeds the maximum number of allowed filters, - the error handling code will attempt to dereference a NULL pointer. - - This issue was reported to The HDF Group as issue #CVE-2017-17505. - - NOTE: The HDF5 C library cannot produce such a file. This condition - should only occur in a corrupt (or deliberately altered) file - or a file created by third-party software. - - This problem arose because the error handling code assumed that - the 'number of filters' field implied that a dynamic array of that - size had already been created and that the cleanup code should - iterate over that array and clean up each element's resources. If - an error occurred before the array has been allocated, this will - not be true. - - This has been changed so that the number of filters is set to - zero on errors. Additionally, the filter array traversal in the - error handling code now requires that the filter array not be NULL. - - (DER - 2018/02/06, HDFFV-10354) - - - If an HDF5 file contains a filter pipeline message which contains - a 'number of filters' field that exceeds the actual number of - filters in the message, the HDF5 C library will read off the end of - the read buffer. - - This issue was reported to The HDF Group as issue #CVE-2017-17506. - - NOTE: The HDF5 C library cannot produce such a file. This condition - should only occur in a corrupt (or deliberately altered) file - or a file created by third-party software. - - The problem was fixed by passing the buffer size with the buffer - and ensuring that the pointer cannot be incremented off the end - of the buffer. A mismatch between the number of filters declared - and the actual number of filters will now invoke normal HDF5 - error handling. - - (DER - 2018/02/26, HDFFV-10355) - - - If an HDF5 file contains a malformed compound datatype with a - suitably large offset, the type conversion code can run off - the end of the type conversion buffer, causing a segmentation - fault. - - This issue was reported to The HDF Group as issue #CVE-2017-17507. - - NOTE: The HDF5 C library cannot produce such a file. This condition - should only occur in a corrupt (or deliberately altered) file - or a file created by third-party software. - - THE HDF GROUP WILL NOT FIX THIS BUG AT THIS TIME - - Fixing this problem would involve updating the publicly visible - H5T_conv_t function pointer typedef and versioning the API calls - which use it. We normally only modify the public API during - major releases, so this bug will not be fixed at this time. - - (DER - 2018/02/26, HDFFV-10356) - - - If an HDF5 file contains a malformed compound type which contains - a member of size zero, a division by zero error will occur while - processing the type. - - This issue was reported to The HDF Group as issue #CVE-2017-17508. - - NOTE: The HDF5 C library cannot produce such a file. This condition - should only occur in a corrupt (or deliberately altered) file - or a file created by third-party software. - - Checking for zero before dividing fixes the problem. Instead of the - division by zero, the normal HDF5 error handling is invoked. - - (DER - 2018/02/26, HDFFV-10357) - - - If an HDF5 file contains a malformed symbol table node that declares - it contains more symbols than it actually contains, the library - can run off the end of the metadata cache buffer while processing - the symbol table node. - - This issue was reported to The HDF Group as issue #CVE-2017-17509. - - NOTE: The HDF5 C library cannot produce such a file. This condition - should only occur in a corrupt (or deliberately altered) file - or a file created by third-party software. - - Performing bounds checks on the buffer while processing fixes the - problem. Instead of the segmentation fault, the normal HDF5 error - handling is invoked. - - (DER - 2018/03/12, HDFFV-10358) + - Configuration ------------- - - CMake - - Update CMake commands configuration. - - A number of improvements were made to the CMake commands. Most - changes simplify usage or eliminate unused constructs. Also, - some changes support better cross-platform support. - - (ADB - 2018/02/01, HDFFV-10398) - - - CMake - - Correct usage of CMAKE_BUILD_TYPE variable. - - The use of the CMAKE_BUILD_TYPE is incorrect for multi-config - generators (Visual Studio and XCode) and is optional for single - config generators. Created a new macro to check - GLOBAL PROPERTY -> GENERATOR_IS_MULTI_CONFIG - Created two new HDF variable, HDF_BUILD_TYPE and HDF_CFG_BUILD_TYPE. - Defaults for these variables is "Release". - - (ADB - 2018/01/10, HDFFV-10385) - - - CMake - - Add replacement of fortran flags if using static CRT. - - Added TARGET_STATIC_CRT_FLAGS call to HDFUseFortran.cmake file in - config/cmake_ext_mod folder. - - (ADB - 2018/01/08, HDFFV-10334) - - - CMake - - The hdf5 library used shared szip and zlib, which needlessly required - applications to link with the same szip and zlib libraries. - - Changed the target_link_libraries commands to use the static libs. - Removed improper link duplication of szip and zlib. - Adjusted the link dependencies and the link interface values of - the target_link_libraries commands. - - (ADB - 2017/11/14, HDFFV-10329) - - - CMake MPI - - CMake implementation for MPI was problematic and would create incorrect - MPI library references in the hdf5 libraries. - - Reworked the CMake MPI code to properly create CMake targets. Also merged - the latest CMake FindMPI.cmake changes to the local copy. This is necessary - until HDF changes the CMake minimum to 3.9 or greater. - - (ADB - 2017/11/02, HDFFV-10321) - - - Corrected FORTRAN_HAVE_C_LONG_DOUBLE processing in the autotools. - - A bug in the autotools Fortran processing code always set the - FORTRAN_HAVE_C_LONG_DOUBLE variable to be true regardless of - whether or not a C long double type was present. - - This would cause compilation failures on platforms where a C - long double type was not available and the Fortran wrappers - were being built. - - (HDFFV-10247, DER, 2017/07/05) - - - The deprecated --enable-production and --enable-debug configure options - failed to emit errors when passed an empty string - (e.g.: --enable-debug=""). - - Due to the way we checked for these options being set, it was possible - to avoid the error message and continue configuration if an empty string - was passed to the option. - - Any use of --enable-production or --enable-debug will now halt the - configuration step and emit a helpful error message - (use --enable-build-mode=debug|production instead). - - (HDFFV-10248, DER, 2017/07/05) - - - CMake - - Too many commands for POST_BUILD step caused command line to be - too big on windows. - - Changed foreach of copy command to use a custom command with the - use of the HDFTEST_COPY_FILE macro. - - (ADB - 2017/07/12, HDFFV-10254) - - - cmake test execution environment - - The parallel HDF5 test: 't_pread' assumed the use of autotools - and the directory structure associated with that testing approach. - Modified the test code to check whether the 'h5jam' utility can be - found in the same directory as the test executable (which is - preferred directory structure utilized by cmake) and if found - will invoke the tool directly rather than utilizing a relative path. - - (RAW - 2017/11/03, HDFFV-10318) + - Performance ------------- @@ -776,205 +122,15 @@ Bug Fixes since HDF5-1.10.1 release Fortran -------- - - Fixed compilation errors when using Intel 18 Fortran compilers - (MSB - 2017/11/3, HDFFV-10322) + - Tools ----- - - h5clear - - An enhancement to the tool in setting a file's stored EOA. - - It was discovered that a crashed file's stored EOA in the superblock - was smaller than the actual file's EOF. When the file was reopened - and closed, the library truncated the file to the stored EOA. - - Add an option to the tool in setting the file's stored EOA in the - superblock to the maximum of (EOA, EOF) + increment. - Another option is also added to print the file's EOA and EOF. - - (VC - 2018/03/14, HDFFV-10360) - - - h5repack - - h5repack changes the chunk parameters when a change of layout is not - specified and a filter is applied. - - HDFFV-10297, HDFFV-10319 reworked code for h5repack and h5diff code - in the tools library. The check for an existing layout was incorrectly - placed into an if block and not executed. The check was moved into - the normal path of the function. - - (ADB - 2018/02/21, HDFFV-10412) - - - h5dump - - the tools library will hide the error stack during file open. - - While this is preferable almost always, there are reasons to enable - display of the error stack when a tool will not open a file. Adding an - optional argument to the --enable-error-stack will provide this use case. - As an optional argument it will not affect the operation of the - --enable-error-stack. h5dump is the only tool to implement this change. - - (ADB - 2018/02/15, HDFFV-10384) - - - h5dump - - h5dump would output an indented blank line in the filters section. - - h5dump overused the h5tools_simple_prefix function, which is a - function intended to account for the data index (x,y,z) option. - Removed the function call for header information. - - (ADB - 2018/01/25, HDFFV-10396) - - - h5repack - - h5repack incorrectly searched internal object table for name. - - h5repack would search the table of objects for a name, if the - name did not match it tried to determine if the name without a - leading slash would match. The logic was flawed! The table - stored names(paths) without a leading slash and did a strstr - of the table path to the name. - The assumption was that if there was a difference of one then - it was a match, however "pressure" would match "/pressure" as - well as "/pressure1", "/pressure2", etc. Changed logic to remove - any leading slash and then do a full compare of the name. - - (ADB - 2018/01/18, HDFFV-10393) - - - h5repack - - h5repack failed to handle more then 9 chars for int conversion. - - User defined filter parameter conversions would fail for integers - larger then 9 characters. Increased local variable array for storing - the current command line parameter to prevent buffer overflows. - - (ADB - 2018/01/17, HDFFV-10392) - - - h5diff - - h5diff seg faulted if comparing VL strings against fixed strings. - - Reworked solution for HDFFV-8625 and HDFFV-8639. Implemented the check - for string objects of same type in the diff_can_type function by - adding an if(tclass1 == H5T_STRING) block. This if block moves the - same check that was added for attributes to this function, which is - used by all object types. This function also handles complex type - structures. - Also added a new test file in h5diffgenttest for testing this issue - and removed the temporary files used in the test scripts. - - (ADB - 2018/01/04, HDFFV-8745) - - - h5repack - - h5repack failed to copy a dataset with existing filter. - - Reworked code for h5repack and h5diff code in tools library. Added - improved error handling, cleanup of resources and checks of calls. - Modified H5Zfilter_avail and private function, H5Z_filter_avail. - Moved check for plugin from public to private function. Updated - H5P__set_filter due to change in H5Z_filter_avail. Updated tests. - Note, h5repack output display has changed to clarify the individual - steps of the repack process. The output indicates if an operation - applies to all objects. Lines with notation and no information - have been removed. - - (ADB - 2017/10/10, HDFFV-10297, HDFFV-10319) - - - h5repack - - h5repack always set the User Defined filter flag to H5Z_FLAG_MANDATORY. - - Added another parameter to the 'UD=' option to set the flag by default - to '0' or H5Z_FLAG_MANDATORY, the other choice is '1' or H5Z_FLAG_OPTIONAL. - - (ADB - 2017/08/31, HDFFV-10269) - - - h5ls - - h5ls generated error on stack when it encountered a H5S_NULL - dataspace. - - Adding checks for H5S_NULL before calling H5Sis_simple (located - in the h5tools_dump_mem function) fixed the issue. - - (ADB - 2017/08/17, HDFFV-10188) - - - h5repack - - Add tests to h5repack.sh.in to verify options added for paged - aggregation work as expected. - - (VC, 2017/08/03) - - - h5dump - - h5dump segfaulted on output of XML file. - - Function that escape'd strings used the full buffer length - instead of just the length of the replacement string in a - strncpy call. Using the correct length fixed the issue. - - (ADB - 2017/08/01, HDFFV-10256) - - - h5diff - - h5diff segfaulted on compare of a NULL variable length string. - - Improved h5diff compare of strings by adding a check for - NULL strings and setting the lengths to zero. - - (ADB - 2017/07/25, HDFFV-10246) - - - h5import - - h5import crashed trying to import data from a subset of a dataset. - - Improved h5import by adding the SUBSET keyword. h5import understands - to use the Count times the Block as the size of the dimensions. - Added INPUT_B_ORDER keyword to old-style configuration files. - The import from h5dump function expects the binary files to use native - types (FILE '-b' option) in the binary file. - - (ADB - 2017/06/15, HDFFV-10219) - - - h5repack - - h5repack did not maintain the creation order flag of the root - group. - - Improved h5repack by reading the creation order and applying the - flag to the new root group. Also added arguments to set the - order and index direction, which applies to the traversing of the - original file, on the command line. - - (ADB - 2017/05/26, HDFFV-8611) - - - h5diff - - h5diff failed to account for strpad type and null terminators - of char strings. Also, h5diff failed to account for string length - differences and would give a different result depending on file - order in the command line. - - Improved h5diff compare of strings and arrays by adding a check for - string lengths and if the strpad was null filled. - - (ADB - 2017/05/18, HDFFV-9055, HDFFV-10128) + - High-Level APIs: ------ - - Fixed a bug in the H5DOwrite_chunk() API call where overwriting a chunk - with no filters caused an assert to trip (with assertions enabled / - debug builds) or additional chunks to be inserted instead of overwriting - the data (without assertions enabled / production builds). - - (HDFFV-10187, DER, 2017/05/11) + - Fortran High-Level APIs: ------ @@ -990,27 +146,18 @@ Bug Fixes since HDF5-1.10.1 release C++ APIs -------- - - Removal of memory leaks - - A private function was inadvertently called, causing memory leaks. This - is now fixed. - - (BMR - 2018/03/12 - User's reported in email) + - Testing ------- - - Memory for three variables in testphdf5's coll_write_test was malloced - but not freed, leaking memory when running the test. The variables' - memory is now freed. - - (LRK - 2018/03/12, HDFFV-10397) + - Supported Platforms =================== - Linux 2.6.32-573.18.1.el6.ppc64 gcc (GCC) 4.4.7 20120313 (Red Hat 4.4.7-4) - #1 SMP ppc64 GNU/Linux g++ (GCC) 4.4.7 20120313 (Red Hat 4.4.7-4) - (ostrich) GNU Fortran (GCC) 4.4.7 20120313 (Red Hat 4.4.7-4) + Linux 2.6.32-696.16.1.el6.ppc64 gcc (GCC) 4.4.7 20120313 (Red Hat 4.4.7-18) + #1 SMP ppc64 GNU/Linux g++ (GCC) 4.4.7 20120313 (Red Hat 4.4.7-18) + (ostrich) GNU Fortran (GCC) 4.4.7 20120313 (Red Hat 4.4.7-18) IBM XL C/C++ V13.1 IBM XL Fortran V15.1 @@ -1020,7 +167,7 @@ Supported Platforms Version 4.9.3, Version 5.2.0 Intel(R) C (icc), C++ (icpc), Fortran (icc) compilers: - Version 15.0.3.187 Build 20150407 + Version 17.0.0.098 Build 20160721 MPICH 3.1.4 compiled with GCC 4.9.3 SunOS 5.11 32- and 64-bit Sun C 5.12 SunOS_sparc @@ -1047,14 +194,6 @@ Supported Platforms Windows 10 x64 Visual Studio 2015 w/ Intel Fortran 16 (cmake) - Mac OS X Mt. Lion 10.8.5 Apple clang/clang++ version 5.1 from Xcode 5.1 - 64-bit gfortran GNU Fortran (GCC) 4.8.2 - (swallow/kite) Intel icc/icpc/ifort version 15.0.3 - - Mac OS X Mavericks 10.9.5 Apple clang/clang++ version 6.0 from Xcode 6.2 - 64-bit gfortran GNU Fortran (GCC) 4.9.2 - (wren/quail) Intel icc/icpc/ifort version 15.0.3 - Mac OS X Yosemite 10.10.5 Apple clang/clang++ version 6.1 from Xcode 7.0 64-bit gfortran GNU Fortran (GCC) 4.9.2 (osx1010dev/osx1010test) Intel icc/icpc/ifort version 15.0.3 @@ -1063,6 +202,9 @@ Supported Platforms 64-bit gfortran GNU Fortran (GCC) 5.2.0 (osx1010dev/osx1010test) Intel icc/icpc/ifort version 16.0.2 + Mac OS Sierra 10.12.6 Apple LLVM version 8.1.0 (clang/clang++-802.0.42) + 64-bit gfortran GNU Fortran (GCC) 7.1.0 + (swallow/kite) Intel icc/icpc/ifort version 17.0.2 Tested Configuration Features Summary ===================================== @@ -1127,22 +269,29 @@ The following platforms are not supported but have been tested for this release. Linux 2.6.32-573.22.1.el6 GNU C (gcc), Fortran (gfortran), C++ (g++) #1 SMP x86_64 GNU/Linux compilers: (mayll/platypus) Version 4.4.7 20120313 - Version 4.8.4 + Version 4.9.3, 5.3.0, 6.2.0 PGI C, Fortran, C++ for 64-bit target on x86-64; - Version 16.10-0 + Version 17.10-0 Intel(R) C (icc), C++ (icpc), Fortran (icc) compilers: - Version 15.0.3.187 (Build 20150407) + Version 17.0.4.196 Build 20170411 MPICH 3.1.4 compiled with GCC 4.9.3 Linux 3.10.0-327.18.2.el7 GNU C (gcc) and C++ (g++) compilers #1 SMP x86_64 GNU/Linux Version 4.8.5 20150623 (Red Hat 4.8.5-4) - (jelly) with NAG Fortran Compiler Release 6.1(Tozai) + (jelly) with NAG Fortran Compiler Release 6.1(Tozai +) + GCC Version 7.1.0 + OpenMPI 3.0.0-GCC-7.2.0-2.29 Intel(R) C (icc) and C++ (icpc) compilers - Version 15.0.3.187 (Build 20150407) + Version 17.0.7.098 (Build 20160721) with NAG Fortran Compiler Release 6.1(Tozai) + Linux 3.10.0-327.10.1.el7 MPICH 3.2 compiled with GCC 5.3.0 + #1 SMP x86_64 GNU/Linux + (moohan) + Linux 2.6.32-573.18.1.el6.ppc64 MPICH mpich 3.1.4 compiled with #1 SMP ppc64 GNU/Linux IBM XL C/C++ for Linux, V13.1 (ostrich) and IBM XL Fortran for Linux, V15.1 @@ -1175,6 +324,12 @@ Known Problems images, but since this is a collective operation, a deadlock is possible if one or more processes do not participate. + Three tests fail with OpenMPI 3.0.0/GCC-7.2.0-2.29: + testphdf5 (ecdsetw, selnone, cchunk1, cchunk3, cchunk4, and actualio) + t_shapesame (sscontig2) + t_pflush1/fails on exit + The first two tests fail attempting collective writes. + 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. -- cgit v0.12 From 8ff01c5fb7164366d9724096ad51eb1d304a86be Mon Sep 17 00:00:00 2001 From: lrknox Date: Tue, 3 Apr 2018 14:53:25 -0500 Subject: Update config/lt_vers.am so that the .so numbers for the hdf5_1_10 snapshots are not behind the 1.10.2 release. HDF5 version 1.10.2 released on 2018-03-29 --- config/lt_vers.am | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/config/lt_vers.am b/config/lt_vers.am index 1bacd1b..82cf35e 100644 --- a/config/lt_vers.am +++ b/config/lt_vers.am @@ -16,9 +16,9 @@ ## See libtool versioning documentation online. ## After making changes, run bin/reconfigure to update other configure related ## files like Makefile.in. -LT_VERS_INTERFACE = 101 +LT_VERS_INTERFACE = 102 LT_VERS_REVISION = 0 -LT_VERS_AGE = 0 +LT_VERS_AGE = 1 ## If the API changes *at all*, increment LT_VERS_INTERFACE and ## reset LT_VERS_REVISION to 0. @@ -39,31 +39,31 @@ LT_VERS_AGE = 0 ## the effects of the H5_V1_x_COMPAT flag. ## ## Version numbers for wrapper shared library files. -LT_CXX_VERS_INTERFACE = 101 +LT_CXX_VERS_INTERFACE = 102 LT_CXX_VERS_REVISION = 0 LT_CXX_VERS_AGE = 0 LT_F_VERS_INTERFACE = 101 -LT_F_VERS_REVISION = 0 +LT_F_VERS_REVISION = 1 LT_F_VERS_AGE = 1 -LT_HL_VERS_INTERFACE = 100 -LT_HL_VERS_REVISION = 1 -LT_HL_VERS_AGE = 0 +LT_HL_VERS_INTERFACE = 101 +LT_HL_VERS_REVISION = 0 +LT_HL_VERS_AGE = 1 LT_HL_CXX_VERS_INTERFACE = 101 -LT_HL_CXX_VERS_REVISION = 0 +LT_HL_CXX_VERS_REVISION = 1 LT_HL_CXX_VERS_AGE = 1 LT_HL_F_VERS_INTERFACE = 100 -LT_HL_F_VERS_REVISION = 1 +LT_HL_F_VERS_REVISION = 2 LT_HL_F_VERS_AGE = 0 -LT_JAVA_VERS_INTERFACE = 101 +LT_JAVA_VERS_INTERFACE = 102 LT_JAVA_VERS_REVISION = 0 -LT_JAVA_VERS_AGE = 1 +LT_JAVA_VERS_AGE = 2 -LT_TOOLS_VERS_INTERFACE = 100 -LT_TOOLS_VERS_REVISION = 1 -LT_TOOLS_VERS_AGE = 0 +LT_TOOLS_VERS_INTERFACE = 101 +LT_TOOLS_VERS_REVISION = 0 +LT_TOOLS_VERS_AGE = 1 -- cgit v0.12 From dcb8ab121df50662e368ed276468e2540849f62a Mon Sep 17 00:00:00 2001 From: lrknox Date: Tue, 3 Apr 2018 16:59:57 -0500 Subject: Typos/omissions. --- release_docs/HISTORY-1_10.txt | 2 +- release_docs/RELEASE.txt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/release_docs/HISTORY-1_10.txt b/release_docs/HISTORY-1_10.txt index 62e3f08..9887a54 100644 --- a/release_docs/HISTORY-1_10.txt +++ b/release_docs/HISTORY-1_10.txt @@ -176,7 +176,7 @@ New Features (DER - 2017/05/31, HDFFV-10214) - The H5I_REFERENCE value in the H5I_type_t enum (defined in H5Ipublic.h) - has been marked as deprectated. + has been marked as deprecated. This ID type value is not used in the C library. i.e.: There are no hid_t values that are of ID type H5I_REFERENCE. diff --git a/release_docs/RELEASE.txt b/release_docs/RELEASE.txt index ea8abb2..d0d5d7a 100644 --- a/release_docs/RELEASE.txt +++ b/release_docs/RELEASE.txt @@ -105,7 +105,7 @@ Support for new platforms, languages and compilers. ======================================= - -Bug Fixes since HDF5-1.10.1 release +Bug Fixes since HDF5-1.10.2 release ================================== Library -- cgit v0.12 From df83d7813466fcb38b344361960681354a54af2a Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Tue, 10 Apr 2018 10:52:18 -0500 Subject: HDFFV-10444 fix so numbers and merge java test changes --- .gitattributes | 2 + CMakeLists.txt | 43 ++- MANIFEST | 2 + c++/src/CMakeLists.txt | 4 +- config/cmake/HDF5Macros.cmake | 10 +- fortran/src/CMakeLists.txt | 8 +- fortran/test/CMakeLists.txt | 8 +- hl/c++/src/CMakeLists.txt | 4 +- hl/fortran/src/CMakeLists.txt | 8 +- hl/src/CMakeLists.txt | 4 +- java/src/jni/CMakeLists.txt | 2 +- java/test/CMakeLists.txt | 105 +++++-- java/test/JUnit-interface.txt | 30 +- java/test/JUnit-unit.txt | 614 +++++++++++++++++++++++++++++++++++++ java/test/Makefile.am | 9 +- java/test/TestAll.java | 4 +- java/test/TestH5E.java | 268 ---------------- java/test/TestH5Eparams.java | 343 +++++++++++++++++++++ java/test/TestUnit.java | 36 +++ java/test/junit.sh.in | 8 +- src/CMakeLists.txt | 4 +- test/CMakeLists.txt | 8 +- test/CMakeTests.cmake | 4 +- tools/lib/CMakeLists.txt | 4 +- tools/test/h5copy/CMakeLists.txt | 2 +- tools/test/h5diff/CMakeLists.txt | 2 +- tools/test/h5dump/CMakeLists.txt | 2 +- tools/test/h5ls/CMakeLists.txt | 2 +- tools/test/h5repack/CMakeLists.txt | 4 +- 29 files changed, 1163 insertions(+), 381 deletions(-) create mode 100644 java/test/JUnit-unit.txt create mode 100644 java/test/TestH5Eparams.java create mode 100644 java/test/TestUnit.java diff --git a/.gitattributes b/.gitattributes index 3c7dae1..de68733 100644 --- a/.gitattributes +++ b/.gitattributes @@ -321,6 +321,7 @@ java/test/TestH5Dparams.java -text java/test/TestH5Dplist.java -text java/test/TestH5E.java -text java/test/TestH5Edefault.java -text +java/test/TestH5Eparams.java -text java/test/TestH5Eregister.java -text java/test/TestH5F.java -text java/test/TestH5Fbasic.java -text @@ -347,6 +348,7 @@ java/test/TestH5Sbasic.java -text java/test/TestH5T.java -text java/test/TestH5Tbasic.java -text java/test/TestH5Tparams.java -text +java/test/TestUnit.java -text java/test/TestH5Z.java -text java/test/h5ex_g_iterate.orig -text svneol=unset#application/x-hdf java/test/junit.sh.in -text diff --git a/CMakeLists.txt b/CMakeLists.txt index 5ac4c60..0da475a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -218,13 +218,13 @@ string (REGEX REPLACE ".*#define[ \t]+H5_VERS_SUBRELEASE[ \t]+\"([0-9A-Za-z._]*) #----------------------------------------------------------------------------- file (READ ${HDF5_SOURCE_DIR}/config/lt_vers.am _lt_vers_am_contents) string (REGEX REPLACE ".*LT_VERS_INTERFACE[ \t]+=[ \t]+([0-9]*).*$" - "\\1" H5_SOVERS_INTERFACE ${_lt_vers_am_contents}) + "\\1" H5_LIB_SOVERS_INTERFACE ${_lt_vers_am_contents}) string (REGEX REPLACE ".*LT_VERS_REVISION[ \t]+=[ \t]+([0-9]*).*$" - "\\1" H5_SOVERS_MINOR ${_lt_vers_am_contents}) + "\\1" H5_LIB_SOVERS_MINOR ${_lt_vers_am_contents}) string (REGEX REPLACE ".*LT_VERS_AGE[ \t]+=[ \t]+([0-9]*).*$" - "\\1" H5_SOVERS_RELEASE ${_lt_vers_am_contents}) -math (EXPR H5_SOVERS_MAJOR ${H5_SOVERS_INTERFACE}-${H5_SOVERS_RELEASE}) -message (STATUS "SOVERSION: ${H5_SOVERS_MAJOR}.${H5_SOVERS_RELEASE}.${H5_SOVERS_MINOR}") + "\\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}") 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]*).*$" @@ -316,41 +316,56 @@ if (NOT "${H5_VERS_SUBRELEASE}" STREQUAL "") else () set (HDF5_PACKAGE_VERSION_STRING "${HDF5_PACKAGE_VERSION}") endif () -set (HDF5_PACKAGE_SOVERSION "${H5_SOVERS_MAJOR}.${H5_SOVERS_RELEASE}.${H5_SOVERS_MINOR}") +set (HDF5_LIB_PACKAGE_SOVERSION "${H5_LIB_SOVERS_MAJOR}.${H5_LIB_SOVERS_RELEASE}.${H5_LIB_SOVERS_MINOR}") +set (HDF5_LIB_PACKAGE_SOVERSION_MAJOR "${H5_LIB_SOVERS_MAJOR}") if (H5_TOOLS_SOVERS_EXISTS) set (HDF5_TOOLS_PACKAGE_SOVERSION "${H5_TOOLS_SOVERS_MAJOR}.${H5_TOOLS_SOVERS_RELEASE}.${H5_TOOLS_SOVERS_MINOR}") + set (HDF5_TOOLS_PACKAGE_SOVERSION_MAJOR "${H5_TOOLS_SOVERS_MAJOR}") else () - set (HDF5_TOOLS_PACKAGE_SOVERSION "${H5_SOVERS_MAJOR}.${H5_SOVERS_RELEASE}.${H5_SOVERS_MINOR}") + set (HDF5_TOOLS_PACKAGE_SOVERSION "${H5_LIB_SOVERS_MAJOR}.${H5_LIB_SOVERS_RELEASE}.${H5_LIB_SOVERS_MINOR}") + set (HDF5_TOOLS_PACKAGE_SOVERSION_MAJOR "${H5_LIB_SOVERS_MAJOR}") endif () if (H5_CXX_SOVERS_EXISTS) set (HDF5_CXX_PACKAGE_SOVERSION "${H5_CXX_SOVERS_MAJOR}.${H5_CXX_SOVERS_RELEASE}.${H5_CXX_SOVERS_MINOR}") + set (HDF5_CXX_PACKAGE_SOVERSION_MAJOR "${H5_CXX_SOVERS_MAJOR}") else () - set (HDF5_CXX_PACKAGE_SOVERSION "${H5_SOVERS_MAJOR}.${H5_SOVERS_RELEASE}.${H5_SOVERS_MINOR}") + set (HDF5_CXX_PACKAGE_SOVERSION "${H5_LIB_SOVERS_MAJOR}.${H5_LIB_SOVERS_RELEASE}.${H5_LIB_SOVERS_MINOR}") + set (HDF5_CXX_PACKAGE_SOVERSION_MAJOR "${H5_LIB_SOVERS_MAJOR}") endif () if (H5_F_SOVERS_EXISTS) set (HDF5_F_PACKAGE_SOVERSION "${H5_F_SOVERS_MAJOR}.${H5_F_SOVERS_RELEASE}.${H5_F_SOVERS_MINOR}") + set (HDF5_F_PACKAGE_SOVERSION_MAJOR "${H5_F_SOVERS_MAJOR}") else () - set (HDF5_F_PACKAGE_SOVERSION "${H5_SOVERS_MAJOR}.${H5_SOVERS_RELEASE}.${H5_SOVERS_MINOR}") + set (HDF5_F_PACKAGE_SOVERSION "${H5_LIB_SOVERS_MAJOR}.${H5_LIB_SOVERS_RELEASE}.${H5_LIB_SOVERS_MINOR}") + set (HDF5_F_PACKAGE_SOVERSION_MAJOR "${H5_LIB_SOVERS_MAJOR}") endif () if (H5_HL_SOVERS_EXISTS) set (HDF5_HL_PACKAGE_SOVERSION "${H5_HL_SOVERS_MAJOR}.${H5_HL_SOVERS_RELEASE}.${H5_HL_SOVERS_MINOR}") + set (HDF5_HL_PACKAGE_SOVERSION_MAJOR "${H5_HL_SOVERS_MAJOR}") else () - set (HDF5_HL_PACKAGE_SOVERSION "${H5_SOVERS_MAJOR}.${H5_SOVERS_RELEASE}.${H5_SOVERS_MINOR}") + set (HDF5_HL_PACKAGE_SOVERSION "${H5_LIB_SOVERS_MAJOR}.${H5_LIB_SOVERS_RELEASE}.${H5_LIB_SOVERS_MINOR}") + set (HDF5_HL_PACKAGE_SOVERSION_MAJOR "${H5_LIB_SOVERS_MAJOR}") endif () if (H5_HL_F_SOVERS_EXISTS) set (HDF5_HL_CXX_PACKAGE_SOVERSION "${H5_HL_CXX_SOVERS_MAJOR}.${H5_HL_CXX_SOVERS_RELEASE}.${H5_HL_CXX_SOVERS_MINOR}") + set (HDF5_HL_CXX_PACKAGE_SOVERSION_MAJOR "${H5_HL_CXX_SOVERS_MAJOR}") else () - set (HDF5_HL_CXX_PACKAGE_SOVERSION "${H5_SOVERS_MAJOR}.${H5_SOVERS_RELEASE}.${H5_SOVERS_MINOR}") + set (HDF5_HL_CXX_PACKAGE_SOVERSION "${H5_LIB_SOVERS_MAJOR}.${H5_LIB_SOVERS_RELEASE}.${H5_LIB_SOVERS_MINOR}") + set (HDF5_HL_CXX_PACKAGE_SOVERSION_MAJOR "${H5_LIB_SOVERS_MAJOR}") endif () if (H5_HL_F_SOVERS_EXISTS) set (HDF5_HL_F_PACKAGE_SOVERSION "${H5_HL_F_SOVERS_MAJOR}.${H5_HL_F_SOVERS_RELEASE}.${H5_HL_F_SOVERS_MINOR}") + set (HDF5_HL_F_PACKAGE_SOVERSION_MAJOR "${H5_HL_F_SOVERS_MAJOR}") else () - set (HDF5_HL_F_PACKAGE_SOVERSION "${H5_SOVERS_MAJOR}.${H5_SOVERS_RELEASE}.${H5_SOVERS_MINOR}") + set (HDF5_HL_F_PACKAGE_SOVERSION "${H5_LIB_SOVERS_MAJOR}.${H5_LIB_SOVERS_RELEASE}.${H5_LIB_SOVERS_MINOR}") + set (HDF5_HL_F_PACKAGE_SOVERSION_MAJOR "${H5_LIB_SOVERS_MAJOR}") endif () if (H5_JAVA_SOVERS_EXISTS) - set (HDF5_PACKAGE_SOVERSION "${H5_JAVA_SOVERS_MAJOR}.${H5_JAVA_SOVERS_RELEASE}.${H5_JAVA_SOVERS_MINOR}") + set (HDF5_JAVA_PACKAGE_SOVERSION "${H5_JAVA_SOVERS_MAJOR}.${H5_JAVA_SOVERS_RELEASE}.${H5_JAVA_SOVERS_MINOR}") + set (HDF5_JAVA_PACKAGE_SOVERSION_MAJOR "${H5_JAVA_SOVERS_MAJOR}") else () - set (HDF5_JAVA_PACKAGE_SOVERSION "${H5_SOVERS_MAJOR}.${H5_SOVERS_RELEASE}.${H5_SOVERS_MINOR}") + set (HDF5_JAVA_PACKAGE_SOVERSION "${H5_LIB_SOVERS_MAJOR}.${H5_LIB_SOVERS_RELEASE}.${H5_LIB_SOVERS_MINOR}") + set (HDF5_JAVA_PACKAGE_SOVERSION_MAJOR "${H5_LIB_SOVERS_MAJOR}") endif () set (HDF5_PACKAGE_STRING "${HDF5_PACKAGE_NAME} ${HDF5_PACKAGE_VERSION_STRING}") set (HDF5_PACKAGE_TARNAME "${HDF5_PACKAGE}${HDF_PACKAGE_EXT}") diff --git a/MANIFEST b/MANIFEST index df368aa..17c5903 100644 --- a/MANIFEST +++ b/MANIFEST @@ -3054,6 +3054,7 @@ ./java/test/TestH5Dplist.java ./java/test/TestH5E.java ./java/test/TestH5Edefault.java +./java/test/TestH5Eparams.java ./java/test/TestH5Eregister.java ./java/test/TestH5Fparams.java ./java/test/TestH5Fbasic.java @@ -3083,6 +3084,7 @@ ./java/test/TestH5T.java ./java/test/TestH5Z.java ./java/test/TestAll.java +./java/test/TestUnit.java ./java/lib/hamcrest-core.jar ./java/lib/junit.jar diff --git a/c++/src/CMakeLists.txt b/c++/src/CMakeLists.txt index 1136d6a..35e7590 100644 --- a/c++/src/CMakeLists.txt +++ b/c++/src/CMakeLists.txt @@ -86,7 +86,7 @@ add_library (${HDF5_CPP_LIB_TARGET} STATIC ${CPP_SOURCES} ${CPP_HDRS}) TARGET_C_PROPERTIES (${HDF5_CPP_LIB_TARGET} STATIC " " " ") target_link_libraries (${HDF5_CPP_LIB_TARGET} PUBLIC ${HDF5_LIB_TARGET}) set_global_variable (HDF5_LIBRARIES_TO_EXPORT "${HDF5_LIBRARIES_TO_EXPORT};${HDF5_CPP_LIB_TARGET}") -H5_SET_LIB_OPTIONS (${HDF5_CPP_LIB_TARGET} ${HDF5_CPP_LIB_NAME} STATIC) +H5_SET_LIB_OPTIONS (${HDF5_CPP_LIB_TARGET} ${HDF5_CPP_LIB_NAME} STATIC 0) set_target_properties (${HDF5_CPP_LIB_TARGET} PROPERTIES FOLDER libraries/cpp INTERFACE_INCLUDE_DIRECTORIES "$/include>" @@ -98,7 +98,7 @@ if (BUILD_SHARED_LIBS) TARGET_C_PROPERTIES (${HDF5_CPP_LIBSH_TARGET} SHARED " " " ") target_link_libraries (${HDF5_CPP_LIBSH_TARGET} PUBLIC ${HDF5_LIBSH_TARGET}) set_global_variable (HDF5_LIBRARIES_TO_EXPORT "${HDF5_LIBRARIES_TO_EXPORT};${HDF5_CPP_LIBSH_TARGET}") - H5_SET_LIB_OPTIONS (${HDF5_CPP_LIBSH_TARGET} ${HDF5_CPP_LIB_NAME} SHARED ${HDF5_CXX_PACKAGE_SOVERSION}) + H5_SET_LIB_OPTIONS (${HDF5_CPP_LIBSH_TARGET} ${HDF5_CPP_LIB_NAME} SHARED "CXX") set_target_properties (${HDF5_CPP_LIBSH_TARGET} PROPERTIES FOLDER libraries/cpp COMPILE_DEFINITIONS "H5_BUILT_AS_DYNAMIC_LIB" diff --git a/config/cmake/HDF5Macros.cmake b/config/cmake/HDF5Macros.cmake index c3dea9a..e472a67 100644 --- a/config/cmake/HDF5Macros.cmake +++ b/config/cmake/HDF5Macros.cmake @@ -10,19 +10,15 @@ # help@hdfgroup.org. # #------------------------------------------------------------------------------- -macro (H5_SET_LIB_OPTIONS libtarget libname libtype) +macro (H5_SET_LIB_OPTIONS libtarget libname libtype libpackage) set (LIB_OUT_NAME "${libname}") # SOVERSION passed in ARGN when shared if (${libtype} MATCHES "SHARED") - if (ARGN) - set (PACKAGE_SOVERSION ${ARGN}) - else () - set (PACKAGE_SOVERSION ${H5_SOVERS_MAJOR}) - endif () + set (PACKAGE_SOVERSION ${HDF5_${libpackage}_PACKAGE_SOVERSION}) if (WIN32) set (LIBHDF_VERSION ${HDF5_PACKAGE_VERSION_MAJOR}) else () - set (LIBHDF_VERSION ${HDF5_PACKAGE_SOVERSION}) + set (LIBHDF_VERSION ${HDF5_${libpackage}_PACKAGE_SOVERSION_MAJOR}) endif () set_target_properties (${libtarget} PROPERTIES VERSION ${LIBHDF_VERSION}) if (WIN32) diff --git a/fortran/src/CMakeLists.txt b/fortran/src/CMakeLists.txt index 3abab4e..03c12ac 100644 --- a/fortran/src/CMakeLists.txt +++ b/fortran/src/CMakeLists.txt @@ -136,7 +136,7 @@ target_include_directories(${HDF5_F90_C_LIB_TARGET} PUBLIC ${HDF5_F90_BINARY_DIR TARGET_C_PROPERTIES (${HDF5_F90_C_LIB_TARGET} STATIC " " " ") target_link_libraries (${HDF5_F90_C_LIB_TARGET} PUBLIC ${HDF5_LIB_TARGET}) set_global_variable (HDF5_LIBRARIES_TO_EXPORT "${HDF5_LIBRARIES_TO_EXPORT};${HDF5_F90_C_LIB_TARGET}") -H5_SET_LIB_OPTIONS (${HDF5_F90_C_LIB_TARGET} ${HDF5_F90_C_LIB_NAME} STATIC) +H5_SET_LIB_OPTIONS (${HDF5_F90_C_LIB_TARGET} ${HDF5_F90_C_LIB_NAME} STATIC 0) set_target_properties (${HDF5_F90_C_LIB_TARGET} PROPERTIES FOLDER libraries/fortran LINKER_LANGUAGE C @@ -150,7 +150,7 @@ if (BUILD_SHARED_LIBS) TARGET_C_PROPERTIES (${HDF5_F90_C_LIBSH_TARGET} SHARED " " " ") target_link_libraries (${HDF5_F90_C_LIBSH_TARGET} PUBLIC ${HDF5_LIBSH_TARGET}) set_global_variable (HDF5_LIBRARIES_TO_EXPORT "${HDF5_LIBRARIES_TO_EXPORT};${HDF5_F90_C_LIBSH_TARGET}") - H5_SET_LIB_OPTIONS (${HDF5_F90_C_LIBSH_TARGET} ${HDF5_F90_C_LIB_NAME} SHARED ${HDF5_F_PACKAGE_SOVERSION}) + H5_SET_LIB_OPTIONS (${HDF5_F90_C_LIBSH_TARGET} ${HDF5_F90_C_LIB_NAME} SHARED "F") set_target_properties (${HDF5_F90_C_LIBSH_TARGET} PROPERTIES FOLDER libraries/fortran LINKER_LANGUAGE C @@ -255,7 +255,7 @@ if (H5_HAVE_PARALLEL AND MPI_Fortran_FOUND) target_include_directories (${HDF5_F90_LIB_TARGET} PUBLIC ${MPI_Fortran_INCLUDE_DIRS}) endif () set_global_variable (HDF5_LIBRARIES_TO_EXPORT "${HDF5_LIBRARIES_TO_EXPORT};${HDF5_F90_LIB_TARGET}") -H5_SET_LIB_OPTIONS (${HDF5_F90_LIB_TARGET} ${HDF5_F90_LIB_NAME} STATIC) +H5_SET_LIB_OPTIONS (${HDF5_F90_LIB_TARGET} ${HDF5_F90_LIB_NAME} STATIC 0) set_target_properties (${HDF5_F90_LIB_TARGET} PROPERTIES FOLDER libraries/fortran LINKER_LANGUAGE Fortran @@ -284,7 +284,7 @@ if (BUILD_SHARED_LIBS) target_include_directories (${HDF5_F90_LIBSH_TARGET} PUBLIC ${MPI_Fortran_INCLUDE_DIRS}) endif () set_global_variable (HDF5_LIBRARIES_TO_EXPORT "${HDF5_LIBRARIES_TO_EXPORT};${HDF5_F90_LIBSH_TARGET}") - H5_SET_LIB_OPTIONS (${HDF5_F90_LIBSH_TARGET} ${HDF5_F90_LIB_NAME} SHARED ${HDF5_F_PACKAGE_SOVERSION}) + H5_SET_LIB_OPTIONS (${HDF5_F90_LIBSH_TARGET} ${HDF5_F90_LIB_NAME} SHARED "F") set_target_properties (${HDF5_F90_LIBSH_TARGET} PROPERTIES FOLDER libraries/fortran LINKER_LANGUAGE Fortran diff --git a/fortran/test/CMakeLists.txt b/fortran/test/CMakeLists.txt index b71a8eb..a5f5464 100644 --- a/fortran/test/CMakeLists.txt +++ b/fortran/test/CMakeLists.txt @@ -50,7 +50,7 @@ target_link_libraries (${HDF5_F90_C_TEST_LIB_TARGET} ${HDF5_F90_C_LIB_TARGET} ${HDF5_TEST_LIB_TARGET} ) -H5_SET_LIB_OPTIONS (${HDF5_F90_C_TEST_LIB_TARGET} ${HDF5_F90_C_TEST_LIB_NAME} STATIC) +H5_SET_LIB_OPTIONS (${HDF5_F90_C_TEST_LIB_TARGET} ${HDF5_F90_C_TEST_LIB_NAME} STATIC 0) set_target_properties (${HDF5_F90_C_TEST_LIB_TARGET} PROPERTIES FOLDER libraries/test/fortran LINKER_LANGUAGE C @@ -64,7 +64,7 @@ if (BUILD_SHARED_LIBS) ${HDF5_F90_C_LIBSH_TARGET} ${HDF5_TEST_LIBSH_TARGET} ) - H5_SET_LIB_OPTIONS (${HDF5_F90_C_TEST_LIBSH_TARGET} ${HDF5_F90_C_TEST_LIB_NAME} SHARED ${HDF5_PACKAGE_SOVERSION}) + H5_SET_LIB_OPTIONS (${HDF5_F90_C_TEST_LIBSH_TARGET} ${HDF5_F90_C_TEST_LIB_NAME} SHARED "F") set_target_properties (${HDF5_F90_C_TEST_LIBSH_TARGET} PROPERTIES FOLDER libraries/test/fortran LINKER_LANGUAGE C @@ -126,7 +126,7 @@ target_link_libraries (${HDF5_F90_TEST_LIB_TARGET} ${HDF5_F90_LIB_TARGET} ${HDF5_LIB_TARGET} ) -H5_SET_LIB_OPTIONS (${HDF5_F90_TEST_LIB_TARGET} ${HDF5_F90_TEST_LIB_NAME} STATIC) +H5_SET_LIB_OPTIONS (${HDF5_F90_TEST_LIB_TARGET} ${HDF5_F90_TEST_LIB_NAME} STATIC 0) target_include_directories (${HDF5_F90_TEST_LIB_TARGET} PRIVATE ${CMAKE_Fortran_MODULE_DIRECTORY}/static) set_target_properties (${HDF5_F90_TEST_LIB_TARGET} PROPERTIES FOLDER libraries/test/fortran @@ -153,7 +153,7 @@ if (BUILD_SHARED_LIBS) ${HDF5_F90_LIBSH_TARGET} ${HDF5_LIBSH_TARGET} ) - H5_SET_LIB_OPTIONS (${HDF5_F90_TEST_LIBSH_TARGET} ${HDF5_F90_TEST_LIB_NAME} SHARED ${HDF5_PACKAGE_SOVERSION}) + H5_SET_LIB_OPTIONS (${HDF5_F90_TEST_LIBSH_TARGET} ${HDF5_F90_TEST_LIB_NAME} SHARED "F") target_include_directories (${HDF5_F90_TEST_LIBSH_TARGET} PRIVATE ${CMAKE_Fortran_MODULE_DIRECTORY}/shared) set_target_properties (${HDF5_F90_TEST_LIBSH_TARGET} PROPERTIES FOLDER libraries/test/fortran diff --git a/hl/c++/src/CMakeLists.txt b/hl/c++/src/CMakeLists.txt index c0cc09e..bfafe7f 100644 --- a/hl/c++/src/CMakeLists.txt +++ b/hl/c++/src/CMakeLists.txt @@ -14,7 +14,7 @@ add_library (${HDF5_HL_CPP_LIB_TARGET} STATIC ${HDF5_HL_CPP_SOURCES}) TARGET_C_PROPERTIES (${HDF5_HL_CPP_LIB_TARGET} STATIC " " " ") target_link_libraries (${HDF5_HL_CPP_LIB_TARGET} PUBLIC ${HDF5_HL_LIB_TARGET} ${HDF5_LIB_TARGET}) set_global_variable (HDF5_LIBRARIES_TO_EXPORT "${HDF5_LIBRARIES_TO_EXPORT};${HDF5_HL_CPP_LIB_TARGET}") -H5_SET_LIB_OPTIONS (${HDF5_HL_CPP_LIB_TARGET} ${HDF5_HL_CPP_LIB_NAME} STATIC) +H5_SET_LIB_OPTIONS (${HDF5_HL_CPP_LIB_TARGET} ${HDF5_HL_CPP_LIB_NAME} STATIC 0) set_target_properties (${HDF5_HL_CPP_LIB_TARGET} PROPERTIES FOLDER libraries/hl INTERFACE_INCLUDE_DIRECTORIES "$/include>" @@ -26,7 +26,7 @@ if (BUILD_SHARED_LIBS) TARGET_C_PROPERTIES (${HDF5_HL_CPP_LIBSH_TARGET} SHARED " " " ") target_link_libraries (${HDF5_HL_CPP_LIBSH_TARGET} PUBLIC ${HDF5_HL_LIBSH_TARGET} ${HDF5_LIBSH_TARGET}) set_global_variable (HDF5_LIBRARIES_TO_EXPORT "${HDF5_LIBRARIES_TO_EXPORT};${HDF5_HL_CPP_LIBSH_TARGET}") - H5_SET_LIB_OPTIONS (${HDF5_HL_CPP_LIBSH_TARGET} ${HDF5_HL_CPP_LIB_NAME} SHARED ${HDF5_HL_CXX_PACKAGE_SOVERSION}) + H5_SET_LIB_OPTIONS (${HDF5_HL_CPP_LIBSH_TARGET} ${HDF5_HL_CPP_LIB_NAME} SHARED "HL_CXX") set_target_properties (${HDF5_HL_CPP_LIBSH_TARGET} PROPERTIES FOLDER libraries/hl COMPILE_DEFINITIONS "H5_BUILT_AS_DYNAMIC_LIB" diff --git a/hl/fortran/src/CMakeLists.txt b/hl/fortran/src/CMakeLists.txt index 6dd94fe..f1e0c3a 100644 --- a/hl/fortran/src/CMakeLists.txt +++ b/hl/fortran/src/CMakeLists.txt @@ -74,7 +74,7 @@ target_include_directories(${HDF5_HL_F90_C_LIB_TARGET} PUBLIC ${HDF5_F90_BINARY_ TARGET_C_PROPERTIES (${HDF5_HL_F90_C_LIB_TARGET} STATIC " " " ") target_link_libraries (${HDF5_HL_F90_C_LIB_TARGET} PUBLIC ${HDF5_F90_C_LIB_TARGET} ${HDF5_HL_LIB_TARGET}) set_global_variable (HDF5_LIBRARIES_TO_EXPORT "${HDF5_LIBRARIES_TO_EXPORT};${HDF5_HL_F90_C_LIB_TARGET}") -H5_SET_LIB_OPTIONS (${HDF5_HL_F90_C_LIB_TARGET} ${HDF5_HL_F90_C_LIB_NAME} STATIC) +H5_SET_LIB_OPTIONS (${HDF5_HL_F90_C_LIB_TARGET} ${HDF5_HL_F90_C_LIB_NAME} STATIC 0) set_target_properties (${HDF5_HL_F90_C_LIB_TARGET} PROPERTIES FOLDER libraries/hl/fortran LINKER_LANGUAGE C @@ -88,7 +88,7 @@ if (BUILD_SHARED_LIBS) TARGET_C_PROPERTIES (${HDF5_HL_F90_C_LIBSH_TARGET} SHARED " " " ") target_link_libraries (${HDF5_HL_F90_C_LIBSH_TARGET} PUBLIC ${HDF5_F90_C_LIBSH_TARGET} ${HDF5_HL_LIBSH_TARGET}) set_global_variable (HDF5_LIBRARIES_TO_EXPORT "${HDF5_LIBRARIES_TO_EXPORT};${HDF5_HL_F90_C_LIBSH_TARGET}") - H5_SET_LIB_OPTIONS (${HDF5_HL_F90_C_LIBSH_TARGET} ${HDF5_HL_F90_C_LIB_NAME} SHARED ${HDF5_HL_F_PACKAGE_SOVERSION}) + H5_SET_LIB_OPTIONS (${HDF5_HL_F90_C_LIBSH_TARGET} ${HDF5_HL_F90_C_LIB_NAME} SHARED "HL_F") set_target_properties (${HDF5_HL_F90_C_LIBSH_TARGET} PROPERTIES FOLDER libraries/hl/fortran LINKER_LANGUAGE C @@ -170,7 +170,7 @@ if (H5_HAVE_PARALLEL AND MPI_Fortran_FOUND) target_include_directories (${HDF5_HL_F90_LIB_TARGET} PUBLIC ${MPI_Fortran_INCLUDE_DIRS}) endif () set_global_variable (HDF5_LIBRARIES_TO_EXPORT "${HDF5_LIBRARIES_TO_EXPORT};${HDF5_HL_F90_LIB_TARGET}") -H5_SET_LIB_OPTIONS (${HDF5_HL_F90_LIB_TARGET} ${HDF5_HL_F90_LIB_NAME} STATIC) +H5_SET_LIB_OPTIONS (${HDF5_HL_F90_LIB_TARGET} ${HDF5_HL_F90_LIB_NAME} STATIC 0) set_target_properties (${HDF5_HL_F90_LIB_TARGET} PROPERTIES FOLDER libraries/hl/fortran LINKER_LANGUAGE Fortran @@ -199,7 +199,7 @@ if (BUILD_SHARED_LIBS) target_include_directories (${HDF5_HL_F90_LIBSH_TARGET} PUBLIC ${MPI_Fortran_INCLUDE_DIRS}) endif () set_global_variable (HDF5_LIBRARIES_TO_EXPORT "${HDF5_LIBRARIES_TO_EXPORT};${HDF5_HL_F90_LIBSH_TARGET}") - H5_SET_LIB_OPTIONS (${HDF5_HL_F90_LIBSH_TARGET} ${HDF5_HL_F90_LIB_NAME} SHARED ${HDF5_HL_F_PACKAGE_SOVERSION}) + H5_SET_LIB_OPTIONS (${HDF5_HL_F90_LIBSH_TARGET} ${HDF5_HL_F90_LIB_NAME} SHARED "HL_F") set_target_properties (${HDF5_HL_F90_LIBSH_TARGET} PROPERTIES FOLDER libraries/hl/fortran LINKER_LANGUAGE Fortran diff --git a/hl/src/CMakeLists.txt b/hl/src/CMakeLists.txt index 8ee775b..7204b13 100644 --- a/hl/src/CMakeLists.txt +++ b/hl/src/CMakeLists.txt @@ -32,7 +32,7 @@ set (HL_HEADERS add_library (${HDF5_HL_LIB_TARGET} STATIC ${HL_SOURCES} ${HL_HEADERS}) TARGET_C_PROPERTIES (${HDF5_HL_LIB_TARGET} STATIC " " " ") target_link_libraries (${HDF5_HL_LIB_TARGET} PUBLIC ${HDF5_LIB_TARGET}) -H5_SET_LIB_OPTIONS (${HDF5_HL_LIB_TARGET} ${HDF5_HL_LIB_NAME} STATIC) +H5_SET_LIB_OPTIONS (${HDF5_HL_LIB_TARGET} ${HDF5_HL_LIB_NAME} STATIC 0) set_target_properties (${HDF5_HL_LIB_TARGET} PROPERTIES FOLDER libraries/hl INTERFACE_INCLUDE_DIRECTORIES "$/include>" @@ -44,7 +44,7 @@ if (BUILD_SHARED_LIBS) add_library (${HDF5_HL_LIBSH_TARGET} SHARED ${HL_SOURCES} ${HL_HEADERS}) TARGET_C_PROPERTIES (${HDF5_HL_LIBSH_TARGET} SHARED " " " ") target_link_libraries (${HDF5_HL_LIBSH_TARGET} PUBLIC ${HDF5_LIBSH_TARGET}) - H5_SET_LIB_OPTIONS (${HDF5_HL_LIBSH_TARGET} ${HDF5_HL_LIB_NAME} SHARED ${HDF5_HL_PACKAGE_SOVERSION}) + H5_SET_LIB_OPTIONS (${HDF5_HL_LIBSH_TARGET} ${HDF5_HL_LIB_NAME} SHARED "HL") set_target_properties (${HDF5_HL_LIBSH_TARGET} PROPERTIES FOLDER libraries/hl COMPILE_DEFINITIONS "H5_BUILT_AS_DYNAMIC_LIB" diff --git a/java/src/jni/CMakeLists.txt b/java/src/jni/CMakeLists.txt index 96e7035..21e9d22 100644 --- a/java/src/jni/CMakeLists.txt +++ b/java/src/jni/CMakeLists.txt @@ -54,7 +54,7 @@ TARGET_C_PROPERTIES (${HDF5_JAVA_JNI_LIB_TARGET} SHARED " " " ") target_link_libraries (${HDF5_JAVA_JNI_LIB_TARGET} PUBLIC ${HDF5_LIB_TARGET}) set_target_properties (${HDF5_JAVA_JNI_LIB_TARGET} PROPERTIES FOLDER libraries/jni) SET_GLOBAL_VARIABLE (HDF5_LIBRARIES_TO_EXPORT "${HDF5_LIBRARIES_TO_EXPORT};${HDF5_JAVA_JNI_LIB_TARGET}") -H5_SET_LIB_OPTIONS (${HDF5_JAVA_JNI_LIB_TARGET} ${HDF5_JAVA_JNI_LIB_NAME} SHARED ${HDF5_JAVA_PACKAGE_SOVERSION}) +H5_SET_LIB_OPTIONS (${HDF5_JAVA_JNI_LIB_TARGET} ${HDF5_JAVA_JNI_LIB_NAME} SHARED "JAVA") if (WIN32) get_filename_component (HDF5_JAVA_JNI_DLL_NAME ${HDF5_JAVA_JNI_LIB_TARGET} NAME_WE) set (HDF5_JAVA_JNI_DLL_NAME "${HDF5_JAVA_JNI_DLL_NAME}$<$:_D>") diff --git a/java/test/CMakeLists.txt b/java/test/CMakeLists.txt index 6158055..10a38b0 100644 --- a/java/test/CMakeLists.txt +++ b/java/test/CMakeLists.txt @@ -10,16 +10,13 @@ INCLUDE_DIRECTORIES ( set (HDF5_JAVA_TEST_SOURCES TestH5.java - TestH5E.java - TestH5Edefault.java - TestH5Eregister.java + TestH5Eparams.java TestH5Fparams.java TestH5Fbasic.java TestH5F.java TestH5Fswmr.java TestH5Gbasic.java TestH5G.java - TestH5Giterate.java TestH5Sbasic.java TestH5S.java TestH5Tparams.java @@ -44,13 +41,33 @@ set (HDF5_JAVA_TEST_SOURCES TestH5Ocopy.java TestH5PL.java TestH5Z.java - TestAll.java ) -file (WRITE ${PROJECT_BINARY_DIR}/Manifest.txt -"Main-Class: test.TestAll +if (HDF5_ENABLE_DEBUG_APIS) + set (HDF5_JAVA_TEST_SOURCES + ${HDF5_JAVA_TEST_SOURCES} + TestUnit.java + ) + + file (WRITE ${PROJECT_BINARY_DIR}/Manifest.txt + "Main-Class: test.TestUnit " -) + ) +else () + set (HDF5_JAVA_TEST_SOURCES + ${HDF5_JAVA_TEST_SOURCES} + TestH5E.java + TestH5Edefault.java + TestH5Eregister.java + TestH5Giterate.java + TestAll.java + ) + + file (WRITE ${PROJECT_BINARY_DIR}/Manifest.txt + "Main-Class: test.TestAll +" + ) +endif () set (CMAKE_JAVA_INCLUDE_PATH "${HDF5_JAVA_LIB_DIR}/junit.jar;${HDF5_JAVA_LIB_DIR}/hamcrest-core.jar;${HDF5_JAVA_JARS};${HDF5_JAVA_LOGGING_JAR};${HDF5_JAVA_LOGGING_SIMPLE_JAR}") @@ -63,10 +80,19 @@ get_target_property (${HDF5_JAVA_TEST_LIB_TARGET}_JAR_FILE ${HDF5_JAVA_TEST_LIB_ add_dependencies (${HDF5_JAVA_TEST_LIB_TARGET} ${HDF5_JAVA_HDF5_LIB_TARGET}) set_target_properties (${HDF5_JAVA_TEST_LIB_TARGET} PROPERTIES FOLDER test/java) -set (HDF_JAVA_TEST_FILES +if (HDF5_ENABLE_DEBUG_APIS) + set (HDF_JAVA_TEST_FILES + JUnit-unit.txt + JUnit-interface.ert + ) + set (testfilter "OK (608 tests)") +else () + set (HDF_JAVA_TEST_FILES JUnit-interface.txt JUnit-interface.ert -) + ) + set (testfilter "OK (645 tests)") +endif () foreach (h5_file ${HDF_JAVA_TEST_FILES}) HDFTEST_COPY_FILE("${PROJECT_SOURCE_DIR}/${h5_file}" "${PROJECT_BINARY_DIR}/${h5_file}" "${HDF5_JAVA_TEST_LIB_TARGET}_files") @@ -86,7 +112,6 @@ foreach (CMAKE_INCLUDE_PATH ${CMAKE_JAVA_INCLUDE_PATH}) set (CMAKE_JAVA_CLASSPATH "${CMAKE_JAVA_CLASSPATH}${CMAKE_JAVA_INCLUDE_FLAG_SEP}${CMAKE_INCLUDE_PATH}") endforeach () set (CMAKE_JAVA_CLASSPATH "${CMAKE_JAVA_CLASSPATH}${CMAKE_JAVA_INCLUDE_FLAG_SEP}${${HDF5_JAVA_TEST_LIB_TARGET}_JAR_FILE}") -set (testfilter "OK (598 tests)") set (CMD_ARGS "-Dhdf.hdf5lib.H5.loadLibraryName=$:_DEBUG>>;") add_test ( @@ -97,24 +122,46 @@ add_test ( JUnit-interface.out.err ) -add_test ( - NAME JUnit-interface - COMMAND "${CMAKE_COMMAND}" - -D "TEST_TESTER=${CMAKE_Java_RUNTIME};${CMAKE_Java_RUNTIME_FLAGS}" - -D "TEST_CLASSPATH:STRING=${CMAKE_JAVA_CLASSPATH}" - -D "TEST_ARGS:STRING=${CMD_ARGS}-ea;org.junit.runner.JUnitCore" - -D "TEST_PROGRAM=test.TestAll" - -D "TEST_LIBRARY_DIRECTORY=${CMAKE_TEST_OUTPUT_DIRECTORY}" - -D "TEST_FOLDER=${HDF5_BINARY_DIR}/java/test" - -D "TEST_OUTPUT=JUnit-interface.out" -# -D "TEST_LOG_LEVEL=trace" - -D "TEST_EXPECT=0" - -D "SKIP_APPEND=1" - -D "TEST_MASK_ERROR=TRUE" - -D "TEST_FILTER:STRING=${testfilter}" - -D "TEST_REFERENCE=JUnit-interface.txt" - -P "${HDF_RESOURCES_DIR}/jrunTest.cmake" -) +if (HDF5_ENABLE_DEBUG_APIS) + add_test ( + NAME JUnit-interface + COMMAND "${CMAKE_COMMAND}" + -D "TEST_TESTER=${CMAKE_Java_RUNTIME};${CMAKE_Java_RUNTIME_FLAGS}" + -D "TEST_CLASSPATH:STRING=${CMAKE_JAVA_CLASSPATH}" + -D "TEST_ARGS:STRING=${CMD_ARGS}-ea;org.junit.runner.JUnitCore" + -D "TEST_PROGRAM=test.TestUnit" + -D "TEST_LIBRARY_DIRECTORY=${CMAKE_TEST_OUTPUT_DIRECTORY}" + -D "TEST_FOLDER=${HDF5_BINARY_DIR}/java/test" + -D "TEST_OUTPUT=JUnit-interface.out" +# -D "TEST_LOG_LEVEL=trace" + -D "TEST_EXPECT=0" + -D "SKIP_APPEND=1" + -D "TEST_MASK_ERROR=TRUE" + -D "TEST_FILTER:STRING=${testfilter}" + -D "TEST_REFERENCE=JUnit-unit.txt" + -P "${HDF_RESOURCES_DIR}/jrunTest.cmake" + ) +else () + add_test ( + NAME JUnit-interface + COMMAND "${CMAKE_COMMAND}" + -D "TEST_TESTER=${CMAKE_Java_RUNTIME};${CMAKE_Java_RUNTIME_FLAGS}" + -D "TEST_CLASSPATH:STRING=${CMAKE_JAVA_CLASSPATH}" + -D "TEST_ARGS:STRING=${CMD_ARGS}-ea;org.junit.runner.JUnitCore" + -D "TEST_PROGRAM=test.TestAll" + -D "TEST_LIBRARY_DIRECTORY=${CMAKE_TEST_OUTPUT_DIRECTORY}" + -D "TEST_FOLDER=${HDF5_BINARY_DIR}/java/test" + -D "TEST_OUTPUT=JUnit-interface.out" +# -D "TEST_LOG_LEVEL=trace" + -D "TEST_EXPECT=0" + -D "SKIP_APPEND=1" + -D "TEST_MASK_ERROR=TRUE" + -D "TEST_FILTER:STRING=${testfilter}" + -D "TEST_REFERENCE=JUnit-interface.txt" + -P "${HDF_RESOURCES_DIR}/jrunTest.cmake" + ) +endif () + set_tests_properties (JUnit-interface PROPERTIES ENVIRONMENT "HDF5_PLUGIN_PATH=${CMAKE_BINARY_DIR}/testdir2" DEPENDS "JUnit-interface-clearall-objects" diff --git a/java/test/JUnit-interface.txt b/java/test/JUnit-interface.txt index 91ea286..9518817 100644 --- a/java/test/JUnit-interface.txt +++ b/java/test/JUnit-interface.txt @@ -8,6 +8,21 @@ JUnit version 4.11 .testH5check_version .testH5get_libversion .testH5set_free_list_limits +.testH5EprintInt +.testH5Eget_msg_major +.testH5Eget_msg_minor +.testH5Eget_msg +.testH5Eget_num +.testH5Eget_class_name +.testH5Eget_num_with_msg +.testH5Eclear2 +.testH5Eprint2 +.testH5Ecreate_msg_major +.testH5Ecreate_msg_minor +.testH5Ecreate_stack +.testH5Ecreate_msg_name_null +.testH5Eauto_is_v2 +.testH5EclearInt .testH5Eregister_class_lib_name_null .testH5Eregister_class_version_null .testH5Eunregister_class_invalid_classid @@ -41,23 +56,8 @@ JUnit version 4.11 .testH5Ecreate_msg_invalid_errid .testH5Eclear2_invalid_stkid .testH5Eprint2_invalid_classid -.testH5EprintInt -.testH5Eget_msg_major -.testH5Eget_msg_minor -.testH5Eget_msg -.testH5Eget_num .testH5Epush .testH5Ewalk -.testH5Eget_class_name -.testH5Eget_num_with_msg -.testH5Eclear2 -.testH5Eprint2 -.testH5Ecreate_msg_major -.testH5Ecreate_msg_minor -.testH5Ecreate_stack -.testH5Ecreate_msg_name_null -.testH5Eauto_is_v2 -.testH5EclearInt .testH5Epop .testH5Fcreate_null .testH5Fflush_local diff --git a/java/test/JUnit-unit.txt b/java/test/JUnit-unit.txt new file mode 100644 index 0000000..fa33165 --- /dev/null +++ b/java/test/JUnit-unit.txt @@ -0,0 +1,614 @@ +JUnit version 4.11 +.testJ2C +.testIsSerializable +.testH5garbage_collect +.testH5error_off +.serializeToDisk +.testH5open +.testH5check_version +.testH5get_libversion +.testH5set_free_list_limits +.testH5EprintInt +.testH5Eget_msg_major +.testH5Eget_msg_minor +.testH5Eget_msg +.testH5Eget_num +.testH5Eget_class_name +.testH5Eget_num_with_msg +.testH5Eclear2 +.testH5Eprint2 +.testH5Ecreate_msg_major +.testH5Ecreate_msg_minor +.testH5Ecreate_stack +.testH5Ecreate_msg_name_null +.testH5Eauto_is_v2 +.testH5EclearInt +.testH5Fcreate_null +.testH5Fflush_local +.testH5Fget_info +.testH5Fmount_null +.testH5Fcreate +.testH5Fflush_global +.testH5Funmount_null +.testH5Fclose_negative +.testH5Fopen_null +.testH5Fis_hdf5_null +.testH5Fis_hdf5_text +.testH5Fget_mdc_size +.testH5Fget_mdc_hit_rate +.testH5Fis_hdf5 +.testH5Fget_freespace +.testH5Fclose +.testH5Fget_filesize +.testH5Fcreate_EXCL +.testH5Freopen_closed +.testH5Freset_mdc_hit_rate_stats +.testH5Fget_name +.testH5Fcreate +.testH5Fclear_elink_file_cache +.testH5Fclose_twice +.testH5Freopen +.testH5Fopen_read_only +.testH5Fget_access_plist +.testH5Fget_obj_ids +.testH5Fget_intent_rdwr +.testH5Fget_access_plist_closed +.testH5Fget_create_plist_closed +.testH5Fget_intent_rdonly +.testH5Fget_create_plist +.testH5Fget_obj_count +.testH5Fstart_swmr_write +.testH5Fswmr_read_attempts +.testH5Gget_info_by_name_not_exists +.testH5Gget_info_by_idx_not_exists +.testH5Gget_info_by_name +.testH5Gget_create_plist +.testH5Gopen +.testH5Gget_info_by_idx_null +.testH5Gopen_not_exists +.testH5Gclose +.testH5Gcreate_anon +.testH5Gcreate_null +.testH5Gget_info_by_idx_fileid +.testH5Gclose_invalid +.testH5Gflush_invalid +.testH5Gopen_invalid +.testH5Grefresh_invalid +.testH5Gget_info_invalid +.testH5Gcreate_invalid +.testH5Gcreate_exists +.testH5Gget_info_by_name_null +.testH5Gget_info_by_name_invalid +.testH5Gget_create_plist_invalid +.testH5Gcreate +.testH5Gget_info_by_name_fileid +.testH5Gget_info_by_idx_invalid +.testH5Gopen_null +.testH5Gget_info_by_idx +.testH5Gget_info +.testH5Gget_info_by_name +.testH5Gget_create_plist +.testH5Gopen +.testH5Gget_obj_info_all_gid2 +.testH5Gget_obj_info_all_byIndexType +.testH5Gget_obj_info_max_limit +.testH5Gget_obj_info_all +.testH5Gget_obj_info_max +.testH5Gget_obj_info_all_gid +.testH5Gget_info_by_idx +.testH5Gget_info +.testH5Sclose_invalid +.testH5Screate_simple_max_default +.testH5Screate_simple_dims_null +.testH5Sdecode_null +.testH5Screate_simple_dims_exceed +.testH5Screate_simple_unlimted_1d +.testH5Screate_simple_dims_invalid +.testH5Screate_scalar +.testH5Screate_simple +.testH5Screate_simple_rank_invalid +.testH5Sget_simple_extent_type_invalid +.testH5Sencode_invalid +.testH5Screate_null +.testH5Screate_simple_extent +.testH5Screate_invalid +.testH5Screate_simple_unlimted +.testH5Sget_select_npoints +.testH5Sget_select_type +.testH5Sset_extent_simple +.testH5Sget_select_hyper +.testH5Sget_select_valid +.testH5Sget_select_elem_pointlist +.testH5Sset_extent_none +.testH5Sencode_decode_scalar_dataspace +.testH5Soffset_simple +.testH5Scopy +.testH5Sget_simple_extent_ndims +.testH5Sextent_equal +.testH5Sget_simple_extent_dims +.testH5Sget_simple_extent_type +.testH5Shyper_regular +.testH5Sget_select_bounds +.testH5Sget_select_elem_pointlist_invalid +.testH5Sget_simple_extent_npoints +.testH5Sextent_copy +.testH5Sencode_decode_null_dataspace +.testH5Sis_simple +.testH5Sget_simple_extent_dims_null +.testH5Sselect_none +.testH5Tget_member_type_invalid +.testH5Tenum_insert_null +.testH5Tget_offset_invalid +.testH5Tset_precision_invalid +.testH5Tget_inpad_invalid +.testH5Tenum_nameof_invalid +.testH5Tget_member_value_invalid +.testH5Tenum_nameof_value_null +.testH5Tcreate_invalid +.testH5Tget_strpad_invalid +.testH5Tenum_valueof_invalid +.testH5Tget_fields_null +.testH5Topen_null +.testH5Tpack_invalid +.testH5Tcommit_null +.testH5Tinsert_invalid +.testH5Tenum_valueof_null +.testH5Tset_norm_invalid +.testH5Tlock_invalid +.testH5Tarray_create_invalid +.testH5Tget_member_value_null +.testH5Tset_offset_invalid +.testH5Tget_fields_invalid +.testH5Tequal_invalid +.testH5Tget_ebias_long_invalid +.testH5Tget_cset_invalid +.testH5Tget_size_invalid +.testH5Tset_strpad_invalid +.testH5Tset_ebias_invalid +.testH5Tget_sign_invalid +.testH5Tget_member_index_invalid +.testH5Tget_precision_invalid +.testH5Tset_fields_invalid +.testH5Tcopy_invalid +.testH5Tget_pad_invalid +.testH5Tset_order_invalid +.testH5Tget_member_class_invalid +.testH5Tget_super_invalid +.testH5Tget_class_invalid +.testH5Topen_invalid +.testH5Tget_precision_long_invalid +.testH5Tget_ebias_invalid +.testH5Tget_native_type_invalid +.testH5Tget_fields_length_invalid +.testH5Tget_norm_invalid +.testH5Tenum_nameof_invalid_size +.testH5Tset_pad_invalid +.testH5Tget_pad_null +.testH5Tset_tag_null +.testH5Tget_order_invalid +.testH5Tcommit_invalid +.testH5Tget_array_ndims_invalid +.testH5Tset_tag_invalid +.testH5Tvlen_create_invalid +.testH5Tenum_create_invalid +.testH5Tinsert_null +.testH5Tset_inpad_invalid +.testH5Tenum_valueof_name_null +.testH5Tset_cset_invalid +.testH5Tclose_invalid +.testH5Tget_nmembers_invalid +.testH5Tarray_create_value_null +.testH5Tset_size_invalid +.testH5Tflush_invalid +.testH5Tenum_insert_invalid +.testH5Tget_array_dims_null +.testH5Tget_member_index_null +.testH5Trefresh_invalid +.testH5Tset_sign_invalid +.testH5Tenum_insert_name_null +.testH5Tequal_not +.testH5Tcopy +.testH5Tequal +.testH5Torder_size +.testH5Tconvert +.testH5Tvlen_create +.testH5Tenum_create_functions +.testH5Tenum_functions +.testH5Tget_class +.testH5Tget_array_ndims +.testH5Tequal_type_error +.testH5Tget_array_dims +.testH5Tset_size +.testH5Tis_variable_str +.testH5Tcompound_functions +.testH5Tget_size +.testH5Tarray_create +.testH5Topaque_functions +.testH5Dget_space_status_invalid +.testH5Dget_access_plist_invalid +.testH5Dget_type_invalid +.testH5Dget_create_plist_invalid +.testH5Dget_offset_invalid +.testH5Dvlen_get_buf_size_invalid +.testH5Dcreate_null +.testH5Dset_extent_status_null +.testH5Dvlen_reclaim_null +.testH5Dcreate_invalid +.testH5Dcreate_anon_invalid +.testH5Dset_extent_status_invalid +.testH5Dvlen_reclaim_invalid +.testH5Dopen_invalid +.testH5Dclose_invalid +.testH5Dflush_invalid +.testH5Drefresh_invalid +.testH5Dget_storage_size_invalid +.testH5Dget_space_invalid +.testH5Dopen_null +.testH5Dget_storage_size +.testH5Diterate_write +.testH5Dcreate +.testH5Dget_offset +.testH5Dget_type +.testH5Dfill +.testH5Dopen +.testH5Dcreate_anon +.testH5Dfill_null +.testH5Dget_storage_size_empty +.testH5Diterate +.testH5Dget_access_plist +.testH5Dvlen_read_invalid_buffer +.testH5Dvlen_get_buf_size +.testH5Dget_space_closed +.testH5Dget_space_status +.testH5Dvlen_write_read +.testH5Dget_space +.testH5Dget_type_closed +.testH5Dset_extent +.testH5Lcopy_invalid +.testH5Lget_value_by_idx_null +.testH5Lcreate_external_invalid +.testH5Lexists_null +.testH5Lget_info_invalid +.testH5Lget_name_by_idx_invalid +.testH5Lmove_null_current +.testH5Literate_by_name_nullname +.testH5Lvisit_by_name_nullname +.testH5Lvisit_null +.testH5Lget_name_by_idx_null +.testH5Lcreate_hard_null_dest +.testH5Lget_value_null +.testH5Lcreate_external_null_dest +.testH5Lcreate_external_null_file +.testH5Lcreate_external_null_current +.testH5Ldelete_null +.testH5Lexists_invalid +.testH5Lmove_invalid +.testH5Lcreate_hard_invalid +.testH5Lcopy_null_dest +.testH5Lcreate_soft_null_current +.testH5Lcopy_null_current +.testH5Lget_info_by_idx_null +.testH5Literate_null +.testH5Ldelete_invalid +.testH5Lvisit_by_name_null +.testH5Ldelete_by_idx_invalid +.testH5Lget_info_by_idx_invalid +.testH5Ldelete_by_idx_null +.testH5Lcreate_soft_invalid +.testH5Lcreate_hard_null_current +.testH5Lget_value_by_idx_invalid +.testH5Lmove_null_dest +.testH5Lget_info_null +.testH5Literate_by_name_null +.testH5Lcreate_soft_null_dest +.testH5Lget_value_invalid +.testH5Lget_info_by_idx_not_exist_name +.testH5Lget_name_by_idx_not_exist +.testH5Lvisit +.testH5Lget_name_by_idx_n0 +.testH5Lget_name_by_idx_n3 +.testH5Lvisit_by_name +.testH5Literate_by_name +.testH5Lget_info_hardlink +.testH5Literate +.testH5Lget_info_by_idx_n0 +.testH5Lget_info_by_idx_n3 +.testH5Lget_info_by_idx_name_not_exist_create +.testH5Lexists +.testH5Lget_info_by_idx_name_not_exist_name +.testH5Lget_info_by_idx_not_exist_create +.testH5Lget_info_not_exist +.testH5Lget_info_dataset +.testH5Lget_info_by_idx_n0_create +.testH5Ldelete_soft_link_dangle +.testH5Lget_value_by_idx_external_create +.testH5Ldelete_by_idx_not_exist_create +.testH5Lvisit_create +.testH5Lmove_dst_link_exists +.testH5Lcreate_soft_dangle +.testH5Literate_create +.testH5Lcopy_cur_not_exists +.testH5Lcopy +.testH5Lmove +.testH5Lget_value_by_idx_n2_create +.testH5Lget_value_soft +.testH5Ldelete_by_idx_n2_name +.testH5Lget_info_by_idx_n1_create +.testH5Lcreate_external +.testH5Lget_value_dangle +.testH5Lcreate_hard_dst_link_exists +.testH5Lget_value_by_idx_n2_name +.testH5Lcreate_soft_dst_link_exists +.testH5Lcreate_hard +.testH5Lcreate_soft +.testH5Lmove_cur_not_exists +.testH5Lcreate_hard_cur_not_exists +.testH5Lget_info_softlink_dangle +.testH5Ldelete_by_idx_n2_create +.testH5Ldelete_soft_link +.testH5Lget_info_externallink +.testH5Lcopy_dst_link_exists +.testH5Lget_value_by_idx_external_name +.testH5Ldelete_by_idx_not_exist_name +.testH5Lget_info_softlink +.testH5Lget_value_external +.testH5Lget_value_by_idx_not_exist_create +.testH5Lget_value_by_idx_not_exist_name +.testH5Ldelete_hard_link +.testH5Rgetregion_Nullreference +.testH5Rget_obj_type2_Invalidreftype +.testH5Rdereference +.testH5Rget_name +.testH5Rcreate_Invalidreftype +.testH5Rget_name_NULLreference +.testH5Rget_region +.testH5Rdereference_Nullreference +.testH5Rcreate_refobj +.testH5Rcreate_Invalidspace_id +.testH5Rdereference_Invalidreference +.testH5Rgetregion_Badreferencetype +.testH5Rcreate_regionrefobj +.testH5Rget_name_Invalidreftype +.testH5Rgetregion_Invalidreftype +.testH5Rget_obj_type2 +.testH5Rcreate_InvalidObjectName +.testH5Pset_nbit +.testH5Pset_shared_mesg_index_InvalidFlag +.testH5Pset_shared_mesg_phase_change +.testH5PH5Pset_shared_mesg_phase_change_HighMaxlistValue +.testH5P_layout +.testH5Pget_link_creation_order +.testH5Pget_efile_prefix +.testH5Pset_shared_mesg_nindexes_InvalidHIGHnindexes +.testH5P_file_space_page_size +.testH5Pget_shared_mesg_index_Invalid_indexnum +.testH5Pset_data_transform_NullExpression +.testH5Pset_elink_prefix_null +.testH5Pget_elink_prefix +.testH5Pget_nlinks +.testH5Pset_libver_bounds_invalidhigh +.testH5Pget_char_encoding +.testH5P_istore_k +.testH5Pget_link_phase_change +.testH5Pset_link_phase_change_max_compactLESSTHANmin_dense +.testH5Pget_shared_mesg_phase_change_EqualsSET +.testH5Pset_scaleoffset_Invalidscale_type +.testH5Pget_istore_k_null +.testH5Pset_libver_bounds_invalidlow +.testH5Pset_est_link_info +.testH5Pget_link_phase_change_Null +.testH5P_fill_time +.testH5Pget_userblock_null +.testH5Pset_link_creation_order_tracked +.testH5Pset_shared_mesg_index +.testH5Pset_copy_object +.testH5Pset_link_creation_order_trackedPLUSindexed +.testH5P_file_space_strategy +.testH5Pset_copy_object_invalidobject +.testH5Pset_est_link_info_InvalidValues +.testH5Pset_local_heap_size_hint +.testH5Pget_est_link_info +.testH5Pset_efile_prefix_null +.testH5Pset_scaleoffset +.testH5Pset_create_intermediate_group_invalidobject +.testH5PH5Pset_shared_mesg_phase_change_HighMinbtreeValue +.testH5Pset_create_intermediate_group +.testH5P_alloc_time +.testH5Pset_elink_acc_flags +.testH5Pset_link_phase_change_Highmax_Compact +.testH5P_chunk +.testH5P_sizes +.testH5Pset_link_creation_order_invalidvalue +.testH5P_sym_k +.testH5PH5Pset_shared_mesg_phase_change_MinbtreeGreaterThanMaxlist +.testH5Pget_version_null +.testH5Pset_scaleoffset_Invalidscale_factor +.testH5Pget_elink_prefix_null +.testH5Pget_data_transform_IllegalSize +.testH5Pget_create_intermediate_group +.testH5Pset_shared_mesg_nindexes +.testH5Pset_attr_creation_order_trackedPLUSindexed +.testH5Pget_sym_k_null +.testH5Pset_nlinks +.testH5P_obj_track_times +.testH5Pset_efile_prefix +.testH5P_userblock +.testH5Pget_local_heap_size_hint +.testH5Pset_shared_mesg_index_Invalid_indexnum +.testH5Pset_data_transform_InvalidExpression1 +.testH5Pset_data_transform_InvalidExpression2 +.testH5Pget_attr_phase_change +.testH5Pget_data_transform +.testH5Pget_create_intermediate_group_notcreated +.testH5Pset_elink_prefix +.testH5Pget_attr_creation_order +.testH5Pset_attr_creation_order_invalidvalue +.testH5Pget_shared_mesg_phase_change +.testH5Pget_shared_mesg_index +.testH5Pset_link_phase_change +.testH5Pget_shared_mesg_nindexes +.testH5Pget_version +.testH5Pset_elink_acc_flags_InvalidFlag1 +.testH5Pset_elink_acc_flags_InvalidFlag2 +.testH5Pget_link_phase_change_EqualsSet +.testH5Pget_elink_acc_flags +.testH5Pget_data_transform_ExpressionNotSet +.testH5P_fill_value +.testH5Pget_sizes_null +.testH5Pset_data_transform +.testH5Pset_attr_creation_order_tracked +.testH5P_buffer +.testH5Pdata_transform +.testH5P_elink_fapl +.testH5P_fapl_direct +.testH5P_alignment +.testH5P_fapl_family +.testH5P_chunk_cache +.testH5P_meta_block_size +.testH5Fmdc_logging +.testH5Pget_elink_fapl +.testH5Pset_mdc_config +.testH5P_small_data_block_size +.testH5Pset_fapl_log +.testH5P_evict_on_close +.testH5Pset_libver_bounds +.testH5P_sieve_buf_size +.testH5P_elink_file_cache_size +.testH5P_cache +.testH5Pget_mdc_config +.testH5P_fapl_muti_defaults +.testH5Pget_libver_bounds +.testH5P_btree_ratios +.testH5P_fapl_muti_nulls +.testH5Pset_fapl_sec2 +.testH5Pmulti_transform +.testH5Pset_elink_fapl_NegativeID +.testH5Pset_fapl_stdio +.testH5P_edc_check +.testH5Pset_elink_fapl +.testH5P_hyper_vector_size +.testH5P_gc_references +.testH5P_family_offset +.testH5P_fapl_core +.testH5P_fapl_muti +.testH5P_fapl_split +.testH5Pset_fapl_windows +.testH5P_fclose_degree +.testH5Pget_source_datasetname +.testH5Pvirtual_storage +.testH5Pget_selection_source_dataset +.testH5Pget_virtual_prefix +.testH5Pget_source_filename +.testH5Pset_get_virtual_printf_gap +.testH5Pget_virtual_count +.testH5Pset_virtual_prefix +.testH5Pset_get_virtual_view +.testH5Pget_mapping_parameters +.testH5Pset_virtual_prefix_null +.testH5P_genprop_basic_class +.testH5P_genprop_class_iter +.testH5P_genprop_basic_class_prop +.testH5P_genprop_basic_list_prop +.testH5Acreate2_nullname +.testH5Acreate_by_name +.testH5Aget_name_by_idx +.testH5Aget_storage_size +.testH5Aiterate +.testH5Aopen_by_idx +.testH5Aopen_invalidname +.testH5Aopen +.testH5Aget_info_by_name +.testH5Aget_create_plist +.testH5Adelete_by_name +.testH5Aopen_by_name +.testH5Aget_info +.testH5Aget_name +.testH5Aexists +.testH5Aget_info_by_idx +.testH5Arename +.testH5Adelete_by_idx_name1 +.testH5Adelete_by_idx_name2 +.testH5Adelete_by_idx_order +.testH5Arename_by_name +.testH5Acreate2_invalidobject +.testH5Acreate2 +.testH5Aiterate_by_name +.testH5Adelete_by_idx_null +.testH5Adelete_by_idx_invalidobject +.testH5Awrite_readVL +.testH5Aget_info1 +.testH5Oget_comment_by_name_null +.testH5Ovisit_by_name_nullname +.testH5Oget_info_invalid +.testH5Ovisit_by_name_null +.testH5Oget_comment_invalid +.testH5Oset_comment_by_name_invalid +.testH5Oopen_null +.testH5Oclose_invalid +.testH5Oflush_invalid +.testH5Oget_comment_by_name_invalid +.testH5Orefresh_invalid +.testH5Ocopy_null_dest +.testH5Olink_invalid +.testH5Oget_info_by_idx_invalid +.testH5Oget_info_by_idx_null +.testH5Olink_null_dest +.testH5Oget_info_by_name_invalid +.testH5Oget_info_by_name_null +.testH5Ocopy_invalid +.testH5Oset_comment_by_name_null +.testH5Ocopy_null_current +.testH5Oset_comment_invalid +.testH5Oopen_invalid +.testH5Ovisit_null +.testH5Oexists_by_name +.testH5Oget_info_by_idx_n0 +.testH5Oget_info_by_idx_n3 +.testH5Oget_info_by_name_not_exist_name +.testH5Ovisit_by_name +.testH5Oget_info_by_idx_name_not_exist_name +.testH5Oget_info_datatype +.testH5Oget_info_by_idx_not_exist_name +.testH5Oopen_by_idx_n0 +.testH5Oopen_by_idx_n3 +.testH5Oopen_not_exists +.testH5Ovisit +.testH5Oget_info_by_idx_not_exist_create +.testH5Oget_info_by_name_hardlink +.testH5Oget_info_by_name_group +.testH5Oopen_by_addr +.testH5Oget_info_by_name_not_exists +.testH5Oget_info_by_name_dataset +.testH5Oget_info_group +.testH5Oget_info_by_name_datatype +.testH5Oget_info_hardlink +.testH5Oget_info_by_idx_name_not_exist_create +.testH5Oget_info_dataset +.testH5OcopyRefsDatasettosameFile +.testH5OcopyRefsDatasettodiffFile +.testH5OcopyRefsAttr +.testH5Oget_info_by_idx_n0_create +.testH5Oget_info_softlink_dangle +.testH5Oget_info_softlink +.testH5Oget_info_externallink +.testH5Ocopy +.testH5Olink +.testH5Ocomment_by_name +.testH5Oget_info_by_idx_n1_create +.testH5Ocomment +.testH5Oinc_dec_count +.testH5Ocomment_by_name_clear +.testH5Ovisit_create +.testH5Ocopy_dst_link_exists +.testH5Ocomment_clear +.testH5Ocopy_cur_not_exists +.TestH5PLplugins +.TestH5PLpaths +.testH5Zfilter_avail +.testH5Zunregister_predefined +.testH5Zget_filter_info + +Time: XXXX + +OK (608 tests) + diff --git a/java/test/Makefile.am b/java/test/Makefile.am index b7409cf..9ed8517 100644 --- a/java/test/Makefile.am +++ b/java/test/Makefile.am @@ -35,16 +35,13 @@ AM_JAVACFLAGS = $(H5_JAVACFLAGS) -deprecation noinst_JAVA = \ TestH5.java \ - TestH5E.java \ - TestH5Edefault.java \ - TestH5Eregister.java \ + TestH5Eparams.java \ TestH5Fparams.java \ TestH5Fbasic.java \ TestH5F.java \ TestH5Fswmr.java \ TestH5Gbasic.java \ TestH5G.java \ - TestH5Giterate.java \ TestH5Sbasic.java \ TestH5S.java \ TestH5Tparams.java \ @@ -69,7 +66,7 @@ noinst_JAVA = \ TestH5Ocopy.java \ TestH5PL.java \ TestH5Z.java \ - TestAll.java + TestUnit.java $(jarfile): classnoinst.stamp classes $(JAR) cvf $@ -C $(JAVAROOT)/ $(pkgpath) @@ -91,7 +88,7 @@ TESTS_JUNIT = AllJunitTests AllJunitTests : echo "#! /bin/sh" > $@ - echo "exec @JUNIT@ test.TestAll" >> $@ + echo "exec @JUNIT@ test.TestUnit" >> $@ chmod +x $@ clean: diff --git a/java/test/TestAll.java b/java/test/TestAll.java index de5d333..13cb597 100644 --- a/java/test/TestAll.java +++ b/java/test/TestAll.java @@ -18,9 +18,7 @@ import org.junit.runners.Suite; @RunWith(Suite.class) @Suite.SuiteClasses( { TestH5.class, - TestH5Eregister.class, - TestH5Edefault.class, - TestH5E.class, + TestH5Eparams.class, TestH5Eregister.class, TestH5Edefault.class, TestH5E.class, TestH5Fparams.class, TestH5Fbasic.class, TestH5F.class, TestH5Fswmr.class, TestH5Gbasic.class, TestH5G.class, TestH5Giterate.class, TestH5Sbasic.class, TestH5S.class, diff --git a/java/test/TestH5E.java b/java/test/TestH5E.java index 9a36365..fe12694 100644 --- a/java/test/TestH5E.java +++ b/java/test/TestH5E.java @@ -73,179 +73,6 @@ public class TestH5E { } @Test - public void testH5Eget_class_name() { - try { - String class_name = H5.H5Eget_class_name(hdf_java_classid); - assertNotNull("H5.H5Eget_class_name: " + class_name, class_name); - assertEquals("H5.H5Eget_class_name: ", "HDF-Java-Error", class_name); - } - catch (Throwable err) { - err.printStackTrace(); - fail("H5.H5Eget_class_name: " + err); - } - } - - @Test - public void testH5Eprint2() { - try { - assertFalse(current_stackid < 0); - H5.H5Eprint2(current_stackid, null); - } - catch (Throwable err) { - err.printStackTrace(); - fail("H5.H5Eprint2: " + err); - } - } - - @Ignore("Tested with create_msg_major[minor]") - public void testH5Eclose_msg() { - fail("Not yet implemented"); - } - - @Test(expected = NullPointerException.class) - public void testH5Ecreate_msg_name_null() throws Throwable { - H5.H5Ecreate_msg(hdf_java_classid, HDF5Constants.H5E_MAJOR, null); - } - - @Test - public void testH5Ecreate_msg_major() { - try { - long err_id = H5.H5Ecreate_msg(hdf_java_classid, - HDF5Constants.H5E_MAJOR, "Error in Test"); - assertFalse("H5.H5Ecreate_msg_major: " + err_id, err_id < 0); - H5.H5Eclose_msg(err_id); - } - catch (Throwable err) { - err.printStackTrace(); - fail("H5.H5Ecreate_msg_major: " + err); - } - } - - @Test - public void testH5Ecreate_msg_minor() { - try { - long err_id = H5.H5Ecreate_msg(hdf_java_classid, - HDF5Constants.H5E_MINOR, "Error in Test Function"); - assertFalse("H5.H5Ecreate_msg_minor: " + err_id, err_id < 0); - H5.H5Eclose_msg(err_id); - } - catch (Throwable err) { - err.printStackTrace(); - fail("H5.H5Ecreate_msg_minor: " + err); - } - } - - @Test - public void testH5Eget_msg() { - int[] error_msg_type = { HDF5Constants.H5E_MINOR }; - long err_id = -1; - String msg = null; - try { - err_id = H5.H5Ecreate_msg(hdf_java_classid, - HDF5Constants.H5E_MAJOR, "Error in Test"); - } - catch (Throwable err) { - err.printStackTrace(); - fail("H5.H5Eget_msg: " + err); - } - assertFalse("H5.H5Eget_msg: H5Ecreate_msg - " + err_id, err_id < 0); - try { - msg = H5.H5Eget_msg(err_id, error_msg_type); - } - catch (Throwable err) { - err.printStackTrace(); - fail("H5.H5Eget_msg: " + err); - } - assertNotNull("H5.H5Eget_msg: " + msg, msg); - assertEquals("H5.H5Eget_msg: ", "Error in Test", msg); - assertEquals("H5.H5Eget_msg: ", HDF5Constants.H5E_MAJOR, - error_msg_type[0]); - try { - H5.H5Eclose_msg(err_id); - } - catch (Throwable err) { - err.printStackTrace(); - fail("H5.H5Eget_msg: " + err); - } - } - - @Test - public void testH5Eget_msg_major() { - - try { - H5.H5Fopen("test", 0, 1); - } - catch (HDF5LibraryException hdferr) { - int[] error_msg_type = { HDF5Constants.H5E_MAJOR }; - String msg = null; - try { - msg = H5.H5Eget_msg(hdferr.getMajorErrorNumber(), - error_msg_type); - } - catch (Throwable err) { - err.printStackTrace(); - fail("H5.H5Eget_msg: " + err); - } - assertNotNull("H5.H5Eget_msg: " + msg, msg); - assertEquals("H5.H5Eget_msg: ", "Invalid arguments to routine", - msg); - assertEquals("H5.H5Eget_msg: ", HDF5Constants.H5E_MAJOR, - error_msg_type[0]); - } - catch (Throwable err) { - err.printStackTrace(); - fail("H5.H5Eget_msg: " + err); - } - } - - @Test - public void testH5Eget_msg_minor() { - try { - H5.H5Fopen("test", 0, 1); - } - catch (HDF5LibraryException hdferr) { - int[] error_msg_type = { HDF5Constants.H5E_MINOR }; - String msg = null; - try { - msg = H5.H5Eget_msg(hdferr.getMinorErrorNumber(), - error_msg_type); - } - catch (Throwable err) { - err.printStackTrace(); - fail("H5.H5Eget_msg: " + err); - } - assertNotNull("H5.H5Eget_msg: " + msg, msg); - assertEquals("H5.H5Eget_msg: ", "Inappropriate type", msg); - assertEquals("H5.H5Eget_msg: ", HDF5Constants.H5E_MINOR, - error_msg_type[0]); - } - catch (Throwable err) { - err.printStackTrace(); - fail("H5.H5Eget_msg: " + err); - } - } - - @Test - public void testH5Ecreate_stack() { - long stk_id = -1; - try { - stk_id = H5.H5Ecreate_stack(); - } - catch (Throwable err) { - err.printStackTrace(); - fail("H5.H5Ecreate_stack: " + err); - } - assertFalse("H5.H5Ecreate_stack: " + stk_id, stk_id < 0); - try { - H5.H5Eclose_stack(stk_id); - } - catch (Throwable err) { - err.printStackTrace(); - fail("H5.H5Ecreate_stack: " + err); - } - } - - @Test public void testH5Epop() { try { H5.H5Eset_current_stack(current_stackid); @@ -381,101 +208,6 @@ public class TestH5E { } /* end test_create() */ @Test - public void testH5EprintInt() { - assertFalse(current_stackid < 0); - try { - H5.H5Eprint2(current_stackid, null); - } - catch (Throwable err) { - err.printStackTrace(); - fail("H5.H5EprintInt: " + err); - } - } - - @Test - public void testH5EclearInt() { - try { - H5.H5Eclear(current_stackid); - } - catch (Throwable err) { - err.printStackTrace(); - fail("H5.H5EclearInt: " + err); - } - } - - @Test - public void testH5Eclear2() { - try { - H5.H5Eclear2(current_stackid); - } - catch (Throwable err) { - err.printStackTrace(); - fail("H5.H5Eclear2: " + err); - } - } - - @Test - public void testH5Eauto_is_v2() { - boolean is_v2 = false; - try { - is_v2 = H5.H5Eauto_is_v2(current_stackid); - } - catch (Throwable err) { - err.printStackTrace(); - fail("H5.H5Eauto_is_v2: " + err); - } - assertTrue("H5.H5Eauto_is_v2: ", is_v2); - } - - @Test - public void testH5Eget_num() { - long num_msg = -1; - try { - num_msg = H5.H5Eget_num(current_stackid); - } - catch (Throwable err) { - err.printStackTrace(); - fail("H5.H5Eget_num: " + err); - } - assertTrue("H5.H5Eget_num", num_msg == 0); - } - - @Test - public void testH5Eget_num_with_msg() { - try { - H5.H5Eset_current_stack(current_stackid); - } - catch (Throwable err) { - err.printStackTrace(); - fail("H5.H5Epop: " + err); - } - try { - H5.H5Fopen("test", 0, 1); - } - catch (Throwable err) { - } - - // save current stack contents - try { - current_stackid = H5.H5Eget_current_stack(); - } - catch (HDF5LibraryException err) { - err.printStackTrace(); - fail("H5.H5Epop: " + err); - } - - long num_msg = -1; - try { - num_msg = H5.H5Eget_num(current_stackid); - } - catch (Throwable err) { - err.printStackTrace(); - fail("H5.H5Epop: " + err); - } - assertTrue("H5.H5Eget_num_with_msg #:" + num_msg, num_msg > 0); - } - - @Test public void testH5Ewalk() { class wdata { public String err_desc = null; diff --git a/java/test/TestH5Eparams.java b/java/test/TestH5Eparams.java new file mode 100644 index 0000000..63e2c62 --- /dev/null +++ b/java/test/TestH5Eparams.java @@ -0,0 +1,343 @@ +/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + * Copyright by The HDF Group. * + * Copyright by the Board of Trustees of the University of Illinois. * + * All rights reserved. * + * * + * This file is part of HDF5. The full HDF5 copyright notice, including * + * terms governing use, modification, and redistribution, is contained in * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ + +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; + +import java.util.ArrayList; + +import hdf.hdf5lib.H5; +import hdf.hdf5lib.HDF5Constants; +import hdf.hdf5lib.exceptions.HDF5LibraryException; +import hdf.hdf5lib.callbacks.H5E_walk_cb; +import hdf.hdf5lib.callbacks.H5E_walk_t; +import hdf.hdf5lib.structs.H5E_error2_t; + +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; + +public class TestH5Eparams { + @Rule public TestName testname = new TestName(); + long hdf_java_classid = -1; + long current_stackid = -1; + + @Before + public void H5Eget_stack_class() { + assertTrue("H5 open ids is 0",H5.getOpenIDCount()==0); + System.out.print(testname.getMethodName()); + + hdf_java_classid = -1; + try { + hdf_java_classid = H5.H5Eregister_class("HDF-Java-Error", + "hdf-java", "2.5"); + current_stackid = H5.H5Eget_current_stack(); + } + catch (Throwable err) { + err.printStackTrace(); + fail("H5.H5Eget_stack_class: " + err); + } + } + + @After + public void H5Erestore_stack_class() { + try { + H5.H5Eunregister_class(hdf_java_classid); + hdf_java_classid = -1; + H5.H5Eclose_stack(current_stackid); + current_stackid = -1; + } + catch (Throwable err) { + err.printStackTrace(); + fail("H5.H5Erestore_stack_class: " + err); + } + System.out.println(); + } + + @Test + public void testH5Eget_class_name() { + try { + String class_name = H5.H5Eget_class_name(hdf_java_classid); + assertNotNull("H5.H5Eget_class_name: " + class_name, class_name); + assertEquals("H5.H5Eget_class_name: ", "HDF-Java-Error", class_name); + } + catch (Throwable err) { + err.printStackTrace(); + fail("H5.H5Eget_class_name: " + err); + } + } + + @Test + public void testH5Eprint2() { + try { + assertFalse(current_stackid < 0); + H5.H5Eprint2(current_stackid, null); + } + catch (Throwable err) { + err.printStackTrace(); + fail("H5.H5Eprint2: " + err); + } + } + + @Ignore("Tested with create_msg_major[minor]") + public void testH5Eclose_msg() { + fail("Not yet implemented"); + } + + @Test(expected = NullPointerException.class) + public void testH5Ecreate_msg_name_null() throws Throwable { + H5.H5Ecreate_msg(hdf_java_classid, HDF5Constants.H5E_MAJOR, null); + } + + @Test + public void testH5Ecreate_msg_major() { + try { + long err_id = H5.H5Ecreate_msg(hdf_java_classid, + HDF5Constants.H5E_MAJOR, "Error in Test"); + assertFalse("H5.H5Ecreate_msg_major: " + err_id, err_id < 0); + H5.H5Eclose_msg(err_id); + } + catch (Throwable err) { + err.printStackTrace(); + fail("H5.H5Ecreate_msg_major: " + err); + } + } + + @Test + public void testH5Ecreate_msg_minor() { + try { + long err_id = H5.H5Ecreate_msg(hdf_java_classid, + HDF5Constants.H5E_MINOR, "Error in Test Function"); + assertFalse("H5.H5Ecreate_msg_minor: " + err_id, err_id < 0); + H5.H5Eclose_msg(err_id); + } + catch (Throwable err) { + err.printStackTrace(); + fail("H5.H5Ecreate_msg_minor: " + err); + } + } + + @Test + public void testH5Eget_msg() { + int[] error_msg_type = { HDF5Constants.H5E_MINOR }; + long err_id = -1; + String msg = null; + try { + err_id = H5.H5Ecreate_msg(hdf_java_classid, + HDF5Constants.H5E_MAJOR, "Error in Test"); + } + catch (Throwable err) { + err.printStackTrace(); + fail("H5.H5Eget_msg: " + err); + } + assertFalse("H5.H5Eget_msg: H5Ecreate_msg - " + err_id, err_id < 0); + try { + msg = H5.H5Eget_msg(err_id, error_msg_type); + } + catch (Throwable err) { + err.printStackTrace(); + fail("H5.H5Eget_msg: " + err); + } + assertNotNull("H5.H5Eget_msg: " + msg, msg); + assertEquals("H5.H5Eget_msg: ", "Error in Test", msg); + assertEquals("H5.H5Eget_msg: ", HDF5Constants.H5E_MAJOR, + error_msg_type[0]); + try { + H5.H5Eclose_msg(err_id); + } + catch (Throwable err) { + err.printStackTrace(); + fail("H5.H5Eget_msg: " + err); + } + } + + @Test + public void testH5Eget_msg_major() { + + try { + H5.H5Fopen("test", 0, 1); + } + catch (HDF5LibraryException hdferr) { + int[] error_msg_type = { HDF5Constants.H5E_MAJOR }; + String msg = null; + try { + msg = H5.H5Eget_msg(hdferr.getMajorErrorNumber(), + error_msg_type); + } + catch (Throwable err) { + err.printStackTrace(); + fail("H5.H5Eget_msg: " + err); + } + assertNotNull("H5.H5Eget_msg: " + msg, msg); + assertEquals("H5.H5Eget_msg: ", "Invalid arguments to routine", + msg); + assertEquals("H5.H5Eget_msg: ", HDF5Constants.H5E_MAJOR, + error_msg_type[0]); + } + catch (Throwable err) { + err.printStackTrace(); + fail("H5.H5Eget_msg: " + err); + } + } + + @Test + public void testH5Eget_msg_minor() { + try { + H5.H5Fopen("test", 0, 1); + } + catch (HDF5LibraryException hdferr) { + int[] error_msg_type = { HDF5Constants.H5E_MINOR }; + String msg = null; + try { + msg = H5.H5Eget_msg(hdferr.getMinorErrorNumber(), + error_msg_type); + } + catch (Throwable err) { + err.printStackTrace(); + fail("H5.H5Eget_msg: " + err); + } + assertNotNull("H5.H5Eget_msg: " + msg, msg); + assertEquals("H5.H5Eget_msg: ", "Inappropriate type", msg); + assertEquals("H5.H5Eget_msg: ", HDF5Constants.H5E_MINOR, + error_msg_type[0]); + } + catch (Throwable err) { + err.printStackTrace(); + fail("H5.H5Eget_msg: " + err); + } + } + + @Test + public void testH5Ecreate_stack() { + long stk_id = -1; + try { + stk_id = H5.H5Ecreate_stack(); + } + catch (Throwable err) { + err.printStackTrace(); + fail("H5.H5Ecreate_stack: " + err); + } + assertFalse("H5.H5Ecreate_stack: " + stk_id, stk_id < 0); + try { + H5.H5Eclose_stack(stk_id); + } + catch (Throwable err) { + err.printStackTrace(); + fail("H5.H5Ecreate_stack: " + err); + } + } + + @Test + public void testH5EprintInt() { + assertFalse(current_stackid < 0); + try { + H5.H5Eprint2(current_stackid, null); + } + catch (Throwable err) { + err.printStackTrace(); + fail("H5.H5EprintInt: " + err); + } + } + + @Test + public void testH5EclearInt() { + try { + H5.H5Eclear(current_stackid); + } + catch (Throwable err) { + err.printStackTrace(); + fail("H5.H5EclearInt: " + err); + } + } + + @Test + public void testH5Eclear2() { + try { + H5.H5Eclear2(current_stackid); + } + catch (Throwable err) { + err.printStackTrace(); + fail("H5.H5Eclear2: " + err); + } + } + + @Test + public void testH5Eauto_is_v2() { + boolean is_v2 = false; + try { + is_v2 = H5.H5Eauto_is_v2(current_stackid); + } + catch (Throwable err) { + err.printStackTrace(); + fail("H5.H5Eauto_is_v2: " + err); + } + assertTrue("H5.H5Eauto_is_v2: ", is_v2); + } + + @Test + public void testH5Eget_num() { + long num_msg = -1; + try { + num_msg = H5.H5Eget_num(current_stackid); + } + catch (Throwable err) { + err.printStackTrace(); + fail("H5.H5Eget_num: " + err); + } + assertTrue("H5.H5Eget_num", num_msg == 0); + } + + @Test + public void testH5Eget_num_with_msg() { + try { + H5.H5Eset_current_stack(current_stackid); + } + catch (Throwable err) { + err.printStackTrace(); + fail("H5.H5Epop: " + err); + } + try { + H5.H5Fopen("test", 0, 1); + } + catch (Throwable err) { + } + + // save current stack contents + try { + current_stackid = H5.H5Eget_current_stack(); + } + catch (HDF5LibraryException err) { + err.printStackTrace(); + fail("H5.H5Epop: " + err); + } + + long num_msg = -1; + try { + num_msg = H5.H5Eget_num(current_stackid); + } + catch (Throwable err) { + err.printStackTrace(); + fail("H5.H5Epop: " + err); + } + assertTrue("H5.H5Eget_num_with_msg #:" + num_msg, num_msg > 0); + } + +} diff --git a/java/test/TestUnit.java b/java/test/TestUnit.java new file mode 100644 index 0000000..b55e415 --- /dev/null +++ b/java/test/TestUnit.java @@ -0,0 +1,36 @@ +/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + * Copyright by The HDF Group. * + * Copyright by the Board of Trustees of the University of Illinois. * + * All rights reserved. * + * * + * This file is part of HDF5. The full HDF5 copyright notice, including * + * terms governing use, modification, and redistribution, is contained in * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ + +package test; + +import org.junit.runner.RunWith; +import org.junit.runners.Suite; + +@RunWith(Suite.class) +@Suite.SuiteClasses( { TestH5.class, + TestH5Eparams.class, + TestH5Fparams.class, TestH5Fbasic.class, TestH5F.class, TestH5Fswmr.class, + TestH5Gbasic.class, TestH5G.class, + TestH5Sbasic.class, TestH5S.class, + TestH5Tparams.class, TestH5Tbasic.class, TestH5T.class, + TestH5Dparams.class, TestH5D.class, TestH5Dplist.class, + TestH5Lparams.class, TestH5Lbasic.class, TestH5Lcreate.class, + TestH5R.class, + TestH5P.class, TestH5PData.class, TestH5Pfapl.class, TestH5Pvirtual.class, TestH5Plist.class, + TestH5A.class, + TestH5Oparams.class, TestH5Obasic.class, TestH5Ocopy.class, TestH5Ocreate.class, + TestH5PL.class, TestH5Z.class +}) + +public class TestUnit { +} diff --git a/java/test/junit.sh.in b/java/test/junit.sh.in index 77379d0..ca3790d 100644 --- a/java/test/junit.sh.in +++ b/java/test/junit.sh.in @@ -64,11 +64,11 @@ $HDFLIB_HOME/ext/slf4j-simple-1.7.5.jar $top_builddir/java/src/$JARFILE " LIST_DATA_FILES=" -$HDFTEST_HOME/JUnit-interface.txt +$HDFTEST_HOME/JUnit-unit.txt $HDFTEST_HOME/JUnit-interface.ert " -expect="JUnit-interface.txt" +expect="JUnit-unit.txt" actual="JUnit-interface.out" actual_err="JUnit-interface.err" actual_ext="JUnit-interface.ext" @@ -257,11 +257,11 @@ esac export LD_LIBRARY_PATH -echo "$JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH -ea org.junit.runner.JUnitCore test.TestAll" +echo "$JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH -ea org.junit.runner.JUnitCore test.TestUnit" # Run test. TESTING JUnit ( - $RUNSERIAL $JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH -ea org.junit.runner.JUnitCore test.TestAll + $RUNSERIAL $JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH -ea org.junit.runner.JUnitCore test.TestUnit ) >$actual_ext 2>$actual_err # Extract file name, line number, version and thread IDs because they may be different diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index c506ebb..52d86d0 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -892,7 +892,7 @@ if (NOT WIN32) target_link_libraries (${HDF5_LIB_TARGET} PUBLIC ${CMAKE_DL_LIBS}) endif () set_global_variable (HDF5_LIBRARIES_TO_EXPORT ${HDF5_LIB_TARGET}) -H5_SET_LIB_OPTIONS (${HDF5_LIB_TARGET} ${HDF5_LIB_NAME} STATIC) +H5_SET_LIB_OPTIONS (${HDF5_LIB_TARGET} ${HDF5_LIB_NAME} STATIC 0) set_target_properties (${HDF5_LIB_TARGET} PROPERTIES FOLDER libraries INTERFACE_INCLUDE_DIRECTORIES "$/include>" @@ -931,7 +931,7 @@ if (BUILD_SHARED_LIBS) target_link_libraries (${HDF5_LIBSH_TARGET} PUBLIC ${CMAKE_DL_LIBS}) endif () set_global_variable (HDF5_LIBRARIES_TO_EXPORT "${HDF5_LIBRARIES_TO_EXPORT};${HDF5_LIBSH_TARGET}") - H5_SET_LIB_OPTIONS (${HDF5_LIBSH_TARGET} ${HDF5_LIB_NAME} SHARED ${HDF5_PACKAGE_SOVERSION}) + H5_SET_LIB_OPTIONS (${HDF5_LIBSH_TARGET} ${HDF5_LIB_NAME} SHARED "LIB") set_target_properties (${HDF5_LIBSH_TARGET} PROPERTIES FOLDER libraries COMPILE_DEFINITIONS "H5_BUILT_AS_DYNAMIC_LIB" diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index b3b6f5c..ec560f2 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -39,7 +39,7 @@ if (MINGW) endif () target_link_libraries (${HDF5_TEST_LIB_TARGET} PUBLIC ${LINK_LIBS}) target_link_libraries (${HDF5_TEST_LIB_TARGET} PUBLIC ${HDF5_LIB_TARGET}) -H5_SET_LIB_OPTIONS (${HDF5_TEST_LIB_TARGET} ${HDF5_TEST_LIB_NAME} STATIC) +H5_SET_LIB_OPTIONS (${HDF5_TEST_LIB_TARGET} ${HDF5_TEST_LIB_NAME} STATIC 0) set_target_properties (${HDF5_TEST_LIB_TARGET} PROPERTIES FOLDER libraries/test INTERFACE_INCLUDE_DIRECTORIES "$/include>" @@ -56,7 +56,7 @@ if (BUILD_SHARED_LIBS) endif () target_link_libraries (${HDF5_TEST_LIBSH_TARGET} PUBLIC ${LINK_LIBS}) target_link_libraries (${HDF5_TEST_LIBSH_TARGET} PUBLIC ${HDF5_LIBSH_TARGET}) - H5_SET_LIB_OPTIONS (${HDF5_TEST_LIBSH_TARGET} ${HDF5_TEST_LIB_NAME} SHARED ${HDF5_PACKAGE_SOVERSION}) + H5_SET_LIB_OPTIONS (${HDF5_TEST_LIBSH_TARGET} ${HDF5_TEST_LIB_NAME} SHARED "LIB") set_target_properties (${HDF5_TEST_LIBSH_TARGET} PROPERTIES FOLDER libraries/test COMPILE_DEFINITIONS "H5_BUILT_AS_DYNAMIC_LIB" @@ -100,7 +100,7 @@ endif () add_library (${HDF5_TEST_PLUGIN_TARGET} SHARED ${HDF5_TEST_SOURCE_DIR}/${plugin_name}.c) TARGET_C_PROPERTIES (${HDF5_TEST_PLUGIN_TARGET} SHARED " " " ") target_link_libraries (${HDF5_TEST_PLUGIN_TARGET} PUBLIC ${HDF5_TEST_LIB_TARGET}) - H5_SET_LIB_OPTIONS (${HDF5_TEST_PLUGIN_TARGET} ${HDF5_TEST_PLUGIN_NAME} SHARED ${HDF5_PACKAGE_SOVERSION}) + H5_SET_LIB_OPTIONS (${HDF5_TEST_PLUGIN_TARGET} ${HDF5_TEST_PLUGIN_NAME} SHARED "LIB") set_target_properties (${HDF5_TEST_PLUGIN_TARGET} PROPERTIES FOLDER libraries/TEST_PLUGIN) #----------------------------------------------------------------------------- @@ -126,7 +126,7 @@ endif () add_library (${HDF5_TEST_PLUGIN_TARGET} SHARED ${HDF5_TEST_SOURCE_DIR}/${plugin_name}.c) TARGET_C_PROPERTIES (${HDF5_TEST_PLUGIN_TARGET} SHARED " " " ") target_link_libraries (${HDF5_TEST_PLUGIN_TARGET} PUBLIC ${HDF5_TEST_LIB_TARGET}) - H5_SET_LIB_OPTIONS (${HDF5_TEST_PLUGIN_TARGET} ${HDF5_TEST_PLUGIN_NAME} SHARED ${HDF5_PACKAGE_SOVERSION}) + H5_SET_LIB_OPTIONS (${HDF5_TEST_PLUGIN_TARGET} ${HDF5_TEST_PLUGIN_NAME} SHARED "LIB") set_target_properties (${HDF5_TEST_PLUGIN_TARGET} PROPERTIES FOLDER libraries/TEST_PLUGIN) #----------------------------------------------------------------------------- diff --git a/test/CMakeTests.cmake b/test/CMakeTests.cmake index 221b857..04cc41f 100644 --- a/test/CMakeTests.cmake +++ b/test/CMakeTests.cmake @@ -657,7 +657,7 @@ if (NOT CYGWIN) endif () set_tests_properties (H5TEST-cache PROPERTIES DEPENDS H5TEST-clear-cache-objects - ENVIRONMENT "srcdir=${HDF5_TEST_BINARY_DIR}/H5TEST;HDF5TestExpress=3" + ENVIRONMENT "srcdir=${HDF5_TEST_BINARY_DIR}/H5TEST;HDF5TestExpress=${HDF_TEST_EXPRESS}" WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/H5TEST ) set_tests_properties (H5TEST-cache PROPERTIES TIMEOUT 1800) @@ -675,7 +675,7 @@ add_test ( add_test (NAME H5TEST-cache_image COMMAND $) set_tests_properties (H5TEST-cache_image PROPERTIES DEPENDS H5TEST-clear-cache_image-objects - ENVIRONMENT "srcdir=${HDF5_TEST_BINARY_DIR}/H5TEST;HDF5TestExpress=3" + ENVIRONMENT "srcdir=${HDF5_TEST_BINARY_DIR}/H5TEST;HDF5TestExpress=${HDF_TEST_EXPRESS}" WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/H5TEST ) diff --git a/tools/lib/CMakeLists.txt b/tools/lib/CMakeLists.txt index db06b9a..e5a6439 100644 --- a/tools/lib/CMakeLists.txt +++ b/tools/lib/CMakeLists.txt @@ -44,7 +44,7 @@ if (HDF5_ENABLE_PARALLEL AND MPI_C_FOUND) target_link_libraries (${HDF5_TOOLS_LIB_TARGET} PRIVATE ${MPI_C_LIBRARIES}) endif () set_global_variable (HDF5_LIBRARIES_TO_EXPORT "${HDF5_LIBRARIES_TO_EXPORT};${HDF5_TOOLS_LIB_TARGET}") -H5_SET_LIB_OPTIONS (${HDF5_TOOLS_LIB_TARGET} ${HDF5_TOOLS_LIB_NAME} STATIC) +H5_SET_LIB_OPTIONS (${HDF5_TOOLS_LIB_TARGET} ${HDF5_TOOLS_LIB_NAME} STATIC 0) set_target_properties (${HDF5_TOOLS_LIB_TARGET} PROPERTIES FOLDER libraries/tools INTERFACE_INCLUDE_DIRECTORIES "$/include>" @@ -60,7 +60,7 @@ if (BUILD_SHARED_LIBS) target_link_libraries (${HDF5_TOOLS_LIBSH_TARGET} PRIVATE ${MPI_C_LIBRARIES}) endif () set_global_variable (HDF5_LIBRARIES_TO_EXPORT "${HDF5_LIBRARIES_TO_EXPORT};${HDF5_TOOLS_LIBSH_TARGET}") - H5_SET_LIB_OPTIONS (${HDF5_TOOLS_LIBSH_TARGET} ${HDF5_TOOLS_LIB_NAME} SHARED ${HDF5_TOOLS_PACKAGE_SOVERSION}) + H5_SET_LIB_OPTIONS (${HDF5_TOOLS_LIBSH_TARGET} ${HDF5_TOOLS_LIB_NAME} SHARED "TOOLS") set_target_properties (${HDF5_TOOLS_LIBSH_TARGET} PROPERTIES FOLDER libraries/tools COMPILE_DEFINITIONS "H5_BUILT_AS_DYNAMIC_LIB" diff --git a/tools/test/h5copy/CMakeLists.txt b/tools/test/h5copy/CMakeLists.txt index 1f817fb..9a171ba 100644 --- a/tools/test/h5copy/CMakeLists.txt +++ b/tools/test/h5copy/CMakeLists.txt @@ -32,7 +32,7 @@ if (BUILD_SHARED_LIBS) add_library (${HDF5_TOOL_PLUGIN_LIB_TARGET} SHARED dynlib_copy.c) TARGET_C_PROPERTIES (${HDF5_TOOL_PLUGIN_LIB_TARGET} SHARED " " " ") target_link_libraries (${HDF5_TOOL_PLUGIN_LIB_TARGET} ${HDF5_TEST_LIB_TARGET}) - H5_SET_LIB_OPTIONS (${HDF5_TOOL_PLUGIN_LIB_TARGET} ${HDF5_TOOL_PLUGIN_LIB_NAME} SHARED ${HDF5_PACKAGE_SOVERSION}) + H5_SET_LIB_OPTIONS (${HDF5_TOOL_PLUGIN_LIB_TARGET} ${HDF5_TOOL_PLUGIN_LIB_NAME} SHARED "LIB") # make plugins dir file (MAKE_DIRECTORY "${CMAKE_BINARY_DIR}/plugins") diff --git a/tools/test/h5diff/CMakeLists.txt b/tools/test/h5diff/CMakeLists.txt index aae6327..dd7da66 100644 --- a/tools/test/h5diff/CMakeLists.txt +++ b/tools/test/h5diff/CMakeLists.txt @@ -31,7 +31,7 @@ if (BUILD_SHARED_LIBS) add_library (${HDF5_TOOL_PLUGIN_LIB_TARGET} SHARED dynlib_diff.c) TARGET_C_PROPERTIES (${HDF5_TOOL_PLUGIN_LIB_TARGET} SHARED " " " ") target_link_libraries (${HDF5_TOOL_PLUGIN_LIB_TARGET} ${HDF5_TEST_LIB_TARGET}) - H5_SET_LIB_OPTIONS (${HDF5_TOOL_PLUGIN_LIB_TARGET} ${HDF5_TOOL_PLUGIN_LIB_NAME} SHARED ${HDF5_PACKAGE_SOVERSION}) + H5_SET_LIB_OPTIONS (${HDF5_TOOL_PLUGIN_LIB_TARGET} ${HDF5_TOOL_PLUGIN_LIB_NAME} SHARED "LIB") # make plugins dir file (MAKE_DIRECTORY "${CMAKE_BINARY_DIR}/plugins") diff --git a/tools/test/h5dump/CMakeLists.txt b/tools/test/h5dump/CMakeLists.txt index 6a12f5e..4ea1738 100644 --- a/tools/test/h5dump/CMakeLists.txt +++ b/tools/test/h5dump/CMakeLists.txt @@ -18,7 +18,7 @@ INCLUDE_DIRECTORIES (${HDF5_TOOLS_DIR}/lib) add_library (${HDF5_TOOL_PLUGIN_LIB_TARGET} SHARED dynlib_dump.c) TARGET_C_PROPERTIES (${HDF5_TOOL_PLUGIN_LIB_TARGET} SHARED " " " ") target_link_libraries (${HDF5_TOOL_PLUGIN_LIB_TARGET} ${HDF5_TEST_LIB_TARGET}) - H5_SET_LIB_OPTIONS (${HDF5_TOOL_PLUGIN_LIB_TARGET} ${HDF5_TOOL_PLUGIN_LIB_NAME} SHARED ${HDF5_PACKAGE_SOVERSION}) + H5_SET_LIB_OPTIONS (${HDF5_TOOL_PLUGIN_LIB_TARGET} ${HDF5_TOOL_PLUGIN_LIB_NAME} SHARED "LIB") # make plugins dir file (MAKE_DIRECTORY "${CMAKE_BINARY_DIR}/plugins") diff --git a/tools/test/h5ls/CMakeLists.txt b/tools/test/h5ls/CMakeLists.txt index 8549046..5e7d2e2 100644 --- a/tools/test/h5ls/CMakeLists.txt +++ b/tools/test/h5ls/CMakeLists.txt @@ -18,7 +18,7 @@ INCLUDE_DIRECTORIES (${HDF5_TOOLS_DIR}/lib) add_library (${HDF5_TOOL_PLUGIN_LIB_TARGET} SHARED dynlib_ls.c) TARGET_C_PROPERTIES (${HDF5_TOOL_PLUGIN_LIB_TARGET} SHARED " " " ") target_link_libraries (${HDF5_TOOL_PLUGIN_LIB_TARGET} ${HDF5_TEST_LIB_TARGET}) - H5_SET_LIB_OPTIONS (${HDF5_TOOL_PLUGIN_LIB_TARGET} ${HDF5_TOOL_PLUGIN_LIB_NAME} SHARED ${HDF5_PACKAGE_SOVERSION}) + H5_SET_LIB_OPTIONS (${HDF5_TOOL_PLUGIN_LIB_TARGET} ${HDF5_TOOL_PLUGIN_LIB_NAME} SHARED "LIB") # make plugins dir file (MAKE_DIRECTORY "${CMAKE_BINARY_DIR}/plugins") diff --git a/tools/test/h5repack/CMakeLists.txt b/tools/test/h5repack/CMakeLists.txt index 50eb0af..dbe80f7 100644 --- a/tools/test/h5repack/CMakeLists.txt +++ b/tools/test/h5repack/CMakeLists.txt @@ -45,12 +45,12 @@ set_target_properties (h5repacktest PROPERTIES FOLDER tools) add_library (${HDF5_TOOL_PLUGIN_LIB_TARGET} SHARED dynlib_rpk.c) TARGET_C_PROPERTIES (${HDF5_TOOL_PLUGIN_LIB_TARGET} SHARED " " " ") target_link_libraries (${HDF5_TOOL_PLUGIN_LIB_TARGET} ${HDF5_TEST_LIB_TARGET}) - H5_SET_LIB_OPTIONS (${HDF5_TOOL_PLUGIN_LIB_TARGET} ${HDF5_TOOL_PLUGIN_LIB_NAME} SHARED ${HDF5_PACKAGE_SOVERSION}) + H5_SET_LIB_OPTIONS (${HDF5_TOOL_PLUGIN_LIB_TARGET} ${HDF5_TOOL_PLUGIN_LIB_NAME} SHARED "LIB") add_library (${HDF5_TOOL_PLUGIN_LIB_VTARGET} SHARED dynlib_vrpk.c) TARGET_C_PROPERTIES (${HDF5_TOOL_PLUGIN_LIB_VTARGET} SHARED " " " ") target_link_libraries (${HDF5_TOOL_PLUGIN_LIB_VTARGET} ${HDF5_TEST_LIB_TARGET}) - H5_SET_LIB_OPTIONS (${HDF5_TOOL_PLUGIN_LIB_VTARGET} ${HDF5_TOOL_PLUGIN_LIB_VNAME} SHARED ${HDF5_PACKAGE_SOVERSION}) + H5_SET_LIB_OPTIONS (${HDF5_TOOL_PLUGIN_LIB_VTARGET} ${HDF5_TOOL_PLUGIN_LIB_VNAME} SHARED "LIB") # make plugins dir file (MAKE_DIRECTORY "${CMAKE_BINARY_DIR}/plugins") -- cgit v0.12 From c8974b8a9e49aba96c93f9efa8977a5c57a35a07 Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Tue, 10 Apr 2018 13:06:56 -0500 Subject: Whitespace and test reclassify merge from develop --- java/test/CMakeLists.txt | 2 +- java/test/JUnit-interface.txt | 4 +-- java/test/JUnit-unit.txt | 9 ++++-- java/test/Makefile.am | 1 + java/test/TestH5E.java | 54 ++++++++++++++++++++++++++++++-- java/test/TestH5Edefault.java | 68 ++++++++++++++-------------------------- java/test/TestH5Eparams.java | 71 +++--------------------------------------- java/test/TestH5Eregister.java | 3 +- java/test/TestUnit.java | 2 +- 9 files changed, 92 insertions(+), 122 deletions(-) diff --git a/java/test/CMakeLists.txt b/java/test/CMakeLists.txt index 10a38b0..c48cf01 100644 --- a/java/test/CMakeLists.txt +++ b/java/test/CMakeLists.txt @@ -11,6 +11,7 @@ INCLUDE_DIRECTORIES ( set (HDF5_JAVA_TEST_SOURCES TestH5.java TestH5Eparams.java + TestH5Eregister.java TestH5Fparams.java TestH5Fbasic.java TestH5F.java @@ -58,7 +59,6 @@ else () ${HDF5_JAVA_TEST_SOURCES} TestH5E.java TestH5Edefault.java - TestH5Eregister.java TestH5Giterate.java TestAll.java ) diff --git a/java/test/JUnit-interface.txt b/java/test/JUnit-interface.txt index 9518817..5758863 100644 --- a/java/test/JUnit-interface.txt +++ b/java/test/JUnit-interface.txt @@ -9,8 +9,6 @@ JUnit version 4.11 .testH5get_libversion .testH5set_free_list_limits .testH5EprintInt -.testH5Eget_msg_major -.testH5Eget_msg_minor .testH5Eget_msg .testH5Eget_num .testH5Eget_class_name @@ -56,6 +54,8 @@ JUnit version 4.11 .testH5Ecreate_msg_invalid_errid .testH5Eclear2_invalid_stkid .testH5Eprint2_invalid_classid +.testH5Eget_msg_major +.testH5Eget_msg_minor .testH5Epush .testH5Ewalk .testH5Epop diff --git a/java/test/JUnit-unit.txt b/java/test/JUnit-unit.txt index fa33165..3ace4fa 100644 --- a/java/test/JUnit-unit.txt +++ b/java/test/JUnit-unit.txt @@ -9,8 +9,6 @@ JUnit version 4.11 .testH5get_libversion .testH5set_free_list_limits .testH5EprintInt -.testH5Eget_msg_major -.testH5Eget_msg_minor .testH5Eget_msg .testH5Eget_num .testH5Eget_class_name @@ -23,6 +21,11 @@ JUnit version 4.11 .testH5Ecreate_msg_name_null .testH5Eauto_is_v2 .testH5EclearInt +.testH5Eregister_class_lib_name_null +.testH5Eregister_class_version_null +.testH5Eunregister_class_invalid_classid +.testH5Eregister_class +.testH5Eregister_class_cls_name_null .testH5Fcreate_null .testH5Fflush_local .testH5Fget_info @@ -610,5 +613,5 @@ JUnit version 4.11 Time: XXXX -OK (608 tests) +OK (606 tests) diff --git a/java/test/Makefile.am b/java/test/Makefile.am index 9ed8517..f9db7ed 100644 --- a/java/test/Makefile.am +++ b/java/test/Makefile.am @@ -36,6 +36,7 @@ AM_JAVACFLAGS = $(H5_JAVACFLAGS) -deprecation noinst_JAVA = \ TestH5.java \ TestH5Eparams.java \ + TestH5Eregister.java \ TestH5Fparams.java \ TestH5Fbasic.java \ TestH5F.java \ diff --git a/java/test/TestH5E.java b/java/test/TestH5E.java index fe12694..1c0803a 100644 --- a/java/test/TestH5E.java +++ b/java/test/TestH5E.java @@ -47,8 +47,7 @@ public class TestH5E { hdf_java_classid = -1; try { - hdf_java_classid = H5.H5Eregister_class("HDF-Java-Error", - "hdf-java", "2.5"); + hdf_java_classid = H5.H5Eregister_class("HDF-Java-Error", "hdf-java", "2.5"); current_stackid = H5.H5Eget_current_stack(); } catch (Throwable err) { @@ -73,6 +72,57 @@ public class TestH5E { } @Test + public void testH5Eget_msg_major() { + + try { + H5.H5Fopen("test", 0, 1); + } + catch (HDF5LibraryException hdferr) { + int[] error_msg_type = { HDF5Constants.H5E_MAJOR }; + String msg = null; + try { + msg = H5.H5Eget_msg(hdferr.getMajorErrorNumber(), error_msg_type); + } + catch (Throwable err) { + err.printStackTrace(); + fail("H5.H5Eget_msg: " + err); + } + assertNotNull("H5.H5Eget_msg: " + msg, msg); + assertEquals("H5.H5Eget_msg: ", "Invalid arguments to routine", msg); + assertEquals("H5.H5Eget_msg: ", HDF5Constants.H5E_MAJOR, error_msg_type[0]); + } + catch (Throwable err) { + err.printStackTrace(); + fail("H5.H5Eget_msg: " + err); + } + } + + @Test + public void testH5Eget_msg_minor() { + try { + H5.H5Fopen("test", 0, 1); + } + catch (HDF5LibraryException hdferr) { + int[] error_msg_type = { HDF5Constants.H5E_MINOR }; + String msg = null; + try { + msg = H5.H5Eget_msg(hdferr.getMinorErrorNumber(), error_msg_type); + } + catch (Throwable err) { + err.printStackTrace(); + fail("H5.H5Eget_msg: " + err); + } + assertNotNull("H5.H5Eget_msg: " + msg, msg); + assertEquals("H5.H5Eget_msg: ", "Inappropriate type", msg); + assertEquals("H5.H5Eget_msg: ", HDF5Constants.H5E_MINOR, error_msg_type[0]); + } + catch (Throwable err) { + err.printStackTrace(); + fail("H5.H5Eget_msg: " + err); + } + } + + @Test public void testH5Epop() { try { H5.H5Eset_current_stack(current_stackid); diff --git a/java/test/TestH5Edefault.java b/java/test/TestH5Edefault.java index 835ccba..31f871e 100644 --- a/java/test/TestH5Edefault.java +++ b/java/test/TestH5Edefault.java @@ -91,8 +91,7 @@ public class TestH5Edefault { err.printStackTrace(); fail("H5.H5Eget_current_stack: " + err); } - assertTrue("H5.H5Eget_current_stack: get_num #:" + num_msg_default, - num_msg_default == 3); + assertTrue("H5.H5Eget_current_stack: get_num #:" + num_msg_default, num_msg_default == 3); //Save a copy of the current stack and clears the current stack try { @@ -102,10 +101,8 @@ public class TestH5Edefault { err.printStackTrace(); fail("H5.H5Eget_current_stack: " + err); } - assertFalse("H5.H5Eget_current_stack: get_current_stack - " - + stack_id, stack_id < 0); - assertFalse("H5.H5Eget_current_stack: get_current_stack - " - + stack_id, stack_id == stack_id_default); + assertFalse("H5.H5Eget_current_stack: get_current_stack - " + stack_id, stack_id < 0); + assertFalse("H5.H5Eget_current_stack: get_current_stack - " + stack_id, stack_id == stack_id_default); // Verify we have the correct number of messages try { @@ -115,8 +112,7 @@ public class TestH5Edefault { err.printStackTrace(); fail("H5.H5Eget_current_stack: " + err); } - assertTrue("H5.H5Eget_current_stack: get_num #:" + num_msg_default, - num_msg_default == 0); + assertTrue("H5.H5Eget_current_stack: get_num #:" + num_msg_default, num_msg_default == 0); //Verify the copy has the correct number of messages try { @@ -126,8 +122,7 @@ public class TestH5Edefault { err.printStackTrace(); fail("H5.H5Eget_current_stack: " + err); } - assertTrue("H5.H5Eget_current_stack: get_num #:" + num_msg, - num_msg == 3); + assertTrue("H5.H5Eget_current_stack: get_num #:" + num_msg, num_msg == 3); try { H5.H5Eclose_stack(stack_id); @@ -158,8 +153,7 @@ public class TestH5Edefault { err.printStackTrace(); fail("H5.H5Eget_current_stack: " + err); } - assertTrue("H5.H5Eget_current_stack: get_num #:" + num_msg_default, - num_msg_default == 3); + assertTrue("H5.H5Eget_current_stack: get_num #:" + num_msg_default, num_msg_default == 3); //Save a copy of the current stack and clears the current stack try { @@ -169,10 +163,8 @@ public class TestH5Edefault { err.printStackTrace(); fail("H5.H5Eget_current_stack: " + err); } - assertFalse("H5.H5Eget_current_stack: get_current_stack - " - + stack_id, stack_id < 0); - assertFalse("H5.H5Eget_current_stack: get_current_stack - " - + stack_id, stack_id == HDF5Constants.H5E_DEFAULT); + assertFalse("H5.H5Eget_current_stack: get_current_stack - " + stack_id, stack_id < 0); + assertFalse("H5.H5Eget_current_stack: get_current_stack - " + stack_id, stack_id == HDF5Constants.H5E_DEFAULT); // Verify we have the correct number of messages try { @@ -182,8 +174,7 @@ public class TestH5Edefault { err.printStackTrace(); fail("H5.H5Eget_current_stack: " + err); } - assertTrue("H5.H5Eget_current_stack: get_num #:" + num_msg_default, - num_msg_default == 0); + assertTrue("H5.H5Eget_current_stack: get_num #:" + num_msg_default, num_msg_default == 0); //Verify the copy has the correct number of messages try { @@ -193,8 +184,7 @@ public class TestH5Edefault { err.printStackTrace(); fail("H5.H5Eget_current_stack: " + err); } - assertTrue("H5.H5Eget_current_stack: get_num #:" + num_msg, - num_msg == 3); + assertTrue("H5.H5Eget_current_stack: get_num #:" + num_msg, num_msg == 3); //Generate errors on default stack try { @@ -212,8 +202,7 @@ public class TestH5Edefault { err.printStackTrace(); fail("H5.H5Eget_current_stack: " + err); } - assertTrue("H5.H5Eget_current_stack: get_num #:" + num_msg_default, - num_msg_default == 3); + assertTrue("H5.H5Eget_current_stack: get_num #:" + num_msg_default, num_msg_default == 3); //Remove one message from the current stack try { @@ -224,8 +213,7 @@ public class TestH5Edefault { err.printStackTrace(); fail("H5.H5Eget_current_stack: " + err); } - assertTrue("H5.H5Eget_current_stack: pop #:" + num_msg_default, - num_msg_default == 2); + assertTrue("H5.H5Eget_current_stack: pop #:" + num_msg_default, num_msg_default == 2); //Verify the copy still has the correct number of messages try { @@ -235,8 +223,7 @@ public class TestH5Edefault { err.printStackTrace(); fail("H5.H5Eget_current_stack: " + err); } - assertTrue("H5.H5Eget_current_stack: get_num #:" + num_msg, - num_msg == 3); + assertTrue("H5.H5Eget_current_stack: get_num #:" + num_msg, num_msg == 3); } @Test(expected = IllegalArgumentException.class) @@ -306,8 +293,7 @@ public class TestH5Edefault { err.printStackTrace(); fail("H5.H5Eset_current_stack: " + err); } - assertTrue("H5.H5Eset_current_stack: get_num #:" + num_msg, - num_msg == 3); + assertTrue("H5.H5Eset_current_stack: get_num #:" + num_msg, num_msg == 3); //Save a copy of the current stack try { @@ -317,10 +303,8 @@ public class TestH5Edefault { err.printStackTrace(); fail("H5.H5Eset_current_stack: " + err); } - assertFalse("H5.H5Eset_current_stack: get_current_stack - " - + stack_id, stack_id < 0); - assertFalse("H5.H5Eset_current_stack: get_current_stack - " - + stack_id, stack_id == HDF5Constants.H5E_DEFAULT); + assertFalse("H5.H5Eset_current_stack: get_current_stack - " + stack_id, stack_id < 0); + assertFalse("H5.H5Eset_current_stack: get_current_stack - " + stack_id, stack_id == HDF5Constants.H5E_DEFAULT); //Verify the copy has the correct number of messages try { @@ -330,8 +314,7 @@ public class TestH5Edefault { err.printStackTrace(); fail("H5.H5Eset_current_stack: " + err); } - assertTrue("H5.H5Eset_current_stack: get_num #:" + num_msg, - num_msg == 3); + assertTrue("H5.H5Eset_current_stack: get_num #:" + num_msg, num_msg == 3); //Generate errors on default stack try { @@ -349,8 +332,7 @@ public class TestH5Edefault { err.printStackTrace(); fail("H5.H5Eget_current_stack: " + err); } - assertTrue("H5.H5Eset_current_stack: get_num #:" + num_msg, - num_msg == 3); + assertTrue("H5.H5Eset_current_stack: get_num #:" + num_msg, num_msg == 3); //Remove one message from the current stack try { @@ -361,8 +343,7 @@ public class TestH5Edefault { err.printStackTrace(); fail("H5.H5Eset_current_stack: " + err); } - assertTrue("H5.H5Eset_current_stack: pop #:" + num_msg, - num_msg == 2); + assertTrue("H5.H5Eset_current_stack: pop #:" + num_msg, num_msg == 2); //Verify the copy still has the correct number of messages try { @@ -372,8 +353,7 @@ public class TestH5Edefault { err.printStackTrace(); fail("H5.H5Eset_current_stack: " + err); } - assertTrue("H5.H5Eset_current_stack: get_num #:" + num_msg, - num_msg == 3); + assertTrue("H5.H5Eset_current_stack: get_num #:" + num_msg, num_msg == 3); try { H5.H5Eset_current_stack(stack_id); @@ -383,8 +363,7 @@ public class TestH5Edefault { err.printStackTrace(); fail("H5.H5Eset_current_stack: " + err); } - assertTrue("H5.H5Eset_current_stack: get_num - " + num_msg, - num_msg == 3); + assertTrue("H5.H5Eset_current_stack: get_num - " + num_msg, num_msg == 3); } @Test(expected = IllegalArgumentException.class) @@ -492,8 +471,7 @@ public class TestH5Edefault { err.printStackTrace(); fail("H5.H5Eclear2_with_msg: " + err); } - assertTrue("H5.H5Eclear2_with_msg before #:" + num_msg, - num_msg == 3); + assertTrue("H5.H5Eclear2_with_msg before #:" + num_msg, num_msg == 3); try { H5.H5Eclear2(HDF5Constants.H5E_DEFAULT); num_msg = H5.H5Eget_num(HDF5Constants.H5E_DEFAULT); @@ -502,7 +480,7 @@ public class TestH5Edefault { err.printStackTrace(); fail("H5.H5Eclear2_with_msg: " + err); } - assertTrue("H5.H5Eclear2_with_msg after #:" + num_msg, num_msg == 0); + assertTrue("H5.H5Eclear2_with_msg after #:" + num_msg, num_msg == 0); } @Test(expected = IllegalArgumentException.class) diff --git a/java/test/TestH5Eparams.java b/java/test/TestH5Eparams.java index 63e2c62..0c55577 100644 --- a/java/test/TestH5Eparams.java +++ b/java/test/TestH5Eparams.java @@ -47,8 +47,7 @@ public class TestH5Eparams { hdf_java_classid = -1; try { - hdf_java_classid = H5.H5Eregister_class("HDF-Java-Error", - "hdf-java", "2.5"); + hdf_java_classid = H5.H5Eregister_class("HDF-Java-Error", "hdf-java", "2.5"); current_stackid = H5.H5Eget_current_stack(); } catch (Throwable err) { @@ -110,8 +109,7 @@ public class TestH5Eparams { @Test public void testH5Ecreate_msg_major() { try { - long err_id = H5.H5Ecreate_msg(hdf_java_classid, - HDF5Constants.H5E_MAJOR, "Error in Test"); + long err_id = H5.H5Ecreate_msg(hdf_java_classid, HDF5Constants.H5E_MAJOR, "Error in Test"); assertFalse("H5.H5Ecreate_msg_major: " + err_id, err_id < 0); H5.H5Eclose_msg(err_id); } @@ -124,8 +122,7 @@ public class TestH5Eparams { @Test public void testH5Ecreate_msg_minor() { try { - long err_id = H5.H5Ecreate_msg(hdf_java_classid, - HDF5Constants.H5E_MINOR, "Error in Test Function"); + long err_id = H5.H5Ecreate_msg(hdf_java_classid, HDF5Constants.H5E_MINOR, "Error in Test Function"); assertFalse("H5.H5Ecreate_msg_minor: " + err_id, err_id < 0); H5.H5Eclose_msg(err_id); } @@ -141,8 +138,7 @@ public class TestH5Eparams { long err_id = -1; String msg = null; try { - err_id = H5.H5Ecreate_msg(hdf_java_classid, - HDF5Constants.H5E_MAJOR, "Error in Test"); + err_id = H5.H5Ecreate_msg(hdf_java_classid, HDF5Constants.H5E_MAJOR, "Error in Test"); } catch (Throwable err) { err.printStackTrace(); @@ -158,8 +154,7 @@ public class TestH5Eparams { } assertNotNull("H5.H5Eget_msg: " + msg, msg); assertEquals("H5.H5Eget_msg: ", "Error in Test", msg); - assertEquals("H5.H5Eget_msg: ", HDF5Constants.H5E_MAJOR, - error_msg_type[0]); + assertEquals("H5.H5Eget_msg: ", HDF5Constants.H5E_MAJOR, error_msg_type[0]); try { H5.H5Eclose_msg(err_id); } @@ -170,62 +165,6 @@ public class TestH5Eparams { } @Test - public void testH5Eget_msg_major() { - - try { - H5.H5Fopen("test", 0, 1); - } - catch (HDF5LibraryException hdferr) { - int[] error_msg_type = { HDF5Constants.H5E_MAJOR }; - String msg = null; - try { - msg = H5.H5Eget_msg(hdferr.getMajorErrorNumber(), - error_msg_type); - } - catch (Throwable err) { - err.printStackTrace(); - fail("H5.H5Eget_msg: " + err); - } - assertNotNull("H5.H5Eget_msg: " + msg, msg); - assertEquals("H5.H5Eget_msg: ", "Invalid arguments to routine", - msg); - assertEquals("H5.H5Eget_msg: ", HDF5Constants.H5E_MAJOR, - error_msg_type[0]); - } - catch (Throwable err) { - err.printStackTrace(); - fail("H5.H5Eget_msg: " + err); - } - } - - @Test - public void testH5Eget_msg_minor() { - try { - H5.H5Fopen("test", 0, 1); - } - catch (HDF5LibraryException hdferr) { - int[] error_msg_type = { HDF5Constants.H5E_MINOR }; - String msg = null; - try { - msg = H5.H5Eget_msg(hdferr.getMinorErrorNumber(), - error_msg_type); - } - catch (Throwable err) { - err.printStackTrace(); - fail("H5.H5Eget_msg: " + err); - } - assertNotNull("H5.H5Eget_msg: " + msg, msg); - assertEquals("H5.H5Eget_msg: ", "Inappropriate type", msg); - assertEquals("H5.H5Eget_msg: ", HDF5Constants.H5E_MINOR, - error_msg_type[0]); - } - catch (Throwable err) { - err.printStackTrace(); - fail("H5.H5Eget_msg: " + err); - } - } - - @Test public void testH5Ecreate_stack() { long stk_id = -1; try { diff --git a/java/test/TestH5Eregister.java b/java/test/TestH5Eregister.java index 742b47f..1b87699 100644 --- a/java/test/TestH5Eregister.java +++ b/java/test/TestH5Eregister.java @@ -60,8 +60,7 @@ public class TestH5Eregister { public void testH5Eregister_class() { long hdf_java_classid = -1; try { - hdf_java_classid = H5.H5Eregister_class("HDF-Java-Error", - "hdf-java", "2.5"); + hdf_java_classid = H5.H5Eregister_class("HDF-Java-Error", "hdf-java", "2.5"); } catch (Throwable err) { fail("H5.H5Eregister_class: " + err); diff --git a/java/test/TestUnit.java b/java/test/TestUnit.java index b55e415..e98fd4f 100644 --- a/java/test/TestUnit.java +++ b/java/test/TestUnit.java @@ -18,7 +18,7 @@ import org.junit.runners.Suite; @RunWith(Suite.class) @Suite.SuiteClasses( { TestH5.class, - TestH5Eparams.class, + TestH5Eparams.class, TestH5Eregister.class, TestH5Fparams.class, TestH5Fbasic.class, TestH5F.class, TestH5Fswmr.class, TestH5Gbasic.class, TestH5G.class, TestH5Sbasic.class, TestH5S.class, -- cgit v0.12 From 947cfd15cff672bbb84223719912b6d3f5d63526 Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Thu, 12 Apr 2018 08:22:09 -0500 Subject: Correct number of tests --- java/test/JUnit-unit.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/java/test/JUnit-unit.txt b/java/test/JUnit-unit.txt index 3ace4fa..7efc915 100644 --- a/java/test/JUnit-unit.txt +++ b/java/test/JUnit-unit.txt @@ -613,5 +613,5 @@ JUnit version 4.11 Time: XXXX -OK (606 tests) +OK (611 tests) -- cgit v0.12 From e10df541f074eb4903c1d67982766da8d7ed2879 Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Thu, 12 Apr 2018 09:11:03 -0500 Subject: Add new file --- MANIFEST | 1 + 1 file changed, 1 insertion(+) diff --git a/MANIFEST b/MANIFEST index 17c5903..40b327c 100644 --- a/MANIFEST +++ b/MANIFEST @@ -3045,6 +3045,7 @@ ./java/test/CMakeLists.txt ./java/test/junit.sh.in ./java/test/JUnit-interface.txt +./java/test/JUnit-unit.txt ./java/test/JUnit-interface.ert ./java/test/h5ex_g_iterate.orig ./java/test/TestH5.java -- cgit v0.12 From 0c91e6b92217bcf47d3ee21351c5b89d74c36609 Mon Sep 17 00:00:00 2001 From: hdftest Date: Mon, 30 Apr 2018 08:16:49 -0500 Subject: Updated version to 1.10.3-snap1 --- README.txt | 2 +- c++/src/cpp_doc_config | 2 +- config/cmake/scripts/HDF5config.cmake | 2 +- configure.ac | 2 +- release_docs/RELEASE.txt | 2 +- src/H5public.h | 4 ++-- 6 files changed, 7 insertions(+), 7 deletions(-) diff --git a/README.txt b/README.txt index ac9138e..8a06e1d 100644 --- a/README.txt +++ b/README.txt @@ -1,4 +1,4 @@ -HDF5 version 1.10.3-snap0 currently under development +HDF5 version 1.10.3-snap1 currently under development ------------------------------------------------------------------------------ Please refer to the release_docs/INSTALL file for installation instructions. diff --git a/c++/src/cpp_doc_config b/c++/src/cpp_doc_config index 68929f4..78afed0 100644 --- a/c++/src/cpp_doc_config +++ b/c++/src/cpp_doc_config @@ -38,7 +38,7 @@ PROJECT_NAME = # could be handy for archiving the generated documentation or if some version # control system is used. -PROJECT_NUMBER = "1.10.3-snap0, currently under development" +PROJECT_NUMBER = "1.10.3-snap1, currently under development" # Using the PROJECT_BRIEF tag one can provide an optional one line description # for a project that appears at the top of each page and should give viewer a diff --git a/config/cmake/scripts/HDF5config.cmake b/config/cmake/scripts/HDF5config.cmake index 1264882..06ea270 100755 --- a/config/cmake/scripts/HDF5config.cmake +++ b/config/cmake/scripts/HDF5config.cmake @@ -35,7 +35,7 @@ cmake_minimum_required (VERSION 3.10) ############################################################################## set (CTEST_SOURCE_VERSION "1.10.3") -set (CTEST_SOURCE_VERSEXT "-snap0") +set (CTEST_SOURCE_VERSEXT "-snap1") ############################################################################## # handle input parameters to script. diff --git a/configure.ac b/configure.ac index 9bdc292..8046658 100644 --- a/configure.ac +++ b/configure.ac @@ -24,7 +24,7 @@ AC_PREREQ([2.69]) ## NOTE: Do not forget to change the version number here when we do a ## release!!! ## -AC_INIT([HDF5], [1.10.3-snap0], [help@hdfgroup.org]) +AC_INIT([HDF5], [1.10.3-snap1], [help@hdfgroup.org]) AC_CONFIG_SRCDIR([src/H5.c]) AC_CONFIG_HEADERS([src/H5config.h]) diff --git a/release_docs/RELEASE.txt b/release_docs/RELEASE.txt index d0d5d7a..642f75c 100644 --- a/release_docs/RELEASE.txt +++ b/release_docs/RELEASE.txt @@ -1,4 +1,4 @@ -HDF5 version 1.10.3-snap0 currently under development +HDF5 version 1.10.3-snap1 currently under development ================================================================================ diff --git a/src/H5public.h b/src/H5public.h index c30d4ba..142b3d3 100644 --- a/src/H5public.h +++ b/src/H5public.h @@ -94,9 +94,9 @@ extern "C" { #define H5_VERS_MAJOR 1 /* For major interface/format changes */ #define H5_VERS_MINOR 10 /* For minor interface/format changes */ #define H5_VERS_RELEASE 3 /* For tweaks, bug-fixes, or development */ -#define H5_VERS_SUBRELEASE "snap0" /* For pre-releases like snap0 */ +#define H5_VERS_SUBRELEASE "snap1" /* For pre-releases like snap0 */ /* Empty string for real releases. */ -#define H5_VERS_INFO "HDF5 library version: 1.10.3-snap0" /* Full version string */ +#define H5_VERS_INFO "HDF5 library version: 1.10.3-snap1" /* Full version string */ #define H5check() H5check_version(H5_VERS_MAJOR,H5_VERS_MINOR, \ H5_VERS_RELEASE) -- cgit v0.12 From 278fdfcbdb0b40e8aaf4a850d9050099bedc3696 Mon Sep 17 00:00:00 2001 From: "M. Scot Breitenfeld" Date: Wed, 9 May 2018 16:26:09 -0500 Subject: temporary fix for HDFFV-10469 --- src/H5Olayout.c | 102 +------------------------------------------------------- test/vds.c | 5 ++- 2 files changed, 5 insertions(+), 102 deletions(-) diff --git a/src/H5Olayout.c b/src/H5Olayout.c index 5e9507b..d15025b 100644 --- a/src/H5Olayout.c +++ b/src/H5Olayout.c @@ -679,107 +679,7 @@ H5O__layout_encode(H5F_t *f, hbool_t H5_ATTR_UNUSED disable_shared, uint8_t *p, break; case H5D_VIRTUAL: - /* Create heap block if it has not been created yet */ - /* Note that 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 */ - - if((mesg->storage.u.virt.serial_list_hobjid.addr == HADDR_UNDEF) - && (mesg->storage.u.virt.list_nused > 0)) { - uint8_t *heap_block_p; - size_t block_size; - hssize_t select_serial_size; - hsize_t tmp_hsize; - uint32_t chksum; - size_t i; - - if(H5F_set_libver_bounds(f, H5F_LIBVER_V110, H5F_LIBVER_V110) < 0) - HGOTO_ERROR(H5E_OHDR, H5E_CANTSET, FAIL, "cannot set low/high bounds") - - /* Allocate array for caching results of strlen */ - if(NULL == (str_size = (size_t *)H5MM_malloc(2 * mesg->storage.u.virt.list_nused *sizeof(size_t)))) - HGOTO_ERROR(H5E_OHDR, H5E_RESOURCE, FAIL, "unable to allocate string length array") - - /* - * Calculate heap block size - */ - /* Version and number of entries */ - block_size = (size_t)1 + H5F_SIZEOF_SIZE(f); - - /* Calculate size of each entry */ - for(i = 0; i < mesg->storage.u.virt.list_nused; i++) { - HDassert(mesg->storage.u.virt.list[i].source_file_name); - HDassert(mesg->storage.u.virt.list[i].source_dset_name); - HDassert(mesg->storage.u.virt.list[i].source_select); - HDassert(mesg->storage.u.virt.list[i].source_dset.virtual_select); - - /* Source file name */ - str_size[2 * i] = HDstrlen(mesg->storage.u.virt.list[i].source_file_name) + (size_t)1; - block_size += str_size[2 * i]; - - /* Source dset name */ - str_size[(2 * i) + 1] = HDstrlen(mesg->storage.u.virt.list[i].source_dset_name) + (size_t)1; - block_size += str_size[(2 * i) + 1]; - - /* Source selection */ - if((select_serial_size = H5S_SELECT_SERIAL_SIZE(mesg->storage.u.virt.list[i].source_select, f)) < 0) - HGOTO_ERROR(H5E_OHDR, H5E_CANTENCODE, FAIL, "unable to check dataspace selection size") - block_size += (size_t)select_serial_size; - - /* Virtual dataset selection */ - if((select_serial_size = H5S_SELECT_SERIAL_SIZE(mesg->storage.u.virt.list[i].source_dset.virtual_select, f)) < 0) - HGOTO_ERROR(H5E_OHDR, H5E_CANTENCODE, FAIL, "unable to check dataspace selection size") - block_size += (size_t)select_serial_size; - } /* end for */ - - /* Checksum */ - block_size += 4; - - /* Allocate heap block */ - if(NULL == (heap_block = (uint8_t *)H5MM_malloc(block_size))) - HGOTO_ERROR(H5E_OHDR, H5E_RESOURCE, FAIL, "unable to allocate heap block") - - /* - * Encode heap block - */ - heap_block_p = heap_block; - - /* Encode heap block encoding version */ - *heap_block_p++ = (uint8_t)H5O_LAYOUT_VDS_GH_ENC_VERS; - - /* Number of entries */ - tmp_hsize = (hsize_t)mesg->storage.u.virt.list_nused; - H5F_ENCODE_LENGTH(f, heap_block_p, tmp_hsize) - - /* Encode each entry */ - for(i = 0; i < mesg->storage.u.virt.list_nused; i++) { - /* Source file name */ - (void)HDmemcpy((char *)heap_block_p, mesg->storage.u.virt.list[i].source_file_name, str_size[2 * i]); - heap_block_p += str_size[2 * i]; - - /* Source dataset name */ - (void)HDmemcpy((char *)heap_block_p, mesg->storage.u.virt.list[i].source_dset_name, str_size[(2 * i) + 1]); - heap_block_p += str_size[(2 * i) + 1]; - - /* Source selection */ - if(H5S_SELECT_SERIALIZE(mesg->storage.u.virt.list[i].source_select, &heap_block_p, f) < 0) - HGOTO_ERROR(H5E_OHDR, H5E_CANTCOPY, FAIL, "unable to serialize source selection") - - /* Virtual selection */ - if(H5S_SELECT_SERIALIZE(mesg->storage.u.virt.list[i].source_dset.virtual_select, &heap_block_p, f) < 0) - HGOTO_ERROR(H5E_OHDR, H5E_CANTCOPY, FAIL, "unable to serialize virtual selection") - } /* end for */ - - /* Checksum */ - chksum = H5_checksum_metadata(heap_block, block_size - (size_t)4, 0); - UINT32ENCODE(heap_block_p, chksum) - - /* Insert block into global heap */ - if(H5HG_insert(f, block_size, heap_block, &((H5O_layout_t *)mesg)->storage.u.virt.serial_list_hobjid) < 0) /* Casting away const OK --NAF */ - HGOTO_ERROR(H5E_OHDR, H5E_CANTINSERT, FAIL, "unable to insert virtual dataset heap block") - } /* end if */ - - /* Heap information */ + /* Encode heap ID for VDS info */ H5F_addr_encode(f, &p, mesg->storage.u.virt.serial_list_hobjid.addr); UINT32ENCODE(p, mesg->storage.u.virt.serial_list_hobjid.idx); break; diff --git a/test/vds.c b/test/vds.c index b08a264..051bc9d 100644 --- a/test/vds.c +++ b/test/vds.c @@ -618,7 +618,10 @@ test_api(test_api_config_t config, hid_t fapl) TEST_ERROR /* Get examination DCPL */ - if(test_api_get_ex_dcpl(config, fapl, dcpl, &ex_dcpl, vspace[0], filename, (hsize_t)174) < 0) + + + /* Should be a value of 174, not 213. HDFFV-10469 */ + if(test_api_get_ex_dcpl(config, fapl, dcpl, &ex_dcpl, vspace[0], filename, (hsize_t)213) < 0) TEST_ERROR /* Test H5Pget_virtual_count */ -- cgit v0.12 From 1e64801bddccd15ab5d4c6b0f91f9e42a6914542 Mon Sep 17 00:00:00 2001 From: "M. Scot Breitenfeld" Date: Thu, 10 May 2018 09:05:15 -0500 Subject: removed extraneous lib. ver. bound, PR comment --- src/H5Olayout.c | 6 ------ 1 file changed, 6 deletions(-) diff --git a/src/H5Olayout.c b/src/H5Olayout.c index d15025b..afaddfa 100644 --- a/src/H5Olayout.c +++ b/src/H5Olayout.c @@ -552,7 +552,6 @@ H5O__layout_encode(H5F_t *f, hbool_t H5_ATTR_UNUSED disable_shared, uint8_t *p, uint8_t *heap_block = NULL; size_t *str_size = NULL; unsigned u; - H5F_libver_t saved_low, saved_high; herr_t ret_value = SUCCEED; /* Return value */ FUNC_ENTER_STATIC @@ -569,9 +568,6 @@ H5O__layout_encode(H5F_t *f, hbool_t H5_ATTR_UNUSED disable_shared, uint8_t *p, /* Layout class */ *p++ = mesg->type; - saved_low = H5F_LOW_BOUND(f); - saved_high = H5F_HIGH_BOUND(f); - /* Write out layout class specific information */ switch(mesg->type) { case H5D_COMPACT: @@ -691,8 +687,6 @@ H5O__layout_encode(H5F_t *f, hbool_t H5_ATTR_UNUSED disable_shared, uint8_t *p, } /* end switch */ done: - if(H5F_set_libver_bounds(f, saved_low, saved_high) < 0) - HDONE_ERROR(H5E_OHDR, H5E_CANTSET, FAIL, "cannot reset low/high bounds") heap_block = (uint8_t *)H5MM_xfree(heap_block); str_size = (size_t *)H5MM_xfree(str_size); -- cgit v0.12 From 6da75cffd2356fb5b5b92204b2d1c34a0e2e99ea Mon Sep 17 00:00:00 2001 From: "M. Scot Breitenfeld" Date: Fri, 11 May 2018 11:45:03 -0500 Subject: Fixed libver bounds underscore issue --- src/H5F.c | 2 +- src/H5Fdeprec.c | 4 ++-- src/H5Fint.c | 6 +++--- src/H5Fpkg.h | 1 + src/H5Fprivate.h | 1 - 5 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/H5F.c b/src/H5F.c index 6c2d594..6d62c08 100644 --- a/src/H5F.c +++ b/src/H5F.c @@ -1476,7 +1476,7 @@ H5Fset_libver_bounds(hid_t file_id, H5F_libver_t low, H5F_libver_t high) HGOTO_ERROR(H5E_FILE, H5E_CANTSET, FAIL, "can't set collective metadata read info") /* Call internal set_libver_bounds function */ - if(H5F_set_libver_bounds(f, low, high) < 0) + if(H5F__set_libver_bounds(f, low, high) < 0) HGOTO_ERROR(H5E_FILE, H5E_CANTSET, FAIL, "cannot set low/high bounds") done: diff --git a/src/H5Fdeprec.c b/src/H5Fdeprec.c index f220e77..703c9cc 100644 --- a/src/H5Fdeprec.c +++ b/src/H5Fdeprec.c @@ -149,7 +149,7 @@ done: * Purpose: Enable switching between latest or non-latest format while * a file is open. * This is deprecated starting release 1.10.2 and is modified - * to call the private H5F_set_libver_bounds() to set the + * to call the private H5F__set_libver_bounds() to set the * bounds. * * Before release 1.10.2, the library supports only two @@ -198,7 +198,7 @@ H5Fset_latest_format(hid_t file_id, hbool_t latest_format) low = H5F_LIBVER_EARLIEST; /* Call private set_libver_bounds function to set the bounds */ - if(H5F_set_libver_bounds(f, low, high) < 0) + if(H5F__set_libver_bounds(f, low, high) < 0) HGOTO_ERROR(H5E_FILE, H5E_CANTSET, FAIL, "cannot set low/high bounds") done: diff --git a/src/H5Fint.c b/src/H5Fint.c index e6188e6..a7209ce 100644 --- a/src/H5Fint.c +++ b/src/H5Fint.c @@ -2761,7 +2761,7 @@ H5F_set_store_msg_crt_idx(H5F_t *f, hbool_t flag) /*------------------------------------------------------------------------- - * Function: H5F_set_libver_bounds() + * Function: H5F__set_libver_bounds() * * Purpose: Set the file's low and high bound to the input parameters * 'low' and 'high' respectively. @@ -2775,7 +2775,7 @@ H5F_set_store_msg_crt_idx(H5F_t *f, hbool_t flag) *------------------------------------------------------------------------- */ herr_t -H5F_set_libver_bounds(H5F_t *f, H5F_libver_t low, H5F_libver_t high) +H5F__set_libver_bounds(H5F_t *f, H5F_libver_t low, H5F_libver_t high) { herr_t ret_value = SUCCEED; /* Return value */ @@ -2817,7 +2817,7 @@ H5F_set_libver_bounds(H5F_t *f, H5F_libver_t low, H5F_libver_t high) done: FUNC_LEAVE_NOAPI(ret_value) -} /* H5F_set_libver_bounds() */ +} /* H5F__set_libver_bounds() */ /*------------------------------------------------------------------------- diff --git a/src/H5Fpkg.h b/src/H5Fpkg.h index f18826f..050e426 100644 --- a/src/H5Fpkg.h +++ b/src/H5Fpkg.h @@ -415,6 +415,7 @@ H5_DLL herr_t H5F__format_convert(H5F_t *f); H5_DLL herr_t H5F__start_swmr_write(H5F_t *f); H5_DLL herr_t H5F__close(hid_t file_id); H5_DLL herr_t H5F__close_cb(H5F_t *f); +H5_DLL herr_t H5F__set_libver_bounds(H5F_t *f, H5F_libver_t low, H5F_libver_t high); /* File mount related routines */ H5_DLL herr_t H5F__close_mounts(H5F_t *f); diff --git a/src/H5Fprivate.h b/src/H5Fprivate.h index ba4f4d8..2e69bb4 100644 --- a/src/H5Fprivate.h +++ b/src/H5Fprivate.h @@ -767,7 +767,6 @@ H5_DLL unsigned H5F_gc_ref(const H5F_t *f); H5_DLL unsigned H5F_use_latest_flags(const H5F_t *f, unsigned fl); H5_DLL hbool_t H5F_store_msg_crt_idx(const H5F_t *f); H5_DLL herr_t H5F_set_store_msg_crt_idx(H5F_t *f, hbool_t flag); -H5_DLL herr_t H5F_set_libver_bounds(H5F_t * f, H5F_libver_t low, H5F_libver_t high); H5_DLL struct H5UC_t *H5F_grp_btree_shared(const H5F_t *f); H5_DLL herr_t H5F_set_grp_btree_shared(H5F_t *f, struct H5UC_t *rc); H5_DLL hbool_t H5F_use_tmp_space(const H5F_t *f); -- cgit v0.12 From d349e903681820b73938a6a2e11ffd8ed64d2557 Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Wed, 16 May 2018 11:25:24 -0500 Subject: Fix soversion --- config/cmake/HDF5Macros.cmake | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/config/cmake/HDF5Macros.cmake b/config/cmake/HDF5Macros.cmake index e472a67..fe38b82 100644 --- a/config/cmake/HDF5Macros.cmake +++ b/config/cmake/HDF5Macros.cmake @@ -20,11 +20,11 @@ macro (H5_SET_LIB_OPTIONS libtarget libname libtype libpackage) else () set (LIBHDF_VERSION ${HDF5_${libpackage}_PACKAGE_SOVERSION_MAJOR}) endif () - set_target_properties (${libtarget} PROPERTIES VERSION ${LIBHDF_VERSION}) + set_target_properties (${libtarget} PROPERTIES VERSION ${PACKAGE_SOVERSION}) if (WIN32) - set (${LIB_OUT_NAME} "${LIB_OUT_NAME}-${PACKAGE_SOVERSION}") + set (${LIB_OUT_NAME} "${LIB_OUT_NAME}-${LIBHDF_VERSION}") else () - set_target_properties (${libtarget} PROPERTIES SOVERSION ${PACKAGE_SOVERSION}) + set_target_properties (${libtarget} PROPERTIES SOVERSION ${LIBHDF_VERSION}) endif () endif () HDF_SET_LIB_OPTIONS (${libtarget} ${LIB_OUT_NAME} ${libtype}) -- cgit v0.12 From e1e63edd359e3753c374440bdb295010c348e9bc Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Wed, 16 May 2018 15:21:32 -0500 Subject: Update Windows test machines --- release_docs/RELEASE.txt | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/release_docs/RELEASE.txt b/release_docs/RELEASE.txt index 642f75c..1f12fd8 100644 --- a/release_docs/RELEASE.txt +++ b/release_docs/RELEASE.txt @@ -174,25 +174,18 @@ Supported Platforms (emu) Sun Fortran 95 8.6 SunOS_sparc Sun C++ 5.12 SunOS_sparc - Windows 7 Visual Studio 2012 w/ Intel Fortran 15 (cmake) - Visual Studio 2013 w/ Intel Fortran 15 (cmake) - Visual Studio 2015 w/ Intel Fortran 16 (cmake) + Windows 7 Visual Studio 2015 w/ Intel Fortran 16 (cmake) Windows 7 x64 Visual Studio 2012 w/ Intel Fortran 15 (cmake) Visual Studio 2013 w/ Intel Fortran 15 (cmake) Visual Studio 2015 w/ Intel Fortran 16 (cmake) Visual Studio 2015 w/ Intel C, Fortran 2017 (cmake) Visual Studio 2015 w/ MSMPI 8 (cmake) - Cygwin(CYGWIN_NT-6.1 2.8.0(0.309/5/3) - gcc and gfortran compilers (GCC 5.4.0) - (cmake and autotools) Windows 10 Visual Studio 2015 w/ Intel Fortran 16 (cmake) - Cygwin(CYGWIN_NT-6.1 2.8.0(0.309/5/3) - gcc and gfortran compilers (GCC 5.4.0) - (cmake and autotools) Windows 10 x64 Visual Studio 2015 w/ Intel Fortran 16 (cmake) + Visual Studio 2017 w/ Intel Fortran 18 (cmake) Mac OS X Yosemite 10.10.5 Apple clang/clang++ version 6.1 from Xcode 7.0 64-bit gfortran GNU Fortran (GCC) 4.9.2 -- cgit v0.12 From 4df595946c82f739554060c846e4586d07e3d585 Mon Sep 17 00:00:00 2001 From: Vailin Choi Date: Thu, 17 May 2018 11:51:34 -0500 Subject: Fix for HDFFV-10469: set to latest format for virtual layout encoding. --- src/H5Dvirtual.c | 36 ++++++++++++++++++++++++++++++++---- test/vds.c | 2 +- 2 files changed, 33 insertions(+), 5 deletions(-) diff --git a/src/H5Dvirtual.c b/src/H5Dvirtual.c index dd3508f..d80e086 100644 --- a/src/H5Dvirtual.c +++ b/src/H5Dvirtual.c @@ -417,6 +417,11 @@ H5D__virtual_store_layout(H5F_t *f, H5O_layout_t *layout) hsize_t tmp_nentries; /* Temp. variable for # of VDS entries */ uint32_t chksum; /* Checksum for heap data */ size_t i; /* Local index variable */ + H5P_genplist_t *fapl_plist; /* The file access property list */ + hid_t new_fapl_id; /* The file access property list ID */ + H5F_libver_t low_bound = H5F_LIBVER_V110; /* Set the low bound in fapl to latest */ + H5F_libver_t high_bound = H5F_LIBVER_V110; /* Set the high bound in fapl to latest */ + H5F_t *tmp_f = NULL; /* Pointer to faked file structure */ herr_t ret_value = SUCCEED; /* Return value */ FUNC_ENTER_PACKAGE @@ -428,6 +433,24 @@ H5D__virtual_store_layout(H5F_t *f, H5O_layout_t *layout) /* Create block if # of used entries > 0 */ if(layout->storage.u.virt.list_nused > 0) { + + /* Make a copy of the default file access property list */ + if(NULL == (fapl_plist = (H5P_genplist_t *)H5I_object(H5P_LST_FILE_ACCESS_ID_g))) + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a property list") + + /* Set latest format in fapl_plist for virtual layout encoding */ + if(H5P_set(fapl_plist, H5F_ACS_LIBVER_LOW_BOUND_NAME, &low_bound) < 0) + HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "can't set 'low' bound for library format versions") + if(H5P_set(fapl_plist, H5F_ACS_LIBVER_HIGH_BOUND_NAME, &high_bound) < 0) + HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "can't set 'high' bound for library format versions") + /* Copy and return the fapl id */ + if((new_fapl_id = H5P_copy_plist(fapl_plist, FALSE)) < 0) + HGOTO_ERROR(H5E_INTERNAL, H5E_CANTINIT, FAIL, "can't copy file access property list") + + /* Allocate "fake" file structure with the fapl setting */ + if(NULL == (tmp_f = H5F_fake_alloc((uint8_t)0, new_fapl_id))) + HGOTO_ERROR(H5E_DATASPACE, H5E_CANTALLOC, FAIL, "can't allocate fake file struct") + /* Allocate array for caching results of strlen */ if(NULL == (str_size = (size_t *)H5MM_malloc(2 * layout->storage.u.virt.list_nused * sizeof(size_t)))) HGOTO_ERROR(H5E_OHDR, H5E_RESOURCE, FAIL, "unable to allocate string length array") @@ -457,12 +480,12 @@ H5D__virtual_store_layout(H5F_t *f, H5O_layout_t *layout) block_size += str_size[(2 * i) + 1]; /* Source selection */ - if((select_serial_size = H5S_SELECT_SERIAL_SIZE(layout->storage.u.virt.list[i].source_select,f)) < 0) + if((select_serial_size = H5S_SELECT_SERIAL_SIZE(layout->storage.u.virt.list[i].source_select, tmp_f)) < 0) HGOTO_ERROR(H5E_OHDR, H5E_CANTENCODE, FAIL, "unable to check dataspace selection size") block_size += (size_t)select_serial_size; /* Virtual dataset selection */ - if((select_serial_size = H5S_SELECT_SERIAL_SIZE(layout->storage.u.virt.list[i].source_dset.virtual_select,f)) < 0) + if((select_serial_size = H5S_SELECT_SERIAL_SIZE(layout->storage.u.virt.list[i].source_dset.virtual_select, tmp_f)) < 0) HGOTO_ERROR(H5E_OHDR, H5E_CANTENCODE, FAIL, "unable to check dataspace selection size") block_size += (size_t)select_serial_size; } /* end for */ @@ -499,11 +522,11 @@ H5D__virtual_store_layout(H5F_t *f, H5O_layout_t *layout) heap_block_p += str_size[(2 * i) + 1]; /* Source selection */ - if(H5S_SELECT_SERIALIZE(layout->storage.u.virt.list[i].source_select, &heap_block_p,f) < 0) + if(H5S_SELECT_SERIALIZE(layout->storage.u.virt.list[i].source_select, &heap_block_p, tmp_f) < 0) HGOTO_ERROR(H5E_OHDR, H5E_CANTCOPY, FAIL, "unable to serialize source selection") /* Virtual selection */ - if(H5S_SELECT_SERIALIZE(layout->storage.u.virt.list[i].source_dset.virtual_select, &heap_block_p,f) < 0) + if(H5S_SELECT_SERIALIZE(layout->storage.u.virt.list[i].source_dset.virtual_select, &heap_block_p, tmp_f) < 0) HGOTO_ERROR(H5E_OHDR, H5E_CANTCOPY, FAIL, "unable to serialize virtual selection") } /* end for */ @@ -517,9 +540,14 @@ H5D__virtual_store_layout(H5F_t *f, H5O_layout_t *layout) } /* end if */ done: + /* Release fake file structure */ + if(tmp_f && H5F_fake_free(tmp_f) < 0) + HDONE_ERROR(H5E_DATASPACE, H5E_CANTRELEASE, FAIL, "unable to release fake file struct") + heap_block = (uint8_t *)H5MM_xfree(heap_block); str_size = (size_t *)H5MM_xfree(str_size); + FUNC_LEAVE_NOAPI(ret_value) } /* end H5D__virtual_store_layout() */ diff --git a/test/vds.c b/test/vds.c index 051bc9d..42bb0b8 100644 --- a/test/vds.c +++ b/test/vds.c @@ -621,7 +621,7 @@ test_api(test_api_config_t config, hid_t fapl) /* Should be a value of 174, not 213. HDFFV-10469 */ - if(test_api_get_ex_dcpl(config, fapl, dcpl, &ex_dcpl, vspace[0], filename, (hsize_t)213) < 0) + if(test_api_get_ex_dcpl(config, fapl, dcpl, &ex_dcpl, vspace[0], filename, (hsize_t)174) < 0) TEST_ERROR /* Test H5Pget_virtual_count */ -- cgit v0.12 From e96ef71034fbeadcf2ed244b15a14b7151529d29 Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Tue, 22 May 2018 10:23:16 -0500 Subject: HDFFV-9739 and cmake improvements merge from develop --- CMakeInstallation.cmake | 10 - CMakeLists.txt | 23 +- MANIFEST | 42 +- c++/CMakeLists.txt | 28 +- c++/examples/CMakeLists.txt | 12 +- c++/src/CMakeLists.txt | 33 +- c++/test/CMakeLists.txt | 16 +- config/cmake/ConfigureChecks.cmake | 63 +-- config/cmake/H5cxx_config.h.in | 2 +- config/cmake/H5pubconf.h.in | 8 +- config/cmake/HDF5Macros.cmake | 4 +- config/cmake/HDF5UseFortran.cmake | 67 +-- config/cmake/HDFCompilerFlags.cmake | 46 +- config/cmake/UseJava.cmake | 8 +- config/cmake_ext_mod/ConfigureChecks.cmake | 83 --- config/cmake_ext_mod/HDFMacros.cmake | 40 +- config/cmake_ext_mod/HDFTests.c | 6 +- config/cmake_ext_mod/HDFUseCXX.cmake | 109 ++++ config/cmake_ext_mod/HDFUseFortran.cmake | 23 +- examples/CMakeLists.txt | 27 +- fortran/CMakeLists.txt | 2 +- fortran/examples/CMakeLists.txt | 148 +++-- fortran/src/CMakeLists.txt | 168 +++--- fortran/src/H5config_f.inc.cmake | 68 +-- fortran/src/H5fort_type_defines.h.cmake | 28 + fortran/test/CMakeLists.txt | 458 ++++++++++------ fortran/testpar/CMakeLists.txt | 37 +- hl/CMakeLists.txt | 9 +- hl/c++/CMakeLists.txt | 2 +- hl/c++/examples/CMakeLists.txt | 14 +- hl/c++/src/CMakeLists.txt | 31 +- hl/c++/test/CMakeLists.txt | 22 +- hl/examples/CMakeLists.txt | 7 +- hl/fortran/CMakeLists.txt | 2 +- hl/fortran/examples/CMakeLists.txt | 44 +- hl/fortran/src/CMakeLists.txt | 159 +++--- hl/fortran/test/CMakeLists.txt | 135 +++-- hl/fortran/test/CMakeTests.cmake | 167 ++---- hl/src/CMakeLists.txt | 29 +- hl/test/CMakeLists.txt | 30 +- hl/tools/CMakeLists.txt | 2 +- hl/tools/gif2h5/CMakeLists.txt | 20 +- hl/tools/h5watch/CMakeLists.txt | 28 +- java/CMakeLists.txt | 9 +- java/examples/CMakeLists.txt | 2 +- java/examples/datasets/CMakeLists.txt | 47 +- java/examples/datatypes/CMakeLists.txt | 7 +- java/examples/groups/CMakeLists.txt | 7 +- java/examples/intro/CMakeLists.txt | 7 +- java/src/CMakeLists.txt | 2 +- java/src/hdf/CMakeLists.txt | 2 +- java/src/hdf/hdf5lib/CMakeLists.txt | 9 +- java/src/hdf/hdf5lib/H5.java | 158 +++++- java/src/jni/CMakeLists.txt | 7 +- java/test/CMakeLists.txt | 204 +++---- java/test/JUnit-interface.ert | 2 - java/test/JUnit-interface.txt | 671 ----------------------- java/test/JUnit-unit.txt | 617 --------------------- java/test/Makefile.am | 20 +- java/test/TestH5A.java | 2 +- java/test/TestH5D.java | 2 +- java/test/TestH5Dplist.java | 2 +- java/test/TestH5E.java | 15 +- java/test/TestH5F.java | 2 +- java/test/TestH5Fbasic.java | 4 +- java/test/TestH5G.java | 4 +- java/test/TestH5Gbasic.java | 2 +- java/test/TestH5Lbasic.java | 2 +- java/test/TestH5Lcreate.java | 4 +- java/test/TestH5Obasic.java | 2 +- java/test/TestH5Ocreate.java | 4 +- java/test/TestH5P.java | 2 +- java/test/TestH5PData.java | 2 +- java/test/TestH5Pfapl.java | 8 +- java/test/TestH5T.java | 2 +- java/test/TestUnit.java | 36 -- java/test/junit.sh.in | 749 +++++++++++++++++++++++++- java/test/testfiles/JUnit-TestH5.txt | 15 + java/test/testfiles/JUnit-TestH5A.txt | 34 ++ java/test/testfiles/JUnit-TestH5D.txt | 25 + java/test/testfiles/JUnit-TestH5Dparams.txt | 26 + java/test/testfiles/JUnit-TestH5Dplist.txt | 7 + java/test/testfiles/JUnit-TestH5E.txt | 11 + java/test/testfiles/JUnit-TestH5Edefault.txt | 54 ++ java/test/testfiles/JUnit-TestH5Eparams.txt | 19 + java/test/testfiles/JUnit-TestH5Eregister.txt | 11 + java/test/testfiles/JUnit-TestH5F.txt | 14 + java/test/testfiles/JUnit-TestH5Fbasic.txt | 21 + java/test/testfiles/JUnit-TestH5Fparams.txt | 17 + java/test/testfiles/JUnit-TestH5Fswmr.txt | 8 + java/test/testfiles/JUnit-TestH5G.txt | 17 + java/test/testfiles/JUnit-TestH5Gbasic.txt | 33 ++ java/test/testfiles/JUnit-TestH5Giterate.txt | 7 + java/test/testfiles/JUnit-TestH5Lbasic.txt | 23 + java/test/testfiles/JUnit-TestH5Lcreate.txt | 42 ++ java/test/testfiles/JUnit-TestH5Lparams.txt | 44 ++ java/test/testfiles/JUnit-TestH5Obasic.txt | 29 + java/test/testfiles/JUnit-TestH5Ocopy.txt | 9 + java/test/testfiles/JUnit-TestH5Ocreate.txt | 21 + java/test/testfiles/JUnit-TestH5Oparams.txt | 30 ++ java/test/testfiles/JUnit-TestH5P.txt | 91 ++++ java/test/testfiles/JUnit-TestH5PData.txt | 8 + java/test/testfiles/JUnit-TestH5PL.txt | 8 + java/test/testfiles/JUnit-TestH5Pfapl.txt | 41 ++ java/test/testfiles/JUnit-TestH5Plist.txt | 10 + java/test/testfiles/JUnit-TestH5Pvirtual.txt | 17 + java/test/testfiles/JUnit-TestH5R.txt | 23 + java/test/testfiles/JUnit-TestH5S.txt | 29 + java/test/testfiles/JUnit-TestH5Sbasic.txt | 22 + java/test/testfiles/JUnit-TestH5T.txt | 19 + java/test/testfiles/JUnit-TestH5Tbasic.txt | 11 + java/test/testfiles/JUnit-TestH5Tparams.txt | 76 +++ java/test/testfiles/JUnit-TestH5Z.txt | 9 + release_docs/RELEASE.txt | 24 +- release_docs/USING_HDF5_CMake.txt | 4 +- src/CMakeLists.txt | 124 ++--- src/H5detect.c | 40 +- test/CMakeLists.txt | 161 +++--- test/CMakeTests.cmake | 5 +- testpar/CMakeLists.txt | 33 +- tools/CMakeLists.txt | 12 +- tools/lib/CMakeLists.txt | 54 +- tools/src/CMakeLists.txt | 7 +- tools/src/h5copy/CMakeLists.txt | 17 +- tools/src/h5diff/CMakeLists.txt | 22 +- tools/src/h5dump/CMakeLists.txt | 17 +- tools/src/h5format_convert/CMakeLists.txt | 12 +- tools/src/h5import/CMakeLists.txt | 12 +- tools/src/h5jam/CMakeLists.txt | 17 +- tools/src/h5jam/h5jam.c | 43 +- tools/src/h5jam/h5unjam.c | 17 +- tools/src/h5ls/CMakeLists.txt | 17 +- tools/src/h5repack/CMakeLists.txt | 18 +- tools/src/h5stat/CMakeLists.txt | 17 +- tools/src/misc/CMakeLists.txt | 27 +- tools/test/CMakeLists.txt | 7 +- tools/test/h5copy/CMakeLists.txt | 20 +- tools/test/h5diff/CMakeLists.txt | 35 +- tools/test/h5dump/CMakeLists.txt | 81 ++- tools/test/h5format_convert/CMakeLists.txt | 39 +- tools/test/h5import/CMakeLists.txt | 24 +- tools/test/h5jam/CMakeLists.txt | 40 +- tools/test/h5ls/CMakeLists.txt | 56 +- tools/test/h5repack/CMakeLists.txt | 97 ++-- tools/test/h5stat/CMakeLists.txt | 30 +- tools/test/h5stat/CMakeTests.cmake | 6 + tools/test/misc/CMakeLists.txt | 79 ++- tools/test/misc/h5clear_gentest.c | 1 - tools/test/misc/vds/CMakeLists.txt | 12 +- tools/test/perform/CMakeLists.txt | 70 ++- 150 files changed, 3727 insertions(+), 3326 deletions(-) create mode 100644 config/cmake_ext_mod/HDFUseCXX.cmake create mode 100644 fortran/src/H5fort_type_defines.h.cmake delete mode 100644 java/test/JUnit-interface.ert delete mode 100644 java/test/JUnit-interface.txt delete mode 100644 java/test/JUnit-unit.txt delete mode 100644 java/test/TestUnit.java create mode 100644 java/test/testfiles/JUnit-TestH5.txt create mode 100644 java/test/testfiles/JUnit-TestH5A.txt create mode 100644 java/test/testfiles/JUnit-TestH5D.txt create mode 100644 java/test/testfiles/JUnit-TestH5Dparams.txt create mode 100644 java/test/testfiles/JUnit-TestH5Dplist.txt create mode 100644 java/test/testfiles/JUnit-TestH5E.txt create mode 100644 java/test/testfiles/JUnit-TestH5Edefault.txt create mode 100644 java/test/testfiles/JUnit-TestH5Eparams.txt create mode 100644 java/test/testfiles/JUnit-TestH5Eregister.txt create mode 100644 java/test/testfiles/JUnit-TestH5F.txt create mode 100644 java/test/testfiles/JUnit-TestH5Fbasic.txt create mode 100644 java/test/testfiles/JUnit-TestH5Fparams.txt create mode 100644 java/test/testfiles/JUnit-TestH5Fswmr.txt create mode 100644 java/test/testfiles/JUnit-TestH5G.txt create mode 100644 java/test/testfiles/JUnit-TestH5Gbasic.txt create mode 100644 java/test/testfiles/JUnit-TestH5Giterate.txt create mode 100644 java/test/testfiles/JUnit-TestH5Lbasic.txt create mode 100644 java/test/testfiles/JUnit-TestH5Lcreate.txt create mode 100644 java/test/testfiles/JUnit-TestH5Lparams.txt create mode 100644 java/test/testfiles/JUnit-TestH5Obasic.txt create mode 100644 java/test/testfiles/JUnit-TestH5Ocopy.txt create mode 100644 java/test/testfiles/JUnit-TestH5Ocreate.txt create mode 100644 java/test/testfiles/JUnit-TestH5Oparams.txt create mode 100644 java/test/testfiles/JUnit-TestH5P.txt create mode 100644 java/test/testfiles/JUnit-TestH5PData.txt create mode 100644 java/test/testfiles/JUnit-TestH5PL.txt create mode 100644 java/test/testfiles/JUnit-TestH5Pfapl.txt create mode 100644 java/test/testfiles/JUnit-TestH5Plist.txt create mode 100644 java/test/testfiles/JUnit-TestH5Pvirtual.txt create mode 100644 java/test/testfiles/JUnit-TestH5R.txt create mode 100644 java/test/testfiles/JUnit-TestH5S.txt create mode 100644 java/test/testfiles/JUnit-TestH5Sbasic.txt create mode 100644 java/test/testfiles/JUnit-TestH5T.txt create mode 100644 java/test/testfiles/JUnit-TestH5Tbasic.txt create mode 100644 java/test/testfiles/JUnit-TestH5Tparams.txt create mode 100644 java/test/testfiles/JUnit-TestH5Z.txt diff --git a/CMakeInstallation.cmake b/CMakeInstallation.cmake index 4a09d2d..622f0cf 100644 --- a/CMakeInstallation.cmake +++ b/CMakeInstallation.cmake @@ -23,16 +23,6 @@ if (WIN32) find_program (WIX_EXECUTABLE candle PATHS "${CPACK_WIX_ROOT}/bin") endif () -#----------------------------------------------------------------------------- -# Add file(s) to CMake Install -#----------------------------------------------------------------------------- -if (NOT HDF5_INSTALL_NO_DEVELOPMENT) - install ( - FILES ${PROJECT_BINARY_DIR}/H5pubconf.h - DESTINATION ${HDF5_INSTALL_INCLUDE_DIR} - COMPONENT headers - ) -endif () #----------------------------------------------------------------------------- # Add Target(s) to CMake Install for import into other projects diff --git a/CMakeLists.txt b/CMakeLists.txt index 0da475a..f24a957 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,5 +1,5 @@ cmake_minimum_required (VERSION 3.10) -PROJECT (HDF5 C CXX) +project (HDF5 C) #----------------------------------------------------------------------------- # Instructions for use : Normal Build @@ -522,22 +522,12 @@ option (HDF5_BUILD_GENERATORS "Build Test Generators" OFF) option (HDF5_ENABLE_TRACE "Enable API tracing capability" OFF) mark_as_advanced (HDF5_ENABLE_TRACE) if (${HDF_CFG_NAME} MATCHES "Debug") - add_definitions (-DDEBUG) - # Enable tracing of the API - if (HDF5_ENABLE_TRACE) - add_definitions (-DH5_DEBUG_API ) - endif () # Enable instrumenting of the library's internal operations option (HDF5_ENABLE_INSTRUMENT "Instrument The library" OFF) if (HDF5_ENABLE_INSTRUMENT) set (H5_HAVE_INSTRUMENTED_LIBRARY 1) endif () mark_as_advanced (HDF5_ENABLE_INSTRUMENT) -else () - add_definitions (-DNDEBUG) - if (HDF5_ENABLE_TRACE) - add_definitions (-DH5_DEBUG_API ) - endif () endif () #----------------------------------------------------------------------------- @@ -555,11 +545,6 @@ endif () include (${HDF_RESOURCES_DIR}/HDFCompilerFlags.cmake) #----------------------------------------------------------------------------- -# All libs/tests/examples need the main include directories -#----------------------------------------------------------------------------- -INCLUDE_DIRECTORIES (${HDF5_BINARY_DIR} ${HDF5_SRC_DIR} ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}) - -#----------------------------------------------------------------------------- # Option to Enable MPI Parallel #----------------------------------------------------------------------------- set (CMAKE_MODULE_PATH ${HDF_RESOURCES_DIR} ${HDF_RESOURCES_EXT_DIR} ${CMAKE_MODULE_PATH}) @@ -574,7 +559,6 @@ if (HDF5_ENABLE_PARALLEL) # Used by Fortran + MPI CHECK_SYMBOL_EXISTS (MPI_Comm_c2f "${MPI_C_INCLUDE_DIRS}/mpi.h" H5_HAVE_MPI_MULTI_LANG_Comm) CHECK_SYMBOL_EXISTS (MPI_Info_c2f "${MPI_C_INCLUDE_DIRS}/mpi.h" H5_HAVE_MPI_MULTI_LANG_Info) - INCLUDE_DIRECTORIES (${MPI_C_INCLUDE_DIRS}) else () message (STATUS "Parallel libraries not found") endif () @@ -839,6 +823,9 @@ if (EXISTS "${HDF5_SOURCE_DIR}/c++" AND IS_DIRECTORY "${HDF5_SOURCE_DIR}/c++") message (STATUS " **** Allowing unsupported Parallel and C++ options **** ") endif () endif () + + include (${HDF_RESOURCES_EXT_DIR}/HDFUseCXX.cmake) + if (CMAKE_NO_STD_NAMESPACE) set (H5_NO_STD 1) endif () @@ -857,7 +844,7 @@ endif () # being built then configure should fail due to bug HDFFV-889. #----------------------------------------------------------------------------- if (HDF5_BUILD_FORTRAN AND HDF5_BUILD_HL_LIB) - if (NOT FORTRAN_DEFAULT_REAL_NOT_DOUBLE) + if (NOT H5_FORTRAN_DEFAULT_REAL_NOT_DOUBLE) message (FATAL_ERROR " **** Fortran high-level routines are not supported when the default REAL is DOUBLE PRECISION, use HDF5_BUILD_HL_LIB:BOOL=OFF **** ") endif () endif () diff --git a/MANIFEST b/MANIFEST index 40b327c..5cb7666 100644 --- a/MANIFEST +++ b/MANIFEST @@ -234,6 +234,7 @@ ./fortran/src/H5Zff.F90 ./fortran/src/H5config_f.inc.cmake ./fortran/src/H5config_f.inc.in +./fortran/src/H5fort_type_defines.h.cmake ./fortran/src/H5fort_type_defines.h.in ./fortran/src/H5f90.h ./fortran/src/H5f90global.F90 @@ -3044,9 +3045,42 @@ ./java/test/Makefile.am ./java/test/CMakeLists.txt ./java/test/junit.sh.in -./java/test/JUnit-interface.txt -./java/test/JUnit-unit.txt -./java/test/JUnit-interface.ert +./java/test/testfiles/JUnit-TestH5.txt +./java/test/testfiles/JUnit-TestH5A.txt +./java/test/testfiles/JUnit-TestH5Dparams.txt +./java/test/testfiles/JUnit-TestH5D.txt +./java/test/testfiles/JUnit-TestH5Dplist.txt +./java/test/testfiles/JUnit-TestH5E.txt +./java/test/testfiles/JUnit-TestH5Edefault.txt +./java/test/testfiles/JUnit-TestH5Eparams.txt +./java/test/testfiles/JUnit-TestH5Eregister.txt +./java/test/testfiles/JUnit-TestH5Fparams.txt +./java/test/testfiles/JUnit-TestH5Fbasic.txt +./java/test/testfiles/JUnit-TestH5F.txt +./java/test/testfiles/JUnit-TestH5Fswmr.txt +./java/test/testfiles/JUnit-TestH5Gbasic.txt +./java/test/testfiles/JUnit-TestH5G.txt +./java/test/testfiles/JUnit-TestH5Giterate.txt +./java/test/testfiles/JUnit-TestH5Lparams.txt +./java/test/testfiles/JUnit-TestH5Lbasic.txt +./java/test/testfiles/JUnit-TestH5Lcreate.txt +./java/test/testfiles/JUnit-TestH5Oparams.txt +./java/test/testfiles/JUnit-TestH5Obasic.txt +./java/test/testfiles/JUnit-TestH5Ocreate.txt +./java/test/testfiles/JUnit-TestH5Ocopy.txt +./java/test/testfiles/JUnit-TestH5P.txt +./java/test/testfiles/JUnit-TestH5PData.txt +./java/test/testfiles/JUnit-TestH5Pfapl.txt +./java/test/testfiles/JUnit-TestH5Plist.txt +./java/test/testfiles/JUnit-TestH5Pvirtual.txt +./java/test/testfiles/JUnit-TestH5PL.txt +./java/test/testfiles/JUnit-TestH5R.txt +./java/test/testfiles/JUnit-TestH5Sbasic.txt +./java/test/testfiles/JUnit-TestH5S.txt +./java/test/testfiles/JUnit-TestH5Tparams.txt +./java/test/testfiles/JUnit-TestH5Tbasic.txt +./java/test/testfiles/JUnit-TestH5T.txt +./java/test/testfiles/JUnit-TestH5Z.txt ./java/test/h5ex_g_iterate.orig ./java/test/TestH5.java ./java/test/TestH5A.java @@ -3085,7 +3119,6 @@ ./java/test/TestH5T.java ./java/test/TestH5Z.java ./java/test/TestAll.java -./java/test/TestUnit.java ./java/lib/hamcrest-core.jar ./java/lib/junit.jar @@ -3137,6 +3170,7 @@ ./config/cmake_ext_mod/HDFLibMacros.cmake ./config/cmake_ext_mod/HDFMacros.cmake ./config/cmake_ext_mod/HDFTests.c +./config/cmake_ext_mod/HDFUseCXX.cmake ./config/cmake_ext_mod/HDFUseFortran.cmake ./config/cmake_ext_mod/NSIS.InstallOptions.ini.in ./config/cmake_ext_mod/NSIS.template.in diff --git a/c++/CMakeLists.txt b/c++/CMakeLists.txt index 2c161f1..80bd810 100644 --- a/c++/CMakeLists.txt +++ b/c++/CMakeLists.txt @@ -1,31 +1,5 @@ cmake_minimum_required (VERSION 3.10) -PROJECT (HDF5_CPP) - -#----------------------------------------------------------------------------- -# Apply Definitions to compiler in this directory and below -#----------------------------------------------------------------------------- -add_definitions (${HDF_EXTRA_C_FLAGS}) - -#----------------------------------------------------------------------------- -# Generate configure file -#----------------------------------------------------------------------------- -configure_file (${HDF_RESOURCES_DIR}/H5cxx_config.h.in - ${HDF5_BINARY_DIR}/H5cxx_pubconf.h -) - -#----------------------------------------------------------------------------- -# Setup Include directories -#----------------------------------------------------------------------------- -INCLUDE_DIRECTORIES (${HDF5_CPP_SOURCE_DIR}/src) -INCLUDE_DIRECTORIES (${HDF5_BINARY_DIR}) - -#----------------------------------------------------------------------------- -# Parallel/MPI, prevent spurious cpp/cxx warnings -#----------------------------------------------------------------------------- -if (H5_HAVE_PARALLEL) - add_definitions ("-DMPICH_SKIP_MPICXX") - add_definitions ("-DMPICH_IGNORE_CXX_SEEK") -endif () +project (HDF5_CPP CXX) add_subdirectory (src) diff --git a/c++/examples/CMakeLists.txt b/c++/examples/CMakeLists.txt index 22ecb19..d3a18f2 100644 --- a/c++/examples/CMakeLists.txt +++ b/c++/examples/CMakeLists.txt @@ -1,5 +1,5 @@ cmake_minimum_required (VERSION 3.10) -PROJECT (HDF5_CPP_EXAMPLES) +project (HDF5_CPP_EXAMPLES CXX) # -------------------------------------------------------------------- # Notes: When creating examples they should be prefixed @@ -34,15 +34,17 @@ set (tutr_examples foreach (example ${examples}) add_executable (cpp_ex_${example} ${HDF5_CPP_EXAMPLES_SOURCE_DIR}/${example}.cpp) - TARGET_C_PROPERTIES (cpp_ex_${example} STATIC " " " ") - target_link_libraries (cpp_ex_${example} ${HDF5_CPP_LIB_TARGET} ${HDF5_LIB_TARGET}) + target_include_directories(cpp_ex_${example} PRIVATE "${HDF5_SRC_DIR};${HDF5_BINARY_DIR};$<$:${MPI_C_INCLUDE_DIRS}>") + TARGET_C_PROPERTIES (cpp_ex_${example} STATIC) + target_link_libraries (cpp_ex_${example} PRIVATE ${HDF5_CPP_LIB_TARGET} ${HDF5_LIB_TARGET}) set_target_properties (cpp_ex_${example} PROPERTIES FOLDER examples/cpp) endforeach () foreach (example ${tutr_examples}) add_executable (cpp_ex_${example} ${HDF5_CPP_EXAMPLES_SOURCE_DIR}/${example}.cpp) - TARGET_C_PROPERTIES (cpp_ex_${example} STATIC " " " ") - target_link_libraries (cpp_ex_${example} ${HDF5_CPP_LIB_TARGET} ${HDF5_LIB_TARGET}) + target_include_directories(cpp_ex_${example} PRIVATE "${HDF5_SRC_DIR};${HDF5_BINARY_DIR};$<$:${MPI_C_INCLUDE_DIRS}>") + TARGET_C_PROPERTIES (cpp_ex_${example} STATIC) + target_link_libraries (cpp_ex_${example} PRIVATE ${HDF5_CPP_LIB_TARGET} ${HDF5_LIB_TARGET}) set_target_properties (cpp_ex_${example} PROPERTIES FOLDER examples/cpp) endforeach () diff --git a/c++/src/CMakeLists.txt b/c++/src/CMakeLists.txt index 35e7590..27b71b0 100644 --- a/c++/src/CMakeLists.txt +++ b/c++/src/CMakeLists.txt @@ -1,5 +1,5 @@ cmake_minimum_required (VERSION 3.10) -PROJECT (HDF5_CPP_SRC) +project (HDF5_CPP_SRC CXX) #----------------------------------------------------------------------------- # Generate configure file @@ -83,28 +83,35 @@ set (CPP_HDRS ) add_library (${HDF5_CPP_LIB_TARGET} STATIC ${CPP_SOURCES} ${CPP_HDRS}) -TARGET_C_PROPERTIES (${HDF5_CPP_LIB_TARGET} STATIC " " " ") +target_include_directories(${HDF5_CPP_LIB_TARGET} + PRIVATE "${HDF5_SRC_DIR};${HDF5_BINARY_DIR};$<$:${MPI_C_INCLUDE_DIRS}>" + INTERFACE "$/include>" +) +target_compile_definitions(${HDF5_CPP_LIB_TARGET} + PRIVATE $<$:MPICH_SKIP_MPICXX;MPICH_IGNORE_CXX_SEEK># Parallel/MPI, prevent spurious cpp/cxx warnings +) +TARGET_C_PROPERTIES (${HDF5_CPP_LIB_TARGET} STATIC) target_link_libraries (${HDF5_CPP_LIB_TARGET} PUBLIC ${HDF5_LIB_TARGET}) set_global_variable (HDF5_LIBRARIES_TO_EXPORT "${HDF5_LIBRARIES_TO_EXPORT};${HDF5_CPP_LIB_TARGET}") H5_SET_LIB_OPTIONS (${HDF5_CPP_LIB_TARGET} ${HDF5_CPP_LIB_NAME} STATIC 0) -set_target_properties (${HDF5_CPP_LIB_TARGET} PROPERTIES - FOLDER libraries/cpp - INTERFACE_INCLUDE_DIRECTORIES "$/include>" -) +set_target_properties (${HDF5_CPP_LIB_TARGET} PROPERTIES FOLDER libraries/cpp) set (install_targets ${HDF5_CPP_LIB_TARGET}) if (BUILD_SHARED_LIBS) add_library (${HDF5_CPP_LIBSH_TARGET} SHARED ${CPP_SOURCES} ${CPP_HDRS}) - TARGET_C_PROPERTIES (${HDF5_CPP_LIBSH_TARGET} SHARED " " " ") + target_include_directories(${HDF5_CPP_LIBSH_TARGET} + PRIVATE "${HDF5_SRC_DIR};${HDF5_BINARY_DIR};$<$:${MPI_C_INCLUDE_DIRS}>" + INTERFACE "$/include>" + ) + target_compile_definitions(${HDF5_CPP_LIBSH_TARGET} + PUBLIC "H5_BUILT_AS_DYNAMIC_LIB" + PRIVATE $<$:MPICH_SKIP_MPICXX;MPICH_IGNORE_CXX_SEEK># Parallel/MPI, prevent spurious cpp/cxx warnings + ) + TARGET_C_PROPERTIES (${HDF5_CPP_LIBSH_TARGET} SHARED) target_link_libraries (${HDF5_CPP_LIBSH_TARGET} PUBLIC ${HDF5_LIBSH_TARGET}) set_global_variable (HDF5_LIBRARIES_TO_EXPORT "${HDF5_LIBRARIES_TO_EXPORT};${HDF5_CPP_LIBSH_TARGET}") H5_SET_LIB_OPTIONS (${HDF5_CPP_LIBSH_TARGET} ${HDF5_CPP_LIB_NAME} SHARED "CXX") - set_target_properties (${HDF5_CPP_LIBSH_TARGET} PROPERTIES - FOLDER libraries/cpp - COMPILE_DEFINITIONS "H5_BUILT_AS_DYNAMIC_LIB" - INTERFACE_INCLUDE_DIRECTORIES "$/include>" - INTERFACE_COMPILE_DEFINITIONS H5_BUILT_AS_DYNAMIC_LIB=1 - ) + set_target_properties (${HDF5_CPP_LIBSH_TARGET} PROPERTIES FOLDER libraries/cpp) set (install_targets ${install_targets} ${HDF5_CPP_LIBSH_TARGET}) endif () diff --git a/c++/test/CMakeLists.txt b/c++/test/CMakeLists.txt index b4fb0fc..8e2d685 100644 --- a/c++/test/CMakeLists.txt +++ b/c++/test/CMakeLists.txt @@ -1,5 +1,6 @@ cmake_minimum_required (VERSION 3.10) -PROJECT (HDF5_CPP_TEST) +project (HDF5_CPP_TEST CXX) + # -------------------------------------------------------------------- # Notes: When creating unit test executables they should be prefixed # with "cpp_". This allows for easier filtering of the test suite when @@ -37,15 +38,16 @@ set (srcdir ${CMAKE_CURRENT_SOURCE_DIR}) configure_file (${HDF5_CPP_TEST_SOURCE_DIR}/H5srcdir_str.h.in H5srcdir_str.h @ONLY) add_executable (cpp_testhdf5 ${CPP_TEST_SOURCES} ) -TARGET_C_PROPERTIES (cpp_testhdf5 STATIC " " " ") -target_link_libraries (cpp_testhdf5 +target_include_directories(cpp_testhdf5 PRIVATE "${HDF5_SRC_DIR};${HDF5_BINARY_DIR};${HDF5_TEST_BINARY_DIR};$<$:${MPI_C_INCLUDE_DIRS}>") +target_compile_definitions(cpp_testhdf5 + PRIVATE $<$:MPICH_SKIP_MPICXX;MPICH_IGNORE_CXX_SEEK># Parallel/MPI, prevent spurious cpp/cxx warnings +) +TARGET_C_PROPERTIES (cpp_testhdf5 STATIC) +target_link_libraries (cpp_testhdf5 PRIVATE ${HDF5_CPP_LIB_TARGET} ${HDF5_LIB_TARGET} ${HDF5_TEST_LIB_TARGET} ) -set_target_properties (cpp_testhdf5 PROPERTIES - FOLDER test/cpp - INTERFACE_INCLUDE_DIRECTORIES "$/include>" -) +set_target_properties (cpp_testhdf5 PROPERTIES FOLDER test/cpp) include (CMakeTests.cmake) diff --git a/config/cmake/ConfigureChecks.cmake b/config/cmake/ConfigureChecks.cmake index 7d73c09..0d955d0 100644 --- a/config/cmake/ConfigureChecks.cmake +++ b/config/cmake/ConfigureChecks.cmake @@ -16,7 +16,7 @@ set (HDF_PREFIX "H5") include (${HDF_RESOURCES_EXT_DIR}/ConfigureChecks.cmake) if (HDF5_ENABLE_USING_MEMCHECKER) - set (H5_USING_MEMCHECKER 1) + set (${HDF_PREFIX}_USING_MEMCHECKER 1) endif () #----------------------------------------------------------------------------- @@ -24,7 +24,7 @@ endif () #----------------------------------------------------------------------------- option (HDF5_STRICT_FORMAT_CHECKS "Whether to perform strict file format checks" OFF) if (HDF5_STRICT_FORMAT_CHECKS) - set (H5_STRICT_FORMAT_CHECKS 1) + set (${HDF_PREFIX}_STRICT_FORMAT_CHECKS 1) endif () MARK_AS_ADVANCED (HDF5_STRICT_FORMAT_CHECKS) @@ -33,7 +33,7 @@ MARK_AS_ADVANCED (HDF5_STRICT_FORMAT_CHECKS) #----------------------------------------------------------------------------- option (HDF5_METADATA_TRACE_FILE "Enable metadata trace file collection" OFF) if (HDF5_METADATA_TRACE_FILE) - set (H5_METADATA_TRACE_FILE 1) + set (${HDF_PREFIX}_METADATA_TRACE_FILE 1) endif () MARK_AS_ADVANCED (HDF5_METADATA_TRACE_FILE) @@ -45,7 +45,7 @@ MARK_AS_ADVANCED (HDF5_METADATA_TRACE_FILE) # option (HDF5_WANT_DATA_ACCURACY "IF data accuracy is guaranteed during data conversions" ON) if (HDF5_WANT_DATA_ACCURACY) - set (H5_WANT_DATA_ACCURACY 1) + set (${HDF_PREFIX}_WANT_DATA_ACCURACY 1) endif () MARK_AS_ADVANCED (HDF5_WANT_DATA_ACCURACY) @@ -57,7 +57,7 @@ MARK_AS_ADVANCED (HDF5_WANT_DATA_ACCURACY) # option (HDF5_WANT_DCONV_EXCEPTION "exception handling functions is checked during data conversions" ON) if (HDF5_WANT_DCONV_EXCEPTION) - set (H5_WANT_DCONV_EXCEPTION 1) + set (${HDF_PREFIX}_WANT_DCONV_EXCEPTION 1) endif () MARK_AS_ADVANCED (HDF5_WANT_DCONV_EXCEPTION) @@ -66,7 +66,7 @@ MARK_AS_ADVANCED (HDF5_WANT_DCONV_EXCEPTION) # option (HDF5_ENABLE_CODESTACK "Enable the function stack tracing (for developer debugging)." OFF) if (HDF5_ENABLE_CODESTACK) - set (H5_HAVE_CODESTACK 1) + set (${HDF_PREFIX}_HAVE_CODESTACK 1) endif () MARK_AS_ADVANCED (HDF5_ENABLE_CODESTACK) @@ -79,36 +79,36 @@ if (HDF5_ENABLE_HSIZET) endif () # so far we have no check for this -set (H5_HAVE_TMPFILE 1) +set (${HDF_PREFIX}_HAVE_TMPFILE 1) # TODO -------------------------------------------------------------------------- # Should the Default Virtual File Driver be compiled? # This is hard-coded now but option should added to match configure # -set (H5_DEFAULT_VFD H5FD_SEC2) +set (${HDF_PREFIX}_DEFAULT_VFD H5FD_SEC2) -if (NOT DEFINED "H5_DEFAULT_PLUGINDIR") +if (NOT DEFINED "${HDF_PREFIX}_DEFAULT_PLUGINDIR") if (WINDOWS) - set (H5_DEFAULT_PLUGINDIR "%ALLUSERSPROFILE%\\\\hdf5\\\\lib\\\\plugin") + set (${HDF_PREFIX}_DEFAULT_PLUGINDIR "%ALLUSERSPROFILE%\\\\hdf5\\\\lib\\\\plugin") else () - set (H5_DEFAULT_PLUGINDIR "/usr/local/hdf5/lib/plugin") + set (${HDF_PREFIX}_DEFAULT_PLUGINDIR "/usr/local/hdf5/lib/plugin") endif () endif () if (WINDOWS) - set (H5_HAVE_WINDOWS 1) + set (${HDF_PREFIX}_HAVE_WINDOWS 1) # ---------------------------------------------------------------------- # Set the flag to indicate that the machine has window style pathname, # that is, "drive-letter:\" (e.g. "C:") or "drive-letter:/" (e.g. "C:/"). # (This flag should be _unset_ for all machines, except for Windows) - set (H5_HAVE_WINDOW_PATH 1) + set (${HDF_PREFIX}_HAVE_WINDOW_PATH 1) endif () # ---------------------------------------------------------------------- # END of WINDOWS Hard code Values # ---------------------------------------------------------------------- -CHECK_FUNCTION_EXISTS (difftime H5_HAVE_DIFFTIME) +CHECK_FUNCTION_EXISTS (difftime ${HDF_PREFIX}_HAVE_DIFFTIME) # Find the library containing clock_gettime() if (NOT WINDOWS) @@ -116,12 +116,12 @@ if (NOT WINDOWS) CHECK_LIBRARY_EXISTS (rt clock_gettime "" CLOCK_GETTIME_IN_LIBRT) CHECK_LIBRARY_EXISTS (posix4 clock_gettime "" CLOCK_GETTIME_IN_LIBPOSIX4) if (CLOCK_GETTIME_IN_LIBC) - set (H5_HAVE_CLOCK_GETTIME 1) + set (${HDF_PREFIX}_HAVE_CLOCK_GETTIME 1) elseif (CLOCK_GETTIME_IN_LIBRT) - set (H5_HAVE_CLOCK_GETTIME 1) + set (${HDF_PREFIX}_HAVE_CLOCK_GETTIME 1) list (APPEND LINK_LIBS rt) elseif (CLOCK_GETTIME_IN_LIBPOSIX4) - set (H5_HAVE_CLOCK_GETTIME 1) + set (${HDF_PREFIX}_HAVE_CLOCK_GETTIME 1) list (APPEND LINK_LIBS posix4) endif () endif () @@ -169,9 +169,9 @@ endif () CHECK_TYPE_SIZE("__float128" SIZEOF___FLOAT128) if (${HAVE_SIZEOF___FLOAT128}) - set (H5_HAVE_FLOAT128 1) + set (${HDF_PREFIX}_HAVE_FLOAT128 1) else () - set (H5_HAVE_FLOAT128 0) + set (${HDF_PREFIX}_HAVE_FLOAT128 0) set (SIZEOF___FLOAT128 0) endif () @@ -222,7 +222,7 @@ endmacro () # The machine's conversion gets the correct value. We define the macro and disable # this kind of test until we figure out what algorithm they use. # -H5ConversionTests (H5_LDOUBLE_TO_LONG_SPECIAL "Checking IF your system converts long double to (unsigned) long values with special algorithm") +H5ConversionTests (${HDF_PREFIX}_LDOUBLE_TO_LONG_SPECIAL "Checking IF your system converts long double to (unsigned) long values with special algorithm") # ---------------------------------------------------------------------- # Set the flag to indicate that the machine is using a special algorithm # to convert some values of '(unsigned) long' to 'long double' values. @@ -231,7 +231,7 @@ H5ConversionTests (H5_LDOUBLE_TO_LONG_SPECIAL "Checking IF your system converts # ..., 7fffff..., the compiler uses a unknown algorithm. We define a # macro and skip the test for now until we know about the algorithm. # -H5ConversionTests (H5_LONG_TO_LDOUBLE_SPECIAL "Checking IF your system can convert (unsigned) long to long double values with special algorithm") +H5ConversionTests (${HDF_PREFIX}_LONG_TO_LDOUBLE_SPECIAL "Checking IF your system can convert (unsigned) long to long double values with special algorithm") # ---------------------------------------------------------------------- # Set the flag to indicate that the machine can accurately convert # 'long double' to '(unsigned) long long' values. (This flag should be set for @@ -241,7 +241,7 @@ H5ConversionTests (H5_LONG_TO_LDOUBLE_SPECIAL "Checking IF your system can conve # 0x4351ccf385ebc8a0dfcc... or 0x4351ccf385ebc8a0ffcc... will make the converted # values wildly wrong. This test detects this wrong behavior and disable the test. # -H5ConversionTests (H5_LDOUBLE_TO_LLONG_ACCURATE "Checking IF correctly converting long double to (unsigned) long long values") +H5ConversionTests (${HDF_PREFIX}_LDOUBLE_TO_LLONG_ACCURATE "Checking IF correctly converting long double to (unsigned) long long values") # ---------------------------------------------------------------------- # Set the flag to indicate that the machine can accurately convert # '(unsigned) long long' to 'long double' values. (This flag should be set for @@ -249,23 +249,8 @@ H5ConversionTests (H5_LDOUBLE_TO_LLONG_ACCURATE "Checking IF correctly convertin # 007fff..., 00ffff..., 01ffff..., ..., 7fffff..., the converted values are twice # as big as they should be. # -H5ConversionTests (H5_LLONG_TO_LDOUBLE_CORRECT "Checking IF correctly converting (unsigned) long long to long double values") +H5ConversionTests (${HDF_PREFIX}_LLONG_TO_LDOUBLE_CORRECT "Checking IF correctly converting (unsigned) long long to long double values") # ---------------------------------------------------------------------- # Check if pointer alignments are enforced # -H5ConversionTests (H5_NO_ALIGNMENT_RESTRICTIONS "Checking IF alignment restrictions are strictly enforced") - -# ----------------------------------------------------------------------- -# wrapper script variables -# -set (prefix ${CMAKE_INSTALL_PREFIX}) -set (exec_prefix "\${prefix}") -set (libdir "${exec_prefix}/lib") -set (includedir "\${prefix}/include") -set (host_os ${CMAKE_HOST_SYSTEM_NAME}) -set (CC ${CMAKE_C_COMPILER}) -set (CXX ${CMAKE_CXX_COMPILER}) -set (FC ${CMAKE_Fortran_COMPILER}) -foreach (LINK_LIB ${LINK_LIBS}) - set (LIBS "${LIBS} -l${LINK_LIB}") -endforeach () +H5ConversionTests (${HDF_PREFIX}_NO_ALIGNMENT_RESTRICTIONS "Checking IF alignment restrictions are strictly enforced") diff --git a/config/cmake/H5cxx_config.h.in b/config/cmake/H5cxx_config.h.in index 82e85c6..d1dd42b 100644 --- a/config/cmake/H5cxx_config.h.in +++ b/config/cmake/H5cxx_config.h.in @@ -12,5 +12,5 @@ /* src/H5cxx_config.h.in Created manually. */ /* Define if offsetof extension is present */ -#cmakedefine HAVE_OFFSETOF ${HAVE_OFFSETOF} +#cmakedefine H5_HAVE_OFFSETOF ${H5_HAVE_OFFSETOF} diff --git a/config/cmake/H5pubconf.h.in b/config/cmake/H5pubconf.h.in index 8c01dba..e4c9a2e 100644 --- a/config/cmake/H5pubconf.h.in +++ b/config/cmake/H5pubconf.h.in @@ -53,10 +53,10 @@ #define @H5_FC_FUNC_@ /* Define if Fortran C_LONG_DOUBLE is different from C_DOUBLE */ -#cmakedefine H5_FORTRAN_C_LONG_DOUBLE_IS_UNIQUE @H5_FORTRAN_C_LONG_DOUBLE_IS_UNIQUE@ +#define H5_FORTRAN_C_LONG_DOUBLE_IS_UNIQUE @H5_FORTRAN_C_LONG_DOUBLE_IS_UNIQUE@ /* Define if we have Fortran C_LONG_DOUBLE */ -#cmakedefine H5_FORTRAN_HAVE_C_LONG_DOUBLE @H5_FORTRAN_HAVE_C_LONG_DOUBLE@ +#define H5_FORTRAN_HAVE_C_LONG_DOUBLE @H5_FORTRAN_HAVE_C_LONG_DOUBLE@ /* Define if we have Fortran intrinsic C_SIZEOF */ #cmakedefine H5_FORTRAN_HAVE_C_SIZEOF @H5_FORTRAN_HAVE_C_SIZEOF@ @@ -71,7 +71,7 @@ #cmakedefine H5_FORTRAN_SIZEOF_LONG_DOUBLE @H5_FORTRAN_SIZEOF_LONG_DOUBLE@ /* Define Fortran compiler ID */ -#cmakedefine H5_Fortran_COMPILER_ID @H5_Fortran_COMPILER_ID@ +#define H5_Fortran_COMPILER_ID @CMAKE_Fortran_COMPILER_ID@ /* Define valid Fortran INTEGER KINDs */ #cmakedefine H5_H5CONFIG_F_IKIND @H5_HH5_H5CONFIG_F_NUM_RKIND5CONFIG_F_IKIND@ @@ -509,7 +509,7 @@ #define H5_PACKAGE_VERSION "@HDF5_PACKAGE_VERSION_STRING@" /* Determine the maximum decimal precision in C */ -#define H5_PAC_C_MAX_REAL_PRECISION @H5_PAC_C_MAX_REAL_PRECISION@ +#cmakedefine 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@ diff --git a/config/cmake/HDF5Macros.cmake b/config/cmake/HDF5Macros.cmake index fe38b82..6c203e2 100644 --- a/config/cmake/HDF5Macros.cmake +++ b/config/cmake/HDF5Macros.cmake @@ -33,8 +33,10 @@ macro (H5_SET_LIB_OPTIONS libtarget libname libtype libpackage) if (APPLE) option (HDF5_BUILD_WITH_INSTALL_NAME "Build with library install_name set to the installation path" OFF) if (HDF5_BUILD_WITH_INSTALL_NAME) - set_target_properties (${libtarget} PROPERTIES + set_property(TARGET ${libtarget} APPEND PROPERTY LINK_FLAGS "-current_version ${HDF5_PACKAGE_VERSION} -compatibility_version ${HDF5_PACKAGE_VERSION}" + ) + set_target_properties (${libtarget} PROPERTIES INSTALL_NAME_DIR "${CMAKE_INSTALL_PREFIX}/lib" BUILD_WITH_INSTALL_RPATH ${HDF5_BUILD_WITH_INSTALL_NAME} ) diff --git a/config/cmake/HDF5UseFortran.cmake b/config/cmake/HDF5UseFortran.cmake index 3152aaa..0e948fe 100644 --- a/config/cmake/HDF5UseFortran.cmake +++ b/config/cmake/HDF5UseFortran.cmake @@ -10,22 +10,24 @@ # help@hdfgroup.org. # +# +# This file provides functions for HDF5 specific Fortran support. +# +#------------------------------------------------------------------------------- +ENABLE_LANGUAGE (Fortran) +set (HDF_PREFIX "H5") +include (CheckFortranFunctionExists) + ## Check for non-standard extenstion quadmath.h CHECK_INCLUDE_FILES(quadmath.h C_HAVE_QUADMATH) if (${C_HAVE_QUADMATH}) - set(HAVE_QUADMATH 1) + set(${HDF_PREFIX}_HAVE_QUADMATH 1) else () - set(HAVE_QUADMATH 0) + set(${HDF_PREFIX}_HAVE_QUADMATH 0) endif () -# -# This file provides functions for HDF5 specific Fortran support. -# -#------------------------------------------------------------------------------- -ENABLE_LANGUAGE (Fortran) - # The provided CMake Fortran macros don't provide a general compile/run function # so this one is used. #----------------------------------------------------------------------------- @@ -96,9 +98,9 @@ CHECK_FORTRAN_FEATURE(c_long_double ) if (${FORTRAN_HAVE_C_LONG_DOUBLE}) - set (FORTRAN_HAVE_C_LONG_DOUBLE 1) + set (${HDF_PREFIX}_FORTRAN_HAVE_C_LONG_DOUBLE 1) else () - set (FORTRAN_HAVE_C_LONG_DOUBLE 0) + set (${HDF_PREFIX}_FORTRAN_HAVE_C_LONG_DOUBLE 0) endif () # Check to see C_LONG_DOUBLE is different from C_DOUBLE @@ -109,17 +111,17 @@ CHECK_FORTRAN_FEATURE(c_long_double FORTRAN_C_LONG_DOUBLE_IS_UNIQUE ) if (${FORTRAN_C_LONG_DOUBLE_IS_UNIQUE}) - set (FORTRAN_C_LONG_DOUBLE_IS_UNIQUE 1) + set (${HDF_PREFIX}_FORTRAN_C_LONG_DOUBLE_IS_UNIQUE 1) else () - set (FORTRAN_C_LONG_DOUBLE_IS_UNIQUE 0) + set (${HDF_PREFIX}_FORTRAN_C_LONG_DOUBLE_IS_UNIQUE 0) endif () ## Set the sizeof function for use later in the fortran tests -if (FORTRAN_HAVE_STORAGE_SIZE) +if (${HDF_PREFIX}_FORTRAN_HAVE_STORAGE_SIZE) set (FC_SIZEOF_A "STORAGE_SIZE(a, c_size_t)/STORAGE_SIZE(c_char_'a',c_size_t)") set (FC_SIZEOF_B "STORAGE_SIZE(b, c_size_t)/STORAGE_SIZE(c_char_'a',c_size_t)") set (FC_SIZEOF_C "STORAGE_SIZE(c, c_size_t)/STORAGE_SIZE(c_char_'a',c_size_t)") -elseif (FORTRAN_HAVE_C_SIZEOF) +elseif (${HDF_PREFIX}_FORTRAN_HAVE_C_SIZEOF) set (FC_SIZEOF_A "SIZEOF(a)") set (FC_SIZEOF_B "SIZEOF(b)") set (FC_SIZEOF_C "SIZEOF(c)") @@ -151,7 +153,7 @@ string (REGEX REPLACE "\n" ";" PROG_OUTPUT "${PROG_OUTPUT}") list (GET PROG_OUTPUT 0 pac_validIntKinds) list (GET PROG_OUTPUT 1 pac_validRealKinds) -list (GET PROG_OUTPUT 2 H5_PAC_FC_MAX_REAL_PRECISION) +list (GET PROG_OUTPUT 2 ${HDF_PREFIX}_PAC_FC_MAX_REAL_PRECISION) # If the lists are empty then something went wrong. if (NOT pac_validIntKinds) @@ -160,7 +162,7 @@ endif () if (NOT pac_validRealKinds) message (FATAL_ERROR "Failed to find available REAL KINDs for Fortran") endif () -if (NOT H5_PAC_FC_MAX_REAL_PRECISION) +if (NOT ${HDF_PREFIX}_PAC_FC_MAX_REAL_PRECISION) message (FATAL_ERROR "No output from Fortran decimal precision program") endif () @@ -172,13 +174,13 @@ list (GET PROG_OUTPUT 4 NUM_RKIND) set (PAC_FORTRAN_NUM_INTEGER_KINDS "${NUM_IKIND}") -set (H5CONFIG_F_NUM_IKIND "INTEGER, PARAMETER :: num_ikinds = ${NUM_IKIND}") -set (H5CONFIG_F_IKIND "INTEGER, DIMENSION(1:num_ikinds) :: ikind = (/${pac_validIntKinds}/)") +set (${HDF_PREFIX}_H5CONFIG_F_NUM_IKIND "INTEGER, PARAMETER :: num_ikinds = ${NUM_IKIND}") +set (${HDF_PREFIX}_H5CONFIG_F_IKIND "INTEGER, DIMENSION(1:num_ikinds) :: ikind = (/${pac_validIntKinds}/)") message (STATUS "....NUMBER OF INTEGER KINDS FOUND ${PAC_FORTRAN_NUM_INTEGER_KINDS}") message (STATUS "....REAL KINDS FOUND ${PAC_FC_ALL_REAL_KINDS}") -message (STATUS "....INTEGER KINDS FOUND ${PAC_FC_ALL_REAL_KINDS}") -message (STATUS "....MAX DECIMAL PRECISION ${H5_PAC_FC_MAX_REAL_PRECISION}") +message (STATUS "....INTEGER KINDS FOUND ${PAC_FC_ALL_INTEGER_KINDS}") +message (STATUS "....MAX DECIMAL PRECISION ${${HDF_PREFIX}_PAC_FC_MAX_REAL_PRECISION}") #----------------------------------------------------------------------------- # Determine the available KINDs for REALs and INTEGERs @@ -263,7 +265,7 @@ string (REGEX REPLACE ",$" "" pack_real_sizeof "${pack_real_sizeof}") #Remove spaces string (REGEX REPLACE " " "" pack_real_sizeof "${pack_real_sizeof}") -set (H5CONFIG_F_RKIND_SIZEOF "INTEGER, DIMENSION(1:num_rkinds) :: rkind_sizeof = (/${pack_real_sizeof}/)") +set (${HDF_PREFIX}_H5CONFIG_F_RKIND_SIZEOF "INTEGER, DIMENSION(1:num_rkinds) :: rkind_sizeof = (/${pack_real_sizeof}/)") message (STATUS "....FOUND SIZEOF for REAL KINDs \{${pack_real_sizeof}\}") @@ -336,13 +338,12 @@ if (NOT PAC_FORTRAN_NATIVE_DOUBLE_KIND) endif () -set (FORTRAN_SIZEOF_LONG_DOUBLE ${${HDF_PREFIX}_SIZEOF_LONG_DOUBLE}) -#set (H5_SIZEOF_LONG_DOUBLE ${${HDF_PREFIX}_SIZEOF_LONG_DOUBLE}) +set (${HDF_PREFIX}_FORTRAN_SIZEOF_LONG_DOUBLE ${${HDF_PREFIX}_SIZEOF_LONG_DOUBLE}) # remove the invalid kind from the list if (NOT(${SIZEOF___FLOAT128} EQUAL 0)) if (NOT(${SIZEOF___FLOAT128} EQUAL ${max_real_fortran_sizeof}) - AND NOT(${FORTRAN_SIZEOF_LONG_DOUBLE} EQUAL ${max_real_fortran_sizeof}) + AND NOT(${${HDF_PREFIX}_FORTRAN_SIZEOF_LONG_DOUBLE} EQUAL ${max_real_fortran_sizeof}) # account for the fact that the C compiler can have 16-byte __float128 and the fortran compiler only has 8-byte doubles, # so we don't want to remove the 8-byte fortran doubles. AND NOT(${PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF} EQUAL ${max_real_fortran_sizeof})) @@ -355,15 +356,15 @@ if (NOT(${SIZEOF___FLOAT128} EQUAL 0)) endif () endif () -set (H5CONFIG_F_NUM_RKIND "INTEGER, PARAMETER :: num_rkinds = ${NUM_RKIND}") +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 (H5CONFIG_F_RKIND "INTEGER, DIMENSION(1:num_rkinds) :: rkind = (/${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 (H5CONFIG_F_RKIND_SIZEOF "INTEGER, DIMENSION(1:num_rkinds) :: rkind_sizeof = (/${OUT_VAR}/)") +set (${HDF_PREFIX}_H5CONFIG_F_RKIND_SIZEOF "INTEGER, DIMENSION(1:num_rkinds) :: rkind_sizeof = (/${OUT_VAR}/)") ENABLE_LANGUAGE (C) @@ -424,7 +425,7 @@ set (PROG_SRC #include #define CHECK_FLOAT128 ${SIZEOF___FLOAT128} #if CHECK_FLOAT128!=0 -# if ${HAVE_QUADMATH}!=0 +# if ${${HDF_PREFIX}_HAVE_QUADMATH}!=0 #include # endif # ifdef FLT128_DIG @@ -460,18 +461,18 @@ list (GET PROG_OUTPUT 0 LDBL_DIG) list (GET PROG_OUTPUT 1 FLT128_DIG) if (SIZEOF___FLOAT128 EQUAL 0 OR FLT128_DIG EQUAL 0) - set (H5_HAVE_FLOAT128 0) + set (${HDF_PREFIX}_HAVE_FLOAT128 0) set (SIZEOF___FLOAT128 0) - set (H5_PAC_C_MAX_REAL_PRECISION ${LDBL_DIG}) + set (${HDF_PREFIX}_PAC_C_MAX_REAL_PRECISION ${LDBL_DIG}) else () - set(H5_PAC_C_MAX_REAL_PRECISION ${FLT128_DIG}) + set(${HDF_PREFIX}_PAC_C_MAX_REAL_PRECISION ${FLT128_DIG}) endif () # Setting definition if there is a 16 byte fortran integer string (FIND ${PAC_FC_ALL_INTEGER_KINDS_SIZEOF} "16" pos) if (${pos} EQUAL -1) - set (HAVE_Fortran_INTEGER_SIZEOF_16 0) + set (${HDF_PREFIX}_HAVE_Fortran_INTEGER_SIZEOF_16 0) else () - set (HAVE_Fortran_INTEGER_SIZEOF_16 1) + set (${HDF_PREFIX}_HAVE_Fortran_INTEGER_SIZEOF_16 1) endif () diff --git a/config/cmake/HDFCompilerFlags.cmake b/config/cmake/HDFCompilerFlags.cmake index 56277fa..1ba090c 100644 --- a/config/cmake/HDFCompilerFlags.cmake +++ b/config/cmake/HDFCompilerFlags.cmake @@ -50,8 +50,10 @@ if (HDF5_DISABLE_COMPILER_WARNINGS) set (HDF5_WARNINGS_BLOCKED 1) string (REGEX REPLACE "(^| )([/-])W[0-9]( |$)" " " CMAKE_C_FLAGS "${CMAKE_C_FLAGS}") set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /W0") - string (REGEX REPLACE "(^| )([/-])W[0-9]( |$)" " " CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}") - set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /W0") + if (CMAKE_COMPILER_IS_GNUCXX AND CMAKE_CXX_COMPILER_LOADED) + string (REGEX REPLACE "(^| )([/-])W[0-9]( |$)" " " CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}") + set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /W0") + endif () endif () if (WIN32) add_definitions (-D_CRT_SECURE_NO_WARNINGS) @@ -65,7 +67,9 @@ if (HDF5_DISABLE_COMPILER_WARNINGS) # Most compilers use -w to suppress warnings. if (NOT HDF5_WARNINGS_BLOCKED) set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -w") - set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -w") + if (CMAKE_COMPILER_IS_GNUCXX AND CMAKE_CXX_COMPILER_LOADED) + set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -w") + endif () endif () endif () @@ -212,13 +216,17 @@ if (HDF5_ENABLE_ALL_WARNINGS) if (HDF5_ENABLE_DEV_WARNINGS) string (REGEX REPLACE "(^| )([/-])W[0-9]( |$)" " " CMAKE_C_FLAGS "${CMAKE_C_FLAGS}") set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /Wall /wd4668") - string (REGEX REPLACE "(^| )([/-])W[0-9]( |$)" " " CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}") - set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /Wall /wd4668") + if (CMAKE_COMPILER_IS_GNUCXX AND CMAKE_CXX_COMPILER_LOADED) + string (REGEX REPLACE "(^| )([/-])W[0-9]( |$)" " " CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}") + set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /Wall /wd4668") + endif () else () string (REGEX REPLACE "(^| )([/-])W[0-9]( |$)" " " CMAKE_C_FLAGS "${CMAKE_C_FLAGS}") set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /W3") - string (REGEX REPLACE "(^| )([/-])W[0-9]( |$)" " " CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}") - set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /W3") + if (CMAKE_COMPILER_IS_GNUCXX AND CMAKE_CXX_COMPILER_LOADED) + string (REGEX REPLACE "(^| )([/-])W[0-9]( |$)" " " CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}") + set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /W3") + endif () endif () else () if (CMAKE_COMPILER_IS_GNUCC) @@ -235,8 +243,10 @@ if (HDF5_ENABLE_GROUPZERO_WARNINGS) if (MSVC) string (REGEX REPLACE "(^| )([/-])W[0-9]( |$)" " " CMAKE_C_FLAGS "${CMAKE_C_FLAGS}") set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /W1") - string (REGEX REPLACE "(^| )([/-])W[0-9]( |$)" " " CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}") - set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /W1") + if (CMAKE_COMPILER_IS_GNUCXX AND CMAKE_CXX_COMPILER_LOADED) + string (REGEX REPLACE "(^| )([/-])W[0-9]( |$)" " " CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}") + set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /W1") + endif () else () if (CMAKE_COMPILER_IS_GNUCC) set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Wextra -pedantic") @@ -252,8 +262,10 @@ if (HDF5_ENABLE_GROUPONE_WARNINGS) if (MSVC) string (REGEX REPLACE "(^| )([/-])W[0-9]( |$)" " " CMAKE_C_FLAGS "${CMAKE_C_FLAGS}") set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /W2") - string (REGEX REPLACE "(^| )([/-])W[0-9]( |$)" " " CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}") - set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /W2") + if (CMAKE_COMPILER_IS_GNUCXX AND CMAKE_CXX_COMPILER_LOADED) + string (REGEX REPLACE "(^| )([/-])W[0-9]( |$)" " " CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}") + set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /W2") + endif () else () set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${H5_CFLAGS1}") endif () @@ -267,8 +279,10 @@ if (HDF5_ENABLE_GROUPTWO_WARNINGS) if (MSVC) string (REGEX REPLACE "(^| )([/-])W[0-9]( |$)" " " CMAKE_C_FLAGS "${CMAKE_C_FLAGS}") set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /W3") - string (REGEX REPLACE "(^| )([/-])W[0-9]( |$)" " " CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}") - set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /W3") + if (CMAKE_COMPILER_IS_GNUCXX AND CMAKE_CXX_COMPILER_LOADED) + string (REGEX REPLACE "(^| )([/-])W[0-9]( |$)" " " CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}") + set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /W3") + endif () else () set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${H5_CFLAGS2}") endif () @@ -282,8 +296,10 @@ if (HDF5_ENABLE_GROUPTHREE_WARNINGS) if (MSVC) string (REGEX REPLACE "(^| )([/-])W[0-9]( |$)" " " CMAKE_C_FLAGS "${CMAKE_C_FLAGS}") set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /W4") - string (REGEX REPLACE "(^| )([/-])W[0-9]( |$)" " " CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}") - set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /W4") + if (CMAKE_COMPILER_IS_GNUCXX AND CMAKE_CXX_COMPILER_LOADED) + string (REGEX REPLACE "(^| )([/-])W[0-9]( |$)" " " CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}") + set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /W4") + endif () else () set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${H5_CFLAGS3}") endif () diff --git a/config/cmake/UseJava.cmake b/config/cmake/UseJava.cmake index 60b1758..10ffe47 100644 --- a/config/cmake/UseJava.cmake +++ b/config/cmake/UseJava.cmake @@ -794,9 +794,11 @@ function(add_jar _TARGET_NAME) if (_GENERATE_NATIVE_HEADERS) # create an INTERFACE library encapsulating include directory for generated headers add_library (${_GENERATE_NATIVE_HEADERS_TARGET} INTERFACE) - target_include_directories (${_GENERATE_NATIVE_HEADERS_TARGET} INTERFACE - "${_GENERATE_NATIVE_HEADERS_OUTPUT_DIR}" - ${JNI_INCLUDE_DIRS}) + target_include_directories (${_GENERATE_NATIVE_HEADERS_TARGET} + INTERFACE + "${_GENERATE_NATIVE_HEADERS_OUTPUT_DIR}" + ${JNI_INCLUDE_DIRS} + ) # this INTERFACE library depends on jar generation add_dependencies (${_GENERATE_NATIVE_HEADERS_TARGET} ${_TARGET_NAME}) diff --git a/config/cmake_ext_mod/ConfigureChecks.cmake b/config/cmake_ext_mod/ConfigureChecks.cmake index 3797768..b0deab7 100644 --- a/config/cmake_ext_mod/ConfigureChecks.cmake +++ b/config/cmake_ext_mod/ConfigureChecks.cmake @@ -14,17 +14,12 @@ #----------------------------------------------------------------------------- include (CheckFunctionExists) include (CheckIncludeFile) -include (CheckIncludeFileCXX) include (CheckIncludeFiles) include (CheckLibraryExists) include (CheckSymbolExists) include (CheckTypeSize) include (CheckVariableExists) -include (CheckFortranFunctionExists) include (TestBigEndian) -if (CMAKE_CXX_COMPILER AND CMAKE_CXX_COMPILER_LOADED) - include (TestForSTDNamespace) -endif () #----------------------------------------------------------------------------- # APPLE/Darwin setup @@ -223,17 +218,6 @@ CHECK_INCLUDE_FILE_CONCAT ("stddef.h" ${HDF_PREFIX}_HAVE_STDDEF_H) CHECK_INCLUDE_FILE_CONCAT ("stdint.h" ${HDF_PREFIX}_HAVE_STDINT_H) CHECK_INCLUDE_FILE_CONCAT ("unistd.h" ${HDF_PREFIX}_HAVE_UNISTD_H) -# IF the c compiler found stdint, check the C++ as well. On some systems this -# file will be found by C but not C++, only do this test IF the C++ compiler -# has been initialized (e.g. the project also includes some c++) -if (${HDF_PREFIX}_HAVE_STDINT_H AND CMAKE_CXX_COMPILER_LOADED) - CHECK_INCLUDE_FILE_CXX ("stdint.h" ${HDF_PREFIX}_HAVE_STDINT_H_CXX) - if (NOT ${HDF_PREFIX}_HAVE_STDINT_H_CXX) - set (${HDF_PREFIX}_HAVE_STDINT_H "" CACHE INTERNAL "Have includes HAVE_STDINT_H") - set (USE_INCLUDES ${USE_INCLUDES} "stdint.h") - endif () -endif () - # Darwin CHECK_INCLUDE_FILE_CONCAT ("mach/mach_time.h" ${HDF_PREFIX}_HAVE_MACH_MACH_TIME_H) @@ -331,8 +315,6 @@ if (NOT WINDOWS) endif () endif () -add_definitions (${HDF_EXTRA_FLAGS}) - #----------------------------------------------------------------------------- # Check for HAVE_OFF64_T functionality #----------------------------------------------------------------------------- @@ -585,71 +567,6 @@ if (NOT WINDOWS) endforeach () endif () -# For other CXX specific tests, use this MACRO. -macro (HDF_CXX_FUNCTION_TEST OTHER_TEST) - if (NOT DEFINED ${OTHER_TEST}) - set (MACRO_CHECK_FUNCTION_DEFINITIONS "-D${OTHER_TEST} ${CMAKE_REQUIRED_FLAGS}") - set (OTHER_TEST_ADD_LIBRARIES) - if (CMAKE_REQUIRED_LIBRARIES) - set (OTHER_TEST_ADD_LIBRARIES "-DLINK_LIBRARIES:STRING=${CMAKE_REQUIRED_LIBRARIES}") - endif () - - foreach (def - HAVE_SYS_TIME_H - HAVE_UNISTD_H - HAVE_SYS_TYPES_H - HAVE_SYS_SOCKET_H - HAVE_SYS_FILE_H - ) - if ("${${HDF_PREFIX}_${def}}") - set (MACRO_CHECK_FUNCTION_DEFINITIONS "${MACRO_CHECK_FUNCTION_DEFINITIONS} -D${def}") - endif () - endforeach () - - if (LARGEFILE) - set (MACRO_CHECK_FUNCTION_DEFINITIONS - "${MACRO_CHECK_FUNCTION_DEFINITIONS} -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE" - ) - endif () - - #message (STATUS "Performing ${OTHER_TEST}") - TRY_COMPILE (${OTHER_TEST} - ${CMAKE_BINARY_DIR} - ${HDF_RESOURCES_EXT_DIR}/HDFCXXTests.cpp - CMAKE_FLAGS -DCOMPILE_DEFINITIONS:STRING=${MACRO_CHECK_FUNCTION_DEFINITIONS} - "${OTHER_TEST_ADD_LIBRARIES}" - OUTPUT_VARIABLE OUTPUT - ) - if (${OTHER_TEST} EQUAL 0) - set (${OTHER_TEST} 1 CACHE INTERNAL "CXX test ${FUNCTION}") - message (STATUS "Performing CXX Test ${OTHER_TEST} - Success") - else () - message (STATUS "Performing CXX Test ${OTHER_TEST} - Failed") - 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" - "${OUTPUT}\n" - ) - endif () - endif () -endmacro () - -#----------------------------------------------------------------------------- -# Check a bunch of cxx functions -#----------------------------------------------------------------------------- -if (CMAKE_CXX_COMPILER_LOADED) - foreach (test - OLD_HEADER_FILENAME - ${HDF_PREFIX}_NO_NAMESPACE - ${HDF_PREFIX}_NO_STD - BOOL_NOTDEFINED - NO_STATIC_CAST - CXX_HAVE_OFFSETOF - ) - HDF_CXX_FUNCTION_TEST (${test}) - endforeach () -endif () - #----------------------------------------------------------------------------- # Check if InitOnceExecuteOnce is available #----------------------------------------------------------------------------- diff --git a/config/cmake_ext_mod/HDFMacros.cmake b/config/cmake_ext_mod/HDFMacros.cmake index 04d60e1..791fe2e 100644 --- a/config/cmake_ext_mod/HDFMacros.cmake +++ b/config/cmake_ext_mod/HDFMacros.cmake @@ -219,37 +219,15 @@ macro (HDF_IMPORT_SET_LIB_OPTIONS libtarget libname libtype libversion) endmacro () #------------------------------------------------------------------------------- -macro (TARGET_C_PROPERTIES wintarget libtype addcompileflags addlinkflags) - if (MSVC) - TARGET_MSVC_PROPERTIES (${wintarget} ${libtype} "${addcompileflags} ${WIN_COMPILE_FLAGS}" "${addlinkflags} ${WIN_LINK_FLAGS}") - else () - set_target_properties (${wintarget} PROPERTIES COMPILE_FLAGS "${addcompileflags}" LINK_FLAGS "${addlinkflags}") - endif () -endmacro () - -#------------------------------------------------------------------------------- -macro (TARGET_MSVC_PROPERTIES wintarget libtype addcompileflags addlinkflags) - if (MSVC) - set_target_properties (${wintarget} PROPERTIES COMPILE_FLAGS "${addcompileflags}" LINK_FLAGS "${addlinkflags}") - endif () -endmacro () - -#------------------------------------------------------------------------------- -macro (TARGET_FORTRAN_PROPERTIES forttarget libtype addcompileflags addlinkflags) - if (WIN32) - TARGET_FORTRAN_WIN_PROPERTIES (${forttarget} ${libtype} "${addcompileflags} ${WIN_COMPILE_FLAGS}" "${addlinkflags} ${WIN_LINK_FLAGS}") - endif () -endmacro () - -#------------------------------------------------------------------------------- -macro (TARGET_FORTRAN_WIN_PROPERTIES forttarget libtype addcompileflags addlinkflags) - if (MSVC) - if (${libtype} MATCHES "SHARED") - set_target_properties (${forttarget} PROPERTIES COMPILE_FLAGS "/dll ${addcompileflags}" LINK_FLAGS "/SUBSYSTEM:CONSOLE ${addlinkflags}") - else () - set_target_properties (${forttarget} PROPERTIES COMPILE_FLAGS "${addcompileflags}" LINK_FLAGS "/SUBSYSTEM:CONSOLE ${addlinkflags}") - endif () - endif () +macro (TARGET_C_PROPERTIES wintarget libtype) + target_compile_options(${wintarget} PRIVATE + $<$:${WIN_COMPILE_FLAGS}> + $<$:${WIN_COMPILE_FLAGS}> + ) + target_link_libraries(${wintarget} INTERFACE + $<$:${WIN_LINK_FLAGS}> + $<$:${WIN_LINK_FLAGS}> + ) endmacro () #----------------------------------------------------------------------------- diff --git a/config/cmake_ext_mod/HDFTests.c b/config/cmake_ext_mod/HDFTests.c index 320fd5b..0b9b530 100644 --- a/config/cmake_ext_mod/HDFTests.c +++ b/config/cmake_ext_mod/HDFTests.c @@ -180,7 +180,7 @@ SIMPLE_TEST(struct tm tm; tm.tm_gmtoff=0); #include SIMPLE_TEST(struct tm tm; tm.__tm_gmtoff=0); -#endif /* HAVE_TM_GMTOFF */ +#endif /* HAVE_TM___GMTOFF */ #ifdef HAVE_TIMEZONE @@ -436,13 +436,13 @@ int main () SIMPLE_TEST(struct videoconfig w; w.numtextcols=0); -#endif /* HAVE_TM_GMTOFF */ +#endif /* HAVE_STRUCT_VIDEOCONFIG */ #ifdef HAVE_STRUCT_TEXT_INFO SIMPLE_TEST(struct text_info w; w.screenwidth=0); -#endif /* HAVE_TM_GMTOFF */ +#endif /* HAVE_STRUCT_TEXT_INFO */ #if defined( HAVE_INLINE ) || defined( HAVE___INLINE__ ) || defined( HAVE___INLINE ) #ifndef __cplusplus diff --git a/config/cmake_ext_mod/HDFUseCXX.cmake b/config/cmake_ext_mod/HDFUseCXX.cmake new file mode 100644 index 0000000..3afcdb6 --- /dev/null +++ b/config/cmake_ext_mod/HDFUseCXX.cmake @@ -0,0 +1,109 @@ +# +# Copyright by The HDF Group. +# All rights reserved. +# +# This file is part of HDF5. The full HDF5 copyright notice, including +# terms governing use, modification, and redistribution, is contained in +# the COPYING file, which can be found at the root of the source code +# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. +# If you do not have access to either file, you may request a copy from +# help@hdfgroup.org. +# +# +# This file provides functions for C++ support. +# +#------------------------------------------------------------------------------- +ENABLE_LANGUAGE (CXX) +set (HDF_PREFIX "H5") + +#------------------------------------------------------------------------------- +# Fix CXX flags if we are compiling staticly on Windows using +# Windows_MT.cmake from config/cmake/UserMacros +#------------------------------------------------------------------------------- +if (BUILD_STATIC_CRT_LIBS) + TARGET_STATIC_CRT_FLAGS () +endif () + +#----------------------------------------------------------------------------- +# Configure Checks which require CXX compilation must go in here +# not in the main ConfigureChecks.cmake files, because if the user has +# no CXX compiler, problems arise. +#----------------------------------------------------------------------------- +include (CheckIncludeFileCXX) +include (TestForSTDNamespace) + +# IF the c compiler found stdint, check the C++ as well. On some systems this +# file will be found by C but not C++, only do this test IF the C++ compiler +# has been initialized (e.g. the project also includes some c++) +if (${HDF_PREFIX}_HAVE_STDINT_H AND CMAKE_CXX_COMPILER_LOADED) + CHECK_INCLUDE_FILE_CXX ("stdint.h" ${HDF_PREFIX}_HAVE_STDINT_H_CXX) + if (NOT ${HDF_PREFIX}_HAVE_STDINT_H_CXX) + set (${HDF_PREFIX}_HAVE_STDINT_H "" CACHE INTERNAL "Have includes HAVE_STDINT_H") + set (USE_INCLUDES ${USE_INCLUDES} "stdint.h") + endif () +endif () + +# For other CXX specific tests, use this MACRO. +macro (HDF_CXX_FUNCTION_TEST OTHER_TEST) + if (NOT DEFINED ${OTHER_TEST}) + set (MACRO_CHECK_FUNCTION_DEFINITIONS "-D${OTHER_TEST} ${CMAKE_REQUIRED_FLAGS}") + set (OTHER_TEST_ADD_LIBRARIES) + if (CMAKE_REQUIRED_LIBRARIES) + set (OTHER_TEST_ADD_LIBRARIES "-DLINK_LIBRARIES:STRING=${CMAKE_REQUIRED_LIBRARIES}") + endif () + + foreach (def + HAVE_SYS_TIME_H + HAVE_UNISTD_H + HAVE_SYS_TYPES_H + HAVE_SYS_SOCKET_H + HAVE_SYS_FILE_H + ) + if ("${${HDF_PREFIX}_${def}}") + set (MACRO_CHECK_FUNCTION_DEFINITIONS "${MACRO_CHECK_FUNCTION_DEFINITIONS} -D${def}") + endif () + endforeach () + + if (LARGEFILE) + set (MACRO_CHECK_FUNCTION_DEFINITIONS + "${MACRO_CHECK_FUNCTION_DEFINITIONS} -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE" + ) + endif () + + #message (STATUS "Performing ${OTHER_TEST}") + TRY_COMPILE (${OTHER_TEST} + ${CMAKE_BINARY_DIR} + ${HDF_RESOURCES_EXT_DIR}/HDFCXXTests.cpp + CMAKE_FLAGS -DCOMPILE_DEFINITIONS:STRING=${MACRO_CHECK_FUNCTION_DEFINITIONS} + "${OTHER_TEST_ADD_LIBRARIES}" + OUTPUT_VARIABLE OUTPUT + ) + if (${OTHER_TEST} EQUAL 0) + set (${OTHER_TEST} 1 CACHE INTERNAL "CXX test ${FUNCTION}") + message (STATUS "Performing CXX Test ${OTHER_TEST} - Success") + else () + message (STATUS "Performing CXX Test ${OTHER_TEST} - Failed") + 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" + "${OUTPUT}\n" + ) + endif () + endif () +endmacro () + +#----------------------------------------------------------------------------- +# Check a bunch of cxx functions +#----------------------------------------------------------------------------- +if (CMAKE_CXX_COMPILER_LOADED) + foreach (test + OLD_HEADER_FILENAME + ${HDF_PREFIX}_NO_NAMESPACE + ${HDF_PREFIX}_NO_STD + BOOL_NOTDEFINED + NO_STATIC_CAST + ${HDF_PREFIX}_CXX_HAVE_OFFSETOF + ) + HDF_CXX_FUNCTION_TEST (${test}) + endforeach () +endif () diff --git a/config/cmake_ext_mod/HDFUseFortran.cmake b/config/cmake_ext_mod/HDFUseFortran.cmake index 5be2c49..f8f3cea 100644 --- a/config/cmake_ext_mod/HDFUseFortran.cmake +++ b/config/cmake_ext_mod/HDFUseFortran.cmake @@ -14,6 +14,7 @@ # #------------------------------------------------------------------------------- ENABLE_LANGUAGE (Fortran) +set (HDF_PREFIX "H5") #------------------------------------------------------------------------------- # Fix Fortran flags if we are compiling staticly on Windows using @@ -93,18 +94,18 @@ endmacro () #----------------------------------------------------------------------------- # Check for Non-standard extension intrinsic function SIZEOF -set (FORTRAN_HAVE_SIZEOF FALSE) +set (${HDF_PREFIX}_FORTRAN_HAVE_SIZEOF FALSE) CHECK_FORTRAN_FEATURE(sizeof " PROGRAM main i = sizeof(x) END PROGRAM " - FORTRAN_HAVE_SIZEOF + ${HDF_PREFIX}_FORTRAN_HAVE_SIZEOF ) # Check for F2008 standard intrinsic function C_SIZEOF -set (FORTRAN_HAVE_C_SIZEOF FALSE) +set (${HDF_PREFIX}_FORTRAN_HAVE_C_SIZEOF FALSE) CHECK_FORTRAN_FEATURE(c_sizeof " PROGRAM main @@ -114,7 +115,7 @@ CHECK_FORTRAN_FEATURE(c_sizeof result = c_sizeof(a) END PROGRAM " - FORTRAN_HAVE_C_SIZEOF + ${HDF_PREFIX}_FORTRAN_HAVE_C_SIZEOF ) # Check for F2008 standard intrinsic function STORAGE_SIZE @@ -126,21 +127,21 @@ CHECK_FORTRAN_FEATURE(storage_size result = storage_size(a) END PROGRAM " - FORTRAN_HAVE_STORAGE_SIZE + ${HDF_PREFIX}_FORTRAN_HAVE_STORAGE_SIZE ) # Check for F2008 standard intrinsic module "ISO_FORTRAN_ENV" -set (HAVE_ISO_FORTRAN_ENV FALSE) +set (${HDF_PREFIX}_HAVE_ISO_FORTRAN_ENV FALSE) CHECK_FORTRAN_FEATURE(ISO_FORTRAN_ENV " PROGRAM main USE, INTRINSIC :: ISO_FORTRAN_ENV END PROGRAM " - HAVE_ISO_FORTRAN_ENV + ${HDF_PREFIX}_HAVE_ISO_FORTRAN_ENV ) -set (FORTRAN_DEFAULT_REAL_NOT_DOUBLE FALSE) +set (${HDF_PREFIX}_FORTRAN_DEFAULT_REAL_NOT_DOUBLE FALSE) CHECK_FORTRAN_FEATURE(RealIsNotDouble " MODULE type_mod @@ -164,13 +165,13 @@ CHECK_FORTRAN_FEATURE(RealIsNotDouble CALL h5t(d) END PROGRAM main " - FORTRAN_DEFAULT_REAL_NOT_DOUBLE + ${HDF_PREFIX}_FORTRAN_DEFAULT_REAL_NOT_DOUBLE ) #----------------------------------------------------------------------------- # Checks if the ISO_C_BINDING module meets all the requirements #----------------------------------------------------------------------------- -set (FORTRAN_HAVE_ISO_C_BINDING FALSE) +set (${HDF_PREFIX}_FORTRAN_HAVE_ISO_C_BINDING FALSE) CHECK_FORTRAN_FEATURE(iso_c_binding " PROGRAM main @@ -183,7 +184,7 @@ CHECK_FORTRAN_FEATURE(iso_c_binding ptr = C_LOC(ichr(1:1)) END PROGRAM " - FORTRAN_HAVE_ISO_C_BINDING + ${HDF_PREFIX}_FORTRAN_HAVE_ISO_C_BINDING ) #----------------------------------------------------------------------------- diff --git a/examples/CMakeLists.txt b/examples/CMakeLists.txt index 4da8405..2239d64 100644 --- a/examples/CMakeLists.txt +++ b/examples/CMakeLists.txt @@ -1,10 +1,5 @@ cmake_minimum_required (VERSION 3.10) -PROJECT (HDF5_EXAMPLES) - -#----------------------------------------------------------------------------- -# Apply Definitions to compiler in this directory and below -#----------------------------------------------------------------------------- -add_definitions (${HDF_EXTRA_C_FLAGS}) +project (HDF5_EXAMPLES C) #----------------------------------------------------------------------------- # Define Sources @@ -46,26 +41,30 @@ set (examples foreach (example ${examples}) add_executable (${example} ${HDF5_EXAMPLES_SOURCE_DIR}/${example}.c) - TARGET_C_PROPERTIES (${example} STATIC " " " ") - target_link_libraries (${example} ${HDF5_LIB_TARGET}) + target_include_directories(${example} PRIVATE "${HDF5_SRC_DIR};${HDF5_BINARY_DIR};$<$:${MPI_C_INCLUDE_DIRS}>") + TARGET_C_PROPERTIES (${example} STATIC) + target_link_libraries (${example} PRIVATE ${HDF5_LIB_TARGET}) set_target_properties (${example} PROPERTIES FOLDER examples) if (BUILD_SHARED_LIBS) add_executable (${example}-shared ${HDF5_EXAMPLES_SOURCE_DIR}/${example}.c) - TARGET_C_PROPERTIES (${example}-shared SHARED " " " ") - target_link_libraries (${example}-shared ${HDF5_LIBSH_TARGET}) + target_include_directories(${example}-shared PRIVATE "${HDF5_SRC_DIR};${HDF5_BINARY_DIR};$<$:${MPI_C_INCLUDE_DIRS}>") + TARGET_C_PROPERTIES (${example}-shared SHARED) + target_link_libraries (${example}-shared PRIVATE ${HDF5_LIBSH_TARGET}) set_target_properties (${example}-shared PROPERTIES FOLDER examples) endif () endforeach () if (H5_HAVE_PARALLEL) add_executable (ph5example ${HDF5_EXAMPLES_SOURCE_DIR}/ph5example.c) - TARGET_C_PROPERTIES (ph5example STATIC " " " ") - target_link_libraries (ph5example ${HDF5_LIB_TARGET} ${MPI_C_LIBRARIES}) + target_include_directories(ph5example PRIVATE "${HDF5_SRC_DIR};${HDF5_BINARY_DIR};$<$:${MPI_C_INCLUDE_DIRS}>") + TARGET_C_PROPERTIES (ph5example STATIC) + target_link_libraries (ph5example PRIVATE ${HDF5_LIB_TARGET} ${MPI_C_LIBRARIES}) set_target_properties (ph5example PROPERTIES FOLDER examples) if (BUILD_SHARED_LIBS) add_executable (ph5example-shared ${HDF5_EXAMPLES_SOURCE_DIR}/ph5example.c) - TARGET_C_PROPERTIES (ph5example-shared SHARED " " " ") - target_link_libraries (ph5example-shared ${HDF5_LIBSH_TARGET} ${MPI_C_LIBRARIES}) + target_include_directories(ph5example-shared PRIVATE "${HDF5_SRC_DIR};${HDF5_BINARY_DIR};$<$:${MPI_C_INCLUDE_DIRS}>") + TARGET_C_PROPERTIES (ph5example-shared SHARED) + target_link_libraries (ph5example-shared PRIVATE ${HDF5_LIBSH_TARGET} ${MPI_C_LIBRARIES}) set_target_properties (ph5example-shared PROPERTIES FOLDER examples) endif () endif () diff --git a/fortran/CMakeLists.txt b/fortran/CMakeLists.txt index 8c7b8f6..31edad2 100644 --- a/fortran/CMakeLists.txt +++ b/fortran/CMakeLists.txt @@ -1,5 +1,5 @@ cmake_minimum_required (VERSION 3.10) -PROJECT (HDF5_F90 C CXX Fortran) +project (HDF5_F90 C Fortran) if (H5_HAVE_PARALLEL) if (MPI_Fortran_LINK_FLAGS) diff --git a/fortran/examples/CMakeLists.txt b/fortran/examples/CMakeLists.txt index 8b7333a..cc14651 100644 --- a/fortran/examples/CMakeLists.txt +++ b/fortran/examples/CMakeLists.txt @@ -1,16 +1,11 @@ cmake_minimum_required (VERSION 3.10) -PROJECT (HDF5_F90_EXAMPLES C CXX Fortran) +project (HDF5_F90_EXAMPLES C Fortran) # -------------------------------------------------------------------- # Notes: When creating examples they should be prefixed # with "f90_ex_". This allows for easier filtering of the examples. # -------------------------------------------------------------------- #----------------------------------------------------------------------------- -# Setup include Directories -#----------------------------------------------------------------------------- -INCLUDE_DIRECTORIES (${HDF5_F90_BINARY_DIR} ${HDF5_F90_SRC_DIR}/src) - -#----------------------------------------------------------------------------- # Define Sources #----------------------------------------------------------------------------- set (examples @@ -40,12 +35,27 @@ set (F2003_examples foreach (example ${examples}) add_executable (f90_ex_${example} ${HDF5_F90_EXAMPLES_SOURCE_DIR}/${example}.f90) - TARGET_FORTRAN_PROPERTIES (f90_ex_${example} STATIC " " " ") + target_include_directories (f90_ex_${example} + PRIVATE + "${CMAKE_Fortran_MODULE_DIRECTORY}/static;${HDF5_SRC_DIR};${HDF5_BINARY_DIR};${HDF5_F90_BINARY_DIR};${HDF5_F90_BINARY_DIR}/static" + ) + target_compile_options(f90_ex_${example} + PRIVATE + $<$:${WIN_COMPILE_FLAGS}> + ) target_link_libraries (f90_ex_${example} - ${HDF5_F90_LIB_TARGET} - ${HDF5_LIB_TARGET} + PRIVATE + ${HDF5_F90_LIB_TARGET} ${HDF5_LIB_TARGET} ) - target_include_directories (f90_ex_${example} PRIVATE ${CMAKE_Fortran_MODULE_DIRECTORY}/static) +# set_property(TARGET f90_ex_${example} APPEND PROPERTY +# LINK_FLAGS $<$:"-SUBSYSTEM:CONSOLE"> +# ) +# set_property(TARGET f90_ex_${example} APPEND PROPERTY +# LINK_FLAGS $<$:> +# ) + if(MSVC) + set_property(TARGET H5_buildiface PROPERTY LINK_FLAGS "/SUBSYSTEM:CONSOLE ${WIN_LINK_FLAGS}") + endif() set_target_properties (f90_ex_${example} PROPERTIES LINKER_LANGUAGE Fortran FOLDER examples/fortran @@ -53,12 +63,28 @@ foreach (example ${examples}) ) if (BUILD_SHARED_LIBS) add_executable (f90_ex_${example}-shared ${HDF5_F90_EXAMPLES_SOURCE_DIR}/${example}.f90) - TARGET_FORTRAN_PROPERTIES (f90_ex_${example}-shared SHARED " " " ") + target_include_directories (f90_ex_${example}-shared + PRIVATE + "${CMAKE_Fortran_MODULE_DIRECTORY}/shared;${HDF5_SRC_DIR};${HDF5_BINARY_DIR};${HDF5_F90_BINARY_DIR};${HDF5_F90_BINARY_DIR}/shared" + ) + target_compile_options(f90_ex_${example}-shared + PRIVATE + $<$:/dll> + $<$:${WIN_COMPILE_FLAGS}> + ) target_link_libraries (f90_ex_${example}-shared - ${HDF5_F90_LIBSH_TARGET} - ${HDF5_LIBSH_TARGET} + PRIVATE + ${HDF5_F90_LIBSH_TARGET} ${HDF5_LIBSH_TARGET} ) - target_include_directories (f90_ex_${example}-shared PRIVATE ${CMAKE_Fortran_MODULE_DIRECTORY}/shared) +# set_property(TARGET f90_ex_${example}-shared APPEND PROPERTY +# LINK_FLAGS $<$:"-SUBSYSTEM:CONSOLE"> +# ) +# set_property(TARGET f90_ex_${example}-shared APPEND PROPERTY +# LINK_FLAGS $<$:${WIN_LINK_FLAGS}> +# ) + if(MSVC) + set_property(TARGET f90_ex_${example}-shared PROPERTY LINK_FLAGS "/SUBSYSTEM:CONSOLE ${WIN_LINK_FLAGS}") + endif() set_target_properties (f90_ex_${example}-shared PROPERTIES LINKER_LANGUAGE Fortran FOLDER examples/fortran @@ -69,12 +95,27 @@ endforeach () foreach (example ${F2003_examples}) add_executable (f03_ex_${example} ${HDF5_F90_EXAMPLES_SOURCE_DIR}/${example}.f90) - TARGET_FORTRAN_PROPERTIES (f03_ex_${example} STATIC " " " ") + target_include_directories (f03_ex_${example} + PRIVATE + "${CMAKE_Fortran_MODULE_DIRECTORY}/static;${HDF5_SRC_DIR};${HDF5_BINARY_DIR};${HDF5_F90_BINARY_DIR};${HDF5_F90_BINARY_DIR}/static" + ) + target_compile_options(f03_ex_${example} + PRIVATE + $<$:${WIN_COMPILE_FLAGS}> + ) target_link_libraries (f03_ex_${example} - ${HDF5_F90_LIB_TARGET} - ${HDF5_LIB_TARGET} + PRIVATE + ${HDF5_F90_LIB_TARGET} ${HDF5_LIB_TARGET} ) - target_include_directories (f03_ex_${example} PRIVATE ${CMAKE_Fortran_MODULE_DIRECTORY}/static) +# set_property(TARGET f03_ex_${example} APPEND PROPERTY +# LINK_FLAGS $<$:"-SUBSYSTEM:CONSOLE"> +# ) +# set_property(TARGET f03_ex_${example} APPEND PROPERTY +# LINK_FLAGS $<$:${WIN_LINK_FLAGS}> +# ) + if(MSVC) + set_property(TARGET f03_ex_${example} PROPERTY LINK_FLAGS "/SUBSYSTEM:CONSOLE ${WIN_LINK_FLAGS}") + endif() set_target_properties (f03_ex_${example} PROPERTIES LINKER_LANGUAGE Fortran FOLDER examples/fortran03 @@ -82,12 +123,28 @@ foreach (example ${F2003_examples}) ) if (BUILD_SHARED_LIBS) add_executable (f03_ex_${example}-shared ${HDF5_F90_EXAMPLES_SOURCE_DIR}/${example}.f90) - TARGET_FORTRAN_PROPERTIES (f03_ex_${example}-shared SHARED " " " ") + target_include_directories (f03_ex_${example}-shared + PRIVATE + "${CMAKE_Fortran_MODULE_DIRECTORY}/shared;${HDF5_SRC_DIR};${HDF5_BINARY_DIR};${HDF5_F90_BINARY_DIR};${HDF5_F90_BINARY_DIR}/shared" + ) + target_compile_options(f03_ex_${example}-shared + PRIVATE + $<$:/dll> + $<$:${WIN_COMPILE_FLAGS}> + ) target_link_libraries (f03_ex_${example}-shared - ${HDF5_F90_LIBSH_TARGET} - ${HDF5_LIBSH_TARGET} + PRIVATE + ${HDF5_F90_LIBSH_TARGET} ${HDF5_LIBSH_TARGET} ) - target_include_directories (f03_ex_${example}-shared PRIVATE ${CMAKE_Fortran_MODULE_DIRECTORY}/shared) +# set_property(TARGET f03_ex_${example}-shared APPEND PROPERTY +# LINK_FLAGS $<$:"-SUBSYSTEM:CONSOLE"> +# ) +# set_property(TARGET f03_ex_${example}-shared APPEND PROPERTY +# LINK_FLAGS $<$:${WIN_LINK_FLAGS}> +# ) + if(MSVC) + set_property(TARGET f03_ex_${example}-shared PROPERTY LINK_FLAGS "/SUBSYSTEM:CONSOLE ${WIN_LINK_FLAGS}") + endif() set_target_properties (f03_ex_${example}-shared PROPERTIES LINKER_LANGUAGE Fortran FOLDER examples/fortran03 @@ -98,12 +155,27 @@ endforeach () if (H5_HAVE_PARALLEL AND MPI_Fortran_FOUND) add_executable (f90_ex_ph5example ${HDF5_F90_EXAMPLES_SOURCE_DIR}/ph5example.f90) - TARGET_FORTRAN_PROPERTIES (f90_ex_ph5example STATIC " " " ") + target_include_directories (f90_ex_ph5example + PRIVATE + "${CMAKE_Fortran_MODULE_DIRECTORY}/static;${HDF5_SRC_DIR};${HDF5_BINARY_DIR};${HDF5_F90_BINARY_DIR};${HDF5_F90_BINARY_DIR}/static" + ) + target_compile_options(f90_ex_ph5example + PRIVATE + $<$:${WIN_COMPILE_FLAGS}> + ) target_link_libraries (f90_ex_ph5example - ${HDF5_F90_LIB_TARGET} - ${HDF5_LIB_TARGET} + PRIVATE + ${HDF5_F90_LIB_TARGET} ${HDF5_LIB_TARGET} ) - target_include_directories (f90_ex_ph5example PRIVATE ${CMAKE_Fortran_MODULE_DIRECTORY}/static) +# set_property(TARGET f90_ex_ph5example APPEND PROPERTY +# LINK_FLAGS $<$:"-SUBSYSTEM:CONSOLE"> +# ) +# set_property(TARGET f90_ex_ph5example APPEND PROPERTY +# LINK_FLAGS $<$:${WIN_LINK_FLAGS}> +# ) + if(MSVC) + set_property(TARGET f90_ex_ph5example PROPERTY LINK_FLAGS "/SUBSYSTEM:CONSOLE ${WIN_LINK_FLAGS}") + endif() set_target_properties (f90_ex_ph5example PROPERTIES LINKER_LANGUAGE Fortran FOLDER examples/fortran @@ -111,12 +183,28 @@ if (H5_HAVE_PARALLEL AND MPI_Fortran_FOUND) ) if (BUILD_SHARED_LIBS) add_executable (f90_ex_ph5example-shared ${HDF5_F90_EXAMPLES_SOURCE_DIR}/ph5example.f90) - TARGET_FORTRAN_PROPERTIES (f90_ex_ph5example-shared SHARED " " " ") + target_include_directories (f90_ex_ph5example-shared + PRIVATE + "${CMAKE_Fortran_MODULE_DIRECTORY}/shared;${HDF5_SRC_DIR};${HDF5_BINARY_DIR};${HDF5_F90_BINARY_DIR};${HDF5_F90_BINARY_DIR}/shared" + ) + target_compile_options(f90_ex_ph5example-shared + PRIVATE + $<$:/dll> + $<$:${WIN_COMPILE_FLAGS}> + ) target_link_libraries (f90_ex_ph5example-shared - ${HDF5_F90_LIBSH_TARGET} - ${HDF5_LIBSH_TARGET} + PRIVATE + ${HDF5_F90_LIBSH_TARGET} ${HDF5_LIBSH_TARGET} ) - target_include_directories (f90_ex_ph5example-shared PRIVATE ${CMAKE_Fortran_MODULE_DIRECTORY}/shared) +# set_property(TARGET f90_ex_ph5example-shared APPEND PROPERTY +# LINK_FLAGS $<$:"-SUBSYSTEM:CONSOLE"> +# ) +# set_property(TARGET f90_ex_ph5example-shared APPEND PROPERTY +# LINK_FLAGS $<$:${WIN_LINK_FLAGS}> +# ) + if(MSVC) + set_property(TARGET f90_ex_ph5example-shared PROPERTY LINK_FLAGS "/SUBSYSTEM:CONSOLE ${WIN_LINK_FLAGS}") + endif() set_target_properties (f90_ex_ph5example-shared PROPERTIES LINKER_LANGUAGE Fortran FOLDER examples/fortran diff --git a/fortran/src/CMakeLists.txt b/fortran/src/CMakeLists.txt index 03c12ac..a29fb86 100644 --- a/fortran/src/CMakeLists.txt +++ b/fortran/src/CMakeLists.txt @@ -1,5 +1,5 @@ cmake_minimum_required (VERSION 3.10) -project (HDF5_F90_SRC C CXX Fortran) +project (HDF5_F90_SRC C Fortran) #----------------------------------------------------------------------------- # configure def file for shared libs on windows @@ -32,8 +32,8 @@ if (HAVE_FLOAT128) set (CMAKE_H5_HAVE_FLOAT128 1) endif () -configure_file (${HDF5_F90_SRC_SOURCE_DIR}/H5config_f.inc.cmake ${CMAKE_BINARY_DIR}/H5config_f.inc @ONLY) -configure_file (${HDF5_F90_SRC_SOURCE_DIR}/H5fort_type_defines.h.in ${HDF5_F90_BINARY_DIR}/H5fort_type_defines.h @ONLY) +configure_file (${HDF5_F90_SRC_SOURCE_DIR}/H5config_f.inc.cmake ${HDF5_F90_BINARY_DIR}/H5config_f.inc @ONLY) +configure_file (${HDF5_F90_SRC_SOURCE_DIR}/H5fort_type_defines.h.cmake ${HDF5_F90_BINARY_DIR}/H5fort_type_defines.h @ONLY) set (Fortran_COMPILER_ID CMAKE_Fortran_COMPILER_ID) @@ -43,22 +43,27 @@ set (Fortran_COMPILER_ID CMAKE_Fortran_COMPILER_ID) # H5fort_type_defines.h used to generate H5f90i_gen.h + H5fortran_types.F90 #----------------------------------------------------------------------------- -add_executable (H5_buildiface - ${HDF5_F90_SRC_SOURCE_DIR}/H5_buildiface.F90 - ) +add_executable (H5_buildiface ${HDF5_F90_SRC_SOURCE_DIR}/H5_buildiface.F90) +target_include_directories(H5_buildiface + PRIVATE + "${HDF5_BINARY_DIR};${HDF5_F90_BINARY_DIR}" +) +#if (BUILD_SHARED_LIBS) +# target_compile_definitions(H5_buildiface +# PRIVATE +# $<$:/MT> +# ) +#endif () +if(MSVC) + set_property(TARGET H5_buildiface PROPERTY COMPILE_FLAGS "/MT") +endif() +#set_property(TARGET H5_buildiface APPEND PROPERTY +# LINK_FLAGS $<$:"-SUBSYSTEM:CONSOLE"> +#) +if(MSVC) + set_property(TARGET H5_buildiface PROPERTY LINK_FLAGS "/SUBSYSTEM:CONSOLE") +endif() -if (WIN32 AND MSVC) - if (BUILD_SHARED_LIBS) - set_target_properties (H5_buildiface - PROPERTIES - COMPILE_FLAGS "/MT" - ) - endif () - set_target_properties (H5_buildiface - PROPERTIES - LINK_FLAGS "/SUBSYSTEM:CONSOLE" - ) -endif () set_target_properties (H5_buildiface PROPERTIES LINKER_LANGUAGE Fortran Fortran_MODULE_DIRECTORY ${CMAKE_Fortran_MODULE_DIRECTORY} @@ -71,13 +76,12 @@ endif () file (MAKE_DIRECTORY "${HDF5_F90_BINARY_DIR}/static") set (MOD_BUILD_DIR ${CMAKE_Fortran_MODULE_DIRECTORY}/static/${HDF_CFG_BUILD_TYPE}) -INCLUDE_DIRECTORIES (${HDF5_F90_SOURCE_DIR} ${HDF5_F90_BINARY_DIR} ${CMAKE_Fortran_MODULE_DIRECTORY}) - #----------------------------------------------------------------------------- add_executable (H5match_types ${HDF5_F90_BINARY_DIR}/H5fort_type_defines.h ${HDF5_F90_SRC_SOURCE_DIR}/H5match_types.c ) +target_include_directories(H5match_types PRIVATE "${HDF5_BINARY_DIR};${HDF5_SRC_DIR};${HDF5_F90_BINARY_DIR}") add_custom_command ( OUTPUT ${HDF5_F90_BINARY_DIR}/static/H5f90i_gen.h ${HDF5_F90_BINARY_DIR}/static/H5fortran_types.F90 @@ -132,31 +136,36 @@ set (f90CStub_C_SHHDRS ) add_library (${HDF5_F90_C_LIB_TARGET} STATIC ${f90CStub_C_SOURCES} ${f90CStub_C_HDRS}) -target_include_directories(${HDF5_F90_C_LIB_TARGET} PUBLIC ${HDF5_F90_BINARY_DIR}/static) -TARGET_C_PROPERTIES (${HDF5_F90_C_LIB_TARGET} STATIC " " " ") +target_include_directories(${HDF5_F90_C_LIB_TARGET} + PRIVATE "${HDF5_SRC_DIR};${HDF5_BINARY_DIR};${HDF5_F90_BINARY_DIR};${HDF5_F90_BINARY_DIR}/static" + INTERFACE "$/include>" +) +TARGET_C_PROPERTIES (${HDF5_F90_C_LIB_TARGET} STATIC) target_link_libraries (${HDF5_F90_C_LIB_TARGET} PUBLIC ${HDF5_LIB_TARGET}) set_global_variable (HDF5_LIBRARIES_TO_EXPORT "${HDF5_LIBRARIES_TO_EXPORT};${HDF5_F90_C_LIB_TARGET}") H5_SET_LIB_OPTIONS (${HDF5_F90_C_LIB_TARGET} ${HDF5_F90_C_LIB_NAME} STATIC 0) set_target_properties (${HDF5_F90_C_LIB_TARGET} PROPERTIES FOLDER libraries/fortran LINKER_LANGUAGE C - INTERFACE_INCLUDE_DIRECTORIES "$/include>" ) set (install_targets ${HDF5_F90_C_LIB_TARGET}) if (BUILD_SHARED_LIBS) add_library (${HDF5_F90_C_LIBSH_TARGET} SHARED ${f90CStub_C_SOURCES} ${f90CStub_C_SHHDRS}) - target_include_directories(${HDF5_F90_C_LIBSH_TARGET} PUBLIC ${HDF5_F90_BINARY_DIR}/shared) - TARGET_C_PROPERTIES (${HDF5_F90_C_LIBSH_TARGET} SHARED " " " ") + target_include_directories(${HDF5_F90_C_LIBSH_TARGET} + PRIVATE "${HDF5_SRC_DIR};${HDF5_BINARY_DIR};${HDF5_F90_BINARY_DIR};${HDF5_F90_BINARY_DIR}/shared" + INTERFACE "$/include>" + ) + target_compile_definitions(${HDF5_F90_C_LIBSH_TARGET} + PUBLIC "H5_BUILT_AS_DYNAMIC_LIB" + ) + TARGET_C_PROPERTIES (${HDF5_F90_C_LIBSH_TARGET} SHARED) target_link_libraries (${HDF5_F90_C_LIBSH_TARGET} PUBLIC ${HDF5_LIBSH_TARGET}) set_global_variable (HDF5_LIBRARIES_TO_EXPORT "${HDF5_LIBRARIES_TO_EXPORT};${HDF5_F90_C_LIBSH_TARGET}") H5_SET_LIB_OPTIONS (${HDF5_F90_C_LIBSH_TARGET} ${HDF5_F90_C_LIB_NAME} SHARED "F") set_target_properties (${HDF5_F90_C_LIBSH_TARGET} PROPERTIES FOLDER libraries/fortran LINKER_LANGUAGE C - COMPILE_DEFINITIONS "H5_BUILT_AS_DYNAMIC_LIB" - INTERFACE_INCLUDE_DIRECTORIES "$/include>" - INTERFACE_COMPILE_DEFINITIONS H5_BUILT_AS_DYNAMIC_LIB=1 ) set (install_targets ${install_targets} ${HDF5_F90_C_LIBSH_TARGET}) endif () @@ -246,58 +255,87 @@ endif () # Add Main fortran library #----------------------------------------------------------------------------- add_library (${HDF5_F90_LIB_TARGET} STATIC ${f90_F_SOURCES}) -set (SHARED_LINK_FLAGS " ") -TARGET_FORTRAN_PROPERTIES (${HDF5_F90_LIB_TARGET} STATIC " " " ") -target_link_libraries (${HDF5_F90_LIB_TARGET} PUBLIC ${HDF5_F90_C_LIB_TARGET}) -target_link_libraries (${HDF5_F90_LIB_TARGET} PRIVATE ${LINK_Fortran_LIBS}) -target_include_directories (${HDF5_F90_LIB_TARGET} PUBLIC ${CMAKE_Fortran_MODULE_DIRECTORY}/static) -if (H5_HAVE_PARALLEL AND MPI_Fortran_FOUND) - target_include_directories (${HDF5_F90_LIB_TARGET} PUBLIC ${MPI_Fortran_INCLUDE_DIRS}) -endif () -set_global_variable (HDF5_LIBRARIES_TO_EXPORT "${HDF5_LIBRARIES_TO_EXPORT};${HDF5_F90_LIB_TARGET}") -H5_SET_LIB_OPTIONS (${HDF5_F90_LIB_TARGET} ${HDF5_F90_LIB_NAME} STATIC 0) +target_include_directories (${HDF5_F90_LIB_TARGET} + PRIVATE + "${HDF5_F90_SRC_SOURCE_DIR};${CMAKE_Fortran_MODULE_DIRECTORY}/static;${HDF5_F90_BINARY_DIR};$<$:${MPI_Fortran_INCLUDE_DIRS}>" + INTERFACE + "$/include>" +) +target_compile_definitions(${HDF5_F90_LIB_TARGET} + PRIVATE + $<$:HDF5F90_WINDOWS> + $<$:${WIN_COMPILE_FLAGS}> +) +target_link_libraries (${HDF5_F90_LIB_TARGET} + PUBLIC + ${HDF5_F90_C_LIB_TARGET} + PRIVATE + ${LINK_Fortran_LIBS} + $<$:${MPI_Fortran_LIBRARIES}> +) +#set_property(TARGET ${HDF5_F90_LIB_TARGET} APPEND PROPERTY +# LINK_FLAGS $<$:"-SUBSYSTEM:CONSOLE"> +#) +#set_property(TARGET ${HDF5_F90_LIB_TARGET} APPEND PROPERTY +# LINK_FLAGS $<$:${WIN_LINK_FLAGS}> +#) +if(MSVC) + set_property(TARGET ${HDF5_F90_LIB_TARGET} PROPERTY LINK_FLAGS "/SUBSYSTEM:CONSOLE ${WIN_LINK_FLAGS}") +endif() set_target_properties (${HDF5_F90_LIB_TARGET} PROPERTIES FOLDER libraries/fortran LINKER_LANGUAGE Fortran - INTERFACE_INCLUDE_DIRECTORIES "$/include>" Fortran_MODULE_DIRECTORY ${CMAKE_Fortran_MODULE_DIRECTORY}/static ) -if (WIN32) - set_property (TARGET ${HDF5_F90_LIB_TARGET} - APPEND PROPERTY COMPILE_DEFINITIONS "HDF5F90_WINDOWS" - ) -endif () +H5_SET_LIB_OPTIONS (${HDF5_F90_LIB_TARGET} ${HDF5_F90_LIB_NAME} STATIC 0) +set_global_variable (HDF5_LIBRARIES_TO_EXPORT "${HDF5_LIBRARIES_TO_EXPORT};${HDF5_F90_LIB_TARGET}") set (install_targets ${install_targets} ${HDF5_F90_LIB_TARGET}) add_dependencies(${HDF5_F90_LIB_TARGET} H5gen) if (BUILD_SHARED_LIBS) add_library (${HDF5_F90_LIBSH_TARGET} SHARED ${f90_F_SOURCES_SHARED}) - set (SHARED_LINK_FLAGS " ") - if (WIN32 AND MSVC) - set (SHARED_LINK_FLAGS "/DLL /DEF:${HDF5_F90_SRC_BINARY_DIR}/hdf5_fortrandll.def") - endif () - TARGET_FORTRAN_PROPERTIES (${HDF5_F90_LIBSH_TARGET} SHARED " " ${SHARED_LINK_FLAGS}) - target_link_libraries (${HDF5_F90_LIBSH_TARGET} PUBLIC ${HDF5_F90_C_LIBSH_TARGET}) - target_link_libraries (${HDF5_F90_LIBSH_TARGET} PRIVATE ${LINK_Fortran_LIBS}) - target_include_directories (${HDF5_F90_LIBSH_TARGET} PUBLIC ${CMAKE_Fortran_MODULE_DIRECTORY}/shared) - if (H5_HAVE_PARALLEL AND MPI_Fortran_FOUND) - target_include_directories (${HDF5_F90_LIBSH_TARGET} PUBLIC ${MPI_Fortran_INCLUDE_DIRS}) - endif () - set_global_variable (HDF5_LIBRARIES_TO_EXPORT "${HDF5_LIBRARIES_TO_EXPORT};${HDF5_F90_LIBSH_TARGET}") - H5_SET_LIB_OPTIONS (${HDF5_F90_LIBSH_TARGET} ${HDF5_F90_LIB_NAME} SHARED "F") + target_include_directories (${HDF5_F90_LIBSH_TARGET} + PRIVATE + "${HDF5_F90_SRC_SOURCE_DIR};${CMAKE_Fortran_MODULE_DIRECTORY}/shared;${HDF5_F90_BINARY_DIR};$<$:${MPI_Fortran_INCLUDE_DIRS}>" + INTERFACE + "$/include>" + ) + target_compile_definitions(${HDF5_F90_LIBSH_TARGET} + PUBLIC + "H5_BUILT_AS_DYNAMIC_LIB" + PRIVATE + $<$:BUILD_HDF5_DLL;HDF5F90_WINDOWS> + $<$:/dll> + $<$:${WIN_COMPILE_FLAGS}> + ) + target_link_libraries (${HDF5_F90_LIBSH_TARGET} + PUBLIC + ${HDF5_F90_C_LIBSH_TARGET} + PRIVATE + ${LINK_Fortran_LIBS} $<$:${MPI_Fortran_LIBRARIES}> + ) +# set_property(TARGET ${HDF5_F90_LIBSH_TARGET} APPEND PROPERTY +# LINK_FLAGS $<$:"-SUBSYSTEM:CONSOLE"> +# ) +# set_property(TARGET ${HDF5_F90_LIBSH_TARGET} APPEND PROPERTY +# LINK_FLAGS $<$:${WIN_LINK_FLAGS}> +# ) +# set_property(TARGET ${HDF5_F90_LIBSH_TARGET} APPEND PROPERTY +# LINK_FLAGS $<$:"-DLL"> +# ) +# set_property(TARGET ${HDF5_F90_LIBSH_TARGET} APPEND PROPERTY +# LINK_FLAGS $<$:"-DEF:${HDF5_F90_SRC_BINARY_DIR}/hdf5_fortrandll.def"> +# ) + if(MSVC) + set_property(TARGET ${HDF5_F90_LIBSH_TARGET} PROPERTY LINK_FLAGS "/SUBSYSTEM:CONSOLE ${WIN_LINK_FLAGS} /DLL /DEF:${HDF5_F90_SRC_BINARY_DIR}/hdf5_fortrandll.def") + endif() set_target_properties (${HDF5_F90_LIBSH_TARGET} PROPERTIES FOLDER libraries/fortran LINKER_LANGUAGE Fortran - COMPILE_DEFINITIONS "H5_BUILT_AS_DYNAMIC_LIB" - INTERFACE_INCLUDE_DIRECTORIES "$/include>" - INTERFACE_COMPILE_DEFINITIONS H5_BUILT_AS_DYNAMIC_LIB=1 Fortran_MODULE_DIRECTORY ${CMAKE_Fortran_MODULE_DIRECTORY}/shared ) - if (WIN32) - set_property (TARGET ${HDF5_F90_LIBSH_TARGET} - APPEND PROPERTY COMPILE_DEFINITIONS "BUILD_HDF5_DLL;HDF5F90_WINDOWS" - ) - endif () + set_global_variable (HDF5_LIBRARIES_TO_EXPORT "${HDF5_LIBRARIES_TO_EXPORT};${HDF5_F90_LIBSH_TARGET}") + H5_SET_LIB_OPTIONS (${HDF5_F90_LIBSH_TARGET} ${HDF5_F90_LIB_NAME} SHARED "F") set (install_targets ${install_targets} ${HDF5_F90_LIBSH_TARGET}) add_dependencies(${HDF5_F90_LIBSH_TARGET} H5genSH) endif () diff --git a/fortran/src/H5config_f.inc.cmake b/fortran/src/H5config_f.inc.cmake index f85db6c..b8d5355 100644 --- a/fortran/src/H5config_f.inc.cmake +++ b/fortran/src/H5config_f.inc.cmake @@ -12,87 +12,59 @@ ! fortran/src/H5config_f.inc. Generated from fortran/src/H5config_f.inc.in by configure ! Define if we have parallel support -#define H5_HAVE_PARALLEL @CMAKE_H5_HAVE_PARALLEL@ - -#if H5_HAVE_PARALLEL==0 -#undef H5_HAVE_PARALLEL -#endif +#cmakedefine H5_HAVE_PARALLEL @H5_HAVE_PARALLEL@ ! Define if the intrinsic function STORAGE_SIZE exists -#define H5_FORTRAN_HAVE_STORAGE_SIZE @FORTRAN_HAVE_STORAGE_SIZE@ - -#if H5_FORTRAN_HAVE_STORAGE_SIZE==0 -#undef H5_FORTRAN_HAVE_STORAGE_SIZE -#endif +#cmakedefine H5_FORTRAN_HAVE_STORAGE_SIZE @H5_FORTRAN_HAVE_STORAGE_SIZE@ ! Define if the intrinsic function SIZEOF exists -#define H5_FORTRAN_HAVE_SIZEOF @FORTRAN_HAVE_SIZEOF@ - -#if H5_FORTRAN_HAVE_SIZEOF==0 -#undef H5_FORTRAN_HAVE_SIZEOF -#endif +#cmakedefine H5_FORTRAN_HAVE_SIZEOF @H5_FORTRAN_HAVE_SIZEOF@ ! Define if the intrinsic function C_SIZEOF exists -#define H5_FORTRAN_HAVE_C_SIZEOF @FORTRAN_HAVE_C_SIZEOF@ - -#if H5_FORTRAN_HAVE_C_SIZEOF==0 -#undef H5_FORTRAN_HAVE_C_SIZEOF -#endif +#cmakedefine H5_FORTRAN_HAVE_C_SIZEOF @H5_FORTRAN_HAVE_C_SIZEOF@ ! Define if the intrinsic C_LONG_DOUBLE exists -#define H5_FORTRAN_HAVE_C_LONG_DOUBLE @FORTRAN_HAVE_C_LONG_DOUBLE@ - -#if H5_FORTRAN_HAVE_C_LONG_DOUBLE==0 -#undef H5_FORTRAN_HAVE_C_LONG_DOUBLE -#endif +#define H5_FORTRAN_HAVE_C_LONG_DOUBLE @H5_FORTRAN_HAVE_C_LONG_DOUBLE@ ! Define if Fortran C_LONG_DOUBLE is different from C_DOUBLE -#define H5_FORTRAN_C_LONG_DOUBLE_IS_UNIQUE @FORTRAN_C_LONG_DOUBLE_IS_UNIQUE@ +#define H5_FORTRAN_C_LONG_DOUBLE_IS_UNIQUE @H5_FORTRAN_C_LONG_DOUBLE_IS_UNIQUE@ ! Define if the intrinsic module ISO_FORTRAN_ENV exists -#define H5_HAVE_ISO_FORTRAN_ENV @HAVE_ISO_FORTRAN_ENV@ +#cmakedefine H5_HAVE_ISO_FORTRAN_ENV @H5_HAVE_ISO_FORTRAN_ENV@ ! should this be ${HDF_PREFIX} instead of H5 MSB -#define H5_SIZEOF_DOUBLE @H5_SIZEOF_DOUBLE@ - -#if H5_SIZEOF_DOUBLE==0 -#undef H5_SIZEOF_DOUBLE -#endif +#cmakedefine H5_SIZEOF_DOUBLE @H5_SIZEOF_DOUBLE@ ! should this be ${HDF_PREFIX} instead of H5 MSB -#define H5_SIZEOF_LONG_DOUBLE @H5_SIZEOF_LONG_DOUBLE@ - -#if H5_SIZEOF_LONG_DOUBLE==0 -#undef H5_SIZEOF_LONG_DOUBLE -#endif +#cmakedefine H5_SIZEOF_LONG_DOUBLE @H5_SIZEOF_LONG_DOUBLE@ ! Define the maximum decimal precision for reals -#define H5_PAC_FC_MAX_REAL_PRECISION @H5_PAC_FC_MAX_REAL_PRECISION@ +#cmakedefine H5_PAC_FC_MAX_REAL_PRECISION @H5_PAC_FC_MAX_REAL_PRECISION@ ! If C has quad precision -#define H5_HAVE_FLOAT128 @H5_HAVE_FLOAT128@ +#cmakedefine H5_HAVE_FLOAT128 @H5_HAVE_FLOAT128@ -! Define if INTEGER*16 is available -#define H5_HAVE_Fortran_INTEGER_SIZEOF_16 @HAVE_Fortran_INTEGER_SIZEOF_16@ +! Define if INTEGER*16 is available +#define H5_HAVE_Fortran_INTEGER_SIZEOF_16 @H5_HAVE_Fortran_INTEGER_SIZEOF_16@ ! Maximum decimal precision for C -#define H5_PAC_C_MAX_REAL_PRECISION @H5_PAC_C_MAX_REAL_PRECISION@ +#cmakedefine H5_PAC_C_MAX_REAL_PRECISION @H5_PAC_C_MAX_REAL_PRECISION@ ! number of valid REAL KINDs -#define H5_H5CONFIG_F_NUM_RKIND @H5CONFIG_F_NUM_RKIND@ +#cmakedefine H5_H5CONFIG_F_NUM_RKIND @H5_H5CONFIG_F_NUM_RKIND@ ! valid REAL KINDs (need to have a matching C counter-part) -#define H5_H5CONFIG_F_RKIND @H5CONFIG_F_RKIND@ +#cmakedefine H5_H5CONFIG_F_RKIND @H5_H5CONFIG_F_RKIND@ ! valid REAL KINDs (need to have a matching C counter-part) -#define H5_H5CONFIG_F_RKIND_SIZEOF @H5CONFIG_F_RKIND_SIZEOF@ +#cmakedefine H5_H5CONFIG_F_RKIND_SIZEOF @H5_H5CONFIG_F_RKIND_SIZEOF@ ! number of valid INTEGER KINDs -#define H5_H5CONFIG_F_NUM_IKIND @H5CONFIG_F_NUM_IKIND@ +#cmakedefine H5_H5CONFIG_F_NUM_IKIND @H5_H5CONFIG_F_NUM_IKIND@ ! valid INTEGER KINDs (need to have a matching C counter-part) -#define H5_H5CONFIG_F_IKIND @H5CONFIG_F_IKIND@ +#cmakedefine H5_H5CONFIG_F_IKIND @H5_H5CONFIG_F_IKIND@ ! Fortran compiler id -#define H5_Fortran_COMPILER_ID @Fortran_COMPILER_ID@ +#cmakedefine H5_Fortran_COMPILER_ID @Fortran_COMPILER_ID@ diff --git a/fortran/src/H5fort_type_defines.h.cmake b/fortran/src/H5fort_type_defines.h.cmake new file mode 100644 index 0000000..1aa3181 --- /dev/null +++ b/fortran/src/H5fort_type_defines.h.cmake @@ -0,0 +1,28 @@ +/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + * Copyright by The HDF Group. * + * All rights reserved. * + * * + * This file is part of HDF5. The full HDF5 copyright notice, including * + * terms governing use, modification, and redistribution, is contained in * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ +/* If you are reading this file and it has a '.h' suffix, it was automatically + * generated from the '.in' version. Make changes there. + */ +#define H5_FORTRAN_NATIVE_INTEGER_KIND @PAC_FORTRAN_NATIVE_INTEGER_KIND@ +#define H5_FORTRAN_NATIVE_INTEGER_SIZEOF @PAC_FORTRAN_NATIVE_INTEGER_SIZEOF@ +#define H5_FORTRAN_NATIVE_REAL_KIND @PAC_FORTRAN_NATIVE_REAL_KIND@ +#define H5_FORTRAN_NATIVE_REAL_SIZEOF @PAC_FORTRAN_NATIVE_REAL_SIZEOF@ +#define H5_FORTRAN_NATIVE_DOUBLE_KIND @PAC_FORTRAN_NATIVE_DOUBLE_KIND@ +#define H5_FORTRAN_NATIVE_DOUBLE_SIZEOF @PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF@ +#define H5_FORTRAN_NUM_INTEGER_KINDS @PAC_FORTRAN_NUM_INTEGER_KINDS@ +#define H5_FORTRAN_INTEGER_KINDS @PAC_FC_ALL_INTEGER_KINDS@ +#define H5_FORTRAN_INTEGER_KINDS_SIZEOF @PAC_FC_ALL_INTEGER_KINDS_SIZEOF@ +#define H5_FORTRAN_REAL_KINDS @PAC_FC_ALL_REAL_KINDS@ +#define H5_FORTRAN_REAL_KINDS_SIZEOF @PAC_FC_ALL_REAL_KINDS_SIZEOF@ +#define H5_HAVE_Fortran_INTEGER_SIZEOF_16 @H5_HAVE_Fortran_INTEGER_SIZEOF_16@ +#define H5_FORTRAN_HAVE_C_LONG_DOUBLE @H5_FORTRAN_HAVE_C_LONG_DOUBLE@ +#define H5_FORTRAN_C_LONG_DOUBLE_IS_UNIQUE @H5_FORTRAN_C_LONG_DOUBLE_IS_UNIQUE@ diff --git a/fortran/test/CMakeLists.txt b/fortran/test/CMakeLists.txt index a5f5464..b45154e 100644 --- a/fortran/test/CMakeLists.txt +++ b/fortran/test/CMakeLists.txt @@ -1,32 +1,31 @@ cmake_minimum_required (VERSION 3.10) -PROJECT (HDF5_FORTRAN_TESTS C CXX Fortran) - -#----------------------------------------------------------------------------- -# Setup include Directories -#----------------------------------------------------------------------------- -INCLUDE_DIRECTORIES (${CMAKE_Fortran_MODULE_DIRECTORY} ${HDF5_FORTRAN_TESTS_SOURCE_DIR} ${HDF5_F90_BINARY_DIR} ${HDF5_F90_SRC_DIR}/src) +project (HDF5_FORTRAN_TESTS C Fortran) #----------------------------------------------------------------------------- # Setup the Fortran auto-detection utilities # H5_test_buildiface.F90 used to generate various KIND test interfaces #----------------------------------------------------------------------------- -add_executable (H5_test_buildiface - ${HDF5_F90_SRC_DIR}/test/H5_test_buildiface.F90 - ) - -if (WIN32 AND MSVC) - if (BUILD_SHARED_LIBS) - set_target_properties (H5_test_buildiface - PROPERTIES - COMPILE_FLAGS "/MT" - ) - endif () - set_target_properties (H5_test_buildiface - PROPERTIES - LINK_FLAGS "/SUBSYSTEM:CONSOLE" - ) -endif () +add_executable (H5_test_buildiface ${HDF5_F90_SRC_DIR}/test/H5_test_buildiface.F90) +target_include_directories(H5_test_buildiface + PRIVATE + ${HDF5_BINARY_DIR} ${HDF5_F90_BINARY_DIR} +) +#if (BUILD_SHARED_LIBS) +# target_compile_definitions(H5_test_buildiface +# PRIVATE +# $<$:/MT> +# ) +#endif () +if(MSVC) + set_property(TARGET H5_test_buildiface PROPERTY COMPILE_FLAGS "/MT") +endif() +#set_property(TARGET H5_test_buildiface APPEND PROPERTY +# LINK_FLAGS $<$:"-SUBSYSTEM:CONSOLE"> +#) +if(MSVC) + set_property(TARGET H5_test_buildiface PROPERTY LINK_FLAGS "/SUBSYSTEM:CONSOLE") +endif() set_target_properties (H5_test_buildiface PROPERTIES LINKER_LANGUAGE Fortran Fortran_MODULE_DIRECTORY ${CMAKE_Fortran_MODULE_DIRECTORY} @@ -44,9 +43,12 @@ set (MOD_BUILD_DIR ${CMAKE_Fortran_MODULE_DIRECTORY}/static/${HDF_CFG_BUILD_TYPE #----------------------------------------------------------------------------- add_library (${HDF5_F90_C_TEST_LIB_TARGET} STATIC t.c) set_source_files_properties (t.c PROPERTIES LANGUAGE C) -target_include_directories(${HDF5_F90_C_TEST_LIB_TARGET} PUBLIC ${HDF5_F90_BINARY_DIR}/static) -TARGET_C_PROPERTIES (${HDF5_F90_C_TEST_LIB_TARGET} STATIC " " " ") -target_link_libraries (${HDF5_F90_C_TEST_LIB_TARGET} +target_include_directories(${HDF5_F90_C_TEST_LIB_TARGET} + PRIVATE "${HDF5_SRC_DIR};${HDF5_BINARY_DIR};${HDF5_F90_BINARY_DIR};${HDF5_F90_BINARY_DIR}/static" + INTERFACE "$/include>" +) +TARGET_C_PROPERTIES (${HDF5_F90_C_TEST_LIB_TARGET} STATIC) +target_link_libraries (${HDF5_F90_C_TEST_LIB_TARGET} PRIVATE ${HDF5_F90_C_LIB_TARGET} ${HDF5_TEST_LIB_TARGET} ) @@ -54,13 +56,18 @@ H5_SET_LIB_OPTIONS (${HDF5_F90_C_TEST_LIB_TARGET} ${HDF5_F90_C_TEST_LIB_NAME} ST set_target_properties (${HDF5_F90_C_TEST_LIB_TARGET} PROPERTIES FOLDER libraries/test/fortran LINKER_LANGUAGE C - INTERFACE_INCLUDE_DIRECTORIES "$/include>" ) if (BUILD_SHARED_LIBS) add_library (${HDF5_F90_C_TEST_LIBSH_TARGET} SHARED t.c) - target_include_directories(${HDF5_F90_C_TEST_LIBSH_TARGET} PUBLIC ${HDF5_F90_BINARY_DIR}/shared) - TARGET_C_PROPERTIES (${HDF5_F90_C_TEST_LIBSH_TARGET} SHARED " " " ") - target_link_libraries (${HDF5_F90_C_TEST_LIBSH_TARGET} + target_include_directories(${HDF5_F90_C_TEST_LIBSH_TARGET} + PRIVATE "${HDF5_SRC_DIR};${HDF5_BINARY_DIR};${HDF5_F90_BINARY_DIR};${HDF5_F90_BINARY_DIR}/shared" + INTERFACE "$/include>" + ) + target_compile_definitions(${HDF5_F90_C_TEST_LIBSH_TARGET} + PUBLIC "H5_BUILT_AS_DYNAMIC_LIB" + ) + TARGET_C_PROPERTIES (${HDF5_F90_C_TEST_LIBSH_TARGET} SHARED) + target_link_libraries (${HDF5_F90_C_TEST_LIBSH_TARGET} PRIVATE ${HDF5_F90_C_LIBSH_TARGET} ${HDF5_TEST_LIBSH_TARGET} ) @@ -68,9 +75,6 @@ if (BUILD_SHARED_LIBS) set_target_properties (${HDF5_F90_C_TEST_LIBSH_TARGET} PROPERTIES FOLDER libraries/test/fortran LINKER_LANGUAGE C - COMPILE_DEFINITIONS "H5_BUILT_AS_DYNAMIC_LIB" - INTERFACE_INCLUDE_DIRECTORIES "$/include>" - INTERFACE_COMPILE_DEFINITIONS H5_BUILT_AS_DYNAMIC_LIB=1 ) endif () @@ -120,54 +124,76 @@ if (BUILD_SHARED_LIBS) endif () add_library (${HDF5_F90_TEST_LIB_TARGET} STATIC ${HDF5_F90_TF_SOURCES}) -TARGET_FORTRAN_PROPERTIES (${HDF5_F90_TEST_LIB_TARGET} STATIC " " " ") +target_include_directories (${HDF5_F90_TEST_LIB_TARGET} + PRIVATE + "${CMAKE_Fortran_MODULE_DIRECTORY}/static;${HDF5_F90_BINARY_DIR};${HDF5_F90_BINARY_DIR}/static" + INTERFACE + "$/include>" +) +target_compile_definitions(${HDF5_F90_TEST_LIB_TARGET} + PRIVATE + $<$:HDF5F90_WINDOWS> + $<$:${WIN_COMPILE_FLAGS}> +) target_link_libraries (${HDF5_F90_TEST_LIB_TARGET} - ${HDF5_F90_C_TEST_LIB_TARGET} - ${HDF5_F90_LIB_TARGET} - ${HDF5_LIB_TARGET} + PUBLIC + ${HDF5_F90_C_TEST_LIB_TARGET} ${HDF5_F90_LIB_TARGET} ${HDF5_LIB_TARGET} ) -H5_SET_LIB_OPTIONS (${HDF5_F90_TEST_LIB_TARGET} ${HDF5_F90_TEST_LIB_NAME} STATIC 0) -target_include_directories (${HDF5_F90_TEST_LIB_TARGET} PRIVATE ${CMAKE_Fortran_MODULE_DIRECTORY}/static) +#set_property(TARGET ${HDF5_F90_TEST_LIB_TARGET} APPEND PROPERTY +# LINK_FLAGS $<$:"-SUBSYSTEM:CONSOLE"> +#) +#set_property(TARGET ${HDF5_F90_TEST_LIB_TARGET} APPEND PROPERTY +# LINK_FLAGS $<$:${WIN_LINK_FLAGS}> +#) +if(MSVC) + set_property(TARGET ${HDF5_F90_TEST_LIB_TARGET} PROPERTY LINK_FLAGS "/SUBSYSTEM:CONSOLE ${WIN_LINK_FLAGS}") +endif() set_target_properties (${HDF5_F90_TEST_LIB_TARGET} PROPERTIES FOLDER libraries/test/fortran LINKER_LANGUAGE Fortran - INTERFACE_INCLUDE_DIRECTORIES "$/include>" Fortran_MODULE_DIRECTORY ${CMAKE_Fortran_MODULE_DIRECTORY}/static ) -if (WIN32) - set_property (TARGET ${HDF5_F90_TEST_LIB_TARGET} APPEND PROPERTY - COMPILE_DEFINITIONS "HDF5F90_WINDOWS" - ) -endif () +H5_SET_LIB_OPTIONS (${HDF5_F90_TEST_LIB_TARGET} ${HDF5_F90_TEST_LIB_NAME} STATIC 0) add_dependencies(${HDF5_F90_TEST_LIB_TARGET} H5testgen) if (BUILD_SHARED_LIBS) add_library (${HDF5_F90_TEST_LIBSH_TARGET} SHARED ${HDF5_F90_TF_SOURCES_SHARED}) - set (SHARED_LINK_FLAGS " ") - if (WIN32 AND MSVC) - set (SHARED_LINK_FLAGS "/DLL") - endif () - TARGET_FORTRAN_PROPERTIES (${HDF5_F90_TEST_LIBSH_TARGET} SHARED " " ${SHARED_LINK_FLAGS}) + target_include_directories (${HDF5_F90_TEST_LIBSH_TARGET} + PRIVATE + "${CMAKE_Fortran_MODULE_DIRECTORY}/shared;${HDF5_F90_BINARY_DIR};${HDF5_F90_BINARY_DIR}/shared" + INTERFACE + "$/include>" + ) + target_compile_definitions(${HDF5_F90_TEST_LIBSH_TARGET} + PUBLIC + "H5_BUILT_AS_DYNAMIC_LIB" + PRIVATE + $<$:BUILD_HDF5_TEST_DLL;HDF5F90_WINDOWS> + $<$:/dll> + $<$:${WIN_COMPILE_FLAGS}> + ) target_link_libraries (${HDF5_F90_TEST_LIBSH_TARGET} - ${HDF5_F90_C_TEST_LIBSH_TARGET} - ${HDF5_F90_LIBSH_TARGET} - ${HDF5_LIBSH_TARGET} + PUBLIC + ${HDF5_F90_C_TEST_LIBSH_TARGET} ${HDF5_F90_LIBSH_TARGET} ${HDF5_LIBSH_TARGET} ) - H5_SET_LIB_OPTIONS (${HDF5_F90_TEST_LIBSH_TARGET} ${HDF5_F90_TEST_LIB_NAME} SHARED "F") - target_include_directories (${HDF5_F90_TEST_LIBSH_TARGET} PRIVATE ${CMAKE_Fortran_MODULE_DIRECTORY}/shared) +# set_property(TARGET ${HDF5_F90_TEST_LIBSH_TARGET} APPEND PROPERTY +# LINK_FLAGS $<$:"-SUBSYSTEM:CONSOLE"> +# ) +# set_property(TARGET ${HDF5_F90_TEST_LIBSH_TARGET} APPEND PROPERTY +# LINK_FLAGS $<$:${WIN_LINK_FLAGS}> +# ) +# set_property(TARGET ${HDF5_F90_TEST_LIBSH_TARGET} APPEND PROPERTY +# LINK_FLAGS $<$:"-DLL"> +# ) + if(MSVC) + set_property(TARGET ${HDF5_F90_TEST_LIBSH_TARGET} PROPERTY LINK_FLAGS "/SUBSYSTEM:CONSOLE ${WIN_LINK_FLAGS} -DLL") + endif() set_target_properties (${HDF5_F90_TEST_LIBSH_TARGET} PROPERTIES FOLDER libraries/test/fortran LINKER_LANGUAGE Fortran - COMPILE_DEFINITIONS "H5_BUILT_AS_DYNAMIC_LIB" - INTERFACE_INCLUDE_DIRECTORIES "$/include>" - INTERFACE_COMPILE_DEFINITIONS H5_BUILT_AS_DYNAMIC_LIB=1 Fortran_MODULE_DIRECTORY ${CMAKE_Fortran_MODULE_DIRECTORY}/shared ) - if (WIN32) - set_property (TARGET ${HDF5_F90_TEST_LIBSH_TARGET} APPEND PROPERTY - COMPILE_DEFINITIONS "BUILD_HDF5_TEST_DLL;HDF5F90_WINDOWS" - ) - endif () + H5_SET_LIB_OPTIONS (${HDF5_F90_TEST_LIBSH_TARGET} ${HDF5_F90_TEST_LIB_NAME} SHARED "F") add_dependencies(${HDF5_F90_TEST_LIBSH_TARGET} H5testgenSH) endif () @@ -193,16 +219,27 @@ add_executable (testhdf5_fortran tH5Z.F90 tHDF5.F90 ) -TARGET_FORTRAN_PROPERTIES (testhdf5_fortran STATIC " " " ") +target_include_directories (testhdf5_fortran + PRIVATE + "${CMAKE_Fortran_MODULE_DIRECTORY}/static;${HDF5_F90_BINARY_DIR};${HDF5_F90_BINARY_DIR}/static" +) +target_compile_options(testhdf5_fortran + PRIVATE + $<$:${WIN_COMPILE_FLAGS}> +) target_link_libraries (testhdf5_fortran - ${HDF5_F90_TEST_LIB_TARGET} - ${HDF5_F90_LIB_TARGET} - ${HDF5_LIB_TARGET} + PRIVATE + ${HDF5_F90_TEST_LIB_TARGET} ${HDF5_F90_LIB_TARGET} ${HDF5_LIB_TARGET} $<$:ws2_32.lib> ) -if (WIN32 AND MSVC) - target_link_libraries (testhdf5_fortran "ws2_32.lib") -endif () -target_include_directories (testhdf5_fortran PRIVATE ${CMAKE_Fortran_MODULE_DIRECTORY}/static) +#set_property(TARGET testhdf5_fortran APPEND PROPERTY +# LINK_FLAGS $<$:"-SUBSYSTEM:CONSOLE"> +#) +#set_property(TARGET testhdf5_fortran APPEND PROPERTY +# LINK_FLAGS $<$:${WIN_LINK_FLAGS}> +#) +if(MSVC) + set_property(TARGET testhdf5_fortran PROPERTY LINK_FLAGS "/SUBSYSTEM:CONSOLE ${WIN_LINK_FLAGS}") +endif() set_target_properties (testhdf5_fortran PROPERTIES LINKER_LANGUAGE Fortran FOLDER test/fortran @@ -228,20 +265,32 @@ if (BUILD_SHARED_LIBS) tH5Z.F90 tHDF5.F90 ) - TARGET_FORTRAN_PROPERTIES (testhdf5_fortran-shared SHARED " " " ") + target_include_directories (testhdf5_fortran-shared + PRIVATE + "${CMAKE_Fortran_MODULE_DIRECTORY}/shared;${HDF5_F90_BINARY_DIR};${HDF5_F90_BINARY_DIR}/shared" + ) + target_compile_options(testhdf5_fortran-shared + PRIVATE + $<$:/dll> + $<$:${WIN_COMPILE_FLAGS}> + ) target_link_libraries (testhdf5_fortran-shared - ${HDF5_F90_TEST_LIBSH_TARGET} - ${HDF5_F90_LIBSH_TARGET} - ${HDF5_LIBSH_TARGET} - ) - if (WIN32 AND MSVC) - target_link_libraries (testhdf5_fortran-shared "ws2_32.lib") - endif () - target_include_directories (testhdf5_fortran-shared PRIVATE ${CMAKE_Fortran_MODULE_DIRECTORY}/shared) + PRIVATE + ${HDF5_F90_TEST_LIBSH_TARGET} ${HDF5_F90_LIBSH_TARGET} ${HDF5_LIBSH_TARGET} $<$:ws2_32.lib> + ) +# set_property(TARGET testhdf5_fortran-shared APPEND PROPERTY +# LINK_FLAGS $<$:"-SUBSYSTEM:CONSOLE"> +# ) +# set_property(TARGET testhdf5_fortran-shared APPEND PROPERTY +# LINK_FLAGS $<$:${WIN_LINK_FLAGS}> +# ) + if(MSVC) + set_property(TARGET testhdf5_fortran-shared PROPERTY LINK_FLAGS "/SUBSYSTEM:CONSOLE ${WIN_LINK_FLAGS}") + endif() set_target_properties (testhdf5_fortran-shared PROPERTIES - LINKER_LANGUAGE Fortran - FOLDER test/fortran - Fortran_MODULE_DIRECTORY ${CMAKE_Fortran_MODULE_DIRECTORY}/shared + LINKER_LANGUAGE Fortran + FOLDER test/fortran + Fortran_MODULE_DIRECTORY ${CMAKE_Fortran_MODULE_DIRECTORY}/shared ) add_dependencies (testhdf5_fortran-shared ${HDF5_F90_TEST_LIBSH_TARGET}) endif () @@ -255,16 +304,27 @@ add_executable (testhdf5_fortran_1_8 tH5MISC_1_8.F90 tHDF5_1_8.F90 ) -TARGET_FORTRAN_PROPERTIES (testhdf5_fortran_1_8 STATIC " " " ") +target_include_directories (testhdf5_fortran_1_8 + PRIVATE + "${CMAKE_Fortran_MODULE_DIRECTORY}/static;${HDF5_F90_BINARY_DIR};${HDF5_F90_BINARY_DIR}/static" +) +target_compile_options(testhdf5_fortran_1_8 + PRIVATE + $<$:${WIN_COMPILE_FLAGS}> +) target_link_libraries (testhdf5_fortran_1_8 - ${HDF5_F90_TEST_LIB_TARGET} - ${HDF5_F90_LIB_TARGET} - ${HDF5_LIB_TARGET} + PRIVATE + ${HDF5_F90_TEST_LIB_TARGET} ${HDF5_F90_LIB_TARGET} ${HDF5_LIB_TARGET} $<$:ws2_32.lib> ) -if (WIN32 AND MSVC) - target_link_libraries (testhdf5_fortran_1_8 "ws2_32.lib") -endif () -target_include_directories (testhdf5_fortran_1_8 PRIVATE ${CMAKE_Fortran_MODULE_DIRECTORY}/static) +#set_property(TARGET testhdf5_fortran_1_8 APPEND PROPERTY +# LINK_FLAGS $<$:"-SUBSYSTEM:CONSOLE"> +#) +#set_property(TARGET testhdf5_fortran_1_8 APPEND PROPERTY +# LINK_FLAGS $<$:${WIN_LINK_FLAGS}> +#) +if(MSVC) + set_property(TARGET testhdf5_fortran_1_8 PROPERTY LINK_FLAGS "/SUBSYSTEM:CONSOLE ${WIN_LINK_FLAGS}") +endif() set_target_properties (testhdf5_fortran_1_8 PROPERTIES LINKER_LANGUAGE Fortran FOLDER test/fortran @@ -281,20 +341,32 @@ if (BUILD_SHARED_LIBS) tH5MISC_1_8.F90 tHDF5_1_8.F90 ) - TARGET_FORTRAN_PROPERTIES (testhdf5_fortran_1_8-shared SHARED " " " ") + target_include_directories (testhdf5_fortran_1_8-shared + PRIVATE + "${CMAKE_Fortran_MODULE_DIRECTORY}/shared;${HDF5_F90_BINARY_DIR};${HDF5_F90_BINARY_DIR}/shared" + ) + target_compile_options(testhdf5_fortran_1_8-shared + PRIVATE + $<$:/dll> + $<$:${WIN_COMPILE_FLAGS}> + ) target_link_libraries (testhdf5_fortran_1_8-shared - ${HDF5_F90_TEST_LIBSH_TARGET} - ${HDF5_F90_LIBSH_TARGET} - ${HDF5_LIBSH_TARGET} - ) - if (WIN32 AND MSVC) - target_link_libraries (testhdf5_fortran_1_8-shared "ws2_32.lib") - endif () - target_include_directories (testhdf5_fortran_1_8-shared PRIVATE ${CMAKE_Fortran_MODULE_DIRECTORY}/shared) + PRIVATE + ${HDF5_F90_TEST_LIBSH_TARGET} ${HDF5_F90_LIBSH_TARGET} ${HDF5_LIBSH_TARGET} $<$:ws2_32.lib> + ) +# set_property(TARGET testhdf5_fortran_1_8-shared APPEND PROPERTY +# LINK_FLAGS $<$:"-SUBSYSTEM:CONSOLE"> +# ) +# set_property(TARGET testhdf5_fortran_1_8-shared APPEND PROPERTY +# LINK_FLAGS $<$:${WIN_LINK_FLAGS}> +# ) + if(MSVC) + set_property(TARGET testhdf5_fortran_1_8-shared PROPERTY LINK_FLAGS "/SUBSYSTEM:CONSOLE ${WIN_LINK_FLAGS}") + endif() set_target_properties (testhdf5_fortran_1_8-shared PROPERTIES - LINKER_LANGUAGE Fortran - FOLDER test/fortran - Fortran_MODULE_DIRECTORY ${CMAKE_Fortran_MODULE_DIRECTORY}/shared + LINKER_LANGUAGE Fortran + FOLDER test/fortran + Fortran_MODULE_DIRECTORY ${CMAKE_Fortran_MODULE_DIRECTORY}/shared ) add_dependencies (testhdf5_fortran_1_8-shared ${HDF5_F90_TEST_LIBSH_TARGET}) endif () @@ -310,16 +382,27 @@ add_executable (fortranlib_test_F03 tH5T_F03.F90 tHDF5_F03.F90 ) -TARGET_FORTRAN_PROPERTIES (fortranlib_test_F03 STATIC " " " ") +target_include_directories (fortranlib_test_F03 + PRIVATE + "${CMAKE_Fortran_MODULE_DIRECTORY}/static;${HDF5_F90_BINARY_DIR};${HDF5_F90_BINARY_DIR}/static" +) +target_compile_options(fortranlib_test_F03 + PRIVATE + $<$:${WIN_COMPILE_FLAGS}> +) target_link_libraries (fortranlib_test_F03 - ${HDF5_F90_TEST_LIB_TARGET} - ${HDF5_F90_LIB_TARGET} - ${HDF5_LIB_TARGET} + PRIVATE + ${HDF5_F90_TEST_LIB_TARGET} ${HDF5_F90_LIB_TARGET} ${HDF5_LIB_TARGET} $<$:ws2_32.lib> ) -if (WIN32 AND MSVC) - target_link_libraries (fortranlib_test_F03 "ws2_32.lib") -endif () -target_include_directories (fortranlib_test_F03 PRIVATE ${CMAKE_Fortran_MODULE_DIRECTORY}/static) +#set_property(TARGET fortranlib_test_F03 APPEND PROPERTY +# LINK_FLAGS $<$:"-SUBSYSTEM:CONSOLE"> +#) +#set_property(TARGET fortranlib_test_F03 APPEND PROPERTY +# LINK_FLAGS $<$:${WIN_LINK_FLAGS}> +#) +if(MSVC) + set_property(TARGET fortranlib_test_F03 PROPERTY LINK_FLAGS "/SUBSYSTEM:CONSOLE ${WIN_LINK_FLAGS}") +endif() set_target_properties (fortranlib_test_F03 PROPERTIES LINKER_LANGUAGE Fortran FOLDER test/fortran @@ -338,17 +421,28 @@ if (BUILD_SHARED_LIBS) tH5T_F03.F90 tHDF5_F03.F90 ) - TARGET_FORTRAN_PROPERTIES (fortranlib_test_F03-shared SHARED " " " ") + target_include_directories (fortranlib_test_F03-shared + PRIVATE + "${CMAKE_Fortran_MODULE_DIRECTORY}/shared;${HDF5_F90_BINARY_DIR};${HDF5_F90_BINARY_DIR}/shared" + ) + target_compile_options(fortranlib_test_F03-shared + PRIVATE + $<$:/dll> + $<$:${WIN_COMPILE_FLAGS}> + ) target_link_libraries (fortranlib_test_F03-shared - ${HDF5_F90_TEST_LIBSH_TARGET} - ${HDF5_F90_LIBSH_TARGET} - ${HDF5_LIBSH_TARGET} + PRIVATE + ${HDF5_F90_TEST_LIBSH_TARGET} ${HDF5_F90_LIBSH_TARGET} ${HDF5_LIBSH_TARGET} $<$:ws2_32.lib> ) - if (WIN32 AND MSVC) - target_link_libraries (fortranlib_test_F03-shared "ws2_32.lib") - endif () - - target_include_directories (fortranlib_test_F03-shared PRIVATE ${CMAKE_Fortran_MODULE_DIRECTORY}/shared) +# set_property(TARGET fortranlib_test_F03-shared APPEND PROPERTY +# LINK_FLAGS $<$:"-SUBSYSTEM:CONSOLE"> +# ) +# set_property(TARGET fortranlib_test_F03-shared APPEND PROPERTY +# LINK_FLAGS $<$:${WIN_LINK_FLAGS}> +# ) + if(MSVC) + set_property(TARGET fortranlib_test_F03-shared PROPERTY LINK_FLAGS "/SUBSYSTEM:CONSOLE ${WIN_LINK_FLAGS}") + endif() set_target_properties (fortranlib_test_F03-shared PROPERTIES LINKER_LANGUAGE Fortran FOLDER test/fortran @@ -359,16 +453,27 @@ endif () #-- Adding test for fflush1 add_executable (fflush1 fflush1.F90) -TARGET_FORTRAN_PROPERTIES (fflush1 STATIC " " " ") +target_include_directories (fflush1 + PRIVATE + ${CMAKE_Fortran_MODULE_DIRECTORY}/static +) +target_compile_options(fflush1 + PRIVATE + $<$:${WIN_COMPILE_FLAGS}> +) target_link_libraries (fflush1 - ${HDF5_F90_LIB_TARGET} - ${HDF5_F90_TEST_LIB_TARGET} - ${HDF5_LIB_TARGET} + PRIVATE + ${HDF5_F90_LIB_TARGET} ${HDF5_F90_TEST_LIB_TARGET} ${HDF5_LIB_TARGET} $<$:ws2_32.lib> ) -if (WIN32 AND MSVC) - target_link_libraries (fflush1 "ws2_32.lib") -endif () -target_include_directories (fflush1 PRIVATE ${CMAKE_Fortran_MODULE_DIRECTORY}/static) +#set_property(TARGET fflush1 APPEND PROPERTY +# LINK_FLAGS $<$:"-SUBSYSTEM:CONSOLE"> +#) +#set_property(TARGET fflush1 APPEND PROPERTY +# LINK_FLAGS $<$:${WIN_LINK_FLAGS}> +#) +if(MSVC) + set_property(TARGET fflush1 PROPERTY LINK_FLAGS "/SUBSYSTEM:CONSOLE ${WIN_LINK_FLAGS}") +endif() set_target_properties (fflush1 PROPERTIES LINKER_LANGUAGE Fortran FOLDER test/fortran @@ -378,36 +483,59 @@ add_dependencies (fflush1 ${HDF5_F90_TEST_LIB_TARGET}) if (BUILD_SHARED_LIBS) add_executable (fflush1-shared fflush1.F90) - TARGET_FORTRAN_PROPERTIES (fflush1-shared SHARED " " " ") + target_include_directories (fflush1-shared + PRIVATE + ${CMAKE_Fortran_MODULE_DIRECTORY}/shared + ) + target_compile_options(fflush1-shared + PRIVATE + $<$:/dll> + $<$:${WIN_COMPILE_FLAGS}> + ) target_link_libraries (fflush1-shared - ${HDF5_F90_LIBSH_TARGET} - ${HDF5_F90_TEST_LIBSH_TARGET} - ${HDF5_LIBSH_TARGET} - ) - if (WIN32 AND MSVC) - target_link_libraries (fflush1-shared "ws2_32.lib") - endif () - target_include_directories (fflush1-shared PRIVATE ${CMAKE_Fortran_MODULE_DIRECTORY}/shared) + PRIVATE + ${HDF5_F90_LIBSH_TARGET} ${HDF5_F90_TEST_LIBSH_TARGET} ${HDF5_LIBSH_TARGET} $<$:ws2_32.lib> + ) +# set_property(TARGET fflush1-shared APPEND PROPERTY +# LINK_FLAGS $<$:"-SUBSYSTEM:CONSOLE"> +# ) +# set_property(TARGET fflush1-shared APPEND PROPERTY +# LINK_FLAGS $<$:${WIN_LINK_FLAGS}> +# ) + if(MSVC) + set_property(TARGET fflush1-shared PROPERTY LINK_FLAGS "/SUBSYSTEM:CONSOLE ${WIN_LINK_FLAGS}") + endif() set_target_properties (fflush1-shared PROPERTIES - LINKER_LANGUAGE Fortran - FOLDER test/fortran - Fortran_MODULE_DIRECTORY ${CMAKE_Fortran_MODULE_DIRECTORY}/shared + LINKER_LANGUAGE Fortran + FOLDER test/fortran + Fortran_MODULE_DIRECTORY ${CMAKE_Fortran_MODULE_DIRECTORY}/shared ) add_dependencies (fflush1-shared ${HDF5_F90_TEST_LIBSH_TARGET}) endif () #-- Adding test for fflush2 add_executable (fflush2 fflush2.F90) -TARGET_FORTRAN_PROPERTIES (fflush2 STATIC " " " ") +target_include_directories (fflush2 + PRIVATE + ${CMAKE_Fortran_MODULE_DIRECTORY}/static +) +target_compile_options (fflush2 + PRIVATE + $<$:${WIN_COMPILE_FLAGS}> +) target_link_libraries (fflush2 - ${HDF5_F90_TEST_LIB_TARGET} - ${HDF5_F90_LIB_TARGET} - ${HDF5_LIB_TARGET} + PRIVATE + ${HDF5_F90_TEST_LIB_TARGET} ${HDF5_F90_LIB_TARGET} ${HDF5_LIB_TARGET} $<$:ws2_32.lib> ) -if (WIN32 AND MSVC) - target_link_libraries (fflush2 "ws2_32.lib") -endif () -target_include_directories (fflush2 PRIVATE ${CMAKE_Fortran_MODULE_DIRECTORY}/static) +#set_property(TARGET fflush2 APPEND PROPERTY +# LINK_FLAGS $<$:"-SUBSYSTEM:CONSOLE"> +#) +#set_property(TARGET fflush2 APPEND PROPERTY +# LINK_FLAGS $<$:${WIN_LINK_FLAGS}> +#) +if(MSVC) + set_property(TARGET fflush2 PROPERTY LINK_FLAGS "/SUBSYSTEM:CONSOLE ${WIN_LINK_FLAGS}") +endif() set_target_properties (fflush2 PROPERTIES LINKER_LANGUAGE Fortran FOLDER test/fortran @@ -417,20 +545,32 @@ add_dependencies (fflush2 ${HDF5_F90_TEST_LIB_TARGET}) if (BUILD_SHARED_LIBS) add_executable (fflush2-shared fflush2.F90) - TARGET_FORTRAN_PROPERTIES (fflush2-shared SHARED " " " ") + target_include_directories (fflush2-shared + PRIVATE + ${CMAKE_Fortran_MODULE_DIRECTORY}/shared + ) + target_compile_options(fflush2-shared + PRIVATE + $<$:/dll> + $<$:${WIN_COMPILE_FLAGS}> + ) target_link_libraries (fflush2-shared - ${HDF5_F90_TEST_LIBSH_TARGET} - ${HDF5_F90_LIBSH_TARGET} - ${HDF5_LIBSH_TARGET} - ) - if (WIN32 AND MSVC) - target_link_libraries (fflush2-shared "ws2_32.lib") - endif () - target_include_directories (fflush2-shared PRIVATE ${CMAKE_Fortran_MODULE_DIRECTORY}/shared) + PRIVATE + ${HDF5_F90_TEST_LIBSH_TARGET} ${HDF5_F90_LIBSH_TARGET} ${HDF5_LIBSH_TARGET} $<$:ws2_32.lib> + ) +# set_property(TARGET fflush2-shared APPEND PROPERTY +# LINK_FLAGS $<$:"-SUBSYSTEM:CONSOLE"> +# ) +# set_property(TARGET fflush2-shared APPEND PROPERTY +# LINK_FLAGS $<$:${WIN_LINK_FLAGS}> +# ) + if(MSVC) + set_property(TARGET fflush2-shared PROPERTY LINK_FLAGS "/SUBSYSTEM:CONSOLE ${WIN_LINK_FLAGS}") + endif() set_target_properties (fflush2-shared PROPERTIES - LINKER_LANGUAGE Fortran - FOLDER test/fortran - Fortran_MODULE_DIRECTORY ${CMAKE_Fortran_MODULE_DIRECTORY}/shared + LINKER_LANGUAGE Fortran + FOLDER test/fortran + Fortran_MODULE_DIRECTORY ${CMAKE_Fortran_MODULE_DIRECTORY}/shared ) add_dependencies (fflush2-shared ${HDF5_F90_TEST_LIBSH_TARGET}) endif () diff --git a/fortran/testpar/CMakeLists.txt b/fortran/testpar/CMakeLists.txt index 979d305..0fe641f 100644 --- a/fortran/testpar/CMakeLists.txt +++ b/fortran/testpar/CMakeLists.txt @@ -1,5 +1,5 @@ cmake_minimum_required (VERSION 3.10) -PROJECT (HDF5_FORTRAN_TESTPAR C CXX Fortran) +project (HDF5_FORTRAN_TESTPAR C Fortran) #----------------------------------------------------------------------------- # Setup include Directories @@ -16,18 +16,33 @@ add_executable (parallel_test hyper.f90 mdset.f90 ) -TARGET_FORTRAN_PROPERTIES (parallel_test STATIC " " " ") +target_include_directories (parallel_test + PRIVATE + ${TESTPAR_INCLUDES} +) +target_compile_options(parallel_test + PRIVATE + $<$:${WIN_COMPILE_FLAGS}> +) target_link_libraries (parallel_test - ${HDF5_F90_TEST_LIB_TARGET} - ${HDF5_F90_LIB_TARGET} - ${HDF5_LIB_TARGET} - ${LINK_Fortran_LIBS} + PRIVATE + ${HDF5_F90_TEST_LIB_TARGET} ${HDF5_F90_LIB_TARGET} ${HDF5_LIB_TARGET} ${LINK_Fortran_LIBS} + $<$:"ws2_32.lib"> +) +#set_property(TARGET parallel_test APPEND PROPERTY +# LINK_FLAGS $<$:"-SUBSYSTEM:CONSOLE"> +#) +#set_property(TARGET parallel_test APPEND PROPERTY +# LINK_FLAGS $<$:${WIN_LINK_FLAGS}> +#) +if(MSVC) + set_property(TARGET parallel_test PROPERTY LINK_FLAGS "/SUBSYSTEM:CONSOLE ${WIN_LINK_FLAGS}") +endif() +set_target_properties (parallel_test PROPERTIES + FOLDER test/fortran + LINKER_LANGUAGE Fortran + Fortran_MODULE_DIRECTORY ${CMAKE_Fortran_MODULE_DIRECTORY}/static ) -if (WIN32 AND MSVC) - target_link_libraries (parallel_test "ws2_32.lib") endif () -target_include_directories (parallel_test PRIVATE ${TESTPAR_INCLUDES}) -set_target_properties (parallel_test PROPERTIES LINKER_LANGUAGE Fortran) -set_target_properties (parallel_test PROPERTIES FOLDER test/fortran) include (CMakeTests.cmake) diff --git a/hl/CMakeLists.txt b/hl/CMakeLists.txt index 54d5976..2a71b47 100644 --- a/hl/CMakeLists.txt +++ b/hl/CMakeLists.txt @@ -1,16 +1,9 @@ cmake_minimum_required (VERSION 3.10) -PROJECT (HDF5_HL C CXX) - -#----------------------------------------------------------------------------- -# Apply Definitions to compiler in this directory and below -#----------------------------------------------------------------------------- -add_definitions (${HDF_EXTRA_C_FLAGS}) - +project (HDF5_HL C) #----------------------------------------------------------------------------- # List Source files #----------------------------------------------------------------------------- -INCLUDE_DIRECTORIES (${HDF5_HL_SOURCE_DIR}/src ) add_subdirectory (src) diff --git a/hl/c++/CMakeLists.txt b/hl/c++/CMakeLists.txt index 71e5bb3..a62d9d4 100644 --- a/hl/c++/CMakeLists.txt +++ b/hl/c++/CMakeLists.txt @@ -1,5 +1,5 @@ cmake_minimum_required (VERSION 3.10) -PROJECT (HDF5_HL_CPP) +project (HDF5_HL_CPP CXX) #----------------------------------------------------------------------------- # Main HL lib is in /src diff --git a/hl/c++/examples/CMakeLists.txt b/hl/c++/examples/CMakeLists.txt index 25158f2..8e64239 100644 --- a/hl/c++/examples/CMakeLists.txt +++ b/hl/c++/examples/CMakeLists.txt @@ -1,19 +1,13 @@ cmake_minimum_required (VERSION 3.10) -PROJECT (HDF5_HL_CPP_EXAMPLES) - -#----------------------------------------------------------------------------- -# Setup include Directories -#----------------------------------------------------------------------------- -INCLUDE_DIRECTORIES (${HDF5_HL_SRC_DIR}/src) -INCLUDE_DIRECTORIES (${HDF5_HL_CPP_SRC_DIR}/src) +project (HDF5_HL_CPP_EXAMPLES CXX) # -------------------------------------------------------------------- # Add in the examples for the Packet Table codes # -------------------------------------------------------------------- add_executable (ptExampleFL ${HDF5_HL_CPP_EXAMPLES_SOURCE_DIR}/ptExampleFL.cpp) -TARGET_C_PROPERTIES (ptExampleFL STATIC " " " ") -target_link_libraries ( - ptExampleFL +target_include_directories(ptExampleFL PRIVATE "${HDF5_SRC_DIR};${HDF5_BINARY_DIR};$<$:${MPI_C_INCLUDE_DIRS}>") +TARGET_C_PROPERTIES (ptExampleFL STATIC) +target_link_libraries (ptExampleFL PRIVATE ${HDF5_HL_CPP_LIB_TARGET} ${HDF5_HL_LIB_TARGET} ${HDF5_LIB_TARGET} diff --git a/hl/c++/src/CMakeLists.txt b/hl/c++/src/CMakeLists.txt index bfafe7f..77419c6 100644 --- a/hl/c++/src/CMakeLists.txt +++ b/hl/c++/src/CMakeLists.txt @@ -1,38 +1,39 @@ cmake_minimum_required (VERSION 3.10) -PROJECT (HDF5_HL_CPP_SRC) +project (HDF5_HL_CPP_SRC CXX) #----------------------------------------------------------------------------- # Define Sources #----------------------------------------------------------------------------- -INCLUDE_DIRECTORIES (${HDF5_HL_SRC_DIR}/src) -INCLUDE_DIRECTORIES (${HDF5_HL_CPP_SRC_SOURCE_DIR}) set (HDF5_HL_CPP_SOURCES ${HDF5_HL_CPP_SRC_SOURCE_DIR}/H5PacketTable.cpp) set (HDF5_HL_CPP_HDRS ${HDF5_HL_CPP_SRC_SOURCE_DIR}/H5PacketTable.h) add_library (${HDF5_HL_CPP_LIB_TARGET} STATIC ${HDF5_HL_CPP_SOURCES}) -TARGET_C_PROPERTIES (${HDF5_HL_CPP_LIB_TARGET} STATIC " " " ") +target_include_directories(${HDF5_HL_CPP_LIB_TARGET} + PRIVATE "${HDF5_SRC_DIR};${HDF5_BINARY_DIR};$<$:${MPI_C_INCLUDE_DIRS}>" + INTERFACE "$/include>" +) +TARGET_C_PROPERTIES (${HDF5_HL_CPP_LIB_TARGET} STATIC) target_link_libraries (${HDF5_HL_CPP_LIB_TARGET} PUBLIC ${HDF5_HL_LIB_TARGET} ${HDF5_LIB_TARGET}) set_global_variable (HDF5_LIBRARIES_TO_EXPORT "${HDF5_LIBRARIES_TO_EXPORT};${HDF5_HL_CPP_LIB_TARGET}") H5_SET_LIB_OPTIONS (${HDF5_HL_CPP_LIB_TARGET} ${HDF5_HL_CPP_LIB_NAME} STATIC 0) -set_target_properties (${HDF5_HL_CPP_LIB_TARGET} PROPERTIES - FOLDER libraries/hl - INTERFACE_INCLUDE_DIRECTORIES "$/include>" -) +set_target_properties (${HDF5_HL_CPP_LIB_TARGET} PROPERTIES FOLDER libraries/hl) set (install_targets ${HDF5_HL_CPP_LIB_TARGET}) if (BUILD_SHARED_LIBS) add_library (${HDF5_HL_CPP_LIBSH_TARGET} SHARED ${HDF5_HL_CPP_SOURCES}) - TARGET_C_PROPERTIES (${HDF5_HL_CPP_LIBSH_TARGET} SHARED " " " ") + target_include_directories(${HDF5_HL_CPP_LIBSH_TARGET} + PRIVATE "${HDF5_SRC_DIR};${HDF5_BINARY_DIR};$<$:${MPI_C_INCLUDE_DIRS}>" + INTERFACE "$/include>" + ) + target_compile_definitions(${HDF5_HL_CPP_LIBSH_TARGET} + PUBLIC "H5_BUILT_AS_DYNAMIC_LIB" + ) + TARGET_C_PROPERTIES (${HDF5_HL_CPP_LIBSH_TARGET} SHARED) target_link_libraries (${HDF5_HL_CPP_LIBSH_TARGET} PUBLIC ${HDF5_HL_LIBSH_TARGET} ${HDF5_LIBSH_TARGET}) set_global_variable (HDF5_LIBRARIES_TO_EXPORT "${HDF5_LIBRARIES_TO_EXPORT};${HDF5_HL_CPP_LIBSH_TARGET}") H5_SET_LIB_OPTIONS (${HDF5_HL_CPP_LIBSH_TARGET} ${HDF5_HL_CPP_LIB_NAME} SHARED "HL_CXX") - set_target_properties (${HDF5_HL_CPP_LIBSH_TARGET} PROPERTIES - FOLDER libraries/hl - COMPILE_DEFINITIONS "H5_BUILT_AS_DYNAMIC_LIB" - INTERFACE_INCLUDE_DIRECTORIES "$/include>" - INTERFACE_COMPILE_DEFINITIONS H5_BUILT_AS_DYNAMIC_LIB=1 - ) + set_target_properties (${HDF5_HL_CPP_LIBSH_TARGET} PROPERTIES FOLDER libraries/hl) set (install_targets ${install_targets} ${HDF5_HL_CPP_LIBSH_TARGET}) endif () diff --git a/hl/c++/test/CMakeLists.txt b/hl/c++/test/CMakeLists.txt index b48d147..68c049c 100644 --- a/hl/c++/test/CMakeLists.txt +++ b/hl/c++/test/CMakeLists.txt @@ -1,24 +1,10 @@ cmake_minimum_required (VERSION 3.10) -PROJECT (HDF5_HL_CPP_TEST) - -#----------------------------------------------------------------------------- -# Setup include Directories -#----------------------------------------------------------------------------- -INCLUDE_DIRECTORIES (${HDF5_HL_SRC_DIR}/src) -INCLUDE_DIRECTORIES (${HDF5_HL_SRC_DIR}/c++/src) - -# -------------------------------------------------------------------- -# Add in the unit tests for the packet table c++ wrapper -# -------------------------------------------------------------------- - -INCLUDE_DIRECTORIES (${HDF5_TEST_SRC_DIR}) -INCLUDE_DIRECTORIES (${HDF5_HL_SRC_DIR}/test) -INCLUDE_DIRECTORIES (${HDF5_CPP_SRC_DIR}/src) +project (HDF5_HL_CPP_TEST CXX) add_executable (hl_ptableTest ${HDF5_HL_CPP_TEST_SOURCE_DIR}/ptableTest.cpp) -TARGET_C_PROPERTIES (hl_ptableTest STATIC " " " ") -target_link_libraries ( - hl_ptableTest +target_include_directories(hl_ptableTest PRIVATE "${HDF5_HL_SRC_DIR}/test;${HDF5_SRC_DIR};${HDF5_BINARY_DIR};$<$:${MPI_C_INCLUDE_DIRS}>") +TARGET_C_PROPERTIES (hl_ptableTest STATIC) +target_link_libraries (hl_ptableTest PRIVATE ${HDF5_LIB_TARGET} ${HDF5_TEST_LIB_TARGET} ${HDF5_CPP_LIB_TARGET} diff --git a/hl/examples/CMakeLists.txt b/hl/examples/CMakeLists.txt index 79dfee1..97c6de5 100644 --- a/hl/examples/CMakeLists.txt +++ b/hl/examples/CMakeLists.txt @@ -1,5 +1,5 @@ cmake_minimum_required (VERSION 3.10) -PROJECT (HDF5_HL_EXAMPLES ) +project (HDF5_HL_EXAMPLES C) #----------------------------------------------------------------------------- # Define Sources @@ -28,8 +28,9 @@ set (examples foreach (example ${examples}) add_executable (hl_ex_${example} ${HDF5_HL_EXAMPLES_SOURCE_DIR}/${example}.c) - TARGET_C_PROPERTIES (hl_ex_${example} STATIC " " " ") - target_link_libraries (hl_ex_${example} ${HDF5_HL_LIB_TARGET} ${HDF5_LIB_TARGET}) + target_include_directories(hl_ex_${example} PRIVATE "${HDF5_SRC_DIR};${HDF5_BINARY_DIR};$<$:${MPI_C_INCLUDE_DIRS}>") + TARGET_C_PROPERTIES (hl_ex_${example} STATIC) + target_link_libraries (hl_ex_${example} PRIVATE ${HDF5_HL_LIB_TARGET} ${HDF5_LIB_TARGET}) set_target_properties (hl_ex_${example} PROPERTIES FOLDER examples/hl) endforeach () diff --git a/hl/fortran/CMakeLists.txt b/hl/fortran/CMakeLists.txt index 7955de2..3c82574 100644 --- a/hl/fortran/CMakeLists.txt +++ b/hl/fortran/CMakeLists.txt @@ -1,5 +1,5 @@ cmake_minimum_required (VERSION 3.10) -PROJECT (HDF5_HL_F90 C CXX Fortran) +project (HDF5_HL_F90 C Fortran) #----------------------------------------------------------------------------- # List Source files diff --git a/hl/fortran/examples/CMakeLists.txt b/hl/fortran/examples/CMakeLists.txt index 411ceea..27971b2 100644 --- a/hl/fortran/examples/CMakeLists.txt +++ b/hl/fortran/examples/CMakeLists.txt @@ -1,13 +1,5 @@ cmake_minimum_required (VERSION 3.10) -PROJECT (HDF5_HL_F90_EXAMPLES C CXX Fortran) - -#----------------------------------------------------------------------------- -# Setup include Directories -#----------------------------------------------------------------------------- -INCLUDE_DIRECTORIES ( - ${HDF5_F90_BINARY_DIR} - ${HDF5_F90_SRC_DIR}/src -) +project (HDF5_HL_F90_EXAMPLES C Fortran) set (examples exlite @@ -16,20 +8,34 @@ set (examples foreach (example ${examples}) add_executable (hl_f90_ex_${example} ${HDF5_HL_F90_EXAMPLES_SOURCE_DIR}/${example}.f90) - TARGET_FORTRAN_PROPERTIES (hl_f90_ex_${example} STATIC " " " ") + target_include_directories (hl_f90_ex_${example} + PRIVATE + "${CMAKE_Fortran_MODULE_DIRECTORY}/static;${HDF5_F90_BINARY_DIR};${HDF5_F90_SRC_DIR}/src" + ) + target_compile_options(hl_f90_ex_${example} + PRIVATE + $<$:${WIN_COMPILE_FLAGS}> + ) target_link_libraries (hl_f90_ex_${example} - ${HDF5_HL_F90_LIB_TARGET} - ${HDF5_F90_LIB_TARGET} - ${HDF5_LIB_TARGET} + PRIVATE + ${HDF5_HL_F90_LIB_TARGET} ${HDF5_F90_LIB_TARGET} ${HDF5_LIB_TARGET} + ) +# set_property(TARGET hl_f90_ex_${example} APPEND PROPERTY +# LINK_FLAGS $<$:"-SUBSYSTEM:CONSOLE"> +# ) +# set_property(TARGET hl_f90_ex_${example} APPEND PROPERTY +# LINK_FLAGS $<$:${WIN_LINK_FLAGS}> +# ) + if(MSVC) + set_property(TARGET hl_f90_ex_${example} PROPERTY LINK_FLAGS "/SUBSYSTEM:CONSOLE ${WIN_LINK_FLAGS}") + endif() + set_target_properties (hl_f90_ex_${example} PROPERTIES + LINKER_LANGUAGE Fortran + FOLDER examples/hl/fortran + Fortran_MODULE_DIRECTORY ${CMAKE_Fortran_MODULE_DIRECTORY}/static ) - target_include_directories (hl_f90_ex_${example} PRIVATE ${CMAKE_Fortran_MODULE_DIRECTORY}/static) - set_target_properties (hl_f90_ex_${example} PROPERTIES LINKER_LANGUAGE Fortran) - set_target_properties (hl_f90_ex_${example} PROPERTIES FOLDER examples/hl/fortran) - endforeach () if (BUILD_TESTING) - include (CMakeTests.cmake) - endif () diff --git a/hl/fortran/src/CMakeLists.txt b/hl/fortran/src/CMakeLists.txt index f1e0c3a..902b8dc 100644 --- a/hl/fortran/src/CMakeLists.txt +++ b/hl/fortran/src/CMakeLists.txt @@ -1,5 +1,5 @@ cmake_minimum_required (VERSION 3.10) -project (HDF5_HL_F90_SRC C CXX Fortran) +project (HDF5_HL_F90_SRC C Fortran) #----------------------------------------------------------------------------- # configure def file for shared libs on windows @@ -15,22 +15,19 @@ endif () # Generate the H5LT and H5TB REAL APIs #----------------------------------------------------------------------------- -add_executable (H5HL_buildiface - ${HDF5_HL_F90_SRC_SOURCE_DIR}/H5HL_buildiface.F90 - ) - +add_executable (H5HL_buildiface ${HDF5_HL_F90_SRC_SOURCE_DIR}/H5HL_buildiface.F90 ) +target_include_directories(H5HL_buildiface PRIVATE "${HDF5_BINARY_DIR};${HDF5_F90_BINARY_DIR}") if (WIN32 AND MSVC) if (BUILD_SHARED_LIBS) - set_target_properties (H5HL_buildiface - PROPERTIES - COMPILE_FLAGS "/MT" - ) + set_target_properties (H5HL_buildiface PROPERTIES COMPILE_FLAGS "/MT") endif () - set_target_properties (H5HL_buildiface - PROPERTIES - LINK_FLAGS "/SUBSYSTEM:CONSOLE" - ) endif () +#set_property(TARGET H5HL_buildiface APPEND PROPERTY +# LINK_FLAGS $<$:"-SUBSYSTEM:CONSOLE"> +#) +if(MSVC) + set_property(TARGET H5HL_buildiface PROPERTY LINK_FLAGS "/SUBSYSTEM:CONSOLE") +endif() set_target_properties (H5HL_buildiface PROPERTIES LINKER_LANGUAGE Fortran Fortran_MODULE_DIRECTORY ${CMAKE_Fortran_MODULE_DIRECTORY} @@ -44,18 +41,6 @@ file (MAKE_DIRECTORY "${HDF5_HL_F90_BINARY_DIR}/static") set (MOD_BUILD_DIR ${CMAKE_Fortran_MODULE_DIRECTORY}/static/${HDF_CFG_BUILD_TYPE}) #----------------------------------------------------------------------------- -# Setup include Directories -#----------------------------------------------------------------------------- -INCLUDE_DIRECTORIES ( - ${HDF5_HL_SRC_DIR}/src - ${HDF5_F90_SRC_DIR}/src - ${HDF5_HL_F90_SRC_SOURCE_DIR} - ${HDF5_F90_BINARY_DIR} - ${CMAKE_Fortran_MODULE_DIRECTORY} - ${MOD_BUILD_DIR} -) - -#----------------------------------------------------------------------------- # hl_f90CStub lib #----------------------------------------------------------------------------- set (HDF5_HL_F90_C_SOURCES @@ -70,31 +55,36 @@ set_source_files_properties (${HDF5_HL_F90_C_SOURCES} PROPERTIES LANGUAGE C) set (HDF5_HL_F90_HEADERS ${HDF5_HL_F90_SRC_SOURCE_DIR}/H5LTf90proto.h) add_library (${HDF5_HL_F90_C_LIB_TARGET} STATIC ${HDF5_HL_F90_C_SOURCES} ${HDF5_HL_F90_HEADERS}) -target_include_directories(${HDF5_HL_F90_C_LIB_TARGET} PUBLIC ${HDF5_F90_BINARY_DIR}/static) -TARGET_C_PROPERTIES (${HDF5_HL_F90_C_LIB_TARGET} STATIC " " " ") +target_include_directories(${HDF5_HL_F90_C_LIB_TARGET} + PRIVATE "${HDF5_SRC_DIR};${HDF5_BINARY_DIR};${HDF5_F90_BINARY_DIR}/static" + INTERFACE "$/include>" +) +TARGET_C_PROPERTIES (${HDF5_HL_F90_C_LIB_TARGET} STATIC) target_link_libraries (${HDF5_HL_F90_C_LIB_TARGET} PUBLIC ${HDF5_F90_C_LIB_TARGET} ${HDF5_HL_LIB_TARGET}) set_global_variable (HDF5_LIBRARIES_TO_EXPORT "${HDF5_LIBRARIES_TO_EXPORT};${HDF5_HL_F90_C_LIB_TARGET}") H5_SET_LIB_OPTIONS (${HDF5_HL_F90_C_LIB_TARGET} ${HDF5_HL_F90_C_LIB_NAME} STATIC 0) set_target_properties (${HDF5_HL_F90_C_LIB_TARGET} PROPERTIES FOLDER libraries/hl/fortran LINKER_LANGUAGE C - INTERFACE_INCLUDE_DIRECTORIES "$/include>" ) set (install_targets ${HDF5_HL_F90_C_LIB_TARGET}) if (BUILD_SHARED_LIBS) add_library (${HDF5_HL_F90_C_LIBSH_TARGET} SHARED ${HDF5_HL_F90_C_SOURCES} ${HDF5_HL_F90_HEADERS}) - target_include_directories(${HDF5_HL_F90_C_LIBSH_TARGET} PUBLIC ${HDF5_F90_BINARY_DIR}/shared) - TARGET_C_PROPERTIES (${HDF5_HL_F90_C_LIBSH_TARGET} SHARED " " " ") + target_include_directories(${HDF5_HL_F90_C_LIBSH_TARGET} + PRIVATE "${HDF5_SRC_DIR};${HDF5_BINARY_DIR};${HDF5_F90_BINARY_DIR}/shared" + INTERFACE "$/include>" + ) + target_compile_definitions(${HDF5_LIBSH_TARGET} + PUBLIC "H5_BUILT_AS_DYNAMIC_LIB" + ) + TARGET_C_PROPERTIES (${HDF5_HL_F90_C_LIBSH_TARGET} SHARED) target_link_libraries (${HDF5_HL_F90_C_LIBSH_TARGET} PUBLIC ${HDF5_F90_C_LIBSH_TARGET} ${HDF5_HL_LIBSH_TARGET}) set_global_variable (HDF5_LIBRARIES_TO_EXPORT "${HDF5_LIBRARIES_TO_EXPORT};${HDF5_HL_F90_C_LIBSH_TARGET}") H5_SET_LIB_OPTIONS (${HDF5_HL_F90_C_LIBSH_TARGET} ${HDF5_HL_F90_C_LIB_NAME} SHARED "HL_F") set_target_properties (${HDF5_HL_F90_C_LIBSH_TARGET} PROPERTIES FOLDER libraries/hl/fortran LINKER_LANGUAGE C - COMPILE_DEFINITIONS "H5_BUILT_AS_DYNAMIC_LIB" - INTERFACE_INCLUDE_DIRECTORIES "$/include>" - INTERFACE_COMPILE_DEFINITIONS H5_BUILT_AS_DYNAMIC_LIB=1 ) set (install_targets ${install_targets} ${HDF5_HL_F90_C_LIBSH_TARGET}) endif () @@ -110,14 +100,14 @@ set (HDF5_HL_F90_F_BASE_SOURCES ) add_custom_command ( - OUTPUT ${HDF5_HL_F90_BINARY_DIR}/static/H5LTff_gen.F90 ${HDF5_HL_F90_BINARY_DIR}/H5TBff_gen.F90 + OUTPUT ${HDF5_HL_F90_BINARY_DIR}/static/H5LTff_gen.F90 ${HDF5_HL_F90_BINARY_DIR}/static/H5TBff_gen.F90 COMMAND $ 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}/H5TBff_gen.F90 + DEPENDS ${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 @@ -163,56 +153,85 @@ if (BUILD_SHARED_LIBS) endif () add_library (${HDF5_HL_F90_LIB_TARGET} STATIC ${HDF5_HL_F90_F_SOURCES}) -TARGET_FORTRAN_PROPERTIES (${HDF5_HL_F90_LIB_TARGET} STATIC " " " ") -target_link_libraries (${HDF5_HL_F90_LIB_TARGET} PUBLIC ${HDF5_HL_F90_C_LIB_TARGET} ${HDF5_F90_LIB_TARGET}) -target_include_directories (${HDF5_HL_F90_LIB_TARGET} PUBLIC ${CMAKE_Fortran_MODULE_DIRECTORY}/static) -if (H5_HAVE_PARALLEL AND MPI_Fortran_FOUND) - target_include_directories (${HDF5_HL_F90_LIB_TARGET} PUBLIC ${MPI_Fortran_INCLUDE_DIRS}) -endif () -set_global_variable (HDF5_LIBRARIES_TO_EXPORT "${HDF5_LIBRARIES_TO_EXPORT};${HDF5_HL_F90_LIB_TARGET}") -H5_SET_LIB_OPTIONS (${HDF5_HL_F90_LIB_TARGET} ${HDF5_HL_F90_LIB_NAME} STATIC 0) +target_include_directories (${HDF5_HL_F90_LIB_TARGET} + PRIVATE + "${HDF5_F90_BINARY_DIR};${CMAKE_Fortran_MODULE_DIRECTORY}/static;$<$:${MPI_Fortran_INCLUDE_DIRS}>" + INTERFACE + "$/include>" +) +target_compile_definitions(${HDF5_HL_F90_LIB_TARGET} + PUBLIC + $<$:HDF5F90_WINDOWS> + PRIVATE + $<$:${WIN_COMPILE_FLAGS}> +) +target_link_libraries (${HDF5_HL_F90_LIB_TARGET} + PUBLIC + ${HDF5_HL_F90_C_LIB_TARGET} ${HDF5_F90_LIB_TARGET} +) +#set_property(TARGET ${HDF5_HL_F90_LIB_TARGET} APPEND PROPERTY +# LINK_FLAGS $<$:"-SUBSYSTEM:CONSOLE"> +#) +#set_property(TARGET ${HDF5_HL_F90_LIB_TARGET} APPEND PROPERTY +# LINK_FLAGS $<$:${WIN_LINK_FLAGS}> +#) +if(MSVC) + set_property(TARGET ${HDF5_HL_F90_LIB_TARGET} PROPERTY LINK_FLAGS "/SUBSYSTEM:CONSOLE ${WIN_LINK_FLAGS}") +endif() set_target_properties (${HDF5_HL_F90_LIB_TARGET} PROPERTIES FOLDER libraries/hl/fortran LINKER_LANGUAGE Fortran - INTERFACE_INCLUDE_DIRECTORIES "$/include>" Fortran_MODULE_DIRECTORY ${CMAKE_Fortran_MODULE_DIRECTORY}/static ) -if (WIN32) - set_property (TARGET ${HDF5_HL_F90_LIB_TARGET} - APPEND PROPERTY COMPILE_DEFINITIONS "HDF5F90_WINDOWS" - ) -endif () +H5_SET_LIB_OPTIONS (${HDF5_HL_F90_LIB_TARGET} ${HDF5_HL_F90_LIB_NAME} STATIC 0) +set_global_variable (HDF5_LIBRARIES_TO_EXPORT "${HDF5_LIBRARIES_TO_EXPORT};${HDF5_HL_F90_LIB_TARGET}") set (install_targets ${install_targets} ${HDF5_HL_F90_LIB_TARGET}) add_dependencies(${HDF5_HL_F90_LIB_TARGET} H5HLgen) if (BUILD_SHARED_LIBS) add_library (${HDF5_HL_F90_LIBSH_TARGET} SHARED ${HDF5_HL_F90_F_SOURCES_SHARED}) - set (SHARED_LINK_FLAGS " ") - if (WIN32 AND MSVC) - set (SHARED_LINK_FLAGS "/DLL /DEF:${HDF5_HL_F90_SRC_BINARY_DIR}/hdf5_hl_fortrandll.def") - endif () - TARGET_FORTRAN_PROPERTIES (${HDF5_HL_F90_LIBSH_TARGET} SHARED " " ${SHARED_LINK_FLAGS}) - target_link_libraries (${HDF5_HL_F90_LIBSH_TARGET} PUBLIC ${HDF5_HL_F90_C_LIBSH_TARGET} ${HDF5_F90_LIBSH_TARGET}) - target_link_libraries (${HDF5_HL_F90_LIBSH_TARGET} PRIVATE ${LINK_Fortran_LIBS}) - target_include_directories (${HDF5_HL_F90_LIBSH_TARGET} PUBLIC ${CMAKE_Fortran_MODULE_DIRECTORY}/shared) - if (H5_HAVE_PARALLEL AND MPI_Fortran_FOUND) - target_include_directories (${HDF5_HL_F90_LIBSH_TARGET} PUBLIC ${MPI_Fortran_INCLUDE_DIRS}) - endif () - set_global_variable (HDF5_LIBRARIES_TO_EXPORT "${HDF5_LIBRARIES_TO_EXPORT};${HDF5_HL_F90_LIBSH_TARGET}") - H5_SET_LIB_OPTIONS (${HDF5_HL_F90_LIBSH_TARGET} ${HDF5_HL_F90_LIB_NAME} SHARED "HL_F") + target_include_directories (${HDF5_HL_F90_LIBSH_TARGET} + PRIVATE + "${HDF5_F90_BINARY_DIR};${CMAKE_Fortran_MODULE_DIRECTORY}/shared;$<$:${MPI_Fortran_INCLUDE_DIRS}>" + INTERFACE + "$/include>" + ) + target_compile_definitions(${HDF5_HL_F90_LIBSH_TARGET} + PUBLIC + "H5_BUILT_AS_DYNAMIC_LIB" + PRIVATE + $<$:BUILD_HDF5_HL_DLL;HDF5F90_WINDOWS> + $<$:/dll> + $<$:${WIN_COMPILE_FLAGS}> + ) + target_link_libraries (${HDF5_HL_F90_LIBSH_TARGET} + PUBLIC + ${HDF5_HL_F90_C_LIBSH_TARGET} ${HDF5_F90_LIBSH_TARGET} + PRIVATE + ${LINK_Fortran_LIBS} + ) +# set_property(TARGET ${HDF5_HL_F90_LIBSH_TARGET} APPEND PROPERTY +# LINK_FLAGS $<$:"-SUBSYSTEM:CONSOLE"> +# ) +# set_property(TARGET ${HDF5_HL_F90_LIBSH_TARGET} APPEND PROPERTY +# LINK_FLAGS $<$:${WIN_LINK_FLAGS}> +# ) +# set_property(TARGET ${HDF5_HL_F90_LIBSH_TARGET} APPEND PROPERTY +# LINK_FLAGS $<$:"-DLL"> +# ) +# set_property(TARGET ${HDF5_HL_F90_LIBSH_TARGET} APPEND PROPERTY +# LINK_FLAGS $<$:"-DEF:${HDF5_HL_F90_SRC_BINARY_DIR}/hdf5_hl_fortrandll.def"> +# ) + if(MSVC) + set_property(TARGET ${HDF5_HL_F90_LIBSH_TARGET} PROPERTY LINK_FLAGS "/SUBSYSTEM:CONSOLE ${WIN_LINK_FLAGS} -DLL -DEF:${HDF5_HL_F90_SRC_BINARY_DIR}/hdf5_hl_fortrandll.def") + endif() set_target_properties (${HDF5_HL_F90_LIBSH_TARGET} PROPERTIES FOLDER libraries/hl/fortran LINKER_LANGUAGE Fortran - COMPILE_DEFINITIONS "H5_BUILT_AS_DYNAMIC_LIB" - INTERFACE_INCLUDE_DIRECTORIES "$/include>" - INTERFACE_COMPILE_DEFINITIONS H5_BUILT_AS_DYNAMIC_LIB=1 Fortran_MODULE_DIRECTORY ${CMAKE_Fortran_MODULE_DIRECTORY}/shared ) - if (WIN32) - set_property (TARGET ${HDF5_HL_F90_LIBSH_TARGET} - APPEND PROPERTY COMPILE_DEFINITIONS "BUILD_HDF5_HL_DLL;HDF5F90_WINDOWS" - ) - endif () + H5_SET_LIB_OPTIONS (${HDF5_HL_F90_LIBSH_TARGET} ${HDF5_HL_F90_LIB_NAME} SHARED "HL_F") + set_global_variable (HDF5_LIBRARIES_TO_EXPORT "${HDF5_LIBRARIES_TO_EXPORT};${HDF5_HL_F90_LIBSH_TARGET}") set (install_targets ${install_targets} ${HDF5_HL_F90_LIBSH_TARGET}) add_dependencies(${HDF5_HL_F90_LIBSH_TARGET} H5HLgenSH) endif () diff --git a/hl/fortran/test/CMakeLists.txt b/hl/fortran/test/CMakeLists.txt index 5c83d03..6ee362d 100644 --- a/hl/fortran/test/CMakeLists.txt +++ b/hl/fortran/test/CMakeLists.txt @@ -1,85 +1,78 @@ cmake_minimum_required (VERSION 3.10) -PROJECT (HDF5_HL_FORTRAN_TESTS C CXX Fortran) +project (HDF5_HL_FORTRAN_TESTS C Fortran) #----------------------------------------------------------------------------- # Add Tests #----------------------------------------------------------------------------- -INCLUDE_DIRECTORIES (${CMAKE_Fortran_MODULE_DIRECTORY} ${HDF5_F90_BINARY_DIR} ${HDF5_F90_SRC_DIR}/src) +set (H5_TESTS + tstds + tstlite + tstimage + tsttable +) -#-- Adding test for hl_f90_tstds -add_executable (hl_f90_tstds tstds.F90) -TARGET_FORTRAN_PROPERTIES (hl_f90_tstds STATIC " " " ") -target_link_libraries (hl_f90_tstds ${HDF5_HL_F90_LIB_TARGET} ${HDF5_F90_LIB_TARGET}) -target_include_directories (hl_f90_tstds PRIVATE ${CMAKE_Fortran_MODULE_DIRECTORY}/static) -set_target_properties (hl_f90_tstds PROPERTIES LINKER_LANGUAGE Fortran) -set_target_properties (hl_f90_tstds PROPERTIES FOLDER test/hl/fortran) -if (BUILD_SHARED_LIBS) - add_executable (hl_f90_tstds-shared tstds.F90) - TARGET_FORTRAN_PROPERTIES (hl_f90_tstds-shared SHARED " " " ") - target_link_libraries (hl_f90_tstds-shared ${HDF5_HL_F90_LIBSH_TARGET} ${HDF5_F90_LIBSH_TARGET}) - target_include_directories (hl_f90_tstds-shared PRIVATE ${CMAKE_Fortran_MODULE_DIRECTORY}/shared) - set_target_properties (hl_f90_tstds-shared PROPERTIES - LINKER_LANGUAGE Fortran - FOLDER test/hl/fortran - Fortran_MODULE_DIRECTORY ${CMAKE_Fortran_MODULE_DIRECTORY}/shared +macro (ADD_H5_FORTRAN_EXE file) + add_executable (hl_f90_${file} ${file}.F90) + target_include_directories (hl_f90_${file} + PRIVATE + "${CMAKE_Fortran_MODULE_DIRECTORY}/static;${HDF5_F90_BINARY_DIR};${HDF5_F90_SRC_DIR}/src" ) -endif () - -#-- Adding test for hl_f90_tstlite -add_executable (hl_f90_tstlite tstlite.F90) -TARGET_FORTRAN_PROPERTIES (hl_f90_tstlite STATIC " " " ") -target_link_libraries (hl_f90_tstlite ${HDF5_HL_F90_LIB_TARGET} ${HDF5_F90_LIB_TARGET} ${HDF5_F90_TEST_LIB_TARGET}) -target_include_directories (hl_f90_tstlite PRIVATE ${CMAKE_Fortran_MODULE_DIRECTORY}/static) -set_target_properties (hl_f90_tstlite PROPERTIES LINKER_LANGUAGE Fortran) -set_target_properties (hl_f90_tstlite PROPERTIES FOLDER test/hl/fortran) -if (BUILD_SHARED_LIBS) - add_executable (hl_f90_tstlite-shared tstlite.F90) - TARGET_FORTRAN_PROPERTIES (hl_f90_tstlite-shared SHARED " " " ") - target_link_libraries (hl_f90_tstlite-shared ${HDF5_HL_F90_LIBSH_TARGET} ${HDF5_F90_LIBSH_TARGET} ${HDF5_F90_TEST_LIBSH_TARGET}) - target_include_directories (hl_f90_tstlite-shared PRIVATE ${CMAKE_Fortran_MODULE_DIRECTORY}/shared) - set_target_properties (hl_f90_tstlite-shared PROPERTIES - LINKER_LANGUAGE Fortran - FOLDER test/hl/fortran - Fortran_MODULE_DIRECTORY ${CMAKE_Fortran_MODULE_DIRECTORY}/shared + target_compile_options(hl_f90_${file} + PRIVATE + $<$:${WIN_COMPILE_FLAGS}> ) -endif () - -#-- Adding test for hl_f90_tstimage -add_executable (hl_f90_tstimage tstimage.F90) -TARGET_FORTRAN_PROPERTIES (hl_f90_tstimage STATIC " " " ") -target_link_libraries (hl_f90_tstimage ${HDF5_HL_F90_LIB_TARGET} ${HDF5_F90_LIB_TARGET}) -target_include_directories (hl_f90_tstimage PRIVATE ${CMAKE_Fortran_MODULE_DIRECTORY}/static) -set_target_properties (hl_f90_tstimage PROPERTIES LINKER_LANGUAGE Fortran) -set_target_properties (hl_f90_tstimage PROPERTIES FOLDER test/hl/fortran) -if (BUILD_SHARED_LIBS) - add_executable (hl_f90_tstimage-shared tstimage.F90) - TARGET_FORTRAN_PROPERTIES (hl_f90_tstimage-shared SHARED " " " ") - target_link_libraries (hl_f90_tstimage-shared ${HDF5_HL_F90_LIBSH_TARGET} ${HDF5_F90_LIBSH_TARGET}) - target_include_directories (hl_f90_tstimage-shared PRIVATE ${CMAKE_Fortran_MODULE_DIRECTORY}/shared) - set_target_properties (hl_f90_tstimage-shared PROPERTIES - LINKER_LANGUAGE Fortran - FOLDER test/hl/fortran - Fortran_MODULE_DIRECTORY ${CMAKE_Fortran_MODULE_DIRECTORY}/shared + target_link_libraries (hl_f90_${file} + PRIVATE + ${HDF5_HL_F90_LIB_TARGET} ${HDF5_F90_LIB_TARGET} ${HDF5_F90_TEST_LIB_TARGET} ) -endif () - -#-- Adding test for hl_f90_tsttable -add_executable (hl_f90_tsttable tsttable.F90) -TARGET_FORTRAN_PROPERTIES (hl_f90_tsttable STATIC " " " ") -target_link_libraries (hl_f90_tsttable ${HDF5_HL_F90_LIB_TARGET} ${HDF5_F90_LIB_TARGET} ${HDF5_F90_TEST_LIB_TARGET}) -target_include_directories (hl_f90_tsttable PRIVATE ${CMAKE_Fortran_MODULE_DIRECTORY}/static) -set_target_properties (hl_f90_tsttable PROPERTIES LINKER_LANGUAGE Fortran) -set_target_properties (hl_f90_tsttable PROPERTIES FOLDER test/hl/fortran) -if (BUILD_SHARED_LIBS) - add_executable (hl_f90_tsttable-shared tsttable.F90) - TARGET_FORTRAN_PROPERTIES (hl_f90_tsttable-shared SHARED " " " ") - target_link_libraries (hl_f90_tsttable-shared ${HDF5_HL_F90_LIBSH_TARGET} ${HDF5_F90_LIBSH_TARGET} ${HDF5_F90_TEST_LIBSH_TARGET}) - target_include_directories (hl_f90_tsttable-shared PRIVATE ${CMAKE_Fortran_MODULE_DIRECTORY}/shared) - set_target_properties (hl_f90_tsttable-shared PROPERTIES +# set_property(TARGET hl_f90_${file} APPEND PROPERTY +# LINK_FLAGS $<$:"-SUBSYSTEM:CONSOLE"> +# ) +# set_property(TARGET hl_f90_${file} APPEND PROPERTY +# LINK_FLAGS $<$:${WIN_LINK_FLAGS}> +# ) + if(MSVC) + set_property(TARGET hl_f90_${file} PROPERTY LINK_FLAGS "/SUBSYSTEM:CONSOLE ${WIN_LINK_FLAGS}") + endif() + set_target_properties (hl_f90_${file} PROPERTIES + LINKER_LANGUAGE Fortran + FOLDER test/hl/fortran + Fortran_MODULE_DIRECTORY ${CMAKE_Fortran_MODULE_DIRECTORY}/static + ) + if (BUILD_SHARED_LIBS) + add_executable (hl_f90_${file}-shared ${file}.F90) + target_include_directories (hl_f90_${file}-shared + PRIVATE + "${CMAKE_Fortran_MODULE_DIRECTORY}/shared;${HDF5_F90_BINARY_DIR};${HDF5_F90_SRC_DIR}/src" + ) + target_compile_options(hl_f90_${file}-shared + PRIVATE + $<$:/dll> + $<$:${WIN_COMPILE_FLAGS}> + ) + target_link_libraries (hl_f90_${file}-shared + PRIVATE + ${HDF5_HL_F90_LIBSH_TARGET} ${HDF5_F90_LIBSH_TARGET} ${HDF5_F90_TEST_LIBSH_TARGET} + ) +# set_property(TARGET hl_f90_${file}-shared APPEND PROPERTY +# LINK_FLAGS $<$:"-SUBSYSTEM:CONSOLE"> +# ) +# set_property(TARGET hl_f90_${file}-shared APPEND PROPERTY +# LINK_FLAGS $<$:${WIN_LINK_FLAGS}> +# ) + if(MSVC) + set_property(TARGET hl_f90_${file}-shared PROPERTY LINK_FLAGS "/SUBSYSTEM:CONSOLE ${WIN_LINK_FLAGS}") + endif() + set_target_properties (hl_f90_${file}-shared PROPERTIES LINKER_LANGUAGE Fortran FOLDER test/hl/fortran Fortran_MODULE_DIRECTORY ${CMAKE_Fortran_MODULE_DIRECTORY}/shared - ) -endif () + ) + endif () +endmacro () + +foreach (test ${H5_TESTS}) + ADD_H5_FORTRAN_EXE(${test}) +endforeach () include (CMakeTests.cmake) diff --git a/hl/fortran/test/CMakeTests.cmake b/hl/fortran/test/CMakeTests.cmake index d541377..04a49dc 100644 --- a/hl/fortran/test/CMakeTests.cmake +++ b/hl/fortran/test/CMakeTests.cmake @@ -16,6 +16,41 @@ ############################################################################## ############################################################################## +macro (ADD_H5_FORTRAN_TEST file) + if (HDF5_ENABLE_USING_MEMCHECKER) + add_test (NAME HL_FORTRAN_f90_${file} COMMAND $) + else () + add_test (NAME HL_FORTRAN_f90_${file} COMMAND "${CMAKE_COMMAND}" + -D "TEST_PROGRAM=$" + -D "TEST_ARGS:STRING=" + -D "TEST_EXPECT=0" + -D "TEST_SKIP_COMPARE=TRUE" + -D "TEST_OUTPUT=hl_f90_${file}.txt" + #-D "TEST_REFERENCE=hl_f90_${file}.out" + -D "TEST_FOLDER=${PROJECT_BINARY_DIR}" + -P "${HDF_RESOURCES_EXT_DIR}/runTest.cmake" + ) + endif () + set_tests_properties (HL_FORTRAN_f90_${file} PROPERTIES DEPENDS HL_FORTRAN_test-clear-objects) + if (BUILD_SHARED_LIBS) + if (HDF5_ENABLE_USING_MEMCHECKER) + add_test (NAME HL_FORTRAN_f90_${file}-shared COMMAND $) + else () + add_test (NAME HL_FORTRAN_f90_${file}-shared COMMAND "${CMAKE_COMMAND}" + -D "TEST_PROGRAM=$" + -D "TEST_ARGS:STRING=" + -D "TEST_EXPECT=0" + -D "TEST_SKIP_COMPARE=TRUE" + -D "TEST_OUTPUT=hl_f90_${file}-shared.txt" + #-D "TEST_REFERENCE=hl_f90_${file}-shared.out" + -D "TEST_FOLDER=${PROJECT_BINARY_DIR}" + -P "${HDF_RESOURCES_EXT_DIR}/runTest.cmake" + ) + endif () + set_tests_properties (HL_FORTRAN_f90_${file}-shared PROPERTIES DEPENDS HL_FORTRAN_test-shared-clear-objects) + endif () +endmacro () + # Remove any output file left over from previous test run add_test ( NAME HL_FORTRAN_test-clear-objects @@ -32,70 +67,6 @@ add_test ( tstds.h5 ) -if (HDF5_ENABLE_USING_MEMCHECKER) - add_test (NAME HL_FORTRAN_f90_tstds COMMAND $) -else () - add_test (NAME HL_FORTRAN_f90_tstds COMMAND "${CMAKE_COMMAND}" - -D "TEST_PROGRAM=$" - -D "TEST_ARGS:STRING=" - -D "TEST_EXPECT=0" - -D "TEST_SKIP_COMPARE=TRUE" - -D "TEST_OUTPUT=hl_f90_tstds.txt" - #-D "TEST_REFERENCE=hl_f90_tstds.out" - -D "TEST_FOLDER=${PROJECT_BINARY_DIR}" - -P "${HDF_RESOURCES_EXT_DIR}/runTest.cmake" - ) -endif () -set_tests_properties (HL_FORTRAN_f90_tstds PROPERTIES DEPENDS HL_FORTRAN_test-clear-objects) - -if (HDF5_ENABLE_USING_MEMCHECKER) - add_test (NAME HL_FORTRAN_f90_tstlite COMMAND $) -else () - add_test (NAME HL_FORTRAN_f90_tstlite COMMAND "${CMAKE_COMMAND}" - -D "TEST_PROGRAM=$" - -D "TEST_ARGS:STRING=" - -D "TEST_EXPECT=0" - -D "TEST_SKIP_COMPARE=TRUE" - -D "TEST_OUTPUT=hl_f90_tstlite.txt" - #-D "TEST_REFERENCE=hl_f90_tstlite.out" - -D "TEST_FOLDER=${PROJECT_BINARY_DIR}" - -P "${HDF_RESOURCES_EXT_DIR}/runTest.cmake" - ) -endif () -set_tests_properties (HL_FORTRAN_f90_tstlite PROPERTIES DEPENDS HL_FORTRAN_test-clear-objects) - -if (HDF5_ENABLE_USING_MEMCHECKER) - add_test (NAME HL_FORTRAN_f90_tstimage COMMAND $) -else () - add_test (NAME HL_FORTRAN_f90_tstimage COMMAND "${CMAKE_COMMAND}" - -D "TEST_PROGRAM=$" - -D "TEST_ARGS:STRING=" - -D "TEST_EXPECT=0" - -D "TEST_SKIP_COMPARE=TRUE" - -D "TEST_OUTPUT=hl_f90_tstimage.txt" - #-D "TEST_REFERENCE=hl_f90_tstimage.out" - -D "TEST_FOLDER=${PROJECT_BINARY_DIR}" - -P "${HDF_RESOURCES_EXT_DIR}/runTest.cmake" - ) -endif () -set_tests_properties (HL_FORTRAN_f90_tstimage PROPERTIES DEPENDS HL_FORTRAN_test-clear-objects) - -if (HDF5_ENABLE_USING_MEMCHECKER) - add_test (NAME HL_FORTRAN_f90_tsttable COMMAND $) -else () - add_test (NAME HL_FORTRAN_f90_tsttable COMMAND "${CMAKE_COMMAND}" - -D "TEST_PROGRAM=$" - -D "TEST_ARGS:STRING=" - -D "TEST_EXPECT=0" - -D "TEST_SKIP_COMPARE=TRUE" - -D "TEST_OUTPUT=hl_f90_tsttable.txt" - #-D "TEST_REFERENCE=hl_f90_tsttable.out" - -D "TEST_FOLDER=${PROJECT_BINARY_DIR}" - -P "${HDF_RESOURCES_EXT_DIR}/runTest.cmake" - ) -endif () -set_tests_properties (HL_FORTRAN_f90_tsttable PROPERTIES DEPENDS HL_FORTRAN_test-clear-objects) - if (BUILD_SHARED_LIBS) add_test ( NAME HL_FORTRAN_test-shared-clear-objects @@ -114,68 +85,8 @@ if (BUILD_SHARED_LIBS) set_tests_properties (HL_FORTRAN_test-shared-clear-objects PROPERTIES DEPENDS "HL_FORTRAN_f90_tsttable;HL_FORTRAN_f90_tstimage;HL_FORTRAN_f90_tstlite;HL_FORTRAN_f90_tstds" ) - - if (HDF5_ENABLE_USING_MEMCHECKER) - add_test (NAME HL_FORTRAN_f90_tstds-shared COMMAND $) - else () - add_test (NAME HL_FORTRAN_f90_tstds-shared COMMAND "${CMAKE_COMMAND}" - -D "TEST_PROGRAM=$" - -D "TEST_ARGS:STRING=" - -D "TEST_EXPECT=0" - -D "TEST_SKIP_COMPARE=TRUE" - -D "TEST_OUTPUT=hl_f90_tstds-shared.txt" - #-D "TEST_REFERENCE=hl_f90_tstds-shared.out" - -D "TEST_FOLDER=${PROJECT_BINARY_DIR}" - -P "${HDF_RESOURCES_EXT_DIR}/runTest.cmake" - ) - endif () - set_tests_properties (HL_FORTRAN_f90_tstds-shared PROPERTIES DEPENDS HL_FORTRAN_test-shared-clear-objects) - - if (HDF5_ENABLE_USING_MEMCHECKER) - add_test (NAME HL_FORTRAN_f90_tstlite-shared COMMAND $) - else () - add_test (NAME HL_FORTRAN_f90_tstlite-shared COMMAND "${CMAKE_COMMAND}" - -D "TEST_PROGRAM=$" - -D "TEST_ARGS:STRING=" - -D "TEST_EXPECT=0" - -D "TEST_SKIP_COMPARE=TRUE" - -D "TEST_OUTPUT=hl_f90_tstlite-shared.txt" - #-D "TEST_REFERENCE=hl_f90_tstlite-shared.out" - -D "TEST_FOLDER=${PROJECT_BINARY_DIR}" - -P "${HDF_RESOURCES_EXT_DIR}/runTest.cmake" - ) - endif () - set_tests_properties (HL_FORTRAN_f90_tstlite-shared PROPERTIES DEPENDS HL_FORTRAN_test-shared-clear-objects) - - if (HDF5_ENABLE_USING_MEMCHECKER) - add_test (NAME HL_FORTRAN_f90_tstimage-shared COMMAND $) - else () - add_test (NAME HL_FORTRAN_f90_tstimage-shared COMMAND "${CMAKE_COMMAND}" - -D "TEST_PROGRAM=$" - -D "TEST_ARGS:STRING=" - -D "TEST_EXPECT=0" - -D "TEST_SKIP_COMPARE=TRUE" - -D "TEST_OUTPUT=hl_f90_tstimage-shared.txt" - #-D "TEST_REFERENCE=hl_f90_tstimage-shared.out" - -D "TEST_FOLDER=${PROJECT_BINARY_DIR}" - -P "${HDF_RESOURCES_EXT_DIR}/runTest.cmake" - ) - endif () - set_tests_properties (HL_FORTRAN_f90_tstimage-shared PROPERTIES DEPENDS HL_FORTRAN_test-shared-clear-objects) - - if (HDF5_ENABLE_USING_MEMCHECKER) - add_test (NAME HL_FORTRAN_f90_tsttable-shared COMMAND $) - else () - add_test (NAME HL_FORTRAN_f90_tsttable-shared COMMAND "${CMAKE_COMMAND}" - -D "TEST_PROGRAM=$" - -D "TEST_ARGS:STRING=" - -D "TEST_EXPECT=0" - -D "TEST_SKIP_COMPARE=TRUE" - -D "TEST_OUTPUT=hl_f90_tsttable-shared.txt" - #-D "TEST_REFERENCE=hl_f90_tsttable-shared.out" - -D "TEST_FOLDER=${PROJECT_BINARY_DIR}" - -P "${HDF_RESOURCES_EXT_DIR}/runTest.cmake" - ) - endif () - set_tests_properties (HL_FORTRAN_f90_tsttable-shared PROPERTIES DEPENDS HL_FORTRAN_test-shared-clear-objects) endif () + +foreach (test ${H5_TESTS}) + ADD_H5_FORTRAN_TEST(${test}) +endforeach () diff --git a/hl/src/CMakeLists.txt b/hl/src/CMakeLists.txt index 7204b13..e339f11 100644 --- a/hl/src/CMakeLists.txt +++ b/hl/src/CMakeLists.txt @@ -1,5 +1,5 @@ cmake_minimum_required (VERSION 3.10) -PROJECT (HDF5_HL_SRC) +project (HDF5_HL_SRC C) #----------------------------------------------------------------------------- # List Source files @@ -30,27 +30,30 @@ set (HL_HEADERS ) add_library (${HDF5_HL_LIB_TARGET} STATIC ${HL_SOURCES} ${HL_HEADERS}) -TARGET_C_PROPERTIES (${HDF5_HL_LIB_TARGET} STATIC " " " ") +target_include_directories(${HDF5_HL_LIB_TARGET} + PRIVATE "${HDF5_SRC_DIR};${HDF5_BINARY_DIR};$<$:${MPI_C_INCLUDE_DIRS}>" + INTERFACE "$/include>" +) +TARGET_C_PROPERTIES (${HDF5_HL_LIB_TARGET} STATIC) target_link_libraries (${HDF5_HL_LIB_TARGET} PUBLIC ${HDF5_LIB_TARGET}) H5_SET_LIB_OPTIONS (${HDF5_HL_LIB_TARGET} ${HDF5_HL_LIB_NAME} STATIC 0) -set_target_properties (${HDF5_HL_LIB_TARGET} PROPERTIES - FOLDER libraries/hl - INTERFACE_INCLUDE_DIRECTORIES "$/include>" -) +set_target_properties (${HDF5_HL_LIB_TARGET} PROPERTIES FOLDER libraries/hl) set_global_variable (HDF5_LIBRARIES_TO_EXPORT "${HDF5_LIBRARIES_TO_EXPORT};${HDF5_HL_LIB_TARGET}") set (install_targets ${HDF5_HL_LIB_TARGET}) if (BUILD_SHARED_LIBS) add_library (${HDF5_HL_LIBSH_TARGET} SHARED ${HL_SOURCES} ${HL_HEADERS}) - TARGET_C_PROPERTIES (${HDF5_HL_LIBSH_TARGET} SHARED " " " ") + target_include_directories(${HDF5_HL_LIBSH_TARGET} + PRIVATE "${HDF5_SRC_DIR};${HDF5_BINARY_DIR};$<$:${MPI_C_INCLUDE_DIRS}>" + INTERFACE "$/include>" + ) + target_compile_definitions(${HDF5_HL_LIBSH_TARGET} + PUBLIC "H5_BUILT_AS_DYNAMIC_LIB" + ) + TARGET_C_PROPERTIES (${HDF5_HL_LIBSH_TARGET} SHARED) target_link_libraries (${HDF5_HL_LIBSH_TARGET} PUBLIC ${HDF5_LIBSH_TARGET}) H5_SET_LIB_OPTIONS (${HDF5_HL_LIBSH_TARGET} ${HDF5_HL_LIB_NAME} SHARED "HL") - set_target_properties (${HDF5_HL_LIBSH_TARGET} PROPERTIES - FOLDER libraries/hl - COMPILE_DEFINITIONS "H5_BUILT_AS_DYNAMIC_LIB" - INTERFACE_INCLUDE_DIRECTORIES "$/include>" - INTERFACE_COMPILE_DEFINITIONS H5_BUILT_AS_DYNAMIC_LIB=1 - ) + set_target_properties (${HDF5_HL_LIBSH_TARGET} PROPERTIES FOLDER libraries/hl) set_global_variable (HDF5_LIBRARIES_TO_EXPORT "${HDF5_LIBRARIES_TO_EXPORT};${HDF5_HL_LIBSH_TARGET}") set (install_targets ${install_targets} ${HDF5_HL_LIBSH_TARGET}) endif () diff --git a/hl/test/CMakeLists.txt b/hl/test/CMakeLists.txt index 6b3c764..44f286b 100644 --- a/hl/test/CMakeLists.txt +++ b/hl/test/CMakeLists.txt @@ -1,5 +1,5 @@ cmake_minimum_required (VERSION 3.10) -PROJECT (HDF5_HL_TEST) +project (HDF5_HL_TEST C) # -------------------------------------------------------------------- # Notes: When creating unit test executables they should be prefixed # with "hl_". This allows for easier filtering of the test suite when @@ -14,16 +14,14 @@ PROJECT (HDF5_HL_TEST) set (srcdir ${CMAKE_CURRENT_SOURCE_DIR}) configure_file (${HDF5_HL_TEST_SOURCE_DIR}/H5srcdir_str.h.in H5srcdir_str.h @ONLY) -include_directories (${CMAKE_CURRENT_BINARY_DIR}) -include_directories (${HDF5_TEST_SRC_DIR}) - # -------------------------------------------------------------------- # Macro used to add a unit test # -------------------------------------------------------------------- MACRO (HL_ADD_EXE hl_name) add_executable (hl_${hl_name} ${hl_name}.c) - TARGET_C_PROPERTIES (hl_${hl_name} STATIC " " " ") - target_link_libraries (hl_${hl_name} + target_include_directories(hl_${hl_name} PRIVATE "${HDF5_TEST_SRC_DIR};${HDF5_SRC_DIR};${HDF5_BINARY_DIR};$<$:${MPI_C_INCLUDE_DIRS}>") + TARGET_C_PROPERTIES (hl_${hl_name} STATIC) + target_link_libraries (hl_${hl_name} PRIVATE ${HDF5_HL_LIB_TARGET} ${HDF5_TEST_LIB_TARGET} ${HDF5_LIB_TARGET} @@ -33,8 +31,9 @@ ENDMACRO () MACRO (HL_ADD_SHEXE hl_name) add_executable (hl_${hl_name} ${hl_name}.c) - TARGET_C_PROPERTIES (hl_${hl_name} SHARED " " " ") - target_link_libraries (hl_${hl_name} + target_include_directories(hl_${hl_name} PRIVATE "${HDF5_TEST_SRC_DIR};${HDF5_SRC_DIR};${HDF5_BINARY_DIR};$<$:${MPI_C_INCLUDE_DIRS}>") + TARGET_C_PROPERTIES (hl_${hl_name} SHARED) + target_link_libraries (hl_${hl_name} PRIVATE ${HDF5_HL_LIBSH_TARGET} ${HDF5_TEST_LIBSH_TARGET} ${HDF5_LIBSH_TARGET} @@ -53,8 +52,9 @@ HL_ADD_EXE (test_dset_append) # test_packet has two source files add_executable (hl_test_packet test_packet.c test_packet_vlen.c) -TARGET_C_PROPERTIES (hl_test_packet STATIC " " " ") -target_link_libraries (hl_test_packet +target_include_directories(hl_test_packet PRIVATE "${HDF5_TEST_SRC_DIR};${HDF5_SRC_DIR};${HDF5_BINARY_DIR};$<$:${MPI_C_INCLUDE_DIRS}>") +TARGET_C_PROPERTIES (hl_test_packet STATIC) +target_link_libraries (hl_test_packet PRIVATE ${HDF5_HL_LIB_TARGET} ${HDF5_TEST_LIB_TARGET} ${HDF5_LIB_TARGET} @@ -67,8 +67,9 @@ set_target_properties (hl_test_packet PROPERTIES FOLDER test/hl) # -------------------------------------------------------------------- if (HDF5_BUILD_GENERATORS) add_executable (hl_gen_test_ds gen_test_ds.c) - TARGET_C_PROPERTIES (hl_gen_test_ds STATIC " " " ") - target_link_libraries (hl_gen_test_ds + target_include_directories(hl_gen_test_ds PRIVATE "${HDF5_SRC_DIR};${HDF5_BINARY_DIR};$<$:${MPI_C_INCLUDE_DIRS}>") + TARGET_C_PROPERTIES (hl_gen_test_ds STATIC) + target_link_libraries (hl_gen_test_ds PRIVATE ${HDF5_HL_LIB_TARGET} ${HDF5_TEST_LIB_TARGET} ${HDF5_LIB_TARGET} @@ -76,8 +77,9 @@ if (HDF5_BUILD_GENERATORS) set_target_properties (hl_gen_test_ds PROPERTIES FOLDER test/hl/gen) add_executable (hl_gen_test_ld gen_test_ld.c) - TARGET_C_PROPERTIES (hl_gen_test_ld STATIC " " " ") - target_link_libraries (hl_gen_test_ld + target_include_directories(hl_gen_test_ld PRIVATE "${HDF5_SRC_DIR};${HDF5_BINARY_DIR};$<$:${MPI_C_INCLUDE_DIRS}>") + TARGET_C_PROPERTIES (hl_gen_test_ld STATIC) + target_link_libraries (hl_gen_test_ld PRIVATE ${HDF5_HL_LIB_TARGET} ${HDF5_TEST_LIB_TARGET} ${HDF5_LIB_TARGET} diff --git a/hl/tools/CMakeLists.txt b/hl/tools/CMakeLists.txt index 67e0ccb..c2889c3 100644 --- a/hl/tools/CMakeLists.txt +++ b/hl/tools/CMakeLists.txt @@ -1,5 +1,5 @@ cmake_minimum_required (VERSION 3.10) -PROJECT (HDF5_HL_TOOLS C CXX) +project (HDF5_HL_TOOLS C) add_subdirectory (gif2h5) diff --git a/hl/tools/gif2h5/CMakeLists.txt b/hl/tools/gif2h5/CMakeLists.txt index 2697dfd..a27ab18 100644 --- a/hl/tools/gif2h5/CMakeLists.txt +++ b/hl/tools/gif2h5/CMakeLists.txt @@ -1,5 +1,5 @@ cmake_minimum_required (VERSION 3.10) -PROJECT (HDF5_HL_TOOLS_GIF2H5) +project (HDF5_HL_TOOLS_GIF2H5 C) #----------------------------------------------------------------------------- # Define Sources @@ -14,12 +14,10 @@ set (GIF2H5_SOURCES ) #-- Add gif2hdf5 program -INCLUDE_DIRECTORIES (${HDF5_TOOLS_DIR}/lib) -INCLUDE_DIRECTORIES (${HDF5_HL_TOOLS_GIF2H5_SOURCE_DIR}) - add_executable (gif2h5 ${GIF2H5_SOURCES}) -TARGET_C_PROPERTIES (gif2h5 STATIC " " " ") -target_link_libraries (gif2h5 ${HDF5_HL_LIB_TARGET} ${HDF5_LIB_TARGET} ${HDF5_TOOLS_LIB_TARGET}) +target_include_directories(gif2h5 PRIVATE "${HDF5_SRC_DIR};${HDF5_BINARY_DIR};$<$:${MPI_C_INCLUDE_DIRS}>") +TARGET_C_PROPERTIES (gif2h5 STATIC) +target_link_libraries (gif2h5 PRIVATE ${HDF5_HL_LIB_TARGET} ${HDF5_LIB_TARGET} ${HDF5_TOOLS_LIB_TARGET}) set_target_properties (gif2h5 PROPERTIES FOLDER tools/hl) set_global_variable (HDF5_UTILS_TO_EXPORT "${HDF5_UTILS_TO_EXPORT};gif2h5") @@ -29,8 +27,9 @@ set (hdf2gif_SOURCES ${HDF5_HL_TOOLS_GIF2H5_SOURCE_DIR}/hdfgifwr.c ) add_executable (h52gif ${hdf2gif_SOURCES}) -TARGET_C_PROPERTIES (h52gif STATIC " " " ") -target_link_libraries (h52gif ${HDF5_HL_LIB_TARGET} ${HDF5_LIB_TARGET} ${HDF5_TOOLS_LIB_TARGET}) +target_include_directories(h52gif PRIVATE "${HDF5_SRC_DIR};${HDF5_BINARY_DIR};$<$:${MPI_C_INCLUDE_DIRS}>") +TARGET_C_PROPERTIES (h52gif STATIC) +target_link_libraries (h52gif PRIVATE ${HDF5_HL_LIB_TARGET} ${HDF5_LIB_TARGET} ${HDF5_TOOLS_LIB_TARGET}) set_target_properties (h52gif PROPERTIES FOLDER tools/hl) set_global_variable (HDF5_UTILS_TO_EXPORT "${HDF5_UTILS_TO_EXPORT};h52gif") @@ -42,8 +41,9 @@ if (BUILD_TESTING) # -------------------------------------------------------------------- if (HDF5_BUILD_GENERATORS) add_executable (hl_h52gifgentest ${HDF5_HL_TOOLS_GIF2H5_SOURCE_DIR}/h52gifgentst.c) - TARGET_C_PROPERTIES (hl_h52gifgentest STATIC " " " ") - target_link_libraries (hl_h52gifgentest ${HDF5_HL_LIB_TARGET} ${HDF5_LIB_TARGET}) + target_include_directories(hl_h52gifgentest PRIVATE "${HDF5_SRC_DIR};${HDF5_BINARY_DIR};$<$:${MPI_C_INCLUDE_DIRS}>") + TARGET_C_PROPERTIES (hl_h52gifgentest STATIC) + target_link_libraries (hl_h52gifgentest PRIVATE ${HDF5_HL_LIB_TARGET} ${HDF5_LIB_TARGET}) set_target_properties (hl_h52gifgentest PROPERTIES FOLDER generator/tools/hl) # add_test (NAME hl_h52gifgentest COMMAND $) diff --git a/hl/tools/h5watch/CMakeLists.txt b/hl/tools/h5watch/CMakeLists.txt index 5de655e..1d1c341 100644 --- a/hl/tools/h5watch/CMakeLists.txt +++ b/hl/tools/h5watch/CMakeLists.txt @@ -1,5 +1,5 @@ cmake_minimum_required (VERSION 3.10) -PROJECT (HDF5_HL_TOOLS_H5WATCH) +project (HDF5_HL_TOOLS_H5WATCH C) #----------------------------------------------------------------------------- # Define Sources @@ -9,25 +9,21 @@ set (H5WATCH_SOURCES ) #-- Add h5watch program -include_directories (${HDF5_TOOLS_DIR}/lib) -include_directories (${HDF5_HL_TOOLS_DIR}/src) -include_directories (${HDF5_HL_TOOLS_H5WATCH_SOURCE_DIR}) - add_executable (h5watch ${H5WATCH_SOURCES}) -TARGET_C_PROPERTIES (h5watch STATIC " " " ") -target_link_libraries (h5watch ${HDF5_HL_LIB_TARGET} ${HDF5_LIB_TARGET} ${HDF5_TOOLS_LIB_TARGET}) +target_include_directories(h5watch PRIVATE "${HDF5_TOOLS_DIR}/lib;${HDF5_SRC_DIR};${HDF5_BINARY_DIR};$<$:${MPI_C_INCLUDE_DIRS}>") +TARGET_C_PROPERTIES (h5watch STATIC) +target_link_libraries (h5watch PRIVATE ${HDF5_HL_LIB_TARGET} ${HDF5_LIB_TARGET} ${HDF5_TOOLS_LIB_TARGET}) set_target_properties (h5watch PROPERTIES FOLDER tools/hl) if (BUILD_TESTING) - include_directories (${HDF5_TEST_SRC_DIR}) - include_directories(${HDF5_HL_SRC_DIR}/test) #-- Add swmr_check_compat_vfd program set (hl_swmr_check_compat_vfd_SOURCES ${HDF5_HL_TOOLS_H5WATCH_SOURCE_DIR}/swmr_check_compat_vfd.c ) add_executable (hl_swmr_check_compat_vfd ${hl_swmr_check_compat_vfd_SOURCES}) - TARGET_C_PROPERTIES (hl_swmr_check_compat_vfd STATIC " " " ") - target_link_libraries (hl_swmr_check_compat_vfd ${HDF5_HL_LIB_TARGET} ${HDF5_LIB_TARGET} ${HDF5_TOOLS_LIB_TARGET}) + target_include_directories(hl_swmr_check_compat_vfd PRIVATE "${HDF5_SRC_DIR};${HDF5_BINARY_DIR};$<$:${MPI_C_INCLUDE_DIRS}>") + TARGET_C_PROPERTIES (hl_swmr_check_compat_vfd STATIC) + target_link_libraries (hl_swmr_check_compat_vfd PRIVATE ${HDF5_LIB_TARGET}) set_target_properties (hl_swmr_check_compat_vfd PROPERTIES FOLDER tools/hl) #-- Add extend_dset program @@ -35,13 +31,15 @@ if (BUILD_TESTING) ${HDF5_HL_TOOLS_H5WATCH_SOURCE_DIR}/extend_dset.c ) add_executable (extend_dset ${extend_dset_SOURCES}) - TARGET_C_PROPERTIES (extend_dset STATIC " " " ") - target_link_libraries (extend_dset ${HDF5_HL_LIB_TARGET} ${HDF5_TEST_LIB_TARGET} ${HDF5_LIB_TARGET} ${HDF5_TOOLS_LIB_TARGET}) + target_include_directories(extend_dset PRIVATE "${HDF5_HL_SRC_DIR}/test;${HDF5_HL_SRC_DIR}/src;${HDF5_SRC_DIR};${HDF5_BINARY_DIR};$<$:${MPI_C_INCLUDE_DIRS}>") + TARGET_C_PROPERTIES (extend_dset STATIC) + target_link_libraries (extend_dset PRIVATE ${HDF5_HL_LIB_TARGET} ${HDF5_TEST_LIB_TARGET} ${HDF5_LIB_TARGET} ${HDF5_TOOLS_LIB_TARGET}) set_target_properties (extend_dset PROPERTIES FOLDER tools/hl) add_executable (h5watchgentest ${HDF5_HL_TOOLS_H5WATCH_SOURCE_DIR}/h5watchgentest.c) - TARGET_C_PROPERTIES (h5watchgentest STATIC " " " ") - target_link_libraries (h5watchgentest ${HDF5_HL_LIB_TARGET} ${HDF5_LIB_TARGET}) + target_include_directories(h5watchgentest PRIVATE "${HDF5_HL_SRC_DIR}/src;${HDF5_SRC_DIR};${HDF5_BINARY_DIR};$<$:${MPI_C_INCLUDE_DIRS}>") + TARGET_C_PROPERTIES (h5watchgentest STATIC) + target_link_libraries (h5watchgentest PRIVATE ${HDF5_HL_LIB_TARGET} ${HDF5_LIB_TARGET}) set_target_properties (h5watchgentest PROPERTIES FOLDER generator/tools/hl) include (CMakeTests.cmake) diff --git a/java/CMakeLists.txt b/java/CMakeLists.txt index fc057f7..ffc3b94 100644 --- a/java/CMakeLists.txt +++ b/java/CMakeLists.txt @@ -1,8 +1,9 @@ cmake_minimum_required (VERSION 3.10) -PROJECT ( HDF5_JAVA C Java ) +project (HDF5_JAVA C Java) set (CMAKE_MODULE_PATH "${HDF_RESOURCES_DIR};${HDF_RESOURCES_EXT_DIR}") find_package (Java) + #----------------------------------------------------------------------------- # Include some macros for reusable code #----------------------------------------------------------------------------- @@ -13,7 +14,6 @@ find_package (JNI) message ("JNI_LIBRARIES=${JNI_LIBRARIES}") message ("JNI_INCLUDE_DIRS=${JNI_INCLUDE_DIRS}") -INCLUDE_DIRECTORIES ( ${JNI_INCLUDE_DIRS} ) if (WIN32) set (HDF_JRE_DIRECTORY "C:/Program Files/Java/jre8") @@ -25,13 +25,14 @@ endif () # Include the main src and config directories #----------------------------------------------------------------------------- set (HDF5_JAVA_INCLUDE_DIRECTORIES + ${JNI_INCLUDE_DIRS} ${HDF5_JAVA_JNI_SRC_DIR} ${JAVA_INCLUDE_PATH} ${JAVA_INCLUDE_PATH2} ) -INCLUDE_DIRECTORIES (${HDF5_JAVA_INCLUDE_DIRECTORIES}) -set (CMAKE_JAVA_INCLUDE_PATH "") +set_directory_properties(PROPERTIES INCLUDE_DIRECTORIES "${HDF5_JAVA_INCLUDE_DIRECTORIES}") +set (CMAKE_JAVA_INCLUDE_PATH "") #----------------------------------------------------------------------------- # Traverse source subdirectory diff --git a/java/examples/CMakeLists.txt b/java/examples/CMakeLists.txt index 3d1e30e..828b96a 100644 --- a/java/examples/CMakeLists.txt +++ b/java/examples/CMakeLists.txt @@ -1,5 +1,5 @@ cmake_minimum_required (VERSION 3.10) -PROJECT (HDFJAVA_EXAMPLES) +project (HDFJAVA_EXAMPLES Java) add_subdirectory (datasets) add_subdirectory (datatypes) diff --git a/java/examples/datasets/CMakeLists.txt b/java/examples/datasets/CMakeLists.txt index 6a90cd1..1375372 100644 --- a/java/examples/datasets/CMakeLists.txt +++ b/java/examples/datasets/CMakeLists.txt @@ -1,13 +1,8 @@ cmake_minimum_required (VERSION 3.10) -PROJECT (HDFJAVA_EXAMPLES_DATASETS Java) +project (HDFJAVA_EXAMPLES_DATASETS Java) set (CMAKE_VERBOSE_MAKEFILE 1) -INCLUDE_DIRECTORIES ( - ${HDF5_JAVA_JNI_BINARY_DIR} - ${HDF5_JAVA_HDF5_LIB_DIR} -) - set (HDF_JAVA_EXAMPLES H5Ex_D_Alloc H5Ex_D_Checksum @@ -15,13 +10,9 @@ set (HDF_JAVA_EXAMPLES H5Ex_D_Compact H5Ex_D_External H5Ex_D_FillValue - H5Ex_D_Gzip H5Ex_D_Hyperslab H5Ex_D_ReadWrite - H5Ex_D_Shuffle - H5Ex_D_Szip H5Ex_D_UnlimitedAdd - H5Ex_D_UnlimitedGzip H5Ex_D_UnlimitedMod H5Ex_D_Nbit H5Ex_D_Transform @@ -29,6 +20,25 @@ set (HDF_JAVA_EXAMPLES H5Ex_D_Soint ) +set (HDF_JAVA_ZLIB_EXAMPLES + H5Ex_D_Gzip + H5Ex_D_Shuffle + H5Ex_D_UnlimitedGzip +) + +set (HDF_JAVA_SZIP_EXAMPLES + H5Ex_D_Szip +) + +# detect whether the encoder is present. + if (H5_HAVE_FILTER_DEFLATE) + set (${HDF_JAVA_EXAMPLES} ${HDF_JAVA_EXAMPLES} ${HDF_JAVA_ZLIB_EXAMPLES}) + endif () + + if (H5_HAVE_FILTER_SZIP) + set (${HDF_JAVA_EXAMPLES} ${HDF_JAVA_EXAMPLES} ${HDF_JAVA_SZIP_EXAMPLES}) + endif (H5_HAVE_FILTER_SZIP) + if (WIN32) set (CMAKE_JAVA_INCLUDE_FLAG_SEP ";") else () @@ -85,15 +95,6 @@ ENDMACRO () if (BUILD_TESTING) -# detect whether the encoder is present. - if (H5_HAVE_FILTER_DEFLATE) - set (USE_FILTER_DEFLATE "true") - endif () - - if (H5_HAVE_FILTER_SZIP) - set (USE_FILTER_SZIP "true") - endif (H5_HAVE_FILTER_SZIP) - foreach (example ${HDF_JAVA_EXAMPLES}) if ("${example}" STREQUAL "H5Ex_D_External") add_test ( @@ -123,13 +124,7 @@ if (BUILD_TESTING) ) set_tests_properties (JAVA_datasets-${example}-copy-objects PROPERTIES DEPENDS JAVA_datasets-${example}-clear-objects) set (last_test "JAVA_datasets-${example}-copy-objects") - if ("${example}" STREQUAL "H5Ex_D_Szip") - if (USE_FILTER_SZIP) - ADD_H5_TEST (${example} 0) - endif () - else () - ADD_H5_TEST (${example} 0) - endif () + ADD_H5_TEST (${example} 0) endforeach () endif () diff --git a/java/examples/datatypes/CMakeLists.txt b/java/examples/datatypes/CMakeLists.txt index 73111ed..4a8b2a4 100644 --- a/java/examples/datatypes/CMakeLists.txt +++ b/java/examples/datatypes/CMakeLists.txt @@ -1,13 +1,8 @@ cmake_minimum_required (VERSION 3.10) -PROJECT (HDFJAVA_EXAMPLES_DATATYPES Java) +project (HDFJAVA_EXAMPLES_DATATYPES Java) set (CMAKE_VERBOSE_MAKEFILE 1) -INCLUDE_DIRECTORIES ( - ${HDF5_JAVA_JNI_BINARY_DIR} - ${HDF5_JAVA_HDF5_LIB_DIR} -) - set (HDF_JAVA_EXAMPLES H5Ex_T_Array H5Ex_T_ArrayAttribute diff --git a/java/examples/groups/CMakeLists.txt b/java/examples/groups/CMakeLists.txt index 6b55359..2c5d33b 100644 --- a/java/examples/groups/CMakeLists.txt +++ b/java/examples/groups/CMakeLists.txt @@ -1,13 +1,8 @@ cmake_minimum_required (VERSION 3.10) -PROJECT (HDFJAVA_EXAMPLES_GROUPS Java) +project (HDFJAVA_EXAMPLES_GROUPS Java) set (CMAKE_VERBOSE_MAKEFILE 1) -INCLUDE_DIRECTORIES ( - ${HDF5_JAVA_JNI_BINARY_DIR} - ${HDF5_JAVA_HDF5_LIB_DIR} -) - set (HDF_JAVA_EXAMPLES H5Ex_G_Create H5Ex_G_Iterate diff --git a/java/examples/intro/CMakeLists.txt b/java/examples/intro/CMakeLists.txt index 65db3fe..8d56b86 100644 --- a/java/examples/intro/CMakeLists.txt +++ b/java/examples/intro/CMakeLists.txt @@ -1,13 +1,8 @@ cmake_minimum_required (VERSION 3.10) -PROJECT (HDFJAVA_EXAMPLES_INTRO Java) +project (HDFJAVA_EXAMPLES_INTRO Java) set (CMAKE_VERBOSE_MAKEFILE 1) -INCLUDE_DIRECTORIES ( - ${HDF5_JAVA_JNI_BINARY_DIR} - ${HDF5_JAVA_HDF5_LIB_DIR} -) - set (HDF_JAVA_EXAMPLES H5_CreateAttribute H5_CreateDataset diff --git a/java/src/CMakeLists.txt b/java/src/CMakeLists.txt index 0c00923..3f80d8f 100644 --- a/java/src/CMakeLists.txt +++ b/java/src/CMakeLists.txt @@ -1,5 +1,5 @@ cmake_minimum_required (VERSION 3.10) -PROJECT ( HDF5_JAVA_SRC C Java ) +project (HDF5_JAVA_SRC C) #----------------------------------------------------------------------------- # Traverse source subdirectory diff --git a/java/src/hdf/CMakeLists.txt b/java/src/hdf/CMakeLists.txt index ecff984..161ddf1 100644 --- a/java/src/hdf/CMakeLists.txt +++ b/java/src/hdf/CMakeLists.txt @@ -1,4 +1,4 @@ cmake_minimum_required (VERSION 3.10) -PROJECT (HDF5_JAVA_HDF) +project (HDF5_JAVA_HDF C) add_subdirectory (hdf5lib) diff --git a/java/src/hdf/hdf5lib/CMakeLists.txt b/java/src/hdf/hdf5lib/CMakeLists.txt index 9506fc1..c171ea8 100644 --- a/java/src/hdf/hdf5lib/CMakeLists.txt +++ b/java/src/hdf/hdf5lib/CMakeLists.txt @@ -1,14 +1,9 @@ cmake_minimum_required (VERSION 3.10) -PROJECT (HDF5_JAVA_HDF_HDF5 Java) +project (HDF5_JAVA_HDF_HDF5 Java) set (CMAKE_VERBOSE_MAKEFILE 1) -INCLUDE_DIRECTORIES ( - ${HDF5_JAVA_HDF_HDF5_SOURCE_DIR} - ${HDF5_JAVA_HDF_HDF5_BINARY_DIR} - ${HDF5_JAVA_LIB_DIR} - ${CMAKE_CURRENT_BINARY_DIR}/CMakeFiles/${HDF5_JAVA_HDF5_LIB_CORENAME}.dir/hdf/hdf5lib -) +set_directory_properties(PROPERTIES INCLUDE_DIRECTORIES "${HDF5_JAVA_HDF_HDF5_SOURCE_DIR};${HDF5_JAVA_HDF_HDF5_BINARY_DIR};${HDF5_JAVA_LIB_DIR};${CMAKE_CURRENT_BINARY_DIR}/CMakeFiles/${HDF5_JAVA_HDF5_LIB_CORENAME}.dir/hdf/hdf5lib") SET_GLOBAL_VARIABLE (HDF5_JAVA_SOURCE_PACKAGES "${HDF5_JAVA_SOURCE_PACKAGES};hdf.hdf5lib.callbacks;hdf.hdf5lib.exceptions;hdf.hdf5lib.structs;hdf.hdf5lib" diff --git a/java/src/hdf/hdf5lib/H5.java b/java/src/hdf/hdf5lib/H5.java index 5c4fc40..a37ddf8 100644 --- a/java/src/hdf/hdf5lib/H5.java +++ b/java/src/hdf/hdf5lib/H5.java @@ -1276,6 +1276,38 @@ public class H5 implements java.io.Serializable { // //////////////////////////////////////////////////////////// // // + // H5AC: Cache Interface Functions // + // // + // //////////////////////////////////////////////////////////// + + // No public Functions + + // //////////////////////////////////////////////////////////// + // // + // H5B: B-link-tree Interface Functions // + // // + // //////////////////////////////////////////////////////////// + + // No public Functions + + // //////////////////////////////////////////////////////////// + // // + // H5B2: v2 B-tree Interface Functions // + // // + // //////////////////////////////////////////////////////////// + + // No public Functions + + // //////////////////////////////////////////////////////////// + // // + // H5C: Cache Interface Functions // + // // + // //////////////////////////////////////////////////////////// + + // No public Functions + + // //////////////////////////////////////////////////////////// + // // // H5D: Datasets Interface Functions // // // // //////////////////////////////////////////////////////////// @@ -2109,6 +2141,10 @@ public class H5 implements java.io.Serializable { // /////// unimplemented //////// // H5_DLL herr_t H5Ddebug(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 H5Dformat_convert(hid_t dset_id); + // H5_DLL herr_t H5Dget_chunk_index_type(hid_t did, H5D_chunk_index_t *idx_type); + // 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); // herr_t H5Dscatter(H5D_scatter_func_t op, void *op_data, hid_t type_id, hid_t dst_space_id, void *dst_buf); @@ -2912,12 +2948,22 @@ public class H5 implements java.io.Serializable { public synchronized static native void H5Fget_mdc_logging_status(long file_id, boolean[] mdc_logging_status) throws HDF5LibraryException, NullPointerException; - - // /////// unimplemented //////// + // 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); // ssize_t H5Fget_file_image(hid_t file_id, void * buf_ptr, size_t buf_len); // herr_t H5Fget_metadata_read_retry_info(hid_t file_id, H5F_retry_info_t *info); // 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 H5Fset_libver_bounds(hid_t file_id, H5F_libver_t low, H5F_libver_t high); + // 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); + // #ifdef H5_HAVE_PARALLEL + // H5_DLL herr_t H5Fset_mpi_atomicity(hid_t file_id, hbool_t flag); + // H5_DLL herr_t H5Fget_mpi_atomicity(hid_t file_id, hbool_t *flag); + // #endif /* H5_HAVE_PARALLEL */ // /** // * H5Fget_vfd_handle returns a pointer to the file handle from the @@ -2971,6 +3017,41 @@ public class H5 implements java.io.Serializable { // //////////////////////////////////////////////////////////// // // + // H5FD: File Driver Interface Functions // + // // + // //////////////////////////////////////////////////////////// + + // /////// unimplemented //////// + // H5_DLL hid_t H5FDregister(const H5FD_class_t *cls); + // H5_DLL herr_t H5FDunregister(hid_t driver_id); + // H5_DLL H5FD_t *H5FDopen(const char *name, unsigned flags, hid_t fapl_id, haddr_t maxaddr); + // H5_DLL herr_t H5FDclose(H5FD_t *file); + // H5_DLL int H5FDcmp(const H5FD_t *f1, const H5FD_t *f2); + // H5_DLL int H5FDquery(const H5FD_t *f, unsigned long *flags); + // H5_DLL haddr_t H5FDalloc(H5FD_t *file, H5FD_mem_t type, hid_t dxpl_id, hsize_t size); + // H5_DLL herr_t H5FDfree(H5FD_t *file, H5FD_mem_t type, hid_t dxpl_id, haddr_t addr, hsize_t size); + // H5_DLL haddr_t H5FDget_eoa(H5FD_t *file, H5FD_mem_t type); + // H5_DLL herr_t H5FDset_eoa(H5FD_t *file, H5FD_mem_t type, haddr_t eoa); + // H5_DLL haddr_t H5FDget_eof(H5FD_t *file, H5FD_mem_t type); + // H5_DLL herr_t H5FDget_vfd_handle(H5FD_t *file, hid_t fapl, void**file_handle); + // H5_DLL herr_t H5FDread(H5FD_t *file, H5FD_mem_t type, hid_t dxpl_id, haddr_t addr, size_t size, void *buf/*out*/); + // H5_DLL herr_t H5FDwrite(H5FD_t *file, H5FD_mem_t type, hid_t dxpl_id, haddr_t addr, size_t size, const void *buf); + // H5_DLL herr_t H5FDflush(H5FD_t *file, hid_t dxpl_id, hbool_t closing); + // H5_DLL herr_t H5FDtruncate(H5FD_t *file, hid_t dxpl_id, hbool_t closing); + // H5_DLL herr_t H5FDlock(H5FD_t *file, hbool_t rw); + // H5_DLL herr_t H5FDunlock(H5FD_t *file); + // H5_DLL herr_t H5FDdriver_query(hid_t driver_id, unsigned long *flags/*out*/); + + // //////////////////////////////////////////////////////////// + // // + // H5FS: File Free Space Interface Functions // + // // + // //////////////////////////////////////////////////////////// + + // No public Functions + + // //////////////////////////////////////////////////////////// + // // // H5G: Group Interface Functions // // // // //////////////////////////////////////////////////////////// @@ -3408,6 +3489,30 @@ public class H5 implements java.io.Serializable { // //////////////////////////////////////////////////////////// // // + // H5HF: Fractal Heap Interface Functions // + // // + // //////////////////////////////////////////////////////////// + + // No public Functions + + // //////////////////////////////////////////////////////////// + // // + // H5HG: Global Heap Interface Functions // + // // + // //////////////////////////////////////////////////////////// + + // No public Functions + + // //////////////////////////////////////////////////////////// + // // + // H5HL: Local Heap Interface Functions // + // // + // //////////////////////////////////////////////////////////// + + // No public Functions + + // //////////////////////////////////////////////////////////// + // // // H5I: HDF5 1.8 Identifier Interface API Functions // // // // //////////////////////////////////////////////////////////// @@ -4033,6 +4138,15 @@ public class H5 implements java.io.Serializable { // H5_index_t idx_type, H5_iter_order_t order, hsize_t n, // void *buf/*out*/, size_t size, hid_t lapl_id); + // //////////////////////////////////////////////////////////// + // // + // H5MM: Memory Management Interface API Functions // + // // + // //////////////////////////////////////////////////////////// + + // /////// unimplemented //////// + // typedef void *(*H5MM_allocate_t)(size_t size, void *alloc_info); + // typedef void (*H5MM_free_t)(void *mem, void *free_info); // //////////////////////////////////////////////////////////// // // @@ -4450,6 +4564,9 @@ public class H5 implements java.io.Serializable { public synchronized static native void H5Orefresh(long object_id) throws HDF5LibraryException; // /////// unimplemented //////// + // 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); // //////////////////////////////////////////////////////////// // // @@ -7273,9 +7390,15 @@ public class H5 implements java.io.Serializable { // herr_t H5Pset_file_image_callbacks(hid_t fapl_id, H5FD_file_image_callbacks_t *callbacks_ptr); // herr_t H5Pset_core_write_tracking(hid_t fapl_id, hbool_t is_enabled, size_t page_size); // herr_t H5Pget_core_write_tracking(hid_t fapl_id, hbool_t *is_enabled, size_t *page_size); + // #ifdef H5_HAVE_PARALLEL // herr_t H5Pset_all_coll_metadata_ops(hid_t accpl_id, hbool_t is_collective); + // H5_DLL herr_t H5Pget_all_coll_metadata_ops(hid_t plist_id, hbool_t *is_collective); // herr_t H5Pset_coll_metadata_write(hid_t fapl_id, hbool_t is_collective); // herr_t H5Pget_coll_metadata_write(hid_t fapl_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); // herr_t H5Pget_page_buffer_size(hid_t fapl_id, size_t *buf_size, unsigned *min_meta_perc, unsigned *min_raw_perc); // herr_t H5Pset_object_flush_cb (hid_t fapl_id, H5F_flush_cb_t func, void *user_data); // herr_t H5Pget_object_flush_cb (hid_t fapl_id, H5F_flush_cb_t *func, void **user_data); @@ -7297,6 +7420,11 @@ public class H5 implements java.io.Serializable { // *free_info ) // herr_t H5Pget_type_conv_cb(hid_t plist, H5T_conv_except_func_t *func, void **op_data) // herr_t H5Pset_type_conv_cb( hid_t plist, H5T_conv_except_func_t func, void *op_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 // @@ -7314,21 +7442,6 @@ public class H5 implements java.io.Serializable { // herr_t H5Pget_mcdt_search_cb(hid_t plist_id, H5O_mcdt_search_cb_t *func, void **op_data); // herr_t H5Pset_mcdt_search_cb(hid_t plist_id, H5O_mcdt_search_cb_t func, void *op_data); - - // Other/Older property list routines // - // herr_t H5Pget_fapl_mpio( int fapl_id, MPI_Comm *comm, MPI_Info *info ) - // herr_t H5Pset_fapl_mpio( int fapl_id, MPI_Comm comm, MPI_Info info ) - - // herr_t H5Pget_fapl_mpiposix( int fapl_id, MPI_Comm *comm, hbool_t *use_gpfs_hints ) - // herr_t H5Pset_fapl_mpiposix( int fapl_id, MPI_Comm comm, hbool_t use_gpfs_hints ) - - // herr_t H5Pget_dxpl_mpio( hid_t dxpl_id, H5FD_mpio_xfer_t *xfer_mode ) - // herr_t H5Pset_dxpl_mpio( hid_t dxpl_id, H5FD_mpio_xfer_t xfer_mode ) - // herr_t H5Pset_dxpl_mpio_chunk_opt (hid_t dxpl_id, H5FD_mpio_chunk_opt_t opt_mode) - // herr_t H5Pset_dxpl_mpio_chunk_opt_num (hid_t dxpl_id, unsigned num_chunk_per_proc) - // herr_t H5Pset_dxpl_mpio_chunk_opt_ratio (hid_t dxpl_id, unsigned percent_proc_per_chunk) - // herr_t H5Pset_dxpl_mpio_collective_opt (hid_t dxpl_id, H5FD_mpio_collective_opt_t opt_mode) - // //////////////////////////////////////////////////////////// // // // H5PL: HDF5 1.8 Plugin API Functions // @@ -8252,6 +8365,17 @@ public class H5 implements java.io.Serializable { public synchronized static native boolean H5Sis_regular_hyperslab(long space_id) throws HDF5LibraryException; // /////// unimplemented //////// + // #ifdef NEW_HYPERSLAB_API + // 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 H5Sselect_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); + // #endif /* NEW_HYPERSLAB_API */ diff --git a/java/src/jni/CMakeLists.txt b/java/src/jni/CMakeLists.txt index 21e9d22..a0228e1 100644 --- a/java/src/jni/CMakeLists.txt +++ b/java/src/jni/CMakeLists.txt @@ -1,5 +1,5 @@ cmake_minimum_required (VERSION 3.10) -PROJECT (HDF5_JAVA_JNI C CXX) +project (HDF5_JAVA_JNI C) set (HDF5_JAVA_JNI_CSRCS ${HDF5_JAVA_JNI_SOURCE_DIR}/exceptionImp.c @@ -44,13 +44,12 @@ set (HDF5_JAVA_JNI_CHDRS ${HDF5_JAVA_JNI_SOURCE_DIR}/nativeData.h ) -INCLUDE_DIRECTORIES( ${HDF5_JAVA_JNI_SOURCE_DIR} ) - set (CMAKE_INCLUDE_CURRENT_DIR_IN_INTERFACE ON) ########### JNI libraries always must be built shared ############### add_library (${HDF5_JAVA_JNI_LIB_TARGET} SHARED ${HDF5_JAVA_JNI_CSRCS} ${HDF5_JAVA_JNI_CHDRS}) -TARGET_C_PROPERTIES (${HDF5_JAVA_JNI_LIB_TARGET} SHARED " " " ") +target_include_directories(${HDF5_JAVA_JNI_LIB_TARGET} PRIVATE ${HDF5_BINARY_DIR} ${HDF5_JAVA_JNI_SOURCE_DIR}) +TARGET_C_PROPERTIES (${HDF5_JAVA_JNI_LIB_TARGET} SHARED) target_link_libraries (${HDF5_JAVA_JNI_LIB_TARGET} PUBLIC ${HDF5_LIB_TARGET}) set_target_properties (${HDF5_JAVA_JNI_LIB_TARGET} PROPERTIES FOLDER libraries/jni) SET_GLOBAL_VARIABLE (HDF5_LIBRARIES_TO_EXPORT "${HDF5_LIBRARIES_TO_EXPORT};${HDF5_JAVA_JNI_LIB_TARGET}") diff --git a/java/test/CMakeLists.txt b/java/test/CMakeLists.txt index c48cf01..b76f572 100644 --- a/java/test/CMakeLists.txt +++ b/java/test/CMakeLists.txt @@ -1,104 +1,84 @@ cmake_minimum_required (VERSION 3.10) -PROJECT (HDF5_JAVA_TEST Java) +project (HDF5_JAVA_TEST Java) set (CMAKE_VERBOSE_MAKEFILE 1) -INCLUDE_DIRECTORIES ( - ${HDF5_JAVA_JNI_BINARY_DIR} - ${HDF5_JAVA_HDF5_LIB_DIR} -) +set_directory_properties(PROPERTIES INCLUDE_DIRECTORIES "${HDF5_JAVA_JNI_BINARY_DIR};${HDF5_JAVA_HDF5_LIB_DIR}") set (HDF5_JAVA_TEST_SOURCES - TestH5.java - TestH5Eparams.java - TestH5Eregister.java - TestH5Fparams.java - TestH5Fbasic.java - TestH5F.java - TestH5Fswmr.java - TestH5Gbasic.java - TestH5G.java - TestH5Sbasic.java - TestH5S.java - TestH5Tparams.java - TestH5Tbasic.java - TestH5T.java - TestH5Dparams.java - TestH5D.java - TestH5Dplist.java - TestH5Lparams.java - TestH5Lbasic.java - TestH5Lcreate.java - TestH5R.java - TestH5P.java - TestH5PData.java - TestH5Pfapl.java - TestH5Pvirtual.java - TestH5Plist.java - TestH5A.java - TestH5Oparams.java - TestH5Obasic.java - TestH5Ocreate.java - TestH5Ocopy.java - TestH5PL.java - TestH5Z.java + TestH5 + TestH5Eparams + TestH5Eregister + TestH5Fparams + TestH5Fbasic + TestH5F + TestH5Fswmr + TestH5Gbasic + TestH5G + TestH5Sbasic + TestH5S + TestH5Tparams + TestH5Tbasic + TestH5T + TestH5Dparams + TestH5D + TestH5Dplist + TestH5Lparams + TestH5Lbasic + TestH5Lcreate + TestH5R + TestH5P + TestH5PData + TestH5Pfapl + TestH5Pvirtual + TestH5Plist + TestH5A + TestH5Oparams + TestH5Obasic + TestH5Ocreate + TestH5Ocopy + TestH5PL + TestH5Z ) -if (HDF5_ENABLE_DEBUG_APIS) - set (HDF5_JAVA_TEST_SOURCES - ${HDF5_JAVA_TEST_SOURCES} - TestUnit.java - ) - - file (WRITE ${PROJECT_BINARY_DIR}/Manifest.txt - "Main-Class: test.TestUnit -" - ) -else () +if (NOT HDF5_ENABLE_DEBUG_APIS) set (HDF5_JAVA_TEST_SOURCES ${HDF5_JAVA_TEST_SOURCES} - TestH5E.java - TestH5Edefault.java - TestH5Giterate.java - TestAll.java - ) - - file (WRITE ${PROJECT_BINARY_DIR}/Manifest.txt - "Main-Class: test.TestAll -" + TestH5E + TestH5Edefault + TestH5Giterate ) endif () set (CMAKE_JAVA_INCLUDE_PATH "${HDF5_JAVA_LIB_DIR}/junit.jar;${HDF5_JAVA_LIB_DIR}/hamcrest-core.jar;${HDF5_JAVA_JARS};${HDF5_JAVA_LOGGING_JAR};${HDF5_JAVA_LOGGING_SIMPLE_JAR}") -add_jar (${HDF5_JAVA_TEST_LIB_TARGET} MANIFEST ${PROJECT_BINARY_DIR}/Manifest.txt ${HDF5_JAVA_TEST_SOURCES}) +foreach (test_file ${HDF5_JAVA_TEST_SOURCES}) -get_target_property (${HDF5_JAVA_TEST_LIB_TARGET}_JAR_FILE ${HDF5_JAVA_TEST_LIB_TARGET} JAR_FILE) -#install_jar (${HDF5_JAVA_TEST_LIB_TARGET} ${HJAVA_INSTALL_DATA_DIR}/tests tests) -#get_target_property (${HDF5_JAVA_TEST_LIB_TARGET}_CLASSPATH ${HDF5_JAVA_TEST_LIB_TARGET} CLASSDIR) + file (WRITE ${PROJECT_BINARY_DIR}/${test_file}Manifest.txt + "Main-Class: test.${test_file} +" + ) -add_dependencies (${HDF5_JAVA_TEST_LIB_TARGET} ${HDF5_JAVA_HDF5_LIB_TARGET}) -set_target_properties (${HDF5_JAVA_TEST_LIB_TARGET} PROPERTIES FOLDER test/java) + add_jar (${HDF5_JAVA_TEST_LIB_TARGET}_${test_file} MANIFEST ${PROJECT_BINARY_DIR}/${test_file}Manifest.txt ${test_file}.java) -if (HDF5_ENABLE_DEBUG_APIS) - set (HDF_JAVA_TEST_FILES - JUnit-unit.txt - JUnit-interface.ert - ) - set (testfilter "OK (608 tests)") -else () - set (HDF_JAVA_TEST_FILES - JUnit-interface.txt - JUnit-interface.ert - ) - set (testfilter "OK (645 tests)") -endif () + get_target_property (${HDF5_JAVA_TEST_LIB_TARGET}_${test_file}_JAR_FILE ${HDF5_JAVA_TEST_LIB_TARGET}_${test_file} JAR_FILE) + #install_jar (${HDF5_JAVA_TEST_LIB_TARGET}_${test_file} ${HJAVA_INSTALL_DATA_DIR}/tests tests) + #get_target_property (${HDF5_JAVA_TEST_LIB_TARGET}_${test_file}_CLASSPATH ${HDF5_JAVA_TEST_LIB_TARGET}_${test_file} CLASSDIR) -foreach (h5_file ${HDF_JAVA_TEST_FILES}) - HDFTEST_COPY_FILE("${PROJECT_SOURCE_DIR}/${h5_file}" "${PROJECT_BINARY_DIR}/${h5_file}" "${HDF5_JAVA_TEST_LIB_TARGET}_files") + add_dependencies (${HDF5_JAVA_TEST_LIB_TARGET}_${test_file} ${HDF5_JAVA_HDF5_LIB_TARGET}) + set_target_properties (${HDF5_JAVA_TEST_LIB_TARGET}_${test_file} PROPERTIES FOLDER test/java) +endforeach () + +foreach (h5_file ${HDF5_JAVA_TEST_SOURCES}) + HDFTEST_COPY_FILE("${PROJECT_SOURCE_DIR}/testfiles/JUnit-${h5_file}.txt" "${PROJECT_BINARY_DIR}/JUnit-${h5_file}.txt" "${HDF5_JAVA_TEST_LIB_TARGET}_files") endforeach () HDFTEST_COPY_FILE("${PROJECT_SOURCE_DIR}/h5ex_g_iterate.orig" "${PROJECT_BINARY_DIR}/h5ex_g_iterate.hdf" "${HDF5_JAVA_TEST_LIB_TARGET}_files") +HDFTEST_COPY_FILE("${PROJECT_SOURCE_DIR}/h5ex_g_iterate.orig" "${PROJECT_BINARY_DIR}/h5ex_g_iterateL1.hdf" "${HDF5_JAVA_TEST_LIB_TARGET}_files") +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") + 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}) if (WIN32) @@ -107,62 +87,44 @@ else () set (CMAKE_JAVA_INCLUDE_FLAG_SEP ":") endif () -set (CMAKE_JAVA_CLASSPATH ".") -foreach (CMAKE_INCLUDE_PATH ${CMAKE_JAVA_INCLUDE_PATH}) - set (CMAKE_JAVA_CLASSPATH "${CMAKE_JAVA_CLASSPATH}${CMAKE_JAVA_INCLUDE_FLAG_SEP}${CMAKE_INCLUDE_PATH}") -endforeach () -set (CMAKE_JAVA_CLASSPATH "${CMAKE_JAVA_CLASSPATH}${CMAKE_JAVA_INCLUDE_FLAG_SEP}${${HDF5_JAVA_TEST_LIB_TARGET}_JAR_FILE}") - - set (CMD_ARGS "-Dhdf.hdf5lib.H5.loadLibraryName=$:_DEBUG>>;") -add_test ( - NAME JUnit-interface-clearall-objects - COMMAND ${CMAKE_COMMAND} - -E remove - JUnit-interface.out - JUnit-interface.out.err -) +set (CMD_ARGS "-Dhdf.hdf5lib.H5.loadLibraryName=$:_DEBUG>>;") + +foreach (test_file ${HDF5_JAVA_TEST_SOURCES}) + + set (CMAKE_JAVA_CLASSPATH ".") + foreach (CMAKE_INCLUDE_PATH ${CMAKE_JAVA_INCLUDE_PATH}) + set (CMAKE_JAVA_CLASSPATH "${CMAKE_JAVA_CLASSPATH}${CMAKE_JAVA_INCLUDE_FLAG_SEP}${CMAKE_INCLUDE_PATH}") + endforeach () + set (CMAKE_JAVA_CLASSPATH "${CMAKE_JAVA_CLASSPATH}${CMAKE_JAVA_INCLUDE_FLAG_SEP}${${HDF5_JAVA_TEST_LIB_TARGET}_${test_file}_JAR_FILE}") -if (HDF5_ENABLE_DEBUG_APIS) add_test ( - NAME JUnit-interface - COMMAND "${CMAKE_COMMAND}" - -D "TEST_TESTER=${CMAKE_Java_RUNTIME};${CMAKE_Java_RUNTIME_FLAGS}" - -D "TEST_CLASSPATH:STRING=${CMAKE_JAVA_CLASSPATH}" - -D "TEST_ARGS:STRING=${CMD_ARGS}-ea;org.junit.runner.JUnitCore" - -D "TEST_PROGRAM=test.TestUnit" - -D "TEST_LIBRARY_DIRECTORY=${CMAKE_TEST_OUTPUT_DIRECTORY}" - -D "TEST_FOLDER=${HDF5_BINARY_DIR}/java/test" - -D "TEST_OUTPUT=JUnit-interface.out" -# -D "TEST_LOG_LEVEL=trace" - -D "TEST_EXPECT=0" - -D "SKIP_APPEND=1" - -D "TEST_MASK_ERROR=TRUE" - -D "TEST_FILTER:STRING=${testfilter}" - -D "TEST_REFERENCE=JUnit-unit.txt" - -P "${HDF_RESOURCES_DIR}/jrunTest.cmake" + NAME JUnit-${test_file}-clearall-objects + COMMAND ${CMAKE_COMMAND} + -E remove + JUnit-${test_file}.out + JUnit-${test_file}.out.err ) -else () add_test ( - NAME JUnit-interface + NAME JUnit-${test_file} COMMAND "${CMAKE_COMMAND}" -D "TEST_TESTER=${CMAKE_Java_RUNTIME};${CMAKE_Java_RUNTIME_FLAGS}" -D "TEST_CLASSPATH:STRING=${CMAKE_JAVA_CLASSPATH}" -D "TEST_ARGS:STRING=${CMD_ARGS}-ea;org.junit.runner.JUnitCore" - -D "TEST_PROGRAM=test.TestAll" + -D "TEST_PROGRAM=test.${test_file}" -D "TEST_LIBRARY_DIRECTORY=${CMAKE_TEST_OUTPUT_DIRECTORY}" -D "TEST_FOLDER=${HDF5_BINARY_DIR}/java/test" - -D "TEST_OUTPUT=JUnit-interface.out" + -D "TEST_OUTPUT=JUnit-${test_file}.out" # -D "TEST_LOG_LEVEL=trace" -D "TEST_EXPECT=0" -D "SKIP_APPEND=1" -D "TEST_MASK_ERROR=TRUE" - -D "TEST_FILTER:STRING=${testfilter}" - -D "TEST_REFERENCE=JUnit-interface.txt" +# -D "TEST_FILTER:STRING=${testfilter}" + -D "TEST_REFERENCE=JUnit-${test_file}.txt" -P "${HDF_RESOURCES_DIR}/jrunTest.cmake" ) -endif () -set_tests_properties (JUnit-interface PROPERTIES - ENVIRONMENT "HDF5_PLUGIN_PATH=${CMAKE_BINARY_DIR}/testdir2" - DEPENDS "JUnit-interface-clearall-objects" -) + set_tests_properties (JUnit-${test_file} PROPERTIES + ENVIRONMENT "HDF5_PLUGIN_PATH=${CMAKE_BINARY_DIR}/testdir2" + DEPENDS "JUnit-${test_file}-clearall-objects" + ) +endforeach () diff --git a/java/test/JUnit-interface.ert b/java/test/JUnit-interface.ert deleted file mode 100644 index 5771a4f..0000000 --- a/java/test/JUnit-interface.ert +++ /dev/null @@ -1,2 +0,0 @@ -[main] INFO hdf.hdf5lib.H5 - HDF5 library: hdf5_java -[main] INFO hdf.hdf5lib.H5 - successfully loaded from java.library.path diff --git a/java/test/JUnit-interface.txt b/java/test/JUnit-interface.txt deleted file mode 100644 index 5758863..0000000 --- a/java/test/JUnit-interface.txt +++ /dev/null @@ -1,671 +0,0 @@ -JUnit version 4.11 -.testJ2C -.testIsSerializable -.testH5garbage_collect -.testH5error_off -.serializeToDisk -.testH5open -.testH5check_version -.testH5get_libversion -.testH5set_free_list_limits -.testH5EprintInt -.testH5Eget_msg -.testH5Eget_num -.testH5Eget_class_name -.testH5Eget_num_with_msg -.testH5Eclear2 -.testH5Eprint2 -.testH5Ecreate_msg_major -.testH5Ecreate_msg_minor -.testH5Ecreate_stack -.testH5Ecreate_msg_name_null -.testH5Eauto_is_v2 -.testH5EclearInt -.testH5Eregister_class_lib_name_null -.testH5Eregister_class_version_null -.testH5Eunregister_class_invalid_classid -.testH5Eregister_class -.testH5Eregister_class_cls_name_null -.testH5EprintInt -.testH5Eset_current_stack_invalid_stkid -.testH5Eset_current_stack -.testH5Eget_num -.testH5Eclear -.testH5Eprint -.testH5Epush_null_name -.testH5Eget_num_with_msg -.testH5Eclear2_with_msg -.testH5Epush_invalid_stkid -.testH5Eget_current_stack -.testH5Ecreate_stack -.testH5Eget_msg_invalid_msgid -.testH5Eauto_is_v2 -.testH5EclearInt -.testH5Eauto_is_v2_invalid_stkid -.testH5Eclose_msg_invalid_errid -.testH5Eclose_stack_invalid_stackid -.testH5Eget_class_name_invalid_classname -.testH5Eget_num_invalid_stkid -.testH5EprintInt_invalid_classid -.testH5Epop -.testH5Epop_invalid_stkid -.testH5Eget_current_stack_pop -.testH5Eget_class_name_invalid_classid -.testH5Ecreate_msg_invalid_errid -.testH5Eclear2_invalid_stkid -.testH5Eprint2_invalid_classid -.testH5Eget_msg_major -.testH5Eget_msg_minor -.testH5Epush -.testH5Ewalk -.testH5Epop -.testH5Fcreate_null -.testH5Fflush_local -.testH5Fget_info -.testH5Fmount_null -.testH5Fcreate -.testH5Fflush_global -.testH5Funmount_null -.testH5Fclose_negative -.testH5Fopen_null -.testH5Fis_hdf5_null -.testH5Fis_hdf5_text -.testH5Fget_mdc_size -.testH5Fget_mdc_hit_rate -.testH5Fis_hdf5 -.testH5Fget_freespace -.testH5Fclose -.testH5Fget_filesize -.testH5Fcreate_EXCL -.testH5Freopen_closed -.testH5Freset_mdc_hit_rate_stats -.testH5Fget_name -.testH5Fcreate -.testH5Fclear_elink_file_cache -.testH5Fclose_twice -.testH5Freopen -.testH5Fopen_read_only -.testH5Fget_access_plist -.testH5Fget_obj_ids -.testH5Fget_intent_rdwr -.testH5Fget_access_plist_closed -.testH5Fget_create_plist_closed -.testH5Fget_intent_rdonly -.testH5Fget_create_plist -.testH5Fget_obj_count -.testH5Fstart_swmr_write -.testH5Fswmr_read_attempts -.testH5Gget_info_by_name_not_exists -.testH5Gget_info_by_idx_not_exists -.testH5Gget_info_by_name -.testH5Gget_create_plist -.testH5Gopen -.testH5Gget_info_by_idx_null -.testH5Gopen_not_exists -.testH5Gclose -.testH5Gcreate_anon -.testH5Gcreate_null -.testH5Gget_info_by_idx_fileid -.testH5Gclose_invalid -.testH5Gflush_invalid -.testH5Gopen_invalid -.testH5Grefresh_invalid -.testH5Gget_info_invalid -.testH5Gcreate_invalid -.testH5Gcreate_exists -.testH5Gget_info_by_name_null -.testH5Gget_info_by_name_invalid -.testH5Gget_create_plist_invalid -.testH5Gcreate -.testH5Gget_info_by_name_fileid -.testH5Gget_info_by_idx_invalid -.testH5Gopen_null -.testH5Gget_info_by_idx -.testH5Gget_info -.testH5Gget_info_by_name -.testH5Gget_create_plist -.testH5Gopen -.testH5Gget_obj_info_all_gid2 -.testH5Gget_obj_info_all_byIndexType -.testH5Gget_obj_info_max_limit -.testH5Gget_obj_info_all -.testH5Gget_obj_info_max -.testH5Gget_obj_info_all_gid -.testH5Gget_info_by_idx -.testH5Gget_info -.testH5Gget_obj_info_all -.testH5Sclose_invalid -.testH5Screate_simple_max_default -.testH5Screate_simple_dims_null -.testH5Sdecode_null -.testH5Screate_simple_dims_exceed -.testH5Screate_simple_unlimted_1d -.testH5Screate_simple_dims_invalid -.testH5Screate_scalar -.testH5Screate_simple -.testH5Screate_simple_rank_invalid -.testH5Sget_simple_extent_type_invalid -.testH5Sencode_invalid -.testH5Screate_null -.testH5Screate_simple_extent -.testH5Screate_invalid -.testH5Screate_simple_unlimted -.testH5Sget_select_npoints -.testH5Sget_select_type -.testH5Sset_extent_simple -.testH5Sget_select_hyper -.testH5Sget_select_valid -.testH5Sget_select_elem_pointlist -.testH5Sset_extent_none -.testH5Sencode_decode_scalar_dataspace -.testH5Soffset_simple -.testH5Scopy -.testH5Sget_simple_extent_ndims -.testH5Sextent_equal -.testH5Sget_simple_extent_dims -.testH5Sget_simple_extent_type -.testH5Shyper_regular -.testH5Sget_select_bounds -.testH5Sget_select_elem_pointlist_invalid -.testH5Sget_simple_extent_npoints -.testH5Sextent_copy -.testH5Sencode_decode_null_dataspace -.testH5Sis_simple -.testH5Sget_simple_extent_dims_null -.testH5Sselect_none -.testH5Tget_member_type_invalid -.testH5Tenum_insert_null -.testH5Tget_offset_invalid -.testH5Tset_precision_invalid -.testH5Tget_inpad_invalid -.testH5Tenum_nameof_invalid -.testH5Tget_member_value_invalid -.testH5Tenum_nameof_value_null -.testH5Tcreate_invalid -.testH5Tget_strpad_invalid -.testH5Tenum_valueof_invalid -.testH5Tget_fields_null -.testH5Topen_null -.testH5Tpack_invalid -.testH5Tcommit_null -.testH5Tinsert_invalid -.testH5Tenum_valueof_null -.testH5Tset_norm_invalid -.testH5Tlock_invalid -.testH5Tarray_create_invalid -.testH5Tget_member_value_null -.testH5Tset_offset_invalid -.testH5Tget_fields_invalid -.testH5Tequal_invalid -.testH5Tget_ebias_long_invalid -.testH5Tget_cset_invalid -.testH5Tget_size_invalid -.testH5Tset_strpad_invalid -.testH5Tset_ebias_invalid -.testH5Tget_sign_invalid -.testH5Tget_member_index_invalid -.testH5Tget_precision_invalid -.testH5Tset_fields_invalid -.testH5Tcopy_invalid -.testH5Tget_pad_invalid -.testH5Tset_order_invalid -.testH5Tget_member_class_invalid -.testH5Tget_super_invalid -.testH5Tget_class_invalid -.testH5Topen_invalid -.testH5Tget_precision_long_invalid -.testH5Tget_ebias_invalid -.testH5Tget_native_type_invalid -.testH5Tget_fields_length_invalid -.testH5Tget_norm_invalid -.testH5Tenum_nameof_invalid_size -.testH5Tset_pad_invalid -.testH5Tget_pad_null -.testH5Tset_tag_null -.testH5Tget_order_invalid -.testH5Tcommit_invalid -.testH5Tget_array_ndims_invalid -.testH5Tset_tag_invalid -.testH5Tvlen_create_invalid -.testH5Tenum_create_invalid -.testH5Tinsert_null -.testH5Tset_inpad_invalid -.testH5Tenum_valueof_name_null -.testH5Tset_cset_invalid -.testH5Tclose_invalid -.testH5Tget_nmembers_invalid -.testH5Tarray_create_value_null -.testH5Tset_size_invalid -.testH5Tflush_invalid -.testH5Tenum_insert_invalid -.testH5Tget_array_dims_null -.testH5Tget_member_index_null -.testH5Trefresh_invalid -.testH5Tset_sign_invalid -.testH5Tenum_insert_name_null -.testH5Tequal_not -.testH5Tcopy -.testH5Tequal -.testH5Torder_size -.testH5Tconvert -.testH5Tvlen_create -.testH5Tenum_create_functions -.testH5Tenum_functions -.testH5Tget_class -.testH5Tget_array_ndims -.testH5Tequal_type_error -.testH5Tget_array_dims -.testH5Tset_size -.testH5Tis_variable_str -.testH5Tcompound_functions -.testH5Tget_size -.testH5Tarray_create -.testH5Topaque_functions -.testH5Dget_space_status_invalid -.testH5Dget_access_plist_invalid -.testH5Dget_type_invalid -.testH5Dget_create_plist_invalid -.testH5Dget_offset_invalid -.testH5Dvlen_get_buf_size_invalid -.testH5Dcreate_null -.testH5Dset_extent_status_null -.testH5Dvlen_reclaim_null -.testH5Dcreate_invalid -.testH5Dcreate_anon_invalid -.testH5Dset_extent_status_invalid -.testH5Dvlen_reclaim_invalid -.testH5Dopen_invalid -.testH5Dclose_invalid -.testH5Dflush_invalid -.testH5Drefresh_invalid -.testH5Dget_storage_size_invalid -.testH5Dget_space_invalid -.testH5Dopen_null -.testH5Dget_storage_size -.testH5Diterate_write -.testH5Dcreate -.testH5Dget_offset -.testH5Dget_type -.testH5Dfill -.testH5Dopen -.testH5Dcreate_anon -.testH5Dfill_null -.testH5Dget_storage_size_empty -.testH5Diterate -.testH5Dget_access_plist -.testH5Dvlen_read_invalid_buffer -.testH5Dvlen_get_buf_size -.testH5Dget_space_closed -.testH5Dget_space_status -.testH5Dvlen_write_read -.testH5Dget_space -.testH5Dget_type_closed -.testH5Dset_extent -.testH5Lcopy_invalid -.testH5Lget_value_by_idx_null -.testH5Lcreate_external_invalid -.testH5Lexists_null -.testH5Lget_info_invalid -.testH5Lget_name_by_idx_invalid -.testH5Lmove_null_current -.testH5Literate_by_name_nullname -.testH5Lvisit_by_name_nullname -.testH5Lvisit_null -.testH5Lget_name_by_idx_null -.testH5Lcreate_hard_null_dest -.testH5Lget_value_null -.testH5Lcreate_external_null_dest -.testH5Lcreate_external_null_file -.testH5Lcreate_external_null_current -.testH5Ldelete_null -.testH5Lexists_invalid -.testH5Lmove_invalid -.testH5Lcreate_hard_invalid -.testH5Lcopy_null_dest -.testH5Lcreate_soft_null_current -.testH5Lcopy_null_current -.testH5Lget_info_by_idx_null -.testH5Literate_null -.testH5Ldelete_invalid -.testH5Lvisit_by_name_null -.testH5Ldelete_by_idx_invalid -.testH5Lget_info_by_idx_invalid -.testH5Ldelete_by_idx_null -.testH5Lcreate_soft_invalid -.testH5Lcreate_hard_null_current -.testH5Lget_value_by_idx_invalid -.testH5Lmove_null_dest -.testH5Lget_info_null -.testH5Literate_by_name_null -.testH5Lcreate_soft_null_dest -.testH5Lget_value_invalid -.testH5Lget_info_by_idx_not_exist_name -.testH5Lget_name_by_idx_not_exist -.testH5Lvisit -.testH5Lget_name_by_idx_n0 -.testH5Lget_name_by_idx_n3 -.testH5Lvisit_by_name -.testH5Literate_by_name -.testH5Lget_info_hardlink -.testH5Literate -.testH5Lget_info_by_idx_n0 -.testH5Lget_info_by_idx_n3 -.testH5Lget_info_by_idx_name_not_exist_create -.testH5Lexists -.testH5Lget_info_by_idx_name_not_exist_name -.testH5Lget_info_by_idx_not_exist_create -.testH5Lget_info_not_exist -.testH5Lget_info_dataset -.testH5Lget_info_by_idx_n0_create -.testH5Ldelete_soft_link_dangle -.testH5Lget_value_by_idx_external_create -.testH5Ldelete_by_idx_not_exist_create -.testH5Lvisit_create -.testH5Lmove_dst_link_exists -.testH5Lcreate_soft_dangle -.testH5Literate_create -.testH5Lcopy_cur_not_exists -.testH5Lcopy -.testH5Lmove -.testH5Lget_value_by_idx_n2_create -.testH5Lget_value_soft -.testH5Ldelete_by_idx_n2_name -.testH5Lget_info_by_idx_n1_create -.testH5Lcreate_external -.testH5Lget_value_dangle -.testH5Lcreate_hard_dst_link_exists -.testH5Lget_value_by_idx_n2_name -.testH5Lcreate_soft_dst_link_exists -.testH5Lcreate_hard -.testH5Lcreate_soft -.testH5Lmove_cur_not_exists -.testH5Lcreate_hard_cur_not_exists -.testH5Lget_info_softlink_dangle -.testH5Ldelete_by_idx_n2_create -.testH5Ldelete_soft_link -.testH5Lget_info_externallink -.testH5Lcopy_dst_link_exists -.testH5Lget_value_by_idx_external_name -.testH5Ldelete_by_idx_not_exist_name -.testH5Lget_info_softlink -.testH5Lget_value_external -.testH5Lget_value_by_idx_not_exist_create -.testH5Lget_value_by_idx_not_exist_name -.testH5Ldelete_hard_link -.testH5Rgetregion_Nullreference -.testH5Rget_obj_type2_Invalidreftype -.testH5Rdereference -.testH5Rget_name -.testH5Rcreate_Invalidreftype -.testH5Rget_name_NULLreference -.testH5Rget_region -.testH5Rdereference_Nullreference -.testH5Rcreate_refobj -.testH5Rcreate_Invalidspace_id -.testH5Rdereference_Invalidreference -.testH5Rgetregion_Badreferencetype -.testH5Rcreate_regionrefobj -.testH5Rget_name_Invalidreftype -.testH5Rgetregion_Invalidreftype -.testH5Rget_obj_type2 -.testH5Rcreate_InvalidObjectName -.testH5Pset_nbit -.testH5Pset_shared_mesg_index_InvalidFlag -.testH5Pset_shared_mesg_phase_change -.testH5PH5Pset_shared_mesg_phase_change_HighMaxlistValue -.testH5P_layout -.testH5Pget_link_creation_order -.testH5Pget_efile_prefix -.testH5Pset_shared_mesg_nindexes_InvalidHIGHnindexes -.testH5P_file_space_page_size -.testH5Pget_shared_mesg_index_Invalid_indexnum -.testH5Pset_data_transform_NullExpression -.testH5Pset_elink_prefix_null -.testH5Pget_elink_prefix -.testH5Pget_nlinks -.testH5Pset_libver_bounds_invalidhigh -.testH5Pget_char_encoding -.testH5P_istore_k -.testH5Pget_link_phase_change -.testH5Pset_link_phase_change_max_compactLESSTHANmin_dense -.testH5Pget_shared_mesg_phase_change_EqualsSET -.testH5Pset_scaleoffset_Invalidscale_type -.testH5Pget_istore_k_null -.testH5Pset_libver_bounds_invalidlow -.testH5Pset_est_link_info -.testH5Pget_link_phase_change_Null -.testH5P_fill_time -.testH5Pget_userblock_null -.testH5Pset_link_creation_order_tracked -.testH5Pset_shared_mesg_index -.testH5Pset_copy_object -.testH5Pset_link_creation_order_trackedPLUSindexed -.testH5P_file_space_strategy -.testH5Pset_copy_object_invalidobject -.testH5Pset_est_link_info_InvalidValues -.testH5Pset_local_heap_size_hint -.testH5Pget_est_link_info -.testH5Pset_efile_prefix_null -.testH5Pset_scaleoffset -.testH5Pset_create_intermediate_group_invalidobject -.testH5PH5Pset_shared_mesg_phase_change_HighMinbtreeValue -.testH5Pset_create_intermediate_group -.testH5P_alloc_time -.testH5Pset_elink_acc_flags -.testH5Pset_link_phase_change_Highmax_Compact -.testH5P_chunk -.testH5P_sizes -.testH5Pset_link_creation_order_invalidvalue -.testH5P_sym_k -.testH5PH5Pset_shared_mesg_phase_change_MinbtreeGreaterThanMaxlist -.testH5Pget_version_null -.testH5Pset_scaleoffset_Invalidscale_factor -.testH5Pget_elink_prefix_null -.testH5Pget_data_transform_IllegalSize -.testH5Pget_create_intermediate_group -.testH5Pset_shared_mesg_nindexes -.testH5Pset_attr_creation_order_trackedPLUSindexed -.testH5Pget_sym_k_null -.testH5Pset_nlinks -.testH5P_obj_track_times -.testH5Pset_efile_prefix -.testH5P_userblock -.testH5Pget_local_heap_size_hint -.testH5Pset_shared_mesg_index_Invalid_indexnum -.testH5Pset_data_transform_InvalidExpression1 -.testH5Pset_data_transform_InvalidExpression2 -.testH5Pget_attr_phase_change -.testH5Pget_data_transform -.testH5Pget_create_intermediate_group_notcreated -.testH5Pset_elink_prefix -.testH5Pget_attr_creation_order -.testH5Pset_attr_creation_order_invalidvalue -.testH5Pget_shared_mesg_phase_change -.testH5Pget_shared_mesg_index -.testH5Pset_link_phase_change -.testH5Pget_shared_mesg_nindexes -.testH5Pget_version -.testH5Pset_elink_acc_flags_InvalidFlag1 -.testH5Pset_elink_acc_flags_InvalidFlag2 -.testH5Pget_link_phase_change_EqualsSet -.testH5Pget_elink_acc_flags -.testH5Pget_data_transform_ExpressionNotSet -.testH5P_fill_value -.testH5Pget_sizes_null -.testH5Pset_data_transform -.testH5Pset_attr_creation_order_tracked -.testH5P_buffer -.testH5Pdata_transform -.testH5P_elink_fapl -.testH5P_fapl_direct -.testH5P_alignment -.testH5P_fapl_family -.testH5P_chunk_cache -.testH5P_meta_block_size -.testH5Fmdc_logging -.testH5Pget_elink_fapl -.testH5Pset_mdc_config -.testH5P_small_data_block_size -.testH5Pset_fapl_log -.testH5P_evict_on_close -.testH5Pset_libver_bounds -.testH5P_sieve_buf_size -.testH5P_elink_file_cache_size -.testH5P_cache -.testH5Pget_mdc_config -.testH5P_fapl_muti_defaults -.testH5Pget_libver_bounds -.testH5P_btree_ratios -.testH5P_fapl_muti_nulls -.testH5Pset_fapl_sec2 -.testH5Pmulti_transform -.testH5Pset_elink_fapl_NegativeID -.testH5Pset_fapl_stdio -.testH5P_edc_check -.testH5Pset_elink_fapl -.testH5P_hyper_vector_size -.testH5P_gc_references -.testH5P_family_offset -.testH5P_fapl_core -.testH5P_fapl_muti -.testH5P_fapl_split -.testH5Pset_fapl_windows -.testH5P_fclose_degree -.testH5Pget_source_datasetname -.testH5Pvirtual_storage -.testH5Pget_selection_source_dataset -.testH5Pget_virtual_prefix -.testH5Pget_source_filename -.testH5Pset_get_virtual_printf_gap -.testH5Pget_virtual_count -.testH5Pset_virtual_prefix -.testH5Pset_get_virtual_view -.testH5Pget_mapping_parameters -.testH5Pset_virtual_prefix_null -.testH5P_genprop_basic_class -.testH5P_genprop_class_iter -.testH5P_genprop_basic_class_prop -.testH5P_genprop_basic_list_prop -.testH5Acreate2_nullname -.testH5Acreate_by_name -.testH5Aget_name_by_idx -.testH5Aget_storage_size -.testH5Aiterate -.testH5Aopen_by_idx -.testH5Aopen_invalidname -.testH5Aopen -.testH5Aget_info_by_name -.testH5Aget_create_plist -.testH5Adelete_by_name -.testH5Aopen_by_name -.testH5Aget_info -.testH5Aget_name -.testH5Aexists -.testH5Aget_info_by_idx -.testH5Arename -.testH5Adelete_by_idx_name1 -.testH5Adelete_by_idx_name2 -.testH5Adelete_by_idx_order -.testH5Arename_by_name -.testH5Acreate2_invalidobject -.testH5Acreate2 -.testH5Aiterate_by_name -.testH5Adelete_by_idx_null -.testH5Adelete_by_idx_invalidobject -.testH5Awrite_readVL -.testH5Aget_info1 -.testH5Oget_comment_by_name_null -.testH5Ovisit_by_name_nullname -.testH5Oget_info_invalid -.testH5Ovisit_by_name_null -.testH5Oget_comment_invalid -.testH5Oset_comment_by_name_invalid -.testH5Oopen_null -.testH5Oclose_invalid -.testH5Oflush_invalid -.testH5Oget_comment_by_name_invalid -.testH5Orefresh_invalid -.testH5Ocopy_null_dest -.testH5Olink_invalid -.testH5Oget_info_by_idx_invalid -.testH5Oget_info_by_idx_null -.testH5Olink_null_dest -.testH5Oget_info_by_name_invalid -.testH5Oget_info_by_name_null -.testH5Ocopy_invalid -.testH5Oset_comment_by_name_null -.testH5Ocopy_null_current -.testH5Oset_comment_invalid -.testH5Oopen_invalid -.testH5Ovisit_null -.testH5Oexists_by_name -.testH5Oget_info_by_idx_n0 -.testH5Oget_info_by_idx_n3 -.testH5Oget_info_by_name_not_exist_name -.testH5Ovisit_by_name -.testH5Oget_info_by_idx_name_not_exist_name -.testH5Oget_info_datatype -.testH5Oget_info_by_idx_not_exist_name -.testH5Oopen_by_idx_n0 -.testH5Oopen_by_idx_n3 -.testH5Oopen_not_exists -.testH5Ovisit -.testH5Oget_info_by_idx_not_exist_create -.testH5Oget_info_by_name_hardlink -.testH5Oget_info_by_name_group -.testH5Oopen_by_addr -.testH5Oget_info_by_name_not_exists -.testH5Oget_info_by_name_dataset -.testH5Oget_info_group -.testH5Oget_info_by_name_datatype -.testH5Oget_info_hardlink -.testH5Oget_info_by_idx_name_not_exist_create -.testH5Oget_info_dataset -.testH5OcopyRefsDatasettosameFile -.testH5OcopyRefsDatasettodiffFile -.testH5OcopyRefsAttr -.testH5Oget_info_by_idx_n0_create -.testH5Oget_info_softlink_dangle -.testH5Oget_info_softlink -.testH5Oget_info_externallink -.testH5Ocopy -.testH5Olink -.testH5Ocomment_by_name -.testH5Oget_info_by_idx_n1_create -.testH5Ocomment -.testH5Oinc_dec_count -.testH5Ocomment_by_name_clear -.testH5Ovisit_create -.testH5Ocopy_dst_link_exists -.testH5Ocomment_clear -.testH5Ocopy_cur_not_exists -.TestH5PLplugins -.TestH5PLpaths -.testH5Zfilter_avail -.testH5Zunregister_predefined -.testH5Zget_filter_info - -Time: XXXX - -OK (645 tests) - -HDF5-DIAG: Error detected in HDF5 (version (number)) thread (IDs): - #000: (file name) line (number) in H5Fopen(): can't set access and transfer property lists - major: File accessibilty - minor: Can't set value - #001: (file name) line (number) in H5P_verify_apl_and_dxpl(): not the required access property list - major: Property lists - minor: Inappropriate type - #002: (file name) line (number) in H5P_isa_class(): not a property list - major: Invalid arguments to routine - minor: Inappropriate type -HDF5-DIAG: Error detected in HDF5 (version (number)) thread (IDs): - #000: (file name) line (number) in H5Fopen(): can't set access and transfer property lists - major: File accessibilty - minor: Can't set value - #001: (file name) line (number) in H5P_verify_apl_and_dxpl(): not the required access property list - major: Property lists - minor: Inappropriate type - #002: (file name) line (number) in H5P_isa_class(): not a property list - major: Invalid arguments to routine - minor: Inappropriate type diff --git a/java/test/JUnit-unit.txt b/java/test/JUnit-unit.txt deleted file mode 100644 index 7efc915..0000000 --- a/java/test/JUnit-unit.txt +++ /dev/null @@ -1,617 +0,0 @@ -JUnit version 4.11 -.testJ2C -.testIsSerializable -.testH5garbage_collect -.testH5error_off -.serializeToDisk -.testH5open -.testH5check_version -.testH5get_libversion -.testH5set_free_list_limits -.testH5EprintInt -.testH5Eget_msg -.testH5Eget_num -.testH5Eget_class_name -.testH5Eget_num_with_msg -.testH5Eclear2 -.testH5Eprint2 -.testH5Ecreate_msg_major -.testH5Ecreate_msg_minor -.testH5Ecreate_stack -.testH5Ecreate_msg_name_null -.testH5Eauto_is_v2 -.testH5EclearInt -.testH5Eregister_class_lib_name_null -.testH5Eregister_class_version_null -.testH5Eunregister_class_invalid_classid -.testH5Eregister_class -.testH5Eregister_class_cls_name_null -.testH5Fcreate_null -.testH5Fflush_local -.testH5Fget_info -.testH5Fmount_null -.testH5Fcreate -.testH5Fflush_global -.testH5Funmount_null -.testH5Fclose_negative -.testH5Fopen_null -.testH5Fis_hdf5_null -.testH5Fis_hdf5_text -.testH5Fget_mdc_size -.testH5Fget_mdc_hit_rate -.testH5Fis_hdf5 -.testH5Fget_freespace -.testH5Fclose -.testH5Fget_filesize -.testH5Fcreate_EXCL -.testH5Freopen_closed -.testH5Freset_mdc_hit_rate_stats -.testH5Fget_name -.testH5Fcreate -.testH5Fclear_elink_file_cache -.testH5Fclose_twice -.testH5Freopen -.testH5Fopen_read_only -.testH5Fget_access_plist -.testH5Fget_obj_ids -.testH5Fget_intent_rdwr -.testH5Fget_access_plist_closed -.testH5Fget_create_plist_closed -.testH5Fget_intent_rdonly -.testH5Fget_create_plist -.testH5Fget_obj_count -.testH5Fstart_swmr_write -.testH5Fswmr_read_attempts -.testH5Gget_info_by_name_not_exists -.testH5Gget_info_by_idx_not_exists -.testH5Gget_info_by_name -.testH5Gget_create_plist -.testH5Gopen -.testH5Gget_info_by_idx_null -.testH5Gopen_not_exists -.testH5Gclose -.testH5Gcreate_anon -.testH5Gcreate_null -.testH5Gget_info_by_idx_fileid -.testH5Gclose_invalid -.testH5Gflush_invalid -.testH5Gopen_invalid -.testH5Grefresh_invalid -.testH5Gget_info_invalid -.testH5Gcreate_invalid -.testH5Gcreate_exists -.testH5Gget_info_by_name_null -.testH5Gget_info_by_name_invalid -.testH5Gget_create_plist_invalid -.testH5Gcreate -.testH5Gget_info_by_name_fileid -.testH5Gget_info_by_idx_invalid -.testH5Gopen_null -.testH5Gget_info_by_idx -.testH5Gget_info -.testH5Gget_info_by_name -.testH5Gget_create_plist -.testH5Gopen -.testH5Gget_obj_info_all_gid2 -.testH5Gget_obj_info_all_byIndexType -.testH5Gget_obj_info_max_limit -.testH5Gget_obj_info_all -.testH5Gget_obj_info_max -.testH5Gget_obj_info_all_gid -.testH5Gget_info_by_idx -.testH5Gget_info -.testH5Sclose_invalid -.testH5Screate_simple_max_default -.testH5Screate_simple_dims_null -.testH5Sdecode_null -.testH5Screate_simple_dims_exceed -.testH5Screate_simple_unlimted_1d -.testH5Screate_simple_dims_invalid -.testH5Screate_scalar -.testH5Screate_simple -.testH5Screate_simple_rank_invalid -.testH5Sget_simple_extent_type_invalid -.testH5Sencode_invalid -.testH5Screate_null -.testH5Screate_simple_extent -.testH5Screate_invalid -.testH5Screate_simple_unlimted -.testH5Sget_select_npoints -.testH5Sget_select_type -.testH5Sset_extent_simple -.testH5Sget_select_hyper -.testH5Sget_select_valid -.testH5Sget_select_elem_pointlist -.testH5Sset_extent_none -.testH5Sencode_decode_scalar_dataspace -.testH5Soffset_simple -.testH5Scopy -.testH5Sget_simple_extent_ndims -.testH5Sextent_equal -.testH5Sget_simple_extent_dims -.testH5Sget_simple_extent_type -.testH5Shyper_regular -.testH5Sget_select_bounds -.testH5Sget_select_elem_pointlist_invalid -.testH5Sget_simple_extent_npoints -.testH5Sextent_copy -.testH5Sencode_decode_null_dataspace -.testH5Sis_simple -.testH5Sget_simple_extent_dims_null -.testH5Sselect_none -.testH5Tget_member_type_invalid -.testH5Tenum_insert_null -.testH5Tget_offset_invalid -.testH5Tset_precision_invalid -.testH5Tget_inpad_invalid -.testH5Tenum_nameof_invalid -.testH5Tget_member_value_invalid -.testH5Tenum_nameof_value_null -.testH5Tcreate_invalid -.testH5Tget_strpad_invalid -.testH5Tenum_valueof_invalid -.testH5Tget_fields_null -.testH5Topen_null -.testH5Tpack_invalid -.testH5Tcommit_null -.testH5Tinsert_invalid -.testH5Tenum_valueof_null -.testH5Tset_norm_invalid -.testH5Tlock_invalid -.testH5Tarray_create_invalid -.testH5Tget_member_value_null -.testH5Tset_offset_invalid -.testH5Tget_fields_invalid -.testH5Tequal_invalid -.testH5Tget_ebias_long_invalid -.testH5Tget_cset_invalid -.testH5Tget_size_invalid -.testH5Tset_strpad_invalid -.testH5Tset_ebias_invalid -.testH5Tget_sign_invalid -.testH5Tget_member_index_invalid -.testH5Tget_precision_invalid -.testH5Tset_fields_invalid -.testH5Tcopy_invalid -.testH5Tget_pad_invalid -.testH5Tset_order_invalid -.testH5Tget_member_class_invalid -.testH5Tget_super_invalid -.testH5Tget_class_invalid -.testH5Topen_invalid -.testH5Tget_precision_long_invalid -.testH5Tget_ebias_invalid -.testH5Tget_native_type_invalid -.testH5Tget_fields_length_invalid -.testH5Tget_norm_invalid -.testH5Tenum_nameof_invalid_size -.testH5Tset_pad_invalid -.testH5Tget_pad_null -.testH5Tset_tag_null -.testH5Tget_order_invalid -.testH5Tcommit_invalid -.testH5Tget_array_ndims_invalid -.testH5Tset_tag_invalid -.testH5Tvlen_create_invalid -.testH5Tenum_create_invalid -.testH5Tinsert_null -.testH5Tset_inpad_invalid -.testH5Tenum_valueof_name_null -.testH5Tset_cset_invalid -.testH5Tclose_invalid -.testH5Tget_nmembers_invalid -.testH5Tarray_create_value_null -.testH5Tset_size_invalid -.testH5Tflush_invalid -.testH5Tenum_insert_invalid -.testH5Tget_array_dims_null -.testH5Tget_member_index_null -.testH5Trefresh_invalid -.testH5Tset_sign_invalid -.testH5Tenum_insert_name_null -.testH5Tequal_not -.testH5Tcopy -.testH5Tequal -.testH5Torder_size -.testH5Tconvert -.testH5Tvlen_create -.testH5Tenum_create_functions -.testH5Tenum_functions -.testH5Tget_class -.testH5Tget_array_ndims -.testH5Tequal_type_error -.testH5Tget_array_dims -.testH5Tset_size -.testH5Tis_variable_str -.testH5Tcompound_functions -.testH5Tget_size -.testH5Tarray_create -.testH5Topaque_functions -.testH5Dget_space_status_invalid -.testH5Dget_access_plist_invalid -.testH5Dget_type_invalid -.testH5Dget_create_plist_invalid -.testH5Dget_offset_invalid -.testH5Dvlen_get_buf_size_invalid -.testH5Dcreate_null -.testH5Dset_extent_status_null -.testH5Dvlen_reclaim_null -.testH5Dcreate_invalid -.testH5Dcreate_anon_invalid -.testH5Dset_extent_status_invalid -.testH5Dvlen_reclaim_invalid -.testH5Dopen_invalid -.testH5Dclose_invalid -.testH5Dflush_invalid -.testH5Drefresh_invalid -.testH5Dget_storage_size_invalid -.testH5Dget_space_invalid -.testH5Dopen_null -.testH5Dget_storage_size -.testH5Diterate_write -.testH5Dcreate -.testH5Dget_offset -.testH5Dget_type -.testH5Dfill -.testH5Dopen -.testH5Dcreate_anon -.testH5Dfill_null -.testH5Dget_storage_size_empty -.testH5Diterate -.testH5Dget_access_plist -.testH5Dvlen_read_invalid_buffer -.testH5Dvlen_get_buf_size -.testH5Dget_space_closed -.testH5Dget_space_status -.testH5Dvlen_write_read -.testH5Dget_space -.testH5Dget_type_closed -.testH5Dset_extent -.testH5Lcopy_invalid -.testH5Lget_value_by_idx_null -.testH5Lcreate_external_invalid -.testH5Lexists_null -.testH5Lget_info_invalid -.testH5Lget_name_by_idx_invalid -.testH5Lmove_null_current -.testH5Literate_by_name_nullname -.testH5Lvisit_by_name_nullname -.testH5Lvisit_null -.testH5Lget_name_by_idx_null -.testH5Lcreate_hard_null_dest -.testH5Lget_value_null -.testH5Lcreate_external_null_dest -.testH5Lcreate_external_null_file -.testH5Lcreate_external_null_current -.testH5Ldelete_null -.testH5Lexists_invalid -.testH5Lmove_invalid -.testH5Lcreate_hard_invalid -.testH5Lcopy_null_dest -.testH5Lcreate_soft_null_current -.testH5Lcopy_null_current -.testH5Lget_info_by_idx_null -.testH5Literate_null -.testH5Ldelete_invalid -.testH5Lvisit_by_name_null -.testH5Ldelete_by_idx_invalid -.testH5Lget_info_by_idx_invalid -.testH5Ldelete_by_idx_null -.testH5Lcreate_soft_invalid -.testH5Lcreate_hard_null_current -.testH5Lget_value_by_idx_invalid -.testH5Lmove_null_dest -.testH5Lget_info_null -.testH5Literate_by_name_null -.testH5Lcreate_soft_null_dest -.testH5Lget_value_invalid -.testH5Lget_info_by_idx_not_exist_name -.testH5Lget_name_by_idx_not_exist -.testH5Lvisit -.testH5Lget_name_by_idx_n0 -.testH5Lget_name_by_idx_n3 -.testH5Lvisit_by_name -.testH5Literate_by_name -.testH5Lget_info_hardlink -.testH5Literate -.testH5Lget_info_by_idx_n0 -.testH5Lget_info_by_idx_n3 -.testH5Lget_info_by_idx_name_not_exist_create -.testH5Lexists -.testH5Lget_info_by_idx_name_not_exist_name -.testH5Lget_info_by_idx_not_exist_create -.testH5Lget_info_not_exist -.testH5Lget_info_dataset -.testH5Lget_info_by_idx_n0_create -.testH5Ldelete_soft_link_dangle -.testH5Lget_value_by_idx_external_create -.testH5Ldelete_by_idx_not_exist_create -.testH5Lvisit_create -.testH5Lmove_dst_link_exists -.testH5Lcreate_soft_dangle -.testH5Literate_create -.testH5Lcopy_cur_not_exists -.testH5Lcopy -.testH5Lmove -.testH5Lget_value_by_idx_n2_create -.testH5Lget_value_soft -.testH5Ldelete_by_idx_n2_name -.testH5Lget_info_by_idx_n1_create -.testH5Lcreate_external -.testH5Lget_value_dangle -.testH5Lcreate_hard_dst_link_exists -.testH5Lget_value_by_idx_n2_name -.testH5Lcreate_soft_dst_link_exists -.testH5Lcreate_hard -.testH5Lcreate_soft -.testH5Lmove_cur_not_exists -.testH5Lcreate_hard_cur_not_exists -.testH5Lget_info_softlink_dangle -.testH5Ldelete_by_idx_n2_create -.testH5Ldelete_soft_link -.testH5Lget_info_externallink -.testH5Lcopy_dst_link_exists -.testH5Lget_value_by_idx_external_name -.testH5Ldelete_by_idx_not_exist_name -.testH5Lget_info_softlink -.testH5Lget_value_external -.testH5Lget_value_by_idx_not_exist_create -.testH5Lget_value_by_idx_not_exist_name -.testH5Ldelete_hard_link -.testH5Rgetregion_Nullreference -.testH5Rget_obj_type2_Invalidreftype -.testH5Rdereference -.testH5Rget_name -.testH5Rcreate_Invalidreftype -.testH5Rget_name_NULLreference -.testH5Rget_region -.testH5Rdereference_Nullreference -.testH5Rcreate_refobj -.testH5Rcreate_Invalidspace_id -.testH5Rdereference_Invalidreference -.testH5Rgetregion_Badreferencetype -.testH5Rcreate_regionrefobj -.testH5Rget_name_Invalidreftype -.testH5Rgetregion_Invalidreftype -.testH5Rget_obj_type2 -.testH5Rcreate_InvalidObjectName -.testH5Pset_nbit -.testH5Pset_shared_mesg_index_InvalidFlag -.testH5Pset_shared_mesg_phase_change -.testH5PH5Pset_shared_mesg_phase_change_HighMaxlistValue -.testH5P_layout -.testH5Pget_link_creation_order -.testH5Pget_efile_prefix -.testH5Pset_shared_mesg_nindexes_InvalidHIGHnindexes -.testH5P_file_space_page_size -.testH5Pget_shared_mesg_index_Invalid_indexnum -.testH5Pset_data_transform_NullExpression -.testH5Pset_elink_prefix_null -.testH5Pget_elink_prefix -.testH5Pget_nlinks -.testH5Pset_libver_bounds_invalidhigh -.testH5Pget_char_encoding -.testH5P_istore_k -.testH5Pget_link_phase_change -.testH5Pset_link_phase_change_max_compactLESSTHANmin_dense -.testH5Pget_shared_mesg_phase_change_EqualsSET -.testH5Pset_scaleoffset_Invalidscale_type -.testH5Pget_istore_k_null -.testH5Pset_libver_bounds_invalidlow -.testH5Pset_est_link_info -.testH5Pget_link_phase_change_Null -.testH5P_fill_time -.testH5Pget_userblock_null -.testH5Pset_link_creation_order_tracked -.testH5Pset_shared_mesg_index -.testH5Pset_copy_object -.testH5Pset_link_creation_order_trackedPLUSindexed -.testH5P_file_space_strategy -.testH5Pset_copy_object_invalidobject -.testH5Pset_est_link_info_InvalidValues -.testH5Pset_local_heap_size_hint -.testH5Pget_est_link_info -.testH5Pset_efile_prefix_null -.testH5Pset_scaleoffset -.testH5Pset_create_intermediate_group_invalidobject -.testH5PH5Pset_shared_mesg_phase_change_HighMinbtreeValue -.testH5Pset_create_intermediate_group -.testH5P_alloc_time -.testH5Pset_elink_acc_flags -.testH5Pset_link_phase_change_Highmax_Compact -.testH5P_chunk -.testH5P_sizes -.testH5Pset_link_creation_order_invalidvalue -.testH5P_sym_k -.testH5PH5Pset_shared_mesg_phase_change_MinbtreeGreaterThanMaxlist -.testH5Pget_version_null -.testH5Pset_scaleoffset_Invalidscale_factor -.testH5Pget_elink_prefix_null -.testH5Pget_data_transform_IllegalSize -.testH5Pget_create_intermediate_group -.testH5Pset_shared_mesg_nindexes -.testH5Pset_attr_creation_order_trackedPLUSindexed -.testH5Pget_sym_k_null -.testH5Pset_nlinks -.testH5P_obj_track_times -.testH5Pset_efile_prefix -.testH5P_userblock -.testH5Pget_local_heap_size_hint -.testH5Pset_shared_mesg_index_Invalid_indexnum -.testH5Pset_data_transform_InvalidExpression1 -.testH5Pset_data_transform_InvalidExpression2 -.testH5Pget_attr_phase_change -.testH5Pget_data_transform -.testH5Pget_create_intermediate_group_notcreated -.testH5Pset_elink_prefix -.testH5Pget_attr_creation_order -.testH5Pset_attr_creation_order_invalidvalue -.testH5Pget_shared_mesg_phase_change -.testH5Pget_shared_mesg_index -.testH5Pset_link_phase_change -.testH5Pget_shared_mesg_nindexes -.testH5Pget_version -.testH5Pset_elink_acc_flags_InvalidFlag1 -.testH5Pset_elink_acc_flags_InvalidFlag2 -.testH5Pget_link_phase_change_EqualsSet -.testH5Pget_elink_acc_flags -.testH5Pget_data_transform_ExpressionNotSet -.testH5P_fill_value -.testH5Pget_sizes_null -.testH5Pset_data_transform -.testH5Pset_attr_creation_order_tracked -.testH5P_buffer -.testH5Pdata_transform -.testH5P_elink_fapl -.testH5P_fapl_direct -.testH5P_alignment -.testH5P_fapl_family -.testH5P_chunk_cache -.testH5P_meta_block_size -.testH5Fmdc_logging -.testH5Pget_elink_fapl -.testH5Pset_mdc_config -.testH5P_small_data_block_size -.testH5Pset_fapl_log -.testH5P_evict_on_close -.testH5Pset_libver_bounds -.testH5P_sieve_buf_size -.testH5P_elink_file_cache_size -.testH5P_cache -.testH5Pget_mdc_config -.testH5P_fapl_muti_defaults -.testH5Pget_libver_bounds -.testH5P_btree_ratios -.testH5P_fapl_muti_nulls -.testH5Pset_fapl_sec2 -.testH5Pmulti_transform -.testH5Pset_elink_fapl_NegativeID -.testH5Pset_fapl_stdio -.testH5P_edc_check -.testH5Pset_elink_fapl -.testH5P_hyper_vector_size -.testH5P_gc_references -.testH5P_family_offset -.testH5P_fapl_core -.testH5P_fapl_muti -.testH5P_fapl_split -.testH5Pset_fapl_windows -.testH5P_fclose_degree -.testH5Pget_source_datasetname -.testH5Pvirtual_storage -.testH5Pget_selection_source_dataset -.testH5Pget_virtual_prefix -.testH5Pget_source_filename -.testH5Pset_get_virtual_printf_gap -.testH5Pget_virtual_count -.testH5Pset_virtual_prefix -.testH5Pset_get_virtual_view -.testH5Pget_mapping_parameters -.testH5Pset_virtual_prefix_null -.testH5P_genprop_basic_class -.testH5P_genprop_class_iter -.testH5P_genprop_basic_class_prop -.testH5P_genprop_basic_list_prop -.testH5Acreate2_nullname -.testH5Acreate_by_name -.testH5Aget_name_by_idx -.testH5Aget_storage_size -.testH5Aiterate -.testH5Aopen_by_idx -.testH5Aopen_invalidname -.testH5Aopen -.testH5Aget_info_by_name -.testH5Aget_create_plist -.testH5Adelete_by_name -.testH5Aopen_by_name -.testH5Aget_info -.testH5Aget_name -.testH5Aexists -.testH5Aget_info_by_idx -.testH5Arename -.testH5Adelete_by_idx_name1 -.testH5Adelete_by_idx_name2 -.testH5Adelete_by_idx_order -.testH5Arename_by_name -.testH5Acreate2_invalidobject -.testH5Acreate2 -.testH5Aiterate_by_name -.testH5Adelete_by_idx_null -.testH5Adelete_by_idx_invalidobject -.testH5Awrite_readVL -.testH5Aget_info1 -.testH5Oget_comment_by_name_null -.testH5Ovisit_by_name_nullname -.testH5Oget_info_invalid -.testH5Ovisit_by_name_null -.testH5Oget_comment_invalid -.testH5Oset_comment_by_name_invalid -.testH5Oopen_null -.testH5Oclose_invalid -.testH5Oflush_invalid -.testH5Oget_comment_by_name_invalid -.testH5Orefresh_invalid -.testH5Ocopy_null_dest -.testH5Olink_invalid -.testH5Oget_info_by_idx_invalid -.testH5Oget_info_by_idx_null -.testH5Olink_null_dest -.testH5Oget_info_by_name_invalid -.testH5Oget_info_by_name_null -.testH5Ocopy_invalid -.testH5Oset_comment_by_name_null -.testH5Ocopy_null_current -.testH5Oset_comment_invalid -.testH5Oopen_invalid -.testH5Ovisit_null -.testH5Oexists_by_name -.testH5Oget_info_by_idx_n0 -.testH5Oget_info_by_idx_n3 -.testH5Oget_info_by_name_not_exist_name -.testH5Ovisit_by_name -.testH5Oget_info_by_idx_name_not_exist_name -.testH5Oget_info_datatype -.testH5Oget_info_by_idx_not_exist_name -.testH5Oopen_by_idx_n0 -.testH5Oopen_by_idx_n3 -.testH5Oopen_not_exists -.testH5Ovisit -.testH5Oget_info_by_idx_not_exist_create -.testH5Oget_info_by_name_hardlink -.testH5Oget_info_by_name_group -.testH5Oopen_by_addr -.testH5Oget_info_by_name_not_exists -.testH5Oget_info_by_name_dataset -.testH5Oget_info_group -.testH5Oget_info_by_name_datatype -.testH5Oget_info_hardlink -.testH5Oget_info_by_idx_name_not_exist_create -.testH5Oget_info_dataset -.testH5OcopyRefsDatasettosameFile -.testH5OcopyRefsDatasettodiffFile -.testH5OcopyRefsAttr -.testH5Oget_info_by_idx_n0_create -.testH5Oget_info_softlink_dangle -.testH5Oget_info_softlink -.testH5Oget_info_externallink -.testH5Ocopy -.testH5Olink -.testH5Ocomment_by_name -.testH5Oget_info_by_idx_n1_create -.testH5Ocomment -.testH5Oinc_dec_count -.testH5Ocomment_by_name_clear -.testH5Ovisit_create -.testH5Ocopy_dst_link_exists -.testH5Ocomment_clear -.testH5Ocopy_cur_not_exists -.TestH5PLplugins -.TestH5PLpaths -.testH5Zfilter_avail -.testH5Zunregister_predefined -.testH5Zget_filter_info - -Time: XXXX - -OK (611 tests) - diff --git a/java/test/Makefile.am b/java/test/Makefile.am index f9db7ed..65ff43f 100644 --- a/java/test/Makefile.am +++ b/java/test/Makefile.am @@ -28,11 +28,14 @@ classes: pkgpath = test hdfjarfile = jar$(PACKAGE_TARNAME)-$(PACKAGE_VERSION).jar +CLASSPATH_ENV=CLASSPATH=.:$(JAVAROOT):$(top_builddir)/java/src/$(hdfjarfile):$(top_srcdir)/java/lib/junit.jar:$(top_srcdir)/java/lib/hamcrest-core.jar:$(top_srcdir)/java/lib/slf4j-api-1.7.5.jar:$(top_srcdir)/java/lib/ext/slf4j-simple-1.7.5.jar:$$CLASSPATH + jarfile = jar$(PACKAGE_TARNAME)test.jar -CLASSPATH_ENV=CLASSPATH=.:$(JAVAROOT):$(top_builddir)/java/src/$(hdfjarfile):$(top_srcdir)/java/lib/junit.jar:$(top_srcdir)/java/lib/hamcrest-core.jar:$(top_srcdir)/java/lib/slf4j-api-1.7.5.jar:$(top_srcdir)/java/lib/ext/slf4j-simple-1.7.5.jar:$$CLASSPATH AM_JAVACFLAGS = $(H5_JAVACFLAGS) -deprecation +TESTPACKAGE = + noinst_JAVA = \ TestH5.java \ TestH5Eparams.java \ @@ -67,7 +70,9 @@ noinst_JAVA = \ TestH5Ocopy.java \ TestH5PL.java \ TestH5Z.java \ - TestUnit.java + TestH5E.java \ + TestH5Edefault.java \ + TestH5Giterate.java $(jarfile): classnoinst.stamp classes $(JAR) cvf $@ -C $(JAVAROOT)/ $(pkgpath) @@ -81,17 +86,6 @@ TEST_SCRIPT = $(check_SCRIPTS) CLEANFILES = classnoinst.stamp $(jarfile) $(JAVAROOT)/$(pkgpath)/*.class junit.sh -#JAVA_JUNIT = $(JAVA_SRCS) -#noinst_JAVA = @JAVA_JUNIT@ -#EXTRA_JAVA = $(JAVA_JUNIT) -TESTS_JUNIT = AllJunitTests -#EXTRA_TEST = $(TESTS_JUNIT) - -AllJunitTests : - echo "#! /bin/sh" > $@ - echo "exec @JUNIT@ test.TestUnit" >> $@ - chmod +x $@ - clean: rm -rf $(JAVAROOT)/* rm -f $(jarfile) diff --git a/java/test/TestH5A.java b/java/test/TestH5A.java index 5e1e3f6..536364c 100644 --- a/java/test/TestH5A.java +++ b/java/test/TestH5A.java @@ -40,7 +40,7 @@ import org.junit.rules.TestName; public class TestH5A { @Rule public TestName testname = new TestName(); - private static final String H5_FILE = "test.h5"; + 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; diff --git a/java/test/TestH5D.java b/java/test/TestH5D.java index 372fdba..5d0e405 100644 --- a/java/test/TestH5D.java +++ b/java/test/TestH5D.java @@ -35,7 +35,7 @@ import org.junit.rules.TestName; public class TestH5D { @Rule public TestName testname = new TestName(); - private static final String H5_FILE = "test.h5"; + private static final String H5_FILE = "testD.h5"; private static final int DIM_X = 4; private static final int DIM_Y = 6; private static final int RANK = 2; diff --git a/java/test/TestH5Dplist.java b/java/test/TestH5Dplist.java index 6feaa23..406a1d3 100644 --- a/java/test/TestH5Dplist.java +++ b/java/test/TestH5Dplist.java @@ -31,7 +31,7 @@ import org.junit.rules.TestName; public class TestH5Dplist { @Rule public TestName testname = new TestName(); - private static final String H5_FILE = "test.h5"; + private static final String H5_FILE = "testDp.h5"; private static final int DIM_X = 4; private static final int DIM_Y = 7; private static final int EDIM_X = 6; diff --git a/java/test/TestH5E.java b/java/test/TestH5E.java index 1c0803a..5b689b3 100644 --- a/java/test/TestH5E.java +++ b/java/test/TestH5E.java @@ -78,14 +78,15 @@ public class TestH5E { H5.H5Fopen("test", 0, 1); } catch (HDF5LibraryException hdferr) { + long errnum = hdferr.getMajorErrorNumber(); int[] error_msg_type = { HDF5Constants.H5E_MAJOR }; String msg = null; try { - msg = H5.H5Eget_msg(hdferr.getMajorErrorNumber(), error_msg_type); + msg = H5.H5Eget_msg(errnum, error_msg_type); } catch (Throwable err) { err.printStackTrace(); - fail("H5.H5Eget_msg: " + err); + fail("H5.H5Eget_msg(Throwable): " + err); } assertNotNull("H5.H5Eget_msg: " + msg, msg); assertEquals("H5.H5Eget_msg: ", "Invalid arguments to routine", msg); @@ -93,7 +94,7 @@ public class TestH5E { } catch (Throwable err) { err.printStackTrace(); - fail("H5.H5Eget_msg: " + err); + fail("H5.H5Eget_msg(Other): " + err); } } @@ -103,10 +104,11 @@ public class TestH5E { H5.H5Fopen("test", 0, 1); } catch (HDF5LibraryException hdferr) { + long errnum = hdferr.getMinorErrorNumber(); int[] error_msg_type = { HDF5Constants.H5E_MINOR }; String msg = null; try { - msg = H5.H5Eget_msg(hdferr.getMinorErrorNumber(), error_msg_type); + msg = H5.H5Eget_msg(errnum, error_msg_type); } catch (Throwable err) { err.printStackTrace(); @@ -323,11 +325,6 @@ public class TestH5E { } assertFalse("testH5Ewalk:H5Ewalk2 ",((H5E_walk_data)walk_data).walkdata.isEmpty()); assertTrue("testH5Ewalk:H5Ewalk2 "+((H5E_walk_data)walk_data).walkdata.size(),((H5E_walk_data)walk_data).walkdata.size()==3); - assertTrue("testH5Ewalk:H5Ewalk2 "+((wdata)((H5E_walk_data)walk_data).walkdata.get(0)).line,((wdata)((H5E_walk_data)walk_data).walkdata.get(0)).line==3765); - assertTrue("testH5Ewalk:H5Ewalk2 "+((wdata)((H5E_walk_data)walk_data).walkdata.get(1)).line,((wdata)((H5E_walk_data)walk_data).walkdata.get(1)).line==5504); - assertTrue("testH5Ewalk:H5Ewalk2 "+((wdata)((H5E_walk_data)walk_data).walkdata.get(1)).func_name,((wdata)((H5E_walk_data)walk_data).walkdata.get(1)).func_name.compareToIgnoreCase("H5P_verify_apl_and_dxpl")==0); - assertTrue("testH5Ewalk:H5Ewalk2 "+((wdata)((H5E_walk_data)walk_data).walkdata.get(0)).err_desc,((wdata)((H5E_walk_data)walk_data).walkdata.get(0)).err_desc.compareToIgnoreCase("not a property list")==0); - assertTrue("testH5Ewalk:H5Ewalk2 "+((wdata)((H5E_walk_data)walk_data).walkdata.get(1)).err_desc,((wdata)((H5E_walk_data)walk_data).walkdata.get(1)).err_desc.compareToIgnoreCase("not the required access property list")==0); } } diff --git a/java/test/TestH5F.java b/java/test/TestH5F.java index ac2f70d..e4f9a30 100644 --- a/java/test/TestH5F.java +++ b/java/test/TestH5F.java @@ -31,7 +31,7 @@ import org.junit.rules.TestName; public class TestH5F { @Rule public TestName testname = new TestName(); - private static final String H5_FILE = "test.h5"; + private static final String H5_FILE = "testF.h5"; private static final int COUNT_OBJ_FILE = 1; private static final int COUNT_OBJ_DATASET = 0; diff --git a/java/test/TestH5Fbasic.java b/java/test/TestH5Fbasic.java index faf0bf7..11d6644 100644 --- a/java/test/TestH5Fbasic.java +++ b/java/test/TestH5Fbasic.java @@ -32,8 +32,8 @@ import org.junit.rules.TestName; public class TestH5Fbasic { @Rule public TestName testname = new TestName(); - private static final String H5_FILE = "test.h5"; - private static final String TXT_FILE = "test.txt"; + private static final String H5_FILE = "testFb.h5"; + private static final String TXT_FILE = "testFb.txt"; long H5fid = -1; private final void _deleteFile(String filename) { diff --git a/java/test/TestH5G.java b/java/test/TestH5G.java index 1a67990..6c30187 100644 --- a/java/test/TestH5G.java +++ b/java/test/TestH5G.java @@ -33,8 +33,8 @@ import org.junit.rules.TestName; public class TestH5G { @Rule public TestName testname = new TestName(); - private static final String H5_FILE = "test.h5"; - private static final String H5_FILE2 = "test2.h5"; + private static final String H5_FILE = "testG.h5"; + private static final String H5_FILE2 = "testG2.h5"; 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"}; diff --git a/java/test/TestH5Gbasic.java b/java/test/TestH5Gbasic.java index 6ff7d03..202f6ff 100644 --- a/java/test/TestH5Gbasic.java +++ b/java/test/TestH5Gbasic.java @@ -32,7 +32,7 @@ import org.junit.rules.TestName; public class TestH5Gbasic { @Rule public TestName testname = new TestName(); - private static final String H5_FILE = "test.h5"; + private static final String H5_FILE = "testGb.h5"; long H5fid = -1; private final long _createGroup(long fid, String name) { diff --git a/java/test/TestH5Lbasic.java b/java/test/TestH5Lbasic.java index 9e832f3..0a836c1 100644 --- a/java/test/TestH5Lbasic.java +++ b/java/test/TestH5Lbasic.java @@ -34,7 +34,7 @@ import org.junit.rules.TestName; public class TestH5Lbasic { @Rule public TestName testname = new TestName(); - private static final String H5_FILE = "h5ex_g_iterate.hdf"; + private static final String H5_FILE = "h5ex_g_iterateL1.hdf"; long H5fid = -1; @Before diff --git a/java/test/TestH5Lcreate.java b/java/test/TestH5Lcreate.java index dcb076d..646babc 100644 --- a/java/test/TestH5Lcreate.java +++ b/java/test/TestH5Lcreate.java @@ -37,8 +37,8 @@ import org.junit.rules.TestName; public class TestH5Lcreate { @Rule public TestName testname = new TestName(); - private static final String H5_EXTFILE = "h5ex_g_iterate.hdf"; - private static final String H5_FILE = "test.h5"; + private static final String H5_EXTFILE = "h5ex_g_iterateL2.hdf"; + 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; diff --git a/java/test/TestH5Obasic.java b/java/test/TestH5Obasic.java index 923d2b1..8c6689f 100644 --- a/java/test/TestH5Obasic.java +++ b/java/test/TestH5Obasic.java @@ -34,7 +34,7 @@ import org.junit.rules.TestName; public class TestH5Obasic { @Rule public TestName testname = new TestName(); - private static final String H5_FILE = "h5ex_g_iterate.hdf"; + private static final String H5_FILE = "h5ex_g_iterateO1.hdf"; private static long H5la_ds1 = -1; private static long H5la_l1 = -1; private static long H5la_dt1 = -1; diff --git a/java/test/TestH5Ocreate.java b/java/test/TestH5Ocreate.java index 559e12b..c3e36b4 100644 --- a/java/test/TestH5Ocreate.java +++ b/java/test/TestH5Ocreate.java @@ -37,8 +37,8 @@ import org.junit.rules.TestName; public class TestH5Ocreate { @Rule public TestName testname = new TestName(); - private static final String H5_EXTFILE = "h5ex_g_iterate.hdf"; - private static final String H5_FILE = "test.h5"; + private static final String H5_EXTFILE = "h5ex_g_iterateO2.hdf"; + 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; diff --git a/java/test/TestH5P.java b/java/test/TestH5P.java index 521a53c..e6105d9 100644 --- a/java/test/TestH5P.java +++ b/java/test/TestH5P.java @@ -36,7 +36,7 @@ import org.junit.rules.TestName; public class TestH5P { @Rule public TestName testname = new TestName(); - private static final String H5_FILE = "test.h5"; + private static final String H5_FILE = "testP.h5"; private static final int DIM_X = 4; private static final int DIM_Y = 6; long[] H5dims = { DIM_X, DIM_Y }; diff --git a/java/test/TestH5PData.java b/java/test/TestH5PData.java index c414d67..dfd8e87 100644 --- a/java/test/TestH5PData.java +++ b/java/test/TestH5PData.java @@ -34,7 +34,7 @@ import org.junit.rules.TestName; public class TestH5PData { @Rule public TestName testname = new TestName(); - private static final String H5_FILE = "test.h5"; + 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; diff --git a/java/test/TestH5Pfapl.java b/java/test/TestH5Pfapl.java index 0651502..10a79dd 100644 --- a/java/test/TestH5Pfapl.java +++ b/java/test/TestH5Pfapl.java @@ -38,10 +38,10 @@ import org.junit.rules.TestName; public class TestH5Pfapl { @Rule public TestName testname = new TestName(); - private static final String H5_FILE = "test.h5"; - private static final String H5_LOG_FILE = "test.log"; - private static final String H5_FAMILY_FILE = "test%05d"; - private static final String H5_MULTI_FILE = "testmulti"; + private static final String H5_FILE = "testPf.h5"; + private static final String H5_LOG_FILE = "testPf.log"; + private static final String H5_FAMILY_FILE = "testPf%05d"; + private static final String H5_MULTI_FILE = "testPfmulti"; private static char MULTI_LETTERS[] = {'X','s','b','r','g','l','o'}; private static final int DIM_X = 4; private static final int DIM_Y = 6; diff --git a/java/test/TestH5T.java b/java/test/TestH5T.java index 0c68d2e..1a7e58b 100644 --- a/java/test/TestH5T.java +++ b/java/test/TestH5T.java @@ -32,7 +32,7 @@ import org.junit.rules.TestName; public class TestH5T { @Rule public TestName testname = new TestName(); - private static final String H5_FILE = "test.h5"; + private static final String H5_FILE = "testT.h5"; long H5fid = -1; long H5strdid = -1; diff --git a/java/test/TestUnit.java b/java/test/TestUnit.java deleted file mode 100644 index e98fd4f..0000000 --- a/java/test/TestUnit.java +++ /dev/null @@ -1,36 +0,0 @@ -/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * - * Copyright by The HDF Group. * - * Copyright by the Board of Trustees of the University of Illinois. * - * All rights reserved. * - * * - * This file is part of HDF5. The full HDF5 copyright notice, including * - * terms governing use, modification, and redistribution, is contained in * - * the COPYING file, which can be found at the root of the source code * - * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * - * If you do not have access to either file, you may request a copy from * - * help@hdfgroup.org. * - * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ - -package test; - -import org.junit.runner.RunWith; -import org.junit.runners.Suite; - -@RunWith(Suite.class) -@Suite.SuiteClasses( { TestH5.class, - TestH5Eparams.class, TestH5Eregister.class, - TestH5Fparams.class, TestH5Fbasic.class, TestH5F.class, TestH5Fswmr.class, - TestH5Gbasic.class, TestH5G.class, - TestH5Sbasic.class, TestH5S.class, - TestH5Tparams.class, TestH5Tbasic.class, TestH5T.class, - TestH5Dparams.class, TestH5D.class, TestH5Dplist.class, - TestH5Lparams.class, TestH5Lbasic.class, TestH5Lcreate.class, - TestH5R.class, - TestH5P.class, TestH5PData.class, TestH5Pfapl.class, TestH5Pvirtual.class, TestH5Plist.class, - TestH5A.class, - TestH5Oparams.class, TestH5Obasic.class, TestH5Ocopy.class, TestH5Ocreate.class, - TestH5PL.class, TestH5Z.class -}) - -public class TestUnit { -} diff --git a/java/test/junit.sh.in b/java/test/junit.sh.in index ca3790d..4071bf9 100644 --- a/java/test/junit.sh.in +++ b/java/test/junit.sh.in @@ -16,6 +16,9 @@ top_builddir=@top_builddir@ top_srcdir=@top_srcdir@ srcdir=@srcdir@ +USE_FILTER_SZIP="@USE_FILTER_SZIP@" +USE_FILTER_DEFLATE="@USE_FILTER_DEFLATE@" + TESTNAME=JUnitInterface EXIT_SUCCESS=0 EXIT_FAILURE=1 @@ -64,15 +67,44 @@ $HDFLIB_HOME/ext/slf4j-simple-1.7.5.jar $top_builddir/java/src/$JARFILE " LIST_DATA_FILES=" -$HDFTEST_HOME/JUnit-unit.txt -$HDFTEST_HOME/JUnit-interface.ert +$HDFTEST_HOME/testfiles/JUnit-TestH5.txt +$HDFTEST_HOME/testfiles/JUnit-TestH5Eparams.txt +$HDFTEST_HOME/testfiles/JUnit-TestH5Eregister.txt +$HDFTEST_HOME/testfiles/JUnit-TestH5Fparams.txt +$HDFTEST_HOME/testfiles/JUnit-TestH5Fbasic.txt +$HDFTEST_HOME/testfiles/JUnit-TestH5F.txt +$HDFTEST_HOME/testfiles/JUnit-TestH5Fswmr.txt +$HDFTEST_HOME/testfiles/JUnit-TestH5Gbasic.txt +$HDFTEST_HOME/testfiles/JUnit-TestH5G.txt +$HDFTEST_HOME/testfiles/JUnit-TestH5Sbasic.txt +$HDFTEST_HOME/testfiles/JUnit-TestH5S.txt +$HDFTEST_HOME/testfiles/JUnit-TestH5Tparams.txt +$HDFTEST_HOME/testfiles/JUnit-TestH5Tbasic.txt +$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-TestH5Lparams.txt +$HDFTEST_HOME/testfiles/JUnit-TestH5Lbasic.txt +$HDFTEST_HOME/testfiles/JUnit-TestH5Lcreate.txt +$HDFTEST_HOME/testfiles/JUnit-TestH5R.txt +$HDFTEST_HOME/testfiles/JUnit-TestH5P.txt +$HDFTEST_HOME/testfiles/JUnit-TestH5PData.txt +$HDFTEST_HOME/testfiles/JUnit-TestH5Pfapl.txt +$HDFTEST_HOME/testfiles/JUnit-TestH5Pvirtual.txt +$HDFTEST_HOME/testfiles/JUnit-TestH5Plist.txt +$HDFTEST_HOME/testfiles/JUnit-TestH5A.txt +$HDFTEST_HOME/testfiles/JUnit-TestH5Oparams.txt +$HDFTEST_HOME/testfiles/JUnit-TestH5Obasic.txt +$HDFTEST_HOME/testfiles/JUnit-TestH5Ocreate.txt +$HDFTEST_HOME/testfiles/JUnit-TestH5Ocopy.txt +$HDFTEST_HOME/testfiles/JUnit-TestH5PL.txt +$HDFTEST_HOME/testfiles/JUnit-TestH5Z.txt +$HDFTEST_HOME/testfiles/JUnit-TestH5E.txt +$HDFTEST_HOME/testfiles/JUnit-TestH5Edefault.txt +$HDFTEST_HOME/testfiles/JUnit-TestH5Giterate.txt " -expect="JUnit-unit.txt" -actual="JUnit-interface.out" -actual_err="JUnit-interface.err" -actual_ext="JUnit-interface.ext" - # # copy files from source dirs to test dir # @@ -173,14 +205,18 @@ COPY_DATAFILES_TO_BLDDIR() fi done $CP -f $HDFTEST_HOME/h5ex_g_iterate.orig $BLDDIR/h5ex_g_iterate.hdf + $CP -f $HDFTEST_HOME/h5ex_g_iterate.orig $BLDDIR/h5ex_g_iterateL1.hdf + $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 } CLEAN_DATAFILES_AND_BLDDIR() { - $RM $BLDDIR/h5ex_g_iterate.hdf - $RM $BLDDIR/JUnit-interface.out - $RM $BLDDIR/JUnit-interface.err - $RM $BLDDIR/JUnit-interface.ext + $RM $BLDDIR/h5ex_g_iterate*.hdf + $RM $BLDDIR/JUnit-*.out + $RM $BLDDIR/JUnit-*.ext + $RM $BLDDIR/JUnit-*.err # skip rm if srcdir is same as destdir # this occurs when build/test performed in source dir and # make cp fail @@ -257,12 +293,446 @@ esac export LD_LIBRARY_PATH -echo "$JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH -ea org.junit.runner.JUnitCore test.TestUnit" - # Run test. - TESTING JUnit - ( - $RUNSERIAL $JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH -ea org.junit.runner.JUnitCore test.TestUnit - ) >$actual_ext 2>$actual_err +echo "$JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH -ea org.junit.runner.JUnitCore test.TestH5" +TESTING JUnit-TestH5 +($RUNSERIAL $JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH -ea org.junit.runner.JUnitCore test.TestH5 > JUnit-TestH5.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-TestH5.ext > JUnit-TestH5.out + +if diff JUnit-TestH5.out JUnit-TestH5.txt > /dev/null; then + echo " PASSED JUnit-TestH5" +else + echo "**FAILED** JUnit-TestH5" + nerrors="`expr $nerrors + 1`" +fi + +echo "$JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH -ea org.junit.runner.JUnitCore test.TestH5Eparams" +TESTING JUnit-TestH5Eparams +($RUNSERIAL $JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH -ea org.junit.runner.JUnitCore test.TestH5Eparams > JUnit-TestH5Eparams.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-TestH5Eparams.ext > JUnit-TestH5Eparams.out + +if diff JUnit-TestH5Eparams.out JUnit-TestH5Eparams.txt > /dev/null; then + echo " PASSED JUnit-TestH5Eparams" +else + echo "**FAILED** JUnit-TestH5Eparams" + nerrors="`expr $nerrors + 1`" +fi + +echo "$JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH -ea org.junit.runner.JUnitCore test.TestH5Eregister" +TESTING JUnit-TestH5Eregister +($RUNSERIAL $JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH -ea org.junit.runner.JUnitCore test.TestH5Eregister > JUnit-TestH5Eregister.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-TestH5Eregister.ext > JUnit-TestH5Eregister.out + +if diff JUnit-TestH5Eregister.out JUnit-TestH5Eregister.txt > /dev/null; then + echo " PASSED JUnit-TestH5Eregister" +else + echo "**FAILED** JUnit-TestH5Eregister" + nerrors="`expr $nerrors + 1`" +fi + +echo "$JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH -ea org.junit.runner.JUnitCore test.TestH5Fparams" +TESTING JUnit-TestH5Fparams +($RUNSERIAL $JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH -ea org.junit.runner.JUnitCore test.TestH5Fparams > JUnit-TestH5Fparams.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-TestH5Fparams.ext > JUnit-TestH5Fparams.out + +if diff JUnit-TestH5Fparams.out JUnit-TestH5Fparams.txt > /dev/null; then + echo " PASSED JUnit-TestH5Fparams" +else + echo "**FAILED** JUnit-TestH5Fparams" + nerrors="`expr $nerrors + 1`" +fi + +echo "$JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH -ea org.junit.runner.JUnitCore test.TestH5Fbasic" +TESTING JUnit-TestH5Fbasic +($RUNSERIAL $JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH -ea org.junit.runner.JUnitCore test.TestH5Fbasic > JUnit-TestH5Fbasic.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-TestH5Fbasic.ext > JUnit-TestH5Fbasic.out + +if diff JUnit-TestH5Fbasic.out JUnit-TestH5Fbasic.txt > /dev/null; then + echo " PASSED JUnit-TestH5Fbasic" +else + echo "**FAILED** JUnit-TestH5Fbasic" + nerrors="`expr $nerrors + 1`" +fi + +echo "$JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH -ea org.junit.runner.JUnitCore test.TestH5F" +TESTING JUnit-TestH5F +($RUNSERIAL $JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH -ea org.junit.runner.JUnitCore test.TestH5F > JUnit-TestH5F.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-TestH5F.ext > JUnit-TestH5F.out + +if diff JUnit-TestH5F.out JUnit-TestH5F.txt > /dev/null; then + echo " PASSED JUnit-TestH5F" +else + echo "**FAILED** JUnit-TestH5F" + nerrors="`expr $nerrors + 1`" +fi + +echo "$JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH -ea org.junit.runner.JUnitCore test.TestH5Fswmr" +TESTING JUnit-TestH5Fswmr +($RUNSERIAL $JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH -ea org.junit.runner.JUnitCore test.TestH5Fswmr > JUnit-TestH5Fswmr.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-TestH5Fswmr.ext > JUnit-TestH5Fswmr.out + +if diff JUnit-TestH5Fswmr.out JUnit-TestH5Fswmr.txt > /dev/null; then + echo " PASSED JUnit-TestH5Fswmr" +else + echo "**FAILED** JUnit-TestH5Fswmr" + nerrors="`expr $nerrors + 1`" +fi + +echo "$JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH -ea org.junit.runner.JUnitCore test.TestH5Gbasic" +TESTING JUnit-TestH5Gbasic +($RUNSERIAL $JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH -ea org.junit.runner.JUnitCore test.TestH5Gbasic > JUnit-TestH5Gbasic.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-TestH5Gbasic.ext > JUnit-TestH5Gbasic.out + +if diff JUnit-TestH5Gbasic.out JUnit-TestH5Gbasic.txt > /dev/null; then + echo " PASSED JUnit-TestH5Gbasic" +else + echo "**FAILED** JUnit-TestH5Gbasic" + nerrors="`expr $nerrors + 1`" +fi + +echo "$JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH -ea org.junit.runner.JUnitCore test.TestH5G" +TESTING JUnit-TestH5G +($RUNSERIAL $JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH -ea org.junit.runner.JUnitCore test.TestH5G > JUnit-TestH5G.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-TestH5G.ext > JUnit-TestH5G.out + +if diff JUnit-TestH5G.out JUnit-TestH5G.txt > /dev/null; then + echo " PASSED JUnit-TestH5G" +else + echo "**FAILED** JUnit-TestH5G" + nerrors="`expr $nerrors + 1`" +fi + +echo "$JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH -ea org.junit.runner.JUnitCore test.TestH5Sbasic" +TESTING JUnit-TestH5Sbasic +($RUNSERIAL $JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH -ea org.junit.runner.JUnitCore test.TestH5Sbasic > JUnit-TestH5Sbasic.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-TestH5Sbasic.ext > JUnit-TestH5Sbasic.out + +if diff JUnit-TestH5Sbasic.out JUnit-TestH5Sbasic.txt > /dev/null; then + echo " PASSED JUnit-TestH5Sbasic" +else + echo "**FAILED** JUnit-TestH5Sbasic" + nerrors="`expr $nerrors + 1`" +fi + +echo "$JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH -ea org.junit.runner.JUnitCore test.TestH5S" +TESTING JUnit-TestH5S +($RUNSERIAL $JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH -ea org.junit.runner.JUnitCore test.TestH5S > JUnit-TestH5S.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-TestH5S.ext > JUnit-TestH5S.out + +if diff JUnit-TestH5S.out JUnit-TestH5S.txt > /dev/null; then + echo " PASSED JUnit-TestH5S" +else + echo "**FAILED** JUnit-TestH5S" + nerrors="`expr $nerrors + 1`" +fi + +echo "$JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH -ea org.junit.runner.JUnitCore test.TestH5Tparams" +TESTING JUnit-TestH5Tparams +($RUNSERIAL $JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH -ea org.junit.runner.JUnitCore test.TestH5Tparams > JUnit-TestH5Tparams.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-TestH5Tparams.ext > JUnit-TestH5Tparams.out + +if diff JUnit-TestH5Tparams.out JUnit-TestH5Tparams.txt > /dev/null; then + echo " PASSED JUnit-TestH5Tparams" +else + echo "**FAILED** JUnit-TestH5Tparams" + nerrors="`expr $nerrors + 1`" +fi + +echo "$JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH -ea org.junit.runner.JUnitCore test.TestH5Tbasic" +TESTING JUnit-TestH5Tbasic +($RUNSERIAL $JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH -ea org.junit.runner.JUnitCore test.TestH5Tbasic > JUnit-TestH5Tbasic.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-TestH5Tbasic.ext > JUnit-TestH5Tbasic.out + +if diff JUnit-TestH5Tbasic.out JUnit-TestH5Tbasic.txt > /dev/null; then + echo " PASSED JUnit-TestH5Tbasic" +else + echo "**FAILED** JUnit-TestH5Tbasic" + nerrors="`expr $nerrors + 1`" +fi + +echo "$JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH -ea org.junit.runner.JUnitCore test.TestH5T" +TESTING JUnit-TestH5T +($RUNSERIAL $JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH -ea org.junit.runner.JUnitCore test.TestH5T > JUnit-TestH5T.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-TestH5T.ext > JUnit-TestH5T.out + +if diff JUnit-TestH5T.out JUnit-TestH5T.txt > /dev/null; then + echo " PASSED JUnit-TestH5T" +else + echo "**FAILED** JUnit-TestH5T" + nerrors="`expr $nerrors + 1`" +fi + +echo "$JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH -ea org.junit.runner.JUnitCore test.TestH5Dparams" +TESTING JUnit-TestH5Dparams +($RUNSERIAL $JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH -ea org.junit.runner.JUnitCore test.TestH5Dparams > JUnit-TestH5Dparams.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-TestH5Dparams.ext > JUnit-TestH5Dparams.out + +if diff JUnit-TestH5Dparams.out JUnit-TestH5Dparams.txt > /dev/null; then + echo " PASSED JUnit-TestH5Dparams" +else + echo "**FAILED** JUnit-TestH5Dparams" + nerrors="`expr $nerrors + 1`" +fi + +echo "$JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH -ea org.junit.runner.JUnitCore test.TestH5D" +TESTING JUnit-TestH5D +($RUNSERIAL $JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH -ea org.junit.runner.JUnitCore test.TestH5D > JUnit-TestH5D.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-TestH5D.ext > JUnit-TestH5D.out + +if diff JUnit-TestH5D.out JUnit-TestH5D.txt > /dev/null; then + echo " PASSED JUnit-TestH5D" +else + echo "**FAILED** JUnit-TestH5D" + nerrors="`expr $nerrors + 1`" +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) + +# 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-TestH5Dplist.ext > JUnit-TestH5Dplist.out + +if diff JUnit-TestH5Dplist.out JUnit-TestH5Dplist.txt > /dev/null; then + echo " PASSED JUnit-TestH5Dplist" +else + echo "**FAILED** JUnit-TestH5Dplist" + nerrors="`expr $nerrors + 1`" +fi + +echo "$JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH -ea org.junit.runner.JUnitCore test.TestH5Lparams" +TESTING JUnit-TestH5Lparams +($RUNSERIAL $JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH -ea org.junit.runner.JUnitCore test.TestH5Lparams > JUnit-TestH5Lparams.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-TestH5Lparams.ext > JUnit-TestH5Lparams.out + +if diff JUnit-TestH5Lparams.out JUnit-TestH5Lparams.txt > /dev/null; then + echo " PASSED JUnit-TestH5Lparams" +else + echo "**FAILED** JUnit-TestH5Lparams" + nerrors="`expr $nerrors + 1`" +fi + +echo "$JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH -ea org.junit.runner.JUnitCore test.TestH5Lbasic" +TESTING JUnit-TestH5Lbasic +($RUNSERIAL $JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH -ea org.junit.runner.JUnitCore test.TestH5Lbasic > JUnit-TestH5Lbasic.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-TestH5Lbasic.ext > JUnit-TestH5Lbasic.out + +if diff JUnit-TestH5Lbasic.out JUnit-TestH5Lbasic.txt > /dev/null; then + echo " PASSED JUnit-TestH5Lbasic" +else + echo "**FAILED** JUnit-TestH5Lbasic" + nerrors="`expr $nerrors + 1`" +fi + +echo "$JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH -ea org.junit.runner.JUnitCore test.TestH5Lcreate" +TESTING JUnit-TestH5Lcreate +($RUNSERIAL $JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH -ea org.junit.runner.JUnitCore test.TestH5Lcreate > JUnit-TestH5Lcreate.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-TestH5Lcreate.ext > JUnit-TestH5Lcreate.out + +if diff JUnit-TestH5Lcreate.out JUnit-TestH5Lcreate.txt > /dev/null; then + echo " PASSED JUnit-TestH5Lcreate" +else + echo "**FAILED** JUnit-TestH5Lcreate" + nerrors="`expr $nerrors + 1`" +fi + +echo "$JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH -ea org.junit.runner.JUnitCore test.TestH5R" +TESTING JUnit-TestH5R +($RUNSERIAL $JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH -ea org.junit.runner.JUnitCore test.TestH5R > JUnit-TestH5R.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-TestH5R.ext > JUnit-TestH5R.out + +if diff JUnit-TestH5R.out JUnit-TestH5R.txt > /dev/null; then + echo " PASSED JUnit-TestH5R" +else + echo "**FAILED** JUnit-TestH5R" + nerrors="`expr $nerrors + 1`" +fi + +echo "$JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH -ea org.junit.runner.JUnitCore test.TestH5P" +TESTING JUnit-TestH5P +($RUNSERIAL $JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH -ea org.junit.runner.JUnitCore test.TestH5P > JUnit-TestH5P.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-TestH5P.ext > JUnit-TestH5P.out + +if diff JUnit-TestH5P.out JUnit-TestH5P.txt > /dev/null; then + echo " PASSED JUnit-TestH5P" +else + echo "**FAILED** JUnit-TestH5P" + nerrors="`expr $nerrors + 1`" +fi + +echo "$JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH -ea org.junit.runner.JUnitCore test.TestH5PData" +TESTING JUnit-TestH5PData +($RUNSERIAL $JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH -ea org.junit.runner.JUnitCore test.TestH5PData > JUnit-TestH5PData.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-TestH5PData.ext > JUnit-TestH5PData.out + +if diff JUnit-TestH5PData.out JUnit-TestH5PData.txt > /dev/null; then + echo " PASSED JUnit-TestH5PData" +else + echo "**FAILED** JUnit-TestH5PData" + nerrors="`expr $nerrors + 1`" +fi + +echo "$JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH -ea org.junit.runner.JUnitCore test.TestH5Pfapl" +TESTING JUnit-TestH5Pfapl +($RUNSERIAL $JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH -ea org.junit.runner.JUnitCore test.TestH5Pfapl > JUnit-TestH5Pfapl.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) /' \ @@ -270,19 +740,246 @@ sed -e 's/thread [0-9]*/thread (IDs)/' -e 's/: .*\.c /: (file name) /' \ -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)/' \ - $actual_ext > $actual + JUnit-TestH5Pfapl.ext > JUnit-TestH5Pfapl.out -# SunOS does not support this. Skip it. -if [ $myos = SunOS ]; then - echo " SKIPPED" +if diff JUnit-TestH5Pfapl.out JUnit-TestH5Pfapl.txt > /dev/null; then + echo " PASSED JUnit-TestH5Pfapl" else - if $CMP $expect $actual; then - echo " PASSED" + echo "**FAILED** JUnit-TestH5Pfapl" + nerrors="`expr $nerrors + 1`" +fi + +echo "$JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH -ea org.junit.runner.JUnitCore test.TestH5Pvirtual" +TESTING JUnit-TestH5Pvirtual +($RUNSERIAL $JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH -ea org.junit.runner.JUnitCore test.TestH5Pvirtual > JUnit-TestH5Pvirtual.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-TestH5Pvirtual.ext > JUnit-TestH5Pvirtual.out + +if diff JUnit-TestH5Pvirtual.out JUnit-TestH5Pvirtual.txt > /dev/null; then + echo " PASSED JUnit-TestH5Pvirtual" +else + echo "**FAILED** JUnit-TestH5Pvirtual" + nerrors="`expr $nerrors + 1`" +fi + +echo "$JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH -ea org.junit.runner.JUnitCore test.TestH5Plist" +TESTING JUnit-TestH5Plist +($RUNSERIAL $JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH -ea org.junit.runner.JUnitCore test.TestH5Plist > JUnit-TestH5Plist.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-TestH5Plist.ext > JUnit-TestH5Plist.out + +if diff JUnit-TestH5Plist.out JUnit-TestH5Plist.txt > /dev/null; then + echo " PASSED JUnit-TestH5Plist" +else + echo "**FAILED** JUnit-TestH5Plist" + nerrors="`expr $nerrors + 1`" +fi + +echo "$JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH -ea org.junit.runner.JUnitCore test.TestH5A" +TESTING JUnit-TestH5A +($RUNSERIAL $JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH -ea org.junit.runner.JUnitCore test.TestH5A > JUnit-TestH5A.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-TestH5A.ext > JUnit-TestH5A.out + +if diff JUnit-TestH5A.out JUnit-TestH5A.txt > /dev/null; then + echo " PASSED JUnit-TestH5A" +else + echo "**FAILED** JUnit-TestH5A" + nerrors="`expr $nerrors + 1`" +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) + +# 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-TestH5Oparams.ext > JUnit-TestH5Oparams.out + +if diff JUnit-TestH5Oparams.out JUnit-TestH5Oparams.txt > /dev/null; then + echo " PASSED JUnit-TestH5Oparams" +else + echo "**FAILED** JUnit-TestH5Oparams" + nerrors="`expr $nerrors + 1`" +fi + +echo "$JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH -ea org.junit.runner.JUnitCore test.TestH5Obasic" +TESTING JUnit-TestH5Obasic +($RUNSERIAL $JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH -ea org.junit.runner.JUnitCore test.TestH5Obasic > JUnit-TestH5Obasic.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-TestH5Obasic.ext > JUnit-TestH5Obasic.out + +if diff JUnit-TestH5Obasic.out JUnit-TestH5Obasic.txt > /dev/null; then + echo " PASSED JUnit-TestH5Obasic" +else + echo "**FAILED** JUnit-TestH5Obasic" + nerrors="`expr $nerrors + 1`" +fi + +echo "$JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH -ea org.junit.runner.JUnitCore test.TestH5Ocreate" +TESTING JUnit-TestH5Ocreate +($RUNSERIAL $JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH -ea org.junit.runner.JUnitCore test.TestH5Ocreate > JUnit-TestH5Ocreate.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-TestH5Ocreate.ext > JUnit-TestH5Ocreate.out + +if diff JUnit-TestH5Ocreate.out JUnit-TestH5Ocreate.txt > /dev/null; then + echo " PASSED JUnit-TestH5Ocreate" +else + echo "**FAILED** JUnit-TestH5Ocreate" + nerrors="`expr $nerrors + 1`" +fi + +echo "$JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH -ea org.junit.runner.JUnitCore test.TestH5Ocopy" +TESTING JUnit-TestH5Ocopy +($RUNSERIAL $JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH -ea org.junit.runner.JUnitCore test.TestH5Ocopy > JUnit-TestH5Ocopy.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-TestH5Ocopy.ext > JUnit-TestH5Ocopy.out + +if diff JUnit-TestH5Ocopy.out JUnit-TestH5Ocopy.txt > /dev/null; then + echo " PASSED JUnit-TestH5Ocopy" +else + echo "**FAILED** JUnit-TestH5Ocopy" + nerrors="`expr $nerrors + 1`" +fi + +echo "$JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH -ea org.junit.runner.JUnitCore test.TestH5PL" +TESTING JUnit-TestH5PL +($RUNSERIAL $JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH -ea org.junit.runner.JUnitCore test.TestH5PL > JUnit-TestH5PL.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-TestH5PL.ext > JUnit-TestH5PL.out + +if diff JUnit-TestH5PL.out JUnit-TestH5PL.txt > /dev/null; then + echo " PASSED JUnit-TestH5PL" +else + echo "**FAILED** JUnit-TestH5PL" + nerrors="`expr $nerrors + 1`" +fi + +echo "$JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH -ea org.junit.runner.JUnitCore test.TestH5Z" +TESTING JUnit-TestH5Z +($RUNSERIAL $JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH -ea org.junit.runner.JUnitCore test.TestH5Z > JUnit-TestH5Z.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-TestH5Z.ext > JUnit-TestH5Z.out + +if diff JUnit-TestH5Z.out JUnit-TestH5Z.txt > /dev/null; then + echo " PASSED JUnit-TestH5Z" +else + echo "**FAILED** JUnit-TestH5Z" + nerrors="`expr $nerrors + 1`" +fi + +if test $USE_FILTER_SZIP = "yes"; then + echo "$JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH -ea org.junit.runner.JUnitCore test.TestH5E" + TESTING JUnit-TestH5E + ($RUNSERIAL $JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH -ea org.junit.runner.JUnitCore test.TestH5E > JUnit-TestH5E.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-TestH5E.ext > JUnit-TestH5E.out + + if diff JUnit-TestH5E.out JUnit-TestH5E.txt > /dev/null; then + echo " PASSED JUnit-TestH5E" + else + echo "**FAILED** JUnit-TestH5E" + nerrors="`expr $nerrors + 1`" + fi +fi + +if test $USE_FILTER_SZIP = "yes"; then + echo "$JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH -ea org.junit.runner.JUnitCore test.TestH5Edefault" + TESTING JUnit-TestH5Edefault + ($RUNSERIAL $JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH -ea org.junit.runner.JUnitCore test.TestH5Edefault > JUnit-TestH5Edefault.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-TestH5Edefault.ext > JUnit-TestH5Edefault.out + + if diff JUnit-TestH5Edefault.out JUnit-TestH5Edefault.txt > /dev/null; then + echo " PASSED JUnit-TestH5Edefault" + else + echo "**FAILED** JUnit-TestH5Edefault" + nerrors="`expr $nerrors + 1`" + fi +fi + +if test $USE_FILTER_SZIP = "yes"; then + echo "$JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH -ea org.junit.runner.JUnitCore test.TestH5Giterate" + TESTING JUnit-TestH5Giterate + ($RUNSERIAL $JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH -ea org.junit.runner.JUnitCore test.TestH5Giterate > JUnit-TestH5Giterate.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-TestH5Giterate.ext > JUnit-TestH5Giterate.out + + if diff JUnit-TestH5Giterate.out JUnit-TestH5Giterate.txt > /dev/null; then + echo " PASSED JUnit-TestH5Giterate" else - echo "*FAILED*" - echo " Expected result differs from actual result" + echo "**FAILED** JUnit-TestH5Giterate" nerrors="`expr $nerrors + 1`" - test yes = "$verbose" && $DIFF $expect $actual |sed 's/^/ /' fi fi diff --git a/java/test/testfiles/JUnit-TestH5.txt b/java/test/testfiles/JUnit-TestH5.txt new file mode 100644 index 0000000..37c5b65 --- /dev/null +++ b/java/test/testfiles/JUnit-TestH5.txt @@ -0,0 +1,15 @@ +JUnit version 4.11 +.testJ2C +.testIsSerializable +.testH5garbage_collect +.testH5error_off +.serializeToDisk +.testH5open +.testH5check_version +.testH5get_libversion +.testH5set_free_list_limits + +Time: XXXX + +OK (9 tests) + diff --git a/java/test/testfiles/JUnit-TestH5A.txt b/java/test/testfiles/JUnit-TestH5A.txt new file mode 100644 index 0000000..2026d21 --- /dev/null +++ b/java/test/testfiles/JUnit-TestH5A.txt @@ -0,0 +1,34 @@ +JUnit version 4.11 +.testH5Acreate2_nullname +.testH5Acreate_by_name +.testH5Aget_name_by_idx +.testH5Aget_storage_size +.testH5Aiterate +.testH5Aopen_by_idx +.testH5Aopen_invalidname +.testH5Aopen +.testH5Aget_info_by_name +.testH5Aget_create_plist +.testH5Adelete_by_name +.testH5Aopen_by_name +.testH5Aget_info +.testH5Aget_name +.testH5Aexists +.testH5Aget_info_by_idx +.testH5Arename +.testH5Adelete_by_idx_name1 +.testH5Adelete_by_idx_name2 +.testH5Adelete_by_idx_order +.testH5Arename_by_name +.testH5Acreate2_invalidobject +.testH5Acreate2 +.testH5Aiterate_by_name +.testH5Adelete_by_idx_null +.testH5Adelete_by_idx_invalidobject +.testH5Awrite_readVL +.testH5Aget_info1 + +Time: XXXX + +OK (28 tests) + diff --git a/java/test/testfiles/JUnit-TestH5D.txt b/java/test/testfiles/JUnit-TestH5D.txt new file mode 100644 index 0000000..987655b --- /dev/null +++ b/java/test/testfiles/JUnit-TestH5D.txt @@ -0,0 +1,25 @@ +JUnit version 4.11 +.testH5Dget_storage_size +.testH5Diterate_write +.testH5Dcreate +.testH5Dget_offset +.testH5Dget_type +.testH5Dfill +.testH5Dopen +.testH5Dcreate_anon +.testH5Dfill_null +.testH5Dget_storage_size_empty +.testH5Diterate +.testH5Dget_access_plist +.testH5Dvlen_read_invalid_buffer +.testH5Dvlen_get_buf_size +.testH5Dget_space_closed +.testH5Dget_space_status +.testH5Dvlen_write_read +.testH5Dget_space +.testH5Dget_type_closed + +Time: XXXX + +OK (19 tests) + diff --git a/java/test/testfiles/JUnit-TestH5Dparams.txt b/java/test/testfiles/JUnit-TestH5Dparams.txt new file mode 100644 index 0000000..9751be4 --- /dev/null +++ b/java/test/testfiles/JUnit-TestH5Dparams.txt @@ -0,0 +1,26 @@ +JUnit version 4.11 +.testH5Dget_space_status_invalid +.testH5Dget_access_plist_invalid +.testH5Dget_type_invalid +.testH5Dget_create_plist_invalid +.testH5Dget_offset_invalid +.testH5Dvlen_get_buf_size_invalid +.testH5Dcreate_null +.testH5Dset_extent_status_null +.testH5Dvlen_reclaim_null +.testH5Dcreate_invalid +.testH5Dcreate_anon_invalid +.testH5Dset_extent_status_invalid +.testH5Dvlen_reclaim_invalid +.testH5Dopen_invalid +.testH5Dclose_invalid +.testH5Dflush_invalid +.testH5Drefresh_invalid +.testH5Dget_storage_size_invalid +.testH5Dget_space_invalid +.testH5Dopen_null + +Time: XXXX + +OK (20 tests) + diff --git a/java/test/testfiles/JUnit-TestH5Dplist.txt b/java/test/testfiles/JUnit-TestH5Dplist.txt new file mode 100644 index 0000000..1dfbed1 --- /dev/null +++ b/java/test/testfiles/JUnit-TestH5Dplist.txt @@ -0,0 +1,7 @@ +JUnit version 4.11 +.testH5Dset_extent + +Time: XXXX + +OK (1 test) + diff --git a/java/test/testfiles/JUnit-TestH5E.txt b/java/test/testfiles/JUnit-TestH5E.txt new file mode 100644 index 0000000..8c5e5e4 --- /dev/null +++ b/java/test/testfiles/JUnit-TestH5E.txt @@ -0,0 +1,11 @@ +JUnit version 4.11 +.testH5Eget_msg_major +.testH5Eget_msg_minor +.testH5Epush +.testH5Ewalk +.testH5Epop + +Time: XXXX + +OK (5 tests) + diff --git a/java/test/testfiles/JUnit-TestH5Edefault.txt b/java/test/testfiles/JUnit-TestH5Edefault.txt new file mode 100644 index 0000000..a9374ed --- /dev/null +++ b/java/test/testfiles/JUnit-TestH5Edefault.txt @@ -0,0 +1,54 @@ +JUnit version 4.11 +.testH5EprintInt +.testH5Eset_current_stack_invalid_stkid +.testH5Eset_current_stack +.testH5Eget_num +.testH5Eclear +.testH5Eprint +.testH5Epush_null_name +.testH5Eget_num_with_msg +.testH5Eclear2_with_msg +.testH5Epush_invalid_stkid +.testH5Eget_current_stack +.testH5Ecreate_stack +.testH5Eget_msg_invalid_msgid +.testH5Eauto_is_v2 +.testH5EclearInt +.testH5Eauto_is_v2_invalid_stkid +.testH5Eclose_msg_invalid_errid +.testH5Eclose_stack_invalid_stackid +.testH5Eget_class_name_invalid_classname +.testH5Eget_num_invalid_stkid +.testH5EprintInt_invalid_classid +.testH5Epop +.testH5Epop_invalid_stkid +.testH5Eget_current_stack_pop +.testH5Eget_class_name_invalid_classid +.testH5Ecreate_msg_invalid_errid +.testH5Eclear2_invalid_stkid +.testH5Eprint2_invalid_classid + +Time: XXXX + +OK (28 tests) + +HDF5-DIAG: Error detected in HDF5 (version (number)) thread (IDs): + #000: (file name) line (number) in H5Fopen(): can't set access and transfer property lists + major: File accessibilty + minor: Can't set value + #001: (file name) line (number) in H5P_verify_apl_and_dxpl(): not the required access property list + major: Property lists + minor: Inappropriate type + #002: (file name) line (number) in H5P_isa_class(): not a property list + major: Invalid arguments to routine + minor: Inappropriate type +HDF5-DIAG: Error detected in HDF5 (version (number)) thread (IDs): + #000: (file name) line (number) in H5Fopen(): can't set access and transfer property lists + major: File accessibilty + minor: Can't set value + #001: (file name) line (number) in H5P_verify_apl_and_dxpl(): not the required access property list + major: Property lists + minor: Inappropriate type + #002: (file name) line (number) in H5P_isa_class(): not a property list + major: Invalid arguments to routine + minor: Inappropriate type diff --git a/java/test/testfiles/JUnit-TestH5Eparams.txt b/java/test/testfiles/JUnit-TestH5Eparams.txt new file mode 100644 index 0000000..92f8068 --- /dev/null +++ b/java/test/testfiles/JUnit-TestH5Eparams.txt @@ -0,0 +1,19 @@ +JUnit version 4.11 +.testH5EprintInt +.testH5Eget_msg +.testH5Eget_num +.testH5Eget_class_name +.testH5Eget_num_with_msg +.testH5Eclear2 +.testH5Eprint2 +.testH5Ecreate_msg_major +.testH5Ecreate_msg_minor +.testH5Ecreate_stack +.testH5Ecreate_msg_name_null +.testH5Eauto_is_v2 +.testH5EclearInt + +Time: XXXX + +OK (13 tests) + diff --git a/java/test/testfiles/JUnit-TestH5Eregister.txt b/java/test/testfiles/JUnit-TestH5Eregister.txt new file mode 100644 index 0000000..132e123 --- /dev/null +++ b/java/test/testfiles/JUnit-TestH5Eregister.txt @@ -0,0 +1,11 @@ +JUnit version 4.11 +.testH5Eregister_class_lib_name_null +.testH5Eregister_class_version_null +.testH5Eunregister_class_invalid_classid +.testH5Eregister_class +.testH5Eregister_class_cls_name_null + +Time: XXXX + +OK (5 tests) + diff --git a/java/test/testfiles/JUnit-TestH5F.txt b/java/test/testfiles/JUnit-TestH5F.txt new file mode 100644 index 0000000..16a423e --- /dev/null +++ b/java/test/testfiles/JUnit-TestH5F.txt @@ -0,0 +1,14 @@ +JUnit version 4.11 +.testH5Fget_access_plist +.testH5Fget_obj_ids +.testH5Fget_intent_rdwr +.testH5Fget_access_plist_closed +.testH5Fget_create_plist_closed +.testH5Fget_intent_rdonly +.testH5Fget_create_plist +.testH5Fget_obj_count + +Time: XXXX + +OK (8 tests) + diff --git a/java/test/testfiles/JUnit-TestH5Fbasic.txt b/java/test/testfiles/JUnit-TestH5Fbasic.txt new file mode 100644 index 0000000..467e2fb --- /dev/null +++ b/java/test/testfiles/JUnit-TestH5Fbasic.txt @@ -0,0 +1,21 @@ +JUnit version 4.11 +.testH5Fget_mdc_size +.testH5Fget_mdc_hit_rate +.testH5Fis_hdf5 +.testH5Fget_freespace +.testH5Fclose +.testH5Fget_filesize +.testH5Fcreate_EXCL +.testH5Freopen_closed +.testH5Freset_mdc_hit_rate_stats +.testH5Fget_name +.testH5Fcreate +.testH5Fclear_elink_file_cache +.testH5Fclose_twice +.testH5Freopen +.testH5Fopen_read_only + +Time: XXXX + +OK (15 tests) + diff --git a/java/test/testfiles/JUnit-TestH5Fparams.txt b/java/test/testfiles/JUnit-TestH5Fparams.txt new file mode 100644 index 0000000..9d35220 --- /dev/null +++ b/java/test/testfiles/JUnit-TestH5Fparams.txt @@ -0,0 +1,17 @@ +JUnit version 4.11 +.testH5Fcreate_null +.testH5Fflush_local +.testH5Fget_info +.testH5Fmount_null +.testH5Fcreate +.testH5Fflush_global +.testH5Funmount_null +.testH5Fclose_negative +.testH5Fopen_null +.testH5Fis_hdf5_null +.testH5Fis_hdf5_text + +Time: XXXX + +OK (11 tests) + diff --git a/java/test/testfiles/JUnit-TestH5Fswmr.txt b/java/test/testfiles/JUnit-TestH5Fswmr.txt new file mode 100644 index 0000000..f943892 --- /dev/null +++ b/java/test/testfiles/JUnit-TestH5Fswmr.txt @@ -0,0 +1,8 @@ +JUnit version 4.11 +.testH5Fstart_swmr_write +.testH5Fswmr_read_attempts + +Time: XXXX + +OK (2 tests) + diff --git a/java/test/testfiles/JUnit-TestH5G.txt b/java/test/testfiles/JUnit-TestH5G.txt new file mode 100644 index 0000000..cbcea1d --- /dev/null +++ b/java/test/testfiles/JUnit-TestH5G.txt @@ -0,0 +1,17 @@ +JUnit version 4.11 +.testH5Gget_info_by_name +.testH5Gget_create_plist +.testH5Gopen +.testH5Gget_obj_info_all_gid2 +.testH5Gget_obj_info_all_byIndexType +.testH5Gget_obj_info_max_limit +.testH5Gget_obj_info_all +.testH5Gget_obj_info_max +.testH5Gget_obj_info_all_gid +.testH5Gget_info_by_idx +.testH5Gget_info + +Time: XXXX + +OK (11 tests) + diff --git a/java/test/testfiles/JUnit-TestH5Gbasic.txt b/java/test/testfiles/JUnit-TestH5Gbasic.txt new file mode 100644 index 0000000..3521696 --- /dev/null +++ b/java/test/testfiles/JUnit-TestH5Gbasic.txt @@ -0,0 +1,33 @@ +JUnit version 4.11 +.testH5Gget_info_by_name_not_exists +.testH5Gget_info_by_idx_not_exists +.testH5Gget_info_by_name +.testH5Gget_create_plist +.testH5Gopen +.testH5Gget_info_by_idx_null +.testH5Gopen_not_exists +.testH5Gclose +.testH5Gcreate_anon +.testH5Gcreate_null +.testH5Gget_info_by_idx_fileid +.testH5Gclose_invalid +.testH5Gflush_invalid +.testH5Gopen_invalid +.testH5Grefresh_invalid +.testH5Gget_info_invalid +.testH5Gcreate_invalid +.testH5Gcreate_exists +.testH5Gget_info_by_name_null +.testH5Gget_info_by_name_invalid +.testH5Gget_create_plist_invalid +.testH5Gcreate +.testH5Gget_info_by_name_fileid +.testH5Gget_info_by_idx_invalid +.testH5Gopen_null +.testH5Gget_info_by_idx +.testH5Gget_info + +Time: XXXX + +OK (27 tests) + diff --git a/java/test/testfiles/JUnit-TestH5Giterate.txt b/java/test/testfiles/JUnit-TestH5Giterate.txt new file mode 100644 index 0000000..38402af --- /dev/null +++ b/java/test/testfiles/JUnit-TestH5Giterate.txt @@ -0,0 +1,7 @@ +JUnit version 4.11 +.testH5Gget_obj_info_all + +Time: XXXX + +OK (1 test) + diff --git a/java/test/testfiles/JUnit-TestH5Lbasic.txt b/java/test/testfiles/JUnit-TestH5Lbasic.txt new file mode 100644 index 0000000..b9b580c --- /dev/null +++ b/java/test/testfiles/JUnit-TestH5Lbasic.txt @@ -0,0 +1,23 @@ +JUnit version 4.11 +.testH5Lget_info_by_idx_not_exist_name +.testH5Lget_name_by_idx_not_exist +.testH5Lvisit +.testH5Lget_name_by_idx_n0 +.testH5Lget_name_by_idx_n3 +.testH5Lvisit_by_name +.testH5Literate_by_name +.testH5Lget_info_hardlink +.testH5Literate +.testH5Lget_info_by_idx_n0 +.testH5Lget_info_by_idx_n3 +.testH5Lget_info_by_idx_name_not_exist_create +.testH5Lexists +.testH5Lget_info_by_idx_name_not_exist_name +.testH5Lget_info_by_idx_not_exist_create +.testH5Lget_info_not_exist +.testH5Lget_info_dataset + +Time: XXXX + +OK (17 tests) + diff --git a/java/test/testfiles/JUnit-TestH5Lcreate.txt b/java/test/testfiles/JUnit-TestH5Lcreate.txt new file mode 100644 index 0000000..cbd5d36 --- /dev/null +++ b/java/test/testfiles/JUnit-TestH5Lcreate.txt @@ -0,0 +1,42 @@ +JUnit version 4.11 +.testH5Lget_info_by_idx_n0_create +.testH5Ldelete_soft_link_dangle +.testH5Lget_value_by_idx_external_create +.testH5Ldelete_by_idx_not_exist_create +.testH5Lvisit_create +.testH5Lmove_dst_link_exists +.testH5Lcreate_soft_dangle +.testH5Literate_create +.testH5Lcopy_cur_not_exists +.testH5Lcopy +.testH5Lmove +.testH5Lget_value_by_idx_n2_create +.testH5Lget_value_soft +.testH5Ldelete_by_idx_n2_name +.testH5Lget_info_by_idx_n1_create +.testH5Lcreate_external +.testH5Lget_value_dangle +.testH5Lcreate_hard_dst_link_exists +.testH5Lget_value_by_idx_n2_name +.testH5Lcreate_soft_dst_link_exists +.testH5Lcreate_hard +.testH5Lcreate_soft +.testH5Lmove_cur_not_exists +.testH5Lcreate_hard_cur_not_exists +.testH5Lget_info_softlink_dangle +.testH5Ldelete_by_idx_n2_create +.testH5Ldelete_soft_link +.testH5Lget_info_externallink +.testH5Lcopy_dst_link_exists +.testH5Lget_value_by_idx_external_name +.testH5Ldelete_by_idx_not_exist_name +.testH5Lget_info_softlink +.testH5Lget_value_external +.testH5Lget_value_by_idx_not_exist_create +.testH5Lget_value_by_idx_not_exist_name +.testH5Ldelete_hard_link + +Time: XXXX + +OK (36 tests) + diff --git a/java/test/testfiles/JUnit-TestH5Lparams.txt b/java/test/testfiles/JUnit-TestH5Lparams.txt new file mode 100644 index 0000000..a22741c --- /dev/null +++ b/java/test/testfiles/JUnit-TestH5Lparams.txt @@ -0,0 +1,44 @@ +JUnit version 4.11 +.testH5Lcopy_invalid +.testH5Lget_value_by_idx_null +.testH5Lcreate_external_invalid +.testH5Lexists_null +.testH5Lget_info_invalid +.testH5Lget_name_by_idx_invalid +.testH5Lmove_null_current +.testH5Literate_by_name_nullname +.testH5Lvisit_by_name_nullname +.testH5Lvisit_null +.testH5Lget_name_by_idx_null +.testH5Lcreate_hard_null_dest +.testH5Lget_value_null +.testH5Lcreate_external_null_dest +.testH5Lcreate_external_null_file +.testH5Lcreate_external_null_current +.testH5Ldelete_null +.testH5Lexists_invalid +.testH5Lmove_invalid +.testH5Lcreate_hard_invalid +.testH5Lcopy_null_dest +.testH5Lcreate_soft_null_current +.testH5Lcopy_null_current +.testH5Lget_info_by_idx_null +.testH5Literate_null +.testH5Ldelete_invalid +.testH5Lvisit_by_name_null +.testH5Ldelete_by_idx_invalid +.testH5Lget_info_by_idx_invalid +.testH5Ldelete_by_idx_null +.testH5Lcreate_soft_invalid +.testH5Lcreate_hard_null_current +.testH5Lget_value_by_idx_invalid +.testH5Lmove_null_dest +.testH5Lget_info_null +.testH5Literate_by_name_null +.testH5Lcreate_soft_null_dest +.testH5Lget_value_invalid + +Time: XXXX + +OK (38 tests) + diff --git a/java/test/testfiles/JUnit-TestH5Obasic.txt b/java/test/testfiles/JUnit-TestH5Obasic.txt new file mode 100644 index 0000000..d015bdd --- /dev/null +++ b/java/test/testfiles/JUnit-TestH5Obasic.txt @@ -0,0 +1,29 @@ +JUnit version 4.11 +.testH5Oexists_by_name +.testH5Oget_info_by_idx_n0 +.testH5Oget_info_by_idx_n3 +.testH5Oget_info_by_name_not_exist_name +.testH5Ovisit_by_name +.testH5Oget_info_by_idx_name_not_exist_name +.testH5Oget_info_datatype +.testH5Oget_info_by_idx_not_exist_name +.testH5Oopen_by_idx_n0 +.testH5Oopen_by_idx_n3 +.testH5Oopen_not_exists +.testH5Ovisit +.testH5Oget_info_by_idx_not_exist_create +.testH5Oget_info_by_name_hardlink +.testH5Oget_info_by_name_group +.testH5Oopen_by_addr +.testH5Oget_info_by_name_not_exists +.testH5Oget_info_by_name_dataset +.testH5Oget_info_group +.testH5Oget_info_by_name_datatype +.testH5Oget_info_hardlink +.testH5Oget_info_by_idx_name_not_exist_create +.testH5Oget_info_dataset + +Time: XXXX + +OK (23 tests) + diff --git a/java/test/testfiles/JUnit-TestH5Ocopy.txt b/java/test/testfiles/JUnit-TestH5Ocopy.txt new file mode 100644 index 0000000..32dfde7 --- /dev/null +++ b/java/test/testfiles/JUnit-TestH5Ocopy.txt @@ -0,0 +1,9 @@ +JUnit version 4.11 +.testH5OcopyRefsDatasettosameFile +.testH5OcopyRefsDatasettodiffFile +.testH5OcopyRefsAttr + +Time: XXXX + +OK (3 tests) + diff --git a/java/test/testfiles/JUnit-TestH5Ocreate.txt b/java/test/testfiles/JUnit-TestH5Ocreate.txt new file mode 100644 index 0000000..c2365e5 --- /dev/null +++ b/java/test/testfiles/JUnit-TestH5Ocreate.txt @@ -0,0 +1,21 @@ +JUnit version 4.11 +.testH5Oget_info_by_idx_n0_create +.testH5Oget_info_softlink_dangle +.testH5Oget_info_softlink +.testH5Oget_info_externallink +.testH5Ocopy +.testH5Olink +.testH5Ocomment_by_name +.testH5Oget_info_by_idx_n1_create +.testH5Ocomment +.testH5Oinc_dec_count +.testH5Ocomment_by_name_clear +.testH5Ovisit_create +.testH5Ocopy_dst_link_exists +.testH5Ocomment_clear +.testH5Ocopy_cur_not_exists + +Time: XXXX + +OK (15 tests) + diff --git a/java/test/testfiles/JUnit-TestH5Oparams.txt b/java/test/testfiles/JUnit-TestH5Oparams.txt new file mode 100644 index 0000000..94220b9 --- /dev/null +++ b/java/test/testfiles/JUnit-TestH5Oparams.txt @@ -0,0 +1,30 @@ +JUnit version 4.11 +.testH5Oget_comment_by_name_null +.testH5Ovisit_by_name_nullname +.testH5Oget_info_invalid +.testH5Ovisit_by_name_null +.testH5Oget_comment_invalid +.testH5Oset_comment_by_name_invalid +.testH5Oopen_null +.testH5Oclose_invalid +.testH5Oflush_invalid +.testH5Oget_comment_by_name_invalid +.testH5Orefresh_invalid +.testH5Ocopy_null_dest +.testH5Olink_invalid +.testH5Oget_info_by_idx_invalid +.testH5Oget_info_by_idx_null +.testH5Olink_null_dest +.testH5Oget_info_by_name_invalid +.testH5Oget_info_by_name_null +.testH5Ocopy_invalid +.testH5Oset_comment_by_name_null +.testH5Ocopy_null_current +.testH5Oset_comment_invalid +.testH5Oopen_invalid +.testH5Ovisit_null + +Time: XXXX + +OK (24 tests) + diff --git a/java/test/testfiles/JUnit-TestH5P.txt b/java/test/testfiles/JUnit-TestH5P.txt new file mode 100644 index 0000000..c937ae2 --- /dev/null +++ b/java/test/testfiles/JUnit-TestH5P.txt @@ -0,0 +1,91 @@ +JUnit version 4.11 +.testH5Pset_nbit +.testH5Pset_shared_mesg_index_InvalidFlag +.testH5Pset_shared_mesg_phase_change +.testH5PH5Pset_shared_mesg_phase_change_HighMaxlistValue +.testH5P_layout +.testH5Pget_link_creation_order +.testH5Pget_efile_prefix +.testH5Pset_shared_mesg_nindexes_InvalidHIGHnindexes +.testH5P_file_space_page_size +.testH5Pget_shared_mesg_index_Invalid_indexnum +.testH5Pset_data_transform_NullExpression +.testH5Pset_elink_prefix_null +.testH5Pget_elink_prefix +.testH5Pget_nlinks +.testH5Pset_libver_bounds_invalidhigh +.testH5Pget_char_encoding +.testH5P_istore_k +.testH5Pget_link_phase_change +.testH5Pset_link_phase_change_max_compactLESSTHANmin_dense +.testH5Pget_shared_mesg_phase_change_EqualsSET +.testH5Pset_scaleoffset_Invalidscale_type +.testH5Pget_istore_k_null +.testH5Pset_libver_bounds_invalidlow +.testH5Pset_est_link_info +.testH5Pget_link_phase_change_Null +.testH5P_fill_time +.testH5Pget_userblock_null +.testH5Pset_link_creation_order_tracked +.testH5Pset_shared_mesg_index +.testH5Pset_copy_object +.testH5Pset_link_creation_order_trackedPLUSindexed +.testH5P_file_space_strategy +.testH5Pset_copy_object_invalidobject +.testH5Pset_est_link_info_InvalidValues +.testH5Pset_local_heap_size_hint +.testH5Pget_est_link_info +.testH5Pset_efile_prefix_null +.testH5Pset_scaleoffset +.testH5Pset_create_intermediate_group_invalidobject +.testH5PH5Pset_shared_mesg_phase_change_HighMinbtreeValue +.testH5Pset_create_intermediate_group +.testH5P_alloc_time +.testH5Pset_elink_acc_flags +.testH5Pset_link_phase_change_Highmax_Compact +.testH5P_chunk +.testH5P_sizes +.testH5Pset_link_creation_order_invalidvalue +.testH5P_sym_k +.testH5PH5Pset_shared_mesg_phase_change_MinbtreeGreaterThanMaxlist +.testH5Pget_version_null +.testH5Pset_scaleoffset_Invalidscale_factor +.testH5Pget_elink_prefix_null +.testH5Pget_data_transform_IllegalSize +.testH5Pget_create_intermediate_group +.testH5Pset_shared_mesg_nindexes +.testH5Pset_attr_creation_order_trackedPLUSindexed +.testH5Pget_sym_k_null +.testH5Pset_nlinks +.testH5P_obj_track_times +.testH5Pset_efile_prefix +.testH5P_userblock +.testH5Pget_local_heap_size_hint +.testH5Pset_shared_mesg_index_Invalid_indexnum +.testH5Pset_data_transform_InvalidExpression1 +.testH5Pset_data_transform_InvalidExpression2 +.testH5Pget_attr_phase_change +.testH5Pget_data_transform +.testH5Pget_create_intermediate_group_notcreated +.testH5Pset_elink_prefix +.testH5Pget_attr_creation_order +.testH5Pset_attr_creation_order_invalidvalue +.testH5Pget_shared_mesg_phase_change +.testH5Pget_shared_mesg_index +.testH5Pset_link_phase_change +.testH5Pget_shared_mesg_nindexes +.testH5Pget_version +.testH5Pset_elink_acc_flags_InvalidFlag1 +.testH5Pset_elink_acc_flags_InvalidFlag2 +.testH5Pget_link_phase_change_EqualsSet +.testH5Pget_elink_acc_flags +.testH5Pget_data_transform_ExpressionNotSet +.testH5P_fill_value +.testH5Pget_sizes_null +.testH5Pset_data_transform +.testH5Pset_attr_creation_order_tracked + +Time: XXXX + +OK (85 tests) + diff --git a/java/test/testfiles/JUnit-TestH5PData.txt b/java/test/testfiles/JUnit-TestH5PData.txt new file mode 100644 index 0000000..6356d69 --- /dev/null +++ b/java/test/testfiles/JUnit-TestH5PData.txt @@ -0,0 +1,8 @@ +JUnit version 4.11 +.testH5P_buffer +.testH5Pdata_transform + +Time: XXXX + +OK (2 tests) + diff --git a/java/test/testfiles/JUnit-TestH5PL.txt b/java/test/testfiles/JUnit-TestH5PL.txt new file mode 100644 index 0000000..fb78bb5 --- /dev/null +++ b/java/test/testfiles/JUnit-TestH5PL.txt @@ -0,0 +1,8 @@ +JUnit version 4.11 +.TestH5PLplugins +.TestH5PLpaths + +Time: XXXX + +OK (2 tests) + diff --git a/java/test/testfiles/JUnit-TestH5Pfapl.txt b/java/test/testfiles/JUnit-TestH5Pfapl.txt new file mode 100644 index 0000000..c4f37d0 --- /dev/null +++ b/java/test/testfiles/JUnit-TestH5Pfapl.txt @@ -0,0 +1,41 @@ +JUnit version 4.11 +.testH5P_elink_fapl +.testH5P_fapl_direct +.testH5P_alignment +.testH5P_fapl_family +.testH5P_chunk_cache +.testH5P_meta_block_size +.testH5Fmdc_logging +.testH5Pget_elink_fapl +.testH5Pset_mdc_config +.testH5P_small_data_block_size +.testH5Pset_fapl_log +.testH5P_evict_on_close +.testH5Pset_libver_bounds +.testH5P_sieve_buf_size +.testH5P_elink_file_cache_size +.testH5P_cache +.testH5Pget_mdc_config +.testH5P_fapl_muti_defaults +.testH5Pget_libver_bounds +.testH5P_btree_ratios +.testH5P_fapl_muti_nulls +.testH5Pset_fapl_sec2 +.testH5Pmulti_transform +.testH5Pset_elink_fapl_NegativeID +.testH5Pset_fapl_stdio +.testH5P_edc_check +.testH5Pset_elink_fapl +.testH5P_hyper_vector_size +.testH5P_gc_references +.testH5P_family_offset +.testH5P_fapl_core +.testH5P_fapl_muti +.testH5P_fapl_split +.testH5Pset_fapl_windows +.testH5P_fclose_degree + +Time: XXXX + +OK (35 tests) + diff --git a/java/test/testfiles/JUnit-TestH5Plist.txt b/java/test/testfiles/JUnit-TestH5Plist.txt new file mode 100644 index 0000000..ed9843a --- /dev/null +++ b/java/test/testfiles/JUnit-TestH5Plist.txt @@ -0,0 +1,10 @@ +JUnit version 4.11 +.testH5P_genprop_basic_class +.testH5P_genprop_class_iter +.testH5P_genprop_basic_class_prop +.testH5P_genprop_basic_list_prop + +Time: XXXX + +OK (4 tests) + diff --git a/java/test/testfiles/JUnit-TestH5Pvirtual.txt b/java/test/testfiles/JUnit-TestH5Pvirtual.txt new file mode 100644 index 0000000..e57f683 --- /dev/null +++ b/java/test/testfiles/JUnit-TestH5Pvirtual.txt @@ -0,0 +1,17 @@ +JUnit version 4.11 +.testH5Pget_source_datasetname +.testH5Pvirtual_storage +.testH5Pget_selection_source_dataset +.testH5Pget_virtual_prefix +.testH5Pget_source_filename +.testH5Pset_get_virtual_printf_gap +.testH5Pget_virtual_count +.testH5Pset_virtual_prefix +.testH5Pset_get_virtual_view +.testH5Pget_mapping_parameters +.testH5Pset_virtual_prefix_null + +Time: XXXX + +OK (11 tests) + diff --git a/java/test/testfiles/JUnit-TestH5R.txt b/java/test/testfiles/JUnit-TestH5R.txt new file mode 100644 index 0000000..150df54 --- /dev/null +++ b/java/test/testfiles/JUnit-TestH5R.txt @@ -0,0 +1,23 @@ +JUnit version 4.11 +.testH5Rgetregion_Nullreference +.testH5Rget_obj_type2_Invalidreftype +.testH5Rdereference +.testH5Rget_name +.testH5Rcreate_Invalidreftype +.testH5Rget_name_NULLreference +.testH5Rget_region +.testH5Rdereference_Nullreference +.testH5Rcreate_refobj +.testH5Rcreate_Invalidspace_id +.testH5Rdereference_Invalidreference +.testH5Rgetregion_Badreferencetype +.testH5Rcreate_regionrefobj +.testH5Rget_name_Invalidreftype +.testH5Rgetregion_Invalidreftype +.testH5Rget_obj_type2 +.testH5Rcreate_InvalidObjectName + +Time: XXXX + +OK (17 tests) + diff --git a/java/test/testfiles/JUnit-TestH5S.txt b/java/test/testfiles/JUnit-TestH5S.txt new file mode 100644 index 0000000..6bde487 --- /dev/null +++ b/java/test/testfiles/JUnit-TestH5S.txt @@ -0,0 +1,29 @@ +JUnit version 4.11 +.testH5Sget_select_npoints +.testH5Sget_select_type +.testH5Sset_extent_simple +.testH5Sget_select_hyper +.testH5Sget_select_valid +.testH5Sget_select_elem_pointlist +.testH5Sset_extent_none +.testH5Sencode_decode_scalar_dataspace +.testH5Soffset_simple +.testH5Scopy +.testH5Sget_simple_extent_ndims +.testH5Sextent_equal +.testH5Sget_simple_extent_dims +.testH5Sget_simple_extent_type +.testH5Shyper_regular +.testH5Sget_select_bounds +.testH5Sget_select_elem_pointlist_invalid +.testH5Sget_simple_extent_npoints +.testH5Sextent_copy +.testH5Sencode_decode_null_dataspace +.testH5Sis_simple +.testH5Sget_simple_extent_dims_null +.testH5Sselect_none + +Time: XXXX + +OK (23 tests) + diff --git a/java/test/testfiles/JUnit-TestH5Sbasic.txt b/java/test/testfiles/JUnit-TestH5Sbasic.txt new file mode 100644 index 0000000..707878e --- /dev/null +++ b/java/test/testfiles/JUnit-TestH5Sbasic.txt @@ -0,0 +1,22 @@ +JUnit version 4.11 +.testH5Sclose_invalid +.testH5Screate_simple_max_default +.testH5Screate_simple_dims_null +.testH5Sdecode_null +.testH5Screate_simple_dims_exceed +.testH5Screate_simple_unlimted_1d +.testH5Screate_simple_dims_invalid +.testH5Screate_scalar +.testH5Screate_simple +.testH5Screate_simple_rank_invalid +.testH5Sget_simple_extent_type_invalid +.testH5Sencode_invalid +.testH5Screate_null +.testH5Screate_simple_extent +.testH5Screate_invalid +.testH5Screate_simple_unlimted + +Time: XXXX + +OK (16 tests) + diff --git a/java/test/testfiles/JUnit-TestH5T.txt b/java/test/testfiles/JUnit-TestH5T.txt new file mode 100644 index 0000000..446adcb --- /dev/null +++ b/java/test/testfiles/JUnit-TestH5T.txt @@ -0,0 +1,19 @@ +JUnit version 4.11 +.testH5Tvlen_create +.testH5Tenum_create_functions +.testH5Tenum_functions +.testH5Tget_class +.testH5Tget_array_ndims +.testH5Tequal_type_error +.testH5Tget_array_dims +.testH5Tset_size +.testH5Tis_variable_str +.testH5Tcompound_functions +.testH5Tget_size +.testH5Tarray_create +.testH5Topaque_functions + +Time: XXXX + +OK (13 tests) + diff --git a/java/test/testfiles/JUnit-TestH5Tbasic.txt b/java/test/testfiles/JUnit-TestH5Tbasic.txt new file mode 100644 index 0000000..131c4f5 --- /dev/null +++ b/java/test/testfiles/JUnit-TestH5Tbasic.txt @@ -0,0 +1,11 @@ +JUnit version 4.11 +.testH5Tequal_not +.testH5Tcopy +.testH5Tequal +.testH5Torder_size +.testH5Tconvert + +Time: XXXX + +OK (5 tests) + diff --git a/java/test/testfiles/JUnit-TestH5Tparams.txt b/java/test/testfiles/JUnit-TestH5Tparams.txt new file mode 100644 index 0000000..e61f1e4 --- /dev/null +++ b/java/test/testfiles/JUnit-TestH5Tparams.txt @@ -0,0 +1,76 @@ +JUnit version 4.11 +.testH5Tget_member_type_invalid +.testH5Tenum_insert_null +.testH5Tget_offset_invalid +.testH5Tset_precision_invalid +.testH5Tget_inpad_invalid +.testH5Tenum_nameof_invalid +.testH5Tget_member_value_invalid +.testH5Tenum_nameof_value_null +.testH5Tcreate_invalid +.testH5Tget_strpad_invalid +.testH5Tenum_valueof_invalid +.testH5Tget_fields_null +.testH5Topen_null +.testH5Tpack_invalid +.testH5Tcommit_null +.testH5Tinsert_invalid +.testH5Tenum_valueof_null +.testH5Tset_norm_invalid +.testH5Tlock_invalid +.testH5Tarray_create_invalid +.testH5Tget_member_value_null +.testH5Tset_offset_invalid +.testH5Tget_fields_invalid +.testH5Tequal_invalid +.testH5Tget_ebias_long_invalid +.testH5Tget_cset_invalid +.testH5Tget_size_invalid +.testH5Tset_strpad_invalid +.testH5Tset_ebias_invalid +.testH5Tget_sign_invalid +.testH5Tget_member_index_invalid +.testH5Tget_precision_invalid +.testH5Tset_fields_invalid +.testH5Tcopy_invalid +.testH5Tget_pad_invalid +.testH5Tset_order_invalid +.testH5Tget_member_class_invalid +.testH5Tget_super_invalid +.testH5Tget_class_invalid +.testH5Topen_invalid +.testH5Tget_precision_long_invalid +.testH5Tget_ebias_invalid +.testH5Tget_native_type_invalid +.testH5Tget_fields_length_invalid +.testH5Tget_norm_invalid +.testH5Tenum_nameof_invalid_size +.testH5Tset_pad_invalid +.testH5Tget_pad_null +.testH5Tset_tag_null +.testH5Tget_order_invalid +.testH5Tcommit_invalid +.testH5Tget_array_ndims_invalid +.testH5Tset_tag_invalid +.testH5Tvlen_create_invalid +.testH5Tenum_create_invalid +.testH5Tinsert_null +.testH5Tset_inpad_invalid +.testH5Tenum_valueof_name_null +.testH5Tset_cset_invalid +.testH5Tclose_invalid +.testH5Tget_nmembers_invalid +.testH5Tarray_create_value_null +.testH5Tset_size_invalid +.testH5Tflush_invalid +.testH5Tenum_insert_invalid +.testH5Tget_array_dims_null +.testH5Tget_member_index_null +.testH5Trefresh_invalid +.testH5Tset_sign_invalid +.testH5Tenum_insert_name_null + +Time: XXXX + +OK (70 tests) + diff --git a/java/test/testfiles/JUnit-TestH5Z.txt b/java/test/testfiles/JUnit-TestH5Z.txt new file mode 100644 index 0000000..63fc227 --- /dev/null +++ b/java/test/testfiles/JUnit-TestH5Z.txt @@ -0,0 +1,9 @@ +JUnit version 4.11 +.testH5Zfilter_avail +.testH5Zunregister_predefined +.testH5Zget_filter_info + +Time: XXXX + +OK (3 tests) + diff --git a/release_docs/RELEASE.txt b/release_docs/RELEASE.txt index 1f12fd8..3abac10 100644 --- a/release_docs/RELEASE.txt +++ b/release_docs/RELEASE.txt @@ -114,7 +114,29 @@ Bug Fixes since HDF5-1.10.2 release Configuration ------------- - - + Reworked java test suite into individual JUnit tests. + + Testing the whole suite of java unit tests in a single JUnit run + made it difficult to determine actual failures when tests would fail. + Running each file set of tests individually, allows individual failures + to be diagnosed easier. A side benefit is that tests for optional components + of the library can be disabled if not configured. + + (ADB 2018/05/16, HDFFV-9739) + + - Converted CMake global commands ADD_DEFINITIONS and INCLUDE_DIRECTORIES + to use target_* type commands. This change modernizes the CMake usage + in the HDF5 library. + + In addition, there is the intention to convert to generator expressions, + where possible. The exception is Fortran FLAGS on Windows Visual Studio. + The HDF macros TARGET_C_PROPERTIES and TARGET_FORTRAN_PROPERTIES have + been removed with this change in usage. + + The additional language (C++ and Fortran) checks have also been localized + to only be checked when that language is enabled. + + (ADB 2018/05/08) Performance ------------- diff --git a/release_docs/USING_HDF5_CMake.txt b/release_docs/USING_HDF5_CMake.txt index 169a06f..7d9a585 100644 --- a/release_docs/USING_HDF5_CMake.txt +++ b/release_docs/USING_HDF5_CMake.txt @@ -188,13 +188,13 @@ string(TOLOWER ${LIB_TYPE} SEARCH_TYPE) find_package (HDF5 NAMES hdf5 COMPONENTS C ${SEARCH_TYPE}) # find_package (HDF5) # Find non-cmake built HDF5 -INCLUDE_DIRECTORIES (${HDF5_INCLUDE_DIR}) +set_directory_properties(PROPERTIES INCLUDE_DIRECTORIES "${HDF5_INCLUDE_DIR}") set (LINK_LIBS ${LINK_LIBS} ${HDF5_C_${LIB_TYPE}_LIBRARY}) set (example hdf_example) add_executable (${example} ${PROJECT_SOURCE_DIR}/${example}.c) -TARGET_C_PROPERTIES (${example} ${LIB_TYPE} " " " ") +TARGET_C_PROPERTIES (${example} PRIVATE ${LIB_TYPE}) target_link_libraries (${example} ${LINK_LIBS}) enable_testing () diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 52d86d0..4b40ee6 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -1,10 +1,5 @@ cmake_minimum_required (VERSION 3.10) -PROJECT (HDF5_SRC C CXX) - -#----------------------------------------------------------------------------- -# Apply Definitions to compiler in this directory and below -#----------------------------------------------------------------------------- -add_definitions (${HDF_EXTRA_C_FLAGS}) +project (HDF5_SRC C) #----------------------------------------------------------------------------- # List Source Files @@ -844,17 +839,17 @@ if (HDF5_GENERATE_HEADERS) endif () #----------------------------------------------------------------------------- -# Setup the H5Detect utility which generates H5Tinit with platform +# Setup the H5detect utility which generates H5Tinit with platform # specific type checks inside #----------------------------------------------------------------------------- add_executable (H5detect ${HDF5_SRC_DIR}/H5detect.c) -TARGET_C_PROPERTIES (H5detect STATIC " " " ") -if (MSVC OR MINGW) - target_link_libraries (H5detect "ws2_32.lib") -endif () -if (CMAKE_SYSTEM_NAME STREQUAL "Emscripten") - set_property(TARGET H5detect PROPERTY LINK_FLAGS "-O0") -endif () +target_include_directories(H5detect PRIVATE "${HDF5_BINARY_DIR};$<$:${MPI_C_INCLUDE_DIRS}>") +target_compile_definitions(H5detect PUBLIC ${HDF_EXTRA_C_FLAGS} ${HDF_EXTRA_FLAGS}) +TARGET_C_PROPERTIES (H5detect STATIC) +target_link_libraries (H5detect + PRIVATE $<$:${MPI_C_LIBRARIES}> $<$:ws2_32.lib> + INTERFACE $<$:"-O0"> +) add_custom_command ( OUTPUT ${HDF5_BINARY_DIR}/H5Tinit.c @@ -864,13 +859,13 @@ add_custom_command ( ) add_executable (H5make_libsettings ${HDF5_SRC_DIR}/H5make_libsettings.c) -TARGET_C_PROPERTIES (H5make_libsettings STATIC " " " ") -if (MSVC OR MINGW) - target_link_libraries (H5make_libsettings "ws2_32.lib") -endif () -if (CMAKE_SYSTEM_NAME STREQUAL "Emscripten") - set_property(TARGET H5make_libsettings PROPERTY LINK_FLAGS "-O0") -endif () +target_include_directories(H5make_libsettings PRIVATE "${HDF5_BINARY_DIR};$<$:${MPI_C_INCLUDE_DIRS}>") +target_compile_definitions(H5make_libsettings PUBLIC ${HDF_EXTRA_C_FLAGS} ${HDF_EXTRA_FLAGS}) +TARGET_C_PROPERTIES (H5make_libsettings STATIC) +target_link_libraries (H5make_libsettings + PRIVATE $<$:${MPI_C_LIBRARIES}> $<$:ws2_32.lib> + INTERFACE $<$:"-O0"> +) add_custom_command ( OUTPUT ${HDF5_BINARY_DIR}/H5lib_settings.c @@ -880,31 +875,38 @@ add_custom_command ( WORKING_DIRECTORY ${HDF5_BINARY_DIR} ) +## all_packages="AC,B,B2,D,F,FA,FL,FS,HL,I,O,S,ST,T,Z" +#all_packages="AC,B2,D,F,HL,I,O,S,ST,T,Z" +option (HDF5_ENABLE_DEBUG_APIS "Turn on extra debug output in all packages" OFF) + #----------------------------------------------------------------------------- -# Add H5Tinit source to build - generated by H5Detect/CMake at configure time +# Add H5Tinit source to build - generated by H5detect/CMake at configure time #----------------------------------------------------------------------------- set (gen_SRCS ${HDF5_BINARY_DIR}/H5Tinit.c ${HDF5_BINARY_DIR}/H5lib_settings.c) add_library (${HDF5_LIB_TARGET} STATIC ${common_SRCS} ${gen_SRCS} ${H5_PUBLIC_HEADERS} ${H5_PRIVATE_HEADERS} ${H5_GENERATED_HEADERS}) -TARGET_C_PROPERTIES (${HDF5_LIB_TARGET} STATIC " " " ") -target_link_libraries (${HDF5_LIB_TARGET} PRIVATE ${LINK_LIBS} ${LINK_COMP_LIBS}) -if (NOT WIN32) - target_link_libraries (${HDF5_LIB_TARGET} PUBLIC ${CMAKE_DL_LIBS}) -endif () +target_include_directories(${HDF5_LIB_TARGET} + PRIVATE "${HDF5_SRC_DIR};${HDF5_BINARY_DIR};$<$:${MPI_C_INCLUDE_DIRS}>" + INTERFACE "$/include>" +) +target_compile_definitions(${HDF5_LIB_TARGET} + PUBLIC + ${HDF_EXTRA_C_FLAGS} + ${HDF_EXTRA_FLAGS} + $,DEBUG,NDEBUG> + PRIVATE + $<$:H5_DEBUG_API> # Enable tracing of the API + $<$:H5Z_DEBUG;H5T_DEBUG;H5ST_DEBUG;H5S_DEBUG;H5O_DEBUG;H5I_DEBUG;H5HL_DEBUG;H5F_DEBUG;H5D_DEBUG;H5B2_DEBUG;H5AC_DEBUG> +) +TARGET_C_PROPERTIES (${HDF5_LIB_TARGET} STATIC) +target_link_libraries (${HDF5_LIB_TARGET} + PRIVATE ${LINK_LIBS} ${LINK_COMP_LIBS} $<$:${MPI_C_LIBRARIES}> + PUBLIC $<$>:${CMAKE_DL_LIBS}> +) set_global_variable (HDF5_LIBRARIES_TO_EXPORT ${HDF5_LIB_TARGET}) H5_SET_LIB_OPTIONS (${HDF5_LIB_TARGET} ${HDF5_LIB_NAME} STATIC 0) -set_target_properties (${HDF5_LIB_TARGET} PROPERTIES - FOLDER libraries - INTERFACE_INCLUDE_DIRECTORIES "$/include>" -) +set_target_properties (${HDF5_LIB_TARGET} PROPERTIES FOLDER libraries) -option (HDF5_ENABLE_DEBUG_APIS "Turn on extra debug output in all packages" OFF) -if (HDF5_ENABLE_DEBUG_APIS) - set_target_properties (${HDF5_LIB_TARGET} PROPERTIES - COMPILE_DEFINITIONS - "H5Z_DEBUG;H5T_DEBUG;H5ST_DEBUG;H5S_DEBUG;H5O_DEBUG;H5I_DEBUG;H5HL_DEBUG;H5F_DEBUG;H5D_DEBUG;H5B2_DEBUG;H5AC_DEBUG" - ) -endif () set (install_targets ${HDF5_LIB_TARGET}) if (BUILD_SHARED_LIBS) @@ -925,33 +927,30 @@ if (BUILD_SHARED_LIBS) ) set (shared_gen_SRCS ${HDF5_BINARY_DIR}/shared/H5Tinit.c ${HDF5_BINARY_DIR}/shared/H5lib_settings.c) add_library (${HDF5_LIBSH_TARGET} SHARED ${common_SRCS} ${shared_gen_SRCS} ${H5_PUBLIC_HEADERS} ${H5_PRIVATE_HEADERS} ${H5_GENERATED_HEADERS}) - TARGET_C_PROPERTIES (${HDF5_LIBSH_TARGET} SHARED " " " ") - target_link_libraries (${HDF5_LIBSH_TARGET} PRIVATE ${LINK_LIBS} ${LINK_COMP_LIBS}) - if (NOT WIN32) - target_link_libraries (${HDF5_LIBSH_TARGET} PUBLIC ${CMAKE_DL_LIBS}) - endif () + target_include_directories(${HDF5_LIBSH_TARGET} + PRIVATE "${HDF5_SRC_DIR};${HDF5_BINARY_DIR};$<$:${MPI_C_INCLUDE_DIRS}>" + INTERFACE "$/include>" + ) + target_compile_definitions(${HDF5_LIBSH_TARGET} + PUBLIC + "H5_BUILT_AS_DYNAMIC_LIB" + ${HDF_EXTRA_C_FLAGS} + ${HDF_EXTRA_FLAGS} + $,DEBUG,NDEBUG> + PRIVATE + $<$:H5_HAVE_THREADSAFE> + $<$:H5_DEBUG_API> # Enable tracing of the API + $<$:H5Z_DEBUG;H5T_DEBUG;H5ST_DEBUG;H5S_DEBUG;H5O_DEBUG;H5I_DEBUG;H5HL_DEBUG;H5F_DEBUG;H5D_DEBUG;H5B2_DEBUG;H5AC_DEBUG> + ) + TARGET_C_PROPERTIES (${HDF5_LIBSH_TARGET} SHARED) + target_link_libraries (${HDF5_LIBSH_TARGET} + PRIVATE ${LINK_LIBS} ${LINK_COMP_LIBS} $<$:${MPI_C_LIBRARIES}> + PUBLIC $<$>:${CMAKE_DL_LIBS}> $<$:Threads::Threads> + ) set_global_variable (HDF5_LIBRARIES_TO_EXPORT "${HDF5_LIBRARIES_TO_EXPORT};${HDF5_LIBSH_TARGET}") H5_SET_LIB_OPTIONS (${HDF5_LIBSH_TARGET} ${HDF5_LIB_NAME} SHARED "LIB") - set_target_properties (${HDF5_LIBSH_TARGET} PROPERTIES - FOLDER libraries - COMPILE_DEFINITIONS "H5_BUILT_AS_DYNAMIC_LIB" - INTERFACE_INCLUDE_DIRECTORIES "$/include>" - INTERFACE_COMPILE_DEFINITIONS H5_BUILT_AS_DYNAMIC_LIB=1 - ) - if (HDF5_ENABLE_THREADSAFE) - set_property (TARGET ${HDF5_LIBSH_TARGET} - APPEND PROPERTY COMPILE_DEFINITIONS - "H5_HAVE_THREADSAFE" - ) - target_link_libraries (${HDF5_LIBSH_TARGET} PUBLIC Threads::Threads) - endif () + set_target_properties (${HDF5_LIBSH_TARGET} PROPERTIES FOLDER libraries) - if (HDF5_ENABLE_DEBUG_APIS) - set_property (TARGET ${HDF5_LIBSH_TARGET} - APPEND PROPERTY COMPILE_DEFINITIONS - "H5Z_DEBUG;H5T_DEBUG;H5ST_DEBUG;H5S_DEBUG;H5O_DEBUG;H5I_DEBUG;H5HL_DEBUG;H5F_DEBUG;H5D_DEBUG;H5B2_DEBUG;H5AC_DEBUG" - ) - endif () set (install_targets ${install_targets} ${HDF5_LIBSH_TARGET}) endif () @@ -963,6 +962,7 @@ if (NOT HDF5_INSTALL_NO_DEVELOPMENT) FILES ${H5_PUBLIC_HEADERS} ${H5_GENERATED_HEADERS} + ${HDF5_BINARY_DIR}/H5pubconf.h DESTINATION ${HDF5_INSTALL_INCLUDE_DIR} COMPONENT diff --git a/src/H5detect.c b/src/H5detect.c index ff163cf..1c5554e 100644 --- a/src/H5detect.c +++ b/src/H5detect.c @@ -1360,8 +1360,8 @@ bit.\n"; * *------------------------------------------------------------------------- */ -static void -detect_C89_integers(void) HDF_NO_UBSAN +static void HDF_NO_UBSAN +detect_C89_integers(void) { DETECT_BYTE(signed char, SCHAR, d_g[nd_g]); nd_g++; DETECT_BYTE(unsigned char, UCHAR, d_g[nd_g]); nd_g++; @@ -1388,8 +1388,8 @@ detect_C89_integers(void) HDF_NO_UBSAN * *------------------------------------------------------------------------- */ -static void -detect_C89_floats(void) HDF_NO_UBSAN +static void HDF_NO_UBSAN +detect_C89_floats(void) { DETECT_F(float, FLOAT, d_g[nd_g]); nd_g++; DETECT_F(double, DOUBLE, d_g[nd_g]); nd_g++; @@ -1410,8 +1410,8 @@ detect_C89_floats(void) HDF_NO_UBSAN * *------------------------------------------------------------------------- */ -static void -detect_C99_integers8(void) HDF_NO_UBSAN +static void HDF_NO_UBSAN +detect_C99_integers8(void) { #if H5_SIZEOF_INT8_T>0 #if H5_SIZEOF_INT8_T==1 @@ -1472,8 +1472,8 @@ detect_C99_integers8(void) HDF_NO_UBSAN * *------------------------------------------------------------------------- */ -static void -detect_C99_integers16(void) HDF_NO_UBSAN +static void HDF_NO_UBSAN +detect_C99_integers16(void) { #if H5_SIZEOF_INT16_T>0 DETECT_I(int16_t, INT16, d_g[nd_g]); nd_g++; @@ -1510,8 +1510,8 @@ detect_C99_integers16(void) HDF_NO_UBSAN * *------------------------------------------------------------------------- */ -static void -detect_C99_integers32(void) HDF_NO_UBSAN +static void HDF_NO_UBSAN +detect_C99_integers32(void) { #if H5_SIZEOF_INT32_T>0 DETECT_I(int32_t, INT32, d_g[nd_g]); nd_g++; @@ -1548,8 +1548,8 @@ detect_C99_integers32(void) HDF_NO_UBSAN * *------------------------------------------------------------------------- */ -static void -detect_C99_integers64(void) HDF_NO_UBSAN +static void HDF_NO_UBSAN +detect_C99_integers64(void) { #if H5_SIZEOF_INT64_T>0 DETECT_I(int64_t, INT64, d_g[nd_g]); nd_g++; @@ -1599,8 +1599,8 @@ detect_C99_integers64(void) HDF_NO_UBSAN * *------------------------------------------------------------------------- */ -static void -detect_C99_integers(void) HDF_NO_UBSAN +static void HDF_NO_UBSAN +detect_C99_integers(void) { /* break it down to more subroutines so that each module subroutine */ /* is smaller and takes less time to compile with optimization on. */ @@ -1625,8 +1625,8 @@ detect_C99_integers(void) HDF_NO_UBSAN * *------------------------------------------------------------------------- */ -static void -detect_C99_floats(void) HDF_NO_UBSAN +static void HDF_NO_UBSAN +detect_C99_floats(void) { #if H5_SIZEOF_DOUBLE == H5_SIZEOF_LONG_DOUBLE /* @@ -1656,8 +1656,8 @@ detect_C99_floats(void) HDF_NO_UBSAN * *------------------------------------------------------------------------- */ -static void -detect_alignments(void) HDF_NO_UBSAN +static void HDF_NO_UBSAN +detect_alignments(void) { /* Detect structure alignment for pointers, hvl_t, hobj_ref_t, hdset_reg_ref_t */ DETECT_M(void *, POINTER, m_g[na_g]); na_g++; @@ -1744,8 +1744,8 @@ static int verify_signal_handlers(int signum, void (*handler)(int)) * *------------------------------------------------------------------------- */ -int -main(void) HDF_NO_UBSAN +int HDF_NO_UBSAN +main(void) { #if defined(H5_HAVE_SETSYSINFO) && defined(SSI_NVPAIRS) diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index ec560f2..1ab7b5a 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -1,17 +1,11 @@ cmake_minimum_required (VERSION 3.10) -PROJECT (HDF5_TEST) - -#----------------------------------------------------------------------------- -# Apply Definitions to compiler in this directory and below -#----------------------------------------------------------------------------- -add_definitions (${HDF_EXTRA_C_FLAGS}) +project (HDF5_TEST C) #----------------------------------------------------------------------------- # Generate the H5srcdir_str.h file containing user settings needed by compilation #----------------------------------------------------------------------------- -set (srcdir ${CMAKE_CURRENT_SOURCE_DIR}) +set (srcdir ${HDF5_TEST_SOURCE_DIR}) configure_file (${HDF5_TEST_SOURCE_DIR}/H5srcdir_str.h.in H5srcdir_str.h @ONLY) -INCLUDE_DIRECTORIES (${CMAKE_CURRENT_BINARY_DIR}) ################################################################################# # Define Test Library Sources @@ -30,45 +24,39 @@ set (TEST_LIB_HEADERS ) add_library (${HDF5_TEST_LIB_TARGET} STATIC ${TEST_LIB_SOURCES} ${TEST_LIB_HEADERS}) -TARGET_C_PROPERTIES (${HDF5_TEST_LIB_TARGET} STATIC " " " ") -if (MSVC) - target_link_libraries (${HDF5_TEST_LIB_TARGET} PRIVATE "ws2_32.lib") -endif () +target_include_directories(${HDF5_TEST_LIB_TARGET} + PRIVATE "${HDF5_SRC_DIR};${HDF5_BINARY_DIR};${HDF5_TEST_BINARY_DIR};$<$:${MPI_C_INCLUDE_DIRS}>" + INTERFACE "$/include>" +) +TARGET_C_PROPERTIES (${HDF5_TEST_LIB_TARGET} STATIC) +target_link_libraries (${HDF5_TEST_LIB_TARGET} + PUBLIC ${LINK_LIBS} ${HDF5_LIB_TARGET} + PRIVATE $<$:ws2_32.lib> +) if (MINGW) target_link_libraries (${HDF5_TEST_LIB_TARGET} PRIVATE "wsock32.lib") endif () -target_link_libraries (${HDF5_TEST_LIB_TARGET} PUBLIC ${LINK_LIBS}) -target_link_libraries (${HDF5_TEST_LIB_TARGET} PUBLIC ${HDF5_LIB_TARGET}) H5_SET_LIB_OPTIONS (${HDF5_TEST_LIB_TARGET} ${HDF5_TEST_LIB_NAME} STATIC 0) -set_target_properties (${HDF5_TEST_LIB_TARGET} PROPERTIES - FOLDER libraries/test - INTERFACE_INCLUDE_DIRECTORIES "$/include>" -) if (BUILD_SHARED_LIBS) add_library (${HDF5_TEST_LIBSH_TARGET} SHARED ${TEST_LIB_SOURCES} ${TEST_LIB_HEADERS}) - TARGET_C_PROPERTIES (${HDF5_TEST_LIBSH_TARGET} SHARED " " " ") - if (MSVC) - target_link_libraries (${HDF5_TEST_LIBSH_TARGET} PRIVATE "ws2_32.lib") - endif () + target_include_directories(${HDF5_TEST_LIBSH_TARGET} + PRIVATE "${HDF5_SRC_DIR};${HDF5_BINARY_DIR};${HDF5_TEST_BINARY_DIR};$<$:${MPI_C_INCLUDE_DIRS}>" + INTERFACE "$/include>" + ) + target_compile_definitions(${HDF5_TEST_LIBSH_TARGET} + PUBLIC "H5_BUILT_AS_DYNAMIC_LIB" $<$:H5_HAVE_THREADSAFE> + ) + TARGET_C_PROPERTIES (${HDF5_TEST_LIBSH_TARGET} SHARED) + target_link_libraries (${HDF5_TEST_LIBSH_TARGET} + PUBLIC ${LINK_LIBS} ${HDF5_LIBSH_TARGET} + PRIVATE $<$:ws2_32.lib> + ) if (MINGW) target_link_libraries (${HDF5_TEST_LIBSH_TARGET} PRIVATE "wsock32.lib") endif () - target_link_libraries (${HDF5_TEST_LIBSH_TARGET} PUBLIC ${LINK_LIBS}) - target_link_libraries (${HDF5_TEST_LIBSH_TARGET} PUBLIC ${HDF5_LIBSH_TARGET}) H5_SET_LIB_OPTIONS (${HDF5_TEST_LIBSH_TARGET} ${HDF5_TEST_LIB_NAME} SHARED "LIB") - set_target_properties (${HDF5_TEST_LIBSH_TARGET} PROPERTIES - FOLDER libraries/test - COMPILE_DEFINITIONS "H5_BUILT_AS_DYNAMIC_LIB" - INTERFACE_INCLUDE_DIRECTORIES "$/include>" - INTERFACE_COMPILE_DEFINITIONS H5_BUILT_AS_DYNAMIC_LIB=1 - ) - if (HDF5_ENABLE_THREADSAFE) - set_property (TARGET ${HDF5_TEST_LIBSH_TARGET} - APPEND PROPERTY COMPILE_DEFINITIONS - "H5_HAVE_THREADSAFE" - ) - endif () + set_target_properties (${HDF5_TEST_LIBSH_TARGET} PROPERTIES FOLDER libraries/test) endif () ################################################################################# @@ -94,11 +82,10 @@ endif () set (HDF5_TEST_PLUGIN_CORENAME "${plugin_name}") set (HDF5_TEST_PLUGIN_NAME "${HDF5_EXTERNAL_LIB_PREFIX}${HDF5_TEST_PLUGIN_CORENAME}") set (HDF5_TEST_PLUGIN_TARGET ${HDF5_TEST_PLUGIN_CORENAME}) - add_definitions (${HDF_EXTRA_C_FLAGS}) - INCLUDE_DIRECTORIES (${HDF5_SRC_DIR}) add_library (${HDF5_TEST_PLUGIN_TARGET} SHARED ${HDF5_TEST_SOURCE_DIR}/${plugin_name}.c) - TARGET_C_PROPERTIES (${HDF5_TEST_PLUGIN_TARGET} SHARED " " " ") + target_include_directories(${HDF5_TEST_PLUGIN_TARGET} PRIVATE "${HDF5_SRC_DIR};${HDF5_BINARY_DIR};$<$:${MPI_C_INCLUDE_DIRS}>") + TARGET_C_PROPERTIES (${HDF5_TEST_PLUGIN_TARGET} SHARED) target_link_libraries (${HDF5_TEST_PLUGIN_TARGET} PUBLIC ${HDF5_TEST_LIB_TARGET}) H5_SET_LIB_OPTIONS (${HDF5_TEST_PLUGIN_TARGET} ${HDF5_TEST_PLUGIN_NAME} SHARED "LIB") set_target_properties (${HDF5_TEST_PLUGIN_TARGET} PROPERTIES FOLDER libraries/TEST_PLUGIN) @@ -120,11 +107,10 @@ endif () set (HDF5_TEST_PLUGIN_CORENAME "${plugin_name}") set (HDF5_TEST_PLUGIN_NAME "${HDF5_EXTERNAL_LIB_PREFIX}${HDF5_TEST_PLUGIN_CORENAME}") set (HDF5_TEST_PLUGIN_TARGET ${HDF5_TEST_PLUGIN_CORENAME}) - add_definitions (${HDF_EXTRA_C_FLAGS}) - INCLUDE_DIRECTORIES (${HDF5_SRC_DIR}) add_library (${HDF5_TEST_PLUGIN_TARGET} SHARED ${HDF5_TEST_SOURCE_DIR}/${plugin_name}.c) - TARGET_C_PROPERTIES (${HDF5_TEST_PLUGIN_TARGET} SHARED " " " ") + target_include_directories(${HDF5_TEST_PLUGIN_TARGET} PRIVATE "${HDF5_SRC_DIR};${HDF5_BINARY_DIR};$<$:${MPI_C_INCLUDE_DIRS}>") + TARGET_C_PROPERTIES (${HDF5_TEST_PLUGIN_TARGET} SHARED) target_link_libraries (${HDF5_TEST_PLUGIN_TARGET} PUBLIC ${HDF5_TEST_LIB_TARGET}) H5_SET_LIB_OPTIONS (${HDF5_TEST_PLUGIN_TARGET} ${HDF5_TEST_PLUGIN_NAME} SHARED "LIB") set_target_properties (${HDF5_TEST_PLUGIN_TARGET} PROPERTIES FOLDER libraries/TEST_PLUGIN) @@ -251,13 +237,15 @@ set (H5_TESTS macro (ADD_H5_EXE file) add_executable (${file} ${HDF5_TEST_SOURCE_DIR}/${file}.c) - TARGET_C_PROPERTIES (${file} STATIC " " " ") - target_link_libraries (${file} PUBLIC ${HDF5_TEST_LIB_TARGET}) + target_include_directories(${file} PRIVATE "${HDF5_SRC_DIR};${HDF5_BINARY_DIR};${HDF5_TEST_BINARY_DIR};$<$:${MPI_C_INCLUDE_DIRS}>") + TARGET_C_PROPERTIES (${file} STATIC) + target_link_libraries (${file} PRIVATE ${HDF5_TEST_LIB_TARGET}) set_target_properties (${file} PROPERTIES FOLDER test) if (BUILD_SHARED_LIBS) add_executable (${file}-shared ${HDF5_TEST_SOURCE_DIR}/${file}.c) - TARGET_C_PROPERTIES (${file}-shared SHARED " " " ") - target_link_libraries (${file}-shared PUBLIC ${HDF5_TEST_LIBSH_TARGET}) + target_include_directories(${file}-shared PRIVATE "${HDF5_SRC_DIR};${HDF5_BINARY_DIR};${HDF5_TEST_BINARY_DIR};$<$:${MPI_C_INCLUDE_DIRS}>") + TARGET_C_PROPERTIES (${file}-shared SHARED) + target_link_libraries (${file}-shared PRIVATE ${HDF5_TEST_LIBSH_TARGET}) set_target_properties (${file}-shared PROPERTIES FOLDER test) endif () endmacro () @@ -280,44 +268,44 @@ endforeach () #-- Adding test for testhdf5 add_executable (testhdf5 ${testhdf5_SOURCES}) -TARGET_C_PROPERTIES (testhdf5 STATIC " " " ") -target_link_libraries (testhdf5 ${HDF5_TEST_LIB_TARGET}) +target_include_directories(testhdf5 PRIVATE "${HDF5_SRC_DIR};${HDF5_BINARY_DIR};$<$:${MPI_C_INCLUDE_DIRS}>") +TARGET_C_PROPERTIES (testhdf5 STATIC) +target_link_libraries (testhdf5 PRIVATE ${HDF5_TEST_LIB_TARGET}) set_target_properties (testhdf5 PROPERTIES FOLDER test) if (BUILD_SHARED_LIBS) add_executable (testhdf5-shared ${testhdf5_SOURCES}) - TARGET_C_PROPERTIES (testhdf5-shared SHARED " " " ") - target_link_libraries (testhdf5-shared PUBLIC ${HDF5_TEST_LIBSH_TARGET}) + target_include_directories(testhdf5-shared PRIVATE "${HDF5_SRC_DIR};${HDF5_BINARY_DIR};$<$:${MPI_C_INCLUDE_DIRS}>") + TARGET_C_PROPERTIES (testhdf5-shared SHARED) + target_link_libraries (testhdf5-shared PRIVATE ${HDF5_TEST_LIBSH_TARGET}) set_target_properties (testhdf5-shared PROPERTIES FOLDER test) endif () #-- Adding test for cache_image add_executable (cache_image ${cache_image_SOURCES}) -TARGET_C_PROPERTIES (cache_image STATIC " " " ") -target_link_libraries (cache_image ${HDF5_LIB_TARGET} ${HDF5_TEST_LIB_TARGET}) +target_include_directories(cache_image PRIVATE "${HDF5_SRC_DIR};${HDF5_BINARY_DIR};$<$:${MPI_C_INCLUDE_DIRS}>") +TARGET_C_PROPERTIES (cache_image STATIC) +target_link_libraries (cache_image PRIVATE ${HDF5_LIB_TARGET} ${HDF5_TEST_LIB_TARGET}) set_target_properties (cache_image PROPERTIES FOLDER test) if (BUILD_SHARED_LIBS) add_executable (cache_image-shared ${cache_image_SOURCES}) - TARGET_C_PROPERTIES (cache_image-shared SHARED " " " ") - target_link_libraries (cache_image-shared ${HDF5_TEST_LIBSH_TARGET} ${HDF5_LIBSH_TARGET}) + target_include_directories(cache_image-shared PRIVATE "${HDF5_SRC_DIR};${HDF5_BINARY_DIR};$<$:${MPI_C_INCLUDE_DIRS}>") + TARGET_C_PROPERTIES (cache_image-shared SHARED) + target_link_libraries (cache_image-shared PRIVATE ${HDF5_TEST_LIBSH_TARGET} ${HDF5_LIBSH_TARGET}) set_target_properties (cache_image-shared PROPERTIES FOLDER test) endif () #-- Adding test for ttsafe add_executable (ttsafe ${ttsafe_SOURCES}) -TARGET_C_PROPERTIES (ttsafe STATIC " " " ") -target_link_libraries (ttsafe ${HDF5_LIB_TARGET} ${HDF5_TEST_LIB_TARGET}) +target_include_directories(ttsafe PRIVATE "${HDF5_SRC_DIR};${HDF5_BINARY_DIR};$<$:${MPI_C_INCLUDE_DIRS}>") +TARGET_C_PROPERTIES (ttsafe STATIC) +target_link_libraries (ttsafe PRIVATE ${HDF5_LIB_TARGET} ${HDF5_TEST_LIB_TARGET}) set_target_properties (ttsafe PROPERTIES FOLDER test) if (BUILD_SHARED_LIBS) add_executable (ttsafe-shared ${ttsafe_SOURCES}) - TARGET_C_PROPERTIES (ttsafe-shared SHARED " " " ") - target_link_libraries (ttsafe-shared ${HDF5_TEST_LIBSH_TARGET} ${HDF5_LIBSH_TARGET}) + target_include_directories(ttsafe-shared PRIVATE "${HDF5_SRC_DIR};${HDF5_BINARY_DIR};$<$:${MPI_C_INCLUDE_DIRS}>") + TARGET_C_PROPERTIES (ttsafe-shared SHARED) + target_link_libraries (ttsafe-shared PRIVATE ${HDF5_TEST_LIBSH_TARGET} ${HDF5_LIBSH_TARGET}) set_target_properties (ttsafe-shared PROPERTIES FOLDER test) - if (HDF5_ENABLE_THREADSAFE) - set_property (TARGET ttsafe-shared - APPEND PROPERTY COMPILE_DEFINITIONS - "H5_HAVE_THREADSAFE" - ) - endif () endif () ############################################################################## @@ -387,8 +375,9 @@ endforeach () # This has to be copied to the test directory for execve() to find it # and it can't be renamed (i.e., no -shared). add_executable (accum_swmr_reader ${HDF5_TEST_SOURCE_DIR}/accum_swmr_reader.c) -TARGET_C_PROPERTIES (accum_swmr_reader STATIC " " " ") -target_link_libraries (accum_swmr_reader ${HDF5_LIB_TARGET} ${HDF5_TEST_LIB_TARGET}) +target_include_directories(accum_swmr_reader PRIVATE "${HDF5_SRC_DIR};${HDF5_BINARY_DIR};$<$:${MPI_C_INCLUDE_DIRS}>") +TARGET_C_PROPERTIES (accum_swmr_reader STATIC) +target_link_libraries (accum_swmr_reader PRIVATE ${HDF5_LIB_TARGET} ${HDF5_TEST_LIB_TARGET}) set_target_properties (accum_swmr_reader PROPERTIES FOLDER test) #-- Set accum dependencies @@ -402,13 +391,15 @@ endif () ############################################################################## if (BUILD_SHARED_LIBS) add_executable (filter_plugin ${HDF5_TEST_SOURCE_DIR}/filter_plugin.c) - TARGET_C_PROPERTIES (filter_plugin SHARED " " " ") - target_link_libraries (filter_plugin ${HDF5_TEST_LIB_TARGET}) + target_include_directories(filter_plugin PRIVATE "${HDF5_SRC_DIR};${HDF5_BINARY_DIR};$<$:${MPI_C_INCLUDE_DIRS}>") + TARGET_C_PROPERTIES (filter_plugin SHARED) + target_link_libraries (filter_plugin PRIVATE ${HDF5_TEST_LIB_TARGET}) set_target_properties (filter_plugin PROPERTIES FOLDER test) else () add_executable (filter_plugin ${HDF5_TEST_SOURCE_DIR}/filter_plugin.c) - TARGET_C_PROPERTIES (filter_plugin STATIC " " " ") - target_link_libraries (filter_plugin ${HDF5_TEST_LIB_TARGET}) + target_include_directories(filter_plugin PRIVATE "${HDF5_SRC_DIR};${HDF5_BINARY_DIR};$<$:${MPI_C_INCLUDE_DIRS}>") + TARGET_C_PROPERTIES (filter_plugin STATIC) + target_link_libraries (filter_plugin PRIVATE ${HDF5_TEST_LIB_TARGET}) set_target_properties (filter_plugin PROPERTIES FOLDER test) endif () @@ -417,37 +408,43 @@ endif () ############################################################################## set (use_append_chunk_SOURCES ${HDF5_TEST_SOURCE_DIR}/use_append_chunk.c ${HDF5_TEST_SOURCE_DIR}/use_common.c) add_executable (use_append_chunk ${use_append_chunk_SOURCES}) -TARGET_C_PROPERTIES (use_append_chunk STATIC " " " ") -target_link_libraries (use_append_chunk ${HDF5_LIB_TARGET} ${HDF5_TEST_LIB_TARGET}) +target_include_directories(use_append_chunk PRIVATE "${HDF5_SRC_DIR};${HDF5_BINARY_DIR};$<$:${MPI_C_INCLUDE_DIRS}>") +TARGET_C_PROPERTIES (use_append_chunk STATIC) +target_link_libraries (use_append_chunk PRIVATE ${HDF5_LIB_TARGET} ${HDF5_TEST_LIB_TARGET}) set_target_properties (use_append_chunk PROPERTIES FOLDER test) if (BUILD_SHARED_LIBS) add_executable (use_append_chunk-shared ${use_append_chunk_SOURCES}) - TARGET_C_PROPERTIES (use_append_chunk-shared SHARED " " " ") - target_link_libraries (use_append_chunk-shared ${HDF5_TEST_LIBSH_TARGET} ${HDF5_LIBSH_TARGET}) + target_include_directories(use_append_chunk-shared PRIVATE "${HDF5_SRC_DIR};${HDF5_BINARY_DIR};$<$:${MPI_C_INCLUDE_DIRS}>") + TARGET_C_PROPERTIES (use_append_chunk-shared SHARED) + target_link_libraries (use_append_chunk-shared PRIVATE ${HDF5_TEST_LIBSH_TARGET} ${HDF5_LIBSH_TARGET}) set_target_properties (use_append_chunk-shared PROPERTIES FOLDER test) endif () set (use_append_mchunks_SOURCES ${HDF5_TEST_SOURCE_DIR}/use_append_mchunks.c ${HDF5_TEST_SOURCE_DIR}/use_common.c) add_executable (use_append_mchunks ${use_append_mchunks_SOURCES}) -TARGET_C_PROPERTIES (use_append_mchunks STATIC " " " ") -target_link_libraries (use_append_mchunks ${HDF5_LIB_TARGET} ${HDF5_TEST_LIB_TARGET}) +target_include_directories(use_append_mchunks PRIVATE "${HDF5_SRC_DIR};${HDF5_BINARY_DIR};$<$:${MPI_C_INCLUDE_DIRS}>") +TARGET_C_PROPERTIES (use_append_mchunks STATIC) +target_link_libraries (use_append_mchunks PRIVATE ${HDF5_LIB_TARGET} ${HDF5_TEST_LIB_TARGET}) set_target_properties (use_append_mchunks PROPERTIES FOLDER test) if (BUILD_SHARED_LIBS) add_executable (use_append_mchunks-shared ${use_append_mchunks_SOURCES}) - TARGET_C_PROPERTIES (use_append_mchunks-shared SHARED " " " ") - target_link_libraries (use_append_mchunks-shared ${HDF5_TEST_LIBSH_TARGET} ${HDF5_LIBSH_TARGET}) + target_include_directories(use_append_mchunks-shared PRIVATE "${HDF5_SRC_DIR};${HDF5_BINARY_DIR};$<$:${MPI_C_INCLUDE_DIRS}>") + TARGET_C_PROPERTIES (use_append_mchunks-shared SHARED) + target_link_libraries (use_append_mchunks-shared PRIVATE ${HDF5_TEST_LIBSH_TARGET} ${HDF5_LIBSH_TARGET}) set_target_properties (use_append_mchunks-shared PROPERTIES FOLDER test) endif () set (use_disable_mdc_flushes_SOURCES ${HDF5_TEST_SOURCE_DIR}/use_disable_mdc_flushes.c) add_executable (use_disable_mdc_flushes ${use_disable_mdc_flushes_SOURCES}) -TARGET_C_PROPERTIES (use_disable_mdc_flushes STATIC " " " ") -target_link_libraries (use_disable_mdc_flushes ${HDF5_LIB_TARGET} ${HDF5_TEST_LIB_TARGET}) +target_include_directories(use_disable_mdc_flushes PRIVATE "${HDF5_SRC_DIR};${HDF5_BINARY_DIR};$<$:${MPI_C_INCLUDE_DIRS}>") +TARGET_C_PROPERTIES (use_disable_mdc_flushes STATIC) +target_link_libraries (use_disable_mdc_flushes PRIVATE ${HDF5_LIB_TARGET} ${HDF5_TEST_LIB_TARGET}) set_target_properties (use_disable_mdc_flushes PROPERTIES FOLDER test) if (BUILD_SHARED_LIBS) add_executable (use_disable_mdc_flushes-shared ${use_disable_mdc_flushes_SOURCES}) - TARGET_C_PROPERTIES (use_disable_mdc_flushes-shared SHARED " " " ") - target_link_libraries (use_disable_mdc_flushes-shared ${HDF5_TEST_LIBSH_TARGET} ${HDF5_LIBSH_TARGET}) + target_include_directories(use_disable_mdc_flushes-shared PRIVATE "${HDF5_SRC_DIR};${HDF5_BINARY_DIR};$<$:${MPI_C_INCLUDE_DIRS}>") + TARGET_C_PROPERTIES (use_disable_mdc_flushes-shared SHARED) + target_link_libraries (use_disable_mdc_flushes-shared PRIVATE ${HDF5_TEST_LIBSH_TARGET} ${HDF5_LIBSH_TARGET}) set_target_properties (use_disable_mdc_flushes-shared PROPERTIES FOLDER test) endif () diff --git a/test/CMakeTests.cmake b/test/CMakeTests.cmake index 04cc41f..2de0f0d 100644 --- a/test/CMakeTests.cmake +++ b/test/CMakeTests.cmake @@ -1008,8 +1008,9 @@ endif () if (HDF5_BUILD_GENERATORS) macro (ADD_H5_GENERATOR genfile) add_executable (${genfile} ${HDF5_TEST_SOURCE_DIR}/${genfile}.c) - TARGET_C_PROPERTIES (${genfile} STATIC " " " ") - target_link_libraries (${genfile} ${HDF5_TEST_LIB_TARGET} ${HDF5_LIB_TARGET}) + target_include_directories(${genfile} PRIVATE "${HDF5_SRC_DIR};${HDF5_BINARY_DIR};$<$:${MPI_C_INCLUDE_DIRS}>") + TARGET_C_PROPERTIES (${genfile} STATIC) + target_link_libraries (${genfile} PRIVATE ${HDF5_TEST_LIB_TARGET} ${HDF5_LIB_TARGET}) set_target_properties (${genfile} PROPERTIES FOLDER generator/test) endmacro () diff --git a/testpar/CMakeLists.txt b/testpar/CMakeLists.txt index b1b9ce1..e843811 100644 --- a/testpar/CMakeLists.txt +++ b/testpar/CMakeLists.txt @@ -1,14 +1,7 @@ cmake_minimum_required (VERSION 3.10) -PROJECT (HDF5_TEST_PAR) +project (HDF5_TEST_PAR C) #----------------------------------------------------------------------------- -# Apply Definitions to compiler in this directory and below -#----------------------------------------------------------------------------- -add_definitions (${HDF_EXTRA_C_FLAGS}) - -INCLUDE_DIRECTORIES (${HDF5_TEST_SRC_DIR}) -INCLUDE_DIRECTORIES (${HDF5_TOOLS_DIR}/lib ) -#----------------------------------------------------------------------------- # Define Tests #----------------------------------------------------------------------------- @@ -28,20 +21,24 @@ set (testphdf5_SOURCES #-- Adding test for testhdf5 add_executable (testphdf5 ${testphdf5_SOURCES}) -TARGET_C_PROPERTIES (testphdf5 STATIC " " " ") -target_link_libraries (testphdf5 PUBLIC ${HDF5_TEST_LIB_TARGET} ${HDF5_LIB_TARGET}) -if (HDF5_ENABLE_PARALLEL AND MPI_C_FOUND) - target_link_libraries (testphdf5 PRIVATE ${MPI_C_LIBRARIES}) -endif () +target_include_directories(testphdf5 + PRIVATE "${HDF5_SRC_DIR};${HDF5_BINARY_DIR};$<$:${MPI_C_INCLUDE_DIRS}>" +) +TARGET_C_PROPERTIES (testphdf5 STATIC) +target_link_libraries (testphdf5 + PRIVATE ${HDF5_TEST_LIB_TARGET} ${HDF5_LIB_TARGET} $<$:${MPI_C_LIBRARIES}> +) set_target_properties (testphdf5 PROPERTIES FOLDER test/par) MACRO (ADD_H5P_EXE file) add_executable (${file} ${HDF5_TEST_PAR_SOURCE_DIR}/${file}.c) - TARGET_C_PROPERTIES (${file} STATIC " " " ") - target_link_libraries (${file} PUBLIC ${HDF5_TEST_LIB_TARGET} ${HDF5_LIB_TARGET}) - if (HDF5_ENABLE_PARALLEL AND MPI_C_FOUND) - target_link_libraries (${file} PRIVATE ${MPI_C_LIBRARIES}) - endif () + target_include_directories(${file} + PRIVATE "${HDF5_SRC_DIR};${HDF5_BINARY_DIR};$<$:${MPI_C_INCLUDE_DIRS}>" + ) + TARGET_C_PROPERTIES (${file} STATIC) + target_link_libraries (${file} + PRIVATE ${HDF5_TEST_LIB_TARGET} ${HDF5_LIB_TARGET} $<$:${MPI_C_LIBRARIES}> + ) set_target_properties (${file} PROPERTIES FOLDER test/par) ENDMACRO (ADD_H5P_EXE file) diff --git a/tools/CMakeLists.txt b/tools/CMakeLists.txt index 5576f5c..7d41c8f 100644 --- a/tools/CMakeLists.txt +++ b/tools/CMakeLists.txt @@ -1,21 +1,11 @@ cmake_minimum_required (VERSION 3.10) -PROJECT (HDF5_TOOLS) - -#----------------------------------------------------------------------------- -# Apply Definitions to compiler in this directory and below -#----------------------------------------------------------------------------- -add_definitions (${HDF_EXTRA_C_FLAGS}) +project (HDF5_TOOLS C) # -------------------------------------------------------------------- # If testing was NOT enabled, then we need to build the tools library # -------------------------------------------------------------------- add_subdirectory (lib) -#----------------------------------------------------------------------------- -# Setup include Directories -#----------------------------------------------------------------------------- -INCLUDE_DIRECTORIES (${HDF5_TOOLS_SOURCE_DIR}/lib) - #-- Add the test sources add_subdirectory (src) diff --git a/tools/lib/CMakeLists.txt b/tools/lib/CMakeLists.txt index e5a6439..32166bc 100644 --- a/tools/lib/CMakeLists.txt +++ b/tools/lib/CMakeLists.txt @@ -1,10 +1,5 @@ cmake_minimum_required (VERSION 3.10) -PROJECT (HDF5_TOOLS_LIB) - -#----------------------------------------------------------------------------- -# Apply Definitions to compiler in this directory and below -#----------------------------------------------------------------------------- -add_definitions (${HDF_EXTRA_C_FLAGS}) +project (HDF5_TOOLS_LIB C) #----------------------------------------------------------------------------- # Define Sources @@ -38,36 +33,39 @@ set (H5_TOOLS_LIB_HDRS ) add_library (${HDF5_TOOLS_LIB_TARGET} STATIC ${H5_TOOLS_LIB_SOURCES} ${H5_TOOLS_LIB_HDRS}) -TARGET_C_PROPERTIES (${HDF5_TOOLS_LIB_TARGET} STATIC " " " ") -target_link_libraries (${HDF5_TOOLS_LIB_TARGET} PUBLIC ${HDF5_LIB_TARGET}) -if (HDF5_ENABLE_PARALLEL AND MPI_C_FOUND) - target_link_libraries (${HDF5_TOOLS_LIB_TARGET} PRIVATE ${MPI_C_LIBRARIES}) -endif () +target_include_directories(${HDF5_TOOLS_LIB_TARGET} + PRIVATE "${HDF5_TOOLS_LIB_SOURCE_DIR};${HDF5_SRC_DIR};${HDF5_BINARY_DIR};$<$:${MPI_C_INCLUDE_DIRS}>" + INTERFACE "$/include>" +) +#target_compile_definitions(${HDF5_TOOLS_LIB_TARGET} PRIVATE H5DIFF_DEBUG>) +TARGET_C_PROPERTIES (${HDF5_TOOLS_LIB_TARGET} STATIC) +target_link_libraries (${HDF5_TOOLS_LIB_TARGET} + PUBLIC ${HDF5_LIB_TARGET} + PRIVATE $<$:${MPI_C_LIBRARIES}> +) set_global_variable (HDF5_LIBRARIES_TO_EXPORT "${HDF5_LIBRARIES_TO_EXPORT};${HDF5_TOOLS_LIB_TARGET}") H5_SET_LIB_OPTIONS (${HDF5_TOOLS_LIB_TARGET} ${HDF5_TOOLS_LIB_NAME} STATIC 0) -set_target_properties (${HDF5_TOOLS_LIB_TARGET} PROPERTIES - FOLDER libraries/tools - INTERFACE_INCLUDE_DIRECTORIES "$/include>" -) -#set_property (TARGET ${HDF5_TOOLS_LIB_TARGET} APPEND PROPERTY COMPILE_DEFINITIONS H5DIFF_DEBUG) +set_target_properties (${HDF5_TOOLS_LIB_TARGET} PROPERTIES FOLDER libraries/tools) set (install_targets ${HDF5_TOOLS_LIB_TARGET}) if (BUILD_SHARED_LIBS) add_library (${HDF5_TOOLS_LIBSH_TARGET} SHARED ${H5_TOOLS_LIB_SOURCES} ${H5_TOOLS_LIB_HDRS}) - TARGET_C_PROPERTIES (${HDF5_TOOLS_LIBSH_TARGET} SHARED " " " ") - target_link_libraries (${HDF5_TOOLS_LIBSH_TARGET} PUBLIC ${HDF5_LIBSH_TARGET}) - if (HDF5_ENABLE_PARALLEL AND MPI_C_FOUND) - target_link_libraries (${HDF5_TOOLS_LIBSH_TARGET} PRIVATE ${MPI_C_LIBRARIES}) - endif () + target_include_directories(${HDF5_TOOLS_LIBSH_TARGET} + PRIVATE "${HDF5_TOOLS_LIB_SOURCE_DIR};${HDF5_SRC_DIR};${HDF5_BINARY_DIR};$<$:${MPI_C_INCLUDE_DIRS}>" + INTERFACE "$/include>" + ) + target_compile_definitions(${HDF5_TOOLS_LIBSH_TARGET} + PUBLIC "H5_BUILT_AS_DYNAMIC_LIB" + #PRIVATE H5DIFF_DEBUG + ) + TARGET_C_PROPERTIES (${HDF5_TOOLS_LIBSH_TARGET} SHARED) + target_link_libraries (${HDF5_TOOLS_LIBSH_TARGET} + PUBLIC ${HDF5_LIBSH_TARGET} + PRIVATE $<$:${MPI_C_LIBRARIES}> + ) set_global_variable (HDF5_LIBRARIES_TO_EXPORT "${HDF5_LIBRARIES_TO_EXPORT};${HDF5_TOOLS_LIBSH_TARGET}") H5_SET_LIB_OPTIONS (${HDF5_TOOLS_LIBSH_TARGET} ${HDF5_TOOLS_LIB_NAME} SHARED "TOOLS") - set_target_properties (${HDF5_TOOLS_LIBSH_TARGET} PROPERTIES - FOLDER libraries/tools - COMPILE_DEFINITIONS "H5_BUILT_AS_DYNAMIC_LIB" - INTERFACE_INCLUDE_DIRECTORIES "$/include>" - INTERFACE_COMPILE_DEFINITIONS H5_BUILT_AS_DYNAMIC_LIB=1 - ) - #set_property (TARGET ${HDF5_TOOLS_LIBSH_TARGET} APPEND PROPERTY COMPILE_DEFINITIONS H5DIFF_DEBUG) + set_target_properties (${HDF5_TOOLS_LIBSH_TARGET} PROPERTIES FOLDER libraries/tools) set (install_targets ${install_targets} ${HDF5_TOOLS_LIBSH_TARGET}) endif () diff --git a/tools/src/CMakeLists.txt b/tools/src/CMakeLists.txt index 9364658..757c9cd 100644 --- a/tools/src/CMakeLists.txt +++ b/tools/src/CMakeLists.txt @@ -1,10 +1,5 @@ cmake_minimum_required (VERSION 3.10) -PROJECT (HDF5_TOOLS_SRC) - -#----------------------------------------------------------------------------- -# Apply Definitions to compiler in this directory and below -#----------------------------------------------------------------------------- -add_definitions (${HDF_EXTRA_C_FLAGS}) +project (HDF5_TOOLS_SRC C) #-- Add the h5diff and test executables add_subdirectory (h5diff) diff --git a/tools/src/h5copy/CMakeLists.txt b/tools/src/h5copy/CMakeLists.txt index 8423e5a..10b3f3d 100644 --- a/tools/src/h5copy/CMakeLists.txt +++ b/tools/src/h5copy/CMakeLists.txt @@ -1,17 +1,13 @@ cmake_minimum_required (VERSION 3.10) -PROJECT (HDF5_TOOLS_SRC_H5COPY) - -#----------------------------------------------------------------------------- -# Setup include Directories -#----------------------------------------------------------------------------- -INCLUDE_DIRECTORIES (${HDF5_TOOLS_DIR}/lib) +project (HDF5_TOOLS_SRC_H5COPY C) # -------------------------------------------------------------------- # Add the h5copy and test executables # -------------------------------------------------------------------- add_executable (h5copy ${HDF5_TOOLS_SRC_H5COPY_SOURCE_DIR}/h5copy.c) -TARGET_C_PROPERTIES (h5copy STATIC " " " ") -target_link_libraries (h5copy ${HDF5_TOOLS_LIB_TARGET} ${HDF5_LIB_TARGET}) +target_include_directories(h5copy PRIVATE "${HDF5_TOOLS_DIR}/lib;${HDF5_SRC_DIR};${HDF5_BINARY_DIR};$<$:${MPI_C_INCLUDE_DIRS}>") +TARGET_C_PROPERTIES (h5copy STATIC) +target_link_libraries (h5copy PRIVATE ${HDF5_TOOLS_LIB_TARGET} ${HDF5_LIB_TARGET}) set_target_properties (h5copy PROPERTIES FOLDER tools) set_global_variable (HDF5_UTILS_TO_EXPORT "${HDF5_UTILS_TO_EXPORT};h5copy") @@ -19,8 +15,9 @@ set (H5_DEP_EXECUTABLES h5copy) if (BUILD_SHARED_LIBS) add_executable (h5copy-shared ${HDF5_TOOLS_SRC_H5COPY_SOURCE_DIR}/h5copy.c) - TARGET_C_PROPERTIES (h5copy-shared SHARED " " " ") - target_link_libraries (h5copy-shared ${HDF5_TOOLS_LIBSH_TARGET} ${HDF5_LIBSH_TARGET}) + target_include_directories(h5copy-shared PRIVATE "${HDF5_TOOLS_DIR}/lib;${HDF5_SRC_DIR};${HDF5_BINARY_DIR};$<$:${MPI_C_INCLUDE_DIRS}>") + TARGET_C_PROPERTIES (h5copy-shared SHARED) + target_link_libraries (h5copy-shared PRIVATE ${HDF5_TOOLS_LIBSH_TARGET} ${HDF5_LIBSH_TARGET}) set_target_properties (h5copy-shared PROPERTIES FOLDER tools) set_global_variable (HDF5_UTILS_TO_EXPORT "${HDF5_UTILS_TO_EXPORT};h5copy-shared") diff --git a/tools/src/h5diff/CMakeLists.txt b/tools/src/h5diff/CMakeLists.txt index 9e9f1ea..b990e3a 100644 --- a/tools/src/h5diff/CMakeLists.txt +++ b/tools/src/h5diff/CMakeLists.txt @@ -1,10 +1,5 @@ cmake_minimum_required (VERSION 3.10) -PROJECT (HDF5_TOOLS_SRC_H5DIFF) - -#----------------------------------------------------------------------------- -# Setup include Directories -#----------------------------------------------------------------------------- -INCLUDE_DIRECTORIES (${HDF5_TOOLS_DIR}/lib) +project (HDF5_TOOLS_SRC_H5DIFF C) # -------------------------------------------------------------------- # Add the h5diff executables @@ -13,8 +8,9 @@ add_executable (h5diff ${HDF5_TOOLS_SRC_H5DIFF_SOURCE_DIR}/h5diff_common.c ${HDF5_TOOLS_SRC_H5DIFF_SOURCE_DIR}/h5diff_main.c ) -TARGET_C_PROPERTIES (h5diff STATIC " " " ") -target_link_libraries (h5diff ${HDF5_TOOLS_LIB_TARGET} ${HDF5_LIB_TARGET}) +target_include_directories(h5diff PRIVATE "${HDF5_TOOLS_DIR}/lib;${HDF5_SRC_DIR};${HDF5_BINARY_DIR};$<$:${MPI_C_INCLUDE_DIRS}>") +TARGET_C_PROPERTIES (h5diff STATIC) +target_link_libraries (h5diff PRIVATE ${HDF5_TOOLS_LIB_TARGET} ${HDF5_LIB_TARGET}) set_target_properties (h5diff PROPERTIES FOLDER tools) set_global_variable (HDF5_UTILS_TO_EXPORT "${HDF5_UTILS_TO_EXPORT};h5diff") @@ -25,8 +21,9 @@ if (BUILD_SHARED_LIBS) ${HDF5_TOOLS_SRC_H5DIFF_SOURCE_DIR}/h5diff_common.c ${HDF5_TOOLS_SRC_H5DIFF_SOURCE_DIR}/h5diff_main.c ) - TARGET_C_PROPERTIES (h5diff-shared SHARED " " " ") - target_link_libraries (h5diff-shared ${HDF5_TOOLS_LIBSH_TARGET} ${HDF5_LIBSH_TARGET}) + target_include_directories(h5diff-shared PRIVATE "${HDF5_TOOLS_DIR}/lib;${HDF5_SRC_DIR};${HDF5_BINARY_DIR};$<$:${MPI_C_INCLUDE_DIRS}>") + TARGET_C_PROPERTIES (h5diff-shared SHARED) + target_link_libraries (h5diff-shared PRIVATE ${HDF5_TOOLS_LIBSH_TARGET} ${HDF5_LIBSH_TARGET}) set_target_properties (h5diff-shared PROPERTIES FOLDER tools) set_global_variable (HDF5_UTILS_TO_EXPORT "${HDF5_UTILS_TO_EXPORT};h5diff-shared") @@ -38,8 +35,9 @@ if (H5_HAVE_PARALLEL) ${HDF5_TOOLS_SRC_H5DIFF_SOURCE_DIR}/h5diff_common.c ${HDF5_TOOLS_SRC_H5DIFF_SOURCE_DIR}/ph5diff_main.c ) - TARGET_C_PROPERTIES (ph5diff STATIC " " " ") - target_link_libraries (ph5diff ${HDF5_TOOLS_LIB_TARGET} ${HDF5_LIB_TARGET}) + target_include_directories(ph5diff PRIVATE "${HDF5_TOOLS_DIR}/lib;${HDF5_SRC_DIR};${HDF5_BINARY_DIR};$<$:${MPI_C_INCLUDE_DIRS}>") + TARGET_C_PROPERTIES (ph5diff STATIC) + target_link_libraries (ph5diff PRIVATE ${HDF5_TOOLS_LIB_TARGET} ${HDF5_LIB_TARGET} $<$:${MPI_C_LIBRARIES}>) set_target_properties (ph5diff PROPERTIES FOLDER tools) set_global_variable (HDF5_UTILS_TO_EXPORT "${HDF5_UTILS_TO_EXPORT};ph5diff") endif () diff --git a/tools/src/h5dump/CMakeLists.txt b/tools/src/h5dump/CMakeLists.txt index 1133218..25166c7 100644 --- a/tools/src/h5dump/CMakeLists.txt +++ b/tools/src/h5dump/CMakeLists.txt @@ -1,10 +1,5 @@ cmake_minimum_required (VERSION 3.10) -PROJECT (HDF5_TOOLS_SRC_H5DUMP) - -#----------------------------------------------------------------------------- -# Setup include Directories -#----------------------------------------------------------------------------- -INCLUDE_DIRECTORIES (${HDF5_TOOLS_DIR}/lib) +project (HDF5_TOOLS_SRC_H5DUMP C) # -------------------------------------------------------------------- # Add the h5dump executables @@ -14,8 +9,9 @@ add_executable (h5dump ${HDF5_TOOLS_SRC_H5DUMP_SOURCE_DIR}/h5dump_ddl.c ${HDF5_TOOLS_SRC_H5DUMP_SOURCE_DIR}/h5dump_xml.c ) -TARGET_C_PROPERTIES (h5dump STATIC " " " ") -target_link_libraries (h5dump ${HDF5_TOOLS_LIB_TARGET} ${HDF5_LIB_TARGET}) +target_include_directories(h5dump PRIVATE "${HDF5_TOOLS_DIR}/lib;${HDF5_SRC_DIR};${HDF5_BINARY_DIR};$<$:${MPI_C_INCLUDE_DIRS}>") +TARGET_C_PROPERTIES (h5dump STATIC) +target_link_libraries (h5dump PRIVATE ${HDF5_TOOLS_LIB_TARGET} ${HDF5_LIB_TARGET}) set_target_properties (h5dump PROPERTIES FOLDER tools) set_global_variable (HDF5_UTILS_TO_EXPORT "${HDF5_UTILS_TO_EXPORT};h5dump") @@ -27,8 +23,9 @@ if (BUILD_SHARED_LIBS) ${HDF5_TOOLS_SRC_H5DUMP_SOURCE_DIR}/h5dump_ddl.c ${HDF5_TOOLS_SRC_H5DUMP_SOURCE_DIR}/h5dump_xml.c ) - TARGET_C_PROPERTIES (h5dump-shared SHARED " " " ") - target_link_libraries (h5dump-shared ${HDF5_TOOLS_LIBSH_TARGET} ${HDF5_LIBSH_TARGET}) + target_include_directories(h5dump-shared PRIVATE "${HDF5_TOOLS_DIR}/lib;${HDF5_SRC_DIR};${HDF5_BINARY_DIR};$<$:${MPI_C_INCLUDE_DIRS}>") + TARGET_C_PROPERTIES (h5dump-shared SHARED) + target_link_libraries (h5dump-shared PRIVATE ${HDF5_TOOLS_LIBSH_TARGET} ${HDF5_LIBSH_TARGET}) set_target_properties (h5dump-shared PROPERTIES FOLDER tools) set_global_variable (HDF5_UTILS_TO_EXPORT "${HDF5_UTILS_TO_EXPORT};h5dump-shared") diff --git a/tools/src/h5format_convert/CMakeLists.txt b/tools/src/h5format_convert/CMakeLists.txt index 4acc999..62f269b 100644 --- a/tools/src/h5format_convert/CMakeLists.txt +++ b/tools/src/h5format_convert/CMakeLists.txt @@ -1,17 +1,13 @@ cmake_minimum_required (VERSION 3.10) -PROJECT (HDF5_TOOLS_SRC_H5FC) - -#----------------------------------------------------------------------------- -# Setup include Directories -#----------------------------------------------------------------------------- -INCLUDE_DIRECTORIES (${HDF5_TOOLS_DIR}/lib) +project (HDF5_TOOLS_SRC_H5FC C) # -------------------------------------------------------------------- # Add the h5format_convert executables # -------------------------------------------------------------------- add_executable (h5format_convert ${HDF5_TOOLS_SRC_H5FC_SOURCE_DIR}/h5format_convert.c) -TARGET_C_PROPERTIES (h5format_convert STATIC " " " ") -target_link_libraries (h5format_convert ${HDF5_TOOLS_LIB_TARGET} ${HDF5_LIB_TARGET}) +target_include_directories(h5format_convert PRIVATE "${HDF5_TOOLS_DIR}/lib;${HDF5_SRC_DIR};${HDF5_BINARY_DIR};$<$:${MPI_C_INCLUDE_DIRS}>") +TARGET_C_PROPERTIES (h5format_convert STATIC) +target_link_libraries (h5format_convert PRIVATE ${HDF5_TOOLS_LIB_TARGET} ${HDF5_LIB_TARGET}) set_target_properties (h5format_convert PROPERTIES FOLDER tools) set_global_variable (HDF5_UTILS_TO_EXPORT "${HDF5_UTILS_TO_EXPORT};h5format_convert") diff --git a/tools/src/h5import/CMakeLists.txt b/tools/src/h5import/CMakeLists.txt index d628c9b..7b38420 100644 --- a/tools/src/h5import/CMakeLists.txt +++ b/tools/src/h5import/CMakeLists.txt @@ -1,17 +1,13 @@ cmake_minimum_required (VERSION 3.10) -PROJECT (HDF5_TOOLS_SRC_H5IMPORT) - -#----------------------------------------------------------------------------- -# Setup include Directories -#----------------------------------------------------------------------------- -INCLUDE_DIRECTORIES (${HDF5_TOOLS_DIR}/lib) +project (HDF5_TOOLS_SRC_H5IMPORT C) # -------------------------------------------------------------------- # Add the h5import executables # -------------------------------------------------------------------- add_executable (h5import ${HDF5_TOOLS_SRC_H5IMPORT_SOURCE_DIR}/h5import.c) -TARGET_C_PROPERTIES (h5import STATIC " " " ") -target_link_libraries (h5import ${HDF5_TOOLS_LIB_TARGET} ${HDF5_LIB_TARGET}) +target_include_directories(h5import PRIVATE "${HDF5_TOOLS_DIR}/lib;${HDF5_SRC_DIR};${HDF5_BINARY_DIR};$<$:${MPI_C_INCLUDE_DIRS}>") +TARGET_C_PROPERTIES (h5import STATIC) +target_link_libraries (h5import PRIVATE ${HDF5_TOOLS_LIB_TARGET} ${HDF5_LIB_TARGET}) #set_target_properties (h5import PROPERTIES COMPILE_DEFINITIONS H5DEBUGIMPORT) set_target_properties (h5import PROPERTIES FOLDER tools) set_global_variable (HDF5_UTILS_TO_EXPORT "${HDF5_UTILS_TO_EXPORT};h5import") diff --git a/tools/src/h5jam/CMakeLists.txt b/tools/src/h5jam/CMakeLists.txt index 59caf44..c455b2f 100644 --- a/tools/src/h5jam/CMakeLists.txt +++ b/tools/src/h5jam/CMakeLists.txt @@ -1,23 +1,20 @@ cmake_minimum_required (VERSION 3.10) -PROJECT (HDF5_TOOLS_SRC_H5JAM) - -#----------------------------------------------------------------------------- -# Setup include Directories -#----------------------------------------------------------------------------- -INCLUDE_DIRECTORIES (${HDF5_TOOLS_DIR}/lib) +project (HDF5_TOOLS_SRC_H5JAM C) # -------------------------------------------------------------------- # Add the h5jam executables # -------------------------------------------------------------------- add_executable (h5jam ${HDF5_TOOLS_SRC_H5JAM_SOURCE_DIR}/h5jam.c) -TARGET_C_PROPERTIES (h5jam STATIC " " " ") -target_link_libraries (h5jam ${HDF5_TOOLS_LIB_TARGET} ${HDF5_LIB_TARGET}) +target_include_directories(h5jam PRIVATE "${HDF5_TOOLS_DIR}/lib;${HDF5_SRC_DIR};${HDF5_BINARY_DIR};$<$:${MPI_C_INCLUDE_DIRS}>") +TARGET_C_PROPERTIES (h5jam STATIC) +target_link_libraries (h5jam PRIVATE ${HDF5_TOOLS_LIB_TARGET} ${HDF5_LIB_TARGET}) set_target_properties (h5jam PROPERTIES FOLDER tools) set_global_variable (HDF5_UTILS_TO_EXPORT "${HDF5_UTILS_TO_EXPORT};h5jam") add_executable (h5unjam ${HDF5_TOOLS_SRC_H5JAM_SOURCE_DIR}/h5unjam.c) -TARGET_C_PROPERTIES (h5unjam STATIC " " " ") -target_link_libraries (h5unjam ${HDF5_TOOLS_LIB_TARGET} ${HDF5_LIB_TARGET}) +target_include_directories(h5unjam PRIVATE "${HDF5_TOOLS_DIR}/lib;${HDF5_SRC_DIR};${HDF5_BINARY_DIR};$<$:${MPI_C_INCLUDE_DIRS}>") +TARGET_C_PROPERTIES (h5unjam STATIC) +target_link_libraries (h5unjam PRIVATE ${HDF5_TOOLS_LIB_TARGET} ${HDF5_LIB_TARGET}) set_target_properties (h5unjam PROPERTIES FOLDER tools) set_global_variable (HDF5_UTILS_TO_EXPORT "${HDF5_UTILS_TO_EXPORT};h5unjam") diff --git a/tools/src/h5jam/h5jam.c b/tools/src/h5jam/h5jam.c index cc5fcdc..01ba4af 100644 --- a/tools/src/h5jam/h5jam.c +++ b/tools/src/h5jam/h5jam.c @@ -56,11 +56,6 @@ static struct long_options l_opts[] = { * Purpose: Print the usage message * * Return: void - * - * Programmer: - * - * Modifications: - * *------------------------------------------------------------------------- */ static void @@ -120,7 +115,6 @@ usage (const char *prog) * Purpose: Shutdown and call exit() * * Return: Does not return - * *------------------------------------------------------------------------- */ static void @@ -144,13 +138,7 @@ leave(int ret) * Purpose: Parse the command line for the h5dumper. * * Return: Success: - * * Failure: Exits program with EXIT_FAILURE value. - * - * Programmer: - * - * Modifications: - * *------------------------------------------------------------------------- */ @@ -199,7 +187,6 @@ parse_command_line (int argc, const char *argv[]) * * Return: Success: 0 * Failure: 1 - * *------------------------------------------------------------------------- */ int @@ -238,7 +225,7 @@ main (int argc, const char *argv[]) if (ub_file == NULL) { /* no user block */ - error_msg("missing arguemnt for -u .\n"); + error_msg("missing argument for -u .\n"); help_ref_msg(stderr); leave (EXIT_FAILURE); } @@ -252,7 +239,7 @@ main (int argc, const char *argv[]) } if (input_file == NULL) { - error_msg("missing arguemnt for -i .\n"); + error_msg("missing argument for -i .\n"); help_ref_msg(stderr); leave (EXIT_FAILURE); } @@ -419,7 +406,6 @@ main (int argc, const char *argv[]) * * Return: Success: last byte written in the output. * Failure: Exits program with EXIT_FAILURE value. - * *------------------------------------------------------------------------- */ hsize_t @@ -451,7 +437,8 @@ copy_some_to_file(int infid, int outfid, hsize_t startin, hsize_t startout, } /* end if */ howmuch = (ssize_t)sbuf.st_size; - } else { + } + else { howmuch = limit; } /* end if */ @@ -464,7 +451,8 @@ copy_some_to_file(int infid, int outfid, hsize_t startin, hsize_t startout, if (howmuch > 512) { to = toend - 512; from = fromend - 512; - } else { + } + else { to = toend - howmuch; from = fromend - howmuch; } /* end if */ @@ -475,7 +463,8 @@ copy_some_to_file(int infid, int outfid, hsize_t startin, hsize_t startout, if (howmuch > 512) { nchars = HDread(infid, buf, (unsigned) 512); - } else { + } + else { nchars = HDread(infid, buf, (unsigned)howmuch); } /* end if */ @@ -494,7 +483,8 @@ copy_some_to_file(int infid, int outfid, hsize_t startin, hsize_t startout, if(howmuch > 512) { to -= nchars; from -= nchars; - } else { + } + else { to -= howmuch; from -= howmuch; } /* end if */ @@ -508,15 +498,11 @@ copy_some_to_file(int infid, int outfid, hsize_t startin, hsize_t startout, * Function: compute_user_block_size * * Purpose: Find the offset of the HDF5 header after the user block: - * align at 0, 512, 1024, etc. - * ublock_size: the size of the user block (bytes). + * align at 0, 512, 1024, etc. + * ublock_size: the size of the user block (bytes). * - * Return: Success: the location of the header == the size of the - * padded user block. + * Return: Success: the location of the header == the size of the padded user block. * Failure: none - * - * Return: Success: last byte written in the output. - * Failure: Exits program with EXIT_FAILURE value. *------------------------------------------------------------------------- */ H5_ATTR_CONST hsize_t @@ -533,11 +519,12 @@ compute_user_block_size(hsize_t ublock_size) return where; } /* end compute_user_block_size() */ -/* +/*------------------------------------------------------------------------- * Write zeroes to fill the file from 'where' to 512, 1024, etc. bytes. * * Sets new_where to the size of the padded file and * returns SUCCEED/FAIL. + *------------------------------------------------------------------------- */ herr_t write_pad(int ofile, hsize_t old_where, hsize_t *new_where) diff --git a/tools/src/h5jam/h5unjam.c b/tools/src/h5jam/h5unjam.c index 4e9798e..ffe2aca 100644 --- a/tools/src/h5jam/h5unjam.c +++ b/tools/src/h5jam/h5unjam.c @@ -56,11 +56,6 @@ static struct long_options l_opts[] = { * Purpose: Print the usage message * * Return: void - * - * Programmer: - * - * Modifications: - * *------------------------------------------------------------------------- */ static void @@ -124,9 +119,7 @@ usage(const char *prog) * Purpose: Parse the command line for the h5dumper. * * Return: Success: EXIT_SUCCESS; - * * Failure: Exits function with EXIT_FAILURE value. - * *------------------------------------------------------------------------- */ static int @@ -199,11 +192,6 @@ done: * * Return: Success: 0 * Failure: 1 - * - * Programmer: - * - * Modifications: - * *------------------------------------------------------------------------- */ int @@ -235,7 +223,7 @@ main(int argc, const char *argv[]) if (input_file == NULL) { /* no user block */ - error_msg("missing arguemnt for HDF5 file input.\n"); + error_msg("missing argument for HDF5 file input.\n"); help_ref_msg(stderr); h5tools_setstatus(EXIT_FAILURE); goto done; @@ -336,11 +324,12 @@ done: return h5tools_getstatus(); } -/* +/*------------------------------------------------------------------------- * Copy 'how_much' bytes from the input file to the output file, * starting at byte 'where' in the input file. * * Returns 0 on success, -1 on failure. + *------------------------------------------------------------------------- */ herr_t copy_to_file( FILE *infid, FILE *ofid, ssize_t _where, ssize_t show_much ) diff --git a/tools/src/h5ls/CMakeLists.txt b/tools/src/h5ls/CMakeLists.txt index e9ecd44..5b31b84 100644 --- a/tools/src/h5ls/CMakeLists.txt +++ b/tools/src/h5ls/CMakeLists.txt @@ -1,17 +1,13 @@ cmake_minimum_required (VERSION 3.10) -PROJECT (HDF5_TOOLS_SRC_H5LS) - -#----------------------------------------------------------------------------- -# Setup include Directories -#----------------------------------------------------------------------------- -INCLUDE_DIRECTORIES (${HDF5_TOOLS_DIR}/lib) +project (HDF5_TOOLS_SRC_H5LS C) #----------------------------------------------------------------------------- # Add the h5ls executable #----------------------------------------------------------------------------- add_executable (h5ls ${HDF5_TOOLS_SRC_H5LS_SOURCE_DIR}/h5ls.c) -TARGET_C_PROPERTIES (h5ls STATIC " " " ") -target_link_libraries (h5ls ${HDF5_TOOLS_LIB_TARGET} ${HDF5_LIB_TARGET}) +target_include_directories(h5ls PRIVATE "${HDF5_TOOLS_DIR}/lib;${HDF5_SRC_DIR};${HDF5_BINARY_DIR};$<$:${MPI_C_INCLUDE_DIRS}>") +TARGET_C_PROPERTIES (h5ls STATIC) +target_link_libraries (h5ls PRIVATE ${HDF5_TOOLS_LIB_TARGET} ${HDF5_LIB_TARGET}) set_target_properties (h5ls PROPERTIES FOLDER tools) set_global_variable (HDF5_UTILS_TO_EXPORT "${HDF5_UTILS_TO_EXPORT};h5ls") @@ -19,8 +15,9 @@ set (H5_DEP_EXECUTABLES h5ls) if (BUILD_SHARED_LIBS) add_executable (h5ls-shared ${HDF5_TOOLS_SRC_H5LS_SOURCE_DIR}/h5ls.c) - TARGET_C_PROPERTIES (h5ls-shared SHARED " " " ") - target_link_libraries (h5ls-shared ${HDF5_TOOLS_LIBSH_TARGET} ${HDF5_LIBSH_TARGET}) + target_include_directories(h5ls-shared PRIVATE "${HDF5_TOOLS_DIR}/lib;${HDF5_SRC_DIR};${HDF5_BINARY_DIR};$<$:${MPI_C_INCLUDE_DIRS}>") + TARGET_C_PROPERTIES (h5ls-shared SHARED) + target_link_libraries (h5ls-shared PRIVATE ${HDF5_TOOLS_LIBSH_TARGET} ${HDF5_LIBSH_TARGET}) set_target_properties (h5ls-shared PROPERTIES FOLDER tools) set_global_variable (HDF5_UTILS_TO_EXPORT "${HDF5_UTILS_TO_EXPORT};h5ls-shared") diff --git a/tools/src/h5repack/CMakeLists.txt b/tools/src/h5repack/CMakeLists.txt index 211c947..c0cd558 100644 --- a/tools/src/h5repack/CMakeLists.txt +++ b/tools/src/h5repack/CMakeLists.txt @@ -1,11 +1,5 @@ cmake_minimum_required (VERSION 3.10) -PROJECT (HDF5_TOOLS_SRC_H5REPACK) - -#----------------------------------------------------------------------------- -# Setup include Directories -#----------------------------------------------------------------------------- -INCLUDE_DIRECTORIES (${HDF5_TOOLS_DIR}/lib) -INCLUDE_DIRECTORIES (${HDF5_TEST_SRC_DIR}) +project (HDF5_TOOLS_SRC_H5REPACK C) # -------------------------------------------------------------------- # Add h5Repack executables @@ -21,8 +15,9 @@ set (REPACK_COMMON_SOURCES ) add_executable (h5repack ${REPACK_COMMON_SOURCES} ${HDF5_TOOLS_SRC_H5REPACK_SOURCE_DIR}/h5repack_main.c) -TARGET_C_PROPERTIES (h5repack STATIC " " " ") -target_link_libraries (h5repack ${HDF5_TOOLS_LIB_TARGET} ${HDF5_LIB_TARGET}) +target_include_directories(h5repack PRIVATE "${HDF5_TOOLS_DIR}/lib;${HDF5_SRC_DIR};${HDF5_BINARY_DIR};$<$:${MPI_C_INCLUDE_DIRS}>") +TARGET_C_PROPERTIES (h5repack STATIC) +target_link_libraries (h5repack PRIVATE ${HDF5_TOOLS_LIB_TARGET} ${HDF5_LIB_TARGET}) set_target_properties (h5repack PROPERTIES FOLDER tools) set_global_variable (HDF5_UTILS_TO_EXPORT "${HDF5_UTILS_TO_EXPORT};h5repack") @@ -30,8 +25,9 @@ set (H5_DEP_EXECUTABLES h5repack) if (BUILD_SHARED_LIBS) add_executable (h5repack-shared ${REPACK_COMMON_SOURCES} ${HDF5_TOOLS_SRC_H5REPACK_SOURCE_DIR}/h5repack_main.c) - TARGET_C_PROPERTIES (h5repack-shared SHARED " " " ") - target_link_libraries (h5repack-shared ${HDF5_TOOLS_LIBSH_TARGET} ${HDF5_LIBSH_TARGET}) + target_include_directories(h5repack-shared PRIVATE "${HDF5_TOOLS_DIR}/lib;${HDF5_SRC_DIR};${HDF5_BINARY_DIR};$<$:${MPI_C_INCLUDE_DIRS}>") + TARGET_C_PROPERTIES (h5repack-shared SHARED) + target_link_libraries (h5repack-shared PRIVATE ${HDF5_TOOLS_LIBSH_TARGET} ${HDF5_LIBSH_TARGET}) set_target_properties (h5repack-shared PROPERTIES FOLDER tools) set_global_variable (HDF5_UTILS_TO_EXPORT "${HDF5_UTILS_TO_EXPORT};h5repack-shared") diff --git a/tools/src/h5stat/CMakeLists.txt b/tools/src/h5stat/CMakeLists.txt index 7842aa8..56c172c 100644 --- a/tools/src/h5stat/CMakeLists.txt +++ b/tools/src/h5stat/CMakeLists.txt @@ -1,17 +1,13 @@ cmake_minimum_required (VERSION 3.10) -PROJECT (HDF5_TOOLS_SRC_H5STAT) - -#----------------------------------------------------------------------------- -# Setup include Directories -#----------------------------------------------------------------------------- -INCLUDE_DIRECTORIES (${HDF5_TOOLS_DIR}/lib) +project (HDF5_TOOLS_SRC_H5STAT C) # -------------------------------------------------------------------- # Add the h5stat executables # -------------------------------------------------------------------- add_executable (h5stat ${HDF5_TOOLS_SRC_H5STAT_SOURCE_DIR}/h5stat.c) -TARGET_C_PROPERTIES (h5stat STATIC " " " ") -target_link_libraries (h5stat ${HDF5_TOOLS_LIB_TARGET} ${HDF5_LIB_TARGET}) +target_include_directories(h5stat PRIVATE "${HDF5_TOOLS_DIR}/lib;${HDF5_SRC_DIR};${HDF5_BINARY_DIR};$<$:${MPI_C_INCLUDE_DIRS}>") +TARGET_C_PROPERTIES (h5stat STATIC) +target_link_libraries (h5stat PRIVATE ${HDF5_TOOLS_LIB_TARGET} ${HDF5_LIB_TARGET}) set_target_properties (h5stat PROPERTIES FOLDER tools) set_global_variable (HDF5_UTILS_TO_EXPORT "${HDF5_UTILS_TO_EXPORT};h5stat") @@ -19,8 +15,9 @@ set (H5_DEP_EXECUTABLES h5stat) if (BUILD_SHARED_LIBS) add_executable (h5stat-shared ${HDF5_TOOLS_SRC_H5STAT_SOURCE_DIR}/h5stat.c) - TARGET_C_PROPERTIES (h5stat-shared SHARED " " " ") - target_link_libraries (h5stat-shared ${HDF5_TOOLS_LIBSH_TARGET} ${HDF5_LIBSH_TARGET}) + target_include_directories(h5stat-shared PRIVATE "${HDF5_TOOLS_DIR}/lib;${HDF5_SRC_DIR};${HDF5_BINARY_DIR};$<$:${MPI_C_INCLUDE_DIRS}>") + TARGET_C_PROPERTIES (h5stat-shared SHARED) + target_link_libraries (h5stat-shared PRIVATE ${HDF5_TOOLS_LIBSH_TARGET} ${HDF5_LIBSH_TARGET}) set_target_properties (h5stat-shared PROPERTIES FOLDER tools) set_global_variable (HDF5_UTILS_TO_EXPORT "${HDF5_UTILS_TO_EXPORT};h5stat-shared") diff --git a/tools/src/misc/CMakeLists.txt b/tools/src/misc/CMakeLists.txt index 948c6d4..937799f 100644 --- a/tools/src/misc/CMakeLists.txt +++ b/tools/src/misc/CMakeLists.txt @@ -1,36 +1,35 @@ cmake_minimum_required (VERSION 3.10) -PROJECT (HDF5_TOOLS_SRC_MISC) - -#----------------------------------------------------------------------------- -# Setup include Directories -#----------------------------------------------------------------------------- -INCLUDE_DIRECTORIES (${HDF5_TOOLS_DIR}/lib) +project (HDF5_TOOLS_SRC_MISC C) # -------------------------------------------------------------------- # Add the misc executables # -------------------------------------------------------------------- #-- Misc Executables add_executable (h5debug ${HDF5_TOOLS_SRC_MISC_SOURCE_DIR}/h5debug.c) -TARGET_C_PROPERTIES (h5debug STATIC " " " ") -target_link_libraries (h5debug ${HDF5_LIB_TARGET} ${HDF5_TOOLS_LIB_TARGET}) +target_include_directories(h5debug PRIVATE "${HDF5_TOOLS_DIR}/lib;${HDF5_SRC_DIR};${HDF5_BINARY_DIR};$<$:${MPI_C_INCLUDE_DIRS}>") +TARGET_C_PROPERTIES (h5debug STATIC) +target_link_libraries (h5debug PRIVATE ${HDF5_LIB_TARGET} ${HDF5_TOOLS_LIB_TARGET}) set_target_properties (h5debug PROPERTIES FOLDER tools) set_global_variable (HDF5_UTILS_TO_EXPORT "${HDF5_UTILS_TO_EXPORT};h5debug") add_executable (h5repart ${HDF5_TOOLS_SRC_MISC_SOURCE_DIR}/h5repart.c) -TARGET_C_PROPERTIES (h5repart STATIC " " " ") -target_link_libraries (h5repart ${HDF5_LIB_TARGET} ${HDF5_TOOLS_LIB_TARGET}) +target_include_directories(h5repart PRIVATE "${HDF5_TOOLS_DIR}/lib;${HDF5_SRC_DIR};${HDF5_BINARY_DIR};$<$:${MPI_C_INCLUDE_DIRS}>") +TARGET_C_PROPERTIES (h5repart STATIC) +target_link_libraries (h5repart PRIVATE ${HDF5_LIB_TARGET} ${HDF5_TOOLS_LIB_TARGET}) set_target_properties (h5repart PROPERTIES FOLDER tools) set_global_variable (HDF5_UTILS_TO_EXPORT "${HDF5_UTILS_TO_EXPORT};h5repart") add_executable (h5mkgrp ${HDF5_TOOLS_SRC_MISC_SOURCE_DIR}/h5mkgrp.c) -TARGET_C_PROPERTIES (h5mkgrp STATIC " " " ") -target_link_libraries (h5mkgrp ${HDF5_TOOLS_LIB_TARGET} ${HDF5_LIB_TARGET}) +target_include_directories(h5mkgrp PRIVATE "${HDF5_TOOLS_DIR}/lib;${HDF5_SRC_DIR};${HDF5_BINARY_DIR};$<$:${MPI_C_INCLUDE_DIRS}>") +TARGET_C_PROPERTIES (h5mkgrp STATIC) +target_link_libraries (h5mkgrp PRIVATE ${HDF5_TOOLS_LIB_TARGET} ${HDF5_LIB_TARGET}) set_target_properties (h5mkgrp PROPERTIES FOLDER tools) set_global_variable (HDF5_UTILS_TO_EXPORT "${HDF5_UTILS_TO_EXPORT};h5mkgrp") add_executable (h5clear ${HDF5_TOOLS_SRC_MISC_SOURCE_DIR}/h5clear.c) -TARGET_C_PROPERTIES (h5clear STATIC " " " ") -target_link_libraries (h5clear ${HDF5_TOOLS_LIB_TARGET} ${HDF5_LIB_TARGET}) +target_include_directories(h5clear PRIVATE "${HDF5_TOOLS_DIR}/lib;${HDF5_SRC_DIR};${HDF5_BINARY_DIR};$<$:${MPI_C_INCLUDE_DIRS}>") +TARGET_C_PROPERTIES (h5clear STATIC) +target_link_libraries (h5clear PRIVATE ${HDF5_TOOLS_LIB_TARGET} ${HDF5_LIB_TARGET}) set_target_properties (h5clear PROPERTIES FOLDER tools) set_global_variable (HDF5_UTILS_TO_EXPORT "${HDF5_UTILS_TO_EXPORT};h5clear") diff --git a/tools/test/CMakeLists.txt b/tools/test/CMakeLists.txt index f194d7a..f4106fc 100644 --- a/tools/test/CMakeLists.txt +++ b/tools/test/CMakeLists.txt @@ -1,10 +1,5 @@ cmake_minimum_required (VERSION 3.10) -PROJECT (HDF5_TOOLS_TEST) - -#----------------------------------------------------------------------------- -# Apply Definitions to compiler in this directory and below -#----------------------------------------------------------------------------- -add_definitions (${HDF_EXTRA_C_FLAGS}) +project (HDF5_TOOLS_TEST C) #-- Add the h5diff tests add_subdirectory (h5diff) diff --git a/tools/test/h5copy/CMakeLists.txt b/tools/test/h5copy/CMakeLists.txt index 9a171ba..a71a12a 100644 --- a/tools/test/h5copy/CMakeLists.txt +++ b/tools/test/h5copy/CMakeLists.txt @@ -1,19 +1,14 @@ cmake_minimum_required (VERSION 3.10) -PROJECT (HDF5_TOOLS_TEST_H5COPY) - -#----------------------------------------------------------------------------- -# Setup include Directories -#----------------------------------------------------------------------------- -INCLUDE_DIRECTORIES (${HDF5_TOOLS_DIR}/lib) +project (HDF5_TOOLS_TEST_H5COPY C) # -------------------------------------------------------------------- # Add the h5copy test executables # -------------------------------------------------------------------- - if (HDF5_BUILD_GENERATORS) add_executable (h5copygentest ${HDF5_TOOLS_TEST_H5COPY_SOURCE_DIR}/h5copygentest.c) - TARGET_C_PROPERTIES (h5copygentest STATIC " " " ") - target_link_libraries (h5copygentest ${HDF5_LIB_TARGET}) + target_include_directories(h5copygentest PRIVATE "${HDF5_SRC_DIR};${HDF5_BINARY_DIR};$<$:${MPI_C_INCLUDE_DIRS}>") + TARGET_C_PROPERTIES (h5copygentest STATIC) + target_link_libraries (h5copygentest PRIVATE ${HDF5_LIB_TARGET}) set_target_properties (h5copygentest PROPERTIES FOLDER generator/tools) #add_test (NAME h5copygentest COMMAND $) @@ -26,12 +21,11 @@ if (BUILD_SHARED_LIBS) set (HDF5_TOOL_PLUGIN_LIB_CORENAME "dynlibcopy") set (HDF5_TOOL_PLUGIN_LIB_NAME "${HDF5_EXTERNAL_LIB_PREFIX}${HDF5_TOOL_PLUGIN_LIB_CORENAME}") set (HDF5_TOOL_PLUGIN_LIB_TARGET ${HDF5_TOOL_PLUGIN_LIB_CORENAME}) - add_definitions (${HDF_EXTRA_C_FLAGS}) - INCLUDE_DIRECTORIES (${HDF5_SRC_DIR}) add_library (${HDF5_TOOL_PLUGIN_LIB_TARGET} SHARED dynlib_copy.c) - TARGET_C_PROPERTIES (${HDF5_TOOL_PLUGIN_LIB_TARGET} SHARED " " " ") - target_link_libraries (${HDF5_TOOL_PLUGIN_LIB_TARGET} ${HDF5_TEST_LIB_TARGET}) + target_include_directories(${HDF5_TOOL_PLUGIN_LIB_TARGET} PRIVATE "${HDF5_SRC_DIR};${HDF5_BINARY_DIR};$<$:${MPI_C_INCLUDE_DIRS}>") + TARGET_C_PROPERTIES (${HDF5_TOOL_PLUGIN_LIB_TARGET} SHARED) + target_link_libraries (${HDF5_TOOL_PLUGIN_LIB_TARGET} PRIVATE ${HDF5_TEST_LIB_TARGET}) H5_SET_LIB_OPTIONS (${HDF5_TOOL_PLUGIN_LIB_TARGET} ${HDF5_TOOL_PLUGIN_LIB_NAME} SHARED "LIB") # make plugins dir diff --git a/tools/test/h5diff/CMakeLists.txt b/tools/test/h5diff/CMakeLists.txt index dd7da66..c0aac36 100644 --- a/tools/test/h5diff/CMakeLists.txt +++ b/tools/test/h5diff/CMakeLists.txt @@ -1,22 +1,18 @@ cmake_minimum_required (VERSION 3.10) -PROJECT (HDF5_TOOLS_TEST_H5DIFF) +project (HDF5_TOOLS_TEST_H5DIFF C) -#----------------------------------------------------------------------------- -# Setup include Directories -#----------------------------------------------------------------------------- -INCLUDE_DIRECTORIES (${HDF5_TOOLS_DIR}/lib) +# -------------------------------------------------------------------- +# Add the h5diff and test executables +# -------------------------------------------------------------------- +if (HDF5_BUILD_GENERATORS) + add_executable (h5diffgentest ${HDF5_TOOLS_TEST_H5DIFF_SOURCE_DIR}/h5diffgentest.c) + target_include_directories(h5diffgentest PRIVATE "${HDF5_SRC_DIR};${HDF5_BINARY_DIR};$<$:${MPI_C_INCLUDE_DIRS}>") + TARGET_C_PROPERTIES (h5diffgentest STATIC) + target_link_libraries (h5diffgentest PRIVATE ${HDF5_LIB_TARGET}) + set_target_properties (h5diffgentest PROPERTIES FOLDER generator/tools) - # -------------------------------------------------------------------- - # Add the h5diff and test executables - # -------------------------------------------------------------------- - if (HDF5_BUILD_GENERATORS) - add_executable (h5diffgentest ${HDF5_TOOLS_TEST_H5DIFF_SOURCE_DIR}/h5diffgentest.c) - TARGET_C_PROPERTIES (h5diffgentest STATIC " " " ") - target_link_libraries (h5diffgentest ${HDF5_LIB_TARGET}) - set_target_properties (h5diffgentest PROPERTIES FOLDER generator/tools) - - #add_test (NAME h5diffgentest COMMAND $) - endif () + #add_test (NAME h5diffgentest COMMAND $) +endif () #----------------------------------------------------------------------------- # If plugin library tests can be tested @@ -25,12 +21,11 @@ if (BUILD_SHARED_LIBS) set (HDF5_TOOL_PLUGIN_LIB_CORENAME "dynlibdiff") set (HDF5_TOOL_PLUGIN_LIB_NAME "${HDF5_EXTERNAL_LIB_PREFIX}${HDF5_TOOL_PLUGIN_LIB_CORENAME}") set (HDF5_TOOL_PLUGIN_LIB_TARGET ${HDF5_TOOL_PLUGIN_LIB_CORENAME}) - add_definitions (${HDF_EXTRA_C_FLAGS}) - INCLUDE_DIRECTORIES (${HDF5_SRC_DIR}) add_library (${HDF5_TOOL_PLUGIN_LIB_TARGET} SHARED dynlib_diff.c) - TARGET_C_PROPERTIES (${HDF5_TOOL_PLUGIN_LIB_TARGET} SHARED " " " ") - target_link_libraries (${HDF5_TOOL_PLUGIN_LIB_TARGET} ${HDF5_TEST_LIB_TARGET}) + target_include_directories(${HDF5_TOOL_PLUGIN_LIB_TARGET} PRIVATE "${HDF5_SRC_DIR};${HDF5_BINARY_DIR};$<$:${MPI_C_INCLUDE_DIRS}>") + TARGET_C_PROPERTIES (${HDF5_TOOL_PLUGIN_LIB_TARGET} SHARED) + target_link_libraries (${HDF5_TOOL_PLUGIN_LIB_TARGET} PRIVATE ${HDF5_TEST_LIB_TARGET}) H5_SET_LIB_OPTIONS (${HDF5_TOOL_PLUGIN_LIB_TARGET} ${HDF5_TOOL_PLUGIN_LIB_NAME} SHARED "LIB") # make plugins dir diff --git a/tools/test/h5dump/CMakeLists.txt b/tools/test/h5dump/CMakeLists.txt index 4ea1738..4c409e8 100644 --- a/tools/test/h5dump/CMakeLists.txt +++ b/tools/test/h5dump/CMakeLists.txt @@ -1,55 +1,50 @@ cmake_minimum_required (VERSION 3.10) -PROJECT (HDF5_TOOLS_TEST_H5DUMP) +project (HDF5_TOOLS_TEST_H5DUMP C) #----------------------------------------------------------------------------- -# Setup include Directories +# If plugin library tests can be tested #----------------------------------------------------------------------------- -INCLUDE_DIRECTORIES (${HDF5_TOOLS_DIR}/lib) - - #----------------------------------------------------------------------------- - # If plugin library tests can be tested - #----------------------------------------------------------------------------- - set (HDF5_TOOL_PLUGIN_LIB_CORENAME "dynlibdump") - set (HDF5_TOOL_PLUGIN_LIB_NAME "${HDF5_EXTERNAL_LIB_PREFIX}${HDF5_TOOL_PLUGIN_LIB_CORENAME}") - set (HDF5_TOOL_PLUGIN_LIB_TARGET ${HDF5_TOOL_PLUGIN_LIB_CORENAME}) - add_definitions (${HDF_EXTRA_C_FLAGS}) - INCLUDE_DIRECTORIES (${HDF5_SRC_DIR}) - - add_library (${HDF5_TOOL_PLUGIN_LIB_TARGET} SHARED dynlib_dump.c) - TARGET_C_PROPERTIES (${HDF5_TOOL_PLUGIN_LIB_TARGET} SHARED " " " ") - target_link_libraries (${HDF5_TOOL_PLUGIN_LIB_TARGET} ${HDF5_TEST_LIB_TARGET}) - H5_SET_LIB_OPTIONS (${HDF5_TOOL_PLUGIN_LIB_TARGET} ${HDF5_TOOL_PLUGIN_LIB_NAME} SHARED "LIB") - - # make plugins dir - file (MAKE_DIRECTORY "${CMAKE_BINARY_DIR}/plugins") - #----------------------------------------------------------------------------- - # Copy plugin library to a plugins folder - #----------------------------------------------------------------------------- - add_custom_command ( - TARGET ${HDF5_TOOL_PLUGIN_LIB_TARGET} - POST_BUILD - COMMAND ${CMAKE_COMMAND} - ARGS -E copy_if_different +set (HDF5_TOOL_PLUGIN_LIB_CORENAME "dynlibdump") +set (HDF5_TOOL_PLUGIN_LIB_NAME "${HDF5_EXTERNAL_LIB_PREFIX}${HDF5_TOOL_PLUGIN_LIB_CORENAME}") +set (HDF5_TOOL_PLUGIN_LIB_TARGET ${HDF5_TOOL_PLUGIN_LIB_CORENAME}) + +add_library (${HDF5_TOOL_PLUGIN_LIB_TARGET} SHARED dynlib_dump.c) +target_include_directories(${HDF5_TOOL_PLUGIN_LIB_TARGET} PRIVATE "${HDF5_SRC_DIR};${HDF5_BINARY_DIR};$<$:${MPI_C_INCLUDE_DIRS}>") +TARGET_C_PROPERTIES (${HDF5_TOOL_PLUGIN_LIB_TARGET} SHARED) +target_link_libraries (${HDF5_TOOL_PLUGIN_LIB_TARGET} PRIVATE ${HDF5_TEST_LIB_TARGET}) +H5_SET_LIB_OPTIONS (${HDF5_TOOL_PLUGIN_LIB_TARGET} ${HDF5_TOOL_PLUGIN_LIB_NAME} SHARED "LIB") + +# make plugins dir +file (MAKE_DIRECTORY "${CMAKE_BINARY_DIR}/plugins") +#----------------------------------------------------------------------------- +# Copy plugin library to a plugins folder +#----------------------------------------------------------------------------- +add_custom_command ( + TARGET ${HDF5_TOOL_PLUGIN_LIB_TARGET} + POST_BUILD + COMMAND ${CMAKE_COMMAND} + ARGS -E copy_if_different "$" "${CMAKE_BINARY_DIR}/plugins/$" - ) +) - # -------------------------------------------------------------------- - # Add the h5dump test executable - # -------------------------------------------------------------------- - if (HDF5_BUILD_GENERATORS) - add_executable (h5dumpgentest ${HDF5_TOOLS_TEST_H5DUMP_SOURCE_DIR}/h5dumpgentest.c) - TARGET_C_PROPERTIES (h5dumpgentest STATIC " " " ") - target_link_libraries (h5dumpgentest ${HDF5_LIB_TARGET} ${HDF5_TOOLS_LIB_TARGET}) - set_target_properties (h5dumpgentest PROPERTIES FOLDER generator/tools) +# -------------------------------------------------------------------- +# Add the h5dump test executable +# -------------------------------------------------------------------- +if (HDF5_BUILD_GENERATORS) + add_executable (h5dumpgentest ${HDF5_TOOLS_TEST_H5DUMP_SOURCE_DIR}/h5dumpgentest.c) + target_include_directories(h5dumpgentest PRIVATE "${HDF5_SRC_DIR};${HDF5_BINARY_DIR};$<$:${MPI_C_INCLUDE_DIRS}>") + TARGET_C_PROPERTIES (h5dumpgentest STATIC) + target_link_libraries (h5dumpgentest PRIVATE ${HDF5_LIB_TARGET} ${HDF5_TOOLS_LIB_TARGET}) + set_target_properties (h5dumpgentest PROPERTIES FOLDER generator/tools) - #add_test (NAME h5dumpgentest COMMAND $) - endif () + #add_test (NAME h5dumpgentest COMMAND $) +endif () - include (CMakeTests.cmake) +include (CMakeTests.cmake) - include (CMakeTestsPBITS.cmake) +include (CMakeTestsPBITS.cmake) - include (CMakeTestsVDS.cmake) +include (CMakeTestsVDS.cmake) - include (CMakeTestsXML.cmake) +include (CMakeTestsXML.cmake) diff --git a/tools/test/h5format_convert/CMakeLists.txt b/tools/test/h5format_convert/CMakeLists.txt index a27c78a..170ba4c 100644 --- a/tools/test/h5format_convert/CMakeLists.txt +++ b/tools/test/h5format_convert/CMakeLists.txt @@ -1,26 +1,23 @@ cmake_minimum_required (VERSION 3.10) -PROJECT (HDF5_TOOLS_TEST_H5FC) +project (HDF5_TOOLS_TEST_H5FC C) -#----------------------------------------------------------------------------- -# Setup include Directories -#----------------------------------------------------------------------------- -INCLUDE_DIRECTORIES (${HDF5_TOOLS_DIR}/lib) +# -------------------------------------------------------------------- +# Add the h5format_convert test executables +# -------------------------------------------------------------------- +add_executable (h5fc_chk_idx ${HDF5_TOOLS_TEST_H5FC_SOURCE_DIR}/h5fc_chk_idx.c) +target_include_directories(h5fc_chk_idx PRIVATE "${HDF5_SRC_DIR};${HDF5_BINARY_DIR};$<$:${MPI_C_INCLUDE_DIRS}>") +TARGET_C_PROPERTIES (h5fc_chk_idx STATIC) +target_link_libraries (h5fc_chk_idx PRIVATE ${HDF5_LIB_TARGET} ${HDF5_TOOLS_LIB_TARGET}) +set_target_properties (h5fc_chk_idx PROPERTIES FOLDER tools) - # -------------------------------------------------------------------- - # Add the h5format_convert test executables - # -------------------------------------------------------------------- - add_executable (h5fc_chk_idx ${HDF5_TOOLS_TEST_H5FC_SOURCE_DIR}/h5fc_chk_idx.c) - TARGET_C_PROPERTIES (h5fc_chk_idx STATIC " " " ") - target_link_libraries (h5fc_chk_idx ${HDF5_LIB_TARGET} ${HDF5_TOOLS_LIB_TARGET}) - set_target_properties (h5fc_chk_idx PROPERTIES FOLDER tools) +if (HDF5_BUILD_GENERATORS) + add_executable (h5fc_gentest ${HDF5_TOOLS_TEST_H5FC_SOURCE_DIR}/h5fc_gentest.c) + target_include_directories(h5fc_gentest PRIVATE "${HDF5_SRC_DIR};${HDF5_BINARY_DIR};$<$:${MPI_C_INCLUDE_DIRS}>") + TARGET_C_PROPERTIES (h5fc_gentest STATIC) + target_link_libraries (h5fc_gentest PRIVATE ${HDF5_LIB_TARGET} ${HDF5_TOOLS_LIB_TARGET}) + set_target_properties (h5fc_gentest PROPERTIES FOLDER generator/tools) - if (HDF5_BUILD_GENERATORS) - add_executable (h5fc_gentest ${HDF5_TOOLS_TEST_H5FC_SOURCE_DIR}/h5fc_gentest.c) - TARGET_C_PROPERTIES (h5fc_gentest STATIC " " " ") - target_link_libraries (h5fc_gentest ${HDF5_LIB_TARGET} ${HDF5_TOOLS_LIB_TARGET}) - set_target_properties (h5fc_gentest PROPERTIES FOLDER generator/tools) + #add_test (NAME h5fc_gentest COMMAND $) +endif () - #add_test (NAME h5fc_gentest COMMAND $) - endif () - - include (CMakeTests.cmake) +include (CMakeTests.cmake) diff --git a/tools/test/h5import/CMakeLists.txt b/tools/test/h5import/CMakeLists.txt index 2cb212a..500be58 100644 --- a/tools/test/h5import/CMakeLists.txt +++ b/tools/test/h5import/CMakeLists.txt @@ -1,17 +1,13 @@ cmake_minimum_required (VERSION 3.10) -PROJECT (HDF5_TOOLS_TEST_H5IMPORT) +project (HDF5_TOOLS_TEST_H5IMPORT C) -#----------------------------------------------------------------------------- -# Setup include Directories -#----------------------------------------------------------------------------- -INCLUDE_DIRECTORIES (${HDF5_TOOLS_DIR}/lib) +# -------------------------------------------------------------------- +# Add the h5import executables +# -------------------------------------------------------------------- +add_executable (h5importtest ${HDF5_TOOLS_TEST_H5IMPORT_SOURCE_DIR}/h5importtest.c) +target_include_directories(h5importtest PRIVATE "${HDF5_SRC_DIR};${HDF5_BINARY_DIR};$<$:${MPI_C_INCLUDE_DIRS}>") +TARGET_C_PROPERTIES (h5importtest STATIC) +target_link_libraries (h5importtest PRIVATE ${HDF5_LIB_TARGET} ${HDF5_TOOLS_LIB_TARGET}) +set_target_properties (h5importtest PROPERTIES FOLDER tools) - # -------------------------------------------------------------------- - # Add the h5import executables - # -------------------------------------------------------------------- - add_executable (h5importtest ${HDF5_TOOLS_TEST_H5IMPORT_SOURCE_DIR}/h5importtest.c) - TARGET_C_PROPERTIES (h5importtest STATIC " " " ") - target_link_libraries (h5importtest ${HDF5_LIB_TARGET} ${HDF5_TOOLS_LIB_TARGET}) - set_target_properties (h5importtest PROPERTIES FOLDER tools) - - include (CMakeTests.cmake) +include (CMakeTests.cmake) diff --git a/tools/test/h5jam/CMakeLists.txt b/tools/test/h5jam/CMakeLists.txt index b623860..cc70adc 100644 --- a/tools/test/h5jam/CMakeLists.txt +++ b/tools/test/h5jam/CMakeLists.txt @@ -1,31 +1,29 @@ cmake_minimum_required (VERSION 3.10) -PROJECT (HDF5_TOOLS_TEST_H5JAM) +project (HDF5_TOOLS_TEST_H5JAM C) -#----------------------------------------------------------------------------- -# Setup include Directories -#----------------------------------------------------------------------------- -INCLUDE_DIRECTORIES (${HDF5_TOOLS_DIR}/lib) +# -------------------------------------------------------------------- +# Add the h5jam test executables +# -------------------------------------------------------------------- +if (HDF5_BUILD_GENERATORS) + add_executable (h5jamgentest ${HDF5_TOOLS_TEST_H5JAM_SOURCE_DIR}/h5jamgentest.c) + target_include_directories(h5jamgentest PRIVATE "${HDF5_TOOLS_DIR}/lib;${HDF5_SRC_DIR};${HDF5_BINARY_DIR};$<$:${MPI_C_INCLUDE_DIRS}>") + TARGET_C_PROPERTIES (h5jamgentest STATIC) + target_link_libraries (h5jamgentest PRIVATE ${HDF5_LIB_TARGET}) + set_target_properties (h5jamgentest PROPERTIES FOLDER generator/tools) - # -------------------------------------------------------------------- - # Add the h5jam test executables - # -------------------------------------------------------------------- - if (HDF5_BUILD_GENERATORS) - add_executable (h5jamgentest ${HDF5_TOOLS_TEST_H5JAM_SOURCE_DIR}/h5jamgentest.c) - TARGET_C_PROPERTIES (testhdf5 STATIC " " " ") - target_link_libraries (h5jamgentest ${HDF5_LIB_TARGET}) - set_target_properties (h5jamgentest PROPERTIES FOLDER generator/tools) - - #add_test (NAME h5jamgentest COMMAND $) - endif () + #add_test (NAME h5jamgentest COMMAND $) +endif () add_executable (getub ${HDF5_TOOLS_TEST_H5JAM_SOURCE_DIR}/getub.c) -TARGET_C_PROPERTIES (getub STATIC " " " ") -target_link_libraries (getub ${HDF5_TOOLS_LIB_TARGET} ${HDF5_LIB_TARGET}) +target_include_directories(getub PRIVATE "${HDF5_TOOLS_DIR}/lib;${HDF5_SRC_DIR};${HDF5_BINARY_DIR};$<$:${MPI_C_INCLUDE_DIRS}>") +TARGET_C_PROPERTIES (getub STATIC) +target_link_libraries (getub PRIVATE ${HDF5_TOOLS_LIB_TARGET} ${HDF5_LIB_TARGET}) set_target_properties (getub PROPERTIES FOLDER tools) add_executable (tellub ${HDF5_TOOLS_TEST_H5JAM_SOURCE_DIR}/tellub.c) -TARGET_C_PROPERTIES (tellub STATIC " " " ") -target_link_libraries (tellub ${HDF5_TOOLS_LIB_TARGET} ${HDF5_LIB_TARGET}) +target_include_directories(tellub PRIVATE "${HDF5_TOOLS_DIR}/lib;${HDF5_SRC_DIR};${HDF5_BINARY_DIR};$<$:${MPI_C_INCLUDE_DIRS}>") +TARGET_C_PROPERTIES (tellub STATIC) +target_link_libraries (tellub PRIVATE ${HDF5_TOOLS_LIB_TARGET} ${HDF5_LIB_TARGET}) set_target_properties (tellub PROPERTIES FOLDER tools) - include (CMakeTests.cmake) +include (CMakeTests.cmake) diff --git a/tools/test/h5ls/CMakeLists.txt b/tools/test/h5ls/CMakeLists.txt index 5e7d2e2..5b8cbe0 100644 --- a/tools/test/h5ls/CMakeLists.txt +++ b/tools/test/h5ls/CMakeLists.txt @@ -1,39 +1,33 @@ cmake_minimum_required (VERSION 3.10) -PROJECT (HDF5_TOOLS_TEST_H5LS) +project (HDF5_TOOLS_TEST_H5LS C) #----------------------------------------------------------------------------- -# Setup include Directories +# If plugin library tests can be tested #----------------------------------------------------------------------------- -INCLUDE_DIRECTORIES (${HDF5_TOOLS_DIR}/lib) +set (HDF5_TOOL_PLUGIN_LIB_CORENAME "dynlibls") +set (HDF5_TOOL_PLUGIN_LIB_NAME "${HDF5_EXTERNAL_LIB_PREFIX}${HDF5_TOOL_PLUGIN_LIB_CORENAME}") +set (HDF5_TOOL_PLUGIN_LIB_TARGET ${HDF5_TOOL_PLUGIN_LIB_CORENAME}) - #----------------------------------------------------------------------------- - # If plugin library tests can be tested - #----------------------------------------------------------------------------- - set (HDF5_TOOL_PLUGIN_LIB_CORENAME "dynlibls") - set (HDF5_TOOL_PLUGIN_LIB_NAME "${HDF5_EXTERNAL_LIB_PREFIX}${HDF5_TOOL_PLUGIN_LIB_CORENAME}") - set (HDF5_TOOL_PLUGIN_LIB_TARGET ${HDF5_TOOL_PLUGIN_LIB_CORENAME}) - add_definitions (${HDF_EXTRA_C_FLAGS}) - INCLUDE_DIRECTORIES (${HDF5_SRC_DIR}) +add_library (${HDF5_TOOL_PLUGIN_LIB_TARGET} SHARED dynlib_ls.c) +target_include_directories(${HDF5_TOOL_PLUGIN_LIB_TARGET} PRIVATE "${HDF5_SRC_DIR};${HDF5_BINARY_DIR};$<$:${MPI_C_INCLUDE_DIRS}>") +TARGET_C_PROPERTIES (${HDF5_TOOL_PLUGIN_LIB_TARGET} SHARED) +target_link_libraries (${HDF5_TOOL_PLUGIN_LIB_TARGET} PRIVATE ${HDF5_TEST_LIB_TARGET}) +H5_SET_LIB_OPTIONS (${HDF5_TOOL_PLUGIN_LIB_TARGET} ${HDF5_TOOL_PLUGIN_LIB_NAME} SHARED "LIB") - add_library (${HDF5_TOOL_PLUGIN_LIB_TARGET} SHARED dynlib_ls.c) - TARGET_C_PROPERTIES (${HDF5_TOOL_PLUGIN_LIB_TARGET} SHARED " " " ") - target_link_libraries (${HDF5_TOOL_PLUGIN_LIB_TARGET} ${HDF5_TEST_LIB_TARGET}) - H5_SET_LIB_OPTIONS (${HDF5_TOOL_PLUGIN_LIB_TARGET} ${HDF5_TOOL_PLUGIN_LIB_NAME} SHARED "LIB") - - # make plugins dir - file (MAKE_DIRECTORY "${CMAKE_BINARY_DIR}/plugins") - #----------------------------------------------------------------------------- - # Copy plugin library to a plugins folder - #----------------------------------------------------------------------------- - add_custom_command ( - TARGET ${HDF5_TOOL_PLUGIN_LIB_TARGET} - POST_BUILD - COMMAND ${CMAKE_COMMAND} - ARGS -E copy_if_different - "$" - "${CMAKE_BINARY_DIR}/plugins/$" - ) +# make plugins dir +file (MAKE_DIRECTORY "${CMAKE_BINARY_DIR}/plugins") +#----------------------------------------------------------------------------- +# Copy plugin library to a plugins folder +#----------------------------------------------------------------------------- +add_custom_command ( + TARGET ${HDF5_TOOL_PLUGIN_LIB_TARGET} + POST_BUILD + COMMAND ${CMAKE_COMMAND} + ARGS -E copy_if_different + "$" + "${CMAKE_BINARY_DIR}/plugins/$" +) - include (CMakeTests.cmake) +include (CMakeTests.cmake) - include (CMakeTestsVDS.cmake) +include (CMakeTestsVDS.cmake) diff --git a/tools/test/h5repack/CMakeLists.txt b/tools/test/h5repack/CMakeLists.txt index dbe80f7..2a168e9 100644 --- a/tools/test/h5repack/CMakeLists.txt +++ b/tools/test/h5repack/CMakeLists.txt @@ -1,19 +1,15 @@ cmake_minimum_required (VERSION 3.10) -PROJECT (HDF5_TOOLS_TEST_H5REPACK) - -#----------------------------------------------------------------------------- -# Setup include Directories -#----------------------------------------------------------------------------- -INCLUDE_DIRECTORIES (${HDF5_TOOLS_DIR}/lib) -INCLUDE_DIRECTORIES (${HDF5_TOOLS_DIR}/src/h5repack) -INCLUDE_DIRECTORIES (${HDF5_TEST_SRC_DIR}) +project (HDF5_TOOLS_TEST_H5REPACK C) # -------------------------------------------------------------------- # Add h5Repack test executables # -------------------------------------------------------------------- add_executable (testh5repack_detect_szip ${HDF5_TOOLS_TEST_H5REPACK_SOURCE_DIR}/testh5repack_detect_szip.c) -TARGET_C_PROPERTIES (testh5repack_detect_szip STATIC " " " ") -target_link_libraries (testh5repack_detect_szip ${HDF5_LIB_TARGET} ${HDF5_TOOLS_LIB_TARGET} ${HDF5_TEST_LIB_TARGET}) +target_include_directories(testh5repack_detect_szip + PRIVATE "${HDF5_TOOLS_SRC_H5REPACK_SOURCE_DIR};${HDF5_TOOLS_DIR}/lib;${HDF5_SRC_DIR};${HDF5_BINARY_DIR};$<$:${MPI_C_INCLUDE_DIRS}>" +) +TARGET_C_PROPERTIES (testh5repack_detect_szip STATIC) +target_link_libraries (testh5repack_detect_szip PRIVATE ${HDF5_LIB_TARGET} ${HDF5_TOOLS_LIB_TARGET} ${HDF5_TEST_LIB_TARGET}) set_target_properties (testh5repack_detect_szip PROPERTIES FOLDER tools) set (REPACK_COMMON_SOURCES @@ -26,52 +22,55 @@ set (REPACK_COMMON_SOURCES ${HDF5_TOOLS_SRC_H5REPACK_SOURCE_DIR}/h5repack.c ) add_executable (h5repacktest ${REPACK_COMMON_SOURCES} ${HDF5_TOOLS_TEST_H5REPACK_SOURCE_DIR}/h5repacktst.c) -TARGET_C_PROPERTIES (h5repacktest STATIC " " " ") -target_link_libraries (h5repacktest ${HDF5_TOOLS_LIB_TARGET} ${HDF5_TEST_LIB_TARGET}) +target_include_directories(h5repacktest + PRIVATE "${HDF5_TOOLS_SRC_H5REPACK_SOURCE_DIR};${HDF5_TOOLS_DIR}/lib;${HDF5_SRC_DIR};${HDF5_BINARY_DIR};$<$:${MPI_C_INCLUDE_DIRS}>" +) +TARGET_C_PROPERTIES (h5repacktest STATIC) +target_link_libraries (h5repacktest PRIVATE ${HDF5_TOOLS_LIB_TARGET} ${HDF5_TEST_LIB_TARGET}) set_target_properties (h5repacktest PROPERTIES FOLDER tools) - #----------------------------------------------------------------------------- - # If plugin library tests can be tested - #----------------------------------------------------------------------------- - set (HDF5_TOOL_PLUGIN_LIB_CORENAME "dynlibadd") - set (HDF5_TOOL_PLUGIN_LIB_NAME "${HDF5_EXTERNAL_LIB_PREFIX}${HDF5_TOOL_PLUGIN_LIB_CORENAME}") - set (HDF5_TOOL_PLUGIN_LIB_TARGET ${HDF5_TOOL_PLUGIN_LIB_CORENAME}) - set (HDF5_TOOL_PLUGIN_LIB_VCORENAME "dynlibvers") - set (HDF5_TOOL_PLUGIN_LIB_VNAME "${HDF5_EXTERNAL_LIB_PREFIX}${HDF5_TOOL_PLUGIN_LIB_VCORENAME}") - set (HDF5_TOOL_PLUGIN_LIB_VTARGET ${HDF5_TOOL_PLUGIN_LIB_VCORENAME}) - add_definitions (${HDF_EXTRA_C_FLAGS}) - INCLUDE_DIRECTORIES (${HDF5_SRC_DIR}) +#----------------------------------------------------------------------------- +# If plugin library tests can be tested +#----------------------------------------------------------------------------- +set (HDF5_TOOL_PLUGIN_LIB_CORENAME "dynlibadd") +set (HDF5_TOOL_PLUGIN_LIB_NAME "${HDF5_EXTERNAL_LIB_PREFIX}${HDF5_TOOL_PLUGIN_LIB_CORENAME}") +set (HDF5_TOOL_PLUGIN_LIB_TARGET ${HDF5_TOOL_PLUGIN_LIB_CORENAME}) +set (HDF5_TOOL_PLUGIN_LIB_VCORENAME "dynlibvers") +set (HDF5_TOOL_PLUGIN_LIB_VNAME "${HDF5_EXTERNAL_LIB_PREFIX}${HDF5_TOOL_PLUGIN_LIB_VCORENAME}") +set (HDF5_TOOL_PLUGIN_LIB_VTARGET ${HDF5_TOOL_PLUGIN_LIB_VCORENAME}) - add_library (${HDF5_TOOL_PLUGIN_LIB_TARGET} SHARED dynlib_rpk.c) - TARGET_C_PROPERTIES (${HDF5_TOOL_PLUGIN_LIB_TARGET} SHARED " " " ") - target_link_libraries (${HDF5_TOOL_PLUGIN_LIB_TARGET} ${HDF5_TEST_LIB_TARGET}) - H5_SET_LIB_OPTIONS (${HDF5_TOOL_PLUGIN_LIB_TARGET} ${HDF5_TOOL_PLUGIN_LIB_NAME} SHARED "LIB") +add_library (${HDF5_TOOL_PLUGIN_LIB_TARGET} SHARED dynlib_rpk.c) +target_include_directories(${HDF5_TOOL_PLUGIN_LIB_TARGET} PRIVATE "${HDF5_SRC_DIR};${HDF5_BINARY_DIR};$<$:${MPI_C_INCLUDE_DIRS}>") +TARGET_C_PROPERTIES (${HDF5_TOOL_PLUGIN_LIB_TARGET} SHARED) +target_link_libraries (${HDF5_TOOL_PLUGIN_LIB_TARGET} PRIVATE ${HDF5_TEST_LIB_TARGET}) +H5_SET_LIB_OPTIONS (${HDF5_TOOL_PLUGIN_LIB_TARGET} ${HDF5_TOOL_PLUGIN_LIB_NAME} SHARED "LIB") - add_library (${HDF5_TOOL_PLUGIN_LIB_VTARGET} SHARED dynlib_vrpk.c) - TARGET_C_PROPERTIES (${HDF5_TOOL_PLUGIN_LIB_VTARGET} SHARED " " " ") - target_link_libraries (${HDF5_TOOL_PLUGIN_LIB_VTARGET} ${HDF5_TEST_LIB_TARGET}) - H5_SET_LIB_OPTIONS (${HDF5_TOOL_PLUGIN_LIB_VTARGET} ${HDF5_TOOL_PLUGIN_LIB_VNAME} SHARED "LIB") +add_library (${HDF5_TOOL_PLUGIN_LIB_VTARGET} SHARED dynlib_vrpk.c) +target_include_directories(${HDF5_TOOL_PLUGIN_LIB_VTARGET} PRIVATE "${HDF5_SRC_DIR};${HDF5_BINARY_DIR};$<$:${MPI_C_INCLUDE_DIRS}>") +TARGET_C_PROPERTIES (${HDF5_TOOL_PLUGIN_LIB_VTARGET} SHARED) +target_link_libraries (${HDF5_TOOL_PLUGIN_LIB_VTARGET} PRIVATE ${HDF5_TEST_LIB_TARGET}) +H5_SET_LIB_OPTIONS (${HDF5_TOOL_PLUGIN_LIB_VTARGET} ${HDF5_TOOL_PLUGIN_LIB_VNAME} SHARED "LIB") - # make plugins dir - file (MAKE_DIRECTORY "${CMAKE_BINARY_DIR}/plugins") - #----------------------------------------------------------------------------- - # Copy plugin library to a plugins folder - #----------------------------------------------------------------------------- - add_custom_command ( - TARGET ${HDF5_TOOL_PLUGIN_LIB_TARGET} - POST_BUILD - COMMAND ${CMAKE_COMMAND} - ARGS -E copy_if_different +# make plugins dir +file (MAKE_DIRECTORY "${CMAKE_BINARY_DIR}/plugins") +#----------------------------------------------------------------------------- +# Copy plugin library to a plugins folder +#----------------------------------------------------------------------------- +add_custom_command ( + TARGET ${HDF5_TOOL_PLUGIN_LIB_TARGET} + POST_BUILD + COMMAND ${CMAKE_COMMAND} + ARGS -E copy_if_different "$" "${CMAKE_BINARY_DIR}/plugins/$" - ) - add_custom_command ( - TARGET ${HDF5_TOOL_PLUGIN_LIB_VTARGET} - POST_BUILD - COMMAND ${CMAKE_COMMAND} - ARGS -E copy_if_different +) +add_custom_command ( + TARGET ${HDF5_TOOL_PLUGIN_LIB_VTARGET} + POST_BUILD + COMMAND ${CMAKE_COMMAND} + ARGS -E copy_if_different "$" "${CMAKE_BINARY_DIR}/plugins/$" - ) +) - include (CMakeTests.cmake) +include (CMakeTests.cmake) diff --git a/tools/test/h5stat/CMakeLists.txt b/tools/test/h5stat/CMakeLists.txt index 5f645097..e65c76f 100644 --- a/tools/test/h5stat/CMakeLists.txt +++ b/tools/test/h5stat/CMakeLists.txt @@ -1,21 +1,17 @@ cmake_minimum_required (VERSION 3.10) -PROJECT (HDF5_TOOLS_TEST_H5STAT) +project (HDF5_TOOLS_TEST_H5STAT C) -#----------------------------------------------------------------------------- -# Setup include Directories -#----------------------------------------------------------------------------- -INCLUDE_DIRECTORIES (${HDF5_TOOLS_DIR}/lib) +# -------------------------------------------------------------------- +# Add the h5stat test executables +# -------------------------------------------------------------------- +if (HDF5_BUILD_GENERATORS) + add_executable (h5stat_gentest ${HDF5_TOOLS_TEST_H5STAT_SOURCE_DIR}/h5stat_gentest.c) + target_include_directories(h5stat_gentest PRIVATE "${HDF5_SRC_DIR};${HDF5_BINARY_DIR};$<$:${MPI_C_INCLUDE_DIRS}>") + TARGET_C_PROPERTIES (h5stat_gentest STATIC) + target_link_libraries (h5stat_gentest PRIVATE ${HDF5_LIB_TARGET}) + set_target_properties (h5stat_gentest PROPERTIES FOLDER generator/tools) - # -------------------------------------------------------------------- - # Add the h5stat test executables - # -------------------------------------------------------------------- - if (HDF5_BUILD_GENERATORS) - add_executable (h5stat_gentest ${HDF5_TOOLS_TEST_H5STAT_SOURCE_DIR}/h5stat_gentest.c) - TARGET_C_PROPERTIES (h5stat_gentest STATIC " " " ") - target_link_libraries (h5stat_gentest ${HDF5_LIB_TARGET}) - set_target_properties (h5stat_gentest PROPERTIES FOLDER generator/tools) + #add_test (NAME h5stat_gentest COMMAND $) +endif () - #add_test (NAME h5stat_gentest COMMAND $) - endif () - - include (CMakeTests.cmake) +include (CMakeTests.cmake) diff --git a/tools/test/h5stat/CMakeTests.cmake b/tools/test/h5stat/CMakeTests.cmake index 8d796ad..69bab20 100644 --- a/tools/test/h5stat/CMakeTests.cmake +++ b/tools/test/h5stat/CMakeTests.cmake @@ -37,6 +37,7 @@ h5stat_newgrat-UG h5stat_newgrat-UA h5stat_err1_links + h5stat_idx h5stat_links1 h5stat_links2 h5stat_links3 @@ -54,6 +55,7 @@ ) set (HDF5_REFERENCE_TEST_FILES h5stat_filters.h5 + h5stat_idx.h5 h5stat_tsohm.h5 h5stat_newgrat.h5 h5stat_threshold.h5 @@ -157,6 +159,10 @@ ADD_H5_TEST (h5stat_newgrat 0 h5stat_newgrat.h5) ADD_H5_TEST (h5stat_newgrat-UG 0 -G h5stat_newgrat.h5) ADD_H5_TEST (h5stat_newgrat-UA 0 -A h5stat_newgrat.h5) +# h5stat_idx.h5 is generated by h5stat_gentest.c + if (HDF5_BUILD_GENERATORS) + ADD_H5_TEST (h5stat_idx 0 h5stat_idx.h5) + endif () # # Tests for -l (--links) option on h5stat_threshold.h5: # -l 0 (incorrect threshold value) diff --git a/tools/test/misc/CMakeLists.txt b/tools/test/misc/CMakeLists.txt index 084751a..556b5b2 100644 --- a/tools/test/misc/CMakeLists.txt +++ b/tools/test/misc/CMakeLists.txt @@ -1,41 +1,40 @@ cmake_minimum_required (VERSION 3.10) -PROJECT (HDF5_TOOLS_TEST_MISC) - -#----------------------------------------------------------------------------- -# Setup include Directories -#----------------------------------------------------------------------------- -INCLUDE_DIRECTORIES (${HDF5_TOOLS_DIR}/lib) - - # -------------------------------------------------------------------- - # Add the misc test executables - # -------------------------------------------------------------------- - if (HDF5_BUILD_GENERATORS) - add_executable (h5repart_gentest ${HDF5_TOOLS_TEST_MISC_SOURCE_DIR}/h5repart_gentest.c) - TARGET_C_PROPERTIES (h5repart_gentest STATIC " " " ") - target_link_libraries (h5repart_gentest ${HDF5_LIB_TARGET} ${HDF5_TOOLS_LIB_TARGET}) - set_target_properties (h5repart_gentest PROPERTIES FOLDER generator/tools) - #add_test (NAME h5repart_gentest COMMAND $) - - add_executable (h5clear_gentest ${HDF5_TOOLS_TEST_MISC_SOURCE_DIR}/h5clear_gentest.c) - TARGET_C_PROPERTIES (h5clear_gentest STATIC " " " ") - target_link_libraries (h5clear_gentest ${HDF5_LIB_TARGET} ${HDF5_TOOLS_LIB_TARGET}) - set_target_properties (h5clear_gentest PROPERTIES FOLDER tools) - #add_test (NAME H5CLEAR-h5clear_gentest COMMAND $) - - add_subdirectory (vds) - - endif () - - add_executable (h5repart_test ${HDF5_TOOLS_TEST_MISC_SOURCE_DIR}/repart_test.c) - TARGET_C_PROPERTIES (h5repart_test STATIC " " " ") - target_link_libraries (h5repart_test ${HDF5_LIB_TARGET} ${HDF5_TOOLS_LIB_TARGET}) - set_target_properties (h5repart_test PROPERTIES FOLDER tools) - - add_executable (clear_open_chk ${HDF5_TOOLS_TEST_MISC_SOURCE_DIR}/clear_open_chk.c) - TARGET_C_PROPERTIES (clear_open_chk STATIC " " " ") - target_link_libraries (clear_open_chk ${HDF5_LIB_TARGET} ${HDF5_TOOLS_LIB_TARGET}) - set_target_properties (clear_open_chk PROPERTIES FOLDER tools) - - include (CMakeTestsRepart.cmake) - include (CMakeTestsClear.cmake) - include (CMakeTestsMkgrp.cmake) +project (HDF5_TOOLS_TEST_MISC C) + +# -------------------------------------------------------------------- +# Add the misc test executables +# -------------------------------------------------------------------- +if (HDF5_BUILD_GENERATORS) + add_executable (h5repart_gentest ${HDF5_TOOLS_TEST_MISC_SOURCE_DIR}/h5repart_gentest.c) + target_include_directories(h5repart_gentest PRIVATE "${HDF5_SRC_DIR};${HDF5_BINARY_DIR};$<$:${MPI_C_INCLUDE_DIRS}>") + TARGET_C_PROPERTIES (h5repart_gentest STATIC) + target_link_libraries (h5repart_gentest PRIVATE ${HDF5_LIB_TARGET} ${HDF5_TOOLS_LIB_TARGET}) + set_target_properties (h5repart_gentest PROPERTIES FOLDER generator/tools) + #add_test (NAME h5repart_gentest COMMAND $) + + add_executable (h5clear_gentest ${HDF5_TOOLS_TEST_MISC_SOURCE_DIR}/h5clear_gentest.c) + target_include_directories(h5clear_gentest PRIVATE "${HDF5_SRC_DIR};${HDF5_BINARY_DIR};$<$:${MPI_C_INCLUDE_DIRS}>") + TARGET_C_PROPERTIES (h5clear_gentest STATIC) + target_link_libraries (h5clear_gentest PRIVATE ${HDF5_LIB_TARGET} ${HDF5_TOOLS_LIB_TARGET}) + set_target_properties (h5clear_gentest PROPERTIES FOLDER tools) + #add_test (NAME H5CLEAR-h5clear_gentest COMMAND $) + + add_subdirectory (vds) + +endif () + +add_executable (h5repart_test ${HDF5_TOOLS_TEST_MISC_SOURCE_DIR}/repart_test.c) +target_include_directories(h5repart_test PRIVATE "${HDF5_SRC_DIR};${HDF5_BINARY_DIR};$<$:${MPI_C_INCLUDE_DIRS}>") +TARGET_C_PROPERTIES (h5repart_test STATIC) +target_link_libraries (h5repart_test PRIVATE ${HDF5_LIB_TARGET} ${HDF5_TOOLS_LIB_TARGET}) +set_target_properties (h5repart_test PROPERTIES FOLDER tools) + +add_executable (clear_open_chk ${HDF5_TOOLS_TEST_MISC_SOURCE_DIR}/clear_open_chk.c) +target_include_directories(clear_open_chk PRIVATE "${HDF5_SRC_DIR};${HDF5_BINARY_DIR};$<$:${MPI_C_INCLUDE_DIRS}>") +TARGET_C_PROPERTIES (clear_open_chk STATIC) +target_link_libraries (clear_open_chk PRIVATE ${HDF5_LIB_TARGET} ${HDF5_TOOLS_LIB_TARGET}) +set_target_properties (clear_open_chk PROPERTIES FOLDER tools) + +include (CMakeTestsRepart.cmake) +include (CMakeTestsClear.cmake) +include (CMakeTestsMkgrp.cmake) diff --git a/tools/test/misc/h5clear_gentest.c b/tools/test/misc/h5clear_gentest.c index ccb510f..88c8ea5 100644 --- a/tools/test/misc/h5clear_gentest.c +++ b/tools/test/misc/h5clear_gentest.c @@ -166,7 +166,6 @@ gen_enhance_files(hbool_t user) { hid_t fid = -1; /* File ID */ hid_t fcpl = -1; /* File creation property list */ - hid_t fapl = -1; /* File access property list */ hid_t sid = -1; /* Dataspace ID */ hid_t did = -1; /* Dataset ID */ hsize_t dim[1]; /* Dimension sizes */ diff --git a/tools/test/misc/vds/CMakeLists.txt b/tools/test/misc/vds/CMakeLists.txt index 50aade4..98bce4d 100644 --- a/tools/test/misc/vds/CMakeLists.txt +++ b/tools/test/misc/vds/CMakeLists.txt @@ -1,15 +1,11 @@ cmake_minimum_required (VERSION 3.10) -PROJECT (HDF5_TOOLS_TEST_MISC_VDS) - -#----------------------------------------------------------------------------- -# Setup include Directories -#----------------------------------------------------------------------------- -INCLUDE_DIRECTORIES (${HDF5_TOOLS_DIR}/lib) +project (HDF5_TOOLS_TEST_MISC_VDS C) MACRO (ADD_H5_GENERATOR genfile) add_executable (${genfile} ${HDF5_TOOLS_TEST_MISC_VDS_SOURCE_DIR}/${genfile}.c) - TARGET_C_PROPERTIES (${genfile} STATIC " " " ") - target_link_libraries (${genfile} ${HDF5_LIB_TARGET} ${HDF5_TOOLS_LIB_TARGET}) + target_include_directories(${genfile} PRIVATE "${HDF5_SRC_DIR};${HDF5_BINARY_DIR};$<$:${MPI_C_INCLUDE_DIRS}>") + TARGET_C_PROPERTIES (${genfile} STATIC) + target_link_libraries (${genfile} PRIVATE ${HDF5_LIB_TARGET} ${HDF5_TOOLS_LIB_TARGET}) set_target_properties (${genfile} PROPERTIES FOLDER generator/tools) ENDMACRO () diff --git a/tools/test/perform/CMakeLists.txt b/tools/test/perform/CMakeLists.txt index 5104b90..fa41608 100644 --- a/tools/test/perform/CMakeLists.txt +++ b/tools/test/perform/CMakeLists.txt @@ -1,16 +1,5 @@ cmake_minimum_required (VERSION 3.10) -PROJECT (HDF5_TOOLS_TEST_PERFORM ) - -#----------------------------------------------------------------------------- -# Apply Definitions to compiler in this directory and below -#----------------------------------------------------------------------------- -add_definitions (${HDF_EXTRA_C_FLAGS}) - -#----------------------------------------------------------------------------- -# Setup include Directories -#----------------------------------------------------------------------------- -INCLUDE_DIRECTORIES (${HDF5_TEST_SRC_DIR}) -INCLUDE_DIRECTORIES (${HDF5_TOOLS_DIR}/lib ) +project (HDF5_TOOLS_TEST_PERFORM C) # -------------------------------------------------------------------- # Add the executables @@ -21,8 +10,9 @@ set (h5perf_serial_SOURCES ${HDF5_TOOLS_TEST_PERFORM_SOURCE_DIR}/sio_engine.c ) add_executable (h5perf_serial ${h5perf_serial_SOURCES}) -TARGET_C_PROPERTIES (h5perf_serial STATIC " " " ") -target_link_libraries (h5perf_serial ${HDF5_LIB_TARGET} ${HDF5_TOOLS_LIB_TARGET}) +target_include_directories(h5perf_serial PRIVATE "${HDF5_TEST_SRC_DIR};${HDF5_SRC_DIR};${HDF5_BINARY_DIR};$<$:${MPI_C_INCLUDE_DIRS}>") +TARGET_C_PROPERTIES (h5perf_serial STATIC) +target_link_libraries (h5perf_serial PRIVATE ${HDF5_LIB_TARGET} ${HDF5_TOOLS_LIB_TARGET}) set_target_properties (h5perf_serial PROPERTIES FOLDER perform) if (HDF5_BUILD_PERFORM_STANDALONE) @@ -32,8 +22,9 @@ if (HDF5_BUILD_PERFORM_STANDALONE) ${HDF5_TOOLS_TEST_PERFORM_SOURCE_DIR}/sio_engine.c ) add_executable (h5perf_serial_alone ${h5perf_serial_alone_SOURCES}) - TARGET_C_PROPERTIES (h5perf_serial_alone STATIC " " " ") - target_link_libraries (h5perf_serial_alone ${HDF5_LIB_TARGET} ${HDF5_TOOLS_LIB_TARGET}) + target_include_directories(h5perf_serial_alone PRIVATE "${HDF5_SRC_DIR};${HDF5_BINARY_DIR};$<$:${MPI_C_INCLUDE_DIRS}>") + TARGET_C_PROPERTIES (h5perf_serial_alone STATIC) + target_link_libraries (h5perf_serial_alone PRIVATE ${HDF5_LIB_TARGET} ${HDF5_TOOLS_LIB_TARGET}) set_target_properties (h5perf_serial_alone PROPERTIES FOLDER perform) set_property (TARGET h5perf_serial_alone APPEND PROPERTY COMPILE_DEFINITIONS STANDALONE @@ -44,9 +35,10 @@ endif () set (chunk_SOURCES ${HDF5_TOOLS_TEST_PERFORM_SOURCE_DIR}/chunk.c ) -ADD_EXECUTABLE(chunk ${chunk_SOURCES}) -TARGET_C_PROPERTIES (chunk STATIC " " " ") -TARGET_LINK_LIBRARIES(chunk ${HDF5_LIB_TARGET} ${HDF5_TOOLS_LIB_TARGET}) +add_executable(chunk ${chunk_SOURCES}) +target_include_directories(chunk PRIVATE "${HDF5_SRC_DIR};${HDF5_BINARY_DIR};$<$:${MPI_C_INCLUDE_DIRS}>") +TARGET_C_PROPERTIES (chunk STATIC) +target_link_libraries(chunk PRIVATE ${HDF5_LIB_TARGET} ${HDF5_TOOLS_LIB_TARGET}) set_target_properties (chunk PROPERTIES FOLDER perform) #-- Adding test for iopipe @@ -54,8 +46,9 @@ set (iopipe_SOURCES ${HDF5_TOOLS_TEST_PERFORM_SOURCE_DIR}/iopipe.c ) add_executable (iopipe ${iopipe_SOURCES}) -TARGET_C_PROPERTIES (iopipe STATIC " " " ") -target_link_libraries (iopipe ${HDF5_LIB_TARGET} ${HDF5_TOOLS_LIB_TARGET}) +target_include_directories(iopipe PRIVATE "${HDF5_SRC_DIR};${HDF5_BINARY_DIR};$<$:${MPI_C_INCLUDE_DIRS}>") +TARGET_C_PROPERTIES (iopipe STATIC) +target_link_libraries (iopipe PRIVATE ${HDF5_LIB_TARGET} ${HDF5_TOOLS_LIB_TARGET}) set_target_properties (iopipe PROPERTIES FOLDER perform) #-- Adding test for overhead @@ -63,26 +56,29 @@ set (overhead_SOURCES ${HDF5_TOOLS_TEST_PERFORM_SOURCE_DIR}/overhead.c ) add_executable (overhead ${overhead_SOURCES}) -TARGET_C_PROPERTIES (overhead STATIC " " " ") -target_link_libraries (overhead ${HDF5_LIB_TARGET} ${HDF5_TOOLS_LIB_TARGET}) +target_include_directories(overhead PRIVATE "${HDF5_SRC_DIR};${HDF5_BINARY_DIR};$<$:${MPI_C_INCLUDE_DIRS}>") +TARGET_C_PROPERTIES (overhead STATIC) +target_link_libraries (overhead PRIVATE ${HDF5_LIB_TARGET} ${HDF5_TOOLS_LIB_TARGET}) set_target_properties (overhead PROPERTIES FOLDER perform) #-- Adding test for perf_meta - set (perf_meta_SOURCES - ${HDF5_TOOLS_TEST_PERFORM_SOURCE_DIR}/perf_meta.c - ) - add_executable (perf_meta ${perf_meta_SOURCES}) - TARGET_C_PROPERTIES (perf_meta STATIC " " " ") - target_link_libraries (perf_meta ${HDF5_LIB_TARGET} ${HDF5_TOOLS_LIB_TARGET} ${HDF5_TEST_LIB_TARGET}) - set_target_properties (perf_meta PROPERTIES FOLDER perform) +set (perf_meta_SOURCES + ${HDF5_TOOLS_TEST_PERFORM_SOURCE_DIR}/perf_meta.c +) +add_executable (perf_meta ${perf_meta_SOURCES}) +target_include_directories(perf_meta PRIVATE "${HDF5_TEST_SRC_DIR};${HDF5_SRC_DIR};${HDF5_BINARY_DIR};$<$:${MPI_C_INCLUDE_DIRS}>") +TARGET_C_PROPERTIES (perf_meta STATIC) +target_link_libraries (perf_meta PRIVATE ${HDF5_LIB_TARGET} ${HDF5_TOOLS_LIB_TARGET} ${HDF5_TEST_LIB_TARGET}) +set_target_properties (perf_meta PROPERTIES FOLDER perform) #-- Adding test for zip_perf set (zip_perf_SOURCES ${HDF5_TOOLS_TEST_PERFORM_SOURCE_DIR}/zip_perf.c ) add_executable (zip_perf ${zip_perf_SOURCES}) -TARGET_C_PROPERTIES (zip_perf STATIC " " " ") -target_link_libraries (zip_perf ${HDF5_TOOLS_LIB_TARGET} ${HDF5_LIB_TARGET}) +target_include_directories(zip_perf PRIVATE "${HDF5_TEST_SRC_DIR};${HDF5_SRC_DIR};${HDF5_BINARY_DIR};$<$:${MPI_C_INCLUDE_DIRS}>") +TARGET_C_PROPERTIES (zip_perf STATIC) +target_link_libraries (zip_perf PRIVATE ${HDF5_TOOLS_LIB_TARGET} ${HDF5_LIB_TARGET}) set_target_properties (zip_perf PROPERTIES FOLDER perform) if (H5_HAVE_PARALLEL AND BUILD_TESTING) @@ -92,8 +88,9 @@ if (H5_HAVE_PARALLEL AND BUILD_TESTING) ${HDF5_TOOLS_TEST_PERFORM_SOURCE_DIR}/pio_engine.c ) add_executable (h5perf ${h5perf_SOURCES}) - TARGET_C_PROPERTIES (h5perf STATIC " " " ") - target_link_libraries (h5perf ${HDF5_LIB_TARGET} ${HDF5_TOOLS_LIB_TARGET} ${HDF5_TEST_LIB_TARGET}) + target_include_directories(h5perf PRIVATE "${HDF5_SRC_DIR};${HDF5_BINARY_DIR};$<$:${MPI_C_INCLUDE_DIRS}>") + TARGET_C_PROPERTIES (h5perf STATIC) + target_link_libraries (h5perf PRIVATE ${HDF5_LIB_TARGET} ${HDF5_TOOLS_LIB_TARGET} ${HDF5_TEST_LIB_TARGET}) set_target_properties (h5perf PROPERTIES FOLDER perform) if (HDF5_BUILD_PERFORM_STANDALONE) @@ -103,8 +100,9 @@ if (H5_HAVE_PARALLEL AND BUILD_TESTING) ${HDF5_TOOLS_TEST_PERFORM_SOURCE_DIR}/pio_engine.c ) add_executable (h5perf_alone ${h5perf_alone_SOURCES}) - TARGET_C_PROPERTIES (h5perf_alone STATIC " " " ") - target_link_libraries (h5perf_alone ${HDF5_LIB_TARGET} ${HDF5_TOOLS_LIB_TARGET} ${HDF5_TEST_LIB_TARGET}) + target_include_directories(h5perf_alone PRIVATE "${HDF5_SRC_DIR};${HDF5_BINARY_DIR};$<$:${MPI_C_INCLUDE_DIRS}>") + TARGET_C_PROPERTIES (h5perf_alone STATIC) + target_link_libraries (h5perf_alone PRIVATE ${HDF5_LIB_TARGET} ${HDF5_TOOLS_LIB_TARGET} ${HDF5_TEST_LIB_TARGET}) set_target_properties (h5perf_alone PROPERTIES FOLDER perform) set_property (TARGET h5perf_alone APPEND PROPERTY COMPILE_DEFINITIONS STANDALONE -- cgit v0.12 From cc5332e1b4f9547cfec29dbc2515870534e68412 Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Tue, 22 May 2018 10:43:58 -0500 Subject: Correct attribute location --- config/cmake/ConversionTests.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/config/cmake/ConversionTests.c b/config/cmake/ConversionTests.c index 002bc88..321d879 100644 --- a/config/cmake/ConversionTests.c +++ b/config/cmake/ConversionTests.c @@ -25,7 +25,7 @@ #include #include -int main(void) HDF_NO_UBSAN +int HDF_NO_UBSAN main(void) { long double ld = 20041683600089727.779961L; long ll; @@ -86,7 +86,7 @@ done: #include #include -int main(void) HDF_NO_UBSAN +int HDF_NO_UBSAN main(void) { long double ld; long ll; @@ -149,7 +149,7 @@ done: #include #include -int main(void) HDF_NO_UBSAN +int HDF_NO_UBSAN main(void) { long double ld = 20041683600089727.779961L; long long ll; @@ -192,7 +192,7 @@ done: #include #include -int main(void) HDF_NO_UBSAN +int HDF_NO_UBSAN main(void) { long double ld; long long ll; @@ -253,8 +253,8 @@ int FC_DUMMY_MAIN() { return 1;} #endif #endif -int -main () HDF_NO_UBSAN +int HDF_NO_UBSAN +main () { char *chp = "beefs"; -- cgit v0.12 From ab8a7235c3892ac0427f37661aa0d821993dae9b Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Tue, 22 May 2018 11:04:50 -0500 Subject: HDFFV-10473 add note for attribute fix --- release_docs/RELEASE.txt | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/release_docs/RELEASE.txt b/release_docs/RELEASE.txt index 3abac10..27540fa 100644 --- a/release_docs/RELEASE.txt +++ b/release_docs/RELEASE.txt @@ -114,7 +114,16 @@ Bug Fixes since HDF5-1.10.2 release Configuration ------------- - Reworked java test suite into individual JUnit tests. + - Moved the location of gcc attribute. + + The gcc attribute(no_sanitize), named as the macro HDF_NO_UBSAN, + was located after the function name. Builds with GCC 7 did not + indicate any problem, but GCC 8 issued errors. Moved the + attribute before the function name, as required. + + (ADB 2018/05/22, HDFFV-10473) + + - Reworked java test suite into individual JUnit tests. Testing the whole suite of java unit tests in a single JUnit run made it difficult to determine actual failures when tests would fail. -- cgit v0.12 From d081b0b0f5fa86637c30b0a675c455a352071bbe Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Fri, 25 May 2018 09:49:21 -0500 Subject: Merge corrections from develop --- fortran/examples/CMakeLists.txt | 2 +- java/test/junit.sh.in | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/fortran/examples/CMakeLists.txt b/fortran/examples/CMakeLists.txt index c836c17..68b817e 100644 --- a/fortran/examples/CMakeLists.txt +++ b/fortran/examples/CMakeLists.txt @@ -54,7 +54,7 @@ foreach (example ${examples}) # LINK_FLAGS $<$:> # ) if(MSVC) - set_property(TARGET H5_buildiface PROPERTY LINK_FLAGS "/SUBSYSTEM:CONSOLE ${WIN_LINK_FLAGS}") + set_property(TARGET f90_ex_${example} PROPERTY LINK_FLAGS "/SUBSYSTEM:CONSOLE ${WIN_LINK_FLAGS}") endif() set_target_properties (f90_ex_${example} PROPERTIES LINKER_LANGUAGE Fortran diff --git a/java/test/junit.sh.in b/java/test/junit.sh.in index c74d2e0..07c3242 100644 --- a/java/test/junit.sh.in +++ b/java/test/junit.sh.in @@ -224,8 +224,8 @@ CLEAN_DATAFILES_AND_BLDDIR() INODE_SDIR=`$LS -i -d $SDIR | $AWK -F' ' '{print $1}'` INODE_DDIR=`$LS -i -d $BLDDIR | $AWK -F' ' '{print $1}'` if [ "$INODE_SDIR" != "$INODE_DDIR" ]; then - $RM $BLDDIR/JUnit-interface.ert - $RM $BLDDIR/JUnit-interface.txt + $RM $BLDDIR/JUnit-*.ert + $RM $BLDDIR/JUnit-*.txt fi } -- cgit v0.12 From f8690c40b93a44bb2c3947ad41126c13549f2ad4 Mon Sep 17 00:00:00 2001 From: hdftest Date: Tue, 29 May 2018 15:16:31 -0500 Subject: Updated version to 1.10.3-snap2 --- README.txt | 2 +- c++/src/cpp_doc_config | 2 +- config/cmake/scripts/HDF5config.cmake | 2 +- configure.ac | 2 +- release_docs/RELEASE.txt | 2 +- src/H5public.h | 4 ++-- 6 files changed, 7 insertions(+), 7 deletions(-) diff --git a/README.txt b/README.txt index 8a06e1d..3651732 100644 --- a/README.txt +++ b/README.txt @@ -1,4 +1,4 @@ -HDF5 version 1.10.3-snap1 currently under development +HDF5 version 1.10.3-snap2 currently under development ------------------------------------------------------------------------------ Please refer to the release_docs/INSTALL file for installation instructions. diff --git a/c++/src/cpp_doc_config b/c++/src/cpp_doc_config index 78afed0..fe256f7 100644 --- a/c++/src/cpp_doc_config +++ b/c++/src/cpp_doc_config @@ -38,7 +38,7 @@ PROJECT_NAME = # could be handy for archiving the generated documentation or if some version # control system is used. -PROJECT_NUMBER = "1.10.3-snap1, currently under development" +PROJECT_NUMBER = "1.10.3-snap2, currently under development" # Using the PROJECT_BRIEF tag one can provide an optional one line description # for a project that appears at the top of each page and should give viewer a diff --git a/config/cmake/scripts/HDF5config.cmake b/config/cmake/scripts/HDF5config.cmake index 06ea270..8258dcb 100755 --- a/config/cmake/scripts/HDF5config.cmake +++ b/config/cmake/scripts/HDF5config.cmake @@ -35,7 +35,7 @@ cmake_minimum_required (VERSION 3.10) ############################################################################## set (CTEST_SOURCE_VERSION "1.10.3") -set (CTEST_SOURCE_VERSEXT "-snap1") +set (CTEST_SOURCE_VERSEXT "-snap2") ############################################################################## # handle input parameters to script. diff --git a/configure.ac b/configure.ac index 422096c..d17d2d1 100644 --- a/configure.ac +++ b/configure.ac @@ -24,7 +24,7 @@ AC_PREREQ([2.69]) ## NOTE: Do not forget to change the version number here when we do a ## release!!! ## -AC_INIT([HDF5], [1.10.3-snap1], [help@hdfgroup.org]) +AC_INIT([HDF5], [1.10.3-snap2], [help@hdfgroup.org]) AC_CONFIG_SRCDIR([src/H5.c]) AC_CONFIG_HEADERS([src/H5config.h]) diff --git a/release_docs/RELEASE.txt b/release_docs/RELEASE.txt index d3283d0..ba38976 100644 --- a/release_docs/RELEASE.txt +++ b/release_docs/RELEASE.txt @@ -1,4 +1,4 @@ -HDF5 version 1.10.3-snap1 currently under development +HDF5 version 1.10.3-snap2 currently under development ================================================================================ diff --git a/src/H5public.h b/src/H5public.h index 142b3d3..abb699b 100644 --- a/src/H5public.h +++ b/src/H5public.h @@ -94,9 +94,9 @@ extern "C" { #define H5_VERS_MAJOR 1 /* For major interface/format changes */ #define H5_VERS_MINOR 10 /* For minor interface/format changes */ #define H5_VERS_RELEASE 3 /* For tweaks, bug-fixes, or development */ -#define H5_VERS_SUBRELEASE "snap1" /* For pre-releases like snap0 */ +#define H5_VERS_SUBRELEASE "snap2" /* For pre-releases like snap0 */ /* Empty string for real releases. */ -#define H5_VERS_INFO "HDF5 library version: 1.10.3-snap1" /* Full version string */ +#define H5_VERS_INFO "HDF5 library version: 1.10.3-snap2" /* Full version string */ #define H5check() H5check_version(H5_VERS_MAJOR,H5_VERS_MINOR, \ H5_VERS_RELEASE) -- cgit v0.12 From afe28b7607204a2e9e753bb663d09454057d8196 Mon Sep 17 00:00:00 2001 From: hdftest Date: Sun, 3 Jun 2018 21:53:30 -0500 Subject: Snapshot version 1.10 release 3 (snap2) --- README.txt | 2 +- c++/src/cpp_doc_config | 2 +- config/cmake/scripts/HDF5config.cmake | 2 +- configure.ac | 2 +- release_docs/RELEASE.txt | 2 +- src/H5public.h | 4 ++-- 6 files changed, 7 insertions(+), 7 deletions(-) diff --git a/README.txt b/README.txt index 3651732..89bdd99 100644 --- a/README.txt +++ b/README.txt @@ -1,4 +1,4 @@ -HDF5 version 1.10.3-snap2 currently under development +HDF5 version 1.10.3-snap3 currently under development ------------------------------------------------------------------------------ Please refer to the release_docs/INSTALL file for installation instructions. diff --git a/c++/src/cpp_doc_config b/c++/src/cpp_doc_config index fe256f7..f0a83c6 100644 --- a/c++/src/cpp_doc_config +++ b/c++/src/cpp_doc_config @@ -38,7 +38,7 @@ PROJECT_NAME = # could be handy for archiving the generated documentation or if some version # control system is used. -PROJECT_NUMBER = "1.10.3-snap2, currently under development" +PROJECT_NUMBER = "1.10.3-snap3, currently under development" # Using the PROJECT_BRIEF tag one can provide an optional one line description # for a project that appears at the top of each page and should give viewer a diff --git a/config/cmake/scripts/HDF5config.cmake b/config/cmake/scripts/HDF5config.cmake index 8258dcb..6ce2370 100755 --- a/config/cmake/scripts/HDF5config.cmake +++ b/config/cmake/scripts/HDF5config.cmake @@ -35,7 +35,7 @@ cmake_minimum_required (VERSION 3.10) ############################################################################## set (CTEST_SOURCE_VERSION "1.10.3") -set (CTEST_SOURCE_VERSEXT "-snap2") +set (CTEST_SOURCE_VERSEXT "-snap3") ############################################################################## # handle input parameters to script. diff --git a/configure.ac b/configure.ac index d17d2d1..1a62695 100644 --- a/configure.ac +++ b/configure.ac @@ -24,7 +24,7 @@ AC_PREREQ([2.69]) ## NOTE: Do not forget to change the version number here when we do a ## release!!! ## -AC_INIT([HDF5], [1.10.3-snap2], [help@hdfgroup.org]) +AC_INIT([HDF5], [1.10.3-snap3], [help@hdfgroup.org]) AC_CONFIG_SRCDIR([src/H5.c]) AC_CONFIG_HEADERS([src/H5config.h]) diff --git a/release_docs/RELEASE.txt b/release_docs/RELEASE.txt index ba38976..0318cf2 100644 --- a/release_docs/RELEASE.txt +++ b/release_docs/RELEASE.txt @@ -1,4 +1,4 @@ -HDF5 version 1.10.3-snap2 currently under development +HDF5 version 1.10.3-snap3 currently under development ================================================================================ diff --git a/src/H5public.h b/src/H5public.h index abb699b..6991de8 100644 --- a/src/H5public.h +++ b/src/H5public.h @@ -94,9 +94,9 @@ extern "C" { #define H5_VERS_MAJOR 1 /* For major interface/format changes */ #define H5_VERS_MINOR 10 /* For minor interface/format changes */ #define H5_VERS_RELEASE 3 /* For tweaks, bug-fixes, or development */ -#define H5_VERS_SUBRELEASE "snap2" /* For pre-releases like snap0 */ +#define H5_VERS_SUBRELEASE "snap3" /* For pre-releases like snap0 */ /* Empty string for real releases. */ -#define H5_VERS_INFO "HDF5 library version: 1.10.3-snap2" /* Full version string */ +#define H5_VERS_INFO "HDF5 library version: 1.10.3-snap3" /* Full version string */ #define H5check() H5check_version(H5_VERS_MAJOR,H5_VERS_MINOR, \ H5_VERS_RELEASE) -- cgit v0.12 From eb9f86e38a0be9650669132501ef2ab72b21270f Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Mon, 11 Jun 2018 14:32:41 -0500 Subject: HDFFV-10433 Updated text to address issues raised. --- release_docs/INSTALL_CMake.txt | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/release_docs/INSTALL_CMake.txt b/release_docs/INSTALL_CMake.txt index a2d209a..2d75d14 100644 --- a/release_docs/INSTALL_CMake.txt +++ b/release_docs/INSTALL_CMake.txt @@ -35,7 +35,8 @@ CMake version Note: To change the install prefix from the platform defaults initialize - the CMake variable, CMAKE_INSTALL_PREFIX. + the CMake variable, CMAKE_INSTALL_PREFIX. Users of build scripts + will use the INSTALLDIR option. ======================================================================== @@ -89,14 +90,14 @@ To build HDF5 with the SZIP and ZLIB external libraries you will need to: 5. From the "myhdfstuff" directory execute the CTest Script with the following options: + On 32-bit Windows with Visual Studio 2017, execute: + ctest -S HDF5config.cmake,BUILD_GENERATOR=VS2017 -C Release -VV -O hdf5.log + On 64-bit Windows with Visual Studio 2017, execute: + ctest -S HDF5config.cmake,BUILD_GENERATOR=VS201764 -C Release -VV -O hdf5.log On 32-bit Windows with Visual Studio 2015, execute: ctest -S HDF5config.cmake,BUILD_GENERATOR=VS2015 -C Release -VV -O hdf5.log On 64-bit Windows with Visual Studio 2015, execute: ctest -S HDF5config.cmake,BUILD_GENERATOR=VS201564 -C Release -VV -O hdf5.log - On 32-bit Windows with Visual Studio 2013, execute: - ctest -S HDF5config.cmake,BUILD_GENERATOR=VS2013 -C Release -VV -O hdf5.log - On 64-bit Windows with Visual Studio 2013, execute: - ctest -S HDF5config.cmake,BUILD_GENERATOR=VS201364 -C Release -VV -O hdf5.log On Linux and Mac, execute: ctest -S HDF5config.cmake,BUILD_GENERATOR=Unix -C Release -VV -O hdf5.log The supplied build scripts are versions of the above. @@ -167,6 +168,14 @@ To build HDF5 with the SZIP and ZLIB external libraries you will need to: By default the installation will create the bin, include, lib and cmake folders in the /HDF_Group/HDF5/1.10."X" + The depends on the build platform; + Windows will set the default to: + C:/Program Files/HDF_Group/HDF5/1.10."X" + Linux will set the default to: + "myhdfstuff/HDF_Group/HDF5/1.10."X" + The default can be changed by adding ",INSTALLDIR=" to the + "ctest -S HDF5config.cmake..." command. For example on linux: + ctest -S HDF5config.cmake,INSTALLDIR=/usr/local/myhdf5,BUILD_GENERATOR=Unix -C Release -VV -O hdf5.log ======================================================================== -- cgit v0.12 From d5e78d2ecfd19e8e912cce654462ccc6e853fb72 Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Tue, 19 Jun 2018 09:51:49 -0500 Subject: Update document --- release_docs/INSTALL_CMake.txt | 327 ----------------------------------------- 1 file changed, 327 deletions(-) diff --git a/release_docs/INSTALL_CMake.txt b/release_docs/INSTALL_CMake.txt index 2d75d14..a5864be 100644 --- a/release_docs/INSTALL_CMake.txt +++ b/release_docs/INSTALL_CMake.txt @@ -12,7 +12,6 @@ Section IV: Further considerations Section V: Options for building HDF5 Libraries with CMake command line Section VI: CMake option defaults for HDF5 Section VII: User Defined Options for HDF5 Libraries with CMake -Section VIII: Options for platform configuration files ************************************************************************ @@ -660,332 +659,6 @@ UserMacros.cmake file. Then enable the option to the CMake configuration, build and test process. ======================================================================== -VIII. Options for Platform Configuration Files -======================================================================== - -Below is the HDF5config.cmake and HDF5options.cmake ctest scripts. -Execute: - ctest -S HDF5config.cmake,BUILD_GENERATOR=xxx -C Release -VV -O hdf5.log -The same scripts can be used on Linux, Mac OSX or a Windows machine by -adding an option (${CTEST_SCRIPT_ARG}) to the platform configuration script. - - -############################################################################################# -### ${CTEST_SCRIPT_ARG} is of the form OPTION=VALUE ### -### BUILD_GENERATOR required [Unix, VS2017, VS201764, VS2015, VS201564, VS2013, VS201364] ### -### ctest -S HDF5config.cmake,BUILD_GENERATOR=VS201764 -C Release -VV -O hdf5.log ### -############################################################################################# - -cmake_minimum_required (VERSION 3.10) -############################################################################ -# Usage: -# ctest -S HDF5config.cmake,OPTION=VALUE -C Release -VV -O test.log -# where valid options for OPTION are: -# BUILD_GENERATOR - The cmake build generator: -# Unix * Unix Makefiles -# VS2017 * Visual Studio 15 2017 -# VS201764 * Visual Studio 15 2017 Win64 -# VS2015 * Visual Studio 14 2015 -# VS201564 * Visual Studio 14 2015 Win64 -# VS2013 * Visual Studio 12 2013 -# VS201364 * Visual Studio 12 2013 Win64 -# -# INSTALLDIR - root folder where hdf5 is installed -# CTEST_CONFIGURATION_TYPE - Release, Debug, etc -# CTEST_SOURCE_NAME - source folder -############################################################################## - -set (CTEST_SOURCE_VERSION "1.11.0") -set (CTEST_SOURCE_VERSEXT "") - -############################################################################## -# handle input parameters to script. -#BUILD_GENERATOR - which CMake generator to use, required -#INSTALLDIR - HDF5-1.10.0 root folder -#CTEST_CONFIGURATION_TYPE - Release, Debug, RelWithDebInfo -#CTEST_SOURCE_NAME - name of source folder; HDF5-1.10.0 -if (DEFINED CTEST_SCRIPT_ARG) - # transform ctest script arguments of the form - # script.ctest,var1=value1,var2=value2 - # to variables with the respective names set to the respective values - string (REPLACE "," ";" script_args "${CTEST_SCRIPT_ARG}") - foreach (current_var ${script_args}) - if ("${current_var}" MATCHES "^([^=]+)=(.+)$") - set ("${CMAKE_MATCH_1}" "${CMAKE_MATCH_2}") - endif () - endforeach () -endif () - -# build generator must be defined -if (NOT DEFINED BUILD_GENERATOR) - message (FATAL_ERROR "BUILD_GENERATOR must be defined - Unix, VS2017, or VS201764, VS2015, VS201564, VS2013, VS201364") -endif () - -################################################################### -### Following Line is one of [Release, RelWithDebInfo, Debug] ##### -set (CTEST_CONFIGURATION_TYPE "$ENV{CMAKE_CONFIG_TYPE}") -################################################################### - -if (NOT DEFINED INSTALLDIR) - if (WIN32) - set (INSTALLDIR "C:/Program Files/HDF_Group/HDF5/${CTEST_SOURCE_VERSION}") - else () - set (INSTALLDIR "${CTEST_SCRIPT_DIRECTORY}/HDF_Group/HDF5/${CTEST_SOURCE_VERSION}") - endif () -endif () -if (NOT DEFINED CTEST_CONFIGURATION_TYPE) - set (CTEST_CONFIGURATION_TYPE "Release") -endif () -if (NOT DEFINED CTEST_SOURCE_NAME) - set (CTEST_SOURCE_NAME "hdf5-${CTEST_SOURCE_VERSION}${CTEST_SOURCE_VERSEXT}") -endif () -if (NOT DEFINED STATIC_ONLY) - set (STATICONLYLIBRARIES "YES") -else () - set (STATICONLYLIBRARIES "NO") -endif () -if (NOT DEFINED FORTRAN_LIBRARIES) - set (FORTRANLIBRARIES "NO") -else () - set(FORTRANLIBRARIES "YES") -endif () -if (NOT DEFINED JAVA_LIBRARIES) - set (JAVALIBRARIES "NO") -else () - set (JAVALIBRARIES "YES") -endif () - -set (CTEST_BINARY_NAME "build") -set (CTEST_DASHBOARD_ROOT "${CTEST_SCRIPT_DIRECTORY}") -if (WIN32) - set (CTEST_SOURCE_DIRECTORY "${CTEST_DASHBOARD_ROOT}\\${CTEST_SOURCE_NAME}") - set (CTEST_BINARY_DIRECTORY "${CTEST_DASHBOARD_ROOT}\\${CTEST_BINARY_NAME}") -else () - set (CTEST_SOURCE_DIRECTORY "${CTEST_DASHBOARD_ROOT}/${CTEST_SOURCE_NAME}") - set (CTEST_BINARY_DIRECTORY "${CTEST_DASHBOARD_ROOT}/${CTEST_BINARY_NAME}") -endif () - -################################################################### -######### Following describes compiler ############ -if (WIN32) - set (SITE_OS_NAME "Windows") - set (SITE_OS_VERSION "WIN7") - if (${BUILD_GENERATOR} STREQUAL "VS201764") - set (CTEST_CMAKE_GENERATOR "Visual Studio 15 2017 Win64") - set (SITE_OS_BITS "64") - set (SITE_COMPILER_NAME "vs2017") - set (SITE_COMPILER_VERSION "15") - elseif (${BUILD_GENERATOR} STREQUAL "VS2017") - set (CTEST_CMAKE_GENERATOR "Visual Studio 15 2017") - set (SITE_OS_BITS "32") - set (SITE_COMPILER_NAME "vs2017") - set (SITE_COMPILER_VERSION "15") - elseif (${BUILD_GENERATOR} STREQUAL "VS201564") - set (CTEST_CMAKE_GENERATOR "Visual Studio 14 2015 Win64") - set (SITE_OS_BITS "64") - set (SITE_COMPILER_NAME "vs2015") - set (SITE_COMPILER_VERSION "14") - elseif (${BUILD_GENERATOR} STREQUAL "VS2015") - set (CTEST_CMAKE_GENERATOR "Visual Studio 14 2015") - set (SITE_OS_BITS "32") - set (SITE_COMPILER_NAME "vs2015") - set (SITE_COMPILER_VERSION "14") - elseif (${BUILD_GENERATOR} STREQUAL "VS201364") - set (CTEST_CMAKE_GENERATOR "Visual Studio 12 2013 Win64") - set (SITE_OS_BITS "64") - set (SITE_COMPILER_NAME "vs2013") - set (SITE_COMPILER_VERSION "12") - elseif (${BUILD_GENERATOR} STREQUAL "VS2013") - set (CTEST_CMAKE_GENERATOR "Visual Studio 12 2013") - set (SITE_OS_BITS "32") - set (SITE_COMPILER_NAME "vs2013") - set (SITE_COMPILER_VERSION "12") - elseif (${BUILD_GENERATOR} STREQUAL "VS201264") - set (CTEST_CMAKE_GENERATOR "Visual Studio 11 2012 Win64") - set (SITE_OS_BITS "64") - set (SITE_COMPILER_NAME "vs2012") - set (SITE_COMPILER_VERSION "11") - elseif (${BUILD_GENERATOR} STREQUAL "VS2012") - set (CTEST_CMAKE_GENERATOR "Visual Studio 11 2012") - set (SITE_OS_BITS "32") - set (SITE_COMPILER_NAME "vs2012") - set (SITE_COMPILER_VERSION "11") - else () - message (FATAL_ERROR "Invalid BUILD_GENERATOR must be - Unix, VS2017, or VS201764, VS2015, VS201564, VS2013, VS201364") - endif () -## Set the following to unique id your computer ## - set (CTEST_SITE "WIN7${BUILD_GENERATOR}.XXXX") -else () - set (CTEST_CMAKE_GENERATOR "Unix Makefiles") -## Set the following to unique id your computer ## - if (APPLE) - set (CTEST_SITE "MAC.XXXX") - else () - set (CTEST_SITE "LINUX.XXXX") - endif () - if (APPLE) - execute_process (COMMAND xcrun --find cc OUTPUT_VARIABLE XCODE_CC OUTPUT_STRIP_TRAILING_WHITESPACE) - execute_process (COMMAND xcrun --find c++ OUTPUT_VARIABLE XCODE_CXX OUTPUT_STRIP_TRAILING_WHITESPACE) - set (ENV{CC} "${XCODE_CC}") - set (ENV{CXX} "${XCODE_CXX}") - set (CTEST_USE_LAUNCHERS 1) - set (RR_WARNINGS_COMMON "-Wno-format-nonliteral -Wno-cast-align -Wno-unused -Wno-unused-variable -Wno-unused-function -Wno-self-assign -Wno-unused-parameter -Wno-sign-compare") - set (RR_WARNINGS_C "${RR_WARNINGS_COMMON} -Wno-deprecated-declarations -Wno-uninitialized") - set (RR_WARNINGS_CXX "${RR_WARNINGS_COMMON} -Woverloaded-virtual -Wshadow -Wwrite-strings -Wc++11-compat") - set (RR_FLAGS_COMMON "-g -O0 -fstack-protector-all -D_FORTIFY_SOURCE=2") - set (RR_FLAGS_C "${RR_FLAGS_COMMON}") - set (RR_FLAGS_CXX "${RR_FLAGS_COMMON}") - set (ENV{CFLAGS} "${RR_WARNINGS_C} ${RR_FLAGS_C}") - set (ENV{CXXFLAGS} "${RR_WARNINGS_CXX} ${RR_FLAGS_CXX}") - endif () -endif () -################################################################### - -################################################################### -######### Following is for submission to CDash ############ -################################################################### -set (MODEL "Experimental") -################################################################### - -################################################################### -##### Following controls CDash submission ##### -#set (LOCAL_SUBMIT "TRUE") -##### Following controls test process ##### -#set (LOCAL_SKIP_TEST "TRUE") -#set (LOCAL_MEMCHECK_TEST "TRUE") -#set (LOCAL_COVERAGE_TEST "TRUE") -##### Following controls cpack command ##### -#set (LOCAL_NO_PACKAGE "TRUE") -##### Following controls source update ##### -#set (LOCAL_UPDATE "TRUE") -set (REPOSITORY_URL "https://git@bitbucket.hdfgroup.org/scm/hdffv/hdf5.git") -set (REPOSITORY_BRANCH "develop") - -#uncomment to use a compressed source file: *.tar on linux or mac *.zip on windows -#set(CTEST_USE_TAR_SOURCE "${CTEST_SOURCE_VERSION}") -################################################################### - -################################################################### -if (${STATICONLYLIBRARIES}) - set (ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DBUILD_SHARED_LIBS:BOOL=OFF") - ######### Following describes computer ############ - ## following is optional to describe build ## - set (SITE_BUILDNAME_SUFFIX "STATIC") -endif () -################################################################### -#### fortran #### -if (${FORTRANLIBRARIES}) - set (ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF5_BUILD_FORTRAN:BOOL=ON") - ### enable Fortran 2003 depends on HDF5_BUILD_FORTRAN - set (ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF5_ENABLE_F2003:BOOL=ON") -else () - set (ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF5_BUILD_FORTRAN:BOOL=OFF") - ### enable Fortran 2003 depends on HDF5_BUILD_FORTRAN - set (ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF5_ENABLE_F2003:BOOL=OFF") -endif () -#### java #### -if (${JAVALIBRARIES}) - set (ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF5_BUILD_JAVA:BOOL=ON") -else () - set (ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF5_BUILD_JAVA:BOOL=OFF") -endif () - -### change install prefix -set (ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DCMAKE_INSTALL_PREFIX:PATH=${INSTALLDIR}") -set (ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DCTEST_CONFIGURATION_TYPE:STRING=$ENV{CMAKE_CONFIG_TYPE}") - -################################################################### - -if (WIN32) - set (BINFILEBASE "HDF5-${CTEST_SOURCE_VERSION}${CTEST_SOURCE_VERSEXT}-win${SITE_OS_BITS}") - include (${CTEST_SCRIPT_DIRECTORY}\\HDF5options.cmake) - include (${CTEST_SCRIPT_DIRECTORY}\\CTestScript.cmake) - if (EXISTS "${CTEST_BINARY_DIRECTORY}\\${BINFILEBASE}.exe") - file (COPY "${CTEST_BINARY_DIRECTORY}\\${BINFILEBASE}.exe" DESTINATION ${CTEST_SCRIPT_DIRECTORY}) - endif () - if (EXISTS "${CTEST_BINARY_DIRECTORY}\\${BINFILEBASE}.msi") - file (COPY "${CTEST_BINARY_DIRECTORY}\\${BINFILEBASE}.msi" DESTINATION ${CTEST_SCRIPT_DIRECTORY}) - endif () - if (EXISTS "${CTEST_BINARY_DIRECTORY}\\${BINFILEBASE}.zip") - file (COPY "${CTEST_BINARY_DIRECTORY}\\${BINFILEBASE}.zip" DESTINATION ${CTEST_SCRIPT_DIRECTORY}) - endif () -else () - set (BINFILEBASE "HDF5-${CTEST_SOURCE_VERSION}${CTEST_SOURCE_VERSEXT}") - include (${CTEST_SCRIPT_DIRECTORY}/HDF5options.cmake) - include (${CTEST_SCRIPT_DIRECTORY}/CTestScript.cmake) - if (APPLE) - if (EXISTS "${CTEST_BINARY_DIRECTORY}/${BINFILEBASE}-Darwin.dmg") - file (COPY "${CTEST_BINARY_DIRECTORY}/${BINFILEBASE}-Darwin.dmg" DESTINATION ${CTEST_SCRIPT_DIRECTORY}) - endif () - if (EXISTS "${CTEST_BINARY_DIRECTORY}/${BINFILEBASE}-Darwin.tar.gz") - file (COPY "${CTEST_BINARY_DIRECTORY}/${BINFILEBASE}-Darwin.tar.gz" DESTINATION ${CTEST_SCRIPT_DIRECTORY}) - endif () - if (EXISTS "${CTEST_BINARY_DIRECTORY}/${BINFILEBASE}-Darwin.sh") - file (COPY "${CTEST_BINARY_DIRECTORY}/${BINFILEBASE}-Darwin.sh" DESTINATION ${CTEST_SCRIPT_DIRECTORY}) - endif () - else () - if (CYGWIN) - if (EXISTS "${CTEST_BINARY_DIRECTORY}/${BINFILEBASE}-CYGWIN.sh") - file (COPY "${CTEST_BINARY_DIRECTORY}/${BINFILEBASE}-CYGWIN.sh" DESTINATION ${CTEST_SCRIPT_DIRECTORY}) - endif () - if (EXISTS "${CTEST_BINARY_DIRECTORY}/${BINFILEBASE}-CYGWIN.tar.gz") - file (COPY "${CTEST_BINARY_DIRECTORY}/${BINFILEBASE}-CYGWIN.tar.gz" DESTINATION ${CTEST_SCRIPT_DIRECTORY}) - endif () - else () - if (EXISTS "${CTEST_BINARY_DIRECTORY}/${BINFILEBASE}-Linux.sh") - file (COPY "${CTEST_BINARY_DIRECTORY}/${BINFILEBASE}-Linux.sh" DESTINATION ${CTEST_SCRIPT_DIRECTORY}) - endif () - if (EXISTS "${CTEST_BINARY_DIRECTORY}/${BINFILEBASE}-Linux.tar.gz") - file (COPY "${CTEST_BINARY_DIRECTORY}/${BINFILEBASE}-Linux.tar.gz" DESTINATION ${CTEST_SCRIPT_DIRECTORY}) - endif () - endif () - endif () -endif () - -HDF5options.cmake: -############################################################################################# -#### Change default configuration of options in config/cmake/cacheinit.cmake file ### -#### format: set(ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DXXX:YY=ZZZZ") ### -############################################################################################# - -### uncomment/comment and change the following lines for other configuration options - -############################################################################################# -#### alternate toolsets #### -#set(CMAKE_GENERATOR_TOOLSET "Intel C++ Compiler 17.0") - -############################################################################################# -#### ext libraries #### - -### ext libs from tgz -set(ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF5_ALLOW_EXTERNAL_SUPPORT:STRING=TGZ -DTGZPATH:PATH=${CTEST_SCRIPT_DIRECTORY}") -### ext libs from git -#set(ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF5_ALLOW_EXTERNAL_SUPPORT:STRING=GIT") -### ext libs on system -#set(ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DZLIB_LIBRARY:FILEPATH=some_location/lib/zlib.lib -DZLIB_INCLUDE_DIR:PATH=some_location/include") -#set(ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DSZIP_LIBRARY:FILEPATH=some_location/lib/szlib.lib -DSZIP_INCLUDE_DIR:PATH=some_location/include") - -### disable ext zlib building -#set(ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF5_ENABLE_Z_LIB_SUPPORT:BOOL=OFF") -### disable ext szip building -#set(ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF5_ENABLE_SZIP_SUPPORT:BOOL=OFF") -#set(ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF5_ENABLE_SZIP_ENCODING:BOOL=OFF") - -############################################################################################# -### disable test program builds - -#set(ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DBUILD_TESTING:BOOL=OFF") - -############################################################################################# -### disable packaging - -#set(ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF5_NO_PACKAGES:BOOL=ON") -### Create install package with external libraries (szip, zlib) -set(ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF5_PACKAGE_EXTLIBS:BOOL=ON") - -############################################################################################# - -======================================================================== For further assistance, send email to help@hdfgroup.org ======================================================================== -- cgit v0.12 From 25f80cbbec3a7d8036325784168b029cb71cc813 Mon Sep 17 00:00:00 2001 From: hdftest Date: Sun, 24 Jun 2018 17:35:05 -0500 Subject: Snapshot version 1.10 release 3 (snap3) --- README.txt | 2 +- c++/src/cpp_doc_config | 2 +- config/cmake/scripts/HDF5config.cmake | 2 +- configure.ac | 2 +- release_docs/RELEASE.txt | 2 +- src/H5public.h | 4 ++-- 6 files changed, 7 insertions(+), 7 deletions(-) diff --git a/README.txt b/README.txt index 89bdd99..f570161 100644 --- a/README.txt +++ b/README.txt @@ -1,4 +1,4 @@ -HDF5 version 1.10.3-snap3 currently under development +HDF5 version 1.10.3-snap4 currently under development ------------------------------------------------------------------------------ Please refer to the release_docs/INSTALL file for installation instructions. diff --git a/c++/src/cpp_doc_config b/c++/src/cpp_doc_config index f0a83c6..2a7a654 100644 --- a/c++/src/cpp_doc_config +++ b/c++/src/cpp_doc_config @@ -38,7 +38,7 @@ PROJECT_NAME = # could be handy for archiving the generated documentation or if some version # control system is used. -PROJECT_NUMBER = "1.10.3-snap3, currently under development" +PROJECT_NUMBER = "1.10.3-snap4, currently under development" # Using the PROJECT_BRIEF tag one can provide an optional one line description # for a project that appears at the top of each page and should give viewer a diff --git a/config/cmake/scripts/HDF5config.cmake b/config/cmake/scripts/HDF5config.cmake index 6ce2370..0123bce 100755 --- a/config/cmake/scripts/HDF5config.cmake +++ b/config/cmake/scripts/HDF5config.cmake @@ -35,7 +35,7 @@ cmake_minimum_required (VERSION 3.10) ############################################################################## set (CTEST_SOURCE_VERSION "1.10.3") -set (CTEST_SOURCE_VERSEXT "-snap3") +set (CTEST_SOURCE_VERSEXT "-snap4") ############################################################################## # handle input parameters to script. diff --git a/configure.ac b/configure.ac index e1060df..1d11fbd 100644 --- a/configure.ac +++ b/configure.ac @@ -24,7 +24,7 @@ AC_PREREQ([2.69]) ## NOTE: Do not forget to change the version number here when we do a ## release!!! ## -AC_INIT([HDF5], [1.10.3-snap3], [help@hdfgroup.org]) +AC_INIT([HDF5], [1.10.3-snap4], [help@hdfgroup.org]) AC_CONFIG_SRCDIR([src/H5.c]) AC_CONFIG_HEADERS([src/H5config.h]) diff --git a/release_docs/RELEASE.txt b/release_docs/RELEASE.txt index 8a113c6..f3c6557 100644 --- a/release_docs/RELEASE.txt +++ b/release_docs/RELEASE.txt @@ -1,4 +1,4 @@ -HDF5 version 1.10.3-snap3 currently under development +HDF5 version 1.10.3-snap4 currently under development ================================================================================ diff --git a/src/H5public.h b/src/H5public.h index 6991de8..5d96b2a 100644 --- a/src/H5public.h +++ b/src/H5public.h @@ -94,9 +94,9 @@ extern "C" { #define H5_VERS_MAJOR 1 /* For major interface/format changes */ #define H5_VERS_MINOR 10 /* For minor interface/format changes */ #define H5_VERS_RELEASE 3 /* For tweaks, bug-fixes, or development */ -#define H5_VERS_SUBRELEASE "snap3" /* For pre-releases like snap0 */ +#define H5_VERS_SUBRELEASE "snap4" /* For pre-releases like snap0 */ /* Empty string for real releases. */ -#define H5_VERS_INFO "HDF5 library version: 1.10.3-snap3" /* Full version string */ +#define H5_VERS_INFO "HDF5 library version: 1.10.3-snap4" /* Full version string */ #define H5check() H5check_version(H5_VERS_MAJOR,H5_VERS_MINOR, \ H5_VERS_RELEASE) -- cgit v0.12